@diagrammo/dgmo 0.77.0 → 0.78.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 (228) hide show
  1. package/README.md +17 -13
  2. package/dist/advanced.d.ts +19 -12
  3. package/dist/advanced.js +124 -120
  4. package/dist/block.css +1 -1
  5. package/dist/block.d.ts +2 -2
  6. package/dist/block.js +45 -41
  7. package/dist/{chart-meta-Cf_jkApJ.d.ts → chart-meta-BKN2ORkc.d.ts} +2 -2
  8. package/dist/chart-meta.d.ts +3 -3
  9. package/dist/chart-meta.js +30 -29
  10. package/dist/charts-d3-KEQ7XVSM.js +31 -0
  11. package/dist/{chunk-7IATMZSA.js → chunk-26EVL454.js} +1 -25
  12. package/dist/{chunk-3H4PDNP4.js → chunk-2NLBIZEW.js} +2 -2
  13. package/dist/{chunk-BH3BQICT.js → chunk-32VR65TL.js} +63 -36
  14. package/dist/{chunk-N5NQIZ56.js → chunk-36UQ77JV.js} +24 -24
  15. package/dist/chunk-3DPOIW3W.js +10 -0
  16. package/dist/{chunk-3SP6G4LN.js → chunk-3GLTQZKE.js} +2 -2
  17. package/dist/{chunk-DY7KDZUF.js → chunk-3OWIYK52.js} +2 -2
  18. package/dist/{chunk-3E4YB6TY.js → chunk-3XFOE3DQ.js} +12 -7
  19. package/dist/{chunk-W7UBPARG.js → chunk-3ZLQM6XN.js} +2 -2
  20. package/dist/{chunk-5GM6BZO7.js → chunk-4AWLEWSD.js} +5 -2
  21. package/dist/{chunk-SWUQJ5VR.js → chunk-4IGUEGD6.js} +80 -61
  22. package/dist/{chunk-QOVM5VRC.js → chunk-57GSSHBR.js} +2 -2
  23. package/dist/{chunk-5VMUVJO4.js → chunk-5G55TS3H.js} +2 -2
  24. package/dist/{chunk-U4DS2ODO.js → chunk-67I3HFSF.js} +9 -9
  25. package/dist/{chunk-WQXD3IIN.js → chunk-6B3M6LW6.js} +10 -8
  26. package/dist/{chunk-TKIPK5P6.js → chunk-6PHOZBW5.js} +4 -6
  27. package/dist/{chunk-5PFNUDXR.js → chunk-6VTLVU7D.js} +2 -2
  28. package/dist/{chunk-M5JT2AU7.js → chunk-6Z2NUJSX.js} +2 -2
  29. package/dist/{chunk-BWJLLNUX.js → chunk-7BNRHSSF.js} +2 -2
  30. package/dist/{chunk-JLODGGN2.js → chunk-7NNJXYXU.js} +2 -2
  31. package/dist/{chunk-FTTB64OJ.js → chunk-7SMVTA7I.js} +26 -26
  32. package/dist/{chunk-Z7KVOVE4.js → chunk-7WTFX6OA.js} +6 -3
  33. package/dist/{chunk-ZM27UI5O.js → chunk-A7Y32YD6.js} +2 -2
  34. package/dist/{chunk-FPRMP6YA.js → chunk-AHN2CVCH.js} +10 -7
  35. package/dist/{chunk-N6MZSBOL.js → chunk-AN7T6VP7.js} +2 -2
  36. package/dist/{chunk-F4X5NVKY.js → chunk-B6PVPAS5.js} +2 -2
  37. package/dist/{chunk-RV5A3EGI.js → chunk-BB2ORSTF.js} +19 -18
  38. package/dist/{chunk-SI3PYDL4.js → chunk-BJB4YDJP.js} +21 -21
  39. package/dist/{chunk-FR5EVD2X.js → chunk-BPM52K3Z.js} +38 -31
  40. package/dist/{chunk-TI4YUUW6.js → chunk-BSREARWG.js} +29 -28
  41. package/dist/{chunk-F4V67JXG.js → chunk-CTERZC4K.js} +2 -2
  42. package/dist/{chunk-WHWUVDYK.js → chunk-CYLSQO4L.js} +6 -6
  43. package/dist/{chunk-J76YDS4V.js → chunk-DCPD5SHV.js} +3 -3
  44. package/dist/{chunk-H7BYMIVK.js → chunk-ENDB5YSV.js} +67 -27
  45. package/dist/{chunk-RTTZIX34.js → chunk-EOB7XVYR.js} +2 -2
  46. package/dist/chunk-EPDBWATV.js +38 -0
  47. package/dist/{chunk-TPN7RJOM.js → chunk-FJADQOFQ.js} +3 -3
  48. package/dist/{chunk-MG3DE3VO.js → chunk-FLMXJMMY.js} +3 -3
  49. package/dist/{chunk-WGC42WJU.js → chunk-FWNJDD4U.js} +6 -2
  50. package/dist/{chunk-S5P5Z5Y5.js → chunk-GINNZHVN.js} +2 -2
  51. package/dist/{chunk-LYJ53DBK.js → chunk-GJH7ZEPH.js} +41 -36
  52. package/dist/{chunk-2MTM4E6M.js → chunk-GQEXY7XL.js} +68 -65
  53. package/dist/{chunk-XFXJXLK7.js → chunk-HHHYVTVS.js} +16 -16
  54. package/dist/chunk-ICLB27PZ.js +11 -0
  55. package/dist/{chunk-QMFIZQTB.js → chunk-IDGQB6XD.js} +6 -4
  56. package/dist/{chunk-R3XI2VC7.js → chunk-IDJGV6VM.js} +2 -1
  57. package/dist/{chunk-HDLRRY3N.js → chunk-IE47TYZT.js} +177 -118
  58. package/dist/{chunk-FJ57274M.js → chunk-IIEI7VK5.js} +15 -1
  59. package/dist/{chunk-XPBJVSRY.js → chunk-IMO46ROR.js} +38 -32
  60. package/dist/{chunk-VRPV6QXR.js → chunk-IZTU6WVR.js} +2 -2
  61. package/dist/{chunk-CIWFL2LM.js → chunk-JOD2CK2M.js} +16 -14
  62. package/dist/{chunk-XCFIAGT7.js → chunk-JUNTVLOU.js} +16 -15
  63. package/dist/{chunk-RWFMOVHG.js → chunk-KAZQX2EY.js} +2 -2
  64. package/dist/{chunk-NHQ7HUAS.js → chunk-KGX5LIUG.js} +10 -8
  65. package/dist/{chunk-Q74GP3GK.js → chunk-KO6DGOOB.js} +3 -3
  66. package/dist/{chunk-5ZD4DDG7.js → chunk-L26M3X7K.js} +16 -13
  67. package/dist/{chunk-RU2HHHYA.js → chunk-LD2JSKU3.js} +12 -2
  68. package/dist/{chunk-OO2L2LWV.js → chunk-LEBPWFVF.js} +50 -46
  69. package/dist/{chunk-MU3CJPJF.js → chunk-LGI735AJ.js} +2 -2
  70. package/dist/{chunk-OWVDD5EC.js → chunk-LMWXBFLA.js} +2 -2
  71. package/dist/{chunk-6IN4F4RH.js → chunk-M3LZCDB6.js} +40 -42
  72. package/dist/{chunk-YT5ICQ4R.js → chunk-MFK7LF66.js} +2 -2
  73. package/dist/{chunk-UH5YTZN7.js → chunk-MJYFPFZT.js} +110 -20
  74. package/dist/{chunk-2QRIMMIH.js → chunk-N56W4R66.js} +2 -2
  75. package/dist/{chunk-LXXVHLTH.js → chunk-NN5IDH2I.js} +2 -2
  76. package/dist/{chunk-46KVXDUJ.js → chunk-NS3KIRSW.js} +2 -2
  77. package/dist/{chunk-LM3HY3VG.js → chunk-P2DM7Q5U.js} +2 -2
  78. package/dist/{chunk-DJL5PO27.js → chunk-P4SQV3XD.js} +2 -2
  79. package/dist/{chunk-B52RL5VV.js → chunk-P54AX5XN.js} +9 -9
  80. package/dist/{chunk-MZEGUDTA.js → chunk-P64NBPSK.js} +14 -14
  81. package/dist/{chunk-FF7LRT5L.js → chunk-PIWUZFG7.js} +33 -25
  82. package/dist/{chunk-SWEKCK34.js → chunk-QAPFXLAC.js} +2 -2
  83. package/dist/chunk-QFIXL3OK.js +68 -0
  84. package/dist/{chunk-KRTLS3G6.js → chunk-QVMV4KCA.js} +2 -2
  85. package/dist/{chunk-76LHNLGX.js → chunk-R4YGH7DJ.js} +5 -3
  86. package/dist/{chunk-OZOHREFQ.js → chunk-RC3FM3FE.js} +12 -13
  87. package/dist/{chunk-UJBP57UJ.js → chunk-RC6GGF6X.js} +2 -2
  88. package/dist/{chunk-S6OXNZBM.js → chunk-RHZZVIGA.js} +3 -3
  89. package/dist/{chunk-MS5574I7.js → chunk-RIXWLFB4.js} +2 -2
  90. package/dist/{chunk-D3B6YEZK.js → chunk-RUNI4OXP.js} +18 -14
  91. package/dist/{chunk-ICVIJLBA.js → chunk-SFSJ6XWV.js} +2 -2
  92. package/dist/{chunk-QBM5BURJ.js → chunk-SNBEAO4Q.js} +8 -8
  93. package/dist/{chunk-DSXWJAOA.js → chunk-SXD6VY7D.js} +16 -14
  94. package/dist/{chunk-V4NHFY22.js → chunk-TLM3I4XF.js} +16 -16
  95. package/dist/{chunk-3O7ZYVJV.js → chunk-TO6TWNMF.js} +19 -15
  96. package/dist/{chunk-CYMYZYLI.js → chunk-U2JIFCJN.js} +18 -18
  97. package/dist/{chunk-SSEAULA5.js → chunk-U4ND3J6C.js} +18 -14
  98. package/dist/{chunk-QXMHBIQG.js → chunk-UCF6TKWV.js} +51 -48
  99. package/dist/{chunk-RGW26UAR.js → chunk-UDYJVX6Y.js} +9 -9
  100. package/dist/{chunk-7CXW6EGX.js → chunk-UQY2VLUK.js} +25 -23
  101. package/dist/{chunk-EUVUOPRC.js → chunk-VAA7QSZ7.js} +53 -32
  102. package/dist/{chunk-43AJKH2U.js → chunk-VQGQF7O7.js} +12 -10
  103. package/dist/{chunk-DEW62ON3.js → chunk-VSPNH7LC.js} +2 -2
  104. package/dist/{chunk-4YER7UCV.js → chunk-VUJQ6RU6.js} +2 -2
  105. package/dist/{chunk-CHOK7NCJ.js → chunk-VZD3ZV4Y.js} +26 -22
  106. package/dist/{chunk-NCT22MOD.js → chunk-WMIKC5XO.js} +2 -2
  107. package/dist/{chunk-C2WH3BMS.js → chunk-X326N4GN.js} +10 -7
  108. package/dist/chunk-XBJJP2HN.js +37 -0
  109. package/dist/{chunk-7NSNE52V.js → chunk-XCR3PDFF.js} +2 -2
  110. package/dist/{chunk-UBDVAHGK.js → chunk-XDPJMLOH.js} +30 -27
  111. package/dist/{chunk-CF3I5SOG.js → chunk-YKDZ3ZRI.js} +27 -25
  112. package/dist/{chunk-GLREDNBA.js → chunk-YVLTNNME.js} +12 -2
  113. package/dist/{chunk-6ZZKEYBS.js → chunk-ZGOBAMQ2.js} +15 -13
  114. package/dist/{chunk-6BVAW7KI.js → chunk-ZMCFUGKO.js} +49 -42
  115. package/dist/clock.js +11 -5
  116. package/dist/completion-registry.js +2 -2
  117. package/dist/countdown.js +26 -20
  118. package/dist/{d3-BiaJtaSw.d.ts → d3-CQT5bwpb.d.ts} +1 -1
  119. package/dist/{dgmo-router-BwXHZ_P3.d.ts → dgmo-router-C9CsswPZ.d.ts} +1 -1
  120. package/dist/{dgmo-router-A3LIHT6H.js → dgmo-router-XZNCLYTV.js} +30 -29
  121. package/dist/{dimensions-OFF4GRFL.js → dimensions-SIZMZ4DC.js} +8 -8
  122. package/dist/{flowchart-renderer-BBJUPORB.js → flowchart-renderer-FDJ4QQXE.js} +15 -14
  123. package/dist/index.d.ts +7 -7
  124. package/dist/index.js +58 -43
  125. package/dist/{layout-Y2V3LYV7.js → layout-5DZ2LI2R.js} +2 -2
  126. package/dist/{layout-ZAGUFT2G.js → layout-6I6LSBUR.js} +6 -5
  127. package/dist/{layout-2OJ25STS.js → layout-C2SCZV5M.js} +6 -5
  128. package/dist/{layout-6SKHNQYO.js → layout-CHWKNE3O.js} +3 -3
  129. package/dist/{layout-EM4DLMAX.js → layout-K4KML2DL.js} +3 -3
  130. package/dist/{layout-KQUSB45X.js → layout-S53FSD6R.js} +7 -6
  131. package/dist/{layout-ROORJQ4X.js → layout-TCFXB5XH.js} +7 -6
  132. package/dist/{layout-5ILNODTP.js → layout-XK6ZD7BU.js} +6 -5
  133. package/dist/{layout-B5GQVXXY.js → layout-YVY72CIG.js} +7 -6
  134. package/dist/{layout-VUZ3MLOI.js → layout-YY6VH5XH.js} +6 -5
  135. package/dist/{layout-RV2T2YTT.js → layout-ZDN252GR.js} +4 -3
  136. package/dist/{layout-search-UOKEMER5.js → layout-search-TSV4FURP.js} +7 -6
  137. package/dist/{legend-constants-PLN2YHGM.js → legend-constants-SB4PLHV5.js} +3 -3
  138. package/dist/{palettes-54YSI3IX.js → palettes-YIPSRYXP.js} +5 -3
  139. package/dist/{parser-GCVSRQPY.js → parser-2BX2EJUB.js} +3 -3
  140. package/dist/{parser-WVE6SKB7.js → parser-3UNIPVNY.js} +3 -3
  141. package/dist/{parser-5XFGK5C5.js → parser-4IHIVDJD.js} +5 -5
  142. package/dist/{parser-ZT3PU2HT.js → parser-62VNEQRT.js} +3 -3
  143. package/dist/{parser-PR3OR3LO.js → parser-6JNJHQAG.js} +3 -3
  144. package/dist/{parser-ZXQZZK6W.js → parser-6ZFQLLVE.js} +3 -2
  145. package/dist/{parser-WMJEPZDC.js → parser-BOPXE6RP.js} +3 -3
  146. package/dist/{parser-WWRRG2DV.js → parser-DFBQ2RID.js} +3 -3
  147. package/dist/{parser-2GMHFSTS.js → parser-EPKXJ2RL.js} +3 -3
  148. package/dist/{parser-ML3LVNDV.js → parser-G7E2BURB.js} +3 -3
  149. package/dist/{parser-QOIZGW7I.js → parser-GFGU5ZLQ.js} +3 -3
  150. package/dist/{parser-L7T7FY3H.js → parser-GKZWI5SZ.js} +3 -3
  151. package/dist/{parser-QYAIFXLP.js → parser-HSPODF4H.js} +3 -3
  152. package/dist/{parser-EQ4I3TSH.js → parser-IK3FXZ7D.js} +3 -3
  153. package/dist/{parser-LV7PQBUG.js → parser-LJWPKRDM.js} +3 -3
  154. package/dist/{parser-RDBXEVI4.js → parser-OYWUBQV4.js} +3 -3
  155. package/dist/{parser-6FUESG4N.js → parser-PD4TP6NM.js} +3 -3
  156. package/dist/{parser-E3OHNNTH.js → parser-R2JHC7LQ.js} +3 -3
  157. package/dist/{parser-CJNP7RKR.js → parser-RMZ6YI7H.js} +3 -3
  158. package/dist/{parser-TA5TYZNL.js → parser-RUJNN5PK.js} +3 -3
  159. package/dist/{parser-UTR5WE4O.js → parser-YWE7GHW6.js} +3 -3
  160. package/dist/{parser-3AOMUX5D.js → parser-Z5UK6ADF.js} +3 -3
  161. package/dist/{parser-YWQCC33R.js → parser-ZO5YT5SV.js} +3 -3
  162. package/dist/renderer-5TPUPMZ7.js +26 -0
  163. package/dist/{renderer-2NYQDW37.js → renderer-AIVALEQR.js} +7 -7
  164. package/dist/renderer-AMELXBNW.js +23 -0
  165. package/dist/renderer-BF7FYXG3.js +25 -0
  166. package/dist/renderer-CRRW7LTW.js +17 -0
  167. package/dist/renderer-CXU2MGSC.js +27 -0
  168. package/dist/renderer-DI66RLAG.js +30 -0
  169. package/dist/renderer-E2JTYQY5.js +39 -0
  170. package/dist/{renderer-Y3Y7PEUS.js → renderer-FA4BTAOL.js} +7 -7
  171. package/dist/{renderer-G2DPKJAN.js → renderer-FFGFTIT4.js} +15 -14
  172. package/dist/renderer-IVAM7Z3Y.js +27 -0
  173. package/dist/renderer-J6HK2KOW.js +23 -0
  174. package/dist/renderer-J7J3OVLQ.js +39 -0
  175. package/dist/{renderer-GHBF5PRH.js → renderer-JC7MK7SD.js} +6 -5
  176. package/dist/{renderer-VF7X66SL.js → renderer-JHQC5RGJ.js} +14 -14
  177. package/dist/renderer-JRITSZY3.js +28 -0
  178. package/dist/{renderer-ANJUDBOS.js → renderer-KD5X4RIS.js} +14 -13
  179. package/dist/{renderer-CVWQD442.js → renderer-KWNNWCGD.js} +6 -5
  180. package/dist/{renderer-FTX67CYZ.js → renderer-LGMIAG6N.js} +7 -6
  181. package/dist/{renderer-EDVCGIQO.js → renderer-LQN3FXAP.js} +33 -32
  182. package/dist/renderer-LRL4SU43.js +29 -0
  183. package/dist/{renderer-R5HIRN2M.js → renderer-MBL64AJI.js} +6 -6
  184. package/dist/renderer-NA3DTAWF.js +39 -0
  185. package/dist/renderer-OR5QHR7X.js +31 -0
  186. package/dist/renderer-SBVWHQVW.js +30 -0
  187. package/dist/{renderer-DNFV2IQI.js → renderer-TLOSBJKW.js} +13 -13
  188. package/dist/{renderer-EFQSMHID.js → renderer-UDWJRRIC.js} +11 -11
  189. package/dist/renderer-VHK6UAW2.js +20 -0
  190. package/dist/{renderer-2ANDPQWC.js → renderer-W5UG2HWT.js} +5 -5
  191. package/dist/renderer-WOOKJOBQ.js +25 -0
  192. package/dist/renderer-WYNLGZRF.js +25 -0
  193. package/dist/{renderer-RNFECJ5D.js → renderer-Y74Y54C3.js} +8 -8
  194. package/dist/renderer-ZUAXGHFC.js +28 -0
  195. package/dist/renderer-radial-YVUDGR7C.js +21 -0
  196. package/dist/{state-parser-TPA67IXM.js → state-parser-CT5HQQ7E.js} +3 -3
  197. package/dist/state-renderer-7O3QGNJ5.js +41 -0
  198. package/dist/{tag-groups-BAtkq0b_.d.ts → tag-groups-BoJg3lFV.d.ts} +0 -16
  199. package/dist/{themes-DpsyRSO7.d.ts → themes-CXYnNA4e.d.ts} +2 -2
  200. package/docs/architecture-report.md +3 -3
  201. package/docs/language-reference.md +122 -30
  202. package/docs/migration-sequence-color-to-tags.md +16 -8
  203. package/package.json +4 -4
  204. package/dist/charts-d3-HMEMHSSW.js +0 -29
  205. package/dist/chunk-53SEVJQM.js +0 -9
  206. package/dist/chunk-LP7EC4MI.js +0 -16
  207. package/dist/chunk-YM5RMLFO.js +0 -40
  208. package/dist/renderer-2LDT4TUX.js +0 -25
  209. package/dist/renderer-2RIIIO34.js +0 -39
  210. package/dist/renderer-3HFU3DTO.js +0 -25
  211. package/dist/renderer-4BF6ILP6.js +0 -27
  212. package/dist/renderer-5E2AH5TO.js +0 -38
  213. package/dist/renderer-62SLWRYF.js +0 -27
  214. package/dist/renderer-D6GJ6EVK.js +0 -30
  215. package/dist/renderer-GZLRX764.js +0 -24
  216. package/dist/renderer-H2HYLFN3.js +0 -20
  217. package/dist/renderer-IR5655M7.js +0 -28
  218. package/dist/renderer-L237AOOZ.js +0 -16
  219. package/dist/renderer-LSJWYGOL.js +0 -39
  220. package/dist/renderer-LWXDMZOV.js +0 -28
  221. package/dist/renderer-MYSVPERC.js +0 -22
  222. package/dist/renderer-OL5QSZPC.js +0 -31
  223. package/dist/renderer-P26HH3NA.js +0 -30
  224. package/dist/renderer-RPZVNCTF.js +0 -26
  225. package/dist/renderer-SDNWZDUY.js +0 -23
  226. package/dist/renderer-UKHH4UWV.js +0 -25
  227. package/dist/renderer-radial-QNGCGKZP.js +0 -21
  228. package/dist/state-renderer-ELWDRXD6.js +0 -40
