@diagrammo/dgmo 0.8.22 → 0.8.25

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 (90) hide show
  1. package/.claude/commands/dgmo.md +60 -72
  2. package/dist/cli.cjs +123 -116
  3. package/dist/editor.cjs +3 -2
  4. package/dist/editor.cjs.map +1 -1
  5. package/dist/editor.js +3 -2
  6. package/dist/editor.js.map +1 -1
  7. package/dist/highlight.cjs +3 -2
  8. package/dist/highlight.cjs.map +1 -1
  9. package/dist/highlight.js +3 -2
  10. package/dist/highlight.js.map +1 -1
  11. package/dist/index.cjs +1649 -442
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +196 -23
  14. package/dist/index.d.ts +196 -23
  15. package/dist/index.js +1631 -440
  16. package/dist/index.js.map +1 -1
  17. package/dist/internal.cjs +677 -0
  18. package/dist/internal.cjs.map +1 -0
  19. package/dist/internal.d.cts +267 -0
  20. package/dist/internal.d.ts +267 -0
  21. package/dist/internal.js +633 -0
  22. package/dist/internal.js.map +1 -0
  23. package/docs/guide/chart-area.md +17 -17
  24. package/docs/guide/chart-bar-stacked.md +12 -12
  25. package/docs/guide/chart-cycle.md +156 -0
  26. package/docs/guide/chart-doughnut.md +10 -10
  27. package/docs/guide/chart-funnel.md +9 -9
  28. package/docs/guide/chart-heatmap.md +10 -10
  29. package/docs/guide/chart-journey-map.md +179 -0
  30. package/docs/guide/chart-kanban.md +2 -0
  31. package/docs/guide/chart-line.md +19 -19
  32. package/docs/guide/chart-multi-line.md +16 -16
  33. package/docs/guide/chart-pie.md +11 -11
  34. package/docs/guide/chart-polar-area.md +10 -10
  35. package/docs/guide/chart-pyramid.md +111 -0
  36. package/docs/guide/chart-radar.md +9 -9
  37. package/docs/guide/chart-scatter.md +24 -27
  38. package/docs/guide/index.md +3 -3
  39. package/docs/guide/registry.json +5 -0
  40. package/docs/language-reference.md +108 -26
  41. package/fonts/Inter-Bold.ttf +0 -0
  42. package/fonts/Inter-Regular.ttf +0 -0
  43. package/fonts/LICENSE-Inter.txt +92 -0
  44. package/gallery/fixtures/bar-stacked.dgmo +12 -6
  45. package/gallery/fixtures/heatmap.dgmo +12 -6
  46. package/gallery/fixtures/multi-line.dgmo +11 -7
  47. package/gallery/fixtures/pyramid/dikw.dgmo +17 -0
  48. package/gallery/fixtures/pyramid/inverted-funnel.dgmo +16 -0
  49. package/gallery/fixtures/pyramid/minimal.dgmo +5 -0
  50. package/gallery/fixtures/quadrant.dgmo +8 -8
  51. package/gallery/fixtures/scatter.dgmo +12 -12
  52. package/package.json +14 -2
  53. package/src/boxes-and-lines/parser.ts +13 -2
  54. package/src/boxes-and-lines/renderer.ts +22 -13
  55. package/src/chart-type-scoring.ts +162 -0
  56. package/src/chart-types.ts +437 -0
  57. package/src/cli.ts +152 -101
  58. package/src/completion.ts +9 -48
  59. package/src/cycle/layout.ts +19 -28
  60. package/src/cycle/renderer.ts +59 -32
  61. package/src/cycle/types.ts +21 -0
  62. package/src/d3.ts +30 -3
  63. package/src/dgmo-router.ts +98 -73
  64. package/src/echarts.ts +1 -1
  65. package/src/editor/keywords.ts +3 -2
  66. package/src/fonts.ts +3 -2
  67. package/src/gantt/parser.ts +5 -1
  68. package/src/index.ts +37 -3
  69. package/src/infra/parser.ts +3 -3
  70. package/src/internal.ts +20 -0
  71. package/src/journey-map/layout.ts +7 -3
  72. package/src/journey-map/parser.ts +5 -1
  73. package/src/journey-map/renderer.ts +112 -47
  74. package/src/kanban/parser.ts +5 -1
  75. package/src/org/collapse.ts +82 -4
  76. package/src/org/parser.ts +1 -1
  77. package/src/org/renderer.ts +221 -4
  78. package/src/pyramid/parser.ts +172 -0
  79. package/src/pyramid/renderer.ts +684 -0
  80. package/src/pyramid/types.ts +28 -0
  81. package/src/render.ts +2 -8
  82. package/src/sequence/parser.ts +64 -22
  83. package/src/sequence/participant-inference.ts +0 -1
  84. package/src/sequence/renderer.ts +97 -265
  85. package/src/sharing.ts +0 -1
  86. package/src/sitemap/parser.ts +1 -1
  87. package/src/tech-radar/interactive.ts +54 -0
  88. package/src/utils/parsing.ts +1 -0
  89. package/src/utils/tag-groups.ts +35 -5
  90. package/src/wireframe/parser.ts +3 -1
