@tldraw/editor 4.4.0 → 4.5.0-canary.034ea85352da

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 (224) hide show
  1. package/dist-cjs/index.d.ts +67 -49
  2. package/dist-cjs/index.js +4 -7
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/TldrawEditor.js +4 -3
  5. package/dist-cjs/lib/TldrawEditor.js.map +2 -2
  6. package/dist-cjs/lib/components/ErrorBoundary.js.map +1 -1
  7. package/dist-cjs/lib/components/LiveCollaborators.js +2 -2
  8. package/dist-cjs/lib/components/LiveCollaborators.js.map +2 -2
  9. package/dist-cjs/lib/components/Shape.js +2 -2
  10. package/dist-cjs/lib/components/Shape.js.map +2 -2
  11. package/dist-cjs/lib/components/default-components/DefaultCanvas.js +15 -15
  12. package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
  13. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js +5 -6
  14. package/dist-cjs/lib/components/default-components/DefaultErrorFallback.js.map +2 -2
  15. package/dist-cjs/lib/components/default-components/DefaultLoadingScreen.js +3 -4
  16. package/dist-cjs/lib/components/default-components/DefaultLoadingScreen.js.map +2 -2
  17. package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js +2 -2
  18. package/dist-cjs/lib/components/default-components/DefaultShapeIndicator.js.map +2 -2
  19. package/dist-cjs/lib/components/default-components/DefaultShapeIndicators.js +2 -2
  20. package/dist-cjs/lib/components/default-components/DefaultShapeIndicators.js.map +2 -2
  21. package/dist-cjs/lib/config/TLSessionStateSnapshot.js +3 -2
  22. package/dist-cjs/lib/config/TLSessionStateSnapshot.js.map +2 -2
  23. package/dist-cjs/lib/editor/Editor.js +12 -0
  24. package/dist-cjs/lib/editor/Editor.js.map +2 -2
  25. package/dist-cjs/lib/editor/bindings/BindingUtil.js.map +1 -1
  26. package/dist-cjs/lib/editor/derivations/bindingsIndex.js.map +1 -1
  27. package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +1 -1
  28. package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js.map +1 -1
  29. package/dist-cjs/lib/editor/managers/FontManager/FontManager.js.map +1 -1
  30. package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js.map +1 -1
  31. package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js.map +1 -1
  32. package/dist-cjs/lib/editor/managers/SnapManager/BoundsSnaps.js.map +1 -1
  33. package/dist-cjs/lib/editor/managers/SnapManager/HandleSnaps.js.map +1 -1
  34. package/dist-cjs/lib/editor/managers/TextManager/TextManager.js.map +1 -1
  35. package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +1 -1
  36. package/dist-cjs/lib/editor/shapes/shared/resizeBox.js.map +1 -1
  37. package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js.map +1 -1
  38. package/dist-cjs/lib/editor/types/SvgExportContext.js.map +1 -1
  39. package/dist-cjs/lib/exports/exportToSvg.js.map +1 -1
  40. package/dist-cjs/lib/exports/getSvgJsx.js.map +1 -1
  41. package/dist-cjs/lib/{utils/hardResetEditor.js → hooks/EditorComponentsContext.js} +14 -8
  42. package/dist-cjs/lib/hooks/EditorComponentsContext.js.map +7 -0
  43. package/dist-cjs/lib/hooks/useCanvasEvents.js +10 -2
  44. package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
  45. package/dist-cjs/lib/hooks/useEditor.js.map +1 -1
  46. package/dist-cjs/lib/hooks/useEditorComponents.js +4 -10
  47. package/dist-cjs/lib/hooks/useEditorComponents.js.map +3 -3
  48. package/dist-cjs/lib/options.js +2 -1
  49. package/dist-cjs/lib/options.js.map +2 -2
  50. package/dist-cjs/lib/primitives/Vec.js +10 -5
  51. package/dist-cjs/lib/primitives/Vec.js.map +2 -2
  52. package/dist-cjs/lib/utils/areShapesContentEqual.js +3 -1
  53. package/dist-cjs/lib/utils/areShapesContentEqual.js.map +2 -2
  54. package/dist-cjs/lib/utils/assets.js +4 -6
  55. package/dist-cjs/lib/utils/assets.js.map +2 -2
  56. package/dist-cjs/lib/utils/browserCanvasMaxSize.js +1 -2
  57. package/dist-cjs/lib/utils/browserCanvasMaxSize.js.map +2 -2
  58. package/dist-cjs/lib/utils/debug-flags.js.map +2 -2
  59. package/dist-cjs/lib/utils/deepLinks.js.map +1 -1
  60. package/dist-cjs/lib/utils/dom.js +3 -3
  61. package/dist-cjs/lib/utils/dom.js.map +2 -2
  62. package/dist-cjs/lib/utils/getIncrementedName.js +1 -1
  63. package/dist-cjs/lib/utils/getIncrementedName.js.map +2 -2
  64. package/dist-cjs/lib/utils/getPointerInfo.js.map +2 -2
  65. package/dist-cjs/lib/utils/getSvgPathFromPoints.js.map +1 -1
  66. package/dist-cjs/lib/utils/keyboard.js +2 -2
  67. package/dist-cjs/lib/utils/keyboard.js.map +2 -2
  68. package/dist-cjs/lib/utils/normalizeWheel.js +2 -5
  69. package/dist-cjs/lib/utils/normalizeWheel.js.map +2 -2
  70. package/dist-cjs/lib/utils/reorderShapes.js +6 -6
  71. package/dist-cjs/lib/utils/reorderShapes.js.map +2 -2
  72. package/dist-cjs/lib/utils/reparenting.js +3 -4
  73. package/dist-cjs/lib/utils/reparenting.js.map +2 -2
  74. package/dist-cjs/lib/utils/richText.js.map +1 -1
  75. package/dist-cjs/lib/utils/rotation.js.map +1 -1
  76. package/dist-cjs/lib/utils/runtime.js +12 -0
  77. package/dist-cjs/lib/utils/runtime.js.map +2 -2
  78. package/dist-cjs/version.js +3 -3
  79. package/dist-cjs/version.js.map +1 -1
  80. package/dist-esm/index.d.mts +67 -49
  81. package/dist-esm/index.mjs +8 -5
  82. package/dist-esm/index.mjs.map +2 -2
  83. package/dist-esm/lib/TldrawEditor.mjs +2 -4
  84. package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
  85. package/dist-esm/lib/components/ErrorBoundary.mjs.map +1 -1
  86. package/dist-esm/lib/components/LiveCollaborators.mjs +1 -1
  87. package/dist-esm/lib/components/LiveCollaborators.mjs.map +2 -2
  88. package/dist-esm/lib/components/Shape.mjs +1 -1
  89. package/dist-esm/lib/components/Shape.mjs.map +2 -2
  90. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +1 -1
  91. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
  92. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs +2 -3
  93. package/dist-esm/lib/components/default-components/DefaultErrorFallback.mjs.map +2 -2
  94. package/dist-esm/lib/components/default-components/DefaultLoadingScreen.mjs +2 -3
  95. package/dist-esm/lib/components/default-components/DefaultLoadingScreen.mjs.map +2 -2
  96. package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs +1 -1
  97. package/dist-esm/lib/components/default-components/DefaultShapeIndicator.mjs.map +2 -2
  98. package/dist-esm/lib/components/default-components/DefaultShapeIndicators.mjs +1 -1
  99. package/dist-esm/lib/components/default-components/DefaultShapeIndicators.mjs.map +2 -2
  100. package/dist-esm/lib/config/TLSessionStateSnapshot.mjs +3 -2
  101. package/dist-esm/lib/config/TLSessionStateSnapshot.mjs.map +2 -2
  102. package/dist-esm/lib/editor/Editor.mjs +12 -0
  103. package/dist-esm/lib/editor/Editor.mjs.map +2 -2
  104. package/dist-esm/lib/editor/bindings/BindingUtil.mjs.map +1 -1
  105. package/dist-esm/lib/editor/derivations/bindingsIndex.mjs.map +1 -1
  106. package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +1 -1
  107. package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs.map +1 -1
  108. package/dist-esm/lib/editor/managers/FontManager/FontManager.mjs.map +1 -1
  109. package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs.map +1 -1
  110. package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs.map +1 -1
  111. package/dist-esm/lib/editor/managers/SnapManager/BoundsSnaps.mjs.map +1 -1
  112. package/dist-esm/lib/editor/managers/SnapManager/HandleSnaps.mjs.map +1 -1
  113. package/dist-esm/lib/editor/managers/TextManager/TextManager.mjs.map +1 -1
  114. package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +1 -1
  115. package/dist-esm/lib/editor/shapes/shared/resizeBox.mjs.map +1 -1
  116. package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs.map +1 -1
  117. package/dist-esm/lib/editor/types/SvgExportContext.mjs.map +1 -1
  118. package/dist-esm/lib/exports/exportToSvg.mjs.map +1 -1
  119. package/dist-esm/lib/exports/getSvgJsx.mjs.map +1 -1
  120. package/dist-esm/lib/hooks/EditorComponentsContext.mjs +14 -0
  121. package/dist-esm/lib/hooks/EditorComponentsContext.mjs.map +7 -0
  122. package/dist-esm/lib/hooks/useCanvasEvents.mjs +10 -2
  123. package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
  124. package/dist-esm/lib/hooks/useEditor.mjs.map +1 -1
  125. package/dist-esm/lib/hooks/useEditorComponents.mjs +12 -36
  126. package/dist-esm/lib/hooks/useEditorComponents.mjs.map +2 -2
  127. package/dist-esm/lib/options.mjs +2 -1
  128. package/dist-esm/lib/options.mjs.map +2 -2
  129. package/dist-esm/lib/primitives/Vec.mjs +6 -1
  130. package/dist-esm/lib/primitives/Vec.mjs.map +2 -2
  131. package/dist-esm/lib/utils/areShapesContentEqual.mjs +3 -1
  132. package/dist-esm/lib/utils/areShapesContentEqual.mjs.map +2 -2
  133. package/dist-esm/lib/utils/assets.mjs +4 -6
  134. package/dist-esm/lib/utils/assets.mjs.map +2 -2
  135. package/dist-esm/lib/utils/browserCanvasMaxSize.mjs +1 -2
  136. package/dist-esm/lib/utils/browserCanvasMaxSize.mjs.map +2 -2
  137. package/dist-esm/lib/utils/debug-flags.mjs.map +2 -2
  138. package/dist-esm/lib/utils/deepLinks.mjs.map +1 -1
  139. package/dist-esm/lib/utils/dom.mjs +3 -3
  140. package/dist-esm/lib/utils/dom.mjs.map +2 -2
  141. package/dist-esm/lib/utils/getIncrementedName.mjs +1 -1
  142. package/dist-esm/lib/utils/getIncrementedName.mjs.map +2 -2
  143. package/dist-esm/lib/utils/getPointerInfo.mjs.map +2 -2
  144. package/dist-esm/lib/utils/getSvgPathFromPoints.mjs.map +1 -1
  145. package/dist-esm/lib/utils/keyboard.mjs +2 -2
  146. package/dist-esm/lib/utils/keyboard.mjs.map +2 -2
  147. package/dist-esm/lib/utils/normalizeWheel.mjs +2 -5
  148. package/dist-esm/lib/utils/normalizeWheel.mjs.map +2 -2
  149. package/dist-esm/lib/utils/reorderShapes.mjs +6 -6
  150. package/dist-esm/lib/utils/reorderShapes.mjs.map +2 -2
  151. package/dist-esm/lib/utils/reparenting.mjs +3 -4
  152. package/dist-esm/lib/utils/reparenting.mjs.map +2 -2
  153. package/dist-esm/lib/utils/richText.mjs.map +1 -1
  154. package/dist-esm/lib/utils/rotation.mjs.map +1 -1
  155. package/dist-esm/lib/utils/runtime.mjs +12 -0
  156. package/dist-esm/lib/utils/runtime.mjs.map +2 -2
  157. package/dist-esm/version.mjs +3 -3
  158. package/dist-esm/version.mjs.map +1 -1
  159. package/package.json +7 -7
  160. package/src/index.ts +7 -4
  161. package/src/lib/TldrawEditor.tsx +3 -5
  162. package/src/lib/components/ErrorBoundary.tsx +1 -1
  163. package/src/lib/components/LiveCollaborators.tsx +1 -1
  164. package/src/lib/components/Shape.tsx +1 -1
  165. package/src/lib/components/default-components/DefaultCanvas.tsx +1 -1
  166. package/src/lib/components/default-components/DefaultErrorFallback.tsx +2 -3
  167. package/src/lib/components/default-components/DefaultLoadingScreen.tsx +6 -3
  168. package/src/lib/components/default-components/DefaultShapeIndicator.tsx +1 -1
  169. package/src/lib/components/default-components/DefaultShapeIndicators.tsx +1 -1
  170. package/src/lib/config/TLSessionStateSnapshot.ts +3 -2
  171. package/src/lib/editor/Editor.ts +16 -0
  172. package/src/lib/editor/bindings/BindingUtil.ts +1 -1
  173. package/src/lib/editor/derivations/bindingsIndex.ts +1 -1
  174. package/src/lib/editor/derivations/notVisibleShapes.ts +1 -1
  175. package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.ts +1 -1
  176. package/src/lib/editor/managers/FontManager/FontManager.ts +1 -1
  177. package/src/lib/editor/managers/InputsManager/InputsManager.ts +1 -1
  178. package/src/lib/editor/managers/ScribbleManager/ScribbleManager.ts +1 -1
  179. package/src/lib/editor/managers/SnapManager/BoundsSnaps.ts +2 -2
  180. package/src/lib/editor/managers/SnapManager/HandleSnaps.ts +2 -2
  181. package/src/lib/editor/managers/TextManager/TextManager.ts +1 -1
  182. package/src/lib/editor/managers/TickManager/TickManager.ts +1 -1
  183. package/src/lib/editor/shapes/shared/resizeBox.ts +1 -1
  184. package/src/lib/editor/tools/BaseBoxShapeTool/children/Pointing.ts +2 -2
  185. package/src/lib/editor/types/SvgExportContext.tsx +1 -1
  186. package/src/lib/exports/exportToSvg.tsx +1 -1
  187. package/src/lib/exports/getSvgJsx.tsx +1 -1
  188. package/src/lib/hooks/EditorComponentsContext.tsx +63 -0
  189. package/src/lib/hooks/useCanvasEvents.ts +13 -2
  190. package/src/lib/hooks/useEditor.tsx +1 -1
  191. package/src/lib/hooks/useEditorComponents.tsx +20 -89
  192. package/src/lib/options.ts +11 -0
  193. package/src/lib/primitives/Vec.ts +7 -1
  194. package/src/lib/utils/areShapesContentEqual.ts +9 -2
  195. package/src/lib/utils/assets.ts +15 -10
  196. package/src/lib/utils/browserCanvasMaxSize.ts +4 -2
  197. package/src/lib/utils/debug-flags.ts +0 -20
  198. package/src/lib/utils/deepLinks.ts +1 -1
  199. package/src/lib/utils/dom.ts +6 -7
  200. package/src/lib/utils/getIncrementedName.ts +1 -1
  201. package/src/lib/utils/getPointerInfo.ts +1 -0
  202. package/src/lib/utils/getSvgPathFromPoints.ts +1 -1
  203. package/src/lib/utils/keyboard.ts +6 -4
  204. package/src/lib/utils/normalizeWheel.ts +8 -8
  205. package/src/lib/utils/reorderShapes.ts +17 -8
  206. package/src/lib/utils/reparenting.ts +5 -10
  207. package/src/lib/utils/richText.ts +1 -1
  208. package/src/lib/utils/rotation.ts +1 -1
  209. package/src/lib/utils/runtime.ts +26 -1
  210. package/src/version.ts +3 -3
  211. package/dist-cjs/lib/utils/hardResetEditor.js.map +0 -7
  212. package/dist-cjs/lib/utils/refreshPage.js +0 -28
  213. package/dist-cjs/lib/utils/refreshPage.js.map +0 -7
  214. package/dist-cjs/lib/utils/window-open.js +0 -28
  215. package/dist-cjs/lib/utils/window-open.js.map +0 -7
  216. package/dist-esm/lib/utils/hardResetEditor.mjs +0 -8
  217. package/dist-esm/lib/utils/hardResetEditor.mjs.map +0 -7
  218. package/dist-esm/lib/utils/refreshPage.mjs +0 -8
  219. package/dist-esm/lib/utils/refreshPage.mjs.map +0 -7
  220. package/dist-esm/lib/utils/window-open.mjs +0 -8
  221. package/dist-esm/lib/utils/window-open.mjs.map +0 -7
  222. package/src/lib/utils/hardResetEditor.ts +0 -6
  223. package/src/lib/utils/refreshPage.ts +0 -6
  224. package/src/lib/utils/window-open.ts +0 -16
