@diagrammo/dgmo 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -14
- package/dist/cli.cjs +150 -150
- package/dist/index.cjs +341 -852
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +340 -852
- package/dist/index.js.map +1 -1
- package/docs/language-reference.md +18 -19
- package/package.json +1 -1
- package/src/chart.ts +8 -39
- package/src/cli.ts +6 -6
- package/src/d3.ts +198 -674
- package/src/dgmo-router.ts +21 -42
- package/src/echarts.ts +80 -220
- package/src/index.ts +1 -0
- package/src/sequence/parser.ts +55 -106
- package/src/sequence/renderer.ts +4 -60
- package/src/utils/arrows.ts +43 -18
- package/src/utils/parsing.ts +43 -0
package/README.md
CHANGED
|
@@ -182,10 +182,10 @@ const colors = getPalette('nord').light;
|
|
|
182
182
|
const content = `
|
|
183
183
|
title: Login Flow
|
|
184
184
|
|
|
185
|
-
User
|
|
186
|
-
AuthService
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
User -login(email, pass)-> AuthService
|
|
186
|
+
AuthService -findByEmail(email)-> UserDB
|
|
187
|
+
AuthService <-user- UserDB
|
|
188
|
+
User <-token- AuthService
|
|
189
189
|
`;
|
|
190
190
|
|
|
191
191
|
const parsed = parseSequenceDgmo(content);
|
|
@@ -196,16 +196,13 @@ renderSequenceDiagram(container, parsed, colors, false, (lineNum) => {
|
|
|
196
196
|
|
|
197
197
|
**Sequence syntax:**
|
|
198
198
|
|
|
199
|
-
- `A -> B
|
|
200
|
-
- `A
|
|
201
|
-
- `A ~> B
|
|
202
|
-
- `A
|
|
203
|
-
- `A
|
|
204
|
-
- `A <-
|
|
205
|
-
- `A
|
|
206
|
-
- `A <~message~> B` — bidirectional async with inline label
|
|
207
|
-
- `A -> B: method(): returnValue` — call with return
|
|
208
|
-
- `B -> A: <- response` — explicit return
|
|
199
|
+
- `A -message-> B` — synchronous call
|
|
200
|
+
- `A -> B` — unlabeled synchronous call
|
|
201
|
+
- `A ~message~> B` — async/fire-and-forget call
|
|
202
|
+
- `A ~> B` — unlabeled async call
|
|
203
|
+
- `A <-message- B` — synchronous return (dashed arrow, from B to A)
|
|
204
|
+
- `A <- B` — unlabeled return
|
|
205
|
+
- `A <~message~ B` — async return
|
|
209
206
|
- `if condition` / `else` / `end` — conditional blocks
|
|
210
207
|
- `loop condition` / `end` — loop blocks
|
|
211
208
|
- `parallel` / `else` / `end` — concurrent branches
|