@diagrammo/dgmo 0.54.0 → 0.56.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 (277) hide show
  1. package/dist/advanced.d.ts +138 -11
  2. package/dist/advanced.js +140 -115
  3. package/dist/{analyzer-TDN5KJFP.js → analyzer-HQUXKZ5J.js} +3 -3
  4. package/dist/auto.js +129 -126
  5. package/dist/auto.mjs +2731 -882
  6. package/dist/block.js +58 -56
  7. package/dist/{calculator-VBIT6GQF.js → calculator-BBKAAQGD.js} +3 -3
  8. package/dist/chart-meta.js +49 -49
  9. package/dist/charts-d3-D67V6KHE.js +29 -0
  10. package/dist/{chunk-5VXU6MND.js → chunk-23THM67F.js} +2 -2
  11. package/dist/{chunk-N7BSBAVP.js → chunk-2JMNOEAU.js} +117 -98
  12. package/dist/{chunk-6OYDOQ2Q.js → chunk-2UZVMWSQ.js} +4 -4
  13. package/dist/{chunk-3FRO35WW.js → chunk-3KOPPSUQ.js} +19 -5
  14. package/dist/{chunk-IYNKLCAZ.js → chunk-3R67RRPC.js} +126 -57
  15. package/dist/{chunk-JYDMBWRP.js → chunk-42IT4BG2.js} +2 -2
  16. package/dist/{chunk-O576GYAP.js → chunk-4MB4UOT5.js} +3 -3
  17. package/dist/{chunk-3KHJJP3J.js → chunk-4MJOBVY7.js} +3 -3
  18. package/dist/{chunk-3SEEP2JM.js → chunk-5J2RQGFG.js} +9 -5
  19. package/dist/{chunk-EAI6XJ7D.js → chunk-5VLUAAAE.js} +4 -4
  20. package/dist/{chunk-FVMKCZHF.js → chunk-5XMDSXZT.js} +3 -3
  21. package/dist/{chunk-LPJ6H5X4.js → chunk-5ZDHXS5N.js} +60 -15
  22. package/dist/{chunk-MEQYZZFR.js → chunk-6IVXRTXH.js} +96 -23
  23. package/dist/chunk-6VJCURWU.js +87 -0
  24. package/dist/{chunk-QZAW5SFH.js → chunk-7NK42OIB.js} +2 -2
  25. package/dist/{chunk-EQOMY4PY.js → chunk-7SXTD7L6.js} +3 -3
  26. package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
  27. package/dist/{chunk-S7FOIURR.js → chunk-A4DAZO3U.js} +12 -9
  28. package/dist/{chunk-AJFHNS67.js → chunk-AIH6M5J6.js} +7 -7
  29. package/dist/{chunk-KS5ZSM5T.js → chunk-AMC2OGXF.js} +64 -16
  30. package/dist/{chunk-SSHS42QG.js → chunk-AN465MXC.js} +2 -2
  31. package/dist/{chunk-BZJIITYM.js → chunk-AOJJSGXE.js} +5 -5
  32. package/dist/{chunk-T7Y554OK.js → chunk-APD52YJV.js} +8 -8
  33. package/dist/{chunk-FFVFZLRT.js → chunk-BR2VSKHI.js} +377 -60
  34. package/dist/{chunk-7K6NDSXH.js → chunk-C3BWDEYN.js} +5 -5
  35. package/dist/{chunk-HO3RCNF6.js → chunk-CGLBK5Q4.js} +2 -2
  36. package/dist/{chunk-ADYKAKE3.js → chunk-CQ7Y3O67.js} +7 -4
  37. package/dist/{chunk-WKNAJ4BR.js → chunk-CQOC2MD6.js} +66 -13
  38. package/dist/{chunk-TLNVYWPA.js → chunk-CXI6X54X.js} +3 -3
  39. package/dist/{chunk-AQEYUVGJ.js → chunk-CY5KE2P5.js} +67 -10
  40. package/dist/{chunk-COVYNAKJ.js → chunk-D3WTEBGT.js} +2 -2
  41. package/dist/{chunk-AHTTKERF.js → chunk-D5FANMSG.js} +3 -3
  42. package/dist/{chunk-CCGWX6AO.js → chunk-D64FRGKU.js} +3 -3
  43. package/dist/{chunk-RRGKMJYL.js → chunk-DIKIHU52.js} +9 -4
  44. package/dist/{chunk-BULHGPHK.js → chunk-DNSEG6P2.js} +3 -3
  45. package/dist/{chunk-UJRTPOHH.js → chunk-DUI5SMFX.js} +2 -2
  46. package/dist/{chunk-VQFDBNYF.js → chunk-EEKGMS63.js} +4 -4
  47. package/dist/{chunk-MTZOXISJ.js → chunk-ES3MUYRX.js} +5 -5
  48. package/dist/{chunk-J7HQPVYH.js → chunk-ES66QH6J.js} +24 -3
  49. package/dist/{chunk-ZKPPI6BF.js → chunk-EXNKNJ65.js} +2 -2
  50. package/dist/{chunk-2NYXI35Z.js → chunk-FCA2UGJT.js} +7 -6
  51. package/dist/{chunk-M3H7ZE6C.js → chunk-FERE46TP.js} +7 -6
  52. package/dist/{chunk-B4XS2AF2.js → chunk-FWVKPEG3.js} +3 -3
  53. package/dist/{chunk-S7YFT3PO.js → chunk-FXVPSTDT.js} +6 -6
  54. package/dist/{chunk-BM7MG6HT.js → chunk-FZECLCCU.js} +4 -4
  55. package/dist/{chunk-SBOAZ7YK.js → chunk-GDGOVO2I.js} +60 -41
  56. package/dist/{chunk-QBYP2FBZ.js → chunk-GG7TK3IA.js} +5 -5
  57. package/dist/{chunk-GQ5ECRP4.js → chunk-GUVVQW3Y.js} +5 -5
  58. package/dist/{chunk-R5BGGBFF.js → chunk-HE57UQHL.js} +3 -3
  59. package/dist/{chunk-4ZIKWVSQ.js → chunk-HIMDUQT7.js} +7 -7
  60. package/dist/{chunk-CSHFU6LT.js → chunk-HKKPUUNK.js} +10 -10
  61. package/dist/{chunk-KINOX74I.js → chunk-HODUM6LY.js} +50 -12
  62. package/dist/{chunk-47JNEKJA.js → chunk-HOPTF3ZP.js} +47 -12
  63. package/dist/{chunk-WW4BQ744.js → chunk-HPJITTF7.js} +11 -8
  64. package/dist/{chunk-BEOAKGNA.js → chunk-I55PVEIX.js} +2 -2
  65. package/dist/{chunk-7JDTNFAK.js → chunk-IMXG673Y.js} +78 -34
  66. package/dist/{chunk-4T6OCSJ2.js → chunk-JE3SMHRZ.js} +6 -6
  67. package/dist/{chunk-KQYQECWQ.js → chunk-JXFB3APA.js} +52 -16
  68. package/dist/{chunk-OJ435DQZ.js → chunk-KF575IXC.js} +4 -4
  69. package/dist/{chunk-IOIMQHQ6.js → chunk-KIGV66SP.js} +3 -3
  70. package/dist/{chunk-ICKXIMBA.js → chunk-KSPCR75O.js} +7 -7
  71. package/dist/{chunk-JTSMEYIZ.js → chunk-L43KTQTW.js} +5 -2
  72. package/dist/{chunk-DLU643TF.js → chunk-LV5BFA24.js} +6 -6
  73. package/dist/{chunk-RJ5LBZ5U.js → chunk-MD2KWAXJ.js} +16 -16
  74. package/dist/{chunk-KDK5EKUR.js → chunk-MGLJA5TK.js} +3 -3
  75. package/dist/{chunk-FR6UFVSV.js → chunk-N2KO445N.js} +99 -46
  76. package/dist/{chunk-C2UORMIA.js → chunk-NFAHDPCG.js} +8 -4
  77. package/dist/{chunk-7UPFTBOW.js → chunk-NHZAYL2X.js} +7 -7
  78. package/dist/{chunk-PIXZTCKH.js → chunk-NVQXIDLE.js} +3 -3
  79. package/dist/chunk-NZ5QVASG.js +20 -0
  80. package/dist/{chunk-F7XM366V.js → chunk-OHBIN74X.js} +4 -4
  81. package/dist/{chunk-4W2PE66Q.js → chunk-OLMWTJVU.js} +11 -1
  82. package/dist/{chunk-HAA25PLC.js → chunk-OWLGERJL.js} +46 -11
  83. package/dist/{chunk-NUTWTV6G.js → chunk-P6XFQVYY.js} +103 -57
  84. package/dist/{chunk-GKYHWJXI.js → chunk-PECYPUJJ.js} +5 -5
  85. package/dist/{chunk-T3FAJAJT.js → chunk-PFG3EVRD.js} +4 -4
  86. package/dist/{chunk-2NZOHEP4.js → chunk-QDOYT6UW.js} +5 -5
  87. package/dist/{chunk-EPRF3ZRV.js → chunk-QWUYFUNO.js} +3 -3
  88. package/dist/{chunk-I47VHSPS.js → chunk-R7ECJQTB.js} +10 -8
  89. package/dist/{chunk-BWYFIVZF.js → chunk-RBIX3HQQ.js} +4 -4
  90. package/dist/{chunk-COJW2NEY.js → chunk-RK3Y4WMV.js} +57 -15
  91. package/dist/{chunk-KQ3FNRGR.js → chunk-RQGNELB3.js} +7 -6
  92. package/dist/{chunk-WF64MW5G.js → chunk-RRX4Z4TH.js} +2 -2
  93. package/dist/{chunk-W6PCFRPL.js → chunk-RV2N7COG.js} +4 -4
  94. package/dist/{chunk-UEU6IYKY.js → chunk-S6QDCFEU.js} +2 -2
  95. package/dist/{chunk-Q5IHQ4NW.js → chunk-SCJ7CAJF.js} +2 -2
  96. package/dist/{chunk-3B2GXZCX.js → chunk-SK7PCW4F.js} +2 -2
  97. package/dist/{chunk-6KL7TFLS.js → chunk-SOBGK35Z.js} +4 -4
  98. package/dist/{chunk-WWHECSYZ.js → chunk-ST3ZNEUQ.js} +3 -3
  99. package/dist/{chunk-3IUHKMJI.js → chunk-U2BKSEKU.js} +2 -2
  100. package/dist/{chunk-KBVOVDYP.js → chunk-U7ZQTUZT.js} +6 -6
  101. package/dist/{chunk-3SBHODJ4.js → chunk-ULONXAOD.js} +50 -11
  102. package/dist/{chunk-B7N5KYXQ.js → chunk-ULR3BVNH.js} +8 -8
  103. package/dist/{chunk-YENNFS5F.js → chunk-USFZQPJ2.js} +10 -5
  104. package/dist/{chunk-OR3R27CU.js → chunk-UZ6L5VQJ.js} +4 -4
  105. package/dist/{chunk-ADCHLNWT.js → chunk-VKN7YW4Q.js} +10 -7
  106. package/dist/{chunk-XWODFBHJ.js → chunk-VSFAJUEF.js} +8 -4
  107. package/dist/{chunk-HFEOOQ46.js → chunk-VU3DOZ6C.js} +3 -3
  108. package/dist/{chunk-M24VXUFG.js → chunk-VYEQPPS6.js} +7 -7
  109. package/dist/{chunk-5XSNLXU5.js → chunk-W2I2EXSC.js} +58 -16
  110. package/dist/{chunk-7U4OR7CD.js → chunk-W4EKQ2P6.js} +2 -2
  111. package/dist/{chunk-UIT7E6UF.js → chunk-WFX6AUQO.js} +52 -5
  112. package/dist/{chunk-RIEAN4D5.js → chunk-WK3UFCZC.js} +51 -11
  113. package/dist/{chunk-7SP4C6EV.js → chunk-WOMXS5R7.js} +24 -5
  114. package/dist/chunk-WTTIODDV.js +10 -0
  115. package/dist/{chunk-GK32ZFZY.js → chunk-X32RDWT5.js} +5 -5
  116. package/dist/{chunk-LRSW4JLE.js → chunk-XN4ZSACM.js} +4 -4
  117. package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
  118. package/dist/{chunk-OSXQKC3S.js → chunk-Y2L2LET6.js} +8 -5
  119. package/dist/{chunk-TJN2OIVG.js → chunk-YG5KQ55U.js} +182 -14
  120. package/dist/{chunk-DPGQ5UMO.js → chunk-YH62K5D4.js} +15 -12
  121. package/dist/{chunk-A3BDLDYG.js → chunk-YJUF2N3C.js} +62 -23
  122. package/dist/{chunk-VMSBMIHW.js → chunk-YM2ZQIVG.js} +4 -4
  123. package/dist/{chunk-KV4HLIJE.js → chunk-YNAHUNMA.js} +7 -4
  124. package/dist/{chunk-62Y27T4C.js → chunk-YWPWRR7W.js} +2 -2
  125. package/dist/{chunk-U4IN6AHE.js → chunk-ZMMYCERO.js} +2 -2
  126. package/dist/cli.cjs +155 -149
  127. package/dist/clock.js +34 -1
  128. package/dist/completion-registry.js +15 -7
  129. package/dist/dgmo-router-GSWUPLP2.js +88 -0
  130. package/dist/dimensions-PLECMFTR.js +22 -0
  131. package/dist/editor.js +10 -1
  132. package/dist/element.js +131 -128
  133. package/dist/element.mjs +2731 -882
  134. package/dist/flowchart-parser-DA3V2SLH.js +21 -0
  135. package/dist/{flowchart-renderer-DCFKUDDR.js → flowchart-renderer-UQVXOUW4.js} +13 -12
  136. package/dist/highlight.js +10 -1
  137. package/dist/index.js +72 -57
  138. package/dist/{layout-A6OIGZN2.js → layout-2BJDECLZ.js} +5 -8
  139. package/dist/{layout-NF4EWFLT.js → layout-3XFPPFXI.js} +4 -4
  140. package/dist/layout-A5UVXINF.js +15 -0
  141. package/dist/layout-HIK4ZJFQ.js +15 -0
  142. package/dist/{layout-CB3XWCOI.js → layout-NX37NSRY.js} +3 -3
  143. package/dist/layout-OHAIIXBC.js +10 -0
  144. package/dist/{layout-QBNAMEOA.js → layout-QRVYYYZ3.js} +6 -6
  145. package/dist/{layout-ITLPDG6M.js → layout-SNIEAZ2I.js} +8 -8
  146. package/dist/{layout-SP7HJWKA.js → layout-UFZQI6SX.js} +4 -4
  147. package/dist/{layout-G2ABQJQZ.js → layout-UXMNKETK.js} +7 -7
  148. package/dist/layout-WDXNSQQF.js +15 -0
  149. package/dist/{layout-search-LUI475P3.js → layout-search-I4VNIRGT.js} +320 -36
  150. package/dist/{legend-constants-B77VKB3R.js → legend-constants-QQU3QYBF.js} +5 -5
  151. package/dist/{palettes-FGTNFARW.js → palettes-WO3VA6NU.js} +4 -4
  152. package/dist/parser-4TX6U4ZU.js +11 -0
  153. package/dist/{parser-X5XLFY4Z.js → parser-4ZIJDGPG.js} +6 -6
  154. package/dist/parser-5UZWYSIV.js +16 -0
  155. package/dist/parser-6CM27UPA.js +14 -0
  156. package/dist/parser-73YUU35J.js +11 -0
  157. package/dist/parser-A6M25MLK.js +11 -0
  158. package/dist/parser-AYZTKZC3.js +11 -0
  159. package/dist/parser-CCAUZLYI.js +15 -0
  160. package/dist/parser-D7YZX3CH.js +12 -0
  161. package/dist/parser-DQ2DGDYO.js +11 -0
  162. package/dist/parser-GGCDY65M.js +14 -0
  163. package/dist/parser-HMQZPPOK.js +19 -0
  164. package/dist/parser-IPBEW2DG.js +13 -0
  165. package/dist/{parser-66RYGJRB.js → parser-JWAGGYLL.js} +7 -7
  166. package/dist/parser-KTVDCWHG.js +13 -0
  167. package/dist/{parser-OPIXXUY4.js → parser-LNEAHGXF.js} +7 -7
  168. package/dist/parser-LQDEU22S.js +15 -0
  169. package/dist/{parser-VVE4THG3.js → parser-MH62NYKM.js} +6 -6
  170. package/dist/parser-O5XCVGZG.js +11 -0
  171. package/dist/parser-OPOGIKFR.js +17 -0
  172. package/dist/parser-PEBXIOPX.js +12 -0
  173. package/dist/parser-PQXN6SBB.js +18 -0
  174. package/dist/parser-Q3KNFXQR.js +12 -0
  175. package/dist/parser-Q62VR2UJ.js +20 -0
  176. package/dist/parser-QEWSTNEJ.js +15 -0
  177. package/dist/{parser-7UI6UQ7B.js → parser-QL2LBPFE.js} +7 -7
  178. package/dist/{parser-LTA2BOZO.js → parser-QN3GJJ3J.js} +5 -5
  179. package/dist/parser-RBNOWHGM.js +15 -0
  180. package/dist/parser-SJ7ECFAP.js +13 -0
  181. package/dist/parser-VVTCMQWY.js +16 -0
  182. package/dist/parser-WT3DSNPQ.js +13 -0
  183. package/dist/parser-XWNSCDY6.js +13 -0
  184. package/dist/pert.d.ts +2 -0
  185. package/dist/{renderer-WVD6G2TS.js → renderer-2NU7M5PN.js} +14 -12
  186. package/dist/renderer-3IETIUZB.js +30 -0
  187. package/dist/renderer-4VLQKKTV.js +39 -0
  188. package/dist/{renderer-HQ4JFZOV.js → renderer-52S6JM5R.js} +12 -11
  189. package/dist/renderer-53FU55KK.js +19 -0
  190. package/dist/renderer-5CU6GYF2.js +27 -0
  191. package/dist/{renderer-LHVCKEWF.js → renderer-5G3PORFD.js} +13 -12
  192. package/dist/renderer-CB2DOQ2O.js +25 -0
  193. package/dist/{renderer-B7Y6I7JX.js → renderer-CL4SAUA5.js} +8 -8
  194. package/dist/{renderer-FXMGCSRP.js → renderer-CRAIC4ER.js} +12 -10
  195. package/dist/renderer-DZ5N6BHW.js +26 -0
  196. package/dist/renderer-FRBPMKPP.js +25 -0
  197. package/dist/renderer-HGWKAXS6.js +16 -0
  198. package/dist/renderer-I5MAFUKX.js +26 -0
  199. package/dist/{renderer-K7XLVPH5.js → renderer-IWNHBIZ6.js} +5 -5
  200. package/dist/renderer-J5MMVCGN.js +29 -0
  201. package/dist/renderer-J5TL5ZX4.js +39 -0
  202. package/dist/renderer-JNC6VJMN.js +24 -0
  203. package/dist/{renderer-X2LYSMLU.js → renderer-KUIZNLAQ.js} +6 -6
  204. package/dist/renderer-M6AFKVLS.js +21 -0
  205. package/dist/renderer-MLDGFZDW.js +23 -0
  206. package/dist/{renderer-YVMETH6V.js → renderer-O4ECS2BI.js} +13 -12
  207. package/dist/{renderer-YEFOOULC.js → renderer-OZIPP7VF.js} +14 -13
  208. package/dist/{renderer-C3RI4OPJ.js → renderer-P7O6OUYC.js} +13 -12
  209. package/dist/renderer-Q3A7572V.js +25 -0
  210. package/dist/renderer-QRX7Q2YN.js +22 -0
  211. package/dist/{renderer-WCWI4I6A.js → renderer-RJT3MOUU.js} +5 -5
  212. package/dist/{renderer-7HMZ5OCJ.js → renderer-SYT4L7GE.js} +6 -6
  213. package/dist/{renderer-G4UOW3RH.js → renderer-TOKGYFTG.js} +6 -6
  214. package/dist/renderer-WWC5VGHH.js +27 -0
  215. package/dist/{renderer-P3YQES7B.js → renderer-YVCD55ZX.js} +15 -13
  216. package/dist/renderer-YWYX6WAI.js +16 -0
  217. package/dist/renderer-radial-QG644QYY.js +21 -0
  218. package/dist/{resolver-WFKZYBJ2.js → resolver-W3WKLWDP.js} +4 -4
  219. package/dist/state-parser-NQGVYSM3.js +19 -0
  220. package/dist/state-renderer-NKV5B3KH.js +40 -0
  221. package/docs/language-reference.md +11 -2
  222. package/package.json +2 -2
  223. package/dist/charts-d3-25E4VWXO.js +0 -27
  224. package/dist/dgmo-router-TGZWFIZO.js +0 -88
  225. package/dist/dimensions-L6BXQXXL.js +0 -22
  226. package/dist/flowchart-parser-UKYOW3VM.js +0 -21
  227. package/dist/layout-25Y3VDYF.js +0 -19
  228. package/dist/layout-4SPLI4HG.js +0 -15
  229. package/dist/layout-CH4HFFRD.js +0 -15
  230. package/dist/layout-NY7MHJCL.js +0 -15
  231. package/dist/parser-2UWWNTFL.js +0 -12
  232. package/dist/parser-3RXYQSA7.js +0 -18
  233. package/dist/parser-5C3PEZK3.js +0 -11
  234. package/dist/parser-6GN5YJBJ.js +0 -13
  235. package/dist/parser-6MQM7WT3.js +0 -15
  236. package/dist/parser-B2A7XOAK.js +0 -12
  237. package/dist/parser-CCNJKDDA.js +0 -16
  238. package/dist/parser-ESHNUFME.js +0 -13
  239. package/dist/parser-F4FEU57T.js +0 -11
  240. package/dist/parser-FHRMFUNX.js +0 -15
  241. package/dist/parser-FPCWDYQV.js +0 -13
  242. package/dist/parser-FY3YFFBS.js +0 -20
  243. package/dist/parser-GML6V2KZ.js +0 -14
  244. package/dist/parser-HA3PF5FL.js +0 -15
  245. package/dist/parser-KTYF6WO5.js +0 -11
  246. package/dist/parser-LU7UAKNB.js +0 -13
  247. package/dist/parser-MHKYQPC2.js +0 -11
  248. package/dist/parser-MVSYFK63.js +0 -17
  249. package/dist/parser-O7YQYFEN.js +0 -15
  250. package/dist/parser-S4EJPNVN.js +0 -19
  251. package/dist/parser-T3D7BV6O.js +0 -11
  252. package/dist/parser-WPPJGB4R.js +0 -12
  253. package/dist/parser-XCPMEB2Z.js +0 -11
  254. package/dist/parser-XRDUX2AR.js +0 -14
  255. package/dist/parser-YPWYT46P.js +0 -16
  256. package/dist/parser-YULS5MLD.js +0 -13
  257. package/dist/renderer-2DME63VZ.js +0 -16
  258. package/dist/renderer-3VY3VXJE.js +0 -37
  259. package/dist/renderer-4A32DX5L.js +0 -24
  260. package/dist/renderer-4K5YYX5R.js +0 -28
  261. package/dist/renderer-6CFML5G3.js +0 -22
  262. package/dist/renderer-7ZNVOVFG.js +0 -16
  263. package/dist/renderer-CJ56SUMF.js +0 -26
  264. package/dist/renderer-COJZZ4F6.js +0 -25
  265. package/dist/renderer-OZX5KGQM.js +0 -21
  266. package/dist/renderer-PLVIARM7.js +0 -24
  267. package/dist/renderer-RA4PTAMF.js +0 -19
  268. package/dist/renderer-RMAM2SOJ.js +0 -28
  269. package/dist/renderer-SES7QZYL.js +0 -37
  270. package/dist/renderer-TQ5QDZOE.js +0 -22
  271. package/dist/renderer-V5SNTPAM.js +0 -27
  272. package/dist/renderer-Y3NXZINM.js +0 -24
  273. package/dist/renderer-YP3P6UVT.js +0 -24
  274. package/dist/renderer-Z4GNKNXO.js +0 -24
  275. package/dist/renderer-radial-VYBZAXXE.js +0 -21
  276. package/dist/state-parser-VIW2WNA5.js +0 -19
  277. package/dist/state-renderer-H22AQD3U.js +0 -38
