@diagrammo/dgmo 0.96.0 → 0.97.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 (261) hide show
  1. package/dist/advanced.d.ts +172 -8
  2. package/dist/advanced.js +225 -243
  3. package/dist/block.d.ts +8 -0
  4. package/dist/block.js +138 -66
  5. package/dist/{calculator-GIB7POFX.js → calculator-CIGGTURF.js} +2 -2
  6. package/dist/{chart-meta-uImk4eTn.d.ts → chart-meta-B7niEd52.d.ts} +3 -1
  7. package/dist/chart-meta.d.ts +2 -2
  8. package/dist/chart-meta.js +19 -19
  9. package/dist/{chart-types-CBVYiLqy.d.ts → chart-types-Dxtv4XSz.d.ts} +3 -0
  10. package/dist/{charts-d3-IRP5VANE.js → charts-d3-INWEGMSD.js} +14 -14
  11. package/dist/{chunk-MVUNMJKO.js → chunk-2FMOLWX4.js} +71 -57
  12. package/dist/{chunk-2BYFNZVM.js → chunk-2SZILMQT.js} +57 -15
  13. package/dist/{chunk-VLI6AWS3.js → chunk-3C4OXVZJ.js} +2 -2
  14. package/dist/{chunk-OO4GUE4E.js → chunk-3HL6NSSQ.js} +63 -18
  15. package/dist/{chunk-RGFVHYDP.js → chunk-3IUMSK72.js} +2 -2
  16. package/dist/{chunk-LRHPBWOY.js → chunk-44RLIAYC.js} +17 -10
  17. package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
  18. package/dist/{chunk-FHX373L5.js → chunk-47INRTZ6.js} +2 -2
  19. package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
  20. package/dist/{chunk-HH3DHNQA.js → chunk-4TK26YHH.js} +2 -2
  21. package/dist/{chunk-5LG526X7.js → chunk-5TGZBHEJ.js} +1 -1
  22. package/dist/{chunk-BD4O4D2A.js → chunk-5WZYJC2P.js} +2 -2
  23. package/dist/{chunk-DPNSDCR3.js → chunk-65JFUANT.js} +1 -1
  24. package/dist/{chunk-EZ6BI5LL.js → chunk-6OUMYNAJ.js} +1 -1
  25. package/dist/{chunk-U6N547QA.js → chunk-6PUBFB6D.js} +24 -3
  26. package/dist/{chunk-5GU6C5WB.js → chunk-6S2H6EKN.js} +3 -3
  27. package/dist/{chunk-OYGJZA24.js → chunk-6SDEXSJY.js} +39 -19
  28. package/dist/{chunk-IKXQ6NVR.js → chunk-6YBZFOTA.js} +13 -13
  29. package/dist/{chunk-4B45SNZH.js → chunk-74XR7Z3I.js} +13 -13
  30. package/dist/{chunk-VNAPEZX2.js → chunk-7ASVGFW3.js} +1 -1
  31. package/dist/{chunk-RTRORHSP.js → chunk-7QKWU7FX.js} +3 -3
  32. package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
  33. package/dist/{chunk-5G4DOOX2.js → chunk-7TEAFIEJ.js} +9 -5
  34. package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
  35. package/dist/{chunk-VJ7NLYFE.js → chunk-A5LFM62B.js} +3 -3
  36. package/dist/{chunk-P3PSLC2K.js → chunk-AULFF7L2.js} +2 -2
  37. package/dist/{chunk-SCYVGPLI.js → chunk-B7ZH5EQ2.js} +2 -2
  38. package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
  39. package/dist/{chunk-B2YVZ3QU.js → chunk-CGP7RGLJ.js} +1 -1
  40. package/dist/{chunk-67N26CER.js → chunk-CLW45YKE.js} +2 -1
  41. package/dist/{chunk-THTYCJGF.js → chunk-CUOMNKYW.js} +4 -4
  42. package/dist/{chunk-34JOHSVE.js → chunk-CUTEHGXO.js} +2 -2
  43. package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
  44. package/dist/{chunk-DKCVAQU3.js → chunk-D7KZE2XJ.js} +39 -17
  45. package/dist/{chunk-PGD6CNWO.js → chunk-DFEVFLEG.js} +3 -3
  46. package/dist/{chunk-VVTCUIPN.js → chunk-DKMZ4VMV.js} +1 -1
  47. package/dist/{chunk-H7JVKUA5.js → chunk-DRY4W4W6.js} +36 -15
  48. package/dist/{chunk-IQZSKWE5.js → chunk-E6GHXMH2.js} +8 -8
  49. package/dist/{chunk-I2I2FKAK.js → chunk-EBJLT7PH.js} +1 -1
  50. package/dist/{chunk-GEHK4UD5.js → chunk-EEIGHOJR.js} +92 -23
  51. package/dist/{chunk-FKJWZWNU.js → chunk-EUPUVYWO.js} +1 -1
  52. package/dist/{chunk-3W73ZP6W.js → chunk-F2OAZHOX.js} +3 -3
  53. package/dist/{chunk-IU7XKZA6.js → chunk-FK6HZYGK.js} +4 -14
  54. package/dist/{chunk-2M3K6GD2.js → chunk-FTW2E2YH.js} +6 -6
  55. package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
  56. package/dist/chunk-G24NSISJ.js +69 -0
  57. package/dist/{chunk-5H7SA5ZD.js → chunk-GFQFLLP3.js} +2 -2
  58. package/dist/{chunk-BUVLLK3D.js → chunk-GLLYHYGT.js} +27 -17
  59. package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
  60. package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
  61. package/dist/{chunk-7UWVHNPM.js → chunk-H242TVAE.js} +9 -9
  62. package/dist/{chunk-M4ZUIW3J.js → chunk-H7DZYHQF.js} +3 -3
  63. package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
  64. package/dist/{chunk-H7RQG4PH.js → chunk-IAM3IDL4.js} +2 -2
  65. package/dist/{chunk-WTPS73RM.js → chunk-II6D6NWX.js} +8 -8
  66. package/dist/{chunk-5ARANBIE.js → chunk-IUFTAFGN.js} +2 -2
  67. package/dist/{chunk-AQRSEQZV.js → chunk-IZEKHIV6.js} +3 -3
  68. package/dist/{chunk-WGNP5ND2.js → chunk-J3YM6RA5.js} +3 -3
  69. package/dist/{chunk-YFIUABSF.js → chunk-J467QBZF.js} +23 -3
  70. package/dist/{chunk-CD7VQCDL.js → chunk-J7JF4QKA.js} +40 -30
  71. package/dist/{chunk-MYHR3PMH.js → chunk-JULBDTNU.js} +7 -7
  72. package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
  73. package/dist/{chunk-YVIPJGFG.js → chunk-KMB754DO.js} +33 -6
  74. package/dist/chunk-KNKZGRRB.js +439 -0
  75. package/dist/{chunk-SIABEREK.js → chunk-KTGJQJB3.js} +2 -2
  76. package/dist/{chunk-LGUFJ7Y2.js → chunk-KW3CC7SB.js} +1 -1
  77. package/dist/{chunk-ITDF3MWD.js → chunk-L3K5O3Z5.js} +3 -3
  78. package/dist/chunk-LRTSTDJ6.js +126 -0
  79. package/dist/{chunk-NI4L6HEU.js → chunk-LZATSXAA.js} +1 -1
  80. package/dist/{chunk-RVOSA4RR.js → chunk-MJ725XHD.js} +441 -267
  81. package/dist/{chunk-EPB3UEMD.js → chunk-NBISN6FH.js} +2 -2
  82. package/dist/{chunk-IZFJZCF6.js → chunk-NN5RUHXV.js} +84 -16
  83. package/dist/{chunk-KDWEOT54.js → chunk-NOZMRPXI.js} +96 -153
  84. package/dist/{chunk-EM5SA7NC.js → chunk-NQFZ7LXC.js} +4 -4
  85. package/dist/chunk-NTDWVTEY.js +12 -0
  86. package/dist/{chunk-AUXUNV73.js → chunk-O3HRF25Z.js} +1 -1
  87. package/dist/{chunk-GLL237AP.js → chunk-OSSA5UWA.js} +3 -3
  88. package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
  89. package/dist/{chunk-QEU6VM4O.js → chunk-PLQZJZ2K.js} +1 -1
  90. package/dist/chunk-PRG7NIUU.js +272 -0
  91. package/dist/{chunk-MAYTYF5S.js → chunk-PSNRB75I.js} +3 -3
  92. package/dist/{chunk-B5CEV7IR.js → chunk-PT5VFY3B.js} +38 -14
  93. package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
  94. package/dist/{chunk-B7BSRVNC.js → chunk-PZ5LAAO3.js} +2 -2
  95. package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
  96. package/dist/{chunk-TUOZ6AXC.js → chunk-Q6V342WS.js} +16 -4
  97. package/dist/{chunk-ZOKD5F7M.js → chunk-QDPTOIG7.js} +5 -5
  98. package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
  99. package/dist/{chunk-K2WXMXI2.js → chunk-QLIZ7SB7.js} +1 -1
  100. package/dist/chunk-QLNLRZ37.js +181 -0
  101. package/dist/{chunk-P6LKX3IQ.js → chunk-QOLRTPGH.js} +6 -6
  102. package/dist/{chunk-FBK32S4D.js → chunk-R4SXMBGF.js} +1 -1
  103. package/dist/chunk-R4U7IIRX.js +178 -0
  104. package/dist/{chunk-DWMQ24JR.js → chunk-RC6PISCK.js} +4 -2
  105. package/dist/{chunk-R5L5E3TC.js → chunk-REKLKGR6.js} +3 -3
  106. package/dist/{chunk-FUYEXLAN.js → chunk-RFGQDIOI.js} +837 -220
  107. package/dist/{chunk-W5MMPPGX.js → chunk-ROFSIFSY.js} +4 -4
  108. package/dist/{chunk-JCC3B2GS.js → chunk-ROH4LYBL.js} +65 -21
  109. package/dist/{chunk-OAZ6BIIB.js → chunk-SNDCXT5R.js} +9 -7
  110. package/dist/{chunk-JRN2CRXJ.js → chunk-TDUBTDXS.js} +1 -1
  111. package/dist/{chunk-GM2SLMQW.js → chunk-TMB4YY3J.js} +34 -4
  112. package/dist/{chunk-ZBOIYC2G.js → chunk-V3ICBS2O.js} +5 -5
  113. package/dist/{chunk-HZX4QZGR.js → chunk-V65EDV6S.js} +3 -3
  114. package/dist/{chunk-67RKJEKF.js → chunk-VKT3BVRO.js} +35 -11
  115. package/dist/{chunk-5BG4OSWJ.js → chunk-VOO65FKC.js} +12 -12
  116. package/dist/{chunk-KQAPFIYF.js → chunk-VQWLASDC.js} +2 -2
  117. package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
  118. package/dist/{chunk-D7DGLJ7N.js → chunk-VVZDBUHA.js} +2 -2
  119. package/dist/{chunk-JBAFAKGX.js → chunk-W46OMHOK.js} +23 -27
  120. package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
  121. package/dist/{chunk-P2GNNEMN.js → chunk-WPYJAHRP.js} +1 -1
  122. package/dist/{chunk-TPCP2UOI.js → chunk-WXGFB2O2.js} +3 -3
  123. package/dist/{chunk-RIK6WUMO.js → chunk-XCYGOCMS.js} +43 -26
  124. package/dist/{chunk-I3ZRIMR7.js → chunk-XEMCNQQW.js} +15 -15
  125. package/dist/{chunk-PWZEJNO6.js → chunk-XMUFXJI2.js} +6 -6
  126. package/dist/{chunk-EMGNCG5C.js → chunk-XZGXVN4T.js} +5 -5
  127. package/dist/{chunk-WLGOIMTI.js → chunk-YCIBBVI2.js} +2 -2
  128. package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
  129. package/dist/{chunk-K2SFH3GJ.js → chunk-YFWIFKRQ.js} +3 -3
  130. package/dist/{chunk-6XLMTAEX.js → chunk-YIHRLY55.js} +33 -6
  131. package/dist/{chunk-CYRB2JTN.js → chunk-YLKPRT6U.js} +1 -1
  132. package/dist/{chunk-KMU65FYM.js → chunk-YSDSFXQD.js} +1 -1
  133. package/dist/{chunk-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
  134. package/dist/{chunk-TIPNNOZC.js → chunk-ZCKVTZHD.js} +41 -19
  135. package/dist/{chunk-YSGOXZBB.js → chunk-ZMVMGZAJ.js} +1 -1
  136. package/dist/{chunk-CP73WWLN.js → chunk-ZRW4B4KF.js} +48 -14
  137. package/dist/{chunk-O2HNVNKO.js → chunk-ZTKO2RD4.js} +5 -5
  138. package/dist/collapse-6IGH2B24.js +31 -0
  139. package/dist/collapse-GOWNCVHZ.js +7 -0
  140. package/dist/collapse-HNTPLB2Q.js +11 -0
  141. package/dist/collapse-NUM7DPJA.js +10 -0
  142. package/dist/completion-registry.js +27 -4
  143. package/dist/dgmo-router-RSYWR5IS.js +101 -0
  144. package/dist/dimensions-KXAI7U2B.js +21 -0
  145. package/dist/editor.js +882 -215
  146. package/dist/{flowchart-parser-SM5LHF2D.js → flowchart-parser-UI5VZNGJ.js} +5 -5
  147. package/dist/{flowchart-renderer-PPS2GTTD.js → flowchart-renderer-IYWPKPCF.js} +18 -18
  148. package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
  149. package/dist/highlight.js +883 -216
  150. package/dist/index.d.ts +52 -5
  151. package/dist/index.js +79 -63
  152. package/dist/{layout-AF4KA5B2.js → layout-6VY3DHYD.js} +6 -6
  153. package/dist/{layout-FCFUVCRI.js → layout-7C2QZCEZ.js} +10 -10
  154. package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
  155. package/dist/layout-BSK374N6.js +11 -0
  156. package/dist/{layout-R6G4MEO3.js → layout-FJDBY3WG.js} +5 -5
  157. package/dist/{layout-KELSNWBD.js → layout-G3RVKEC4.js} +10 -10
  158. package/dist/{layout-H2KP5A6M.js → layout-GC5XX2RH.js} +2 -2
  159. package/dist/{layout-LNVIH45F.js → layout-R6ULGQJK.js} +6 -6
  160. package/dist/{layout-PPIVGJXD.js → layout-ROI5KVSO.js} +3 -3
  161. package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
  162. package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
  163. package/dist/{layout-MPSH3YWE.js → layout-WBH5IHYK.js} +10 -10
  164. package/dist/layout-WTHBGTH2.js +15 -0
  165. package/dist/layout-ZCCABSV7.js +15 -0
  166. package/dist/{layout-search-C2TYUH4L.js → layout-search-DSIDKKQO.js} +8 -8
  167. package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
  168. package/dist/{parser-DGLKH4NT.js → parser-3PMYAVFL.js} +2 -2
  169. package/dist/{parser-OHBBDCG4.js → parser-5KVFS4RN.js} +2 -2
  170. package/dist/{parser-UHKROC7Z.js → parser-BA43YPIQ.js} +3 -3
  171. package/dist/{parser-F75WNYMK.js → parser-CFAYEWLF.js} +3 -3
  172. package/dist/{parser-MWINQNQW.js → parser-DRFEX6OX.js} +3 -3
  173. package/dist/{parser-W6NX3AIV.js → parser-DWVBRBB2.js} +3 -3
  174. package/dist/{parser-6WURFLOB.js → parser-E4B7HJT2.js} +3 -3
  175. package/dist/{parser-DRUGM3R6.js → parser-FWQY3HJX.js} +2 -2
  176. package/dist/{parser-GBQY3WOZ.js → parser-GMCXCJSP.js} +3 -3
  177. package/dist/{parser-BPYHIG24.js → parser-IHFHPFL7.js} +3 -3
  178. package/dist/{parser-QWTECQEC.js → parser-IU6425JW.js} +6 -6
  179. package/dist/{parser-ZV756RMP.js → parser-IZYIXDJX.js} +6 -6
  180. package/dist/{parser-TTGZYLYD.js → parser-JQGUTDSX.js} +3 -3
  181. package/dist/{parser-BNRX35NT.js → parser-JRKPOO2Z.js} +3 -3
  182. package/dist/{parser-B7SCN7FG.js → parser-KI2XYB2R.js} +2 -2
  183. package/dist/parser-LDVVBP7S.js +12 -0
  184. package/dist/{parser-L7SI3PW4.js → parser-MAGFK6OK.js} +4 -4
  185. package/dist/{parser-722KLLAQ.js → parser-MH5BDN7X.js} +3 -3
  186. package/dist/{parser-5RUD4A3X.js → parser-MUHFEM4G.js} +3 -3
  187. package/dist/{parser-Y7QXD2UR.js → parser-P375HO7Q.js} +2 -2
  188. package/dist/{parser-LUJX7AXO.js → parser-PYY5BRLQ.js} +2 -2
  189. package/dist/parser-QEMFMVF5.js +12 -0
  190. package/dist/{parser-WIKXZP4X.js → parser-QIPDBT5M.js} +2 -2
  191. package/dist/{parser-2AXU2MHJ.js → parser-RNBDDEGL.js} +3 -3
  192. package/dist/{parser-4GHAYZKZ.js → parser-RSWZGQA7.js} +6 -6
  193. package/dist/{parser-H6HT2WFQ.js → parser-SGX2PVR5.js} +2 -2
  194. package/dist/{parser-ZWWQZ4XZ.js → parser-SJUEFKNM.js} +3 -3
  195. package/dist/{parser-4BOP77CD.js → parser-UMNBPXG2.js} +2 -2
  196. package/dist/{parser-GM5B2EPW.js → parser-WE4VSBBY.js} +3 -3
  197. package/dist/{parser-XEJP37GQ.js → parser-WKEYS7N3.js} +3 -3
  198. package/dist/{parser-DWV2CYBS.js → parser-WPXUUNA2.js} +3 -3
  199. package/dist/{parser-5HQPPVHJ.js → parser-XP3RCOTN.js} +3 -3
  200. package/dist/{parser-F3JJNIFC.js → parser-YV4RBHG7.js} +3 -3
  201. package/dist/{parser-CRJYLOHA.js → parser-YZ3J542U.js} +2 -2
  202. package/dist/{renderer-BYLQ37T2.js → renderer-2V5NVI3V.js} +15 -15
  203. package/dist/renderer-4PKYVOYL.js +39 -0
  204. package/dist/{renderer-ONENGXFQ.js → renderer-66SCERH7.js} +14 -12
  205. package/dist/renderer-6IAXRZLK.js +85 -0
  206. package/dist/{renderer-GKY55M4Z.js → renderer-6O5SV5YE.js} +10 -10
  207. package/dist/{renderer-F7YGMEGQ.js → renderer-7OXMSF4R.js} +4 -4
  208. package/dist/{renderer-6HU44IGJ.js → renderer-A36NL2SS.js} +8 -8
  209. package/dist/{renderer-66NCRXSC.js → renderer-ASPBBACI.js} +13 -11
  210. package/dist/{renderer-5GP7YUS4.js → renderer-BXVTYE27.js} +7 -6
  211. package/dist/renderer-CC6O6GQK.js +18 -0
  212. package/dist/{renderer-VNJOZPSH.js → renderer-CNDB4JTZ.js} +17 -17
  213. package/dist/renderer-COV2DXTM.js +41 -0
  214. package/dist/renderer-DXCATVLO.js +30 -0
  215. package/dist/{renderer-VUXAAGUG.js → renderer-E5E3OJ42.js} +12 -11
  216. package/dist/{renderer-MGF2NNGG.js → renderer-E7LC7HCU.js} +5 -5
  217. package/dist/{renderer-PEJF6R2I.js → renderer-F3JYZERE.js} +4 -4
  218. package/dist/{renderer-CVCCW7UT.js → renderer-FAFSRFGR.js} +9 -9
  219. package/dist/renderer-HIB6LZWZ.js +26 -0
  220. package/dist/renderer-HLDRRFZB.js +28 -0
  221. package/dist/renderer-INQMQPNN.js +22 -0
  222. package/dist/renderer-ITJ67HXO.js +27 -0
  223. package/dist/{renderer-SYRH3B62.js → renderer-JLOKFKOZ.js} +14 -13
  224. package/dist/{renderer-LJPUCG3U.js → renderer-KOPJ76GS.js} +10 -10
  225. package/dist/{renderer-N6PM5CSG.js → renderer-M2467III.js} +14 -13
  226. package/dist/{renderer-MVBAQP3M.js → renderer-MYKL6VG6.js} +6 -6
  227. package/dist/{renderer-YJVQT7QG.js → renderer-S6L3JR6C.js} +11 -11
  228. package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
  229. package/dist/renderer-TCTZZ5Y6.js +32 -0
  230. package/dist/{renderer-D6EH5UQ6.js → renderer-UIHCYXBY.js} +12 -12
  231. package/dist/{renderer-QZJZIAT3.js → renderer-WIBVOPRC.js} +6 -4
  232. package/dist/{renderer-TS5NHOQD.js → renderer-XMJ6XZGL.js} +12 -11
  233. package/dist/{renderer-2V2XY2V7.js → renderer-ZTHXOBXW.js} +8 -8
  234. package/dist/{renderer-radial-4R7AKETK.js → renderer-radial-FC25BDCZ.js} +8 -8
  235. package/dist/{state-parser-EQBBEKHR.js → state-parser-2PQRH5JE.js} +6 -6
  236. package/dist/state-renderer-YP6HWLJR.js +43 -0
  237. package/dist/{themes-CbJL3w8L.d.ts → themes-DoLdhUXV.d.ts} +1 -1
  238. package/docs/ai-integration.md +4 -3
  239. package/docs/language-reference.md +99 -13
  240. package/gallery/fixtures/swot-relabel.dgmo +19 -0
  241. package/gallery/fixtures/swot-tags.dgmo +16 -0
  242. package/gallery/fixtures/swot.dgmo +13 -0
  243. package/package.json +1 -1
  244. package/dist/chunk-R2K5L4UA.js +0 -49
  245. package/dist/collapse-TCVK3RPO.js +0 -8
  246. package/dist/dgmo-router-EPBQKQW2.js +0 -100
  247. package/dist/dimensions-DBCRBZIU.js +0 -21
  248. package/dist/layout-3J72UULM.js +0 -15
  249. package/dist/layout-IXQNVRBE.js +0 -15
  250. package/dist/layout-VDCJOZSH.js +0 -11
  251. package/dist/parser-HM6FEX5K.js +0 -14
  252. package/dist/renderer-2MCV75JQ.js +0 -41
  253. package/dist/renderer-5AEDVLAA.js +0 -31
  254. package/dist/renderer-7C76HP5W.js +0 -30
  255. package/dist/renderer-7RAMBMTH.js +0 -22
  256. package/dist/renderer-E3334XLT.js +0 -84
  257. package/dist/renderer-LFZKG2GR.js +0 -26
  258. package/dist/renderer-MZIWP55B.js +0 -28
  259. package/dist/renderer-N75E3UVY.js +0 -25
  260. package/dist/renderer-VNUDN6F5.js +0 -39
  261. package/dist/state-renderer-SOGZ2CNN.js +0 -42
@@ -1,25 +1,23 @@
1
1
  import {
2
2
  layoutOrg
3
- } from "./chunk-O2HNVNKO.js";
4
- import {
5
- renderCollapseBar,
6
- renderNodeCard
7
- } from "./chunk-R2K5L4UA.js";
3
+ } from "./chunk-ZTKO2RD4.js";
8
4
  import {
9
5
  extractExportSvg,
10
6
  runInExportContainer
11
- } from "./chunk-TOHTKLKE.js";
7
+ } from "./chunk-Q5Q5JLRT.js";
12
8
  import {
13
9
  ScaleContext
14
10
  } from "./chunk-24YPR5EH.js";
