@diagrammo/dgmo 0.51.0 → 0.53.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 (336) hide show
  1. package/.cursorrules +74 -77
  2. package/.github/copilot-instructions.md +74 -77
  3. package/.windsurfrules +74 -77
  4. package/SKILL.md +74 -77
  5. package/dist/advanced.d.ts +109 -246
  6. package/dist/advanced.js +296 -633
  7. package/dist/analyzer-TDN5KJFP.js +15 -0
  8. package/dist/auto.css +14 -6
  9. package/dist/auto.js +141 -129
  10. package/dist/auto.mjs +2062 -937
  11. package/dist/block.css +14 -6
  12. package/dist/block.js +123 -73
  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 +105 -0
  17. package/dist/charts-d3-DH2XA45I.js +26 -0
  18. package/dist/{chunk-RLFVAKEO.js → chunk-22OQWBWD.js} +25 -8
  19. package/dist/{chunk-I2QZFCS2.js → chunk-27STWBOK.js} +10 -8
  20. package/dist/{chunk-5PZT4DQG.js → chunk-2QC4HXCY.js} +41 -21
  21. package/dist/{chunk-HFMYN6N2.js → chunk-3B2GXZCX.js} +4 -3
  22. package/dist/{chunk-F3FYUFUH.js → chunk-3BEKKRH5.js} +18 -17
  23. package/dist/{chunk-2UJSV2VT.js → chunk-3CZLWOCI.js} +17 -7
  24. package/dist/{chunk-JEUJOX5X.js → chunk-3IUHKMJI.js} +2 -2
  25. package/dist/{chunk-7L4UJOY6.js → chunk-3TYUXC7D.js} +2 -2
  26. package/dist/{chunk-Y2ZE3MSG.js → chunk-43E26CDA.js} +2 -2
  27. package/dist/{chunk-ZO27FGJS.js → chunk-4ASVFYB2.js} +10 -7
  28. package/dist/{chunk-WCT3NYCV.js → chunk-4ASYQ347.js} +33 -8
  29. package/dist/{chunk-2ILHQOL3.js → chunk-4K42RUGC.js} +41 -13
  30. package/dist/{chunk-I5IGB56C.js → chunk-4QV26TEG.js} +41 -1
  31. package/dist/{chunk-QOOUC2J5.js → chunk-4RGZFA7H.js} +2 -2
  32. package/dist/{chunk-CXK4DZH3.js → chunk-4W2PE66Q.js} +12 -2
  33. package/dist/{chunk-EXOQP75F.js → chunk-4WGMGKCZ.js} +53 -33
  34. package/dist/{chunk-JED6ZDEE.js → chunk-5HWPEYWB.js} +2 -2
  35. package/dist/{chunk-3YSQZ75W.js → chunk-65V6IRFN.js} +46 -33
  36. package/dist/{chunk-TMACGPW5.js → chunk-6AUZPPAV.js} +4 -4
  37. package/dist/{chunk-6H7O2OPM.js → chunk-6DCOIN4W.js} +36 -6
  38. package/dist/{chunk-GTWKD3QT.js → chunk-6HTRCTAS.js} +7 -6
  39. package/dist/{chunk-VB4UJ3H2.js → chunk-6KY7OCZC.js} +21 -11
  40. package/dist/{chunk-YAA6IID3.js → chunk-774C2FF3.js} +2 -2
  41. package/dist/{chunk-WJ7RW65H.js → chunk-7GUF6SDR.js} +22 -20
  42. package/dist/{chunk-QYTPPDAO.js → chunk-7JDTNFAK.js} +3 -3
  43. package/dist/{chunk-U6EQI3U6.js → chunk-ADYKAKE3.js} +3 -3
  44. package/dist/{chunk-VNSXLA6G.js → chunk-AHXIMHDQ.js} +84 -20
  45. package/dist/chunk-AIMLCDAO.js +404 -0
  46. package/dist/{chunk-6MNGECP2.js → chunk-ALYZ3MAA.js} +4 -4
  47. package/dist/{chunk-5F5ELR3V.js → chunk-AN2DQB3G.js} +151 -20
  48. package/dist/{chunk-IEWG6J7C.js → chunk-AZNXGWDC.js} +91 -36
  49. package/dist/{chunk-4XFBQT5O.js → chunk-B4XS2AF2.js} +3 -3
  50. package/dist/{chunk-CC4YRBWV.js → chunk-BD3WGY4T.js} +18 -8
  51. package/dist/{chunk-RAHVMKBG.js → chunk-BFDVEO5R.js} +2 -2
  52. package/dist/{chunk-332ZR4QU.js → chunk-BR7AYN76.js} +8 -8
  53. package/dist/{chunk-P3NRSSUU.js → chunk-BULHGPHK.js} +3 -3
  54. package/dist/{chunk-PZDBOK2Q.js → chunk-CK2GMDXD.js} +11 -5
  55. package/dist/{chunk-467TVMQL.js → chunk-CMVZWP32.js} +3 -3
  56. package/dist/{chunk-GNSFLJAA.js → chunk-CQFNIIQN.js} +7 -7
  57. package/dist/{chunk-RBDIYLA5.js → chunk-DAOFNU6J.js} +17 -1
  58. package/dist/{chunk-AFIEPDLX.js → chunk-DWUMPMV2.js} +23 -11
  59. package/dist/{chunk-USZW2HHU.js → chunk-EQW6HOP4.js} +4 -3
  60. package/dist/{chunk-6BQFET7X.js → chunk-FFXCKZOU.js} +12 -4
  61. package/dist/{chunk-WRNFDFPU.js → chunk-FGDSTT3F.js} +2 -2
  62. package/dist/{chunk-6NFYEQDX.js → chunk-FLDC7ZAK.js} +34 -7
  63. package/dist/{chunk-IUJODQKX.js → chunk-FT7TPPZ5.js} +25 -23
  64. package/dist/{chunk-IEDMFNU7.js → chunk-FUKNRLIJ.js} +19 -7
  65. package/dist/{chunk-JJXGQIRV.js → chunk-FXCB7H5O.js} +4 -4
  66. package/dist/{chunk-GGHRAITI.js → chunk-GABSL6TH.js} +4 -4
  67. package/dist/{chunk-RXKTSFDL.js → chunk-GAWKIIPO.js} +35 -43
  68. package/dist/{chunk-ZJ3LS7DW.js → chunk-GMAH572Z.js} +6 -6
  69. package/dist/{chunk-TRM2J7ZN.js → chunk-GMIJ35PW.js} +28 -29
  70. package/dist/{chunk-AB7INMR5.js → chunk-GQ644SPD.js} +26 -25
  71. package/dist/{chunk-5QKQSSPO.js → chunk-GRM2A4BG.js} +4 -4
  72. package/dist/{chunk-3ODS2VGL.js → chunk-GWQJKTFS.js} +161 -704
  73. package/dist/{chunk-OTOHI4JO.js → chunk-H3HFC3SQ.js} +2 -2
  74. package/dist/{chunk-JSSX2SX4.js → chunk-HE5J53SZ.js} +4 -4
  75. package/dist/{chunk-2EQMXBBQ.js → chunk-HNBY6CNV.js} +3 -3
  76. package/dist/{chunk-J76PIKAT.js → chunk-HO3RCNF6.js} +3 -3
  77. package/dist/{chunk-OJTXTQA2.js → chunk-HORZ5H2L.js} +38 -31
  78. package/dist/{chunk-MX2EY5Y7.js → chunk-HOXKNRON.js} +2 -2
  79. package/dist/{chunk-E7Y3SYKW.js → chunk-I64ECJX3.js} +18 -8
  80. package/dist/{chunk-JM4LEPY3.js → chunk-IQJCVREL.js} +11 -8
  81. package/dist/{chunk-3JLKYGBQ.js → chunk-J7HI6G3G.js} +9 -6
  82. package/dist/{chunk-Q62FEYK3.js → chunk-JHOAH4TI.js} +3 -3
  83. package/dist/{chunk-OZPBJM5Q.js → chunk-JTMSWEIW.js} +11 -8
  84. package/dist/{chunk-P6T66CCZ.js → chunk-JYDMBWRP.js} +37 -19
  85. package/dist/{chunk-7DF4J4RL.js → chunk-KKHCNSKK.js} +17 -11
  86. package/dist/{chunk-ENRS56GC.js → chunk-KUSAVOWZ.js} +11 -8
  87. package/dist/{chunk-BYJBIALT.js → chunk-LC3FFD43.js} +23 -18
  88. package/dist/{chunk-65WJYYKJ.js → chunk-LHILKFDP.js} +16 -11
  89. package/dist/{chunk-NEQ6GJXB.js → chunk-LQHVDZYC.js} +52 -16
  90. package/dist/{chunk-5WPNFSXP.js → chunk-MA3HJZHB.js} +5 -5
  91. package/dist/{chunk-Z6XJQ6KO.js → chunk-MEQYZZFR.js} +3 -3
  92. package/dist/{chunk-MVN25IF6.js → chunk-NNUMX6WX.js} +42 -12
  93. package/dist/{chunk-7DYOELRK.js → chunk-NNYFQOTK.js} +78 -38
  94. package/dist/{chunk-NNAAJVBU.js → chunk-NR5HCAUD.js} +1 -1
  95. package/dist/{chunk-H6PI3KJT.js → chunk-ODUT5WMC.js} +2 -2
  96. package/dist/{chunk-5PDTIBLV.js → chunk-P3H7QVDH.js} +56 -19
  97. package/dist/{chunk-ND76YJCN.js → chunk-PIXZTCKH.js} +84 -117
  98. package/dist/{chunk-3LV2NCB6.js → chunk-PKNNHU7H.js} +22 -9
  99. package/dist/{chunk-TK2VQQX2.js → chunk-PT4SW76W.js} +20 -18
  100. package/dist/{chunk-AE7II3E3.js → chunk-PV2QO7QL.js} +4 -4
  101. package/dist/{chunk-FTBZV6NE.js → chunk-PYO4TJJ3.js} +34 -26
  102. package/dist/{chunk-QZPEGJOM.js → chunk-Q7AH665U.js} +28 -14
  103. package/dist/{chunk-QHI5XVUJ.js → chunk-QAALSCKI.js} +27 -26
  104. package/dist/{chunk-GD6L76WD.js → chunk-QI3BOLQB.js} +23 -11
  105. package/dist/{chunk-Y6GBQTBK.js → chunk-QWIBT6DS.js} +50 -28
  106. package/dist/{chunk-GU46PPT3.js → chunk-QXGACPS2.js} +5 -5
  107. package/dist/{chunk-FMDSF3OV.js → chunk-QZAW5SFH.js} +2 -2
  108. package/dist/{chunk-YGJZWZTY.js → chunk-R5NH5BZG.js} +12 -9
  109. package/dist/{chunk-U5SI5NIM.js → chunk-RJ5LBZ5U.js} +43 -26
  110. package/dist/{chunk-XHVV4NVW.js → chunk-RT7ACF77.js} +12 -2
  111. package/dist/{chunk-XEQXCIBC.js → chunk-RW5PEJ7D.js} +18 -6
  112. package/dist/{chunk-4VWJ4LW2.js → chunk-SG4PRYO3.js} +61 -49
  113. package/dist/{chunk-RBHWPDBB.js → chunk-SGPFVDUL.js} +18 -7
  114. package/dist/{chunk-KJGG2JKQ.js → chunk-SQCBSFT5.js} +84 -79
  115. package/dist/{chunk-5X6YQA2J.js → chunk-U7NKYLX2.js} +18 -16
  116. package/dist/chunk-U7VO6JAA.js +566 -0
  117. package/dist/{chunk-32XPAAET.js → chunk-UFQJMOVZ.js} +10 -10
  118. package/dist/{chunk-Z72XRXD4.js → chunk-UJRTPOHH.js} +3 -3
  119. package/dist/{chunk-EDA6C7MV.js → chunk-UK6DKJLD.js} +34 -14
  120. package/dist/{chunk-GROLTAWZ.js → chunk-UKP5HWB5.js} +149 -89
  121. package/dist/{chunk-DY7XLRHK.js → chunk-UQRIKAMH.js} +28 -27
  122. package/dist/{chunk-TYS6CSS5.js → chunk-UU6LUYUH.js} +2 -2
  123. package/dist/{chunk-NI3XQBPB.js → chunk-UVDCHR4E.js} +18 -6
  124. package/dist/{chunk-6K2M4VSR.js → chunk-VAO6ANGC.js} +23 -10
  125. package/dist/{chunk-6NYWYNBI.js → chunk-VGNIDAPQ.js} +4 -4
  126. package/dist/{chunk-VL2O2F3W.js → chunk-VHO3YBTB.js} +2 -2
  127. package/dist/{chunk-IUO34HKW.js → chunk-VIRANCNY.js} +36 -32
  128. package/dist/{chunk-4QZ43D7I.js → chunk-VJHBSPGF.js} +12 -14
  129. package/dist/{chunk-BGP54HVR.js → chunk-VKNCC2GX.js} +12 -8
  130. package/dist/{chunk-FC5I2KXV.js → chunk-VRRDUYOK.js} +7 -7
  131. package/dist/{chunk-G3PF3S7P.js → chunk-W2DINCHL.js} +15 -15
  132. package/dist/{chunk-OU7HLO7I.js → chunk-W5KMNC5U.js} +8 -8
  133. package/dist/{chunk-FFUN5D66.js → chunk-WF64MW5G.js} +2 -2
  134. package/dist/{chunk-X7EC3L2H.js → chunk-X3RXGSCZ.js} +48 -30
  135. package/dist/{chunk-KFNWFNAA.js → chunk-XEAQDIMF.js} +7 -6
  136. package/dist/{chunk-AXW3M6OQ.js → chunk-XG4NWFPY.js} +38 -27
  137. package/dist/{chunk-B63YB7X3.js → chunk-XQ4KN6JQ.js} +127 -65
  138. package/dist/{chunk-WBRZJOEC.js → chunk-XY3UDKKH.js} +4 -4
  139. package/dist/{chunk-IE477RQZ.js → chunk-YG2BEIQU.js} +14 -13
  140. package/dist/{chunk-LV4BETUU.js → chunk-YJVA3QUU.js} +55 -5
  141. package/dist/{chunk-5SVOCD5W.js → chunk-YR43LJT5.js} +20 -16
  142. package/dist/{chunk-TLVIHFRO.js → chunk-ZKPPI6BF.js} +2 -2
  143. package/dist/{chunk-WQLMU7VG.js → chunk-ZXUAPTCK.js} +3 -3
  144. package/dist/cli.cjs +158 -155
  145. package/dist/clock.js +25 -23
  146. package/dist/countdown.js +4 -3
  147. package/dist/dgmo-router-B4S23EBH.js +86 -0
  148. package/dist/dimensions-K6PGYYGT.js +22 -0
  149. package/dist/editor.js +36 -6
  150. package/dist/element.js +143 -131
  151. package/dist/element.mjs +2062 -937
  152. package/dist/flowchart-parser-LALR6J6F.js +21 -0
  153. package/dist/{flowchart-renderer-AQSMEMYF.js → flowchart-renderer-DXYB5YRF.js} +14 -14
  154. package/dist/highlight.d.ts +21 -1
  155. package/dist/highlight.js +129 -8
  156. package/dist/index.d.ts +4 -2
  157. package/dist/index.js +80 -75
  158. package/dist/layout-3BVDMKXI.js +15 -0
  159. package/dist/layout-3M5UYJHY.js +14 -0
  160. package/dist/{layout-JDJAEQ3P.js → layout-3V2A4MUE.js} +8 -8
  161. package/dist/layout-4IHCMWZN.js +19 -0
  162. package/dist/layout-5XGYNYVT.js +9 -0
  163. package/dist/layout-AZUPXWSK.js +15 -0
  164. package/dist/{layout-F4WO357A.js → layout-CAAKQX4W.js} +3 -3
  165. package/dist/layout-CB3XWCOI.js +10 -0
  166. package/dist/{layout-OAC4PEAC.js → layout-E6HR6PXH.js} +7 -7
  167. package/dist/{layout-7QXCNOVS.js → layout-HBWT2G23.js} +3 -3
  168. package/dist/layout-KPQWJNAG.js +14 -0
  169. package/dist/layout-OL2XFJXA.js +17 -0
  170. package/dist/layout-WCAIKGZG.js +19 -0
  171. package/dist/layout-WSMPBQ4Q.js +17 -0
  172. package/dist/layout-ZE5DRJWX.js +20 -0
  173. package/dist/{layout-search-55FU6HD3.js → layout-search-34DPZD43.js} +51 -35
  174. package/dist/legend-constants-P5EQWRQQ.js +49 -0
  175. package/dist/{palettes-PRJ2RI6D.js → palettes-FGTNFARW.js} +4 -4
  176. package/dist/{parser-KKTJ6M3Y.js → parser-275KP7JO.js} +8 -8
  177. package/dist/parser-27Z76SN3.js +22 -0
  178. package/dist/parser-3CODK6RG.js +15 -0
  179. package/dist/{parser-EH5VE7ZN.js → parser-3KIGEEJM.js} +6 -6
  180. package/dist/parser-3VSWEKBF.js +15 -0
  181. package/dist/parser-4E4I3GNT.js +13 -0
  182. package/dist/parser-5FGJSQNS.js +12 -0
  183. package/dist/parser-5HQXCNOS.js +12 -0
  184. package/dist/parser-5QPFOB5F.js +12 -0
  185. package/dist/parser-6B6SSZT7.js +11 -0
  186. package/dist/parser-6PPHAXXH.js +14 -0
  187. package/dist/parser-7JHWEWXM.js +13 -0
  188. package/dist/{parser-5PDYJGWA.js → parser-7JVIDLLR.js} +7 -7
  189. package/dist/parser-CKA3QMAG.js +18 -0
  190. package/dist/parser-CRKLXGW7.js +13 -0
  191. package/dist/parser-EXNBDNGY.js +11 -0
  192. package/dist/parser-FF4BMRSB.js +16 -0
  193. package/dist/parser-FOOFEJQU.js +13 -0
  194. package/dist/parser-G26MTBFS.js +11 -0
  195. package/dist/parser-GKP2MHHL.js +11 -0
  196. package/dist/parser-GN2MM5CC.js +11 -0
  197. package/dist/parser-IKWK2ZU3.js +18 -0
  198. package/dist/parser-IVGHXLZP.js +14 -0
  199. package/dist/parser-NNIL3HXU.js +11 -0
  200. package/dist/parser-RNLTBIJ6.js +19 -0
  201. package/dist/parser-UWRX52PC.js +16 -0
  202. package/dist/parser-VOERD6XR.js +14 -0
  203. package/dist/parser-XNKJCMMA.js +13 -0
  204. package/dist/parser-XVPTRWZ4.js +15 -0
  205. package/dist/parser-YSLNDFLV.js +22 -0
  206. package/dist/parser-ZGNXYFPS.js +15 -0
  207. package/dist/parser-ZQDQTB4X.js +20 -0
  208. package/dist/pert.d.ts +4 -2
  209. package/dist/registry-CaSw0PSH.d.ts +350 -0
  210. package/dist/renderer-2C6DJRYN.js +24 -0
  211. package/dist/renderer-5MPN7CXZ.js +19 -0
  212. package/dist/renderer-6EN5XXJZ.js +27 -0
  213. package/dist/renderer-6WRYVM5R.js +24 -0
  214. package/dist/renderer-7NQSTQMQ.js +16 -0
  215. package/dist/renderer-7ZNVOVFG.js +16 -0
  216. package/dist/{renderer-KQB7UGDS.js → renderer-AK2WO4EI.js} +7 -6
  217. package/dist/renderer-COLQFSFV.js +26 -0
  218. package/dist/renderer-CWEFGEIC.js +36 -0
  219. package/dist/renderer-D3BRNOMV.js +29 -0
  220. package/dist/renderer-HIFQVEJA.js +22 -0
  221. package/dist/renderer-JCZG6AYU.js +28 -0
  222. package/dist/{renderer-6RKQPNJI.js → renderer-JTCX6PCG.js} +13 -13
  223. package/dist/renderer-JWGQSTMR.js +37 -0
  224. package/dist/{renderer-3YPZHMOU.js → renderer-K7XLVPH5.js} +6 -6
  225. package/dist/renderer-KARQF3F3.js +22 -0
  226. package/dist/renderer-LVZAHRP6.js +34 -0
  227. package/dist/{renderer-QXGN5H3A.js → renderer-NE5W7CQP.js} +8 -8
  228. package/dist/renderer-QD2SJF2I.js +34 -0
  229. package/dist/renderer-RLMOTXZ6.js +37 -0
  230. package/dist/renderer-SQ54MDSA.js +26 -0
  231. package/dist/{renderer-UV6MI64M.js → renderer-TYHGXAVT.js} +7 -6
  232. package/dist/renderer-UKXW2QPE.js +23 -0
  233. package/dist/renderer-UPF7NRTI.js +28 -0
  234. package/dist/renderer-VMH6L6CP.js +24 -0
  235. package/dist/{renderer-GHPZMFU2.js → renderer-WCWI4I6A.js} +5 -5
  236. package/dist/renderer-WFSUBKUL.js +25 -0
  237. package/dist/renderer-WNFXYYGL.js +21 -0
  238. package/dist/{renderer-RGIYOTKJ.js → renderer-XTXSOK3L.js} +14 -14
  239. package/dist/renderer-YUKPS27O.js +24 -0
  240. package/dist/renderer-YUXGXGSW.js +27 -0
  241. package/dist/renderer-ZBTEX2JK.js +16 -0
  242. package/dist/renderer-radial-WF6VOUOD.js +21 -0
  243. package/dist/{resolver-EMTGNR3D.js → resolver-WFKZYBJ2.js} +4 -4
  244. package/dist/state-parser-L7DHZIQO.js +19 -0
  245. package/dist/state-renderer-TFEUOP4H.js +38 -0
  246. package/dist/{themes-32xj5ZTW.d.ts → themes-tbBkIVsn.d.ts} +2 -349
  247. package/docs/ai-integration.md +74 -77
  248. package/docs/language-reference.md +329 -290
  249. package/fonts/Inter-Bold.woff2 +0 -0
  250. package/fonts/Inter-Regular.woff2 +0 -0
  251. package/gallery/fixtures/boxes-and-lines-diverging.dgmo +1 -2
  252. package/gallery/fixtures/boxes-and-lines.dgmo +1 -1
  253. package/gallery/fixtures/clock.dgmo +1 -1
  254. package/gallery/fixtures/event-line.dgmo +1 -1
  255. package/gallery/fixtures/gantt-full.dgmo +1 -1
  256. package/gallery/fixtures/gantt-sprints.dgmo +9 -9
  257. package/gallery/fixtures/gantt.dgmo +1 -1
  258. package/gallery/fixtures/legacy-syntax-backcompat.dgmo +16 -0
  259. package/gallery/fixtures/state-tags.dgmo +40 -0
  260. package/gallery/fixtures/swimlane.dgmo +1 -1
  261. package/gallery/fixtures/timeline-intraday.dgmo +1 -1
  262. package/package.json +5 -1
  263. package/dist/analyzer-BJ54GIFB.js +0 -15
  264. package/dist/calculator-LDYQCDDY.js +0 -11
  265. package/dist/charts-d3-7E4B4IMW.js +0 -26
  266. package/dist/dgmo-router-Y2VEX46B.js +0 -86
  267. package/dist/dimensions-F7B5C4BJ.js +0 -22
  268. package/dist/flowchart-parser-MY53QWTZ.js +0 -21
  269. package/dist/layout-46366KBT.js +0 -10
  270. package/dist/layout-46N4JJYK.js +0 -17
  271. package/dist/layout-4DIUOX2T.js +0 -14
  272. package/dist/layout-AM2JWW3X.js +0 -15
  273. package/dist/layout-CBCLPMSG.js +0 -15
  274. package/dist/layout-EE6GE46Y.js +0 -17
  275. package/dist/layout-G23F7LDH.js +0 -9
  276. package/dist/layout-HYZPWAK5.js +0 -18
  277. package/dist/layout-MUPRALE5.js +0 -14
  278. package/dist/layout-YVTNOTN4.js +0 -20
  279. package/dist/layout-ZDOSXL5G.js +0 -19
  280. package/dist/parser-2Q2T4C3B.js +0 -22
  281. package/dist/parser-3A42DZ72.js +0 -11
  282. package/dist/parser-4RFTKAQX.js +0 -15
  283. package/dist/parser-57ILIFZ2.js +0 -20
  284. package/dist/parser-5A2UWU6B.js +0 -11
  285. package/dist/parser-6BJEXUFX.js +0 -13
  286. package/dist/parser-6ZKABF5S.js +0 -22
  287. package/dist/parser-AIMHGJRR.js +0 -19
  288. package/dist/parser-AZJ25OKK.js +0 -13
  289. package/dist/parser-B77S5SZM.js +0 -11
  290. package/dist/parser-BEPSWJAD.js +0 -11
  291. package/dist/parser-BKI42XBQ.js +0 -16
  292. package/dist/parser-C3D7MVXY.js +0 -11
  293. package/dist/parser-CDG7CHV5.js +0 -14
  294. package/dist/parser-CZOJ7XQ6.js +0 -15
  295. package/dist/parser-E2RL6JYF.js +0 -18
  296. package/dist/parser-FQ6GZFMR.js +0 -13
  297. package/dist/parser-GKLZKEIK.js +0 -13
  298. package/dist/parser-H6ABKHZZ.js +0 -12
  299. package/dist/parser-I6GGFKOQ.js +0 -12
  300. package/dist/parser-JA7JQ7NF.js +0 -15
  301. package/dist/parser-OK22AC6Y.js +0 -14
  302. package/dist/parser-OK2ILHRT.js +0 -16
  303. package/dist/parser-OUTPNJWC.js +0 -11
  304. package/dist/parser-PORDUX5E.js +0 -15
  305. package/dist/parser-SRVFR7PM.js +0 -13
  306. package/dist/parser-UKFFZCFJ.js +0 -14
  307. package/dist/parser-UMWPLORP.js +0 -18
  308. package/dist/parser-Z4TZV2CB.js +0 -12
  309. package/dist/renderer-2AUFT3E2.js +0 -24
  310. package/dist/renderer-2HTNBIF2.js +0 -34
  311. package/dist/renderer-3K3IB7D5.js +0 -22
  312. package/dist/renderer-3YNIWF5I.js +0 -16
  313. package/dist/renderer-4WR6WMVF.js +0 -26
  314. package/dist/renderer-66MERVQ2.js +0 -24
  315. package/dist/renderer-ARMJBP6C.js +0 -28
  316. package/dist/renderer-CO2DW7S7.js +0 -37
  317. package/dist/renderer-EDJ2O4S5.js +0 -34
  318. package/dist/renderer-F7U3MFCV.js +0 -22
  319. package/dist/renderer-GD2COXVL.js +0 -16
  320. package/dist/renderer-GQIESYEM.js +0 -25
  321. package/dist/renderer-HCKJDFXD.js +0 -37
  322. package/dist/renderer-HYGHO4SJ.js +0 -28
  323. package/dist/renderer-JC3RDUT7.js +0 -23
  324. package/dist/renderer-NKJ24TEA.js +0 -19
  325. package/dist/renderer-OYO67VZK.js +0 -26
  326. package/dist/renderer-QIWVHWZO.js +0 -15
  327. package/dist/renderer-QRWACQRI.js +0 -21
  328. package/dist/renderer-QXPP4TA2.js +0 -27
  329. package/dist/renderer-RHT4MHFU.js +0 -24
  330. package/dist/renderer-RYR3TJ46.js +0 -36
  331. package/dist/renderer-SRKDNDFB.js +0 -27
  332. package/dist/renderer-TGTUABCI.js +0 -24
  333. package/dist/renderer-TXJFKPOG.js +0 -29
  334. package/dist/renderer-radial-FWABAZHB.js +0 -21
  335. package/dist/state-parser-6T6CNMPX.js +0 -18
  336. package/dist/state-renderer-AWZ3ECAX.js +0 -34
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-6KFWC4CO.js";
9
9
  import {
10
10
  getSeriesColors
11
- } from "./chunk-P6T66CCZ.js";
11
+ } from "./chunk-JYDMBWRP.js";
12
12
 
