@diagrammo/dgmo 0.61.0 → 0.62.1
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 +1 -1
- package/dist/advanced.d.ts +382 -396
- package/dist/advanced.js +152 -38
- package/dist/auto.js +143 -142
- package/dist/block.js +9 -8
- package/dist/{chart-meta-gUwAzi7N.d.ts → chart-meta-D98NbYDp.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +1 -1
- package/dist/{charts-d3-MN6QCYKU.js → charts-d3-M76E4TZU.js} +5 -5
- package/dist/{chunk-6CWNVQPW.js → chunk-2LN5C6FH.js} +3 -3
- package/dist/{chunk-FXLGBUIQ.js → chunk-34HQALZ5.js} +2 -2
- package/dist/{chunk-OPBZYISB.js → chunk-37EHGTQ2.js} +2204 -2018
- package/dist/{chunk-ZDFIY6WX.js → chunk-3PVUGECM.js} +1 -2
- package/dist/{chunk-XJZCXNWR.js → chunk-BGITRLTR.js} +2 -2
- package/dist/{chunk-3OLO2MZ6.js → chunk-BPINSP65.js} +2 -2
- package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
- package/dist/{chunk-DZZWR6GT.js → chunk-DUHKYKI7.js} +2 -2
- package/dist/{chunk-4B5YISOR.js → chunk-EOYPX6SF.js} +24 -1
- package/dist/{chunk-MOT3NXB5.js → chunk-FVYHDZ6Q.js} +2 -2
- package/dist/{chunk-7FTGNJQ2.js → chunk-GCVTU64J.js} +17 -5
- package/dist/{chunk-S23HOUJS.js → chunk-JU2VMFYC.js} +2 -2
- package/dist/{chunk-CQ7Y3O67.js → chunk-KHTKMVKT.js} +2 -2
- package/dist/{chunk-7BJQUII6.js → chunk-KK5LQIN7.js} +2 -2
- package/dist/{chunk-L43KTQTW.js → chunk-L26ZAPNJ.js} +2 -2
- package/dist/{chunk-LRKGF7RN.js → chunk-L4B4GRVS.js} +2 -2
- package/dist/{chunk-5PWIV7ZF.js → chunk-LFAQ4BLZ.js} +2 -2
- package/dist/{chunk-7QCYHZVO.js → chunk-NQH2Q2RR.js} +2 -2
- package/dist/{chunk-PFGJ7SCM.js → chunk-PUFWYDWP.js} +2 -2
- package/dist/{chunk-BSJIPMPG.js → chunk-QDPMTFB4.js} +45 -32
- package/dist/chunk-RU2HHHYA.js +23 -0
- package/dist/{chunk-SMHTYVMK.js → chunk-RZRMSNO7.js} +2 -2
- package/dist/{chunk-HJ6TMHQG.js → chunk-SV7F363F.js} +2 -2
- package/dist/{chunk-YJCILMEA.js → chunk-U22TKD3L.js} +2 -2
- package/dist/{chunk-2WPLOS4Q.js → chunk-USHDV2AF.js} +2 -2
- package/dist/{chunk-DNSEG6P2.js → chunk-WMHHNK44.js} +2 -2
- package/dist/{chunk-4BEAHH6G.js → chunk-XXDEQSW4.js} +2 -2
- package/dist/{chunk-NEV5IW33.js → chunk-YVI3JL3S.js} +2 -2
- package/dist/{registry-Ch0Umdi1.d.ts → dgmo-router-Dd5PTjxl.d.ts} +98 -98
- package/dist/{dgmo-router-UVYAJCAF.js → dgmo-router-Z5N6QLIC.js} +2 -2
- package/dist/{dimensions-QCPOPPKE.js → dimensions-ES6O2T4H.js} +4 -4
- package/dist/element.js +144 -143
- package/dist/{flowchart-renderer-XFDCX7MZ.js → flowchart-renderer-BCVCIZHF.js} +3 -3
- package/dist/index.d.ts +21 -10
- package/dist/index.js +13 -23
- package/dist/{renderer-CXRSD26Q.js → renderer-4VDSMPYU.js} +4 -4
- package/dist/{renderer-62FFDWMY.js → renderer-5HYDLCMX.js} +3 -3
- package/dist/{renderer-XSHOMUJQ.js → renderer-726UVOKE.js} +3 -3
- package/dist/{renderer-IYMA5W7X.js → renderer-A5GFW2XH.js} +4 -4
- package/dist/{renderer-VYMTBSF4.js → renderer-HPQJRSON.js} +3 -3
- package/dist/{renderer-GESKWINV.js → renderer-K3TH5PP7.js} +4 -4
- package/dist/{renderer-4RQ5PGHY.js → renderer-KHVAM4IY.js} +3 -3
- package/dist/{renderer-2PGIIOFN.js → renderer-KKNXTTFE.js} +5 -5
- package/dist/{renderer-IG5PQXEM.js → renderer-PKST5W6U.js} +4 -4
- package/dist/{renderer-R6OKKSVR.js → renderer-Q2YHQQSN.js} +4 -4
- package/dist/{renderer-6QW5OAJG.js → renderer-TTMBG2N6.js} +2 -2
- package/dist/{renderer-AS6LLDZM.js → renderer-XDL6PRLN.js} +3 -3
- package/dist/{renderer-63MLWS6L.js → renderer-XIJO7DYS.js} +3 -3
- package/dist/{resolver-W3WKLWDP.js → resolver-B3TXWNWF.js} +3 -3
- package/dist/{state-renderer-GBHDOEXR.js → state-renderer-MCWCZ76U.js} +3 -3
- package/dist/{themes-DC6u80yr.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
- package/docs/ai-integration.md +5 -5
- package/fonts/Inter-Bold.ttf +0 -0
- package/fonts/Inter-Bold.woff2 +0 -0
- package/fonts/Inter-Regular.ttf +0 -0
- package/fonts/Inter-Regular.woff2 +0 -0
- package/package.json +8 -23
- package/.claude/commands/dgmo-codebase-report.md +0 -172
- package/.claude/commands/dgmo-diagram-this.md +0 -60
- package/.claude/commands/dgmo-document-project.md +0 -128
- package/.claude/commands/dgmo.md +0 -313
- package/.cursorrules +0 -587
- package/.github/copilot-instructions.md +0 -597
- package/.windsurfrules +0 -587
- package/SKILL.md +0 -573
- package/dist/auto.d.ts +0 -60
- package/dist/auto.mjs +0 -88466
- package/dist/chunk-6MTWIQVO.js +0 -121
- package/dist/chunk-NZ5QVASG.js +0 -20
- package/dist/cli.cjs +0 -489
- package/dist/element.d.ts +0 -68
- package/dist/element.mjs +0 -88332
- package/dist/load-data-EHDDZ5ZS.js +0 -8
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-6VJCURWU.js";
|
|
21
21
|
import {
|
|
22
22
|
serializeSvg
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RU2HHHYA.js";
|
|
24
24
|
import {
|
|
25
25
|
TITLE_FONT_SIZE,
|
|
26
26
|
TITLE_FONT_WEIGHT,
|
|
@@ -603,4 +603,4 @@ export {
|
|
|
603
603
|
renderERDiagram,
|
|
604
604
|
renderERDiagramForExport
|
|
605
605
|
};
|
|
606
|
-
//# sourceMappingURL=chunk-
|
|
606
|
+
//# sourceMappingURL=chunk-XXDEQSW4.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-3CIOJ5YJ.js";
|
|
17
17
|
import {
|
|
18
18
|
formatDateLabel
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BPINSP65.js";
|
|
20
20
|
import {
|
|
21
21
|
layoutInlineHeader
|
|
22
22
|
} from "./chunk-6VJCURWU.js";
|
|
@@ -1157,4 +1157,4 @@ export {
|
|
|
1157
1157
|
focusEventLine,
|
|
1158
1158
|
renderEventLineForExport
|
|
1159
1159
|
};
|
|
1160
|
-
//# sourceMappingURL=chunk-
|
|
1160
|
+
//# sourceMappingURL=chunk-YVI3JL3S.js.map
|
|
@@ -58,6 +58,86 @@ interface EmitOptions {
|
|
|
58
58
|
declare function emit(spec: DiagnosticSpec, line: number, params?: DiagnosticParams, opts?: EmitOptions): DgmoError;
|
|
59
59
|
declare function formatDgmoError(err: DgmoError): string;
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Compact view state schema (ADR-6).
|
|
63
|
+
* All fields optional. Only non-default values are encoded.
|
|
64
|
+
* `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
|
|
65
|
+
*/
|
|
66
|
+
interface CompactViewState {
|
|
67
|
+
tag?: string | null;
|
|
68
|
+
cs?: number[];
|
|
69
|
+
cg?: string[];
|
|
70
|
+
swim?: string | null;
|
|
71
|
+
cl?: string[];
|
|
72
|
+
cc?: string[];
|
|
73
|
+
rm?: string;
|
|
74
|
+
htv?: Record<string, string[]>;
|
|
75
|
+
ha?: string[];
|
|
76
|
+
sem?: boolean;
|
|
77
|
+
cm?: boolean;
|
|
78
|
+
c4l?: string;
|
|
79
|
+
c4s?: string;
|
|
80
|
+
c4c?: string;
|
|
81
|
+
rps?: number;
|
|
82
|
+
spd?: number;
|
|
83
|
+
io?: Record<string, number>;
|
|
84
|
+
hd?: boolean;
|
|
85
|
+
cbd?: boolean;
|
|
86
|
+
rq?: string;
|
|
87
|
+
an?: boolean;
|
|
88
|
+
fl?: boolean;
|
|
89
|
+
}
|
|
90
|
+
interface DecodedDiagramUrl {
|
|
91
|
+
dsl: string;
|
|
92
|
+
viewState: CompactViewState;
|
|
93
|
+
palette?: string;
|
|
94
|
+
theme?: 'light' | 'dark';
|
|
95
|
+
filename?: string;
|
|
96
|
+
}
|
|
97
|
+
interface EncodeDiagramUrlOptions {
|
|
98
|
+
baseUrl?: string;
|
|
99
|
+
viewState?: CompactViewState;
|
|
100
|
+
palette?: string;
|
|
101
|
+
theme?: 'light' | 'dark';
|
|
102
|
+
filename?: string;
|
|
103
|
+
}
|
|
104
|
+
type EncodeDiagramUrlResult = {
|
|
105
|
+
url: string;
|
|
106
|
+
error?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
url?: undefined;
|
|
109
|
+
error: 'too-large';
|
|
110
|
+
compressedSize: number;
|
|
111
|
+
limit: number;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Encode a CompactViewState to a compressed string for URL embedding.
|
|
115
|
+
* Returns empty string if state has no keys (ADR-4).
|
|
116
|
+
*/
|
|
117
|
+
declare function encodeViewState(state: CompactViewState): string;
|
|
118
|
+
/**
|
|
119
|
+
* Decode a compressed view state string back to CompactViewState.
|
|
120
|
+
* Returns empty object on failure (no crash).
|
|
121
|
+
*/
|
|
122
|
+
declare function decodeViewState(encoded: string): CompactViewState;
|
|
123
|
+
/**
|
|
124
|
+
* Compress a DGMO DSL string into a shareable URL.
|
|
125
|
+
* Returns `{ url }` on success, or `{ error: 'too-large', compressedSize, limit }` if the
|
|
126
|
+
* compressed payload exceeds the 8 KB limit.
|
|
127
|
+
*/
|
|
128
|
+
declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
|
|
129
|
+
/**
|
|
130
|
+
* Decode a DGMO DSL string and view state from a URL query string or hash.
|
|
131
|
+
* Accepts any of:
|
|
132
|
+
* - `?dgmo=<payload>&vs=<state>`
|
|
133
|
+
* - `#dgmo=<payload>&vs=<state>` (backwards compat)
|
|
134
|
+
* - `dgmo=<payload>`
|
|
135
|
+
* - `<bare payload>`
|
|
136
|
+
*
|
|
137
|
+
* Returns `{ dsl, viewState }`. The DSL is empty string on invalid input.
|
|
138
|
+
*/
|
|
139
|
+
declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
|
|
140
|
+
|
|
61
141
|
/**
|
|
62
142
|
* Color definitions for a single mode (light or dark).
|
|
63
143
|
* 10 semantic UI colors + 9 named accent colors = 19 total.
|
|
@@ -180,85 +260,27 @@ declare function tagAttrKey(name: string): string;
|
|
|
180
260
|
*/
|
|
181
261
|
declare const autoTagColorCycle: readonly string[];
|
|
182
262
|
|
|
263
|
+
/** Validate that a hex string is well-formed (#RGB or #RRGGBB). */
|
|
264
|
+
declare function isValidHex(value: string): boolean;
|
|
183
265
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*/
|
|
188
|
-
interface CompactViewState {
|
|
189
|
-
tag?: string | null;
|
|
190
|
-
cs?: number[];
|
|
191
|
-
cg?: string[];
|
|
192
|
-
swim?: string | null;
|
|
193
|
-
cl?: string[];
|
|
194
|
-
cc?: string[];
|
|
195
|
-
rm?: string;
|
|
196
|
-
htv?: Record<string, string[]>;
|
|
197
|
-
ha?: string[];
|
|
198
|
-
sem?: boolean;
|
|
199
|
-
cm?: boolean;
|
|
200
|
-
c4l?: string;
|
|
201
|
-
c4s?: string;
|
|
202
|
-
c4c?: string;
|
|
203
|
-
rps?: number;
|
|
204
|
-
spd?: number;
|
|
205
|
-
io?: Record<string, number>;
|
|
206
|
-
hd?: boolean;
|
|
207
|
-
cbd?: boolean;
|
|
208
|
-
rq?: string;
|
|
209
|
-
an?: boolean;
|
|
210
|
-
fl?: boolean;
|
|
211
|
-
}
|
|
212
|
-
interface DecodedDiagramUrl {
|
|
213
|
-
dsl: string;
|
|
214
|
-
viewState: CompactViewState;
|
|
215
|
-
palette?: string;
|
|
216
|
-
theme?: 'light' | 'dark';
|
|
217
|
-
filename?: string;
|
|
218
|
-
}
|
|
219
|
-
interface EncodeDiagramUrlOptions {
|
|
220
|
-
baseUrl?: string;
|
|
221
|
-
viewState?: CompactViewState;
|
|
222
|
-
palette?: string;
|
|
223
|
-
theme?: 'light' | 'dark';
|
|
224
|
-
filename?: string;
|
|
225
|
-
}
|
|
226
|
-
type EncodeDiagramUrlResult = {
|
|
227
|
-
url: string;
|
|
228
|
-
error?: undefined;
|
|
229
|
-
} | {
|
|
230
|
-
url?: undefined;
|
|
231
|
-
error: 'too-large';
|
|
232
|
-
compressedSize: number;
|
|
233
|
-
limit: number;
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* Encode a CompactViewState to a compressed string for URL embedding.
|
|
237
|
-
* Returns empty string if state has no keys (ADR-4).
|
|
238
|
-
*/
|
|
239
|
-
declare function encodeViewState(state: CompactViewState): string;
|
|
240
|
-
/**
|
|
241
|
-
* Decode a compressed view state string back to CompactViewState.
|
|
242
|
-
* Returns empty object on failure (no crash).
|
|
243
|
-
*/
|
|
244
|
-
declare function decodeViewState(encoded: string): CompactViewState;
|
|
245
|
-
/**
|
|
246
|
-
* Compress a DGMO DSL string into a shareable URL.
|
|
247
|
-
* Returns `{ url }` on success, or `{ error: 'too-large', compressedSize, limit }` if the
|
|
248
|
-
* compressed payload exceeds the 8 KB limit.
|
|
266
|
+
* Register a palette. Called at module initialization.
|
|
267
|
+
* Validates that all 19 color fields per mode are present and valid hex.
|
|
268
|
+
* Throws on malformed palettes to catch errors at startup, not at render time.
|
|
249
269
|
*/
|
|
250
|
-
declare function
|
|
270
|
+
declare function registerPalette(palette: PaletteConfig): void;
|
|
271
|
+
/** Get palette by id. Silently returns the default palette if id is unrecognized. */
|
|
272
|
+
declare function getPalette(id: string): PaletteConfig;
|
|
251
273
|
/**
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
* Returns `{ dsl, viewState }`. The DSL is empty string on invalid input.
|
|
274
|
+
* Resolve a palette by id, falling back to the default palette when the id is
|
|
275
|
+
* unregistered. If a `warn` callback is supplied, it is invoked once with a
|
|
276
|
+
* human-readable fallback message on a miss — the single place the "resolve,
|
|
277
|
+
* fall back, warn" policy lives, so each host can surface it its own way
|
|
278
|
+
* (console.warn, Obsidian Notice, MCP response). Silent when the id resolves or
|
|
279
|
+
* when no callback is passed.
|
|
260
280
|
*/
|
|
261
|
-
declare function
|
|
281
|
+
declare function resolvePaletteOrFallback(id: string, warn?: (message: string) => void): PaletteConfig;
|
|
282
|
+
/** List all registered palettes alphabetically (for the selector UI). */
|
|
283
|
+
declare function getAvailablePalettes(): PaletteConfig[];
|
|
262
284
|
|
|
263
285
|
interface ChartTypeMeta {
|
|
264
286
|
readonly id: string;
|
|
@@ -515,26 +537,4 @@ declare function parseDgmo(content: string): {
|
|
|
515
537
|
chartType: string | null;
|
|
516
538
|
};
|
|
517
539
|
|
|
518
|
-
|
|
519
|
-
declare function isValidHex(value: string): boolean;
|
|
520
|
-
/**
|
|
521
|
-
* Register a palette. Called at module initialization.
|
|
522
|
-
* Validates that all 19 color fields per mode are present and valid hex.
|
|
523
|
-
* Throws on malformed palettes to catch errors at startup, not at render time.
|
|
524
|
-
*/
|
|
525
|
-
declare function registerPalette(palette: PaletteConfig): void;
|
|
526
|
-
/** Get palette by id. Silently returns the default palette if id is unrecognized. */
|
|
527
|
-
declare function getPalette(id: string): PaletteConfig;
|
|
528
|
-
/**
|
|
529
|
-
* Resolve a palette by id, falling back to the default palette when the id is
|
|
530
|
-
* unregistered. If a `warn` callback is supplied, it is invoked once with a
|
|
531
|
-
* human-readable fallback message on a miss — the single place the "resolve,
|
|
532
|
-
* fall back, warn" policy lives, so each host can surface it its own way
|
|
533
|
-
* (console.warn, Obsidian Notice, MCP response). Silent when the id resolves or
|
|
534
|
-
* when no callback is passed.
|
|
535
|
-
*/
|
|
536
|
-
declare function resolvePaletteOrFallback(id: string, warn?: (message: string) => void): PaletteConfig;
|
|
537
|
-
/** List all registered palettes alphabetically (for the selector UI). */
|
|
538
|
-
declare function getAvailablePalettes(): PaletteConfig[];
|
|
539
|
-
|
|
540
|
-
export { isExtendedChartType as A, isValidHex as B, type CompactViewState as C, type DgmoError as D, type EmitOptions as E, knownChartTypeIds as F, makeDgmoError as G, parseDgmoChartType as H, registerPalette as I, tagAttrKey as J, type PaletteConfig as P, type RenderCategory as R, type TagGroup as T, type DiagnosticSpec as a, type ChartTypeId as b, type ChartTypeMeta as c, type DgmoSeverity as d, type DiagnosticParams as e, type PaletteColors as f, chartTypes as g, emit as h, formatDgmoError as i, getPalette as j, type TagEntry as k, CHART_TYPE_DESCRIPTIONS as l, type DecodedDiagramUrl as m, type EncodeDiagramUrlOptions as n, type EncodeDiagramUrlResult as o, parseDgmo as p, autoTagColorCycle as q, resolvePaletteOrFallback as r, chartTypeParsers as s, decodeDiagramUrl as t, decodeViewState as u, encodeDiagramUrl as v, encodeViewState as w, getAllChartTypes as x, getAvailablePalettes as y, getRenderCategory as z };
|
|
540
|
+
export { isExtendedChartType as A, isValidHex as B, type CompactViewState as C, type DiagnosticSpec as D, type EmitOptions as E, knownChartTypeIds as F, makeDgmoError as G, parseDgmoChartType as H, registerPalette as I, tagAttrKey as J, type PaletteConfig as P, type RenderCategory as R, type TagGroup as T, type DgmoError as a, type ChartTypeId as b, type ChartTypeMeta as c, type DgmoSeverity as d, type DiagnosticParams as e, type PaletteColors as f, chartTypes as g, emit as h, formatDgmoError as i, getPalette as j, type TagEntry as k, CHART_TYPE_DESCRIPTIONS as l, type DecodedDiagramUrl as m, type EncodeDiagramUrlOptions as n, type EncodeDiagramUrlResult as o, parseDgmo as p, autoTagColorCycle as q, resolvePaletteOrFallback as r, chartTypeParsers as s, decodeDiagramUrl as t, decodeViewState as u, encodeDiagramUrl as v, encodeViewState as w, getAllChartTypes as x, getAvailablePalettes as y, getRenderCategory as z };
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
looksLikeGantt,
|
|
10
10
|
parseDgmo,
|
|
11
11
|
parseDgmoChartType
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3PVUGECM.js";
|
|
13
13
|
import "./chunk-2CMM36O7.js";
|
|
14
14
|
import "./chunk-A2RUBBVT.js";
|
|
15
15
|
import "./chunk-JWJBWNQL.js";
|
|
@@ -86,4 +86,4 @@ export {
|
|
|
86
86
|
parseDgmo,
|
|
87
87
|
parseDgmoChartType
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=dgmo-router-
|
|
89
|
+
//# sourceMappingURL=dgmo-router-Z5N6QLIC.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mapContentAspect,
|
|
3
3
|
mapExportDimensions
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JU2VMFYC.js";
|
|
5
|
+
import "./chunk-37EHGTQ2.js";
|
|
6
6
|
import "./chunk-4QV26TEG.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-CVVICCSB.js";
|
|
8
8
|
import "./chunk-A4GOY3PE.js";
|
|
9
9
|
import "./chunk-ES66QH6J.js";
|
|
10
10
|
import "./chunk-SCJ7CAJF.js";
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
mapContentAspect,
|
|
20
20
|
mapExportDimensions
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=dimensions-
|
|
22
|
+
//# sourceMappingURL=dimensions-ES6O2T4H.js.map
|