@@ -3,12 +3,12 @@
3
3
  ```dgmo
4
4
  pie Crew Roles Distribution
5
5
 
6
- Sailors: 45
7
- Gunners: 20
8
- Marines: 15
9
- Officers: 8
10
- Specialists: 7
11
- Cooks & Surgeons: 5
6
+ Sailors 45
7
+ Gunners 20
8
+ Marines 15
9
+ Officers 8
10
+ Specialists 7
11
+ Cooks & Surgeons 5
12
12
  ```
13
13
 
14
14
  ## Syntax
@@ -16,7 +16,7 @@ Cooks & Surgeons: 5
16
16
  ```
17
17
  pie Chart Title
18
18
 
19
- Label: value
19
+ Label value
20
20
  ```
21
21
 
22
22
  ## Metadata Keys
@@ -28,12 +28,12 @@ Label: value
28
28
 
29
29
  ## Data Format
30
30
 
31
- Each data line follows the pattern `Label: value`:
31
+ Each data line follows the pattern `Label value`:
32
32
 
33
33
  ```
34
- Sailors: 45
35
- Gunners: 20
36
- Officers: 8
34
+ Sailors 45
35
+ Gunners 20
36
+ Officers 8
37
37
  ```
38
38
 
39
39
  Slices are automatically colored using the Nord palette.
@@ -3,11 +3,11 @@
3
3
  ```dgmo
4
4
  polar-area Captain's Skills
5
5
 
6
- Navigation: 90
7
- Swordsmanship: 75
8
- Leadership: 85
9
- Cunning: 95
10
- Seamanship: 80
6
+ Navigation 90
7
+ Swordsmanship 75
8
+ Leadership 85
9
+ Cunning 95
10
+ Seamanship 80
11
11
  ```
12
12
 
13
13
  ## Syntax
@@ -15,7 +15,7 @@ Seamanship: 80
15
15
  ```
16
16
  polar-area Chart Title
17
17
 
18
- Label: value
18
+ Label value
19
19
  ```
20
20
 
21
21
  ## Metadata Keys
@@ -27,12 +27,12 @@ Label: value
27
27
 
28
28
  ## Data Format
29
29
 
30
- Each data line follows the pattern `Label: value`:
30
+ Each data line follows the pattern `Label value`:
31
31
 
32
32
  ```
33
- Navigation: 90
34
- Swordsmanship: 75
35
- Leadership: 85
33
+ Navigation 90
34
+ Swordsmanship 75
35
+ Leadership 85
36
36
  ```
37
37
 
38
38
  Segments are automatically colored using the Nord palette.
