@diagrammo/dgmo 0.64.1 → 0.65.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/LICENSE +1 -1
- package/dist/advanced.d.ts +6771 -0
- package/dist/advanced.js +71 -71
- package/dist/block.d.ts +142 -0
- package/dist/block.js +15 -15
- package/dist/chart-meta-D98NbYDp.d.ts +238 -0
- package/dist/chart-meta.d.ts +2 -0
- package/dist/chart-meta.js +3 -3
- package/dist/{charts-d3-ZTXJWEHI.js → charts-d3-I6OE5K3B.js} +9 -9
- package/dist/{chunk-C6DMG2V6.js → chunk-27YPE7NO.js} +28 -12
- package/dist/{chunk-RBAW7VUG.js → chunk-2EPV7CLY.js} +5 -7
- package/dist/{chunk-SCJ7CAJF.js → chunk-3HOCNSPD.js} +2 -2
- package/dist/{chunk-Z2ADWRSW.js → chunk-3PSPUYT5.js} +3 -3
- package/dist/{chunk-RBBJIHNL.js → chunk-4IE42ODL.js} +11 -11
- package/dist/{chunk-SMCUX42K.js → chunk-4TM7MWU4.js} +7 -6
- package/dist/{chunk-H3HFC3SQ.js → chunk-5GM6BZO7.js} +3 -3
- package/dist/{chunk-7T3A2UK3.js → chunk-5T7K6QND.js} +15 -16
- package/dist/{chunk-NKRCPBTJ.js → chunk-6BOPYGJC.js} +6 -6
- package/dist/{chunk-37EHGTQ2.js → chunk-6E5YZR4S.js} +18 -16
- package/dist/{chunk-MHI6W6XS.js → chunk-6IUL6LER.js} +10 -7
- package/dist/{chunk-S5RWWISJ.js → chunk-7L53J53J.js} +4 -4
- package/dist/{chunk-WDJ4HAGO.js → chunk-A6CTYC7O.js} +2 -2
- package/dist/{chunk-CDMF7P5A.js → chunk-BBCKUAUR.js} +2 -2
- package/dist/{chunk-AA4M6F2P.js → chunk-BBY57XAA.js} +3 -3
- package/dist/{chunk-NKRVFQGO.js → chunk-BDI25HWH.js} +18 -6
- package/dist/{chunk-SVR3YFM3.js → chunk-C666LP3O.js} +20 -15
- package/dist/{chunk-KRTO7NRK.js → chunk-D2WHS23S.js} +2 -2
- package/dist/{chunk-LYTEVE2N.js → chunk-DBF4IM4U.js} +20 -15
- package/dist/{chunk-PCWPYOT4.js → chunk-ET4R3AU5.js} +4 -4
- package/dist/{chunk-2KOBOIB2.js → chunk-FBD5ASMB.js} +2 -2
- package/dist/{chunk-ES66QH6J.js → chunk-FG24NXKN.js} +2 -2
- package/dist/{chunk-3CIOJ5YJ.js → chunk-FJ57274M.js} +3 -1
- package/dist/{chunk-6BVIZW5N.js → chunk-FLFBY5GN.js} +14 -12
- package/dist/{chunk-XUN3MIO3.js → chunk-G64OVYUT.js} +2 -2
- package/dist/{chunk-RQL25P3U.js → chunk-G7QZF6T3.js} +9 -9
- package/dist/{chunk-IGIJZHB6.js → chunk-GC7CBX6C.js} +6 -6
- package/dist/{chunk-B6AONGTI.js → chunk-GDQN2TPX.js} +21 -14
- package/dist/{chunk-CZUSH6NI.js → chunk-GMLSYNFP.js} +10 -9
- package/dist/{chunk-R6HCNSP6.js → chunk-GOW5VO6M.js} +2 -2
- package/dist/{chunk-SPHC4RYF.js → chunk-GXOMKWQ5.js} +10 -9
- package/dist/{chunk-MQHOKBJ6.js → chunk-IJ4FUFTR.js} +5 -5
- package/dist/{chunk-V3UQSKWJ.js → chunk-IJSFEU4J.js} +9 -9
- package/dist/{chunk-LSFZDBAP.js → chunk-IKHV5IJB.js} +2 -2
- package/dist/{chunk-LMXAB4YM.js → chunk-IZ6RWMBM.js} +9 -9
- package/dist/{chunk-6VJCURWU.js → chunk-J2EXBAPZ.js} +4 -5
- package/dist/{chunk-IX6N5MCY.js → chunk-JCL4K7AK.js} +12 -11
- package/dist/{chunk-OBKM6GIJ.js → chunk-JTUDM7S4.js} +10 -10
- package/dist/{chunk-CVVICCSB.js → chunk-L65WI4HO.js} +4 -4
- package/dist/{chunk-67D4MN2H.js → chunk-LK6LTSLH.js} +2 -2
- package/dist/{chunk-KOHIF4LD.js → chunk-MBODBL7C.js} +6 -5
- package/dist/chunk-MTGGOCND.js +638 -0
- package/dist/{chunk-VJARCVMH.js → chunk-MU3CJPJF.js} +2 -2
- package/dist/{chunk-RKTIIU7Z.js → chunk-N6XI5VTA.js} +4 -4
- package/dist/{chunk-ODUT5WMC.js → chunk-NVOU7N6C.js} +2 -2
- package/dist/{chunk-T4QXHE34.js → chunk-OWUWLZJT.js} +13 -11
- package/dist/{chunk-LDVUPGWC.js → chunk-OWVDD5EC.js} +2 -2
- package/dist/{chunk-M4HYPDER.js → chunk-P5OCINCI.js} +8 -8
- package/dist/{chunk-JU2VMFYC.js → chunk-PZOFMBF3.js} +2 -2
- package/dist/{chunk-YLK3JNWP.js → chunk-QNCXONBR.js} +2 -2
- package/dist/{chunk-DB2KQ5DN.js → chunk-QRWY5QTA.js} +5 -5
- package/dist/{chunk-I2ATN25N.js → chunk-R4XM44BW.js} +25 -16
- package/dist/{chunk-DJCZWQ2A.js → chunk-RTTZIX34.js} +4 -4
- package/dist/{chunk-OMTBYLKN.js → chunk-TPKNA2U5.js} +9 -7
- package/dist/{chunk-DN5HEDE4.js → chunk-TT5B36WO.js} +16 -20
- package/dist/{chunk-SF3JAWMY.js → chunk-TWILCDUE.js} +3 -3
- package/dist/{chunk-NIZM3LAG.js → chunk-UINRIO77.js} +10 -10
- package/dist/{chunk-5H2LIQIH.js → chunk-UJXCDF4E.js} +4 -4
- package/dist/{chunk-Z5ID35YP.js → chunk-UTCPNJND.js} +2 -4
- package/dist/{chunk-U42ZEK7L.js → chunk-V4BYBIBU.js} +24 -15
- package/dist/{chunk-L4IN4OBB.js → chunk-VLI5SYXW.js} +7 -7
- package/dist/{chunk-43E26CDA.js → chunk-VS2M72PF.js} +4 -4
- package/dist/{chunk-KZ3PCDUJ.js → chunk-VV6HZQ5K.js} +2 -2
- package/dist/{chunk-Z5BTSBWW.js → chunk-WF2HDQPG.js} +4 -4
- package/dist/{chunk-TAJ2XFTT.js → chunk-XKMCL2YJ.js} +19 -16
- package/dist/{chunk-7GUYGQR4.js → chunk-XVEPB2UU.js} +4 -4
- package/dist/{chunk-YHTKDIF2.js → chunk-YGFNITPC.js} +11 -11
- package/dist/{chunk-I24O2RWT.js → chunk-YJOOIOSR.js} +84 -14
- package/dist/{chunk-KPX2OWZR.js → chunk-YKWHUPBP.js} +13 -14
- package/dist/{chunk-FRC4LDTQ.js → chunk-YMYPFX4O.js} +36 -30
- package/dist/{chunk-VOJOARA6.js → chunk-ZZXPYVS4.js} +82 -77
- package/dist/cloud-reference.d.ts +96 -0
- package/dist/completion-registry.d.ts +129 -0
- package/dist/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
- package/dist/dgmo-router-Dd5PTjxl.d.ts +540 -0
- package/dist/{dimensions-ES6O2T4H.js → dimensions-ILAVBRQ3.js} +7 -7
- package/dist/{flowchart-renderer-EXMRHFTQ.js → flowchart-renderer-6JKM2FA4.js} +7 -7
- package/dist/index.d.ts +207 -0
- package/dist/index.js +15 -15
- package/dist/{layout-HBWT2G23.js → layout-4LNMXLVK.js} +3 -3
- package/dist/{layout-UU4VJTOP.js → layout-62ERBWCM.js} +3 -3
- package/dist/{layout-N6X46MWG.js → layout-6SKHNQYO.js} +4 -4
- package/dist/{layout-OH4VQ3OI.js → layout-7JULRP4Y.js} +4 -4
- package/dist/{layout-QTZO6CW5.js → layout-FA37VP7V.js} +4 -4
- package/dist/layout-IN53LAE6.js +9 -0
- package/dist/{layout-H4H4OFE4.js → layout-IO6ORC5T.js} +3 -3
- package/dist/{layout-54P3DAXY.js → layout-LVMWK4QY.js} +5 -5
- package/dist/{layout-WCOEZPOI.js → layout-MNOTDWXW.js} +4 -4
- package/dist/{layout-2T2VCCTM.js → layout-RD7GDM4I.js} +5 -5
- package/dist/{layout-SKQMIXTG.js → layout-SBQTN2YM.js} +4 -4
- package/dist/{layout-5E2NQZNM.js → layout-SGYR6HBX.js} +3 -3
- package/dist/{layout-W3ZBJOIK.js → layout-WIMQIHBU.js} +5 -5
- package/dist/{layout-search-AJ6VUVUI.js → layout-search-C44CJQOB.js} +5 -5
- package/dist/{legend-constants-QQU3QYBF.js → legend-constants-RGINV5SF.js} +3 -3
- package/dist/live-link-resolve.d.ts +73 -0
- package/dist/{parser-KSIYWKYF.js → parser-CSKF2KNO.js} +8 -4
- package/dist/{parser-2BGDJJ2L.js → parser-WLL63XH7.js} +2 -2
- package/dist/{renderer-XLEYPLVL.js → renderer-2UIQVKXK.js} +8 -8
- package/dist/{renderer-KOWVTTYR.js → renderer-3GG2DEFQ.js} +7 -7
- package/dist/{renderer-XLPNUOYA.js → renderer-6NDYVZXQ.js} +10 -10
- package/dist/{renderer-2ARNFXSC.js → renderer-6ST44AVP.js} +10 -10
- package/dist/{renderer-YLM4CGBG.js → renderer-ALP46W2X.js} +8 -8
- package/dist/{renderer-NHFRVCDC.js → renderer-AOFIEF2T.js} +9 -9
- package/dist/{renderer-HLWEJQJW.js → renderer-BEVY3UP5.js} +5 -5
- package/dist/{renderer-H6AQ4UIR.js → renderer-BXPWSNTJ.js} +13 -13
- package/dist/{renderer-BYWLJDT4.js → renderer-EWTETTII.js} +8 -8
- package/dist/{renderer-KK2534AF.js → renderer-FHXAWDNI.js} +4 -4
- package/dist/{renderer-OB77AT7V.js → renderer-FI4IKF4I.js} +7 -7
- package/dist/{renderer-DMVUBKP7.js → renderer-GHYH6DLG.js} +4 -4
- package/dist/{renderer-LSBXYOID.js → renderer-GYYJ4APT.js} +10 -10
- package/dist/{renderer-M43ROWET.js → renderer-JFOHE3YB.js} +9 -9
- package/dist/{renderer-OA7FSZ4A.js → renderer-L5QGQTLV.js} +3 -3
- package/dist/{renderer-7OOC2ZO2.js → renderer-L7S6YVM6.js} +4 -4
- package/dist/{renderer-YELZR4QT.js → renderer-LCHVBTV4.js} +12 -12
- package/dist/{renderer-IN3UPTZS.js → renderer-M4DAYNWC.js} +3 -3
- package/dist/{renderer-WN47AMUM.js → renderer-NXIK3LOA.js} +8 -8
- package/dist/{renderer-QR5343AR.js → renderer-OWUXQDHM.js} +3 -3
- package/dist/{renderer-FCO42JLK.js → renderer-PJNJOCLB.js} +8 -8
- package/dist/{renderer-OYTERGAO.js → renderer-QQBUBD66.js} +9 -9
- package/dist/{renderer-PM7JPC3J.js → renderer-REFE3YFH.js} +11 -11
- package/dist/{renderer-C6KOE774.js → renderer-RL2JGVPC.js} +10 -10
- package/dist/{renderer-ZNTLBQ45.js → renderer-RVFPPKWN.js} +9 -9
- package/dist/{renderer-QEHUJHRK.js → renderer-SFQHFPC5.js} +10 -10
- package/dist/{renderer-LO4FXQHP.js → renderer-T4CMBGA5.js} +8 -8
- package/dist/{renderer-M3PQKXK2.js → renderer-TJD6A3AK.js} +13 -13
- package/dist/{renderer-2E7LQC32.js → renderer-URPIVAPI.js} +3 -3
- package/dist/{renderer-T5CUGSXP.js → renderer-WENGQEX6.js} +7 -7
- package/dist/{renderer-WR3FA3FF.js → renderer-WR6J7NKH.js} +8 -8
- package/dist/{renderer-YBEZ5V2H.js → renderer-X3V2G4UL.js} +3 -3
- package/dist/{renderer-KPEQ72FY.js → renderer-YAW4VHAI.js} +11 -11
- package/dist/{renderer-radial-XWAKJACV.js → renderer-radial-HOUGPUPW.js} +7 -7
- package/dist/{state-renderer-LIESKSBO.js → state-renderer-JJSQJZEL.js} +11 -11
- package/dist/themes-DiUAG4Bf.d.ts +631 -0
- package/docs/ai-integration.md +1 -1
- package/docs/language-reference.md +5 -0
- package/gallery/fixtures/er.dgmo +1 -1
- package/package.json +5 -3
- package/dist/chunk-4ASYQ347.js +0 -185
- package/dist/layout-5XGYNYVT.js +0 -9
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
measureText,
|
|
6
6
|
truncateText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MTGGOCND.js";
|
|
8
8
|
import {
|
|
9
9
|
preprocessDescriptionLine
|
|
10
10
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -27,14 +27,14 @@ function tokenize(text) {
|
|
|
27
27
|
}
|
|
28
28
|
return tokens;
|
|
29
29
|
}
|
|
30
|
-
function tryWrap(tokens, maxWidth, fontSize, maxLines) {
|
|
30
|
+
function tryWrap(tokens, maxWidth, fontSize, maxLines, bold) {
|
|
31
31
|
const availWidth = maxWidth - H_PAD;
|
|
32
32
|
const lines = [];
|
|
33
33
|
let currentLine = "";
|
|
34
34
|
for (const token of tokens) {
|
|
35
35
|
const sep = currentLine && !currentLine.endsWith("-") ? " " : "";
|
|
36
36
|
const candidate = currentLine + sep + token;
|
|
37
|
-
if (measureText(candidate, fontSize) <= availWidth) {
|
|
37
|
+
if (measureText(candidate, fontSize, { bold }) <= availWidth) {
|
|
38
38
|
currentLine = candidate;
|
|
39
39
|
} else if (!currentLine) {
|
|
40
40
|
currentLine = token;
|
|
@@ -52,36 +52,42 @@ function tryWrap(tokens, maxWidth, fontSize, maxLines) {
|
|
|
52
52
|
if (lines.length > maxLines) return null;
|
|
53
53
|
return lines;
|
|
54
54
|
}
|
|
55
|
-
function truncateLastLine(lines, maxWidth, fontSize) {
|
|
55
|
+
function truncateLastLine(lines, maxWidth, fontSize, bold) {
|
|
56
56
|
const availWidth = maxWidth - H_PAD;
|
|
57
57
|
const result = [...lines];
|
|
58
58
|
const last = result[result.length - 1];
|
|
59
|
-
if (measureText(last, fontSize) > availWidth) {
|
|
60
|
-
result[result.length - 1] = truncateText(last, fontSize, availWidth
|
|
59
|
+
if (measureText(last, fontSize, { bold }) > availWidth) {
|
|
60
|
+
result[result.length - 1] = truncateText(last, fontSize, availWidth, {
|
|
61
|
+
bold
|
|
62
|
+
});
|
|
61
63
|
}
|
|
62
64
|
return result;
|
|
63
65
|
}
|
|
64
|
-
function wrapText(text, maxWidth, baseFontSize, minFontSize, maxLines = MAX_LABEL_LINES) {
|
|
66
|
+
function wrapText(text, maxWidth, baseFontSize, minFontSize, maxLines = MAX_LABEL_LINES, bold = false) {
|
|
65
67
|
if (!text) return { lines: [""], fontSize: baseFontSize };
|
|
66
68
|
const tokens = tokenize(text);
|
|
67
69
|
for (let fs = baseFontSize; fs >= minFontSize; fs--) {
|
|
68
|
-
const lines = tryWrap(tokens, maxWidth, fs, maxLines);
|
|
70
|
+
const lines = tryWrap(tokens, maxWidth, fs, maxLines, bold);
|
|
69
71
|
if (lines) {
|
|
70
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
lines: truncateLastLine(lines, maxWidth, fs, bold),
|
|
74
|
+
fontSize: fs
|
|
75
|
+
};
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
|
-
const allLines = tryWrap(tokens, maxWidth, minFontSize, 999) ?? [text];
|
|
78
|
+
const allLines = tryWrap(tokens, maxWidth, minFontSize, 999, bold) ?? [text];
|
|
74
79
|
const capped = allLines.slice(0, maxLines);
|
|
75
|
-
const truncated = truncateLastLine(capped, maxWidth, minFontSize);
|
|
80
|
+
const truncated = truncateLastLine(capped, maxWidth, minFontSize, bold);
|
|
76
81
|
if (allLines.length > maxLines) {
|
|
77
82
|
const last = truncated[truncated.length - 1];
|
|
78
83
|
if (!last.endsWith("\u2026")) {
|
|
79
84
|
const availWidth = maxWidth - H_PAD;
|
|
80
|
-
if (measureText(last + "\u2026", minFontSize) > availWidth) {
|
|
85
|
+
if (measureText(last + "\u2026", minFontSize, { bold }) > availWidth) {
|
|
81
86
|
truncated[truncated.length - 1] = truncateText(
|
|
82
87
|
last,
|
|
83
88
|
minFontSize,
|
|
84
|
-
availWidth
|
|
89
|
+
availWidth,
|
|
90
|
+
{ bold }
|
|
85
91
|
);
|
|
86
92
|
} else {
|
|
87
93
|
truncated[truncated.length - 1] = last + "\u2026";
|
|
@@ -107,7 +113,10 @@ function computeNodeText(label, description, depth, nodeWidth, hideDescriptions)
|
|
|
107
113
|
nodeWidth,
|
|
108
114
|
baseFontSize,
|
|
109
115
|
MIN_FONT_SIZE,
|
|
110
|
-
MAX_LABEL_LINES
|
|
116
|
+
MAX_LABEL_LINES,
|
|
117
|
+
// The renderer draws the root node's label bold and every other label
|
|
118
|
+
// normal, and a mindmap has exactly one node at depth 0.
|
|
119
|
+
depth === 0
|
|
111
120
|
);
|
|
112
121
|
const descLines = [];
|
|
113
122
|
let descFontSize = DESC_FONT_SIZE;
|
|
@@ -547,4 +556,4 @@ export {
|
|
|
547
556
|
computeNodeText,
|
|
548
557
|
layoutMindmap
|
|
549
558
|
};
|
|
550
|
-
//# sourceMappingURL=chunk-
|
|
559
|
+
//# sourceMappingURL=chunk-V4BYBIBU.js.map
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
} from "./chunk-YYVTBZZC.js";
|
|
8
8
|
import {
|
|
9
9
|
renderIntegratedLegend
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2EPV7CLY.js";
|
|
11
11
|
import {
|
|
12
12
|
getMaxLegendReservedHeight
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FG24NXKN.js";
|
|
14
14
|
import {
|
|
15
15
|
FONT_FAMILY
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UTCPNJND.js";
|
|
17
17
|
import {
|
|
18
18
|
measureText,
|
|
19
19
|
truncateText,
|
|
20
20
|
wrapTextToWidth
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MTGGOCND.js";
|
|
22
22
|
import {
|
|
23
23
|
fillModeFromOptions,
|
|
24
24
|
legendSuppressed
|
|
@@ -1543,9 +1543,9 @@ function escapeHtml2(text) {
|
|
|
1543
1543
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1544
1544
|
}
|
|
1545
1545
|
function renderQuadrantLabel(g, name, x, y, anchor, color, maxWidth, baseFontSize = QUADRANT_LABEL_FONT_SIZE) {
|
|
1546
|
-
const lines = wrapTextToWidth(name, baseFontSize, maxWidth);
|
|
1546
|
+
const lines = wrapTextToWidth(name, baseFontSize, maxWidth, { bold: true });
|
|
1547
1547
|
const estimatedWidth = Math.max(
|
|
1548
|
-
...lines.map((l) => measureText(l, baseFontSize))
|
|
1548
|
+
...lines.map((l) => measureText(l, baseFontSize, { bold: true }))
|
|
1549
1549
|
);
|
|
1550
1550
|
const fontSize = estimatedWidth > maxWidth ? Math.max(12, baseFontSize * (maxWidth / estimatedWidth)) : baseFontSize;
|
|
1551
1551
|
const lineHeight = fontSize * 1.2;
|
|
@@ -1603,4 +1603,4 @@ export {
|
|
|
1603
1603
|
renderTechRadar,
|
|
1604
1604
|
renderTechRadarForExport
|
|
1605
1605
|
};
|
|
1606
|
-
//# sourceMappingURL=chunk-
|
|
1606
|
+
//# sourceMappingURL=chunk-VLI5SYXW.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CHAR_WIDTH_RATIO,
|
|
3
3
|
measureText,
|
|
4
4
|
truncateText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MTGGOCND.js";
|
|
6
6
|
|
|
7
7
|
// src/infra/layout.ts
|
|
8
8
|
import dagre from "@dagrejs/dagre";
|
|
@@ -97,7 +97,7 @@ function hasRoles(node) {
|
|
|
97
97
|
function computeNodeWidth(node, expanded, options) {
|
|
98
98
|
const badgeVal = node.computedConcurrentInvocations === 0 && node.computedInstances > 1 ? node.computedInstances : 0;
|
|
99
99
|
const badgeWidth = badgeVal > 0 ? measureText(`${badgeVal}x`, META_FONT_SIZE) + 2 * CHAR_WIDTH_RATIO * NODE_FONT_SIZE : 0;
|
|
100
|
-
const labelWidth = measureText(node.label, NODE_FONT_SIZE) + badgeWidth + PADDING_X;
|
|
100
|
+
const labelWidth = measureText(node.label, NODE_FONT_SIZE, { bold: true }) + badgeWidth + PADDING_X;
|
|
101
101
|
const allKeys = [];
|
|
102
102
|
if (node.computedRps > 0) allKeys.push("RPS");
|
|
103
103
|
if (expanded) {
|
|
@@ -143,7 +143,7 @@ function computeNodeWidth(node, expanded, options) {
|
|
|
143
143
|
}
|
|
144
144
|
if (allKeys.length === 0) return Math.max(MIN_NODE_WIDTH, labelWidth);
|
|
145
145
|
const keyColWidth = Math.max(
|
|
146
|
-
...allKeys.map((k) => measureText(`${k}: `, META_FONT_SIZE))
|
|
146
|
+
...allKeys.map((k) => measureText(`${k}: `, META_FONT_SIZE, { bold: true }))
|
|
147
147
|
);
|
|
148
148
|
let maxRowWidth = 0;
|
|
149
149
|
if (node.computedRps > 0) {
|
|
@@ -587,4 +587,4 @@ export {
|
|
|
587
587
|
fixEdgeWaypoints,
|
|
588
588
|
layoutInfra
|
|
589
589
|
};
|
|
590
|
-
//# sourceMappingURL=chunk-
|
|
590
|
+
//# sourceMappingURL=chunk-VS2M72PF.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RU2HHHYA.js";
|
|
4
4
|
import {
|
|
5
5
|
FONT_FAMILY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTCPNJND.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/export-container.ts
|
|
9
9
|
function runInExportContainer(width, height, fn) {
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
runInExportContainer,
|
|
38
38
|
extractExportSvg
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-VV6HZQ5K.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-WTTIODDV.js";
|
|
5
5
|
import {
|
|
6
6
|
buildPlacedNotes
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OWVDD5EC.js";
|
|
8
8
|
import {
|
|
9
9
|
noteCanvasShift
|
|
10
10
|
} from "./chunk-6EK55ART.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
measureText,
|
|
13
13
|
truncateText,
|
|
14
14
|
wrapTextToWidth
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MTGGOCND.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveNotes
|
|
18
18
|
} from "./chunk-7NK42OIB.js";
|
|
@@ -312,7 +312,7 @@ function computeNodeSize(node, reserveValueRow) {
|
|
|
312
312
|
return { width: w, height: Math.max(NODE_HEIGHT, totalHeight) };
|
|
313
313
|
}
|
|
314
314
|
async function layoutBoxesAndLines(parsed, collapseInfo, layoutOptions) {
|
|
315
|
-
const { layoutBoxesAndLinesSearch } = await import("./layout-search-
|
|
315
|
+
const { layoutBoxesAndLinesSearch } = await import("./layout-search-C44CJQOB.js");
|
|
316
316
|
const searchOpts = {
|
|
317
317
|
...layoutOptions?.hideDescriptions !== void 0 && {
|
|
318
318
|
hideDescriptions: layoutOptions.hideDescriptions
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
computeNodeSize,
|
|
469
469
|
layoutBoxesAndLines
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-WF2HDQPG.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
computeNodeSizing,
|
|
6
6
|
layoutPert
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GOW5VO6M.js";
|
|
8
8
|
import {
|
|
9
9
|
COLLAPSE_BAR_HEIGHT,
|
|
10
10
|
CONTAINER_HEADER_HEIGHT,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
CONTAINER_RADIUS,
|
|
13
13
|
EDGE_STROKE_WIDTH,
|
|
14
14
|
NODE_STROKE_WIDTH
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FJ57274M.js";
|
|
16
16
|
import {
|
|
17
17
|
ScaleContext
|
|
18
18
|
} from "./chunk-YYVTBZZC.js";
|
|
19
19
|
import {
|
|
20
20
|
INLINE_HEADER_PAD,
|
|
21
21
|
layoutInlineHeader
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J2EXBAPZ.js";
|
|
23
23
|
import {
|
|
24
24
|
serializeSvg
|
|
25
25
|
} from "./chunk-RU2HHHYA.js";
|
|
@@ -36,21 +36,21 @@ import {
|
|
|
36
36
|
} from "./chunk-A4GOY3PE.js";
|
|
37
37
|
import {
|
|
38
38
|
renderIntegratedLegend
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-2EPV7CLY.js";
|
|
40
40
|
import {
|
|
41
41
|
getLegendExtent
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FG24NXKN.js";
|
|
43
43
|
import {
|
|
44
44
|
FONT_FAMILY
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-UTCPNJND.js";
|
|
46
46
|
import {
|
|
47
47
|
LEGEND_HEIGHT
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-3HOCNSPD.js";
|
|
49
49
|
import {
|
|
50
50
|
measureText,
|
|
51
51
|
truncateText,
|
|
52
52
|
wrapTextToWidth
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-MTGGOCND.js";
|
|
54
54
|
import {
|
|
55
55
|
parsePert
|
|
56
56
|
} from "./chunk-VXBEG3IB.js";
|
|
@@ -1173,7 +1173,7 @@ function drawTextbookCard(g, a) {
|
|
|
1173
1173
|
const NAME_PIN_GAP = 4;
|
|
1174
1174
|
const pinReserve = a.pinned ? sPIW + NAME_PIN_GAP : 0;
|
|
1175
1175
|
const availTextW = Math.max(0, w - 2 * NAME_PAD_X - pinReserve);
|
|
1176
|
-
const displayName = truncateText(a.name, sNFS, availTextW);
|
|
1176
|
+
const displayName = truncateText(a.name, sNFS, availTextW, { bold: true });
|
|
1177
1177
|
const nameColor = a.midBandLabelColor ?? a.labelColor;
|
|
1178
1178
|
if (a.pinned) {
|
|
1179
1179
|
drawAnchorPin(g, x + NAME_PAD_X, midCenterY, nameColor, sPIW, sPIH);
|
|
@@ -1251,13 +1251,16 @@ function drawMilestonePill(g, a) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
const textCx = (textAreaLeft + textAreaRight) / 2;
|
|
1253
1253
|
const availW = textAreaRight - textAreaLeft;
|
|
1254
|
-
const lines = wrapTextToWidth(a.name, nameSize, availW, {
|
|
1254
|
+
const lines = wrapTextToWidth(a.name, nameSize, availW, {
|
|
1255
|
+
hardBreak: true,
|
|
1256
|
+
bold: true
|
|
1257
|
+
});
|
|
1255
1258
|
const maxLines = Math.max(1, Math.floor(midRowH / NAME_LINE_HEIGHT));
|
|
1256
1259
|
const visibleLines = lines.slice(0, maxLines);
|
|
1257
1260
|
if (lines.length > maxLines && visibleLines.length > 0) {
|
|
1258
1261
|
const last = visibleLines[visibleLines.length - 1];
|
|
1259
1262
|
const withEllipsis = `${last}\u2026`;
|
|
1260
|
-
visibleLines[visibleLines.length - 1] = measureText(withEllipsis, nameSize) <= availW ? withEllipsis : truncateText(last, nameSize, availW);
|
|
1263
|
+
visibleLines[visibleLines.length - 1] = measureText(withEllipsis, nameSize, { bold: true }) <= availW ? withEllipsis : truncateText(last, nameSize, availW, { bold: true });
|
|
1261
1264
|
}
|
|
1262
1265
|
const startCy = midCenterY - (visibleLines.length - 1) * NAME_LINE_HEIGHT / 2;
|
|
1263
1266
|
visibleLines.forEach((line2, i) => {
|
|
@@ -1529,7 +1532,7 @@ function renderTornadoBlock(svg, rows, args) {
|
|
|
1529
1532
|
const firstRowY = y + CAPTION_BOX_PADDING_Y + CAPTION_HEADER_BAND_HEIGHT;
|
|
1530
1533
|
rows.forEach((row, i) => {
|
|
1531
1534
|
const rowY = firstRowY + i * TORNADO_ROW_HEIGHT;
|
|
1532
|
-
const labelY = rowY + TORNADO_ROW_HEIGHT / 2
|
|
1535
|
+
const labelY = rowY + TORNADO_ROW_HEIGHT / 2;
|
|
1533
1536
|
const barColor = bandColor(row.band, palette, palette.primary);
|
|
1534
1537
|
const barFill = fillMode === "outline" ? shapeFill(palette, barColor, isDark, { mode: "outline" }) : shapeFill(palette, barColor, isDark);
|
|
1535
1538
|
const lowW = row.lowSwing * pixelsPerUnit;
|
|
@@ -1537,14 +1540,14 @@ function renderTornadoBlock(svg, rows, args) {
|
|
|
1537
1540
|
const rowG = block.append("g").attr("class", "pert-tornado-row").attr("data-activity-id", row.id).attr("data-tornado-swing", String(row.lowSwing + row.highSwing));
|
|
1538
1541
|
rowG.append("rect").attr("class", "pert-tornado-row-hit").attr("x", nameX).attr("y", rowY).attr("width", plotRight - nameX).attr("height", TORNADO_ROW_HEIGHT).attr("fill", "transparent").attr("pointer-events", "all");
|
|
1539
1542
|
const truncated = row.name.length > 22 ? row.name.slice(0, 21) + "\u2026" : row.name;
|
|
1540
|
-
rowG.append("text").attr("class", "pert-tornado-name").attr("x", nameX).attr("y", labelY).attr("text-anchor", "start").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(truncated);
|
|
1543
|
+
rowG.append("text").attr("class", "pert-tornado-name").attr("x", nameX).attr("y", labelY).attr("dominant-baseline", "central").attr("text-anchor", "start").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(truncated);
|
|
1541
1544
|
if (lowW > 0) {
|
|
1542
1545
|
rowG.append("rect").attr("class", "pert-tornado-bar pert-tornado-bar-low").attr("x", centerX - lowW).attr("y", rowY + (TORNADO_ROW_HEIGHT - TORNADO_BAR_HEIGHT) / 2).attr("width", lowW).attr("height", TORNADO_BAR_HEIGHT).attr("rx", 2).attr("ry", 2).attr("fill", barFill).attr("stroke", barColor).attr("stroke-width", 1);
|
|
1543
|
-
rowG.append("text").attr("class", "pert-tornado-value pert-tornado-value-low").attr("x", centerX - lowW - VALUE_GAP).attr("y", labelY).attr("text-anchor", "end").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(`\u2212${fmt(row.lowSwing)}`);
|
|
1546
|
+
rowG.append("text").attr("class", "pert-tornado-value pert-tornado-value-low").attr("x", centerX - lowW - VALUE_GAP).attr("y", labelY).attr("dominant-baseline", "central").attr("text-anchor", "end").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(`\u2212${fmt(row.lowSwing)}`);
|
|
1544
1547
|
}
|
|
1545
1548
|
if (highW > 0) {
|
|
1546
1549
|
rowG.append("rect").attr("class", "pert-tornado-bar pert-tornado-bar-high").attr("x", centerX).attr("y", rowY + (TORNADO_ROW_HEIGHT - TORNADO_BAR_HEIGHT) / 2).attr("width", highW).attr("height", TORNADO_BAR_HEIGHT).attr("rx", 2).attr("ry", 2).attr("fill", barFill).attr("stroke", barColor).attr("stroke-width", 1);
|
|
1547
|
-
rowG.append("text").attr("class", "pert-tornado-value pert-tornado-value-high").attr("x", centerX + highW + VALUE_GAP).attr("y", labelY).attr("text-anchor", "start").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(`+${fmt(row.highSwing)}`);
|
|
1550
|
+
rowG.append("text").attr("class", "pert-tornado-value pert-tornado-value-high").attr("x", centerX + highW + VALUE_GAP).attr("y", labelY).attr("dominant-baseline", "central").attr("text-anchor", "start").attr("fill", labelColor).attr("font-size", TORNADO_BAR_FONT_SIZE).text(`+${fmt(row.highSwing)}`);
|
|
1548
1551
|
}
|
|
1549
1552
|
});
|
|
1550
1553
|
if (rows.length > 0) {
|
|
@@ -1868,4 +1871,4 @@ export {
|
|
|
1868
1871
|
measurePertAnalysisBlock,
|
|
1869
1872
|
renderPertAnalysisBlock
|
|
1870
1873
|
};
|
|
1871
|
-
//# sourceMappingURL=chunk-
|
|
1874
|
+
//# sourceMappingURL=chunk-XKMCL2YJ.js.map
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
} from "./chunk-A4GOY3PE.js";
|
|
15
15
|
import {
|
|
16
16
|
FONT_FAMILY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UTCPNJND.js";
|
|
18
18
|
import {
|
|
19
19
|
CHAR_WIDTH_RATIO,
|
|
20
20
|
measureText
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MTGGOCND.js";
|
|
22
22
|
import {
|
|
23
23
|
fillModeFromOptions
|
|
24
24
|
} from "./chunk-P2PUWV3Y.js";
|
|
@@ -142,7 +142,7 @@ function renderPyramid(container, parsed, palette, isDark, onClickItem, exportDi
|
|
|
142
142
|
palette.textOnFillLight,
|
|
143
143
|
palette.textOnFillDark
|
|
144
144
|
);
|
|
145
|
-
const labelFitsInside = Math.min(topHalf, botHalf) * 2 > measureText(layer.label, layout.labelFont);
|
|
145
|
+
const labelFitsInside = Math.min(topHalf, botHalf) * 2 > measureText(layer.label, layout.labelFont, { bold: true });
|
|
146
146
|
const haloColor = textColor === palette.textOnFillLight ? palette.textOnFillDark : palette.textOnFillLight;
|
|
147
147
|
const labelText = layerG.append("text").attr("x", layout.pyramidCx).attr("y", midY).attr("dy", "0.35em").attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", layout.labelFont).attr("font-weight", 600);
|
|
148
148
|
if (!labelFitsInside) {
|
|
@@ -428,4 +428,4 @@ export {
|
|
|
428
428
|
renderPyramid,
|
|
429
429
|
renderPyramidForExport
|
|
430
430
|
};
|
|
431
|
-
//# sourceMappingURL=chunk-
|
|
431
|
+
//# sourceMappingURL=chunk-XVEPB2UU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderNodeCard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5GM6BZO7.js";
|
|
4
4
|
import {
|
|
5
5
|
renderInlineText
|
|
6
6
|
} from "./chunk-WGC42WJU.js";
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
META_LINE_HEIGHT,
|
|
20
20
|
NODE_STROKE_WIDTH,
|
|
21
21
|
SEPARATOR_GAP
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FJ57274M.js";
|
|
23
23
|
import {
|
|
24
24
|
ScaleContext
|
|
25
25
|
} from "./chunk-YYVTBZZC.js";
|
|
26
26
|
import {
|
|
27
27
|
layoutInlineHeader
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-J2EXBAPZ.js";
|
|
29
29
|
import {
|
|
30
30
|
serializeSvg
|
|
31
31
|
} from "./chunk-RU2HHHYA.js";
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
} from "./chunk-A4GOY3PE.js";
|
|
36
36
|
import {
|
|
37
37
|
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2EPV7CLY.js";
|
|
39
39
|
import {
|
|
40
40
|
getLegendExtent,
|
|
41
41
|
getMaxLegendReservedHeight
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FG24NXKN.js";
|
|
43
43
|
import {
|
|
44
44
|
FONT_FAMILY
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-UTCPNJND.js";
|
|
46
46
|
import {
|
|
47
47
|
EYE_CLOSED_PATH,
|
|
48
48
|
EYE_OPEN_PATH,
|
|
@@ -50,10 +50,10 @@ import {
|
|
|
50
50
|
LEGEND_EYE_SIZE,
|
|
51
51
|
LEGEND_GROUP_GAP,
|
|
52
52
|
LEGEND_HEIGHT
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-3HOCNSPD.js";
|
|
54
54
|
import {
|
|
55
55
|
measureText
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-MTGGOCND.js";
|
|
57
57
|
import {
|
|
58
58
|
preprocessDescriptionLine
|
|
59
59
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -241,7 +241,7 @@ function renderSitemap(container, parsed, layout, palette, isDark, onClickItem,
|
|
|
241
241
|
const fill = containerFill(palette, isDark, c.color);
|
|
242
242
|
const stroke = containerStroke(palette, c.color);
|
|
243
243
|
cG.append("rect").attr("x", 0).attr("y", 0).attr("width", c.width).attr("height", c.height).attr("rx", CONTAINER_RADIUS).attr("fill", fill).attr("stroke", stroke).attr("stroke-opacity", 0.35).attr("stroke-width", sNodeStrokeWidth);
|
|
244
|
-
cG.append("text").attr("x", c.width / 2).attr("y", sContainerHeaderHeight / 2
|
|
244
|
+
cG.append("text").attr("x", c.width / 2).attr("y", sContainerHeaderHeight / 2).attr("dominant-baseline", "central").attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", sContainerLabelFontSize).attr("font-weight", "bold").text(c.label);
|
|
245
245
|
const metaEntries = Object.entries(c.metadata);
|
|
246
246
|
if (metaEntries.length > 0) {
|
|
247
247
|
const metaDisplayKeys = metaEntries.map(
|
|
@@ -450,7 +450,7 @@ function renderLegend(parent, legendGroups, palette, isDark, activeTagGroup, fix
|
|
|
450
450
|
}
|
|
451
451
|
async function renderSitemapForExport(content, theme, palette) {
|
|
452
452
|
const { parseSitemap } = await import("./parser-3KFNCRLD.js");
|
|
453
|
-
const { layoutSitemap } = await import("./layout-
|
|
453
|
+
const { layoutSitemap } = await import("./layout-SBQTN2YM.js");
|
|
454
454
|
const { getPalette } = await import("./palettes-WO3VA6NU.js");
|
|
455
455
|
const isDark = theme === "dark";
|
|
456
456
|
const effectivePalette = palette ?? (isDark ? getPalette("nord").dark : getPalette("nord").light);
|
|
@@ -500,4 +500,4 @@ export {
|
|
|
500
500
|
renderSitemap,
|
|
501
501
|
renderSitemapForExport
|
|
502
502
|
};
|
|
503
|
-
//# sourceMappingURL=chunk-
|
|
503
|
+
//# sourceMappingURL=chunk-YGFNITPC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NODE_STROKE_WIDTH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FJ57274M.js";
|
|
4
4
|
import {
|
|
5
5
|
ScaleContext
|
|
6
6
|
} from "./chunk-YYVTBZZC.js";
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
} from "./chunk-A4GOY3PE.js";
|
|
12
12
|
import {
|
|
13
13
|
FONT_FAMILY
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UTCPNJND.js";
|
|
15
15
|
import {
|
|
16
16
|
measureText,
|
|
17
17
|
truncateText,
|
|
18
18
|
wrapTextToWidth
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MTGGOCND.js";
|
|
20
20
|
import {
|
|
21
21
|
allTasks
|
|
22
22
|
} from "./chunk-RF5YDIYT.js";
|
|
@@ -279,7 +279,10 @@ function renderRaci(container, parsed, palette, isDark, handlers, exportDims) {
|
|
|
279
279
|
const numChips = legendMarkers.length;
|
|
280
280
|
const chipGapTotal = sLegendChipGap * Math.max(0, numChips - 1);
|
|
281
281
|
const longestLabelPx = legendMarkers.reduce(
|
|
282
|
-
(n, m) => Math.max(
|
|
282
|
+
(n, m) => Math.max(
|
|
283
|
+
n,
|
|
284
|
+
measureText(variantLabels[m] ?? "", sLegendLabelFont, { bold: true })
|
|
285
|
+
),
|
|
283
286
|
0
|
|
284
287
|
);
|
|
285
288
|
const fullChipW = Math.max(
|
|
@@ -373,7 +376,8 @@ function renderRaci(container, parsed, palette, isDark, handlers, exportDims) {
|
|
|
373
376
|
truncateText(
|
|
374
377
|
parsed.roleDisplayNames[i] ?? "",
|
|
375
378
|
sRoleHeaderFont,
|
|
376
|
-
roleColW - 2 * sCellPad
|
|
379
|
+
roleColW - 2 * sCellPad,
|
|
380
|
+
{ bold: true }
|
|
377
381
|
)
|
|
378
382
|
);
|
|
379
383
|
});
|
|
@@ -560,7 +564,8 @@ function renderLegend(svg, markers, variant, x, y, mode, chipW, palette, surface
|
|
|
560
564
|
truncateText(
|
|
561
565
|
labelText,
|
|
562
566
|
sLegendLabelFont,
|
|
563
|
-
chipW - slabW - slabPad * 2 - 12
|
|
567
|
+
chipW - slabW - slabPad * 2 - 12,
|
|
568
|
+
{ bold: true }
|
|
564
569
|
)
|
|
565
570
|
);
|
|
566
571
|
});
|
|
@@ -585,7 +590,9 @@ function renderPhaseBar(svg, phase, x, y, width, palette, collapsed, autoColor,
|
|
|
585
590
|
if (collapsed) {
|
|
586
591
|
const taskCount = phase.tasks.length;
|
|
587
592
|
if (taskCount > 0) {
|
|
588
|
-
const labelTextWidth = measureText(phase.displayName, sPhaseFont
|
|
593
|
+
const labelTextWidth = measureText(phase.displayName, sPhaseFont, {
|
|
594
|
+
bold: true
|
|
595
|
+
});
|
|
589
596
|
phaseG.append("text").attr("x", x + 26 + labelTextWidth + 10).attr("y", y + (sPhaseHeight - 4) / 2 + 2).attr("dominant-baseline", "central").attr("font-size", sPhaseFont - 1).attr("font-weight", 500).attr("fill", palette.textMuted).text(`${taskCount} ${taskCount === 1 ? "task" : "tasks"}`);
|
|
590
597
|
}
|
|
591
598
|
if (!showSummary) return;
|
|
@@ -664,8 +671,7 @@ function renderTaskRow(svg, task, parsed, x, y, labelW, roleX, roleColW, palette
|
|
|
664
671
|
const lineG = labelG.append("g").attr("class", "raci-violation-line").attr("data-severity", v.severity).style("cursor", onClickLine ? "pointer" : "default");
|
|
665
672
|
const violationFont = sLabelFont - 2;
|
|
666
673
|
const textEl = lineG.append("text").attr("x", labelX).attr("y", stackY).attr("dominant-baseline", "central").attr("font-size", violationFont).attr("fill", lineColor);
|
|
667
|
-
v.lines.forEach((
|
|
668
|
-
const segs = parseQuotedSegments(line);
|
|
674
|
+
v.lines.forEach((segs, i) => {
|
|
669
675
|
segs.forEach((seg, segIdx) => {
|
|
670
676
|
const tspan = textEl.append("tspan").text(seg.text);
|
|
671
677
|
if (i > 0 && segIdx === 0)
|
|
@@ -712,7 +718,7 @@ function renderTaskRow(svg, task, parsed, x, y, labelW, roleX, roleColW, palette
|
|
|
712
718
|
const sliceG = cellG.append("g").attr("class", "raci-marker-slice").attr("data-marker", m).style("cursor", "grab");
|
|
713
719
|
sliceG.append("rect").attr("x", sliceX).attr("y", cy).attr("width", sliceW).attr("height", ch).attr("rx", sNodeRadius).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sNodeStrokeWidth);
|
|
714
720
|
const fullLabel = variantLabels[m] ?? m;
|
|
715
|
-
const labelPx = measureText(fullLabel, sLegendLabelFont);
|
|
721
|
+
const labelPx = measureText(fullLabel, sLegendLabelFont, { bold: true });
|
|
716
722
|
const showFullLabel = labelPx + 16 <= sliceW;
|
|
717
723
|
const textContent = showFullLabel ? fullLabel : m;
|
|
718
724
|
const textFont = showFullLabel ? sLegendLabelFont : sMarkerFont;
|
|
@@ -750,9 +756,7 @@ function prepareRowContent(task, bucket, labelMaxW, sLabelFont = LABEL_FONT, sDe
|
|
|
750
756
|
severity,
|
|
751
757
|
sourceLine: e.line,
|
|
752
758
|
text,
|
|
753
|
-
lines:
|
|
754
|
-
hardBreak: true
|
|
755
|
-
})
|
|
759
|
+
lines: wrapQuotedMessage(text, sLabelFont - 2, labelMaxW)
|
|
756
760
|
});
|
|
757
761
|
}
|
|
758
762
|
};
|
|
@@ -768,6 +772,72 @@ function prepareRowContent(task, bucket, labelMaxW, sLabelFont = LABEL_FONT, sDe
|
|
|
768
772
|
const rowHeight = sRowHeight + labelExtra + (hasStacked ? sStackTopGap : 0) + descLines.length * DESC_LINE_HEIGHT + totalViolationLines * sViolationLineHeight;
|
|
769
773
|
return { nameLines, descLines, violations, rowHeight };
|
|
770
774
|
}
|
|
775
|
+
function wrapQuotedMessage(message, fontSize, maxWidth) {
|
|
776
|
+
const tokens = [];
|
|
777
|
+
for (const seg of parseQuotedSegments(message)) {
|
|
778
|
+
for (const part of seg.text.split(/(\s+)/)) {
|
|
779
|
+
if (part === "") continue;
|
|
780
|
+
tokens.push({ text: part, bold: seg.bold, space: /^\s/.test(part) });
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
const runW = (r) => measureText(r.text, fontSize, { bold: r.bold });
|
|
784
|
+
const merge = (runs) => {
|
|
785
|
+
const out = [];
|
|
786
|
+
for (const r of runs) {
|
|
787
|
+
const prev = out[out.length - 1];
|
|
788
|
+
if (prev?.bold === r.bold) prev.text += r.text;
|
|
789
|
+
else out.push({ ...r });
|
|
790
|
+
}
|
|
791
|
+
return out;
|
|
792
|
+
};
|
|
793
|
+
const lines = [];
|
|
794
|
+
let line = [];
|
|
795
|
+
let lineW = 0;
|
|
796
|
+
const flush = () => {
|
|
797
|
+
if (line.length > 0) lines.push(merge(line));
|
|
798
|
+
line = [];
|
|
799
|
+
lineW = 0;
|
|
800
|
+
};
|
|
801
|
+
let pendingGap = null;
|
|
802
|
+
let i = 0;
|
|
803
|
+
while (i < tokens.length) {
|
|
804
|
+
const tok = tokens[i];
|
|
805
|
+
if (tok.space) {
|
|
806
|
+
pendingGap = { text: " ", bold: tok.bold };
|
|
807
|
+
i++;
|
|
808
|
+
continue;
|
|
809
|
+
}
|
|
810
|
+
const word = [];
|
|
811
|
+
while (i < tokens.length && !tokens[i].space) {
|
|
812
|
+
const t = tokens[i];
|
|
813
|
+
word.push({ text: t.text, bold: t.bold });
|
|
814
|
+
i++;
|
|
815
|
+
}
|
|
816
|
+
const wordW = word.reduce((n, r) => n + runW(r), 0);
|
|
817
|
+
const gapW = line.length > 0 && pendingGap ? runW(pendingGap) : 0;
|
|
818
|
+
if (line.length > 0 && lineW + gapW + wordW > maxWidth) flush();
|
|
819
|
+
if (line.length > 0 && pendingGap) {
|
|
820
|
+
line.push(pendingGap);
|
|
821
|
+
lineW += gapW;
|
|
822
|
+
}
|
|
823
|
+
pendingGap = null;
|
|
824
|
+
if (line.length === 0 && wordW > maxWidth) {
|
|
825
|
+
for (const r of word) {
|
|
826
|
+
for (const ch of r.text) {
|
|
827
|
+
const chW = measureText(ch, fontSize, { bold: r.bold });
|
|
828
|
+
if (line.length > 0 && lineW + chW > maxWidth) flush();
|
|
829
|
+
line.push({ text: ch, bold: r.bold });
|
|
830
|
+
lineW += chW;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
continue;
|
|
834
|
+
}
|
|
835
|
+
line.push(...word);
|
|
836
|
+
lineW += wordW;
|
|
837
|
+
}
|
|
838
|
+
flush();
|
|
839
|
+
return lines.length > 0 ? lines : [[{ text: "", bold: false }]];
|
|
840
|
+
}
|
|
771
841
|
function parseQuotedSegments(message) {
|
|
772
842
|
const out = [];
|
|
773
843
|
const re = /'([^']+)'/g;
|
|
@@ -789,4 +859,4 @@ export {
|
|
|
789
859
|
renderRaci,
|
|
790
860
|
renderRaciForExport
|
|
791
861
|
};
|
|
792
|
-
//# sourceMappingURL=chunk-
|
|
862
|
+
//# sourceMappingURL=chunk-YJOOIOSR.js.map
|