@diagrammo/dgmo 0.89.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +589 -15
  3. package/dist/advanced.js +813 -211
  4. package/dist/block.d.ts +11 -2
  5. package/dist/block.js +94 -64
  6. package/dist/{calculator-35YVW4QO.js → calculator-3LZUWOBK.js} +2 -2
  7. package/dist/{chart-meta-Bev5Ebjr.d.ts → chart-meta-B_WTMP0y.d.ts} +1 -1
  8. package/dist/chart-meta.d.ts +2 -2
  9. package/dist/chart-meta.js +18 -17
  10. package/dist/{chart-types-Bf8C5QQW.d.ts → chart-types-V2NcgN5O.d.ts} +4 -0
  11. package/dist/{charts-d3-KEQSUWKP.js → charts-d3-YXD6VGZQ.js} +8 -7
  12. package/dist/{chunk-PMNITNPR.js → chunk-273GB7WK.js} +6 -5
  13. package/dist/{chunk-HAMF4F3P.js → chunk-2A4OFZ2Z.js} +5 -5
  14. package/dist/{chunk-K5XT7NHD.js → chunk-2AM6VA3A.js} +10 -10
  15. package/dist/{chunk-XJ2TBXHA.js → chunk-2UV627GG.js} +9 -9
  16. package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
  17. package/dist/{chunk-JVZ7KFAX.js → chunk-37QQXKFV.js} +9 -10
  18. package/dist/{chunk-M2BCY7H3.js → chunk-3LINSNJT.js} +199 -146
  19. package/dist/{chunk-WPL5PFXE.js → chunk-3SLRZKLB.js} +6 -6
  20. package/dist/chunk-3UR4F7FE.js +14 -0
  21. package/dist/{chunk-ZUCXFXLD.js → chunk-3YTAOMMN.js} +2 -2
  22. package/dist/{chunk-NIUO2TNR.js → chunk-4HG4PYHM.js} +197 -203
  23. package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
  24. package/dist/{chunk-HUNDJTTH.js → chunk-53BJIOLF.js} +1 -1
  25. package/dist/{chunk-LR6RRDWN.js → chunk-57L2JPP2.js} +10 -6
  26. package/dist/{chunk-IIOLFAGJ.js → chunk-5DIBB2QG.js} +51 -32
  27. package/dist/{chunk-S2WE7TVK.js → chunk-5MDQMB6A.js} +1 -1
  28. package/dist/{chunk-7Z2VFRP5.js → chunk-5U6DXIMV.js} +47 -24
  29. package/dist/{chunk-QIOYTQDZ.js → chunk-5VPWIC6T.js} +9 -9
  30. package/dist/{chunk-JRUEIRJB.js → chunk-634LDSN6.js} +3 -3
  31. package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
  32. package/dist/{chunk-LPYYZCSI.js → chunk-6NO3MNBC.js} +3 -3
  33. package/dist/{chunk-ITSBBQTH.js → chunk-6QEXWMBP.js} +13 -17
  34. package/dist/{chunk-DDPGEGHB.js → chunk-7BBRSOKS.js} +3 -3
  35. package/dist/{chunk-WQ6G6FFM.js → chunk-AR4QVMWG.js} +5 -2
  36. package/dist/{chunk-BB6QKWHZ.js → chunk-B6EUFLRP.js} +10 -10
  37. package/dist/{chunk-C4FRGZGX.js → chunk-CDT33RHG.js} +1 -1
  38. package/dist/{chunk-WP22MHH6.js → chunk-CPGKRI7H.js} +10 -13
  39. package/dist/{chunk-ZNNVI5SR.js → chunk-CU2PZLZP.js} +53 -31
  40. package/dist/{chunk-CUYHST3B.js → chunk-CVZBLHHW.js} +1 -1
  41. package/dist/{chunk-Y7PSAHAY.js → chunk-CXIPV2FY.js} +3 -3
  42. package/dist/{chunk-NRPELUB6.js → chunk-D7DXNQW5.js} +2 -2
  43. package/dist/{chunk-YMFQLWZ2.js → chunk-D7PP35BA.js} +1 -1
  44. package/dist/{chunk-RGWYZR3S.js → chunk-DLX7MEN4.js} +2 -2
  45. package/dist/chunk-EDPDAUBL.js +825 -0
  46. package/dist/{chunk-GSYZZFI5.js → chunk-EP7BT3HU.js} +2 -2
  47. package/dist/{chunk-ICZ7M6IZ.js → chunk-EQJ3U5EW.js} +1 -1
  48. package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
  49. package/dist/{chunk-XUCQVKLQ.js → chunk-F2436VRR.js} +4 -4
  50. package/dist/{chunk-UG2XG57E.js → chunk-F26ZPBSF.js} +3 -3
  51. package/dist/{chunk-UWKRPQZO.js → chunk-FJCYK4K3.js} +25 -22
  52. package/dist/{chunk-FKLE6QA3.js → chunk-G22UV5AF.js} +12 -12
  53. package/dist/{chunk-GUTZCRBT.js → chunk-G3EUQMV4.js} +4 -4
  54. package/dist/{chunk-SOPM5PLO.js → chunk-GCDW3WAY.js} +14 -14
  55. package/dist/{chunk-7UDAIP6W.js → chunk-HFG7KQOY.js} +13 -15
  56. package/dist/{chunk-ID2K3IHI.js → chunk-HLE5QGZJ.js} +1 -1
  57. package/dist/{chunk-QFHWYWQL.js → chunk-HLVGZXM5.js} +2 -2
  58. package/dist/{chunk-7C2RAGPT.js → chunk-HSGWR2FL.js} +16 -16
  59. package/dist/{chunk-P3SKSKJI.js → chunk-HWXUQCDY.js} +3 -3
  60. package/dist/{chunk-HTWH2XQL.js → chunk-HYV6GSXM.js} +6 -3
  61. package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
  62. package/dist/chunk-IHK3Y2HG.js +781 -0
  63. package/dist/{chunk-7KPHRTND.js → chunk-II4XJETG.js} +1 -1
  64. package/dist/{chunk-RXIKESRI.js → chunk-IMHNZITR.js} +2 -2
  65. package/dist/{chunk-TAP2NZEU.js → chunk-IMKPFW67.js} +13 -13
  66. package/dist/{chunk-FKZ2Y3Q5.js → chunk-IS6WFBX7.js} +3 -3
  67. package/dist/{chunk-47E5UTXE.js → chunk-IUBCDNT2.js} +2 -2
  68. package/dist/{chunk-EXKCRXPO.js → chunk-IWTUXGHN.js} +12 -12
  69. package/dist/{chunk-C7QRRTAW.js → chunk-J2SQNZ6D.js} +2 -2
  70. package/dist/{chunk-DZPHN2WN.js → chunk-JA2S7PHR.js} +14 -14
  71. package/dist/{chunk-DPSMX4EY.js → chunk-JJQWCI35.js} +4 -4
  72. package/dist/chunk-JJUDOR4I.js +110 -0
  73. package/dist/{chunk-LYLNMN77.js → chunk-K3BYD3WU.js} +8 -3
  74. package/dist/{chunk-3AQJNY65.js → chunk-KFXY5IW2.js} +149 -43
  75. package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
  76. package/dist/{chunk-LCJURK7L.js → chunk-LKR4FACF.js} +2 -4
  77. package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
  78. package/dist/{chunk-IJ27L3R4.js → chunk-MA42PIGJ.js} +1 -1
  79. package/dist/{chunk-IQ6P3HDE.js → chunk-MI6SJJQU.js} +2 -2
  80. package/dist/{chunk-N4BBSDWI.js → chunk-MJKQ5ZYY.js} +140 -151
  81. package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
  82. package/dist/{chunk-AZ24RI5L.js → chunk-MNL547RV.js} +6 -6
  83. package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
  84. package/dist/{chunk-ECMA6XE2.js → chunk-N254IJM2.js} +13 -13
  85. package/dist/{layout-search-YKUL4VBV.js → chunk-NWPMLX2V.js} +27 -30
  86. package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
  87. package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
  88. package/dist/{chunk-B3S76BZO.js → chunk-PSGSFRRE.js} +4 -4
  89. package/dist/{chunk-4AJKOUBO.js → chunk-PUZ63XZM.js} +13 -11
  90. package/dist/{chunk-UQLHKLF4.js → chunk-PZVTFQI2.js} +8 -8
  91. package/dist/{chunk-W7QN5BC5.js → chunk-Q3N7PI3B.js} +180 -7
  92. package/dist/{chunk-L5AFONQU.js → chunk-QKJ6MQXW.js} +2 -4
  93. package/dist/{chunk-7SX4IY6T.js → chunk-QVKTAU7P.js} +1 -1
  94. package/dist/{chunk-SLQT3JP3.js → chunk-R7BSF7Z7.js} +1 -1
  95. package/dist/{chunk-4R6OMKXB.js → chunk-RHXIUUWB.js} +5 -5
  96. package/dist/{chunk-MHAYUS65.js → chunk-RMTOZALT.js} +8 -5
  97. package/dist/{chunk-HSRQDWV7.js → chunk-ROCBGUJN.js} +8 -17
  98. package/dist/{chunk-44FTCIRI.js → chunk-RVTYIGWZ.js} +9 -9
  99. package/dist/{chunk-RU725VCJ.js → chunk-SKF7XLCM.js} +10 -35
  100. package/dist/{chunk-RPKBWJBB.js → chunk-SMTWQ66K.js} +6 -6
  101. package/dist/{chunk-3AX6MCI6.js → chunk-SPQVER4T.js} +2 -2
  102. package/dist/{chunk-CX6OH5WP.js → chunk-SWBHH2UW.js} +4 -4
  103. package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
  104. package/dist/{chunk-7TF3QOOD.js → chunk-TIVMAITN.js} +14 -0
  105. package/dist/{chunk-NSR2CGV6.js → chunk-TLPY4ZBI.js} +611 -437
  106. package/dist/{chunk-WRCAH3UO.js → chunk-TPEYEOXA.js} +15 -15
  107. package/dist/{chunk-FJNXXGTR.js → chunk-UWJP4JSZ.js} +3 -3
  108. package/dist/{chunk-MY6GUH26.js → chunk-V3KHZQPK.js} +3 -3
  109. package/dist/{chunk-66YFDTT6.js → chunk-VGSSAMLA.js} +4 -4
  110. package/dist/{chunk-Q6SQISHT.js → chunk-VMD2CYVP.js} +311 -74
  111. package/dist/{chunk-MFW6P7WH.js → chunk-WNTPJZU7.js} +3 -3
  112. package/dist/{chunk-7W4XLIVH.js → chunk-WTE27AJT.js} +14 -14
  113. package/dist/{chunk-UKJLPA7R.js → chunk-X6IZP2BD.js} +1 -1
  114. package/dist/{chunk-2GM7N5TV.js → chunk-XLAREWBK.js} +9 -9
  115. package/dist/{chunk-AYOVY75O.js → chunk-XLPJJ35N.js} +4 -4
  116. package/dist/{chunk-NGC3IZRY.js → chunk-XQTRGKQ3.js} +4 -4
  117. package/dist/{chunk-WEF6MXFG.js → chunk-YZG37S7L.js} +9 -9
  118. package/dist/{chunk-LFKSHDVI.js → chunk-ZB2Q67NO.js} +14 -13
  119. package/dist/{chunk-JQ57AWDL.js → chunk-ZJ4PYTCK.js} +1 -1
  120. package/dist/completion-registry.d.ts +6 -0
  121. package/dist/completion-registry.js +62 -6
  122. package/dist/{compute-JAP5E2E4.js → compute-2XWFVO7K.js} +1 -1
  123. package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
  124. package/dist/dgmo-router-YHBMKTXY.js +94 -0
  125. package/dist/{dimensions-7MF7VSGS.js → dimensions-QMGWJQTR.js} +5 -5
  126. package/dist/editor.js +12 -0
  127. package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-BLJ6RA53.js} +4 -4
  128. package/dist/{flowchart-renderer-DZQZRL2F.js → flowchart-renderer-FXRQKXAK.js} +12 -8
  129. package/dist/highlight.js +12 -0
  130. package/dist/index.d.ts +26 -5
  131. package/dist/index.js +84 -57
  132. package/dist/{layout-5VSMZPMG.js → layout-5HCEF7VO.js} +1 -1
  133. package/dist/{layout-6L3BIFEZ.js → layout-6PLSBB5X.js} +3 -3
  134. package/dist/{layout-UIV56NUA.js → layout-B7PQRAMB.js} +1 -1
  135. package/dist/{layout-IGAVGDME.js → layout-CCVCLZ6S.js} +1 -1
  136. package/dist/{layout-PP36LUTA.js → layout-CRUAP7JG.js} +3 -3
  137. package/dist/{layout-Q3RYSODA.js → layout-G42FDCF3.js} +3 -3
  138. package/dist/{layout-EFEZ533S.js → layout-IV4H2FLB.js} +3 -3
  139. package/dist/{layout-4RRC7XU7.js → layout-JTNRSGOS.js} +6 -3
  140. package/dist/{layout-H4K54IW3.js → layout-RBLD5EGX.js} +6 -3
  141. package/dist/{layout-SW3XWYKC.js → layout-ROAVGBUC.js} +1 -1
  142. package/dist/{layout-XUW444O5.js → layout-T2DQ4M77.js} +8 -4
  143. package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
  144. package/dist/{layout-DXVAYF6W.js → layout-VRJ5YFUE.js} +2 -2
  145. package/dist/{layout-ZP7XYVXF.js → layout-YKGQRFDM.js} +2 -4
  146. package/dist/layout-search-L75YOBME.js +42 -0
  147. package/dist/{palettes-WZAIQTEG.js → palettes-WQHELGVQ.js} +2 -1
  148. package/dist/{parser-ZLKYDFI5.js → parser-2XCDVLSN.js} +3 -3
  149. package/dist/{parser-GZ3LVF72.js → parser-3MGA2MTM.js} +2 -2
  150. package/dist/{parser-NOANDFJ4.js → parser-4AR25MAS.js} +2 -2
  151. package/dist/{parser-GCCWMBTU.js → parser-4QNRCGU5.js} +5 -4
  152. package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
  153. package/dist/{parser-WEVTMBJ5.js → parser-6NSQLPTS.js} +3 -3
  154. package/dist/{parser-KYPP2DX6.js → parser-6X4GGH2R.js} +4 -4
  155. package/dist/parser-AL6YL7KM.js +12 -0
  156. package/dist/{parser-5655XSOR.js → parser-D6YRVV75.js} +3 -3
  157. package/dist/{parser-NGHQQGD2.js → parser-EY3VJWBE.js} +3 -3
  158. package/dist/{parser-TL3JA4RI.js → parser-EYF4ZSZO.js} +3 -3
  159. package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
  160. package/dist/{parser-JOOAVBJI.js → parser-H2DJEAPG.js} +3 -3
  161. package/dist/{parser-AKBVJHMK.js → parser-ILWAA3QJ.js} +3 -3
  162. package/dist/{parser-AN3MGHRL.js → parser-KMFMNZYI.js} +3 -3
  163. package/dist/{parser-IMM2JJX3.js → parser-MDSVVCJP.js} +4 -4
  164. package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
  165. package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
  166. package/dist/{parser-DGF3ZEO6.js → parser-QL4DEPVA.js} +4 -4
  167. package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
  168. package/dist/{parser-GEKPWSSK.js → parser-UEDPLM46.js} +3 -3
  169. package/dist/{parser-KZMALSB2.js → parser-UL6WN6W5.js} +4 -4
  170. package/dist/{parser-J4DVNL4W.js → parser-ULSUK36C.js} +4 -4
  171. package/dist/{parser-KZMJNKDW.js → parser-UY3K4ROB.js} +2 -2
  172. package/dist/{parser-KFYRTGTC.js → parser-UYQNNQKT.js} +4 -4
  173. package/dist/{parser-DHSFIUPU.js → parser-VG747VR6.js} +3 -3
  174. package/dist/{parser-UTXFJG4X.js → parser-VK4PNDX4.js} +3 -3
  175. package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
  176. package/dist/{parser-NPXPJHWN.js → parser-X5FQ36KJ.js} +3 -3
  177. package/dist/{parser-OKB64MMN.js → parser-XO5IAXMT.js} +3 -3
  178. package/dist/{parser-HCGXNHHL.js → parser-YVHO2NRM.js} +3 -3
  179. package/dist/{parser-P4TOQYNN.js → parser-YWZGIU3C.js} +3 -3
  180. package/dist/{parser-337TACHB.js → parser-ZFLSULFC.js} +3 -3
  181. package/dist/{parser-7OEE7QT6.js → parser-ZR7JAKSW.js} +2 -2
  182. package/dist/{renderer-CHQZES6G.js → renderer-3N64GVNM.js} +2 -2
  183. package/dist/{renderer-JR2XNZAH.js → renderer-43IVPARP.js} +5 -5
  184. package/dist/{renderer-J4OS77PK.js → renderer-4MEZYGU6.js} +3 -3
  185. package/dist/{renderer-IR5GGAPB.js → renderer-54GXA3UO.js} +11 -7
  186. package/dist/{renderer-7VQOKAII.js → renderer-7EAWN7MC.js} +6 -6
  187. package/dist/{renderer-QQHQY3GT.js → renderer-7SEXPBGM.js} +5 -5
  188. package/dist/{renderer-P4XCRNCY.js → renderer-B7B7BQM3.js} +9 -9
  189. package/dist/{renderer-7HOSI6JJ.js → renderer-I2LYSQBV.js} +4 -4
  190. package/dist/{renderer-6OQM32X3.js → renderer-IPDCAACY.js} +3 -3
  191. package/dist/{renderer-JRVY7HAD.js → renderer-J2LOMTBC.js} +4 -4
  192. package/dist/renderer-JUH6M3XF.js +46 -0
  193. package/dist/renderer-KY6O5JTX.js +80 -0
  194. package/dist/{renderer-FCXRDYSJ.js → renderer-LHTDI5RV.js} +7 -7
  195. package/dist/{renderer-XHEMXBQM.js → renderer-LWL3IJOF.js} +5 -5
  196. package/dist/{renderer-BLHN3RCY.js → renderer-MRMFYYZT.js} +2 -2
  197. package/dist/{renderer-DBNDLKPE.js → renderer-NCIDGJ2R.js} +7 -7
  198. package/dist/{renderer-3AD4NDF5.js → renderer-OPA4JJKX.js} +6 -6
  199. package/dist/{renderer-XFEZ5UBE.js → renderer-QMNC7TGN.js} +6 -6
  200. package/dist/{renderer-5GZNGZU5.js → renderer-QQNPJGAP.js} +9 -7
  201. package/dist/{renderer-CEIX5JPA.js → renderer-R7OYCJEA.js} +2 -2
  202. package/dist/{renderer-WQ654YT5.js → renderer-R7RK7FKI.js} +1 -1
  203. package/dist/{renderer-4JE5ORRO.js → renderer-RFP55AW7.js} +13 -10
  204. package/dist/{renderer-NAA7D33G.js → renderer-S3NFBJCY.js} +15 -11
  205. package/dist/{renderer-43ESBXVY.js → renderer-SD4ZHHAR.js} +8 -6
  206. package/dist/{renderer-WB75JME5.js → renderer-SE7Z5AOL.js} +6 -6
  207. package/dist/{renderer-YTEZK3GC.js → renderer-T2WUA7MC.js} +7 -7
  208. package/dist/{renderer-VYWCMRWA.js → renderer-TWKEZ3DD.js} +5 -5
  209. package/dist/{renderer-DCJ4AQ3N.js → renderer-U5PD72G7.js} +5 -5
  210. package/dist/{renderer-EAORWLVK.js → renderer-VCTKBUTR.js} +7 -7
  211. package/dist/{renderer-7L7J4DHO.js → renderer-VNZTWATB.js} +7 -6
  212. package/dist/{renderer-2ZQ6DPVD.js → renderer-YDNWK6RI.js} +2 -2
  213. package/dist/{renderer-VGQMJC5K.js → renderer-YDOWBIUB.js} +11 -10
  214. package/dist/{renderer-7MCC6GKH.js → renderer-YQPZ7O2C.js} +2 -2
  215. package/dist/{renderer-ZXQXRNDR.js → renderer-ZQ77CM6Y.js} +6 -6
  216. package/dist/{renderer-radial-NA5DVBG4.js → renderer-radial-TNNEL3YN.js} +5 -5
  217. package/dist/{resolver-XSXE2TRX.js → resolver-6DJLZF6Y.js} +1 -1
  218. package/dist/{state-parser-FE3RF6XY.js → state-parser-NIIVOU2Y.js} +4 -4
  219. package/dist/{state-renderer-4S2C2CHB.js → state-renderer-TVLEG32M.js} +14 -10
  220. package/dist/{themes-CzuBdx1T.d.ts → themes-Cm2YBcT8.d.ts} +38 -2
  221. package/docs/ai-integration.md +4 -3
  222. package/docs/language-reference.md +162 -12
  223. package/gallery/fixtures/sketch.dgmo +2 -2
  224. package/gallery/fixtures/whiteboard.dgmo +18 -0
  225. package/package.json +2 -1
  226. package/dist/chunk-6EK55ART.js +0 -116
  227. package/dist/chunk-HTNLLT34.js +0 -72
  228. package/dist/dgmo-router-7WANZOBD.js +0 -92
  229. package/dist/renderer-TJJGFQGT.js +0 -78
  230. package/dist/{chunk-3FCSOYN4.js → chunk-5P2L5QXE.js} +0 -0
  231. package/dist/{chunk-HJRP6PXL.js → chunk-BQVTV4LB.js} +0 -0
  232. package/dist/{chunk-LYRDIVSY.js → chunk-GLCMUTO5.js} +0 -0
  233. package/dist/{chunk-5LE2CTLS.js → chunk-NTJ5HVV6.js} +3 -3
