yuhwa 1.0.2 → 1.1.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 (51) hide show
  1. package/README.md +13 -12
  2. package/client.d.ts +9 -1
  3. package/dist/astro.d.ts +2 -2
  4. package/dist/astro.js +8 -1
  5. package/dist/browser.d.ts +11 -5
  6. package/dist/browser.js +27 -7
  7. package/dist/cli.js +602 -44
  8. package/dist/editor/assets/index-BGtCSg84.js +689 -0
  9. package/dist/editor/assets/lsp.worker-DUpBJRU2.js +26 -0
  10. package/dist/editor/index.html +5 -4
  11. package/dist/figure-db587hh6.d.ts +48 -0
  12. package/dist/{index-Dl845tUQ.d.ts → index-CAO4FUcz.d.ts} +48 -7
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index.js +1 -1
  15. package/dist/ironmark.d.ts +4 -2
  16. package/dist/ironmark.js +18 -7
  17. package/dist/llms.txt +12 -8
  18. package/dist/lsp-browser.d.ts +2 -2
  19. package/dist/lsp-browser.js +1 -1
  20. package/dist/lsp-node.js +40 -182
  21. package/dist/lsp-server.d.ts +1 -1
  22. package/dist/lsp-server.js +1 -1
  23. package/dist/lsp.d.ts +1 -1
  24. package/dist/lsp.js +1 -1
  25. package/dist/markdown-it.d.ts +2 -1
  26. package/dist/markdown-it.js +7 -6
  27. package/dist/node-DPojgovD.js +224 -0
  28. package/dist/remark.d.ts +2 -1
  29. package/dist/remark.js +16 -5
  30. package/dist/{server-DJC_fQMe.d.ts → server-BSHSx8uo.d.ts} +2 -2
  31. package/dist/{server-DmQuHQrG.js → server-CT_mbBNZ.js} +1 -1
  32. package/dist/{service-BYS9Qfkq.js → service-CNM6Z-RH.js} +81 -16
  33. package/dist/{service-ClZ8clSQ.d.ts → service-DquYYTVG.d.ts} +1 -1
  34. package/dist/{shared-qo_r6RUN.js → shared-B2rP00uA.js} +2292 -429
  35. package/dist/{src-wk7tBpWs.js → src-hrqH-a8K.js} +2094 -407
  36. package/dist/style.css +14 -0
  37. package/dist/vite.d.ts +1 -1
  38. package/dist/vite.js +19 -12
  39. package/dist/vuepress.d.ts +3 -1
  40. package/dist/vuepress.js +7 -2
  41. package/dist/yuhwa.iife.js +90 -65
  42. package/dist/zoom-CCSUbX1X.d.ts +49 -0
  43. package/dist/zoom-QeqB6QlH.js +275 -0
  44. package/dist/zoom-script-CVdAzMhX.js +51 -0
  45. package/dist/zoom.d.ts +35 -0
  46. package/dist/zoom.js +19 -0
  47. package/package.json +10 -2
  48. package/dist/editor/assets/index-BQLsumas.js +0 -587
  49. package/dist/editor/assets/lsp.worker-RlPj9blG.js +0 -26
  50. package/dist/figure-BZHIKnxv.d.ts +0 -27
  51. package/dist/node-Bneu5eJV.js +0 -108
@@ -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-BQLsumas.js"></script>
12
+ <script type="module" crossorigin src="./assets/index-BGtCSg84.js"></script>
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-DaWl0OPj.css">
14
14
  </head>
15
15
  <body>
@@ -161,7 +161,7 @@
161
161
  <svg><use href="#i-reset" /></svg>
162
162
  </button>
163
163
  </div>
164
- <button id="import" title="Import a Mermaid flowchart, JSON or a .yuhwa file">
164
+ <button id="import" title="Import a Mermaid flowchart, JSON or a .yu file">
165
165
  <svg><use href="#i-import" /></svg><span class="wide">Import</span>
166
166
  </button>
167
167
  <div class="spacer"></div>
@@ -192,7 +192,7 @@
192
192
  <button
193
193
  id="add-file"
194
194
  class="icon ghost"
195
- title='New file (import it with import "./name.yuhwa")'
195
+ title='New file (import it with import "./name.yu")'
196
196
  aria-label="New file"
197
197
  >
