@diagrammo/dgmo 0.52.0 → 0.54.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 (339) hide show
  1. package/.cursorrules +59 -58
  2. package/.github/copilot-instructions.md +59 -58
  3. package/.windsurfrules +59 -58
  4. package/SKILL.md +59 -58
  5. package/dist/advanced.d.ts +101 -230
  6. package/dist/advanced.js +330 -658
  7. package/dist/analyzer-TDN5KJFP.js +15 -0
  8. package/dist/auto.css +14 -6
  9. package/dist/auto.js +163 -139
  10. package/dist/auto.mjs +1859 -885
  11. package/dist/block.css +14 -6
  12. package/dist/block.js +96 -81
  13. package/dist/calculator-VBIT6GQF.js +11 -0
  14. package/dist/chart-meta-CPNVUZ5J.d.ts +232 -0
  15. package/dist/chart-meta.d.ts +2 -0
  16. package/dist/chart-meta.js +108 -0
  17. package/dist/charts-d3-25E4VWXO.js +27 -0
  18. package/dist/chunk-2CW5ZTNH.js +58 -0
  19. package/dist/{chunk-BPY242XU.js → chunk-2NYXI35Z.js} +32 -14
  20. package/dist/{chunk-AUIM2NVH.js → chunk-2NZOHEP4.js} +7 -8
  21. package/dist/{chunk-HFMYN6N2.js → chunk-3B2GXZCX.js} +4 -3
  22. package/dist/chunk-3FRO35WW.js +1158 -0
  23. package/dist/{chunk-J7TLCB2Q.js → chunk-3IUHKMJI.js} +2 -2
  24. package/dist/{chunk-R3YSD62R.js → chunk-3KHJJP3J.js} +3 -3
  25. package/dist/{chunk-6LBQ7ELG.js → chunk-3SBHODJ4.js} +36 -17
  26. package/dist/{chunk-4UNQ6X24.js → chunk-3SEEP2JM.js} +4 -4
  27. package/dist/{chunk-7L4UJOY6.js → chunk-3TYUXC7D.js} +2 -2
  28. package/dist/{chunk-Y2ZE3MSG.js → chunk-43E26CDA.js} +2 -2
  29. package/dist/{chunk-CCNDLW7Z.js → chunk-47JNEKJA.js} +9 -9
  30. package/dist/{chunk-WCT3NYCV.js → chunk-4ASYQ347.js} +33 -8
  31. package/dist/{chunk-I5IGB56C.js → chunk-4QV26TEG.js} +41 -1
  32. package/dist/{chunk-INE5YJBZ.js → chunk-4T6OCSJ2.js} +8 -8
  33. package/dist/{chunk-CXK4DZH3.js → chunk-4W2PE66Q.js} +12 -2
  34. package/dist/{chunk-7KINELPI.js → chunk-4ZIKWVSQ.js} +17 -16
  35. package/dist/{chunk-JED6ZDEE.js → chunk-5HWPEYWB.js} +2 -2
  36. package/dist/{chunk-HWX6ZHF3.js → chunk-5VXU6MND.js} +6 -6
  37. package/dist/{chunk-44VCIPHF.js → chunk-5XSNLXU5.js} +23 -20
  38. package/dist/{chunk-4AQRFDXL.js → chunk-62Y27T4C.js} +2 -2
  39. package/dist/{chunk-QHXCAEMX.js → chunk-6KL7TFLS.js} +5 -5
  40. package/dist/{chunk-5BHJZH62.js → chunk-6OYDOQ2Q.js} +18 -6
  41. package/dist/{chunk-5HILBT7X.js → chunk-7JDTNFAK.js} +3 -3
  42. package/dist/{chunk-JRCOYRRH.js → chunk-7K6NDSXH.js} +9 -9
  43. package/dist/{chunk-5NGAO4QK.js → chunk-7SP4C6EV.js} +11 -11
  44. package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
  45. package/dist/{chunk-WRNFDFPU.js → chunk-7U4OR7CD.js} +2 -2
  46. package/dist/{chunk-5RP7JRVP.js → chunk-7UPFTBOW.js} +21 -17
  47. package/dist/{chunk-AAXZDUOV.js → chunk-A3BDLDYG.js} +17 -16
  48. package/dist/{chunk-GCYTI3DE.js → chunk-ADCHLNWT.js} +56 -10
  49. package/dist/{chunk-QBZYACOG.js → chunk-ADYKAKE3.js} +3 -3
  50. package/dist/{chunk-HHKO6SKY.js → chunk-AHTTKERF.js} +3 -3
  51. package/dist/{chunk-BKVOYV6I.js → chunk-AJFHNS67.js} +15 -15
  52. package/dist/{chunk-EMLPOL77.js → chunk-AQEYUVGJ.js} +124 -41
  53. package/dist/{chunk-3LK5DNED.js → chunk-B4XS2AF2.js} +3 -3
  54. package/dist/{chunk-REJAIQ5S.js → chunk-B7N5KYXQ.js} +16 -16
  55. package/dist/chunk-BEOAKGNA.js +484 -0
  56. package/dist/{chunk-SMRFPVLQ.js → chunk-BM7MG6HT.js} +4 -4
  57. package/dist/{chunk-P3NRSSUU.js → chunk-BULHGPHK.js} +3 -3
  58. package/dist/{chunk-QZX5S6R3.js → chunk-BWYFIVZF.js} +149 -89
  59. package/dist/{chunk-UBLHQTLV.js → chunk-BZJIITYM.js} +11 -10
  60. package/dist/{chunk-PRI2OD4E.js → chunk-C2UORMIA.js} +11 -6
  61. package/dist/{chunk-3YRPZ7ZZ.js → chunk-CCGWX6AO.js} +4 -4
  62. package/dist/{chunk-H7KENAZO.js → chunk-COJW2NEY.js} +73 -13
  63. package/dist/{chunk-WBRZJOEC.js → chunk-COVYNAKJ.js} +6 -6
  64. package/dist/{chunk-7QE3XMRK.js → chunk-CSHFU6LT.js} +13 -13
  65. package/dist/{chunk-6EJITS44.js → chunk-DLU643TF.js} +7 -7
  66. package/dist/{chunk-LBMS4AW6.js → chunk-DPGQ5UMO.js} +14 -14
  67. package/dist/{chunk-LTXOLDUZ.js → chunk-EAI6XJ7D.js} +12 -5
  68. package/dist/{chunk-FT3ZYWET.js → chunk-EPRF3ZRV.js} +11 -10
  69. package/dist/chunk-EQOMY4PY.js +404 -0
  70. package/dist/{chunk-USZW2HHU.js → chunk-EQW6HOP4.js} +4 -3
  71. package/dist/{chunk-HBPDFCQY.js → chunk-F7XM366V.js} +10 -9
  72. package/dist/{chunk-DYWQFQJP.js → chunk-FFVFZLRT.js} +57 -24
  73. package/dist/{chunk-77FGAVZC.js → chunk-FR6UFVSV.js} +19 -17
  74. package/dist/{chunk-MUE65OTD.js → chunk-FVMKCZHF.js} +8 -6
  75. package/dist/{chunk-3QD7VP3U.js → chunk-GK32ZFZY.js} +17 -10
  76. package/dist/{chunk-TJVLKNGR.js → chunk-GKYHWJXI.js} +5 -5
  77. package/dist/{chunk-FQMUHRVC.js → chunk-GQ5ECRP4.js} +13 -10
  78. package/dist/{chunk-5QKQSSPO.js → chunk-GRM2A4BG.js} +4 -4
  79. package/dist/{chunk-OTOHI4JO.js → chunk-H3HFC3SQ.js} +2 -2
  80. package/dist/{chunk-BPIZNB5O.js → chunk-HAA25PLC.js} +10 -10
  81. package/dist/{chunk-YIBAWQGJ.js → chunk-HFEOOQ46.js} +4 -4
  82. package/dist/{chunk-J76PIKAT.js → chunk-HO3RCNF6.js} +3 -3
  83. package/dist/{chunk-7DF4J4RL.js → chunk-I47VHSPS.js} +19 -13
  84. package/dist/{chunk-5SEVICBT.js → chunk-ICKXIMBA.js} +10 -9
  85. package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
  86. package/dist/{chunk-SWSIKFEB.js → chunk-IOIMQHQ6.js} +4 -4
  87. package/dist/{chunk-6HQH6JZE.js → chunk-IYNKLCAZ.js} +7 -7
  88. package/dist/{chunk-YAA6IID3.js → chunk-J7HQPVYH.js} +2 -2
  89. package/dist/{chunk-WBM7ZNDI.js → chunk-JYDMBWRP.js} +35 -18
  90. package/dist/{chunk-ZJV7GYR4.js → chunk-KBVOVDYP.js} +8 -8
  91. package/dist/{chunk-ICPJPQ5C.js → chunk-KDK5EKUR.js} +3 -3
  92. package/dist/{chunk-FHGVORFO.js → chunk-KINOX74I.js} +12 -12
  93. package/dist/{chunk-XD6ZYURY.js → chunk-KQ3FNRGR.js} +7 -14
  94. package/dist/{chunk-3HGU63UY.js → chunk-KQYQECWQ.js} +17 -16
  95. package/dist/{chunk-MUVJ57EP.js → chunk-KS5ZSM5T.js} +20 -17
  96. package/dist/{chunk-FY5MSZAP.js → chunk-KV4HLIJE.js} +21 -6
  97. package/dist/{chunk-LGT3PZCJ.js → chunk-LPJ6H5X4.js} +17 -17
  98. package/dist/{chunk-ONU3U4GL.js → chunk-LRSW4JLE.js} +52 -16
  99. package/dist/{chunk-TPFKKXCB.js → chunk-M24VXUFG.js} +7 -7
  100. package/dist/{chunk-QJMKPUYK.js → chunk-M3H7ZE6C.js} +21 -14
  101. package/dist/{chunk-QVENJMNX.js → chunk-MEQYZZFR.js} +2 -2
  102. package/dist/{chunk-75G3Q4DK.js → chunk-MTZOXISJ.js} +9 -9
  103. package/dist/{chunk-J7KJR3R6.js → chunk-N7BSBAVP.js} +133 -696
  104. package/dist/{chunk-VQOCMUWI.js → chunk-NUTWTV6G.js} +13 -11
  105. package/dist/{chunk-7BIZCTAX.js → chunk-O576GYAP.js} +3 -3
  106. package/dist/{chunk-H6PI3KJT.js → chunk-ODUT5WMC.js} +2 -2
  107. package/dist/{chunk-AL672HNE.js → chunk-OJ435DQZ.js} +17 -7
  108. package/dist/{chunk-3HF5YEFJ.js → chunk-OR3R27CU.js} +4 -4
  109. package/dist/{chunk-QGATPIPX.js → chunk-OSXQKC3S.js} +35 -23
  110. package/dist/{chunk-FUPF2UYQ.js → chunk-PIXZTCKH.js} +51 -108
  111. package/dist/{chunk-QOOUC2J5.js → chunk-Q5IHQ4NW.js} +12 -2
  112. package/dist/{chunk-4IHAV6O7.js → chunk-QBYP2FBZ.js} +10 -478
  113. package/dist/{chunk-GU46PPT3.js → chunk-QXGACPS2.js} +5 -5
  114. package/dist/{chunk-FMDSF3OV.js → chunk-QZAW5SFH.js} +2 -2
  115. package/dist/{chunk-YTMTPUH4.js → chunk-R5BGGBFF.js} +4 -4
  116. package/dist/{chunk-KGVZ5VGH.js → chunk-RIEAN4D5.js} +16 -12
  117. package/dist/{chunk-5223KXFD.js → chunk-RJ5LBZ5U.js} +7 -7
  118. package/dist/{chunk-K4EOKJA6.js → chunk-RRGKMJYL.js} +45 -18
  119. package/dist/{chunk-TTIM6YTT.js → chunk-S7FOIURR.js} +14 -13
  120. package/dist/{chunk-IM6PDDCE.js → chunk-S7YFT3PO.js} +78 -23
  121. package/dist/{chunk-ZEF5M5MB.js → chunk-SBOAZ7YK.js} +82 -296
  122. package/dist/{chunk-6NYWYNBI.js → chunk-SSHS42QG.js} +6 -6
  123. package/dist/{chunk-NNS4E7CW.js → chunk-T3FAJAJT.js} +18 -9
  124. package/dist/{chunk-ROOE4R4Y.js → chunk-T7Y554OK.js} +146 -18
  125. package/dist/chunk-TGOMHUOV.js +218 -0
  126. package/dist/{chunk-K2I2XOZD.js → chunk-TJN2OIVG.js} +30 -15
  127. package/dist/{chunk-VILVLS7P.js → chunk-TLNVYWPA.js} +8 -4
  128. package/dist/{chunk-GJFAMOGK.js → chunk-U4IN6AHE.js} +7 -7
  129. package/dist/chunk-U7VO6JAA.js +566 -0
  130. package/dist/{chunk-MX2EY5Y7.js → chunk-UEU6IYKY.js} +2 -2
  131. package/dist/{chunk-J6QROYDA.js → chunk-UIT7E6UF.js} +26 -10
  132. package/dist/{chunk-Z72XRXD4.js → chunk-UJRTPOHH.js} +3 -3
  133. package/dist/{chunk-TYS6CSS5.js → chunk-UU6LUYUH.js} +2 -2
  134. package/dist/{chunk-VL2O2F3W.js → chunk-VHO3YBTB.js} +2 -2
  135. package/dist/{chunk-4YFKQ5WT.js → chunk-VMSBMIHW.js} +5 -5
  136. package/dist/{chunk-Z5QVYKR7.js → chunk-VQFDBNYF.js} +4 -4
  137. package/dist/{chunk-UNURMIQO.js → chunk-W6PCFRPL.js} +4 -4
  138. package/dist/{chunk-FFUN5D66.js → chunk-WF64MW5G.js} +2 -2
  139. package/dist/{chunk-T4A4TSTJ.js → chunk-WKNAJ4BR.js} +20 -18
  140. package/dist/{chunk-CIRFIL4M.js → chunk-WW4BQ744.js} +11 -11
  141. package/dist/{chunk-ARGMQ3H4.js → chunk-WWHECSYZ.js} +3 -3
  142. package/dist/{chunk-ZNWAYU6N.js → chunk-XWODFBHJ.js} +73 -18
  143. package/dist/{chunk-HQQNCY7W.js → chunk-YENNFS5F.js} +10 -10
  144. package/dist/{chunk-TLVIHFRO.js → chunk-ZKPPI6BF.js} +2 -2
  145. package/dist/cli.cjs +173 -157
  146. package/dist/clock.js +9 -1
  147. package/dist/completion-registry.d.ts +129 -0
  148. package/dist/completion-registry.js +1270 -0
  149. package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
  150. package/dist/countdown.js +4 -3
  151. package/dist/dgmo-router-TGZWFIZO.js +88 -0
  152. package/dist/dimensions-L6BXQXXL.js +22 -0
  153. package/dist/editor.js +51 -5
  154. package/dist/element.js +163 -139
  155. package/dist/element.mjs +1859 -885
  156. package/dist/flowchart-parser-UKYOW3VM.js +21 -0
  157. package/dist/{flowchart-renderer-MNCDS7MV.js → flowchart-renderer-DCFKUDDR.js} +16 -16
  158. package/dist/highlight.js +55 -6
  159. package/dist/index.d.ts +4 -2
  160. package/dist/index.js +89 -81
  161. package/dist/layout-25Y3VDYF.js +19 -0
  162. package/dist/layout-4SPLI4HG.js +15 -0
  163. package/dist/layout-5XGYNYVT.js +9 -0
  164. package/dist/{layout-OAC4PEAC.js → layout-A6OIGZN2.js} +7 -7
  165. package/dist/layout-AZUPXWSK.js +15 -0
  166. package/dist/{layout-F4WO357A.js → layout-CAAKQX4W.js} +3 -3
  167. package/dist/{layout-A5UHRWVH.js → layout-CB3XWCOI.js} +3 -3
  168. package/dist/layout-CH4HFFRD.js +15 -0
  169. package/dist/layout-G2ABQJQZ.js +20 -0
  170. package/dist/{layout-7QXCNOVS.js → layout-HBWT2G23.js} +3 -3
  171. package/dist/{layout-2L3WMRYU.js → layout-ITLPDG6M.js} +9 -8
  172. package/dist/layout-NF4EWFLT.js +17 -0
  173. package/dist/layout-NY7MHJCL.js +15 -0
  174. package/dist/layout-QBNAMEOA.js +19 -0
  175. package/dist/layout-SP7HJWKA.js +17 -0
  176. package/dist/{layout-search-55FU6HD3.js → layout-search-LUI475P3.js} +56 -35
  177. package/dist/legend-constants-B77VKB3R.js +54 -0
  178. package/dist/{palettes-UDLZ2SA4.js → palettes-FGTNFARW.js} +4 -4
  179. package/dist/parser-2UWWNTFL.js +12 -0
  180. package/dist/parser-3RXYQSA7.js +18 -0
  181. package/dist/parser-5C3PEZK3.js +11 -0
  182. package/dist/parser-66RYGJRB.js +20 -0
  183. package/dist/parser-6GN5YJBJ.js +13 -0
  184. package/dist/parser-6MQM7WT3.js +15 -0
  185. package/dist/{parser-DQAFLUJB.js → parser-7UI6UQ7B.js} +7 -7
  186. package/dist/parser-B2A7XOAK.js +12 -0
  187. package/dist/parser-CCNJKDDA.js +16 -0
  188. package/dist/parser-ESHNUFME.js +13 -0
  189. package/dist/parser-F4FEU57T.js +11 -0
  190. package/dist/parser-FHRMFUNX.js +15 -0
  191. package/dist/parser-FPCWDYQV.js +13 -0
  192. package/dist/parser-FY3YFFBS.js +20 -0
  193. package/dist/parser-GML6V2KZ.js +14 -0
  194. package/dist/parser-HA3PF5FL.js +15 -0
  195. package/dist/parser-KTYF6WO5.js +11 -0
  196. package/dist/{parser-ZL5QUFVH.js → parser-LTA2BOZO.js} +5 -5
  197. package/dist/parser-LU7UAKNB.js +13 -0
  198. package/dist/parser-MHKYQPC2.js +11 -0
  199. package/dist/parser-MVSYFK63.js +17 -0
  200. package/dist/parser-O7YQYFEN.js +15 -0
  201. package/dist/parser-OPIXXUY4.js +21 -0
  202. package/dist/parser-S4EJPNVN.js +19 -0
  203. package/dist/parser-T3D7BV6O.js +11 -0
  204. package/dist/{parser-YKYMQG3B.js → parser-VVE4THG3.js} +6 -6
  205. package/dist/parser-WPPJGB4R.js +12 -0
  206. package/dist/parser-X5XLFY4Z.js +22 -0
  207. package/dist/parser-XCPMEB2Z.js +11 -0
  208. package/dist/parser-XRDUX2AR.js +14 -0
  209. package/dist/parser-YPWYT46P.js +16 -0
  210. package/dist/parser-YULS5MLD.js +13 -0
  211. package/dist/pert.d.ts +2 -0
  212. package/dist/registry-CaSw0PSH.d.ts +350 -0
  213. package/dist/renderer-2DME63VZ.js +16 -0
  214. package/dist/renderer-3VY3VXJE.js +37 -0
  215. package/dist/renderer-4A32DX5L.js +24 -0
  216. package/dist/renderer-4K5YYX5R.js +28 -0
  217. package/dist/renderer-6CFML5G3.js +22 -0
  218. package/dist/renderer-7HMZ5OCJ.js +16 -0
  219. package/dist/renderer-7ZNVOVFG.js +16 -0
  220. package/dist/{renderer-CQY6ATOS.js → renderer-B7Y6I7JX.js} +9 -8
  221. package/dist/renderer-C3RI4OPJ.js +33 -0
  222. package/dist/renderer-CJ56SUMF.js +26 -0
  223. package/dist/renderer-COJZZ4F6.js +25 -0
  224. package/dist/renderer-FXMGCSRP.js +26 -0
  225. package/dist/{renderer-HSHHVYWF.js → renderer-G4UOW3RH.js} +7 -7
  226. package/dist/renderer-HQ4JFZOV.js +27 -0
  227. package/dist/{renderer-NHO46CT2.js → renderer-K7XLVPH5.js} +6 -6
  228. package/dist/{renderer-ZWIH4WDW.js → renderer-LHVCKEWF.js} +13 -13
  229. package/dist/renderer-OZX5KGQM.js +21 -0
  230. package/dist/{renderer-3F7OS2AX.js → renderer-P3YQES7B.js} +16 -16
  231. package/dist/renderer-PLVIARM7.js +24 -0
  232. package/dist/renderer-RA4PTAMF.js +19 -0
  233. package/dist/renderer-RMAM2SOJ.js +28 -0
  234. package/dist/renderer-SES7QZYL.js +37 -0
  235. package/dist/renderer-TQ5QDZOE.js +22 -0
  236. package/dist/renderer-V5SNTPAM.js +27 -0
  237. package/dist/{renderer-5DAKMIU2.js → renderer-WCWI4I6A.js} +5 -5
  238. package/dist/renderer-WVD6G2TS.js +34 -0
  239. package/dist/{renderer-DT4XRFEP.js → renderer-X2LYSMLU.js} +7 -7
  240. package/dist/renderer-Y3NXZINM.js +24 -0
  241. package/dist/{renderer-KNFTTOBL.js → renderer-YEFOOULC.js} +14 -14
  242. package/dist/renderer-YP3P6UVT.js +24 -0
  243. package/dist/renderer-YVMETH6V.js +29 -0
  244. package/dist/renderer-Z4GNKNXO.js +24 -0
  245. package/dist/renderer-radial-VYBZAXXE.js +21 -0
  246. package/dist/{resolver-EMTGNR3D.js → resolver-WFKZYBJ2.js} +4 -4
  247. package/dist/state-parser-VIW2WNA5.js +19 -0
  248. package/dist/state-renderer-H22AQD3U.js +38 -0
  249. package/dist/{themes-32xj5ZTW.d.ts → themes-tbBkIVsn.d.ts} +2 -349
  250. package/docs/ai-integration.md +59 -58
  251. package/docs/language-reference.md +323 -286
  252. package/fonts/Inter-Bold.woff2 +0 -0
  253. package/fonts/Inter-Regular.woff2 +0 -0
  254. package/gallery/fixtures/boxes-and-lines-diverging.dgmo +1 -2
  255. package/gallery/fixtures/boxes-and-lines.dgmo +1 -1
  256. package/gallery/fixtures/clock.dgmo +1 -1
  257. package/gallery/fixtures/event-line.dgmo +1 -1
  258. package/gallery/fixtures/gantt-full.dgmo +1 -1
  259. package/gallery/fixtures/gantt-sprints.dgmo +9 -9
  260. package/gallery/fixtures/gantt.dgmo +1 -1
  261. package/gallery/fixtures/legacy-syntax-backcompat.dgmo +16 -0
  262. package/gallery/fixtures/state-tags.dgmo +40 -0
  263. package/gallery/fixtures/swimlane.dgmo +1 -1
  264. package/gallery/fixtures/timeline-intraday.dgmo +1 -1
  265. package/package.json +9 -1
  266. package/dist/analyzer-BJ54GIFB.js +0 -15
  267. package/dist/calculator-LDYQCDDY.js +0 -11
  268. package/dist/charts-d3-MXEP6BNP.js +0 -26
  269. package/dist/chunk-BRENJ2BQ.js +0 -714
  270. package/dist/chunk-FQ7HTV52.js +0 -364
  271. package/dist/dgmo-router-X7ZGAPIE.js +0 -86
  272. package/dist/dimensions-45H6JQEY.js +0 -22
  273. package/dist/flowchart-parser-UKELHBSB.js +0 -21
  274. package/dist/layout-46N4JJYK.js +0 -17
  275. package/dist/layout-A4XWNVID.js +0 -14
  276. package/dist/layout-AM2JWW3X.js +0 -15
  277. package/dist/layout-EE6GE46Y.js +0 -17
  278. package/dist/layout-G23F7LDH.js +0 -9
  279. package/dist/layout-GM4UGR7B.js +0 -19
  280. package/dist/layout-GQQJXNYH.js +0 -15
  281. package/dist/layout-IIE2S5FK.js +0 -20
  282. package/dist/layout-VMCRX66I.js +0 -14
  283. package/dist/layout-ZDOSXL5G.js +0 -19
  284. package/dist/parser-2ECN6JA2.js +0 -16
  285. package/dist/parser-4WTIHM5J.js +0 -11
  286. package/dist/parser-5H2BTSJQ.js +0 -11
  287. package/dist/parser-75KVXUNS.js +0 -16
  288. package/dist/parser-774AC53T.js +0 -13
  289. package/dist/parser-BE4YCSRU.js +0 -11
  290. package/dist/parser-CNGUQUQI.js +0 -11
  291. package/dist/parser-DEUUSQIN.js +0 -22
  292. package/dist/parser-EYCKNKQA.js +0 -21
  293. package/dist/parser-FXISIU6A.js +0 -14
  294. package/dist/parser-GTB4XC7P.js +0 -18
  295. package/dist/parser-GVEPAUSD.js +0 -12
  296. package/dist/parser-HSQGTY4G.js +0 -19
  297. package/dist/parser-HVKRINUS.js +0 -11
  298. package/dist/parser-J5MIEYO4.js +0 -15
  299. package/dist/parser-KMZIXLDZ.js +0 -13
  300. package/dist/parser-LJHXWSXU.js +0 -14
  301. package/dist/parser-PT3W72G5.js +0 -15
  302. package/dist/parser-SBJQDPHL.js +0 -15
  303. package/dist/parser-SUWWWCMX.js +0 -12
  304. package/dist/parser-SXDRNZOA.js +0 -13
  305. package/dist/parser-UMILOW3M.js +0 -14
  306. package/dist/parser-UP3AZ367.js +0 -13
  307. package/dist/parser-WHPRV3X5.js +0 -20
  308. package/dist/parser-WX3UODSJ.js +0 -12
  309. package/dist/parser-XCIEN3KN.js +0 -13
  310. package/dist/parser-XIRTUMVN.js +0 -18
  311. package/dist/parser-YKCGIG45.js +0 -11
  312. package/dist/parser-ZGM2OJ6Y.js +0 -22
  313. package/dist/renderer-4QB4K7Q3.js +0 -24
  314. package/dist/renderer-5H4SY7YY.js +0 -22
  315. package/dist/renderer-5PIQPFOX.js +0 -16
  316. package/dist/renderer-6MU37QF5.js +0 -19
  317. package/dist/renderer-AQVMWJ4M.js +0 -27
  318. package/dist/renderer-BDDW6K7N.js +0 -24
  319. package/dist/renderer-BNB3VIDY.js +0 -26
  320. package/dist/renderer-CVW75CXL.js +0 -37
  321. package/dist/renderer-ERHBSTQT.js +0 -25
  322. package/dist/renderer-IDPVUFNB.js +0 -28
  323. package/dist/renderer-ILX6BGKR.js +0 -21
  324. package/dist/renderer-JP663HKG.js +0 -22
  325. package/dist/renderer-MVUZBESR.js +0 -16
  326. package/dist/renderer-N4EBR2FV.js +0 -28
  327. package/dist/renderer-NO2QJ5LZ.js +0 -27
  328. package/dist/renderer-OGFV5RXX.js +0 -34
  329. package/dist/renderer-PDLESJMS.js +0 -37
  330. package/dist/renderer-T4MTNINC.js +0 -24
  331. package/dist/renderer-TOUGFGTM.js +0 -24
  332. package/dist/renderer-U3KPD43Y.js +0 -34
  333. package/dist/renderer-X334IJU2.js +0 -26
  334. package/dist/renderer-Y5OAMOCR.js +0 -23
  335. package/dist/renderer-YONAKAJU.js +0 -16
  336. package/dist/renderer-YWMI6Y2U.js +0 -29
  337. package/dist/renderer-radial-7CGZMVMS.js +0 -21
  338. package/dist/state-parser-BATWAID2.js +0 -18
  339. package/dist/state-renderer-3FKZJ3LP.js +0 -34