@@ -6,12 +6,16 @@ import {
6
6
  CARD_RADIUS,
7
7
  CONTAINER_RADIUS
8
8
  } from "./chunk-3CIOJ5YJ.js";
9
+ import {
10
+ layoutInlineHeader
11
+ } from "./chunk-6VJCURWU.js";
9
12
  import {
10
13
  renderIntegratedLegend
11
- } from "./chunk-2NZOHEP4.js";
14
+ } from "./chunk-QDOYT6UW.js";
12
15
  import {
16
+ getLegendExtent,
13
17
  getMaxLegendReservedHeight
14
- } from "./chunk-J7HQPVYH.js";
18
+ } from "./chunk-ES66QH6J.js";
15
19
  import {
16
20
  FONT_FAMILY
17
21
  } from "./chunk-6KFWC4CO.js";
@@ -24,12 +28,12 @@ import {
24
28
  mix,
25
29
  shapeFill,
26
30
  themeBaseBg
27
- } from "./chunk-JYDMBWRP.js";
31
+ } from "./chunk-42IT4BG2.js";
28
32
  import {
29
33
  resolveActiveTagGroup,
30
34
  resolveTagColor,
31
35
  tagAttrKey
32
- } from "./chunk-AHTTKERF.js";
36
+ } from "./chunk-D5FANMSG.js";
33
37
 