@@ -1,36 +1,40 @@
1
1
  import {
2
2
  wrapDescriptionLines
3
- } from "./chunk-NCT22MOD.js";
3
+ } from "./chunk-WMIKC5XO.js";
4
4
  import {
5
5
  renderInlineText
6
- } from "./chunk-WGC42WJU.js";
7
- import {
8
- COLLAPSE_BAR_HEIGHT
9
- } from "./chunk-FJ57274M.js";
6
+ } from "./chunk-FWNJDD4U.js";
10
7
  import {
11
8
  ScaleContext
12
9
  } from "./chunk-24YPR5EH.js";
10
+ import {
11
+ ARROWHEAD_HEIGHT,
12
+ ARROWHEAD_WIDTH,
13
+ COLLAPSE_BAR_HEIGHT,
14
+ EDGE_DASH,
15
+ HAIRLINE_DASH
16
+ } from "./chunk-IIEI7VK5.js";
13
17
  import {
14
18
  layoutInlineHeader
15
- } from "./chunk-MG3DE3VO.js";
19
+ } from "./chunk-FLMXJMMY.js";
16
20
  import {
17
21
  TITLE_FONT_SIZE,
18
22
  TITLE_FONT_WEIGHT,
19
23
  TITLE_Y
20
- } from "./chunk-DEW62ON3.js";
24
+ } from "./chunk-VSPNH7LC.js";
21
25
  import {
22
26
  renderIntegratedLegend
23
- } from "./chunk-U4DS2ODO.js";
27
+ } from "./chunk-67I3HFSF.js";
24
28
  import {
25
29
  getLegendExtent,
26
30
  getMaxLegendReservedHeight
27
- } from "./chunk-VRPV6QXR.js";
31
+ } from "./chunk-IZTU6WVR.js";
28
32
  import {
29
33
  FONT_FAMILY
30
- } from "./chunk-53SEVJQM.js";
34
+ } from "./chunk-ICLB27PZ.js";
31
35
  import {
32
36
  legendChromeColors
33
- } from "./chunk-YT5ICQ4R.js";
37
+ } from "./chunk-MFK7LF66.js";
34
38
  import {
35
39
  measureText,
36
40
  truncateText
@@ -39,11 +43,11 @@ import {
39
43
  isSequenceBlock,
40
44
  isSequenceNote,
41
45
  isSequenceSection
42
- } from "./chunk-7NSNE52V.js";
46
+ } from "./chunk-XCR3PDFF.js";
43
47
  import {
44
48
  resolveActiveTagGroup,
45
49
  tagAttrKey
46
- } from "./chunk-76LHNLGX.js";
50
+ } from "./chunk-R4YGH7DJ.js";
47
51
  import {
48
52
  fillModeFromOptions,
49
53
  legendInlineRequested,
@@ -54,7 +58,7 @@ import {
54
58
  mix,
55
59
  shapeFill,
56
60
  themeBaseBg
57
- } from "./chunk-GLREDNBA.js";
61
+ } from "./chunk-YVLTNNME.js";
58
62
 
