@diagrammo/dgmo 0.64.1 → 0.66.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 (150) hide show
  1. package/LICENSE +1 -1
  2. package/dist/advanced.d.ts +6773 -0
  3. package/dist/advanced.js +71 -71
  4. package/dist/block.d.ts +159 -0
  5. package/dist/block.js +21 -16
  6. package/dist/chart-meta-CpicJ1kj.d.ts +239 -0
  7. package/dist/chart-meta.d.ts +3 -0
  8. package/dist/chart-meta.js +3 -3
  9. package/dist/{charts-d3-ZTXJWEHI.js → charts-d3-I6OE5K3B.js} +9 -9
  10. package/dist/{chunk-C6DMG2V6.js → chunk-27YPE7NO.js} +28 -12
  11. package/dist/{chunk-RBAW7VUG.js → chunk-2EPV7CLY.js} +5 -7
  12. package/dist/{chunk-SCJ7CAJF.js → chunk-3HOCNSPD.js} +2 -2
  13. package/dist/{chunk-VOJOARA6.js → chunk-3OT63FS4.js} +82 -77
  14. package/dist/{chunk-Z2ADWRSW.js → chunk-3PSPUYT5.js} +3 -3
  15. package/dist/{chunk-RBBJIHNL.js → chunk-4IE42ODL.js} +11 -11
  16. package/dist/{chunk-SMCUX42K.js → chunk-4TM7MWU4.js} +7 -6
  17. package/dist/{chunk-H3HFC3SQ.js → chunk-5GM6BZO7.js} +3 -3
  18. package/dist/{chunk-7T3A2UK3.js → chunk-5T7K6QND.js} +15 -16
  19. package/dist/{chunk-NKRCPBTJ.js → chunk-6BOPYGJC.js} +6 -6
  20. package/dist/{chunk-MHI6W6XS.js → chunk-6IUL6LER.js} +10 -7
  21. package/dist/{chunk-S5RWWISJ.js → chunk-7L53J53J.js} +4 -4
  22. package/dist/{chunk-WDJ4HAGO.js → chunk-A6CTYC7O.js} +2 -2
  23. package/dist/{chunk-CDMF7P5A.js → chunk-BBCKUAUR.js} +2 -2
  24. package/dist/{chunk-AA4M6F2P.js → chunk-BBY57XAA.js} +3 -3
  25. package/dist/{chunk-NKRVFQGO.js → chunk-BDI25HWH.js} +18 -6
  26. package/dist/{chunk-SVR3YFM3.js → chunk-C666LP3O.js} +20 -15
  27. package/dist/{chunk-KRTO7NRK.js → chunk-D2WHS23S.js} +2 -2
  28. package/dist/{chunk-LYTEVE2N.js → chunk-DBF4IM4U.js} +20 -15
  29. package/dist/{chunk-PCWPYOT4.js → chunk-ET4R3AU5.js} +4 -4
  30. package/dist/{chunk-2KOBOIB2.js → chunk-FBD5ASMB.js} +2 -2
  31. package/dist/{chunk-ES66QH6J.js → chunk-FG24NXKN.js} +2 -2
  32. package/dist/{chunk-3CIOJ5YJ.js → chunk-FJ57274M.js} +3 -1
  33. package/dist/{chunk-6BVIZW5N.js → chunk-FLFBY5GN.js} +14 -12
  34. package/dist/{chunk-XUN3MIO3.js → chunk-G64OVYUT.js} +2 -2
  35. package/dist/{chunk-RQL25P3U.js → chunk-G7QZF6T3.js} +9 -9
  36. package/dist/{chunk-IGIJZHB6.js → chunk-GC7CBX6C.js} +6 -6
  37. package/dist/{chunk-B6AONGTI.js → chunk-GDQN2TPX.js} +21 -14
  38. package/dist/{chunk-CZUSH6NI.js → chunk-GMLSYNFP.js} +10 -9
  39. package/dist/{chunk-R6HCNSP6.js → chunk-GOW5VO6M.js} +2 -2
  40. package/dist/{chunk-SPHC4RYF.js → chunk-GXOMKWQ5.js} +10 -9
  41. package/dist/{chunk-MQHOKBJ6.js → chunk-IJ4FUFTR.js} +5 -5
  42. package/dist/{chunk-V3UQSKWJ.js → chunk-IJSFEU4J.js} +9 -9
  43. package/dist/{chunk-LSFZDBAP.js → chunk-IKHV5IJB.js} +2 -2
  44. package/dist/{chunk-LMXAB4YM.js → chunk-IZ6RWMBM.js} +9 -9
  45. package/dist/{chunk-6VJCURWU.js → chunk-J2EXBAPZ.js} +4 -5
  46. package/dist/{chunk-IX6N5MCY.js → chunk-JCL4K7AK.js} +12 -11
  47. package/dist/{chunk-OBKM6GIJ.js → chunk-JTUDM7S4.js} +10 -10
  48. package/dist/{chunk-CVVICCSB.js → chunk-L65WI4HO.js} +4 -4
  49. package/dist/{chunk-67D4MN2H.js → chunk-LK6LTSLH.js} +2 -2
  50. package/dist/{chunk-KOHIF4LD.js → chunk-MBODBL7C.js} +6 -5
  51. package/dist/chunk-MTGGOCND.js +638 -0
  52. package/dist/{chunk-VJARCVMH.js → chunk-MU3CJPJF.js} +2 -2
  53. package/dist/{chunk-RKTIIU7Z.js → chunk-N6XI5VTA.js} +4 -4
  54. package/dist/{chunk-ODUT5WMC.js → chunk-NVOU7N6C.js} +2 -2
  55. package/dist/{chunk-DB2KQ5DN.js → chunk-O274UTXH.js} +5 -5
  56. package/dist/{chunk-T4QXHE34.js → chunk-OWUWLZJT.js} +13 -11
  57. package/dist/{chunk-LDVUPGWC.js → chunk-OWVDD5EC.js} +2 -2
  58. package/dist/{chunk-M4HYPDER.js → chunk-P5OCINCI.js} +8 -8
  59. package/dist/{chunk-YLK3JNWP.js → chunk-QNCXONBR.js} +2 -2
  60. package/dist/{chunk-I2ATN25N.js → chunk-R4XM44BW.js} +25 -16
  61. package/dist/{chunk-37EHGTQ2.js → chunk-R7S5542V.js} +4 -4
  62. package/dist/{chunk-DJCZWQ2A.js → chunk-RTTZIX34.js} +4 -4
  63. package/dist/{chunk-OMTBYLKN.js → chunk-TPKNA2U5.js} +9 -7
  64. package/dist/{chunk-DN5HEDE4.js → chunk-TT5B36WO.js} +16 -20
  65. package/dist/{chunk-SF3JAWMY.js → chunk-TWILCDUE.js} +3 -3
  66. package/dist/{chunk-NIZM3LAG.js → chunk-UINRIO77.js} +10 -10
  67. package/dist/{chunk-5H2LIQIH.js → chunk-UJXCDF4E.js} +4 -4
  68. package/dist/{chunk-Z5ID35YP.js → chunk-UTCPNJND.js} +2 -4
  69. package/dist/{chunk-U42ZEK7L.js → chunk-V4BYBIBU.js} +24 -15
  70. package/dist/{chunk-L4IN4OBB.js → chunk-VLI5SYXW.js} +7 -7
  71. package/dist/{chunk-43E26CDA.js → chunk-VS2M72PF.js} +4 -4
  72. package/dist/{chunk-KZ3PCDUJ.js → chunk-VV6HZQ5K.js} +2 -2
  73. package/dist/{chunk-Z5BTSBWW.js → chunk-WF2HDQPG.js} +4 -4
  74. package/dist/{chunk-JU2VMFYC.js → chunk-X26BF4T2.js} +2 -2
  75. package/dist/{chunk-TAJ2XFTT.js → chunk-XKMCL2YJ.js} +19 -16
  76. package/dist/{chunk-7GUYGQR4.js → chunk-XVEPB2UU.js} +4 -4
  77. package/dist/{chunk-YHTKDIF2.js → chunk-YGFNITPC.js} +11 -11
  78. package/dist/{chunk-I24O2RWT.js → chunk-YJOOIOSR.js} +84 -14
  79. package/dist/{chunk-KPX2OWZR.js → chunk-YKWHUPBP.js} +13 -14
  80. package/dist/{chunk-FRC4LDTQ.js → chunk-YMYPFX4O.js} +36 -30
  81. package/dist/cloud-reference.d.ts +96 -0
  82. package/dist/completion-registry.d.ts +129 -0
  83. package/dist/d3-Bfhj-XBX.d.ts +496 -0
  84. package/dist/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
  85. package/dist/dgmo-router-EAW7XiBE.d.ts +280 -0
  86. package/dist/{dimensions-ES6O2T4H.js → dimensions-RD3Y7FCF.js} +7 -7
  87. package/dist/{flowchart-renderer-EXMRHFTQ.js → flowchart-renderer-6JKM2FA4.js} +7 -7
  88. package/dist/index.d.ts +210 -0
  89. package/dist/index.js +15 -15
  90. package/dist/{layout-HBWT2G23.js → layout-4LNMXLVK.js} +3 -3
  91. package/dist/{layout-UU4VJTOP.js → layout-62ERBWCM.js} +3 -3
  92. package/dist/{layout-N6X46MWG.js → layout-6SKHNQYO.js} +4 -4
  93. package/dist/{layout-OH4VQ3OI.js → layout-7JULRP4Y.js} +4 -4
  94. package/dist/{layout-QTZO6CW5.js → layout-FA37VP7V.js} +4 -4
  95. package/dist/layout-IN53LAE6.js +9 -0
  96. package/dist/{layout-H4H4OFE4.js → layout-IO6ORC5T.js} +3 -3
  97. package/dist/{layout-54P3DAXY.js → layout-LVMWK4QY.js} +5 -5
  98. package/dist/{layout-WCOEZPOI.js → layout-MNOTDWXW.js} +4 -4
  99. package/dist/{layout-2T2VCCTM.js → layout-RD7GDM4I.js} +5 -5
  100. package/dist/{layout-SKQMIXTG.js → layout-SBQTN2YM.js} +4 -4
  101. package/dist/{layout-5E2NQZNM.js → layout-SGYR6HBX.js} +3 -3
  102. package/dist/{layout-W3ZBJOIK.js → layout-WIMQIHBU.js} +5 -5
  103. package/dist/{layout-search-AJ6VUVUI.js → layout-search-C44CJQOB.js} +5 -5
  104. package/dist/{legend-constants-QQU3QYBF.js → legend-constants-RGINV5SF.js} +3 -3
  105. package/dist/live-link-resolve.d.ts +73 -0
  106. package/dist/{parser-KSIYWKYF.js → parser-CSKF2KNO.js} +8 -4
  107. package/dist/{parser-2BGDJJ2L.js → parser-WLL63XH7.js} +2 -2
  108. package/dist/{renderer-XLEYPLVL.js → renderer-2UIQVKXK.js} +8 -8
  109. package/dist/{renderer-KOWVTTYR.js → renderer-3GG2DEFQ.js} +7 -7
  110. package/dist/{renderer-XLPNUOYA.js → renderer-6NDYVZXQ.js} +10 -10
  111. package/dist/{renderer-2ARNFXSC.js → renderer-6ST44AVP.js} +10 -10
  112. package/dist/{renderer-YLM4CGBG.js → renderer-ALP46W2X.js} +8 -8
  113. package/dist/{renderer-HLWEJQJW.js → renderer-BEVY3UP5.js} +5 -5
  114. package/dist/{renderer-H6AQ4UIR.js → renderer-BXPWSNTJ.js} +13 -13
  115. package/dist/{renderer-BYWLJDT4.js → renderer-EWTETTII.js} +8 -8
  116. package/dist/{renderer-KK2534AF.js → renderer-FHXAWDNI.js} +4 -4
  117. package/dist/{renderer-OB77AT7V.js → renderer-FI4IKF4I.js} +7 -7
  118. package/dist/{renderer-DMVUBKP7.js → renderer-GHYH6DLG.js} +4 -4
  119. package/dist/{renderer-LSBXYOID.js → renderer-GYYJ4APT.js} +10 -10
  120. package/dist/{renderer-M43ROWET.js → renderer-JFOHE3YB.js} +9 -9
  121. package/dist/{renderer-OA7FSZ4A.js → renderer-L5QGQTLV.js} +3 -3
  122. package/dist/{renderer-7OOC2ZO2.js → renderer-L7S6YVM6.js} +4 -4
  123. package/dist/{renderer-YELZR4QT.js → renderer-LCHVBTV4.js} +12 -12
  124. package/dist/{renderer-IN3UPTZS.js → renderer-M4DAYNWC.js} +3 -3
  125. package/dist/{renderer-WN47AMUM.js → renderer-NXIK3LOA.js} +8 -8
  126. package/dist/{renderer-QR5343AR.js → renderer-OWUXQDHM.js} +3 -3
  127. package/dist/{renderer-FCO42JLK.js → renderer-PJNJOCLB.js} +8 -8
  128. package/dist/{renderer-OYTERGAO.js → renderer-QQBUBD66.js} +9 -9
  129. package/dist/{renderer-PM7JPC3J.js → renderer-REFE3YFH.js} +11 -11
  130. package/dist/{renderer-C6KOE774.js → renderer-RL2JGVPC.js} +10 -10
  131. package/dist/{renderer-ZNTLBQ45.js → renderer-RVFPPKWN.js} +9 -9
  132. package/dist/{renderer-QEHUJHRK.js → renderer-SFQHFPC5.js} +10 -10
  133. package/dist/{renderer-LO4FXQHP.js → renderer-T4CMBGA5.js} +8 -8
  134. package/dist/{renderer-NHFRVCDC.js → renderer-T66477EQ.js} +9 -9
  135. package/dist/{renderer-M3PQKXK2.js → renderer-TJD6A3AK.js} +13 -13
  136. package/dist/{renderer-2E7LQC32.js → renderer-URPIVAPI.js} +3 -3
  137. package/dist/{renderer-T5CUGSXP.js → renderer-WENGQEX6.js} +7 -7
  138. package/dist/{renderer-WR3FA3FF.js → renderer-WR6J7NKH.js} +8 -8
  139. package/dist/{renderer-YBEZ5V2H.js → renderer-X3V2G4UL.js} +3 -3
  140. package/dist/{renderer-KPEQ72FY.js → renderer-YAW4VHAI.js} +11 -11
  141. package/dist/{renderer-radial-XWAKJACV.js → renderer-radial-HOUGPUPW.js} +7 -7
  142. package/dist/{state-renderer-LIESKSBO.js → state-renderer-JJSQJZEL.js} +11 -11
  143. package/dist/tag-groups-NUA2F1I5.d.ts +263 -0
  144. package/dist/themes-Dem5xalq.d.ts +139 -0
  145. package/docs/ai-integration.md +1 -1
  146. package/docs/language-reference.md +5 -0
  147. package/gallery/fixtures/er.dgmo +1 -1
  148. package/package.json +5 -3
  149. package/dist/chunk-4ASYQ347.js +0 -185
  150. package/dist/layout-5XGYNYVT.js +0 -9
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  buildTagLaneRowList,
3
3
  renderGantt
