@diagrammo/dgmo 0.50.0 → 0.50.2

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.
Files changed (139) hide show
  1. package/dist/advanced.d.ts +11 -2
  2. package/dist/advanced.js +64 -64
  3. package/dist/auto.js +99 -99
  4. package/dist/auto.mjs +125 -27
  5. package/dist/block.d.ts +7 -0
  6. package/dist/block.js +38 -32
  7. package/dist/{charts-d3-DKUD7MQE.js → charts-d3-MUW3LTML.js} +4 -4
  8. package/dist/{chunk-PJUGRJHJ.js → chunk-2KGXHFYK.js} +4 -4
  9. package/dist/{chunk-6X4AKWLF.js → chunk-3LH5CLP4.js} +3 -3
  10. package/dist/{chunk-YA7D2N2O.js → chunk-3NODSS6A.js} +4 -4
  11. package/dist/{chunk-DMJJ3CEQ.js → chunk-3UIKSPFB.js} +8 -3
  12. package/dist/{chunk-RV26LTUU.js → chunk-3XGZF2QJ.js} +4 -4
  13. package/dist/{chunk-I4IFRCUB.js → chunk-3Y2DRD7S.js} +2 -2
  14. package/dist/{chunk-RV6A2B5S.js → chunk-3YPY3OXD.js} +2 -2
  15. package/dist/{chunk-4S723I74.js → chunk-4MJ7M6YL.js} +5 -5
  16. package/dist/{chunk-SGFZZAUO.js → chunk-5GJYGP5Z.js} +4 -4
  17. package/dist/{chunk-TWCLK2GA.js → chunk-5OWVC2A6.js} +3 -3
  18. package/dist/{chunk-7PQYTZMA.js → chunk-5WFIYXQ6.js} +5 -5
  19. package/dist/{chunk-F5UDBSJY.js → chunk-66NVRO4K.js} +4 -4
  20. package/dist/{chunk-XCLHOZAM.js → chunk-66RUL3XF.js} +3 -3
  21. package/dist/{chunk-YZLMKW4T.js → chunk-6HJBFVLO.js} +2 -2
  22. package/dist/{chunk-YB3FW24O.js → chunk-7L3R6I3U.js} +2 -2
  23. package/dist/{chunk-PLZI6KPM.js → chunk-7QKLIMRZ.js} +4 -4
  24. package/dist/{chunk-IA3FJYWR.js → chunk-7TV5Y53Y.js} +2 -2
  25. package/dist/{chunk-3TDRHT4J.js → chunk-BBGDM4NQ.js} +3 -3
  26. package/dist/{chunk-T4BRO3Z6.js → chunk-BH3UYK36.js} +2 -2
  27. package/dist/{chunk-UXOSVCLJ.js → chunk-C2CVAM3U.js} +2 -2
  28. package/dist/{chunk-UUS2GIJZ.js → chunk-DFTFPYUD.js} +5 -5
  29. package/dist/{chunk-L2ZTFHAY.js → chunk-DN66GPY5.js} +87 -8
  30. package/dist/{chunk-SU2VBK4L.js → chunk-DSWVNQVS.js} +2 -2
  31. package/dist/{chunk-5JSWBPZZ.js → chunk-DZXYF2F5.js} +12 -2
  32. package/dist/{chunk-6M5PJFQG.js → chunk-EAMEADTV.js} +2 -2
  33. package/dist/{chunk-KJXIHOVL.js → chunk-FA6K3FWM.js} +3 -3
  34. package/dist/{chunk-WCUHAQKB.js → chunk-FJUNPCYI.js} +1 -1
  35. package/dist/{chunk-FB2WHOEQ.js → chunk-GKC3HILQ.js} +2 -2
  36. package/dist/{chunk-QUJGFNFN.js → chunk-HEVYAHLW.js} +2 -2
  37. package/dist/{chunk-3ZPC476N.js → chunk-HLJVEAOF.js} +3 -3
  38. package/dist/{chunk-7G2ER4CY.js → chunk-HTMN2Z6U.js} +2 -2
  39. package/dist/{chunk-OHQEMBLI.js → chunk-I2WKW7C7.js} +2 -2
  40. package/dist/{chunk-R56LASIN.js → chunk-IUMPEA64.js} +2 -2
  41. package/dist/{chunk-QDFNCATJ.js → chunk-J6K7RP6P.js} +4 -4
  42. package/dist/{chunk-PMN3Q7RJ.js → chunk-JJUOHGX2.js} +2 -2
  43. package/dist/{chunk-QFQ35BTO.js → chunk-KFZYNWWO.js} +2 -2
  44. package/dist/{chunk-ER5SCQWQ.js → chunk-KHEYDLMT.js} +2 -2
  45. package/dist/{chunk-JFYIP7XU.js → chunk-KQ57MHRO.js} +25 -25
  46. package/dist/{chunk-X2NMFTG3.js → chunk-LE4MYMLI.js} +2 -2
  47. package/dist/{chunk-NFFIKVNO.js → chunk-MCZ5LBZD.js} +4 -4
  48. package/dist/{chunk-2JJ2KNPI.js → chunk-NU3XLTGP.js} +2 -2
  49. package/dist/{chunk-4BMJQFNK.js → chunk-NWED7CYO.js} +3 -3
  50. package/dist/{chunk-WWN566I7.js → chunk-OMNGQPEZ.js} +2 -2
  51. package/dist/{chunk-O76UD6VJ.js → chunk-OTQKUHRS.js} +2 -2
  52. package/dist/{chunk-5Z736BSU.js → chunk-P7CE7LXL.js} +2 -2
  53. package/dist/{chunk-CVV36CWI.js → chunk-PFHVU7UA.js} +2 -2
  54. package/dist/{chunk-6ZT4U37Q.js → chunk-QJJZSROI.js} +11 -4
  55. package/dist/{chunk-FAL7NOK3.js → chunk-QJP6PG7F.js} +5 -5
  56. package/dist/{chunk-URSQLCTR.js → chunk-QROYX7TT.js} +2 -2
  57. package/dist/{chunk-FL4IOQ37.js → chunk-QXKWYZNR.js} +2 -2
  58. package/dist/{chunk-3G6TMNVF.js → chunk-RZ6YKEUJ.js} +3 -3
  59. package/dist/{chunk-A3WQVFBS.js → chunk-SQLNBA64.js} +2 -2
  60. package/dist/{chunk-NISQC5KW.js → chunk-SVTI362O.js} +65 -65
  61. package/dist/{chunk-S5GRONXL.js → chunk-SXRTRMEE.js} +2 -2
  62. package/dist/{chunk-GPWHQ5FJ.js → chunk-T4VOVZT5.js} +2 -2
  63. package/dist/{chunk-GROQGHCT.js → chunk-T5SHNNGP.js} +89 -17
  64. package/dist/{chunk-JZNMXEIV.js → chunk-TN35C5KM.js} +2 -2
  65. package/dist/{chunk-O4VUFXIH.js → chunk-VBYSIOOY.js} +2 -2
  66. package/dist/{chunk-2QYTMIRR.js → chunk-VDOOQZUD.js} +2 -2
  67. package/dist/{chunk-XMVQ5F4M.js → chunk-VUJGMJE6.js} +2 -2
  68. package/dist/{chunk-ASS5YYIZ.js → chunk-VVW3F3MD.js} +4 -4
  69. package/dist/{chunk-7RB5Q6MB.js → chunk-WW32K72E.js} +5 -5
  70. package/dist/{chunk-EJTKV7CY.js → chunk-X6EZPSW6.js} +4 -4
  71. package/dist/{chunk-XDXNDSKO.js → chunk-XEGTMVYY.js} +4 -1
  72. package/dist/{chunk-OTP5KVLO.js → chunk-XJLKLU4D.js} +2 -2
  73. package/dist/cli.cjs +120 -120
  74. package/dist/{dgmo-router-QOMFCOOV.js → dgmo-router-CE2G67FV.js} +26 -26
  75. package/dist/{dimensions-P5FSX2QN.js → dimensions-OTBKC5M6.js} +4 -4
  76. package/dist/element.js +100 -100
  77. package/dist/element.mjs +125 -27
  78. package/dist/index.d.ts +27 -8
  79. package/dist/index.js +32 -30
  80. package/dist/{layout-T3OZU5QW.js → layout-7MZ5NF2N.js} +3 -3
  81. package/dist/{layout-WZHNDT2O.js → layout-FWODLIMP.js} +3 -3
  82. package/dist/{layout-VYELEAW7.js → layout-J36454XU.js} +3 -3
  83. package/dist/{layout-TJIWF7EM.js → layout-LD6XTLD6.js} +3 -3
  84. package/dist/{parser-ZSOWUBML.js → parser-36HVKU5U.js} +3 -3
  85. package/dist/{parser-QYYM4QVW.js → parser-4NO6VZ6S.js} +3 -3
  86. package/dist/{parser-DOKMZXVZ.js → parser-4WQQQXCG.js} +3 -3
  87. package/dist/{parser-O4QFCUW7.js → parser-5OXGPNBF.js} +3 -3
  88. package/dist/{parser-ZTBATMLX.js → parser-AGVYTQXV.js} +3 -3
  89. package/dist/{parser-D3QT6GWN.js → parser-AXKBDGNO.js} +3 -3
  90. package/dist/{parser-FMPCVFRK.js → parser-CVMEDULU.js} +3 -3
  91. package/dist/{parser-C2HF2C2E.js → parser-D5VILGN2.js} +3 -3
  92. package/dist/{parser-KUQWRPIT.js → parser-H3XEPFPV.js} +3 -3
  93. package/dist/{parser-YLKYBRIT.js → parser-IJBMRXMC.js} +3 -3
  94. package/dist/{parser-UQE5OWZI.js → parser-JJR52VAT.js} +3 -3
  95. package/dist/{parser-4P36TUVD.js → parser-K3XXLMUW.js} +3 -3
  96. package/dist/{parser-45DENHFZ.js → parser-KCR2WS3V.js} +3 -3
  97. package/dist/{parser-5AURY4A6.js → parser-MPCE5JBG.js} +3 -3
  98. package/dist/{parser-Q4QKCIWQ.js → parser-MTOMTWTD.js} +3 -3
  99. package/dist/{parser-RZMQP7MM.js → parser-O4HIUN6G.js} +3 -3
  100. package/dist/{parser-PGMQDD4G.js → parser-PSA4UBSP.js} +3 -3
  101. package/dist/{parser-I2UIJKVQ.js → parser-RV4M6AS2.js} +3 -3
  102. package/dist/{parser-QTOB4KFL.js → parser-TGQZJ5OT.js} +3 -3
  103. package/dist/{parser-SOUJOEYI.js → parser-TXND652E.js} +3 -3
  104. package/dist/{parser-A2BEFMGK.js → parser-VKOJM7KS.js} +3 -3
  105. package/dist/{parser-D5637H5H.js → parser-W4PQUGX3.js} +3 -3
  106. package/dist/pert.d.ts +8 -0
  107. package/dist/{renderer-BSW7SRIZ.js → renderer-2AZ5HJFK.js} +3 -3
  108. package/dist/{renderer-BZSBPTZJ.js → renderer-2QPMJ2DA.js} +5 -5
  109. package/dist/{renderer-KY4KQBTF.js → renderer-45PSOL3E.js} +4 -4
  110. package/dist/{renderer-FZUKFUNZ.js → renderer-5DSEWF74.js} +4 -4
  111. package/dist/{renderer-72LGR2YF.js → renderer-5KVCNMOJ.js} +2 -2
  112. package/dist/{renderer-TQMZGDAX.js → renderer-6OKF44KS.js} +5 -5
  113. package/dist/{renderer-67NPCBIS.js → renderer-7SD6MSBS.js} +5 -5
  114. package/dist/{renderer-ICJN2SA2.js → renderer-A5VE5BCI.js} +4 -4
  115. package/dist/{renderer-Q6ZKPLS6.js → renderer-AUW2BE6G.js} +5 -5
  116. package/dist/{renderer-35HSIDMZ.js → renderer-B5TBNZJE.js} +4 -4
  117. package/dist/{renderer-INEXO7B6.js → renderer-BSR2O2H6.js} +5 -5
  118. package/dist/{renderer-CXUC4KAD.js → renderer-CYB4LK3G.js} +5 -5
  119. package/dist/{renderer-O4JKUGKO.js → renderer-FF24KZCI.js} +4 -4
  120. package/dist/{renderer-BY533UWU.js → renderer-FPE3J5VZ.js} +5 -5
  121. package/dist/{renderer-TKG6LS4U.js → renderer-FYSVXL7M.js} +6 -6
  122. package/dist/{renderer-GO3FE3RA.js → renderer-HDCCZURL.js} +4 -4
  123. package/dist/{renderer-6GHYK7DX.js → renderer-JCCHNECZ.js} +4 -4
  124. package/dist/{renderer-OOGFODWP.js → renderer-KS7YZJE2.js} +6 -6
  125. package/dist/{renderer-KDYCFRBX.js → renderer-NGXZTRK6.js} +4 -4
  126. package/dist/{renderer-LBN65V45.js → renderer-ODUUOPVT.js} +4 -4
  127. package/dist/{renderer-G2NLGNKF.js → renderer-P5ROYQGU.js} +2 -2
  128. package/dist/{renderer-SZQ326M5.js → renderer-PPIHO5FI.js} +5 -5
  129. package/dist/{renderer-7SWMIFMM.js → renderer-PSMMZCKH.js} +4 -4
  130. package/dist/{renderer-MGBWOCXG.js → renderer-QAOBLRXV.js} +6 -6
  131. package/dist/{renderer-HPGR6USK.js → renderer-R2WNIC2C.js} +4 -4
  132. package/dist/{renderer-6RNGHC5Z.js → renderer-SBS3YWU5.js} +4 -4
  133. package/dist/{renderer-BBCEFILK.js → renderer-UYMQQCJK.js} +5 -5
  134. package/dist/{renderer-radial-JELMHQ24.js → renderer-radial-F7X5F2VU.js} +5 -5
  135. package/dist/{themes-1-CuKpeH.d.ts → themes-PdPR1-hC.d.ts} +8 -0
  136. package/docs/language-reference.md +5 -0
  137. package/gallery/fixtures/countdown-far.dgmo +2 -0
  138. package/gallery/fixtures/countdown.dgmo +3 -3
  139. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compactNumber
