sketchmark 1.1.6 → 1.2.1

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 CHANGED
@@ -68,6 +68,45 @@ const instance = render({
68
68
  });
69
69
  ```
70
70
 
71
+ ### Plugins
72
+
73
+ Sketchmark supports lightweight parse plugins. A plugin can preprocess the DSL source before parsing, transform the parsed AST after parsing, or do both. This keeps domain features like official packages such as `@sketchmark/plugin-notation` outside the core bundle.
74
+
75
+ ```typescript
76
+ import { render } from 'sketchmark';
77
+ import { notation } from '@sketchmark/plugin-notation';
78
+
79
+ render({
80
+ container: document.getElementById('diagram'),
81
+ dsl: `
82
+ diagram
83
+ box eq label="$x^2 + y^2 = z^2$"
84
+ step narrate "$\\theta = 45^\\circ$"
85
+ end
86
+ `.trim(),
87
+ plugins: [notation()],
88
+ });
89
+ ```
90
+
91
+ The first `@sketchmark/plugin-notation` release focuses on lightweight TeX-style math to Unicode conversion for labels and `step narrate`, which keeps the core renderer small while still making math-heavy diagrams nicer to author.
92
+
93
+ Another official package, `@sketchmark/plugin-geometry`, follows the same model by compiling `geo.*` commands into ordinary `circle`, `path`, and `text` nodes for textbook-style diagrams without adding geometry-specific renderer logic to the core bundle.
94
+
95
+ `@sketchmark/plugin-anchors` keeps edge syntax readable by rewriting endpoint refs like `a@right --> b@left` into ordinary edges with anchor metadata, which lets named attachment points stay outside the core parser surface.
96
+
97
+ `@sketchmark/plugin-annotations` builds on that idea for geometry-style marks such as angle arcs, right-angle squares, equal ticks, midpoint marks, and dimension lines, again by compiling into ordinary Sketchmark nodes.
98
+
99
+ `@sketchmark/plugin-wireframe` applies the same pattern to primitive UI mockups, compiling `wf.screen`, `wf.panel`, `wf.text`, `wf.media`, `wf.control`, and `wf.divider` into regular Sketchmark groups and nodes so wireframe support stays outside the core bundle too.
100
+
101
+ `@sketchmark/plugin-circuit` does the same for draw-focused circuit notation, compiling `ckt.comp`, `ckt.port`, `ckt.junction`, and `ckt.wire` into regular groups plus `path`, `circle`, and `text` nodes.
102
+
103
+ `@sketchmark/plugin-chem-molecule` extends the same pattern to lightweight molecule diagrams, compiling `chem.atom`, `chem.bond`, `chem.ring`, and `chem.label` into ordinary groups plus `path` and `text` nodes.
104
+
105
+ `@sketchmark/plugin-graph` applies the same approach to coordinate-plane graphing, compiling `graph.axes`, `graph.plot`, `graph.point`, `graph.line`, `graph.arrow`, `graph.region`, `graph.tangent`, and `graph.area` into ordinary nodes so sampled math graphs stay outside the core bundle too.
106
+
107
+
108
+
109
+
71
110
  ### Reusable UI Widgets
72
111
 
73
112
  ```javascript
@@ -84,11 +123,11 @@ end
84
123
  `.trim(),
85
124
  });
86
125
 
87
- const canvas = new SketchmarkCanvas({
88
- container: document.getElementById('viewport'),
89
- showCaption: false,
90
- tts: true,
91
- });
126
+ const canvas = new SketchmarkCanvas({
127
+ container: document.getElementById('viewport'),
128
+ showCaption: false,
129
+ tts: true,
130
+ });
92
131
 
93
132
  canvas.bindEditor(editor);
94
133
  ```