11
+ import {
12
+ renderCollapseBar,
13
+ renderNodeCard
14
+ } from "./chunk-LRTSTDJ6.js";
15
15
  import {
16
16
  TITLE_FONT_SIZE,
17
17
  TITLE_FONT_WEIGHT
18
- } from "./chunk-VLC6WNRD.js";
18
+ } from "./chunk-GULGSH2Z.js";
19
19
  import {
20
20
  CARD_RADIUS,
21
- COLLAPSE_BAR_HEIGHT,
22
- COLLAPSE_BAR_INSET,
23
21
  CONTAINER_HEADER_HEIGHT,
24
22
  CONTAINER_LABEL_FONT_SIZE,
25
23
  CONTAINER_META_FONT_SIZE,
@@ -32,36 +30,36 @@ import {
32
30
  META_LINE_HEIGHT,
33
31
  NODE_STROKE_WIDTH,
34
32
  SEPARATOR_GAP
35
- } from "./chunk-XCKNFFKM.js";
33
+ } from "./chunk-WH6E6SHC.js";
36
34
  import {
37
35
  renderIntegratedLegend
38
- } from "./chunk-PGD6CNWO.js";
36
+ } from "./chunk-DFEVFLEG.js";
39
37
  import {
40
38
  getMaxLegendReservedHeight
41
- } from "./chunk-JILEYZ2V.js";
39
+ } from "./chunk-VVL2KKG4.js";
42
40
  import {
43
41
  parseOrg
44
- } from "./chunk-WLGOIMTI.js";
42
+ } from "./chunk-YCIBBVI2.js";
45
43
  import {
46
44
  FONT_FAMILY
47
45
  } from "./chunk-ICLB27PZ.js";