3
- } from "./chunk-CVV36CWI.js";
3
+ } from "./chunk-PFHVU7UA.js";
4
4
  import {
5
5
  parseInlineMarkdown
6
6
  } from "./chunk-3HDBAXF5.js";
@@ -351,4 +351,4 @@ export {
351
351
  renderGoal,
352
352
  renderGoalForExport
353
353
  };
354
- //# sourceMappingURL=chunk-RV6A2B5S.js.map
354
+ //# sourceMappingURL=chunk-3YPY3OXD.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeNodeText,
3
3
  layoutMindmap
4
- } from "./chunk-IA3FJYWR.js";
4
+ } from "./chunk-7TV5Y53Y.js";
5
5
  import {
6
6
  renderInlineText
7
7
  } from "./chunk-3HDBAXF5.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-YYVTBZZC.js";
20
20
  import {
21
21
  renderIntegratedLegend
22
- } from "./chunk-QUJGFNFN.js";
22
+ } from "./chunk-HEVYAHLW.js";
23
23
  import {
24
24
  getMaxLegendReservedHeight
25
25
  } from "./chunk-7UEMZREK.js";
@@ -35,7 +35,7 @@ import {
35
35
  } from "./chunk-HQCHYB5F.js";
36
36
  import {
37
37
  parseMindmap
38
- } from "./chunk-S5GRONXL.js";
38
+ } from "./chunk-SXRTRMEE.js";
39
39
  import {
40
40
  preprocessDescriptionLine
41
41
  } from "./chunk-IYULMRBE.js";
