@scrawl-board/board 0.1.0-beta.6 → 0.1.0-beta.7

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/index.d.ts CHANGED
@@ -415,6 +415,144 @@ declare function toggleTimer(timer: KitchenTimer, now: number): KitchenTimer;
415
415
  declare function setTimerDuration(timer: KitchenTimer, durationMs: number): KitchenTimer;
416
416
  declare function formatTimer(ms: number): string;
417
417
 
418
+ declare const SHAPE_MIN_SIZE = 0.5;
419
+ declare const SHAPE_DEFAULT_STROKE = "#1C1C1E";
420
+ declare const SHAPE_DEFAULT_STROKE_WIDTH = 0.12;
421
+ interface RectangleObject extends Lockable {
422
+ id: string;
423
+ x: number;
424
+ y: number;
425
+ width: number;
426
+ height: number;
427
+ fill?: string;
428
+ stroke?: string;
429
+ strokeWidth?: number;
430
+ /** Corner radius in board units; clamped to at most half the shorter side at render time. */
431
+ cornerRadius?: number;
432
+ /** `[0, 1]`; undefined means fully opaque (Phase 4). */
433
+ opacity?: number;
434
+ /**
435
+ * Radians, about the shape's own center `(x + width/2, y - height/2)`.
436
+ * Undefined means 0 (Phase 3). `x`/`y`/`width`/`height` stay in the
437
+ * shape's own unrotated local frame — rotation is a separate, applied-last
438
+ * transform, not baked into them, matching how Stroke/CustomBoardObject
439
+ * keep geometry and placement independent via their own `matrix`.
440
+ */
441
+ rotation?: number;
442
+ }
443
+ interface EllipseObject extends Lockable {
444
+ id: string;
445
+ x: number;
446
+ y: number;
447
+ width: number;
448
+ height: number;
449
+ fill?: string;
450
+ stroke?: string;
451
+ strokeWidth?: number;
452
+ /** `[0, 1]`; undefined means fully opaque (Phase 4). */
453
+ opacity?: number;
454
+ /** Radians, about the shape's own center — see RectangleObject's `rotation` doc. */
455
+ rotation?: number;
456
+ }
457
+ declare function cloneRectangle(rect: RectangleObject): RectangleObject;
458
+ declare function cloneEllipse(ellipse: EllipseObject): EllipseObject;
459
+ /** `"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. */
460
+ type ArrowHeadStyle = "triangle" | "none";
461
+ interface LineObject extends Lockable {
462
+ id: string;
463
+ start: BoardPoint;
464
+ end: BoardPoint;
465
+ stroke?: string;
466
+ strokeWidth?: number;
467
+ opacity?: number;
468
+ }
469
+ interface ArrowObject extends Lockable {
470
+ id: string;
471
+ start: BoardPoint;
472
+ end: BoardPoint;
473
+ head?: ArrowHeadStyle;
474
+ stroke?: string;
475
+ strokeWidth?: number;
476
+ opacity?: number;
477
+ }
478
+ /**
479
+ * Triangle(3)/Diamond(4)/Pentagon(5)/Hexagon(6)/Octagon(8) as one shared
480
+ * type instead of five near-duplicate interfaces — a regular N-gon
481
+ * inscribed in the same `x`/`y`/`width`/`height`/`rotation` bounding box
482
+ * Rectangle already uses, parameterized by `sides`. Diamond is exactly a
483
+ * 4-sided regular polygon with vertex 0 pointing right (not up, like
484
+ * Triangle/Pentagon/Hexagon) — see `polygonGeometry.ts`'s
485
+ * `polygonStartAngle`, which encodes each side count's own vertex
486
+ * orientation so the outline always matches the legacy drag-preview shape.
487
+ */
488
+ interface PolygonObject extends Lockable {
489
+ id: string;
490
+ x: number;
491
+ y: number;
492
+ width: number;
493
+ height: number;
494
+ sides: 3 | 4 | 5 | 6 | 8;
495
+ fill?: string;
496
+ stroke?: string;
497
+ strokeWidth?: number;
498
+ opacity?: number;
499
+ /** Radians, about the shape's own center — see RectangleObject's `rotation` doc. */
500
+ rotation?: number;
501
+ }
502
+ declare function clonePolygon(polygon: PolygonObject): PolygonObject;
503
+ /** 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`). */
504
+ interface StarObject extends Lockable {
505
+ id: string;
506
+ x: number;
507
+ y: number;
508
+ width: number;
509
+ height: number;
510
+ /** Vertex count; today's only shipped preset is 5, matching the legacy tool. */
511
+ points: number;
512
+ /** `(0, 1)` — inner vertex radius as a fraction of the outer radius. */
513
+ innerRadiusRatio: number;
514
+ fill?: string;
515
+ stroke?: string;
516
+ strokeWidth?: number;
517
+ opacity?: number;
518
+ rotation?: number;
519
+ }
520
+ declare function cloneStar(star: StarObject): StarObject;
521
+ /** 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. */
522
+ interface HeartObject extends Lockable {
523
+ id: string;
524
+ x: number;
525
+ y: number;
526
+ width: number;
527
+ height: number;
528
+ fill?: string;
529
+ stroke?: string;
530
+ strokeWidth?: number;
531
+ opacity?: number;
532
+ rotation?: number;
533
+ }
534
+ declare function cloneHeart(heart: HeartObject): HeartObject;
535
+ declare function cloneLine(line: LineObject): LineObject;
536
+ declare function cloneArrow(arrow: ArrowObject): ArrowObject;
537
+ /**
538
+ * A logical grouping of other board objects (Phase 3 — Selection,
539
+ * Transformation & Grouping). Deliberately has no `x`/`y`/`transform` of its
540
+ * own — a group's bounds are always derived on demand from its (recursively
541
+ * resolved) children, and "moving/rotating/scaling the group" is exactly a
542
+ * multi-object transform applied to those children, nothing more. A group
543
+ * has no renderer/mesh of its own; its only visual presence is the
544
+ * selection gizmo's bounding box while it's the current selection.
545
+ *
546
+ * `children` may itself contain other group ids (nested groups) — expanding
547
+ * a group into its leaf members is always done by the caller (recursively,
548
+ * with cycle protection), never assumed here.
549
+ */
550
+ interface GroupObject extends Lockable {
551
+ id: string;
552
+ children: string[];
553
+ }
554
+ declare function cloneGroup(group: GroupObject): GroupObject;
555
+
418
556
  interface BoardPoint {
419
557
  x: number;
420
558
  y: number;
@@ -480,6 +618,31 @@ interface SerializedDocument {
480
618
  timers?: KitchenTimer[];
481
619
  /** Absent in documents saved before Custom board objects existed (ticket #22). */
482
620
  customObjects?: CustomBoardObject[];
621
+ /** Absent in documents saved before semantic Rectangle objects existed (Phase 2). */
622
+ rectangles?: RectangleObject[];
623
+ /** Absent in documents saved before semantic Ellipse objects existed (Phase 2). */
624
+ ellipses?: EllipseObject[];
625
+ /** Absent in documents saved before Groups existed (Phase 3). */
626
+ groups?: GroupObject[];
627
+ /** Absent in documents saved before semantic Line objects existed (Phase 4). */
628
+ lines?: LineObject[];
629
+ /** Absent in documents saved before semantic Arrow objects existed (Phase 4). */
630
+ arrows?: ArrowObject[];
631
+ /** Absent in documents saved before semantic Polygon objects existed (Phase 4). */
632
+ polygons?: PolygonObject[];
633
+ /** Absent in documents saved before semantic Star objects existed (Phase 4). */
634
+ stars?: StarObject[];
635
+ /** Absent in documents saved before semantic Heart objects existed (Phase 4). */
636
+ hearts?: HeartObject[];
637
+ /**
638
+ * Every content-object id (every type above except comments, which are
639
+ * host-synced and never enter this schema) in paint order, back to front.
640
+ * Absent in documents saved before per-object z-order existed (Phase 3) —
641
+ * migration synthesizes a default order preserving the old fixed-Z-band
642
+ * visual stacking exactly, so an existing document never visibly changes
643
+ * on load; only an explicit reorder action touches this from then on.
644
+ */
645
+ objectOrder?: string[];
483
646
  }
484
647
  declare const INK_COLORS: {
485
648
  readonly black: "#1C1C1E";
@@ -731,6 +894,60 @@ interface DocumentChange {
731
894
  /** Ids of removed custom objects. */
732
895
  customObjectsRemoved: string[];
733
896
  customObjectsUpdated: CustomBoardObject[];
897
+ /** Semantic Rectangle objects (Phase 2). */
898
+ rectanglesAdded: RectangleObject[];
899
+ /** Ids of removed rectangles. */
900
+ rectanglesRemoved: string[];
901
+ rectanglesUpdated: RectangleObject[];
902
+ /** Semantic Ellipse objects (Phase 2). */
903
+ ellipsesAdded: EllipseObject[];
904
+ /** Ids of removed ellipses. */
905
+ ellipsesRemoved: string[];
906
+ ellipsesUpdated: EllipseObject[];
907
+ /** Groups (Phase 3). */
908
+ groupsAdded: GroupObject[];
909
+ /** Ids of removed groups (ungrouping, or deleting a group). */
910
+ groupsRemoved: string[];
911
+ groupsUpdated: GroupObject[];
912
+ /** Semantic Line objects (Phase 4). */
913
+ linesAdded: LineObject[];
914
+ /** Ids of removed lines. */
915
+ linesRemoved: string[];
916
+ linesUpdated: LineObject[];
917
+ /** Semantic Arrow objects (Phase 4). */
918
+ arrowsAdded: ArrowObject[];
919
+ /** Ids of removed arrows. */
920
+ arrowsRemoved: string[];
921
+ arrowsUpdated: ArrowObject[];
922
+ /** Semantic Polygon objects (Phase 4) — Triangle/Diamond/Pentagon/Hexagon/Octagon. */
923
+ polygonsAdded: PolygonObject[];
924
+ /** Ids of removed polygons. */
925
+ polygonsRemoved: string[];
926
+ polygonsUpdated: PolygonObject[];
927
+ /** Semantic Star objects (Phase 4). */
928
+ starsAdded: StarObject[];
929
+ /** Ids of removed stars. */
930
+ starsRemoved: string[];
931
+ starsUpdated: StarObject[];
932
+ /** Semantic Heart objects (Phase 4). */
933
+ heartsAdded: HeartObject[];
934
+ /** Ids of removed hearts. */
935
+ heartsRemoved: string[];
936
+ heartsUpdated: HeartObject[];
937
+ /**
938
+ * The full current paint order (back to front) of every flat content
939
+ * object — strokes, texts, tables, images, rectangles, ellipses, lines,
940
+ * arrows, custom objects, and groups. Populated whenever `objectOrder`
941
+ * actually changed:
942
+ * an explicit reorder (`bringForward` etc.), or any add/remove that
943
+ * touches it — a removal shifts every id after it down one rank, not
944
+ * just the removed one, so renderers need this to resync everyone, not
945
+ * only the ids the same change's own `*Added`/`*Removed`/`*Updated`
946
+ * fields name. Notes (their own `zOffset` peel depth) and Kitchen Timers
947
+ * (genuine 3D objects, not a flat layer) are intentionally not part of
948
+ * this order at all.
949
+ */
950
+ orderChanged: readonly string[];
734
951
  }
735
952
  type Listener = (change: DocumentChange) => void;
736
953
  declare class BoardDocument {
@@ -745,12 +962,63 @@ declare class BoardDocument {
745
962
  private readonly timers;
746
963
  /** All Custom board object types share one map, keyed by id — the envelope is already uniform. */
747
964
  private readonly customObjects;
965
+ private readonly rectangles;
966
+ private readonly ellipses;
967
+ private readonly groups;
968
+ private readonly lines;
969
+ private readonly arrows;
970
+ private readonly polygons;
971
+ private readonly stars;
972
+ private readonly hearts;
748
973
  private readonly bboxes;
749
974
  private readonly listeners;
975
+ /** Paint order (back to front) of every flat content object — see `DocumentChange.orderChanged`'s doc comment. */
976
+ private objectOrder;
977
+ private orderIndex;
750
978
  constructor(id: DocumentId);
979
+ private reindexOrder;
980
+ /** The full current paint order, back to front. */
981
+ order(): readonly string[];
982
+ /** This object's rank in the paint order, or -1 if it doesn't participate (unknown id, a note, or a timer). */
983
+ orderRank(id: string): number;
984
+ private bringForward;
985
+ private sendBackward;
986
+ private bringToFront;
987
+ private sendToBack;
988
+ /** Reorders `id` relative to its current neighbors. A no-op for an id that doesn't participate in paint order (see `orderRank`). */
989
+ reorder(id: string, direction: "forward" | "backward" | "front" | "back"): void;
990
+ /**
991
+ * Overwrites the paint order directly — used only when loading a document
992
+ * that already carries a persisted `objectOrder`; every other order
993
+ * mutation goes through `reorder`/the automatic append-on-add tracking in
994
+ * `emit`. Ids not present in the document are dropped; ids present in the
995
+ * document but missing from `order` are appended at the back, so a
996
+ * partially-stale order (e.g. from a schema migration) never silently
997
+ * drops an object from paint order entirely.
998
+ */
999
+ private setOrder;
751
1000
  get(id: string): Stroke | undefined;
752
1001
  all(): IterableIterator<Stroke>;
753
- bbox(id: string): BBox | undefined;
1002
+ /**
1003
+ * World-space bounds for any content object, of any type. Strokes hit
1004
+ * their cached-on-mutation fast path (`bboxes`, populated by
1005
+ * `addStrokes`/`transformStrokes` — many points, worth caching); every
1006
+ * other type computes on demand via `objectBounds.ts` (cheap arithmetic,
1007
+ * no caching needed). A group's bounds are the union of its (recursively
1008
+ * resolved) children — `seen` guards against a cycle in nested groups.
1009
+ */
1010
+ bbox(id: string, seen?: Set<string>): BBox | undefined;
1011
+ /**
1012
+ * True if `id` exists and is locked, for any type — the same per-type
1013
+ * probe pattern as `bbox`, for interactive gestures (drag/transform) that
1014
+ * need to gate on lock state regardless of what's selected. Custom
1015
+ * objects are deliberately excluded: their `lock` field is a different
1016
+ * shape (`{holderId, acquiredAt}`, no display name) with no interactive
1017
+ * lock UI yet, matching the existing, deliberate "always unlockable,
1018
+ * never gates a drag" treatment already established elsewhere (e.g.
1019
+ * `getSelectedItemInfo`'s custom branch hardcodes `isLocked: false`).
1020
+ */
1021
+ isLocked(id: string): boolean;
754
1022
  subscribe(listener: Listener): () => void;
755
1023
  addStrokes(strokes: Stroke[]): void;
756
1024
  removeStrokes(ids: string[]): void;
@@ -793,6 +1061,54 @@ declare class BoardDocument {
793
1061
  removeCustomObjects(ids: string[]): void;
794
1062
  /** Replace a custom object's contents under the same id. */
795
1063
  setCustomObject(object: CustomBoardObject): void;
1064
+ getRectangle(id: string): RectangleObject | undefined;
1065
+ allRectangles(): IterableIterator<RectangleObject>;
1066
+ addRectangles(rectangles: RectangleObject[]): void;
1067
+ removeRectangles(ids: string[]): void;
1068
+ /** Replace a rectangle's contents (move, resize, restyle) under the same id. */
1069
+ setRectangle(rect: RectangleObject): void;
1070
+ getEllipse(id: string): EllipseObject | undefined;
1071
+ allEllipses(): IterableIterator<EllipseObject>;
1072
+ addEllipses(ellipses: EllipseObject[]): void;
1073
+ removeEllipses(ids: string[]): void;
1074
+ /** Replace an ellipse's contents (move, resize, restyle) under the same id. */
1075
+ setEllipse(ellipse: EllipseObject): void;
1076
+ getGroup(id: string): GroupObject | undefined;
1077
+ allGroups(): IterableIterator<GroupObject>;
1078
+ addGroups(groups: GroupObject[]): void;
1079
+ removeGroups(ids: string[]): void;
1080
+ /** Replace a group's contents (its children list) under the same id. */
1081
+ setGroup(group: GroupObject): void;
1082
+ getLine(id: string): LineObject | undefined;
1083
+ allLines(): IterableIterator<LineObject>;
1084
+ addLines(lines: LineObject[]): void;
1085
+ removeLines(ids: string[]): void;
1086
+ /** Replace a line's contents (move, restyle) under the same id. */
1087
+ setLine(line: LineObject): void;
1088
+ getArrow(id: string): ArrowObject | undefined;
1089
+ allArrows(): IterableIterator<ArrowObject>;
1090
+ addArrows(arrows: ArrowObject[]): void;
1091
+ removeArrows(ids: string[]): void;
1092
+ /** Replace an arrow's contents (move, restyle, change head) under the same id. */
1093
+ setArrow(arrow: ArrowObject): void;
1094
+ getPolygon(id: string): PolygonObject | undefined;
1095
+ allPolygons(): IterableIterator<PolygonObject>;
1096
+ addPolygons(polygons: PolygonObject[]): void;
1097
+ removePolygons(ids: string[]): void;
1098
+ /** Replace a polygon's contents (move, resize, rotate, restyle) under the same id. */
1099
+ setPolygon(polygon: PolygonObject): void;
1100
+ getStar(id: string): StarObject | undefined;
1101
+ allStars(): IterableIterator<StarObject>;
1102
+ addStars(stars: StarObject[]): void;
1103
+ removeStars(ids: string[]): void;
1104
+ /** Replace a star's contents (move, resize, rotate, restyle) under the same id. */
1105
+ setStar(star: StarObject): void;
1106
+ getHeart(id: string): HeartObject | undefined;
1107
+ allHearts(): IterableIterator<HeartObject>;
1108
+ addHearts(hearts: HeartObject[]): void;
1109
+ removeHearts(ids: string[]): void;
1110
+ /** Replace a heart's contents (move, resize, rotate, restyle) under the same id. */
1111
+ setHeart(heart: HeartObject): void;
796
1112
  setStrokeLocked(id: string, locked: boolean, by?: LockHolder | null): void;
797
1113
  setStrokesLocked(ids: string[], locked: boolean, by?: LockHolder | null): void;
798
1114
  setNoteLocked(id: string, locked: boolean, by?: LockHolder | null): void;
@@ -800,18 +1116,58 @@ declare class BoardDocument {
800
1116
  setTableLocked(id: string, locked: boolean, by?: LockHolder | null): void;
801
1117
  setImageLocked(id: string, locked: boolean, by?: LockHolder | null): void;
802
1118
  setTimerLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1119
+ setRectangleLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1120
+ setEllipseLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1121
+ setGroupLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1122
+ setLineLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1123
+ setArrowLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1124
+ setPolygonLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1125
+ setStarLocked(id: string, locked: boolean, by?: LockHolder | null): void;
1126
+ setHeartLocked(id: string, locked: boolean, by?: LockHolder | null): void;
803
1127
  /** Replace all content (initial load). Does not touch `version`. */
804
- replaceAll(strokes: Stroke[], notes: StickyNote[], texts: TextBlock[], tables?: TableBlock[], images?: ImageBlock[], timers?: KitchenTimer[], customObjects?: CustomBoardObject[]): void;
1128
+ replaceAll(strokes: Stroke[], notes: StickyNote[], texts: TextBlock[], tables?: TableBlock[], images?: ImageBlock[], timers?: KitchenTimer[], customObjects?: CustomBoardObject[], rectangles?: RectangleObject[], ellipses?: EllipseObject[], groups?: GroupObject[], lines?: LineObject[], arrows?: ArrowObject[], polygons?: PolygonObject[], stars?: StarObject[], hearts?: HeartObject[],
1129
+ /** Persisted paint order; absent for a document saved before Phase 3, in which case one is synthesized (see `ORDERED_ADDED_FIELDS`'s doc comment). */
1130
+ objectOrder?: readonly string[]): void;
805
1131
  /** Apply incremental real-time change received from a remote collaborator over WebSocket. */
806
1132
  applyRemoteChange(change: Partial<DocumentChange>): void;
807
1133
  toJSON(): SerializedDocument;
1134
+ static deserializeGroups(data: SerializedDocument): GroupObject[];
1135
+ static deserializeLines(data: SerializedDocument): LineObject[];
1136
+ static deserializeArrows(data: SerializedDocument): ArrowObject[];
1137
+ static deserializePolygons(data: SerializedDocument): PolygonObject[];
1138
+ static deserializeStars(data: SerializedDocument): StarObject[];
1139
+ static deserializeHearts(data: SerializedDocument): HeartObject[];
808
1140
  static deserializeCustomObjects(data: SerializedDocument): CustomBoardObject[];
1141
+ static deserializeRectangles(data: SerializedDocument): RectangleObject[];
1142
+ static deserializeEllipses(data: SerializedDocument): EllipseObject[];
809
1143
  static deserializeImages(data: SerializedDocument): ImageBlock[];
810
1144
  static deserializeTimers(data: SerializedDocument): KitchenTimer[];
811
1145
  static deserializeNotes(data: SerializedDocument): StickyNote[];
812
1146
  static deserializeTexts(data: SerializedDocument): TextBlock[];
813
1147
  static deserializeTables(data: SerializedDocument): TableBlock[];
814
1148
  static deserializeStrokes(data: SerializedDocument): Stroke[];
1149
+ /**
1150
+ * Every mutation funnels through here, so paint-order tracking lives in
1151
+ * exactly one place rather than at every individual add/remove call site
1152
+ * (18 of them, times `replaceAll`/`applyRemoteChange`) — new ids are
1153
+ * appended to the back (front-most) of `objectOrder`, removed ids are
1154
+ * spliced out. An explicit reorder (`reorder`/`setOrder`) updates
1155
+ * `objectOrder` itself before calling this, so this step is a no-op for
1156
+ * ids already tracked (idempotent by construction: `orderIndex.has` gates
1157
+ * every append).
1158
+ *
1159
+ * `orderChanged` is populated here whenever `objectOrder` actually
1160
+ * changed — not just for an explicit reorder, but for any add/remove too.
1161
+ * A pure append never shifts an existing id's rank (new ids land at the
1162
+ * tail), but a removal splices a middle id out, which *does* shift every
1163
+ * id after it down by one — a renderer that only resynced Z on an
1164
+ * explicit reorder would silently render those with a stale rank until
1165
+ * something else happened to touch them, eventually colliding with a
1166
+ * freshly-added object's freshly-computed Z. Firing this on every
1167
+ * order-touching change (not just removes) is simpler than special-
1168
+ * casing which kind of change actually needs it, at the cost of a
1169
+ * redundant same-value resync on a pure append.
1170
+ */
815
1171
  private emit;
816
1172
  }
817
1173
 
@@ -847,6 +1203,21 @@ interface Command {
847
1203
  apply(doc: BoardDocument): void;
848
1204
  revert(doc: BoardDocument): void;
849
1205
  }
1206
+ /**
1207
+ * Several commands applied/reverted together as one undo step (Phase 3
1208
+ * consolidation — this exact class used to be hand-duplicated as a private
1209
+ * `CommandBatch` in `controller-internal.ts` and an exported
1210
+ * `ExtensionCommandBatch` in `interaction/tools/customTool.ts`; both now
1211
+ * import this one instead). Revert runs in reverse order, so a batch that
1212
+ * depends on ordering (e.g. add-then-reference) undoes cleanly.
1213
+ */
1214
+ declare class CommandBatch implements Command {
1215
+ readonly label: string;
1216
+ private readonly commands;
1217
+ constructor(label: string, commands: readonly Command[]);
1218
+ apply(doc: BoardDocument): void;
1219
+ revert(doc: BoardDocument): void;
1220
+ }
850
1221
  /** How a command reached the document — undo/redo are audited distinctly. */
851
1222
  type CommandKind = "do" | "undo" | "redo";
852
1223
  declare class History {
@@ -911,6 +1282,40 @@ declare class TransformCommand implements Command {
911
1282
  revert(doc: BoardDocument): void;
912
1283
  private compose;
913
1284
  }
1285
+ /**
1286
+ * One move gesture over a mixed-type selection (Phase 3) — the general
1287
+ * successor to `TransformCommand` for translation. `TransformCommand`
1288
+ * itself stays as-is (still used for scale/rotate, which remain stroke-only
1289
+ * this phase — see `interaction/tools/selectTool.ts`'s `TransformState`):
1290
+ * its own per-id `doc.get(id)` check already no-ops safely for any id that
1291
+ * isn't a stroke, so it doesn't need touching for that narrower case.
1292
+ *
1293
+ * `delta` here is always a pure translation (never scale/rotate), so
1294
+ * `apply(delta, point)` is a safe, uniform way to move every position-only
1295
+ * type's `x`/`y` — translating commutes trivially regardless of a shape's
1296
+ * own rotation. Matrix-carrying types (stroke, Custom) instead compose
1297
+ * `delta` onto their existing matrix/transform, matching `TransformCommand`.
1298
+ *
1299
+ * A group id in `ids` is expanded into its (recursively resolved, cycle-
1300
+ * safe) children every time `compose` runs — deterministic, since group
1301
+ * membership never changes mid-command — so moving a selected group means
1302
+ * moving every one of its members by the same delta. This expansion is
1303
+ * `TransformObjectsCommand`'s own responsibility precisely so a caller that
1304
+ * doesn't itself expand groups (e.g. `ScrawlEngine.nudgeSelection`) still
1305
+ * gets correct behavior; `interaction/tools/selectTool.ts`'s `TransformState`
1306
+ * separately expands for its own reason (live per-child drag preview), which
1307
+ * makes this a no-op re-expansion for that caller, not a conflict.
1308
+ */
1309
+ declare class TransformObjectsCommand implements Command {
1310
+ private readonly ids;
1311
+ private readonly delta;
1312
+ readonly label = "move selection";
1313
+ private readonly inverse;
1314
+ constructor(ids: readonly string[], delta: Mat2x3);
1315
+ apply(doc: BoardDocument): void;
1316
+ revert(doc: BoardDocument): void;
1317
+ private compose;
1318
+ }
914
1319
  declare class AddNoteCommand implements Command {
915
1320
  readonly label = "add note";
916
1321
  private readonly note;
@@ -1032,8 +1437,213 @@ declare class DeleteTimerCommand implements Command {
1032
1437
  apply(doc: BoardDocument): void;
1033
1438
  revert(doc: BoardDocument): void;
1034
1439
  }
1440
+ /** Add/update/delete for semantic Rectangle objects (Phase 2). */
1441
+ declare class AddRectangleCommand implements Command {
1442
+ readonly label = "add rectangle";
1443
+ private readonly rect;
1444
+ constructor(rect: RectangleObject);
1445
+ apply(doc: BoardDocument): void;
1446
+ revert(doc: BoardDocument): void;
1447
+ }
1448
+ declare class UpdateRectangleCommand implements Command {
1449
+ readonly label = "update rectangle";
1450
+ private readonly before;
1451
+ private readonly after;
1452
+ constructor(before: RectangleObject, after: RectangleObject);
1453
+ apply(doc: BoardDocument): void;
1454
+ revert(doc: BoardDocument): void;
1455
+ }
1456
+ declare class DeleteRectangleCommand implements Command {
1457
+ readonly label = "delete rectangle";
1458
+ private readonly rect;
1459
+ constructor(rect: RectangleObject);
1460
+ apply(doc: BoardDocument): void;
1461
+ revert(doc: BoardDocument): void;
1462
+ }
1463
+ /** Add/update/delete for semantic Ellipse objects (Phase 2). */
1464
+ declare class AddEllipseCommand implements Command {
1465
+ readonly label = "add ellipse";
1466
+ private readonly ellipse;
1467
+ constructor(ellipse: EllipseObject);
1468
+ apply(doc: BoardDocument): void;
1469
+ revert(doc: BoardDocument): void;
1470
+ }
1471
+ declare class UpdateEllipseCommand implements Command {
1472
+ readonly label = "update ellipse";
1473
+ private readonly before;
1474
+ private readonly after;
1475
+ constructor(before: EllipseObject, after: EllipseObject);
1476
+ apply(doc: BoardDocument): void;
1477
+ revert(doc: BoardDocument): void;
1478
+ }
1479
+ declare class DeleteEllipseCommand implements Command {
1480
+ readonly label = "delete ellipse";
1481
+ private readonly ellipse;
1482
+ constructor(ellipse: EllipseObject);
1483
+ apply(doc: BoardDocument): void;
1484
+ revert(doc: BoardDocument): void;
1485
+ }
1486
+ /** Add/update/delete for semantic Line objects (Phase 4). */
1487
+ declare class AddLineCommand implements Command {
1488
+ readonly label = "add line";
1489
+ private readonly line;
1490
+ constructor(line: LineObject);
1491
+ apply(doc: BoardDocument): void;
1492
+ revert(doc: BoardDocument): void;
1493
+ }
1494
+ declare class UpdateLineCommand implements Command {
1495
+ readonly label = "update line";
1496
+ private readonly before;
1497
+ private readonly after;
1498
+ constructor(before: LineObject, after: LineObject);
1499
+ apply(doc: BoardDocument): void;
1500
+ revert(doc: BoardDocument): void;
1501
+ }
1502
+ declare class DeleteLineCommand implements Command {
1503
+ readonly label = "delete line";
1504
+ private readonly line;
1505
+ constructor(line: LineObject);
1506
+ apply(doc: BoardDocument): void;
1507
+ revert(doc: BoardDocument): void;
1508
+ }
1509
+ /** Add/update/delete for semantic Arrow objects (Phase 4). */
1510
+ declare class AddArrowCommand implements Command {
1511
+ readonly label = "add arrow";
1512
+ private readonly arrow;
1513
+ constructor(arrow: ArrowObject);
1514
+ apply(doc: BoardDocument): void;
1515
+ revert(doc: BoardDocument): void;
1516
+ }
1517
+ declare class UpdateArrowCommand implements Command {
1518
+ readonly label = "update arrow";
1519
+ private readonly before;
1520
+ private readonly after;
1521
+ constructor(before: ArrowObject, after: ArrowObject);
1522
+ apply(doc: BoardDocument): void;
1523
+ revert(doc: BoardDocument): void;
1524
+ }
1525
+ declare class DeleteArrowCommand implements Command {
1526
+ readonly label = "delete arrow";
1527
+ private readonly arrow;
1528
+ constructor(arrow: ArrowObject);
1529
+ apply(doc: BoardDocument): void;
1530
+ revert(doc: BoardDocument): void;
1531
+ }
1532
+ /** Add/update/delete for semantic Polygon objects (Phase 4) — Triangle/Diamond/Pentagon/Hexagon/Octagon. */
1533
+ declare class AddPolygonCommand implements Command {
1534
+ readonly label = "add polygon";
1535
+ private readonly polygon;
1536
+ constructor(polygon: PolygonObject);
1537
+ apply(doc: BoardDocument): void;
1538
+ revert(doc: BoardDocument): void;
1539
+ }
1540
+ declare class UpdatePolygonCommand implements Command {
1541
+ readonly label = "update polygon";
1542
+ private readonly before;
1543
+ private readonly after;
1544
+ constructor(before: PolygonObject, after: PolygonObject);
1545
+ apply(doc: BoardDocument): void;
1546
+ revert(doc: BoardDocument): void;
1547
+ }
1548
+ declare class DeletePolygonCommand implements Command {
1549
+ readonly label = "delete polygon";
1550
+ private readonly polygon;
1551
+ constructor(polygon: PolygonObject);
1552
+ apply(doc: BoardDocument): void;
1553
+ revert(doc: BoardDocument): void;
1554
+ }
1555
+ /** Add/update/delete for semantic Star objects (Phase 4). */
1556
+ declare class AddStarCommand implements Command {
1557
+ readonly label = "add star";
1558
+ private readonly star;
1559
+ constructor(star: StarObject);
1560
+ apply(doc: BoardDocument): void;
1561
+ revert(doc: BoardDocument): void;
1562
+ }
1563
+ declare class UpdateStarCommand implements Command {
1564
+ readonly label = "update star";
1565
+ private readonly before;
1566
+ private readonly after;
1567
+ constructor(before: StarObject, after: StarObject);
1568
+ apply(doc: BoardDocument): void;
1569
+ revert(doc: BoardDocument): void;
1570
+ }
1571
+ declare class DeleteStarCommand implements Command {
1572
+ readonly label = "delete star";
1573
+ private readonly star;
1574
+ constructor(star: StarObject);
1575
+ apply(doc: BoardDocument): void;
1576
+ revert(doc: BoardDocument): void;
1577
+ }
1578
+ /** Add/update/delete for semantic Heart objects (Phase 4). */
1579
+ declare class AddHeartCommand implements Command {
1580
+ readonly label = "add heart";
1581
+ private readonly heart;
1582
+ constructor(heart: HeartObject);
1583
+ apply(doc: BoardDocument): void;
1584
+ revert(doc: BoardDocument): void;
1585
+ }
1586
+ declare class UpdateHeartCommand implements Command {
1587
+ readonly label = "update heart";
1588
+ private readonly before;
1589
+ private readonly after;
1590
+ constructor(before: HeartObject, after: HeartObject);
1591
+ apply(doc: BoardDocument): void;
1592
+ revert(doc: BoardDocument): void;
1593
+ }
1594
+ declare class DeleteHeartCommand implements Command {
1595
+ readonly label = "delete heart";
1596
+ private readonly heart;
1597
+ constructor(heart: HeartObject);
1598
+ apply(doc: BoardDocument): void;
1599
+ revert(doc: BoardDocument): void;
1600
+ }
1601
+ /** Add/update/delete for Groups (Phase 3). */
1602
+ declare class AddGroupCommand implements Command {
1603
+ readonly label = "group";
1604
+ private readonly group;
1605
+ constructor(group: GroupObject);
1606
+ apply(doc: BoardDocument): void;
1607
+ revert(doc: BoardDocument): void;
1608
+ }
1609
+ declare class UpdateGroupCommand implements Command {
1610
+ readonly label = "update group";
1611
+ private readonly before;
1612
+ private readonly after;
1613
+ constructor(before: GroupObject, after: GroupObject);
1614
+ apply(doc: BoardDocument): void;
1615
+ revert(doc: BoardDocument): void;
1616
+ }
1617
+ declare class DeleteGroupCommand implements Command {
1618
+ readonly label = "ungroup";
1619
+ private readonly group;
1620
+ constructor(group: GroupObject);
1621
+ apply(doc: BoardDocument): void;
1622
+ revert(doc: BoardDocument): void;
1623
+ }
1624
+ type ReorderDirection = "forward" | "backward" | "front" | "back";
1625
+ /**
1626
+ * Bring-forward / send-backward / bring-to-front / send-to-back (Phase 3) —
1627
+ * one command family covering all four directions rather than four
1628
+ * near-identical classes, since the only difference between them is which
1629
+ * `BoardDocument.reorder` direction to replay. Captures the full paint order
1630
+ * on first `apply` rather than in the constructor — `BoardDocument.order()`
1631
+ * needs the doc, which a `Command` only ever receives via `apply`/`revert` —
1632
+ * so `revert` can restore it exactly; redo re-runs the same `reorder` call,
1633
+ * which is deterministic because `revert` always restores the identical
1634
+ * starting order first.
1635
+ */
1636
+ declare class ReorderObjectCommand implements Command {
1637
+ private readonly id;
1638
+ private readonly direction;
1639
+ readonly label: string;
1640
+ private before;
1641
+ constructor(id: string, direction: ReorderDirection);
1642
+ apply(doc: BoardDocument): void;
1643
+ revert(doc: BoardDocument): void;
1644
+ }
1035
1645
  interface LockTarget {
1036
- type: "stroke" | "note" | "text" | "table" | "image" | "timer";
1646
+ type: "stroke" | "note" | "text" | "table" | "image" | "timer" | "rectangle" | "ellipse" | "group" | "line" | "arrow" | "polygon" | "star" | "heart";
1037
1647
  id: string;
1038
1648
  locked: boolean;
1039
1649
  lockedBy?: string;
@@ -1050,7 +1660,7 @@ declare class LockItemsCommand implements Command {
1050
1660
  private applyLock;
1051
1661
  }
1052
1662
 
1053
- type OpCollection = "strokes" | "notes" | "textBlocks" | "tables" | "images" | "timers" | "customObjects";
1663
+ type OpCollection = "strokes" | "notes" | "textBlocks" | "tables" | "images" | "timers" | "rectangles" | "ellipses" | "groups" | "lines" | "arrows" | "polygons" | "stars" | "hearts" | "customObjects";
1054
1664
  type Op = {
1055
1665
  kind: "upsert";
1056
1666
  collection: OpCollection;
@@ -1094,10 +1704,10 @@ declare function ribbonEdges(points: StrokePoint[], baseWidth: number, handDrawn
1094
1704
  declare class SpatialIndex {
1095
1705
  private readonly doc;
1096
1706
  private readonly cells;
1097
- private readonly strokeCells;
1707
+ private readonly objectCells;
1098
1708
  private readonly unsubscribe;
1099
1709
  constructor(doc: BoardDocument);
1100
- /** Ids of strokes whose bbox may overlap the query rect. */
1710
+ /** Ids of content objects (any type except groups) whose bbox may overlap the query rect. */
1101
1711
  query(minX: number, minY: number, maxX: number, maxY: number): Set<string>;
1102
1712
  dispose(): void;
1103
1713
  private insert;
@@ -1252,7 +1862,7 @@ interface BoardSnapshot {
1252
1862
  * here, matching the engine's own internal selection-badge behavior.
1253
1863
  */
1254
1864
  interface FocusedItem {
1255
- readonly type: "stroke" | "note" | "text" | "table" | "image" | "timer" | "custom";
1865
+ readonly type: "stroke" | "note" | "text" | "table" | "image" | "timer" | "rectangle" | "ellipse" | "group" | "line" | "arrow" | "polygon" | "star" | "heart" | "custom";
1256
1866
  readonly id: string;
1257
1867
  readonly locked: boolean;
1258
1868
  readonly lockedBy?: string;
@@ -1434,6 +2044,22 @@ type BoardObject = ({
1434
2044
  } & ImageBlock) | ({
1435
2045
  type: "timer";
1436
2046
  } & KitchenTimer) | ({
2047
+ type: "rectangle";
2048
+ } & RectangleObject) | ({
2049
+ type: "ellipse";
2050
+ } & EllipseObject) | ({
2051
+ type: "group";
2052
+ } & GroupObject) | ({
2053
+ type: "line";
2054
+ } & LineObject) | ({
2055
+ type: "arrow";
2056
+ } & ArrowObject) | ({
2057
+ type: "polygon";
2058
+ } & PolygonObject) | ({
2059
+ type: "star";
2060
+ } & StarObject) | ({
2061
+ type: "heart";
2062
+ } & HeartObject) | ({
1437
2063
  type: "custom";
1438
2064
  customType: ObjectType;
1439
2065
  } & Omit<CustomBoardObject, "type">);
@@ -1462,6 +2088,30 @@ type BoardObjectInput = {
1462
2088
  type: "timer";
1463
2089
  id?: string;
1464
2090
  } & Omit<KitchenTimer, "id">) | ({
2091
+ type: "rectangle";
2092
+ id?: string;
2093
+ } & Omit<RectangleObject, "id">) | ({
2094
+ type: "ellipse";
2095
+ id?: string;
2096
+ } & Omit<EllipseObject, "id">) | ({
2097
+ type: "group";
2098
+ id?: string;
2099
+ } & Omit<GroupObject, "id">) | ({
2100
+ type: "line";
2101
+ id?: string;
2102
+ } & Omit<LineObject, "id">) | ({
2103
+ type: "arrow";
2104
+ id?: string;
2105
+ } & Omit<ArrowObject, "id">) | ({
2106
+ type: "polygon";
2107
+ id?: string;
2108
+ } & Omit<PolygonObject, "id">) | ({
2109
+ type: "star";
2110
+ id?: string;
2111
+ } & Omit<StarObject, "id">) | ({
2112
+ type: "heart";
2113
+ id?: string;
2114
+ } & Omit<HeartObject, "id">) | ({
1465
2115
  type: "custom";
1466
2116
  id?: string;
1467
2117
  customType: ObjectType;
@@ -1523,7 +2173,16 @@ interface ControllerOp {
1523
2173
  id: string;
1524
2174
  schemaVersion: 1;
1525
2175
  kind: "upsert" | "restore" | "remove";
1526
- objectType: "stroke" | "note" | "text" | "table" | "image" | "timer" | "custom";
2176
+ objectType: "stroke" | "note" | "text" | "table" | "image" | "timer" | "rectangle" | "ellipse" | "group" | "line" | "arrow" | "polygon" | "star" | "heart" | "custom"
2177
+ /**
2178
+ * A whole-document paint-order sync (Phase 3), not a per-object type —
2179
+ * `objectId` is always the fixed sentinel `"order"` and `payload` is
2180
+ * `{ order: string[] }`. The only `objectType` with no matching
2181
+ * `BoardObject`/document collection; kept in this same union (rather
2182
+ * than a separate wire message) so it flows through the existing
2183
+ * `PersistenceAdapter`/`CollaborationAdapter` opaquely, unchanged.
2184
+ */
2185
+ | "order";
1527
2186
  objectId: string;
1528
2187
  payload?: unknown;
1529
2188
  }
@@ -1636,6 +2295,56 @@ interface BoardController {
1636
2295
  * Unknown ids are silently skipped, matching `remove`'s convention.
1637
2296
  */
1638
2297
  duplicate(ids: readonly string[]): readonly string[];
2298
+ /**
2299
+ * Creates a new Group referencing `ids` as its children and returns its
2300
+ * id, as one undoable step. Unknown ids are silently skipped, matching
2301
+ * `duplicate`/`remove`'s convention. A child id that's itself a group
2302
+ * makes a nested group — expanding nested groups into their leaf
2303
+ * members is always the caller's job, never assumed here (matches the
2304
+ * document-model `GroupObject` itself).
2305
+ */
2306
+ group(ids: readonly string[]): string;
2307
+ /**
2308
+ * Dissolves one group, returning its immediate children's ids (a nested
2309
+ * subgroup among them stays intact, itself still a group) — the group
2310
+ * record itself is removed, the children are untouched. A no-op
2311
+ * (returns `[]`) if `groupId` isn't a group.
2312
+ */
2313
+ ungroup(groupId: string): readonly string[];
2314
+ /**
2315
+ * Aligns every given object's matching edge/center to the corresponding
2316
+ * edge/center of their combined bounding box, as one undoable step.
2317
+ * `"top"`/`"bottom"` follow board space's Y-up convention (`"top"` is
2318
+ * the larger Y). Ids that don't resolve, or resolve to a Group (which
2319
+ * has no position of its own), are skipped. A no-op under 2 resolvable
2320
+ * ids — there's nothing to align relative to.
2321
+ */
2322
+ align(ids: readonly string[], edge: "left" | "right" | "top" | "bottom" | "centerX" | "centerY"): void;
2323
+ /**
2324
+ * Spaces the middle objects' centers evenly between the first and last
2325
+ * (sorted along `axis`), as one undoable step — the two endpoints don't
2326
+ * move. Ids that don't resolve, or resolve to a Group, are skipped. A
2327
+ * no-op under 3 resolvable ids — there's no "middle" to distribute.
2328
+ */
2329
+ distribute(ids: readonly string[], axis: "x" | "y"): void;
2330
+ /**
2331
+ * Snapshots `ids` (recursively expanded through any group, same as
2332
+ * `duplicate`) into an internal in-memory clipboard — never
2333
+ * `navigator.clipboard`, scoped to this one controller instance and
2334
+ * replaced wholesale by the next `copy`/`cut`. Read-only; works even
2335
+ * on a read-only board.
2336
+ */
2337
+ copy(ids: readonly string[]): void;
2338
+ /** `copy`, then removes every resolved object (recursively through any group) as one undoable step. */
2339
+ cut(ids: readonly string[]): void;
2340
+ /**
2341
+ * Clones the current clipboard contents onto the board as one undoable
2342
+ * step, offset the same small cascade `duplicate` uses (no cursor
2343
+ * position to paste relative to yet). Returns the new top-level ids —
2344
+ * a pasted group's own id stands for its (also-pasted) children, which
2345
+ * aren't listed separately. `[]` when the clipboard is empty.
2346
+ */
2347
+ paste(): readonly string[];
1639
2348
  table: {
1640
2349
  addRow(tableId: string): void;
1641
2350
  addCol(tableId: string): void;
@@ -1646,6 +2355,14 @@ interface BoardController {
1646
2355
  };
1647
2356
  select(ids: readonly string[]): void;
1648
2357
  import(document: SerializedBoardDocument): readonly string[];
2358
+ /**
2359
+ * Toggle lock state for the current selection (or focused note/text/
2360
+ * table/image/timer), matching whatever a single Host lock/unlock
2361
+ * control already does per object type. A no-op with nothing selected,
2362
+ * on a headless board, or when every actionable target is locked by
2363
+ * another collaborator who isn't the current lock holder.
2364
+ */
2365
+ toggleSelectionLock(): void;
1649
2366
  };
1650
2367
  readonly query: {
1651
2368
  get(id: string): DeepReadonly<BoardObject> | undefined;
@@ -1899,10 +2616,19 @@ interface FocusedItemToolbarProps {
1899
2616
  snapshot: BoardSnapshot;
1900
2617
  }
1901
2618
  /**
1902
- * Floating toolbar above the focused note, shape, or text block — Colour,
1903
- * Size (note/text) or Width (shape), Lock/Unlock, Duplicate, Delete.
1904
- * Table/image/timer/custom objects and plain (non-shape) ink strokes never
1905
- * get a toolbar here — out of scope for this destination.
2619
+ * Floating toolbar above the focused note, shape, text block, or semantic
2620
+ * Rectangle/Ellipse — Colour, Size (note/text) or Width (shape), Fill/Stroke
2621
+ * (Rectangle/Ellipse), Lock/Unlock, Duplicate, Delete. Table/image/timer/
2622
+ * custom objects and plain (non-shape) ink strokes never get a toolbar here
2623
+ * — out of scope for this destination.
2624
+ *
2625
+ * Rectangle/Ellipse (Phase 2) are a second, parallel "shape" concept from
2626
+ * the legacy ink-stroke shape below: both draw from the same toolbar
2627
+ * buttons and look the same to a user, but a Rectangle/Ellipse is a real
2628
+ * BoardObject with its own resize handles (independent width/height,
2629
+ * `ShapeResizeHandle`), while a legacy shape-stroke keeps going through the
2630
+ * native selection gizmo. This duality is deliberate and temporary — see
2631
+ * docs/reports/phase-2-document-object-model.md.
1906
2632
  *
1907
2633
  * Lock/Unlock carries no per-user ownership gating: nothing else in this
1908
2634
  * SDK enforces lock ownership either (`content.update` never checks
@@ -2011,5 +2737,5 @@ type ScrawlBoardProps = {
2011
2737
  };
2012
2738
  declare function ScrawlBoard({ documentId, initialDocument, onReady, className, style }: ScrawlBoardProps): react.JSX.Element;
2013
2739
 
2014
- export { ASSET_CACHE_BYTES_DEFAULT, ASSET_CACHE_BYTES_MAX, ASSET_CACHE_BYTES_MIN, ASSET_EXPORT_MAX_DECODED_MEGAPIXELS, ASSET_EXPORT_MAX_ENCODED_BYTES, ASSET_MAX_CONCURRENT_RESOLUTIONS, ASSET_MAX_DECODED_MEGAPIXELS, ASSET_MAX_DIMENSION_PX, ASSET_MAX_ENCODED_BYTES, ASSET_REF_MAX_BYTES, ASSET_REF_PATTERN, AddImageCommand, AddNoteCommand, AddStrokesCommand, AddTableCommand, AddTextCommand, AddTimerCommand, AssetResolutionError, BEACON_INSET, BoardDocument, CURRENT_DOCUMENT_SCHEMA_VERSION, ClusterStore, DefaultBoardChrome, DeleteImageCommand, DeleteNoteCommand, DeleteStrokesCommand, DeleteTableCommand, DeleteTextCommand, DeleteTimerCommand, DocumentRecoveryError, END_TAPER, ERASE_THRESHOLD, EraseCommand, FOG_COLOR, FocusedItemToolbar, HIGHLIGHT_COLORS, History, IDENTITY, INK_COLORS, InlineEditors, LockItemsCommand, MIN_WIDTH_FACTOR, MultiplayerCursors, NOTE_COLORS, NOTE_DEFAULT_SIZE, NOTE_DEFAULT_Z, NOTE_MAX_Z, NOTE_MIN_Z, NOTE_PEEL_STEP, SDK_DEVELOPMENT_VERSION, SDK_PACKAGE_NAME, STAMPS, STAMP_SIZE, SUPPORTED_ASSET_MEDIA_TYPES, Scrawl, ScrawlBoard, ScrawlCanvas, ScrawlDefaultUI, ScrawlPortal, ScrawlProvider, SpatialIndex, StyleShelf, TABLE_DEFAULT_CELL_HEIGHT, TABLE_DEFAULT_CELL_WIDTH, TABLE_DEFAULT_FONT_SIZE, TEXT_DEFAULT_SIZE, TIMER_DEFAULT_DURATION_MS, TIMER_DEFAULT_SIZE, TIMER_PRESETS_MS, TransformCommand, UpdateImageCommand, UpdateNoteCommand, UpdateTableCommand, UpdateTextCommand, UpdateTimerCommand, apply, applyItemLock, assetRef, avgScale, canUnlockItem, changeToOps, clampAssetCacheBytes, cloneCustomObject, cloneImage, cloneNote, cloneStroke, cloneTable, cloneText, cloneTimer, createBoardController, createLocalBoard, documentId, documentToSVG, formatTimer, invert, isAssetRef, isIdentity, isStampKind, loadDocumentBytes, measureTable, measureTextBlock, migrateDocument, mul, pauseTimer, placePresenceBeacon, resolveScrawlTheme, ribbonEdges, rotationAbout, scalingAbout, scrawlThemePresets, searchBoard, serializeDocument, serializeLock, serializeStroke, setTimerDuration, stampDataUrl, startTimer, strokeId, timerExpired, timerRemaining, toggleTimer, translation, useScrawlController, useScrawlSnapshot, useScrawlTheme, validateScrawlTheme };
2015
- export type { ApplyOpsResult, AssetDiagnostic, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BBox, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPoint, BoardPointerInput, BoardScene, BoardSlotProps, BoardSnapshot, BoardStroke, BoardStyle, BoardThemeOptions, BoardView, BuiltInTool, ClusterIdFactory, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaboratorIdentity, Command, CommandKind, CommentMarker, ControllerOp, CreateBoardControllerOptions, CurrentSerializedDocument, CurrentSerializedStroke, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DefaultBoardChromeProps, DefaultUIRegion, DefaultUISlot, DefaultUISlots, DialogSlotProps, DocumentChange, DocumentContext, DocumentId, DocumentLoadResult, DocumentRecoveryCode, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, FocusedItem, FocusedItemToolbarProps, ImageBlock, InlineEditorsProps, InputModifiers, JsonObject, JsonValue, KitchenTimer, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, LockHolder, LockTarget, Lockable, Mat2x3, MultiplayerCursorsProps, NoteVote, ObjectDescribeContext, ObjectIntent, ObjectType, Op, OpCollection, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PresenceCursor, PresencePlacement, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, RibbonEdgePoint, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlBoardProps, ScrawlCanvasProps, ScrawlDefaultUIProps, ScrawlDensity, ScrawlExtension, ScrawlGridMode, ScrawlProps, ScrawlProviderProps, ScrawlResolvedTheme, ScrawlSurfaceTexture, ScrawlTheme, ScrawlThemeDiagnostic, ScrawlThemePreset, ScreenPoint, ScreenRect, SearchHit, SearchHitKind, SearchableBoard, SearchableComment, SerializedBoardDocument, SerializedBoardStroke, SerializedPoint, SerializedStroke, StampKind, StickyNote, Stroke, StrokeId, StrokePoint, StrokeTool, StyleShelfProps, SupportedAssetMediaType, TableBlock, TextBlock, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId, ViewportInset };
2740
+ export { ASSET_CACHE_BYTES_DEFAULT, ASSET_CACHE_BYTES_MAX, ASSET_CACHE_BYTES_MIN, ASSET_EXPORT_MAX_DECODED_MEGAPIXELS, ASSET_EXPORT_MAX_ENCODED_BYTES, ASSET_MAX_CONCURRENT_RESOLUTIONS, ASSET_MAX_DECODED_MEGAPIXELS, ASSET_MAX_DIMENSION_PX, ASSET_MAX_ENCODED_BYTES, ASSET_REF_MAX_BYTES, ASSET_REF_PATTERN, AddArrowCommand, AddEllipseCommand, AddGroupCommand, AddHeartCommand, AddImageCommand, AddLineCommand, AddNoteCommand, AddPolygonCommand, AddRectangleCommand, AddStarCommand, AddStrokesCommand, AddTableCommand, AddTextCommand, AddTimerCommand, AssetResolutionError, BEACON_INSET, BoardDocument, CURRENT_DOCUMENT_SCHEMA_VERSION, ClusterStore, CommandBatch, DefaultBoardChrome, DeleteArrowCommand, DeleteEllipseCommand, DeleteGroupCommand, DeleteHeartCommand, DeleteImageCommand, DeleteLineCommand, DeleteNoteCommand, DeletePolygonCommand, DeleteRectangleCommand, DeleteStarCommand, DeleteStrokesCommand, DeleteTableCommand, DeleteTextCommand, DeleteTimerCommand, DocumentRecoveryError, END_TAPER, ERASE_THRESHOLD, EraseCommand, FOG_COLOR, FocusedItemToolbar, HIGHLIGHT_COLORS, History, IDENTITY, INK_COLORS, InlineEditors, LockItemsCommand, MIN_WIDTH_FACTOR, MultiplayerCursors, NOTE_COLORS, NOTE_DEFAULT_SIZE, NOTE_DEFAULT_Z, NOTE_MAX_Z, NOTE_MIN_Z, NOTE_PEEL_STEP, ReorderObjectCommand, SDK_DEVELOPMENT_VERSION, SDK_PACKAGE_NAME, SHAPE_DEFAULT_STROKE, SHAPE_DEFAULT_STROKE_WIDTH, SHAPE_MIN_SIZE, STAMPS, STAMP_SIZE, SUPPORTED_ASSET_MEDIA_TYPES, Scrawl, ScrawlBoard, ScrawlCanvas, ScrawlDefaultUI, ScrawlPortal, ScrawlProvider, SpatialIndex, StyleShelf, TABLE_DEFAULT_CELL_HEIGHT, TABLE_DEFAULT_CELL_WIDTH, TABLE_DEFAULT_FONT_SIZE, TEXT_DEFAULT_SIZE, TIMER_DEFAULT_DURATION_MS, TIMER_DEFAULT_SIZE, TIMER_PRESETS_MS, TransformCommand, TransformObjectsCommand, UpdateArrowCommand, UpdateEllipseCommand, UpdateGroupCommand, UpdateHeartCommand, UpdateImageCommand, UpdateLineCommand, UpdateNoteCommand, UpdatePolygonCommand, UpdateRectangleCommand, UpdateStarCommand, UpdateTableCommand, UpdateTextCommand, UpdateTimerCommand, apply, applyItemLock, assetRef, avgScale, canUnlockItem, changeToOps, clampAssetCacheBytes, cloneArrow, cloneCustomObject, cloneEllipse, cloneGroup, cloneHeart, cloneImage, cloneLine, cloneNote, clonePolygon, cloneRectangle, cloneStar, cloneStroke, cloneTable, cloneText, cloneTimer, createBoardController, createLocalBoard, documentId, documentToSVG, formatTimer, invert, isAssetRef, isIdentity, isStampKind, loadDocumentBytes, measureTable, measureTextBlock, migrateDocument, mul, pauseTimer, placePresenceBeacon, resolveScrawlTheme, ribbonEdges, rotationAbout, scalingAbout, scrawlThemePresets, searchBoard, serializeDocument, serializeLock, serializeStroke, setTimerDuration, stampDataUrl, startTimer, strokeId, timerExpired, timerRemaining, toggleTimer, translation, useScrawlController, useScrawlSnapshot, useScrawlTheme, validateScrawlTheme };
2741
+ export type { ApplyOpsResult, ArrowHeadStyle, ArrowObject, AssetDiagnostic, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BBox, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPoint, BoardPointerInput, BoardScene, BoardSlotProps, BoardSnapshot, BoardStroke, BoardStyle, BoardThemeOptions, BoardView, BuiltInTool, ClusterIdFactory, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaboratorIdentity, Command, CommandKind, CommentMarker, ControllerOp, CreateBoardControllerOptions, CurrentSerializedDocument, CurrentSerializedStroke, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DefaultBoardChromeProps, DefaultUIRegion, DefaultUISlot, DefaultUISlots, DialogSlotProps, DocumentChange, DocumentContext, DocumentId, DocumentLoadResult, DocumentRecoveryCode, EllipseObject, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, FocusedItem, FocusedItemToolbarProps, GroupObject, HeartObject, ImageBlock, InlineEditorsProps, InputModifiers, JsonObject, JsonValue, KitchenTimer, LineObject, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, LockHolder, LockTarget, Lockable, Mat2x3, MultiplayerCursorsProps, NoteVote, ObjectDescribeContext, ObjectIntent, ObjectType, Op, OpCollection, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PolygonObject, PresenceCursor, PresencePlacement, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, RectangleObject, ReorderDirection, RibbonEdgePoint, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlBoardProps, ScrawlCanvasProps, ScrawlDefaultUIProps, ScrawlDensity, ScrawlExtension, ScrawlGridMode, ScrawlProps, ScrawlProviderProps, ScrawlResolvedTheme, ScrawlSurfaceTexture, ScrawlTheme, ScrawlThemeDiagnostic, ScrawlThemePreset, ScreenPoint, ScreenRect, SearchHit, SearchHitKind, SearchableBoard, SearchableComment, SerializedBoardDocument, SerializedBoardStroke, SerializedPoint, SerializedStroke, StampKind, StarObject, StickyNote, Stroke, StrokeId, StrokePoint, StrokeTool, StyleShelfProps, SupportedAssetMediaType, TableBlock, TextBlock, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId, ViewportInset };