diff --git a/.gitignore b/.gitignore index 6a1cc85e5..e6728b03f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ stats/ demos/dev/** !/demos/dev/example.html +tsx-0/** diff --git a/docker-compose.yml b/docker-compose.yml index e2484bdc5..a48cf5b8a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,9 @@ services: stdin_open: true tty: true working_dir: /mermaid - mem_limit: '4G' + mem_limit: '6G' environment: - - NODE_OPTIONS=--max_old_space_size=4096 + - NODE_OPTIONS=--max_old_space_size=6096 volumes: - ./:/mermaid - root_cache:/root/.cache diff --git a/packages/mermaid/scripts/docs.mts b/packages/mermaid/scripts/docs.mts index 3689cb68b..42e299c54 100644 --- a/packages/mermaid/scripts/docs.mts +++ b/packages/mermaid/scripts/docs.mts @@ -60,13 +60,11 @@ const CDN_URL = 'https://cdn.jsdelivr.net/npm'; // 'https://unpkg.com'; const MERMAID_KEYWORD = 'mermaid'; const MERMAID_CODE_ONLY_KEYWORD = 'mermaid-example'; +const MERMAID_DIAGRAM_ONLY = 'mermaid-nocode'; // These keywords will produce both a mermaid diagram and a code block with the diagram source const MERMAID_EXAMPLE_KEYWORDS = [MERMAID_KEYWORD, 'mmd', MERMAID_CODE_ONLY_KEYWORD]; // 'mmd' is an old keyword that used to be used -// This keyword will only produce a mermaid diagram -const MERMAID_DIAGRAM_ONLY = 'mermaid-nocode'; - // These will be transformed into block quotes const BLOCK_QUOTE_KEYWORDS = ['note', 'tip', 'warning', 'danger']; diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index 8601664fa..db1fdfef0 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -71,8 +71,8 @@ function nav() { { text: 'Docs', link: '/intro/', activeMatch: '/intro/' }, { text: 'Tutorials', - link: '/config/Tutorials', - activeMatch: '/config/', + link: '/ecosystem/tutorials', + activeMatch: '/ecosystem/', }, { text: 'Integrations', @@ -81,8 +81,8 @@ function nav() { }, { text: 'Contributing', - link: '/community/development.html', - activeMatch: '/community/', + link: '/contributing/intro', + activeMatch: '/contributing/', }, { text: 'Latest News', @@ -95,11 +95,7 @@ function nav() { { text: 'Changelog', link: 'https://github.com/mermaid-js/mermaid/releases', - }, - { - text: 'Contributing', - link: '/community/development', - }, + } ], }, { @@ -167,7 +163,6 @@ function sidebarConfig() { collapsed: false, items: [ { text: 'Configuration', link: '/config/configuration' }, - { text: 'Tutorials', link: '/config/Tutorials' }, { text: 'API-Usage', link: '/config/usage' }, { text: 'Mermaid API Configuration', link: '/config/setup/README' }, { text: 'Mermaid Configuration Options', link: '/config/schema-docs/config' }, @@ -175,7 +170,6 @@ function sidebarConfig() { { text: 'Theming', link: '/config/theming' }, { text: 'Accessibility', link: '/config/accessibility' }, { text: 'Mermaid CLI', link: '/config/mermaidCLI' }, - { text: 'Advanced usage', link: '/config/advanced' }, { text: 'FAQ', link: '/config/faq' }, ], }, @@ -189,6 +183,7 @@ function sidebarEcosystem() { collapsed: false, items: [ { text: 'Mermaid Chart', link: '/ecosystem/mermaid-chart' }, + { text: 'Tutorials', link: '/ecosystem/tutorials' }, { text: 'Integrations - Community', link: '/ecosystem/integrations-community' }, { text: 'Integrations - Create', link: '/ecosystem/integrations-create' }, ], @@ -199,15 +194,18 @@ function sidebarEcosystem() { function sidebarCommunity() { return [ { - text: '🙌 Contributions and Community', + text: '🙌 Contributing', collapsed: false, items: [ - { text: 'Contributing to Mermaid', link: '/community/development' }, - { text: 'Contributing Code', link: '/community/code' }, - { text: 'Contributing Documentation', link: '/community/documentation' }, - { text: 'Questions and Suggestions', link: '/community/questions-and-suggestions' }, - { text: 'Adding Diagrams', link: '/community/newDiagram' }, - { text: 'Security', link: '/community/security' }, + { text: 'Contributing to Mermaid', link: '/contributing/intro' }, + { text: 'Quick start guide', link: '/contributing/quick-start' }, + { text: 'Initial setup', link: '/contributing/setup' }, + { text: 'Workflow', link: '/contributing/workflow' }, + { text: 'Code', link: '/contributing/code' }, + { text: 'Documentation', link: '/contributing/documentation' }, + { text: 'Questions and Suggestions', link: '/contributing/questions-and-suggestions' }, + { text: 'Adding Diagrams', link: '/contributing/new-diagram' }, + { text: 'Security', link: '/contributing/security' }, ], }, ]; diff --git a/packages/mermaid/src/docs/community/code.md b/packages/mermaid/src/docs/community/code.md index 93a5fcd95..b1f225d50 100644 --- a/packages/mermaid/src/docs/community/code.md +++ b/packages/mermaid/src/docs/community/code.md @@ -4,7 +4,13 @@ The basic steps for contributing code are: ```mermaid graph LR - git[1. Checkout a git branch] --> codeTest[2. Write tests and code] --> doc[3. Update documentation] --> submit[4. Submit a PR] --> review[5. Review and merge] + git --> codeTest --> doc --> submit --> review + + git[1. Checkout a git branch] + codeTest[2. Write tests and code] + doc[3. Update documentation] + submit[4. Submit a PR] + review[5. Review and merge] ``` 1. **Create** and checkout a git branch and work on your code in the branch @@ -47,12 +53,17 @@ You can always check current [configuration of labelling and branch prefixes](ht If your work is specific to a single diagram type, it is a good idea to put the diagram type at the start of the description. This will help us keep release notes organized: it will help us keep changes for a diagram type together. +```tip **Ex: A new feature described in issue 2945 that adds a new arrow type called 'florbs' to state diagrams** `feature/2945_state-diagram-new-arrow-florbs` +``` +```tip **Ex: A bug described in issue 1123 that causes random ugly red text in multiple diagram types** + `bug/1123_fix_random_ugly_red_text` +``` ## 2. Write Tests diff --git a/packages/mermaid/src/docs/community/docker-development.md b/packages/mermaid/src/docs/community/docker-setup.md similarity index 75% rename from packages/mermaid/src/docs/community/docker-development.md rename to packages/mermaid/src/docs/community/docker-setup.md index 89e08b3f7..753c1d4b9 100644 --- a/packages/mermaid/src/docs/community/docker-development.md +++ b/packages/mermaid/src/docs/community/docker-setup.md @@ -1,14 +1,20 @@ -# Contributing to Mermaid via Docker +# Initial setup with Docker > The following documentation describes how to work with Mermaid in a Docker environment. -> There's also a [host installation guide](../community/development.md) +> There's also a [host installation guide](../community/setup.md) > if you prefer to work without a Docker environment. -So you want to help? That's great! +Initial setup consists of 3 main steps:: -![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif) +```mermaid-nocode +flowchart LR + source --> requirements --> setup + + source[Get the source code] + requirements[Install the requirements] + setup[Setup and launch] -Here are a few things to get you started on the right path. +``` ## Get the Source Code @@ -23,7 +29,7 @@ Then you **clone** a copy to your local development machine (e.g. where you code ## Technical Requirements > The following documentation describes how to work with Mermaid in a Docker environment. -> There's also a [host installation guide](../community/development.md) +> There's also a [host installation guide](../community/setup.md) > if you prefer to work without a Docker environment. [Install Docker](https://docs.docker.com/engine/install/). And that is pretty much all you need. @@ -87,18 +93,16 @@ After making code changes, the dev server will rebuild the mermaid library. You ## Verify Everything is Working +This step is optional, but it helps to make sure that everything in development branch was OK before you started making any changes. + +You can run the `test` script to verify that pnpm is working _and_ that the repository has been cloned correctly: + ```bash -./run pnpm test +pnpm test ``` The `test` script and others are in the top-level `package.json` file. All tests should run successfully without any errors or failures. (You might see _lint_ or _formatting_ warnings; those are ok during this step.) -## Last Words -Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there. - -[Join our Slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) - -![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif) diff --git a/packages/mermaid/src/docs/community/documentation.md b/packages/mermaid/src/docs/community/documentation.md index 6a0df983d..2c33af410 100644 --- a/packages/mermaid/src/docs/community/documentation.md +++ b/packages/mermaid/src/docs/community/documentation.md @@ -1,21 +1,18 @@ # Contributing Documentation -**_[TODO: This section is still a WIP. It still needs MAJOR revision.]_** - If it is not in the documentation, it's like it never happened. Wouldn't that be sad? With all the effort that was put into the feature? -The docs are located in the `packages/mermaid/src/docs` folder and are written in Markdown. Just pick the right section and start typing. +The documentation is written in Markdown. It is located in the [`packages/mermaid/src/docs`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder and organized according to relevant subfolder. Just pick the right section and start typing. -The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. -Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published. +The contents of [mermaid.js.org](https://mermaid.js.org/) are based on the docs from the `master` branch. Updates committed to the `master` branch are reflected in the [Mermaid Docs](https://mermaid.js.org/) once published. ## How to Contribute to Documentation -We are a little less strict here, it is OK to commit directly in the `develop` branch if you are a collaborator. - -The documentation is located in the `packages/mermaid/src/docs` directory and organized according to relevant subfolder. +```warning +DO NOT CHANGE FILES IN `/docs` The `docs` folder will be automatically generated when committing to `packages/mermaid/src/docs` and **should not** be edited manually. +``` ```mermaid flowchart LR @@ -25,6 +22,12 @@ flowchart LR ``` +It is OK to commit directly in the `develop` branch if you are a collaborator. + +```tip +If the change is **only** to the documentation, you can get your changes published to the site quicker by making a PR to the `master` branch. In that case, your branch should be based on master, not develop. +``` + You can use `note`, `tip`, `warning` and `danger` in triple backticks to add a note, tip, warning or danger box. Do not use vitepress specific markdown syntax `::: warning` as it will not be processed correctly. @@ -46,14 +49,6 @@ Danger content ``` ```` -```note -If the change is _only_ to the documentation, you can get your changes published to the site quicker by making a PR to the `master` branch. In that case, your branch should be based on master, not develop. -``` - -We encourage contributions to the documentation at [packages/mermaid/src/docs in the _develop_ branch](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs). - -**_DO NOT CHANGE FILES IN `/docs`_** - ## The official documentation site **[The mermaid documentation site](https://mermaid.js.org/) is powered by [Vitepress](https://vitepress.vuejs.org/).** diff --git a/packages/mermaid/src/docs/community/intro.md b/packages/mermaid/src/docs/community/intro.md new file mode 100644 index 000000000..953f98e67 --- /dev/null +++ b/packages/mermaid/src/docs/community/intro.md @@ -0,0 +1,49 @@ +# Contributing to Mermaid + +So you want to help? That's great! + +![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif) + +Here are a few things to get you started on the right path. + +## How can I help? + +```mermaid-nocode +mindmap + root)Contribution( + Development + Solving issues + Adding new diagrams + Handling pull requests + Updating tooling + Testing + Verification of fixed issues + Regression testing in connection with releases + Testing pull requests + Management + Coordinating the work + Classification and monitoring of incoming issues +``` + +## Join the development + +[Join our slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) + +## Where do I start? + +* You could confirm the bugs in [these issues](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug+%2F+Error%22+label%3A%22Status%3A+Pending%22). +* You could help write and improve the documentation! [Here's ](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Help+wanted%21%22+label%3A%22Area%3A+Documentation%22)some inspiration. +* You could start getting some knowledge of the code base by working on [these "good first issues"](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22+). +* You could jump right in and help us fix any of [these bugs](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug+%2F+Error%22+label%3A%22Help+wanted%21%22+label%3A%22Area%3A+Development%22)! +* You could work on a new feature! [These](https://github.com/knsv/mermaid/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22Area%3A+Development%22+label%3A%22Help+wanted%21%22+label%3A%22Type%3A+Enhancement%22+label%3A%22Status%3A+Approved%22) are some ideas! + +Detailed information about contributing can be found in the [contribution guide](https://github.com/mermaid-js/mermaid/blob/master/CONTRIBUTING.md). + + +## Last Words + +Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there. + +[Join our Slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) + +![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif) diff --git a/packages/mermaid/src/docs/community/newDiagram.md b/packages/mermaid/src/docs/community/new-diagram.md similarity index 100% rename from packages/mermaid/src/docs/community/newDiagram.md rename to packages/mermaid/src/docs/community/new-diagram.md diff --git a/packages/mermaid/src/docs/community/quick-start.md b/packages/mermaid/src/docs/community/quick-start.md new file mode 100644 index 000000000..84ae492ea --- /dev/null +++ b/packages/mermaid/src/docs/community/quick-start.md @@ -0,0 +1 @@ +quick start contributing guide \ No newline at end of file diff --git a/packages/mermaid/src/docs/community/development.md b/packages/mermaid/src/docs/community/setup.md similarity index 78% rename from packages/mermaid/src/docs/community/development.md rename to packages/mermaid/src/docs/community/setup.md index fc11a1f6c..2545d315a 100644 --- a/packages/mermaid/src/docs/community/development.md +++ b/packages/mermaid/src/docs/community/setup.md @@ -1,12 +1,20 @@ -# Contributing to Mermaid +# Initial setup > The following documentation describes how to work with Mermaid in your host environment. -> There's also a [Docker installation guide](../community/docker-development.md) +> There's also a [Docker installation guide](../community/docker-setup.md) > if you prefer to work in a Docker environment. -So you want to help? That's great! +Initial setup consists of 3 main steps: -![Image of happy people jumping with excitement](https://media.giphy.com/media/BlVnrxJgTGsUw/giphy.gif) +```mermaid-nocode +flowchart LR + source --> requirements --> setup + + source[Get the source code] + requirements[Install the requirements] + setup[Setup and launch] + +``` Here are a few things to get you started on the right path. @@ -18,12 +26,12 @@ Then you **clone** a copy to your local development machine (e.g. where you code [Fork mermaid](https://github.com/mermaid-js/mermaid/fork) to start contributing to the main project and its documentation, or [search for other repositories](https://github.com/orgs/mermaid-js/repositories). -[Here is a GitHub document that gives an overview of the process.](https://docs.github.com/en/get-started/quickstart/fork-a-repo) +[Here is a GitHub document that gives an overview of the process](https://docs.github.com/en/get-started/quickstart/fork-a-repo). ## Technical Requirements > The following documentation describes how to work with Mermaid in your host environment. -> There's also a [Docker installation guide](../community/docker-development.md) +> There's also a [Docker installation guide](../community/docker-setup.md) > if you prefer to work in a Docker environment. These are the tools we use for working with the code and documentation: @@ -71,6 +79,8 @@ After making code changes, the dev server will rebuild the mermaid library. You ## Verify Everything is Working +This step is optional, but it helps to make sure that everything in development branch was OK before you started making any changes. + You can run the `test` script to verify that pnpm is working _and_ that the repository has been cloned correctly: ```bash @@ -80,11 +90,3 @@ pnpm test The `test` script and others are in the top-level `package.json` file. All tests should run successfully without any errors or failures. (You might see _lint_ or _formatting_ warnings; those are ok during this step.) - -## Last Words - -Don't get daunted if it is hard in the beginning. We have a great community with only encouraging words. So, if you get stuck, ask for help and hints in the Slack forum. If you want to show off something good, show it off there. - -[Join our Slack community if you want closer contact!](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) - -![Image of superhero wishing you good luck](https://media.giphy.com/media/l49JHz7kJvl6MCj3G/giphy.gif) diff --git a/packages/mermaid/src/docs/community/workflow.md b/packages/mermaid/src/docs/community/workflow.md new file mode 100644 index 000000000..313fd1078 --- /dev/null +++ b/packages/mermaid/src/docs/community/workflow.md @@ -0,0 +1,130 @@ +# Workflow + +Mermaid uses a [Git Flow](https://guides.github.com/introduction/flow/)–inspired approach to branching. + +Development is done in the `develop` branch. + +Once development is done we create a `release/vX.X.X` branch from `develop` for testing. + +Once the release happens we add a tag to the `release` branch and merge it with `master`. The live product and on-line documentation are what is in the `master` branch. + +The basic steps to start contributing code and documentation are: + +```mermaid-nocode + flowchart TB + + fetch --> branch --> update --> submit --> review --> fetch + fetch[Fetch development branch] + branch[Checkout a new branch] + update[Make changes] + submit[Submit a PR] + review[Review and merge] +``` + +## Fech latest code + +```tip +All new work should be based on the `develop` branch. +``` + +Make sure you have the most up-to-date version of the `develop` branch. + +Check out the `develop` branch, then `fetch` or `pull` to update it: + +```bash +git checkout develop +git fetch # or `git pull` +``` + +## Checkout new branch + +Create a new branch for your work: + +```bash +git checkout develop # make sure you are on development branch +git checkout -b docs/2910_update-contributing-guidelines +``` + +We use the following naming convention for branches: + +```txt +[feature | bug | chore | docs]/[issue number]_[short-description] +``` + +You can always check current [configuration of labelling and branch prefixes](https://github.com/mermaid-js/mermaid/blob/develop/.github/pr-labeler.yml) + +- The first part is the **type** of change: a `feature`, `bug`, `chore`, `docs` +- followed by a **slash** (`/`),which helps to group like types together in many git tools +- followed by the **issue number**, e.g. `2910` +- followed by an **underscore** (`_`) +- followed by a **short description** with dashes (`-`) or underscores (`_`) instead of spaces + +```mermaid-nocode +flowchart LR + feature --> slash + bug --> slash + chore --> slash + docs --> slash + slash --> 2945 --> underscore + slash --> 1123 --> underscore + underscore --> short_description_1 + underscore --> short_description_2 + + underscore["_"] + slash["/"] + + short_description_1["state-diagram-new-arrow-florbs"] + short_description_2["fix_random_ugly_red_text"] +``` + + +If your work is specific to a single diagram type, it is a good idea to put the diagram type at the start of the description. This will help us keep release notes organized by a diagram type. + +```note +A new feature described in issue 2945 that adds a new arrow type called 'florbs' to state diagrams + +`feature/2945_state-diagram-new-arrow-florbs` +``` + +```tip +A bug described in issue 1123 that causes random ugly red text in multiple diagram types + +`bug/1123_fix_random_ugly_red_text` +``` + +## Make changes + +Source code along with the documentation is located in packages [`packages/mermaid`](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/docs) folder. +You may need to update both, depending on your task. + +## Submit your pull request + +````note +Do not forget to push your changes + +```bash +git push -u origin docs/2910_update-contributing-guidelines +``` +```` + +We make all changes via Pull Requests (PRs). Open a new one. + +Right now we are not following any strict rules about naming PRs. Give it a representative title and short description. There is also a [pull_request_template](https://github.com/mermaid-js/mermaid/blob/develop/.github/pull_request_template.md) which will help you with it. + +In case in its description contains a [magic comment](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) your PR will be automatically attached to the issue: + +``` +Resolves # +``` +You can edit it if needed. + +## Congratulations + +You have successfully submitted your improvements! What is next? + +- PRs will be reviewed by active maintainers, who will provide feedback and request changes as needed. +- The maintainers will request a review from _knsv_, if necessary. +- Once the PR is approved, the maintainers will merge the PR into the `develop` branch. +- When a release is ready, the `release/x.x.x` branch will be created, extensively tested and knsv will be in charge of the release process. + +_knsv, Knut Sveidqvist_ is in charge of the final release process and the active maintainers are in charge of reviewing and merging most PRs. diff --git a/packages/mermaid/src/docs/config/advanced.md b/packages/mermaid/src/docs/config/advanced.md deleted file mode 100644 index 4ab477428..000000000 --- a/packages/mermaid/src/docs/config/advanced.md +++ /dev/null @@ -1,24 +0,0 @@ -# Advanced mermaid (Coming soon..) - -## splitting mermaid code from html - -A more condensed html code can be achieved by embedding the mermaid code in its own .js file, which is referenced like so: - -```html -... - - - -``` - -The actual mermaid file could for example look like this: - -```javascript -mermaid content ... -``` - -## mermaid configuration options - -```markdown -(coming soon) -``` diff --git a/packages/mermaid/src/docs/contributing b/packages/mermaid/src/docs/contributing new file mode 120000 index 000000000..013cf3ce0 --- /dev/null +++ b/packages/mermaid/src/docs/contributing @@ -0,0 +1 @@ +community/ \ No newline at end of file diff --git a/packages/mermaid/src/docs/config/Tutorials.md b/packages/mermaid/src/docs/ecosystem/tutorials.md similarity index 100% rename from packages/mermaid/src/docs/config/Tutorials.md rename to packages/mermaid/src/docs/ecosystem/tutorials.md diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a872627c..0df111ebd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -481,6 +481,61 @@ importers: specifier: ^7.0.0 version: 7.0.0 + packages/mermaid/src/vitepress: + dependencies: + '@vueuse/core': + specifier: ^10.1.0 + version: 10.1.0(vue@3.3.4) + jiti: + specifier: ^1.18.2 + version: 1.18.2 + mermaid: + specifier: workspace:^ + version: link:../.. + vue: + specifier: ^3.3 + version: 3.3.4 + devDependencies: + '@iconify-json/carbon': + specifier: ^1.1.16 + version: 1.1.16 + '@unocss/reset': + specifier: ^0.58.0 + version: 0.58.0 + '@vite-pwa/vitepress': + specifier: ^0.3.0 + version: 0.3.0(vite-plugin-pwa@0.17.0) + '@vitejs/plugin-vue': + specifier: ^4.2.1 + version: 4.2.1(vite@4.4.12)(vue@3.3.4) + fast-glob: + specifier: ^3.2.12 + version: 3.2.12 + https-localhost: + specifier: ^4.7.1 + version: 4.7.1 + pathe: + specifier: ^1.1.0 + version: 1.1.0 + unocss: + specifier: ^0.58.0 + version: 0.58.0(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.12) + unplugin-vue-components: + specifier: ^0.26.0 + version: 0.26.0(rollup@2.79.1)(vue@3.3.4) + vite: + specifier: ^4.4.12 + version: 4.4.12(@types/node@18.17.5) + vite-plugin-pwa: + specifier: ^0.17.0 + version: 0.17.0(vite@4.4.12)(workbox-build@7.0.0)(workbox-window@7.0.0) + vitepress: + specifier: 1.0.0-rc.31 + version: 1.0.0-rc.31(@algolia/client-search@4.19.1)(@types/node@18.17.5)(postcss@8.4.31)(search-insights@2.7.0)(typescript@5.1.6) + workbox-window: + specifier: ^7.0.0 + version: 7.0.0 + tests/webpack: dependencies: '@mermaid-js/mermaid-example-diagram': @@ -1372,7 +1427,6 @@ packages: /@babel/helper-string-parser@7.23.4: resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} engines: {node: '>=6.9.0'} - dev: true /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} @@ -1455,7 +1509,6 @@ packages: hasBin: true dependencies: '@babel/types': 7.23.5 - dev: true /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.23.5): resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} @@ -2547,7 +2600,6 @@ packages: '@babel/helper-string-parser': 7.23.4 '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - dev: true /@bcherny/json-schema-ref-parser@9.0.9: resolution: {integrity: sha512-vmEmnJCfpkLdas++9OYg6riIezTYqTHpqUTODJzHLzs5UnXujbOJW9VwcVCnyo1mVRt32FRr23iXBx/sX8YbeQ==} @@ -4397,21 +4449,6 @@ packages: picomatch: 2.3.1 dev: true - /@rollup/pluginutils@5.0.5(rollup@2.79.1): - resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.1 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 2.79.1 - dev: true - /@rollup/pluginutils@5.1.0(rollup@2.79.1): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -4598,7 +4635,7 @@ packages: /@types/babel__core@7.20.1: resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@babel/types': 7.23.0 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 @@ -4614,7 +4651,7 @@ packages: /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@babel/types': 7.23.0 dev: true @@ -5558,6 +5595,22 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true + /@unocss/astro@0.58.0(rollup@2.79.1)(vite@4.4.12): + resolution: {integrity: sha512-df+tEFO5eKXjQOwSWQhS9IdjD0sfLHLtn8U09sEKR2Nmh5CvpwyBxmvLQgOCilPou7ehmyKfsyGRLZg7IMp+Ew==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@unocss/core': 0.58.0 + '@unocss/reset': 0.58.0 + '@unocss/vite': 0.58.0(rollup@2.79.1)(vite@4.4.12) + vite: 4.4.12(@types/node@18.17.5) + transitivePeerDependencies: + - rollup + dev: true + /@unocss/astro@0.58.0(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-df+tEFO5eKXjQOwSWQhS9IdjD0sfLHLtn8U09sEKR2Nmh5CvpwyBxmvLQgOCilPou7ehmyKfsyGRLZg7IMp+Ew==} peerDependencies: @@ -5752,6 +5805,26 @@ packages: '@unocss/core': 0.58.0 dev: true + /@unocss/vite@0.58.0(rollup@2.79.1)(vite@4.4.12): + resolution: {integrity: sha512-OCUOLMSOBEtXOEyBbAvMI3/xdR175BWRzmvV9Wc34ANZclEvCdVH8+WU725ibjY4VT0gVIuX68b13fhXdHV41A==} + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + dependencies: + '@ampproject/remapping': 2.2.1 + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) + '@unocss/config': 0.58.0 + '@unocss/core': 0.58.0 + '@unocss/inspector': 0.58.0 + '@unocss/scope': 0.58.0 + '@unocss/transformer-directives': 0.58.0 + chokidar: 3.5.3 + fast-glob: 3.3.2 + magic-string: 0.30.5 + vite: 4.4.12(@types/node@18.17.5) + transitivePeerDependencies: + - rollup + dev: true + /@unocss/vite@0.58.0(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-OCUOLMSOBEtXOEyBbAvMI3/xdR175BWRzmvV9Wc34ANZclEvCdVH8+WU725ibjY4VT0gVIuX68b13fhXdHV41A==} peerDependencies: @@ -5777,7 +5850,18 @@ packages: peerDependencies: vite-plugin-pwa: '>=0.17.0 <1' dependencies: - vite-plugin-pwa: 0.17.0(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0) + vite-plugin-pwa: 0.17.0(vite@4.4.12)(workbox-build@7.0.0)(workbox-window@7.0.0) + dev: true + + /@vitejs/plugin-vue@4.2.1(vite@4.4.12)(vue@3.3.4): + resolution: {integrity: sha512-ZTZjzo7bmxTRTkb8GSTwkPOYDIP7pwuyV+RV53c9PYUouwcbkIZIvWvNWlX2b1dYZqtOv7D6iUAnJLVNGcLrSw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.0.0 + vue: ^3.2.25 + dependencies: + vite: 4.4.12(@types/node@18.17.5) + vue: 3.3.4 dev: true /@vitejs/plugin-vue@4.2.1(vite@4.5.0)(vue@3.3.4): @@ -5909,7 +5993,7 @@ packages: /@vue/compiler-core@3.3.8: resolution: {integrity: sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@vue/shared': 3.3.8 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -5945,7 +6029,7 @@ packages: /@vue/compiler-sfc@3.3.8: resolution: {integrity: sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@vue/compiler-core': 3.3.8 '@vue/compiler-dom': 3.3.8 '@vue/compiler-ssr': 3.3.8 @@ -5980,7 +6064,7 @@ packages: /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 @@ -5989,7 +6073,7 @@ packages: /@vue/reactivity-transform@3.3.8: resolution: {integrity: sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==} dependencies: - '@babel/parser': 7.23.0 + '@babel/parser': 7.23.5 '@vue/compiler-core': 3.3.8 '@vue/shared': 3.3.8 estree-walker: 2.0.2 @@ -6067,7 +6151,7 @@ packages: '@types/web-bluetooth': 0.0.16 '@vueuse/metadata': 10.1.0 '@vueuse/shared': 10.1.0(vue@3.3.4) - vue-demi: 0.14.5(vue@3.3.4) + vue-demi: 0.14.6(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -16295,6 +16379,45 @@ packages: engines: {node: '>= 10.0.0'} dev: true + /unocss@0.58.0(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.12): + resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} + engines: {node: '>=14'} + peerDependencies: + '@unocss/webpack': 0.58.0 + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@unocss/webpack': + optional: true + vite: + optional: true + dependencies: + '@unocss/astro': 0.58.0(rollup@2.79.1)(vite@4.4.12) + '@unocss/cli': 0.58.0(rollup@2.79.1) + '@unocss/core': 0.58.0 + '@unocss/extractor-arbitrary-variants': 0.58.0 + '@unocss/postcss': 0.58.0(postcss@8.4.31) + '@unocss/preset-attributify': 0.58.0 + '@unocss/preset-icons': 0.58.0 + '@unocss/preset-mini': 0.58.0 + '@unocss/preset-tagify': 0.58.0 + '@unocss/preset-typography': 0.58.0 + '@unocss/preset-uno': 0.58.0 + '@unocss/preset-web-fonts': 0.58.0 + '@unocss/preset-wind': 0.58.0 + '@unocss/reset': 0.58.0 + '@unocss/transformer-attributify-jsx': 0.58.0 + '@unocss/transformer-attributify-jsx-babel': 0.58.0 + '@unocss/transformer-compile-class': 0.58.0 + '@unocss/transformer-directives': 0.58.0 + '@unocss/transformer-variant-group': 0.58.0 + '@unocss/vite': 0.58.0(rollup@2.79.1)(vite@4.4.12) + vite: 4.4.12(@types/node@18.17.5) + transitivePeerDependencies: + - postcss + - rollup + - supports-color + dev: true + /unocss@0.58.0(postcss@8.4.31)(rollup@2.79.1)(vite@4.5.0): resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} engines: {node: '>=14'} @@ -16353,7 +16476,7 @@ packages: optional: true dependencies: '@antfu/utils': 0.7.6 - '@rollup/pluginutils': 5.0.5(rollup@2.79.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) chokidar: 3.5.3 debug: 4.3.4(supports-color@8.1.1) fast-glob: 3.3.2 @@ -16546,6 +16669,24 @@ packages: - supports-color dev: true + /vite-plugin-pwa@0.17.0(vite@4.4.12)(workbox-build@7.0.0)(workbox-window@7.0.0): + resolution: {integrity: sha512-cOyEG8EEc7JHmyMapTnjK2j0g2BIC3ErlmOHyGzVu8hqjyF9Jt6yWMmVNFtpA6v/NNyzP28ARf3vwzIAzR1kaw==} + engines: {node: '>=16.0.0'} + peerDependencies: + vite: ^3.1.0 || ^4.0.0 || ^5.0.0 + workbox-build: ^7.0.0 + workbox-window: ^7.0.0 + dependencies: + debug: 4.3.4(supports-color@8.1.1) + fast-glob: 3.3.2 + pretty-bytes: 6.1.1 + vite: 4.4.12(@types/node@18.17.5) + workbox-build: 7.0.0 + workbox-window: 7.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-pwa@0.17.0(vite@4.5.0)(workbox-build@7.0.0)(workbox-window@7.0.0): resolution: {integrity: sha512-cOyEG8EEc7JHmyMapTnjK2j0g2BIC3ErlmOHyGzVu8hqjyF9Jt6yWMmVNFtpA6v/NNyzP28ARf3vwzIAzR1kaw==} engines: {node: '>=16.0.0'} @@ -16905,7 +17046,6 @@ packages: optional: true dependencies: vue: 3.3.4 - dev: true /vue-demi@0.14.6(vue@3.3.8): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}