@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
@@ -0,0 +1,496 @@
1
+ import { T as TagGroup, D as DgmoError, a as PaletteColors, C as CompactViewState } from './tag-groups-NUA2F1I5.js';
2
+
3
+ /** A POI / route-stop position: gazetteer name (+ optional ISO scope) or coords. */
4
+ type PoiPos = {
5
+ readonly kind: 'coords';
6
+ readonly lat: number;
7
+ readonly lon: number;
8
+ } | {
9
+ readonly kind: 'name';
10
+ readonly name: string;
11
+ readonly scope?: string;
12
+ };
13
+ /** One-shot directives (§24B.2/.7). Values are raw strings unless typed.
14
+ *
15
+ * COSMETIC DEFAULTS ARE ON. Every basemap feature renders by default; the only
16
+ * control is a bare `no-*` opt-out flag that sets the matching `noXxx` boolean.
17
+ * Absent (undefined) = feature ON — so render gates test `!== true`, never
18
+ * `=== true`. There are NO positive opt-in cosmetic flags (§24B.2). */
19
+ interface MapDirectives {
20
+ /** Legend label for the region value ramp (`region-heat <label>`). */
21
+ regionMetric?: string;
22
+ /** Recognized color NAME for the choropleth ramp HIGH endpoint, peeled off the
23
+ * `region-heat` trailing token (§24B.3). Defaults to red when absent. */
24
+ regionMetricColor?: string;
25
+ /** Recognized color NAME for the choropleth ramp LOW endpoint (the second,
26
+ * left-of-two trailing colors on `region-heat`, §24B.3). Absent ⇒ the low
27
+ * end is the implied floored neutral (today's single-colour behaviour). */
28
+ regionMetricLowColor?: string;
29
+ /** Legend label for the POI value (marker size) channel (`poi-size`). */
30
+ poiMetric?: string;
31
+ /** Legend label for the edge/leg value (thickness) channel (`flow-width`). */
32
+ flowMetric?: string;
33
+ /** Default ISO scope for bare-name resolution (§24B.8): a 3166-1 country
34
+ * (`locale US`) or 3166-2 subdivision (`locale US-GA`). The country part
35
+ * biases ambiguous bare cities to that nation; the subdivision part further
36
+ * prefers that state. Inferred from content; explicit only to steer a guess. */
37
+ locale?: string;
38
+ activeTag?: string;
39
+ caption?: string;
40
+ /** `no-title` — suppress the title banner (the subtitle/caption, if any, still
41
+ * render). Mirrors the `no-title` directive across the other chart types. */
42
+ noTitle?: boolean;
43
+ /** `no-legend` — suppress the legend (default-on). */
44
+ noLegend?: boolean;
45
+ /** `no-coastline` — suppress the faint nautical-chart water-lines along
46
+ * coasts/shorelines (default-on; geometry derived from drawn region paths). */
47
+ noCoastline?: boolean;
48
+ /** `no-relief` — suppress mountain-range relief hachures. Relief is default-on
49
+ * but auto-gated to dataless reference maps at continent/world zoom (§24B.2). */
50
+ noRelief?: boolean;
51
+ /** `no-context-labels` — suppress the orientation backdrop (water-body names +
52
+ * unreferenced notable country names), distinct from `region-labels`. */
53
+ noContextLabels?: boolean;
54
+ /** `no-region-labels` — suppress region labels (default-on, full→abbrev→hide). */
55
+ noRegionLabels?: boolean;
56
+ /** `no-region-heat-value` — suppress the metric VALUE shown under each data region's
57
+ * name on a `region-heat` choropleth (default-on). The region NAME still
58
+ * renders (governed by `no-region-labels`); only the numeric value line goes. */
59
+ noRegionValue?: boolean;
60
+ /** `no-poi-labels` — suppress POI labels (default-on, collision-managed auto). */
61
+ noPoiLabels?: boolean;
62
+ /** `no-colorize` — force the plain green-land reference dress even when regions
63
+ * are referenced (regions are auto-coloured by default; §24B colorize). A
64
+ * no-op under data — the basemap is already gray there. */
65
+ noColorize?: boolean;
66
+ /** `no-cities` — suppress the subtle gazetteer city dots scattered across the
67
+ * basemap for geographic orientation (default-on; population-ranked, spacing-
68
+ * thinned so density adapts to zoom). Explicit POIs always draw regardless. */
69
+ noCities?: boolean;
70
+ /** `no-cluster-pois` — never collapse coincident POI markers into a count badge
71
+ * (clustering/spiderfy is default-on in the interactive preview). With this set
72
+ * the markers always render fanned out with their legs — the same as a static
73
+ * export — so a dense map reads the same on screen as on paper. No-op for
74
+ * export (already always expanded). */
75
+ noClusterPois?: boolean;
76
+ /** `hours 9-17` — availability window for the clock channel (open/closed status
77
+ * dot), evaluated per pin in its own zone. Raw string; parsed at resolve.
78
+ * Activation is the per-POI `clock` flag (BL-122), not a header directive. */
79
+ clockHours?: string;
80
+ /** `days mon-fri` — working days for the clock channel window (default mon-fri
81
+ * when `hours` is set). Raw string; parsed at resolve. */
82
+ clockDays?: string;
83
+ }
84
+ /** A region-fill: a subdivision name with an optional score and/or tag values
85
+ * (§24B.3/.4 — BOTH may be present; bivariate seam). */
86
+ interface MapRegion {
87
+ readonly name: string;
88
+ /** Optional trailing ISO scope qualifier (§24B.8) — a 3166-1 country code
89
+ * (`Georgia US` → US context) or 3166-2 subdivision (`Georgia US-GA`).
90
+ * Forces the country-vs-state interpretation and silences the ambiguity warning. */
91
+ readonly scope?: string;
92
+ /** Numeric value → choropleth shade (§24B.3). Lifted out of `meta`. */
93
+ readonly value?: number;
94
+ /** §1.5 trailing-token color NAME → flat categorical override fill (§24B.4);
95
+ * painted regardless of the active colouring dimension, no legend entry. */
96
+ readonly color?: string;
97
+ /** Tag values keyed by lowercased tag GROUP name (alias is resolved away). */
98
+ readonly tags: Readonly<Record<string, string>>;
99
+ /** Any remaining reserved keys captured verbatim (`label`/`style`/…). */
100
+ readonly meta: Readonly<Record<string, string>>;
101
+ readonly lineNumber: number;
102
+ }
103
+ /** A point of interest (§24B.5). `meta` holds the numeric `value` (→ marker
104
+ * size) and `style` verbatim; `label` is lifted out. */
105
+ interface MapPoi {
106
+ readonly pos: PoiPos;
107
+ readonly alias?: string;
108
+ readonly label?: string;
109
+ /** §1.5 trailing-token color NAME → flat marker fill (§24B.5); wins over a
110
+ * tag color and the default orange. */
111
+ readonly color?: string;
112
+ /** BL-122 — a `clock` control on this POI line: render a live local-time card
113
+ * above the marker. Bare (`poi Denver clock`) derives the zone from the place;
114
+ * valued (`clock: Europe/Oslo`, held in `meta.clock`) names the zone, for
115
+ * bare-coord pins or to override a city. */
116
+ readonly clock?: boolean;
117
+ readonly tags: Readonly<Record<string, string>>;
118
+ readonly meta: Readonly<Record<string, string>>;
119
+ readonly lineNumber: number;
120
+ }
121
+ /** One leg of a route (§24B.6): an edge from the previous stop to `dest`. Reuses
122
+ * the indented edge arrow idiom (same as sitemap) — in-arrow text = leg label,
123
+ * `width:` = leg thickness, the arrow glyph = shape (`-…->` straight, `~…~>`
124
+ * arc). A tag on the leg line colours the LINE (§24B.6); `label:`/`as` still
125
+ * name the DESTINATION stop. The arrow is required — a bare destination errors. */
126
+ interface MapRouteLeg {
127
+ readonly label?: string;
128
+ readonly style: 'straight' | 'arc';
129
+ readonly value?: string;
130
+ readonly dest: PoiPos;
131
+ readonly destAlias?: string;
132
+ readonly destLabel?: string;
133
+ /** Tag(s) on the leg line → colour the LINE itself. To categorise a STOP,
134
+ * tag its own `poi` line. */
135
+ readonly tags: Readonly<Record<string, string>>;
136
+ readonly lineNumber: number;
137
+ }
138
+ /** An ordered, auto-numbered route (§24B.6): `route <origin>` + a sequence of
139
+ * indented arrow legs, each continuing from the previous stop. Leg shape is
140
+ * per-leg (the arrow glyph) — there is no header-level shape option. Repeat the
141
+ * origin as a leg's destination to close a loop. */
142
+ interface MapRoute {
143
+ readonly origin: PoiPos;
144
+ readonly originAlias?: string;
145
+ readonly originLabel?: string;
146
+ readonly originValue?: string;
147
+ readonly originTags: Readonly<Record<string, string>>;
148
+ readonly legs: readonly MapRouteLeg[];
149
+ readonly lineNumber: number;
150
+ }
151
+ /** A connector (§24B.6). Endpoints are RAW identifier strings (name or alias);
152
+ * binding to POIs/regions is the resolver's job. Token = arrowhead iff it ends
153
+ * in `>`, arc iff it starts with `~`: `->` straight, `~>` arc, `--`/`-label-`
154
+ * undirected straight, `~~`/`~label~` undirected arc. */
155
+ interface MapEdge {
156
+ readonly from: string;
157
+ readonly to: string;
158
+ readonly label?: string;
159
+ readonly directed: boolean;
160
+ readonly style: 'straight' | 'arc';
161
+ readonly meta: Readonly<Record<string, string>>;
162
+ /** Tag(s) on the edge line → colour the LINE itself (§24B.6). */
163
+ readonly tags: Readonly<Record<string, string>>;
164
+ readonly lineNumber: number;
165
+ }
166
+ interface ParsedMap {
167
+ readonly title: string | null;
168
+ readonly titleLineNumber: number | null;
169
+ readonly directives: MapDirectives;
170
+ readonly tagGroups: readonly TagGroup[];
171
+ readonly regions: readonly MapRegion[];
172
+ readonly pois: readonly MapPoi[];
173
+ readonly routes: readonly MapRoute[];
174
+ readonly edges: readonly MapEdge[];
175
+ readonly options: Readonly<Record<string, string>>;
176
+ readonly diagnostics: readonly DgmoError[];
177
+ readonly error: string | null;
178
+ }
179
+ /** Legend descriptor for a rendered map (a layout-stage output, re-exported from
180
+ * `layout.ts`). It lives here so the `legend-band` helper can consume it without
181
+ * importing `layout` — `layout` already value-imports `mapLegendBand`, so the
182
+ * reverse type import would form a layout↔legend-band cycle. */
183
+ interface MapLayoutLegend {
184
+ readonly tagGroups: ReadonlyArray<{
185
+ name: string;
186
+ entries: ReadonlyArray<{
187
+ value: string;
188
+ color: string;
189
+ }>;
190
+ }>;
191
+ readonly activeGroup: string | null;
192
+ readonly ramp?: {
193
+ metric?: string;
194
+ min: number;
195
+ max: number;
196
+ /** Resolved hex of the LOW (t=0) endpoint — the explicit low colour, or the
197
+ * floored neutral the single-colour fills blend up from. */
198
+ low: string;
199
+ /** Resolved hex of the HIGH (t=1) endpoint (the named ramp hue). */
200
+ high: string;
201
+ };
202
+ }
203
+
204
+ /** A TopoJSON topology (world-coarse/world-detail keyed by ISO 3166-1 alpha-2;
205
+ * us-states keyed by ISO 3166-2). Geometry feature `id` is the ISO code;
206
+ * `properties.name` is the display string. Kept loose to avoid a topojson dep. */
207
+ interface BoundaryTopology {
208
+ type: 'Topology';
209
+ objects: Record<string, {
210
+ type: string;
211
+ geometries: BoundaryGeometry[];
212
+ }>;
213
+ arcs: number[][][];
214
+ transform?: {
215
+ scale: [number, number];
216
+ translate: [number, number];
217
+ };
218
+ bbox?: number[];
219
+ }
220
+ interface BoundaryGeometry {
221
+ type: string;
222
+ /** ISO code: alpha-2 (countries) or 3166-2 `US-XX` (states). */
223
+ id: string;
224
+ properties: {
225
+ name: string;
226
+ };
227
+ arcs?: unknown;
228
+ }
229
+ /**
230
+ * A gazetteer city entry: `[lat, lon, iso, pop, name, sub?]`.
231
+ * - `lat`/`lon` — rounded to 3 decimals.
232
+ * - `iso` — ISO 3166-1 alpha-2 country code.
233
+ * - `pop` — population.
234
+ * - `name` — canonical display name (case/accents preserved).
235
+ * - `sub` — ISO 3166-2 subdivision (US cities only in v1, e.g. `US-OR`); absent otherwise.
236
+ */
237
+ type GazetteerEntry = [
238
+ lat: number,
239
+ lon: number,
240
+ iso: string,
241
+ pop: number,
242
+ name: string,
243
+ sub?: string
244
+ ];
245
+ interface Gazetteer {
246
+ /** Every city, stored once. `byName`/`alt` reference cities by array index
247
+ * (normalized — no tuple duplication; geonameid is a build-time-only linker). */
248
+ cities: GazetteerEntry[];
249
+ /** Folded (NFD, diacritic-stripped, lowercased) name → indices into `cities`.
250
+ * Always an array; length > 1 for same-named cities (Portland US-OR / US-ME). */
251
+ byName: Record<string, number[]>;
252
+ /** Folded alias → index into `cities`. Never collides with a `byName` key. */
253
+ alt: Record<string, number>;
254
+ /** BL-122 clock-on-map: distinct IANA zone ids (sorted), referenced by `tz`. */
255
+ zones?: string[];
256
+ /** BL-122: IANA zone per city, parallel to `cities` — `tz[i]` indexes `zones`
257
+ * (−1 when a city had no GeoNames match). Lets `poi Denver clock` derive its
258
+ * local time without the author restating the zone. */
259
+ tz?: number[];
260
+ }
261
+ /**
262
+ * IATA-coded airport index (a SEPARATE optional asset — `airports.json`; ADR-1).
263
+ * Lets memorized airport codes resolve to coordinates through the resolver's
264
+ * existing fold→lookup path (`poi JFK`, `route JFK -> LAX`) — no parser change.
265
+ *
266
+ * - `airports` — `GazetteerEntry` tuples `[lat, lon, iso, 0, name]`. `pop` is
267
+ * always 0 (OurAirports has no enplanement column); `name` is the full airport
268
+ * name, used for COMPLETION DISPLAY only — airports resolve by IATA code, never
269
+ * by name. Coords are rounded to 2 decimals (~1km; sub-pixel at map scale).
270
+ * - `airportIata` — folded 3-letter IATA code → index into `airports`. Consulted
271
+ * LAST in resolution (after city `byName` + `alt`), so a real city always wins
272
+ * a shared token (ADR-2). Airports never enter `cities[]`, so the city-scatter
273
+ * and reverse-geocode layers never see them.
274
+ */
275
+ interface AirportData {
276
+ readonly airports: GazetteerEntry[];
277
+ readonly airportIata: Record<string, number>;
278
+ }
279
+ /** Water-feature class (Natural Earth `featurecla`, rivers/reefs excluded). */
280
+ type WaterKind = 'ocean' | 'sea' | 'gulf' | 'bay' | 'strait' | 'channel' | 'sound';
281
+ /**
282
+ * A water-body label entry: `[lat, lon, name, tier, kind, alt?]`.
283
+ * - `lat`/`lon` — label anchor (Natural Earth inner point), rounded to 3 decimals.
284
+ * - `name` — full display name (no abbreviation exists for water bodies).
285
+ * - `tier` — Natural Earth `scalerank` (0 = most prominent → orientation priority).
286
+ * - `kind` — feature class (drives styling/priority bucketing).
287
+ * - `alt` — optional extra anchor points `[lat, lon][]`; the layout picks the
288
+ * one nearest the viewport center (Decision 5 multi-anchor seam). Absent today.
289
+ */
290
+ type WaterBodyEntry = [
291
+ lat: number,
292
+ lon: number,
293
+ name: string,
294
+ tier: number,
295
+ kind: WaterKind,
296
+ alt?: ReadonlyArray<readonly [number, number]>
297
+ ];
298
+ interface WaterBodies {
299
+ /** Deterministically ordered (tier, then name). Generated from Natural Earth
300
+ * marine polys by scripts/build-map-data.mjs into `water-bodies.json`. */
301
+ readonly entries: readonly WaterBodyEntry[];
302
+ }
303
+ /** A fill-able region (country or US state) — the display name + its ISO id +
304
+ * layer. Powers region-name autocomplete (completion-only; the renderer derives
305
+ * names from the topology directly). Extracted from the topologies by
306
+ * scripts/build-map-data.mjs into `region-names.json`. */
307
+ interface RegionName {
308
+ /** Display name (original casing), e.g. `California` / `Germany`. */
309
+ readonly name: string;
310
+ /** ISO 3166-1 alpha-2 (country) or 3166-2 `US-XX` (state). */
311
+ readonly iso: string;
312
+ readonly layer: 'country' | 'us-state';
313
+ }
314
+ interface RegionNames {
315
+ /** Deterministically ordered (layer, then name). */
316
+ readonly regions: readonly RegionName[];
317
+ }
318
+
319
+ /** The four static assets, injected into the pure resolver (DI). */
320
+ interface MapData {
321
+ worldCoarse: BoundaryTopology;
322
+ worldDetail: BoundaryTopology;
323
+ usStates: BoundaryTopology;
324
+ /** Major lakes (Natural Earth 110m) drawn as water over land — e.g. the Great
325
+ * Lakes. Optional so hand-built test fixtures need not supply it. */
326
+ lakes?: BoundaryTopology;
327
+ /** Major river centerlines (Natural Earth 110m) drawn as thin water lines over
328
+ * land — e.g. the Amazon, Nile, Mississippi. Optional, like `lakes`. */
329
+ rivers?: BoundaryTopology;
330
+ /** Notable mountain-range polygons (Natural Earth 50m geography regions) drawn
331
+ * as a subtle gradient relief cue over base land when the `relief` directive
332
+ * is on — e.g. the Rockies, Andes, Himalayas. Optional, like `lakes`. */
333
+ mountainRanges?: BoundaryTopology;
334
+ /** North-America-clipped 10m country land, used as crisp neighbour context
335
+ * under the albers-usa US view so Canada/Mexico match the 10m states instead
336
+ * of the coarser world tiers. Optional, like `lakes`. */
337
+ naLand?: BoundaryTopology;
338
+ /** North-America-clipped 10m major lakes (Great Lakes etc.), used in place of
339
+ * the coarse `lakes` under the albers-usa US view. Optional. */
340
+ naLakes?: BoundaryTopology;
341
+ /** Water-body orientation labels (Natural Earth marine polys) drawn when the
342
+ * `context-labels` directive is on — oceans/seas/gulfs/bays/etc. Optional, so
343
+ * hand-built test fixtures and older bundles need not supply it. */
344
+ waterBodies?: WaterBodies;
345
+ /** IATA-coded airports (`airports.json`) — lets `poi JFK` / `route JFK -> LAX`
346
+ * resolve. Optional so hand-built fixtures and older DI bundles need not supply
347
+ * it; the resolver guards `data.airports?.…` everywhere. */
348
+ airports?: AirportData;
349
+ gazetteer: Gazetteer;
350
+ }
351
+ type ProjectionFamily = 'equal-earth' | 'natural-earth' | 'equirectangular' | 'albers-usa' | 'conic-equal-area' | 'mercator';
352
+ /** Which geometry layers the renderer draws. */
353
+ interface Basemaps {
354
+ /** World country tier: coarse (world-scale) | detail (regional/zoom). */
355
+ world: 'coarse' | 'detail';
356
+ /** Loaded subdivision layers (v1: only 'us-states'). */
357
+ subdivisions: Array<'us-states'>;
358
+ }
359
+ interface ResolvedRegion {
360
+ /** ISO code: alpha-2 (country) or 3166-2 `US-XX` (state) — the geometry id. */
361
+ readonly iso: string;
362
+ readonly name: string;
363
+ readonly layer: 'country' | 'us-state';
364
+ readonly value?: number;
365
+ /** §1.5 trailing-token color NAME → flat override fill (§24B.4). */
366
+ readonly color?: string;
367
+ readonly tags: Readonly<Record<string, string>>;
368
+ readonly meta: Readonly<Record<string, string>>;
369
+ readonly lineNumber: number;
370
+ }
371
+ interface ResolvedPoi {
372
+ /** Folded registry id (alias|name folded, or `@lat,lon` for coord POIs). */
373
+ readonly id: string;
374
+ /** Display name (original casing): the city/place name, alias, or endpoint
375
+ * string. The on-map label falls back to this when `label` is absent (the
376
+ * folded `id` is for binding, not display). */
377
+ readonly name?: string;
378
+ readonly lat: number;
379
+ readonly lon: number;
380
+ readonly label?: string;
381
+ /** §1.5 trailing-token color NAME → flat marker fill (§24B.5). */
382
+ readonly color?: string;
383
+ readonly tags: Readonly<Record<string, string>>;
384
+ readonly meta: Readonly<Record<string, string>>;
385
+ readonly lineNumber: number;
386
+ /** True when created from an undeclared edge/route endpoint (§24B.10). */
387
+ readonly implicit?: boolean;
388
+ /** BL-122 clock channel: the resolved IANA zone id (`Asia/Tokyo`) or a canonical
389
+ * fixed-offset label (`UTC+9`) for this pin, from an explicit `tz:` meta (or a
390
+ * gazetteer `tz` once built). Absent ⇒ no time card. Set only when the map's
391
+ * `clock` directive is on and `tz:` validated; a malformed `tz:` warns + omits. */
392
+ readonly tz?: string;
393
+ /** BL-122: minutes-east-of-UTC when `tz` is a FIXED offset (from `tz: UTC+9`),
394
+ * so the renderer bakes `data-dgmo-clock-fixed-offset` and the ticker skips DST.
395
+ * Absent for real IANA zones. */
396
+ readonly tzFixedOffsetMin?: number;
397
+ }
398
+ interface ResolvedEdge {
399
+ readonly fromId: string;
400
+ readonly toId: string;
401
+ readonly label?: string;
402
+ readonly directed: boolean;
403
+ readonly style: 'straight' | 'arc';
404
+ readonly meta: Readonly<Record<string, string>>;
405
+ /** Tag(s) on the edge line → colour the LINE (§24B.6). */
406
+ readonly tags: Readonly<Record<string, string>>;
407
+ readonly lineNumber: number;
408
+ }
409
+ interface ResolvedRouteLeg {
410
+ readonly fromId: string;
411
+ readonly toId: string;
412
+ readonly label?: string;
413
+ readonly style: 'straight' | 'arc';
414
+ readonly value?: string;
415
+ /** Tag(s) on the leg line → colour the LINE (§24B.6). */
416
+ readonly tags: Readonly<Record<string, string>>;
417
+ readonly lineNumber: number;
418
+ }
419
+ interface ResolvedRoute {
420
+ /** Ordered UNIQUE stop ids (for numbering + the origin marker). A loop-closing
421
+ * leg whose destination is an earlier stop adds a leg but no duplicate stop. */
422
+ readonly stopIds: readonly string[];
423
+ readonly legs: readonly ResolvedRouteLeg[];
424
+ readonly lineNumber: number;
425
+ }
426
+ /** Geographic bounding box `[[west, south], [east, north]]` in degrees.
427
+ *
428
+ * WRAP CONVENTION (#12): for an antimeridian-crossing extent the resolver keeps
429
+ * `west` in [−180, 180] and returns `east` UNWRAPPED in (180, 540] (i.e.
430
+ * `east = west + span`, span ≤ 360). So `east > 180` signals a dateline-crossing
431
+ * extent; the renderer (step 4) must mod `east` back into [−180, 180] (or shift
432
+ * the projection's center) rather than assume `east ≤ 180`. `south`/`north` are
433
+ * always plain degrees in [−90, 90]. */
434
+ type GeoExtent = [[number, number], [number, number]];
435
+ interface ResolvedMap {
436
+ readonly title: string | null;
437
+ /** DEAD — the `subtitle` directive was removed (2026-06-02 defaults-on review).
438
+ * Never populated; the renderer's subtitle branch is now unreachable. Left for
439
+ * a later cleanup pass. */
440
+ readonly subtitle?: string;
441
+ readonly caption?: string;
442
+ readonly tagGroups: readonly TagGroup[];
443
+ readonly directives: MapDirectives;
444
+ readonly basemaps: Basemaps;
445
+ readonly regions: readonly ResolvedRegion[];
446
+ readonly pois: readonly ResolvedPoi[];
447
+ readonly edges: readonly ResolvedEdge[];
448
+ readonly routes: readonly ResolvedRoute[];
449
+ readonly extent: GeoExtent;
450
+ readonly projection: ProjectionFamily;
451
+ /** POI-only region framing: the region(s) that CONTAIN the POIs — us-state ids
452
+ * (`US-CA`) or country isos (`FR`). The frame is snapped to the union of their
453
+ * bboxes, and the layout labels them prominently (vs. muted neighbours). Empty
454
+ * for non-POI-only maps or when POIs fall outside every polygon. Optional so
455
+ * older/foreign ResolvedMap literals need not supply it. */
456
+ readonly poiFrameContainers?: readonly string[];
457
+ readonly diagnostics: readonly DgmoError[];
458
+ readonly error: string | null;
459
+ }
460
+
461
+ /**
462
+ * How a host supplies map basemap assets: the data itself, or a loader that
463
+ * returns it. Declared here (rather than accepting only `MapData`) so a Node
464
+ * host can hand over `loadMapData` without paying to read eleven JSON files on
465
+ * a render that turns out not to be a map — the loader is called only inside
466
+ * the map branch.
467
+ */
468
+ type MapDataSource = MapData | (() => Promise<MapData>);
469
+ /**
470
+ * Renders a D3 chart to an SVG string for export.
471
+ * Creates a detached DOM element, renders into it, extracts the SVG, then cleans up.
472
+ */
473
+ type RenderForExportOptions = {
474
+ c4Level?: 'context' | 'containers' | 'components' | 'deployment';
475
+ c4System?: string;
476
+ c4Container?: string;
477
+ tagGroup?: string;
478
+ exportMode?: boolean;
479
+ mapData?: MapDataSource;
480
+ mapAspect?: number;
481
+ onMapResolverDiagnostics?: (diagnostics: readonly DgmoError[]) => void;
482
+ /**
483
+ * Canvas to draw onto, in px. Defaults to EXPORT_WIDTH x EXPORT_HEIGHT.
484
+ *
485
+ * Every chart used to render onto a fixed 1200x800 sheet, so a caller who
486
+ * fitted the result to a narrow column got its ASPECT too — a one-line goal
487
+ * meter arrived 800px tall with the bar as a sliver in the middle. Callers
488
+ * that know the shape they need can now say so; omitting these keeps the
489
+ * previous canvas exactly.
490
+ */
491
+ width?: number;
492
+ height?: number;
493
+ };
494
+ declare function renderForExport(content: string, theme: 'light' | 'dark' | 'transparent', palette?: PaletteColors, viewState?: CompactViewState, options?: RenderForExportOptions): Promise<string>;
495
+
496
+ export { type AirportData as A, type BoundaryTopology as B, type Gazetteer as G, type MapDataSource as M, type ParsedMap as P, type RegionName as R, type GazetteerEntry as a, type MapData as b, type RegionNames as c, type ResolvedMap as d, type MapLayoutLegend as e, type GeoExtent as f, type MapDirectives as g, type MapEdge as h, type MapPoi as i, type MapRegion as j, type MapRoute as k, type PoiPos as l, type ProjectionFamily as m, type ResolvedEdge as n, type ResolvedPoi as o, type ResolvedRegion as p, type ResolvedRoute as q, renderForExport as r };
@@ -9,7 +9,7 @@ import {
9
9
  looksLikeGantt,
10
10
  parseDgmo,
11
11
  parseDgmoChartType
12
- } from "./chunk-AA4M6F2P.js";
12
+ } from "./chunk-BBY57XAA.js";
13
13
  import "./chunk-2CMM36O7.js";
