yuhwa 1.1.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 +11 -6
- package/dist/editor/assets/index-DAk6b1UB.js +689 -0
- package/dist/editor/assets/lsp.worker-CMSpDTsX.js +30 -0
- package/dist/editor/index.html +1 -1
- package/dist/{figure-db587hh6.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/llms.txt +15 -10
- package/dist/lsp-browser.d.ts +2 -2
- package/dist/lsp-browser.js +1 -1
- package/dist/lsp-node.js +169 -31
- package/dist/lsp-server.d.ts +1 -1
- package/dist/lsp-server.js +1 -1
- package/dist/lsp.d.ts +44 -2
- package/dist/lsp.js +1 -1
- package/dist/markdown-it.d.ts +1 -1
- package/dist/markdown-it.js +1 -1
- package/dist/{node-DPojgovD.js → node-CLu2Pp_2.js} +4 -3
- package/dist/plugin-Bs4eiAuz.js +4166 -0
- package/dist/{index-CAO4FUcz.d.ts → plugin-NSkNyoUj.d.ts} +105 -206
- 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-BSHSx8uo.d.ts → server--jHjJjOS.d.ts} +1 -1
- package/dist/{server-CT_mbBNZ.js → server-D6BSNC1P.js} +19 -2
- package/dist/{service-DquYYTVG.d.ts → service-Brvpt7Do.d.ts} +2 -0
- package/dist/{service-CNM6Z-RH.js → service-D7DNWBAU.js} +269 -29
- package/dist/{shared-B2rP00uA.js → shared-6aCU_HaV.js} +1358 -806
- package/dist/{src-hrqH-a8K.js → src-BjOhvTAB.js} +852 -4513
- 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 +63 -72
- package/package.json +6 -1
- package/dist/editor/assets/index-BGtCSg84.js +0 -689
- package/dist/editor/assets/lsp.worker-DUpBJRU2.js +0 -26
package/dist/astro.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* <yuhwa-diagram src="big.yu" zoom="480px"></yuhwa-diagram> // pan and zoom
|
|
10
10
|
* el.source = 'a -> b' // re-renders
|
|
11
11
|
*/
|
|
12
|
-
import { $ as
|
|
12
|
+
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";
|
|
13
|
+
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, 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";
|
|
13
14
|
import { i as zoomable, n as Zoomer, r as zoomHeight, t as ZoomOptions } from "./zoom-CCSUbX1X.js";
|
|
14
15
|
export declare function render(source: string, opts?: Options): Result;
|
|
15
16
|
/**
|
|
@@ -34,4 +35,4 @@ export declare class YuhwaDiagram extends Base {
|
|
|
34
35
|
connectedCallback(): void;
|
|
35
36
|
attributeChangedCallback(): void;
|
|
36
37
|
}
|
|
37
|
-
export { BOOLS, type Box, 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, type ZoomOptions, type Zoomer, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, findBlocks, footer, formatLayout, frames, fromJSON, fromMermaid, getTheme, git, groupPath, hash, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, layout, legend, lex, lineStyle, lint, onlyColor, optionKind, parse, parseInline, parseProps, perPass, processMarkdown, ramp, recolor, registerTheme, registry, renderHead, renderSegs, renderSvg, replaceBlockSource, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, splitTrailingProps, tables, themeNames, themes, timeline, toSource, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
|
38
|
+
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, type ZoomOptions, type Zoomer, 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, 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, zoomHeight, zoomable };
|
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
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$1, 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";
|
|
2
|
+
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
3
|
import { n as zoomable, t as zoomHeight } from "./zoom-QeqB6QlH.js";
|
|
3
4
|
// src/browser.ts
|
|
4
5
|
/**
|
|
@@ -184,4 +185,4 @@ if (typeof document !== "undefined") {
|
|
|
184
185
|
else run();
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
export { BOOLS, 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, YuhwaDiagram, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, fetchImports, findBlocks, footer, formatLayout, frames, fromJSON, fromMermaid, getTheme, git, groupPath, hash, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, layout, legend, lex, lineStyle, lint, onlyColor, optionKind, parse, parseInline, parseProps, perPass, processMarkdown, ramp, recolor, registerTheme, registry, render, renderHead, renderSegs, renderSvg, replaceBlockSource, run, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, splitTrailingProps, tables, themeNames, themes, timeline, toSource, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
|
188
|
+
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, YuhwaDiagram, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, esc, fetchImports, 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, run, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { C as COLORS, D as NODE_PROPS, E as GROUP_PROPS, I as THEME_KEYS, L as THEME_NAMES, N as esc, R as TONES, T as ENUMS, _ as isYuhwaPath, c as render$1, d as optionKind, f as registry, h as SETTING_VALUES, i as format, j as SHAPES, k as PANEL_PROPS, l as toSource, o as tidy, p as KNOWN_SETTINGS, s as diskResolve, t as VERSION, u as canvasMeasure, v as joinPath$1, w as EDGE_PROPS, z as isSafeCss } from "./shared-6aCU_HaV.js";
|
|
4
4
|
import { createServer } from "node:http";
|
|
5
5
|
import { basename, dirname, extname, join, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -225,13 +225,14 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
|
|
|
225
225
|
\`\`\`
|
|
226
226
|
- Card: a node line ending in \`{\` takes body lines until a line that is only
|
|
227
227
|
\`}\`. It draws a header (label, \`meta\` right, \`caps\` small caps), a divider
|
|
228
|
-
and a monospace body.
|
|
228
|
+
and a monospace body. \`font-size\`/\`font-weight\`/\`text\` style the header;
|
|
229
|
+
\`body-size\`, \`body-weight\`, \`body-color\` and \`line-height\` style the body.
|
|
229
230
|
|
|
230
231
|
## Values
|
|
231
232
|
|
|
232
233
|
- \`color\` sets fill, border and text in one: \`[blue]\` or \`[color: blue]\`.
|
|
233
|
-
Palette: ${list(TONES)}; shades like blue-600; any CSS colour.
|
|
234
|
-
|
|
234
|
+
Palette: ${list(TONES)}; shades like blue-600; any CSS colour. The colour
|
|
235
|
+
props (${list(COLORS)}) take the same values and colour one part.
|
|
235
236
|
- Shapes: ${list(SHAPES)}.
|
|
236
237
|
- Line styles: ${list(ENUMS.style)}. Heads: ${list(ENUMS.head)}. Sides (\`exit\`, \`enter\`): ${list(ENUMS.exit)}.
|
|
237
238
|
- Themes: ${list(THEME_NAMES)}. Define one with \`theme brand [base: midnight, accent: orange]\`
|
|
@@ -269,8 +270,12 @@ checks "checks" [meta: 42s, caps: true] {
|
|
|
269
270
|
|
|
270
271
|
Lines: text, \`left || right\` (right-aligned part), \`---\` divider, empty gap.
|
|
271
272
|
Rows: ${code(registry.rows.map((r) => r.syntax ?? r.kind))}; a \`|---|\` row makes a table header.
|
|
272
|
-
Inline markup (
|
|
273
|
-
|
|
273
|
+
Inline markup (in every text: labels, \`sub\`, edge labels, group and panel titles,
|
|
274
|
+
\`title\`, \`subtitle\`, \`footer\`): \`**bold**\`, \`*muted*\`, \`~~strike~~\`, \`\`code\`\`,
|
|
275
|
+
\`[[chip]]\` / \`[[green: chip]]\`, \`{red: text}\`, and styled spans
|
|
276
|
+
\`{color: red, size: 18, weight: 700, italic | text}\` (short: \`{red, bold | text}\`).
|
|
277
|
+
Text props on every element (node, edge label, group and panel title): \`text\`,
|
|
278
|
+
\`font-size\`, \`font-weight\`, \`italic\`; a panel's \`font-size\` scales all its text.
|
|
274
279
|
|
|
275
280
|
\`legend: .svc Service | --> async | red Deprecated\` and \`footer: a | b\` draw
|
|
276
281
|
strips under the diagram; a legend item starts with a class, colour or arrow.
|