@diagrammo/dgmo 0.15.0 → 0.15.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 +14 -1
- package/dist/advanced.cjs +53069 -0
- package/dist/advanced.d.cts +4691 -0
- package/dist/advanced.d.ts +4691 -0
- package/dist/advanced.js +52823 -0
- package/dist/auto.cjs +1495 -1288
- package/dist/auto.js +132 -109
- package/dist/auto.mjs +1491 -1284
- package/dist/cli.cjs +173 -150
- package/dist/index.cjs +1486 -1276
- package/dist/index.d.cts +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +1481 -1272
- package/dist/internal.cjs +1497 -1289
- package/dist/internal.d.cts +80 -79
- package/dist/internal.d.ts +80 -79
- package/dist/internal.js +1492 -1285
- package/dist/pert.cjs +325 -0
- package/dist/pert.d.cts +542 -0
- package/dist/pert.d.ts +542 -0
- package/dist/pert.js +294 -0
- package/package.json +28 -3
- package/src/advanced.ts +731 -0
- package/src/auto/index.ts +14 -13
- package/src/boxes-and-lines/layout.ts +481 -445
- package/src/c4/parser.ts +7 -7
- package/src/chart-types.ts +0 -5
- package/src/class/parser.ts +1 -9
- package/src/cli.ts +9 -7
- package/src/completion-types.ts +28 -0
- package/src/completion.ts +15 -18
- package/src/cycle/layout.ts +2 -2
- package/src/d3.ts +1455 -1122
- package/src/echarts.ts +11 -11
- package/src/er/parser.ts +1 -9
- package/src/er/renderer.ts +1 -1
- package/src/gantt/calculator.ts +1 -11
- package/src/gantt/parser.ts +16 -16
- package/src/gantt/renderer.ts +2 -2
- package/src/graph/flowchart-parser.ts +1 -1
- package/src/graph/flowchart-renderer.ts +1 -1
- package/src/graph/state-renderer.ts +1 -1
- package/src/index.ts +17 -1
- package/src/infra/parser.ts +19 -19
- package/src/infra/renderer.ts +2 -2
- package/src/internal.ts +9 -721
- package/src/kanban/parser.ts +2 -2
- package/src/mindmap/layout.ts +1 -1
- package/src/mindmap/parser.ts +1 -1
- package/src/org/parser.ts +1 -1
- package/src/org/renderer.ts +1 -1
- package/src/pert/layout.ts +1 -1
- package/src/pert/monte-carlo.ts +2 -2
- package/src/pert/parser.ts +3 -3
- package/src/raci/parser.ts +4 -4
- package/src/raci/renderer.ts +1 -1
- package/src/sequence/renderer.ts +1 -4
- package/src/sitemap/parser.ts +1 -1
- package/src/tech-radar/interactive.ts +1 -1
- package/src/tech-radar/renderer.ts +1 -1
- package/src/utils/tag-groups.ts +11 -12
- package/src/wireframe/layout.ts +11 -7
- package/src/wireframe/parser.ts +2 -2
- package/src/wireframe/renderer.ts +5 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact view state schema (ADR-6).
|
|
3
|
+
* All fields optional. Only non-default values are encoded.
|
|
4
|
+
* `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
|
|
5
|
+
*/
|
|
6
|
+
interface CompactViewState {
|
|
7
|
+
tag?: string | null;
|
|
8
|
+
cs?: number[];
|
|
9
|
+
cg?: string[];
|
|
10
|
+
swim?: string | null;
|
|
11
|
+
cl?: string[];
|
|
12
|
+
cc?: string[];
|
|
13
|
+
rm?: string;
|
|
14
|
+
htv?: Record<string, string[]>;
|
|
15
|
+
ha?: string[];
|
|
16
|
+
sem?: boolean;
|
|
17
|
+
cm?: boolean;
|
|
18
|
+
c4l?: string;
|
|
19
|
+
c4s?: string;
|
|
20
|
+
c4c?: string;
|
|
21
|
+
rps?: number;
|
|
22
|
+
spd?: number;
|
|
23
|
+
io?: Record<string, number>;
|
|
24
|
+
hd?: boolean;
|
|
25
|
+
cbd?: boolean;
|
|
26
|
+
rq?: string;
|
|
27
|
+
an?: boolean;
|
|
28
|
+
fl?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
1
31
|
type DgmoSeverity = 'error' | 'warning';
|
|
2
32
|
interface DgmoError {
|
|
3
33
|
line: number;
|
|
@@ -112,6 +142,9 @@ declare const themes: {
|
|
|
112
142
|
readonly transparent: "transparent";
|
|
113
143
|
};
|
|
114
144
|
|
|
145
|
+
/** Get palette by id. Returns Nord if id is unrecognized (FR10). */
|
|
146
|
+
declare function getPalette(id: string): PaletteConfig;
|
|
147
|
+
|
|
115
148
|
/**
|
|
116
149
|
* All built-in palettes, keyed by camelCase id. Use directly with render():
|
|
117
150
|
*
|
|
@@ -144,6 +177,12 @@ interface RenderOptions {
|
|
|
144
177
|
* 'throw' — throw an Error with the diagnostics
|
|
145
178
|
*/
|
|
146
179
|
onError?: 'svg' | 'silent' | 'throw';
|
|
180
|
+
/**
|
|
181
|
+
* Pre-applied interactive view state — collapsed sections/columns,
|
|
182
|
+
* active swimlane tag-group, etc. Used to render a specific view
|
|
183
|
+
* non-interactively (server-side render, share-link decode).
|
|
184
|
+
*/
|
|
185
|
+
viewState?: CompactViewState;
|
|
147
186
|
}
|
|
148
187
|
interface RenderResult {
|
|
149
188
|
svg: string;
|
|
@@ -170,6 +209,11 @@ interface EncodeDiagramUrlOptions {
|
|
|
170
209
|
palette?: PaletteConfig;
|
|
171
210
|
theme?: Theme;
|
|
172
211
|
filename?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Initial view state to embed in the URL — re-applied when the link is
|
|
214
|
+
* decoded so recipients open the diagram in the same configuration.
|
|
215
|
+
*/
|
|
216
|
+
viewState?: CompactViewState;
|
|
173
217
|
}
|
|
174
218
|
/**
|
|
175
219
|
* Encode DGMO text into a shareable URL. Returns null if the compressed
|
|
@@ -188,4 +232,4 @@ interface DecodedDiagramUrl {
|
|
|
188
232
|
*/
|
|
189
233
|
declare function decodeDiagramUrl(url: string): DecodedDiagramUrl | null;
|
|
190
234
|
|
|
191
|
-
export { type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type EncodeDiagramUrlOptions, type PaletteColors, type PaletteConfig, type RenderOptions, type RenderResult, type Theme, decodeDiagramUrl, encodeDiagramUrl, formatDgmoError, palettes, render, themes, parseDgmo as validate };
|
|
235
|
+
export { type CompactViewState, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type EncodeDiagramUrlOptions, type PaletteColors, type PaletteConfig, type RenderOptions, type RenderResult, type Theme, decodeDiagramUrl, encodeDiagramUrl, formatDgmoError, getPalette, palettes, render, themes, parseDgmo as validate };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact view state schema (ADR-6).
|
|
3
|
+
* All fields optional. Only non-default values are encoded.
|
|
4
|
+
* `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
|
|
5
|
+
*/
|
|
6
|
+
interface CompactViewState {
|
|
7
|
+
tag?: string | null;
|
|
8
|
+
cs?: number[];
|
|
9
|
+
cg?: string[];
|
|
10
|
+
swim?: string | null;
|
|
11
|
+
cl?: string[];
|
|
12
|
+
cc?: string[];
|
|
13
|
+
rm?: string;
|
|
14
|
+
htv?: Record<string, string[]>;
|
|
15
|
+
ha?: string[];
|
|
16
|
+
sem?: boolean;
|
|
17
|
+
cm?: boolean;
|
|
18
|
+
c4l?: string;
|
|
19
|
+
c4s?: string;
|
|
20
|
+
c4c?: string;
|
|
21
|
+
rps?: number;
|
|
22
|
+
spd?: number;
|
|
23
|
+
io?: Record<string, number>;
|
|
24
|
+
hd?: boolean;
|
|
25
|
+
cbd?: boolean;
|
|
26
|
+
rq?: string;
|
|
27
|
+
an?: boolean;
|
|
28
|
+
fl?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
1
31
|
type DgmoSeverity = 'error' | 'warning';
|
|
2
32
|
interface DgmoError {
|
|
3
33
|
line: number;
|
|
@@ -112,6 +142,9 @@ declare const themes: {
|
|
|
112
142
|
readonly transparent: "transparent";
|
|
113
143
|
};
|
|
114
144
|
|
|
145
|
+
/** Get palette by id. Returns Nord if id is unrecognized (FR10). */
|
|
146
|
+
declare function getPalette(id: string): PaletteConfig;
|
|
147
|
+
|
|
115
148
|
/**
|
|
116
149
|
* All built-in palettes, keyed by camelCase id. Use directly with render():
|
|
117
150
|
*
|
|
@@ -144,6 +177,12 @@ interface RenderOptions {
|
|
|
144
177
|
* 'throw' — throw an Error with the diagnostics
|
|
145
178
|
*/
|
|
146
179
|
onError?: 'svg' | 'silent' | 'throw';
|
|
180
|
+
/**
|
|
181
|
+
* Pre-applied interactive view state — collapsed sections/columns,
|
|
182
|
+
* active swimlane tag-group, etc. Used to render a specific view
|
|
183
|
+
* non-interactively (server-side render, share-link decode).
|
|
184
|
+
*/
|
|
185
|
+
viewState?: CompactViewState;
|
|
147
186
|
}
|
|
148
187
|
interface RenderResult {
|
|
149
188
|
svg: string;
|
|
@@ -170,6 +209,11 @@ interface EncodeDiagramUrlOptions {
|
|
|
170
209
|
palette?: PaletteConfig;
|
|
171
210
|
theme?: Theme;
|
|
172
211
|
filename?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Initial view state to embed in the URL — re-applied when the link is
|
|
214
|
+
* decoded so recipients open the diagram in the same configuration.
|
|
215
|
+
*/
|
|
216
|
+
viewState?: CompactViewState;
|
|
173
217
|
}
|
|
174
218
|
/**
|
|
175
219
|
* Encode DGMO text into a shareable URL. Returns null if the compressed
|
|
@@ -188,4 +232,4 @@ interface DecodedDiagramUrl {
|
|
|
188
232
|
*/
|
|
189
233
|
declare function decodeDiagramUrl(url: string): DecodedDiagramUrl | null;
|
|
190
234
|
|
|
191
|
-
export { type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type EncodeDiagramUrlOptions, type PaletteColors, type PaletteConfig, type RenderOptions, type RenderResult, type Theme, decodeDiagramUrl, encodeDiagramUrl, formatDgmoError, palettes, render, themes, parseDgmo as validate };
|
|
235
|
+
export { type CompactViewState, type DecodedDiagramUrl, type DgmoError, type DgmoSeverity, type EncodeDiagramUrlOptions, type PaletteColors, type PaletteConfig, type RenderOptions, type RenderResult, type Theme, decodeDiagramUrl, encodeDiagramUrl, formatDgmoError, getPalette, palettes, render, themes, parseDgmo as validate };
|