198
198
  <svg><use href="#i-plus" /></svg>
@@ -224,7 +224,8 @@
224
224
  <div id="import-msg" role="status"></div>
225
225
  <div class="row">
226
226
  <label class="button"
227
- ><input id="import-file" type="file" accept=".mmd,.mermaid,.json,.yuhwa,.txt,.md" hidden />Open file…</label
227
+ ><input id="import-file" type="file" accept=".mmd,.mermaid,.json,.yu,.yuhwa,.txt,.md" hidden />Open
228
+ file…</label
228
229
  >
229
230
  <label class="check"><input id="import-new" type="checkbox" checked /> as a new file</label>
230
231
  <span class="spacer"></span>
@@ -0,0 +1,48 @@
1
+ import { n as Options } from "./index-CAO4FUcz.js";
2
+ interface YuhwaDocsOptions extends Omit<Options, "theme" | "file"> {
3
+ /** theme for light mode (default `paper`) */
4
+ theme?: string;
5
+ /**
6
+ * theme for dark mode (default `midnight`); `false` renders one image only.
7
+ * A block that sets `theme:` itself always renders one image.
8
+ */
9
+ darkTheme?: string | false;
10
+ /**
11
+ * How the dark image is picked:
12
+ * - `class` (default): two images; `yuhwa/style.css` shows the one
13
+ * matching the site's colour toggle (`.dark`, `[data-theme="dark"]` ...)
14
+ * - `media`: a `<picture>` that follows the OS setting; needs no CSS.
15
+ * Only with `output: 'img'`: inline SVGs fall back to `class`
16
+ */
17
+ darkMode?: "class" | "media";
18
+ /**
19
+ * `svg` inlines the SVG instead of an `<img>` (markdown-it only; keeps
20
+ * diagram text selectable and links clickable). Not for Vue-based sites.
21
+ */
22
+ output?: "img" | "svg";
23
+ /** throw on errors and fail the build (default `true`); `false` shows them under the diagram */
24
+ strict?: boolean;
25
+ /** fence languages handled (default `['yuhwa']`) */
26
+ languages?: string[];
27
+ /**
28
+ * Folder that `file="..."` blocks and imports must stay inside. A `file`
29
+ * path that starts with `/` resolves against it. Unset: any `.yu` file.
30
+ */
31
+ root?: string;
32
+ /**
33
+ * Pan and zoom every diagram in a small viewer: drag, Ctrl/⌘ + wheel,
34
+ * pinch, buttons and full screen (default `false`). A fence turns it on or
35
+ * off for one block with `zoom`, `zoom=480` or `no-zoom`.
36
+ * - `true`: marks the figures; load `yuhwa/zoom` once in the site's client
37
+ * code (Astro and VuePress do that for you)
38
+ * - `'inline'`: also adds the script inline, once per page; for plain HTML
39
+ * output, not for MDX or Vue-based sites
40
+ */
41
+ zoom?: boolean | "inline";
42
+ /**
43
+ * Height of the zoom viewer, a CSS length or a number of pixels. Unset: the
44
+ * diagram's own height. `zoom=480` on a fence sets it for one block.
45
+ */
46
+ zoomHeight?: string | number;
47
+ }
48
+ export { YuhwaDocsOptions as t };
@@ -264,7 +264,21 @@ interface PanelCtx {
264
264
  * has its distance in `x`.
265
265
  */
266
266
  offsets: Record<string, Point>;
267
+ /**
268
+ * unique per diagram and panel: prefix ids the panel defines (`<pattern
269
+ * id>`, gradients) with it, so two diagrams on one page do not clash
270
+ */
271
+ idPrefix?: string;
267
272
  }
273
+ /** a header prop's values, or the kind of field that edits it */
274
+ type PanelOption = readonly string[] | "color" | "number" | "flag" | "text";
275
+ /** what `options[key]` asks for: a select of values, or one kind of field */
276
+ declare function optionKind(o: PanelOption): {
277
+ kind: "select";
278
+ values: readonly string[];
279
+ } | {
280
+ kind: Exclude<PanelOption, readonly string[]>;
281
+ };
268
282
  /**
269
283
  * A diagram type drawn as a panel next to (or instead of) the graph:
270
284
  *
@@ -295,10 +309,11 @@ interface PanelKind<P = any> {
295
309
  */