@@ -45,7 +45,7 @@ import {
45
45
  } from "./chunk-P6T66CCZ.js";
46
46
  import {
47
47
  tagAttrKey
48
- } from "./chunk-WCUHAQKB.js";
48
+ } from "./chunk-FJUNPCYI.js";
49
49
 
50
50
  // src/mindmap/renderer.ts
51
51
  import * as d3Selection from "d3-selection";
@@ -388,4 +388,4 @@ export {
388
388
  renderMindmap,
389
389
  renderMindmapForExport
390
390
  };
391
- //# sourceMappingURL=chunk-4S723I74.js.map
391
+ //# sourceMappingURL=chunk-4MJ7M6YL.js.map
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-YYVTBZZC.js";
19
19
  import {
20
20
  renderIntegratedLegend
21
- } from "./chunk-QUJGFNFN.js";
21
+ } from "./chunk-HEVYAHLW.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-XMVQ5F4M.js";
52
+ } from "./chunk-VUJGMJE6.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-WCUHAQKB.js";
63
+ } from "./chunk-FJUNPCYI.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-SGFZZAUO.js.map
1564
+ //# sourceMappingURL=chunk-5GJYGP5Z.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-3CIOJ5YJ.js";
15
15
  import {
16
16
  renderIntegratedLegend
17
- } from "./chunk-QUJGFNFN.js";
17
+ } from "./chunk-HEVYAHLW.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-WCUHAQKB.js";
44
+ } from "./chunk-FJUNPCYI.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-TWCLK2GA.js.map
273
+ //# sourceMappingURL=chunk-5OWVC2A6.js.map
@@ -457,13 +457,13 @@ function drawRow(svg, entry, index, parsed, now, rowTop, rowH, geom, col) {
457
457
  const mainFont = 48;
458
458
  const baseY = center + 16;
459
459
  const capTop = baseY - mainFont * 0.7;
460
- g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", contentLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", mainFont).attr("font-weight", 600).style("font-variant-numeric", "tabular-nums").text(ts.main);
461
460
  const sf = 20;