14
14
  import "./chunk-A2RUBBVT.js";
15
15
  import "./chunk-JWJBWNQL.js";
@@ -39,7 +39,7 @@ import "./chunk-OLPWKS5L.js";
39
39
  import "./chunk-NMIWEUIG.js";
40
40
  import "./chunk-VXBEG3IB.js";
41
41
  import "./chunk-3TYUXC7D.js";
42
- import "./chunk-6BVIZW5N.js";
42
+ import "./chunk-FLFBY5GN.js";
43
43
  import "./chunk-QMYJO4EL.js";
44
44
  import "./chunk-4GQ6I46C.js";
45
45
  import "./chunk-INLEOJIX.js";
@@ -56,7 +56,7 @@ import "./chunk-7TF3QOOD.js";
56
56
  import "./chunk-SR7NGZNM.js";
57
57
  import "./chunk-NXMESY4J.js";
58
58
  import "./chunk-EK4QX7NQ.js";
59
- import "./chunk-NKRVFQGO.js";
59
+ import "./chunk-BDI25HWH.js";
60
60
  import "./chunk-QE4GTFZS.js";
61
61
  import "./chunk-7NK42OIB.js";
62
62
  import "./chunk-RRX4Z4TH.js";
@@ -86,4 +86,4 @@ export {
86
86
  parseDgmo,
87
87
  parseDgmoChartType
88
88
  };
89
- //# sourceMappingURL=dgmo-router-QWRF7ZKM.js.map
89
+ //# sourceMappingURL=dgmo-router-464FE256.js.map