@@ -96,21 +135,21 @@ canvas.bindEditor(editor);
96
135
  ```javascript
97
136
  import { SketchmarkEmbed } from 'sketchmark';
98
137
 
99
- const embed = new SketchmarkEmbed({
100
- container: document.getElementById('article-embed'),
101
- dsl,
102
- width: 960,
103
- height: 540,
104
- playStepDelay: 700,
105
- showCaption: false,
106
- tts: true,
107
- fitPadding: 24,
108
- zoomMin: 0.08,
109
- zoomMax: 4,
110
- });
111
- ```
112
-
113
- Use `SketchmarkCanvas` for the full playground-style surface, and `SketchmarkEmbed` for fixed-size embeds that clip overflow, auto-fit large diagrams, and expose built-in zoom, playback, caption, and TTS controls.
138
+ const embed = new SketchmarkEmbed({
139
+ container: document.getElementById('article-embed'),
140
+ dsl,
141
+ width: 960,
142
+ height: 540,
143
+ playStepDelay: 700,
144
+ showCaption: false,
145
+ tts: true,
146
+ fitPadding: 24,
147
+ zoomMin: 0.08,
148
+ zoomMax: 4,
149
+ });
150
+ ```
151
+
152
+ Use `SketchmarkCanvas` for the full playground-style surface, and `SketchmarkEmbed` for fixed-size embeds that clip overflow, auto-fit large diagrams, and expose built-in zoom, playback, caption, and TTS controls.
114
153
 
115
154
  ---
116
155
 
@@ -263,28 +302,28 @@ Every diagram follows this structure:
263
302
  ```
264
303
  diagram
265
304
  [title label="My Title"]
266
- [layout row|column|grid|absolute]
305
+ [layout row|column|grid|absolute]
267
306
  [config key=value ...]
268
307
  [theme name fill="..." stroke="..." color="..."]
269
308
 
270
309
  [nodes, edges, groups, tables, charts, markdown blocks]
271
310
 
272
- [step action target ...]
273
- end
274
- ```
275
-
276
- When `layout=absolute`, authored elements use `x`/`y` coordinates instead of flow layout:
277
-
278
- ```
279
- diagram
280
- layout absolute
281
- box start x=40 y=60 label="Start"
282
- box finish x=240 y=140 label="Finish"
283
- start --> finish
284
- end
285
- ```
286
-
287
- - Lines starting with `#` or `//` are comments.
311
+ [step action target ...]
312
+ end
313
+ ```
314
+
315
+ When `layout=absolute`, authored elements use `x`/`y` coordinates instead of flow layout:
316
+
317
+ ```
318
+ diagram
319
+ layout absolute
320
+ box start x=40 y=60 label="Start"
321
+ box finish x=240 y=140 label="Finish"
322
+ start --> finish
323
+ end
324
+ ```
325
+
326
+ - Lines starting with `#` or `//` are comments.
288
327
  - All key-value attributes use the `key=value` or `key="quoted value"` syntax.
289
328
  - The DSL is **whitespace-sensitive** — do not indent lines.
290
329
 
@@ -312,7 +351,7 @@ Every node has the form:
312
351
  | Image | `image` | URL-loaded image | label width |
313
352
  | Icon | `icon` | Iconify icon | 48×48 + label |
314
353
  | Line | `line` | Horizontal rule | label width |
315
- | Path | `path` | Custom SVG path data | user-specified |
354
+ | Path | `path` | Custom SVG path data scaled into `width`/`height` | user-specified |
316
355
  | Note | `note` | Sticky-note shape | line count × line height |
317
356
 
