yuhwa 1.2.0 → 1.3.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/dist/astro.d.ts +1 -1
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +3 -2
- package/dist/cli.js +1 -1
- package/dist/editor/assets/index-DAk6b1UB.js +689 -0
- package/dist/editor/assets/{lsp.worker-sZtzIA6-.js → lsp.worker-CMSpDTsX.js} +17 -17
- package/dist/editor/index.html +1 -1
- package/dist/{figure-CA2hy0xh.d.ts → figure-QAwSU1Ry.d.ts} +1 -1
- package/dist/index-6ZPJGThY.d.ts +216 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/ironmark.d.ts +1 -1
- package/dist/ironmark.js +1 -1
- package/dist/lsp-browser.js +1 -1
- package/dist/lsp-node.js +2 -2
- package/dist/lsp-server.js +1 -1
- package/dist/lsp.js +1 -1
- package/dist/markdown-it.d.ts +1 -1
- package/dist/markdown-it.js +1 -1
- package/dist/{node-Bzn2uKXZ.js → node-CLu2Pp_2.js} +2 -1
- package/dist/plugin-Bs4eiAuz.js +4166 -0
- package/dist/{index-CnnoZYl0.d.ts → plugin-NSkNyoUj.d.ts} +79 -208
- package/dist/plugin.d.ts +12 -0
- package/dist/plugin.js +1 -0
- package/dist/remark.d.ts +1 -1
- package/dist/remark.js +1 -1
- package/dist/{server-Dxo7OG8K.js → server-D6BSNC1P.js} +1 -1
- package/dist/{service-B1fpOg_L.js → service-D7DNWBAU.js} +3 -2
- package/dist/{shared-Ddw88O9D.js → shared-6aCU_HaV.js} +489 -401
- package/dist/{src-DkQj7aIV.js → src-BjOhvTAB.js} +440 -4512
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -2
- package/dist/vuepress.d.ts +1 -1
- package/dist/yuhwa.iife.js +53 -53
- package/package.json +6 -1
- package/dist/editor/assets/index-BphHLTvA.js +0 -689
package/dist/editor/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
rel="icon"
|
|
10
10
|
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%232563eb'/%3E%3Cstop offset='1' stop-color='%239333ea'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='15' fill='url%28%23g%29'/%3E%3Crect x='9' y='11' width='26' height='17' rx='5' fill='%23fff'/%3E%3Cpath d='M15 17.5h10M15 22h14' stroke='%237c3aed' stroke-opacity='.35' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M18 28v5a11 11 0 0 0 11 11h1' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='m29 38 6 6-6 6' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='38' y='36' width='17' height='16' rx='5' fill='%23fff' fill-opacity='.9'/%3E%3C/svg%3E"
|
|
11
11
|
/>
|
|
12
|
-
<script type="module" crossorigin src="./assets/index-
|
|
12
|
+
<script type="module" crossorigin src="./assets/index-DAk6b1UB.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="./assets/index-DaWl0OPj.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { Et as YuhwaPlugin, L as Diagnostic, R as Diagram, X as LayoutOverrides, Y as Layout, at as PartEdit, et as PanelHandle, mt as LayoutOptions, v as ParseOptions, vn as Measure, xt as PanelOption } from "./plugin-NSkNyoUj.js";
|
|
2
|
+
interface RenderOptions {
|
|
3
|
+
/** prefix for ids inside the SVG, so several diagrams can live on one page */
|
|
4
|
+
idPrefix?: string;
|
|
5
|
+
/** add invisible wide strokes on edges and data attributes for editors */
|
|
6
|
+
interactive?: boolean;
|
|
7
|
+
/** fixed width attribute; default is the natural size */
|
|
8
|
+
width?: number | string;
|
|
9
|
+
/** drop the background rect */
|
|
10
|
+
transparent?: boolean;
|
|
11
|
+
/** text measuring for panels; the same one layout used */
|
|
12
|
+
measure?: Measure;
|
|
13
|
+
/** draw a dot every n units, from the origin: shows an editor's snap grid */
|
|
14
|
+
snapGrid?: number;
|
|
15
|
+
}
|
|
16
|
+
/** the SVG for a laid out diagram; a plugin that throws becomes a diagnostic on `d` */
|
|
17
|
+
declare function renderSvg(d: Diagram, L: Layout, opts?: RenderOptions): string;
|
|
18
|
+
type Scalar = string | number | boolean;
|
|
19
|
+
type PropBag = Record<string, unknown>;
|
|
20
|
+
interface DiagramJSON {
|
|
21
|
+
title?: string;
|
|
22
|
+
direction?: "right" | "down" | "left" | "up";
|
|
23
|
+
theme?: string;
|
|
24
|
+
settings?: Record<string, Scalar>;
|
|
25
|
+
classes?: Record<string, Record<string, Scalar>>;
|
|
26
|
+
groups?: ({
|
|
27
|
+
id: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
parent?: string;
|
|
30
|
+
class?: string | string[];
|
|
31
|
+
} & PropBag)[];
|
|
32
|
+
nodes?: ({
|
|
33
|
+
id: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
group?: string;
|
|
36
|
+
class?: string | string[];
|
|
37
|
+
body?: string | string[];
|
|
38
|
+
} & PropBag)[];
|
|
39
|
+
edges?: ({
|
|
40
|
+
from: string | string[];
|
|
41
|
+
to: string | string[];
|
|
42
|
+
label?: string;
|
|
43
|
+
arrow?: string;
|
|
44
|
+
class?: string | string[];
|
|
45
|
+
} & PropBag)[];
|
|
46
|
+
}
|
|
47
|
+
interface JsonResult {
|
|
48
|
+
source: string;
|
|
49
|
+
errors: string[];
|
|
50
|
+
}
|
|
51
|
+
declare function fromJSON(input: DiagramJSON | string): JsonResult;
|
|
52
|
+
/** Serialise layout overrides as a `layout { ... }` block (without trailing newline). */
|
|
53
|
+
declare function formatLayout(o: LayoutOverrides): string;
|
|
54
|
+
/** Replace (or append, or remove) the layout block. */
|
|
55
|
+
declare function writeLayout(source: string, o: LayoutOverrides, d?: Diagram): string;
|
|
56
|
+
type Target = {
|
|
57
|
+
kind: "node" | "edge" | "group" | "panel";
|
|
58
|
+
id: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Set or remove (text = '') the label of a node, edge, group or panel.
|
|
62
|
+
* Node, group and panel labels are written quoted; edge labels stay bare when
|
|
63
|
+
* they can. Every edge of one statement (`a -> b, c: label`) shares the label.
|
|
64
|
+
*/
|
|
65
|
+
declare function setLabel(source: string, target: Target, text: string, d?: Diagram): string;
|
|
66
|
+
/**
|
|
67
|
+
* Set (value = string) or remove (value = null) one prop on a node, edge, group
|
|
68
|
+
* or panel header.
|
|
69
|
+
* Implicit nodes (only mentioned in edges) get a declaration line appended.
|
|
70
|
+
*/
|
|
71
|
+
declare function setProp(source: string, target: Target, key: string, value: string | null, d?: Diagram): string;
|
|
72
|
+
/** Set or remove a top-level `key: value` setting. */
|
|
73
|
+
declare function setSetting(source: string, key: string, value: string | null): string;
|
|
74
|
+
/**
|
|
75
|
+
* Colour one part of a panel (a participant, message, event, bar, branch, …).
|
|
76
|
+
* `tone` is a tone name or `#hex`; null removes the colour. Returns the source
|
|
77
|
+
* unchanged when the panel or part cannot be edited in place.
|
|
78
|
+
*/
|
|
79
|
+
declare function setPartTone(source: string, panelId: string, partId: string, tone: string | null, d?: Diagram): string;
|
|
80
|
+
/**
|
|
81
|
+
* Apply one part edit (set a field, move, add, remove) through the panel
|
|
82
|
+
* kind's `editPart`. `id` is the edited part's id afterwards (it can change
|
|
83
|
+
* when the part moves or is renamed); the source comes back unchanged when
|
|
84
|
+
* the edit does not apply.
|
|
85
|
+
*/
|
|
86
|
+
declare function editPart(source: string, panelId: string, edit: PartEdit, d?: Diagram): {
|
|
87
|
+
source: string;
|
|
88
|
+
id?: string;
|
|
89
|
+
};
|
|
90
|
+
/** Finish a panel drag. Prefer the declaration; a purely visual handle uses layout. */
|
|
91
|
+
declare function writePanelDrag(source: string, d: Diagram, id: string, handle: PanelHandle): string;
|
|
92
|
+
interface MdBlock {
|
|
93
|
+
index: number;
|
|
94
|
+
name: string;
|
|
95
|
+
source: string;
|
|
96
|
+
kind: "comment" | "fence";
|
|
97
|
+
/** line range [start, end] (inclusive) of the block itself */
|
|
98
|
+
start: number;
|
|
99
|
+
end: number;
|
|
100
|
+
/** line range of the generated image reference, if present */
|
|
101
|
+
image?: [number, number];
|
|
102
|
+
}
|
|
103
|
+
interface MdOptions {
|
|
104
|
+
/** directory for SVGs, relative to the markdown file (default "diagrams") */
|
|
105
|
+
outDir?: string;
|
|
106
|
+
/** used to name unnamed blocks: <baseName>-<n> */
|
|
107
|
+
baseName?: string;
|
|
108
|
+
/** also write a dark variant and emit a <picture> element */
|
|
109
|
+
dark?: boolean;
|
|
110
|
+
/** keep ```yuhwa fences instead of converting them to comments */
|
|
111
|
+
keepFences?: boolean;
|
|
112
|
+
/** reads `import "..."` targets, see Options.resolve */
|
|
113
|
+
resolve?: (path: string) => string | undefined;
|
|
114
|
+
/** path of the markdown file; imports in blocks resolve against its folder */
|
|
115
|
+
file?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Link each image to this URL, such as a page that pans and zooms the
|
|
118
|
+
* diagram (`yuhwa md --view`). Gets the block's source.
|
|
119
|
+
*/
|
|
120
|
+
view?: (source: string) => string;
|
|
121
|
+
}
|
|
122
|
+
interface MdResult {
|
|
123
|
+
markdown: string;
|
|
124
|
+
files: {
|
|
125
|
+
path: string;
|
|
126
|
+
svg: string;
|
|
127
|
+
}[];
|
|
128
|
+
blocks: MdBlock[];
|
|
129
|
+
diagnostics: {
|
|
130
|
+
block: string;
|
|
131
|
+
line: number;
|
|
132
|
+
message: string;
|
|
133
|
+
severity: string;
|
|
134
|
+
}[];
|
|
135
|
+
}
|
|
136
|
+
declare function findBlocks(md: string, baseName?: string, outDir?: string): MdBlock[];
|
|
137
|
+
declare function processMarkdown(md: string, opts?: MdOptions): MdResult;
|
|
138
|
+
/** Replace the source of block `index` in a markdown document. */
|
|
139
|
+
declare function replaceBlockSource(md: string, index: number, source: string): string;
|
|
140
|
+
interface ConvertResult {
|
|
141
|
+
source: string;
|
|
142
|
+
warnings: {
|
|
143
|
+
line: number;
|
|
144
|
+
message: string;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
/** true when the source is Mermaid that yuhwa converts (a flowchart or one of the types above) */
|
|
148
|
+
declare function isMermaid(source: string): boolean;
|
|
149
|
+
declare function fromMermaid(source: string): ConvertResult;
|
|
150
|
+
declare const NODE_PROPS: string[];
|
|
151
|
+
declare const EDGE_PROPS: string[];
|
|
152
|
+
declare const GROUP_PROPS: string[];
|
|
153
|
+
/** frame props every panel takes, next to the plugin's own */
|
|
154
|
+
declare const PANEL_PROPS: string[];
|
|
155
|
+
/** allowed values for enum-like props */
|
|
156
|
+
declare const ENUMS: Record<string, string[]>;
|
|
157
|
+
/** props whose value must be a colour (or `none`/`transparent`), on nodes, edges, groups and panels */
|
|
158
|
+
declare const COLORS: string[];
|
|
159
|
+
declare const BOOLS: string[];
|
|
160
|
+
declare const NUMBERS: string[];
|
|
161
|
+
/** a panel kind's typed header props, looked up by kind name */
|
|
162
|
+
type PanelOptions = (kind: string) => Record<string, PanelOption> | undefined;
|
|
163
|
+
declare function lint(d: Diagram, panelOptions?: PanelOptions): void;
|
|
164
|
+
declare const GUIDE: string;
|
|
165
|
+
declare const shapes: YuhwaPlugin;
|
|
166
|
+
declare const markers: YuhwaPlugin;
|
|
167
|
+
declare const themes: YuhwaPlugin;
|
|
168
|
+
declare const charts: YuhwaPlugin;
|
|
169
|
+
declare const tables: YuhwaPlugin;
|
|
170
|
+
declare const frames: YuhwaPlugin;
|
|
171
|
+
declare const footer: YuhwaPlugin;
|
|
172
|
+
declare const legend: YuhwaPlugin;
|
|
173
|
+
declare const sequence: YuhwaPlugin;
|
|
174
|
+
declare const timeline: YuhwaPlugin;
|
|
175
|
+
declare const chart: YuhwaPlugin;
|
|
176
|
+
declare const git: YuhwaPlugin;
|
|
177
|
+
declare const mindmap: YuhwaPlugin;
|
|
178
|
+
declare const gantt: YuhwaPlugin;
|
|
179
|
+
declare const quadrant: YuhwaPlugin;
|
|
180
|
+
declare const kanban: YuhwaPlugin;
|
|
181
|
+
declare const treeview: YuhwaPlugin;
|
|
182
|
+
declare const builtins: YuhwaPlugin[];
|
|
183
|
+
interface Options extends LayoutOptions, RenderOptions {
|
|
184
|
+
/**
|
|
185
|
+
* Reads files named by `import "..."`: gets the resolved path, returns the
|
|
186
|
+
* source or undefined. In Node: `(p) => readFileSync(p, 'utf8')`.
|
|
187
|
+
*/
|
|
188
|
+
resolve?: ParseOptions["resolve"];
|
|
189
|
+
/** path of the source being rendered; relative imports resolve against it */
|
|
190
|
+
file?: string;
|
|
191
|
+
}
|
|
192
|
+
interface Result {
|
|
193
|
+
svg: string;
|
|
194
|
+
/** yuhwa source that was rendered (converted when the input was Mermaid or JSON) */
|
|
195
|
+
source: string;
|
|
196
|
+
/** what the input was detected as */
|
|
197
|
+
format: InputFormat;
|
|
198
|
+
diagram: Diagram;
|
|
199
|
+
layout: Layout;
|
|
200
|
+
diagnostics: Diagnostic[];
|
|
201
|
+
}
|
|
202
|
+
type InputFormat = "yuhwa" | "mermaid" | "json";
|
|
203
|
+
/** Stable short hash, used for deterministic SVG ids. */
|
|
204
|
+
declare function hash(s: string): string;
|
|
205
|
+
/**
|
|
206
|
+
* Normalise any accepted input to yuhwa source.
|
|
207
|
+
* Accepts yuhwa text, a Mermaid flowchart, a JSON string or a DiagramJSON object.
|
|
208
|
+
*/
|
|
209
|
+
declare function toSource(input: string | DiagramJSON): {
|
|
210
|
+
source: string;
|
|
211
|
+
format: InputFormat;
|
|
212
|
+
diagnostics: Diagnostic[];
|
|
213
|
+
};
|
|
214
|
+
/** Parse, lay out and render a diagram to an SVG string. Never throws on bad input. */
|
|
215
|
+
declare function render(input: string | DiagramJSON, opts?: Options): Result;
|
|
216
|
+
export { JsonResult as $, GROUP_PROPS as A, MdResult as B, markers as C, COLORS as D, BOOLS as E, ConvertResult as F, formatLayout as G, processMarkdown as H, fromMermaid as I, setProp as J, setLabel as K, isMermaid as L, NUMBERS as M, PANEL_PROPS as N, EDGE_PROPS as O, lint as P, DiagramJSON as Q, MdBlock as R, themes as S, GUIDE as T, replaceBlockSource as U, findBlocks as V, editPart as W, writeLayout as X, setSetting as Y, writePanelDrag as Z, legend as _, render as a, tables as b, treeview as c, gantt as d, fromJSON as et, mindmap as f, sequence as g, timeline as h, hash as i, NODE_PROPS as j, ENUMS as k, kanban as l, chart as m, Options as n, toSource as o, git as p, setPartTone as q, Result as r, builtins as s, InputFormat as t, renderSvg as tt, quadrant as u, footer as v, shapes as w, charts as x, frames as y, MdOptions as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
|
|
1
|
+
import { $ as PanelDecl, A as setLineProp, At as registry, B as EdgeDecl, C as isYuhwaPath, Ct as RowKind, D as parse, Dt as optionKind, E as onlyColor, Et as YuhwaPlugin, F as Component, Ft as renderHead, G as LaidEdge, Gt as segsW, H as GroupDecl, Ht as parseInline, I as Curve, It as InkColors, J as LaidPanel, Jt as tspans, K as LaidGroup, L as Diagnostic, Lt as Seg, M as splitTrailingProps, Mt as use, Nt as MarkerKind, O as parseProps, Ot as perPass, P as Box, Pt as ShapeKind, Q as NodeOverride, Qt as RAMPS, R as Diagram, Rt as esc, S as blockBraces, St as RowCtx, T as lex, Tt as StatementKind, U as HeadKind, V as EdgeOverride, W as LabelRef, Wt as renderSegs, X as LayoutOverrides, Xt as LineStyle, Y as Layout, Z as NodeDecl, _ as PANELS, _n as themeNames, _t as Decoration, an as ThemeInput, at as PartEdit, b as Tok, bn as canvasMeasure, bt as PanelKind, ct as ResolvedEdgeStyle, dn as isSafeCss, dt as Side, en as THEMES, et as PanelHandle, f as portOn, fn as isSafeLink, ft as SourceRef, g as LexedLine, gt as layout, h as KNOWN_SETTINGS, hn as registerTheme, ht as groupPath, in as Theme, it as PartChange, j as setTrailingProp, jt as unuse, k as serializeProps, kt as recolor, ln as getTheme, lt as ResolvedNodeStyle, mn as ramp, nn as THEME_NAMES, nt as PanelPart, o as lineStyle, ot as Point, pn as isToneOrHex, pt as GRID, q as LaidNode, r as dashFor, rn as TONES, rt as PartAction, sn as createTheme, st as Props, tn as THEME_KEYS, tt as PanelOverride, u as SHAPES, ut as ShapeName, v as ParseOptions, vt as FrameKind, w as joinPath, wt as RowPaint, x as TokKind, xt as PanelOption, y as SETTING_VALUES, yn as approxMeasure, yt as PanelCtx, z as Direction } from "./plugin-NSkNyoUj.js";
|
|
2
|
+
import { $ as JsonResult, A as GROUP_PROPS, B as MdResult, C as markers, D as COLORS, E as BOOLS, F as ConvertResult, G as formatLayout, H as processMarkdown, I as fromMermaid, J as setProp, K as setLabel, L as isMermaid, M as NUMBERS, N as PANEL_PROPS, O as EDGE_PROPS, P as lint, Q as DiagramJSON, R as MdBlock, S as themes, T as GUIDE, U as replaceBlockSource, V as findBlocks, W as editPart, X as writeLayout, Y as setSetting, Z as writePanelDrag, _ as legend, a as render, b as tables, c as treeview, d as gantt, et as fromJSON, f as mindmap, g as sequence, h as timeline, i as hash, j as NODE_PROPS, k as ENUMS, l as kanban, m as chart, n as Options, o as toSource, p as git, q as setPartTone, r as Result, s as builtins, t as InputFormat, tt as renderSvg, u as quadrant, v as footer, w as shapes, x as charts, y as frames, z as MdOptions } from "./index-6ZPJGThY.js";
|
|
3
|
+
export { BOOLS, type Box, COLORS, type Component, type ConvertResult, type Curve, type Decoration, type Diagnostic, type Diagram, type DiagramJSON, type Direction, EDGE_PROPS, ENUMS, type EdgeDecl, type EdgeOverride, type FrameKind, GRID, GROUP_PROPS, GUIDE, type GroupDecl, type HeadKind, type InkColors, InputFormat, type JsonResult, KNOWN_SETTINGS, type LabelRef, type LaidEdge, type LaidGroup, type LaidNode, type LaidPanel, type Layout, type LayoutOverrides, type LexedLine, type LineStyle, type MarkerKind, type MdBlock, type MdOptions, type MdResult, NODE_PROPS, NUMBERS, type NodeDecl, type NodeOverride, Options, PANELS, PANEL_PROPS, type PanelCtx, type PanelDecl, type PanelHandle, type PanelKind, type PanelOption, type PanelOverride, type PanelPart, type ParseOptions, type PartAction, type PartChange, type PartEdit, type Point, type Props, RAMPS, type ResolvedEdgeStyle, type ResolvedNodeStyle, Result, type RowCtx, type RowKind, type RowPaint, SETTING_VALUES, SHAPES, type Seg, type ShapeKind, type ShapeName, type Side, type SourceRef, type StatementKind, THEMES, THEME_KEYS, THEME_NAMES, TONES, type Theme, type ThemeInput, type Tok, type TokKind, type YuhwaPlugin, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, esc, findBlocks, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, markers, mindmap, onlyColor, optionKind, parse, parseInline, parseProps, perPass, portOn, processMarkdown, quadrant, ramp, recolor, registerTheme, registry, render, renderHead, renderSegs, renderSvg, replaceBlockSource, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { A as ENUMS, At as tspans, Bt as createTheme, C as setLineProp, Ct as segsW, D as BOOLS, Ft as THEMES, Gt as isSafeCss, I as lint, It as THEME_KEYS, Jt as ramp, Kt as isSafeLink, Lt as THEME_NAMES, M as NODE_PROPS, N as NUMBERS, Nt as RAMPS, O as COLORS, P as PANEL_PROPS, Rt as TONES, S as serializeProps, T as splitTrailingProps, Ut as getTheme, V as portOn, Y as renderHead, Yt as registerTheme, Z as dashFor, Zt as themeNames, _ as onlyColor, _t as parseInline, a as perPass, bt as renderSegs, c as unuse, d as PANELS, f as SETTING_VALUES, ft as esc, g as lex, h as joinPath, i as optionKind, j as GROUP_PROPS, k as EDGE_PROPS, l as use, m as isYuhwaPath, n as approxMeasure, o as recolor, p as blockBraces, qt as isToneOrHex, r as canvasMeasure, s as registry, tt as lineStyle, u as KNOWN_SETTINGS, v as parse, w as setTrailingProp, y as parseProps, z as SHAPES } from "./plugin-Bs4eiAuz.js";
|
|
2
|
+
import { A as chart, B as shapes, C as builtins, D as gantt, E as quadrant, F as frames, I as tables, L as charts, M as sequence, N as legend, O as mindmap, P as footer, R as themes, S as layout, T as kanban, _ as isMermaid, a as findBlocks, b as GRID, c as editPart, d as setPartTone, f as setProp, g as fromMermaid, h as writePanelDrag, i as GUIDE, j as timeline, k as git, l as formatLayout, m as writeLayout, n as render, o as processMarkdown, p as setSetting, r as toSource, s as replaceBlockSource, t as hash, u as setLabel, v as fromJSON, w as treeview, x as groupPath, y as renderSvg, z as markers } from "./src-BjOhvTAB.js";
|
|
3
|
+
export { BOOLS, COLORS, EDGE_PROPS, ENUMS, GRID, GROUP_PROPS, GUIDE, KNOWN_SETTINGS, NODE_PROPS, NUMBERS, PANELS, PANEL_PROPS, RAMPS, SETTING_VALUES, SHAPES, THEMES, THEME_KEYS, THEME_NAMES, TONES, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, esc, findBlocks, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, markers, mindmap, onlyColor, optionKind, parse, parseInline, parseProps, perPass, portOn, processMarkdown, quadrant, ramp, recolor, registerTheme, registry, render, renderHead, renderSegs, renderSvg, replaceBlockSource, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag };
|
package/dist/ironmark.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* ```yuhwa file="diagrams/arch.yu" renders that file instead of the block.
|
|
19
19
|
* `zoom: 'inline'` adds the zoom script to `.md` output only; in `.mdx`, import `yuhwa/zoom`.
|
|
20
20
|
*/
|
|
21
|
-
import { t as YuhwaDocsOptions } from "./figure-
|
|
21
|
+
import { t as YuhwaDocsOptions } from "./figure-QAwSU1Ry.js";
|
|
22
22
|
/** replaces every yuhwa fence in `md` with its rendered figure */
|
|
23
23
|
export declare function renderFences(md: string, opts?: YuhwaDocsOptions, file?: string): string;
|
|
24
24
|
interface VitePlugin {
|
package/dist/ironmark.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-
|
|
1
|
+
import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-CLu2Pp_2.js";
|
|
2
2
|
// src/integrations/ironmark.ts
|
|
3
3
|
/**
|
|
4
4
|
* ironmark support: renders ```yuhwa fences before ironmark parses the file.
|
package/dist/lsp-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __commonJSMin, i as require_api, n as require_api$2, r as require_api$1, t as startServer } from "./server-
|
|
1
|
+
import { a as __commonJSMin, i as require_api, n as require_api$2, r as require_api$1, t as startServer } from "./server-D6BSNC1P.js";
|
|
2
2
|
// ../../node_modules/.pnpm/vscode-jsonrpc@10.0.0/node_modules/vscode-jsonrpc/lib/browser/ril.js
|
|
3
3
|
var require_ril = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/lsp-node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { A as PLACEMENT_PROPS, B as themeNames, C as COLORS, D as NODE_PROPS, E as GROUP_PROPS, F as spanKey, I as THEME_KEYS, M as SPAN_KEYS, O as NUMBERS, P as parseSpanStyle, R as TONES, S as BOOLS, T as ENUMS, V as table, a as onTypeEdits, b as parse, d as optionKind, g as blockBraces, h as SETTING_VALUES, i as format, j as SHAPES, k as PANEL_PROPS, m as PANELS, n as applyChange, o as tidy, p as KNOWN_SETTINGS, r as diffEdits, s as diskResolve, t as VERSION, v as joinPath, w as EDGE_PROPS, x as serializeProps, y as lex } from "./shared-
|
|
3
|
+
import { A as PLACEMENT_PROPS, B as themeNames, C as COLORS, D as NODE_PROPS, E as GROUP_PROPS, F as spanKey, I as THEME_KEYS, M as SPAN_KEYS, O as NUMBERS, P as parseSpanStyle, R as TONES, S as BOOLS, T as ENUMS, V as table, a as onTypeEdits, b as parse, d as optionKind, g as blockBraces, h as SETTING_VALUES, i as format, j as SHAPES, k as PANEL_PROPS, m as PANELS, n as applyChange, o as tidy, p as KNOWN_SETTINGS, r as diffEdits, s as diskResolve, t as VERSION, v as joinPath, w as EDGE_PROPS, x as serializeProps, y as lex } from "./shared-6aCU_HaV.js";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
// \0rolldown/runtime.js
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -10886,7 +10886,7 @@ function findQuoted(code, q, props) {
|
|
|
10886
10886
|
const re = new RegExp(`(?<![\\w-])${q.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\w-])`, "g");
|
|
10887
10887
|
let first = -1;
|
|
10888
10888
|
for (const m of code.matchAll(re)) {
|
|
10889
|
-
const depth =
|
|
10889
|
+
const depth = code.slice(0, m.index).split("").reduce((n, c) => n + (c === "[" ? 1 : c === "]" ? -1 : 0), 0);
|
|
10890
10890
|
if (props && depth > 0) return m.index;
|
|
10891
10891
|
if (first < 0) first = m.index;
|
|
10892
10892
|
}
|
package/dist/lsp-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as startServer } from "./server-
|
|
1
|
+
export { t as startServer } from "./server-D6BSNC1P.js";
|
package/dist/lsp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as SEMANTIC_LEGEND, n as YuhwaService, r as applyChange, i as closeIndent, a as diffEdits, o as enterEdit, s as format, c as newlineIndent, l as newlinePrefix, u as offsetAt, d as onTypeEdits, f as positionAt, p as shiftLines } from "./service-
|
|
1
|
+
export { t as SEMANTIC_LEGEND, n as YuhwaService, r as applyChange, i as closeIndent, a as diffEdits, o as enterEdit, s as format, c as newlineIndent, l as newlinePrefix, u as offsetAt, d as onTypeEdits, f as positionAt, p as shiftLines } from "./service-D7DNWBAU.js";
|
package/dist/markdown-it.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* A fence with `no-render` (```yuhwa no-render) stays a code block.
|
|
10
10
|
* ```yuhwa file="diagrams/arch.yu" renders that file instead of the block.
|
|
11
11
|
*/
|
|
12
|
-
import { t as YuhwaDocsOptions } from "./figure-
|
|
12
|
+
import { t as YuhwaDocsOptions } from "./figure-QAwSU1Ry.js";
|
|
13
13
|
type Rule = (tokens: any[], idx: number, options: any, env: any, self: any) => string;
|
|
14
14
|
interface MarkdownIt {
|
|
15
15
|
renderer: {
|
package/dist/markdown-it.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-
|
|
1
|
+
import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-CLu2Pp_2.js";
|
|
2
2
|
// src/integrations/markdown-it.ts
|
|
3
3
|
/**
|
|
4
4
|
* markdown-it plugin: renders ```yuhwa fences at build time.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFileSync, realpathSync } from "node:fs";
|
|
2
2
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { $t as table, m as isYuhwaPath } from "./plugin-Bs4eiAuz.js";
|
|
4
|
+
import { n as render } from "./src-BjOhvTAB.js";
|
|
4
5
|
import { n as zoomScript } from "./zoom-script-CVdAzMhX.js";
|
|
5
6
|
import { t as zoomHeight } from "./zoom-QeqB6QlH.js";
|
|
6
7
|
// src/integrations/figure.ts
|