@@ -0,0 +1,111 @@
1
+ # Pyramid Diagram
2
+
3
+ ```dgmo
4
+ pyramid Maslow's Hierarchy of Needs
5
+
6
+ Self-Actualization | color: purple
7
+ Morality, creativity, acceptance of facts.
8
+
9
+ Esteem | color: blue
10
+ Respect, recognition, confidence.
11
+
12
+ Love & Belonging | color: green
13
+ Friendship, intimacy, family.
14
+
15
+ Safety | color: yellow
16
+ Security, employment, health.
17
+
18
+ Physiological | color: orange
19
+ Food, water, warmth, rest.
20
+ ```
21
+
22
+ ## Overview
23
+
24
+ Pyramid diagrams show a hierarchy of stacked layers. Each layer gets a colored band with a label and an optional description. Source order reads apex-first — the first layer in the file is the narrowest (visual top), the last is the widest (visual bottom). Use `inverted` to flip into a funnel orientation.
25
+
26
+ ## Syntax
27
+
28
+ ```
29
+ pyramid Title
30
+
31
+ LayerLabel
32
+ LayerLabel | color: blue
33
+ LayerLabel | color: green
34
+ Indented description
35
+ ```
36
+
37
+ The first line declares the chart type and an optional title. Each non-indented, non-directive line declares one layer. At least two layers are required.
38
+
39
+ ## Layers
40
+
41
+ ```
42
+ pyramid Roles
43
+
44
+ Executives | color: purple
45
+ Managers | color: blue
46
+ Individual Contributors | color: green
47
+ ```
48
+
49
+ ### Layer Pipe Metadata
50
+
51
+ | Key | Type | Default | Description |
52
+ |-----|------|---------|-------------|
53
+ | `color` | palette name | auto-assigned | Layer color |
54
+ | `description` | string | — | One-liner shown beside the layer |
55
+
56
+ ### Descriptions
57
+
58
+ Indented lines under a layer add description text. Markdown inline formatting is supported (`**bold**`, `*italic*`, `` `code` ``, `[links](url)`). Bullet points with `- item` render as `• item`.
59
+
60
+ ```
61
+ Wisdom | color: purple
62
+ Ethical judgment, acting with insight.
63
+ - Knowing *why* something matters
64
+ - Acting with long-term perspective
65
+ ```
66
+
67
+ If both `| description: text` and indented lines exist, they concatenate (pipe first, then indented).
68
+
69
+ ## Directives
70
+
71
+ | Directive | Effect |
72
+ |-----------|--------|
73
+ | `inverted` | Flip apex to the bottom (funnel orientation). Source order is preserved — the first layer is always the visual top. |
74
+
75
+ ```
76
+ pyramid Acquisition Funnel
77
+
78
+ inverted
79
+
80
+ Visitors | color: blue
81
+ Signups | color: cyan
82
+ Activated | color: green
83
+ Paid | color: orange
84
+ ```
85
+
86
+ ## Overflow Handling
87
+
88
+ When descriptions don't fit a layer's band, the renderer automatically:
89
+
90
+ - **Wraps** text at the column edge so nothing leaves the canvas
91
+ - **Truncates** with "…" when content exceeds the available lines
92
+ - **Alternates** descriptions left ↔ right when a single column can't hold them
93
+ - **Reveals** the full description when a layer is highlighted (in-app), hiding siblings so it has room
94
+
95
+ ## Complete Example
96
+
97
+ ```dgmo
98
+ pyramid The DIKW Pyramid
99
+
100
+ Wisdom | color: purple
101
+ Ethical judgment, acting with insight — knowing *why*.
102
+
103
+ Knowledge | color: blue
104
+ Synthesized information — knowing *how*.
105
+
106
+ Information | color: green
107
+ Processed data with context — knowing *what*.
108
+
109
+ Data | color: yellow
110
+ Raw facts and measurements — unprocessed signals.
111
+ ```
@@ -3,11 +3,11 @@
3
3
  ```dgmo
4
4
  radar Ship Combat Rating
5
5
 
6
- Firepower: 85
7
- Speed: 70
8
- Armor: 60
9
- Maneuverability: 90
10
- Crew Morale: 75
6
+ Firepower 85
7
+ Speed 70
8
+ Armor 60
9
+ Maneuverability 90
10
+ Crew Morale 75
11
11
  ```
12
12
 
13
13
  ## Syntax
@@ -15,7 +15,7 @@ Crew Morale: 75
15
15
  ```
16
16
  radar Chart Title
17
17
 
18
- Label: value
18
+ Label value
19
19
  ```
20
20
 
21
21
  ## Metadata Keys
@@ -30,9 +30,9 @@ Label: value
30
30
  Each data line defines one axis of the radar with its value:
31
31
 
32
32
  ```
33
- Firepower: 85
34
- Speed: 70
35
- Armor: 60
33
+ Firepower 85
34
+ Speed 70
35
+ Armor 60
36
36
  ```
37
37
 
