@diagrammo/dgmo 0.53.0 → 0.55.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 (212) hide show
  1. package/dist/advanced.d.ts +112 -9
  2. package/dist/advanced.js +188 -160
  3. package/dist/auto.js +147 -132
  4. package/dist/auto.mjs +2352 -746
  5. package/dist/block.js +65 -62
  6. package/dist/chart-meta.js +52 -49
  7. package/dist/{charts-d3-DH2XA45I.js → charts-d3-KZ6V4OP2.js} +10 -8
  8. package/dist/chunk-2CW5ZTNH.js +58 -0
  9. package/dist/{chunk-MA3HJZHB.js → chunk-2HX6ZGY7.js} +7 -7
  10. package/dist/{chunk-YG2BEIQU.js → chunk-2R6HG6D5.js} +11 -11
  11. package/dist/{chunk-65V6IRFN.js → chunk-2ZJXKJSI.js} +106 -60
  12. package/dist/{chunk-PYO4TJJ3.js → chunk-32HUNA33.js} +60 -18
  13. package/dist/{chunk-UK6DKJLD.js → chunk-3BFXELBL.js} +51 -4
  14. package/dist/{chunk-RW5PEJ7D.js → chunk-3BZJ5KD5.js} +7 -3
  15. package/dist/{chunk-FT7TPPZ5.js → chunk-3FUTFYSP.js} +65 -26
  16. package/dist/{chunk-QAALSCKI.js → chunk-4MZCJV4M.js} +12 -12
  17. package/dist/{chunk-ZXUAPTCK.js → chunk-4R5KIPNX.js} +2 -2
  18. package/dist/{chunk-QWIBT6DS.js → chunk-5D5VHDJM.js} +49 -14
  19. package/dist/{chunk-U7NKYLX2.js → chunk-5H5GWWA4.js} +55 -19
  20. package/dist/{chunk-P3H7QVDH.js → chunk-5K5XBEXT.js} +11 -6
  21. package/dist/{chunk-PT4SW76W.js → chunk-6NJWBMJV.js} +49 -14
  22. package/dist/{chunk-I46X5VUA.js → chunk-7TF3QOOD.js} +25 -1
  23. package/dist/{chunk-6DCOIN4W.js → chunk-A2ARDILY.js} +783 -3
  24. package/dist/{chunk-CK2GMDXD.js → chunk-A2PTRSAO.js} +2 -2
  25. package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
  26. package/dist/{chunk-GMIJ35PW.js → chunk-A4UJP4IS.js} +68 -20
  27. package/dist/{chunk-LQHVDZYC.js → chunk-AKE6C2D7.js} +4 -4
  28. package/dist/{chunk-W5KMNC5U.js → chunk-ASPS5O6F.js} +9 -10
  29. package/dist/{chunk-FLDC7ZAK.js → chunk-AU75JHSR.js} +6 -3
  30. package/dist/chunk-BEOAKGNA.js +484 -0
  31. package/dist/{chunk-XY3UDKKH.js → chunk-COVYNAKJ.js} +4 -4
  32. package/dist/{chunk-4ASVFYB2.js → chunk-DS4MDEQ7.js} +5 -5
  33. package/dist/{chunk-7JDTNFAK.js → chunk-EFUQENO5.js} +76 -32
  34. package/dist/{chunk-BULHGPHK.js → chunk-EMSOFHEN.js} +2 -2
  35. package/dist/{chunk-3BEKKRH5.js → chunk-ETTDF3S2.js} +49 -11
  36. package/dist/{chunk-JHOAH4TI.js → chunk-ETYF5QZR.js} +2 -2
  37. package/dist/{chunk-AHXIMHDQ.js → chunk-F5ZNUMSY.js} +53 -14
  38. package/dist/{chunk-I64ECJX3.js → chunk-FBP33UM6.js} +3 -3
  39. package/dist/{chunk-VIRANCNY.js → chunk-FGAMFJNJ.js} +58 -20
  40. package/dist/{chunk-774C2FF3.js → chunk-GRXPFBYC.js} +24 -3
  41. package/dist/{chunk-NNYFQOTK.js → chunk-GTO5VCYG.js} +10 -8
  42. package/dist/{chunk-RJ5LBZ5U.js → chunk-HES4K6DV.js} +13 -13
  43. package/dist/{chunk-AZNXGWDC.js → chunk-HGKOVKAX.js} +7 -7
  44. package/dist/{chunk-DWUMPMV2.js → chunk-HLGOG44K.js} +2 -2
  45. package/dist/{chunk-VJHBSPGF.js → chunk-HUTP35XT.js} +5 -4
  46. package/dist/{chunk-3CZLWOCI.js → chunk-HX7QNHC6.js} +3 -3
  47. package/dist/{chunk-R5NH5BZG.js → chunk-IALX52TR.js} +6 -6
  48. package/dist/{chunk-A44USUV7.js → chunk-ICZ7M6IZ.js} +23 -17
  49. package/dist/{chunk-27STWBOK.js → chunk-IF4KYSJZ.js} +10 -8
  50. package/dist/{chunk-HORZ5H2L.js → chunk-IG6J7JWH.js} +61 -22
  51. package/dist/{chunk-VRRDUYOK.js → chunk-IIUYKQ5J.js} +3 -3
  52. package/dist/{chunk-GMAH572Z.js → chunk-INTAQV2Y.js} +2 -2
  53. package/dist/{chunk-6AUZPPAV.js → chunk-ITXL2KU5.js} +2 -2
  54. package/dist/{chunk-KKHCNSKK.js → chunk-IWG2ECAO.js} +5 -5
  55. package/dist/{chunk-GQ644SPD.js → chunk-JGCEFKZP.js} +14 -14
  56. package/dist/{chunk-HNBY6CNV.js → chunk-JQLSFZZP.js} +2 -2
  57. package/dist/{chunk-CMVZWP32.js → chunk-JR7Q6GHE.js} +2 -2
  58. package/dist/{chunk-LHILKFDP.js → chunk-KC3WBBI7.js} +9 -9
  59. package/dist/{chunk-GABSL6TH.js → chunk-KK3L5NVK.js} +3 -3
  60. package/dist/{chunk-LC3FFD43.js → chunk-L2DIXZUT.js} +98 -48
  61. package/dist/{chunk-4WGMGKCZ.js → chunk-LCRPGGGS.js} +11 -11
  62. package/dist/{chunk-6KY7OCZC.js → chunk-LKGQ46P4.js} +3 -3
  63. package/dist/{chunk-HE5J53SZ.js → chunk-LW7STMYZ.js} +3 -3
  64. package/dist/{chunk-BD3WGY4T.js → chunk-M53MDBIW.js} +2 -2
  65. package/dist/{chunk-AN2DQB3G.js → chunk-MEH4TJEX.js} +12 -12
  66. package/dist/{chunk-SGPFVDUL.js → chunk-MNS2ENXF.js} +6 -6
  67. package/dist/{chunk-FXCB7H5O.js → chunk-MSWIBF6J.js} +2 -2
  68. package/dist/{chunk-BR7AYN76.js → chunk-NL7FUIVD.js} +12 -12
  69. package/dist/{chunk-AIMLCDAO.js → chunk-NN5TF4OV.js} +2 -2
  70. package/dist/{chunk-7GUF6SDR.js → chunk-NPPUZ4SK.js} +9 -9
  71. package/dist/{chunk-4K42RUGC.js → chunk-NYOOPQFD.js} +47 -12
  72. package/dist/{chunk-FFXCKZOU.js → chunk-O4CZDTQA.js} +3 -3
  73. package/dist/{chunk-6HTRCTAS.js → chunk-P5XXIVEU.js} +6 -4
  74. package/dist/{chunk-XEAQDIMF.js → chunk-PC4YLEKA.js} +6 -6
  75. package/dist/{chunk-Q7AH665U.js → chunk-PCVXXPYU.js} +121 -38
  76. package/dist/{chunk-W2DINCHL.js → chunk-PKUWYPI5.js} +207 -24
  77. package/dist/{chunk-PV2QO7QL.js → chunk-PSIDVCBA.js} +2 -2
  78. package/dist/{chunk-YR43LJT5.js → chunk-PV7ND5WL.js} +58 -15
  79. package/dist/{chunk-QI3BOLQB.js → chunk-Q5CMQVWF.js} +4 -4
  80. package/dist/{chunk-4RGZFA7H.js → chunk-Q5IHQ4NW.js} +11 -1
  81. package/dist/{chunk-SG4PRYO3.js → chunk-QQXFYTLC.js} +391 -60
  82. package/dist/{chunk-GWQJKTFS.js → chunk-QZYGRDMM.js} +118 -99
  83. package/dist/{chunk-CQFNIIQN.js → chunk-RKBCKCSF.js} +2 -2
  84. package/dist/{chunk-FUKNRLIJ.js → chunk-RSBH2C7O.js} +6 -6
  85. package/dist/{chunk-2QC4HXCY.js → chunk-RYNCWA5X.js} +11 -10
  86. package/dist/{chunk-NNUMX6WX.js → chunk-RZWIPDZ2.js} +40 -15
  87. package/dist/{chunk-VKNCC2GX.js → chunk-S52F62GW.js} +13 -13
  88. package/dist/{chunk-UQRIKAMH.js → chunk-SCOHNGPG.js} +59 -18
  89. package/dist/{chunk-VGNIDAPQ.js → chunk-SSHS42QG.js} +4 -4
  90. package/dist/chunk-TGOMHUOV.js +218 -0
  91. package/dist/{chunk-UKP5HWB5.js → chunk-UBQU2BY6.js} +4 -4
  92. package/dist/{chunk-IQJCVREL.js → chunk-UES4P7FN.js} +6 -6
  93. package/dist/chunk-US3P2DQO.js +87 -0
  94. package/dist/{chunk-GAWKIIPO.js → chunk-UXXLE6AH.js} +8 -8
  95. package/dist/{chunk-22OQWBWD.js → chunk-VMWSZCAK.js} +12 -11
  96. package/dist/{chunk-XG4NWFPY.js → chunk-VVIRAGID.js} +13 -13
  97. package/dist/{chunk-X3RXGSCZ.js → chunk-VXTUWXFB.js} +54 -15
  98. package/dist/{chunk-J7HI6G3G.js → chunk-W4TSD3IP.js} +6 -6
  99. package/dist/{chunk-FGDSTT3F.js → chunk-WB3NA3JJ.js} +2 -2
  100. package/dist/{chunk-KUSAVOWZ.js → chunk-WITOJZGL.js} +8 -4
  101. package/dist/{chunk-UVDCHR4E.js → chunk-WVGNXDEE.js} +2 -2
  102. package/dist/{chunk-HOXKNRON.js → chunk-X3X4LZDC.js} +2 -2
  103. package/dist/{chunk-SQCBSFT5.js → chunk-XKKH2DPG.js} +51 -263
  104. package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
  105. package/dist/{chunk-BFDVEO5R.js → chunk-Y4BBGFKY.js} +2 -2
  106. package/dist/{chunk-VAO6ANGC.js → chunk-YP2T5YUP.js} +14 -9
  107. package/dist/{chunk-PKNNHU7H.js → chunk-YXKNXIWA.js} +19 -11
  108. package/dist/{chunk-UFQJMOVZ.js → chunk-ZGIBV36U.js} +6 -6
  109. package/dist/{chunk-XQ4KN6JQ.js → chunk-ZP265ICS.js} +16 -15
  110. package/dist/{chunk-JTMSWEIW.js → chunk-ZWVKTWK6.js} +4 -4
  111. package/dist/{chunk-ALYZ3MAA.js → chunk-ZXNHHO6D.js} +8 -476
  112. package/dist/cli.cjs +166 -149
  113. package/dist/clock.js +34 -1
  114. package/dist/completion-registry.d.ts +129 -0
  115. package/dist/completion-registry.js +1278 -0
  116. package/dist/{compute-G55RG53N.js → compute-JAP5E2E4.js} +2 -2
  117. package/dist/dgmo-router-T4HGLIGA.js +88 -0
  118. package/dist/{dimensions-K6PGYYGT.js → dimensions-3JINHSYK.js} +8 -8
  119. package/dist/editor.js +28 -1
  120. package/dist/element.js +148 -133
  121. package/dist/element.mjs +2352 -746
  122. package/dist/{flowchart-parser-LALR6J6F.js → flowchart-parser-M7KKTLX7.js} +5 -5
  123. package/dist/{flowchart-renderer-DXYB5YRF.js → flowchart-renderer-FFEQFQEU.js} +9 -9
  124. package/dist/highlight.js +28 -1
  125. package/dist/index.js +77 -64
  126. package/dist/{layout-ZE5DRJWX.js → layout-3ZZBKUQC.js} +4 -4
  127. package/dist/{layout-3BVDMKXI.js → layout-AUKTWGYL.js} +4 -4
  128. package/dist/{layout-4IHCMWZN.js → layout-CRLTSFYQ.js} +4 -4
  129. package/dist/{layout-WCAIKGZG.js → layout-FNZDJGKF.js} +5 -5
  130. package/dist/layout-GHWRJKZQ.js +15 -0
  131. package/dist/{layout-3V2A4MUE.js → layout-LGXOKUCD.js} +6 -5
  132. package/dist/{layout-WSMPBQ4Q.js → layout-NF4EWFLT.js} +3 -3
  133. package/dist/{layout-OL2XFJXA.js → layout-SP7HJWKA.js} +3 -3
  134. package/dist/{layout-E6HR6PXH.js → layout-UR7CYAHL.js} +3 -3
  135. package/dist/layout-UTMEVFHN.js +15 -0
  136. package/dist/{layout-search-34DPZD43.js → layout-search-U2H4ORFJ.js} +14 -7
  137. package/dist/{legend-constants-P5EQWRQQ.js → legend-constants-B77VKB3R.js} +7 -2
  138. package/dist/{parser-6PPHAXXH.js → parser-2AXPSKWB.js} +5 -5
  139. package/dist/{parser-5HQXCNOS.js → parser-2AZ2KQTO.js} +4 -4
  140. package/dist/{parser-3KIGEEJM.js → parser-2LF33IS2.js} +4 -4
  141. package/dist/{parser-NNIL3HXU.js → parser-3QJ2Z4H4.js} +3 -3
  142. package/dist/parser-5GCQFSTQ.js +13 -0
  143. package/dist/{parser-6B6SSZT7.js → parser-62OHBRU5.js} +3 -3
  144. package/dist/{parser-VOERD6XR.js → parser-7LYJFZCP.js} +4 -4
  145. package/dist/{parser-ZGNXYFPS.js → parser-BMOTF72G.js} +3 -3
  146. package/dist/{parser-IVGHXLZP.js → parser-CIFLYZYP.js} +4 -3
  147. package/dist/{parser-GN2MM5CC.js → parser-D2UL2G5U.js} +3 -3
  148. package/dist/{parser-GKP2MHHL.js → parser-DM2APTKB.js} +3 -3
  149. package/dist/{parser-27Z76SN3.js → parser-DYYTPLBL.js} +4 -4
  150. package/dist/{parser-5FGJSQNS.js → parser-GOUGUTPU.js} +4 -4
  151. package/dist/{parser-G26MTBFS.js → parser-HGVUVD6J.js} +3 -3
  152. package/dist/{parser-EXNBDNGY.js → parser-IEJD3CZB.js} +3 -3
  153. package/dist/{parser-ZQDQTB4X.js → parser-JBEWNLAV.js} +5 -5
  154. package/dist/{parser-5QPFOB5F.js → parser-JMXPHNZD.js} +4 -4
  155. package/dist/{parser-4E4I3GNT.js → parser-JMXSQY3K.js} +4 -4
  156. package/dist/{parser-FF4BMRSB.js → parser-LUXS7J32.js} +4 -4
  157. package/dist/{parser-3VSWEKBF.js → parser-M5BUHULF.js} +4 -4
  158. package/dist/{parser-IKWK2ZU3.js → parser-MESRHUS4.js} +4 -5
  159. package/dist/{parser-3CODK6RG.js → parser-OOYNI2UT.js} +4 -4
  160. package/dist/{parser-YSLNDFLV.js → parser-PVBUAVRR.js} +4 -5
  161. package/dist/{parser-CKA3QMAG.js → parser-QKRBSQLJ.js} +5 -5
  162. package/dist/{parser-UWRX52PC.js → parser-S6NWSIJO.js} +4 -4
  163. package/dist/{parser-RNLTBIJ6.js → parser-SFEK6Q7Z.js} +4 -4
  164. package/dist/{parser-7JVIDLLR.js → parser-SUV52NQW.js} +4 -4
  165. package/dist/{parser-CRKLXGW7.js → parser-SZHGLOOZ.js} +4 -4
  166. package/dist/{parser-275KP7JO.js → parser-TO7IENWL.js} +5 -6
  167. package/dist/{parser-XNKJCMMA.js → parser-TVAMC7CQ.js} +4 -4
  168. package/dist/{parser-FOOFEJQU.js → parser-VAW46R57.js} +4 -4
  169. package/dist/{parser-XVPTRWZ4.js → parser-XDSPOXSE.js} +4 -4
  170. package/dist/pert.d.ts +2 -0
  171. package/dist/{renderer-D3BRNOMV.js → renderer-3PWLOJPD.js} +11 -11
  172. package/dist/{renderer-7NQSTQMQ.js → renderer-5EMHIQL5.js} +4 -4
  173. package/dist/{renderer-ZBTEX2JK.js → renderer-5PODNLYP.js} +4 -4
  174. package/dist/{renderer-6WRYVM5R.js → renderer-AQJIQ2XU.js} +9 -8
  175. package/dist/{renderer-JCZG6AYU.js → renderer-BEW3AYFT.js} +10 -10
  176. package/dist/{renderer-YUKPS27O.js → renderer-C3UYAXA6.js} +10 -8
  177. package/dist/{renderer-AK2WO4EI.js → renderer-CENXCMWG.js} +4 -4
  178. package/dist/{renderer-HIFQVEJA.js → renderer-CXM3ARYN.js} +10 -9
  179. package/dist/{renderer-JTCX6PCG.js → renderer-DW6TEBLA.js} +10 -9
  180. package/dist/{renderer-VMH6L6CP.js → renderer-FE5M6SEZ.js} +10 -9
  181. package/dist/{renderer-TYHGXAVT.js → renderer-FXK6ZL3P.js} +4 -4
  182. package/dist/{renderer-UPF7NRTI.js → renderer-G5ESLCJB.js} +12 -11
  183. package/dist/{renderer-CWEFGEIC.js → renderer-HTDS4FED.js} +14 -13
  184. package/dist/{renderer-XTXSOK3L.js → renderer-IO4KCFVL.js} +10 -10
  185. package/dist/{renderer-SQ54MDSA.js → renderer-IRAFJNTK.js} +10 -9
  186. package/dist/{renderer-JWGQSTMR.js → renderer-MFTTFW32.js} +15 -14
  187. package/dist/{renderer-2C6DJRYN.js → renderer-MPXI4FVL.js} +8 -8
  188. package/dist/{renderer-5MPN7CXZ.js → renderer-NVBEMQ6L.js} +5 -5
  189. package/dist/{renderer-7ZNVOVFG.js → renderer-OOGDCR6K.js} +3 -3
  190. package/dist/{renderer-COLQFSFV.js → renderer-Q5P72O4A.js} +9 -9
  191. package/dist/{renderer-WCWI4I6A.js → renderer-QZESC66H.js} +2 -2
  192. package/dist/{renderer-NE5W7CQP.js → renderer-RDBUXW7P.js} +6 -5
  193. package/dist/{renderer-6EN5XXJZ.js → renderer-S4XB3JR2.js} +11 -11
  194. package/dist/{renderer-WFSUBKUL.js → renderer-SIWEEWJ5.js} +9 -8
  195. package/dist/{renderer-LVZAHRP6.js → renderer-TKTM2SL4.js} +12 -12
  196. package/dist/{renderer-QD2SJF2I.js → renderer-TXTTV4HA.js} +10 -9
  197. package/dist/{renderer-YUXGXGSW.js → renderer-UZIU4AHK.js} +10 -9
  198. package/dist/{renderer-RLMOTXZ6.js → renderer-V72VJIGG.js} +14 -13
  199. package/dist/{renderer-UKXW2QPE.js → renderer-VEGOEZOI.js} +10 -8
  200. package/dist/{renderer-WNFXYYGL.js → renderer-W6I6T2TA.js} +8 -8
  201. package/dist/{renderer-KARQF3F3.js → renderer-WSHJRR2T.js} +8 -8
  202. package/dist/{renderer-radial-WF6VOUOD.js → renderer-radial-AG75PBYD.js} +9 -9
  203. package/dist/{resolver-WFKZYBJ2.js → resolver-ZSFQQRTH.js} +3 -3
  204. package/dist/{state-parser-L7DHZIQO.js → state-parser-KIPZGIB4.js} +5 -5
  205. package/dist/{state-renderer-TFEUOP4H.js → state-renderer-U6OSJG52.js} +13 -12
  206. package/docs/language-reference.md +2 -1
  207. package/package.json +5 -1
  208. package/dist/chunk-YJVA3QUU.js +0 -734
  209. package/dist/dgmo-router-B4S23EBH.js +0 -86
  210. package/dist/layout-3M5UYJHY.js +0 -14
  211. package/dist/layout-KPQWJNAG.js +0 -14
  212. package/dist/parser-7JHWEWXM.js +0 -13
