@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,239 @@
1
+ import './dgmo-router-EAW7XiBE.js';
2
+ import { a as PaletteColors, T as TagGroup, D as DgmoError } from './tag-groups-NUA2F1I5.js';
3
+
4
+ /** Convert hex (#RRGGBB or #RGB) to { h, s, l } with h in degrees, s/l as percentages. */
5
+ declare function hexToHSL(hex: string): {
6
+ h: number;
7
+ s: number;
8
+ l: number;
9
+ };
10
+ /** Convert { h (degrees), s (%), l (%) } back to #RRGGBB hex string. */
11
+ declare function hslToHex(h: number, s: number, l: number): string;
12
+ /** Convert hex to "H S% L%" string for CSS custom properties. */
13
+ declare function hexToHSLString(hex: string): string;
14
+ /**
15
+ * Blend a color toward white (light mode quadrant fills).
16
+ * amount: 0 = original, 1 = white
17
+ */
18
+ declare function tint(hex: string, amount: number): string;
19
+ /**
20
+ * Blend a color toward a dark base (dark mode quadrant fills).
21
+ * amount: 0 = original, 1 = base
22
+ */
23
+ declare function shade(hex: string, base: string, amount: number): string;
24
+ /**
25
+ * Blend two hex colors by percentage.
26
+ * `pct` = 0 → 100% of `b`, `pct` = 100 → 100% of `a`.
27
+ *
28
+ * Used by all renderers for tinted fills and strokes.
29
+ */
30
+ declare function mix(a: string, b: string, pct: number): string;
31
+ /**
32
+ * Pick `lightText` or `darkText` for placement on top of `bg`.
33
+ *
34
+ * Three-tier decision:
35
+ * 1. **High-luminance fill (luminance > 0.55)** → `darkText`. Yellows, peaches,
36
+ * light cyans — dark text reads better and a light cream on light yellow is
37
+ * unreadable.
38
+ * 2. **Pastel fill (min RGB channel ≥ 100, luminance ≤ 0.55)** → defer to WCAG
39
+ * ratio. Pastels have no near-zero channel and tend to read as "soft" —
40
+ * dark text usually wins by ratio (catppuccin dark mauve `#cba6f7` min 166,
41
+ * ratio 9.35:1; tokyo-night dark red `#f7768e` min 118, ratio 7.86:1; and
42
+ * tokyo-night green `#9ece6a` min 106, ratio 11.4:1 all correctly pick dark).
43
+ * 3. **Saturated fill (min RGB < 100, luminance ≤ 0.55)** → `lightText`. At least
44
+ * one channel near zero signals true saturation — gruvbox dark green
45
+ * `#b8bb26` (min 38), blueprint blue `#1f5e8c` (min 31), bold red/blue
46
+ * (min 0), solarized blue `#268bd2` (min 38). The user consistently
47
+ * prefers light text on these for visual punch.
48
+ *
49
+ * `min RGB` discriminates pastel-vs-saturated more reliably than `max-min`
50
+ * (vibrance): tokyo-night and catppuccin dark are pastels with high max RGB,
51
+ * so vibrance alone misclassifies them as "saturated."
52
+ *
53
+ * Tinted fills (luminance ~0.7+ in light themes / ~0.02–0.14 in dark themes)
54
+ * are unambiguous in either branch; only fill-solid output shifts here.
55
+ */
56
+ declare function contrastText(bg: string, lightText: string, darkText: string): string;
57
+ declare function shapeFill(palette: PaletteColors, intent: string, isDark: boolean, opts?: {
58
+ mode?: 'solid' | 'outline' | undefined;
59
+ }): string;
60
+ /**
61
+ * Derive the 8-color series rotation from a palette's named colors, in the
62
+ * shared {@link CATEGORICAL_COLOR_ORDER} (RGB-seeded, max-contrast). Tag
63
+ * swatches and chart series colors thus share one canonical rotation.
64
+ */
65
+ declare function getSeriesColors(palette: PaletteColors): string[];
66
+
67
+ interface OrgNode {
68
+ readonly id: string;
69
+ readonly label: string;
70
+ readonly metadata: Readonly<Record<string, string>>;
71
+ readonly children: readonly OrgNode[];
72
+ readonly parentId: string | null;
73
+ readonly isContainer: boolean;
74
+ readonly lineNumber: number;
75
+ readonly color?: string;
76
+ }
77
+ interface ParsedOrg {
78
+ readonly title: string | null;
79
+ readonly titleLineNumber: number | null;
80
+ readonly roots: readonly OrgNode[];
81
+ readonly tagGroups: readonly TagGroup[];
82
+ readonly options: Readonly<Record<string, string>>;
83
+ /**
84
+ * Resolved layout direction (§7.5). `direction-lr` / `direction-tb` are a
85
+ * mutually-exclusive boolean pair (§1.9, last one wins). Defaults to 'TB',
86
+ * which is the orientation org charts have always rendered.
87
+ */
88
+ readonly direction: 'LR' | 'TB';
89
+ readonly diagnostics: readonly DgmoError[];
90
+ readonly error: string | null;
91
+ }
92
+ declare function parseOrg(content: string, palette?: PaletteColors): ParsedOrg;
93
+
94
+ /**
95
+ * Substitute `start-date now` with the host-local resolved date.
96
+ * Pass the result to `encodeDiagramUrl` so the share-link captures
97
+ * the resolved date, not the literal token.
98
+ *
99
+ * Lines without `start-date now` (explicit-date lines, comments,
100
+ * other directives, activity lines containing the word "now") pass
101
+ * through verbatim.
102
+ */
103
+ declare function normalizePertSourceForShare(dsl: string): string;
104
+
105
+ /**
106
+ * Shared parser utilities — extracted from individual parsers to eliminate
107
+ * duplication of measureIndent, extractColor, header regexes, and
108
+ * pipe-metadata parsing.
109
+ */
110
+
111
+ /**
112
+ * Complete set of recognized chart type identifiers.
113
+ *
114
+ * Derived from `chart-types.ts`, which is a leaf module — importing the
115
+ * chart-type *registry* here would be circular, since the registry imports
116
+ * every parser and 34 parsers import this file.
117
+ */
118
+ declare const ALL_CHART_TYPES: ReadonlySet<string>;
119
+ /**
120
+ * Cross-chart fill treatment (spec §1.9 fill family). Absent ⇒ the canonical
121
+ * 25% tint (`fill-tint` is the explicit spelling of that default).
122
+ */
123
+ type FillMode = 'solid' | 'outline';
124
+ /**
125
+ * Parse the first non-empty, non-comment line to extract chart type and optional title.
126
+ * The first token is matched against `ALL_CHART_TYPES`; the remainder is the title.
127
+ *
128
+ * Returns `null` if the first token is not a recognized chart type.
129
+ */
130
+ declare function parseFirstLine(line: string): {
131
+ chartType: string;
132
+ title: string | undefined;
133
+ } | null;
134
+
135
+ /** Marker alphabet member for any variant. */
136
+ type RaciMarker = 'R' | 'A' | 'S' | 'C' | 'I' | 'D';
137
+ /** Variant identifier — selects alphabet + constraint rule set. */
138
+ type RaciVariant = 'raci' | 'rasci' | 'daci';
139
+ /**
140
+ * One `Role: <markers>` line under a task.
141
+ *
142
+ * `id` is the normalized role key — used by mutations to look up the
143
+ * cell and by validation to detect unknown roles. `displayName` is the
144
+ * first-seen casing/spacing for rendering.
145
+ */
146
+ interface RaciRoleAssignment {
147
+ readonly id: string;
148
+ readonly displayName: string;
149
+ readonly markers: readonly RaciMarker[];
150
+ readonly lineNumber: number;
151
+ readonly endLineNumber: number;
152
+ }
153
+ /** One task — flush-left under a phase or directly under the chart. */
154
+ interface RaciTask {
155
+ readonly id: string;
156
+ readonly displayName: string;
157
+ readonly description: string;
158
+ readonly roleAssignments: readonly RaciRoleAssignment[];
159
+ readonly lineNumber: number;
160
+ readonly endLineNumber: number;
161
+ }
162
+ /** Optional `[Phase Label]` group header — one level deep. */
163
+ interface RaciPhase {
164
+ readonly id: string;
165
+ readonly displayName: string;
166
+ /** Optional palette color from a `[Label](color)` suffix on the bracket. */
167
+ readonly color?: string;
168
+ readonly tasks: readonly RaciTask[];
169
+ readonly lineNumber: number;
170
+ readonly endLineNumber: number;
171
+ }
172
+ /** Top-level parse result. */
173
+ interface ParsedRaci {
174
+ readonly type: 'raci';
175
+ /** Optional title from the chart-type header line. */
176
+ readonly title?: string;
177
+ readonly titleLineNumber?: number;
178
+ /** Variant selected by directive, or by chart-type id when absent. */
179
+ readonly variant: RaciVariant;
180
+ /**
181
+ * Canonical column order. Populated either from an explicit
182
+ * `roles:` directive or, when absent, from first-seen role usage.
183
+ */
184
+ readonly roles: readonly string[];
185
+ /** Display name for each role (parallel to `roles`). */
186
+ readonly roleDisplayNames: readonly string[];
187
+ /**
188
+ * Optional per-role palette color from the `Cap blue` trailing-token
189
+ * suffix in the roles block (or the long pipe form `Cap | color: blue`).
190
+ * Parallel to `roles`; entries default to `undefined` (renderer falls
191
+ * back to the neutral column tint).
192
+ */
193
+ readonly roleColors: ReadonlyArray<string | undefined>;
194
+ readonly phases: readonly RaciPhase[];
195
+ /** Tasks declared without a parent phase. */
196
+ readonly tasksWithoutPhase: readonly RaciTask[];
197
+ readonly options: Readonly<Record<string, string>>;
198
+ readonly diagnostics: readonly DgmoError[];
199
+ readonly error: string | null;
200
+ }
201
+
202
+ /**
203
+ * Parse RACI/RASCI/DACI source. The leading chart-type id (if a
204
+ * recognized variant id) acts as a hint for default variant when the
205
+ * `variant` directive is absent.
206
+ */
207
+ declare function parseRaci(content: string, palette?: PaletteColors): ParsedRaci;
208
+
209
+ /**
210
+ * Async or sync file reader. Receives an absolute path, returns content.
211
+ * Throwing means "file not found".
212
+ */
213
+ type ReadFileFn = (path: string) => string | Promise<string>;
214
+ /** Tracks the original source file and line for an imported line. */
215
+ interface ImportSource {
216
+ /** Absolute path of the file this line originates from */
217
+ filePath: string;
218
+ /** 1-based line number in the original (pre-resolution) source file */
219
+ sourceLine: number;
220
+ }
221
+ interface ResolveImportsResult {
222
+ content: string;
223
+ diagnostics: DgmoError[];
224
+ /** resolvedLine (1-based index) → originalLine (1-based) or null for inserted lines */
225
+ lineMap: (number | null)[];
226
+ /** resolvedLine (1-based index) → import source info or null for non-imported lines */
227
+ importSourceMap: (ImportSource | null)[];
228
+ }
229
+ /**
230
+ * Pre-processes org chart content, resolving `tags` and `import` directives.
231
+ *
232
+ * @param content - Raw .dgmo file content
233
+ * @param filePath - Absolute path of the file (for relative path resolution)
234
+ * @param readFileFn - Function to read files (sync or async)
235
+ * @returns Merged content with all imports resolved + diagnostics
236
+ */
237
+ declare function resolveOrgImports(content: string, filePath: string, readFileFn: ReadFileFn): Promise<ResolveImportsResult>;
238
+
239
+ export { ALL_CHART_TYPES as A, type FillMode as F, type ImportSource as I, type OrgNode as O, type ParsedOrg as P, type RaciMarker as R, type ParsedRaci as a, type RaciVariant as b, type RaciTask as c, type RaciPhase as d, type RaciRoleAssignment as e, type ReadFileFn as f, type ResolveImportsResult as g, contrastText as h, getSeriesColors as i, hexToHSL as j, hexToHSLString as k, hslToHex as l, mix as m, normalizePertSourceForShare as n, parseOrg as o, parseFirstLine as p, parseRaci as q, resolveOrgImports as r, shade as s, shapeFill as t, tint as u };
@@ -0,0 +1,3 @@
1
+ export { C as ChartTypeId, a as ChartTypeMeta, c as chartTypes, f as getAvailablePalettes, g as getPalette, l as parseDgmoChartType } from './dgmo-router-EAW7XiBE.js';
2
+ export { A as ALL_CHART_TYPES, O as OrgNode, P as ParsedOrg, k as hexToHSLString, n as normalizePertSourceForShare, p as parseFirstLine, o as parseOrg, q as parseRaci, r as resolveOrgImports } from './chart-meta-CpicJ1kj.js';
3
+ export { C as CompactViewState, h as DecodedDiagramUrl, i as EncodeDiagramUrlOptions, j as EncodeDiagramUrlResult, a as PaletteColors, l as decodeDiagramUrl, m as decodeViewState, n as encodeDiagramUrl, o as encodeViewState } from './tag-groups-NUA2F1I5.js';
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-U7VO6JAA.js";
11
11
  import {
12
12
  parseDgmoChartType
13
- } from "./chunk-AA4M6F2P.js";
13
+ } from "./chunk-BBY57XAA.js";
14
14
  import "./chunk-2CMM36O7.js";