@@ -0,0 +1,404 @@
1
+ import {
2
+ formatLocalISODate
3
+ } from "./chunk-3TYUXC7D.js";
4
+ import {
5
+ isTagBlockHeading,
6
+ matchTagBlockHeading
7
+ } from "./chunk-AHTTKERF.js";
8
+ import {
9
+ makeDgmoError
10
+ } from "./chunk-4W2PE66Q.js";
11
+
12
+ // src/pert/share-normalize.ts
13
+ var START_DATE_NOW_RE = /^(\s*start-date\s+)now(\s*)$/i;
14
+ function splitTrailingComment(line) {
15
+ const m = line.match(/^(.*?)(\s+#.*)$/);
16
+ if (!m) return { code: line, comment: "" };
17
+ return { code: m[1], comment: m[2] };
18
+ }
19
+ function normalizePertSourceForShare(dsl) {
20
+ const today = formatLocalISODate(/* @__PURE__ */ new Date());
21
+ const lines = dsl.split("\n");
22
+ const out = [];
23
+ for (const line of lines) {
24
+ const { code, comment } = splitTrailingComment(line);
25
+ const m = code.match(START_DATE_NOW_RE);
26
+ if (m) {
27
+ out.push(`${m[1]}${today}${m[2]}${comment}`);
28
+ } else {
29
+ out.push(line);
30
+ }
31
+ }
32
+ return out.join("\n");
33
+ }
34
+
35
+ // src/org/resolver.ts
36
+ var MAX_DEPTH = 10;
37
+ var IMPORT_RE = /^(\s+)import:?\s+(.+\.dgmo)\s*$/i;
38
+ var TAGS_RE = /^tags:?\s+(.+\.dgmo)\s*$/i;
39
+ var HEADER_RE = /^(org|kanban|title\s*:)/i;
40
+ var KNOWN_HEADER_OPTIONS = /* @__PURE__ */ new Set([
41
+ "direction-tb",
42
+ "direction-lr",
43
+ "sub-node-label",
44
+ "hide",
45
+ "show-sub-node-count",
46
+ "color-off",
47
+ "fill-tint",
48
+ "fill-solid",
49
+ "fill-outline",
50
+ "active-tag"
51
+ ]);
52
+ function dirname(filePath) {
53
+ const last = filePath.lastIndexOf("/");
54
+ return last > 0 ? filePath.substring(0, last) : "/";
55
+ }
56
+ function resolvePath(base, relative) {
57
+ const parts = dirname(base).split("/");
58
+ for (const seg of relative.split("/")) {
59
+ if (seg === "..") {
60
+ if (parts.length > 1) parts.pop();
61
+ } else if (seg !== "." && seg !== "") {
62
+ parts.push(seg);
63
+ }
64
+ }
65
+ return parts.join("/") || "/";
66
+ }
67
+ function extractTagGroups(lines) {
68
+ const blocks = [];
69
+ let current = null;
70
+ for (const line of lines) {
71
+ const trimmed = line.trim();
72
+ const headingMatch = matchTagBlockHeading(trimmed);
73
+ if (headingMatch) {
74
+ const name = headingMatch.name.toLowerCase();
75
+ current = { name, lines: [line] };
76
+ blocks.push(current);
77
+ } else if (current) {
78
+ if (trimmed === "" || trimmed.startsWith("//")) {
79
+ current = null;
80
+ } else if (line.match(/^\s+/)) {
81
+ current.lines.push(line);
82
+ } else {
83
+ current = null;
84
+ }
85
+ }
86
+ }
87
+ return blocks;
88
+ }
89
+ function parseFileHeader(lines) {
90
+ const tagGroups = extractTagGroups(lines);
91
+ const tagGroupLineSet = /* @__PURE__ */ new Set();
92
+ for (const group of tagGroups) {
93
+ for (let i = 0; i < lines.length; i++) {
94
+ if (lines[i] === group.lines[0]) {
95
+ for (let j = 0; j < group.lines.length; j++) {
96
+ tagGroupLineSet.add(i + j);
97
+ }
98
+ break;
99
+ }
100
+ }
101
+ }
102
+ let tagsDirective = null;
103
+ const contentLines = [];
104
+ const contentLineIndices = [];
105
+ let headerDone = false;
106
+ for (let i = 0; i < lines.length; i++) {
107
+ if (tagGroupLineSet.has(i)) continue;
108
+ const rawLine = lines[i];
109
+ const trimmed = rawLine.trim();
110
+ if (!headerDone && (trimmed === "" || trimmed.startsWith("//"))) continue;
111
+ if (!headerDone) {
112
+ if (HEADER_RE.test(trimmed)) continue;
113
+ const tagsMatch = trimmed.match(TAGS_RE);
114
+ if (tagsMatch) {
115
+ tagsDirective = tagsMatch[1].trim();
116
+ continue;
117
+ }
118
+ if (!rawLine.match(/^\s/) && !isTagBlockHeading(trimmed) && !trimmed.includes("|")) {
119
+ const firstToken = trimmed.split(/\s/)[0].toLowerCase();
120
+ if (KNOWN_HEADER_OPTIONS.has(firstToken)) {
121
+ continue;
122
+ }
123
+ }
124
+ headerDone = true;
125
+ }
126
+ contentLines.push(rawLine);
127
+ contentLineIndices.push(i);
128
+ }
129
+ return { contentLines, contentLineIndices, tagGroups, tagsDirective };
130
+ }
131
+ async function resolveOrgImports(content, filePath, readFileFn) {
132
+ const diagnostics = [];
133
+ const result = await resolveFile(
134
+ content,
135
+ filePath,
136
+ readFileFn,
137
+ diagnostics,
138
+ /* @__PURE__ */ new Set([filePath]),
139
+ 0
140
+ );
141
+ return {
142
+ content: result.content,
143
+ diagnostics,
144
+ lineMap: result.lineMap,
145
+ importSourceMap: result.importSourceMap
146
+ };
147
+ }
148
+ async function resolveFile(content, filePath, readFileFn, diagnostics, ancestorChain, depth) {
149
+ const lines = content.split("\n");
150
+ const headerLines = [];
151
+ let tagsDirective = null;
152
+ const inlineTagGroups = extractTagGroups(lines);
153
+ const bodyStartIndex = findBodyStart(lines);
154
+ let tagsLineNumber = 0;
155
+ for (let i = 0; i < bodyStartIndex; i++) {
156
+ const rawLine = lines[i];
157
+ const trimmed = rawLine.trim();
158
+ if (trimmed === "" || trimmed.startsWith("//")) {
159
+ headerLines.push({ text: rawLine, originalLine: i + 1 });
160
+ continue;
161
+ }
162
+ if (isTagBlockHeading(trimmed)) continue;
163
+ if (/^\s/.test(rawLine)) continue;
164
+ const tagsMatch = trimmed.match(TAGS_RE);
165
+ if (tagsMatch) {
166
+ tagsDirective = tagsMatch[1].trim();
167
+ tagsLineNumber = i + 1;
168
+ continue;
169
+ }
170
+ headerLines.push({ text: rawLine, originalLine: i + 1 });
171
+ }
172
+ let tagsFileGroups = [];
173
+ if (tagsDirective) {
174
+ const tagsPath = resolvePath(filePath, tagsDirective);
175
+ try {
176
+ const tagsContent = await readFileFn(tagsPath);
177
+ const tagsLines = tagsContent.split("\n");
178
+ tagsFileGroups = extractTagGroups(tagsLines);
179
+ } catch {
180
+ diagnostics.push(
181
+ makeDgmoError(tagsLineNumber, `Tags file not found: ${tagsDirective}`)
182
+ );
183
+ }
184
+ }
185
+ const bodyLines = lines.slice(bodyStartIndex);
186
+ const resolvedBodyLines = [];
187
+ const importedTagGroups = [];
188
+ for (let i = 0; i < bodyLines.length; i++) {
189
+ const line = bodyLines[i];
190
+ const lineNumber = bodyStartIndex + i + 1;
191
+ const importMatch = line.match(IMPORT_RE);
192
+ if (!importMatch) {
193
+ const trimmed = line.trim();
194
+ if (isTagBlockHeading(trimmed) || inlineTagGroups.length > 0 && isTagGroupEntry(line, bodyLines, i)) {
195
+ continue;
196
+ }
197
+ resolvedBodyLines.push({
198
+ text: line,
199
+ originalLine: lineNumber,
200
+ importSource: null
201
+ });
202
+ continue;
203
+ }
204
+ const indent = importMatch[1];
205
+ const importRelPath = importMatch[2].trim();
206
+ const importAbsPath = resolvePath(filePath, importRelPath);
207
+ if (depth >= MAX_DEPTH) {
208
+ diagnostics.push(
209
+ makeDgmoError(
210
+ lineNumber,
211
+ `Import depth limit exceeded (${MAX_DEPTH}): ${importRelPath}`
212
+ )
213
+ );
214
+ continue;
215
+ }
216
+ if (ancestorChain.has(importAbsPath)) {
217
+ const chain = [...ancestorChain, importAbsPath].map((p) => p.split("/").pop()).join(" -> ");
218
+ diagnostics.push(
219
+ makeDgmoError(lineNumber, `Circular import detected: ${chain}`)
220
+ );
221
+ continue;
222
+ }
223
+ let importedContent;
224
+ try {
225
+ importedContent = await readFileFn(importAbsPath);
226
+ } catch {
227
+ diagnostics.push(
228
+ makeDgmoError(lineNumber, `Import file not found: ${importRelPath}`)
229
+ );
230
+ continue;
231
+ }
232
+ const nestedChain = new Set(ancestorChain);
233
+ nestedChain.add(importAbsPath);
234
+ const resolved = await resolveFile(
235
+ importedContent,
236
+ importAbsPath,
237
+ readFileFn,
238
+ diagnostics,
239
+ nestedChain,
240
+ depth + 1
241
+ );
242
+ const resolvedLines = resolved.content.split("\n");
243
+ const parsed = parseFileHeader(resolvedLines);
244
+ for (const group of parsed.tagGroups) {
245
+ importedTagGroups.push(group);
246
+ }
247
+ const importedContentLines = [];
248
+ for (let j = 0; j < parsed.contentLines.length; j++) {
249
+ const cText = parsed.contentLines[j];
250
+ const cIndex = parsed.contentLineIndices[j];
251
+ if (cText.trim() !== "") {
252
+ importedContentLines.push({
253
+ text: cText,
254
+ index: cIndex
255
+ });
256
+ }
257
+ }
258
+ let lastNonEmpty = importedContentLines.length - 1;
259
+ while (lastNonEmpty >= 0 && importedContentLines[lastNonEmpty].text.trim() === "") {
260
+ lastNonEmpty--;
261
+ }
262
+ const trimmedImported = importedContentLines.slice(0, lastNonEmpty + 1);
263
+ for (const entry of trimmedImported) {
264
+ const resolvedLineNum = entry.index + 1;
265
+ let importSource = null;
266
+ if (resolved.importSourceMap[resolvedLineNum]) {
267
+ importSource = resolved.importSourceMap[resolvedLineNum];
268
+ } else {
269
+ const origLine = resolved.lineMap[resolvedLineNum];
270
+ if (origLine != null) {
271
+ importSource = { filePath: importAbsPath, sourceLine: origLine };
272
+ }
273
+ }
274
+ if (entry.text.trim() === "") {
275
+ resolvedBodyLines.push({
276
+ text: "",
277
+ originalLine: lineNumber,
278
+ importSource
279
+ });
280
+ } else {
281
+ resolvedBodyLines.push({
282
+ text: indent + entry.text,
283
+ originalLine: lineNumber,
284
+ importSource
285
+ });
286
+ }
287
+ }
288
+ }
289
+ const mergedGroups = mergeTagGroups(
290
+ inlineTagGroups,
291
+ tagsFileGroups,
292
+ importedTagGroups
293
+ );
294
+ const outputLines = [];
295
+ const lineMap = [null];
296
+ const importSourceMap = [null];
297
+ for (const entry of headerLines) {
298
+ outputLines.push(entry.text);
299
+ lineMap.push(entry.originalLine);
300
+ importSourceMap.push(null);
301
+ }
302
+ if (mergedGroups.length > 0) {
303
+ if (outputLines.length > 0 && // In-bounds by length guard.
304
+ outputLines[outputLines.length - 1].trim() !== "") {
305
+ outputLines.push("");
306
+ lineMap.push(null);
307
+ importSourceMap.push(null);
308
+ }
309
+ for (const group of mergedGroups) {
310
+ const inlineMatch = inlineTagGroups.find((g) => g.name === group.name);
311
+ for (const line of group.lines) {
312
+ outputLines.push(line);
313
+ if (inlineMatch) {
314
+ const srcIdx = lines.indexOf(line);
315
+ lineMap.push(srcIdx >= 0 ? srcIdx + 1 : null);
316
+ } else {
317
+ lineMap.push(null);
318
+ }
319
+ importSourceMap.push(null);
320
+ }
321
+ outputLines.push("");
322
+ lineMap.push(null);
323
+ importSourceMap.push(null);
324
+ }
325
+ }
326
+ if (resolvedBodyLines.length > 0 && outputLines.length > 0 && // In-bounds by length guard.
327
+ outputLines[outputLines.length - 1].trim() !== "") {
328
+ outputLines.push("");
329
+ lineMap.push(null);
330
+ importSourceMap.push(null);
331
+ }
332
+ for (const entry of resolvedBodyLines) {
333
+ outputLines.push(entry.text);
334
+ lineMap.push(entry.originalLine);
335
+ importSourceMap.push(entry.importSource);
336
+ }
337
+ return { content: outputLines.join("\n"), lineMap, importSourceMap };
338
+ }
339
+ function findBodyStart(lines) {
340
+ let inTagGroup = false;
341
+ for (let i = 0; i < lines.length; i++) {
342
+ const rawLine = lines[i];
343
+ const trimmed = rawLine.trim();
344
+ if (trimmed === "" || trimmed.startsWith("//")) {
345
+ if (inTagGroup) inTagGroup = false;
346
+ continue;
347
+ }
348
+ if (isTagBlockHeading(trimmed)) {
349
+ inTagGroup = true;
350
+ continue;
351
+ }
352
+ if (inTagGroup && rawLine.match(/^\s+/)) {
353
+ continue;
354
+ }
355
+ if (inTagGroup) {
356
+ inTagGroup = false;
357
+ }
358
+ if (HEADER_RE.test(trimmed)) continue;
359
+ if (TAGS_RE.test(trimmed)) continue;
360
+ if (!rawLine.match(/^\s/) && !trimmed.includes("|") && !isTagBlockHeading(trimmed)) {
361
+ const firstToken = trimmed.split(/\s/)[0].toLowerCase();
362
+ if (KNOWN_HEADER_OPTIONS.has(firstToken)) {
363
+ continue;
364
+ }
365
+ }
366
+ return i;
367
+ }
368
+ return lines.length;
369
+ }
370
+ function isTagGroupEntry(line, allLines, index) {
371
+ if (!line.match(/^\s+/)) return false;
372
+ for (let i = index - 1; i >= 0; i--) {
373
+ const prevRaw = allLines[i];
374
+ const prev = prevRaw.trim();
375
+ if (prev === "" || prev.startsWith("//")) continue;
376
+ if (isTagBlockHeading(prev)) return true;
377
+ if (prevRaw.match(/^\s+/)) continue;
378
+ return false;
379
+ }
380
+ return false;
381
+ }
382
+ function mergeTagGroups(inline, tagsFile, imported) {
383
+ const seen = /* @__PURE__ */ new Map();
384
+ for (const group of inline) {
385
+ seen.set(group.name, group);
386
+ }
387
+ for (const group of tagsFile) {
388
+ if (!seen.has(group.name)) {
389
+ seen.set(group.name, group);
390
+ }
391
+ }
392
+ for (const group of imported) {
393
+ if (!seen.has(group.name)) {
394
+ seen.set(group.name, group);
395
+ }
396
+ }
397
+ return Array.from(seen.values());
398
+ }
399
+
400
+ export {
401
+ normalizePertSourceForShare,
402
+ resolveOrgImports
403
+ };
404
+ //# sourceMappingURL=chunk-EQOMY4PY.js.map
@@ -128,9 +128,10 @@ function addGanttDuration(startDate, duration, holidays, holidaySet, direction =
128
128
  }
129
129
  }
130
130
  function parseDuration(s) {
131
- const match = s.trim().match(/^(\d+(?:\.\d+)?)(min|bd|d|w|m|q|y|h|s)$/);
131
+ const match = s.trim().match(/^(\d+(?:\.\d+)?)(min|bd|sp|d|w|m|q|y|h|s)$/);
132
132
  if (!match) return null;
133
- return { amount: parseFloat(match[1]), unit: match[2] };
133
+ const unit = match[2] === "sp" ? "s" : match[2];
134
+ return { amount: parseFloat(match[1]), unit };
134
135
  }
135
136
  function parseOffset(value) {
136
137
  const trimmed = value.trim();
@@ -194,4 +195,4 @@ export {
194
195
  parseOffsetPrefix,
195
196
  parseGanttDate
196
197
  };
197
- //# sourceMappingURL=chunk-USZW2HHU.js.map
198
+ //# sourceMappingURL=chunk-EQW6HOP4.js.map
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  tryStripDescriptionKeyword
3
3
  } from "./chunk-IYULMRBE.js";
4
+ import {
5
+ normalizeName
6
+ } from "./chunk-NOTA6TEI.js";
4
7
  import {
5
8
  AUTO_TAG_COLOR_SENTINEL,
6
9
  finalizeAutoTagColors,
@@ -10,10 +13,7 @@ import {
10
13
  tagAttrKey,
11
14
  validateTagGroupNames,
12
15
  validateTagValues
13
- } from "./chunk-HHKO6SKY.js";
14
- import {
15
- normalizeName
16
- } from "./chunk-NOTA6TEI.js";
16
+ } from "./chunk-AHTTKERF.js";
17
17
  import {
18
18
  ALL_CHART_TYPES,
19
19
  OPTION_NOCOLON_RE,
@@ -25,13 +25,13 @@ import {
25
25
  tryParseSharedOption,
26
26
  warnUnknownMetaKeys,
27
27
  withTagAliases
28
- } from "./chunk-BRENJ2BQ.js";
28
+ } from "./chunk-3FRO35WW.js";
29
29
  import {
30
30
  formatDgmoError,
31
31
  makeDgmoError,
32
32
  makeFail,
33
33
  suggest
34
- } from "./chunk-CXK4DZH3.js";
34
+ } from "./chunk-4W2PE66Q.js";
35
35
 
