From 533830172c9b273c77488d63253c60dd1dac8b27 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 7 Mar 2023 09:38:51 +0530 Subject: [PATCH 01/30] Add UMD back --- .vite/build.ts | 6 ++++++ packages/mermaid/package.json | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.vite/build.ts b/.vite/build.ts index 268db3270..e3c947173 100644 --- a/.vite/build.ts +++ b/.vite/build.ts @@ -62,6 +62,12 @@ export const getBuildConfig = ({ minify, core, watch, entryName }: BuildOptions) sourcemap: true, entryFileNames: `${name}.esm${minify ? '.min' : ''}.mjs`, }, + { + name, + format: 'umd', + sourcemap: true, + entryFileNames: `${name}${minify ? '.min' : ''}.js`, + }, ]; if (core) { diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index e40912c29..190d9e783 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,14 +1,16 @@ { "name": "mermaid", - "version": "10.0.2", + "version": "10.0.3-alpha.1", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", + "main": "./dist/mermaid.min.js", "module": "./dist/mermaid.core.mjs", "types": "./dist/mermaid.d.ts", "exports": { ".": { "types": "./dist/mermaid.d.ts", "import": "./dist/mermaid.core.mjs", + "require": "./dist/mermaid.js", "default": "./dist/mermaid.core.mjs" }, "./*": "./*" @@ -106,8 +108,11 @@ "vitepress-plugin-search": "^1.0.4-alpha.19" }, "files": [ - "dist", + "dist/", "README.md" ], - "sideEffects": false + "sideEffects": false, + "publishConfig": { + "access": "public" + } } From 24c9506935d353eaea8f234c9f8ab910b284bbfe Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 5 Apr 2023 22:07:46 +0530 Subject: [PATCH 02/30] fix version --- packages/mermaid/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index fc789e292..5f7978844 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,6 +1,6 @@ { "name": "mermaid", - "version": "10.0.3-alpha.1", + "version": "10.1.0", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", "main": "./dist/mermaid.min.js", From 19363965adae87e8eb37eb835fa38a8453f1f1c7 Mon Sep 17 00:00:00 2001 From: Will-Low <26700668+Will-Low@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:08:48 -0700 Subject: [PATCH 03/30] Updating documentation on notes for classes I was confused by the documentation on notes for a specific class. Updated the wording slightly and added an example for clarity. --- .../mermaid/src/docs/syntax/classDiagram.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs/syntax/classDiagram.md b/packages/mermaid/src/docs/syntax/classDiagram.md index 9d3766590..f824b0bfc 100644 --- a/packages/mermaid/src/docs/syntax/classDiagram.md +++ b/packages/mermaid/src/docs/syntax/classDiagram.md @@ -403,10 +403,26 @@ click className href "url" "tooltip" ## Notes -It is possible to add notes on diagram using `note "line1\nline2"` or note for class using `note for class "line1\nline2"` +It is possible to add notes on the diagram using `note "line1\nline2"`. A note can be added for a specific class using `note for "line1\nline2"`. ### Examples +```mmd +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + +```mermaid +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + _URL Link:_ ```mmd From e3ca0031273443d12d1ac2008978bacd84d4932b Mon Sep 17 00:00:00 2001 From: Will-Low <26700668+Will-Low@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:59:11 -0700 Subject: [PATCH 04/30] Rebuilding docs --- docs/syntax/classDiagram.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/syntax/classDiagram.md b/docs/syntax/classDiagram.md index 69144ef39..9c8f8aadb 100644 --- a/docs/syntax/classDiagram.md +++ b/docs/syntax/classDiagram.md @@ -604,10 +604,42 @@ You would define these actions on a separate line after all classes have been de ## Notes -It is possible to add notes on diagram using `note "line1\nline2"` or note for class using `note for class "line1\nline2"` +It is possible to add notes on the diagram using `note "line1\nline2"`. A note can be added for a specific class using `note for "line1\nline2"`. ### Examples +```mermaid-example +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + +```mermaid +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + +```mermaid-example +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + +```mermaid +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + _URL Link:_ ```mermaid-example From 28155b0e0a30aef8898985e2967f982a7fa99e42 Mon Sep 17 00:00:00 2001 From: Will-Low <26700668+Will-Low@users.noreply.github.com> Date: Mon, 17 Apr 2023 07:29:17 -0700 Subject: [PATCH 05/30] Removing redundant code block --- docs/syntax/classDiagram.md | 16 ---------------- packages/mermaid/src/docs/syntax/classDiagram.md | 8 -------- 2 files changed, 24 deletions(-) diff --git a/docs/syntax/classDiagram.md b/docs/syntax/classDiagram.md index 9c8f8aadb..15ae26444 100644 --- a/docs/syntax/classDiagram.md +++ b/docs/syntax/classDiagram.md @@ -624,22 +624,6 @@ classDiagram } ``` -```mermaid-example -classDiagram - note "This is a general note" - note for MyClass "This is a note for a class" - class MyClass{ - } -``` - -```mermaid -classDiagram - note "This is a general note" - note for MyClass "This is a note for a class" - class MyClass{ - } -``` - _URL Link:_ ```mermaid-example diff --git a/packages/mermaid/src/docs/syntax/classDiagram.md b/packages/mermaid/src/docs/syntax/classDiagram.md index f824b0bfc..d019774b2 100644 --- a/packages/mermaid/src/docs/syntax/classDiagram.md +++ b/packages/mermaid/src/docs/syntax/classDiagram.md @@ -407,14 +407,6 @@ It is possible to add notes on the diagram using `note "line1\nline2"`. A note c ### Examples -```mmd -classDiagram - note "This is a general note" - note for MyClass "This is a note for a class" - class MyClass{ - } -``` - ```mermaid classDiagram note "This is a general note" From 6ccdc2bd01d1459e47eba4b560116c2e048f0ac2 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Mon, 17 Apr 2023 19:33:51 +0200 Subject: [PATCH 06/30] Fix for async handling flowchart-elk --- cypress/platform/knsv2.html | 4 ++-- .../mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index e8e9b55a6..1b1ccd685 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -393,9 +393,9 @@ mindmap