48
46
  import {
49
47
  resolveTagColor,
50
48
  tagAttrKey
51
- } from "./chunk-LGUFJ7Y2.js";
49
+ } from "./chunk-KW3CC7SB.js";
52
50
  import {
53
51
  fillModeFromOptions
54
- } from "./chunk-FUYEXLAN.js";
52
+ } from "./chunk-RFGQDIOI.js";
55
53
  import {
56
54
  EYE_CLOSED_PATH,
57
55
  EYE_OPEN_PATH,
58
56
  LEGEND_EYE_GAP,
59
57
  LEGEND_EYE_SIZE,
60
58
  LEGEND_HEIGHT
61
- } from "./chunk-UOCWYLYT.js";
59
+ } from "./chunk-OZXKW5NA.js";
62
60
  import {
63
61
  measureText
64
- } from "./chunk-KAO7JL4I.js";
62
+ } from "./chunk-PU5X3P3T.js";
65
63
  import {
66
64
  contrastText,
67
65
  groupFill,
@@ -119,8 +117,6 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
119
117
  const sContainerMetaFontSize = ctx.text(CONTAINER_META_FONT_SIZE);
120
118
  const sContainerMetaLineHeight = ctx.structural(CONTAINER_META_LINE_HEIGHT);
121
119
  const sContainerHeaderHeight = ctx.structural(CONTAINER_HEADER_HEIGHT);
122
- const sCollapseBarHeight = ctx.structural(COLLAPSE_BAR_HEIGHT);
123
- const sCollapseBarInset = ctx.structural(COLLAPSE_BAR_INSET);
124
120
  const sAncestorDotR = ctx.structural(ANCESTOR_DOT_R);
125
121
  const sAncestorLabelFontSize = ctx.text(ANCESTOR_LABEL_FONT_SIZE);
126
122
  const sAncestorRowHeight = ctx.structural(ANCESTOR_ROW_HEIGHT);
@@ -236,16 +232,16 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
236
232
  cG.append("text").attr("x", valueX).attr("y", rowY).attr("fill", palette.text).attr("font-size", sContainerMetaFontSize).text(value);
237
233
  }
