tldraw 4.3.0-canary.9c474ef3fad5 → 4.3.0-canary.a2419250444e

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 (507) hide show
  1. package/dist-cjs/index.d.ts +285 -237
  2. package/dist-cjs/index.js +12 -5
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/defaultEmbedDefinitions.js +1 -1
  5. package/dist-cjs/lib/defaultEmbedDefinitions.js.map +2 -2
  6. package/dist-cjs/lib/defaultExternalContentHandlers.js +5 -5
  7. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  8. package/dist-cjs/lib/defaultSideEffects.js +6 -1
  9. package/dist-cjs/lib/defaultSideEffects.js.map +2 -2
  10. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +6 -2
  11. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  12. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +1 -1
  13. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
  14. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  15. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  16. package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js +1 -1
  17. package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js.map +2 -2
  18. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js +4 -10
  19. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js.map +2 -2
  20. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +7 -4
  21. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  22. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -1
  23. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  24. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +22 -20
  25. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  26. package/dist-cjs/lib/shapes/draw/getPath.js +20 -11
  27. package/dist-cjs/lib/shapes/draw/getPath.js.map +2 -2
  28. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +82 -86
  29. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +3 -3
  30. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +6 -0
  31. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
  32. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +5 -4
  33. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  34. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +136 -136
  35. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  36. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js +5 -10
  37. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js.map +2 -2
  38. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +3 -3
  39. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +2 -2
  40. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +22 -20
  41. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  42. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js +3 -3
  43. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js.map +2 -2
  44. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +1 -6
  45. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js +5 -10
  47. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js.map +2 -2
  48. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +1 -1
  49. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  50. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +1 -1
  51. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
  52. package/dist-cjs/lib/shapes/shared/interpolate-props.js +3 -3
  53. package/dist-cjs/lib/shapes/shared/interpolate-props.js.map +2 -2
  54. package/dist-cjs/lib/shapes/text/RichTextArea.js +5 -0
  55. package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
  56. package/dist-cjs/lib/shapes/text/toolStates/Idle.js +4 -10
  57. package/dist-cjs/lib/shapes/text/toolStates/Idle.js.map +2 -2
  58. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js +7 -5
  59. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js.map +2 -2
  60. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +4 -5
  61. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  62. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +2 -4
  63. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  64. package/dist-cjs/lib/tools/HandTool/HandTool.js +3 -5
  65. package/dist-cjs/lib/tools/HandTool/HandTool.js.map +2 -2
  66. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js +3 -2
  67. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js.map +2 -2
  68. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js +1 -1
  69. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js.map +2 -2
  70. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js +1 -1
  71. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js.map +2 -2
  72. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +9 -7
  73. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +2 -2
  74. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +6 -5
  75. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +2 -2
  76. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js +4 -6
  77. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js.map +2 -2
  78. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +1 -1
  79. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +2 -2
  80. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +1 -1
  81. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
  82. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js +1 -1
  83. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js.map +2 -2
  84. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js +2 -1
  85. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js.map +2 -2
  86. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js +1 -1
  87. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js.map +2 -2
  88. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +7 -5
  89. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  90. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +38 -11
  91. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +2 -2
  92. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +42 -50
  93. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  94. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js +6 -6
  95. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js.map +2 -2
  96. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js +1 -1
  97. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js.map +2 -2
  98. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +4 -14
  99. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +2 -2
  100. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +1 -1
  101. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
  102. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +1 -1
  103. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +2 -2
  104. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js +2 -2
  105. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js.map +2 -2
  106. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +4 -13
  107. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  108. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +5 -6
  109. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  110. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +2 -3
  111. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  112. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +7 -6
  113. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +2 -2
  114. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +13 -11
  115. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  116. package/dist-cjs/lib/tools/SelectTool/selectHelpers.js +15 -4
  117. package/dist-cjs/lib/tools/SelectTool/selectHelpers.js.map +2 -2
  118. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js +1 -1
  119. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js.map +2 -2
  120. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js +3 -3
  121. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js.map +2 -2
  122. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js +5 -6
  123. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js.map +2 -2
  124. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +1 -3
  125. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  126. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +1 -1
  127. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +2 -2
  128. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js +1 -1
  129. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js.map +2 -2
  130. package/dist-cjs/lib/ui/TldrawUi.js +2 -2
  131. package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
  132. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js +1 -3
  133. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js.map +2 -2
  134. package/dist-cjs/lib/ui/components/CursorChatBubble.js +1 -1
  135. package/dist-cjs/lib/ui/components/CursorChatBubble.js.map +2 -2
  136. package/dist-cjs/lib/ui/components/DefaultDebugPanel.js +1 -21
  137. package/dist-cjs/lib/ui/components/DefaultDebugPanel.js.map +2 -2
  138. package/dist-cjs/lib/ui/components/HelperButtons/BackToContent.js +1 -1
  139. package/dist-cjs/lib/ui/components/HelperButtons/BackToContent.js.map +2 -2
  140. package/dist-cjs/lib/ui/components/HelperButtons/StopFollowing.js.map +2 -2
  141. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +1 -1
  142. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
  143. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +2 -15
  144. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js.map +3 -3
  145. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js +3 -1
  146. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js.map +2 -2
  147. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js +6 -0
  148. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js.map +2 -2
  149. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +1 -1
  150. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +2 -2
  151. package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js +1 -1
  152. package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js.map +2 -2
  153. package/dist-cjs/lib/ui/components/TopPanel/CenteredTopPanelContainer.js.map +1 -1
  154. package/dist-cjs/lib/ui/components/ZoomMenu/DefaultZoomMenu.js +1 -1
  155. package/dist-cjs/lib/ui/components/ZoomMenu/DefaultZoomMenu.js.map +2 -2
  156. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +3 -1
  157. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  158. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +6 -5
  159. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
  160. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.js.map +2 -2
  161. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.js.map +2 -2
  162. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +13 -6
  163. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  164. package/dist-cjs/lib/ui/context/actions.js +6 -6
  165. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  166. package/dist-cjs/lib/ui/context/components.js +1 -2
  167. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  168. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +2 -2
  169. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  170. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
  171. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  172. package/dist-cjs/lib/ui/hooks/useTools.js +4 -5
  173. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  174. package/dist-cjs/lib/ui/version.js +3 -3
  175. package/dist-cjs/lib/ui/version.js.map +1 -1
  176. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +8 -6
  177. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  178. package/dist-cjs/lib/{tools/selection-logic/getShouldEnterCropModeOnPointerDown.js → utils/test-helpers.js} +21 -8
  179. package/dist-cjs/lib/utils/test-helpers.js.map +7 -0
  180. package/dist-cjs/lib/utils/text/richText.js +4 -2
  181. package/dist-cjs/lib/utils/text/richText.js.map +2 -2
  182. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +7 -2
  183. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  184. package/dist-esm/index.d.mts +285 -237
  185. package/dist-esm/index.mjs +12 -5
  186. package/dist-esm/index.mjs.map +2 -2
  187. package/dist-esm/lib/defaultEmbedDefinitions.mjs +1 -1
  188. package/dist-esm/lib/defaultEmbedDefinitions.mjs.map +2 -2
  189. package/dist-esm/lib/defaultExternalContentHandlers.mjs +5 -5
  190. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  191. package/dist-esm/lib/defaultSideEffects.mjs +6 -1
  192. package/dist-esm/lib/defaultSideEffects.mjs.map +2 -2
  193. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +6 -2
  194. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  195. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +1 -1
  196. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
  197. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  198. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  199. package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs +1 -1
  200. package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs.map +2 -2
  201. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs +4 -10
  202. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs.map +2 -2
  203. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +7 -4
  204. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  205. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +1 -1
  206. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  207. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +27 -22
  208. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  209. package/dist-esm/lib/shapes/draw/getPath.mjs +21 -11
  210. package/dist-esm/lib/shapes/draw/getPath.mjs.map +2 -2
  211. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +83 -86
  212. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +3 -3
  213. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +6 -0
  214. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
  215. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +5 -4
  216. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  217. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +137 -136
  218. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  219. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs +5 -10
  220. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs.map +2 -2
  221. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +3 -3
  222. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +2 -2
  223. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +23 -21
  224. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  225. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs +3 -3
  226. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs.map +2 -2
  227. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +2 -7
  228. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  229. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs +5 -10
  230. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs.map +2 -2
  231. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +1 -1
  232. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  233. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +1 -1
  234. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  235. package/dist-esm/lib/shapes/shared/interpolate-props.mjs +4 -4
  236. package/dist-esm/lib/shapes/shared/interpolate-props.mjs.map +2 -2
  237. package/dist-esm/lib/shapes/text/RichTextArea.mjs +5 -0
  238. package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
  239. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs +4 -10
  240. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs.map +2 -2
  241. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs +7 -5
  242. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs.map +2 -2
  243. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +4 -5
  244. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  245. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +2 -4
  246. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  247. package/dist-esm/lib/tools/HandTool/HandTool.mjs +3 -5
  248. package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +2 -2
  249. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs +3 -2
  250. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs.map +2 -2
  251. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs +1 -1
  252. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs.map +2 -2
  253. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs +1 -1
  254. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs.map +2 -2
  255. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +9 -7
  256. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +2 -2
  257. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +6 -5
  258. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +2 -2
  259. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs +4 -6
  260. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs.map +2 -2
  261. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +1 -1
  262. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +2 -2
  263. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +1 -1
  264. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
  265. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs +1 -1
  266. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs.map +2 -2
  267. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs +2 -1
  268. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs.map +2 -2
  269. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs +1 -1
  270. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs.map +2 -2
  271. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +7 -5
  272. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  273. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +38 -11
  274. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +2 -2
  275. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +43 -51
  276. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  277. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs +6 -6
  278. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs.map +2 -2
  279. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs +1 -1
  280. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs.map +2 -2
  281. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +5 -15
  282. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +2 -2
  283. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +1 -1
  284. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
  285. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +1 -1
  286. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +2 -2
  287. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs +2 -2
  288. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs.map +2 -2
  289. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +4 -13
  290. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  291. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +5 -6
  292. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  293. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +2 -3
  294. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  295. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +7 -6
  296. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +2 -2
  297. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +13 -11
  298. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  299. package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs +17 -4
  300. package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs.map +2 -2
  301. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs +1 -1
  302. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs.map +2 -2
  303. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs +3 -3
  304. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs.map +2 -2
  305. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs +5 -6
  306. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs.map +2 -2
  307. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +1 -3
  308. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  309. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs +1 -1
  310. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +2 -2
  311. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs +1 -1
  312. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs.map +2 -2
  313. package/dist-esm/lib/ui/TldrawUi.mjs +2 -2
  314. package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
  315. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs +1 -3
  316. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs.map +2 -2
  317. package/dist-esm/lib/ui/components/CursorChatBubble.mjs +1 -1
  318. package/dist-esm/lib/ui/components/CursorChatBubble.mjs.map +2 -2
  319. package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs +3 -30
  320. package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs.map +2 -2
  321. package/dist-esm/lib/ui/components/HelperButtons/BackToContent.mjs +1 -1
  322. package/dist-esm/lib/ui/components/HelperButtons/BackToContent.mjs.map +2 -2
  323. package/dist-esm/lib/ui/components/HelperButtons/StopFollowing.mjs.map +2 -2
  324. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +1 -1
  325. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
  326. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs +3 -6
  327. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs.map +2 -2
  328. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs +3 -1
  329. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs.map +2 -2
  330. package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs +6 -0
  331. package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs.map +2 -2
  332. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +1 -1
  333. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +2 -2
  334. package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs +1 -1
  335. package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs.map +2 -2
  336. package/dist-esm/lib/ui/components/TopPanel/CenteredTopPanelContainer.mjs.map +1 -1
  337. package/dist-esm/lib/ui/components/ZoomMenu/DefaultZoomMenu.mjs +1 -1
  338. package/dist-esm/lib/ui/components/ZoomMenu/DefaultZoomMenu.mjs.map +2 -2
  339. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +3 -1
  340. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  341. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +6 -5
  342. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
  343. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.mjs.map +2 -2
  344. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.mjs.map +2 -2
  345. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +13 -6
  346. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  347. package/dist-esm/lib/ui/context/actions.mjs +6 -6
  348. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  349. package/dist-esm/lib/ui/context/components.mjs +1 -2
  350. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  351. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -2
  352. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  353. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
  354. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  355. package/dist-esm/lib/ui/hooks/useTools.mjs +4 -5
  356. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  357. package/dist-esm/lib/ui/version.mjs +3 -3
  358. package/dist-esm/lib/ui/version.mjs.map +1 -1
  359. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +9 -6
  360. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  361. package/dist-esm/lib/utils/test-helpers.mjs +21 -0
  362. package/dist-esm/lib/utils/test-helpers.mjs.map +7 -0
  363. package/dist-esm/lib/utils/text/richText.mjs +5 -2
  364. package/dist-esm/lib/utils/text/richText.mjs.map +2 -2
  365. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +8 -2
  366. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  367. package/package.json +18 -16
  368. package/src/index.ts +5 -2
  369. package/src/lib/Tldraw.test.tsx +46 -1
  370. package/src/lib/defaultEmbedDefinitions.ts +2 -1
  371. package/src/lib/defaultExternalContentHandlers.ts +10 -10
  372. package/src/lib/defaultSideEffects.ts +6 -1
  373. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +40 -133
  374. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +8 -8
  375. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +6 -4
  376. package/src/lib/shapes/arrow/arrowLabel.ts +1 -1
  377. package/src/lib/shapes/arrow/arrowTargetState.ts +1 -1
  378. package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.test.ts +80 -0
  379. package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.tsx +1 -1
  380. package/src/lib/shapes/arrow/toolStates/Idle.tsx +4 -14
  381. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +7 -4
  382. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +1 -1
  383. package/src/lib/shapes/draw/DrawShapeUtil.test.ts +146 -0
  384. package/src/lib/shapes/draw/DrawShapeUtil.tsx +28 -24
  385. package/src/lib/shapes/draw/getPath.ts +31 -10
  386. package/src/lib/shapes/draw/toolStates/Drawing.ts +96 -86
  387. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +7 -0
  388. package/src/lib/shapes/frame/FrameShapeUtil.tsx +9 -3
  389. package/src/lib/shapes/geo/GeoShapeUtil.tsx +219 -172
  390. package/src/lib/shapes/geo/toolStates/Idle.ts +5 -15
  391. package/src/lib/shapes/geo/toolStates/Pointing.ts +3 -3
  392. package/src/lib/shapes/highlight/HighlightShapeUtil.test.ts +146 -0
  393. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +24 -23
  394. package/src/lib/shapes/line/toolStates/Pointing.ts +3 -3
  395. package/src/lib/shapes/note/NoteShapeUtil.tsx +2 -2
  396. package/src/lib/shapes/note/noteCloning.test.ts +3 -1
  397. package/src/lib/shapes/note/toolStates/Pointing.ts +5 -10
  398. package/src/lib/shapes/shared/HyperlinkButton.tsx +1 -1
  399. package/src/lib/shapes/shared/RichTextLabel.tsx +1 -1
  400. package/src/lib/shapes/shared/interpolate-props.ts +4 -4
  401. package/src/lib/shapes/text/RichTextArea.tsx +5 -0
  402. package/src/lib/shapes/text/toolStates/Idle.ts +4 -14
  403. package/src/lib/shapes/text/toolStates/Pointing.ts +7 -7
  404. package/src/lib/tools/EraserTool/childStates/Erasing.ts +4 -5
  405. package/src/lib/tools/EraserTool/childStates/Pointing.ts +2 -4
  406. package/src/lib/tools/HandTool/HandTool.ts +3 -5
  407. package/src/lib/tools/HandTool/childStates/Dragging.ts +3 -2
  408. package/src/lib/tools/HandTool/childStates/Pointing.ts +1 -1
  409. package/src/lib/tools/LaserTool/childStates/Lasering.ts +1 -1
  410. package/src/lib/tools/SelectTool/DragAndDropManager.ts +12 -7
  411. package/src/lib/tools/SelectTool/childStates/Brushing.ts +6 -5
  412. package/src/lib/tools/SelectTool/childStates/Crop/children/Cropping.ts +7 -6
  413. package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +1 -1
  414. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +1 -1
  415. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.ts +1 -1
  416. package/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +2 -1
  417. package/src/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.ts +1 -1
  418. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +7 -5
  419. package/src/lib/tools/SelectTool/childStates/EditingShape.ts +55 -12
  420. package/src/lib/tools/SelectTool/childStates/Idle.ts +58 -71
  421. package/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +6 -7
  422. package/src/lib/tools/SelectTool/childStates/PointingCanvas.ts +1 -1
  423. package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +5 -5
  424. package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +1 -1
  425. package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +1 -1
  426. package/src/lib/tools/SelectTool/childStates/PointingSelection.ts +2 -2
  427. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +4 -14
  428. package/src/lib/tools/SelectTool/childStates/Resizing.ts +6 -6
  429. package/src/lib/tools/SelectTool/childStates/Rotating.ts +2 -3
  430. package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +7 -6
  431. package/src/lib/tools/SelectTool/childStates/Translating.ts +15 -12
  432. package/src/lib/tools/SelectTool/selectHelpers.ts +39 -4
  433. package/src/lib/tools/ZoomTool/ZoomTool.ts +1 -1
  434. package/src/lib/tools/ZoomTool/childStates/Pointing.ts +3 -3
  435. package/src/lib/tools/ZoomTool/childStates/ZoomBrushing.ts +5 -6
  436. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -3
  437. package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +1 -1
  438. package/src/lib/tools/selection-logic/updateHoveredShapeId.ts +1 -1
  439. package/src/lib/ui/TldrawUi.tsx +5 -2
  440. package/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx +1 -3
  441. package/src/lib/ui/components/CursorChatBubble.tsx +2 -2
  442. package/src/lib/ui/components/DefaultDebugPanel.tsx +3 -42
  443. package/src/lib/ui/components/HelperButtons/BackToContent.tsx +1 -1
  444. package/src/lib/ui/components/HelperButtons/StopFollowing.tsx +2 -2
  445. package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +1 -1
  446. package/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx +6 -5
  447. package/src/lib/ui/components/PageMenu/PageItemInput.tsx +3 -1
  448. package/src/lib/ui/components/SharePanel/PeopleMenu.tsx +8 -0
  449. package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +1 -1
  450. package/src/lib/ui/components/Toolbar/DefaultRichTextToolbar.tsx +1 -1
  451. package/src/lib/ui/components/TopPanel/CenteredTopPanelContainer.tsx +1 -1
  452. package/src/lib/ui/components/ZoomMenu/DefaultZoomMenu.tsx +1 -1
  453. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +5 -3
  454. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +12 -5
  455. package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.tsx +1 -1
  456. package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.tsx +1 -1
  457. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +5 -2
  458. package/src/lib/ui/context/actions.tsx +6 -6
  459. package/src/lib/ui/context/components.tsx +1 -2
  460. package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
  461. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +2 -2
  462. package/src/lib/ui/hooks/useTools.tsx +4 -5
  463. package/src/lib/ui/version.ts +3 -3
  464. package/src/lib/ui.css +27 -23
  465. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +12 -48
  466. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +11 -6
  467. package/src/lib/utils/test-helpers.ts +60 -0
  468. package/src/lib/utils/text/richText.ts +6 -5
  469. package/src/lib/utils/tldr/buildFromV1Document.ts +9 -2
  470. package/src/test/Editor.test.tsx +40 -29
  471. package/src/test/EraserTool.test.ts +10 -12
  472. package/src/test/TestEditor.ts +48 -47
  473. package/src/test/TldrawEditor.test.tsx +3 -2
  474. package/src/test/__snapshots__/drawing.test.ts.snap +3 -1257
  475. package/src/test/__snapshots__/resizing.test.ts.snap +3 -12
  476. package/src/test/arrows-megabus.test.tsx +1 -1
  477. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +8 -8
  478. package/src/test/commands/setCamera.test.ts +13 -11
  479. package/src/test/commands/stackShapes.test.ts +34 -8
  480. package/src/test/commands/zoomToBounds.test.ts +19 -3
  481. package/src/test/commands/zoomToSelection.test.ts +14 -3
  482. package/src/test/custom-clipping.test.ts +16 -9
  483. package/src/test/drawing.test.ts +17 -10
  484. package/src/test/flipShapes.test.ts +33 -0
  485. package/src/test/frames.test.ts +92 -0
  486. package/src/test/groups.test.tsx +1 -1
  487. package/src/test/modifiers.test.ts +6 -6
  488. package/src/test/resizing.test.ts +7 -9
  489. package/src/test/selection-omnibus.test.ts +2 -2
  490. package/src/test/spacebarPanning.test.ts +28 -10
  491. package/src/test/test-jsx.tsx +3 -0
  492. package/src/test/ui/BackToContent.test.tsx +111 -0
  493. package/tldraw.css +33 -31
  494. package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js.map +0 -7
  495. package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js +0 -32
  496. package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js.map +0 -7
  497. package/dist-cjs/lib/utils/text/textDirection.js +0 -51
  498. package/dist-cjs/lib/utils/text/textDirection.js.map +0 -7
  499. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs +0 -8
  500. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs.map +0 -7
  501. package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs +0 -12
  502. package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs.map +0 -7
  503. package/dist-esm/lib/utils/text/textDirection.mjs +0 -31
  504. package/dist-esm/lib/utils/text/textDirection.mjs.map +0 -7
  505. package/src/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.ts +0 -10
  506. package/src/lib/ui/components/TopPanel/DefaultTopPanel.tsx +0 -10
  507. package/src/lib/utils/text/textDirection.ts +0 -32