@@ -1,16 +1,19 @@
1
1
  import {
2
2
  MAP_DIAGNOSTICS
3
3
  } from "./chunk-EOYPX6SF.js";
4
+ import {
5
+ parseCountdown
6
+ } from "./chunk-ZJ4PYTCK.js";
4
7
  import {
5
8
  parseClock
6
- } from "./chunk-WP2RLGDI.js";
9
+ } from "./chunk-TCX5PMEY.js";
7
10
  import {
8
11
  parseBracket
9
- } from "./chunk-ZUCXFXLD.js";
12
+ } from "./chunk-3YTAOMMN.js";
10
13
  import {
11
14
  BODY_DIAGNOSTICS,
12
15
  parseBody
13
- } from "./chunk-47E5UTXE.js";
16
+ } from "./chunk-IUBCDNT2.js";
14
17
  import {
15
18
  EXTENDED_CHART_DOORS,
16
19
  parseChart,
@@ -19,141 +22,150 @@ import {
19
22
  parseHeatmap,
20
23
  parseSankey,
21
24
  parseScatter
22
- } from "./chunk-7UDAIP6W.js";
25
+ } from "./chunk-HFG7KQOY.js";
26
+ import {
27
+ parseTechRadar
28
+ } from "./chunk-MKFQ5E7J.js";
23
29
  import {
24
30
  parseCycle
25
- } from "./chunk-WQ6G6FFM.js";
31
+ } from "./chunk-AR4QVMWG.js";
26
32
  import {
27
33
  parseJourneyMap
28
- } from "./chunk-B3S76BZO.js";
34
+ } from "./chunk-PSGSFRRE.js";
29
35
  import {
30
36
  parsePyramid
31
- } from "./chunk-PIXJL77H.js";
37
+ } from "./chunk-M6J25PAZ.js";
32
38
  import {
33
39
  parseRing
34
- } from "./chunk-3C2FWS2J.js";
40
+ } from "./chunk-EWERNTOX.js";
35
41
  import {
36
42
  TREEMAP_DIAGNOSTICS,
37
43
  parseTreemap
38
- } from "./chunk-P3SKSKJI.js";
44
+ } from "./chunk-HWXUQCDY.js";
39
45
  import {
40
46
  parseBlock
41
- } from "./chunk-MY6GUH26.js";
47
+ } from "./chunk-V3KHZQPK.js";
42
48
  import {
43
49
  parseGoal
44
- } from "./chunk-BOO24UMJ.js";
45
- import {
46
- parseCountdown
47
- } from "./chunk-JQ57AWDL.js";
50
+ } from "./chunk-4YO7VJTP.js";
48
51
  import {
49
52
  parseMap
50
- } from "./chunk-HTWH2XQL.js";
53
+ } from "./chunk-HYV6GSXM.js";
51
54
  import {
52
55
  parseBoxesAndLines
53
- } from "./chunk-MHAYUS65.js";
56
+ } from "./chunk-RMTOZALT.js";
54
57
  import {
55
58
  parseSketch
56
- } from "./chunk-RU725VCJ.js";
59
+ } from "./chunk-SKF7XLCM.js";
57
60
  import {
58
61
  SKETCH_DIAGNOSTICS
59
- } from "./chunk-DV2VEJCC.js";
62
+ } from "./chunk-NWSPPGIE.js";
63
+ import {
64
+ WHITEBOARD_DIAGNOSTICS,
65
+ parseWhiteboard
66
+ } from "./chunk-IHK3Y2HG.js";
60
67
  import {
61
68
  SWIMLANE_DIAGNOSTICS,
62
69
  parseSwimlane
63
- } from "./chunk-C7QRRTAW.js";
70
+ } from "./chunk-J2SQNZ6D.js";
64
71
  import {
65
72
  FAMILY_DIAGNOSTICS,
66
73
  parseFamily
67
- } from "./chunk-FKZ2Y3Q5.js";
74
+ } from "./chunk-IS6WFBX7.js";
68
75
  import {
69
76
  parseMindmap
70
- } from "./chunk-NGC3IZRY.js";
71
- import {
72
- parseTechRadar
73
- } from "./chunk-6K7RODXG.js";
77
+ } from "./chunk-XQTRGKQ3.js";
74
78
  import {
75
79
  EVENT_LINE_DIAGNOSTICS,
76
80
  parseEventLine
77
- } from "./chunk-66YFDTT6.js";
81
+ } from "./chunk-VGSSAMLA.js";
78
82
  import {
79
83
  parseTimelineEventLine
80
- } from "./chunk-GDJW64XE.js";
84
+ } from "./chunk-OYKNMFUY.js";
81
85
  import {
82
86
  VERSION_CONTROL_DIAGNOSTICS,
83
87
  parseVersionControl
84
- } from "./chunk-QFHWYWQL.js";
88
+ } from "./chunk-HLVGZXM5.js";
85
89
  import {
86
90
  parseKanban
87
- } from "./chunk-DPSMX4EY.js";
91
+ } from "./chunk-JJQWCI35.js";
88
92
  import {
89
93
  parseC4
90
- } from "./chunk-GSYZZFI5.js";
94
+ } from "./chunk-EP7BT3HU.js";
91
95
  import {
92
96
  parseInfra
93
- } from "./chunk-GUTZCRBT.js";
97
+ } from "./chunk-G3EUQMV4.js";
94
98
  import {
95
99
  parseGantt
96
- } from "./chunk-ITSBBQTH.js";
100
+ } from "./chunk-6QEXWMBP.js";
97
101
  import {
98
102
  parseDgmoChartType
99
- } from "./chunk-K5XT7NHD.js";
103
+ } from "./chunk-2AM6VA3A.js";
100
104
  import {
101
105
  parseRaci
102
- } from "./chunk-3RYBTEF5.js";
106
+ } from "./chunk-I74AQRVD.js";
103
107
  import {
104
108
  PERT_DIAGNOSTICS,
105
109
  parsePert
106
- } from "./chunk-JVZ7KFAX.js";
110
+ } from "./chunk-37QQXKFV.js";
107
111
  import {
108
112
  parseLiveLink
109
- } from "./chunk-7WGCQE2E.js";
113
+ } from "./chunk-2ZVLI6GQ.js";
110
114
  import {
111
115
  makeYearContext,
112
116
  parseDateToken,
113
117
  resolveTokenYear,
114
118
  toInternal
115
119
  } from "./chunk-DAOFNU6J.js";