4
- } from "./chunk-I2ATN25N.js";
4
+ } from "./chunk-R4XM44BW.js";
5
5
  import "./chunk-YRYKTYMQ.js";
6
6
  import "./chunk-YYVTBZZC.js";
7
- import "./chunk-6VJCURWU.js";
7
+ import "./chunk-J2EXBAPZ.js";
8
8
  import "./chunk-A4GOY3PE.js";
9
- import "./chunk-RBAW7VUG.js";
10
- import "./chunk-ES66QH6J.js";
11
- import "./chunk-Z5ID35YP.js";
12
- import "./chunk-SCJ7CAJF.js";
13
- import "./chunk-4ASYQ347.js";
9
+ import "./chunk-2EPV7CLY.js";
10
+ import "./chunk-FG24NXKN.js";
11
+ import "./chunk-UTCPNJND.js";
12
+ import "./chunk-3HOCNSPD.js";
13
+ import "./chunk-MTGGOCND.js";
14
14
  import "./chunk-NOTA6TEI.js";
15
15
  import "./chunk-MDI5FMWO.js";
16
16
  import "./chunk-P2PUWV3Y.js";
@@ -23,4 +23,4 @@ export {
23
23
  buildTagLaneRowList,
24
24
  renderGantt
25
25
  };
26
- //# sourceMappingURL=renderer-WR3FA3FF.js.map
26
+ //# sourceMappingURL=renderer-WR6J7NKH.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  renderVersionControl,
3
3
  renderVersionControlForExport
