@diagrammo/dgmo 0.92.1 → 0.94.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.
Files changed (174) hide show
  1. package/dist/advanced.d.ts +103 -38
  2. package/dist/advanced.js +457 -423
  3. package/dist/block.d.ts +2 -2
  4. package/dist/block.js +75 -70
  5. package/dist/{chart-meta-BBqLnv5q.d.ts → chart-meta-BbjsRY7o.d.ts} +2 -2
  6. package/dist/chart-meta.d.ts +3 -3
  7. package/dist/chart-meta.js +25 -19
  8. package/dist/{chart-types-CbXlZFLd.d.ts → chart-types-Cppnp31G.d.ts} +173 -4
  9. package/dist/{charts-d3-QUUDVETP.js → charts-d3-SZV2SFTM.js} +7 -6
  10. package/dist/{chunk-ADNIO3XY.js → chunk-2FDQEQID.js} +5 -5
  11. package/dist/{chunk-QUGC7GWB.js → chunk-2HSHWPTO.js} +15 -15
  12. package/dist/{chunk-L5NW3PVL.js → chunk-2I4UQG7W.js} +1 -1
  13. package/dist/{chunk-2YAFDND3.js → chunk-2MS623GW.js} +4 -6
  14. package/dist/{chunk-73EYNV4O.js → chunk-2XMTZ5JR.js} +4 -6
  15. package/dist/{chunk-ZJAK6C7Y.js → chunk-3PP746YM.js} +6 -1
  16. package/dist/{chunk-MDVJYRJT.js → chunk-3TWBMU7K.js} +22 -22
  17. package/dist/{chunk-FTUMRSGT.js → chunk-3ZP3QC47.js} +8 -288
  18. package/dist/{chunk-J2E7EUER.js → chunk-4EX4OKGZ.js} +86 -23
  19. package/dist/{chunk-Y2V5AEVG.js → chunk-4SP6OUO7.js} +1952 -1824
  20. package/dist/{chunk-HIWHIYLD.js → chunk-4TEPDQHJ.js} +19 -19
  21. package/dist/{chunk-DEFBUZWV.js → chunk-5HAYT43L.js} +70 -54
  22. package/dist/{chunk-6WVX4KNP.js → chunk-5ZUZZDW5.js} +97 -297
  23. package/dist/{chunk-X5BUX2GK.js → chunk-6JCTW74W.js} +7 -5
  24. package/dist/{chunk-Q6W2K33N.js → chunk-6XLMTAEX.js} +1 -1
  25. package/dist/{chunk-ONYO5WJW.js → chunk-7IOZ6JE4.js} +21 -21
  26. package/dist/chunk-7SXV7NUS.js +416 -0
  27. package/dist/{chunk-NPWVOFB3.js → chunk-7WEYXYLC.js} +1 -1
  28. package/dist/{chunk-GE7ICBX6.js → chunk-AM42TLSZ.js} +102 -97
  29. package/dist/{chunk-WLLO3PZ3.js → chunk-AYUSD4Z6.js} +45 -19
  30. package/dist/{chunk-45QUTYPD.js → chunk-B25IWGDH.js} +69 -20
  31. package/dist/{chunk-JKST4RTT.js → chunk-BH2SF4TT.js} +6 -6
  32. package/dist/{chunk-6OIMUSDX.js → chunk-C6G36F5S.js} +9 -9
  33. package/dist/{chunk-DRFGIOZ6.js → chunk-CIHHTS5B.js} +4 -6
  34. package/dist/chunk-CYTFO2LF.js +209 -0
  35. package/dist/{chunk-Q2UFOKPB.js → chunk-DDIOWNHS.js} +22 -22
  36. package/dist/{chunk-Q6ZQX2HX.js → chunk-DLJJOCIT.js} +4 -6
  37. package/dist/{chunk-26BBJUBW.js → chunk-DNM3XZCK.js} +4 -6
  38. package/dist/{chunk-AUS7V54P.js → chunk-ERT7XDQW.js} +1 -1
  39. package/dist/{chunk-7ENDOHAA.js → chunk-FMAVHTYB.js} +919 -927
  40. package/dist/{chunk-URQIWIKX.js → chunk-FWVE373X.js} +4 -4
  41. package/dist/{chunk-VOR32OHN.js → chunk-G3HZ4PGE.js} +13 -15
  42. package/dist/{chunk-RBFJT23E.js → chunk-GWQRTA5W.js} +6 -6
  43. package/dist/chunk-GXCDD6NG.js +24 -0
  44. package/dist/{chunk-3PFMGNOM.js → chunk-HHVIE45A.js} +26 -11
  45. package/dist/{chunk-MXAP37W6.js → chunk-HI6R27YA.js} +16 -7
  46. package/dist/{chunk-QQPNCXAO.js → chunk-I37S3EZE.js} +18 -18
  47. package/dist/{chunk-YITHYQCL.js → chunk-IGJEKO2P.js} +8 -8
  48. package/dist/{chunk-BZX7QCXJ.js → chunk-IHN6WDEY.js} +15 -15
  49. package/dist/{chunk-QT3KDDXK.js → chunk-IN7XI6NO.js} +0 -7
  50. package/dist/{chunk-4QLGGQNO.js → chunk-IZHGT5HD.js} +44 -18
  51. package/dist/{chunk-5SSTVFPX.js → chunk-JT2BG7LM.js} +5 -7
  52. package/dist/{chunk-2BJW7FSF.js → chunk-KBEWVCK3.js} +1 -1
  53. package/dist/{chunk-DUPZ2BBY.js → chunk-KBHT5XEY.js} +143 -6
  54. package/dist/{chunk-V4D2ZQBE.js → chunk-KRPLP5LP.js} +6 -1
  55. package/dist/{chunk-QKY6W4NA.js → chunk-KSZB7TIY.js} +25 -25
  56. package/dist/{chunk-6ZL2XYM7.js → chunk-MLY5ALOV.js} +6 -6
  57. package/dist/{chunk-VSOZZYLK.js → chunk-NERQSSYD.js} +20 -9
  58. package/dist/{chunk-OQW4ETJX.js → chunk-NM5V5EKY.js} +6 -1
  59. package/dist/{chunk-EBSFSOJC.js → chunk-NOQB4KMV.js} +22 -22
  60. package/dist/{chunk-6BNNLVAR.js → chunk-NPDVWFAQ.js} +6 -1
  61. package/dist/{chunk-FSJ3ZA6N.js → chunk-OSSTOSXU.js} +12 -12
  62. package/dist/chunk-P7TRFL4P.js +54 -0
  63. package/dist/{chunk-A4PNWAUW.js → chunk-PGSGJLUR.js} +6 -1
  64. package/dist/{chunk-S7W75MIM.js → chunk-QKPOIJBT.js} +23 -5
  65. package/dist/{chunk-YO6AQU4A.js → chunk-QPQWY5RU.js} +12 -12
  66. package/dist/{chunk-NREU4JFE.js → chunk-RBVFNUAL.js} +6 -8
  67. package/dist/{chunk-5EBYPETE.js → chunk-RESEJSCV.js} +3 -5
  68. package/dist/{chunk-BRSM6Z34.js → chunk-RITTLIDJ.js} +14 -14
  69. package/dist/{chunk-MX4SZLSV.js → chunk-S5Y3OO3V.js} +16 -8
  70. package/dist/{chunk-O5WUZGPV.js → chunk-TASRGDYP.js} +18 -18
  71. package/dist/{chunk-HXULJZA2.js → chunk-TDAGJJPZ.js} +6 -1
  72. package/dist/chunk-UCHZJJIT.js +421 -0
  73. package/dist/{chunk-42UJ23H3.js → chunk-UIEKW4SG.js} +1 -0
  74. package/dist/{chunk-WFA6IULY.js → chunk-URRAWU5D.js} +5 -0
  75. package/dist/{chunk-IGKFOHBG.js → chunk-VBMRZCMQ.js} +13 -13
  76. package/dist/{chunk-JRWUHLRP.js → chunk-VDY2GR6U.js} +51 -8
  77. package/dist/{chunk-EJS3K44P.js → chunk-VGAMBOOC.js} +5 -3
  78. package/dist/{chunk-B5PEKSRH.js → chunk-VSAKEMDD.js} +6 -1
  79. package/dist/chunk-WTTIODDV.js +9 -0
  80. package/dist/{chunk-JLU52ZDT.js → chunk-XJQ6Z3FO.js} +10 -10
  81. package/dist/{chunk-KTGZDMDX.js → chunk-XKCRKD2B.js} +140 -53
  82. package/dist/{chunk-LRP5FXST.js → chunk-YQMIKX54.js} +61 -24
  83. package/dist/{chunk-H5UEVW6Q.js → chunk-ZD3QCNB7.js} +1 -1
  84. package/dist/clock.js +168 -0
  85. package/dist/completion-registry.js +3 -1
  86. package/dist/countdown.js +36 -395
  87. package/dist/{dgmo-router-4UAPPIKN.js → dgmo-router-E5O7RJSW.js} +50 -43
  88. package/dist/{dimensions-SCNVYLRF.js → dimensions-DS6FWLRY.js} +3 -3
  89. package/dist/{d3-BThYBTQk.d.ts → export-context-Ceh3wr0E.d.ts} +2 -8
  90. package/dist/{flowchart-parser-NA75YQ77.js → flowchart-parser-NZXASOZG.js} +8 -3
  91. package/dist/{flowchart-renderer-6MGGX4RC.js → flowchart-renderer-PTCRIANF.js} +17 -19
  92. package/dist/index.d.ts +8 -7
  93. package/dist/index.js +80 -74
  94. package/dist/{layout-MBVBAMPA.js → layout-3TSVAGWH.js} +2 -2
  95. package/dist/layout-ISSBWBH7.js +24 -0
  96. package/dist/layout-IT4ZTV6C.js +24 -0
  97. package/dist/{layout-BNLFQHSB.js → layout-U3AH6M7J.js} +9 -10
  98. package/dist/layout-VC3MXRB4.js +29 -0
  99. package/dist/layout-VDCJOZSH.js +11 -0
  100. package/dist/{layout-search-PMYL3VWS.js → layout-search-BBX2BMEF.js} +11 -12
  101. package/dist/{palettes-IN7ZFRJM.js → palettes-4Y7CL2QL.js} +4 -2
  102. package/dist/{parser-QYISOAGR.js → parser-4RFY7D52.js} +8 -3
  103. package/dist/{parser-3MK56JZC.js → parser-4Y6PODW6.js} +2 -2
  104. package/dist/{parser-GX5YLRIP.js → parser-7QKQ4P4P.js} +8 -3
  105. package/dist/{parser-2NWH5JUS.js → parser-A3AN76RQ.js} +2 -1
  106. package/dist/{parser-LCJ76UXS.js → parser-BT4NI6JY.js} +5 -1
  107. package/dist/{parser-FXDS4JDK.js → parser-F7NDRPMA.js} +2 -2
  108. package/dist/{parser-BES6LV3G.js → parser-GDLKUBTO.js} +5 -1
  109. package/dist/{parser-SEUTXN6U.js → parser-KJPPUN4D.js} +2 -2
  110. package/dist/{parser-SIKL4PLF.js → parser-KMKVFET2.js} +5 -1
  111. package/dist/{parser-5LW5JDYG.js → parser-NL73FSFI.js} +5 -1
  112. package/dist/{parser-VA7ZQQTA.js → parser-NUU3DVW4.js} +5 -1
  113. package/dist/{parser-XZUKNZPB.js → parser-R3LPEQIT.js} +7 -1
  114. package/dist/{parser-X23GRTQJ.js → parser-RCIEKN7Y.js} +5 -1
  115. package/dist/{parser-L6RWDXQN.js → parser-TAYRTCPR.js} +8 -3
  116. package/dist/redraw-AHW7EUUF.js +1698 -0
  117. package/dist/redraw-STZ4WJAI.js +73 -0
  118. package/dist/{renderer-LM4ICK6I.js → renderer-2LYX6NHN.js} +4 -5
  119. package/dist/{renderer-NHTR7IRR.js → renderer-3NLDX7DQ.js} +4 -5
  120. package/dist/{renderer-TO2NVJP3.js → renderer-4SE7R22T.js} +50 -45
  121. package/dist/{renderer-3IHQI4A4.js → renderer-53B523PM.js} +11 -10
  122. package/dist/{renderer-3JY6JAQJ.js → renderer-7OGGV327.js} +5 -6
  123. package/dist/{renderer-2FVUPBGV.js → renderer-AM7P4LN7.js} +1 -1
  124. package/dist/{renderer-5VKPB4LL.js → renderer-BXD5KVSR.js} +5 -5
  125. package/dist/{renderer-OAR5VPH4.js → renderer-DAZWHNLI.js} +2 -2
  126. package/dist/{renderer-WIU5BJUK.js → renderer-DDWDCM2K.js} +2 -2
  127. package/dist/{renderer-3QAFDXEY.js → renderer-FMTLSOCX.js} +16 -12
  128. package/dist/{renderer-JEJT3YET.js → renderer-HX6ICPDX.js} +2 -3
  129. package/dist/{renderer-NDA2FFYB.js → renderer-ISQJ2ELA.js} +5 -5
  130. package/dist/{renderer-XGG2UNXT.js → renderer-IXBOT6DU.js} +3 -4
  131. package/dist/{renderer-S3YCLJKL.js → renderer-J3GPDK73.js} +20 -22
  132. package/dist/{renderer-DVNMCYHZ.js → renderer-J7ZSTJUE.js} +15 -15
  133. package/dist/{renderer-ALWVK3EJ.js → renderer-JJ4QW3SK.js} +6 -6
  134. package/dist/{renderer-RUSFL7WU.js → renderer-JYHA6R2D.js} +8 -7
  135. package/dist/{renderer-5TZVFQ7K.js → renderer-KJ3V5BYP.js} +7 -8
  136. package/dist/{renderer-RSK6QFWN.js → renderer-LNP23NSM.js} +7 -9
  137. package/dist/{renderer-ZHGHTSNG.js → renderer-M5DUMITP.js} +13 -12
  138. package/dist/{renderer-O6DY46AV.js → renderer-MWZC7TMD.js} +7 -7
  139. package/dist/{renderer-DC7C5Q3G.js → renderer-NOYLNVTI.js} +2 -2
  140. package/dist/{renderer-ISSDGK54.js → renderer-O6RP52CQ.js} +3 -3
  141. package/dist/{renderer-ZGY7P4BM.js → renderer-OUDHH5MV.js} +19 -22
  142. package/dist/{renderer-QGIHLZOJ.js → renderer-PHLCYVSN.js} +9 -10
  143. package/dist/{renderer-VPIELEE5.js → renderer-QTPWRRJ7.js} +8 -9
  144. package/dist/{renderer-LQP3AGEJ.js → renderer-RUSQJFFC.js} +3 -4
  145. package/dist/{renderer-MM27BSBO.js → renderer-TINHO2IO.js} +3 -4
  146. package/dist/{renderer-7ZZG5HR3.js → renderer-UTEEJDGB.js} +9 -9
  147. package/dist/{renderer-J5FKF423.js → renderer-W4MUMXJE.js} +7 -4
  148. package/dist/{renderer-XO57LTU4.js → renderer-WPN2SXGT.js} +5 -5
  149. package/dist/{renderer-ZZ6MWVB7.js → renderer-XCLARXCK.js} +4 -4
  150. package/dist/{renderer-J666LZXJ.js → renderer-XOWDERU2.js} +8 -8
  151. package/dist/{state-parser-TIR2ORJY.js → state-parser-KPVW5CRI.js} +8 -3
  152. package/dist/{state-renderer-G6SUXU4J.js → state-renderer-ZVEI265C.js} +18 -21
  153. package/dist/{tag-groups-DsoVpAY-.d.ts → tag-groups-DydewK3D.d.ts} +2 -173
  154. package/dist/{themes-DRNjxX7Q.d.ts → themes-DzIH3Hjv.d.ts} +3 -2
  155. package/docs/ai-integration.md +1 -1
  156. package/docs/language-reference.md +23 -2
  157. package/gallery/fixtures/whiteboard.dgmo +3 -0
  158. package/package.json +2 -6
  159. package/dist/chunk-3Y63RFJL.js +0 -75
  160. package/dist/chunk-5DH3KYFH.js +0 -20
  161. package/dist/chunk-O753JUEZ.js +0 -67
  162. package/dist/chunk-RJNZHFNG.js +0 -51
  163. package/dist/chunk-Z6DXWULM.js +0 -23
  164. package/dist/layout-5USEVQBY.js +0 -25
  165. package/dist/layout-J3AGFZZ7.js +0 -10
  166. package/dist/layout-S3RLVPH4.js +0 -25
  167. package/dist/layout-WRG4APSJ.js +0 -32
  168. package/dist/{chunk-DGUGE67L.js → chunk-CDYV46JE.js} +3 -3
  169. package/dist/{chunk-TKAB3FTK.js → chunk-DRQSB72S.js} +11 -11
  170. package/dist/{chunk-ZKP77MB3.js → chunk-FVTYJUXR.js} +5 -5
  171. package/dist/{chunk-MA42PIGJ.js → chunk-H5NVCOEJ.js} +4 -4
  172. package/dist/{chunk-BEA4D7OS.js → chunk-IXHWS2HI.js} +3 -3
  173. package/dist/{chunk-SOHZDW6N.js → chunk-UXNA2H2V.js} +3 -3
  174. package/dist/{chunk-NO3UX6AP.js → chunk-V2NQV7VL.js} +4 -4