318
357
  ```
@@ -328,9 +367,11 @@ text myTxt label="Some prose" width=300
328
367
  image myImg label="Logo" url="https://example.com/logo.png" width=120 height=60
329
368
  icon myIcon label="Settings" name="mdi:cog"
330
369
  line myLine label="Section" width=200
331
- path myPath value="M 0 0 L 50 50 L 100 0 Z" width=100 height=60
332
- note myNote label="Remember this!"
333
- ```
370
+ path myPath value="M 0 0 L 50 50 L 100 0 Z" width=100 height=60
371
+ note myNote label="Remember this!"
372
+ ```
373
+
374
+ For `path`, write `value` in local coordinates near `0,0`. The renderer normalizes the path bounds into the node's `width` and `height`, and then uses `x`/`y` only for placement.
334
375
 
335
376
  ---
336
377
 
@@ -338,12 +379,12 @@ note myNote label="Remember this!"
338
379
 
339
380
  | Property | Type | Description | Example |
340
381
  |----------|------|-------------|---------|
341
- | `label` | string | Display text (required) | `label="Hello World"` |
342
- | `width` | number | Override auto-width (px) | `width=140` |
343
- | `height` | number | Override auto-height (px) | `height=55` |
344
- | `x` | number | Authored X position when parent/root uses `layout=absolute` | `x=80` |
345
- | `y` | number | Authored Y position when parent/root uses `layout=absolute` | `y=40` |
346
- | `theme` | string | Named theme preset | `theme=primary` |
382
+ | `label` | string | Display text (required) | `label="Hello World"` |
383
+ | `width` | number | Override auto-width (px) | `width=140` |
384
+ | `height` | number | Override auto-height (px) | `height=55` |
385
+ | `x` | number | Authored X position when parent/root uses `layout=absolute` | `x=80` |
386
+ | `y` | number | Authored Y position when parent/root uses `layout=absolute` | `y=40` |
387
+ | `theme` | string | Named theme preset | `theme=primary` |
347
388
  | `fill` | CSS color | Background fill color | `fill="#e8f4ff"` |
348
389
  | `stroke` | CSS color | Border/outline color | `stroke="#0044cc"` |
349
390
  | `stroke-width` | number | Border thickness | `stroke-width=2` |
@@ -362,8 +403,8 @@ note myNote label="Remember this!"
362
403
  | `name` | string | Iconify icon name (for `icon`) | `name="mdi:cog"` |
363
404
  | `value` | string | SVG path data (for `path`) | `value="M 0 0 L 50 0"` |
364
405
  | `deg` | number | Static rotation (degrees) | `deg=45` |
365
- | `dx` | number | Static visual X translation after layout (px) | `dx=20` |
366
- | `dy` | number | Static visual Y translation after layout (px) | `dy=-10` |
406
+ | `dx` | number | Static visual X translation after layout (px) | `dx=20` |
407
+ | `dy` | number | Static visual Y translation after layout (px) | `dy=-10` |
367
408
  | `factor` | number | Static scale factor | `factor=1.2` |
368
409
 
369
410
  ---
@@ -433,12 +474,12 @@ group outer label="Outer Group" layout=column items=[a,b,inner]
433
474
  General form:
434
475
 
435
476
  ```
436
- group <id> [label="..."] [layout=row|column|grid|absolute] [gap=N] [padding=N]
437
- [columns=N] [align=start|center|end]
438
- [justify=start|center|end|space-between|space-around]
439
- [theme=...] [fill="..."] [stroke="..."] [x=N] [y=N] [width=N] [height=N]
440
- [items=[id1,id2,...]]
441
- ```
477
+ group <id> [label="..."] [layout=row|column|grid|absolute] [gap=N] [padding=N]
478
+ [columns=N] [align=start|center|end]
479
+ [justify=start|center|end|space-between|space-around]
480
+ [theme=...] [fill="..."] [stroke="..."] [x=N] [y=N] [width=N] [height=N]
481
+ [items=[id1,id2,...]]
482
+ ```
442
483
 
443
484
  - Groups are always declared at the top level.
444
485
  - `items` order is the visual child order.
@@ -450,22 +491,22 @@ group <id> [label="..."] [layout=row|column|grid|absolute] [gap=N] [padding=N]
450
491
  | Property | Type | Description |
451
492
  |----------|------|-------------|
452
493
  | `label` | string | Group title (shown at top) |
453
- | `layout` | row / column / grid / absolute | Child arrangement direction |
454
- | `gap` | number | Space between children (px) |
455
- | `padding` | number | Inner padding (px) |
456
- | `columns` | number | Column count (for `layout=grid`) |
457
- | `align` | start/center/end | Cross-axis alignment (align-items) |
458
- | `justify` | start/center/end/space-between/space-around | Main-axis alignment |
459
- | `x` | number | Authored X position when parent/root uses `layout=absolute` |
460
- | `y` | number | Authored Y position when parent/root uses `layout=absolute` |
461
- | `width` | number | Minimum width override |
462
- | `height` | number | Minimum height override |
463
- | `theme` | string | Named theme preset |
464
- | `fill` | CSS color | Background color |
465
- | `stroke` | CSS color | Border color |
466
- | `stroke-width` | number | Border thickness |
467
-
468
- For absolute groups, child `x`/`y` coordinates are relative to the group's inner content box.
494
+ | `layout` | row / column / grid / absolute | Child arrangement direction |
495
+ | `gap` | number | Space between children (px) |
496
+ | `padding` | number | Inner padding (px) |
497
+ | `columns` | number | Column count (for `layout=grid`) |
498
+ | `align` | start/center/end | Cross-axis alignment (align-items) |
499
+ | `justify` | start/center/end/space-between/space-around | Main-axis alignment |
500
+ | `x` | number | Authored X position when parent/root uses `layout=absolute` |
501
+ | `y` | number | Authored Y position when parent/root uses `layout=absolute` |
502
+ | `width` | number | Minimum width override |
503
+ | `height` | number | Minimum height override |
504
+ | `theme` | string | Named theme preset |
505
+ | `fill` | CSS color | Background color |
506
+ | `stroke` | CSS color | Border color |
507
+ | `stroke-width` | number | Border thickness |
508
+
509
+ For absolute groups, child `x`/`y` coordinates are relative to the group's inner content box.
469
510
 