462
461
  const mainW = [...ts.main].reduce(
463
- (w, c) => w + mainFont * (c === ":" ? 0.28 : 0.6),
462
+ (w, c) => w + mainFont * (c === ":" ? 0.334 : 0.6),
464
463
  0
465
464
  );
466
465
  const stackX = contentLeft + mainW + 5;
466
+ g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", contentLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", mainFont).attr("font-weight", 600).attr("textLength", mainW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(ts.main);
467
467
  g.append("text").attr("data-dgmo-clock-digital-part", "sec").attr("x", stackX).attr("y", capTop + sf * 0.72).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 600).style("font-variant-numeric", "tabular-nums").text(`:${ts.sec}`);
468
468
  if (ts.ap)
469
469
  g.append("text").attr("data-dgmo-clock-digital-part", "ap").attr("x", stackX).attr("y", baseY).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 600).text(ts.ap);
@@ -602,13 +602,13 @@ function drawColumns(body, parsed, now, top, geom, col) {
602
602
  const sf = 13;
603
603
  const tf = fitFont(ts.main, 44, innerW - 30, 20);
604
604
  const mainW = [...ts.main].reduce(
605
- (w, c) => w + tf * (c === ":" ? 0.28 : 0.6),
605
+ (w, c) => w + tf * (c === ":" ? 0.334 : 0.6),
606
606
  0
607
607
  );
608
608
  const stackW = Math.max(estWidth(`:${ts.sec}`, sf), estWidth(ts.ap, sf));
609
609
  const gLeft = cx - (mainW + 7 + stackW) / 2;
610
610
  const baseY = cy + tf * 0.34;
611
- g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", gLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", tf).attr("font-weight", 600).style("font-variant-numeric", "tabular-nums").text(ts.main);
611
+ g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", gLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", tf).attr("font-weight", 600).attr("textLength", mainW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(ts.main);
612
612
  const stackX = gLeft + mainW + 7;
613
613
  g.append("text").attr("data-dgmo-clock-digital-part", "sec").attr("x", stackX).attr("y", baseY - tf * 0.32).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 500).text(`:${ts.sec}`);
614
614
  if (ts.ap)
@@ -678,4 +678,4 @@ export {
678
678
  renderClock,
679
679
  renderClockForExport
680
680
  };
681
- //# sourceMappingURL=chunk-7PQYTZMA.js.map
681
+ //# sourceMappingURL=chunk-5WFIYXQ6.js.map
@@ -5,10 +5,10 @@ import {
5
5
  formatPct,
6
6
  resolveCellColor,
7
7
  resolveColorMode
8
- } from "./chunk-CVV36CWI.js";
8
+ } from "./chunk-PFHVU7UA.js";
9
9
  import {
10
10
  renderIntegratedLegend
11
- } from "./chunk-QUJGFNFN.js";
11
+ } from "./chunk-HEVYAHLW.js";
12
12
  import {
13
13
  getMaxLegendReservedHeight
14
14
  } from "./chunk-7UEMZREK.js";
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-P6T66CCZ.js";
34
34
  import {
35
35
  tagAttrKey
36
- } from "./chunk-WCUHAQKB.js";
36
+ } from "./chunk-FJUNPCYI.js";
37
37
 
38
38
  // src/treemap/renderer.ts
39
39
  import * as d3Selection from "d3-selection";
@@ -381,4 +381,4 @@ export {
381
381
  renderTreemapForExport,
382
382
  renderTreemap
383
383
  };