238
234
  }
239
- if (!exportDims && c.hiddenCount && c.hiddenCount > 0) {
235
+ if (c.hasChildren) {
240
236
  renderCollapseBar(cG, {
237
+ expanded: !c.hiddenCount,
241
238
  width: c.width,
242
239
  height: c.height,
243
- barHeight: sCollapseBarHeight,
244
- inset: sCollapseBarInset,
245
240
  rx: sContainerRadius,
246
241
  fill: containerStroke(palette, colorOff ? void 0 : c.color),
247
242
  clipId: `clip-${c.nodeId}`,
248
- className: "org-collapse-bar"
243
+ prefix: "org",
244
+ scale: ctx
249
245
  });
250
246
  }
251
247
  if (!exportDims && c.hasChildren && !rootNodeIds.has(c.nodeId)) {
@@ -333,16 +329,16 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
333
329
  }
334
330
  }
335
331
  });
336
- if (!exportDims && node.hiddenCount && node.hiddenCount > 0) {
332
+ if (node.hasChildren) {
337
333
  renderCollapseBar(nodeG, {
334
+ expanded: !node.hiddenCount,
338
335
  width: node.width,
339
336
  height: node.height,
340
- barHeight: sCollapseBarHeight,
341
- inset: sCollapseBarInset,
342
337
  rx: sCardRadius,
343
338
  fill: fillMode === "solid" ? labelColor : nodeStroke(palette, colorOff ? void 0 : node.color),
344
339
  clipId: `clip-${node.id}`,
345
- className: "org-collapse-bar"
340
+ prefix: "org",
341
+ scale: ctx
346
342
  });
347
343
  }
348
344
  if (!exportDims && node.hasChildren && !rootNodeIds.has(node.id)) {
@@ -3,7 +3,7 @@ var NODE_STROKE_WIDTH = 1.5;
3
3
  var EDGE_STROKE_WIDTH = 1.5;
4
4
  var CARD_RADIUS = 6;
5
5
  var CONTAINER_RADIUS = 8;
6
- var COLLAPSE_BAR_INSET = 0;
6
+ var COLLAPSE_BAR_HEIGHT = 4;
7
7
  var EDGE_LABEL_KNOCKOUT_OPACITY = 0.9;
8
8
  var EDGE_LABEL_UNRESOLVED_KNOCKOUT_OPACITY = 1;
9
9
  var ARROWHEAD_WIDTH = 10;
@@ -19,7 +19,6 @@ var LABEL_FONT_SIZE = 13;
19
19
  var META_FONT_SIZE = 11;
20
20
  var META_LINE_HEIGHT = 16;
21
21
  var SEPARATOR_GAP = 6;
22
- var COLLAPSE_BAR_HEIGHT = 6;
23
22
  var CONTAINER_HEADER_HEIGHT = 28;
24
23
  var CONTAINER_LABEL_FONT_SIZE = 13;
25
24
  var CONTAINER_META_FONT_SIZE = 11;
@@ -30,7 +29,7 @@ export {
30
29
  EDGE_STROKE_WIDTH,
31
30
  CARD_RADIUS,
32
31
  CONTAINER_RADIUS,
33
- COLLAPSE_BAR_INSET,
32
+ COLLAPSE_BAR_HEIGHT,
34
33
  EDGE_LABEL_KNOCKOUT_OPACITY,
35
34
  EDGE_LABEL_UNRESOLVED_KNOCKOUT_OPACITY,
36
35
  ARROWHEAD_WIDTH,
@@ -44,7 +43,6 @@ export {
44
43
  META_FONT_SIZE,
45
44
  META_LINE_HEIGHT,
46
45
  SEPARATOR_GAP,
47
- COLLAPSE_BAR_HEIGHT,
48
46
  CONTAINER_HEADER_HEIGHT,
49
47
  CONTAINER_LABEL_FONT_SIZE,
50
48
  CONTAINER_META_FONT_SIZE,
@@ -13,7 +13,7 @@ import {
13
13
  normalizeNumericToken,
14
14
  parseFirstLine,
15
15
  parseSeriesNames
16
- } from "./chunk-FUYEXLAN.js";
16
+ } from "./chunk-RFGQDIOI.js";
17
17
  import {
18
18
  RECOGNIZED_COLOR_NAMES,
19
19
  resolveColorWithDiagnostic
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  resolveNotes,
6
6
  tryCollectNote
7
- } from "./chunk-HH3DHNQA.js";
7
+ } from "./chunk-4TK26YHH.js";
8
8
  import {
9
9
  displayName,
10
10
  normalizeName
@@ -17,7 +17,7 @@ import {
17
17
  tagAttrKey,
18
18
  validateTagGroupNames,
19
19
  validateTagValues
20
- } from "./chunk-LGUFJ7Y2.js";
20
+ } from "./chunk-KW3CC7SB.js";
21
21
  import {
22
22
  ALL_CHART_TYPES,
23
23
  FILL_FAMILY_TOKENS,
@@ -30,7 +30,7 @@ import {
30
30
  parseMetadataRegion,
31
31
  tryParseSharedOption,
32
32
  withTagAliases
33
- } from "./chunk-FUYEXLAN.js";
33
+ } from "./chunk-RFGQDIOI.js";
34
34
  import {
35
35
  resolveColorWithDiagnostic
36
36
  } from "./chunk-3J7O3CU6.js";
@@ -1,26 +1,27 @@
1
+ import {
2
+ computeQuadrantPointLabels,
3
+ rectCircleOverlap,
4
+ rectsOverlap
5
+ } from "./chunk-YSDSFXQD.js";
1
6
  import {
2
7
  getExtendedChartLegendGroups,
3
8
  getSimpleChartLegendGroups,
4
9
  parseChart,
5
10
  parseExtendedChart
6
- } from "./chunk-P2GNNEMN.js";
7
- import {
8
- computeQuadrantPointLabels,
9
- rectCircleOverlap,
10
- rectsOverlap
11
- } from "./chunk-KMU65FYM.js";
11
+ } from "./chunk-WPYJAHRP.js";
12
12
  import {
13
13
  MIN_CANVAS_WIDTH
14
- } from "./chunk-EPDBWATV.js";
14
+ } from "./chunk-K7RRXZHS.js";
15
15
  import {
16
16
  EXPORT_HEIGHT,
17
17
  EXPORT_WIDTH,
18
18
  createExportContainer,
19
+ drawnTitleExtraHeight,
19
20
  finalizeSvgExport,
20
21
  initD3Chart,
21
22
  renderChartTitle,
22
23
  resolveExportPalette
23
- } from "./chunk-6XLMTAEX.js";
24
+ } from "./chunk-YIHRLY55.js";
24
25
  import {
25
26
  EMPHASIS_DIM_OPACITY,
26
27
  EMPHASIS_DIM_TEXT_OPACITY,
@@ -28,33 +29,33 @@ import {
28
29
  } from "./chunk-2CW5ZTNH.js";
29
30
  import {
30
31
  layoutInlineHeader
31
- } from "./chunk-R5L5E3TC.js";
32
+ } from "./chunk-REKLKGR6.js";
32
33
  import {
33
34
  TITLE_FONT_SIZE,
34
35
  TITLE_FONT_WEIGHT,
35
36
  TITLE_OFFSET,
36
37
  TITLE_Y
37
- } from "./chunk-VLC6WNRD.js";
38
+ } from "./chunk-GULGSH2Z.js";
38
39
  import {
39
40
  computeLegendLayout
40
- } from "./chunk-JILEYZ2V.js";
41
+ } from "./chunk-VVL2KKG4.js";
41
42
  import {
42
43
  FONT_FAMILY
43
44
  } from "./chunk-ICLB27PZ.js";