470
511
  #### `bare` keyword
471
512
 
@@ -482,7 +523,7 @@ bare myContainer layout=row items=[a,b]
482
523
  ## Tables
483
524
 
484
525
  ```
485
- table <id> [label="..."] [x=N] [y=N] [theme=...] [fill="..."] [stroke="..."]
526
+ table <id> [label="..."] [x=N] [y=N] [theme=...] [fill="..."] [stroke="..."]
486
527
  {
487
528
  header Col1 Col2 Col3
488
529
  row "Value A" "Value B" "Value C"
@@ -490,19 +531,19 @@ table <id> [label="..."] [x=N] [y=N] [theme=...] [fill="..."] [stroke="..."]
490
531
  }
491
532
  ```
492
533
 
493
- - `header` rows get a shaded background and bold text.
494
- - `row` rows use regular styling.
495
- - `"value"` must use a double-quoted string literal.
496
- - Column widths auto-size to content.
497
- - Tables support `fill`, `stroke`, `color`, `font-size`, `font`, `text-align`, `letter-spacing`, `theme`, `opacity` style props (same as nodes).
498
- - Tables also accept `x` and `y` when the parent/root uses `layout=absolute`.
534
+ - `header` rows get a shaded background and bold text.
535
+ - `row` rows use regular styling.
536
+ - `"value"` must use a double-quoted string literal.
537
+ - Column widths auto-size to content.
538
+ - Tables support `fill`, `stroke`, `color`, `font-size`, `font`, `text-align`, `letter-spacing`, `theme`, `opacity` style props (same as nodes).
539
+ - Tables also accept `x` and `y` when the parent/root uses `layout=absolute`.
499
540
 
500
541
  ---
501
542
 
502
543
  ## Charts
503
544
 
504
545
  ```
505
- <chart-type> <id> [label="Title"] [x=N] [y=N] [width=N] [height=N] [theme=...] [style props]
546
+ <chart-type> <id> [label="Title"] [x=N] [y=N] [width=N] [height=N] [theme=...] [style props]
506
547
  data
507
548
  [["Category", "Series1", "Series2"],
508
549
  ["Jan", 120, 80],
@@ -530,15 +571,15 @@ data
530
571
  ["Mar", 1100, 750]]
531
572
 
532
573
  # Pie chart example
533
- pie-chart share label="Market Share" width=300 height=240
534
- data
535
- [["Company", "Share"],
536
- ["Alpha", 42],
537
- ["Beta", 31],
538
- ["Gamma", 27]]
539
- ```
540
-
541
- Charts also accept `x` and `y` when the parent/root uses `layout=absolute`.
574
+ pie-chart share label="Market Share" width=300 height=240
575
+ data
576
+ [["Company", "Share"],
577
+ ["Alpha", 42],
578
+ ["Beta", 31],
579
+ ["Gamma", 27]]
580
+ ```
581
+
582
+ Charts also accept `x` and `y` when the parent/root uses `layout=absolute`.
542
583
 
543
584
  ---
544
585
 
@@ -547,7 +588,7 @@ Charts also accept `x` and `y` when the parent/root uses `layout=absolute`.
547
588
  Renders inline rich text with headings and bold/italic:
548
589
 
549
590
  ```
550
- markdown <id> [x=N] [y=N] [width=N] [height=N] [theme=...] [style props]
591
+ markdown <id> [x=N] [y=N] [width=N] [height=N] [theme=...] [style props]
551
592
  """
552
593
  # Heading 1
553
594
  ## Heading 2
@@ -559,10 +600,10 @@ Another paragraph here.
559
600
  """
