@tldraw/editor 3.14.0-canary.f8af44c4d1e2 → 3.14.0-canary.faba3f64c07f

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 (174) hide show
  1. package/dist-cjs/index.d.ts +150 -76
  2. package/dist-cjs/index.js +11 -10
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/config/TLSessionStateSnapshot.js +1 -12
  5. package/dist-cjs/lib/config/TLSessionStateSnapshot.js.map +3 -3
  6. package/dist-cjs/lib/editor/Editor.js +109 -94
  7. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  8. package/dist-cjs/lib/editor/bindings/BindingUtil.js.map +2 -2
  9. package/dist-cjs/lib/editor/derivations/bindingsIndex.js +22 -22
  10. package/dist-cjs/lib/editor/derivations/bindingsIndex.js.map +2 -2
  11. package/dist-cjs/lib/editor/derivations/parentsToChildren.js +16 -16
  12. package/dist-cjs/lib/editor/derivations/parentsToChildren.js.map +2 -2
  13. package/dist-cjs/lib/editor/managers/{ClickManager.js → ClickManager/ClickManager.js} +1 -1
  14. package/dist-cjs/lib/editor/managers/ClickManager/ClickManager.js.map +7 -0
  15. package/dist-cjs/lib/editor/managers/{EdgeScrollManager.js → EdgeScrollManager/EdgeScrollManager.js} +2 -2
  16. package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js.map +7 -0
  17. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js.map +7 -0
  18. package/dist-cjs/lib/editor/managers/{FontManager.js → FontManager/FontManager.js} +1 -2
  19. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +7 -0
  20. package/dist-cjs/lib/editor/managers/{HistoryManager.js → HistoryManager/HistoryManager.js} +64 -6
  21. package/dist-cjs/lib/editor/managers/HistoryManager/HistoryManager.js.map +7 -0
  22. package/dist-cjs/lib/editor/managers/{ScribbleManager.js → ScribbleManager/ScribbleManager.js} +1 -1
  23. package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js.map +7 -0
  24. package/dist-cjs/lib/editor/managers/{TextManager.js → TextManager/TextManager.js} +73 -42
  25. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +7 -0
  26. package/dist-cjs/lib/editor/managers/{TickManager.js → TickManager/TickManager.js} +1 -1
  27. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +7 -0
  28. package/dist-cjs/lib/editor/managers/{UserPreferencesManager.js → UserPreferencesManager/UserPreferencesManager.js} +1 -1
  29. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +7 -0
  30. package/dist-cjs/lib/editor/shapes/ShapeUtil.js +0 -10
  31. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  32. package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +1 -1
  33. package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +1 -1
  34. package/dist-cjs/lib/editor/tools/StateNode.js +3 -3
  35. package/dist-cjs/lib/editor/tools/StateNode.js.map +2 -2
  36. package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
  37. package/dist-cjs/lib/editor/types/external-content.js.map +1 -1
  38. package/dist-cjs/lib/exports/getSvgJsx.js.map +1 -1
  39. package/dist-cjs/lib/hooks/useCanvasEvents.js +1 -2
  40. package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
  41. package/dist-cjs/lib/primitives/Box.js +0 -6
  42. package/dist-cjs/lib/primitives/Box.js.map +2 -2
  43. package/dist-cjs/lib/primitives/geometry/Geometry2d.js +6 -2
  44. package/dist-cjs/lib/primitives/geometry/Geometry2d.js.map +2 -2
  45. package/dist-cjs/lib/utils/areShapesContentEqual.js +1 -1
  46. package/dist-cjs/lib/utils/areShapesContentEqual.js.map +2 -2
  47. package/dist-cjs/lib/utils/reorderShapes.js +11 -10
  48. package/dist-cjs/lib/utils/reorderShapes.js.map +2 -2
  49. package/dist-cjs/lib/utils/reparenting.js +232 -0
  50. package/dist-cjs/lib/utils/reparenting.js.map +7 -0
  51. package/dist-cjs/lib/utils/richText.js +7 -2
  52. package/dist-cjs/lib/utils/richText.js.map +2 -2
  53. package/dist-cjs/version.js +3 -3
  54. package/dist-cjs/version.js.map +1 -1
  55. package/dist-esm/index.d.mts +150 -76
  56. package/dist-esm/index.mjs +15 -10
  57. package/dist-esm/index.mjs.map +2 -2
  58. package/dist-esm/lib/config/TLSessionStateSnapshot.mjs +1 -1
  59. package/dist-esm/lib/config/TLSessionStateSnapshot.mjs.map +2 -2
  60. package/dist-esm/lib/editor/Editor.mjs +109 -94
  61. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  62. package/dist-esm/lib/editor/bindings/BindingUtil.mjs.map +2 -2
  63. package/dist-esm/lib/editor/derivations/bindingsIndex.mjs +22 -22
  64. package/dist-esm/lib/editor/derivations/bindingsIndex.mjs.map +2 -2
  65. package/dist-esm/lib/editor/derivations/parentsToChildren.mjs +16 -16
  66. package/dist-esm/lib/editor/derivations/parentsToChildren.mjs.map +2 -2
  67. package/dist-esm/lib/editor/managers/{ClickManager.mjs → ClickManager/ClickManager.mjs} +1 -1
  68. package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs.map +7 -0
  69. package/dist-esm/lib/editor/managers/{EdgeScrollManager.mjs → EdgeScrollManager/EdgeScrollManager.mjs} +2 -2
  70. package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs.map +7 -0
  71. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs.map +7 -0
  72. package/dist-esm/lib/editor/managers/{FontManager.mjs → FontManager/FontManager.mjs} +1 -2
  73. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +7 -0
  74. package/dist-esm/lib/editor/managers/{HistoryManager.mjs → HistoryManager/HistoryManager.mjs} +60 -2
  75. package/dist-esm/lib/editor/managers/HistoryManager/HistoryManager.mjs.map +7 -0
  76. package/dist-esm/lib/editor/managers/{ScribbleManager.mjs → ScribbleManager/ScribbleManager.mjs} +1 -1
  77. package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs.map +7 -0
  78. package/dist-esm/lib/editor/managers/{TextManager.mjs → TextManager/TextManager.mjs} +73 -42
  79. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +7 -0
  80. package/dist-esm/lib/editor/managers/{TickManager.mjs → TickManager/TickManager.mjs} +1 -1
  81. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +7 -0
  82. package/dist-esm/lib/editor/managers/{UserPreferencesManager.mjs → UserPreferencesManager/UserPreferencesManager.mjs} +1 -1
  83. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +7 -0
  84. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +0 -10
  85. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  86. package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +1 -1
  87. package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +1 -1
  88. package/dist-esm/lib/editor/tools/StateNode.mjs +3 -3
  89. package/dist-esm/lib/editor/tools/StateNode.mjs.map +2 -2
  90. package/dist-esm/lib/exports/getSvgJsx.mjs.map +1 -1
  91. package/dist-esm/lib/hooks/useCanvasEvents.mjs +1 -2
  92. package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
  93. package/dist-esm/lib/primitives/Box.mjs +0 -6
  94. package/dist-esm/lib/primitives/Box.mjs.map +2 -2
  95. package/dist-esm/lib/primitives/geometry/Geometry2d.mjs +6 -2
  96. package/dist-esm/lib/primitives/geometry/Geometry2d.mjs.map +2 -2
  97. package/dist-esm/lib/utils/areShapesContentEqual.mjs +1 -1
  98. package/dist-esm/lib/utils/areShapesContentEqual.mjs.map +2 -2
  99. package/dist-esm/lib/utils/reorderShapes.mjs +11 -10
  100. package/dist-esm/lib/utils/reorderShapes.mjs.map +2 -2
  101. package/dist-esm/lib/utils/reparenting.mjs +216 -0
  102. package/dist-esm/lib/utils/reparenting.mjs.map +7 -0
  103. package/dist-esm/lib/utils/richText.mjs +8 -3
  104. package/dist-esm/lib/utils/richText.mjs.map +2 -2
  105. package/dist-esm/version.mjs +3 -3
  106. package/dist-esm/version.mjs.map +1 -1
  107. package/editor.css +442 -492
  108. package/package.json +8 -9
  109. package/src/index.ts +20 -8
  110. package/src/lib/config/TLSessionStateSnapshot.ts +1 -1
  111. package/src/lib/editor/Editor.test.ts +252 -3
  112. package/src/lib/editor/Editor.ts +120 -101
  113. package/src/lib/editor/bindings/BindingUtil.ts +6 -0
  114. package/src/lib/editor/derivations/bindingsIndex.ts +27 -26
  115. package/src/lib/editor/derivations/parentsToChildren.ts +28 -25
  116. package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +442 -0
  117. package/src/lib/editor/managers/{ClickManager.ts → ClickManager/ClickManager.ts} +3 -3
  118. package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.test.ts +374 -0
  119. package/src/lib/editor/managers/{EdgeScrollManager.ts → EdgeScrollManager/EdgeScrollManager.ts} +3 -3
  120. package/src/lib/editor/managers/FocusManager/FocusManager.test.ts +455 -0
  121. package/src/lib/editor/managers/{FocusManager.ts → FocusManager/FocusManager.ts} +1 -1
  122. package/src/lib/editor/managers/FontManager/FontManager.test.ts +263 -0
  123. package/src/lib/editor/managers/{FontManager.ts → FontManager/FontManager.ts} +2 -3
  124. package/src/lib/editor/managers/{HistoryManager.test.ts → HistoryManager/HistoryManager.test.ts} +388 -1
  125. package/src/lib/editor/managers/{HistoryManager.ts → HistoryManager/HistoryManager.ts} +73 -2
  126. package/src/lib/editor/managers/ScribbleManager/ScribbleManager.test.ts +624 -0
  127. package/src/lib/editor/managers/{ScribbleManager.ts → ScribbleManager/ScribbleManager.ts} +2 -2
  128. package/src/lib/editor/managers/SnapManager/SnapManager.test.ts +485 -0
  129. package/src/lib/editor/managers/TextManager/TextManager.test.ts +407 -0
  130. package/src/lib/editor/managers/{TextManager.ts → TextManager/TextManager.ts} +119 -87
  131. package/src/lib/editor/managers/TickManager/TickManager.test.ts +314 -0
  132. package/src/lib/editor/managers/{TickManager.ts → TickManager/TickManager.ts} +2 -2
  133. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +591 -0
  134. package/src/lib/editor/managers/{UserPreferencesManager.ts → UserPreferencesManager/UserPreferencesManager.ts} +2 -2
  135. package/src/lib/editor/shapes/ShapeUtil.ts +48 -16
  136. package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +1 -1
  137. package/src/lib/editor/tools/StateNode.ts +3 -3
  138. package/src/lib/editor/types/emit-types.ts +4 -0
  139. package/src/lib/editor/types/external-content.ts +11 -2
  140. package/src/lib/exports/getSvgJsx.tsx +1 -1
  141. package/src/lib/hooks/useCanvasEvents.ts +0 -1
  142. package/src/lib/primitives/Box.ts +0 -8
  143. package/src/lib/primitives/geometry/Geometry2d.ts +7 -2
  144. package/src/lib/utils/areShapesContentEqual.ts +1 -2
  145. package/src/lib/utils/reorderShapes.ts +10 -13
  146. package/src/lib/utils/reparenting.ts +383 -0
  147. package/src/lib/utils/richText.ts +10 -4
  148. package/src/version.ts +3 -3
  149. package/dist-cjs/lib/editor/managers/ClickManager.js.map +0 -7
  150. package/dist-cjs/lib/editor/managers/EdgeScrollManager.js.map +0 -7
  151. package/dist-cjs/lib/editor/managers/FocusManager.js.map +0 -7
  152. package/dist-cjs/lib/editor/managers/FontManager.js.map +0 -7
  153. package/dist-cjs/lib/editor/managers/HistoryManager.js.map +0 -7
  154. package/dist-cjs/lib/editor/managers/ScribbleManager.js.map +0 -7
  155. package/dist-cjs/lib/editor/managers/Stack.js +0 -82
  156. package/dist-cjs/lib/editor/managers/Stack.js.map +0 -7
  157. package/dist-cjs/lib/editor/managers/TextManager.js.map +0 -7
  158. package/dist-cjs/lib/editor/managers/TickManager.js.map +0 -7
  159. package/dist-cjs/lib/editor/managers/UserPreferencesManager.js.map +0 -7
  160. package/dist-esm/lib/editor/managers/ClickManager.mjs.map +0 -7
  161. package/dist-esm/lib/editor/managers/EdgeScrollManager.mjs.map +0 -7
  162. package/dist-esm/lib/editor/managers/FocusManager.mjs.map +0 -7
  163. package/dist-esm/lib/editor/managers/FontManager.mjs.map +0 -7
  164. package/dist-esm/lib/editor/managers/HistoryManager.mjs.map +0 -7
  165. package/dist-esm/lib/editor/managers/ScribbleManager.mjs.map +0 -7
  166. package/dist-esm/lib/editor/managers/Stack.mjs +0 -62
  167. package/dist-esm/lib/editor/managers/Stack.mjs.map +0 -7
  168. package/dist-esm/lib/editor/managers/TextManager.mjs.map +0 -7
  169. package/dist-esm/lib/editor/managers/TickManager.mjs.map +0 -7
  170. package/dist-esm/lib/editor/managers/UserPreferencesManager.mjs.map +0 -7
  171. package/src/lib/editor/managers/ScribbleManager.test.ts +0 -32
  172. package/src/lib/editor/managers/Stack.ts +0 -71
  173. /package/dist-cjs/lib/editor/managers/{FocusManager.js → FocusManager/FocusManager.js} +0 -0
  174. /package/dist-esm/lib/editor/managers/{FocusManager.mjs → FocusManager/FocusManager.mjs} +0 -0