384
- //# sourceMappingURL=chunk-F5UDBSJY.js.map
384
+ //# sourceMappingURL=chunk-66NVRO4K.js.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-YYVTBZZC.js";
8
8
  import {
9
9
  renderIntegratedLegend
10
- } from "./chunk-QUJGFNFN.js";
10
+ } from "./chunk-HEVYAHLW.js";
11
11
  import {
12
12
  createTooltip,
13
13
  hideTooltip,
@@ -41,7 +41,7 @@ import {
41
41
  import {
42
42
  resolveTagColor,
43
43
  tagAttrKey
44
- } from "./chunk-WCUHAQKB.js";
44
+ } from "./chunk-FJUNPCYI.js";
45
45
 
46
46
  // src/timeline/renderer.ts
47
47
  import * as d3Scale from "d3-scale";
@@ -1607,4 +1607,4 @@ export {
1607
1607
  formatDateLabel,
1608
1608
  renderTimeline
1609
1609
  };
1610
- //# sourceMappingURL=chunk-XCLHOZAM.js.map
1610
+ //# sourceMappingURL=chunk-66RUL3XF.js.map
@@ -8,7 +8,7 @@ import {
8
8
  stripDefaultModifier,
9
9
  tagAttrKey,
10
10
  validateTagGroupNames
11
- } from "./chunk-WCUHAQKB.js";
11
+ } from "./chunk-FJUNPCYI.js";
12
12
  import {
13
13
  JOURNEY_MAP_REGISTRY,
14
14
  OPTION_NOCOLON_RE,
@@ -406,4 +406,4 @@ function parseStepLine(trimmed, lineNumber, counter, aliasMap, warn, diagnostics
406
406
  export {
407
407
  parseJourneyMap
408
408
  };
409
- //# sourceMappingURL=chunk-YZLMKW4T.js.map
409
+ //# sourceMappingURL=chunk-6HJBFVLO.js.map
@@ -9,7 +9,7 @@ import {
9
9
  tagAttrKey,
10
10
  validateTagGroupNames,
11
11
  validateTagValues
12
- } from "./chunk-WCUHAQKB.js";
12
+ } from "./chunk-FJUNPCYI.js";
13
13
  import {
14
14
  extractColor,
15
15
  measureIndent,
@@ -335,4 +335,4 @@ function parseBlockTail(tail, aliasMap) {
335
335
  export {
336
336
  parseBlock
337
337
  };
338
- //# sourceMappingURL=chunk-YB3FW24O.js.map
338
+ //# sourceMappingURL=chunk-7L3R6I3U.js.map
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-3CIOJ5YJ.js";
17
17
  import {
18
18
  formatDateLabel
19
- } from "./chunk-XCLHOZAM.js";
19
+ } from "./chunk-66RUL3XF.js";
20
20
  import {
21
21
  renderIntegratedLegend
22
- } from "./chunk-QUJGFNFN.js";
22
+ } from "./chunk-HEVYAHLW.js";
23
23
  import {
24
24
  TITLE_FONT_SIZE,
25
25
  TITLE_FONT_WEIGHT,
@@ -41,7 +41,7 @@ import {
41
41
  import {
42
42
  resolveActiveTagGroup,
43
43
  resolveTagColor
44
- } from "./chunk-WCUHAQKB.js";
44
+ } from "./chunk-FJUNPCYI.js";
45
45
  import {
46
46
  resolveColor
47
47
  } from "./chunk-TLVIHFRO.js";
@@ -987,4 +987,4 @@ export {
987
987
  focusEventLine,
988
988
  renderEventLineForExport
989
989
  };
990
- //# sourceMappingURL=chunk-PLZI6KPM.js.map
990
+ //# sourceMappingURL=chunk-7QKLIMRZ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  injectDefaultTagMetadata,
13
13
  resolveTagColor
14
- } from "./chunk-WCUHAQKB.js";
14
+ } from "./chunk-FJUNPCYI.js";
15
15
 
16
16
  // src/mindmap/text-wrap.ts
17
17
  var H_PAD = 16;
@@ -547,4 +547,4 @@ export {
547
547
  computeNodeText,
548
548
  layoutMindmap
549
549
  };
550
- //# sourceMappingURL=chunk-IA3FJYWR.js.map
550
+ //# sourceMappingURL=chunk-7TV5Y53Y.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-3CIOJ5YJ.js";
9
9
  import {
10
10
  renderIntegratedLegend
11
- } from "./chunk-QUJGFNFN.js";
11
+ } from "./chunk-HEVYAHLW.js";
12
12
  import {
13
13
  getMaxLegendReservedHeight
14
14
  } from "./chunk-7UEMZREK.js";
@@ -28,7 +28,7 @@ import {
28
28
  resolveActiveTagGroup,
29
29
  resolveTagColor,
30
30
  tagAttrKey
31
- } from "./chunk-WCUHAQKB.js";
31
+ } from "./chunk-FJUNPCYI.js";
32
32
 
33
33
  // src/sketch/renderer.ts
34
34
  import * as d3 from "d3-selection";
@@ -1040,4 +1040,4 @@ export {
1040
1040
  sketchEdgeGeometry,
1041
1041
  renderSketchForExport
1042
1042
  };
