@diagrammo/dgmo 0.49.0 → 0.50.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 +6 -2
- package/.github/copilot-instructions.md +6 -2
- package/.windsurfrules +6 -2
- package/SKILL.md +6 -2
- package/dist/advanced.d.ts +419 -12
- package/dist/advanced.js +557 -195
- package/dist/auto.js +129 -119
- package/dist/auto.mjs +11543 -4815
- package/dist/block.js +145 -48
- package/dist/{charts-d3-EW3YQTEA.js → charts-d3-DKUD7MQE.js} +5 -5
- package/dist/{chunk-5FGDJIJX.js → chunk-2C56LEML.js} +3 -3
- package/dist/{chunk-35BBZDFE.js → chunk-2JJ2KNPI.js} +4 -4
- package/dist/{chunk-ZTLWVRNS.js → chunk-2QYTMIRR.js} +2 -2
- package/dist/{chunk-VC3TR4NL.js → chunk-3G6TMNVF.js} +3 -3
- package/dist/{chunk-ZDUQGL3N.js → chunk-3LKM6FMW.js} +2 -2
- package/dist/{chunk-4BD7EVPK.js → chunk-3P2DKJCG.js} +2 -2
- package/dist/{chunk-6CLKNXVP.js → chunk-3TDRHT4J.js} +457 -78
- package/dist/chunk-3XPUDB7B.js +420 -0
- package/dist/{chunk-DDTJ5N7Q.js → chunk-3ZPC476N.js} +6 -6
- package/dist/{chunk-BPIJLRYE.js → chunk-4BMJQFNK.js} +3 -3
- package/dist/{chunk-N4J5KGWG.js → chunk-4S723I74.js} +8 -8
- package/dist/{chunk-4YNP6O47.js → chunk-5JSWBPZZ.js} +3 -3
- package/dist/{chunk-KUBBJ2CD.js → chunk-5Z736BSU.js} +6 -6
- package/dist/{chunk-MJCG5K2O.js → chunk-6BFZKBGD.js} +2 -2
- package/dist/{chunk-XCC2RENT.js → chunk-6IAA2QQ2.js} +2 -2
- package/dist/{chunk-FUCAB3KQ.js → chunk-6M5PJFQG.js} +3 -3
- package/dist/{chunk-T7IKPCMI.js → chunk-6X4AKWLF.js} +3 -3
- package/dist/{chunk-JFPY3UJ7.js → chunk-6ZT4U37Q.js} +8 -8
- package/dist/{chunk-CLR4A2N2.js → chunk-7G2ER4CY.js} +4 -4
- package/dist/chunk-7PQYTZMA.js +681 -0
- package/dist/{chunk-LG4TWW4U.js → chunk-7RB5Q6MB.js} +8 -8
- package/dist/{chunk-7OVSJI2V.js → chunk-A3WQVFBS.js} +3 -3
- package/dist/{chunk-X2CH42BN.js → chunk-ASS5YYIZ.js} +7 -7
- package/dist/{chunk-3NFJWFNP.js → chunk-BDXC7MDK.js} +1045 -124
- package/dist/chunk-BTUTZMPT.js +482 -0
- package/dist/{chunk-UVCXZEGU.js → chunk-CVV36CWI.js} +2 -2
- package/dist/{chunk-TC3YWBFO.js → chunk-DMJJ3CEQ.js} +29 -8
- package/dist/{chunk-NVT6C2VE.js → chunk-EJTKV7CY.js} +4 -4
- package/dist/{chunk-4NQ3IKUM.js → chunk-ER5SCQWQ.js} +5 -5
- package/dist/{chunk-7VLUGEMJ.js → chunk-F5UDBSJY.js} +4 -4
- package/dist/{chunk-IHLSHCPZ.js → chunk-FAL7NOK3.js} +5 -5
- package/dist/{chunk-YRVLP7UU.js → chunk-FB2WHOEQ.js} +4 -4
- package/dist/chunk-FL4IOQ37.js +379 -0
- package/dist/{chunk-6VE3VLWM.js → chunk-GBE54KY6.js} +6 -5
- package/dist/{chunk-ZXL6MB4R.js → chunk-GL5UZ6NY.js} +3 -3
- package/dist/{chunk-3BIAFYD2.js → chunk-GPWHQ5FJ.js} +2 -2
- package/dist/chunk-GROQGHCT.js +960 -0
- package/dist/{chunk-GB3YZTAM.js → chunk-H73FP42Q.js} +5 -5
- package/dist/{chunk-O5MQPK7E.js → chunk-I4IFRCUB.js} +3 -3
- package/dist/{chunk-IUK7AGD4.js → chunk-I7F2A35O.js} +2 -2
- package/dist/{chunk-YTN572Q2.js → chunk-IA3FJYWR.js} +2 -2
- package/dist/{chunk-RI4NIMFP.js → chunk-JFYIP7XU.js} +75 -35
- package/dist/{chunk-UWDO3O52.js → chunk-JZNMXEIV.js} +2 -2
- package/dist/chunk-KJXIHOVL.js +940 -0
- package/dist/{chunk-26RVGM44.js → chunk-L2ZTFHAY.js} +2 -2
- package/dist/{chunk-PU3AUQPA.js → chunk-M5RXSRO2.js} +2 -2
- package/dist/{chunk-XKTN7CZF.js → chunk-NFFIKVNO.js} +4 -4
- package/dist/{chunk-SVDWQGX2.js → chunk-NISQC5KW.js} +139 -78
- package/dist/{chunk-4HVNZ7WF.js → chunk-O4VUFXIH.js} +3 -3
- package/dist/{chunk-F743CM2N.js → chunk-O76UD6VJ.js} +3 -3
- package/dist/{chunk-TLKMTQYL.js → chunk-OHQEMBLI.js} +3 -3
- package/dist/{chunk-BGJV5ATD.js → chunk-ONA5KPV3.js} +2 -2
- package/dist/{chunk-ZNQX6QWH.js → chunk-OTAL43EH.js} +6 -2
- package/dist/{chunk-FMKTYMP4.js → chunk-OTP5KVLO.js} +3 -3
- package/dist/{chunk-5ZZLLBFK.js → chunk-PGEGPSCZ.js} +2 -2
- package/dist/{chunk-XJ7J6WOO.js → chunk-PJUGRJHJ.js} +4 -4
- package/dist/{chunk-6SA7FJE4.js → chunk-PLZI6KPM.js} +10 -10
- package/dist/{chunk-AJ2PEY7J.js → chunk-PMN3Q7RJ.js} +2 -2
- package/dist/chunk-Q4V4XQWV.js +158 -0
- package/dist/{chunk-5XCM7UUW.js → chunk-QDFNCATJ.js} +99 -35
- package/dist/{chunk-CEHZOPGM.js → chunk-QFQ35BTO.js} +2 -2
- package/dist/{chunk-4UDKKGHH.js → chunk-QUJGFNFN.js} +2 -2
- package/dist/{chunk-IBC35BTK.js → chunk-R56LASIN.js} +2 -2
- package/dist/{chunk-SJEGO2QL.js → chunk-RV26LTUU.js} +4 -4
- package/dist/chunk-RV6A2B5S.js +354 -0
- package/dist/{chunk-65RTDUZH.js → chunk-S5GRONXL.js} +3 -3
- package/dist/{chunk-K6HNAY5V.js → chunk-SCHXJTZL.js} +2 -2
- package/dist/{chunk-ALRHIR6I.js → chunk-SGFZZAUO.js} +4 -4
- package/dist/{chunk-KV6Y2HE6.js → chunk-SU2VBK4L.js} +4 -4
- package/dist/{chunk-D5AVQCDN.js → chunk-T4BRO3Z6.js} +3 -3
- package/dist/{chunk-IFK3GIUW.js → chunk-TSA237IM.js} +2 -2
- package/dist/{chunk-SQDFK5ZQ.js → chunk-TWCLK2GA.js} +3 -3
- package/dist/{chunk-DKEPS5LH.js → chunk-U2HGPLZS.js} +36 -2
- package/dist/{chunk-EYN7VFKL.js → chunk-URSQLCTR.js} +3 -3
- package/dist/{chunk-BCT5G2VN.js → chunk-UUS2GIJZ.js} +5 -5
- package/dist/{chunk-LVHPTBO3.js → chunk-UXOSVCLJ.js} +4 -4
- package/dist/{chunk-HBVD67XG.js → chunk-WCUHAQKB.js} +2 -2
- package/dist/{chunk-YYX3SU6H.js → chunk-WWN566I7.js} +257 -101
- package/dist/{chunk-YM2BSPYW.js → chunk-X2NMFTG3.js} +2 -2
- package/dist/{chunk-ZREZOIGS.js → chunk-XCLHOZAM.js} +6 -6
- package/dist/{chunk-KQAEKMIX.js → chunk-XDXNDSKO.js} +2 -2
- package/dist/{chunk-RTERS6S5.js → chunk-XMVQ5F4M.js} +4 -4
- package/dist/{chunk-4FIV4K4Z.js → chunk-YA7D2N2O.js} +7 -7
- package/dist/{chunk-B57V3DWN.js → chunk-YB3FW24O.js} +3 -3
- package/dist/chunk-YNRDWYZP.js +295 -0
- package/dist/{chunk-2WMBWZY2.js → chunk-YZLMKW4T.js} +3 -3
- package/dist/{chunk-SGHSY3LU.js → chunk-Z6XJQ6KO.js} +81 -6
- package/dist/cli.cjs +153 -144
- package/dist/clock.d.ts +10 -0
- package/dist/clock.js +235 -0
- package/dist/countdown.d.ts +12 -0
- package/dist/countdown.js +450 -0
- package/dist/dgmo-router-QOMFCOOV.js +84 -0
- package/dist/{dimensions-WSIJXT5Q.js → dimensions-P5FSX2QN.js} +5 -5
- package/dist/editor.js +39 -1
- package/dist/element.js +131 -121
- package/dist/element.mjs +11543 -4815
- package/dist/{flowchart-parser-IVZN7CQN.js → flowchart-parser-OE4WHLTF.js} +4 -4
- package/dist/{flowchart-renderer-GMI2U3DD.js → flowchart-renderer-GPCSMTOR.js} +6 -6
- package/dist/highlight.d.ts +17 -1
- package/dist/highlight.js +156 -5
- package/dist/index.js +50 -45
- package/dist/{layout-HQMBPJVS.js → layout-46366KBT.js} +2 -2
- package/dist/{layout-D42XE4RE.js → layout-5BG6DFCU.js} +3 -3
- package/dist/{layout-K2ZN3Q42.js → layout-T3OZU5QW.js} +4 -4
- package/dist/{layout-S3EK4IYO.js → layout-TJIWF7EM.js} +4 -4
- package/dist/{layout-GZ2CWONU.js → layout-VYELEAW7.js} +4 -4
- package/dist/{layout-4Z5JM7PT.js → layout-WZHNDT2O.js} +4 -4
- package/dist/{parser-OBQG655V.js → parser-45DENHFZ.js} +4 -4
- package/dist/{parser-MCJWF5G3.js → parser-4AI5ZN5F.js} +3 -3
- package/dist/{parser-SMBJO3XN.js → parser-4P36TUVD.js} +4 -4
- package/dist/{parser-ZYC3XGNS.js → parser-5AURY4A6.js} +4 -4
- package/dist/{parser-WISPH7LW.js → parser-A2BEFMGK.js} +4 -4
- package/dist/parser-B5FVS7O6.js +11 -0
- package/dist/{parser-KPMN5KKE.js → parser-C2HF2C2E.js} +4 -4
- package/dist/parser-CSFUN3CT.js +14 -0
- package/dist/{parser-TITK4YW6.js → parser-D3QT6GWN.js} +5 -5
- package/dist/{parser-ZKF5K2H2.js → parser-D5637H5H.js} +4 -4
- package/dist/{parser-IKZFTLOJ.js → parser-DFFEDKHH.js} +3 -3
- package/dist/parser-DOKMZXVZ.js +13 -0
- package/dist/parser-FMPCVFRK.js +15 -0
- package/dist/{parser-UBGPTIZD.js → parser-HYRTF3DO.js} +3 -3
- package/dist/{parser-TNYX5S7E.js → parser-I2UIJKVQ.js} +4 -4
- package/dist/{parser-K647FRI4.js → parser-IBWNAPY4.js} +3 -3
- package/dist/{parser-JD7OQ2E6.js → parser-KUQWRPIT.js} +4 -4
- package/dist/{parser-HVJFTOXL.js → parser-LWKKBNSA.js} +3 -3
- package/dist/{parser-4ROBKVUR.js → parser-O4QFCUW7.js} +5 -5
- package/dist/{parser-BL7Z72EY.js → parser-PGMQDD4G.js} +4 -4
- package/dist/{parser-QJYS7KQQ.js → parser-Q4QKCIWQ.js} +4 -4
- package/dist/{parser-UGA23PYK.js → parser-QTOB4KFL.js} +4 -4
- package/dist/{parser-DERPY5KC.js → parser-QYYM4QVW.js} +4 -4
- package/dist/{parser-GFSOPDB7.js → parser-RZMQP7MM.js} +4 -4
- package/dist/parser-RZPVAQVX.js +11 -0
- package/dist/parser-SOUJOEYI.js +13 -0
- package/dist/{parser-MBJSBTL5.js → parser-UQE5OWZI.js} +5 -5
- package/dist/{parser-MRBPXXIV.js → parser-WAV5JRPT.js} +4 -4
- package/dist/{parser-4BKIFG2C.js → parser-YLKYBRIT.js} +5 -5
- package/dist/{parser-D6ONJQFR.js → parser-YS7TOS2K.js} +3 -3
- package/dist/{parser-CLMFZWCC.js → parser-ZSOWUBML.js} +5 -5
- package/dist/{parser-XWUDFJ7P.js → parser-ZTBATMLX.js} +4 -4
- package/dist/{renderer-LWGJFT3D.js → renderer-35HSIDMZ.js} +5 -5
- package/dist/{renderer-BB5PREMY.js → renderer-4ITCHBT7.js} +4 -4
- package/dist/{renderer-YHXPN3GF.js → renderer-67NPCBIS.js} +7 -7
- package/dist/{renderer-TPIBXNOS.js → renderer-6GHYK7DX.js} +6 -6
- package/dist/{renderer-VICQ4WNY.js → renderer-6RNGHC5Z.js} +5 -5
- package/dist/renderer-72LGR2YF.js +14 -0
- package/dist/{renderer-W5RMOURB.js → renderer-7SWMIFMM.js} +6 -6
- package/dist/{renderer-6L3NBEY5.js → renderer-BBCEFILK.js} +6 -6
- package/dist/{renderer-VFUVRNLK.js → renderer-BSW7SRIZ.js} +4 -4
- package/dist/{renderer-CGW7QPNA.js → renderer-BY533UWU.js} +7 -7
- package/dist/{renderer-V3JEMWMM.js → renderer-BZSBPTZJ.js} +6 -6
- package/dist/{renderer-DKESNMU5.js → renderer-CXUC4KAD.js} +6 -6
- package/dist/{renderer-XEKIRPI6.js → renderer-FZUKFUNZ.js} +5 -5
- package/dist/renderer-G2NLGNKF.js +17 -0
- package/dist/{renderer-THD6V5TL.js → renderer-GO3FE3RA.js} +9 -7
- package/dist/{renderer-ROV756WT.js → renderer-HPGR6USK.js} +5 -5
- package/dist/renderer-ICJN2SA2.js +24 -0
- package/dist/{renderer-4IUPINAE.js → renderer-INEXO7B6.js} +7 -7
- package/dist/{renderer-SQ3JUAI7.js → renderer-KDYCFRBX.js} +6 -6
- package/dist/renderer-KY4KQBTF.js +19 -0
- package/dist/{renderer-MJDDU27W.js → renderer-LBN65V45.js} +10 -10
- package/dist/{renderer-UZF3JROD.js → renderer-MGBWOCXG.js} +8 -8
- package/dist/{renderer-MFJ7HY2H.js → renderer-O4JKUGKO.js} +5 -5
- package/dist/{renderer-QL5KO6SK.js → renderer-OOGFODWP.js} +7 -7
- package/dist/{renderer-A5VFZQQK.js → renderer-Q6ZKPLS6.js} +6 -6
- package/dist/{renderer-TYXRHMRI.js → renderer-SZQ326M5.js} +9 -9
- package/dist/{renderer-6T3KK4S3.js → renderer-TKG6LS4U.js} +7 -7
- package/dist/{renderer-QNHUXCRL.js → renderer-TQMZGDAX.js} +9 -9
- package/dist/{renderer-radial-MHO2VDXN.js → renderer-radial-JELMHQ24.js} +6 -6
- package/dist/{state-parser-RX3GXOIB.js → state-parser-3REXRK3R.js} +4 -4
- package/dist/{state-renderer-AJUKGNWU.js → state-renderer-XYLNRWXR.js} +6 -6
- package/docs/ai-integration.md +6 -2
- package/docs/language-reference.md +253 -22
- package/gallery/fixtures/body.dgmo +17 -0
- package/gallery/fixtures/bracket.dgmo +30 -0
- package/gallery/fixtures/clock.dgmo +8 -0
- package/gallery/fixtures/countdown.dgmo +3 -0
- package/gallery/fixtures/goal.dgmo +4 -0
- package/package.json +12 -4
- package/dist/dgmo-router-ODKPEJ3P.js +0 -79
- package/dist/parser-667RGSUW.js +0 -13
- package/dist/parser-J3P2D6IP.js +0 -13
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compactNumber
|
|
3
|
+
} from "./chunk-CVV36CWI.js";
|
|
4
|
+
import {
|
|
5
|
+
parseInlineMarkdown
|
|
6
|
+
} from "./chunk-3HDBAXF5.js";
|
|
7
|
+
import {
|
|
8
|
+
TITLE_FONT_WEIGHT
|
|
9
|
+
} from "./chunk-A4GOY3PE.js";
|
|
10
|
+
import {
|
|
11
|
+
FONT_FAMILY
|
|
12
|
+
} from "./chunk-6KFWC4CO.js";
|
|
13
|
+
import {
|
|
14
|
+
getSeriesColors,
|
|
15
|
+
mix,
|
|
16
|
+
shapeFill,
|
|
17
|
+
themeBaseBg
|
|
18
|
+
} from "./chunk-P6T66CCZ.js";
|
|
19
|
+
import {
|
|
20
|
+
resolveColor
|
|
21
|
+
} from "./chunk-TLVIHFRO.js";
|
|
22
|
+
|
|
23
|
+
// src/goal/renderer.ts
|
|
24
|
+
import * as d3Selection from "d3-selection";
|
|
25
|
+
function clamp(x, lo, hi) {
|
|
26
|
+
return Math.max(lo, Math.min(hi, x));
|
|
27
|
+
}
|
|
28
|
+
var GOAL_TITLE_SIZE = 30;
|
|
29
|
+
function computeMetrics(parsed) {
|
|
30
|
+
const pctFrac = parsed.hasTarget ? parsed.now / parsed.target : 0;
|
|
31
|
+
const fillFrac = clamp(pctFrac, 0, 1);
|
|
32
|
+
const pctLabel = `${Math.round(pctFrac * 100)}%`;
|
|
33
|
+
const targetLabel = parsed.hasTarget ? compactNumber(parsed.target) : "?";
|
|
34
|
+
const valueLabel = `${compactNumber(parsed.now)} / ${targetLabel}`;
|
|
35
|
+
const ariaTarget = parsed.hasTarget ? parsed.target : "?";
|
|
36
|
+
const ariaLabel = `${parsed.title ?? "Goal"}: ${parsed.now} of ${ariaTarget} (${Math.round(
|
|
37
|
+
pctFrac * 100
|
|
38
|
+
)}%)`;
|
|
39
|
+
return { pctFrac, fillFrac, pctLabel, valueLabel, ariaLabel };
|
|
40
|
+
}
|
|
41
|
+
function autoBandColor(pctFrac, palette) {
|
|
42
|
+
const name = pctFrac < 0.5 ? "red" : pctFrac < 0.8 ? "orange" : "green";
|
|
43
|
+
return resolveColor(name, palette) || name;
|
|
44
|
+
}
|
|
45
|
+
function resolvePaint(parsed, palette, isDark, pctFrac) {
|
|
46
|
+
const autoColor = !parsed.options.noAutoColor && parsed.hasTarget ? autoBandColor(pctFrac, palette) : null;
|
|
47
|
+
const base = parsed.color && resolveColor(parsed.color, palette) || parsed.color || autoColor || getSeriesColors(palette)[0];
|
|
48
|
+
return {
|
|
49
|
+
base,
|
|
50
|
+
fill: shapeFill(palette, base, isDark, { solid: parsed.options.solidFill }),
|
|
51
|
+
track: mix(palette.border, themeBaseBg(palette, isDark), 45),
|
|
52
|
+
text: palette.text,
|
|
53
|
+
muted: mix(palette.text, themeBaseBg(palette, isDark), 55)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function renderGoal(container, parsed, palette, isDark, exportDims) {
|
|
57
|
+
d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
|
|
58
|
+
const cw = exportDims?.width ?? container.clientWidth;
|
|
59
|
+
const ch = exportDims?.height ?? container.clientHeight;
|
|
60
|
+
if (cw <= 0 || ch <= 0) return;
|
|
61
|
+
const metrics = computeMetrics(parsed);
|
|
62
|
+
const paint = resolvePaint(parsed, palette, isDark, metrics.pctFrac);
|
|
63
|
+
const svg = d3Selection.select(container).append("svg").attr("width", cw).attr("height", ch).attr("preserveAspectRatio", "xMidYMid meet").attr("xmlns", "http://www.w3.org/2000/svg").attr("role", "img").attr("aria-label", metrics.ariaLabel).style("font-family", FONT_FAMILY);
|
|
64
|
+
const box = parsed.mode === "thermometer" ? renderThermometer(svg, parsed, metrics, paint) : parsed.mode === "gauge" ? renderGauge(svg, parsed, metrics, paint) : renderBar(svg, parsed, metrics, paint);
|
|
65
|
+
const pad = 30;
|
|
66
|
+
const vx = box.minX - pad;
|
|
67
|
+
const vy = box.minY - pad;
|
|
68
|
+
const vw = box.maxX - box.minX + pad * 2;
|
|
69
|
+
const vh = box.maxY - box.minY + pad * 2;
|
|
70
|
+
svg.attr("viewBox", `${vx} ${vy} ${vw} ${vh}`);
|
|
71
|
+
svg.insert("rect", ":first-child").attr("x", vx).attr("y", vy).attr("width", vw).attr("height", vh).attr("fill", palette.bg);
|
|
72
|
+
}
|
|
73
|
+
function renderGoalForExport(container, parsed, palette, isDark, exportDims) {
|
|
74
|
+
renderGoal(container, parsed, palette, isDark, exportDims);
|
|
75
|
+
}
|
|
76
|
+
function displayLen(token) {
|
|
77
|
+
return token.replace(/\[(.+?)\]\((.+?)\)/g, "$1").replace(/\*\*|__|\*|_|`/g, "").length;
|
|
78
|
+
}
|
|
79
|
+
function wrapText(text, maxChars) {
|
|
80
|
+
const words = text.split(/\s+/);
|
|
81
|
+
const lines = [];
|
|
82
|
+
let cur = "";
|
|
83
|
+
for (const w of words) {
|
|
84
|
+
const next = cur ? `${cur} ${w}` : w;
|
|
85
|
+
if (displayLen(next) > maxChars && cur) {
|
|
86
|
+
lines.push(cur);
|
|
87
|
+
cur = w;
|
|
88
|
+
} else {
|
|
89
|
+
cur = next;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (cur) lines.push(cur);
|
|
93
|
+
return lines;
|
|
94
|
+
}
|
|
95
|
+
function layoutDescription(description, colLeft, maxChars) {
|
|
96
|
+
const out = [];
|
|
97
|
+
const indent = 18;
|
|
98
|
+
const contentX = colLeft + indent;
|
|
99
|
+
for (const raw of description.split("\n")) {
|
|
100
|
+
const t = raw.trim();
|
|
101
|
+
if (t === "") {
|
|
102
|
+
out.push({ text: "", x: colLeft });
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const bullet = /^[-*]\s+/.test(t);
|
|
106
|
+
if (bullet) {
|
|
107
|
+
const content = t.replace(/^[-*]\s+/, "");
|
|
108
|
+
const wrapped = wrapText(content, Math.max(6, maxChars - 3));
|
|
109
|
+
wrapped.forEach((wl, k) => {
|
|
110
|
+
out.push(
|
|
111
|
+
k === 0 ? { text: wl, x: contentX, bulletX: colLeft } : { text: wl, x: contentX }
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
for (const wl of wrapText(t, maxChars))
|
|
116
|
+
out.push({ text: wl, x: colLeft });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return out;
|
|
120
|
+
}
|
|
121
|
+
function renderWrappedMarkdown(textEl, lines, lineH) {
|
|
122
|
+
lines.forEach((line, li) => {
|
|
123
|
+
const dy = li === 0 ? 0 : lineH;
|
|
124
|
+
if (line.text === "" && line.bulletX === void 0) {
|
|
125
|
+
textEl.append("tspan").attr("x", line.x).attr("dy", dy).text(" ");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (line.bulletX !== void 0) {
|
|
129
|
+
textEl.append("tspan").attr("x", line.bulletX).attr("dy", dy).text("\u2022");
|
|
130
|
+
}
|
|
131
|
+
let first = true;
|
|
132
|
+
for (const span of parseInlineMarkdown(line.text)) {
|
|
133
|
+
const tspan = textEl.append("tspan").text(span.text);
|
|
134
|
+
if (first) {
|
|
135
|
+
tspan.attr("x", line.x);
|
|
136
|
+
if (line.bulletX === void 0) tspan.attr("dy", dy);
|
|
137
|
+
first = false;
|
|
138
|
+
}
|
|
139
|
+
if (span.bold) tspan.attr("font-weight", "bold");
|
|
140
|
+
if (span.italic) tspan.attr("font-style", "italic");
|
|
141
|
+
if (span.code) tspan.attr("font-family", "monospace");
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function drawNote(svg, description, paint, left, top, width) {
|
|
146
|
+
const descSize = 15;
|
|
147
|
+
const lineH = descSize * 1.4;
|
|
148
|
+
const maxChars = Math.max(8, Math.floor(width / (descSize * 0.46)));
|
|
149
|
+
const firstY = top + descSize;
|
|
150
|
+
const lines = layoutDescription(description, left, maxChars);
|
|
151
|
+
const desc = svg.append("text").attr("x", left).attr("y", firstY).attr("text-anchor", "start").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", descSize).attr("font-weight", 500);
|
|
152
|
+
renderWrappedMarkdown(desc, lines, lineH);
|
|
153
|
+
return firstY + lines.length * lineH;
|
|
154
|
+
}
|
|
155
|
+
function faceTitle(svg, parsed, paint, x, y, anchor = "middle", size = GOAL_TITLE_SIZE) {
|
|
156
|
+
if (!parsed.title || parsed.options.noTitle) return;
|
|
157
|
+
svg.append("text").attr("class", "chart-title").attr("x", x).attr("y", y).attr("text-anchor", anchor).attr("fill", paint.text).attr("font-family", FONT_FAMILY).attr("font-size", size).attr("font-weight", TITLE_FONT_WEIGHT).attr("data-line-number", parsed.titleLineNumber).text(parsed.title);
|
|
158
|
+
}
|
|
159
|
+
function renderBar(svg, parsed, metrics, paint) {
|
|
160
|
+
const trackH = 52;
|
|
161
|
+
const r = trackH / 2;
|
|
162
|
+
const trackW = 620;
|
|
163
|
+
const gap = parsed.hasTarget ? 18 : 0;
|
|
164
|
+
const targetLabelW = parsed.hasTarget ? 80 : 0;
|
|
165
|
+
const x = 0;
|
|
166
|
+
const hasTitle = !!parsed.title && !parsed.options.noTitle;
|
|
167
|
+
const showPct = !parsed.options.noPercent && parsed.hasTarget;
|
|
168
|
+
const titleSize = GOAL_TITLE_SIZE;
|
|
169
|
+
if (hasTitle) faceTitle(svg, parsed, paint, x, titleSize - 2, "start");
|
|
170
|
+
const barRight = x + trackW;
|
|
171
|
+
if (showPct) {
|
|
172
|
+
svg.append("text").attr("x", barRight).attr("y", titleSize - 2).attr("text-anchor", "end").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", titleSize).attr("font-weight", 700).text(metrics.pctLabel);
|
|
173
|
+
}
|
|
174
|
+
const y = hasTitle || showPct ? titleSize + 14 : 0;
|
|
175
|
+
const barCy = y + trackH / 2;
|
|
176
|
+
const g = svg.append("g").attr("class", "goal-bar");
|
|
177
|
+
g.append("rect").attr("x", x).attr("y", y).attr("width", trackW).attr("height", trackH).attr("rx", r).attr("fill", paint.track);
|
|
178
|
+
const fillW = trackW * metrics.fillFrac;
|
|
179
|
+
if (fillW > 0.5) {
|
|
180
|
+
g.append("rect").attr("x", x).attr("y", y).attr("width", fillW).attr("height", trackH).attr("rx", r).attr("fill", paint.fill).attr("stroke", paint.base).attr("stroke-width", 2);
|
|
181
|
+
}
|
|
182
|
+
if (!parsed.options.noValue) {
|
|
183
|
+
const valX = Math.max(x + fillW - 16, x + 52);
|
|
184
|
+
g.append("text").attr("x", valX).attr("y", barCy + 24 * 0.35).attr("text-anchor", "end").attr("fill", paint.base).attr("font-family", FONT_FAMILY).attr("font-size", 24).attr("font-weight", 700).text(compactNumber(parsed.now));
|
|
185
|
+
}
|
|
186
|
+
if (parsed.hasTarget) {
|
|
187
|
+
g.append("text").attr("x", barRight + gap).attr("y", barCy + 26 * 0.35).attr("text-anchor", "start").attr("fill", paint.text).attr("font-family", FONT_FAMILY).attr("font-size", 26).attr("font-weight", 700).text(compactNumber(parsed.target));
|
|
188
|
+
}
|
|
189
|
+
let bottom = y + trackH;
|
|
190
|
+
if (parsed.description && !parsed.options.noNote) {
|
|
191
|
+
bottom = drawNote(svg, parsed.description, paint, x, bottom + 40, trackW);
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
minX: 0,
|
|
195
|
+
minY: 0,
|
|
196
|
+
maxX: barRight + gap + targetLabelW,
|
|
197
|
+
maxY: bottom
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function renderThermometer(svg, parsed, metrics, paint) {
|
|
201
|
+
const tubeW = 68;
|
|
202
|
+
const r = tubeW / 2;
|
|
203
|
+
const bulbR = 52;
|
|
204
|
+
const inset = 8;
|
|
205
|
+
const totalH = 440;
|
|
206
|
+
const glassTop = 0;
|
|
207
|
+
const bulbCy = totalH - bulbR;
|
|
208
|
+
const textColW = 440;
|
|
209
|
+
const gap = 56;
|
|
210
|
+
const colLeft = 0;
|
|
211
|
+
const cx = colLeft + textColW + gap + r;
|
|
212
|
+
const bodyPath = (topY, halfW, br, roundedCap) => {
|
|
213
|
+
const yJoin = bulbCy - Math.sqrt(br * br - halfW * halfW);
|
|
214
|
+
const bulb = `L ${cx + halfW} ${yJoin} A ${br} ${br} 0 1 1 ${cx - halfW} ${yJoin} Z`;
|
|
215
|
+
return roundedCap ? `M ${cx - halfW} ${topY + halfW} A ${halfW} ${halfW} 0 0 1 ${cx + halfW} ${topY + halfW} ${bulb}` : `M ${cx - halfW} ${topY} L ${cx + halfW} ${topY} ${bulb}`;
|
|
216
|
+
};
|
|
217
|
+
const g = svg.append("g").attr("class", "goal-thermometer");
|
|
218
|
+
g.append("path").attr("d", bodyPath(glassTop, r, bulbR, true)).attr("fill", paint.track);
|
|
219
|
+
const mHalf = r - inset;
|
|
220
|
+
const mBulb = bulbR - inset;
|
|
221
|
+
const yTop = glassTop + r;
|
|
222
|
+
const yBase = bulbCy - Math.sqrt(mBulb * mBulb - mHalf * mHalf);
|
|
223
|
+
const yForFrac = (f) => yTop + (1 - f) * (yBase - yTop);
|
|
224
|
+
const fillTopY = clamp(yForFrac(metrics.fillFrac), yTop, yBase);
|
|
225
|
+
g.append("path").attr("d", bodyPath(fillTopY, mHalf, mBulb, false)).attr("fill", paint.fill).attr("stroke", paint.base).attr("stroke-width", 2).attr("stroke-linejoin", "round");
|
|
226
|
+
if (parsed.hasTarget) {
|
|
227
|
+
const edgeX = cx + r;
|
|
228
|
+
const tickLabelX = edgeX + 14;
|
|
229
|
+
const drawTick = (f, major) => {
|
|
230
|
+
const isTarget = f === 1;
|
|
231
|
+
const y = yForFrac(f);
|
|
232
|
+
g.append("line").attr("x1", edgeX).attr("y1", y).attr("x2", edgeX - (isTarget ? 26 : major ? 18 : 10)).attr("y2", y).attr("stroke", isTarget ? paint.base : paint.muted).attr("stroke-width", isTarget ? 4 : major ? 2 : 1.5);
|
|
233
|
+
if (isTarget) {
|
|
234
|
+
g.append("text").attr("x", tickLabelX).attr("y", y - 20).attr("text-anchor", "start").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", 15).attr("font-weight", 600).attr("letter-spacing", 1).text("TARGET");
|
|
235
|
+
}
|
|
236
|
+
if (major) {
|
|
237
|
+
g.append("text").attr("x", tickLabelX).attr("y", y + (isTarget ? 30 * 0.35 : 19 * 0.35)).attr("text-anchor", "start").attr("fill", isTarget ? paint.text : paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", isTarget ? 30 : 19).attr("font-weight", isTarget ? 700 : 500).text(compactNumber(parsed.target * f));
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
for (const f of [0.25, 0.75]) drawTick(f, false);
|
|
241
|
+
for (const f of [0, 0.5, 1]) drawTick(f, true);
|
|
242
|
+
g.append("text").attr("x", tickLabelX).attr("y", fillTopY + 42 * 0.35).attr("text-anchor", "start").attr("fill", paint.base).attr("font-family", FONT_FAMILY).attr("font-size", 42).attr("font-weight", 700).text(compactNumber(parsed.now));
|
|
243
|
+
}
|
|
244
|
+
const titleSize = GOAL_TITLE_SIZE;
|
|
245
|
+
let cursorY = glassTop;
|
|
246
|
+
if (parsed.title && !parsed.options.noTitle) {
|
|
247
|
+
svg.append("text").attr("class", "chart-title").attr("x", colLeft).attr("y", cursorY + titleSize).attr("text-anchor", "start").attr("fill", paint.text).attr("font-family", FONT_FAMILY).attr("font-size", titleSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("data-line-number", parsed.titleLineNumber).text(parsed.title);
|
|
248
|
+
cursorY += titleSize + 16;
|
|
249
|
+
}
|
|
250
|
+
if (!parsed.options.noPercent) {
|
|
251
|
+
svg.append("text").attr("x", colLeft).attr("y", cursorY + 52).attr("text-anchor", "start").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", 64).attr("font-weight", 700).text(metrics.pctLabel);
|
|
252
|
+
cursorY += 76;
|
|
253
|
+
}
|
|
254
|
+
let colBottom = cursorY;
|
|
255
|
+
if (parsed.description && !parsed.options.noNote) {
|
|
256
|
+
colBottom = drawNote(
|
|
257
|
+
svg,
|
|
258
|
+
parsed.description,
|
|
259
|
+
paint,
|
|
260
|
+
colLeft,
|
|
261
|
+
cursorY + 8,
|
|
262
|
+
textColW
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
const rightExtent = parsed.hasTarget ? cx + r + 14 + 76 : cx + r + 20;
|
|
266
|
+
return {
|
|
267
|
+
minX: 0,
|
|
268
|
+
minY: 0,
|
|
269
|
+
maxX: rightExtent,
|
|
270
|
+
maxY: Math.max(bulbCy + bulbR, colBottom)
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function arcPath(cx, cy, r, t0, t1) {
|
|
274
|
+
const a0 = Math.PI - t0 * Math.PI;
|
|
275
|
+
const a1 = Math.PI - t1 * Math.PI;
|
|
276
|
+
const x0 = cx + r * Math.cos(a0);
|
|
277
|
+
const y0 = cy - r * Math.sin(a0);
|
|
278
|
+
const x1 = cx + r * Math.cos(a1);
|
|
279
|
+
const y1 = cy - r * Math.sin(a1);
|
|
280
|
+
return `M ${x0} ${y0} A ${r} ${r} 0 0 1 ${x1} ${y1}`;
|
|
281
|
+
}
|
|
282
|
+
function renderGauge(svg, parsed, metrics, paint) {
|
|
283
|
+
const stroke = 36;
|
|
284
|
+
const r = 210;
|
|
285
|
+
const hasNote = !!parsed.description && !parsed.options.noNote;
|
|
286
|
+
const colW = hasNote ? 400 : 0;
|
|
287
|
+
const colGap = hasNote ? 56 : 0;
|
|
288
|
+
const colLeft = 0;
|
|
289
|
+
const hasTopTitle = !hasNote && !!parsed.title && !parsed.options.noTitle;
|
|
290
|
+
const topTitleH = hasTopTitle ? GOAL_TITLE_SIZE + 6 + 16 : 0;
|
|
291
|
+
const cx = colLeft + colW + colGap + r;
|
|
292
|
+
const cy = r + stroke / 2 + topTitleH;
|
|
293
|
+
const g = svg.append("g").attr("class", "goal-gauge");
|
|
294
|
+
const crestTop = cy - r - stroke / 2;
|
|
295
|
+
let colBottom = crestTop;
|
|
296
|
+
if (hasNote) {
|
|
297
|
+
const titleSize = GOAL_TITLE_SIZE;
|
|
298
|
+
let top = crestTop;
|
|
299
|
+
if (parsed.title && !parsed.options.noTitle) {
|
|
300
|
+
svg.append("text").attr("class", "chart-title").attr("x", colLeft).attr("y", top + titleSize * 0.78).attr("text-anchor", "start").attr("fill", paint.text).attr("font-family", FONT_FAMILY).attr("font-size", titleSize).attr("font-weight", TITLE_FONT_WEIGHT).attr("data-line-number", parsed.titleLineNumber).text(parsed.title);
|
|
301
|
+
top += titleSize * 0.78 + 16;
|
|
302
|
+
}
|
|
303
|
+
colBottom = drawNote(svg, parsed.description, paint, colLeft, top, colW);
|
|
304
|
+
} else if (hasTopTitle) {
|
|
305
|
+
faceTitle(svg, parsed, paint, cx, GOAL_TITLE_SIZE);
|
|
306
|
+
}
|
|
307
|
+
g.append("path").attr("d", arcPath(cx, cy, r, 0, 1)).attr("fill", "none").attr("stroke", paint.track).attr("stroke-width", stroke).attr("stroke-linecap", "round");
|
|
308
|
+
if (metrics.fillFrac > 1e-3) {
|
|
309
|
+
g.append("path").attr("d", arcPath(cx, cy, r, 0, metrics.fillFrac)).attr("fill", "none").attr("stroke", paint.fill).attr("stroke-width", stroke).attr("stroke-linecap", "round");
|
|
310
|
+
}
|
|
311
|
+
const a = Math.PI - metrics.fillFrac * Math.PI;
|
|
312
|
+
const needleLen = r - stroke / 2 - 6;
|
|
313
|
+
const nx = cx + needleLen * Math.cos(a);
|
|
314
|
+
const ny = cy - needleLen * Math.sin(a);
|
|
315
|
+
g.append("line").attr("x1", cx).attr("y1", cy).attr("x2", nx).attr("y2", ny).attr("stroke", paint.text).attr("stroke-width", 5).attr("stroke-linecap", "round");
|
|
316
|
+
g.append("circle").attr("cx", cx).attr("cy", cy).attr("r", 11).attr("fill", paint.text);
|
|
317
|
+
const nowLabel = compactNumber(parsed.now);
|
|
318
|
+
const nowSize = Math.min(
|
|
319
|
+
r * 0.62,
|
|
320
|
+
140,
|
|
321
|
+
r * 0.95 / Math.max(1, nowLabel.length * 0.6)
|
|
322
|
+
);
|
|
323
|
+
const nowY = cy - r * 0.42;
|
|
324
|
+
g.append("text").attr("x", cx).attr("y", nowY + nowSize * 0.35).attr("text-anchor", "middle").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", nowSize).attr("font-weight", 700).text(nowLabel);
|
|
325
|
+
if (parsed.hasTarget) {
|
|
326
|
+
const bandInner = r - stroke / 2;
|
|
327
|
+
for (const f of [0, 0.25, 0.5, 0.75, 1]) {
|
|
328
|
+
const isTarget = f === 1;
|
|
329
|
+
const ang = Math.PI - f * Math.PI;
|
|
330
|
+
const ca = Math.cos(ang);
|
|
331
|
+
const sa = Math.sin(ang);
|
|
332
|
+
g.append("line").attr("x1", cx + bandInner * ca).attr("y1", cy - bandInner * sa).attr("x2", cx + (bandInner - (isTarget ? 20 : 12)) * ca).attr("y2", cy - (bandInner - (isTarget ? 20 : 12)) * sa).attr("stroke", isTarget ? paint.base : paint.muted).attr("stroke-width", isTarget ? 4 : 2);
|
|
333
|
+
const lr = bandInner - (isTarget ? 40 : 26);
|
|
334
|
+
const anchor = ca > 0.2 ? "end" : ca < -0.2 ? "start" : "middle";
|
|
335
|
+
if (isTarget) {
|
|
336
|
+
g.append("text").attr("x", cx + lr * ca).attr("y", cy - lr * sa - 20).attr("text-anchor", anchor).attr("dominant-baseline", "middle").attr("fill", paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", 15).attr("font-weight", 600).attr("letter-spacing", 1).text("TARGET");
|
|
337
|
+
}
|
|
338
|
+
g.append("text").attr("x", cx + lr * ca).attr("y", cy - lr * sa).attr("text-anchor", anchor).attr("dominant-baseline", sa > 0.7 ? "hanging" : "middle").attr("fill", isTarget ? paint.text : paint.muted).attr("font-family", FONT_FAMILY).attr("font-size", isTarget ? 30 : 18).attr("font-weight", isTarget ? 700 : 500).text(compactNumber(parsed.target * f));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
const rightLabel = parsed.hasTarget ? 74 : 20;
|
|
342
|
+
return {
|
|
343
|
+
minX: 0,
|
|
344
|
+
minY: Math.min(0, crestTop),
|
|
345
|
+
maxX: cx + r + rightLabel,
|
|
346
|
+
maxY: Math.max(cy + 34, colBottom)
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export {
|
|
351
|
+
renderGoal,
|
|
352
|
+
renderGoalForExport
|
|
353
|
+
};
|
|
354
|
+
//# sourceMappingURL=chunk-RV6A2B5S.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
tagAttrKey,
|
|
11
11
|
validateTagGroupNames,
|
|
12
12
|
validateTagValues
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WCUHAQKB.js";
|
|
14
14
|
import {
|
|
15
15
|
MINDMAP_REGISTRY,
|
|
16
16
|
OPTION_NOCOLON_RE,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tryParseSharedOption,
|
|
22
22
|
warnUnknownMetaKeys,
|
|
23
23
|
withTagAliases
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OTAL43EH.js";
|
|
25
25
|
import {
|
|
26
26
|
formatDgmoError,
|
|
27
27
|
makeDgmoError,
|
|
@@ -313,4 +313,4 @@ function findMetadataParent(indent, indentStack) {
|
|
|
313
313
|
export {
|
|
314
314
|
parseMindmap
|
|
315
315
|
};
|
|
316
|
-
//# sourceMappingURL=chunk-
|
|
316
|
+
//# sourceMappingURL=chunk-S5GRONXL.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractColor,
|
|
3
3
|
measureIndent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OTAL43EH.js";
|
|
5
5
|
import {
|
|
6
6
|
makeDgmoError
|
|
7
7
|
} from "./chunk-CXK4DZH3.js";
|
|
@@ -73,4 +73,4 @@ function tryCollectNote(lines, index, indent, palette, diagnostics) {
|
|
|
73
73
|
export {
|
|
74
74
|
tryCollectNote
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-SCHXJTZL.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-YYVTBZZC.js";
|
|
19
19
|
import {
|
|
20
20
|
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QUJGFNFN.js";
|
|
22
22
|
import {
|
|
23
23
|
getMaxLegendReservedHeight
|
|
24
24
|
} from "./chunk-7UEMZREK.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from "./chunk-5LWQH6QV.js";
|
|
50
50
|
import {
|
|
51
51
|
parseInfra
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-XMVQ5F4M.js";
|
|
53
53
|
import {
|
|
54
54
|
preprocessDescriptionLine
|
|
55
55
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
} from "./chunk-P6T66CCZ.js";
|
|
61
61
|
import {
|
|
62
62
|
tagAttrKey
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WCUHAQKB.js";
|
|
64
64
|
import {
|
|
65
65
|
resolveColor
|
|
66
66
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -1561,4 +1561,4 @@ export {
|
|
|
1561
1561
|
renderInfra,
|
|
1562
1562
|
parseAndLayoutInfra
|
|
1563
1563
|
};
|
|
1564
|
-
//# sourceMappingURL=chunk-
|
|
1564
|
+
//# sourceMappingURL=chunk-SGFZZAUO.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
tagAttrKey,
|
|
8
8
|
validateTagGroupNames,
|
|
9
9
|
validateTagValues
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WCUHAQKB.js";
|
|
11
11
|
import {
|
|
12
12
|
tryCollectNote
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SCHXJTZL.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveNotes
|
|
16
16
|
} from "./chunk-FMDSF3OV.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
tryParseSharedOption,
|
|
31
31
|
warnUnknownMetaKeys,
|
|
32
32
|
withTagAliases
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OTAL43EH.js";
|
|
34
34
|
import {
|
|
35
35
|
makeDgmoError,
|
|
36
36
|
suggest
|
|
@@ -884,4 +884,4 @@ export {
|
|
|
884
884
|
looksLikeBoxesAndLines,
|
|
885
885
|
parseBoxesAndLines
|
|
886
886
|
};
|
|
887
|
-
//# sourceMappingURL=chunk-
|
|
887
|
+
//# sourceMappingURL=chunk-SU2VBK4L.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
stripDefaultModifier,
|
|
9
9
|
validateTagGroupNames,
|
|
10
10
|
validateTagValues
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WCUHAQKB.js";
|
|
12
12
|
import {
|
|
13
13
|
parseArrow,
|
|
14
14
|
parseInArrowLabel
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
splitNameAndMeta,
|
|
27
27
|
warnUnknownMetaKeys,
|
|
28
28
|
withTagAliases
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OTAL43EH.js";
|
|
30
30
|
import {
|
|
31
31
|
NAME_DIAGNOSTIC_CODES,
|
|
32
32
|
formatDgmoError,
|
|
@@ -1022,4 +1022,4 @@ export {
|
|
|
1022
1022
|
parseSequenceDgmo,
|
|
1023
1023
|
looksLikeSequence
|
|
1024
1024
|
};
|
|
1025
|
-
//# sourceMappingURL=chunk-
|
|
1025
|
+
//# sourceMappingURL=chunk-T4BRO3Z6.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
parseFirstLine,
|
|
6
6
|
splitNameAndMeta,
|
|
7
7
|
warnUnknownMetaKeys
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OTAL43EH.js";
|
|
9
9
|
import {
|
|
10
10
|
makeDgmoError,
|
|
11
11
|
makeFail,
|
|
@@ -332,4 +332,4 @@ function assignGlobalNumbers(result) {
|
|
|
332
332
|
export {
|
|
333
333
|
parseTechRadar
|
|
334
334
|
};
|
|
335
|
-
//# sourceMappingURL=chunk-
|
|
335
|
+
//# sourceMappingURL=chunk-TSA237IM.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-3CIOJ5YJ.js";
|
|
15
15
|
import {
|
|
16
16
|
renderIntegratedLegend
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QUJGFNFN.js";
|
|
18
18
|
import {
|
|
19
19
|
getMaxLegendReservedHeight
|
|
20
20
|
} from "./chunk-7UEMZREK.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
resolveTagColor,
|
|
43
43
|
tagAttrKey
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WCUHAQKB.js";
|
|
45
45
|
import {
|
|
46
46
|
resolveColor
|
|
47
47
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -270,4 +270,4 @@ export {
|
|
|
270
270
|
renderFamilyForExport,
|
|
271
271
|
renderFamily
|
|
272
272
|
};
|
|
273
|
-
//# sourceMappingURL=chunk-
|
|
273
|
+
//# sourceMappingURL=chunk-TWCLK2GA.js.map
|
|
@@ -126,6 +126,17 @@ var DIRECTIVES_REGISTRY = [
|
|
|
126
126
|
{ token: "import", category: "directive" },
|
|
127
127
|
{ token: "hide", category: "directive" },
|
|
128
128
|
{ token: "direction", category: "directive" },
|
|
129
|
+
// ── Clock ────────────────────────────────────────────────
|
|
130
|
+
// The board's flat directives — highlight-only (the parser validates them
|
|
131
|
+
// inline, no extractable Set). `no-title` + `direction` are already listed
|
|
132
|
+
// above (shared). Values (analog is a bare flag; color-by's
|
|
133
|
+
// place|work|daylight|time|none) highlight as plain tokens.
|
|
134
|
+
{ token: "analog", category: "directive" },
|
|
135
|
+
{ token: "hours", category: "directive" },
|
|
136
|
+
{ token: "days", category: "directive" },
|
|
137
|
+
{ token: "no-sun", category: "directive" },
|
|
138
|
+
{ token: "time-24", category: "directive" },
|
|
139
|
+
{ token: "color-by", category: "directive" },
|
|
129
140
|
// ── Boxes-and-lines ──────────────────────────────────────
|
|
130
141
|
// `heat <Label> [low] [high]` is the value→colour ramp directive, but `heat`
|
|
131
142
|
// is NOT registered as a directive keyword: it is dual-use with the `heat:`
|
|
@@ -218,6 +229,17 @@ var DIRECTIVES_REGISTRY = [
|
|
|
218
229
|
{ token: "scrubber-trials", category: "directive" },
|
|
219
230
|
{ token: "start-date", category: "directive" },
|
|
220
231
|
{ token: "end-date", category: "directive" },
|
|
232
|
+
// ── Goal ─────────────────────────────────────────────────
|
|
233
|
+
// Mode flags, value-key leaders, and opt-outs. `now`/`target` collide with
|
|
234
|
+
// label prose ("start now", "on target"), but the arrow-label demotion pass
|
|
235
|
+
// (see highlight-api LABEL_WORD_NODES) treats any keyword-bearing label as
|
|
236
|
+
// text and demotes them, so they highlight only as line leaders.
|
|
237
|
+
{ token: "thermometer", category: "directive" },
|
|
238
|
+
{ token: "gauge", category: "directive" },
|
|
239
|
+
{ token: "now", category: "directive" },
|
|
240
|
+
{ token: "target", category: "directive" },
|
|
241
|
+
{ token: "no-note", category: "directive" },
|
|
242
|
+
{ token: "no-auto-color", category: "directive" },
|
|
221
243
|
// ── Control-flow + wireframe element keywords (CONTROL) ──
|
|
222
244
|
{ token: "if", category: "control" },
|
|
223
245
|
{ token: "else", category: "control" },
|
|
@@ -259,7 +281,19 @@ var DIRECTIVES_REGISTRY = [
|
|
|
259
281
|
{ token: "date", category: "modifier" },
|
|
260
282
|
{ token: "timestamp", category: "modifier" },
|
|
261
283
|
{ token: "float", category: "modifier" },
|
|
262
|
-
{ token: "decimal", category: "modifier" }
|
|
284
|
+
{ token: "decimal", category: "modifier" },
|
|
285
|
+
// ── Bracket ──────────────────────────────────────────────
|
|
286
|
+
// `beats` / `vs` are the infix match keywords; the rest are line directives.
|
|
287
|
+
// (`seed` and `no-legend` already appear above — shared, not re-listed.)
|
|
288
|
+
{ token: "beats", category: "control" },
|
|
289
|
+
{ token: "vs", category: "control" },
|
|
290
|
+
{ token: "rounds", category: "directive" },
|
|
291
|
+
{ token: "accent", category: "directive" },
|
|
292
|
+
{ token: "no-round", category: "modifier" },
|
|
293
|
+
{ token: "no-rounds", category: "modifier" },
|
|
294
|
+
{ token: "single-elim", category: "modifier" },
|
|
295
|
+
{ token: "double-elim", category: "modifier" },
|
|
296
|
+
{ token: "seeded", category: "modifier" }
|
|
263
297
|
];
|
|
264
298
|
function tokensWhere(pred) {
|
|
265
299
|
const out = /* @__PURE__ */ new Set();
|
|
@@ -312,4 +346,4 @@ export {
|
|
|
312
346
|
REGISTRY_MODIFIER_TOKENS,
|
|
313
347
|
REGISTRY_COLON_KEY_TOKENS
|
|
314
348
|
};
|
|
315
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-U2HGPLZS.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
stripDefaultModifier,
|
|
12
12
|
tagAttrKey,
|
|
13
13
|
validateTagGroupNames
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WCUHAQKB.js";
|
|
15
15
|
import {
|
|
16
16
|
parseInArrowLabel
|
|
17
17
|
} from "./chunk-FFUN5D66.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
splitNameAndMeta,
|
|
28
28
|
warnUnknownMetaKeys,
|
|
29
29
|
withTagAliases
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OTAL43EH.js";
|
|
31
31
|
import {
|
|
32
32
|
formatDgmoError,
|
|
33
33
|
makeDgmoError,
|
|
@@ -804,4 +804,4 @@ function validateDeploymentRefs(result, knownNames, pushWarning) {
|
|
|
804
804
|
export {
|
|
805
805
|
parseC4
|
|
806
806
|
};
|
|
807
|
-
//# sourceMappingURL=chunk-
|
|
807
|
+
//# sourceMappingURL=chunk-URSQLCTR.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
layoutC4Containers,
|
|
5
5
|
layoutC4Context,
|
|
6
6
|
layoutC4Deployment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QFQ35BTO.js";
|
|
8
8
|
import {
|
|
9
9
|
renderInlineText
|
|
10
10
|
} from "./chunk-3HDBAXF5.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-3CIOJ5YJ.js";
|
|
18
18
|
import {
|
|
19
19
|
renderIntegratedLegend
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QUJGFNFN.js";
|
|
21
21
|
import {
|
|
22
22
|
TITLE_FONT_SIZE,
|
|
23
23
|
TITLE_FONT_WEIGHT
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./chunk-5LWQH6QV.js";
|
|
35
35
|
import {
|
|
36
36
|
parseC4
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-URSQLCTR.js";
|
|
38
38
|
import {
|
|
39
39
|
preprocessDescriptionLine
|
|
40
40
|
} from "./chunk-IYULMRBE.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
} from "./chunk-P6T66CCZ.js";
|
|
46
46
|
import {
|
|
47
47
|
tagAttrKey
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-WCUHAQKB.js";
|
|
49
49
|
|
|
50
50
|
// src/c4/renderer.ts
|
|
51
51
|
import * as d3Selection from "d3-selection";
|
|
@@ -1035,4 +1035,4 @@ export {
|
|
|
1035
1035
|
renderC4Deployment,
|
|
1036
1036
|
renderC4DeploymentForExport
|
|
1037
1037
|
};
|
|
1038
|
-
//# sourceMappingURL=chunk-
|
|
1038
|
+
//# sourceMappingURL=chunk-UUS2GIJZ.js.map
|