120
+ import {
121
+ COLOR_KEYS,
122
+ SEMANTIC_KEYS,
123
+ validateThemeFile
124
+ } from "./chunk-4HG4PYHM.js";
116
125
  import {
117
126
  SEQUENCE_DIAGNOSTICS,
118
127
  parseSequenceDgmo
119
- } from "./chunk-LFKSHDVI.js";
128
+ } from "./chunk-ZB2Q67NO.js";
120
129
  import {
121
130
  parseFlowchart
122
- } from "./chunk-JRUEIRJB.js";
131
+ } from "./chunk-634LDSN6.js";
123
132
  import {
124
133
  GRAPH_DIAGNOSTICS
125
- } from "./chunk-7TF3QOOD.js";
134
+ } from "./chunk-TIVMAITN.js";
126
135
  import {
127
136
  parseState
128
- } from "./chunk-AYOVY75O.js";
137
+ } from "./chunk-XLPJJ35N.js";
129
138
  import {
130
139
  parseClassDiagram
131
- } from "./chunk-MFW6P7WH.js";
140
+ } from "./chunk-WNTPJZU7.js";
132
141
  import {
133
142
  parseERDiagram
134
- } from "./chunk-WPL5PFXE.js";
143
+ } from "./chunk-3SLRZKLB.js";
135
144
  import {
136
145
  ARROW_DIAGNOSTIC_CODES
137
146
  } from "./chunk-N7VMGZCU.js";