44
45
  import {
45
46
  tagAttrKey
46
- } from "./chunk-LGUFJ7Y2.js";
47
+ } from "./chunk-KW3CC7SB.js";
47
48
  import {
48
49
  LEGEND_DOT_R,
49
50
  LEGEND_ENTRY_FONT_SIZE,
50
51
  LEGEND_HEIGHT,
51
52
  LEGEND_PILL_FONT_SIZE,
52
53
  legendChromeColors
53
- } from "./chunk-UOCWYLYT.js";
54
+ } from "./chunk-OZXKW5NA.js";
54
55
  import {
55
56
  measureText,
56
57
  truncateText
57
- } from "./chunk-KAO7JL4I.js";
58
+ } from "./chunk-PU5X3P3T.js";
58
59
  import {
59
60
  contrastText,
60
61
  getSegmentColors,
@@ -321,10 +322,12 @@ function injectLegendGroups(svg, groups, palette, isDark, hasTitle, width, inlin
321
322
  inlineTitle.title,
322
323
  inlineTitle.titleLineNumber,
323
324
  width,
324
- inlineTitle.textColor
325
+ inlineTitle.textColor,
326
+ void 0,
327
+ 2
325
328
  );
326
329
  }
327
- const titleH = hasTitle ? 40 : 0;
330
+ const titleH = hasTitle ? 40 + drawnTitleExtraHeight(svg) : 0;
328
331
  if (groups.length === 0) return hasTitle ? titleH + 12 : 24;
