@tldraw/editor 5.2.0-canary.4f74e5daafbd → 5.2.0-canary.4f92f5a74345

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 (195) hide show
  1. package/README.md +7 -1
  2. package/dist-cjs/index.d.ts +160 -65
  3. package/dist-cjs/index.js +9 -8
  4. package/dist-cjs/index.js.map +2 -2
  5. package/dist-cjs/lib/components/MenuClickCapture.js +8 -5
  6. package/dist-cjs/lib/components/MenuClickCapture.js.map +2 -2
  7. package/dist-cjs/lib/components/Shape.js +47 -1
  8. package/dist-cjs/lib/components/Shape.js.map +3 -3
  9. package/dist-cjs/lib/components/default-components/DefaultCanvas.js +1 -16
  10. package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
  11. package/dist-cjs/lib/editor/Editor.js +132 -58
  12. package/dist-cjs/lib/editor/Editor.js.map +3 -3
  13. package/dist-cjs/lib/editor/managers/ClickManager/ClickManager.js +8 -58
  14. package/dist-cjs/lib/editor/managers/ClickManager/ClickManager.js.map +2 -2
  15. package/dist-cjs/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.js +3 -3
  16. package/dist-cjs/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.js.map +2 -2
  17. package/dist-cjs/lib/editor/managers/EditorManager.js +52 -0
  18. package/dist-cjs/lib/editor/managers/EditorManager.js.map +7 -0
  19. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js +10 -13
  20. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js.map +2 -2
  21. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js +28 -4
  22. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +3 -3
  23. package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js +24 -2
  24. package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js.map +2 -2
  25. package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js +12 -5
  26. package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js.map +2 -2
  27. package/dist-cjs/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.js +4 -2
  28. package/dist-cjs/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.js.map +2 -2
  29. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js +31 -22
  30. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +2 -2
  31. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js +4 -8
  32. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +2 -2
  33. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js +15 -2
  34. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +2 -2
  35. package/dist-cjs/lib/editor/overlays/strokeShapeIndicators.js +79 -0
  36. package/dist-cjs/lib/editor/overlays/strokeShapeIndicators.js.map +7 -0
  37. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  38. package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js +4 -0
  39. package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js.map +2 -2
  40. package/dist-cjs/lib/editor/tools/StateNode.js.map +2 -2
  41. package/dist-cjs/lib/{hooks/useTransform.js → editor/tools/cancelShapeCreationOnLongPress.js} +8 -23
  42. package/dist-cjs/lib/editor/tools/cancelShapeCreationOnLongPress.js.map +7 -0
  43. package/dist-cjs/lib/editor/types/event-types.js +0 -2
  44. package/dist-cjs/lib/editor/types/event-types.js.map +2 -2
  45. package/dist-cjs/lib/globals/environment.js +6 -1
  46. package/dist-cjs/lib/globals/environment.js.map +2 -2
  47. package/dist-cjs/lib/hooks/EditorComponentsContext.js.map +2 -2
  48. package/dist-cjs/lib/hooks/useCanvasEvents.js +17 -8
  49. package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
  50. package/dist-cjs/lib/hooks/useEditorComponents.js +0 -1
  51. package/dist-cjs/lib/hooks/useEditorComponents.js.map +2 -2
  52. package/dist-cjs/lib/hooks/usePresence.js.map +2 -2
  53. package/dist-cjs/lib/hooks/useScreenBounds.js +1 -0
  54. package/dist-cjs/lib/hooks/useScreenBounds.js.map +2 -2
  55. package/dist-cjs/lib/license/LicenseManager.js +5 -1
  56. package/dist-cjs/lib/license/LicenseManager.js.map +2 -2
  57. package/dist-cjs/lib/primitives/Vec.js +3 -2
  58. package/dist-cjs/lib/primitives/Vec.js.map +2 -2
  59. package/dist-cjs/lib/utils/dom.js +12 -0
  60. package/dist-cjs/lib/utils/dom.js.map +2 -2
  61. package/dist-cjs/lib/utils/getPointerInfo.js +2 -1
  62. package/dist-cjs/lib/utils/getPointerInfo.js.map +2 -2
  63. package/dist-cjs/lib/utils/pointer.js +37 -0
  64. package/dist-cjs/lib/utils/pointer.js.map +7 -0
  65. package/dist-cjs/version.js +3 -3
  66. package/dist-cjs/version.js.map +1 -1
  67. package/dist-esm/index.d.mts +160 -65
  68. package/dist-esm/index.mjs +11 -13
  69. package/dist-esm/index.mjs.map +2 -2
  70. package/dist-esm/lib/components/MenuClickCapture.mjs +8 -5
  71. package/dist-esm/lib/components/MenuClickCapture.mjs.map +2 -2
  72. package/dist-esm/lib/components/Shape.mjs +48 -2
  73. package/dist-esm/lib/components/Shape.mjs.map +3 -3
  74. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +1 -16
  75. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
  76. package/dist-esm/lib/editor/Editor.mjs +132 -58
  77. package/dist-esm/lib/editor/Editor.mjs.map +3 -3
  78. package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs +8 -58
  79. package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs.map +2 -2
  80. package/dist-esm/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.mjs +3 -3
  81. package/dist-esm/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.mjs.map +2 -2
  82. package/dist-esm/lib/editor/managers/EditorManager.mjs +32 -0
  83. package/dist-esm/lib/editor/managers/EditorManager.mjs.map +7 -0
  84. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs +10 -13
  85. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs.map +2 -2
  86. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs +28 -4
  87. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +3 -3
  88. package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs +24 -2
  89. package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs.map +2 -2
  90. package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs +12 -5
  91. package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs.map +2 -2
  92. package/dist-esm/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.mjs +4 -2
  93. package/dist-esm/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.mjs.map +2 -2
  94. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs +31 -22
  95. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +2 -2
  96. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs +4 -8
  97. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +2 -2
  98. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs +15 -2
  99. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +2 -2
  100. package/dist-esm/lib/editor/overlays/strokeShapeIndicators.mjs +59 -0
  101. package/dist-esm/lib/editor/overlays/strokeShapeIndicators.mjs.map +7 -0
  102. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  103. package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs +4 -0
  104. package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs.map +2 -2
  105. package/dist-esm/lib/editor/tools/StateNode.mjs.map +2 -2
  106. package/dist-esm/lib/editor/tools/cancelShapeCreationOnLongPress.mjs +8 -0
  107. package/dist-esm/lib/editor/tools/cancelShapeCreationOnLongPress.mjs.map +7 -0
  108. package/dist-esm/lib/editor/types/event-types.mjs +0 -2
  109. package/dist-esm/lib/editor/types/event-types.mjs.map +2 -2
  110. package/dist-esm/lib/globals/environment.mjs +6 -1
  111. package/dist-esm/lib/globals/environment.mjs.map +2 -2
  112. package/dist-esm/lib/hooks/EditorComponentsContext.mjs.map +2 -2
  113. package/dist-esm/lib/hooks/useCanvasEvents.mjs +17 -8
  114. package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
  115. package/dist-esm/lib/hooks/useEditorComponents.mjs +0 -1
  116. package/dist-esm/lib/hooks/useEditorComponents.mjs.map +2 -2
  117. package/dist-esm/lib/hooks/usePresence.mjs.map +2 -2
  118. package/dist-esm/lib/hooks/useScreenBounds.mjs +1 -0
  119. package/dist-esm/lib/hooks/useScreenBounds.mjs.map +2 -2
  120. package/dist-esm/lib/license/LicenseManager.mjs +5 -1
  121. package/dist-esm/lib/license/LicenseManager.mjs.map +2 -2
  122. package/dist-esm/lib/primitives/Vec.mjs +3 -2
  123. package/dist-esm/lib/primitives/Vec.mjs.map +2 -2
  124. package/dist-esm/lib/utils/dom.mjs +12 -0
  125. package/dist-esm/lib/utils/dom.mjs.map +2 -2
  126. package/dist-esm/lib/utils/getPointerInfo.mjs +2 -1
  127. package/dist-esm/lib/utils/getPointerInfo.mjs.map +2 -2
  128. package/dist-esm/lib/utils/pointer.mjs +17 -0
  129. package/dist-esm/lib/utils/pointer.mjs.map +7 -0
  130. package/dist-esm/version.mjs +3 -3
  131. package/dist-esm/version.mjs.map +1 -1
  132. package/editor.css +15 -3
  133. package/package.json +11 -8
  134. package/src/index.ts +5 -10
  135. package/src/lib/components/MenuClickCapture.tsx +8 -4
  136. package/src/lib/components/Shape.tsx +88 -1
  137. package/src/lib/components/default-components/DefaultCanvas.tsx +1 -17
  138. package/src/lib/editor/Editor.test.ts +36 -0
  139. package/src/lib/editor/Editor.ts +205 -76
  140. package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +54 -74
  141. package/src/lib/editor/managers/ClickManager/ClickManager.ts +15 -65
  142. package/src/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.test.ts +43 -16
  143. package/src/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.ts +8 -5
  144. package/src/lib/editor/managers/EditorManager.test.ts +51 -0
  145. package/src/lib/editor/managers/EditorManager.ts +60 -0
  146. package/src/lib/editor/managers/FocusManager/FocusManager.test.ts +6 -5
  147. package/src/lib/editor/managers/FocusManager/FocusManager.ts +11 -16
  148. package/src/lib/editor/managers/FontManager/FontManager.test.ts +37 -10
  149. package/src/lib/editor/managers/FontManager/FontManager.ts +46 -1
  150. package/src/lib/editor/managers/HistoryManager/HistoryManager.test.ts +32 -0
  151. package/src/lib/editor/managers/HistoryManager/HistoryManager.ts +34 -4
  152. package/src/lib/editor/managers/InputsManager/InputsManager.test.ts +61 -0
  153. package/src/lib/editor/managers/InputsManager/InputsManager.ts +13 -4
  154. package/src/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.ts +9 -2
  155. package/src/lib/editor/managers/TextManager/TextManager.test.ts +77 -15
  156. package/src/lib/editor/managers/TextManager/TextManager.ts +50 -21
  157. package/src/lib/editor/managers/TickManager/TickManager.test.ts +0 -50
  158. package/src/lib/editor/managers/TickManager/TickManager.ts +5 -7
  159. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +12 -2
  160. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.ts +27 -2
  161. package/src/lib/editor/overlays/strokeShapeIndicators.ts +86 -0
  162. package/src/lib/editor/shapes/ShapeUtil.ts +41 -0
  163. package/src/lib/editor/tools/BaseBoxShapeTool/children/Pointing.ts +5 -0
  164. package/src/lib/editor/tools/StateNode.ts +0 -2
  165. package/src/lib/editor/tools/cancelShapeCreationOnLongPress.ts +31 -0
  166. package/src/lib/editor/types/event-types.ts +9 -6
  167. package/src/lib/globals/environment.ts +7 -0
  168. package/src/lib/hooks/EditorComponentsContext.tsx +0 -2
  169. package/src/lib/hooks/useCanvasEvents.ts +24 -12
  170. package/src/lib/hooks/useEditorComponents.tsx +0 -1
  171. package/src/lib/hooks/usePresence.ts +2 -2
  172. package/src/lib/hooks/useScreenBounds.ts +3 -0
  173. package/src/lib/license/LicenseManager.test.ts +24 -16
  174. package/src/lib/license/LicenseManager.ts +8 -2
  175. package/src/lib/primitives/Vec.ts +5 -2
  176. package/src/lib/test/ContentElementSlot.test.tsx +201 -0
  177. package/src/lib/utils/dom.ts +34 -0
  178. package/src/lib/utils/getPointerInfo.ts +2 -1
  179. package/src/lib/utils/pointer.test.ts +76 -0
  180. package/src/lib/utils/pointer.ts +42 -0
  181. package/src/version.ts +3 -3
  182. package/dist-cjs/lib/components/default-components/DefaultSelectionBackground.js +0 -49
  183. package/dist-cjs/lib/components/default-components/DefaultSelectionBackground.js.map +0 -7
  184. package/dist-cjs/lib/editor/overlays/ShapeIndicatorOverlayUtil.js +0 -161
  185. package/dist-cjs/lib/editor/overlays/ShapeIndicatorOverlayUtil.js.map +0 -7
  186. package/dist-cjs/lib/hooks/useTransform.js.map +0 -7
  187. package/dist-esm/lib/components/default-components/DefaultSelectionBackground.mjs +0 -19
  188. package/dist-esm/lib/components/default-components/DefaultSelectionBackground.mjs.map +0 -7
  189. package/dist-esm/lib/editor/overlays/ShapeIndicatorOverlayUtil.mjs +0 -141
  190. package/dist-esm/lib/editor/overlays/ShapeIndicatorOverlayUtil.mjs.map +0 -7
  191. package/dist-esm/lib/hooks/useTransform.mjs +0 -23
  192. package/dist-esm/lib/hooks/useTransform.mjs.map +0 -7
  193. package/src/lib/components/default-components/DefaultSelectionBackground.tsx +0 -25
  194. package/src/lib/editor/overlays/ShapeIndicatorOverlayUtil.ts +0 -216
  195. package/src/lib/hooks/useTransform.ts +0 -30
