@diagrammo/dgmo 0.10.1 → 0.10.2

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 (48) hide show
  1. package/dist/auto.cjs +1 -1
  2. package/dist/auto.js +1 -1
  3. package/dist/auto.mjs +1 -1
  4. package/package.json +2 -2
  5. package/docs/guide/chart-arc.md +0 -71
  6. package/docs/guide/chart-area.md +0 -73
  7. package/docs/guide/chart-bar-stacked.md +0 -61
  8. package/docs/guide/chart-bar.md +0 -62
  9. package/docs/guide/chart-boxes-and-lines.md +0 -243
  10. package/docs/guide/chart-c4.md +0 -298
  11. package/docs/guide/chart-chord.md +0 -43
  12. package/docs/guide/chart-class.md +0 -204
  13. package/docs/guide/chart-cycle.md +0 -156
  14. package/docs/guide/chart-doughnut.md +0 -38
  15. package/docs/guide/chart-er.md +0 -218
  16. package/docs/guide/chart-flowchart.md +0 -102
  17. package/docs/guide/chart-function.md +0 -56
  18. package/docs/guide/chart-funnel.md +0 -38
  19. package/docs/guide/chart-gantt.md +0 -368
  20. package/docs/guide/chart-heatmap.md +0 -41
  21. package/docs/guide/chart-infra.md +0 -694
  22. package/docs/guide/chart-journey-map.md +0 -179
  23. package/docs/guide/chart-kanban.md +0 -158
  24. package/docs/guide/chart-line.md +0 -79
  25. package/docs/guide/chart-mindmap.md +0 -198
  26. package/docs/guide/chart-multi-line.md +0 -84
  27. package/docs/guide/chart-org.md +0 -209
  28. package/docs/guide/chart-pie.md +0 -39
  29. package/docs/guide/chart-polar-area.md +0 -38
  30. package/docs/guide/chart-pyramid.md +0 -111
  31. package/docs/guide/chart-quadrant.md +0 -69
  32. package/docs/guide/chart-radar.md +0 -38
  33. package/docs/guide/chart-sankey.md +0 -103
  34. package/docs/guide/chart-scatter.md +0 -91
  35. package/docs/guide/chart-sequence.md +0 -354
  36. package/docs/guide/chart-sitemap.md +0 -265
  37. package/docs/guide/chart-slope.md +0 -56
  38. package/docs/guide/chart-state.md +0 -171
  39. package/docs/guide/chart-tech-radar.md +0 -219
  40. package/docs/guide/chart-timeline.md +0 -229
  41. package/docs/guide/chart-venn.md +0 -81
  42. package/docs/guide/chart-wireframe.md +0 -100
  43. package/docs/guide/chart-wordcloud.md +0 -66
  44. package/docs/guide/colors.md +0 -287
  45. package/docs/guide/how-dgmo-thinks.md +0 -277
  46. package/docs/guide/index.md +0 -63
  47. package/docs/guide/keyboard-shortcuts.md +0 -49
  48. package/docs/guide/registry.json +0 -58
