@tldraw/editor 3.16.0-canary.ed8bd30c0f28 → 3.16.0-canary.f20b7a478e22

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 (218) hide show
  1. package/dist-cjs/index.d.ts +193 -113
  2. package/dist-cjs/index.js +8 -6
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/TldrawEditor.js +8 -8
  5. package/dist-cjs/lib/TldrawEditor.js.map +2 -2
  6. package/dist-cjs/lib/components/MenuClickCapture.js +0 -5
  7. package/dist-cjs/lib/components/MenuClickCapture.js.map +2 -2
  8. package/dist-cjs/lib/components/Shape.js +7 -10
  9. package/dist-cjs/lib/components/Shape.js.map +2 -2
  10. package/dist-cjs/lib/components/default-components/DefaultCanvas.js +14 -23
  11. package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
  12. package/dist-cjs/lib/components/default-components/DefaultCollaboratorHint.js +1 -1
  13. package/dist-cjs/lib/components/default-components/DefaultCollaboratorHint.js.map +1 -1
  14. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js +1 -1
  15. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js.map +2 -2
  16. package/dist-cjs/lib/components/default-components/DefaultScribble.js +1 -1
  17. package/dist-cjs/lib/components/default-components/DefaultScribble.js.map +2 -2
  18. package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js +9 -1
  19. package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js.map +2 -2
  20. package/dist-cjs/lib/config/TLUserPreferences.js +9 -3
  21. package/dist-cjs/lib/config/TLUserPreferences.js.map +2 -2
  22. package/dist-cjs/lib/editor/Editor.js +86 -137
  23. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  24. package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +4 -0
  25. package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +2 -2
  26. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js +4 -2
  27. package/dist-cjs/lib/editor/managers/FocusManager/FocusManager.js.map +2 -2
  28. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js +9 -4
  29. package/dist-cjs/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.js.map +2 -2
  30. package/dist-cjs/lib/editor/shapes/ShapeUtil.js +23 -0
  31. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  32. package/dist-cjs/lib/editor/types/misc-types.js.map +1 -1
  33. package/dist-cjs/lib/exports/getSvgJsx.js +35 -16
  34. package/dist-cjs/lib/exports/getSvgJsx.js.map +2 -2
  35. package/dist-cjs/lib/hooks/useCanvasEvents.js +44 -35
  36. package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
  37. package/dist-cjs/lib/hooks/useDocumentEvents.js +5 -5
  38. package/dist-cjs/lib/hooks/useDocumentEvents.js.map +2 -2
  39. package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js +1 -2
  40. package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js.map +2 -2
  41. package/dist-cjs/lib/hooks/useGestureEvents.js +1 -1
  42. package/dist-cjs/lib/hooks/useGestureEvents.js.map +2 -2
  43. package/dist-cjs/lib/hooks/useHandleEvents.js +3 -3
  44. package/dist-cjs/lib/hooks/useHandleEvents.js.map +2 -2
  45. package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js +4 -1
  46. package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js.map +2 -2
  47. package/dist-cjs/lib/hooks/usePassThroughWheelEvents.js +4 -1
  48. package/dist-cjs/lib/hooks/usePassThroughWheelEvents.js.map +2 -2
  49. package/dist-cjs/lib/hooks/useSelectionEvents.js +4 -4
  50. package/dist-cjs/lib/hooks/useSelectionEvents.js.map +2 -2
  51. package/dist-cjs/lib/license/LicenseManager.js +143 -53
  52. package/dist-cjs/lib/license/LicenseManager.js.map +2 -2
  53. package/dist-cjs/lib/license/LicenseProvider.js +39 -1
  54. package/dist-cjs/lib/license/LicenseProvider.js.map +2 -2
  55. package/dist-cjs/lib/license/Watermark.js +73 -11
  56. package/dist-cjs/lib/license/Watermark.js.map +3 -3
  57. package/dist-cjs/lib/license/useLicenseManagerState.js.map +2 -2
  58. package/dist-cjs/lib/options.js +7 -0
  59. package/dist-cjs/lib/options.js.map +2 -2
  60. package/dist-cjs/lib/primitives/Box.js +3 -0
  61. package/dist-cjs/lib/primitives/Box.js.map +2 -2
  62. package/dist-cjs/lib/primitives/Vec.js +0 -4
  63. package/dist-cjs/lib/primitives/Vec.js.map +2 -2
  64. package/dist-cjs/lib/primitives/geometry/Geometry2d.js +50 -20
  65. package/dist-cjs/lib/primitives/geometry/Geometry2d.js.map +2 -2
  66. package/dist-cjs/lib/primitives/geometry/Group2d.js +8 -1
  67. package/dist-cjs/lib/primitives/geometry/Group2d.js.map +2 -2
  68. package/dist-cjs/lib/utils/{nearestMultiple.js → EditorAtom.js} +25 -14
  69. package/dist-cjs/lib/utils/EditorAtom.js.map +7 -0
  70. package/dist-cjs/lib/utils/dom.js +12 -1
  71. package/dist-cjs/lib/utils/dom.js.map +2 -2
  72. package/dist-cjs/lib/utils/getPointerInfo.js +2 -2
  73. package/dist-cjs/lib/utils/getPointerInfo.js.map +2 -2
  74. package/dist-cjs/lib/utils/reparenting.js +2 -35
  75. package/dist-cjs/lib/utils/reparenting.js.map +3 -3
  76. package/dist-cjs/version.js +3 -3
  77. package/dist-cjs/version.js.map +1 -1
  78. package/dist-esm/index.d.mts +193 -113
  79. package/dist-esm/index.mjs +11 -7
  80. package/dist-esm/index.mjs.map +2 -2
  81. package/dist-esm/lib/TldrawEditor.mjs +9 -9
  82. package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
  83. package/dist-esm/lib/components/MenuClickCapture.mjs +0 -5
  84. package/dist-esm/lib/components/MenuClickCapture.mjs.map +2 -2
  85. package/dist-esm/lib/components/Shape.mjs +7 -10
  86. package/dist-esm/lib/components/Shape.mjs.map +2 -2
  87. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +15 -24
  88. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
  89. package/dist-esm/lib/components/default-components/DefaultCollaboratorHint.mjs +1 -1
  90. package/dist-esm/lib/components/default-components/DefaultCollaboratorHint.mjs.map +1 -1
  91. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs +1 -1
  92. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs.map +2 -2
  93. package/dist-esm/lib/components/default-components/DefaultScribble.mjs +1 -1
  94. package/dist-esm/lib/components/default-components/DefaultScribble.mjs.map +2 -2
  95. package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs +9 -1
  96. package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs.map +2 -2
  97. package/dist-esm/lib/config/TLUserPreferences.mjs +9 -3
  98. package/dist-esm/lib/config/TLUserPreferences.mjs.map +2 -2
  99. package/dist-esm/lib/editor/Editor.mjs +86 -137
  100. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  101. package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +4 -0
  102. package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +2 -2
  103. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs +4 -2
  104. package/dist-esm/lib/editor/managers/FocusManager/FocusManager.mjs.map +2 -2
  105. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs +9 -4
  106. package/dist-esm/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.mjs.map +2 -2
  107. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +23 -0
  108. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  109. package/dist-esm/lib/exports/getSvgJsx.mjs +36 -16
  110. package/dist-esm/lib/exports/getSvgJsx.mjs.map +2 -2
  111. package/dist-esm/lib/hooks/useCanvasEvents.mjs +47 -37
  112. package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
  113. package/dist-esm/lib/hooks/useDocumentEvents.mjs +11 -6
  114. package/dist-esm/lib/hooks/useDocumentEvents.mjs.map +2 -2
  115. package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs +2 -3
  116. package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs.map +2 -2
  117. package/dist-esm/lib/hooks/useGestureEvents.mjs +2 -2
  118. package/dist-esm/lib/hooks/useGestureEvents.mjs.map +2 -2
  119. package/dist-esm/lib/hooks/useHandleEvents.mjs +9 -4
  120. package/dist-esm/lib/hooks/useHandleEvents.mjs.map +2 -2
  121. package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs +4 -1
  122. package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs.map +2 -2
  123. package/dist-esm/lib/hooks/usePassThroughWheelEvents.mjs +4 -1
  124. package/dist-esm/lib/hooks/usePassThroughWheelEvents.mjs.map +2 -2
  125. package/dist-esm/lib/hooks/useSelectionEvents.mjs +6 -5
  126. package/dist-esm/lib/hooks/useSelectionEvents.mjs.map +2 -2
  127. package/dist-esm/lib/license/LicenseManager.mjs +144 -54
  128. package/dist-esm/lib/license/LicenseManager.mjs.map +2 -2
  129. package/dist-esm/lib/license/LicenseProvider.mjs +39 -2
  130. package/dist-esm/lib/license/LicenseProvider.mjs.map +2 -2
  131. package/dist-esm/lib/license/Watermark.mjs +74 -12
  132. package/dist-esm/lib/license/Watermark.mjs.map +3 -3
  133. package/dist-esm/lib/license/useLicenseManagerState.mjs.map +2 -2
  134. package/dist-esm/lib/options.mjs +7 -0
  135. package/dist-esm/lib/options.mjs.map +2 -2
  136. package/dist-esm/lib/primitives/Box.mjs +4 -1
  137. package/dist-esm/lib/primitives/Box.mjs.map +2 -2
  138. package/dist-esm/lib/primitives/Vec.mjs +0 -4
  139. package/dist-esm/lib/primitives/Vec.mjs.map +2 -2
  140. package/dist-esm/lib/primitives/geometry/Geometry2d.mjs +53 -21
  141. package/dist-esm/lib/primitives/geometry/Geometry2d.mjs.map +2 -2
  142. package/dist-esm/lib/primitives/geometry/Group2d.mjs +8 -1
  143. package/dist-esm/lib/primitives/geometry/Group2d.mjs.map +2 -2
  144. package/dist-esm/lib/utils/EditorAtom.mjs +25 -0
  145. package/dist-esm/lib/utils/EditorAtom.mjs.map +7 -0
  146. package/dist-esm/lib/utils/dom.mjs +12 -1
  147. package/dist-esm/lib/utils/dom.mjs.map +2 -2
  148. package/dist-esm/lib/utils/getPointerInfo.mjs +2 -2
  149. package/dist-esm/lib/utils/getPointerInfo.mjs.map +2 -2
  150. package/dist-esm/lib/utils/reparenting.mjs +3 -40
  151. package/dist-esm/lib/utils/reparenting.mjs.map +2 -2
  152. package/dist-esm/version.mjs +3 -3
  153. package/dist-esm/version.mjs.map +1 -1
  154. package/editor.css +308 -290
  155. package/package.json +14 -37
  156. package/src/index.ts +6 -9
  157. package/src/lib/TldrawEditor.tsx +14 -21
  158. package/src/lib/components/MenuClickCapture.tsx +0 -8
  159. package/src/lib/components/Shape.tsx +6 -12
  160. package/src/lib/components/default-components/DefaultCanvas.tsx +12 -23
  161. package/src/lib/components/default-components/DefaultCollaboratorHint.tsx +1 -1
  162. package/src/lib/components/default-components/DefaultErrorFallback.tsx +1 -1
  163. package/src/lib/components/default-components/DefaultScribble.tsx +1 -1
  164. package/src/lib/components/default-components/DefaultShapeIndicator.tsx +5 -1
  165. package/src/lib/config/TLUserPreferences.ts +8 -1
  166. package/src/lib/editor/Editor.test.ts +102 -11
  167. package/src/lib/editor/Editor.ts +124 -197
  168. package/src/lib/editor/derivations/notVisibleShapes.ts +6 -0
  169. package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +15 -14
  170. package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.test.ts +16 -15
  171. package/src/lib/editor/managers/FocusManager/FocusManager.test.ts +49 -48
  172. package/src/lib/editor/managers/FocusManager/FocusManager.ts +6 -2
  173. package/src/lib/editor/managers/FontManager/FontManager.test.ts +24 -23
  174. package/src/lib/editor/managers/HistoryManager/HistoryManager.test.ts +7 -6
  175. package/src/lib/editor/managers/ScribbleManager/ScribbleManager.test.ts +12 -11
  176. package/src/lib/editor/managers/SnapManager/SnapManager.test.ts +57 -50
  177. package/src/lib/editor/managers/TextManager/TextManager.test.ts +51 -26
  178. package/src/lib/editor/managers/TickManager/TickManager.test.ts +14 -13
  179. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.test.ts +34 -26
  180. package/src/lib/editor/managers/UserPreferencesManager/UserPreferencesManager.ts +6 -1
  181. package/src/lib/editor/shapes/ShapeUtil.ts +46 -0
  182. package/src/lib/editor/types/misc-types.ts +54 -7
  183. package/src/lib/exports/getSvgJsx.test.ts +868 -0
  184. package/src/lib/exports/getSvgJsx.tsx +78 -21
  185. package/src/lib/hooks/useCanvasEvents.ts +60 -47
  186. package/src/lib/hooks/useDocumentEvents.ts +11 -6
  187. package/src/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.ts +2 -2
  188. package/src/lib/hooks/useGestureEvents.ts +2 -2
  189. package/src/lib/hooks/useHandleEvents.ts +9 -4
  190. package/src/lib/hooks/usePassThroughMouseOverEvents.ts +4 -1
  191. package/src/lib/hooks/usePassThroughWheelEvents.ts +6 -1
  192. package/src/lib/hooks/useSelectionEvents.ts +6 -5
  193. package/src/lib/license/LicenseManager.test.ts +724 -383
  194. package/src/lib/license/LicenseManager.ts +204 -58
  195. package/src/lib/license/LicenseProvider.tsx +74 -2
  196. package/src/lib/license/Watermark.test.tsx +2 -1
  197. package/src/lib/license/Watermark.tsx +79 -12
  198. package/src/lib/license/useLicenseManagerState.ts +2 -2
  199. package/src/lib/options.ts +8 -0
  200. package/src/lib/primitives/Box.test.ts +126 -0
  201. package/src/lib/primitives/Box.ts +10 -1
  202. package/src/lib/primitives/Vec.ts +0 -5
  203. package/src/lib/primitives/geometry/Geometry2d.test.ts +420 -0
  204. package/src/lib/primitives/geometry/Geometry2d.ts +78 -21
  205. package/src/lib/primitives/geometry/Group2d.ts +10 -1
  206. package/src/lib/test/InFrontOfTheCanvas.test.tsx +187 -0
  207. package/src/lib/utils/EditorAtom.ts +37 -0
  208. package/src/lib/utils/dom.test.ts +94 -0
  209. package/src/lib/utils/dom.ts +38 -1
  210. package/src/lib/utils/getPointerInfo.ts +2 -1
  211. package/src/lib/utils/reparenting.ts +3 -69
  212. package/src/lib/utils/sync/LocalIndexedDb.test.ts +2 -1
  213. package/src/lib/utils/sync/TLLocalSyncClient.test.ts +15 -15
  214. package/src/version.ts +3 -3
  215. package/dist-cjs/lib/utils/nearestMultiple.js.map +0 -7
  216. package/dist-esm/lib/utils/nearestMultiple.mjs +0 -14
  217. package/dist-esm/lib/utils/nearestMultiple.mjs.map +0 -7
  218. package/src/lib/utils/nearestMultiple.ts +0 -13
