@diagrammo/dgmo 0.92.0 → 0.93.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/dist/advanced.d.ts +85 -21
- package/dist/advanced.js +455 -422
- package/dist/block.d.ts +2 -2
- package/dist/block.js +75 -70
- package/dist/{chart-meta-BBqLnv5q.d.ts → chart-meta-BbjsRY7o.d.ts} +2 -2
- package/dist/chart-meta.d.ts +3 -3
- package/dist/chart-meta.js +25 -19
- package/dist/{chart-types-CbXlZFLd.d.ts → chart-types-Cppnp31G.d.ts} +173 -4
- package/dist/{charts-d3-QUUDVETP.js → charts-d3-ERYYVGP6.js} +7 -6
- package/dist/{chunk-HIWHIYLD.js → chunk-2TFXRBCD.js} +19 -19
- package/dist/{chunk-F7326NVM.js → chunk-3GCASUWA.js} +58 -25
- package/dist/{chunk-ZJAK6C7Y.js → chunk-3PP746YM.js} +6 -1
- package/dist/{chunk-WLLO3PZ3.js → chunk-472EOHVW.js} +17 -17
- package/dist/{chunk-LMP6Y7QO.js → chunk-4WQX55VX.js} +56 -24
- package/dist/{chunk-JLU52ZDT.js → chunk-5CBX66KB.js} +10 -10
- package/dist/{chunk-DEFBUZWV.js → chunk-5HAYT43L.js} +70 -54
- package/dist/{chunk-S7W75MIM.js → chunk-65GPEV5V.js} +21 -3
- package/dist/{chunk-Q6W2K33N.js → chunk-6XLMTAEX.js} +1 -1
- package/dist/{chunk-JKST4RTT.js → chunk-7OWK5K5C.js} +6 -6
- package/dist/{chunk-73EYNV4O.js → chunk-A5WIAMCT.js} +4 -6
- package/dist/{chunk-X5BUX2GK.js → chunk-ADVGV3P7.js} +1 -1
- package/dist/{chunk-45QUTYPD.js → chunk-CYDM2XII.js} +17 -17
- package/dist/chunk-CYTFO2LF.js +209 -0
- package/dist/{chunk-JRWUHLRP.js → chunk-D6PVMUCX.js} +51 -8
- package/dist/{chunk-BRSM6Z34.js → chunk-DAHQL57W.js} +14 -14
- package/dist/{chunk-RBFJT23E.js → chunk-EQWC76GQ.js} +6 -6
- package/dist/{chunk-ADNIO3XY.js → chunk-FIYW7JW4.js} +5 -5
- package/dist/{chunk-7ENDOHAA.js → chunk-FMAVHTYB.js} +919 -927
- package/dist/{chunk-3PFMGNOM.js → chunk-GJXMG4S3.js} +26 -11
- package/dist/chunk-GXCDD6NG.js +24 -0
- package/dist/{chunk-RJ2JW3FG.js → chunk-IESUM4N5.js} +2331 -2236
- package/dist/{chunk-62BP7AJU.js → chunk-IIV4SMJL.js} +18 -18
- package/dist/{chunk-5EBYPETE.js → chunk-J43OCO22.js} +3 -5
- package/dist/{chunk-L5NW3PVL.js → chunk-J6AEKIRQ.js} +1 -1
- package/dist/{chunk-2BJW7FSF.js → chunk-KBEWVCK3.js} +1 -1
- package/dist/{chunk-LRP5FXST.js → chunk-KCHQVED5.js} +18 -17
- package/dist/{chunk-Q6ZQX2HX.js → chunk-KCMGIYPO.js} +4 -6
- package/dist/{chunk-MDVJYRJT.js → chunk-KPGPK4SK.js} +22 -22
- package/dist/{chunk-Q2UFOKPB.js → chunk-KPSSNGAE.js} +22 -22
- package/dist/{chunk-V4D2ZQBE.js → chunk-KRPLP5LP.js} +6 -1
- package/dist/{chunk-BZX7QCXJ.js → chunk-KRU2LCIP.js} +15 -15
- package/dist/{chunk-HXULJZA2.js → chunk-LDDDKWL6.js} +6 -1
- package/dist/{chunk-NREU4JFE.js → chunk-LNVB75QU.js} +6 -8
- package/dist/{chunk-MX4SZLSV.js → chunk-LUDUDBO6.js} +16 -8
- package/dist/{chunk-2YAFDND3.js → chunk-M4NV5PPU.js} +4 -6
- package/dist/{chunk-26BBJUBW.js → chunk-M6ZQAFPD.js} +4 -6
- package/dist/{chunk-NPWVOFB3.js → chunk-MB2SQF7N.js} +1 -1
- package/dist/{chunk-6ZL2XYM7.js → chunk-MLY5ALOV.js} +6 -6
- package/dist/chunk-NJJCTEBM.js +416 -0
- package/dist/{chunk-OQW4ETJX.js → chunk-NM5V5EKY.js} +6 -1
- package/dist/{chunk-ONYO5WJW.js → chunk-NMK7KJZZ.js} +21 -21
- package/dist/{chunk-6BNNLVAR.js → chunk-NPDVWFAQ.js} +6 -1
- package/dist/{chunk-FTUMRSGT.js → chunk-P5FUWXPW.js} +4 -286
- package/dist/chunk-P7TRFL4P.js +54 -0
- package/dist/{chunk-A4PNWAUW.js → chunk-PGSGJLUR.js} +6 -1
- package/dist/{chunk-DRFGIOZ6.js → chunk-Q7Y6JQ3R.js} +4 -6
- package/dist/{chunk-J2E7EUER.js → chunk-QDRCWVV3.js} +17 -17
- package/dist/{chunk-MXAP37W6.js → chunk-TNV4F5WA.js} +16 -7
- package/dist/{chunk-EBSFSOJC.js → chunk-U7U64UUN.js} +22 -22
- package/dist/chunk-UCHZJJIT.js +421 -0
- package/dist/{chunk-FSJ3ZA6N.js → chunk-UG7AQQNR.js} +12 -12
- package/dist/{chunk-WFA6IULY.js → chunk-URRAWU5D.js} +5 -0
- package/dist/{chunk-VOR32OHN.js → chunk-USAGHYRD.js} +13 -15
- package/dist/{chunk-QUGC7GWB.js → chunk-UVX3IYXF.js} +15 -15
- package/dist/{chunk-B5PEKSRH.js → chunk-VSAKEMDD.js} +6 -1
- package/dist/{chunk-YRYKTYMQ.js → chunk-VSOZZYLK.js} +106 -12
- package/dist/{chunk-5SSTVFPX.js → chunk-WK5QEYFA.js} +5 -7
- package/dist/{chunk-KTGZDMDX.js → chunk-XUTR7GNT.js} +76 -28
- package/dist/{chunk-6WVX4KNP.js → chunk-YDZIVDVR.js} +97 -297
- package/dist/{chunk-URQIWIKX.js → chunk-YXXIRM4C.js} +3 -3
- package/dist/{chunk-H5UEVW6Q.js → chunk-ZD3QCNB7.js} +1 -1
- package/dist/{chunk-DUPZ2BBY.js → chunk-ZTLMEBAC.js} +66 -4
- package/dist/clock.js +168 -0
- package/dist/completion-registry.js +3 -1
- package/dist/countdown.js +36 -395
- package/dist/{dgmo-router-4UAPPIKN.js → dgmo-router-CZN36TR3.js} +50 -43
- package/dist/{dimensions-SCNVYLRF.js → dimensions-7HHKO5BS.js} +3 -3
- package/dist/{d3-BThYBTQk.d.ts → export-context-Ceh3wr0E.d.ts} +2 -8
- package/dist/{flowchart-parser-NA75YQ77.js → flowchart-parser-4MZPWYK6.js} +8 -3
- package/dist/{flowchart-renderer-6MGGX4RC.js → flowchart-renderer-5XDN575E.js} +13 -17
- package/dist/index.d.ts +8 -7
- package/dist/index.js +80 -74
- package/dist/{layout-S3RLVPH4.js → layout-33FHGDEV.js} +10 -12
- package/dist/{layout-MBVBAMPA.js → layout-3TSVAGWH.js} +2 -2
- package/dist/{layout-WRG4APSJ.js → layout-5GHV7HNM.js} +9 -13
- package/dist/layout-FTOGDNUL.js +23 -0
- package/dist/{layout-BNLFQHSB.js → layout-QXGPY7KA.js} +7 -9
- package/dist/{layout-search-PMYL3VWS.js → layout-search-EMTCDC3C.js} +8 -10
- package/dist/{palettes-IN7ZFRJM.js → palettes-4Y7CL2QL.js} +4 -2
- package/dist/{parser-3MK56JZC.js → parser-4Y6PODW6.js} +2 -2
- package/dist/{parser-2NWH5JUS.js → parser-A3AN76RQ.js} +2 -1
- package/dist/{parser-LCJ76UXS.js → parser-BT4NI6JY.js} +5 -1
- package/dist/{parser-FXDS4JDK.js → parser-F7NDRPMA.js} +2 -2
- package/dist/{parser-BES6LV3G.js → parser-GDLKUBTO.js} +5 -1
- package/dist/{parser-SEUTXN6U.js → parser-KJPPUN4D.js} +2 -2
- package/dist/{parser-SIKL4PLF.js → parser-KMKVFET2.js} +5 -1
- package/dist/{parser-5LW5JDYG.js → parser-NL73FSFI.js} +5 -1
- package/dist/{parser-VA7ZQQTA.js → parser-NUU3DVW4.js} +5 -1
- package/dist/{parser-L6RWDXQN.js → parser-OGF2CDA6.js} +8 -3
- package/dist/{parser-XZUKNZPB.js → parser-R3LPEQIT.js} +7 -1
- package/dist/{parser-X23GRTQJ.js → parser-RCIEKN7Y.js} +5 -1
- package/dist/{parser-GX5YLRIP.js → parser-VKYUAT4Y.js} +8 -3
- package/dist/{parser-QYISOAGR.js → parser-YX72VLDZ.js} +8 -3
- package/dist/redraw-MSXU4ZD2.js +73 -0
- package/dist/redraw-T324XAF3.js +1698 -0
- package/dist/{renderer-5VKPB4LL.js → renderer-37PLQHVB.js} +5 -5
- package/dist/{renderer-ISSDGK54.js → renderer-3F47TPZ2.js} +3 -3
- package/dist/{renderer-3QAFDXEY.js → renderer-5ITLW7MX.js} +14 -12
- package/dist/{renderer-ZZ6MWVB7.js → renderer-6GJWADLO.js} +4 -4
- package/dist/{renderer-MM27BSBO.js → renderer-7Y3LR4R2.js} +3 -4
- package/dist/{renderer-2FVUPBGV.js → renderer-AM7P4LN7.js} +1 -1
- package/dist/{renderer-ZHGHTSNG.js → renderer-BO73LSVT.js} +13 -12
- package/dist/{renderer-3IHQI4A4.js → renderer-CNRQFIEI.js} +11 -10
- package/dist/{renderer-OAR5VPH4.js → renderer-DAZWHNLI.js} +2 -2
- package/dist/{renderer-NDA2FFYB.js → renderer-DD6T3C4J.js} +5 -5
- package/dist/{renderer-WIU5BJUK.js → renderer-DDWDCM2K.js} +2 -2
- package/dist/{renderer-7ZZG5HR3.js → renderer-EVKWGUGT.js} +8 -9
- package/dist/{renderer-3JY6JAQJ.js → renderer-FL7EOSBU.js} +5 -6
- package/dist/{renderer-NIE5IW24.js → renderer-GFALLIYT.js} +8 -7
- package/dist/{renderer-O6DY46AV.js → renderer-GFGFHYWY.js} +7 -7
- package/dist/{renderer-5TZVFQ7K.js → renderer-GOXAP2IE.js} +7 -8
- package/dist/{renderer-NHTR7IRR.js → renderer-GPAVVUET.js} +4 -5
- package/dist/{renderer-TO2NVJP3.js → renderer-HJ54YXT3.js} +50 -45
- package/dist/{renderer-LM4ICK6I.js → renderer-HYGTMBHT.js} +4 -5
- package/dist/{renderer-S3YCLJKL.js → renderer-IHCWBFPI.js} +17 -20
- package/dist/{renderer-XO57LTU4.js → renderer-ISDKO3DI.js} +5 -5
- package/dist/{renderer-LQP3AGEJ.js → renderer-J3QWK6IM.js} +3 -4
- package/dist/{renderer-J666LZXJ.js → renderer-J6H4Q3RM.js} +7 -8
- package/dist/{renderer-ALWVK3EJ.js → renderer-JJ4QW3SK.js} +6 -6
- package/dist/{renderer-DC7C5Q3G.js → renderer-NOYLNVTI.js} +2 -2
- package/dist/{renderer-ZGY7P4BM.js → renderer-PBKTAWQV.js} +16 -20
- package/dist/{renderer-XGG2UNXT.js → renderer-POBGKIUT.js} +3 -4
- package/dist/{renderer-QGIHLZOJ.js → renderer-RDI2RYUP.js} +9 -10
- package/dist/{renderer-JEJT3YET.js → renderer-TSCSZ6CL.js} +2 -3
- package/dist/{renderer-VPIELEE5.js → renderer-VDBNC7A6.js} +8 -9
- package/dist/{renderer-J67LMOD5.js → renderer-VI34SD5V.js} +15 -15
- package/dist/{renderer-J5FKF423.js → renderer-W4MUMXJE.js} +7 -4
- package/dist/{renderer-RSK6QFWN.js → renderer-XJMVG2WJ.js} +7 -9
- package/dist/{state-parser-TIR2ORJY.js → state-parser-NPYTMRXP.js} +8 -3
- package/dist/{state-renderer-G6SUXU4J.js → state-renderer-44K2KDX7.js} +15 -19
- package/dist/{tag-groups-DsoVpAY-.d.ts → tag-groups-DydewK3D.d.ts} +2 -173
- package/dist/{themes-DRNjxX7Q.d.ts → themes-DzIH3Hjv.d.ts} +3 -2
- package/docs/ai-integration.md +1 -1
- package/docs/language-reference.md +23 -2
- package/gallery/fixtures/map-undirected-edges.dgmo +5 -5
- package/gallery/fixtures/whiteboard.dgmo +3 -0
- package/package.json +4 -6
- package/dist/chunk-3Y63RFJL.js +0 -75
- package/dist/chunk-5DH3KYFH.js +0 -20
- package/dist/chunk-O753JUEZ.js +0 -67
- package/dist/chunk-RJNZHFNG.js +0 -51
- package/dist/chunk-Z6DXWULM.js +0 -23
- package/dist/layout-5USEVQBY.js +0 -25
- package/dist/{chunk-YITHYQCL.js → chunk-4FT5KQ7H.js} +7 -7
- package/dist/{chunk-GE7ICBX6.js → chunk-4RY5D5RE.js} +4 -4
- package/dist/{chunk-DGUGE67L.js → chunk-CDYV46JE.js} +3 -3
- package/dist/{chunk-IGKFOHBG.js → chunk-CQYFZOUC.js} +13 -13
- package/dist/{chunk-TKAB3FTK.js → chunk-DRQSB72S.js} +11 -11
- package/dist/{chunk-ZKP77MB3.js → chunk-FVTYJUXR.js} +5 -5
- package/dist/{chunk-MA42PIGJ.js → chunk-H5NVCOEJ.js} +4 -4
- package/dist/{chunk-BEA4D7OS.js → chunk-IXHWS2HI.js} +3 -3
- package/dist/{chunk-QKY6W4NA.js → chunk-KHL652SX.js} +25 -25
- package/dist/{chunk-6OIMUSDX.js → chunk-MUJVNSEW.js} +9 -9
- package/dist/{chunk-YO6AQU4A.js → chunk-QJOVZ4TC.js} +12 -12
- package/dist/{chunk-SOHZDW6N.js → chunk-UXNA2H2V.js} +3 -3
- package/dist/{chunk-NO3UX6AP.js → chunk-V2NQV7VL.js} +4 -4
|
@@ -1,36 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createTooltip,
|
|
3
|
+
hideTooltip,
|
|
4
|
+
renderChartTitle,
|
|
5
|
+
showTooltip
|
|
6
|
+
} from "./chunk-6XLMTAEX.js";
|
|
1
7
|
import {
|
|
2
8
|
MONTH_ABBR,
|
|
3
|
-
|
|
4
|
-
|
|
9
|
+
capLabelColumn,
|
|
10
|
+
computeTimeTicks,
|
|
11
|
+
showFullOnHover
|
|
12
|
+
} from "./chunk-VSOZZYLK.js";
|
|
13
|
+
import {
|
|
14
|
+
parseTimelineDate
|
|
15
|
+
} from "./chunk-BQO24BDM.js";
|
|
5
16
|
import {
|
|
6
17
|
ScaleContext
|
|
7
18
|
} from "./chunk-24YPR5EH.js";
|
|
8
|
-
import {
|
|
9
|
-
keepSwimlaneToggleFocus,
|
|
10
|
-
renderIntegratedLegend,
|
|
11
|
-
wireSwimlaneToggle
|
|
12
|
-
} from "./chunk-NMS5XSLX.js";
|
|
13
19
|
import {
|
|
14
20
|
EDGE_DASH,
|
|
15
21
|
GRID_DASH,
|
|
16
22
|
scaleDash
|
|
17
23
|
} from "./chunk-XCKNFFKM.js";
|
|
18
24
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "./chunk-Q6W2K33N.js";
|
|
24
|
-
import {
|
|
25
|
-
FONT_FAMILY
|
|
26
|
-
} from "./chunk-ICLB27PZ.js";
|
|
27
|
-
import {
|
|
28
|
-
parseTimelineDate
|
|
29
|
-
} from "./chunk-BQO24BDM.js";
|
|
25
|
+
keepSwimlaneToggleFocus,
|
|
26
|
+
renderIntegratedLegend,
|
|
27
|
+
wireSwimlaneToggle
|
|
28
|
+
} from "./chunk-NMS5XSLX.js";
|
|
30
29
|
import {
|
|
31
30
|
DEFAULT_PALETTE_ID,
|
|
32
31
|
getPalette
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FMAVHTYB.js";
|
|
33
|
+
import {
|
|
34
|
+
FONT_FAMILY
|
|
35
|
+
} from "./chunk-ICLB27PZ.js";
|
|
34
36
|
import {
|
|
35
37
|
resolveTagColor,
|
|
36
38
|
tagAttrKey
|
|
@@ -48,6 +50,9 @@ import {
|
|
|
48
50
|
measureLegendText,
|
|
49
51
|
truncateLegendText
|
|
50
52
|
} from "./chunk-UOCWYLYT.js";
|
|
53
|
+
import {
|
|
54
|
+
measureText
|
|
55
|
+
} from "./chunk-KAO7JL4I.js";
|
|
51
56
|
import {
|
|
52
57
|
getEraColors,
|
|
53
58
|
getSeriesColors,
|
|
@@ -252,7 +257,8 @@ function renderTimeScale(g, scale, isVertical, innerWidth, innerHeight, textColo
|
|
|
252
257
|
boundaryStart,
|
|
253
258
|
boundaryEnd,
|
|
254
259
|
boundaryStartLabel,
|
|
255
|
-
boundaryEndLabel
|
|
260
|
+
boundaryEndLabel,
|
|
261
|
+
{ fontSize: 10, vertical: isVertical }
|
|
256
262
|
);
|
|
257
263
|
if (ticks.length < 2) return;
|
|
258
264
|
const tickLen = 6;
|
|
@@ -1054,10 +1060,12 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1054
1060
|
...lanes.flatMap((l) => l.events.map((ev) => ev.label.length + 2))
|
|
1055
1061
|
);
|
|
1056
1062
|
const maxLeftLabelLen = Math.max(maxGroupNameLen, maxEventLabelLen);
|
|
1057
|
-
const
|
|
1058
|
-
ctx.aesthetic(140),
|
|
1059
|
-
|
|
1063
|
+
const labelColumn = capLabelColumn(
|
|
1064
|
+
Math.max(ctx.aesthetic(140), maxLeftLabelLen * sCharW + ctx.aesthetic(30)),
|
|
1065
|
+
width,
|
|
1066
|
+
ctx.aesthetic(140)
|
|
1060
1067
|
);
|
|
1068
|
+
const dynamicLeftMargin = labelColumn.width;
|
|
1061
1069
|
const baseTopMargin = title ? 50 : ctx.aesthetic(20);
|
|
1062
1070
|
const margin = {
|
|
1063
1071
|
top: baseTopMargin + topScaleH + eraReserve + markerReserve + tagLegendReserve,
|
|
@@ -1150,7 +1158,20 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1150
1158
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { mode: fillMode })).style("pointer-events", "none");
|
|
1151
1159
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
1152
1160
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
1153
|
-
headerG.append("text").attr("x", bandX + 5).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold")
|
|
1161
|
+
const headerText = headerG.append("text").attr("x", bandX + 5).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold");
|
|
1162
|
+
const headerFull = `${toggleIcon} ${lane.name}`;
|
|
1163
|
+
showFullOnHover(
|
|
1164
|
+
headerG,
|
|
1165
|
+
headerText,
|
|
1166
|
+
headerText,
|
|
1167
|
+
headerFull,
|
|
1168
|
+
labelColumn.fit(
|
|
1169
|
+
headerFull,
|
|
1170
|
+
bandX + 5 + margin.left,
|
|
1171
|
+
sLaneHeaderFont,
|
|
1172
|
+
true
|
|
1173
|
+
)
|
|
1174
|
+
);
|
|
1154
1175
|
if (lane.events.length > 0) {
|
|
1155
1176
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
1156
1177
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -1206,7 +1227,19 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1206
1227
|
const icon = isPoint ? "\u25C6" : "\u25CF";
|
|
1207
1228
|
const labelEl = evG.append("text").attr("class", "tl-event-label").attr("x", -margin.left + ctx.aesthetic(20)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size", sEventFont).attr("fill", textColor);
|
|
1208
1229
|
labelEl.append("tspan").attr("fill", evColor).text(icon);
|
|
1209
|
-
labelEl.append("tspan").attr("fill", textColor)
|
|
1230
|
+
const labelTextEl = labelEl.append("tspan").attr("fill", textColor);
|
|
1231
|
+
showFullOnHover(
|
|
1232
|
+
evG,
|
|
1233
|
+
labelEl,
|
|
1234
|
+
labelTextEl,
|
|
1235
|
+
ev.label,
|
|
1236
|
+
labelColumn.fit(
|
|
1237
|
+
ev.label,
|
|
1238
|
+
ctx.aesthetic(20) + measureText(icon + " ", sEventFont),
|
|
1239
|
+
sEventFont
|
|
1240
|
+
),
|
|
1241
|
+
" "
|
|
1242
|
+
);
|
|
1210
1243
|
if (ev.endDate) {
|
|
1211
1244
|
const x2 = xScale(parseTimelineDate(ev.endDate));
|
|
1212
1245
|
const rectW = Math.max(x2 - x, 4);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractPaletteDirective
|
|
3
|
+
} from "./chunk-CYTFO2LF.js";
|
|
1
4
|
import {
|
|
2
5
|
PYRAMID_REGISTRY,
|
|
3
6
|
measureIndent,
|
|
@@ -25,7 +28,9 @@ function parsePyramid(content) {
|
|
|
25
28
|
diagnostics: [],
|
|
26
29
|
error: null
|
|
27
30
|
};
|
|
28
|
-
const
|
|
31
|
+
const directive = extractPaletteDirective(content);
|
|
32
|
+
result.diagnostics.push(...directive.diagnostics);
|
|
33
|
+
const lines = directive.content.split("\n");
|
|
29
34
|
let headerParsed = false;
|
|
30
35
|
let currentLayer = null;
|
|
31
36
|
const fail = makeFail(result);
|
|
@@ -5,23 +5,24 @@ import {
|
|
|
5
5
|
NODE_LABEL_LINE_HEIGHT,
|
|
6
6
|
layoutGraph,
|
|
7
7
|
wrapNodeLabel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WK5QEYFA.js";
|
|
9
9
|
import {
|
|
10
10
|
appendArrowheadMarkers
|
|
11
11
|
} from "./chunk-XBJJP2HN.js";
|
|
12
|
-
import {
|
|
13
|
-
NOTE_BADGE_RADIUS,
|
|
14
|
-
noteConnectorPoints,
|
|
15
|
-
renderNoteBadge,
|
|
16
|
-
renderNoteBox,
|
|
17
|
-
renderNoteConnector
|
|
18
|
-
} from "./chunk-JRWUHLRP.js";
|
|
19
12
|
import {
|
|
20
13
|
fitDiagramToCanvas
|
|
21
14
|
} from "./chunk-EPDBWATV.js";
|
|
15
|
+
import {
|
|
16
|
+
serializeSvg
|
|
17
|
+
} from "./chunk-CYRB2JTN.js";
|
|
22
18
|
import {
|
|
23
19
|
ScaleContext
|
|
24
20
|
} from "./chunk-24YPR5EH.js";
|
|
21
|
+
import {
|
|
22
|
+
TITLE_FONT_SIZE,
|
|
23
|
+
TITLE_FONT_WEIGHT,
|
|
24
|
+
TITLE_Y
|
|
25
|
+
} from "./chunk-VLC6WNRD.js";
|
|
25
26
|
import {
|
|
26
27
|
ARROWHEAD_HEIGHT,
|
|
27
28
|
ARROWHEAD_WIDTH,
|
|
@@ -30,19 +31,18 @@ import {
|
|
|
30
31
|
NODE_STROKE_WIDTH
|
|
31
32
|
} from "./chunk-XCKNFFKM.js";
|
|
32
33
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
parseFlowchart
|
|
35
|
+
} from "./chunk-M6ZQAFPD.js";
|
|
35
36
|
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
NOTE_BADGE_RADIUS,
|
|
38
|
+
noteConnectorPoints,
|
|
39
|
+
renderNoteBadge,
|
|
40
|
+
renderNoteBox,
|
|
41
|
+
renderNoteConnector
|
|
42
|
+
} from "./chunk-D6PVMUCX.js";
|
|
40
43
|
import {
|
|
41
44
|
FONT_FAMILY
|
|
42
45
|
} from "./chunk-ICLB27PZ.js";
|
|
43
|
-
import {
|
|
44
|
-
parseFlowchart
|
|
45
|
-
} from "./chunk-26BBJUBW.js";
|
|
46
46
|
import {
|
|
47
47
|
fillModeFromOptions
|
|
48
48
|
} from "./chunk-TIIZIAGS.js";
|
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MONTH_ABBR,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
capLabelColumn,
|
|
4
|
+
computeTimeTicks,
|
|
5
|
+
showFullOnHover
|
|
6
|
+
} from "./chunk-VSOZZYLK.js";
|
|
5
7
|
import {
|
|
6
8
|
ScaleContext
|
|
7
9
|
} from "./chunk-24YPR5EH.js";
|
|
8
10
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
INLINE_HEADER_PAD,
|
|
12
|
+
layoutInlineHeader
|
|
13
|
+
} from "./chunk-42UJ23H3.js";
|
|
14
|
+
import {
|
|
15
|
+
TITLE_FONT_SIZE,
|
|
16
|
+
TITLE_FONT_WEIGHT,
|
|
17
|
+
TITLE_Y
|
|
18
|
+
} from "./chunk-VLC6WNRD.js";
|
|
13
19
|
import {
|
|
14
20
|
EDGE_DASH,
|
|
15
21
|
GRID_DASH,
|
|
16
22
|
HAIRLINE_DASH
|
|
17
23
|
} from "./chunk-XCKNFFKM.js";
|
|
18
24
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
keepSwimlaneToggleFocus,
|
|
26
|
+
renderIntegratedLegend,
|
|
27
|
+
wireSwimlaneToggle
|
|
28
|
+
} from "./chunk-NMS5XSLX.js";
|
|
22
29
|
import {
|
|
23
30
|
controlsGroupCapsuleWidth,
|
|
24
31
|
getLegendExtent,
|
|
25
32
|
getMaxLegendReservedHeight
|
|
26
33
|
} from "./chunk-JILEYZ2V.js";
|
|
27
34
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
TITLE_Y
|
|
31
|
-
} from "./chunk-VLC6WNRD.js";
|
|
35
|
+
normalizeName
|
|
36
|
+
} from "./chunk-NOTA6TEI.js";
|
|
32
37
|
import {
|
|
33
38
|
FONT_FAMILY
|
|
34
39
|
} from "./chunk-ICLB27PZ.js";
|
|
35
|
-
import {
|
|
36
|
-
normalizeName
|
|
37
|
-
} from "./chunk-NOTA6TEI.js";
|
|
38
40
|
import {
|
|
39
41
|
UNTAGGED_TAG_COLOR,
|
|
40
42
|
resolveActiveTagGroup,
|
|
@@ -130,7 +132,7 @@ function renderLabelBand(svg, y, leftMargin, color, palette, isDark, cssPrefix,
|
|
|
130
132
|
function appendTaskIcon(textEl, label, isMilestone, iconColor, textColor) {
|
|
131
133
|
const icon = isMilestone ? "\u25C6" : "\u25CF";
|
|
132
134
|
textEl.append("tspan").attr("fill", iconColor).text(icon);
|
|
133
|
-
textEl.append("tspan").attr("fill", textColor).text(" " + label);
|
|
135
|
+
return textEl.append("tspan").attr("fill", textColor).text(" " + label);
|
|
134
136
|
}
|
|
135
137
|
function renderGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
136
138
|
keepSwimlaneToggleFocus(
|
|
@@ -182,7 +184,14 @@ function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
|
182
184
|
...labelWidths,
|
|
183
185
|
measureText("0000000000", LABEL_FONT)
|
|
184
186
|
);
|
|
185
|
-
const
|
|
187
|
+
const containerWidth = exportDims?.width ?? (container.clientWidth || 800);
|
|
188
|
+
const labelColumn = capLabelColumn(
|
|
189
|
+
Math.max(MIN_LEFT_MARGIN, maxLabelWidth + 30),
|
|
190
|
+
containerWidth,
|
|
191
|
+
MIN_LEFT_MARGIN
|
|
192
|
+
);
|
|
193
|
+
const leftMargin = labelColumn.width;
|
|
194
|
+
const fitLabel = labelColumn.fit;
|
|
186
195
|
const totalRows = rows.length;
|
|
187
196
|
const hasCriticalPath = resolved.options.criticalPath && resolved.tasks.some((t) => t.isCriticalPath);
|
|
188
197
|
const hasDependencies = resolved.options.dependencies && resolved.tasks.some((t) => t.task.dependencies.length > 0);
|
|
@@ -196,7 +205,6 @@ function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
|
196
205
|
const title = resolved.options.title;
|
|
197
206
|
const showTitle = !!title && !resolved.options.noTitle;
|
|
198
207
|
const titleHeight = showTitle ? 50 : 20;
|
|
199
|
-
const containerWidth = exportDims?.width ?? (container.clientWidth || 800);
|
|
200
208
|
const hasTagLegend = !resolved.options.noLegend && (resolved.tagGroups.length > 0 || hasCriticalPath || hasDependencies);
|
|
201
209
|
const tagLegendReserve = hasTagLegend ? getMaxLegendReservedHeight(
|
|
202
210
|
{
|
|
@@ -492,8 +500,14 @@ function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
|
492
500
|
restoreHighlight();
|
|
493
501
|
hideGanttDateIndicators(g);
|
|
494
502
|
});
|
|
495
|
-
|
|
496
|
-
|
|
503
|
+
const laneFullText = toggleIcon + " " + row.laneName + (row.aggregateProgress !== null ? ` ${Math.round(row.aggregateProgress)}%` : "");
|
|
504
|
+
const laneText = labelG.append("text").attr("x", labelX).attr("y", sMarginTop + yOffset + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size", sFont11).attr("font-weight", "bold").attr("fill", laneColor);
|
|
505
|
+
showFullOnHover(
|
|
506
|
+
labelG,
|
|
507
|
+
laneText,
|
|
508
|
+
laneText,
|
|
509
|
+
laneFullText,
|
|
510
|
+
fitLabel(laneFullText, labelX, sFont11, true)
|
|
497
511
|
);
|
|
498
512
|
if (laneBarWidth > 0) {
|
|
499
513
|
const barFill = shapeFill(palette, laneColor, isDark, {
|
|
@@ -567,8 +581,14 @@ function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
|
567
581
|
});
|
|
568
582
|
const groupIndent = group.depth <= 2 ? group.depth * 14 : 2 * 14 + (group.depth - 2) * 8;
|
|
569
583
|
const labelX = 10 + groupIndent;
|
|
570
|
-
|
|
571
|
-
|
|
584
|
+
const groupFullText = toggleIcon + " " + group.name + (group.progress !== null ? ` ${Math.round(group.progress)}%` : "");
|
|
585
|
+
const groupText = labelG.append("text").attr("x", labelX).attr("y", sMarginTop + yOffset + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size", sFont11).attr("font-weight", "bold").attr("fill", palette.text);
|
|
586
|
+
showFullOnHover(
|
|
587
|
+
labelG,
|
|
588
|
+
groupText,
|
|
589
|
+
groupText,
|
|
590
|
+
groupFullText,
|
|
591
|
+
fitLabel(groupFullText, labelX, sFont11, true)
|
|
572
592
|
);
|
|
573
593
|
const gStart = dateToFractionalYear(group.startDate);
|
|
574
594
|
const gEnd = dateToFractionalYear(group.endDate);
|
|
@@ -696,13 +716,25 @@ function drawGantt(container, resolved, palette, isDark, options, exportDims) {
|
|
|
696
716
|
}).on("mouseleave", () => {
|
|
697
717
|
resetHighlight(g, svg);
|
|
698
718
|
});
|
|
699
|
-
appendTaskIcon(
|
|
719
|
+
const taskLabelText = appendTaskIcon(
|
|
700
720
|
taskLabel,
|
|
701
721
|
task.label,
|
|
702
722
|
rt.isMilestone,
|
|
703
723
|
barColor,
|
|
704
724
|
palette.text
|
|
705
725
|
);
|
|
726
|
+
const taskIconW = measureText(
|
|
727
|
+
(rt.isMilestone ? "\u25C6" : "\u25CF") + " ",
|
|
728
|
+
sFont11
|
|
729
|
+
);
|
|
730
|
+
showFullOnHover(
|
|
731
|
+
taskLabel,
|
|
732
|
+
taskLabel,
|
|
733
|
+
taskLabelText,
|
|
734
|
+
task.label,
|
|
735
|
+
fitLabel(task.label, taskLabelX + taskIconW, sFont11),
|
|
736
|
+
" "
|
|
737
|
+
);
|
|
706
738
|
for (const [key, value] of Object.entries(rt.effectiveMetadata)) {
|
|
707
739
|
taskLabel.attr(`data-tag-${tagAttrKey(key)}`, value.toLowerCase());
|
|
708
740
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderInlineText
|
|
3
|
-
} from "./chunk-S7W75MIM.js";
|
|
4
1
|
import {
|
|
5
2
|
BOX_H,
|
|
6
3
|
BOX_W,
|
|
@@ -9,21 +6,24 @@ import {
|
|
|
9
6
|
layoutBracket,
|
|
10
7
|
wrapText
|
|
11
8
|
} from "./chunk-ZI6WC24V.js";
|
|
12
|
-
import {
|
|
13
|
-
renderIntegratedLegend
|
|
14
|
-
} from "./chunk-NMS5XSLX.js";
|
|
15
9
|
import {
|
|
16
10
|
layoutInlineHeader
|
|
17
11
|
} from "./chunk-42UJ23H3.js";
|
|
18
|
-
import {
|
|
19
|
-
getLegendExtent,
|
|
20
|
-
getMaxLegendReservedHeight
|
|
21
|
-
} from "./chunk-JILEYZ2V.js";
|
|
22
12
|
import {
|
|
23
13
|
TITLE_FONT_SIZE,
|
|
24
14
|
TITLE_FONT_WEIGHT,
|
|
25
15
|
TITLE_Y
|
|
26
16
|
} from "./chunk-VLC6WNRD.js";
|
|
17
|
+
import {
|
|
18
|
+
renderIntegratedLegend
|
|
19
|
+
} from "./chunk-NMS5XSLX.js";
|
|
20
|
+
import {
|
|
21
|
+
getLegendExtent,
|
|
22
|
+
getMaxLegendReservedHeight
|
|
23
|
+
} from "./chunk-JILEYZ2V.js";
|
|
24
|
+
import {
|
|
25
|
+
renderInlineText
|
|
26
|
+
} from "./chunk-65GPEV5V.js";
|
|
27
27
|
import {
|
|
28
28
|
FONT_FAMILY
|
|
29
29
|
} from "./chunk-ICLB27PZ.js";
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WHITEBOARD_COLORS,
|
|
3
|
+
WHITEBOARD_ELEMENT_KEYWORDS,
|
|
4
|
+
WHITEBOARD_NOTE_COLOR,
|
|
5
|
+
WHITEBOARD_NOTE_HEIGHT,
|
|
6
|
+
WHITEBOARD_NOTE_WIDTH,
|
|
7
|
+
isWhiteboardColor,
|
|
8
|
+
isWhiteboardShapeKind
|
|
9
|
+
} from "./chunk-P7TRFL4P.js";
|
|
10
|
+
import {
|
|
11
|
+
extractPaletteDirective
|
|
12
|
+
} from "./chunk-CYTFO2LF.js";
|
|
13
|
+
import {
|
|
14
|
+
matchTagBlockHeading
|
|
15
|
+
} from "./chunk-4SACN2C5.js";
|
|
1
16
|
import {
|
|
2
17
|
parseFirstLine,
|
|
3
18
|
recognizeGlobalBoolean
|
|
@@ -20,7 +35,8 @@ var WHITEBOARD_DIAGNOSTIC_CODES = {
|
|
|
20
35
|
BAD_INK: "W_WHITEBOARD_BAD_INK",
|
|
21
36
|
BAD_IMAGE_REF: "W_WHITEBOARD_BAD_IMAGE_REF",
|
|
22
37
|
EMPTY_TEXT: "W_WHITEBOARD_EMPTY_TEXT",
|
|
23
|
-
UNEXPECTED_BODY: "W_WHITEBOARD_UNEXPECTED_BODY"
|
|
38
|
+
UNEXPECTED_BODY: "W_WHITEBOARD_UNEXPECTED_BODY",
|
|
39
|
+
BAD_TAG_ENTRY: "W_WHITEBOARD_BAD_TAG_ENTRY"
|
|
24
40
|
};
|
|
25
41
|
var s = (v) => typeof v === "string" || typeof v === "number" ? String(v) : "?";
|
|
26
42
|
var WHITEBOARD_DIAGNOSTICS = [
|
|
@@ -122,6 +138,15 @@ var WHITEBOARD_DIAGNOSTICS = [
|
|
|
122
138
|
message: (p) => `${s(p.element)} takes no indented lines \u2014 ${s(p.count)} ignored`,
|
|
123
139
|
hint: "Only shapes, notes, arrows, lines and text have a label that can run over indented lines. Unindent the line if it is meant as its own element.",
|
|
124
140
|
example: "whiteboard\nimage board.assets/a.webp at: 0 0, size: 320 200\n caption"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
code: WHITEBOARD_DIAGNOSTIC_CODES.BAD_TAG_ENTRY,
|
|
144
|
+
severity: "warning",
|
|
145
|
+
chartType: "whiteboard",
|
|
146
|
+
title: "Tag entry without a colour",
|
|
147
|
+
message: (p) => `Tag entry "${s(p.entry)}" names no colour \u2014 ignored (end it with one of: red, green, blue, teal, purple, orange, yellow, cyan, gray)`,
|
|
148
|
+
hint: "A whiteboard tag entry gives a colour a meaning, so it ends with the colour it names: `Blocked red`.",
|
|
149
|
+
example: "whiteboard\ntag Meaning\n Blocked"
|
|
125
150
|
}
|
|
126
151
|
];
|
|
127
152
|
var BY_CODE = new Map(WHITEBOARD_DIAGNOSTICS.map((d) => [d.code, d]));
|
|
@@ -319,47 +344,6 @@ function decodeInk(encoded) {
|
|
|
319
344
|
return { points, error: null };
|
|
320
345
|
}
|
|
321
346
|
|
|
322
|
-
// src/whiteboard/types.ts
|
|
323
|
-
var WHITEBOARD_COLORS = [
|
|
324
|
-
"ink",
|
|
325
|
-
"red",
|
|
326
|
-
"green",
|
|
327
|
-
"blue",
|
|
328
|
-
"teal",
|
|
329
|
-
"purple",
|
|
330
|
-
"orange",
|
|
331
|
-
"yellow",
|
|
332
|
-
"cyan",
|
|
333
|
-
"gray"
|
|
334
|
-
];
|
|
335
|
-
var WHITEBOARD_SHAPE_KINDS = [
|
|
336
|
-
"rectangle",
|
|
337
|
-
"ellipse",
|
|
338
|
-
"database",
|
|
339
|
-
"queue"
|
|
340
|
-
];
|
|
341
|
-
var WHITEBOARD_ELEMENT_KEYWORDS = [
|
|
342
|
-
...WHITEBOARD_SHAPE_KINDS,
|
|
343
|
-
"note",
|
|
344
|
-
"arrow",
|
|
345
|
-
"line",
|
|
346
|
-
"text",
|
|
347
|
-
"image",
|
|
348
|
-
"ink"
|
|
349
|
-
];
|
|
350
|
-
var WHITEBOARD_STROKE_STYLES = ["solid", "dashed"];
|
|
351
|
-
var WHITEBOARD_FILLS = ["tint", "solid", "outline"];
|
|
352
|
-
var WHITEBOARD_HEADS = ["end", "both"];
|
|
353
|
-
var WHITEBOARD_NOTE_WIDTH = 160;
|
|
354
|
-
var WHITEBOARD_NOTE_HEIGHT = 99;
|
|
355
|
-
var WHITEBOARD_NOTE_COLOR = "yellow";
|
|
356
|
-
function isWhiteboardColor(value) {
|
|
357
|
-
return WHITEBOARD_COLORS.includes(value);
|
|
358
|
-
}
|
|
359
|
-
function isWhiteboardShapeKind(value) {
|
|
360
|
-
return WHITEBOARD_SHAPE_KINDS.includes(value);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
347
|
// src/whiteboard/parser.ts
|
|
364
348
|
var WHITEBOARD_COORD_MAX = 1e6;
|
|
365
349
|
var META_KEY_RE = /(^|\s)([a-z][a-z-]*):(?=\s|$)/;
|
|
@@ -451,6 +435,7 @@ function parseWhiteboard(content, _palette) {
|
|
|
451
435
|
titleLineNumber: null,
|
|
452
436
|
elements,
|
|
453
437
|
options,
|
|
438
|
+
tagGroups: [],
|
|
454
439
|
diagnostics: [],
|
|
455
440
|
error: null
|
|
456
441
|
};
|
|
@@ -559,7 +544,9 @@ function parseWhiteboard(content, _palette) {
|
|
|
559
544
|
});
|
|
560
545
|
}
|
|
561
546
|
};
|
|
562
|
-
const
|
|
547
|
+
const directive = extractPaletteDirective(content);
|
|
548
|
+
result.diagnostics.push(...directive.diagnostics);
|
|
549
|
+
const lines = directive.content.split("\n");
|
|
563
550
|
let firstLineSeen = false;
|
|
564
551
|
for (let i = 0; i < lines.length; i++) {
|
|
565
552
|
const lineNumber = i + 1;
|
|
@@ -587,6 +574,46 @@ function parseWhiteboard(content, _palette) {
|
|
|
587
574
|
const sp = trimmed.search(/\s/);
|
|
588
575
|
const word = (sp === -1 ? trimmed : trimmed.slice(0, sp)).toLowerCase();
|
|
589
576
|
const rest = sp === -1 ? "" : trimmed.slice(sp + 1).trim();
|
|
577
|
+
if (word === "tag") {
|
|
578
|
+
const heading = matchTagBlockHeading(trimmed);
|
|
579
|
+
if (heading) {
|
|
580
|
+
const entries = [];
|
|
581
|
+
const addEntry = (raw, line) => {
|
|
582
|
+
const text = raw.trim();
|
|
583
|
+
const sp2 = text.lastIndexOf(" ");
|
|
584
|
+
const color = sp2 === -1 ? "" : text.slice(sp2 + 1);
|
|
585
|
+
const value = sp2 === -1 ? "" : text.slice(0, sp2).trim();
|
|
586
|
+
if (!value || !isWhiteboardColor(color) || color === "ink") {
|
|
587
|
+
warn(line, WHITEBOARD_DIAGNOSTIC_CODES.BAD_TAG_ENTRY, { entry: text });
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
entries.push({
|
|
591
|
+
value,
|
|
592
|
+
color,
|
|
593
|
+
authoredColor: color,
|
|
594
|
+
lineNumber: line
|
|
595
|
+
});
|
|
596
|
+
};
|
|
597
|
+
for (const v of heading.inlineValues ?? []) addEntry(v, lineNumber);
|
|
598
|
+
const base = indentOf(lines[i]);
|
|
599
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
600
|
+
const raw = lines[j];
|
|
601
|
+
if (!raw.trim()) continue;
|
|
602
|
+
if (indentOf(raw) <= base) break;
|
|
603
|
+
i = j;
|
|
604
|
+
if (raw.trim().startsWith("//")) continue;
|
|
605
|
+
addEntry(raw, j + 1);
|
|
606
|
+
}
|
|
607
|
+
const group = {
|
|
608
|
+
name: heading.name,
|
|
609
|
+
...heading.alias !== void 0 && { alias: heading.alias },
|
|
610
|
+
entries,
|
|
611
|
+
lineNumber
|
|
612
|
+
};
|
|
613
|
+
result.tagGroups.push(group);
|
|
614
|
+
continue;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
590
617
|
const { body, end } = collectBody(lines, i);
|
|
591
618
|
i = end;
|
|
592
619
|
const noBody = (element) => {
|
|
@@ -765,17 +792,6 @@ export {
|
|
|
765
792
|
INK_PRESSURE_LEVELS,
|
|
766
793
|
encodeInk,
|
|
767
794
|
decodeInk,
|
|
768
|
-
WHITEBOARD_COLORS,
|
|
769
|
-
WHITEBOARD_SHAPE_KINDS,
|
|
770
|
-
WHITEBOARD_ELEMENT_KEYWORDS,
|
|
771
|
-
WHITEBOARD_STROKE_STYLES,
|
|
772
|
-
WHITEBOARD_FILLS,
|
|
773
|
-
WHITEBOARD_HEADS,
|
|
774
|
-
WHITEBOARD_NOTE_WIDTH,
|
|
775
|
-
WHITEBOARD_NOTE_HEIGHT,
|
|
776
|
-
WHITEBOARD_NOTE_COLOR,
|
|
777
|
-
isWhiteboardColor,
|
|
778
|
-
isWhiteboardShapeKind,
|
|
779
795
|
isWhiteboardImageRef,
|
|
780
796
|
parseWhiteboard
|
|
781
797
|
};
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
safeHref
|
|
3
|
-
} from "./chunk-Z6DXWULM.js";
|
|
4
1
|
import {
|
|
5
2
|
MONO_FAMILY
|
|
6
3
|
} from "./chunk-ICLB27PZ.js";
|
|
7
4
|
|
|
5
|
+
// src/utils/safe-href.ts
|
|
6
|
+
var ALLOWED_SCHEMES = ["http", "https", "mailto"];
|
|
7
|
+
var SCHEME_RE = /^([a-z][a-z0-9+.-]*):/i;
|
|
8
|
+
var LEADING_TRIM_RE = /^[\x00-\x20]+/;
|
|
9
|
+
var URL_STRIP_RE = /[\x09\x0A\x0D]/g;
|
|
10
|
+
function safeHref(url) {
|
|
11
|
+
if (typeof url !== "string") return null;
|
|
12
|
+
const trimmed = url.replace(URL_STRIP_RE, "").replace(LEADING_TRIM_RE, "");
|
|
13
|
+
if (trimmed.length === 0) return null;
|
|
14
|
+
const match = SCHEME_RE.exec(trimmed);
|
|
15
|
+
if (!match) {
|
|
16
|
+
return url;
|
|
17
|
+
}
|
|
18
|
+
const scheme = match[1].toLowerCase();
|
|
19
|
+
if (ALLOWED_SCHEMES.includes(scheme)) {
|
|
20
|
+
return url;
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
8
25
|
// src/utils/inline-markdown.ts
|
|
9
26
|
function parseInlineMarkdown(text) {
|
|
10
27
|
const spans = [];
|
|
@@ -72,6 +89,7 @@ function renderInlineText(textEl, text, palette, fontSize) {
|
|
|
72
89
|
}
|
|
73
90
|
|
|
74
91
|
export {
|
|
92
|
+
safeHref,
|
|
75
93
|
parseInlineMarkdown,
|
|
76
94
|
truncateBareUrl,
|
|
77
95
|
stripInlineMarkdown,
|
|
@@ -93,7 +93,7 @@ var EXPORT_WIDTH = 1200;
|
|
|
93
93
|
var EXPORT_HEIGHT = 800;
|
|
94
94
|
async function resolveExportPalette(theme, palette) {
|
|
95
95
|
if (palette) return palette;
|
|
96
|
-
const { getPalette, DEFAULT_PALETTE_ID } = await import("./palettes-
|
|
96
|
+
const { getPalette, DEFAULT_PALETTE_ID } = await import("./palettes-4Y7CL2QL.js");
|
|
97
97
|
const cfg = getPalette(DEFAULT_PALETTE_ID);
|
|
98
98
|
return theme === "dark" ? cfg.dark : cfg.light;
|
|
99
99
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
wrapDescriptionLines
|
|
3
|
-
} from "./chunk-NPWVOFB3.js";
|
|
4
|
-
import {
|
|
5
|
-
renderInlineText
|
|
6
|
-
} from "./chunk-S7W75MIM.js";
|
|
7
1
|
import {
|
|
8
2
|
ScaleContext
|
|
9
3
|
} from "./chunk-24YPR5EH.js";
|
|
@@ -12,6 +6,12 @@ import {
|
|
|
12
6
|
TITLE_FONT_WEIGHT,
|
|
13
7
|
TITLE_Y
|
|
14
8
|
} from "./chunk-VLC6WNRD.js";
|
|
9
|
+
import {
|
|
10
|
+
wrapDescriptionLines
|
|
11
|
+
} from "./chunk-MB2SQF7N.js";
|
|
12
|
+
import {
|
|
13
|
+
renderInlineText
|
|
14
|
+
} from "./chunk-65GPEV5V.js";
|
|
15
15
|
import {
|
|
16
16
|
FONT_FAMILY
|
|
17
17
|
} from "./chunk-ICLB27PZ.js";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
tryCollectNote
|
|
3
|
-
} from "./chunk-3Y63RFJL.js";
|
|
4
|
-
import {
|
|
5
|
-
resolveNotes
|
|
6
|
-
} from "./chunk-O753JUEZ.js";
|
|
7
1
|
import {
|
|
8
2
|
parseInArrowLabel
|
|
9
3
|
} from "./chunk-N7VMGZCU.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveNotes,
|
|
6
|
+
tryCollectNote
|
|
7
|
+
} from "./chunk-NJJCTEBM.js";
|
|
10
8
|
import {
|
|
11
9
|
normalizeName
|
|
12
10
|
} from "./chunk-NOTA6TEI.js";
|