59
63
  // src/sequence/renderer.ts
60
64
  import * as d3Selection from "d3-selection";
@@ -250,7 +254,6 @@ var TITLE_HEIGHT = 30;
250
254
  var PARTICIPANT_Y_OFFSET = 10;
251
255
  var MESSAGE_START_OFFSET = 50;
252
256
  var LIFELINE_TAIL = 30;
253
- var ARROWHEAD_SIZE = 8;
254
257
  var NOTE_MAX_W = 200;
255
258
  var NOTE_FOLD = 10;
256
259
  var NOTE_PAD_H = 8;
@@ -359,7 +362,7 @@ function renderCacheParticipant(g, palette, isDark, color, fillMode, w = W, h =
359
362
  const bodyH = h - ry * 2;
360
363
  const f = fill(palette, isDark, color, fillMode);
361
364
  const s = stroke(palette, color);
362
- const dash = "4 3";
365
+ const dash = EDGE_DASH;
363
366
  g.append("ellipse").attr("cx", 0).attr("cy", topY + bodyH).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
364
367
  g.append("rect").attr("class", "participant-body").attr("x", -w / 2).attr("y", topY).attr("width", w).attr("height", bodyH).attr("fill", f).attr("stroke", "none");
365
368
  g.append("line").attr("x1", -w / 2).attr("y1", topY).attr("x2", -w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
@@ -712,7 +715,8 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
712
715
  const sParticipantYOffset = ctx.aesthetic(PARTICIPANT_Y_OFFSET);
713
716
  const sMsgStartOffset = ctx.structural(MESSAGE_START_OFFSET);
714
717
  const sLifelineTail = ctx.structural(LIFELINE_TAIL);
715
- const sArrowheadSize = ctx.structural(ARROWHEAD_SIZE);
718
+ const sArrowheadW = ctx.structural(ARROWHEAD_WIDTH);
719
+ const sArrowheadH = ctx.structural(ARROWHEAD_HEIGHT);
716
720
  const sNoteMaxW = ctx.structural(NOTE_MAX_W);
717
721
  const sNoteFold = ctx.structural(NOTE_FOLD);
718
722
  const sNotePadH = ctx.structural(NOTE_PAD_H);
@@ -1338,26 +1342,20 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1338
1342
  offsetX = leftMargin + Math.max(0, (svgWidth - totalWidth) / 2);
1339
1343
  buildParticipantX();
1340
1344
  }
1341
- const svg = d3Selection.select(container).append("svg").attr("width", "100%").attr("height", totalHeight).attr("viewBox", `0 0 ${svgWidth} ${totalHeight}`).attr("preserveAspectRatio", "xMidYMin meet").attr("class", "sequence-diagram").style("font-family", FONT_FAMILY);
1345
+ const svg = d3Selection.select(container).append("svg").attr("width", svgWidth).attr("height", totalHeight).attr("viewBox", `0 0 ${svgWidth} ${totalHeight}`).attr("preserveAspectRatio", "xMidYMin meet").attr("class", "sequence-diagram").style("font-family", FONT_FAMILY);
1346
+ if (ctx.isBelowFloor) {
1347
+ svg.attr("width", "100%");
1348
+ }
1342
1349
  const defs = svg.append("defs");
1343
- defs.append("marker").attr("id", "seq-arrowhead").attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polygon").attr(
1344
- "points",
1345
- `0,0 ${sArrowheadSize},${sArrowheadSize / 2} 0,${sArrowheadSize}`
1346
- ).attr("fill", palette.text);
1347
- defs.append("marker").attr("id", "seq-arrowhead-open").attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polyline").attr(
1348
- "points",
1349
- `0,0 ${sArrowheadSize},${sArrowheadSize / 2} 0,${sArrowheadSize}`
1350
- ).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1.2);
1351
- defs.append("marker").attr("id", "seq-arrowhead-async").attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polyline").attr(
1352
- "points",
1353
- `0,0 ${sArrowheadSize},${sArrowheadSize / 2} 0,${sArrowheadSize}`
1354
- ).attr("fill", "none").attr("stroke", palette.text).attr("stroke-width", 1.2);
1355
- const arrowPoints = `0,0 ${sArrowheadSize},${sArrowheadSize / 2} 0,${sArrowheadSize}`;
1350
+ defs.append("marker").attr("id", "seq-arrowhead").attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polygon").attr("points", `0,0 ${sArrowheadW},${sArrowheadH / 2} 0,${sArrowheadH}`).attr("fill", palette.text);
1351
+ defs.append("marker").attr("id", "seq-arrowhead-open").attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polyline").attr("points", `0,0 ${sArrowheadW},${sArrowheadH / 2} 0,${sArrowheadH}`).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1.2);
1352
+ defs.append("marker").attr("id", "seq-arrowhead-async").attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polyline").attr("points", `0,0 ${sArrowheadW},${sArrowheadH / 2} 0,${sArrowheadH}`).attr("fill", "none").attr("stroke", palette.text).attr("stroke-width", 1.2);
1353
+ const arrowPoints = `0,0 ${sArrowheadW},${sArrowheadH / 2} 0,${sArrowheadH}`;
1356
1354
  for (const [, color] of tagValueToColor) {
1357
1355
  const hex = color.replace("#", "");
1358
- defs.append("marker").attr("id", `seq-arrowhead-c${hex}`).attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polygon").attr("points", arrowPoints).attr("fill", color);
1359
- defs.append("marker").attr("id", `seq-arrowhead-async-c${hex}`).attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polyline").attr("points", arrowPoints).attr("fill", "none").attr("stroke", color).attr("stroke-width", 1.2);
1360
- defs.append("marker").attr("id", `seq-arrowhead-open-c${hex}`).attr("viewBox", `0 0 ${sArrowheadSize} ${sArrowheadSize}`).attr("refX", sArrowheadSize).attr("refY", sArrowheadSize / 2).attr("markerWidth", sArrowheadSize).attr("markerHeight", sArrowheadSize).attr("orient", "auto").append("polyline").attr("points", arrowPoints).attr("fill", "none").attr("stroke", color).attr("stroke-width", 1.2);
1356
+ defs.append("marker").attr("id", `seq-arrowhead-c${hex}`).attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polygon").attr("points", arrowPoints).attr("fill", color);
1357
+ defs.append("marker").attr("id", `seq-arrowhead-async-c${hex}`).attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polyline").attr("points", arrowPoints).attr("fill", "none").attr("stroke", color).attr("stroke-width", 1.2);
1358
+ defs.append("marker").attr("id", `seq-arrowhead-open-c${hex}`).attr("viewBox", `0 0 ${sArrowheadW} ${sArrowheadH}`).attr("refX", sArrowheadW).attr("refY", sArrowheadH / 2).attr("markerWidth", sArrowheadW).attr("markerHeight", sArrowheadH).attr("orient", "auto").append("polyline").attr("points", arrowPoints).attr("fill", "none").attr("stroke", color).attr("stroke-width", 1.2);
1361
1359
  }