15
15
  import "./chunk-A2RUBBVT.js";
16
16
  import "./chunk-JWJBWNQL.js";
@@ -42,7 +42,7 @@ import "./chunk-OLPWKS5L.js";
42
42
  import "./chunk-NMIWEUIG.js";
43
43
  import "./chunk-VXBEG3IB.js";
44
44
  import "./chunk-3TYUXC7D.js";
45
- import "./chunk-6BVIZW5N.js";
45
+ import "./chunk-FLFBY5GN.js";
46
46
  import "./chunk-QMYJO4EL.js";
47
47
  import "./chunk-4GQ6I46C.js";
48
48
  import "./chunk-INLEOJIX.js";
@@ -59,7 +59,7 @@ import "./chunk-7TF3QOOD.js";
59
59
  import "./chunk-SR7NGZNM.js";
60
60
  import "./chunk-NXMESY4J.js";
61
61
  import "./chunk-EK4QX7NQ.js";
62
- import "./chunk-NKRVFQGO.js";
62
+ import "./chunk-BDI25HWH.js";
63
63
  import "./chunk-QE4GTFZS.js";
64
64
  import "./chunk-7NK42OIB.js";
65
65
  import "./chunk-RRX4Z4TH.js";
@@ -2,16 +2,16 @@ import {
2
2
  D3_DATA_CHART_TYPES,
3
3
  renderDataChartD3,
4
4
  supportsD3DataChart
5
- } from "./chunk-7T3A2UK3.js";
6
- import "./chunk-CVVICCSB.js";
7
- import "./chunk-67D4MN2H.js";
8
- import "./chunk-6VJCURWU.js";
5
+ } from "./chunk-5T7K6QND.js";
6
+ import "./chunk-L65WI4HO.js";
7
+ import "./chunk-LK6LTSLH.js";
8
+ import "./chunk-J2EXBAPZ.js";
9
9
  import "./chunk-RU2HHHYA.js";
