@diagrammo/dgmo 0.8.20 → 0.8.22

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 (110) hide show
  1. package/AGENTS.md +2 -1
  2. package/README.md +1 -0
  3. package/dist/cli.cjs +142 -90
  4. package/dist/editor.cjs +30 -4
  5. package/dist/editor.cjs.map +1 -1
  6. package/dist/editor.js +30 -4
  7. package/dist/editor.js.map +1 -1
  8. package/dist/highlight.cjs +25 -3
  9. package/dist/highlight.cjs.map +1 -1
  10. package/dist/highlight.js +25 -3
  11. package/dist/highlight.js.map +1 -1
  12. package/dist/index.cjs +21201 -12886
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +646 -89
  15. package/dist/index.d.ts +646 -89
  16. package/dist/index.js +21178 -12889
  17. package/dist/index.js.map +1 -1
  18. package/docs/guide/chart-mindmap.md +198 -0
  19. package/docs/guide/chart-sequence.md +23 -1
  20. package/docs/guide/chart-sitemap.md +18 -1
  21. package/docs/guide/chart-tech-radar.md +219 -0
  22. package/docs/guide/chart-wireframe.md +100 -0
  23. package/docs/guide/index.md +8 -0
  24. package/docs/guide/registry.json +1 -0
  25. package/docs/language-reference.md +249 -4
  26. package/gallery/fixtures/boxes-and-lines.dgmo +10 -3
  27. package/gallery/fixtures/c4-full.dgmo +2 -2
  28. package/gallery/fixtures/cycle/ooda-loop.dgmo +25 -0
  29. package/gallery/fixtures/cycle/pdca-circle-nodes.dgmo +12 -0
  30. package/gallery/fixtures/cycle/pdca-minimal.dgmo +6 -0
  31. package/gallery/fixtures/cycle/sprint-cycle-span.dgmo +17 -0
  32. package/gallery/fixtures/gantt-full.dgmo +2 -2
  33. package/gallery/fixtures/gantt.dgmo +2 -2
  34. package/gallery/fixtures/infra-full.dgmo +2 -2
  35. package/gallery/fixtures/infra.dgmo +1 -1
  36. package/gallery/fixtures/sequence-tags-protocols.dgmo +2 -2
  37. package/gallery/fixtures/sequence-tags.dgmo +2 -2
  38. package/gallery/fixtures/tech-radar-dense.dgmo +77 -0
  39. package/gallery/fixtures/tech-radar.dgmo +36 -0
  40. package/gallery/fixtures/timeline.dgmo +1 -1
  41. package/package.json +1 -1
  42. package/src/boxes-and-lines/collapse.ts +21 -3
  43. package/src/boxes-and-lines/layout.ts +360 -42
  44. package/src/boxes-and-lines/parser.ts +94 -11
  45. package/src/boxes-and-lines/renderer.ts +371 -114
  46. package/src/boxes-and-lines/types.ts +2 -1
  47. package/src/c4/layout.ts +8 -8
  48. package/src/c4/parser.ts +35 -2
  49. package/src/c4/renderer.ts +19 -3
  50. package/src/c4/types.ts +1 -0
  51. package/src/chart.ts +14 -7
  52. package/src/completion.ts +253 -0
  53. package/src/cycle/layout.ts +732 -0
  54. package/src/cycle/parser.ts +352 -0
  55. package/src/cycle/renderer.ts +539 -0
  56. package/src/cycle/types.ts +77 -0
  57. package/src/d3.ts +240 -40
  58. package/src/dgmo-router.ts +15 -0
  59. package/src/echarts.ts +7 -4
  60. package/src/editor/dgmo.grammar +5 -1
  61. package/src/editor/dgmo.grammar.js +1 -1
  62. package/src/editor/keywords.ts +26 -0
  63. package/src/gantt/parser.ts +2 -8
  64. package/src/graph/flowchart-parser.ts +15 -21
  65. package/src/graph/layout.ts +73 -9
  66. package/src/graph/state-collapse.ts +78 -0
  67. package/src/graph/state-parser.ts +5 -10
  68. package/src/graph/state-renderer.ts +139 -34
  69. package/src/index.ts +78 -0
  70. package/src/infra/layout.ts +218 -74
  71. package/src/infra/parser.ts +30 -6
  72. package/src/infra/renderer.ts +14 -8
  73. package/src/infra/types.ts +10 -3
  74. package/src/journey-map/layout.ts +386 -0
  75. package/src/journey-map/parser.ts +540 -0
  76. package/src/journey-map/renderer.ts +1456 -0
  77. package/src/journey-map/types.ts +47 -0
  78. package/src/kanban/parser.ts +3 -10
  79. package/src/kanban/renderer.ts +325 -63
  80. package/src/mindmap/collapse.ts +88 -0
  81. package/src/mindmap/layout.ts +605 -0
  82. package/src/mindmap/parser.ts +373 -0
  83. package/src/mindmap/renderer.ts +544 -0
  84. package/src/mindmap/text-wrap.ts +217 -0
  85. package/src/mindmap/types.ts +55 -0
  86. package/src/org/parser.ts +2 -6
  87. package/src/render.ts +18 -21
  88. package/src/sequence/renderer.ts +273 -56
  89. package/src/sharing.ts +3 -0
  90. package/src/sitemap/layout.ts +56 -18
  91. package/src/sitemap/parser.ts +26 -17
  92. package/src/sitemap/renderer.ts +34 -0
  93. package/src/sitemap/types.ts +1 -0
  94. package/src/tech-radar/index.ts +14 -0
  95. package/src/tech-radar/interactive.ts +1058 -0
  96. package/src/tech-radar/layout.ts +190 -0
  97. package/src/tech-radar/parser.ts +385 -0
  98. package/src/tech-radar/renderer.ts +1159 -0
  99. package/src/tech-radar/shared.ts +187 -0
  100. package/src/tech-radar/types.ts +81 -0
  101. package/src/utils/description-helpers.ts +33 -0
  102. package/src/utils/export-container.ts +3 -2
  103. package/src/utils/legend-d3.ts +1 -0
  104. package/src/utils/legend-layout.ts +5 -3
  105. package/src/utils/parsing.ts +48 -7
  106. package/src/utils/tag-groups.ts +46 -60
  107. package/src/wireframe/layout.ts +460 -0
  108. package/src/wireframe/parser.ts +956 -0
  109. package/src/wireframe/renderer.ts +1293 -0
  110. package/src/wireframe/types.ts +110 -0
