-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Zenuml support #3872
[WIP] Zenuml support #3872
Conversation
bootstrap the mermaid-zenuml package & add a demo page zenuml.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, but I wasn't able to actually get a diagram to render in docs.
You can use the pnpm docs:dev
in mermaid package to test.
Tried fixing the docs support, but wasn't able to push the changes.
Adding it as a patch
From 9e206e0b1081ac08348e8ac243cee89121dfa71c Mon Sep 17 00:00:00 2001
---
cSpell.json | 3 ++-
packages/mermaid/src/docs/.vitepress/theme/mermaid.ts | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cSpell.json b/cSpell.json
index 64187e1c..afb2cfde 100644
--- a/cSpell.json
+++ b/cSpell.json
@@ -87,7 +87,8 @@
"visio",
"vitepress",
"xlink",
- "yash"
+ "yash",
+ "zenuml"
],
"patterns": [
{ "name": "Markdown links", "pattern": "\\((.*)\\)", "description": "" },
diff --git a/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts b/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts
index b287346f..59799fb2 100644
--- a/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts
+++ b/packages/mermaid/src/docs/.vitepress/theme/mermaid.ts
@@ -1,8 +1,9 @@
import mermaid, { type MermaidConfig } from 'mermaid';
-import mindmap from '@mermaid-js/mermaid-mindmap';
+import mindmap from '../../../../../mermaid-mindmap';
+import zenuml from '../../../../../mermaid-zenuml';
try {
- await mermaid.registerExternalDiagrams([mindmap]);
+ await mermaid.registerExternalDiagrams([mindmap, zenuml]);
} catch (e) {
console.error(e);
}
--
2.32.1 (Apple Git-133)
But it seems like there is some error thrown.
TODO:load zenuml core from here
Need to manually run 'pnpm run build' in zenuml/core folder.
Included zenuml/core source code to the mermaid repository.
…global import for vitest.
…int`. It has already been ignored in `package/mermaid-zenuml/zenuml/core/.gitignore`. But the `lint` script does not respect that.
Build zenuml/core in pnpm run build and pnpm run dev.
…not start with https://.
Also fixed lint issues.
Fixed component path in core.ts
This PR is replaced by #3983. The new PR include ZenUML/core source code. The new PR will give a much cleaner commit history. |
📑 Summary
Added support for ZenUML Diagram.
Resolves #3435
📏 Design Decisions
ZenUML support code is in the
mermaid-zenuml
folder. Documents and Test are added to corresponding folders.📋 Tasks
Make sure you
develop
branch