@@ -510,6 +510,7 @@ export declare class Box {
510
510
  static ExpandBy(A: Box, n: number): Box;
511
511
  static Collides(A: Box, B: Box): boolean;
512
512
  static Contains(A: Box, B: Box): boolean;
513
+ static ContainsApproximately(A: Box, B: Box, precision?: number): boolean;
513
514
  static Includes(A: Box, B: Box): boolean;
514
515
  static ContainsPoint(A: Box, B: VecLike, margin?: number): boolean;
515
516
  static Common(boxes: Box[]): Box;
@@ -760,11 +761,6 @@ export declare class CubicSpline2d extends Geometry2d {
760
761
  /** @public */
761
762
  export declare function dataUrlToFile(url: string, filename: string, mimeType: string): Promise<File>;
762
763
 
763
- /**
764
- * @deprecated Licensing is now enabled in the tldraw SDK.
765
- * @public */
766
- export declare function debugEnableLicensing(): void;
767
-
768
764
  /* Excluded from this release type: DebugFlag */
769
765
 
770
766
  /* Excluded from this release type: DebugFlagDef */
@@ -889,6 +885,9 @@ export declare const defaultTldrawOptions: {
889
885
  readonly nonce: undefined;
890
886
  readonly temporaryAssetPreviewLifetimeMs: 180000;
891
887
  readonly textShadowLod: 0.35;
888
+ readonly tooltipDelayMs: 700;
889
+ readonly uiCoarseDragDistanceSquared: 625;
890
+ readonly uiDragDistanceSquared: 16;
892
891
  };
893
892
 
894
893
  /** @public */
@@ -904,6 +903,7 @@ export declare const defaultUserPreferences: Readonly<{
904
903
  isWrapMode: false;
905
904
  locale: "ar" | "bn" | "ca" | "cs" | "da" | "de" | "el" | "en" | "es" | "fa" | "fi" | "fr" | "gl" | "gu-in" | "he" | "hi-in" | "hr" | "hu" | "id" | "it" | "ja" | "km-kh" | "kn" | "ko-kr" | "ml" | "mr" | "ms" | "ne" | "nl" | "no" | "pa" | "pl" | "pt-br" | "pt-pt" | "ro" | "ru" | "sl" | "so" | "sv" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "ur" | "vi" | "zh-cn" | "zh-tw";
906
905
  name: "";
906
+ showUiLabels: false;
907
907
  }>;
908
908
 
909
909
  /**
@@ -979,7 +979,7 @@ export declare class EdgeScrollManager {
979
979
  /** @public */
980
980
  export declare class Editor extends EventEmitter<TLEventMap> {
981
981
  readonly id: string;
982
- constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, textOptions, initialState, autoFocus, inferDarkMode, options, isShapeHidden, getShapeVisibility, fontAssetUrls, }: TLEditorOptions);
982
+ constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, textOptions, initialState, autoFocus, inferDarkMode, options, getShapeVisibility, fontAssetUrls, }: TLEditorOptions);
983
983
  private readonly _getShapeVisibility?;
