@diagrammo/dgmo 0.8.5 → 0.8.7

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.
Files changed (65) hide show
  1. package/.claude/commands/dgmo.md +34 -27
  2. package/.cursorrules +20 -2
  3. package/.github/copilot-instructions.md +20 -2
  4. package/.windsurfrules +20 -2
  5. package/AGENTS.md +23 -3
  6. package/README.md +0 -1
  7. package/dist/cli.cjs +189 -190
  8. package/dist/editor.cjs +3 -18
  9. package/dist/editor.cjs.map +1 -1
  10. package/dist/editor.js +3 -18
  11. package/dist/editor.js.map +1 -1
  12. package/dist/highlight.cjs +4 -21
  13. package/dist/highlight.cjs.map +1 -1
  14. package/dist/highlight.js +4 -21
  15. package/dist/highlight.js.map +1 -1
  16. package/dist/index.cjs +2791 -2999
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +56 -56
  19. package/dist/index.d.ts +56 -56
  20. package/dist/index.js +2786 -2992
  21. package/dist/index.js.map +1 -1
  22. package/docs/ai-integration.md +1 -1
  23. package/docs/language-reference.md +112 -121
  24. package/gallery/fixtures/boxes-and-lines.dgmo +64 -0
  25. package/package.json +1 -1
  26. package/src/boxes-and-lines/collapse.ts +78 -0
  27. package/src/boxes-and-lines/layout.ts +319 -0
  28. package/src/boxes-and-lines/parser.ts +697 -0
  29. package/src/boxes-and-lines/renderer.ts +848 -0
  30. package/src/boxes-and-lines/types.ts +40 -0
  31. package/src/c4/parser.ts +10 -5
  32. package/src/c4/renderer.ts +232 -56
  33. package/src/chart.ts +9 -4
  34. package/src/cli.ts +6 -5
  35. package/src/completion.ts +25 -33
  36. package/src/d3.ts +26 -27
  37. package/src/dgmo-router.ts +3 -7
  38. package/src/echarts.ts +38 -2
  39. package/src/editor/keywords.ts +4 -19
  40. package/src/er/parser.ts +10 -4
  41. package/src/gantt/parser.ts +10 -4
  42. package/src/gantt/renderer.ts +3 -5
  43. package/src/index.ts +17 -26
  44. package/src/infra/parser.ts +10 -5
  45. package/src/infra/renderer.ts +2 -2
  46. package/src/kanban/parser.ts +10 -5
  47. package/src/kanban/renderer.ts +43 -18
  48. package/src/org/parser.ts +7 -4
  49. package/src/org/renderer.ts +40 -29
  50. package/src/sequence/parser.ts +11 -5
  51. package/src/sequence/renderer.ts +114 -45
  52. package/src/sitemap/parser.ts +8 -4
  53. package/src/sitemap/renderer.ts +137 -57
  54. package/src/utils/legend-svg.ts +44 -20
  55. package/src/utils/parsing.ts +1 -1
  56. package/src/utils/tag-groups.ts +59 -15
  57. package/gallery/fixtures/initiative-status-full.dgmo +0 -46
  58. package/gallery/fixtures/initiative-status-phases.dgmo +0 -29
  59. package/gallery/fixtures/initiative-status.dgmo +0 -9
  60. package/src/initiative-status/collapse.ts +0 -76
  61. package/src/initiative-status/filter.ts +0 -63
  62. package/src/initiative-status/layout.ts +0 -650
  63. package/src/initiative-status/parser.ts +0 -629
  64. package/src/initiative-status/renderer.ts +0 -1199
  65. package/src/initiative-status/types.ts +0 -57
@@ -97,7 +97,8 @@ For **examples** of real diagrams, call `mcp__dgmo__get_examples("<type>")` —
97
97
  - "process" / "decision" / "flow" → `flowchart`
98
98
  - "states" / "lifecycle" / "transitions" → `state`
99
99
  - "org" / "team" / "hierarchy" → `org`
100
- - "roadmap" / "project status" → `initiative-status` or `gantt`
100
+ - "roadmap" / "project status" → `gantt`
101
+ - "boxes" / "nodes and edges" / "general diagram" → `boxes-and-lines`
101
102
  - "compare" / "metrics" / "data" → `bar`, `line`, `pie`, etc.
102
103
  - If genuinely ambiguous, suggest your best guess with a one-line rationale.
103
104
  2. **Get syntax + examples** — call `mcp__dgmo__get_language_reference("<type>")` and `mcp__dgmo__get_examples("<type>")`.
@@ -253,10 +254,10 @@ Key options:
253
254
  | `org` | Hierarchical tree structures |
254
255
  | `kanban` | Task / workflow columns |
255
256
  | `c4` | System architecture (context → container → component → deployment) |