13
13
  // src/utils/d3-helpers.ts
14
14
  import * as d3Selection from "d3-selection";
@@ -87,7 +87,7 @@ var EXPORT_WIDTH = 1200;
87
87
  var EXPORT_HEIGHT = 800;
88
88
  async function resolveExportPalette(theme, palette) {
89
89
  if (palette) return palette;
90
- const { getPalette } = await import("./palettes-PRJ2RI6D.js");
90
+ const { getPalette } = await import("./palettes-FGTNFARW.js");
91
91
  return theme === "dark" ? getPalette("nord").dark : getPalette("nord").light;
92
92
  }
93
93
  function createExportContainer(width, height) {
@@ -127,4 +127,4 @@ export {
127
127
  createExportContainer,
128
128
  finalizeSvgExport
129
129
  };
130
- //# sourceMappingURL=chunk-U6EQI3U6.js.map
130
+ //# sourceMappingURL=chunk-ADYKAKE3.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-PDKUANDZ.js";
5
5
  import {
6
6
  layoutGraph
7
- } from "./chunk-HFMYN6N2.js";
7
+ } from "./chunk-3B2GXZCX.js";
8
8
  import {
9
9
  appendArrowheadMarkers
10
10
  } from "./chunk-LP7EC4MI.js";
@@ -14,7 +14,7 @@ import {
14
14
  renderNoteBadge,
15
15
  renderNoteBox,
16
16
  renderNoteConnector
17
- } from "./chunk-JEUJOX5X.js";
17
+ } from "./chunk-3IUHKMJI.js";
18
18
  import {
19
19
  EDGE_STROKE_WIDTH,
20
20
  NODE_STROKE_WIDTH
@@ -22,6 +22,12 @@ import {
22
22
  import {
23
23
  ScaleContext
24
24
  } from "./chunk-YYVTBZZC.js";
25
+ import {
26
+ renderIntegratedLegend
27
+ } from "./chunk-W5KMNC5U.js";
28
+ import {
29
+ getMaxLegendReservedHeight
30
+ } from "./chunk-774C2FF3.js";
25
31
  import {
26
32
  TITLE_FONT_SIZE,
27
33
  TITLE_FONT_WEIGHT,
@@ -31,17 +37,26 @@ import {
31
37
  FONT_FAMILY
32
38
  } from "./chunk-6KFWC4CO.js";
33
39
  import {
34
- measureText
35
- } from "./chunk-WCT3NYCV.js";
40
+ parseState
41
+ } from "./chunk-AN2DQB3G.js";
36
42
  import {
37
43
  contrastText,
38
44
  mix,
39
45
  shapeFill,
40
46
  themeBaseBg
41
- } from "./chunk-P6T66CCZ.js";
47
+ } from "./chunk-JYDMBWRP.js";
42
48
  import {
43
- parseState
44
- } from "./chunk-5F5ELR3V.js";
49
+ measureText
50
+ } from "./chunk-4ASYQ347.js";
51
+ import {
52
+ resolveActiveTagGroup,
53
+ resolveTagColor,
54
+ tagAttrKey
55
+ } from "./chunk-CMVZWP32.js";
56
+ import {
57
+ fillModeFromOptions,
58
+ legendSuppressed
59
+ } from "./chunk-YJVA3QUU.js";
45
60
 