10
10
  import "./chunk-A4GOY3PE.js";
11
- import "./chunk-ES66QH6J.js";
12
- import "./chunk-Z5ID35YP.js";
13
- import "./chunk-SCJ7CAJF.js";
14
- import "./chunk-4ASYQ347.js";
11
+ import "./chunk-FG24NXKN.js";
12
+ import "./chunk-UTCPNJND.js";
13
+ import "./chunk-3HOCNSPD.js";
14
+ import "./chunk-MTGGOCND.js";
15
15
  import "./chunk-XC7BUB3P.js";
16
16
  import "./chunk-2CW5ZTNH.js";
17
17
  import "./chunk-MDI5FMWO.js";
@@ -26,4 +26,4 @@ export {
26
26
  renderDataChartD3,
27
27
  supportsD3DataChart
28
28
  };
29
- //# sourceMappingURL=charts-d3-ZTXJWEHI.js.map
29
+ //# sourceMappingURL=charts-d3-I6OE5K3B.js.map
@@ -14,17 +14,17 @@ import {
14
14
  } from "./chunk-A4GOY3PE.js";
15
15
  import {
16
16
  renderIntegratedLegend
17
- } from "./chunk-RBAW7VUG.js";
17
+ } from "./chunk-2EPV7CLY.js";
18
18
  import {
19
19
  FONT_FAMILY
20
- } from "./chunk-Z5ID35YP.js";
20
+ } from "./chunk-UTCPNJND.js";
21
21
  import {
22
22
  LEGEND_HEIGHT
23
- } from "./chunk-SCJ7CAJF.js";
23
+ } from "./chunk-3HOCNSPD.js";
24
24
  import {
25
25
  measureText,
26
26
  wrapTextToWidth
27
- } from "./chunk-4ASYQ347.js";
27
+ } from "./chunk-MTGGOCND.js";
28
28
  import {
29
29
  fillModeFromOptions
30
30
  } from "./chunk-P2PUWV3Y.js";