4
- } from "./chunk-YLK3JNWP.js";
4
+ } from "./chunk-QNCXONBR.js";
5
5
  import "./chunk-A4GOY3PE.js";
6
- import "./chunk-Z5ID35YP.js";
6
+ import "./chunk-UTCPNJND.js";
7
7
  import "./chunk-42IT4BG2.js";
8
8
  import "./chunk-EXNKNJ65.js";
9
9
  import "./chunk-OLMWTJVU.js";
@@ -12,4 +12,4 @@ export {
12
12
  renderVersionControl,
13
13
  renderVersionControlForExport
14
14
  };
15
- //# sourceMappingURL=renderer-YBEZ5V2H.js.map
15
+ //# sourceMappingURL=renderer-X3V2G4UL.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  renderOrg,
3
3
  renderOrgForExport
4
- } from "./chunk-RBBJIHNL.js";
5
- import "./chunk-KZ3PCDUJ.js";
6
- import "./chunk-RKTIIU7Z.js";
7
- import "./chunk-H3HFC3SQ.js";
8
- import "./chunk-3CIOJ5YJ.js";
4
+ } from "./chunk-4IE42ODL.js";
5
+ import "./chunk-VV6HZQ5K.js";
6
+ import "./chunk-N6XI5VTA.js";
7
+ import "./chunk-5GM6BZO7.js";
8
+ import "./chunk-FJ57274M.js";
9
9
  import "./chunk-YYVTBZZC.js";
