@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,12 +1,12 @@
1
1
  import {
2
2
  compactNumber
3
3
  } from "./chunk-CN4RDJDV.js";
4
- import {
5
- parseInlineMarkdown
6
- } from "./chunk-S7W75MIM.js";
7
4
  import {
8
5
  TITLE_FONT_WEIGHT
9
6
  } from "./chunk-VLC6WNRD.js";
7
+ import {
8
+ parseInlineMarkdown
9
+ } from "./chunk-QKPOIJBT.js";
10
10
  import {
11
11
  FONT_FAMILY
12
12
  } from "./chunk-ICLB27PZ.js";
@@ -82,7 +82,7 @@ function renderGoalForExport(container, parsed, palette, isDark, exportDims) {
82
82
  renderGoal(container, parsed, palette, isDark, exportDims);
83
83
  }
84
84
  function displayLen(token) {
85
- return token.replace(/\[(.+?)\]\((.+?)\)/g, "$1").replace(/\*\*|__|\*|_|`/g, "").length;
85
+ return token.replace(/\[([^[\]\n\r]+)\]\((?:[^()\n\r]|\([^()\n\r]*\))+\)/g, "$1").replace(/\*\*|__|\*|_|`/g, "").length;
86
86
  }
87
87
  function wrapText(text, maxChars) {
88
88
  const words = text.split(/\s+/);
@@ -5,20 +5,14 @@ import {
5
5
  scoreToCurveY
6
6
  } from "./chunk-EBIDNRSR.js";
7
7
  import {
8
- wrapNoteBody
9
- } from "./chunk-RJNZHFNG.js";
10
- import {
11
- NOTE_BULLET_INDENT
12
- } from "./chunk-5DH3KYFH.js";
8
+ parseJourneyMap
9
+ } from "./chunk-PGSGJLUR.js";
13
10
  import {
14
- renderInlineText
15
- } from "./chunk-S7W75MIM.js";
11
+ serializeSvg
12
+ } from "./chunk-CYRB2JTN.js";
16
13
  import {
17
14
  ScaleContext
18
15
  } from "./chunk-24YPR5EH.js";
19
- import {
20
- renderIntegratedLegend
21
- } from "./chunk-NMS5XSLX.js";
22
16
  import {
23
17
  CARD_RADIUS,
24
18
  CONTAINER_RADIUS,
@@ -26,14 +20,18 @@ import {
26
20
  NODE_STROKE_WIDTH
27
21
  } from "./chunk-XCKNFFKM.js";
28
22
  import {
29
- serializeSvg
30
- } from "./chunk-CYRB2JTN.js";
23
+ renderIntegratedLegend
24
+ } from "./chunk-NMS5XSLX.js";
25
+ import {
26
+ NOTE_BULLET_INDENT,
27
+ wrapNoteBody
28
+ } from "./chunk-VDY2GR6U.js";
29
+ import {
30
+ renderInlineText
31
+ } from "./chunk-QKPOIJBT.js";
31
32
  import {
32
33
  FONT_FAMILY
33
34
  } from "./chunk-ICLB27PZ.js";
34
- import {
35
- parseJourneyMap
36
- } from "./chunk-A4PNWAUW.js";
37
35
  import {
38
36
  resolveActiveTagGroup,
39
37
  tagAttrKey
@@ -1,9 +1,3 @@
1
- import {
2
- wrapDescriptionLines
3
- } from "./chunk-NPWVOFB3.js";
4
- import {
5
- renderInlineText
6
- } from "./chunk-S7W75MIM.js";
7
1
  import {
8
2
  ScaleContext
9
3
  } from "./chunk-24YPR5EH.js";
@@ -12,6 +6,12 @@ import {
12
6
  TITLE_FONT_WEIGHT,
13
7
  TITLE_Y
14
8
  } from "./chunk-VLC6WNRD.js";
9
+ import {
10
+ wrapDescriptionLines
11
+ } from "./chunk-7WEYXYLC.js";
12
+ import {
13
+ renderInlineText
14
+ } from "./chunk-QKPOIJBT.js";
15
15
  import {
16
16
  FONT_FAMILY
17
17
  } from "./chunk-ICLB27PZ.js";
@@ -0,0 +1,24 @@
1
+ import {
2
+ atlasPalette,
3
+ blueprintPalette,
4
+ catppuccinPalette,
5
+ nordPalette,
6
+ slatePalette,
7
+ tidewaterPalette,
8
+ tokyoNightPalette
9
+ } from "./chunk-FMAVHTYB.js";
10
+
11
+ // src/palettes/index.ts
12
+ var palettes = {
13
+ atlas: atlasPalette,
14
+ blueprint: blueprintPalette,
15
+ slate: slatePalette,
16
+ tidewater: tidewaterPalette,
17
+ nord: nordPalette,
18
+ catppuccin: catppuccinPalette,
19
+ tokyoNight: tokyoNightPalette
20
+ };
21
+
22
+ export {
23
+ palettes
24
+ };
@@ -1,30 +1,31 @@
1
- import {
2
- buildSwatches
3
- } from "./chunk-T7NWBVSC.js";
4
1
  import {
5
2
  layoutMap,
6
3
  mapLegendConfig,
7
4
  mapLegendGroups,
8
5
  parsePathRings
9
- } from "./chunk-GE7ICBX6.js";
6
+ } from "./chunk-AM42TLSZ.js";
7
+ import {
8
+ buildSwatches
9
+ } from "./chunk-T7NWBVSC.js";
10
10
  import {
11
11
  parseClock
12
12
  } from "./chunk-NXU4N5WT.js";