560
601
  ```
561
602
 
562
- - Triple-quote `"""` delimiters for the content block.
563
- - Supported formatting: `# H1`, `## H2`, `### H3`, `**bold**`, `*italic*`, blank lines.
564
- - Style props: `color`, `font`, `font-size`, `text-align`, `padding`, `fill`, `stroke`, `opacity`, `letter-spacing`.
565
- - Markdown blocks also accept `x` and `y` when the parent/root uses `layout=absolute`.
603
+ - Triple-quote `"""` delimiters for the content block.
604
+ - Supported formatting: `# H1`, `## H2`, `### H3`, `**bold**`, `*italic*`, blank lines.
605
+ - Style props: `color`, `font`, `font-size`, `text-align`, `padding`, `fill`, `stroke`, `opacity`, `letter-spacing`.
606
+ - Markdown blocks also accept `x` and `y` when the parent/root uses `layout=absolute`.
566
607
 
567
608
  ---
568
609
 
@@ -686,11 +727,11 @@ step narrate "Plants need sunlight to make food"
686
727
  step narrate "This is the most important step" pace=slow
687
728
  ```
688
729
 
689
- - Caption is rendered as a fixed-position `<div>` on `document.body` (independent of diagram pan/zoom).
690
- - Access via `anim.captionElement` to reparent it anywhere.
691
- - `SketchmarkCanvas` and `SketchmarkEmbed` support `showCaption: false` to hide the caption bar UI.
692
- - Both widget UIs also include a built-in caption toggle button by default.
693
- - Supports built-in browser text-to-speech (see [TTS](#text-to-speech)).
730
+ - Caption is rendered as a fixed-position `<div>` on `document.body` (independent of diagram pan/zoom).
731
+ - Access via `anim.captionElement` to reparent it anywhere.
732
+ - `SketchmarkCanvas` and `SketchmarkEmbed` support `showCaption: false` to hide the caption bar UI.
733
+ - Both widget UIs also include a built-in caption toggle button by default.
734
+ - Supports built-in browser text-to-speech (see [TTS](#text-to-speech)).
694
735
 
695
736
  ### Annotations
696
737
 
@@ -826,14 +867,14 @@ anim.destroy() // remove caption, annotations, pointer from DOM
826
867
 
827
868
  // Toggle TTS programmatically
828
869
  anim.tts = true; // enable browser speech
829
- anim.tts = false; // disable (stops current speech)
830
-
831
- // Reparent the narration caption to a custom container
832
- myDiv.appendChild(anim.captionElement);
833
-
834
- // UI widgets can suppress the visible caption bar
835
- const embed = new SketchmarkEmbed({ container, dsl, showCaption: false });
836
- embed.setCaptionVisible(true);
870
+ anim.tts = false; // disable (stops current speech)
871
+
872
+ // Reparent the narration caption to a custom container
873
+ myDiv.appendChild(anim.captionElement);
874
+
875
+ // UI widgets can suppress the visible caption bar
876
+ const embed = new SketchmarkEmbed({ container, dsl, showCaption: false });
877
+ embed.setCaptionVisible(true);
837
878
 
838
879
  // Event listener
839
880
  const unsub = anim.on((event) => {
@@ -845,31 +886,31 @@ const unsub = anim.on((event) => {
845
886
  unsub(); // unsubscribe
846
887
  ```
847
888
 