38
38
  Values are plotted on axes radiating from the center, connected by a filled polygon.
@@ -5,17 +5,16 @@ scatter Cannon Range vs Powder Charge
5
5
  x-label Powder (lbs)
6
6
  y-label Range (yards)
7
7
 
8
- // label: x, y
9
- Long Tom: 12, 1800
10
- Demi-Culverin: 8, 1200
11
- Carronade: 4, 400
12
- Swivel Gun: 2, 250
13
- Nine-Pounder: 6, 900
14
- Eighteen-Pounder: 10, 1500
15
- Basilisk: 14, 2000
16
- Falconet: 3, 350
17
- Minion: 5, 700
18
- Saker: 7, 1050
8
+ Long Tom 12 1800
9
+ Demi-Culverin 8 1200
10
+ Carronade 4 400
11
+ Swivel Gun 2 250
12
+ Nine-Pounder 6 900
13
+ Eighteen-Pounder 10 1500
14
+ Basilisk 14 2000
15
+ Falconet 3 350
16
+ Minion 5 700
17
+ Saker 7 1050
19
18
  ```
20
19
 
21
20
  ## Syntax
@@ -27,12 +26,10 @@ y-label Y Axis Label
27
26
  no-labels
28
27
  size-label Size Legend Label
29
28
 
30
- // label: x, y
31
- Point Name: x, y
29
+ Point Name x y
32
30
 
33
31
  // or with size (bubble chart)
34
- // label: x, y, size
35
- Point Name: x, y, size
32
+ Point Name x y size
36
33
  ```
37
34
 
38
35
  ## Metadata Keys
@@ -52,12 +49,12 @@ Each data line provides X and Y values, with an optional third value for bubble
52
49
 
53
50
  ```
54
51
  // 2D scatter
55
- Point A: 12, 1800
56
- Point B: 8, 1200
52
+ Point A 12 1800
53
+ Point B 8 1200
57
54
 
58
55
  // 3D bubble
59
- Point A: 85, 90, 80
60
- Point B: 45, 55, 35
56
+ Point A 85 90 80
57
+ Point B 45 55 35
61
58
  ```
62
59
 
63
60
  ## Category Groups
@@ -66,11 +63,11 @@ Use `[Category Name](color)` headers to group points into colored categories:
66
63
 
67
64
  ```
68
65
  [English Pirates](red)
69
- Blackbeard: 85, 90, 80
70
- Calico Jack: 45, 55, 35
66
+ Blackbeard 85 90 80
67
+ Calico Jack 45 55 35
71
68
 
72
69
  [French Buccaneers](blue)
73
- L'Olonnais: 70, 80, 60
70
+ L'Olonnais 70 80 60
74
71
  ```
75
72
 
76
73
  ## Variants
@@ -84,11 +81,11 @@ scatter Pirate Fleets of the Caribbean
84
81
  size-label Crew
85
82
 
86
83
  [English Pirates](red)
87
- Blackbeard: 85, 90, 80
88
- Calico Jack: 45, 55, 35
89
- Anne Bonny: 50, 70, 30
84
+ Blackbeard 85 90 80
85
+ Calico Jack 45 55 35
86
+ Anne Bonny 50 70 30
90
87
 
91
88
  [French Buccaneers](blue)
92
- L'Olonnais: 70, 80, 60
93
- Pierre le Grand: 30, 45, 25
89
+ L'Olonnais 70 80 60
90
+ Pierre le Grand 30 45 25
94
91
  ```
@@ -24,9 +24,9 @@ Every diagram starts with the chart type on the first line, followed by your dat
24
24
  ```
25
25
  bar Q1 Sales
26
26
 
