From c292c897a17ecdf7890e19812b67b5f863c68e1f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:42:21 +0000 Subject: [PATCH 1/2] chore(deps): update all patch dependencies --- package.json | 2 +- packages/mermaid/src/docs/package.json | 2 +- pnpm-lock.yaml | 52 ++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 47fae3be4..c06f94082 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.2.4", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@8.6.10", + "packageManager": "pnpm@8.6.11", "keywords": [ "diagram", "markdown", diff --git a/packages/mermaid/src/docs/package.json b/packages/mermaid/src/docs/package.json index 246094352..922d8fa32 100644 --- a/packages/mermaid/src/docs/package.json +++ b/packages/mermaid/src/docs/package.json @@ -31,7 +31,7 @@ "unplugin-vue-components": "^0.25.0", "vite": "^4.3.9", "vite-plugin-pwa": "^0.16.0", - "vitepress": "1.0.0-beta.6", + "vitepress": "1.0.0-beta.7", "workbox-window": "^7.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d78136d7c..9aea01362 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -466,8 +466,8 @@ importers: specifier: ^0.16.0 version: 0.16.0(vite@4.3.9)(workbox-build@7.0.0)(workbox-window@7.0.0) vitepress: - specifier: 1.0.0-beta.6 - version: 1.0.0-beta.6(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0) + specifier: 1.0.0-beta.7 + version: 1.0.0-beta.7(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0) workbox-window: specifier: ^7.0.0 version: 7.0.0 @@ -5169,14 +5169,14 @@ packages: vue: 3.3.4 dev: true - /@vitejs/plugin-vue@4.2.3(vite@4.4.6)(vue@3.3.4): + /@vitejs/plugin-vue@4.2.3(vite@4.4.7)(vue@3.3.4): resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.4.6(@types/node@18.16.0) + vite: 4.4.7(@types/node@18.16.0) vue: 3.3.4 dev: true @@ -15379,6 +15379,42 @@ packages: fsevents: 2.3.2 dev: true + /vite@4.4.7(@types/node@18.16.0): + resolution: {integrity: sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 18.16.0 + esbuild: 0.18.11 + postcss: 8.4.27 + rollup: 3.26.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /vitepress-plugin-search@1.0.4-alpha.20(flexsearch@0.7.31)(vitepress@1.0.0-alpha.72)(vue@3.3.4): resolution: {integrity: sha512-zG+ev9pw1Mg7htABlFCNXb8XwnKN+qfTKw+vU0Ers6RIrABx+45EAAFBoaL1mEpl1FRFn1o/dQ7F4b8GP6HdGQ==} engines: {node: ^14.13.1 || ^16.7.0 || >=18} @@ -15425,13 +15461,13 @@ packages: - terser dev: true - /vitepress@1.0.0-beta.6(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0): - resolution: {integrity: sha512-xK/ulKgQpKZVbvlL4+/vW49VG7ySi5nmSoKUNH1G4kM+Cj9JwYM+PDJO7jSJROv8zW99G0ise+maDYnaLlbGBQ==} + /vitepress@1.0.0-beta.7(@algolia/client-search@4.14.2)(@types/node@18.16.0)(search-insights@2.6.0): + resolution: {integrity: sha512-P9Rw+FXatKIU4fVdtKxqwHl6fby8E/8zE3FIfep6meNgN4BxbWqoKJ6yfuuQQR9IrpQqwnyaBh4LSabyll6tWg==} hasBin: true dependencies: '@docsearch/css': 3.5.1 '@docsearch/js': 3.5.1(@algolia/client-search@4.14.2)(search-insights@2.6.0) - '@vitejs/plugin-vue': 4.2.3(vite@4.4.6)(vue@3.3.4) + '@vitejs/plugin-vue': 4.2.3(vite@4.4.7)(vue@3.3.4) '@vue/devtools-api': 6.5.0 '@vueuse/core': 10.2.1(vue@3.3.4) '@vueuse/integrations': 10.2.1(focus-trap@7.5.2)(vue@3.3.4) @@ -15440,7 +15476,7 @@ packages: mark.js: 8.11.1 minisearch: 6.1.0 shiki: 0.14.3 - vite: 4.4.6(@types/node@18.16.0) + vite: 4.4.7(@types/node@18.16.0) vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' From cc01ff9129e62c7b255bcba1744c26347b67a54d Mon Sep 17 00:00:00 2001 From: Brian Graham Date: Tue, 1 Aug 2023 14:08:41 +0200 Subject: [PATCH 2/2] Directives not needed in new diagrams as yaml formatter does this for all new diagrams --- docs/community/newDiagram.md | 49 +------------------ .../mermaid/src/docs/community/newDiagram.md | 49 +------------------ 2 files changed, 2 insertions(+), 96 deletions(-) diff --git a/docs/community/newDiagram.md b/docs/community/newDiagram.md index bb7e2a961..ba52999f4 100644 --- a/docs/community/newDiagram.md +++ b/docs/community/newDiagram.md @@ -124,53 +124,6 @@ There are a few features that are common between the different types of diagrams Here some pointers on how to handle these different areas. -#### [Directives](../config/directives.md) - -Here is example handling from flowcharts: -Jison: - -```jison -/* lexical grammar */ -%lex -%x open_directive -%x type_directive -%x arg_directive -%x close_directive - -\%\%\{ { this.begin('open_directive'); return 'open_directive'; } -((?:(?!\}\%\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; } -":" { this.popState(); this.begin('arg_directive'); return ':'; } -\}\%\% { this.popState(); this.popState(); return 'close_directive'; } -((?:(?!\}\%\%).|\n)*) return 'arg_directive'; - -/* language grammar */ - -/* ... */ - -directive - : openDirective typeDirective closeDirective separator - | openDirective typeDirective ':' argDirective closeDirective separator - ; - -openDirective - : open_directive { yy.parseDirective('%%{', 'open_directive'); } - ; - -typeDirective - : type_directive { yy.parseDirective($1, 'type_directive'); } - ; - -argDirective - : arg_directive { $1 = $1.trim().replace(/'/g, '"'); yy.parseDirective($1, 'arg_directive'); } - ; - -closeDirective - : close_directive { yy.parseDirective('}%%', 'close_directive', 'flowchart'); } - ; -``` - -It is probably a good idea to keep the handling similar to this in your new diagram. The parseDirective function is provided by the mermaidAPI. - ## Accessibility Mermaid automatically adds the following accessibility information for the diagram SVG HTML element: @@ -189,7 +142,7 @@ See [the definition of aria-roledescription](https://www.w3.org/TR/wai-aria-1.1/ The syntax for accessible titles and descriptions is described in [the Accessibility documenation section.](../config/accessibility.md) -In a similar way to the directives, the jison syntax are quite similar between the diagrams. +As a design goal, the jison syntax should be similar between the diagrams. ```jison diff --git a/packages/mermaid/src/docs/community/newDiagram.md b/packages/mermaid/src/docs/community/newDiagram.md index 75e17e4c9..3393396ee 100644 --- a/packages/mermaid/src/docs/community/newDiagram.md +++ b/packages/mermaid/src/docs/community/newDiagram.md @@ -119,53 +119,6 @@ There are a few features that are common between the different types of diagrams Here some pointers on how to handle these different areas. -#### [Directives](../config/directives.md) - -Here is example handling from flowcharts: -Jison: - -```jison -/* lexical grammar */ -%lex -%x open_directive -%x type_directive -%x arg_directive -%x close_directive - -\%\%\{ { this.begin('open_directive'); return 'open_directive'; } -((?:(?!\}\%\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; } -":" { this.popState(); this.begin('arg_directive'); return ':'; } -\}\%\% { this.popState(); this.popState(); return 'close_directive'; } -((?:(?!\}\%\%).|\n)*) return 'arg_directive'; - -/* language grammar */ - -/* ... */ - -directive - : openDirective typeDirective closeDirective separator - | openDirective typeDirective ':' argDirective closeDirective separator - ; - -openDirective - : open_directive { yy.parseDirective('%%{', 'open_directive'); } - ; - -typeDirective - : type_directive { yy.parseDirective($1, 'type_directive'); } - ; - -argDirective - : arg_directive { $1 = $1.trim().replace(/'/g, '"'); yy.parseDirective($1, 'arg_directive'); } - ; - -closeDirective - : close_directive { yy.parseDirective('}%%', 'close_directive', 'flowchart'); } - ; -``` - -It is probably a good idea to keep the handling similar to this in your new diagram. The parseDirective function is provided by the mermaidAPI. - ## Accessibility Mermaid automatically adds the following accessibility information for the diagram SVG HTML element: @@ -184,7 +137,7 @@ See [the definition of aria-roledescription](https://www.w3.org/TR/wai-aria-1.1/ The syntax for accessible titles and descriptions is described in [the Accessibility documenation section.](../config/accessibility.md) -In a similar way to the directives, the jison syntax are quite similar between the diagrams. +As a design goal, the jison syntax should be similar between the diagrams. ```jison