@@ -25,7 +25,8 @@ import { HandleSnapGeometry } from '@tldraw/editor';
25
25
  import { HTMLAttributes } from 'react';
26
26
  import { IndexKey } from '@tldraw/editor';
27
27
  import { JsonObject } from '@tldraw/editor';
28
- import { JSX as JSX_2 } from 'react/jsx-runtime';
28
+ import { JSX } from 'react/jsx-runtime';
29
+ import { JSXElementConstructor } from 'react';
29
30
  import { LANGUAGES } from '@tldraw/editor';
30
31
  import { MigrationFailureReason } from '@tldraw/editor';
31
32
  import { MigrationSequence } from '@tldraw/editor';
@@ -38,6 +39,7 @@ import * as React_2 from 'react';
38
39
  import { default as React_3 } from 'react';
39
40
  import { ReactElement } from 'react';
40
41
  import { ReactNode } from 'react';
42
+ import { ReactPortal } from 'react';
41
43
  import { ReadonlySharedStyleMap } from '@tldraw/editor';
42
44
  import { RecordProps } from '@tldraw/editor';
43
45
  import { Rectangle2d } from '@tldraw/editor';
@@ -89,8 +91,10 @@ import { TLDrawShapeProps } from '@tldraw/editor';
89
91
  import { TLDrawShapeSegment } from '@tldraw/editor';
90
92
  import { TLEditorComponents } from '@tldraw/editor';
91
93
  import { TLEditorSnapshot } from '@tldraw/editor';
94
+ import { TLEditStartInfo } from '@tldraw/editor';
92
95
  import { TLEmbedShape } from '@tldraw/editor';
93
96
  import { TLEmbedShapeProps } from '@tldraw/editor';
97
+ import { TLEventInfo } from '@tldraw/editor';
94
98
  import { TLExportType } from '@tldraw/editor';
95
99
  import { TLFileExternalAsset } from '@tldraw/editor';
96
100
  import { TLFontFace } from '@tldraw/editor';
@@ -155,7 +159,7 @@ export declare interface A11yProviderProps {
155
159
  }
156
160
 
157
161
  /** @public @react */
158
- export declare function AccessibilityMenu(): JSX_2.Element;
162
+ export declare function AccessibilityMenu(): JSX.Element;
159
163
 
160
164
  /** @public */
