yuhwa 1.5.0 → 1.5.2
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 +1 -1
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +1 -1
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +10 -7
- package/dist/canvas.js +1 -1
- package/dist/cli.js +32 -11
- package/dist/editor/assets/index-Dd3yJXpt.css +1 -0
- package/dist/editor/assets/index-DyXXchTq.js +689 -0
- package/dist/editor/assets/lsp.worker-BuZEbjK9.js +36 -0
- package/dist/editor/index.html +68 -57
- package/dist/{figure-BXrdbiqy.d.ts → figure-BtRpJvZ9.d.ts} +1 -1
- package/dist/{index-DVU2kSdX.d.ts → index-C6v0NhkF.d.ts} +35 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/ironmark.d.ts +1 -1
- package/dist/ironmark.js +1 -1
- package/dist/llms.txt +4 -4
- package/dist/lsp-browser.js +1 -1
- package/dist/lsp-node.js +20 -13
- 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-B8dLsEzl.js → node-Cdzt2Mis.js} +6 -6
- package/dist/{parse-CD6SmUc1.js → parse-fnqTkelX.js} +120 -42
- package/dist/{plugin-Dq5VmHe8.js → plugin-DX1Pv2Tq.js} +1 -1
- package/dist/{plugin-Dj66dvC1.d.ts → plugin-DhSeDLo1.d.ts} +43 -27
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +2 -2
- package/dist/{raster-Cul5L1bT.js → raster-B_SJsm-q.js} +3 -3
- 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-DCZj9bmz.js → server-BW2tKjSu.js} +6 -3
- package/dist/{service-Cno307YA.js → service-CXRIavFP.js} +18 -14
- package/dist/{shared-DgVcoAJb.js → shared-DJCDEbFf.js} +1877 -1312
- package/dist/{src-CBd46GH5.js → src-CQ8ltV_K.js} +1906 -1267
- 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 +54 -54
- package/dist/{zoom-yxhxX16c.js → zoom-D3Lahr1T.js} +1 -1
- package/dist/{zoom-script-CaJ5MNUw.js → zoom-script-DPxmav2F.js} +1 -1
- package/dist/zoom.js +2 -2
- package/package.json +1 -1
- package/dist/editor/assets/index-BAdhu8vV.js +0 -689
- package/dist/editor/assets/index-DaWl0OPj.css +0 -1
- package/dist/editor/assets/lsp.worker-PVetuBwo.js +0 -36
package/README.md
CHANGED
|
@@ -260,7 +260,7 @@ Rules-file and skill snippets: [AI guide](https://ph1p.github.io/yuhwa/guide/ai)
|
|
|
260
260
|
`yuhwa-lsp` ships with the `yuhwa` package: diagnostics, quick fixes,
|
|
261
261
|
completion, hover, rename, formatting and semantic colouring.
|
|
262
262
|
|
|
263
|
-
- **VS Code, Cursor, VSCodium:** the extension in [`packages/vscode`](https://github.com/ph1p/yuhwa/blob/main/packages/vscode)
|
|
263
|
+
- **VS Code, Cursor, VSCodium:** the [extension](https://marketplace.visualstudio.com/items?itemName=ph1p.yuhwa-vscode) bundles the server (source in [`packages/vscode`](https://github.com/ph1p/yuhwa/blob/main/packages/vscode)).
|
|
264
264
|
- **Zed:** extension in [`packages/zed`](https://github.com/ph1p/yuhwa/blob/main/packages/zed).
|
|
265
265
|
- **Neovim, Helix, Sublime, Emacs, JetBrains, Vim, Kate:** point the editor at `yuhwa-lsp --stdio` for `.yu` files.
|
|
266
266
|
|
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-Cdzt2Mis.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,8 +11,8 @@
|
|
|
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
|
|
14
|
+
import { $ as Point, A as Diagnostic, At as registry, B as LaidNode, C as setLineProp, Cn as canvasMeasure, Ct as RowKind, D as Box, Dt as optionKind, Et as YuhwaPlugin, F as GroupDecl, Ft as renderHead, G as NodeOverride, Gt as segsW, H as Layout, Ht as parseInline, I as HeadKind, It as InkColors, J as PanelOverride, Jt as tspans, K as PanelDecl, L as LabelRef, Lt as Seg, M as Direction, Mt as use, N as EdgeDecl, Nt as MarkerKind, O as Component, Ot as perPass, P as EdgeOverride, Pt as ShapeKind, Q as PartEdit, Qt as RAMPS, R as LaidEdge, Rt as esc, S as serializeProps, Sn as approxMeasure, St as RowCtx, T as splitTrailingProps, Tt as StatementKind, U as LayoutOverrides, V as LaidPanel, W as NodeDecl, Wt as renderSegs, X as PartAction, Xt as LineStyle, Y as PanelPart, Z as PartChange, _ as joinPath, _n as ramp, _t as Decoration, a as portOn, an as ThemeInput, at as SourceRef, b as parse, bn as themeNames, bt as PanelKind, c as KNOWN_SETTINGS, ct as groupPath, d as ParseOptions, dn as getTheme, en as THEMES, et as Props, f as SETTING_VALUES, g as isYuhwaPath, gn as isToneOrHex, h as blockBraces, hn as isSafeLink, in as Theme, it as Side, j as Diagram, jt as unuse, k as Curve, kt as recolor, l as LexedLine, ln as fontFamilies, lt as layout, m as TokKind, mn as isSafeCss, nn as THEME_NAMES, nt as ResolvedNodeStyle, ot as GRID, p as Tok, pn as isGenericFont, pt as lineStyle, q as PanelHandle, r as SHAPES, rn as TONES, rt as ShapeName, sn as createTheme, tn as THEME_KEYS, tt as ResolvedEdgeStyle, u as PANELS, un as fontStack, ut as dashFor, v as lex, vn as registerTheme, vt as FrameKind, w as setTrailingProp, wt as RowPaint, x as parseProps, xt as PanelOption, y as onlyColor, yt as PanelCtx, z as LaidGroup } from "./plugin-DhSeDLo1.js";
|
|
15
|
+
import { $ as addNode, A as GROUP_PROPS, B as MdBlock, C as markers, D as COLORS, E as BOOLS, F as lint, G as replaceBlockSource, H as MdResult, I as ConvertResult, J as embedFonts, K as FontSource, L as fromMermaid, M as NUMBERS, N as PANEL_PROPS, O as EDGE_PROPS, P as PANEL_PROP_HELP, Q as addEdge, R as isMermaid, S as themes, T as GUIDE, U as findBlocks, V as MdOptions, W as processMarkdown, X as svgToCanvas, Y as loadFonts, Z as Target, _ as legend, at as setProp, b as tables, c as treeview, ct as writePanelDrag, d as gantt, dt as fromJSON, et as editPart, f as mindmap, ft as renderSvg, g as sequence, h as timeline, i as hash, it as setPartTone, j as NODE_PROPS, k as ENUMS, l as kanban, lt as DiagramJSON, m as chart, n as Options, nt as removeElement, o as toSource, ot as setSetting, p as git, q as RasterOptions, r as Result, rt as setLabel, s as builtins, st as writeLayout, t as InputFormat, tt as formatLayout, u as quadrant, ut as JsonResult, v as footer, w as shapes, x as charts, y as frames, z as MD_LANGUAGES } from "./index-C6v0NhkF.js";
|
|
16
16
|
import { i as zoomable, n as Zoomer, r as zoomHeight, t as ZoomOptions } from "./zoom-CCSUbX1X.js";
|
|
17
17
|
export declare function render(source: string, opts?: Options): Result;
|
|
18
18
|
/** `render`, then draw the diagram into a canvas. */
|
|
@@ -41,4 +41,4 @@ export declare class YuhwaDiagram extends Base {
|
|
|
41
41
|
connectedCallback(): void;
|
|
42
42
|
attributeChangedCallback(): void;
|
|
43
43
|
}
|
|
44
|
-
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 FontSource, 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, MD_LANGUAGES, 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 RasterOptions, 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, embedFonts, esc, findBlocks, fontFamilies, fontStack, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isGenericFont, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, loadFonts, 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, svgToCanvas, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
|
44
|
+
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 FontSource, 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, MD_LANGUAGES, type MarkerKind, type MdBlock, type MdOptions, type MdResult, NODE_PROPS, NUMBERS, type NodeDecl, type NodeOverride, Options, PANELS, PANEL_PROPS, PANEL_PROP_HELP, 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 RasterOptions, 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 Target, type Theme, type ThemeInput, type Tok, type TokKind, type YuhwaPlugin, type ZoomOptions, type Zoomer, addEdge, addNode, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, embedFonts, esc, findBlocks, fontFamilies, fontStack, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isGenericFont, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, loadFonts, markers, mindmap, onlyColor, optionKind, parse, parseInline, parseProps, perPass, portOn, processMarkdown, quadrant, ramp, recolor, registerTheme, registry, removeElement, renderHead, renderSegs, renderSvg, replaceBlockSource, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, svgToCanvas, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
package/dist/browser.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { a as perPass, c as unuse, i as optionKind, l as use, n as approxMeasure, o as recolor, r as canvasMeasure, s as registry } from "./plugin-
|
|
3
|
-
import { n as zoomable, t as zoomHeight } from "./zoom-
|
|
4
|
-
import { a as svgFamilies, c as swapForRaster, n as embedFonts, r as loadFonts, s as svgToCanvas } from "./raster-
|
|
5
|
-
import {
|
|
1
|
+
import { A as treeview, B as footer, C as isMermaid, D as groupPath, E as GRID, F as git, G as markers, H as tables, I as chart, K as shapes, L as timeline, M as quadrant, N as gantt, O as layout, P as mindmap, R as sequence, S as fromMermaid, T as renderSvg, U as charts, V as frames, W as themes, _ as setPartTone, a as MD_LANGUAGES, b as writeLayout, d as addEdge, f as addNode, g as setLabel, h as removeElement, i as GUIDE, j as kanban, k as builtins, l as processMarkdown, m as formatLayout, n as render$1, o as findBlocks, p as editPart, r as toSource, t as hash, u as replaceBlockSource, v as setProp, w as fromJSON, x as writePanelDrag, y as setSetting, z as legend } from "./src-CQ8ltV_K.js";
|
|
2
|
+
import { a as perPass, c as unuse, i as optionKind, l as use, n as approxMeasure, o as recolor, r as canvasMeasure, s as registry } from "./plugin-DX1Pv2Tq.js";
|
|
3
|
+
import { n as zoomable, t as zoomHeight } from "./zoom-D3Lahr1T.js";
|
|
4
|
+
import { a as svgFamilies, c as swapForRaster, n as embedFonts, r as loadFonts, s as svgToCanvas } from "./raster-B_SJsm-q.js";
|
|
5
|
+
import { $ as lineStyle, C as EDGE_PROPS, D as NUMBERS, E as NODE_PROPS, Ft as THEME_KEYS, Gt as isGenericFont, Ht as fontStack, It as THEME_NAMES, Jt as isToneOrHex, Kt as isSafeCss, L as portOn, Lt as TONES, Mt as RAMPS, O as PANEL_PROPS, P as SHAPES, Pt as THEMES, Qt as themeNames, S as COLORS, St as segsW, T as GROUP_PROPS, Ut as getTheme, Vt as fontFamilies, Xt as registerTheme, Y as dashFor, Yt as ramp, _ as setLineProp, b as unquote, c as joinPath, d as parse, f as parseProps, gt as parseInline, h as serializeProps, j as lint, k as PANEL_PROP_HELP, kt as tspans, l as lex, n as PANELS, o as blockBraces, q as renderHead, qt as isSafeLink, r as SETTING_VALUES, s as isYuhwaPath, t as KNOWN_SETTINGS, u as onlyColor, ut as esc, v as setTrailingProp, w as ENUMS, x as BOOLS, y as splitTrailingProps, yt as renderSegs, zt as createTheme } from "./parse-fnqTkelX.js";
|
|
6
6
|
// src/browser.ts
|
|
7
7
|
/**
|
|
8
8
|
* Drop-in browser runtime: <script src="yuhwa.js"><\/script>
|
|
@@ -176,7 +176,10 @@ var YuhwaDiagram = class extends Base {
|
|
|
176
176
|
this.#draw();
|
|
177
177
|
}
|
|
178
178
|
connectedCallback() {
|
|
179
|
-
if (document.readyState === "loading" && !this.textContent?.trim() && !this.hasAttribute("src"))
|
|
179
|
+
if (document.readyState === "loading" && !this.textContent?.trim() && !this.hasAttribute("src")) {
|
|
180
|
+
document.addEventListener("DOMContentLoaded", () => this.connectedCallback(), { once: true });
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
180
183
|
if (this.#source === null && !this.hasAttribute("src")) this.#source = this.textContent ?? "";
|
|
181
184
|
this.#update();
|
|
182
185
|
}
|
|
@@ -248,4 +251,4 @@ if (typeof document !== "undefined") {
|
|
|
248
251
|
else run();
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
|
-
export { BOOLS, COLORS, EDGE_PROPS, ENUMS, GRID, GROUP_PROPS, GUIDE, KNOWN_SETTINGS, MD_LANGUAGES, 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, embedFonts, esc, fetchImports, findBlocks, fontFamilies, fontStack, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isGenericFont, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, loadFonts, markers, mindmap, onlyColor, optionKind, parse, parseInline, parseProps, perPass, portOn, processMarkdown, quadrant, ramp, recolor, registerTheme, registry, render, renderCanvas, renderHead, renderSegs, renderSvg, replaceBlockSource, run, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, svgToCanvas, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
|
254
|
+
export { BOOLS, COLORS, EDGE_PROPS, ENUMS, GRID, GROUP_PROPS, GUIDE, KNOWN_SETTINGS, MD_LANGUAGES, NODE_PROPS, NUMBERS, PANELS, PANEL_PROPS, PANEL_PROP_HELP, RAMPS, SETTING_VALUES, SHAPES, THEMES, THEME_KEYS, THEME_NAMES, TONES, YuhwaDiagram, addEdge, addNode, approxMeasure, blockBraces, builtins, canvasMeasure, chart, charts, createTheme, dashFor, editPart, embedFonts, esc, fetchImports, findBlocks, fontFamilies, fontStack, footer, formatLayout, frames, fromJSON, fromMermaid, gantt, getTheme, git, groupPath, hash, isGenericFont, isMermaid, isSafeCss, isSafeLink, isToneOrHex, isYuhwaPath, joinPath, kanban, layout, legend, lex, lineStyle, lint, loadFonts, markers, mindmap, onlyColor, optionKind, parse, parseInline, parseProps, perPass, portOn, processMarkdown, quadrant, ramp, recolor, registerTheme, registry, removeElement, render, renderCanvas, renderHead, renderSegs, renderSvg, replaceBlockSource, run, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, shapes, splitTrailingProps, svgToCanvas, tables, themeNames, themes, timeline, toSource, treeview, tspans, unuse, use, writeLayout, writePanelDrag, zoomHeight, zoomable };
|
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-B_SJsm-q.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 { F as NODE_PROPS, G as
|
|
3
|
+
import { B as SHAPES, F as NODE_PROPS, G as THEME_KEYS, H as esc, J as isSafeCss, K as THEME_NAMES, L as PANEL_PROPS, M as EDGE_PROPS, N as ENUMS, P as GROUP_PROPS, S as SETTING_VALUES, T as joinPath, _ as canvasMeasure, a as formatPage, b as KNOWN_SETTINGS, c as diskResolve, d as MD_LANGUAGES, f as findBlocks, g as replaceBlockSource, h as processMarkdown, i as format, j as COLORS, k as unquote, l as render$1, m as pageBlocks, p as isMarkdown, q as TONES, s as tidy, t as VERSION, u as toSource, v as optionKind, w as isYuhwaPath, y as registry } from "./shared-DJCDEbFf.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";
|
|
@@ -109,7 +109,7 @@ function inUnicodeRange(range, chars) {
|
|
|
109
109
|
/** first downloadable `url(...)` in an @font-face src, resolved against `base` */
|
|
110
110
|
function srcUrl(src, base) {
|
|
111
111
|
const m = src.match(/url\(\s*(['"]?)(.*?)\1\s*\)/);
|
|
112
|
-
if (!m) return
|
|
112
|
+
if (!m) return;
|
|
113
113
|
try {
|
|
114
114
|
return new URL(m[2], base).href;
|
|
115
115
|
} catch {
|
|
@@ -119,7 +119,7 @@ function srcUrl(src, base) {
|
|
|
119
119
|
function faceFrom(get, base) {
|
|
120
120
|
const url = srcUrl(get("src"), base);
|
|
121
121
|
const family = unquote(get("font-family"));
|
|
122
|
-
if (!url || !family) return
|
|
122
|
+
if (!url || !family) return;
|
|
123
123
|
return {
|
|
124
124
|
family,
|
|
125
125
|
url,
|
|
@@ -806,7 +806,7 @@ function zoomable(host, opts = {}) {
|
|
|
806
806
|
*/
|
|
807
807
|
function zoomHeight(value) {
|
|
808
808
|
const v = value?.trim();
|
|
809
|
-
if (!v || v === "true") return
|
|
809
|
+
if (!v || v === "true") return;
|
|
810
810
|
return /^\d+(\.\d+)?$/.test(v) ? `${v}px` : v;
|
|
811
811
|
}
|
|
812
812
|
// src/integrations/png.ts
|
|
@@ -973,7 +973,10 @@ const HOME = (origin) => `<!doctype html><meta charset="utf-8"><title>yuhwa rend
|
|
|
973
973
|
function handler(req, res) {
|
|
974
974
|
res.setHeader("access-control-allow-origin", "*");
|
|
975
975
|
res.setHeader("access-control-allow-headers", "content-type");
|
|
976
|
-
if (req.method === "OPTIONS")
|
|
976
|
+
if (req.method === "OPTIONS") {
|
|
977
|
+
res.writeHead(204).end();
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
977
980
|
const url = new URL(req.url ?? "/", "http://localhost");
|
|
978
981
|
const path = url.pathname;
|
|
979
982
|
const theme = url.searchParams.get("theme") ?? void 0;
|
|
@@ -1007,8 +1010,14 @@ function handler(req, res) {
|
|
|
1007
1010
|
const fail = (status, message) => sendJson(status, { error: message });
|
|
1008
1011
|
try {
|
|
1009
1012
|
if (req.method === "GET") {
|
|
1010
|
-
if (path === "/")
|
|
1011
|
-
|
|
1013
|
+
if (path === "/") {
|
|
1014
|
+
res.writeHead(200, { "content-type": "text/html; charset=utf-8" }).end(HOME(`http://${req.headers.host ?? "localhost"}`));
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
if (path === "/llms.txt" || path === "/guide") {
|
|
1018
|
+
res.writeHead(200, { "content-type": "text/plain; charset=utf-8" }).end(GUIDE);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1012
1021
|
if (path === "/health") return sendJson(200, { ok: true });
|
|
1013
1022
|
if (path === "/svg" || path === "/svg.svg") {
|
|
1014
1023
|
const src = url.searchParams.get("src");
|
|
@@ -1270,7 +1279,10 @@ var YuhwaDiagram = class extends Base {
|
|
|
1270
1279
|
this.#draw();
|
|
1271
1280
|
}
|
|
1272
1281
|
connectedCallback() {
|
|
1273
|
-
if (document.readyState === "loading" && !this.textContent?.trim() && !this.hasAttribute("src"))
|
|
1282
|
+
if (document.readyState === "loading" && !this.textContent?.trim() && !this.hasAttribute("src")) {
|
|
1283
|
+
document.addEventListener("DOMContentLoaded", () => this.connectedCallback(), { once: true });
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1274
1286
|
if (this.#source === null && !this.hasAttribute("src")) this.#source = this.textContent ?? "";
|
|
1275
1287
|
this.#update();
|
|
1276
1288
|
}
|
|
@@ -1462,7 +1474,10 @@ const fileOpts = (file) => ({
|
|
|
1462
1474
|
});
|
|
1463
1475
|
const readInput = (file) => file === "-" ? readFileSync(0, "utf8") : readFileSync(file, "utf8");
|
|
1464
1476
|
function writeOut(out, text) {
|
|
1465
|
-
if (!out)
|
|
1477
|
+
if (!out) {
|
|
1478
|
+
process.stdout.write(text);
|
|
1479
|
+
return;
|
|
1480
|
+
}
|
|
1466
1481
|
mkdirSync(dirname(resolve(out)), { recursive: true });
|
|
1467
1482
|
writeFileSync(out, text);
|
|
1468
1483
|
process.stderr.write(`wrote ${out}\n`);
|
|
@@ -1610,14 +1625,20 @@ function cmdConvert(a) {
|
|
|
1610
1625
|
if (!file) throw new Error("convert: missing input file");
|
|
1611
1626
|
const r = toSource(readInput(file));
|
|
1612
1627
|
printDiagnostics(file, r.diagnostics);
|
|
1613
|
-
if (r.diagnostics.some((d) => d.severity === "error"))
|
|
1628
|
+
if (r.diagnostics.some((d) => d.severity === "error")) {
|
|
1629
|
+
process.exitCode = 1;
|
|
1630
|
+
return;
|
|
1631
|
+
}
|
|
1614
1632
|
writeOut(str(a.out), r.source);
|
|
1615
1633
|
}
|
|
1616
1634
|
function cmdUrl(a) {
|
|
1617
1635
|
const file = a._[1];
|
|
1618
1636
|
if (!file) throw new Error("url: missing input file");
|
|
1619
1637
|
const source = readInput(file);
|
|
1620
|
-
if (a.view)
|
|
1638
|
+
if (a.view) {
|
|
1639
|
+
process.stdout.write(`${viewUrl(source, str(a.base))}\n`);
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1621
1642
|
const base = (str(a.base) ?? "http://localhost:4749").replace(/\/$/, "");
|
|
1622
1643
|
process.stdout.write(`${base}/yuhwa/svg/${encodeSource(source)}\n`);
|
|
1623
1644
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f4f3ef;--canvas:#efeee9;--dot:#d6d3cb;--panel:#fff;--field:#fff;--well:#f7f6f2;--hover:#f1efea;--line:#e3e0d8;--line-strong:#cfcbc1;--text:#26251f;--muted:#7d7970;--accent:#2563eb;--accent-hover:#1d4ed8;--accent-soft:#2563eb24;--on-accent:#fff;--err:#dc2626;--warn:#b45309;--shadow:0 1px 2px #1e190a0d;--float:0 1px 2px #1e190a0f, 0 6px 20px #1e190a14;--mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--sans:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5' fill='none' stroke='%237d7970' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");--syn-keyword:#7c3aed;--syn-string:#15803d;--syn-number:#b45309;--syn-property:#0e7490;--syn-value:#be185d;--syn-group:#1d4ed8;--syn-class:#a16207}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0e1015;--canvas:#0b0d11;--dot:#1f232c;--panel:#15181f;--field:#1b1f27;--well:#191c23;--hover:#232833;--line:#262b35;--line-strong:#353c49;--text:#e6e8ec;--muted:#8b93a3;--accent:#3b82f6;--accent-hover:#60a5fa;--accent-soft:#60a5fa2e;--err:#f87171;--warn:#fbbf24;--shadow:0 1px 2px #0000004d;--float:0 1px 2px #0006, 0 8px 24px #00000059;--chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5' fill='none' stroke='%238b93a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");--syn-keyword:#c4a5ff;--syn-string:#86d39a;--syn-number:#f5b168;--syn-property:#67d0e3;--syn-value:#f39ac2;--syn-group:#7aa7ff;--syn-class:#e8c15a}}*{box-sizing:border-box}[hidden]{display:none!important}html,body{background:var(--bg);height:100%;color:var(--text);font:13px/1.4 var(--sans);-webkit-font-smoothing:antialiased;margin:0}body{grid-template-rows:auto 1fr;display:grid}svg{flex:none}header{background:var(--panel);border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;display:flex}.brand{letter-spacing:-.02em;color:inherit;align-items:center;gap:7px;margin-right:8px;font-size:14px;font-weight:700;text-decoration:none;display:inline-flex}.toolbar{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.spacer{flex:1}.divider{background:var(--line);width:1px;height:20px;margin:0 2px}.field>span svg{width:13px;height:13px}.fields{box-shadow:var(--shadow);border-radius:8px;display:inline-flex}.fields>.field{box-shadow:none;border-radius:0}.fields>.field+.field{margin-left:-1px}.fields>.field:first-child{border-radius:8px 0 0 8px}.fields>.field:last-child{border-radius:0 8px 8px 0}.fields>.field:is(:hover,:focus-within){z-index:1;position:relative}.menu{position:relative}.menu>summary{list-style:none}.menu>summary::-webkit-details-marker{display:none}.menu>summary:after{content:"";background:var(--chevron) no-repeat center / 12px;width:12px;height:12px;margin-right:-3px}.menu[open]>summary{background:var(--hover);border-color:var(--line-strong)}.menu-list{z-index:20;background:var(--panel);border:1px solid var(--line);min-width:190px;box-shadow:var(--float);border-radius:10px;flex-direction:column;padding:4px;display:flex;position:absolute;top:calc(100% + 6px);right:0}.menu-list>button{height:30px;box-shadow:none;background:0 0;border:0;border-radius:6px;justify-content:flex-start}.menu-list>button:hover{background:var(--hover)}.menu-list small{color:var(--muted);margin-left:auto}.menu-list hr{border:0;border-top:1px solid var(--line);width:100%;margin:4px 0}#status{color:var(--muted);white-space:nowrap;font-size:12px}#status:not(:empty):before{content:"";vertical-align:1px;background:#22c55e;border-radius:50%;width:6px;height:6px;margin-right:6px;display:inline-block}button,.button{height:30px;font:500 12.5px/1 var(--sans);color:inherit;white-space:nowrap;background:var(--field);border:1px solid var(--line);box-shadow:var(--shadow);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:0 10px;text-decoration:none;transition:background .12s,border-color .12s,color .12s;display:inline-flex}button:hover,.button:hover{background:var(--hover);border-color:var(--line-strong)}button:active{transform:translateY(.5px)}button svg,.button svg{width:16px;height:16px;color:var(--muted)}button:hover svg,.button:hover svg{color:var(--text)}button.icon,.button.icon{width:30px;padding:0;font-size:15px}button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}button.primary svg{color:currentColor}button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}:is(button,.button,select):focus-visible{outline:2px solid var(--accent);outline-offset:1px}.group{box-shadow:var(--shadow);border-radius:8px;display:inline-flex}.group>button{box-shadow:none;border-radius:0}.group>button+button{margin-left:-1px}.group>button:first-child{border-radius:8px 0 0 8px}.group>button:last-child{border-radius:0 8px 8px 0}.group>button:hover{z-index:1;position:relative}.field{background:var(--field);border:1px solid var(--line);height:30px;box-shadow:var(--shadow);border-radius:8px;align-items:stretch;transition:border-color .12s;display:inline-flex;overflow:hidden}.field:hover{border-color:var(--line-strong)}.field:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.field>span{color:var(--muted);-webkit-user-select:none;user-select:none;align-items:center;gap:6px;padding:0 4px 0 10px;font-size:11.5px;font-weight:500;display:flex}.field select{appearance:none;min-width:64px;line-height:16px;font:500 12.5px var(--sans);color:var(--text);background:var(--chevron) no-repeat right 6px center / 14px;cursor:pointer;border:0;outline:0;align-self:center;margin:0;padding:6px 26px 6px 4px}.field select option{background:var(--panel);color:var(--text)}.field.unset select{color:var(--muted)}#template,#insert{text-overflow:ellipsis;width:10em}#insert{width:7.5em}.field.text input{width:180px;font:500 12.5px var(--sans);color:var(--text);background:0 0;border:0;outline:0;margin:0;padding:0 10px 0 4px}.label-edit{z-index:20;height:30px;font:500 13px var(--sans);text-align:center;color:var(--text);background:var(--field);border:1px solid var(--accent);box-shadow:0 0 0 3px var(--accent-soft), var(--shadow);border-radius:8px;outline:0;padding:0 8px;position:fixed}.swatch{background:var(--sw,transparent);border-radius:3px;width:10px;height:10px;box-shadow:inset 0 0 0 1px #00000026}.swatch.none{background:repeating-linear-gradient(135deg, transparent 0 2px, var(--line-strong) 2px 3px)}main{--side:300px;grid-template-columns:minmax(280px, 32%) 1fr var(--side);min-height:0;display:grid}#left{border-right:1px solid var(--line);background:var(--panel);grid-template-rows:auto 1fr auto auto;min-height:0;display:grid;position:relative}.pane-head{border-bottom:1px solid var(--line);height:38px;color:var(--muted);align-items:center;gap:6px;padding:0 10px 0 6px;font-size:11px;font-weight:600;display:flex}#summary{white-space:nowrap;margin-left:auto}#tabs{scrollbar-width:none;gap:2px;min-width:0;display:flex;overflow-x:auto}.tab{height:28px;box-shadow:none;color:var(--muted);font:500 12px/1 var(--mono);white-space:nowrap;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:7px;align-items:center;gap:4px;padding:0 6px 0 10px;display:inline-flex}.tab:hover{background:var(--hover);color:var(--text);border-color:#0000}.tab[aria-selected=true]{background:var(--field);border-color:var(--line);color:var(--text);box-shadow:var(--shadow)}.tab .x{opacity:0;border-radius:4px;place-items:center;width:16px;height:16px;font-size:13px;line-height:1;display:inline-grid}.tab:hover .x,.tab[aria-selected=true] .x{opacity:.6}.tab .x:hover{opacity:1;background:var(--line)}.tab:only-child{padding-right:10px}.tab:only-child .x{display:none}button.ghost{box-shadow:none;background:0 0;border-color:#0000;flex:none;width:26px;height:26px}dialog{border:1px solid var(--line);background:var(--panel);width:min(640px,100vw - 32px);color:var(--text);box-shadow:var(--float);border-radius:12px;padding:0}dialog::backdrop{background:#0a0a1459}dialog form{gap:10px;padding:18px;display:grid}dialog h2{margin:0;font-size:15px}dialog p{color:var(--muted);margin:0}#import-text{resize:vertical;border:1px solid var(--line);background:var(--field);height:220px;color:var(--text);font:12.5px/1.55 var(--mono);border-radius:8px;outline:none;padding:10px 12px}#import-text:focus{border-color:var(--accent)}#import-msg{min-height:1em;font:12px/1.4 var(--mono);color:var(--warn);white-space:pre-wrap}#import-msg.error{color:var(--err)}dialog .row{align-items:center;gap:8px;display:flex}dialog .check{color:var(--muted);align-items:center;gap:6px;display:inline-flex}#summary{font-weight:500}#summary .bad{color:var(--err)}#source{resize:none;width:100%;height:100%;font:13px/1.65 var(--mono);color:inherit;tab-size:2;background:0 0;border:0;outline:0;padding:14px 16px}.lsp-wrap{min-height:0;position:relative}.lsp-paint{font:13px/1.65 var(--mono);tab-size:2;white-space:pre-wrap;overflow-wrap:break-word;color:var(--text);pointer-events:none;margin:0;padding:14px 16px;position:absolute;top:0;left:0;overflow:hidden}.lsp-wrap #source{color:#0000;caret-color:var(--text);position:relative}.t-comment{color:var(--muted);font-style:italic}.t-keyword{color:var(--syn-keyword)}.t-string{color:var(--syn-string)}.t-number{color:var(--syn-number)}.t-property{color:var(--syn-property)}.t-enumMember{color:var(--syn-value)}.t-operator{color:var(--muted)}.t-namespace,.t-type{color:var(--syn-group)}.t-class{color:var(--syn-class)}.mark{background:var(--accent-soft);border-radius:2px}.mark-decl{box-shadow:inset 0 -1px 0 var(--accent)}#source::selection{background:var(--accent-soft)}#diagnostics{min-height:56px;max-height:45%;font:12px/1.5 var(--mono);overflow:auto}#diagnostics:empty{display:none}#diagnostics div{cursor:pointer;padding:6px 16px 6px 30px;position:relative}#diagnostics div:hover{background:var(--hover)}#diagnostics div:before{content:"";background:currentColor;border-radius:50%;width:6px;height:6px;position:absolute;top:12px;left:16px}#diagnostics .error{color:var(--err)}#diagnostics .warning{color:var(--warn)}#diagnostics .fix{font:inherit;color:var(--accent);background:var(--accent-soft);cursor:pointer;border:0;border-radius:4px;margin-left:8px;padding:0 6px}.lsp-complete,.lsp-hover{z-index:50;background:var(--panel);color:var(--text);border:1px solid var(--line);box-shadow:var(--float);border-radius:6px;position:fixed}.lsp-complete{min-width:180px;max-width:420px;max-height:240px;font:12px/1.4 var(--mono);padding:4px;overflow:auto}.lsp-complete .item{cursor:pointer;white-space:nowrap;border-radius:4px;align-items:baseline;gap:8px;padding:3px 6px;display:flex}.lsp-complete .item.active{background:var(--accent-soft)}.lsp-complete .kind{text-align:center;width:1em;color:var(--accent)}.lsp-complete .detail{text-overflow:ellipsis;color:var(--muted);margin-left:auto;padding-left:12px;overflow:hidden}.lsp-hover{pointer-events:none;max-width:360px;padding:8px 10px;font:12px/1.5 system-ui,sans-serif}.lsp-hover code{font-family:var(--mono)}.split{z-index:5;touch-action:none}.split-x{cursor:col-resize;width:8px;position:absolute;top:0;bottom:0;right:-4px}.split-y{border-bottom:1px solid var(--line);cursor:row-resize;height:7px;margin-top:-3px}.split:hover,.split.dragging{background:var(--accent-soft)}.split-y:has(+#diagnostics:empty){display:none}#right{grid-template-rows:1fr;min-height:0;display:grid;position:relative}#stage{cursor:default;touch-action:none;-webkit-user-select:none;user-select:none;background:var(--canvas);flex-direction:column;padding:32px;display:flex;overflow:auto}#stage svg{border-radius:12px;flex:none;max-width:none;margin:auto;box-shadow:0 0 0 1px #0000000a,0 2px 6px #0000000f,0 12px 32px #00000014}#stage [data-node],#stage [data-group]>rect,#stage [data-edge-label],#stage [data-panel]{cursor:grab}#stage [data-edge]{cursor:pointer}#stage.dragging,#stage.dragging *,#stage.panning,#stage.panning *{cursor:grabbing!important}#stage.can-pan,#stage.can-pan *{cursor:grab!important}#stage.is-empty svg{display:none}.empty-hint{text-align:center;max-width:340px;color:var(--muted,#8a8f98);white-space:pre-wrap;margin:12px 0 0;font-size:13px;line-height:1.5}.float{box-shadow:var(--float);position:absolute;top:14px;right:14px}#zoom-fit{font-variant-numeric:tabular-nums;min-width:52px}#inspector{overscroll-behavior:contain;background:var(--panel);border-left:1px solid var(--line);flex-direction:column;min-height:0;font-size:12.5px;display:flex;overflow-y:auto}#inspector .title{z-index:2;min-height:46px;font:600 13px var(--mono);background:var(--panel);border-bottom:1px solid var(--line);align-items:center;gap:8px;padding:8px 10px 8px 14px;display:flex;position:sticky;top:0}#inspector .title>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}#inspector .title small{font:600 10px var(--sans);text-transform:uppercase;letter-spacing:.06em;color:var(--accent);background:var(--accent-soft);border-radius:5px;padding:2px 6px}#inspector section{border-bottom:1px solid var(--line);padding:12px 14px 14px}#inspector h3{margin:0 0 8px}#inspector h3>button{width:100%;height:auto;font:600 10.5px var(--sans);text-transform:uppercase;letter-spacing:.07em;color:var(--muted);box-shadow:none;background:0 0;border:0;justify-content:flex-start;gap:6px;padding:2px 0}#inspector h3>button:hover{color:var(--text)}#inspector h3>button:before{content:"";background:var(--chevron) no-repeat center / 10px;opacity:.7;width:10px;height:10px;transition:transform .12s}#inspector section.folded{padding-bottom:10px}#inspector section.folded h3{margin:0}#inspector section.folded h3>button:before{transform:rotate(-90deg)}#inspector section.folded>.rows{display:none}#inspector .rows{flex-direction:column;gap:4px;display:flex}#inspector .rows>button{align-self:flex-start}#inspector .field{background:var(--well);height:auto;min-height:30px;box-shadow:none;border-color:#0000;border-radius:7px;transition:border-color .12s,background .12s;display:flex;position:relative;overflow:visible}#inspector .field:hover{background:var(--field);border-color:var(--line-strong)}#inspector .field:focus-within{background:var(--field);border-color:var(--accent)}#inspector .field.unset>span{color:var(--muted)}#inspector .field:not(.unset)>span{color:var(--text)}#inspector .field>span{overflow-wrap:anywhere;flex:0 0 104px;padding:4px 6px 4px 10px;line-height:1.2}#inspector .info{width:13px;height:13px;color:var(--muted);border:1px solid var(--line-strong);cursor:help;border-radius:50%;flex:none;place-items:center;font:italic 600 9px/1 Georgia,serif;display:inline-grid}#inspector .info:hover,#inspector .info:focus-visible{color:var(--accent);border-color:var(--accent);outline:0}#inspector .info:is(:hover,:focus-visible):after{content:attr(data-tip);z-index:5;font:400 11.5px/1.4 var(--sans);color:var(--text);text-transform:none;letter-spacing:0;background:var(--panel);border:1px solid var(--line-strong);box-shadow:var(--float);pointer-events:none;border-radius:7px;padding:6px 8px;position:absolute;top:calc(100% + 4px);left:0;right:0}#inspector .field select,#inspector .field.text input{flex:1;width:auto;min-width:0}#inspector .field select:focus-visible{outline:0}#inspector .field input::placeholder{color:var(--muted);opacity:.8}#inspector .field.toggle{cursor:pointer}#inspector .field.toggle input{appearance:none;background:var(--line-strong);cursor:pointer;border-radius:8px;flex:none;align-self:center;width:28px;height:16px;margin:0 8px 0 auto;transition:background .15s;position:relative}#inspector .field.toggle input:after{content:"";background:#fff;border-radius:50%;width:12px;height:12px;transition:transform .15s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #00000040}#inspector .field.toggle input:checked{background:var(--accent)}#inspector .field.toggle input:checked:after{transform:translate(12px)}#inspector .field.toggle input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}#inspector .field.color{align-items:center}#inspector .field.color input[type=text]{min-width:0;height:100%;font:500 12px var(--mono);color:var(--text);background:0 0;border:0;outline:0;flex:1;padding:0 6px}#inspector .field .clear,#inspector .title .clear{width:26px;height:26px;color:var(--muted);box-shadow:none;background:0 0;border:0;flex:none;margin-right:2px;padding:0;font-size:15px}#inspector .clear:hover{color:var(--text)}.dot{background:var(--sw,transparent);cursor:pointer;border:0;border-radius:50%;flex:none;width:20px;height:20px;padding:0;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px #0000002e}.dot.none{background:repeating-linear-gradient(135deg, var(--field) 0 3px, var(--line-strong) 3px 4px)}.dot.on{box-shadow:0 0 0 2px var(--panel), 0 0 0 4px var(--accent)}.dot input[type=color]{opacity:0;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.dot.custom:not(.on){background:conic-gradient(#f87171,#fbbf24,#4ade80,#22d3ee,#818cf8,#e879f9,#f87171)}.field.color .dot{width:18px;height:18px;margin:0 2px 0 0}.palette{flex-wrap:wrap;gap:7px;padding:4px 2px;display:flex}.color-field{flex-direction:column;gap:4px;display:flex}.color-head{color:var(--muted);justify-content:space-between;font-size:11.5px;font-weight:500;display:flex}.color-head code{font:11px var(--mono);color:var(--text)}#inspector .color-text{height:26px;font:500 12px var(--mono);color:var(--text);border:1px solid var(--line,#7f7f7f40);background:0 0;border-radius:6px;outline:0;padding:0 8px}#inspector .color-text:focus{border-color:var(--accent)}.parts{flex-direction:column;gap:2px;display:flex}.parts-kind{color:var(--muted);margin:6px 0 2px;font-size:11px}.parts-kind:first-child{margin-top:0}.part>button{width:100%;height:28px;box-shadow:none;color:var(--text);font:500 12px var(--sans);text-align:left;background:0 0;border:1px solid #0000;border-radius:7px;align-items:center;gap:8px;padding:0 8px;display:flex}.part>button:hover,.part.open>button{background:var(--field);border-color:var(--line)}.part>button>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.part>button>code{font:10.5px var(--mono);color:var(--muted)}.part .palette{padding:8px 6px 6px}.part>.rows{padding:0 6px 6px}.part-actions{gap:4px;padding:0 6px 8px;display:flex}.part-actions>button,.part-add{border:1px solid var(--line);background:var(--field);min-width:28px;height:24px;box-shadow:none;color:var(--text);font:500 12px var(--sans);border-radius:6px;padding:0 8px}.part-actions>button:hover,.part-add:hover{border-color:var(--accent)}.part-add{align-self:flex-start;margin-top:6px}#inspector>.hint,#inspector section .hint{color:var(--muted);margin:0;font-size:12px;line-height:1.55}#inspector>.hint{padding:14px}kbd{font:11px var(--mono);background:var(--field);border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;padding:0 4px}@media (width<=1100px){.wide{display:none}}@media (width<=1000px){main{--side:260px}}@media (width<=760px){main{grid-template-rows:34% 40% 26%;grid-template-columns:1fr!important}#inspector{border-left:0;border-top:1px solid var(--line)}#left{border-right:0;border-bottom:1px solid var(--line)}.split-x,.field>span{display:none}#inspector .field>span{display:flex}.field select{padding-left:10px}}.src-mark{vertical-align:top;background:color-mix(in srgb, var(--accent) 14%, transparent);width:100%;min-height:1.65em;box-shadow:-4px 0 0 var(--accent);border-radius:2px;display:inline-block}#inspector .title .delete{height:24px;color:var(--muted);flex:none;margin-left:auto;padding:0 8px;font-size:11px}#inspector .title .delete:hover{color:#d64545}
|