@diagrammo/dgmo 0.8.19 → 0.8.21

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 (74) hide show
  1. package/dist/cli.cjs +92 -131
  2. package/dist/editor.cjs +13 -1
  3. package/dist/editor.cjs.map +1 -1
  4. package/dist/editor.js +13 -1
  5. package/dist/editor.js.map +1 -1
  6. package/dist/highlight.cjs +13 -1
  7. package/dist/highlight.cjs.map +1 -1
  8. package/dist/highlight.js +13 -1
  9. package/dist/highlight.js.map +1 -1
  10. package/dist/index.cjs +4524 -1511
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +427 -186
  13. package/dist/index.d.ts +427 -186
  14. package/dist/index.js +4526 -1503
  15. package/dist/index.js.map +1 -1
  16. package/docs/guide/chart-mindmap.md +198 -0
  17. package/docs/guide/chart-sequence.md +23 -1
  18. package/docs/guide/chart-wireframe.md +100 -0
  19. package/docs/guide/index.md +8 -0
  20. package/docs/language-reference.md +210 -2
  21. package/package.json +22 -9
  22. package/src/boxes-and-lines/collapse.ts +21 -3
  23. package/src/boxes-and-lines/layout.ts +51 -9
  24. package/src/boxes-and-lines/parser.ts +16 -4
  25. package/src/boxes-and-lines/renderer.ts +121 -23
  26. package/src/boxes-and-lines/types.ts +1 -0
  27. package/src/c4/parser.ts +8 -7
  28. package/src/class/parser.ts +6 -0
  29. package/src/cli.ts +1 -9
  30. package/src/completion.ts +26 -0
  31. package/src/d3.ts +169 -266
  32. package/src/dgmo-router.ts +103 -5
  33. package/src/diagnostics.ts +16 -6
  34. package/src/echarts.ts +43 -10
  35. package/src/editor/keywords.ts +12 -0
  36. package/src/er/parser.ts +22 -2
  37. package/src/gantt/renderer.ts +2 -2
  38. package/src/graph/flowchart-parser.ts +89 -52
  39. package/src/graph/layout.ts +73 -9
  40. package/src/graph/state-collapse.ts +78 -0
  41. package/src/graph/state-parser.ts +60 -35
  42. package/src/graph/state-renderer.ts +139 -34
  43. package/src/index.ts +41 -16
  44. package/src/infra/parser.ts +9 -2
  45. package/src/kanban/renderer.ts +305 -59
  46. package/src/mindmap/collapse.ts +88 -0
  47. package/src/mindmap/layout.ts +605 -0
  48. package/src/mindmap/parser.ts +379 -0
  49. package/src/mindmap/renderer.ts +543 -0
  50. package/src/mindmap/text-wrap.ts +207 -0
  51. package/src/mindmap/types.ts +55 -0
  52. package/src/palettes/color-utils.ts +4 -12
  53. package/src/palettes/index.ts +0 -4
  54. package/src/render.ts +31 -20
  55. package/src/sequence/parser.ts +7 -2
  56. package/src/sequence/renderer.ts +141 -21
  57. package/src/sharing.ts +2 -0
  58. package/src/sitemap/layout.ts +35 -12
  59. package/src/sitemap/renderer.ts +1 -6
  60. package/src/utils/arrows.ts +180 -11
  61. package/src/utils/d3-types.ts +4 -0
  62. package/src/utils/export-container.ts +3 -2
  63. package/src/utils/legend-constants.ts +0 -4
  64. package/src/utils/legend-d3.ts +1 -0
  65. package/src/utils/legend-layout.ts +2 -2
  66. package/src/utils/parsing.ts +2 -0
  67. package/src/utils/time-ticks.ts +213 -0
  68. package/src/wireframe/layout.ts +460 -0
  69. package/src/wireframe/parser.ts +956 -0
  70. package/src/wireframe/renderer.ts +1293 -0
  71. package/src/wireframe/types.ts +110 -0
  72. package/src/branding.ts +0 -67
  73. package/src/dgmo-mermaid.ts +0 -262
  74. package/src/palettes/mermaid-bridge.ts +0 -220
package/dist/index.d.cts CHANGED
@@ -8,10 +8,164 @@ interface DgmoError {
8
8
  column?: number;
9
9
  message: string;
10
10
  severity: DgmoSeverity;
11
+ /**
12
+ * Optional stable diagnostic code (e.g. 'E_ARROW_SUBSTRING_IN_LABEL').
13
+ * Additive; pre-existing diagnostics omit this field and existing
14
+ * substring-on-`.message` assertions keep working unchanged.
15
+ */
16
+ code?: string;
11
17
  }
12
- declare function makeDgmoError(line: number, message: string, severity?: DgmoSeverity): DgmoError;
18
+ declare function makeDgmoError(line: number, message: string, severity?: DgmoSeverity, code?: string): DgmoError;
13
19
  declare function formatDgmoError(err: DgmoError): string;
14
20
 