161
165
  export declare interface ActionsProviderProps {
@@ -167,13 +171,13 @@ export declare interface ActionsProviderProps {
167
171
  export declare type AlertSeverity = 'error' | 'info' | 'success' | 'warning';
168
172
 
169
173
  /** @public @react */
170
- export declare function AlignMenuItems(): JSX_2.Element;
174
+ export declare function AlignMenuItems(): JSX.Element;
171
175
 
172
176
  /** @public */
173
177
  export declare const allDefaultFontFaces: TLFontFace[];
174
178
 
175
179
  /** @public @react */
176
- export declare function ArrangeMenuSubmenu(): JSX_2.Element | null;
180
+ export declare function ArrangeMenuSubmenu(): JSX.Element | null;
177
181
 
178
182
  /** @public */
179
183
  export declare const ARROW_LABEL_FONT_SIZES: Record<TLDefaultSizeStyle, number>;
@@ -194,13 +198,13 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
194
198
  }
195
199
 
196
200
  /** @public @react */
197
- export declare function ArrowDownToolbarItem(): JSX_2.Element;
201
+ export declare function ArrowDownToolbarItem(): JSX.Element;
198
202
 
199
203
  /** @public @react */
200
- export declare function ArrowLeftToolbarItem(): JSX_2.Element;
204
+ export declare function ArrowLeftToolbarItem(): JSX.Element;
201
205
 
202
206
  /** @public @react */
203
- export declare function ArrowRightToolbarItem(): JSX_2.Element;
207
+ export declare function ArrowRightToolbarItem(): JSX.Element;
204
208
 
205
209
  /**
206
210
  * Options for the arrow shape.
@@ -360,10 +364,10 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
360
364
  };
361
365
  };
362
366
  onDoubleClickHandle(shape: TLArrowShape, handle: TLHandle): TLShapePartial<TLArrowShape> | void;
363
- component(shape: TLArrowShape): JSX_2.Element | null;
364
- indicator(shape: TLArrowShape): JSX_2.Element | null;
367
+ component(shape: TLArrowShape): JSX.Element | null;
368
+ indicator(shape: TLArrowShape): JSX.Element | null;
365
369
  onEditStart(shape: TLArrowShape): void;
366
- toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element;
370
+ toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX.Element;
367
371
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
368
372
  getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
369
373
  }
@@ -405,10 +409,10 @@ export declare interface ArrowTargetState {
405
409
  }
406
410
 
407
411
  /** @public @react */
408
- export declare function ArrowToolbarItem(): JSX_2.Element;
412
+ export declare function ArrowToolbarItem(): JSX.Element;
409
413
 
410
414
  /** @public @react */
411
- export declare function ArrowUpToolbarItem(): JSX_2.Element;
415
+ export declare function ArrowUpToolbarItem(): JSX.Element;
412
416
 
413
417
  /** @public */
414
418
  export declare type ASPECT_RATIO_OPTION = 'circle' | 'landscape' | 'original' | 'portrait' | 'square' | 'wide';
@@ -420,7 +424,7 @@ export declare const ASPECT_RATIO_OPTIONS: ASPECT_RATIO_OPTION[];
420
424
  export declare const ASPECT_RATIO_TO_VALUE: Record<ASPECT_RATIO_OPTION, number>;
421
425
 
422
426
  /** @public @react */
423
- export declare function AssetToolbarItem(): JSX_2.Element;
427
+ export declare function AssetToolbarItem(): JSX.Element;
424
428
 
425
429
  /* Excluded from this release type: AssetUrlsProvider */
426
430
 
@@ -442,8 +446,8 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
442
446
  getText(shape: TLBookmarkShape): string;
443
447
  getAriaDescriptor(shape: TLBookmarkShape): string | undefined;
444
448
  getDefaultProps(): TLBookmarkShape['props'];
445
- component(shape: TLBookmarkShape): JSX_2.Element;
446
- indicator(shape: TLBookmarkShape): JSX_2.Element;
449
+ component(shape: TLBookmarkShape): JSX.Element;
450
+ indicator(shape: TLBookmarkShape): JSX.Element;
447
451
  onBeforeCreate(next: TLBookmarkShape): {
448
452
  id: TLShapeId;
449
453
  index: IndexKey;
@@ -492,7 +496,7 @@ export declare interface BoxWidthHeight {
492
496
  }
493
497
 
494
498
  /** @public @react */
495
- export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps): JSX_2.Element;
499
+ export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps): JSX.Element;
496
500
 
497
501
  /** @public */
498
502
  export declare interface BreakPointProviderProps {
@@ -503,11 +507,11 @@ export declare interface BreakPointProviderProps {
503
507
  /* Excluded from this release type: buildFromV1Document */
504
508
 
505
509
  /** @public @react */
506
- export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children, }: CenteredTopPanelContainerProps): JSX_2.Element;
510
+ export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children, }: CenteredTopPanelContainerProps): JSX.Element;
507
511
 
508
512
  /** @public */