1362
1360
  const coloredMarker = (type, tagColor) => {
1363
1361
  if (tagColor) {
@@ -1513,7 +1511,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1513
1511
  const pStroke = effectiveTagColor || palette.border;
1514
1512
  participantG.append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6).attr("fill", pFill).attr("stroke", pStroke).attr("stroke-width", 1.5);
1515
1513
  const nameY = -padTop + (fullH - drillBarH) / 2;
1516
- participantG.append("text").attr("x", 0).attr("y", nameY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", palette.text).attr("font-size", sLabelFontSize).attr("font-weight", 500).attr("class", "collapsed-group-label").text(truncateText(participant.label, sLabelFontSize, sLabelTextWidth));
1514
+ participantG.append("text").attr("x", 0).attr("y", nameY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", palette.text).attr("font-size", sLabelFontSize).attr("font-weight", "normal").attr("class", "collapsed-group-label").text(truncateText(participant.label, sLabelFontSize, sLabelTextWidth));
1517
1515
  participantG.append("clipPath").attr("id", clipId).append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6);
1518
1516
  participantG.append("rect").attr("class", "sequence-drill-bar").attr("x", -boxW / 2).attr("y", -padTop + fullH - drillBarH).attr("width", boxW).attr("height", drillBarH).attr("fill", drillColor).attr("clip-path", `url(#${clipId})`);
1519
1517
  }
@@ -1524,7 +1522,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1524
1522
  llY,
1525
1523
  lifelineStartY + lifelineLength
1526
1524
  )) {
1527
- const lifelineEl = svg.append("line").attr("x1", cx).attr("y1", segTop).attr("x2", cx).attr("y2", segBottom).attr("stroke", llColor).attr("stroke-width", 1).attr("stroke-dasharray", "6 4").attr("class", "lifeline").attr("data-participant-id", participant.id);
1525
+ const lifelineEl = svg.append("line").attr("x1", cx).attr("y1", segTop).attr("x2", cx).attr("y2", segBottom).attr("stroke", llColor).attr("stroke-width", 1).attr("stroke-dasharray", EDGE_DASH).attr("class", "lifeline").attr("data-participant-id", participant.id);
1528
1526
  if (tagKey && pTagValue) {
1529
1527
  lifelineEl.attr(`data-tag-${tagKey}`, pTagValue.toLowerCase());
1530
1528
  }
@@ -1622,7 +1620,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1622
1620
  const frameY = stepY(minStep) - FRAME_PADDING_TOP;
1623
1621
  const frameW = maxPX - minPX + FRAME_PADDING_X * 2 + extraRight;
1624
1622
  const frameH = stepY(maxStep) - stepY(minStep) + FRAME_PADDING_TOP + FRAME_PADDING_BOTTOM + (maxStepIsSelfCall ? sSelfCallHeight : 0);
1625
- svg.append("rect").attr("x", frameX).attr("y", frameY).attr("width", frameW).attr("height", frameH).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1).attr("stroke-dasharray", "2 3").attr("rx", 3).attr("ry", 3).attr("class", "block-frame").attr("data-block-line", String(el.lineNumber));
1623
+ svg.append("rect").attr("x", frameX).attr("y", frameY).attr("width", frameW).attr("height", frameH).attr("fill", "none").attr("stroke", palette.textMuted).attr("stroke-width", 1).attr("stroke-dasharray", HAIRLINE_DASH).attr("rx", 3).attr("ry", 3).attr("class", "block-frame").attr("data-block-line", String(el.lineNumber));
1626
1624
  deferredLabels.push({
1627
1625
  x: frameX + 6,
1628
1626
  y: frameY + FRAME_LABEL_HEIGHT - 4,
@@ -1731,7 +1729,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1731
1729
  }
1732
1730
  });
