@diagrammo/dgmo 0.64.1 → 0.65.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.
- package/LICENSE +1 -1
- package/dist/advanced.d.ts +6771 -0
- package/dist/advanced.js +71 -71
- package/dist/block.d.ts +142 -0
- package/dist/block.js +15 -15
- package/dist/chart-meta-D98NbYDp.d.ts +238 -0
- package/dist/chart-meta.d.ts +2 -0
- package/dist/chart-meta.js +3 -3
- package/dist/{charts-d3-ZTXJWEHI.js → charts-d3-I6OE5K3B.js} +9 -9
- package/dist/{chunk-C6DMG2V6.js → chunk-27YPE7NO.js} +28 -12
- package/dist/{chunk-RBAW7VUG.js → chunk-2EPV7CLY.js} +5 -7
- package/dist/{chunk-SCJ7CAJF.js → chunk-3HOCNSPD.js} +2 -2
- package/dist/{chunk-Z2ADWRSW.js → chunk-3PSPUYT5.js} +3 -3
- package/dist/{chunk-RBBJIHNL.js → chunk-4IE42ODL.js} +11 -11
- package/dist/{chunk-SMCUX42K.js → chunk-4TM7MWU4.js} +7 -6
- package/dist/{chunk-H3HFC3SQ.js → chunk-5GM6BZO7.js} +3 -3
- package/dist/{chunk-7T3A2UK3.js → chunk-5T7K6QND.js} +15 -16
- package/dist/{chunk-NKRCPBTJ.js → chunk-6BOPYGJC.js} +6 -6
- package/dist/{chunk-37EHGTQ2.js → chunk-6E5YZR4S.js} +18 -16
- package/dist/{chunk-MHI6W6XS.js → chunk-6IUL6LER.js} +10 -7
- package/dist/{chunk-S5RWWISJ.js → chunk-7L53J53J.js} +4 -4
- package/dist/{chunk-WDJ4HAGO.js → chunk-A6CTYC7O.js} +2 -2
- package/dist/{chunk-CDMF7P5A.js → chunk-BBCKUAUR.js} +2 -2
- package/dist/{chunk-AA4M6F2P.js → chunk-BBY57XAA.js} +3 -3
- package/dist/{chunk-NKRVFQGO.js → chunk-BDI25HWH.js} +18 -6
- package/dist/{chunk-SVR3YFM3.js → chunk-C666LP3O.js} +20 -15
- package/dist/{chunk-KRTO7NRK.js → chunk-D2WHS23S.js} +2 -2
- package/dist/{chunk-LYTEVE2N.js → chunk-DBF4IM4U.js} +20 -15
- package/dist/{chunk-PCWPYOT4.js → chunk-ET4R3AU5.js} +4 -4
- package/dist/{chunk-2KOBOIB2.js → chunk-FBD5ASMB.js} +2 -2
- package/dist/{chunk-ES66QH6J.js → chunk-FG24NXKN.js} +2 -2
- package/dist/{chunk-3CIOJ5YJ.js → chunk-FJ57274M.js} +3 -1
- package/dist/{chunk-6BVIZW5N.js → chunk-FLFBY5GN.js} +14 -12
- package/dist/{chunk-XUN3MIO3.js → chunk-G64OVYUT.js} +2 -2
- package/dist/{chunk-RQL25P3U.js → chunk-G7QZF6T3.js} +9 -9
- package/dist/{chunk-IGIJZHB6.js → chunk-GC7CBX6C.js} +6 -6
- package/dist/{chunk-B6AONGTI.js → chunk-GDQN2TPX.js} +21 -14
- package/dist/{chunk-CZUSH6NI.js → chunk-GMLSYNFP.js} +10 -9
- package/dist/{chunk-R6HCNSP6.js → chunk-GOW5VO6M.js} +2 -2
- package/dist/{chunk-SPHC4RYF.js → chunk-GXOMKWQ5.js} +10 -9
- package/dist/{chunk-MQHOKBJ6.js → chunk-IJ4FUFTR.js} +5 -5
- package/dist/{chunk-V3UQSKWJ.js → chunk-IJSFEU4J.js} +9 -9
- package/dist/{chunk-LSFZDBAP.js → chunk-IKHV5IJB.js} +2 -2
- package/dist/{chunk-LMXAB4YM.js → chunk-IZ6RWMBM.js} +9 -9
- package/dist/{chunk-6VJCURWU.js → chunk-J2EXBAPZ.js} +4 -5
- package/dist/{chunk-IX6N5MCY.js → chunk-JCL4K7AK.js} +12 -11
- package/dist/{chunk-OBKM6GIJ.js → chunk-JTUDM7S4.js} +10 -10
- package/dist/{chunk-CVVICCSB.js → chunk-L65WI4HO.js} +4 -4
- package/dist/{chunk-67D4MN2H.js → chunk-LK6LTSLH.js} +2 -2
- package/dist/{chunk-KOHIF4LD.js → chunk-MBODBL7C.js} +6 -5
- package/dist/chunk-MTGGOCND.js +638 -0
- package/dist/{chunk-VJARCVMH.js → chunk-MU3CJPJF.js} +2 -2
- package/dist/{chunk-RKTIIU7Z.js → chunk-N6XI5VTA.js} +4 -4
- package/dist/{chunk-ODUT5WMC.js → chunk-NVOU7N6C.js} +2 -2
- package/dist/{chunk-T4QXHE34.js → chunk-OWUWLZJT.js} +13 -11
- package/dist/{chunk-LDVUPGWC.js → chunk-OWVDD5EC.js} +2 -2
- package/dist/{chunk-M4HYPDER.js → chunk-P5OCINCI.js} +8 -8
- package/dist/{chunk-JU2VMFYC.js → chunk-PZOFMBF3.js} +2 -2
- package/dist/{chunk-YLK3JNWP.js → chunk-QNCXONBR.js} +2 -2
- package/dist/{chunk-DB2KQ5DN.js → chunk-QRWY5QTA.js} +5 -5
- package/dist/{chunk-I2ATN25N.js → chunk-R4XM44BW.js} +25 -16
- package/dist/{chunk-DJCZWQ2A.js → chunk-RTTZIX34.js} +4 -4
- package/dist/{chunk-OMTBYLKN.js → chunk-TPKNA2U5.js} +9 -7
- package/dist/{chunk-DN5HEDE4.js → chunk-TT5B36WO.js} +16 -20
- package/dist/{chunk-SF3JAWMY.js → chunk-TWILCDUE.js} +3 -3
- package/dist/{chunk-NIZM3LAG.js → chunk-UINRIO77.js} +10 -10
- package/dist/{chunk-5H2LIQIH.js → chunk-UJXCDF4E.js} +4 -4
- package/dist/{chunk-Z5ID35YP.js → chunk-UTCPNJND.js} +2 -4
- package/dist/{chunk-U42ZEK7L.js → chunk-V4BYBIBU.js} +24 -15
- package/dist/{chunk-L4IN4OBB.js → chunk-VLI5SYXW.js} +7 -7
- package/dist/{chunk-43E26CDA.js → chunk-VS2M72PF.js} +4 -4
- package/dist/{chunk-KZ3PCDUJ.js → chunk-VV6HZQ5K.js} +2 -2
- package/dist/{chunk-Z5BTSBWW.js → chunk-WF2HDQPG.js} +4 -4
- package/dist/{chunk-TAJ2XFTT.js → chunk-XKMCL2YJ.js} +19 -16
- package/dist/{chunk-7GUYGQR4.js → chunk-XVEPB2UU.js} +4 -4
- package/dist/{chunk-YHTKDIF2.js → chunk-YGFNITPC.js} +11 -11
- package/dist/{chunk-I24O2RWT.js → chunk-YJOOIOSR.js} +84 -14
- package/dist/{chunk-KPX2OWZR.js → chunk-YKWHUPBP.js} +13 -14
- package/dist/{chunk-FRC4LDTQ.js → chunk-YMYPFX4O.js} +36 -30
- package/dist/{chunk-VOJOARA6.js → chunk-ZZXPYVS4.js} +82 -77
- package/dist/cloud-reference.d.ts +96 -0
- package/dist/completion-registry.d.ts +129 -0
- package/dist/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
- package/dist/dgmo-router-Dd5PTjxl.d.ts +540 -0
- package/dist/{dimensions-ES6O2T4H.js → dimensions-ILAVBRQ3.js} +7 -7
- package/dist/{flowchart-renderer-EXMRHFTQ.js → flowchart-renderer-6JKM2FA4.js} +7 -7
- package/dist/index.d.ts +207 -0
- package/dist/index.js +15 -15
- package/dist/{layout-HBWT2G23.js → layout-4LNMXLVK.js} +3 -3
- package/dist/{layout-UU4VJTOP.js → layout-62ERBWCM.js} +3 -3
- package/dist/{layout-N6X46MWG.js → layout-6SKHNQYO.js} +4 -4
- package/dist/{layout-OH4VQ3OI.js → layout-7JULRP4Y.js} +4 -4
- package/dist/{layout-QTZO6CW5.js → layout-FA37VP7V.js} +4 -4
- package/dist/layout-IN53LAE6.js +9 -0
- package/dist/{layout-H4H4OFE4.js → layout-IO6ORC5T.js} +3 -3
- package/dist/{layout-54P3DAXY.js → layout-LVMWK4QY.js} +5 -5
- package/dist/{layout-WCOEZPOI.js → layout-MNOTDWXW.js} +4 -4
- package/dist/{layout-2T2VCCTM.js → layout-RD7GDM4I.js} +5 -5
- package/dist/{layout-SKQMIXTG.js → layout-SBQTN2YM.js} +4 -4
- package/dist/{layout-5E2NQZNM.js → layout-SGYR6HBX.js} +3 -3
- package/dist/{layout-W3ZBJOIK.js → layout-WIMQIHBU.js} +5 -5
- package/dist/{layout-search-AJ6VUVUI.js → layout-search-C44CJQOB.js} +5 -5
- package/dist/{legend-constants-QQU3QYBF.js → legend-constants-RGINV5SF.js} +3 -3
- package/dist/live-link-resolve.d.ts +73 -0
- package/dist/{parser-KSIYWKYF.js → parser-CSKF2KNO.js} +8 -4
- package/dist/{parser-2BGDJJ2L.js → parser-WLL63XH7.js} +2 -2
- package/dist/{renderer-XLEYPLVL.js → renderer-2UIQVKXK.js} +8 -8
- package/dist/{renderer-KOWVTTYR.js → renderer-3GG2DEFQ.js} +7 -7
- package/dist/{renderer-XLPNUOYA.js → renderer-6NDYVZXQ.js} +10 -10
- package/dist/{renderer-2ARNFXSC.js → renderer-6ST44AVP.js} +10 -10
- package/dist/{renderer-YLM4CGBG.js → renderer-ALP46W2X.js} +8 -8
- package/dist/{renderer-NHFRVCDC.js → renderer-AOFIEF2T.js} +9 -9
- package/dist/{renderer-HLWEJQJW.js → renderer-BEVY3UP5.js} +5 -5
- package/dist/{renderer-H6AQ4UIR.js → renderer-BXPWSNTJ.js} +13 -13
- package/dist/{renderer-BYWLJDT4.js → renderer-EWTETTII.js} +8 -8
- package/dist/{renderer-KK2534AF.js → renderer-FHXAWDNI.js} +4 -4
- package/dist/{renderer-OB77AT7V.js → renderer-FI4IKF4I.js} +7 -7
- package/dist/{renderer-DMVUBKP7.js → renderer-GHYH6DLG.js} +4 -4
- package/dist/{renderer-LSBXYOID.js → renderer-GYYJ4APT.js} +10 -10
- package/dist/{renderer-M43ROWET.js → renderer-JFOHE3YB.js} +9 -9
- package/dist/{renderer-OA7FSZ4A.js → renderer-L5QGQTLV.js} +3 -3
- package/dist/{renderer-7OOC2ZO2.js → renderer-L7S6YVM6.js} +4 -4
- package/dist/{renderer-YELZR4QT.js → renderer-LCHVBTV4.js} +12 -12
- package/dist/{renderer-IN3UPTZS.js → renderer-M4DAYNWC.js} +3 -3
- package/dist/{renderer-WN47AMUM.js → renderer-NXIK3LOA.js} +8 -8
- package/dist/{renderer-QR5343AR.js → renderer-OWUXQDHM.js} +3 -3
- package/dist/{renderer-FCO42JLK.js → renderer-PJNJOCLB.js} +8 -8
- package/dist/{renderer-OYTERGAO.js → renderer-QQBUBD66.js} +9 -9
- package/dist/{renderer-PM7JPC3J.js → renderer-REFE3YFH.js} +11 -11
- package/dist/{renderer-C6KOE774.js → renderer-RL2JGVPC.js} +10 -10
- package/dist/{renderer-ZNTLBQ45.js → renderer-RVFPPKWN.js} +9 -9
- package/dist/{renderer-QEHUJHRK.js → renderer-SFQHFPC5.js} +10 -10
- package/dist/{renderer-LO4FXQHP.js → renderer-T4CMBGA5.js} +8 -8
- package/dist/{renderer-M3PQKXK2.js → renderer-TJD6A3AK.js} +13 -13
- package/dist/{renderer-2E7LQC32.js → renderer-URPIVAPI.js} +3 -3
- package/dist/{renderer-T5CUGSXP.js → renderer-WENGQEX6.js} +7 -7
- package/dist/{renderer-WR3FA3FF.js → renderer-WR6J7NKH.js} +8 -8
- package/dist/{renderer-YBEZ5V2H.js → renderer-X3V2G4UL.js} +3 -3
- package/dist/{renderer-KPEQ72FY.js → renderer-YAW4VHAI.js} +11 -11
- package/dist/{renderer-radial-XWAKJACV.js → renderer-radial-HOUGPUPW.js} +7 -7
- package/dist/{state-renderer-LIESKSBO.js → state-renderer-JJSQJZEL.js} +11 -11
- package/dist/themes-DiUAG4Bf.d.ts +631 -0
- package/docs/ai-integration.md +1 -1
- package/docs/language-reference.md +5 -0
- package/gallery/fixtures/er.dgmo +1 -1
- package/package.json +5 -3
- package/dist/chunk-4ASYQ347.js +0 -185
- package/dist/layout-5XGYNYVT.js +0 -9
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { f as PaletteColors, T as TagGroup, a as DgmoError } from './dgmo-router-Dd5PTjxl.js';
|
|
2
|
+
|
|
3
|
+
/** Convert hex (#RRGGBB or #RGB) to { h, s, l } with h in degrees, s/l as percentages. */
|
|
4
|
+
declare function hexToHSL(hex: string): {
|
|
5
|
+
h: number;
|
|
6
|
+
s: number;
|
|
7
|
+
l: number;
|
|
8
|
+
};
|
|
9
|
+
/** Convert { h (degrees), s (%), l (%) } back to #RRGGBB hex string. */
|
|
10
|
+
declare function hslToHex(h: number, s: number, l: number): string;
|
|
11
|
+
/** Convert hex to "H S% L%" string for CSS custom properties. */
|
|
12
|
+
declare function hexToHSLString(hex: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Blend a color toward white (light mode quadrant fills).
|
|
15
|
+
* amount: 0 = original, 1 = white
|
|
16
|
+
*/
|
|
17
|
+
declare function tint(hex: string, amount: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Blend a color toward a dark base (dark mode quadrant fills).
|
|
20
|
+
* amount: 0 = original, 1 = base
|
|
21
|
+
*/
|
|
22
|
+
declare function shade(hex: string, base: string, amount: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* Blend two hex colors by percentage.
|
|
25
|
+
* `pct` = 0 → 100% of `b`, `pct` = 100 → 100% of `a`.
|
|
26
|
+
*
|
|
27
|
+
* Used by all renderers for tinted fills and strokes.
|
|
28
|
+
*/
|
|
29
|
+
declare function mix(a: string, b: string, pct: number): string;
|
|
30
|
+
/**
|
|
31
|
+
* Pick `lightText` or `darkText` for placement on top of `bg`.
|
|
32
|
+
*
|
|
33
|
+
* Three-tier decision:
|
|
34
|
+
* 1. **High-luminance fill (luminance > 0.55)** → `darkText`. Yellows, peaches,
|
|
35
|
+
* light cyans — dark text reads better and a light cream on light yellow is
|
|
36
|
+
* unreadable.
|
|
37
|
+
* 2. **Pastel fill (min RGB channel ≥ 100, luminance ≤ 0.55)** → defer to WCAG
|
|
38
|
+
* ratio. Pastels have no near-zero channel and tend to read as "soft" —
|
|
39
|
+
* dark text usually wins by ratio (catppuccin dark mauve `#cba6f7` min 166,
|
|
40
|
+
* ratio 9.35:1; tokyo-night dark red `#f7768e` min 118, ratio 7.86:1; and
|
|
41
|
+
* tokyo-night green `#9ece6a` min 106, ratio 11.4:1 all correctly pick dark).
|
|
42
|
+
* 3. **Saturated fill (min RGB < 100, luminance ≤ 0.55)** → `lightText`. At least
|
|
43
|
+
* one channel near zero signals true saturation — gruvbox dark green
|
|
44
|
+
* `#b8bb26` (min 38), blueprint blue `#1f5e8c` (min 31), bold red/blue
|
|
45
|
+
* (min 0), solarized blue `#268bd2` (min 38). The user consistently
|
|
46
|
+
* prefers light text on these for visual punch.
|
|
47
|
+
*
|
|
48
|
+
* `min RGB` discriminates pastel-vs-saturated more reliably than `max-min`
|
|
49
|
+
* (vibrance): tokyo-night and catppuccin dark are pastels with high max RGB,
|
|
50
|
+
* so vibrance alone misclassifies them as "saturated."
|
|
51
|
+
*
|
|
52
|
+
* Tinted fills (luminance ~0.7+ in light themes / ~0.02–0.14 in dark themes)
|
|
53
|
+
* are unambiguous in either branch; only fill-solid output shifts here.
|
|
54
|
+
*/
|
|
55
|
+
declare function contrastText(bg: string, lightText: string, darkText: string): string;
|
|
56
|
+
declare function shapeFill(palette: PaletteColors, intent: string, isDark: boolean, opts?: {
|
|
57
|
+
mode?: 'solid' | 'outline' | undefined;
|
|
58
|
+
}): string;
|
|
59
|
+
/**
|
|
60
|
+
* Derive the 8-color series rotation from a palette's named colors, in the
|
|
61
|
+
* shared {@link CATEGORICAL_COLOR_ORDER} (RGB-seeded, max-contrast). Tag
|
|
62
|
+
* swatches and chart series colors thus share one canonical rotation.
|
|
63
|
+
*/
|
|
64
|
+
declare function getSeriesColors(palette: PaletteColors): string[];
|
|
65
|
+
|
|
66
|
+
interface OrgNode {
|
|
67
|
+
readonly id: string;
|
|
68
|
+
readonly label: string;
|
|
69
|
+
readonly metadata: Readonly<Record<string, string>>;
|
|
70
|
+
readonly children: readonly OrgNode[];
|
|
71
|
+
readonly parentId: string | null;
|
|
72
|
+
readonly isContainer: boolean;
|
|
73
|
+
readonly lineNumber: number;
|
|
74
|
+
readonly color?: string;
|
|
75
|
+
}
|
|
76
|
+
interface ParsedOrg {
|
|
77
|
+
readonly title: string | null;
|
|
78
|
+
readonly titleLineNumber: number | null;
|
|
79
|
+
readonly roots: readonly OrgNode[];
|
|
80
|
+
readonly tagGroups: readonly TagGroup[];
|
|
81
|
+
readonly options: Readonly<Record<string, string>>;
|
|
82
|
+
/**
|
|
83
|
+
* Resolved layout direction (§7.5). `direction-lr` / `direction-tb` are a
|
|
84
|
+
* mutually-exclusive boolean pair (§1.9, last one wins). Defaults to 'TB',
|
|
85
|
+
* which is the orientation org charts have always rendered.
|
|
86
|
+
*/
|
|
87
|
+
readonly direction: 'LR' | 'TB';
|
|
88
|
+
readonly diagnostics: readonly DgmoError[];
|
|
89
|
+
readonly error: string | null;
|
|
90
|
+
}
|
|
91
|
+
declare function parseOrg(content: string, palette?: PaletteColors): ParsedOrg;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Substitute `start-date now` with the host-local resolved date.
|
|
95
|
+
* Pass the result to `encodeDiagramUrl` so the share-link captures
|
|
96
|
+
* the resolved date, not the literal token.
|
|
97
|
+
*
|
|
98
|
+
* Lines without `start-date now` (explicit-date lines, comments,
|
|
99
|
+
* other directives, activity lines containing the word "now") pass
|
|
100
|
+
* through verbatim.
|
|
101
|
+
*/
|
|
102
|
+
declare function normalizePertSourceForShare(dsl: string): string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Shared parser utilities — extracted from individual parsers to eliminate
|
|
106
|
+
* duplication of measureIndent, extractColor, header regexes, and
|
|
107
|
+
* pipe-metadata parsing.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Complete set of recognized chart type identifiers.
|
|
112
|
+
*
|
|
113
|
+
* Derived from `chart-types.ts`, which is a leaf module — importing the
|
|
114
|
+
* chart-type *registry* here would be circular, since the registry imports
|
|
115
|
+
* every parser and 34 parsers import this file.
|
|
116
|
+
*/
|
|
117
|
+
declare const ALL_CHART_TYPES: ReadonlySet<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Cross-chart fill treatment (spec §1.9 fill family). Absent ⇒ the canonical
|
|
120
|
+
* 25% tint (`fill-tint` is the explicit spelling of that default).
|
|
121
|
+
*/
|
|
122
|
+
type FillMode = 'solid' | 'outline';
|
|
123
|
+
/**
|
|
124
|
+
* Parse the first non-empty, non-comment line to extract chart type and optional title.
|
|
125
|
+
* The first token is matched against `ALL_CHART_TYPES`; the remainder is the title.
|
|
126
|
+
*
|
|
127
|
+
* Returns `null` if the first token is not a recognized chart type.
|
|
128
|
+
*/
|
|
129
|
+
declare function parseFirstLine(line: string): {
|
|
130
|
+
chartType: string;
|
|
131
|
+
title: string | undefined;
|
|
132
|
+
} | null;
|
|
133
|
+
|
|
134
|
+
/** Marker alphabet member for any variant. */
|
|
135
|
+
type RaciMarker = 'R' | 'A' | 'S' | 'C' | 'I' | 'D';
|
|
136
|
+
/** Variant identifier — selects alphabet + constraint rule set. */
|
|
137
|
+
type RaciVariant = 'raci' | 'rasci' | 'daci';
|
|
138
|
+
/**
|
|
139
|
+
* One `Role: <markers>` line under a task.
|
|
140
|
+
*
|
|
141
|
+
* `id` is the normalized role key — used by mutations to look up the
|
|
142
|
+
* cell and by validation to detect unknown roles. `displayName` is the
|
|
143
|
+
* first-seen casing/spacing for rendering.
|
|
144
|
+
*/
|
|
145
|
+
interface RaciRoleAssignment {
|
|
146
|
+
readonly id: string;
|
|
147
|
+
readonly displayName: string;
|
|
148
|
+
readonly markers: readonly RaciMarker[];
|
|
149
|
+
readonly lineNumber: number;
|
|
150
|
+
readonly endLineNumber: number;
|
|
151
|
+
}
|
|
152
|
+
/** One task — flush-left under a phase or directly under the chart. */
|
|
153
|
+
interface RaciTask {
|
|
154
|
+
readonly id: string;
|
|
155
|
+
readonly displayName: string;
|
|
156
|
+
readonly description: string;
|
|
157
|
+
readonly roleAssignments: readonly RaciRoleAssignment[];
|
|
158
|
+
readonly lineNumber: number;
|
|
159
|
+
readonly endLineNumber: number;
|
|
160
|
+
}
|
|
161
|
+
/** Optional `[Phase Label]` group header — one level deep. */
|
|
162
|
+
interface RaciPhase {
|
|
163
|
+
readonly id: string;
|
|
164
|
+
readonly displayName: string;
|
|
165
|
+
/** Optional palette color from a `[Label](color)` suffix on the bracket. */
|
|
166
|
+
readonly color?: string;
|
|
167
|
+
readonly tasks: readonly RaciTask[];
|
|
168
|
+
readonly lineNumber: number;
|
|
169
|
+
readonly endLineNumber: number;
|
|
170
|
+
}
|
|
171
|
+
/** Top-level parse result. */
|
|
172
|
+
interface ParsedRaci {
|
|
173
|
+
readonly type: 'raci';
|
|
174
|
+
/** Optional title from the chart-type header line. */
|
|
175
|
+
readonly title?: string;
|
|
176
|
+
readonly titleLineNumber?: number;
|
|
177
|
+
/** Variant selected by directive, or by chart-type id when absent. */
|
|
178
|
+
readonly variant: RaciVariant;
|
|
179
|
+
/**
|
|
180
|
+
* Canonical column order. Populated either from an explicit
|
|
181
|
+
* `roles:` directive or, when absent, from first-seen role usage.
|
|
182
|
+
*/
|
|
183
|
+
readonly roles: readonly string[];
|
|
184
|
+
/** Display name for each role (parallel to `roles`). */
|
|
185
|
+
readonly roleDisplayNames: readonly string[];
|
|
186
|
+
/**
|
|
187
|
+
* Optional per-role palette color from the `Cap blue` trailing-token
|
|
188
|
+
* suffix in the roles block (or the long pipe form `Cap | color: blue`).
|
|
189
|
+
* Parallel to `roles`; entries default to `undefined` (renderer falls
|
|
190
|
+
* back to the neutral column tint).
|
|
191
|
+
*/
|
|
192
|
+
readonly roleColors: ReadonlyArray<string | undefined>;
|
|
193
|
+
readonly phases: readonly RaciPhase[];
|
|
194
|
+
/** Tasks declared without a parent phase. */
|
|
195
|
+
readonly tasksWithoutPhase: readonly RaciTask[];
|
|
196
|
+
readonly options: Readonly<Record<string, string>>;
|
|
197
|
+
readonly diagnostics: readonly DgmoError[];
|
|
198
|
+
readonly error: string | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Parse RACI/RASCI/DACI source. The leading chart-type id (if a
|
|
203
|
+
* recognized variant id) acts as a hint for default variant when the
|
|
204
|
+
* `variant` directive is absent.
|
|
205
|
+
*/
|
|
206
|
+
declare function parseRaci(content: string, palette?: PaletteColors): ParsedRaci;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Async or sync file reader. Receives an absolute path, returns content.
|
|
210
|
+
* Throwing means "file not found".
|
|
211
|
+
*/
|
|
212
|
+
type ReadFileFn = (path: string) => string | Promise<string>;
|
|
213
|
+
/** Tracks the original source file and line for an imported line. */
|
|
214
|
+
interface ImportSource {
|
|
215
|
+
/** Absolute path of the file this line originates from */
|
|
216
|
+
filePath: string;
|
|
217
|
+
/** 1-based line number in the original (pre-resolution) source file */
|
|
218
|
+
sourceLine: number;
|
|
219
|
+
}
|
|
220
|
+
interface ResolveImportsResult {
|
|
221
|
+
content: string;
|
|
222
|
+
diagnostics: DgmoError[];
|
|
223
|
+
/** resolvedLine (1-based index) → originalLine (1-based) or null for inserted lines */
|
|
224
|
+
lineMap: (number | null)[];
|
|
225
|
+
/** resolvedLine (1-based index) → import source info or null for non-imported lines */
|
|
226
|
+
importSourceMap: (ImportSource | null)[];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Pre-processes org chart content, resolving `tags` and `import` directives.
|
|
230
|
+
*
|
|
231
|
+
* @param content - Raw .dgmo file content
|
|
232
|
+
* @param filePath - Absolute path of the file (for relative path resolution)
|
|
233
|
+
* @param readFileFn - Function to read files (sync or async)
|
|
234
|
+
* @returns Merged content with all imports resolved + diagnostics
|
|
235
|
+
*/
|
|
236
|
+
declare function resolveOrgImports(content: string, filePath: string, readFileFn: ReadFileFn): Promise<ResolveImportsResult>;
|
|
237
|
+
|
|
238
|
+
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,2 @@
|
|
|
1
|
+
export { b as ChartTypeId, c as ChartTypeMeta, C as CompactViewState, m as DecodedDiagramUrl, n as EncodeDiagramUrlOptions, o as EncodeDiagramUrlResult, f as PaletteColors, g as chartTypes, t as decodeDiagramUrl, u as decodeViewState, v as encodeDiagramUrl, w as encodeViewState, y as getAvailablePalettes, j as getPalette, H as parseDgmoChartType } from './dgmo-router-Dd5PTjxl.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-D98NbYDp.js';
|
package/dist/chart-meta.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-U7VO6JAA.js";
|
|
11
11
|
import {
|
|
12
12
|
parseDgmoChartType
|
|
13
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
17
|
+
} from "./chunk-2EPV7CLY.js";
|
|
18
18
|
import {
|
|
19
19
|
FONT_FAMILY
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UTCPNJND.js";
|
|
21
21
|
import {
|
|
22
22
|
LEGEND_HEIGHT
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3HOCNSPD.js";
|
|
24
24
|
import {
|
|
25
25
|
measureText,
|
|
26
26
|
wrapTextToWidth
|
|
27
|
-
} from "./chunk-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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-
|
|
988
|
+
//# sourceMappingURL=chunk-27YPE7NO.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeLegendLayout
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FG24NXKN.js";
|
|
4
4
|
import {
|
|
5
|
-
FONT_CENTRAL_DY,
|
|
6
5
|
FONT_FAMILY
|
|
7
|
-
} from "./chunk-
|
|
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-
|
|
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("
|
|
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-
|
|
294
|
+
//# sourceMappingURL=chunk-2EPV7CLY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
measureText,
|
|
3
3
|
truncateText
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
62
|
+
//# sourceMappingURL=chunk-3HOCNSPD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderIntegratedLegend
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2EPV7CLY.js";
|
|
4
4
|
import {
|
|
5
5
|
FONT_FAMILY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UTCPNJND.js";
|
|
7
7
|
import {
|
|
8
8
|
getFigure,
|
|
9
9
|
getPartGeom,
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
renderBody,
|
|
347
347
|
renderBodyForExport
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-3PSPUYT5.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractExportSvg,
|
|
3
3
|
runInExportContainer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VV6HZQ5K.js";
|
|
5
5
|
import {
|
|
6
6
|
layoutOrg
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N6XI5VTA.js";
|
|
8
8
|
import {
|
|
9
9
|
renderCollapseBar,
|
|
10
10
|
renderNodeCard
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5GM6BZO7.js";
|
|
12
12
|
import {
|
|
13
13
|
CARD_RADIUS,
|
|
14
14
|
COLLAPSE_BAR_HEIGHT,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
META_LINE_HEIGHT,
|
|
26
26
|
NODE_STROKE_WIDTH,
|
|
27
27
|
SEPARATOR_GAP
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-FJ57274M.js";
|
|
29
29
|
import {
|
|
30
30
|
ScaleContext
|
|
31
31
|
} from "./chunk-YYVTBZZC.js";
|
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
} from "./chunk-A4GOY3PE.js";
|
|
36
36
|
import {
|
|
37
37
|
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2EPV7CLY.js";
|
|
39
39
|
import {
|
|
40
40
|
getMaxLegendReservedHeight
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-FG24NXKN.js";
|
|
42
42
|
import {
|
|
43
43
|
FONT_FAMILY
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UTCPNJND.js";
|
|
45
45
|
import {
|
|
46
46
|
EYE_CLOSED_PATH,
|
|
47
47
|
EYE_OPEN_PATH,
|
|
@@ -49,10 +49,10 @@ import {
|
|
|
49
49
|
LEGEND_EYE_SIZE,
|
|
50
50
|
LEGEND_GROUP_GAP,
|
|
51
51
|
LEGEND_HEIGHT
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-3HOCNSPD.js";
|
|
53
53
|
import {
|
|
54
54
|
measureText
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-MTGGOCND.js";
|
|
56
56
|
import {
|
|
57
57
|
parseOrg
|
|
58
58
|
} from "./chunk-CUYDE77F.js";
|
|
@@ -207,7 +207,7 @@ function renderOrg(container, parsed, layout, palette, isDark, onClickItem, expo
|
|
|
207
207
|
const fill = containerFill(palette, isDark, colorOff ? void 0 : c.color);
|
|
208
208
|
const stroke = containerStroke(palette, colorOff ? void 0 : c.color);
|
|
209
209
|
cG.append("rect").attr("x", 0).attr("y", 0).attr("width", c.width).attr("height", c.height).attr("rx", sContainerRadius).attr("fill", fill).attr("stroke", stroke).attr("stroke-opacity", 0.35).attr("stroke-width", sNodeStrokeWidth);
|
|
210
|
-
cG.append("text").attr("x", c.width / 2).attr("y", sContainerHeaderHeight / 2
|
|
210
|
+
cG.append("text").attr("x", c.width / 2).attr("y", sContainerHeaderHeight / 2).attr("dominant-baseline", "central").attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", sContainerLabelFontSize).attr("font-weight", "bold").text(c.label);
|
|
211
211
|
const metaEntries = Object.entries(c.metadata);
|
|
212
212
|
if (metaEntries.length > 0) {
|
|
213
213
|
const metaDisplayKeys = metaEntries.map(
|
|
@@ -485,4 +485,4 @@ export {
|
|
|
485
485
|
renderOrg,
|
|
486
486
|
renderOrgForExport
|
|
487
487
|
};
|
|
488
|
-
//# sourceMappingURL=chunk-
|
|
488
|
+
//# sourceMappingURL=chunk-4IE42ODL.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-PDKUANDZ.js";
|
|
5
5
|
import {
|
|
6
6
|
layoutGraph
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IKHV5IJB.js";
|
|
8
8
|
import {
|
|
9
9
|
appendArrowheadMarkers
|
|
10
10
|
} from "./chunk-LP7EC4MI.js";
|
|
@@ -16,9 +16,10 @@ import {
|
|
|
16
16
|
renderNoteConnector
|
|
17
17
|
} from "./chunk-H52HJ26L.js";
|
|
18
18
|
import {
|
|
19
|
+
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
19
20
|
EDGE_STROKE_WIDTH,
|
|
20
21
|
NODE_STROKE_WIDTH
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FJ57274M.js";
|
|
22
23
|
import {
|
|
23
24
|
ScaleContext
|
|
24
25
|
} from "./chunk-YYVTBZZC.js";
|
|
@@ -32,10 +33,10 @@ import {
|
|
|
32
33
|
} from "./chunk-A4GOY3PE.js";
|
|
33
34
|
import {
|
|
34
35
|
FONT_FAMILY
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UTCPNJND.js";
|
|
36
37
|
import {
|
|
37
38
|
measureText
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MTGGOCND.js";
|
|
39
40
|
import {
|
|
40
41
|
parseFlowchart
|
|
41
42
|
} from "./chunk-CHOKOYSC.js";
|
|
@@ -453,7 +454,7 @@ function renderFlowchart(container, graph, layout, palette, isDark, onClickItem,
|
|
|
453
454
|
}
|
|
454
455
|
const lp = labelPosMap.get(ei);
|
|
455
456
|
if (edge.label && lp) {
|
|
456
|
-
edgeG.append("rect").attr("x", lp.x - lp.w / 2).attr("y", lp.y - lp.h / 2 - 1).attr("width", lp.w).attr("height", lp.h).attr("rx", 3).attr("fill", palette.bg).attr("opacity",
|
|
457
|
+
edgeG.append("rect").attr("x", lp.x - lp.w / 2).attr("y", lp.y - lp.h / 2 - 1).attr("width", lp.w).attr("height", lp.h).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY).attr("class", "fc-edge-label-bg");
|
|
457
458
|
edgeG.append("text").attr("x", lp.x).attr("y", lp.y + 4).attr("text-anchor", "middle").attr("fill", edgeColor).attr("font-size", sEdgeLabelFontSize).attr("class", "fc-edge-label").text(edge.label);
|
|
458
459
|
}
|
|
459
460
|
}
|
|
@@ -585,4 +586,4 @@ export {
|
|
|
585
586
|
renderFlowchart,
|
|
586
587
|
renderFlowchartForExport
|
|
587
588
|
};
|
|
588
|
-
//# sourceMappingURL=chunk-
|
|
589
|
+
//# sourceMappingURL=chunk-4TM7MWU4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
measureText
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MTGGOCND.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/card.ts
|
|
6
6
|
function renderNodeCard(container, opts) {
|
|
@@ -17,7 +17,7 @@ function renderNodeCard(container, opts) {
|
|
|
17
17
|
container.append("text").attr("x", opts.width / 2).attr("y", startY + li * lineH).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", opts.labelColor).attr("font-size", opts.labelFontSize).attr("font-weight", "bold").text(labelLines[li]);
|
|
18
18
|
}
|
|
19
19
|
} else {
|
|
20
|
-
container.append("text").attr("x", opts.width / 2).attr("y", opts.headerHeight / 2
|
|
20
|
+
container.append("text").attr("x", opts.width / 2).attr("y", opts.headerHeight / 2).attr("dominant-baseline", "central").attr("text-anchor", "middle").attr("fill", opts.labelColor).attr("font-size", opts.labelFontSize).attr("font-weight", "bold").text(labelLines?.[0] ?? opts.label);
|
|
21
21
|
}
|
|
22
22
|
const meta = opts.meta;
|
|
23
23
|
if (!meta || meta.rows.length === 0) return;
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
renderNodeCard,
|
|
45
45
|
renderCollapseBar
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-5GM6BZO7.js.map
|