10
10
  import "./chunk-RU2HHHYA.js";
11
11
  import "./chunk-A4GOY3PE.js";
12
- import "./chunk-RBAW7VUG.js";
13
- import "./chunk-ES66QH6J.js";
14
- import "./chunk-Z5ID35YP.js";
15
- import "./chunk-SCJ7CAJF.js";
16
- import "./chunk-4ASYQ347.js";
12
+ import "./chunk-2EPV7CLY.js";
13
+ import "./chunk-FG24NXKN.js";
14
+ import "./chunk-UTCPNJND.js";
15
+ import "./chunk-3HOCNSPD.js";
16
+ import "./chunk-MTGGOCND.js";
17
17
  import "./chunk-CUYDE77F.js";
18
18
  import "./chunk-NOTA6TEI.js";
19
19
  import "./chunk-MDI5FMWO.js";
@@ -26,4 +26,4 @@ export {
26
26
  renderOrg,
27
27
  renderOrgForExport
28
28
  };
29
- //# sourceMappingURL=renderer-KPEQ72FY.js.map
29
+ //# sourceMappingURL=renderer-YAW4VHAI.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  renderTreemapRadial,
3
3
  renderTreemapRadialForExport
4
- } from "./chunk-SPHC4RYF.js";
4
+ } from "./chunk-GXOMKWQ5.js";
5
5
  import "./chunk-3A7KMF33.js";
6
- import "./chunk-RBAW7VUG.js";
7
- import "./chunk-ES66QH6J.js";
8
- import "./chunk-Z5ID35YP.js";
9
- import "./chunk-SCJ7CAJF.js";
10
- import "./chunk-4ASYQ347.js";
6
+ import "./chunk-2EPV7CLY.js";
7
+ import "./chunk-FG24NXKN.js";
8
+ import "./chunk-UTCPNJND.js";
9
+ import "./chunk-3HOCNSPD.js";
10
+ import "./chunk-MTGGOCND.js";
11
11
  import "./chunk-MDI5FMWO.js";
12
12
  import "./chunk-P2PUWV3Y.js";
13
13
  import "./chunk-42IT4BG2.js";
@@ -18,4 +18,4 @@ export {
18
18
  renderTreemapRadial,
19
19
  renderTreemapRadialForExport
20
20
  };
21
- //# sourceMappingURL=renderer-radial-XWAKJACV.js.map
21
+ //# sourceMappingURL=renderer-radial-HOUGPUPW.js.map
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  renderState,
3
3
  renderStateForExport
4
- } from "./chunk-M4HYPDER.js";
4
+ } from "./chunk-P5OCINCI.js";
5
5
  import "./chunk-PDKUANDZ.js";
6
- import "./chunk-LSFZDBAP.js";
6
+ import "./chunk-IKHV5IJB.js";
7
7
  import "./chunk-LP7EC4MI.js";
8
8
  import "./chunk-H52HJ26L.js";
9
9
  import "./chunk-6EK55ART.js";
10
- import "./chunk-VJARCVMH.js";
10
+ import "./chunk-MU3CJPJF.js";
11
11
  import "./chunk-5DH3KYFH.js";
12
12
  import "./chunk-NCT22MOD.js";
13
13
  import "./chunk-WGC42WJU.js";
14
- import "./chunk-3CIOJ5YJ.js";
14
+ import "./chunk-FJ57274M.js";
15
15
  import "./chunk-YYVTBZZC.js";
16
- import "./chunk-6VJCURWU.js";
16
+ import "./chunk-J2EXBAPZ.js";
17
17
  import "./chunk-RU2HHHYA.js";
18
18
  import "./chunk-A4GOY3PE.js";
19
- import "./chunk-RBAW7VUG.js";
20
- import "./chunk-ES66QH6J.js";
21
- import "./chunk-Z5ID35YP.js";
22
- import "./chunk-SCJ7CAJF.js";
23
- import "./chunk-4ASYQ347.js";
19
+ import "./chunk-2EPV7CLY.js";
20
+ import "./chunk-FG24NXKN.js";
21
+ import "./chunk-UTCPNJND.js";
22
+ import "./chunk-3HOCNSPD.js";
23
+ import "./chunk-MTGGOCND.js";
24
24
  import "./chunk-SR7NGZNM.js";
25
25
  import "./chunk-NXMESY4J.js";
26
26
  import "./chunk-QE4GTFZS.js";
@@ -37,4 +37,4 @@ export {
37
37
  renderState,
38
38
  renderStateForExport
39
39
  };