46
61
  // src/graph/state-renderer.ts
47
62
  import * as d3Selection from "d3-selection";
@@ -58,11 +73,9 @@ var GROUP_EXTRA_PADDING = 12;
58
73
  function stateDefaultColor(palette, colorOff) {
59
74
  return colorOff ? palette.textMuted : palette.colors.blue;
60
75
  }
61
- function stateFill(palette, isDark, nodeColor, colorOff, solid) {
76
+ function stateFill(palette, isDark, nodeColor, colorOff, fillMode) {
62
77
  const color = nodeColor ?? stateDefaultColor(palette, colorOff);
63
- return shapeFill(palette, color, isDark, {
64
- ...solid !== void 0 && { solid }
65
- });
78
+ return shapeFill(palette, color, isDark, { mode: fillMode });
66
79
  }
67
80
  function stateStroke(palette, nodeColor, colorOff) {
68
81
  return nodeColor ?? stateDefaultColor(palette, colorOff);
@@ -99,6 +112,23 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
99
112
  const sGroupExtraPadding = ctx.aesthetic(GROUP_EXTRA_PADDING);
100
113
  const showTitle = !!graph.title && graph.options["no-title"] !== "on";
101
114
  const titleHeight = showTitle ? 40 : 0;
115
+ const tagGroups = graph.tagGroups ?? [];
116
+ const activeTagGroup = resolveActiveTagGroup(
117
+ tagGroups,
118
+ graph.options["active-tag"]
119
+ );
120
+ const legendGroups = tagGroups;
121
+ const hasLegend = legendGroups.length > 0 && !legendSuppressed(graph.options);
122
+ const legendH = hasLegend ? ctx.structural(
123
+ getMaxLegendReservedHeight(
124
+ {
125
+ groups: legendGroups,
126
+ position: { placement: "top-center", titleRelation: "below-title" },
127
+ mode: exportDims ? "export" : "preview"
128
+ },
129
+ width
130
+ )
131
+ ) + 8 : 0;
102
132
  const diagramW = layout.width;
103
133
  const diagramH = layout.height;
104
134
  const { scale, offsetX, offsetY, canvasHeight } = fitDiagramToCanvas({
@@ -107,7 +137,9 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
107
137
  diagramW,
108
138
  diagramH,
109
139
  padding: sDiagramPadding,
110
- titleHeight,
140
+ // The legend band sits directly under the title, so it reserves the same
141
+ // top strip fitDiagramToCanvas already offsets the diagram by.
142
+ titleHeight: titleHeight + legendH,
111
143
  maxScale: MAX_SCALE,
112
144
  exportMode: !!exportDims
113
145
  });
@@ -140,6 +172,21 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
140
172
  }
141
173
  }