1733
1731
  for (const ln of deferredLines) {
1734
- const line = svg.append("line").attr("x1", ln.x1).attr("y1", ln.y1).attr("x2", ln.x2).attr("y2", ln.y2).attr("stroke", palette.textMuted).attr("stroke-width", 1).attr("stroke-dasharray", "2 3").attr("class", "block-divider");
1732
+ const line = svg.append("line").attr("x1", ln.x1).attr("y1", ln.y1).attr("x2", ln.x2).attr("y2", ln.y2).attr("stroke", palette.textMuted).attr("stroke-width", 1).attr("stroke-dasharray", HAIRLINE_DASH).attr("class", "block-divider");
1735
1733
  if (ln.blockLine !== void 0)
1736
1734
  line.attr("data-block-line", String(ln.blockLine));
1737
1735
  }
@@ -1786,7 +1784,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1786
1784
  const markY = secY + COLLAPSED_SECTION_MARK_OFFSET;
1787
1785
  const involvedXs = participants.filter((p) => participation.has(p.id)).map((p) => participantX.get(p.id)).filter((x) => x !== void 0);
1788
1786
  if (involvedXs.length > 1) {
1789
- sectionG.append("line").attr("x1", Math.min(...involvedXs)).attr("x2", Math.max(...involvedXs)).attr("y1", markY).attr("y2", markY).attr("stroke", lineColor).attr("stroke-width", 1).attr("stroke-dasharray", "2 3").attr("opacity", 0.5).attr("pointer-events", "none").attr("class", "section-reach");
1787
+ sectionG.append("line").attr("x1", Math.min(...involvedXs)).attr("x2", Math.max(...involvedXs)).attr("y1", markY).attr("y2", markY).attr("stroke", lineColor).attr("stroke-width", 1).attr("stroke-dasharray", HAIRLINE_DASH).attr("opacity", 0.5).attr("pointer-events", "none").attr("class", "section-reach");
1790
1788
  }
1791
1789
  for (const participant of participants) {
1792
1790
  const markX = participantX.get(participant.id);
@@ -1868,7 +1866,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1868
1866
  const x2 = arrowEdgeX(step.to, i, goingRight ? "left" : "right");
1869
1867
  const returnColor = msgTagColor || palette.textMuted;
1870
1868
  svg.append("rect").attr("x", Math.min(x1, x2)).attr("y", y - HIT_H / 2).attr("width", Math.abs(x2 - x1)).attr("height", HIT_H).attr("fill", "transparent").attr("class", "message-hit-area").attr("data-line-number", String(msg.lineNumber)).attr("data-msg-index", String(step.messageIndex)).attr("data-step-index", String(i));
1871
- const returnEl = svg.append("line").attr("x1", x1).attr("y1", y).attr("x2", x2).attr("y2", y).attr("stroke", returnColor).attr("stroke-width", 1).attr("stroke-dasharray", "6 4").attr("marker-end", coloredMarker("return", msgTagColor)).attr("class", "return-arrow").attr("data-line-number", String(msg.lineNumber)).attr("data-msg-index", String(step.messageIndex)).attr("data-step-index", String(i)).attr("data-from", step.from).attr("data-to", step.to);
1869
+ const returnEl = svg.append("line").attr("x1", x1).attr("y1", y).attr("x2", x2).attr("y2", y).attr("stroke", returnColor).attr("stroke-width", 1).attr("stroke-dasharray", EDGE_DASH).attr("marker-end", coloredMarker("return", msgTagColor)).attr("class", "return-arrow").attr("data-line-number", String(msg.lineNumber)).attr("data-msg-index", String(step.messageIndex)).attr("data-step-index", String(i)).attr("data-from", step.from).attr("data-to", step.to);
1872
1870
  if (tagKey && msgTagValue) {
1873
1871
  returnEl.attr(`data-tag-${tagKey}`, msgTagValue.toLowerCase());
1874
1872
  }
@@ -2049,7 +2047,7 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
2049
2047
  palette.textOnFillLight,
2050
2048
  palette.textOnFillDark
2051
2049
  );