984
984
  private getIsShapeHiddenCache;
985
985
  isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
@@ -1046,22 +1046,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1046
1046
  * @public
1047
1047
  */
1048
1048
  readonly fonts: FontManager;
1049
- /**
1050
- * A manager for the editor's environment.
1051
- *
1052
- * @deprecated This is deprecated and will be removed in a future version. Use the `tlenv` global export instead.
1053
- * @public
1054
- */
1055
- readonly environment: {
1056
- hasCanvasSupport: boolean;
1057
- isAndroid: boolean;
1058
- isChromeForIos: boolean;
1059
- isDarwin: boolean;
1060
- isFirefox: boolean;
1061
- isIos: boolean;
1062
- isSafari: boolean;
1063
- isWebview: boolean;
1064
- };
1065
1049
  /**
1066
1050
  * A manager for the editor's scribbles.
1067
1051
  *
@@ -1204,22 +1188,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1204
1188
  * @public
1205
1189
  */
1206
1190
  getCanRedo(): boolean;
1207
- /**
1208
- * Create a new "mark", or stopping point, in the undo redo history. Creating a mark will clear
1209
- * any redos.
1210
- *
1211
- * @example
1212
- * ```ts
1213
- * editor.mark()
1214
- * editor.mark('flip shapes')
1215
- * ```
1216
- *
1217
- * @param markId - The mark's id, usually the reason for adding the mark.
1218
- *
1219
- * @public
1220
- * @deprecated use {@link Editor.markHistoryStoppingPoint} instead
1221
- */
1222
- mark(markId?: string): this;
1223
1191
  /**
1224
1192
  * Create a new "mark", or stopping point, in the undo redo history. Creating a mark will clear
1225
1193
  * any redos. You typically want to do this just before a user interaction begins or is handled.
@@ -1309,10 +1277,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1309
1277
  * @public
1310
1278
  */