@@ -138,9 +138,6 @@ export declare class Arc2d extends Geometry2d {
138
138
  */
139
139
  export declare function areAnglesCompatible(a: number, b: number): boolean;
140
140
 
141
- /** @public */
142
- export declare const areShapesContentEqual: (a: TLShape, b: TLShape) => boolean;
143
-
144
141
  /** @public */
145
142
  export declare function average(A: VecLike, B: VecLike): string;
146
143
 
@@ -209,6 +206,12 @@ export declare interface BindingOnShapeChangeOptions<Binding extends TLUnknownBi
209
206
  shapeBefore: TLShape;
210
207
  /** The shape record after the change is made. */
211
208
  shapeAfter: TLShape;
209
+ /**
210
+ * Why did this shape change?
211
+ * - 'self': the shape itself changed
212
+ * - 'ancestry': the ancestry of the shape changed, but the shape itself may not have done
213
+ */
214
+ reason: 'ancestry' | 'self';
212
215
  }
213
216
 
214
217
  /**
@@ -517,8 +520,6 @@ export declare class Box {
517
520
  };
518
521
  equals(other: Box | BoxModel): boolean;
519
522
  static Equals(a: Box | BoxModel, b: Box | BoxModel): boolean;
520
- prettyMuchEquals(other: Box | BoxModel): boolean;
521
- static PrettyMuchEquals(a: Box | BoxModel, b: Box | BoxModel): boolean;
522
523
  zeroFix(): this;
523
524
  static ZeroFix(other: Box | BoxModel): Box;
524
525
  }
@@ -1630,6 +1631,13 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1630
1631
  * @public
1631
1632
  */