2052
- const textEl = g.append("text").attr("x", 0).attr("text-anchor", "middle").attr("fill", labelFill).attr("font-size", fontSize).attr("font-weight", 500);
2050
+ const textEl = g.append("text").attr("x", 0).attr("text-anchor", "middle").attr("fill", labelFill).attr("font-size", fontSize).attr("font-weight", "normal");
2053
2051
  const maxLabelW = labelTextWidth(boxW);
2054
2052
  const truncLine = (text) => truncateText(text, fontSize, maxLabelW);
2055
2053
  if (labelLines.length === 1) {
@@ -2074,4 +2072,4 @@ export {
2074
2072
  renderSequenceDiagram,
2075
2073
  buildNoteMessageMap
2076
2074
  };
2077
- //# sourceMappingURL=chunk-6IN4F4RH.js.map
2075
+ //# sourceMappingURL=chunk-M3LZCDB6.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-MTGGOCND.js";
5
5
  import {
6
6
  mix
7
- } from "./chunk-GLREDNBA.js";
7
+ } from "./chunk-YVLTNNME.js";
8
8
 
9
9
  // src/utils/legend-constants.ts
10
10
  var LEGEND_HEIGHT = 28;
@@ -59,4 +59,4 @@ export {
59
59
  LEGEND_TOGGLE_OFF_OPACITY,
60
60
  LEGEND_GEAR_PILL_W
61
61
  };
62
- //# sourceMappingURL=chunk-YT5ICQ4R.js.map
62
+ //# sourceMappingURL=chunk-MFK7LF66.js.map
@@ -3,6 +3,9 @@ import {
3
3
  rectCircleOverlap,
4
4
  rectsOverlap
5
5
  } from "./chunk-L65WI4HO.js";
6
+ import {
7
+ MIN_CANVAS_WIDTH
8
+ } from "./chunk-EPDBWATV.js";
6
9
  import {
7
10
  EXPORT_HEIGHT,
8
11
  EXPORT_WIDTH,
@@ -11,29 +14,29 @@ import {
11
14
  initD3Chart,
12
15
  renderChartTitle,
13
16
  resolveExportPalette
14
- } from "./chunk-3E4YB6TY.js";
17
+ } from "./chunk-3XFOE3DQ.js";
15
18
  import {
16
19
  layoutInlineHeader
17
- } from "./chunk-MG3DE3VO.js";
20
+ } from "./chunk-FLMXJMMY.js";
18
21
  import {
19
22
  TITLE_FONT_SIZE,
20
23
  TITLE_FONT_WEIGHT,
21
24
  TITLE_OFFSET,
22
25
  TITLE_Y
23
- } from "./chunk-DEW62ON3.js";
26
+ } from "./chunk-VSPNH7LC.js";
24
27
  import {
25
28
  computeLegendLayout
26
- } from "./chunk-VRPV6QXR.js";
29
+ } from "./chunk-IZTU6WVR.js";
27
30
  import {
28
31
  FONT_FAMILY
29
- } from "./chunk-53SEVJQM.js";
32
+ } from "./chunk-ICLB27PZ.js";
30
33
  import {
31
34
  LEGEND_DOT_R,
32
35
  LEGEND_ENTRY_FONT_SIZE,
33
36
  LEGEND_HEIGHT,
34
37
  LEGEND_PILL_FONT_SIZE,
35
38
  legendChromeColors
36
- } from "./chunk-YT5ICQ4R.js";
39
+ } from "./chunk-MFK7LF66.js";
37
40
  import {
38
41
  measureText
39
42
  } from "./chunk-MTGGOCND.js";
@@ -50,7 +53,7 @@ import {
50
53
  } from "./chunk-2CW5ZTNH.js";
51
54
  import {
52
55
  tagAttrKey
53
- } from "./chunk-76LHNLGX.js";
56
+ } from "./chunk-R4YGH7DJ.js";
54
57
  import {
55
58
  contrastText,
56
59
  getSegmentColors,
@@ -60,7 +63,93 @@ import {
60
63
  mix,
61
64
  shapeFill,
62
65
  themeBaseBg
63
- } from "./chunk-GLREDNBA.js";
66
+ } from "./chunk-YVLTNNME.js";
67
+
68
+ // src/charts-d3/natural-size.ts
69
+ var UNCOUNTED_WIDTH = 720;
70
+ var MIN_NATURAL_WIDTH = MIN_CANVAS_WIDTH;
71
+ var STEP_PER_CATEGORY = 80;
72
+ var STEP_PER_SERIES_IN_GROUP = 28;
73
+ var STEP_PER_LINE_POINT = 48;
74
+ var STEP_PER_HEATMAP_COLUMN = 64;
75
+ var STEP_PER_SANKEY_DEPTH = 220;
76
+ var AXIS_FURNITURE = 120;
77
+ function clamp(w) {
78
+ return Math.round(Math.max(MIN_NATURAL_WIDTH, Math.min(EXPORT_WIDTH, w)));
79
+ }
80
+ function sankeyDepth(links) {
81
+ const targets = new Set(links.map((l) => l.target));
82
+ const roots = new Set(
83
+ links.map((l) => l.source).filter((n) => !targets.has(n))
84
+ );
85
+ if (roots.size === 0) return 2;
86
+ const next = /* @__PURE__ */ new Map();
87
+ for (const l of links)
88
+ next.set(l.source, [...next.get(l.source) ?? [], l.target]);
89
+ let depth = 1;
90
+ let level = [...roots];
91
+ const seen = new Set(level);
92
+ while (level.length > 0 && depth < 12) {
93
+ const following = level.flatMap((n) => next.get(n) ?? []).filter((n) => !seen.has(n));
94
+ if (following.length === 0) break;
95
+ following.forEach((n) => seen.add(n));
96
+ level = [...new Set(following)];
97
+ depth += 1;
98
+ }
99
+ return depth;
100
+ }
101
+ function naturalDataChartSize(content, palette) {
102
+ const width = naturalDataChartWidth(content, palette);
103
+ if (width === null) return null;
104
+ return {
105
+ width,
106
+ height: Math.round(width * EXPORT_HEIGHT / EXPORT_WIDTH)
107
+ };
108
+ }
109
+ function naturalDataChartWidth(content, palette) {
110
+ const ext = parseExtendedChart(content, palette);
111
+ if (ext && !ext.error) {
112
+ switch (ext.type) {
113
+ case "heatmap": {
114
+ const cols = ext.columns?.length ?? 0;
115
+ if (cols === 0) return UNCOUNTED_WIDTH;
116
+ return clamp(AXIS_FURNITURE + cols * STEP_PER_HEATMAP_COLUMN);
117
+ }
118
+ case "sankey":
119
+ case "chord": {
120
+ const links = ext.links ?? [];
121
+ if (ext.type === "chord" || links.length === 0) return UNCOUNTED_WIDTH;
122
+ return clamp(sankeyDepth(links) * STEP_PER_SANKEY_DEPTH);
123
+ }
124
+ case "funnel":
125
+ case "scatter":
126
+ case "function":
127
+ return UNCOUNTED_WIDTH;
128
+ }
129
+ }
130
+ const std = parseChart(content, palette);
131
+ if (!std || std.error || std.data.length === 0) return null;
132
+ switch (std.type) {
133
+ case "pie":
134
+ case "radar":
135
+ case "polar-area":
136
+ return UNCOUNTED_WIDTH;
137
+ case "bar": {
138
+ if (std.orientation === "horizontal") return UNCOUNTED_WIDTH;
139
+ const series = Math.max(1, std.seriesNames?.length ?? 1);
140
+ const grouped = std.barLayout === "group" ? series : 1;
141
+ const step = Math.max(
142
+ STEP_PER_CATEGORY,
143
+ grouped * STEP_PER_SERIES_IN_GROUP
144
+ );
145
+ return clamp(AXIS_FURNITURE + std.data.length * step);
146
+ }
147
+ case "line":
148
+ return clamp(AXIS_FURNITURE + std.data.length * STEP_PER_LINE_POINT);
149
+ default:
150
+ return null;
151
+ }
152
+ }
64
153
 