138
147
  import {
139
148
  parseOrg
140
- } from "./chunk-FJNXXGTR.js";
149
+ } from "./chunk-UWJP4JSZ.js";
141
150
  import {
142
151
  parseSitemap
143
- } from "./chunk-UG2XG57E.js";
152
+ } from "./chunk-F26ZPBSF.js";
144
153
  import {
145
154
  parseWireframe
146
- } from "./chunk-HSRQDWV7.js";
155
+ } from "./chunk-ROCBGUJN.js";
147
156
  import {
148
157
  RACI_DIAGNOSTICS
149
158
  } from "./chunk-4WW3SGMH.js";
159
+ import {
160
+ BUILT_IN_PALETTE_IDS
161
+ } from "./chunk-3UR4F7FE.js";
150
162
  import {
151
163
  matchTagBlockHeading,
152
164
  stripDefaultModifier,
153
165
  tagAttrKey,
154
166
  validateTagGroupNames,
155
167
  validateTagValues
156
- } from "./chunk-L5AFONQU.js";
168
+ } from "./chunk-QKJ6MQXW.js";
157
169
  import {
158
170
  ALIAS_DIAGNOSTICS,
159
171
  TIMELINE_REGISTRY,
@@ -167,7 +179,7 @@ import {
167
179
  peelTrailingColorName,
168
180
  splitNameAndMeta,
169
181
  withTagAliases
170
- } from "./chunk-44GP7PD5.js";
182
+ } from "./chunk-MPJQMMBZ.js";
171
183
  import {
172
184
  resolveColorWithDiagnostic
173
185
  } from "./chunk-2M4IGSCY.js";