1043
- //# sourceMappingURL=chunk-3TDRHT4J.js.map
1043
+ //# sourceMappingURL=chunk-BBGDM4NQ.js.map
@@ -8,7 +8,7 @@ import {
8
8
  stripDefaultModifier,
9
9
  validateTagGroupNames,
10
10
  validateTagValues
11
- } from "./chunk-WCUHAQKB.js";
11
+ } from "./chunk-FJUNPCYI.js";
12
12
  import {
13
13
  parseArrow,
14
14
  parseInArrowLabel
@@ -1022,4 +1022,4 @@ export {
1022
1022
  parseSequenceDgmo,
1023
1023
  looksLikeSequence
1024
1024
  };
1025
- //# sourceMappingURL=chunk-T4BRO3Z6.js.map
1025
+ //# sourceMappingURL=chunk-BH3UYK36.js.map
@@ -15,7 +15,7 @@ import {
15
15
  stripDefaultModifier,
16
16
  tagAttrKey,
17
17
  validateTagGroupNames
18
- } from "./chunk-WCUHAQKB.js";
18
+ } from "./chunk-FJUNPCYI.js";
19
19
  import {
20
20
  normalizeName
21
21
  } from "./chunk-NOTA6TEI.js";
@@ -1253,4 +1253,4 @@ export {
1253
1253
  GANTT_KNOWN_OPTIONS,
1254
1254
  GANTT_KNOWN_BOOLEANS
1255
1255
  };
1256
- //# sourceMappingURL=chunk-UXOSVCLJ.js.map
1256
+ //# sourceMappingURL=chunk-C2CVAM3U.js.map
@@ -4,7 +4,7 @@ import {
4
4
  layoutC4Containers,
5
5
  layoutC4Context,
6
6
  layoutC4Deployment
7
- } from "./chunk-QFQ35BTO.js";
7
+ } from "./chunk-KFZYNWWO.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-QUJGFNFN.js";
20
+ } from "./chunk-HEVYAHLW.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-URSQLCTR.js";
37
+ } from "./chunk-QROYX7TT.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-WCUHAQKB.js";
48
+ } from "./chunk-FJUNPCYI.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-UUS2GIJZ.js.map
1038
+ //# sourceMappingURL=chunk-DFTFPYUD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  encodeDiagramUrl
3
- } from "./chunk-NISQC5KW.js";
3
+ } from "./chunk-SVTI362O.js";
4
4
  import {
5
5
  FONT_FAMILY
6
6
  } from "./chunk-6KFWC4CO.js";
@@ -176,8 +176,11 @@ function escapeXml(s) {
176
176
  }
177
177
 
178
178
  // src/utils/svg-embed.ts