@@ -1,734 +0,0 @@
1
- import {
2
- RECOGNIZED_COLOR_NAMES,
3
- invalidColorDiagnostic,
4
- resolveColor,
5
- resolveColorWithDiagnostic
6
- } from "./chunk-ZKPPI6BF.js";
7
- import {
8
- METADATA_DIAGNOSTIC_CODES,
9
- emptyMetadataValueMessage,
10
- makeDgmoError,
11
- suggest
12
- } from "./chunk-4W2PE66Q.js";
13
-
14
- // src/utils/reserved-key-registry.ts
15
- function staticRegistry(keys) {
16
- return { keys: new Set(keys), tagAliases: /* @__PURE__ */ new Set() };
17
- }
18
- function withTagAliases(base, aliases) {
19
- return { keys: base.keys, tagAliases: aliases };
20
- }
21
- function isReservedKey(registry, key) {
22
- return registry.keys.has(key) || registry.tagAliases.has(key);
23
- }
24
- var SEQUENCE_REGISTRY = staticRegistry([
25
- "color",
26
- "description",
27
- "role",
28
- "collapsed",
29
- // Participant layout-order override (§2.2). Colon-keyed `position: N`.
30
- "position"
31
- ]);
32
- var INFRA_REGISTRY = staticRegistry([
33
- "color",
34
- "description",
35
- "collapsed",
36
- "icon"
37
- ]);
38
- var MAP_REGISTRY = staticRegistry([
39
- "heat",
40
- "size",
41
- "width",
42
- "label",
43
- "style",
44
- // `clock` (BL-122): the time-card control. Bare (`poi Denver clock`) → a card
45
- // with the zone auto-derived from the place; valued (`clock: Europe/Oslo`) →
46
- // that IANA id or fixed offset (`clock: UTC+9`) as the zone, for bare-coord
47
- // pins or to override a city. Reserved so the valued form peels off the POI
48
- // name cleanly; the BARE flag is peeled separately in handlePoi (no colon).
49
- "clock"
50
- // `surface:` was removed in the 2026-06-02 defaults-on review — it is no longer
51
- // a recognized metadata key (the route/edge surface feature was cut; §24B.7).
52
- // A stray `surface: water` is no longer captured as a reserved key.
53
- ]);
54
- var ORG_REGISTRY = staticRegistry([
55
- "color",
56
- "description",
57
- "role",
58
- "location",
59
- "email",
60
- "phone"
61
- ]);
62
- var C4_REGISTRY = staticRegistry([
63
- "color",
64
- "description",
65
- "tech",
66
- "type",
67
- "collapsed"
68
- ]);
69
- var ER_REGISTRY = staticRegistry([
70
- "color",
71
- "description",
72
- "domain"
73
- ]);
74
- var EVENT_LINE_REGISTRY = staticRegistry([
75
- "color"
76
- ]);
77
- var KANBAN_REGISTRY = staticRegistry([
78
- "color",
79
- "description",
80
- "wip",
81
- "assignee",
82
- "due",
83
- "collapsed"
84
- // `[Column] collapsed: true` view-state marker
85
- ]);
86
- var SITEMAP_REGISTRY = staticRegistry([
87
- "color",
88
- "description",
89
- "status"
90
- ]);
91
- var GANTT_REGISTRY = staticRegistry([
92
- "color",
93
- "description",
94
- "duration",
95
- "offset",
96
- "progress",
97
- "start",
98
- "collapsed"
99
- // `[Group] collapsed: true` view-state marker
100
- ]);
101
- var PERT_REGISTRY = staticRegistry([
102
- "color",
103
- "description",
104
- "confidence",
105
- "collapsed"
106
- ]);
107
- var BOXES_AND_LINES_REGISTRY = staticRegistry([
108
- "color",
109
- "description",
110
- "heat"
111
- ]);
112
- var STATE_REGISTRY = staticRegistry([]);
113
- var SKETCH_REGISTRY = staticRegistry([
114
- "shape",
115
- "at",
116
- "collapsed"
117
- ]);
118
- var TIMELINE_REGISTRY = staticRegistry([
119
- "color",
120
- "description",
121
- "duration"
122
- ]);
123
- var MINDMAP_REGISTRY = staticRegistry([
124
- "color",
125
- "description",
126
- "collapsed"
127
- ]);
128
- var TECH_RADAR_REGISTRY = staticRegistry([
129
- "color",
130
- "description",
131
- "quadrant",
132
- "ring",
133
- "trend"
134
- ]);
135
- var CYCLE_REGISTRY = staticRegistry([
136
- "color",
137
- "description",
138
- "width",
139
- "span"
140
- ]);
141
- var JOURNEY_MAP_REGISTRY = staticRegistry([
142
- "color",
143
- "description",
144
- "score",
145
- "emotion",
146
- "pain",
147
- "opportunity",
148
- "thought"
149
- ]);
150
- var PYRAMID_REGISTRY = staticRegistry([
151
- "color",
152
- "description"
153
- ]);
154
- var RING_REGISTRY = staticRegistry([
155
- "color",
156
- "description"
157
- ]);
158
- var TREEMAP_REGISTRY = staticRegistry(["heat"]);
159
- var RACI_REGISTRY = staticRegistry([
160
- "color",
161
- "description"
162
- ]);
163
- var FAMILY_PERSON_REGISTRY = staticRegistry([
164
- "sex",
165
- "b",
166
- "d",
167
- "bp",
168
- "dp",
169
- "occupation",
170
- "military",
171
- "education",
172
- "religion",
173
- "burial"
174
- ]);
175
- var FAMILY_UNION_REGISTRY = staticRegistry(["m"]);
176
-
177
- // src/utils/parsing.ts
178
- var RECOGNIZED_COLOR_SET = new Set(
179
- RECOGNIZED_COLOR_NAMES
180
- );
181
- var ALL_CHART_TYPES = /* @__PURE__ */ new Set([
182
- // data charts
183
- "bar",
184
- "line",
185
- "pie",
186
- "polar-area",
187
- "radar",
188
- "scatter",
189
- "sankey",
190
- "function",
191
- "heatmap",
192
- "funnel",
193
- // visualizations
194
- "slope",
195
- "wordcloud",
196
- "arc",
197
- "timeline",
198
- "event-line",
199
- "venn",
200
- "quadrant",
201
- // diagrams
202
- "body",
203
- "sequence",
204
- "flowchart",
205
- "class",
206
- "er",
207
- "org",
208
- "kanban",
209
- "c4",
210
- "state",
211
- "sitemap",
212
- "infra",
213
- "gantt",
214
- "pert",
215
- "boxes-and-lines",
216
- "swimlane",
217
- "version-control",
218
- "mindmap",
219
- "wireframe",
220
- "tech-radar",
221
- "cycle",
222
- "journey-map",
223
- "pyramid",
224
- "ring",
225
- "treemap",
226
- "block",
227
- "goal",
228
- "countdown",
229
- "clock",
230
- "sketch",
231
- "raci",
232
- "map",
233
- "family",
234
- "bracket"
235
- ]);
236
- function measureIndent(line) {
237
- let indent = 0;
238
- for (const ch of line) {
239
- if (ch === " ") indent++;
240
- else if (ch === " ") indent += 4;
241
- else break;
242
- }
243
- return indent;
244
- }
245
- function extractColor(label, palette, diagnostics, line) {
246
- const lastSpaceIdx = Math.max(
247
- label.lastIndexOf(" "),
248
- label.lastIndexOf(" ")
249
- );
250
- if (lastSpaceIdx < 0) return { label };
251
- const trailing = label.substring(lastSpaceIdx + 1);
252
- if (!RECOGNIZED_COLOR_SET.has(trailing)) {
253
- if (diagnostics && line !== void 0) {
254
- const diag = invalidColorDiagnostic(trailing, line);
255
- if (diag) diagnostics.push(diag);
256
- }
257
- return { label };
258
- }
259
- let color;
260
- if (diagnostics && line !== void 0) {
261
- color = resolveColorWithDiagnostic(trailing, line, diagnostics, palette);
262
- } else {
263
- color = resolveColor(trailing, palette) ?? void 0;
264
- }
265
- return {
266
- label: label.substring(0, lastSpaceIdx).trimEnd(),
267
- ...color !== void 0 && { color }
268
- };
269
- }
270
- var OPTION_NOCOLON_RE = /^([a-z][a-z0-9-]*)\s+(.+)$/i;
271
- var GLOBAL_BOOLEANS = /* @__PURE__ */ new Set([
272
- "fill-tint",
273
- "fill-solid",
274
- "fill-outline",
275
- "no-title",
276
- "no-notes",
277
- "no-legend"
278
- ]);
279
- function legendSuppressed(options) {
280
- return options["no-legend"] === "on";
281
- }
282
- var FILL_FAMILY_TOKENS = /* @__PURE__ */ new Set([
283
- "fill-tint",
284
- "fill-solid",
285
- "fill-outline"
286
- ]);
287
- function fillModeFromToken(token) {
288
- switch (token.trim().toLowerCase()) {
289
- case "fill-solid":
290
- return "solid";
291
- case "fill-outline":
292
- return "outline";
293
- case "fill-tint":
294
- return "tint";
295
- default:
296
- return null;
297
- }
298
- }
299
- function fillModeFromOptions(options) {
300
- if (options["fill-solid"] === "on") return "solid";
301
- if (options["fill-outline"] === "on") return "outline";
302
- return void 0;
303
- }
304
- function recognizeGlobalBoolean(token) {
305
- const t = token.trim().toLowerCase();
306
- return GLOBAL_BOOLEANS.has(t) ? t : null;
307
- }
308
- function tryParseSharedOption(line, options) {
309
- const key = recognizeGlobalBoolean(line);
310
- if (key) {
311
- if (FILL_FAMILY_TOKENS.has(key)) {
312
- for (const t of FILL_FAMILY_TOKENS) delete options[t];
313
- }
314
- options[key] = "on";
315
- return true;
316
- }
317
- return false;
318
- }
319
- function parseFirstLine(line) {
320
- const trimmed = line.trim();
321
- if (!trimmed || trimmed.startsWith("//")) return null;
322
- const spaceIdx = trimmed.indexOf(" ");
323
- if (spaceIdx === -1) {
324
- const ct = trimmed.toLowerCase();
325
- return ALL_CHART_TYPES.has(ct) ? { chartType: ct, title: void 0 } : null;
326
- }
327
- const firstToken = trimmed.substring(0, spaceIdx).toLowerCase();
328
- if (!ALL_CHART_TYPES.has(firstToken)) return null;
329
- return {
330
- chartType: firstToken,
331
- title: trimmed.substring(spaceIdx + 1).trim() || void 0
332
- };
333
- }
334
- function normalizeNumericToken(token) {
335
- if (!token.includes(",") && !token.includes("_")) return null;
336
- if (token.includes(",") && token.includes("_")) return null;
337
- let sign = "";
338
- let unsigned = token;
339
- if (unsigned.startsWith("-")) {
340
- sign = "-";
341
- unsigned = unsigned.substring(1);
342
- }
343
- if (!unsigned) return null;
344
- if (unsigned.includes(",")) {
345
- if (/^\d{1,3}(,\d{3})+$/.test(unsigned))
346
- return sign + unsigned.replace(/,/g, "");
347
- if (/^\d{1,3}(,\d{3})+\.\d+$/.test(unsigned))
348
- return sign + unsigned.replace(/,/g, "");
349
- return null;
350
- }
351
- if (/^\d+(_\d+)+$/.test(unsigned)) return sign + unsigned.replace(/_/g, "");
352
- if (/^\d+(_\d+)*\.\d+$/.test(unsigned) && unsigned.includes("_"))
353
- return sign + unsigned.replace(/_/g, "");
354
- return null;
355
- }
356
- function stripQuotes(token) {
357
- if (token.length >= 2) {
358
- if (token[0] === '"' && token[token.length - 1] === '"' || token[0] === "'" && token[token.length - 1] === "'") {
359
- return token.substring(1, token.length - 1);
360
- }
361
- }
362
- return token;
363
- }
364
- function tokenizeQuoteAware(input) {
365
- const tokens = [];
366
- let i = 0;
367
- while (i < input.length) {
368
- if (input[i] === " " || input[i] === " ") {
369
- i++;
370
- continue;
371
- }
372
- if (input[i] === '"' || input[i] === "'") {
373
- const quote = input[i];
374
- const start2 = i;
375
- i++;
376
- while (i < input.length && input[i] !== quote) i++;
377
- if (i < input.length) i++;
378
- tokens.push(input.substring(start2, i));
379
- continue;
380
- }
381
- const start = i;
382
- while (i < input.length && input[i] !== " " && input[i] !== " ") i++;
383
- tokens.push(input.substring(start, i));
384
- }
385
- return tokens;
386
- }
387
- function collectIndentedValues(lines, startIndex) {
388
- const values = [];
389
- const lineNumbers = [];
390
- let j = startIndex + 1;
391
- for (; j < lines.length; j++) {
392
- const raw = lines[j];
393
- const trimmed = raw.trim();
394
- if (!trimmed) continue;
395
- if (trimmed.startsWith("//")) continue;
396
- if (raw[0] !== " " && raw[0] !== " ") break;
397
- values.push(trimmed.replace(/,\s*$/, ""));
398
- lineNumbers.push(j + 1);
399
- }
400
- return { values, lineNumbers, newIndex: j - 1 };
401
- }
402
- function parseSeriesNames(value, lines, lineIndex, palette, diagnostics) {
403
- let rawNames;
404
- let series;
405
- let newIndex = lineIndex;
406
- let nameLineNumbers = [];
407
- if (value) {
408
- series = value;
409
- rawNames = value.split(",").map((s) => s.trim()).filter(Boolean);
410
- nameLineNumbers = rawNames.map(() => lineIndex + 1);
411
- } else {
412
- const collected = collectIndentedValues(lines, lineIndex);
413
- newIndex = collected.newIndex;
414
- rawNames = collected.values;
415
- nameLineNumbers = collected.lineNumbers;
416
- series = rawNames.join(", ");
417
- }
418
- const isHeader = (s) => {
419
- const tok = s.split(/\s+/, 1)[0];
420
- if (tok === "y-label") return "left";
421
- if (tok === "y-right-label") return "right";
422
- return null;
423
- };
424
- if (rawNames.some((r) => isHeader(r) !== null)) {
425
- const names2 = [];
426
- const nameColors2 = [];
427
- const axes = [];
428
- const memberLineNumbers = [];
429
- let leftLabel;
430
- let rightLabel;
431
- let currentAxis = "left";
432
- for (let i = 0; i < rawNames.length; i++) {
433
- const raw = rawNames[i];
434
- const side = isHeader(raw);
435
- if (side !== null) {
436
- const label = raw.slice(raw.indexOf(" ") + 1).trim();
437
- currentAxis = side;
438
- if (side === "left") leftLabel = label || leftLabel;
439
- else rightLabel = label || rightLabel;
440
- continue;
441
- }
442
- const extracted = extractColor(
443
- raw,
444
- palette,
445
- diagnostics,
446
- nameLineNumbers[i]
447
- );
448
- names2.push(extracted.label);
449
- nameColors2.push(extracted.color);
450
- axes.push(currentAxis);
451
- memberLineNumbers.push(nameLineNumbers[i]);
452
- }
453
- return {
454
- series: names2.join(", "),
455
- names: names2,
456
- nameColors: nameColors2,
457
- nameLineNumbers: memberLineNumbers,
458
- newIndex,
459
- axes,
460
- ...leftLabel !== void 0 && { leftLabel },
461
- ...rightLabel !== void 0 && { rightLabel }
462
- };
463
- }
464
- const names = [];
465
- const nameColors = [];
466
- for (let i = 0; i < rawNames.length; i++) {
467
- const raw = rawNames[i];
468
- const extracted = extractColor(
469
- raw,
470
- palette,
471
- diagnostics,
472
- nameLineNumbers[i]
473
- );
474
- nameColors.push(extracted.color);
475
- names.push(extracted.label);
476
- }
477
- if (names.length === 1) {
478
- series = names[0];
479
- }
480
- return { series, names, nameColors, nameLineNumbers, newIndex };
481
- }
482
- function peelTrailingColorName(label) {
483
- const lastSpaceIdx = Math.max(
484
- label.lastIndexOf(" "),
485
- label.lastIndexOf(" ")
486
- );
487
- if (lastSpaceIdx < 0) return { label };
488
- const trailing = label.substring(lastSpaceIdx + 1);
489
- if (!RECOGNIZED_COLOR_SET.has(trailing)) return { label };
490
- return {
491
- label: label.substring(0, lastSpaceIdx).trimEnd(),
492
- colorName: trailing
493
- };
494
- }
495
- function peelTrailingCollapsedFlag(text) {
496
- const t = text.trimEnd();
497
- if (t === "collapsed") return { rest: "", collapsed: true };
498
- if (/[ \t]collapsed$/.test(t)) {
499
- return {
500
- rest: t.slice(0, t.length - "collapsed".length).trimEnd().replace(/,\s*$/, ""),
501
- collapsed: true
502
- };
503
- }
504
- return { rest: text, collapsed: false };
505
- }
506
- function peelRampColors(label) {
507
- const peelOne = (s) => {
508
- const idx = Math.max(s.lastIndexOf(" "), s.lastIndexOf(" "));
509
- if (idx < 0) return { rest: s };
510
- const trailing = s.substring(idx + 1);
511
- if (!RECOGNIZED_COLOR_SET.has(trailing)) return { rest: s };
512
- return { rest: s.substring(0, idx).trimEnd(), color: trailing };
513
- };
514
- const first = peelOne(label);
515
- if (first.color === void 0) return { label };
516
- const second = peelOne(first.rest);
517
- if (second.color === void 0) {
518
- return { label: first.rest, high: first.color };
519
- }
520
- return { label: second.rest, low: second.color, high: first.color };
521
- }
522
- var RESERVED_KEY_RE = /^[A-Za-z][A-Za-z0-9_-]*$/;
523
- var AS_ALIAS_RE = /\s+as\s+([A-Za-z][A-Za-z0-9_]{0,11})$/;
524
- function scanTokens(line) {
525
- const tokens = [];
526
- let i = 0;
527
- while (i < line.length) {
528
- if (line[i] === " " || line[i] === " ") {
529
- i++;
530
- continue;
531
- }
532
- if (line[i] === '"' || line[i] === "'") {
533
- const quote = line[i];
534
- const start2 = i;
535
- i++;
536
- while (i < line.length && line[i] !== quote) i++;
537
- if (i < line.length) i++;
538
- tokens.push({
539
- text: line.substring(start2, i),
540
- start: start2,
541
- end: i,
542
- quoted: true
543
- });
544
- continue;
545
- }
546
- const start = i;
547
- while (i < line.length && line[i] !== " " && line[i] !== " ") i++;
548
- tokens.push({
549
- text: line.substring(start, i),
550
- start,
551
- end: i,
552
- quoted: false
553
- });
554
- }
555
- return tokens;
556
- }
557
- function findMetadataCutOffset(line, tokens, registry) {
558
- for (let i = 0; i < tokens.length; i++) {
559
- const tok = tokens[i];
560
- if (tok.quoted) continue;
561
- const inlineColon = tok.text.indexOf(":");
562
- if (inlineColon > 0) {
563
- const keyPart = tok.text.substring(0, inlineColon);
564
- if (RESERVED_KEY_RE.test(keyPart) && isReservedKey(registry, keyPart.toLowerCase())) {
565
- return tok.start;
566
- }
567
- } else if (inlineColon < 0) {
568
- if (RESERVED_KEY_RE.test(tok.text) && isReservedKey(registry, tok.text.toLowerCase())) {
569
- const tail = line.substring(tok.end).replace(/^[ \t]+/, "");
570
- if (tail.startsWith(":")) {
571
- return tok.start;
572
- }
573
- }
574
- }
575
- }
576
- return -1;
577
- }
578
- function parseMetadataRegion(region, aliasMap, diagnostics, line) {
579
- const meta = {};
580
- let i = 0;
581
- while (i < region.length) {
582
- while (i < region.length && (region[i] === " " || region[i] === " " || region[i] === ","))
583
- i++;
584
- if (i >= region.length) break;
585
- const keyStart = i;
586
- while (i < region.length && region[i] !== ":" && region[i] !== ",") i++;
587
- if (i >= region.length || region[i] !== ":") break;
588
- const rawKey = region.substring(keyStart, i).trim().toLowerCase();
589
- if (!rawKey) break;
590
- i++;
591
- while (i < region.length && (region[i] === " " || region[i] === " ")) i++;
592
- let value;
593
- if (i < region.length && (region[i] === '"' || region[i] === "'")) {
594
- const quote = region[i];
595
- i++;
596
- const vStart = i;
597
- while (i < region.length && region[i] !== quote) i++;
598
- value = region.substring(vStart, i);
599
- if (i < region.length) i++;
600
- while (i < region.length && (region[i] === " " || region[i] === " "))
601
- i++;
602
- } else {
603
- const vStart = i;
604
- while (i < region.length && region[i] !== ",") i++;
605
- value = region.substring(vStart, i).trim();
606
- }
607
- const key = aliasMap.get(rawKey) ?? rawKey;
608
- if (!value) {
609
- if (diagnostics && line !== void 0) {
610
- diagnostics.push(
611
- makeDgmoError(
612
- line,
613
- emptyMetadataValueMessage(rawKey),
614
- "warning",
615
- METADATA_DIAGNOSTIC_CODES.EMPTY_METADATA_VALUE
616
- )
617
- );
618
- }
619
- continue;
620
- }
621
- meta[key] = value;
622
- }
623
- return meta;
624
- }
625
- function cutUnionMetadata(line, registry) {
626
- return findMetadataCutOffset(line, scanTokens(line), registry);
627
- }
628
- function splitNameAndMeta(line, registry, aliasMap = /* @__PURE__ */ new Map(), palette, diagnostics, lineNumber, options = {}) {
629
- const tokens = scanTokens(line);
630
- const cutOffset = findMetadataCutOffset(line, tokens, registry);
631
- let nameRegion;
632
- let metaRegion;
633
- if (cutOffset === -1) {
634
- nameRegion = line.trim();
635
- metaRegion = "";
636
- } else {
637
- nameRegion = line.substring(0, cutOffset).trimEnd();
638
- metaRegion = line.substring(cutOffset);
639
- }
640
- const colorResult = peelTrailingColorName(nameRegion);
641
- let postColorName = colorResult.label;
642
- let alias;
643
- if (options.peelAlias !== false) {
644
- const aliasMatch = postColorName.match(AS_ALIAS_RE);
645
- if (aliasMatch) {
646
- alias = aliasMatch[1];
647
- postColorName = postColorName.substring(0, aliasMatch.index).trimEnd();
648
- }
649
- }
650
- const meta = metaRegion.length > 0 ? parseMetadataRegion(metaRegion, aliasMap, diagnostics, lineNumber) : {};
651
- void palette;
652
- return {
653
- name: postColorName,
654
- meta,
655
- ...colorResult.colorName !== void 0 && {
656
- color: colorResult.colorName
657
- },
658
- ...alias !== void 0 && { alias }
659
- };
660
- }
661
- var POTENTIAL_META_RE = /\b([\w-]+)\s*:/;
662
- function warnUnknownMetaKeys(meta, registry, warn, nameToScan) {
663
- const candidates = Array.from(registry.keys);
664
- for (const key of Object.keys(meta)) {
665
- if (isReservedKey(registry, key)) continue;
666
- const hint = suggest(key, candidates);
667
- warn(`Unknown metadata key "${key}".${hint ? " " + hint : ""}`);
668
- }
669
- if (nameToScan) {
670
- const m = nameToScan.match(POTENTIAL_META_RE);
671
- if (m) {
672
- const key = m[1].toLowerCase();
673
- if (!isReservedKey(registry, key)) {
674
- const hint = suggest(key, candidates);
675
- if (hint) {
676
- warn(`Unknown metadata key "${key}". ${hint}`);
677
- }
678
- }
679
- }
680
- }
681
- }
682
-
683
- export {
684
- withTagAliases,
685
- isReservedKey,
686
- SEQUENCE_REGISTRY,
687
- INFRA_REGISTRY,
688
- MAP_REGISTRY,
689
- ORG_REGISTRY,
690
- C4_REGISTRY,
691
- ER_REGISTRY,
692
- EVENT_LINE_REGISTRY,
693
- KANBAN_REGISTRY,
694
- SITEMAP_REGISTRY,
695
- GANTT_REGISTRY,
696
- PERT_REGISTRY,
697
- BOXES_AND_LINES_REGISTRY,
698
- STATE_REGISTRY,
699
- SKETCH_REGISTRY,
700
- TIMELINE_REGISTRY,
701
- MINDMAP_REGISTRY,
702
- TECH_RADAR_REGISTRY,
703
- CYCLE_REGISTRY,
704
- JOURNEY_MAP_REGISTRY,
705
- PYRAMID_REGISTRY,
706
- RING_REGISTRY,
707
- TREEMAP_REGISTRY,
708
- RACI_REGISTRY,
709
- FAMILY_PERSON_REGISTRY,
710
- FAMILY_UNION_REGISTRY,
711
- ALL_CHART_TYPES,
712
- measureIndent,
713
- extractColor,
714
- OPTION_NOCOLON_RE,
715
- legendSuppressed,
716
- FILL_FAMILY_TOKENS,
717
- fillModeFromToken,
718
- fillModeFromOptions,
719
- tryParseSharedOption,
720
- parseFirstLine,
721
- normalizeNumericToken,
722
- stripQuotes,
723
- tokenizeQuoteAware,
724
- collectIndentedValues,
725
- parseSeriesNames,
726
- peelTrailingColorName,
727
- peelTrailingCollapsedFlag,
728
- peelRampColors,
729
- parseMetadataRegion,
730
- cutUnionMetadata,
731
- splitNameAndMeta,
732
- warnUnknownMetaKeys
733
- };
734
- //# sourceMappingURL=chunk-YJVA3QUU.js.map