1632
1633
  getSelectionPageBounds(): Box | null;
1634
+ /**
1635
+ * The bounds of the selection bounding box in the current page space.
1636
+ *
1637
+ * @readonly
1638
+ * @public
1639
+ */
1640
+ getSelectionScreenBounds(): Box | undefined;
1633
1641
  /* Excluded from this release type: getShapesSharedRotation */
1634
1642
  /**
1635
1643
  * The rotation of the selection bounding box in the current page space.
@@ -2460,23 +2468,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2460
2468
  * @public
2461
2469
  */
2462
2470
  getShapeGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId, opts?: TLGeometryOpts): T;
2463
- private _shapePageGeometryCaches;
2464
- /**
2465
- * Get the geometry of a shape in page-space.
2466
- *
2467
- * @example
2468
- * ```ts
2469
- * editor.getShapePageGeometry(myShape)
2470
- * editor.getShapePageGeometry(myShapeId)
2471
- * editor.getShapePageGeometry(myShapeId, { context: "arrow" })
2472
- * ```
2473
- *
2474
- * @param shape - The shape (or shape id) to get the geometry for.
2475
- * @param opts - Additional options about the request for geometry. Passed to {@link ShapeUtil.getGeometry}.
2476
- *
2477
- * @public
2478
- */
2479
- getShapePageGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId, opts?: TLGeometryOpts): T;
2480
2471
  /* Excluded from this release type: _getShapeHandlesCache */
2481
2472
  /**
2482
2473
  * Get the handles (if any) for a shape.
@@ -2654,11 +2645,16 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2654
2645
  *
2655
2646
  * @public
2656
2647
  */
2657
- isShapeOrAncestorLocked(shape?: TLShape): boolean;
2658
- isShapeOrAncestorLocked(id?: TLShapeId): boolean;
2648
+ isShapeOrAncestorLocked(shape?: TLShape | TLShapeId): boolean;
2649
+ /**
2650
+ * Get shapes that are outside of the viewport.
2651
+ *
2652
+ * @public
2653
+ */
2654
+ getNotVisibleShapes(): Set<TLShapeId>;
2659
2655
  private _notVisibleShapes;
2660
2656
  /**
2661
- * Get culled shapes.
2657
+ * Get culled shapes (those that should not render), taking into account which shapes are selected or editing.
2662
2658
  *
2663
2659
  * @public
2664
2660
  */
@@ -2700,12 +2696,14 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2700
2696
  * @example
2701
2697
  * ```ts
2702
2698
  * editor.getShapesAtPoint({ x: 100, y: 100 })
2703
- * editor.getShapesAtPoint({ x: 100, y: 100 }, { hitInside: true, exact: true })
2699
+ * editor.getShapesAtPoint({ x: 100, y: 100 }, { hitInside: true, margin: 8 })
2704
2700
  * ```
2705
2701
  *
2706
2702
  * @param point - The page point to test.
2707
2703
  * @param opts - The options for the hit point testing.
2708
2704
  *
2705
+ * @returns An array of shapes at the given point, sorted in reverse order of their absolute z-index (top-most shape first).
2706
+ *
2709
2707
  * @public
2710
2708
  */