40
- //# sourceMappingURL=state-renderer-LIESKSBO.js.map
40
+ //# sourceMappingURL=state-renderer-JJSQJZEL.js.map
@@ -0,0 +1,263 @@
1
+ type DgmoSeverity = 'error' | 'warning';
2
+ interface DgmoError {
3
+ line: number;
4
+ column?: number;
5
+ message: string;
6
+ severity: DgmoSeverity;
7
+ /**
8
+ * Optional stable diagnostic code (e.g. 'E_ARROW_SUBSTRING_IN_LABEL').
9
+ * Additive; pre-existing diagnostics omit this field and existing
10
+ * substring-on-`.message` assertions keep working unchanged.
11
+ */
12
+ code?: string;
13
+ }
14
+ declare function makeDgmoError(line: number, message: string, severity?: DgmoSeverity, code?: string): DgmoError;
15
+ /** Runtime params passed to `emit()` and forwarded to a message builder. */
16
+ type DiagnosticParams = Record<string, unknown>;
17
+ /**
18
+ * Parameter type for a `DiagnosticSpec.message` builder body. Typed loosely
19
+ * (`any`) on purpose: builders are hand-authored interpolation bags keyed by
20
+ * ad-hoc names, and dgmo's tsconfig enables `noPropertyAccessFromIndexSignature`
21
+ * (which forbids `p.name` dot-access on a `Record<string, unknown>`). Using
22
+ * `any` here keeps builder bodies readable (`p.name`) instead of forcing
23
+ * `p['name']` bracket access at every interpolation site.
24
+ */
25
+ type DiagnosticMessageParams = any;
26
+ interface DiagnosticSpec {
27
+ /** Stable diagnostic code, e.g. `'E_MAP_UNKNOWN_PLACE'`. */
28
+ code: string;
29
+ /** Severity — must agree with the `E_`/`W_`/`I_` code prefix. */
30
+ severity: DgmoSeverity;
31
+ /** Owning chart type (`'map'`, `'swimlane'`, …) or `null` for universal/global codes. */
32
+ chartType: string | null;
33
+ /** Short human label for the catalog UI. */
34
+ title: string;
35
+ /**
36
+ * Canonical message wording. A plain string for static messages, or a
37
+ * builder `(params) => string` when the message interpolates runtime
38
+ * values. The builder must tolerate being called with `{}` so the
39
+ * catalog can show a representative message without live params.
40
+ */
41
+ message: string | ((params: DiagnosticMessageParams) => string);
42
+ /** Optional fix guidance shown alongside the message. */
43
+ hint?: string;
44
+ /** Minimal `.dgmo` source that triggers this diagnostic (for docs/console). */
45
+ example?: string;
46
+ }
47
+ /** Optional extras when emitting (currently just an explicit column). */
48
+ interface EmitOptions {
49
+ column?: number;
50
+ }
51
+ /**
52
+ * Emit a diagnostic from its `DiagnosticSpec`. The code, severity, and
53
+ * canonical wording all come from the spec — call sites supply only the
54
+ * line and the interpolation params, so the code/severity can never drift
55
+ * out of sync with the declared spec. Replaces the per-parser
56
+ * `push`/`err`/`fail` wrappers that each re-declared this shape.
57
+ */
58
+ declare function emit(spec: DiagnosticSpec, line: number, params?: DiagnosticParams, opts?: EmitOptions): DgmoError;
59
+ declare function formatDgmoError(err: DgmoError): string;
60
+
61
+ /**
62
+ * Compact view state schema (ADR-6).
63
+ * All fields optional. Only non-default values are encoded.
64
+ * `tag: null` means "user chose none"; absent `tag` means "use DSL default" (ADR-5).
65
+ */
66
+ interface CompactViewState {
67
+ tag?: string | null;
68
+ cs?: number[];
69
+ cg?: string[];
70
+ swim?: string | null;
71
+ cl?: string[];
72
+ cc?: string[];
73
+ rm?: string;
74
+ htv?: Record<string, string[]>;
75
+ ha?: string[];
76
+ sem?: boolean;
77
+ cm?: boolean;
78
+ c4l?: string;
79
+ c4s?: string;
80
+ c4c?: string;
81
+ rps?: number;
82
+ spd?: number;
83
+ io?: Record<string, number>;
84
+ hd?: boolean;
85
+ cbd?: boolean;
86
+ rq?: string;
87
+ an?: boolean;
88
+ fl?: boolean;
89
+ }
90
+ interface DecodedDiagramUrl {
91
+ dsl: string;
92
+ viewState: CompactViewState;
93
+ palette?: string;
94
+ theme?: 'light' | 'dark';
95
+ filename?: string;
96
+ }
97
+ interface EncodeDiagramUrlOptions {
98
+ baseUrl?: string;
99
+ viewState?: CompactViewState;
100
+ palette?: string;
101
+ theme?: 'light' | 'dark';
102
+ filename?: string;
103
+ }
104
+ type EncodeDiagramUrlResult = {
105
+ url: string;
106
+ error?: undefined;
107
+ } | {
108
+ url?: undefined;
109
+ error: 'too-large';
110
+ compressedSize: number;
111
+ limit: number;
112
+ };
113
+ /**
114
+ * Encode a CompactViewState to a compressed string for URL embedding.
115
+ * Returns empty string if state has no keys (ADR-4).
116
+ */
117
+ declare function encodeViewState(state: CompactViewState): string;
118
+ /**
119
+ * Decode a compressed view state string back to CompactViewState.
120
+ * Returns empty object on failure (no crash).
121
+ */
122
+ declare function decodeViewState(encoded: string): CompactViewState;
123
+ /**
124
+ * Compress a DGMO DSL string into a shareable URL.
125
+ * Returns `{ url }` on success, or `{ error: 'too-large', compressedSize, limit }` if the
126
+ * compressed payload exceeds the 8 KB limit.
127
+ */
128
+ declare function encodeDiagramUrl(dsl: string, options?: EncodeDiagramUrlOptions): EncodeDiagramUrlResult;
129
+ /**
130
+ * Decode a DGMO DSL string and view state from a URL query string or hash.
131
+ * Accepts any of:
132
+ * - `?dgmo=<payload>&vs=<state>`
133
+ * - `#dgmo=<payload>&vs=<state>` (backwards compat)
134
+ * - `dgmo=<payload>`
135
+ * - `<bare payload>`
136
+ *
137
+ * Returns `{ dsl, viewState }`. The DSL is empty string on invalid input.
138
+ */
139
+ declare function decodeDiagramUrl(hash: string): DecodedDiagramUrl;
140
+
141
+ /**
142
+ * Color definitions for a single mode (light or dark).
143
+ * 10 semantic UI colors + 9 named accent colors = 19 total.
144
+ *
145
+ * `readonly` on every field (and the nested `colors` map) by design —
146
+ * palettes flow from the registry into every renderer; nothing in the
147
+ * pipeline should ever mutate a palette in place.
148
+ */
149
+ interface PaletteColors {
150
+ /** Main background (#eceff4 light / #2e3440 dark for Nord) */
151
+ readonly bg: string;
152
+ /** Cards, panels (#e5e9f0 / #3b4252) */
153
+ readonly surface: string;
154
+ /** Popovers, dropdowns (#e5e9f0 / #434c5e) */
155
+ readonly overlay: string;
156
+ /** Borders, dividers, muted (#d8dee9 / #4c566a) */
157
+ readonly border: string;
158
+ /** Primary text (#2e3440 / #eceff4) */
159
+ readonly text: string;
160
+ /** Secondary/diminished text (#4c566a / #d8dee9) */
161
+ readonly textMuted: string;
162
+ /**
163
+ * Light-mode arg for `contrastText()` when text is rendered on a
164
+ * tinted shape fill (e.g. `shapeFill()` output). Must guarantee
165
+ * ≥ 4.5:1 WCAG AA against any `shapeFill()` the palette can produce.
166
+ * Distinct from `colors.white` because palette-aesthetic anchors don't
167
+ * always meet contrast requirements (TD-5).
168
+ */
169
+ readonly textOnFillLight: string;
170
+ /** Dark-mode counterpart to `textOnFillLight`. */
171
+ readonly textOnFillDark: string;
172
+ /** Primary accent — buttons, links */
173
+ readonly primary: string;
174
+ /** Secondary accent */
175
+ readonly secondary: string;
176
+ /** Tertiary accent */
177
+ readonly accent: string;
178
+ /** Error/danger */
179
+ readonly destructive: string;
180
+ /**
181
+ * Used for: inline annotations (red), pie charts, cScale,
182
+ * series rotation, journey actors, Gantt tasks.
183
+ */
184
+ readonly colors: {
185
+ readonly red: string;
186
+ readonly orange: string;
187
+ readonly yellow: string;
188
+ readonly green: string;
189
+ readonly blue: string;
190
+ readonly purple: string;
191
+ readonly teal: string;
192
+ readonly cyan: string;
193
+ readonly gray: string;
194
+ readonly black: string;
195
+ readonly white: string;
196
+ };
197
+ }
198
+ /**
199
+ * Complete palette definition. One object per color scheme.
200
+ * This is what palette authors create — the single artifact for NFR1.
201
+ *
202
+ * Palettes are immutable from the consumer's perspective; the registry
203
+ * hands out the same frozen-shape object on every `getPalette(id)`.
204
+ */
205
+ interface PaletteConfig {
206
+ /** Registry key: 'nord', 'slate', 'catppuccin' */
207
+ readonly id: string;
208
+ /** Display name: 'Nord', 'Slate', 'Catppuccin' */
209
+ readonly name: string;
210
+ /** Light mode color definitions */
211
+ readonly light: PaletteColors;
212
+ /** Dark mode color definitions */
213
+ readonly dark: PaletteColors;
214
+ }
215
+
216
+ /** A single entry inside a tag group: `Value color` */
217
+ interface TagEntry {
218
+ readonly value: string;
219
+ readonly color: string;
220
+ /**
221
+ * The color NAME the author wrote (one of the recognized palette names),
222
+ * when the entry declared an explicit color. Absent for bare/auto-colored
223
+ * entries. `color` above is always the RESOLVED hex (auto and explicit are
224
+ * indistinguishable there); this preserves the authored-vs-auto distinction
225
+ * so a GUI editor can round-trip an explicit color through a reparse.
226
+ */
227
+ readonly authoredColor?: string;
228
+ readonly lineNumber: number;
229
+ }
230
+ /**
231
+ * A tag group block: heading + entries.
232
+ *
233
+ * Parser internals build via `Writable<TagGroup>` from `utils/brand.ts`;
234
+ * once returned to a chart-type parser, consumers see the readonly view.
235
+ */
236
+ interface TagGroup {
237
+ readonly name: string;
238
+ readonly alias?: string;
239
+ readonly entries: readonly TagEntry[];
240
+ /** Default value for nodes without explicit metadata. First entry unless another is marked `default`. */
241
+ readonly defaultValue?: string;
242
+ readonly lineNumber: number;
243
+ }
244
+ /**
245
+ * DOM-safe key for a tag group — used wherever the group name becomes a
246
+ * `data-tag-*` attribute suffix, an entity metadata key, or an `active-tag`
247
+ * match target. For a single-identifier name (the only form the parser used to
248
+ * accept) this is exactly `name.toLowerCase()`, so swapping it in for existing
249
+ * diagrams is byte-identical. A quoted multi-word name (`tag "Trust Zone" as tz`)
250
+ * slugs to a hyphenated identifier (`trust-zone`) so it never produces an
251
+ * invalid DOM attribute name; the original `name` is kept for the legend label.
252
+ */
253
+ declare function tagAttrKey(name: string): string;
254
+ /**
255
+ * The categorical name cycle used to auto-assign colors to bare tag values,
256
+ * in deterministic order. Aliased to the shared {@link CATEGORICAL_COLOR_ORDER}
257
+ * (RGB-seeded, max-contrast, neutrals excluded) so tag swatches and data-chart
258
+ * series colors share one canonical rotation. If a group has more colorless
259
+ * entries than free categorical names, the cycle wraps.
260
+ */
261
+ declare const autoTagColorCycle: readonly string[];
262
+
263
+ export { type CompactViewState as C, type DgmoError as D, type EmitOptions as E, type PaletteConfig as P, type TagGroup as T, type PaletteColors as a, type DiagnosticSpec as b, type DgmoSeverity as c, type DiagnosticParams as d, emit as e, formatDgmoError as f, type TagEntry as g, type DecodedDiagramUrl as h, type EncodeDiagramUrlOptions as i, type EncodeDiagramUrlResult as j, autoTagColorCycle as k, decodeDiagramUrl as l, decodeViewState as m, encodeDiagramUrl as n, encodeViewState as o, makeDgmoError as p, tagAttrKey as t };
@@ -0,0 +1,139 @@
1
+ import { P as PaletteConfig } from './tag-groups-NUA2F1I5.js';
2
+ import { A as AirportData, G as Gazetteer, R as RegionName } from './d3-Bfhj-XBX.js';
3
+
4
+ /**
5
+ * All built-in palettes, keyed by camelCase id. Use directly with render():
6
+ *
7
+ * await render(text, { palette: palettes.catppuccin });
8
+ *
9
+ * For preference/settings storage, the `.id` field of each entry is the
10
+ * canonical string (e.g. `'tokyo-night'`, `'nord'`) — that's the wire format
11
+ * used by share URLs and the CLI `--palette` flag.
12
+ */
13
+ declare const palettes: {
14
+ readonly atlas: PaletteConfig;
15
+ readonly blueprint: PaletteConfig;
16
+ readonly slate: PaletteConfig;
17
+ readonly tidewater: PaletteConfig;
18
+ readonly nord: PaletteConfig;
19
+ readonly catppuccin: PaletteConfig;
20
+ readonly tokyoNight: PaletteConfig;
21
+ };
22
+
23
+ interface MapPlaceCompletion {
24
+ /** Canonical display name (original casing), e.g. `Portland`. */
25
+ readonly name: string;
26
+ /** Text to insert. ISO-qualified (`Portland US-OR`) iff the name is
27
+ * ambiguous in the gazetteer; bare otherwise (disambiguate-once, §24B.8). */
28
+ readonly insert: string;
29
+ /** Menu label (`Portland — US-OR` when ambiguous, else `Portland`). */
30
+ readonly label: string;
31
+ /** Secondary detail, e.g. `US-OR · 652,503`. */
32
+ readonly detail: string;
33
+ readonly iso: string;
34
+ readonly sub?: string;
35
+ readonly pop: number;
36
+ /** `'airport'` for IATA-code entries (icon/grouping affordance); absent or
37
+ * `'city'` for gazetteer cities. Cities rank above airports for a shared
38
+ * prefix so ~1500 codes never bury city names (ADR-5). */
39
+ readonly kind?: 'city' | 'airport';
40
+ }
41
+ interface MapCompletionOptions {
42
+ /** Max results (default 12). */
43
+ readonly limit?: number;
44
+ /** IATA-coded airports (`airports.json`). When supplied, airport codes
45
+ * matching the prefix are offered as a second (post-city) group. Optional —
46
+ * absent (old DI bundles / no asset) just yields city-only completions. */
47
+ readonly airports?: AirportData;
48
+ /** Resolver-inferred map scope (country `US` or subdivision `US-CA`). Biases
49
+ * airport ranking so in-region airports sort above out-of-region same-prefix
50
+ * ones (ADR-6). Pure rank, never a filter — cross-region airports still
51
+ * appear. App passes the document's inferred scope in (Slice 2). */
52
+ readonly scopeISO?: string;
53
+ }
54
+ /**
55
+ * Prefix-match city names + alternate-name aliases against the gazetteer,
56
+ * rank by population (desc; stable tie-break by gazetteer index), and emit
57
+ * ISO-qualified insert text only for ambiguous (same-named) places.
58
+ *
59
+ * Pure + deterministic. Empty/blank query → `[]` (the caller gates min length).
60
+ */
61
+ declare function completeMapPlaces(query: string, gazetteer: Gazetteer, opts?: MapCompletionOptions): MapPlaceCompletion[];
62
+ /** A POI search hit — a city or airport the resolver can resolve, with the
63
+ * exact `token` to paste into DGMO (a `poi`/route endpoint). Powers the CLI
64
+ * `dgmo map search` command and the MCP `lookup_map_location` tool, so authors
65
+ * (and AI agents) can DISCOVER valid place tokens instead of guessing — e.g.
66
+ * learn that "New York" must be `New York City` and that `JFK` is bundled. */
67
+ interface MapLocationMatch {
68
+ /** Canonical display name (cities) or full airport name. */
69
+ readonly name: string;
70
+ /** Exact text to use in DGMO. Cities: the name, ISO-qualified when ambiguous
71
+ * (`Portland US-OR`). Airports: the upper-case IATA code (`JFK`). */
72
+ readonly token: string;
73
+ readonly kind: 'city' | 'airport';
74
+ readonly iso: string;
75
+ readonly sub?: string;
76
+ /** City population (0 for airports). */
77
+ readonly pop: number;
78
+ /** Human detail, e.g. `US-OR · 652,503` or `Airport · John F Kennedy Intl`. */
79
+ readonly detail: string;
80
+ }
81
+ /**
82
+ * Substring-search cities + airports for a discovery surface (CLI / MCP), so an
83
+ * author can find the exact token the resolver expects. Unlike
84
+ * {@link completeMapPlaces} (prefix-only, editor type-ahead), this matches
85
+ * anywhere in a city name OR an airport code/name, so "york" finds
86
+ * `New York City` and "kennedy" finds `JFK`.
87
+ *
88
+ * Ranking: exact-name (or exact-IATA) → prefix → substring; within a tier,
89
+ * cities by population desc (deterministic index tie-break), cities before
90
+ * airports. Pure + deterministic. Empty query → `[]`.
91
+ */
92
+ declare function searchMapLocations(query: string, gazetteer: Gazetteer, opts?: {
93
+ readonly limit?: number;
94
+ readonly airports?: AirportData;
95
+ }): MapLocationMatch[];
96
+ interface MapRegionCompletion {
97
+ /** Display name = insert text (the resolver disambiguates cross-layer
98
+ * collisions like Georgia by map scope, §24B.8). */
99
+ readonly name: string;
100
+ /** ISO 3166-1/3166-2 id. */
101
+ readonly iso: string;
102
+ readonly layer: 'country' | 'us-state';
103
+ /** Secondary detail, e.g. `US state · US-CA` or `Country · DE`. */
104
+ readonly detail: string;
105
+ }
106
+ /**
107
+ * Prefix-match fill-able region names (countries + US states) for region-fill
108
+ * lines. Matches the folded display name OR the ISO code; deterministic
109
+ * (alphabetical by name, then layer). Pure. Empty query → `[]`.
110
+ *
111
+ * `regions` is injected (the `region-names.json` asset, shipped in dist/map-data
112
+ * alongside the gazetteer). Cross-layer same-name (Georgia: country GE + state
113
+ * US-GA) yields both entries, distinguished by `detail`.
114
+ */
115
+ declare function completeMapRegions(query: string, regions: readonly RegionName[], opts?: MapCompletionOptions): MapRegionCompletion[];
116
+
117
+ /**
118
+ * Theme — render mode flag. Selects which palette variant the renderer uses
119
+ * for background and text:
120
+ * - 'light' → palette.light colors
121
+ * - 'dark' → palette.dark colors
122
+ * - 'transparent' → no background fill (for embedding in colored containers)
123
+ */
124
+ type Theme = 'light' | 'dark' | 'transparent';
125
+ /**
126
+ * `themes` namespace — use with render() options for a typed handle:
127
+ *
128
+ * await render(text, { theme: themes.dark });
129
+ *
130
+ * Passing the raw string `'dark'` also works (the underlying type is the
131
+ * string-literal union); the namespace is the conventional path.
132
+ */
133
+ declare const themes: {
134
+ readonly light: "light";
135
+ readonly dark: "dark";
136
+ readonly transparent: "transparent";
137
+ };
138
+
139
+ export { type MapCompletionOptions as M, type Theme as T, type MapLocationMatch as a, type MapPlaceCompletion as b, type MapRegionCompletion as c, completeMapPlaces as d, completeMapRegions as e, palettes as p, searchMapLocations as s, themes as t };
@@ -274,7 +274,7 @@ treasure
274
274
  id int pk