13
13
  import {
14
14
  fixedParts,
15
+ fixedTimeCells,
15
16
  formatTime,
16
17
  sunLine,
17
18
  workStatus,
18
19
  zoneParts
19
20
  } from "./chunk-A2RUBBVT.js";
20
- import {
21
- renderIntegratedLegend
22
- } from "./chunk-NMS5XSLX.js";
23
21
  import {
24
22
  TITLE_FONT_SIZE,
25
23
  TITLE_FONT_WEIGHT,
26
24
  TITLE_Y
27
25
  } from "./chunk-VLC6WNRD.js";
26
+ import {
27
+ renderIntegratedLegend
28
+ } from "./chunk-NMS5XSLX.js";
28
29
  import {
29
30
  FONT_FAMILY
30
31
  } from "./chunk-ICLB27PZ.js";
@@ -44,6 +45,12 @@ import * as d3Selection from "d3-selection";
44
45
 
45
46
  // src/map/clock-card.ts
46
47
  var WEEKDAY_ABBR = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
48
+ var WIDEST_STATUS = [
49
+ "starts in 23h 59m",
50
+ "ended 23h 59m ago",
51
+ "23h 59m left",
52
+ "Weekend"
53
+ ];
47
54
  var clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));
48
55
  function workFromDirectives(d) {
49
56
  if (d.clockHours === void 0) return null;
@@ -83,7 +90,6 @@ function renderClockCards(gCards, layout, resolved, palette, isDark, now, frameW
83
90
  const mainFont = 18;
84
91
  const sf = 8;
85
92
  const advance = (s, f) => [...s].reduce((w, c) => w + f * (c === ":" ? 0.334 : 0.6), 0);
86
- const mainW = advance(ts.main, mainFont);
87
93
  const secW = advance(`:${ts.sec}`, sf);
88
94
  const stackW = Math.max(secW, ts.ap ? measureText(ts.ap, sf) : 0);
89
95
  const stackGap = 6;
@@ -91,8 +97,15 @@ function renderClockCards(gCards, layout, resolved, palette, isDark, now, frameW
91
97
  const iconR = 3.5;
92
98
  const iconGap = 5;
93
99
  const line2Icon = status ? iconR * 2 + iconGap : 0;
94
- const line1W = mainW + stackGap + stackW;
95
- const line2W = line2Icon + measureText(line2, 10.5);
100
+ const mainMaxW = fixedTimeCells("00:00", 0, mainFont).width;
101
+ const line1W = mainMaxW + stackGap + stackW;
102
+ const weekdayPrefix = showWeekday ? `${parts.weekday} \xB7 ` : "";
103
+ const line2W = line2Icon + Math.max(
104
+ measureText(line2, 10.5),
105
+ ...(status ? WIDEST_STATUS : []).map(
106
+ (t) => measureText(weekdayPrefix + t, 10.5)
107
+ )
108
+ );
96
109
  const cardW = Math.max(line1W, line2W) + padX * 2;
97
110
  const cardH = 44;
98
111
  const leaderGap = 7;
@@ -125,7 +138,9 @@ function renderClockCards(gCards, layout, resolved, palette, isDark, now, frameW
125
138
  const statusColor = (cls) => cls === "ok" ? sw.ok : cls === "soon" ? sw.soon : sw.off;
126
139
  const line1Y = cardTop + 20;
127
140
  const timeX = cardLeft + padX;
128
- g.append("text").attr("data-dgmo-clock-digital-part", "main").attr("x", timeX).attr("y", line1Y).attr("font-family", FONT_FAMILY).attr("fill", palette.text).attr("font-size", mainFont).attr("font-weight", "bold").attr("textLength", mainW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(ts.main);
141
+ const { cells, width: mainW } = fixedTimeCells(ts.main, timeX, mainFont);
142
+ const mainText = g.append("text").attr("data-dgmo-clock-digital-part", "main").attr("y", line1Y).attr("text-anchor", "middle").attr("font-family", FONT_FAMILY).attr("fill", palette.text).attr("font-size", mainFont).attr("font-weight", "bold").attr("data-dgmo-clock-x0", timeX).attr("data-dgmo-clock-fs", mainFont).attr("data-dgmo-clock-gap", stackGap);
143
+ for (const c of cells) mainText.append("tspan").attr("x", c.x).text(c.ch);
129
144
  const stackX = timeX + mainW + stackGap;
130
145
  const capTop = line1Y - mainFont * 0.7;
131
146
  g.append("text").attr("data-dgmo-clock-digital-part", "sec").attr("x", stackX).attr("y", capTop + sf * 0.72).attr("font-family", FONT_FAMILY).attr("fill", muted).attr("font-size", sf).attr("textLength", secW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(`:${ts.sec}`);
@@ -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";
@@ -20,6 +18,10 @@ var HEADER_BASE = 36;
20
18
  var TABLE_FONT_SIZE = 13;
21
19
  var COLUMN_FONT_SIZE = 11;
22
20
  var EDGE_LABEL_FONT_SIZE = 11;
21
+ var RANKSEP = 80;
22
+ var EDGE_LABEL_MIN_ROOM = 10;
23
+ var EDGE_LABEL_MARKER_ROOM = 24;
24
+ var EDGE_LABEL_BOX_HEIGHT = 16;
23
25
  var CONSTRAINT_ICON_WIDTH = 16;
24
26
  var MEMBER_LINE_HEIGHT = 18;
25
27
  var COMPARTMENT_PADDING_Y = 8;
@@ -96,7 +98,7 @@ function layoutComponent(tables, rels, dimMap) {
96
98
  rankdir: "LR",
97
99
  ranker,
98
100
  nodesep: 40,
99
- ranksep: 80,
101
+ ranksep: RANKSEP,
100
102
  edgesep: 20
101
103
  });
102
104
  g2.setDefaultEdgeLabel(() => ({}));
@@ -105,10 +107,17 @@ function layoutComponent(tables, rels, dimMap) {
105
107
  g2.setNode(table.id, { width: dims.width, height: dims.height });
106
108
  }
107
109
  for (const rel of ord(rels)) {
110
+ const box = rel.label ? measureText(rel.label, EDGE_LABEL_FONT_SIZE) + 8 : 0;
111
+ const excess = box + 2 * EDGE_LABEL_MIN_ROOM > RANKSEP ? box + 2 * EDGE_LABEL_MARKER_ROOM - RANKSEP : 0;
108
112
  g2.setEdge(
109
113
  rel.source,
110
114
  rel.target,
111
- { label: rel.label ?? "" },
115
+ excess > 0 ? {
116
+ label: rel.label,
117
+ width: excess,
118
+ height: EDGE_LABEL_BOX_HEIGHT,
119
+ labelpos: "c"
120
+ } : { label: rel.label ?? "" },
112
121
  String(rel.lineNumber)
113
122
  );
114
123
  }
@@ -1,18 +1,20 @@
1
- import {
2
- wrapDescriptionLines
3
- } from "./chunk-NPWVOFB3.js";
4
- import {
5
- renderInlineText
6
- } from "./chunk-S7W75MIM.js";
7
1
  import {
8
2
  renderNodeCard
9
3
  } from "./chunk-R2K5L4UA.js";
10
4
  import {
11
5
  formatDateLabel
12
- } from "./chunk-O5WUZGPV.js";
6
+ } from "./chunk-TASRGDYP.js";
13
7
  import {
14
- renderIntegratedLegend
15
- } from "./chunk-NMS5XSLX.js";
8
+ parseTimelineDate
9
+ } from "./chunk-BQO24BDM.js";
10
+ import {
11
+ layoutInlineHeader
12
+ } from "./chunk-UIEKW4SG.js";
13
+ import {
14
+ TITLE_FONT_SIZE,
15
+ TITLE_FONT_WEIGHT,
16
+ TITLE_Y
17
+ } from "./chunk-VLC6WNRD.js";
16
18
  import {
17
19
  CARD_RADIUS,
18
20
  HAIRLINE_DASH,
@@ -22,22 +24,20 @@ import {
22
24
  SEPARATOR_GAP
23
25
  } from "./chunk-XCKNFFKM.js";
24
26
  import {
25
- layoutInlineHeader
26
- } from "./chunk-42UJ23H3.js";
27
+ renderIntegratedLegend
28
+ } from "./chunk-NMS5XSLX.js";
27
29
  import {
28
30
  getLegendExtent
29
31
  } from "./chunk-JILEYZ2V.js";
30
32
  import {
31
- TITLE_FONT_SIZE,
32
- TITLE_FONT_WEIGHT,
33
- TITLE_Y
34
- } from "./chunk-VLC6WNRD.js";
33
+ wrapDescriptionLines
34
+ } from "./chunk-7WEYXYLC.js";
35
+ import {
36
+ renderInlineText
37
+ } from "./chunk-QKPOIJBT.js";
35
38
  import {
36
39
  FONT_FAMILY
37
40
  } from "./chunk-ICLB27PZ.js";
38
- import {
39
- parseTimelineDate
40
- } from "./chunk-BQO24BDM.js";
41
41
  import {
42
42
  UNTAGGED_TAG_COLOR,
43
43
  resolveActiveTagGroup,
@@ -8,21 +8,21 @@ import {
8
8
  resolveCellColor,
9
9
  resolveColorMode
10
10
  } from "./chunk-CN4RDJDV.js";
11
- import {
12
- renderIntegratedLegend
13
- } from "./chunk-NMS5XSLX.js";
14
11
  import {
15
12
  layoutInlineHeader
16
- } from "./chunk-42UJ23H3.js";
17
- import {
18
- getLegendExtent,
19
- getMaxLegendReservedHeight
20
- } from "./chunk-JILEYZ2V.js";
13
+ } from "./chunk-UIEKW4SG.js";
21
14
  import {
22
15
  TITLE_FONT_SIZE,
23
16
  TITLE_FONT_WEIGHT,
24
17
  TITLE_Y
25
18
  } from "./chunk-VLC6WNRD.js";
19
+ import {
20
+ renderIntegratedLegend
21
+ } from "./chunk-NMS5XSLX.js";
22
+ import {
23
+ getLegendExtent,
24
+ getMaxLegendReservedHeight
25
+ } from "./chunk-JILEYZ2V.js";
26
26
  import {
27
27
  FONT_FAMILY
28
28
  } from "./chunk-ICLB27PZ.js";
@@ -12,11 +12,15 @@ import {
12
12
  appendReverseArrowheadMarkers
13
13
  } from "./chunk-XBJJP2HN.js";
14
14
  import {
15
- renderInlineText
16
- } from "./chunk-S7W75MIM.js";
15
+ serializeSvg
16
+ } from "./chunk-CYRB2JTN.js";
17
17
  import {
18
- renderIntegratedLegend
19
- } from "./chunk-NMS5XSLX.js";
18
+ parseC4
19
+ } from "./chunk-IXHWS2HI.js";
20
+ import {
21
+ TITLE_FONT_SIZE,
22
+ TITLE_FONT_WEIGHT
23
+ } from "./chunk-VLC6WNRD.js";
20
24
  import {
21
25
  ARROWHEAD_HEIGHT,
22
26
  ARROWHEAD_WIDTH,
@@ -32,21 +36,17 @@ import {
32
36
  NODE_STROKE_WIDTH
33
37
  } from "./chunk-XCKNFFKM.js";
34
38
  import {
35
- serializeSvg
36
- } from "./chunk-CYRB2JTN.js";
39
+ renderIntegratedLegend
40
+ } from "./chunk-NMS5XSLX.js";
37
41
  import {
38
- TITLE_FONT_SIZE,
39
- TITLE_FONT_WEIGHT
40
- } from "./chunk-VLC6WNRD.js";
42
+ preprocessDescriptionLine
43
+ } from "./chunk-IYULMRBE.js";
44
+ import {
45
+ renderInlineText
46
+ } from "./chunk-QKPOIJBT.js";
41
47
  import {
42
48
  FONT_FAMILY
43
49
  } from "./chunk-ICLB27PZ.js";