329
332
  const legendY = 8 + titleH;
330
333
  const { svg: legendSvg, height: legendH } = renderLegendSvg(groups, {
@@ -2262,8 +2265,15 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2262
2265
  if (std && !std.error && std.data.length > 0 && STANDARD.has(std.type)) {
2263
2266
  const hasTitle2 = !std.noTitle && !!std.title;
2264
2267
  const inlineTitle2 = inlineTitleFor(std, hasTitle2, textColor);
2265
- if (hasTitle2 && !inlineTitle2)
2266
- renderChartTitle(s, std.title, std.titleLineNumber, width, textColor);
2268
+ const titleExtra2 = hasTitle2 && !inlineTitle2 ? renderChartTitle(
2269
+ s,
2270
+ std.title,
2271
+ std.titleLineNumber,
2272
+ width,
2273
+ textColor,
2274
+ void 0,
2275
+ 2
2276
+ ) : 0;
2267
2277
  switch (std.type) {
2268
2278
  case "bar":
2269
2279
  renderBar(
@@ -2305,7 +2315,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2305
2315
  palette,
2306
2316
  isDark,
2307
2317
  textColor,
2308
- hasTitle2 ? 52 : 24
2318
+ (hasTitle2 ? 52 : 24) + titleExtra2
2309
2319
  );
2310
2320
  return true;
2311
2321
  case "radar": {
@@ -2342,7 +2352,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2342
2352
  palette,
2343
2353
  isDark,
2344
2354
  textColor,
2345
- hasTitle2 ? 52 : 24
2355
+ (hasTitle2 ? 52 : 24) + titleExtra2
2346
2356
  );
2347
2357
  return true;
2348
2358
  }
@@ -2352,8 +2362,15 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2352
2362
  const seriesColors = getSeriesColors(palette);
2353
2363
  const hasTitle = !ext.noTitle && !!ext.title;
2354
2364
  const inlineTitle = inlineTitleFor(ext, hasTitle, textColor);
2355
- if (hasTitle && !inlineTitle)
2356
- renderChartTitle(s, ext.title, ext.titleLineNumber, width, textColor);
2365
+ const titleExtra = hasTitle && !inlineTitle ? renderChartTitle(
2366
+ s,
2367
+ ext.title,
2368
+ ext.titleLineNumber,
2369
+ width,
2370
+ textColor,
2371
+ void 0,
2372
+ 2
2373
+ ) : 0;
2357
2374
  switch (ext.type) {
2358
2375
  case "funnel":
2359
2376
  renderFunnel(
@@ -2364,7 +2381,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2364
2381
  seriesColors,
2365
2382
  palette,
2366
2383
  isDark,
2367
- hasTitle ? 52 : 24
2384
+ (hasTitle ? 52 : 24) + titleExtra
2368
2385
  );
2369
2386
  return true;
2370
2387
  case "heatmap":
@@ -2377,7 +2394,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2377
2394
  isDark,
2378
2395
  textColor,
2379
2396
  bgColor,
2380
- hasTitle ? 52 : 24
2397
+ (hasTitle ? 52 : 24) + titleExtra
2381
2398
  );
2382
2399
  return true;
2383
2400
  case "scatter": {
@@ -2414,7 +2431,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2414
2431
  seriesColors,
2415
2432
  bgColor,
2416
2433
  textColor,
2417
- hasTitle ? 52 : 24
2434
+ (hasTitle ? 52 : 24) + titleExtra
2418
2435
  );
2419
2436
  return true;
2420
2437
  case "chord":
@@ -2427,7 +2444,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
2427
2444
  palette,
2428
2445
  isDark,
2429
2446
  textColor,
2430
- hasTitle ? 52 : 24
2447
+ (hasTitle ? 52 : 24) + titleExtra
2431
2448
  );
2432
2449
  return true;
2433
2450
  case "function": {
@@ -1,33 +1,33 @@
1
+ import {
2
+ looksLikeSitemap
3
+ } from "./chunk-KMB754DO.js";
4
+ import {
5
+ looksLikePert
6
+ } from "./chunk-CUTEHGXO.js";
1
7
  import {
2
8
  isLiveLinkLine
3
- } from "./chunk-DPNSDCR3.js";
9
+ } from "./chunk-65JFUANT.js";
4
10
  import {
5
11
  looksLikeSequence
6
- } from "./chunk-JCC3B2GS.js";
12
+ } from "./chunk-ROH4LYBL.js";
7
13
  import {
8
14
  looksLikeOrg
9
- } from "./chunk-WLGOIMTI.js";
10
- import {
11
- looksLikeSitemap
12
- } from "./chunk-YVIPJGFG.js";
15
+ } from "./chunk-YCIBBVI2.js";
13
16
  import {
14
- looksLikePert
15
- } from "./chunk-34JOHSVE.js";
17
+ looksLikeState
18
+ } from "./chunk-WXGFB2O2.js";
16
19
  import {
17
20
  looksLikeFlowchart
18
- } from "./chunk-H7RQG4PH.js";
19
- import {
20
- looksLikeState
21
- } from "./chunk-TPCP2UOI.js";
21
+ } from "./chunk-IAM3IDL4.js";
22
22
  import {
23
23
  looksLikeERDiagram
24
- } from "./chunk-MAYTYF5S.js";
24
+ } from "./chunk-PSNRB75I.js";
25
25
  import {
26
26
  looksLikeClassDiagram
27
- } from "./chunk-M4ZUIW3J.js";
27
+ } from "./chunk-H7DZYHQF.js";
28
28
  import {
29
29
  parseFirstLine
30
- } from "./chunk-FUYEXLAN.js";
30
+ } from "./chunk-RFGQDIOI.js";
31
31
 
