@diagrammo/dgmo 0.64.0 → 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.js +71 -71
- package/dist/block.js +15 -15
- 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/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
- 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.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/{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/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
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderCollapseBar,
|
|
3
3
|
renderNodeCard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5GM6BZO7.js";
|
|
5
5
|
import {
|
|
6
6
|
CARD_RADIUS,
|
|
7
7
|
CONTAINER_RADIUS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FJ57274M.js";
|
|
9
9
|
import {
|
|
10
10
|
layoutInlineHeader
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-J2EXBAPZ.js";
|
|
12
12
|
import {
|
|
13
13
|
renderIntegratedLegend
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2EPV7CLY.js";
|
|
15
15
|
import {
|
|
16
16
|
getLegendExtent,
|
|
17
17
|
getMaxLegendReservedHeight
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FG24NXKN.js";
|
|
19
19
|
import {
|
|
20
20
|
FONT_FAMILY
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UTCPNJND.js";
|
|
22
22
|
import {
|
|
23
23
|
measureText,
|
|
24
24
|
wrapTextToWidth
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MTGGOCND.js";
|
|
26
26
|
import {
|
|
27
27
|
resolveActiveTagGroup,
|
|
28
28
|
resolveTagColor,
|
|
@@ -39,14 +39,12 @@ import {
|
|
|
39
39
|
import * as d3 from "d3-selection";
|
|
40
40
|
|
|
41
41
|
// src/sketch/markdown-card.ts
|
|
42
|
-
var BOLD_WIDTH_FACTOR = 1.06;
|
|
43
42
|
var INDENT_PX = 12;
|
|
44
43
|
var BULLET_HANG_PX = 12;
|
|
45
44
|
var ELLIPSIS = "\u2026";
|
|
46
45
|
var BULLET = "\u2022";
|
|
47
46
|
function segWidth(seg, fontSize) {
|
|
48
|
-
|
|
49
|
-
return seg.bold ? w * BOLD_WIDTH_FACTOR : w;
|
|
47
|
+
return measureText(seg.text, fontSize, { bold: seg.bold });
|
|
50
48
|
}
|
|
51
49
|
function parseInline(text) {
|
|
52
50
|
const segments = [];
|
|
@@ -287,15 +285,16 @@ var CARD_LABEL_MIN = 11;
|
|
|
287
285
|
var CARD_META_FONT = 12;
|
|
288
286
|
var CARD_TITLE_MAX = 30;
|
|
289
287
|
function fitWrapped(label, maxWidth, maxFont = CARD_LABEL_MAX, minFont = CARD_LABEL_MIN, maxLines = 2) {
|
|
288
|
+
const BOLD = { hardBreak: true, bold: true };
|
|
290
289
|
for (let fs = maxFont; fs >= minFont; fs--) {
|
|
291
|
-
const lines2 = wrapTextToWidth(label, fs, maxWidth,
|
|
290
|
+
const lines2 = wrapTextToWidth(label, fs, maxWidth, BOLD);
|
|
292
291
|
if (lines2.length <= maxLines) return { lines: lines2, fontSize: fs };
|
|
293
292
|
}
|
|
294
|
-
const lines = wrapTextToWidth(label, minFont, maxWidth,
|
|
293
|
+
const lines = wrapTextToWidth(label, minFont, maxWidth, BOLD);
|
|
295
294
|
if (lines.length <= maxLines) return { lines, fontSize: minFont };
|
|
296
295
|
const kept = lines.slice(0, maxLines);
|
|
297
296
|
let last = kept[maxLines - 1];
|
|
298
|
-
while (last.length > 1 && measureText(`${last}\u2026`, minFont) > maxWidth)
|
|
297
|
+
while (last.length > 1 && measureText(`${last}\u2026`, minFont, { bold: true }) > maxWidth)
|
|
299
298
|
last = last.slice(0, -1);
|
|
300
299
|
kept[maxLines - 1] = `${last}\u2026`;
|
|
301
300
|
return { lines: kept, fontSize: minFont };
|
|
@@ -1128,4 +1127,4 @@ export {
|
|
|
1128
1127
|
sketchEdgeGeometry,
|
|
1129
1128
|
renderSketchForExport
|
|
1130
1129
|
};
|
|
1131
|
-
//# sourceMappingURL=chunk-
|
|
1130
|
+
//# sourceMappingURL=chunk-YKWHUPBP.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
layoutJourneyMap,
|
|
4
4
|
scoreToColor,
|
|
5
5
|
scoreToCurveY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D2WHS23S.js";
|
|
7
7
|
import {
|
|
8
8
|
wrapNoteBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MU3CJPJF.js";
|
|
10
10
|
import {
|
|
11
11
|
NOTE_BULLET_INDENT
|
|
12
12
|
} from "./chunk-5DH3KYFH.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-WGC42WJU.js";
|
|
16
16
|
import {
|
|
17
17
|
CARD_RADIUS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FJ57274M.js";
|
|
19
19
|
import {
|
|
20
20
|
ScaleContext
|
|
21
21
|
} from "./chunk-YYVTBZZC.js";
|
|
@@ -24,15 +24,15 @@ import {
|
|
|
24
24
|
} from "./chunk-RU2HHHYA.js";
|
|
25
25
|
import {
|
|
26
26
|
renderIntegratedLegend
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2EPV7CLY.js";
|
|
28
28
|
import {
|
|
29
29
|
FONT_FAMILY
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UTCPNJND.js";
|
|
31
31
|
import {
|
|
32
32
|
measureText,
|
|
33
33
|
truncateText,
|
|
34
34
|
wrapTextToWidth
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MTGGOCND.js";
|
|
36
36
|
import {
|
|
37
37
|
parseJourneyMap
|
|
38
38
|
} from "./chunk-NSJK7F2V.js";
|
|
@@ -65,6 +65,7 @@ var COLUMN_RADIUS = 8;
|
|
|
65
65
|
var COLUMN_HEADER_HEIGHT = 36;
|
|
66
66
|
var COLUMN_PADDING = 12;
|
|
67
67
|
var FONT_SIZE_TITLE = 18;
|
|
68
|
+
var PERSONA_PANEL_WIDTH = 280;
|
|
68
69
|
var FONT_SIZE_PHASE = 13;
|
|
69
70
|
var FONT_SIZE_STEP = 12;
|
|
70
71
|
var FONT_SIZE_META = 10;
|
|
@@ -115,7 +116,16 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
115
116
|
if (parsed.titleLineNumber) {
|
|
116
117
|
titleG.attr("data-line-number", parsed.titleLineNumber);
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
+
const personaPanelX = parsed.persona ? layout.totalWidth - PADDING - PERSONA_PANEL_WIDTH : layout.totalWidth;
|
|
120
|
+
const titleMaxW = Math.max(
|
|
121
|
+
0,
|
|
122
|
+
Math.min(personaPanelX - PADDING, layout.totalWidth - PADDING) - PADDING
|
|
123
|
+
);
|
|
124
|
+
titleG.append("text").attr("x", PADDING).attr("y", PADDING + FONT_SIZE_TITLE).attr("font-size", FONT_SIZE_TITLE).attr("font-weight", "bold").attr("fill", palette.text).text(
|
|
125
|
+
truncateText(parsed.title, FONT_SIZE_TITLE, titleMaxW, {
|
|
126
|
+
bold: true
|
|
127
|
+
})
|
|
128
|
+
);
|
|
119
129
|
if (onNavigateToLine && parsed.titleLineNumber) {
|
|
120
130
|
titleG.style("cursor", "pointer").on("click", () => {
|
|
121
131
|
onNavigateToLine(parsed.titleLineNumber);
|
|
@@ -127,7 +137,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
127
137
|
const personaG = svg.append("g").attr("class", "journey-persona").attr("data-line-number", parsed.persona.lineNumber);
|
|
128
138
|
const titleRowH = CARD_HEADER_HEIGHT;
|
|
129
139
|
const silhouetteZone = 60;
|
|
130
|
-
const panelWidth =
|
|
140
|
+
const panelWidth = PERSONA_PANEL_WIDTH;
|
|
131
141
|
const textAreaWidth = panelWidth - silhouetteZone - CARD_PADDING_X;
|
|
132
142
|
const descLineH = 14;
|
|
133
143
|
const descLines = parsed.persona.description ? wrapNoteBody(parsed.persona.description, textAreaWidth, FONT_SIZE_META) : [];
|
|
@@ -164,7 +174,9 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
164
174
|
fillMode
|
|
165
175
|
);
|
|
166
176
|
personaG.append("rect").attr("x", panelX).attr("y", panelY).attr("width", panelWidth).attr("height", panelHeight).attr("rx", CARD_RADIUS).attr("fill", "none").attr("stroke", personaColor).attr("stroke-width", CARD_STROKE_WIDTH);
|
|
167
|
-
personaG.append("text").attr("x", textX).attr("y", panelY + CARD_PADDING_Y + FONT_SIZE_STEP).attr("font-size", FONT_SIZE_STEP).attr("font-weight", "500").attr("fill", onPersonaText).text(
|
|
177
|
+
personaG.append("text").attr("x", textX).attr("y", panelY + CARD_PADDING_Y + FONT_SIZE_STEP).attr("font-size", FONT_SIZE_STEP).attr("font-weight", "500").attr("fill", onPersonaText).text(
|
|
178
|
+
truncateText(parsed.persona.name, FONT_SIZE_STEP, textAreaWidth)
|
|
179
|
+
);
|
|
168
180
|
for (let li = 0; li < descLines.length; li++) {
|
|
169
181
|
const line2 = descLines[li];
|
|
170
182
|
const indent = line2.kind === "plain" ? 0 : NOTE_BULLET_INDENT;
|
|
@@ -372,11 +384,11 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
372
384
|
palette.textOnFillLight,
|
|
373
385
|
palette.textOnFillDark
|
|
374
386
|
);
|
|
375
|
-
phaseG.append("text").attr("x", pl.x + COLUMN_PADDING).attr("y", pl.y + COLUMN_HEADER_HEIGHT / 2
|
|
376
|
-
isCollapsed ?
|
|
387
|
+
phaseG.append("text").attr("x", pl.x + COLUMN_PADDING).attr("y", pl.y + COLUMN_HEADER_HEIGHT / 2).attr("dominant-baseline", "central").attr("font-size", FONT_SIZE_PHASE).attr("font-weight", "bold").attr("fill", onHeaderText).text(
|
|
388
|
+
isCollapsed ? truncateText(
|
|
377
389
|
pl.phase.name,
|
|
378
|
-
|
|
379
|
-
|
|
390
|
+
FONT_SIZE_PHASE,
|
|
391
|
+
pl.width - COLUMN_PADDING * 2
|
|
380
392
|
) : pl.phase.name
|
|
381
393
|
);
|
|
382
394
|
if (onPhaseToggle) {
|
|
@@ -445,7 +457,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
445
457
|
}
|
|
446
458
|
const textX = listX + CARD_PADDING_X + COLLAPSED_FACE_R * 2 + 6;
|
|
447
459
|
const maxTextW = cardW - CARD_PADDING_X * 2 - COLLAPSED_FACE_R * 2 - 6;
|
|
448
|
-
itemG.append("text").attr("x", textX).attr("y", itemY + COLLAPSED_CARD_H / 2
|
|
460
|
+
itemG.append("text").attr("x", textX).attr("y", itemY + COLLAPSED_CARD_H / 2).attr("dominant-baseline", "central").attr("font-size", FONT_SIZE_META).attr("fill", palette.text).text(truncateText(step.title, FONT_SIZE_META, maxTextW));
|
|
449
461
|
if (onNavigateToLine) {
|
|
450
462
|
itemG.style("cursor", "pointer").on("click", (event) => {
|
|
451
463
|
event.stopPropagation();
|
|
@@ -540,7 +552,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
540
552
|
const fcx = parseFloat(faceEl.attr("data-cx") ?? "0");
|
|
541
553
|
const fcy = parseFloat(faceEl.attr("data-cy") ?? "0");
|
|
542
554
|
const score = parseInt(faceEl.attr("data-score") ?? "3", 10);
|
|
543
|
-
const lines =
|
|
555
|
+
const lines = wrapTextToWidth(thoughtText, THOUGHT_FONT, THOUGHT_MAX_W);
|
|
544
556
|
const textW = Math.min(
|
|
545
557
|
THOUGHT_MAX_W,
|
|
546
558
|
Math.max(...lines.map((l) => measureText(l, THOUGHT_FONT)))
|
|
@@ -690,10 +702,10 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
690
702
|
}
|
|
691
703
|
let metaY = cy + titleBlockH + CARD_META_LINE_HEIGHT;
|
|
692
704
|
if (sl.step.description) {
|
|
693
|
-
const descLines =
|
|
705
|
+
const descLines = wrapTextToWidth(
|
|
694
706
|
sl.step.description,
|
|
695
|
-
|
|
696
|
-
|
|
707
|
+
FONT_SIZE_META,
|
|
708
|
+
sl.width - CARD_PADDING_X * 2
|
|
697
709
|
);
|
|
698
710
|
for (const line2 of descLines) {
|
|
699
711
|
stepG.append("text").attr("x", cx + CARD_PADDING_X).attr("y", metaY).attr("font-size", FONT_SIZE_META).attr("fill", onCardText).text(line2);
|
|
@@ -707,7 +719,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
707
719
|
for (const anno of cardAnnotations) {
|
|
708
720
|
const annoColor = annotationColor(anno.type, palette);
|
|
709
721
|
const iconPaths = annotationIconPaths(anno.type);
|
|
710
|
-
const annoLines =
|
|
722
|
+
const annoLines = wrapTextToWidth(anno.text, FONT_SIZE_META, annoTextW);
|
|
711
723
|
const iconColor = fillMode === "solid" ? onCardText : annoColor;
|
|
712
724
|
renderAnnotationIcon(
|
|
713
725
|
stepG,
|
|
@@ -741,7 +753,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
741
753
|
palette.textOnFillLight,
|
|
742
754
|
palette.textOnFillDark
|
|
743
755
|
);
|
|
744
|
-
stepG.append("text").attr("x", cx + sl.width / 2).attr("y", stripY + TAG_STRIP_HEIGHT / 2
|
|
756
|
+
stepG.append("text").attr("x", cx + sl.width / 2).attr("y", stripY + TAG_STRIP_HEIGHT / 2).attr("dominant-baseline", "central").attr("text-anchor", "middle").attr("font-size", FONT_SIZE_META).attr("fill", stripTextColor).text(value);
|
|
745
757
|
}
|
|
746
758
|
if (onNavigateToLine) {
|
|
747
759
|
stepG.style("cursor", "pointer").on("click", (event) => {
|
|
@@ -791,20 +803,14 @@ var EMOTION_LABEL_MAX_WIDTH = 180;
|
|
|
791
803
|
var EMOTION_LABEL_FONT_SIZE = FONT_SIZE_META;
|
|
792
804
|
function addEmotionLabel(faceG, pt, palette) {
|
|
793
805
|
if (!pt.emotionLabel) return;
|
|
794
|
-
const text =
|
|
806
|
+
const text = truncateText(
|
|
795
807
|
pt.emotionLabel,
|
|
796
|
-
|
|
797
|
-
|
|
808
|
+
EMOTION_LABEL_FONT_SIZE,
|
|
809
|
+
EMOTION_LABEL_MAX_WIDTH
|
|
798
810
|
);
|
|
799
811
|
const y = pt.y + FACE_RADIUS + 5 + EMOTION_LABEL_FONT_SIZE;
|
|
800
812
|
faceG.append("text").attr("class", "journey-emotion-label").attr("x", pt.x).attr("y", y).attr("text-anchor", "middle").attr("font-family", FONT_FAMILY).attr("font-size", EMOTION_LABEL_FONT_SIZE).attr("font-weight", 500).attr("fill", palette.text).attr("stroke", palette.bg).attr("stroke-width", 3).attr("stroke-linejoin", "round").attr("stroke-opacity", 0.8).attr("paint-order", "stroke").attr("pointer-events", "none").text(text);
|
|
801
813
|
}
|
|
802
|
-
function wrapText(text, maxWidth, fontSize) {
|
|
803
|
-
return wrapTextToWidth(text, fontSize, maxWidth);
|
|
804
|
-
}
|
|
805
|
-
function truncateText2(text, maxWidth, fontSize) {
|
|
806
|
-
return truncateText(text, fontSize, maxWidth);
|
|
807
|
-
}
|
|
808
814
|
function annotationColor(type, palette) {
|
|
809
815
|
switch (type) {
|
|
810
816
|
case "pain":
|
|
@@ -871,4 +877,4 @@ export {
|
|
|
871
877
|
renderJourneyMap,
|
|
872
878
|
renderJourneyMapForExport
|
|
873
879
|
};
|
|
874
|
-
//# sourceMappingURL=chunk-
|
|
880
|
+
//# sourceMappingURL=chunk-YMYPFX4O.js.map
|