142
174
  }
175
+ if (hasLegend) {
176
+ const legendG = svg.append("g").attr("transform", `translate(0, ${titleHeight + 4})`);
177
+ renderIntegratedLegend(legendG, {
178
+ groups: legendGroups,
179
+ activeGroup: activeTagGroup,
180
+ mode: exportDims ? "export" : "preview",
181
+ // Inactive sibling groups stay visible as collapsed pills so the user
182
+ // can click one to flip the active colouring dimension (as in b&l).
183
+ showInactivePills: true,
184
+ palette,
185
+ isDark,
186
+ width
187
+ });
188
+ legendG.selectAll("[data-legend-group]").classed("st-legend-group", true);
189
+ }
143
190
  const contentG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
144
191
  for (const group of layout.groups) {
145
192
  if (group.collapsed) continue;
@@ -148,7 +195,8 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
148
195
  const gy = group.y - sGroupExtraPadding - sGroupLabelFontSize - 4;
149
196
  const gw = group.width + sGroupExtraPadding * 2;
150
197
  const gh = group.height + sGroupExtraPadding * 2 + sGroupLabelFontSize + 4;
151
- const fillColor = group.color ? mix(group.color, themeBaseBg(palette, isDark), 10) : isDark ? palette.surface : mix(palette.border, palette.bg, 30);
198
+ const groupOutline = fillModeFromOptions(graph.options ?? {}) === "outline";
199
+ const fillColor = groupOutline ? themeBaseBg(palette, isDark) : group.color ? mix(group.color, themeBaseBg(palette, isDark), 10) : isDark ? palette.surface : mix(palette.border, palette.bg, 30);
152
200
  const strokeColor = group.color ?? palette.textMuted;
153
201
  const groupWrapper = contentG.append("g").attr("class", "st-group-wrapper").attr("data-line-number", String(group.lineNumber)).attr("data-group-id", group.id).attr("data-group-toggle", group.id).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "true").attr("aria-label", `Collapse group ${group.label}`).style("cursor", "pointer");