296
310
  handles?(data: P, box: Box, ctx: PanelCtx): PanelHandle[];
297
311
  /**
298
- * header props an editor offers, e.g. `{ direction: ['right', 'down'] }`:
299
- * a select of the values, or a text field for an empty list
312
+ * header props an editor offers: a list of values is a select
313
+ * (`{ direction: ['right', 'down'] }`), and `'color'`, `'number'`, `'text'`
314
+ * or `'flag'` (off unless written, a checkbox) picks the field
300
315
  */
301
- options?: Record<string, string[]>;
316
+ options?: Record<string, PanelOption>;
302
317
  /** the parts an editor lists with a colour picker */
303
318
  parts?(data: P): PanelPart[];
304
319
  /**
@@ -338,7 +353,7 @@ interface YuhwaPlugin {
338
353
  shapes?: ShapeKind[];
339
354
  /** edge end markers, usable as `[head: name]` / `[tail: name]` */
340
355
  markers?: MarkerKind[];
341
- /** change the parsed diagram (add nodes, derive classes, …); runs after every `parse` */
356
+ /** change the parsed diagram (add nodes, derive classes, …); runs once per `parse`, after imports are merged */
342
357
  transform?(d: Diagram): void;
343
358
  /** move or annotate laid out nodes and edges; runs at the end of `layout` */
344
359
  afterLayout?(L: Layout, d: Diagram): void;