34
38
  // src/sketch/renderer.ts
35
39
  import * as d3 from "d3-selection";
@@ -209,7 +213,7 @@ function drawMarkdownBlock(container, text, opts) {
209
213
  const textEl = container.append("text").attr("x", line.x).attr("y", y).attr("font-size", fontSize);
210
214
  let cursorX = line.x;
211
215
  const segs = line.segments.slice();
212
- if (clamped && isLast) {
216
+ if (clamped && isLast && !opts.noEllipsis) {
213
217
  segs.push({ text: ELLIPSIS, bold: false });
214
218
  }
215
219
  for (const seg of segs) {
@@ -223,7 +227,11 @@ function drawMarkdownBlock(container, text, opts) {
223
227
  cursorX += w;
224
228
  }
225
229
  }
226
- return shown.length * lineHeight;
230
+ return {
231
+ height: shown.length * lineHeight,
232
+ shown: shown.length,
233
+ total: visualLines.length
234
+ };
227
235
  }
228
236
 
229
237
  // src/sketch/renderer.ts
@@ -233,8 +241,8 @@ var TITLE_FONT_SIZE = 18;
233
241
  var NODE_STROKE_WIDTH = 2;
234
242
  var EDGE_STROKE_WIDTH = 2;
235
243
  var EDGE_HIT_WIDTH = 18;
236
- var ARROWHEAD_W = 12;
237
- var ARROWHEAD_H = 8;
244
+ var ARROWHEAD_W = 18;
245
+ var ARROWHEAD_H = 12;
238
246
  var DASH = "6 3";
239
247
  var BAND_LABEL_FONT_SIZE = 19;
240
248
  var BAND_LABEL_OPACITY = 0.55;
@@ -273,14 +281,6 @@ function drawTypeBadge(g, kind, color, bx, by) {
273
281
  return;
274
282
  }
275
283
  }