256
- | `initiative-status` | Project roadmap with dependency tracking |
257
257
  | `sitemap` | Website / app navigation structure |
258
258
  | `infra` | Infrastructure traffic flow with rps computation |
259
259
  | `gantt` | Project scheduling with dependencies |
260
+ | `boxes-and-lines` | General-purpose node-edge diagrams with groups and tags |
260
261
 
261
262
  ## Key Syntax Patterns
262
263
 
@@ -511,31 +512,6 @@ Canvas
511
512
  - Relationships: `A *-- B` (composition), `A o-- B` (aggregation), `A --|> B` (inheritance), `A ..|> B` (implementation), `A ..> B` (dependency), `A -> B` (association)
512
513
  - Optional label: `A *-- B : description`
513
514
 
514
- ### initiative-status
515
-
516
- ```
517
- initiative-status Q2 Roadmap
518
-
519
- [Identity]
520
- Auth Service | done
521
- SSO Integration | doing
522
- -> Auth Service | done
523
- MFA Rollout | blocked
524
- -> SSO Integration | doing
525
-
526
- [Payments]
527
- Payment Gateway | doing
528
- Billing UI | todo
529
- -> Payment Gateway | doing
530
-
531
- Auth Service -> Payment Gateway: validates | done
532
- ```
533
-
534
- - Status values: `done`, `doing`, `todo`, `blocked`, `na`
535
- - Dependencies: `-> Target | status` (indented) or `Source -> Target: label | status`
536
- - Groups: `[Group Name]` with indented items
537
- - Tags supported for phase/team coloring
538
-
539
515
  ### venn
540
516
 
541
517
  ```
@@ -646,6 +622,37 @@ y-label Revenue ($M)
646
622
  - Groups: `[Category](color)` headers
647
623
  - Options: `labels on`, `xlabel`, `ylabel`, `sizelabel`
648
624
 
625
+ ### boxes-and-lines
626
+
627
+ ```
628
+ boxes-and-lines Architecture
629
+
630
+ tag Team t Backend(blue), Frontend(green), Platform(purple)
631
+ active-tag Team
632
+ direction LR
633
+
634
+ API Gateway | t: Backend
635
+ -routes-> AuthService
636
+ -queries-> DB
637
+
638
+ AuthService | t: Backend
639
+ DB | t: Platform
640
+
641
+ [Cloud]
642
+ API Gateway
643
+ AuthService
644
+
645
+ Redis <-syncs-> DB | t: Platform
646
+ ```
647
+
648
+ - Nodes: explicit `Name | metadata` or implicit from edges
649
+ - Edges: `A -label-> B` (directed), `A <-label-> B` (bidirectional)
650
+ - Indented edges use parent as source: `Parent` then ` -label-> Target`
651
+ - Groups: `[Name]` with indented children (max 2 levels deep)
652
+ - Tags: `tag Name alias Value1(color), Value2(color)` + `active-tag Name` + `hide alias:value`
653
+ - Options: `direction LR` (left-right) or `TB` (top-bottom, default)
654
+ - Shape inference: names containing DB/database → cylinder, Cache/Redis → diamond, Queue → hexagon, etc.
655
+
649
656
  ## Anti-Patterns
650
657
 
651
658
  ```
package/.cursorrules CHANGED
@@ -103,9 +103,27 @@ API
103
103
 
104
104
  Properties: `cache-hit`, `firewall-block`, `ratelimit-rps`, `max-rps`, `instances` (N or N-M), `latency-ms`, `cb-error-threshold`. Groups: `[Name]` with children. Roles are inferred from behavior.
105
105
 
106
- ## All 32 chart types
106
+ ### Boxes and lines
107
+ ```
108
+ boxes-and-lines Architecture
109
+ tag Team t Backend(blue), Frontend(green)
110
+ active-tag Team
111
+ direction LR
112
+
113
+ API Gateway | t: Backend
114
+ -routes-> AuthService
115
+ -queries-> DB
116
+
117
+ [Cloud]
118
+ API Gateway
119
+ AuthService
120
+ ```
121
+
122
+ Nodes: implicit from edges or explicit with `| metadata`. Edges: `A -label-> B`, `A <-label-> B` (bidi). Groups: `[Name]` with indented children (max 2 levels). Tags: `tag Name alias values`, `active-tag`, `hide`. Options: `direction LR|TB`.
123
+
124
+ ## All 33 chart types
107
125
 
108
- bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, initiative-status, sitemap, infra, gantt
126
+ bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, sitemap, infra, gantt, boxes-and-lines
109
127
 
110
128
  ## Common patterns
111
129
 
@@ -107,9 +107,27 @@ API
107
107
 
108
108
  Properties: `cache-hit`, `firewall-block`, `ratelimit-rps`, `max-rps`, `instances` (N or N-M), `latency-ms`, `cb-error-threshold`. Groups: `[Name]` with children. Roles are inferred from behavior.
