@diagrammo/dgmo 0.89.0 → 0.91.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 (233) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +589 -15
  3. package/dist/advanced.js +813 -211
  4. package/dist/block.d.ts +11 -2
  5. package/dist/block.js +94 -64
  6. package/dist/{calculator-35YVW4QO.js → calculator-3LZUWOBK.js} +2 -2
  7. package/dist/{chart-meta-Bev5Ebjr.d.ts → chart-meta-B_WTMP0y.d.ts} +1 -1
  8. package/dist/chart-meta.d.ts +2 -2
  9. package/dist/chart-meta.js +18 -17
  10. package/dist/{chart-types-Bf8C5QQW.d.ts → chart-types-V2NcgN5O.d.ts} +4 -0
  11. package/dist/{charts-d3-KEQSUWKP.js → charts-d3-YXD6VGZQ.js} +8 -7
  12. package/dist/{chunk-PMNITNPR.js → chunk-273GB7WK.js} +6 -5
  13. package/dist/{chunk-HAMF4F3P.js → chunk-2A4OFZ2Z.js} +5 -5
  14. package/dist/{chunk-K5XT7NHD.js → chunk-2AM6VA3A.js} +10 -10
  15. package/dist/{chunk-XJ2TBXHA.js → chunk-2UV627GG.js} +9 -9
  16. package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
  17. package/dist/{chunk-JVZ7KFAX.js → chunk-37QQXKFV.js} +9 -10
  18. package/dist/{chunk-M2BCY7H3.js → chunk-3LINSNJT.js} +199 -146
  19. package/dist/{chunk-WPL5PFXE.js → chunk-3SLRZKLB.js} +6 -6
  20. package/dist/chunk-3UR4F7FE.js +14 -0
  21. package/dist/{chunk-ZUCXFXLD.js → chunk-3YTAOMMN.js} +2 -2
  22. package/dist/{chunk-NIUO2TNR.js → chunk-4HG4PYHM.js} +197 -203
  23. package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
  24. package/dist/{chunk-HUNDJTTH.js → chunk-53BJIOLF.js} +1 -1
  25. package/dist/{chunk-LR6RRDWN.js → chunk-57L2JPP2.js} +10 -6
  26. package/dist/{chunk-IIOLFAGJ.js → chunk-5DIBB2QG.js} +51 -32
  27. package/dist/{chunk-S2WE7TVK.js → chunk-5MDQMB6A.js} +1 -1
  28. package/dist/{chunk-7Z2VFRP5.js → chunk-5U6DXIMV.js} +47 -24
  29. package/dist/{chunk-QIOYTQDZ.js → chunk-5VPWIC6T.js} +9 -9
  30. package/dist/{chunk-JRUEIRJB.js → chunk-634LDSN6.js} +3 -3
  31. package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
  32. package/dist/{chunk-LPYYZCSI.js → chunk-6NO3MNBC.js} +3 -3
  33. package/dist/{chunk-ITSBBQTH.js → chunk-6QEXWMBP.js} +13 -17
  34. package/dist/{chunk-DDPGEGHB.js → chunk-7BBRSOKS.js} +3 -3
  35. package/dist/{chunk-WQ6G6FFM.js → chunk-AR4QVMWG.js} +5 -2
  36. package/dist/{chunk-BB6QKWHZ.js → chunk-B6EUFLRP.js} +10 -10
  37. package/dist/{chunk-C4FRGZGX.js → chunk-CDT33RHG.js} +1 -1
  38. package/dist/{chunk-WP22MHH6.js → chunk-CPGKRI7H.js} +10 -13
  39. package/dist/{chunk-ZNNVI5SR.js → chunk-CU2PZLZP.js} +53 -31
  40. package/dist/{chunk-CUYHST3B.js → chunk-CVZBLHHW.js} +1 -1
  41. package/dist/{chunk-Y7PSAHAY.js → chunk-CXIPV2FY.js} +3 -3
  42. package/dist/{chunk-NRPELUB6.js → chunk-D7DXNQW5.js} +2 -2
  43. package/dist/{chunk-YMFQLWZ2.js → chunk-D7PP35BA.js} +1 -1
  44. package/dist/{chunk-RGWYZR3S.js → chunk-DLX7MEN4.js} +2 -2
  45. package/dist/chunk-EDPDAUBL.js +825 -0
  46. package/dist/{chunk-GSYZZFI5.js → chunk-EP7BT3HU.js} +2 -2
  47. package/dist/{chunk-ICZ7M6IZ.js → chunk-EQJ3U5EW.js} +1 -1
  48. package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
  49. package/dist/{chunk-XUCQVKLQ.js → chunk-F2436VRR.js} +4 -4
  50. package/dist/{chunk-UG2XG57E.js → chunk-F26ZPBSF.js} +3 -3
  51. package/dist/{chunk-UWKRPQZO.js → chunk-FJCYK4K3.js} +25 -22
  52. package/dist/{chunk-FKLE6QA3.js → chunk-G22UV5AF.js} +12 -12
  53. package/dist/{chunk-GUTZCRBT.js → chunk-G3EUQMV4.js} +4 -4
  54. package/dist/{chunk-SOPM5PLO.js → chunk-GCDW3WAY.js} +14 -14
  55. package/dist/{chunk-7UDAIP6W.js → chunk-HFG7KQOY.js} +13 -15
  56. package/dist/{chunk-ID2K3IHI.js → chunk-HLE5QGZJ.js} +1 -1
  57. package/dist/{chunk-QFHWYWQL.js → chunk-HLVGZXM5.js} +2 -2
  58. package/dist/{chunk-7C2RAGPT.js → chunk-HSGWR2FL.js} +16 -16
  59. package/dist/{chunk-P3SKSKJI.js → chunk-HWXUQCDY.js} +3 -3
  60. package/dist/{chunk-HTWH2XQL.js → chunk-HYV6GSXM.js} +6 -3
  61. package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
  62. package/dist/chunk-IHK3Y2HG.js +781 -0
  63. package/dist/{chunk-7KPHRTND.js → chunk-II4XJETG.js} +1 -1
  64. package/dist/{chunk-RXIKESRI.js → chunk-IMHNZITR.js} +2 -2
  65. package/dist/{chunk-TAP2NZEU.js → chunk-IMKPFW67.js} +13 -13
  66. package/dist/{chunk-FKZ2Y3Q5.js → chunk-IS6WFBX7.js} +3 -3
  67. package/dist/{chunk-47E5UTXE.js → chunk-IUBCDNT2.js} +2 -2
  68. package/dist/{chunk-EXKCRXPO.js → chunk-IWTUXGHN.js} +12 -12
  69. package/dist/{chunk-C7QRRTAW.js → chunk-J2SQNZ6D.js} +2 -2
  70. package/dist/{chunk-DZPHN2WN.js → chunk-JA2S7PHR.js} +14 -14
  71. package/dist/{chunk-DPSMX4EY.js → chunk-JJQWCI35.js} +4 -4
  72. package/dist/chunk-JJUDOR4I.js +110 -0
  73. package/dist/{chunk-LYLNMN77.js → chunk-K3BYD3WU.js} +8 -3
  74. package/dist/{chunk-3AQJNY65.js → chunk-KFXY5IW2.js} +149 -43
  75. package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
  76. package/dist/{chunk-LCJURK7L.js → chunk-LKR4FACF.js} +2 -4
  77. package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
  78. package/dist/{chunk-IJ27L3R4.js → chunk-MA42PIGJ.js} +1 -1
  79. package/dist/{chunk-IQ6P3HDE.js → chunk-MI6SJJQU.js} +2 -2
  80. package/dist/{chunk-N4BBSDWI.js → chunk-MJKQ5ZYY.js} +140 -151
  81. package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
  82. package/dist/{chunk-AZ24RI5L.js → chunk-MNL547RV.js} +6 -6
  83. package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
  84. package/dist/{chunk-ECMA6XE2.js → chunk-N254IJM2.js} +13 -13
  85. package/dist/{layout-search-YKUL4VBV.js → chunk-NWPMLX2V.js} +27 -30
  86. package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
  87. package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
  88. package/dist/{chunk-B3S76BZO.js → chunk-PSGSFRRE.js} +4 -4
  89. package/dist/{chunk-4AJKOUBO.js → chunk-PUZ63XZM.js} +13 -11
  90. package/dist/{chunk-UQLHKLF4.js → chunk-PZVTFQI2.js} +8 -8
  91. package/dist/{chunk-W7QN5BC5.js → chunk-Q3N7PI3B.js} +180 -7
  92. package/dist/{chunk-L5AFONQU.js → chunk-QKJ6MQXW.js} +2 -4
  93. package/dist/{chunk-7SX4IY6T.js → chunk-QVKTAU7P.js} +1 -1
  94. package/dist/{chunk-SLQT3JP3.js → chunk-R7BSF7Z7.js} +1 -1
  95. package/dist/{chunk-4R6OMKXB.js → chunk-RHXIUUWB.js} +5 -5
  96. package/dist/{chunk-MHAYUS65.js → chunk-RMTOZALT.js} +8 -5
  97. package/dist/{chunk-HSRQDWV7.js → chunk-ROCBGUJN.js} +8 -17
  98. package/dist/{chunk-44FTCIRI.js → chunk-RVTYIGWZ.js} +9 -9
  99. package/dist/{chunk-RU725VCJ.js → chunk-SKF7XLCM.js} +10 -35
  100. package/dist/{chunk-RPKBWJBB.js → chunk-SMTWQ66K.js} +6 -6
  101. package/dist/{chunk-3AX6MCI6.js → chunk-SPQVER4T.js} +2 -2
  102. package/dist/{chunk-CX6OH5WP.js → chunk-SWBHH2UW.js} +4 -4
  103. package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
  104. package/dist/{chunk-7TF3QOOD.js → chunk-TIVMAITN.js} +14 -0
  105. package/dist/{chunk-NSR2CGV6.js → chunk-TLPY4ZBI.js} +611 -437
  106. package/dist/{chunk-WRCAH3UO.js → chunk-TPEYEOXA.js} +15 -15
  107. package/dist/{chunk-FJNXXGTR.js → chunk-UWJP4JSZ.js} +3 -3
  108. package/dist/{chunk-MY6GUH26.js → chunk-V3KHZQPK.js} +3 -3
  109. package/dist/{chunk-66YFDTT6.js → chunk-VGSSAMLA.js} +4 -4
  110. package/dist/{chunk-Q6SQISHT.js → chunk-VMD2CYVP.js} +311 -74
  111. package/dist/{chunk-MFW6P7WH.js → chunk-WNTPJZU7.js} +3 -3
  112. package/dist/{chunk-7W4XLIVH.js → chunk-WTE27AJT.js} +14 -14
  113. package/dist/{chunk-UKJLPA7R.js → chunk-X6IZP2BD.js} +1 -1
  114. package/dist/{chunk-2GM7N5TV.js → chunk-XLAREWBK.js} +9 -9
  115. package/dist/{chunk-AYOVY75O.js → chunk-XLPJJ35N.js} +4 -4
  116. package/dist/{chunk-NGC3IZRY.js → chunk-XQTRGKQ3.js} +4 -4
  117. package/dist/{chunk-WEF6MXFG.js → chunk-YZG37S7L.js} +9 -9
  118. package/dist/{chunk-LFKSHDVI.js → chunk-ZB2Q67NO.js} +14 -13
  119. package/dist/{chunk-JQ57AWDL.js → chunk-ZJ4PYTCK.js} +1 -1
  120. package/dist/completion-registry.d.ts +6 -0
  121. package/dist/completion-registry.js +62 -6
  122. package/dist/{compute-JAP5E2E4.js → compute-2XWFVO7K.js} +1 -1
  123. package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
  124. package/dist/dgmo-router-YHBMKTXY.js +94 -0
  125. package/dist/{dimensions-7MF7VSGS.js → dimensions-QMGWJQTR.js} +5 -5
  126. package/dist/editor.js +12 -0
  127. package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-BLJ6RA53.js} +4 -4
  128. package/dist/{flowchart-renderer-DZQZRL2F.js → flowchart-renderer-FXRQKXAK.js} +12 -8
  129. package/dist/highlight.js +12 -0
  130. package/dist/index.d.ts +26 -5
  131. package/dist/index.js +84 -57
  132. package/dist/{layout-5VSMZPMG.js → layout-5HCEF7VO.js} +1 -1
  133. package/dist/{layout-6L3BIFEZ.js → layout-6PLSBB5X.js} +3 -3
  134. package/dist/{layout-UIV56NUA.js → layout-B7PQRAMB.js} +1 -1
  135. package/dist/{layout-IGAVGDME.js → layout-CCVCLZ6S.js} +1 -1
  136. package/dist/{layout-PP36LUTA.js → layout-CRUAP7JG.js} +3 -3
  137. package/dist/{layout-Q3RYSODA.js → layout-G42FDCF3.js} +3 -3
  138. package/dist/{layout-EFEZ533S.js → layout-IV4H2FLB.js} +3 -3
  139. package/dist/{layout-4RRC7XU7.js → layout-JTNRSGOS.js} +6 -3
  140. package/dist/{layout-H4K54IW3.js → layout-RBLD5EGX.js} +6 -3
  141. package/dist/{layout-SW3XWYKC.js → layout-ROAVGBUC.js} +1 -1
  142. package/dist/{layout-XUW444O5.js → layout-T2DQ4M77.js} +8 -4
  143. package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
  144. package/dist/{layout-DXVAYF6W.js → layout-VRJ5YFUE.js} +2 -2
  145. package/dist/{layout-ZP7XYVXF.js → layout-YKGQRFDM.js} +2 -4
  146. package/dist/layout-search-L75YOBME.js +42 -0
  147. package/dist/{palettes-WZAIQTEG.js → palettes-WQHELGVQ.js} +2 -1
  148. package/dist/{parser-ZLKYDFI5.js → parser-2XCDVLSN.js} +3 -3
  149. package/dist/{parser-GZ3LVF72.js → parser-3MGA2MTM.js} +2 -2
  150. package/dist/{parser-NOANDFJ4.js → parser-4AR25MAS.js} +2 -2
  151. package/dist/{parser-GCCWMBTU.js → parser-4QNRCGU5.js} +5 -4
  152. package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
  153. package/dist/{parser-WEVTMBJ5.js → parser-6NSQLPTS.js} +3 -3
  154. package/dist/{parser-KYPP2DX6.js → parser-6X4GGH2R.js} +4 -4
  155. package/dist/parser-AL6YL7KM.js +12 -0
  156. package/dist/{parser-5655XSOR.js → parser-D6YRVV75.js} +3 -3
  157. package/dist/{parser-NGHQQGD2.js → parser-EY3VJWBE.js} +3 -3
  158. package/dist/{parser-TL3JA4RI.js → parser-EYF4ZSZO.js} +3 -3
  159. package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
  160. package/dist/{parser-JOOAVBJI.js → parser-H2DJEAPG.js} +3 -3
  161. package/dist/{parser-AKBVJHMK.js → parser-ILWAA3QJ.js} +3 -3
  162. package/dist/{parser-AN3MGHRL.js → parser-KMFMNZYI.js} +3 -3
  163. package/dist/{parser-IMM2JJX3.js → parser-MDSVVCJP.js} +4 -4
  164. package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
  165. package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
  166. package/dist/{parser-DGF3ZEO6.js → parser-QL4DEPVA.js} +4 -4
  167. package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
  168. package/dist/{parser-GEKPWSSK.js → parser-UEDPLM46.js} +3 -3
  169. package/dist/{parser-KZMALSB2.js → parser-UL6WN6W5.js} +4 -4
  170. package/dist/{parser-J4DVNL4W.js → parser-ULSUK36C.js} +4 -4
  171. package/dist/{parser-KZMJNKDW.js → parser-UY3K4ROB.js} +2 -2
  172. package/dist/{parser-KFYRTGTC.js → parser-UYQNNQKT.js} +4 -4
  173. package/dist/{parser-DHSFIUPU.js → parser-VG747VR6.js} +3 -3
  174. package/dist/{parser-UTXFJG4X.js → parser-VK4PNDX4.js} +3 -3
  175. package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
  176. package/dist/{parser-NPXPJHWN.js → parser-X5FQ36KJ.js} +3 -3
  177. package/dist/{parser-OKB64MMN.js → parser-XO5IAXMT.js} +3 -3
  178. package/dist/{parser-HCGXNHHL.js → parser-YVHO2NRM.js} +3 -3
  179. package/dist/{parser-P4TOQYNN.js → parser-YWZGIU3C.js} +3 -3
  180. package/dist/{parser-337TACHB.js → parser-ZFLSULFC.js} +3 -3
  181. package/dist/{parser-7OEE7QT6.js → parser-ZR7JAKSW.js} +2 -2
  182. package/dist/{renderer-CHQZES6G.js → renderer-3N64GVNM.js} +2 -2
  183. package/dist/{renderer-JR2XNZAH.js → renderer-43IVPARP.js} +5 -5
  184. package/dist/{renderer-J4OS77PK.js → renderer-4MEZYGU6.js} +3 -3
  185. package/dist/{renderer-IR5GGAPB.js → renderer-54GXA3UO.js} +11 -7
  186. package/dist/{renderer-7VQOKAII.js → renderer-7EAWN7MC.js} +6 -6
  187. package/dist/{renderer-QQHQY3GT.js → renderer-7SEXPBGM.js} +5 -5
  188. package/dist/{renderer-P4XCRNCY.js → renderer-B7B7BQM3.js} +9 -9
  189. package/dist/{renderer-7HOSI6JJ.js → renderer-I2LYSQBV.js} +4 -4
  190. package/dist/{renderer-6OQM32X3.js → renderer-IPDCAACY.js} +3 -3
  191. package/dist/{renderer-JRVY7HAD.js → renderer-J2LOMTBC.js} +4 -4
  192. package/dist/renderer-JUH6M3XF.js +46 -0
  193. package/dist/renderer-KY6O5JTX.js +80 -0
  194. package/dist/{renderer-FCXRDYSJ.js → renderer-LHTDI5RV.js} +7 -7
  195. package/dist/{renderer-XHEMXBQM.js → renderer-LWL3IJOF.js} +5 -5
  196. package/dist/{renderer-BLHN3RCY.js → renderer-MRMFYYZT.js} +2 -2
  197. package/dist/{renderer-DBNDLKPE.js → renderer-NCIDGJ2R.js} +7 -7
  198. package/dist/{renderer-3AD4NDF5.js → renderer-OPA4JJKX.js} +6 -6
  199. package/dist/{renderer-XFEZ5UBE.js → renderer-QMNC7TGN.js} +6 -6
  200. package/dist/{renderer-5GZNGZU5.js → renderer-QQNPJGAP.js} +9 -7
  201. package/dist/{renderer-CEIX5JPA.js → renderer-R7OYCJEA.js} +2 -2
  202. package/dist/{renderer-WQ654YT5.js → renderer-R7RK7FKI.js} +1 -1
  203. package/dist/{renderer-4JE5ORRO.js → renderer-RFP55AW7.js} +13 -10
  204. package/dist/{renderer-NAA7D33G.js → renderer-S3NFBJCY.js} +15 -11
  205. package/dist/{renderer-43ESBXVY.js → renderer-SD4ZHHAR.js} +8 -6
  206. package/dist/{renderer-WB75JME5.js → renderer-SE7Z5AOL.js} +6 -6
  207. package/dist/{renderer-YTEZK3GC.js → renderer-T2WUA7MC.js} +7 -7
  208. package/dist/{renderer-VYWCMRWA.js → renderer-TWKEZ3DD.js} +5 -5
  209. package/dist/{renderer-DCJ4AQ3N.js → renderer-U5PD72G7.js} +5 -5
  210. package/dist/{renderer-EAORWLVK.js → renderer-VCTKBUTR.js} +7 -7
  211. package/dist/{renderer-7L7J4DHO.js → renderer-VNZTWATB.js} +7 -6
  212. package/dist/{renderer-2ZQ6DPVD.js → renderer-YDNWK6RI.js} +2 -2
  213. package/dist/{renderer-VGQMJC5K.js → renderer-YDOWBIUB.js} +11 -10
  214. package/dist/{renderer-7MCC6GKH.js → renderer-YQPZ7O2C.js} +2 -2
  215. package/dist/{renderer-ZXQXRNDR.js → renderer-ZQ77CM6Y.js} +6 -6
  216. package/dist/{renderer-radial-NA5DVBG4.js → renderer-radial-TNNEL3YN.js} +5 -5
  217. package/dist/{resolver-XSXE2TRX.js → resolver-6DJLZF6Y.js} +1 -1
  218. package/dist/{state-parser-FE3RF6XY.js → state-parser-NIIVOU2Y.js} +4 -4
  219. package/dist/{state-renderer-4S2C2CHB.js → state-renderer-TVLEG32M.js} +14 -10
  220. package/dist/{themes-CzuBdx1T.d.ts → themes-Cm2YBcT8.d.ts} +38 -2
  221. package/docs/ai-integration.md +4 -3
  222. package/docs/language-reference.md +162 -12
  223. package/gallery/fixtures/sketch.dgmo +2 -2
  224. package/gallery/fixtures/whiteboard.dgmo +18 -0
  225. package/package.json +2 -1
  226. package/dist/chunk-6EK55ART.js +0 -116
  227. package/dist/chunk-HTNLLT34.js +0 -72
  228. package/dist/dgmo-router-7WANZOBD.js +0 -92
  229. package/dist/renderer-TJJGFQGT.js +0 -78
  230. package/dist/{chunk-3FCSOYN4.js → chunk-5P2L5QXE.js} +0 -0
  231. package/dist/{chunk-HJRP6PXL.js → chunk-BQVTV4LB.js} +0 -0
  232. package/dist/{chunk-LYRDIVSY.js → chunk-GLCMUTO5.js} +0 -0
  233. package/dist/{chunk-5LE2CTLS.js → chunk-NTJ5HVV6.js} +3 -3