509
513
  export declare interface CenteredTopPanelContainerProps {
510
- children: ReactNode;
514
+ children?: ReactNode;
511
515
  maxWidth?: number;
512
516
  ignoreRightWidth?: number;
513
517
  stylePanelWidth?: number;
@@ -528,7 +532,7 @@ export declare interface CenteredTopPanelContainerProps {
528
532
  export declare function centerSelectionAroundPoint(editor: Editor, position: VecLike): void;
529
533
 
530
534
  /** @public @react */
531
- export declare function CheckBoxToolbarItem(): JSX_2.Element;
535
+ export declare function CheckBoxToolbarItem(): JSX.Element;
532
536
 
533
537
  /**
534
538
  * Clear the current arrow target state for an editor. See {@link ArrowTargetState} for more
@@ -539,13 +543,13 @@ export declare function CheckBoxToolbarItem(): JSX_2.Element;
539
543
  export declare function clearArrowTargetState(editor: Editor): void;
540
544
 
541
545
  /** @public @react */
542
- export declare function ClipboardMenuGroup(): JSX_2.Element;
546
+ export declare function ClipboardMenuGroup(): JSX.Element;
543
547
 
544
548
  /** @public @react */
545
- export declare function CloudToolbarItem(): JSX_2.Element;
549
+ export declare function CloudToolbarItem(): JSX.Element;
546
550
 
547
551
  /** @public @react */
548
- export declare function ColorSchemeMenu(): JSX_2.Element;
552
+ export declare function ColorSchemeMenu(): JSX.Element;
549
553
 
550
554
  /**
551
555
  * Contains the size within the given box size
@@ -558,13 +562,13 @@ export declare function ColorSchemeMenu(): JSX_2.Element;
558
562
  export declare function containBoxSize(originalSize: BoxWidthHeight, containBoxSize: BoxWidthHeight): BoxWidthHeight;
559
563
 
560
564
  /** @public @react */
561
- export declare function ConversionsMenuGroup(): JSX_2.Element | null;
565
+ export declare function ConversionsMenuGroup(): JSX.Element | null;
562
566
 
563
567
  /** @public @react */
564
- export declare function ConvertToBookmarkMenuItem(): JSX_2.Element | null;
568
+ export declare function ConvertToBookmarkMenuItem(): JSX.Element | null;
565
569
 
566
570
  /** @public @react */
567
- export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
571
+ export declare function ConvertToEmbedMenuItem(): JSX.Element | null;
568
572
 
569
573
  /**
570
574
  * Copy the given shapes to the clipboard.
@@ -579,7 +583,7 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
579
583
  export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
580
584
 
581
585
  /** @public @react */
582
- export declare function CopyAsMenuGroup(): JSX_2.Element;
586
+ export declare function CopyAsMenuGroup(): JSX.Element;
583
587
 
584
588
  /** @public */
585
589
  export declare interface CopyAsOptions extends TLImageExportOptions {
@@ -588,7 +592,7 @@ export declare interface CopyAsOptions extends TLImageExportOptions {
588
592
  }
589
593
 
590
594
  /** @public @react */
591
- export declare function CopyMenuItem(): JSX_2.Element;
595
+ export declare function CopyMenuItem(): JSX.Element;
592
596
 
593
597
  /**
594
598
  * Creates a bookmark shape from a URL with unfurled metadata.
@@ -630,7 +634,7 @@ export declare interface CropBoxOptions {
630
634
  /* Excluded from this release type: CubicBezierToPathBuilderCommand */
631
635
 
632
636
  /** @public @react */
633
- export declare function CursorChatItem(): JSX_2.Element | null;
637
+ export declare function CursorChatItem(): JSX.Element | null;
634
638
 
635
639
  /** @public */
636
640
  export declare interface CustomDebugFlags {
@@ -644,7 +648,7 @@ export declare interface CustomEmbedDefinition extends EmbedDefinition {
644
648
  }
645
649
 
646
650
  /** @public @react */
647
- export declare function CutMenuItem(): JSX_2.Element;
651
+ export declare function CutMenuItem(): JSX.Element;
648
652
 
649
653
  /** @public */
650
654
  export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
@@ -656,7 +660,7 @@ export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
656
660
  }
657
661
 
658
662
  /** @public @react */
659
- export declare function DebugFlags(props: DebugFlagsProps): JSX_2.Element | null;
663
+ export declare function DebugFlags(props: DebugFlagsProps): JSX.Element | null;
660
664
 
661
665
  /** @public */
662
666
  export declare interface DebugFlagsProps {
@@ -890,7 +894,7 @@ export declare const DefaultA11yAnnouncer: NamedExoticComponent<object>;
890
894
  export declare const DefaultActionsMenu: NamedExoticComponent<TLUiActionsMenuProps>;
891
895
 
892
896
  /** @public @react */
893
- export declare function DefaultActionsMenuContent(): JSX_2.Element;
897
+ export declare function DefaultActionsMenuContent(): JSX.Element;
894
898
 
895
899
  /** @public */
896
900
  export declare function defaultAddFontsFromNode(node: Node_2, state: RichTextFontVisitorState, addFont: (font: TLFontFace) => void): RichTextFontVisitorState;
@@ -904,13 +908,13 @@ export { DefaultContextMenu as ContextMenu }
904
908
  export { DefaultContextMenu }
905
909
 
906
910
  /** @public @react */
907
- export declare function DefaultContextMenuContent(): JSX_2.Element | null;
911
+ export declare function DefaultContextMenuContent(): JSX.Element | null;
908
912
 
909
913
  /** @public @react */
910
- export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX_2.Element;
914
+ export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX.Element;
911
915
 
912
916
  /** @public @react */
913
- export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX_2.Element;
917
+ export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX.Element;
914
918
 
915
919
  /** @public @react */
916
920
  export declare const DefaultDialogs: NamedExoticComponent<object>;
@@ -922,7 +926,7 @@ export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
922
926
  export declare type DefaultEmbedDefinitionType = (typeof DEFAULT_EMBED_DEFINITIONS)[number]['type'];
923
927
 
924
928
  /** @public @react */
925
- export declare function DefaultFollowingIndicator(): JSX_2.Element | null;
929
+ export declare function DefaultFollowingIndicator(): JSX.Element | null;
926
930
 
927
931
  /** @public */
928
932
  export declare const DefaultFontFaces: TLDefaultFonts;
@@ -978,19 +982,19 @@ export declare function defaultHandleExternalUrlContent(editor: Editor, { point,
978
982
  }, { toasts, msg }: TLDefaultExternalContentHandlerOpts): Promise<void>;
979
983
 
980
984
  /** @public @react */
981
- export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX_2.Element;
985
+ export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX.Element;
982
986
 
983
987
  /** @public @react */
984
- export declare function DefaultHelperButtonsContent(): JSX_2.Element;
988
+ export declare function DefaultHelperButtonsContent(): JSX.Element;
985
989
 
986
990
  /** @public @react */
987
991
  export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
988
992
 
989
993
  /** @public @react */
990
- export declare function DefaultHelpMenuContent(): JSX_2.Element;
994
+ export declare function DefaultHelpMenuContent(): JSX.Element;
991
995
 
992
996
  /** @public @react */
993
- export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps): JSX_2.Element | null;
997
+ export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps): JSX.Element | null;
994
998
 
995
999
  /** @public @react */
996
1000
  export declare const DefaultImageToolbarContent: NamedExoticComponent<DefaultImageToolbarContentProps>;
@@ -1008,19 +1012,19 @@ export declare interface DefaultImageToolbarContentProps {
1008
1012
  export declare const DefaultKeyboardShortcutsDialog: NamedExoticComponent<TLUiKeyboardShortcutsDialogProps>;
1009
1013
 
1010
1014
  /** @public @react */
1011
- export declare function DefaultKeyboardShortcutsDialogContent(): JSX_2.Element;
1015
+ export declare function DefaultKeyboardShortcutsDialogContent(): JSX.Element;
1012
1016
 
1013
1017
  /** @public @react */
1014
1018
  export declare const DefaultMainMenu: NamedExoticComponent<TLUiMainMenuProps>;
1015
1019
 
1016
1020
  /** @public @react */
1017
- export declare function DefaultMainMenuContent(): JSX_2.Element;
1021
+ export declare function DefaultMainMenuContent(): JSX.Element;
1018
1022
 
1019
1023
  /** @public @react */
1020
1024
  export declare const DefaultMenuPanel: NamedExoticComponent<object>;
1021
1025
 
1022
1026
  /** @public @react */
1023
- export declare function DefaultMinimap(): JSX_2.Element;
1027
+ export declare function DefaultMinimap(): JSX.Element;
1024
1028
 
1025
1029
  /** @public @react */
1026
1030
  export declare const DefaultNavigationPanel: NamedExoticComponent<object>;
@@ -1032,7 +1036,7 @@ export declare const DefaultPageMenu: NamedExoticComponent<object>;
1032
1036
  export declare const DefaultQuickActions: NamedExoticComponent<TLUiQuickActionsProps>;
1033
1037
 
1034
1038
  /** @public @react */
1035
- export declare function DefaultQuickActionsContent(): JSX_2.Element | undefined;
1039
+ export declare function DefaultQuickActionsContent(): JSX.Element | undefined;
1036
1040
 
1037
1041
  /**
1038
1042
  * The default rich text toolbar.
@@ -1046,7 +1050,7 @@ export declare const DefaultRichTextToolbar: React_3.NamedExoticComponent<TLUiRi
1046
1050
  *
1047
1051
  * @public @react
1048
1052
  */
1049
- export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX_2.Element[];
1053
+ export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX.Element[];
1050
1054
 
1051
1055
  /** @public */
1052
1056
  export declare interface DefaultRichTextToolbarContentProps {
@@ -1061,13 +1065,13 @@ export declare const defaultShapeTools: readonly [typeof TextShapeTool, typeof D
1061
1065
  export declare const defaultShapeUtils: readonly [typeof TextShapeUtil, typeof BookmarkShapeUtil, typeof DrawShapeUtil, typeof GeoShapeUtil, typeof NoteShapeUtil, typeof LineShapeUtil, typeof FrameShapeUtil, typeof ArrowShapeUtil, typeof HighlightShapeUtil, typeof EmbedShapeUtil, typeof ImageShapeUtil, typeof VideoShapeUtil];
1062
1066
 
1063
1067
  /** @public @react */
1064
- export declare function DefaultSharePanel(): JSX_2.Element;
1068
+ export declare function DefaultSharePanel(): JSX.Element;
1065
1069
 
1066
1070
  /** @public @react */
1067
1071
  export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
1068
1072
 
1069
1073
  /** @public @react */
1070
- export declare function DefaultStylePanelContent(): JSX_2.Element;
1074
+ export declare function DefaultStylePanelContent(): JSX.Element;
1071
1075
 
1072
1076
  /** @public @react */
1073
1077
  export declare const DefaultToasts: NamedExoticComponent<object>;
@@ -1083,7 +1087,7 @@ export declare const DefaultToasts: NamedExoticComponent<object>;
1083
1087
  export declare const DefaultToolbar: NamedExoticComponent<DefaultToolbarProps>;
1084
1088
 
1085
1089
  /** @public @react */
1086
- export declare function DefaultToolbarContent(): JSX_2.Element;
1090
+ export declare function DefaultToolbarContent(): JSX.Element;
1087
1091
 
1088
1092
  /** @public */
1089
1093
  export declare interface DefaultToolbarProps {
@@ -1098,9 +1102,6 @@ export declare interface DefaultToolbarProps {
1098
1102
  /** @public */
1099
1103
  export declare const defaultTools: readonly [typeof EraserTool, typeof HandTool, typeof LaserTool, typeof ZoomTool, typeof SelectTool];
1100
1104
 
1101
- /** @public @react */
1102
- export declare function DefaultTopPanel(): JSX_2.Element;
1103
-
1104
1105
  /** @public @react */
1105
1106
  export declare const DefaultVideoToolbar: NamedExoticComponent<TLUiVideoToolbarProps>;
1106
1107
 
@@ -1117,16 +1118,16 @@ export declare interface DefaultVideoToolbarContentProps {
1117
1118
  export declare const DefaultZoomMenu: NamedExoticComponent<TLUiZoomMenuProps>;
1118
1119
 
1119
1120
  /** @public @react */
1120
- export declare function DefaultZoomMenuContent(): JSX_2.Element;
1121
+ export declare function DefaultZoomMenuContent(): JSX.Element;
1121
1122
 
1122
1123
  /** @public @react */
1123
- export declare function DeleteMenuItem(): JSX_2.Element;
1124
+ export declare function DeleteMenuItem(): JSX.Element;
1124
1125
 
1125
1126
  /** @public @react */
1126
- export declare function DiamondToolbarItem(): JSX_2.Element;
1127
+ export declare function DiamondToolbarItem(): JSX.Element;
1127
1128
 
1128
1129
  /** @public @react */
1129
- export declare function DistributeMenuItems(): JSX_2.Element;
1130
+ export declare function DistributeMenuItems(): JSX.Element;
1130
1131
 
1131
1132
  /* Excluded from this release type: downloadFile */
1132
1133
 
@@ -1197,13 +1198,14 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1197
1198
  hideSelectionBoundsFg(shape: TLDrawShape): boolean;
1198
1199
  getDefaultProps(): TLDrawShape['props'];
1199
1200
  getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
1200
- component(shape: TLDrawShape): JSX_2.Element;
1201
- indicator(shape: TLDrawShape): JSX_2.Element;
1202
- toSvg(shape: TLDrawShape, ctx: SvgExportContext): JSX_2.Element;
1201
+ component(shape: TLDrawShape): JSX.Element;
1202
+ indicator(shape: TLDrawShape): JSX.Element;
1203
+ toSvg(shape: TLDrawShape, ctx: SvgExportContext): JSX.Element;
1203
1204
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
1204
1205
  onResize(shape: TLDrawShape, info: TLResizeInfo<TLDrawShape>): {
1205
1206
  props: {
1206
- segments: TLDrawShapeSegment[];
1207
+ scaleX: number;
1208
+ scaleY: number;
1207
1209
  };
1208
1210
  };
1209
1211
  expandSelectionOutlinePx(shape: TLDrawShape): number;
@@ -1211,19 +1213,19 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1211
1213
  }
1212
1214
 
1213
1215
  /** @public @react */
1214
- export declare function DrawToolbarItem(): JSX_2.Element;
1216
+ export declare function DrawToolbarItem(): JSX.Element;
1215
1217
 
1216
1218
  /** @public @react */
1217
- export declare function DuplicateMenuItem(): JSX_2.Element | null;
1219
+ export declare function DuplicateMenuItem(): JSX.Element | null;
1218
1220
 
1219
1221
  /** @public @react */
1220
- export declare function EditLinkMenuItem(): JSX_2.Element | null;
1222
+ export declare function EditLinkMenuItem(): JSX.Element | null;
1221
1223
 
1222
1224
  /** @public @react */
1223
- export declare function EditMenuSubmenu(): JSX_2.Element | null;
1225
+ export declare function EditMenuSubmenu(): JSX.Element | null;
1224
1226
 
1225
1227
  /** @public @react */
1226
- export declare function EditSubmenu(): JSX_2.Element;
1228
+ export declare function EditSubmenu(): JSX.Element;
1227
1229
 
1228
1230
  /**
1229
1231
  * @public
@@ -1449,7 +1451,7 @@ export declare interface ElbowArrowTargetBox extends ElbowArrowBox {
1449
1451
  }
1450
1452
 
1451
1453
  /** @public @react */
1452
- export declare function EllipseToolbarItem(): JSX_2.Element;
1454
+ export declare function EllipseToolbarItem(): JSX.Element;
1453
1455
 
1454
1456
  /** @public */
1455
1457
  export declare interface EmbedDefinition {
@@ -1466,6 +1468,7 @@ export declare interface EmbedDefinition {
1466
1468
  readonly instructionLink?: string;
1467
1469
  readonly backgroundColor?: string;
1468
1470
  readonly embedOnPaste?: boolean;
1471
+ readonly canEditWhileLocked?: boolean;
1469
1472
  readonly overrideOutlineRadius?: number;
1470
1473
  readonly toEmbedUrl: (url: string) => string | undefined;
1471
1474
  readonly fromEmbedUrl: (url: string) => string | undefined;
@@ -1500,6 +1503,7 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1500
1503
  static props: RecordProps<TLEmbedShape>;
1501
1504
  static migrations: TLPropsMigrations;
1502
1505
  private static embedDefinitions;
1506
+ canEditWhileLocked(shape: TLEmbedShape): boolean;
1503
1507
  static setEmbedDefinitions(embedDefinitions: readonly TLEmbedDefinition[]): void;
1504
1508
  getEmbedDefinitions(): readonly TLEmbedDefinition[];
1505
1509
  getEmbedDefinition(url: string): TLEmbedResult;
@@ -1513,8 +1517,8 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1513
1517
  getGeometry(shape: TLEmbedShape): Geometry2d;
1514
1518
  isAspectRatioLocked(shape: TLEmbedShape): boolean;
1515
1519
  onResize(shape: TLEmbedShape, info: TLResizeInfo<TLEmbedShape>): TLEmbedShape;
1516
- component(shape: TLEmbedShape): JSX_2.Element | null;
1517
- indicator(shape: TLEmbedShape): JSX_2.Element;
1520
+ component(shape: TLEmbedShape): JSX.Element | null;
1521
+ indicator(shape: TLEmbedShape): JSX.Element;
1518
1522
  getInterpolatedProps(startShape: TLEmbedShape, endShape: TLEmbedShape, t: number): TLEmbedShapeProps;
1519
1523
  }
1520
1524
 
@@ -1528,7 +1532,7 @@ export declare class EraserTool extends StateNode {
1528
1532
  }
1529
1533
 
1530
1534
  /** @public @react */
1531
- export declare function EraserToolbarItem(): JSX_2.Element;
1535
+ export declare function EraserToolbarItem(): JSX.Element;
1532
1536
 
1533
1537
  /** @public */
1534
1538
  export declare interface EventsProviderProps {
@@ -1537,7 +1541,7 @@ export declare interface EventsProviderProps {
1537
1541
  }
1538
1542
 
1539
1543
  /** @public @react */
1540
- export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue, }: ExampleDialogProps): JSX_2.Element;
1544
+ export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue, }: ExampleDialogProps): JSX.Element;
1541
1545
 
1542
1546
  /** @public */
1543
1547
  export declare interface ExampleDialogProps {
@@ -1571,13 +1575,13 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
1571
1575
  }
1572
1576
 
1573
1577
  /** @public @react */
1574
- export declare function ExportFileContentSubMenu(): JSX_2.Element;
1578
+ export declare function ExportFileContentSubMenu(): JSX.Element;
1575
1579
 
1576
1580
  /** @public @react */
1577
- export declare function ExtrasGroup(): JSX_2.Element;
1581
+ export declare function ExtrasGroup(): JSX.Element;
1578
1582
 
1579
1583
  /** @public @react */
1580
- export declare function FeatureFlags(props: FeatureFlagsProps): JSX_2.Element | null;
1584
+ export declare function FeatureFlags(props: FeatureFlagsProps): JSX.Element | null;
1581
1585
 
1582
1586
  /** @public */
1583
1587
  export declare interface FeatureFlagsProps {
@@ -1598,7 +1602,7 @@ export declare function fitFrameToContent(editor: Editor, id: TLShapeId, opts?:
1598
1602
  }): void;
1599
1603
 
1600
1604
  /** @public @react */
1601
- export declare function FitFrameToContentMenuItem(): JSX_2.Element | null;
1605
+ export declare function FitFrameToContentMenuItem(): JSX.Element | null;
1602
1606
 
1603
1607
  /** @public */
1604
1608
  export declare const FONT_FAMILIES: Record<TLDefaultFontStyle, string>;
@@ -1612,6 +1616,10 @@ export declare interface FrameShapeOptions {
1612
1616
  * When true, the frame will display colors for the shape's headings and background.
1613
1617
  */
1614
1618
  showColors: boolean;
1619
+ /**
1620
+ * When true, the frame will resize its children when the frame itself is resized.
1621
+ */
1622
+ resizeChildren: boolean;
1615
1623
  }
1616
1624
 
1617
1625
  /** @public */
@@ -1631,7 +1639,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1631
1639
  static configure<T extends TLShapeUtilConstructor<any, any>>(this: T, options: T extends new (...args: any[]) => {
1632
1640
  options: infer Options;
1633
1641
  } ? Partial<Options> : never): T;
1634
- canEdit(): boolean;
1642
+ canEdit(shape: TLFrameShape, info: TLEditStartInfo): boolean;
1635
1643
  canResize(): boolean;
1636
1644
  canResizeChildren(): boolean;
1637
1645
  isExportBoundsContainer(): boolean;
@@ -1639,9 +1647,9 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1639
1647
  getAriaDescriptor(shape: TLFrameShape): string;
1640
1648
  getGeometry(shape: TLFrameShape): Geometry2d;
1641
1649
  getText(shape: TLFrameShape): string | undefined;
1642
- component(shape: TLFrameShape): JSX_2.Element;
1643
- toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX_2.Element;
1644
- indicator(shape: TLFrameShape): JSX_2.Element;
1650
+ component(shape: TLFrameShape): JSX.Element;
1651
+ toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX.Element;
1652
+ indicator(shape: TLFrameShape): JSX.Element;
1645
1653
  providesBackgroundForChildren(): boolean;
1646
1654
  getClipPath(shape: TLFrameShape): Vec[];
1647
1655
  canReceiveNewChildrenOfType(shape: TLShape): boolean;
@@ -1664,7 +1672,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1664
1672
  }
1665
1673
 
1666
1674
  /** @public @react */
1667
- export declare function FrameToolbarItem(): JSX_2.Element;
1675
+ export declare function FrameToolbarItem(): JSX.Element;
1668
1676
 
1669
1677
  /** @public */
1670
1678
  export declare class GeoShapeTool extends StateNode {
@@ -1688,9 +1696,9 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
1688
1696
  getHandleSnapGeometry(shape: TLGeoShape): HandleSnapGeometry;
1689
1697
  getText(shape: TLGeoShape): string;
1690
1698
  getFontFaces(shape: TLGeoShape): TLFontFace[];
1691
- component(shape: TLGeoShape): JSX_2.Element;
1692
- indicator(shape: TLGeoShape): JSX_2.Element;
1693
- toSvg(shape: TLGeoShape, ctx: SvgExportContext): JSX_2.Element;
1699
+ component(shape: TLGeoShape): JSX.Element;
1700
+ indicator(shape: TLGeoShape): JSX.Element;
1701
+ toSvg(shape: TLGeoShape, ctx: SvgExportContext): JSX.Element;
1694
1702
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
1695
1703
  onResize(shape: TLGeoShape, { handle, newPoint, scaleX, scaleY, initialShape }: TLResizeInfo<TLGeoShape>): {
1696
1704
  props: {
@@ -1845,6 +1853,35 @@ export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels
1845
1853
  /** @public */
1846
1854
  export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
1847
1855
 
1856
+ /** @public */
1857
+ export declare function getPointsFromDrawSegment(segment: TLDrawShapeSegment, scaleX: number, scaleY: number, points?: Vec[]): Vec[];
1858
+
1859
+ /** @public */
1860
+ export declare function getPointsFromDrawSegments(segments: TLDrawShapeSegment[], scaleX?: number, scaleY?: number): Vec[];
1861
+
1862
+ /**
1863
+ * ## getStroke
1864
+ *
1865
+ * Get an array of points describing a polygon that surrounds the input points.
1866
+ *
1867
+ * @param points - An array of points (as `[x, y, pressure]` or `{x, y, pressure}`). Pressure is
1868
+ * optional in both cases.
1869
+ * @param options - An object with options.
1870
+ * @public
1871
+ */
1872
+ export declare function getStroke(points: VecLike[], options?: StrokeOptions): Vec[];
1873
+
1874
+ /**
1875
+ * ## getStrokeOutlinePoints
1876
+ *
1877
+ * Get an array of points (as `[x, y]`) representing the outline of a stroke.
1878
+ *
1879
+ * @param points - An array of StrokePoints as returned from `getStrokePoints`.
1880
+ * @param options - An object with options.
1881
+ * @public
1882
+ */
1883
+ export declare function getStrokeOutlinePoints(strokePoints: StrokePoint[], options?: StrokeOptions): Vec[];
1884
+
1848
1885
  /**
1849
1886
  * ## getStrokePoints
1850
1887
  *
@@ -1882,10 +1919,10 @@ export declare function getUncroppedSize(shapeSize: {
1882
1919
  };
1883
1920
 
1884
1921
  /** @public @react */
1885
- export declare function GroupMenuItem(): JSX_2.Element | null;
1922
+ export declare function GroupMenuItem(): JSX.Element | null;
1886
1923
 
1887
1924
  /** @public @react */
1888
- export declare function GroupOrUngroupMenuItem(): JSX_2.Element;
1925
+ export declare function GroupOrUngroupMenuItem(): JSX.Element;
1889
1926
 
1890
1927
  /** @public */
1891
1928
  export declare class HandTool extends StateNode {
@@ -1899,13 +1936,13 @@ export declare class HandTool extends StateNode {
1899
1936
  }
1900
1937
 
1901
1938
  /** @public @react */
1902
- export declare function HandToolbarItem(): JSX_2.Element;
1939
+ export declare function HandToolbarItem(): JSX.Element;
1903
1940
 
1904
1941
  /** @public @react */
1905
- export declare function HeartToolbarItem(): JSX_2.Element;
1942
+ export declare function HeartToolbarItem(): JSX.Element;
1906
1943
 
1907
1944
  /** @public @react */
1908
- export declare function HexagonToolbarItem(): JSX_2.Element;
1945
+ export declare function HexagonToolbarItem(): JSX.Element;
1909
1946
 
1910
1947
  /** @public */
1911
1948
  export declare function hideAllTooltips(): void;
@@ -1943,21 +1980,22 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
1943
1980
  hideSelectionBoundsFg(shape: TLHighlightShape): boolean;
1944
1981
  getDefaultProps(): TLHighlightShape['props'];
1945
1982
  getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
1946
- component(shape: TLHighlightShape): JSX_2.Element;
1947
- backgroundComponent(shape: TLHighlightShape): JSX_2.Element;
1948
- indicator(shape: TLHighlightShape): JSX_2.Element;
1949
- toSvg(shape: TLHighlightShape): JSX_2.Element;
1950
- toBackgroundSvg(shape: TLHighlightShape): JSX_2.Element;
1983
+ component(shape: TLHighlightShape): JSX.Element;
1984
+ backgroundComponent(shape: TLHighlightShape): JSX.Element;
1985
+ indicator(shape: TLHighlightShape): JSX.Element;
1986
+ toSvg(shape: TLHighlightShape): JSX.Element;
1987
+ toBackgroundSvg(shape: TLHighlightShape): JSX.Element;
1951
1988
  onResize(shape: TLHighlightShape, info: TLResizeInfo<TLHighlightShape>): {
1952
1989
  props: {
1953
- segments: TLDrawShapeSegment[];
1990
+ scaleX: number;
1991
+ scaleY: number;
1954
1992
  };
1955
1993
  };
1956
1994
  getInterpolatedProps(startShape: TLHighlightShape, endShape: TLHighlightShape, t: number): TLHighlightShapeProps;
1957
1995
  }
1958
1996
 
1959
1997
  /** @public @react */
1960
- export declare function HighlightToolbarItem(): JSX_2.Element;
1998
+ export declare function HighlightToolbarItem(): JSX.Element;
1961
1999
 
1962
2000
  /** @public */
1963
2001
  export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
@@ -1971,9 +2009,9 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
1971
2009
  getGeometry(shape: TLImageShape): Geometry2d;
1972
2010
  getAriaDescriptor(shape: TLImageShape): string;
1973
2011
  onResize(shape: TLImageShape, info: TLResizeInfo<TLImageShape>): TLImageShape;
1974
- component(shape: TLImageShape): JSX_2.Element;
1975
- indicator(shape: TLImageShape): JSX_2.Element | null;
1976
- toSvg(shape: TLImageShape, ctx: SvgExportContext): Promise<JSX_2.Element | null>;
2012
+ component(shape: TLImageShape): JSX.Element;
2013
+ indicator(shape: TLImageShape): JSX.Element | null;
2014
+ toSvg(shape: TLImageShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
1977
2015
  onDoubleClickEdge(shape: TLImageShape): void;
1978
2016
  getInterpolatedProps(startShape: TLImageShape, endShape: TLImageShape, t: number): TLImageShapeProps;
1979
2017
  }
@@ -1982,13 +2020,13 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
1982
2020
  export declare const KeyboardShiftEnterTweakExtension: Extension<any, any>;
1983
2021
 
1984
2022
  /** @public @react */
1985
- export declare function KeyboardShortcutsMenuItem(): JSX_2.Element | null;
2023
+ export declare function KeyboardShortcutsMenuItem(): JSX.Element | null;
1986
2024
 
1987
2025
  /** @public */
1988
2026
  export declare const LABEL_FONT_SIZES: Record<TLDefaultSizeStyle, number>;
1989
2027
 
1990
2028
  /** @public @react */
1991
- export declare function LanguageMenu(): JSX_2.Element | null;
2029
+ export declare function LanguageMenu(): JSX.Element | null;
1992
2030
 
1993
2031
  /** @public */
1994
2032
  export declare class LaserTool extends StateNode {
@@ -2000,7 +2038,7 @@ export declare class LaserTool extends StateNode {
2000
2038
  }
2001
2039
 
2002
2040
  /** @public @react */
2003
- export declare function LaserToolbarItem(): JSX_2.Element;
2041
+ export declare function LaserToolbarItem(): JSX.Element;
2004
2042
 
2005
2043
  /** @public */
2006
2044
  export declare class LineShapeTool extends StateNode {
@@ -2092,29 +2130,29 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2092
2130
  x: number;
2093
2131
  y: number;
2094
2132
  } | undefined;
2095
- component(shape: TLLineShape): JSX_2.Element;
2096
- indicator(shape: TLLineShape): JSX_2.Element;
2097
- toSvg(shape: TLLineShape): JSX_2.Element;
2133
+ component(shape: TLLineShape): JSX.Element;
2134
+ indicator(shape: TLLineShape): JSX.Element;
2135
+ toSvg(shape: TLLineShape): JSX.Element;
2098
2136
  getHandleSnapGeometry(shape: TLLineShape): HandleSnapGeometry;
2099
2137
  getInterpolatedProps(startShape: TLLineShape, endShape: TLLineShape, t: number): TLLineShape['props'];
2100
2138
  }
2101
2139
 
2102
2140
  /** @public @react */
2103
- export declare function LineToolbarItem(): JSX_2.Element;
2141
+ export declare function LineToolbarItem(): JSX.Element;
2104
2142
 
2105
2143
  /* Excluded from this release type: LineToPathBuilderCommand */
2106
2144
 
2107
2145
  /** @public @react */
2108
- export declare function LockGroup(): JSX_2.Element;
2146
+ export declare function LockGroup(): JSX.Element;
2109
2147
 
2110
2148
  /** @public @react */
2111
- export declare function MiscMenuGroup(): JSX_2.Element;
2149
+ export declare function MiscMenuGroup(): JSX.Element;
2112
2150
 
2113
2151
  /** @public @react */
2114
- export declare function MobileStylePanel(): JSX_2.Element | null;
2152
+ export declare function MobileStylePanel(): JSX.Element | null;
2115
2153
 
2116
2154
  /** @public @react */
2117
- export declare function MoveToPageMenu(): JSX_2.Element | null;
2155
+ export declare function MoveToPageMenu(): JSX.Element | null;
2118
2156
 
2119
2157
  /* Excluded from this release type: MoveToPathBuilderCommand */
2120
2158
 
@@ -2157,9 +2195,9 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2157
2195
  } | undefined;
2158
2196
  getText(shape: TLNoteShape): string;
2159
2197
  getFontFaces(shape: TLNoteShape): TLFontFace[];
2160
- component(shape: TLNoteShape): JSX_2.Element;
2161
- indicator(shape: TLNoteShape): JSX_2.Element;
2162
- toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX_2.Element;
2198
+ component(shape: TLNoteShape): JSX.Element;
2199
+ indicator(shape: TLNoteShape): JSX.Element;
2200
+ toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX.Element;
2163
2201
  onBeforeCreate(next: TLNoteShape): {
2164
2202
  id: TLShapeId;
2165
2203
  index: IndexKey;
@@ -2216,7 +2254,7 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2216
2254
  }
2217
2255
 
2218
2256
  /** @public @react */
2219
- export declare function NoteToolbarItem(): JSX_2.Element;
2257
+ export declare function NoteToolbarItem(): JSX.Element;
2220
2258
 
2221
2259
  /**
2222
2260
  * Checks if a file is allowed to be uploaded. If it is not, it will show a toast explaining why to the user.
@@ -2229,7 +2267,7 @@ export declare function NoteToolbarItem(): JSX_2.Element;
2229
2267
  export declare function notifyIfFileNotAllowed(file: File, options: TLDefaultExternalContentHandlerOpts): boolean;
2230
2268
 
2231
2269
  /** @public @react */
2232
- export declare function OfflineIndicator(): JSX_2.Element;
2270
+ export declare function OfflineIndicator(): JSX.Element;
2233
2271
 
2234
2272
  /**
2235
2273
  * A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from
@@ -2255,10 +2293,10 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
2255
2293
  }
2256
2294
 
2257
2295
  /** @public @react */
2258
- export declare function OvalToolbarItem(): JSX_2.Element;
2296
+ export declare function OvalToolbarItem(): JSX.Element;
2259
2297
 
2260
2298
  /** @public @react */
2261
- export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX_2.Element;
2299
+ export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX.Element;
2262
2300
 
2263
2301
  /** @public */
2264
2302
  export declare interface OverflowingToolbarProps {
@@ -2272,7 +2310,7 @@ export declare interface OverflowingToolbarProps {
2272
2310
  }
2273
2311
 
2274
2312
  /** @public @react */
2275
- export declare const PageItemInput: ({ name, id, isCurrentPage, onCancel, onComplete, }: PageItemInputProps) => JSX_2.Element;
2313
+ export declare const PageItemInput: ({ name, id, isCurrentPage, onCancel, onComplete, }: PageItemInputProps) => JSX.Element;
2276
2314
 
2277
2315
  /** @public */
2278
2316
  export declare interface PageItemInputProps {
@@ -2306,7 +2344,7 @@ export declare function parseTldrawJsonFile({ json, schema, }: {
2306
2344
  }): Result<TLStore, TldrawFileParseError>;
2307
2345
 
2308
2346
  /** @public @react */
2309
- export declare function PasteMenuItem(): JSX_2.Element;
2347
+ export declare function PasteMenuItem(): JSX.Element;
2310
2348
 
2311
2349
  /** @public */
2312
2350
  export declare class PathBuilder {
@@ -2328,7 +2366,7 @@ export declare class PathBuilder {
2328
2366
  private cubicBezierToWithResolution;
2329
2367
  close(): this;
2330
2368
  toD(opts?: PathBuilderToDOpts): string;
2331
- toSvg(opts: PathBuilderOpts): JSX_2.Element;
2369
+ toSvg(opts: PathBuilderOpts): JSX.Element;
2332
2370
  toGeometry(): Group2d | PathBuilderGeometry2d;
2333
2371
  private toSolidSvg;
2334
2372
  private toDashedSvg;
@@ -2397,7 +2435,7 @@ export declare interface PathBuilderToDOpts {
2397
2435
  }
2398
2436
 
2399
2437
  /** @public @react */
2400
- export declare function PeopleMenu({ children }: PeopleMenuProps): JSX_2.Element | null;
2438
+ export declare function PeopleMenu({ children }: PeopleMenuProps): JSX.Element | null;
2401
2439
 
2402
2440
  /** @public */
2403
2441
  export declare interface PeopleMenuProps {
@@ -2459,13 +2497,13 @@ export declare enum PORTRAIT_BREAKPOINT {
2459
2497
  }
2460
2498
 
2461
2499
  /** @public @react */
2462
- export declare function PreferencesGroup(): JSX_2.Element;
2500
+ export declare function PreferencesGroup(): JSX.Element;
2463
2501
 
2464
2502
  /** @public */
2465
2503
  export declare function preloadFont(id: string, font: TLTypeFace): Promise<FontFace>;
2466
2504
 
2467
2505
  /** @public @react */
2468
- export declare function PrintItem(): JSX_2.Element;
2506
+ export declare function PrintItem(): JSX.Element;
2469
2507
 
2470
2508
  /**
2471
2509
  * Put excalidraw clipboard content onto the current page.
@@ -2478,7 +2516,7 @@ export declare function PrintItem(): JSX_2.Element;
2478
2516
  export declare function putExcalidrawContent(editor: Editor, excalidrawClipboardContent: any, point?: VecLike): Promise<void>;
2479
2517
 
2480
2518
  /** @public @react */
2481
- export declare function RectangleToolbarItem(): JSX_2.Element;
2519
+ export declare function RectangleToolbarItem(): JSX.Element;
2482
2520
 
2483
2521
  /** @public */
2484
2522
  export declare function registerDefaultExternalContentHandlers(editor: Editor, options: TLDefaultExternalContentHandlerOpts): void;
@@ -2497,7 +2535,7 @@ export declare function registerDefaultSideEffects(editor: Editor): () => void;
2497
2535
  export declare function removeFrame(editor: Editor, ids: TLShapeId[]): void;
2498
2536
 
2499
2537
  /** @public @react */
2500
- export declare function RemoveFrameMenuItem(): JSX_2.Element | null;
2538
+ export declare function RemoveFrameMenuItem(): JSX.Element | null;
2501
2539
 
2502
2540
  /**
2503
2541
  * Renders HTML from a rich text string.
@@ -2514,7 +2552,6 @@ export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichT
2514
2552
  * @param editor - The editor instance.
2515
2553
  * @param richText - The rich text content.
2516
2554
  *
2517
- *
2518
2555
  * @public
2519
2556
  */
2520
2557
  export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, richText: TLRichText): string;
@@ -2524,7 +2561,6 @@ export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, ric
2524
2561
  * @param editor - The editor instance.
2525
2562
  * @param richText - The rich text content.
2526
2563
  *
2527
- *
2528
2564
  * @public
2529
2565
  */
2530
2566
  export declare function renderPlaintextFromRichText(editor: Editor, richText: TLRichText): string;
@@ -2534,19 +2570,18 @@ export declare function renderPlaintextFromRichText(editor: Editor, richText: TL
2534
2570
  * @param editor - The editor instance.
2535
2571
  * @param richText - The rich text content.
2536
2572
  *
2537
- *
2538
2573
  * @public
2539
2574
  */
2540
2575
  export declare function renderRichTextFromHTML(editor: Editor, html: string): TLRichText;
2541
2576
 
2542
2577
  /** @public @react */
2543
- export declare function ReorderMenuItems(): JSX_2.Element;
2578
+ export declare function ReorderMenuItems(): JSX.Element;
2544
2579
 
2545
2580
  /** @public @react */
2546
- export declare function ReorderMenuSubmenu(): JSX_2.Element | null;
2581
+ export declare function ReorderMenuSubmenu(): JSX.Element | null;
2547
2582
 
2548
2583
  /** @public @react */
2549
- export declare function RhombusToolbarItem(): JSX_2.Element;
2584
+ export declare function RhombusToolbarItem(): JSX.Element;
2550
2585
 
2551
2586
  /**
2552
2587
  * A rich text area that can be used for editing text with rich text formatting.
@@ -2597,7 +2632,7 @@ export declare interface RichTextLabelProps {
2597
2632
  *
2598
2633
  * @public @react
2599
2634
  */
2600
- export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline, }: RichTextSVGProps): JSX_2.Element;
2635
+ export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline, }: RichTextSVGProps): JSX.Element;
2601
2636
 
2602
2637
  /** @public */
2603
2638
  export declare interface RichTextSVGProps {
@@ -2614,10 +2649,10 @@ export declare interface RichTextSVGProps {
2614
2649
  }
2615
2650
 
2616
2651
  /** @public @react */
2617
- export declare function RotateCWMenuItem(): JSX_2.Element;
2652
+ export declare function RotateCWMenuItem(): JSX.Element;
2618
2653
 
2619
2654
  /** @public @react */
2620
- export declare function SelectAllMenuItem(): JSX_2.Element;
2655
+ export declare function SelectAllMenuItem(): JSX.Element;
2621
2656
 
2622
2657
  /** @public */
2623
2658
  export declare class SelectTool extends StateNode {
@@ -2632,7 +2667,7 @@ export declare class SelectTool extends StateNode {
2632
2667
  }
2633
2668
 
2634
2669
  /** @public @react */
2635
- export declare function SelectToolbarItem(): JSX_2.Element;
2670
+ export declare function SelectToolbarItem(): JSX.Element;
2636
2671
 
2637
2672
  /** @public */
2638
2673
  export declare function serializeTldrawJson(editor: Editor): Promise<string>;
@@ -2644,6 +2679,9 @@ export declare function serializeTldrawJsonBlob(editor: Editor): Promise<Blob>;
2644
2679
 
2645
2680
  /* Excluded from this release type: setDefaultUiAssetUrls */
2646
2681
 
2682
+ /** @public */
2683
+ export declare function setStrokePointRadii(strokePoints: StrokePoint[], options: StrokeOptions): StrokePoint[];
2684
+
2647
2685
  /** @public */
2648
2686
  export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
2649
2687
  style: 'solid';
@@ -2652,10 +2690,25 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
2652
2690
  /* Excluded from this release type: Spinner */
2653
2691
 
2654
2692
  /** @public @react */
2655
- export declare function StackMenuItems(): JSX_2.Element;
2693
+ export declare function StackMenuItems(): JSX.Element;
2694
+
2695
+ /**
2696
+ * Start editing a shape that has rich text, such as text, note, geo, or arrow shapes.
2697
+ * This will enter the editing state for the shape and optionally select all the text.
2698
+ *
2699
+ * @param editor - The editor instance.
2700
+ * @param shapeOrId - The shape to start editing. This shape must have a richText property with a TLRichText value.
2701
+ * @param options - Options: selectAll or info (TLEventInfo)
2702
+ *
2703
+ * @public
2704
+ */
2705
+ export declare function startEditingShapeWithRichText(editor: Editor, shapeOrId: TLShape | TLShapeId, options?: {
2706
+ info?: TLEventInfo;
2707
+ selectAll?: boolean;
2708
+ }): void;
2656
2709
 
2657
2710
  /** @public @react */
2658
- export declare function StarToolbarItem(): JSX_2.Element;
2711
+ export declare function StarToolbarItem(): JSX.Element;
2659
2712
 
2660
2713
  /** @public */
2661
2714
  export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
@@ -2709,10 +2762,10 @@ export declare interface StrokePoint {
2709
2762
  }
2710
2763
 
2711
2764
  /** @public @react */
2712
- export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
2765
+ export declare function StylePanelArrowheadPicker(): JSX.Element | null;
2713
2766
 
2714
2767
  /** @public @react */
2715
- export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
2768
+ export declare function StylePanelArrowKindPicker(): JSX.Element | null;
2716
2769
 
2717
2770
  /** @public @react */
2718
2771
  export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
@@ -2732,7 +2785,7 @@ export declare interface StylePanelButtonPickerProps<T extends string> {
2732
2785
  }
2733
2786
 
2734
2787
  /** @public @react */
2735
- export declare function StylePanelColorPicker(): JSX_2.Element | null;
2788
+ export declare function StylePanelColorPicker(): JSX.Element | null;
2736
2789
 
2737
2790
  /** @public */
2738
2791
  export declare interface StylePanelContext {
@@ -2743,7 +2796,7 @@ export declare interface StylePanelContext {
2743
2796
  }
2744
2797
 
2745
2798
  /** @public @react */
2746
- export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX_2.Element;
2799
+ export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX.Element;
2747
2800
 
2748
2801
  /** @public */
2749
2802
  export declare interface StylePanelContextProviderProps {
@@ -2752,7 +2805,7 @@ export declare interface StylePanelContextProviderProps {
2752
2805
  }
2753
2806
 
2754
2807
  /** @public @react */
2755
- export declare function StylePanelDashPicker(): JSX_2.Element | null;
2808
+ export declare function StylePanelDashPicker(): JSX.Element | null;
2756
2809
 
2757
2810
  /** @public @react */
2758
2811
  export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
@@ -2796,22 +2849,22 @@ export declare interface StylePanelDropdownPickerProps<T extends string> {
2796
2849
  }
2797
2850
 
2798
2851
  /** @public @react */
2799
- export declare function StylePanelFillPicker(): JSX_2.Element | null;
2852
+ export declare function StylePanelFillPicker(): JSX.Element | null;
2800
2853
 
2801
2854
  /** @public @react */
2802
- export declare function StylePanelFontPicker(): JSX_2.Element | null;
2855
+ export declare function StylePanelFontPicker(): JSX.Element | null;
2803
2856
 
2804
2857
  /** @public @react */
2805
- export declare function StylePanelGeoShapePicker(): JSX_2.Element | null;
2858
+ export declare function StylePanelGeoShapePicker(): JSX.Element | null;
2806
2859
 
2807
2860
  /** @public @react */
2808
- export declare function StylePanelLabelAlignPicker(): JSX_2.Element | null;
2861
+ export declare function StylePanelLabelAlignPicker(): JSX.Element | null;
2809
2862
 
2810
2863
  /** @public @react */
2811
- export declare function StylePanelOpacityPicker(): JSX_2.Element | null;
2864
+ export declare function StylePanelOpacityPicker(): JSX.Element | null;
2812
2865
 
2813
2866
  /** @public @react */
2814
- export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX_2.Element;
2867
+ export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX.Element;
2815
2868
 
2816
2869
  /** @public */
2817
2870
  export declare interface StylePanelSectionProps {
@@ -2819,13 +2872,13 @@ export declare interface StylePanelSectionProps {
2819
2872
  }
2820
2873
 
2821
2874
  /** @public @react */
2822
- export declare function StylePanelSizePicker(): JSX_2.Element | null;
2875
+ export declare function StylePanelSizePicker(): JSX.Element | null;
2823
2876
 
2824
2877
  /** @public @react */
2825
- export declare function StylePanelSplinePicker(): JSX_2.Element | null;
2878
+ export declare function StylePanelSplinePicker(): JSX.Element | null;
2826
2879
 
2827
2880
  /** @public @react */
2828
- export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX_2.Element;
2881
+ export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX.Element;
2829
2882
 
2830
2883
  /** @public */
2831
2884
  export declare interface StylePanelSubheadingProps {
@@ -2833,7 +2886,7 @@ export declare interface StylePanelSubheadingProps {
2833
2886
  }
2834
2887
 
2835
2888
  /** @public @react */
2836
- export declare function StylePanelTextAlignPicker(): JSX_2.Element | null;
2889
+ export declare function StylePanelTextAlignPicker(): JSX.Element | null;
2837
2890
 
2838
2891
  /** @public */
2839
2892
  export declare type StyleValuesForUi<T> = readonly {
@@ -2869,11 +2922,6 @@ export declare interface TextAreaProps {
2869
2922
  hasCustomTabBehavior?: boolean;
2870
2923
  }
2871
2924
 
2872
- /**
2873
- * @public
2874
- */
2875
- export declare const TextDirection: Extension<any, any>;
2876
-
2877
2925
  /** @public */
2878
2926
  export declare interface TextShapeOptions {
2879
2927
  /** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
@@ -2906,9 +2954,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
2906
2954
  getText(shape: TLTextShape): string;
2907
2955
  canEdit(): boolean;
2908
2956
  isAspectRatioLocked(): boolean;
2909
- component(shape: TLTextShape): JSX_2.Element;
2910
- indicator(shape: TLTextShape): JSX_2.Element | null;
2911
- toSvg(shape: TLTextShape, ctx: SvgExportContext): JSX_2.Element;
2957
+ component(shape: TLTextShape): JSX.Element;
2958
+ indicator(shape: TLTextShape): JSX.Element | null;
2959
+ toSvg(shape: TLTextShape, ctx: SvgExportContext): JSX.Element;
2912
2960
  onResize(shape: TLTextShape, info: TLResizeInfo<TLTextShape>): {
2913
2961
  id: TLShapeId;
2914
2962
  props: {
@@ -2954,7 +3002,7 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
2954
3002
  }
2955
3003
 
2956
3004
  /** @public @react */
2957
- export declare function TextToolbarItem(): JSX_2.Element;
3005
+ export declare function TextToolbarItem(): JSX.Element;
2958
3006
 
2959
3007
  /**
2960
3008
  * Default extensions for the TipTap editor.
@@ -3054,13 +3102,13 @@ export declare interface TLDefaultFonts {
3054
3102
  }
3055
3103
 
3056
3104
  /** @public @react */
3057
- export declare function Tldraw(props: TldrawProps): JSX_2.Element;
3105
+ export declare function Tldraw(props: TldrawProps): JSX.Element;
3058
3106
 
3059
3107
  /** @public */
3060
3108
  export declare const TLDRAW_FILE_EXTENSION: ".tldr";
3061
3109
 
3062
3110
  /** @public @react */
3063
- export declare function TldrawArrowHints(): JSX_2.Element | null;
3111
+ export declare function TldrawArrowHints(): JSX.Element | null;
3064
3112
 
3065
3113
  /** @public */
3066
3114
  export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps {
@@ -3082,7 +3130,7 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
3082
3130
  }
3083
3131
 
3084
3132
  /** @public @react */
3085
- export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX_2.Element;
3133
+ export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX.Element;
3086
3134
 
3087
3135
  /** @public */
3088
3136
  export declare interface TldrawCropHandlesProps {
@@ -3118,7 +3166,7 @@ export declare type TldrawFileParseError = {
3118
3166
  };
3119
3167
 
3120
3168
  /** @public @react */
3121
- export declare function TldrawHandles({ children }: TLHandlesProps): JSX_2.Element | null;
3169
+ export declare function TldrawHandles({ children }: TLHandlesProps): JSX.Element | null;
3122
3170
 
3123
3171
  /**
3124
3172
  * A rendered SVG image of a Tldraw snapshot.
@@ -3177,19 +3225,19 @@ export declare interface TldrawImageProps extends TLImageExportOptions {
3177
3225
  }
3178
3226
 
3179
3227
  /** @public @react */
3180
- export declare function TldrawOverlays(): JSX_2.Element | null;
3228
+ export declare function TldrawOverlays(): JSX.Element | null;
3181
3229
 
3182
3230
  /** @public */
3183
3231
  export declare type TldrawProps = TldrawBaseProps & TldrawEditorStoreProps;
3184
3232
 
3185
3233
  /** @public @react */
3186
- export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps): JSX_2.Element | null;
3234
+ export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps): JSX.Element | null;
3187
3235
 
3188
3236
  /** @public */
3189
3237
  export declare const TldrawSelectionForeground: NamedExoticComponent<TLSelectionForegroundProps>;
3190
3238
 
3191
3239
  /** @public @react */
3192
- export declare function TldrawShapeIndicators(): JSX_2.Element;
3240
+ export declare function TldrawShapeIndicators(): JSX.Element;
3193
3241
 
3194
3242
  /**
3195
3243
  * @public
@@ -3198,19 +3246,19 @@ export declare function TldrawShapeIndicators(): JSX_2.Element;
3198
3246
  export declare const TldrawUi: React_3.NamedExoticComponent<TldrawUiProps>;
3199
3247
 
3200
3248
  /** @public @react */
3201
- export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX_2.Element;
3249
+ export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX.Element;
3202
3250
 
3203
3251
  /** @public @react */
3204
3252
  export declare const TldrawUiButton: React_2.ForwardRefExoticComponent<TLUiButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
3205
3253
 
3206
3254
  /** @public @react */
3207
- export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps): JSX_2.Element;
3255
+ export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps): JSX.Element;
3208
3256
 
3209
3257
  /** @public @react */
3210
- export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps): JSX_2.Element;
3258
+ export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps): JSX.Element;
3211
3259
 
3212
3260
  /** @public @react */
3213
- export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX_2.Element;
3261
+ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX.Element;
3214
3262
 
3215
3263
  /**
3216
3264
  * A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
@@ -3220,7 +3268,7 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
3220
3268
  export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
3221
3269
 
3222
3270
  /** @public @react */
3223
- export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX_2.Element;
3271
+ export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX.Element;
3224
3272
 
3225
3273
  /** @public @react */
3226
3274
  export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextProviderProps>;
@@ -3231,55 +3279,55 @@ export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextPr
3231
3279
  *
3232
3280
  * @public @react
3233
3281
  */
3234
- export declare const TldrawUiContextualToolbar: ({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label, }: TLUiContextualToolbarProps) => JSX_2.Element;
3282
+ export declare const TldrawUiContextualToolbar: ({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label, }: TLUiContextualToolbarProps) => JSX.Element;
3235
3283
 
3236
3284
  /** @public @react */
3237
- export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX_2.Element;
3285
+ export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX.Element;
3238
3286
 
3239
3287
  /** @public @react */
3240
- export declare function TldrawUiDialogCloseButton(): JSX_2.Element;
3288
+ export declare function TldrawUiDialogCloseButton(): JSX.Element;
3241
3289
 
3242
3290
  /** @public @react */
3243
- export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps): JSX_2.Element;
3291
+ export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps): JSX.Element;
3244
3292
 
3245
3293
  /** @public @react */
3246
- export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps): JSX_2.Element;
3294
+ export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps): JSX.Element;
3247
3295
 
3248
3296
  /** @public @react */
3249
- export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps): JSX_2.Element;
3297
+ export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps): JSX.Element;
3250
3298
 
3251
3299
  /** @public @react */
3252
- export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps): JSX_2.Element;
3300
+ export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps): JSX.Element;
3253
3301
 
3254
3302
  /** @public @react */
3255
- export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX_2.Element;
3303
+ export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX.Element;
3256
3304
 
3257
3305
  /** @public @react */
3258
- export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children, }: TLUiDropdownMenuContentProps): JSX_2.Element;
3306
+ export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children, }: TLUiDropdownMenuContentProps): JSX.Element;
3259
3307
 