276
- function metaRows(metadata, tagGroups) {
277
- const rows = [];
278
- for (const grp of tagGroups) {
279
- const v = metadata[tagAttrKey(grp.name)];
280
- if (v !== void 0) rows.push([grp.name, v]);
281
- }
282
- return rows;
283
- }
284
284
  var CARD_HEADER_H = 34;
285
285
  var CARD_LABEL_MAX = 15;
286
286
  var CARD_LABEL_MIN = 11;
@@ -304,7 +304,8 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
304
304
  const {
305
305
  activeTagGroup,
306
306
  exportMode = false,
307
- hideDescriptions = false
307
+ hideDescriptions = false,
308
+ splitCardIds
308
309
  } = options;
309
310
  const hideDesc = hideDescriptions || parsed.options.noDescriptions;
310
311
  const neutralFill = parsed.options.fillMode === "outline" ? themeBaseBg(palette, isDark) : mix(palette.textMuted, palette.bg, 12);
@@ -377,7 +378,34 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
377
378
  },
378
379
  width
379
380
  ) : 0;
380
- const contentTop = titleOffset + legendHeight + DIAGRAM_PADDING + extraTop;
381
+ const hasLegend = legendGroups.length > 0;
382
+ const inlineRequested = parsed.options.legendInline === true;
383
+ const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
384
+ {
385
+ groups: legendGroups,
386
+ position: {
387
+ placement: "top-center",
388
+ titleRelation: "inline-with-title"
389
+ },
390
+ mode: exportMode ? "export" : "preview",
391
+ showInactivePills: true
392
+ },
393
+ { activeGroup: activeName },
394
+ width
395
+ ) : { width: 0, height: 0 };
396
+ const header = layoutInlineHeader({
397
+ requested: inlineRequested,
398
+ title: parsed.title ?? "",
399
+ hasLegend,
400
+ legendWidth: legendExtent.width,
401
+ legendHeight: legendExtent.height,
402
+ containerWidth: width,
403
+ titleBandHeight: titleOffset,
404
+ legendReserve: legendHeight,
405
+ titleBaselineY: TITLE_Y,
406
+ titleFontSize: TITLE_FONT_SIZE
407
+ });
408
+ const contentTop = titleOffset + (header.inline ? 0 : legendHeight) + DIAGRAM_PADDING + extraTop;
381
409
  const height = Math.max(
382
410
  contentTop + maxY + DIAGRAM_PADDING,
383
411
  options.exportDims?.height ?? 0
@@ -403,15 +431,22 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
403
431
  ).attr("fill", color);
