diff --git a/package.json b/package.json index 78ab513b..872a0c51 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "@braintree/sanitize-url": "6.0.2", "@excalidraw/laser-pointer": "1.2.0", - "@excalidraw/mermaid-to-excalidraw": "0.1.2", + "@excalidraw/mermaid-to-excalidraw": "0.2.0", "@excalidraw/random-username": "1.1.0", "@radix-ui/react-popover": "1.0.3", "@radix-ui/react-tabs": "1.0.2", diff --git a/src/components/TTDDialog/MermaidToExcalidraw.tsx b/src/components/TTDDialog/MermaidToExcalidraw.tsx index df9f4b8b..237cb260 100644 --- a/src/components/TTDDialog/MermaidToExcalidraw.tsx +++ b/src/components/TTDDialog/MermaidToExcalidraw.tsx @@ -88,6 +88,9 @@ const MermaidToExcalidraw = ({ {el} )} + classLink={(el) => ( + {el} + )} /> diff --git a/src/locales/en.json b/src/locales/en.json index 95c6eb2e..2f845bb1 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -518,7 +518,7 @@ "mermaid": { "title": "Mermaid to Excalidraw", "button": "Insert", - "description": "Currently only Flowcharts and Sequence Diagrams are supported. The other types will be rendered as image in Excalidraw.", + "description": "Currently only Flowchart, Sequence, and Class Diagrams are supported. The other types will be rendered as image in Excalidraw.", "syntax": "Mermaid Syntax", "preview": "Preview" } diff --git a/src/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap b/src/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap index c9338966..41388038 100644 --- a/src/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap +++ b/src/tests/__snapshots__/MermaidToExcalidraw.test.tsx.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Test > should open mermaid popup when active tool is mermaid 1`] = ` -"Mermaid to ExcalidrawCurrently only Flowcharts and Sequence Diagrams are supported. The other types will be rendered as image in Excalidraw.Mermaid Syntaxflowchart TD +"Mermaid to ExcalidrawCurrently only Flowchart, Sequence, and Class Diagrams are supported. The other types will be rendered as image in Excalidraw.Mermaid Syntaxflowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} C -->|One| D[Laptop] diff --git a/yarn.lock b/yarn.lock index 7689a073..c61cbe70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1478,10 +1478,10 @@ resolved "https://registry.yarnpkg.com/@excalidraw/markdown-to-text/-/markdown-to-text-0.1.2.tgz#1703705e7da608cf478f17bfe96fb295f55a23eb" integrity sha512-1nDXBNAojfi3oSFwJswKREkFm5wrSjqay81QlyRv2pkITG/XYB5v+oChENVBQLcxQwX4IUATWvXM5BcaNhPiIg== -"@excalidraw/mermaid-to-excalidraw@0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@excalidraw/mermaid-to-excalidraw/-/mermaid-to-excalidraw-0.1.2.tgz#be7b412536fc00b7986ccdccba8e7c33592aa004" - integrity sha512-LFk+cLGhXlvRTaf0f6ClCFIZFRsbZPb1ke2cytr5/JlnOefnXQQHgWITafskjcIO2c34KXFGO0HjgYPNFLUknw== +"@excalidraw/mermaid-to-excalidraw@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@excalidraw/mermaid-to-excalidraw/-/mermaid-to-excalidraw-0.2.0.tgz#1e0395cd2b1ce9f6898109f5dbf545f558f159cc" + integrity sha512-FR+Lw9dt+mQxsrmRL7YNU2wrlNXD16ZLyuNoKrPzPy+Ds3utzY1+/2UNeNu7FMSUO4hKdkrmyO+PDp9OvOhuKw== dependencies: "@excalidraw/markdown-to-text" "0.1.2" mermaid "10.2.3"
Mermaid to Excalidraw