@@ -1,298 +0,0 @@
1
- # C4 Diagram
2
-
3
- ```dgmo
4
- c4 Internet Banking System
5
-
6
- person Customer | description: A customer of the bank
7
-
8
- system Internet Banking | description: Allows customers to view accounts and make payments
9
- -Delivers content to [HTTPS]-> Customer
10
- -Sends emails using [SMTP]-> Email
11
-
12
- containers
13
- container Web App | description: SPA for banking features, tech: React
14
- -Makes API calls [JSON/HTTPS]-> API
15
-
16
- container API | description: JSON/HTTPS API backend, tech: Node.js
17
- -Reads from and writes to [SQL/TCP]-> Database
18
-
19
- container Database | description: Stores account data, tech: PostgreSQL
20
-
21
- system Email | description: Sendgrid email delivery
22
- ~Sends emails to~> Customer
23
-
24
- deployment
25
- Vercel is a cloud
26
- container Web App
27
- Railway
28
- container API
29
- Neon is a database
30
- container Database
31
- ```
32
-
33
- ## Overview
34
-
35
- C4 diagrams model software architecture at multiple zoom levels, following the [C4 model](https://c4model.com). Define people, systems, containers, and components — then drill down from context to detail. Relationships use the same arrow syntax as sequence diagrams.
36
-
37
- The diagram starts at the **Context** level (people + systems). Click a system to drill into its **Containers**, then click a container to see its **Components**.
38
-
39
- ## Syntax
40
-
41
- ```
42
- c4 Diagram Title
43
-
44
- person Name | description: ...
45
- system Name | description: ...
46
- -label [technology]-> Target
47
- ~async label~> Target
48
-
49
- containers
50
- container Name | tech: ..., description: ...
51
-
52
- components
53
- component Name | tech: ..., description: ...
54
- ```
55
-
56
- ## Element Types
57
-
58
- | Type | Description | Example |
59
- | ----------- | ------------------------------- | -------------------------- |
60
- | `person` | User or actor | `person Customer` |
61
- | `system` | Top-level software system | `system Banking` |
62
- | `container` | Runtime unit within a system | `container API` |
63
- | `component` | Logical part within a container | `component AuthController` |
64
-
65
- Elements are declared with their type keyword followed by a name. Add metadata after `|`:
66
-
67
- ```
68
- system Analytics Platform | description: Multi-tenant analytics, tech: Node.js
69
- ```
70
-
71
- ## Shapes
72
-
73
- Shapes can be inferred from the element's technology or name, or declared explicitly:
74
-
75
- ```
76
- container Database is a database
77
- container Cache is a cache
78
- container Event Bus is a queue
79
- system AWS is a cloud
80
- system Stripe is an external
81
- ```
82
-
83
- | Shape | Inferred from |
84
- | ---------- | --------------------------------------------------------- |
85
- | `database` | `tech: PostgreSQL`, `tech: MySQL`, names ending in `DB` |
86
- | `cache` | `tech: Redis`, `tech: Memcache`, names containing `Cache` |
87
- | `queue` | `tech: RabbitMQ`, `tech: Kafka`, names containing `Queue` |
88
- | `cloud` | Explicit `is a cloud` only |
89
- | `external` | Explicit `is an external` only |
90
-
91
- ## Metadata
92
-
93
- Key-value pairs on the same line with `|`, or indented below the element:
94
-
95
- ```
96
- container API Gateway | tech: Node.js, team: Platform
97
- description: REST API serving all frontends
98
- ```
99
-
100
- Or fully inline:
101
-
102
- ```
103
- container API Gateway | tech: Node.js, team: Platform, description: REST API
104
- ```
105
-
106
- ## Relationships
107
-
108
- ### Arrow Types
109
-
110
- | Arrow | Meaning | Example |
111
- | ----- | ----------------------- | ------------------------ |
112
- | `->` | Synchronous | `-Makes API calls-> API` |
113
- | `~>` | Async / fire-and-forget | `~Sends events~> Queue` |
114
-
115
- For bidirectional relationships, use two separate lines:
116
-
117
- ```
118
- API -Makes API calls-> Database
119
- Database -Returns results-> API
120
- ```
121
-
122
- ### Labeled Relationships
123
-
124
- Place the label inside the arrow. Add `[technology]` to annotate the protocol:
125
-
126
- ```
127
- -Makes API calls [JSON/HTTPS]-> API
128
- -Reads from and writes to [SQL/TCP]-> Database
129
- ~Submits analytics queries [AMQP]~> Query Engine
130
- ```
131
-
132
- ### Arrow-Label Syntax
133
-
134
- Labels can also be placed inside the arrow:
135
-
136
- ```
137
- -Makes API calls [JSON/HTTPS]-> API
138
- ~Sends events [AMQP]~> Queue
139
- ```
140
-
141
- ## Hierarchy
142
-
143
- Systems contain containers (via `containers`), containers contain components (via `components`). Indentation defines the hierarchy:
144
-
145
- ```
146
- system Banking
147
- containers
148
- container Web App
149
- container API
150
- components
151
- component AuthController
152
- component PaymentService
153
- ```
154
-
155
- At the **Context** level, container-level relationships are automatically rolled up to their parent system.
156
-
157
- ## Groups
158
-
159
- Organize containers or components into visual boundaries:
160
-
161
- ```
162
- containers
163
- [Frontend]
164
- container Dashboard | tech: React
165
- container Admin Console | tech: React
166
-
167
- [Backend]
168
- container API Gateway | tech: Node.js
169
- container Query Engine | tech: Node.js
170
-
171
- [Data]
172
- container Database | tech: PostgreSQL
173
- container Cache is a cache | tech: Redis
174
- ```
175
-
176
- ## Tag Groups
177
-
178
- Color-code elements by technology, team, or any custom category:
179
-
180
- ```
181
- tag Technology alias tech
182
- React(blue)
183
- Node.js(green)
184
- PostgreSQL(purple)
185
- Redis(red)
186
-
187
- tag Team alias t
188
- Product(blue) default
189
- Data(orange)
190
- Infrastructure(teal)
191
- ```
192
-
193
- Then reference tags in metadata: `container API | tech: Node.js, t: Product`.
194
-
195
- ## Deployment
196
-
197
- Map containers to infrastructure with the `deployment` section:
198
-
199
- ```
200
- deployment
201
- AWS us-east-1 is a cloud
202
- ECS Cluster
203
- container API
204
- container Worker
205
- RDS is a database
206
- container Database
207
- ElastiCache is a cache
208
- container Cache
209
- ```
210
-
211
- - Nest deployment nodes to any depth
212
- - Use `container Name` to reference a defined container
213
- - Shapes (`is a database`, `is a cloud`) work on deployment nodes too
214
-
215
- ## Comments
216
-
217
- ```
218
- // This line is ignored by the parser
219
- ```
220
-
221
- ## Complete Example
222
-
223
- ```dgmo
224
- c4 SaaS Analytics Platform
225
-
226
- tag Technology alias tech
227
- React(blue)
228
- Node.js(green)
229
- PostgreSQL(purple)
230
- Redis(red)
231
-
232
- tag Team alias t
233
- Product(blue) default
234
- Data(orange)
235
- Infrastructure(teal)
236
-
237
- person End User | description: Views dashboards and creates reports
238
- person Account Admin | description: Manages workspace settings and members
239
-
240
- system Analytics Platform | description: Multi-tenant analytics and reporting
241
- -Serves dashboards to [HTTPS]-> End User
242
- -Provides admin console to [HTTPS]-> Account Admin
243
- ~Sends scheduled reports via [SMTP]~> Email Service
244
-
245
- containers
246
- [Frontend]
247
- container Dashboard App | tech: React, t: Product
248
- description: Interactive data visualization SPA
249
- -Fetches data from [JSON/HTTPS]-> API Gateway
250
-
251
- container Admin Console | tech: React, t: Product
252
- description: Workspace and user management
253
- -Manages settings via [JSON/HTTPS]-> API Gateway
254
-
255
- [Backend]
256
- container API Gateway | tech: Node.js, t: Product
257
- description: REST API serving all frontends
258
- -Reads/writes user data [SQL/TCP]-> App Database
259
- -Reads/writes sessions [TCP]-> Cache
260
- ~Submits analytics queries [AMQP]~> Query Engine
261
-
262
- container Query Engine | tech: Node.js, t: Data
263
- description: Processes analytics queries asynchronously
264
- -Runs queries against [SQL/TCP]-> Data Warehouse
265
- ~Publishes results [AMQP]~> Event Bus
266
-
267
- [Data]
268
- container App Database | tech: PostgreSQL, t: Product
269
- description: Users, workspaces, and dashboard configs
270
-
271
- container Data Warehouse | tech: PostgreSQL, t: Data
272
- description: Aggregated analytics data
273
-
274
- container Cache is a cache | tech: Redis, t: Infrastructure
275
- description: Session store and rate limiter
276
-
277
- container Event Bus | tech: RabbitMQ, t: Infrastructure
278
- description: Async messaging backbone
279
-
280
- system Email Service | description: Transactional email delivery
281
- ~Delivers report emails to~> End User
282
-
283
- deployment
284
- GCP us-central1 is a cloud
285
- Cloud Run — Frontend
286
- container Dashboard App
287
- container Admin Console
288
- Cloud Run — Backend
289
- container API Gateway
290
- container Query Engine
291
- Cloud SQL is a database
292
- container App Database
293
- container Data Warehouse
294
- Memorystore is a cache
295
- container Cache
296
- Cloud Pub/Sub
297
- container Event Bus
298
- ```
@@ -1,43 +0,0 @@
1
- # Chord Diagram
2
-
3
- ```dgmo
4
- chord Pirate Alliance Network
5
-
6
- Blackbeard -> Bonnet 150
7
- Blackbeard -> Vane 80
8
- Blackbeard -> Hornigold 120
9
- Bonnet -> Rackham 40
10
- Vane -> Rackham 60
11
- Rackham -> Bonny 200
12
- Bonny -> Read 180
13
- Roberts -> Davis 90
14
- Roberts -> Anstis 70
15
- Hornigold -> Bonnet 50
16
- ```
17
-
18
- ## Syntax
19
-
20
- ```
21
- chord Chart Title
22
-
23
- Source -> Target value
24
- ```
25
-
26
- ## Metadata Keys
27
-
28
- | Key | Description | Required |
29
- | ------- | ------------------------------------- | -------- |
30
- | `chart` | Must be `chord` | Yes |
31
- | `title` | Chart title displayed above the chart | No |
32
-
33
- ## Data Format
34
-
35
- Each data line defines a connection between two entities with a numeric weight:
36
-
37
- ```
38
- Blackbeard -> Bonnet 150
39
- Blackbeard -> Vane 80
40
- Bonnet -> Rackham 40
41
- ```
42
-
43
- Nodes are arranged around a circle. The width of each chord represents the strength of the connection.
@@ -1,204 +0,0 @@
1
- # Class Diagram
2
-
3
- ```dgmo
4
- class Ship Class Hierarchy
5
-
6
- Vessel [interface]
7
- + sail(): void
8
- + anchor(): void
9
-
10
- Ship implements Vessel [abstract]
11
- # name: string
12
- # crew: number
13
- + getName(): string
14
-
15
- Galleon extends Ship
16
- - cannons: number
17
- + fire(): void
18
-
19
- Sloop extends Ship
20
- - speed: number
21
- + flee(): void
22
-
23
- ShipType [enum]
24
- Galleon
25
- Sloop
26
- Frigate
27
-
28
- Ship -> ShipType : has type
29
- ```
30
-
31
- ## Overview
32
-
33
- Class diagrams render UML-style boxes with three compartments per the UML spec: name, attributes, and methods. Classes connect via relationships like inheritance, composition, and association. Layout is automatic via Dagre.
34
-
35
- ## Syntax
36
-
37
- ```
38
- class Diagram Title
39
-
40
- ClassName [modifier] (color)
41
- + publicField: type
42
- - privateField: type
43
- # protectedField: type
44
- + method(params): returnType
45
-
46
- ChildClass extends ParentClass
47
- + field: type
48
- ```
49
-
50
- ## Settings
51
-
52
- | Key | Description | Default |
53
- | ------- | --------------- | ------- |
54
- | `chart` | Must be `class` | — |
55
- | `title` | Diagram title | None |
56
-
57
- ## Classes
58
-
59
- Declare a class on an unindented line. Members are indented below:
60
-
61
- ```
62
- User
63
- + name: string
64
- + email: string
65
- + login(password: string): boolean
66
- ```
67
-
68
- ### Modifiers
69
-
70
- Add a modifier in brackets to change the class type:
71
-
72
- | Modifier | Syntax | Appearance |
73
- | --------- | ------------------ | --------------------------------------- |
74
- | Interface | `Name [interface]` | `«interface»` badge, blue |
75
- | Abstract | `Name [abstract]` | `«abstract»` badge, italic name, purple |
76
- | Enum | `Name [enum]` | `«enum»` badge, yellow |
77
-
78
- ### Enum Values
79
-
80
- Enum classes list plain values instead of typed fields:
81
-
82
- ```
83
- OrderStatus [enum]
84
- Pending
85
- Confirmed
86
- Shipped
87
- Delivered
88
- ```
89
-
90
- ## Fields and Methods
91
-
92
- Indented lines under a class are parsed as members.
93
-
94
- ### Visibility
95
-
96
- | Symbol | Meaning |
97
- | ------ | --------- |
98
- | `+` | Public |
99
- | `-` | Private |
100
- | `#` | Protected |
101
- | (none) | Public |
102
-
103
- ### Fields
104
-
105
- ```
106
- + name: string
107
- - password: string
108
- # id: number
109
- ```
110
-
111
- ### Methods
112
-
113
- Methods are detected by the presence of parentheses:
114
-
115
- ```
116
- + login(email: string, pass: string): boolean
117
- - validate(): void
118
- + getInstance(): Logger {static}
119
- ```
120
-
121
- Add `{static}` at the end to mark a member as static.
122
-
123
- ## Relationships
124
-
125
- ### Inheritance & Implementation
126
-
127
- Use `extends` or `implements` in the class declaration header:
128
-
129
- ```
130
- Dog extends Animal
131
- + breed: string
132
-
133
- Circle implements Drawable
134
- - radius: number
135
- ```
136
-
137
- This declares the class and establishes the relationship in one line. Members are indented below as usual.
138
-
139
- ### Arrow Syntax
140
-
141
- For other relationships, use arrow notation:
142
-
143
- | Relationship | Arrow | Example |
144
- | -------------- | ------- | ------------------------ |
145
- | Inheritance | `--\|>` | `Dog --\|> Animal` |
146
- | Implementation | `..\|>` | `Dog ..\|> Serializable` |
147
- | Composition | `*--` | `Car *-- Engine` |
148
- | Aggregation | `o--` | `Team o-- Player` |
149
- | Dependency | `..>` | `Service ..> Logger` |
150
- | Association | `->` | `Order -> Customer` |
151
-
152
- ### Labels
153
-
154
- Add a label after a colon:
155
-
156
- ```
157
- Car *-- Engine : powered by
158
- Service ..> Logger : uses
159
- ```
160
-
161
- ## Colors
162
-
163
- Colors are auto-assigned by modifier type. Override with a color name in parentheses:
164
-
165
- ```
166
- Ship (red)
167
- Engine [abstract] (purple)
168
- ```
169
-
170
- ## Comments
171
-
172
- ```
173
- // This line is ignored by the parser
174
- ```
175
-
176
- ## Complete Example
177
-
178
- ```dgmo
179
- class Design Patterns
180
-
181
- Drawable [interface]
182
- + draw(): void
183
- + resize(w: number, h: number): void
184
-
185
- Shape implements Drawable [abstract] (purple)
186
- # x: number
187
- # y: number
188
- + area(): number
189
-
190
- Circle extends Shape
191
- - radius: number
192
- + getRadius(): number
193
-
194
- Rectangle extends Shape
195
- - width: number
196
- - height: number
197
-
198
- Canvas
199
- - shapes: Shape[]
200
- + render(): void
201
-
202
- Canvas *-- Shape : contains
203
- Canvas ..> Logger : uses
204
- ```
@@ -1,156 +0,0 @@
1
- # Cycle Diagram
2
-
3
- ```dgmo
4
- cycle OODA Loop
5
-
6
- Observe | color: blue
7
- Gather raw information from the environment
8
- Monitor unfolding circumstances
9
- -Unfold circumstances-> | color: blue
10
-
11
- Orient | color: green
12
- Analyze and synthesize observations
13
- Form a mental model of the situation
14
- -Form hypothesis-> | color: green
15
-
16
- Decide | color: orange
17
- Select a course of action
18
- -Commit to action-> | color: orange
19
-
20
- Act | color: red
21
- Execute the chosen course of action
22
- Generate results that feed back
23
- -Generate feedback-> | color: red
24
- ```
25
-
26
- ## Overview
27
-
28
- Cycle diagrams show a circular process flow where nodes are arranged on a circle and directed edges connect each to the next, with the last wrapping back to the first. They are ideal for OODA loops, PDCA cycles, product lifecycles, continuous improvement processes, and any workflow that repeats.
29
-
30
- ## Syntax
31
-
32
- ```
33
- cycle Title
34
-
35
- NodeLabel
36
- NodeLabel | color: blue, span: 2
37
- ```
38
-
39
- The first line declares the chart type and title. Each top-level line declares a node. Nodes are positioned around a circle in declaration order.
40
-
41
- ## Nodes
42
-
43
- Every non-indented, non-directive line is a node:
44
-
45
- ```
46
- cycle Seasons
47
-
48
- Spring | color: green
49
- Summer | color: yellow
50
- Autumn | color: orange
51
- Winter | color: blue
52
- ```
53
-
54
- ### Node Pipe Metadata
55
-
56
- | Key | Type | Default | Description |
57
- |-----|------|---------|-------------|
58
- | `color` | palette name | auto | Node fill color |
59
- | `span` | positive number | `1` | Relative arc distance to next node |
60
- | `description` | string | — | One-liner shown below the label |
61
-
62
- ### Descriptions
63
-
64
- Indented lines under a node add description text. Markdown inline formatting is supported (`**bold**`, `*italic*`, `` `code` ``, `[links](url)`). Bullet points with `- item` render as `• item`.
65
-
66
- ```
67
- Observe | color: blue
68
- Gather raw information from the environment
69
- Monitor unfolding circumstances
70
- ```
71
-
72
- If both `| description: text` and indented lines exist, they concatenate (pipe first, then indented).
73
-
74
- ## Edges
75
-
76
- Edges are **implicit** — every node connects to the next, with the last wrapping to the first. The `->` syntax annotates edges with labels, descriptions, and styling:
77
-
78
- ```
79
- Observe | color: blue
80
- -Unfold circumstances-> | color: blue
81
- Synthesize raw data into context
82
-
83
- Orient | color: green
84
- -> | width: 4
85
- ```
86
-
87
- Edge lines are indented under their source node. A label goes between `-` and `->`. Pipe metadata supports `color` and `width`.
88
-
89
- ### Edge Descriptions
90
-
91
- Indented lines under an edge line add description text:
92
-
93
- ```
94
- Observe
95
- -Analyze->
96
- Break down observations into components
97
- Identify **key patterns**
98
- ```
99
-
100
- ## Span
101
-
102
- The `span` metadata controls relative arc distance between nodes. A node with `span: 2` gets twice the arc space to the next node:
103
-
104
- ```
105
- cycle Weighted Process
106
-
107
- Important Step | span: 2
108
- Quick Step
109
- Another Step | span: 1.5
110
- ```
111
-
112
- ## Directives
113
-
114
- | Directive | Effect |
115
- |-----------|--------|
116
- | `direction-counterclockwise` | Reverse cycle direction (default: clockwise) |
117
- | `no-descriptions` | Hide description text on all nodes and edges |
118
- | `circle-nodes` | Render nodes as circles instead of rounded rectangles |
119
-
120
- ```
121
- cycle Simple Loop
122
-
123
- direction-counterclockwise
124
-
125
- Plan
126
- Do
127
- Check
128
- Act
129
- ```
130
-
131
- ## Complete Example
132
-
133
- ```dgmo
134
- cycle PDCA Continuous Improvement
135
-
136
- Plan | color: blue, span: 1.5
137
- Define objectives and processes
138
- Establish expected outcomes
139
- -Start implementation->
140
-
141
- Do | color: green
142
- Execute the plan on a small scale
143
- Collect data for analysis
144
- -Gather results->
145
-
146
- Check | color: orange
147
- Compare results against expectations
148
- Identify deviations and root causes
149
- -Propose changes-> | color: orange
150
-
151
- Act | color: red
152
- Standardize successful changes
153
- Address remaining gaps
154
- -Feed back into planning-> | color: red
155
- Begin the next improvement cycle
156
- ```