32
32
  // src/chart-type-detect.ts
33
33
  var GANTT_DURATION_RE = /^\d+(?:\.\d+)?(?:min|bd|sp|d|w|m|q|y|h)(?:\?)?\s+/;
@@ -7,25 +7,25 @@ import {
7
7
  mutedFill,
8
8
  resolveCellColor,
9
9
  resolveColorMode
10
- } from "./chunk-5LG526X7.js";
10
+ } from "./chunk-5TGZBHEJ.js";
11
11
  import {
12
12
  renderIntegratedLegend
13
- } from "./chunk-PGD6CNWO.js";
13
+ } from "./chunk-DFEVFLEG.js";
14
14
  import {
15
15
  getMaxLegendReservedHeight
16
- } from "./chunk-JILEYZ2V.js";
16
+ } from "./chunk-VVL2KKG4.js";
17
17
  import {
18
18
  FONT_FAMILY
19
19
  } from "./chunk-ICLB27PZ.js";
20
20
  import {
21
21
  tagAttrKey
22
- } from "./chunk-LGUFJ7Y2.js";
22
+ } from "./chunk-KW3CC7SB.js";
23
23
  import {
24
24
  LEGEND_GROUP_GAP
25
- } from "./chunk-UOCWYLYT.js";
25
+ } from "./chunk-OZXKW5NA.js";
26
26
  import {
27
27
  measureText
28
- } from "./chunk-KAO7JL4I.js";
28
+ } from "./chunk-PU5X3P3T.js";
29
29
  import {
30
30
  contrastRatio,
31
31
  contrastText,
@@ -8,21 +8,21 @@ import {
8
8
  rectCircleOverlap,
9
9
  rectsOverlap,
10
10
  segmentRectOverlap
11
- } from "./chunk-KMU65FYM.js";
11
+ } from "./chunk-YSDSFXQD.js";
12
12
  import {
13
13
  TITLE_FONT_SIZE,
14
14
  TITLE_Y
15
- } from "./chunk-VLC6WNRD.js";
15
+ } from "./chunk-GULGSH2Z.js";
16
16
  import {
17
17
  compactNumber,
18
18
  computeLegendLayout
19
- } from "./chunk-JILEYZ2V.js";
19
+ } from "./chunk-VVL2KKG4.js";
20
20
  import {
21
21
  tagAttrKey
22
- } from "./chunk-LGUFJ7Y2.js";
22
+ } from "./chunk-KW3CC7SB.js";
23
23
  import {
24
24
  measureLegendText
25
- } from "./chunk-UOCWYLYT.js";
25
+ } from "./chunk-OZXKW5NA.js";
26
26
  import {
27
27
  contrastRatio,
28
28
  mix,
@@ -11,7 +11,7 @@ import {
11
11
  tagAttrKey,
12
12
  validateTagGroupNames,
13
13
  validateTagValues
14
- } from "./chunk-LGUFJ7Y2.js";
14
+ } from "./chunk-KW3CC7SB.js";
15
15
  import {
16
16
  AliasRegistry,
17
17
  OPTION_NOCOLON_RE,
@@ -23,7 +23,7 @@ import {
23
23
  splitNameAndMeta,
24
24
  warnUnknownMetaKeys,
25
25
  withTagAliases
26
- } from "./chunk-FUYEXLAN.js";
26
+ } from "./chunk-RFGQDIOI.js";
27
27
  import {
28
28
  formatDgmoError,
29
29
  makeDgmoError,
@@ -2,11 +2,11 @@ import {
2
2
  TITLE_FONT_SIZE,
3
3
  TITLE_FONT_WEIGHT,
4
4
  TITLE_Y
5
- } from "./chunk-VLC6WNRD.js";
5
+ } from "./chunk-GULGSH2Z.js";
6
6
  import {
7
7
  EDGE_DASH,
8
8
  HAIRLINE_DASH
9
- } from "./chunk-XCKNFFKM.js";
9
+ } from "./chunk-WH6E6SHC.js";
10
10
  import {
11
11
  FONT_FAMILY
12
12
  } from "./chunk-ICLB27PZ.js";
