@diagrammo/dgmo 0.2.19 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -33
- package/dist/cli.cjs +148 -144
- package/dist/index.cjs +8773 -8072
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -1
- package/dist/index.d.ts +55 -1
- package/dist/index.js +8727 -8028
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chart.ts +40 -9
- package/src/class/parser.ts +37 -6
- package/src/class/renderer.ts +11 -8
- package/src/class/types.ts +4 -0
- package/src/cli.ts +38 -3
- package/src/d3.ts +115 -47
- package/src/dgmo-mermaid.ts +7 -1
- package/src/dgmo-router.ts +67 -4
- package/src/diagnostics.ts +77 -0
- package/src/echarts.ts +23 -14
- package/src/er/layout.ts +49 -7
- package/src/er/parser.ts +31 -4
- package/src/er/renderer.ts +2 -1
- package/src/er/types.ts +3 -0
- package/src/graph/flowchart-parser.ts +34 -4
- package/src/graph/flowchart-renderer.ts +35 -32
- package/src/graph/types.ts +4 -0
- package/src/index.ts +11 -0
- package/src/org/layout.ts +46 -21
- package/src/org/parser.ts +35 -14
- package/src/org/renderer.ts +25 -12
- package/src/org/resolver.ts +470 -0
- package/src/sequence/parser.ts +90 -33
- package/src/sequence/renderer.ts +6 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A diagram markup language — parser, config builder, renderer, and color system.
|
|
4
4
|
|
|
5
|
-
Write plain-text `.dgmo` files and render them as charts, diagrams, and visualizations. Supports 26 chart types
|
|
5
|
+
Write plain-text `.dgmo` files and render them as charts, diagrams, and visualizations. Supports 26 chart types — data charts, structural diagrams, and sequence diagrams. Ships as both a library and a standalone CLI.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -58,47 +58,47 @@ dgmo diagram.dgmo --theme dark --palette catppuccin
|
|
|
58
58
|
|
|
59
59
|
## Supported chart types
|
|
60
60
|
|
|
61
|
-
| Type |
|
|
62
|
-
|
|
63
|
-
| `bar` |
|
|
64
|
-
| `bar-stacked` |
|
|
65
|
-
| `line` |
|
|
66
|
-
| `multi-line` |
|
|
67
|
-
| `area` |
|
|
68
|
-
| `pie` |
|
|
69
|
-
| `doughnut` |
|
|
70
|
-
| `radar` |
|
|
71
|
-
| `polar-area` |
|
|
72
|
-
| `scatter` |
|
|
73
|
-
| `sankey` |
|
|
74
|
-
| `chord` |
|
|
75
|
-
| `function` |
|
|
76
|
-
| `heatmap` |
|
|
77
|
-
| `funnel` |
|
|
78
|
-
| `slope` |
|
|
79
|
-
| `wordcloud` |
|
|
80
|
-
| `arc` |
|
|
81
|
-
| `timeline` |
|
|
82
|
-
| `venn` |
|
|
83
|
-
| `quadrant` |
|
|
84
|
-
| `sequence` |
|
|
85
|
-
| `flowchart` |
|
|
86
|
-
| `class` |
|
|
87
|
-
| `er` |
|
|
88
|
-
| `org` |
|
|
61
|
+
| Type | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `bar` | Vertical/horizontal bar charts |
|
|
64
|
+
| `bar-stacked` | Stacked bar charts |
|
|
65
|
+
| `line` | Line charts with crosshair |
|
|
66
|
+
| `multi-line` | Multi-series line charts |
|
|
67
|
+
| `area` | Filled area charts |
|
|
68
|
+
| `pie` | Pie charts with connector labels |
|
|
69
|
+
| `doughnut` | Doughnut charts |
|
|
70
|
+
| `radar` | Radar/spider charts |
|
|
71
|
+
| `polar-area` | Polar area charts |
|
|
72
|
+
| `scatter` | XY scatter with categories and sizing |
|
|
73
|
+
| `sankey` | Flow diagrams |
|
|
74
|
+
| `chord` | Circular relationship diagrams |
|
|
75
|
+
| `function` | Mathematical function plots |
|
|
76
|
+
| `heatmap` | Matrix heatmaps |
|
|
77
|
+
| `funnel` | Conversion funnels |
|
|
78
|
+
| `slope` | Before/after comparison |
|
|
79
|
+
| `wordcloud` | Weighted text clouds |
|
|
80
|
+
| `arc` | Arc/network diagrams |
|
|
81
|
+
| `timeline` | Timelines with eras and markers |
|
|
82
|
+
| `venn` | Set intersection diagrams |
|
|
83
|
+
| `quadrant` | 2D quadrant scatter |
|
|
84
|
+
| `sequence` | Sequence diagrams with type inference |
|
|
85
|
+
| `flowchart` | Directed graph flowcharts with branching and 6 node shapes |
|
|
86
|
+
| `class` | UML class diagrams with inheritance, composition, and visibility |
|
|
87
|
+
| `er` | Entity-relationship diagrams with crow's foot notation |
|
|
88
|
+
| `org` | Org charts with hierarchy, team containers, and tag group color-coding |
|
|
89
89
|
|
|
90
90
|
## How it works
|
|
91
91
|
|
|
92
|
-
Every `.dgmo` file is plain text with a `chart: <type>` header followed by metadata and data. The library
|
|
92
|
+
Every `.dgmo` file is plain text with a `chart: <type>` header followed by metadata and data. The library parses each chart type and gives you either:
|
|
93
93
|
|
|
94
|
-
- A **
|
|
95
|
-
- A **rendered SVG**
|
|
94
|
+
- A **config object** you render yourself
|
|
95
|
+
- A **rendered SVG** directly
|
|
96
96
|
|
|
97
97
|
```
|
|
98
98
|
parse → build config → render
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
All parsers are pure functions with no DOM dependency.
|
|
101
|
+
All parsers are pure functions with no DOM dependency. The CLI sets up jsdom internally for headless rendering.
|
|
102
102
|
|
|
103
103
|
## Usage
|
|
104
104
|
|