@@ -11,7 +11,7 @@ import {
11
11
  getSimpleChartLegendGroups,
12
12
  parseChart,
13
13
  parseExtendedChart
14
- } from "./chunk-7UDAIP6W.js";
14
+ } from "./chunk-HFG7KQOY.js";
15
15
  import {
16
16
  EMPHASIS_DIM_OPACITY,
17
17
  EMPHASIS_DIM_TEXT_OPACITY,
@@ -25,25 +25,25 @@ import {
25
25
  initD3Chart,
26
26
  renderChartTitle,
27
27
  resolveExportPalette
28
- } from "./chunk-UKJLPA7R.js";
28
+ } from "./chunk-X6IZP2BD.js";
29
29
  import {
30
30
  layoutInlineHeader
31
31
  } from "./chunk-CNUN5GO6.js";
32
+ import {
33
+ computeLegendLayout
34
+ } from "./chunk-NS7L7YKH.js";
32
35
  import {
33
36
  TITLE_FONT_SIZE,
34
37
  TITLE_FONT_WEIGHT,
35
38
  TITLE_OFFSET,
36
39
  TITLE_Y
37
40
  } from "./chunk-VLC6WNRD.js";
38
- import {
39
- computeLegendLayout
40
- } from "./chunk-NS7L7YKH.js";
41
41
  import {
42
42
  FONT_FAMILY
43
43
  } from "./chunk-ICLB27PZ.js";