3260
3308
  /** @public @react */
3261
- export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX_2.Element;
3309
+ export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX.Element;
3262
3310
 
3263
3311
  /** @public @react */
3264
- export declare function TldrawUiDropdownMenuIndicator(): JSX_2.Element;
3312
+ export declare function TldrawUiDropdownMenuIndicator(): JSX.Element;
3265
3313
 
3266
3314
  /** @public @react */
3267
- export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX_2.Element;
3315
+ export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX.Element;
3268
3316
 
3269
3317
  /** @public @react */
3270
- export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX_2.Element;
3318
+ export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX.Element;
3271
3319
 
3272
3320
  /** @public @react */
3273
- export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX_2.Element;
3321
+ export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX.Element;
3274
3322
 
3275
3323
  /** @public @react */
3276
- export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX_2.Element;
3324
+ export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
3277
3325
 
3278
3326
  /** @public @react */
3279
- export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX_2.Element;
3327
+ export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX.Element;
3280
3328
 
3281
3329
  /** @public @react */
3282
- export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX_2.Element;
3330
+ export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX.Element;
3283
3331
 
3284
3332
  /**
3285
3333
  * A tight grid 4 elements wide, usually of UI controls like buttons, select dropdown, checkboxes,
@@ -3292,37 +3340,37 @@ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & R
3292
3340
  export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
3293
3341
 
3294
3342
  /** @public @react */