21
+ /**
22
+ * Stable diagnostic codes for in-arrow label parsing errors.
23
+ *
24
+ * **Active codes** — emitted by the parser pipeline today:
25
+ * - `ARROW_SUBSTRING_IN_LABEL` (TD-13)
26
+ * - `CONTROL_CHAR_IN_LABEL` (TD-14)
27
+ *
28
+ * **Reserved codes** — declared but NOT currently emitted. These are
29
+ * placeholders for future tightening of the arrow-tokenization rules
30
+ * described in TD-9. Today's chart parsers catch these cases through
31
+ * their own regex machinery with different diagnostics. A follow-up
32
+ * spec that introduces a dedicated tokenizer can start emitting them
33
+ * without changing the public code shape:
34
+ * - `TRAILING_ARROW_TEXT` — extra `->`/`~>` after the primary arrow
35
+ * - `MIXED_ARROW_DELIMITERS` — opening delim type doesn't match arrow
36
+ *
37
+ * See `docs/dgmo-language-spec-decisions.md` → TD-16 for the rationale.
38
+ */
39
+ declare const ARROW_DIAGNOSTIC_CODES: {
40
+ /** Active: label contains `->` or `~>` substring (TD-13). */
41
+ readonly ARROW_SUBSTRING_IN_LABEL: "E_ARROW_SUBSTRING_IN_LABEL";
42
+ /** Active: label contains a forbidden control character (TD-14). */
43
+ readonly CONTROL_CHAR_IN_LABEL: "E_CONTROL_CHAR_IN_LABEL";
44
+ /** Reserved: not currently emitted by any parser. See JSDoc above. */
45
+ readonly TRAILING_ARROW_TEXT: "E_TRAILING_ARROW_TEXT";
46
+ /** Reserved: not currently emitted by any parser. See JSDoc above. */
47
+ readonly MIXED_ARROW_DELIMITERS: "E_MIXED_ARROW_DELIMITERS";
48
+ };
49
+ /**
50
+ * Validate an in-arrow label against the TD-13 and TD-14 character-set
51
+ * contract. Returns diagnostics (possibly empty). Does NOT mutate the label —
52
+ * callers that want a normalized label should trim before calling.
53
+ *
54
+ * TD-13: label must not contain the substrings "->" or "~>".
55
+ * TD-14: label must not contain C0 control chars other than tab, and no DEL.
56
+ */
57
+ declare function validateLabelCharacters(label: string, lineNumber: number): DgmoError[];
58
+ interface ParseInArrowLabelResult {
59
+ /** Cleaned label (trimmed; `undefined` if empty after trim per TD-10). */
60
+ label: string | undefined;
61
+ diagnostics: DgmoError[];
62
+ }
63
+ /**
64
+ * Normalize and validate a raw in-arrow label.
65
+ *
66
+ * Behavior:
67
+ * - Trims leading/trailing whitespace (TD-8: internal whitespace preserved).
68
+ * - Empty-after-trim → `{ label: undefined }` (TD-10 normalization).
69
+ * - TD-13: emits `E_ARROW_SUBSTRING_IN_LABEL` if `->` or `~>` is present.
70
+ * - TD-14: emits `E_CONTROL_CHAR_IN_LABEL` for forbidden control chars.
71
+ *
72
+ * This helper is intentionally chart-agnostic: it operates on an already
73
+ * extracted label string, leaving each chart's existing arrow-finding
74
+ * tokenization in place. TD-11 color-parens is handled inside the
75
+ * flowchart and state `parseArrowToken` functions because those are the
76
+ * only charts that interpret `-(color)->` as a colored edge; they use
77
+ * `matchColorParens()` from this module for the shared lookup.
78
+ */
79
+ declare function parseInArrowLabel(rawLabel: string, lineNumber: number): ParseInArrowLabelResult;
80
+ /**
81
+ * Test whether a string matches the TD-11 color-parens form `(colorName)`
82
+ * where `colorName` is one of the 11 recognized palette color names from
83
+ * `src/colors.ts:RECOGNIZED_COLOR_NAMES`. Returns the lowercase color name
84
+ * on a match, or `null` on fall-through (whole string becomes a label).
85
+ *
86
+ * Used by flowchart and state parsers to keep the color-parens recognition
87
+ * rule in one place — do NOT re-implement the regex in chart parsers.
88
+ */
89
+ declare function matchColorParens(content: string): string | null;
90
+
91
+ /**
92
+ * Compact view state schema (ADR-6).
93
+ * All fields optional. Only non-default values are encoded.
94
+ * `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
95
+ */
96
+ interface CompactViewState {
97
+ tag?: string | null;
98
+ cs?: number[];
99
+ cg?: string[];
100
+ swim?: string | null;
101
+ cl?: string[];
102
+ cc?: string[];
103
+ rm?: string;
104
+ htv?: Record<string, string[]>;
105
+ ha?: string[];
106
+ enl?: number[];
107
+ sem?: boolean;
108
+ cm?: boolean;
109
+ c4l?: string;
110
+ c4s?: string;
111
+ c4c?: string;
112
+ rps?: number;
113
+ spd?: number;
114
+ io?: Record<string, number>;
115
+ hd?: boolean;
116
+ cbd?: boolean;
117
+ }
118
+ interface DecodedDiagramUrl {
119
+ dsl: string;
120
+ viewState: CompactViewState;
121
+ palette?: string;
122
+ theme?: 'light' | 'dark';
123
+ filename?: string;
124
+ }
125
+ interface EncodeDiagramUrlOptions {
126
+ baseUrl?: string;
127
+ viewState?: CompactViewState;
128
+ palette?: string;
129
+ theme?: 'light' | 'dark';
130
+ filename?: string;
131
+ }
132
+ type EncodeDiagramUrlResult = {
133
+ url: string;
134
+ error?: undefined;
135
+ } | {
136
+ url?: undefined;
137
+ error: 'too-large';
138
+ compressedSize: number;
139
+ limit: number;
140
+ };
141
+ /**
142
+ * Encode a CompactViewState to a compressed string for URL embedding.
143
+ * Returns empty string if state has no keys (ADR-4).
144
+ */
145
+ declare function encodeViewState(state: CompactViewState): string;
146
+ /**
147
+ * Decode a compressed view state string back to CompactViewState.
148
+ * Returns empty object on failure (no crash).
149
+ */
150
+ declare function decodeViewState(encoded: string): CompactViewState;
151
+ /**
152
+ * Compress a DGMO DSL string into a shareable URL.
153
+ * Returns `{ url }` on success, or `{ error: 'too-large', compressedSize, limit }` if the
154
+ * compressed payload exceeds the 8 KB limit.
155
+ */
156
+ declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
157
+ /**
158
+ * Decode a DGMO DSL string and view state from a URL query string or hash.
159
+ * Accepts any of:
160
+ * - `?dgmo=<payload>&vs=<state>`
161
+ * - `#dgmo=<payload>&vs=<state>` (backwards compat)
162
+ * - `dgmo=<payload>`
163
+ * - `<bare payload>`
164
+ *
165
+ * Returns `{ dsl, viewState }`. The DSL is empty string on invalid input.
166
+ */
167
+ declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
168
+
15
169
  /**
16
170
  * Render DGMO source to an SVG string.
17
171
  *
@@ -20,13 +174,13 @@ declare function formatDgmoError(err: DgmoError): string;
20
174
  *
21
175
  * @param content - DGMO source text
22
176
  * @param options - Optional theme and palette settings
23
- * @returns SVG string, or empty string on error
177
+ * @returns Object with `svg` (SVG string, empty on error) and `diagnostics` (parse errors/warnings)
24
178
  *
25
179
  * @example
26
180
  * ```ts
27
181
  * import { render } from '@diagrammo/dgmo';
28
182
  *
29
- * const svg = await render(`pie Languages
183
+ * const { svg, diagnostics } = await render(`pie Languages
30
184
  * TypeScript: 45
31
185
  * Python: 30
32
186
  * Rust: 25`);
@@ -35,7 +189,6 @@ declare function formatDgmoError(err: DgmoError): string;
35
189
  declare function render(content: string, options?: {
36
190
  theme?: 'light' | 'dark' | 'transparent';
37
191
  palette?: string;
38
- branding?: boolean;
39
192
  c4Level?: 'context' | 'containers' | 'components' | 'deployment';
40
193
  c4System?: string;
41
194
  c4Container?: string;
@@ -45,7 +198,12 @@ declare function render(content: string, options?: {
45
198
  activeGroup?: string;
46
199
  hiddenAttributes?: string[];
47
200
  };
48
- }): Promise<string>;
201
+ /** View state for export — controls interactive state (collapse, swimlanes, etc.) */
202
+ viewState?: CompactViewState;
203
+ }): Promise<{
204
+ svg: string;
205
+ diagnostics: DgmoError[];
206
+ }>;
49
207
 