179
- function normalizeSvgForEmbed(input) {
179
+ function normalizeSvgForEmbed(input, opts = {}) {
180
180
  let svg = input;
181
+ if ((opts.background ?? "transparent") === "transparent") {
182
+ svg = stripRootBackground(svg);
183
+ }
181
184
  const rootMatch = svg.match(/<svg[^>]*>/);
182
185
  const rootTag = rootMatch?.[0] ?? "";
183
186
  if (rootTag && !rootTag.includes("viewBox")) {
@@ -207,6 +210,73 @@ function normalizeSvgForEmbed(input) {
207
210
  svg = svg.replace(/<svg\s{2,}/g, "<svg ");
208
211
  return svg;
209
212
  }
213
+ var BG_MEANINGFUL_TYPES = /* @__PURE__ */ new Set(["map"]);
214
+ function defaultEmbedBackground(chartType) {
215
+ return chartType && BG_MEANINGFUL_TYPES.has(chartType) ? "opaque" : "transparent";
216
+ }
217
+ function stripRootBackground(svg) {
218
+ const rootMatch = svg.match(/<svg\b[^>]*>/);
219
+ if (!rootMatch) return svg;
220
+ const rootTag = rootMatch[0];
221
+ const styleMatch = rootTag.match(/style="([^"]*)"/);
222
+ const style = styleMatch?.[1] ?? "";
223
+ const bgMatch = style.match(/background:\s*([^;]+)/);
224
+ const bgColor = bgMatch ? normalizeColor(bgMatch[1]) : null;
225
+ const canvas = rootCanvas(rootTag, svg);
226
+ let out = svg;
227
+ if (bgMatch) {
228
+ const cleaned = style.replace(/background:\s*[^;]+;?/i, "").replace(/\s{2,}/g, " ").replace(/;\s*$/, "").trim();
229
+ const newRoot = (cleaned ? rootTag.replace(/style="[^"]*"/, `style="${cleaned}"`) : rootTag.replace(/\s*style="[^"]*"/, "")).replace(/<svg\s{2,}/, "<svg ");
230
+ out = out.replace(rootTag, newRoot);
231
+ }
232
+ if (bgColor && canvas) {
233
+ out = out.replace(
234
+ /<rect\b[^>]*?\/?>(?:\s*<\/rect>)?/g,
235
+ (m) => isFullCanvasFill(m, bgColor, canvas) ? "" : m
236
+ );
237
+ }
238
+ return out;
239
+ }
240
+ function isFullCanvasFill(tag, bgColor, canvas) {
241
+ const fm = tag.match(/\bfill="([^"]*)"/);
242
+ if (!fm || normalizeColor(fm[1]) !== bgColor) return false;
243
+ const w = numAttr(tag, "width");
244
+ const h = numAttr(tag, "height");
245
+ if (w === null || h === null) return false;
246
+ const x = numAttr(tag, "x") ?? 0;
247
+ const y = numAttr(tag, "y") ?? 0;
248
+ const T = 1.5;
249
+ return Math.abs(x) <= T && Math.abs(y) <= T && Math.abs(w - canvas.w) <= T && Math.abs(h - canvas.h) <= T;
250
+ }
251
+ function rootCanvas(rootTag, svg) {
252
+ const wm = rootTag.match(/\bwidth="([\d.]+)"/);
253
+ const hm = rootTag.match(/\bheight="([\d.]+)"/);
254
+ if (wm && hm) return { w: parseFloat(wm[1]), h: parseFloat(hm[1]) };
255
+ const vb = readViewBox(svg);
256
+ return vb ? { w: vb.width, h: vb.height } : null;
257
+ }
258
+ function numAttr(tag, name) {
259
+ const m = tag.match(new RegExp(`\\b${name}="([^"]*)"`));
260
+ if (!m) return null;
261
+ const n = parseFloat(m[1]);
262
+ return Number.isFinite(n) ? n : null;
263
+ }
264
+ function normalizeColor(c) {
265
+ const s = c.trim().toLowerCase();
266
+ const hex6 = s.match(/^#([0-9a-f]{6})$/);
267
+ if (hex6) {
268
+ const n = parseInt(hex6[1], 16);
269
+ return `${n >> 16 & 255},${n >> 8 & 255},${n & 255}`;
270
+ }
271
+ const hex3 = s.match(/^#([0-9a-f]{3})$/);
272
+ if (hex3) {
273
+ const [r, g, b] = hex3[1].split("").map((ch) => parseInt(ch + ch, 16));
274
+ return `${r},${g},${b}`;
275
+ }
276
+ const rgb = s.match(/^rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/);
277
+ if (rgb) return `${+rgb[1]},${+rgb[2]},${+rgb[3]}`;
278
+ return null;
279
+ }
210
280
  function getEmbedSvgViewBox(svg) {
211
281
  const tight = computeBBox(svg);
212
282
  if (!tight || tight.width <= 0 || tight.height <= 0) return null;
@@ -290,16 +360,24 @@ function computeBBox(svg) {
290
360
  const x = attr(tag, "x");
291
361
  const y = attr(tag, "y");
292
362
  if (x !== null && y !== null) {
293
- const w = text.length * 7;
363
+ const fontSize = attr(tag, "font-size") ?? (() => {
364
+ const s = tag.match(/font-size:\s*([\d.]+)/);
365
+ return s ? parseFloat(s[1]) : 14;
366
+ })();
367
+ const w = text.length * fontSize * 0.5;
294
368
  const anchor = tag.match(/\btext-anchor="([^"]*)"/)?.[1] ?? "start";
295
369
  const left = anchor === "middle" ? x - w / 2 : anchor === "end" ? x - w : x;
296
370
  const right = anchor === "middle" ? x + w / 2 : anchor === "end" ? x : x + w;
297
- push(left, y - 14);
298
- push(right, y + 4);
371
+ push(left, y - fontSize * 0.9);
372
+ push(right, y + fontSize * 0.25);
299
373
  }
300
374
  }
301
- for (const m of svg.matchAll(/<path\b[^>]*?\bd="([^"]+)"/g)) {
302
- const d = m[1];
375
+ for (const m of svg.matchAll(/<path\b[^>]*?>/g)) {
376
+ const tag = m[0];
377
+ if (tag.includes("data-embed-ignore-bbox")) continue;
378
+ const dm = tag.match(/\bd="([^"]+)"/);
379
+ if (!dm) continue;
380
+ const d = dm[1];
303
381
  const nums = d.match(/-?\d+(?:\.\d+)?/g);
304
382
  if (!nums) continue;
305
383
  for (let i = 0; i + 1 < nums.length; i += 2) {
@@ -326,6 +404,7 @@ function computeBBox(svg) {
326
404
  export {
327
405
  renderErrorCard,
328
406
  normalizeSvgForEmbed,
407
+ defaultEmbedBackground,
329
408
  getEmbedSvgViewBox
330
409
  };
331
- //# sourceMappingURL=chunk-L2ZTFHAY.js.map
410
+ //# sourceMappingURL=chunk-DN66GPY5.js.map
@@ -7,7 +7,7 @@ import {
7
7
  tagAttrKey,
8
8
  validateTagGroupNames,
9
9
  validateTagValues
10
- } from "./chunk-WCUHAQKB.js";
10
+ } from "./chunk-FJUNPCYI.js";
11
11
  import {
12
12
  tryCollectNote
13
13
  } from "./chunk-SCHXJTZL.js";
@@ -884,4 +884,4 @@ export {
884
884
  looksLikeBoxesAndLines,
885
885
  parseBoxesAndLines
886
886
  };
887
- //# sourceMappingURL=chunk-SU2VBK4L.js.map
887
+ //# sourceMappingURL=chunk-DSWVNQVS.js.map
@@ -10,7 +10,7 @@ import {
10
10
  tagAttrKey,
11
11
  validateTagGroupNames,
12
12
  validateTagValues
13
- } from "./chunk-WCUHAQKB.js";
13
+ } from "./chunk-FJUNPCYI.js";
14
14
  import {
15
15
  parseInArrowLabel
16
16
  } from "./chunk-FFUN5D66.js";
@@ -407,6 +407,11 @@ function parseSketch(content, palette) {
407
407
  currentTagGroup.entries.push({
408
408
  value: label,
409
409
  color: color ?? AUTO_TAG_COLOR_SENTINEL,
410
+ // When a color resolved, the recognized name is the entry's last
411
+ // token — keep it so a reparse can tell authored from auto.
412
+ ...color !== void 0 && {
413
+ authoredColor: cleanEntry.trim().split(/\s+/).pop()
414
+ },
410
415
  lineNumber
411
416
  });
412
417
  }
@@ -427,6 +432,11 @@ function parseSketch(content, palette) {
427
432
  currentTagGroup.entries.push({
428
433
  value: label,
429
434
  color: color ?? AUTO_TAG_COLOR_SENTINEL,
435
+ // When a color resolved, the recognized name is the entry's last token
436
+ // — keep it so a reparse can tell authored from auto.
437
+ ...color !== void 0 && {
438
+ authoredColor: cleanEntry.trim().split(/\s+/).pop()
439
+ },
430
440
  lineNumber
431
441
  });
432
442
  continue;
@@ -604,4 +614,4 @@ export {
604
614
  isSketchShapeKind,
605
615
  parseSketch
606
616
  };
607
- //# sourceMappingURL=chunk-5JSWBPZZ.js.map
617
+ //# sourceMappingURL=chunk-DZXYF2F5.js.map
@@ -14,7 +14,7 @@ import {
14
14
  tagAttrKey,
15
15
  validateTagGroupNames,
16
16
  validateTagValues
17
- } from "./chunk-WCUHAQKB.js";
17
+ } from "./chunk-FJUNPCYI.js";
18
18
  import {
19
19
  normalizeName
20
20
  } from "./chunk-NOTA6TEI.js";
@@ -1152,4 +1152,4 @@ export {
1152
1152
  extractPertSymbols,
1153
1153
  looksLikePert
1154
1154
  };
1155
- //# sourceMappingURL=chunk-6M5PJFQG.js.map
1155
+ //# sourceMappingURL=chunk-EAMEADTV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3HDBAXF5.js";
4
4
  import {
5
5
  renderIntegratedLegend
6
- } from "./chunk-QUJGFNFN.js";
6
+ } from "./chunk-HEVYAHLW.js";
7
7
  import {
8
8
  getMaxLegendReservedHeight
9
9
  } from "./chunk-7UEMZREK.js";
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  resolveTagColor,
32
32
  tagAttrKey
33
- } from "./chunk-WCUHAQKB.js";
33
+ } from "./chunk-FJUNPCYI.js";
34
34
  import {
35
35
  resolveColor
36
36
  } from "./chunk-TLVIHFRO.js";
