yuhwa 1.1.0 → 1.2.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.
Files changed (39) hide show
  1. package/dist/astro.d.ts +1 -1
  2. package/dist/browser.d.ts +2 -2
  3. package/dist/browser.js +2 -2
  4. package/dist/cli.js +11 -6
  5. package/dist/editor/assets/index-BphHLTvA.js +689 -0
  6. package/dist/editor/assets/lsp.worker-sZtzIA6-.js +30 -0
  7. package/dist/editor/index.html +1 -1
  8. package/dist/{figure-db587hh6.d.ts → figure-CA2hy0xh.d.ts} +1 -1
  9. package/dist/{index-CAO4FUcz.d.ts → index-CnnoZYl0.d.ts} +29 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/ironmark.d.ts +1 -1
  13. package/dist/ironmark.js +1 -1
  14. package/dist/llms.txt +15 -10
  15. package/dist/lsp-browser.d.ts +2 -2
  16. package/dist/lsp-browser.js +1 -1
  17. package/dist/lsp-node.js +169 -31
  18. package/dist/lsp-server.d.ts +1 -1
  19. package/dist/lsp-server.js +1 -1
  20. package/dist/lsp.d.ts +44 -2
  21. package/dist/lsp.js +1 -1
  22. package/dist/markdown-it.d.ts +1 -1
  23. package/dist/markdown-it.js +1 -1
  24. package/dist/{node-DPojgovD.js → node-Bzn2uKXZ.js} +3 -3
  25. package/dist/remark.d.ts +1 -1
  26. package/dist/remark.js +1 -1
  27. package/dist/{server-BSHSx8uo.d.ts → server--jHjJjOS.d.ts} +1 -1
  28. package/dist/{server-CT_mbBNZ.js → server-Dxo7OG8K.js} +19 -2
  29. package/dist/{service-CNM6Z-RH.js → service-B1fpOg_L.js} +268 -29
  30. package/dist/{service-DquYYTVG.d.ts → service-Brvpt7Do.d.ts} +2 -0
  31. package/dist/{shared-B2rP00uA.js → shared-Ddw88O9D.js} +881 -417
  32. package/dist/{src-hrqH-a8K.js → src-DkQj7aIV.js} +855 -444
  33. package/dist/vite.d.ts +1 -1
  34. package/dist/vite.js +2 -2
  35. package/dist/vuepress.d.ts +1 -1
  36. package/dist/yuhwa.iife.js +63 -72
  37. package/package.json +1 -1
  38. package/dist/editor/assets/index-BGtCSg84.js +0 -689
  39. package/dist/editor/assets/lsp.worker-DUpBJRU2.js +0 -26
@@ -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-BGtCSg84.js"></script>
12
+ <script type="module" crossorigin src="./assets/index-BphHLTvA.js"></script>
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-DaWl0OPj.css">
14
14
  </head>
15
15
  <body>