package/README.md CHANGED
@@ -4,6 +4,12 @@ The core editor and composable parts for tldraw. [Click here](https://tldraw.dev
4
4
 
5
5
  You might be more interested in the general package [tldraw](https://github.com/tldraw/tldraw/tree/main/packages/tldraw) instead of using this package directly.
6
6
 
7
+ ## Documentation
8
+
9
+ Documentation for the most recent release can be found on [tldraw.dev/docs](https://tldraw.dev/docs), including [reference docs](https://tldraw.dev/reference/editor/Editor). Our release notes can be found [here](https://tldraw.dev/releases).
10
+
11
+ For more agent-friendly docs, see our [LLMs.txt](https://tldraw.dev/llms.txt).
12
+
7
13
  ## License
8
14
 
9
15
  This project is part of the tldraw SDK. It is provided under the [tldraw SDK license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md).
@@ -20,7 +26,7 @@ You can find tldraw on npm [here](https://www.npmjs.com/package/@tldraw/tldraw?a
20
26
 
21
27
  ## Contribution
22
28
 
23
- Please see our [contributing guide](https://github.com/tldraw/tldraw/blob/main/CONTRIBUTING.md). Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
29
+ Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
24
30
 
25
31
  ## Community
26
32
 
@@ -89,6 +89,7 @@ import { TLUnknownAsset } from '@tldraw/tlschema';
89
89
  import { TLUnknownBinding } from '@tldraw/tlschema';
90
90
  import { TLUnknownShape } from '@tldraw/tlschema';
91
91
  import { TLUser } from '@tldraw/tlschema';
92
+ import { TLUserId } from '@tldraw/tlschema';
92
93
  import { TLUserStore } from '@tldraw/tlschema';
93
94
  import { TLVideoAsset } from '@tldraw/tlschema';
94
95
  import { UnknownRecord } from '@tldraw/store';
@@ -646,6 +647,8 @@ export declare class Box {
646
647
  /** @public */
647
648
  export declare type BoxLike = Box | BoxModel;
648
649
 
650
+ /* Excluded from this release type: cancelShapeCreationOnLongPress */
651
+
649
652
  /**
650
653
  * @param a - Any angle in radians
651
654
  * @returns A number between 0 and 2 * PI
@@ -746,6 +749,7 @@ export declare class ClickManager {
746
749
  private _clickTimeout?;
747
750
  private _clickScreenPoint?;
748
751
  private _previousScreenPoint?;
752
+ private _isPressingWhilePending;
749
753
  _getClickTimeout(state: TLClickState, id?: string): void;
750
754
  /* Excluded from this release type: _clickState */
751
755
  /**
@@ -984,9 +988,6 @@ export declare const DefaultErrorFallback: TLErrorFallbackComponent;
984
988
  /** @public @react */
985
989
  export declare function DefaultGrid({ x, y, z, size }: TLGridProps): JSX.Element;
986
990
 
987
- /** @public @react */
988
- export declare function DefaultSelectionBackground({ bounds, rotation }: TLSelectionBackgroundProps): JSX.Element;
989
-
990
991
  /** @public @react */
991
992
  export declare const DefaultShapeWrapper: ForwardRefExoticComponent<TLShapeWrapperProps & RefAttributes<HTMLDivElement>>;
992
993
 
@@ -1575,6 +1576,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1575
1576
  */
1576
1577
  markHistoryStoppingPoint(name?: string): string;
1577
1578
  /* Excluded from this release type: getMarkIdMatching */
1579
+ /* Excluded from this release type: isReplayingHistory */
1578
1580
  /**
1579
1581
  * Coalesces all changes since the given mark into a single change, removing any intermediate marks.
1580
1582
  *
@@ -2455,7 +2457,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2455
2457
  * @param opts - The camera move options.
2456
2458
  * @public
2457
2459
  */
2458
- zoomToUser(userId: string, opts?: TLCameraMoveOptions): this;
2460
+ zoomToUser(userId: TLUserId, opts?: TLCameraMoveOptions): this;
2459
2461
  /* Excluded from this release type: _willSetInitialBounds */
2460
2462
  /**
2461
2463
  * Update the viewport. The viewport will measure the size and screen position of its container
@@ -2608,7 +2610,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2608
2610
  *
2609
2611
  * @public
2610
2612
  */
2611
- startFollowingUser(userId: string): this;
2613
+ startFollowingUser(userId: TLUserId): this;
2612
2614
  /**
2613
2615
  * Stop viewport-following a user.
2614
2616
  *
@@ -3719,6 +3721,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3719
3721
  * @public
3720
3722
  */
3721
3723
  resizeShape(shape: TLShape | TLShapeId, scale: VecLike, opts?: TLResizeShapeOptions): this;
3724
+ /* Excluded from this release type: getResizeShapePartial */
3722
3725
  /* Excluded from this release type: _scalePagePoint */
3723
3726
  /* Excluded from this release type: _resizeUnalignedShape */
3724
3727
  /**
@@ -4444,6 +4447,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
4444
4447
  /* Excluded from this release type: _restoreToolId */
4445
4448
  /* Excluded from this release type: _didPinch */
4446
4449
  /* Excluded from this release type: _selectedShapeIdsAtPointerDown */
4450
+ /* Excluded from this release type: _didCaptureSelectionAtPointerDown */
4447
4451
  /* Excluded from this release type: _longPressTimeout */
4448
4452
  /* Excluded from this release type: capturedPointerId */
4449
4453
  /* Excluded from this release type: performanceTracker */
@@ -4515,6 +4519,48 @@ export declare class EditorAtom<T> {
4515
4519
  /** @public */
4516
4520
  export declare const EditorContext: React_3.Context<Editor | null>;
4517
4521
 
4522
+ /**
4523
+ * Base class for editor-attached managers that need to clean up after themselves.
4524
+ *
4525
+ * Extending `EditorManager` gives a manager one consistent teardown contract: register
4526
+ * anything that needs undoing, and it runs automatically on `dispose()`. This keeps
4527
+ * subscription lifecycle symmetric — whatever sets a thing up is what tears it down — so
4528
+ * it can't be forgotten (the failure mode behind the strict-mode camera bug, #8892).
4529
+ *
4530
+ * Register cleanup by what you're creating:
4531
+ *
4532
+ * - Editor bus event (`tick`, `frame`, `change`, …): {@link EditorManager.addEditorEvent}
4533
+ * - Store side effect (`editor.sideEffects.register…`): `this.register(disposer)`
4534
+ * - Reaction (`react(...)` from `@tldraw/state`): `this.register(react(...))`
4535
+ * - DOM listener: `this.register(() => el.removeEventListener(...))`
4536
+ * - Other resource (cache, index, child manager): `this.register(() => x.dispose())`
4537
+ *
4538
+ * For timeouts, intervals, and animation frames prefer `editor.timers` (context-grouped
4539
+ * and auto-disposed) over raw `setTimeout`. For cleanup on the editor itself rather than a
4540
+ * manager, use `editor.disposables`.
4541
+ *
4542
+ * If a manager needs ordered teardown (e.g. pause a loop before cancelling it), override
4543
+ * `dispose()` and call `super.dispose()` last — see `TickManager`.
4544
+ *
4545
+ * @public
4546
+ */
4547
+ export declare abstract class EditorManager {
4548
+ protected readonly editor: Editor;
4549
+ protected readonly disposables: Set<() => void>;
4550
+ constructor(editor: Editor);
4551
+ /**
4552
+ * Register a teardown function to run on `dispose()`. The universal way for a manager to
4553
+ * make a resource "see itself out". Returns the same function for convenience.
4554
+ */
4555
+ protected register(dispose: () => void): () => void;
4556
+ /**
4557
+ * Subscribe to an editor bus event and register the matching unsubscribe, so the listener
4558
+ * is removed automatically on `dispose()`.
4559
+ */
4560
+ protected addEditorEvent<E extends keyof TLEventMap>(event: E, fn: (...args: TLEventMap[E]) => void): void;
4561
+ /* Excluded from this release type: dispose */
4562
+ }
4563
+
4518
4564
  /** @public @react */
4519
4565
  export declare function EditorProvider({ editor, children }: EditorProviderProps): JSX.Element;
4520
4566
 
@@ -5007,6 +5053,8 @@ export declare class HistoryManager<R extends UnknownRecord> {
5007
5053
  private flushPendingDiff;
5008
5054
  getNumUndos(): number;
5009
5055
  getNumRedos(): number;
5056
+ /* Excluded from this release type: _isReplaying */
5057
+ /* Excluded from this release type: isReplaying */
5010
5058
  /* Excluded from this release type: _isInBatch */
5011
5059
  batch(fn: () => void, opts?: TLHistoryBatchOptions): this;
5012
5060
  _undo({ pushToRedoStack, toMark }: {
@@ -5034,9 +5082,9 @@ export declare type HTMLContainerProps = React_2.HTMLAttributes<HTMLDivElement>;
5034
5082
  export declare const inlineBase64AssetStore: TLAssetStore;
5035
5083
 
5036
5084
  /** @public */
5037
- export declare class InputsManager {
5038
- private readonly editor;
5085
+ export declare class InputsManager extends EditorManager {
5039
5086
  constructor(editor: Editor);
5087
+ private _onFrame;
5040
5088
  private _originPagePoint;
5041
5089
  /**
5042
5090
  * The most recent pointer down's position in the current page space.
@@ -5529,6 +5577,25 @@ export declare function maybeSnapToGrid(point: Vec, editor: Editor): Vec;
5529
5577
  */
5530
5578
  export declare function MenuClickCapture(): false | JSX.Element;
5531
5579
 
5580
+ /**
5581
+ * Move an element into a new parent, preserving its state where the platform allows it.
5582
+ *
5583
+ * Uses `Node.moveBefore` (Chromium 133+, Firefox 144+) when both the element and parent are
5584
+ * connected to the same document — this moves the element without resetting its state, so
5585
+ * iframes don't reload and media keeps playing. Otherwise (older browsers, disconnected nodes,
5586
+ * or a cross-document move) it falls back to `appendChild`, which moves the element but resets
5587
+ * its state like an iframe reload.
5588
+ *
5589
+ * This is the primitive tldraw uses to adopt `ShapeUtil.getAppOwnedElement` elements, exposed so
5590
+ * apps can perform symmetric state-preserving moves from `ShapeUtil.onReleaseAppOwnedElement` —
5591
+ * for example moving an element to an off-canvas parking lot between editor sessions.
5592
+ *
5593
+ * @param parent - The element to move `element` into, as its last child.
5594
+ * @param element - The element to move.
5595
+ * @public
5596
+ */
5597
+ export declare function moveElementInto(parent: HTMLElement, element: HTMLElement): void;
5598
+
5532
5599
  /* Excluded from this release type: normalizeWheel */
5533
5600
 
5534
5601
  /**
@@ -6028,6 +6095,19 @@ export declare function resizeScaled(shape: TLBaseShape<any, {
6028
6095
  y: number;
6029
6096
  };
6030
6097
 
6098
+ /**
6099
+ * The whole-pixel line-height for a given font size and tldraw's unitless line-height
6100
+ * multiplier. tldraw's theme stores line-height as a multiplier (e.g. 1.35); resolving it
6101
+ * to a whole pixel keeps line spacing identical across rendering engines, which otherwise
6102
+ * disagree on fractional line boxes (WebKit snaps them to whole pixels, Blink keeps the
6103
+ * fraction) and let multi-line text drift apart. Apply it everywhere line-height is used —
6104
+ * measurement, on-canvas render, and export — so geometry and rendering agree.
6105
+ * See https://github.com/tldraw/tldraw/issues/8970.
6106
+ *
6107
+ * @public
6108
+ */
6109
+ export declare function resolveLineHeightPx(fontSize: number, lineHeight: number): number;
6110
+
6031
6111
  /**
6032
6112
  * Resolve a partial set of user-provided themes into a complete `TLThemes`
6033
6113
  * record by merging with `DEFAULT_THEME`. The result is suitable for passing to
@@ -6265,32 +6345,6 @@ export declare function setRuntimeOverrides(input: Partial<typeof runtime>): voi
6265
6345
  /** @public */
6266
6346
  export declare function setUserPreferences(user: TLUserPreferences): void;
6267
6347
 
6268
- /**
6269
- * Overlay util for shape indicators — the selection / hover / hint outlines drawn
6270
- * under the selection foreground. Paints local indicators in the theme's
6271
- * selection color.
6272
- *
6273
- * Remote collaborator selection indicators are drawn by a separate overlay util
6274
- * (e.g. `CollaboratorShapeIndicatorOverlayUtil` from `tldraw`) that runs at a
6275
- * lower z-index so peer selections appear under the local indicators.
6276
- *
6277
- * Non-interactive: contributes no hit-test geometry.
6278
- *
6279
- * @public
6280
- */
6281
- export declare class ShapeIndicatorOverlayUtil extends OverlayUtil<TLShapeIndicatorOverlay> {
6282
- static type: string;
6283
- options: {
6284
- hintedLineWidth: number;
6285
- lineWidth: number;
6286
- zIndex: number;
6287
- };
6288
- private _instanceFlags$;
6289
- isActive(): boolean;
6290
- getOverlays(): TLShapeIndicatorOverlay[];
6291
- render(ctx: CanvasRenderingContext2D, overlays: TLShapeIndicatorOverlay[]): void;
6292
- }
6293
-
6294
6348
  /** @public */
6295
6349
  export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
6296
6350
  editor: Editor;
@@ -6986,6 +7040,45 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
6986
7040
  * @public
6987
7041
  */
6988
7042
  onEditEnd?(shape: Shape): void;
7043
+ /**
7044
+ * Provide an app-owned element to be rendered inside the shape, alongside the output of
7045
+ * {@link ShapeUtil.component}. While the shape remains mounted, tldraw guarantees the
7046
+ * element keeps the same DOM position: it is never unmounted, recreated, or relocated by
7047
+ * reordering, reparenting, culling, or re-renders. When adopting the element, tldraw uses
7048
+ * `Node.moveBefore` where available so stateful content like cross-origin iframes keeps
7049
+ * its state across the move, falling back to `appendChild` elsewhere.
7050
+ *
7051
+ * Pair this with {@link ShapeUtil.onReleaseAppOwnedElement} to reclaim the element before
7052
+ * the shape or editor unmounts.
7053
+ *
7054
+ * This is called once per shape mount, not on every prop change, so the adopted element is
7055
+ * not refreshed when the shape's props change. If the element's content depends on props,
7056
+ * return a stable element and mutate it in place (for example from {@link ShapeUtil.component}
7057
+ * or an effect) rather than returning a different element.
7058
+ *
7059
+ * @param shape - The shape.
7060
+ * @returns The element to adopt, or null to render nothing.
7061
+ * @public
7062
+ */
7063
+ getAppOwnedElement?(shape: Shape): HTMLElement | null;
7064
+ /**
7065
+ * A callback called before the shape's app-owned element slot is destroyed: when the shape
7066
+ * unmounts (for example when it is deleted or the current page changes) or when the whole
7067
+ * editor unmounts, including error teardown. The slot is still connected to the document
7068
+ * when this is called, so the app can move the element to another connected parent with
7069
+ * `Node.moveBefore` to preserve its state. An element left in the slot is destroyed along
7070
+ * with it.
7071
+ *
7072
+ * This is not only a "shape deleted" signal: it also fires on page changes, editor unmount,
7073
+ * and (in dev under React StrictMode) on the throwaway mount/unmount cycle while the shape
7074
+ * still exists. Make it safe to call when the shape is still present, and check the store
7075
+ * (`this.editor.getShape(shape.id)`) if you need to distinguish deletion from a remount.
7076
+ *
7077
+ * @param shape - The shape.
7078
+ * @param element - The element returned by {@link ShapeUtil.getAppOwnedElement}.
7079
+ * @public
7080
+ */
7081
+ onReleaseAppOwnedElement?(shape: Shape, element: HTMLElement): void;
6989
7082
  }
6990
7083
 
6991
7084
  /**
@@ -7165,8 +7258,6 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
7165
7258
  onLongPress?(info: TLPointerEventInfo): void;
7166
7259
  onPointerUp?(info: TLPointerEventInfo): void;
7167
7260
  onDoubleClick?(info: TLClickEventInfo): void;
7168
- onTripleClick?(info: TLClickEventInfo): void;
7169
- onQuadrupleClick?(info: TLClickEventInfo): void;
7170
7261
  onRightClick?(info: TLPointerEventInfo): void;
7171
7262
  onMiddleClick?(info: TLPointerEventInfo): void;
7172
7263
  onKeyDown?(info: TLKeyboardEventInfo): void;
@@ -7198,8 +7289,8 @@ export declare function stopEventPropagation(e: any): any;
7198
7289
  * arrows with labels or complex arrowheads) can't be batched — they still
7199
7290
  * stroke individually inside a save/restore with `ctx.clip` applied.
7200
7291
  *
7201
- * Shared by {@link ShapeIndicatorOverlayUtil} and any overlay util that paints
7202
- * shape indicators (e.g. collaborator selections).
7292
+ * Shared by any overlay util that paints shape indicators (e.g. collaborator
7293
+ * selections).
7203
7294
  *
7204
7295
  * @public
7205
7296
  */
@@ -7272,8 +7363,7 @@ export declare const TAB_ID: string;
7272
7363
  /* Excluded from this release type: Table */
7273
7364
 
7274
7365
  /** @public */
7275
- export declare class TextManager {
7276
- editor: Editor;
7366
+ export declare class TextManager extends EditorManager {
7277
7367
  private elm;
7278
7368
  private poolElms;
7279
7369
  constructor(editor: Editor);
@@ -7281,7 +7371,6 @@ export declare class TextManager {
7281
7371
  private resetElementStyles;
7282
7372
  private setElementStyles;
7283
7373
  private getMeasureStyles;
7284
- dispose(): void;
7285
7374
  private ensurePoolSize;
7286
7375
  private getPoolItem;
7287
7376
  measureHtmlBatch(requests: BatchMeasurementRequest[]): TLMeasuredTextSize[];
@@ -7566,17 +7655,17 @@ export declare type TLClickEvent = (info: TLClickEventInfo) => void;
7566
7655
  export declare type TLClickEventInfo = TLBaseEventInfo & {
7567
7656
  button: number;
7568
7657
  name: TLCLickEventName;
7569
- phase: 'down' | 'settle' | 'up';
7658
+ phase: 'down' | 'settle-down' | 'settle-up' | 'up';
7570
7659
  point: VecLike;
7571
7660
  pointerId: number;
7572
7661
  type: 'click';
7573
7662
  } & TLPointerEventTarget;
7574
7663
 
7575
7664
  /** @public */
7576
- export declare type TLCLickEventName = 'double_click' | 'quadruple_click' | 'triple_click';
7665
+ export declare type TLCLickEventName = 'double_click';
7577
7666
 
7578
7667
  /** @public */
7579
- export declare type TLClickState = 'idle' | 'overflow' | 'pendingDouble' | 'pendingOverflow' | 'pendingQuadruple' | 'pendingTriple';
7668
+ export declare type TLClickState = 'idle' | 'overflow' | 'pendingDouble' | 'pendingOverflow';
7580
7669
 
7581
7670
  /**
7582
7671
  * Raw clipboard paste payload, before tldraw parses clipboard contents into {@link TLExternalContent}.
@@ -8161,7 +8250,6 @@ export declare interface TLEditorComponents {
8161
8250
  InFrontOfTheCanvas?: ComponentType | null;
8162
8251
  LoadingScreen?: ComponentType | null;
8163
8252
  OnTheCanvas?: ComponentType | null;
8164
- SelectionBackground?: ComponentType<TLSelectionBackgroundProps> | null;
8165
8253
  ShapeWrapper?: ComponentType<TLShapeWrapperProps & RefAttributes<HTMLDivElement>> | null;
8166
8254
  Spinner?: ComponentType<React.SVGProps<SVGSVGElement>> | null;
8167
8255
  SvgDefs?: ComponentType | null;
@@ -8314,6 +8402,7 @@ export declare const tlenv: {
8314
8402
  isFirefox: boolean;
8315
8403
  isIos: boolean;
8316
8404
  isSafari: boolean;
8405
+ isTouchDevice: boolean;
8317
8406
  isWebview: boolean;
8318
8407
  };
8319
8408
 
@@ -8356,8 +8445,6 @@ export declare interface TLEventHandlers {
8356
8445
  onLongPress: TLPointerEvent;
8357
8446
  onRightClick: TLPointerEvent;
8358
8447
  onDoubleClick: TLClickEvent;
8359
- onTripleClick: TLClickEvent;
8360
- onQuadrupleClick: TLClickEvent;
8361
8448
  onMiddleClick: TLPointerEvent;
8362
8449
  onPointerUp: TLPointerEvent;
8363
8450
  onKeyDown: TLKeyboardEvent;
@@ -9031,6 +9118,13 @@ export declare type TLPointerEvent = (info: TLPointerEventInfo) => void;
9031
9118
 
9032
9119
  /** @public */
9033
9120
  export declare type TLPointerEventInfo = TLBaseEventInfo & {
9121
+ /**
9122
+ * Whether this pen event appears to be direct manipulation on the display (e.g. Apple Pencil on
9123
+ * an iPad or a Surface Pen on a touchscreen) rather than indirect input from a desktop graphics
9124
+ * tablet (e.g. a Wacom Intuos). Only direct-display pens should auto-enable pen mode. Drawing and
9125
+ * pressure behavior is driven by `isPen` and applies to all pens regardless of this flag.
9126
+ */
9127
+ isPenDirect?: boolean;
9034
9128
  button: number;
9035
9129
  isPen: boolean;
9036
9130
  name: TLPointerEventName;
@@ -9125,12 +9219,6 @@ export declare type TLResizeShapeOptions = Partial<{
9125
9219
 
9126
9220
  /* Excluded from this release type: TLRotationSnapshot */
9127
9221
 
9128
- /** @public */
9129
- export declare interface TLSelectionBackgroundProps {
9130
- bounds: Box;
9131
- rotation: number;
9132
- }
9133
-
9134
9222
  /** @public */
9135
9223
  export declare type TLSelectionHandle = RotateCorner | SelectionCorner | SelectionEdge;
9136
9224
 
@@ -9164,14 +9252,6 @@ export declare type TLShapeErrorFallbackComponent = ComponentType<{
9164
9252
  error: any;
9165
9253
  }>;
9166
9254
 
9167
- /** @public */
9168
- export declare interface TLShapeIndicatorOverlay extends TLOverlay {
9169
- props: {
9170
- hintingShapeIds: TLShapeId[];
9171
- idsToDisplay: TLShapeId[];
9172
- };
9173
- }
9174
-
9175
9255
  /**
9176
9256
  * Emitted when shapes are created, updated, or deleted.
9177
9257
  * @public
@@ -9653,13 +9733,13 @@ export declare function usePassThroughWheelEvents(ref: RefObject<HTMLElement | n
9653
9733
  * @returns The list of peer UserIDs
9654
9734
  * @public
9655
9735
  */
9656
- export declare function usePeerIds(): string[];
9736
+ export declare function usePeerIds(): TLUserId[];
9657
9737
 
9658
9738
  /**
9659
9739
  * @returns The latest presence of the user matching userId
9660
9740
  * @public
9661
9741
  */
9662
- export declare function usePresence(userId: string): null | TLInstancePresence;
9742
+ export declare function usePresence(userId: TLUserId): null | TLInstancePresence;
9663
9743
 
9664
9744
  /* Excluded from this release type: USER_COLORS */
9665
9745
 
@@ -9699,7 +9779,25 @@ export declare class UserPreferencesManager {
9699
9779
  getEdgeScrollSpeed(): number;
9700
9780
  getAnimationSpeed(): number;
9701
9781
  getAreKeyboardShortcutsEnabled(): boolean;
9782
+ /**
9783
+ * The current user's raw, app-provided id — the value set in the user's
9784
+ * {@link @tldraw/editor#TLUserPreferences}. Use this when you need the id your application
9785
+ * assigned to the user. To compare against or look up store records, use
9786
+ * {@link UserPreferencesManager.getRecordId} instead.
9787
+ */
9788
+ getExternalId(): string;
9789
+ /**
9790
+ * @deprecated Use {@link UserPreferencesManager.getExternalId} for the raw app-provided id, or
9791
+ * {@link UserPreferencesManager.getRecordId} for the prefixed `TLUserId` record id.
9792
+ */
9702
9793
  getId(): string;
9794
+ /**
9795
+ * The current user's id as a tldraw {@link @tldraw/tlschema#TLUserId} record id (prefixed
9796
+ * with `user:`). Use this when comparing against or looking up store records, such as a
9797
+ * presence record's `userId` or `followingUserId`. For the raw, app-provided id, use
9798
+ * {@link UserPreferencesManager.getExternalId}.
9799
+ */
9800
+ getRecordId(): TLUserId;
9703
9801
  getName(): string;
9704
9802
  getLocale(): string;
9705
9803
  getColor(): string;
@@ -9749,9 +9847,6 @@ export declare function useTLSchemaFromUtils(opts: TLStoreSchemaOptions): StoreS
9749
9847
  /** @public */
9750
9848
  export declare function useTLStore(opts: TLStoreOptions): TLStore;
9751
9849
 
9752
- /** @public */
9753
- export declare function useTransform(ref: React.RefObject<HTMLElement | null | SVGElement>, x?: number, y?: number, scale?: number, rotate?: number, additionalOffset?: VecLike): void;
9754
-
9755
9850
  /**
9756
9851
  * React's useId hook returns a unique id for the component. However, it uses a colon in the id,
9757
9852
  * which is not valid for CSS selectors. This hook replaces the colon with an underscore.
package/dist-cjs/index.js CHANGED
@@ -40,7 +40,6 @@ __export(index_exports, {
40
40
  DefaultCanvas: () => import_DefaultCanvas.DefaultCanvas,
41
41
  DefaultErrorFallback: () => import_DefaultErrorFallback.DefaultErrorFallback,
42
42
  DefaultGrid: () => import_DefaultGrid.DefaultGrid,
43
- DefaultSelectionBackground: () => import_DefaultSelectionBackground.DefaultSelectionBackground,
44
43
  DefaultShapeWrapper: () => import_DefaultShapeWrapper.DefaultShapeWrapper,
45
44
  DefaultSpinner: () => import_DefaultSpinner.DefaultSpinner,
46
45
  DefaultSvgDefs: () => import_DefaultSvgDefs.DefaultSvgDefs,
@@ -51,6 +50,7 @@ __export(index_exports, {
51
50
  Editor: () => import_Editor.Editor,
52
51
  EditorAtom: () => import_EditorAtom.EditorAtom,
53
52
  EditorContext: () => import_useEditor.EditorContext,
53
+ EditorManager: () => import_EditorManager.EditorManager,
54
54
  EditorProvider: () => import_useEditor.EditorProvider,
55
55
  Ellipse2d: () => import_Ellipse2d.Ellipse2d,
56
56
  ErrorBoundary: () => import_ErrorBoundary.ErrorBoundary,
@@ -88,7 +88,6 @@ __export(index_exports, {
88
88
  SIN: () => import_utils2.SIN,
89
89
  SVGContainer: () => import_SVGContainer.SVGContainer,
90
90
  ScribbleManager: () => import_ScribbleManager.ScribbleManager,
91
- ShapeIndicatorOverlayUtil: () => import_ShapeIndicatorOverlayUtil.ShapeIndicatorOverlayUtil,
92
91
  ShapeUtil: () => import_ShapeUtil.ShapeUtil,
93
92
  SharedStyleMap: () => import_SharedStylesMap.SharedStyleMap,
94
93
  SnapManager: () => import_SnapManager.SnapManager,
@@ -111,6 +110,7 @@ __export(index_exports, {
111
110
  approximately: () => import_utils2.approximately,
112
111
  areAnglesCompatible: () => import_utils2.areAnglesCompatible,
113
112
  average: () => import_utils2.average,
113
+ cancelShapeCreationOnLongPress: () => import_cancelShapeCreationOnLongPress.cancelShapeCreationOnLongPress,
114
114
  canonicalizeRotation: () => import_utils2.canonicalizeRotation,
115
115
  centerOfCircleFromThreePoints: () => import_utils2.centerOfCircleFromThreePoints,
116
116
  clamp: () => import_utils2.clamp,
@@ -179,6 +179,7 @@ __export(index_exports, {
179
179
  loadSnapshot: () => import_TLEditorSnapshot.loadSnapshot,
180
180
  loopToHtmlElement: () => import_dom.loopToHtmlElement,
181
181
  maybeSnapToGrid: () => import_Pointing.maybeSnapToGrid,
182
+ moveElementInto: () => import_dom.moveElementInto,
182
183
  normalizeWheel: () => import_normalizeWheel.normalizeWheel,
183
184
  openWindow: () => import_runtime.openWindow,
184
185
  parseDeepLinkString: () => import_deepLinks.parseDeepLinkString,
@@ -194,6 +195,7 @@ __export(index_exports, {
194
195
  releasePointerCapture: () => import_dom.releasePointerCapture,
195
196
  resizeBox: () => import_resizeBox.resizeBox,
196
197
  resizeScaled: () => import_resizeScaled.resizeScaled,
198
+ resolveLineHeightPx: () => import_TextManager.resolveLineHeightPx,
197
199
  resolveThemes: () => import_ThemeManager.resolveThemes,
198
200
  rotateSelectionHandle: () => import_Box.rotateSelectionHandle,
199
201
  runtime: () => import_runtime.runtime,
@@ -204,7 +206,7 @@ __export(index_exports, {
204
206
  shortAngleDist: () => import_utils2.shortAngleDist,
205
207
  snapAngle: () => import_utils2.snapAngle,
206
208
  stopEventPropagation: () => import_dom.stopEventPropagation,
207
- strokeShapeIndicators: () => import_ShapeIndicatorOverlayUtil.strokeShapeIndicators,
209
+ strokeShapeIndicators: () => import_strokeShapeIndicators.strokeShapeIndicators,
208
210
  suffixSafeId: () => import_useSafeId.suffixSafeId,
209
211
  tlenv: () => import_environment.tlenv,
210
212
  tlenvReactive: () => import_environment.tlenvReactive,
@@ -240,7 +242,6 @@ __export(index_exports, {
240
242
  useTLSchemaFromUtils: () => import_useTLStore.useTLSchemaFromUtils,
241
243
  useTLStore: () => import_useTLStore.useTLStore,
242
244
  useTldrawCurrentUser: () => import_createTLCurrentUser.useTldrawCurrentUser,
243
- useTransform: () => import_useTransform.useTransform,
244
245
  useUniqueSafeId: () => import_useSafeId.useUniqueSafeId,
245
246
  useViewportHeight: () => import_useViewportHeight.useViewportHeight,
246
247
  userTypeValidator: () => import_TLUserPreferences.userTypeValidator
@@ -257,7 +258,6 @@ var import_DefaultBackground = require("./lib/components/default-components/Defa
257
258
  var import_DefaultCanvas = require("./lib/components/default-components/DefaultCanvas");
258
259
  var import_DefaultErrorFallback = require("./lib/components/default-components/DefaultErrorFallback");
259
260
  var import_DefaultGrid = require("./lib/components/default-components/DefaultGrid");
260
- var import_DefaultSelectionBackground = require("./lib/components/default-components/DefaultSelectionBackground");
261
261
  var import_DefaultShapeWrapper = require("./lib/components/default-components/DefaultShapeWrapper");
262
262
  var import_DefaultSpinner = require("./lib/components/default-components/DefaultSpinner");
263
263
  var import_DefaultSvgDefs = require("./lib/components/default-components/DefaultSvgDefs");
@@ -279,6 +279,7 @@ var import_ClickManager = require("./lib/editor/managers/ClickManager/ClickManag
279
279
  var import_EdgeScrollManager = require("./lib/editor/managers/EdgeScrollManager/EdgeScrollManager");
280
280
  var import_FontManager = require("./lib/editor/managers/FontManager/FontManager");
281
281
  var import_HistoryManager = require("./lib/editor/managers/HistoryManager/HistoryManager");
282
+ var import_EditorManager = require("./lib/editor/managers/EditorManager");
282
283
  var import_InputsManager = require("./lib/editor/managers/InputsManager/InputsManager");
283
284
  var import_ScribbleManager = require("./lib/editor/managers/ScribbleManager/ScribbleManager");
284
285
  var import_BoundsSnaps = require("./lib/editor/managers/SnapManager/BoundsSnaps");
@@ -300,12 +301,13 @@ var import_ShapeUtil = require("./lib/editor/shapes/ShapeUtil");
300
301
  var import_getOverlayDisplayValues = require("./lib/editor/overlays/getOverlayDisplayValues");
301
302
  var import_OverlayManager = require("./lib/editor/overlays/OverlayManager");
302
303
  var import_OverlayUtil = require("./lib/editor/overlays/OverlayUtil");
303
- var import_ShapeIndicatorOverlayUtil = require("./lib/editor/overlays/ShapeIndicatorOverlayUtil");
304
+ var import_strokeShapeIndicators = require("./lib/editor/overlays/strokeShapeIndicators");
304
305
  var import_getPerfectDashProps = require("./lib/editor/shapes/shared/getPerfectDashProps");
305
306
  var import_resizeBox = require("./lib/editor/shapes/shared/resizeBox");
306
307
  var import_resizeScaled = require("./lib/editor/shapes/shared/resizeScaled");
307
308
  var import_BaseBoxShapeTool = require("./lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool");
308
309
  var import_Pointing = require("./lib/editor/tools/BaseBoxShapeTool/children/Pointing");
310
+ var import_cancelShapeCreationOnLongPress = require("./lib/editor/tools/cancelShapeCreationOnLongPress");
309
311
  var import_StateNode = require("./lib/editor/tools/StateNode");
310
312
  var import_event_types = require("./lib/editor/types/event-types");
311
313
  var import_SvgExportContext = require("./lib/editor/types/SvgExportContext");
@@ -332,7 +334,6 @@ var import_usePresence = require("./lib/hooks/usePresence");
332
334
  var import_useRefState = require("./lib/hooks/useRefState");
333
335
  var import_useSafeId = require("./lib/hooks/useSafeId");
334
336
  var import_useTLStore = require("./lib/hooks/useTLStore");
335
- var import_useTransform = require("./lib/hooks/useTransform");
336
337
  var import_useViewportHeight = require("./lib/hooks/useViewportHeight");
337
338
  var import_LicenseManager = require("./lib/license/LicenseManager");
338
339
  var import_LicenseProvider = require("./lib/license/LicenseProvider");
@@ -380,7 +381,7 @@ var import_uniq = require("./lib/utils/uniq");
380
381
  var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
381
382
  (0, import_utils.registerTldrawLibraryVersion)(
382
383
  "@tldraw/editor",
383
- "5.2.0-canary.4f74e5daafbd",
384
+ "5.2.0-canary.4f92f5a74345",
384
385
  "cjs"
385
386
  );
386
387
  //# sourceMappingURL=index.js.map