@tldraw/editor 5.2.0-next.ee0fa4d6244f → 5.2.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 (189) hide show
  1. package/README.md +7 -1
  2. package/dist-cjs/index.d.ts +117 -60
  3. package/dist-cjs/index.js +7 -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 +131 -57
  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/FocusManager/FocusManager.js +1 -2
  18. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js.map +2 -2
  19. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js +28 -4
  20. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +3 -3
  21. package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js +24 -2
  22. package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js.map +2 -2
  23. package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js +14 -3
  24. package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js.map +2 -2
  25. package/dist-cjs/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.js +4 -2
  26. package/dist-cjs/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.js.map +2 -2
  27. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js +7 -3
  28. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +2 -2
  29. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js +0 -1
  30. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +2 -2
  31. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js +15 -2
  32. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +2 -2
  33. package/dist-cjs/lib/editor/overlays/strokeShapeIndicators.js +79 -0
  34. package/dist-cjs/lib/editor/overlays/strokeShapeIndicators.js.map +7 -0
  35. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  36. package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js +4 -0
  37. package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js.map +2 -2
  38. package/dist-cjs/lib/editor/tools/StateNode.js.map +2 -2
  39. package/dist-cjs/lib/{hooks/useTransform.js → editor/tools/cancelShapeCreationOnLongPress.js} +8 -23
  40. package/dist-cjs/lib/editor/tools/cancelShapeCreationOnLongPress.js.map +7 -0
  41. package/dist-cjs/lib/editor/types/event-types.js +0 -2
  42. package/dist-cjs/lib/editor/types/event-types.js.map +2 -2
  43. package/dist-cjs/lib/globals/environment.js +6 -1
  44. package/dist-cjs/lib/globals/environment.js.map +2 -2
  45. package/dist-cjs/lib/hooks/EditorComponentsContext.js.map +2 -2
  46. package/dist-cjs/lib/hooks/useCanvasEvents.js +17 -8
  47. package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
  48. package/dist-cjs/lib/hooks/useEditorComponents.js +0 -1
  49. package/dist-cjs/lib/hooks/useEditorComponents.js.map +2 -2
  50. package/dist-cjs/lib/hooks/usePresence.js.map +2 -2
  51. package/dist-cjs/lib/hooks/useScreenBounds.js +1 -0
  52. package/dist-cjs/lib/hooks/useScreenBounds.js.map +2 -2
  53. package/dist-cjs/lib/license/LicenseManager.js +5 -1
  54. package/dist-cjs/lib/license/LicenseManager.js.map +2 -2
  55. package/dist-cjs/lib/primitives/Vec.js +3 -2
  56. package/dist-cjs/lib/primitives/Vec.js.map +2 -2
  57. package/dist-cjs/lib/utils/dom.js +12 -0
  58. package/dist-cjs/lib/utils/dom.js.map +2 -2
  59. package/dist-cjs/lib/utils/getPointerInfo.js +2 -1
  60. package/dist-cjs/lib/utils/getPointerInfo.js.map +2 -2
  61. package/dist-cjs/lib/utils/pointer.js +37 -0
  62. package/dist-cjs/lib/utils/pointer.js.map +7 -0
  63. package/dist-cjs/version.js +3 -3
  64. package/dist-cjs/version.js.map +1 -1
  65. package/dist-esm/index.d.mts +117 -60
  66. package/dist-esm/index.mjs +9 -13
  67. package/dist-esm/index.mjs.map +2 -2
  68. package/dist-esm/lib/components/MenuClickCapture.mjs +8 -5
  69. package/dist-esm/lib/components/MenuClickCapture.mjs.map +2 -2
  70. package/dist-esm/lib/components/Shape.mjs +48 -2
  71. package/dist-esm/lib/components/Shape.mjs.map +3 -3
  72. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +1 -16
  73. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
  74. package/dist-esm/lib/editor/Editor.mjs +131 -57
  75. package/dist-esm/lib/editor/Editor.mjs.map +3 -3
  76. package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs +8 -58
  77. package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs.map +2 -2
  78. package/dist-esm/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.mjs +3 -3
  79. package/dist-esm/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.mjs.map +2 -2
  80. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs +1 -2
  81. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs.map +2 -2
  82. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs +28 -4
  83. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +3 -3
  84. package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs +24 -2
  85. package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs.map +2 -2
  86. package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs +14 -3
  87. package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs.map +2 -2
  88. package/dist-esm/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.mjs +4 -2
  89. package/dist-esm/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.mjs.map +2 -2
  90. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs +7 -3
  91. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +2 -2
  92. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs +0 -1
  93. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +2 -2
  94. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs +15 -2
  95. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +2 -2
  96. package/dist-esm/lib/editor/overlays/strokeShapeIndicators.mjs +59 -0
  97. package/dist-esm/lib/editor/overlays/strokeShapeIndicators.mjs.map +7 -0
  98. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  99. package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs +4 -0
  100. package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs.map +2 -2
  101. package/dist-esm/lib/editor/tools/StateNode.mjs.map +2 -2
  102. package/dist-esm/lib/editor/tools/cancelShapeCreationOnLongPress.mjs +8 -0
  103. package/dist-esm/lib/editor/tools/cancelShapeCreationOnLongPress.mjs.map +7 -0
  104. package/dist-esm/lib/editor/types/event-types.mjs +0 -2
  105. package/dist-esm/lib/editor/types/event-types.mjs.map +2 -2
  106. package/dist-esm/lib/globals/environment.mjs +6 -1
  107. package/dist-esm/lib/globals/environment.mjs.map +2 -2
  108. package/dist-esm/lib/hooks/EditorComponentsContext.mjs.map +2 -2
  109. package/dist-esm/lib/hooks/useCanvasEvents.mjs +17 -8
  110. package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
  111. package/dist-esm/lib/hooks/useEditorComponents.mjs +0 -1
  112. package/dist-esm/lib/hooks/useEditorComponents.mjs.map +2 -2
  113. package/dist-esm/lib/hooks/usePresence.mjs.map +2 -2
  114. package/dist-esm/lib/hooks/useScreenBounds.mjs +1 -0
  115. package/dist-esm/lib/hooks/useScreenBounds.mjs.map +2 -2
  116. package/dist-esm/lib/license/LicenseManager.mjs +5 -1
  117. package/dist-esm/lib/license/LicenseManager.mjs.map +2 -2
  118. package/dist-esm/lib/primitives/Vec.mjs +3 -2
  119. package/dist-esm/lib/primitives/Vec.mjs.map +2 -2
  120. package/dist-esm/lib/utils/dom.mjs +12 -0
  121. package/dist-esm/lib/utils/dom.mjs.map +2 -2
  122. package/dist-esm/lib/utils/getPointerInfo.mjs +2 -1
  123. package/dist-esm/lib/utils/getPointerInfo.mjs.map +2 -2
  124. package/dist-esm/lib/utils/pointer.mjs +17 -0
  125. package/dist-esm/lib/utils/pointer.mjs.map +7 -0
  126. package/dist-esm/version.mjs +3 -3
  127. package/dist-esm/version.mjs.map +1 -1
  128. package/editor.css +15 -3
  129. package/package.json +11 -8
  130. package/src/index.ts +4 -10
  131. package/src/lib/components/MenuClickCapture.tsx +8 -4
  132. package/src/lib/components/Shape.tsx +88 -1
  133. package/src/lib/components/default-components/DefaultCanvas.tsx +1 -17
  134. package/src/lib/editor/Editor.test.ts +36 -0
  135. package/src/lib/editor/Editor.ts +204 -75
  136. package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +54 -74
  137. package/src/lib/editor/managers/ClickManager/ClickManager.ts +15 -65
  138. package/src/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.test.ts +43 -16
  139. package/src/lib/editor/managers/CollaboratorsManager/CollaboratorsManager.ts +8 -5
  140. package/src/lib/editor/managers/FocusManager/FocusManager.test.ts +4 -4
  141. package/src/lib/editor/managers/FocusManager/FocusManager.ts +1 -2
  142. package/src/lib/editor/managers/FontManager/FontManager.test.ts +37 -10
  143. package/src/lib/editor/managers/FontManager/FontManager.ts +46 -1
  144. package/src/lib/editor/managers/HistoryManager/HistoryManager.test.ts +32 -0
  145. package/src/lib/editor/managers/HistoryManager/HistoryManager.ts +34 -4
  146. package/src/lib/editor/managers/InputsManager/InputsManager.test.ts +61 -0
  147. package/src/lib/editor/managers/InputsManager/InputsManager.ts +16 -4
  148. package/src/lib/editor/managers/SpatialIndexManager/SpatialIndexManager.ts +9 -2
  149. package/src/lib/editor/managers/TextManager/TextManager.test.ts +16 -14
  150. package/src/lib/editor/managers/TextManager/TextManager.ts +17 -2
  151. package/src/lib/editor/managers/TickManager/TickManager.test.ts +0 -40
  152. package/src/lib/editor/managers/TickManager/TickManager.ts +0 -1
  153. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +12 -2
  154. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.ts +27 -2
  155. package/src/lib/editor/overlays/strokeShapeIndicators.ts +86 -0
  156. package/src/lib/editor/shapes/ShapeUtil.ts +41 -0
  157. package/src/lib/editor/tools/BaseBoxShapeTool/children/Pointing.ts +5 -0
  158. package/src/lib/editor/tools/StateNode.ts +0 -2
  159. package/src/lib/editor/tools/cancelShapeCreationOnLongPress.ts +31 -0
  160. package/src/lib/editor/types/event-types.ts +9 -6
  161. package/src/lib/globals/environment.ts +7 -0
  162. package/src/lib/hooks/EditorComponentsContext.tsx +0 -2
  163. package/src/lib/hooks/useCanvasEvents.ts +24 -12
  164. package/src/lib/hooks/useEditorComponents.tsx +0 -1
  165. package/src/lib/hooks/usePresence.ts +2 -2
  166. package/src/lib/hooks/useScreenBounds.ts +3 -0
  167. package/src/lib/license/LicenseManager.test.ts +24 -16
  168. package/src/lib/license/LicenseManager.ts +8 -2
  169. package/src/lib/primitives/Vec.ts +5 -2
  170. package/src/lib/test/ContentElementSlot.test.tsx +201 -0
  171. package/src/lib/utils/dom.ts +34 -0
  172. package/src/lib/utils/getPointerInfo.ts +2 -1
  173. package/src/lib/utils/pointer.test.ts +76 -0
  174. package/src/lib/utils/pointer.ts +42 -0
  175. package/src/version.ts +3 -3
  176. package/dist-cjs/lib/components/default-components/DefaultSelectionBackground.js +0 -49
  177. package/dist-cjs/lib/components/default-components/DefaultSelectionBackground.js.map +0 -7
  178. package/dist-cjs/lib/editor/overlays/ShapeIndicatorOverlayUtil.js +0 -161
  179. package/dist-cjs/lib/editor/overlays/ShapeIndicatorOverlayUtil.js.map +0 -7
  180. package/dist-cjs/lib/hooks/useTransform.js.map +0 -7
  181. package/dist-esm/lib/components/default-components/DefaultSelectionBackground.mjs +0 -19
  182. package/dist-esm/lib/components/default-components/DefaultSelectionBackground.mjs.map +0 -7
  183. package/dist-esm/lib/editor/overlays/ShapeIndicatorOverlayUtil.mjs +0 -141
  184. package/dist-esm/lib/editor/overlays/ShapeIndicatorOverlayUtil.mjs.map +0 -7
  185. package/dist-esm/lib/hooks/useTransform.mjs +0 -23
  186. package/dist-esm/lib/hooks/useTransform.mjs.map +0 -7
  187. package/src/lib/components/default-components/DefaultSelectionBackground.tsx +0 -25
  188. package/src/lib/editor/overlays/ShapeIndicatorOverlayUtil.ts +0 -216
  189. 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 */