@@ -379,6 +394,12 @@ declare function recolor<P>(fn: (body: string[], id: string, tone: string | null
379
394
  declare const registry: Registry;
380
395
  /** Register plugins. Registering the same plugin name twice is a no-op. */
381
396
  declare function use(...plugins: YuhwaPlugin[]): void;
397
+ /**
398
+ * Unregister a plugin by name: every table is rebuilt from the state before
399
+ * the first `use` and the other plugins are registered again, in order.
400
+ * Returns false when no plugin has that name.
401
+ */
402
+ declare function unuse(name: string): boolean;
382
403
  /** a parsed body row; plugin rows carry their own fields */
383
404
  type Row = {
384
405
  kind: "text";
@@ -462,6 +483,7 @@ interface TextBlock {
462
483
  h: number;
463
484
  }
464
485
  declare function groupPath(d: Diagram, groupId: string | undefined): string[];
486
+ /** place nodes, route edges and size panels; a plugin that throws becomes a diagnostic on `d` */
465
487
  declare function layout(d: Diagram, opts?: LayoutOptions): Layout;
466
488
  /** Snap step for editors, in diagram units. The `grid: true` pattern is drawn every 2 steps. */
467
489
  declare const GRID = 12;
@@ -484,6 +506,8 @@ interface Diagnostic {
484
506
  line: number;
485
507
  message: string;
486
508
  severity: "error" | "warning";
509
+ /** stable id for a finding kind, e.g. `unused-class` from `yuhwa lint` */
510
+ code?: string;
487
511
  }
488
512
  /** Where a statement lives in the source, so tools can edit it in place. */
489
513
  interface SourceRef {
@@ -597,6 +621,11 @@ interface Diagram {
597
621
  classes: Record<string, Props>;
598
622
  /** 0-based line where each class was (last) defined */
599
623
  classLines?: Record<string, number>;
624
+ /** 0-based line where each `$variable` and `def` component was (last) defined */
625
+ varLines?: Record<string, number>;
626
+ defLines?: Record<string, number>;
627
+ /** variables (`$x`) and components (`f`) this file uses, for `yuhwa lint` */
628
+ used?: Set<string>;
600
629
  layout: LayoutOverrides;
601
630
  /** 0-based inclusive line range of the `layout { ... }` block */
602
631
  layoutBlock?: [number, number];
@@ -730,6 +759,10 @@ interface LaidGroup extends Box {
730
759
  text: string;
731
760
  dash: string | null;
732
761
  };
762
+ /** the label's lines, when it wraps (or has `\n`) */
763
+ lines?: string[];
764
+ /** header height when it is taller than one line (default GROUP_HEADER) */
765
+ header?: number;
733
766
  }
734
767
  interface LaidEdge {
735
768
  key: string;
@@ -841,7 +874,7 @@ interface ParseOptions {
841
874
  seen?: Set<string>;
842
875
  }
843
876
  /**
844
- * Imports only read `.yuhwa` files: a diagram must not pull other files
877
+ * Imports only read `.yu` (or the older `.yuhwa`) files: a diagram must not pull other files
845
878
  * (keys, configs) into its output or errors, whatever the resolver.
846
879
  */
847
880
  declare const isYuhwaPath: (path: string) => boolean;
@@ -894,6 +927,7 @@ interface RenderOptions {
894
927
  /** draw a dot every n units, from the origin: shows an editor's snap grid */
895
928
  snapGrid?: number;
896
929
  }
930
+ /** the SVG for a laid out diagram; a plugin that throws becomes a diagnostic on `d` */
897
931
  declare function renderSvg(d: Diagram, L: Layout, opts?: RenderOptions): string;
898
932
  type Scalar = string | number | boolean;
899
933
  type PropBag = Record<string, unknown>;
@@ -1002,6 +1036,11 @@ interface MdOptions {
1002
1036
  resolve?: (path: string) => string | undefined;
1003
1037
  /** path of the markdown file; imports in blocks resolve against its folder */
1004
1038
  file?: string;
1039
+ /**
1040
+ * Link each image to this URL, such as a page that pans and zooms the
1041
+ * diagram (`yuhwa md --view`). Gets the block's source.
1042
+ */
1043
+ view?: (source: string) => string;
1005
1044
  }
1006
1045
  interface MdResult {
1007
1046
  markdown: string;
@@ -1040,7 +1079,9 @@ declare const PANEL_PROPS: string[];
1040
1079
  declare const ENUMS: Record<string, string[]>;
1041
1080
  declare const BOOLS: string[];
1042
1081
  declare const NUMBERS: string[];
1043
- declare function lint(d: Diagram): void;
1082
+ /** a panel kind's typed header props, looked up by kind name */
1083
+ type PanelOptions = (kind: string) => Record<string, PanelOption> | undefined;
1084
+ declare function lint(d: Diagram, panelOptions?: PanelOptions): void;
1044
1085
  declare const GUIDE: string;
1045
1086
  declare const themes: YuhwaPlugin;
1046
1087
  declare const charts: YuhwaPlugin;
@@ -1086,4 +1127,4 @@ declare function toSource(input: string | DiagramJSON): {
1086
1127
  };
1087
1128
  /** Parse, lay out and render a diagram to an SVG string. Never throws on bad input. */
1088
1129
  declare function render(input: string | DiagramJSON, opts?: Options): Result;
1089
- export { PANELS as $, PanelCtx as $t, MdBlock as A, isSafeLink as An, Layout as At, setProp as B, PartEdit as Bt, NODE_PROPS as C, THEME_NAMES as Cn, GroupDecl as Ct, ConvertResult as D, createTheme as Dn, LaidGroup as Dt, lint as E, ThemeInput as En, LaidEdge as Et, replaceBlockSource as F, approxMeasure as Fn, PanelHandle as Ft, lineStyle as G, ShapeName as Gt, writeLayout as H, Props as Ht, editPart as I, canvasMeasure as In, PanelOverride as It, JsonResult as J, GRID as Jt, SHAPES as K, Side as Kt, formatLayout as L, PanelPart as Lt, MdResult as M, ramp as Mn, NodeDecl as Mt, findBlocks as N, registerTheme as Nn, NodeOverride as Nt, fromMermaid as O, getTheme as On, LaidNode as Ot, processMarkdown as P, themeNames as Pn, PanelDecl as Pt, LexedLine as Q, FrameKind as Qt, setLabel as R, PartAction as Rt, GROUP_PROPS as S, THEME_KEYS as Sn, EdgeOverride as St, PANEL_PROPS as T, Theme 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 _, segsW as _n, Curve as _t, render as a, YuhwaPlugin as an, isYuhwaPath as at, EDGE_PROPS as b, RAMPS as bn, Direction as bt, git as c, registry as cn, onlyColor as ct, sequence as d, ShapeKind as dn, serializeProps as dt, PanelKind as en, ParseOptions as et, legend as f, renderHead as fn, setLineProp as ft, charts as g, renderSegs as gn, Component as gt, tables as h, parseInline as hn, Box as ht, hash as i, StatementKind as in, blockBraces as it, MdOptions as j, isToneOrHex as jn, LayoutOverrides as jt, isMermaid as k, isSafeCss as kn, LaidPanel as kt, chart as l, use as ln, parse as lt, frames as m, Seg as mn, splitTrailingProps as mt, Options as n, RowKind as nn, Tok as nt, toSource as o, perPass as on, joinPath as ot, footer as p, InkColors as pn, setTrailingProp as pt, DiagramJSON as q, SourceRef as qt, Result as r, RowPaint as rn, TokKind as rt, builtins as s, recolor as sn, lex as st, InputFormat as t, RowCtx as tn, SETTING_VALUES as tt, timeline as u, MarkerKind as un, parseProps as ut, GUIDE as v, tspans as vn, Diagnostic as vt, NUMBERS as w, TONES as wn, HeadKind as wt, ENUMS as x, THEMES as xn, EdgeDecl as xt, BOOLS as y, LineStyle$1 as yn, Diagram as yt, setPartTone as z, PartChange as zt };
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 };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as PANELS, $t as PanelCtx, A as MdBlock, An as isSafeLink, At as Layout, B as setProp, Bt as PartEdit, C as NODE_PROPS, Cn as THEME_NAMES, Ct as GroupDecl, D as ConvertResult, Dn as createTheme, Dt as LaidGroup, E as lint, En as ThemeInput, Et as LaidEdge, F as replaceBlockSource, Fn as approxMeasure, Ft as PanelHandle, G as lineStyle, Gt as ShapeName, H as writeLayout, Ht as Props, I as editPart, In as canvasMeasure, It as PanelOverride, J as JsonResult, Jt as GRID, K as SHAPES, Kt as Side, L as formatLayout, Lt as PanelPart, M as MdResult, Mn as ramp, Mt as NodeDecl, N as findBlocks, Nn as registerTheme, Nt as NodeOverride, O as fromMermaid, On as getTheme, Ot as LaidNode, P as processMarkdown, Pn as themeNames, Pt as PanelDecl, Q as LexedLine, Qt as FrameKind, R as setLabel, Rt as PartAction, S as GROUP_PROPS, Sn as THEME_KEYS, St as EdgeOverride, T as PANEL_PROPS, Tn as Theme, 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 segsW, _t as Curve, a as render, an as YuhwaPlugin, at as isYuhwaPath, b as EDGE_PROPS, bn as RAMPS, bt as Direction, c as git, cn as registry, ct as onlyColor, d as sequence, dn as ShapeKind, dt as serializeProps, en as PanelKind, et as ParseOptions, f as legend, fn as renderHead, ft as setLineProp, g as charts, gn as renderSegs, gt as Component, h as tables, hn as parseInline, ht as Box, i as hash, in as StatementKind, it as blockBraces, j as MdOptions, jn as isToneOrHex, jt as LayoutOverrides, k as isMermaid, kn as isSafeCss, kt as LaidPanel, l as chart, ln as use, lt as parse, m as frames, mn as Seg, mt as splitTrailingProps, n as Options, nn as RowKind, nt as Tok, o as toSource, on as perPass, ot as joinPath, p as footer, pn as InkColors, pt as setTrailingProp, q as DiagramJSON, qt as SourceRef, r as Result, rn as RowPaint, rt as TokKind, s as builtins, sn as recolor, st as lex, t as InputFormat, tn as RowCtx, tt as SETTING_VALUES, u as timeline, un as MarkerKind, ut as parseProps, v as GUIDE, vn as tspans, vt as Diagnostic, w as NUMBERS, wn as TONES, wt as HeadKind, x as ENUMS, xn as THEMES, xt as EdgeDecl, y as BOOLS, yn as LineStyle, yt as Diagram, z as setPartTone, zt as PartChange } from "./index-Dl845tUQ.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 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, 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, use, writeLayout, writePanelDrag };
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 };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { et as BOOLS, tt as EDGE_PROPS, nt as ENUMS, b as GRID, rt as GROUP_PROPS, i as GUIDE, B as KNOWN_SETTINGS, it as NODE_PROPS, at as NUMBERS, V as PANELS, ot as PANEL_PROPS, gt as RAMPS, H as SETTING_VALUES, ct as SHAPES, _t as THEMES, vt as THEME_KEYS, yt as THEME_NAMES, bt as TONES, k as approxMeasure, U as blockBraces, C as builtins, A as canvasMeasure, T as chart, P as charts, xt as createTheme, ut as dashFor, c as editPart, a as findBlocks, j as footer, l as formatLayout, M as frames, v as fromJSON, g as fromMermaid, St as getTheme, w as git, x as groupPath, t as hash, _ as isMermaid, Ct as isSafeCss, wt as isSafeLink, Tt as isToneOrHex, W as isYuhwaPath, G as joinPath, S as layout, O as legend, K as lex, dt as lineStyle, st as lint, q as onlyColor, J as parse, ft as parseInline, Y as parseProps, I as perPass, o as processMarkdown, Et as ramp, L as recolor, Dt as registerTheme, R as registry, n as render, lt as renderHead, pt as renderSegs, y as renderSvg, s as replaceBlockSource, mt as segsW, D as sequence, X as serializeProps, u as setLabel, Z as setLineProp, d as setPartTone, f as setProp, p as setSetting, Q as setTrailingProp, $ as splitTrailingProps, N as tables, Ot as themeNames, F as themes, E as timeline, r as toSource, ht as tspans, z as use, m as writeLayout, h as writePanelDrag } from "./src-wk7tBpWs.js";
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";
@@ -13,10 +13,12 @@
13
13
  *
14
14
  * Each block becomes the same `<figure class="yuhwa">` as in the other docs
15
15
  * integrations; void tags are self-closed and `.mdx` files get `className`, so
16
- * MDX takes it as JSX.
16
+ * MDX takes it as JSX. `.mdx` files always get images (`output: 'img'`).
17
17
  * A fence with `no-render` (```yuhwa no-render) stays a code block.
18
+ * ```yuhwa file="diagrams/arch.yu" renders that file instead of the block.
19
+ * `zoom: 'inline'` adds the zoom script to `.md` output only; in `.mdx`, import `yuhwa/zoom`.
18
20
  */
19
- import { t as YuhwaDocsOptions } from "./figure-BZHIKnxv.js";
21
+ import { t as YuhwaDocsOptions } from "./figure-db587hh6.js";
20
22
  /** replaces every yuhwa fence in `md` with its rendered figure */
21
23
  export declare function renderFences(md: string, opts?: YuhwaDocsOptions, file?: string): string;
22
24
  interface VitePlugin {
package/dist/ironmark.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as wantsRender, r as renderFigure, t as diskResolve } from "./node-Bneu5eJV.js";
1
+ import { a as wantsRender, i as toHtml, n as renderBlock, o as zoomTag } from "./node-DPojgovD.js";
2
2
  // src/integrations/ironmark.ts
3
3
  /**
4
4
  * ironmark support: renders ```yuhwa fences before ironmark parses the file.
@@ -15,15 +15,22 @@ import { i as wantsRender, r as renderFigure, t as diskResolve } from "./node-Bn
15
15
  *
16
16
  * Each block becomes the same `<figure class="yuhwa">` as in the other docs
17
17
  * integrations; void tags are self-closed and `.mdx` files get `className`, so
18
- * MDX takes it as JSX.
18
+ * MDX takes it as JSX. `.mdx` files always get images (`output: 'img'`).
19
19
  * A fence with `no-render` (```yuhwa no-render) stays a code block.
20
+ * ```yuhwa file="diagrams/arch.yu" renders that file instead of the block.
21
+ * `zoom: 'inline'` adds the zoom script to `.md` output only; in `.mdx`, import `yuhwa/zoom`.
20
22
  */
23
+ const JSX_ATTR = {
24
+ class: "className",
25
+ srcset: "srcSet"
26
+ };
21
27
  const FENCE = /^ {0,3}(`{3,}|~{3,})\s*([^\s`]*)(.*)$/;
22
28
  /** replaces every yuhwa fence in `md` with its rendered figure */
23
29
  function renderFences(md, opts = {}, file) {
24
30
  const lines = md.split("\n");
25
31
  const out = [];
26
32
  const jsx = /\.mdx$/i.test(file ?? "");
33
+ let script = opts.zoom === "inline" && !jsx;
27
34
  for (let i = 0; i < lines.length; i++) {
28
35
  const m = lines[i].match(FENCE);
29
36
  if (!m) {
@@ -40,14 +47,18 @@ function renderFences(md, opts = {}, file) {
40
47
  continue;
41
48
  }
42
49
  const source = lines.slice(i + 1, j).join("\n");
43
- let { html } = renderFigure(source, {
44
- resolve: diskResolve,
45
- ...opts
46
- }, {
50
+ let { html } = renderBlock(source, meta.trim(), jsx ? {
51
+ ...opts,
52
+ output: "img"
53
+ } : opts, {
47
54
  file,
48
55
  line: i + 1
49
56
  });
50
- if (jsx) html = html.replace(/ (class|srcset)="/g, (_, a) => ` ${a === "class" ? "className" : "srcSet"}="`);
57
+ if (jsx) html = html.replace(/ (class|srcset)="/g, (_, a) => ` ${JSX_ATTR[a]}="`).replace(/[{}]/g, (c) => c === "{" ? "&#123;" : "&#125;");
58
+ if (script) {
59
+ html += toHtml(zoomTag());
60
+ script = false;
61
+ }
51
62
  out.push("", html.replace(/\n\s*\n/g, "\n"), "");
52
63
  i = j;
53
64
  }
package/dist/llms.txt CHANGED
@@ -4,7 +4,7 @@ yuhwa is a text diagram language that renders to a self-contained SVG. One
4
4
  statement per line. `//` at line start or after a space starts a comment, so
5
5
  URLs in labels stay text. There is no `#` comment.
6
6
 
7
- Workflow: write the source, run `yuhwa check file.yuhwa --json` (or read the
7
+ Workflow: write the source, run `yuhwa check file.yu --json` (or read the
8
8
  `diagnostics` of `render`), fix every error and warning, then render. Done
9
9
  when it reports 0 diagnostics; they name the fix ("did you mean ...").
10
10
 
@@ -31,7 +31,7 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
31
31
 
32
32
  ## Statements
33
33
 
34
- - Setting: `key: value` at top level. Keys: title, subtitle, theme, accent, direction (right|down|left|up), curve (smooth|orthogonal|straight), gap, rank-gap, font, font-size, background, padding, shadow, radius, stroke-width, shape, grid, panels (row|column|grid|wrap), panel-gap, wrap, edge-color, edge-width, legend, footer.
34
+ - Setting: `key: value` at top level. Keys: title, subtitle, theme, accent, direction (right|down|left|up), curve (smooth|orthogonal|straight), gap, rank-gap, max-width, font, font-size, background, padding, shadow, radius, stroke-width, shape, grid, panels (row|column|grid|wrap), panel-gap, wrap, edge-color, edge-width, legend, footer.
35
35
  - Node: `id "Label" .class [props]`; label, classes and props are optional.
36
36
  Ids: letters (any script), digits, `_`, inner `-`; start with a letter or `_`.
37
37
  The label defaults to the id; multi-word labels need quotes. `\n` breaks a
@@ -51,7 +51,7 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
51
51
  `$a`. `name(x, "Label, with comma", b: y)` stamps it out. Use one per
52
52
  repeated shape of nodes instead of copying lines.
53
53
  - Group: `group id "Label" .class [props] { ... }`, may nest. `group "Label" {`
54
- gets a slug id. Edges connect nodes only, never groups.
54
+ gets a slug id. Edges connect nodes and panel ids (`plan -> sales`), never groups.
55
55
  - Props: `[key: value, key: "a, b", flag]`; a bare flag means true, a bare
56
56
  value names its key: `[cylinder, amber, dashed]`.
57
57
  - Props on their own lines: a `key: value` line indented under a node, edge,
@@ -79,13 +79,16 @@ orders --> queue "Events" [shape: hexagon]: publish [flow: true]
79
79
 
80
80
  ## Props
81
81
 
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, frame.
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
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
84
  - Group: color, fill, stroke, text, border-style, dashed, dotted, meta, caps.
85
85
 
86
86
  `sub` is a second, smaller line; `icon` an emoji before the label; `link`
87
87
  makes a node clickable; `flow: true` animates an edge; `constraint: false`
88
88
  keeps an edge out of the layout; `shape: text` is an annotation without a box.
89
+ `below: <id>`, `above`, `right-of`, `left-of` and `rank` place a node next to another
90
+ node without drawing an edge; do not use invisible edges for that. The `max-width: <px>` setting
91
+ wraps the ranks of a right or left diagram into rows that fit that width.
89
92
  `frame: <kind> <text>` draws window chrome: browser, window, terminal.
90
93
 
91
94
  ## Card bodies
@@ -136,7 +139,7 @@ chart p95 "Latency p95" [type: column, unit: ms] {
136
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
137
140
  lines take `[props]` before the colon or at the end of the line.
138
141
 
139
- - `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: true|false`, `lifeline: …`, `lifeline-style: dashed|dotted|solid`.
142
+ - `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`.
140
143
  - `timeline`: `when [color]: title`, then indented `- detail` lines. The colon needs a space after it, so `12:30: deploy` works. Header: `direction: right|down`.
141
144
  - `chart`: `label [color]: number` per line; `unit` is appended to values. Header: `type: bar|column|line|pie|donut`, `unit: …`.
142
145
  - `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`.
@@ -144,13 +147,14 @@ lines take `[props]` before the colon or at the end of the line.
144
147
  - `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`.
145
148
  - `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.
146
149
  - `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.
150
+ - `treeview`: indentation is the tree (several top-level entries are fine); `-` bullets and the `├──` / `│` prefixes of `tree` output are optional; `...` stands for more files. A folder has children, ends in `/` or says `[folder]`. `name: note` or `name # note` adds a note. Trailing props: a colour, `icon: folder|folder-open|file|code|doc|image|config|lock|package|git|database|test|font|media|terminal|yuhwa|<emoji>`, `badge: text`, `size: text`, `collapsed`, `highlight`, `dim`, `added|modified|deleted|renamed|ignored`. `match <glob> [props]` gives every matching entry those props (`*`, `**`, `?`, `{a,b}`; a trailing `/` matches folders only). Header: `icons: color|mono|emoji|none`, `lines: solid|rounded|dashed|dotted|none`, `sort: none|name|folders`, `notes: column|inline`, `chevrons`, `rows: plain|striped`, `spacing: compact|normal|relaxed`, `slashes: true|false`, `compact`, `counts: collapsed|all|none`, `marks: letter|dot|none`, `rollup: true|false`, `depth: N`, `indent: N`, `folder-color: <colour>`, `line-color: <colour>`, `highlight-color: <colour>`, `badge-color: <colour>`, `note-color: <colour>`, `strike-color: <colour>`, `strike-width: N`.
147
151
 
148
152
  ## Imports
149
153
 
150
- `import "./shared.yuhwa"` at top level pulls in another file's classes,
154
+ `import "./shared.yu"` at top level pulls in another file's classes,
151
155
  nodes, groups, edges, panels, variables and components; paths resolve against
152
156
  the importing file, and the importing file wins on conflicts.
153
- `import { api, .svc as .service, $brand } from "./x.yuhwa"` takes only those.
157
+ `import { api, .svc as .service, $brand } from "./x.yu"` takes only those.
154
158
  A file with `export api, .svc` (or `export` before a declaration:
155
159
  `export def ...`, `export $x: 1`, `export theme brand {`) offers only those.
156
160
  Custom themes come along with every import. Settings stay in their file unless
@@ -175,7 +179,7 @@ layout {
175
179
  `panel at X Y` pins a panel. `panel:part D` (`panel:part DX DY` for free
176
180
  parts) nudges one part:
177
181
 
178
- - `sequence`: a participant id moves its lifeline and the ones after it; `m<n>` (message), `note<n>`, `d<n>` (divider) add room above that row.
182
+ - `sequence`: a participant id (`p-<id>` when the id looks like a row) moves its lifeline and the ones after it; `m<n>` (message), `note<n>`, `d<n>` (divider) add room above that row.
179
183
  - `timeline`: an event by its one-word `when`, else `e<n>`, adds room before it.
180
184
  - `chart`: `size DX DY` grows the plot.
181
185
  - `git`: a branch name (its lane), a commit (id, first tag or `c<n>`; a branch name wins), `<commit>^1` / `^2` (the bend from its first / second parent), `<commit>^pick`.
@@ -1,3 +1,3 @@
1
- import { t as ServerOptions } from "./server-DJC_fQMe.js";
2
- import { a as YuhwaService } from "./service-ClZ8clSQ.js";
1
+ import { t as ServerOptions } from "./server-BSHSx8uo.js";
2
+ import { a as YuhwaService } from "./service-DquYYTVG.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-DmQuHQrG.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-CT_mbBNZ.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 });