@@ -3,18 +3,18 @@ import {
3
3
  } from "./chunk-6OSGENN5.js";
4
4
  import {
5
5
  parseDgmoChartType
6
- } from "./chunk-I3ZRIMR7.js";
6
+ } from "./chunk-XEMCNQQW.js";
7
7
  import {
8
8
  FONT_FAMILY,
9
9
  MONO_FAMILY
10
10
  } from "./chunk-ICLB27PZ.js";
11
11
  import {
12
12
  chartTypes
13
- } from "./chunk-FUYEXLAN.js";
13
+ } from "./chunk-RFGQDIOI.js";
14
14
  import {
15
15
  measureText,
16
16
  truncateText
17
- } from "./chunk-KAO7JL4I.js";
17
+ } from "./chunk-PU5X3P3T.js";
18
18
 
19
19
  // src/error-card.ts
20
20
  var DOCS_BASE = "https://diagrammo.app/docs";
@@ -1,26 +1,47 @@
1
1
  import {
2
2
  paintRootBackground
3
- } from "./chunk-TOHTKLKE.js";
3
+ } from "./chunk-Q5Q5JLRT.js";
4
4
  import {
5
5
  serializeSvg
6
- } from "./chunk-CYRB2JTN.js";
6
+ } from "./chunk-YLKPRT6U.js";
7
7
  import {
8
8
  TITLE_FONT_SIZE,
9
9
  TITLE_FONT_WEIGHT,
10
+ TITLE_LINE_HEIGHT,
11
+ TITLE_SIDE_PAD,
10
12
  TITLE_Y
11
- } from "./chunk-VLC6WNRD.js";
13
+ } from "./chunk-GULGSH2Z.js";
12
14
  import {
13
15
  FONT_FAMILY
14
16
  } from "./chunk-ICLB27PZ.js";
17
+ import {
18
+ fitWrapped,
19
+ measureText,
20
+ wrapTextToWidth
21
+ } from "./chunk-PU5X3P3T.js";
15
22
  import {
16
23
  getSeriesColors
17
24
  } from "./chunk-6GXLAKUH.js";
18
25
 
19
26
  // src/utils/d3-helpers.ts
20
27
  import * as d3Selection from "d3-selection";
21
- function renderChartTitle(svg, title, titleLineNumber, width, textColor, onClickItem) {
22
- if (!title) return;
23
- const titleEl = svg.append("text").attr("class", "chart-title").attr("x", width / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).style("cursor", onClickItem && titleLineNumber ? "pointer" : "default").text(title);
28
+ function renderChartTitle(svg, title, titleLineNumber, width, textColor, onClickItem, maxLines = 1) {
29
+ if (!title) return 0;
30
+ const maxWidth = Math.max(0, width - 2 * TITLE_SIDE_PAD);
31
+ const fits = measureText(title, TITLE_FONT_SIZE, { bold: true }) <= maxWidth;
32
+ const lineCap = Math.max(1, maxLines);
33
+ const lines = fits ? [title] : fitWrapped(title, maxWidth, TITLE_FONT_SIZE, TITLE_FONT_SIZE, lineCap).lines;
34
+ const truncated = !fits && wrapTextToWidth(title, TITLE_FONT_SIZE, maxWidth, {
35
+ bold: true,
36
+ hardBreak: true
37
+ }).length > lineCap;
38
+ const titleEl = svg.append("text").attr("class", "chart-title").attr("x", width / 2).attr("y", TITLE_Y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).style("cursor", onClickItem && titleLineNumber ? "pointer" : "default");
39
+ if (lines.length === 1) titleEl.text(lines[0]);
40
+ else
41
+ lines.forEach((line, i) => {
42
+ titleEl.append("tspan").attr("x", width / 2).attr("dy", i === 0 ? 0 : TITLE_LINE_HEIGHT).text(line);
43
+ });
44
+ if (truncated) titleEl.append("title").text(title);
24
45
  if (titleLineNumber) {
25
46
  titleEl.attr("data-line-number", titleLineNumber);
26
47
  if (onClickItem) {
@@ -31,6 +52,11 @@ function renderChartTitle(svg, title, titleLineNumber, width, textColor, onClick
31
52
  });
32
53
  }
33
54
  }
55
+ return (lines.length - 1) * TITLE_LINE_HEIGHT;
56
+ }
57
+ function drawnTitleExtraHeight(svg) {
58
+ const lines = svg.select("text.chart-title").selectAll("tspan").size();
59
+ return lines > 1 ? (lines - 1) * TITLE_LINE_HEIGHT : 0;
34
60
  }
35
61
  function initD3Chart(container, palette, exportDims) {
36
62
  d3Selection.select(container).selectAll(":not([data-d3-tooltip])").remove();
@@ -125,6 +151,7 @@ function finalizeSvgExport(container, theme, palette) {
125
151
 
126
152
  export {
127
153
  renderChartTitle,
154
+ drawnTitleExtraHeight,
128
155
  initD3Chart,
129
156
  createTooltip,
130
157
  showTooltip,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LEGEND_PILL_TOGGLE_CLASS
3
- } from "./chunk-UOCWYLYT.js";
3
+ } from "./chunk-OZXKW5NA.js";
4
4
 
5
5
  // src/utils/svg-serialize.ts
6
6
  var BARE_AMPERSAND = /&(?![a-zA-Z][a-zA-Z0-9]*;|#\d+;|#[xX][0-9a-fA-F]+;)/g;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  measureText
3
- } from "./chunk-KAO7JL4I.js";
3
+ } from "./chunk-PU5X3P3T.js";
4
4
 
5
5
  // src/label-layout.ts
6
6
  function rectsOverlap(a, b) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  measureText
3
- } from "./chunk-KAO7JL4I.js";
3
+ } from "./chunk-PU5X3P3T.js";
4
4
  import {
5
5
  makeDgmoError
6
6
  } from "./chunk-BYU54C3S.js";