44
- import {
45
- parseC4
46
- } from "./chunk-BEA4D7OS.js";
47
- import {
48
- preprocessDescriptionLine
49
- } from "./chunk-IYULMRBE.js";
50
50
  import {
51
51
  resolveGroupTagColor,
52
52
  tagAttrKey
@@ -4,11 +4,6 @@ import {
4
4
  wrapTextToWidth
5
5
  } from "./chunk-KAO7JL4I.js";
6
6
 
7
- // src/boxes-and-lines/node-metrics.ts
8
- var PHI = 1.618;
9
- var NODE_HEIGHT = 60;
10
- var NODE_WIDTH = Math.round(NODE_HEIGHT * PHI);
11
-
12
7
  // src/boxes-and-lines/label-placement.ts
13
8
  import { curveBasis } from "d3-shape";
14
9
  var EDGE_LABEL_FONT_SIZE = 11;
@@ -426,8 +421,6 @@ function placeEdgeLabels(layout, opts) {
426
421
  }
427
422
 
428
423
  export {
429
- NODE_HEIGHT,
430
- NODE_WIDTH,
431
424
  EDGE_LABEL_FONT_SIZE,
432
425
  BOX_CLEAR_PAD,
433
426
  LABEL_REACH_WIDE,
@@ -3,40 +3,40 @@ import {
3
3
  capLabelColumn,
4
4
  computeTimeTicks,
5
5
  showFullOnHover
6
- } from "./chunk-VSOZZYLK.js";
6
+ } from "./chunk-NERQSSYD.js";
7
7
  import {
8
8
  ScaleContext
9
9
  } from "./chunk-24YPR5EH.js";
10
10
  import {
11
- keepSwimlaneToggleFocus,
12
- renderIntegratedLegend,
13
- wireSwimlaneToggle
14
- } from "./chunk-NMS5XSLX.js";
11
+ INLINE_HEADER_PAD,
12
+ layoutInlineHeader
13
+ } from "./chunk-UIEKW4SG.js";
14
+ import {
15
+ TITLE_FONT_SIZE,
16
+ TITLE_FONT_WEIGHT,
17
+ TITLE_Y
18
+ } from "./chunk-VLC6WNRD.js";
15
19
  import {
16
20
  EDGE_DASH,
17
21
  GRID_DASH,
18
22
  HAIRLINE_DASH
19
23
  } from "./chunk-XCKNFFKM.js";
