diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..bdfb611 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Notice to external contributors + + +## General info + +Hello! In order for us (YANDEX LLC) to accept patches and other contributions from you, you will have to adopt our Yandex Contributor License Agreement (the “**CLA**”). The current version of the CLA can be found here: +1) https://yandex.ru/legal/cla/?lang=en (in English) and +2) https://yandex.ru/legal/cla/?lang=ru (in Russian). + +By adopting the CLA, you state the following: + +* You obviously wish and are willingly licensing your contributions to us for our open source projects under the terms of the CLA, +* You have read the terms and conditions of the CLA and agree with them in full, +* You are legally able to provide and license your contributions as stated, +* We may use your contributions for our open source projects and for any other our project too, +* We rely on your assurances concerning the rights of third parties in relation to your contributions. + +If you agree with these principles, please read and adopt our CLA. By providing us your contributions, you hereby declare that you have already read and adopt our CLA, and we may freely merge your contributions with our corresponding open source project and use it in further in accordance with terms and conditions of the CLA. + +## Provide contributions + +If you have already adopted terms and conditions of the CLA, you are able to provide your contributions. When you submit your pull request, please add the following information into it: + +``` +I hereby agree to the terms of the CLA available at: [link]. +``` + +Replace the bracketed text as follows: +* [link] is the link to the current version of the CLA: https://yandex.ru/legal/cla/?lang=en (in English) or https://yandex.ru/legal/cla/?lang=ru (in Russian). + +It is enough to provide us such notification once. + +## Other questions + +If you have any questions, please mail us at opensource@yandex-team.ru. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..74ae319 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Yandex LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Readme.md b/README.md similarity index 95% rename from Readme.md rename to README.md index 49ea6d0..69a3a8e 100644 --- a/Readme.md +++ b/README.md @@ -1,5 +1,7 @@ # Diplodoc Mermaid extension +[![NPM version](https://img.shields.io/npm/v/@diplodoc/mermaid-extension.svg?style=flat)](https://www.npmjs.org/package/@diplodoc/mermaid-extension) + This is extension for Diplodoc platform which adds support for Mermaid diagrams. Extension contains some parts: @@ -45,14 +47,14 @@ Add mermaid runtime to your final page }); - + ``` ## Prepared Mermaid runtime The problem with Mermaid is that it has big bundle size. The most expected behavior is loading it asynchronously. -But if we want to disable Mermaid's `startOnLoad` option, then we don't know when the Mermaid will be initialized. +But if we want to disable Mermaid's `startOnLoad` option, then we don't know when the Mermaid will be initialized. **Prepared Mermaid runtime** designed to solve this problem. We disable Mermaid's `startOnLoad` option to precise control render step. @@ -133,13 +135,13 @@ const Doc: React.FC = ({ content }) => { }) ] }) - + // Load mermaid only if one or more diagram should be rendered if (result.script.includes(MERMAID_RUNTIME)) { // Load oversized mermaid runtime asyncronously import('@diplodoc/mermaid-extension/runtime') } - + return
} @@ -161,4 +163,4 @@ export const App: React.FC = ({ theme }) => { /> } -``` \ No newline at end of file +``` diff --git a/package-lock.json b/package-lock.json index 875dd17..9ea013c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "@diplodoc/mermaid-extension", "version": "1.2.0", - "license": "ISC", + "license": "MIT", "devDependencies": { "@diplodoc/eslint-config": "^1.0.14", "@diplodoc/prettier-config": "^1.0.0", diff --git a/package.json b/package.json index 4305688..5548c27 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "markdown-it" ], "author": "", - "license": "ISC", + "license": "MIT", "files": [ "plugin", "runtime",