@@ -0,0 +1,198 @@
1
+ # Mind Map
2
+
3
+ ```dgmo
4
+ mindmap Product Strategy
5
+
6
+ Research
7
+ User Interviews
8
+ Surveys | description: Quarterly NPS survey
9
+ Focus Groups
10
+ Competitor Analysis
11
+ Feature Matrix
12
+ Pricing Review
13
+ Development
14
+ MVP Features
15
+ Auth System
16
+ description: Handle login, signup, OAuth flows
17
+ Dashboard
18
+ Nice-to-haves | collapsed: true
19
+ Dark Mode
20
+ Export PDF
21
+ Go-to-Market
22
+ Launch Plan
23
+ Blog Post
24
+ Demo Video | description: 2-min product walkthrough
25
+ ```
26
+
27
+ ## Overview
28
+
29
+ Mind maps visualize hierarchical information radiating from a central concept. Each branch represents a subtopic, with deeper nesting for finer detail. Mind maps are useful for brainstorming, project planning, knowledge organization, and breaking down complex topics.
30
+
31
+ **Interactive features:** Click nodes to navigate to their source line. Collapse and expand subtrees by clicking nodes with children. Toggle tag group coloring and depth-based coloring via the legend controls.
32
+
33
+ ## Syntax
34
+
35
+ ```
36
+ mindmap Title
37
+
38
+ Node
39
+ Child Node
40
+ Grandchild
41
+ Another Child
42
+ ```
43
+
44
+ The first line declares the chart type. The title becomes the root node. Indentation establishes the parent-child hierarchy.
45
+
46
+ ## Nodes
47
+
48
+ Every non-blank, non-directive line is a node. Nesting is set by indentation:
49
+
50
+ ```
51
+ mindmap Root
52
+ Level 1a
53
+ Level 2a
54
+ Level 2b
55
+ Level 1b
56
+ ```
57
+
58
+ ### Node Colors
59
+
60
+ Add a color suffix in parentheses:
61
+
62
+ ```
63
+ Important Topic(red)
64
+ Sub-topic(blue)
65
+ ```
66
+
67
+ ### Descriptions
68
+
69
+ Nodes can have descriptions shown as secondary text. Two forms:
70
+
71
+ ```
72
+ // Pipe form (single line)
73
+ Surveys | description: Quarterly NPS survey
74
+
75
+ // Indented form (before children)
76
+ Auth System
77
+ description: Handle login, signup, and OAuth flows
78
+ Login Page
79
+ ```
80
+
81
+ ### Collapse Default
82
+
83
+ Set a node's default collapsed state with pipe metadata:
84
+
85
+ ```
86
+ Nice-to-haves | collapsed: true
87
+ Dark Mode
88
+ Export PDF
89
+ ```
90
+
91
+ Collapsed nodes show a drill-bar indicating hidden children. Click to expand.
92
+
93
+ ## Multi-Root
94
+
95
+ Omit the title to create multiple independent root trees:
96
+
97
+ ```
98
+ mindmap
99
+
100
+ Q1 Goals
101
+ Ship MVP
102
+ Hire designers
103
+ Q2 Goals
104
+ Launch marketing
105
+ Expand team
106
+ ```
107
+
108
+ The diagram title is inferred from the first root's label.
109
+
110
+ ## Pipe Metadata
111
+
112
+ Attach metadata after `|` with comma-separated `key: value` pairs:
113
+
114
+ ```
115
+ Node | priority: High, status: Done
116
+ ```
117
+
118
+ Tag values, descriptions, and `collapsed` are all set via pipe metadata.
119
+
120
+ ## Tag Groups
121
+
122
+ Tag groups define color-coded categories. They appear before content and follow the standard tag syntax:
123
+
124
+ ```
125
+ mindmap Root
126
+
127
+ tag Priority p
128
+ High(red)
129
+ Medium(yellow)
130
+ Low(green)
131
+
132
+ Task A | p: High
133
+ Task B | p: Low
134
+ ```
135
+
136
+ - The alias (`p`) provides a shorthand for metadata keys
137
+ - The active tag group colors nodes by their tag value
138
+ - Click a tag group name in the legend to activate or deactivate it
139
+
140
+ ## Options
141
+
142
+ | Option | Effect |
143
+ |--------|--------|
144
+ | `active-tag GroupName` | Set the default active tag group |
145
+ | `hide-descriptions` | Hide description text on all nodes |
146
+
147
+ Options are placed on their own line before content:
148
+
149
+ ```
150
+ mindmap Root
151
+
152
+ tag Priority p
153
+ High(red)
154
+ Low(green)
155
+
156
+ active-tag Priority
157
+ hide-descriptions
158
+
159
+ Task A | p: High
160
+ ```
161
+
162
+ ## Complete Example
163
+
164
+ ```dgmo
165
+ mindmap Product Strategy(blue)
166
+
167
+ tag Priority p
168
+ High(red)
169
+ Medium(yellow)
170
+ Low(green)
171
+
172
+ tag Department d
173
+ Engineering(blue)
174
+ Design(purple)
175
+ Marketing(orange)
176
+
177
+ active-tag Priority
178
+
179
+ Research | d: Marketing
180
+ User Interviews | p: High
181
+ Surveys | description: Quarterly NPS survey
182
+ Focus Groups
183
+ Competitor Analysis | d: Engineering
184
+ Feature Matrix
185
+ Pricing Review
186
+ Development | p: High, d: Engineering
187
+ MVP Features
188
+ Auth System
189
+ description: Handle login, signup, OAuth flows
190
+ Dashboard
191
+ Nice-to-haves | p: Low, collapsed: true
192
+ Dark Mode
193
+ Export PDF
194
+ Go-to-Market | d: Marketing
195
+ Launch Plan
196
+ Blog Post
197
+ Demo Video | description: 2-min product walkthrough
198
+ ```
@@ -103,7 +103,29 @@ PaymentGW is a networking aka "Payment Gateway"
103
103
  OrderDB position -1