@@ -5007,6 +5011,8 @@ export declare class HistoryManager<R extends UnknownRecord> {
5007
5011
  private flushPendingDiff;
5008
5012
  getNumUndos(): number;
5009
5013
  getNumRedos(): number;
5014
+ /* Excluded from this release type: _isReplaying */
5015
+ /* Excluded from this release type: isReplaying */
5010
5016
  /* Excluded from this release type: _isInBatch */
5011
5017
  batch(fn: () => void, opts?: TLHistoryBatchOptions): this;
5012
5018
  _undo({ pushToRedoStack, toMark }: {
@@ -5037,6 +5043,8 @@ export declare const inlineBase64AssetStore: TLAssetStore;
5037
5043
  export declare class InputsManager {
5038
5044
  private readonly editor;
5039
5045
  constructor(editor: Editor);
5046
+ /* Excluded from this release type: dispose */
5047
+ private _onFrame;
5040
5048
  private _originPagePoint;
5041
5049
  /**
5042
5050
  * The most recent pointer down's position in the current page space.
@@ -5529,6 +5537,25 @@ export declare function maybeSnapToGrid(point: Vec, editor: Editor): Vec;
5529
5537
  */
5530
5538
  export declare function MenuClickCapture(): false | JSX.Element;
5531
5539
 
5540
+ /**
5541
+ * Move an element into a new parent, preserving its state where the platform allows it.
5542
+ *
5543
+ * Uses `Node.moveBefore` (Chromium 133+, Firefox 144+) when both the element and parent are
5544
+ * connected to the same document — this moves the element without resetting its state, so
5545
+ * iframes don't reload and media keeps playing. Otherwise (older browsers, disconnected nodes,
5546
+ * or a cross-document move) it falls back to `appendChild`, which moves the element but resets
5547
+ * its state like an iframe reload.
5548
+ *
5549
+ * This is the primitive tldraw uses to adopt `ShapeUtil.getAppOwnedElement` elements, exposed so
5550
+ * apps can perform symmetric state-preserving moves from `ShapeUtil.onReleaseAppOwnedElement` —
5551
+ * for example moving an element to an off-canvas parking lot between editor sessions.
5552
+ *
5553
+ * @param parent - The element to move `element` into, as its last child.
5554
+ * @param element - The element to move.
5555
+ * @public
5556
+ */
5557
+ export declare function moveElementInto(parent: HTMLElement, element: HTMLElement): void;
5558
+
5532
5559
  /* Excluded from this release type: normalizeWheel */
5533
5560
 
5534
5561
  /**
@@ -6028,6 +6055,19 @@ export declare function resizeScaled(shape: TLBaseShape<any, {
6028
6055
  y: number;
6029
6056
  };
6030
6057
 
6058
+ /**
6059
+ * The whole-pixel line-height for a given font size and tldraw's unitless line-height
6060
+ * multiplier. tldraw's theme stores line-height as a multiplier (e.g. 1.35); resolving it
6061
+ * to a whole pixel keeps line spacing identical across rendering engines, which otherwise
6062
+ * disagree on fractional line boxes (WebKit snaps them to whole pixels, Blink keeps the
6063
+ * fraction) and let multi-line text drift apart. Apply it everywhere line-height is used —
6064
+ * measurement, on-canvas render, and export — so geometry and rendering agree.
6065
+ * See https://github.com/tldraw/tldraw/issues/8970.
6066
+ *
6067
+ * @public
6068
+ */
6069
+ export declare function resolveLineHeightPx(fontSize: number, lineHeight: number): number;
6070
+
6031
6071
  /**
6032
6072
  * Resolve a partial set of user-provided themes into a complete `TLThemes`
6033
6073
  * record by merging with `DEFAULT_THEME`. The result is suitable for passing to
@@ -6265,32 +6305,6 @@ export declare function setRuntimeOverrides(input: Partial<typeof runtime>): voi
6265
6305
  /** @public */
6266
6306
  export declare function setUserPreferences(user: TLUserPreferences): void;
6267
6307
 
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
6308
  /** @public */
6295
6309
  export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
6296
6310
  editor: Editor;
@@ -6986,6 +7000,45 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
6986
7000
  * @public
6987
7001
  */
6988
7002
  onEditEnd?(shape: Shape): void;
7003
+ /**
7004
+ * Provide an app-owned element to be rendered inside the shape, alongside the output of
7005
+ * {@link ShapeUtil.component}. While the shape remains mounted, tldraw guarantees the
7006
+ * element keeps the same DOM position: it is never unmounted, recreated, or relocated by
7007
+ * reordering, reparenting, culling, or re-renders. When adopting the element, tldraw uses
7008
+ * `Node.moveBefore` where available so stateful content like cross-origin iframes keeps
7009
+ * its state across the move, falling back to `appendChild` elsewhere.
7010
+ *
7011
+ * Pair this with {@link ShapeUtil.onReleaseAppOwnedElement} to reclaim the element before
7012
+ * the shape or editor unmounts.
7013
+ *
7014
+ * This is called once per shape mount, not on every prop change, so the adopted element is
7015
+ * not refreshed when the shape's props change. If the element's content depends on props,
7016
+ * return a stable element and mutate it in place (for example from {@link ShapeUtil.component}
7017
+ * or an effect) rather than returning a different element.
7018
+ *
7019
+ * @param shape - The shape.
7020
+ * @returns The element to adopt, or null to render nothing.
7021
+ * @public
7022
+ */
7023
+ getAppOwnedElement?(shape: Shape): HTMLElement | null;
7024
+ /**
7025
+ * A callback called before the shape's app-owned element slot is destroyed: when the shape
7026
+ * unmounts (for example when it is deleted or the current page changes) or when the whole
7027
+ * editor unmounts, including error teardown. The slot is still connected to the document
7028
+ * when this is called, so the app can move the element to another connected parent with
7029
+ * `Node.moveBefore` to preserve its state. An element left in the slot is destroyed along
7030
+ * with it.
7031
+ *
7032
+ * This is not only a "shape deleted" signal: it also fires on page changes, editor unmount,
7033
+ * and (in dev under React StrictMode) on the throwaway mount/unmount cycle while the shape
7034
+ * still exists. Make it safe to call when the shape is still present, and check the store
7035
+ * (`this.editor.getShape(shape.id)`) if you need to distinguish deletion from a remount.
7036
+ *
7037
+ * @param shape - The shape.
7038
+ * @param element - The element returned by {@link ShapeUtil.getAppOwnedElement}.
7039
+ * @public
7040
+ */
7041
+ onReleaseAppOwnedElement?(shape: Shape, element: HTMLElement): void;
6989
7042
  }
6990
7043
 
6991
7044
  /**
@@ -7165,8 +7218,6 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
7165
7218
  onLongPress?(info: TLPointerEventInfo): void;
7166
7219
  onPointerUp?(info: TLPointerEventInfo): void;
7167
7220
  onDoubleClick?(info: TLClickEventInfo): void;
7168
- onTripleClick?(info: TLClickEventInfo): void;
7169
- onQuadrupleClick?(info: TLClickEventInfo): void;
7170
7221
  onRightClick?(info: TLPointerEventInfo): void;
7171
7222
  onMiddleClick?(info: TLPointerEventInfo): void;
7172
7223
  onKeyDown?(info: TLKeyboardEventInfo): void;
@@ -7198,8 +7249,8 @@ export declare function stopEventPropagation(e: any): any;
7198
7249
  * arrows with labels or complex arrowheads) can't be batched — they still
7199
7250
  * stroke individually inside a save/restore with `ctx.clip` applied.
7200
7251
  *
7201
- * Shared by {@link ShapeIndicatorOverlayUtil} and any overlay util that paints
7202
- * shape indicators (e.g. collaborator selections).
7252
+ * Shared by any overlay util that paints shape indicators (e.g. collaborator
7253
+ * selections).
7203
7254
  *
7204
7255
  * @public
7205
7256
  */
@@ -7566,17 +7617,17 @@ export declare type TLClickEvent = (info: TLClickEventInfo) => void;
7566
7617
  export declare type TLClickEventInfo = TLBaseEventInfo & {
7567
7618
  button: number;
7568
7619
  name: TLCLickEventName;
7569
- phase: 'down' | 'settle' | 'up';
7620
+ phase: 'down' | 'settle-down' | 'settle-up' | 'up';
7570
7621
  point: VecLike;
7571
7622
  pointerId: number;
7572
7623
  type: 'click';
7573
7624
  } & TLPointerEventTarget;
7574
7625
 
7575
7626
  /** @public */
7576
- export declare type TLCLickEventName = 'double_click' | 'quadruple_click' | 'triple_click';
7627
+ export declare type TLCLickEventName = 'double_click';
7577
7628
 
7578
7629
  /** @public */
7579
- export declare type TLClickState = 'idle' | 'overflow' | 'pendingDouble' | 'pendingOverflow' | 'pendingQuadruple' | 'pendingTriple';
7630
+ export declare type TLClickState = 'idle' | 'overflow' | 'pendingDouble' | 'pendingOverflow';
7580
7631
 
7581
7632
  /**
7582
7633
  * Raw clipboard paste payload, before tldraw parses clipboard contents into {@link TLExternalContent}.
@@ -8161,7 +8212,6 @@ export declare interface TLEditorComponents {
8161
8212
  InFrontOfTheCanvas?: ComponentType | null;
8162
8213
  LoadingScreen?: ComponentType | null;
8163
8214
  OnTheCanvas?: ComponentType | null;
8164
- SelectionBackground?: ComponentType<TLSelectionBackgroundProps> | null;
8165
8215
  ShapeWrapper?: ComponentType<TLShapeWrapperProps & RefAttributes<HTMLDivElement>> | null;
8166
8216
  Spinner?: ComponentType<React.SVGProps<SVGSVGElement>> | null;
8167
8217
  SvgDefs?: ComponentType | null;
@@ -8314,6 +8364,7 @@ export declare const tlenv: {
8314
8364
  isFirefox: boolean;
8315
8365
  isIos: boolean;
8316
8366
  isSafari: boolean;
8367
+ isTouchDevice: boolean;
8317
8368
  isWebview: boolean;
8318
8369
  };
8319
8370
 
@@ -8356,8 +8407,6 @@ export declare interface TLEventHandlers {
8356
8407
  onLongPress: TLPointerEvent;
8357
8408
  onRightClick: TLPointerEvent;
8358
8409
  onDoubleClick: TLClickEvent;
8359
- onTripleClick: TLClickEvent;
8360
- onQuadrupleClick: TLClickEvent;
8361
8410
  onMiddleClick: TLPointerEvent;
8362
8411
  onPointerUp: TLPointerEvent;
8363
8412
  onKeyDown: TLKeyboardEvent;
@@ -9031,6 +9080,13 @@ export declare type TLPointerEvent = (info: TLPointerEventInfo) => void;
9031
9080
 
9032
9081
  /** @public */
9033
9082
  export declare type TLPointerEventInfo = TLBaseEventInfo & {
9083
+ /**
9084
+ * Whether this pen event appears to be direct manipulation on the display (e.g. Apple Pencil on
9085
+ * an iPad or a Surface Pen on a touchscreen) rather than indirect input from a desktop graphics
9086
+ * tablet (e.g. a Wacom Intuos). Only direct-display pens should auto-enable pen mode. Drawing and
9087
+ * pressure behavior is driven by `isPen` and applies to all pens regardless of this flag.
9088
+ */
9089
+ isPenDirect?: boolean;
9034
9090
  button: number;
9035
9091
  isPen: boolean;
9036
9092
  name: TLPointerEventName;
@@ -9125,12 +9181,6 @@ export declare type TLResizeShapeOptions = Partial<{
9125
9181
 
9126
9182
  /* Excluded from this release type: TLRotationSnapshot */
9127
9183
 
9128
- /** @public */
9129
- export declare interface TLSelectionBackgroundProps {
9130
- bounds: Box;
9131
- rotation: number;
9132
- }
9133
-
9134
9184
  /** @public */
9135
9185
  export declare type TLSelectionHandle = RotateCorner | SelectionCorner | SelectionEdge;
9136
9186
 
@@ -9164,14 +9214,6 @@ export declare type TLShapeErrorFallbackComponent = ComponentType<{
9164
9214
  error: any;
9165
9215
  }>;
9166
9216
 
9167
- /** @public */
9168
- export declare interface TLShapeIndicatorOverlay extends TLOverlay {
9169
- props: {
9170
- hintingShapeIds: TLShapeId[];
9171
- idsToDisplay: TLShapeId[];
9172
- };
9173
- }
9174
-
9175
9217
  /**
9176
9218
  * Emitted when shapes are created, updated, or deleted.
9177
9219
  * @public
@@ -9653,13 +9695,13 @@ export declare function usePassThroughWheelEvents(ref: RefObject<HTMLElement | n
9653
9695
  * @returns The list of peer UserIDs
9654
9696
  * @public
9655
9697
  */
9656
- export declare function usePeerIds(): string[];
9698
+ export declare function usePeerIds(): TLUserId[];
9657
9699
 
9658
9700
  /**
9659
9701
  * @returns The latest presence of the user matching userId
9660
9702
  * @public
9661
9703
  */
9662
- export declare function usePresence(userId: string): null | TLInstancePresence;
9704
+ export declare function usePresence(userId: TLUserId): null | TLInstancePresence;
9663
9705
 
9664
9706
  /* Excluded from this release type: USER_COLORS */
9665
9707
 
@@ -9699,7 +9741,25 @@ export declare class UserPreferencesManager {
9699
9741
  getEdgeScrollSpeed(): number;
9700
9742
  getAnimationSpeed(): number;
9701
9743
  getAreKeyboardShortcutsEnabled(): boolean;
9744
+ /**
9745
+ * The current user's raw, app-provided id — the value set in the user's
9746
+ * {@link @tldraw/editor#TLUserPreferences}. Use this when you need the id your application
9747
+ * assigned to the user. To compare against or look up store records, use
9748
+ * {@link UserPreferencesManager.getRecordId} instead.
9749
+ */
9750
+ getExternalId(): string;
9751
+ /**
9752
+ * @deprecated Use {@link UserPreferencesManager.getExternalId} for the raw app-provided id, or
9753
+ * {@link UserPreferencesManager.getRecordId} for the prefixed `TLUserId` record id.
9754
+ */
9702
9755
  getId(): string;
9756
+ /**
9757
+ * The current user's id as a tldraw {@link @tldraw/tlschema#TLUserId} record id (prefixed
9758
+ * with `user:`). Use this when comparing against or looking up store records, such as a
9759
+ * presence record's `userId` or `followingUserId`. For the raw, app-provided id, use
9760
+ * {@link UserPreferencesManager.getExternalId}.
9761
+ */
9762
+ getRecordId(): TLUserId;
9703
9763
  getName(): string;
9704
9764
  getLocale(): string;
9705
9765
  getColor(): string;
@@ -9749,9 +9809,6 @@ export declare function useTLSchemaFromUtils(opts: TLStoreSchemaOptions): StoreS
9749
9809
  /** @public */
9750
9810
  export declare function useTLStore(opts: TLStoreOptions): TLStore;
9751
9811
 
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
9812
  /**
9756
9813
  * React's useId hook returns a unique id for the component. However, it uses a colon in the id,
9757
9814
  * 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,
@@ -88,7 +87,6 @@ __export(index_exports, {
88
87
  SIN: () => import_utils2.SIN,
89
88
  SVGContainer: () => import_SVGContainer.SVGContainer,
90
89
  ScribbleManager: () => import_ScribbleManager.ScribbleManager,
91
- ShapeIndicatorOverlayUtil: () => import_ShapeIndicatorOverlayUtil.ShapeIndicatorOverlayUtil,
92
90
  ShapeUtil: () => import_ShapeUtil.ShapeUtil,
93
91
  SharedStyleMap: () => import_SharedStylesMap.SharedStyleMap,
94
92
  SnapManager: () => import_SnapManager.SnapManager,
@@ -111,6 +109,7 @@ __export(index_exports, {
111
109
  approximately: () => import_utils2.approximately,
112
110
  areAnglesCompatible: () => import_utils2.areAnglesCompatible,
113
111
  average: () => import_utils2.average,
112
+ cancelShapeCreationOnLongPress: () => import_cancelShapeCreationOnLongPress.cancelShapeCreationOnLongPress,
114
113
  canonicalizeRotation: () => import_utils2.canonicalizeRotation,
115
114
  centerOfCircleFromThreePoints: () => import_utils2.centerOfCircleFromThreePoints,
116
115
  clamp: () => import_utils2.clamp,
@@ -179,6 +178,7 @@ __export(index_exports, {
179
178
  loadSnapshot: () => import_TLEditorSnapshot.loadSnapshot,
180
179
  loopToHtmlElement: () => import_dom.loopToHtmlElement,
181
180
  maybeSnapToGrid: () => import_Pointing.maybeSnapToGrid,
181
+ moveElementInto: () => import_dom.moveElementInto,
182
182
  normalizeWheel: () => import_normalizeWheel.normalizeWheel,
183
183
  openWindow: () => import_runtime.openWindow,
184
184
  parseDeepLinkString: () => import_deepLinks.parseDeepLinkString,
@@ -194,6 +194,7 @@ __export(index_exports, {
194
194
  releasePointerCapture: () => import_dom.releasePointerCapture,
195
195
  resizeBox: () => import_resizeBox.resizeBox,
196
196
  resizeScaled: () => import_resizeScaled.resizeScaled,
197
+ resolveLineHeightPx: () => import_TextManager.resolveLineHeightPx,
197
198
  resolveThemes: () => import_ThemeManager.resolveThemes,
198
199
  rotateSelectionHandle: () => import_Box.rotateSelectionHandle,
199
200
  runtime: () => import_runtime.runtime,
@@ -204,7 +205,7 @@ __export(index_exports, {
204
205
  shortAngleDist: () => import_utils2.shortAngleDist,
205
206
  snapAngle: () => import_utils2.snapAngle,
206
207
  stopEventPropagation: () => import_dom.stopEventPropagation,
207
- strokeShapeIndicators: () => import_ShapeIndicatorOverlayUtil.strokeShapeIndicators,
208
+ strokeShapeIndicators: () => import_strokeShapeIndicators.strokeShapeIndicators,
208
209
  suffixSafeId: () => import_useSafeId.suffixSafeId,
209
210
  tlenv: () => import_environment.tlenv,
210
211
  tlenvReactive: () => import_environment.tlenvReactive,
@@ -240,7 +241,6 @@ __export(index_exports, {
240
241
  useTLSchemaFromUtils: () => import_useTLStore.useTLSchemaFromUtils,
241
242
  useTLStore: () => import_useTLStore.useTLStore,
242
243
  useTldrawCurrentUser: () => import_createTLCurrentUser.useTldrawCurrentUser,
243
- useTransform: () => import_useTransform.useTransform,
244
244
  useUniqueSafeId: () => import_useSafeId.useUniqueSafeId,
245
245
  useViewportHeight: () => import_useViewportHeight.useViewportHeight,
246
246
  userTypeValidator: () => import_TLUserPreferences.userTypeValidator
@@ -257,7 +257,6 @@ var import_DefaultBackground = require("./lib/components/default-components/Defa
257
257
  var import_DefaultCanvas = require("./lib/components/default-components/DefaultCanvas");
258
258
  var import_DefaultErrorFallback = require("./lib/components/default-components/DefaultErrorFallback");
259
259
  var import_DefaultGrid = require("./lib/components/default-components/DefaultGrid");
260
- var import_DefaultSelectionBackground = require("./lib/components/default-components/DefaultSelectionBackground");
261
260
  var import_DefaultShapeWrapper = require("./lib/components/default-components/DefaultShapeWrapper");
262
261
  var import_DefaultSpinner = require("./lib/components/default-components/DefaultSpinner");
263
262
  var import_DefaultSvgDefs = require("./lib/components/default-components/DefaultSvgDefs");
@@ -300,12 +299,13 @@ var import_ShapeUtil = require("./lib/editor/shapes/ShapeUtil");
300
299
  var import_getOverlayDisplayValues = require("./lib/editor/overlays/getOverlayDisplayValues");
301
300
  var import_OverlayManager = require("./lib/editor/overlays/OverlayManager");
302
301
  var import_OverlayUtil = require("./lib/editor/overlays/OverlayUtil");
303
- var import_ShapeIndicatorOverlayUtil = require("./lib/editor/overlays/ShapeIndicatorOverlayUtil");
302
+ var import_strokeShapeIndicators = require("./lib/editor/overlays/strokeShapeIndicators");
304
303
  var import_getPerfectDashProps = require("./lib/editor/shapes/shared/getPerfectDashProps");
305
304
  var import_resizeBox = require("./lib/editor/shapes/shared/resizeBox");
306
305
  var import_resizeScaled = require("./lib/editor/shapes/shared/resizeScaled");
307
306
  var import_BaseBoxShapeTool = require("./lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool");
308
307
  var import_Pointing = require("./lib/editor/tools/BaseBoxShapeTool/children/Pointing");
308
+ var import_cancelShapeCreationOnLongPress = require("./lib/editor/tools/cancelShapeCreationOnLongPress");
309
309
  var import_StateNode = require("./lib/editor/tools/StateNode");
310
310
  var import_event_types = require("./lib/editor/types/event-types");
311
311
  var import_SvgExportContext = require("./lib/editor/types/SvgExportContext");
@@ -332,7 +332,6 @@ var import_usePresence = require("./lib/hooks/usePresence");
332
332
  var import_useRefState = require("./lib/hooks/useRefState");
333
333
  var import_useSafeId = require("./lib/hooks/useSafeId");
334
334
  var import_useTLStore = require("./lib/hooks/useTLStore");
335
- var import_useTransform = require("./lib/hooks/useTransform");
336
335
  var import_useViewportHeight = require("./lib/hooks/useViewportHeight");
337
336
  var import_LicenseManager = require("./lib/license/LicenseManager");
338
337
  var import_LicenseProvider = require("./lib/license/LicenseProvider");
@@ -380,7 +379,7 @@ var import_uniq = require("./lib/utils/uniq");
380
379
  var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
381
380
  (0, import_utils.registerTldrawLibraryVersion)(
382
381
  "@tldraw/editor",
383
- "5.2.0-next.ee0fa4d6244f",
382
+ "5.2.0",
384
383
  "cjs"
385
384
  );
386
385
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultErrorFallback,\n\ttype TLErrorFallbackComponent,\n} from './lib/components/default-components/DefaultErrorFallback'\nexport { DefaultGrid, type TLGridProps } from './lib/components/default-components/DefaultGrid'\nexport {\n\tDefaultSelectionBackground,\n\ttype TLSelectionBackgroundProps,\n} from './lib/components/default-components/DefaultSelectionBackground'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\tcreateTLCurrentUser,\n\tuseTldrawCurrentUser,\n\ttype TLCurrentUser,\n} from './lib/config/createTLCurrentUser'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tdefaultUserStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { type TLAnyAssetUtilConstructor } from './lib/config/defaultAssets'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport { AssetUtil, type TLAssetUtilConstructor } from './lib/editor/assets/AssetUtil'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport { FontManager } from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\ttype BatchMeasurementRequest,\n\ttype TLMeasuredTextSize,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { DEFAULT_THEME } from './lib/editor/managers/ThemeManager/defaultThemes'\nexport { ThemeManager, resolveThemes } from './lib/editor/managers/ThemeManager/ThemeManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { CollaboratorsManager } from './lib/editor/managers/CollaboratorsManager/CollaboratorsManager'\nexport { PerformanceApiAdapter } from './lib/editor/managers/PerformanceManager/PerformanceApiAdapter'\nexport { PerformanceManager } from './lib/editor/managers/PerformanceManager/PerformanceManager'\nexport {\n\ttype TLCameraEndPerfEvent,\n\ttype TLCameraStartPerfEvent,\n\ttype TLFramePerfEvent,\n\ttype TLInteractionEndPerfEvent,\n\ttype TLInteractionStartPerfEvent,\n\ttype TLPerfEventMap,\n\ttype TLPerfFrameTimeStats,\n\ttype TLPerfLongAnimationFrame,\n\ttype TLPerfLongAnimationFrameScript,\n\ttype TLShapeOperationPerfEvent,\n\ttype TLUndoRedoPerfEvent,\n} from './lib/editor/managers/PerformanceManager/perf-types'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { BaseFrameLikeShapeUtil } from './lib/editor/shapes/BaseFrameLikeShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetOverlayDisplayValues,\n\ttype OverlayOptionsWithDisplayValues,\n} from './lib/editor/overlays/getOverlayDisplayValues'\nexport { OverlayManager, type TLOverlayEntry } from './lib/editor/overlays/OverlayManager'\nexport {\n\tOverlayUtil,\n\ttype TLAnyOverlayUtilConstructor,\n\ttype TLOverlay,\n\ttype TLOverlayUtilConstructor,\n} from './lib/editor/overlays/OverlayUtil'\nexport {\n\tShapeIndicatorOverlayUtil,\n\tstrokeShapeIndicators,\n\ttype TLShapeIndicatorOverlay,\n} from './lib/editor/overlays/ShapeIndicatorOverlayUtil'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getOwnerDocument, getOwnerWindow } from './lib/exports/domUtils'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { useColorMode } from './lib/hooks/useColorMode'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughMouseOverEvents } from './lib/hooks/usePassThroughMouseOverEvents'\nexport { usePassThroughWheelEvents } from './lib/hooks/usePassThroughWheelEvents'\nexport { usePeerIds } from './lib/hooks/usePeerIds'\nexport { usePresence } from './lib/hooks/usePresence'\nexport { useRefState } from './lib/hooks/useRefState'\nexport {\n\tsanitizeId,\n\tsuffixSafeId,\n\tuseSharedSafeId,\n\tuseUniqueSafeId,\n\ttype SafeId,\n} from './lib/hooks/useSafeId'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\nexport { useTransform } from './lib/hooks/useTransform'\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\nexport {\n\tdefaultTldrawOptions,\n\ttype TLClipboardPasteRawInfo,\n\ttype TLClipboardWriteInfo,\n\ttype TldrawOptions,\n} from './lib/options'\nexport {\n\tBox,\n\tROTATE_CORNER_TO_SELECTION_CORNER,\n\trotateSelectionHandle,\n\ttype BoxLike,\n\ttype RotateCorner,\n\ttype SelectionCorner,\n\ttype SelectionEdge,\n\ttype SelectionHandle,\n} from './lib/primitives/Box'\nexport { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\telementShouldCaptureKeys,\n\tgetGlobalDocument,\n\tgetGlobalWindow,\n\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport {\n\thardResetEditor,\n\topenWindow,\n\trefreshPage,\n\truntime,\n\tsetRuntimeOverrides,\n} from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n\nexport { getColorValue } from './lib/editor/managers/ThemeManager/defaultThemes'\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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oBAAoD;AACpD,kCAAgE;AAChE,yBAOO;AACP,uBAKO;AACP,iBAWO;AACP,wBAA2B;AAC3B,gCAAmC;AACnC,4BAA+B;AAC/B,kCAAqC;AACrC,sBAA2B;AAC3B,4BAA+B;AAC/B,yBAAoE;AACpE,sBAOO;AACP,sBAIO;AACP,qBAMO;AACP,6BAIO;AACP,uBAA0B;AAC1B,4BAAsD;AAEtD,kBAAqB;AAQrB,IAAAC,wBAA8B;AAAA,IAN9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from '@tldraw/validate'\n\nexport { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultErrorFallback,\n\ttype TLErrorFallbackComponent,\n} from './lib/components/default-components/DefaultErrorFallback'\nexport { DefaultGrid, type TLGridProps } from './lib/components/default-components/DefaultGrid'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\tcreateTLCurrentUser,\n\tuseTldrawCurrentUser,\n\ttype TLCurrentUser,\n} from './lib/config/createTLCurrentUser'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tdefaultUserStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { type TLAnyAssetUtilConstructor } from './lib/config/defaultAssets'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport { AssetUtil, type TLAssetUtilConstructor } from './lib/editor/assets/AssetUtil'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport { FontManager } from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\tresolveLineHeightPx,\n\ttype BatchMeasurementRequest,\n\ttype TLMeasuredTextSize,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { DEFAULT_THEME } from './lib/editor/managers/ThemeManager/defaultThemes'\nexport { ThemeManager, resolveThemes } from './lib/editor/managers/ThemeManager/ThemeManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { CollaboratorsManager } from './lib/editor/managers/CollaboratorsManager/CollaboratorsManager'\nexport { PerformanceApiAdapter } from './lib/editor/managers/PerformanceManager/PerformanceApiAdapter'\nexport { PerformanceManager } from './lib/editor/managers/PerformanceManager/PerformanceManager'\nexport {\n\ttype TLCameraEndPerfEvent,\n\ttype TLCameraStartPerfEvent,\n\ttype TLFramePerfEvent,\n\ttype TLInteractionEndPerfEvent,\n\ttype TLInteractionStartPerfEvent,\n\ttype TLPerfEventMap,\n\ttype TLPerfFrameTimeStats,\n\ttype TLPerfLongAnimationFrame,\n\ttype TLPerfLongAnimationFrameScript,\n\ttype TLShapeOperationPerfEvent,\n\ttype TLUndoRedoPerfEvent,\n} from './lib/editor/managers/PerformanceManager/perf-types'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { BaseFrameLikeShapeUtil } from './lib/editor/shapes/BaseFrameLikeShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetOverlayDisplayValues,\n\ttype OverlayOptionsWithDisplayValues,\n} from './lib/editor/overlays/getOverlayDisplayValues'\nexport { OverlayManager, type TLOverlayEntry } from './lib/editor/overlays/OverlayManager'\nexport {\n\tOverlayUtil,\n\ttype TLAnyOverlayUtilConstructor,\n\ttype TLOverlay,\n\ttype TLOverlayUtilConstructor,\n} from './lib/editor/overlays/OverlayUtil'\nexport { strokeShapeIndicators } from './lib/editor/overlays/strokeShapeIndicators'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { cancelShapeCreationOnLongPress } from './lib/editor/tools/cancelShapeCreationOnLongPress'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getOwnerDocument, getOwnerWindow } from './lib/exports/domUtils'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { useColorMode } from './lib/hooks/useColorMode'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { useIsEditing } from './lib/hooks/useIsEditing'\nexport { useLocalStore } from './lib/hooks/useLocalStore'\nexport { usePassThroughMouseOverEvents } from './lib/hooks/usePassThroughMouseOverEvents'\nexport { usePassThroughWheelEvents } from './lib/hooks/usePassThroughWheelEvents'\nexport { usePeerIds } from './lib/hooks/usePeerIds'\nexport { usePresence } from './lib/hooks/usePresence'\nexport { useRefState } from './lib/hooks/useRefState'\nexport {\n\tsanitizeId,\n\tsuffixSafeId,\n\tuseSharedSafeId,\n\tuseUniqueSafeId,\n\ttype SafeId,\n} from './lib/hooks/useSafeId'\nexport { useTLSchemaFromUtils, useTLStore } from './lib/hooks/useTLStore'\nexport { useViewportHeight } from './lib/hooks/useViewportHeight'\nexport {\n\tLicenseManager,\n\ttype InvalidLicenseKeyResult,\n\ttype InvalidLicenseReason,\n\ttype LicenseFromKeyResult,\n\ttype LicenseInfo,\n\ttype LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\nexport {\n\tdefaultTldrawOptions,\n\ttype TLClipboardPasteRawInfo,\n\ttype TLClipboardWriteInfo,\n\ttype TldrawOptions,\n} from './lib/options'\nexport {\n\tBox,\n\tROTATE_CORNER_TO_SELECTION_CORNER,\n\trotateSelectionHandle,\n\ttype BoxLike,\n\ttype RotateCorner,\n\ttype SelectionCorner,\n\ttype SelectionEdge,\n\ttype SelectionHandle,\n} from './lib/primitives/Box'\nexport { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\telementShouldCaptureKeys,\n\tgetGlobalDocument,\n\tgetGlobalWindow,\n\tloopToHtmlElement,\n\tmoveElementInto,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport {\n\thardResetEditor,\n\topenWindow,\n\trefreshPage,\n\truntime,\n\tsetRuntimeOverrides,\n} from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n\nexport { getColorValue } from './lib/editor/managers/ThemeManager/defaultThemes'\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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