@diagrammo/dgmo 0.8.11 → 0.8.13

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 (68) hide show
  1. package/dist/cli.cjs +115 -719
  2. package/dist/index.cjs +196 -53
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +2 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +194 -54
  7. package/dist/index.js.map +1 -1
  8. package/docs/guide/chart-arc.md +71 -0
  9. package/docs/guide/chart-area.md +73 -0
  10. package/docs/guide/chart-bar-stacked.md +61 -0
  11. package/docs/guide/chart-bar.md +62 -0
  12. package/docs/guide/chart-boxes-and-lines.md +243 -0
  13. package/docs/guide/chart-c4.md +300 -0
  14. package/docs/guide/chart-chord.md +43 -0
  15. package/docs/guide/chart-class.md +204 -0
  16. package/docs/guide/chart-doughnut.md +38 -0
  17. package/docs/guide/chart-er.md +218 -0
  18. package/docs/guide/chart-flowchart.md +102 -0
  19. package/docs/guide/chart-function.md +56 -0
  20. package/docs/guide/chart-funnel.md +38 -0
  21. package/docs/guide/chart-gantt.md +368 -0
  22. package/docs/guide/chart-heatmap.md +41 -0
  23. package/docs/guide/chart-infra.md +694 -0
  24. package/docs/guide/chart-kanban.md +156 -0
  25. package/docs/guide/chart-line.md +79 -0
  26. package/docs/guide/chart-multi-line.md +84 -0
  27. package/docs/guide/chart-org.md +209 -0
  28. package/docs/guide/chart-pie.md +39 -0
  29. package/docs/guide/chart-polar-area.md +38 -0
  30. package/docs/guide/chart-quadrant.md +69 -0
  31. package/docs/guide/chart-radar.md +38 -0
  32. package/docs/guide/chart-sankey.md +103 -0
  33. package/docs/guide/chart-scatter.md +94 -0
  34. package/docs/guide/chart-sequence.md +332 -0
  35. package/docs/guide/chart-sitemap.md +248 -0
  36. package/docs/guide/chart-slope.md +56 -0
  37. package/docs/guide/chart-state.md +171 -0
  38. package/docs/guide/chart-timeline.md +229 -0
  39. package/docs/guide/chart-venn.md +81 -0
  40. package/docs/guide/chart-wordcloud.md +66 -0
  41. package/docs/guide/colors.md +283 -0
  42. package/docs/guide/index.md +55 -0
  43. package/docs/guide/keyboard-shortcuts.md +49 -0
  44. package/docs/guide/registry.json +51 -0
  45. package/gallery/fixtures/boxes-and-lines.dgmo +4 -6
  46. package/gallery/fixtures/er.dgmo +36 -0
  47. package/gallery/fixtures/kanban.dgmo +27 -0
  48. package/package.json +1 -1
  49. package/src/boxes-and-lines/parser.ts +2 -0
  50. package/src/boxes-and-lines/renderer.ts +12 -4
  51. package/src/c4/parser.ts +5 -1
  52. package/src/completion.ts +17 -2
  53. package/src/d3.ts +140 -71
  54. package/src/echarts.ts +1 -1
  55. package/src/er/parser.ts +5 -1
  56. package/src/gantt/parser.ts +8 -0
  57. package/src/gantt/renderer.ts +6 -7
  58. package/src/gantt/types.ts +1 -0
  59. package/src/infra/parser.ts +4 -0
  60. package/src/kanban/parser.ts +4 -1
  61. package/src/kanban/renderer.ts +1 -1
  62. package/src/org/parser.ts +3 -0
  63. package/src/sequence/parser.ts +2 -0
  64. package/src/sequence/renderer.ts +8 -6
  65. package/src/sharing.ts +18 -9
  66. package/src/sitemap/parser.ts +2 -0
  67. package/src/utils/legend-layout.ts +7 -3
  68. package/src/utils/tag-groups.ts +64 -0