104
104
  ```
105
105
 
106
- Position `0` is leftmost, `-1` is rightmost. Unpositioned participants appear in first-mention order.
106
+ ## Participant Ordering
107
+
108
+ Participants are laid out left-to-right based on **first appearance in messages** — the first participant mentioned gets the leftmost column.
109
+
110
+ **Position values:**
111
+ - `0` = leftmost, `1` = second from left, etc.
112
+ - `-1` = rightmost, `-2` = second from right
113
+ - If two participants target the same slot, the later one shifts to the nearest free position
114
+
115
+ **Groups affect ordering:** members of the same group always stay adjacent (see [Groups](#groups) below). The group is placed where its first member would naturally appear.
116
+
117
+ **Priority (highest wins):**
118
+ 1. Explicit `position N`
119
+ 2. Group adjacency
120
+ 3. First appearance in messages
121
+
122
+ ```
123
+ // Example: force the database to the far right
124
+ sequence
125
+ User -placeOrder-> OrderService
126
+ OrderService -save-> OrderDB
127
+ OrderDB position -1
128
+ ```
107
129
 
108
130
  ## Messages
109
131
 
@@ -7,7 +7,7 @@ tag Auth
7
7
  Public(green)
8
8
  Crew Only(blue)
9
9
 
10
- Home | Auth: Public
10
+ Home | Auth: Public, description: Landing page with interactive demos
11
11
  -shop-> Shop
12
12
  -voyages-> Upcoming Voyages
13
13
  -join crew-> Sign Up
@@ -39,6 +39,7 @@ Home | Auth: Public
39
39
  Sign Up | Auth: Public
40
40
  -welcome aboard-> Dashboard
41
41
  Dashboard | Auth: Crew Only
42
+ description Full overview of crew activity and orders
42
43
  -> My Orders
43
44
  My Orders | Auth: Crew Only
44
45
  -reorder-> Shop
@@ -140,6 +141,22 @@ Home | status: Live | owner: Marketing
140
141
  Products | status: Draft | owner: Product Team
141
142
  ```