27
- Jan: 42
28
- Feb: 58
29
- Mar: 71
27
+ Jan 42
28
+ Feb 58
29
+ Mar 71
30
30
  ```
31
31
 
32
32
  ## The Diagrammo Ecosystem
@@ -19,12 +19,15 @@
19
19
  { "slug": "chart-er", "title": "Entity Relationship", "group": "software", "file": "chart-er.md" },
20
20
  { "slug": "chart-flowchart", "title": "Flowchart", "group": "software", "file": "chart-flowchart.md" },
21
21
  { "slug": "chart-infra", "title": "Infrastructure", "group": "software", "file": "chart-infra.md" },
22
+ { "slug": "chart-mindmap", "title": "Mind Map", "group": "software", "file": "chart-mindmap.md" },
22
23
  { "slug": "chart-sequence", "title": "Sequence Diagram", "group": "software", "file": "chart-sequence.md" },
23
24
  { "slug": "chart-sitemap", "title": "Sitemap", "group": "software", "file": "chart-sitemap.md" },
24
25
  { "slug": "chart-state", "title": "State Diagram", "group": "software", "file": "chart-state.md" },
26
+ { "slug": "chart-wireframe", "title": "Wireframe", "group": "software", "file": "chart-wireframe.md" },
25
27
 
26
28
  { "slug": "chart-area", "title": "Area Chart", "group": "data", "file": "chart-area.md" },
27
29
  { "slug": "chart-bar", "title": "Bar Chart", "group": "data", "file": "chart-bar.md" },
30
+ { "slug": "chart-cycle", "title": "Cycle Diagram", "group": "data", "file": "chart-cycle.md" },
28
31
  { "slug": "chart-chord", "title": "Chord Diagram", "group": "data", "file": "chart-chord.md" },
29
32
  { "slug": "chart-doughnut", "title": "Doughnut Chart", "group": "data", "file": "chart-doughnut.md" },
30
33
  { "slug": "chart-function", "title": "Function Plot", "group": "data", "file": "chart-function.md" },
@@ -38,8 +41,10 @@
38
41
  { "slug": "chart-slope", "title": "Slope Chart", "group": "data", "file": "chart-slope.md" },
39
42
  { "slug": "chart-bar-stacked", "title": "Stacked Bar Chart", "group": "data", "file": "chart-bar-stacked.md" },
40
43
 
44
+ { "slug": "chart-journey-map", "title": "Journey Map", "group": "business", "file": "chart-journey-map.md" },
41
45
  { "slug": "chart-funnel", "title": "Funnel Chart", "group": "business", "file": "chart-funnel.md" },
42
46
  { "slug": "chart-org", "title": "Org Chart", "group": "business", "file": "chart-org.md" },
47
+ { "slug": "chart-pyramid", "title": "Pyramid Diagram", "group": "business", "file": "chart-pyramid.md" },
43
48
  { "slug": "chart-quadrant", "title": "Quadrant Chart", "group": "business", "file": "chart-quadrant.md" },
44
49
  { "slug": "chart-sankey", "title": "Sankey Diagram", "group": "business", "file": "chart-sankey.md" },
45
50
  { "slug": "chart-tech-radar", "title": "Technology Radar", "group": "business", "file": "chart-tech-radar.md" },
@@ -768,6 +768,8 @@ kanban [Title]
768
768
 
769
769
  ### 10.2 Columns
770
770
 
771
+ Columns represent workflow stages and must flow left-to-right from least-done to most-done (e.g., Backlog → In Progress → Done). Every column should be a stage that cards pass through. Don't create columns for non-workflow concepts like gates, criteria, or definitions of done — use a tag instead (e.g., `type: Gate`).
772
+
771
773
  ```
772
774
  [Column Name]
773
775
  [Column Name](color) | wip: 3
@@ -1134,29 +1136,51 @@ marker
1134
1136
 
1135
1137
  ## 15. Data Charts
1136
1138
 
1139
+ ### Conventions shared across all data charts
1140
+
1141
+ Every section under §15 follows the same two rules.
1142
+
1143
+ **Rule A — data rows are space-separated.** Commas between values are tolerated for back-compat but not idiomatic. Thousands-separator commas *inside a single number* (`3,984,078.65`) are always supported.
1144
+
1145
+ ```
1146
+ Q1 400 700 300 500 ✅ preferred
1147
+ Q1 400, 700, 300, 500 ⚠ tolerated; use spaces
1148
+ ```
1149
+
1150
+ **Rule B — list-of-labelled-items directives (e.g. `series`, `columns`) prefer the indented one-per-line form.** Short one-line forms are tolerated for ≤3 items with no colour annotations or spaces.
1151
+
1152
+ ```
1153
+ series ✅ preferred
1154
+ Cloud Platform (blue)
1155
+ Legacy Suite (red)
1156
+ Mobile App (green)
1157
+
1158
+ series Cloud (blue), Legacy (red) ⚠ tolerated; prefer the block
1159
+ ```
1160
+
1161
+ Parsers accept either form. The rules above are authoring guidance.
1162
+
1137
1163
  ### 15.1 Simple Charts (bar, line, pie, doughnut, area, polar-area, radar, bar-stacked)