404
432
  }
405
433
  if (showTitle) {
406
- svg.append("text").attr("x", width / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("font-size", TITLE_FONT_SIZE).attr("font-weight", 700).attr("fill", palette.text).text(parsed.title);
434
+ svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", TITLE_Y).attr("text-anchor", header.titleAnchor).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", 700).attr("fill", palette.text).text(parsed.title);
407
435
  }
408
436
  if (legendGroups.length > 0) {
409
- const legendG = svg.append("g").attr("transform", `translate(0,${titleOffset + 4})`);
437
+ const legendG = svg.append("g").attr(
438
+ "transform",
439
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${titleOffset + 4})`
440
+ );
410
441
  renderIntegratedLegend(legendG, {
411
442
  groups: legendGroups,
412
443
  ...activeName !== null && { activeGroup: activeName },
413
444
  mode: exportMode ? "export" : "preview",
414
445
  showInactivePills: true,
446
+ position: {
447
+ placement: "top-center",
448
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
449
+ },
415
450
  palette,
416
451
  isDark,
417
452
  width
@@ -535,7 +570,7 @@ function renderSketch(container, parsed, layout, palette, isDark, options = {})
535
570
  colorsFor(node.metadata),
536
571
  palette,
537
572
  isDark,
538
- hideDesc ? [] : tagGroups
573
+ !hideDesc && (splitCardIds?.includes(node.id) ?? false)
539
574
  );
540
575
  }
541
576
  const labelLayer = root.append("g").attr("class", "sk-edge-labels");
@@ -562,7 +597,7 @@ function drawBoxFrame(layer, box, colors, palette) {
562
597
  g.append("text").attr("x", box.x + box.w / 2).attr("y", startY + li * lineH).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", fit.fontSize).attr("font-weight", 800).attr("fill", palette.text).attr("opacity", BAND_LABEL_OPACITY).text(fit.lines[li]);
563
598
  }
564
599
  }
565
- function drawNode(layer, node, colors, palette, isDark, tagGroups) {
600
+ function drawNode(layer, node, colors, palette, isDark, splitCard) {
566
601
  void isDark;
567
602
  const g = layer.append("g").attr("class", node.isCollapsedBox ? "sk-node sk-box-collapsed" : "sk-node").attr("transform", `translate(${node.x},${node.y})`).attr("data-node-id", node.id).attr("data-line-number", node.lineNumber);
568
603
  for (const [k, v] of Object.entries(node.metadata)) {
@@ -579,12 +614,11 @@ function drawNode(layer, node, colors, palette, isDark, tagGroups) {
579
614
  g.append("text").attr("x", 10).attr("y", 20 + i * lineHeight).attr("font-size", NOTE_FONT_SIZE).attr("fill", colors.text).text(line);
580
615
  });
581
616
  } else {
582
- const rows = node.isCollapsedBox ? [] : metaRows(node.metadata, tagGroups);
583
617
  const badge = node.shape !== "rectangle";
584
618
  const labelInset = badge ? 22 : 0;
585
619
  const solidLike = colors.stroke === colors.fill;
586
620
  const ruleColor = solidLike ? colors.text : colors.stroke;
587
- if (node.description && !node.isCollapsedBox) {
621
+ if (!node.isCollapsedBox && (node.description || splitCard)) {
588
622
  const fitH = fitWrapped(
589
623
  node.label,
590
624
  node.w - 24 - labelInset,
@@ -605,33 +639,37 @@ function drawNode(layer, node, colors, palette, isDark, tagGroups) {
605
639
  headerHeight: CARD_HEADER_H
606
640
  });
607
641
  g.append("line").attr("x1", 0).attr("y1", CARD_HEADER_H).attr("x2", node.w).attr("y2", CARD_HEADER_H).attr("stroke", ruleColor).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
608
- const inset = 12;
609
- const bodyGap = 8;
610
- const lh = CARD_META_FONT + 4;
611
- const avail = node.h - CARD_HEADER_H - bodyGap - 8;
612
- const body = g.append("g").attr("class", "sk-desc").attr("transform", `translate(${inset} ${CARD_HEADER_H + bodyGap})`);
613
- drawMarkdownBlock(body, node.description, {
614
- width: node.w - inset * 2,
615
- fontSize: CARD_META_FONT,
616
- lineHeight: lh,
617
- color: colors.text,
618
- // match the header label (contrast-aware in solid)
619
- linkColor: colors.text,
620
- maxLines: Math.max(1, Math.floor(avail / lh))
621
- });
642
+ if (node.description) {
643
+ const inset = 12;
644
+ const bodyGap = 8;
645
+ const lh = CARD_META_FONT + 4;
646
+ const avail = node.h - CARD_HEADER_H - bodyGap - 8;
647
+ const body = g.append("g").attr("class", "sk-desc").attr("transform", `translate(${inset} ${CARD_HEADER_H + bodyGap})`);
648
+ const block = drawMarkdownBlock(body, node.description, {
649
+ width: node.w - inset * 2,
650
+ fontSize: CARD_META_FONT,
651
+ lineHeight: lh,
652
+ color: colors.text,
653
+ // match the header label (contrast-aware in solid)
654
+ linkColor: colors.text,
655
+ maxLines: Math.max(1, Math.floor(avail / lh)),
656
+ noEllipsis: true
657
+ });
658
+ if (block.total > block.shown) {
659
+ g.append("text").attr("class", "sk-desc-more").attr("x", node.w - 8).attr("y", node.h - 5).attr("text-anchor", "end").attr("font-size", 9).attr("fill", palette.textMuted).attr("data-line-number", node.lineNumber).style("cursor", "pointer").text(`+${block.total - block.shown} more in source`);
660
+ }
661
+ }
622
662
  if (badge) {
623
663
  drawTypeBadge(g, node.shape, colors.text, 10, (CARD_HEADER_H - 16) / 2);
624
664
  }
625
665
  return;
626
666
  }
627
- const headerH = rows.length ? CARD_HEADER_H : node.h;
628
- const fillTitle = rows.length === 0;
629
667
  const fit = fitWrapped(
630
668
  node.label,
631
669
  node.w - 24 - labelInset,
632
- fillTitle ? CARD_TITLE_MAX : CARD_LABEL_MAX,
670
+ CARD_TITLE_MAX,
633
671
  CARD_LABEL_MIN,
634
- fillTitle ? 3 : 2
672
+ 3
635
673
  );
636
674
  renderNodeCard(g, {
637
675
  width: node.w,
@@ -644,18 +682,7 @@ function drawNode(layer, node, colors, palette, isDark, tagGroups) {
644
682
  labelLines: fit.lines,
645
683
  labelColor: colors.text,
646
684
  labelFontSize: fit.fontSize,
647
- headerHeight: headerH,
648
- ...rows.length ? {
649
- meta: {
650
- rows,
651
- fontSize: CARD_META_FONT,
652
- lineHeight: CARD_META_FONT + 5,
653
- separatorGap: 8,
654
- separatorColor: ruleColor,
655
- textColor: solidLike ? colors.text : palette.text,
656
- keyX: 12
657
- }
658
- } : {}
685
+ headerHeight: node.h
659
686
  });
660
687
  if (badge) {
661
688
  drawTypeBadge(g, node.shape, colors.text, 10, (CARD_HEADER_H - 16) / 2);
@@ -913,6 +940,8 @@ function sketchEdgeGeometry(layout, offsets) {
913
940
  const n = normalOf(side);
914
941
  return 1 - (n.x * dx + n.y * dy) / len;
915
942
  };
943
+ const W_BACK = 2.6;
944
+ const backFacingCost = (from, to, side) => W_BACK * Math.max(0, facingCost(from, to, side) - 1);
916
945
  const ctx = layout.edges.map((edge) => {
917
946
  const source = rectById.get(edge.sourceId);
918
947
  const target = rectById.get(edge.targetId);
@@ -947,6 +976,7 @@ function sketchEdgeGeometry(layout, offsets) {
947
976
  const W_NODE = 100;
948
977
  const W_EDGE = 8;
949
978
  const W_PORT = 1.5;
979
+ const W_PORT_SAME = 0.6;
950
980
  const isBox = (id) => portsById.has(id);
951
981
  const portClashCount = (self, s, t) => {
952
982
  const e = layout.edges[self];
@@ -964,6 +994,44 @@ function sketchEdgeGeometry(layout, offsets) {
964
994
  }
965
995
  return n;
966
996
  };
997
+ const portStackCount = (self, _s, t) => {
998
+ const e = layout.edges[self];
999
+ if (isBox(e.targetId)) return 0;
1000
+ let n = 0;
1001
+ for (let j = 0; j < layout.edges.length; j++) {
1002
+ if (j === self) continue;
1003
+ const ej = layout.edges[j];
1004
+ if (ej.targetId === e.targetId && ej.sourceId !== e.sourceId && // not reciprocal
1005
+ chosen[j].t === t)
1006
+ n++;
1007
+ }
1008
+ return n;
1009
+ };
1010
+ const W_TURN = 0.55;
1011
+ const W_SCURVE = 1.8;
1012
+ const CURVE_STRAIGHT = 0.35;
1013
+ const curveCostPoly = (pts) => {
1014
+ let totalTurn = 0;
1015
+ let inflections = 0;
1016
+ let prevSign = 0;
1017
+ for (let i = 1; i < pts.length - 1; i++) {
1018
+ const ax = pts[i].x - pts[i - 1].x;
1019
+ const ay = pts[i].y - pts[i - 1].y;
1020
+ const bx = pts[i + 1].x - pts[i].x;
1021
+ const by = pts[i + 1].y - pts[i].y;
1022
+ const cross = ax * by - ay * bx;
1023
+ const dot = ax * bx + ay * by;
1024
+ if (ax === 0 && ay === 0) continue;
1025
+ if (bx === 0 && by === 0) continue;
1026
+ totalTurn += Math.abs(Math.atan2(cross, dot));
1027
+ const sign = cross > 1e-6 ? 1 : cross < -1e-6 ? -1 : 0;
1028
+ if (sign !== 0) {
1029
+ if (prevSign !== 0 && sign !== prevSign) inflections++;
1030
+ prevSign = sign;
1031
+ }
1032
+ }
1033
+ return totalTurn * W_TURN + inflections * W_SCURVE;
1034
+ };
967
1035
  const scoreOf = (c, g, poly, self, polys2, s, t) => {
968
1036
  let edgeCross = 0;
969
1037
  for (let j = 0; j < polys2.length; j++) {
@@ -971,7 +1039,7 @@ function sketchEdgeGeometry(layout, offsets) {
971
1039
  const pj = polys2[j];
972
1040
  if (pj) edgeCross += polyCrossings(poly, pj);
973
1041
  }
974
- return pathCrossings(g, c.obstacleRects) * W_NODE + edgeCross * W_EDGE + portClashCount(self, s, t) * W_PORT + facingCost(c.source, c.target, s) + facingCost(c.target, c.source, t);
1042
+ return pathCrossings(g, c.obstacleRects) * W_NODE + edgeCross * W_EDGE + portClashCount(self, s, t) * W_PORT + portStackCount(self, s, t) * W_PORT_SAME + curveCostPoly(poly) + facingCost(c.source, c.target, s) + facingCost(c.target, c.source, t) + backFacingCost(c.source, c.target, s) + backFacingCost(c.target, c.source, t);
975
1043
  };
976
1044
  const chosen = layout.edges.map(
977
1045
  (_, i) => sides[i] ?? { s: "R", t: "L" }
@@ -996,7 +1064,8 @@ function sketchEdgeGeometry(layout, offsets) {
996
1064
  if (!c || !g || !p) continue;
997
1065
  const cur = chosen[i];
998
1066
  const curScore = scoreOf(c, g, p, i, polys, cur.s, cur.t);
999
- if (curScore < W_EDGE && portClashCount(i, cur.s, cur.t) === 0) continue;
1067
+ if (curScore < W_EDGE && portClashCount(i, cur.s, cur.t) === 0 && portStackCount(i, cur.s, cur.t) === 0 && curveCostPoly(p) < CURVE_STRAIGHT && backFacingCost(c.source, c.target, cur.s) === 0 && backFacingCost(c.target, c.source, cur.t) === 0)
1068
+ continue;
1000
1069
  let bestScore = curScore;
1001
1070
  let bestG = g;
1002
1071
  let bestP = p;
@@ -1059,4 +1128,4 @@ export {
1059
1128
  sketchEdgeGeometry,
1060
1129
  renderSketchForExport
1061
1130
  };
1062
- //# sourceMappingURL=chunk-IYNKLCAZ.js.map
1131
+ //# sourceMappingURL=chunk-3R67RRPC.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CATEGORICAL_COLOR_ORDER
3
- } from "./chunk-ZKPPI6BF.js";
3
+ } from "./chunk-EXNKNJ65.js";
4
4
 
5
5
  // src/palettes/color-utils.ts
6
6
  var HEX_TO_HSL_CACHE = /* @__PURE__ */ new Map();
@@ -241,4 +241,4 @@ export {
241
241
  getSegmentColors,
242
242
  politicalTints
243
243
  };
244
- //# sourceMappingURL=chunk-JYDMBWRP.js.map
244
+ //# sourceMappingURL=chunk-42IT4BG2.js.map
@@ -5,11 +5,11 @@ import {
5
5
  splitNameAndMeta,
6
6
  tryParseSharedOption,
7
7
  warnUnknownMetaKeys
8
- } from "./chunk-3FRO35WW.js";
8
+ } from "./chunk-3KOPPSUQ.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail
12
- } from "./chunk-4W2PE66Q.js";
12
+ } from "./chunk-OLMWTJVU.js";
13
13
 
14
14
  // src/cycle/parser.ts
15
15
  var BARE_EDGE_RE = /^->\s*(.*)?$/;
@@ -274,4 +274,4 @@ function parseCycle(content) {
274
274
  export {
275
275
  parseCycle
276
276
  };
277
- //# sourceMappingURL=chunk-O576GYAP.js.map
277
+ //# sourceMappingURL=chunk-4MB4UOT5.js.map
@@ -7,10 +7,10 @@ import {
7
7
  splitNameAndMeta,
8
8
  warnUnknownMetaKeys,
9
9
  withTagAliases
10
- } from "./chunk-3FRO35WW.js";
10
+ } from "./chunk-3KOPPSUQ.js";
11
11
  import {
12
12
  makeDgmoError
13
- } from "./chunk-4W2PE66Q.js";
13
+ } from "./chunk-OLMWTJVU.js";
14
14
 
15
15
  // src/timeline/parser.ts
16
16
  var TIMELINE_DURATION_RE = /^(\d+(?:\.\d{1,2})?)(min|[dwmyhs])(\?)?$/;
@@ -314,4 +314,4 @@ export {
314
314
  parseTimelineDate,
315
315
  parseTimelineEventLine
316
316
  };
317
- //# sourceMappingURL=chunk-3KHJJP3J.js.map
317
+ //# sourceMappingURL=chunk-4MJOBVY7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isBlockNode
3
- } from "./chunk-NR5HCAUD.js";
3
+ } from "./chunk-XSVWUOUZ.js";
4
4
  import {
5
5
  AUTO_TAG_COLOR_SENTINEL,
6
6
  finalizeAutoTagColors,
@@ -9,19 +9,19 @@ import {
9
9
  tagAttrKey,
10
10
  validateTagGroupNames,
11
11
  validateTagValues
12
- } from "./chunk-AHTTKERF.js";
12
+ } from "./chunk-D5FANMSG.js";
13
13
  import {
14
14
  extractColor,
15
15
  fillModeFromToken,
16
16
  measureIndent,
17
17
  parseFirstLine
18
- } from "./chunk-3FRO35WW.js";
18
+ } from "./chunk-3KOPPSUQ.js";
19
19
  import {
20
20
  formatDgmoError,
21
21
  makeDgmoError,
22
22
  makeFail,
23
23
  suggest
24
- } from "./chunk-4W2PE66Q.js";
24
+ } from "./chunk-OLMWTJVU.js";
25
25
 
26
26
  // src/block/parser.ts
27
27
  function parseBlock(content, palette) {
@@ -133,6 +133,10 @@ function parseBlock(content, palette) {
133
133
  options.noLegend = true;
134
134
  continue;
135
135
  }
136
+ if (/^legend-inline\s*$/i.test(trimmed)) {
137
+ options.legendInline = true;
138
+ continue;
139
+ }
136
140
  const fm = fillModeFromToken(trimmed);
137
141
  if (fm !== null) {
138
142
  if (fm === "tint") delete options.fillMode;
@@ -338,4 +342,4 @@ function parseBlockTail(tail, aliasMap) {
338
342
  export {
339
343
  parseBlock
340
344
  };
341
- //# sourceMappingURL=chunk-3SEEP2JM.js.map
345
+ //# sourceMappingURL=chunk-5J2RQGFG.js.map
@@ -4,16 +4,16 @@ import {
4
4
  matchTagBlockHeading,
5
5
  stripDefaultModifier,
6
6
  tagAttrKey
7
- } from "./chunk-AHTTKERF.js";
7
+ } from "./chunk-D5FANMSG.js";
8
8
  import {
9
9
  FILL_FAMILY_TOKENS,
10
10
  extractColor,
11
11
  measureIndent,
12
12
  parseFirstLine
13
- } from "./chunk-3FRO35WW.js";
13
+ } from "./chunk-3KOPPSUQ.js";
14
14
  import {
15
15
  emit
16
- } from "./chunk-4W2PE66Q.js";
16
+ } from "./chunk-OLMWTJVU.js";
17
17
 
18
18
  // src/swimlane/diagnostics.ts
19
19
  var SWIMLANE_DX = {
@@ -692,4 +692,4 @@ export {
692
692
  SWIMLANE_DIAGNOSTICS,
693
693
  parseSwimlane
694
694
  };
695
- //# sourceMappingURL=chunk-EAI6XJ7D.js.map
695
+ //# sourceMappingURL=chunk-5VLUAAAE.js.map
@@ -5,11 +5,11 @@ import {
5
5
  normalizeNumericToken,
6
6
  parseFirstLine,
7
7
  tryParseSharedOption
8
- } from "./chunk-3FRO35WW.js";
8
+ } from "./chunk-3KOPPSUQ.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail
12
- } from "./chunk-4W2PE66Q.js";
12
+ } from "./chunk-OLMWTJVU.js";
13
13
 
14
14
  // src/goal/parser.ts
15
15
  function parseGoalNumber(token) {
@@ -158,4 +158,4 @@ function parseGoal(content, palette) {
158
158
  export {
159
159
  parseGoal
160
160
  };
161
- //# sourceMappingURL=chunk-FVMKCZHF.js.map
161
+ //# sourceMappingURL=chunk-5XMDSXZT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  analyzePert
3
- } from "./chunk-HO3RCNF6.js";
3
+ } from "./chunk-CGLBK5Q4.js";
4
4
  import {
5
5
  computeNodeSizing,
6
6
  layoutPert
@@ -16,9 +16,19 @@ import {
16
16
  import {
17
17
  ScaleContext
18
18
  } from "./chunk-YYVTBZZC.js";
19
+ import {
20
+ INLINE_HEADER_PAD,
21
+ layoutInlineHeader
22
+ } from "./chunk-6VJCURWU.js";
23
+ import {
24
+ serializeSvg
25
+ } from "./chunk-NZ5QVASG.js";
19
26
  import {
20
27
  renderIntegratedLegend
21
- } from "./chunk-2NZOHEP4.js";
28
+ } from "./chunk-QDOYT6UW.js";
29
+ import {
30
+ getLegendExtent
31
+ } from "./chunk-ES66QH6J.js";
22
32
  import {
23
33
  CAPTION_BOX_PADDING_X,
24
34
  CAPTION_BOX_PADDING_Y,
@@ -35,7 +45,7 @@ import {
35
45
  } from "./chunk-6KFWC4CO.js";
36
46
  import {
37
47
  parsePert
38
- } from "./chunk-RRGKMJYL.js";
48
+ } from "./chunk-DIKIHU52.js";
39
49
  import {
40
50
  addCalendarDays,
41
51
  formatDuration,
@@ -45,7 +55,7 @@ import {
45
55
  } from "./chunk-3TYUXC7D.js";
46
56
  import {
47
57
  LEGEND_HEIGHT
48
- } from "./chunk-Q5IHQ4NW.js";
58
+ } from "./chunk-SCJ7CAJF.js";
49
59
  import {
50
60
  measureText,
51
61
  truncateText,
@@ -56,11 +66,11 @@ import {
56
66
  mix,
57
67
  shapeFill,
58
68
  themeBaseBg
59
- } from "./chunk-JYDMBWRP.js";
69
+ } from "./chunk-42IT4BG2.js";
60
70
  import {
61
71
  resolveActiveTagGroup,
62
72
  resolveTagColor
63
- } from "./chunk-AHTTKERF.js";
73
+ } from "./chunk-D5FANMSG.js";
64
74
 
65
75
  // src/pert/renderer.ts
66
76
  import * as d3Selection from "d3-selection";
@@ -229,25 +239,54 @@ function renderPert(container, resolved, layout, palette, isDark, options = {})
229
239
  const scaledHeight = layout.height + sDiagramPad * 2 + sTitleHeight + sLegendBlockHeight + analysisBlockHeight + fieldLegendBlockHeight;
230
240
  const svgW = ctx.isBelowFloor ? exportWidth : scaledWidth;
231
241
  const svgH = ctx.isBelowFloor ? exportHeight : scaledHeight;
242
+ const inlineRequested = resolved.options.legendInline === true && showTagLegend;
243
+ const legendExtent = inlineRequested ? getLegendExtent(
244
+ {
245
+ groups: resolved.tagGroups.map((g) => ({
246
+ name: g.name,
247
+ entries: g.entries
248
+ })),
249
+ position: {
250
+ placement: "top-center",
251
+ titleRelation: "inline-with-title"
252
+ },
253
+ mode: options.exportMode ? "export" : "preview"
254
+ },
255
+ { activeGroup: tagLegendActive },
256
+ svgW
257
+ ) : { width: 0, height: 0 };
258
+ const header = layoutInlineHeader({
259
+ requested: inlineRequested,
260
+ title: effectiveTitle ?? "",
261
+ hasLegend: showTagLegend,
262
+ legendWidth: legendExtent.width,
263
+ legendHeight: legendExtent.height,
264
+ containerWidth: svgW,
265
+ titleBandHeight: sTitleHeight,
266
+ legendReserve: sLegendBlockHeight,
267
+ titleBaselineY: sTitleY,
268
+ titleFontSize: sTitleFontSize
269
+ });
232
270
  const svg = d3Selection.select(container).append("svg").attr("width", ctx.isBelowFloor ? "100%" : svgW).attr("height", svgH).attr("viewBox", `0 0 ${svgW} ${svgH}`).attr("preserveAspectRatio", "xMidYMin meet").style("font-family", FONT_FAMILY);
233
271
  const defs = svg.append("defs");
234
272
  buildArrowheads(defs, palette, sArrowheadW, sArrowheadH);
235
273
  if (effectiveTitle) {
236
- svg.append("text").attr("class", "pert-title chart-title").attr("x", svgW / 2).attr("y", sTitleY).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).text(effectiveTitle);
274
+ svg.append("text").attr("class", "pert-title chart-title").attr("x", header.titleX).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).text(effectiveTitle);
237
275
  }
238
276
  if (effectiveSubtitle) {
239
277
  const subtitleY = effectiveTitle ? sTitleY + ctx.aesthetic(26) : sTitleY;
240
278
  svg.append("text").attr("class", "pert-subtitle").attr("x", svgW / 2).attr("y", subtitleY).attr("text-anchor", "middle").attr("fill", palette.textMuted).attr("font-size", sSubtitleFontSize).attr("font-weight", 400).text(effectiveSubtitle);
241
279
  }
242
280
  const offsetX = Math.max(sDiagramPad, (svgW - layout.width) / 2);
243
- const offsetY = sDiagramPad + sTitleHeight + sLegendBlockHeight;
281
+ const offsetY = sDiagramPad + sTitleHeight + (header.inline ? 0 : sLegendBlockHeight);
244
282
  if (showTagLegend) {
245
283
  const tagLegendY = sDiagramPad + sTitleHeight + sLegendTopGap;
246
284
  renderTagLegendRow(svg, resolved, palette, isDark, {
247
- x: 0,
248
- y: tagLegendY,
249
- width: svgW,
285
+ x: header.inline ? svgW - INLINE_HEADER_PAD - legendExtent.width : 0,
286
+ y: header.inline ? header.legendY : tagLegendY,
287
+ width: header.inline ? legendExtent.width : svgW,
250
288
  activeGroup: tagLegendActive,
289
+ inline: header.inline,
251
290
  ...options.exportMode !== void 0 && {
252
291
  exportMode: options.exportMode
253
292
  }
@@ -348,7 +387,7 @@ function renderPertForExport(content, theme, palette, now) {
348
387
  else svgEl.style.background = palette.bg;
349
388
  svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
350
389
  svgEl.style.fontFamily = FONT_FAMILY;
351
- return svgEl.outerHTML;
390
+ return serializeSvg(svgEl);
352
391
  } finally {
353
392
  document.body.removeChild(container);
354
393
  }
@@ -1337,7 +1376,7 @@ function renderCaptionBlock(svg, bullets, args) {
1337
1376
  }
1338
1377
  function renderTagLegendRow(svg, resolved, palette, isDark, args) {
1339
1378
  if (resolved.tagGroups.length === 0) return;
1340
- const { x, y, width, activeGroup, exportMode } = args;
1379
+ const { x, y, width, activeGroup, exportMode, inline } = args;
1341
1380
  const groups = resolved.tagGroups.map((g) => ({
1342
1381
  name: g.name,
1343
1382
  entries: g.entries.map((e) => ({ value: e.value, color: e.color }))
@@ -1349,7 +1388,13 @@ function renderTagLegendRow(svg, resolved, palette, isDark, args) {
1349
1388
  palette,
1350
1389
  isDark,
1351
1390
  width,
1352
- activeGroup
1391
+ activeGroup,
1392
+ ...inline && {
1393
+ position: {
1394
+ placement: "top-center",
1395
+ titleRelation: "inline-with-title"
1396
+ }
1397
+ }
1353
1398
  });
1354
1399
  }
1355
1400
  function renderFieldLegendBlock(svg, args) {
@@ -1823,4 +1868,4 @@ export {
1823
1868
  measurePertAnalysisBlock,
1824
1869
  renderPertAnalysisBlock
1825
1870
  };
1826
- //# sourceMappingURL=chunk-LPJ6H5X4.js.map
1871
+ //# sourceMappingURL=chunk-5ZDHXS5N.js.map