3295
- export declare function TldrawUiInFrontOfTheCanvas(): JSX_2.Element;
3343
+ export declare function TldrawUiInFrontOfTheCanvas(): JSX.Element;
3296
3344
 
3297
3345
  /** @public @react */
3298
3346
  export declare const TldrawUiInput: React_2.ForwardRefExoticComponent<TLUiInputProps & React_2.RefAttributes<HTMLInputElement>>;
3299
3347
 
3300
3348
  /** @public @react */
3301
- export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps): JSX_2.Element | null;
3349
+ export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps): JSX.Element | null;
3302
3350
 
3303
3351
  /** @public @react */
3304
- export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps): JSX_2.Element | null;
3352
+ export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps): JSX.Element | null;
3305
3353
 
3306
3354
  /** @public @react */
3307
- export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX_2.Element | null;
3355
+ export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX.Element | null;
3308
3356
 
3309
3357
  /** @public @react */
3310
- export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX_2.Element | null;
3358
+ export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX.Element | null;
3311
3359
 
3312
3360
  /** @public @react */
3313
- export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX_2.Element;
3361
+ export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX.Element;
3314
3362
 
3315
3363
  /** @public @react */
3316
- export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): boolean | JSX_2.Element | Iterable<ReactNode> | null | number | string | undefined;
3364
+ export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
3317
3365
 