50
208
  /**
51
209
  * Extracts the chart type from raw file content.
@@ -156,13 +314,6 @@ declare function hexToHSL(hex: string): {
156
314
  declare function hslToHex(h: number, s: number, l: number): string;
157
315
  /** Convert hex to "H S% L%" string for CSS custom properties. */
158
316
  declare function hexToHSLString(hex: string): string;
159
- /**
160
- * Derive a muted (desaturated, darkened) variant of a color.
161
- * Used by the Mermaid theme generator for dark-mode fills.
162
- *
163
- * Algorithm: cap saturation at 35% and lightness at 36%.
164
- */
165
- declare function mute(hex: string): string;
166
317
  /**
167
318
  * Blend a color toward white (light mode quadrant fills).
168
319
  * amount: 0 = original, 1 = white
@@ -173,6 +324,13 @@ declare function tint(hex: string, amount: number): string;
173
324
  * amount: 0 = original, 1 = base
174
325
  */
175
326
  declare function shade(hex: string, base: string, amount: number): string;
327
+ /**
328
+ * Blend two hex colors by percentage.
329
+ * `pct` = 0 → 100% of `b`, `pct` = 100 → 100% of `a`.
330
+ *
331
+ * Used by all renderers for tinted fills and strokes.
332
+ */
333
+ declare function mix(a: string, b: string, pct: number): string;
176
334
  /**
177
335
  * Pick a text color that contrasts against `bg`.
178
336
  * Returns `darkText` when background is light (luminance > 0.179),
@@ -203,20 +361,6 @@ declare const draculaPalette: PaletteConfig;
203
361
 
204
362
  declare const monokaiPalette: PaletteConfig;
205
363
 
206
- /**
207
- * Generates ~121 Mermaid theme variables from palette tokens.
208
- * Replaces the hardcoded lightThemeVars/darkThemeVars objects.
209
- *
210
- * Dark mode fills use `mute()` to derive desaturated variants
211
- * that are readable with light text.
212
- */
213
- declare function buildMermaidThemeVars(colors: PaletteColors, isDark: boolean): Record<string, string>;
214
- /**
215
- * Generates custom CSS overrides for Mermaid SVGs.
216
- * Handles git graph label backgrounds and dark-mode text readability.
217
- */
218
- declare function buildThemeCSS(palette: PaletteColors, isDark: boolean): string;
219
-
220
364
  type ChartType$1 = 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'polar-area' | 'radar' | 'bar-stacked';
221
365
  interface ChartDataPoint {
222
366
  label: string;
@@ -628,9 +772,12 @@ declare function buildSimpleChartOption(parsed: ParsedChart, palette: PaletteCol
628
772
  * Renders an extended chart (scatter, sankey, chord, function, heatmap, funnel) to SVG using server-side rendering.
629
773
  * Mirrors the `renderForExport` API — returns an SVG string or empty string on failure.
630
774
  */
631
- declare function renderExtendedChartForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors, options?: {
632
- branding?: boolean;
633
- }): Promise<string>;
775
+ declare function renderExtendedChartForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors): Promise<string>;
776
+
777
+ interface D3ExportDimensions {
778
+ width?: number;
779
+ height?: number;
780
+ }
634
781
 
635
782
  /** A single entry inside a tag group: `Value(color)` */