1311
1279
  run(fn: () => void, opts?: TLEditorRunOptions): this;
1312
- /**
1313
- * @deprecated Use `Editor.run` instead.
1314
- */
1315
- batch(fn: () => void, opts?: TLEditorRunOptions): this;
1316
1280
  /* Excluded from this release type: annotateError */
1317
1281
  /* Excluded from this release type: createErrorAnnotations */
1318
1282
  /* Excluded from this release type: _crashingError */
@@ -1434,36 +1398,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1434
1398
  hasOpenMenus: () => boolean;
1435
1399
  isMenuOpen: (id: string) => boolean;
1436
1400
  };
1437
- /**
1438
- * @deprecated Use `editor.menus.getOpenMenus` instead.
1439
- *
1440
- * @public
1441
- */
1442
- getOpenMenus(): string[];
1443
- /**
1444
- * @deprecated Use `editor.menus.addOpenMenu` instead.
1445
- *
1446
- * @public
1447
- */
1448
- addOpenMenu(id: string): this;
1449
- /**
1450
- * @deprecated Use `editor.menus.deleteOpenMenu` instead.
1451
- *
1452
- * @public
1453
- */
1454
- deleteOpenMenu(id: string): this;
1455
- /**
1456
- * @deprecated Use `editor.menus.clearOpenMenus` instead.
1457
- *
1458
- * @public
1459
- */
1460
- clearOpenMenus(): this;
1461
- /**
1462
- * @deprecated Use `editor.menus.hasAnyOpenMenus` instead.
1463
- *
1464
- * @public
1465
- */
1466
- getIsMenuOpen(): boolean;
1467
1401
  /**
1468
1402
  * Set the cursor.
1469
1403
  *
@@ -2690,15 +2624,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2690
2624
  *
2691
2625
  * @returns The shape at the given point, or undefined if there is no shape at the point.
2692
2626
  */
2693
- getShapeAtPoint(point: VecLike, opts?: {
2694
- filter?(shape: TLShape): boolean;
2695
- hitFrameInside?: boolean;
2696
- hitInside?: boolean;
2697
- hitLabels?: boolean;
2698
- hitLocked?: boolean;
2699
- margin?: number;
2700
- renderingOnly?: boolean;
2701
- }): TLShape | undefined;
2627
+ getShapeAtPoint(point: VecLike, opts?: TLGetShapeAtPointOptions): TLShape | undefined;
2702
2628
  /**
2703
2629
  * Get the shapes, if any, at a given page point.
2704
2630
  *
@@ -2920,8 +2846,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2920
2846
  * @public
2921
2847
  */
2922
2848
  getShapeAndDescendantIds(ids: TLShapeId[]): Set<TLShapeId>;
2923
- /** @deprecated Use {@link Editor.getDraggingOverShape} instead */
2924
- getDroppingOverShape(point: Vec, droppingShapes: TLShape[]): TLShape | undefined;
2925
2849
  /**
2926
2850
  * Get the shape that some shapes should be dropped on at a given point.
2927
2851
  *
@@ -3633,14 +3557,20 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3633
3557
  * Handle external content, such as files, urls, embeds, or plain text which has been put into the app, for example by pasting external text or dropping external images onto canvas.
3634
3558
  *
3635
3559
  * @param info - Info about the external content.
3560
+ * @param opts - Options for handling external content, including force flag to bypass readonly checks.
3636
3561
  */