@@ -1,14 +1,31 @@
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 = [];
11
- const regex = /\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|`(.+?)`|\[(.+?)\]\((.+?)\)|(https?:\/\/[^\s)>\]]+|www\.[^\s)>\]]+)|([^*_`[]+?(?=https?:\/\/|www\.|$)|[^*_`[]+)/g;
28
+ const regex = /\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|`(.+?)`|\[([^[\]\n\r]+)\]\(((?:[^()\n\r]|\([^()\n\r]*\))+)\)|(https?:\/\/[^\s)>\]]+|www\.[^\s)>\]]+)|([^*_`[]+?(?=https?:\/\/|www\.|$)|[^*_`[]+|\[)/g;
12
29
  let match;
13
30
  while ((match = regex.exec(text)) !== null) {
14
31
  if (match[1])
@@ -41,7 +58,7 @@ function truncateBareUrl(url) {
41
58
  return stripped.slice(0, BARE_URL_MAX_DISPLAY - 1) + "\u2026";
42
59
  }
43
60
  function stripInlineMarkdown(text) {
44
- return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1").replace(
61
+ return text.replace(/\[([^[\]\n\r]+)\]\((?:[^()\n\r]|\([^()\n\r]*\))+\)/g, "$1").replace(
45
62
  /https?:\/\/[^\s)>\]]+|www\.[^\s)>\]]+/g,
46
63
  (u) => truncateBareUrl(u)
47
64
  ).replace(/\*\*|__|[*_`]/g, "");
@@ -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,
@@ -1,27 +1,27 @@
1
1
  import {
2
- renderIntegratedLegend
3
- } from "./chunk-NMS5XSLX.js";
2
+ isBlockNode
3
+ } from "./chunk-XSVWUOUZ.js";
4
+ import {
5
+ layoutInlineHeader
6
+ } from "./chunk-UIEKW4SG.js";
7
+ import {
8
+ TITLE_FONT_SIZE,
9
+ TITLE_FONT_WEIGHT,
10
+ TITLE_Y
11
+ } from "./chunk-VLC6WNRD.js";
4
12
  import {
5
13
  EDGE_DASH
6
14
  } from "./chunk-XCKNFFKM.js";
7
15
  import {
8
- layoutInlineHeader
9
- } from "./chunk-42UJ23H3.js";
16
+ renderIntegratedLegend
17
+ } from "./chunk-NMS5XSLX.js";
10
18
  import {
11
19
  getLegendExtent,
12
20
  getMaxLegendReservedHeight
13
21
  } from "./chunk-JILEYZ2V.js";
14
- import {
15
- TITLE_FONT_SIZE,
16
- TITLE_FONT_WEIGHT,
17
- TITLE_Y
18
- } from "./chunk-VLC6WNRD.js";
19
22
  import {
20
23
  FONT_FAMILY
21
24
  } from "./chunk-ICLB27PZ.js";
22
- import {
23
- isBlockNode
24
- } from "./chunk-XSVWUOUZ.js";
25
25
  import {
26
26
  resolveTagColor,
27
27
  tagAttrKey
@@ -1,12 +1,9 @@
1
- import {
2
- parseInlineMarkdown
3
- } from "./chunk-S7W75MIM.js";
4
- import {
5
- safeHref
6
- } from "./chunk-Z6DXWULM.js";
7
1
  import {
8
2
  ScaleContext
9
3
  } from "./chunk-24YPR5EH.js";
4
+ import {
5
+ TITLE_FONT_SIZE
6
+ } from "./chunk-VLC6WNRD.js";
10
7
  import {
11
8
  renderIntegratedLegend
12
9
  } from "./chunk-NMS5XSLX.js";
@@ -14,8 +11,9 @@ import {
14
11
  getMaxLegendReservedHeight
15
12
  } from "./chunk-JILEYZ2V.js";
16
13
  import {
17
- TITLE_FONT_SIZE
18
- } from "./chunk-VLC6WNRD.js";
14
+ parseInlineMarkdown,
15
+ safeHref
16
+ } from "./chunk-QKPOIJBT.js";
19
17
  import {
20
18
  FONT_FAMILY
21
19
  } from "./chunk-ICLB27PZ.js";
@@ -1,13 +1,11 @@
1
1
  import {
2
2
  searchPlacement
3
- } from "./chunk-HXULJZA2.js";
3
+ } from "./chunk-TDAGJJPZ.js";
4
4
  import {
5
5
  buildPlacedNotes,
6
- noteCanvasShift
7
- } from "./chunk-FTUMRSGT.js";
8
- import {
6
+ noteCanvasShift,
9
7
  resolveNotes
10
- } from "./chunk-O753JUEZ.js";
8
+ } from "./chunk-7SXV7NUS.js";
11
9
  import {
12
10
  measureText
13
11
  } from "./chunk-KAO7JL4I.js";
@@ -1,33 +1,33 @@
1
1
  import {
2
- renderInlineText
3
- } from "./chunk-S7W75MIM.js";
2
+ parseKanban
3
+ } from "./chunk-LKZCUFOW.js";
4
+ import {
5
+ serializeSvg
6
+ } from "./chunk-CYRB2JTN.js";
4
7
  import {
5
8
  ScaleContext
6
9
  } from "./chunk-24YPR5EH.js";
7
10
  import {
8
- keepSwimlaneToggleFocus,
9
- renderIntegratedLegend,
10
- wireSwimlaneToggle
11
- } from "./chunk-NMS5XSLX.js";
11
+ TITLE_FONT_SIZE,
12
+ TITLE_FONT_WEIGHT
13
+ } from "./chunk-VLC6WNRD.js";
12
14
  import {
13
15
  CARD_RADIUS
14
16
  } from "./chunk-XCKNFFKM.js";
15
17
  import {
16
- serializeSvg
17
- } from "./chunk-CYRB2JTN.js";
18
+ keepSwimlaneToggleFocus,
19
+ renderIntegratedLegend,
20
+ wireSwimlaneToggle
21
+ } from "./chunk-NMS5XSLX.js";
18
22
  import {
19
23
  getMaxLegendReservedHeight
20
24
  } from "./chunk-JILEYZ2V.js";
21
25
  import {
22
- TITLE_FONT_SIZE,
23
- TITLE_FONT_WEIGHT
24
- } from "./chunk-VLC6WNRD.js";
26
+ renderInlineText
27
+ } from "./chunk-QKPOIJBT.js";
25
28
  import {
26
29
  FONT_FAMILY
27
30
  } from "./chunk-ICLB27PZ.js";
28
- import {
29
- parseKanban
30
- } from "./chunk-LKZCUFOW.js";
31
31
  import {
32
32
  tagAttrKey
33
33
  } from "./chunk-4SACN2C5.js";
@@ -1,13 +1,7 @@
1
- import {
2
- wrapDescriptionLines
3
- } from "./chunk-NPWVOFB3.js";
4
- import {
5
- renderInlineText,
6
- stripInlineMarkdown
7
- } from "./chunk-S7W75MIM.js";
8
1
  import {
9
2
  DAY_MS,
10
3
  applyOrdinalTemplate,
4
+ dayKey,
11
5
  dayStart,
12
6
  formatCompound,
13
7
  formatCount,
@@ -18,10 +12,17 @@ import {
18
12
  ordinalFor,
19
13
  sameDay,
20
14
  splitClockSeconds
21
- } from "./chunk-WFA6IULY.js";
15
+ } from "./chunk-URRAWU5D.js";
22
16
  import {
23
17
  now
24
18
  } from "./chunk-3DPOIW3W.js";
19
+ import {
20
+ wrapDescriptionLines
21
+ } from "./chunk-7WEYXYLC.js";
22
+ import {
23
+ renderInlineText,
24
+ stripInlineMarkdown
25
+ } from "./chunk-QKPOIJBT.js";
25
26
  import {
26
27
  FONT_FAMILY
27
28
  } from "./chunk-ICLB27PZ.js";
@@ -1006,6 +1007,13 @@ function renderCountdown(container, parsed, palette, isDark, exportDims) {
1006
1007
  value.attr("data-dgmo-countdown-since-label", parsed.sinceLabel);
1007
1008
  }
1008
1009
  stampRecur(value, parsed);
1010
+ if (bandKind !== null && resolved !== null) {
1011
+ value.attr("data-dgmo-countdown-band-day", dayKey(now2, parsed.tz)).attr("data-dgmo-countdown-band-on", dayKey(resolved, parsed.tz));
1012
+ svg.attr(
1013
+ "data-dgmo-countdown-redraw",
1014
+ JSON.stringify({ parsed, palette, isDark, width, height })
1015
+ );
1016
+ }
1009
1017
  if (subText) {
1010
1018
  const detailSel = svg.append("text").attr("x", stacked ? leftX : width - padX).attr("y", heroBaseline + heroFont * 0.28 + detailFont).attr("text-anchor", stacked ? "start" : "end").attr("dominant-baseline", "alphabetic").attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", detailFont).attr("font-weight", "normal").attr("data-dgmo-countdown-detail", "");
1011
1019
  paintClock(detailSel, subText, Math.round(detailFont * 0.66), bandC.now);
@@ -1,38 +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
9
  capLabelColumn,
4
10
  computeTimeTicks,
5
11
  showFullOnHover
6
- } from "./chunk-VSOZZYLK.js";
12
+ } from "./chunk-NERQSSYD.js";
13
+ import {
14
+ parseTimelineDate
15
+ } from "./chunk-BQO24BDM.js";
7
16
  import {
8
17
  ScaleContext
9
18
  } from "./chunk-24YPR5EH.js";
10
- import {
11
- keepSwimlaneToggleFocus,
12
- renderIntegratedLegend,
13
- wireSwimlaneToggle
14
- } from "./chunk-NMS5XSLX.js";
15
19
  import {
16
20
  EDGE_DASH,
17
21
  GRID_DASH,
18
22
  scaleDash
19
23
  } from "./chunk-XCKNFFKM.js";
20
24
  import {
21
- createTooltip,
22
- hideTooltip,
23
- renderChartTitle,
24
- showTooltip
25
- } from "./chunk-Q6W2K33N.js";
26
- import {
27
- FONT_FAMILY
28
- } from "./chunk-ICLB27PZ.js";
29
- import {
30
- parseTimelineDate
31
- } from "./chunk-BQO24BDM.js";
25
+ keepSwimlaneToggleFocus,
26
+ renderIntegratedLegend,
27
+ wireSwimlaneToggle
28
+ } from "./chunk-NMS5XSLX.js";
32
29
  import {
33
30
  DEFAULT_PALETTE_ID,
34
31
  getPalette
35
- } from "./chunk-7ENDOHAA.js";
32
+ } from "./chunk-FMAVHTYB.js";
33
+ import {
34
+ FONT_FAMILY
35
+ } from "./chunk-ICLB27PZ.js";
36
36
  import {
37
37
  resolveTagColor,
38
38
  tagAttrKey
@@ -4,11 +4,12 @@ import {
4
4
  countSplineCrossings,
5
5
  deroutePierces,
6
6
  searchBudget
7
- } from "./chunk-X5BUX2GK.js";
7
+ } from "./chunk-6JCTW74W.js";
8
8
 
9
9
  // src/utils/placement-search.ts
10
10
  var SEARCH_RANKERS = ["tight-tree", "longest-path"];
11
11
  var SEARCH_SEEDS = 6;
12
+ var SEED_PATIENCE = 2;
12
13
  function seeded(s) {
13
14
  return () => {
14
15
  s = s + 1831565813 | 0;
@@ -68,9 +69,12 @@ function searchPlacement(direction, place, score) {
68
69
  )
69
70
  ];
70
71
  let attempts = 1;
72
+ let losingSeeds = 0;
71
73
  for (const cfg of configs) {
72
74
  if (bestBad === 0 || attempts >= budget.maxCandidates) break;
75
+ if (losingSeeds >= SEED_PATIENCE) break;
73
76
  attempts++;
77
+ if (cfg.seed !== void 0) losingSeeds++;
74
78
  let g;
75
79
  try {
76
80
  g = place(
@@ -90,6 +94,7 @@ function searchPlacement(direction, place, score) {
90
94
  best = g;
91
95
  bestLay = lay;
92
96
  bestBad = bad;
97
+ losingSeeds = 0;
93
98
  }
94
99
  }
95
100
  const bent = deroutePierces(bestLay);