@diagrammo/dgmo 0.8.5 → 0.8.6

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 (64) hide show
  1. package/.claude/commands/dgmo.md +33 -0
  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/dist/cli.cjs +189 -190
  7. package/dist/editor.cjs +3 -18
  8. package/dist/editor.cjs.map +1 -1
  9. package/dist/editor.js +3 -18
  10. package/dist/editor.js.map +1 -1
  11. package/dist/highlight.cjs +4 -21
  12. package/dist/highlight.cjs.map +1 -1
  13. package/dist/highlight.js +4 -21
  14. package/dist/highlight.js.map +1 -1
  15. package/dist/index.cjs +2785 -2996
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +56 -56
  18. package/dist/index.d.ts +56 -56
  19. package/dist/index.js +2780 -2989
  20. package/dist/index.js.map +1 -1
  21. package/docs/ai-integration.md +1 -1
  22. package/docs/language-reference.md +97 -25
  23. package/gallery/fixtures/boxes-and-lines.dgmo +64 -0
  24. package/package.json +1 -1
  25. package/src/boxes-and-lines/collapse.ts +78 -0
  26. package/src/boxes-and-lines/layout.ts +319 -0
  27. package/src/boxes-and-lines/parser.ts +694 -0
  28. package/src/boxes-and-lines/renderer.ts +848 -0
  29. package/src/boxes-and-lines/types.ts +40 -0
  30. package/src/c4/parser.ts +10 -5
  31. package/src/c4/renderer.ts +232 -56
  32. package/src/chart.ts +9 -4
  33. package/src/cli.ts +6 -5
  34. package/src/completion.ts +25 -33
  35. package/src/d3.ts +26 -27
  36. package/src/dgmo-router.ts +3 -7
  37. package/src/echarts.ts +38 -2
  38. package/src/editor/keywords.ts +4 -19
  39. package/src/er/parser.ts +10 -4
  40. package/src/gantt/parser.ts +7 -4
  41. package/src/gantt/renderer.ts +3 -5
  42. package/src/index.ts +17 -26
  43. package/src/infra/parser.ts +7 -5
  44. package/src/infra/renderer.ts +2 -2
  45. package/src/kanban/parser.ts +7 -5
  46. package/src/kanban/renderer.ts +43 -18
  47. package/src/org/parser.ts +7 -4
  48. package/src/org/renderer.ts +40 -29
  49. package/src/sequence/parser.ts +11 -5
  50. package/src/sequence/renderer.ts +114 -45
  51. package/src/sitemap/parser.ts +8 -4
  52. package/src/sitemap/renderer.ts +137 -57
  53. package/src/utils/legend-svg.ts +44 -20
  54. package/src/utils/parsing.ts +1 -1
  55. package/src/utils/tag-groups.ts +21 -1
  56. package/gallery/fixtures/initiative-status-full.dgmo +0 -46
  57. package/gallery/fixtures/initiative-status-phases.dgmo +0 -29
  58. package/gallery/fixtures/initiative-status.dgmo +0 -9
  59. package/src/initiative-status/collapse.ts +0 -76
  60. package/src/initiative-status/filter.ts +0 -63
  61. package/src/initiative-status/layout.ts +0 -650
  62. package/src/initiative-status/parser.ts +0 -629
  63. package/src/initiative-status/renderer.ts +0 -1199
  64. package/src/initiative-status/types.ts +0 -57
@@ -98,6 +98,7 @@ For **examples** of real diagrams, call `mcp__dgmo__get_examples("<type>")` —
98
98
  - "states" / "lifecycle" / "transitions" → `state`
99
99
  - "org" / "team" / "hierarchy" → `org`
100
100
  - "roadmap" / "project status" → `initiative-status` or `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>")`.
@@ -257,6 +258,7 @@ Key options:
257
258
  | `sitemap` | Website / app navigation structure |
258
259
  | `infra` | Infrastructure traffic flow with rps computation |
259
260
  | `gantt` | Project scheduling with dependencies |
261
+ | `boxes-and-lines` | General-purpose node-edge diagrams with groups and tags |
260
262
 
261
263
  ## Key Syntax Patterns
262
264
 
@@ -646,6 +648,37 @@ y-label Revenue ($M)
646
648
  - Groups: `[Category](color)` headers
647
649
  - Options: `labels on`, `xlabel`, `ylabel`, `sizelabel`
648
650
 
651
+ ### boxes-and-lines
652
+
653
+ ```
654
+ boxes-and-lines Architecture
655
+
656
+ tag Team t Backend(blue), Frontend(green), Platform(purple)
657
+ active-tag Team
658
+ direction LR
659
+
660
+ API Gateway | t: Backend
661
+ -routes-> AuthService
662
+ -queries-> DB
663
+
664
+ AuthService | t: Backend
665
+ DB | t: Platform
666
+
667
+ [Cloud]
668
+ API Gateway
669
+ AuthService
670
+
671
+ Redis <-syncs-> DB | t: Platform
672
+ ```
673
+
674
+ - Nodes: explicit `Name | metadata` or implicit from edges
675
+ - Edges: `A -label-> B` (directed), `A <-label-> B` (bidirectional)
676
+ - Indented edges use parent as source: `Parent` then ` -label-> Target`
677
+ - Groups: `[Name]` with indented children (max 2 levels deep)
678
+ - Tags: `tag Name alias Value1(color), Value2(color)` + `active-tag Name` + `hide alias:value`
679
+ - Options: `direction LR` (left-right) or `TB` (top-bottom, default)
680
+ - Shape inference: names containing DB/database → cylinder, Cache/Redis → diamond, Queue → hexagon, etc.
681
+
649
682
  ## Anti-Patterns
650
683
 
651
684
  ```
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 34 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, initiative-status, 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 34 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, initiative-status, 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 34 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, initiative-status, 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 34 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, initiative-status, 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