@@ -937,4 +937,4 @@ export {
937
937
  renderBracket,
938
938
  renderBracketForExport
939
939
  };
940
- //# sourceMappingURL=chunk-KJXIHOVL.js.map
940
+ //# sourceMappingURL=chunk-FA6K3FWM.js.map
@@ -250,4 +250,4 @@ export {
250
250
  resolveActiveTagGroup,
251
251
  matchTagBlockHeading
252
252
  };
253
- //# sourceMappingURL=chunk-WCUHAQKB.js.map
253
+ //# sourceMappingURL=chunk-FJUNPCYI.js.map
@@ -8,7 +8,7 @@ import {
8
8
  stripDefaultModifier,
9
9
  tagAttrKey,
10
10
  validateTagGroupNames
11
- } from "./chunk-WCUHAQKB.js";
11
+ } from "./chunk-FJUNPCYI.js";
12
12
  import {
13
13
  parseInArrowLabel
14
14
  } from "./chunk-FFUN5D66.js";
@@ -610,4 +610,4 @@ export {
610
610
  looksLikeMap,
611
611
  parseMap
612
612
  };
613
- //# sourceMappingURL=chunk-FB2WHOEQ.js.map
613
+ //# sourceMappingURL=chunk-GKC3HILQ.js.map
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-P6T66CCZ.js";
22
22
  import {
23
23
  tagAttrKey
24
- } from "./chunk-WCUHAQKB.js";
24
+ } from "./chunk-FJUNPCYI.js";
25
25
 
26
26
  // src/utils/legend-d3.ts
27
27
  var LEGEND_TEXT_DY = "0.32em";
@@ -293,4 +293,4 @@ export {
293
293
  renderLegendD3,
294
294
  renderIntegratedLegend
295
295
  };
296
- //# sourceMappingURL=chunk-QUJGFNFN.js.map
296
+ //# sourceMappingURL=chunk-HEVYAHLW.js.map
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-YYVTBZZC.js";
21
21
  import {
22
22
  renderIntegratedLegend
23
- } from "./chunk-QUJGFNFN.js";
23
+ } from "./chunk-HEVYAHLW.js";
24
24
  import {
25
25
  getMaxLegendReservedHeight
26
26
  } from "./chunk-7UEMZREK.js";
@@ -47,7 +47,7 @@ import {
47
47
  } from "./chunk-P6T66CCZ.js";
48
48
  import {
49
49
  resolveTagColor
50
- } from "./chunk-WCUHAQKB.js";
50
+ } from "./chunk-FJUNPCYI.js";
51
51
  import {
52
52
  resolveColor
53
53
  } from "./chunk-TLVIHFRO.js";
@@ -783,4 +783,4 @@ export {
783
783
  renderBoxesAndLines,
784
784
  renderBoxesAndLinesForExport
785
785
  };
786
- //# sourceMappingURL=chunk-3ZPC476N.js.map
786
+ //# sourceMappingURL=chunk-HLJVEAOF.js.map