2711
2709
  getShapesAtPoint(point: VecLike, opts?: {
@@ -2913,6 +2911,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2913
2911
  * @public
2914
2912
  */
2915
2913
  getShapeAndDescendantIds(ids: TLShapeId[]): Set<TLShapeId>;
2914
+ /** @deprecated Use {@link Editor.getDraggingOverShape} instead */
2915
+ getDroppingOverShape(point: Vec, droppingShapes: TLShape[]): TLShape | undefined;
2916
2916
  /**
2917
2917
  * Get the shape that some shapes should be dropped on at a given point.
2918
2918
  *
@@ -2923,7 +2923,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2923
2923
  *
2924
2924
  * @public
2925
2925
  */
2926
- getDroppingOverShape(point: VecLike, droppingShapes?: TLShape[]): TLUnknownShape | undefined;
2926
+ getDraggingOverShape(point: Vec, droppingShapes: TLShape[]): TLShape | undefined;
2927
2927
  /**
2928
2928
  * Get the shape that should be selected when you click on a given shape, assuming there is
2929
2929
  * nothing already selected. It will not return anything higher than or including the current
@@ -3610,6 +3610,12 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3610
3610
  * @param info - Info about the external content.
3611
3611
  */
3612
3612
  putExternalContent<E>(info: TLExternalContent<E>): Promise<void>;
3613
+ /**
3614
+ * Handle replacing external content.
3615
+ *
3616
+ * @param info - Info about the external content.
3617
+ */
3618
+ replaceExternalContent<E>(info: TLExternalContent<E>): Promise<void>;
3613
3619
  /**
3614
3620
  * Get content that can be exported for the given shape ids.
3615
3621
  *
@@ -4076,6 +4082,7 @@ export declare abstract class Geometry2d {
4076
4082
  isFilled: boolean;
4077
4083
  isClosed: boolean;
4078
4084
  isLabel: boolean;
4085
+ isEmptyLabel: boolean;
4079
4086
  isInternal: boolean;
4080
4087
  debugColor?: string;
4081
4088
  ignore?: boolean;
@@ -4167,6 +4174,21 @@ export declare function getCursor(cursor: TLCursorType, rotation?: number, color
4167
4174
  /** @public */
4168
4175
  export declare function getDefaultCdnBaseUrl(): string;
4169
4176
 
4177
+ /**
4178
+ * Get the shapes that will be reparented to new parents when the shapes are dropped.
4179
+ *
4180
+ * @param editor - The editor instance.
4181
+ * @param shapes - The shapes to check.
4182
+ * @param cb - A callback to filter out certain shapes.
4183
+ * @returns An object with the shapes that will be reparented to new parents and the shapes that will be reparented to the page or their ancestral group.
4184
+ *
4185
+ * @public
4186
+ */
4187
+ export declare function getDroppedShapesToNewParents(editor: Editor, shapes: Set<TLShape> | TLShape[], cb?: (shape: TLShape, parent: TLShape) => boolean): {
4188
+ remainingShapesToReparent: Set<TLShape>;
4189
+ reparenting: Map<TLShapeId, TLShape[]>;
4190
+ };
4191
+
4170
4192
  /** @public */
4171
4193
  export declare function getFontsFromRichText(editor: Editor, richText: TLRichText, initialState: RichTextFontVisitorState): TLFontFace[];
4172
4194
 
@@ -4520,6 +4542,20 @@ export declare function intersectPolygonPolygon(polygonA: VecLike[], polygonB: V
4520
4542
  */
4521
4543
  export declare const isSafeFloat: (n: number) => boolean;
4522
4544
 
4545
+ /**
4546
+ * Reparents shapes that are no longer contained within their parent shapes.
4547
+ * todo: rename me to something more descriptive, like `reparentOccludedShapes` or `reparentAutoDroppedShapes`
4548
+ *
4549
+ * @param editor - The editor instance.
4550
+ * @param shapeIds - The IDs of the shapes to reparent.
4551
+ * @param opts - Optional options, including a callback to filter out certain parents, such as when removing a frame.
4552
+ *
4553
+ * @public
4554
+ */
4555
+ export declare function kickoutOccludedShapes(editor: Editor, shapeIds: TLShapeId[], opts?: {
4556
+ filter?(parent: TLShape): boolean;
4557
+ }): void;
4558
+
4523
4559
  /* Excluded from this release type: LicenseFromKeyResult */
4524
4560
 
4525
4561
  /* Excluded from this release type: LicenseInfo */
@@ -5199,14 +5235,6 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5199
5235
  * @public
5200
5236
  */
5201
5237
  canReceiveNewChildrenOfType(_shape: Shape, _type: TLShape['type']): boolean;
5202
- /**
5203
- * Get whether the shape can receive children of a given type.
5204
- *
5205
- * @param shape - The shape type.
5206
- * @param shapes - The shapes that are being dropped.
5207
- * @public
5208
- */
5209
- canDropShapes(_shape: Shape, _shapes: TLShape[]): boolean;
5210
5238
  /**
5211
5239
  * Get the shape as an SVG object.
5212
5240
  *
@@ -5294,7 +5322,15 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5294
5322
  */
5295
5323
  onCrop?(shape: Shape, info: TLCropInfo<Shape>): Omit<TLShapePartial<Shape>, 'id' | 'type'> | undefined | void;
5296
5324
  /**
5297
- * A callback called when some other shapes are dragged over this one.
5325
+ * A callback called when some other shapes are dragged into this one. This fires when the shapes are dragged over the shape for the first time.
5326
+ *
5327
+ * @param shape - The shape.
5328
+ * @param shapes - The shapes that are being dragged in.
5329
+ * @public
5330
+ */
5331
+ onDragShapesIn?(shape: Shape, shapes: TLShape[], info: TLDragShapesInInfo): void;
5332
+ /**
5333
+ * A callback called when some other shapes are dragged over this one. This fires when the shapes are dragged over the shape for the first time (after the onDragShapesIn callback), and again on every update while the shapes are being dragged.
5298
5334
  *
5299
5335
  * @example
5300
5336
  *
@@ -5308,7 +5344,7 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5308
5344
  * @param shapes - The shapes that are being dragged over this one.
5309
5345
  * @public
5310
5346
  */
5311
- onDragShapesOver?(shape: Shape, shapes: TLShape[]): void;
5347
+ onDragShapesOver?(shape: Shape, shapes: TLShape[], info: TLDragShapesOverInfo): void;
5312
5348
  /**
5313
5349
  * A callback called when some other shapes are dragged out of this one.
5314
5350
  *
@@ -5316,7 +5352,7 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5316
5352
  * @param shapes - The shapes that are being dragged out.
5317
5353
  * @public
5318
5354
  */
5319
- onDragShapesOut?(shape: Shape, shapes: TLShape[]): void;
5355
+ onDragShapesOut?(shape: Shape, shapes: TLShape[], info: TLDragShapesOutInfo): void;
5320
5356
  /**
5321
5357
  * A callback called when some other shapes are dropped over this one.
5322
5358
  *
@@ -5324,7 +5360,7 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5324
5360
  * @param shapes - The shapes that are being dropped over this one.
5325
5361
  * @public
5326
5362
  */
5327
- onDropShapesOver?(shape: Shape, shapes: TLShape[]): void;
5363
+ onDropShapesOver?(shape: Shape, shapes: TLShape[], info: TLDropShapesOverInfo): void;
5328
5364
  /**
5329
5365
  * A callback called when a shape starts being resized.
5330
5366
  *
@@ -5626,7 +5662,7 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
5626
5662
  transition(id: string, info?: any): this;
5627
5663
  handleEvent(info: Exclude<TLEventInfo, TLPinchEventInfo>): void;
5628
5664
  enter(info: any, from: string): void;
5629
- exit(info: any, from: string): void;
5665
+ exit(info: any, to: string): void;
5630
5666
  /**
5631
5667
  * This is a hack / escape hatch that will tell the editor to
5632
5668
  * report a different state as active (in `getCurrentToolId()`) when
@@ -5733,43 +5769,15 @@ export declare const TAB_ID: string;
5733
5769
  /** @public */
5734
5770
  export declare class TextManager {
5735
5771
  editor: Editor;
5736
- private baseElem;
5772
+ private elm;
5773
+ private defaultStyles;
5737
5774
  constructor(editor: Editor);
5738
- measureText(textToMeasure: string, opts: {
5739
- /**
5740
- * When maxWidth is a number, the text will be wrapped to that maxWidth. When maxWidth
5741
- * is null, the text will be measured without wrapping, but explicit line breaks and
5742
- * space are preserved.
5743
- */
5744
- maxWidth: null | number;
5745
- disableOverflowWrapBreaking?: boolean;
5746
- fontFamily: string;
5747
- fontSize: number;
5748
- fontStyle: string;
5749
- fontWeight: string;
5750
- lineHeight: number;
5751
- minWidth?: null | number;
5752
- padding: string;
5753
- }): BoxModel & {
5775
+ dispose(): void;
5776
+ private resetElmStyles;
5777
+ measureText(textToMeasure: string, opts: TLMeasureTextOpts): BoxModel & {
5754
5778
  scrollWidth: number;
5755
5779
  };
5756
- measureHtml(html: string, opts: {
5757
- /**
5758
- * When maxWidth is a number, the text will be wrapped to that maxWidth. When maxWidth
5759
- * is null, the text will be measured without wrapping, but explicit line breaks and
5760
- * space are preserved.
5761
- */
5762
- maxWidth: null | number;
5763
- disableOverflowWrapBreaking?: boolean;
5764
- fontFamily: string;
5765
- fontSize: number;
5766
- fontStyle: string;
5767
- fontWeight: string;
5768
- lineHeight: number;
5769
- minWidth?: null | number;
5770
- otherStyles?: Record<string, string>;
5771
- padding: string;
5772
- }): BoxModel & {
5780
+ measureHtml(html: string, opts: TLMeasureTextOpts): BoxModel & {
5773
5781
  scrollWidth: number;
5774
5782
  };
5775
5783
  /**
@@ -6026,6 +6034,7 @@ export declare interface TLCropInfo<T extends TLShape> {
6026
6034
  w: number;
6027
6035
  };
6028
6036
  initialShape: T;
6037
+ aspectRatioLocked?: boolean;
6029
6038
  }
6030
6039
 
6031
6040
  /** @public */
@@ -6084,6 +6093,29 @@ export declare interface TLDeepLinkOptions {
6084
6093
  onChange?(url: URL, editor: Editor): void;
6085
6094
  }
6086
6095
 
6096
+ /** @public */
6097
+ export declare interface TLDragShapesInInfo {
6098
+ initialDraggingOverShapeId: null | TLShapeId;
6099
+ prevDraggingOverShapeId: null | TLShapeId;
6100
+ initialParentIds: Map<TLShapeId, TLParentId>;
6101
+ initialIndices: Map<TLShapeId, IndexKey>;
6102
+ }
6103
+
6104
+ /** @public */
6105
+ export declare interface TLDragShapesOutInfo {
6106
+ nextDraggingOverShapeId: null | TLShapeId;
6107
+ initialDraggingOverShapeId: null | TLShapeId;
6108
+ initialParentIds: Map<TLShapeId, TLParentId>;
6109
+ initialIndices: Map<TLShapeId, IndexKey>;
6110
+ }
6111
+
6112
+ /** @public */
6113
+ export declare interface TLDragShapesOverInfo {
6114
+ initialDraggingOverShapeId: null | TLShapeId;
6115
+ initialParentIds: Map<TLShapeId, TLParentId>;
6116
+ initialIndices: Map<TLShapeId, IndexKey>;
6117
+ }
6118
+
6087
6119
  /** @public @react */
6088
6120
  export declare const TldrawEditor: React_2.NamedExoticComponent<TldrawEditorProps>;
6089
6121
 
@@ -6331,6 +6363,13 @@ export declare interface TldrawOptions {
6331
6363
  readonly branding?: string;
6332
6364
  }
6333
6365
 
6366
+ /** @public */
6367
+ export declare interface TLDropShapesOverInfo {
6368
+ initialDraggingOverShapeId: null | TLShapeId;
6369
+ initialParentIds: Map<TLShapeId, TLParentId>;
6370
+ initialIndices: Map<TLShapeId, IndexKey>;
6371
+ }
6372
+
6334
6373
  /** @public */
6335
6374
  export declare interface TLEditorComponents {
6336
6375
  Background?: ComponentType | null;
@@ -6553,6 +6592,10 @@ export declare interface TLEventMap {
6553
6592
  };
6554
6593
  shapeId: TLShapeId;
6555
6594
  }];
6595
+ 'created-shapes': [TLRecord[]];
6596
+ 'edited-shapes': [TLRecord[]];
6597
+ 'deleted-shapes': [TLShapeId[]];
6598
+ edit: [];
6556
6599
  }
6557
6600
 
6558
6601
  /** @public */
@@ -6583,7 +6626,7 @@ export declare type TLExportType = 'jpeg' | 'png' | 'svg' | 'webp';
6583
6626
  export declare type TLExternalAsset = TLFileExternalAsset | TLUrlExternalAsset;
6584
6627
 
6585
6628
  /** @public */
6586
- export declare type TLExternalContent<EmbedDefinition> = TLEmbedExternalContent<EmbedDefinition> | TLExcalidrawExternalContent | TLFilesExternalContent | TLSvgTextExternalContent | TLTextExternalContent | TLTldrawExternalContent | TLUrlExternalContent;
6629
+ export declare type TLExternalContent<EmbedDefinition> = TLEmbedExternalContent<EmbedDefinition> | TLExcalidrawExternalContent | TLFileReplaceExternalContent | TLFilesExternalContent | TLSvgTextExternalContent | TLTextExternalContent | TLTldrawExternalContent | TLUrlExternalContent;
6587
6630
 
6588
6631
  /** @public */
6589
6632
  export declare type TLExternalContentSource = TLErrorExternalContentSource | TLExcalidrawExternalContentSource | TLTextExternalContentSource | TLTldrawExternalContentSource;
@@ -6595,11 +6638,19 @@ export declare interface TLFileExternalAsset {
6595
6638
  assetId?: TLAssetId;
6596
6639
  }
6597
6640
 
6641
+ /** @public */
6642
+ export declare interface TLFileReplaceExternalContent extends TLBaseExternalContent {
6643
+ type: 'file-replace';
6644
+ file: File;
6645
+ shapeId: TLShapeId;
6646
+ isImage: boolean;
6647
+ }
6648
+
6598
6649
  /** @public */
6599
6650
  export declare interface TLFilesExternalContent extends TLBaseExternalContent {
6600
6651
  type: 'files';
6601
6652
  files: File[];
6602
- ignoreParent: boolean;
6653
+ ignoreParent?: boolean;
6603
6654
  }
6604
6655
 
6605
6656
  /**
@@ -6794,6 +6845,27 @@ export declare interface TLLoadSnapshotOptions {
6794
6845
  forceOverwriteSessionState?: boolean;
6795
6846
  }
6796
6847
 
6848
+ /** @public */
6849
+ export declare interface TLMeasureTextOpts {
6850
+ fontStyle: string;
6851
+ fontWeight: string;
6852
+ fontFamily: string;
6853
+ fontSize: number;
6854
+ /** This must be a number, e.g. 1.35, not a pixel value. */
6855
+ lineHeight: number;
6856
+ /**
6857
+ * When maxWidth is a number, the text will be wrapped to that maxWidth. When maxWidth
6858
+ * is null, the text will be measured without wrapping, but explicit line breaks and
6859
+ * space are preserved.
6860
+ */
6861
+ maxWidth: null | number;
6862
+ minWidth?: null | number;
6863
+ padding: string;
6864
+ otherStyles?: Record<string, string>;
6865
+ disableOverflowWrapBreaking?: boolean;
6866
+ measureScrollWidth?: boolean;
6867
+ }
6868
+
6797
6869
  /** @public */
6798
6870
  export declare interface TLMeasureTextSpanOpts {
6799
6871
  overflow: 'truncate-clip' | 'truncate-ellipsis' | 'wrap';
@@ -6807,6 +6879,7 @@ export declare interface TLMeasureTextSpanOpts {
6807
6879
  lineHeight: number;
6808
6880
  textAlign: TLDefaultHorizontalAlignStyle;
6809
6881
  otherStyles?: Record<string, string>;
6882
+ measureScrollWidth?: boolean;
6810
6883
  }
6811
6884
 
6812
6885
  /** @public */
@@ -7468,6 +7541,7 @@ export declare class TransformedGeometry2d extends Geometry2d {
7468
7541
  /** @public */
7469
7542
  export declare interface TransformedGeometry2dOptions {
7470
7543
  isLabel?: boolean;
7544
+ isEmptyLabel?: boolean;
7471
7545
  isInternal?: boolean;
7472
7546
  debugColor?: string;
7473
7547
  ignore?: boolean;
package/dist-cjs/index.js CHANGED
@@ -103,7 +103,6 @@ __export(index_exports, {
103
103
  applyRotationToSnapshotShapes: () => import_rotation.applyRotationToSnapshotShapes,
104
104
  approximately: () => import_utils2.approximately,
105
105
  areAnglesCompatible: () => import_utils2.areAnglesCompatible,
106
- areShapesContentEqual: () => import_areShapesContentEqual.areShapesContentEqual,
107
106
  average: () => import_utils2.average,
108
107
  canonicalizeRotation: () => import_utils2.canonicalizeRotation,
109
108
  centerOfCircleFromThreePoints: () => import_utils2.centerOfCircleFromThreePoints,
@@ -129,6 +128,7 @@ __export(index_exports, {
129
128
  getArcMeasure: () => import_utils2.getArcMeasure,
130
129
  getCursor: () => import_useCursor.getCursor,
131
130
  getDefaultCdnBaseUrl: () => import_assets.getDefaultCdnBaseUrl,
131
+ getDroppedShapesToNewParents: () => import_reparenting.getDroppedShapesToNewParents,
132
132
  getFontsFromRichText: () => import_richText.getFontsFromRichText,
133
133
  getFreshUserPreferences: () => import_TLUserPreferences.getFreshUserPreferences,
134
134
  getIncrementedName: () => import_getIncrementedName.getIncrementedName,
@@ -157,6 +157,7 @@ __export(index_exports, {
157
157
  intersectPolygonPolygon: () => import_intersect.intersectPolygonPolygon,
158
158
  isAccelKey: () => import_keyboard.isAccelKey,
159
159
  isSafeFloat: () => import_utils2.isSafeFloat,
160
+ kickoutOccludedShapes: () => import_reparenting.kickoutOccludedShapes,
160
161
  linesIntersect: () => import_intersect.linesIntersect,
161
162
  loadSessionStateSnapshotIntoStore: () => import_TLSessionStateSnapshot.loadSessionStateSnapshotIntoStore,
162
163
  loadSnapshot: () => import_TLEditorSnapshot.loadSnapshot,
@@ -233,7 +234,6 @@ var import_flat_map = require("core-js/stable/array/flat-map.js");
233
234
  var import_flat = require("core-js/stable/array/flat.js");
234
235
  var import_at2 = require("core-js/stable/string/at.js");
235
236
  var import_replace_all = require("core-js/stable/string/replace-all.js");
236
- var import_areShapesContentEqual = require("./lib/utils/areShapesContentEqual");
237
237
  __reExport(index_exports, require("@tldraw/state"), module.exports);
238
238
  __reExport(index_exports, require("@tldraw/state-react"), module.exports);
239
239
  __reExport(index_exports, require("@tldraw/store"), module.exports);
@@ -271,16 +271,16 @@ var import_defaultShapes = require("./lib/config/defaultShapes");
271
271
  var import_constants = require("./lib/constants");
272
272
  var import_Editor = require("./lib/editor/Editor");
273
273
  var import_BindingUtil = require("./lib/editor/bindings/BindingUtil");
274
- var import_ClickManager = require("./lib/editor/managers/ClickManager");
275
- var import_EdgeScrollManager = require("./lib/editor/managers/EdgeScrollManager");
276
- var import_FontManager = require("./lib/editor/managers/FontManager");
277
- var import_HistoryManager = require("./lib/editor/managers/HistoryManager");
278
- var import_ScribbleManager = require("./lib/editor/managers/ScribbleManager");
274
+ var import_ClickManager = require("./lib/editor/managers/ClickManager/ClickManager");
275
+ var import_EdgeScrollManager = require("./lib/editor/managers/EdgeScrollManager/EdgeScrollManager");
276
+ var import_FontManager = require("./lib/editor/managers/FontManager/FontManager");
277
+ var import_HistoryManager = require("./lib/editor/managers/HistoryManager/HistoryManager");
278
+ var import_ScribbleManager = require("./lib/editor/managers/ScribbleManager/ScribbleManager");
279
279
  var import_BoundsSnaps = require("./lib/editor/managers/SnapManager/BoundsSnaps");
280
280
  var import_HandleSnaps = require("./lib/editor/managers/SnapManager/HandleSnaps");
281
281
  var import_SnapManager = require("./lib/editor/managers/SnapManager/SnapManager");
282
- var import_TextManager = require("./lib/editor/managers/TextManager");
283
- var import_UserPreferencesManager = require("./lib/editor/managers/UserPreferencesManager");
282
+ var import_TextManager = require("./lib/editor/managers/TextManager/TextManager");
283
+ var import_UserPreferencesManager = require("./lib/editor/managers/UserPreferencesManager/UserPreferencesManager");
284
284
  var import_BaseBoxShapeUtil = require("./lib/editor/shapes/BaseBoxShapeUtil");
285
285
  var import_ShapeUtil = require("./lib/editor/shapes/ShapeUtil");
286
286
  var import_GroupShapeUtil = require("./lib/editor/shapes/group/GroupShapeUtil");
@@ -351,6 +351,7 @@ var import_hardResetEditor = require("./lib/utils/hardResetEditor");
351
351
  var import_keyboard = require("./lib/utils/keyboard");
352
352
  var import_normalizeWheel = require("./lib/utils/normalizeWheel");
353
353
  var import_refreshPage = require("./lib/utils/refreshPage");
354
+ var import_reparenting = require("./lib/utils/reparenting");
354
355
  var import_richText = require("./lib/utils/richText");
355
356
  var import_rotation = require("./lib/utils/rotation");
356
357
  var import_runtime = require("./lib/utils/runtime");
@@ -363,7 +364,7 @@ function debugEnableLicensing() {
363
364
  }
364
365
  (0, import_utils.registerTldrawLibraryVersion)(
365
366
  "@tldraw/editor",
366
- "3.14.0-canary.f8af44c4d1e2",
367
+ "3.14.0-canary.faba3f64c07f",
367
368
  "cjs"
368
369
  );
369
370
  //# 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'\nimport 'core-js/stable/array/at.js'\nimport 'core-js/stable/array/flat-map.js'\nimport 'core-js/stable/array/flat.js'\nimport 'core-js/stable/string/at.js'\nimport 'core-js/stable/string/replace-all.js'\nexport { areShapesContentEqual } from './lib/utils/areShapesContentEqual'\n\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/validate'\n\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TLOnMountHandler,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n} from './lib/TldrawEditor'\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 { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport { DefaultBrush, type TLBrushProps } from './lib/components/default-components/DefaultBrush'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCollaboratorHint,\n\ttype TLCollaboratorHintProps,\n} from './lib/components/default-components/DefaultCollaboratorHint'\nexport {\n\tDefaultCursor,\n\ttype TLCursorProps,\n} from './lib/components/default-components/DefaultCursor'\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\tDefaultHandle,\n\ttype TLHandleProps,\n} from './lib/components/default-components/DefaultHandle'\nexport {\n\tDefaultHandles,\n\ttype TLHandlesProps,\n} from './lib/components/default-components/DefaultHandles'\nexport {\n\tDefaultScribble,\n\ttype TLScribbleProps,\n} from './lib/components/default-components/DefaultScribble'\nexport {\n\tDefaultSelectionBackground,\n\ttype TLSelectionBackgroundProps,\n} from './lib/components/default-components/DefaultSelectionBackground'\nexport {\n\tDefaultSelectionForeground,\n\ttype TLSelectionForegroundProps,\n} from './lib/components/default-components/DefaultSelectionForeground'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeIndicator,\n\ttype TLShapeIndicatorProps,\n} from './lib/components/default-components/DefaultShapeIndicator'\nexport { type TLShapeIndicatorErrorFallbackComponent } from './lib/components/default-components/DefaultShapeIndicatorErrorFallback'\nexport {\n\tDefaultShapeIndicators,\n\ttype TLShapeIndicatorsProps,\n} from './lib/components/default-components/DefaultShapeIndicators'\nexport {\n\tDefaultSnapIndicator,\n\ttype TLSnapIndicatorProps,\n} from './lib/components/default-components/DefaultSnapIndictor'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tTAB_ID,\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tUSER_COLORS,\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\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 { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager'\nexport {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager'\nexport { ScribbleManager, type ScribbleItem } from './lib/editor/managers/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 { TextManager, type TLMeasureTextSpanOpts } from './lib/editor/managers/TextManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\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 { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\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 {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\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 TLCLickEventName,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\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 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 TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLSvgOptions,\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 { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv } 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 { getCursor } from './lib/hooks/useCursor'\nexport { EditorContext, useEditor, useMaybeEditor } 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 { useIsDarkMode } from './lib/hooks/useIsDarkMode'\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 { useSelectionEvents } from './lib/hooks/useSelectionEvents'\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 TestEnvironment,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { defaultTldrawOptions, type TldrawOptions } 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 { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\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 {\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 {\n\tHALF_PI,\n\tPI,\n\tPI2,\n\tSIN,\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\tisSafeFloat,\n\tperimeterOfEllipse,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\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\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { hardResetEditor } from './lib/utils/hardResetEditor'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { refreshPage } from './lib/utils/refreshPage'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TLTextOptions,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport { runtime, setRuntimeOverrides } from './lib/utils/runtime'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { uniq } from './lib/utils/uniq'\nexport { openWindow } from './lib/utils/window-open'\n\n/**\n * @deprecated Licensing is now enabled in the tldraw SDK.\n * @public */\nexport function debugEnableLicensing() {\n\t// noop\n\treturn\n}\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"],
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;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;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,mBAA6C;AAC7C,gBAAO;AACP,sBAAO;AACP,kBAAO;AACP,IAAAA,aAAO;AACP,yBAAO;AACP,mCAAsC;AAGtC,0BAAc,0BATd;AAWA,0BAAc,gCAXd;AAaA,0BAAc,0BAbd;AAeA,0BAAc,6BAfd;AAiBA,0BAAc,0BAjBd;AAmBA,0BAAc,6BAnBd;AAqBA,0BAYO;AACP,2BAIO;AACP,2BAAuD;AACvD,8BAAiC;AACjC,0BAAqD;AACrD,+BAAkC;AAClC,0BAAgD;AAChD,2BAGO;AACP,qCAGO;AACP,2BAGO;AACP,kCAGO;AACP,yBAA8C;AAC9C,2BAGO;AACP,4BAGO;AACP,6BAGO;AACP,wCAGO;AACP,wCAGO;AAEP,mCAGO;AAEP,oCAGO;AACP,iCAGO;AACP,4BAA+B;AAC/B,4BAA+B;AAC/B,8BAKO;AACP,oCAOO;AACP,+BAQO;AACP,2BAQO;AACP,0BAAyD;AAEzD,2BAA2D;AAC3D,uBAAyE;AACzE,oBAMO;AACP,yBASO;AACP,0BAAgD;AAChD,+BAAkC;AAClC,yBAIO;AACP,4BAA+B;AAC/B,6BAAmD;AACnD,yBAIO;AACP,yBAAqD;AACrD,yBAMO;AACP,yBAAwD;AACxD,oCAAuC;AACvC,8BAAsD;AACtD,uBAWO;AACP,4BAA+B;AAC/B,iCAGO;AACP,uBAAiD;AACjD,0BAA6B;AAC7B,8BAAiC;AACjC,sBAAgC;AAChC,uBAAuD;AACvD,8BAKO;AAGP,yBAiCO;AA0CP,2BAA8B;AAC9B,yBAAsB;AACtB,mBAAwB;AACxB,kBAAuB;AACvB,0BAKO;AACP,uBAA0B;AAC1B,uBAAyD;AACzD,iCAAoC;AAEpC,sBAA2C;AAC3C,iCAAoC;AACpC,yBAAkE;AAClE,2BAA8B;AAC9B,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAC9B,2CAA8C;AAC9C,uCAA0C;AAC1C,wBAA2B;AAC3B,yBAA4B;AAC5B,yBAA4B;AAC5B,uBAMO;AACP,gCAAmC;AACnC,wBAAiD;AACjD,0BAA6B;AAC7B,+BAAkC;AAClC,4BAQO;AACP,qBAAyD;AACzD,iBASO;AACP,iBAAiD;AACjD,iBAAkC;AAClC,qBAAwB;AACxB,mBAAsB;AACtB,sBAAyB;AACzB,2BAA8B;AAC9B,2BAA8B;AAC9B,oBAAuB;AACvB,uBAA0B;AAC1B,wBAMO;AACP,qBAAwB;AACxB,qBAAwB;AACxB,uBAA0B;AAC1B,wBAA2B;AAC3B,yBAA4B;AAC5B,uBAA0B;AAC1B,uBAaO;AACP,IAAAC,gBAgCO;AACP,6BAIO;AACP,oBAAoD;AACpD,kCAAgE;AAChE,yBAMO;AACP,uBAKO;AACP,iBAOO;AACP,gCAAmC;AACnC,4BAA+B;AAC/B,kCAAqC;AACrC,6BAAgC;AAChC,sBAA2B;AAC3B,4BAA+B;AAC/B,yBAA4B;AAC5B,sBAOO;AACP,sBAIO;AACP,qBAA6C;AAC7C,4BAAsD;AAEtD,uBAA0B;AAC1B,kBAAqB;AACrB,yBAA2B;AAKpB,SAAS,uBAAuB;AAEtC;AACD;AAAA,IAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nimport 'core-js/stable/array/at.js'\nimport 'core-js/stable/array/flat-map.js'\nimport 'core-js/stable/array/flat.js'\nimport 'core-js/stable/string/at.js'\nimport 'core-js/stable/string/replace-all.js'\n\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/state-react'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/store'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/tlschema'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/utils'\n// eslint-disable-next-line local/no-export-star\nexport * from '@tldraw/validate'\n\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TLOnMountHandler,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n} from './lib/TldrawEditor'\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 { DefaultBackground } from './lib/components/default-components/DefaultBackground'\nexport { DefaultBrush, type TLBrushProps } from './lib/components/default-components/DefaultBrush'\nexport {\n\tDefaultCanvas,\n\ttype TLCanvasComponentProps,\n} from './lib/components/default-components/DefaultCanvas'\nexport {\n\tDefaultCollaboratorHint,\n\ttype TLCollaboratorHintProps,\n} from './lib/components/default-components/DefaultCollaboratorHint'\nexport {\n\tDefaultCursor,\n\ttype TLCursorProps,\n} from './lib/components/default-components/DefaultCursor'\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\tDefaultHandle,\n\ttype TLHandleProps,\n} from './lib/components/default-components/DefaultHandle'\nexport {\n\tDefaultHandles,\n\ttype TLHandlesProps,\n} from './lib/components/default-components/DefaultHandles'\nexport {\n\tDefaultScribble,\n\ttype TLScribbleProps,\n} from './lib/components/default-components/DefaultScribble'\nexport {\n\tDefaultSelectionBackground,\n\ttype TLSelectionBackgroundProps,\n} from './lib/components/default-components/DefaultSelectionBackground'\nexport {\n\tDefaultSelectionForeground,\n\ttype TLSelectionForegroundProps,\n} from './lib/components/default-components/DefaultSelectionForeground'\nexport { type TLShapeErrorFallbackComponent } from './lib/components/default-components/DefaultShapeErrorFallback'\nexport {\n\tDefaultShapeIndicator,\n\ttype TLShapeIndicatorProps,\n} from './lib/components/default-components/DefaultShapeIndicator'\nexport { type TLShapeIndicatorErrorFallbackComponent } from './lib/components/default-components/DefaultShapeIndicatorErrorFallback'\nexport {\n\tDefaultShapeIndicators,\n\ttype TLShapeIndicatorsProps,\n} from './lib/components/default-components/DefaultShapeIndicators'\nexport {\n\tDefaultSnapIndicator,\n\ttype TLSnapIndicatorProps,\n} from './lib/components/default-components/DefaultSnapIndictor'\nexport { DefaultSpinner } from './lib/components/default-components/DefaultSpinner'\nexport { DefaultSvgDefs } from './lib/components/default-components/DefaultSvgDefs'\nexport {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tTAB_ID,\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tUSER_COLORS,\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport {\n\tcreateTLSchemaFromUtils,\n\tcreateTLStore,\n\tinlineBase64AssetStore,\n\ttype TLStoreBaseOptions,\n\ttype TLStoreEventInfo,\n\ttype TLStoreOptions,\n\ttype TLStoreSchemaOptions,\n} from './lib/config/createTLStore'\nexport { createTLUser, useTldrawUser, type TLUser } from './lib/config/createTLUser'\nexport { type TLAnyBindingUtilConstructor } from './lib/config/defaultBindings'\nexport { coreShapes, type TLAnyShapeUtilConstructor } from './lib/config/defaultShapes'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\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 { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\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 {\n\tTextManager,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\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 { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\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 {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\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 TLCLickEventName,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\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 TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLSvgOptions,\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 { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv } 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 { getCursor } from './lib/hooks/useCursor'\nexport { EditorContext, useEditor, useMaybeEditor } 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 { useIsDarkMode } from './lib/hooks/useIsDarkMode'\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 { useSelectionEvents } from './lib/hooks/useSelectionEvents'\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 TestEnvironment,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { defaultTldrawOptions, type TldrawOptions } 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 { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\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 {\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 {\n\tHALF_PI,\n\tPI,\n\tPI2,\n\tSIN,\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\tisSafeFloat,\n\tperimeterOfEllipse,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\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\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { hardResetEditor } from './lib/utils/hardResetEditor'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { refreshPage } from './lib/utils/refreshPage'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TLTextOptions,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport { runtime, setRuntimeOverrides } from './lib/utils/runtime'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { uniq } from './lib/utils/uniq'\nexport { openWindow } from './lib/utils/window-open'\n\n/**\n * @deprecated Licensing is now enabled in the tldraw SDK.\n * @public */\nexport function debugEnableLicensing() {\n\t// noop\n\treturn\n}\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"],
5
+ "mappings": "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",
6
6
  "names": ["import_at", "import_utils"]
7
7
  }
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var TLSessionStateSnapshot_exports = {};
30
20
  __export(TLSessionStateSnapshot_exports, {
@@ -38,7 +28,6 @@ var import_state = require("@tldraw/state");
38
28
  var import_tlschema = require("@tldraw/tlschema");
39
29
  var import_utils = require("@tldraw/utils");
40
30
  var import_validate = require("@tldraw/validate");
41
- var import_lodash = __toESM(require("lodash.isequal"));
42
31
  var import_environment = require("../globals/environment");
43
32
  const tabIdKey = "TLDRAW_TAB_ID_v2";
44
33
  const window = globalThis.window;
@@ -144,7 +133,7 @@ function createSessionStateSnapshotSignal(store) {
144
133
  })
145
134
  };
146
135
  },
147
- { isEqual: import_lodash.default }
136
+ { isEqual: import_utils.isEqual }
148
137
  );
149
138
  }
150
139
  function loadSessionStateSnapshotIntoStore(store, snapshot, opts) {