@@ -1,4 +1,4 @@
1
- import { n as Options } from "./index-CAO4FUcz.js";
1
+ import { n as Options } from "./index-CnnoZYl0.js";
2
2
  interface YuhwaDocsOptions extends Omit<Options, "theme" | "file"> {
3
3
  /** theme for light mode (default `paper`) */
4
4
  theme?: string;
@@ -125,6 +125,10 @@ interface Seg {
125
125
  kind: SegKind;
126
126
  text: string;
127
127
  color?: string;
128
+ /** set by a `{size: 18, weight: 700, italic | …}` span */
129
+ size?: number;
130
+ weight?: number;
131
+ italic?: boolean;
128
132
  /** measured width, set by segsW */
129
133
  w?: number;
130
134
  }
@@ -370,6 +374,7 @@ interface YuhwaPlugin {
370
374
  /** allowed values for enum props (checked against the first word) */
371
375
  enums?: Record<string, string[]>;
372
376
  bools?: string[];
377
+ /** props that take a number of 0 or more */
373
378
  numbers?: string[];
374
379
  }
375
380
  interface Registry {
@@ -418,6 +423,8 @@ interface BodyMetrics {
418
423
  fs: number;
419
424
  lh: number;
420
425
  mono: boolean;
426
+ /** base font weight of text rows */
427
+ weight?: number;
421
428
  /** y offset and height per row */
422
429
  ys: number[];
423
430
  hs: number[];
@@ -435,6 +442,7 @@ interface CardBlock {
435
442
  icon?: string;
436
443
  meta?: string;
437
444
  caps: boolean;
445
+ italic: boolean;
438
446
  labelSize: number;
439
447
  labelLh: number;
440
448
  subSize: number;
@@ -477,6 +485,8 @@ interface TextBlock {
477
485
  iconSize: number;
478
486
  /** letter spacing for `caps` labels */
479
487
  letterSpacing: number;
488
+ /** `caps`: lines are upper-cased when drawn, so their markup survives */
489
+ caps: boolean;
480
490
  /** set for nodes drawn as cards (a body or `meta`) */
481
491
  card?: CardBlock;
482
492
  w: number;
@@ -565,6 +575,8 @@ interface NodeDecl {
565
575
  bodyLines?: [number, number];
566
576
  ref?: SourceRef;
567
577
  labelRef?: LabelRef;
578
+ /** the 0-based line each `[prop]` was last written on, for messages: `ref` is only the latest declaration */
579
+ propAt?: Record<string, number>;
568
580
  }
569
581
  interface EdgeDecl {
570
582
  key: string;
@@ -763,6 +775,8 @@ interface LaidGroup extends Box {
763
775
  lines?: string[];
764
776
  /** header height when it is taller than one line (default GROUP_HEADER) */
765
777
  header?: number;
778
+ /** line height of `lines` */
779
+ lineHeight?: number;
766
780
  }
767
781
  interface LaidEdge {
768
782
  key: string;
@@ -790,6 +804,9 @@ interface LaidEdge {
790
804
  w: number;
791
805
  h: number;
792
806
  };
807
+ /** line height of the label text and of the caption */
808
+ lineHeight: number;
809
+ captionLineHeight: number;
793
810
  rotate: boolean;
794
811
  };
795
812
  heads: {
@@ -810,6 +827,11 @@ interface ResolvedNodeStyle {
810
827
  radius: number;
811
828
  fontSize: number;
812
829
  fontWeight: number;
830
+ /** card body: text colour, font size, weight and row height (× bodySize) */
831
+ body: string;
832
+ bodySize: number;
833
+ bodyWeight: number;
834
+ lineHeight: number;
813
835
  italic: boolean;
814
836
  shadow: boolean;
815
837
  opacity: number;
@@ -820,6 +842,10 @@ interface ResolvedEdgeStyle {
820
842
  dash: string | null;
821
843
  curve: Curve;
822
844
  text: string;
845
+ /** label font: `font-size`, `font-weight`, `italic` */
846
+ fontSize: number;
847
+ fontWeight: number;
848
+ italic: boolean;
823
849
  labelBg: string;
824
850
  flow: boolean;
825
851
  opacity: number;
@@ -1077,6 +1103,8 @@ declare const GROUP_PROPS: string[];
1077
1103
  declare const PANEL_PROPS: string[];
1078
1104
  /** allowed values for enum-like props */
1079
1105
  declare const ENUMS: Record<string, string[]>;
1106
+ /** props whose value must be a colour (or `none`/`transparent`), on nodes, edges, groups and panels */
1107
+ declare const COLORS: string[];
1080
1108
  declare const BOOLS: string[];
1081
1109
  declare const NUMBERS: string[];
1082
1110
  /** a panel kind's typed header props, looked up by kind name */
@@ -1127,4 +1155,4 @@ declare function toSource(input: string | DiagramJSON): {
1127
1155
  };
1128
1156
  /** Parse, lay out and render a diagram to an SVG string. Never throws on bad input. */
1129
1157
  declare function render(input: string | DiagramJSON, opts?: Options): Result;
1130
- export { PANELS as $, PanelCtx as $t, MdBlock as A, createTheme as An, Layout as At, setProp as B, PartEdit as Bt, NODE_PROPS as C, RAMPS as Cn, GroupDecl as Ct, ConvertResult as D, TONES as Dn, LaidGroup as Dt, lint as E, THEME_NAMES as En, LaidEdge as Et, replaceBlockSource as F, ramp as Fn, PanelHandle as Ft, lineStyle as G, ShapeName as Gt, writeLayout as H, Props as Ht, editPart as I, registerTheme as In, PanelOverride as It, JsonResult as J, GRID as Jt, SHAPES as K, Side as Kt, formatLayout as L, themeNames as Ln, PanelPart as Lt, MdResult as M, isSafeCss as Mn, NodeDecl as Mt, findBlocks as N, isSafeLink as Nn, NodeOverride as Nt, fromMermaid as O, Theme as On, LaidNode as Ot, processMarkdown as P, isToneOrHex as Pn, PanelDecl as Pt, LexedLine as Q, FrameKind as Qt, setLabel as R, approxMeasure as Rn, PartAction as Rt, GROUP_PROPS as S, LineStyle$1 as Sn, EdgeOverride as St, PANEL_PROPS as T, THEME_KEYS as Tn, LabelRef as Tt, writePanelDrag as U, ResolvedEdgeStyle as Ut, setSetting as V, Point as Vt, dashFor as W, ResolvedNodeStyle as Wt, renderSvg as X, layout as Xt, fromJSON as Y, groupPath as Yt, KNOWN_SETTINGS as Z, Decoration as Zt, themes as _, Seg as _n, Curve as _t, render as a, StatementKind as an, isYuhwaPath as at, EDGE_PROPS as b, segsW as bn, Direction as bt, git as c, perPass as cn, onlyColor as ct, sequence as d, unuse as dn, serializeProps as dt, PanelKind as en, ParseOptions as et, legend as f, use as fn, setLineProp as ft, charts as g, InkColors as gn, Component as gt, tables as h, renderHead as hn, Box as ht, hash as i, RowPaint as in, blockBraces as it, MdOptions as j, getTheme as jn, LayoutOverrides as jt, isMermaid as k, ThemeInput as kn, LaidPanel as kt, chart as l, recolor as ln, parse as lt, frames as m, ShapeKind as mn, splitTrailingProps as mt, Options as n, RowCtx as nn, Tok as nt, toSource as o, YuhwaPlugin as on, joinPath as ot, footer as p, MarkerKind as pn, setTrailingProp as pt, DiagramJSON as q, SourceRef as qt, Result as r, RowKind as rn, TokKind as rt, builtins as s, optionKind as sn, lex as st, InputFormat as t, PanelOption as tn, SETTING_VALUES as tt, timeline as u, registry as un, parseProps as ut, GUIDE as v, parseInline as vn, Diagnostic as vt, NUMBERS as w, THEMES as wn, HeadKind as wt, ENUMS as x, tspans as xn, EdgeDecl as xt, BOOLS as y, renderSegs as yn, Diagram as yt, setPartTone as z, canvasMeasure as zn, PartChange as zt };
1158
+ export { LexedLine as $, FrameKind as $t, isMermaid as A, ThemeInput as An, LaidPanel as At, setPartTone as B, canvasMeasure as Bn, PartChange as Bt, GROUP_PROPS as C, LineStyle$1 as Cn, EdgeOverride as Ct, lint as D, THEME_NAMES as Dn, LaidEdge as Dt, PANEL_PROPS as E, THEME_KEYS as En, LabelRef as Et, processMarkdown as F, isToneOrHex as Fn, PanelDecl as Ft, dashFor as G, ResolvedNodeStyle as Gt, setSetting as H, Point as Ht, replaceBlockSource as I, ramp as In, PanelHandle as It, DiagramJSON as J, SourceRef as Jt, lineStyle as K, ShapeName as Kt, editPart as L, registerTheme as Ln, PanelOverride as Lt, MdOptions as M, getTheme as Mn, LayoutOverrides as Mt, MdResult as N, isSafeCss as Nn, NodeDecl as Nt, ConvertResult as O, TONES as On, LaidGroup as Ot, findBlocks as P, isSafeLink as Pn, NodeOverride as Pt, KNOWN_SETTINGS as Q, Decoration as Qt, formatLayout as R, themeNames as Rn, PanelPart as Rt, ENUMS as S, tspans as Sn, EdgeDecl as St, NUMBERS as T, THEMES as Tn, HeadKind as Tt, writeLayout as U, Props as Ut, setProp as V, PartEdit as Vt, writePanelDrag as W, ResolvedEdgeStyle as Wt, fromJSON as X, groupPath as Xt, JsonResult as Y, GRID as Yt, renderSvg as Z, layout as Zt, themes as _, InkColors as _n, Component as _t, render as a, RowPaint as an, blockBraces as at, COLORS as b, renderSegs as bn, Diagram as bt, git as c, optionKind as cn, lex as ct, sequence as d, registry as dn, parseProps as dt, PanelCtx as en, PANELS as et, legend as f, unuse as fn, serializeProps as ft, charts as g, renderHead as gn, Box as gt, tables as h, ShapeKind as hn, splitTrailingProps as ht, hash as i, RowKind as in, TokKind as it, MdBlock as j, createTheme as jn, Layout as jt, fromMermaid as k, Theme as kn, LaidNode as kt, chart as l, perPass as ln, onlyColor as lt, frames as m, MarkerKind as mn, setTrailingProp as mt, Options as n, PanelOption as nn, SETTING_VALUES as nt, toSource as o, StatementKind as on, isYuhwaPath as ot, footer as p, use as pn, setLineProp as pt, SHAPES as q, Side as qt, Result as r, RowCtx as rn, Tok as rt, builtins as s, YuhwaPlugin as sn, joinPath as st, InputFormat as t, PanelKind as tn, ParseOptions as tt, timeline as u, recolor as un, parse as ut, GUIDE as v, Seg as vn, Curve as vt, NODE_PROPS as w, RAMPS as wn, GroupDecl as wt, EDGE_PROPS as x, segsW as xn, Direction as xt, BOOLS as y, parseInline as yn, Diagnostic as yt, setLabel as z, approxMeasure as zn, PartAction as zt };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as PANELS, $t as PanelCtx, A as MdBlock, An as createTheme, At as Layout, B as setProp, Bt as PartEdit, C as NODE_PROPS, Cn as RAMPS, Ct as GroupDecl, D as ConvertResult, Dn as TONES, Dt as LaidGroup, E as lint, En as THEME_NAMES, Et as LaidEdge, F as replaceBlockSource, Fn as ramp, Ft as PanelHandle, G as lineStyle, Gt as ShapeName, H as writeLayout, Ht as Props, I as editPart, In as registerTheme, It as PanelOverride, J as JsonResult, Jt as GRID, K as SHAPES, Kt as Side, L as formatLayout, Ln as themeNames, Lt as PanelPart, M as MdResult, Mn as isSafeCss, Mt as NodeDecl, N as findBlocks, Nn as isSafeLink, Nt as NodeOverride, O as fromMermaid, On as Theme, Ot as LaidNode, P as processMarkdown, Pn as isToneOrHex, Pt as PanelDecl, Q as LexedLine, Qt as FrameKind, R as setLabel, Rn as approxMeasure, Rt as PartAction, S as GROUP_PROPS, Sn as LineStyle, St as EdgeOverride, T as PANEL_PROPS, Tn as THEME_KEYS, Tt as LabelRef, U as writePanelDrag, Ut as ResolvedEdgeStyle, V as setSetting, Vt as Point, W as dashFor, Wt as ResolvedNodeStyle, X as renderSvg, Xt as layout, Y as fromJSON, Yt as groupPath, Z as KNOWN_SETTINGS, Zt as Decoration, _ as themes, _n as Seg, _t as Curve, a as render, an as StatementKind, at as isYuhwaPath, b as EDGE_PROPS, bn as segsW, bt as Direction, c as git, cn as perPass, ct as onlyColor, d as sequence, dn as unuse, dt as serializeProps, en as PanelKind, et as ParseOptions, f as legend, fn as use, ft as setLineProp, g as charts, gn as InkColors, gt as Component, h as tables, hn as renderHead, ht as Box, i as hash, in as RowPaint, it as blockBraces, j as MdOptions, jn as getTheme, jt as LayoutOverrides, k as isMermaid, kn as ThemeInput, kt as LaidPanel, l as chart, ln as recolor, lt as parse, m as frames, mn as ShapeKind, mt as splitTrailingProps, n as Options, nn as RowCtx, nt as Tok, o as toSource, on as YuhwaPlugin, ot as joinPath, p as footer, pn as MarkerKind, pt as setTrailingProp, q as DiagramJSON, qt as SourceRef, r as Result, rn as RowKind, rt as TokKind, s as builtins, sn as optionKind, st as lex, t as InputFormat, tn as PanelOption, tt as SETTING_VALUES, u as timeline, un as registry, ut as parseProps, v as GUIDE, vn as parseInline, vt as Diagnostic, w as NUMBERS, wn as THEMES, wt as HeadKind, x as ENUMS, xn as tspans, xt as EdgeDecl, y as BOOLS, yn as renderSegs, yt as Diagram, z as setPartTone, zn as canvasMeasure, zt as PartChange } from "./index-CAO4FUcz.js";
2
- 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, 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, render, renderHead, renderSegs, renderSvg, replaceBlockSource, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, splitTrailingProps, tables, themeNames, themes, timeline, toSource, tspans, unuse, use, writeLayout, writePanelDrag };
1
+ import { $ as LexedLine, $t as FrameKind, A as isMermaid, An as ThemeInput, At as LaidPanel, B as setPartTone, Bn as canvasMeasure, Bt as PartChange, C as GROUP_PROPS, Cn as LineStyle, Ct as EdgeOverride, D as lint, Dn as THEME_NAMES, Dt as LaidEdge, E as PANEL_PROPS, En as THEME_KEYS, Et as LabelRef, F as processMarkdown, Fn as isToneOrHex, Ft as PanelDecl, G as dashFor, Gt as ResolvedNodeStyle, H as setSetting, Ht as Point, I as replaceBlockSource, In as ramp, It as PanelHandle, J as DiagramJSON, Jt as SourceRef, K as lineStyle, Kt as ShapeName, L as editPart, Ln as registerTheme, Lt as PanelOverride, M as MdOptions, Mn as getTheme, Mt as LayoutOverrides, N as MdResult, Nn as isSafeCss, Nt as NodeDecl, O as ConvertResult, On as TONES, Ot as LaidGroup, P as findBlocks, Pn as isSafeLink, Pt as NodeOverride, Q as KNOWN_SETTINGS, Qt as Decoration, R as formatLayout, Rn as themeNames, Rt as PanelPart, S as ENUMS, Sn as tspans, St as EdgeDecl, T as NUMBERS, Tn as THEMES, Tt as HeadKind, U as writeLayout, Ut as Props, V as setProp, Vt as PartEdit, W as writePanelDrag, Wt as ResolvedEdgeStyle, X as fromJSON, Xt as groupPath, Y as JsonResult, Yt as GRID, Z as renderSvg, Zt as layout, _ as themes, _n as InkColors, _t as Component, a as render, an as RowPaint, at as blockBraces, b as COLORS, bn as renderSegs, bt as Diagram, c as git, cn as optionKind, ct as lex, d as sequence, dn as registry, dt as parseProps, en as PanelCtx, et as PANELS, f as legend, fn as unuse, ft as serializeProps, g as charts, gn as renderHead, gt as Box, h as tables, hn as ShapeKind, ht as splitTrailingProps, i as hash, in as RowKind, it as TokKind, j as MdBlock, jn as createTheme, jt as Layout, k as fromMermaid, kn as Theme, kt as LaidNode, l as chart, ln as perPass, lt as onlyColor, m as frames, mn as MarkerKind, mt as setTrailingProp, n as Options, nn as PanelOption, nt as SETTING_VALUES, o as toSource, on as StatementKind, ot as isYuhwaPath, p as footer, pn as use, pt as setLineProp, q as SHAPES, qt as Side, r as Result, rn as RowCtx, rt as Tok, s as builtins, sn as YuhwaPlugin, st as joinPath, t as InputFormat, tn as PanelKind, tt as ParseOptions, u as timeline, un as recolor, ut as parse, v as GUIDE, vn as Seg, vt as Curve, w as NODE_PROPS, wn as RAMPS, wt as GroupDecl, x as EDGE_PROPS, xn as segsW, xt as Direction, y as BOOLS, yn as parseInline, yt as Diagnostic, z as setLabel, zn as approxMeasure, zt as PartAction } from "./index-CnnoZYl0.js";
2
+ 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, 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, segsW, sequence, serializeProps, setLabel, setLineProp, setPartTone, setProp, setSetting, setTrailingProp, splitTrailingProps, tables, themeNames, themes, timeline, toSource, tspans, unuse, use, writeLayout, writePanelDrag };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { nt as BOOLS, rt as EDGE_PROPS, it as ENUMS, b as GRID, at as GROUP_PROPS, i as GUIDE, H as KNOWN_SETTINGS, ot as NODE_PROPS, st as NUMBERS, U as PANELS, ct as PANEL_PROPS, vt as RAMPS, W as SETTING_VALUES, ut as SHAPES, yt as THEMES, bt as THEME_KEYS, xt as THEME_NAMES, St as TONES, A as approxMeasure, G as blockBraces, C as builtins, j as canvasMeasure, T as chart, P as charts, Ct as createTheme, ft as dashFor, c as editPart, a as findBlocks, k as footer, l as formatLayout, M as frames, v as fromJSON, g as fromMermaid, wt as getTheme, w as git, x as groupPath, t as hash, _ as isMermaid, Tt as isSafeCss, Et as isSafeLink, Dt as isToneOrHex, K as isYuhwaPath, q as joinPath, S as layout, O as legend, J as lex, pt as lineStyle, lt as lint, Y as onlyColor, I as optionKind, X as parse, mt as parseInline, Z as parseProps, L as perPass, o as processMarkdown, Ot as ramp, R as recolor, kt as registerTheme, z as registry, n as render, dt as renderHead, ht as renderSegs, y as renderSvg, s as replaceBlockSource, gt as segsW, D as sequence, Q as serializeProps, u as setLabel, $ as setLineProp, d as setPartTone, f as setProp, p as setSetting, et as setTrailingProp, tt as splitTrailingProps, N as tables, At as themeNames, F as themes, E as timeline, r as toSource, _t as tspans, B as unuse, V as use, m as writeLayout, h as writePanelDrag } from "./src-hrqH-a8K.js";
1
+ export { nt as BOOLS, rt as COLORS, it as EDGE_PROPS, at as ENUMS, b as GRID, ot as GROUP_PROPS, i as GUIDE, H as KNOWN_SETTINGS, st as NODE_PROPS, ct as NUMBERS, U as PANELS, lt as PANEL_PROPS, Ct as RAMPS, W as SETTING_VALUES, ft as SHAPES, wt as THEMES, Tt as THEME_KEYS, Et as THEME_NAMES, Dt as TONES, A as approxMeasure, G as blockBraces, C as builtins, j as canvasMeasure, T as chart, P as charts, Ot as createTheme, mt as dashFor, c as editPart, a as findBlocks, k as footer, l as formatLayout, M as frames, v as fromJSON, g as fromMermaid, kt as getTheme, w as git, x as groupPath, t as hash, _ as isMermaid, At as isSafeCss, jt as isSafeLink, Mt as isToneOrHex, K as isYuhwaPath, q as joinPath, S as layout, O as legend, J as lex, ht as lineStyle, dt as lint, Y as onlyColor, I as optionKind, X as parse, _t as parseInline, Z as parseProps, L as perPass, o as processMarkdown, Nt as ramp, R as recolor, Pt as registerTheme, z as registry, n as render, pt as renderHead, yt as renderSegs, y as renderSvg, s as replaceBlockSource, bt as segsW, D as sequence, Q as serializeProps, u as setLabel, $ as setLineProp, d as setPartTone, f as setProp, p as setSetting, et as setTrailingProp, tt as splitTrailingProps, N as tables, Ft as themeNames, F as themes, E as timeline, r as toSource, St as tspans, B as unuse, V as use, m as writeLayout, h as writePanelDrag } from "./src-DkQj7aIV.js";
@@ -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-db587hh6.js";
21
+ import { t as YuhwaDocsOptions } from "./figure-CA2hy0xh.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-DPojgovD.js";
1
+ import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-Bzn2uKXZ.js";
2
2
  // src/integrations/ironmark.ts
3
3
  /**
4
4
  * ironmark support: renders ```yuhwa fences before ironmark parses the file.
package/dist/llms.txt CHANGED
@@ -64,13 +64,14 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
64
64
  ```
65
65
  - Card: a node line ending in `{` takes body lines until a line that is only
66
66
  `}`. It draws a header (label, `meta` right, `caps` small caps), a divider
67
- and a monospace body.
67
+ and a monospace body. `font-size`/`font-weight`/`text` style the header;
68
+ `body-size`, `body-weight`, `body-color` and `line-height` style the body.
68
69
 
69
70
  ## Values
70
71
 
71
72
  - `color` sets fill, border and text in one: `[blue]` or `[color: blue]`.
72
- Palette: slate, gray, red, orange, amber, lime, green, teal, cyan, blue, indigo, purple, pink; shades like blue-600; any CSS colour. `fill`,
73
- `stroke` and `text` colour one part.
73
+ Palette: slate, gray, red, orange, amber, lime, green, teal, cyan, blue, indigo, purple, pink; shades like blue-600; any CSS colour. The colour
74
+ props (color, fill, stroke, text, sub-color, body-color, label-color, label-bg, background, edge-color) take the same values and colour one part.
74
75
  - Shapes: rounded, box, pill, circle, ellipse, diamond, hexagon, cylinder, parallelogram, document, note, text.
75
76
  - Line styles: solid, dashed, dotted. Heads: arrow, open, dot, diamond, bar, none. Sides (`exit`, `enter`): top, right, bottom, left, auto.
76
77
  - Themes: paper, midnight, blueprint, mono, pastel, terminal, sepia, frost, contrast, ocean, ember, dusk. Define one with `theme brand [base: midnight, accent: orange]`
@@ -79,9 +80,9 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
79
80
 
80
81
  ## Props
81
82
 
82
- - Node: shape, color, fill, stroke, text, sub, sub-color, icon, border, stroke-width, border-style, dashed, dotted, radius, bold, italic, font-size, font-weight, shadow, opacity, width, height, link, tooltip, meta, caps, mono, max-width, below, above, right-of, left-of, rank, frame.
83
- - Edge: style, width, color, stroke, curve, head, tail, flow, animate, opacity, label-color, label-bg, dashed, dotted, thick, exit, from-side, enter, to-side, constraint, caption, rotate, length.
84
- - Group: color, fill, stroke, text, border-style, dashed, dotted, meta, caps.
83
+ - Node: shape, color, fill, stroke, text, font-size, font-weight, italic, sub, sub-color, icon, border, stroke-width, border-style, dashed, dotted, radius, bold, shadow, opacity, width, height, link, tooltip, meta, caps, mono, body-size, body-color, body-weight, line-height, max-width, below, above, right-of, left-of, rank, frame.
84
+ - Edge: style, width, color, stroke, curve, head, tail, flow, animate, opacity, text, font-size, font-weight, italic, label-color, label-bg, dashed, dotted, thick, exit, from-side, enter, to-side, constraint, caption, rotate, length.
85
+ - Group: color, fill, stroke, text, font-size, font-weight, italic, border-style, dashed, dotted, meta, caps.
85
86
 
86
87
  `sub` is a second, smaller line; `icon` an emoji before the label; `link`
87
88
  makes a node clickable; `flow: true` animates an edge; `constraint: false`
@@ -108,8 +109,12 @@ checks "checks" [meta: 42s, caps: true] {
108
109
 
109
110
  Lines: text, `left || right` (right-aligned part), `---` divider, empty gap.
110
111
  Rows: `bars [color]: 3 5 4 8 6`, `spark [color]: 3 5 4 8 6`, `progress [color]: 72% Label`, `stat [color]: 99.9% uptime | 42ms p95`, `| a | b |`; a `|---|` row makes a table header.
111
- Inline markup (also in `title`, `subtitle`, `footer`): `**bold**`, `*muted*`,
112
- `~~strike~~`, ``code``, `[[chip]]` / `[[green: chip]]`, `{red: text}`.
112
+ Inline markup (in every text: labels, `sub`, edge labels, group and panel titles,
113
+ `title`, `subtitle`, `footer`): `**bold**`, `*muted*`, `~~strike~~`, ``code``,
114
+ `[[chip]]` / `[[green: chip]]`, `{red: text}`, and styled spans
115
+ `{color: red, size: 18, weight: 700, italic | text}` (short: `{red, bold | text}`).
116
+ Text props on every element (node, edge label, group and panel title): `text`,
117
+ `font-size`, `font-weight`, `italic`; a panel's `font-size` scales all its text.
113
118
 
114
119
  `legend: .svc Service | --> async | red Deprecated` and `footer: a | b` draw
115
120
  strips under the diagram; a legend item starts with a class, colour or arrow.
@@ -136,14 +141,14 @@ chart p95 "Latency p95" [type: column, unit: ms] {
136
141
  }
137
142
  ```
138
143
 
139
- Every panel takes `color`, `theme`, `background`, `fill`, `border`, `stroke`, `text`, `border-width`, `border-style`, `radius`, `shadow`, `frame`, `edge-color`, `edge-width`; `frame: false` drops the box. Body
144
+ Every panel takes `color`, `theme`, `background`, `fill`, `border`, `stroke`, `text`, `font-size`, `font-weight`, `italic`, `border-width`, `border-style`, `radius`, `shadow`, `frame`, `edge-color`, `edge-width`; `frame: false` drops the box. Body
140
145
  lines take `[props]` before the colon or at the end of the line.
141
146
 
142
147
  - `sequence`: `participant|actor id "Label" [color]` (`participant a, b, c` fixes the order), `a -> b: msg` (`-->` reply, `..>` dotted, `=>` thick, `a -> a` self call), `note a, b: text`, `--- section ---`. A message takes edge props at its end: `a -> b: retry [red, style: dotted]`. Header: `numbered`, `lifeline: <colour>`, `lifeline-style: dashed|dotted|solid`.
143
148
  - `timeline`: `when [color]: title`, then indented `- detail` lines. The colon needs a space after it, so `12:30: deploy` works. Header: `direction: right|down`.
144
149
  - `chart`: `label [color]: number` per line; `unit` is appended to values. Header: `type: bar|column|line|pie|donut`, `unit: …`.
145
150
  - `git`: `commit ["msg"] [tag: v1, id: a1b2, color, highlight|reverse]`, `branch name [from <branch|commit id|tag>] [color, order: 2, label: "…"]` (creates and checks out), `checkout name` / `switch name`, `merge name ["msg"] [tag: v2]`, `cherry-pick <id|tag|branch>`, `tag v1`. Starts on `main` (`[main: trunk]` renames it); `order` moves a lane. Header: `direction: right|down`.
146
- - `mindmap`: indentation is the tree, the first line the root; `-` / `*` bullets are optional. A trailing `[color]` tints a subtree, `[shape: box|pill|plain|circle]` changes one node. Header: `layout: both|right|left|down`, `colors: branches|mono`.
151
+ - `mindmap`: indentation is the tree, the first line the root; `-` / `*` bullets are optional. A trailing `[color]` tints a subtree, `[shape: box|pill|plain|circle]` changes one node, `[text: red, font-size: 18, font-weight: 700]` styles its text. Header: `layout: both|vertical|right|left|down|up`, `colors: branches|mono`.
147
152
  - `gantt`: `id "Label" [color, done, active, crit, milestone, progress: 60%, owner: ana]: start, length`. start: a date or `after a b` (empty: after the task above); length: 3h, 5d, 2w or an end date. `--- Section [color] ---` groups rows. Header: `today: …`, `scale: day|week|month`, `bars: soft|solid|outline|thin`, `labels: left|bar`, `notes: length|dates|none`, `density: compact|normal|loose`, `rows: striped|plain`, `grid: show|none`, `summary: show|hide`, `weekends: hide|show`, `arrows: elbow|curved|hide`.
148
153
  - `quadrant`: `x-axis Low -> High`, `y-axis Low -> High`, `q1..q4 [color]: label` (q1 top right, counter-clockwise), points `Name [color]: x, y` from 0 to 1.
149
154
  - `kanban`: a line at the outer indent is a column `Todo [color, limit: 3]`, `- text [owner: ana, ticket: X-1, priority: low|medium|high, color]` a card, deeper lines its details.
@@ -1,3 +1,3 @@
1
- import { t as ServerOptions } from "./server-BSHSx8uo.js";
2
- import { a as YuhwaService } from "./service-DquYYTVG.js";
1
+ import { t as ServerOptions } from "./server--jHjJjOS.js";
2
+ import { a as YuhwaService } from "./service-Brvpt7Do.js";
3
3
  export declare function startWorkerServer(opts?: ServerOptions): YuhwaService;
@@ -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-CT_mbBNZ.js";
1
+ import { a as __commonJSMin, i as require_api, n as require_api$2, r as require_api$1, t as startServer } from "./server-Dxo7OG8K.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 });