@@ -20,6 +20,7 @@ import { MigrationSequence } from '@tldraw/store';
20
20
  import { NamedExoticComponent } from 'react';
21
21
  import { Node as Node_2 } from '@tiptap/pm/model';
22
22
  import { PerformanceTracker } from '@tldraw/utils';
23
+ import { PointerEvent as PointerEvent_2 } from 'react';
23
24
  import { PointerEventHandler } from 'react';
24
25
  import * as React_2 from 'react';
25
26
  import { default as React_3 } from 'react';
@@ -63,7 +64,6 @@ import { TLImageAsset } from '@tldraw/tlschema';
63
64
  import { TLInstance } from '@tldraw/tlschema';
64
65
  import { TLInstancePageState } from '@tldraw/tlschema';
65
66
  import { TLInstancePresence } from '@tldraw/tlschema';
66
- import { TLOpacityType } from '@tldraw/tlschema';
67
67
  import { TLPage } from '@tldraw/tlschema';
68
68
  import { TLPageId } from '@tldraw/tlschema';
69
69
  import { TLParentId } from '@tldraw/tlschema';
@@ -439,13 +439,13 @@ export declare class BoundsSnaps {
439
439
  private getSnappablePoints;
440
440
  private getSnappableGapNodes;
441
441
  private getVisibleGaps;
442
- snapTranslateShapes({ lockedAxis, initialSelectionPageBounds, initialSelectionSnapPoints, dragDelta, }: {
442
+ snapTranslateShapes({ lockedAxis, initialSelectionPageBounds, initialSelectionSnapPoints, dragDelta }: {
443
443
  dragDelta: Vec;
444
444
  initialSelectionPageBounds: Box;
445
445
  initialSelectionSnapPoints: BoundsSnapPoint[];
446
446
  lockedAxis: 'x' | 'y' | null;
447
447
  }): SnapData;
448
- snapResizeShapes({ initialSelectionPageBounds, dragDelta, handle: originalHandle, isAspectRatioLocked, isResizingFromCenter, }: {
448
+ snapResizeShapes({ initialSelectionPageBounds, dragDelta, handle: originalHandle, isAspectRatioLocked, isResizingFromCenter }: {
449
449
  dragDelta: Vec;
450
450
  handle: SelectionCorner | SelectionEdge;
451
451
  initialSelectionPageBounds: Box;
@@ -679,7 +679,7 @@ export declare const coreShapes: readonly [typeof GroupShapeUtil];
679
679
  export declare function counterClockwiseAngleDist(a0: number, a1: number): number;
680
680
 
681
681
  /** @public */
682
- export declare function createDebugValue<T>(name: string, { defaults, shouldStoreForSession, }: {
682
+ export declare function createDebugValue<T>(name: string, { defaults, shouldStoreForSession }: {
683
683
  defaults: DebugFlagDefaults<T>;
684
684
  shouldStoreForSession?: boolean;
685
685
  }): DebugFlag<T>;
@@ -729,8 +729,8 @@ export declare function createTLStore({ initialData, defaultName, id, assets, on
729
729
 
730
730
  /** @public */
731
731
  export declare function createTLUser(opts?: {
732
- setUserPreferences?: (userPreferences: TLUserPreferences) => void;
733
- userPreferences?: Signal<TLUserPreferences>;
732
+ setUserPreferences?: ((userPreferences: TLUserPreferences) => void) | undefined;
733
+ userPreferences?: Signal<TLUserPreferences, unknown> | undefined;
734
734
  }): TLUser;
735
735
 
736
736
  /** @public */
@@ -769,7 +769,13 @@ export declare class CubicSpline2d extends Geometry2d {
769
769
  getSvgPathData(): string;
770
770
  }
771
771
 
772
- /** @public */
772
+ /**
773
+ * Converts a data URL to a file.
774
+ * @param url - The data URL to convert.
775
+ * @param filename - The name of the file.
776
+ * @param mimeType - The MIME type of the file.
777
+ * @returns A promise that resolves to a file.
778
+ * @public */
773
779
  export declare function dataUrlToFile(url: string, filename: string, mimeType: string): Promise<File>;
774
780
 
775
781
  /** @public */
@@ -808,7 +814,7 @@ export declare const DefaultBrush: ({ brush, color, opacity, className }: TLBrus
808
814
  export declare function DefaultCanvas({ className }: TLCanvasComponentProps): JSX.Element;
809
815
 
810
816
  /** @public @react */
811
- export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity, }: TLCollaboratorHintProps): JSX.Element;
817
+ export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity }: TLCollaboratorHintProps): JSX.Element;
812
818
 
813
819
  /** @public @react */
814
820
  export declare const DefaultCursor: NamedExoticComponent<TLCursorProps>;
@@ -878,6 +884,7 @@ export declare const defaultTldrawOptions: {
878
884
  readonly edgeScrollEaseDuration: 200;
879
885
  readonly edgeScrollSpeed: 25;
880
886
  readonly enableToolbarKeyboardShortcuts: true;
887
+ readonly experimental__onDropOnCanvas: undefined;
881
888
  readonly exportProvider: ExoticComponent<FragmentProps>;
882
889
  readonly flattenImageBoundsExpand: 64;
883
890
  readonly flattenImageBoundsPadding: 16;
@@ -1015,7 +1022,7 @@ export declare class EdgeScrollManager {
1015
1022
  /** @public */
1016
1023
  export declare class Editor extends EventEmitter<TLEventMap> {
1017
1024
  readonly id: string;
1018
- constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, initialState, autoFocus, inferDarkMode, options: _options, textOptions: _textOptions, getShapeVisibility, fontAssetUrls, }: TLEditorOptions);
1025
+ constructor({ store, user, shapeUtils, bindingUtils, tools, getContainer, cameraOptions, initialState, autoFocus, inferDarkMode, options: _options, textOptions: _textOptions, getShapeVisibility, fontAssetUrls }: TLEditorOptions);
1019
1026
  private readonly _getShapeVisibility?;
1020
1027
  private getIsShapeHiddenCache;
1021
1028
  isShapeHidden(shapeOrId: TLShape | TLShapeId): boolean;
@@ -1088,8 +1095,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1088
1095
  readonly timers: {
1089
1096
  dispose: () => void;
1090
1097
  requestAnimationFrame: (callback: FrameRequestCallback) => number;
1091
- setInterval: (handler: TimerHandler, timeout?: number, ...args: any[]) => number;
1092
- setTimeout: (handler: TimerHandler, timeout?: number, ...args: any[]) => number;
1098
+ setInterval: (handler: TimerHandler, timeout?: number | undefined, ...args: any[]) => number;
1099
+ setTimeout: (handler: TimerHandler, timeout?: number | undefined, ...args: any[]) => number;
1093
1100
  };
1094
1101
  /**
1095
1102
  * A manager for the user and their preferences.
@@ -1480,14 +1487,14 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1480
1487
  * @public
1481
1488
  */
1482
1489
  getPageStates(): TLInstancePageState[];
1483
- /* Excluded from this release type: _getPageStatesQuery */
1490
+ private _getPageStatesQuery;
1484
1491
  /**
1485
1492
  * The current page state.
1486
1493
  *
1487
1494
  * @public
1488
1495
  */
1489
1496
  getCurrentPageState(): TLInstancePageState;
1490
- /* Excluded from this release type: _getCurrentPageStateId */
1497
+ private _getCurrentPageStateId;
1491
1498
  /**
1492
1499
  * Update this instance's page state.
1493
1500
  *
@@ -1880,7 +1887,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
1880
1887
  *
1881
1888
  * @public */
1882
1889
  getTextOptions(): TLTextOptions;
1883
- /* Excluded from this release type: _unsafe_getCameraId */
1890
+ private _unsafe_getCameraId;
1884
1891
  /**
1885
1892
  * The current camera.
1886
1893
  *
@@ -2130,10 +2137,10 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2130
2137
  */
2131
2138
  slideCamera(opts?: {
2132
2139
  direction: VecLike;
2133
- force?: boolean;
2134
- friction?: number;
2140
+ force?: boolean | undefined;
2141
+ friction?: number | undefined;
2135
2142
  speed: number;
2136
- speedThreshold?: number;
2143
+ speedThreshold?: number | undefined;
2137
2144
  }): this;
2138
2145
  /**
2139
2146
  * Animate the camera to a user's cursor position. This also briefly show the user's cursor if it's not currently visible.
@@ -2441,7 +2448,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2441
2448
  * @public
2442
2449
  */
2443
2450
  renamePage(page: TLPage | TLPageId, name: string): this;
2444
- /* Excluded from this release type: _getAllAssetsQuery */
2451
+ private _getAllAssetsQuery;
2445
2452
  /**
2446
2453
  * Get all assets in the editor.
2447
2454
  *
@@ -2530,7 +2537,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2530
2537
  * @public
2531
2538
  */
2532
2539
  getShapeGeometry<T extends Geometry2d>(shape: TLShape | TLShapeId, opts?: TLGeometryOpts): T;
2533
- /* Excluded from this release type: _getShapeHandlesCache */
2540
+ private _getShapeHandlesCache;
2534
2541
  /**
2535
2542
  * Get the handles (if any) for a shape.
2536
2543
  *
@@ -2560,7 +2567,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2560
2567
  * @public
2561
2568
  */
2562
2569
  getShapeLocalTransform(shape: TLShape | TLShapeId): Mat;
2563
- /* Excluded from this release type: _getShapePageTransformCache */
2570
+ private _getShapePageTransformCache;
2564
2571
  /**
2565
2572
  * Get the local transform of a shape's parent as a matrix model.
2566
2573
  *
@@ -2588,7 +2595,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2588
2595
  * @public
2589
2596
  */
2590
2597
  getShapePageTransform(shape: TLShape | TLShapeId): Mat;
2591
- /* Excluded from this release type: _getShapePageBoundsCache */
2598
+ private _getShapePageBoundsCache;
2592
2599
  /**
2593
2600
  * Get the bounds of a shape in the current page space.
2594
2601
  *
@@ -2603,7 +2610,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2603
2610
  * @public
2604
2611
  */
2605
2612
  getShapePageBounds(shape: TLShape | TLShapeId): Box | undefined;
2606
- /* Excluded from this release type: _getShapeClipPathCache */
2613
+ private _getShapeClipPathCache;
2607
2614
  /**
2608
2615
  * Get the clip path for a shape.
2609
2616
  *
@@ -2620,7 +2627,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2620
2627
  * @public
2621
2628
  */
2622
2629
  getShapeClipPath(shape: TLShape | TLShapeId): string | undefined;
2623
- /* Excluded from this release type: _getShapeMaskCache */
2630
+ private _getShapeMaskCache;
2624
2631
  /**
2625
2632
  * Get the mask (in the current page space) for a shape.
2626
2633
  *
@@ -2652,7 +2659,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2652
2659
  * @public
2653
2660
  */
2654
2661
  getShapeMaskedPageBounds(shape: TLShape | TLShapeId): Box | undefined;
2655
- /* Excluded from this release type: _getShapeMaskedPageBoundsCache */
2662
+ private _getShapeMaskedPageBoundsCache;
2656
2663
  /**
2657
2664
  * Get the ancestors of a shape.
2658
2665
  *
@@ -2762,8 +2769,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2762
2769
  * @public
2763
2770
  */
2764
2771
  getShapesAtPoint(point: VecLike, opts?: {
2765
- hitInside?: boolean;
2766
- margin?: number;
2772
+ hitInside?: boolean | undefined;
2773
+ margin?: number | undefined;
2767
2774
  }): TLShape[];
2768
2775
  /**
2769
2776
  * Get shape IDs within the given bounds.
@@ -2799,8 +2806,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
2799
2806
  * @public
2800
2807
  */
2801
2808
  isPointInShape(shape: TLShape | TLShapeId, point: VecLike, opts?: {
2802
- hitInside?: boolean;
2803
- margin?: number;
2809
+ hitInside?: boolean | undefined;
2810
+ margin?: number | undefined;
2804
2811
  }): boolean;
2805
2812
  /**
2806
2813
  * Convert a point in the current page space to a point in the local space of a shape. For example, if a
@@ -3074,7 +3081,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3074
3081
  * Delete a binding by its ID. If the binding doesn't exist, it's ignored.
3075
3082
  */
3076
3083
  deleteBinding(binding: TLBinding | TLBindingId, opts?: Parameters<this['deleteBindings']>[1]): this;
3077
- canBindShapes({ fromShape, toShape, binding, }: {
3084
+ canBindShapes({ fromShape, toShape, binding }: {
3078
3085
  binding: {
3079
3086
  type: TLBinding['type'];
3080
3087
  } | TLBinding | TLBinding['type'];
@@ -3523,7 +3530,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3523
3530
  deleteShape(id: TLShapeId): this;
3524
3531
  deleteShape(shape: TLShape): this;
3525
3532
  /* Excluded from this release type: _extractSharedStyles */
3526
- /* Excluded from this release type: _getSelectionSharedStyles */
3533
+ private _getSelectionSharedStyles;
3527
3534
  /**
3528
3535
  * Get the style for the next shape.
3529
3536
  *
@@ -3712,7 +3719,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3712
3719
  * @param opts - Options for handling external content, including force flag to bypass readonly checks.
3713
3720
  */
3714
3721
  putExternalContent<E>(info: TLExternalContent<E>, opts?: {
3715
- force?: boolean;
3722
+ force?: boolean | undefined;
3716
3723
  }): Promise<void>;
3717
3724
  /**
3718
3725
  * Handle replacing external content.
@@ -3721,7 +3728,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
3721
3728
  * @param opts - Options for handling external content, including force flag to bypass readonly checks.
3722
3729
  */
3723
3730
  replaceExternalContent<E>(info: TLExternalContent<E>, opts?: {
3724
- force?: boolean;
3731
+ force?: boolean | undefined;
3725
3732
  }): Promise<void>;
3726
3733
  /**
3727
3734
  * Get content that can be exported for the given shape ids.
@@ -4308,7 +4315,10 @@ export declare function getArcMeasure(A: number, B: number, sweepFlag: number, l
4308
4315
  /** @public */
4309
4316
  export declare function getCursor(cursor: TLCursorType, rotation?: number, color?: string): string;
4310
4317
 
4311
- /** @public */
4318
+ /**
4319
+ * Gets the default CDN base URL.
4320
+ * @returns The default CDN base URL.
4321
+ * @public */
4312
4322
  export declare function getDefaultCdnBaseUrl(): string;
4313
4323
 
4314
4324
  /**
@@ -4357,7 +4367,7 @@ export declare function getPerfectDashProps(totalLength: number, strokeWidth: nu
4357
4367
  };
4358
4368
 
4359
4369
  /** @public */
4360
- export declare function getPointerInfo(editor: Editor, e: PointerEvent | React.PointerEvent): {
4370
+ export declare function getPointerInfo(editor: Editor, e: PointerEvent | React_3.PointerEvent): {
4361
4371
  accelKey: boolean;
4362
4372
  altKey: boolean;
4363
4373
  button: number;
@@ -4418,7 +4428,7 @@ export declare function getSvgAsImage(svgString: string, options: {
4418
4428
  }): Promise<Blob | null>;
4419
4429
 
4420
4430
  /**
4421
- * Turn an array of points into a path of quadradic curves.
4431
+ * Turn an array of points into a path of quadratic curves.
4422
4432
  *
4423
4433
  * @param points - The points returned from perfect-freehand
4424
4434
  * @param closed - Whether the stroke is closed
@@ -4525,7 +4535,7 @@ export declare class HandleSnaps {
4525
4535
  private iterateSnapOutlines;
4526
4536
  private getHandleSnapPosition;
4527
4537
  private getHandleSnapData;
4528
- snapHandle({ currentShapeId, handle, }: {
4538
+ snapHandle({ currentShapeId, handle }: {
4529
4539
  currentShapeId: TLShapeId;
4530
4540
  handle: TLHandle;
4531
4541
  }): null | SnapData;
@@ -4928,7 +4938,6 @@ export declare const isSafeFloat: (n: number) => boolean;
4928
4938
 
4929
4939
  /**
4930
4940
  * Reparents shapes that are no longer contained within their parent shapes.
4931
- * todo: rename me to something more descriptive, like `reparentOccludedShapes` or `reparentAutoDroppedShapes`
4932
4941
  *
4933
4942
  * @param editor - The editor instance.
4934
4943
  * @param shapeIds - The IDs of the shapes to reparent.
@@ -5187,16 +5196,16 @@ export declare function precise(A: VecLike): string;
5187
5196
  /**
5188
5197
  * This function calls `event.preventDefault()` for you. Why is that useful?
5189
5198
  *
5190
- * Beacuase if you enable `window.preventDefaultLogging = true` it'll log out a message when it
5199
+ * Because if you enable `window.preventDefaultLogging = true` it'll log out a message when it
5191
5200
  * happens. Because we use console.warn rather than (log) you'll get a stack trace in the inspector
5192
5201
  * telling you exactly where it happened. This is important because `e.preventDefault()` is the
5193
- * source of many bugs, but unfortuantly it can't be avoided because it also stops a lot of default
5202
+ * source of many bugs, but unfortunately it can't be avoided because it also stops a lot of default
5194
5203
  * behaviour which doesn't make sense in our UI
5195
5204
  *
5196
5205
  * @param event - To prevent default on
5197
5206
  * @public
5198
5207
  */
5199
- export declare function preventDefault(event: Event | React_3.BaseSyntheticEvent): void;
5208
+ export declare function preventDefault(event: Event | React.BaseSyntheticEvent): void;
5200
5209
 
5201
5210
  /**
5202
5211
  * Convert radians to degrees.
@@ -5258,7 +5267,7 @@ export declare class Rectangle2d extends Polygon2d {
5258
5267
  export declare function refreshPage(): void;
5259
5268
 
5260
5269
  /** @public */
5261
- export declare function releasePointerCapture(element: Element, event: PointerEvent | React_3.PointerEvent<Element>): void;
5270
+ export declare function releasePointerCapture(element: Element, event: PointerEvent | React.PointerEvent<Element>): void;
5262
5271
 
5263
5272
  /** @public */
5264
5273
  export declare type RequiredKeys<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
@@ -5326,7 +5335,7 @@ export declare function rotateSelectionHandle(handle: SelectionHandle, rotation:
5326
5335
 
5327
5336
  /** @public */
5328
5337
  export declare const runtime: {
5329
- hardReset(): void;
5338
+ hardReset(): Promise<void>;
5330
5339
  openWindow(url: string, target: string, allowReferrer?: boolean): void;
5331
5340
  refreshPage(): void;
5332
5341
  };
@@ -5518,7 +5527,7 @@ export declare type SelectionEdge = 'bottom' | 'left' | 'right' | 'top';
5518
5527
  export declare type SelectionHandle = SelectionCorner | SelectionEdge;
5519
5528
 
5520
5529
  /** @public */
5521
- export declare function setPointerCapture(element: Element, event: PointerEvent | React_3.PointerEvent<Element>): void;
5530
+ export declare function setPointerCapture(element: Element, event: PointerEvent | React.PointerEvent<Element>): void;
5522
5531
 
5523
5532
  /** @public */
5524
5533
  export declare function setRuntimeOverrides(input: Partial<typeof runtime>): void;
@@ -7105,6 +7114,15 @@ export declare interface TldrawOptions {
7105
7114
  * viewport's page dimensions regardless of overview zoom changes.
7106
7115
  */
7107
7116
  readonly quickZoomPreservesScreenBounds: boolean;
7117
+ /**
7118
+ * Called when content is dropped on the canvas. Provides the page position
7119
+ * where the drop occurred and the underlying drag event object.
7120
+ * Return true to prevent default drop handling (files, URLs, etc.)
7121
+ */
7122
+ experimental__onDropOnCanvas?(options: {
7123
+ event: React.DragEvent<Element>;
7124
+ point: VecLike;
7125
+ }): boolean;
7108
7126
  }
7109
7127
 
7110
7128
  /** @public */
@@ -7753,7 +7771,7 @@ export declare const tlmenus: {
7753
7771
  *
7754
7772
  * @public
7755
7773
  */
7756
- clearOpenMenus(contextId?: string): void;
7774
+ clearOpenMenus(contextId?: string | undefined): void;
7757
7775
  /**
7758
7776
  * Delete an open menu.
7759
7777
  *
@@ -7776,7 +7794,7 @@ export declare const tlmenus: {
7776
7794
  *
7777
7795
  * @public
7778
7796
  */
7779
- getOpenMenus(contextId?: string): string[];
7797
+ getOpenMenus(contextId?: string | undefined): string[];
7780
7798
  /**
7781
7799
  * Get whether a menu is open for a given context.
7782
7800
  *
@@ -7790,7 +7808,7 @@ export declare const tlmenus: {
7790
7808
  *
7791
7809
  * @public
7792
7810
  */
7793
- isMenuOpen(id: string, contextId?: string): boolean;
7811
+ isMenuOpen(id: string, contextId?: string | undefined): boolean;
7794
7812
  /**
7795
7813
  * Get whether any menus are open for a given context.
7796
7814
  *
@@ -7828,7 +7846,7 @@ export declare const tlmenus: {
7828
7846
  *
7829
7847
  * @public
7830
7848
  */
7831
- hideOpenMenus(contextId?: string): void;
7849
+ hideOpenMenus(contextId?: string | undefined): void;
7832
7850
  /**
7833
7851
  * Show all hidden menus.
7834
7852
  *
@@ -7842,7 +7860,7 @@ export declare const tlmenus: {
7842
7860
  *
7843
7861
  * @public
7844
7862
  */
7845
- showOpenMenus(contextId?: string): void;
7863
+ showOpenMenus(contextId?: string | undefined): void;
7846
7864
  forContext(contextId: string): {
7847
7865
  addOpenMenu: (id: string) => void;
7848
7866
  clearOpenMenus: () => void;
@@ -8560,7 +8578,7 @@ export declare const userTypeValidator: T.Validator<TLUserPreferences>;
8560
8578
  /** @public */
8561
8579
  export declare function useSelectionEvents(handle: TLSelectionHandle): {
8562
8580
  onPointerDown: PointerEventHandler<Element>;
8563
- onPointerMove: (e: React.PointerEvent) => void;
8581
+ onPointerMove: (e: PointerEvent_2<Element>) => void;
8564
8582
  onPointerUp: PointerEventHandler<Element>;
8565
8583
  };
8566
8584
 
package/dist-cjs/index.js CHANGED
@@ -152,7 +152,7 @@ __export(index_exports, {
152
152
  getUserPreferences: () => import_TLUserPreferences.getUserPreferences,
153
153
  getVerticesCountForArcLength: () => import_geometry_constants.getVerticesCountForArcLength,
154
154
  hardReset: () => import_hardReset.hardReset,
155
- hardResetEditor: () => import_hardResetEditor.hardResetEditor,
155
+ hardResetEditor: () => import_runtime.hardResetEditor,
156
156
  inlineBase64AssetStore: () => import_createTLStore.inlineBase64AssetStore,
157
157
  intersectCircleCircle: () => import_intersect.intersectCircleCircle,
158
158
  intersectCirclePolygon: () => import_intersect.intersectCirclePolygon,
@@ -172,7 +172,7 @@ __export(index_exports, {
172
172
  loopToHtmlElement: () => import_dom.loopToHtmlElement,
173
173
  maybeSnapToGrid: () => import_Pointing.maybeSnapToGrid,
174
174
  normalizeWheel: () => import_normalizeWheel.normalizeWheel,
175
- openWindow: () => import_window_open.openWindow,
175
+ openWindow: () => import_runtime.openWindow,
176
176
  parseDeepLinkString: () => import_deepLinks.parseDeepLinkString,
177
177
  perimeterOfEllipse: () => import_utils2.perimeterOfEllipse,
178
178
  pointInPolygon: () => import_utils2.pointInPolygon,
@@ -182,7 +182,7 @@ __export(index_exports, {
182
182
  preventDefault: () => import_dom.preventDefault,
183
183
  radiansToDegrees: () => import_utils2.radiansToDegrees,
184
184
  rangeIntersection: () => import_utils2.rangeIntersection,
185
- refreshPage: () => import_refreshPage.refreshPage,
185
+ refreshPage: () => import_runtime.refreshPage,
186
186
  releasePointerCapture: () => import_dom.releasePointerCapture,
187
187
  resizeBox: () => import_resizeBox.resizeBox,
188
188
  resizeScaled: () => import_resizeScaled.resizeScaled,
@@ -357,10 +357,8 @@ var import_EditorAtom = require("./lib/utils/EditorAtom");
357
357
  var import_getIncrementedName = require("./lib/utils/getIncrementedName");
358
358
  var import_getPointerInfo = require("./lib/utils/getPointerInfo");
359
359
  var import_getSvgPathFromPoints = require("./lib/utils/getSvgPathFromPoints");
360
- var import_hardResetEditor = require("./lib/utils/hardResetEditor");
361
360
  var import_keyboard = require("./lib/utils/keyboard");
362
361
  var import_normalizeWheel = require("./lib/utils/normalizeWheel");
363
- var import_refreshPage = require("./lib/utils/refreshPage");
364
362
  var import_reparenting = require("./lib/utils/reparenting");
365
363
  var import_richText = require("./lib/utils/richText");
366
364
  var import_rotation = require("./lib/utils/rotation");
@@ -369,10 +367,9 @@ var import_SharedStylesMap = require("./lib/utils/SharedStylesMap");
369
367
  var import_hardReset = require("./lib/utils/sync/hardReset");
370
368
  var import_LocalIndexedDb = require("./lib/utils/sync/LocalIndexedDb");
371
369
  var import_uniq = require("./lib/utils/uniq");
372
- var import_window_open = require("./lib/utils/window-open");
373
370
  (0, import_utils.registerTldrawLibraryVersion)(
374
371
  "@tldraw/editor",
375
- "4.4.0",
372
+ "4.5.0-canary.034ea85352da",
376
373
  "cjs"
377
374
  );
378
375
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\n\n// eslint-disable-next-line 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 { 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\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\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\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\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 {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { 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 LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\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 { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { 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 TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport { runtime, setRuntimeOverrides } from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\nexport { openWindow } from './lib/utils/window-open'\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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",
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\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 { 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\tDefaultShapeWrapper,\n\ttype TLShapeWrapperProps,\n} from './lib/components/default-components/DefaultShapeWrapper'\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\tErrorBoundary,\n\tOptionalErrorBoundary,\n\ttype TLErrorBoundaryProps,\n} from './lib/components/ErrorBoundary'\nexport { HTMLContainer, type HTMLContainerProps } from './lib/components/HTMLContainer'\nexport { MenuClickCapture } from './lib/components/MenuClickCapture'\nexport { SVGContainer, type SVGContainerProps } from './lib/components/SVGContainer'\nexport {\n\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 {\n\tgetSnapshot,\n\tloadSnapshot,\n\ttype TLEditorSnapshot,\n\ttype TLLoadSnapshotOptions,\n} from './lib/config/TLEditorSnapshot'\nexport {\n\tcreateSessionStateSnapshotSignal,\n\textractSessionStateFromLegacySnapshot,\n\tloadSessionStateSnapshotIntoStore,\n\tTAB_ID,\n\ttype TLLoadSessionStateSnapshotOptions,\n\ttype TLSessionStateSnapshot,\n} from './lib/config/TLSessionStateSnapshot'\nexport {\n\tdefaultUserPreferences,\n\tgetFreshUserPreferences,\n\tgetUserPreferences,\n\tsetUserPreferences,\n\tUSER_COLORS,\n\tuserTypeValidator,\n\ttype TLUserPreferences,\n} from './lib/config/TLUserPreferences'\nexport { DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS, SIDES } from './lib/constants'\nexport {\n\tBindingUtil,\n\ttype BindingOnChangeOptions,\n\ttype BindingOnCreateOptions,\n\ttype BindingOnDeleteOptions,\n\ttype BindingOnShapeChangeOptions,\n\ttype BindingOnShapeDeleteOptions,\n\ttype BindingOnShapeIsolateOptions,\n\ttype TLBindingUtilConstructor,\n} from './lib/editor/bindings/BindingUtil'\nexport {\n\tEditor,\n\ttype TLEditorOptions,\n\ttype TLEditorRunOptions,\n\ttype TLRenderingShape,\n\ttype TLResizeShapeOptions,\n} from './lib/editor/Editor'\nexport { ClickManager, type TLClickState } from './lib/editor/managers/ClickManager/ClickManager'\nexport { EdgeScrollManager } from './lib/editor/managers/EdgeScrollManager/EdgeScrollManager'\nexport {\n\tFontManager,\n\ttype TLFontFace,\n\ttype TLFontFaceSource,\n} from './lib/editor/managers/FontManager/FontManager'\nexport { HistoryManager } from './lib/editor/managers/HistoryManager/HistoryManager'\nexport { InputsManager } from './lib/editor/managers/InputsManager/InputsManager'\nexport {\n\tScribbleManager,\n\ttype ScribbleItem,\n\ttype ScribbleSessionOptions,\n} from './lib/editor/managers/ScribbleManager/ScribbleManager'\nexport {\n\tBoundsSnaps,\n\ttype BoundsSnapGeometry,\n\ttype BoundsSnapPoint,\n} from './lib/editor/managers/SnapManager/BoundsSnaps'\nexport { HandleSnaps, type HandleSnapGeometry } from './lib/editor/managers/SnapManager/HandleSnaps'\nexport {\n\tSnapManager,\n\ttype GapsSnapIndicator,\n\ttype PointsSnapIndicator,\n\ttype SnapData,\n\ttype SnapIndicator,\n} from './lib/editor/managers/SnapManager/SnapManager'\nexport { SpatialIndexManager } from './lib/editor/managers/SpatialIndexManager/SpatialIndexManager'\nexport {\n\tTextManager,\n\ttype TLMeasureTextOpts,\n\ttype TLMeasureTextSpanOpts,\n} from './lib/editor/managers/TextManager/TextManager'\nexport { TickManager } from './lib/editor/managers/TickManager/TickManager'\nexport { UserPreferencesManager } from './lib/editor/managers/UserPreferencesManager/UserPreferencesManager'\nexport { BaseBoxShapeUtil, type TLBaseBoxShape } from './lib/editor/shapes/BaseBoxShapeUtil'\nexport { GroupShapeUtil } from './lib/editor/shapes/group/GroupShapeUtil'\nexport {\n\tShapeUtil,\n\ttype TLCropInfo,\n\ttype TLDragShapesInInfo,\n\ttype TLDragShapesOutInfo,\n\ttype TLDragShapesOverInfo,\n\ttype TLDropShapesOverInfo,\n\ttype TLEditStartInfo,\n\ttype TLGeometryOpts,\n\ttype TLHandleDragInfo,\n\ttype TLIndicatorPath,\n\ttype TLResizeInfo,\n\ttype TLResizeMode,\n\ttype TLShapeUtilCanBeLaidOutOpts,\n\ttype TLShapeUtilCanBindOpts,\n\ttype TLShapeUtilCanvasSvgDef,\n\ttype TLShapeUtilConstructor,\n} from './lib/editor/shapes/ShapeUtil'\nexport {\n\tgetPerfectDashProps,\n\ttype PerfectDashTerminal,\n} from './lib/editor/shapes/shared/getPerfectDashProps'\nexport { resizeBox, type ResizeBoxOptions } from './lib/editor/shapes/shared/resizeBox'\nexport { resizeScaled } from './lib/editor/shapes/shared/resizeScaled'\nexport { BaseBoxShapeTool } from './lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool'\nexport { maybeSnapToGrid } from './lib/editor/tools/BaseBoxShapeTool/children/Pointing'\nexport { StateNode, type TLStateNodeConstructor } from './lib/editor/tools/StateNode'\nexport { type TLContent } from './lib/editor/types/clipboard-types'\nexport { type TLEventMap, type TLEventMapHandler } from './lib/editor/types/emit-types'\nexport {\n\tEVENT_NAME_MAP,\n\ttype TLBaseEventInfo,\n\ttype TLCancelEvent,\n\ttype TLCancelEventInfo,\n\ttype TLClickEvent,\n\ttype TLClickEventInfo,\n\ttype TLCLickEventName,\n\ttype TLCompleteEvent,\n\ttype TLCompleteEventInfo,\n\ttype TLEnterEventHandler,\n\ttype TLEventHandlers,\n\ttype TLEventInfo,\n\ttype TLEventName,\n\ttype TLExitEventHandler,\n\ttype TLInterruptEvent,\n\ttype TLInterruptEventInfo,\n\ttype TLKeyboardEvent,\n\ttype TLKeyboardEventInfo,\n\ttype TLKeyboardEventName,\n\ttype TLPinchEvent,\n\ttype TLPinchEventInfo,\n\ttype TLPinchEventName,\n\ttype TLPointerEvent,\n\ttype TLPointerEventInfo,\n\ttype TLPointerEventName,\n\ttype TLPointerEventTarget,\n\ttype TLTickEvent,\n\ttype TLTickEventInfo,\n\ttype TLWheelEvent,\n\ttype TLWheelEventInfo,\n\ttype UiEvent,\n\ttype UiEventType,\n} from './lib/editor/types/event-types'\nexport {\n\ttype TLBaseExternalContent,\n\ttype TLEmbedExternalContent,\n\ttype TLErrorExternalContentSource,\n\ttype TLExcalidrawExternalContent,\n\ttype TLExcalidrawExternalContentSource,\n\ttype TLExternalAsset,\n\ttype TLExternalContent,\n\ttype TLExternalContentSource,\n\ttype TLFileExternalAsset,\n\ttype TLFileReplaceExternalContent,\n\ttype TLFilesExternalContent,\n\ttype TLSvgTextExternalContent,\n\ttype TLTextExternalContent,\n\ttype TLTextExternalContentSource,\n\ttype TLTldrawExternalContent,\n\ttype TLTldrawExternalContentSource,\n\ttype TLUrlExternalAsset,\n\ttype TLUrlExternalContent,\n} from './lib/editor/types/external-content'\nexport {\n\ttype TLHistoryBatchOptions,\n\ttype TLHistoryDiff,\n\ttype TLHistoryEntry,\n\ttype TLHistoryMark,\n} from './lib/editor/types/history-types'\nexport {\n\ttype OptionalKeys,\n\ttype RequiredKeys,\n\ttype TLCameraConstraints,\n\ttype TLCameraMoveOptions,\n\ttype TLCameraOptions,\n\ttype TLExportType,\n\ttype TLGetShapeAtPointOptions,\n\ttype TLImageExportOptions,\n\ttype TLSvgExportOptions,\n\ttype TLUpdatePointerOptions,\n} from './lib/editor/types/misc-types'\nexport {\n\ttype TLAdjacentDirection,\n\ttype TLResizeHandle,\n\ttype TLSelectionHandle,\n} from './lib/editor/types/selection-types'\nexport {\n\tuseDelaySvgExport,\n\tuseSvgExportContext,\n\ttype SvgExportContext,\n\ttype SvgExportDef,\n} from './lib/editor/types/SvgExportContext'\nexport { getSvgAsImage } from './lib/exports/getSvgAsImage'\nexport { tlenv, tlenvReactive } from './lib/globals/environment'\nexport { tlmenus } from './lib/globals/menus'\nexport { tltime } from './lib/globals/time'\nexport {\n\tContainerProvider,\n\tuseContainer,\n\tuseContainerIfExists,\n\ttype ContainerProviderProps,\n} from './lib/hooks/useContainer'\nexport { getCursor } from './lib/hooks/useCursor'\nexport {\n\tEditorContext,\n\tEditorProvider,\n\tuseEditor,\n\tuseMaybeEditor,\n\ttype EditorProviderProps,\n} from './lib/hooks/useEditor'\nexport { useEditorComponents } from './lib/hooks/useEditorComponents'\nexport type { TLEditorComponents } from './lib/hooks/useEditorComponents'\nexport { useEvent, useReactiveEvent } from './lib/hooks/useEvent'\nexport { useGlobalMenuIsOpen } from './lib/hooks/useGlobalMenuIsOpen'\nexport { useShallowArrayIdentity, useShallowObjectIdentity } from './lib/hooks/useIdentity'\nexport { useIsCropping } from './lib/hooks/useIsCropping'\nexport { 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 LicenseState,\n\ttype ValidLicenseKeyResult,\n} from './lib/license/LicenseManager'\nexport { LICENSE_TIMEOUT } from './lib/license/LicenseProvider'\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 { EASINGS } from './lib/primitives/easings'\nexport { Arc2d } from './lib/primitives/geometry/Arc2d'\nexport { Circle2d } from './lib/primitives/geometry/Circle2d'\nexport { CubicBezier2d } from './lib/primitives/geometry/CubicBezier2d'\nexport { CubicSpline2d } from './lib/primitives/geometry/CubicSpline2d'\nexport { Edge2d } from './lib/primitives/geometry/Edge2d'\nexport { Ellipse2d } from './lib/primitives/geometry/Ellipse2d'\nexport { getVerticesCountForArcLength } from './lib/primitives/geometry/geometry-constants'\nexport {\n\tGeometry2d,\n\tGeometry2dFilters,\n\tTransformedGeometry2d,\n\ttype Geometry2dOptions,\n\ttype TransformedGeometry2dOptions,\n} from './lib/primitives/geometry/Geometry2d'\nexport { Group2d } from './lib/primitives/geometry/Group2d'\nexport { Point2d } from './lib/primitives/geometry/Point2d'\nexport { Polygon2d } from './lib/primitives/geometry/Polygon2d'\nexport { Polyline2d } from './lib/primitives/geometry/Polyline2d'\nexport { Rectangle2d } from './lib/primitives/geometry/Rectangle2d'\nexport { Stadium2d } from './lib/primitives/geometry/Stadium2d'\nexport {\n\tintersectCircleCircle,\n\tintersectCirclePolygon,\n\tintersectCirclePolyline,\n\tintersectLineSegmentCircle,\n\tintersectLineSegmentLineSegment,\n\tintersectLineSegmentPolygon,\n\tintersectLineSegmentPolyline,\n\tintersectPolygonBounds,\n\tintersectPolygonPolygon,\n\tlinesIntersect,\n\tpolygonIntersectsPolyline,\n\tpolygonsIntersect,\n} from './lib/primitives/intersect'\nexport { Mat, type MatLike, type MatModel } from './lib/primitives/Mat'\nexport {\n\tangleDistance,\n\tapproximately,\n\tareAnglesCompatible,\n\taverage,\n\tcanonicalizeRotation,\n\tcenterOfCircleFromThreePoints,\n\tclamp,\n\tclampRadians,\n\tclockwiseAngleDist,\n\tcounterClockwiseAngleDist,\n\tdegreesToRadians,\n\tgetArcMeasure,\n\tgetPointInArcT,\n\tgetPointOnCircle,\n\tgetPointsOnArc,\n\tgetPolygonVertices,\n\tHALF_PI,\n\tisSafeFloat,\n\tperimeterOfEllipse,\n\tPI,\n\tPI2,\n\tpointInPolygon,\n\tprecise,\n\tradiansToDegrees,\n\trangeIntersection,\n\tshortAngleDist,\n\tSIN,\n\tsnapAngle,\n\ttoDomPrecision,\n\ttoFixed,\n\ttoPrecision,\n} from './lib/primitives/utils'\nexport { Vec, type VecLike } from './lib/primitives/Vec'\nexport {\n\tErrorScreen,\n\tLoadingScreen,\n\tTldrawEditor,\n\tuseOnMount,\n\ttype LoadingScreenProps,\n\ttype TldrawEditorBaseProps,\n\ttype TldrawEditorProps,\n\ttype TldrawEditorStoreProps,\n\ttype TldrawEditorWithoutStoreProps,\n\ttype TldrawEditorWithStoreProps,\n\ttype TLOnMountHandler,\n} from './lib/TldrawEditor'\nexport { dataUrlToFile, getDefaultCdnBaseUrl } from './lib/utils/assets'\nexport { clampToBrowserMaxCanvasSize, type CanvasMaxSize } from './lib/utils/browserCanvasMaxSize'\nexport {\n\tcreateDebugValue,\n\tdebugFlags,\n\tfeatureFlags,\n\ttype DebugFlag,\n\ttype DebugFlagDef,\n\ttype DebugFlagDefaults,\n} from './lib/utils/debug-flags'\nexport {\n\tcreateDeepLinkString,\n\tparseDeepLinkString,\n\ttype TLDeepLink,\n\ttype TLDeepLinkOptions,\n} from './lib/utils/deepLinks'\nexport {\n\tactiveElementShouldCaptureKeys,\n\tloopToHtmlElement,\n\tpreventDefault,\n\treleasePointerCapture,\n\tsetPointerCapture,\n\tstopEventPropagation,\n} from './lib/utils/dom'\nexport { EditorAtom } from './lib/utils/EditorAtom'\nexport { getIncrementedName } from './lib/utils/getIncrementedName'\nexport { getPointerInfo } from './lib/utils/getPointerInfo'\nexport { getSvgPathFromPoints } from './lib/utils/getSvgPathFromPoints'\nexport { isAccelKey } from './lib/utils/keyboard'\nexport { normalizeWheel } from './lib/utils/normalizeWheel'\nexport { getDroppedShapesToNewParents, kickoutOccludedShapes } from './lib/utils/reparenting'\nexport {\n\tgetFontsFromRichText,\n\ttype RichTextFontVisitor,\n\ttype RichTextFontVisitorState,\n\ttype TiptapEditor,\n\ttype TiptapNode,\n\ttype TLTextOptions,\n} from './lib/utils/richText'\nexport {\n\tapplyRotationToSnapshotShapes,\n\tgetRotationSnapshot,\n\ttype TLRotationSnapshot,\n} from './lib/utils/rotation'\nexport {\n\thardResetEditor,\n\topenWindow,\n\trefreshPage,\n\truntime,\n\tsetRuntimeOverrides,\n} from './lib/utils/runtime'\nexport {\n\tReadonlySharedStyleMap,\n\tSharedStyleMap,\n\ttype SharedStyle,\n} from './lib/utils/SharedStylesMap'\nexport { hardReset } from './lib/utils/sync/hardReset'\nexport { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb'\nexport { type TLStoreWithStatus } from './lib/utils/sync/StoreWithStatus'\nexport { uniq } from './lib/utils/uniq'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
+ "mappings": "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",
6
6
  "names": ["import_utils"]
7
7
  }
@@ -48,6 +48,7 @@ var import_DefaultErrorFallback = require("./components/default-components/Defau
48
48
  var import_ErrorBoundary = require("./components/ErrorBoundary");
49
49
  var import_createTLUser = require("./config/createTLUser");
50
50
  var import_Editor = require("./editor/Editor");
51
+ var import_EditorComponentsContext = require("./hooks/EditorComponentsContext");
51
52
  var import_useContainer = require("./hooks/useContainer");
52
53
  var import_useCursor = require("./hooks/useCursor");
53
54
  var import_useDarkMode = require("./hooks/useDarkMode");
@@ -164,7 +165,7 @@ const TldrawEditorWithLoadingStore = (0, import_react.memo)(function TldrawEdito
164
165
  container.classList.add("tl-theme__dark");
165
166
  }
166
167
  }, [container, user]);
167
- const { LoadingScreen: LoadingScreen2 } = (0, import_useEditorComponents.useEditorComponents)();
168
+ const { LoadingScreen: LoadingScreen2 } = (0, import_EditorComponentsContext.useEditorComponents)();
168
169
  switch (store.status) {
169
170
  case "error": {
170
171
  throw store.error;
@@ -203,7 +204,7 @@ function TldrawEditorWithReadyStore({
203
204
  getShapeVisibility,
204
205
  assetUrls
205
206
  }) {
206
- const { ErrorFallback } = (0, import_useEditorComponents.useEditorComponents)();
207
+ const { ErrorFallback } = (0, import_EditorComponentsContext.useEditorComponents)();
207
208
  const container = (0, import_useContainer.useContainer)();
208
209
  const [editor, setEditor] = (0, import_useRefState.useRefState)(null);
209
210
  const canvasRef = (0, import_react.useRef)(null);
@@ -343,7 +344,7 @@ function TldrawEditorWithReadyStore({
343
344
  isCancelled = true;
344
345
  };
345
346
  }, [editor]);
346
- const { Canvas, LoadingScreen: LoadingScreen2 } = (0, import_useEditorComponents.useEditorComponents)();
347
+ const { Canvas, LoadingScreen: LoadingScreen2 } = (0, import_EditorComponentsContext.useEditorComponents)();
347
348
  if (!editor || !fontLoadingState?.isLoaded) {
348
349
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
349
350
  LoadingScreen2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingScreen2, {}),