275
275
  name varchar
276
276
  value int
277
- ship_id int fk, nullable
277
+ ship_id int fk nullable
278
278
 
279
279
  ports
280
280
  id int pk
@@ -1267,6 +1267,11 @@ users
1267
1267
  Format: `name [type] [constraints...]`
1268
1268
  Constraints: `pk`, `fk`, `unique`, `nullable`
1269
1269
 
1270
+ Constraints are separated by **spaces**; a comma is a parse error. Write
1271
+ `id text fk nullable`, never `id text fk, nullable` — this is the one place in
1272
+ the language where a comma is wrong, and it used to discard the whole column
1273
+ silently.
1274
+
1270
1275
  ### 8.4 Relationships (Indented Under Source Table)
1271
1276
 
1272
1277
  ```
@@ -27,7 +27,7 @@ treasure
27
27
  id int pk
28
28
  name varchar
29
29
  value int
30
- ship_id int fk, nullable
30
+ ship_id int fk nullable
31
31
 
32
32
  ports
33
33
  id int pk
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@diagrammo/dgmo",
3
- "version": "0.64.1",
3
+ "version": "0.66.0",
4
4
  "description": "DGMO diagram markup language — parser, renderer, and color system",
5
5
  "license": "MIT",
6
+ "author": "Diagrammo LLC",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/diagrammo/dgmo.git"
@@ -83,12 +84,13 @@
83
84
  "scripts": {
84
85
  "codegen": "lezer-generator src/editor/dgmo.grammar -o src/editor/dgmo.grammar.js",
85
86
  "fonts": "node scripts/build-fonts.mjs",
86
- "prebuild": "rm -rf dist && pnpm codegen && pnpm fonts",
87
+ "metrics": "node scripts/build-text-metrics.mjs",
88
+ "prebuild": "rm -rf dist && pnpm codegen && pnpm fonts && pnpm metrics",
87
89
  "build": "DGMO_DEV_RELOAD=1 tsup; _e=$?; rm -rf ../diagrammo-app/node_modules/.vite/deps 2>/dev/null; exit $_e",
88
90
  "typecheck": "tsc --noEmit",
89
91
  "predev": "pnpm fonts",
90
92
  "dev": "DGMO_DEV_RELOAD=1 tsup --watch",
91
- "pretest": "pnpm codegen",
93
+ "pretest": "pnpm codegen && pnpm fonts",
92
94
  "test": "TZ=UTC vitest run --coverage",
93
95
  "bench:perf": "vitest run --config vitest.perf.config.ts tests/perf-bench.ts",
94
96
  "bench:bl": "vitest run --config vitest.bench.config.ts tests/bl-layout-bench.ts",