848
- ### Text-to-Speech
849
-
850
- Enable browser-native speech synthesis for narrate steps. You can drive it from the diagram config or from the JS API. If both are provided, the JS option wins. `SketchmarkCanvas` and `SketchmarkEmbed` also include a built-in TTS toggle button by default.
851
-
852
- ```
853
- # In DSL
854
- config tts=on
855
- ```
856
-
857
- ```javascript
858
- // Direct render option
859
- const instance = render({ container, dsl, tts: true });
860
-
861
- // Widget options
862
- const canvas = new SketchmarkCanvas({ container, dsl, tts: true });
863
- const embed = new SketchmarkEmbed({ container, dsl, tts: true });
864
-
865
- // Or toggle at runtime
866
- anim.tts = true;
867
- canvas.setTtsEnabled(false);
868
- embed.setTtsEnabled(true);
869
-
870
- // Custom TTS (e.g. ElevenLabs) via event listener
871
- anim.tts = false; // disable built-in
872
- anim.on((e) => {
889
+ ### Text-to-Speech
890
+
891
+ Enable browser-native speech synthesis for narrate steps. You can drive it from the diagram config or from the JS API. If both are provided, the JS option wins. `SketchmarkCanvas` and `SketchmarkEmbed` also include a built-in TTS toggle button by default.
892
+
893
+ ```
894
+ # In DSL
895
+ config tts=on
896
+ ```
897
+
898
+ ```javascript
899
+ // Direct render option
900
+ const instance = render({ container, dsl, tts: true });
901
+
902
+ // Widget options
903
+ const canvas = new SketchmarkCanvas({ container, dsl, tts: true });
904
+ const embed = new SketchmarkEmbed({ container, dsl, tts: true });
905
+
906
+ // Or toggle at runtime
907
+ anim.tts = true;
908
+ canvas.setTtsEnabled(false);
909
+ embed.setTtsEnabled(true);
910
+
911
+ // Custom TTS (e.g. ElevenLabs) via event listener
912
+ anim.tts = false; // disable built-in
913
+ anim.on((e) => {
873
914
  if (e.step?.kind === 'step' && e.step.action === 'narrate') {
874
915
  myTTSService.speak(e.step.value);
875
916
  }
@@ -995,11 +1036,11 @@ exportHTML(instance.svg, dslSource, { filename: 'diagram.html' });
995
1036
 
996
1037
  ## Supported vs Unsupported Features
997
1038
 
998
- ### Nodes
999
-
1000
- Nodes can also opt into authored absolute `x`/`y` positioning when their parent or the root diagram uses `layout=absolute`.
1001
-
1002
- | Feature | Supported | Notes |
1039
+ ### Nodes
1040
+
1041
+ Nodes can also opt into authored absolute `x`/`y` positioning when their parent or the root diagram uses `layout=absolute`.
1042
+
1043
+ | Feature | Supported | Notes |
1003
1044
  |---------|-----------|-------|
1004
1045
  | box | ✅ | Default shape |
1005
1046
  | circle | ✅ | |
@@ -1012,7 +1053,7 @@ Nodes can also opt into authored absolute `x`/`y` positioning when their parent
1012
1053
  | image (URL) | ✅ | Cross-origin images |
1013
1054
  | icon (Iconify) | ✅ | Uses Iconify API |
1014
1055
  | line | ✅ | Horizontal rule with label |
1015
- | path (SVG path data) | ✅ | Raw SVG `d` attribute |
1056
+ | path (SVG path data) | ✅ | Local SVG `d` attribute scaled into `width`/`height` |
1016
1057
  | note | ✅ | Sticky-note shape |
1017
1058
  | Multiline label (`\n`) | ✅ | Use `\n` in label strings |
1018
1059
  | Per-node font override | ✅ | |
@@ -1039,11 +1080,11 @@ Nodes can also opt into authored absolute `x`/`y` positioning when their parent
1039
1080
  | Multiple edges between same nodes | ✅ | Stack visually |
1040
1081
  | Edge from/to groups | ✅ | Uses group center |
1041
1082
 
1042
- ### Groups
1043
-
1044
- Groups support `layout=absolute` in addition to flow layouts. In absolute groups, child `x`/`y` coordinates are measured from the group's inner content box.
1045
-
1046
- | Feature | Supported | Notes |
1083
+ ### Groups
1084
+
1085
+ Groups support `layout=absolute` in addition to flow layouts. In absolute groups, child `x`/`y` coordinates are measured from the group's inner content box.
1086
+
1087
+ | Feature | Supported | Notes |
1047
1088
  |---------|-----------|-------|
1048
1089
  | Nested groups | ✅ | Unlimited depth |
1049
1090
  | Row / column / grid layout | ✅ | |
@@ -1126,7 +1167,7 @@ Groups support `layout=absolute` in addition to flow layouts. In absolute groups
1126
1167
  | `end` | Structure | `end` |
1127
1168
  | `title` | Meta | `title label="My Diagram"` |
1128
1169
  | `description` | Meta | `description "Some text"` |
1129
- | `layout` | Meta | `layout row` / `layout column` / `layout grid` / `layout absolute` |
1170
+ | `layout` | Meta | `layout row` / `layout column` / `layout grid` / `layout absolute` |
1130
1171
  | `config` | Meta | `config gap=60` |
1131
1172
  | `theme` | Styling | `theme primary fill="#e8f4ff" stroke="#0044cc" color="#003399"` |
1132
1173
  | `style` | Styling | `style nodeId fill="#ff0" stroke="#000"` |
@@ -1255,15 +1296,16 @@ end
1255
1296
  ```typescript
1256
1297
  render(options: RenderOptions): DiagramInstance
1257
1298
 
1258
- interface RenderOptions {
1259
- container: string | HTMLElement | SVGSVGElement; // CSS selector or element
1260
- dsl: string; // DSL source text
1261
- renderer?: 'svg' | 'canvas'; // default: 'svg'
1262
- injectCSS?: boolean; // inject animation CSS (default: true)
1263
- tts?: boolean; // override diagram TTS config
1264
- svgOptions?: SVGRendererOptions;
1265
- canvasOptions?: CanvasRendererOptions;
1266
- onNodeClick?: (nodeId: string) => void; // click handler
1299
+ interface RenderOptions {
1300
+ container: string | HTMLElement | SVGSVGElement; // CSS selector or element
1301
+ dsl: string; // DSL source text
1302
+ plugins?: SketchmarkPlugin[]; // optional source/AST plugins
1303
+ renderer?: 'svg' | 'canvas'; // default: 'svg'
1304
+ injectCSS?: boolean; // inject animation CSS (default: true)
1305
+ tts?: boolean; // override diagram TTS config
1306
+ svgOptions?: SVGRendererOptions;
1307
+ canvasOptions?: CanvasRendererOptions;
1308
+ onNodeClick?: (nodeId: string) => void; // click handler
1267
1309
  onReady?: (anim, svg?) => void; // callback after render
1268
1310
  }
1269
1311
 
@@ -1286,6 +1328,12 @@ interface DiagramInstance {
1286
1328
  exportSVG: (filename?: string) => void;
1287
1329
  exportPNG: (filename?: string) => Promise<void>;
1288
1330
  }
1331
+
1332
+ interface SketchmarkPlugin {
1333
+ name: string;
1334
+ preprocess?: (source: string) => string;
1335
+ transformAst?: (ast: DiagramAST) => DiagramAST;
1336
+ }
1289
1337
  ```
1290
1338
 
1291
1339
  ---
@@ -31,6 +31,7 @@ export declare class AnimationController {
31
31
  readonly drawTargetCharts: Set<string>;
32
32
  readonly drawTargetMarkdowns: Set<string>;
33
33
  private readonly _drawStepIndexByElementId;
34
+ private readonly _relatedElementIdsByPrimaryId;
34
35
  private readonly _parentGroupByElementId;
35
36
  private readonly _groupDescendantIds;
36
37
  private _captionEl;
@@ -45,6 +46,7 @@ export declare class AnimationController {
45
46
  get drawTargets(): Set<string>;
46
47
  constructor(svg: SVGSVGElement, steps: ASTStepItem[], _container?: HTMLElement | undefined, _rc?: any | undefined, _config?: Record<string, string | number | boolean> | undefined);
47
48
  private _buildDrawStepIndex;
49
+ private _buildRelatedElementIndex;
48
50
  private _buildGroupVisibilityIndex;
49
51
  private _hideGroupDescendants;
50
52
  private _isDeferredForGroupReveal;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animation/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,CAAC;AACpB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AA+a5D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQtE;AACD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAOtE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAOvE;AAED,wBAA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,CAAC,MAAM;IAed,OAAO,CAAC,aAAa;IAKrB,uFAAuF;IACvF,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,YAAY;IASpB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IA0E1B,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,iBAAiB;IAwCzB,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,oBAAoB;IA+B5B,OAAO,CAAC,YAAY;CAkCrB;AAED,eAAO,MAAM,aAAa,wjCAoCzB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export type NodeShape = 'box' | 'circle' | 'diamond' | 'hexagon' | 'triangle' | 'cylinder' | 'parallelogram' | 'text' | 'image' | 'icon' | 'note' | 'line' | 'path';
2
2
  export type EdgeConnector = '->' | '<-' | '<->' | '-->' | '<-->' | '---' | '--';
3
+ export type EdgeAnchor = 'top' | 'right' | 'bottom' | 'left' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3
4
  export type LayoutType = 'row' | 'column' | 'grid' | 'absolute';
4
5
  export type AlignItems = 'start' | 'center' | 'end';
5
6
  export type JustifyContent = 'start' | 'center' | 'end' | 'space-between' | 'space-around';
@@ -82,6 +83,8 @@ export interface ASTEdge {
82
83
  to: string;
83
84
  connector: EdgeConnector;
84
85
  label?: string;
86
+ fromAnchor?: EdgeAnchor;
87
+ toAnchor?: EdgeAnchor;
85
88
  dashed?: boolean;
86
89
  bidirectional?: boolean;
87
90
  theme?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ast/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GACjB,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GACrD,UAAU,GAAG,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GACjE,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