@@ -0,0 +1,81 @@
1
+ # Venn Diagram
2
+
3
+ ```dgmo
4
+ venn Pirate Skill Overlap
5
+
6
+ Swordsmanship(red) alias sw
7
+ Navigation(blue) alias nav
8
+ Leadership(green) alias lead
9
+
10
+ sw + nav Sea Raiders
11
+ nav + lead Voyager Captains
12
+ sw + lead Buccaneer Chiefs
13
+ sw + nav + lead Legendary Pirates
14
+ ```
15
+
16
+ ## Syntax
17
+
18
+ ```
19
+ venn Chart Title
20
+
21
+ <name>(<color>) alias <abbrev>
22
+
23
+ <A> + <B> Label
24
+ <A> + <B> + <C> Label
25
+ ```
26
+
27
+ ## Metadata Keys
28
+
29
+ | Key | Description | Required |
30
+ | ------- | --------------------------------------- | -------- |
31
+ | `chart` | Must be `venn` | Yes |
32
+ | `title` | Chart title displayed above the diagram | No |
33
+
34
+ ## Sets
35
+
36
+ Each set is defined as a name with an optional color and alias. 2 or 3 sets are supported.
37
+
38
+ ```
39
+ Swordsmanship(red) alias sw
40
+ Navigation(blue) alias nav
41
+ Leadership(green) alias lead
42
+ ```
43
+
44
+ ### Colors
45
+
46
+ Colors can be specified in parentheses after the name:
47
+
48
+ ```
49
+ Math(blue) alias m
50
+ Science(orange) alias s
51
+ ```
52
+
53
+ Supports named colors: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `teal`, `cyan`, `gray`.
54
+
55
+ ### Aliases
56
+
57
+ Use `alias` to define a short name for intersections:
58
+
59
+ ```
60
+ Swordsmanship(red) alias sw
61
+ Navigation(blue) alias nav
62
+ ```
63
+
64
+ The alias (`sw`, `nav`) is used when defining intersections. The full name is shown in the diagram.
65
+
66
+ ## Intersections
67
+
68
+ Intersection lines use `+` to reference two or three sets by alias, followed by a label:
69
+
70
+ ```
71
+ sw + nav Sea Raiders
72
+ nav + lead Voyager Captains
73
+ sw + nav + lead Legendary Pirates
74
+ ```
75
+
76
+ - The label follows the last set reference (no colon)
77
+ - Set references use the alias, not the full name
78
+
79
+ ## Constraints
80
+
81
+ - Minimum 2 sets, maximum 3 sets
@@ -0,0 +1,66 @@
1
+ # Word Cloud
2
+
3
+ ```dgmo
4
+ wordcloud Pirate Skills
5
+
6
+ swordsmanship 95
7
+ navigation 88
8
+ seamanship 85
9
+ gunnery 80
10
+ leadership 75
11
+ cartography 70
12
+ intimidation 68
13
+ sailing 65
14
+ plundering 60
15
+ knot-tying 55
16
+ lookout 50
17
+ cooking 45
18
+ carpentry 40
19
+ fishing 35
20
+ ```
21
+
22
+ ## Syntax
23
+
24
+ ```
25
+ wordcloud Chart Title
26
+ rotate none
27
+ max 50
28
+ size 14 80
29
+
30
+ Word weight
31
+ ```
32
+
33
+ ## Metadata Keys
34
+
35
+ | Key | Description | Required |
36
+ | -------- | ------------------------------------------------------------------- | -------- |
37
+ | `chart` | Must be `wordcloud` | Yes |
38
+ | `title` | Chart title displayed above the chart | No |
39
+ | `rotate` | Word rotation: `none` (default), `mixed`, or `angled` | No |
40
+ | `max` | Maximum number of words to display (0 = unlimited) | No |
41
+ | `size` | Min and max font size in pixels, space-separated (default: `14 80`) | No |
42
+
43
+ ## Data Format
44
+
45
+ Each data line assigns a weight to a word. Higher weights produce larger text:
46
+
47
+ ```
48
+ swordsmanship 95
49
+ navigation 88
50
+ seamanship 85
51
+ ```
52
+
53
+ ## Body Text Mode
54
+
55
+ You can also paste raw text directly — the word cloud will count word frequencies automatically. Common stop words (a, the, is, etc.) are filtered out.
56
+
57
+ ```dgmo
58
+ wordcloud Gettysburg Address
59
+
60
+ Four score and seven years ago our fathers brought forth
61
+ on this continent a new nation conceived in Liberty and
62
+ dedicated to the proposition that all men are created equal.
63
+ Now we are engaged in a great civil war testing whether
64
+ that nation or any nation so conceived and so dedicated
65
+ can long endure.
66
+ ```
@@ -0,0 +1,283 @@
1
+ # Colors
2
+
3
+ Diagrammo uses named colors throughout. There are two ways colors appear in diagrams: **inline annotations** directly on elements, and **tags** that map metadata values to colors across many elements at once.
4
+
5
+ ## Named Colors
6
+
7
+ Nine color names are available everywhere colors are accepted:
8
+
9
+ <table>
10
+ <tr><th>Name</th><th>Swatch (Nord)</th></tr>
11
+ <tr><td><code>red</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#bf616a;border-radius:3px;vertical-align:middle"></span></td></tr>
12
+ <tr><td><code>orange</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#d08770;border-radius:3px;vertical-align:middle"></span></td></tr>
13
+ <tr><td><code>yellow</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#ebcb8b;border-radius:3px;vertical-align:middle"></span></td></tr>
14
+ <tr><td><code>green</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#a3be8c;border-radius:3px;vertical-align:middle"></span></td></tr>
15
+ <tr><td><code>blue</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#5e81ac;border-radius:3px;vertical-align:middle"></span></td></tr>
16
+ <tr><td><code>purple</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#b48ead;border-radius:3px;vertical-align:middle"></span></td></tr>
17
+ <tr><td><code>teal</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#8fbcbb;border-radius:3px;vertical-align:middle"></span></td></tr>
18
+ <tr><td><code>cyan</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#88c0d0;border-radius:3px;vertical-align:middle"></span></td></tr>
19
+ <tr><td><code>gray</code></td><td><span style="display:inline-block;width:20px;height:20px;background:#4c566a;border-radius:3px;vertical-align:middle"></span></td></tr>
20
+ </table>
21
+
22
+ Swatches above use Nord values. The actual color rendered depends on your active color scheme — see [Color Schemes](#color-schemes) below.
23
+
24
+ ---
25
+
26
+ ## Color Schemes
27
+
28
+ Diagrammo includes ten built-in color schemes. Change yours in **Settings**. The same nine color names resolve to different hex values in each scheme. Swatches show the first six colors (red → purple) for light / dark mode.
29
+
30
+ <table>
31
+ <tr><th>Scheme</th><th style="text-align:center">Light</th><th style="text-align:center">Dark</th></tr>
32
+ <tr>
33
+ <td><strong>Bold</strong></td>
34
+ <td><span style="display:inline-flex;gap:2px;background:#ffffff;padding:4px 6px;border-radius:4px;border:1px solid #cccccc"><span style="display:inline-block;width:14px;height:14px;background:#ff0000;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ff8000;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ffcc00;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#00cc00;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#0000ff;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#cc00cc;border-radius:2px"></span></span></td>
35
+ <td><span style="display:inline-flex;gap:2px;background:#000000;padding:4px 6px;border-radius:4px;border:1px solid #333333"><span style="display:inline-block;width:14px;height:14px;background:#ff0000;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ff8000;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ffff00;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#00ff00;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#0066ff;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ff00ff;border-radius:2px"></span></span></td>
36
+ </tr>
37
+ <tr>
38
+ <td><strong>Catppuccin</strong></td>
39
+ <td><span style="display:inline-flex;gap:2px;background:#eff1f5;padding:4px 6px;border-radius:4px;border:1px solid #ccd0da"><span style="display:inline-block;width:14px;height:14px;background:#d20f39;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fe640b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#df8e1d;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#40a02b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#1e66f5;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#8839ef;border-radius:2px"></span></span></td>
40
+ <td><span style="display:inline-flex;gap:2px;background:#1e1e2e;padding:4px 6px;border-radius:4px;border:1px solid #45475a"><span style="display:inline-block;width:14px;height:14px;background:#f38ba8;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fab387;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#f9e2af;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a6e3a1;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#89b4fa;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#cba6f7;border-radius:2px"></span></span></td>
41
+ </tr>
42
+ <tr>
43
+ <td><strong>Dracula</strong></td>
44
+ <td><span style="display:inline-flex;gap:2px;background:#f8f8f2;padding:4px 6px;border-radius:4px;border:1px solid #d8d8d2"><span style="display:inline-block;width:14px;height:14px;background:#ff5555;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ffb86c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#f1fa8c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#50fa7b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#6272a4;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#bd93f9;border-radius:2px"></span></span></td>
45
+ <td><span style="display:inline-flex;gap:2px;background:#282a36;padding:4px 6px;border-radius:4px;border:1px solid #6272a4"><span style="display:inline-block;width:14px;height:14px;background:#ff5555;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ffb86c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#f1fa8c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#50fa7b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#6272a4;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#bd93f9;border-radius:2px"></span></span></td>
46
+ </tr>
47
+ <tr>
48
+ <td><strong>Gruvbox</strong></td>
49
+ <td><span style="display:inline-flex;gap:2px;background:#fbf1c7;padding:4px 6px;border-radius:4px;border:1px solid #d5c4a1"><span style="display:inline-block;width:14px;height:14px;background:#9d0006;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#af3a03;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b57614;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#79740e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#076678;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#8f3f71;border-radius:2px"></span></span></td>
50
+ <td><span style="display:inline-flex;gap:2px;background:#282828;padding:4px 6px;border-radius:4px;border:1px solid #504945"><span style="display:inline-block;width:14px;height:14px;background:#fb4934;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fe8019;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fabd2f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b8bb26;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#83a598;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#d3869b;border-radius:2px"></span></span></td>
51
+ </tr>
52
+ <tr>
53
+ <td><strong>Monokai</strong></td>
54
+ <td><span style="display:inline-flex;gap:2px;background:#fafaf8;padding:4px 6px;border-radius:4px;border:1px solid #d4d3cc"><span style="display:inline-block;width:14px;height:14px;background:#f92672;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fd971f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#e6db74;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a6e22e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#5c7eab;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ae81ff;border-radius:2px"></span></span></td>
55
+ <td><span style="display:inline-flex;gap:2px;background:#272822;padding:4px 6px;border-radius:4px;border:1px solid #49483e"><span style="display:inline-block;width:14px;height:14px;background:#f92672;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#fd971f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#e6db74;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a6e22e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#5c7eab;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ae81ff;border-radius:2px"></span></span></td>
56
+ </tr>
57
+ <tr>
58
+ <td><strong>Nord</strong></td>
59
+ <td><span style="display:inline-flex;gap:2px;background:#eceff4;padding:4px 6px;border-radius:4px;border:1px solid #d8dee9"><span style="display:inline-block;width:14px;height:14px;background:#bf616a;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#d08770;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ebcb8b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a3be8c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#5e81ac;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b48ead;border-radius:2px"></span></span></td>
60
+ <td><span style="display:inline-flex;gap:2px;background:#2e3440;padding:4px 6px;border-radius:4px;border:1px solid #4c566a"><span style="display:inline-block;width:14px;height:14px;background:#bf616a;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#d08770;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ebcb8b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a3be8c;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#5e81ac;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b48ead;border-radius:2px"></span></span></td>
61
+ </tr>
62
+ <tr>
63
+ <td><strong>One Dark</strong></td>
64
+ <td><span style="display:inline-flex;gap:2px;background:#fafafa;padding:4px 6px;border-radius:4px;border:1px solid #d0d0d0"><span style="display:inline-block;width:14px;height:14px;background:#e45649;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#c18401;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#c18401;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#50a14f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#4078f2;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#a626a4;border-radius:2px"></span></span></td>
65
+ <td><span style="display:inline-flex;gap:2px;background:#282c34;padding:4px 6px;border-radius:4px;border:1px solid #3e4451"><span style="display:inline-block;width:14px;height:14px;background:#e06c75;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#d19a66;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#e5c07b;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#98c379;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#61afef;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#c678dd;border-radius:2px"></span></span></td>
66
+ </tr>
67
+ <tr>
68
+ <td><strong>Rosé Pine</strong></td>
69
+ <td><span style="display:inline-flex;gap:2px;background:#faf4ed;padding:4px 6px;border-radius:4px;border:1px solid #f2e9e1"><span style="display:inline-block;width:14px;height:14px;background:#b4637a;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#d7827e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ea9d34;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#286983;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#56949f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#907aa9;border-radius:2px"></span></span></td>
70
+ <td><span style="display:inline-flex;gap:2px;background:#191724;padding:4px 6px;border-radius:4px;border:1px solid #26233a"><span style="display:inline-block;width:14px;height:14px;background:#eb6f92;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ea9a97;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#f6c177;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#3e8fb0;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#9ccfd8;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#c4a7e7;border-radius:2px"></span></span></td>
71
+ </tr>
72
+ <tr>
73
+ <td><strong>Solarized</strong></td>
74
+ <td><span style="display:inline-flex;gap:2px;background:#fdf6e3;padding:4px 6px;border-radius:4px;border:1px solid #eee8d5"><span style="display:inline-block;width:14px;height:14px;background:#dc322f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#cb4b16;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b58900;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#859900;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#268bd2;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#6c71c4;border-radius:2px"></span></span></td>
75
+ <td><span style="display:inline-flex;gap:2px;background:#002b36;padding:4px 6px;border-radius:4px;border:1px solid #073642"><span style="display:inline-block;width:14px;height:14px;background:#dc322f;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#cb4b16;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b58900;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#859900;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#268bd2;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#6c71c4;border-radius:2px"></span></span></td>
76
+ </tr>
77
+ <tr>
78
+ <td><strong>Tokyo Night</strong></td>
79
+ <td><span style="display:inline-flex;gap:2px;background:#d5d6db;padding:4px 6px;border-radius:4px;border:1px solid #9699a3"><span style="display:inline-block;width:14px;height:14px;background:#f52a65;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#b15c00;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#8c6c3e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#587539;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#2e7de9;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#7847bd;border-radius:2px"></span></span></td>
80
+ <td><span style="display:inline-flex;gap:2px;background:#1a1b26;padding:4px 6px;border-radius:4px;border:1px solid #3b4261"><span style="display:inline-block;width:14px;height:14px;background:#f7768e;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#ff9e64;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#e0af68;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#9ece6a;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#7aa2f7;border-radius:2px"></span><span style="display:inline-block;width:14px;height:14px;background:#bb9af7;border-radius:2px"></span></span></td>
81
+ </tr>
82
+ </table>
83
+
84
+ ---
85
+
86
+ ## Editor vs Export Palette
87
+
88
+ Your editor palette and your export palette don't have to match. You might prefer a dark scheme like Dracula or Tokyo Night while working — easier on the eyes during long sessions — but switch to a light scheme for exports that will end up in presentations, documentation, or shared links.
89
+
90
+ Diagrammo lets you set a separate **Export Color Scheme** in **Settings**. When configured, all exports (PNG, SVG, clipboard, share links) use that palette instead of your editor palette. The export theme (light, dark, or transparent background) is also independent and can be set in the **Export** dialog.
91
+
92
+ If no export palette is set, exports use whatever palette and theme you're currently editing in.
93
+
94
+ ---
95
+
96
+ ## Inline Color Annotations
97
+
98
+ Place a color name in parentheses directly on an element to color it explicitly.
99
+
100
+ ### Flowchart nodes and edges
101
+
102
+ Append `(color)` inside the node definition or on an edge label:
103
+
104
+ ```
105
+ flowchart Request Pipeline
106
+
107
+ (Start(green)) -> [Parse Input] -> <Valid?(blue)>
108
+ -yes(green)-> [Process(teal)] -> (Success(green))
109
+ -no(red)-> [Error Handler(red)] -> /Log Error(orange)/ -> (Failure(red))
110
+ ```
111
+
112
+ Every node shape supports inline color — rounds `()`, rectangles `[]`, diamonds `<>`, parallelograms `//`, and more.
113
+
114
+ ### Timeline eras and markers
115
+
116
+ ```
117
+ timeline Project Roadmap
118
+
119
+ era 2025-01 -> 2025-06 Foundation (blue)
120
+ era 2025-07 -> 2025-12 Growth (green)
121
+
122
+ marker 2025-03 Beta Launch (orange)
123
+ marker 2025-09 GA Release (purple)
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Tags: Color by Metadata
129
+
130
+ Tags let you define named groups of values, assign a color to each value, then annotate your diagram elements with metadata. When a tag group is active, every element is colored by its matching value — without scattering color names throughout the diagram.
131
+
132
+ This is the primary way to color sequence diagrams, org charts, infrastructure diagrams, and timelines.
133
+
134
+ ### Declaring a tag group
135
+
136
+ ```
137
+ tag GroupName alias g
138
+ Value1(blue)
139
+ Value2(green)
140
+ Value3(orange) default
141
+ ```
142
+
143
+ - **`alias g`** — a short alias you use when assigning metadata (optional but recommended)
144
+ - **`(color)`** — the color for that value
145
+ - **`default`** — the fallback value applied to elements that have no explicit tag assignment
146
+
147
+ You can define multiple tag groups in one diagram. Only one group is "active" (coloring the diagram) at a time — the active group is selected in the diagram legend.
148
+
149
+ ### Assigning metadata to elements
150
+
151
+ Use `| key: Value` after any element to attach metadata:
152
+
153
+ ```
154
+ Gateway | t: Platform
155
+ Redis | c: Caching, t: Platform
156
+ ```
157
+
158
+ Multiple metadata keys are separated by commas. Use the tag alias as the key.
159
+
160
+ ### Sequence diagrams
161
+
162
+ Tags color participant boxes, self-messages, and message arrows. Use `active-tag` to set which tag group is shown by default.
163
+
164
+ ```
165
+ sequence API Gateway — Infrastructure Concerns
166
+ active-tag Concern
167
+
168
+ tag Concern alias c
169
+ Caching(blue)
170
+ Auth(green)
171
+ RateLimiting(orange)
172
+ BusinessLogic(purple) default
173
+
174
+ tag Team alias t
175
+ Platform(teal)
176
+ Product(orange)
177
+ Security(red)
178
+
179
+ Mobile is an actor
180
+ Gateway is a gateway | t: Platform
181
+ Redis is a cache | c: Caching, t: Platform
182
+
183
+ [Backend | t: Product]
184
+ UserAPI is a service
185
+ OrderAPI is a service
186
+ DB is a database
187
+
188
+ == Authentication ==
189
+ Mobile -POST /orders-> Gateway
190
+ Gateway -verify token-> Gateway | c: Auth
191
+ Gateway -check rate limit-> Redis | c: RateLimiting
192
+
193
+ == Business Logic ==
194
+ Gateway -POST /orders-> OrderAPI
195
+ OrderAPI -INSERT order-> DB
196
+ OrderAPI -201 Created-> Gateway
197
+
198
+ == Response ==
199
+ Gateway -cache response-> Redis | c: Caching
200
+ Gateway -201 Created-> Mobile
201
+ ```
202
+
203
+ Elements that share a tag value with the active group are highlighted in that color. Elements with no matching tag are shown in a neutral gray.
204
+
205
+ ### Org charts
206
+
207
+ Org charts use tag groups to color nodes by any metadata field — location, seniority, status, team, etc. Switch between views using the legend.
208
+
209
+ ```
210
+ org Acme Corp
211
+
212
+ tag Location
213
+ NY(blue)
214
+ LA(yellow)
215
+ Remote(purple)
216
+
217
+ tag Status
218
+ FTE(green)
219
+ Contractor(orange)
220
+
221
+ Jane Smith
222
+ role: CEO
223
+ location: NY
224
+ status: FTE
225
+
226
+ Alex Chen
227
+ role: CTO
228
+ location: LA
229
+ status: FTE
230
+
231
+ [Platform Team]
232
+ Alice Park
233
+ role: Senior Engineer
234
+ location: NY
235
+ status: FTE
236
+ Bob Torres
237
+ role: Junior Engineer
238
+ location: Remote
239
+ status: Contractor
240
+ ```
241
+
242
+ ### Infrastructure diagrams
243
+
244
+ ```
245
+ infra Production Traffic Flow
246
+
247
+ tag Team alias t
248
+ Backend(blue)
249
+ Platform(teal)
250
+
251
+ CloudFront | t: Platform
252
+ -> CloudArmor
253
+
254
+ CloudArmor | t: Platform
255
+ -> ALB
256
+
257
+ ALB | t: Platform
258
+ -/api-> [API Pods]
259
+
260
+ [API Pods]
261
+ APIServer | t: Backend
262
+ instances: 3
263
+ latency-ms: 45
264
+ ```
265
+
266
+ ### Timeline diagrams
267
+
268
+ Tags in timelines sort and color swim lanes. Use `sort tag:GroupName` to arrange items by tag value.
269
+
270
+ ```
271
+ timeline Product Roadmap 2025
272
+
273
+ tag Team alias t
274
+ Engineering(blue)
275
+ Design(purple)
276
+ Product(green)
277
+
278
+ era 2025-01 -> 2025-06 Phase 1 - Foundation
279
+
280
+ 2025-01->2025-03 Core API Development | t: Engineering
281
+ 2025-01->2025-02 Design System v1 | t: Design
282
+ 2025-02 Competitor Analysis | t: Product
283
+ ```
@@ -0,0 +1,55 @@
1
+ # Welcome to Diagrammo
2
+
3
+ Diagrammo is a diagram editor for creating charts and diagrams with a simple plain-text syntax. Write a few lines of text — get a polished, theme-aware diagram. Available as a [desktop app](https://diagrammo.app/app) and [online editor](https://online.diagrammo.app).
4
+
5
+ Learn more at **[diagrammo.app](https://diagrammo.app)**.
6
+
7
+ ## Getting Started
8
+
9
+ - **Create a new file** using the file tree on the left, or press **Cmd + N**
10
+ - **Write diagram code** in the editor — the preview updates in real time
11
+ - **Export** your diagrams as PNG or SVG
12
+ - **Browse the sidebar** to explore all chart types and features
13
+
14
+ Every diagram starts with the chart type on the first line, followed by your data and options. For example:
15
+
16
+ ```
17
+ bar Q1 Sales
18
+
19
+ Jan: 42
20
+ Feb: 58
21
+ Mar: 71
22
+ ```
23
+
24
+ ## The Diagrammo Ecosystem
25
+
26
+ ### Desktop App
27
+
28
+ A native Mac app for authoring `.dgmo` files with a live preview editor, file tree, and export. Download at [diagrammo.app/app](https://diagrammo.app/app).
29
+
30
+ ### Online Editor
31
+
32
+ The full Diagrammo experience in your browser at [online.diagrammo.app](https://online.diagrammo.app). Your diagrams are stored in your browser's [Origin Private File System (OPFS)](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system) — they persist across sessions, but clearing browser data will remove them.
33
+
34
+ ### CLI Tool
35
+
36
+ The `dgmo` command-line tool renders `.dgmo` files to PNG or SVG from your terminal. Install it via Homebrew:
37
+
38
+ ```bash
39
+ brew tap diagrammo/dgmo
40
+ brew install dgmo
41
+ ```
42
+
43
+ Or run directly with npx:
44
+
45
+ ```bash
46
+ npx @diagrammo/dgmo diagram.dgmo
47
+ ```
48
+
49
+ ### JavaScript / TypeScript Library
50
+
51
+ The `@diagrammo/dgmo` npm package lets you parse and render diagrams programmatically — useful for generating diagrams in build pipelines, servers, or web apps.
52
+
53
+ ```bash
54
+ npm install @diagrammo/dgmo
55
+ ```
@@ -0,0 +1,49 @@
1
+ # Keyboard Shortcuts
2
+
3
+ ## Global
4
+
5
+ | Shortcut | Action |
6
+ | ------------------- | ------------------------- |
7
+ | **⌘ + ,** | Open Settings |
8
+ | **⌘ + 1** | Toggle file tree |
9
+ | **⌘ + 2** | Toggle code editor |
10
+ | **⌘ + Arrow Left** | Focus previous panel |
11
+ | **⌘ + Arrow Right** | Focus next panel |
12
+ | **⌘ + =** | Increase font size |
13
+ | **⌘ + -** | Decrease font size |
14
+ | **⌘ + 0** | Reset font size |
15
+ | **⌘ + S** | Save file |
16
+ | **⌘ + E** | Export diagram |
17
+ | **⌘ + N** | New file |
18
+ | **⌘ + ?** | Keyboard shortcuts |
19
+ | **⌘ + Shift + F** | Focus mode (preview only) |
20
+ | **⌘ + Q** | Quit |
21
+
22
+ ## File Tree
23
+
24
+ | Shortcut | Action |
25
+ | ----------------------- | -------------------------- |
26
+ | **j** / **Arrow Down** | Move down |
27
+ | **k** / **Arrow Up** | Move up |
28
+ | **l** / **Arrow Right** | Expand folder |
29
+ | **h** / **Arrow Left** | Collapse folder |
30
+ | **Enter** / **Space** | Open file or toggle folder |
31
+ | **F2** | Rename |
32
+ | **Delete** | Delete |
33
+ | **⌘ + D** | Duplicate |
34
+
35
+ ## Editor
36
+
37
+ | Shortcut | Action |
38
+ | ----------------- | -------- |
39
+ | **Tab** | Indent |
40
+ | **Shift + Tab** | Unindent |
41
+ | **⌘ + Z** | Undo |
42
+ | **⌘ + Shift + Z** | Redo |
43
+
44
+ ## Dialogs
45
+
46
+ | Shortcut | Action |
47
+ | ---------- | ------- |
48
+ | **Enter** | Confirm |
49
+ | **Escape** | Cancel |
@@ -0,0 +1,51 @@
1
+ {
2
+ "groups": [
3
+ { "id": "getting-started", "label": "Getting Started" },
4
+ { "id": "software", "label": "Software" },
5
+ { "id": "data", "label": "Data" },
6
+ { "id": "business", "label": "Business" },
7
+ { "id": "project", "label": "Project" }
8
+ ],
9
+ "pages": [
10
+ { "slug": "index", "title": "Welcome", "group": "getting-started", "file": "index.md" },
11
+ { "slug": "keyboard-shortcuts", "title": "Keyboard Shortcuts", "group": "getting-started", "file": "keyboard-shortcuts.md" },
12
+ { "slug": "colors", "title": "Colors", "group": "getting-started", "file": "colors.md" },
13
+
14
+ { "slug": "chart-arc", "title": "Arc Diagram", "group": "software", "file": "chart-arc.md" },
15
+ { "slug": "chart-boxes-and-lines", "title": "Boxes and Lines", "group": "software", "file": "chart-boxes-and-lines.md" },
16
+ { "slug": "chart-c4", "title": "C4 Diagram (Beta)", "group": "software", "file": "chart-c4.md" },
17
+ { "slug": "chart-class", "title": "Class Diagram", "group": "software", "file": "chart-class.md" },
18
+ { "slug": "chart-er", "title": "Entity Relationship", "group": "software", "file": "chart-er.md" },
19
+ { "slug": "chart-flowchart", "title": "Flowchart", "group": "software", "file": "chart-flowchart.md" },
20
+ { "slug": "chart-infra", "title": "Infrastructure", "group": "software", "file": "chart-infra.md" },
21
+ { "slug": "chart-sequence", "title": "Sequence Diagram", "group": "software", "file": "chart-sequence.md" },
22
+ { "slug": "chart-sitemap", "title": "Sitemap", "group": "software", "file": "chart-sitemap.md" },
23
+ { "slug": "chart-state", "title": "State Diagram", "group": "software", "file": "chart-state.md" },
24
+
25
+ { "slug": "chart-area", "title": "Area Chart", "group": "data", "file": "chart-area.md" },
26
+ { "slug": "chart-bar", "title": "Bar Chart", "group": "data", "file": "chart-bar.md" },
27
+ { "slug": "chart-chord", "title": "Chord Diagram", "group": "data", "file": "chart-chord.md" },
28
+ { "slug": "chart-doughnut", "title": "Doughnut Chart", "group": "data", "file": "chart-doughnut.md" },
29
+ { "slug": "chart-function", "title": "Function Plot", "group": "data", "file": "chart-function.md" },
30
+ { "slug": "chart-heatmap", "title": "Heatmap", "group": "data", "file": "chart-heatmap.md" },
31
+ { "slug": "chart-line", "title": "Line Chart", "group": "data", "file": "chart-line.md" },
32
+ { "slug": "chart-multi-line", "title": "Multi-Line Chart", "group": "data", "file": "chart-multi-line.md" },
33
+ { "slug": "chart-pie", "title": "Pie Chart", "group": "data", "file": "chart-pie.md" },
34
+ { "slug": "chart-polar-area", "title": "Polar Area Chart", "group": "data", "file": "chart-polar-area.md" },
35
+ { "slug": "chart-radar", "title": "Radar Chart", "group": "data", "file": "chart-radar.md" },
36
+ { "slug": "chart-scatter", "title": "Scatter Plot", "group": "data", "file": "chart-scatter.md" },
37
+ { "slug": "chart-slope", "title": "Slope Chart", "group": "data", "file": "chart-slope.md" },
38
+ { "slug": "chart-bar-stacked", "title": "Stacked Bar Chart", "group": "data", "file": "chart-bar-stacked.md" },
39
+
40
+ { "slug": "chart-funnel", "title": "Funnel Chart", "group": "business", "file": "chart-funnel.md" },
41
+ { "slug": "chart-org", "title": "Org Chart", "group": "business", "file": "chart-org.md" },
42
+ { "slug": "chart-quadrant", "title": "Quadrant Chart", "group": "business", "file": "chart-quadrant.md" },
43
+ { "slug": "chart-sankey", "title": "Sankey Diagram", "group": "business", "file": "chart-sankey.md" },
44
+ { "slug": "chart-venn", "title": "Venn Diagram (Beta)", "group": "business", "file": "chart-venn.md" },
45
+ { "slug": "chart-wordcloud", "title": "Word Cloud", "group": "business", "file": "chart-wordcloud.md" },
46
+
47
+ { "slug": "chart-gantt", "title": "Gantt Chart", "group": "project", "file": "chart-gantt.md" },
48
+ { "slug": "chart-kanban", "title": "Kanban Board", "group": "project", "file": "chart-kanban.md" },
49
+ { "slug": "chart-timeline", "title": "Timeline", "group": "project", "file": "chart-timeline.md" }
50
+ ]
51
+ }
@@ -36,14 +36,13 @@ OrderQueue | t: Platform
36
36
 
37
37
  // --- External ---
38
38
  PaymentGateway | t: Backend, description: Stripe integration
39
- OrderService -charges-> PaymentGateway
40
39
 
41
40
  // --- Consumer ---
42
41
  WebApp | t: Frontend
43
- WebApp -> API Gateway
42
+ -> API Gateway
44
43
 
45
44
  Admin | t: Backend
46
- Admin -> API Gateway
45
+ -> API Gateway
47
46
 
48
47
  // --- Groups ---
49
48
  [AWS us-east-1]
@@ -57,8 +56,7 @@ Admin -> API Gateway
57
56
  ProductDB
58
57
  OrderDB
59
58
 
60
- // --- Group edge ---
59
+ // --- Cross-links (flat form — nodes already declared above) ---
60
+ OrderService -charges-> PaymentGateway
61
61
  OrderQueue -> PaymentGateway
62
-
63
- // --- Bidirectional ---
64
62
  SessionCache <-syncs-> ProductCache | p: Medium