154
202
  groupWrapper.append("rect").attr("x", gx).attr("y", gy).attr("width", gw).attr("height", gh).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "st-group");
@@ -242,11 +290,24 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
242
290
  if (group.collapsed) collapsedGroupIds.add(group.id);
243
291
  }
244
292
  const colorOff = graph.options?.["color"] === "off";
245
- const solid = graph.options?.["solid-fill"] === "on";
293
+ const fillMode = fillModeFromOptions(graph.options ?? {});
246
294
  const noNotes = graph.options?.["no-notes"] === "on";
295
+ const mutableTagGroups = [...tagGroups];
296
+ const nodeIntentColor = (node) => node.color ?? (activeTagGroup ? resolveTagColor(
297
+ node.metadata ?? {},
298
+ mutableTagGroups,
299
+ activeTagGroup
300
+ ) : void 0);
247
301
  for (const node of layout.nodes) {
248
302
  const isCollapsedGroup = collapsedGroupIds.has(node.id);
249
303
  const nodeG = contentG.append("g").attr("transform", `translate(${node.x}, ${node.y})`).attr("class", isCollapsedGroup ? "st-group-wrapper st-node" : "st-node").attr("data-line-number", String(node.lineNumber)).attr("data-node-id", node.id).style("cursor", "pointer");
304
+ if (activeTagGroup && node.shape !== "pseudostate") {
305
+ const tagKey = tagAttrKey(activeTagGroup);
306
+ const metaValue = node.metadata?.[tagKey];
307
+ if (metaValue) {
308
+ nodeG.attr(`data-tag-${tagKey}`, metaValue.toLowerCase());
309
+ }
310
+ }
250
311
  if (isCollapsedGroup) {
251
312
  nodeG.attr("data-group-toggle", node.id).attr("tabindex", "0").attr("role", "button").attr("aria-expanded", "false").attr("aria-label", `Expand group ${node.label}`);
252
313
  }
@@ -261,8 +322,10 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
261
322
  } else if (isCollapsedGroup) {
262
323
  const w = node.width;
263
324
  const h = node.height;
264
- const groupColor = node.color ?? stateDefaultColor(palette, colorOff);
265
- const fillColor = shapeFill(palette, groupColor, isDark, { solid });
325
+ const groupColor = nodeIntentColor(node) ?? stateDefaultColor(palette, colorOff);
326
+ const fillColor = shapeFill(palette, groupColor, isDark, {
327
+ mode: fillMode
328
+ });
266
329
  const strokeColor = groupColor;
267
330
  const COLLAPSE_BAR_H = 6;
268
331
  nodeG.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", sStateCornerRadius).attr("ry", sStateCornerRadius).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", sNodeStrokeWidth);
