@diagrammo/dgmo 0.15.1 → 0.16.0
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 +9 -9
- package/dist/advanced.cjs +479 -454
- package/dist/advanced.d.cts +34 -35
- package/dist/advanced.d.ts +34 -35
- package/dist/advanced.js +479 -453
- package/dist/auto.cjs +374 -352
- package/dist/auto.js +103 -103
- package/dist/auto.mjs +374 -352
- package/dist/cli.cjs +140 -140
- package/dist/editor.cjs +8 -9
- package/dist/editor.js +8 -9
- package/dist/highlight.cjs +8 -9
- package/dist/highlight.js +8 -9
- package/dist/index.cjs +365 -342
- package/dist/index.js +365 -342
- package/dist/internal.cjs +479 -454
- package/dist/internal.d.cts +34 -35
- package/dist/internal.d.ts +34 -35
- package/dist/internal.js +479 -453
- package/dist/pert.d.cts +2 -2
- package/dist/pert.d.ts +2 -2
- package/docs/language-reference.md +83 -66
- package/gallery/fixtures/area.dgmo +3 -3
- package/gallery/fixtures/bar-stacked.dgmo +5 -5
- package/gallery/fixtures/boxes-and-lines.dgmo +2 -2
- package/gallery/fixtures/c4-full.dgmo +8 -8
- package/gallery/fixtures/class-full.dgmo +2 -2
- package/gallery/fixtures/doughnut.dgmo +6 -6
- package/gallery/fixtures/flowchart-colors.dgmo +3 -3
- package/gallery/fixtures/function.dgmo +3 -3
- package/gallery/fixtures/gantt-full.dgmo +9 -9
- package/gallery/fixtures/gantt.dgmo +7 -7
- package/gallery/fixtures/infra-full.dgmo +6 -6
- package/gallery/fixtures/infra.dgmo +2 -2
- package/gallery/fixtures/kanban.dgmo +9 -9
- package/gallery/fixtures/line.dgmo +2 -2
- package/gallery/fixtures/multi-line.dgmo +3 -3
- package/gallery/fixtures/org-full.dgmo +6 -6
- package/gallery/fixtures/quadrant.dgmo +2 -2
- package/gallery/fixtures/sankey.dgmo +9 -9
- package/gallery/fixtures/scatter.dgmo +3 -3
- package/gallery/fixtures/sequence-tags-protocols.dgmo +8 -8
- package/gallery/fixtures/sequence-tags.dgmo +7 -7
- package/gallery/fixtures/sitemap-full.dgmo +7 -7
- package/gallery/fixtures/slope.dgmo +5 -5
- package/gallery/fixtures/spr-eras.dgmo +9 -9
- package/gallery/fixtures/timeline.dgmo +3 -3
- package/gallery/fixtures/venn.dgmo +3 -3
- package/package.json +1 -1
- package/src/advanced.ts +0 -1
- package/src/boxes-and-lines/renderer.ts +5 -1
- package/src/c4/parser.ts +1 -1
- package/src/c4/renderer.ts +15 -8
- package/src/chart.ts +18 -9
- package/src/class/parser.ts +7 -6
- package/src/class/renderer.ts +17 -6
- package/src/cli.ts +6 -6
- package/src/completion.ts +13 -3
- package/src/cycle/parser.ts +14 -0
- package/src/cycle/renderer.ts +6 -3
- package/src/d3.ts +86 -46
- package/src/echarts.ts +26 -9
- package/src/editor/dgmo.grammar +1 -3
- package/src/editor/dgmo.grammar.js +8 -8
- package/src/editor/dgmo.grammar.terms.js +11 -12
- package/src/editor/highlight-api.ts +0 -1
- package/src/editor/highlight.ts +0 -1
- package/src/er/parser.ts +18 -11
- package/src/er/renderer.ts +19 -7
- package/src/gantt/parser.ts +1 -1
- package/src/gantt/renderer.ts +7 -4
- package/src/graph/flowchart-parser.ts +18 -84
- package/src/graph/flowchart-renderer.ts +3 -8
- package/src/graph/layout.ts +0 -2
- package/src/graph/state-parser.ts +17 -62
- package/src/graph/state-renderer.ts +3 -8
- package/src/infra/parser.ts +21 -11
- package/src/infra/renderer.ts +7 -4
- package/src/journey-map/parser.ts +10 -3
- package/src/journey-map/renderer.ts +3 -1
- package/src/kanban/parser.ts +10 -6
- package/src/kanban/renderer.ts +3 -1
- package/src/mindmap/parser.ts +2 -2
- package/src/mindmap/renderer.ts +2 -1
- package/src/org/parser.ts +2 -2
- package/src/org/renderer.ts +4 -3
- package/src/pert/parser.ts +7 -7
- package/src/pert/renderer.ts +7 -2
- package/src/pert/types.ts +1 -1
- package/src/pyramid/parser.ts +12 -0
- package/src/raci/parser.ts +40 -10
- package/src/raci/renderer.ts +2 -1
- package/src/raci/types.ts +4 -3
- package/src/ring/parser.ts +12 -0
- package/src/sequence/parser.ts +15 -9
- package/src/sequence/renderer.ts +1 -1
- package/src/sitemap/layout.ts +0 -2
- package/src/sitemap/parser.ts +11 -37
- package/src/sitemap/renderer.ts +13 -13
- package/src/sitemap/types.ts +0 -1
- package/src/tech-radar/renderer.ts +5 -3
- package/src/tech-radar/types.ts +2 -0
- package/src/utils/arrows.ts +3 -28
- package/src/utils/legend-d3.ts +12 -6
- package/src/utils/legend-layout.ts +1 -1
- package/src/utils/legend-types.ts +1 -1
- package/src/utils/parsing.ts +64 -35
- package/src/utils/tag-groups.ts +98 -18
- package/src/wireframe/parser.ts +2 -2
package/dist/internal.cjs
CHANGED
|
@@ -140,114 +140,6 @@ var init_diagnostics = __esm({
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
-
// src/colors.ts
|
|
144
|
-
function isRecognizedColorName(name) {
|
|
145
|
-
return Object.prototype.hasOwnProperty.call(colorNames, name.toLowerCase());
|
|
146
|
-
}
|
|
147
|
-
function resolveColor(color, palette) {
|
|
148
|
-
if (!color) return null;
|
|
149
|
-
if (color.startsWith("#")) return null;
|
|
150
|
-
const lower = color.toLowerCase();
|
|
151
|
-
if (!isRecognizedColorName(lower)) return null;
|
|
152
|
-
if (palette) {
|
|
153
|
-
const named = palette.colors[lower];
|
|
154
|
-
if (named) return named;
|
|
155
|
-
}
|
|
156
|
-
return colorNames[lower];
|
|
157
|
-
}
|
|
158
|
-
function resolveColorWithDiagnostic(color, line12, diagnostics, palette) {
|
|
159
|
-
const resolved = resolveColor(color, palette);
|
|
160
|
-
if (resolved !== null) return resolved;
|
|
161
|
-
const hint = suggest(color, RECOGNIZED_COLOR_NAMES);
|
|
162
|
-
const suggestion = hint ? ` ${hint}` : "";
|
|
163
|
-
diagnostics.push(
|
|
164
|
-
makeDgmoError(
|
|
165
|
-
line12,
|
|
166
|
-
`Unknown color "${color}". Allowed: ${RECOGNIZED_COLOR_NAMES.join(", ")}.${suggestion}`,
|
|
167
|
-
"warning"
|
|
168
|
-
)
|
|
169
|
-
);
|
|
170
|
-
return void 0;
|
|
171
|
-
}
|
|
172
|
-
var nord, colorNames, RECOGNIZED_COLOR_NAMES, seriesColors;
|
|
173
|
-
var init_colors = __esm({
|
|
174
|
-
"src/colors.ts"() {
|
|
175
|
-
"use strict";
|
|
176
|
-
init_diagnostics();
|
|
177
|
-
nord = {
|
|
178
|
-
// Polar Night (dark)
|
|
179
|
-
nord0: "#2e3440",
|
|
180
|
-
nord1: "#3b4252",
|
|
181
|
-
nord2: "#434c5e",
|
|
182
|
-
nord3: "#4c566a",
|
|
183
|
-
// Snow Storm (light)
|
|
184
|
-
nord4: "#d8dee9",
|
|
185
|
-
nord5: "#e5e9f0",
|
|
186
|
-
nord6: "#eceff4",
|
|
187
|
-
// Frost (accent blues)
|
|
188
|
-
nord7: "#8fbcbb",
|
|
189
|
-
nord8: "#88c0d0",
|
|
190
|
-
nord9: "#81a1c1",
|
|
191
|
-
nord10: "#5e81ac",
|
|
192
|
-
// Aurora (colors)
|
|
193
|
-
nord11: "#bf616a",
|
|
194
|
-
// red
|
|
195
|
-
nord12: "#d08770",
|
|
196
|
-
// orange
|
|
197
|
-
nord13: "#ebcb8b",
|
|
198
|
-
// yellow
|
|
199
|
-
nord14: "#a3be8c",
|
|
200
|
-
// green
|
|
201
|
-
nord15: "#b48ead"
|
|
202
|
-
// purple
|
|
203
|
-
};
|
|
204
|
-
colorNames = {
|
|
205
|
-
red: nord.nord11,
|
|
206
|
-
orange: nord.nord12,
|
|
207
|
-
yellow: nord.nord13,
|
|
208
|
-
green: nord.nord14,
|
|
209
|
-
blue: nord.nord10,
|
|
210
|
-
purple: nord.nord15,
|
|
211
|
-
teal: nord.nord7,
|
|
212
|
-
cyan: nord.nord8,
|
|
213
|
-
gray: nord.nord3,
|
|
214
|
-
black: nord.nord0,
|
|
215
|
-
white: nord.nord6
|
|
216
|
-
};
|
|
217
|
-
RECOGNIZED_COLOR_NAMES = Object.freeze([
|
|
218
|
-
"red",
|
|
219
|
-
"orange",
|
|
220
|
-
"yellow",
|
|
221
|
-
"green",
|
|
222
|
-
"blue",
|
|
223
|
-
"purple",
|
|
224
|
-
"teal",
|
|
225
|
-
"cyan",
|
|
226
|
-
"gray",
|
|
227
|
-
"black",
|
|
228
|
-
"white"
|
|
229
|
-
]);
|
|
230
|
-
seriesColors = [
|
|
231
|
-
nord.nord10,
|
|
232
|
-
// blue
|
|
233
|
-
nord.nord14,
|
|
234
|
-
// green
|
|
235
|
-
nord.nord13,
|
|
236
|
-
// yellow
|
|
237
|
-
nord.nord12,
|
|
238
|
-
// orange
|
|
239
|
-
nord.nord15,
|
|
240
|
-
// purple
|
|
241
|
-
nord.nord11,
|
|
242
|
-
// red
|
|
243
|
-
nord.nord7,
|
|
244
|
-
// teal
|
|
245
|
-
nord.nord8
|
|
246
|
-
// light blue
|
|
247
|
-
];
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
|
|
251
143
|
// src/utils/arrows.ts
|
|
252
144
|
function validateLabelCharacters(label, lineNumber) {
|
|
253
145
|
const out = [];
|
|
@@ -288,15 +180,6 @@ function parseInArrowLabel(rawLabel, lineNumber) {
|
|
|
288
180
|
const diagnostics = validateLabelCharacters(trimmed, lineNumber);
|
|
289
181
|
return { label: trimmed, diagnostics };
|
|
290
182
|
}
|
|
291
|
-
function matchColorParens(content) {
|
|
292
|
-
const m = content.match(/^\(([A-Za-z]+)\)$/);
|
|
293
|
-
if (!m) return null;
|
|
294
|
-
const candidate = m[1].toLowerCase();
|
|
295
|
-
if (RECOGNIZED_COLOR_NAMES.includes(candidate)) {
|
|
296
|
-
return candidate;
|
|
297
|
-
}
|
|
298
|
-
return null;
|
|
299
|
-
}
|
|
300
183
|
function parseArrow(line12) {
|
|
301
184
|
if (BIDI_SYNC_RE.test(line12) || BIDI_ASYNC_RE.test(line12)) {
|
|
302
185
|
return {
|
|
@@ -335,7 +218,6 @@ var init_arrows = __esm({
|
|
|
335
218
|
"src/utils/arrows.ts"() {
|
|
336
219
|
"use strict";
|
|
337
220
|
init_diagnostics();
|
|
338
|
-
init_colors();
|
|
339
221
|
ARROW_DIAGNOSTIC_CODES = {
|
|
340
222
|
/** Active: label contains `->` or `~>` substring (TD-13). */
|
|
341
223
|
ARROW_SUBSTRING_IN_LABEL: "E_ARROW_SUBSTRING_IN_LABEL",
|
|
@@ -697,6 +579,114 @@ var init_time_ticks = __esm({
|
|
|
697
579
|
}
|
|
698
580
|
});
|
|
699
581
|
|
|
582
|
+
// src/colors.ts
|
|
583
|
+
function isRecognizedColorName(name) {
|
|
584
|
+
return Object.prototype.hasOwnProperty.call(colorNames, name.toLowerCase());
|
|
585
|
+
}
|
|
586
|
+
function resolveColor(color, palette) {
|
|
587
|
+
if (!color) return null;
|
|
588
|
+
if (color.startsWith("#")) return null;
|
|
589
|
+
const lower = color.toLowerCase();
|
|
590
|
+
if (!isRecognizedColorName(lower)) return null;
|
|
591
|
+
if (palette) {
|
|
592
|
+
const named = palette.colors[lower];
|
|
593
|
+
if (named) return named;
|
|
594
|
+
}
|
|
595
|
+
return colorNames[lower];
|
|
596
|
+
}
|
|
597
|
+
function resolveColorWithDiagnostic(color, line12, diagnostics, palette) {
|
|
598
|
+
const resolved = resolveColor(color, palette);
|
|
599
|
+
if (resolved !== null) return resolved;
|
|
600
|
+
const hint = suggest(color, RECOGNIZED_COLOR_NAMES);
|
|
601
|
+
const suggestion = hint ? ` ${hint}` : "";
|
|
602
|
+
diagnostics.push(
|
|
603
|
+
makeDgmoError(
|
|
604
|
+
line12,
|
|
605
|
+
`Unknown color "${color}". Allowed: ${RECOGNIZED_COLOR_NAMES.join(", ")}.${suggestion}`,
|
|
606
|
+
"warning"
|
|
607
|
+
)
|
|
608
|
+
);
|
|
609
|
+
return void 0;
|
|
610
|
+
}
|
|
611
|
+
var nord, colorNames, RECOGNIZED_COLOR_NAMES, seriesColors;
|
|
612
|
+
var init_colors = __esm({
|
|
613
|
+
"src/colors.ts"() {
|
|
614
|
+
"use strict";
|
|
615
|
+
init_diagnostics();
|
|
616
|
+
nord = {
|
|
617
|
+
// Polar Night (dark)
|
|
618
|
+
nord0: "#2e3440",
|
|
619
|
+
nord1: "#3b4252",
|
|
620
|
+
nord2: "#434c5e",
|
|
621
|
+
nord3: "#4c566a",
|
|
622
|
+
// Snow Storm (light)
|
|
623
|
+
nord4: "#d8dee9",
|
|
624
|
+
nord5: "#e5e9f0",
|
|
625
|
+
nord6: "#eceff4",
|
|
626
|
+
// Frost (accent blues)
|
|
627
|
+
nord7: "#8fbcbb",
|
|
628
|
+
nord8: "#88c0d0",
|
|
629
|
+
nord9: "#81a1c1",
|
|
630
|
+
nord10: "#5e81ac",
|
|
631
|
+
// Aurora (colors)
|
|
632
|
+
nord11: "#bf616a",
|
|
633
|
+
// red
|
|
634
|
+
nord12: "#d08770",
|
|
635
|
+
// orange
|
|
636
|
+
nord13: "#ebcb8b",
|
|
637
|
+
// yellow
|
|
638
|
+
nord14: "#a3be8c",
|
|
639
|
+
// green
|
|
640
|
+
nord15: "#b48ead"
|
|
641
|
+
// purple
|
|
642
|
+
};
|
|
643
|
+
colorNames = {
|
|
644
|
+
red: nord.nord11,
|
|
645
|
+
orange: nord.nord12,
|
|
646
|
+
yellow: nord.nord13,
|
|
647
|
+
green: nord.nord14,
|
|
648
|
+
blue: nord.nord10,
|
|
649
|
+
purple: nord.nord15,
|
|
650
|
+
teal: nord.nord7,
|
|
651
|
+
cyan: nord.nord8,
|
|
652
|
+
gray: nord.nord3,
|
|
653
|
+
black: nord.nord0,
|
|
654
|
+
white: nord.nord6
|
|
655
|
+
};
|
|
656
|
+
RECOGNIZED_COLOR_NAMES = Object.freeze([
|
|
657
|
+
"red",
|
|
658
|
+
"orange",
|
|
659
|
+
"yellow",
|
|
660
|
+
"green",
|
|
661
|
+
"blue",
|
|
662
|
+
"purple",
|
|
663
|
+
"teal",
|
|
664
|
+
"cyan",
|
|
665
|
+
"gray",
|
|
666
|
+
"black",
|
|
667
|
+
"white"
|
|
668
|
+
]);
|
|
669
|
+
seriesColors = [
|
|
670
|
+
nord.nord10,
|
|
671
|
+
// blue
|
|
672
|
+
nord.nord14,
|
|
673
|
+
// green
|
|
674
|
+
nord.nord13,
|
|
675
|
+
// yellow
|
|
676
|
+
nord.nord12,
|
|
677
|
+
// orange
|
|
678
|
+
nord.nord15,
|
|
679
|
+
// purple
|
|
680
|
+
nord.nord11,
|
|
681
|
+
// red
|
|
682
|
+
nord.nord7,
|
|
683
|
+
// teal
|
|
684
|
+
nord.nord8
|
|
685
|
+
// light blue
|
|
686
|
+
];
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
|
|
700
690
|
// src/palettes/registry.ts
|
|
701
691
|
function isValidHex(value) {
|
|
702
692
|
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
@@ -1929,17 +1919,21 @@ function measureIndent(line12) {
|
|
|
1929
1919
|
return indent;
|
|
1930
1920
|
}
|
|
1931
1921
|
function extractColor(label, palette, diagnostics, line12) {
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
|
|
1922
|
+
const lastSpaceIdx = Math.max(
|
|
1923
|
+
label.lastIndexOf(" "),
|
|
1924
|
+
label.lastIndexOf(" ")
|
|
1925
|
+
);
|
|
1926
|
+
if (lastSpaceIdx < 0) return { label };
|
|
1927
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
1928
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
|
|
1935
1929
|
let color;
|
|
1936
1930
|
if (diagnostics && line12 !== void 0) {
|
|
1937
|
-
color = resolveColorWithDiagnostic(
|
|
1931
|
+
color = resolveColorWithDiagnostic(trailing, line12, diagnostics, palette);
|
|
1938
1932
|
} else {
|
|
1939
|
-
color = resolveColor(
|
|
1933
|
+
color = resolveColor(trailing, palette) ?? void 0;
|
|
1940
1934
|
}
|
|
1941
1935
|
return {
|
|
1942
|
-
label: label.substring(0,
|
|
1936
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
1943
1937
|
color
|
|
1944
1938
|
};
|
|
1945
1939
|
}
|
|
@@ -2072,14 +2066,18 @@ function parseSeriesNames(value, lines, lineIndex, palette, diagnostics) {
|
|
|
2072
2066
|
}
|
|
2073
2067
|
return { series, names, nameColors, nameLineNumbers, newIndex };
|
|
2074
2068
|
}
|
|
2075
|
-
function
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
return
|
|
2069
|
+
function peelTrailingColorName(label) {
|
|
2070
|
+
const lastSpaceIdx = Math.max(
|
|
2071
|
+
label.lastIndexOf(" "),
|
|
2072
|
+
label.lastIndexOf(" ")
|
|
2073
|
+
);
|
|
2074
|
+
if (lastSpaceIdx < 0) return { label };
|
|
2075
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
2076
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
|
|
2077
|
+
return {
|
|
2078
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
2079
|
+
colorName: trailing
|
|
2080
|
+
};
|
|
2083
2081
|
}
|
|
2084
2082
|
function parsePipeMetadata(segments, aliasMap = /* @__PURE__ */ new Map(), errorMultiplePipes) {
|
|
2085
2083
|
if (segments.length > 2) {
|
|
@@ -2101,11 +2099,14 @@ function parsePipeMetadata(segments, aliasMap = /* @__PURE__ */ new Map(), error
|
|
|
2101
2099
|
}
|
|
2102
2100
|
return metadata;
|
|
2103
2101
|
}
|
|
2104
|
-
var ALL_CHART_TYPES, PIPE_KEY_VALUE_PREFIX_RE, PIPE_LIKELY_STRUCTURED_TAIL_RE,
|
|
2102
|
+
var RECOGNIZED_COLOR_SET, ALL_CHART_TYPES, PIPE_KEY_VALUE_PREFIX_RE, PIPE_LIKELY_STRUCTURED_TAIL_RE, OPTION_NOCOLON_RE, GLOBAL_BOOLEANS, MULTIPLE_PIPE_ERROR;
|
|
2105
2103
|
var init_parsing = __esm({
|
|
2106
2104
|
"src/utils/parsing.ts"() {
|
|
2107
2105
|
"use strict";
|
|
2108
2106
|
init_colors();
|
|
2107
|
+
RECOGNIZED_COLOR_SET = new Set(
|
|
2108
|
+
RECOGNIZED_COLOR_NAMES
|
|
2109
|
+
);
|
|
2109
2110
|
ALL_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
2110
2111
|
// data charts
|
|
2111
2112
|
"bar",
|
|
@@ -2157,7 +2158,6 @@ var init_parsing = __esm({
|
|
|
2157
2158
|
]);
|
|
2158
2159
|
PIPE_KEY_VALUE_PREFIX_RE = /^\s*[A-Za-z][A-Za-z0-9_-]*\s*:/;
|
|
2159
2160
|
PIPE_LIKELY_STRUCTURED_TAIL_RE = /,\s*[A-Za-z][A-Za-z0-9_-]*\s*:/;
|
|
2160
|
-
COLOR_SUFFIX_RE = /\(([^)]+)\)\s*$/;
|
|
2161
2161
|
OPTION_NOCOLON_RE = /^([a-z][a-z0-9-]*)\s+(.+)$/i;
|
|
2162
2162
|
GLOBAL_BOOLEANS = /* @__PURE__ */ new Set([
|
|
2163
2163
|
"solid-fill",
|
|
@@ -2194,7 +2194,7 @@ function parseTagDeclaration(line12) {
|
|
|
2194
2194
|
let restStartIdx = 1;
|
|
2195
2195
|
let valueStart = tokens.length;
|
|
2196
2196
|
for (let i = 1; i < tokens.length; i++) {
|
|
2197
|
-
if (tokens[i].includes("
|
|
2197
|
+
if (tokens[i].includes(",")) {
|
|
2198
2198
|
valueStart = i;
|
|
2199
2199
|
break;
|
|
2200
2200
|
}
|
|
@@ -2226,13 +2226,29 @@ function parseTagDeclaration(line12) {
|
|
|
2226
2226
|
restStartIdx = valueStart;
|
|
2227
2227
|
}
|
|
2228
2228
|
} else {
|
|
2229
|
-
|
|
2230
|
-
|
|
2229
|
+
const isColorWord = (s) => RECOGNIZED_COLOR_NAMES.includes(s);
|
|
2230
|
+
if (valueStart < tokens.length) {
|
|
2231
|
+
const commaTokenIdx = valueStart;
|
|
2232
|
+
const lastBeforeComma = tokens[commaTokenIdx].replace(/,$/, "");
|
|
2233
|
+
const firstValueStart = isColorWord(lastBeforeComma) ? commaTokenIdx - 1 : commaTokenIdx;
|
|
2234
|
+
const prefixEnd = firstValueStart;
|
|
2235
|
+
const aliasCandidate = prefixEnd > 1 ? tokens[prefixEnd - 1] : void 0;
|
|
2236
|
+
if (aliasCandidate && isAliasToken(aliasCandidate) && !isColorWord(aliasCandidate)) {
|
|
2237
|
+
alias = aliasCandidate;
|
|
2238
|
+
legacyForm = "bare-shorthand";
|
|
2239
|
+
name = tokens.slice(0, prefixEnd - 1).map((t) => stripQuotes(t)).join(" ");
|
|
2240
|
+
restStartIdx = prefixEnd;
|
|
2241
|
+
} else {
|
|
2242
|
+
name = tokens.slice(0, prefixEnd).map((t) => stripQuotes(t)).join(" ");
|
|
2243
|
+
restStartIdx = prefixEnd;
|
|
2244
|
+
}
|
|
2245
|
+
} else if (tokens[0][0] === '"' || tokens[0][0] === "'") {
|
|
2246
|
+
if (tokens.length > 1 && isAliasToken(tokens[1]) && !isColorWord(tokens[1])) {
|
|
2231
2247
|
alias = tokens[1];
|
|
2232
2248
|
legacyForm = "bare-shorthand";
|
|
2233
2249
|
restStartIdx = 2;
|
|
2234
2250
|
}
|
|
2235
|
-
} else if (valueStart > 1 && isAliasToken(tokens[valueStart - 1])) {
|
|
2251
|
+
} else if (valueStart > 1 && isAliasToken(tokens[valueStart - 1]) && !isColorWord(tokens[valueStart - 1])) {
|
|
2236
2252
|
alias = tokens[valueStart - 1];
|
|
2237
2253
|
legacyForm = "bare-shorthand";
|
|
2238
2254
|
name = tokens.slice(0, valueStart - 1).map((t) => stripQuotes(t)).join(" ");
|
|
@@ -2247,10 +2263,13 @@ function parseTagDeclaration(line12) {
|
|
|
2247
2263
|
inlineValues = valueStr.split(",").map((v) => v.trim()).filter(Boolean);
|
|
2248
2264
|
}
|
|
2249
2265
|
if (!inlineValues || inlineValues.length === 0) {
|
|
2250
|
-
const
|
|
2251
|
-
if (
|
|
2252
|
-
|
|
2253
|
-
|
|
2266
|
+
const lastSpaceIdx = name.lastIndexOf(" ");
|
|
2267
|
+
if (lastSpaceIdx > 0) {
|
|
2268
|
+
const trailing = name.substring(lastSpaceIdx + 1);
|
|
2269
|
+
if (RECOGNIZED_COLOR_NAMES.includes(trailing)) {
|
|
2270
|
+
colorHint = trailing;
|
|
2271
|
+
name = name.substring(0, lastSpaceIdx).trimEnd();
|
|
2272
|
+
}
|
|
2254
2273
|
}
|
|
2255
2274
|
}
|
|
2256
2275
|
return {
|
|
@@ -2378,6 +2397,7 @@ var init_tag_groups = __esm({
|
|
|
2378
2397
|
"use strict";
|
|
2379
2398
|
init_parsing();
|
|
2380
2399
|
init_diagnostics();
|
|
2400
|
+
init_colors();
|
|
2381
2401
|
TAG_BLOCK_NOCOLON_RE = /^tag\s+/i;
|
|
2382
2402
|
VALID_TAG_IDENT_RE = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
2383
2403
|
}
|
|
@@ -2651,7 +2671,7 @@ function buildControlsGroupLayout(config, state) {
|
|
|
2651
2671
|
}
|
|
2652
2672
|
function computeLegendLayout(config, state, containerWidth) {
|
|
2653
2673
|
const { groups, controls: configControls, mode } = config;
|
|
2654
|
-
const isExport = mode === "
|
|
2674
|
+
const isExport = mode === "export";
|
|
2655
2675
|
const activeGroupName = state.activeGroup?.toLowerCase() ?? null;
|
|
2656
2676
|
if (isExport && !activeGroupName) {
|
|
2657
2677
|
return {
|
|
@@ -2941,7 +2961,10 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
2941
2961
|
const width = containerWidth ?? parseFloat(container.attr("width") || "800");
|
|
2942
2962
|
let currentState = { ...state };
|
|
2943
2963
|
let currentLayout;
|
|
2944
|
-
const legendG = container.append("g").attr("class", "dgmo-legend")
|
|
2964
|
+
const legendG = container.append("g").attr("class", "dgmo-legend").attr("data-legend-title-relation", config.position.titleRelation).attr(
|
|
2965
|
+
"data-legend-capsule-addon-width",
|
|
2966
|
+
String(config.capsulePillAddonWidth ?? 0)
|
|
2967
|
+
);
|
|
2945
2968
|
function render2() {
|
|
2946
2969
|
currentLayout = computeLegendLayout(config, currentState, width);
|
|
2947
2970
|
legendG.selectAll("*").remove();
|
|
@@ -3800,7 +3823,7 @@ function parseSequenceDgmo(content) {
|
|
|
3800
3823
|
if (groupColor) {
|
|
3801
3824
|
pushWarning(
|
|
3802
3825
|
lineNumber,
|
|
3803
|
-
`(${groupColor}) color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3826
|
+
`'(${groupColor})' parens-color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3804
3827
|
);
|
|
3805
3828
|
}
|
|
3806
3829
|
contentStarted = true;
|
|
@@ -3880,7 +3903,7 @@ function parseSequenceDgmo(content) {
|
|
|
3880
3903
|
if (!color) {
|
|
3881
3904
|
pushError(
|
|
3882
3905
|
lineNumber,
|
|
3883
|
-
`Expected 'Value
|
|
3906
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
3884
3907
|
);
|
|
3885
3908
|
continue;
|
|
3886
3909
|
}
|
|
@@ -3904,11 +3927,13 @@ function parseSequenceDgmo(content) {
|
|
|
3904
3927
|
blockStack.pop();
|
|
3905
3928
|
}
|
|
3906
3929
|
const labelRaw = sectionMatch[1].trim();
|
|
3907
|
-
const colorMatch = labelRaw.match(
|
|
3930
|
+
const colorMatch = labelRaw.match(
|
|
3931
|
+
/^(.+?)\((red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\)$/
|
|
3932
|
+
);
|
|
3908
3933
|
if (colorMatch) {
|
|
3909
3934
|
pushWarning(
|
|
3910
3935
|
lineNumber,
|
|
3911
|
-
`(${colorMatch[2]
|
|
3936
|
+
`'(${colorMatch[2]})' parens-color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3912
3937
|
);
|
|
3913
3938
|
}
|
|
3914
3939
|
contentStarted = true;
|
|
@@ -4063,7 +4088,7 @@ function parseSequenceDgmo(content) {
|
|
|
4063
4088
|
const color = coloredMatch[2].trim();
|
|
4064
4089
|
pushError(
|
|
4065
4090
|
lineNumber,
|
|
4066
|
-
`'${id}(${color})' syntax is no longer supported \u2014 use 'tag:' groups for coloring`
|
|
4091
|
+
`'${id}(${color})' parens-color syntax is no longer supported \u2014 use 'tag:' groups for coloring`
|
|
4067
4092
|
);
|
|
4068
4093
|
contentStarted = true;
|
|
4069
4094
|
const key = addParticipant(id, lineNumber, { metadata: colorMeta });
|
|
@@ -4442,7 +4467,7 @@ var init_parser = __esm({
|
|
|
4442
4467
|
]);
|
|
4443
4468
|
IS_A_PATTERN = /^([^:]+?)\s+is\s+an?\s+(\w+)(?:\s+(.+))?$/i;
|
|
4444
4469
|
POSITION_ONLY_PATTERN = /^([^:]+?)\s+position\s+(-?\d+)$/i;
|
|
4445
|
-
COLORED_PARTICIPANT_PATTERN = /^(\S+?)\((
|
|
4470
|
+
COLORED_PARTICIPANT_PATTERN = /^(\S+?)\((red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\)\s*$/;
|
|
4446
4471
|
GROUP_HEADING_PATTERN = /^\[([^\]|]+?)(?:\(([^)]+)\))?\]\s*(.*)$/;
|
|
4447
4472
|
GROUP_HEADING_FALLBACK = /^\[([^\]]+)\]\s*(.*)$/;
|
|
4448
4473
|
LEGACY_GROUP_PATTERN = /^##\s+(.+?)(?:\(([^)]+)\))?\s*$/;
|
|
@@ -4511,7 +4536,6 @@ function splitArrows(line12) {
|
|
|
4511
4536
|
const arrowEnd = idx + 2;
|
|
4512
4537
|
let arrowStart;
|
|
4513
4538
|
let label;
|
|
4514
|
-
let color;
|
|
4515
4539
|
let openingStart = -1;
|
|
4516
4540
|
for (let i = scanFloor; i < runStart; i++) {
|
|
4517
4541
|
if (line12[i] !== "-") continue;
|
|
@@ -4524,21 +4548,13 @@ function splitArrows(line12) {
|
|
|
4524
4548
|
if (openingStart !== -1) {
|
|
4525
4549
|
let openingEnd = openingStart;
|
|
4526
4550
|
while (openingEnd < runStart && line12[openingEnd] === "-") openingEnd++;
|
|
4527
|
-
const
|
|
4528
|
-
|
|
4529
|
-
if (colorMatch) {
|
|
4530
|
-
color = colorMatch[1].trim();
|
|
4531
|
-
const labelPart = arrowContent.substring(0, colorMatch.index).trim();
|
|
4532
|
-
if (labelPart) label = labelPart;
|
|
4533
|
-
} else {
|
|
4534
|
-
const labelPart = arrowContent.trim();
|
|
4535
|
-
if (labelPart) label = labelPart;
|
|
4536
|
-
}
|
|
4551
|
+
const labelPart = line12.substring(openingEnd, runStart).trim();
|
|
4552
|
+
if (labelPart) label = labelPart;
|
|
4537
4553
|
arrowStart = openingStart;
|
|
4538
4554
|
} else {
|
|
4539
4555
|
arrowStart = runStart;
|
|
4540
4556
|
}
|
|
4541
|
-
arrowPositions.push({ start: arrowStart, end: arrowEnd, label
|
|
4557
|
+
arrowPositions.push({ start: arrowStart, end: arrowEnd, label });
|
|
4542
4558
|
searchFrom = arrowEnd;
|
|
4543
4559
|
scanFloor = arrowEnd;
|
|
4544
4560
|
}
|
|
@@ -4552,11 +4568,7 @@ function splitArrows(line12) {
|
|
|
4552
4568
|
if (beforeText || i === 0) {
|
|
4553
4569
|
segments.push(beforeText);
|
|
4554
4570
|
}
|
|
4555
|
-
|
|
4556
|
-
if (arrow.label && arrow.color)
|
|
4557
|
-
arrowToken = `-${arrow.label}(${arrow.color})->`;
|
|
4558
|
-
else if (arrow.label) arrowToken = `-${arrow.label}->`;
|
|
4559
|
-
else if (arrow.color) arrowToken = `-(${arrow.color})->`;
|
|
4571
|
+
const arrowToken = arrow.label ? `-${arrow.label}->` : "->";
|
|
4560
4572
|
segments.push(arrowToken);
|
|
4561
4573
|
lastIndex = arrow.end;
|
|
4562
4574
|
}
|
|
@@ -4566,45 +4578,14 @@ function splitArrows(line12) {
|
|
|
4566
4578
|
}
|
|
4567
4579
|
return segments;
|
|
4568
4580
|
}
|
|
4569
|
-
function parseArrowToken(token,
|
|
4581
|
+
function parseArrowToken(token, _palette, lineNumber, diagnostics) {
|
|
4570
4582
|
if (token === "->") return {};
|
|
4571
|
-
const
|
|
4572
|
-
if (bareParen) {
|
|
4573
|
-
const colorName = matchColorParens(bareParen[1]);
|
|
4574
|
-
if (colorName) {
|
|
4575
|
-
return {
|
|
4576
|
-
color: resolveColorWithDiagnostic(
|
|
4577
|
-
colorName,
|
|
4578
|
-
lineNumber,
|
|
4579
|
-
diagnostics,
|
|
4580
|
-
palette
|
|
4581
|
-
)
|
|
4582
|
-
};
|
|
4583
|
-
}
|
|
4584
|
-
}
|
|
4585
|
-
const m = token.match(/^-(.+?)(?:\(([^)]+)\))?->$/);
|
|
4583
|
+
const m = token.match(/^-(.+?)->$/);
|
|
4586
4584
|
if (m) {
|
|
4587
4585
|
const rawLabel = m[1] ?? "";
|
|
4588
4586
|
const labelResult = parseInArrowLabel(rawLabel, lineNumber);
|
|
4589
4587
|
diagnostics.push(...labelResult.diagnostics);
|
|
4590
|
-
|
|
4591
|
-
let color = m[2] ? resolveColorWithDiagnostic(
|
|
4592
|
-
m[2].trim(),
|
|
4593
|
-
lineNumber,
|
|
4594
|
-
diagnostics,
|
|
4595
|
-
palette
|
|
4596
|
-
) : void 0;
|
|
4597
|
-
if (label && !color) {
|
|
4598
|
-
const inferred = inferArrowColor(label);
|
|
4599
|
-
if (inferred)
|
|
4600
|
-
color = resolveColorWithDiagnostic(
|
|
4601
|
-
inferred,
|
|
4602
|
-
lineNumber,
|
|
4603
|
-
diagnostics,
|
|
4604
|
-
palette
|
|
4605
|
-
);
|
|
4606
|
-
}
|
|
4607
|
-
return { label, color };
|
|
4588
|
+
return { label: labelResult.label };
|
|
4608
4589
|
}
|
|
4609
4590
|
return {};
|
|
4610
4591
|
}
|
|
@@ -4670,13 +4651,12 @@ function parseFlowchart(content, palette) {
|
|
|
4670
4651
|
result.nodes.push(node);
|
|
4671
4652
|
return node;
|
|
4672
4653
|
}
|
|
4673
|
-
function addEdge(sourceId, targetId, lineNumber, label
|
|
4654
|
+
function addEdge(sourceId, targetId, lineNumber, label) {
|
|
4674
4655
|
const edge = {
|
|
4675
4656
|
source: sourceId,
|
|
4676
4657
|
target: targetId,
|
|
4677
4658
|
lineNumber,
|
|
4678
|
-
...label && { label }
|
|
4679
|
-
...color && { color }
|
|
4659
|
+
...label && { label }
|
|
4680
4660
|
};
|
|
4681
4661
|
result.edges.push(edge);
|
|
4682
4662
|
}
|
|
@@ -4742,13 +4722,7 @@ function parseFlowchart(content, palette) {
|
|
|
4742
4722
|
if (pendingArrow !== null) {
|
|
4743
4723
|
const sourceId = lastNodeId ?? implicitSourceId;
|
|
4744
4724
|
if (sourceId) {
|
|
4745
|
-
addEdge(
|
|
4746
|
-
sourceId,
|
|
4747
|
-
node.id,
|
|
4748
|
-
lineNumber,
|
|
4749
|
-
pendingArrow.label,
|
|
4750
|
-
pendingArrow.color
|
|
4751
|
-
);
|
|
4725
|
+
addEdge(sourceId, node.id, lineNumber, pendingArrow.label);
|
|
4752
4726
|
}
|
|
4753
4727
|
pendingArrow = null;
|
|
4754
4728
|
} else if (lastNodeId === null && implicitSourceId === null) {
|
|
@@ -4873,7 +4847,6 @@ var NODE_ID_RE;
|
|
|
4873
4847
|
var init_flowchart_parser = __esm({
|
|
4874
4848
|
"src/graph/flowchart-parser.ts"() {
|
|
4875
4849
|
"use strict";
|
|
4876
|
-
init_colors();
|
|
4877
4850
|
init_diagnostics();
|
|
4878
4851
|
init_arrows();
|
|
4879
4852
|
init_parsing();
|
|
@@ -4901,7 +4874,6 @@ function splitArrows2(line12) {
|
|
|
4901
4874
|
const arrowEnd = idx + 2;
|
|
4902
4875
|
let arrowStart;
|
|
4903
4876
|
let label;
|
|
4904
|
-
let color;
|
|
4905
4877
|
let openingStart = -1;
|
|
4906
4878
|
for (let i = scanFloor; i < runStart; i++) {
|
|
4907
4879
|
if (line12[i] !== "-") continue;
|
|
@@ -4914,21 +4886,13 @@ function splitArrows2(line12) {
|
|
|
4914
4886
|
if (openingStart !== -1) {
|
|
4915
4887
|
let openingEnd = openingStart;
|
|
4916
4888
|
while (openingEnd < runStart && line12[openingEnd] === "-") openingEnd++;
|
|
4917
|
-
const
|
|
4918
|
-
|
|
4919
|
-
if (colorMatch) {
|
|
4920
|
-
color = colorMatch[1].trim();
|
|
4921
|
-
const labelPart = arrowContent.substring(0, colorMatch.index).trim();
|
|
4922
|
-
if (labelPart) label = labelPart;
|
|
4923
|
-
} else {
|
|
4924
|
-
const labelPart = arrowContent.trim();
|
|
4925
|
-
if (labelPart) label = labelPart;
|
|
4926
|
-
}
|
|
4889
|
+
const labelPart = line12.substring(openingEnd, runStart).trim();
|
|
4890
|
+
if (labelPart) label = labelPart;
|
|
4927
4891
|
arrowStart = openingStart;
|
|
4928
4892
|
} else {
|
|
4929
4893
|
arrowStart = runStart;
|
|
4930
4894
|
}
|
|
4931
|
-
arrowPositions.push({ start: arrowStart, end: arrowEnd, label
|
|
4895
|
+
arrowPositions.push({ start: arrowStart, end: arrowEnd, label });
|
|
4932
4896
|
searchFrom = arrowEnd;
|
|
4933
4897
|
scanFloor = arrowEnd;
|
|
4934
4898
|
}
|
|
@@ -4938,11 +4902,7 @@ function splitArrows2(line12) {
|
|
|
4938
4902
|
const arrow = arrowPositions[i];
|
|
4939
4903
|
const beforeText = line12.substring(lastIndex, arrow.start).trim();
|
|
4940
4904
|
if (beforeText || i === 0) segments.push(beforeText);
|
|
4941
|
-
|
|
4942
|
-
if (arrow.label && arrow.color)
|
|
4943
|
-
arrowToken = `-${arrow.label}(${arrow.color})->`;
|
|
4944
|
-
else if (arrow.label) arrowToken = `-${arrow.label}->`;
|
|
4945
|
-
else if (arrow.color) arrowToken = `-(${arrow.color})->`;
|
|
4905
|
+
const arrowToken = arrow.label ? `-${arrow.label}->` : "->";
|
|
4946
4906
|
segments.push(arrowToken);
|
|
4947
4907
|
lastIndex = arrow.end;
|
|
4948
4908
|
}
|
|
@@ -4950,35 +4910,14 @@ function splitArrows2(line12) {
|
|
|
4950
4910
|
if (remaining) segments.push(remaining);
|
|
4951
4911
|
return segments;
|
|
4952
4912
|
}
|
|
4953
|
-
function parseArrowToken2(token,
|
|
4913
|
+
function parseArrowToken2(token, _palette, lineNumber, diagnostics) {
|
|
4954
4914
|
if (token === "->") return {};
|
|
4955
|
-
const
|
|
4956
|
-
if (bareParen) {
|
|
4957
|
-
const colorName = matchColorParens(bareParen[1]);
|
|
4958
|
-
if (colorName) {
|
|
4959
|
-
return {
|
|
4960
|
-
color: resolveColorWithDiagnostic(
|
|
4961
|
-
colorName,
|
|
4962
|
-
lineNumber,
|
|
4963
|
-
diagnostics,
|
|
4964
|
-
palette
|
|
4965
|
-
)
|
|
4966
|
-
};
|
|
4967
|
-
}
|
|
4968
|
-
}
|
|
4969
|
-
const m = token.match(/^-(.+?)(?:\(([^)]+)\))?->$/);
|
|
4915
|
+
const m = token.match(/^-(.+?)->$/);
|
|
4970
4916
|
if (m) {
|
|
4971
4917
|
const rawLabel = m[1] ?? "";
|
|
4972
4918
|
const labelResult = parseInArrowLabel(rawLabel, lineNumber);
|
|
4973
4919
|
diagnostics.push(...labelResult.diagnostics);
|
|
4974
|
-
|
|
4975
|
-
const color = m[2] ? resolveColorWithDiagnostic(
|
|
4976
|
-
m[2].trim(),
|
|
4977
|
-
lineNumber,
|
|
4978
|
-
diagnostics,
|
|
4979
|
-
palette
|
|
4980
|
-
) : void 0;
|
|
4981
|
-
return { label, color };
|
|
4920
|
+
return { label: labelResult.label };
|
|
4982
4921
|
}
|
|
4983
4922
|
return {};
|
|
4984
4923
|
}
|
|
@@ -5069,13 +5008,12 @@ function parseState(content, palette) {
|
|
|
5069
5008
|
}
|
|
5070
5009
|
return node;
|
|
5071
5010
|
}
|
|
5072
|
-
function addEdge(sourceId, targetId, lineNumber, label
|
|
5011
|
+
function addEdge(sourceId, targetId, lineNumber, label) {
|
|
5073
5012
|
result.edges.push({
|
|
5074
5013
|
source: sourceId,
|
|
5075
5014
|
target: targetId,
|
|
5076
5015
|
lineNumber,
|
|
5077
|
-
...label && { label }
|
|
5078
|
-
...color && { color }
|
|
5016
|
+
...label && { label }
|
|
5079
5017
|
});
|
|
5080
5018
|
}
|
|
5081
5019
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -5218,13 +5156,7 @@ function parseState(content, palette) {
|
|
|
5218
5156
|
if (pendingArrow !== null) {
|
|
5219
5157
|
const sourceId = lastNodeId ?? implicitSourceId;
|
|
5220
5158
|
if (sourceId) {
|
|
5221
|
-
addEdge(
|
|
5222
|
-
sourceId,
|
|
5223
|
-
node.id,
|
|
5224
|
-
lineNumber,
|
|
5225
|
-
pendingArrow.label,
|
|
5226
|
-
pendingArrow.color
|
|
5227
|
-
);
|
|
5159
|
+
addEdge(sourceId, node.id, lineNumber, pendingArrow.label);
|
|
5228
5160
|
}
|
|
5229
5161
|
pendingArrow = null;
|
|
5230
5162
|
}
|
|
@@ -5277,7 +5209,7 @@ var init_state_parser = __esm({
|
|
|
5277
5209
|
init_name_normalize();
|
|
5278
5210
|
PSEUDOSTATE_ID = "pseudostate:[*]";
|
|
5279
5211
|
PSEUDOSTATE_LABEL = "[*]";
|
|
5280
|
-
GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\(
|
|
5212
|
+
GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/;
|
|
5281
5213
|
}
|
|
5282
5214
|
});
|
|
5283
5215
|
|
|
@@ -5656,7 +5588,7 @@ var init_parser2 = __esm({
|
|
|
5656
5588
|
init_arrows();
|
|
5657
5589
|
init_parsing();
|
|
5658
5590
|
init_name_normalize();
|
|
5659
|
-
CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+extends\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+implements\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+\[(abstract|interface|enum)\])?(?:\s
|
|
5591
|
+
CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+extends\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+implements\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+\[(abstract|interface|enum)\])?(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/;
|
|
5660
5592
|
INDENT_REL_ARROW_RE = /^(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Za-z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
5661
5593
|
REL_ARROW_RE = /^(?:"([^"]+)"|([A-Z][^":]*?))\s*(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
5662
5594
|
VISIBILITY_RE = /^([+\-#])\s*/;
|
|
@@ -5863,7 +5795,7 @@ function parseERDiagram(content, palette) {
|
|
|
5863
5795
|
result.diagnostics.push(
|
|
5864
5796
|
makeDgmoError(
|
|
5865
5797
|
lineNumber,
|
|
5866
|
-
`Expected 'Value
|
|
5798
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`,
|
|
5867
5799
|
"warning"
|
|
5868
5800
|
)
|
|
5869
5801
|
);
|
|
@@ -5975,7 +5907,7 @@ function parseERDiagram(content, palette) {
|
|
|
5975
5907
|
if (result.tables.length === 0 && !result.error) {
|
|
5976
5908
|
const diag = makeDgmoError(
|
|
5977
5909
|
1,
|
|
5978
|
-
'No tables found. Add table declarations like "users" or "orders
|
|
5910
|
+
'No tables found. Add table declarations like "users" or "orders blue".'
|
|
5979
5911
|
);
|
|
5980
5912
|
result.diagnostics.push(diag);
|
|
5981
5913
|
result.error = formatDgmoError(diag);
|
|
@@ -6061,15 +5993,19 @@ function extractSymbols3(docText) {
|
|
|
6061
5993
|
for (const rawLine of docText.split("\n")) {
|
|
6062
5994
|
const line12 = rawLine.trim();
|
|
6063
5995
|
if (inMetadata && /^er(\s|$)/i.test(line12)) continue;
|
|
6064
|
-
if (inMetadata && OPTION_NOCOLON_RE.test(line12)) continue;
|
|
6065
|
-
inMetadata = false;
|
|
6066
|
-
if (line12.length === 0) continue;
|
|
6067
5996
|
if (/^\s/.test(rawLine)) continue;
|
|
5997
|
+
if (line12.length === 0) continue;
|
|
6068
5998
|
const m = TABLE_DECL_RE.exec(line12);
|
|
6069
5999
|
if (m) {
|
|
6070
6000
|
const name = (m[1] ?? m[2] ?? "").trim();
|
|
6071
|
-
if (name)
|
|
6001
|
+
if (name) {
|
|
6002
|
+
inMetadata = false;
|
|
6003
|
+
entities.push(name);
|
|
6004
|
+
continue;
|
|
6005
|
+
}
|
|
6072
6006
|
}
|
|
6007
|
+
if (inMetadata && OPTION_NOCOLON_RE.test(line12)) continue;
|
|
6008
|
+
inMetadata = false;
|
|
6073
6009
|
}
|
|
6074
6010
|
return {
|
|
6075
6011
|
kind: "er",
|
|
@@ -6087,7 +6023,7 @@ var init_parser3 = __esm({
|
|
|
6087
6023
|
init_name_normalize();
|
|
6088
6024
|
init_parsing();
|
|
6089
6025
|
init_tag_groups();
|
|
6090
|
-
TABLE_DECL_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":(]*?))(?:\s
|
|
6026
|
+
TABLE_DECL_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":(]*?))(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s*\|(.+))?$/;
|
|
6091
6027
|
INDENT_REL_RE = /^([1*?])-{1,2}(?:(.+?)-{1,2})?([1*?])\s+(?:"([^"]+)"|([a-zA-Z_][^":]*?))\s*$/;
|
|
6092
6028
|
CONSTRAINT_MAP = {
|
|
6093
6029
|
pk: "pk",
|
|
@@ -6167,18 +6103,22 @@ function parseChart(content, palette) {
|
|
|
6167
6103
|
return fail(lineNumber, msg2);
|
|
6168
6104
|
}
|
|
6169
6105
|
}
|
|
6170
|
-
const eraMatch = trimmed.match(
|
|
6171
|
-
/^era\s+(.+?)\s*->\s*(.+?)(?:\s*\(([^)]+)\))?\s*$/
|
|
6172
|
-
);
|
|
6106
|
+
const eraMatch = trimmed.match(/^era\s+(.+?)\s*->\s*(.+?)\s*$/);
|
|
6173
6107
|
if (eraMatch) {
|
|
6174
6108
|
const afterArrow = eraMatch[2].trim();
|
|
6175
6109
|
const spaceIdx2 = afterArrow.indexOf(" ");
|
|
6176
6110
|
if (spaceIdx2 >= 0) {
|
|
6111
|
+
const lastSpaceIdx = afterArrow.lastIndexOf(" ");
|
|
6112
|
+
const trailing = afterArrow.substring(lastSpaceIdx + 1);
|
|
6113
|
+
const hasColor = RECOGNIZED_COLOR_NAMES.includes(
|
|
6114
|
+
trailing
|
|
6115
|
+
);
|
|
6116
|
+
const labelPart = hasColor ? afterArrow.substring(0, lastSpaceIdx).trimEnd() : afterArrow;
|
|
6177
6117
|
rawEras.push({
|
|
6178
6118
|
start: eraMatch[1].trim(),
|
|
6179
|
-
afterArrow,
|
|
6180
|
-
color:
|
|
6181
|
-
|
|
6119
|
+
afterArrow: labelPart,
|
|
6120
|
+
color: hasColor ? resolveColorWithDiagnostic(
|
|
6121
|
+
trailing,
|
|
6182
6122
|
lineNumber,
|
|
6183
6123
|
result.diagnostics,
|
|
6184
6124
|
palette
|
|
@@ -6691,11 +6631,12 @@ function parseExtendedChart(content, palette) {
|
|
|
6691
6631
|
return result;
|
|
6692
6632
|
}
|
|
6693
6633
|
}
|
|
6694
|
-
const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s
|
|
6634
|
+
const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s+(\S+))?\s*$/);
|
|
6695
6635
|
if (categoryMatch) {
|
|
6696
6636
|
const catName = categoryMatch[1].trim();
|
|
6697
|
-
const
|
|
6698
|
-
|
|
6637
|
+
const rawCatColor = categoryMatch[2]?.trim();
|
|
6638
|
+
const catColor = rawCatColor ? resolveColorWithDiagnostic(
|
|
6639
|
+
rawCatColor,
|
|
6699
6640
|
lineNumber,
|
|
6700
6641
|
result.diagnostics,
|
|
6701
6642
|
palette
|
|
@@ -6710,7 +6651,7 @@ function parseExtendedChart(content, palette) {
|
|
|
6710
6651
|
continue;
|
|
6711
6652
|
}
|
|
6712
6653
|
const arrowMatch = trimmed.match(
|
|
6713
|
-
/^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)
|
|
6654
|
+
/^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
6714
6655
|
);
|
|
6715
6656
|
if (arrowMatch) {
|
|
6716
6657
|
const [, rawSource, arrow, rawTarget, rawVal, rawLinkColor] = arrowMatch;
|
|
@@ -6755,9 +6696,12 @@ function parseExtendedChart(content, palette) {
|
|
|
6755
6696
|
}
|
|
6756
6697
|
if (sankeyStack.length > 0) {
|
|
6757
6698
|
const valColorMatch = trimmed.match(
|
|
6758
|
-
/(-?[\d,_]+(?:\.[\d]+)?)\s
|
|
6699
|
+
/(-?[\d,_]+(?:\.[\d]+)?)\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/
|
|
6759
6700
|
);
|
|
6760
|
-
const strippedLine = valColorMatch ? trimmed.replace(
|
|
6701
|
+
const strippedLine = valColorMatch ? trimmed.replace(
|
|
6702
|
+
/\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/,
|
|
6703
|
+
""
|
|
6704
|
+
) : trimmed;
|
|
6761
6705
|
const dataRow2 = parseDataRowValues(strippedLine);
|
|
6762
6706
|
if (dataRow2 && dataRow2.values.length === 1) {
|
|
6763
6707
|
const source = sankeyStack.at(-1).name;
|
|
@@ -9137,7 +9081,7 @@ function parseOrg(content, palette) {
|
|
|
9137
9081
|
if (!color) {
|
|
9138
9082
|
pushError(
|
|
9139
9083
|
lineNumber,
|
|
9140
|
-
`Expected 'Value
|
|
9084
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9141
9085
|
);
|
|
9142
9086
|
continue;
|
|
9143
9087
|
}
|
|
@@ -9428,7 +9372,7 @@ function parseKanban(content, palette) {
|
|
|
9428
9372
|
if (!color) {
|
|
9429
9373
|
warn(
|
|
9430
9374
|
lineNumber,
|
|
9431
|
-
`Expected 'Value
|
|
9375
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9432
9376
|
);
|
|
9433
9377
|
continue;
|
|
9434
9378
|
}
|
|
@@ -9471,8 +9415,9 @@ function parseKanban(content, palette) {
|
|
|
9471
9415
|
currentCard = null;
|
|
9472
9416
|
columnCounter++;
|
|
9473
9417
|
const colName = columnMatch[1].trim();
|
|
9474
|
-
const
|
|
9475
|
-
|
|
9418
|
+
const rawTrailing = columnMatch[2]?.trim();
|
|
9419
|
+
const colColor = rawTrailing ? resolveColorWithDiagnostic(
|
|
9420
|
+
rawTrailing,
|
|
9476
9421
|
lineNumber,
|
|
9477
9422
|
result.diagnostics,
|
|
9478
9423
|
palette
|
|
@@ -9627,7 +9572,7 @@ var init_parser5 = __esm({
|
|
|
9627
9572
|
init_tag_groups();
|
|
9628
9573
|
init_parsing();
|
|
9629
9574
|
init_name_normalize();
|
|
9630
|
-
COLUMN_RE = /^\[(.+?)\](?:\s
|
|
9575
|
+
COLUMN_RE = /^\[(.+?)\](?:\s+(\S+))?(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*(?:\|\s*(.+))?$/;
|
|
9631
9576
|
LEGACY_COLUMN_RE = /^==\s+(.+?)\s*(?:\[wip:\s*(\d+)\])?\s*==$/;
|
|
9632
9577
|
KNOWN_OPTIONS4 = /* @__PURE__ */ new Set(["hide", "active-tag"]);
|
|
9633
9578
|
KNOWN_BOOLEANS3 = /* @__PURE__ */ new Set([
|
|
@@ -9810,7 +9755,7 @@ function parseC4(content, palette) {
|
|
|
9810
9755
|
if (!color) {
|
|
9811
9756
|
pushError(
|
|
9812
9757
|
lineNumber,
|
|
9813
|
-
`Expected 'Value
|
|
9758
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9814
9759
|
);
|
|
9815
9760
|
continue;
|
|
9816
9761
|
}
|
|
@@ -10406,7 +10351,7 @@ __export(parser_exports7, {
|
|
|
10406
10351
|
looksLikeSitemap: () => looksLikeSitemap,
|
|
10407
10352
|
parseSitemap: () => parseSitemap
|
|
10408
10353
|
});
|
|
10409
|
-
function parseArrowLine(trimmed,
|
|
10354
|
+
function parseArrowLine(trimmed, _palette, _lineNumber, _diagnostics) {
|
|
10410
10355
|
const bareMatch = trimmed.match(BARE_ARROW_RE);
|
|
10411
10356
|
if (bareMatch) {
|
|
10412
10357
|
const rawTarget = bareMatch[1].trim();
|
|
@@ -10419,27 +10364,10 @@ function parseArrowLine(trimmed, palette, lineNumber, diagnostics) {
|
|
|
10419
10364
|
const arrowMatch = trimmed.match(ARROW_RE);
|
|
10420
10365
|
if (arrowMatch) {
|
|
10421
10366
|
const label = arrowMatch[1]?.trim() || void 0;
|
|
10422
|
-
|
|
10423
|
-
arrowMatch[2].trim(),
|
|
10424
|
-
lineNumber,
|
|
10425
|
-
diagnostics,
|
|
10426
|
-
palette
|
|
10427
|
-
) : void 0;
|
|
10428
|
-
if (label && !color) {
|
|
10429
|
-
const inferred = inferArrowColor(label);
|
|
10430
|
-
if (inferred)
|
|
10431
|
-
color = resolveColorWithDiagnostic(
|
|
10432
|
-
inferred,
|
|
10433
|
-
lineNumber,
|
|
10434
|
-
diagnostics,
|
|
10435
|
-
palette
|
|
10436
|
-
);
|
|
10437
|
-
}
|
|
10438
|
-
const rawTarget = arrowMatch[3].trim();
|
|
10367
|
+
const rawTarget = arrowMatch[2].trim();
|
|
10439
10368
|
const groupMatch = rawTarget.match(/^\[(.+)\]$/);
|
|
10440
10369
|
return {
|
|
10441
10370
|
label,
|
|
10442
|
-
color,
|
|
10443
10371
|
target: groupMatch ? groupMatch[1].trim() : rawTarget,
|
|
10444
10372
|
targetIsGroup: !!groupMatch
|
|
10445
10373
|
};
|
|
@@ -10581,7 +10509,7 @@ function parseSitemap(content, palette) {
|
|
|
10581
10509
|
if (!color) {
|
|
10582
10510
|
pushError(
|
|
10583
10511
|
lineNumber,
|
|
10584
|
-
`Expected 'Value
|
|
10512
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
10585
10513
|
);
|
|
10586
10514
|
continue;
|
|
10587
10515
|
}
|
|
@@ -10618,7 +10546,6 @@ function parseSitemap(content, palette) {
|
|
|
10618
10546
|
targetLabel: arrowInfo.target,
|
|
10619
10547
|
targetIsGroup: arrowInfo.targetIsGroup,
|
|
10620
10548
|
label: arrowInfo.label,
|
|
10621
|
-
color: arrowInfo.color,
|
|
10622
10549
|
lineNumber
|
|
10623
10550
|
});
|
|
10624
10551
|
}
|
|
@@ -10716,7 +10643,6 @@ function parseSitemap(content, palette) {
|
|
|
10716
10643
|
sourceId: arrow.sourceNode.id,
|
|
10717
10644
|
targetId: aliasHit,
|
|
10718
10645
|
label: arrow.label,
|
|
10719
|
-
color: arrow.color,
|
|
10720
10646
|
lineNumber: arrow.lineNumber
|
|
10721
10647
|
});
|
|
10722
10648
|
continue;
|
|
@@ -10736,7 +10662,6 @@ function parseSitemap(content, palette) {
|
|
|
10736
10662
|
sourceId: arrow.sourceNode.id,
|
|
10737
10663
|
targetId: targetContainer.id,
|
|
10738
10664
|
label: arrow.label,
|
|
10739
|
-
color: arrow.color,
|
|
10740
10665
|
lineNumber: arrow.lineNumber
|
|
10741
10666
|
});
|
|
10742
10667
|
} else {
|
|
@@ -10753,7 +10678,6 @@ function parseSitemap(content, palette) {
|
|
|
10753
10678
|
sourceId: arrow.sourceNode.id,
|
|
10754
10679
|
targetId: targetNode.id,
|
|
10755
10680
|
label: arrow.label,
|
|
10756
|
-
color: arrow.color,
|
|
10757
10681
|
lineNumber: arrow.lineNumber
|
|
10758
10682
|
});
|
|
10759
10683
|
}
|
|
@@ -10843,7 +10767,6 @@ var CONTAINER_RE3, METADATA_RE3, ARROW_RE, BARE_ARROW_RE;
|
|
|
10843
10767
|
var init_parser7 = __esm({
|
|
10844
10768
|
"src/sitemap/parser.ts"() {
|
|
10845
10769
|
"use strict";
|
|
10846
|
-
init_colors();
|
|
10847
10770
|
init_diagnostics();
|
|
10848
10771
|
init_name_normalize();
|
|
10849
10772
|
init_tag_groups();
|
|
@@ -10851,7 +10774,7 @@ var init_parser7 = __esm({
|
|
|
10851
10774
|
init_description_helpers();
|
|
10852
10775
|
CONTAINER_RE3 = /^\[([^\]]+)\]\s*(?:\|\s*(.+))?$/;
|
|
10853
10776
|
METADATA_RE3 = /^([^:]+):\s*(.+)$/;
|
|
10854
|
-
ARROW_RE = /^-([
|
|
10777
|
+
ARROW_RE = /^-([^>][^>]*?)?\s*->\s*(.+)$/;
|
|
10855
10778
|
BARE_ARROW_RE = /^->\s*(.+)$/;
|
|
10856
10779
|
}
|
|
10857
10780
|
});
|
|
@@ -11142,13 +11065,18 @@ function parseInfra(content) {
|
|
|
11142
11065
|
}
|
|
11143
11066
|
if (currentTagGroup && indent > 0) {
|
|
11144
11067
|
const { text: cleanEntry, isDefault } = stripDefaultModifier(trimmed);
|
|
11145
|
-
const
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11068
|
+
const lastSpaceIdx = cleanEntry.lastIndexOf(" ");
|
|
11069
|
+
let valueName = cleanEntry;
|
|
11070
|
+
let rawColor;
|
|
11071
|
+
if (lastSpaceIdx > 0) {
|
|
11072
|
+
const trailing = cleanEntry.substring(lastSpaceIdx + 1);
|
|
11073
|
+
if (isRecognizedColorName(trailing)) {
|
|
11074
|
+
rawColor = trailing;
|
|
11075
|
+
valueName = cleanEntry.substring(0, lastSpaceIdx).trimEnd();
|
|
11076
|
+
}
|
|
11077
|
+
}
|
|
11078
|
+
const tvMatch = valueName.match(TAG_VALUE_RE);
|
|
11079
|
+
if (tvMatch || /^\w+$/.test(valueName)) {
|
|
11152
11080
|
currentTagGroup.values.push({
|
|
11153
11081
|
name: valueName,
|
|
11154
11082
|
color: rawColor
|
|
@@ -11560,9 +11488,9 @@ var init_parser8 = __esm({
|
|
|
11560
11488
|
"use strict";
|
|
11561
11489
|
init_diagnostics();
|
|
11562
11490
|
init_description_helpers();
|
|
11563
|
-
init_colors();
|
|
11564
11491
|
init_arrows();
|
|
11565
11492
|
init_parsing();
|
|
11493
|
+
init_colors();
|
|
11566
11494
|
init_name_normalize();
|
|
11567
11495
|
init_tag_groups();
|
|
11568
11496
|
init_types();
|
|
@@ -11572,7 +11500,7 @@ var init_parser8 = __esm({
|
|
|
11572
11500
|
ASYNC_SIMPLE_CONNECTION_RE = /^~>\s*(.+?)\s*$/;
|
|
11573
11501
|
DEPRECATED_FANOUT_RE = /\bx(\d+)\s*$/;
|
|
11574
11502
|
GROUP_RE = /^\[([^\]]+)\]\s*(?:as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*)?(?:\|\s*(.+))?$/;
|
|
11575
|
-
TAG_VALUE_RE = /^(\w[\w\s]
|
|
11503
|
+
TAG_VALUE_RE = /^(\w[\w\s]+?)\s*$/;
|
|
11576
11504
|
COMPONENT_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":]*?))\s*(\|.*)?$/;
|
|
11577
11505
|
PIPE_META_RE = /[|,]\s*(\w+)\s*:\s*([^|,]+)/g;
|
|
11578
11506
|
PROPERTY_RE = /^([\w-]+)\s+(.+)$/;
|
|
@@ -13009,7 +12937,7 @@ function parsePert(content, parseOpts = {}) {
|
|
|
13009
12937
|
if (!color) {
|
|
13010
12938
|
warn(
|
|
13011
12939
|
lineNumber,
|
|
13012
|
-
`Expected 'Value
|
|
12940
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
13013
12941
|
);
|
|
13014
12942
|
continue;
|
|
13015
12943
|
}
|
|
@@ -13032,7 +12960,7 @@ function parsePert(content, parseOpts = {}) {
|
|
|
13032
12960
|
if (!color) {
|
|
13033
12961
|
warn(
|
|
13034
12962
|
lineNumber,
|
|
13035
|
-
`Expected 'Value
|
|
12963
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
13036
12964
|
);
|
|
13037
12965
|
continue;
|
|
13038
12966
|
}
|
|
@@ -14581,7 +14509,7 @@ function parseMindmap(content, palette) {
|
|
|
14581
14509
|
if (!color) {
|
|
14582
14510
|
pushError(
|
|
14583
14511
|
lineNumber,
|
|
14584
|
-
`Expected 'Value
|
|
14512
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
14585
14513
|
);
|
|
14586
14514
|
continue;
|
|
14587
14515
|
}
|
|
@@ -15167,7 +15095,7 @@ function parseWireframe(content) {
|
|
|
15167
15095
|
} else {
|
|
15168
15096
|
pushWarning(
|
|
15169
15097
|
lineNumber,
|
|
15170
|
-
`Expected 'Value
|
|
15098
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
15171
15099
|
);
|
|
15172
15100
|
}
|
|
15173
15101
|
continue;
|
|
@@ -15784,6 +15712,13 @@ function parseCycle(content) {
|
|
|
15784
15712
|
warn(lineNum, "Empty node label.");
|
|
15785
15713
|
continue;
|
|
15786
15714
|
}
|
|
15715
|
+
if (!metadata["color"]) {
|
|
15716
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
15717
|
+
if (shortcutColor) {
|
|
15718
|
+
metadata["color"] = shortcutColor;
|
|
15719
|
+
label = stripped;
|
|
15720
|
+
}
|
|
15721
|
+
}
|
|
15787
15722
|
const color = metadata["color"];
|
|
15788
15723
|
const spanStr = metadata["span"];
|
|
15789
15724
|
let span = 1;
|
|
@@ -16013,8 +15948,12 @@ function parseJourneyMap(content, palette) {
|
|
|
16013
15948
|
const key = part.substring(0, colonIdx).trim().toLowerCase();
|
|
16014
15949
|
const value = part.substring(colonIdx + 1).trim();
|
|
16015
15950
|
if (key === "color") {
|
|
16016
|
-
|
|
16017
|
-
|
|
15951
|
+
personaColor = resolveColorWithDiagnostic(
|
|
15952
|
+
value,
|
|
15953
|
+
lineNumber,
|
|
15954
|
+
result.diagnostics,
|
|
15955
|
+
palette
|
|
15956
|
+
) ?? void 0;
|
|
16018
15957
|
}
|
|
16019
15958
|
}
|
|
16020
15959
|
}
|
|
@@ -16072,7 +16011,7 @@ function parseJourneyMap(content, palette) {
|
|
|
16072
16011
|
if (!color) {
|
|
16073
16012
|
warn(
|
|
16074
16013
|
lineNumber,
|
|
16075
|
-
`Expected 'Value
|
|
16014
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
16076
16015
|
);
|
|
16077
16016
|
continue;
|
|
16078
16017
|
}
|
|
@@ -16315,6 +16254,7 @@ var PHASE_RE, SCORE_RE, ANNOTATION_RE, KNOWN_OPTIONS9, KNOWN_BOOLEANS6;
|
|
|
16315
16254
|
var init_parser16 = __esm({
|
|
16316
16255
|
"src/journey-map/parser.ts"() {
|
|
16317
16256
|
"use strict";
|
|
16257
|
+
init_colors();
|
|
16318
16258
|
init_diagnostics();
|
|
16319
16259
|
init_tag_groups();
|
|
16320
16260
|
init_parsing();
|
|
@@ -16413,6 +16353,13 @@ function parsePyramid(content) {
|
|
|
16413
16353
|
warn(lineNum, "Empty layer label.");
|
|
16414
16354
|
continue;
|
|
16415
16355
|
}
|
|
16356
|
+
if (!color) {
|
|
16357
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
16358
|
+
if (shortcutColor) {
|
|
16359
|
+
color = shortcutColor;
|
|
16360
|
+
label = stripped;
|
|
16361
|
+
}
|
|
16362
|
+
}
|
|
16416
16363
|
currentLayer = {
|
|
16417
16364
|
label,
|
|
16418
16365
|
lineNumber: lineNum,
|
|
@@ -16576,6 +16523,13 @@ function parseRing(content) {
|
|
|
16576
16523
|
warn(lineNum, "Empty layer label.");
|
|
16577
16524
|
continue;
|
|
16578
16525
|
}
|
|
16526
|
+
if (!color) {
|
|
16527
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
16528
|
+
if (shortcutColor) {
|
|
16529
|
+
color = shortcutColor;
|
|
16530
|
+
label = stripped;
|
|
16531
|
+
}
|
|
16532
|
+
}
|
|
16579
16533
|
currentLayer = {
|
|
16580
16534
|
label,
|
|
16581
16535
|
lineNumber: lineNum,
|
|
@@ -17070,7 +17024,7 @@ function parseRaci(content, palette) {
|
|
|
17070
17024
|
if (next.length > 0 && next[0] !== " " && next[0] !== " ") break;
|
|
17071
17025
|
const stripped = nextTrim.replace(/,\s*$/, "");
|
|
17072
17026
|
const segments = stripped.split("|").map((s) => s.trim());
|
|
17073
|
-
|
|
17027
|
+
let roleLabel = segments[0] ?? "";
|
|
17074
17028
|
let roleColor;
|
|
17075
17029
|
if (segments.length > 1) {
|
|
17076
17030
|
const meta = parsePipeMetadata(segments);
|
|
@@ -17083,6 +17037,18 @@ function parseRaci(content, palette) {
|
|
|
17083
17037
|
);
|
|
17084
17038
|
}
|
|
17085
17039
|
}
|
|
17040
|
+
if (!roleColor) {
|
|
17041
|
+
const { label: stripLabel, colorName: shortcutColor } = peelTrailingColorName(roleLabel);
|
|
17042
|
+
if (shortcutColor) {
|
|
17043
|
+
roleColor = resolveColorWithDiagnostic(
|
|
17044
|
+
shortcutColor,
|
|
17045
|
+
j + 1,
|
|
17046
|
+
result.diagnostics,
|
|
17047
|
+
palette
|
|
17048
|
+
);
|
|
17049
|
+
roleLabel = stripLabel;
|
|
17050
|
+
}
|
|
17051
|
+
}
|
|
17086
17052
|
if (roleLabel) getOrAddRole(roleLabel, j + 1, roleColor);
|
|
17087
17053
|
}
|
|
17088
17054
|
i = j - 1;
|
|
@@ -17141,8 +17107,10 @@ function parseRaci(content, palette) {
|
|
|
17141
17107
|
continue;
|
|
17142
17108
|
}
|
|
17143
17109
|
let phaseColor;
|
|
17144
|
-
|
|
17145
|
-
|
|
17110
|
+
const trailingToken = phaseMatch[2];
|
|
17111
|
+
const pipeMeta = phaseMatch[3];
|
|
17112
|
+
if (pipeMeta) {
|
|
17113
|
+
const meta = parsePipeMetadata(["", pipeMeta]);
|
|
17146
17114
|
if (meta["color"]) {
|
|
17147
17115
|
phaseColor = resolveColorWithDiagnostic(
|
|
17148
17116
|
meta["color"],
|
|
@@ -17152,6 +17120,17 @@ function parseRaci(content, palette) {
|
|
|
17152
17120
|
);
|
|
17153
17121
|
}
|
|
17154
17122
|
}
|
|
17123
|
+
if (!phaseColor && trailingToken) {
|
|
17124
|
+
const { colorName } = peelTrailingColorName(`x ${trailingToken}`);
|
|
17125
|
+
if (colorName) {
|
|
17126
|
+
phaseColor = resolveColorWithDiagnostic(
|
|
17127
|
+
colorName,
|
|
17128
|
+
lineNumber,
|
|
17129
|
+
result.diagnostics,
|
|
17130
|
+
palette
|
|
17131
|
+
);
|
|
17132
|
+
}
|
|
17133
|
+
}
|
|
17155
17134
|
currentPhase = {
|
|
17156
17135
|
id: normalizeName(display),
|
|
17157
17136
|
displayName: display,
|
|
@@ -17382,7 +17361,7 @@ var init_parser19 = __esm({
|
|
|
17382
17361
|
"no-title",
|
|
17383
17362
|
...Object.keys(VARIANT_LOCK_DIRECTIVES)
|
|
17384
17363
|
]);
|
|
17385
|
-
PHASE_RE2 = /^\[(.+?)\]
|
|
17364
|
+
PHASE_RE2 = /^\[(.+?)\](?:\s+(\S+))?(?:\s*\|\s*(.+))?\s*$/;
|
|
17386
17365
|
ROLE_ASSIGNMENT_RE = /^([^:]+):\s*(.*)$/;
|
|
17387
17366
|
}
|
|
17388
17367
|
});
|
|
@@ -19098,7 +19077,7 @@ function containerFill(palette, isDark, nodeColor2) {
|
|
|
19098
19077
|
function containerStroke(palette, nodeColor2) {
|
|
19099
19078
|
return nodeColor2 ?? palette.textMuted;
|
|
19100
19079
|
}
|
|
19101
|
-
function renderOrg(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, ancestorPath) {
|
|
19080
|
+
function renderOrg(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, ancestorPath, exportMode) {
|
|
19102
19081
|
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
19103
19082
|
const width = exportDims?.width ?? container.clientWidth;
|
|
19104
19083
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -19358,7 +19337,7 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
|
|
|
19358
19337
|
}
|
|
19359
19338
|
],
|
|
19360
19339
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
19361
|
-
mode: "
|
|
19340
|
+
mode: exportMode ? "export" : "preview"
|
|
19362
19341
|
};
|
|
19363
19342
|
const singleState = { activeGroup: lg.name };
|
|
19364
19343
|
const groupG = legendParentBase.append("g").attr("transform", `translate(${lg.x}, ${lg.y})`);
|
|
@@ -19378,7 +19357,7 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
|
|
|
19378
19357
|
const legendConfig = {
|
|
19379
19358
|
groups,
|
|
19380
19359
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
19381
|
-
mode: "
|
|
19360
|
+
mode: exportMode ? "export" : "preview",
|
|
19382
19361
|
capsulePillAddonWidth: eyeAddonWidth
|
|
19383
19362
|
};
|
|
19384
19363
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
@@ -19845,7 +19824,6 @@ function layoutSitemap(parsed, hiddenCounts, activeTagGroup, hiddenAttributes, e
|
|
|
19845
19824
|
targetId: edge.targetId,
|
|
19846
19825
|
points,
|
|
19847
19826
|
label: edge.label,
|
|
19848
|
-
color: edge.color,
|
|
19849
19827
|
lineNumber: edge.lineNumber,
|
|
19850
19828
|
deferred: deferredSet.has(i) || void 0
|
|
19851
19829
|
});
|
|
@@ -20301,7 +20279,7 @@ function containerFill2(palette, isDark, nodeColor2) {
|
|
|
20301
20279
|
function containerStroke2(palette, nodeColor2) {
|
|
20302
20280
|
return nodeColor2 ?? palette.textMuted;
|
|
20303
20281
|
}
|
|
20304
|
-
function renderSitemap(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes) {
|
|
20282
|
+
function renderSitemap(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, exportMode) {
|
|
20305
20283
|
d3Selection2.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
20306
20284
|
const width = exportDims?.width ?? container.clientWidth;
|
|
20307
20285
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -20332,9 +20310,6 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20332
20310
|
const defs = svg.append("defs");
|
|
20333
20311
|
defs.append("marker").attr("id", "sm-arrow").attr("viewBox", `0 0 ${ARROWHEAD_W} ${ARROWHEAD_H}`).attr("refX", ARROWHEAD_W).attr("refY", ARROWHEAD_H / 2).attr("markerWidth", ARROWHEAD_W).attr("markerHeight", ARROWHEAD_H).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W},${ARROWHEAD_H / 2} 0,${ARROWHEAD_H}`).attr("fill", palette.textMuted);
|
|
20334
20312
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
20335
|
-
for (const edge of layout.edges) {
|
|
20336
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
20337
|
-
}
|
|
20338
20313
|
for (const color of edgeColors) {
|
|
20339
20314
|
const id = `sm-arrow-${color.replace("#", "")}`;
|
|
20340
20315
|
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${ARROWHEAD_W} ${ARROWHEAD_H}`).attr("refX", ARROWHEAD_W).attr("refY", ARROWHEAD_H / 2).attr("markerWidth", ARROWHEAD_W).attr("markerHeight", ARROWHEAD_H).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W},${ARROWHEAD_H / 2} 0,${ARROWHEAD_H}`).attr("fill", color);
|
|
@@ -20413,8 +20388,8 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20413
20388
|
for (const edge of layout.edges) {
|
|
20414
20389
|
if (edge.points.length < 2) continue;
|
|
20415
20390
|
const edgeG = contentG.append("g").attr("class", "sitemap-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
20416
|
-
const edgeColor3 =
|
|
20417
|
-
const markerId =
|
|
20391
|
+
const edgeColor3 = palette.textMuted;
|
|
20392
|
+
const markerId = "sm-arrow";
|
|
20418
20393
|
const gen = edge.deferred ? lineGeneratorLinear : lineGenerator;
|
|
20419
20394
|
const pathD = gen(edge.points);
|
|
20420
20395
|
if (pathD) {
|
|
@@ -20495,7 +20470,8 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20495
20470
|
isDark,
|
|
20496
20471
|
activeTagGroup,
|
|
20497
20472
|
void 0,
|
|
20498
|
-
hiddenAttributes
|
|
20473
|
+
hiddenAttributes,
|
|
20474
|
+
exportMode
|
|
20499
20475
|
);
|
|
20500
20476
|
}
|
|
20501
20477
|
if (fixedTitle) {
|
|
@@ -20520,11 +20496,12 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20520
20496
|
isDark,
|
|
20521
20497
|
activeTagGroup,
|
|
20522
20498
|
width,
|
|
20523
|
-
hiddenAttributes
|
|
20499
|
+
hiddenAttributes,
|
|
20500
|
+
exportMode
|
|
20524
20501
|
);
|
|
20525
20502
|
}
|
|
20526
20503
|
}
|
|
20527
|
-
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes) {
|
|
20504
|
+
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes, exportMode) {
|
|
20528
20505
|
if (legendGroups.length === 0) return;
|
|
20529
20506
|
const groups = legendGroups.map((g) => ({
|
|
20530
20507
|
name: g.name,
|
|
@@ -20535,7 +20512,7 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
20535
20512
|
const legendConfig = {
|
|
20536
20513
|
groups,
|
|
20537
20514
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
20538
|
-
mode: "
|
|
20515
|
+
mode: exportMode ? "export" : "preview",
|
|
20539
20516
|
capsulePillAddonWidth: eyeAddonWidth
|
|
20540
20517
|
};
|
|
20541
20518
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
@@ -20921,7 +20898,7 @@ function renderKanban(container, parsed, palette, isDark, options) {
|
|
|
20921
20898
|
const legendConfig = {
|
|
20922
20899
|
groups: parsed.tagGroups,
|
|
20923
20900
|
position: { placement: "top-center", titleRelation: "inline-with-title" },
|
|
20924
|
-
mode:
|
|
20901
|
+
mode: options?.exportMode ? "export" : "preview"
|
|
20925
20902
|
};
|
|
20926
20903
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
20927
20904
|
const legendG = svg.append("g").attr("class", "kanban-legend").attr("transform", `translate(${legendX},${legendY})`);
|
|
@@ -21079,7 +21056,8 @@ function renderKanbanForExport(content, theme, palette) {
|
|
|
21079
21056
|
const layout = computeLayout(parsed, palette);
|
|
21080
21057
|
const container = document.createElement("div");
|
|
21081
21058
|
renderKanban(container, parsed, palette, isDark, {
|
|
21082
|
-
exportDims: { width: layout.totalWidth, height: layout.totalHeight }
|
|
21059
|
+
exportDims: { width: layout.totalWidth, height: layout.totalHeight },
|
|
21060
|
+
exportMode: true
|
|
21083
21061
|
});
|
|
21084
21062
|
const svgEl = container.querySelector("svg");
|
|
21085
21063
|
return svgEl?.outerHTML ?? "";
|
|
@@ -21617,7 +21595,7 @@ function markerIdForType(type) {
|
|
|
21617
21595
|
function isSourceMarker(type) {
|
|
21618
21596
|
return type === "composes" || type === "aggregates";
|
|
21619
21597
|
}
|
|
21620
|
-
function renderClassDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, legendActive) {
|
|
21598
|
+
function renderClassDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, legendActive, exportMode) {
|
|
21621
21599
|
d3Selection4.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
21622
21600
|
const width = exportDims?.width ?? container.clientWidth;
|
|
21623
21601
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -21679,7 +21657,7 @@ function renderClassDiagram(container, parsed, layout, palette, isDark, onClickI
|
|
|
21679
21657
|
const legendConfig = {
|
|
21680
21658
|
groups: legendGroups,
|
|
21681
21659
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
21682
|
-
mode: "
|
|
21660
|
+
mode: exportMode ? "export" : "preview"
|
|
21683
21661
|
};
|
|
21684
21662
|
const legendState = {
|
|
21685
21663
|
activeGroup: isLegendExpanded ? LEGEND_GROUP_NAME : null
|
|
@@ -21819,10 +21797,22 @@ function renderClassDiagramForExport(content, theme, palette) {
|
|
|
21819
21797
|
const exportWidth = layout.width + DIAGRAM_PADDING4 * 2;
|
|
21820
21798
|
const exportHeight = layout.height + DIAGRAM_PADDING4 * 2 + (parsed.title ? 40 : 0) + legendReserve;
|
|
21821
21799
|
return runInExportContainer(exportWidth, exportHeight, (container) => {
|
|
21822
|
-
renderClassDiagram(
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21800
|
+
renderClassDiagram(
|
|
21801
|
+
container,
|
|
21802
|
+
parsed,
|
|
21803
|
+
layout,
|
|
21804
|
+
palette,
|
|
21805
|
+
isDark,
|
|
21806
|
+
void 0,
|
|
21807
|
+
{
|
|
21808
|
+
width: exportWidth,
|
|
21809
|
+
height: exportHeight
|
|
21810
|
+
},
|
|
21811
|
+
true,
|
|
21812
|
+
// legendActive for export
|
|
21813
|
+
true
|
|
21814
|
+
// exportMode
|
|
21815
|
+
);
|
|
21826
21816
|
return extractExportSvg(container, theme);
|
|
21827
21817
|
});
|
|
21828
21818
|
}
|
|
@@ -22298,7 +22288,7 @@ function drawCardinality(g, point, prevPoint, cardinality, color, useLabels) {
|
|
|
22298
22288
|
g.append("line").attr("x1", bx + px * spread).attr("y1", by + py * spread).attr("x2", bx - px * spread).attr("y2", by - py * spread).attr("stroke", color).attr("stroke-width", sw);
|
|
22299
22289
|
}
|
|
22300
22290
|
}
|
|
22301
|
-
function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, semanticColorsActive) {
|
|
22291
|
+
function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, semanticColorsActive, exportMode) {
|
|
22302
22292
|
d3Selection5.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
22303
22293
|
const useSemanticColors = parsed.tagGroups.length === 0 && layout.nodes.every((n) => !n.color);
|
|
22304
22294
|
const LEGEND_FIXED_GAP4 = 8;
|
|
@@ -22454,7 +22444,7 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
22454
22444
|
const legendConfig = {
|
|
22455
22445
|
groups: parsed.tagGroups,
|
|
22456
22446
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
22457
|
-
mode: "
|
|
22447
|
+
mode: exportMode ? "export" : "preview"
|
|
22458
22448
|
};
|
|
22459
22449
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
22460
22450
|
const legendG = svg.append("g").attr("class", "er-tag-legend").attr("transform", `translate(0,${legendY})`);
|
|
@@ -22490,7 +22480,7 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
22490
22480
|
const legendConfig = {
|
|
22491
22481
|
groups: semanticGroups,
|
|
22492
22482
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
22493
|
-
mode: "
|
|
22483
|
+
mode: exportMode ? "export" : "preview"
|
|
22494
22484
|
};
|
|
22495
22485
|
const legendState = {
|
|
22496
22486
|
activeGroup: semanticActive ? "Role" : null
|
|
@@ -22523,10 +22513,21 @@ function renderERDiagramForExport(content, theme, palette) {
|
|
|
22523
22513
|
container.style.left = "-9999px";
|
|
22524
22514
|
document.body.appendChild(container);
|
|
22525
22515
|
try {
|
|
22526
|
-
renderERDiagram(
|
|
22527
|
-
|
|
22528
|
-
|
|
22529
|
-
|
|
22516
|
+
renderERDiagram(
|
|
22517
|
+
container,
|
|
22518
|
+
parsed,
|
|
22519
|
+
layout,
|
|
22520
|
+
palette,
|
|
22521
|
+
isDark,
|
|
22522
|
+
void 0,
|
|
22523
|
+
{
|
|
22524
|
+
width: exportWidth,
|
|
22525
|
+
height: exportHeight
|
|
22526
|
+
},
|
|
22527
|
+
void 0,
|
|
22528
|
+
void 0,
|
|
22529
|
+
true
|
|
22530
|
+
);
|
|
22530
22531
|
const svgEl = container.querySelector("svg");
|
|
22531
22532
|
if (!svgEl) return "";
|
|
22532
22533
|
if (theme === "transparent") {
|
|
@@ -22761,7 +22762,8 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
22761
22762
|
hideDescriptions,
|
|
22762
22763
|
controlsExpanded,
|
|
22763
22764
|
onToggleDescriptions,
|
|
22764
|
-
onToggleControlsExpand
|
|
22765
|
+
onToggleControlsExpand,
|
|
22766
|
+
exportMode = false
|
|
22765
22767
|
} = options ?? {};
|
|
22766
22768
|
d3Selection6.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
22767
22769
|
const width = exportDims?.width ?? container.clientWidth;
|
|
@@ -23097,7 +23099,7 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
23097
23099
|
const legendConfig = {
|
|
23098
23100
|
groups: parsed.tagGroups,
|
|
23099
23101
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
23100
|
-
mode: "
|
|
23102
|
+
mode: exportMode ? "export" : "preview",
|
|
23101
23103
|
controlsGroup
|
|
23102
23104
|
};
|
|
23103
23105
|
const legendState = {
|
|
@@ -23129,7 +23131,8 @@ function renderBoxesAndLinesForExport(container, parsed, layout, palette, isDark
|
|
|
23129
23131
|
renderBoxesAndLines(container, parsed, layout, palette, isDark, {
|
|
23130
23132
|
exportDims: options?.exportDims,
|
|
23131
23133
|
activeTagGroup: options?.activeTagGroup,
|
|
23132
|
-
hiddenTagValues: options?.hiddenTagValues
|
|
23134
|
+
hiddenTagValues: options?.hiddenTagValues,
|
|
23135
|
+
exportMode: options?.exportMode
|
|
23133
23136
|
});
|
|
23134
23137
|
}
|
|
23135
23138
|
var d3Selection6, d3Shape4, DIAGRAM_PADDING6, NODE_FONT_SIZE, MIN_NODE_FONT_SIZE, EDGE_LABEL_FONT_SIZE4, EDGE_STROKE_WIDTH5, NODE_STROKE_WIDTH5, NODE_RX, COLLAPSE_BAR_HEIGHT3, ARROWHEAD_W2, ARROWHEAD_H2, DESC_FONT_SIZE, DESC_LINE_HEIGHT, MAX_DESC_LINES, CHAR_WIDTH_RATIO2, NODE_TEXT_PADDING, GROUP_RX, GROUP_LABEL_FONT_SIZE, GROUP_LABEL_ZONE, lineGeneratorLR, lineGeneratorTB;
|
|
@@ -24367,7 +24370,7 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
24367
24370
|
};
|
|
24368
24371
|
}),
|
|
24369
24372
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
24370
|
-
mode: "
|
|
24373
|
+
mode: options?.exportMode ? "export" : "preview",
|
|
24371
24374
|
controlsGroup: controlsToggles
|
|
24372
24375
|
};
|
|
24373
24376
|
const legendState = {
|
|
@@ -27169,7 +27172,7 @@ function drawPersonIcon(g, cx, cy, color) {
|
|
|
27169
27172
|
g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx - PERSON_LEG_SPAN).attr("y2", legY).attr("stroke", color).attr("stroke-width", PERSON_SW);
|
|
27170
27173
|
g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx + PERSON_LEG_SPAN).attr("y2", legY).attr("stroke", color).attr("stroke-width", PERSON_SW);
|
|
27171
27174
|
}
|
|
27172
|
-
function renderC4Context(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
27175
|
+
function renderC4Context(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
27173
27176
|
d3Selection9.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
27174
27177
|
const width = exportDims?.width ?? container.clientWidth;
|
|
27175
27178
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -27345,7 +27348,8 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
27345
27348
|
palette,
|
|
27346
27349
|
isDark,
|
|
27347
27350
|
activeTagGroup,
|
|
27348
|
-
fixedLegend ? width : null
|
|
27351
|
+
fixedLegend ? width : null,
|
|
27352
|
+
exportMode
|
|
27349
27353
|
);
|
|
27350
27354
|
}
|
|
27351
27355
|
}
|
|
@@ -27700,7 +27704,7 @@ function placeEdgeLabels(labels, edges, obstacleRects) {
|
|
|
27700
27704
|
placedRects.push({ x: lbl.x, y: lbl.y, w: lbl.bgW, h: lbl.bgH });
|
|
27701
27705
|
}
|
|
27702
27706
|
}
|
|
27703
|
-
function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWidth) {
|
|
27707
|
+
function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWidth, exportMode) {
|
|
27704
27708
|
const groups = layout.legend.map((g) => ({
|
|
27705
27709
|
name: g.name,
|
|
27706
27710
|
entries: g.entries.map((e) => ({ value: e.value, color: e.color }))
|
|
@@ -27708,7 +27712,7 @@ function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWid
|
|
|
27708
27712
|
const legendConfig = {
|
|
27709
27713
|
groups,
|
|
27710
27714
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
27711
|
-
mode: "
|
|
27715
|
+
mode: exportMode ? "export" : "preview"
|
|
27712
27716
|
};
|
|
27713
27717
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
27714
27718
|
const containerWidth = fixedWidth ?? layout.width;
|
|
@@ -27723,7 +27727,7 @@ function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWid
|
|
|
27723
27727
|
);
|
|
27724
27728
|
parent.selectAll("[data-legend-group]").classed("c4-legend-group", true);
|
|
27725
27729
|
}
|
|
27726
|
-
function renderC4Containers(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
27730
|
+
function renderC4Containers(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
27727
27731
|
d3Selection9.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
27728
27732
|
const width = exportDims?.width ?? container.clientWidth;
|
|
27729
27733
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -27954,7 +27958,8 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
27954
27958
|
palette,
|
|
27955
27959
|
isDark,
|
|
27956
27960
|
activeTagGroup,
|
|
27957
|
-
fixedLegend ? width : null
|
|
27961
|
+
fixedLegend ? width : null,
|
|
27962
|
+
exportMode
|
|
27958
27963
|
);
|
|
27959
27964
|
}
|
|
27960
27965
|
}
|
|
@@ -28022,7 +28027,7 @@ function renderC4ComponentsForExport(content, systemName, containerName, theme,
|
|
|
28022
28027
|
document.body.removeChild(el);
|
|
28023
28028
|
}
|
|
28024
28029
|
}
|
|
28025
|
-
function renderC4Deployment(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
28030
|
+
function renderC4Deployment(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
28026
28031
|
renderC4Containers(
|
|
28027
28032
|
container,
|
|
28028
28033
|
parsed,
|
|
@@ -28031,7 +28036,8 @@ function renderC4Deployment(container, parsed, layout, palette, isDark, onClickI
|
|
|
28031
28036
|
isDark,
|
|
28032
28037
|
onClickItem,
|
|
28033
28038
|
exportDims,
|
|
28034
|
-
activeTagGroup
|
|
28039
|
+
activeTagGroup,
|
|
28040
|
+
exportMode
|
|
28035
28041
|
);
|
|
28036
28042
|
}
|
|
28037
28043
|
function renderC4DeploymentForExport(content, theme, palette) {
|
|
@@ -28213,7 +28219,6 @@ function layoutGraph(graph, options) {
|
|
|
28213
28219
|
target: edge.target,
|
|
28214
28220
|
points: edgeData?.points ?? [],
|
|
28215
28221
|
label: edge.label,
|
|
28216
|
-
color: edge.color,
|
|
28217
28222
|
lineNumber: edge.lineNumber
|
|
28218
28223
|
};
|
|
28219
28224
|
});
|
|
@@ -28536,9 +28541,6 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
28536
28541
|
const defs = svg.append("defs");
|
|
28537
28542
|
defs.append("marker").attr("id", "fc-arrow").attr("viewBox", `0 0 ${ARROWHEAD_W3} ${ARROWHEAD_H3}`).attr("refX", ARROWHEAD_W3).attr("refY", ARROWHEAD_H3 / 2).attr("markerWidth", ARROWHEAD_W3).attr("markerHeight", ARROWHEAD_H3).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W3},${ARROWHEAD_H3 / 2} 0,${ARROWHEAD_H3}`).attr("fill", palette.textMuted);
|
|
28538
28543
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
28539
|
-
for (const edge of layout.edges) {
|
|
28540
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
28541
|
-
}
|
|
28542
28544
|
for (const color of edgeColors) {
|
|
28543
28545
|
const id = `fc-arrow-${color.replace("#", "")}`;
|
|
28544
28546
|
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${ARROWHEAD_W3} ${ARROWHEAD_H3}`).attr("refX", ARROWHEAD_W3).attr("refY", ARROWHEAD_H3 / 2).attr("markerWidth", ARROWHEAD_W3).attr("markerHeight", ARROWHEAD_H3).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W3},${ARROWHEAD_H3 / 2} 0,${ARROWHEAD_H3}`).attr("fill", color);
|
|
@@ -28602,8 +28604,8 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
28602
28604
|
const edge = layout.edges[ei];
|
|
28603
28605
|
if (edge.points.length < 2) continue;
|
|
28604
28606
|
const edgeG = contentG.append("g").attr("class", "fc-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
28605
|
-
const edgeColor3 =
|
|
28606
|
-
const markerId =
|
|
28607
|
+
const edgeColor3 = palette.textMuted;
|
|
28608
|
+
const markerId = "fc-arrow";
|
|
28607
28609
|
const pathD = lineGenerator5(edge.points);
|
|
28608
28610
|
if (pathD) {
|
|
28609
28611
|
edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor3).attr("stroke-width", EDGE_STROKE_WIDTH8).attr("marker-end", `url(#${markerId})`).attr("class", "fc-edge");
|
|
@@ -31227,7 +31229,7 @@ function computeInfraLegendGroups(nodes, tagGroups, palette, edges) {
|
|
|
31227
31229
|
}
|
|
31228
31230
|
return groups;
|
|
31229
31231
|
}
|
|
31230
|
-
function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback) {
|
|
31232
|
+
function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback, exportMode = false) {
|
|
31231
31233
|
if (legendGroups.length === 0 && !playback) return;
|
|
31232
31234
|
const legendG = rootSvg.append("g").attr("transform", `translate(0, ${legendY})`);
|
|
31233
31235
|
if (activeGroup) {
|
|
@@ -31243,7 +31245,7 @@ function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDa
|
|
|
31243
31245
|
const legendConfig = {
|
|
31244
31246
|
groups: allGroups,
|
|
31245
31247
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
31246
|
-
mode: "
|
|
31248
|
+
mode: exportMode ? "export" : "preview",
|
|
31247
31249
|
showEmptyGroups: true
|
|
31248
31250
|
};
|
|
31249
31251
|
const legendState = { activeGroup };
|
|
@@ -31431,7 +31433,8 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
|
|
|
31431
31433
|
palette,
|
|
31432
31434
|
isDark,
|
|
31433
31435
|
activeGroup ?? null,
|
|
31434
|
-
playback ?? void 0
|
|
31436
|
+
playback ?? void 0,
|
|
31437
|
+
exportMode
|
|
31435
31438
|
);
|
|
31436
31439
|
legendSvg.selectAll(".infra-legend-group").style("pointer-events", "auto");
|
|
31437
31440
|
} else {
|
|
@@ -31443,7 +31446,8 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
|
|
|
31443
31446
|
palette,
|
|
31444
31447
|
isDark,
|
|
31445
31448
|
activeGroup ?? null,
|
|
31446
|
-
playback ?? void 0
|
|
31449
|
+
playback ?? void 0,
|
|
31450
|
+
exportMode
|
|
31447
31451
|
);
|
|
31448
31452
|
}
|
|
31449
31453
|
}
|
|
@@ -33345,7 +33349,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
33345
33349
|
x: 0,
|
|
33346
33350
|
y: tagLegendY,
|
|
33347
33351
|
width: exportWidth,
|
|
33348
|
-
activeGroup: tagLegendActive
|
|
33352
|
+
activeGroup: tagLegendActive,
|
|
33353
|
+
exportMode: options.exportMode
|
|
33349
33354
|
});
|
|
33350
33355
|
}
|
|
33351
33356
|
const root = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY})`);
|
|
@@ -33406,7 +33411,8 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
33406
33411
|
renderPert(container, resolved, layout, palette, isDark, {
|
|
33407
33412
|
title: hasTitle ? parsed.title : null,
|
|
33408
33413
|
subtitle: resolved.projectSubtitle,
|
|
33409
|
-
exportDims: { width: exportWidth, height: exportHeight }
|
|
33414
|
+
exportDims: { width: exportWidth, height: exportHeight },
|
|
33415
|
+
exportMode: true
|
|
33410
33416
|
});
|
|
33411
33417
|
const svgEl = container.querySelector("svg");
|
|
33412
33418
|
if (!svgEl) return "";
|
|
@@ -34493,7 +34499,7 @@ function renderLegendBlock(svg, entries, args) {
|
|
|
34493
34499
|
}
|
|
34494
34500
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
34495
34501
|
if (resolved.tagGroups.length === 0) return;
|
|
34496
|
-
const { x, y, width, activeGroup } = args;
|
|
34502
|
+
const { x, y, width, activeGroup, exportMode } = args;
|
|
34497
34503
|
const groups = resolved.tagGroups.map((g) => ({
|
|
34498
34504
|
name: g.name,
|
|
34499
34505
|
entries: g.entries.map((e) => ({ value: e.value, color: e.color }))
|
|
@@ -34504,7 +34510,7 @@ function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
|
34504
34510
|
{
|
|
34505
34511
|
groups,
|
|
34506
34512
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
34507
|
-
mode: "
|
|
34513
|
+
mode: exportMode ? "export" : "preview"
|
|
34508
34514
|
},
|
|
34509
34515
|
{ activeGroup },
|
|
34510
34516
|
palette,
|
|
@@ -35944,7 +35950,8 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
35944
35950
|
).attr("display", active ? null : "none");
|
|
35945
35951
|
}
|
|
35946
35952
|
drawLegend();
|
|
35947
|
-
}
|
|
35953
|
+
},
|
|
35954
|
+
options?.exportMode ?? false
|
|
35948
35955
|
);
|
|
35949
35956
|
}
|
|
35950
35957
|
}
|
|
@@ -36733,7 +36740,7 @@ function buildControlsToggles(hasCriticalPath, criticalPathActive, hasDependenci
|
|
|
36733
36740
|
}
|
|
36734
36741
|
return toggles;
|
|
36735
36742
|
}
|
|
36736
|
-
function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargin, chartInnerWidth, legendY, palette, isDark, hasCriticalPath, criticalPathActive, _optionLineNumbers, onToggle, onToggleControlsExpand, currentSwimlaneGroup, onSwimlaneChange, legendViewMode, resolvedTasks, controlsExpanded = false, hasDependencies = false, dependenciesActive = false, onControlsToggle) {
|
|
36743
|
+
function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargin, chartInnerWidth, legendY, palette, isDark, hasCriticalPath, criticalPathActive, _optionLineNumbers, onToggle, onToggleControlsExpand, currentSwimlaneGroup, onSwimlaneChange, legendViewMode, resolvedTasks, controlsExpanded = false, hasDependencies = false, dependenciesActive = false, onControlsToggle, exportMode = false) {
|
|
36737
36744
|
let visibleGroups;
|
|
36738
36745
|
if (activeGroupName) {
|
|
36739
36746
|
const activeGroup = tagGroups.filter(
|
|
@@ -36828,7 +36835,7 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
36828
36835
|
placement: "top-center",
|
|
36829
36836
|
titleRelation: "below-title"
|
|
36830
36837
|
},
|
|
36831
|
-
mode: "
|
|
36838
|
+
mode: exportMode ? "export" : "preview",
|
|
36832
36839
|
capsulePillAddonWidth: iconReserve,
|
|
36833
36840
|
controlsGroup: controlsToggles.length > 0 ? { toggles: controlsToggles } : void 0
|
|
36834
36841
|
};
|
|
@@ -36935,7 +36942,7 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
36935
36942
|
placement: "top-center",
|
|
36936
36943
|
titleRelation: "below-title"
|
|
36937
36944
|
},
|
|
36938
|
-
mode: "
|
|
36945
|
+
mode: exportMode ? "export" : "preview",
|
|
36939
36946
|
controlsGroup: { toggles: controlsToggles }
|
|
36940
36947
|
};
|
|
36941
36948
|
const tagGroupG = legendRow.append("g");
|
|
@@ -37818,9 +37825,6 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
37818
37825
|
const defs = svg.append("defs");
|
|
37819
37826
|
defs.append("marker").attr("id", "st-arrow").attr("viewBox", `0 0 ${ARROWHEAD_W5} ${ARROWHEAD_H5}`).attr("refX", ARROWHEAD_W5).attr("refY", ARROWHEAD_H5 / 2).attr("markerWidth", ARROWHEAD_W5).attr("markerHeight", ARROWHEAD_H5).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W5},${ARROWHEAD_H5 / 2} 0,${ARROWHEAD_H5}`).attr("fill", palette.textMuted);
|
|
37820
37827
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
37821
|
-
for (const edge of layout.edges) {
|
|
37822
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
37823
|
-
}
|
|
37824
37828
|
for (const color of edgeColors) {
|
|
37825
37829
|
const id = `st-arrow-${color.replace("#", "")}`;
|
|
37826
37830
|
defs.append("marker").attr("id", id).attr("viewBox", `0 0 ${ARROWHEAD_W5} ${ARROWHEAD_H5}`).attr("refX", ARROWHEAD_W5).attr("refY", ARROWHEAD_H5 / 2).attr("markerWidth", ARROWHEAD_W5).attr("markerHeight", ARROWHEAD_H5).attr("orient", "auto").append("polygon").attr("points", `0,0 ${ARROWHEAD_W5},${ARROWHEAD_H5 / 2} 0,${ARROWHEAD_H5}`).attr("fill", color);
|
|
@@ -37915,8 +37919,8 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
37915
37919
|
for (let ei = 0; ei < layout.edges.length; ei++) {
|
|
37916
37920
|
const edge = layout.edges[ei];
|
|
37917
37921
|
const edgeG = contentG.append("g").attr("class", "st-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
37918
|
-
const edgeColor3 =
|
|
37919
|
-
const markerId =
|
|
37922
|
+
const edgeColor3 = palette.textMuted;
|
|
37923
|
+
const markerId = "st-arrow";
|
|
37920
37924
|
if (edge.source === edge.target) {
|
|
37921
37925
|
const node = nodePositionMap.get(edge.source);
|
|
37922
37926
|
if (node) {
|
|
@@ -39006,7 +39010,7 @@ function renderTechRadar(container, parsed, palette, isDark, onClickItem, export
|
|
|
39006
39010
|
}
|
|
39007
39011
|
],
|
|
39008
39012
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
39009
|
-
mode: "
|
|
39013
|
+
mode: options?.exportMode ? "export" : "preview",
|
|
39010
39014
|
controlsGroup: {
|
|
39011
39015
|
toggles: [
|
|
39012
39016
|
{
|
|
@@ -39609,7 +39613,7 @@ function getQuadrantLabelPosition(position, cx, cy, maxRadius) {
|
|
|
39609
39613
|
};
|
|
39610
39614
|
}
|
|
39611
39615
|
}
|
|
39612
|
-
function renderTechRadarForExport(container, parsed, palette, isDark, exportDims, viewState) {
|
|
39616
|
+
function renderTechRadarForExport(container, parsed, palette, isDark, exportDims, viewState, exportMode) {
|
|
39613
39617
|
renderTechRadar(
|
|
39614
39618
|
container,
|
|
39615
39619
|
parsed,
|
|
@@ -39617,7 +39621,8 @@ function renderTechRadarForExport(container, parsed, palette, isDark, exportDims
|
|
|
39617
39621
|
isDark,
|
|
39618
39622
|
void 0,
|
|
39619
39623
|
exportDims,
|
|
39620
|
-
viewState
|
|
39624
|
+
viewState,
|
|
39625
|
+
{ exportMode }
|
|
39621
39626
|
);
|
|
39622
39627
|
}
|
|
39623
39628
|
var d3Selection16, BLIP_RADIUS2, BLIP_FONT_SIZE2, RING_LABEL_FONT_SIZE, QUADRANT_LABEL_FONT_SIZE, TITLE_FONT_SIZE3, LISTING_FONT_SIZE, LISTING_HEADER_FONT_SIZE, LISTING_TOP_MARGIN, LISTING_COL_GAP, LISTING_LINE_HEIGHT, LISTING_BLIP_R;
|
|
@@ -39996,7 +40001,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
39996
40001
|
titleRelation: "inline-with-title"
|
|
39997
40002
|
},
|
|
39998
40003
|
titleWidth: 0,
|
|
39999
|
-
mode:
|
|
40004
|
+
mode: options?.exportMode ? "export" : "preview"
|
|
40000
40005
|
};
|
|
40001
40006
|
const legendState = { activeGroup: effectiveActiveGroup };
|
|
40002
40007
|
const legendCallbacks = {
|
|
@@ -40709,7 +40714,8 @@ function renderJourneyMapForExport(content, theme, palette) {
|
|
|
40709
40714
|
const layout = layoutJourneyMap(parsed, palette, { isDark });
|
|
40710
40715
|
const container = document.createElement("div");
|
|
40711
40716
|
renderJourneyMap(container, parsed, palette, isDark, {
|
|
40712
|
-
exportDims: { width: layout.totalWidth, height: layout.totalHeight }
|
|
40717
|
+
exportDims: { width: layout.totalWidth, height: layout.totalHeight },
|
|
40718
|
+
exportMode: true
|
|
40713
40719
|
});
|
|
40714
40720
|
const svgEl = container.querySelector("svg");
|
|
40715
40721
|
if (!svgEl) return "";
|
|
@@ -41475,7 +41481,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
41475
41481
|
const legendConfig = {
|
|
41476
41482
|
groups: [],
|
|
41477
41483
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
41478
|
-
mode: "
|
|
41484
|
+
mode: renderOptions?.exportMode ? "export" : "preview",
|
|
41479
41485
|
controlsGroup
|
|
41480
41486
|
};
|
|
41481
41487
|
const legendState = {
|
|
@@ -41659,7 +41665,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
41659
41665
|
}
|
|
41660
41666
|
}
|
|
41661
41667
|
}
|
|
41662
|
-
function renderCycleForExport(container, parsed, palette, isDark, exportDims, viewState) {
|
|
41668
|
+
function renderCycleForExport(container, parsed, palette, isDark, exportDims, viewState, exportMode) {
|
|
41663
41669
|
renderCycle(
|
|
41664
41670
|
container,
|
|
41665
41671
|
parsed,
|
|
@@ -41667,7 +41673,8 @@ function renderCycleForExport(container, parsed, palette, isDark, exportDims, vi
|
|
|
41667
41673
|
isDark,
|
|
41668
41674
|
void 0,
|
|
41669
41675
|
exportDims,
|
|
41670
|
-
viewState
|
|
41676
|
+
viewState,
|
|
41677
|
+
{ exportMode }
|
|
41671
41678
|
);
|
|
41672
41679
|
}
|
|
41673
41680
|
function resolveNodeColor5(color, palette, defaultColor) {
|
|
@@ -44591,7 +44598,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
44591
44598
|
const legendConfig = {
|
|
44592
44599
|
groups: resolvedGroups,
|
|
44593
44600
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
44594
|
-
mode: "
|
|
44601
|
+
mode: "preview"
|
|
44595
44602
|
};
|
|
44596
44603
|
const legendState = {
|
|
44597
44604
|
activeGroup: activeTagGroup ?? null,
|
|
@@ -44992,7 +44999,9 @@ function parseVisualization(content, palette) {
|
|
|
44992
44999
|
if (currentTimelineTagGroup && indent === 0) {
|
|
44993
45000
|
currentTimelineTagGroup = null;
|
|
44994
45001
|
}
|
|
44995
|
-
const groupMatch = line12.match(
|
|
45002
|
+
const groupMatch = line12.match(
|
|
45003
|
+
/^\[(.+?)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45004
|
+
);
|
|
44996
45005
|
if (groupMatch) {
|
|
44997
45006
|
if (result.type === "arc") {
|
|
44998
45007
|
const name = groupMatch[1].trim();
|
|
@@ -45034,7 +45043,7 @@ function parseVisualization(content, palette) {
|
|
|
45034
45043
|
}
|
|
45035
45044
|
if (result.type === "arc") {
|
|
45036
45045
|
const linkMatch = line12.match(
|
|
45037
|
-
/^(.+?)\s*->\s*(.+?)(?:\(
|
|
45046
|
+
/^(.+?)\s*->\s*(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s+(-?[\d,_]+(?:\.[\d]+)?))?$/
|
|
45038
45047
|
);
|
|
45039
45048
|
if (linkMatch) {
|
|
45040
45049
|
const source = linkMatch[1].trim();
|
|
@@ -45073,7 +45082,7 @@ function parseVisualization(content, palette) {
|
|
|
45073
45082
|
} else {
|
|
45074
45083
|
if (line12.startsWith("//")) continue;
|
|
45075
45084
|
const eraEntryMatch = line12.match(
|
|
45076
|
-
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45085
|
+
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45077
45086
|
);
|
|
45078
45087
|
if (eraEntryMatch) {
|
|
45079
45088
|
const colorAnnotation = eraEntryMatch[4]?.trim() || null;
|
|
@@ -45101,7 +45110,7 @@ function parseVisualization(content, palette) {
|
|
|
45101
45110
|
} else {
|
|
45102
45111
|
if (line12.startsWith("//")) continue;
|
|
45103
45112
|
const markerEntryMatch = line12.match(
|
|
45104
|
-
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45113
|
+
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45105
45114
|
);
|
|
45106
45115
|
if (markerEntryMatch) {
|
|
45107
45116
|
const colorAnnotation = markerEntryMatch[3]?.trim() || null;
|
|
@@ -45134,7 +45143,7 @@ function parseVisualization(content, palette) {
|
|
|
45134
45143
|
continue;
|
|
45135
45144
|
}
|
|
45136
45145
|
const eraMatch = line12.match(
|
|
45137
|
-
/^era\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45146
|
+
/^era\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s*(?:->|\u2013>)\s*(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45138
45147
|
);
|
|
45139
45148
|
if (eraMatch) {
|
|
45140
45149
|
const colorAnnotation = eraMatch[4]?.trim() || null;
|
|
@@ -45153,7 +45162,7 @@ function parseVisualization(content, palette) {
|
|
|
45153
45162
|
continue;
|
|
45154
45163
|
}
|
|
45155
45164
|
const markerMatch = line12.match(
|
|
45156
|
-
/^marker\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45165
|
+
/^marker\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45157
45166
|
);
|
|
45158
45167
|
if (markerMatch) {
|
|
45159
45168
|
const colorAnnotation = markerMatch[3]?.trim() || null;
|
|
@@ -45274,13 +45283,11 @@ function parseVisualization(content, palette) {
|
|
|
45274
45283
|
}
|
|
45275
45284
|
}
|
|
45276
45285
|
if (!/^(solid-fill|no-name|no-value|no-percent|no-title)$/i.test(line12)) {
|
|
45277
|
-
const legacyAliasMatch = line12.match(
|
|
45278
|
-
/^([^(:]+?)(?:\(([^)]+)\))?\s+alias\s+(\S+)\s*$/i
|
|
45279
|
-
);
|
|
45286
|
+
const legacyAliasMatch = line12.match(/^(.+?)\s+alias\s+(\S+)\s*$/i);
|
|
45280
45287
|
if (legacyAliasMatch) {
|
|
45281
|
-
const
|
|
45282
|
-
const
|
|
45283
|
-
const
|
|
45288
|
+
const nameWithMaybeColor = legacyAliasMatch[1].trim();
|
|
45289
|
+
const aliasToken = legacyAliasMatch[2].trim();
|
|
45290
|
+
const { label: name, colorName } = peelTrailingColorName(nameWithMaybeColor);
|
|
45284
45291
|
let color = null;
|
|
45285
45292
|
if (colorName) {
|
|
45286
45293
|
color = resolveColorWithDiagnostic(
|
|
@@ -45302,11 +45309,12 @@ function parseVisualization(content, palette) {
|
|
|
45302
45309
|
continue;
|
|
45303
45310
|
}
|
|
45304
45311
|
const setDeclMatch = line12.match(
|
|
45305
|
-
/^(
|
|
45312
|
+
/^(.+?)(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/i
|
|
45306
45313
|
);
|
|
45307
45314
|
if (setDeclMatch) {
|
|
45308
|
-
const
|
|
45309
|
-
const
|
|
45315
|
+
const nameWithMaybeColor = setDeclMatch[1].trim();
|
|
45316
|
+
const alias = setDeclMatch[2]?.trim() ?? null;
|
|
45317
|
+
const { label: name, colorName } = peelTrailingColorName(nameWithMaybeColor);
|
|
45310
45318
|
let color = null;
|
|
45311
45319
|
if (colorName) {
|
|
45312
45320
|
color = resolveColorWithDiagnostic(
|
|
@@ -45316,7 +45324,6 @@ function parseVisualization(content, palette) {
|
|
|
45316
45324
|
palette
|
|
45317
45325
|
) ?? null;
|
|
45318
45326
|
}
|
|
45319
|
-
const alias = setDeclMatch[3]?.trim() ?? null;
|
|
45320
45327
|
result.vennSets.push({ name, alias, color, lineNumber });
|
|
45321
45328
|
continue;
|
|
45322
45329
|
}
|
|
@@ -45362,10 +45369,9 @@ function parseVisualization(content, palette) {
|
|
|
45362
45369
|
if (quadrantMatch) {
|
|
45363
45370
|
const position = quadrantMatch[1].toLowerCase();
|
|
45364
45371
|
const labelPart = quadrantMatch[2].trim();
|
|
45365
|
-
const
|
|
45366
|
-
const
|
|
45367
|
-
|
|
45368
|
-
labelColorMatch[2].trim(),
|
|
45372
|
+
const { label: text, colorName } = peelTrailingColorName(labelPart);
|
|
45373
|
+
const color = colorName ? resolveColorWithDiagnostic(
|
|
45374
|
+
colorName,
|
|
45369
45375
|
lineNumber,
|
|
45370
45376
|
result.diagnostics,
|
|
45371
45377
|
palette
|
|
@@ -45555,10 +45561,9 @@ function parseVisualization(content, palette) {
|
|
|
45555
45561
|
);
|
|
45556
45562
|
continue;
|
|
45557
45563
|
}
|
|
45558
|
-
const
|
|
45559
|
-
const
|
|
45560
|
-
|
|
45561
|
-
colorMatch[2].trim(),
|
|
45564
|
+
const { label: labelPart, colorName: colorWord } = peelTrailingColorName(joinedLabel);
|
|
45565
|
+
const colorPart = colorWord ? resolveColorWithDiagnostic(
|
|
45566
|
+
colorWord,
|
|
45562
45567
|
lineNumber,
|
|
45563
45568
|
result.diagnostics,
|
|
45564
45569
|
palette
|
|
@@ -46847,7 +46852,7 @@ function makeTimelineHoverHelpers() {
|
|
|
46847
46852
|
setTagAttrs
|
|
46848
46853
|
};
|
|
46849
46854
|
}
|
|
46850
|
-
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode) {
|
|
46855
|
+
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
46851
46856
|
if (parsed.timelineTagGroups.length === 0) return;
|
|
46852
46857
|
const { width, textColor, groupColorMap, solid } = setup;
|
|
46853
46858
|
const { FADE_OPACITY: FADE_OPACITY3, fadeReset, fadeToTagValue } = hovers;
|
|
@@ -46918,7 +46923,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
|
|
|
46918
46923
|
const centralConfig = {
|
|
46919
46924
|
groups: centralGroups,
|
|
46920
46925
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
46921
|
-
mode: "
|
|
46926
|
+
mode: exportMode ? "export" : "preview",
|
|
46922
46927
|
capsulePillAddonWidth: iconAddon
|
|
46923
46928
|
};
|
|
46924
46929
|
const centralState = { activeGroup: centralActive };
|
|
@@ -47762,7 +47767,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
47762
47767
|
}
|
|
47763
47768
|
}
|
|
47764
47769
|
}
|
|
47765
|
-
function renderTimeline(container, parsed, palette, isDark, onClickItem, exportDims, activeTagGroup, swimlaneTagGroup, onTagStateChange, viewMode) {
|
|
47770
|
+
function renderTimeline(container, parsed, palette, isDark, onClickItem, exportDims, activeTagGroup, swimlaneTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
47766
47771
|
const setup = setupTimeline(
|
|
47767
47772
|
container,
|
|
47768
47773
|
parsed,
|
|
@@ -47837,7 +47842,8 @@ function renderTimeline(container, parsed, palette, isDark, onClickItem, exportD
|
|
|
47837
47842
|
swimlaneTagGroup,
|
|
47838
47843
|
activeTagGroup,
|
|
47839
47844
|
onTagStateChange,
|
|
47840
|
-
viewMode
|
|
47845
|
+
viewMode,
|
|
47846
|
+
exportMode
|
|
47841
47847
|
);
|
|
47842
47848
|
}
|
|
47843
47849
|
function getRotateFn(mode) {
|
|
@@ -48981,6 +48987,7 @@ function finalizeSvgExport(container, theme, palette) {
|
|
|
48981
48987
|
return svgHtml;
|
|
48982
48988
|
}
|
|
48983
48989
|
async function renderForExport(content, theme, palette, viewState, options) {
|
|
48990
|
+
const exportMode = options?.exportMode ?? false;
|
|
48984
48991
|
const { parseDgmoChartType: parseDgmoChartType2 } = await Promise.resolve().then(() => (init_dgmo_router(), dgmo_router_exports));
|
|
48985
48992
|
const detectedType = parseDgmoChartType2(content);
|
|
48986
48993
|
if (detectedType === "org") {
|
|
@@ -49022,7 +49029,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49022
49029
|
void 0,
|
|
49023
49030
|
{ width: exportWidth, height: exportHeight },
|
|
49024
49031
|
activeTagGroup,
|
|
49025
|
-
hiddenAttributes
|
|
49032
|
+
hiddenAttributes,
|
|
49033
|
+
void 0,
|
|
49034
|
+
exportMode
|
|
49026
49035
|
);
|
|
49027
49036
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49028
49037
|
}
|
|
@@ -49064,7 +49073,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49064
49073
|
void 0,
|
|
49065
49074
|
{ width: exportWidth, height: exportHeight },
|
|
49066
49075
|
activeTagGroup,
|
|
49067
|
-
hiddenAttributes
|
|
49076
|
+
hiddenAttributes,
|
|
49077
|
+
exportMode
|
|
49068
49078
|
);
|
|
49069
49079
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49070
49080
|
}
|
|
@@ -49087,7 +49097,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49087
49097
|
currentSwimlaneGroup: viewState?.swim ?? null,
|
|
49088
49098
|
collapsedLanes: viewState?.cl ? new Set(viewState.cl) : void 0,
|
|
49089
49099
|
collapsedColumns: viewState?.cc ? new Set(viewState.cc) : void 0,
|
|
49090
|
-
compactMeta: viewState?.cm
|
|
49100
|
+
compactMeta: viewState?.cm,
|
|
49101
|
+
exportMode
|
|
49091
49102
|
});
|
|
49092
49103
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49093
49104
|
}
|
|
@@ -49111,7 +49122,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49111
49122
|
effectivePalette2,
|
|
49112
49123
|
theme === "dark",
|
|
49113
49124
|
void 0,
|
|
49114
|
-
{ width: exportWidth, height: exportHeight }
|
|
49125
|
+
{ width: exportWidth, height: exportHeight },
|
|
49126
|
+
void 0,
|
|
49127
|
+
exportMode
|
|
49115
49128
|
);
|
|
49116
49129
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49117
49130
|
}
|
|
@@ -49141,7 +49154,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49141
49154
|
erParsed.options["active-tag"],
|
|
49142
49155
|
viewState?.tag ?? options?.tagGroup
|
|
49143
49156
|
),
|
|
49144
|
-
viewState?.sem
|
|
49157
|
+
viewState?.sem,
|
|
49158
|
+
exportMode
|
|
49145
49159
|
);
|
|
49146
49160
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49147
49161
|
}
|
|
@@ -49174,7 +49188,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49174
49188
|
{
|
|
49175
49189
|
exportDims: { width: exportWidth, height: exportHeight },
|
|
49176
49190
|
activeTagGroup: viewState?.tag ?? options?.tagGroup,
|
|
49177
|
-
hiddenTagValues: blHiddenTagValues
|
|
49191
|
+
hiddenTagValues: blHiddenTagValues,
|
|
49192
|
+
exportMode
|
|
49178
49193
|
}
|
|
49179
49194
|
);
|
|
49180
49195
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
@@ -49220,7 +49235,7 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49220
49235
|
void 0,
|
|
49221
49236
|
hideDescriptions,
|
|
49222
49237
|
colorByDepth ? null : activeTagGroup,
|
|
49223
|
-
colorByDepth ? { colorByDepth: true } :
|
|
49238
|
+
colorByDepth ? { colorByDepth: true, exportMode } : { exportMode }
|
|
49224
49239
|
);
|
|
49225
49240
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49226
49241
|
}
|
|
@@ -49283,7 +49298,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49283
49298
|
c4Parsed.tagGroups,
|
|
49284
49299
|
c4Parsed.options["active-tag"],
|
|
49285
49300
|
viewState?.tag ?? options?.tagGroup
|
|
49286
|
-
)
|
|
49301
|
+
),
|
|
49302
|
+
exportMode
|
|
49287
49303
|
);
|
|
49288
49304
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49289
49305
|
}
|
|
@@ -49419,7 +49435,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49419
49435
|
resolved.tagGroups,
|
|
49420
49436
|
resolved.options.activeTag ?? void 0,
|
|
49421
49437
|
viewState?.tag ?? options?.tagGroup
|
|
49422
|
-
)
|
|
49438
|
+
),
|
|
49439
|
+
exportMode
|
|
49423
49440
|
},
|
|
49424
49441
|
{ width: EXPORT_W, height: EXPORT_H }
|
|
49425
49442
|
);
|
|
@@ -49460,7 +49477,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49460
49477
|
effectivePalette2,
|
|
49461
49478
|
theme === "dark",
|
|
49462
49479
|
{ width: RADAR_EXPORT_W, height: RADAR_EXPORT_H },
|
|
49463
|
-
viewState
|
|
49480
|
+
viewState,
|
|
49481
|
+
exportMode
|
|
49464
49482
|
);
|
|
49465
49483
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49466
49484
|
}
|
|
@@ -49480,7 +49498,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49480
49498
|
jmLayout.totalHeight
|
|
49481
49499
|
);
|
|
49482
49500
|
renderJourneyMap2(container2, jmParsed, effectivePalette2, theme === "dark", {
|
|
49483
|
-
exportDims: { width: jmLayout.totalWidth, height: jmLayout.totalHeight }
|
|
49501
|
+
exportDims: { width: jmLayout.totalWidth, height: jmLayout.totalHeight },
|
|
49502
|
+
exportMode
|
|
49484
49503
|
});
|
|
49485
49504
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49486
49505
|
}
|
|
@@ -49497,7 +49516,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49497
49516
|
effectivePalette2,
|
|
49498
49517
|
theme === "dark",
|
|
49499
49518
|
{ width: EXPORT_WIDTH, height: EXPORT_HEIGHT },
|
|
49500
|
-
viewState
|
|
49519
|
+
viewState,
|
|
49520
|
+
exportMode
|
|
49501
49521
|
);
|
|
49502
49522
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49503
49523
|
}
|
|
@@ -49616,7 +49636,10 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49616
49636
|
void 0,
|
|
49617
49637
|
viewState?.tag ?? options?.tagGroup
|
|
49618
49638
|
),
|
|
49619
|
-
viewState?.swim
|
|
49639
|
+
viewState?.swim,
|
|
49640
|
+
void 0,
|
|
49641
|
+
void 0,
|
|
49642
|
+
exportMode
|
|
49620
49643
|
);
|
|
49621
49644
|
} else if (parsed.type === "venn") {
|
|
49622
49645
|
renderVenn(container, parsed, effectivePalette, isDark, void 0, dims);
|
|
@@ -50365,7 +50388,6 @@ __export(internal_exports, {
|
|
|
50365
50388
|
looksLikeSitemap: () => looksLikeSitemap,
|
|
50366
50389
|
looksLikeState: () => looksLikeState,
|
|
50367
50390
|
makeDgmoError: () => makeDgmoError,
|
|
50368
|
-
matchColorParens: () => matchColorParens,
|
|
50369
50391
|
matchesContiguously: () => matchesContiguously,
|
|
50370
50392
|
measurePertAnalysisBlock: () => measurePertAnalysisBlock,
|
|
50371
50393
|
mix: () => mix,
|
|
@@ -51605,7 +51627,11 @@ init_parser8();
|
|
|
51605
51627
|
init_parser2();
|
|
51606
51628
|
init_parser10();
|
|
51607
51629
|
init_parsing();
|
|
51630
|
+
init_colors();
|
|
51608
51631
|
init_chart_types();
|
|
51632
|
+
var RECOGNIZED_COLOR_SET2 = new Set(
|
|
51633
|
+
RECOGNIZED_COLOR_NAMES
|
|
51634
|
+
);
|
|
51609
51635
|
var extractorRegistry = /* @__PURE__ */ new Map();
|
|
51610
51636
|
function registerExtractor(kind, fn) {
|
|
51611
51637
|
extractorRegistry.set(kind, fn);
|
|
@@ -52374,8 +52400,8 @@ function extractTagDeclarations(docText) {
|
|
|
52374
52400
|
}
|
|
52375
52401
|
if (currentAlias !== null && raw.length > 0 && (raw[0] === " " || raw[0] === " ")) {
|
|
52376
52402
|
if (trimmed && !trimmed.startsWith("//")) {
|
|
52377
|
-
const
|
|
52378
|
-
const value =
|
|
52403
|
+
const lastSpaceIdx = trimmed.lastIndexOf(" ");
|
|
52404
|
+
const value = lastSpaceIdx > 0 && RECOGNIZED_COLOR_SET2.has(trimmed.substring(lastSpaceIdx + 1)) ? trimmed.substring(0, lastSpaceIdx).trim() : trimmed;
|
|
52379
52405
|
if (value) currentValues.push(value);
|
|
52380
52406
|
}
|
|
52381
52407
|
continue;
|
|
@@ -52927,7 +52953,6 @@ init_dgmo_router();
|
|
|
52927
52953
|
looksLikeSitemap,
|
|
52928
52954
|
looksLikeState,
|
|
52929
52955
|
makeDgmoError,
|
|
52930
|
-
matchColorParens,
|
|
52931
52956
|
matchesContiguously,
|
|
52932
52957
|
measurePertAnalysisBlock,
|
|
52933
52958
|
mix,
|