yuhwa 1.9.0 → 1.10.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/{api-DHkPcxuZ.d.ts → api-BrWeKQBu.d.ts} +1 -1
- package/dist/{api-DZunc9Tf.js → api-c1vlj6Xc.js} +35 -9
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +1 -1
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +6 -6
- package/dist/canvas.js +1 -1
- package/dist/cli.js +3 -2
- package/dist/editor/assets/index-BtmJRoSF.js +844 -0
- package/dist/editor/assets/index-SdbT9cS9.css +1 -0
- package/dist/editor/assets/lsp.worker-VcS9cd8g.js +57 -0
- package/dist/editor/index.html +2 -2
- package/dist/{figure-Dlri_efy.d.ts → figure-DCSq2hum.d.ts} +1 -1
- package/dist/{grammar-BgXa5hBR.js → grammar-CvX2ko_b.js} +2 -2
- package/dist/{index-rUYmvQft.d.ts → index-Ds9SPfCB.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/ironmark.d.ts +1 -1
- package/dist/ironmark.js +1 -1
- package/dist/{lex-BgngnZsA.js → lex-BRb7NHAG.js} +28 -1
- package/dist/llms.txt +1 -1
- package/dist/lsp-browser.js +1 -1
- package/dist/lsp-node.js +3 -1
- 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-DoenSsSL.js → node-B_OPTkH3.js} +4 -4
- package/dist/plugin-C5-zqGvn.d.ts +19 -0
- package/dist/{plugin-CUnb4PAy.js → plugin-YrxTJq_l.js} +1 -1
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.js +3 -3
- package/dist/{plugins-CUSZZfpe.js → plugins-CjPvqfCw.js} +437 -171
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.js +2 -2
- package/dist/{raster-CA2EZVsH.js → raster-BiNccV8g.js} +1 -1
- 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-CMv83EL8.js → server-pVExpUnd.js} +2 -2
- package/dist/{service-DUPpv6QR.js → service-Bvjw54cn.js} +6 -4
- package/dist/{shapes-dSoHjzhn.d.ts → shapes-B4G5tuP8.d.ts} +17 -6
- package/dist/{shared-BNy-W1fR.js → shared-DwNQ218l.js} +467 -170
- package/dist/slim.d.ts +2 -2
- package/dist/slim.js +4 -4
- package/dist/{src-DegXsZtj.js → src-CmIylF2R.js} +5 -4
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -3
- package/dist/vuepress.d.ts +1 -1
- package/dist/vuepress.js +1 -1
- package/dist/yuhwa.iife.js +72 -70
- package/package.json +1 -1
- package/dist/editor/assets/index-BtyZhez4.css +0 -1
- package/dist/editor/assets/index-DuDUY7_0.js +0 -842
- package/dist/editor/assets/lsp.worker-DrpLBfKZ.js +0 -55
- package/dist/plugin-DGmREJ8U.d.ts +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as AlignSide, Ct as PanelKind, I as Diagram, J as LayoutOverrides, P as Diagnostic, Q as PanelHandle, d as TextOptions, kn as Measure, q as Layout, rt as PartEdit, un as Theme, wt as PanelOption } from "./shapes-B4G5tuP8.js";
|
|
2
2
|
interface ParseOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Reads a file named by `import "..."`. Gets the resolved path (relative
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as AFTER_LAYOUT, $t as
|
|
2
|
-
import { C as TRANSFORMS, S as STATEMENTS, b as unknownPanelHint, c as drawText, f as startMeasure, g as registry, u as approxMeasure, x as PANELS, y as foreignHint } from "./plugin-
|
|
3
|
-
import { d as indentTree, n as toEbnf, r as csvFields } from "./grammar-
|
|
1
|
+
import { $ as AFTER_LAYOUT, $t as f$1, A as MAX_NUMBER, B as placementOf, Bt as panelTheme, C as SETTING_VALUES, Cn as SCHEMES, D as EDGE_PROPS, Dn as TONES, Dt as listsIds, Et as alignSide, Fn as isColor, G as normalizeShape, Gt as resolvePanelStyle, Ht as resolveEdgeStyle, I as SIDES$2, It as inheritedProp, Jn as errorText, Jt as withEdgeInk, Kt as size, L as didYouMean, Lt as isLane, Mn as fontStack, Mt as groupGap, Nn as getScheme, Nt as groupPadding, On as bool, Pn as getTheme, Pt as groupPath, Q as textOffset, Qt as esc, R as inRange, Rn as isSafeLink, S as SETTING_NAMES, Tn as THEME_KEYS, Tt as alignSets, Un as resolveColor, Ut as resolveGroupStyle, V as propLine, Vt as posNum, W as SIDE_NORMAL, Wn as themeNames, Wt as resolveNodeStyle, X as shapePath, Xn as ownerOf, Xt as bakeBaselines, Y as shapeDetail, Z as sizeForShape, Zn as table, Zt as dedent, _ as unescape, _n as tspans, _t as sub, a as lex, at as headSize, b as KNOWN_SETTINGS, c as parseProps, cn as richText, ct as trimFor, d as serializeProps, dt as center, en as fontAttrs, et as MARKER_KINDS, f as serializeValue, fn as splitWords, ft as hits, g as stripComment$1, gn as textLines, gt as sample, hn as textEl, ht as pointAtHalf, i as blockBraces, in as parseInline, it as endDirection, j as NODE_PROPS, jt as effectiveProps, k as GROUP_PROPS, kt as edgeFont, l as propKey, ln as richW, lt as SIDES$1, mn as sumW, mt as pathData, n as addNodeProps, nn as lineHeight, o as nodeProps, on as plain, ot as labelSpot, pn as subInk, pt as norm, q as portPoint, qn as collecting, qt as textFont, r as arrowInfo, rn as nodeInk, rt as renderHead, sn as renderSegs, st as trim, t as KEYED_TAIL_RE, tt as POST_RENDER, u as quote$1, un as segsW, ut as add, v as unquote, vt as orthoRoute, w as STATEMENT_KEYWORDS, wt as ALIGN_SIDES_HINT, y as DIRECTION_ALIASES, yn as MONO, yt as smoothRoute, z as lint, zt as num } from "./lex-BRb7NHAG.js";
|
|
2
|
+
import { C as TRANSFORMS, S as STATEMENTS, b as unknownPanelHint, c as drawText, f as startMeasure, g as registry, u as approxMeasure, x as PANELS, y as foreignHint } from "./plugin-YrxTJq_l.js";
|
|
3
|
+
import { d as indentTree, n as toEbnf, r as csvFields } from "./grammar-CvX2ko_b.js";
|
|
4
4
|
// src/core/route/sides.ts
|
|
5
5
|
/** Choose the side of `box` facing `target`. */
|
|
6
6
|
function autoSide(box, target, other, dir) {
|
|
@@ -1214,8 +1214,12 @@ function closePanel(p, top, end) {
|
|
|
1214
1214
|
const lead = top.lines.findIndex((l) => l.trim());
|
|
1215
1215
|
panel.body = dedent(top.lines);
|
|
1216
1216
|
panel.lines = [top.start, end];
|
|
1217
|
+
const code = p.gen ? [] : p.lines.slice(top.start + 1, end).map((l) => l.slice(0, lex(l).codeEnd).trimEnd());
|
|
1218
|
+
const first = Math.max(0, code.findIndex((l) => l.trim()));
|
|
1219
|
+
if (!p.gen && dedent([...code]).join("\n") === panel.body.join("\n")) panel.bodyAt = top.start + 1 + first;
|
|
1220
|
+
const at = panel.bodyAt ?? top.start + 1 + Math.max(0, lead);
|
|
1217
1221
|
try {
|
|
1218
|
-
panel.data = PANELS.get(panel.kind).parse(panel.body, panel.props, (i, msg) => p.warn(i < 0 ? top.start :
|
|
1222
|
+
panel.data = PANELS.get(panel.kind).parse(panel.body, panel.props, (i, msg) => p.warn(i < 0 ? top.start : at + i, msg));
|
|
1219
1223
|
} catch (e) {
|
|
1220
1224
|
const who = ownerOf("panel", panel.kind);
|
|
1221
1225
|
p.warn(top.start, `${who ? `plugin "${who}": ` : ""}${panel.kind} panel failed to parse: ${errorText(e)}`, "error");
|
|
@@ -9345,6 +9349,10 @@ function setPartTone(source, panelId, partId, tone, d = parse(source)) {
|
|
|
9345
9349
|
function editPart(source, panelId, edit, d = parse(source)) {
|
|
9346
9350
|
let id;
|
|
9347
9351
|
const out = editBody(source, panelId, d, (kind, decl) => {
|
|
9352
|
+
if (edit.op === "set") {
|
|
9353
|
+
const part = kind.parts?.(decl.data).find((p) => p.id === edit.id);
|
|
9354
|
+
if (/[\r\n]/.test(edit.value ?? "") || !part || edit.key !== "color" && !(edit.key in (part.fields ?? {}))) return null;
|
|
9355
|
+
}
|
|
9348
9356
|
const r = kind.editPart?.(decl.body, edit, decl.data);
|
|
9349
9357
|
id = r?.id;
|
|
9350
9358
|
return r?.body ?? null;
|
|
@@ -9390,16 +9398,34 @@ function writePanelDrag(source, d, id, handle) {
|
|
|
9390
9398
|
function editBody(source, panelId, d, fn) {
|
|
9391
9399
|
const decl = d.panels.find((p) => p.id === panelId);
|
|
9392
9400
|
const kind = decl && PANELS.get(decl.kind);
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
if (end - start - 1 !== decl.body.length) return source;
|
|
9401
|
+
const at = decl?.bodyAt;
|
|
9402
|
+
if (!decl?.lines || at === void 0 || !kind || decl.failed || decl.ref?.generated) return source;
|
|
9396
9403
|
const body = fn(kind, decl);
|
|
9397
9404
|
if (!body) return source;
|
|
9398
9405
|
const lines = splitLines(source);
|
|
9399
|
-
const indent = innerIndent(lines,
|
|
9400
|
-
|
|
9406
|
+
const indent = innerIndent(lines, decl.lines[0], decl.lines[1]);
|
|
9407
|
+
const n = decl.body.length;
|
|
9408
|
+
lines.splice(at, n, ...keepComments(body, decl.body, lines.slice(at, at + n), indent));
|
|
9401
9409
|
return joinLines(lines, source);
|
|
9402
9410
|
}
|
|
9411
|
+
/**
|
|
9412
|
+
* Source lines for an edited panel body. The body a plugin edits has its
|
|
9413
|
+
* comments cut (a comment line reads as empty), so each line it kept is
|
|
9414
|
+
* written back as it was in the source, comment and all; a changed line keeps
|
|
9415
|
+
* the comment of the line it replaced, when the body did not grow or shrink.
|
|
9416
|
+
*/
|
|
9417
|
+
function keepComments(next, old, src, indent) {
|
|
9418
|
+
const used = /* @__PURE__ */ new Set();
|
|
9419
|
+
return next.map((l, i) => {
|
|
9420
|
+
let k = old.findIndex((o, j) => !used.has(j) && o === l);
|
|
9421
|
+
if (k < 0 && next.length === old.length && !used.has(i) && !next.includes(old[i])) k = i;
|
|
9422
|
+
if (k < 0) return l.trim() ? indent + l : "";
|
|
9423
|
+
used.add(k);
|
|
9424
|
+
if (old[k] === l) return src[k];
|
|
9425
|
+
const tail = src[k].slice(lex(src[k]).codeEnd).trim();
|
|
9426
|
+
return (l.trim() ? indent + l.trimEnd() : "") + (tail ? (l.trim() ? " " : indent) + tail : "");
|
|
9427
|
+
});
|
|
9428
|
+
}
|
|
9403
9429
|
const indentOf = (line) => line.match(/^\s*/)[0];
|
|
9404
9430
|
/** the indentation of the lines between `open` and `close`: the least of them, or one step in from `open` */
|
|
9405
9431
|
function innerIndent(lines, open, close) {
|
package/dist/astro.d.ts
CHANGED
package/dist/astro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import remarkYuhwa from "./remark.js";
|
|
2
2
|
import satteriYuhwa from "./satteri.js";
|
|
3
|
-
import { n as onTrack, o as clientImports, r as pagesUsing } from "./node-
|
|
3
|
+
import { n as onTrack, o as clientImports, r as pagesUsing } from "./node-B_OPTkH3.js";
|
|
4
4
|
// src/integrations/astro.ts
|
|
5
5
|
/**
|
|
6
6
|
* Astro integration, also for Starlight: renders ```yuhwa blocks in .md and
|
package/dist/browser.d.ts
CHANGED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
* <yuhwa-diagram render="canvas">a -> b</yuhwa-diagram> // or png; default svg
|
|
12
12
|
* el.source = 'a -> b' // re-renders
|
|
13
13
|
*/
|
|
14
|
-
import { $ as
|
|
15
|
-
import { $ as isYuhwaPath, A as embedFonts, B as setPartTone, C as MdOptions, D as replaceBlockSource, E as processMarkdown, F as addNode, G as ALIGN_SIDES, H as setSetting, I as editPart, J as JsonResult, K as GRID, L as formatLayout, M as svgToCanvas, N as Target, O as FontSource, P as addEdge, Q as parse, R as removeElement, S as MdBlock, T as findBlocks, U as writeLayout, V as setProp, W as writePanelDrag, X as renderSvg, Y as fromJSON, Z as layout, _ as lint, at as ParseOptions, b as isMermaid, c as BOOLS, d as ENUMS, et as joinPath, f as GROUP_PROPS, g as PANEL_PROP_HELP, h as PANEL_PROPS, i as hash, it as SETTING_VALUES, j as loadFonts, k as RasterOptions, l as COLORS, m as NUMBERS, n as Options, nt as KNOWN_SETTINGS, o as renderText, p as NODE_PROPS, q as DiagramJSON, r as Result, rt as SETTING_HELP, s as toSource, t as InputFormat, tt as PANELS, u as EDGE_PROPS, v as ConvertResult, w as MdResult, x as MD_LANGUAGES, y as fromMermaid, z as setLabel } from "./api-
|
|
14
|
+
import { $ as PanelOverride, $t as LineStyle, A as AlignSide, An as approxMeasure, At as optionKind, B as GroupDecl, Bt as Seg, C as serializeProps, Cn as isToneOrHex, Ct as PanelKind, Dt as RowPaint, E as splitTrailingProps, En as registerTheme, Et as RowKind, F as DiagnosticCode, Ft as use, G as LaidNode, Gt as parseInline, H as LabelRef, I as Diagram, It as MarkerKind, J as LayoutOverrides, Jt as segsW, K as LaidPanel, L as Direction, Lt as ShapeKind, M as Component, Mt as recolor, N as Curve, Nt as registry, On as themeNames, Ot as StatementKind, P as Diagnostic, Pt as unuse, Q as PanelHandle, R as EdgeDecl, Rt as renderHead, Sn as isSafeLink, St as PanelCtx, T as setTrailingProp, Tn as ramp, Tt as RowCtx, U as LaidEdge, V as HeadKind, Vt as esc, W as LaidGroup, X as NodeOverride, Y as NodeDecl, Z as PanelDecl, Zt as tspans, _ as TokKind, _n as getScheme, an as Scheme, at as Props, b as onlyColor, bn as isGenericFont, bt as Decoration, cn as THEME_NAMES, ct as ShapeName, d as TextOptions, dn as ThemeInput, dt as dashFor, et as PanelPart, g as Tok, gn as fontStack, gt as lineStyle, h as LexedLine, hn as fontFamilies, ht as groupProp, in as SCHEMES, it as Point, j as Box, jn as canvasMeasure, jt as perPass, k as Align, kt as YuhwaPlugin, ln as TONES, lt as Side, mt as groupPath, nn as RAMPS, nt as PartChange, on as THEMES, ot as ResolvedEdgeStyle, pn as createTheme, q as Layout, qt as renderSegs, r as portOn, rt as PartEdit, sn as THEME_KEYS, st as ResolvedNodeStyle, t as SHAPES, tn as PLAIN_THEMES, tt as PartAction, un as Theme, ut as SourceRef, v as blockBraces, vn as getTheme, w as setLineProp, wn as plainThemeNames, wt as PanelOption, x as parseProps, xn as isSafeCss, xt as FrameKind, y as lex, z as EdgeOverride, zt as InkColors } from "./shapes-B4G5tuP8.js";
|
|
15
|
+
import { $ as isYuhwaPath, A as embedFonts, B as setPartTone, C as MdOptions, D as replaceBlockSource, E as processMarkdown, F as addNode, G as ALIGN_SIDES, H as setSetting, I as editPart, J as JsonResult, K as GRID, L as formatLayout, M as svgToCanvas, N as Target, O as FontSource, P as addEdge, Q as parse, R as removeElement, S as MdBlock, T as findBlocks, U as writeLayout, V as setProp, W as writePanelDrag, X as renderSvg, Y as fromJSON, Z as layout, _ as lint, at as ParseOptions, b as isMermaid, c as BOOLS, d as ENUMS, et as joinPath, f as GROUP_PROPS, g as PANEL_PROP_HELP, h as PANEL_PROPS, i as hash, it as SETTING_VALUES, j as loadFonts, k as RasterOptions, l as COLORS, m as NUMBERS, n as Options, nt as KNOWN_SETTINGS, o as renderText, p as NODE_PROPS, q as DiagramJSON, r as Result, rt as SETTING_HELP, s as toSource, t as InputFormat, tt as PANELS, u as EDGE_PROPS, v as ConvertResult, w as MdResult, x as MD_LANGUAGES, y as fromMermaid, z as setLabel } from "./api-BrWeKQBu.js";
|
|
16
16
|
import { t as GUIDE } from "./index-Bab6qq3T.js";
|
|
17
|
-
import { _ as markers, a as gantt, c as chart, d as legend, f as footer, g as themes, h as charts, i as quadrant, l as timeline, m as tables, n as treeview, o as mindmap, p as frames, r as kanban, s as git, t as builtins, u as sequence, v as shapes } from "./index-
|
|
17
|
+
import { _ as markers, a as gantt, c as chart, d as legend, f as footer, g as themes, h as charts, i as quadrant, l as timeline, m as tables, n as treeview, o as mindmap, p as frames, r as kanban, s as git, t as builtins, u as sequence, v as shapes } from "./index-Ds9SPfCB.js";
|
|
18
18
|
import { i as zoomable, n as Zoomer, r as zoomHeight, t as ZoomOptions } from "./zoom-CCSUbX1X.js";
|
|
19
19
|
export declare function render(source: string, opts?: Options): Result;
|
|
20
20
|
/** `render`, then draw the diagram into a canvas. */
|
package/dist/browser.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as GUIDE } from "./src-
|
|
2
|
-
import { _ as unuse, d as canvasMeasure, g as registry, h as recolor, m as perPass, p as optionKind, u as approxMeasure, v as use, x as PANELS } from "./plugin-
|
|
1
|
+
import { t as GUIDE } from "./src-CmIylF2R.js";
|
|
2
|
+
import { _ as unuse, d as canvasMeasure, g as registry, h as recolor, m as perPass, p as optionKind, u as approxMeasure, v as use, x as PANELS } from "./plugin-YrxTJq_l.js";
|
|
3
3
|
import { n as zoomable, t as zoomHeight } from "./zoom-D3Lahr1T.js";
|
|
4
|
-
import { C as themes, S as charts, T as shapes, _ as sequence, b as frames, d as quadrant, f as gantt, g as timeline, h as chart, l as treeview, m as git, p as mindmap, t as builtins, u as kanban, v as legend, w as markers, x as tables, y as footer } from "./plugins-
|
|
5
|
-
import { a as svgFamilies, c as swapForRaster, n as embedFonts, r as loadFonts, s as svgToCanvas } from "./raster-
|
|
6
|
-
import {
|
|
7
|
-
import { A as joinPath, C as isMermaid, D as GRID, E as layout, O as parse, S as fromMermaid, T as renderSvg, _ as setPartTone, a as MD_LANGUAGES, b as writeLayout, d as addEdge, f as addNode, g as setLabel, h as removeElement, i as toSource, k as isYuhwaPath, l as processMarkdown, m as formatLayout, n as render$1, o as findBlocks, p as editPart, r as renderText, t as hash, u as replaceBlockSource, v as setProp, w as fromJSON, x as writePanelDrag, y as setSetting } from "./api-
|
|
4
|
+
import { C as themes, S as charts, T as shapes, _ as sequence, b as frames, d as quadrant, f as gantt, g as timeline, h as chart, l as treeview, m as git, p as mindmap, t as builtins, u as kanban, v as legend, w as markers, x as tables, y as footer } from "./plugins-CjPvqfCw.js";
|
|
5
|
+
import { a as svgFamilies, c as swapForRaster, n as embedFonts, r as loadFonts, s as svgToCanvas } from "./raster-BiNccV8g.js";
|
|
6
|
+
import { Bn as plainThemeNames, C as SETTING_VALUES, Cn as SCHEMES, Ct as ALIGN_SIDES, D as EDGE_PROPS, Dn as TONES, E as COLORS, En as THEME_NAMES, Ft as groupProp, H as SHAPES, Hn as registerTheme, In as isGenericFont, K as portOn, Ln as isSafeCss, M as NUMBERS, Mn as fontStack, N as PANEL_PROPS, Nn as getScheme, O as ENUMS, Ot as dashFor, P as PANEL_PROP_HELP, Pn as getTheme, Pt as groupPath, Qt as esc, Rn as isSafeLink, Rt as lineStyle, T as BOOLS, Tn as THEME_KEYS, Vn as ramp, Wn as themeNames, _n as tspans, a as lex, b as KNOWN_SETTINGS, bn as PLAIN_THEMES, c as parseProps, d as serializeProps, h as splitTrailingProps, i as blockBraces, in as parseInline, j as NODE_PROPS, jn as fontFamilies, k as GROUP_PROPS, kn as createTheme, m as setTrailingProp, p as setLineProp, rt as renderHead, s as onlyColor, sn as renderSegs, un as segsW, v as unquote, wn as THEMES, x as SETTING_HELP, xn as RAMPS, z as lint, zn as isToneOrHex } from "./lex-BRb7NHAG.js";
|
|
7
|
+
import { A as joinPath, C as isMermaid, D as GRID, E as layout, O as parse, S as fromMermaid, T as renderSvg, _ as setPartTone, a as MD_LANGUAGES, b as writeLayout, d as addEdge, f as addNode, g as setLabel, h as removeElement, i as toSource, k as isYuhwaPath, l as processMarkdown, m as formatLayout, n as render$1, o as findBlocks, p as editPart, r as renderText, t as hash, u as replaceBlockSource, v as setProp, w as fromJSON, x as writePanelDrag, y as setSetting } from "./api-c1vlj6Xc.js";
|
|
8
8
|
// src/browser.ts
|
|
9
9
|
/**
|
|
10
10
|
* Drop-in browser runtime: <script src="yuhwa.js"><\/script>
|
package/dist/canvas.js
CHANGED
|
@@ -17,7 +17,7 @@ function installCanvas() {
|
|
|
17
17
|
const swap = async (img) => {
|
|
18
18
|
const svg = svgFromDataUri(img.getAttribute("src") ?? "");
|
|
19
19
|
if (svg === void 0) return;
|
|
20
|
-
const { swapForRaster } = await import("./raster-
|
|
20
|
+
const { swapForRaster } = await import("./raster-BiNccV8g.js").then((n) => n.i);
|
|
21
21
|
const canvas = await swapForRaster(img, svg, "canvas", img.alt);
|
|
22
22
|
if (canvas) canvas.className = img.className;
|
|
23
23
|
};
|
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 { $ as THEME_KEYS, A as SETTING_VALUES, E as unquote, F as ENUMS, G as ALIGN_SIDES_HINT, I as GROUP_PROPS, J as esc, L as NODE_PROPS, N as COLORS, O as KNOWN_SETTINGS, P as EDGE_PROPS, Q as SCHEMES, S as registry, U as SHAPES, Z as PLAIN_THEMES, _ as replaceBlockSource, a as formatPage, b as canvasMeasure, c as diskResolve, d as toSource, et as THEME_NAMES, f as MD_LANGUAGES, g as processMarkdown, h as pageBlocks, i as format, l as render$1, m as isMarkdown, nt as isSafeCss, ot as isYuhwaPath, p as findBlocks, s as tidy, st as joinPath, t as VERSION, tt as TONES, u as renderText, x as optionKind, z as PANEL_PROPS } from "./shared-
|
|
3
|
+
import { $ as THEME_KEYS, A as SETTING_VALUES, E as unquote, F as ENUMS, G as ALIGN_SIDES_HINT, I as GROUP_PROPS, J as esc, L as NODE_PROPS, N as COLORS, O as KNOWN_SETTINGS, P as EDGE_PROPS, Q as SCHEMES, S as registry, U as SHAPES, Z as PLAIN_THEMES, _ as replaceBlockSource, a as formatPage, b as canvasMeasure, c as diskResolve, d as toSource, et as THEME_NAMES, f as MD_LANGUAGES, g as processMarkdown, h as pageBlocks, i as format, l as render$1, m as isMarkdown, nt as isSafeCss, ot as isYuhwaPath, p as findBlocks, s as tidy, st as joinPath, t as VERSION, tt as TONES, u as renderText, x as optionKind, z as PANEL_PROPS } from "./shared-DwNQ218l.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";
|
|
@@ -311,7 +311,8 @@ const schemes = () => list$1(Object.entries(SCHEMES).map(([n, s]) => `\`${n}\` f
|
|
|
311
311
|
const PLACEHOLDER = {
|
|
312
312
|
color: "<colour>",
|
|
313
313
|
number: "N",
|
|
314
|
-
text: "…"
|
|
314
|
+
text: "…",
|
|
315
|
+
date: "YYYY-MM-DD|now"
|
|
315
316
|
};
|
|
316
317
|
const settings = list$1([...KNOWN_SETTINGS].map((k) => SETTING_VALUES[k] ? `${k} (${SETTING_VALUES[k].join("|")})` : k));
|
|
317
318
|
const panelLines = panels.map((p) => {
|