1138
1164
 
1139
1165
  **Declaration:** `bar [Title]`, `line [Title]`, etc.
1140
1166
 
1141
- **Series:**
1167
+ **Series** — follows Rule B (prefer the indented block):
1142
1168
  ```
1143
- series Name1 Name2
1144
1169
  series
1145
- Name1
1146
- Name2(color)
1170
+ Cloud Platform (blue)
1171
+ Legacy Suite (red)
1147
1172
  ```
1148
1173
 
1149
- Commas between series names are optional.
1174
+ Short one-line form is tolerated: `series Revenue` or `series A B`.
1150
1175
 
1151
- **Data rows (space-separated, NO colon):**
1176
+ **Data rows** follows Rule A:
1152
1177
  ```
1153
1178
  Label 100
1154
1179
  Label 100 200 300
1155
1180
  Label(color) 100
1181
+ Q1 400 700 300 500
1156
1182
  ```
1157
1183
 
1158
- Commas between values are optional. Thousands commas are supported (`3,984,078.65` is a valid number).
1159
-
1160
1184
  **Options (space-separated, NO colon):**
1161
1185
  ```
1162
1186
  title My Chart
@@ -1182,14 +1206,12 @@ era Day 1 -> Day 3 Rough Seas (red)
1182
1206
 
1183
1207
  ### 15.2 Scatter / Bubble Charts
1184
1208
 
1185
- **Data rows (space-separated, NO colon):**
1209
+ **Data rows** — follows §15 Rule A (space-separated):
1186
1210
  ```
1187
1211
  Name x y
1188
1212
  Name x y size
1189
1213
  ```
1190
1214
 
1191
- Commas between values are optional. Thousands commas supported.
1192
-
1193
1215
  **Categories:**
1194
1216
  ```
1195
1217
  [Caribbean](red)
@@ -1208,20 +1230,21 @@ Labels are on by default. Use `no-labels` to hide point names.
1208
1230
 
1209
1231
  ### 15.3 Heatmap
1210
1232
 
1211
- **Columns:**
1233
+ **Columns** — follows §15 Rule B (prefer the indented block for multiple columns):
1212
1234
  ```
1213
- columns Jan Feb Mar
1235
+ columns
1236
+ Jan
1237
+ Feb
1238
+ Mar
1214
1239
  ```
1215
1240
 
1216
- Commas between column names are optional.
1241
+ Short one-line form is tolerated: `columns Jan Feb Mar`.
1217
1242
 
1218
- **Data rows (space-separated, NO colon):**
1243
+ **Data rows** follows §15 Rule A:
1219
1244
  ```
1220
1245
  RowLabel 5 4 3
1221
1246
  ```
1222
1247
 
1223
- Commas between values are optional. Thousands commas supported.
1224
-
1225
1248
  ### 15.4 Function Charts (Colon REQUIRED)
1226
1249
 
1227
1250
  ```
@@ -1254,7 +1277,7 @@ Source -> Target 3500
1254
1277
  Source -- Target 2000
1255
1278
  ```
1256
1279
 
1257
- `->` = directed, `--` = undirected. Thousands commas supported in values.
1280
+ `->` = directed, `--` = undirected. Values follow §15 Rule A.
1258
1281
 
1259
1282
  ### 15.6 Chord Charts
1260
1283
 
@@ -1263,19 +1286,17 @@ Blackbeard -- Bonnet 150 // undirected
1263
1286
  Roberts -> Rackham 20 // directed
1264
1287
  ```
1265
1288
 
1266
- Thousands commas supported in values.
1289
+ Values follow §15 Rule A.
1267
1290
 
1268
1291
  ### 15.7 Funnel Charts
1269
1292
 
1270
- **Data rows (space-separated, NO colon):**
1293
+ **Data rows** — follows §15 Rule A (space-separated):
1271
1294
  ```
1272
1295
  Visits 1200
1273
1296
  Signups 800
1274
1297
  Purchases 200