36
36
  // src/sitemap/parser.ts
37
37
  var CONTAINER_RE = /^\[([^\]]+)\]\s*(.*)$/;
@@ -176,8 +176,9 @@ function parseSitemap(content, palette) {
176
176
  continue;
177
177
  }
178
178
  if (!contentStarted && !currentTagGroup && measureIndent(line) === 0 && !trimmed.includes("|") && !trimmed.includes("->") && !trimmed.includes(":")) {
179
- if (/^direction-tb$/i.test(trimmed)) {
180
- result.direction = "TB";
179
+ const dirBool = trimmed.match(/^direction-(lr|tb)$/i);
180
+ if (dirBool) {
181
+ result.direction = dirBool[1].toUpperCase();
181
182
  continue;
182
183
  }
183
184
  if (tryParseSharedOption(trimmed, options)) {
@@ -519,4 +520,4 @@ export {
519
520
  looksLikeSitemap,
520
521
  parseSitemap
521
522
  };
522
- //# sourceMappingURL=chunk-HBPDFCQY.js.map
523
+ //# sourceMappingURL=chunk-F7XM366V.js.map
@@ -2,7 +2,7 @@ import {
2
2
  computeQuadrantPointLabels,
3
3
  rectCircleOverlap,
4
4
  rectsOverlap
5
- } from "./chunk-VL2O2F3W.js";
5
+ } from "./chunk-VHO3YBTB.js";
6
6
  import {
7
7
  EXPORT_HEIGHT,
8
8
  EXPORT_WIDTH,
@@ -11,28 +11,34 @@ import {
11
11
  initD3Chart,
12
12
  renderChartTitle,
13
13
  resolveExportPalette
14
- } from "./chunk-QBZYACOG.js";
14
+ } from "./chunk-ADYKAKE3.js";
15
15
  import {
16
16
  computeLegendLayout
17
- } from "./chunk-YAA6IID3.js";
17
+ } from "./chunk-J7HQPVYH.js";
18
18
  import {
19
19
  FONT_FAMILY
20
20
  } from "./chunk-6KFWC4CO.js";
21
+ import {
22
+ getExtendedChartLegendGroups,
23
+ getSimpleChartLegendGroups,
24
+ parseChart,
25
+ parseExtendedChart
26
+ } from "./chunk-AQEYUVGJ.js";
27
+ import {
28
+ EMPHASIS_DIM_OPACITY,
29
+ EMPHASIS_DIM_TEXT_OPACITY,
30
+ resolveEmphasis
31
+ } from "./chunk-2CW5ZTNH.js";
21
32
  import {
22
33
  LEGEND_DOT_R,
23
34
  LEGEND_ENTRY_FONT_SIZE,
24
35
  LEGEND_HEIGHT,
25
- LEGEND_PILL_FONT_SIZE
26
- } from "./chunk-QOOUC2J5.js";
36
+ LEGEND_PILL_FONT_SIZE,
37
+ legendChromeColors
38
+ } from "./chunk-Q5IHQ4NW.js";
27
39
  import {
28
40
  measureText
29
- } from "./chunk-WCT3NYCV.js";
30
- import {
31
- getExtendedChartLegendGroups,
32
- getSimpleChartLegendGroups,
33
- parseChart,
34
- parseExtendedChart
35
- } from "./chunk-EMLPOL77.js";
41
+ } from "./chunk-4ASYQ347.js";
36
42
  import {
37
43
  contrastText,
38
44
  getSegmentColors,
@@ -42,10 +48,10 @@ import {
42
48
  mix,
43
49
  shapeFill,
44
50
  themeBaseBg
45
- } from "./chunk-WBM7ZNDI.js";
51
+ } from "./chunk-JYDMBWRP.js";
46
52
  import {
47
53
  tagAttrKey
48
- } from "./chunk-HHKO6SKY.js";
54
+ } from "./chunk-AHTTKERF.js";
49
55
 