142
143
 
144
+ ## Descriptions
145
+
146
+ Add a description to any page using the `description` keyword (indented) or pipe metadata:
147
+
148
+ ```
149
+ // Pipe metadata form
150
+ Pricing | description: Compare plans and features
151
+
152
+ // Indented keyword form (colon optional)
153
+ Dashboard
154
+ description Full overview of crew activity and orders
155
+ My Orders
156
+ ```
157
+
158
+ Descriptions render as secondary text on the page card. The indented form must come before child pages. Multiple `description` lines accumulate into a multi-line description.
159
+
143
160
  ## Node Colors
144
161
 
145
162
  Add a color name in parentheses after a page or group name:
@@ -0,0 +1,219 @@
1
+ # Technology Radar
2
+
3
+ ```dgmo
4
+ tech-radar Pirate Operations Radar — Q2 1718
5
+
6
+ rings
7
+ Full Sail
8
+ Trial Run
9
+ Spyglass
10
+ Davy Jones
11
+
12
+ Tactics | quadrant: top-right
13
+ Ambush at Dawn | ring: Full Sail, trend: stable
14
+ Our most reliable boarding tactic. **90% success rate** when
15
+ approaching from the east with the sun behind us.
16
+ - Crew morale peaks at dawn — grog hasn't worn off yet
17
+ - Reduced cannon fire needed: *3 volleys* vs 8 at midday
18
+ Boarding Parties | ring: Full Sail, trend: stable
19
+ Decoy Flags | ring: Trial Run, trend: up
20
+ Flying false colours until within cannon range. Early results
21
+ are promising — merchant ships drop anchor **40% more often**.
22
+ Smoke Screens | ring: Trial Run, trend: new
23
+ Kraken Diplomacy | ring: Spyglass, trend: new
24
+ Exploring alliances with *sea monsters*. Negotiations ongoing.
25
+
26
+ Vessels | quadrant: top-left
27
+ Brigantine | ring: Full Sail, trend: stable
28
+ Our workhorse. Fast, manoeuvrable, carries **18 cannons**.
29
+ - Crew capacity: 100 pirates
30
+ - Top speed: *11 knots* in fair wind
31
+ Sloop | ring: Full Sail, trend: up
32
+ War Galleon | ring: Trial Run, trend: up
33
+ Captured from the Spanish fleet. Massive firepower but
34
+ **slow to turn** — best for convoy raids, not chases.
35
+ Longboat | ring: Davy Jones, trend: down
36
+
37
+ Plunder Targets | quadrant: bottom-left
38
+ Merchant Convoys | ring: Full Sail, trend: stable
39
+ Core revenue stream — **78% of total plunder**. East India
40
+ Company ships running the spice route remain most lucrative.
41
+ Port Raids | ring: Trial Run, trend: up
42
+ Rival Pirates | ring: Trial Run, trend: new
43
+ Royal Treasury Ships | ring: Spyglass, trend: new
44
+ High risk, astronomical reward. Requires:
45
+ - Inside information from *corrupt harbourmasters*
46
+ - At least **3 allied ships** for the blockade
47
+ - A really good escape plan
48
+ Whaling Ships | ring: Spyglass, trend: stable
49
+ Fishing Villages | ring: Davy Jones, trend: down
50
+ Terrible ROI and **bad for reputation**. The parrot union
51
+ filed a formal complaint.
52
+
53
+ Crew Welfare | quadrant: bottom-right
54
+ Grog Rations | ring: Full Sail, trend: stable
55
+ Non-negotiable. Cutting grog rations caused the *Great Mutiny of 1716*.
56
+ Sea Shanty Program | ring: Trial Run, trend: new
57
+ Hired a shanty master. Crew productivity up **25%** during
58
+ long voyages. Signature tune: *"Yo Ho Ho and a Bottle of Rum"*.
59
+ Dental Plan | ring: Spyglass, trend: up
60
+ Exploring options. Most crew down to **4 teeth** on average.
61
+ Parley with a Port Royal dentist scheduled for Q3.
62
+ ```
63
+
64
+ ## Overview
65
+
66
+ Technology radars visualize how an organization adopts and evaluates technologies, practices, or strategies. Inspired by the [ThoughtWorks Technology Radar](https://www.thoughtworks.com/radar), each radar arranges items ("blips") into concentric rings indicating adoption stage, grouped by quadrant categories.
67
+
68
+ Click any quadrant label to drill down into a detail view with expanded blip descriptions. Click the "Blip Legend" toggle to show or hide the numbered reference listing below the radar.
69
+
70
+ ## Syntax
71
+
72
+ ```
73
+ tech-radar Title
74
+
75
+ rings
76
+ Ring1
77
+ Ring2
78
+
79
+ Quadrant Name | quadrant: position
80
+ Blip Name | ring: RingName, trend: value
81
+ Description text (markdown supported)
82
+ ```
83
+
84
+ ## Settings
85
+
86
+ | Key | Description | Default |
87
+ | --- | ----------- | ------- |
88
+ | `chart` | Must be `tech-radar` | — |
89
+ | `title` | Radar title | None |
90
+
91
+ ## Rings
92
+
93
+ Rings represent adoption stages, ordered from innermost (highest commitment) to outermost (lowest). Declare them in a `rings` block:
94
+
95
+ ```
96
+ rings
97
+ Adopt
98
+ Trial
99
+ Assess
100
+ Hold
101
+ ```
102
+
103
+ You can use any ring names — the classic Adopt/Trial/Assess/Hold is common but not required.
104
+
105
+ ### Ring Aliases
106
+
107
+ Rings support aliases for shorter blip references:
108
+
109
+ ```
110
+ rings
111
+ Adopt alias a
112
+ Trial alias t
113
+ Assess alias x
114
+ Hold alias h
115
+
116
+ Quadrant | quadrant: top-right
117
+ Item Name | ring: a, trend: up
118
+ ```
119
+
120
+ ## Quadrants
121
+
122
+ Exactly 4 quadrants are required. Each needs a unique position:
123
+
124
+ ```
125
+ Techniques | quadrant: top-right
126
+ Tools | quadrant: top-left
127
+ Platforms | quadrant: bottom-left
128
+ Languages | quadrant: bottom-right
129
+ ```
130
+
131
+ **Positions:** `top-left`, `top-right`, `bottom-left`, `bottom-right`
132
+
133
+ ### Custom Colors
134
+
135
+ Override the default quadrant color with `color`:
136
+
137
+ ```
138
+ Tools | quadrant: top-left, color: purple
139
+ ```
140
+
141
+ Default colors: top-left=blue, top-right=green, bottom-left=red, bottom-right=orange.
142
+
143
+ ## Blips
144
+
145
+ Blips are items placed on the radar. Each is indented under its quadrant and requires a `ring` reference:
146
+
147
+ ```
148
+ Kubernetes | ring: Adopt
149
+ Micro Frontends | ring: Trial, trend: up
150
+ ```
151
+
152
+ Ring matching is case-insensitive — `ring: adopt` and `ring: Adopt` both work.
153
+
154
+ ## Trends
155
+
156
+ The optional `trend` metadata controls the visual indicator on each blip:
157
+
158
+ | Trend | Indicator | Meaning |
159
+ | ----- | --------- | ------- |
160
+ | `new` | Double circle | Newly added to the radar |
161
+ | `up` | Inward crescent | Moving toward center (higher adoption) |
162
+ | `down` | Outward crescent | Moving away from center (declining) |
163
+ | `stable` | Plain circle | No change since last assessment |
164
+
165
+ Omitting `trend` renders a plain circle (same as `stable`).
166
+
167
+ ## Descriptions
168
+
169
+ Further-indented lines below a blip become its description. Descriptions support inline markdown:
170
+
171
+ ```
172
+ Rust | ring: Assess, trend: new
173
+ Evaluating for **performance-critical** services.
174
+ Key benefits: *zero-cost abstractions* and `no GC pauses`.
175
+ - 12x throughput improvement in image pipeline
176
+ - See [evaluation doc](https://wiki.example.com/rust)
177
+ ```
178
+
179
+ Descriptions appear in the quadrant detail view and on hover/click in the main radar view.
180
+
181
+ ## Complete Example
182
+
183
+ ```dgmo
184
+ tech-radar Fleet Readiness Radar
185
+
186
+ rings
187
+ Battle Ready
188
+ Sea Trials
189
+ Scouting
190
+ Scuttle
191
+
192
+ Navigation | quadrant: top-right
193
+ Star Charts | ring: Battle Ready, trend: stable
194
+ Compass Calibration | ring: Sea Trials, trend: up
195
+ New lodestone from Madagascar shows **30% better accuracy**.
196
+ Sextant | ring: Battle Ready, trend: stable
197
+ Treasure Maps | ring: Scouting, trend: new
198
+ Celestial Tables | ring: Scouting, trend: new
199
+
200
+ Armaments | quadrant: top-left
201
+ Cannon Broadside | ring: Battle Ready, trend: stable
202
+ Greek Fire | ring: Sea Trials, trend: new
203
+ Chain Shot | ring: Sea Trials, trend: up
204
+ Catapult | ring: Scuttle, trend: down
205
+
206
+ Provisions | quadrant: bottom-left
207
+ Salted Pork | ring: Battle Ready, trend: stable
208
+ Citrus Rations | ring: Sea Trials, trend: up
209
+ Reduced scurvy cases by **80%** in trial crews.
210
+ Rum Distillation | ring: Scouting, trend: new
211
+ Hardtack | ring: Scuttle, trend: down
212
+ Barnacle Soup | ring: Scuttle, trend: down
213
+
214
+ Morale | quadrant: bottom-right
215
+ Shore Leave | ring: Battle Ready, trend: stable
216
+ Sea Shanties | ring: Battle Ready, trend: up
217
+ Parrot Companions | ring: Scouting, trend: new
218
+ Plank Walking | ring: Scuttle, trend: down
219
+ ```
@@ -0,0 +1,100 @@
1
+ # Wireframe
2
+
3
+ ```dgmo
4
+ wireframe Login Page
5
+
6
+ [Header]
7
+ Acme App
8
+ nav
9
+ Home | active
10
+ About
11
+ Pricing
12
+
13
+ [Main]
14
+ # Sign In
15
+
16
+ Email [user@example.com]
17
+ Password [****] | password
18
+
19
+ <x> Remember me
20
+
21
+ (Sign In)
22
+ (Forgot Password?) | ghost
23
+
24
+ ---
25
+
26
+ New here? (Create Account) | ghost
27
+ ```
28
+
29
+ ## Overview
30
+
31
+ Wireframe diagrams use **visual-mnemonic syntax** where bracket characters communicate the element type. The source text reads as a wireframe even before rendering.
32
+
33
+ ## Elements
34
+
35
+ | Syntax | Element |
36
+ |--------|---------|
37
+ | `[text]` (no children) | Text input |
38
+ | `[Name]` (with children) | Group / region |
39
+ | `(Label)` | Button |
40
+ | `{A \| B \| C}` | Dropdown |
41
+ | `<x>` / `< >` | Checkbox |
42
+ | `(*) Label` / `( ) Label` | Radio button |
43
+ | `# Text` | Heading |
44
+ | `## Text` | Subheading |
45
+ | `---` | Divider |
46
+ | `- text` | List item |
47
+
48
+ ## Keywords
49
+
50
+ `nav`, `tabs`, `table`, `image`, `modal`, `skeleton`, `alert`, `progress`, `chart`
51
+
52
+ - `image round` / `image wide` — shape hints
53
+ - `chart line` / `chart bar` / `chart pie` — chart silhouettes
54
+ - `progress 60` — percentage bar
55
+ - `table 5x4` — skeleton table with dimensions
56
+
57
+ ## States
58
+
59
+ Pipe metadata flags on elements:
60
+
61
+ ```
62
+ (Submit) | disabled
63
+ (Delete) | destructive
64
+ (Cancel) | ghost
65
+ [Email] | password
66
+ [Notes] | textarea
67
+ <x> Dark mode | toggle
68
+ [Cards] | horizontal
69
+ ```
70
+
71
+ ## Layout
72
+
73
+ - **Desktop** (default): 1200px, top-level regions side-by-side
74
+ - **Mobile**: `mobile` keyword, 375px vertical stacking
75
+ - **Smart sizing**: `sidebar` gets ~25%, `main` fills remaining
76
+ - `| horizontal` on any group arranges children in a row
77
+
78
+ ## Multi-Element Lines
79
+
80
+ Two or more spaces between elements on one line:
81
+
82
+ ```
83
+ Email [user@example.com] // label + field
84
+ (-) 1 (+) // inline stepper
85
+ ```
86
+
87
+ ## Tables
88
+
89
+ ```dgmo
90
+ wireframe Data
91
+
92
+ table
93
+ Name, Email, Role
94
+ John, john@, Admin
95
+ Sally, sally@, Editor
96
+
97
+ // Skeleton shorthand:
98
+ table 5x4
99
+ Name, Email, Role, Status
100
+ ```
@@ -4,6 +4,14 @@ Diagrammo is a diagram editor for creating charts and diagrams with a simple pla
4
4
 
5
5
  Learn more at **[diagrammo.app](https://diagrammo.app)**.
6
6
 
7
+ ## DGMO and Diagrammo
8
+
9
+ **DGMO** is the plain-text markup language you write. **Diagrammo** is the app you write it in.
10
+
11
+ Think of it like Markdown and your editor — Markdown is the syntax, and you can write it anywhere. DGMO works the same way: it's a `.dgmo` text file that describes a diagram. You can create and edit `.dgmo` files in the Diagrammo desktop app, the online editor, Obsidian (via plugin), or any text editor. The `dgmo` CLI renders them from the terminal, and the `@diagrammo/dgmo` npm package lets you render them programmatically.
12
+
13
+ The name "DGMO" is shorthand for "Diagrammo" — shorter to type, easier to use as a file extension and command name.
14
+
7
15
  ## Getting Started
8
16
 
9
17
  - **Create a new file** using the file tree on the left, or press **Cmd + N**
@@ -42,6 +42,7 @@
42
42
  { "slug": "chart-org", "title": "Org Chart", "group": "business", "file": "chart-org.md" },
43
43
  { "slug": "chart-quadrant", "title": "Quadrant Chart", "group": "business", "file": "chart-quadrant.md" },
44
44
  { "slug": "chart-sankey", "title": "Sankey Diagram", "group": "business", "file": "chart-sankey.md" },
45
+ { "slug": "chart-tech-radar", "title": "Technology Radar", "group": "business", "file": "chart-tech-radar.md" },
45
46
  { "slug": "chart-venn", "title": "Venn Diagram (Beta)", "group": "business", "file": "chart-venn.md" },
46
47
  { "slug": "chart-wordcloud", "title": "Word Cloud", "group": "business", "file": "chart-wordcloud.md" },
47
48