yuhwa 1.8.2 → 1.9.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/{index-0qJC6glR.d.ts → api-DHkPcxuZ.d.ts} +18 -22
- package/dist/{src-BWFm7GlK.js → api-DZunc9Tf.js} +6142 -8752
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +1 -1
- package/dist/browser.d.ts +26 -3
- package/dist/browser.js +103 -32
- package/dist/canvas.js +1 -1
- package/dist/cli.js +65 -39
- package/dist/editor/assets/index-DuDUY7_0.js +842 -0
- package/dist/editor/assets/lsp.worker-DrpLBfKZ.js +55 -0
- package/dist/editor/index.html +1 -1
- package/dist/{figure-Cn5Ls_0U.d.ts → figure-Dlri_efy.d.ts} +1 -1
- package/dist/grammar-BgXa5hBR.js +974 -0
- package/dist/index-Bab6qq3T.d.ts +2 -0
- package/dist/index-rUYmvQft.d.ts +20 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.js +7 -5
- package/dist/ironmark.d.ts +1 -1
- package/dist/ironmark.js +1 -1
- package/dist/{lex-DIq2EFvl.js → lex-BgngnZsA.js} +49 -17
- package/dist/llms.txt +23 -6
- package/dist/lsp-browser.js +1 -1
- package/dist/lsp-node.js +6 -4
- 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 +2 -2
- package/dist/{node-GljwUyhc.js → node-DoenSsSL.js} +4 -3
- package/dist/plugin-CUnb4PAy.js +970 -0
- package/dist/plugin-DGmREJ8U.d.ts +9 -0
- package/dist/plugin.d.ts +3 -2
- package/dist/plugin.js +3 -3
- package/dist/plugins-CUSZZfpe.js +8675 -0
- package/dist/plugins.d.ts +12 -0
- package/dist/plugins.js +3 -0
- package/dist/{raster-Bqtxssxh.js → raster-CA2EZVsH.js} +8 -8
- package/dist/remark.d.ts +1 -1
- package/dist/remark.js +1 -1
- package/dist/satteri.d.ts +1 -1
- package/dist/satteri.js +1 -1
- package/dist/{server-8-F7RVrN.js → server-CMv83EL8.js} +2 -2
- package/dist/{service-S1OY7wrO.js → service-DUPpv6QR.js} +31 -8
- package/dist/{plugin-COlq-EO9.d.ts → shapes-dSoHjzhn.d.ts} +109 -13
- package/dist/{shared-Bhnvepka.js → shared-BNy-W1fR.js} +14227 -6170
- package/dist/slim.d.ts +12 -0
- package/dist/slim.js +5 -0
- package/dist/src-DegXsZtj.js +337 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -2
- package/dist/vuepress.d.ts +1 -1
- package/dist/vuepress.js +1 -1
- package/dist/yuhwa.iife.js +79 -55
- package/package.json +11 -1
- package/dist/editor/assets/index-BzQE05yU.js +0 -689
- package/dist/editor/assets/lsp.worker-B8uA5kfW.js +0 -36
- package/dist/plugin-3vxnUvv9.js +0 -307
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dn as Measure, G as Layout, K as LayoutOverrides, M as Diagnostic, O as AlignSide, P as Diagram, St as PanelOption, X as PanelHandle, cn as Theme, d as TextOptions, tt as PartEdit, xt as PanelKind } from "./shapes-dSoHjzhn.js";
|
|
2
2
|
interface ParseOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Reads a file named by `import "..."`. Gets the resolved path (relative
|
|
@@ -204,8 +204,9 @@ declare function embedFonts(svg: string, fonts?: "page" | FontSource[]): Promise
|
|
|
204
204
|
* it uses. Text is measured when the diagram renders, and a font that has
|
|
205
205
|
* not loaded yet is measured with its fallback. Resolves true when a font
|
|
206
206
|
* finished loading that was not ready before: render again for exact boxes.
|
|
207
|
+
* `families` saves a scan when the caller already has `svgFamilies(svg)`.
|
|
207
208
|
*/
|
|
208
|
-
declare function loadFonts(svg: string): Promise<boolean>;
|
|
209
|
+
declare function loadFonts(svg: string, families?: Set<string>): Promise<boolean>;
|
|
209
210
|
/**
|
|
210
211
|
* Draws an SVG string, such as `render(...).svg`, into a canvas. The page's
|
|
211
212
|
* web fonts that the diagram names are embedded first (see `fonts`).
|
|
@@ -288,25 +289,6 @@ declare const NUMBERS: string[];
|
|
|
288
289
|
/** a panel kind's typed header props, looked up by kind name */
|
|
289
290
|
type PanelOptions = (kind: string) => Record<string, PanelOption> | undefined;
|
|
290
291
|
declare function lint(d: Diagram, panelOptions?: PanelOptions): void;
|
|
291
|
-
declare const GUIDE: string;
|
|
292
|
-
declare const shapes: YuhwaPlugin;
|
|
293
|
-
declare const markers: YuhwaPlugin;
|
|
294
|
-
declare const themes: YuhwaPlugin;
|
|
295
|
-
declare const charts: YuhwaPlugin;
|
|
296
|
-
declare const tables: YuhwaPlugin;
|
|
297
|
-
declare const frames: YuhwaPlugin;
|
|
298
|
-
declare const footer: YuhwaPlugin;
|
|
299
|
-
declare const legend: YuhwaPlugin;
|
|
300
|
-
declare const sequence: YuhwaPlugin;
|
|
301
|
-
declare const timeline: YuhwaPlugin;
|
|
302
|
-
declare const chart: YuhwaPlugin;
|
|
303
|
-
declare const git: YuhwaPlugin;
|
|
304
|
-
declare const mindmap: YuhwaPlugin;
|
|
305
|
-
declare const gantt: YuhwaPlugin;
|
|
306
|
-
declare const quadrant: YuhwaPlugin;
|
|
307
|
-
declare const kanban: YuhwaPlugin;
|
|
308
|
-
declare const treeview: YuhwaPlugin;
|
|
309
|
-
declare const builtins: YuhwaPlugin[];
|
|
310
292
|
interface Options extends LayoutOptions, RenderOptions {
|
|
311
293
|
/**
|
|
312
294
|
* Reads files named by `import "..."`: gets the resolved path, returns the
|
|
@@ -315,6 +297,12 @@ interface Options extends LayoutOptions, RenderOptions {
|
|
|
315
297
|
resolve?: ParseOptions["resolve"];
|
|
316
298
|
/** path of the source being rendered; relative imports resolve against it */
|
|
317
299
|
file?: string;
|
|
300
|
+
/**
|
|
301
|
+
* The reader's colour scheme. Set, a light/dark pair theme (`auto`), and a
|
|
302
|
+
* diagram with no theme at all, draw only that side instead of one SVG that
|
|
303
|
+
* follows `prefers-color-scheme`. The browser runtime sets it.
|
|
304
|
+
*/
|
|
305
|
+
scheme?: "light" | "dark";
|
|
318
306
|
}
|
|
319
307
|
interface Result {
|
|
320
308
|
svg: string;
|
|
@@ -338,6 +326,14 @@ declare function toSource(input: string | DiagramJSON): {
|
|
|
338
326
|
format: InputFormat;
|
|
339
327
|
diagnostics: Diagnostic[];
|
|
340
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* Parse, lay out and draw a diagram as text: box-drawing characters, or plain
|
|
331
|
+
* ASCII with `ascii: true`. Panels draw themselves when their kind has a text
|
|
332
|
+
* form (sequence, treeview); others get a placeholder line. Never throws.
|
|
333
|
+
*/
|
|
334
|
+
declare function renderText(input: string | DiagramJSON, opts?: Options & TextOptions): Omit<Result, "svg"> & {
|
|
335
|
+
text: string;
|
|
336
|
+
};
|
|
341
337
|
/** Parse, lay out and render a diagram to an SVG string. Never throws on bad input. */
|
|
342
338
|
declare function render(input: string | DiagramJSON, opts?: Options): Result;
|
|
343
|
-
export {
|
|
339
|
+
export { isYuhwaPath as $, embedFonts as A, setPartTone as B, MdOptions as C, replaceBlockSource as D, processMarkdown as E, addNode as F, ALIGN_SIDES as G, setSetting as H, editPart as I, JsonResult as J, GRID as K, formatLayout as L, svgToCanvas as M, Target as N, FontSource as O, addEdge as P, parse as Q, removeElement as R, MdBlock as S, findBlocks as T, writeLayout as U, setProp as V, writePanelDrag as W, renderSvg as X, fromJSON as Y, layout as Z, lint as _, render as a, ParseOptions as at, isMermaid as b, BOOLS as c, ENUMS as d, joinPath as et, GROUP_PROPS as f, PANEL_PROP_HELP as g, PANEL_PROPS as h, hash as i, SETTING_VALUES as it, loadFonts as j, RasterOptions as k, COLORS as l, NUMBERS as m, Options as n, KNOWN_SETTINGS as nt, renderText as o, NODE_PROPS as p, DiagramJSON as q, Result as r, SETTING_HELP as rt, toSource as s, InputFormat as t, PANELS as tt, EDGE_PROPS as u, ConvertResult as v, MdResult as w, MD_LANGUAGES as x, fromMermaid as y, setLabel as z };
|