636
783
  interface TagEntry {
@@ -720,7 +867,7 @@ interface VennOverlap {
720
867
  label: string | null;
721
868
  lineNumber: number;
722
869
  }
723
- interface QuadrantLabel$1 {
870
+ interface QuadrantLabel {
724
871
  text: string;
725
872
  color: string | null;
726
873
  lineNumber: number;
@@ -732,16 +879,12 @@ interface QuadrantPoint {
732
879
  lineNumber: number;
733
880
  }
734
881
  interface QuadrantLabels {
735
- topRight: QuadrantLabel$1 | null;
736
- topLeft: QuadrantLabel$1 | null;
737
- bottomLeft: QuadrantLabel$1 | null;
738
- bottomRight: QuadrantLabel$1 | null;
739
- }
740
- /** Optional explicit dimensions for CLI/export rendering (bypasses DOM layout). */
741
- interface D3ExportDimensions {
742
- width?: number;
743
- height?: number;
882
+ topRight: QuadrantLabel | null;
883
+ topLeft: QuadrantLabel | null;
884
+ bottomLeft: QuadrantLabel | null;
885
+ bottomRight: QuadrantLabel | null;
744
886
  }
887
+
745
888
  interface ParsedVisualization {
746
889
  type: VisualizationType | null;
747
890
  title: string | null;
@@ -811,20 +954,6 @@ declare function renderArcDiagram(container: HTMLDivElement, parsed: ParsedVisua
811
954
  * '2024-06-15 14:30' → 'Jun 15, 2024 14:30'
812
955
  */
813
956
  declare function formatDateLabel(dateStr: string): string;
814
- /**
815
- * Computes adaptive tick marks for a timeline scale.
816
- * - Multi-year spans → year ticks
817
- * - Within ~1 year → month ticks
818
- * - Within ~3 months → week ticks (1st, 8th, 15th, 22nd)
819
- *
820
- * Optional boundary parameters add ticks at exact data start/end:
821
- * - boundaryStart/boundaryEnd: numeric date values
822
- * - boundaryStartLabel/boundaryEndLabel: formatted labels for those dates
823
- */
824
- declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d3Scale.ScaleLinear<number, number>, boundaryStart?: number, boundaryEnd?: number, boundaryStartLabel?: string, boundaryEndLabel?: string): {
825
- pos: number;
826
- label: string;
827
- }[];
828
957
  /**
829
958
  * Renders a timeline chart into the given container using D3.
830
959
  * Supports horizontal (default) and vertical orientation.
@@ -844,19 +973,27 @@ declare function renderQuadrant(container: HTMLDivElement, parsed: ParsedVisuali
844
973
  * Renders a D3 chart to an SVG string for export.
845
974
  * Creates a detached DOM element, renders into it, extracts the SVG, then cleans up.
846
975
  */
847
- declare function renderForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors, orgExportState?: {
848
- collapsedNodes?: Set<string>;
849
- activeTagGroup?: string | null;
850
- hiddenAttributes?: Set<string>;
851
- swimlaneTagGroup?: string | null;
852
- }, options?: {
853
- branding?: boolean;
976
+ declare function renderForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors, viewState?: CompactViewState, options?: {
854
977
  c4Level?: 'context' | 'containers' | 'components' | 'deployment';
855
978
  c4System?: string;
856
979
  c4Container?: string;
857
980
  tagGroup?: string;
858
981
  }): Promise<string>;
859
982
 
983
+ /**
984
+ * Generates adaptive tick marks along a time axis.
985
+ * Picks the right granularity (years, months, weeks, days, hours, minutes)
986
+ * based on the domain span.
987
+ *
988
+ * Optional boundary parameters add ticks at exact data start/end:
989
+ * - boundaryStart/boundaryEnd: numeric date values
990
+ * - boundaryStartLabel/boundaryEndLabel: formatted labels for those dates
991
+ */
992
+ declare function computeTimeTicks(domainMin: number, domainMax: number, scale: d3Scale.ScaleLinear<number, number>, boundaryStart?: number, boundaryEnd?: number, boundaryStartLabel?: string, boundaryEndLabel?: string): {
993
+ pos: number;
994
+ label: string;
995
+ }[];
996
+
860
997
  /**
861
998
  * Participant types that can be declared via "Name is a type" syntax.
862
999
  */
@@ -978,48 +1115,6 @@ declare function inferParticipantType(name: string): ParticipantType;
978
1115
  */
979
1116
  declare const RULE_COUNT: number;
980
1117
 
981
- interface QuadrantLabel {
982
- text: string;
983
- color: string | null;
984
- lineNumber: number;
985
- }
986
- interface ParsedQuadrant {
987
- title: string | null;
988
- titleLineNumber: number | null;
989
- xAxis: [string, string] | null;
990
- xAxisLineNumber: number | null;
991
- yAxis: [string, string] | null;
992
- yAxisLineNumber: number | null;
993
- quadrants: {
994
- topRight: QuadrantLabel | null;
995
- topLeft: QuadrantLabel | null;
996
- bottomLeft: QuadrantLabel | null;
997
- bottomRight: QuadrantLabel | null;
998
- };
999
- points: {
1000
- label: string;
1001
- x: number;
1002
- y: number;
1003
- lineNumber: number;
1004
- }[];
1005
- diagnostics: DgmoError[];
1006
- error: string | null;
1007
- }
1008
- /**
1009
- * Parses a .dgmo quadrant document into a structured object.
1010
- * Lines are processed sequentially; unknown lines are silently skipped.
1011
- */
1012
- declare function parseQuadrant(content: string): ParsedQuadrant;
1013
- /**
1014
- * Generates valid Mermaid quadrantChart syntax from a parsed quadrant.
1015
- * Returns a string ready for the Mermaid renderer.
1016
- */
1017
- declare function buildMermaidQuadrant(parsed: ParsedQuadrant, options?: {
1018
- isDark?: boolean;
1019
- textColor?: string;
1020
- mutedTextColor?: string;
1021
- }): string;
1022
-
1023
1118
  type GraphShape = 'terminal' | 'process' | 'decision' | 'io' | 'subroutine' | 'document' | 'state' | 'pseudostate';
1024
1119
  type GraphDirection = 'TB' | 'LR';
1025
1120
  interface GraphNode {
@@ -1174,11 +1269,18 @@ interface LayoutGroup {
1174
1269
  label: string;
1175
1270
  color?: string;
1176
1271
  lineNumber: number;
1272
+ collapsed?: boolean;
1177
1273
  x: number;
1178
1274
  y: number;
1179
1275
  width: number;
1180
1276
  height: number;
1181
1277
  }
1278
+ interface LayoutOptions {
1279
+ /** Map of group ID → number of child nodes (for collapsed groups) */
1280
+ collapsedChildCounts?: Map<string, number>;
1281
+ /** Original groups before collapse (includes collapsed ones) */
1282
+ originalGroups?: GraphGroup[];
1283
+ }
1182
1284
  interface LayoutResult {
1183
1285
  nodes: LayoutNode[];
1184
1286
  edges: LayoutEdge[];
@@ -1186,7 +1288,7 @@ interface LayoutResult {
1186
1288
  width: number;
1187
1289
  height: number;
1188
1290
  }
1189
- declare function layoutGraph(graph: ParsedGraph): LayoutResult;
1291
+ declare function layoutGraph(graph: ParsedGraph, options?: LayoutOptions): LayoutResult;
1190
1292
 
1191
1293
  declare function renderState(container: HTMLDivElement, graph: ParsedGraph, layout: LayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
1192
1294
  width?: number;
@@ -1194,6 +1296,23 @@ declare function renderState(container: HTMLDivElement, graph: ParsedGraph, layo
1194
1296
  }): void;
1195
1297
  declare function renderStateForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
1196
1298
 
1299
+ interface StateCollapseResult {
1300
+ parsed: ParsedGraph;
1301
+ collapsedChildCounts: Map<string, number>;
1302
+ originalGroups: GraphGroup[];
1303
+ }
1304
+ /**
1305
+ * Pure transform: returns a new ParsedGraph with collapsed groups
1306
+ * removed from the diagram content.
1307
+ *
1308
+ * - Children of collapsed groups removed from nodes
1309
+ * - Edges redirected: endpoints in collapsed groups → group ID
1310
+ * - Internal edges (both in same collapsed group) dropped
1311
+ * - Duplicate edges (same source, target, label) deduplicated
1312
+ * - Collapsed groups removed from groups[] (layout handles as nodes)
1313
+ */
1314
+ declare function collapseStateGroups(parsed: ParsedGraph, collapsedGroups: Set<string>): StateCollapseResult;
1315
+
1197
1316
  type ClassModifier = 'abstract' | 'interface' | 'enum';
1198
1317
  type MemberVisibility = 'public' | 'private' | 'protected';
1199
1318
  type RelationshipType = 'extends' | 'implements' | 'composes' | 'aggregates' | 'depends' | 'associates';
@@ -1526,6 +1645,9 @@ interface KanbanInteractiveOptions {
1526
1645
  activeTagGroup?: string | null;
1527
1646
  currentSwimlaneGroup?: string | null;
1528
1647
  onSwimlaneChange?: (group: string | null) => void;
1648
+ collapsedLanes?: Set<string>;
1649
+ collapsedColumns?: Set<string>;
1650
+ compactMeta?: boolean;
1529
1651
  }
1530
1652
  declare function renderKanban(container: HTMLElement, parsed: ParsedKanban, palette: PaletteColors, isDark: boolean, options?: KanbanInteractiveOptions): void;
1531
1653
  declare function renderKanbanForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
@@ -1726,6 +1848,7 @@ interface BLGroup {
1726
1848
  children: string[];
1727
1849
  lineNumber: number;
1728
1850
  metadata: Record<string, string>;
1851
+ parentGroup?: string;
1729
1852
  }
1730
1853
  interface ParsedBoxesAndLines {
1731
1854
  type: 'boxes-and-lines';
@@ -1807,6 +1930,7 @@ declare function renderBoxesAndLinesForExport(container: HTMLDivElement, parsed:
1807
1930
  height: number;
1808
1931
  };
1809
1932
  activeTagGroup?: string | null;
1933
+ hiddenTagValues?: Map<string, Set<string>>;
1810
1934
  }): void;
1811
1935
 
1812
1936
  interface BLCollapseResult {
@@ -2453,6 +2577,205 @@ interface CollapsedOrgResult {
2453
2577
  }
2454
2578
  declare function collapseOrgTree(original: ParsedOrg, collapsedIds: Set<string>): CollapsedOrgResult;
2455
2579
 
2580
+ interface MindmapNode {
2581
+ id: string;
2582
+ label: string;
2583
+ description?: string;
2584
+ metadata: Record<string, string>;
2585
+ children: MindmapNode[];
2586
+ parentId: string | null;
2587
+ lineNumber: number;
2588
+ color?: string;
2589
+ collapsed?: boolean;
2590
+ }
2591
+ interface ParsedMindmap {
2592
+ title: string | null;
2593
+ titleLineNumber: number | null;
2594
+ roots: MindmapNode[];
2595
+ tagGroups: TagGroup[];
2596
+ options: Record<string, string>;
2597
+ diagnostics: DgmoError[];
2598
+ error: string | null;
2599
+ }
2600
+ interface MindmapLayoutNode {
2601
+ id: string;
2602
+ label: string;
2603
+ description?: string;
2604
+ metadata: Record<string, string>;
2605
+ lineNumber: number;
2606
+ color?: string;
2607
+ x: number;
2608
+ y: number;
2609
+ width: number;
2610
+ height: number;
2611
+ depth: number;
2612
+ angle: number;
2613
+ radius: number;
2614
+ hiddenCount?: number;
2615
+ hasChildren?: boolean;
2616
+ }
2617
+ interface MindmapLayoutEdge {
2618
+ sourceId: string;
2619
+ targetId: string;
2620
+ path: string;
2621
+ }
2622
+ interface MindmapLayoutResult {
2623
+ nodes: MindmapLayoutNode[];
2624
+ edges: MindmapLayoutEdge[];
2625
+ width: number;
2626
+ height: number;
2627
+ }
2628
+
2629
+ declare function parseMindmap(content: string, palette?: PaletteColors): ParsedMindmap;
2630
+
2631
+ declare function layoutMindmap(parsed: ParsedMindmap, palette: PaletteColors, options?: {
2632
+ interactive?: boolean;
2633
+ hiddenCounts?: Map<string, number>;
2634
+ activeTagGroup?: string | null;
2635
+ hideDescriptions?: boolean;
2636
+ }): MindmapLayoutResult;
2637
+
2638
+ declare function renderMindmap(container: HTMLDivElement, parsed: ParsedMindmap, layout: MindmapLayoutResult, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: {
2639
+ width?: number;
2640
+ height?: number;
2641
+ }, onToggleNode?: (nodeId: string) => void, hideDescriptions?: boolean, activeTagGroup?: string | null, options?: {
2642
+ colorByDepth?: boolean;
2643
+ onToggleColorByDepth?: (active: boolean) => void;
2644
+ onToggleDescriptions?: (active: boolean) => void;
2645
+ controlsExpanded?: boolean;
2646
+ onToggleControlsExpand?: () => void;
2647
+ }): void;
2648
+ declare function renderMindmapForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
2649
+
2650
+ interface CollapsedMindmapResult {
2651
+ /** Roots with collapsed subtrees pruned (deep-cloned, never mutates original) */
2652
+ roots: MindmapNode[];
2653
+ /** nodeId → count of hidden descendants */
2654
+ hiddenCounts: Map<string, number>;
2655
+ }
2656
+ declare function collapseMindmapTree(roots: MindmapNode[], collapsedIds: Set<string>): CollapsedMindmapResult;
2657
+
2658
+ /**
2659
+ * All wireframe element types.
2660
+ * Visual-mnemonic elements are inferred from bracket syntax;
2661
+ * keyword elements use a small vocabulary (9 keywords).
2662
+ */
2663
+ type WireframeElementType = 'group' | 'textInput' | 'button' | 'dropdown' | 'checkbox' | 'radio' | 'heading' | 'divider' | 'text' | 'listItem' | 'nav' | 'tabs' | 'table' | 'image' | 'modal' | 'skeleton' | 'alert' | 'progress' | 'chart';
2664
+ /**
2665
+ * Single flat interface for all wireframe elements (ADR-8).
2666
+ * No separate WireframeGroup — all elements carry group fields
2667
+ * with sensible defaults (isContainer=false, orientation='vertical', isSkeleton=false).
2668
+ */
2669
+ interface WireframeElement {
2670
+ id: string;
2671
+ type: WireframeElementType;
2672
+ /** Display label / placeholder text / heading text */
2673
+ label: string;
2674
+ /** Child elements (non-empty only when isContainer=true) */
2675
+ children: WireframeElement[];
2676
+ /** Pipe metadata key-value pairs */
2677
+ metadata: Record<string, string>;
2678
+ /** State keywords: disabled, active, ghost, destructive, etc. */
2679
+ states: string[];
2680
+ /** Free-text annotations from pipe metadata */
2681
+ annotations: string[];
2682
+ /** 1-based line number in source */
2683
+ lineNumber: number;
2684
+ /** Measured indentation (column) */
2685
+ indent: number;
2686
+ /** True when element has children (set during parse via indent stack) */
2687
+ isContainer: boolean;
2688
+ /** Stacking direction for group children */
2689
+ orientation: 'vertical' | 'horizontal';
2690
+ /** True when inside a skeleton block */
2691
+ isSkeleton: boolean;
2692
+ /** Heading level: 1 for `#`, 2 for `##` */
2693
+ headingLevel?: number;
2694
+ /** Dropdown options (for type='dropdown') */
2695
+ options?: string[];
2696
+ /** Checked state (for type='checkbox') */
2697
+ checked?: boolean;
2698
+ /** Selected state (for type='radio') */
2699
+ selected?: boolean;
2700
+ /** Image hint: 'default' | 'round' | 'wide' */
2701
+ imageHint?: 'default' | 'round' | 'wide';
2702
+ /** Progress value 0-100 (for type='progress') */
2703
+ progressValue?: number;
2704
+ /** Chart hint: 'line' | 'bar' | 'pie' */
2705
+ chartHint?: 'line' | 'bar' | 'pie';
2706
+ /** Table dimensions for skeleton shorthand (for type='table') */
2707
+ tableRows?: number;
2708
+ tableCols?: number;
2709
+ /** Table header row labels (for type='table') */
2710
+ tableHeaders?: string[];
2711
+ /** Table data rows — each row is an array of cell content strings (for type='table') */
2712
+ tableData?: string[][];
2713
+ /** Inline elements on the same line (multi-element line) */
2714
+ inlineElements?: WireframeElement[];
2715
+ /** Label element for label-field pairing */
2716
+ labelFor?: WireframeElement;
2717
+ /** Color from tag system */
2718
+ color?: string;
2719
+ /** Field variant: password, textarea */
2720
+ fieldVariant?: 'password' | 'textarea';
2721
+ }
2722
+ /** Form factor / layout mode */
2723
+ type WireframeFormFactor = 'desktop' | 'mobile';
2724
+ interface ParsedWireframe {
2725
+ title: string | null;
2726
+ titleLineNumber: number | null;
2727
+ formFactor: WireframeFormFactor;
2728
+ /** Top-level elements (roots of the hierarchy) */
2729
+ roots: WireframeElement[];
2730
+ /** Modal elements (rendered separately below main) */
2731
+ modals: WireframeElement[];
2732
+ tagGroups: TagGroup[];
2733
+ options: Record<string, string>;
2734
+ diagnostics: DgmoError[];
2735
+ error: string | null;
2736
+ }
2737
+
2738
+ declare function parseWireframe(content: string): ParsedWireframe;
2739
+
2740
+ interface WireframeLayoutNode {
2741
+ id: string;
2742
+ x: number;
2743
+ y: number;
2744
+ width: number;
2745
+ height: number;
2746
+ element: WireframeElement;
2747
+ children: WireframeLayoutNode[];
2748
+ /** For label-field pairs: the x offset where fields align */
2749
+ fieldAlignX?: number;
2750
+ }
2751
+ interface WireframeLayout {
2752
+ width: number;
2753
+ height: number;
2754
+ titleHeight: number;
2755
+ nodes: WireframeLayoutNode[];
2756
+ modalNodes: WireframeLayoutNode[];
2757
+ }
2758
+ declare function layoutWireframe(parsed: ParsedWireframe, _options?: Record<string, string>, overrideWidth?: number, showGroupLabels?: boolean): WireframeLayout;
2759
+
2760
+ interface WireframeRenderOptions {
2761
+ exportDims?: {
2762
+ width?: number;
2763
+ height?: number;
2764
+ };
2765
+ theme?: string;
2766
+ onClickItem?: (lineNumber: number) => void;
2767
+ /** Controls group state */
2768
+ controlsExpanded?: boolean;
2769
+ fitWidth?: boolean;
2770
+ showGroupLabels?: boolean;
2771
+ onControlsExpand?: () => void;
2772
+ onControlsToggle?: (id: string, active: boolean) => void;
2773
+ }
2774
+ declare function renderWireframe(container: HTMLDivElement, parsed: ParsedWireframe, layout: WireframeLayout, palette: PaletteColors, isDark: boolean, _onClickItem?: (lineNumber: number) => void, exportDims?: {
2775
+ width?: number;
2776
+ height?: number;
2777
+ }, theme?: string, options?: WireframeRenderOptions): void;
2778
+
2456
2779
  /**
2457
2780
  * Async or sync file reader. Receives an absolute path, returns content.
2458
2781
  * Throwing means "file not found".
@@ -2636,82 +2959,6 @@ declare function resolveColorWithDiagnostic(color: string, line: number, diagnos
2636
2959
  /** @deprecated Use getSeriesColors(palette) from '@/lib/palettes' instead. */
2637
2960
  declare const seriesColors: string[];
2638
2961
 
2639
- /**
2640
- * Compact view state schema (ADR-6).
2641
- * All fields optional. Only non-default values are encoded.
2642
- * `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
2643
- */
2644
- interface CompactViewState {
2645
- tag?: string | null;
2646
- cs?: number[];
2647
- cg?: string[];
2648
- swim?: string | null;
2649
- cl?: string[];
2650
- cc?: string[];
2651
- rm?: string;
2652
- htv?: Record<string, string[]>;
2653
- ha?: string[];
2654
- enl?: number[];
2655
- sem?: boolean;
2656
- cm?: boolean;
2657
- c4l?: string;
2658
- c4s?: string;
2659
- c4c?: string;
2660
- rps?: number;
2661
- spd?: number;
2662
- io?: Record<string, number>;
2663
- }
2664
- interface DecodedDiagramUrl {
2665
- dsl: string;
2666
- viewState: CompactViewState;
2667
- palette?: string;
2668
- theme?: 'light' | 'dark';
2669
- filename?: string;
2670
- }
2671
- interface EncodeDiagramUrlOptions {
2672
- baseUrl?: string;
2673
- viewState?: CompactViewState;
2674
- palette?: string;
2675
- theme?: 'light' | 'dark';
2676
- filename?: string;
2677
- }
2678
- type EncodeDiagramUrlResult = {
2679
- url: string;
2680
- error?: undefined;
2681
- } | {
2682
- url?: undefined;
2683
- error: 'too-large';
2684
- compressedSize: number;
2685
- limit: number;
2686
- };
2687
- /**
2688
- * Encode a CompactViewState to a compressed string for URL embedding.
2689
- * Returns empty string if state has no keys (ADR-4).
2690
- */
2691
- declare function encodeViewState(state: CompactViewState): string;
2692
- /**
2693
- * Decode a compressed view state string back to CompactViewState.
2694
- * Returns empty object on failure (no crash).
2695
- */
2696
- declare function decodeViewState(encoded: string): CompactViewState;
2697
- /**
2698
- * Compress a DGMO DSL string into a shareable URL.
2699
- * Returns `{ url }` on success, or `{ error: 'too-large', compressedSize, limit }` if the
2700
- * compressed payload exceeds the 8 KB limit.
2701
- */
2702
- declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
2703
- /**
2704
- * Decode a DGMO DSL string and view state from a URL query string or hash.
2705
- * Accepts any of:
2706
- * - `?dgmo=<payload>&vs=<state>`
2707
- * - `#dgmo=<payload>&vs=<state>` (backwards compat)
2708
- * - `dgmo=<payload>`
2709
- * - `<bare payload>`
2710
- *
2711
- * Returns `{ dsl, viewState }`. The DSL is empty string on invalid input.
2712
- */
2713
- declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
2714
-
2715
2962
  /**
2716
2963
  * Shared parser utilities — extracted from individual parsers to eliminate
2717
2964
  * duplication of measureIndent, extractColor, header regexes, and
@@ -2731,10 +2978,4 @@ declare function parseFirstLine(line: string): {
2731
2978
  title: string | undefined;
2732
2979
  } | null;
2733
2980
 
2734
- /**
2735
- * Injects `diagrammo.app` branding text into an SVG string.
2736
- * Extends the SVG height by 20px and places the text at the bottom-right.
2737
- */
2738
- declare function injectBranding(svgHtml: string, mutedColor: string): string;
2739
-
2740
- export { ALL_CHART_TYPES, type Activation, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, type MemberVisibility, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedKanban, type ParsedOrg, type ParsedQuadrant, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedVisualization, type ParticipantType, type PipeKeySpec, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type TagEntry, type TagGroup, type VisualizationType, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildMermaidQuadrant, buildMermaidThemeVars, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, buildThemeCSS, calculateSchedule, catppuccinPalette, collapseBoxesAndLines, collapseOrgTree, collapseSitemapTree, collectDiagramRoles, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, formatDateLabel, formatDgmoError, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, injectBranding, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutOrg, layoutSitemap, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, monokaiPalette, mute, nord, nordPalette, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInfra, parseInlineMarkdown, parseKanban, parseOrg, parseQuadrant, parseSequenceDgmo, parseSitemap, parseState, parseTimelineDate, parseVisualization, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTimeline, renderVenn, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra };
2981
+ export { ALL_CHART_TYPES, ARROW_DIAGNOSTIC_CODES, type Activation, type ArcLink, type ArcNodeGroup, type BLCollapseResult, type BLEdge, type BLGroup, type BLLayoutEdge, type BLLayoutGroup, type BLLayoutNode, type BLLayoutResult, type BLNode, type C4ArrowType, type C4DeploymentNode, type C4Element, type C4ElementType, type C4Group, type C4LayoutBoundary, type C4LayoutEdge, type C4LayoutNode, type C4LayoutResult, type C4LegendEntry, type C4LegendGroup, type C4Relationship, type C4Shape, type C4TagEntry, type C4TagGroup, CHART_TYPES, COMPLETION_REGISTRY, type ChartDataPoint, type ChartEra, type ChartType$1 as ChartType, type ClassLayoutEdge, type ClassLayoutNode, type ClassLayoutResult, type ClassMember, type ClassModifier, type ClassNode, type ClassRelationship, type CollapsedMindmapResult, type CollapsedOrgResult, type CollapsedSitemapResult, type CollapsedView, type CompactViewState, type ComputedInfraEdge, type ComputedInfraModel, type ComputedInfraNode, type ContextRelationship, type D3ExportDimensions, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type DiagramSymbols, type DirectiveSpec, type DirectiveValueSpec, type Duration, type DurationUnit, ENTITY_TYPES, type ERCardinality, type ERColumn, type ERConstraint, type ERLayoutEdge, type ERLayoutNode, type ERLayoutResult, type ERRelationship, type ERTable, type ElseIfBranch, type EncodeDiagramUrlOptions, type EncodeDiagramUrlResult, type ExtendedChartType, type ExtractFn, type GanttDependency, type GanttEra, type GanttGroup, type GroupRow as GanttGroupRow, type GanttHolidays, type GanttInteractiveOptions, type LaneHeaderRow as GanttLaneHeaderRow, type GanttMarker, type GanttNode, type GanttOptions, type GanttParallelBlock, type Row as GanttRow, type GanttTask, type TaskRow as GanttTaskRow, type GraphDirection, type GraphEdge, type GraphGroup, type GraphNode, type GraphShape, INFRA_BEHAVIOR_KEYS, type ImportSource, type InfraAvailabilityPercentiles, type InfraBehaviorKey, type InfraCbState, type InfraComputeParams, type InfraDiagnostic, type InfraEdge, type InfraGroup, type InfraLatencyPercentiles, type InfraLayoutEdge, type InfraLayoutGroup, type InfraLayoutNode, type InfraLayoutResult, type InfraLegendGroup, type InfraNode, type InfraPlaybackState, type InfraProperty, type InfraRole, type InfraTagGroup, type InlineSpan, type KanbanCard, type KanbanColumn, type KanbanTagEntry, type KanbanTagGroup, LEGEND_HEIGHT, type LayoutEdge, type LayoutGroup, type LayoutNode, type LayoutOptions, type LayoutResult, type LegendCallbacks, type LegendConfig, type LegendControl, type LegendGroupData, type LegendHandle, type LegendLayout, type LegendMode, type LegendPalette, type LegendPosition, type LegendState, METADATA_KEY_SET, type MemberVisibility, type MindmapLayoutEdge, type MindmapLayoutNode, type MindmapLayoutResult, type MindmapNode, type OrgContainerBounds, type OrgLayoutEdge, type OrgLayoutNode, type OrgLayoutResult, type OrgNode, PIPE_METADATA, type PaletteColors, type PaletteConfig, type ParseInArrowLabelResult, type ParsedBoxesAndLines, type ParsedC4, type ParsedChart, type ParsedClassDiagram, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, RECOGNIZED_COLOR_NAMES, RULE_COUNT, type ReadFileFn, type RelationshipType, type RenderCategory, type RenderStep, type ResolveImportsResult, type ResolvedGroup, type ResolvedSchedule, type ResolvedTask, type ScatterLabelPoint, type SectionMessageGroup, type SequenceBlock, type SequenceElement, type SequenceGroup, type SequenceMessage, type SequenceNote, type SequenceParticipant, type SequenceRenderOptions, type SequenceSection, type SitemapContainerBounds, type SitemapDirection, type SitemapEdge, type SitemapLayoutEdge, type SitemapLayoutNode, type SitemapLayoutResult, type SitemapLegendEntry, type SitemapLegendGroup, type SitemapNode, type StateCollapseResult, type TagEntry, type TagGroup, type VisualizationType, type WireframeElement, type WireframeElementType, type WireframeFormFactor, type WireframeLayout, type WireframeLayoutNode, addDurationToDate, applyCollapseProjection, applyGroupOrdering, applyPositionOverrides, boldPalette, buildExtendedChartOption, buildNoteMessageMap, buildRenderSequence, buildSimpleChartOption, buildTagLaneRowList, calculateSchedule, catppuccinPalette, collapseBoxesAndLines, collapseMindmapTree, collapseOrgTree, collapseSitemapTree, collapseStateGroups, collectDiagramRoles, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, formatDateLabel, formatDgmoError, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRenderCategory, getSeriesColors, getSimpleChartLegendGroups, groupMessagesBySection, gruvboxPalette, hexToHSL, hexToHSLString, hslToHex, inferParticipantType, inferRoles, isArchiveColumn, isExtendedChartType, isRecognizedColorName, isSequenceBlock, isSequenceNote, isValidHex, layoutBoxesAndLines, layoutC4Components, layoutC4Containers, layoutC4Context, layoutC4Deployment, layoutClassDiagram, layoutERDiagram, layoutGraph, layoutInfra, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, mix, monokaiPalette, nord, nordPalette, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseKanban, parseMindmap, parseOrg, parseSequenceDgmo, parseSitemap, parseState, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderQuadrant, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };