@diagrammo/dgmo 0.36.0 → 0.38.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.
Files changed (47) hide show
  1. package/.cursorrules +3 -0
  2. package/.github/copilot-instructions.md +3 -0
  3. package/.windsurfrules +3 -0
  4. package/SKILL.md +3 -0
  5. package/dist/advanced.cjs +1058 -135
  6. package/dist/advanced.d.cts +122 -8
  7. package/dist/advanced.d.ts +122 -8
  8. package/dist/advanced.js +1055 -133
  9. package/dist/auto.cjs +1047 -132
  10. package/dist/auto.js +96 -95
  11. package/dist/auto.mjs +1048 -130
  12. package/dist/cli.cjs +117 -116
  13. package/dist/editor.cjs +4 -1
  14. package/dist/editor.js +4 -1
  15. package/dist/highlight.cjs +3 -0
  16. package/dist/highlight.js +3 -0
  17. package/dist/index.cjs +1043 -131
  18. package/dist/index.js +1044 -129
  19. package/docs/ai-integration.md +3 -0
  20. package/docs/language-reference.md +106 -7
  21. package/gallery/fixtures/map-coastline.dgmo +2 -2
  22. package/gallery/fixtures/map-route.dgmo +5 -5
  23. package/gallery/fixtures/treemap-branch.dgmo +15 -0
  24. package/gallery/fixtures/treemap-heat.dgmo +12 -0
  25. package/gallery/fixtures/treemap-tag-heat.dgmo +21 -0
  26. package/gallery/fixtures/treemap-tags.dgmo +18 -0
  27. package/package.json +1 -1
  28. package/src/advanced.ts +11 -0
  29. package/src/boxes-and-lines/layout-search.ts +19 -1
  30. package/src/chart-type-registry.ts +4 -0
  31. package/src/chart-types.ts +5 -0
  32. package/src/completion.ts +64 -0
  33. package/src/d3.ts +30 -18
  34. package/src/editor/highlight-api.ts +2 -0
  35. package/src/editor/keywords.ts +3 -0
  36. package/src/infra/parser.ts +95 -38
  37. package/src/map/dimensions.ts +19 -2
  38. package/src/map/layout.ts +91 -7
  39. package/src/map/parser.ts +51 -29
  40. package/src/map/renderer.ts +10 -0
  41. package/src/map/types.ts +9 -8
  42. package/src/treemap/layout.ts +189 -0
  43. package/src/treemap/parser.ts +475 -0
  44. package/src/treemap/renderer.ts +698 -0
  45. package/src/treemap/types.ts +57 -0
  46. package/src/utils/parsing.ts +1 -0
  47. package/src/utils/reserved-key-registry.ts +5 -0
package/.cursorrules CHANGED
@@ -88,6 +88,7 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
88
88
  | `quadrant` | 2×2 positioning matrix |
89
89
  | `pyramid` | stacked hierarchy of layers (Maslow, DIKW) |
90
90
  | `ring` | concentric rings of nested categories |
91
+ | `treemap` | nested rectangles sized by value (budgets, disk usage, portfolios) |
91
92
  | `map` | geographic concept map: regions, points, routes |
92
93
  | `wireframe` | low-fidelity UI layout with panels and controls |
93
94
  | `bar` | categorical comparisons |
@@ -112,6 +113,8 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
112
113
 
113
114
  **Need more than the index gives you?** Fetch the per-type section: MCP `get_language_reference(type)` / `get_examples(type)`, or read that type's section below. The `suggest_chart_type` tool returns the chosen type's section automatically.
114
115
 
116
+ **When the type isn't obvious, ask — don't guess.** Call `suggest_chart_type` first. If it returns an `⚠️ ASK THE USER` directive (the request is ambiguous between candidates, or nothing matched), present those candidate options to the user and wait for their pick before generating — never silently choose. A confident result (high/medium) you can proceed with.
117
+
115
118
  ### Common examples (curated, parse-clean)
116
119
 
117
120
  _The most common types, inline so you can generate them without a fetch. For the other 37, get the per-type section (see below)._
@@ -88,6 +88,7 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
88
88
  | `quadrant` | 2×2 positioning matrix |
89
89
  | `pyramid` | stacked hierarchy of layers (Maslow, DIKW) |
90
90
  | `ring` | concentric rings of nested categories |
91
+ | `treemap` | nested rectangles sized by value (budgets, disk usage, portfolios) |
91
92
  | `map` | geographic concept map: regions, points, routes |
92
93
  | `wireframe` | low-fidelity UI layout with panels and controls |
93
94
  | `bar` | categorical comparisons |
@@ -112,6 +113,8 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
112
113
 
113
114
  **Need more than the index gives you?** Fetch the per-type section: MCP `get_language_reference(type)` / `get_examples(type)`, or read that type's section below. The `suggest_chart_type` tool returns the chosen type's section automatically.
114
115
 
116
+ **When the type isn't obvious, ask — don't guess.** Call `suggest_chart_type` first. If it returns an `⚠️ ASK THE USER` directive (the request is ambiguous between candidates, or nothing matched), present those candidate options to the user and wait for their pick before generating — never silently choose. A confident result (high/medium) you can proceed with.
117
+
115
118
  ### Common examples (curated, parse-clean)
116
119
 
117
120
  _The most common types, inline so you can generate them without a fetch. For the other 37, get the per-type section (see below)._
package/.windsurfrules CHANGED
@@ -88,6 +88,7 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
88
88
  | `quadrant` | 2×2 positioning matrix |
89
89
  | `pyramid` | stacked hierarchy of layers (Maslow, DIKW) |
90
90
  | `ring` | concentric rings of nested categories |
91
+ | `treemap` | nested rectangles sized by value (budgets, disk usage, portfolios) |
91
92
  | `map` | geographic concept map: regions, points, routes |
92
93
  | `wireframe` | low-fidelity UI layout with panels and controls |
93
94
  | `bar` | categorical comparisons |
@@ -112,6 +113,8 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
112
113
 
113
114
  **Need more than the index gives you?** Fetch the per-type section: MCP `get_language_reference(type)` / `get_examples(type)`, or read that type's section below. The `suggest_chart_type` tool returns the chosen type's section automatically.
114
115
 
116
+ **When the type isn't obvious, ask — don't guess.** Call `suggest_chart_type` first. If it returns an `⚠️ ASK THE USER` directive (the request is ambiguous between candidates, or nothing matched), present those candidate options to the user and wait for their pick before generating — never silently choose. A confident result (high/medium) you can proceed with.
117
+
115
118
  ### Common examples (curated, parse-clean)
116
119
 
117
120
  _The most common types, inline so you can generate them without a fetch. For the other 37, get the per-type section (see below)._
package/SKILL.md CHANGED
@@ -93,6 +93,7 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
93
93
  | `quadrant` | 2×2 positioning matrix |
94
94
  | `pyramid` | stacked hierarchy of layers (Maslow, DIKW) |
95
95
  | `ring` | concentric rings of nested categories |
96
+ | `treemap` | nested rectangles sized by value (budgets, disk usage, portfolios) |
96
97
  | `map` | geographic concept map: regions, points, routes |
97
98
  | `wireframe` | low-fidelity UI layout with panels and controls |
98
99
  | `bar` | categorical comparisons |
@@ -117,6 +118,8 @@ Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply
117
118
 
118
119
  **Need more than the index gives you?** Fetch the per-type section: MCP `get_language_reference(type)` / `get_examples(type)`, or read that type's section below. The `suggest_chart_type` tool returns the chosen type's section automatically.
119
120
 
121
+ **When the type isn't obvious, ask — don't guess.** Call `suggest_chart_type` first. If it returns an `⚠️ ASK THE USER` directive (the request is ambiguous between candidates, or nothing matched), present those candidate options to the user and wait for their pick before generating — never silently choose. A confident result (high/medium) you can proceed with.
122
+
120
123
  ### Common examples (curated, parse-clean)
121
124
 
122
125
  _The most common types, inline so you can generate them without a fetch. For the other 37, get the per-type section (see below)._