65
154
  // src/utils/legend-svg.ts
66
155
  var CENTER = 'dominant-baseline="central"';
@@ -78,7 +167,7 @@ function emitCapsule(capsule, palette, groupBg, pillBorder) {
78
167
  `<rect x="${pill.x}" y="${pill.y}" width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="none" stroke="${esc(pillBorder)}" stroke-width="0.75"/>`
79
168
  );
80
169
  inner.push(
81
- `<text x="${pill.x + pill.width / 2}" y="${LEGEND_HEIGHT / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.text)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(capsule.groupName)}</text>`
170
+ `<text x="${pill.x + pill.width / 2}" y="${LEGEND_HEIGHT / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="normal" fill="${esc(palette.text)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(capsule.groupName)}</text>`
82
171
  );
83
172
  for (const entry of capsule.entries) {
84
173
  const label = entry.displayValue ?? entry.value;
@@ -90,7 +179,7 @@ function emitCapsule(capsule, palette, groupBg, pillBorder) {
90
179
  return `<g transform="translate(${capsule.x},${capsule.y})" data-legend-group="${esc(tagAttrKey(capsule.groupName))}" style="cursor:pointer">${inner.join("")}</g>`;
91
180
  }
92
181
  function emitPill(pill, palette, groupBg) {
93
- return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${pill.height / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.textMuted)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(pill.groupName)}</text></g>`;
182
+ return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${pill.height / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="normal" fill="${esc(palette.textMuted)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(pill.groupName)}</text></g>`;
94
183
  }
95
184
  function renderLegendSvg(groups, options) {
96
185
  if (groups.length === 0) return { svg: "", height: 0, width: 0 };
@@ -261,11 +350,11 @@ function computeLeftMargin(yLabel, leftLabels) {
261
350
  }
262
351
  function drawXAxisTitle(svg, label, cx, y, textColor) {
263
352
  if (!label) return;
264
- svg.append("text").attr("x", cx).attr("y", y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", 600).text(label);
353
+ svg.append("text").attr("x", cx).attr("y", y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", "bold").text(label);
265
354
  }
266
355
  function drawYAxisTitle(svg, label, cy, x, textColor) {
267
356
  if (!label) return;
268
- svg.append("text").attr("transform", `translate(${x},${cy}) rotate(-90)`).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", 600).text(label);
357
+ svg.append("text").attr("transform", `translate(${x},${cy}) rotate(-90)`).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", "bold").text(label);
269
358
  }
270
359
  function tagDatum(sel, o) {
271
360
  const cls = (sel.attr("class") ?? "").split(/\s+/).filter(Boolean);
@@ -855,7 +944,7 @@ function renderPie(svg, chart, width, height, palette, isDark, textColor, topIns
855
944
  }
856
945
  }
857
946
  if (hasHole && !chart.noCenterTotal) {
858
- g.append("text").attr("text-anchor", "middle").attr("y", Math.max(4, 8 * labelScale)).attr("fill", textColor).attr("font-size", Math.max(11, 26 * labelScale)).attr("font-weight", 700).attr("font-family", FONT_FAMILY).text(fmtNum(total));
947
+ g.append("text").attr("text-anchor", "middle").attr("y", Math.max(4, 8 * labelScale)).attr("fill", textColor).attr("font-size", Math.max(11, 26 * labelScale)).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(total));
859
948
  }
860
949
  }
861
950
 
@@ -1072,18 +1161,18 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
1072
1161
  const yMid = (y0 + y1) / 2;
1073
1162
  const halfEdge = (topW + botW) / 4;
1074
1163
  if (!chart.noName) {
1075
- svg.append("text").attr("x", cx - halfEdge - PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "end").attr("fill", stroke).attr("font-size", sideFont).attr("font-weight", 600).attr("font-family", FONT_FAMILY).text(d.label);
1164
+ svg.append("text").attr("x", cx - halfEdge - PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "end").attr("fill", stroke).attr("font-size", sideFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(d.label);
1076
1165
  }
1077
1166
  const showPct = !chart.noPercent && i > 0;
1078
1167
  const valueInside = valueInsideAt(plotW, i);
1079
1168
  if (valueInside) {
1080
1169
  const valueSize = valueSizeAt(plotW, i);
1081
1170
  const valueFill = fillMode === "solid" ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : stroke;
1082
- svg.append("text").attr("x", cx).attr("y", yMid + valueSize * 0.35).attr("text-anchor", "middle").attr("fill", valueFill).attr("font-size", valueSize).attr("font-weight", 700).attr("font-family", FONT_FAMILY).text(fmtNum(d.value));
1171
+ svg.append("text").attr("x", cx).attr("y", yMid + valueSize * 0.35).attr("text-anchor", "middle").attr("fill", valueFill).attr("font-size", valueSize).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(d.value));
1083
1172
  }
1084
1173
  const showValueRight = !chart.noValue && !valueInside;
1085
1174
  if (showValueRight || showPct) {
1086
- const text = svg.append("text").attr("x", cx + halfEdge + PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "start").attr("font-size", sideFont).attr("font-weight", 600).attr("font-family", FONT_FAMILY);
1175
+ const text = svg.append("text").attr("x", cx + halfEdge + PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "start").attr("font-size", sideFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY);
1087
1176
  if (showValueRight) {
1088
1177
  text.append("tspan").attr("fill", stroke).text(fmtNum(d.value));
1089
1178
  }
@@ -1183,7 +1272,7 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
1183
1272
  color: ramp
1184
1273
  });
