@scrawl-board/board 0.1.0-beta.1 → 0.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -1,8 +1,3 @@
1
- declare const strokeIdBrand: unique symbol;
2
- type StrokeId = string & {
3
- readonly [strokeIdBrand]: "StrokeId";
4
- };
5
-
6
1
  /** Wire grammar: `asset:<namespace>:<opaque-id>`. Interpreted only by the Host. */
7
2
  type AssetRef = string;
8
3
  declare function isAssetRef(value: unknown): value is AssetRef;
@@ -152,6 +147,21 @@ interface CustomObjectDefinition<Props extends JsonValue = JsonValue> {
152
147
  /** One pure, synchronous step per consecutive schema version. */
153
148
  migrate?: Readonly<Record<number, (oldProps: JsonValue) => JsonValue>>;
154
149
  describe(object: ReadonlyCustomObject<Props>, context: ObjectDescribeContext): BoardScene;
150
+ /**
151
+ * Optional point-level hit-test precision (Phase 8). Every custom object
152
+ * hit-tests against its bounding box (`fallback.bounds`) by default — this
153
+ * lets a non-rectangular shape (e.g. a circular card, an L-shaped region)
154
+ * reject a point that's inside that box but outside its actual visible
155
+ * silhouette, tightening a click/marquee/raycast hit to the shape's real
156
+ * outline. `point` is in this object's own local space — the same
157
+ * untransformed space `describe`'s returned geometry already lives in
158
+ * (the caller inverse-transforms the pointer's board point through
159
+ * `object.transform` before calling this). Absent means every point
160
+ * inside the bounding box hits, matching pre-Phase-8 behavior exactly.
161
+ * Rejecting a point here does not fall through to whatever's underneath —
162
+ * the gesture simply misses this object, same as clicking empty space.
163
+ */
164
+ hitTest?(object: ReadonlyCustomObject<Props>, point: BoardPoint): boolean;
155
165
  }