@@ -241,7 +253,7 @@ function parseVisualizationFull(content, palette) {
241
253
  result.error = formatDgmoError(diag);
242
254
  return result;
243
255
  };
244
- const warn = (line, message) => {
256
+ const warn2 = (line, message) => {
245
257
  result.diagnostics.push(makeDgmoError(line, message, "warning"));
246
258
  };
247
259
  if (!content?.trim()) {
@@ -367,12 +379,12 @@ function parseVisualizationFull(content, palette) {
367
379
  if (tagBlockMatch.alias) {
368
380
  timelineAliasMap.set(
369
381
  tagBlockMatch.alias.toLowerCase(),
370
- tagBlockMatch.name.toLowerCase()
382
+ tagAttrKey(tagBlockMatch.name)
371
383
  );
372
384
  } else {
373
385
  timelineAliasMap.set(
374
- tagBlockMatch.name.toLowerCase(),
375
- tagBlockMatch.name.toLowerCase()
386
+ tagAttrKey(tagBlockMatch.name),
387
+ tagAttrKey(tagBlockMatch.name)
376
388
  );
377
389
  }
378
390
  result.timelineTagGroups.push(newGroup);
@@ -575,7 +587,7 @@ function parseVisualizationFull(content, palette) {
575
587
  lineNumber
576
588
  });
577
589
  } else {
578
- warn(
590
+ warn2(
579
591
  lineNumber,
580
592
  `Unrecognized era entry: "${line}" \u2014 use '<start> -> <end> Label [color]' (e.g. '1716 -> 1717 Reign').`
581
593
  );
@@ -603,7 +615,7 @@ function parseVisualizationFull(content, palette) {
603
615
  lineNumber
604
616
  });
605
617
  } else {
606
- warn(
618
+ warn2(
607
619
  lineNumber,
608
620
  `Unrecognized marker entry: "${line}" \u2014 use '<date> Label [color]' (e.g. '1776 Independence').`
609
621
  );
@@ -717,7 +729,7 @@ function parseVisualizationFull(content, palette) {
717
729
  if (!/^(era|marker|tag|sort|active-tag|swimlanes|no-scale|no-legend|lane-by|fill-tint|fill-solid|fill-outline)\b/i.test(
718
730
  line
719
731
  ) && !line.startsWith("[")) {
720
- warn(lineNumber, `Expected a date at the start \u2014 e.g., '1718 ${line}'`);
732
+ warn2(lineNumber, `Expected a date at the start \u2014 e.g., '1718 ${line}'`);
721
733
  continue;
722
734
  }
723
735
  }
@@ -961,7 +973,7 @@ function parseVisualizationFull(content, palette) {
961
973
  const periodMatch = line.match(/^period\b(.*)$/i);
962
974
  if (periodMatch) {
963
975
  if (result.periods.length > 0 && !inSlopePeriodBlock) {
964
- warn(
976
+ warn2(
965
977
  lineNumber,
966
978
  `Duplicate 'period' directive \u2014 periods are already defined`
967
979
  );
@@ -1018,7 +1030,7 @@ function parseVisualizationFull(content, palette) {
1018
1030
  }
1019
1031
  }
1020
1032
  if (values.length < P) {
1021
- warn(
1033
+ warn2(
1022
1034
  lineNumber,
1023
1035
  `Data row has ${values.length} numeric value(s) but ${P} period(s) are defined \u2014 expected ${P} values`
1024
1036
  );
@@ -1027,7 +1039,7 @@ function parseVisualizationFull(content, palette) {
1027
1039
  const labelTokens = tokens.slice(0, rightIdx + 1);
1028
1040
  const joinedLabel = labelTokens.join(" ");
1029
1041
  if (!joinedLabel) {
1030
- warn(
1042
+ warn2(
1031
1043
  lineNumber,
1032
1044
  `Data row has no label \u2014 add a label before the numeric values`
1033
1045
  );
@@ -1041,14 +1053,14 @@ function parseVisualizationFull(content, palette) {
1041
1053
  palette
1042
1054
  ) ?? null : null;
1043
1055
  if (!labelPart) {
1044
- warn(
1056
+ warn2(
1045
1057
  lineNumber,
1046
1058
  `Data row has no label \u2014 add a label before the numeric values`
1047
1059
  );
1048
1060
  continue;
1049
1061
  }
1050
1062
  if (/^\d[\d,.]*$/.test(labelPart)) {
1051
- warn(
1063
+ warn2(
1052
1064
  lineNumber,
1053
1065
  `Label '${labelPart}' looks numeric \u2014 this may indicate too many values or a missing label`
1054
1066
  );
@@ -1062,7 +1074,7 @@ function parseVisualizationFull(content, palette) {
1062
1074
  continue;
1063
1075
  }
1064
1076
  if (firstLineParsed) {
1065
- warn(lineNumber, `Unexpected line: '${line}'.`);
1077
+ warn2(lineNumber, `Unexpected line: '${line}'.`);
1066
1078
  }
1067
1079
  continue;
1068
1080
  }
@@ -1168,7 +1180,7 @@ function parseVisualizationFull(content, palette) {
1168
1180
  continue;
1169
1181
  }
1170
1182
  if (firstLineParsed) {
1171
- warn(lineNumber, `Unexpected line: '${line}'.`);
1183
+ warn2(lineNumber, `Unexpected line: '${line}'.`);
1172
1184
  }
1173
1185
  }
1174
1186
  if (!result.type) {
@@ -1190,7 +1202,7 @@ function parseVisualizationFull(content, palette) {
1190
1202
  result.words = tokenizeFreeformText(freeformLines.join(" "));
1191
1203
  }
1192
1204
  if (result.words.length === 0) {
1193
- warn(
1205
+ warn2(
1194
1206
  1,
1195
1207
  'No words found. Add words as "word weight" (space-separated), one per line, or paste freeform text'
1196
1208
  );
@@ -1202,14 +1214,14 @@ function parseVisualizationFull(content, palette) {
1202
1214
  }
1203
1215
  if (result.type === "arc") {
1204
1216
  if (result.links.length === 0) {
1205
- warn(
1217
+ warn2(
1206
1218
  1,
1207
1219
  'No links found. Add links as "Source -> Target weight" (e.g., "Alice -> Bob 5")'
1208
1220
  );
1209
1221
  }
1210
1222
  if (result.arcNodeGroups.length > 0) {
1211
1223
  if (result.arcOrder === "name" || result.arcOrder === "degree") {
1212
- warn(
1224
+ warn2(
1213
1225
  1,
1214
1226
  `Cannot use "order ${result.arcOrder}" with [Group] headers. Use "order group" or remove group headers.`
1215
1227
  );
@@ -1223,7 +1235,7 @@ function parseVisualizationFull(content, palette) {
1223
1235
  }
1224
1236
  if (result.type === "timeline") {
1225
1237
  if (result.timelineEvents.length === 0) {
1226
- warn(
1238
+ warn2(
1227
1239
  1,
1228
1240
  'No events found. Add events like "1718 Event Name" or "1716 -> 1717 Event Name"'
1229
1241
  );
@@ -1241,7 +1253,7 @@ function parseVisualizationFull(content, palette) {
1241
1253
  (line, msg) => {
1242
1254
  const diag = makeDgmoError(line, msg);
1243
1255
  result.diagnostics.push(diag);
1244
- if (!result.error) result.error = formatDgmoError(diag);
1256
+ result.error ??= formatDgmoError(diag);
1245
1257
  }
1246
1258
  );
1247
1259
  for (const group of result.timelineTagGroups) {
@@ -1287,10 +1299,9 @@ function parseVisualizationFull(content, palette) {
1287
1299
  `Intersection references unknown set or alias "${ref}" \u2014 declare the set first on its own line ('Name [as <alias>] [color]', e.g. 'Navigation as nav blue'), then reference it by that name or alias. (\xA716.4)`
1288
1300
  )
1289
1301
  );
1290
- if (!result.error)
1291
- result.error = formatDgmoError(
1292
- result.diagnostics[result.diagnostics.length - 1]
1293
- );
1302
+ result.error ??= formatDgmoError(
1303
+ result.diagnostics[result.diagnostics.length - 1]
1304
+ );
1294
1305
  valid = false;
1295
1306
  break;
1296
1307
  }
@@ -1303,7 +1314,7 @@ function parseVisualizationFull(content, palette) {
1303
1314
  }
1304
1315
  if (result.type === "quadrant") {
1305
1316
  if (result.quadrantPoints.length === 0) {
1306
- warn(
1317
+ warn2(
1307
1318
  1,
1308
1319
  'No data points found. Add points as "Label x, y" (e.g., "Item A 0.5, 0.7")'
1309
1320
  );
@@ -1317,14 +1328,14 @@ function parseVisualizationFull(content, palette) {
1317
1328
  );
1318
1329
  }
1319
1330
  if (result.data.length === 0) {
1320
- warn(
1331
+ warn2(
1321
1332
  1,
1322
1333
  "No data lines found. Add data as 'Label value1 value2' (e.g., 'Blackbeard 40 4')"
1323
1334
  );
1324
1335
  }
1325
1336
  for (const item of result.data) {
1326
1337
  if (item.values.length !== result.periods.length) {
1327
- warn(
1338
+ warn2(
1328
1339
  item.lineNumber,
1329
1340
  `Data item "${item.label}" has ${item.values.length} value(s) but ${result.periods.length} period(s) are defined`
1330
1341
  );
@@ -1457,6 +1468,199 @@ function tokenizeFreeformText(text) {
1457
1468
  return Array.from(counts.entries()).map(([text2, count]) => ({ text: text2, weight: count, lineNumber: 0 })).sort((a, b) => b.weight - a.weight);
1458
1469
  }
1459
1470
 
1471
+ // src/palettes/directive.ts
1472
+ var PALETTE_LINE_RE = /^palette(?:\s+(.*))?$/;
1473
+ var MODES = /* @__PURE__ */ new Set(["light", "dark"]);
1474
+ var COLOR_NAMES = new Set(COLOR_KEYS);
1475
+ var kebab = (key) => key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
1476
+ var camel = (key) => key.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
1477
+ var ROLE_KEYS = new Set(SEMANTIC_KEYS.map(kebab));
1478
+ function builtInList() {
1479
+ return [...BUILT_IN_PALETTE_IDS].sort().join(", ");
1480
+ }
1481
+ function warn(line, message, code) {
1482
+ return makeDgmoError(line, message, "warning", code);
1483
+ }
1484
+ function readBlock(name, headerLine, block) {
1485
+ const diagnostics = [];
1486
+ const sections = {};
1487
+ const where = /* @__PURE__ */ new Map();
1488
+ let section;
1489
+ for (const { line, text } of block) {
1490
+ const [key = "", value, ...rest] = text.trim().split(/\s+/);
1491
+ if (MODES.has(key) && value === void 0) {
1492
+ section = key;
1493
+ if (sections[section]) {
1494
+ diagnostics.push(
1495
+ warn(
1496
+ line,
1497
+ `The "${section}" section appears twice in palette "${name}".`,
1498
+ "W_PALETTE_INVALID"
1499
+ )
1500
+ );
1501
+ }
1502
+ sections[section] = { roles: {}, colors: {} };
1503
+ where.set(section, line);
1504
+ continue;
1505
+ }
1506
+ if (key === "colors" && value === void 0) continue;
1507
+ if (!section) {
1508
+ diagnostics.push(
1509
+ warn(
1510
+ line,
1511
+ `"${key}" sits outside a light or dark section of palette "${name}".`,
1512
+ "W_PALETTE_INVALID"
1513
+ )
1514
+ );
1515
+ continue;
1516
+ }
1517
+ if (value === void 0 || rest.length > 0) {
1518
+ diagnostics.push(
1519
+ warn(
1520
+ line,
1521
+ `Write "${key}" as one key and one hex colour, e.g. "${key} #282a36".`,
1522
+ "W_PALETTE_INVALID"
1523
+ )
1524
+ );
1525
+ continue;
1526
+ }
1527
+ if (COLOR_NAMES.has(key)) {
1528
+ sections[section].colors[key] = value;
1529
+ where.set(`${section}.colors.${key}`, line);
1530
+ } else {
1531
+ const field = ROLE_KEYS.has(key) ? camel(key) : key;
1532
+ sections[section].roles[field] = value;
1533
+ where.set(`${section}.${field}`, line);
1534
+ }
1535
+ }
1536
+ if (diagnostics.length > 0) return diagnostics;
1537
+ const modes = Object.keys(sections);
1538
+ const input = {
1539
+ id: name.toLowerCase(),
1540
+ name,
1541
+ ...modes.length === 1 && { mode: modes[0] }
1542
+ };
1543
+ for (const mode of modes) {
1544
+ const { roles, colors } = sections[mode];
1545
+ input[mode] = { ...roles, colors };
1546
+ }
1547
+ const result = validateThemeFile(input);
1548
+ if (result.ok) return { palette: result.palette, mode: result.mode };
1549
+ return result.errors.map((error) => {
1550
+ const field = /^(light|dark)(?:\.colors)?\.(\w+)/.exec(error) ?? /^(light|dark)\b[^:]*: (\w+) /.exec(error);
1551
+ const at = field ? where.get(`${field[1]}.colors.${field[2]}`) ?? where.get(`${field[1]}.${field[2]}`) ?? where.get(field[1]) : void 0;
1552
+ return warn(
1553
+ at ?? headerLine,
1554
+ `Palette "${name}" is not drawn \u2014 ${error.replace(/\b(text[A-Z]\w*|[a-z]+[A-Z]\w*)\b/g, kebab)}.`,
1555
+ "W_PALETTE_INVALID"
1556
+ );
1557
+ });
1558
+ }
1559
+ function extractPaletteDirective(content) {
1560
+ if (!/^palette\b/m.test(content)) return { content, diagnostics: [] };
1561
+ const lines = content.split("\n");
1562
+ const diagnostics = [];
1563
+ let paletteId;
1564
+ let palette;
1565
+ let mode;
1566
+ for (let i = 0; i < lines.length; i++) {
1567
+ const match = PALETTE_LINE_RE.exec(lines[i].replace(/\r$/, ""));
1568
+ if (!match) continue;
1569
+ const lineNumber = i + 1;
1570
+ lines[i] = "//";
1571
+ const block = [];
1572
+ let blockEnd = i;
1573
+ for (let j = i + 1; j < lines.length; j++) {
1574
+ const next = lines[j].replace(/\r$/, "");
1575
+ if (next.trim() === "") continue;
1576
+ if (!/^\s/.test(next)) break;
1577
+ blockEnd = j;
1578
+ block.push({ line: j + 1, text: next });
1579
+ }
1580
+ for (let j = i + 1; j <= blockEnd; j++) lines[j] = "//";
1581
+ i = blockEnd;
1582
+ const words = (match[1] ?? "").trim().split(/\s+/).filter(Boolean);
1583
+ const name = words[0];
1584
+ if (!name) {
1585
+ diagnostics.push(
1586
+ warn(
1587
+ lineNumber,
1588
+ `"palette" needs a palette name \u2014 one of ${builtInList()}.`,
1589
+ "W_PALETTE_UNKNOWN"
1590
+ )
1591
+ );
1592
+ continue;
1593
+ }
1594
+ if (block.length > 0) {
1595
+ if (words.length > 1) {
1596
+ diagnostics.push(
1597
+ warn(
1598
+ lineNumber,
1599
+ `An embedded palette takes its name only \u2014 its sections say which modes it has.`,
1600
+ "W_PALETTE_MODE_UNKNOWN"
1601
+ )
1602
+ );
1603
+ }
1604
+ const read = readBlock(name, lineNumber, block);
1605
+ if (Array.isArray(read)) {
1606
+ diagnostics.push(...read);
1607
+ continue;
1608
+ }
1609
+ paletteId = void 0;
1610
+ palette = read.palette;
1611
+ mode = read.mode ?? void 0;
1612
+ continue;
1613
+ }
1614
+ const id = name.toLowerCase();
1615
+ if (!BUILT_IN_PALETTE_IDS.has(id)) {
1616
+ diagnostics.push(
1617
+ warn(
1618
+ lineNumber,
1619
+ `"${name}" is not a built-in palette \u2014 this diagram uses the default palette. Built-in palettes: ${builtInList()}. An embedded palette needs its colours in an indented block.`,
1620
+ "W_PALETTE_UNKNOWN"
1621
+ )
1622
+ );
1623
+ continue;
1624
+ }
1625
+ const modeWord = words[1];
1626
+ if (words.length > 2 || modeWord !== void 0 && !MODES.has(modeWord)) {
1627
+ diagnostics.push(
1628
+ warn(
1629
+ lineNumber,
1630
+ `"palette ${name}" takes one optional mode word, light or dark \u2014 the rest of the line is ignored.`,
1631
+ "W_PALETTE_MODE_UNKNOWN"
1632
+ )
1633
+ );
1634
+ }
1635
+ paletteId = id;
1636
+ palette = void 0;
1637
+ mode = modeWord !== void 0 && MODES.has(modeWord) ? modeWord : void 0;
1638
+ }
1639
+ return {
1640
+ content: lines.join("\n"),
1641
+ ...paletteId !== void 0 && { paletteId },
1642
+ ...palette !== void 0 && { palette },
1643
+ ...mode !== void 0 && { mode },
1644
+ diagnostics
1645
+ };
1646
+ }
1647
+ function choosePalette(directive, caller) {
1648
+ const callerTheme = caller.theme ?? "light";
1649
+ if (caller.paletteOverride !== void 0) {
1650
+ return { paletteId: caller.paletteOverride, theme: callerTheme };
1651
+ }
1652
+ const fileId = directive.palette?.id ?? directive.paletteId;
1653
+ if (fileId !== void 0) {
1654
+ const theme = directive.mode === "dark" ? "dark" : directive.mode === "light" && callerTheme !== "transparent" ? "light" : callerTheme;
1655
+ return {
1656
+ paletteId: fileId,
1657
+ ...directive.palette && { palette: directive.palette },
1658
+ theme
1659
+ };
1660
+ }
1661
+ return { paletteId: caller.palette ?? "slate", theme: callerTheme };
1662
+ }
1663
+
1460
1664
  // src/utils/arrows-diagnostics.ts
1461
1665
  var ARROW_DIAGNOSTICS = [
1462
1666
  // --- ACTIVE (TD-13): emitted by validateLabelCharacters ---
@@ -1580,6 +1784,33 @@ var UNIVERSAL_DIAGNOSTICS = [
1580
1784
  hint: "Remove legend-inline, or use a chart type with a top-center capsule legend (e.g. bar, line, state, treemap, sequence, gantt).",
1581
1785
  example: "pie Share\nApples 30\nPears 70"
1582
1786
  },
1787
+ {
1788
+ code: "W_PALETTE_UNKNOWN",
1789
+ severity: "warning",
1790
+ chartType: null,
1791
+ title: "Palette not drawn",
1792
+ message: (p) => `"${String(p.name ?? "dracula")}" is not a built-in palette \u2014 this diagram uses the default palette.`,
1793
+ hint: "Name a built-in palette \u2014 the message lists them \u2014 or remove the palette line.",
1794
+ example: "pie Share\nApples 30\nPears 70\n\npalette dracula"
1795
+ },
1796
+ {
1797
+ code: "W_PALETTE_INVALID",
1798
+ severity: "warning",
1799
+ chartType: null,
1800
+ title: "Embedded palette not drawn",
1801
+ message: (p) => `Palette "${String(p.name ?? "Dracula")}" is not drawn \u2014 ${String(p.reason ?? 'dark.bg: invalid hex "#28"')}.`,
1802
+ hint: "Fix the line the warning names: every key present, hex colours only, text readable on its fill, and a name that is not a built-in palette.",
1803
+ example: "pie Share\nApples 30\nPears 70\n\npalette Dracula\n dark\n bg #28"
1804
+ },
1805
+ {
1806
+ code: "W_PALETTE_MODE_UNKNOWN",
1807
+ severity: "warning",
1808
+ chartType: null,
1809
+ title: "Palette mode word not recognised",
1810
+ message: (p) => `"palette ${String(p.name ?? "nord")}" takes one optional mode word, light or dark \u2014 the rest of the line is ignored.`,
1811
+ hint: "Write light, dark, or nothing after the palette name.",
1812
+ example: "pie Share\nApples 30\nPears 70\n\npalette nord dim"
1813
+ },
1583
1814
  {
1584
1815
  code: "W_CANVAS_WIDTH_IGNORED",
1585
1816
  severity: "warning",
@@ -1611,6 +1842,7 @@ var REGISTRY = [
1611
1842
  ...COLOR_DIAGNOSTICS,
1612
1843
  ...SEQUENCE_DIAGNOSTICS,
1613
1844
  ...SKETCH_DIAGNOSTICS,
1845
+ ...WHITEBOARD_DIAGNOSTICS,
1614
1846
  ...FAMILY_DIAGNOSTICS,
1615
1847
  ...ALIAS_DIAGNOSTICS
1616
1848
  ];
@@ -1675,6 +1907,7 @@ var REGISTRY2 = {
1675
1907
  pert: { category: "diagram", parse: parsePert },
1676
1908
  "boxes-and-lines": { category: "diagram", parse: parseBoxesAndLines },
1677
1909
  sketch: { category: "diagram", parse: parseSketch },
1910
+ whiteboard: { category: "diagram", parse: parseWhiteboard },
1678
1911
  swimlane: { category: "diagram", parse: parseSwimlane },
1679
1912
  family: { category: "diagram", parse: parseFamily },
1680
1913
  "version-control": { category: "diagram", parse: parseVersionControl },
@@ -1761,7 +1994,9 @@ var knownChartTypeIds = chartTypeParsers.map(
1761
1994
  var PARSER_BY_ID = new Map(chartTypeParsers);
1762
1995
  var ALL_KNOWN_TYPES = new Set(knownChartTypeIds);
1763
1996
  function parseDgmo(content) {
1764
- const result = parseDgmoUndeduped(content);
1997
+ const directive = extractPaletteDirective(content);
1998
+ const result = parseDgmoUndeduped(directive.content);
1999
+ result.diagnostics = [...directive.diagnostics, ...result.diagnostics];
1765
2000
  return {
1766
2001
  // `attachHints` backfills the registry's repair sentence by code, so the
1767
2002
  // hint travels however the diagnostic was constructed. See its own comment.
@@ -1853,7 +2088,7 @@ function detectColonChartType(content) {
1853
2088
  }
1854
2089
  return null;
1855
2090
  }
1856
- var EMPTY_CONTENT_EXEMPT = /* @__PURE__ */ new Set(["live-link"]);
2091
+ var EMPTY_CONTENT_EXEMPT = /* @__PURE__ */ new Set(["live-link", "whiteboard"]);
1857
2092
  function detectEmptyContent(content, chartType) {
1858
2093
  if (chartType && EMPTY_CONTENT_EXEMPT.has(chartType)) return [];
1859
2094
  const lines = content.split("\n");
@@ -1876,6 +2111,8 @@ export {
1876
2111
  parseWordcloud,
1877
2112
  parseVenn,
1878
2113
  parseQuadrant,
2114
+ extractPaletteDirective,
2115
+ choosePalette,
1879
2116
  listDiagnosticCodes,
1880
2117
  getDiagnosticSpec,
1881
2118
  REGISTRY_BY_ID,