@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
package/dist/clock.js CHANGED
@@ -107,6 +107,18 @@ function formatTime(h, m, s, hours12) {
107
107
  }
108
108
  return { main: `${pad2(h)}:${pad2(m)}`, sec, ap: "" };
109
109
  }
110
+ function fixedTimeCells(s, x0, fs) {
111
+ const digit = fs * 0.6;
112
+ const colon = fs * 0.32;
113
+ const cells = [];
114
+ let x = x0;
115
+ for (const ch of s) {
116
+ const cw = ch === ":" ? colon : digit;
117
+ cells.push({ ch, x: x + cw / 2 });
118
+ x += cw;
119
+ }
120
+ return { cells, width: x - x0 };
121
+ }
110
122
  function fmtDelta(ms) {
111
123
  const m = Math.max(0, Math.round(ms / 6e4));
112
124
  if (m < 90) return `${m}m`;
@@ -227,6 +239,27 @@ function setPart(group, sel, textContent) {
227
239
  const el = group.querySelector(sel);
228
240
  if (el && el.textContent !== textContent) el.textContent = textContent;
229
241
  }
242
+ var SVG_NS = "http://www.w3.org/2000/svg";
243
+ function setDigits(group, main) {
244
+ const el = group.querySelector('[data-dgmo-clock-digital-part="main"]');
245
+ if (!el || el.textContent === main) return;
246
+ const x0 = parseFloat(el.getAttribute("data-dgmo-clock-x0") ?? "0");
247
+ const fs = parseFloat(el.getAttribute("data-dgmo-clock-fs") ?? "0");
248
+ const gap = parseFloat(el.getAttribute("data-dgmo-clock-gap") ?? "0");
249
+ const { cells, width } = fixedTimeCells(main, x0, fs);
250
+ while (el.firstChild) el.removeChild(el.firstChild);
251
+ for (const c of cells) {
252
+ const t = document.createElementNS(SVG_NS, "tspan");
253
+ t.setAttribute("x", String(c.x));
254
+ t.textContent = c.ch;
255
+ el.appendChild(t);
256
+ }
257
+ const stackX = String(x0 + width + gap);
258
+ for (const part of ["sec", "ap"]) {
259
+ const s = group.querySelector(`[data-dgmo-clock-digital-part="${part}"]`);
260
+ if (s) s.setAttribute("x", stackX);
261
+ }
262
+ }
230
263
  function updateRow(group, now) {
231
264
  const zone = group.getAttribute("data-dgmo-clock-zone");
232
265
  if (!zone) return;
@@ -266,7 +299,7 @@ function updateRow(group, now) {
266
299
  const secondHand = group.querySelector('[data-dgmo-clock-hand="s"]');
267
300
  if (secondHand) secondHand.setAttribute("stroke", handColor);
268
301
  }
269
- setPart(group, '[data-dgmo-clock-digital-part="main"]', ts.main);
302
+ setDigits(group, ts.main);
270
303
  setPart(group, '[data-dgmo-clock-digital-part="sec"]', `:${ts.sec}`);
271
304
  setPart(group, '[data-dgmo-clock-digital-part="ap"]', ts.ap);
272
305
  setPart(group, "[data-dgmo-clock-ampm]", ts.ap.toUpperCase());
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Static completion registries — the LIGHT completion surface
3
+ * (`@diagrammo/dgmo/completion`).
4
+ *
5
+ * Pure data: chart-type directive registries, structural keywords, entity-type
6
+ * vocabularies, the reference-grammar descriptor, closed value enums, pipe /
7
+ * same-line metadata keys, and the derived metadata key set.
8
+ *
9
+ * Split out of `./completion` (which additionally owns the symbol *extractors*)
10
+ * so editor front-ends can import the registries without dragging the chart
11
+ * parsers — notably `body/parser`, whose figure-asset catalog is ~290 KB — onto
12
+ * their startup path. Same rationale and rule as `./chart-meta`: only symbols
13
+ * whose transitive imports are parser-constant-only live here.
14
+ *
15
+ * Closed enum sets (`ALL_MARKERS`, wireframe `STATE_KEYWORDS` /
16
+ * `GROUP_ONLY_METADATA`) are imported from their owning parsers — never
17
+ * hand-copied — so completion can't drift from the grammar (one-oracle rule).
18
+ */
19
+ /** Specification for a single directive: description + optional enumerated values. */
20
+ interface DirectiveValueSpec {
21
+ description: string;
22
+ values?: string[];
23
+ }
24
+ /** Specification for a chart type's directives. */
25
+ interface DirectiveSpec {
26
+ directives: Record<string, DirectiveValueSpec>;
27
+ }
28
+ /** Chart-type → directive specifications. Every chart type has at least palette + theme. */
29
+ declare const COMPLETION_REGISTRY: Map<string, DirectiveSpec>;
30
+ declare const CHART_TYPES: ReadonlyArray<{
31
+ name: string;
32
+ description: string;
33
+ }>;
34
+ /**
35
+ * Entity types for `Name is a <type>` declarations, keyed by chart type.
36
+ * Values are sourced from parser constants (VALID_PARTICIPANT_TYPES,
37
+ * C4_IS_A_RE).
38
+ */
39
+ declare const ENTITY_TYPES: Map<string, string[]>;
40
+ /**
41
+ * Chart-type-specific structural keywords offered on an empty/start-of-line in
42
+ * the data zone (block openers like `loop`, section headers like `containers`,
43
+ * the `tag` block declaration, etc.). This is the single source of truth for
44
+ * the editor's structural-keyword popup — every entry MUST be a token the
45
+ * corresponding parser actually recognizes (validated by the
46
+ * completion-conformance suite). Do NOT add removed/diagnostic-only tokens
47
+ * (e.g. cycle's `no-descriptions`) or tokens the parser ignores.
48
+ *
49
+ * Chart types not listed here have no structural keywords (most data charts).
50
+ */
51
+ declare const STRUCTURAL_KEYWORDS: Map<string, string[]>;
52
+ /**
53
+ * Chart types that support `tag` block declarations (and thus the
54
+ * `alias`/`default` sub-keywords inside a tag block). Derived from
55
+ * STRUCTURAL_KEYWORDS so the two can never drift — a chart supports tag blocks
56
+ * iff it offers the `tag` keyword.
57
+ */
58
+ declare const TAG_SUPPORTING_TYPES: ReadonlySet<string>;
59
+ /** Whether a chart type has a reference position (arrow/operator → a prior
60
+ * declaration) and which operators open it. The single oracle that drives
61
+ * the library extractor audit, the app's entity-trigger map, and the
62
+ * conformance drift-guard — so the three can never disagree. v1 models
63
+ * reference-after-operator only (NOT metadata-target references). */
64
+ interface ReferenceGrammar {
65
+ hasReferenceGrammar: boolean;
66
+ /** Literal operator tokens that introduce a reference (e.g. `->`, `<->`,
67
+ * `~>`, `+`). The app derives its trigger regex from these (allowing the
68
+ * labeled `-label->` / `~label~>` variants where applicable). */
69
+ referenceOperators: string[];
70
+ }
71
+ /**
72
+ * Per-type reference grammar. Grounded in each parser's arrow/operator
73
+ * grammar — NOT hand-typed blind. Types with no reference position (org,
74
+ * kanban, mindmap, all data charts, the radial/visualization types) declare
75
+ * `hasReferenceGrammar: false`. `map` references (`route A ~> B`) are owned by
76
+ * the app's bespoke geo-completion path, so it stays `false` here to avoid
77
+ * double-handling.
78
+ */
79
+ declare const REFERENCE_GRAMMAR: Map<string, ReferenceGrammar>;
80
+ /**
81
+ * RACI marker alphabet (slot-7 enum in the role-assignment value position).
82
+ * Consumed by editor completion. The chart type is always `raci`; the variant
83
+ * (RACI / RASCI / DACI) is inferred from the markers used, so completion offers
84
+ * the full union (R / A / S / C / I / D) sourced from `raci/variants.ts`'s
85
+ * `ALL_MARKERS` — the marker set can never drift from the parser.
86
+ */
87
+ declare const RACI_MARKER_ALPHABETS: ReadonlyMap<string, readonly string[]>;
88
+ /**
89
+ * Closed set of wireframe element state flags (slot-7 trailing enum, e.g.
90
+ * `(Submit) primary destructive`). Sourced from the wireframe parser's
91
+ * `STATE_KEYWORDS` — exported there and consumed here, never re-typed.
92
+ */
93
+ declare const WIREFRAME_FLAGS: readonly string[];
94
+ /**
95
+ * The subset of `WIREFRAME_FLAGS` that only make sense on group elements
96
+ * (`[...]`). Editor completion drops these for non-group elements (buttons
97
+ * `(...)`, dropdowns `{...}`). Sourced from the wireframe parser's
98
+ * `GROUP_ONLY_METADATA` — exported there and consumed here, never re-typed.
99
+ */
100
+ declare const WIREFRAME_GROUP_ONLY_FLAGS: readonly string[];
101
+ /** Specification for a single pipe metadata key. */
102
+ interface PipeKeySpec {
103
+ description: string;
104
+ values?: string[];
105
+ }
106
+ /**
107
+ * Pipe metadata keys for inline `| key value` on data lines.
108
+ * Keyed by chart type → { context-name: keys }.
109
+ *
110
+ * Contexts are open-ended. The two universal ones are:
111
+ * - `node` — the default for any non-arrow line
112
+ * - `edge` — lines containing an arrow (`->`, `--`)
113
+ *
114
+ * Charts with richer line types declare additional contexts:
115
+ * - raci: `role`, `phase`, `assignment`
116
+ * - ring / pyramid: `layer`
117
+ * - tech-radar: `quadrant`, `blip`
118
+ * - journey-map: `step`
119
+ *
120
+ * IMPORTANT: NEVER add 'sequence' here. The `|` character in sequence
121
+ * diagrams separates display names from identifiers and tag metadata.
122
+ * Adding sequence would trigger false pipe-metadata completions on every `|`.
123
+ */
124
+ type PipeContextMap = Record<string, Record<string, PipeKeySpec>>;
125
+ declare const PIPE_METADATA: Map<string, PipeContextMap>;
126
+ /** All known directive keys, derived from COMPLETION_REGISTRY. Includes implicit keys. */
127
+ declare const METADATA_KEY_SET: ReadonlySet<string>;
128
+
129
+ export { CHART_TYPES, COMPLETION_REGISTRY, type DirectiveSpec, type DirectiveValueSpec, ENTITY_TYPES, METADATA_KEY_SET, PIPE_METADATA, type PipeContextMap, type PipeKeySpec, RACI_MARKER_ALPHABETS, REFERENCE_GRAMMAR, type ReferenceGrammar, STRUCTURAL_KEYWORDS, TAG_SUPPORTING_TYPES, WIREFRAME_FLAGS, WIREFRAME_GROUP_ONLY_FLAGS };