1275
1298
  ```
1276
1299
 
1277
- Thousands commas supported.
1278
-
1279
1300
  ---
1280
1301
 
1281
1302
  ## 16. Visualizations
@@ -1297,7 +1318,7 @@ Roberts 12 52
1297
1318
  Before COVID
1298
1319
  After COVID
1299
1320
  ```
1300
- - Data rows: `Label value1 value2` — space-separated, no colons, no commas between values
1321
+ - Data rows: `Label value1 value2` — follows §15 Rule A (space-separated; commas between values tolerated for back-compat but not idiomatic)
1301
1322
  - Thousands commas within values supported (e.g., `1,000`)
1302
1323
  - Color annotations: `Label (color) value1 value2`
1303
1324
  - Minimum 2 periods required
@@ -1364,9 +1385,9 @@ Quartermaster 0.9 0.95
1364
1385
  Navigator 0.85 0.8
1365
1386
  ```
1366
1387
 
1367
- - Axis labels: `x-label Low, High` — comma-separated
1388
+ - Axis labels: `x-label Low, High` — comma-separated (low/high pair, not a data row; comma is the delimiter here by design)
1368
1389
  - Position labels: `top-right Label` — space-separated
1369
- - Data points: `Label x y` or `Label x, y` comma or space between coordinates
1390
+ - Data points: `Label x y` follows §15 Rule A (space-separated; `Label x, y` tolerated for back-compat)
1370
1391
 
1371
1392
  ---
1372
1393
 
@@ -1570,7 +1591,68 @@ wireframe Login Page
1570
1591
 
1571
1592
  ---
1572
1593
 
1573
- ## 19. Colon Usage Summary
1594
+ ## 19. Pyramid Diagrams
1595
+
1596
+ Hierarchical pyramid visualization with stacked layers, descriptions, and optional per-layer color. Source order reads apex-first (top of file = top of pyramid).
1597
+
1598
+ ### Declaration
1599
+
1600
+ ```
1601
+ pyramid [Title]
1602
+
1603
+ LayerLabel
1604
+ LayerLabel | color: blue
1605
+ LayerLabel | color: green
1606
+ Indented description
1607
+ ```
1608
+
1609
+ The first line declares the chart type and an optional title. Each non-indented, non-directive line declares one layer. At least two layers are required.
1610
+
1611
+ ### Example
1612
+
1613
+ ```
1614
+ pyramid Maslow's Hierarchy
1615
+
1616
+ Self-Actualization | color: purple
1617
+ Morality, creativity, acceptance of facts.
1618
+
1619
+ Esteem | color: blue
1620
+ Respect, recognition, confidence.
1621
+
1622
+ Love & Belonging | color: green
1623
+ Friendship, intimacy, family.
1624
+
1625
+ Safety | color: yellow
1626
+ Security, employment, health.
1627
+
1628
+ Physiological | color: orange
1629
+ Food, water, warmth, rest.
1630
+ ```
1631
+
1632
+ ### Layer Pipe Metadata
1633
+
1634
+ | Key | Type | Default | Description |
1635
+ |-----|------|---------|-------------|
1636
+ | `color` | palette name | auto | Layer color |
1637
+ | `description` | string | — | One-liner description |
1638
+
1639
+ ### Descriptions
1640
+
1641
+ Indented lines under a layer are description text. Markdown inline formatting (`**bold**`, `*italic*`, `` `code` ``, `[links](url)`) is supported. Bullets written as `- item` render as `• item`.
1642
+
1643
+ ### Directives
1644
+
1645
+ | Directive | Effect |
1646
+ |-----------|--------|
1647
+ | `inverted` | Flip apex to the bottom (funnel orientation). Source order is preserved — the first layer is always the visual top. |
1648
+
1649
+ ### Overflow Handling
1650
+
1651
+ When descriptions don't fit a layer's band the renderer wraps at the column edge, truncates with `…`, auto-alternates descriptions left ↔ right when one column can't hold them, and (in-app) reveals the full description on highlight while hiding siblings.
1652
+
1653
+ ---
1654
+
1655
+ ## 20. Colon Usage Summary
1574
1656
 
1575
1657
  ### Constructs Where Colons Are REQUIRED
1576
1658
 
Binary file
Binary file