yuhwa 1.2.0 → 1.4.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/README.md +5 -3
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +4 -3
- package/dist/browser.d.ts +10 -3
- package/dist/browser.js +85 -21
- package/dist/canvas.d.ts +2 -0
- package/dist/canvas.js +40 -0
- package/dist/cli.js +485 -236
- package/dist/editor/assets/index-DWm3xV_v.js +689 -0
- package/dist/editor/assets/{lsp.worker-sZtzIA6-.js → lsp.worker-N6A9m364.js} +23 -17
- package/dist/editor/index.html +4 -1
- package/dist/{figure-CA2hy0xh.d.ts → figure-BLHfxz_e.d.ts} +28 -5
- package/dist/index-xVW43gqW.d.ts +261 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -1
- package/dist/ironmark.d.ts +1 -1
- package/dist/ironmark.js +1 -1
- package/dist/lsp-browser.d.ts +2 -2
- package/dist/lsp-browser.js +2 -1
- package/dist/lsp-node.js +47 -27
- package/dist/lsp-server.d.ts +5 -1
- package/dist/lsp-server.js +1 -1
- package/dist/lsp.d.ts +1 -1
- package/dist/lsp.js +1 -1
- package/dist/markdown-it.d.ts +1 -1
- package/dist/markdown-it.js +5 -3
- package/dist/{node-Bzn2uKXZ.js → node-CkrQnPFb.js} +90 -12
- package/dist/parse--ljBMU60.js +3884 -0
- package/dist/plugin-CitzbblK.js +301 -0
- package/dist/{index-CnnoZYl0.d.ts → plugin-NMP_uf1a.d.ts} +93 -208
- package/dist/plugin.d.ts +12 -0
- package/dist/plugin.js +3 -0
- package/dist/raster-iqi6XRPU.js +299 -0
- package/dist/remark.d.ts +1 -1
- package/dist/remark.js +1 -1
- package/dist/rolldown-runtime-CEjnN5Q1.js +37 -0
- package/dist/{server-Dxo7OG8K.js → server-BTYtmr6B.js} +41 -63
- package/dist/{server--jHjJjOS.d.ts → server-DMAOtqqK.d.ts} +1 -1
- package/dist/{service-B1fpOg_L.js → service-C60VdeKS.js} +35 -3
- package/dist/{service-Brvpt7Do.d.ts → service-DimTFsE3.d.ts} +2 -0
- package/dist/{shared-Ddw88O9D.js → shared-h8tkFLY4.js} +719 -421
- package/dist/{src-DkQj7aIV.js → src-NCXCTK_4.js} +512 -4548
- package/dist/svg-uri-Dx8SGV-n.js +7 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -2
- package/dist/vuepress.d.ts +3 -2
- package/dist/vuepress.js +4 -2
- package/dist/watch-2VeW5DUN.js +35 -0
- package/dist/yuhwa.iife.js +55 -54
- package/dist/zoom-script-CaJ5MNUw.js +29 -0
- package/dist/{zoom-QeqB6QlH.js → zoom-yxhxX16c.js} +1 -1
- package/dist/zoom.d.ts +16 -7
- package/dist/zoom.js +2 -2
- package/package.json +24 -2
- package/skills/yuhwa/SKILL.md +12 -0
- package/dist/editor/assets/index-BphHLTvA.js +0 -689
- package/dist/zoom-script-CVdAzMhX.js +0 -51
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { $t as guard, C as ENUMS, E as NUMBERS, H as MARKER_KINDS, I as rectPath, M as SHAPES, N as SHAPE_ALIASES, Nt as THEME_NAMES, S as EDGE_PROPS, T as NODE_PROPS, U as POST_RENDER, V as AFTER_LAYOUT, W as SHAPE_KINDS, Xt as claim, Zt as clearOwners, a as TRANSFORMS, b as BOOLS, i as STATEMENTS, jt as THEMES, n as PANELS, qt as registerTheme, t as KNOWN_SETTINGS, w as GROUP_PROPS } from "./parse--ljBMU60.js";
|
|
2
|
+
// src/core/plugin.ts
|
|
3
|
+
/** what `options[key]` asks for: a select of values, or one kind of field */
|
|
4
|
+
function optionKind(o) {
|
|
5
|
+
return typeof o === "string" ? { kind: o } : {
|
|
6
|
+
kind: "select",
|
|
7
|
+
values: o
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* `fn` computed once per panel per layout pass: `measure`, `render` and
|
|
12
|
+
* `handles` share one ctx, so a plugin's geometry wrapped in this is worked
|
|
13
|
+
* out (and its text measured) once instead of three times.
|
|
14
|
+
*/
|
|
15
|
+
function perPass(fn) {
|
|
16
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
17
|
+
return (data, ctx) => {
|
|
18
|
+
const hit = cache.get(ctx);
|
|
19
|
+
if (hit && hit.data === data) return hit.g;
|
|
20
|
+
const g = fn(data, ctx);
|
|
21
|
+
cache.set(ctx, {
|
|
22
|
+
data,
|
|
23
|
+
g
|
|
24
|
+
});
|
|
25
|
+
return g;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* an `editPart` for kinds whose parts only take a colour: `fn` gets the part
|
|
30
|
+
* id and the tone (a tone name or `#hex`; null removes it)
|
|
31
|
+
*/
|
|
32
|
+
function recolor(fn) {
|
|
33
|
+
return (body, edit, data) => {
|
|
34
|
+
if (edit.op !== "set" || edit.key !== "color") return null;
|
|
35
|
+
const out = fn(body, edit.id, edit.value || null, data);
|
|
36
|
+
return out && {
|
|
37
|
+
body: out,
|
|
38
|
+
id: edit.id
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** everything registered through `use` */
|
|
43
|
+
const registry = {
|
|
44
|
+
plugins: [],
|
|
45
|
+
rows: [],
|
|
46
|
+
frames: /* @__PURE__ */ new Map(),
|
|
47
|
+
decorations: [],
|
|
48
|
+
panels: PANELS
|
|
49
|
+
};
|
|
50
|
+
const addAll = (list, items) => {
|
|
51
|
+
for (const i of items ?? []) if (!list.includes(i)) list.push(i);
|
|
52
|
+
};
|
|
53
|
+
/** marker names go in front of `none`, so the choices list the drawn ones first */
|
|
54
|
+
const addMarkers = (list, markers) => {
|
|
55
|
+
for (const m of markers ?? []) {
|
|
56
|
+
if (list.includes(m.name)) continue;
|
|
57
|
+
const none = list.indexOf("none");
|
|
58
|
+
list.splice(none < 0 ? list.length : none, 0, m.name);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const none = () => {};
|
|
62
|
+
const empty = () => "";
|
|
63
|
+
const zero = () => ({
|
|
64
|
+
w: 0,
|
|
65
|
+
h: 0
|
|
66
|
+
});
|
|
67
|
+
/** what each kind's functions return instead when they throw */
|
|
68
|
+
const FALLBACK = {
|
|
69
|
+
row: {
|
|
70
|
+
parse: () => null,
|
|
71
|
+
finish: none,
|
|
72
|
+
measure: zero,
|
|
73
|
+
render: empty
|
|
74
|
+
},
|
|
75
|
+
frame: {
|
|
76
|
+
inset: () => ({ top: 0 }),
|
|
77
|
+
render: empty
|
|
78
|
+
},
|
|
79
|
+
decoration: {
|
|
80
|
+
measure: () => null,
|
|
81
|
+
render: empty
|
|
82
|
+
},
|
|
83
|
+
shape: {
|
|
84
|
+
path: (b) => rectPath(b.x, b.y, b.w, b.h, 0),
|
|
85
|
+
size: (w, h) => ({
|
|
86
|
+
w,
|
|
87
|
+
h
|
|
88
|
+
}),
|
|
89
|
+
detail: () => null,
|
|
90
|
+
port: (b) => ({
|
|
91
|
+
x: b.x + b.w / 2,
|
|
92
|
+
y: b.y + b.h / 2
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
marker: {
|
|
96
|
+
render: empty,
|
|
97
|
+
inset: () => 0
|
|
98
|
+
},
|
|
99
|
+
panel: {
|
|
100
|
+
measure: zero,
|
|
101
|
+
render: empty,
|
|
102
|
+
handles: () => [],
|
|
103
|
+
parts: () => [],
|
|
104
|
+
editPart: () => null
|
|
105
|
+
},
|
|
106
|
+
hook: {
|
|
107
|
+
transform: none,
|
|
108
|
+
afterLayout: none,
|
|
109
|
+
postRender: (svg) => svg
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
/** `k` with each function named in `fb` wrapped by `guard` */
|
|
113
|
+
function wrap(plugin, what, k, fb) {
|
|
114
|
+
const out = { ...k };
|
|
115
|
+
for (const [m, f] of Object.entries(fb)) {
|
|
116
|
+
const fn = out[m];
|
|
117
|
+
if (typeof fn === "function") out[m] = guard(plugin, what(m), fn.bind(k), f);
|
|
118
|
+
}
|
|
119
|
+
return out;
|
|
120
|
+
}
|
|
121
|
+
/** copies of a plugin's parts whose every function reports a throw instead of passing it on */
|
|
122
|
+
function guarded(p) {
|
|
123
|
+
const n = p.name;
|
|
124
|
+
const kinds = (list, what, fb) => (list ?? []).map((k) => wrap(n, (m) => what(k, m), k, fb));
|
|
125
|
+
return {
|
|
126
|
+
rows: kinds(p.rows, (r) => `row "${r.kind}"`, FALLBACK.row),
|
|
127
|
+
frames: kinds(p.frames, (f) => `frame "${f.name}"`, FALLBACK.frame),
|
|
128
|
+
decorations: kinds(p.decorations, (d) => `decoration "${d.name}"`, FALLBACK.decoration),
|
|
129
|
+
shapes: kinds(p.shapes, (s) => `shape "${s.name}"`, FALLBACK.shape),
|
|
130
|
+
markers: kinds(p.markers, (k) => `marker "${k.name}"`, FALLBACK.marker),
|
|
131
|
+
panels: kinds(p.panels, (pk, m) => `${pk.name} panel ${m === "editPart" ? "edit" : m}`, FALLBACK.panel),
|
|
132
|
+
statements: (p.statements ?? []).map((st) => ({
|
|
133
|
+
...st,
|
|
134
|
+
parse: guard(n, st.keyword, st.parse.bind(st), none, (msg, [, , ctx]) => ctx.warn(msg, "error"))
|
|
135
|
+
})),
|
|
136
|
+
hooks: wrap(n, (m) => m, {
|
|
137
|
+
transform: p.transform,
|
|
138
|
+
afterLayout: p.afterLayout,
|
|
139
|
+
postRender: p.postRender
|
|
140
|
+
}, FALLBACK.hook)
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/** the tables as they were before the first plugin, so `unuse` can rebuild them */
|
|
144
|
+
let baseline;
|
|
145
|
+
function snapshot() {
|
|
146
|
+
const sets = [KNOWN_SETTINGS].map((s) => [s, [...s]]);
|
|
147
|
+
const maps = [
|
|
148
|
+
PANELS,
|
|
149
|
+
STATEMENTS,
|
|
150
|
+
SHAPE_KINDS,
|
|
151
|
+
MARKER_KINDS,
|
|
152
|
+
registry.frames
|
|
153
|
+
].map((m) => [m, [...m]]);
|
|
154
|
+
const lists = [
|
|
155
|
+
TRANSFORMS,
|
|
156
|
+
AFTER_LAYOUT,
|
|
157
|
+
POST_RENDER,
|
|
158
|
+
NODE_PROPS,
|
|
159
|
+
EDGE_PROPS,
|
|
160
|
+
GROUP_PROPS,
|
|
161
|
+
BOOLS,
|
|
162
|
+
NUMBERS,
|
|
163
|
+
THEME_NAMES,
|
|
164
|
+
SHAPES,
|
|
165
|
+
registry.rows,
|
|
166
|
+
registry.decorations
|
|
167
|
+
].map((l) => [l, [...l]]);
|
|
168
|
+
const enums = Object.entries(ENUMS).map(([k, v]) => [
|
|
169
|
+
k,
|
|
170
|
+
v,
|
|
171
|
+
[...v]
|
|
172
|
+
]);
|
|
173
|
+
const themes = { ...THEMES };
|
|
174
|
+
const aliases = { ...SHAPE_ALIASES };
|
|
175
|
+
return () => {
|
|
176
|
+
for (const [s, v] of sets) {
|
|
177
|
+
s.clear();
|
|
178
|
+
for (const x of v) s.add(x);
|
|
179
|
+
}
|
|
180
|
+
for (const [m, v] of maps) {
|
|
181
|
+
m.clear();
|
|
182
|
+
for (const [k, x] of v) m.set(k, x);
|
|
183
|
+
}
|
|
184
|
+
for (const [l, v] of lists) l.splice(0, l.length, ...v);
|
|
185
|
+
for (const k of Object.keys(ENUMS)) delete ENUMS[k];
|
|
186
|
+
for (const [k, arr, v] of enums) {
|
|
187
|
+
arr.splice(0, arr.length, ...v);
|
|
188
|
+
ENUMS[k] = arr;
|
|
189
|
+
}
|
|
190
|
+
for (const k of Object.keys(THEMES)) delete THEMES[k];
|
|
191
|
+
Object.assign(THEMES, themes);
|
|
192
|
+
for (const k of Object.keys(SHAPE_ALIASES)) delete SHAPE_ALIASES[k];
|
|
193
|
+
Object.assign(SHAPE_ALIASES, aliases);
|
|
194
|
+
clearOwners();
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/** `item` replaces the entry with the same name where it was (order matters for rows), or goes last */
|
|
198
|
+
function place(list, item, same) {
|
|
199
|
+
const at = list.findIndex(same);
|
|
200
|
+
if (at >= 0) list[at] = item;
|
|
201
|
+
else list.push(item);
|
|
202
|
+
}
|
|
203
|
+
/** Register plugins. Registering the same plugin name twice is a no-op. */
|
|
204
|
+
function use(...plugins) {
|
|
205
|
+
baseline ??= snapshot();
|
|
206
|
+
for (const p of plugins) {
|
|
207
|
+
if (registry.plugins.some((q) => q.name === p.name)) continue;
|
|
208
|
+
registry.plugins.push(p);
|
|
209
|
+
const w = guarded(p);
|
|
210
|
+
/** each item, under its name, into `into`: a map, or a function for more work */
|
|
211
|
+
const own = (what, items, key, into) => {
|
|
212
|
+
for (const x of items) {
|
|
213
|
+
const k = key(x);
|
|
214
|
+
claim(what, k, p.name);
|
|
215
|
+
if (typeof into === "function") into(x, k);
|
|
216
|
+
else into.set(k, x);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
for (const t of p.themes ?? []) registerTheme(t);
|
|
220
|
+
own("row", w.rows, (r) => r.kind, (r, k) => place(registry.rows, r, (x) => x.kind === k));
|
|
221
|
+
own("decoration", w.decorations, (dec) => dec.name, (dec, k) => {
|
|
222
|
+
place(registry.decorations, dec, (x) => x.name === k);
|
|
223
|
+
KNOWN_SETTINGS.add(dec.setting);
|
|
224
|
+
});
|
|
225
|
+
own("frame", w.frames, (f) => f.name, registry.frames);
|
|
226
|
+
own("panel", w.panels, (pk) => pk.name, PANELS);
|
|
227
|
+
own("statement", w.statements, (st) => st.keyword, STATEMENTS);
|
|
228
|
+
own("marker", w.markers, (mk) => mk.name, MARKER_KINDS);
|
|
229
|
+
own("shape", w.shapes, (sh) => sh.name, (sh, k) => {
|
|
230
|
+
SHAPE_KINDS.set(k, sh);
|
|
231
|
+
if (!SHAPES.includes(k)) SHAPES.push(k);
|
|
232
|
+
for (const a of sh.aliases ?? []) SHAPE_ALIASES[a] = k;
|
|
233
|
+
});
|
|
234
|
+
addAll(ENUMS.shape ??= [], [...p.shapes?.map((x) => x.name) ?? [], ...p.shapes?.flatMap((x) => x.aliases ?? []) ?? []]);
|
|
235
|
+
addMarkers(ENUMS.head ??= [], p.markers);
|
|
236
|
+
if (ENUMS.tail !== ENUMS.head) addMarkers(ENUMS.tail ??= [], p.markers);
|
|
237
|
+
const { transform, afterLayout, postRender } = w.hooks;
|
|
238
|
+
if (transform) TRANSFORMS.push(transform);
|
|
239
|
+
if (afterLayout) AFTER_LAYOUT.push(afterLayout);
|
|
240
|
+
if (postRender) POST_RENDER.push(postRender);
|
|
241
|
+
for (const s of p.settings ?? []) KNOWN_SETTINGS.add(s);
|
|
242
|
+
addAll(NODE_PROPS, p.props?.node);
|
|
243
|
+
addAll(EDGE_PROPS, p.props?.edge);
|
|
244
|
+
addAll(GROUP_PROPS, p.props?.group);
|
|
245
|
+
for (const [k, v] of Object.entries(p.enums ?? {})) addAll(ENUMS[k] ??= [], v);
|
|
246
|
+
addAll(BOOLS, p.bools);
|
|
247
|
+
addAll(NUMBERS, p.numbers);
|
|
248
|
+
}
|
|
249
|
+
if (registry.frames.size) addAll(ENUMS.frame ??= [], [...registry.frames.keys()]);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Unregister a plugin by name: every table is rebuilt from the state before
|
|
253
|
+
* the first `use` and the other plugins are registered again, in order.
|
|
254
|
+
* Returns false when no plugin has that name.
|
|
255
|
+
*/
|
|
256
|
+
function unuse(name) {
|
|
257
|
+
if (!baseline || !registry.plugins.some((p) => p.name === name)) return false;
|
|
258
|
+
const keep = registry.plugins.filter((p) => p.name !== name);
|
|
259
|
+
registry.plugins.length = 0;
|
|
260
|
+
baseline();
|
|
261
|
+
use(...keep);
|
|
262
|
+
return true;
|
|
263
|
+
}
|
|
264
|
+
// src/core/measure.ts
|
|
265
|
+
const NARROW = new Set("iljtfr.,;:'!|()[]{} \"`".split(""));
|
|
266
|
+
const WIDE = new Set("mwMW@%".split(""));
|
|
267
|
+
/** Font-independent width estimate, tuned for Inter / system UI fonts. */
|
|
268
|
+
const approxMeasure = (text, fontSize, weight, mono) => {
|
|
269
|
+
if (mono) return [...text].length * fontSize * .6;
|
|
270
|
+
let w = 0;
|
|
271
|
+
for (const ch of text) {
|
|
272
|
+
const cp = ch.codePointAt(0);
|
|
273
|
+
if (cp > 8192) w += cp > 126976 ? 1.2 : 1;
|
|
274
|
+
else if (NARROW.has(ch)) w += .3;
|
|
275
|
+
else if (WIDE.has(ch)) w += .86;
|
|
276
|
+
else if (ch >= "A" && ch <= "Z") w += .66;
|
|
277
|
+
else if (ch >= "0" && ch <= "9") w += .58;
|
|
278
|
+
else w += .54;
|
|
279
|
+
}
|
|
280
|
+
return w * fontSize * (weight >= 600 ? 1.05 : 1);
|
|
281
|
+
};
|
|
282
|
+
const MONO_STACK = "'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
283
|
+
let canvasCtx;
|
|
284
|
+
/** Accurate measurement using a canvas when running in a browser. */
|
|
285
|
+
function canvasMeasure(fontFamily) {
|
|
286
|
+
return (text, fontSize, weight, mono) => {
|
|
287
|
+
if (canvasCtx === void 0) try {
|
|
288
|
+
canvasCtx = typeof document !== "undefined" ? document.createElement("canvas").getContext("2d") : null;
|
|
289
|
+
} catch {
|
|
290
|
+
canvasCtx = null;
|
|
291
|
+
}
|
|
292
|
+
if (!canvasCtx) return approxMeasure(text, fontSize, weight, mono);
|
|
293
|
+
const family = mono && !/mono|courier|consolas|menlo/i.test(fontFamily) ? MONO_STACK : fontFamily;
|
|
294
|
+
canvasCtx.font = `${weight} ${fontSize}px ${family}`;
|
|
295
|
+
return canvasCtx.measureText(text).width;
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
// src/plugin.ts
|
|
299
|
+
/** `p` as it is, typed: no annotation needed for the kinds inside */
|
|
300
|
+
const definePlugin = (p) => p;
|
|
301
|
+
export { perPass as a, unuse as c, optionKind as i, use as l, approxMeasure as n, recolor as o, canvasMeasure as r, registry as s, definePlugin as t };
|
|
@@ -62,6 +62,8 @@ interface Theme {
|
|
|
62
62
|
groupTone(t: string): ToneColors | undefined;
|
|
63
63
|
edgeTone(t: string): string | undefined;
|
|
64
64
|
}
|
|
65
|
+
declare const SANS = "Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
|
|
66
|
+
declare const MONO = "'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
65
67
|
declare const THEMES: Record<string, Theme>;
|
|
66
68
|
declare const THEME_NAMES: string[];
|
|
67
69
|
/** a theme as plugins hand it in: `edge.ink` defaults to `edge.text` */
|
|
@@ -72,7 +74,29 @@ type ThemeInput = Omit<Theme, "edge"> & {
|
|
|
72
74
|
};
|
|
73
75
|
/** Add a theme (or replace one with the same name). Plugins call this through `use`. */
|
|
74
76
|
declare function registerTheme(input: ThemeInput): void;
|
|
77
|
+
/**
|
|
78
|
+
* Any CSS colour this library can mix, as `#rrggbb`: `#rgb`, `#rgba`,
|
|
79
|
+
* `#rrggbb(aa)`, `rgb()`/`rgba()`, `hsl()`/`hsla()` (comma or space syntax)
|
|
80
|
+
* and the CSS colour names. Palette names are not CSS colours: see `isColor`.
|
|
81
|
+
*/
|
|
82
|
+
declare function cssHex(v: string): string | undefined;
|
|
83
|
+
/** a `true` / `false` prop value: `false`, `no`, `off`, `0` and `none` are false */
|
|
84
|
+
declare const bool: (v: string | undefined, d: boolean) => boolean;
|
|
75
85
|
type LineStyle$1 = "solid" | "dashed" | "dotted";
|
|
86
|
+
/** whether `family` is a CSS generic family such as `serif` or `system-ui` */
|
|
87
|
+
declare const isGenericFont: (family: string) => boolean;
|
|
88
|
+
/** the family names of a CSS font stack, unquoted */
|
|
89
|
+
declare const fontFamilies: (stack: string) => string[];
|
|
90
|
+
/**
|
|
91
|
+
* a font setting as a CSS font stack: a family name or a fallback list such
|
|
92
|
+
* as `Lora, Georgia, serif`. `sans`, `serif` and `mono` expand to their
|
|
93
|
+
* stacks; a list that ends without a generic family gets one that matches
|
|
94
|
+
* the first font
|
|
95
|
+
*/
|
|
96
|
+
declare function fontStack(font: string): {
|
|
97
|
+
font: string;
|
|
98
|
+
mono: boolean;
|
|
99
|
+
};
|
|
76
100
|
/**
|
|
77
101
|
* A key of a `theme name { … }` block: what it sets, the kind of value it
|
|
78
102
|
* takes, and the words it offers besides colours (`none`) or instead of them.
|
|
@@ -105,8 +129,14 @@ declare const themeNames: (custom?: Record<string, unknown>) => string[];
|
|
|
105
129
|
* (`Diagram.themes`), which win over registered themes of the same name.
|
|
106
130
|
*/
|
|
107
131
|
declare function getTheme(name: string | undefined, custom?: Record<string, Record<string, string>>): Theme;
|
|
132
|
+
/** true for a palette name (`blue`, `blue-600`) or any CSS colour `cssHex` reads */
|
|
133
|
+
declare const isColor: (v: string) => boolean;
|
|
108
134
|
/** @deprecated use `isColor` */
|
|
109
135
|
declare const isToneOrHex: (v: string) => boolean;
|
|
136
|
+
/** regex source for one colour token inside `[...]`: `#hex`, `rgb(…)`, `hsl(…)` or a word */
|
|
137
|
+
declare const COLOR_TOKEN: string;
|
|
138
|
+
/** Resolve a colour value: tone names (`blue`, `blue-500`) or any CSS colour. */
|
|
139
|
+
declare function resolveColor(v: string | undefined, theme: Theme, fallbackLevel: Level): string | undefined;
|
|
110
140
|
/**
|
|
111
141
|
* True when a value can sit inside an SVG attribute or a style rule as is:
|
|
112
142
|
* any CSS colour or font list passes, quotes, angle brackets, `;`, braces,
|
|
@@ -138,10 +168,22 @@ interface InkColors {
|
|
|
138
168
|
sub: string;
|
|
139
169
|
stroke: string;
|
|
140
170
|
}
|
|
171
|
+
/** the theme's node ink, with an optional text and line colour */
|
|
172
|
+
declare const nodeInk: (theme: Theme, text?: string, stroke?: string) => InkColors;
|
|
141
173
|
/** Split one line of text into styled segments. */
|
|
142
174
|
declare function parseInline(s: string): Seg[];
|
|
175
|
+
/** the text without markup */
|
|
176
|
+
declare const plain: (segs: Seg[]) => string;
|
|
177
|
+
declare const esc: (s: string) => string;
|
|
178
|
+
declare const f: (n: number) => string;
|
|
179
|
+
/** a single-line `<text>` centred vertically on `y` */
|
|
180
|
+
declare const textEl: (x: number, y: number, fs: number, fill: string, body: string, extra?: string) => string;
|
|
181
|
+
/** resolve a tone or CSS colour for marks drawn on top of an element */
|
|
182
|
+
declare const inkColor: (c: string | undefined, theme: Theme, fallback: string) => string;
|
|
143
183
|
/** Measure segments (stores each width on the segment) and return the total. */
|
|
144
184
|
declare function segsW(segs: Seg[], fs: number, mono: boolean, m: Measure, weight?: number): number;
|
|
185
|
+
/** total of the widths stored by segsW */
|
|
186
|
+
declare const sumW: (segs: Seg[]) => number;
|
|
145
187
|
/** Draw measured segments left to right from x, centred on cy. */
|
|
146
188
|
declare function renderSegs(segs: Seg[], x: number, cy: number, fs: number, col: InkColors, theme: Theme, muted?: boolean, weight?: number): string;
|
|
147
189
|
/**
|
|
@@ -161,6 +203,16 @@ interface ShapeKind {
|
|
|
161
203
|
};
|
|
162
204
|
/** extra strokes drawn over the fill (a lid, a fold) */
|
|
163
205
|
detail?(b: Box): string | null;
|
|
206
|
+
/** other names accepted by `shape` (`db` for `cylinder`) */
|
|
207
|
+
aliases?: string[];
|
|
208
|
+
/** moves the label down (px) inside the outline, e.g. below a cylinder's lid */
|
|
209
|
+
textOffset?: number;
|
|
210
|
+
/**
|
|
211
|
+
* where an edge meets the outline on `side`; `t` in [-1, 1] slides along
|
|
212
|
+
* that side. Defaults to the bounding box; `portOn` builds one for other
|
|
213
|
+
* outlines.
|
|
214
|
+
*/
|
|
215
|
+
port?(b: Box, side: Side, t: number): Point;
|
|
164
216
|
}
|
|
165
217
|
/** An edge end marker: `[head: cross]`, `[tail: crow]` */
|
|
166
218
|
interface MarkerKind {
|
|
@@ -178,8 +230,8 @@ interface MarkerKind {
|
|
|
178
230
|
inset?: number | ((size: number, width: number) => number);
|
|
179
231
|
}
|
|
180
232
|
/**
|
|
181
|
-
* An edge end marker with its tip at `at`, pointing along `angle`:
|
|
182
|
-
*
|
|
233
|
+
* An edge end marker with its tip at `at`, pointing along `angle`: any
|
|
234
|
+
* registered marker (the built-in ones come from the `markers` plugin). `L` is its length; graph
|
|
183
235
|
* edges size it from the stroke width, panels pass their own.
|
|
184
236
|
*/
|
|
185
237
|
declare function renderHead(at: Point, angle: number, kind: string, color: string, w: number, L?: number): string;
|
|
@@ -675,6 +727,8 @@ interface PanelDecl {
|
|
|
675
727
|
body: string[];
|
|
676
728
|
/** what the panel plugin's `parse` returned */
|
|
677
729
|
data: unknown;
|
|
730
|
+
/** its `parse` threw: the panel is drawn empty and its kind is not asked again */
|
|
731
|
+
failed?: true;
|
|
678
732
|
/** 0-based line range of the block, absent when imported */
|
|
679
733
|
lines?: [number, number];
|
|
680
734
|
/** where the header's `[...]` props sit, for editors */
|
|
@@ -938,221 +992,52 @@ declare const onlyColor: (p: Props) => boolean;
|
|
|
938
992
|
*/
|
|
939
993
|
declare function setLineProp(line: string, head: RegExp, name: string, value: string | null, accept?: (p: Props) => boolean): string;
|
|
940
994
|
declare function serializeProps(props: Props): string;
|
|
995
|
+
declare const unquote: (s: string) => string;
|
|
941
996
|
declare function parse(source: string, opts?: ParseOptions): Diagram;
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
interactive?: boolean;
|
|
947
|
-
/** fixed width attribute; default is the natural size */
|
|
948
|
-
width?: number | string;
|
|
949
|
-
/** drop the background rect */
|
|
950
|
-
transparent?: boolean;
|
|
951
|
-
/** text measuring for panels; the same one layout used */
|
|
952
|
-
measure?: Measure;
|
|
953
|
-
/** draw a dot every n units, from the origin: shows an editor's snap grid */
|
|
954
|
-
snapGrid?: number;
|
|
955
|
-
}
|
|
956
|
-
/** the SVG for a laid out diagram; a plugin that throws becomes a diagnostic on `d` */
|
|
957
|
-
declare function renderSvg(d: Diagram, L: Layout, opts?: RenderOptions): string;
|
|
958
|
-
type Scalar = string | number | boolean;
|
|
959
|
-
type PropBag = Record<string, unknown>;
|
|
960
|
-
interface DiagramJSON {
|
|
961
|
-
title?: string;
|
|
962
|
-
direction?: "right" | "down" | "left" | "up";
|
|
963
|
-
theme?: string;
|
|
964
|
-
settings?: Record<string, Scalar>;
|
|
965
|
-
classes?: Record<string, Record<string, Scalar>>;
|
|
966
|
-
groups?: ({
|
|
967
|
-
id: string;
|
|
968
|
-
label?: string;
|
|
969
|
-
parent?: string;
|
|
970
|
-
class?: string | string[];
|
|
971
|
-
} & PropBag)[];
|
|
972
|
-
nodes?: ({
|
|
973
|
-
id: string;
|
|
974
|
-
label?: string;
|
|
975
|
-
group?: string;
|
|
976
|
-
class?: string | string[];
|
|
977
|
-
body?: string | string[];
|
|
978
|
-
} & PropBag)[];
|
|
979
|
-
edges?: ({
|
|
980
|
-
from: string | string[];
|
|
981
|
-
to: string | string[];
|
|
982
|
-
label?: string;
|
|
983
|
-
arrow?: string;
|
|
984
|
-
class?: string | string[];
|
|
985
|
-
} & PropBag)[];
|
|
986
|
-
}
|
|
987
|
-
interface JsonResult {
|
|
988
|
-
source: string;
|
|
989
|
-
errors: string[];
|
|
990
|
-
}
|
|
991
|
-
declare function fromJSON(input: DiagramJSON | string): JsonResult;
|
|
997
|
+
/**
|
|
998
|
+
* The registered node shapes, in registration order. The built-in ones come
|
|
999
|
+
* from the `shapes` plugin; `use()` adds every plugin's shapes here.
|
|
1000
|
+
*/
|
|
992
1001
|
declare const SHAPES: ShapeName[];
|
|
1002
|
+
declare function normalizeShape(s: string | undefined): ShapeName;
|
|
1003
|
+
/** SVG path data for the outline of a shape; a rounded box when no plugin registered it. */
|
|
1004
|
+
declare function shapePath(shape: ShapeName, b: Box, radius: number): string;
|
|
1005
|
+
declare function rectPath(x: number, y: number, w: number, h: number, r: number): string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Point on the outline of a box for a port on `side`. `t` in [-1, 1] slides
|
|
1008
|
+
* the port along that side (0 = centre); `spread` is how much of the side can
|
|
1009
|
+
* host ports (fraction of its half-length). `depth(horiz, rel, u)` gives the
|
|
1010
|
+
* distance from the centre to the outline, for outlines that are not a box:
|
|
1011
|
+
* `horiz` is true on the top and bottom sides, `rel` the scaled position along
|
|
1012
|
+
* the side and `u` the offset in px.
|
|
1013
|
+
*/
|
|
1014
|
+
declare function portOn(b: Box, side: Side, t: number, spread?: number, depth?: (horiz: boolean, rel: number, u: number) => number): Point;
|
|
1015
|
+
declare const num: (v: string | undefined, d: number) => number;
|
|
993
1016
|
/**
|
|
994
1017
|
* The line style props ask for: `key` (`style` on edges, `border-style` on
|
|
995
1018
|
* boxes) wins over the `dashed` / `dotted` shorthand flags. Undefined when
|
|
996
1019
|
* nothing is set, so the caller's default applies.
|
|
997
1020
|
*/
|
|
998
1021
|
declare function lineStyle(p: Props, key?: string): LineStyle$1 | undefined;
|
|
999
|
-
/** the `stroke-dasharray` of a line style at a stroke width; null for solid */
|
|
1000
|
-
declare function dashFor(style: string | undefined, width: number): string | null;
|
|
1001
|
-
/** Serialise layout overrides as a `layout { ... }` block (without trailing newline). */
|
|
1002
|
-
declare function formatLayout(o: LayoutOverrides): string;
|
|
1003
|
-
/** Replace (or append, or remove) the layout block. */
|
|
1004
|
-
declare function writeLayout(source: string, o: LayoutOverrides, d?: Diagram): string;
|
|
1005
|
-
type Target = {
|
|
1006
|
-
kind: "node" | "edge" | "group" | "panel";
|
|
1007
|
-
id: string;
|
|
1008
|
-
};
|
|
1009
|
-
/**
|
|
1010
|
-
* Set or remove (text = '') the label of a node, edge, group or panel.
|
|
1011
|
-
* Node, group and panel labels are written quoted; edge labels stay bare when
|
|
1012
|
-
* they can. Every edge of one statement (`a -> b, c: label`) shares the label.
|
|
1013
|
-
*/
|
|
1014
|
-
declare function setLabel(source: string, target: Target, text: string, d?: Diagram): string;
|
|
1015
|
-
/**
|
|
1016
|
-
* Set (value = string) or remove (value = null) one prop on a node, edge, group
|
|
1017
|
-
* or panel header.
|
|
1018
|
-
* Implicit nodes (only mentioned in edges) get a declaration line appended.
|
|
1019
|
-
*/
|
|
1020
|
-
declare function setProp(source: string, target: Target, key: string, value: string | null, d?: Diagram): string;
|
|
1021
|
-
/** Set or remove a top-level `key: value` setting. */
|
|
1022
|
-
declare function setSetting(source: string, key: string, value: string | null): string;
|
|
1023
|
-
/**
|
|
1024
|
-
* Colour one part of a panel (a participant, message, event, bar, branch, …).
|
|
1025
|
-
* `tone` is a tone name or `#hex`; null removes the colour. Returns the source
|
|
1026
|
-
* unchanged when the panel or part cannot be edited in place.
|
|
1027
|
-
*/
|
|
1028
|
-
declare function setPartTone(source: string, panelId: string, partId: string, tone: string | null, d?: Diagram): string;
|
|
1029
1022
|
/**
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
* when the part moves or is renamed); the source comes back unchanged when
|
|
1033
|
-
* the edit does not apply.
|
|
1023
|
+
* `edge-width` when written, else undefined: for a panel whose lines are
|
|
1024
|
+
* thinner than the theme's edges unless the author asks for more
|
|
1034
1025
|
*/
|
|
1035
|
-
declare function
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
kind: "comment" | "fence";
|
|
1046
|
-
/** line range [start, end] (inclusive) of the block itself */
|
|
1047
|
-
start: number;
|
|
1048
|
-
end: number;
|
|
1049
|
-
/** line range of the generated image reference, if present */
|
|
1050
|
-
image?: [number, number];
|
|
1051
|
-
}
|
|
1052
|
-
interface MdOptions {
|
|
1053
|
-
/** directory for SVGs, relative to the markdown file (default "diagrams") */
|
|
1054
|
-
outDir?: string;
|
|
1055
|
-
/** used to name unnamed blocks: <baseName>-<n> */
|
|
1056
|
-
baseName?: string;
|
|
1057
|
-
/** also write a dark variant and emit a <picture> element */
|
|
1058
|
-
dark?: boolean;
|
|
1059
|
-
/** keep ```yuhwa fences instead of converting them to comments */
|
|
1060
|
-
keepFences?: boolean;
|
|
1061
|
-
/** reads `import "..."` targets, see Options.resolve */
|
|
1062
|
-
resolve?: (path: string) => string | undefined;
|
|
1063
|
-
/** path of the markdown file; imports in blocks resolve against its folder */
|
|
1064
|
-
file?: string;
|
|
1065
|
-
/**
|
|
1066
|
-
* Link each image to this URL, such as a page that pans and zooms the
|
|
1067
|
-
* diagram (`yuhwa md --view`). Gets the block's source.
|
|
1068
|
-
*/
|
|
1069
|
-
view?: (source: string) => string;
|
|
1070
|
-
}
|
|
1071
|
-
interface MdResult {
|
|
1072
|
-
markdown: string;
|
|
1073
|
-
files: {
|
|
1074
|
-
path: string;
|
|
1075
|
-
svg: string;
|
|
1076
|
-
}[];
|
|
1077
|
-
blocks: MdBlock[];
|
|
1078
|
-
diagnostics: {
|
|
1079
|
-
block: string;
|
|
1080
|
-
line: number;
|
|
1081
|
-
message: string;
|
|
1082
|
-
severity: string;
|
|
1083
|
-
}[];
|
|
1084
|
-
}
|
|
1085
|
-
declare function findBlocks(md: string, baseName?: string, outDir?: string): MdBlock[];
|
|
1086
|
-
declare function processMarkdown(md: string, opts?: MdOptions): MdResult;
|
|
1087
|
-
/** Replace the source of block `index` in a markdown document. */
|
|
1088
|
-
declare function replaceBlockSource(md: string, index: number, source: string): string;
|
|
1089
|
-
interface ConvertResult {
|
|
1090
|
-
source: string;
|
|
1091
|
-
warnings: {
|
|
1092
|
-
line: number;
|
|
1093
|
-
message: string;
|
|
1094
|
-
}[];
|
|
1095
|
-
}
|
|
1096
|
-
/** true when the source is Mermaid that yuhwa converts (a flowchart or one of the types above) */
|
|
1097
|
-
declare function isMermaid(source: string): boolean;
|
|
1098
|
-
declare function fromMermaid(source: string): ConvertResult;
|
|
1099
|
-
declare const NODE_PROPS: string[];
|
|
1100
|
-
declare const EDGE_PROPS: string[];
|
|
1101
|
-
declare const GROUP_PROPS: string[];
|
|
1102
|
-
/** frame props every panel takes, next to the plugin's own */
|
|
1103
|
-
declare const PANEL_PROPS: string[];
|
|
1104
|
-
/** allowed values for enum-like props */
|
|
1105
|
-
declare const ENUMS: Record<string, string[]>;
|
|
1106
|
-
/** props whose value must be a colour (or `none`/`transparent`), on nodes, edges, groups and panels */
|
|
1107
|
-
declare const COLORS: string[];
|
|
1108
|
-
declare const BOOLS: string[];
|
|
1109
|
-
declare const NUMBERS: string[];
|
|
1110
|
-
/** a panel kind's typed header props, looked up by kind name */
|
|
1111
|
-
type PanelOptions = (kind: string) => Record<string, PanelOption> | undefined;
|
|
1112
|
-
declare function lint(d: Diagram, panelOptions?: PanelOptions): void;
|
|
1113
|
-
declare const GUIDE: string;
|
|
1114
|
-
declare const themes: YuhwaPlugin;
|
|
1115
|
-
declare const charts: YuhwaPlugin;
|
|
1116
|
-
declare const tables: YuhwaPlugin;
|
|
1117
|
-
declare const frames: YuhwaPlugin;
|
|
1118
|
-
declare const footer: YuhwaPlugin;
|
|
1119
|
-
declare const legend: YuhwaPlugin;
|
|
1120
|
-
declare const sequence: YuhwaPlugin;
|
|
1121
|
-
declare const timeline: YuhwaPlugin;
|
|
1122
|
-
declare const chart: YuhwaPlugin;
|
|
1123
|
-
declare const git: YuhwaPlugin;
|
|
1124
|
-
declare const builtins: YuhwaPlugin[];
|
|
1125
|
-
interface Options extends LayoutOptions, RenderOptions {
|
|
1126
|
-
/**
|
|
1127
|
-
* Reads files named by `import "..."`: gets the resolved path, returns the
|
|
1128
|
-
* source or undefined. In Node: `(p) => readFileSync(p, 'utf8')`.
|
|
1129
|
-
*/
|
|
1130
|
-
resolve?: ParseOptions["resolve"];
|
|
1131
|
-
/** path of the source being rendered; relative imports resolve against it */
|
|
1132
|
-
file?: string;
|
|
1133
|
-
}
|
|
1134
|
-
interface Result {
|
|
1135
|
-
svg: string;
|
|
1136
|
-
/** yuhwa source that was rendered (converted when the input was Mermaid or JSON) */
|
|
1137
|
-
source: string;
|
|
1138
|
-
/** what the input was detected as */
|
|
1139
|
-
format: InputFormat;
|
|
1140
|
-
diagram: Diagram;
|
|
1141
|
-
layout: Layout;
|
|
1142
|
-
diagnostics: Diagnostic[];
|
|
1143
|
-
}
|
|
1144
|
-
type InputFormat = "yuhwa" | "mermaid" | "json";
|
|
1145
|
-
/** Stable short hash, used for deterministic SVG ids. */
|
|
1146
|
-
declare function hash(s: string): string;
|
|
1026
|
+
declare function edgeWidthOf(p: Props): number | undefined;
|
|
1027
|
+
/** a positive number, else undefined */
|
|
1028
|
+
declare const posNum: (v: string | undefined) => number | undefined;
|
|
1029
|
+
declare function effectiveProps(d: Diagram, decl: {
|
|
1030
|
+
props: Props;
|
|
1031
|
+
classes?: string[];
|
|
1032
|
+
}): Props;
|
|
1033
|
+
/** the `stroke-dasharray` of a line style at a stroke width; null for solid */
|
|
1034
|
+
declare function dashFor(style: string | undefined, width: number): string | null;
|
|
1035
|
+
declare function resolveNodeStyle(d: Diagram, n: NodeDecl, p: Props, theme: Theme): ResolvedNodeStyle;
|
|
1147
1036
|
/**
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1037
|
+
* `o` without a prototype: a lookup by a name from the source (`theme:
|
|
1038
|
+
* constructor`, `$toString`) then finds only the table's own keys.
|
|
1150
1039
|
*/
|
|
1151
|
-
declare
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
};
|
|
1156
|
-
/** Parse, lay out and render a diagram to an SVG string. Never throws on bad input. */
|
|
1157
|
-
declare function render(input: string | DiagramJSON, opts?: Options): Result;
|
|
1158
|
-
export { LexedLine as $, FrameKind as $t, isMermaid as A, ThemeInput as An, LaidPanel as At, setPartTone as B, canvasMeasure as Bn, PartChange as Bt, GROUP_PROPS as C, LineStyle$1 as Cn, EdgeOverride as Ct, lint as D, THEME_NAMES as Dn, LaidEdge as Dt, PANEL_PROPS as E, THEME_KEYS as En, LabelRef as Et, processMarkdown as F, isToneOrHex as Fn, PanelDecl as Ft, dashFor as G, ResolvedNodeStyle as Gt, setSetting as H, Point as Ht, replaceBlockSource as I, ramp as In, PanelHandle as It, DiagramJSON as J, SourceRef as Jt, lineStyle as K, ShapeName as Kt, editPart as L, registerTheme as Ln, PanelOverride as Lt, MdOptions as M, getTheme as Mn, LayoutOverrides as Mt, MdResult as N, isSafeCss as Nn, NodeDecl as Nt, ConvertResult as O, TONES as On, LaidGroup as Ot, findBlocks as P, isSafeLink as Pn, NodeOverride as Pt, KNOWN_SETTINGS as Q, Decoration as Qt, formatLayout as R, themeNames as Rn, PanelPart as Rt, ENUMS as S, tspans as Sn, EdgeDecl as St, NUMBERS as T, THEMES as Tn, HeadKind as Tt, writeLayout as U, Props as Ut, setProp as V, PartEdit as Vt, writePanelDrag as W, ResolvedEdgeStyle as Wt, fromJSON as X, groupPath as Xt, JsonResult as Y, GRID as Yt, renderSvg as Z, layout as Zt, themes as _, InkColors as _n, Component as _t, render as a, RowPaint as an, blockBraces as at, COLORS as b, renderSegs as bn, Diagram as bt, git as c, optionKind as cn, lex as ct, sequence as d, registry as dn, parseProps as dt, PanelCtx as en, PANELS as et, legend as f, unuse as fn, serializeProps as ft, charts as g, renderHead as gn, Box as gt, tables as h, ShapeKind as hn, splitTrailingProps as ht, hash as i, RowKind as in, TokKind as it, MdBlock as j, createTheme as jn, Layout as jt, fromMermaid as k, Theme as kn, LaidNode as kt, chart as l, perPass as ln, onlyColor as lt, frames as m, MarkerKind as mn, setTrailingProp as mt, Options as n, PanelOption as nn, SETTING_VALUES as nt, toSource as o, StatementKind as on, isYuhwaPath as ot, footer as p, use as pn, setLineProp as pt, SHAPES as q, Side as qt, Result as r, RowCtx as rn, Tok as rt, builtins as s, YuhwaPlugin as sn, joinPath as st, InputFormat as t, PanelKind as tn, ParseOptions as tt, timeline as u, recolor as un, parse as ut, GUIDE as v, Seg as vn, Curve as vt, NODE_PROPS as w, RAMPS as wn, GroupDecl as wt, EDGE_PROPS as x, segsW as xn, Direction as xt, BOOLS as y, parseInline as yn, Diagnostic as yt, setLabel as z, approxMeasure as zn, PartAction as zt };
|
|
1040
|
+
declare const table: <T>(o: Record<string, T>) => Record<string, T>;
|
|
1041
|
+
/** `p` as it is, typed: no annotation needed for the kinds inside */
|
|
1042
|
+
declare const definePlugin: <P extends YuhwaPlugin>(p: P) => P;
|
|
1043
|
+
export { PanelDecl as $, SANS as $t, setLineProp as A, registry as At, EdgeDecl as B, inkColor as Bt, isYuhwaPath as C, canvasMeasure as Cn, RowKind as Ct, parse as D, optionKind as Dt, onlyColor as E, YuhwaPlugin as Et, Component as F, renderHead as Ft, LaidEdge as G, segsW as Gt, GroupDecl as H, parseInline as Ht, Curve as I, InkColors as It, LaidPanel as J, tspans as Jt, LaidGroup as K, sumW as Kt, Diagnostic as L, Seg as Lt, splitTrailingProps as M, use as Mt, unquote as N, MarkerKind as Nt, parseProps as O, perPass as Ot, Box as P, ShapeKind as Pt, NodeOverride as Q, RAMPS as Qt, Diagram as R, esc as Rt, blockBraces as S, approxMeasure as Sn, RowCtx as St, lex as T, StatementKind as Tt, HeadKind as U, plain as Ut, EdgeOverride as V, nodeInk as Vt, LabelRef as W, renderSegs as Wt, LayoutOverrides as X, LineStyle$1 as Xt, Layout as Y, COLOR_TOKEN as Yt, NodeDecl as Z, MONO as Zt, PANELS as _, ramp as _n, Decoration as _t, effectiveProps as a, ThemeInput as an, PartEdit as at, Tok as b, themeNames as bn, PanelKind as bt, posNum as c, cssHex as cn, ResolvedEdgeStyle as ct, normalizeShape as d, getTheme as dn, Side as dt, THEMES as en, PanelHandle as et, portOn as f, isColor as fn, SourceRef as ft, LexedLine as g, isToneOrHex as gn, layout as gt, KNOWN_SETTINGS as h, isSafeLink as hn, groupPath as ht, edgeWidthOf as i, Theme as in, PartChange as it, setTrailingProp as j, unuse as jt, serializeProps as k, recolor as kt, resolveNodeStyle as l, fontFamilies as ln, ResolvedNodeStyle as lt, shapePath as m, isSafeCss as mn, LayoutOptions as mt, table as n, THEME_NAMES as nn, PanelPart as nt, lineStyle as o, bool as on, Point as ot, rectPath as p, isGenericFont as pn, GRID as pt, LaidNode as q, textEl as qt, dashFor as r, TONES as rn, PartAction as rt, num as s, createTheme as sn, Props as st, definePlugin as t, THEME_KEYS as tn, PanelOverride as tt, SHAPES as u, fontStack as un, ShapeName as ut, ParseOptions as v, registerTheme as vn, FrameKind as vt, joinPath as w, RowPaint as wt, TokKind as x, Measure as xn, PanelOption as xt, SETTING_VALUES as y, resolveColor as yn, PanelCtx as yt, Direction as z, f as zt };
|