From 3251d2f9aa028a2084178c6405e4da9af259e9cf Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Wed, 27 Mar 2024 17:08:33 +0530 Subject: [PATCH] feat: upgrade mermaid to 10.9.0 and support sequence creation and destruction (#46) * feat: upgrade mermaid and support sequence creation and destruction * pgrade to v10.9.0 * update arrow position for class diagrams for diamond and triangle arrow heads and add comments * fix double rendering of elements in namespace class diagrams * fix cardianlities and multiplicites position * remove unnecessary destruct * add class diagram in supported diagrams --- package.json | 2 +- playground/index.html | 8 +- playground/testcases/class.ts | 9 ++ playground/testcases/sequence.ts | 14 +++ src/converter/types/class.ts | 8 +- src/parser/class.ts | 151 ++++++++++++++++++++----------- src/parser/sequence.ts | 34 ++++--- src/utils.ts | 25 ++++- yarn.lock | 105 +++++++++++++++++++-- 9 files changed, 264 insertions(+), 92 deletions(-) diff --git a/package.json b/package.json index ca2390ee..c70ad193 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@excalidraw/markdown-to-text": "0.1.2", - "mermaid": "10.2.3", + "mermaid": "10.9.0", "nanoid": "4.0.2" }, "devDependencies": { diff --git a/playground/index.html b/playground/index.html index 9c382656..77067c85 100644 --- a/playground/index.html +++ b/playground/index.html @@ -13,12 +13,16 @@

Custom Test

Flowchart - and + - Sequence + and + + class diagrams.