@diagrammo/dgmo 0.8.21 → 0.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -1
- package/README.md +1 -0
- package/dist/cli.cjs +143 -93
- package/dist/editor.cjs +17 -3
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.js +17 -3
- package/dist/editor.js.map +1 -1
- package/dist/highlight.cjs +12 -2
- package/dist/highlight.cjs.map +1 -1
- package/dist/highlight.js +12 -2
- package/dist/highlight.js.map +1 -1
- package/dist/index.cjs +19997 -14886
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +331 -8
- package/dist/index.d.ts +331 -8
- package/dist/index.js +19984 -14889
- package/dist/index.js.map +1 -1
- package/docs/guide/chart-sitemap.md +18 -1
- package/docs/guide/chart-tech-radar.md +219 -0
- package/docs/guide/registry.json +1 -0
- package/docs/language-reference.md +116 -6
- package/gallery/fixtures/boxes-and-lines.dgmo +10 -3
- package/gallery/fixtures/c4-full.dgmo +2 -2
- package/gallery/fixtures/cycle/ooda-loop.dgmo +25 -0
- package/gallery/fixtures/cycle/pdca-circle-nodes.dgmo +12 -0
- package/gallery/fixtures/cycle/pdca-minimal.dgmo +6 -0
- package/gallery/fixtures/cycle/sprint-cycle-span.dgmo +17 -0
- package/gallery/fixtures/gantt-full.dgmo +2 -2
- package/gallery/fixtures/gantt.dgmo +2 -2
- package/gallery/fixtures/infra-full.dgmo +2 -2
- package/gallery/fixtures/infra.dgmo +1 -1
- package/gallery/fixtures/sequence-tags-protocols.dgmo +2 -2
- package/gallery/fixtures/sequence-tags.dgmo +2 -2
- package/gallery/fixtures/tech-radar-dense.dgmo +77 -0
- package/gallery/fixtures/tech-radar.dgmo +36 -0
- package/gallery/fixtures/timeline.dgmo +1 -1
- package/package.json +1 -1
- package/src/boxes-and-lines/layout.ts +309 -33
- package/src/boxes-and-lines/parser.ts +86 -10
- package/src/boxes-and-lines/renderer.ts +250 -91
- package/src/boxes-and-lines/types.ts +1 -1
- package/src/c4/layout.ts +8 -8
- package/src/c4/parser.ts +35 -2
- package/src/c4/renderer.ts +19 -3
- package/src/c4/types.ts +1 -0
- package/src/chart.ts +14 -7
- package/src/completion.ts +227 -0
- package/src/cycle/layout.ts +732 -0
- package/src/cycle/parser.ts +352 -0
- package/src/cycle/renderer.ts +539 -0
- package/src/cycle/types.ts +77 -0
- package/src/d3.ts +87 -8
- package/src/dgmo-router.ts +9 -0
- package/src/echarts.ts +7 -4
- package/src/editor/dgmo.grammar +5 -1
- package/src/editor/dgmo.grammar.js +1 -1
- package/src/editor/keywords.ts +14 -0
- package/src/gantt/parser.ts +2 -8
- package/src/graph/flowchart-parser.ts +15 -21
- package/src/graph/state-parser.ts +5 -10
- package/src/index.ts +50 -0
- package/src/infra/layout.ts +218 -74
- package/src/infra/parser.ts +30 -6
- package/src/infra/renderer.ts +14 -8
- package/src/infra/types.ts +10 -3
- package/src/journey-map/layout.ts +386 -0
- package/src/journey-map/parser.ts +540 -0
- package/src/journey-map/renderer.ts +1456 -0
- package/src/journey-map/types.ts +47 -0
- package/src/kanban/parser.ts +3 -10
- package/src/kanban/renderer.ts +31 -15
- package/src/mindmap/parser.ts +12 -18
- package/src/mindmap/renderer.ts +14 -13
- package/src/mindmap/text-wrap.ts +22 -12
- package/src/mindmap/types.ts +2 -2
- package/src/org/parser.ts +2 -6
- package/src/sequence/renderer.ts +144 -38
- package/src/sharing.ts +1 -0
- package/src/sitemap/layout.ts +21 -6
- package/src/sitemap/parser.ts +26 -17
- package/src/sitemap/renderer.ts +34 -0
- package/src/sitemap/types.ts +1 -0
- package/src/tech-radar/index.ts +14 -0
- package/src/tech-radar/interactive.ts +1058 -0
- package/src/tech-radar/layout.ts +190 -0
- package/src/tech-radar/parser.ts +385 -0
- package/src/tech-radar/renderer.ts +1159 -0
- package/src/tech-radar/shared.ts +187 -0
- package/src/tech-radar/types.ts +81 -0
- package/src/utils/description-helpers.ts +33 -0
- package/src/utils/legend-layout.ts +3 -1
- package/src/utils/parsing.ts +46 -7
- package/src/utils/tag-groups.ts +46 -60
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ interface CompactViewState {
|
|
|
114
114
|
io?: Record<string, number>;
|
|
115
115
|
hd?: boolean;
|
|
116
116
|
cbd?: boolean;
|
|
117
|
+
rq?: string;
|
|
117
118
|
}
|
|
118
119
|
interface DecodedDiagramUrl {
|
|
119
120
|
dsl: string;
|
|
@@ -795,7 +796,7 @@ interface TagGroup {
|
|
|
795
796
|
lineNumber: number;
|
|
796
797
|
}
|
|
797
798
|
|
|
798
|
-
type VisualizationType = 'slope' | 'wordcloud' | 'arc' | 'timeline' | 'venn' | 'quadrant' | 'sequence';
|
|
799
|
+
type VisualizationType = 'slope' | 'wordcloud' | 'arc' | 'timeline' | 'venn' | 'quadrant' | 'sequence' | 'tech-radar' | 'cycle';
|
|
799
800
|
interface D3DataItem {
|
|
800
801
|
label: string;
|
|
801
802
|
values: number[];
|
|
@@ -1676,6 +1677,7 @@ interface C4Element {
|
|
|
1676
1677
|
type: C4ElementType;
|
|
1677
1678
|
shape: C4Shape;
|
|
1678
1679
|
metadata: Record<string, string>;
|
|
1680
|
+
description?: string[];
|
|
1679
1681
|
children: C4Element[];
|
|
1680
1682
|
groups: C4Group[];
|
|
1681
1683
|
relationships: C4Relationship[];
|
|
@@ -1833,7 +1835,7 @@ interface BLNode {
|
|
|
1833
1835
|
label: string;
|
|
1834
1836
|
lineNumber: number;
|
|
1835
1837
|
metadata: Record<string, string>;
|
|
1836
|
-
description?: string;
|
|
1838
|
+
description?: string[];
|
|
1837
1839
|
}
|
|
1838
1840
|
interface BLEdge {
|
|
1839
1841
|
source: string;
|
|
@@ -1912,6 +1914,8 @@ interface BLLayoutResult {
|
|
|
1912
1914
|
declare function layoutBoxesAndLines(parsed: ParsedBoxesAndLines, collapseInfo?: {
|
|
1913
1915
|
collapsedChildCounts: Map<string, number>;
|
|
1914
1916
|
originalGroups: BLGroup[];
|
|
1917
|
+
}, layoutOptions?: {
|
|
1918
|
+
hideDescriptions?: boolean;
|
|
1915
1919
|
}): BLLayoutResult;
|
|
1916
1920
|
|
|
1917
1921
|
interface BLRenderOptions {
|
|
@@ -1922,6 +1926,10 @@ interface BLRenderOptions {
|
|
|
1922
1926
|
};
|
|
1923
1927
|
activeTagGroup?: string | null;
|
|
1924
1928
|
hiddenTagValues?: Map<string, Set<string>>;
|
|
1929
|
+
hideDescriptions?: boolean;
|
|
1930
|
+
controlsExpanded?: boolean;
|
|
1931
|
+
onToggleDescriptions?: (active: boolean) => void;
|
|
1932
|
+
onToggleControlsExpand?: () => void;
|
|
1925
1933
|
}
|
|
1926
1934
|
declare function renderBoxesAndLines(container: HTMLDivElement, parsed: ParsedBoxesAndLines, layout: BLLayoutResult, palette: PaletteColors, isDark: boolean, options?: BLRenderOptions): void;
|
|
1927
1935
|
declare function renderBoxesAndLinesForExport(container: HTMLDivElement, parsed: ParsedBoxesAndLines, layout: BLLayoutResult, palette: PaletteColors, isDark: boolean, options?: {
|
|
@@ -1956,6 +1964,7 @@ interface SitemapNode {
|
|
|
1956
1964
|
metadata: Record<string, string>;
|
|
1957
1965
|
children: SitemapNode[];
|
|
1958
1966
|
parentId: string | null;
|
|
1967
|
+
description?: string[];
|
|
1959
1968
|
/** True for [Group Name] container nodes */
|
|
1960
1969
|
isContainer: boolean;
|
|
1961
1970
|
lineNumber: number;
|
|
@@ -1997,6 +2006,7 @@ interface SitemapLayoutNode {
|
|
|
1997
2006
|
metadata: Record<string, string>;
|
|
1998
2007
|
/** Original (unfiltered) metadata for tag-based coloring and hover dimming */
|
|
1999
2008
|
tagMetadata: Record<string, string>;
|
|
2009
|
+
description?: string[];
|
|
2000
2010
|
isContainer: boolean;
|
|
2001
2011
|
lineNumber: number;
|
|
2002
2012
|
color?: string;
|
|
@@ -2095,7 +2105,7 @@ interface InfraNode {
|
|
|
2095
2105
|
groupId: string | null;
|
|
2096
2106
|
tags: Record<string, string>;
|
|
2097
2107
|
isEdge: boolean;
|
|
2098
|
-
description?: string;
|
|
2108
|
+
description?: string[];
|
|
2099
2109
|
lineNumber: number;
|
|
2100
2110
|
}
|
|
2101
2111
|
interface InfraEdge {
|
|
@@ -2191,7 +2201,7 @@ interface ComputedInfraNode {
|
|
|
2191
2201
|
};
|
|
2192
2202
|
properties: InfraProperty[];
|
|
2193
2203
|
tags: Record<string, string>;
|
|
2194
|
-
description?: string;
|
|
2204
|
+
description?: string[];
|
|
2195
2205
|
lineNumber: number;
|
|
2196
2206
|
}
|
|
2197
2207
|
interface ComputedInfraEdge {
|
|
@@ -2272,7 +2282,7 @@ interface InfraLayoutNode {
|
|
|
2272
2282
|
properties: ComputedInfraNode['properties'];
|
|
2273
2283
|
queueMetrics?: ComputedInfraNode['queueMetrics'];
|
|
2274
2284
|
tags: Record<string, string>;
|
|
2275
|
-
description?: string;
|
|
2285
|
+
description?: string[];
|
|
2276
2286
|
lineNumber: number;
|
|
2277
2287
|
}
|
|
2278
2288
|
interface InfraLayoutEdge {
|
|
@@ -2580,7 +2590,7 @@ declare function collapseOrgTree(original: ParsedOrg, collapsedIds: Set<string>)
|
|
|
2580
2590
|
interface MindmapNode {
|
|
2581
2591
|
id: string;
|
|
2582
2592
|
label: string;
|
|
2583
|
-
description?: string;
|
|
2593
|
+
description?: string[];
|
|
2584
2594
|
metadata: Record<string, string>;
|
|
2585
2595
|
children: MindmapNode[];
|
|
2586
2596
|
parentId: string | null;
|
|
@@ -2600,7 +2610,7 @@ interface ParsedMindmap {
|
|
|
2600
2610
|
interface MindmapLayoutNode {
|
|
2601
2611
|
id: string;
|
|
2602
2612
|
label: string;
|
|
2603
|
-
description?: string;
|
|
2613
|
+
description?: string[];
|
|
2604
2614
|
metadata: Record<string, string>;
|
|
2605
2615
|
lineNumber: number;
|
|
2606
2616
|
color?: string;
|
|
@@ -2776,6 +2786,310 @@ declare function renderWireframe(container: HTMLDivElement, parsed: ParsedWirefr
|
|
|
2776
2786
|
height?: number;
|
|
2777
2787
|
}, theme?: string, options?: WireframeRenderOptions): void;
|
|
2778
2788
|
|
|
2789
|
+
type QuadrantPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2790
|
+
type BlipTrend = 'new' | 'up' | 'down' | 'stable';
|
|
2791
|
+
interface TechRadarRing {
|
|
2792
|
+
name: string;
|
|
2793
|
+
alias: string | null;
|
|
2794
|
+
lineNumber: number;
|
|
2795
|
+
}
|
|
2796
|
+
interface TechRadarBlip {
|
|
2797
|
+
name: string;
|
|
2798
|
+
ring: string;
|
|
2799
|
+
trend: BlipTrend | null;
|
|
2800
|
+
description: string[];
|
|
2801
|
+
lineNumber: number;
|
|
2802
|
+
/** Assigned after parsing — global numbering across all quadrants. */
|
|
2803
|
+
globalNumber: number;
|
|
2804
|
+
}
|
|
2805
|
+
interface TechRadarQuadrant {
|
|
2806
|
+
name: string;
|
|
2807
|
+
position: QuadrantPosition;
|
|
2808
|
+
color: string | null;
|
|
2809
|
+
lineNumber: number;
|
|
2810
|
+
blips: TechRadarBlip[];
|
|
2811
|
+
}
|
|
2812
|
+
interface ParsedTechRadar {
|
|
2813
|
+
type: 'tech-radar';
|
|
2814
|
+
title: string;
|
|
2815
|
+
titleLineNumber: number;
|
|
2816
|
+
rings: TechRadarRing[];
|
|
2817
|
+
quadrants: TechRadarQuadrant[];
|
|
2818
|
+
options: Record<string, string>;
|
|
2819
|
+
diagnostics: DgmoError[];
|
|
2820
|
+
error: string | null;
|
|
2821
|
+
}
|
|
2822
|
+
interface TechRadarLayoutPoint {
|
|
2823
|
+
blip: TechRadarBlip;
|
|
2824
|
+
x: number;
|
|
2825
|
+
y: number;
|
|
2826
|
+
quadrantIndex: number;
|
|
2827
|
+
ringIndex: number;
|
|
2828
|
+
}
|
|
2829
|
+
interface TechRadarRenderOptions {
|
|
2830
|
+
/** Whether the blip listing is visible. Default: true for export, false for interactive. */
|
|
2831
|
+
showListing?: boolean;
|
|
2832
|
+
/** Callback when the listing toggle is clicked. */
|
|
2833
|
+
onToggleListing?: (show: boolean) => void;
|
|
2834
|
+
/** Whether the controls legend capsule is expanded. */
|
|
2835
|
+
controlsExpanded?: boolean;
|
|
2836
|
+
/** Callback when the controls gear pill is clicked (expand/collapse). */
|
|
2837
|
+
onToggleControlsExpand?: () => void;
|
|
2838
|
+
/** Active legend group name (e.g. 'Trends'). */
|
|
2839
|
+
activeLegendGroup?: string | null;
|
|
2840
|
+
/** Callback when a legend group pill is toggled. */
|
|
2841
|
+
onLegendGroupToggle?: (groupName: string) => void;
|
|
2842
|
+
/** Active line from the editor cursor — triggers popover/expansion for that blip. */
|
|
2843
|
+
activeLine?: number | null;
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
declare function parseTechRadar(content: string): ParsedTechRadar;
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* Compute deterministic, non-overlapping blip positions for a tech radar.
|
|
2850
|
+
*
|
|
2851
|
+
* Each blip is positioned within its ring+quadrant slice using polar coordinates,
|
|
2852
|
+
* then converted to cartesian. The algorithm is:
|
|
2853
|
+
* - Stable: changes in one slice don't affect other slices
|
|
2854
|
+
* - Deterministic: same input always produces same output
|
|
2855
|
+
* - Collision-avoiding: nudges overlapping blips radially within their ring band
|
|
2856
|
+
*/
|
|
2857
|
+
declare function computeRadarLayout(parsed: ParsedTechRadar, width: number, height: number): TechRadarLayoutPoint[];
|
|
2858
|
+
/**
|
|
2859
|
+
* Get the center and max radius for a radar at the given dimensions.
|
|
2860
|
+
* Useful for renderers that need these values independently.
|
|
2861
|
+
*/
|
|
2862
|
+
declare function getRadarGeometry(width: number, height: number, ringCount: number): {
|
|
2863
|
+
cx: number;
|
|
2864
|
+
cy: number;
|
|
2865
|
+
maxRadius: number;
|
|
2866
|
+
ringBandWidth: number;
|
|
2867
|
+
};
|
|
2868
|
+
|
|
2869
|
+
declare function renderTechRadar(container: HTMLDivElement, parsed: ParsedTechRadar, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, viewState?: CompactViewState, options?: TechRadarRenderOptions): void;
|
|
2870
|
+
declare function renderTechRadarForExport(container: HTMLDivElement, parsed: ParsedTechRadar, palette: PaletteColors, isDark: boolean, exportDims?: D3ExportDimensions, viewState?: CompactViewState): void;
|
|
2871
|
+
|
|
2872
|
+
declare function renderQuadrantFocus(container: HTMLDivElement, parsed: ParsedTechRadar, quadrantPosition: QuadrantPosition, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, _options?: TechRadarRenderOptions): void;
|
|
2873
|
+
declare function renderQuadrantFocusForExport(container: HTMLDivElement, parsed: ParsedTechRadar, quadrantPosition: QuadrantPosition, palette: PaletteColors, isDark: boolean, exportDims: {
|
|
2874
|
+
width: number;
|
|
2875
|
+
height: number;
|
|
2876
|
+
}): void;
|
|
2877
|
+
|
|
2878
|
+
interface CycleNode {
|
|
2879
|
+
label: string;
|
|
2880
|
+
lineNumber: number;
|
|
2881
|
+
color?: string;
|
|
2882
|
+
span: number;
|
|
2883
|
+
description: string[];
|
|
2884
|
+
metadata: Record<string, string>;
|
|
2885
|
+
}
|
|
2886
|
+
interface CycleEdge {
|
|
2887
|
+
sourceIndex: number;
|
|
2888
|
+
targetIndex: number;
|
|
2889
|
+
label?: string;
|
|
2890
|
+
color?: string;
|
|
2891
|
+
width?: number;
|
|
2892
|
+
description: string[];
|
|
2893
|
+
lineNumber?: number;
|
|
2894
|
+
metadata: Record<string, string>;
|
|
2895
|
+
}
|
|
2896
|
+
interface ParsedCycle {
|
|
2897
|
+
type: 'cycle';
|
|
2898
|
+
title: string;
|
|
2899
|
+
titleLineNumber: number;
|
|
2900
|
+
nodes: CycleNode[];
|
|
2901
|
+
edges: CycleEdge[];
|
|
2902
|
+
direction: 'clockwise' | 'counterclockwise';
|
|
2903
|
+
options: Record<string, string>;
|
|
2904
|
+
diagnostics: DgmoError[];
|
|
2905
|
+
error: string | null;
|
|
2906
|
+
}
|
|
2907
|
+
interface CycleLayoutNode {
|
|
2908
|
+
label: string;
|
|
2909
|
+
x: number;
|
|
2910
|
+
y: number;
|
|
2911
|
+
angle: number;
|
|
2912
|
+
width: number;
|
|
2913
|
+
height: number;
|
|
2914
|
+
/** Pre-wrapped description lines (fit to node width). Empty if no descriptions. */
|
|
2915
|
+
wrappedDesc: string[];
|
|
2916
|
+
/** Whether this node should be rendered as a circle. */
|
|
2917
|
+
isCircle: boolean;
|
|
2918
|
+
}
|
|
2919
|
+
interface CycleLayoutEdge {
|
|
2920
|
+
sourceIndex: number;
|
|
2921
|
+
targetIndex: number;
|
|
2922
|
+
path: string;
|
|
2923
|
+
labelX: number;
|
|
2924
|
+
labelY: number;
|
|
2925
|
+
/** Angle of the label position on the circle (radians), for text-anchor. */
|
|
2926
|
+
labelAngle: number;
|
|
2927
|
+
label?: string;
|
|
2928
|
+
}
|
|
2929
|
+
interface CycleLayoutResult {
|
|
2930
|
+
nodes: CycleLayoutNode[];
|
|
2931
|
+
edges: CycleLayoutEdge[];
|
|
2932
|
+
cx: number;
|
|
2933
|
+
cy: number;
|
|
2934
|
+
radius: number;
|
|
2935
|
+
width: number;
|
|
2936
|
+
height: number;
|
|
2937
|
+
/** Scale factor applied to nodes (1 = no scaling, <1 = shrunk to fit). */
|
|
2938
|
+
scale: number;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
/**
|
|
2942
|
+
* Parse a `.dgmo` cycle diagram document.
|
|
2943
|
+
*
|
|
2944
|
+
* Syntax:
|
|
2945
|
+
* ```
|
|
2946
|
+
* cycle Title
|
|
2947
|
+
*
|
|
2948
|
+
* direction-counterclockwise
|
|
2949
|
+
*
|
|
2950
|
+
* NodeLabel | color: blue, span: 3
|
|
2951
|
+
* Description line (indented under node)
|
|
2952
|
+
* -Label-> | color: red, width: 6
|
|
2953
|
+
* Edge description (indented under edge)
|
|
2954
|
+
* ```
|
|
2955
|
+
*/
|
|
2956
|
+
declare function parseCycle(content: string): ParsedCycle;
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* Compute cycle diagram layout: positions nodes equidistant (or span-weighted)
|
|
2960
|
+
* on a circle, and generates curved edge paths between consecutive nodes.
|
|
2961
|
+
*/
|
|
2962
|
+
declare function computeCycleLayout(parsed: ParsedCycle, options?: {
|
|
2963
|
+
width?: number;
|
|
2964
|
+
height?: number;
|
|
2965
|
+
hideDescriptions?: boolean;
|
|
2966
|
+
}): CycleLayoutResult;
|
|
2967
|
+
|
|
2968
|
+
interface CycleRenderOptions {
|
|
2969
|
+
onClickItem?: (lineNumber: number) => void;
|
|
2970
|
+
exportDims?: D3ExportDimensions;
|
|
2971
|
+
viewState?: CompactViewState;
|
|
2972
|
+
hideDescriptions?: boolean;
|
|
2973
|
+
controlsExpanded?: boolean;
|
|
2974
|
+
onToggleDescriptions?: (active: boolean) => void;
|
|
2975
|
+
onToggleControlsExpand?: () => void;
|
|
2976
|
+
}
|
|
2977
|
+
/**
|
|
2978
|
+
* Render a cycle diagram into the given container.
|
|
2979
|
+
*/
|
|
2980
|
+
declare function renderCycle(container: HTMLDivElement, parsed: ParsedCycle, palette: PaletteColors, isDark: boolean, onClickItem?: (lineNumber: number) => void, exportDims?: D3ExportDimensions, viewState?: CompactViewState, renderOptions?: CycleRenderOptions): void;
|
|
2981
|
+
/**
|
|
2982
|
+
* Render for CLI/export (no click handlers).
|
|
2983
|
+
*/
|
|
2984
|
+
declare function renderCycleForExport(container: HTMLDivElement, parsed: ParsedCycle, palette: PaletteColors, isDark: boolean, exportDims?: D3ExportDimensions, viewState?: CompactViewState): void;
|
|
2985
|
+
|
|
2986
|
+
interface JourneyMapAnnotation {
|
|
2987
|
+
type: 'pain' | 'opportunity' | 'thought';
|
|
2988
|
+
text: string;
|
|
2989
|
+
}
|
|
2990
|
+
interface JourneyMapStep {
|
|
2991
|
+
id: string;
|
|
2992
|
+
title: string;
|
|
2993
|
+
score?: number;
|
|
2994
|
+
emotionLabel?: string;
|
|
2995
|
+
tags: Record<string, string>;
|
|
2996
|
+
annotations: JourneyMapAnnotation[];
|
|
2997
|
+
description?: string;
|
|
2998
|
+
lineNumber: number;
|
|
2999
|
+
endLineNumber: number;
|
|
3000
|
+
}
|
|
3001
|
+
interface JourneyMapPhase {
|
|
3002
|
+
id: string;
|
|
3003
|
+
name: string;
|
|
3004
|
+
steps: JourneyMapStep[];
|
|
3005
|
+
lineNumber: number;
|
|
3006
|
+
}
|
|
3007
|
+
interface JourneyMapPersona {
|
|
3008
|
+
name: string;
|
|
3009
|
+
description?: string;
|
|
3010
|
+
color?: string;
|
|
3011
|
+
lineNumber: number;
|
|
3012
|
+
}
|
|
3013
|
+
interface ParsedJourneyMap {
|
|
3014
|
+
type: 'journey-map';
|
|
3015
|
+
title?: string;
|
|
3016
|
+
titleLineNumber?: number;
|
|
3017
|
+
persona?: JourneyMapPersona;
|
|
3018
|
+
phases: JourneyMapPhase[];
|
|
3019
|
+
/** Flat-mode steps (not inside any phase) */
|
|
3020
|
+
steps: JourneyMapStep[];
|
|
3021
|
+
tagGroups: TagGroup[];
|
|
3022
|
+
options: Record<string, string>;
|
|
3023
|
+
diagnostics: DgmoError[];
|
|
3024
|
+
error: string | null;
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
declare function parseJourneyMap(content: string, palette?: PaletteColors): ParsedJourneyMap;
|
|
3028
|
+
|
|
3029
|
+
interface CurvePoint {
|
|
3030
|
+
x: number;
|
|
3031
|
+
y: number;
|
|
3032
|
+
score: number;
|
|
3033
|
+
emotionLabel?: string;
|
|
3034
|
+
stepIndex: number;
|
|
3035
|
+
}
|
|
3036
|
+
interface StepLayout {
|
|
3037
|
+
x: number;
|
|
3038
|
+
y: number;
|
|
3039
|
+
width: number;
|
|
3040
|
+
height: number;
|
|
3041
|
+
step: JourneyMapStep;
|
|
3042
|
+
color: string;
|
|
3043
|
+
}
|
|
3044
|
+
interface PhaseLayout {
|
|
3045
|
+
x: number;
|
|
3046
|
+
y: number;
|
|
3047
|
+
width: number;
|
|
3048
|
+
height: number;
|
|
3049
|
+
phase: JourneyMapPhase;
|
|
3050
|
+
headerColor: string;
|
|
3051
|
+
stepLayouts: StepLayout[];
|
|
3052
|
+
}
|
|
3053
|
+
interface JourneyMapLayout {
|
|
3054
|
+
phases: PhaseLayout[];
|
|
3055
|
+
flatStepLayouts: StepLayout[];
|
|
3056
|
+
curvePoints: CurvePoint[];
|
|
3057
|
+
totalWidth: number;
|
|
3058
|
+
totalHeight: number;
|
|
3059
|
+
curveAreaTop: number;
|
|
3060
|
+
curveAreaBottom: number;
|
|
3061
|
+
cardAreaTop: number;
|
|
3062
|
+
personaHeight: number;
|
|
3063
|
+
titleHeight: number;
|
|
3064
|
+
/** Whether any step has thought annotations */
|
|
3065
|
+
hasThoughts: boolean;
|
|
3066
|
+
}
|
|
3067
|
+
declare function layoutJourneyMap(parsed: ParsedJourneyMap, palette: PaletteColors, options?: {
|
|
3068
|
+
exportDims?: {
|
|
3069
|
+
width: number;
|
|
3070
|
+
height: number;
|
|
3071
|
+
};
|
|
3072
|
+
collapsedPhases?: Set<string>;
|
|
3073
|
+
}): JourneyMapLayout;
|
|
3074
|
+
|
|
3075
|
+
interface JourneyMapInteractiveOptions {
|
|
3076
|
+
onNavigateToLine?: (line: number) => void;
|
|
3077
|
+
exportDims?: {
|
|
3078
|
+
width: number;
|
|
3079
|
+
height: number;
|
|
3080
|
+
};
|
|
3081
|
+
activeTagGroup?: string | null;
|
|
3082
|
+
onActiveTagGroupChange?: (group: string | null) => void;
|
|
3083
|
+
/** Current editor cursor line — highlights the matching face + card, dims the rest */
|
|
3084
|
+
currentLine?: number | null;
|
|
3085
|
+
/** Set of collapsed phase names */
|
|
3086
|
+
collapsedPhases?: Set<string>;
|
|
3087
|
+
/** Called when a phase is toggled */
|
|
3088
|
+
onPhaseToggle?: (phaseName: string) => void;
|
|
3089
|
+
}
|
|
3090
|
+
declare function renderJourneyMap(container: HTMLElement, parsed: ParsedJourneyMap, palette: PaletteColors, isDark: boolean, options?: JourneyMapInteractiveOptions): void;
|
|
3091
|
+
declare function renderJourneyMapForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette: PaletteColors): string;
|
|
3092
|
+
|
|
2779
3093
|
/**
|
|
2780
3094
|
* Async or sync file reader. Receives an absolute path, returns content.
|
|
2781
3095
|
* Throwing means "file not found".
|
|
@@ -2829,6 +3143,10 @@ interface SequenceRenderOptions {
|
|
|
2829
3143
|
expandedNoteLines?: Set<number>;
|
|
2830
3144
|
exportWidth?: number;
|
|
2831
3145
|
activeTagGroup?: string | null;
|
|
3146
|
+
expandAllNotes?: boolean;
|
|
3147
|
+
onExpandAllNotes?: (expand: boolean) => void;
|
|
3148
|
+
controlsExpanded?: boolean;
|
|
3149
|
+
onToggleControlsExpand?: () => void;
|
|
2832
3150
|
}
|
|
2833
3151
|
/**
|
|
2834
3152
|
* Group messages by the top-level section that precedes them.
|
|
@@ -2887,6 +3205,11 @@ declare function renderSequenceDiagram(container: HTMLDivElement, parsed: Parsed
|
|
|
2887
3205
|
* Used by the app to expand notes when cursor is on the associated message.
|
|
2888
3206
|
*/
|
|
2889
3207
|
declare function buildNoteMessageMap(elements: SequenceElement[]): Map<number, number>;
|
|
3208
|
+
/**
|
|
3209
|
+
* Collect all note line numbers from a sequence diagram's elements.
|
|
3210
|
+
* Used by the app to compute the "expand all" set.
|
|
3211
|
+
*/
|
|
3212
|
+
declare function collectNoteLineNumbers(elements: SequenceElement[]): number[];
|
|
2890
3213
|
|
|
2891
3214
|
interface CollapsedView {
|
|
2892
3215
|
participants: SequenceParticipant[];
|
|
@@ -2978,4 +3301,4 @@ declare function parseFirstLine(line: string): {
|
|
|
2978
3301
|
title: string | undefined;
|
|
2979
3302
|
} | null;
|
|
2980
3303
|
|
|
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 };
|
|
3304
|
+
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 BlipTrend, 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 CycleEdge, type CycleLayoutEdge, type CycleLayoutNode, type CycleLayoutResult, type CycleNode, type CycleRenderOptions, 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 JourneyMapAnnotation, type JourneyMapInteractiveOptions, type JourneyMapLayout, type JourneyMapPersona, type JourneyMapPhase, type JourneyMapStep, 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 ParsedCycle, type ParsedERDiagram, type ParsedExtendedChart, type ParsedGantt, type ParsedGraph, type ParsedInfra, type ParsedJourneyMap, type ParsedKanban, type ParsedMindmap, type ParsedOrg, type ParsedSequenceDgmo, type ParsedSitemap, type ParsedTechRadar, type ParsedVisualization, type ParsedWireframe, type ParticipantType, type PipeKeySpec, type QuadrantPosition, 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 TechRadarBlip, type TechRadarLayoutPoint, type TechRadarQuadrant, type TechRadarRing, 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, collectNoteLineNumbers, collectTasks, colorNames, computeActivations, computeCardArchive, computeCardMove, computeCycleLayout, computeInfra, computeInfraLegendGroups, computeLegendLayout, computeRadarLayout, computeScatterLabelGraphics, computeTimeTicks, contrastText, decodeDiagramUrl, decodeViewState, draculaPalette, encodeDiagramUrl, encodeViewState, extractDiagramSymbols, extractTagDeclarations, formatDateLabel, formatDgmoError, getAvailablePalettes, getExtendedChartLegendGroups, getLegendReservedHeight, getPalette, getRadarGeometry, 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, layoutJourneyMap, layoutMindmap, layoutOrg, layoutSitemap, layoutWireframe, looksLikeClassDiagram, looksLikeERDiagram, looksLikeFlowchart, looksLikeSequence, looksLikeSitemap, looksLikeState, makeDgmoError, matchColorParens, mix, monokaiPalette, nord, nordPalette, oneDarkPalette, orderArcNodes, parseAndLayoutInfra, parseBoxesAndLines, parseC4, parseChart, parseClassDiagram, parseCycle, parseDataRowValues, parseDgmo, parseDgmoChartType, parseERDiagram, parseExtendedChart, parseFirstLine, parseFlowchart, parseGantt, parseInArrowLabel, parseInfra, parseInlineMarkdown, parseJourneyMap, parseKanban, parseMindmap, parseOrg, parseSequenceDgmo, parseSitemap, parseState, parseTechRadar, parseTimelineDate, parseVisualization, parseWireframe, registerExtractor, registerPalette, render, renderArcDiagram, renderBoxesAndLines, renderBoxesAndLinesForExport, renderC4ComponentsForExport, renderC4Containers, renderC4ContainersForExport, renderC4Context, renderC4ContextForExport, renderC4Deployment, renderC4DeploymentForExport, renderClassDiagram, renderClassDiagramForExport, renderCycle, renderCycleForExport, renderERDiagram, renderERDiagramForExport, renderExtendedChartForExport, renderFlowchart, renderFlowchartForExport, renderForExport, renderGantt, renderInfra, renderJourneyMap, renderJourneyMapForExport, renderKanban, renderKanbanForExport, renderLegendD3, renderLegendSvg, renderLegendSvgFromConfig, renderMindmap, renderMindmapForExport, renderOrg, renderOrgForExport, renderQuadrant, renderQuadrantFocus, renderQuadrantFocusForExport, renderSequenceDiagram, renderSitemap, renderSitemapForExport, renderSlopeChart, renderState, renderStateForExport, renderTechRadar, renderTechRadarForExport, renderTimeline, renderVenn, renderWireframe, renderWordCloud, resolveColor, resolveColorWithDiagnostic, resolveOrgImports, resolveTaskName, rollUpContextRelationships, rosePinePalette, seriesColors, shade, solarizedPalette, tint, tokyoNightPalette, truncateBareUrl, validateComputed, validateInfra, validateLabelCharacters };
|