@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.
- package/.cursorrules +3 -0
- package/.github/copilot-instructions.md +3 -0
- package/.windsurfrules +3 -0
- package/SKILL.md +3 -0
- package/dist/advanced.cjs +1058 -135
- package/dist/advanced.d.cts +122 -8
- package/dist/advanced.d.ts +122 -8
- package/dist/advanced.js +1055 -133
- package/dist/auto.cjs +1047 -132
- package/dist/auto.js +96 -95
- package/dist/auto.mjs +1048 -130
- package/dist/cli.cjs +117 -116
- package/dist/editor.cjs +4 -1
- package/dist/editor.js +4 -1
- package/dist/highlight.cjs +3 -0
- package/dist/highlight.js +3 -0
- package/dist/index.cjs +1043 -131
- package/dist/index.js +1044 -129
- package/docs/ai-integration.md +3 -0
- package/docs/language-reference.md +106 -7
- package/gallery/fixtures/map-coastline.dgmo +2 -2
- package/gallery/fixtures/map-route.dgmo +5 -5
- package/gallery/fixtures/treemap-branch.dgmo +15 -0
- package/gallery/fixtures/treemap-heat.dgmo +12 -0
- package/gallery/fixtures/treemap-tag-heat.dgmo +21 -0
- package/gallery/fixtures/treemap-tags.dgmo +18 -0
- package/package.json +1 -1
- package/src/advanced.ts +11 -0
- package/src/boxes-and-lines/layout-search.ts +19 -1
- package/src/chart-type-registry.ts +4 -0
- package/src/chart-types.ts +5 -0
- package/src/completion.ts +64 -0
- package/src/d3.ts +30 -18
- package/src/editor/highlight-api.ts +2 -0
- package/src/editor/keywords.ts +3 -0
- package/src/infra/parser.ts +95 -38
- package/src/map/dimensions.ts +19 -2
- package/src/map/layout.ts +91 -7
- package/src/map/parser.ts +51 -29
- package/src/map/renderer.ts +10 -0
- package/src/map/types.ts +9 -8
- package/src/treemap/layout.ts +189 -0
- package/src/treemap/parser.ts +475 -0
- package/src/treemap/renderer.ts +698 -0
- package/src/treemap/types.ts +57 -0
- package/src/utils/parsing.ts +1 -0
- 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)._
|