@@ -90,7 +90,8 @@ function computeCycleLayout(parsed, options) {
90
90
  const hasDesc = !hideDescriptions && node.description.length > 0;
91
91
  const labelWidth = Math.max(
92
92
  MIN_NODE_WIDTH,
93
- measureText(node.label, LABEL_FONT_SIZE) + NODE_PAD_X * 2
93
+ // Node labels draw at 600; the description lines under them do not.
94
+ measureText(node.label, LABEL_FONT_SIZE, { bold: true }) + NODE_PAD_X * 2
94
95
  );
95
96
  if (circleNodes) {
96
97
  return computeCircleNodeDims(node, hasDesc);
@@ -351,7 +352,7 @@ function renderedDescNodeHeight(numLines, scale) {
351
352
  }
352
353
  var EDGE_LABEL_MAX_WIDTH = 197;
353
354
  function wrapEdgeLabelText(label, description, maxWidth = EDGE_LABEL_MAX_WIDTH) {
354
- const labelLines = label ? wrapTextToWidth(label, EDGE_LABEL_FONT_SIZE, maxWidth) : [];
355
+ const labelLines = label ? wrapTextToWidth(label, EDGE_LABEL_FONT_SIZE, maxWidth, { bold: true }) : [];
355
356
  const descLines = [];
356
357
  for (const d of description) {
357
358
  descLines.push(...wrapTextToWidth(d, EDGE_LABEL_FONT_SIZE, maxWidth));
@@ -360,7 +361,9 @@ function wrapEdgeLabelText(label, description, maxWidth = EDGE_LABEL_MAX_WIDTH)
360
361
  }
361
362
  function computeCircleNodeDims(node, hasDesc) {
362
363
  if (!hasDesc) {
363
- const textW = measureText(node.label, CIRCLE_LABEL_FONT_SIZE);
364
+ const textW = measureText(node.label, CIRCLE_LABEL_FONT_SIZE, {
365
+ bold: true
366
+ });
364
367
  const r2 = Math.max(MIN_CIRCLE_RADIUS, textW / 2 + CIRCLE_PAD);
365
368
  return { width: r2 * 2, height: r2 * 2, wrappedDesc: [] };
366
369
  }
@@ -370,7 +373,9 @@ function computeCircleNodeDims(node, hasDesc) {
370
373
  const totalLines = 1 + wrappedDesc2.length;
371
374
  const textBlockH = totalLines * DESC_LINE_HEIGHT + CIRCLE_PAD;
372
375
  if (textBlockH / 2 <= r * 0.85) {
373
- const labelW = measureText(node.label, CIRCLE_LABEL_FONT_SIZE);
376
+ const labelW = measureText(node.label, CIRCLE_LABEL_FONT_SIZE, {
377
+ bold: true
378
+ });
374
379
  const labelY = -textBlockH / 2 + DESC_LINE_HEIGHT;
375
380
  const availW = 2 * Math.sqrt(Math.max(0, r * r - labelY * labelY));
376
381
  if (labelW <= availW - CIRCLE_PAD) {
@@ -492,7 +497,10 @@ function computeEdgePaths(layoutNodes, parsed, cx, cy, radius, isClockwise) {
492
497
  const lineCount = labelLines.length + descLines.length;
493
498
  let labelPxW = 0;
494
499
  for (const l of labelLines)
495
- labelPxW = Math.max(labelPxW, measureText(l, EDGE_LABEL_FONT_SIZE));
500
+ labelPxW = Math.max(
501
+ labelPxW,
502
+ measureText(l, EDGE_LABEL_FONT_SIZE, { bold: true })
503
+ );
496
504
  for (const l of descLines)
497
505
  labelPxW = Math.max(labelPxW, measureText(l, EDGE_LABEL_FONT_SIZE));
498
506
  const { labelX, labelY, labelAngle } = computeEdgeLabelPosition(
@@ -596,7 +604,10 @@ function fitToCanvas(nodes, edges, parsed, _cx, _cy, radius, width, height, _isC
596
604
  );
597
605
  let textWidth = 0;
598
606
  for (const l of labelLines)
599
- textWidth = Math.max(textWidth, measureText(l, EDGE_LABEL_FONT_SIZE));
607
+ textWidth = Math.max(
608
+ textWidth,
609
+ measureText(l, EDGE_LABEL_FONT_SIZE, { bold: true })
610
+ );
600
611
  for (const l of descLines)
601
612
  textWidth = Math.max(textWidth, measureText(l, EDGE_LABEL_FONT_SIZE));
602
613
  if (textWidth === 0) continue;
@@ -907,7 +918,12 @@ function renderCycle(container, parsed, palette, isDark, onClickItem, exportDims
907
918
  const lineCount = labelLines.length + descLines.length;
908
919
  let maxLineW = 0;
909
920
  for (const l of labelLines)
910
- maxLineW = Math.max(maxLineW, measureText(l, scaledEdgeLabelFont));
921
+ maxLineW = Math.max(
922
+ maxLineW,
923
+ // The label block is drawn at 600, the description lines below at the
924
+ // default weight — so only these measure bold.
925
+ measureText(l, scaledEdgeLabelFont, { bold: true })
926
+ );
911
927
  for (const l of descLines)
912
928
  maxLineW = Math.max(maxLineW, measureText(l, scaledDescFont));
913
929
  const bgW = maxLineW + 12;
@@ -969,4 +985,4 @@ export {
969
985
  renderCycle,
970
986
  renderCycleForExport
971
987
  };
972
- //# sourceMappingURL=chunk-C6DMG2V6.js.map
988
+ //# sourceMappingURL=chunk-27YPE7NO.js.map
@@ -1,10 +1,9 @@
1
1
  import {
2
2
  computeLegendLayout
3
- } from "./chunk-ES66QH6J.js";
3
+ } from "./chunk-FG24NXKN.js";
4
4
  import {
5
- FONT_CENTRAL_DY,
6
5
  FONT_FAMILY
7
- } from "./chunk-Z5ID35YP.js";
6
+ } from "./chunk-UTCPNJND.js";
8
7
  import {
9
8
  CONTROLS_ICON_PATH,
10
9
  LEGEND_DOT_R,
@@ -16,7 +15,7 @@ import {
16
15
  LEGEND_TOGGLE_OFF_OPACITY,
17
16
  legendChromeColors,
18
17
  measureLegendText
19
- } from "./chunk-SCJ7CAJF.js";
18
+ } from "./chunk-3HOCNSPD.js";
20
19
  import {
21
20
  tagAttrKey
22
21
  } from "./chunk-MDI5FMWO.js";
@@ -25,9 +24,8 @@ import {
25
24
  } from "./chunk-42IT4BG2.js";
26
25
 
27
26
  // src/utils/legend-d3.ts
28
- var LEGEND_TEXT_DY = `${FONT_CENTRAL_DY}em`;
29
27
  function centerText(sel) {
30
- return sel.attr("dy", LEGEND_TEXT_DY);
28
+ return sel.attr("dominant-baseline", "central");
31
29
  }
32
30
  function renderLegendD3(container, config, state, palette, isDark, callbacks, containerWidth) {
33
31
  const width = containerWidth ?? parseFloat(container.attr("width") || "800");
@@ -293,4 +291,4 @@ export {
293
291
  renderLegendD3,
294
292
  renderIntegratedLegend
295
293
  };
296
- //# sourceMappingURL=chunk-RBAW7VUG.js.map
294
+ //# sourceMappingURL=chunk-2EPV7CLY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  measureText,
3
3
  truncateText
4
- } from "./chunk-4ASYQ347.js";
4
+ } from "./chunk-MTGGOCND.js";
5
5
  import {
6
6
  mix
7
7
  } from "./chunk-42IT4BG2.js";
@@ -59,4 +59,4 @@ export {
59
59
  LEGEND_TOGGLE_OFF_OPACITY,
60
60
  LEGEND_GEAR_PILL_W
61
61
  };
62
- //# sourceMappingURL=chunk-SCJ7CAJF.js.map
62
+ //# sourceMappingURL=chunk-3HOCNSPD.js.map