@diagrammo/dgmo 0.51.0 → 0.52.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/.cursorrules +15 -19
- package/.github/copilot-instructions.md +15 -19
- package/.windsurfrules +15 -19
- package/SKILL.md +15 -19
- package/dist/advanced.d.ts +70 -42
- package/dist/advanced.js +115 -119
- package/dist/auto.js +125 -123
- package/dist/auto.mjs +952 -492
- package/dist/block.js +89 -52
- package/dist/{charts-d3-7E4B4IMW.js → charts-d3-MXEP6BNP.js} +7 -7
- package/dist/{chunk-CC4YRBWV.js → chunk-3HF5YEFJ.js} +17 -7
- package/dist/{chunk-5X6YQA2J.js → chunk-3HGU63UY.js} +12 -11
- package/dist/{chunk-4XFBQT5O.js → chunk-3LK5DNED.js} +2 -2
- package/dist/{chunk-IEDMFNU7.js → chunk-3QD7VP3U.js} +9 -4
- package/dist/{chunk-JJXGQIRV.js → chunk-3YRPZ7ZZ.js} +2 -2
- package/dist/{chunk-OJTXTQA2.js → chunk-44VCIPHF.js} +21 -17
- package/dist/{chunk-RAHVMKBG.js → chunk-4AQRFDXL.js} +2 -2
- package/dist/{chunk-6MNGECP2.js → chunk-4IHAV6O7.js} +2 -2
- package/dist/{chunk-ENRS56GC.js → chunk-4UNQ6X24.js} +10 -7
- package/dist/{chunk-JM4LEPY3.js → chunk-4YFKQ5WT.js} +6 -3
- package/dist/{chunk-U5SI5NIM.js → chunk-5223KXFD.js} +39 -22
- package/dist/{chunk-NI3XQBPB.js → chunk-5BHJZH62.js} +3 -3
- package/dist/{chunk-QYTPPDAO.js → chunk-5HILBT7X.js} +2 -2
- package/dist/{chunk-I2QZFCS2.js → chunk-5NGAO4QK.js} +4 -4
- package/dist/{chunk-BGP54HVR.js → chunk-5RP7JRVP.js} +4 -4
- package/dist/{chunk-IE477RQZ.js → chunk-5SEVICBT.js} +5 -5
- package/dist/{chunk-OZPBJM5Q.js → chunk-6EJITS44.js} +8 -5
- package/dist/{chunk-F3FYUFUH.js → chunk-6HQH6JZE.js} +12 -11
- package/dist/{chunk-X7EC3L2H.js → chunk-6LBQ7ELG.js} +14 -15
- package/dist/{chunk-5WPNFSXP.js → chunk-75G3Q4DK.js} +3 -3
- package/dist/{chunk-BYJBIALT.js → chunk-77FGAVZC.js} +10 -7
- package/dist/{chunk-2EQMXBBQ.js → chunk-7BIZCTAX.js} +2 -2
- package/dist/{chunk-B63YB7X3.js → chunk-7KINELPI.js} +110 -48
- package/dist/{chunk-AB7INMR5.js → chunk-7QE3XMRK.js} +15 -14
- package/dist/{chunk-IUJODQKX.js → chunk-AAXZDUOV.js} +15 -14
- package/dist/{chunk-2UJSV2VT.js → chunk-AL672HNE.js} +3 -3
- package/dist/{chunk-WQLMU7VG.js → chunk-ARGMQ3H4.js} +2 -2
- package/dist/{chunk-OU7HLO7I.js → chunk-AUIM2NVH.js} +3 -3
- package/dist/{chunk-RXKTSFDL.js → chunk-BKVOYV6I.js} +24 -32
- package/dist/{chunk-TK2VQQX2.js → chunk-BPIZNB5O.js} +14 -12
- package/dist/{chunk-3LV2NCB6.js → chunk-BPY242XU.js} +6 -4
- package/dist/{chunk-LV4BETUU.js → chunk-BRENJ2BQ.js} +32 -2
- package/dist/{chunk-Y6GBQTBK.js → chunk-CCNDLW7Z.js} +41 -19
- package/dist/{chunk-EXOQP75F.js → chunk-CIRFIL4M.js} +47 -27
- package/dist/{chunk-RBDIYLA5.js → chunk-DAOFNU6J.js} +17 -1
- package/dist/{chunk-4VWJ4LW2.js → chunk-DYWQFQJP.js} +44 -34
- package/dist/{chunk-QZPEGJOM.js → chunk-EMLPOL77.js} +15 -8
- package/dist/{chunk-IUO34HKW.js → chunk-FHGVORFO.js} +26 -22
- package/dist/{chunk-6H7O2OPM.js → chunk-FQ7HTV52.js} +4 -2
- package/dist/{chunk-7DYOELRK.js → chunk-FQMUHRVC.js} +69 -30
- package/dist/{chunk-AFIEPDLX.js → chunk-FT3ZYWET.js} +14 -3
- package/dist/{chunk-ND76YJCN.js → chunk-FUPF2UYQ.js} +35 -11
- package/dist/{chunk-6NFYEQDX.js → chunk-FY5MSZAP.js} +15 -3
- package/dist/{chunk-IEWG6J7C.js → chunk-GCYTI3DE.js} +40 -31
- package/dist/{chunk-GNSFLJAA.js → chunk-GJFAMOGK.js} +3 -3
- package/dist/{chunk-VNSXLA6G.js → chunk-H7KENAZO.js} +16 -12
- package/dist/{chunk-KFNWFNAA.js → chunk-HBPDFCQY.js} +3 -3
- package/dist/{chunk-467TVMQL.js → chunk-HHKO6SKY.js} +2 -2
- package/dist/{chunk-6K2M4VSR.js → chunk-HQQNCY7W.js} +21 -8
- package/dist/{chunk-ZJ3LS7DW.js → chunk-HWX6ZHF3.js} +2 -2
- package/dist/{chunk-Q62FEYK3.js → chunk-ICPJPQ5C.js} +2 -2
- package/dist/{chunk-MVN25IF6.js → chunk-IM6PDDCE.js} +4 -4
- package/dist/{chunk-65WJYYKJ.js → chunk-INE5YJBZ.js} +11 -6
- package/dist/{chunk-EDA6C7MV.js → chunk-J6QROYDA.js} +13 -9
- package/dist/{chunk-3ODS2VGL.js → chunk-J7KJR3R6.js} +116 -96
- package/dist/{chunk-JEUJOX5X.js → chunk-J7TLCB2Q.js} +2 -2
- package/dist/{chunk-GD6L76WD.js → chunk-JRCOYRRH.js} +19 -7
- package/dist/{chunk-G3PF3S7P.js → chunk-K2I2XOZD.js} +9 -9
- package/dist/{chunk-5PDTIBLV.js → chunk-K4EOKJA6.js} +17 -7
- package/dist/{chunk-5SVOCD5W.js → chunk-KGVZ5VGH.js} +10 -7
- package/dist/{chunk-QHI5XVUJ.js → chunk-LBMS4AW6.js} +20 -19
- package/dist/{chunk-FTBZV6NE.js → chunk-LGT3PZCJ.js} +22 -14
- package/dist/{chunk-E7Y3SYKW.js → chunk-LTXOLDUZ.js} +9 -6
- package/dist/{chunk-GTWKD3QT.js → chunk-MUE65OTD.js} +5 -4
- package/dist/{chunk-TRM2J7ZN.js → chunk-MUVJ57EP.js} +10 -14
- package/dist/{chunk-RBHWPDBB.js → chunk-NNS4E7CW.js} +6 -4
- package/dist/{chunk-NNAAJVBU.js → chunk-NR5HCAUD.js} +1 -1
- package/dist/{chunk-NEQ6GJXB.js → chunk-ONU3U4GL.js} +2 -2
- package/dist/{chunk-XEQXCIBC.js → chunk-PRI2OD4E.js} +10 -3
- package/dist/{chunk-U6EQI3U6.js → chunk-QBZYACOG.js} +3 -3
- package/dist/{chunk-5PZT4DQG.js → chunk-QGATPIPX.js} +15 -9
- package/dist/{chunk-YGJZWZTY.js → chunk-QHXCAEMX.js} +7 -4
- package/dist/{chunk-RLFVAKEO.js → chunk-QJMKPUYK.js} +15 -5
- package/dist/{chunk-Z6XJQ6KO.js → chunk-QVENJMNX.js} +2 -2
- package/dist/{chunk-GROLTAWZ.js → chunk-QZX5S6R3.js} +2 -2
- package/dist/{chunk-TMACGPW5.js → chunk-R3YSD62R.js} +3 -3
- package/dist/{chunk-332ZR4QU.js → chunk-REJAIQ5S.js} +4 -4
- package/dist/{chunk-5F5ELR3V.js → chunk-ROOE4R4Y.js} +8 -5
- package/dist/{chunk-XHVV4NVW.js → chunk-RT7ACF77.js} +12 -2
- package/dist/{chunk-GGHRAITI.js → chunk-SMRFPVLQ.js} +3 -3
- package/dist/{chunk-JSSX2SX4.js → chunk-SWSIKFEB.js} +2 -2
- package/dist/{chunk-DY7XLRHK.js → chunk-T4A4TSTJ.js} +14 -15
- package/dist/{chunk-VB4UJ3H2.js → chunk-TJVLKNGR.js} +20 -10
- package/dist/{chunk-FC5I2KXV.js → chunk-TPFKKXCB.js} +3 -3
- package/dist/{chunk-AXW3M6OQ.js → chunk-TTIM6YTT.js} +28 -18
- package/dist/{chunk-WJ7RW65H.js → chunk-UBLHQTLV.js} +13 -12
- package/dist/{chunk-AE7II3E3.js → chunk-UNURMIQO.js} +2 -2
- package/dist/{chunk-PZDBOK2Q.js → chunk-VILVLS7P.js} +5 -3
- package/dist/{chunk-3YSQZ75W.js → chunk-VQOCMUWI.js} +37 -26
- package/dist/{chunk-P6T66CCZ.js → chunk-WBM7ZNDI.js} +3 -2
- package/dist/{chunk-4QZ43D7I.js → chunk-XD6ZYURY.js} +9 -4
- package/dist/{chunk-3JLKYGBQ.js → chunk-YIBAWQGJ.js} +6 -3
- package/dist/{chunk-ZO27FGJS.js → chunk-YTMTPUH4.js} +7 -4
- package/dist/{chunk-6BQFET7X.js → chunk-Z5QVYKR7.js} +11 -3
- package/dist/{chunk-KJGG2JKQ.js → chunk-ZEF5M5MB.js} +52 -45
- package/dist/{chunk-32XPAAET.js → chunk-ZJV7GYR4.js} +3 -3
- package/dist/{chunk-2ILHQOL3.js → chunk-ZNWAYU6N.js} +11 -7
- package/dist/cli.cjs +146 -145
- package/dist/clock.js +16 -22
- package/dist/dgmo-router-X7ZGAPIE.js +86 -0
- package/dist/{dimensions-F7B5C4BJ.js → dimensions-45H6JQEY.js} +6 -6
- package/dist/editor.js +4 -2
- package/dist/element.js +126 -124
- package/dist/element.mjs +952 -492
- package/dist/{flowchart-parser-MY53QWTZ.js → flowchart-parser-UKELHBSB.js} +4 -4
- package/dist/{flowchart-renderer-AQSMEMYF.js → flowchart-renderer-MNCDS7MV.js} +7 -7
- package/dist/highlight.d.ts +21 -1
- package/dist/highlight.js +93 -3
- package/dist/index.js +51 -51
- package/dist/{layout-JDJAEQ3P.js → layout-2L3WMRYU.js} +4 -4
- package/dist/{layout-MUPRALE5.js → layout-A4XWNVID.js} +4 -4
- package/dist/{layout-46366KBT.js → layout-A5UHRWVH.js} +3 -3
- package/dist/{layout-HYZPWAK5.js → layout-GM4UGR7B.js} +4 -3
- package/dist/{layout-CBCLPMSG.js → layout-GQQJXNYH.js} +4 -4
- package/dist/{layout-YVTNOTN4.js → layout-IIE2S5FK.js} +3 -3
- package/dist/{layout-4DIUOX2T.js → layout-VMCRX66I.js} +4 -4
- package/dist/{palettes-PRJ2RI6D.js → palettes-UDLZ2SA4.js} +2 -2
- package/dist/{parser-BKI42XBQ.js → parser-2ECN6JA2.js} +4 -4
- package/dist/{parser-C3D7MVXY.js → parser-4WTIHM5J.js} +3 -3
- package/dist/{parser-5A2UWU6B.js → parser-5H2BTSJQ.js} +3 -3
- package/dist/{parser-OK2ILHRT.js → parser-75KVXUNS.js} +4 -4
- package/dist/{parser-SRVFR7PM.js → parser-774AC53T.js} +4 -4
- package/dist/{parser-BEPSWJAD.js → parser-BE4YCSRU.js} +3 -3
- package/dist/{parser-B77S5SZM.js → parser-CNGUQUQI.js} +3 -3
- package/dist/{parser-2Q2T4C3B.js → parser-DEUUSQIN.js} +7 -7
- package/dist/{parser-5PDYJGWA.js → parser-DQAFLUJB.js} +4 -4
- package/dist/{parser-KKTJ6M3Y.js → parser-EYCKNKQA.js} +5 -5
- package/dist/{parser-UKFFZCFJ.js → parser-FXISIU6A.js} +4 -4
- package/dist/{parser-UMWPLORP.js → parser-GTB4XC7P.js} +5 -5
- package/dist/{parser-Z4TZV2CB.js → parser-GVEPAUSD.js} +4 -4
- package/dist/{parser-AIMHGJRR.js → parser-HSQGTY4G.js} +4 -4
- package/dist/{parser-OUTPNJWC.js → parser-HVKRINUS.js} +3 -3
- package/dist/{parser-JA7JQ7NF.js → parser-J5MIEYO4.js} +5 -5
- package/dist/parser-KMZIXLDZ.js +13 -0
- package/dist/{parser-CDG7CHV5.js → parser-LJHXWSXU.js} +3 -3
- package/dist/{parser-PORDUX5E.js → parser-PT3W72G5.js} +4 -4
- package/dist/{parser-CZOJ7XQ6.js → parser-SBJQDPHL.js} +4 -4
- package/dist/{parser-I6GGFKOQ.js → parser-SUWWWCMX.js} +3 -3
- package/dist/{parser-AZJ25OKK.js → parser-SXDRNZOA.js} +4 -4
- package/dist/parser-UMILOW3M.js +14 -0
- package/dist/{parser-GKLZKEIK.js → parser-UP3AZ367.js} +4 -4
- package/dist/{parser-57ILIFZ2.js → parser-WHPRV3X5.js} +5 -5
- package/dist/{parser-H6ABKHZZ.js → parser-WX3UODSJ.js} +4 -4
- package/dist/{parser-FQ6GZFMR.js → parser-XCIEN3KN.js} +4 -4
- package/dist/{parser-E2RL6JYF.js → parser-XIRTUMVN.js} +5 -5
- package/dist/{parser-3A42DZ72.js → parser-YKCGIG45.js} +3 -3
- package/dist/{parser-EH5VE7ZN.js → parser-YKYMQG3B.js} +4 -4
- package/dist/{parser-6ZKABF5S.js → parser-ZGM2OJ6Y.js} +5 -5
- package/dist/{parser-4RFTKAQX.js → parser-ZL5QUFVH.js} +4 -4
- package/dist/pert.d.ts +2 -2
- package/dist/{renderer-RYR3TJ46.js → renderer-3F7OS2AX.js} +10 -10
- package/dist/{renderer-TGTUABCI.js → renderer-4QB4K7Q3.js} +6 -6
- package/dist/{renderer-GHPZMFU2.js → renderer-5DAKMIU2.js} +3 -3
- package/dist/{renderer-3K3IB7D5.js → renderer-5H4SY7YY.js} +6 -6
- package/dist/{renderer-QIWVHWZO.js → renderer-5PIQPFOX.js} +4 -3
- package/dist/{renderer-NKJ24TEA.js → renderer-6MU37QF5.js} +6 -6
- package/dist/{renderer-QXPP4TA2.js → renderer-AQVMWJ4M.js} +9 -9
- package/dist/{renderer-2AUFT3E2.js → renderer-BDDW6K7N.js} +6 -6
- package/dist/{renderer-OYO67VZK.js → renderer-BNB3VIDY.js} +7 -7
- package/dist/{renderer-QXGN5H3A.js → renderer-CQY6ATOS.js} +5 -5
- package/dist/{renderer-CO2DW7S7.js → renderer-CVW75CXL.js} +9 -9
- package/dist/{renderer-KQB7UGDS.js → renderer-DT4XRFEP.js} +4 -3
- package/dist/{renderer-GQIESYEM.js → renderer-ERHBSTQT.js} +6 -6
- package/dist/{renderer-UV6MI64M.js → renderer-HSHHVYWF.js} +4 -3
- package/dist/{renderer-ARMJBP6C.js → renderer-IDPVUFNB.js} +8 -8
- package/dist/{renderer-QRWACQRI.js → renderer-ILX6BGKR.js} +6 -6
- package/dist/{renderer-F7U3MFCV.js → renderer-JP663HKG.js} +7 -7
- package/dist/{renderer-RGIYOTKJ.js → renderer-KNFTTOBL.js} +8 -8
- package/dist/{renderer-3YNIWF5I.js → renderer-MVUZBESR.js} +5 -5
- package/dist/{renderer-HYGHO4SJ.js → renderer-N4EBR2FV.js} +8 -8
- package/dist/{renderer-3YPZHMOU.js → renderer-NHO46CT2.js} +3 -3
- package/dist/{renderer-SRKDNDFB.js → renderer-NO2QJ5LZ.js} +7 -7
- package/dist/{renderer-2HTNBIF2.js → renderer-OGFV5RXX.js} +8 -8
- package/dist/{renderer-HCKJDFXD.js → renderer-PDLESJMS.js} +9 -9
- package/dist/{renderer-66MERVQ2.js → renderer-T4MTNINC.js} +6 -6
- package/dist/{renderer-RHT4MHFU.js → renderer-TOUGFGTM.js} +7 -7
- package/dist/{renderer-EDJ2O4S5.js → renderer-U3KPD43Y.js} +8 -8
- package/dist/{renderer-4WR6WMVF.js → renderer-X334IJU2.js} +6 -6
- package/dist/{renderer-JC3RDUT7.js → renderer-Y5OAMOCR.js} +6 -6
- package/dist/{renderer-GD2COXVL.js → renderer-YONAKAJU.js} +4 -4
- package/dist/{renderer-TXJFKPOG.js → renderer-YWMI6Y2U.js} +8 -8
- package/dist/{renderer-6RKQPNJI.js → renderer-ZWIH4WDW.js} +7 -7
- package/dist/{renderer-radial-FWABAZHB.js → renderer-radial-7CGZMVMS.js} +7 -7
- package/dist/{state-parser-6T6CNMPX.js → state-parser-BATWAID2.js} +4 -4
- package/dist/{state-renderer-AWZ3ECAX.js → state-renderer-3FKZJ3LP.js} +7 -7
- package/docs/ai-integration.md +15 -19
- package/docs/language-reference.md +13 -11
- package/package.json +1 -1
- package/dist/dgmo-router-Y2VEX46B.js +0 -86
- package/dist/parser-6BJEXUFX.js +0 -13
- package/dist/parser-OK22AC6Y.js +0 -14
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
layoutJourneyMap,
|
|
4
4
|
scoreToColor,
|
|
5
5
|
scoreToCurveY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YIBAWQGJ.js";
|
|
7
7
|
import {
|
|
8
8
|
wrapNoteBody
|
|
9
9
|
} from "./chunk-TYS6CSS5.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-YYVTBZZC.js";
|
|
22
22
|
import {
|
|
23
23
|
renderIntegratedLegend
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AUIM2NVH.js";
|
|
25
25
|
import {
|
|
26
26
|
FONT_FAMILY
|
|
27
27
|
} from "./chunk-6KFWC4CO.js";
|
|
@@ -32,16 +32,20 @@ import {
|
|
|
32
32
|
} from "./chunk-WCT3NYCV.js";
|
|
33
33
|
import {
|
|
34
34
|
parseJourneyMap
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XD6ZYURY.js";
|
|
36
36
|
import {
|
|
37
37
|
contrastText,
|
|
38
38
|
mix,
|
|
39
|
-
shapeFill
|
|
40
|
-
|
|
39
|
+
shapeFill,
|
|
40
|
+
themeBaseBg
|
|
41
|
+
} from "./chunk-WBM7ZNDI.js";
|
|
41
42
|
import {
|
|
42
43
|
resolveActiveTagGroup,
|
|
43
44
|
tagAttrKey
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-HHKO6SKY.js";
|
|
46
|
+
import {
|
|
47
|
+
fillModeFromOptions
|
|
48
|
+
} from "./chunk-BRENJ2BQ.js";
|
|
45
49
|
|
|
46
50
|
// src/journey-map/renderer.ts
|
|
47
51
|
import * as d3 from "d3-selection";
|
|
@@ -76,7 +80,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
76
80
|
const onActiveTagGroupChange = options?.onActiveTagGroupChange;
|
|
77
81
|
const collapsedPhases = options?.collapsedPhases ?? /* @__PURE__ */ new Set();
|
|
78
82
|
const onPhaseToggle = options?.onPhaseToggle;
|
|
79
|
-
const
|
|
83
|
+
const fillMode = fillModeFromOptions(parsed.options);
|
|
80
84
|
const layout = layoutJourneyMap(parsed, palette, {
|
|
81
85
|
collapsedPhases,
|
|
82
86
|
...exportDims !== void 0 && { exportDims },
|
|
@@ -131,7 +135,9 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
131
135
|
const textX = panelX + CARD_PADDING_X;
|
|
132
136
|
const clipId = "persona-clip";
|
|
133
137
|
defs.append("clipPath").attr("id", clipId).append("rect").attr("x", panelX).attr("y", panelY).attr("width", panelWidth).attr("height", panelHeight).attr("rx", CARD_RADIUS);
|
|
134
|
-
const personaFill = shapeFill(palette, personaColor, isDark, {
|
|
138
|
+
const personaFill = shapeFill(palette, personaColor, isDark, {
|
|
139
|
+
mode: fillMode
|
|
140
|
+
});
|
|
135
141
|
const onPersonaText = contrastText(
|
|
136
142
|
personaFill,
|
|
137
143
|
palette.textOnFillLight,
|
|
@@ -139,12 +145,21 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
139
145
|
);
|
|
140
146
|
personaG.append("rect").attr("x", panelX).attr("y", panelY).attr("width", panelWidth).attr("height", panelHeight).attr("rx", CARD_RADIUS).attr("fill", personaFill);
|
|
141
147
|
if (descLines.length > 0) {
|
|
142
|
-
personaG.append("line").attr("x1", panelX + 1).attr("x2", panelX + panelWidth - silhouetteZone).attr("y1", panelY + titleRowH).attr("y2", panelY + titleRowH).attr("stroke", solid ? onPersonaText : personaColor).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
148
|
+
personaG.append("line").attr("x1", panelX + 1).attr("x2", panelX + panelWidth - silhouetteZone).attr("y1", panelY + titleRowH).attr("y2", panelY + titleRowH).attr("stroke", fillMode === "solid" ? onPersonaText : personaColor).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
143
149
|
}
|
|
144
150
|
const silX = panelX + panelWidth - 32;
|
|
145
151
|
const silY = panelY + panelHeight / 2 - 6;
|
|
146
152
|
const silClip = personaG.append("g").attr("clip-path", `url(#${clipId})`);
|
|
147
|
-
renderPersonaSilhouette(
|
|
153
|
+
renderPersonaSilhouette(
|
|
154
|
+
silClip,
|
|
155
|
+
silX,
|
|
156
|
+
silY,
|
|
157
|
+
personaColor,
|
|
158
|
+
palette,
|
|
159
|
+
isDark,
|
|
160
|
+
1.2,
|
|
161
|
+
fillMode
|
|
162
|
+
);
|
|
148
163
|
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);
|
|
149
164
|
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(parsed.persona.name);
|
|
150
165
|
for (let li = 0; li < descLines.length; li++) {
|
|
@@ -280,7 +295,9 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
280
295
|
pt.y,
|
|
281
296
|
pt.score,
|
|
282
297
|
palette,
|
|
283
|
-
isDark
|
|
298
|
+
isDark,
|
|
299
|
+
void 0,
|
|
300
|
+
fillMode
|
|
284
301
|
);
|
|
285
302
|
addEmotionLabel(faceG, pt, palette);
|
|
286
303
|
if (step) {
|
|
@@ -313,7 +330,9 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
313
330
|
pt.y,
|
|
314
331
|
pt.score,
|
|
315
332
|
palette,
|
|
316
|
-
isDark
|
|
333
|
+
isDark,
|
|
334
|
+
void 0,
|
|
335
|
+
fillMode
|
|
317
336
|
);
|
|
318
337
|
addEmotionLabel(faceG, pt, palette);
|
|
319
338
|
if (step) {
|
|
@@ -398,7 +417,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
398
417
|
palette,
|
|
399
418
|
stepColor ?? palette.primary,
|
|
400
419
|
isDark,
|
|
401
|
-
{
|
|
420
|
+
{ mode: fillMode }
|
|
402
421
|
);
|
|
403
422
|
const rowStroke = stepColor ?? palette.textMuted;
|
|
404
423
|
itemG.append("rect").attr("x", listX).attr("y", itemY).attr("width", cardW).attr("height", COLLAPSED_CARD_H).attr("rx", CARD_RADIUS).attr("fill", rowFill).attr("stroke", rowStroke).attr("stroke-width", CARD_STROKE_WIDTH);
|
|
@@ -412,7 +431,8 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
412
431
|
step.score,
|
|
413
432
|
palette,
|
|
414
433
|
isDark,
|
|
415
|
-
COLLAPSED_FACE_R
|
|
434
|
+
COLLAPSED_FACE_R,
|
|
435
|
+
fillMode
|
|
416
436
|
);
|
|
417
437
|
faceG.attr("data-line-number", step.lineNumber);
|
|
418
438
|
faceG.attr("data-score", step.score);
|
|
@@ -441,7 +461,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
441
461
|
effectiveActiveGroup,
|
|
442
462
|
parsed.tagGroups,
|
|
443
463
|
onNavigateToLine,
|
|
444
|
-
|
|
464
|
+
fillMode
|
|
445
465
|
);
|
|
446
466
|
}
|
|
447
467
|
}
|
|
@@ -456,7 +476,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
456
476
|
effectiveActiveGroup,
|
|
457
477
|
parsed.tagGroups,
|
|
458
478
|
onNavigateToLine,
|
|
459
|
-
|
|
479
|
+
fillMode
|
|
460
480
|
);
|
|
461
481
|
}
|
|
462
482
|
}
|
|
@@ -530,7 +550,7 @@ function renderJourneyMap(container, parsed, palette, isDark, options) {
|
|
|
530
550
|
);
|
|
531
551
|
const by = Math.max(PADDING, fcy - FACE_HOVER_R - THOUGHT_GAP - bh);
|
|
532
552
|
const scoreColor = scoreToColor(score, palette);
|
|
533
|
-
const tintedBg = mix(scoreColor, palette.surface, 20);
|
|
553
|
+
const tintedBg = fillMode === "outline" ? themeBaseBg(palette, isDark) : mix(scoreColor, palette.surface, 20);
|
|
534
554
|
const g = overlayG.append("g").attr("class", "journey-thought-hover");
|
|
535
555
|
g.append("rect").attr("x", bx).attr("y", by).attr("width", bw).attr("height", bh).attr("rx", CARD_RADIUS).attr("fill", tintedBg).attr("stroke", scoreColor).attr("stroke-width", CARD_STROKE_WIDTH);
|
|
536
556
|
g.append("line").attr("x1", fcx).attr("y1", by + bh).attr("x2", fcx).attr("y2", fcy - FACE_HOVER_R - 1).attr("stroke", scoreColor).attr("stroke-width", CARD_STROKE_WIDTH);
|
|
@@ -624,7 +644,7 @@ function resolveStepColor(step, scoreColor, activeGroup, tagGroups, _palette) {
|
|
|
624
644
|
);
|
|
625
645
|
return entry?.color;
|
|
626
646
|
}
|
|
627
|
-
function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onNavigateToLine,
|
|
647
|
+
function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onNavigateToLine, fillMode) {
|
|
628
648
|
const stepG = parent.append("g").attr("class", "journey-step").attr("data-line-number", sl.step.lineNumber);
|
|
629
649
|
if (sl.step.score !== void 0) {
|
|
630
650
|
stepG.attr("data-score", sl.step.score);
|
|
@@ -645,7 +665,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
645
665
|
palette,
|
|
646
666
|
resolvedColor ?? palette.primary,
|
|
647
667
|
isDark,
|
|
648
|
-
{
|
|
668
|
+
{ mode: fillMode }
|
|
649
669
|
);
|
|
650
670
|
const cardStroke = resolvedColor ?? palette.textMuted;
|
|
651
671
|
const onCardText = contrastText(
|
|
@@ -663,7 +683,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
663
683
|
const cardAnnotations = sl.step.annotations;
|
|
664
684
|
const hasContent = sl.step.description || cardAnnotations.length > 0;
|
|
665
685
|
if (hasContent) {
|
|
666
|
-
stepG.append("line").attr("x1", cx).attr("y1", cy + titleBlockH).attr("x2", cx + sl.width).attr("y2", cy + titleBlockH).attr("stroke", solid ? onCardText : cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
686
|
+
stepG.append("line").attr("x1", cx).attr("y1", cy + titleBlockH).attr("x2", cx + sl.width).attr("y2", cy + titleBlockH).attr("stroke", fillMode === "solid" ? onCardText : cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
667
687
|
}
|
|
668
688
|
let metaY = cy + titleBlockH + CARD_META_LINE_HEIGHT;
|
|
669
689
|
if (sl.step.description) {
|
|
@@ -685,7 +705,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
685
705
|
const annoColor = annotationColor(anno.type, palette);
|
|
686
706
|
const iconPaths = annotationIconPaths(anno.type);
|
|
687
707
|
const annoLines = wrapText(anno.text, annoTextW, FONT_SIZE_META);
|
|
688
|
-
const iconColor = solid ? onCardText : annoColor;
|
|
708
|
+
const iconColor = fillMode === "solid" ? onCardText : annoColor;
|
|
689
709
|
renderAnnotationIcon(
|
|
690
710
|
stepG,
|
|
691
711
|
cx + CARD_PADDING_X,
|
|
@@ -710,7 +730,7 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
710
730
|
const TAG_GAP = 6;
|
|
711
731
|
const stripY = cy - TAG_STRIP_HEIGHT - TAG_GAP;
|
|
712
732
|
const stripFill = shapeFill(palette, stripColor, isDark, {
|
|
713
|
-
|
|
733
|
+
mode: fillMode
|
|
714
734
|
});
|
|
715
735
|
stepG.append("rect").attr("x", cx).attr("y", stripY).attr("width", sl.width).attr("height", TAG_STRIP_HEIGHT).attr("rx", CARD_RADIUS).attr("fill", stripFill).attr("stroke", stripColor).attr("stroke-width", CARD_STROKE_WIDTH);
|
|
716
736
|
const stripTextColor = contrastText(
|
|
@@ -727,8 +747,8 @@ function renderStepCard(parent, sl, palette, isDark, activeGroup, tagGroups, onN
|
|
|
727
747
|
});
|
|
728
748
|
}
|
|
729
749
|
}
|
|
730
|
-
function renderPersonaSilhouette(parent, cx, cy, color, palette, scale = 1) {
|
|
731
|
-
const fill = mix(color, palette.bg, 70);
|
|
750
|
+
function renderPersonaSilhouette(parent, cx, cy, color, palette, isDark, scale = 1, fillMode) {
|
|
751
|
+
const fill = fillMode === "outline" ? themeBaseBg(palette, isDark) : mix(color, palette.bg, 70);
|
|
732
752
|
const stroke = color;
|
|
733
753
|
const s = scale;
|
|
734
754
|
parent.append("path").attr(
|
|
@@ -740,12 +760,12 @@ function renderPersonaSilhouette(parent, cx, cy, color, palette, scale = 1) {
|
|
|
740
760
|
`M ${cx} ${cy - 12 * s} C ${cx + 10 * s} ${cy - 12 * s}, ${cx + 9 * s} ${cy + 2 * s}, ${cx + 6 * s} ${cy + 6 * s} Q ${cx} ${cy + 9 * s}, ${cx - 6 * s} ${cy + 6 * s} C ${cx - 9 * s} ${cy + 2 * s}, ${cx - 10 * s} ${cy - 12 * s}, ${cx} ${cy - 12 * s} Z`
|
|
741
761
|
).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", 1.2);
|
|
742
762
|
}
|
|
743
|
-
function renderScoreFace(parent, cx, cy, score, palette, isDark, radius) {
|
|
763
|
+
function renderScoreFace(parent, cx, cy, score, palette, isDark, radius, fillMode) {
|
|
744
764
|
const r = radius ?? FACE_RADIUS;
|
|
745
765
|
const color = scoreToColor(score, palette);
|
|
746
766
|
const g = parent.append("g").attr("class", "journey-face").attr("data-cx", cx).attr("data-cy", cy);
|
|
747
767
|
const iconG = g.append("g").attr("class", "journey-face-icon");
|
|
748
|
-
const faceFill = shapeFill(palette, color, isDark);
|
|
768
|
+
const faceFill = fillMode === "outline" ? shapeFill(palette, color, isDark, { mode: "outline" }) : shapeFill(palette, color, isDark);
|
|
749
769
|
iconG.append("circle").attr("cx", cx).attr("cy", cy).attr("r", r + 1).attr("fill", palette.bg);
|
|
750
770
|
iconG.append("circle").attr("cx", cx).attr("cy", cy).attr("r", r).attr("fill", faceFill).attr("stroke", color).attr("stroke-width", 2);
|
|
751
771
|
const eyeColor = color;
|
|
@@ -848,4 +868,4 @@ export {
|
|
|
848
868
|
renderJourneyMap,
|
|
849
869
|
renderJourneyMapForExport
|
|
850
870
|
};
|
|
851
|
-
//# sourceMappingURL=chunk-
|
|
871
|
+
//# sourceMappingURL=chunk-CIRFIL4M.js.map
|
|
@@ -34,6 +34,21 @@ function monthNameToNum(raw) {
|
|
|
34
34
|
i = MONTHS_ABBR.indexOf(t.slice(0, 3));
|
|
35
35
|
return i >= 0 ? i + 1 : 0;
|
|
36
36
|
}
|
|
37
|
+
var MONTH_NAME_SCAN_RE = /\b(\d{1,2})\s+([A-Za-z]{3,9})\.?(?:\s+\d{4})?|\b([A-Za-z]{3,9})\.?\s+(\d{1,2})(?:,?\s+\d{4})?/g;
|
|
38
|
+
function scanMonthNameDates(line) {
|
|
39
|
+
const spans = [];
|
|
40
|
+
const re = new RegExp(MONTH_NAME_SCAN_RE.source, "g");
|
|
41
|
+
let m;
|
|
42
|
+
while ((m = re.exec(line)) !== null) {
|
|
43
|
+
const month = m[2] ?? m[3] ?? "";
|
|
44
|
+
if (monthNameToNum(month) <= 0) {
|
|
45
|
+
re.lastIndex = m.index + 1;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
spans.push({ start: m.index, end: m.index + m[0].length });
|
|
49
|
+
}
|
|
50
|
+
return spans;
|
|
51
|
+
}
|
|
37
52
|
var ERA_RE = /^(\d{1,4})(?:-(\d{2})(?:-(\d{2}))?)?\s+(BCE|BC|CE|AD)\b/i;
|
|
38
53
|
var ISO_RE = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?/;
|
|
39
54
|
var MONTH_D_RE = /^([A-Za-z]{3,9})\.?\s+(\d{1,2})(?:,?\s+(\d{4}))?/;
|
|
@@ -258,10 +273,11 @@ function normalizeDate(raw, opts = {}) {
|
|
|
258
273
|
}
|
|
259
274
|
|
|
260
275
|
export {
|
|
276
|
+
scanMonthNameDates,
|
|
261
277
|
parseDateToken,
|
|
262
278
|
toInternal,
|
|
263
279
|
resolveTokenYear,
|
|
264
280
|
makeYearContext,
|
|
265
281
|
normalizeDate
|
|
266
282
|
};
|
|
267
|
-
//# sourceMappingURL=chunk-
|
|
283
|
+
//# sourceMappingURL=chunk-DAOFNU6J.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
initD3Chart,
|
|
12
12
|
renderChartTitle,
|
|
13
13
|
resolveExportPalette
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QBZYACOG.js";
|
|
15
15
|
import {
|
|
16
16
|
computeLegendLayout
|
|
17
17
|
} from "./chunk-YAA6IID3.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
getSimpleChartLegendGroups,
|
|
33
33
|
parseChart,
|
|
34
34
|
parseExtendedChart
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-EMLPOL77.js";
|
|
36
36
|
import {
|
|
37
37
|
contrastText,
|
|
38
38
|
getSegmentColors,
|
|
@@ -40,11 +40,12 @@ import {
|
|
|
40
40
|
hexToHSL,
|
|
41
41
|
hslToHex,
|
|
42
42
|
mix,
|
|
43
|
-
shapeFill
|
|
44
|
-
|
|
43
|
+
shapeFill,
|
|
44
|
+
themeBaseBg
|
|
45
|
+
} from "./chunk-WBM7ZNDI.js";
|
|
45
46
|
import {
|
|
46
47
|
tagAttrKey
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-HHKO6SKY.js";
|
|
48
49
|
|
|
49
50
|
// src/utils/legend-svg.ts
|
|
50
51
|
function esc(s) {
|
|
@@ -220,12 +221,12 @@ function renderBar(svg, chart, width, height, colors, palette, isDark, textColor
|
|
|
220
221
|
) : 1;
|
|
221
222
|
const horizontal = chart.orientation === "horizontal";
|
|
222
223
|
const multiSeries = seriesCount > 1;
|
|
223
|
-
const
|
|
224
|
+
const fillMode = chart.fillMode;
|
|
224
225
|
const colorFor = (seriesIdx, catIdx, override) => {
|
|
225
226
|
if (override) return override;
|
|
226
227
|
return multiSeries ? colors[seriesIdx % colors.length] : colors[catIdx % colors.length];
|
|
227
228
|
};
|
|
228
|
-
const fillOf = (c) =>
|
|
229
|
+
const fillOf = (c) => shapeFill(palette, c, isDark, { mode: fillMode });
|
|
229
230
|
const top = reserveHeader(
|
|
230
231
|
svg,
|
|
231
232
|
chart,
|
|
@@ -402,7 +403,7 @@ function seriesValue(pt, s) {
|
|
|
402
403
|
function renderLine(svg, chart, width, height, colors, palette, isDark, textColor, mutedColor, bgColor, hasTitle) {
|
|
403
404
|
const data = chart.data;
|
|
404
405
|
const isArea = chart.fill === true;
|
|
405
|
-
const solid = chart.
|
|
406
|
+
const solid = chart.fillMode === "solid";
|
|
406
407
|
const seriesNames = chart.seriesNames?.length ? chart.seriesNames : [chart.series ?? ""];
|
|
407
408
|
const seriesCount = Math.max(
|
|
408
409
|
1,
|
|
@@ -558,7 +559,7 @@ function renderPie(svg, chart, width, height, palette, isDark, textColor, topIns
|
|
|
558
559
|
if (data.length === 0) return;
|
|
559
560
|
const holeRatio = chart.hole;
|
|
560
561
|
const hasHole = holeRatio !== void 0;
|
|
561
|
-
const
|
|
562
|
+
const fillMode = chart.fillMode;
|
|
562
563
|
const total = data.reduce((a, d) => a + d.value, 0);
|
|
563
564
|
const cx = width / 2;
|
|
564
565
|
const top = topInset + 12;
|
|
@@ -593,7 +594,7 @@ function renderPie(svg, chart, width, height, palette, isDark, textColor, topIns
|
|
|
593
594
|
const g = svg.append("g").attr("transform", `translate(${cx},${cy})`);
|
|
594
595
|
arcs.forEach((a, i) => {
|
|
595
596
|
const stroke = strokeFor(i, data[i].color);
|
|
596
|
-
const fill =
|
|
597
|
+
const fill = shapeFill(palette, stroke, isDark, { mode: fillMode });
|
|
597
598
|
const pct = Math.round(data[i].value / total * 100);
|
|
598
599
|
const slice = g.append("path").attr("d", arcGen(a) ?? "").attr("fill", fill).attr("stroke", stroke).attr("stroke-width", 1.5);
|
|
599
600
|
tagDatum(slice, {
|
|
@@ -644,7 +645,8 @@ function renderRadar(svg, chart, width, height, colors, palette, isDark, textCol
|
|
|
644
645
|
const data = chart.data;
|
|
645
646
|
const n = data.length;
|
|
646
647
|
if (n < 3) return;
|
|
647
|
-
const
|
|
648
|
+
const fillMode = chart.fillMode;
|
|
649
|
+
const solid = fillMode === "solid";
|
|
648
650
|
const seriesNames = chart.seriesNames?.length ? chart.seriesNames : [chart.series ?? ""];
|
|
649
651
|
const seriesCount = Math.max(
|
|
650
652
|
1,
|
|
@@ -688,7 +690,10 @@ function renderRadar(svg, chart, width, height, colors, palette, isDark, textCol
|
|
|
688
690
|
const seriesLine = chart.seriesNameLineNumbers?.[s];
|
|
689
691
|
if (seriesLine !== void 0) g.attr("data-line-number", seriesLine);
|
|
690
692
|
const poly = data.map((d, i) => pt(i, seriesValue2(d, s) / maxValue * radius).join(",")).join(" ");
|
|
691
|
-
g.append("polygon").attr("points", poly).attr(
|
|
693
|
+
g.append("polygon").attr("points", poly).attr(
|
|
694
|
+
"fill",
|
|
695
|
+
fillMode === "outline" ? "none" : solid || multi ? color : shapeFill(palette, color, isDark)
|
|
696
|
+
).attr("fill-opacity", solid ? 0.6 : multi ? 0.2 : 1).attr("stroke", color).attr("stroke-width", 2);
|
|
692
697
|
data.forEach((d, i) => {
|
|
693
698
|
const v = seriesValue2(d, s);
|
|
694
699
|
const [x, y] = pt(i, v / maxValue * radius);
|
|
@@ -719,7 +724,7 @@ function renderPolarArea(svg, chart, width, height, palette, isDark, textColor,
|
|
|
719
724
|
const data = chart.data.filter((d) => d.value > 0);
|
|
720
725
|
const n = data.length;
|
|
721
726
|
if (n === 0) return;
|
|
722
|
-
const
|
|
727
|
+
const fillMode = chart.fillMode;
|
|
723
728
|
const total = data.reduce((a, d) => a + d.value, 0);
|
|
724
729
|
const maxValue = Math.max(...data.map((d) => d.value)) || 1;
|
|
725
730
|
const cx = width / 2;
|
|
@@ -737,7 +742,7 @@ function renderPolarArea(svg, chart, width, height, palette, isDark, textColor,
|
|
|
737
742
|
const a1 = a0 + seg;
|
|
738
743
|
const arcGen = d3arc2().innerRadius(innerR).outerRadius(r).startAngle(a0).endAngle(a1);
|
|
739
744
|
const pct = Math.round(d.value / total * 100);
|
|
740
|
-
const sector = g.append("path").attr("d", arcGen({}) ?? "").attr("fill",
|
|
745
|
+
const sector = g.append("path").attr("d", arcGen({}) ?? "").attr("fill", shapeFill(palette, stroke, isDark, { mode: fillMode })).attr("stroke", stroke).attr("stroke-width", 2);
|
|
741
746
|
tagDatum(sector, {
|
|
742
747
|
line: d.lineNumber,
|
|
743
748
|
key: d.label,
|
|
@@ -768,7 +773,7 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
|
|
|
768
773
|
const sorted = [...chart.data].sort((a, b) => b.value - a.value);
|
|
769
774
|
const n = sorted.length;
|
|
770
775
|
if (n === 0) return;
|
|
771
|
-
const
|
|
776
|
+
const fillMode = chart.fillMode;
|
|
772
777
|
const top = topInset + 8;
|
|
773
778
|
const bottom = height - 30;
|
|
774
779
|
const H = bottom - top;
|
|
@@ -826,7 +831,7 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
|
|
|
826
831
|
({ plotW, cx } = layout(rightW));
|
|
827
832
|
sorted.forEach((d, i) => {
|
|
828
833
|
const stroke = d.color ?? colors[chart.data.indexOf(d) % colors.length];
|
|
829
|
-
const fill =
|
|
834
|
+
const fill = shapeFill(palette, stroke, isDark, { mode: fillMode });
|
|
830
835
|
const { topW, botW } = bandWidthsAt(plotW, i);
|
|
831
836
|
const y0 = top + i * bandH;
|
|
832
837
|
const y1 = y0 + bandH;
|
|
@@ -850,7 +855,7 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
|
|
|
850
855
|
const valueInside = valueInsideAt(plotW, i);
|
|
851
856
|
if (valueInside) {
|
|
852
857
|
const valueSize = valueSizeAt(plotW, i);
|
|
853
|
-
const valueFill = solid ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : stroke;
|
|
858
|
+
const valueFill = fillMode === "solid" ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : stroke;
|
|
854
859
|
svg.append("text").attr("x", cx).attr("y", yMid + valueSize * 0.35).attr("text-anchor", "middle").attr("fill", valueFill).attr("font-size", valueSize).attr("font-weight", 700).attr("font-family", FONT_FAMILY).text(fmtNum(d.value));
|
|
855
860
|
}
|
|
856
861
|
const showValueRight = !chart.noValue && !valueInside;
|
|
@@ -883,12 +888,14 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
|
|
|
883
888
|
minValue = Math.min(minValue, v);
|
|
884
889
|
maxValue = Math.max(maxValue, v);
|
|
885
890
|
}
|
|
886
|
-
const
|
|
891
|
+
const outline = chart.fillMode === "outline";
|
|
892
|
+
const fillMode = outline || chart.fillMode === "solid" ? "solid" : void 0;
|
|
893
|
+
const baseBg = themeBaseBg(palette, isDark);
|
|
887
894
|
const gradientStops = [
|
|
888
|
-
shapeFill(palette, palette.primary, isDark, {
|
|
889
|
-
shapeFill(palette, palette.colors.cyan, isDark, {
|
|
890
|
-
shapeFill(palette, palette.colors.yellow, isDark, {
|
|
891
|
-
shapeFill(palette, palette.colors.orange, isDark, {
|
|
895
|
+
shapeFill(palette, palette.primary, isDark, { mode: fillMode }),
|
|
896
|
+
shapeFill(palette, palette.colors.cyan, isDark, { mode: fillMode }),
|
|
897
|
+
shapeFill(palette, palette.colors.yellow, isDark, { mode: fillMode }),
|
|
898
|
+
shapeFill(palette, palette.colors.orange, isDark, { mode: fillMode })
|
|
892
899
|
];
|
|
893
900
|
const gradientAt = (t) => {
|
|
894
901
|
const tt = Math.max(0, Math.min(1, t));
|
|
@@ -938,25 +945,26 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
|
|
|
938
945
|
svg.append("text").attr("class", "dgmo-axis-label").attr("data-filter-attr", "data-row-key").attr("data-filter-value", row.label).attr("x", left - 10).attr("y", top + ri * ch + ch / 2 + 4).attr("text-anchor", "end").attr("fill", textColor).attr("font-size", 13).attr("font-family", FONT_FAMILY).text(row.label);
|
|
939
946
|
row.values.forEach((v, ci) => {
|
|
940
947
|
const t = maxValue === minValue ? 0.5 : (v - minValue) / (maxValue - minValue);
|
|
941
|
-
const
|
|
948
|
+
const ramp = gradientAt(t);
|
|
949
|
+
const cell = outline ? baseBg : ramp;
|
|
942
950
|
const colLabel = cols[ci] ?? `Col ${ci + 1}`;
|
|
943
951
|
const cellKey = `${row.label} \xB7 ${colLabel}`;
|
|
944
|
-
const r = svg.append("rect").attr("x", left + ci * cw).attr("y", top + ri * ch).attr("width", cw).attr("height", ch).attr("fill", cell).attr("stroke", bgColor).attr("stroke-width", 2).attr("data-row-key", row.label).attr("data-col-key", colLabel);
|
|
952
|
+
const r = svg.append("rect").attr("x", left + ci * cw).attr("y", top + ri * ch).attr("width", cw).attr("height", ch).attr("fill", cell).attr("stroke", outline ? ramp : bgColor).attr("stroke-width", outline ? 1.5 : 2).attr("data-row-key", row.label).attr("data-col-key", colLabel);
|
|
945
953
|
tagDatum(r, {
|
|
946
954
|
line: row.lineNumber,
|
|
947
955
|
key: cellKey,
|
|
948
956
|
name: cellKey,
|
|
949
957
|
value: fmtNum(v),
|
|
950
|
-
color:
|
|
958
|
+
color: ramp
|
|
951
959
|
});
|
|
952
960
|
if (!chart.noValue) {
|
|
953
|
-
const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(
|
|
961
|
+
const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(ramp)).attr("font-size", cellFont).attr("font-weight", 600).attr("font-family", FONT_FAMILY).text(fmtNum(v));
|
|
954
962
|
tagDatum(label, {
|
|
955
963
|
line: row.lineNumber,
|
|
956
964
|
key: cellKey,
|
|
957
965
|
name: cellKey,
|
|
958
966
|
value: fmtNum(v),
|
|
959
|
-
color:
|
|
967
|
+
color: ramp
|
|
960
968
|
});
|
|
961
969
|
label.attr("data-row-key", row.label).attr("data-col-key", colLabel);
|
|
962
970
|
}
|
|
@@ -1029,7 +1037,7 @@ function placeScatterHoverValue(cx, cy, r, labelText, valueText, labelRects, cir
|
|
|
1029
1037
|
function renderScatter(svg, chart, width, height, colors, palette, isDark, textColor, mutedColor, topInset) {
|
|
1030
1038
|
const points = chart.scatterPoints ?? [];
|
|
1031
1039
|
if (points.length === 0) return;
|
|
1032
|
-
const
|
|
1040
|
+
const fillMode = chart.fillMode;
|
|
1033
1041
|
const hasSize = points.some((p) => p.size !== void 0);
|
|
1034
1042
|
const categories = [
|
|
1035
1043
|
...new Set(points.map((p) => p.category).filter(Boolean))
|
|
@@ -1111,7 +1119,7 @@ function renderScatter(svg, chart, width, height, colors, palette, isDark, textC
|
|
|
1111
1119
|
points.forEach((p, i) => {
|
|
1112
1120
|
const stroke = p.color ?? (p.category ? catColor(p.category, catIndex.get(p.category) ?? 0) : colors[i % colors.length]);
|
|
1113
1121
|
const r = radii[i];
|
|
1114
|
-
const dot = svg.append("circle").attr("cx", x(p.x)).attr("cy", y(p.y)).attr("r", r).attr("fill",
|
|
1122
|
+
const dot = svg.append("circle").attr("cx", x(p.x)).attr("cy", y(p.y)).attr("r", r).attr("fill", shapeFill(palette, stroke, isDark, { mode: fillMode })).attr("fill-opacity", FILL_OPACITY).attr("stroke", stroke).attr("stroke-width", 2);
|
|
1115
1123
|
tagDatum(dot, {
|
|
1116
1124
|
line: p.lineNumber,
|
|
1117
1125
|
key: p.name,
|
|
@@ -1162,7 +1170,7 @@ var NODE_GAP = 14;
|
|
|
1162
1170
|
function renderSankey(svg, chart, width, height, colors, bgColor, textColor, topInset) {
|
|
1163
1171
|
const links = chart.links ?? [];
|
|
1164
1172
|
if (links.length === 0) return;
|
|
1165
|
-
const solid = chart.
|
|
1173
|
+
const solid = chart.fillMode === "solid";
|
|
1166
1174
|
const names = Array.from(new Set(links.flatMap((l) => [l.source, l.target])));
|
|
1167
1175
|
const node = /* @__PURE__ */ new Map();
|
|
1168
1176
|
names.forEach(
|
|
@@ -1264,7 +1272,9 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
|
|
|
1264
1272
|
).attr("fill", color).attr("fill-opacity", 0.6);
|
|
1265
1273
|
tagDatum(ribbon, {
|
|
1266
1274
|
line: l.lineNumber,
|
|
1267
|
-
|
|
1275
|
+
// U+241F (symbol-for-unit-separator) — collision-proof AND XML-legal;
|
|
1276
|
+
// a raw control char here corrupts the exported SVG (data-emph-key).
|
|
1277
|
+
key: `link:${s.name}\u241F${t.name}`,
|
|
1268
1278
|
name: `${s.name} \u2192 ${t.name}`,
|
|
1269
1279
|
value: String(l.value),
|
|
1270
1280
|
color: s.raw
|
|
@@ -1291,7 +1301,7 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
|
|
|
1291
1301
|
function renderChord(svg, chart, width, height, colors, palette, isDark, textColor, topInset) {
|
|
1292
1302
|
const links = chart.links ?? [];
|
|
1293
1303
|
if (links.length === 0) return;
|
|
1294
|
-
const
|
|
1304
|
+
const fillMode = chart.fillMode;
|
|
1295
1305
|
const names = Array.from(new Set(links.flatMap((l) => [l.source, l.target])));
|
|
1296
1306
|
const n = names.length;
|
|
1297
1307
|
const idx = new Map(names.map((nm, i) => [nm, i]));
|
|
@@ -1351,7 +1361,7 @@ function renderChord(svg, chart, width, height, colors, palette, isDark, textCol
|
|
|
1351
1361
|
names.forEach((nm, i) => {
|
|
1352
1362
|
const [px, py] = pos(i);
|
|
1353
1363
|
const stroke = colorOf(i);
|
|
1354
|
-
const dot = svg.append("circle").attr("cx", px).attr("cy", py).attr("r", 10).attr("fill",
|
|
1364
|
+
const dot = svg.append("circle").attr("cx", px).attr("cy", py).attr("r", 10).attr("fill", shapeFill(palette, stroke, isDark, { mode: fillMode })).attr("stroke", stroke).attr("stroke-width", 2);
|
|
1355
1365
|
tagDatum(dot, { key: `node:${nm}`, name: nm, color: stroke });
|
|
1356
1366
|
const c = Math.cos(angle(i));
|
|
1357
1367
|
const lx = px + c * 16;
|
|
@@ -1701,4 +1711,4 @@ export {
|
|
|
1701
1711
|
supportsD3DataChart,
|
|
1702
1712
|
renderDataChartD3
|
|
1703
1713
|
};
|
|
1704
|
-
//# sourceMappingURL=chunk-
|
|
1714
|
+
//# sourceMappingURL=chunk-DYWQFQJP.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectIndentedValues,
|
|
3
3
|
extractColor,
|
|
4
|
+
fillModeFromToken,
|
|
4
5
|
measureIndent,
|
|
5
6
|
normalizeNumericToken,
|
|
6
7
|
parseFirstLine,
|
|
7
8
|
parseSeriesNames
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BRENJ2BQ.js";
|
|
9
10
|
import {
|
|
10
11
|
RECOGNIZED_COLOR_NAMES,
|
|
11
12
|
resolveColorWithDiagnostic
|
|
@@ -43,7 +44,9 @@ var KNOWN_OPTIONS = /* @__PURE__ */ new Set([
|
|
|
43
44
|
var DEFAULT_HOLE = 0.6;
|
|
44
45
|
var KNOWN_BOOLEANS = /* @__PURE__ */ new Set([
|
|
45
46
|
"orientation-horizontal",
|
|
46
|
-
"
|
|
47
|
+
"fill-tint",
|
|
48
|
+
"fill-solid",
|
|
49
|
+
"fill-outline",
|
|
47
50
|
"no-title",
|
|
48
51
|
"no-auto-y",
|
|
49
52
|
"fill",
|
|
@@ -173,8 +176,10 @@ function parseChart(content, palette) {
|
|
|
173
176
|
if (KNOWN_BOOLEANS.has(firstToken) && spaceIdx < 0) {
|
|
174
177
|
if (firstToken === "orientation-horizontal") {
|
|
175
178
|
result.orientation = "horizontal";
|
|
176
|
-
} else if (firstToken
|
|
177
|
-
|
|
179
|
+
} else if (fillModeFromToken(firstToken) !== null) {
|
|
180
|
+
const fm = fillModeFromToken(firstToken);
|
|
181
|
+
if (fm === "tint") delete result.fillMode;
|
|
182
|
+
else result.fillMode = fm;
|
|
178
183
|
} else if (firstToken === "no-title") {
|
|
179
184
|
result.noTitle = true;
|
|
180
185
|
} else if (firstToken === "no-auto-y") {
|
|
@@ -708,7 +713,7 @@ function parseExtendedChartFull(content, palette) {
|
|
|
708
713
|
const spaceIdx2 = trimmed.indexOf(" ");
|
|
709
714
|
const lastTok = trimmed.substring(trimmed.lastIndexOf(" ") + 1);
|
|
710
715
|
const hasNumericSuffix = spaceIdx2 >= 0 && !isNaN(parseFloat(normalizeNumericToken(lastTok) ?? lastTok));
|
|
711
|
-
const isBareKeywordOption = spaceIdx2 < 0 && /^(
|
|
716
|
+
const isBareKeywordOption = spaceIdx2 < 0 && /^(fill-tint|fill-solid|fill-outline|no-name|no-value|no-percent|shade|no-title)$/i.test(
|
|
712
717
|
trimmed
|
|
713
718
|
);
|
|
714
719
|
const isLayoutDirective = spaceIdx2 >= 0 && trimmed.substring(0, spaceIdx2).toLowerCase() === "layout";
|
|
@@ -839,8 +844,10 @@ function parseExtendedChartFull(content, palette) {
|
|
|
839
844
|
result.shade = true;
|
|
840
845
|
continue;
|
|
841
846
|
}
|
|
842
|
-
|
|
843
|
-
|
|
847
|
+
const fillFamily = fillModeFromToken(firstToken);
|
|
848
|
+
if (fillFamily !== null && spaceIdx < 0) {
|
|
849
|
+
if (fillFamily === "tint") delete result.fillMode;
|
|
850
|
+
else result.fillMode = fillFamily;
|
|
844
851
|
continue;
|
|
845
852
|
}
|
|
846
853
|
if (firstToken === "no-title" && spaceIdx < 0) {
|
|
@@ -1057,4 +1064,4 @@ export {
|
|
|
1057
1064
|
getSimpleChartLegendGroups,
|
|
1058
1065
|
getExtendedChartLegendGroups
|
|
1059
1066
|
};
|
|
1060
|
-
//# sourceMappingURL=chunk-
|
|
1067
|
+
//# sourceMappingURL=chunk-EMLPOL77.js.map
|