1185
1274
  if (!chart.noValue) {
1186
- const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(ramp)).attr("font-size", cellFont).attr("font-weight", 600).attr("font-family", FONT_FAMILY).text(fmtNum(v));
1275
+ const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(ramp)).attr("font-size", cellFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(v));
1187
1276
  tagDatum(label, {
1188
1277
  line: row.lineNumber,
1189
1278
  key: cellKey,
@@ -1909,8 +1998,9 @@ function firstNonCommentToken(content) {
1909
1998
  async function renderDataChartD3(content, theme, palette, dims) {
1910
1999
  const effectivePalette = await resolveExportPalette(theme, palette);
1911
2000
  const isDark = theme === "dark";
1912
- const w = dims?.width && dims.width > 0 ? Math.round(dims.width) : EXPORT_WIDTH;
1913
- const h = dims?.height && dims.height > 0 ? Math.round(dims.height) : EXPORT_HEIGHT;
2001
+ const natural = naturalDataChartSize(content, effectivePalette);
2002
+ const w = dims?.width && dims.width > 0 ? Math.round(dims.width) : natural?.width ?? EXPORT_WIDTH;
2003
+ const h = dims?.height && dims.height > 0 ? Math.round(dims.height) : dims?.width && dims.width > 0 ? Math.round(w * EXPORT_HEIGHT / EXPORT_WIDTH) : natural?.height ?? EXPORT_HEIGHT;
1914
2004
  const container = createExportContainer(w, h);
1915
2005
  const init = initD3Chart(container, effectivePalette, {
1916
2006
  width: w,
@@ -2151,4 +2241,4 @@ export {
2151
2241
  supportsD3DataChart,
2152
2242
  renderDataChartD3
2153
2243
  };
2154
- //# sourceMappingURL=chunk-UH5YTZN7.js.map
2244
+ //# sourceMappingURL=chunk-MJYFPFZT.js.map
@@ -9,7 +9,7 @@ import {
9
9
  stripDefaultModifier,
10
10
  tagAttrKey,
11
11
  validateTagGroupNames
12
- } from "./chunk-76LHNLGX.js";
12
+ } from "./chunk-R4YGH7DJ.js";
13
13
  import {
14
14
  JOURNEY_MAP_REGISTRY,
15
15
  OPTION_NOCOLON_RE,
@@ -419,4 +419,4 @@ function parseStepLine(trimmed, lineNumber, counter, aliasMap, warn, diagnostics
419
419
  export {
420
420
  parseJourneyMap
421
421
  };
422
- //# sourceMappingURL=chunk-2QRIMMIH.js.map
422
+ //# sourceMappingURL=chunk-N56W4R66.js.map
@@ -13,7 +13,7 @@ import {
13
13
  tagAttrKey,
14
14
  validateTagGroupNames,
15
15
  validateTagValues
16
- } from "./chunk-76LHNLGX.js";
16
+ } from "./chunk-R4YGH7DJ.js";
17
17
  import {
18
18
  ALL_CHART_TYPES,
19
19
  AliasRegistry,
@@ -527,4 +527,4 @@ export {
527
527
  looksLikeSitemap,
528
528
  parseSitemap
529
529
  };
530
- //# sourceMappingURL=chunk-LXXVHLTH.js.map
530
+ //# sourceMappingURL=chunk-NN5IDH2I.js.map
@@ -17,7 +17,7 @@ import {
17
17
  stripDefaultModifier,
18
18
  tagAttrKey,
19
19
  validateTagGroupNames
20
- } from "./chunk-76LHNLGX.js";
20
+ } from "./chunk-R4YGH7DJ.js";
21
21
  import {
22
22
  AliasRegistry,
23
23
  INFRA_BEHAVIOR_KEY_SET,
@@ -1011,4 +1011,4 @@ export {
1011
1011
  parseInfra,
1012
1012
  extractSymbols
1013
1013
  };
1014
- //# sourceMappingURL=chunk-46KVXDUJ.js.map
1014
+ //# sourceMappingURL=chunk-NS3KIRSW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildPlacedNotes
3
- } from "./chunk-OWVDD5EC.js";
3
+ } from "./chunk-LMWXBFLA.js";
4
4
  import {
5
5
  noteCanvasShift
6
6
  } from "./chunk-6EK55ART.js";
@@ -201,4 +201,4 @@ function layoutClassDiagram(parsed, options) {
201
201
  export {
202
202
  layoutClassDiagram
203
203
  };
204
- //# sourceMappingURL=chunk-LM3HY3VG.js.map
204
+ //# sourceMappingURL=chunk-P2DM7Q5U.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  isTagBlockHeading,
6
6
  matchTagBlockHeading
7
- } from "./chunk-76LHNLGX.js";
7
+ } from "./chunk-R4YGH7DJ.js";
8
8
  import {
9
9
  makeDgmoError
10
10
  } from "./chunk-5SI6T5A5.js";
@@ -456,4 +456,4 @@ export {
456
456
  normalizePertSourceForShare,
457
457
  resolveOrgImports
458
458
  };
459
- //# sourceMappingURL=chunk-DJL5PO27.js.map
459
+ //# sourceMappingURL=chunk-P4SQV3XD.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  wrapDescriptionLines
3
- } from "./chunk-NCT22MOD.js";
3
+ } from "./chunk-WMIKC5XO.js";
4
4
  import {
5
5
  renderInlineText
6
- } from "./chunk-WGC42WJU.js";
6
+ } from "./chunk-FWNJDD4U.js";
7
7
  import {
8
8
  ScaleContext
9
9
  } from "./chunk-24YPR5EH.js";
@@ -11,10 +11,10 @@ import {
11
11
  TITLE_FONT_SIZE,
12
12
  TITLE_FONT_WEIGHT,
13
13
  TITLE_Y
14
- } from "./chunk-DEW62ON3.js";
14
+ } from "./chunk-VSPNH7LC.js";
15
15
  import {
16
16
  FONT_FAMILY
17
- } from "./chunk-53SEVJQM.js";
17
+ } from "./chunk-ICLB27PZ.js";
18
18
  import {
19
19
  CHAR_WIDTH_RATIO,
20
20
  measureText
@@ -26,7 +26,7 @@ import {
26
26
  contrastText,
27
27
  getSeriesColors,
28
28
  shapeFill
29
- } from "./chunk-GLREDNBA.js";
29
+ } from "./chunk-YVLTNNME.js";
30
30
  import {
31
31
  resolveColor
32
32
  } from "./chunk-XOGQY4EC.js";
@@ -144,7 +144,7 @@ function renderRing(container, parsed, palette, isDark, onClickItem, exportDims)
144
144
  );
145
145
  const labelG = labelsG.append("g").attr("class", "ring-label-group").attr("data-line-number", layer.lineNumber);
146
146
  if (isInnermost) {
147
- const label = labelG.append("text").attr("class", "ring-label").attr("x", cx).attr("y", cy).attr("dy", "0.35em").attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", 600).style("pointer-events", "none");
147
+ const label = labelG.append("text").attr("class", "ring-label").attr("x", cx).attr("y", cy).attr("dy", "0.35em").attr("text-anchor", "middle").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", labelFont).attr("font-weight", "bold").style("pointer-events", "none");
148
148
  renderInlineText(label, layer.label, palette, labelFont);
149
149
  continue;
150
150
  }
@@ -199,7 +199,7 @@ function drawRingCurvedLabel(labelG, defs, pathId, text, cx, cy, rMid, labelFont
199
199
  const p1y = cy - Math.cos(halfAngle) * rPath;
200
200
  const d = `M ${p0x.toFixed(2)} ${p0y.toFixed(2)} A ${rPath.toFixed(2)} ${rPath.toFixed(2)} 0 ${largeArc} 1 ${p1x.toFixed(2)} ${p1y.toFixed(2)}`;
201
201
  defs.append("path").attr("id", pathId).attr("d", d);
202
- const label = labelG.append("text").attr("class", "ring-label").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", fs).attr("font-weight", 600).style("pointer-events", "none");
202
+ const label = labelG.append("text").attr("class", "ring-label").attr("fill", textColor).attr("font-family", FONT_FAMILY).attr("font-size", fs).attr("font-weight", "bold").style("pointer-events", "none");
203
203
  const textPath = label.append("textPath").attr("href", `#${pathId}`).attr("startOffset", "50%").attr("text-anchor", "middle");
204
204
  renderInlineText(
205
205
  textPath,
@@ -262,7 +262,7 @@ function renderSideDescriptions(args) {
262
262
  blockG.style("cursor", "pointer").on("click", () => onClickItem(ln));
263
263
  }
264
264
  blockG.append("rect").attr("x", accentX).attr("y", cursorY).attr("width", DESC_ACCENT_WIDTH).attr("height", blockH).attr("rx", DESC_ACCENT_WIDTH / 2).attr("fill", colors[i]);
265
- const labelEl = blockG.append("text").attr("x", textX).attr("y", cursorY + Math.round(labelRowH * 0.7)).attr("text-anchor", "start").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight", 600);
265
+ const labelEl = blockG.append("text").attr("x", textX).attr("y", cursorY + Math.round(labelRowH * 0.7)).attr("text-anchor", "start").attr("fill", palette.text).attr("font-family", FONT_FAMILY).attr("font-size", descFont).attr("font-weight", "bold");
266
266
  renderInlineText(labelEl, layer.label, palette, descFont);
267
267
  let lineY = cursorY + labelRowH + Math.round(descLineHeight * 0.4);
268
268
  for (const line of lines) {
@@ -296,4 +296,4 @@ export {
296
296
  renderRing,
297
297
  renderRingForExport
298
298
  };
299
- //# sourceMappingURL=chunk-B52RL5VV.js.map
299
+ //# sourceMappingURL=chunk-P54AX5XN.js.map