20
24
  import {
21
- INLINE_HEADER_PAD,
22
- layoutInlineHeader
23
- } from "./chunk-42UJ23H3.js";
25
+ keepSwimlaneToggleFocus,
26
+ renderIntegratedLegend,
27
+ wireSwimlaneToggle
28
+ } from "./chunk-NMS5XSLX.js";
24
29
  import {
25
30
  controlsGroupCapsuleWidth,
26
31
  getLegendExtent,
27
32
  getMaxLegendReservedHeight
28
33
  } from "./chunk-JILEYZ2V.js";
29
34
  import {
30
- TITLE_FONT_SIZE,
31
- TITLE_FONT_WEIGHT,
32
- TITLE_Y
33
- } from "./chunk-VLC6WNRD.js";
35
+ normalizeName
36
+ } from "./chunk-NOTA6TEI.js";
34
37
  import {
35
38
  FONT_FAMILY
36
39
  } from "./chunk-ICLB27PZ.js";
37
- import {
38
- normalizeName
39
- } from "./chunk-NOTA6TEI.js";
40
40
  import {
41
41
  UNTAGGED_TAG_COLOR,
42
42
  resolveActiveTagGroup,
@@ -1448,10 +1448,14 @@ function renderErasAndMarkers(g, svg, resolved, xScale, innerHeight, palette, er
1448
1448
  const eraEndDate = parseDateStringToDate(era.endDate);
1449
1449
  const eraG = g.append("g").attr("class", "gantt-era-group").attr("data-line-number", String(era.lineNumber));
1450
1450
  const eraRect = eraG.append("rect").attr("class", "gantt-era").attr("x", sx).attr("y", 0).attr("width", ex - sx).attr("height", innerHeight).attr("fill", color).attr("opacity", baseEraOpacity);
1451
- const eraLabelMaxW = Math.max(0, ex - sx - 8);
1451
+ const [plotStart, plotEnd] = xScale.range();
1452
+ const vsx = Math.max(sx, plotStart);
1453
+ const vex = Math.min(ex, plotEnd);
1454
+ if (vex <= vsx) continue;
1455
+ const eraLabelMaxW = Math.max(0, vex - vsx - 8);
1452
1456
  const eraDisplayLabel = truncateLegendText(era.label, 10, eraLabelMaxW);
1453
1457
  const eraTruncated = eraDisplayLabel !== era.label;
1454
- const eraLabel = eraG.append("text").attr("class", "gantt-era-label").attr("x", (sx + ex) / 2).attr("y", eraLabelY).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", color).attr("opacity", 0.7).style("cursor", "pointer").text(eraDisplayLabel);
1458
+ const eraLabel = eraG.append("text").attr("class", "gantt-era-label").attr("x", (vsx + vex) / 2).attr("y", eraLabelY).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", color).attr("opacity", 0.7).style("cursor", "pointer").text(eraDisplayLabel);
1455
1459
  eraG.on("mouseenter", () => {
1456
1460
  g.selectAll(".gantt-task").attr(
1457
1461
  "opacity",
@@ -2105,6 +2109,18 @@ function dateToFractionalYear(d) {
2105
2109
  const fraction = (d.getTime() - startOfYear.getTime()) / (endOfYear.getTime() - startOfYear.getTime());
2106
2110
  return y + fraction;
2107
2111
  }
2112
+ function fractionalYearToDate(frac) {
2113
+ const y = Math.floor(frac);
2114
+ const startOfYear = new Date(y, 0, 1);
2115
+ const endOfYear = new Date(y + 1, 0, 1);
2116
+ return new Date(
2117
+ startOfYear.getTime() + (frac - y) * (endOfYear.getTime() - startOfYear.getTime())
2118
+ );
2119
+ }
2120
+ var EXACT_FRACTIONAL_YEAR = {
2121
+ toFractionalYear: dateToFractionalYear,
2122
+ fromFractionalYear: fractionalYearToDate
2123
+ };
2108
2124
  function diamondPoints(cx, cy, size) {
2109
2125
  const half = size / 2;
2110
2126
  return `${cx},${cy - half} ${cx + half},${cy} ${cx},${cy + half} ${cx - half},${cy}`;
@@ -2188,7 +2204,17 @@ function renderTimeScaleHorizontal(g, scale, _innerWidth, innerHeight, textColor
2188
2204
  const domain = scale.domain();
2189
2205
  const domainMin = domain[0];
2190
2206
  const domainMax = domain[1];
2191
- const ticks = computeTimeTicks(domainMin, domainMax, scale);
2207
+ const ticks = computeTimeTicks(
2208
+ domainMin,
2209
+ domainMax,
2210
+ scale,
2211
+ void 0,
2212
+ void 0,
2213
+ void 0,
2214
+ void 0,
2215
+ void 0,
2216
+ EXACT_FRACTIONAL_YEAR
2217
+ );
2192
2218
  if (ticks.length < 2) return;
2193
2219
  const tickLen = 6;
2194
2220
  const opacity = 0.4;
@@ -1,16 +1,14 @@
1
1
  import {
2
2
  searchPlacement
3
- } from "./chunk-HXULJZA2.js";
3
+ } from "./chunk-TDAGJJPZ.js";
4
4
  import {
5
5
  noteCanvasShift,
6
- placeNotes
7
- } from "./chunk-FTUMRSGT.js";
6
+ placeNotes,
7
+ resolveNotes
8
+ } from "./chunk-7SXV7NUS.js";
8
9
  import {
9
10
  noteBoxSize
10
- } from "./chunk-RJNZHFNG.js";
11
- import {
12
- resolveNotes
13
- } from "./chunk-O753JUEZ.js";
11
+ } from "./chunk-VDY2GR6U.js";
14
12
 
15
13
  // src/graph/layout.ts
16
14
  import dagre from "@dagrejs/dagre";
@@ -4,7 +4,7 @@ import {
4
4
  ruleFromAnchor,
5
5
  targetToMs,
6
6
  weekdayIndex
7
- } from "./chunk-WFA6IULY.js";
7
+ } from "./chunk-URRAWU5D.js";
8
8
  import {
9
9
  now
10
10
  } from "./chunk-3DPOIW3W.js";