@oh-just-another/state 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/actions/registry.js +1 -1
  4. package/dist/actions/registry.js.map +1 -1
  5. package/dist/constants.d.ts +162 -8
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/constants.js +132 -8
  8. package/dist/constants.js.map +1 -1
  9. package/dist/editor/animation-scene.d.ts.map +1 -1
  10. package/dist/editor/animation-scene.js +27 -39
  11. package/dist/editor/animation-scene.js.map +1 -1
  12. package/dist/editor/animation.js +1 -1
  13. package/dist/editor/animation.js.map +1 -1
  14. package/dist/editor/applies/arrange-units.d.ts +24 -0
  15. package/dist/editor/applies/arrange-units.d.ts.map +1 -0
  16. package/dist/editor/applies/arrange-units.js +56 -0
  17. package/dist/editor/applies/arrange-units.js.map +1 -0
  18. package/dist/editor/applies/arrange.d.ts +16 -15
  19. package/dist/editor/applies/arrange.d.ts.map +1 -1
  20. package/dist/editor/applies/arrange.js +33 -48
  21. package/dist/editor/applies/arrange.js.map +1 -1
  22. package/dist/editor/applies/create.d.ts +16 -10
  23. package/dist/editor/applies/create.d.ts.map +1 -1
  24. package/dist/editor/applies/create.js +32 -12
  25. package/dist/editor/applies/create.js.map +1 -1
  26. package/dist/editor/applies/edge.d.ts +1 -1
  27. package/dist/editor/applies/edge.d.ts.map +1 -1
  28. package/dist/editor/applies/object-snap.d.ts +87 -0
  29. package/dist/editor/applies/object-snap.d.ts.map +1 -0
  30. package/dist/editor/applies/object-snap.js +198 -0
  31. package/dist/editor/applies/object-snap.js.map +1 -0
  32. package/dist/editor/applies/resize.d.ts +1 -1
  33. package/dist/editor/applies/resize.d.ts.map +1 -1
  34. package/dist/editor/applies/resize.js +6 -4
  35. package/dist/editor/applies/resize.js.map +1 -1
  36. package/dist/editor/applies/selection.d.ts +5 -5
  37. package/dist/editor/applies/selection.d.ts.map +1 -1
  38. package/dist/editor/applies/selection.js +15 -7
  39. package/dist/editor/applies/selection.js.map +1 -1
  40. package/dist/editor/applies/snap-grid.d.ts +1 -1
  41. package/dist/editor/applies/snap-grid.d.ts.map +1 -1
  42. package/dist/editor/container-ops.d.ts +1 -1
  43. package/dist/editor/container-ops.d.ts.map +1 -1
  44. package/dist/{editor-events.d.ts → editor/editor-events.d.ts} +2 -2
  45. package/dist/editor/editor-events.d.ts.map +1 -0
  46. package/dist/{editor-events.js.map → editor/editor-events.js.map} +1 -1
  47. package/dist/editor/event-fanout.d.ts +3 -3
  48. package/dist/editor/event-fanout.d.ts.map +1 -1
  49. package/dist/editor/gesture-tx.d.ts +1 -1
  50. package/dist/editor/gesture-tx.d.ts.map +1 -1
  51. package/dist/editor/hit-test.d.ts +5 -3
  52. package/dist/editor/hit-test.d.ts.map +1 -1
  53. package/dist/editor/hit-test.js +18 -10
  54. package/dist/editor/hit-test.js.map +1 -1
  55. package/dist/editor/interaction-state.d.ts +29 -2
  56. package/dist/editor/interaction-state.d.ts.map +1 -1
  57. package/dist/editor/interaction-state.js +34 -0
  58. package/dist/editor/interaction-state.js.map +1 -1
  59. package/dist/editor/link-handle-drag.d.ts +1 -1
  60. package/dist/editor/link-handle-drag.d.ts.map +1 -1
  61. package/dist/editor/link-handle-drag.js +1 -1
  62. package/dist/editor/link-handle-drag.js.map +1 -1
  63. package/dist/editor/pointer-binding.d.ts.map +1 -1
  64. package/dist/editor/pointer-binding.js +86 -24
  65. package/dist/editor/pointer-binding.js.map +1 -1
  66. package/dist/editor/public/arrange-group.d.ts +6 -5
  67. package/dist/editor/public/arrange-group.d.ts.map +1 -1
  68. package/dist/editor/public/arrange-group.js +39 -23
  69. package/dist/editor/public/arrange-group.js.map +1 -1
  70. package/dist/editor/public/clipboard.d.ts +1 -1
  71. package/dist/editor/public/clipboard.d.ts.map +1 -1
  72. package/dist/editor/public/clipboard.js +2 -2
  73. package/dist/editor/public/clipboard.js.map +1 -1
  74. package/dist/editor/public/cursor.js +1 -1
  75. package/dist/editor/public/cursor.js.map +1 -1
  76. package/dist/editor/public/eraser.js +1 -1
  77. package/dist/editor/public/eraser.js.map +1 -1
  78. package/dist/editor/public/image-insert.d.ts.map +1 -1
  79. package/dist/editor/public/image-insert.js +4 -1
  80. package/dist/editor/public/image-insert.js.map +1 -1
  81. package/dist/editor/public/label-seed.d.ts +12 -0
  82. package/dist/editor/public/label-seed.d.ts.map +1 -0
  83. package/dist/editor/public/label-seed.js +20 -0
  84. package/dist/editor/public/label-seed.js.map +1 -0
  85. package/dist/editor/public/layers.d.ts +1 -1
  86. package/dist/editor/public/layers.d.ts.map +1 -1
  87. package/dist/editor/public/placement.d.ts +6 -1
  88. package/dist/editor/public/placement.d.ts.map +1 -1
  89. package/dist/editor/public/placement.js +47 -17
  90. package/dist/editor/public/placement.js.map +1 -1
  91. package/dist/editor/public/selection-ops.d.ts +1 -1
  92. package/dist/editor/public/selection-ops.d.ts.map +1 -1
  93. package/dist/editor/public/selection-ops.js +31 -2
  94. package/dist/editor/public/selection-ops.js.map +1 -1
  95. package/dist/editor/public/stroke-eraser-coverage.js +1 -1
  96. package/dist/editor/public/stroke-eraser-coverage.js.map +1 -1
  97. package/dist/editor/public/stroke-eraser.js +1 -1
  98. package/dist/editor/public/stroke-eraser.js.map +1 -1
  99. package/dist/editor/public/text-edit.d.ts +4 -2
  100. package/dist/editor/public/text-edit.d.ts.map +1 -1
  101. package/dist/editor/public/text-edit.js +8 -4
  102. package/dist/editor/public/text-edit.js.map +1 -1
  103. package/dist/editor/public/tool-ops.d.ts +10 -7
  104. package/dist/editor/public/tool-ops.d.ts.map +1 -1
  105. package/dist/editor/public/tool-ops.js +141 -14
  106. package/dist/editor/public/tool-ops.js.map +1 -1
  107. package/dist/editor/public/zoom-pan.d.ts +10 -1
  108. package/dist/editor/public/zoom-pan.d.ts.map +1 -1
  109. package/dist/editor/public/zoom-pan.js +49 -0
  110. package/dist/editor/public/zoom-pan.js.map +1 -1
  111. package/dist/editor/render-orchestrator.d.ts +17 -11
  112. package/dist/editor/render-orchestrator.d.ts.map +1 -1
  113. package/dist/editor/render-orchestrator.js +45 -31
  114. package/dist/editor/render-orchestrator.js.map +1 -1
  115. package/dist/editor/resize-helpers.d.ts +1 -1
  116. package/dist/editor/resize-helpers.d.ts.map +1 -1
  117. package/dist/editor/shape-traits.d.ts +1 -1
  118. package/dist/editor/shape-traits.d.ts.map +1 -1
  119. package/dist/editor/shape-traits.js +1 -1
  120. package/dist/editor/shape-traits.js.map +1 -1
  121. package/dist/editor/text-edit.d.ts +24 -11
  122. package/dist/editor/text-edit.d.ts.map +1 -1
  123. package/dist/editor/text-edit.js +225 -45
  124. package/dist/editor/text-edit.js.map +1 -1
  125. package/dist/editor.d.ts +320 -20
  126. package/dist/editor.d.ts.map +1 -1
  127. package/dist/editor.js +1324 -73
  128. package/dist/editor.js.map +1 -1
  129. package/dist/features/built-in-handlers.d.ts.map +1 -0
  130. package/dist/{built-in-handlers.js → features/built-in-handlers.js} +7 -1
  131. package/dist/features/built-in-handlers.js.map +1 -0
  132. package/dist/{clipboard.d.ts → features/clipboard.d.ts} +14 -0
  133. package/dist/features/clipboard.d.ts.map +1 -0
  134. package/dist/{clipboard.js → features/clipboard.js} +1 -1
  135. package/dist/features/clipboard.js.map +1 -0
  136. package/dist/{file-drop.d.ts → features/file-drop.d.ts} +20 -1
  137. package/dist/features/file-drop.d.ts.map +1 -0
  138. package/dist/{file-drop.js → features/file-drop.js} +47 -19
  139. package/dist/features/file-drop.js.map +1 -0
  140. package/dist/features/insert-scene.d.ts +19 -0
  141. package/dist/features/insert-scene.d.ts.map +1 -0
  142. package/dist/features/insert-scene.js +145 -0
  143. package/dist/features/insert-scene.js.map +1 -0
  144. package/dist/features/search.d.ts.map +1 -0
  145. package/dist/features/search.js.map +1 -0
  146. package/dist/helpers/auto-compact.d.ts.map +1 -0
  147. package/dist/{auto-compact.js → helpers/auto-compact.js} +1 -1
  148. package/dist/helpers/auto-compact.js.map +1 -0
  149. package/dist/helpers/auto-layout-scheduler.d.ts.map +1 -0
  150. package/dist/helpers/auto-layout-scheduler.js.map +1 -0
  151. package/dist/helpers/frame-helpers.d.ts.map +1 -0
  152. package/dist/helpers/frame-helpers.js.map +1 -0
  153. package/dist/helpers/group-helpers.d.ts.map +1 -0
  154. package/dist/helpers/group-helpers.js.map +1 -0
  155. package/dist/helpers/util.d.ts.map +1 -0
  156. package/dist/helpers/util.js.map +1 -0
  157. package/dist/index.d.ts +23 -21
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +12 -12
  160. package/dist/index.js.map +1 -1
  161. package/dist/input/dom-events.d.ts.map +1 -0
  162. package/dist/input/dom-events.js.map +1 -0
  163. package/dist/{hotkeys-binding.d.ts → input/hotkeys-binding.d.ts} +2 -2
  164. package/dist/input/hotkeys-binding.d.ts.map +1 -0
  165. package/dist/{hotkeys-binding.js → input/hotkeys-binding.js} +1 -1
  166. package/dist/input/hotkeys-binding.js.map +1 -0
  167. package/dist/input/platform.d.ts.map +1 -0
  168. package/dist/input/platform.js.map +1 -0
  169. package/dist/{handle.d.ts → interaction/handle.d.ts} +1 -1
  170. package/dist/interaction/handle.d.ts.map +1 -0
  171. package/dist/{handle.js → interaction/handle.js} +1 -1
  172. package/dist/interaction/handle.js.map +1 -0
  173. package/dist/interaction/interactive.d.ts.map +1 -0
  174. package/dist/interaction/interactive.js.map +1 -0
  175. package/dist/interaction/machine.d.ts.map +1 -0
  176. package/dist/interaction/machine.js.map +1 -0
  177. package/dist/interaction/modes.d.ts.map +1 -0
  178. package/dist/interaction/modes.js.map +1 -0
  179. package/dist/render/animation-tick.d.ts.map +1 -0
  180. package/dist/render/animation-tick.js.map +1 -0
  181. package/dist/{overlay.d.ts → render/overlay.d.ts} +42 -38
  182. package/dist/render/overlay.d.ts.map +1 -0
  183. package/dist/{overlay.js → render/overlay.js} +174 -59
  184. package/dist/render/overlay.js.map +1 -0
  185. package/dist/selection/link-selection.d.ts.map +1 -0
  186. package/dist/{link-selection.js → selection/link-selection.js} +1 -1
  187. package/dist/selection/link-selection.js.map +1 -0
  188. package/dist/selection/selection.d.ts.map +1 -0
  189. package/dist/{selection.js → selection/selection.js} +1 -1
  190. package/dist/selection/selection.js.map +1 -0
  191. package/package.json +5 -5
  192. package/dist/animation-tick.d.ts.map +0 -1
  193. package/dist/animation-tick.js.map +0 -1
  194. package/dist/auto-compact.d.ts.map +0 -1
  195. package/dist/auto-compact.js.map +0 -1
  196. package/dist/auto-layout-scheduler.d.ts.map +0 -1
  197. package/dist/auto-layout-scheduler.js.map +0 -1
  198. package/dist/built-in-handlers.d.ts.map +0 -1
  199. package/dist/built-in-handlers.js.map +0 -1
  200. package/dist/clipboard.d.ts.map +0 -1
  201. package/dist/clipboard.js.map +0 -1
  202. package/dist/dom-events.d.ts.map +0 -1
  203. package/dist/dom-events.js.map +0 -1
  204. package/dist/editor-events.d.ts.map +0 -1
  205. package/dist/file-drop.d.ts.map +0 -1
  206. package/dist/file-drop.js.map +0 -1
  207. package/dist/frame-helpers.d.ts.map +0 -1
  208. package/dist/frame-helpers.js.map +0 -1
  209. package/dist/group-helpers.d.ts.map +0 -1
  210. package/dist/group-helpers.js.map +0 -1
  211. package/dist/handle.d.ts.map +0 -1
  212. package/dist/handle.js.map +0 -1
  213. package/dist/hotkeys-binding.d.ts.map +0 -1
  214. package/dist/hotkeys-binding.js.map +0 -1
  215. package/dist/interactive.d.ts.map +0 -1
  216. package/dist/interactive.js.map +0 -1
  217. package/dist/link-selection.d.ts.map +0 -1
  218. package/dist/link-selection.js.map +0 -1
  219. package/dist/machine.d.ts.map +0 -1
  220. package/dist/machine.js.map +0 -1
  221. package/dist/modes.d.ts.map +0 -1
  222. package/dist/modes.js.map +0 -1
  223. package/dist/overlay.d.ts.map +0 -1
  224. package/dist/overlay.js.map +0 -1
  225. package/dist/platform.d.ts.map +0 -1
  226. package/dist/platform.js.map +0 -1
  227. package/dist/search.d.ts.map +0 -1
  228. package/dist/search.js.map +0 -1
  229. package/dist/selection.d.ts.map +0 -1
  230. package/dist/selection.js.map +0 -1
  231. package/dist/util.d.ts.map +0 -1
  232. package/dist/util.js.map +0 -1
  233. /package/dist/{editor-events.js → editor/editor-events.js} +0 -0
  234. /package/dist/{built-in-handlers.d.ts → features/built-in-handlers.d.ts} +0 -0
  235. /package/dist/{search.d.ts → features/search.d.ts} +0 -0
  236. /package/dist/{search.js → features/search.js} +0 -0
  237. /package/dist/{auto-compact.d.ts → helpers/auto-compact.d.ts} +0 -0
  238. /package/dist/{auto-layout-scheduler.d.ts → helpers/auto-layout-scheduler.d.ts} +0 -0
  239. /package/dist/{auto-layout-scheduler.js → helpers/auto-layout-scheduler.js} +0 -0
  240. /package/dist/{frame-helpers.d.ts → helpers/frame-helpers.d.ts} +0 -0
  241. /package/dist/{frame-helpers.js → helpers/frame-helpers.js} +0 -0
  242. /package/dist/{group-helpers.d.ts → helpers/group-helpers.d.ts} +0 -0
  243. /package/dist/{group-helpers.js → helpers/group-helpers.js} +0 -0
  244. /package/dist/{util.d.ts → helpers/util.d.ts} +0 -0
  245. /package/dist/{util.js → helpers/util.js} +0 -0
  246. /package/dist/{dom-events.d.ts → input/dom-events.d.ts} +0 -0
  247. /package/dist/{dom-events.js → input/dom-events.js} +0 -0
  248. /package/dist/{platform.d.ts → input/platform.d.ts} +0 -0
  249. /package/dist/{platform.js → input/platform.js} +0 -0
  250. /package/dist/{interactive.d.ts → interaction/interactive.d.ts} +0 -0
  251. /package/dist/{interactive.js → interaction/interactive.js} +0 -0
  252. /package/dist/{machine.d.ts → interaction/machine.d.ts} +0 -0
  253. /package/dist/{machine.js → interaction/machine.js} +0 -0
  254. /package/dist/{modes.d.ts → interaction/modes.d.ts} +0 -0
  255. /package/dist/{modes.js → interaction/modes.js} +0 -0
  256. /package/dist/{animation-tick.d.ts → render/animation-tick.d.ts} +0 -0
  257. /package/dist/{animation-tick.js → render/animation-tick.js} +0 -0
  258. /package/dist/{link-selection.d.ts → selection/link-selection.d.ts} +0 -0
  259. /package/dist/{selection.d.ts → selection/selection.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"text-edit.js","sourceRoot":"","sources":["../../src/editor/text-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,cAAc,IAAI,kBAAkB,GAGrC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,MAAM,EACN,aAAa,EACb,aAAa,GAKd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA6BzD;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAgCA;IA/B7B;;;;;OAKG;IACK,eAAe,GAAqB,IAAI,CAAC;IACjD;;;;;;OAMG;IACK,cAAc,GAAqB,IAAI,CAAC;IAChD;;;;OAIG;IACK,OAAO,GAAmB,IAAI,CAAC;IACvC;;;;OAIG;IACK,IAAI,GAAyB,IAAI,CAAC;IAC1C,qEAAqE;IAC7D,WAAW,GAAkB,IAAI,CAAC;IACzB,UAAU,CAAuB;IAElD,YAA6B,IAAkB;QAAlB,SAAI,GAAJ,IAAI,CAAc;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAoB,CAAC,GAAG,EAAE;YAC9C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,sDAAsD;IACtD,IAAI,KAAK;QACP,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAC5B,OAAO,IAAI,CAAC,IAA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ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import { type Actor } from "xstate";
2
2
  import type { Bounds, FileId, ElementId, Vec2 } from "@oh-just-another/types";
3
3
  import type { SpatialGrid } from "@oh-just-another/scene";
4
- import { type FractionalIndex, type BrushPoint, type Link, type Patch, type Scene, type Element, type GridStyle, type ImageCrop, type TextStyle } from "@oh-just-another/scene";
4
+ import { type FractionalIndex, type BrushPoint, type Link, type Patch, type Scene, type Element, type GridStyle, type StartView, type ImageCrop, type ImageMask, type TextStyle } from "@oh-just-another/scene";
5
5
  import { type AnnotationId, type Color, type CommentId, type LinkId, type LayerId } from "@oh-just-another/types";
6
6
  import { ElementCache, type RenderTarget, type TextShaper, type Rasterizer } from "@oh-just-another/renderer-core";
7
7
  import { type HistoryOptions, type HistoryProvider, type TransactionHandle } from "@oh-just-another/history";
8
- import { type FileDropHandler } from "./file-drop.js";
9
- import { interactionMachine, type InteractionContext, type InteractionEmit, type PressTarget } from "./machine.js";
10
- import type { ActiveTool, Mode } from "./modes.js";
11
- import type { EditorEvents } from "./editor-events.js";
8
+ import { type FileDropHandler } from "./features/file-drop.js";
9
+ import { type EditorPreferences, type ImageAspectPreset, type DrawShapeKind, type LinkDrawPreset } from "./constants.js";
10
+ import { interactionMachine, type InteractionContext, type InteractionEmit, type PressTarget } from "./interaction/machine.js";
11
+ import type { ActiveTool, Mode } from "./interaction/modes.js";
12
+ import type { EditorEvents } from "./editor/editor-events.js";
12
13
  import { GifPlaybackController } from "./editor/gif-playback.js";
13
14
  import { LongPressController } from "./editor/long-press.js";
14
15
  import { PinchController } from "./editor/pinch.js";
@@ -19,9 +20,10 @@ import { type LaserStroke } from "./editor/public/laser.js";
19
20
  import type { CursorRole, CursorSpec } from "./editor/public/cursor.js";
20
21
  import { type ConvertTarget, type CropHandle, type SpawnDirection } from "./editor/public/tool-ops.js";
21
22
  import { type AlignEdge, type DistributeAxis, type FlipAxis } from "./editor/applies/arrange.js";
22
- import { type PeerCursor, type PeerSelection } from "./overlay.js";
23
- import * as Selection from "./selection.js";
24
- import * as LinkSelection from "./link-selection.js";
23
+ import { type SizeMatch, type SnapGuide } from "./editor/applies/object-snap.js";
24
+ import { type EditingTextOverlay, type PeerCursor, type PeerSelection, type SizeReadout } from "./render/overlay.js";
25
+ import * as Selection from "./selection/selection.js";
26
+ import * as LinkSelection from "./selection/link-selection.js";
25
27
  export interface LoadSceneOptions {
26
28
  /**
27
29
  * Keep the existing undo/redo stack when swapping scenes. Used by
@@ -81,6 +83,13 @@ export interface EditorOptions {
81
83
  * reports a coarse primary pointer, else `"mouse"`. Default.
82
84
  */
83
85
  readonly inputMode?: "mouse" | "touch" | "auto";
86
+ /**
87
+ * Initial per-user preferences (object snapping, size readouts, wheel
88
+ * routing) — see {@link EditorPreferences}. Missing keys take
89
+ * {@link DEFAULT_EDITOR_PREFERENCES}; change at runtime via
90
+ * {@link Editor.setPreferences}.
91
+ */
92
+ readonly preferences?: Partial<EditorPreferences>;
84
93
  /**
85
94
  * Optional text shaper. When supplied, replaces the renderer's
86
95
  * default Canvas2D `measureText` path for wrap / layout. Plug
@@ -408,6 +417,14 @@ export declare class Editor {
408
417
  * this lets that active→inactive transition force one full repaint.
409
418
  */
410
419
  lastRenderedEraseActive: boolean;
420
+ /**
421
+ * Last-painted hovered sticky — paired with `lastRenderedScene` like
422
+ * {@link lastRenderedEnteredGroup}. Hovering changes only chrome (the
423
+ * "+" add-reaction button), not the scene, so the dirty-rect diff is
424
+ * empty and the button would never appear / disappear without this
425
+ * forcing a full repaint on hover transitions.
426
+ */
427
+ lastRenderedHoveredSticky: ElementId | null;
411
428
  /**
412
429
  * Set whenever an eraser move actually CHANGES the marked / cut set (a new
413
430
  * shape marked, un-marked, or a brush point cut). Gates the forced full
@@ -549,6 +566,9 @@ export declare class Editor {
549
566
  */
550
567
  get panGesture(): PanGesture | null;
551
568
  set panGesture(v: PanGesture | null);
569
+ /** Element being placed by a library drag, or null (see `beginPlacement`). */
570
+ get placementId(): ElementId | null;
571
+ set placementId(v: ElementId | null);
552
572
  /**
553
573
  * Set on a right-click pointerdown so the upcoming native
554
574
  * `contextmenu` event can be unconditionally preventDefault'ed
@@ -772,6 +792,33 @@ export declare class Editor {
772
792
  setGridVisible(on: boolean): void;
773
793
  /** Toggle the background grid on/off. */
774
794
  toggleGrid(): void;
795
+ private _preferences;
796
+ /** Per-user preferences — see {@link EditorPreferences}. */
797
+ get preferences(): EditorPreferences;
798
+ /**
799
+ * Merge `patch` over the current preferences. Not part of the document
800
+ * and never recorded in history; hosts persist the result per browser.
801
+ * Subscribers are notified (the object identity changes only when a
802
+ * value actually changed).
803
+ */
804
+ setPreferences(patch: Partial<EditorPreferences>): void;
805
+ /**
806
+ * Clear the `locked` flag on every locked element (one undo step).
807
+ * The canvas menu's "Unlock all"; no-op when nothing is locked.
808
+ */
809
+ unlockAll(): void;
810
+ /** The document's saved start view, or `null` when none is set. */
811
+ get startView(): StartView | null;
812
+ /**
813
+ * Save the current camera (pan + zoom) as the document's start view —
814
+ * where the document opens and where {@link goToStartView} jumps.
815
+ * Persists in the viewport (exported with the scene), not in history.
816
+ */
817
+ setCurrentViewAsStart(): void;
818
+ /** Forget the saved start view. No-op when none is set. */
819
+ clearStartView(): void;
820
+ /** Move the camera to the saved start view. No-op when none is set. */
821
+ goToStartView(): void;
775
822
  /** All currently-selected link (connector) ids. */
776
823
  get selectedLinks(): LinkSelection.LinkSelection;
777
824
  /**
@@ -797,6 +844,8 @@ export declare class Editor {
797
844
  registerFileDropHandler(handler: FileDropHandler): void;
798
845
  /** Drop a registered handler. */
799
846
  unregisterFileDropHandler(id: string): void;
847
+ /** Registered file-drop handlers, in dispatch order — the drop overlay lists the labelled ones. */
848
+ getFileDropHandlers(): readonly FileDropHandler[];
800
849
  /**
801
850
  * Dispatch a dropped file (or pasted file from clipboard) into
802
851
  * the registered handlers. Returns `true` when a handler accepted
@@ -819,6 +868,24 @@ export declare class Editor {
819
868
  * toolbar buttons and hotkeys reach it through the action registry.
820
869
  * Records the outgoing tool in `activeTool.lastActiveTool`.
821
870
  */
871
+ /**
872
+ * Shape kind the next rubber-band draw creates while `draw-rect` is
873
+ * armed (the "Shapes and lines" flyout arms diamond / triangle through
874
+ * the same mode). Reset to "rect" on every tool switch so hotkeys and
875
+ * plain toolbar buttons keep their stock behaviour.
876
+ */
877
+ private _drawShapeKind;
878
+ get drawShapeKind(): DrawShapeKind;
879
+ /**
880
+ * Connector preset for NEW links drawn in `draw-edge` mode (see
881
+ * `LINK_DRAW_PRESETS`); `null` = stock defaults. Reset on tool switch.
882
+ */
883
+ private _linkDrawPreset;
884
+ get linkDrawPreset(): LinkDrawPreset | null;
885
+ /** Arm the shape-drawing tool for `kind` (the flyout's shape rows). */
886
+ armShapeTool(kind: DrawShapeKind): void;
887
+ /** Arm the connector tool with a line preset (the flyout's line rows). */
888
+ armLineTool(preset: LinkDrawPreset): void;
822
889
  setActiveTool(mode: Mode): void;
823
890
  /** Undo the latest record. No-op if there is nothing to undo. */
824
891
  undo(): boolean;
@@ -894,6 +961,14 @@ export declare class Editor {
894
961
  * Pass `null` when the pointer leaves all shapes.
895
962
  */
896
963
  hoverAnimatedElement(id: ElementId | null): void;
964
+ /**
965
+ * Sticky under the idle cursor (its render bounds, so the reaction row
966
+ * below the card counts too) — drives the canvas-drawn hover-only "+"
967
+ * add-reaction button. Set by the pointer-move path; `null` clears.
968
+ */
969
+ private _hoveredStickyId;
970
+ get hoveredStickyId(): ElementId | null;
971
+ setHoveredSticky(id: ElementId | null): void;
897
972
  /** True when the shape's GIF is paused (drives the overlay badge). */
898
973
  isPlaybackPaused(id: ElementId): boolean;
899
974
  /**
@@ -1027,15 +1102,7 @@ export declare class Editor {
1027
1102
  * Returns `null` when not editing. The caret is `null` while blinked
1028
1103
  * off so the overlay can simply skip drawing it.
1029
1104
  */
1030
- editingTextOverlay(): {
1031
- caret: {
1032
- x: number;
1033
- y: number;
1034
- height: number;
1035
- } | null;
1036
- caretColor: string;
1037
- selectionRects: readonly Bounds[];
1038
- } | null;
1105
+ editingTextOverlay(): EditingTextOverlay | null;
1039
1106
  commitTextEdit(next?: string): void;
1040
1107
  cancelTextEdit(): void;
1041
1108
  /**
@@ -1064,6 +1131,11 @@ export declare class Editor {
1064
1131
  * the tool is locked.
1065
1132
  */
1066
1133
  createTextAt(worldPoint: Vec2): ElementId;
1134
+ /**
1135
+ * Drop a default sticky note centred on `worldPoint`, select it and open
1136
+ * its inline editor (the canvas menu's "Add sticky note"). One undo step.
1137
+ */
1138
+ createStickyAt(worldPoint: Vec2): ElementId | null;
1067
1139
  /** Current brush paint settings (line colour, fill, opacity, width). */
1068
1140
  private _brushSettings;
1069
1141
  get brushSettings(): BrushSettings;
@@ -1201,6 +1273,14 @@ export declare class Editor {
1201
1273
  * New shapes get fresh ids and end up selected. Single undo step.
1202
1274
  */
1203
1275
  paste(targetWorld?: Vec2): void;
1276
+ /**
1277
+ * Insert a whole scene fragment (an imported diagram — elements, links,
1278
+ * binary files) into the current scene, centred on `targetWorld` (default:
1279
+ * the last pointer position, else the fragment stays where it is). Ids are
1280
+ * remapped, everything lands on the active layer, one undo step; the new
1281
+ * elements become the selection. Returns their ids.
1282
+ */
1283
+ insertScene(fragment: Scene, targetWorld?: Vec2): readonly ElementId[];
1204
1284
  /**
1205
1285
  * Merge `partial` into the `style` of every shape in `ids`. Useful
1206
1286
  * for the inspector / PropertyPanel: flipping `roundness`, swapping
@@ -1236,6 +1316,120 @@ export declare class Editor {
1236
1316
  * inline-edit selection).
1237
1317
  */
1238
1318
  applyTextStyleToRange(id: ElementId, from: number, to: number, partial: Partial<TextStyle>): void;
1319
+ /**
1320
+ * Merge a partial text style into the embedded label's style on every
1321
+ * shape in `ids` that carries a label. One undo step. The counterpart
1322
+ * of `updateStyle` for shape labels (which must not collide with the
1323
+ * shape body's own fill / stroke).
1324
+ */
1325
+ updateLabelStyle(ids: Iterable<ElementId>, partial: Partial<TextStyle>): void;
1326
+ /**
1327
+ * Text-carrier routing for mixed selections: merge a partial text style
1328
+ * into the element style of text elements and into the label style of
1329
+ * labelable shapes (seeding the label when missing); other elements are
1330
+ * skipped. One undo step. The selection toolbar writes through this so a
1331
+ * shape + text selection shares one text-colour / decoration control
1332
+ * instead of choosing between `updateStyle` and `updateLabelStyle`.
1333
+ */
1334
+ updateTextStyle(ids: Iterable<ElementId>, partial: Partial<TextStyle>): void;
1335
+ /**
1336
+ * Merge font family / size into the embedded label. Picking an
1337
+ * explicit `fontSize` also leaves auto-fit mode (reference behaviour —
1338
+ * a concrete size wins over the automatic one). One undo step.
1339
+ */
1340
+ updateLabelProps(ids: Iterable<ElementId>, partial: {
1341
+ readonly fontFamily?: string;
1342
+ readonly fontSize?: number;
1343
+ }): void;
1344
+ /** Toggle auto-fit label sizing (sticky notes). One undo step. */
1345
+ setLabelAutoFit(ids: Iterable<ElementId>, on: boolean): void;
1346
+ /**
1347
+ * Resize sticky notes to a square preset side (`STICKY_SIZE_PRESETS`).
1348
+ * One undo step; non-sticky ids are skipped.
1349
+ */
1350
+ setStickySize(ids: Iterable<ElementId>, side: number): void;
1351
+ /**
1352
+ * Toggle the author-name strip on sticky notes. Turning it on fills a
1353
+ * missing `authorName` from the editor's comment author (the local
1354
+ * user). One undo step.
1355
+ */
1356
+ toggleStickyAuthor(ids: Iterable<ElementId>): void;
1357
+ /** Replace the tag list on sticky notes. One undo step. */
1358
+ setStickyTags(ids: Iterable<ElementId>, tags: readonly string[]): void;
1359
+ /**
1360
+ * Toggle the local user's emoji reaction on a sticky note. A glyph the
1361
+ * user has NOT reacted with gains their reaction (+1); one they
1362
+ * already reacted with loses it (-1, removing the glyph at zero).
1363
+ * Other users' reactions are never touched — so counters only grow
1364
+ * through OTHER collaborators. Plain element data → syncs through the
1365
+ * normal scene channel. One undo step.
1366
+ */
1367
+ toggleStickyReaction(id: ElementId, glyph: string): void;
1368
+ /** Replace an emoji element's glyph (the toolbar picker). One undo step. */
1369
+ setEmojiGlyph(ids: Iterable<ElementId>, glyph: string): void;
1370
+ /**
1371
+ * Resize a frame to one of the `FRAME_SIZE_PRESETS` (top-left corner
1372
+ * stays put; members keep their absolute positions). One undo step.
1373
+ */
1374
+ applyFramePreset(id: ElementId, preset: {
1375
+ width: number;
1376
+ height: number;
1377
+ }): void;
1378
+ /**
1379
+ * Rename the binary file behind an image (the toolbar's file-name
1380
+ * input). One undo step; no-op when the id is unknown or the name is
1381
+ * unchanged.
1382
+ */
1383
+ renameBinaryFile(id: FileId, name: string): void;
1384
+ /** Set (or clear, with `null`) the accessible description on image shapes. */
1385
+ setImageAlt(ids: Iterable<ElementId>, alt: string | null): void;
1386
+ /**
1387
+ * Set (or clear, with `null`) the shape mask on image elements. The
1388
+ * mask clips the drawn box (renderer-side `RenderTarget.clip`);
1389
+ * normalised coordinates make it survive resizes. One undo step.
1390
+ */
1391
+ setImageMask(ids: Iterable<ElementId>, mask: ImageMask | null): void;
1392
+ /**
1393
+ * Apply an aspect preset from the mask picker to image elements.
1394
+ * `"original"` clears crop AND mask and refits the box to the source's
1395
+ * natural aspect; the ratio presets centre-crop the source to the
1396
+ * target aspect and refit the box height (width kept), with `"circle"`
1397
+ * additionally installing an ellipse mask on the square box. The
1398
+ * source's natural aspect derives from the current box + crop (the box
1399
+ * always displays the crop region undistorted), so no live image
1400
+ * handle is needed. One undo step.
1401
+ */
1402
+ setImageAspectPreset(ids: Iterable<ElementId>, preset: ImageAspectPreset): void;
1403
+ /**
1404
+ * Swap a media shape's backing file for `blob` while keeping its
1405
+ * position and width (height refits to the new aspect). Accepts static
1406
+ * images, GIFs and videos — the shape's animation fields are rewritten
1407
+ * to match the NEW media kind, and `crop` resets when the media kind
1408
+ * changes (its pixel rect targeted the old content). Registers the new
1409
+ * `BinaryFile`, points the shape at it, drops the stale live handle
1410
+ * (`metadata.image`) and rebuilds handles for the new bytes. One undo
1411
+ * step.
1412
+ */
1413
+ replaceImageFile(id: ElementId, blob: Blob, name?: string): Promise<void>;
1414
+ /**
1415
+ * Paragraph targets for the list operations: while inline-editing one
1416
+ * of `ids`, only the paragraphs covered by the caret / selection;
1417
+ * otherwise every paragraph of each text element. Returns `null` for
1418
+ * non-text ids.
1419
+ */
1420
+ private paragraphTargets;
1421
+ /**
1422
+ * Set (or clear, with `null`) the list kind on the targeted paragraphs
1423
+ * of every text element in `ids` — the inline-edit selection's
1424
+ * paragraphs while editing, the whole element otherwise. One undo step.
1425
+ */
1426
+ setParagraphList(ids: Iterable<ElementId>, kind: "bullet" | "numbered" | null): void;
1427
+ /**
1428
+ * Shift the targeted paragraphs' list nesting by `delta` (±1), clamped
1429
+ * to `[0, MAX_LIST_INDENT]`. Same targeting rules as
1430
+ * {@link setParagraphList}. One undo step.
1431
+ */
1432
+ indentParagraphs(ids: Iterable<ElementId>, delta: 1 | -1): void;
1239
1433
  /**
1240
1434
  * The fill (or stroke, per `role`) colour of the top-most shape under the
1241
1435
  * world point, or `null` on empty canvas. Pure read — no mutation.
@@ -1402,8 +1596,11 @@ export declare class Editor {
1402
1596
  private cropGhost;
1403
1597
  /**
1404
1598
  * Update non-style text properties (`fontSize`, `fontFamily`,
1405
- * `maxWidth`) on every selected text shape. Non-text shapes are
1406
- * skipped. Single undo step. Used by the text contextual panel.
1599
+ * `maxWidth`) on every text shape in `ids`; labelable shapes route
1600
+ * `fontSize` / `fontFamily` to their embedded label instead (as
1601
+ * `updateLabelProps` — an explicit size leaves auto-fit). Anything else is
1602
+ * skipped. Single undo step. Used by the selection toolbar, so a mixed
1603
+ * text + shape selection shares one font control.
1407
1604
  */
1408
1605
  updateTextProps(ids: Iterable<ElementId>, partial: {
1409
1606
  fontSize?: number;
@@ -1473,6 +1670,13 @@ export declare class Editor {
1473
1670
  * rotate gesture drives the same maths from a press-time snapshot.
1474
1671
  */
1475
1672
  rotateSelection(delta: number): void;
1673
+ /**
1674
+ * Straighten the selection: every selected element (and descendants of
1675
+ * selected groups) goes back to `rotation: 0`, each turning about its own
1676
+ * centre so it stays where it is. One undoable step; no-op when nothing
1677
+ * is rotated. Triggered by a double-click on the rotate grip.
1678
+ */
1679
+ resetSelectionRotation(): void;
1476
1680
  /** Apply a batch of arrange patches as a single undoable step. */
1477
1681
  private commitArrange;
1478
1682
  compactLayerZOrder(layerId?: LayerId, options?: {
@@ -1504,6 +1708,11 @@ export declare class Editor {
1504
1708
  zoomIn(): void;
1505
1709
  zoomOut(): void;
1506
1710
  private zoomStep;
1711
+ /**
1712
+ * Set an absolute zoom level (1 = 100%), scaling about the viewport
1713
+ * centre and clamped to `MIN_ZOOM..MAX_ZOOM`. The zoom menu's presets.
1714
+ */
1715
+ setZoom(level: number): void;
1507
1716
  resetZoom(): void;
1508
1717
  zoomToFit(padding?: number): void;
1509
1718
  /** Fit the camera to the current selection (standard `⌥2`). No-op when empty. */
@@ -1515,6 +1724,14 @@ export declare class Editor {
1515
1724
  * fit an oversized match. No-op when the selection is empty.
1516
1725
  */
1517
1726
  revealSelection(padding?: number): void;
1727
+ /**
1728
+ * "Back to content": jump to the element nearest the camera centre, keeping
1729
+ * the current zoom (it only drops when that element doesn't fit). Unlike
1730
+ * {@link zoomToFit} this neither shrinks a large board to a speck nor blows
1731
+ * a single small shape up to full screen. Groups are skipped (their own
1732
+ * bounds are empty — their children count). No-op on an empty scene.
1733
+ */
1734
+ revealNearestContent(padding?: number): void;
1518
1735
  /**
1519
1736
  * Select the nearest interactable top-level element in `direction` from the
1520
1737
  * current selection's centre (or the viewport centre when nothing is
@@ -1559,6 +1776,47 @@ export declare class Editor {
1559
1776
  private snapActive;
1560
1777
  /** World-unit spacing the current gesture snaps to. */
1561
1778
  private snapSpacing;
1779
+ /**
1780
+ * Object snapping is a per-user preference; the suppress modifier
1781
+ * (Cmd/Ctrl) bypasses it for the current gesture like grid snapping.
1782
+ */
1783
+ private objectSnapActive;
1784
+ private sizeSuggestActive;
1785
+ /**
1786
+ * World AABBs of the shapes a gesture may snap to (reference rules): every
1787
+ * visible element on screen that is not being moved / resized, except
1788
+ * groups (no geometry of their own), brush strokes (freehand ink is never
1789
+ * a snap target), shapes rotated off the 90° grid, and shapes too small on
1790
+ * screen (`OBJECT_SNAP_MIN_SIZE_PX`). Returns nothing on a crowded view
1791
+ * (`OBJECT_SNAP_MAX_CANDIDATES`) so a huge board never stalls a drag.
1792
+ */
1793
+ private snapCandidates;
1794
+ /** Brush strokes never snap (as movers or targets) — freehand ink has no meaningful edges. */
1795
+ private snapsAsMover;
1796
+ /**
1797
+ * Move-delta snapping: object snapping (edges / centres of nearby shapes)
1798
+ * wins when it lands; otherwise grid snapping. Records the guides for the
1799
+ * overlay either way.
1800
+ */
1801
+ private snapMoveDeltaFor;
1802
+ /**
1803
+ * Group move: the press-time union AABB of the members (each member's
1804
+ * current geometry at its press-time position; brush strokes excluded)
1805
+ * snaps to nearby shapes by its frame EDGES only — a multi-selection has
1806
+ * no centre line, like the reference. Falls back to the grid
1807
+ * reference-point snap.
1808
+ */
1809
+ private snapGroupMoveDelta;
1810
+ /** Resize-delta counterpart of {@link snapMoveDeltaFor}; also sets `sizeMatch`. */
1811
+ private snapResizeDeltaFor;
1812
+ /** Publish the `W × H` readout for `bounds` when the preference is on. */
1813
+ private setSizeReadout;
1814
+ /** Alignment guides of the current gesture tick (object snapping). */
1815
+ get snapGuides(): readonly SnapGuide[];
1816
+ /** `W × H` readout of the shape being resized, when `showObjectSize` is on. */
1817
+ get sizeReadout(): SizeReadout | null;
1818
+ /** Bounds of the shape whose size the current resize matched, if any. */
1819
+ get sizeMatch(): SizeMatch | null;
1562
1820
  /**
1563
1821
  * Replace the entire scene (e.g. after `parseScene`). Clears history,
1564
1822
  * selection and any open gesture. Use to load a saved document.
@@ -1583,6 +1841,17 @@ export declare class Editor {
1583
1841
  */
1584
1842
  endPanGesture(): void;
1585
1843
  isDrawingPhase(ctx: InteractionContext): boolean;
1844
+ /**
1845
+ * Context press (right-click / touch long-press): first make the selection
1846
+ * match what was pressed, then notify the `onLongPress` listeners so the
1847
+ * menu they open describes that point.
1848
+ * - On an unselected element / link → it becomes the selection.
1849
+ * - On a selected element (or its chrome: handles, rotate grip) → keep.
1850
+ * - On empty canvas → clear elements + links, so the menu is the canvas
1851
+ * menu rather than the previous selection's.
1852
+ */
1853
+ private fireContextPress;
1854
+ private routeContextPress;
1586
1855
  startLongPress(screenPoint: Vec2): void;
1587
1856
  cancelLongPress(): void;
1588
1857
  beginPinch(): void;
@@ -1648,6 +1917,21 @@ export declare class Editor {
1648
1917
  * can't be moved or resized.
1649
1918
  */
1650
1919
  toggleLockSelection(): void;
1920
+ /**
1921
+ * Topmost locked (own or inherited `locked`) shape at `worldPoint`, on a
1922
+ * visible, unlocked layer. Locked shapes are click-through for normal
1923
+ * interaction, so this is the dedicated lookup for affordances that must
1924
+ * still find them — the context menu's Unlock entry.
1925
+ */
1926
+ lockedElementAt(worldPoint: Vec2): Element | null;
1927
+ /**
1928
+ * Clear the `locked` flag on the shape that carries it. When the flag
1929
+ * lives on an ancestor (group lock propagation), the closest locked
1930
+ * ancestor is unlocked instead, so the whole locked unit is released.
1931
+ * Selects the unlocked shape afterwards — the natural next step after
1932
+ * an unlock is editing it. One undo step.
1933
+ */
1934
+ unlockElement(id: ElementId): void;
1651
1935
  /**
1652
1936
  * Promote a hit shape to the topmost ancestor whose group we have NOT
1653
1937
  * "entered" yet. Only **`group`**-typed parents promote — containers
@@ -1736,7 +2020,7 @@ export declare class Editor {
1736
2020
  * scene-identity. Scene operations replace `_scene` (immutable patches),
1737
2021
  * so reference-equality is a sufficient invalidation signal.
1738
2022
  */
1739
- acceleratedElementAt(worldPoint: Vec2): Element | undefined;
2023
+ acceleratedElementAt(worldPoint: Vec2, accept?: (shape: Element) => boolean): Element | undefined;
1740
2024
  /**
1741
2025
  * Build (or return the cached) `SpatialGrid` for the current scene.
1742
2026
  * Re-built only when `_scene` reference changes — scene operations
@@ -1855,6 +2139,15 @@ export declare class Editor {
1855
2139
  private applyRotate;
1856
2140
  private applyGroupResize;
1857
2141
  private applyResize;
2142
+ /** World AABB of `id` after a resize tick (null when the shape is gone). */
2143
+ private resizedBounds;
2144
+ /**
2145
+ * Snap freshly-drawn bounds onto the grid when snapping is active.
2146
+ * Shared by the live rubber-band preview and the final CREATE so the
2147
+ * preview shows exactly where the shape will land (parity with how
2148
+ * move / resize snap live during the gesture).
2149
+ */
2150
+ snapCreateBoundsIfActive(bounds: Bounds): Bounds;
1858
2151
  private applyCreate;
1859
2152
  /** Generate the next "Frame N" name based on existing frames. */
1860
2153
  private nextFrameName;
@@ -2054,6 +2347,13 @@ export declare class Editor {
2054
2347
  * into a single render per frame.
2055
2348
  */
2056
2349
  private renderRafId;
2350
+ /**
2351
+ * Set by {@link dispose}. Render scheduling bails out when set:
2352
+ * async completions (image decode, font load, wasm init) can resolve
2353
+ * after the host tears the editor down (e.g. a runtime backend
2354
+ * switch) and must not paint onto disposed render targets.
2355
+ */
2356
+ private disposed;
2057
2357
  /** Unsubscribe for the animation-content-ready listener (decode → re-render). */
2058
2358
  private animationContentOff;
2059
2359
  /**