3637
- putExternalContent<E>(info: TLExternalContent<E>): Promise<void>;
3562
+ putExternalContent<E>(info: TLExternalContent<E>, opts?: {
3563
+ force?: boolean;
3564
+ }): Promise<void>;
3638
3565
  /**
3639
3566
  * Handle replacing external content.
3640
3567
  *
3641
3568
  * @param info - Info about the external content.
3569
+ * @param opts - Options for handling external content, including force flag to bypass readonly checks.
3642
3570
  */
3643
- replaceExternalContent<E>(info: TLExternalContent<E>): Promise<void>;
3571
+ replaceExternalContent<E>(info: TLExternalContent<E>, opts?: {
3572
+ force?: boolean;
3573
+ }): Promise<void>;
3644
3574
  /**
3645
3575
  * Get content that can be exported for the given shape ids.
3646
3576
  *
@@ -3696,8 +3626,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3696
3626
  svg: string;
3697
3627
  width: number;
3698
3628
  } | undefined>;
3699
- /** @deprecated Use {@link Editor.getSvgString} or {@link Editor.getSvgElement} instead. */
3700
- getSvg(shapes: TLShape[] | TLShapeId[], opts?: TLSvgExportOptions): Promise<SVGSVGElement | undefined>;
3701
3629
  /**
3702
3630
  * Get an exported image of the given shapes.
3703
3631
  *
@@ -3712,6 +3640,20 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3712
3640
  height: number;
3713
3641
  width: number;
3714
3642
  }>;
3643
+ /**
3644
+ * Get an exported image of the given shapes as a data URL.
3645
+ *
3646
+ * @param shapes - The shapes (or shape ids) to export.
3647
+ * @param opts - Options for the export.
3648
+ *
3649
+ * @returns A data URL of the image.
3650
+ * @public
3651
+ */
3652
+ toImageDataUrl(shapes: TLShape[] | TLShapeId[], opts?: TLImageExportOptions): Promise<{
3653
+ height: number;
3654
+ url: string;
3655
+ width: number;
3656
+ }>;
3715
3657
  /**
3716
3658
  * The app's current input state.
3717
3659
  *
@@ -4036,6 +3978,26 @@ export declare class Editor extends EventEmitter<TLEventMap> {
4036
3978
  /* Excluded from this release type: maybeTrackPerformance */
4037
3979
  }
4038
3980
 
3981
+ /**
3982
+ * An Atom that is scoped to the lifetime of an Editor.
3983
+ *
3984
+ * This is useful for storing UI state for tldraw applications. Keeping state scoped to an editor
3985
+ * instead of stored in a global atom can prevent issues with state being shared between editors
3986
+ * when navigating between pages, or when multiple editor instances are used on the same page.
3987
+ *
3988
+ * @public
3989
+ */
3990
+ export declare class EditorAtom<T> {
3991
+ private name;
3992
+ private getInitialState;
3993
+ private states;
3994
+ constructor(name: string, getInitialState: (editor: Editor) => T);
3995
+ getAtom(editor: Editor): Atom<T>;
3996
+ get(editor: Editor): T;
3997
+ update(editor: Editor, update: (state: T) => T): T;
3998
+ set(editor: Editor, state: T): T;
3999
+ }
4000
+
4039
4001
  /** @public */
4040
4002
  export declare const EditorContext: React_3.Context<Editor | null>;
4041
4003
 