3318
3366
  /** @public @react */
3319
- export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX_2.Element | null;
3367
+ export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX.Element | null;
3320
3368
 
3321
3369
  /** @public @react */
3322
- export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): boolean | JSX_2.Element | Iterable<ReactNode> | null | number | string | undefined;
3370
+ export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
3323
3371
 
3324
3372
  /** @public @react */
3325
- export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX_2.Element | null;
3373
+ export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX.Element | null;
3326
3374
 
3327
3375
  /** @public */
3328
3376
  export declare interface TldrawUiOrientationContext {
@@ -3331,7 +3379,7 @@ export declare interface TldrawUiOrientationContext {
3331
3379
  }
3332
3380
 
3333
3381
  /** @public @react */
3334
- export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX_2.Element;
3382
+ export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX.Element;
3335
3383
 
3336
3384
  /** @public */
3337
3385
  export declare interface TldrawUiOrientationProviderProps {
@@ -3341,13 +3389,13 @@ export declare interface TldrawUiOrientationProviderProps {
3341
3389
  }
3342
3390
 
3343
3391
  /** @public @react */
3344
- export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX_2.Element;
3392
+ export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX.Element;
3345
3393
 
3346
3394
  /** @public @react */
3347
- export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX_2.Element;
3395
+ export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX.Element;
3348
3396
 
3349
3397
  /** @public @react */
3350
- export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX_2.Element;
3398
+ export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX.Element;
3351
3399
 
3352
3400
  /** @public */
3353
3401
  export declare interface TldrawUiProps extends TLUiContextProviderProps {
@@ -3382,7 +3430,7 @@ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & Re
3382
3430
  export declare const TldrawUiSlider: React_3.ForwardRefExoticComponent<TLUiSliderProps & React_3.RefAttributes<HTMLDivElement>>;
3383
3431
 
3384
3432
  /** @public @react */
3385
- export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps): JSX_2.Element;
3433
+ export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps): JSX.Element;
3386
3434
 
3387
3435
  /** @public @react */
3388
3436
  export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiToolbarProps & React_3.RefAttributes<HTMLDivElement>>;
@@ -3391,10 +3439,10 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
3391
3439
  export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
3392
3440
 
3393
3441
  /** @public @react */
3394
- export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
3442
+ export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX.Element;
3395
3443
 
3396
3444
  /** @public @react */
3397
- export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
3445
+ export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX.Element;
3398
3446
 
3399
3447
  /** @public @react */
3400
3448
  export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
@@ -3411,7 +3459,7 @@ export declare interface TldrawUiTooltipProps {
3411
3459
  }
3412
3460
 
3413
3461
  /** @public @react */
3414
- export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX_2.Element;
3462
+ export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX.Element;
3415
3463
 
3416
3464
  /** @public */
3417
3465
  export declare interface TldrawUiTooltipProviderProps {
@@ -4446,43 +4494,43 @@ export declare interface TLUiZoomMenuProps {
4446
4494
  /* Excluded from this release type: TLV1VideoShape */
4447
4495
 
4448
4496
  /** @public @react */
4449
- export declare function ToggleAutoSizeMenuItem(): JSX_2.Element | null;
4497
+ export declare function ToggleAutoSizeMenuItem(): JSX.Element | null;
4450
4498
 
4451
4499
  /** @public @react */
4452
- export declare function ToggleDebugModeItem(): JSX_2.Element;
4500
+ export declare function ToggleDebugModeItem(): JSX.Element;
4453
4501
 
4454
4502
  /** @public @react */
4455
- export declare function ToggleDynamicSizeModeItem(): JSX_2.Element;
4503
+ export declare function ToggleDynamicSizeModeItem(): JSX.Element;
4456
4504
 
4457
4505
  /** @public @react */
4458
- export declare function ToggleEdgeScrollingItem(): JSX_2.Element;
4506
+ export declare function ToggleEdgeScrollingItem(): JSX.Element;
4459
4507
 
4460
4508
  /** @public @react */
4461
- export declare function ToggleEnhancedA11yModeItem(): JSX_2.Element;
4509
+ export declare function ToggleEnhancedA11yModeItem(): JSX.Element;
4462
4510
 
4463
4511
  /** @public @react */
4464
- export declare function ToggleFocusModeItem(): JSX_2.Element;
4512
+ export declare function ToggleFocusModeItem(): JSX.Element;
4465
4513
 
4466
4514
  /** @public @react */
4467
- export declare function ToggleGridItem(): JSX_2.Element;
4515
+ export declare function ToggleGridItem(): JSX.Element;
4468
4516
 
4469
4517
  /** @public @react */
4470
- export declare function ToggleKeyboardShortcutsItem(): JSX_2.Element;
4518
+ export declare function ToggleKeyboardShortcutsItem(): JSX.Element;
4471
4519
 
4472
4520
  /** @public @react */
4473
- export declare function ToggleLockMenuItem(): JSX_2.Element | null;
4521
+ export declare function ToggleLockMenuItem(): JSX.Element | null;
4474
4522
 
4475
4523
  /** @public @react */
4476
- export declare function TogglePasteAtCursorItem(): JSX_2.Element;
4524
+ export declare function TogglePasteAtCursorItem(): JSX.Element;
4477
4525
 
4478
4526
  /** @public @react */
4479
- export declare function ToggleReduceMotionItem(): JSX_2.Element;
4527
+ export declare function ToggleReduceMotionItem(): JSX.Element;
4480
4528
 
4481
4529
  /** @public @react */
4482
- export declare function ToggleSnapModeItem(): JSX_2.Element;
4530
+ export declare function ToggleSnapModeItem(): JSX.Element;
4483
4531
 
4484
4532
  /** @public @react */
4485
- export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX_2.Element | null;
4533
+ export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX.Element | null;
4486
4534
 
4487
4535
  /** @public */
4488
4536
  export declare interface ToggleToolLockedButtonProps {
@@ -4490,16 +4538,16 @@ export declare interface ToggleToolLockedButtonProps {
4490
4538
  }
4491
4539
 
4492
4540
  /** @public @react */
4493
- export declare function ToggleToolLockItem(): JSX_2.Element;
4541
+ export declare function ToggleToolLockItem(): JSX.Element;
4494
4542
 
4495
4543
  /** @public @react */
4496
- export declare function ToggleTransparentBgMenuItem(): JSX_2.Element;
4544
+ export declare function ToggleTransparentBgMenuItem(): JSX.Element;
4497
4545
 
4498
4546
  /** @public @react */
4499
- export declare function ToggleWrapModeItem(): JSX_2.Element;
4547
+ export declare function ToggleWrapModeItem(): JSX.Element;
4500
4548
 
4501
4549
  /** @public @react */
4502
- export declare function ToolbarItem({ tool }: ToolbarItemProps): JSX_2.Element;
4550
+ export declare function ToolbarItem({ tool }: ToolbarItemProps): JSX.Element;
4503
4551
 
4504
4552
  /** @public */
4505
4553
  export declare interface ToolbarItemProps {
@@ -4507,22 +4555,22 @@ export declare interface ToolbarItemProps {
4507
4555
  }
4508
4556
 
4509
4557
  /** @public @react */
4510
- export declare function TrapezoidToolbarItem(): JSX_2.Element;
4558
+ export declare function TrapezoidToolbarItem(): JSX.Element;
4511
4559
 
4512
4560
  /** @public @react */
4513
- export declare function TriangleToolbarItem(): JSX_2.Element;
4561
+ export declare function TriangleToolbarItem(): JSX.Element;
4514
4562
 
4515
4563
  /** @public */
4516
4564
  export declare const truncateStringWithEllipsis: (str: string, maxLength: number) => string;
4517
4565
 
4518
4566
  /** @public @react */
4519
- export declare function UndoRedoGroup(): JSX_2.Element;
4567
+ export declare function UndoRedoGroup(): JSX.Element;
4520
4568
 
4521
4569
  /** @public @react */
4522
- export declare function UngroupMenuItem(): JSX_2.Element | null;
4570
+ export declare function UngroupMenuItem(): JSX.Element | null;
4523
4571
 
4524
4572
  /** @public @react */
4525
- export declare function UnlockAllMenuItem(): JSX_2.Element;
4573
+ export declare function UnlockAllMenuItem(): JSX.Element;
4526
4574
 
4527
4575
  /** @public */
4528
4576
  export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?: string): string | undefined;
@@ -4648,7 +4696,7 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractSh
4648
4696
  isEditing: boolean;
4649
4697
  isEmpty: boolean;
4650
4698
  isReadyForEditing: boolean;
4651
- rInput: React_3.RefObject<HTMLTextAreaElement>;
4699
+ rInput: React_3.RefObject<HTMLTextAreaElement | null>;
4652
4700
  };
4653
4701
 
4654
4702
  /** @public */
@@ -4669,7 +4717,7 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractSha
4669
4717
  isEditing: boolean;
4670
4718
  isEmpty: boolean | undefined;
4671
4719
  isReadyForEditing: boolean;
4672
- rInput: RefObject<HTMLDivElement>;
4720
+ rInput: RefObject<HTMLDivElement | null>;
4673
4721
  };
4674
4722
 
4675
4723
  /** @public */
@@ -4807,25 +4855,25 @@ export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
4807
4855
  isAspectRatioLocked(): boolean;
4808
4856
  getDefaultProps(): TLVideoShape['props'];
4809
4857
  getAriaDescriptor(shape: TLVideoShape): string;
4810
- component(shape: TLVideoShape): JSX_2.Element;
4811
- indicator(shape: TLVideoShape): JSX_2.Element;
4812
- toSvg(shape: TLVideoShape, ctx: SvgExportContext): Promise<JSX_2.Element | null>;
4858
+ component(shape: TLVideoShape): JSX.Element;
4859
+ indicator(shape: TLVideoShape): JSX.Element;
4860
+ toSvg(shape: TLVideoShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
4813
4861
  }
4814
4862
 
4815
4863
  /** @public @react */
4816
- export declare function ViewSubmenu(): JSX_2.Element;
4864
+ export declare function ViewSubmenu(): JSX.Element;
4817
4865
 
4818
4866
  /** @public @react */
4819
- export declare function XBoxToolbarItem(): JSX_2.Element;
4867
+ export declare function XBoxToolbarItem(): JSX.Element;
4820
4868
 
4821
4869
  /** @public @react */
4822
- export declare function ZoomOrRotateMenuItem(): JSX_2.Element;
4870
+ export declare function ZoomOrRotateMenuItem(): JSX.Element;
4823
4871
 
4824
4872
  /** @public @react */
4825
- export declare function ZoomTo100MenuItem(): JSX_2.Element;
4873
+ export declare function ZoomTo100MenuItem(): JSX.Element;
4826
4874
 
4827
4875
  /** @public @react */
4828
- export declare function ZoomToFitMenuItem(): JSX_2.Element;
4876
+ export declare function ZoomToFitMenuItem(): JSX.Element;
4829
4877
 
4830
4878
  /** @public */
4831
4879
  export declare class ZoomTool extends StateNode {
@@ -4848,7 +4896,7 @@ export declare class ZoomTool extends StateNode {
4848
4896
  }
4849
4897
 
4850
4898
  /** @public @react */
4851
- export declare function ZoomToSelectionMenuItem(): JSX_2.Element;
4899
+ export declare function ZoomToSelectionMenuItem(): JSX.Element;
4852
4900
 
4853
4901
 
4854
4902
  export * from "@tldraw/editor";