109
109
 
110
- ## All 32 chart types
110
+ ### Boxes and lines
111
+ ```
112
+ boxes-and-lines Architecture
113
+ tag Team t Backend(blue), Frontend(green)
114
+ active-tag Team
115
+ direction LR
116
+
117
+ API Gateway | t: Backend
118
+ -routes-> AuthService
119
+ -queries-> DB
120
+
121
+ [Cloud]
122
+ API Gateway
123
+ AuthService
124
+ ```
125
+
126
+ Nodes: implicit from edges or explicit with `| metadata`. Edges: `A -label-> B`, `A <-label-> B` (bidi). Groups: `[Name]` with indented children (max 2 levels). Tags: `tag Name alias values`, `active-tag`, `hide`. Options: `direction LR|TB`.
127
+
128
+ ## All 33 chart types
111
129
 
112
- bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, initiative-status, sitemap, infra, gantt
130
+ bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, sitemap, infra, gantt, boxes-and-lines
113
131
 
114
132
  ## Common patterns
115
133
 
package/.windsurfrules CHANGED
@@ -103,9 +103,27 @@ API
103
103
 
104
104
  Properties: `cache-hit`, `firewall-block`, `ratelimit-rps`, `max-rps`, `instances` (N or N-M), `latency-ms`, `cb-error-threshold`. Groups: `[Name]` with children. Roles are inferred from behavior.
105
105
 
106
- ## All 32 chart types
106
+ ### Boxes and lines
107
+ ```
108
+ boxes-and-lines Architecture
109
+ tag Team t Backend(blue), Frontend(green)
110
+ active-tag Team
111
+ direction LR
112
+
113
+ API Gateway | t: Backend
114
+ -routes-> AuthService
115
+ -queries-> DB
116
+
117
+ [Cloud]
118
+ API Gateway
119
+ AuthService
120
+ ```
121
+
122
+ Nodes: implicit from edges or explicit with `| metadata`. Edges: `A -label-> B`, `A <-label-> B` (bidi). Groups: `[Name]` with indented children (max 2 levels). Tags: `tag Name alias values`, `active-tag`, `hide`. Options: `direction LR|TB`.
123
+
124
+ ## All 33 chart types
107
125
 
108
- bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, initiative-status, sitemap, infra, gantt
126
+ bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, sitemap, infra, gantt, boxes-and-lines
109
127
 
110
128
  ## Common patterns
111
129
 
package/AGENTS.md CHANGED
@@ -19,7 +19,7 @@ When the `dgmo` MCP server is configured, use these tools directly:
19
19
  - `render_diagram` — renders to PNG or SVG, returns file path
20
20
  - `share_diagram` — creates a shareable diagrammo.app URL
21
21
  - `open_in_app` — opens diagram in Diagrammo desktop app (macOS)
22
- - `list_chart_types` — lists all 32 supported chart types with descriptions
22
+ - `list_chart_types` — lists all 34 supported chart types with descriptions
23
23
  - `get_language_reference` — fetches full syntax for any chart type (call this before generating an unfamiliar chart type)
24
24
  - `generate_report` — renders multiple diagrams into an HTML report with table of contents
25
25
 
@@ -113,9 +113,29 @@ API
113
113
  latency-ms: 45
114
114
  ```
115
115
 
116
- ## All 32 chart types
116
+ ## All 33 chart types
117
117
 
118
- bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, initiative-status, sitemap, infra
118
+ bar, line, multi-line, area, pie, doughnut, radar, polar-area, bar-stacked, scatter, sankey, chord, function, heatmap, funnel, slope, wordcloud, arc, timeline, venn, quadrant, sequence, flowchart, state, class, er, org, kanban, c4, sitemap, infra, gantt, boxes-and-lines
119
+
120
+ ### Boxes and lines
121
+ ```
122
+ boxes-and-lines Architecture
123
+
124
+ tag Team t Backend(blue), Frontend(green)
125
+ active-tag Team
126
+ direction LR
127
+
128
+ API Gateway | t: Backend
129
+ -routes-> AuthService
130
+ -queries-> DB
131
+
132
+ AuthService | t: Backend
133
+ DB | t: Backend
134
+
135
+ [Cloud]
136
+ API Gateway
137
+ AuthService
138
+ ```
119
139
 
120
140
  ## Common patterns
121
141
 
package/README.md CHANGED
@@ -108,7 +108,6 @@ dgmo diagram.dgmo --theme dark --palette catppuccin
108
108
  | `state` | State machine diagrams |
109
109
  | `infra` | Infrastructure capacity and latency diagrams |
110
110
  | `kanban` | Kanban boards |
111
- | `initiative-status` | Initiative status and dependency graphs |
112
111
  | `sitemap` | Site structure and navigation maps |
113
112
 
114
113
  ### Other