44
44
  import {
45
45
  tagAttrKey
46
- } from "./chunk-L5AFONQU.js";
46
+ } from "./chunk-QKJ6MQXW.js";
47
47
  import {
48
48
  LEGEND_DOT_R,
49
49
  LEGEND_ENTRY_FONT_SIZE,
@@ -52,7 +52,8 @@ import {
52
52
  legendChromeColors
53
53
  } from "./chunk-I6GGMCTV.js";
54
54
  import {
55
- measureText
55
+ measureText,
56
+ truncateText
56
57
  } from "./chunk-KAO7JL4I.js";
57
58
  import {
58
59
  contrastText,
@@ -418,6 +419,27 @@ function planCategoryLabels(labels, slot, font = TICK_FONT) {
418
419
  keep: all(stride)
419
420
  };
420
421
  }
422
+ function rotatedLeftReach(first, plan, font) {
423
+ if (!plan.rotate || first === void 0) return 0;
424
+ const rad = LABEL_ROTATE_DEG * Math.PI / 180;
425
+ return measureText(first, font) * Math.cos(rad) + font * 0.8 * Math.sin(rad);
426
+ }
427
+ function planLabelsFitLeft(labels, mLeft0, plotWFor, slotFor, firstOffset, font = TICK_FONT) {
428
+ const EDGE = 4;
429
+ let mLeft = mLeft0;
430
+ let plotW = plotWFor(mLeft);
431
+ let plan = planCategoryLabels(labels, slotFor(plotW), font);
432
+ for (let i = 0; i < 6; i++) {
433
+ const reach = rotatedLeftReach(labels[0], plan, font);
434
+ const need = Math.ceil(reach + EDGE - firstOffset(plotW));
435
+ const next = Math.max(mLeft0, need);
436
+ if (next === mLeft) break;
437
+ mLeft = next;
438
+ plotW = plotWFor(mLeft);
439
+ plan = planCategoryLabels(labels, slotFor(plotW), font);
440
+ }
441
+ return { mLeft, plotW, plan };
442
+ }
421
443
  function labelSurvives(plan, i) {
422
444
  return plan.keep.has(i);
423
445
  }
@@ -485,12 +507,19 @@ function renderBar(svg, chart, width, height, colors, palette, isDark, textColor
485
507
  const loVal = Math.min(0, minVal);
486
508
  const niceMax = hiVal === 0 && loVal === 0 ? 1 : hiVal;
487
509
  const leftLabels = horizontal ? data.map((d) => d.label) : [fmtNum(niceMax), fmtNum(niceMax / 2), fmtNum(loVal), fmtNum(loVal / 2)];
488
- const mLeft = computeLeftMargin(chart.ylabel, leftLabels);
489
- const plotW = width - mLeft - 32;
490
- const labelPlan = planCategoryLabels(
491
- data.map((d) => d.label),
492
- horizontal || data.length === 0 ? Infinity : plotW / data.length
510
+ const mLeft0 = computeLeftMargin(chart.ylabel, leftLabels);
511
+ const catLabels = data.map((d) => d.label);
512
+ const fit = horizontal ? null : planLabelsFitLeft(
513
+ catLabels,
514
+ mLeft0,
515
+ (ml) => width - ml - 32,
516
+ (pw) => data.length === 0 ? Infinity : pw / data.length,
517
+ // scaleBand padding 0.3: first centre sits 0.65 steps in
518
+ (pw) => pw / (data.length + 0.3) * 0.65
493
519
  );
520
+ const mLeft = fit ? fit.mLeft : mLeft0;
521
+ const plotW = fit ? fit.plotW : width - mLeft - 32;
522
+ const labelPlan = fit?.plan ?? planCategoryLabels(catLabels, Infinity);
494
523
  const m = {
495
524
  top: top + 8,
496
525
  right: 32,
@@ -719,13 +748,18 @@ function renderLine(svg, chart, width, height, colors, palette, isDark, textColo
719
748
  };
720
749
  const [loL, hiL] = extentFor("left");
721
750
  const [loR, hiR] = dual ? extentFor("right") : [0, 1];
722
- const mLeft = computeLeftMargin(chart.ylabel, [fmtNum(hiL), fmtNum(loL)]);
723
751
  const mRight = dual ? computeLeftMargin(chart.yrlabel, [fmtNum(hiR), fmtNum(loR)]) : 32;
724
- const plotW = width - mLeft - mRight;
725
- const labelPlan = planCategoryLabels(
752
+ const mLeft0 = computeLeftMargin(chart.ylabel, [fmtNum(hiL), fmtNum(loL)]);
753
+ const fit = planLabelsFitLeft(
726
754
  data.map((d) => d.label),
727
- data.length > 0 ? plotW / data.length : plotW
755
+ mLeft0,
756
+ (ml) => width - ml - mRight,
757
+ (pw) => data.length > 0 ? pw / data.length : pw,
758
+ (pw) => (data.length > 0 ? pw / data.length : pw) * 0.5
728
759
  );
760
+ const mLeft = fit.mLeft;
761
+ const plotW = fit.plotW;
762
+ const labelPlan = fit.plan;
729
763
  const m = {
730
764
  top: top + 8,
731
765
  right: mRight,
@@ -1481,6 +1515,11 @@ function renderScatter(svg, chart, width, height, colors, palette, isDark, textC
1481
1515
  // src/charts-d3/sankey.ts
1482
1516
  var NODE_W = 20;
1483
1517
  var NODE_GAP = 14;
1518
+ var LOOP_GAP = 8;
1519
+ var LOOP_BEND = 1.25;
1520
+ var LABEL_FONT3 = 13;
1521
+ var LABEL_PAD = 6;
1522
+ var MAX_LABEL_MARGIN = 0.4;
1484
1523
  var RIBBON_FILL_OPACITY = 0.6;
1485
1524
  function renderSankey(svg, chart, width, height, colors, bgColor, textColor, topInset) {
1486
1525
  const links = chart.links ?? [];
@@ -1519,9 +1558,31 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1519
1558
  raw: chart.nodeColors?.[name] ?? colors[i % colors.length]
1520
1559
  })
1521
1560
  );
1561
+ const outgoing = /* @__PURE__ */ new Map();
1562
+ for (const l of links) {
1563
+ const list = outgoing.get(l.source) ?? [];
1564
+ list.push(l);
1565
+ outgoing.set(l.source, list);
1566
+ }
1567
+ const backEdges = /* @__PURE__ */ new Set();
1568
+ const visitState = /* @__PURE__ */ new Map();
1569
+ const visit = (name) => {
1570
+ visitState.set(name, "open");
1571
+ for (const l of outgoing.get(name) ?? []) {
1572
+ const st = visitState.get(l.target);
1573
+ if (st === "open") backEdges.add(l);
1574
+ else if (st === void 0) visit(l.target);
1575
+ }
1576
+ visitState.set(name, "done");
1577
+ };
1578
+ const hasIncoming = new Set(links.map((l) => l.target));
1579
+ for (const name of names) if (!hasIncoming.has(name)) visit(name);
1580
+ for (const name of names) if (!visitState.has(name)) visit(name);
1581
+ const forwardLinks = links.filter((l) => !backEdges.has(l));
1582
+ const backLinks = links.filter((l) => backEdges.has(l));
1522
1583
  for (let pass = 0; pass < names.length; pass++) {
1523
1584
  let changed = false;
1524
- for (const l of links) {
1585
+ for (const l of forwardLinks) {
1525
1586
  const s = node.get(l.source);
1526
1587
  const t = node.get(l.target);
1527
1588
  if (t.rank < s.rank + 1) {
@@ -1539,17 +1600,44 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1539
1600
  const maxRank = Math.max(...[...node.values()].map((n) => n.rank));
1540
1601
  const layers = Array.from({ length: maxRank + 1 }, () => []);
1541
1602
  for (const n of node.values()) layers[n.rank].push(n);
1542
- const plotLeft = 16;
1603
+ let plotLeft = 16;
1543
1604
  const top = topInset + 8;
1544
- const plotW = width - plotLeft - 16 - measureText("M", 14);
1545
- const plotH = height - top - 24;
1546
- let valueScale = Infinity;
1547
- for (const layer of layers) {
1548
- const tot = layer.reduce((a, n) => a + n.value, 0);
1549
- const avail = plotH - (layer.length - 1) * NODE_GAP;
1550
- if (tot > 0) valueScale = Math.min(valueScale, avail / tot);
1551
- }
1552
- if (!isFinite(valueScale)) valueScale = 1;
1605
+ const rightPad = 16;
1606
+ let plotH = height - top - 24;
1607
+ const fitScale = (h) => {
1608
+ let scale = Infinity;
1609
+ for (const layer of layers) {
1610
+ const tot = layer.reduce((a, n) => a + n.value, 0);
1611
+ const avail = h - (layer.length - 1) * NODE_GAP;
1612
+ if (tot > 0) scale = Math.min(scale, avail / tot);
1613
+ }
1614
+ return isFinite(scale) && scale > 0 ? scale : 1;
1615
+ };
1616
+ let valueScale = fitScale(plotH);
1617
+ if (backLinks.length > 0) {
1618
+ const backTotal = backLinks.reduce((a, l) => a + l.value, 0);
1619
+ const reserve = backTotal * valueScale + LOOP_GAP * (backLinks.length + 1);
1620
+ plotH = Math.max(plotH * 0.5, plotH - reserve);
1621
+ valueScale = fitScale(plotH);
1622
+ }
1623
+ const bend = /* @__PURE__ */ new Map();
1624
+ let leftBend = 0;
1625
+ for (const l of backLinks) {
1626
+ const over = l.value * valueScale * LOOP_BEND;
1627
+ bend.set(l.source, Math.max(bend.get(l.source) ?? 0, over));
1628
+ if (node.get(l.target).rank === 0) leftBend = Math.max(leftBend, over);
1629
+ }
1630
+ plotLeft += leftBend;
1631
+ const labelOffset = (n) => NODE_W + (bend.get(n.name) ?? 0) + LABEL_PAD;
1632
+ let labelMargin = 0;
1633
+ for (const n of layers[maxRank]) {
1634
+ labelMargin = Math.max(
1635
+ labelMargin,
1636
+ labelOffset(n) - NODE_W + measureText(n.name, LABEL_FONT3)
1637
+ );
1638
+ }
1639
+ labelMargin = Math.min(labelMargin, width * MAX_LABEL_MARGIN);
1640
+ const plotW = Math.max(NODE_W, width - plotLeft - rightPad - labelMargin);
1553
1641
  const layerX = (r) => plotLeft + (maxRank === 0 ? 0 : r * (plotW - NODE_W) / maxRank);
1554
1642
  const placeLayer = (layer) => {
1555
1643
  layer.sort((a, b) => a.order - b.order);
@@ -1569,7 +1657,7 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1569
1657
  const order = forward ? [...layers.keys()] : [...layers.keys()].reverse();
1570
1658
  for (const r of order) {
1571
1659
  for (const n of layers[r]) {
1572
- const neigh = forward ? links.filter((l) => l.target === n.name).map((l) => node.get(l.source)) : links.filter((l) => l.source === n.name).map((l) => node.get(l.target));
1660
+ const neigh = forward ? forwardLinks.filter((l) => l.target === n.name).map((l) => node.get(l.source)) : forwardLinks.filter((l) => l.source === n.name).map((l) => node.get(l.target));
1573
1661
  n.order = neigh.length ? neigh.reduce((a, m) => a + center(m), 0) / neigh.length : center(n);
1574
1662
  }
1575
1663
  placeLayer(layers[r]);
@@ -1581,12 +1669,16 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1581
1669
  outOff.set(n.name, n.y);
1582
1670
  inOff.set(n.name, n.y);
1583
1671
  }
1584
- const ordered = [...links].sort((a, b) => {
1585
- const sa = node.get(a.source);
1586
- const sb = node.get(b.source);
1587
- if (sa.y !== sb.y) return sa.y - sb.y;
1588
- return node.get(a.target).y - node.get(b.target).y;
1589
- });
1672
+ const ordered = [
1673
+ ...[...forwardLinks].sort((a, b) => {
1674
+ const sa = node.get(a.source);
1675
+ const sb = node.get(b.source);
1676
+ if (sa.y !== sb.y) return sa.y - sb.y;
1677
+ return node.get(a.target).y - node.get(b.target).y;
1678
+ }),
1679
+ ...backLinks
1680
+ ];
1681
+ let laneY = top + plotH + LOOP_GAP;
1590
1682
  for (const l of ordered) {
1591
1683
  const s = node.get(l.source);
1592
1684
  const t = node.get(l.target);
@@ -1600,13 +1692,24 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1600
1692
  const cx0 = sx + (tx - sx) * 0.5;
1601
1693
  const raw = l.color ?? s.raw;
1602
1694
  const color = solid ? raw : mix(raw, bgColor, 45);
1603
- const ribbon = svg.append("path").attr(
1604
- "d",
1605
- `M${sx},${sy} C${cx0},${sy} ${cx0},${ty} ${tx},${ty} L${tx},${ty + th} C${cx0},${ty + th} ${cx0},${sy + th} ${sx},${sy + th} Z`
1606
- ).attr("fill", color).attr(
1607
- "fill-opacity",
1608
- linkDimmed(l) ? RIBBON_FILL_OPACITY * EMPHASIS_DIM_OPACITY : RIBBON_FILL_OPACITY
1609
- );
1695
+ const opacity = linkDimmed(l) ? RIBBON_FILL_OPACITY * EMPHASIS_DIM_OPACITY : RIBBON_FILL_OPACITY;
1696
+ let ribbon;
1697
+ if (backEdges.has(l)) {
1698
+ const lane = laneY + th / 2;
1699
+ laneY += th + LOOP_GAP;
1700
+ const k = th;
1701
+ const y1 = sy + th / 2;
1702
+ const y2 = ty + th / 2;
1703
+ ribbon = svg.append("path").attr(
1704
+ "d",
1705
+ `M${sx},${y1} C${sx + k},${y1} ${sx + k},${lane} ${sx},${lane} L${tx},${lane} C${tx - k},${lane} ${tx - k},${y2} ${tx},${y2}`
1706
+ ).attr("fill", "none").attr("stroke", color).attr("stroke-width", th).attr("stroke-opacity", opacity);
1707
+ } else {
1708
+ ribbon = svg.append("path").attr(
1709
+ "d",
1710
+ `M${sx},${sy} C${cx0},${sy} ${cx0},${ty} ${tx},${ty} L${tx},${ty + th} C${cx0},${ty + th} ${cx0},${sy + th} ${sx},${sy + th} Z`
1711
+ ).attr("fill", color).attr("fill-opacity", opacity);
1712
+ }
1610
1713
  tagDatum(ribbon, {
1611
1714
  line: l.lineNumber,
1612
1715
  // U+241F (symbol-for-unit-separator) — collision-proof AND XML-legal;
@@ -1631,8 +1734,11 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1631
1734
  value: String(n.value),
1632
1735
  color: n.raw
1633
1736
  });
1634
- const lastLayer = n.rank === maxRank;
1635
- const label = svg.append("text").attr("x", lastLayer ? n.x - 6 : n.x + NODE_W + 6).attr("y", n.y + n.h / 2 + 4).attr("text-anchor", lastLayer ? "end" : "start").attr("fill", textColor).attr("font-size", 13).attr("font-family", FONT_FAMILY).text(n.name);
1737
+ const labelX = n.x + labelOffset(n);
1738
+ const room = (n.rank === maxRank ? width - rightPad / 2 : layerX(n.rank + 1)) - LABEL_PAD - labelX;
1739
+ const shown = truncateText(n.name, LABEL_FONT3, room);
1740
+ const label = svg.append("text").attr("x", labelX).attr("y", n.y + n.h / 2 + 4).attr("text-anchor", "start").attr("fill", textColor).attr("font-size", LABEL_FONT3).attr("font-family", FONT_FAMILY).text(shown);
1741
+ if (shown !== n.name) label.append("title").text(n.name);
1636
1742
  if (nodeDim) label.attr("opacity", EMPHASIS_DIM_TEXT_OPACITY);
1637
1743
  }
1638
1744
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  extractColor,
3
3
  measureIndent
4
- } from "./chunk-44GP7PD5.js";
4
+ } from "./chunk-MPJQMMBZ.js";
5
5
  import {
6
6
  makeDgmoError
7
7
  } from "./chunk-BYU54C3S.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-NOTA6TEI.js";
9
9
  import {
10
10
  peelQuotedName
11
- } from "./chunk-44GP7PD5.js";
11
+ } from "./chunk-MPJQMMBZ.js";
12
12
  import {
13
13
  makeDgmoError
14
14
  } from "./chunk-BYU54C3S.js";
@@ -213,9 +213,7 @@ function calculateSchedule(parsed) {
213
213
  breakCycle(nextCycle, taskMap, depOffsetMap);
214
214
  sortedIds = topologicalSort(taskMap);
215
215
  }
216
- if (!sortedIds) {
217
- sortedIds = [...taskMap.keys()];
218
- }
216
+ sortedIds ??= [...taskMap.keys()];
219
217
  }
220
218
  for (const taskId of sortedIds) {
221
219
  const node = taskMap.get(taskId);
@@ -5,7 +5,7 @@ import {
5
5
  splitNameAndMeta,
6
6
  tryParseSharedOption,
7
7
  warnUnknownMetaKeys
8
- } from "./chunk-44GP7PD5.js";
8
+ } from "./chunk-MPJQMMBZ.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail
@@ -196,7 +196,7 @@ function layoutFamily(parsed, focusId) {
196
196
  const persons = focused ? focused.persons : parsed.persons;
197
197
  const unions = (focused ? focused.unions : parsed.unions).map((u) => ({ ...u, children: sortChildrenByBirth(u.children, persons) }));
198
198
  const focusParents = focused ? focused.parents : [];
199
- const highlightId = parsed.options["highlight"] || null;
199
+ const highlightId = parsed.options["highlight"] ?? null;
200
200
  const litSet = highlightId ? computeBloodline(unions, highlightId) : null;
201
201
  const showGen = parsed.options["generations"] === "true";
202
202
  const ANCESTOR_STAGGER = 20;
@@ -9,10 +9,10 @@ import {
9
9
  injectDefaultTagMetadata,
10
10
  resolveTagColor,
11
11
  tagAttrKey
12
- } from "./chunk-L5AFONQU.js";
12
+ } from "./chunk-QKJ6MQXW.js";
13
13
  import {
14
14
  legendSuppressed
15
- } from "./chunk-44GP7PD5.js";
15
+ } from "./chunk-MPJQMMBZ.js";
16
16
  import {
17
17
  LEGEND_CAPSULE_PAD,
18
18
  LEGEND_DOT_R,