@@ -280,14 +343,15 @@ function renderState(container, graph, layout, palette, isDark, onClickItem, exp
280
343
  } else {
281
344
  const w = node.width;
282
345
  const h = node.height;
346
+ const intentColor = nodeIntentColor(node);
283
347
  const resolvedFill = stateFill(
284
348
  palette,
285
349
  isDark,
286
- node.color,
350
+ intentColor,
287
351
  colorOff,
288
- solid
352
+ fillMode
289
353
  );
290
- nodeG.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", sStateCornerRadius).attr("ry", sStateCornerRadius).attr("fill", resolvedFill).attr("stroke", stateStroke(palette, node.color, colorOff)).attr("stroke-width", sNodeStrokeWidth);
354
+ nodeG.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", sStateCornerRadius).attr("ry", sStateCornerRadius).attr("fill", resolvedFill).attr("stroke", stateStroke(palette, intentColor, colorOff)).attr("stroke-width", sNodeStrokeWidth);
291
355
  nodeG.append("text").attr("x", 0).attr("y", 0).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr(
292
356
  "fill",
293
357
  contrastText(
@@ -375,4 +439,4 @@ export {
375
439
  renderState,
376
440
  renderStateForExport
377
441
  };
378
- //# sourceMappingURL=chunk-VNSXLA6G.js.map
442
+ //# sourceMappingURL=chunk-AHXIMHDQ.js.map
@@ -0,0 +1,404 @@
1
+ import {
2
+ formatLocalISODate
3
+ } from "./chunk-3TYUXC7D.js";
4
+ import {
5
+ isTagBlockHeading,
6
+ matchTagBlockHeading
7
+ } from "./chunk-CMVZWP32.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-AIMLCDAO.js.map
@@ -10,10 +10,10 @@ import {
10
10
  splitNameAndMeta,
11
11
  tryParseSharedOption,
12
12
  warnUnknownMetaKeys
13
- } from "./chunk-LV4BETUU.js";
13
+ } from "./chunk-YJVA3QUU.js";
14
14
  import {
15
15
  resolveColorWithDiagnostic
16
- } from "./chunk-TLVIHFRO.js";
16
+ } from "./chunk-ZKPPI6BF.js";
17
17
  import {
18
18
  NAME_DIAGNOSTIC_CODES,
19
19
  emit,
@@ -21,7 +21,7 @@ import {
21
21
  makeFail,
22
22
  nameMergedMessage,
23
23
  suggest
24
- } from "./chunk-CXK4DZH3.js";
24
+ } from "./chunk-4W2PE66Q.js";
25
25
 
26
26
  // src/raci/diagnostics.ts
27
27
  var RACI_DX = {
@@ -952,4 +952,4 @@ export {
952
952
  parseRaci,
953
953
  allTasks
954
954
  };
955
- //# sourceMappingURL=chunk-6MNGECP2.js.map
955
+ //# sourceMappingURL=chunk-ALYZ3MAA.js.map