@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/advanced.js
CHANGED
|
@@ -138,114 +138,6 @@ var init_diagnostics = __esm({
|
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
// src/colors.ts
|
|
142
|
-
function isRecognizedColorName(name) {
|
|
143
|
-
return Object.prototype.hasOwnProperty.call(colorNames, name.toLowerCase());
|
|
144
|
-
}
|
|
145
|
-
function resolveColor(color, palette) {
|
|
146
|
-
if (!color) return null;
|
|
147
|
-
if (color.startsWith("#")) return null;
|
|
148
|
-
const lower = color.toLowerCase();
|
|
149
|
-
if (!isRecognizedColorName(lower)) return null;
|
|
150
|
-
if (palette) {
|
|
151
|
-
const named = palette.colors[lower];
|
|
152
|
-
if (named) return named;
|
|
153
|
-
}
|
|
154
|
-
return colorNames[lower];
|
|
155
|
-
}
|
|
156
|
-
function resolveColorWithDiagnostic(color, line12, diagnostics, palette) {
|
|
157
|
-
const resolved = resolveColor(color, palette);
|
|
158
|
-
if (resolved !== null) return resolved;
|
|
159
|
-
const hint = suggest(color, RECOGNIZED_COLOR_NAMES);
|
|
160
|
-
const suggestion = hint ? ` ${hint}` : "";
|
|
161
|
-
diagnostics.push(
|
|
162
|
-
makeDgmoError(
|
|
163
|
-
line12,
|
|
164
|
-
`Unknown color "${color}". Allowed: ${RECOGNIZED_COLOR_NAMES.join(", ")}.${suggestion}`,
|
|
165
|
-
"warning"
|
|
166
|
-
)
|
|
167
|
-
);
|
|
168
|
-
return void 0;
|
|
169
|
-
}
|
|
170
|
-
var nord, colorNames, RECOGNIZED_COLOR_NAMES, seriesColors;
|
|
171
|
-
var init_colors = __esm({
|
|
172
|
-
"src/colors.ts"() {
|
|
173
|
-
"use strict";
|
|
174
|
-
init_diagnostics();
|
|
175
|
-
nord = {
|
|
176
|
-
// Polar Night (dark)
|
|
177
|
-
nord0: "#2e3440",
|
|
178
|
-
nord1: "#3b4252",
|
|
179
|
-
nord2: "#434c5e",
|
|
180
|
-
nord3: "#4c566a",
|
|
181
|
-
// Snow Storm (light)
|
|
182
|
-
nord4: "#d8dee9",
|
|
183
|
-
nord5: "#e5e9f0",
|
|
184
|
-
nord6: "#eceff4",
|
|
185
|
-
// Frost (accent blues)
|
|
186
|
-
nord7: "#8fbcbb",
|
|
187
|
-
nord8: "#88c0d0",
|
|
188
|
-
nord9: "#81a1c1",
|
|
189
|
-
nord10: "#5e81ac",
|
|
190
|
-
// Aurora (colors)
|
|
191
|
-
nord11: "#bf616a",
|
|
192
|
-
// red
|
|
193
|
-
nord12: "#d08770",
|
|
194
|
-
// orange
|
|
195
|
-
nord13: "#ebcb8b",
|
|
196
|
-
// yellow
|
|
197
|
-
nord14: "#a3be8c",
|
|
198
|
-
// green
|
|
199
|
-
nord15: "#b48ead"
|
|
200
|
-
// purple
|
|
201
|
-
};
|
|
202
|
-
colorNames = {
|
|
203
|
-
red: nord.nord11,
|
|
204
|
-
orange: nord.nord12,
|
|
205
|
-
yellow: nord.nord13,
|
|
206
|
-
green: nord.nord14,
|
|
207
|
-
blue: nord.nord10,
|
|
208
|
-
purple: nord.nord15,
|
|
209
|
-
teal: nord.nord7,
|
|
210
|
-
cyan: nord.nord8,
|
|
211
|
-
gray: nord.nord3,
|
|
212
|
-
black: nord.nord0,
|
|
213
|
-
white: nord.nord6
|
|
214
|
-
};
|
|
215
|
-
RECOGNIZED_COLOR_NAMES = Object.freeze([
|
|
216
|
-
"red",
|
|
217
|
-
"orange",
|
|
218
|
-
"yellow",
|
|
219
|
-
"green",
|
|
220
|
-
"blue",
|
|
221
|
-
"purple",
|
|
222
|
-
"teal",
|
|
223
|
-
"cyan",
|
|
224
|
-
"gray",
|
|
225
|
-
"black",
|
|
226
|
-
"white"
|
|
227
|
-
]);
|
|
228
|
-
seriesColors = [
|
|
229
|
-
nord.nord10,
|
|
230
|
-
// blue
|
|
231
|
-
nord.nord14,
|
|
232
|
-
// green
|
|
233
|
-
nord.nord13,
|
|
234
|
-
// yellow
|
|
235
|
-
nord.nord12,
|
|
236
|
-
// orange
|
|
237
|
-
nord.nord15,
|
|
238
|
-
// purple
|
|
239
|
-
nord.nord11,
|
|
240
|
-
// red
|
|
241
|
-
nord.nord7,
|
|
242
|
-
// teal
|
|
243
|
-
nord.nord8
|
|
244
|
-
// light blue
|
|
245
|
-
];
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
|
|
249
141
|
// src/utils/arrows.ts
|
|
250
142
|
function validateLabelCharacters(label, lineNumber) {
|
|
251
143
|
const out = [];
|
|
@@ -286,15 +178,6 @@ function parseInArrowLabel(rawLabel, lineNumber) {
|
|
|
286
178
|
const diagnostics = validateLabelCharacters(trimmed, lineNumber);
|
|
287
179
|
return { label: trimmed, diagnostics };
|
|
288
180
|
}
|
|
289
|
-
function matchColorParens(content) {
|
|
290
|
-
const m = content.match(/^\(([A-Za-z]+)\)$/);
|
|
291
|
-
if (!m) return null;
|
|
292
|
-
const candidate = m[1].toLowerCase();
|
|
293
|
-
if (RECOGNIZED_COLOR_NAMES.includes(candidate)) {
|
|
294
|
-
return candidate;
|
|
295
|
-
}
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
181
|
function parseArrow(line12) {
|
|
299
182
|
if (BIDI_SYNC_RE.test(line12) || BIDI_ASYNC_RE.test(line12)) {
|
|
300
183
|
return {
|
|
@@ -333,7 +216,6 @@ var init_arrows = __esm({
|
|
|
333
216
|
"src/utils/arrows.ts"() {
|
|
334
217
|
"use strict";
|
|
335
218
|
init_diagnostics();
|
|
336
|
-
init_colors();
|
|
337
219
|
ARROW_DIAGNOSTIC_CODES = {
|
|
338
220
|
/** Active: label contains `->` or `~>` substring (TD-13). */
|
|
339
221
|
ARROW_SUBSTRING_IN_LABEL: "E_ARROW_SUBSTRING_IN_LABEL",
|
|
@@ -695,6 +577,114 @@ var init_time_ticks = __esm({
|
|
|
695
577
|
}
|
|
696
578
|
});
|
|
697
579
|
|
|
580
|
+
// src/colors.ts
|
|
581
|
+
function isRecognizedColorName(name) {
|
|
582
|
+
return Object.prototype.hasOwnProperty.call(colorNames, name.toLowerCase());
|
|
583
|
+
}
|
|
584
|
+
function resolveColor(color, palette) {
|
|
585
|
+
if (!color) return null;
|
|
586
|
+
if (color.startsWith("#")) return null;
|
|
587
|
+
const lower = color.toLowerCase();
|
|
588
|
+
if (!isRecognizedColorName(lower)) return null;
|
|
589
|
+
if (palette) {
|
|
590
|
+
const named = palette.colors[lower];
|
|
591
|
+
if (named) return named;
|
|
592
|
+
}
|
|
593
|
+
return colorNames[lower];
|
|
594
|
+
}
|
|
595
|
+
function resolveColorWithDiagnostic(color, line12, diagnostics, palette) {
|
|
596
|
+
const resolved = resolveColor(color, palette);
|
|
597
|
+
if (resolved !== null) return resolved;
|
|
598
|
+
const hint = suggest(color, RECOGNIZED_COLOR_NAMES);
|
|
599
|
+
const suggestion = hint ? ` ${hint}` : "";
|
|
600
|
+
diagnostics.push(
|
|
601
|
+
makeDgmoError(
|
|
602
|
+
line12,
|
|
603
|
+
`Unknown color "${color}". Allowed: ${RECOGNIZED_COLOR_NAMES.join(", ")}.${suggestion}`,
|
|
604
|
+
"warning"
|
|
605
|
+
)
|
|
606
|
+
);
|
|
607
|
+
return void 0;
|
|
608
|
+
}
|
|
609
|
+
var nord, colorNames, RECOGNIZED_COLOR_NAMES, seriesColors;
|
|
610
|
+
var init_colors = __esm({
|
|
611
|
+
"src/colors.ts"() {
|
|
612
|
+
"use strict";
|
|
613
|
+
init_diagnostics();
|
|
614
|
+
nord = {
|
|
615
|
+
// Polar Night (dark)
|
|
616
|
+
nord0: "#2e3440",
|
|
617
|
+
nord1: "#3b4252",
|
|
618
|
+
nord2: "#434c5e",
|
|
619
|
+
nord3: "#4c566a",
|
|
620
|
+
// Snow Storm (light)
|
|
621
|
+
nord4: "#d8dee9",
|
|
622
|
+
nord5: "#e5e9f0",
|
|
623
|
+
nord6: "#eceff4",
|
|
624
|
+
// Frost (accent blues)
|
|
625
|
+
nord7: "#8fbcbb",
|
|
626
|
+
nord8: "#88c0d0",
|
|
627
|
+
nord9: "#81a1c1",
|
|
628
|
+
nord10: "#5e81ac",
|
|
629
|
+
// Aurora (colors)
|
|
630
|
+
nord11: "#bf616a",
|
|
631
|
+
// red
|
|
632
|
+
nord12: "#d08770",
|
|
633
|
+
// orange
|
|
634
|
+
nord13: "#ebcb8b",
|
|
635
|
+
// yellow
|
|
636
|
+
nord14: "#a3be8c",
|
|
637
|
+
// green
|
|
638
|
+
nord15: "#b48ead"
|
|
639
|
+
// purple
|
|
640
|
+
};
|
|
641
|
+
colorNames = {
|
|
642
|
+
red: nord.nord11,
|
|
643
|
+
orange: nord.nord12,
|
|
644
|
+
yellow: nord.nord13,
|
|
645
|
+
green: nord.nord14,
|
|
646
|
+
blue: nord.nord10,
|
|
647
|
+
purple: nord.nord15,
|
|
648
|
+
teal: nord.nord7,
|
|
649
|
+
cyan: nord.nord8,
|
|
650
|
+
gray: nord.nord3,
|
|
651
|
+
black: nord.nord0,
|
|
652
|
+
white: nord.nord6
|
|
653
|
+
};
|
|
654
|
+
RECOGNIZED_COLOR_NAMES = Object.freeze([
|
|
655
|
+
"red",
|
|
656
|
+
"orange",
|
|
657
|
+
"yellow",
|
|
658
|
+
"green",
|
|
659
|
+
"blue",
|
|
660
|
+
"purple",
|
|
661
|
+
"teal",
|
|
662
|
+
"cyan",
|
|
663
|
+
"gray",
|
|
664
|
+
"black",
|
|
665
|
+
"white"
|
|
666
|
+
]);
|
|
667
|
+
seriesColors = [
|
|
668
|
+
nord.nord10,
|
|
669
|
+
// blue
|
|
670
|
+
nord.nord14,
|
|
671
|
+
// green
|
|
672
|
+
nord.nord13,
|
|
673
|
+
// yellow
|
|
674
|
+
nord.nord12,
|
|
675
|
+
// orange
|
|
676
|
+
nord.nord15,
|
|
677
|
+
// purple
|
|
678
|
+
nord.nord11,
|
|
679
|
+
// red
|
|
680
|
+
nord.nord7,
|
|
681
|
+
// teal
|
|
682
|
+
nord.nord8
|
|
683
|
+
// light blue
|
|
684
|
+
];
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
|
|
698
688
|
// src/palettes/registry.ts
|
|
699
689
|
function isValidHex(value) {
|
|
700
690
|
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
@@ -1927,17 +1917,21 @@ function measureIndent(line12) {
|
|
|
1927
1917
|
return indent;
|
|
1928
1918
|
}
|
|
1929
1919
|
function extractColor(label, palette, diagnostics, line12) {
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1932
|
-
|
|
1920
|
+
const lastSpaceIdx = Math.max(
|
|
1921
|
+
label.lastIndexOf(" "),
|
|
1922
|
+
label.lastIndexOf(" ")
|
|
1923
|
+
);
|
|
1924
|
+
if (lastSpaceIdx < 0) return { label };
|
|
1925
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
1926
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
|
|
1933
1927
|
let color;
|
|
1934
1928
|
if (diagnostics && line12 !== void 0) {
|
|
1935
|
-
color = resolveColorWithDiagnostic(
|
|
1929
|
+
color = resolveColorWithDiagnostic(trailing, line12, diagnostics, palette);
|
|
1936
1930
|
} else {
|
|
1937
|
-
color = resolveColor(
|
|
1931
|
+
color = resolveColor(trailing, palette) ?? void 0;
|
|
1938
1932
|
}
|
|
1939
1933
|
return {
|
|
1940
|
-
label: label.substring(0,
|
|
1934
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
1941
1935
|
color
|
|
1942
1936
|
};
|
|
1943
1937
|
}
|
|
@@ -2070,14 +2064,18 @@ function parseSeriesNames(value, lines, lineIndex, palette, diagnostics) {
|
|
|
2070
2064
|
}
|
|
2071
2065
|
return { series, names, nameColors, nameLineNumbers, newIndex };
|
|
2072
2066
|
}
|
|
2073
|
-
function
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
return
|
|
2067
|
+
function peelTrailingColorName(label) {
|
|
2068
|
+
const lastSpaceIdx = Math.max(
|
|
2069
|
+
label.lastIndexOf(" "),
|
|
2070
|
+
label.lastIndexOf(" ")
|
|
2071
|
+
);
|
|
2072
|
+
if (lastSpaceIdx < 0) return { label };
|
|
2073
|
+
const trailing = label.substring(lastSpaceIdx + 1);
|
|
2074
|
+
if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
|
|
2075
|
+
return {
|
|
2076
|
+
label: label.substring(0, lastSpaceIdx).trimEnd(),
|
|
2077
|
+
colorName: trailing
|
|
2078
|
+
};
|
|
2081
2079
|
}
|
|
2082
2080
|
function parsePipeMetadata(segments, aliasMap = /* @__PURE__ */ new Map(), errorMultiplePipes) {
|
|
2083
2081
|
if (segments.length > 2) {
|
|
@@ -2099,11 +2097,14 @@ function parsePipeMetadata(segments, aliasMap = /* @__PURE__ */ new Map(), error
|
|
|
2099
2097
|
}
|
|
2100
2098
|
return metadata;
|
|
2101
2099
|
}
|
|
2102
|
-
var ALL_CHART_TYPES, PIPE_KEY_VALUE_PREFIX_RE, PIPE_LIKELY_STRUCTURED_TAIL_RE,
|
|
2100
|
+
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;
|
|
2103
2101
|
var init_parsing = __esm({
|
|
2104
2102
|
"src/utils/parsing.ts"() {
|
|
2105
2103
|
"use strict";
|
|
2106
2104
|
init_colors();
|
|
2105
|
+
RECOGNIZED_COLOR_SET = new Set(
|
|
2106
|
+
RECOGNIZED_COLOR_NAMES
|
|
2107
|
+
);
|
|
2107
2108
|
ALL_CHART_TYPES = /* @__PURE__ */ new Set([
|
|
2108
2109
|
// data charts
|
|
2109
2110
|
"bar",
|
|
@@ -2155,7 +2156,6 @@ var init_parsing = __esm({
|
|
|
2155
2156
|
]);
|
|
2156
2157
|
PIPE_KEY_VALUE_PREFIX_RE = /^\s*[A-Za-z][A-Za-z0-9_-]*\s*:/;
|
|
2157
2158
|
PIPE_LIKELY_STRUCTURED_TAIL_RE = /,\s*[A-Za-z][A-Za-z0-9_-]*\s*:/;
|
|
2158
|
-
COLOR_SUFFIX_RE = /\(([^)]+)\)\s*$/;
|
|
2159
2159
|
OPTION_NOCOLON_RE = /^([a-z][a-z0-9-]*)\s+(.+)$/i;
|
|
2160
2160
|
GLOBAL_BOOLEANS = /* @__PURE__ */ new Set([
|
|
2161
2161
|
"solid-fill",
|
|
@@ -2192,7 +2192,7 @@ function parseTagDeclaration(line12) {
|
|
|
2192
2192
|
let restStartIdx = 1;
|
|
2193
2193
|
let valueStart = tokens.length;
|
|
2194
2194
|
for (let i = 1; i < tokens.length; i++) {
|
|
2195
|
-
if (tokens[i].includes("
|
|
2195
|
+
if (tokens[i].includes(",")) {
|
|
2196
2196
|
valueStart = i;
|
|
2197
2197
|
break;
|
|
2198
2198
|
}
|
|
@@ -2224,13 +2224,29 @@ function parseTagDeclaration(line12) {
|
|
|
2224
2224
|
restStartIdx = valueStart;
|
|
2225
2225
|
}
|
|
2226
2226
|
} else {
|
|
2227
|
-
|
|
2228
|
-
|
|
2227
|
+
const isColorWord = (s) => RECOGNIZED_COLOR_NAMES.includes(s);
|
|
2228
|
+
if (valueStart < tokens.length) {
|
|
2229
|
+
const commaTokenIdx = valueStart;
|
|
2230
|
+
const lastBeforeComma = tokens[commaTokenIdx].replace(/,$/, "");
|
|
2231
|
+
const firstValueStart = isColorWord(lastBeforeComma) ? commaTokenIdx - 1 : commaTokenIdx;
|
|
2232
|
+
const prefixEnd = firstValueStart;
|
|
2233
|
+
const aliasCandidate = prefixEnd > 1 ? tokens[prefixEnd - 1] : void 0;
|
|
2234
|
+
if (aliasCandidate && isAliasToken(aliasCandidate) && !isColorWord(aliasCandidate)) {
|
|
2235
|
+
alias = aliasCandidate;
|
|
2236
|
+
legacyForm = "bare-shorthand";
|
|
2237
|
+
name = tokens.slice(0, prefixEnd - 1).map((t) => stripQuotes(t)).join(" ");
|
|
2238
|
+
restStartIdx = prefixEnd;
|
|
2239
|
+
} else {
|
|
2240
|
+
name = tokens.slice(0, prefixEnd).map((t) => stripQuotes(t)).join(" ");
|
|
2241
|
+
restStartIdx = prefixEnd;
|
|
2242
|
+
}
|
|
2243
|
+
} else if (tokens[0][0] === '"' || tokens[0][0] === "'") {
|
|
2244
|
+
if (tokens.length > 1 && isAliasToken(tokens[1]) && !isColorWord(tokens[1])) {
|
|
2229
2245
|
alias = tokens[1];
|
|
2230
2246
|
legacyForm = "bare-shorthand";
|
|
2231
2247
|
restStartIdx = 2;
|
|
2232
2248
|
}
|
|
2233
|
-
} else if (valueStart > 1 && isAliasToken(tokens[valueStart - 1])) {
|
|
2249
|
+
} else if (valueStart > 1 && isAliasToken(tokens[valueStart - 1]) && !isColorWord(tokens[valueStart - 1])) {
|
|
2234
2250
|
alias = tokens[valueStart - 1];
|
|
2235
2251
|
legacyForm = "bare-shorthand";
|
|
2236
2252
|
name = tokens.slice(0, valueStart - 1).map((t) => stripQuotes(t)).join(" ");
|
|
@@ -2245,10 +2261,13 @@ function parseTagDeclaration(line12) {
|
|
|
2245
2261
|
inlineValues = valueStr.split(",").map((v) => v.trim()).filter(Boolean);
|
|
2246
2262
|
}
|
|
2247
2263
|
if (!inlineValues || inlineValues.length === 0) {
|
|
2248
|
-
const
|
|
2249
|
-
if (
|
|
2250
|
-
|
|
2251
|
-
|
|
2264
|
+
const lastSpaceIdx = name.lastIndexOf(" ");
|
|
2265
|
+
if (lastSpaceIdx > 0) {
|
|
2266
|
+
const trailing = name.substring(lastSpaceIdx + 1);
|
|
2267
|
+
if (RECOGNIZED_COLOR_NAMES.includes(trailing)) {
|
|
2268
|
+
colorHint = trailing;
|
|
2269
|
+
name = name.substring(0, lastSpaceIdx).trimEnd();
|
|
2270
|
+
}
|
|
2252
2271
|
}
|
|
2253
2272
|
}
|
|
2254
2273
|
return {
|
|
@@ -2376,6 +2395,7 @@ var init_tag_groups = __esm({
|
|
|
2376
2395
|
"use strict";
|
|
2377
2396
|
init_parsing();
|
|
2378
2397
|
init_diagnostics();
|
|
2398
|
+
init_colors();
|
|
2379
2399
|
TAG_BLOCK_NOCOLON_RE = /^tag\s+/i;
|
|
2380
2400
|
VALID_TAG_IDENT_RE = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
2381
2401
|
}
|
|
@@ -2649,7 +2669,7 @@ function buildControlsGroupLayout(config, state) {
|
|
|
2649
2669
|
}
|
|
2650
2670
|
function computeLegendLayout(config, state, containerWidth) {
|
|
2651
2671
|
const { groups, controls: configControls, mode } = config;
|
|
2652
|
-
const isExport = mode === "
|
|
2672
|
+
const isExport = mode === "export";
|
|
2653
2673
|
const activeGroupName = state.activeGroup?.toLowerCase() ?? null;
|
|
2654
2674
|
if (isExport && !activeGroupName) {
|
|
2655
2675
|
return {
|
|
@@ -2939,7 +2959,10 @@ function renderLegendD3(container, config, state, palette, isDark, callbacks, co
|
|
|
2939
2959
|
const width = containerWidth ?? parseFloat(container.attr("width") || "800");
|
|
2940
2960
|
let currentState = { ...state };
|
|
2941
2961
|
let currentLayout;
|
|
2942
|
-
const legendG = container.append("g").attr("class", "dgmo-legend")
|
|
2962
|
+
const legendG = container.append("g").attr("class", "dgmo-legend").attr("data-legend-title-relation", config.position.titleRelation).attr(
|
|
2963
|
+
"data-legend-capsule-addon-width",
|
|
2964
|
+
String(config.capsulePillAddonWidth ?? 0)
|
|
2965
|
+
);
|
|
2943
2966
|
function render2() {
|
|
2944
2967
|
currentLayout = computeLegendLayout(config, currentState, width);
|
|
2945
2968
|
legendG.selectAll("*").remove();
|
|
@@ -3798,7 +3821,7 @@ function parseSequenceDgmo(content) {
|
|
|
3798
3821
|
if (groupColor) {
|
|
3799
3822
|
pushWarning(
|
|
3800
3823
|
lineNumber,
|
|
3801
|
-
`(${groupColor}) color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3824
|
+
`'(${groupColor})' parens-color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3802
3825
|
);
|
|
3803
3826
|
}
|
|
3804
3827
|
contentStarted = true;
|
|
@@ -3878,7 +3901,7 @@ function parseSequenceDgmo(content) {
|
|
|
3878
3901
|
if (!color) {
|
|
3879
3902
|
pushError(
|
|
3880
3903
|
lineNumber,
|
|
3881
|
-
`Expected 'Value
|
|
3904
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
3882
3905
|
);
|
|
3883
3906
|
continue;
|
|
3884
3907
|
}
|
|
@@ -3902,11 +3925,13 @@ function parseSequenceDgmo(content) {
|
|
|
3902
3925
|
blockStack.pop();
|
|
3903
3926
|
}
|
|
3904
3927
|
const labelRaw = sectionMatch[1].trim();
|
|
3905
|
-
const colorMatch = labelRaw.match(
|
|
3928
|
+
const colorMatch = labelRaw.match(
|
|
3929
|
+
/^(.+?)\((red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\)$/
|
|
3930
|
+
);
|
|
3906
3931
|
if (colorMatch) {
|
|
3907
3932
|
pushWarning(
|
|
3908
3933
|
lineNumber,
|
|
3909
|
-
`(${colorMatch[2]
|
|
3934
|
+
`'(${colorMatch[2]})' parens-color syntax removed from sequence diagrams \u2014 use 'tag:' groups for coloring`
|
|
3910
3935
|
);
|
|
3911
3936
|
}
|
|
3912
3937
|
contentStarted = true;
|
|
@@ -4061,7 +4086,7 @@ function parseSequenceDgmo(content) {
|
|
|
4061
4086
|
const color = coloredMatch[2].trim();
|
|
4062
4087
|
pushError(
|
|
4063
4088
|
lineNumber,
|
|
4064
|
-
`'${id}(${color})' syntax is no longer supported \u2014 use 'tag:' groups for coloring`
|
|
4089
|
+
`'${id}(${color})' parens-color syntax is no longer supported \u2014 use 'tag:' groups for coloring`
|
|
4065
4090
|
);
|
|
4066
4091
|
contentStarted = true;
|
|
4067
4092
|
const key = addParticipant(id, lineNumber, { metadata: colorMeta });
|
|
@@ -4440,7 +4465,7 @@ var init_parser = __esm({
|
|
|
4440
4465
|
]);
|
|
4441
4466
|
IS_A_PATTERN = /^([^:]+?)\s+is\s+an?\s+(\w+)(?:\s+(.+))?$/i;
|
|
4442
4467
|
POSITION_ONLY_PATTERN = /^([^:]+?)\s+position\s+(-?\d+)$/i;
|
|
4443
|
-
COLORED_PARTICIPANT_PATTERN = /^(\S+?)\((
|
|
4468
|
+
COLORED_PARTICIPANT_PATTERN = /^(\S+?)\((red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\)\s*$/;
|
|
4444
4469
|
GROUP_HEADING_PATTERN = /^\[([^\]|]+?)(?:\(([^)]+)\))?\]\s*(.*)$/;
|
|
4445
4470
|
GROUP_HEADING_FALLBACK = /^\[([^\]]+)\]\s*(.*)$/;
|
|
4446
4471
|
LEGACY_GROUP_PATTERN = /^##\s+(.+?)(?:\(([^)]+)\))?\s*$/;
|
|
@@ -4509,7 +4534,6 @@ function splitArrows(line12) {
|
|
|
4509
4534
|
const arrowEnd = idx + 2;
|
|
4510
4535
|
let arrowStart;
|
|
4511
4536
|
let label;
|
|
4512
|
-
let color;
|
|
4513
4537
|
let openingStart = -1;
|
|
4514
4538
|
for (let i = scanFloor; i < runStart; i++) {
|
|
4515
4539
|
if (line12[i] !== "-") continue;
|
|
@@ -4522,21 +4546,13 @@ function splitArrows(line12) {
|
|
|
4522
4546
|
if (openingStart !== -1) {
|
|
4523
4547
|
let openingEnd = openingStart;
|
|
4524
4548
|
while (openingEnd < runStart && line12[openingEnd] === "-") openingEnd++;
|
|
4525
|
-
const
|
|
4526
|
-
|
|
4527
|
-
if (colorMatch) {
|
|
4528
|
-
color = colorMatch[1].trim();
|
|
4529
|
-
const labelPart = arrowContent.substring(0, colorMatch.index).trim();
|
|
4530
|
-
if (labelPart) label = labelPart;
|
|
4531
|
-
} else {
|
|
4532
|
-
const labelPart = arrowContent.trim();
|
|
4533
|
-
if (labelPart) label = labelPart;
|
|
4534
|
-
}
|
|
4549
|
+
const labelPart = line12.substring(openingEnd, runStart).trim();
|
|
4550
|
+
if (labelPart) label = labelPart;
|
|
4535
4551
|
arrowStart = openingStart;
|
|
4536
4552
|
} else {
|
|
4537
4553
|
arrowStart = runStart;
|
|
4538
4554
|
}
|
|
4539
|
-
arrowPositions.push({ start: arrowStart, end: arrowEnd, label
|
|
4555
|
+
arrowPositions.push({ start: arrowStart, end: arrowEnd, label });
|
|
4540
4556
|
searchFrom = arrowEnd;
|
|
4541
4557
|
scanFloor = arrowEnd;
|
|
4542
4558
|
}
|
|
@@ -4550,11 +4566,7 @@ function splitArrows(line12) {
|
|
|
4550
4566
|
if (beforeText || i === 0) {
|
|
4551
4567
|
segments.push(beforeText);
|
|
4552
4568
|
}
|
|
4553
|
-
|
|
4554
|
-
if (arrow.label && arrow.color)
|
|
4555
|
-
arrowToken = `-${arrow.label}(${arrow.color})->`;
|
|
4556
|
-
else if (arrow.label) arrowToken = `-${arrow.label}->`;
|
|
4557
|
-
else if (arrow.color) arrowToken = `-(${arrow.color})->`;
|
|
4569
|
+
const arrowToken = arrow.label ? `-${arrow.label}->` : "->";
|
|
4558
4570
|
segments.push(arrowToken);
|
|
4559
4571
|
lastIndex = arrow.end;
|
|
4560
4572
|
}
|
|
@@ -4564,45 +4576,14 @@ function splitArrows(line12) {
|
|
|
4564
4576
|
}
|
|
4565
4577
|
return segments;
|
|
4566
4578
|
}
|
|
4567
|
-
function parseArrowToken(token,
|
|
4579
|
+
function parseArrowToken(token, _palette, lineNumber, diagnostics) {
|
|
4568
4580
|
if (token === "->") return {};
|
|
4569
|
-
const
|
|
4570
|
-
if (bareParen) {
|
|
4571
|
-
const colorName = matchColorParens(bareParen[1]);
|
|
4572
|
-
if (colorName) {
|
|
4573
|
-
return {
|
|
4574
|
-
color: resolveColorWithDiagnostic(
|
|
4575
|
-
colorName,
|
|
4576
|
-
lineNumber,
|
|
4577
|
-
diagnostics,
|
|
4578
|
-
palette
|
|
4579
|
-
)
|
|
4580
|
-
};
|
|
4581
|
-
}
|
|
4582
|
-
}
|
|
4583
|
-
const m = token.match(/^-(.+?)(?:\(([^)]+)\))?->$/);
|
|
4581
|
+
const m = token.match(/^-(.+?)->$/);
|
|
4584
4582
|
if (m) {
|
|
4585
4583
|
const rawLabel = m[1] ?? "";
|
|
4586
4584
|
const labelResult = parseInArrowLabel(rawLabel, lineNumber);
|
|
4587
4585
|
diagnostics.push(...labelResult.diagnostics);
|
|
4588
|
-
|
|
4589
|
-
let color = m[2] ? resolveColorWithDiagnostic(
|
|
4590
|
-
m[2].trim(),
|
|
4591
|
-
lineNumber,
|
|
4592
|
-
diagnostics,
|
|
4593
|
-
palette
|
|
4594
|
-
) : void 0;
|
|
4595
|
-
if (label && !color) {
|
|
4596
|
-
const inferred = inferArrowColor(label);
|
|
4597
|
-
if (inferred)
|
|
4598
|
-
color = resolveColorWithDiagnostic(
|
|
4599
|
-
inferred,
|
|
4600
|
-
lineNumber,
|
|
4601
|
-
diagnostics,
|
|
4602
|
-
palette
|
|
4603
|
-
);
|
|
4604
|
-
}
|
|
4605
|
-
return { label, color };
|
|
4586
|
+
return { label: labelResult.label };
|
|
4606
4587
|
}
|
|
4607
4588
|
return {};
|
|
4608
4589
|
}
|
|
@@ -4668,13 +4649,12 @@ function parseFlowchart(content, palette) {
|
|
|
4668
4649
|
result.nodes.push(node);
|
|
4669
4650
|
return node;
|
|
4670
4651
|
}
|
|
4671
|
-
function addEdge(sourceId, targetId, lineNumber, label
|
|
4652
|
+
function addEdge(sourceId, targetId, lineNumber, label) {
|
|
4672
4653
|
const edge = {
|
|
4673
4654
|
source: sourceId,
|
|
4674
4655
|
target: targetId,
|
|
4675
4656
|
lineNumber,
|
|
4676
|
-
...label && { label }
|
|
4677
|
-
...color && { color }
|
|
4657
|
+
...label && { label }
|
|
4678
4658
|
};
|
|
4679
4659
|
result.edges.push(edge);
|
|
4680
4660
|
}
|
|
@@ -4740,13 +4720,7 @@ function parseFlowchart(content, palette) {
|
|
|
4740
4720
|
if (pendingArrow !== null) {
|
|
4741
4721
|
const sourceId = lastNodeId ?? implicitSourceId;
|
|
4742
4722
|
if (sourceId) {
|
|
4743
|
-
addEdge(
|
|
4744
|
-
sourceId,
|
|
4745
|
-
node.id,
|
|
4746
|
-
lineNumber,
|
|
4747
|
-
pendingArrow.label,
|
|
4748
|
-
pendingArrow.color
|
|
4749
|
-
);
|
|
4723
|
+
addEdge(sourceId, node.id, lineNumber, pendingArrow.label);
|
|
4750
4724
|
}
|
|
4751
4725
|
pendingArrow = null;
|
|
4752
4726
|
} else if (lastNodeId === null && implicitSourceId === null) {
|
|
@@ -4871,7 +4845,6 @@ var NODE_ID_RE;
|
|
|
4871
4845
|
var init_flowchart_parser = __esm({
|
|
4872
4846
|
"src/graph/flowchart-parser.ts"() {
|
|
4873
4847
|
"use strict";
|
|
4874
|
-
init_colors();
|
|
4875
4848
|
init_diagnostics();
|
|
4876
4849
|
init_arrows();
|
|
4877
4850
|
init_parsing();
|
|
@@ -4899,7 +4872,6 @@ function splitArrows2(line12) {
|
|
|
4899
4872
|
const arrowEnd = idx + 2;
|
|
4900
4873
|
let arrowStart;
|
|
4901
4874
|
let label;
|
|
4902
|
-
let color;
|
|
4903
4875
|
let openingStart = -1;
|
|
4904
4876
|
for (let i = scanFloor; i < runStart; i++) {
|
|
4905
4877
|
if (line12[i] !== "-") continue;
|
|
@@ -4912,21 +4884,13 @@ function splitArrows2(line12) {
|
|
|
4912
4884
|
if (openingStart !== -1) {
|
|
4913
4885
|
let openingEnd = openingStart;
|
|
4914
4886
|
while (openingEnd < runStart && line12[openingEnd] === "-") openingEnd++;
|
|
4915
|
-
const
|
|
4916
|
-
|
|
4917
|
-
if (colorMatch) {
|
|
4918
|
-
color = colorMatch[1].trim();
|
|
4919
|
-
const labelPart = arrowContent.substring(0, colorMatch.index).trim();
|
|
4920
|
-
if (labelPart) label = labelPart;
|
|
4921
|
-
} else {
|
|
4922
|
-
const labelPart = arrowContent.trim();
|
|
4923
|
-
if (labelPart) label = labelPart;
|
|
4924
|
-
}
|
|
4887
|
+
const labelPart = line12.substring(openingEnd, runStart).trim();
|
|
4888
|
+
if (labelPart) label = labelPart;
|
|
4925
4889
|
arrowStart = openingStart;
|
|
4926
4890
|
} else {
|
|
4927
4891
|
arrowStart = runStart;
|
|
4928
4892
|
}
|
|
4929
|
-
arrowPositions.push({ start: arrowStart, end: arrowEnd, label
|
|
4893
|
+
arrowPositions.push({ start: arrowStart, end: arrowEnd, label });
|
|
4930
4894
|
searchFrom = arrowEnd;
|
|
4931
4895
|
scanFloor = arrowEnd;
|
|
4932
4896
|
}
|
|
@@ -4936,11 +4900,7 @@ function splitArrows2(line12) {
|
|
|
4936
4900
|
const arrow = arrowPositions[i];
|
|
4937
4901
|
const beforeText = line12.substring(lastIndex, arrow.start).trim();
|
|
4938
4902
|
if (beforeText || i === 0) segments.push(beforeText);
|
|
4939
|
-
|
|
4940
|
-
if (arrow.label && arrow.color)
|
|
4941
|
-
arrowToken = `-${arrow.label}(${arrow.color})->`;
|
|
4942
|
-
else if (arrow.label) arrowToken = `-${arrow.label}->`;
|
|
4943
|
-
else if (arrow.color) arrowToken = `-(${arrow.color})->`;
|
|
4903
|
+
const arrowToken = arrow.label ? `-${arrow.label}->` : "->";
|
|
4944
4904
|
segments.push(arrowToken);
|
|
4945
4905
|
lastIndex = arrow.end;
|
|
4946
4906
|
}
|
|
@@ -4948,35 +4908,14 @@ function splitArrows2(line12) {
|
|
|
4948
4908
|
if (remaining) segments.push(remaining);
|
|
4949
4909
|
return segments;
|
|
4950
4910
|
}
|
|
4951
|
-
function parseArrowToken2(token,
|
|
4911
|
+
function parseArrowToken2(token, _palette, lineNumber, diagnostics) {
|
|
4952
4912
|
if (token === "->") return {};
|
|
4953
|
-
const
|
|
4954
|
-
if (bareParen) {
|
|
4955
|
-
const colorName = matchColorParens(bareParen[1]);
|
|
4956
|
-
if (colorName) {
|
|
4957
|
-
return {
|
|
4958
|
-
color: resolveColorWithDiagnostic(
|
|
4959
|
-
colorName,
|
|
4960
|
-
lineNumber,
|
|
4961
|
-
diagnostics,
|
|
4962
|
-
palette
|
|
4963
|
-
)
|
|
4964
|
-
};
|
|
4965
|
-
}
|
|
4966
|
-
}
|
|
4967
|
-
const m = token.match(/^-(.+?)(?:\(([^)]+)\))?->$/);
|
|
4913
|
+
const m = token.match(/^-(.+?)->$/);
|
|
4968
4914
|
if (m) {
|
|
4969
4915
|
const rawLabel = m[1] ?? "";
|
|
4970
4916
|
const labelResult = parseInArrowLabel(rawLabel, lineNumber);
|
|
4971
4917
|
diagnostics.push(...labelResult.diagnostics);
|
|
4972
|
-
|
|
4973
|
-
const color = m[2] ? resolveColorWithDiagnostic(
|
|
4974
|
-
m[2].trim(),
|
|
4975
|
-
lineNumber,
|
|
4976
|
-
diagnostics,
|
|
4977
|
-
palette
|
|
4978
|
-
) : void 0;
|
|
4979
|
-
return { label, color };
|
|
4918
|
+
return { label: labelResult.label };
|
|
4980
4919
|
}
|
|
4981
4920
|
return {};
|
|
4982
4921
|
}
|
|
@@ -5067,13 +5006,12 @@ function parseState(content, palette) {
|
|
|
5067
5006
|
}
|
|
5068
5007
|
return node;
|
|
5069
5008
|
}
|
|
5070
|
-
function addEdge(sourceId, targetId, lineNumber, label
|
|
5009
|
+
function addEdge(sourceId, targetId, lineNumber, label) {
|
|
5071
5010
|
result.edges.push({
|
|
5072
5011
|
source: sourceId,
|
|
5073
5012
|
target: targetId,
|
|
5074
5013
|
lineNumber,
|
|
5075
|
-
...label && { label }
|
|
5076
|
-
...color && { color }
|
|
5014
|
+
...label && { label }
|
|
5077
5015
|
});
|
|
5078
5016
|
}
|
|
5079
5017
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -5216,13 +5154,7 @@ function parseState(content, palette) {
|
|
|
5216
5154
|
if (pendingArrow !== null) {
|
|
5217
5155
|
const sourceId = lastNodeId ?? implicitSourceId;
|
|
5218
5156
|
if (sourceId) {
|
|
5219
|
-
addEdge(
|
|
5220
|
-
sourceId,
|
|
5221
|
-
node.id,
|
|
5222
|
-
lineNumber,
|
|
5223
|
-
pendingArrow.label,
|
|
5224
|
-
pendingArrow.color
|
|
5225
|
-
);
|
|
5157
|
+
addEdge(sourceId, node.id, lineNumber, pendingArrow.label);
|
|
5226
5158
|
}
|
|
5227
5159
|
pendingArrow = null;
|
|
5228
5160
|
}
|
|
@@ -5275,7 +5207,7 @@ var init_state_parser = __esm({
|
|
|
5275
5207
|
init_name_normalize();
|
|
5276
5208
|
PSEUDOSTATE_ID = "pseudostate:[*]";
|
|
5277
5209
|
PSEUDOSTATE_LABEL = "[*]";
|
|
5278
|
-
GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\(
|
|
5210
|
+
GROUP_BRACKET_RE = /^\[([^\]]+)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/;
|
|
5279
5211
|
}
|
|
5280
5212
|
});
|
|
5281
5213
|
|
|
@@ -5654,7 +5586,7 @@ var init_parser2 = __esm({
|
|
|
5654
5586
|
init_arrows();
|
|
5655
5587
|
init_parsing();
|
|
5656
5588
|
init_name_normalize();
|
|
5657
|
-
CLASS_DECL_RE = /^(?:(abstract|interface|enum)\s+)?(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+extends\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+implements\s+(?:"([^"]+)"|([A-Z][^":]*?)))?(?:\s+\[(abstract|interface|enum)\])?(?:\s
|
|
5589
|
+
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*$/;
|
|
5658
5590
|
INDENT_REL_ARROW_RE = /^(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Za-z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
5659
5591
|
REL_ARROW_RE = /^(?:"([^"]+)"|([A-Z][^":]*?))\s*(--\|>|\.\.\|>|\*--|o--|\.\.>|->)\s*(?:"([^"]+)"|([A-Z][^":]*?))(?:\s+:?\s*(.+))?$/;
|
|
5660
5592
|
VISIBILITY_RE = /^([+\-#])\s*/;
|
|
@@ -5861,7 +5793,7 @@ function parseERDiagram(content, palette) {
|
|
|
5861
5793
|
result.diagnostics.push(
|
|
5862
5794
|
makeDgmoError(
|
|
5863
5795
|
lineNumber,
|
|
5864
|
-
`Expected 'Value
|
|
5796
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`,
|
|
5865
5797
|
"warning"
|
|
5866
5798
|
)
|
|
5867
5799
|
);
|
|
@@ -5973,7 +5905,7 @@ function parseERDiagram(content, palette) {
|
|
|
5973
5905
|
if (result.tables.length === 0 && !result.error) {
|
|
5974
5906
|
const diag = makeDgmoError(
|
|
5975
5907
|
1,
|
|
5976
|
-
'No tables found. Add table declarations like "users" or "orders
|
|
5908
|
+
'No tables found. Add table declarations like "users" or "orders blue".'
|
|
5977
5909
|
);
|
|
5978
5910
|
result.diagnostics.push(diag);
|
|
5979
5911
|
result.error = formatDgmoError(diag);
|
|
@@ -6059,15 +5991,19 @@ function extractSymbols3(docText) {
|
|
|
6059
5991
|
for (const rawLine of docText.split("\n")) {
|
|
6060
5992
|
const line12 = rawLine.trim();
|
|
6061
5993
|
if (inMetadata && /^er(\s|$)/i.test(line12)) continue;
|
|
6062
|
-
if (inMetadata && OPTION_NOCOLON_RE.test(line12)) continue;
|
|
6063
|
-
inMetadata = false;
|
|
6064
|
-
if (line12.length === 0) continue;
|
|
6065
5994
|
if (/^\s/.test(rawLine)) continue;
|
|
5995
|
+
if (line12.length === 0) continue;
|
|
6066
5996
|
const m = TABLE_DECL_RE.exec(line12);
|
|
6067
5997
|
if (m) {
|
|
6068
5998
|
const name = (m[1] ?? m[2] ?? "").trim();
|
|
6069
|
-
if (name)
|
|
5999
|
+
if (name) {
|
|
6000
|
+
inMetadata = false;
|
|
6001
|
+
entities.push(name);
|
|
6002
|
+
continue;
|
|
6003
|
+
}
|
|
6070
6004
|
}
|
|
6005
|
+
if (inMetadata && OPTION_NOCOLON_RE.test(line12)) continue;
|
|
6006
|
+
inMetadata = false;
|
|
6071
6007
|
}
|
|
6072
6008
|
return {
|
|
6073
6009
|
kind: "er",
|
|
@@ -6085,7 +6021,7 @@ var init_parser3 = __esm({
|
|
|
6085
6021
|
init_name_normalize();
|
|
6086
6022
|
init_parsing();
|
|
6087
6023
|
init_tag_groups();
|
|
6088
|
-
TABLE_DECL_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":(]*?))(?:\s
|
|
6024
|
+
TABLE_DECL_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":(]*?))(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s*\|(.+))?$/;
|
|
6089
6025
|
INDENT_REL_RE = /^([1*?])-{1,2}(?:(.+?)-{1,2})?([1*?])\s+(?:"([^"]+)"|([a-zA-Z_][^":]*?))\s*$/;
|
|
6090
6026
|
CONSTRAINT_MAP = {
|
|
6091
6027
|
pk: "pk",
|
|
@@ -6165,18 +6101,22 @@ function parseChart(content, palette) {
|
|
|
6165
6101
|
return fail(lineNumber, msg2);
|
|
6166
6102
|
}
|
|
6167
6103
|
}
|
|
6168
|
-
const eraMatch = trimmed.match(
|
|
6169
|
-
/^era\s+(.+?)\s*->\s*(.+?)(?:\s*\(([^)]+)\))?\s*$/
|
|
6170
|
-
);
|
|
6104
|
+
const eraMatch = trimmed.match(/^era\s+(.+?)\s*->\s*(.+?)\s*$/);
|
|
6171
6105
|
if (eraMatch) {
|
|
6172
6106
|
const afterArrow = eraMatch[2].trim();
|
|
6173
6107
|
const spaceIdx2 = afterArrow.indexOf(" ");
|
|
6174
6108
|
if (spaceIdx2 >= 0) {
|
|
6109
|
+
const lastSpaceIdx = afterArrow.lastIndexOf(" ");
|
|
6110
|
+
const trailing = afterArrow.substring(lastSpaceIdx + 1);
|
|
6111
|
+
const hasColor = RECOGNIZED_COLOR_NAMES.includes(
|
|
6112
|
+
trailing
|
|
6113
|
+
);
|
|
6114
|
+
const labelPart = hasColor ? afterArrow.substring(0, lastSpaceIdx).trimEnd() : afterArrow;
|
|
6175
6115
|
rawEras.push({
|
|
6176
6116
|
start: eraMatch[1].trim(),
|
|
6177
|
-
afterArrow,
|
|
6178
|
-
color:
|
|
6179
|
-
|
|
6117
|
+
afterArrow: labelPart,
|
|
6118
|
+
color: hasColor ? resolveColorWithDiagnostic(
|
|
6119
|
+
trailing,
|
|
6180
6120
|
lineNumber,
|
|
6181
6121
|
result.diagnostics,
|
|
6182
6122
|
palette
|
|
@@ -6711,11 +6651,12 @@ function parseExtendedChart(content, palette) {
|
|
|
6711
6651
|
return result;
|
|
6712
6652
|
}
|
|
6713
6653
|
}
|
|
6714
|
-
const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s
|
|
6654
|
+
const categoryMatch = trimmed.match(/^\[(.+?)\](?:\s+(\S+))?\s*$/);
|
|
6715
6655
|
if (categoryMatch) {
|
|
6716
6656
|
const catName = categoryMatch[1].trim();
|
|
6717
|
-
const
|
|
6718
|
-
|
|
6657
|
+
const rawCatColor = categoryMatch[2]?.trim();
|
|
6658
|
+
const catColor = rawCatColor ? resolveColorWithDiagnostic(
|
|
6659
|
+
rawCatColor,
|
|
6719
6660
|
lineNumber,
|
|
6720
6661
|
result.diagnostics,
|
|
6721
6662
|
palette
|
|
@@ -6730,7 +6671,7 @@ function parseExtendedChart(content, palette) {
|
|
|
6730
6671
|
continue;
|
|
6731
6672
|
}
|
|
6732
6673
|
const arrowMatch = trimmed.match(
|
|
6733
|
-
/^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)
|
|
6674
|
+
/^(.+?)\s*(->|--)\s*(.+?)\s+(-?[\d,_]+(?:\.[\d]+)?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
6734
6675
|
);
|
|
6735
6676
|
if (arrowMatch) {
|
|
6736
6677
|
const [, rawSource, arrow, rawTarget, rawVal, rawLinkColor] = arrowMatch;
|
|
@@ -6775,9 +6716,12 @@ function parseExtendedChart(content, palette) {
|
|
|
6775
6716
|
}
|
|
6776
6717
|
if (sankeyStack.length > 0) {
|
|
6777
6718
|
const valColorMatch = trimmed.match(
|
|
6778
|
-
/(-?[\d,_]+(?:\.[\d]+)?)\s
|
|
6719
|
+
/(-?[\d,_]+(?:\.[\d]+)?)\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/
|
|
6779
6720
|
);
|
|
6780
|
-
const strippedLine = valColorMatch ? trimmed.replace(
|
|
6721
|
+
const strippedLine = valColorMatch ? trimmed.replace(
|
|
6722
|
+
/\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white)\s*$/,
|
|
6723
|
+
""
|
|
6724
|
+
) : trimmed;
|
|
6781
6725
|
const dataRow2 = parseDataRowValues(strippedLine);
|
|
6782
6726
|
if (dataRow2 && dataRow2.values.length === 1) {
|
|
6783
6727
|
const source = sankeyStack.at(-1).name;
|
|
@@ -9153,7 +9097,7 @@ function parseOrg(content, palette) {
|
|
|
9153
9097
|
if (!color) {
|
|
9154
9098
|
pushError(
|
|
9155
9099
|
lineNumber,
|
|
9156
|
-
`Expected 'Value
|
|
9100
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9157
9101
|
);
|
|
9158
9102
|
continue;
|
|
9159
9103
|
}
|
|
@@ -9444,7 +9388,7 @@ function parseKanban(content, palette) {
|
|
|
9444
9388
|
if (!color) {
|
|
9445
9389
|
warn(
|
|
9446
9390
|
lineNumber,
|
|
9447
|
-
`Expected 'Value
|
|
9391
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9448
9392
|
);
|
|
9449
9393
|
continue;
|
|
9450
9394
|
}
|
|
@@ -9487,8 +9431,9 @@ function parseKanban(content, palette) {
|
|
|
9487
9431
|
currentCard = null;
|
|
9488
9432
|
columnCounter++;
|
|
9489
9433
|
const colName = columnMatch[1].trim();
|
|
9490
|
-
const
|
|
9491
|
-
|
|
9434
|
+
const rawTrailing = columnMatch[2]?.trim();
|
|
9435
|
+
const colColor = rawTrailing ? resolveColorWithDiagnostic(
|
|
9436
|
+
rawTrailing,
|
|
9492
9437
|
lineNumber,
|
|
9493
9438
|
result.diagnostics,
|
|
9494
9439
|
palette
|
|
@@ -9643,7 +9588,7 @@ var init_parser5 = __esm({
|
|
|
9643
9588
|
init_tag_groups();
|
|
9644
9589
|
init_parsing();
|
|
9645
9590
|
init_name_normalize();
|
|
9646
|
-
COLUMN_RE = /^\[(.+?)\](?:\s
|
|
9591
|
+
COLUMN_RE = /^\[(.+?)\](?:\s+(\S+))?(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*(?:\|\s*(.+))?$/;
|
|
9647
9592
|
LEGACY_COLUMN_RE = /^==\s+(.+?)\s*(?:\[wip:\s*(\d+)\])?\s*==$/;
|
|
9648
9593
|
KNOWN_OPTIONS4 = /* @__PURE__ */ new Set(["hide", "active-tag"]);
|
|
9649
9594
|
KNOWN_BOOLEANS3 = /* @__PURE__ */ new Set([
|
|
@@ -9826,7 +9771,7 @@ function parseC4(content, palette) {
|
|
|
9826
9771
|
if (!color) {
|
|
9827
9772
|
pushError(
|
|
9828
9773
|
lineNumber,
|
|
9829
|
-
`Expected 'Value
|
|
9774
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
9830
9775
|
);
|
|
9831
9776
|
continue;
|
|
9832
9777
|
}
|
|
@@ -10422,7 +10367,7 @@ __export(parser_exports7, {
|
|
|
10422
10367
|
looksLikeSitemap: () => looksLikeSitemap,
|
|
10423
10368
|
parseSitemap: () => parseSitemap
|
|
10424
10369
|
});
|
|
10425
|
-
function parseArrowLine(trimmed,
|
|
10370
|
+
function parseArrowLine(trimmed, _palette, _lineNumber, _diagnostics) {
|
|
10426
10371
|
const bareMatch = trimmed.match(BARE_ARROW_RE);
|
|
10427
10372
|
if (bareMatch) {
|
|
10428
10373
|
const rawTarget = bareMatch[1].trim();
|
|
@@ -10435,27 +10380,10 @@ function parseArrowLine(trimmed, palette, lineNumber, diagnostics) {
|
|
|
10435
10380
|
const arrowMatch = trimmed.match(ARROW_RE);
|
|
10436
10381
|
if (arrowMatch) {
|
|
10437
10382
|
const label = arrowMatch[1]?.trim() || void 0;
|
|
10438
|
-
|
|
10439
|
-
arrowMatch[2].trim(),
|
|
10440
|
-
lineNumber,
|
|
10441
|
-
diagnostics,
|
|
10442
|
-
palette
|
|
10443
|
-
) : void 0;
|
|
10444
|
-
if (label && !color) {
|
|
10445
|
-
const inferred = inferArrowColor(label);
|
|
10446
|
-
if (inferred)
|
|
10447
|
-
color = resolveColorWithDiagnostic(
|
|
10448
|
-
inferred,
|
|
10449
|
-
lineNumber,
|
|
10450
|
-
diagnostics,
|
|
10451
|
-
palette
|
|
10452
|
-
);
|
|
10453
|
-
}
|
|
10454
|
-
const rawTarget = arrowMatch[3].trim();
|
|
10383
|
+
const rawTarget = arrowMatch[2].trim();
|
|
10455
10384
|
const groupMatch = rawTarget.match(/^\[(.+)\]$/);
|
|
10456
10385
|
return {
|
|
10457
10386
|
label,
|
|
10458
|
-
color,
|
|
10459
10387
|
target: groupMatch ? groupMatch[1].trim() : rawTarget,
|
|
10460
10388
|
targetIsGroup: !!groupMatch
|
|
10461
10389
|
};
|
|
@@ -10597,7 +10525,7 @@ function parseSitemap(content, palette) {
|
|
|
10597
10525
|
if (!color) {
|
|
10598
10526
|
pushError(
|
|
10599
10527
|
lineNumber,
|
|
10600
|
-
`Expected 'Value
|
|
10528
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
10601
10529
|
);
|
|
10602
10530
|
continue;
|
|
10603
10531
|
}
|
|
@@ -10634,7 +10562,6 @@ function parseSitemap(content, palette) {
|
|
|
10634
10562
|
targetLabel: arrowInfo.target,
|
|
10635
10563
|
targetIsGroup: arrowInfo.targetIsGroup,
|
|
10636
10564
|
label: arrowInfo.label,
|
|
10637
|
-
color: arrowInfo.color,
|
|
10638
10565
|
lineNumber
|
|
10639
10566
|
});
|
|
10640
10567
|
}
|
|
@@ -10732,7 +10659,6 @@ function parseSitemap(content, palette) {
|
|
|
10732
10659
|
sourceId: arrow.sourceNode.id,
|
|
10733
10660
|
targetId: aliasHit,
|
|
10734
10661
|
label: arrow.label,
|
|
10735
|
-
color: arrow.color,
|
|
10736
10662
|
lineNumber: arrow.lineNumber
|
|
10737
10663
|
});
|
|
10738
10664
|
continue;
|
|
@@ -10752,7 +10678,6 @@ function parseSitemap(content, palette) {
|
|
|
10752
10678
|
sourceId: arrow.sourceNode.id,
|
|
10753
10679
|
targetId: targetContainer.id,
|
|
10754
10680
|
label: arrow.label,
|
|
10755
|
-
color: arrow.color,
|
|
10756
10681
|
lineNumber: arrow.lineNumber
|
|
10757
10682
|
});
|
|
10758
10683
|
} else {
|
|
@@ -10769,7 +10694,6 @@ function parseSitemap(content, palette) {
|
|
|
10769
10694
|
sourceId: arrow.sourceNode.id,
|
|
10770
10695
|
targetId: targetNode.id,
|
|
10771
10696
|
label: arrow.label,
|
|
10772
|
-
color: arrow.color,
|
|
10773
10697
|
lineNumber: arrow.lineNumber
|
|
10774
10698
|
});
|
|
10775
10699
|
}
|
|
@@ -10859,7 +10783,6 @@ var CONTAINER_RE3, METADATA_RE3, ARROW_RE, BARE_ARROW_RE;
|
|
|
10859
10783
|
var init_parser7 = __esm({
|
|
10860
10784
|
"src/sitemap/parser.ts"() {
|
|
10861
10785
|
"use strict";
|
|
10862
|
-
init_colors();
|
|
10863
10786
|
init_diagnostics();
|
|
10864
10787
|
init_name_normalize();
|
|
10865
10788
|
init_tag_groups();
|
|
@@ -10867,7 +10790,7 @@ var init_parser7 = __esm({
|
|
|
10867
10790
|
init_description_helpers();
|
|
10868
10791
|
CONTAINER_RE3 = /^\[([^\]]+)\]\s*(?:\|\s*(.+))?$/;
|
|
10869
10792
|
METADATA_RE3 = /^([^:]+):\s*(.+)$/;
|
|
10870
|
-
ARROW_RE = /^-([
|
|
10793
|
+
ARROW_RE = /^-([^>][^>]*?)?\s*->\s*(.+)$/;
|
|
10871
10794
|
BARE_ARROW_RE = /^->\s*(.+)$/;
|
|
10872
10795
|
}
|
|
10873
10796
|
});
|
|
@@ -11158,13 +11081,18 @@ function parseInfra(content) {
|
|
|
11158
11081
|
}
|
|
11159
11082
|
if (currentTagGroup && indent > 0) {
|
|
11160
11083
|
const { text: cleanEntry, isDefault } = stripDefaultModifier(trimmed);
|
|
11161
|
-
const
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11084
|
+
const lastSpaceIdx = cleanEntry.lastIndexOf(" ");
|
|
11085
|
+
let valueName = cleanEntry;
|
|
11086
|
+
let rawColor;
|
|
11087
|
+
if (lastSpaceIdx > 0) {
|
|
11088
|
+
const trailing = cleanEntry.substring(lastSpaceIdx + 1);
|
|
11089
|
+
if (isRecognizedColorName(trailing)) {
|
|
11090
|
+
rawColor = trailing;
|
|
11091
|
+
valueName = cleanEntry.substring(0, lastSpaceIdx).trimEnd();
|
|
11092
|
+
}
|
|
11093
|
+
}
|
|
11094
|
+
const tvMatch = valueName.match(TAG_VALUE_RE);
|
|
11095
|
+
if (tvMatch || /^\w+$/.test(valueName)) {
|
|
11168
11096
|
currentTagGroup.values.push({
|
|
11169
11097
|
name: valueName,
|
|
11170
11098
|
color: rawColor
|
|
@@ -11576,9 +11504,9 @@ var init_parser8 = __esm({
|
|
|
11576
11504
|
"use strict";
|
|
11577
11505
|
init_diagnostics();
|
|
11578
11506
|
init_description_helpers();
|
|
11579
|
-
init_colors();
|
|
11580
11507
|
init_arrows();
|
|
11581
11508
|
init_parsing();
|
|
11509
|
+
init_colors();
|
|
11582
11510
|
init_name_normalize();
|
|
11583
11511
|
init_tag_groups();
|
|
11584
11512
|
init_types();
|
|
@@ -11588,7 +11516,7 @@ var init_parser8 = __esm({
|
|
|
11588
11516
|
ASYNC_SIMPLE_CONNECTION_RE = /^~>\s*(.+?)\s*$/;
|
|
11589
11517
|
DEPRECATED_FANOUT_RE = /\bx(\d+)\s*$/;
|
|
11590
11518
|
GROUP_RE = /^\[([^\]]+)\]\s*(?:as\s+([A-Za-z][A-Za-z0-9_]{0,11})\s*)?(?:\|\s*(.+))?$/;
|
|
11591
|
-
TAG_VALUE_RE = /^(\w[\w\s]
|
|
11519
|
+
TAG_VALUE_RE = /^(\w[\w\s]+?)\s*$/;
|
|
11592
11520
|
COMPONENT_RE = /^(?:"([^"]+)"|([a-zA-Z_][^|":]*?))\s*(\|.*)?$/;
|
|
11593
11521
|
PIPE_META_RE = /[|,]\s*(\w+)\s*:\s*([^|,]+)/g;
|
|
11594
11522
|
PROPERTY_RE = /^([\w-]+)\s+(.+)$/;
|
|
@@ -13025,7 +12953,7 @@ function parsePert(content, parseOpts = {}) {
|
|
|
13025
12953
|
if (!color) {
|
|
13026
12954
|
warn(
|
|
13027
12955
|
lineNumber,
|
|
13028
|
-
`Expected 'Value
|
|
12956
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
13029
12957
|
);
|
|
13030
12958
|
continue;
|
|
13031
12959
|
}
|
|
@@ -13048,7 +12976,7 @@ function parsePert(content, parseOpts = {}) {
|
|
|
13048
12976
|
if (!color) {
|
|
13049
12977
|
warn(
|
|
13050
12978
|
lineNumber,
|
|
13051
|
-
`Expected 'Value
|
|
12979
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
13052
12980
|
);
|
|
13053
12981
|
continue;
|
|
13054
12982
|
}
|
|
@@ -14597,7 +14525,7 @@ function parseMindmap(content, palette) {
|
|
|
14597
14525
|
if (!color) {
|
|
14598
14526
|
pushError(
|
|
14599
14527
|
lineNumber,
|
|
14600
|
-
`Expected 'Value
|
|
14528
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
14601
14529
|
);
|
|
14602
14530
|
continue;
|
|
14603
14531
|
}
|
|
@@ -15183,7 +15111,7 @@ function parseWireframe(content) {
|
|
|
15183
15111
|
} else {
|
|
15184
15112
|
pushWarning(
|
|
15185
15113
|
lineNumber,
|
|
15186
|
-
`Expected 'Value
|
|
15114
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
15187
15115
|
);
|
|
15188
15116
|
}
|
|
15189
15117
|
continue;
|
|
@@ -15800,6 +15728,13 @@ function parseCycle(content) {
|
|
|
15800
15728
|
warn(lineNum, "Empty node label.");
|
|
15801
15729
|
continue;
|
|
15802
15730
|
}
|
|
15731
|
+
if (!metadata["color"]) {
|
|
15732
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
15733
|
+
if (shortcutColor) {
|
|
15734
|
+
metadata["color"] = shortcutColor;
|
|
15735
|
+
label = stripped;
|
|
15736
|
+
}
|
|
15737
|
+
}
|
|
15803
15738
|
const color = metadata["color"];
|
|
15804
15739
|
const spanStr = metadata["span"];
|
|
15805
15740
|
let span = 1;
|
|
@@ -16029,8 +15964,12 @@ function parseJourneyMap(content, palette) {
|
|
|
16029
15964
|
const key = part.substring(0, colonIdx).trim().toLowerCase();
|
|
16030
15965
|
const value = part.substring(colonIdx + 1).trim();
|
|
16031
15966
|
if (key === "color") {
|
|
16032
|
-
|
|
16033
|
-
|
|
15967
|
+
personaColor = resolveColorWithDiagnostic(
|
|
15968
|
+
value,
|
|
15969
|
+
lineNumber,
|
|
15970
|
+
result.diagnostics,
|
|
15971
|
+
palette
|
|
15972
|
+
) ?? void 0;
|
|
16034
15973
|
}
|
|
16035
15974
|
}
|
|
16036
15975
|
}
|
|
@@ -16088,7 +16027,7 @@ function parseJourneyMap(content, palette) {
|
|
|
16088
16027
|
if (!color) {
|
|
16089
16028
|
warn(
|
|
16090
16029
|
lineNumber,
|
|
16091
|
-
`Expected 'Value
|
|
16030
|
+
`Expected 'Value color' in tag group '${currentTagGroup.name}'`
|
|
16092
16031
|
);
|
|
16093
16032
|
continue;
|
|
16094
16033
|
}
|
|
@@ -16331,6 +16270,7 @@ var PHASE_RE, SCORE_RE, ANNOTATION_RE, KNOWN_OPTIONS9, KNOWN_BOOLEANS6;
|
|
|
16331
16270
|
var init_parser16 = __esm({
|
|
16332
16271
|
"src/journey-map/parser.ts"() {
|
|
16333
16272
|
"use strict";
|
|
16273
|
+
init_colors();
|
|
16334
16274
|
init_diagnostics();
|
|
16335
16275
|
init_tag_groups();
|
|
16336
16276
|
init_parsing();
|
|
@@ -16429,6 +16369,13 @@ function parsePyramid(content) {
|
|
|
16429
16369
|
warn(lineNum, "Empty layer label.");
|
|
16430
16370
|
continue;
|
|
16431
16371
|
}
|
|
16372
|
+
if (!color) {
|
|
16373
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
16374
|
+
if (shortcutColor) {
|
|
16375
|
+
color = shortcutColor;
|
|
16376
|
+
label = stripped;
|
|
16377
|
+
}
|
|
16378
|
+
}
|
|
16432
16379
|
currentLayer = {
|
|
16433
16380
|
label,
|
|
16434
16381
|
lineNumber: lineNum,
|
|
@@ -16592,6 +16539,13 @@ function parseRing(content) {
|
|
|
16592
16539
|
warn(lineNum, "Empty layer label.");
|
|
16593
16540
|
continue;
|
|
16594
16541
|
}
|
|
16542
|
+
if (!color) {
|
|
16543
|
+
const { label: stripped, colorName: shortcutColor } = peelTrailingColorName(label);
|
|
16544
|
+
if (shortcutColor) {
|
|
16545
|
+
color = shortcutColor;
|
|
16546
|
+
label = stripped;
|
|
16547
|
+
}
|
|
16548
|
+
}
|
|
16595
16549
|
currentLayer = {
|
|
16596
16550
|
label,
|
|
16597
16551
|
lineNumber: lineNum,
|
|
@@ -17086,7 +17040,7 @@ function parseRaci(content, palette) {
|
|
|
17086
17040
|
if (next.length > 0 && next[0] !== " " && next[0] !== " ") break;
|
|
17087
17041
|
const stripped = nextTrim.replace(/,\s*$/, "");
|
|
17088
17042
|
const segments = stripped.split("|").map((s) => s.trim());
|
|
17089
|
-
|
|
17043
|
+
let roleLabel = segments[0] ?? "";
|
|
17090
17044
|
let roleColor;
|
|
17091
17045
|
if (segments.length > 1) {
|
|
17092
17046
|
const meta = parsePipeMetadata(segments);
|
|
@@ -17099,6 +17053,18 @@ function parseRaci(content, palette) {
|
|
|
17099
17053
|
);
|
|
17100
17054
|
}
|
|
17101
17055
|
}
|
|
17056
|
+
if (!roleColor) {
|
|
17057
|
+
const { label: stripLabel, colorName: shortcutColor } = peelTrailingColorName(roleLabel);
|
|
17058
|
+
if (shortcutColor) {
|
|
17059
|
+
roleColor = resolveColorWithDiagnostic(
|
|
17060
|
+
shortcutColor,
|
|
17061
|
+
j + 1,
|
|
17062
|
+
result.diagnostics,
|
|
17063
|
+
palette
|
|
17064
|
+
);
|
|
17065
|
+
roleLabel = stripLabel;
|
|
17066
|
+
}
|
|
17067
|
+
}
|
|
17102
17068
|
if (roleLabel) getOrAddRole(roleLabel, j + 1, roleColor);
|
|
17103
17069
|
}
|
|
17104
17070
|
i = j - 1;
|
|
@@ -17157,8 +17123,10 @@ function parseRaci(content, palette) {
|
|
|
17157
17123
|
continue;
|
|
17158
17124
|
}
|
|
17159
17125
|
let phaseColor;
|
|
17160
|
-
|
|
17161
|
-
|
|
17126
|
+
const trailingToken = phaseMatch[2];
|
|
17127
|
+
const pipeMeta = phaseMatch[3];
|
|
17128
|
+
if (pipeMeta) {
|
|
17129
|
+
const meta = parsePipeMetadata(["", pipeMeta]);
|
|
17162
17130
|
if (meta["color"]) {
|
|
17163
17131
|
phaseColor = resolveColorWithDiagnostic(
|
|
17164
17132
|
meta["color"],
|
|
@@ -17168,6 +17136,17 @@ function parseRaci(content, palette) {
|
|
|
17168
17136
|
);
|
|
17169
17137
|
}
|
|
17170
17138
|
}
|
|
17139
|
+
if (!phaseColor && trailingToken) {
|
|
17140
|
+
const { colorName } = peelTrailingColorName(`x ${trailingToken}`);
|
|
17141
|
+
if (colorName) {
|
|
17142
|
+
phaseColor = resolveColorWithDiagnostic(
|
|
17143
|
+
colorName,
|
|
17144
|
+
lineNumber,
|
|
17145
|
+
result.diagnostics,
|
|
17146
|
+
palette
|
|
17147
|
+
);
|
|
17148
|
+
}
|
|
17149
|
+
}
|
|
17171
17150
|
currentPhase = {
|
|
17172
17151
|
id: normalizeName(display),
|
|
17173
17152
|
displayName: display,
|
|
@@ -17398,7 +17377,7 @@ var init_parser19 = __esm({
|
|
|
17398
17377
|
"no-title",
|
|
17399
17378
|
...Object.keys(VARIANT_LOCK_DIRECTIVES)
|
|
17400
17379
|
]);
|
|
17401
|
-
PHASE_RE2 = /^\[(.+?)\]
|
|
17380
|
+
PHASE_RE2 = /^\[(.+?)\](?:\s+(\S+))?(?:\s*\|\s*(.+))?\s*$/;
|
|
17402
17381
|
ROLE_ASSIGNMENT_RE = /^([^:]+):\s*(.*)$/;
|
|
17403
17382
|
}
|
|
17404
17383
|
});
|
|
@@ -19115,7 +19094,7 @@ function containerFill(palette, isDark, nodeColor2) {
|
|
|
19115
19094
|
function containerStroke(palette, nodeColor2) {
|
|
19116
19095
|
return nodeColor2 ?? palette.textMuted;
|
|
19117
19096
|
}
|
|
19118
|
-
function renderOrg(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, ancestorPath) {
|
|
19097
|
+
function renderOrg(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, ancestorPath, exportMode) {
|
|
19119
19098
|
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
19120
19099
|
const width = exportDims?.width ?? container.clientWidth;
|
|
19121
19100
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -19375,7 +19354,7 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
|
|
|
19375
19354
|
}
|
|
19376
19355
|
],
|
|
19377
19356
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
19378
|
-
mode: "
|
|
19357
|
+
mode: exportMode ? "export" : "preview"
|
|
19379
19358
|
};
|
|
19380
19359
|
const singleState = { activeGroup: lg.name };
|
|
19381
19360
|
const groupG = legendParentBase.append("g").attr("transform", `translate(${lg.x}, ${lg.y})`);
|
|
@@ -19395,7 +19374,7 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
|
|
|
19395
19374
|
const legendConfig = {
|
|
19396
19375
|
groups,
|
|
19397
19376
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
19398
|
-
mode: "
|
|
19377
|
+
mode: exportMode ? "export" : "preview",
|
|
19399
19378
|
capsulePillAddonWidth: eyeAddonWidth
|
|
19400
19379
|
};
|
|
19401
19380
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
@@ -19862,7 +19841,6 @@ function layoutSitemap(parsed, hiddenCounts, activeTagGroup, hiddenAttributes, e
|
|
|
19862
19841
|
targetId: edge.targetId,
|
|
19863
19842
|
points,
|
|
19864
19843
|
label: edge.label,
|
|
19865
|
-
color: edge.color,
|
|
19866
19844
|
lineNumber: edge.lineNumber,
|
|
19867
19845
|
deferred: deferredSet.has(i) || void 0
|
|
19868
19846
|
});
|
|
@@ -20319,7 +20297,7 @@ function containerFill2(palette, isDark, nodeColor2) {
|
|
|
20319
20297
|
function containerStroke2(palette, nodeColor2) {
|
|
20320
20298
|
return nodeColor2 ?? palette.textMuted;
|
|
20321
20299
|
}
|
|
20322
|
-
function renderSitemap(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes) {
|
|
20300
|
+
function renderSitemap(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, hiddenAttributes, exportMode) {
|
|
20323
20301
|
d3Selection2.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
20324
20302
|
const width = exportDims?.width ?? container.clientWidth;
|
|
20325
20303
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -20350,9 +20328,6 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20350
20328
|
const defs = svg.append("defs");
|
|
20351
20329
|
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);
|
|
20352
20330
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
20353
|
-
for (const edge of layout.edges) {
|
|
20354
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
20355
|
-
}
|
|
20356
20331
|
for (const color of edgeColors) {
|
|
20357
20332
|
const id = `sm-arrow-${color.replace("#", "")}`;
|
|
20358
20333
|
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);
|
|
@@ -20431,8 +20406,8 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20431
20406
|
for (const edge of layout.edges) {
|
|
20432
20407
|
if (edge.points.length < 2) continue;
|
|
20433
20408
|
const edgeG = contentG.append("g").attr("class", "sitemap-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
20434
|
-
const edgeColor3 =
|
|
20435
|
-
const markerId =
|
|
20409
|
+
const edgeColor3 = palette.textMuted;
|
|
20410
|
+
const markerId = "sm-arrow";
|
|
20436
20411
|
const gen = edge.deferred ? lineGeneratorLinear : lineGenerator;
|
|
20437
20412
|
const pathD = gen(edge.points);
|
|
20438
20413
|
if (pathD) {
|
|
@@ -20513,7 +20488,8 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20513
20488
|
isDark,
|
|
20514
20489
|
activeTagGroup,
|
|
20515
20490
|
void 0,
|
|
20516
|
-
hiddenAttributes
|
|
20491
|
+
hiddenAttributes,
|
|
20492
|
+
exportMode
|
|
20517
20493
|
);
|
|
20518
20494
|
}
|
|
20519
20495
|
if (fixedTitle) {
|
|
@@ -20538,11 +20514,12 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
20538
20514
|
isDark,
|
|
20539
20515
|
activeTagGroup,
|
|
20540
20516
|
width,
|
|
20541
|
-
hiddenAttributes
|
|
20517
|
+
hiddenAttributes,
|
|
20518
|
+
exportMode
|
|
20542
20519
|
);
|
|
20543
20520
|
}
|
|
20544
20521
|
}
|
|
20545
|
-
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes) {
|
|
20522
|
+
function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fixedWidth, hiddenAttributes, exportMode) {
|
|
20546
20523
|
if (legendGroups.length === 0) return;
|
|
20547
20524
|
const groups = legendGroups.map((g) => ({
|
|
20548
20525
|
name: g.name,
|
|
@@ -20553,7 +20530,7 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
20553
20530
|
const legendConfig = {
|
|
20554
20531
|
groups,
|
|
20555
20532
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
20556
|
-
mode: "
|
|
20533
|
+
mode: exportMode ? "export" : "preview",
|
|
20557
20534
|
capsulePillAddonWidth: eyeAddonWidth
|
|
20558
20535
|
};
|
|
20559
20536
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
@@ -20938,7 +20915,7 @@ function renderKanban(container, parsed, palette, isDark, options) {
|
|
|
20938
20915
|
const legendConfig = {
|
|
20939
20916
|
groups: parsed.tagGroups,
|
|
20940
20917
|
position: { placement: "top-center", titleRelation: "inline-with-title" },
|
|
20941
|
-
mode:
|
|
20918
|
+
mode: options?.exportMode ? "export" : "preview"
|
|
20942
20919
|
};
|
|
20943
20920
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
20944
20921
|
const legendG = svg.append("g").attr("class", "kanban-legend").attr("transform", `translate(${legendX},${legendY})`);
|
|
@@ -21096,7 +21073,8 @@ function renderKanbanForExport(content, theme, palette) {
|
|
|
21096
21073
|
const layout = computeLayout(parsed, palette);
|
|
21097
21074
|
const container = document.createElement("div");
|
|
21098
21075
|
renderKanban(container, parsed, palette, isDark, {
|
|
21099
|
-
exportDims: { width: layout.totalWidth, height: layout.totalHeight }
|
|
21076
|
+
exportDims: { width: layout.totalWidth, height: layout.totalHeight },
|
|
21077
|
+
exportMode: true
|
|
21100
21078
|
});
|
|
21101
21079
|
const svgEl = container.querySelector("svg");
|
|
21102
21080
|
return svgEl?.outerHTML ?? "";
|
|
@@ -21635,7 +21613,7 @@ function markerIdForType(type) {
|
|
|
21635
21613
|
function isSourceMarker(type) {
|
|
21636
21614
|
return type === "composes" || type === "aggregates";
|
|
21637
21615
|
}
|
|
21638
|
-
function renderClassDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, legendActive) {
|
|
21616
|
+
function renderClassDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, legendActive, exportMode) {
|
|
21639
21617
|
d3Selection4.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
21640
21618
|
const width = exportDims?.width ?? container.clientWidth;
|
|
21641
21619
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -21697,7 +21675,7 @@ function renderClassDiagram(container, parsed, layout, palette, isDark, onClickI
|
|
|
21697
21675
|
const legendConfig = {
|
|
21698
21676
|
groups: legendGroups,
|
|
21699
21677
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
21700
|
-
mode: "
|
|
21678
|
+
mode: exportMode ? "export" : "preview"
|
|
21701
21679
|
};
|
|
21702
21680
|
const legendState = {
|
|
21703
21681
|
activeGroup: isLegendExpanded ? LEGEND_GROUP_NAME : null
|
|
@@ -21837,10 +21815,22 @@ function renderClassDiagramForExport(content, theme, palette) {
|
|
|
21837
21815
|
const exportWidth = layout.width + DIAGRAM_PADDING4 * 2;
|
|
21838
21816
|
const exportHeight = layout.height + DIAGRAM_PADDING4 * 2 + (parsed.title ? 40 : 0) + legendReserve;
|
|
21839
21817
|
return runInExportContainer(exportWidth, exportHeight, (container) => {
|
|
21840
|
-
renderClassDiagram(
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21818
|
+
renderClassDiagram(
|
|
21819
|
+
container,
|
|
21820
|
+
parsed,
|
|
21821
|
+
layout,
|
|
21822
|
+
palette,
|
|
21823
|
+
isDark,
|
|
21824
|
+
void 0,
|
|
21825
|
+
{
|
|
21826
|
+
width: exportWidth,
|
|
21827
|
+
height: exportHeight
|
|
21828
|
+
},
|
|
21829
|
+
true,
|
|
21830
|
+
// legendActive for export
|
|
21831
|
+
true
|
|
21832
|
+
// exportMode
|
|
21833
|
+
);
|
|
21844
21834
|
return extractExportSvg(container, theme);
|
|
21845
21835
|
});
|
|
21846
21836
|
}
|
|
@@ -22316,7 +22306,7 @@ function drawCardinality(g, point, prevPoint, cardinality, color, useLabels) {
|
|
|
22316
22306
|
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);
|
|
22317
22307
|
}
|
|
22318
22308
|
}
|
|
22319
|
-
function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, semanticColorsActive) {
|
|
22309
|
+
function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, semanticColorsActive, exportMode) {
|
|
22320
22310
|
d3Selection5.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
22321
22311
|
const useSemanticColors = parsed.tagGroups.length === 0 && layout.nodes.every((n) => !n.color);
|
|
22322
22312
|
const LEGEND_FIXED_GAP4 = 8;
|
|
@@ -22472,7 +22462,7 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
22472
22462
|
const legendConfig = {
|
|
22473
22463
|
groups: parsed.tagGroups,
|
|
22474
22464
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
22475
|
-
mode: "
|
|
22465
|
+
mode: exportMode ? "export" : "preview"
|
|
22476
22466
|
};
|
|
22477
22467
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
22478
22468
|
const legendG = svg.append("g").attr("class", "er-tag-legend").attr("transform", `translate(0,${legendY})`);
|
|
@@ -22508,7 +22498,7 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
|
|
|
22508
22498
|
const legendConfig = {
|
|
22509
22499
|
groups: semanticGroups,
|
|
22510
22500
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
22511
|
-
mode: "
|
|
22501
|
+
mode: exportMode ? "export" : "preview"
|
|
22512
22502
|
};
|
|
22513
22503
|
const legendState = {
|
|
22514
22504
|
activeGroup: semanticActive ? "Role" : null
|
|
@@ -22541,10 +22531,21 @@ function renderERDiagramForExport(content, theme, palette) {
|
|
|
22541
22531
|
container.style.left = "-9999px";
|
|
22542
22532
|
document.body.appendChild(container);
|
|
22543
22533
|
try {
|
|
22544
|
-
renderERDiagram(
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
|
|
22534
|
+
renderERDiagram(
|
|
22535
|
+
container,
|
|
22536
|
+
parsed,
|
|
22537
|
+
layout,
|
|
22538
|
+
palette,
|
|
22539
|
+
isDark,
|
|
22540
|
+
void 0,
|
|
22541
|
+
{
|
|
22542
|
+
width: exportWidth,
|
|
22543
|
+
height: exportHeight
|
|
22544
|
+
},
|
|
22545
|
+
void 0,
|
|
22546
|
+
void 0,
|
|
22547
|
+
true
|
|
22548
|
+
);
|
|
22548
22549
|
const svgEl = container.querySelector("svg");
|
|
22549
22550
|
if (!svgEl) return "";
|
|
22550
22551
|
if (theme === "transparent") {
|
|
@@ -22779,7 +22780,8 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
22779
22780
|
hideDescriptions,
|
|
22780
22781
|
controlsExpanded,
|
|
22781
22782
|
onToggleDescriptions,
|
|
22782
|
-
onToggleControlsExpand
|
|
22783
|
+
onToggleControlsExpand,
|
|
22784
|
+
exportMode = false
|
|
22783
22785
|
} = options ?? {};
|
|
22784
22786
|
d3Selection6.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
22785
22787
|
const width = exportDims?.width ?? container.clientWidth;
|
|
@@ -23115,7 +23117,7 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
23115
23117
|
const legendConfig = {
|
|
23116
23118
|
groups: parsed.tagGroups,
|
|
23117
23119
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
23118
|
-
mode: "
|
|
23120
|
+
mode: exportMode ? "export" : "preview",
|
|
23119
23121
|
controlsGroup
|
|
23120
23122
|
};
|
|
23121
23123
|
const legendState = {
|
|
@@ -23147,7 +23149,8 @@ function renderBoxesAndLinesForExport(container, parsed, layout, palette, isDark
|
|
|
23147
23149
|
renderBoxesAndLines(container, parsed, layout, palette, isDark, {
|
|
23148
23150
|
exportDims: options?.exportDims,
|
|
23149
23151
|
activeTagGroup: options?.activeTagGroup,
|
|
23150
|
-
hiddenTagValues: options?.hiddenTagValues
|
|
23152
|
+
hiddenTagValues: options?.hiddenTagValues,
|
|
23153
|
+
exportMode: options?.exportMode
|
|
23151
23154
|
});
|
|
23152
23155
|
}
|
|
23153
23156
|
var 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;
|
|
@@ -24384,7 +24387,7 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
24384
24387
|
};
|
|
24385
24388
|
}),
|
|
24386
24389
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
24387
|
-
mode: "
|
|
24390
|
+
mode: options?.exportMode ? "export" : "preview",
|
|
24388
24391
|
controlsGroup: controlsToggles
|
|
24389
24392
|
};
|
|
24390
24393
|
const legendState = {
|
|
@@ -27187,7 +27190,7 @@ function drawPersonIcon(g, cx, cy, color) {
|
|
|
27187
27190
|
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);
|
|
27188
27191
|
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);
|
|
27189
27192
|
}
|
|
27190
|
-
function renderC4Context(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
27193
|
+
function renderC4Context(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
27191
27194
|
d3Selection9.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
27192
27195
|
const width = exportDims?.width ?? container.clientWidth;
|
|
27193
27196
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -27363,7 +27366,8 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
27363
27366
|
palette,
|
|
27364
27367
|
isDark,
|
|
27365
27368
|
activeTagGroup,
|
|
27366
|
-
fixedLegend ? width : null
|
|
27369
|
+
fixedLegend ? width : null,
|
|
27370
|
+
exportMode
|
|
27367
27371
|
);
|
|
27368
27372
|
}
|
|
27369
27373
|
}
|
|
@@ -27718,7 +27722,7 @@ function placeEdgeLabels(labels, edges, obstacleRects) {
|
|
|
27718
27722
|
placedRects.push({ x: lbl.x, y: lbl.y, w: lbl.bgW, h: lbl.bgH });
|
|
27719
27723
|
}
|
|
27720
27724
|
}
|
|
27721
|
-
function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWidth) {
|
|
27725
|
+
function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWidth, exportMode) {
|
|
27722
27726
|
const groups = layout.legend.map((g) => ({
|
|
27723
27727
|
name: g.name,
|
|
27724
27728
|
entries: g.entries.map((e) => ({ value: e.value, color: e.color }))
|
|
@@ -27726,7 +27730,7 @@ function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWid
|
|
|
27726
27730
|
const legendConfig = {
|
|
27727
27731
|
groups,
|
|
27728
27732
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
27729
|
-
mode: "
|
|
27733
|
+
mode: exportMode ? "export" : "preview"
|
|
27730
27734
|
};
|
|
27731
27735
|
const legendState = { activeGroup: activeTagGroup ?? null };
|
|
27732
27736
|
const containerWidth = fixedWidth ?? layout.width;
|
|
@@ -27741,7 +27745,7 @@ function renderLegend2(parent, layout, palette, isDark, activeTagGroup, fixedWid
|
|
|
27741
27745
|
);
|
|
27742
27746
|
parent.selectAll("[data-legend-group]").classed("c4-legend-group", true);
|
|
27743
27747
|
}
|
|
27744
|
-
function renderC4Containers(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
27748
|
+
function renderC4Containers(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
27745
27749
|
d3Selection9.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
27746
27750
|
const width = exportDims?.width ?? container.clientWidth;
|
|
27747
27751
|
const height = exportDims?.height ?? container.clientHeight;
|
|
@@ -27972,7 +27976,8 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
27972
27976
|
palette,
|
|
27973
27977
|
isDark,
|
|
27974
27978
|
activeTagGroup,
|
|
27975
|
-
fixedLegend ? width : null
|
|
27979
|
+
fixedLegend ? width : null,
|
|
27980
|
+
exportMode
|
|
27976
27981
|
);
|
|
27977
27982
|
}
|
|
27978
27983
|
}
|
|
@@ -28040,7 +28045,7 @@ function renderC4ComponentsForExport(content, systemName, containerName, theme,
|
|
|
28040
28045
|
document.body.removeChild(el);
|
|
28041
28046
|
}
|
|
28042
28047
|
}
|
|
28043
|
-
function renderC4Deployment(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup) {
|
|
28048
|
+
function renderC4Deployment(container, parsed, layout, palette, isDark, onClickItem, exportDims, activeTagGroup, exportMode) {
|
|
28044
28049
|
renderC4Containers(
|
|
28045
28050
|
container,
|
|
28046
28051
|
parsed,
|
|
@@ -28049,7 +28054,8 @@ function renderC4Deployment(container, parsed, layout, palette, isDark, onClickI
|
|
|
28049
28054
|
isDark,
|
|
28050
28055
|
onClickItem,
|
|
28051
28056
|
exportDims,
|
|
28052
|
-
activeTagGroup
|
|
28057
|
+
activeTagGroup,
|
|
28058
|
+
exportMode
|
|
28053
28059
|
);
|
|
28054
28060
|
}
|
|
28055
28061
|
function renderC4DeploymentForExport(content, theme, palette) {
|
|
@@ -28230,7 +28236,6 @@ function layoutGraph(graph, options) {
|
|
|
28230
28236
|
target: edge.target,
|
|
28231
28237
|
points: edgeData?.points ?? [],
|
|
28232
28238
|
label: edge.label,
|
|
28233
|
-
color: edge.color,
|
|
28234
28239
|
lineNumber: edge.lineNumber
|
|
28235
28240
|
};
|
|
28236
28241
|
});
|
|
@@ -28554,9 +28559,6 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
28554
28559
|
const defs = svg.append("defs");
|
|
28555
28560
|
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);
|
|
28556
28561
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
28557
|
-
for (const edge of layout.edges) {
|
|
28558
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
28559
|
-
}
|
|
28560
28562
|
for (const color of edgeColors) {
|
|
28561
28563
|
const id = `fc-arrow-${color.replace("#", "")}`;
|
|
28562
28564
|
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);
|
|
@@ -28620,8 +28622,8 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
28620
28622
|
const edge = layout.edges[ei];
|
|
28621
28623
|
if (edge.points.length < 2) continue;
|
|
28622
28624
|
const edgeG = contentG.append("g").attr("class", "fc-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
28623
|
-
const edgeColor3 =
|
|
28624
|
-
const markerId =
|
|
28625
|
+
const edgeColor3 = palette.textMuted;
|
|
28626
|
+
const markerId = "fc-arrow";
|
|
28625
28627
|
const pathD = lineGenerator5(edge.points);
|
|
28626
28628
|
if (pathD) {
|
|
28627
28629
|
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");
|
|
@@ -31245,7 +31247,7 @@ function computeInfraLegendGroups(nodes, tagGroups, palette, edges) {
|
|
|
31245
31247
|
}
|
|
31246
31248
|
return groups;
|
|
31247
31249
|
}
|
|
31248
|
-
function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback) {
|
|
31250
|
+
function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDark, activeGroup, playback, exportMode = false) {
|
|
31249
31251
|
if (legendGroups.length === 0 && !playback) return;
|
|
31250
31252
|
const legendG = rootSvg.append("g").attr("transform", `translate(0, ${legendY})`);
|
|
31251
31253
|
if (activeGroup) {
|
|
@@ -31261,7 +31263,7 @@ function renderLegend3(rootSvg, legendGroups, totalWidth, legendY, palette, isDa
|
|
|
31261
31263
|
const legendConfig = {
|
|
31262
31264
|
groups: allGroups,
|
|
31263
31265
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
31264
|
-
mode: "
|
|
31266
|
+
mode: exportMode ? "export" : "preview",
|
|
31265
31267
|
showEmptyGroups: true
|
|
31266
31268
|
};
|
|
31267
31269
|
const legendState = { activeGroup };
|
|
@@ -31449,7 +31451,8 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
|
|
|
31449
31451
|
palette,
|
|
31450
31452
|
isDark,
|
|
31451
31453
|
activeGroup ?? null,
|
|
31452
|
-
playback ?? void 0
|
|
31454
|
+
playback ?? void 0,
|
|
31455
|
+
exportMode
|
|
31453
31456
|
);
|
|
31454
31457
|
legendSvg.selectAll(".infra-legend-group").style("pointer-events", "auto");
|
|
31455
31458
|
} else {
|
|
@@ -31461,7 +31464,8 @@ function renderInfra(container, layout, palette, isDark, title, titleLineNumber,
|
|
|
31461
31464
|
palette,
|
|
31462
31465
|
isDark,
|
|
31463
31466
|
activeGroup ?? null,
|
|
31464
|
-
playback ?? void 0
|
|
31467
|
+
playback ?? void 0,
|
|
31468
|
+
exportMode
|
|
31465
31469
|
);
|
|
31466
31470
|
}
|
|
31467
31471
|
}
|
|
@@ -33363,7 +33367,8 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
|
|
|
33363
33367
|
x: 0,
|
|
33364
33368
|
y: tagLegendY,
|
|
33365
33369
|
width: exportWidth,
|
|
33366
|
-
activeGroup: tagLegendActive
|
|
33370
|
+
activeGroup: tagLegendActive,
|
|
33371
|
+
exportMode: options.exportMode
|
|
33367
33372
|
});
|
|
33368
33373
|
}
|
|
33369
33374
|
const root = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY})`);
|
|
@@ -33424,7 +33429,8 @@ function renderPertForExport(content, theme, palette, now) {
|
|
|
33424
33429
|
renderPert(container, resolved, layout, palette, isDark, {
|
|
33425
33430
|
title: hasTitle ? parsed.title : null,
|
|
33426
33431
|
subtitle: resolved.projectSubtitle,
|
|
33427
|
-
exportDims: { width: exportWidth, height: exportHeight }
|
|
33432
|
+
exportDims: { width: exportWidth, height: exportHeight },
|
|
33433
|
+
exportMode: true
|
|
33428
33434
|
});
|
|
33429
33435
|
const svgEl = container.querySelector("svg");
|
|
33430
33436
|
if (!svgEl) return "";
|
|
@@ -34511,7 +34517,7 @@ function renderLegendBlock(svg, entries, args) {
|
|
|
34511
34517
|
}
|
|
34512
34518
|
function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
34513
34519
|
if (resolved.tagGroups.length === 0) return;
|
|
34514
|
-
const { x, y, width, activeGroup } = args;
|
|
34520
|
+
const { x, y, width, activeGroup, exportMode } = args;
|
|
34515
34521
|
const groups = resolved.tagGroups.map((g) => ({
|
|
34516
34522
|
name: g.name,
|
|
34517
34523
|
entries: g.entries.map((e) => ({ value: e.value, color: e.color }))
|
|
@@ -34522,7 +34528,7 @@ function renderTagLegendRow(svg, resolved, palette, isDark, args) {
|
|
|
34522
34528
|
{
|
|
34523
34529
|
groups,
|
|
34524
34530
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
34525
|
-
mode: "
|
|
34531
|
+
mode: exportMode ? "export" : "preview"
|
|
34526
34532
|
},
|
|
34527
34533
|
{ activeGroup },
|
|
34528
34534
|
palette,
|
|
@@ -35962,7 +35968,8 @@ function renderGantt(container, resolved, palette, isDark, options, exportDims)
|
|
|
35962
35968
|
).attr("display", active ? null : "none");
|
|
35963
35969
|
}
|
|
35964
35970
|
drawLegend();
|
|
35965
|
-
}
|
|
35971
|
+
},
|
|
35972
|
+
options?.exportMode ?? false
|
|
35966
35973
|
);
|
|
35967
35974
|
}
|
|
35968
35975
|
}
|
|
@@ -36751,7 +36758,7 @@ function buildControlsToggles(hasCriticalPath, criticalPathActive, hasDependenci
|
|
|
36751
36758
|
}
|
|
36752
36759
|
return toggles;
|
|
36753
36760
|
}
|
|
36754
|
-
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) {
|
|
36761
|
+
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) {
|
|
36755
36762
|
let visibleGroups;
|
|
36756
36763
|
if (activeGroupName) {
|
|
36757
36764
|
const activeGroup = tagGroups.filter(
|
|
@@ -36846,7 +36853,7 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
36846
36853
|
placement: "top-center",
|
|
36847
36854
|
titleRelation: "below-title"
|
|
36848
36855
|
},
|
|
36849
|
-
mode: "
|
|
36856
|
+
mode: exportMode ? "export" : "preview",
|
|
36850
36857
|
capsulePillAddonWidth: iconReserve,
|
|
36851
36858
|
controlsGroup: controlsToggles.length > 0 ? { toggles: controlsToggles } : void 0
|
|
36852
36859
|
};
|
|
@@ -36953,7 +36960,7 @@ function renderTagLegend(svg, chartG, tagGroups, activeGroupName, chartLeftMargi
|
|
|
36953
36960
|
placement: "top-center",
|
|
36954
36961
|
titleRelation: "below-title"
|
|
36955
36962
|
},
|
|
36956
|
-
mode: "
|
|
36963
|
+
mode: exportMode ? "export" : "preview",
|
|
36957
36964
|
controlsGroup: { toggles: controlsToggles }
|
|
36958
36965
|
};
|
|
36959
36966
|
const tagGroupG = legendRow.append("g");
|
|
@@ -37836,9 +37843,6 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
37836
37843
|
const defs = svg.append("defs");
|
|
37837
37844
|
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);
|
|
37838
37845
|
const edgeColors = /* @__PURE__ */ new Set();
|
|
37839
|
-
for (const edge of layout.edges) {
|
|
37840
|
-
if (edge.color) edgeColors.add(edge.color);
|
|
37841
|
-
}
|
|
37842
37846
|
for (const color of edgeColors) {
|
|
37843
37847
|
const id = `st-arrow-${color.replace("#", "")}`;
|
|
37844
37848
|
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);
|
|
@@ -37933,8 +37937,8 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
|
|
|
37933
37937
|
for (let ei = 0; ei < layout.edges.length; ei++) {
|
|
37934
37938
|
const edge = layout.edges[ei];
|
|
37935
37939
|
const edgeG = contentG.append("g").attr("class", "st-edge-group").attr("data-line-number", String(edge.lineNumber));
|
|
37936
|
-
const edgeColor3 =
|
|
37937
|
-
const markerId =
|
|
37940
|
+
const edgeColor3 = palette.textMuted;
|
|
37941
|
+
const markerId = "st-arrow";
|
|
37938
37942
|
if (edge.source === edge.target) {
|
|
37939
37943
|
const node = nodePositionMap.get(edge.source);
|
|
37940
37944
|
if (node) {
|
|
@@ -39023,7 +39027,7 @@ function renderTechRadar(container, parsed, palette, isDark, onClickItem, export
|
|
|
39023
39027
|
}
|
|
39024
39028
|
],
|
|
39025
39029
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
39026
|
-
mode: "
|
|
39030
|
+
mode: options?.exportMode ? "export" : "preview",
|
|
39027
39031
|
controlsGroup: {
|
|
39028
39032
|
toggles: [
|
|
39029
39033
|
{
|
|
@@ -39626,7 +39630,7 @@ function getQuadrantLabelPosition(position, cx, cy, maxRadius) {
|
|
|
39626
39630
|
};
|
|
39627
39631
|
}
|
|
39628
39632
|
}
|
|
39629
|
-
function renderTechRadarForExport(container, parsed, palette, isDark, exportDims, viewState) {
|
|
39633
|
+
function renderTechRadarForExport(container, parsed, palette, isDark, exportDims, viewState, exportMode) {
|
|
39630
39634
|
renderTechRadar(
|
|
39631
39635
|
container,
|
|
39632
39636
|
parsed,
|
|
@@ -39634,7 +39638,8 @@ function renderTechRadarForExport(container, parsed, palette, isDark, exportDims
|
|
|
39634
39638
|
isDark,
|
|
39635
39639
|
void 0,
|
|
39636
39640
|
exportDims,
|
|
39637
|
-
viewState
|
|
39641
|
+
viewState,
|
|
39642
|
+
{ exportMode }
|
|
39638
39643
|
);
|
|
39639
39644
|
}
|
|
39640
39645
|
var 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;
|
|
@@ -40014,7 +40019,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
40014
40019
|
titleRelation: "inline-with-title"
|
|
40015
40020
|
},
|
|
40016
40021
|
titleWidth: 0,
|
|
40017
|
-
mode:
|
|
40022
|
+
mode: options?.exportMode ? "export" : "preview"
|
|
40018
40023
|
};
|
|
40019
40024
|
const legendState = { activeGroup: effectiveActiveGroup };
|
|
40020
40025
|
const legendCallbacks = {
|
|
@@ -40727,7 +40732,8 @@ function renderJourneyMapForExport(content, theme, palette) {
|
|
|
40727
40732
|
const layout = layoutJourneyMap(parsed, palette, { isDark });
|
|
40728
40733
|
const container = document.createElement("div");
|
|
40729
40734
|
renderJourneyMap(container, parsed, palette, isDark, {
|
|
40730
|
-
exportDims: { width: layout.totalWidth, height: layout.totalHeight }
|
|
40735
|
+
exportDims: { width: layout.totalWidth, height: layout.totalHeight },
|
|
40736
|
+
exportMode: true
|
|
40731
40737
|
});
|
|
40732
40738
|
const svgEl = container.querySelector("svg");
|
|
40733
40739
|
if (!svgEl) return "";
|
|
@@ -41492,7 +41498,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
41492
41498
|
const legendConfig = {
|
|
41493
41499
|
groups: [],
|
|
41494
41500
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
41495
|
-
mode: "
|
|
41501
|
+
mode: renderOptions?.exportMode ? "export" : "preview",
|
|
41496
41502
|
controlsGroup
|
|
41497
41503
|
};
|
|
41498
41504
|
const legendState = {
|
|
@@ -41676,7 +41682,7 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
|
|
|
41676
41682
|
}
|
|
41677
41683
|
}
|
|
41678
41684
|
}
|
|
41679
|
-
function renderCycleForExport(container, parsed, palette, isDark, exportDims, viewState) {
|
|
41685
|
+
function renderCycleForExport(container, parsed, palette, isDark, exportDims, viewState, exportMode) {
|
|
41680
41686
|
renderCycle(
|
|
41681
41687
|
container,
|
|
41682
41688
|
parsed,
|
|
@@ -41684,7 +41690,8 @@ function renderCycleForExport(container, parsed, palette, isDark, exportDims, vi
|
|
|
41684
41690
|
isDark,
|
|
41685
41691
|
void 0,
|
|
41686
41692
|
exportDims,
|
|
41687
|
-
viewState
|
|
41693
|
+
viewState,
|
|
41694
|
+
{ exportMode }
|
|
41688
41695
|
);
|
|
41689
41696
|
}
|
|
41690
41697
|
function resolveNodeColor5(color, palette, defaultColor) {
|
|
@@ -44608,7 +44615,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
|
|
|
44608
44615
|
const legendConfig = {
|
|
44609
44616
|
groups: resolvedGroups,
|
|
44610
44617
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
44611
|
-
mode: "
|
|
44618
|
+
mode: "preview"
|
|
44612
44619
|
};
|
|
44613
44620
|
const legendState = {
|
|
44614
44621
|
activeGroup: activeTagGroup ?? null,
|
|
@@ -45013,7 +45020,9 @@ function parseVisualization(content, palette) {
|
|
|
45013
45020
|
if (currentTimelineTagGroup && indent === 0) {
|
|
45014
45021
|
currentTimelineTagGroup = null;
|
|
45015
45022
|
}
|
|
45016
|
-
const groupMatch = line12.match(
|
|
45023
|
+
const groupMatch = line12.match(
|
|
45024
|
+
/^\[(.+?)\](?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45025
|
+
);
|
|
45017
45026
|
if (groupMatch) {
|
|
45018
45027
|
if (result.type === "arc") {
|
|
45019
45028
|
const name = groupMatch[1].trim();
|
|
@@ -45055,7 +45064,7 @@ function parseVisualization(content, palette) {
|
|
|
45055
45064
|
}
|
|
45056
45065
|
if (result.type === "arc") {
|
|
45057
45066
|
const linkMatch = line12.match(
|
|
45058
|
-
/^(.+?)\s*->\s*(.+?)(?:\(
|
|
45067
|
+
/^(.+?)\s*->\s*(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?(?:\s+(-?[\d,_]+(?:\.[\d]+)?))?$/
|
|
45059
45068
|
);
|
|
45060
45069
|
if (linkMatch) {
|
|
45061
45070
|
const source = linkMatch[1].trim();
|
|
@@ -45094,7 +45103,7 @@ function parseVisualization(content, palette) {
|
|
|
45094
45103
|
} else {
|
|
45095
45104
|
if (line12.startsWith("//")) continue;
|
|
45096
45105
|
const eraEntryMatch = line12.match(
|
|
45097
|
-
/^(\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
|
|
45106
|
+
/^(\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*$/
|
|
45098
45107
|
);
|
|
45099
45108
|
if (eraEntryMatch) {
|
|
45100
45109
|
const colorAnnotation = eraEntryMatch[4]?.trim() || null;
|
|
@@ -45122,7 +45131,7 @@ function parseVisualization(content, palette) {
|
|
|
45122
45131
|
} else {
|
|
45123
45132
|
if (line12.startsWith("//")) continue;
|
|
45124
45133
|
const markerEntryMatch = line12.match(
|
|
45125
|
-
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45134
|
+
/^(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s+(red|orange|yellow|green|blue|purple|teal|cyan|gray|black|white))?\s*$/
|
|
45126
45135
|
);
|
|
45127
45136
|
if (markerEntryMatch) {
|
|
45128
45137
|
const colorAnnotation = markerEntryMatch[3]?.trim() || null;
|
|
@@ -45155,7 +45164,7 @@ function parseVisualization(content, palette) {
|
|
|
45155
45164
|
continue;
|
|
45156
45165
|
}
|
|
45157
45166
|
const eraMatch = line12.match(
|
|
45158
|
-
/^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
|
|
45167
|
+
/^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*$/
|
|
45159
45168
|
);
|
|
45160
45169
|
if (eraMatch) {
|
|
45161
45170
|
const colorAnnotation = eraMatch[4]?.trim() || null;
|
|
@@ -45174,7 +45183,7 @@ function parseVisualization(content, palette) {
|
|
|
45174
45183
|
continue;
|
|
45175
45184
|
}
|
|
45176
45185
|
const markerMatch = line12.match(
|
|
45177
|
-
/^marker\s+(\d{4}(?:-\d{2})?(?:-\d{2}(?: \d{2}:\d{2})?)?)\s+(.+?)(?:\s
|
|
45186
|
+
/^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*$/
|
|
45178
45187
|
);
|
|
45179
45188
|
if (markerMatch) {
|
|
45180
45189
|
const colorAnnotation = markerMatch[3]?.trim() || null;
|
|
@@ -45295,13 +45304,11 @@ function parseVisualization(content, palette) {
|
|
|
45295
45304
|
}
|
|
45296
45305
|
}
|
|
45297
45306
|
if (!/^(solid-fill|no-name|no-value|no-percent|no-title)$/i.test(line12)) {
|
|
45298
|
-
const legacyAliasMatch = line12.match(
|
|
45299
|
-
/^([^(:]+?)(?:\(([^)]+)\))?\s+alias\s+(\S+)\s*$/i
|
|
45300
|
-
);
|
|
45307
|
+
const legacyAliasMatch = line12.match(/^(.+?)\s+alias\s+(\S+)\s*$/i);
|
|
45301
45308
|
if (legacyAliasMatch) {
|
|
45302
|
-
const
|
|
45303
|
-
const
|
|
45304
|
-
const
|
|
45309
|
+
const nameWithMaybeColor = legacyAliasMatch[1].trim();
|
|
45310
|
+
const aliasToken = legacyAliasMatch[2].trim();
|
|
45311
|
+
const { label: name, colorName } = peelTrailingColorName(nameWithMaybeColor);
|
|
45305
45312
|
let color = null;
|
|
45306
45313
|
if (colorName) {
|
|
45307
45314
|
color = resolveColorWithDiagnostic(
|
|
@@ -45323,11 +45330,12 @@ function parseVisualization(content, palette) {
|
|
|
45323
45330
|
continue;
|
|
45324
45331
|
}
|
|
45325
45332
|
const setDeclMatch = line12.match(
|
|
45326
|
-
/^(
|
|
45333
|
+
/^(.+?)(?:\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11}))?\s*$/i
|
|
45327
45334
|
);
|
|
45328
45335
|
if (setDeclMatch) {
|
|
45329
|
-
const
|
|
45330
|
-
const
|
|
45336
|
+
const nameWithMaybeColor = setDeclMatch[1].trim();
|
|
45337
|
+
const alias = setDeclMatch[2]?.trim() ?? null;
|
|
45338
|
+
const { label: name, colorName } = peelTrailingColorName(nameWithMaybeColor);
|
|
45331
45339
|
let color = null;
|
|
45332
45340
|
if (colorName) {
|
|
45333
45341
|
color = resolveColorWithDiagnostic(
|
|
@@ -45337,7 +45345,6 @@ function parseVisualization(content, palette) {
|
|
|
45337
45345
|
palette
|
|
45338
45346
|
) ?? null;
|
|
45339
45347
|
}
|
|
45340
|
-
const alias = setDeclMatch[3]?.trim() ?? null;
|
|
45341
45348
|
result.vennSets.push({ name, alias, color, lineNumber });
|
|
45342
45349
|
continue;
|
|
45343
45350
|
}
|
|
@@ -45383,10 +45390,9 @@ function parseVisualization(content, palette) {
|
|
|
45383
45390
|
if (quadrantMatch) {
|
|
45384
45391
|
const position = quadrantMatch[1].toLowerCase();
|
|
45385
45392
|
const labelPart = quadrantMatch[2].trim();
|
|
45386
|
-
const
|
|
45387
|
-
const
|
|
45388
|
-
|
|
45389
|
-
labelColorMatch[2].trim(),
|
|
45393
|
+
const { label: text, colorName } = peelTrailingColorName(labelPart);
|
|
45394
|
+
const color = colorName ? resolveColorWithDiagnostic(
|
|
45395
|
+
colorName,
|
|
45390
45396
|
lineNumber,
|
|
45391
45397
|
result.diagnostics,
|
|
45392
45398
|
palette
|
|
@@ -45576,10 +45582,9 @@ function parseVisualization(content, palette) {
|
|
|
45576
45582
|
);
|
|
45577
45583
|
continue;
|
|
45578
45584
|
}
|
|
45579
|
-
const
|
|
45580
|
-
const
|
|
45581
|
-
|
|
45582
|
-
colorMatch[2].trim(),
|
|
45585
|
+
const { label: labelPart, colorName: colorWord } = peelTrailingColorName(joinedLabel);
|
|
45586
|
+
const colorPart = colorWord ? resolveColorWithDiagnostic(
|
|
45587
|
+
colorWord,
|
|
45583
45588
|
lineNumber,
|
|
45584
45589
|
result.diagnostics,
|
|
45585
45590
|
palette
|
|
@@ -46868,7 +46873,7 @@ function makeTimelineHoverHelpers() {
|
|
|
46868
46873
|
setTagAttrs
|
|
46869
46874
|
};
|
|
46870
46875
|
}
|
|
46871
|
-
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode) {
|
|
46876
|
+
function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setup, hovers, onClickItem, exportDims, swimlaneTagGroup, activeTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
46872
46877
|
if (parsed.timelineTagGroups.length === 0) return;
|
|
46873
46878
|
const { width, textColor, groupColorMap, solid } = setup;
|
|
46874
46879
|
const { FADE_OPACITY: FADE_OPACITY3, fadeReset, fadeToTagValue } = hovers;
|
|
@@ -46939,7 +46944,7 @@ function renderTimelineTagLegendOverlay(container, parsed, palette, isDark, setu
|
|
|
46939
46944
|
const centralConfig = {
|
|
46940
46945
|
groups: centralGroups,
|
|
46941
46946
|
position: { placement: "top-center", titleRelation: "below-title" },
|
|
46942
|
-
mode: "
|
|
46947
|
+
mode: exportMode ? "export" : "preview",
|
|
46943
46948
|
capsulePillAddonWidth: iconAddon
|
|
46944
46949
|
};
|
|
46945
46950
|
const centralState = { activeGroup: centralActive };
|
|
@@ -47783,7 +47788,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
47783
47788
|
}
|
|
47784
47789
|
}
|
|
47785
47790
|
}
|
|
47786
|
-
function renderTimeline(container, parsed, palette, isDark, onClickItem, exportDims, activeTagGroup, swimlaneTagGroup, onTagStateChange, viewMode) {
|
|
47791
|
+
function renderTimeline(container, parsed, palette, isDark, onClickItem, exportDims, activeTagGroup, swimlaneTagGroup, onTagStateChange, viewMode, exportMode) {
|
|
47787
47792
|
const setup = setupTimeline(
|
|
47788
47793
|
container,
|
|
47789
47794
|
parsed,
|
|
@@ -47858,7 +47863,8 @@ function renderTimeline(container, parsed, palette, isDark, onClickItem, exportD
|
|
|
47858
47863
|
swimlaneTagGroup,
|
|
47859
47864
|
activeTagGroup,
|
|
47860
47865
|
onTagStateChange,
|
|
47861
|
-
viewMode
|
|
47866
|
+
viewMode,
|
|
47867
|
+
exportMode
|
|
47862
47868
|
);
|
|
47863
47869
|
}
|
|
47864
47870
|
function getRotateFn(mode) {
|
|
@@ -49002,6 +49008,7 @@ function finalizeSvgExport(container, theme, palette) {
|
|
|
49002
49008
|
return svgHtml;
|
|
49003
49009
|
}
|
|
49004
49010
|
async function renderForExport(content, theme, palette, viewState, options) {
|
|
49011
|
+
const exportMode = options?.exportMode ?? false;
|
|
49005
49012
|
const { parseDgmoChartType: parseDgmoChartType2 } = await Promise.resolve().then(() => (init_dgmo_router(), dgmo_router_exports));
|
|
49006
49013
|
const detectedType = parseDgmoChartType2(content);
|
|
49007
49014
|
if (detectedType === "org") {
|
|
@@ -49043,7 +49050,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49043
49050
|
void 0,
|
|
49044
49051
|
{ width: exportWidth, height: exportHeight },
|
|
49045
49052
|
activeTagGroup,
|
|
49046
|
-
hiddenAttributes
|
|
49053
|
+
hiddenAttributes,
|
|
49054
|
+
void 0,
|
|
49055
|
+
exportMode
|
|
49047
49056
|
);
|
|
49048
49057
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49049
49058
|
}
|
|
@@ -49085,7 +49094,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49085
49094
|
void 0,
|
|
49086
49095
|
{ width: exportWidth, height: exportHeight },
|
|
49087
49096
|
activeTagGroup,
|
|
49088
|
-
hiddenAttributes
|
|
49097
|
+
hiddenAttributes,
|
|
49098
|
+
exportMode
|
|
49089
49099
|
);
|
|
49090
49100
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49091
49101
|
}
|
|
@@ -49108,7 +49118,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49108
49118
|
currentSwimlaneGroup: viewState?.swim ?? null,
|
|
49109
49119
|
collapsedLanes: viewState?.cl ? new Set(viewState.cl) : void 0,
|
|
49110
49120
|
collapsedColumns: viewState?.cc ? new Set(viewState.cc) : void 0,
|
|
49111
|
-
compactMeta: viewState?.cm
|
|
49121
|
+
compactMeta: viewState?.cm,
|
|
49122
|
+
exportMode
|
|
49112
49123
|
});
|
|
49113
49124
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49114
49125
|
}
|
|
@@ -49132,7 +49143,9 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49132
49143
|
effectivePalette2,
|
|
49133
49144
|
theme === "dark",
|
|
49134
49145
|
void 0,
|
|
49135
|
-
{ width: exportWidth, height: exportHeight }
|
|
49146
|
+
{ width: exportWidth, height: exportHeight },
|
|
49147
|
+
void 0,
|
|
49148
|
+
exportMode
|
|
49136
49149
|
);
|
|
49137
49150
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49138
49151
|
}
|
|
@@ -49162,7 +49175,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49162
49175
|
erParsed.options["active-tag"],
|
|
49163
49176
|
viewState?.tag ?? options?.tagGroup
|
|
49164
49177
|
),
|
|
49165
|
-
viewState?.sem
|
|
49178
|
+
viewState?.sem,
|
|
49179
|
+
exportMode
|
|
49166
49180
|
);
|
|
49167
49181
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49168
49182
|
}
|
|
@@ -49195,7 +49209,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49195
49209
|
{
|
|
49196
49210
|
exportDims: { width: exportWidth, height: exportHeight },
|
|
49197
49211
|
activeTagGroup: viewState?.tag ?? options?.tagGroup,
|
|
49198
|
-
hiddenTagValues: blHiddenTagValues
|
|
49212
|
+
hiddenTagValues: blHiddenTagValues,
|
|
49213
|
+
exportMode
|
|
49199
49214
|
}
|
|
49200
49215
|
);
|
|
49201
49216
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
@@ -49241,7 +49256,7 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49241
49256
|
void 0,
|
|
49242
49257
|
hideDescriptions,
|
|
49243
49258
|
colorByDepth ? null : activeTagGroup,
|
|
49244
|
-
colorByDepth ? { colorByDepth: true } :
|
|
49259
|
+
colorByDepth ? { colorByDepth: true, exportMode } : { exportMode }
|
|
49245
49260
|
);
|
|
49246
49261
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49247
49262
|
}
|
|
@@ -49304,7 +49319,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49304
49319
|
c4Parsed.tagGroups,
|
|
49305
49320
|
c4Parsed.options["active-tag"],
|
|
49306
49321
|
viewState?.tag ?? options?.tagGroup
|
|
49307
|
-
)
|
|
49322
|
+
),
|
|
49323
|
+
exportMode
|
|
49308
49324
|
);
|
|
49309
49325
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49310
49326
|
}
|
|
@@ -49440,7 +49456,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49440
49456
|
resolved.tagGroups,
|
|
49441
49457
|
resolved.options.activeTag ?? void 0,
|
|
49442
49458
|
viewState?.tag ?? options?.tagGroup
|
|
49443
|
-
)
|
|
49459
|
+
),
|
|
49460
|
+
exportMode
|
|
49444
49461
|
},
|
|
49445
49462
|
{ width: EXPORT_W, height: EXPORT_H }
|
|
49446
49463
|
);
|
|
@@ -49481,7 +49498,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49481
49498
|
effectivePalette2,
|
|
49482
49499
|
theme === "dark",
|
|
49483
49500
|
{ width: RADAR_EXPORT_W, height: RADAR_EXPORT_H },
|
|
49484
|
-
viewState
|
|
49501
|
+
viewState,
|
|
49502
|
+
exportMode
|
|
49485
49503
|
);
|
|
49486
49504
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49487
49505
|
}
|
|
@@ -49501,7 +49519,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49501
49519
|
jmLayout.totalHeight
|
|
49502
49520
|
);
|
|
49503
49521
|
renderJourneyMap2(container2, jmParsed, effectivePalette2, theme === "dark", {
|
|
49504
|
-
exportDims: { width: jmLayout.totalWidth, height: jmLayout.totalHeight }
|
|
49522
|
+
exportDims: { width: jmLayout.totalWidth, height: jmLayout.totalHeight },
|
|
49523
|
+
exportMode
|
|
49505
49524
|
});
|
|
49506
49525
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49507
49526
|
}
|
|
@@ -49518,7 +49537,8 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49518
49537
|
effectivePalette2,
|
|
49519
49538
|
theme === "dark",
|
|
49520
49539
|
{ width: EXPORT_WIDTH, height: EXPORT_HEIGHT },
|
|
49521
|
-
viewState
|
|
49540
|
+
viewState,
|
|
49541
|
+
exportMode
|
|
49522
49542
|
);
|
|
49523
49543
|
return finalizeSvgExport(container2, theme, effectivePalette2);
|
|
49524
49544
|
}
|
|
@@ -49637,7 +49657,10 @@ async function renderForExport(content, theme, palette, viewState, options) {
|
|
|
49637
49657
|
void 0,
|
|
49638
49658
|
viewState?.tag ?? options?.tagGroup
|
|
49639
49659
|
),
|
|
49640
|
-
viewState?.swim
|
|
49660
|
+
viewState?.swim,
|
|
49661
|
+
void 0,
|
|
49662
|
+
void 0,
|
|
49663
|
+
exportMode
|
|
49641
49664
|
);
|
|
49642
49665
|
} else if (parsed.type === "venn") {
|
|
49643
49666
|
renderVenn(container, parsed, effectivePalette, isDark, void 0, dims);
|
|
@@ -51358,7 +51381,11 @@ init_parser8();
|
|
|
51358
51381
|
init_parser2();
|
|
51359
51382
|
init_parser10();
|
|
51360
51383
|
init_parsing();
|
|
51384
|
+
init_colors();
|
|
51361
51385
|
init_chart_types();
|
|
51386
|
+
var RECOGNIZED_COLOR_SET2 = new Set(
|
|
51387
|
+
RECOGNIZED_COLOR_NAMES
|
|
51388
|
+
);
|
|
51362
51389
|
var extractorRegistry = /* @__PURE__ */ new Map();
|
|
51363
51390
|
function registerExtractor(kind, fn) {
|
|
51364
51391
|
extractorRegistry.set(kind, fn);
|
|
@@ -52127,8 +52154,8 @@ function extractTagDeclarations(docText) {
|
|
|
52127
52154
|
}
|
|
52128
52155
|
if (currentAlias !== null && raw.length > 0 && (raw[0] === " " || raw[0] === " ")) {
|
|
52129
52156
|
if (trimmed && !trimmed.startsWith("//")) {
|
|
52130
|
-
const
|
|
52131
|
-
const value =
|
|
52157
|
+
const lastSpaceIdx = trimmed.lastIndexOf(" ");
|
|
52158
|
+
const value = lastSpaceIdx > 0 && RECOGNIZED_COLOR_SET2.has(trimmed.substring(lastSpaceIdx + 1)) ? trimmed.substring(0, lastSpaceIdx).trim() : trimmed;
|
|
52132
52159
|
if (value) currentValues.push(value);
|
|
52133
52160
|
}
|
|
52134
52161
|
continue;
|
|
@@ -52679,7 +52706,6 @@ export {
|
|
|
52679
52706
|
looksLikeSitemap,
|
|
52680
52707
|
looksLikeState,
|
|
52681
52708
|
makeDgmoError,
|
|
52682
|
-
matchColorParens,
|
|
52683
52709
|
matchesContiguously,
|
|
52684
52710
|
measurePertAnalysisBlock,
|
|
52685
52711
|
mix,
|