@@ -4133,6 +4095,7 @@ export declare abstract class Geometry2d {
4133
4095
  isLabel: boolean;
4134
4096
  isEmptyLabel: boolean;
4135
4097
  isInternal: boolean;
4098
+ excludeFromShapeBounds: boolean;
4136
4099
  debugColor?: string;
4137
4100
  ignore?: boolean;
4138
4101
  constructor(opts: Geometry2dOptions);
@@ -4156,12 +4119,14 @@ export declare abstract class Geometry2d {
4156
4119
  * along the edge it is as a fraction of the total length.
4157
4120
  */
4158
4121
  uninterpolateAlongEdge(point: VecLike, _filters?: Geometry2dFilters): number;
4159
- /** @deprecated Iterate the vertices instead. */
4160
- nearestPointOnLineSegment(A: VecLike, B: VecLike): Vec;
4161
4122
  isPointInBounds(point: VecLike, margin?: number): boolean;
4123
+ overlapsPolygon(_polygon: VecLike[]): boolean;
4162
4124
  transform(transform: MatModel, opts?: TransformedGeometry2dOptions): Geometry2d;
4163
4125
  private _vertices;
4164
4126
  get vertices(): Vec[];
4127
+ getBoundsVertices(): Vec[];
4128
+ private _boundsVertices;
4129
+ get boundsVertices(): Vec[];
4165
4130
  getBounds(): Box;
4166
4131
  private _bounds;
4167
4132
  get bounds(): Box;
@@ -4358,6 +4323,7 @@ export declare class Group2d extends Geometry2d {
4358
4323
  hitTestLineSegment(A: VecLike, B: VecLike, zoom: number, filters?: Geometry2dFilters): boolean;
4359
4324
  intersectLineSegment(A: VecLike, B: VecLike, filters?: Geometry2dFilters): VecLike[];
4360
4325
  intersectCircle(center: VecLike, radius: number, filters?: Geometry2dFilters): VecLike[];
4326
+ getBoundsVertices(): Vec[];
4361
4327
  intersectPolygon(polygon: VecLike[], filters?: Geometry2dFilters): VecLike[];
4362
4328
  intersectPolyline(polyline: VecLike[], filters?: Geometry2dFilters): VecLike[];
4363
4329
  interpolateAlongEdge(t: number, filters?: Geometry2dFilters): Vec;
@@ -4367,6 +4333,7 @@ export declare class Group2d extends Geometry2d {
4367
4333
  toSimpleSvgPath(): string;
4368
4334
  getLength(filters?: Geometry2dFilters): number;
4369
4335
  getSvgPathData(): string;
4336
+ overlapsPolygon(polygon: VecLike[]): boolean;
4370
4337
  }
4371
4338
 
4372
4339
  /** @public */
@@ -4607,12 +4574,16 @@ export declare function kickoutOccludedShapes(editor: Editor, shapeIds: TLShapeI
4607
4574
  filter?(parent: TLShape): boolean;
4608
4575
  }): void;
4609
4576
 
4577
+ /* Excluded from this release type: LICENSE_TIMEOUT */
4578
+
4610
4579
  /* Excluded from this release type: LicenseFromKeyResult */
4611
4580
 
4612
4581
  /* Excluded from this release type: LicenseInfo */
4613
4582
 
4614
4583
  /* Excluded from this release type: LicenseManager */
4615
4584
 
4585
+ /* Excluded from this release type: LicenseState */
4586
+
4616
4587
  /** @public */
4617
4588
  export declare function linesIntersect(A: VecLike, B: VecLike, C: VecLike, D: VecLike): boolean;
4618
4589
 
@@ -4645,6 +4616,23 @@ export declare function loadSnapshot(store: TLStore, _snapshot: Partial<TLEditor
4645
4616
  /** @public */
4646
4617
  export declare function loopToHtmlElement(elm: Element): HTMLElement;
4647
4618
 
4619
+ /**
4620
+ * In tldraw, events are sometimes handled by multiple components. For example, the shapes might
4621
+ * have events, but the canvas handles events too. The way that the canvas handles events can
4622
+ * interfere with the with the shapes event handlers - for example, it calls `.preventDefault()` on
4623
+ * `pointerDown`, which also prevents `click` events from firing on the shapes.
4624
+ *
4625
+ * You can use `.stopPropagation()` to prevent the event from propagating to the rest of the DOM,
4626
+ * but that can impact non-tldraw event handlers set up elsewhere. By using `markEventAsHandled`,
4627
+ * you'll stop other parts of tldraw from handling the event without impacting other, non-tldraw
4628
+ * event handlers. See also {@link wasEventAlreadyHandled}.
4629
+ *
4630
+ * @public
4631
+ */
4632
+ export declare function markEventAsHandled(e: {
4633
+ nativeEvent: Event;
4634
+ } | Event): void;
4635
+
4648
4636
  /** @public */
4649
4637
  export declare class Mat {
4650
4638
  constructor(a: number, b: number, c: number, d: number, e: number, f: number);
@@ -5218,7 +5206,34 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5218
5206
  * @public
5219
5207
  */
5220
5208
  canBeLaidOut(_shape: Shape, _info: TLShapeUtilCanBeLaidOutOpts): boolean;
5209
+ /**
5210
+ * Whether this shape can be culled. By default, shapes are culled for
5211
+ * performance reasons when they are outside of the viewport. Culled shapes are still rendered
5212
+ * to the DOM, but have their `display` property set to `none`.
5213
+ *
5214
+ * @param shape - The shape.
5215
+ */
5216
+ canCull(_shape: Shape): boolean;
5221
5217
  /* Excluded from this release type: providesBackgroundForChildren */
5218
+ /**
5219
+ * Get the clip path to apply to this shape's children.
5220
+ *
5221
+ * @param shape - The shape to get the clip path for
5222
+ * @returns Array of points defining the clipping polygon in local coordinates, or undefined if no clipping
5223
+ * @public
5224
+ */
5225
+ getClipPath?(shape: Shape): undefined | Vec[];
5226
+ /**
5227
+ * Whether a specific child shape should be clipped by this shape.
5228
+ * Only called if getClipPath returns a valid polygon.
5229
+ *
5230
+ * If not defined, the default behavior is to clip all children.
5231
+ *
5232
+ * @param child - The child shape to check
5233
+ * @returns boolean indicating if this child should be clipped
5234
+ * @public
5235
+ */
5236
+ shouldClipChild?(child: TLShape): boolean;
5222
5237
  /**
5223
5238
  * Whether the shape should hide its resize handles when selected.
5224
5239
  *
@@ -5249,6 +5264,17 @@ export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknown
5249
5264
  * @public
5250
5265
  */
5251
5266
  isAspectRatioLocked(_shape: Shape): boolean;
5267
+ /**
5268
+ * By default, the bounds of an image export are the bounds of all the shapes it contains, plus
5269
+ * some padding. If an export includes a shape where `isExportBoundsContainer` is true, then the
5270
+ * padding is skipped _if the bounds of that shape contains all the other shapes_. This is
5271
+ * useful in cases like annotating on top of an image, where you usually want to avoid extra
5272
+ * padding around the image if you don't need it.
5273
+ *
5274
+ * @param _shape - The shape to check
5275
+ * @returns True if this shape should be treated as an export bounds container
5276
+ */
5277
+ isExportBoundsContainer(_shape: Shape): boolean;
5252
5278
  /* Excluded from this release type: backgroundComponent */
5253
5279
  /**
5254
5280
  * Get the interpolated props for an animating shape. This is an optional method.
@@ -5804,7 +5830,14 @@ export declare abstract class StateNode implements Partial<TLEventHandlers> {
5804
5830
  onExit?(info: any, to: string): void;
5805
5831
  }
5806
5832
 
5807
- /** @public */
5833
+ /**
5834
+ * Calls `event.stopPropagation()`.
5835
+ *
5836
+ * @deprecated Use {@link markEventAsHandled} instead, or manually call `event.stopPropagation()` if
5837
+ * that's what you really want.
5838
+ *
5839
+ * @public
5840
+ */
5808
5841
  export declare const stopEventPropagation: (e: any) => any;
5809
5842
 
5810
5843
  /* Excluded from this release type: StoreName */
@@ -6295,12 +6328,6 @@ export declare interface TldrawEditorBaseProps {
6295
6328
  * Options for syncing the editor's camera state with the URL.
6296
6329
  */
6297
6330
  deepLinks?: TLDeepLinkOptions | true;
6298
- /**
6299
- * Predicate for whether or not a shape should be hidden.
6300
- *
6301
- * @deprecated Use {@link TldrawEditorBaseProps#getShapeVisibility} instead.
6302
- */
6303
- isShapeHidden?(shape: TLShape, editor: Editor): boolean;
6304
6331
  /**
6305
6332
  * Provides a way to hide shapes.
6306
6333
  *
@@ -6408,6 +6435,8 @@ export declare interface TldrawOptions {
6408
6435
  readonly multiClickDurationMs: number;
6409
6436
  readonly coarseDragDistanceSquared: number;
6410
6437
  readonly dragDistanceSquared: number;
6438
+ readonly uiDragDistanceSquared: number;
6439
+ readonly uiCoarseDragDistanceSquared: number;
6411
6440
  readonly defaultSvgPadding: number;
6412
6441
  readonly cameraSlideFriction: number;
6413
6442
  readonly gridSteps: readonly {
@@ -6434,6 +6463,7 @@ export declare interface TldrawOptions {
6434
6463
  readonly flattenImageBoundsPadding: number;
6435
6464
  readonly laserDelayMs: number;
6436
6465
  readonly maxExportDelayMs: number;
6466
+ readonly tooltipDelayMs: number;
6437
6467
  /**
6438
6468
  * How long should previews created by {@link Editor.createTemporaryAssetPreview} last before
6439
6469
  * they expire? Defaults to 3 minutes.
@@ -6559,15 +6589,6 @@ export declare interface TLEditorOptions {
6559
6589
  fontAssetUrls?: {
6560
6590
  [key: string]: string | undefined;
6561
6591
  };
6562
- /**
6563
- * A predicate that should return true if the given shape should be hidden.
6564
- *
6565
- * @deprecated Use {@link Editor#getShapeVisibility} instead.
6566
- *
6567
- * @param shape - The shape to check.
6568
- * @param editor - The editor instance.
6569
- */
6570
- isShapeHidden?(shape: TLShape, editor: Editor): boolean;
6571
6592
  /**
6572
6593
  * Provides a way to hide shapes.
6573
6594
  *
@@ -6835,6 +6856,59 @@ export declare interface TLGeometryOpts {
6835
6856
  context?: string;
6836
6857
  }
6837
6858
 
6859
+ /**
6860
+ * Options to {@link Editor.getShapeAtPoint}.
6861
+ *
6862
+ * @public
6863
+ */
6864
+ export declare interface TLGetShapeAtPointOptions {
6865
+ /**
6866
+ * The margin to apply to the shape.
6867
+ * If a number, it will be applied to both the inside and outside of the shape.
6868
+ * If an array, the first element will be applied to the inside of the shape, and the second element will be applied to the outside.
6869
+ *
6870
+ * @example
6871
+ * ```ts
6872
+ * // Get the shape at the center of the screen
6873
+ * const shape = editor.getShapeAtProps({
6874
+ * margin: 10,
6875
+ * })
6876
+ *
6877
+ * // Get the shape at the center of the screen with a 10px inner margin and a 5px outer margin
6878
+ * const shape = editor.getShapeAtProps({
6879
+ * margin: [10, 5],
6880
+ * })
6881
+ * ```
6882
+ */
6883
+ margin?: [number, number] | number;
6884
+ /**
6885
+ * Whether to register hits inside of shapes (beyond the margin), such as the inside of a solid shape.
6886
+ */
6887
+ hitInside?: boolean;
6888
+ /**
6889
+ * Whether to register hits on locked shapes.
6890
+ */
6891
+ hitLocked?: boolean;
6892
+ /**
6893
+ * Whether to register hits on labels.
6894
+ */
6895
+ hitLabels?: boolean;
6896
+ /**
6897
+ * Whether to only return hits on shapes that are currently being rendered.
6898
+ * todo: rename this to hitCulled or hitNotRendering
6899
+ */
6900
+ renderingOnly?: boolean;
6901
+ /**
6902
+ * Whether to register hits on the inside of frame shapes.
6903
+ * todo: rename this to hitInsideFrames
6904
+ */
6905
+ hitFrameInside?: boolean;
6906
+ /**
6907
+ * A filter function to apply to the shapes.
6908
+ */
6909
+ filter?(shape: TLShape): boolean;
6910
+ }
6911
+
6838
6912
  /** @public */
6839
6913
  export declare interface TLGridProps {
6840
6914
  x: number;
@@ -7505,12 +7579,6 @@ export declare interface TLSvgExportOptions {
7505
7579
  preserveAspectRatio?: React.SVGAttributes<SVGSVGElement>['preserveAspectRatio'];
7506
7580
  }
7507
7581
 
7508
- /**
7509
- * @public
7510
- * @deprecated use {@link TLImageExportOptions} instead
7511
- */
7512
- export declare type TLSvgOptions = TLImageExportOptions;
7513
-
7514
7582
  /** @public */
7515
7583
  export declare interface TLSvgTextExternalContent extends TLBaseExternalContent {
7516
7584
  type: 'svg-text';
@@ -7621,6 +7689,7 @@ export declare interface TLUserPreferences {
7621
7689
  isWrapMode?: boolean | null;
7622
7690
  isDynamicSizeMode?: boolean | null;
7623
7691
  isPasteAtCursorMode?: boolean | null;
7692
+ showUiLabels?: boolean | null;
7624
7693
  }
7625
7694
 
7626
7695
  /** @public */
@@ -7663,6 +7732,7 @@ export declare class TransformedGeometry2d extends Geometry2d {
7663
7732
  private readonly decomposed;
7664
7733
  constructor(geometry: Geometry2d, matrix: MatModel, opts?: TransformedGeometry2dOptions);
7665
7734
  getVertices(filters: Geometry2dFilters): Vec[];
7735
+ getBoundsVertices(): Vec[];
7666
7736
  nearestPoint(point: VecLike, filters?: Geometry2dFilters): Vec;
7667
7737
  hitTestPoint(point: VecLike, margin?: number, hitInside?: boolean, filters?: Geometry2dFilters): boolean;
7668
7738
  distanceToPoint(point: VecLike, hitInside?: boolean, filters?: Geometry2dFilters): number;
@@ -7683,6 +7753,7 @@ export declare interface TransformedGeometry2dOptions {
7683
7753
  isInternal?: boolean;
7684
7754
  debugColor?: string;
7685
7755
  ignore?: boolean;
7756
+ excludeFromShapeBounds?: boolean;
7686
7757
  }
7687
7758
 
7688
7759
  /** @public */
@@ -7793,6 +7864,7 @@ export declare class UserPreferencesManager {
7793
7864
  isWrapMode: boolean;
7794
7865
  locale: string;
7795
7866
  name: string;
7867
+ showUiLabels: boolean;
7796
7868
  };
7797
7869
  getIsDarkMode(): boolean;
7798
7870
  /**
@@ -7809,6 +7881,7 @@ export declare class UserPreferencesManager {
7809
7881
  getIsWrapMode(): boolean;
7810
7882
  getIsDynamicResizeMode(): boolean;
7811
7883
  getIsPasteAtCursorMode(): boolean;
7884
+ getShowUiLabels(): boolean;
7812
7885
  }
7813
7886
 
7814
7887
  /** @public */
@@ -7915,8 +7988,6 @@ export declare class Vec {
7915
7988
  lrp(B: VecLike, t: number): Vec;
7916
7989
  equals(B: VecLike): boolean;
7917
7990
  equalsXY(x: number, y: number): boolean;
7918
- /** @deprecated use `uni` instead */
7919
- norm(): this;
7920
7991
  toFixed(): this;
7921
7992
  toString(): string;
7922
7993
  toJson(): VecModel;
@@ -8038,6 +8109,15 @@ export declare class Vec {
8038
8109
  /** @public */
8039
8110
  export declare type VecLike = Vec | VecModel;
8040
8111
 
8112
+ /**
8113
+ * Checks if an event has already been handled. See {@link markEventAsHandled}.
8114
+ *
8115
+ * @public
8116
+ */
8117
+ export declare function wasEventAlreadyHandled(e: {
8118
+ nativeEvent: Event;
8119
+ } | Event): boolean;
8120
+
8041
8121
 
8042
8122
  export * from "@tldraw/state";
8043
8123
  export * from "@tldraw/state-react";
@@ -175,6 +175,7 @@ import { useViewportHeight } from "./lib/hooks/useViewportHeight.mjs";
175
175
  import {
176
176
  LicenseManager
177
177
  } from "./lib/license/LicenseManager.mjs";
178
+ import { LICENSE_TIMEOUT } from "./lib/license/LicenseProvider.mjs";
178
179
  import { defaultTldrawOptions } from "./lib/options.mjs";
179
180
  import {
180
181
  Box,
@@ -268,11 +269,14 @@ import {
268
269
  import {
269
270
  activeElementShouldCaptureKeys,
270
271
  loopToHtmlElement,
272
+ markEventAsHandled,
271
273
  preventDefault,
272
274
  releasePointerCapture,
273
275
  setPointerCapture,
274
- stopEventPropagation
276
+ stopEventPropagation,
277
+ wasEventAlreadyHandled
275
278
  } from "./lib/utils/dom.mjs";
279
+ import { EditorAtom } from "./lib/utils/EditorAtom.mjs";
276
280
  import { getIncrementedName } from "./lib/utils/getIncrementedName.mjs";
277
281
  import { getPointerInfo } from "./lib/utils/getPointerInfo.mjs";
278
282
  import { getSvgPathFromPoints } from "./lib/utils/getSvgPathFromPoints.mjs";
@@ -297,12 +301,9 @@ import { hardReset } from "./lib/utils/sync/hardReset.mjs";
297
301
  import { LocalIndexedDb, Table } from "./lib/utils/sync/LocalIndexedDb.mjs";
298
302
  import { uniq } from "./lib/utils/uniq.mjs";
299
303
  import { openWindow } from "./lib/utils/window-open.mjs";
300
- function debugEnableLicensing() {
301
- return;
302
- }
303
304
  registerTldrawLibraryVersion(
304
305
  "@tldraw/editor",
305
- "3.16.0-canary.ed8bd30c0f28",
306
+ "3.16.0-canary.f20b7a478e22",
306
307
  "esm"
307
308
  );
308
309
  export {
@@ -342,6 +343,7 @@ export {
342
343
  Edge2d,
343
344
  EdgeScrollManager,
344
345
  Editor,
346
+ EditorAtom,
345
347
  EditorContext,
346
348
  EditorProvider,
347
349
  Ellipse2d,
@@ -356,6 +358,7 @@ export {
356
358
  HTMLContainer,
357
359
  HandleSnaps,
358
360
  HistoryManager,
361
+ LICENSE_TIMEOUT,
359
362
  LicenseManager,
360
363
  LoadingScreen,
361
364
  LocalIndexedDb,
@@ -407,7 +410,6 @@ export {
407
410
  createTLStore,
408
411
  createTLUser,
409
412
  dataUrlToFile,
410
- debugEnableLicensing,
411
413
  debugFlags,
412
414
  defaultTldrawOptions,
413
415
  defaultUserPreferences,
@@ -452,6 +454,7 @@ export {
452
454
  loadSessionStateSnapshotIntoStore,
453
455
  loadSnapshot,
454
456
  loopToHtmlElement,
457
+ markEventAsHandled,
455
458
  maybeSnapToGrid,
456
459
  normalizeWheel,
457
460
  openWindow,
@@ -515,6 +518,7 @@ export {
515
518
  useTransform,
516
519
  useUniqueSafeId,
517
520
  useViewportHeight,
518
- userTypeValidator
521
+ userTypeValidator,
522
+ wasEventAlreadyHandled
519
523
  };
520
524
  //# sourceMappingURL=index.mjs.map