50
56
  // src/utils/legend-svg.ts
51
57
  function esc(s) {
@@ -90,8 +96,7 @@ function renderLegendSvg(groups, options) {
90
96
  if (!layout.activeCapsule && layout.pills.length === 0) {
91
97
  return { svg: "", height: 0, width: 0 };
92
98
  }
93
- const groupBg = isDark ? mix(palette.surface, palette.bg, 50) : mix(palette.surface, palette.bg, 30);
94
- const pillBorder = mix(palette.textMuted, palette.bg, 50);
99
+ const { groupBg, pillBorder } = legendChromeColors(palette, isDark);
95
100
  const parts = [];
96
101
  let bottom = 0;
97
102
  let left = Infinity;
@@ -145,7 +150,9 @@ function fmtNum(n) {
145
150
  function reserveHeader(svg, chart, colors, palette, isDark, hasTitle, width) {
146
151
  return injectLegendGroups(
147
152
  svg,
148
- getSimpleChartLegendGroups(chart, colors),
153
+ // `no-legend` (#48) → pass no groups; injectLegendGroups then returns the
154
+ // title-only top inset, so the legend band collapses rather than blanking.
155
+ chart.noLegend ? [] : getSimpleChartLegendGroups(chart, colors),
149
156
  palette,
150
157
  isDark,
151
158
  hasTitle,
@@ -1167,11 +1174,31 @@ function renderScatter(svg, chart, width, height, colors, palette, isDark, textC
1167
1174
  // src/charts-d3/sankey.ts
1168
1175
  var NODE_W = 20;
1169
1176
  var NODE_GAP = 14;
1177
+ var RIBBON_FILL_OPACITY = 0.6;
1170
1178
  function renderSankey(svg, chart, width, height, colors, bgColor, textColor, topInset) {
1171
1179
  const links = chart.links ?? [];
1172
1180
  if (links.length === 0) return;
1173
1181
  const solid = chart.fillMode === "solid";
1174
1182
  const names = Array.from(new Set(links.flatMap((l) => [l.source, l.target])));
1183
+ const walk = (seeds, up) => {
1184
+ const seen = new Set(seeds);
1185
+ for (let pass = 0; pass < names.length; pass++) {
1186
+ let grew = false;
1187
+ for (const l of links) {
1188
+ const from = up ? l.target : l.source;
1189
+ const to = up ? l.source : l.target;
1190
+ if (seen.has(from) && !seen.has(to)) {
1191
+ seen.add(to);
1192
+ grew = true;
1193
+ }
1194
+ }
1195
+ if (!grew) break;
1196
+ }
1197
+ return seen;
1198
+ };
1199
+ const flowClosure = (seeds) => /* @__PURE__ */ new Set([...walk(seeds, true), ...walk(seeds, false)]);
1200
+ const { dimmed } = resolveEmphasis(chart.emphasis, names, flowClosure);
1201
+ const linkDimmed = (l) => dimmed.has(l.source) || dimmed.has(l.target);
1175
1202
  const node = /* @__PURE__ */ new Map();
1176
1203
  names.forEach(
1177
1204
  (name, i) => node.set(name, {
@@ -1269,7 +1296,10 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1269
1296
  const ribbon = svg.append("path").attr(
1270
1297
  "d",
1271
1298
  `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`
1272
- ).attr("fill", color).attr("fill-opacity", 0.6);
1299
+ ).attr("fill", color).attr(
1300
+ "fill-opacity",
1301
+ linkDimmed(l) ? RIBBON_FILL_OPACITY * EMPHASIS_DIM_OPACITY : RIBBON_FILL_OPACITY
1302
+ );
1273
1303
  tagDatum(ribbon, {
1274
1304
  line: l.lineNumber,
1275
1305
  // U+241F (symbol-for-unit-separator) — collision-proof AND XML-legal;
@@ -1284,7 +1314,9 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1284
1314
  const nodeLine = links.find(
1285
1315
  (l) => l.source === n.name || l.target === n.name
1286
1316
  )?.lineNumber;
1317
+ const nodeDim = dimmed.has(n.name);
1287
1318
  const nr = svg.append("rect").attr("x", n.x).attr("y", n.y).attr("width", NODE_W).attr("height", Math.max(1, n.h)).attr("fill", solid ? n.raw : mix(n.raw, bgColor, 75)).attr("stroke", n.raw).attr("stroke-width", 1);
1319
+ if (nodeDim) nr.attr("opacity", EMPHASIS_DIM_OPACITY);
1288
1320
  tagDatum(nr, {
1289
1321
  ...nodeLine !== void 0 && { line: nodeLine },
1290
1322
  key: `node:${n.name}`,
@@ -1293,7 +1325,8 @@ function renderSankey(svg, chart, width, height, colors, bgColor, textColor, top
1293
1325
  color: n.raw
1294
1326
  });
1295
1327
  const lastLayer = n.rank === maxRank;
1296
- 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);
1328
+ 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);
1329
+ if (nodeDim) label.attr("opacity", EMPHASIS_DIM_TEXT_OPACITY);
1297
1330
  }
1298
1331
  }
1299
1332
 
@@ -1440,7 +1473,7 @@ function renderFunction(svg, chart, width, height, colors, textColor, mutedColor
1440
1473
  }
1441
1474
  const gen = d3line2().defined((p) => isFinite(p[1]) && p[1] >= yLo - 1 && p[1] <= yHi + 1).x((p) => x(p[0])).y((p) => y(p[1]));
1442
1475
  for (const c of curves) {
1443
- const path = svg.append("path").attr("d", gen(c.pts) ?? "").attr("fill", "none").attr("stroke", c.color).attr("stroke-width", 2.5).attr("stroke-linejoin", "round");
1476
+ const path = svg.append("path").attr("d", gen(c.pts) ?? "").attr("fill", "none").attr("stroke", c.color).attr("stroke-width", 1.75).attr("stroke-linejoin", "round").attr("data-series-name", c.name);
1444
1477
  tagDatum(path, { line: c.line, key: c.name, name: c.name, color: c.color });
1445
1478
  }
1446
1479
  drawXAxisTitle(
@@ -1559,7 +1592,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
1559
1592
  );
1560
1593
  return true;
1561
1594
  case "radar": {
1562
- const groups = getSimpleChartLegendGroups(std, colors);
1595
+ const groups = std.noLegend ? [] : getSimpleChartLegendGroups(std, colors);
1563
1596
  const top = injectLegendGroups(
1564
1597
  s,
1565
1598
  groups,
@@ -1629,7 +1662,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
1629
1662
  );
1630
1663
  return true;
1631
1664
  case "scatter": {
1632
- const groups = getExtendedChartLegendGroups(ext, seriesColors);
1665
+ const groups = ext.noLegend ? [] : getExtendedChartLegendGroups(ext, seriesColors);
1633
1666
  const top = injectLegendGroups(
1634
1667
  s,
1635
1668
  groups,
@@ -1678,7 +1711,7 @@ function renderInto(s, content, palette, isDark, width, height, textColor, muted
1678
1711
  );
1679
1712
  return true;
1680
1713
  case "function": {
1681
- const groups = getExtendedChartLegendGroups(ext, seriesColors);
1714
+ const groups = ext.noLegend ? [] : getExtendedChartLegendGroups(ext, seriesColors);
1682
1715
  const top = injectLegendGroups(
1683
1716
  s,
1684
1717
  groups,
@@ -1711,4 +1744,4 @@ export {
1711
1744
  supportsD3DataChart,
1712
1745
  renderDataChartD3
1713
1746
  };
1714
- //# sourceMappingURL=chunk-DYWQFQJP.js.map
1747
+ //# sourceMappingURL=chunk-FFVFZLRT.js.map