156
166
  interface SceneNodeBase {
157
167
  key: string;
@@ -185,6 +195,15 @@ interface SceneGroup extends SceneNodeBase {
185
195
  kind: "group";
186
196
  children: readonly BoardScene[];
187
197
  }
198
+ /**
199
+ * **No renderer or SVG-export interpreter exists for this node kind yet**
200
+ * (tracked as deferred work — see `renderer/shapes/customObjects.ts`'s
201
+ * `"path"` case). Returning a `ScenePath` from `describe()` renders nothing,
202
+ * exports nothing, and contributes no hit-test bounds — it neither errors
203
+ * nor emits a diagnostic. Until an interpreter ships, build custom shapes
204
+ * from `SceneRect`/`SceneEllipse`/`SceneGroup`/`SceneText`/`SceneImage`
205
+ * instead.
206
+ */
188
207
  interface ScenePath extends SceneNodeBase {
189
208
  kind: "path";
190
209
  /** SVG-style path data, board-local coordinates. */
@@ -340,8 +359,23 @@ interface Lockable {
340
359
  lockedByName?: string;
341
360
  }
342
361
 
362
+ /**
363
+ * Per-object visibility (Phase 8) — mirrors `itemLock.ts`'s `Lockable`
364
+ * pattern exactly, but simpler: unlike a lock, hidden state carries no
365
+ * holder/ownership concept, so there's no analogue to `LockHolder`/
366
+ * `canUnlockItem`. A hidden object stays fully present in the Document
367
+ * (still serializes, persists, syncs, undoes/redoes) — it just skips
368
+ * rendering and hit-testing/selection candidacy. `hidden` absent or
369
+ * `false` means visible; this keeps every pre-Phase-8 document (which has
370
+ * no `hidden` field on any object at all) implicitly fully visible with
371
+ * zero migration needed.
372
+ */
373
+ interface Hideable {
374
+ hidden?: boolean;
375
+ }
376
+
343
377
  /** A kitchen timer sitting on the board. Remaining time is derived, not ticked. */
344
- interface KitchenTimer extends Lockable {
378
+ interface KitchenTimer extends Lockable, Hideable {
345
379
  id: string;
346
380
  x: number;
347
381
  y: number;
@@ -355,6 +389,146 @@ interface KitchenTimer extends Lockable {
355
389
  runningSince?: number;
356
390
  }
357
391
 
392
+ interface RectangleObject extends Lockable, Hideable {
393
+ id: string;
394
+ x: number;
395
+ y: number;
396
+ width: number;
397
+ height: number;
398
+ fill?: string;
399
+ stroke?: string;
400
+ strokeWidth?: number;
401
+ /** Corner radius in board units; clamped to at most half the shorter side at render time. */
402
+ cornerRadius?: number;
403
+ /** `[0, 1]`; undefined means fully opaque (Phase 4). */
404
+ opacity?: number;
405
+ /**
406
+ * Radians, about the shape's own center `(x + width/2, y - height/2)`.
407
+ * Undefined means 0 (Phase 3). `x`/`y`/`width`/`height` stay in the
408
+ * shape's own unrotated local frame — rotation is a separate, applied-last
409
+ * transform, not baked into them, matching how Stroke/CustomBoardObject
410
+ * keep geometry and placement independent via their own `matrix`.
411
+ */
412
+ rotation?: number;
413
+ }
414
+ interface EllipseObject extends Lockable, Hideable {
415
+ id: string;
416
+ x: number;
417
+ y: number;
418
+ width: number;
419
+ height: number;
420
+ fill?: string;
421
+ stroke?: string;
422
+ strokeWidth?: number;
423
+ /** `[0, 1]`; undefined means fully opaque (Phase 4). */
424
+ opacity?: number;
425
+ /** Radians, about the shape's own center — see RectangleObject's `rotation` doc. */
426
+ rotation?: number;
427
+ }
428
+ /** `"none"` is a plain line with no arrowhead; today's only real head shape is `"triangle"`. New head shapes extend this union without touching `ArrowObject`'s own fields. */
429
+ type ArrowHeadStyle = "triangle" | "none";
430
+ interface LineObject extends Lockable, Hideable {
431
+ id: string;
432
+ start: BoardPoint;
433
+ end: BoardPoint;
434
+ stroke?: string;
435
+ strokeWidth?: number;
436
+ opacity?: number;
437
+ }
438
+ /** An endpoint anchored to a normalized position on another object's bounds. */
439
+ interface ConnectorBinding {
440
+ objectId: string;
441
+ /** Horizontal and vertical fractions of the target's axis-aligned bounds. */
442
+ x: number;
443
+ y: number;
444
+ }
445
+ interface ArrowObject extends Lockable, Hideable {
446
+ /** Omitted for legacy arrows. Connectors share Arrow's persistence/history contract. */
447
+ routing?: "straight" | "curved" | "polyline";
448
+ /** Intermediate board-space vertices for a multi-point connector. */
449
+ waypoints?: BoardPoint[];
450
+ startBinding?: ConnectorBinding;
451
+ endBinding?: ConnectorBinding;
452
+ id: string;
453
+ start: BoardPoint;
454
+ end: BoardPoint;
455
+ head?: ArrowHeadStyle;
456
+ stroke?: string;
457
+ strokeWidth?: number;
458
+ opacity?: number;
459
+ }
460
+ /**
461
+ * Triangle(3)/Diamond(4)/Pentagon(5)/Hexagon(6)/Octagon(8) as one shared
462
+ * type instead of five near-duplicate interfaces — a regular N-gon
463
+ * inscribed in the same `x`/`y`/`width`/`height`/`rotation` bounding box
464
+ * Rectangle already uses, parameterized by `sides`. Diamond is exactly a
465
+ * 4-sided regular polygon with vertex 0 pointing right (not up, like
466
+ * Triangle/Pentagon/Hexagon) — see `polygonGeometry.ts`'s
467
+ * `polygonStartAngle`, which encodes each side count's own vertex
468
+ * orientation so the outline always matches the legacy drag-preview shape.
469
+ */
470
+ interface PolygonObject extends Lockable, Hideable {
471
+ id: string;
472
+ x: number;
473
+ y: number;
474
+ width: number;
475
+ height: number;
476
+ sides: 3 | 4 | 5 | 6 | 8;
477
+ fill?: string;
478
+ stroke?: string;
479
+ strokeWidth?: number;
480
+ opacity?: number;
481
+ /** Radians, about the shape's own center — see RectangleObject's `rotation` doc. */
482
+ rotation?: number;
483
+ }
484
+ /** Same bounding-box/rotation convention as Rectangle; a 5-pointed star with a tuned inner-radius ratio, matching the legacy tool's own default (see `polygonGeometry.ts`'s `starPoints`). */
485
+ interface StarObject extends Lockable, Hideable {
486
+ id: string;
487
+ x: number;
488
+ y: number;
489
+ width: number;
490
+ height: number;
491
+ /** Vertex count; today's only shipped preset is 5, matching the legacy tool. */
492
+ points: number;
493
+ /** `(0, 1)` — inner vertex radius as a fraction of the outer radius. */
494
+ innerRadiusRatio: number;
495
+ fill?: string;
496
+ stroke?: string;
497
+ strokeWidth?: number;
498
+ opacity?: number;
499
+ rotation?: number;
500
+ }
501
+ /** Same bounding-box/rotation convention as Rectangle; the standard parametric heart curve (see `polygonGeometry.ts`'s `heartPoints`), no extra parameters beyond the shared shape fields. */
502
+ interface HeartObject extends Lockable, Hideable {
503
+ id: string;
504
+ x: number;
505
+ y: number;
506
+ width: number;
507
+ height: number;
508
+ fill?: string;
509
+ stroke?: string;
510
+ strokeWidth?: number;
511
+ opacity?: number;
512
+ rotation?: number;
513
+ }
514
+ /**
515
+ * A logical grouping of other board objects (Phase 3 — Selection,
516
+ * Transformation & Grouping). Deliberately has no `x`/`y`/`transform` of its
517
+ * own — a group's bounds are always derived on demand from its (recursively
518
+ * resolved) children, and "moving/rotating/scaling the group" is exactly a
519
+ * multi-object transform applied to those children, nothing more. A group
520
+ * has no renderer/mesh of its own; its only visual presence is the
521
+ * selection gizmo's bounding box while it's the current selection.
522
+ *
523
+ * `children` may itself contain other group ids (nested groups) — expanding
524
+ * a group into its leaf members is always done by the caller (recursively,
525
+ * with cycle protection), never assumed here.
526
+ */
527
+ interface GroupObject extends Lockable, Hideable {
528
+ id: string;
529
+ children: string[];
530
+ }
531
+
358
532
  interface BoardPoint {
359
533
  x: number;
360
534
  y: number;
@@ -368,9 +542,14 @@ interface StrokePoint extends BoardPoint {
368
542
  */
369
543
  erase?: number;
370
544
  }
371
- /** Which drawing tool made a stroke; undefined means marker (back-compat). */
372
- type StrokeTool = "marker" | "highlighter";
373
- interface Stroke extends Lockable {
545
+ /**
546
+ * Which drawing tool made a stroke; undefined means marker (back-compat).
547
+ * `"shape"` (rect/ellipse/line/arrow/polygon/star/heart) renders at its
548
+ * exact configured width with no pressure variance or end taper — a
549
+ * geometric outline, not an expressive ink mark.
550
+ */
551
+ type StrokeTool = "marker" | "highlighter" | "shape";
552
+ interface Stroke extends Lockable, Hideable {
374
553
  id: string;
375
554
  color: string;
376
555
  baseWidth: number;
@@ -386,7 +565,7 @@ interface Stroke extends Lockable {
386
565
  clusterId?: string;
387
566
  }
388
567
  type SerializedPoint = [number, number, number, number];
389
- interface SerializedStroke extends Lockable {
568
+ interface SerializedStroke extends Lockable, Hideable {
390
569
  id: string;
391
570
  color: string;
392
571
  baseWidth: number;
@@ -396,7 +575,36 @@ interface SerializedStroke extends Lockable {
396
575
  matrix?: [number, number, number, number, number, number];
397
576
  clusterId?: string;
398
577
  }
578
+ /** A named notebook containing sections. */
579
+ interface BoardNotebook {
580
+ readonly id: string;
581
+ readonly name: string;
582
+ readonly color: string;
583
+ }
584
+ /** A named section containing pages. */
585
+ interface BoardSection {
586
+ readonly id: string;
587
+ readonly notebookId: string;
588
+ readonly name: string;
589
+ readonly color: string;
590
+ }
591
+ /** An additional page. The first page remains in the document's top-level collections. */
592
+ interface SerializedBoardPage {
593
+ id: string;
594
+ sectionId?: string;
595
+ name: string;
596
+ content: SerializedDocument;
597
+ }
399
598
  interface SerializedDocument {
599
+ /** Notebook and section metadata. Older boards use an implicit default of each. */
600
+ notebooks?: BoardNotebook[];
601
+ sections?: BoardSection[];
602
+ /** Section of the original first page; defaults to `default`. */
603
+ pageSectionId?: string;
604
+ /** Display name of the first page (id `default`). */
605
+ pageName?: string;
606
+ /** Additional pages, in sidebar order. Nested pages are not allowed. */
607
+ pages?: SerializedBoardPage[];
400
608
  /** Absent in every historical document; current saves always write 1. */
401
609
  schemaVersion?: 1;
402
610
  strokes: SerializedStroke[];
@@ -412,6 +620,31 @@ interface SerializedDocument {
412
620
  timers?: KitchenTimer[];
413
621
  /** Absent in documents saved before Custom board objects existed (ticket #22). */
414
622
  customObjects?: CustomBoardObject[];
623
+ /** Absent in documents saved before semantic Rectangle objects existed (Phase 2). */
624
+ rectangles?: RectangleObject[];
625
+ /** Absent in documents saved before semantic Ellipse objects existed (Phase 2). */
626
+ ellipses?: EllipseObject[];
627
+ /** Absent in documents saved before Groups existed (Phase 3). */
628
+ groups?: GroupObject[];
629
+ /** Absent in documents saved before semantic Line objects existed (Phase 4). */
630
+ lines?: LineObject[];
631
+ /** Absent in documents saved before semantic Arrow objects existed (Phase 4). */
632
+ arrows?: ArrowObject[];
633
+ /** Absent in documents saved before semantic Polygon objects existed (Phase 4). */
634
+ polygons?: PolygonObject[];
635
+ /** Absent in documents saved before semantic Star objects existed (Phase 4). */
636
+ stars?: StarObject[];
637
+ /** Absent in documents saved before semantic Heart objects existed (Phase 4). */
638
+ hearts?: HeartObject[];
639
+ /**
640
+ * Every content-object id (every type above except comments, which are
641
+ * host-synced and never enter this schema) in paint order, back to front.
642
+ * Absent in documents saved before per-object z-order existed (Phase 3) —
643
+ * migration synthesizes a default order preserving the old fixed-Z-band
644
+ * visual stacking exactly, so an existing document never visibly changes
645
+ * on load; only an explicit reorder action touches this from then on.
646
+ */
647
+ objectOrder?: string[];
415
648
  }
416
649
  /**
417
650
  * One collaborator's vote on a note. One per person; toggling removes it.
@@ -425,7 +658,7 @@ interface NoteVote {
425
658
  * A sticky note: content floating above the board at a z-offset (pillar 3 —
426
659
  * depth as an organizational axis). Center position in board space.
427
660
  */
428
- interface StickyNote extends Lockable {
661
+ interface StickyNote extends Lockable, Hideable {
429
662
  id: string;
430
663
  x: number;
431
664
  y: number;
@@ -443,7 +676,7 @@ interface StickyNote extends Lockable {
443
676
  * top-left corner; lines flow downward (-y). Text joins the clustering
444
677
  * system like handwriting (build prompt §6.4).
445
678
  */
446
- interface TextBlock extends Lockable {
679
+ interface TextBlock extends Lockable, Hideable {
447
680
  id: string;
448
681
  x: number;
449
682
  y: number;
@@ -457,7 +690,7 @@ interface TextBlock extends Lockable {
457
690
  * Interactive structured table on the board. Position (x, y) is top-left in board units.
458
691
  * Cells are indexed as `${row},${col}` keys mapping to cell text content.
459
692
  */
460
- interface TableBlock extends Lockable {
693
+ interface TableBlock extends Lockable, Hideable {
461
694
  id: string;
462
695
  x: number;
463
696
  y: number;
@@ -474,7 +707,7 @@ interface TableBlock extends Lockable {
474
707
  * An imported image block on the board plane.
475
708
  * Coordinates (x, y) represent the center of the image in board space.
476
709
  */
477
- interface ImageBlock extends Lockable {
710
+ interface ImageBlock extends Lockable, Hideable {
478
711
  id: string;
479
712
  /**
480
713
  * A legacy, read-only data URL (or, historically, an arbitrary string) —
@@ -497,13 +730,23 @@ interface ImageBlock extends Lockable {
497
730
  stamp?: string;
498
731
  }
499
732
 
733
+ declare const strokeIdBrand: unique symbol;
734
+ type StrokeId = string & {
735
+ readonly [strokeIdBrand]: "StrokeId";
736
+ };
737
+
500
738
  declare const CURRENT_DOCUMENT_SCHEMA_VERSION: 1;
501
739
  type CurrentSerializedStroke = Omit<SerializedStroke, "id"> & {
502
740
  id: StrokeId;
503
741
  };
504
- interface CurrentSerializedDocument extends Required<SerializedDocument> {
742
+ interface CurrentSerializedDocument extends Required<Omit<SerializedDocument, "pages" | "pageName" | "notebooks" | "sections" | "pageSectionId">> {
505
743
  schemaVersion: typeof CURRENT_DOCUMENT_SCHEMA_VERSION;
506
744
  strokes: CurrentSerializedStroke[];
745
+ pageName?: string;
746
+ notebooks?: BoardNotebook[];
747
+ sections?: BoardSection[];
748
+ pageSectionId?: string;
749
+ pages?: SerializedBoardPage[];
507
750
  }
508
751
 
509
752
  interface SearchableComment {
@@ -536,6 +779,532 @@ declare const STAMPS: {
536
779
  declare function stampDataUrl(kind: StampKind): string;
537
780
  declare function isStampKind(value: unknown): value is StampKind;
538
781
 
782
+ interface IconDefinition {
783
+ /** Stable, set-prefixed id (`lucide:rocket`), also what an ImageBlock stores in its `stamp` field. */
784
+ readonly name: string;
785
+ readonly label: string;
786
+ readonly category: string;
787
+ /** Inner SVG markup for a 24x24 viewBox; strokes use `currentColor`. */
788
+ readonly body: string;
789
+ }
790
+ declare const ICON_LIBRARY: readonly [{
791
+ readonly name: "lucide:check";
792
+ readonly label: "Check";
793
+ readonly category: "Status";
794
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 6L9 17l-5-5\"/>";
795
+ }, {
796
+ readonly name: "lucide:x";
797
+ readonly label: "Cross";
798
+ readonly category: "Status";
799
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M18 6L6 18M6 6l12 12\"/>";
800
+ }, {
801
+ readonly name: "lucide:star";
802
+ readonly label: "Star";
803
+ readonly category: "Status";
804
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z\"/>";
805
+ }, {
806
+ readonly name: "lucide:heart";
807
+ readonly label: "Heart";
808
+ readonly category: "Status";
809
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M2 9.5a5.5 5.5 0 0 1 9.591-3.676a.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\"/>";
810
+ }, {
811
+ readonly name: "lucide:flag";
812
+ readonly label: "Flag";
813
+ readonly category: "Status";
814
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528\"/>";
815
+ }, {
816
+ readonly name: "lucide:bookmark";
817
+ readonly label: "Bookmark";
818
+ readonly category: "Status";
819
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\"/>";
820
+ }, {
821
+ readonly name: "lucide:bell";
822
+ readonly label: "Bell";
823
+ readonly category: "Status";
824
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.268 21a2 2 0 0 0 3.464 0m-10.47-5.674A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\"/>";
825
+ }, {
826
+ readonly name: "lucide:info";
827
+ readonly label: "Info";
828
+ readonly category: "Status";
829
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4m0-4h.01\"/></g>";
830
+ }, {
831
+ readonly name: "lucide:circle-alert";
832
+ readonly label: "Alert";
833
+ readonly category: "Status";
834
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 8v4m0 4h.01\"/></g>";
835
+ }, {
836
+ readonly name: "lucide:circle-question-mark";
837
+ readonly label: "Question";
838
+ readonly category: "Status";
839
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3m.08 4h.01\"/></g>";
840
+ }, {
841
+ readonly name: "lucide:thumbs-up";
842
+ readonly label: "Thumbs up";
843
+ readonly category: "Status";
844
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 5.88L14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88M7 10v12\"/>";
845
+ }, {
846
+ readonly name: "lucide:thumbs-down";
847
+ readonly label: "Thumbs down";
848
+ readonly category: "Status";
849
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 18.12L10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88M17 14V2\"/>";
850
+ }, {
851
+ readonly name: "lucide:arrow-up";
852
+ readonly label: "Arrow up";
853
+ readonly category: "Arrows";
854
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m5 12l7-7l7 7m-7 7V5\"/>";
855
+ }, {
856
+ readonly name: "lucide:arrow-down";
857
+ readonly label: "Arrow down";
858
+ readonly category: "Arrows";
859
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 5v14m7-7l-7 7l-7-7\"/>";
860
+ }, {
861
+ readonly name: "lucide:arrow-left";
862
+ readonly label: "Arrow left";
863
+ readonly category: "Arrows";
864
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"/>";
865
+ }, {
866
+ readonly name: "lucide:arrow-right";
867
+ readonly label: "Arrow right";
868
+ readonly category: "Arrows";
869
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"/>";
870
+ }, {
871
+ readonly name: "lucide:arrow-up-right";
872
+ readonly label: "Arrow up-right";
873
+ readonly category: "Arrows";
874
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"/>";
875
+ }, {
876
+ readonly name: "lucide:refresh-cw";
877
+ readonly label: "Refresh";
878
+ readonly category: "Arrows";
879
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M3 12a9 9 0 0 1 9-9a9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5m5 4a9 9 0 0 1-9 9a9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M8 16H3v5\"/></g>";
880
+ }, {
881
+ readonly name: "lucide:move";
882
+ readonly label: "Move";
883
+ readonly category: "Arrows";
884
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 2v20m3-3l-3 3l-3-3M19 9l3 3l-3 3M2 12h20M5 9l-3 3l3 3M9 5l3-3l3 3\"/>";
885
+ }, {
886
+ readonly name: "lucide:shuffle";
887
+ readonly label: "Shuffle";
888
+ readonly category: "Arrows";
889
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m18 14l4 4l-4 4m0-20l4 4l-4 4\"/><path d=\"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22M2 6h1.972a4 4 0 0 1 3.6 2.2M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45\"/></g>";
890
+ }, {
891
+ readonly name: "lucide:user";
892
+ readonly label: "User";
893
+ readonly category: "People";
894
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/></g>";
895
+ }, {
896
+ readonly name: "lucide:users";
897
+ readonly label: "Users";
898
+ readonly category: "People";
899
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M16 3.128a4 4 0 0 1 0 7.744M22 21v-2a4 4 0 0 0-3-3.87\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/></g>";
900
+ }, {
901
+ readonly name: "lucide:briefcase";
902
+ readonly label: "Briefcase";
903
+ readonly category: "People";
904
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16\"/><rect width=\"20\" height=\"14\" x=\"2\" y=\"6\" rx=\"2\"/></g>";
905
+ }, {
906
+ readonly name: "lucide:building";
907
+ readonly label: "Building";
908
+ readonly category: "People";
909
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 10h.01M12 14h.01M12 6h.01M16 10h.01M16 14h.01M16 6h.01M8 10h.01M8 14h.01M8 6h.01M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3\"/><rect width=\"16\" height=\"20\" x=\"4\" y=\"2\" rx=\"2\"/></g>";
910
+ }, {
911
+ readonly name: "lucide:calendar";
912
+ readonly label: "Calendar";
913
+ readonly category: "People";
914
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M8 2v3m8-3v3\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/></g>";
915
+ }, {
916
+ readonly name: "lucide:clock";
917
+ readonly label: "Clock";
918
+ readonly category: "People";
919
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 6v6l4 2\"/></g>";
920
+ }, {
921
+ readonly name: "lucide:mail";
922
+ readonly label: "Mail";
923
+ readonly category: "People";
924
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m22 7l-8.991 5.727a2 2 0 0 1-2.009 0L2 7\"/><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"/></g>";
925
+ }, {
926
+ readonly name: "lucide:message-circle";
927
+ readonly label: "Message";
928
+ readonly category: "People";
929
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092a10 10 0 1 0-4.777-4.719\"/>";
930
+ }, {
931
+ readonly name: "lucide:file";
932
+ readonly label: "File";
933
+ readonly category: "Objects";
934
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5\"/></g>";
935
+ }, {
936
+ readonly name: "lucide:folder";
937
+ readonly label: "Folder";
938
+ readonly category: "Objects";
939
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"/>";
940
+ }, {
941
+ readonly name: "lucide:image";
942
+ readonly label: "Image";
943
+ readonly category: "Objects";
944
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/></g>";
945
+ }, {
946
+ readonly name: "lucide:link";
947
+ readonly label: "Link";
948
+ readonly category: "Objects";
949
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></g>";
950
+ }, {
951
+ readonly name: "lucide:paperclip";
952
+ readonly label: "Paperclip";
953
+ readonly category: "Objects";
954
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m16 6l-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\"/>";
955
+ }, {
956
+ readonly name: "lucide:pin";
957
+ readonly label: "Pin";
958
+ readonly category: "Objects";
959
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4a1 1 0 0 1 1 1z\"/>";
960
+ }, {
961
+ readonly name: "lucide:map-pin";
962
+ readonly label: "Map pin";
963
+ readonly category: "Objects";
964
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></g>";
965
+ }, {
966
+ readonly name: "lucide:search";
967
+ readonly label: "Search";
968
+ readonly category: "Objects";
969
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m21 21l-4.34-4.34\"/><circle cx=\"11\" cy=\"11\" r=\"8\"/></g>";
970
+ }, {
971
+ readonly name: "lucide:settings";
972
+ readonly label: "Settings";
973
+ readonly category: "Objects";
974
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g>";
975
+ }, {
976
+ readonly name: "lucide:trash-2";
977
+ readonly label: "Trash";
978
+ readonly category: "Objects";
979
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/>";
980
+ }, {
981
+ readonly name: "lucide:lock";
982
+ readonly label: "Lock";
983
+ readonly category: "Objects";
984
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></g>";
985
+ }, {
986
+ readonly name: "lucide:key";
987
+ readonly label: "Key";
988
+ readonly category: "Objects";
989
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m15.5 7.5l2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4m2-2l-9.6 9.6\"/><circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\"/></g>";
990
+ }, {
991
+ readonly name: "lucide:code";
992
+ readonly label: "Code";
993
+ readonly category: "Tech";
994
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m16 18l6-6l-6-6M8 6l-6 6l6 6\"/>";
995
+ }, {
996
+ readonly name: "lucide:database";
997
+ readonly label: "Database";
998
+ readonly category: "Tech";
999
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\"/><path d=\"M3 5v14a9 3 0 0 0 18 0V5\"/><path d=\"M3 12a9 3 0 0 0 18 0\"/></g>";
1000
+ }, {
1001
+ readonly name: "lucide:server";
1002
+ readonly label: "Server";
1003
+ readonly category: "Tech";
1004
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"20\" height=\"8\" x=\"2\" y=\"2\" rx=\"2\" ry=\"2\"/><rect width=\"20\" height=\"8\" x=\"2\" y=\"14\" rx=\"2\" ry=\"2\"/><path d=\"M6 6h.01M6 18h.01\"/></g>";
1005
+ }, {
1006
+ readonly name: "lucide:cloud";
1007
+ readonly label: "Cloud";
1008
+ readonly category: "Tech";
1009
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9\"/>";
1010
+ }, {
1011
+ readonly name: "lucide:git-branch";
1012
+ readonly label: "Branch";
1013
+ readonly category: "Tech";
1014
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 6a9 9 0 0 0-9 9V3\"/><circle cx=\"18\" cy=\"6\" r=\"3\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/></g>";
1015
+ }, {
1016
+ readonly name: "lucide:terminal";
1017
+ readonly label: "Terminal";
1018
+ readonly category: "Tech";
1019
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 19h8M4 17l6-6l-6-6\"/>";
1020
+ }, {
1021
+ readonly name: "lucide:cpu";
1022
+ readonly label: "CPU";
1023
+ readonly category: "Tech";
1024
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 20v2m0-20v2m5 16v2m0-20v2M2 12h2m-2 5h2M2 7h2m16 5h2m-2 5h2M20 7h2M7 20v2M7 2v2\"/><rect width=\"16\" height=\"16\" x=\"4\" y=\"4\" rx=\"2\"/><rect width=\"8\" height=\"8\" x=\"8\" y=\"8\" rx=\"1\"/></g>";
1025
+ }, {
1026
+ readonly name: "lucide:bug";
1027
+ readonly label: "Bug";
1028
+ readonly category: "Tech";
1029
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 20v-9m2-4a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4zm.12-3.12L16 2\"/><path d=\"M21 21a4 4 0 0 0-3.81-4M21 5a4 4 0 0 1-3.55 3.97M22 13h-4M3 21a4 4 0 0 1 3.81-4M3 5a4 4 0 0 0 3.55 3.97M6 13H2M8 2l1.88 1.88M9 7.13V6a3 3 0 1 1 6 0v1.13\"/></g>";
1030
+ }, {
1031
+ readonly name: "lucide:lightbulb";
1032
+ readonly label: "Idea";
1033
+ readonly category: "Ideas";
1034
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 14c.2-1 .7-1.7 1.5-2.5c1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5c.7.7 1.3 1.5 1.5 2.5m0 4h6m-5 4h4\"/>";
1035
+ }, {
1036
+ readonly name: "lucide:zap";
1037
+ readonly label: "Zap";
1038
+ readonly category: "Ideas";
1039
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15.914 4a1.5 1.5 0 0 0-2.474-1.561l-9 9A1.5 1.5 0 0 0 5.5 14h4.002a.5.5 0 0 1 .471.666L8.086 20a1.5 1.5 0 0 0 2.475 1.56l9-9A1.5 1.5 0 0 0 18.5 10h-3.997a.5.5 0 0 1-.472-.667z\"/>";
1040
+ }, {
1041
+ readonly name: "lucide:target";
1042
+ readonly label: "Target";
1043
+ readonly category: "Ideas";
1044
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><circle cx=\"12\" cy=\"12\" r=\"6\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/></g>";
1045
+ }, {
1046
+ readonly name: "lucide:rocket";
1047
+ readonly label: "Rocket";
1048
+ readonly category: "Ideas";
1049
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\"/><path d=\"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\"/><path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\"/></g>";
1050
+ }, {
1051
+ readonly name: "lucide:trophy";
1052
+ readonly label: "Trophy";
1053
+ readonly category: "Ideas";
1054
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10 14.66V17a1 1 0 0 1-1 1a2 2 0 0 0-2 2v2m7-7.34V17a1 1 0 0 0 1 1a2 2 0 0 1 2 2v2m.916-12H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3M4 22h16\"/><path d=\"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z\"/><path d=\"M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3\"/></g>";
1055
+ }, {
1056
+ readonly name: "lucide:gift";
1057
+ readonly label: "Gift";
1058
+ readonly category: "Ideas";
1059
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 7v14m8-10v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8m3.5-4a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5a1 1 0 0 1 0 5\"/><rect width=\"18\" height=\"4\" x=\"3\" y=\"7\" rx=\"1\"/></g>";
1060
+ }, {
1061
+ readonly name: "lucide:coffee";
1062
+ readonly label: "Coffee";
1063
+ readonly category: "Ideas";
1064
+ readonly body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2\"/>";
1065
+ }, {
1066
+ readonly name: "lucide:smile";
1067
+ readonly label: "Smile";
1068
+ readonly category: "Ideas";
1069
+ readonly body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 14s1.5 2 4 2s4-2 4-2M9 9h.01M15 9h.01\"/></g>";
1070
+ }];
1071
+ /** Every vendored icon's id, as a literal union. */
1072
+ type IconName = (typeof ICON_LIBRARY)[number]["name"];
1073
+
1074
+ /**
1075
+ * Emoji stickers. Unlike the icon library there's no artwork to vendor: each
1076
+ * is a Unicode character, drawn by the platform's own colour-emoji font when
1077
+ * its SVG is rasterised — so an emoji looks native to each viewer's OS
1078
+ * (Apple, Segoe, Noto), the same way it would in a chat app.
1079
+ */
1080
+ interface EmojiDefinition {
1081
+ /** Stable, set-prefixed id (`emoji:fire`), also what an ImageBlock stores in its `stamp` field. */
1082
+ readonly name: string;
1083
+ readonly label: string;
1084
+ readonly category: string;
1085
+ readonly char: string;
1086
+ }
1087
+ declare const EMOJI_LIBRARY: readonly [{
1088
+ readonly name: "emoji:grinning";
1089
+ readonly label: "Grinning face";
1090
+ readonly category: "Smileys";
1091
+ readonly char: "😀";
1092
+ }, {
1093
+ readonly name: "emoji:joy";
1094
+ readonly label: "Tears of joy";
1095
+ readonly category: "Smileys";
1096
+ readonly char: "😂";
1097
+ }, {
1098
+ readonly name: "emoji:smiling";
1099
+ readonly label: "Smiling face";
1100
+ readonly category: "Smileys";
1101
+ readonly char: "😊";
1102
+ }, {
1103
+ readonly name: "emoji:heart-eyes";
1104
+ readonly label: "Heart eyes";
1105
+ readonly category: "Smileys";
1106
+ readonly char: "😍";
1107
+ }, {
1108
+ readonly name: "emoji:thinking";
1109
+ readonly label: "Thinking face";
1110
+ readonly category: "Smileys";
1111
+ readonly char: "🤔";
1112
+ }, {
1113
+ readonly name: "emoji:sunglasses";
1114
+ readonly label: "Sunglasses";
1115
+ readonly category: "Smileys";
1116
+ readonly char: "😎";
1117
+ }, {
1118
+ readonly name: "emoji:crying";
1119
+ readonly label: "Crying face";
1120
+ readonly category: "Smileys";
1121
+ readonly char: "😢";
1122
+ }, {
1123
+ readonly name: "emoji:angry";
1124
+ readonly label: "Angry face";
1125
+ readonly category: "Smileys";
1126
+ readonly char: "😡";
1127
+ }, {
1128
+ readonly name: "emoji:sleeping";
1129
+ readonly label: "Sleeping face";
1130
+ readonly category: "Smileys";
1131
+ readonly char: "😴";
1132
+ }, {
1133
+ readonly name: "emoji:mind-blown";
1134
+ readonly label: "Mind blown";
1135
+ readonly category: "Smileys";
1136
+ readonly char: "🤯";
1137
+ }, {
1138
+ readonly name: "emoji:grimacing";
1139
+ readonly label: "Grimacing face";
1140
+ readonly category: "Smileys";
1141
+ readonly char: "😬";
1142
+ }, {
1143
+ readonly name: "emoji:partying";
1144
+ readonly label: "Partying face";
1145
+ readonly category: "Smileys";
1146
+ readonly char: "🥳";
1147
+ }, {
1148
+ readonly name: "emoji:thumbs-up";
1149
+ readonly label: "Thumbs up emoji";
1150
+ readonly category: "Gestures";
1151
+ readonly char: "👍";
1152
+ }, {
1153
+ readonly name: "emoji:thumbs-down";
1154
+ readonly label: "Thumbs down emoji";
1155
+ readonly category: "Gestures";
1156
+ readonly char: "👎";
1157
+ }, {
1158
+ readonly name: "emoji:clap";
1159
+ readonly label: "Clapping hands";
1160
+ readonly category: "Gestures";
1161
+ readonly char: "👏";
1162
+ }, {
1163
+ readonly name: "emoji:raised-hands";
1164
+ readonly label: "Raised hands";
1165
+ readonly category: "Gestures";
1166
+ readonly char: "🙌";
1167
+ }, {
1168
+ readonly name: "emoji:folded-hands";
1169
+ readonly label: "Folded hands";
1170
+ readonly category: "Gestures";
1171
+ readonly char: "🙏";
1172
+ }, {
1173
+ readonly name: "emoji:eyes";
1174
+ readonly label: "Eyes";
1175
+ readonly category: "Gestures";
1176
+ readonly char: "👀";
1177
+ }, {
1178
+ readonly name: "emoji:muscle";
1179
+ readonly label: "Flexed biceps";
1180
+ readonly category: "Gestures";
1181
+ readonly char: "💪";
1182
+ }, {
1183
+ readonly name: "emoji:wave";
1184
+ readonly label: "Waving hand";
1185
+ readonly category: "Gestures";
1186
+ readonly char: "👋";
1187
+ }, {
1188
+ readonly name: "emoji:red-heart";
1189
+ readonly label: "Red heart";
1190
+ readonly category: "Symbols";
1191
+ readonly char: "❤️";
1192
+ }, {
1193
+ readonly name: "emoji:fire";
1194
+ readonly label: "Flame";
1195
+ readonly category: "Symbols";
1196
+ readonly char: "🔥";
1197
+ }, {
1198
+ readonly name: "emoji:star";
1199
+ readonly label: "Medium star";
1200
+ readonly category: "Symbols";
1201
+ readonly char: "⭐";
1202
+ }, {
1203
+ readonly name: "emoji:check";
1204
+ readonly label: "Check mark button";
1205
+ readonly category: "Symbols";
1206
+ readonly char: "✅";
1207
+ }, {
1208
+ readonly name: "emoji:cross";
1209
+ readonly label: "Cross mark";
1210
+ readonly category: "Symbols";
1211
+ readonly char: "❌";
1212
+ }, {
1213
+ readonly name: "emoji:warning";
1214
+ readonly label: "Warning sign";
1215
+ readonly category: "Symbols";
1216
+ readonly char: "⚠️";
1217
+ }, {
1218
+ readonly name: "emoji:question";
1219
+ readonly label: "Red question mark";
1220
+ readonly category: "Symbols";
1221
+ readonly char: "❓";
1222
+ }, {
1223
+ readonly name: "emoji:hundred";
1224
+ readonly label: "Hundred points";
1225
+ readonly category: "Symbols";
1226
+ readonly char: "💯";
1227
+ }, {
1228
+ readonly name: "emoji:light-bulb";
1229
+ readonly label: "Light bulb";
1230
+ readonly category: "Symbols";
1231
+ readonly char: "💡";
1232
+ }, {
1233
+ readonly name: "emoji:bullseye";
1234
+ readonly label: "Bullseye";
1235
+ readonly category: "Symbols";
1236
+ readonly char: "🎯";
1237
+ }, {
1238
+ readonly name: "emoji:party-popper";
1239
+ readonly label: "Party popper";
1240
+ readonly category: "Objects";
1241
+ readonly char: "🎉";
1242
+ }, {
1243
+ readonly name: "emoji:rocket";
1244
+ readonly label: "Rocket emoji";
1245
+ readonly category: "Objects";
1246
+ readonly char: "🚀";
1247
+ }, {
1248
+ readonly name: "emoji:trophy";
1249
+ readonly label: "Trophy emoji";
1250
+ readonly category: "Objects";
1251
+ readonly char: "🏆";
1252
+ }, {
1253
+ readonly name: "emoji:pushpin";
1254
+ readonly label: "Pushpin";
1255
+ readonly category: "Objects";
1256
+ readonly char: "📌";
1257
+ }, {
1258
+ readonly name: "emoji:memo";
1259
+ readonly label: "Memo";
1260
+ readonly category: "Objects";
1261
+ readonly char: "📝";
1262
+ }, {
1263
+ readonly name: "emoji:calendar";
1264
+ readonly label: "Tear-off calendar";
1265
+ readonly category: "Objects";
1266
+ readonly char: "📅";
1267
+ }, {
1268
+ readonly name: "emoji:alarm-clock";
1269
+ readonly label: "Alarm clock";
1270
+ readonly category: "Objects";
1271
+ readonly char: "⏰";
1272
+ }, {
1273
+ readonly name: "emoji:speech-balloon";
1274
+ readonly label: "Speech balloon";
1275
+ readonly category: "Objects";
1276
+ readonly char: "💬";
1277
+ }];
1278
+ type EmojiName = (typeof EMOJI_LIBRARY)[number]["name"];
1279
+ declare function isEmojiName(value: unknown): value is EmojiName;
1280
+ /** An emoji as a standalone SVG data URL, sized to rasterise sharply (see icons.ts). */
1281
+ declare function emojiDataUrl(name: string): string;
1282
+
1283
+ /**
1284
+ * What the stamp tool will drop next: one of the six built-in stamp-pad
1285
+ * stickers, an emoji, or any vendored icon. All land on the board the same way
1286
+ * — as an image whose `stamp` field records which one it was (see `placeStamp`).
1287
+ */
1288
+ type StickerKind = StampKind | EmojiName | IconName;
1289
+ declare function isIconName(value: unknown): value is IconName;
1290
+ /** The vendored icons grouped for a picker, in the order they were vendored. */
1291
+ declare function iconCategories(): {
1292
+ category: string;
1293
+ icons: readonly IconDefinition[];
1294
+ }[];
1295
+ /**
1296
+ * An icon as a standalone SVG data URL, drawn in `color`.
1297
+ *
1298
+ * The library's art strokes in `currentColor`, which has no meaning once the
1299
+ * markup is detached into a data URL — an `<img>`/texture has no inherited
1300
+ * colour to resolve it against — so the colour is substituted in rather than
1301
+ * inherited.
1302
+ */
1303
+ declare function iconDataUrl(name: string, color: string): string;
1304
+ declare function isStickerKind(value: unknown): value is StickerKind;
1305
+ /** Human-readable name for any sticker kind — what a placed sticker is called and searched by. */
1306
+ declare function stickerLabel(kind: StickerKind): string;
1307
+
539
1308
  type SerializedBoardDocument = CurrentSerializedDocument;
540
1309
 
541
1310
  interface AssetExportFailure {
@@ -576,16 +1345,37 @@ interface BoardStyle {
576
1345
  readonly noteColor: string;
577
1346
  readonly tableRows: number;
578
1347
  readonly tableCols: number;
579
- readonly stampKind: StampKind;
1348
+ /** A stamp-pad kind or any vendored icon name (see `ICON_LIBRARY`). */
1349
+ readonly stampKind: StickerKind;
580
1350
  readonly timerDurationMs: number;
581
1351
  }
1352
+ /** A page listed in the Board navigator. `default` is the original first page. */
1353
+ interface BoardPage {
1354
+ readonly id: string;
1355
+ readonly name: string;
1356
+ readonly sectionId: string;
1357
+ }
582
1358
  interface BoardSnapshot {
1359
+ readonly notebooks: readonly BoardNotebook[];
1360
+ readonly sections: readonly BoardSection[];
1361
+ readonly activeNotebookId: string;
1362
+ readonly activeSectionId: string;
1363
+ readonly pages: readonly BoardPage[];
1364
+ readonly activePageId: string;
583
1365
  readonly status: "loading" | "ready" | "disposed";
584
1366
  readonly documentId: string;
585
1367
  readonly tool: BuiltInTool | (string & {});
586
1368
  readonly zoom: number;
587
1369
  readonly readOnly: boolean;
588
1370
  readonly selection: readonly string[];
1371
+ readonly focusedItem: FocusedItem | null;
1372
+ /**
1373
+ * What an inline editor currently covers, as last set through
1374
+ * `view.setInlineEditing` — a text block (`{ id }`) or a table cell
1375
+ * (`{ id, row, col }`), else null. Chrome uses it to stay out of an open
1376
+ * editor's way.
1377
+ */
1378
+ readonly inlineEditing: InlineEditingTarget | null;
589
1379
  readonly strokeCount: number;
590
1380
  readonly objectCount: number;
591
1381
  readonly canUndo: boolean;
@@ -596,6 +1386,39 @@ interface BoardSnapshot {
596
1386
  readonly collaboration: CollaborationSnapshot;
597
1387
  };
598
1388
  }
1389
+ /**
1390
+ * `selection` collapsed into the one thing a selected-object toolbar needs:
1391
+ * what's selected, its lock state, and where to anchor above it. `null`
1392
+ * when nothing is selected, or when the selection mixes types/objects that
1393
+ * don't resolve to a single focus (anything but one object, or several
1394
+ * strokes sharing a `clusterId` — a multi-stroke shape).
1395
+ *
1396
+ * Raw lock fields, not a derived `canUnlock` — this API has no notion of
1397
+ * "the local user" to judge that against (see `canUnlockItem` in `../core`,
1398
+ * which takes a `userId` the Host already owns). A Custom object's lock
1399
+ * shape doesn't carry a holder name, so it always reports `locked: false`
1400
+ * here, matching the engine's own internal selection-badge behavior.
1401
+ */
1402
+ /** Axis-aligned bounds in board space (y up). */
1403
+ interface BoardBounds {
1404
+ readonly minX: number;
1405
+ readonly minY: number;
1406
+ readonly maxX: number;
1407
+ readonly maxY: number;
1408
+ }
1409
+ interface InlineEditingTarget {
1410
+ readonly id: string;
1411
+ readonly row?: number;
1412
+ readonly col?: number;
1413
+ }
1414
+ interface FocusedItem {
1415
+ readonly type: "stroke" | "note" | "text" | "table" | "image" | "timer" | "rectangle" | "ellipse" | "group" | "line" | "arrow" | "polygon" | "star" | "heart" | "custom";
1416
+ readonly id: string;
1417
+ readonly locked: boolean;
1418
+ readonly lockedBy?: string;
1419
+ readonly lockedByName?: string;
1420
+ readonly screenPosition?: ScreenPoint;
1421
+ }
599
1422
  interface BoardControllerError {
600
1423
  source: "controller" | "renderer" | "persistence" | "collaboration";
601
1424
  code: string;
@@ -604,6 +1427,9 @@ interface BoardControllerError {
604
1427
  }
605
1428
  interface BoardEventMap {
606
1429
  change: BoardSnapshot;
1430
+ "page-changing": {
1431
+ pageId: string;
1432
+ };
607
1433
  "tool-change": {
608
1434
  tool: string;
609
1435
  };
@@ -670,6 +1496,8 @@ interface BoardEventMap {
670
1496
  "asset-diagnostic": AssetDiagnostic;
671
1497
  /** A batch of Ops was reconciled (not applied as-sent) by the persistence adapter (ticket #24). */
672
1498
  "persistence-diagnostic": PersistenceDiagnostic;
1499
+ /** The collaboration server has confirmed receipt of these op ids (Phase 7) — observability only; the Document was already correct via optimistic local apply before this ever fires. */
1500
+ "collaboration-ops-acknowledged": CollaborationAckDiagnostic;
673
1501
  audit: unknown;
674
1502
  error: BoardControllerError;
675
1503
  disposed: undefined;
@@ -689,6 +1517,27 @@ interface BoardView {
689
1517
  y: number;
690
1518
  zoom: number;
691
1519
  }
1520
+ /**
1521
+ * The rendered board surface's color, reference grid, and shape stroke
1522
+ * width — the subset of {@link ScrawlTheme} that reaches the rendering
1523
+ * engine directly (everything else is UI-chrome-only, applied as CSS). Any
1524
+ * field left unset keeps its current value.
1525
+ */
1526
+ interface BoardThemeOptions {
1527
+ /** The board/canvas background color — distinct from UI chrome panels. */
1528
+ surface?: string;
1529
+ /** `"flat"` (default): a plain, uniform board surface. `"textured"`: a subtle "melamine" micro-noise + satin sheen, like a physical whiteboard. */
1530
+ surfaceTexture?: "flat" | "textured";
1531
+ /** `"none"` (default) keeps the board a plain surface; `"line"`/`"dot"` draw a zoom-adaptive reference grid. */
1532
+ gridMode?: "none" | "line" | "dot";
1533
+ gridColor?: string;
1534
+ /** Grid spacing in board units at 100% zoom. Ignored when `gridMode` is `"none"`. */
1535
+ gridSpacing?: number;
1536
+ /** On-screen grid line/dot width in CSS pixels — stays this width at any zoom, since the grid is a reference aid, not content. */
1537
+ gridLineWidth?: number;
1538
+ /** Shape (rectangle, ellipse, arrow, ...) border width, in board units — scales with zoom like ink, since it's part of the drawn content. */
1539
+ shapeStrokeWidth?: number;
1540
+ }
692
1541
  /**
693
1542
  * A Host-owned comment, summarized for Board-side search and marker
694
1543
  * rendering. Comments are not Document content — they carry no undo
@@ -712,9 +1561,12 @@ interface PresenceView {
712
1561
  readonly height: number;
713
1562
  }
714
1563
  /**
715
- * A Host-owned collaborator, synced in for cursor/roster rendering only.
716
- * Presence is ephemeral — it never touches the Document, Ops, undo/redo,
717
- * or persistence — so this is a read/query capability, not an adapter.
1564
+ * A collaborator, synced in for cursor/roster rendering only. Presence is
1565
+ * ephemeral — it never touches the Document, Ops, undo/redo, or persistence
1566
+ * (ADR 0006/0007). Two ways a roster gets populated (`presence.sync`
1567
+ * directly, or a `CollaborationAdapter`'s optional presence channel —
1568
+ * Phase 6, ADR 0015) both feed the exact same read/query capability below;
1569
+ * a Host picks one, not both, for a given controller.
718
1570
  */
719
1571
  interface PresenceUser {
720
1572
  readonly id: string;
@@ -723,6 +1575,14 @@ interface PresenceUser {
723
1575
  readonly tool?: string;
724
1576
  readonly cursor?: PresenceCursor;
725
1577
  readonly view?: PresenceView;
1578
+ /** Host-supplied extras (avatar URL, role, etc.) — opaque to Scrawl, never interpreted. */
1579
+ readonly metadata?: Record<string, unknown>;
1580
+ }
1581
+ /** This client's own local presence, published via `presence.broadcast()` (Phase 6). */
1582
+ interface LocalPresence {
1583
+ readonly cursor?: PresenceCursor | null;
1584
+ readonly view?: PresenceView | null;
1585
+ readonly tool?: string;
726
1586
  }
727
1587
  /**
728
1588
  * The Custom arm wraps `CustomBoardObject` under the same `type` discriminant
@@ -750,6 +1610,22 @@ type BoardObject = ({
750
1610
  } & ImageBlock) | ({
751
1611
  type: "timer";
752
1612
  } & KitchenTimer) | ({
1613
+ type: "rectangle";
1614
+ } & RectangleObject) | ({
1615
+ type: "ellipse";
1616
+ } & EllipseObject) | ({
1617
+ type: "group";
1618
+ } & GroupObject) | ({
1619
+ type: "line";
1620
+ } & LineObject) | ({
1621
+ type: "arrow";
1622
+ } & ArrowObject) | ({
1623
+ type: "polygon";
1624
+ } & PolygonObject) | ({
1625
+ type: "star";
1626
+ } & StarObject) | ({
1627
+ type: "heart";
1628
+ } & HeartObject) | ({
753
1629
  type: "custom";
754
1630
  customType: ObjectType;
755
1631
  } & Omit<CustomBoardObject, "type">);
@@ -778,6 +1654,30 @@ type BoardObjectInput = {
778
1654
  type: "timer";
779
1655
  id?: string;
780
1656
  } & Omit<KitchenTimer, "id">) | ({
1657
+ type: "rectangle";
1658
+ id?: string;
1659
+ } & Omit<RectangleObject, "id">) | ({
1660
+ type: "ellipse";
1661
+ id?: string;
1662
+ } & Omit<EllipseObject, "id">) | ({
1663
+ type: "group";
1664
+ id?: string;
1665
+ } & Omit<GroupObject, "id">) | ({
1666
+ type: "line";
1667
+ id?: string;
1668
+ } & Omit<LineObject, "id">) | ({
1669
+ type: "arrow";
1670
+ id?: string;
1671
+ } & Omit<ArrowObject, "id">) | ({
1672
+ type: "polygon";
1673
+ id?: string;
1674
+ } & Omit<PolygonObject, "id">) | ({
1675
+ type: "star";
1676
+ id?: string;
1677
+ } & Omit<StarObject, "id">) | ({
1678
+ type: "heart";
1679
+ id?: string;
1680
+ } & Omit<HeartObject, "id">) | ({
781
1681
  type: "custom";
782
1682
  id?: string;
783
1683
  customType: ObjectType;
@@ -808,10 +1708,34 @@ type LoadResult = {
808
1708
  } | {
809
1709
  state: "missing";
810
1710
  };
1711
+ /**
1712
+ * Result of a whole-document `PersistenceAdapter.replace()` call (ADR 0006:
1713
+ * "Whole-document writes survive only for create, clear-board and import,
1714
+ * where replacing everything is the actual intent"). Revision-gated, unlike
1715
+ * `applyOps` — `conflict` means `baseRevision` was stale (someone else's
1716
+ * write landed first); the caller must reload and never overwrites blind.
1717
+ */
1718
+ type ReplaceResult = {
1719
+ state: "applied";
1720
+ revision: string;
1721
+ } | {
1722
+ state: "conflict";
1723
+ currentRevision: string;
1724
+ };
1725
+ /**
1726
+ * The one sanctioned seam for persisting a Board's Document to a Host's own
1727
+ * storage — implement this against a database, an HTTP API, IndexedDB
1728
+ * (see `@scrawl-board/board/local`'s `createIndexedDBPersistence`), or
1729
+ * anything else. `load()` fetches the current state on connect; `applyOps()`
1730
+ * streams incremental Ops as edits happen; `replace()` is only for
1731
+ * whole-document writes (create, clear-board, import — see ADR 0006) and is
1732
+ * revision-gated so a stale write never silently clobbers a newer one.
1733
+ * Passed via `createBoardController({ adapters: { persistence } })`.
1734
+ */
811
1735
  interface PersistenceAdapter {
812
1736
  load(context: DocumentContext): Promise<LoadResult>;
813
1737
  applyOps(context: DocumentContext, ops: readonly ControllerOp[]): Promise<ApplyOpsResult>;
814
- replace(context: DocumentContext, document: CurrentSerializedDocument, baseRevision: string): Promise<unknown>;
1738
+ replace(context: DocumentContext, document: CurrentSerializedDocument, baseRevision: string): Promise<ReplaceResult>;
815
1739
  }
816
1740
  /**
817
1741
  * `"reconcile"` (ticket #24) means the server authoritatively resolved the
@@ -835,14 +1759,61 @@ interface PersistenceDiagnostic {
835
1759
  rejectedOpIds: readonly string[];
836
1760
  revision: string;
837
1761
  }
1762
+ /** Emitted as `"collaboration-ops-acknowledged"` (Phase 7) — the server has confirmed receipt of these op ids on the live pipe. */
1763
+ interface CollaborationAckDiagnostic {
1764
+ opIds: readonly string[];
1765
+ }
838
1766
  interface ControllerOp {
839
1767
  id: string;
840
1768
  schemaVersion: 1;
841
1769
  kind: "upsert" | "restore" | "remove";
842
- objectType: "stroke" | "note" | "text" | "table" | "image" | "timer" | "custom";
1770
+ objectType: "stroke" | "note" | "text" | "table" | "image" | "timer" | "rectangle" | "ellipse" | "group" | "line" | "arrow" | "polygon" | "star" | "heart" | "custom"
1771
+ /**
1772
+ * A whole-document paint-order sync (Phase 3), not a per-object type —
1773
+ * `objectId` is always the fixed sentinel `"order"` and `payload` is
1774
+ * `{ order: string[] }`. The only `objectType` with no matching
1775
+ * `BoardObject`/document collection; kept in this same union (rather
1776
+ * than a separate wire message) so it flows through the existing
1777
+ * `PersistenceAdapter`/`CollaborationAdapter` opaquely, unchanged.
1778
+ */
1779
+ | "order" | "page" | "notebook" | "section";
1780
+ /** Absent for the original page; scopes content and order Ops to an additional page. */
1781
+ pageId?: string;
843
1782
  objectId: string;
844
1783
  payload?: unknown;
1784
+ /**
1785
+ * This op's position in its own originating client's local sequence
1786
+ * (Phase 7) — 1, 2, 3, ... per controller instance, distinct from `id`
1787
+ * (an opaque, globally-unique identifier used for dedup/ack, not
1788
+ * ordering) and from a server's own authoritative ordering (e.g.
1789
+ * `referenceCollaborationServer.ts`'s per-room `version` counter).
1790
+ * Present on every op this SDK originates locally; a remote peer's op
1791
+ * carries whatever its own origin set, unchanged — never renumbered in
1792
+ * transit. Absent on an op minted by decoding the legacy wire envelope
1793
+ * (`scrawlOpEnvelope.ts`), which predates this field and has no
1794
+ * per-client sequence concept of its own.
1795
+ */
1796
+ clientSequence?: number;
1797
+ /**
1798
+ * The `CollaboratorIdentity.id` of this op's originating client (Phase
1799
+ * 7) — set for every op this SDK originates locally when `identity` is
1800
+ * configured, omitted entirely otherwise (never sent as `undefined`).
1801
+ * The explicit foundation for a future per-author undo filter (a local
1802
+ * user's own undo should only ever touch their own ops) — no undo-stack
1803
+ * behavior itself changes this phase.
1804
+ */
1805
+ clientId?: string;
845
1806
  }
1807
+ /**
1808
+ * The one sanctioned seam for real-time multiplayer — implement this against
1809
+ * a Host's own collaboration backend (WebSocket relay, CRDT server, etc.).
1810
+ * `connect()` is called once per controller with the local user's
1811
+ * `identity` and a `receive` callback the adapter invokes with incoming
1812
+ * Ops, presence updates, acks, and connection status; it resolves with a
1813
+ * `CollaborationSession` the controller uses to send local Ops and presence
1814
+ * back out. Passed via `createBoardController({ adapters: { collaboration } })`;
1815
+ * omit it entirely to run single-player.
1816
+ */
846
1817
  interface CollaborationAdapter {
847
1818
  connect(options: DocumentContext & {
848
1819
  identity: CollaboratorIdentity;
@@ -853,14 +1824,72 @@ interface CollaboratorIdentity {
853
1824
  id: string;
854
1825
  name: string;
855
1826
  color?: string;
1827
+ /** Host-supplied extras (avatar URL, role, etc.) — opaque to Scrawl, forwarded into any resulting `PresenceUser` unread and never interpreted. */
1828
+ metadata?: Record<string, unknown>;
856
1829
  }
857
1830
  interface CollaborationReceiver {
858
1831
  ops(ops: readonly ControllerOp[]): void;
1832
+ /**
1833
+ * The current presence roster (Phase 6, ADR 0015) — always a full
1834
+ * replacement, never a delta, matching `presence.sync`'s existing
1835
+ * semantics exactly (an adapter that aggregates wire deltas into a full
1836
+ * roster before calling this is the adapter's own job, not the
1837
+ * controller's). Required on this interface (not optional) because a
1838
+ * Host only ever *consumes* `CollaborationReceiver` — never implements
1839
+ * it — so adding a required method here cannot break an existing custom
1840
+ * `CollaborationAdapter`. An adapter with no presence support simply
1841
+ * never calls it.
1842
+ */
1843
+ presence(users: readonly PresenceUser[]): void;
1844
+ /**
1845
+ * The server has confirmed receipt of these op ids (Phase 7) —
1846
+ * distinguishes "sent" from "server accepted," which `sendOps` alone
1847
+ * (fire-and-forget) cannot. Required for the same reason `presence` is:
1848
+ * Hosts only ever consume this interface, never implement it, so this
1849
+ * cannot break an existing custom `CollaborationAdapter`. An adapter with
1850
+ * no ack support simply never calls it — the collaboration pipe still
1851
+ * works exactly as it did before this existed, just without the
1852
+ * bookkeeping/observability this enables.
1853
+ */
1854
+ acknowledged(opIds: readonly string[]): void;
859
1855
  status(state: "online" | "reconnecting" | "offline"): void;
860
1856
  error(cause: unknown): void;
861
1857
  }
1858
+ /**
1859
+ * Result of `CollaborationSession.requestSync()` (Phase 7). `"ops"` means
1860
+ * the adapter's own live-pipe cache fully covered the gap since the
1861
+ * caller's last known revision — apply `ops` and the client is caught up,
1862
+ * no persistence reload needed. `"unavailable"` means it couldn't (gap too
1863
+ * large, server restarted, or the adapter has no retained history at all)
1864
+ * — the caller must fall back to a persistence-backed reload. This is a
1865
+ * best-effort *liveness* cache, deliberately never a durable source of
1866
+ * truth (ADR 0006's "collaboration is never a second source of document
1867
+ * truth" — see ADR 0015's own extension of that principle to presence,
1868
+ * now extended once more, the same way, to this).
1869
+ */
1870
+ type CollaborationSyncResult = {
1871
+ state: "ops";
1872
+ ops: readonly ControllerOp[];
1873
+ serverRevision: string;
1874
+ } | {
1875
+ state: "unavailable";
1876
+ };
862
1877
  interface CollaborationSession {
863
1878
  sendOps(ops: readonly ControllerOp[]): void;
1879
+ /**
1880
+ * Publishes this client's own local presence (Phase 6, ADR 0015) —
1881
+ * best-effort, unordered, never persisted, never an Op. Optional: an
1882
+ * adapter that doesn't support presence simply omits this method, and
1883
+ * `presence.broadcast()` becomes a silent no-op.
1884
+ */
1885
+ updatePresence?(presence: LocalPresence): void;
1886
+ /**
1887
+ * Requests an incremental catch-up after a reconnect (Phase 7) — optional;
1888
+ * an adapter that doesn't support this simply omits the method, and the
1889
+ * caller (`resyncAfterReconnect`) goes straight to its existing
1890
+ * persistence-backed full reload, unchanged from Phase 6.
1891
+ */
1892
+ requestSync?(): Promise<CollaborationSyncResult>;
864
1893
  close(): Promise<void>;
865
1894
  }
866
1895
  interface CreateBoardControllerOptions {
@@ -899,14 +1928,114 @@ interface CreateBoardControllerOptions {
899
1928
  * changes via `boardTheme.set` below — a headless/browser-tier Host that
900
1929
  * doesn't use the React theme system can set this directly instead.
901
1930
  */
902
- boardTheme?: {
903
- surface?: string;
904
- gridMode?: "none" | "line" | "dot";
905
- gridColor?: string;
906
- gridSpacing?: number;
1931
+ boardTheme?: BoardThemeOptions;
1932
+ /**
1933
+ * Debounced auto-flush of pending persistence Ops after document changes
1934
+ * settle (Phase 5). Enabled by default (1000ms debounce) whenever
1935
+ * `adapters.persistence` is configured — today, without this, a Host must
1936
+ * call `flush()` manually after every edit for anything to persist. Pass
1937
+ * `false` to opt out entirely and drive `flush()` yourself, preserving
1938
+ * prior behavior exactly. Never fires on a per-change basis — rapid edits
1939
+ * coalesce into one flush of their final state (ADR 0006).
1940
+ */
1941
+ autosave?: boolean | {
1942
+ debounceMs?: number;
907
1943
  };
1944
+ /**
1945
+ * Throttle for `presence.broadcast()` (Phase 6, ADR 0015) — the minimum
1946
+ * interval between outgoing presence updates sent via the configured
1947
+ * `CollaborationAdapter`. Defaults to 50ms. A trailing throttle: the
1948
+ * latest value passed to `broadcast()` always eventually sends, even if
1949
+ * calls arrive faster than this interval.
1950
+ */
1951
+ presenceThrottleMs?: number;
1952
+ /**
1953
+ * Caps how many `ControllerOp`s can sit queued, unsent, for the
1954
+ * persistence pipe (`pendingOps`) or the collaboration pipe
1955
+ * (`pendingCollaborationOps`) at once (Phase 7) — each pipe is capped
1956
+ * independently. Prevents unbounded memory growth from a long-lived
1957
+ * offline session or a stuck adapter. Exceeding it never fails or drops
1958
+ * the local edit itself (the Document already applied it optimistically)
1959
+ * — only queueing for that one pipe is skipped, and a
1960
+ * `{code:"queue-overflow", retryable:false}` error is emitted so a Host
1961
+ * can react. Defaults to 1000 — the Phase 9 collaboration coalescing
1962
+ * above (`collaborationCoalesceMs`) already keeps a busy drag from
1963
+ * approaching this on its own, so hitting it in practice means a pipe
1964
+ * has been offline/stuck for a genuinely long editing session.
1965
+ *
1966
+ * **Recovery** (Phase 9): the dropped op itself is gone from that one
1967
+ * pipe's queue — there is no automatic backfill, and the live
1968
+ * controller keeps running with that pipe now silently missing one
1969
+ * edit. Two things stay true regardless: (1) the in-memory Document is
1970
+ * never affected — a queue-overflow can never corrupt or roll back a
1971
+ * local edit, only skip sending it; (2) staleness is per-object, not
1972
+ * permanent — any *later* edit to that same object produces a brand
1973
+ * new, undropped Op carrying its full current state, which naturally
1974
+ * supersedes the gap (the Op model is already last-write-wins/
1975
+ * idempotent, so a superseding Op doesn't need the earlier one to have
1976
+ * arrived). The real risk is an object that's dropped and never edited
1977
+ * again before the controller is disposed or the page reloads — a Host
1978
+ * that needs strict durability should treat `queue-overflow` as a
1979
+ * signal to check `persistence.state`/`pendingOps` pressure (via
1980
+ * `usePersistenceStatus`/`getSnapshot().connection.persistence`)
1981
+ * before disposing, not assume disposing and reconnecting alone
1982
+ * repairs the gap (a fresh `load()` only returns what the backend
1983
+ * already has, which is exactly what's missing the dropped edit).
1984
+ */
1985
+ maxPendingOps?: number;
1986
+ /**
1987
+ * Coalescing window (ms) for outgoing collaboration Ops (Phase 9) — same
1988
+ * trailing-throttle shape as `presenceThrottleMs`: the first Op after an
1989
+ * idle period sends immediately, and subsequent Ops for the *same*
1990
+ * object within this window replace each other (latest value wins,
1991
+ * matching the already-idempotent Op model) rather than each triggering
1992
+ * its own send. A multi-second drag that previously sent one full Op per
1993
+ * pointer-move now sends at most one per window per touched object.
1994
+ * Persistence (`pendingOps`) is unaffected — it already debounces via
1995
+ * `autosave`, so this option only changes live collaboration traffic.
1996
+ * Defaults to 50ms.
1997
+ */
1998
+ collaborationCoalesceMs?: number;
1999
+ /**
2000
+ * Caps how many resolved objects a single `content.copy`/`content.cut`
2001
+ * (or their Cmd/Ctrl+C/X keyboard equivalents) will hold in the
2002
+ * in-memory clipboard at once (Phase 9) — `expandSelection` recursively
2003
+ * expands groups, so an unbounded selection (a huge group, or thousands
2004
+ * of individually selected strokes) could otherwise clone and retain an
2005
+ * arbitrarily large snapshot indefinitely, until the next copy/cut
2006
+ * replaces it. Exceeding it rejects the whole copy/cut (nothing is
2007
+ * cloned, and — for cut — nothing is removed from the Document either,
2008
+ * never a partial copy of an arbitrary subset) and emits a
2009
+ * `{code:"clipboard-overflow", retryable:false}` error. Defaults to
2010
+ * 5000.
2011
+ */
2012
+ maxClipboardItems?: number;
908
2013
  }
909
2014
  interface BoardController {
2015
+ readonly notebooks: {
2016
+ /** Create a notebook containing one section and an empty page; select it. */
2017
+ add(name?: string): string;
2018
+ select(id: string): void;
2019
+ rename(id: string, name: string): void;
2020
+ list(): readonly BoardNotebook[];
2021
+ current(): string;
2022
+ };
2023
+ readonly sections: {
2024
+ /** Create a section in the current or specified notebook, with one empty page. */
2025
+ add(name?: string, notebookId?: string): string;
2026
+ select(id: string): void;
2027
+ rename(id: string, name: string): void;
2028
+ list(notebookId?: string): readonly BoardSection[];
2029
+ current(): string;
2030
+ };
2031
+ readonly pages: {
2032
+ /** Add an empty page and switch to it. */
2033
+ add(name?: string, sectionId?: string): string;
2034
+ select(id: string): void;
2035
+ rename(id: string, name: string): void;
2036
+ list(sectionId?: string): readonly BoardPage[];
2037
+ current(): string;
2038
+ };
910
2039
  readonly document: ReadonlyBoardDocument;
911
2040
  readonly tools: {
912
2041
  select(tool: BuiltInTool | (string & {})): void;
@@ -921,7 +2050,7 @@ interface BoardController {
921
2050
  noteColor: string;
922
2051
  tableRows: number;
923
2052
  tableCols: number;
924
- stampKind: StampKind;
2053
+ stampKind: StickerKind;
925
2054
  timerDurationMs: number;
926
2055
  }>): void;
927
2056
  current(): BoardStyle;
@@ -931,18 +2060,34 @@ interface BoardController {
931
2060
  redo(): void;
932
2061
  };
933
2062
  readonly boardTheme: {
934
- /** Live update of the board surface color/grid — the controller's identity stays fixed across theme changes. */
935
- set(theme: {
936
- surface?: string;
937
- gridMode?: "none" | "line" | "dot";
938
- gridColor?: string;
939
- gridSpacing?: number;
940
- }): void;
2063
+ /** Live update of the board surface color/grid/shape-stroke-width — the controller's identity stays fixed across theme changes. */
2064
+ set(theme: BoardThemeOptions): void;
941
2065
  };
942
2066
  readonly view: {
943
2067
  fit(): void;
2068
+ /**
2069
+ * Frame the current selection (Phase 8), the same way `fit()` frames the
2070
+ * whole board. A no-op with nothing selected — deliberately doesn't fall
2071
+ * back to `fit()`'s "frame everything," which would be a surprising
2072
+ * result for an empty selection. On a headless board this can only
2073
+ * re-center the view (no viewport to compute a real zoom-to-fit from),
2074
+ * matching `fit()`'s own headless limitation exactly.
2075
+ */
2076
+ zoomToSelection(): void;
944
2077
  zoomTo(value: number): void;
945
2078
  centerOn(point: BoardPoint): void;
2079
+ /**
2080
+ * Tell the canvas an inline text editor is open over a text block (`{ id }`)
2081
+ * or a table cell (`{ id, row, col }`), so it stops drawing that text until
2082
+ * the editor closes (`null`) and the two copies don't overlap. The default
2083
+ * UI's inline editors call this; a Host with its own editors should too.
2084
+ * Presentation only — never touches the Document. A no-op when headless.
2085
+ */
2086
+ setInlineEditing(target: {
2087
+ id: string;
2088
+ row?: number;
2089
+ col?: number;
2090
+ } | null): void;
946
2091
  get(): BoardView;
947
2092
  boardToScreen(point: BoardPoint): ScreenPoint;
948
2093
  screenToBoard(point: ScreenPoint): BoardPoint;
@@ -951,6 +2096,75 @@ interface BoardController {
951
2096
  add(input: BoardObjectInput): string;
952
2097
  update(id: string, patch: BoardObjectPatch): void;
953
2098
  remove(ids: readonly string[]): void;
2099
+ /**
2100
+ * Clone each given object as a new, unlocked copy offset by a small
2101
+ * fixed cascade (matching the Duplicate affordance's established Host
2102
+ * convention), as one undoable step. Order-preserving: `result[i]` is
2103
+ * the clone of `ids[i]`. Strokes that share a `clusterId` among the
2104
+ * given ids get a single fresh shared `clusterId` in the result, so
2105
+ * duplicating a whole multi-stroke shape (e.g. an arrow's shaft + head)
2106
+ * keeps it one shape — pass every member's id together, not just one.
2107
+ * Unknown ids are silently skipped, matching `remove`'s convention.
2108
+ */
2109
+ duplicate(ids: readonly string[]): readonly string[];
2110
+ /**
2111
+ * Creates a new Group referencing `ids` as its children and returns its
2112
+ * id, as one undoable step. Unknown ids are silently skipped, matching
2113
+ * `duplicate`/`remove`'s convention. A child id that's itself a group
2114
+ * makes a nested group — expanding nested groups into their leaf
2115
+ * members is always the caller's job, never assumed here (matches the
2116
+ * document-model `GroupObject` itself).
2117
+ */
2118
+ group(ids: readonly string[]): string;
2119
+ /**
2120
+ * Dissolves one group, returning its immediate children's ids (a nested
2121
+ * subgroup among them stays intact, itself still a group) — the group
2122
+ * record itself is removed, the children are untouched. A no-op
2123
+ * (returns `[]`) if `groupId` isn't a group.
2124
+ */
2125
+ ungroup(groupId: string): readonly string[];
2126
+ /**
2127
+ * Aligns every given object's matching edge/center to the corresponding
2128
+ * edge/center of their combined bounding box, as one undoable step.
2129
+ * `"top"`/`"bottom"` follow board space's Y-up convention (`"top"` is
2130
+ * the larger Y). Ids that don't resolve, or resolve to a Group (which
2131
+ * has no position of its own), are skipped. A no-op under 2 resolvable
2132
+ * ids — there's nothing to align relative to.
2133
+ */
2134
+ align(ids: readonly string[], edge: "left" | "right" | "top" | "bottom" | "centerX" | "centerY"): void;
2135
+ /**
2136
+ * Spaces the middle objects' centers evenly between the first and last
2137
+ * (sorted along `axis`), as one undoable step — the two endpoints don't
2138
+ * move. Ids that don't resolve, or resolve to a Group, are skipped. A
2139
+ * no-op under 3 resolvable ids — there's no "middle" to distribute.
2140
+ */
2141
+ distribute(ids: readonly string[], axis: "x" | "y"): void;
2142
+ /**
2143
+ * Snapshots `ids` (recursively expanded through any group, same as
2144
+ * `duplicate`) into an internal in-memory clipboard — never
2145
+ * `navigator.clipboard`, scoped to this one controller instance and
2146
+ * replaced wholesale by the next `copy`/`cut`. Read-only; works even
2147
+ * on a read-only board.
2148
+ */
2149
+ copy(ids: readonly string[]): void;
2150
+ /** `copy`, then removes every resolved object (recursively through any group) as one undoable step. */
2151
+ cut(ids: readonly string[]): void;
2152
+ /**
2153
+ * Clones the current clipboard contents onto the board as one undoable
2154
+ * step, offset the same small cascade `duplicate` uses (no cursor
2155
+ * position to paste relative to yet). Returns the new top-level ids —
2156
+ * a pasted group's own id stands for its (also-pasted) children, which
2157
+ * aren't listed separately. `[]` when the clipboard is empty.
2158
+ */
2159
+ paste(): readonly string[];
2160
+ /**
2161
+ * Select every top-level object (Phase 8) — a group's own id stands for
2162
+ * its children, which aren't selected separately, matching `paste`'s own
2163
+ * "what the user sees" id list. Hidden objects are excluded, consistent
2164
+ * with them already being excluded from marquee selection. Works with
2165
+ * no canvas/engine, same as {@link toggleSelectionVisibility}.
2166
+ */
2167
+ selectAll(): void;
954
2168
  table: {
955
2169
  addRow(tableId: string): void;
956
2170
  addCol(tableId: string): void;
@@ -961,15 +2175,42 @@ interface BoardController {
961
2175
  };
962
2176
  select(ids: readonly string[]): void;
963
2177
  import(document: SerializedBoardDocument): readonly string[];
2178
+ /**
2179
+ * Toggle lock state for the current selection (or focused note/text/
2180
+ * table/image/timer), matching whatever a single Host lock/unlock
2181
+ * control already does per object type. A no-op with nothing selected,
2182
+ * on a headless board, or when every actionable target is locked by
2183
+ * another collaborator who isn't the current lock holder.
2184
+ */
2185
+ toggleSelectionLock(): void;
2186
+ /**
2187
+ * Toggle hidden state for the current selection, as one undo entry
2188
+ * (Phase 8). If any selected object is hidden, shows every selected
2189
+ * object; otherwise hides them all — same "any wins" semantics as
2190
+ * {@link toggleSelectionLock}. Hidden objects stay fully present in the
2191
+ * document (they still serialize, persist, sync, undo/redo) — they just
2192
+ * stop rendering and stop being hit-testable/selectable via pointer
2193
+ * interaction. Unlike `toggleSelectionLock`, this works on a headless
2194
+ * board too: it only touches `selection`/the document, no canvas or
2195
+ * engine involved. Custom objects have no visibility concept (no
2196
+ * `Hideable` field) and are silently skipped, matching how
2197
+ * `toggleSelectionLock` already excludes them. A no-op with nothing
2198
+ * selected or when the selection is only custom objects.
2199
+ */
2200
+ toggleSelectionVisibility(): void;
964
2201
  };
965
2202
  readonly query: {
966
2203
  get(id: string): DeepReadonly<BoardObject> | undefined;
967
2204
  all(): readonly DeepReadonly<BoardObject>[];
968
2205
  search(query: string): readonly SearchHit[];
2206
+ /** An object's axis-aligned board-space bounds (y up), or undefined for an unknown id. */
2207
+ bounds(id: string): BoardBounds | undefined;
969
2208
  };
970
2209
  /** Host-owned comments, synced in for search and marker rendering only — see CommentMarker. */
971
2210
  readonly comments: {
972
2211
  sync(comments: readonly CommentMarker[]): void;
2212
+ /** The markers last passed to `sync`, in the order given. */
2213
+ list(): readonly CommentMarker[];
973
2214
  open(id: string): void;
974
2215
  setActive(id: string | null): void;
975
2216
  };
@@ -989,6 +2230,15 @@ interface BoardController {
989
2230
  follow(view: PresenceView): void;
990
2231
  /** Ease the camera to a peer's view; returns false (no-op) while mid-stroke. */
991
2232
  gather(view: PresenceView): boolean;
2233
+ /**
2234
+ * Publishes this client's own cursor/tool/view for other collaborators
2235
+ * (Phase 6, ADR 0015), via the configured `CollaborationAdapter` —
2236
+ * throttled internally (`presenceThrottleMs` option, default 50ms) so
2237
+ * a raw pointermove stream never becomes a message-per-event flood. A
2238
+ * no-op if no collaboration adapter is configured, or if the
2239
+ * configured one doesn't implement `updatePresence`.
2240
+ */
2241
+ broadcast(local: LocalPresence): void;
992
2242
  };
993
2243
  readonly export: {
994
2244
  svg(): string;
@@ -1014,7 +2264,19 @@ interface BoardController {
1014
2264
  }>;
1015
2265
  dispose(): Promise<void>;
1016
2266
  }
2267
+ /**
2268
+ * Creates a {@link BoardController} — the SDK's canonical, capability-grouped
2269
+ * entry point (`content`, `tools`, `style`, `history`, `view`, `query`,
2270
+ * `comments`, `presence`, `export`, `assets`, plus top-level `getSnapshot`/
2271
+ * `subscribe`/`on`/`setReadOnly`/`flush`/`dispose`) for driving a Board
2272
+ * imperatively from any JS/TS runtime. Supply a `canvas` to render, or omit
2273
+ * it to run headless (SSR, tests, or a document/history-only integration).
2274
+ * Persistence and Collaboration are opt-in via `options.adapters` — without
2275
+ * them the controller runs entirely in memory. Call `dispose()` when done to
2276
+ * release the renderer, adapters, and any pending timers.
2277
+ */
1017
2278
  declare function createBoardController(options: CreateBoardControllerOptions): BoardController;
2279
+ /** @deprecated Use `BoardController.getSnapshot()`'s return type instead. */
1018
2280
  type LocalBoardSnapshot = {
1019
2281
  documentId: string;
1020
2282
  selectedStrokeId: string | null;
@@ -1023,10 +2285,12 @@ type LocalBoardSnapshot = {
1023
2285
  canRedo: boolean;
1024
2286
  disposed: boolean;
1025
2287
  };
2288
+ /** @deprecated Use `CreateBoardControllerOptions` with `createBoardController` instead. */
1026
2289
  type LocalBoardOptions = {
1027
2290
  documentId: string;
1028
2291
  initialDocument?: SerializedBoardDocument;
1029
2292
  };
2293
+ /** @deprecated Use `BoardController` (from `createBoardController`) instead — this stroke-only, single-tool surface predates the full capability-grouped controller. */
1030
2294
  type LocalBoard = {
1031
2295
  drawStroke(stroke: Stroke): void;
1032
2296
  selectAt(point: BoardPoint): string | null;
@@ -1037,7 +2301,20 @@ type LocalBoard = {
1037
2301
  subscribe(listener: () => void): () => void;
1038
2302
  dispose(): Promise<void>;
1039
2303
  };
2304
+ /** @deprecated Use `createBoardController` instead — this is a thin, stroke-only wrapper kept for the original Phase 1 tracer's compatibility. */
1040
2305
  declare function createLocalBoard(options: LocalBoardOptions): LocalBoard;
1041
2306
 
1042
- export { AssetResolutionError, STAMPS, SUPPORTED_ASSET_MEDIA_TYPES, assetRef, clampAssetCacheBytes, cloneCustomObject, createBoardController, createLocalBoard, isAssetRef, isStampKind, stampDataUrl };
1043
- export type { ApplyOpsResult, AssetDiagnostic, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPointerInput, BoardScene, BoardSnapshot, BoardStyle, BoardView, BuiltInTool, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaboratorIdentity, CommentMarker, ControllerOp, CreateBoardControllerOptions, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DocumentContext, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, InputModifiers, JsonObject, JsonValue, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, Mat2x3, ObjectDescribeContext, ObjectIntent, ObjectType, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PresenceCursor, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlExtension, ScreenPoint, ScreenRect, StampKind, SupportedAssetMediaType, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId };
2307
+ interface CreateMemoryPersistenceOptions {
2308
+ /** Pre-seeded documents, keyed by document id — as if a prior session had already saved them. Seeded documents start at revision "1". */
2309
+ seed?: Record<string, CurrentSerializedDocument>;
2310
+ }
2311
+ /**
2312
+ * Creates a real, in-memory `PersistenceAdapter`. One instance can back
2313
+ * multiple documents (keyed by `DocumentContext.documentId`, like every
2314
+ * other adapter in this package). State lives only in this instance —
2315
+ * discarded on garbage collection, never written to disk.
2316
+ */
2317
+ declare function createMemoryPersistence(options?: CreateMemoryPersistenceOptions): PersistenceAdapter;
2318
+
2319
+ export { AssetResolutionError, EMOJI_LIBRARY, ICON_LIBRARY, STAMPS, SUPPORTED_ASSET_MEDIA_TYPES, assetRef, clampAssetCacheBytes, cloneCustomObject, createBoardController, createLocalBoard, createMemoryPersistence, emojiDataUrl, iconCategories, iconDataUrl, isAssetRef, isEmojiName, isIconName, isStampKind, isStickerKind, stampDataUrl, stickerLabel };
2320
+ export type { ApplyOpsResult, AssetDiagnostic, AssetExportFailure, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BoardBounds, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardNotebook, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPage, BoardPoint, BoardPointerInput, BoardScene, BoardSection, BoardSnapshot, BoardStyle, BoardThemeOptions, BoardView, BuiltInTool, CollaborationAckDiagnostic, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaborationSyncResult, CollaboratorIdentity, CommentMarker, ControllerOp, CreateBoardControllerOptions, CreateMemoryPersistenceOptions, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DocumentContext, EmojiDefinition, EmojiName, ExportDocumentSVGOptions, ExportDocumentSVGResult, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, FocusedItem, IconDefinition, IconName, InlineEditingTarget, InputModifiers, JsonObject, JsonValue, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, LocalPresence, Mat2x3, ObjectDescribeContext, ObjectIntent, ObjectType, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PresenceCursor, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, ReplaceResult, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlExtension, ScreenPoint, ScreenRect, SearchHit, SearchHitKind, SearchableComment, StampKind, StickerKind, SupportedAssetMediaType, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId };