tldraw 4.3.0-canary.e52fa5385f86 → 4.3.0-canary.ea88b223b83a

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 (548) hide show
  1. package/dist-cjs/index.d.ts +294 -237
  2. package/dist-cjs/index.js +12 -5
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +2 -2
  5. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
  6. package/dist-cjs/lib/defaultEmbedDefinitions.js +1 -1
  7. package/dist-cjs/lib/defaultEmbedDefinitions.js.map +2 -2
  8. package/dist-cjs/lib/defaultExternalContentHandlers.js +5 -5
  9. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  10. package/dist-cjs/lib/defaultSideEffects.js +6 -1
  11. package/dist-cjs/lib/defaultSideEffects.js.map +2 -2
  12. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +14 -13
  13. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  14. package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
  15. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +1 -1
  16. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
  17. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  18. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  19. package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js +1 -1
  20. package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js.map +2 -2
  21. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js +4 -10
  22. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js.map +2 -2
  23. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +7 -4
  24. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  25. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -1
  26. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  27. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +25 -23
  28. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  29. package/dist-cjs/lib/shapes/draw/getPath.js +20 -11
  30. package/dist-cjs/lib/shapes/draw/getPath.js.map +2 -2
  31. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +82 -86
  32. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +3 -3
  33. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +6 -0
  34. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
  35. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +6 -5
  36. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  37. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +146 -142
  38. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  39. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js +5 -10
  40. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js.map +2 -2
  41. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +3 -3
  42. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +2 -2
  43. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +23 -21
  44. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  45. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js +3 -3
  46. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js.map +2 -2
  47. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +6 -11
  48. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  49. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js +5 -10
  50. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js.map +2 -2
  51. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +3 -2
  52. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  53. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +14 -2
  54. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +3 -3
  55. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +12 -4
  56. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +3 -3
  57. package/dist-cjs/lib/shapes/shared/ShapeFill.js +2 -2
  58. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  59. package/dist-cjs/lib/shapes/shared/interpolate-props.js +3 -3
  60. package/dist-cjs/lib/shapes/shared/interpolate-props.js.map +2 -2
  61. package/dist-cjs/lib/shapes/shared/{useForceSolid.js → useEfficientZoomThreshold.js} +10 -7
  62. package/dist-cjs/lib/shapes/shared/useEfficientZoomThreshold.js.map +7 -0
  63. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +1 -1
  64. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  65. package/dist-cjs/lib/shapes/text/RichTextArea.js +5 -0
  66. package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
  67. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +5 -2
  68. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  69. package/dist-cjs/lib/shapes/text/toolStates/Idle.js +4 -10
  70. package/dist-cjs/lib/shapes/text/toolStates/Idle.js.map +2 -2
  71. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js +7 -5
  72. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js.map +2 -2
  73. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +1 -1
  74. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +2 -2
  75. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +4 -5
  76. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  77. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +2 -4
  78. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  79. package/dist-cjs/lib/tools/HandTool/HandTool.js +3 -5
  80. package/dist-cjs/lib/tools/HandTool/HandTool.js.map +2 -2
  81. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js +3 -2
  82. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js.map +2 -2
  83. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js +1 -1
  84. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js.map +2 -2
  85. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js +1 -1
  86. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js.map +2 -2
  87. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +9 -7
  88. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +2 -2
  89. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +6 -5
  90. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +2 -2
  91. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js +4 -6
  92. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js.map +2 -2
  93. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +1 -1
  94. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +2 -2
  95. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +1 -1
  96. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
  97. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js +1 -1
  98. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js.map +2 -2
  99. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js +2 -1
  100. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js.map +2 -2
  101. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js +1 -1
  102. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js.map +2 -2
  103. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +7 -5
  104. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  105. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +38 -11
  106. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +2 -2
  107. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +42 -50
  108. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  109. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js +6 -6
  110. package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js.map +2 -2
  111. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js +1 -1
  112. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js.map +2 -2
  113. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +4 -14
  114. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +2 -2
  115. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +1 -1
  116. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
  117. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +1 -1
  118. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +2 -2
  119. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js +2 -2
  120. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js.map +2 -2
  121. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +4 -13
  122. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  123. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +5 -6
  124. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  125. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +2 -3
  126. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  127. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +7 -6
  128. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +2 -2
  129. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +13 -11
  130. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  131. package/dist-cjs/lib/tools/SelectTool/selectHelpers.js +15 -4
  132. package/dist-cjs/lib/tools/SelectTool/selectHelpers.js.map +2 -2
  133. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js +1 -1
  134. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js.map +2 -2
  135. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js +3 -3
  136. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js.map +2 -2
  137. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js +5 -6
  138. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js.map +2 -2
  139. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +1 -3
  140. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  141. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +1 -1
  142. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +2 -2
  143. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js +1 -1
  144. package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js.map +2 -2
  145. package/dist-cjs/lib/ui/TldrawUi.js +2 -2
  146. package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
  147. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js +3 -9
  148. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js.map +2 -2
  149. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js +1 -3
  150. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js.map +2 -2
  151. package/dist-cjs/lib/ui/components/CursorChatBubble.js +1 -1
  152. package/dist-cjs/lib/ui/components/CursorChatBubble.js.map +2 -2
  153. package/dist-cjs/lib/ui/components/DefaultDebugPanel.js +1 -21
  154. package/dist-cjs/lib/ui/components/DefaultDebugPanel.js.map +2 -2
  155. package/dist-cjs/lib/ui/components/HelperButtons/StopFollowing.js.map +2 -2
  156. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +1 -1
  157. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
  158. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +2 -15
  159. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js.map +3 -3
  160. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js +3 -1
  161. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js.map +2 -2
  162. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js +6 -0
  163. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js.map +2 -2
  164. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +1 -1
  165. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +2 -2
  166. package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js +1 -1
  167. package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js.map +2 -2
  168. package/dist-cjs/lib/ui/components/TopPanel/CenteredTopPanelContainer.js.map +1 -1
  169. package/dist-cjs/lib/ui/components/menu-items.js +3 -1
  170. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  171. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +3 -1
  172. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  173. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +6 -5
  174. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
  175. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.js.map +2 -2
  176. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.js.map +2 -2
  177. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +1 -2
  178. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  179. package/dist-cjs/lib/ui/context/actions.js +6 -6
  180. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  181. package/dist-cjs/lib/ui/context/components.js +1 -2
  182. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  183. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +2 -2
  184. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  185. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
  186. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  187. package/dist-cjs/lib/ui/hooks/useTools.js +4 -5
  188. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  189. package/dist-cjs/lib/ui/version.js +3 -3
  190. package/dist-cjs/lib/ui/version.js.map +1 -1
  191. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +8 -6
  192. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  193. package/dist-cjs/lib/{tools/selection-logic/getShouldEnterCropModeOnPointerDown.js → utils/test-helpers.js} +21 -8
  194. package/dist-cjs/lib/utils/test-helpers.js.map +7 -0
  195. package/dist-cjs/lib/utils/text/richText.js +4 -2
  196. package/dist-cjs/lib/utils/text/richText.js.map +2 -2
  197. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +7 -2
  198. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  199. package/dist-esm/index.d.mts +294 -237
  200. package/dist-esm/index.mjs +12 -5
  201. package/dist-esm/index.mjs.map +2 -2
  202. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +2 -2
  203. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
  204. package/dist-esm/lib/defaultEmbedDefinitions.mjs +1 -1
  205. package/dist-esm/lib/defaultEmbedDefinitions.mjs.map +2 -2
  206. package/dist-esm/lib/defaultExternalContentHandlers.mjs +5 -5
  207. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  208. package/dist-esm/lib/defaultSideEffects.mjs +6 -1
  209. package/dist-esm/lib/defaultSideEffects.mjs.map +2 -2
  210. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +15 -15
  211. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  212. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +1 -1
  213. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
  214. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  215. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  216. package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs +1 -1
  217. package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs.map +2 -2
  218. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs +4 -10
  219. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs.map +2 -2
  220. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +7 -4
  221. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  222. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +1 -1
  223. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  224. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +30 -25
  225. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  226. package/dist-esm/lib/shapes/draw/getPath.mjs +21 -11
  227. package/dist-esm/lib/shapes/draw/getPath.mjs.map +2 -2
  228. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +83 -86
  229. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +3 -3
  230. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +6 -0
  231. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
  232. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +6 -5
  233. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  234. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +147 -142
  235. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  236. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs +5 -10
  237. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs.map +2 -2
  238. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +3 -3
  239. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +2 -2
  240. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +24 -22
  241. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  242. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs +3 -3
  243. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs.map +2 -2
  244. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +7 -12
  245. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  246. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs +5 -10
  247. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs.map +2 -2
  248. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +4 -3
  249. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  250. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +14 -2
  251. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  252. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +12 -4
  253. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  254. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +2 -2
  255. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  256. package/dist-esm/lib/shapes/shared/interpolate-props.mjs +4 -4
  257. package/dist-esm/lib/shapes/shared/interpolate-props.mjs.map +2 -2
  258. package/dist-esm/lib/shapes/shared/useEfficientZoomThreshold.mjs +12 -0
  259. package/dist-esm/lib/shapes/shared/useEfficientZoomThreshold.mjs.map +7 -0
  260. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +1 -1
  261. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  262. package/dist-esm/lib/shapes/text/RichTextArea.mjs +5 -0
  263. package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
  264. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +5 -2
  265. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  266. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs +4 -10
  267. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs.map +2 -2
  268. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs +7 -5
  269. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs.map +2 -2
  270. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +1 -1
  271. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +2 -2
  272. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +4 -5
  273. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  274. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +2 -4
  275. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  276. package/dist-esm/lib/tools/HandTool/HandTool.mjs +3 -5
  277. package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +2 -2
  278. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs +3 -2
  279. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs.map +2 -2
  280. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs +1 -1
  281. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs.map +2 -2
  282. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs +1 -1
  283. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs.map +2 -2
  284. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +9 -7
  285. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +2 -2
  286. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +6 -5
  287. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +2 -2
  288. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs +4 -6
  289. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs.map +2 -2
  290. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +1 -1
  291. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +2 -2
  292. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +1 -1
  293. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
  294. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs +1 -1
  295. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs.map +2 -2
  296. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs +2 -1
  297. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs.map +2 -2
  298. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs +1 -1
  299. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs.map +2 -2
  300. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +7 -5
  301. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  302. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +38 -11
  303. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +2 -2
  304. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +43 -51
  305. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  306. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs +6 -6
  307. package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs.map +2 -2
  308. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs +1 -1
  309. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs.map +2 -2
  310. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +5 -15
  311. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +2 -2
  312. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +1 -1
  313. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
  314. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +1 -1
  315. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +2 -2
  316. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs +2 -2
  317. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs.map +2 -2
  318. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +4 -13
  319. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  320. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +5 -6
  321. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  322. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +2 -3
  323. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  324. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +7 -6
  325. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +2 -2
  326. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +13 -11
  327. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  328. package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs +17 -4
  329. package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs.map +2 -2
  330. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs +1 -1
  331. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs.map +2 -2
  332. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs +3 -3
  333. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs.map +2 -2
  334. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs +5 -6
  335. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs.map +2 -2
  336. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +1 -3
  337. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  338. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs +1 -1
  339. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +2 -2
  340. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs +1 -1
  341. package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs.map +2 -2
  342. package/dist-esm/lib/ui/TldrawUi.mjs +2 -2
  343. package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
  344. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs +2 -8
  345. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs.map +2 -2
  346. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs +1 -3
  347. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs.map +2 -2
  348. package/dist-esm/lib/ui/components/CursorChatBubble.mjs +1 -1
  349. package/dist-esm/lib/ui/components/CursorChatBubble.mjs.map +2 -2
  350. package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs +3 -30
  351. package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs.map +2 -2
  352. package/dist-esm/lib/ui/components/HelperButtons/StopFollowing.mjs.map +2 -2
  353. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +1 -1
  354. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
  355. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs +3 -6
  356. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs.map +2 -2
  357. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs +3 -1
  358. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs.map +2 -2
  359. package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs +6 -0
  360. package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs.map +2 -2
  361. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +1 -1
  362. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +2 -2
  363. package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs +1 -1
  364. package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs.map +2 -2
  365. package/dist-esm/lib/ui/components/TopPanel/CenteredTopPanelContainer.mjs.map +1 -1
  366. package/dist-esm/lib/ui/components/menu-items.mjs +3 -1
  367. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  368. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +3 -1
  369. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  370. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +6 -5
  371. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
  372. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.mjs.map +2 -2
  373. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.mjs.map +2 -2
  374. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +1 -2
  375. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  376. package/dist-esm/lib/ui/context/actions.mjs +6 -6
  377. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  378. package/dist-esm/lib/ui/context/components.mjs +1 -2
  379. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  380. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -2
  381. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  382. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
  383. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  384. package/dist-esm/lib/ui/hooks/useTools.mjs +4 -5
  385. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  386. package/dist-esm/lib/ui/version.mjs +3 -3
  387. package/dist-esm/lib/ui/version.mjs.map +1 -1
  388. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +9 -6
  389. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  390. package/dist-esm/lib/utils/test-helpers.mjs +21 -0
  391. package/dist-esm/lib/utils/test-helpers.mjs.map +7 -0
  392. package/dist-esm/lib/utils/text/richText.mjs +5 -2
  393. package/dist-esm/lib/utils/text/richText.mjs.map +2 -2
  394. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +8 -2
  395. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  396. package/package.json +18 -16
  397. package/src/index.ts +5 -2
  398. package/src/lib/Tldraw.test.tsx +46 -1
  399. package/src/lib/canvas/TldrawSelectionForeground.tsx +2 -2
  400. package/src/lib/defaultEmbedDefinitions.ts +2 -1
  401. package/src/lib/defaultExternalContentHandlers.ts +10 -10
  402. package/src/lib/defaultSideEffects.ts +6 -1
  403. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +40 -133
  404. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +8 -8
  405. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +15 -15
  406. package/src/lib/shapes/arrow/arrow-types.ts +2 -0
  407. package/src/lib/shapes/arrow/arrowLabel.ts +1 -1
  408. package/src/lib/shapes/arrow/arrowTargetState.ts +1 -1
  409. package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.test.ts +80 -0
  410. package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.tsx +1 -1
  411. package/src/lib/shapes/arrow/toolStates/Idle.tsx +4 -14
  412. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +7 -4
  413. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +1 -1
  414. package/src/lib/shapes/draw/DrawShapeUtil.test.ts +146 -0
  415. package/src/lib/shapes/draw/DrawShapeUtil.tsx +31 -27
  416. package/src/lib/shapes/draw/getPath.ts +31 -10
  417. package/src/lib/shapes/draw/toolStates/Drawing.ts +96 -86
  418. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +7 -0
  419. package/src/lib/shapes/frame/FrameShapeUtil.tsx +10 -4
  420. package/src/lib/shapes/geo/GeoShapeUtil.tsx +228 -176
  421. package/src/lib/shapes/geo/toolStates/Idle.ts +5 -15
  422. package/src/lib/shapes/geo/toolStates/Pointing.ts +3 -3
  423. package/src/lib/shapes/highlight/HighlightShapeUtil.test.ts +146 -0
  424. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +25 -24
  425. package/src/lib/shapes/line/toolStates/Pointing.ts +3 -3
  426. package/src/lib/shapes/note/NoteShapeUtil.tsx +9 -10
  427. package/src/lib/shapes/note/noteCloning.test.ts +3 -1
  428. package/src/lib/shapes/note/toolStates/Pointing.ts +5 -10
  429. package/src/lib/shapes/shared/HyperlinkButton.tsx +4 -3
  430. package/src/lib/shapes/shared/PlainTextLabel.tsx +10 -1
  431. package/src/lib/shapes/shared/RichTextLabel.tsx +12 -3
  432. package/src/lib/shapes/shared/ShapeFill.tsx +2 -2
  433. package/src/lib/shapes/shared/interpolate-props.ts +4 -4
  434. package/src/lib/shapes/shared/useEfficientZoomThreshold.ts +10 -0
  435. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +1 -1
  436. package/src/lib/shapes/text/RichTextArea.tsx +5 -0
  437. package/src/lib/shapes/text/TextShapeUtil.tsx +5 -0
  438. package/src/lib/shapes/text/toolStates/Idle.ts +4 -14
  439. package/src/lib/shapes/text/toolStates/Pointing.ts +7 -7
  440. package/src/lib/shapes/video/VideoShapeUtil.tsx +2 -1
  441. package/src/lib/tools/EraserTool/childStates/Erasing.ts +4 -5
  442. package/src/lib/tools/EraserTool/childStates/Pointing.ts +2 -4
  443. package/src/lib/tools/HandTool/HandTool.ts +3 -5
  444. package/src/lib/tools/HandTool/childStates/Dragging.ts +3 -2
  445. package/src/lib/tools/HandTool/childStates/Pointing.ts +1 -1
  446. package/src/lib/tools/LaserTool/childStates/Lasering.ts +1 -1
  447. package/src/lib/tools/SelectTool/DragAndDropManager.ts +12 -7
  448. package/src/lib/tools/SelectTool/childStates/Brushing.ts +6 -5
  449. package/src/lib/tools/SelectTool/childStates/Crop/children/Cropping.ts +7 -6
  450. package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +1 -1
  451. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +1 -1
  452. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.ts +1 -1
  453. package/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +2 -1
  454. package/src/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.ts +1 -1
  455. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +7 -5
  456. package/src/lib/tools/SelectTool/childStates/EditingShape.ts +55 -12
  457. package/src/lib/tools/SelectTool/childStates/Idle.ts +58 -71
  458. package/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +6 -7
  459. package/src/lib/tools/SelectTool/childStates/PointingCanvas.ts +1 -1
  460. package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +5 -5
  461. package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +1 -1
  462. package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +1 -1
  463. package/src/lib/tools/SelectTool/childStates/PointingSelection.ts +2 -2
  464. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +4 -14
  465. package/src/lib/tools/SelectTool/childStates/Resizing.ts +6 -6
  466. package/src/lib/tools/SelectTool/childStates/Rotating.ts +2 -3
  467. package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +7 -6
  468. package/src/lib/tools/SelectTool/childStates/Translating.ts +15 -12
  469. package/src/lib/tools/SelectTool/selectHelpers.ts +39 -4
  470. package/src/lib/tools/ZoomTool/ZoomTool.ts +1 -1
  471. package/src/lib/tools/ZoomTool/childStates/Pointing.ts +3 -3
  472. package/src/lib/tools/ZoomTool/childStates/ZoomBrushing.ts +5 -6
  473. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -3
  474. package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +1 -1
  475. package/src/lib/tools/selection-logic/updateHoveredShapeId.ts +1 -1
  476. package/src/lib/ui/TldrawUi.tsx +5 -2
  477. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx +1 -9
  478. package/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx +1 -3
  479. package/src/lib/ui/components/CursorChatBubble.tsx +2 -2
  480. package/src/lib/ui/components/DefaultDebugPanel.tsx +3 -42
  481. package/src/lib/ui/components/HelperButtons/StopFollowing.tsx +2 -2
  482. package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +1 -1
  483. package/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx +6 -5
  484. package/src/lib/ui/components/PageMenu/PageItemInput.tsx +3 -1
  485. package/src/lib/ui/components/SharePanel/PeopleMenu.tsx +8 -0
  486. package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +1 -1
  487. package/src/lib/ui/components/Toolbar/DefaultRichTextToolbar.tsx +1 -1
  488. package/src/lib/ui/components/TopPanel/CenteredTopPanelContainer.tsx +1 -1
  489. package/src/lib/ui/components/menu-items.tsx +3 -1
  490. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +5 -3
  491. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +12 -5
  492. package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.tsx +1 -1
  493. package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.tsx +1 -1
  494. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +0 -1
  495. package/src/lib/ui/context/actions.tsx +6 -6
  496. package/src/lib/ui/context/components.tsx +1 -2
  497. package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
  498. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +2 -2
  499. package/src/lib/ui/hooks/useTools.tsx +4 -5
  500. package/src/lib/ui/version.ts +3 -3
  501. package/src/lib/ui.css +27 -23
  502. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +12 -48
  503. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +11 -6
  504. package/src/lib/utils/test-helpers.ts +60 -0
  505. package/src/lib/utils/text/richText.ts +6 -5
  506. package/src/lib/utils/tldr/buildFromV1Document.ts +9 -2
  507. package/src/test/Editor.test.tsx +40 -29
  508. package/src/test/EraserTool.test.ts +10 -12
  509. package/src/test/TestEditor.ts +48 -47
  510. package/src/test/TldrawEditor.test.tsx +3 -2
  511. package/src/test/__snapshots__/drawing.test.ts.snap +3 -1257
  512. package/src/test/__snapshots__/resizing.test.ts.snap +3 -12
  513. package/src/test/arrows-megabus.test.tsx +1 -1
  514. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +10 -10
  515. package/src/test/commands/cameraState.test.ts +299 -0
  516. package/src/test/commands/setCamera.test.ts +13 -11
  517. package/src/test/commands/stackShapes.test.ts +34 -8
  518. package/src/test/commands/zoomToBounds.test.ts +19 -3
  519. package/src/test/commands/zoomToSelection.test.ts +14 -3
  520. package/src/test/custom-clipping.test.ts +16 -9
  521. package/src/test/drawing.test.ts +17 -10
  522. package/src/test/flipShapes.test.ts +33 -0
  523. package/src/test/frames.test.ts +92 -0
  524. package/src/test/groups.test.tsx +1 -1
  525. package/src/test/modifiers.test.ts +6 -6
  526. package/src/test/resizing.test.ts +7 -9
  527. package/src/test/selection-omnibus.test.ts +2 -2
  528. package/src/test/spacebarPanning.test.ts +28 -10
  529. package/src/test/test-jsx.tsx +3 -0
  530. package/tldraw.css +41 -35
  531. package/dist-cjs/lib/shapes/shared/useForceSolid.js.map +0 -7
  532. package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js.map +0 -7
  533. package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js +0 -32
  534. package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js.map +0 -7
  535. package/dist-cjs/lib/utils/text/textDirection.js +0 -51
  536. package/dist-cjs/lib/utils/text/textDirection.js.map +0 -7
  537. package/dist-esm/lib/shapes/shared/useForceSolid.mjs +0 -9
  538. package/dist-esm/lib/shapes/shared/useForceSolid.mjs.map +0 -7
  539. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs +0 -8
  540. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs.map +0 -7
  541. package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs +0 -12
  542. package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs.map +0 -7
  543. package/dist-esm/lib/utils/text/textDirection.mjs +0 -31
  544. package/dist-esm/lib/utils/text/textDirection.mjs.map +0 -7
  545. package/src/lib/shapes/shared/useForceSolid.ts +0 -6
  546. package/src/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.ts +0 -10
  547. package/src/lib/ui/components/TopPanel/DefaultTopPanel.tsx +0 -10
  548. 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.
@@ -291,6 +295,8 @@ export declare interface ArrowShapeOptions {
291
295
  * When creating an arrow, should it bind to the target shape.
292
296
  */
293
297
  shouldIgnoreTargets(editor: Editor): boolean;
298
+ /** Whether to show the outline of the arrow shape's label (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
299
+ readonly showTextOutline: boolean;
294
300
  }
295
301
 
296
302
  /** @public */
@@ -358,10 +364,10 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
358
364
  };
359
365
  };
360
366
  onDoubleClickHandle(shape: TLArrowShape, handle: TLHandle): TLShapePartial<TLArrowShape> | void;
361
- component(shape: TLArrowShape): JSX_2.Element | null;
362
- indicator(shape: TLArrowShape): JSX_2.Element | null;
367
+ component(shape: TLArrowShape): JSX.Element | null;
368
+ indicator(shape: TLArrowShape): JSX.Element | null;
363
369
  onEditStart(shape: TLArrowShape): void;
364
- toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element;
370
+ toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX.Element;
365
371
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
366
372
  getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
367
373
  }
@@ -403,10 +409,10 @@ export declare interface ArrowTargetState {
403
409
  }
404
410
 
405
411
  /** @public @react */
406
- export declare function ArrowToolbarItem(): JSX_2.Element;
412
+ export declare function ArrowToolbarItem(): JSX.Element;
407
413
 
408
414
  /** @public @react */
409
- export declare function ArrowUpToolbarItem(): JSX_2.Element;
415
+ export declare function ArrowUpToolbarItem(): JSX.Element;
410
416
 
411
417
  /** @public */
412
418
  export declare type ASPECT_RATIO_OPTION = 'circle' | 'landscape' | 'original' | 'portrait' | 'square' | 'wide';
@@ -418,7 +424,7 @@ export declare const ASPECT_RATIO_OPTIONS: ASPECT_RATIO_OPTION[];
418
424
  export declare const ASPECT_RATIO_TO_VALUE: Record<ASPECT_RATIO_OPTION, number>;
419
425
 
420
426
  /** @public @react */
421
- export declare function AssetToolbarItem(): JSX_2.Element;
427
+ export declare function AssetToolbarItem(): JSX.Element;
422
428
 
423
429
  /* Excluded from this release type: AssetUrlsProvider */
424
430
 
@@ -440,8 +446,8 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
440
446
  getText(shape: TLBookmarkShape): string;
441
447
  getAriaDescriptor(shape: TLBookmarkShape): string | undefined;
442
448
  getDefaultProps(): TLBookmarkShape['props'];
443
- component(shape: TLBookmarkShape): JSX_2.Element;
444
- indicator(shape: TLBookmarkShape): JSX_2.Element;
449
+ component(shape: TLBookmarkShape): JSX.Element;
450
+ indicator(shape: TLBookmarkShape): JSX.Element;
445
451
  onBeforeCreate(next: TLBookmarkShape): {
446
452
  id: TLShapeId;
447
453
  index: IndexKey;
@@ -490,7 +496,7 @@ export declare interface BoxWidthHeight {
490
496
  }
491
497
 
492
498
  /** @public @react */
493
- export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps): JSX_2.Element;
499
+ export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps): JSX.Element;
494
500
 
495
501
  /** @public */
496
502
  export declare interface BreakPointProviderProps {
@@ -501,11 +507,11 @@ export declare interface BreakPointProviderProps {
501
507
  /* Excluded from this release type: buildFromV1Document */
502
508
 
503
509
  /** @public @react */
504
- 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;
505
511
 
506
512
  /** @public */
507
513
  export declare interface CenteredTopPanelContainerProps {
508
- children: ReactNode;
514
+ children?: ReactNode;
509
515
  maxWidth?: number;
510
516
  ignoreRightWidth?: number;
511
517
  stylePanelWidth?: number;
@@ -526,7 +532,7 @@ export declare interface CenteredTopPanelContainerProps {
526
532
  export declare function centerSelectionAroundPoint(editor: Editor, position: VecLike): void;
527
533
 
528
534
  /** @public @react */
529
- export declare function CheckBoxToolbarItem(): JSX_2.Element;
535
+ export declare function CheckBoxToolbarItem(): JSX.Element;
530
536
 
531
537
  /**
532
538
  * Clear the current arrow target state for an editor. See {@link ArrowTargetState} for more
@@ -537,13 +543,13 @@ export declare function CheckBoxToolbarItem(): JSX_2.Element;
537
543
  export declare function clearArrowTargetState(editor: Editor): void;
538
544
 
539
545
  /** @public @react */
540
- export declare function ClipboardMenuGroup(): JSX_2.Element;
546
+ export declare function ClipboardMenuGroup(): JSX.Element;
541
547
 
542
548
  /** @public @react */
543
- export declare function CloudToolbarItem(): JSX_2.Element;
549
+ export declare function CloudToolbarItem(): JSX.Element;
544
550
 
545
551
  /** @public @react */
546
- export declare function ColorSchemeMenu(): JSX_2.Element;
552
+ export declare function ColorSchemeMenu(): JSX.Element;
547
553
 
548
554
  /**
549
555
  * Contains the size within the given box size
@@ -556,13 +562,13 @@ export declare function ColorSchemeMenu(): JSX_2.Element;
556
562
  export declare function containBoxSize(originalSize: BoxWidthHeight, containBoxSize: BoxWidthHeight): BoxWidthHeight;
557
563
 
558
564
  /** @public @react */
559
- export declare function ConversionsMenuGroup(): JSX_2.Element | null;
565
+ export declare function ConversionsMenuGroup(): JSX.Element | null;
560
566
 
561
567
  /** @public @react */
562
- export declare function ConvertToBookmarkMenuItem(): JSX_2.Element | null;
568
+ export declare function ConvertToBookmarkMenuItem(): JSX.Element | null;
563
569
 
564
570
  /** @public @react */
565
- export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
571
+ export declare function ConvertToEmbedMenuItem(): JSX.Element | null;
566
572
 
567
573
  /**
568
574
  * Copy the given shapes to the clipboard.
@@ -577,7 +583,7 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
577
583
  export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
578
584
 
579
585
  /** @public @react */
580
- export declare function CopyAsMenuGroup(): JSX_2.Element;
586
+ export declare function CopyAsMenuGroup(): JSX.Element;
581
587
 
582
588
  /** @public */
583
589
  export declare interface CopyAsOptions extends TLImageExportOptions {
@@ -586,7 +592,7 @@ export declare interface CopyAsOptions extends TLImageExportOptions {
586
592
  }
587
593
 
588
594
  /** @public @react */
589
- export declare function CopyMenuItem(): JSX_2.Element;
595
+ export declare function CopyMenuItem(): JSX.Element;
590
596
 
591
597
  /**
592
598
  * Creates a bookmark shape from a URL with unfurled metadata.
@@ -628,7 +634,7 @@ export declare interface CropBoxOptions {
628
634
  /* Excluded from this release type: CubicBezierToPathBuilderCommand */
629
635
 
630
636
  /** @public @react */
631
- export declare function CursorChatItem(): JSX_2.Element | null;
637
+ export declare function CursorChatItem(): JSX.Element | null;
632
638
 
633
639
  /** @public */
634
640
  export declare interface CustomDebugFlags {
@@ -642,7 +648,7 @@ export declare interface CustomEmbedDefinition extends EmbedDefinition {
642
648
  }
643
649
 
644
650
  /** @public @react */
645
- export declare function CutMenuItem(): JSX_2.Element;
651
+ export declare function CutMenuItem(): JSX.Element;
646
652
 
647
653
  /** @public */
648
654
  export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
@@ -654,7 +660,7 @@ export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
654
660
  }
655
661
 
656
662
  /** @public @react */
657
- export declare function DebugFlags(props: DebugFlagsProps): JSX_2.Element | null;
663
+ export declare function DebugFlags(props: DebugFlagsProps): JSX.Element | null;
658
664
 
659
665
  /** @public */
660
666
  export declare interface DebugFlagsProps {
@@ -888,7 +894,7 @@ export declare const DefaultA11yAnnouncer: NamedExoticComponent<object>;
888
894
  export declare const DefaultActionsMenu: NamedExoticComponent<TLUiActionsMenuProps>;
889
895
 
890
896
  /** @public @react */
891
- export declare function DefaultActionsMenuContent(): JSX_2.Element;
897
+ export declare function DefaultActionsMenuContent(): JSX.Element;
892
898
 
893
899
  /** @public */
894
900
  export declare function defaultAddFontsFromNode(node: Node_2, state: RichTextFontVisitorState, addFont: (font: TLFontFace) => void): RichTextFontVisitorState;
@@ -902,13 +908,13 @@ export { DefaultContextMenu as ContextMenu }
902
908
  export { DefaultContextMenu }
903
909
 
904
910
  /** @public @react */
905
- export declare function DefaultContextMenuContent(): JSX_2.Element | null;
911
+ export declare function DefaultContextMenuContent(): JSX.Element | null;
906
912
 
907
913
  /** @public @react */
908
- export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX_2.Element;
914
+ export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX.Element;
909
915
 
910
916
  /** @public @react */
911
- export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX_2.Element;
917
+ export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX.Element;
912
918
 
913
919
  /** @public @react */
914
920
  export declare const DefaultDialogs: NamedExoticComponent<object>;
@@ -920,7 +926,7 @@ export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
920
926
  export declare type DefaultEmbedDefinitionType = (typeof DEFAULT_EMBED_DEFINITIONS)[number]['type'];
921
927
 
922
928
  /** @public @react */
923
- export declare function DefaultFollowingIndicator(): JSX_2.Element | null;
929
+ export declare function DefaultFollowingIndicator(): JSX.Element | null;
924
930
 
925
931
  /** @public */
926
932
  export declare const DefaultFontFaces: TLDefaultFonts;
@@ -976,19 +982,19 @@ export declare function defaultHandleExternalUrlContent(editor: Editor, { point,
976
982
  }, { toasts, msg }: TLDefaultExternalContentHandlerOpts): Promise<void>;
977
983
 
978
984
  /** @public @react */
979
- export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX_2.Element;
985
+ export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX.Element;
980
986
 
981
987
  /** @public @react */
982
- export declare function DefaultHelperButtonsContent(): JSX_2.Element;
988
+ export declare function DefaultHelperButtonsContent(): JSX.Element;
983
989
 
984
990
  /** @public @react */
985
991
  export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
986
992
 
987
993
  /** @public @react */
988
- export declare function DefaultHelpMenuContent(): JSX_2.Element;
994
+ export declare function DefaultHelpMenuContent(): JSX.Element;
989
995
 
990
996
  /** @public @react */
991
- export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps): JSX_2.Element | null;
997
+ export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps): JSX.Element | null;
992
998
 
993
999
  /** @public @react */
994
1000
  export declare const DefaultImageToolbarContent: NamedExoticComponent<DefaultImageToolbarContentProps>;
@@ -1006,19 +1012,19 @@ export declare interface DefaultImageToolbarContentProps {
1006
1012
  export declare const DefaultKeyboardShortcutsDialog: NamedExoticComponent<TLUiKeyboardShortcutsDialogProps>;
1007
1013
 
1008
1014
  /** @public @react */
1009
- export declare function DefaultKeyboardShortcutsDialogContent(): JSX_2.Element;
1015
+ export declare function DefaultKeyboardShortcutsDialogContent(): JSX.Element;
1010
1016
 
1011
1017
  /** @public @react */
1012
1018
  export declare const DefaultMainMenu: NamedExoticComponent<TLUiMainMenuProps>;
1013
1019
 
1014
1020
  /** @public @react */
1015
- export declare function DefaultMainMenuContent(): JSX_2.Element;
1021
+ export declare function DefaultMainMenuContent(): JSX.Element;
1016
1022
 
1017
1023
  /** @public @react */
1018
1024
  export declare const DefaultMenuPanel: NamedExoticComponent<object>;
1019
1025
 
1020
1026
  /** @public @react */
1021
- export declare function DefaultMinimap(): JSX_2.Element;
1027
+ export declare function DefaultMinimap(): JSX.Element;
1022
1028
 
1023
1029
  /** @public @react */
1024
1030
  export declare const DefaultNavigationPanel: NamedExoticComponent<object>;
@@ -1030,7 +1036,7 @@ export declare const DefaultPageMenu: NamedExoticComponent<object>;
1030
1036
  export declare const DefaultQuickActions: NamedExoticComponent<TLUiQuickActionsProps>;
1031
1037
 
1032
1038
  /** @public @react */
1033
- export declare function DefaultQuickActionsContent(): JSX_2.Element | undefined;
1039
+ export declare function DefaultQuickActionsContent(): JSX.Element | undefined;
1034
1040
 
1035
1041
  /**
1036
1042
  * The default rich text toolbar.
@@ -1044,7 +1050,7 @@ export declare const DefaultRichTextToolbar: React_3.NamedExoticComponent<TLUiRi
1044
1050
  *
1045
1051
  * @public @react
1046
1052
  */
1047
- export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX_2.Element[];
1053
+ export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX.Element[];
1048
1054
 
1049
1055
  /** @public */
1050
1056
  export declare interface DefaultRichTextToolbarContentProps {
@@ -1059,13 +1065,13 @@ export declare const defaultShapeTools: readonly [typeof TextShapeTool, typeof D
1059
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];
1060
1066
 
1061
1067
  /** @public @react */
1062
- export declare function DefaultSharePanel(): JSX_2.Element;
1068
+ export declare function DefaultSharePanel(): JSX.Element;
1063
1069
 
1064
1070
  /** @public @react */
1065
1071
  export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
1066
1072
 
1067
1073
  /** @public @react */
1068
- export declare function DefaultStylePanelContent(): JSX_2.Element;
1074
+ export declare function DefaultStylePanelContent(): JSX.Element;
1069
1075
 
1070
1076
  /** @public @react */
1071
1077
  export declare const DefaultToasts: NamedExoticComponent<object>;
@@ -1081,7 +1087,7 @@ export declare const DefaultToasts: NamedExoticComponent<object>;
1081
1087
  export declare const DefaultToolbar: NamedExoticComponent<DefaultToolbarProps>;
1082
1088
 
1083
1089
  /** @public @react */
1084
- export declare function DefaultToolbarContent(): JSX_2.Element;
1090
+ export declare function DefaultToolbarContent(): JSX.Element;
1085
1091
 
1086
1092
  /** @public */
1087
1093
  export declare interface DefaultToolbarProps {
@@ -1096,9 +1102,6 @@ export declare interface DefaultToolbarProps {
1096
1102
  /** @public */
1097
1103
  export declare const defaultTools: readonly [typeof EraserTool, typeof HandTool, typeof LaserTool, typeof ZoomTool, typeof SelectTool];
1098
1104
 
1099
- /** @public @react */
1100
- export declare function DefaultTopPanel(): JSX_2.Element;
1101
-
1102
1105
  /** @public @react */
1103
1106
  export declare const DefaultVideoToolbar: NamedExoticComponent<TLUiVideoToolbarProps>;
1104
1107
 
@@ -1115,16 +1118,16 @@ export declare interface DefaultVideoToolbarContentProps {
1115
1118
  export declare const DefaultZoomMenu: NamedExoticComponent<TLUiZoomMenuProps>;
1116
1119
 
1117
1120
  /** @public @react */
1118
- export declare function DefaultZoomMenuContent(): JSX_2.Element;
1121
+ export declare function DefaultZoomMenuContent(): JSX.Element;
1119
1122
 
1120
1123
  /** @public @react */
1121
- export declare function DeleteMenuItem(): JSX_2.Element;
1124
+ export declare function DeleteMenuItem(): JSX.Element;
1122
1125
 
1123
1126
  /** @public @react */
1124
- export declare function DiamondToolbarItem(): JSX_2.Element;
1127
+ export declare function DiamondToolbarItem(): JSX.Element;
1125
1128
 
1126
1129
  /** @public @react */
1127
- export declare function DistributeMenuItems(): JSX_2.Element;
1130
+ export declare function DistributeMenuItems(): JSX.Element;
1128
1131
 
1129
1132
  /* Excluded from this release type: downloadFile */
1130
1133
 
@@ -1195,13 +1198,14 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1195
1198
  hideSelectionBoundsFg(shape: TLDrawShape): boolean;
1196
1199
  getDefaultProps(): TLDrawShape['props'];
1197
1200
  getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
1198
- component(shape: TLDrawShape): JSX_2.Element;
1199
- indicator(shape: TLDrawShape): JSX_2.Element;
1200
- 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;
1201
1204
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
1202
1205
  onResize(shape: TLDrawShape, info: TLResizeInfo<TLDrawShape>): {
1203
1206
  props: {
1204
- segments: TLDrawShapeSegment[];
1207
+ scaleX: number;
1208
+ scaleY: number;
1205
1209
  };
1206
1210
  };
1207
1211
  expandSelectionOutlinePx(shape: TLDrawShape): number;
@@ -1209,19 +1213,19 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1209
1213
  }
1210
1214
 
1211
1215
  /** @public @react */
1212
- export declare function DrawToolbarItem(): JSX_2.Element;
1216
+ export declare function DrawToolbarItem(): JSX.Element;
1213
1217
 
1214
1218
  /** @public @react */
1215
- export declare function DuplicateMenuItem(): JSX_2.Element | null;
1219
+ export declare function DuplicateMenuItem(): JSX.Element | null;
1216
1220
 
1217
1221
  /** @public @react */
1218
- export declare function EditLinkMenuItem(): JSX_2.Element | null;
1222
+ export declare function EditLinkMenuItem(): JSX.Element | null;
1219
1223
 
1220
1224
  /** @public @react */
1221
- export declare function EditMenuSubmenu(): JSX_2.Element | null;
1225
+ export declare function EditMenuSubmenu(): JSX.Element | null;
1222
1226
 
1223
1227
  /** @public @react */
1224
- export declare function EditSubmenu(): JSX_2.Element;
1228
+ export declare function EditSubmenu(): JSX.Element;
1225
1229
 
1226
1230
  /**
1227
1231
  * @public
@@ -1447,7 +1451,7 @@ export declare interface ElbowArrowTargetBox extends ElbowArrowBox {
1447
1451
  }
1448
1452
 
1449
1453
  /** @public @react */
1450
- export declare function EllipseToolbarItem(): JSX_2.Element;
1454
+ export declare function EllipseToolbarItem(): JSX.Element;
1451
1455
 
1452
1456
  /** @public */
1453
1457
  export declare interface EmbedDefinition {
@@ -1464,6 +1468,7 @@ export declare interface EmbedDefinition {
1464
1468
  readonly instructionLink?: string;
1465
1469
  readonly backgroundColor?: string;
1466
1470
  readonly embedOnPaste?: boolean;
1471
+ readonly canEditWhileLocked?: boolean;
1467
1472
  readonly overrideOutlineRadius?: number;
1468
1473
  readonly toEmbedUrl: (url: string) => string | undefined;
1469
1474
  readonly fromEmbedUrl: (url: string) => string | undefined;
@@ -1498,6 +1503,7 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1498
1503
  static props: RecordProps<TLEmbedShape>;
1499
1504
  static migrations: TLPropsMigrations;
1500
1505
  private static embedDefinitions;
1506
+ canEditWhileLocked(shape: TLEmbedShape): boolean;
1501
1507
  static setEmbedDefinitions(embedDefinitions: readonly TLEmbedDefinition[]): void;
1502
1508
  getEmbedDefinitions(): readonly TLEmbedDefinition[];
1503
1509
  getEmbedDefinition(url: string): TLEmbedResult;
@@ -1511,8 +1517,8 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1511
1517
  getGeometry(shape: TLEmbedShape): Geometry2d;
1512
1518
  isAspectRatioLocked(shape: TLEmbedShape): boolean;
1513
1519
  onResize(shape: TLEmbedShape, info: TLResizeInfo<TLEmbedShape>): TLEmbedShape;
1514
- component(shape: TLEmbedShape): JSX_2.Element | null;
1515
- indicator(shape: TLEmbedShape): JSX_2.Element;
1520
+ component(shape: TLEmbedShape): JSX.Element | null;
1521
+ indicator(shape: TLEmbedShape): JSX.Element;
1516
1522
  getInterpolatedProps(startShape: TLEmbedShape, endShape: TLEmbedShape, t: number): TLEmbedShapeProps;
1517
1523
  }
1518
1524
 
@@ -1526,7 +1532,7 @@ export declare class EraserTool extends StateNode {
1526
1532
  }
1527
1533
 
1528
1534
  /** @public @react */
1529
- export declare function EraserToolbarItem(): JSX_2.Element;
1535
+ export declare function EraserToolbarItem(): JSX.Element;
1530
1536
 
1531
1537
  /** @public */
1532
1538
  export declare interface EventsProviderProps {
@@ -1535,7 +1541,7 @@ export declare interface EventsProviderProps {
1535
1541
  }
1536
1542
 
1537
1543
  /** @public @react */
1538
- 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;
1539
1545
 
1540
1546
  /** @public */
1541
1547
  export declare interface ExampleDialogProps {
@@ -1569,13 +1575,13 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
1569
1575
  }
1570
1576
 
1571
1577
  /** @public @react */
1572
- export declare function ExportFileContentSubMenu(): JSX_2.Element;
1578
+ export declare function ExportFileContentSubMenu(): JSX.Element;
1573
1579
 
1574
1580
  /** @public @react */
1575
- export declare function ExtrasGroup(): JSX_2.Element;
1581
+ export declare function ExtrasGroup(): JSX.Element;
1576
1582
 
1577
1583
  /** @public @react */
1578
- export declare function FeatureFlags(props: FeatureFlagsProps): JSX_2.Element | null;
1584
+ export declare function FeatureFlags(props: FeatureFlagsProps): JSX.Element | null;
1579
1585
 
1580
1586
  /** @public */
1581
1587
  export declare interface FeatureFlagsProps {
@@ -1596,7 +1602,7 @@ export declare function fitFrameToContent(editor: Editor, id: TLShapeId, opts?:
1596
1602
  }): void;
1597
1603
 
1598
1604
  /** @public @react */
1599
- export declare function FitFrameToContentMenuItem(): JSX_2.Element | null;
1605
+ export declare function FitFrameToContentMenuItem(): JSX.Element | null;
1600
1606
 
1601
1607
  /** @public */
1602
1608
  export declare const FONT_FAMILIES: Record<TLDefaultFontStyle, string>;
@@ -1610,6 +1616,10 @@ export declare interface FrameShapeOptions {
1610
1616
  * When true, the frame will display colors for the shape's headings and background.
1611
1617
  */
1612
1618
  showColors: boolean;
1619
+ /**
1620
+ * When true, the frame will resize its children when the frame itself is resized.
1621
+ */
1622
+ resizeChildren: boolean;
1613
1623
  }
1614
1624
 
1615
1625
  /** @public */
@@ -1629,7 +1639,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1629
1639
  static configure<T extends TLShapeUtilConstructor<any, any>>(this: T, options: T extends new (...args: any[]) => {
1630
1640
  options: infer Options;
1631
1641
  } ? Partial<Options> : never): T;
1632
- canEdit(): boolean;
1642
+ canEdit(shape: TLFrameShape, info: TLEditStartInfo): boolean;
1633
1643
  canResize(): boolean;
1634
1644
  canResizeChildren(): boolean;
1635
1645
  isExportBoundsContainer(): boolean;
@@ -1637,9 +1647,9 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1637
1647
  getAriaDescriptor(shape: TLFrameShape): string;
1638
1648
  getGeometry(shape: TLFrameShape): Geometry2d;
1639
1649
  getText(shape: TLFrameShape): string | undefined;
1640
- component(shape: TLFrameShape): JSX_2.Element;
1641
- toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX_2.Element;
1642
- 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;
1643
1653
  providesBackgroundForChildren(): boolean;
1644
1654
  getClipPath(shape: TLFrameShape): Vec[];
1645
1655
  canReceiveNewChildrenOfType(shape: TLShape): boolean;
@@ -1662,7 +1672,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
1662
1672
  }
1663
1673
 
1664
1674
  /** @public @react */
1665
- export declare function FrameToolbarItem(): JSX_2.Element;
1675
+ export declare function FrameToolbarItem(): JSX.Element;
1666
1676
 
1667
1677
  /** @public */
1668
1678
  export declare class GeoShapeTool extends StateNode {
@@ -1677,15 +1687,18 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
1677
1687
  static type: "geo";
1678
1688
  static props: RecordProps<TLGeoShape>;
1679
1689
  static migrations: TLPropsMigrations;
1690
+ options: {
1691
+ showTextOutline: boolean;
1692
+ };
1680
1693
  canEdit(): boolean;
1681
1694
  getDefaultProps(): TLGeoShape['props'];
1682
1695
  getGeometry(shape: TLGeoShape): Group2d;
1683
1696
  getHandleSnapGeometry(shape: TLGeoShape): HandleSnapGeometry;
1684
1697
  getText(shape: TLGeoShape): string;
1685
1698
  getFontFaces(shape: TLGeoShape): TLFontFace[];
1686
- component(shape: TLGeoShape): JSX_2.Element;
1687
- indicator(shape: TLGeoShape): JSX_2.Element;
1688
- 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;
1689
1702
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
1690
1703
  onResize(shape: TLGeoShape, { handle, newPoint, scaleX, scaleY, initialShape }: TLResizeInfo<TLGeoShape>): {
1691
1704
  props: {
@@ -1840,6 +1853,35 @@ export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels
1840
1853
  /** @public */
1841
1854
  export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
1842
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
+
1843
1885
  /**
1844
1886
  * ## getStrokePoints
1845
1887
  *
@@ -1877,10 +1919,10 @@ export declare function getUncroppedSize(shapeSize: {
1877
1919
  };
1878
1920
 
1879
1921
  /** @public @react */
1880
- export declare function GroupMenuItem(): JSX_2.Element | null;
1922
+ export declare function GroupMenuItem(): JSX.Element | null;
1881
1923
 
1882
1924
  /** @public @react */
1883
- export declare function GroupOrUngroupMenuItem(): JSX_2.Element;
1925
+ export declare function GroupOrUngroupMenuItem(): JSX.Element;
1884
1926
 
1885
1927
  /** @public */
1886
1928
  export declare class HandTool extends StateNode {
@@ -1894,13 +1936,13 @@ export declare class HandTool extends StateNode {
1894
1936
  }
1895
1937
 
1896
1938
  /** @public @react */
1897
- export declare function HandToolbarItem(): JSX_2.Element;
1939
+ export declare function HandToolbarItem(): JSX.Element;
1898
1940
 
1899
1941
  /** @public @react */
1900
- export declare function HeartToolbarItem(): JSX_2.Element;
1942
+ export declare function HeartToolbarItem(): JSX.Element;
1901
1943
 
1902
1944
  /** @public @react */
1903
- export declare function HexagonToolbarItem(): JSX_2.Element;
1945
+ export declare function HexagonToolbarItem(): JSX.Element;
1904
1946
 
1905
1947
  /** @public */
1906
1948
  export declare function hideAllTooltips(): void;
@@ -1938,21 +1980,22 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
1938
1980
  hideSelectionBoundsFg(shape: TLHighlightShape): boolean;
1939
1981
  getDefaultProps(): TLHighlightShape['props'];
1940
1982
  getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
1941
- component(shape: TLHighlightShape): JSX_2.Element;
1942
- backgroundComponent(shape: TLHighlightShape): JSX_2.Element;
1943
- indicator(shape: TLHighlightShape): JSX_2.Element;
1944
- toSvg(shape: TLHighlightShape): JSX_2.Element;
1945
- 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;
1946
1988
  onResize(shape: TLHighlightShape, info: TLResizeInfo<TLHighlightShape>): {
1947
1989
  props: {
1948
- segments: TLDrawShapeSegment[];
1990
+ scaleX: number;
1991
+ scaleY: number;
1949
1992
  };
1950
1993
  };
1951
1994
  getInterpolatedProps(startShape: TLHighlightShape, endShape: TLHighlightShape, t: number): TLHighlightShapeProps;
1952
1995
  }
1953
1996
 
1954
1997
  /** @public @react */
1955
- export declare function HighlightToolbarItem(): JSX_2.Element;
1998
+ export declare function HighlightToolbarItem(): JSX.Element;
1956
1999
 
1957
2000
  /** @public */
1958
2001
  export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
@@ -1966,9 +2009,9 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
1966
2009
  getGeometry(shape: TLImageShape): Geometry2d;
1967
2010
  getAriaDescriptor(shape: TLImageShape): string;
1968
2011
  onResize(shape: TLImageShape, info: TLResizeInfo<TLImageShape>): TLImageShape;
1969
- component(shape: TLImageShape): JSX_2.Element;
1970
- indicator(shape: TLImageShape): JSX_2.Element | null;
1971
- 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>;
1972
2015
  onDoubleClickEdge(shape: TLImageShape): void;
1973
2016
  getInterpolatedProps(startShape: TLImageShape, endShape: TLImageShape, t: number): TLImageShapeProps;
1974
2017
  }
@@ -1977,13 +2020,13 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
1977
2020
  export declare const KeyboardShiftEnterTweakExtension: Extension<any, any>;
1978
2021
 
1979
2022
  /** @public @react */
1980
- export declare function KeyboardShortcutsMenuItem(): JSX_2.Element | null;
2023
+ export declare function KeyboardShortcutsMenuItem(): JSX.Element | null;
1981
2024
 
1982
2025
  /** @public */
1983
2026
  export declare const LABEL_FONT_SIZES: Record<TLDefaultSizeStyle, number>;
1984
2027
 
1985
2028
  /** @public @react */
1986
- export declare function LanguageMenu(): JSX_2.Element | null;
2029
+ export declare function LanguageMenu(): JSX.Element | null;
1987
2030
 
1988
2031
  /** @public */
1989
2032
  export declare class LaserTool extends StateNode {
@@ -1995,7 +2038,7 @@ export declare class LaserTool extends StateNode {
1995
2038
  }
1996
2039
 
1997
2040
  /** @public @react */
1998
- export declare function LaserToolbarItem(): JSX_2.Element;
2041
+ export declare function LaserToolbarItem(): JSX.Element;
1999
2042
 
2000
2043
  /** @public */
2001
2044
  export declare class LineShapeTool extends StateNode {
@@ -2087,29 +2130,29 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2087
2130
  x: number;
2088
2131
  y: number;
2089
2132
  } | undefined;
2090
- component(shape: TLLineShape): JSX_2.Element;
2091
- indicator(shape: TLLineShape): JSX_2.Element;
2092
- toSvg(shape: TLLineShape): JSX_2.Element;
2133
+ component(shape: TLLineShape): JSX.Element;
2134
+ indicator(shape: TLLineShape): JSX.Element;
2135
+ toSvg(shape: TLLineShape): JSX.Element;
2093
2136
  getHandleSnapGeometry(shape: TLLineShape): HandleSnapGeometry;
2094
2137
  getInterpolatedProps(startShape: TLLineShape, endShape: TLLineShape, t: number): TLLineShape['props'];
2095
2138
  }
2096
2139
 
2097
2140
  /** @public @react */
2098
- export declare function LineToolbarItem(): JSX_2.Element;
2141
+ export declare function LineToolbarItem(): JSX.Element;
2099
2142
 
2100
2143
  /* Excluded from this release type: LineToPathBuilderCommand */
2101
2144
 
2102
2145
  /** @public @react */
2103
- export declare function LockGroup(): JSX_2.Element;
2146
+ export declare function LockGroup(): JSX.Element;
2104
2147
 
2105
2148
  /** @public @react */
2106
- export declare function MiscMenuGroup(): JSX_2.Element;
2149
+ export declare function MiscMenuGroup(): JSX.Element;
2107
2150
 
2108
2151
  /** @public @react */
2109
- export declare function MobileStylePanel(): JSX_2.Element | null;
2152
+ export declare function MobileStylePanel(): JSX.Element | null;
2110
2153
 
2111
2154
  /** @public @react */
2112
- export declare function MoveToPageMenu(): JSX_2.Element | null;
2155
+ export declare function MoveToPageMenu(): JSX.Element | null;
2113
2156
 
2114
2157
  /* Excluded from this release type: MoveToPathBuilderCommand */
2115
2158
 
@@ -2152,9 +2195,9 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2152
2195
  } | undefined;
2153
2196
  getText(shape: TLNoteShape): string;
2154
2197
  getFontFaces(shape: TLNoteShape): TLFontFace[];
2155
- component(shape: TLNoteShape): JSX_2.Element;
2156
- indicator(shape: TLNoteShape): JSX_2.Element;
2157
- 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;
2158
2201
  onBeforeCreate(next: TLNoteShape): {
2159
2202
  id: TLShapeId;
2160
2203
  index: IndexKey;
@@ -2211,7 +2254,7 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2211
2254
  }
2212
2255
 
2213
2256
  /** @public @react */
2214
- export declare function NoteToolbarItem(): JSX_2.Element;
2257
+ export declare function NoteToolbarItem(): JSX.Element;
2215
2258
 
2216
2259
  /**
2217
2260
  * Checks if a file is allowed to be uploaded. If it is not, it will show a toast explaining why to the user.
@@ -2224,7 +2267,7 @@ export declare function NoteToolbarItem(): JSX_2.Element;
2224
2267
  export declare function notifyIfFileNotAllowed(file: File, options: TLDefaultExternalContentHandlerOpts): boolean;
2225
2268
 
2226
2269
  /** @public @react */
2227
- export declare function OfflineIndicator(): JSX_2.Element;
2270
+ export declare function OfflineIndicator(): JSX.Element;
2228
2271
 
2229
2272
  /**
2230
2273
  * A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from
@@ -2250,10 +2293,10 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
2250
2293
  }
2251
2294
 
2252
2295
  /** @public @react */
2253
- export declare function OvalToolbarItem(): JSX_2.Element;
2296
+ export declare function OvalToolbarItem(): JSX.Element;
2254
2297
 
2255
2298
  /** @public @react */
2256
- 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;
2257
2300
 
2258
2301
  /** @public */
2259
2302
  export declare interface OverflowingToolbarProps {
@@ -2267,7 +2310,7 @@ export declare interface OverflowingToolbarProps {
2267
2310
  }
2268
2311
 
2269
2312
  /** @public @react */
2270
- 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;
2271
2314
 
2272
2315
  /** @public */
2273
2316
  export declare interface PageItemInputProps {
@@ -2301,7 +2344,7 @@ export declare function parseTldrawJsonFile({ json, schema, }: {
2301
2344
  }): Result<TLStore, TldrawFileParseError>;
2302
2345
 
2303
2346
  /** @public @react */
2304
- export declare function PasteMenuItem(): JSX_2.Element;
2347
+ export declare function PasteMenuItem(): JSX.Element;
2305
2348
 
2306
2349
  /** @public */
2307
2350
  export declare class PathBuilder {
@@ -2323,7 +2366,7 @@ export declare class PathBuilder {
2323
2366
  private cubicBezierToWithResolution;
2324
2367
  close(): this;
2325
2368
  toD(opts?: PathBuilderToDOpts): string;
2326
- toSvg(opts: PathBuilderOpts): JSX_2.Element;
2369
+ toSvg(opts: PathBuilderOpts): JSX.Element;
2327
2370
  toGeometry(): Group2d | PathBuilderGeometry2d;
2328
2371
  private toSolidSvg;
2329
2372
  private toDashedSvg;
@@ -2392,7 +2435,7 @@ export declare interface PathBuilderToDOpts {
2392
2435
  }
2393
2436
 
2394
2437
  /** @public @react */
2395
- export declare function PeopleMenu({ children }: PeopleMenuProps): JSX_2.Element | null;
2438
+ export declare function PeopleMenu({ children }: PeopleMenuProps): JSX.Element | null;
2396
2439
 
2397
2440
  /** @public */
2398
2441
  export declare interface PeopleMenuProps {
@@ -2438,6 +2481,7 @@ export declare interface PlainTextLabelProps {
2438
2481
  textWidth?: number;
2439
2482
  textHeight?: number;
2440
2483
  padding?: number;
2484
+ showTextOutline?: boolean;
2441
2485
  }
2442
2486
 
2443
2487
  /** @public */
@@ -2453,13 +2497,13 @@ export declare enum PORTRAIT_BREAKPOINT {
2453
2497
  }
2454
2498
 
2455
2499
  /** @public @react */
2456
- export declare function PreferencesGroup(): JSX_2.Element;
2500
+ export declare function PreferencesGroup(): JSX.Element;
2457
2501
 
2458
2502
  /** @public */
2459
2503
  export declare function preloadFont(id: string, font: TLTypeFace): Promise<FontFace>;
2460
2504
 
2461
2505
  /** @public @react */
2462
- export declare function PrintItem(): JSX_2.Element;
2506
+ export declare function PrintItem(): JSX.Element;
2463
2507
 
2464
2508
  /**
2465
2509
  * Put excalidraw clipboard content onto the current page.
@@ -2472,7 +2516,7 @@ export declare function PrintItem(): JSX_2.Element;
2472
2516
  export declare function putExcalidrawContent(editor: Editor, excalidrawClipboardContent: any, point?: VecLike): Promise<void>;
2473
2517
 
2474
2518
  /** @public @react */
2475
- export declare function RectangleToolbarItem(): JSX_2.Element;
2519
+ export declare function RectangleToolbarItem(): JSX.Element;
2476
2520
 
2477
2521
  /** @public */
2478
2522
  export declare function registerDefaultExternalContentHandlers(editor: Editor, options: TLDefaultExternalContentHandlerOpts): void;
@@ -2491,7 +2535,7 @@ export declare function registerDefaultSideEffects(editor: Editor): () => void;
2491
2535
  export declare function removeFrame(editor: Editor, ids: TLShapeId[]): void;
2492
2536
 
2493
2537
  /** @public @react */
2494
- export declare function RemoveFrameMenuItem(): JSX_2.Element | null;
2538
+ export declare function RemoveFrameMenuItem(): JSX.Element | null;
2495
2539
 
2496
2540
  /**
2497
2541
  * Renders HTML from a rich text string.
@@ -2508,7 +2552,6 @@ export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichT
2508
2552
  * @param editor - The editor instance.
2509
2553
  * @param richText - The rich text content.
2510
2554
  *
2511
- *
2512
2555
  * @public
2513
2556
  */
2514
2557
  export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, richText: TLRichText): string;
@@ -2518,7 +2561,6 @@ export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, ric
2518
2561
  * @param editor - The editor instance.
2519
2562
  * @param richText - The rich text content.
2520
2563
  *
2521
- *
2522
2564
  * @public
2523
2565
  */
2524
2566
  export declare function renderPlaintextFromRichText(editor: Editor, richText: TLRichText): string;
@@ -2528,19 +2570,18 @@ export declare function renderPlaintextFromRichText(editor: Editor, richText: TL
2528
2570
  * @param editor - The editor instance.
2529
2571
  * @param richText - The rich text content.
2530
2572
  *
2531
- *
2532
2573
  * @public
2533
2574
  */
2534
2575
  export declare function renderRichTextFromHTML(editor: Editor, html: string): TLRichText;
2535
2576
 
2536
2577
  /** @public @react */
2537
- export declare function ReorderMenuItems(): JSX_2.Element;
2578
+ export declare function ReorderMenuItems(): JSX.Element;
2538
2579
 
2539
2580
  /** @public @react */
2540
- export declare function ReorderMenuSubmenu(): JSX_2.Element | null;
2581
+ export declare function ReorderMenuSubmenu(): JSX.Element | null;
2541
2582
 
2542
2583
  /** @public @react */
2543
- export declare function RhombusToolbarItem(): JSX_2.Element;
2584
+ export declare function RhombusToolbarItem(): JSX.Element;
2544
2585
 
2545
2586
  /**
2546
2587
  * A rich text area that can be used for editing text with rich text formatting.
@@ -2583,6 +2624,7 @@ export declare interface RichTextLabelProps {
2583
2624
  textHeight?: number;
2584
2625
  padding?: number;
2585
2626
  hasCustomTabBehavior?: boolean;
2627
+ showTextOutline?: boolean;
2586
2628
  }
2587
2629
 
2588
2630
  /**
@@ -2590,7 +2632,7 @@ export declare interface RichTextLabelProps {
2590
2632
  *
2591
2633
  * @public @react
2592
2634
  */
2593
- 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;
2594
2636
 
2595
2637
  /** @public */
2596
2638
  export declare interface RichTextSVGProps {
@@ -2607,10 +2649,10 @@ export declare interface RichTextSVGProps {
2607
2649
  }
2608
2650
 
2609
2651
  /** @public @react */
2610
- export declare function RotateCWMenuItem(): JSX_2.Element;
2652
+ export declare function RotateCWMenuItem(): JSX.Element;
2611
2653
 
2612
2654
  /** @public @react */
2613
- export declare function SelectAllMenuItem(): JSX_2.Element;
2655
+ export declare function SelectAllMenuItem(): JSX.Element;
2614
2656
 
2615
2657
  /** @public */
2616
2658
  export declare class SelectTool extends StateNode {
@@ -2625,7 +2667,7 @@ export declare class SelectTool extends StateNode {
2625
2667
  }
2626
2668
 
2627
2669
  /** @public @react */
2628
- export declare function SelectToolbarItem(): JSX_2.Element;
2670
+ export declare function SelectToolbarItem(): JSX.Element;
2629
2671
 
2630
2672
  /** @public */
2631
2673
  export declare function serializeTldrawJson(editor: Editor): Promise<string>;
@@ -2637,6 +2679,9 @@ export declare function serializeTldrawJsonBlob(editor: Editor): Promise<Blob>;
2637
2679
 
2638
2680
  /* Excluded from this release type: setDefaultUiAssetUrls */
2639
2681
 
2682
+ /** @public */
2683
+ export declare function setStrokePointRadii(strokePoints: StrokePoint[], options: StrokeOptions): StrokePoint[];
2684
+
2640
2685
  /** @public */
2641
2686
  export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
2642
2687
  style: 'solid';
@@ -2645,10 +2690,25 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
2645
2690
  /* Excluded from this release type: Spinner */
2646
2691
 
2647
2692
  /** @public @react */
2648
- 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;
2649
2709
 
2650
2710
  /** @public @react */
2651
- export declare function StarToolbarItem(): JSX_2.Element;
2711
+ export declare function StarToolbarItem(): JSX.Element;
2652
2712
 
2653
2713
  /** @public */
2654
2714
  export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
@@ -2702,10 +2762,10 @@ export declare interface StrokePoint {
2702
2762
  }
2703
2763
 
2704
2764
  /** @public @react */
2705
- export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
2765
+ export declare function StylePanelArrowheadPicker(): JSX.Element | null;
2706
2766
 
2707
2767
  /** @public @react */
2708
- export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
2768
+ export declare function StylePanelArrowKindPicker(): JSX.Element | null;
2709
2769
 
2710
2770
  /** @public @react */
2711
2771
  export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
@@ -2725,7 +2785,7 @@ export declare interface StylePanelButtonPickerProps<T extends string> {
2725
2785
  }
2726
2786
 
2727
2787
  /** @public @react */
2728
- export declare function StylePanelColorPicker(): JSX_2.Element | null;
2788
+ export declare function StylePanelColorPicker(): JSX.Element | null;
2729
2789
 
2730
2790
  /** @public */
2731
2791
  export declare interface StylePanelContext {
@@ -2736,7 +2796,7 @@ export declare interface StylePanelContext {
2736
2796
  }
2737
2797
 
2738
2798
  /** @public @react */
2739
- export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX_2.Element;
2799
+ export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX.Element;
2740
2800
 
2741
2801
  /** @public */
2742
2802
  export declare interface StylePanelContextProviderProps {
@@ -2745,7 +2805,7 @@ export declare interface StylePanelContextProviderProps {
2745
2805
  }
2746
2806
 
2747
2807
  /** @public @react */
2748
- export declare function StylePanelDashPicker(): JSX_2.Element | null;
2808
+ export declare function StylePanelDashPicker(): JSX.Element | null;
2749
2809
 
2750
2810
  /** @public @react */
2751
2811
  export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
@@ -2789,22 +2849,22 @@ export declare interface StylePanelDropdownPickerProps<T extends string> {
2789
2849
  }
2790
2850
 
2791
2851
  /** @public @react */
2792
- export declare function StylePanelFillPicker(): JSX_2.Element | null;
2852
+ export declare function StylePanelFillPicker(): JSX.Element | null;
2793
2853
 
2794
2854
  /** @public @react */
2795
- export declare function StylePanelFontPicker(): JSX_2.Element | null;
2855
+ export declare function StylePanelFontPicker(): JSX.Element | null;
2796
2856
 
2797
2857
  /** @public @react */
2798
- export declare function StylePanelGeoShapePicker(): JSX_2.Element | null;
2858
+ export declare function StylePanelGeoShapePicker(): JSX.Element | null;
2799
2859
 
2800
2860
  /** @public @react */
2801
- export declare function StylePanelLabelAlignPicker(): JSX_2.Element | null;
2861
+ export declare function StylePanelLabelAlignPicker(): JSX.Element | null;
2802
2862
 
2803
2863
  /** @public @react */
2804
- export declare function StylePanelOpacityPicker(): JSX_2.Element | null;
2864
+ export declare function StylePanelOpacityPicker(): JSX.Element | null;
2805
2865
 
2806
2866
  /** @public @react */
2807
- export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX_2.Element;
2867
+ export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX.Element;
2808
2868
 
2809
2869
  /** @public */
2810
2870
  export declare interface StylePanelSectionProps {
@@ -2812,13 +2872,13 @@ export declare interface StylePanelSectionProps {
2812
2872
  }
2813
2873
 
2814
2874
  /** @public @react */
2815
- export declare function StylePanelSizePicker(): JSX_2.Element | null;
2875
+ export declare function StylePanelSizePicker(): JSX.Element | null;
2816
2876
 
2817
2877
  /** @public @react */
2818
- export declare function StylePanelSplinePicker(): JSX_2.Element | null;
2878
+ export declare function StylePanelSplinePicker(): JSX.Element | null;
2819
2879
 
2820
2880
  /** @public @react */
2821
- export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX_2.Element;
2881
+ export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX.Element;
2822
2882
 
2823
2883
  /** @public */
2824
2884
  export declare interface StylePanelSubheadingProps {
@@ -2826,7 +2886,7 @@ export declare interface StylePanelSubheadingProps {
2826
2886
  }
2827
2887
 
2828
2888
  /** @public @react */
2829
- export declare function StylePanelTextAlignPicker(): JSX_2.Element | null;
2889
+ export declare function StylePanelTextAlignPicker(): JSX.Element | null;
2830
2890
 
2831
2891
  /** @public */
2832
2892
  export declare type StyleValuesForUi<T> = readonly {
@@ -2862,15 +2922,12 @@ export declare interface TextAreaProps {
2862
2922
  hasCustomTabBehavior?: boolean;
2863
2923
  }
2864
2924
 
2865
- /**
2866
- * @public
2867
- */
2868
- export declare const TextDirection: Extension<any, any>;
2869
-
2870
2925
  /** @public */
2871
2926
  export declare interface TextShapeOptions {
2872
2927
  /** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
2873
2928
  extraArrowHorizontalPadding: number;
2929
+ /** Whether to show the outline of the text shape (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
2930
+ showTextOutline: boolean;
2874
2931
  }
2875
2932
 
2876
2933
  /** @public */
@@ -2897,9 +2954,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
2897
2954
  getText(shape: TLTextShape): string;
2898
2955
  canEdit(): boolean;
2899
2956
  isAspectRatioLocked(): boolean;
2900
- component(shape: TLTextShape): JSX_2.Element;
2901
- indicator(shape: TLTextShape): JSX_2.Element | null;
2902
- 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;
2903
2960
  onResize(shape: TLTextShape, info: TLResizeInfo<TLTextShape>): {
2904
2961
  id: TLShapeId;
2905
2962
  props: {
@@ -2945,7 +3002,7 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
2945
3002
  }
2946
3003
 
2947
3004
  /** @public @react */
2948
- export declare function TextToolbarItem(): JSX_2.Element;
3005
+ export declare function TextToolbarItem(): JSX.Element;
2949
3006
 
2950
3007
  /**
2951
3008
  * Default extensions for the TipTap editor.
@@ -3045,13 +3102,13 @@ export declare interface TLDefaultFonts {
3045
3102
  }
3046
3103
 
3047
3104
  /** @public @react */
3048
- export declare function Tldraw(props: TldrawProps): JSX_2.Element;
3105
+ export declare function Tldraw(props: TldrawProps): JSX.Element;
3049
3106
 
3050
3107
  /** @public */
3051
3108
  export declare const TLDRAW_FILE_EXTENSION: ".tldr";
3052
3109
 
3053
3110
  /** @public @react */
3054
- export declare function TldrawArrowHints(): JSX_2.Element | null;
3111
+ export declare function TldrawArrowHints(): JSX.Element | null;
3055
3112
 
3056
3113
  /** @public */
3057
3114
  export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps {
@@ -3073,7 +3130,7 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
3073
3130
  }
3074
3131
 
3075
3132
  /** @public @react */
3076
- export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX_2.Element;
3133
+ export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX.Element;
3077
3134
 
3078
3135
  /** @public */
3079
3136
  export declare interface TldrawCropHandlesProps {
@@ -3109,7 +3166,7 @@ export declare type TldrawFileParseError = {
3109
3166
  };
3110
3167
 
3111
3168
  /** @public @react */
3112
- export declare function TldrawHandles({ children }: TLHandlesProps): JSX_2.Element | null;
3169
+ export declare function TldrawHandles({ children }: TLHandlesProps): JSX.Element | null;
3113
3170
 
3114
3171
  /**
3115
3172
  * A rendered SVG image of a Tldraw snapshot.
@@ -3168,19 +3225,19 @@ export declare interface TldrawImageProps extends TLImageExportOptions {
3168
3225
  }
3169
3226
 
3170
3227
  /** @public @react */
3171
- export declare function TldrawOverlays(): JSX_2.Element | null;
3228
+ export declare function TldrawOverlays(): JSX.Element | null;
3172
3229
 
3173
3230
  /** @public */
3174
3231
  export declare type TldrawProps = TldrawBaseProps & TldrawEditorStoreProps;
3175
3232
 
3176
3233
  /** @public @react */
3177
- 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;
3178
3235
 
3179
3236
  /** @public */
3180
3237
  export declare const TldrawSelectionForeground: NamedExoticComponent<TLSelectionForegroundProps>;
3181
3238
 
3182
3239
  /** @public @react */
3183
- export declare function TldrawShapeIndicators(): JSX_2.Element;
3240
+ export declare function TldrawShapeIndicators(): JSX.Element;
3184
3241
 
3185
3242
  /**
3186
3243
  * @public
@@ -3189,19 +3246,19 @@ export declare function TldrawShapeIndicators(): JSX_2.Element;
3189
3246
  export declare const TldrawUi: React_3.NamedExoticComponent<TldrawUiProps>;
3190
3247
 
3191
3248
  /** @public @react */
3192
- export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX_2.Element;
3249
+ export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX.Element;
3193
3250
 
3194
3251
  /** @public @react */
3195
3252
  export declare const TldrawUiButton: React_2.ForwardRefExoticComponent<TLUiButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
3196
3253
 
3197
3254
  /** @public @react */
3198
- export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps): JSX_2.Element;
3255
+ export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps): JSX.Element;
3199
3256
 
3200
3257
  /** @public @react */
3201
- export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps): JSX_2.Element;
3258
+ export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps): JSX.Element;
3202
3259
 
3203
3260
  /** @public @react */
3204
- export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX_2.Element;
3261
+ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX.Element;
3205
3262
 
3206
3263
  /**
3207
3264
  * A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
@@ -3211,7 +3268,7 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
3211
3268
  export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
3212
3269
 
3213
3270
  /** @public @react */
3214
- export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX_2.Element;
3271
+ export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX.Element;
3215
3272
 
3216
3273
  /** @public @react */
3217
3274
  export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextProviderProps>;
@@ -3222,55 +3279,55 @@ export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextPr
3222
3279
  *
3223
3280
  * @public @react
3224
3281
  */
3225
- 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;
3226
3283
 
3227
3284
  /** @public @react */
3228
- export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX_2.Element;
3285
+ export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX.Element;
3229
3286
 
3230
3287
  /** @public @react */
3231
- export declare function TldrawUiDialogCloseButton(): JSX_2.Element;
3288
+ export declare function TldrawUiDialogCloseButton(): JSX.Element;
3232
3289
 
3233
3290
  /** @public @react */
3234
- export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps): JSX_2.Element;
3291
+ export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps): JSX.Element;
3235
3292
 
3236
3293
  /** @public @react */
3237
- export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps): JSX_2.Element;
3294
+ export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps): JSX.Element;
3238
3295
 
3239
3296
  /** @public @react */
3240
- export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps): JSX_2.Element;
3297
+ export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps): JSX.Element;
3241
3298
 
3242
3299
  /** @public @react */
3243
- export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps): JSX_2.Element;
3300
+ export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps): JSX.Element;
3244
3301
 
3245
3302
  /** @public @react */
3246
- export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX_2.Element;
3303
+ export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX.Element;
3247
3304
 
3248
3305
  /** @public @react */
3249
- 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;
3250
3307
 
3251
3308
  /** @public @react */
3252
- export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX_2.Element;
3309
+ export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX.Element;
3253
3310
 
3254
3311
  /** @public @react */
3255
- export declare function TldrawUiDropdownMenuIndicator(): JSX_2.Element;
3312
+ export declare function TldrawUiDropdownMenuIndicator(): JSX.Element;
3256
3313
 
3257
3314
  /** @public @react */
3258
- export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX_2.Element;
3315
+ export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX.Element;
3259
3316
 
3260
3317
  /** @public @react */
3261
- export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX_2.Element;
3318
+ export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX.Element;
3262
3319
 
3263
3320
  /** @public @react */
3264
- export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX_2.Element;
3321
+ export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX.Element;
3265
3322
 
3266
3323
  /** @public @react */
3267
- export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX_2.Element;
3324
+ export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
3268
3325
 
3269
3326
  /** @public @react */
3270
- export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX_2.Element;
3327
+ export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX.Element;
3271
3328
 
3272
3329
  /** @public @react */
3273
- export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX_2.Element;
3330
+ export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX.Element;
3274
3331
 
3275
3332
  /**
3276
3333
  * A tight grid 4 elements wide, usually of UI controls like buttons, select dropdown, checkboxes,
@@ -3283,37 +3340,37 @@ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & R
3283
3340
  export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
3284
3341
 
3285
3342
  /** @public @react */
3286
- export declare function TldrawUiInFrontOfTheCanvas(): JSX_2.Element;
3343
+ export declare function TldrawUiInFrontOfTheCanvas(): JSX.Element;
3287
3344
 
3288
3345
  /** @public @react */
3289
3346
  export declare const TldrawUiInput: React_2.ForwardRefExoticComponent<TLUiInputProps & React_2.RefAttributes<HTMLInputElement>>;
3290
3347
 
3291
3348
  /** @public @react */
3292
- export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps): JSX_2.Element | null;
3349
+ export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps): JSX.Element | null;
3293
3350
 
3294
3351
  /** @public @react */
3295
- export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps): JSX_2.Element | null;
3352
+ export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps): JSX.Element | null;
3296
3353
 
3297
3354
  /** @public @react */
3298
- export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX_2.Element | null;
3355
+ export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX.Element | null;
3299
3356
 
3300
3357
  /** @public @react */
3301
- 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;
3302
3359
 
3303
3360
  /** @public @react */
3304
- export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX_2.Element;
3361
+ export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX.Element;
3305
3362
 
3306
3363
  /** @public @react */
3307
- 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;
3308
3365
 
3309
3366
  /** @public @react */
3310
- 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;
3311
3368
 
3312
3369
  /** @public @react */
3313
- 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;
3314
3371
 
3315
3372
  /** @public @react */
3316
- export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX_2.Element | null;
3373
+ export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX.Element | null;
3317
3374
 
3318
3375
  /** @public */
3319
3376
  export declare interface TldrawUiOrientationContext {
@@ -3322,7 +3379,7 @@ export declare interface TldrawUiOrientationContext {
3322
3379
  }
3323
3380
 
3324
3381
  /** @public @react */
3325
- export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX_2.Element;
3382
+ export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX.Element;
3326
3383
 
3327
3384
  /** @public */
3328
3385
  export declare interface TldrawUiOrientationProviderProps {
@@ -3332,13 +3389,13 @@ export declare interface TldrawUiOrientationProviderProps {
3332
3389
  }
3333
3390
 
3334
3391
  /** @public @react */
3335
- 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;
3336
3393
 
3337
3394
  /** @public @react */
3338
- 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;
3339
3396
 
3340
3397
  /** @public @react */
3341
- export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX_2.Element;
3398
+ export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX.Element;
3342
3399
 
3343
3400
  /** @public */
3344
3401
  export declare interface TldrawUiProps extends TLUiContextProviderProps {
@@ -3373,7 +3430,7 @@ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & Re
3373
3430
  export declare const TldrawUiSlider: React_3.ForwardRefExoticComponent<TLUiSliderProps & React_3.RefAttributes<HTMLDivElement>>;
3374
3431
 
3375
3432
  /** @public @react */
3376
- export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps): JSX_2.Element;
3433
+ export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps): JSX.Element;
3377
3434
 
3378
3435
  /** @public @react */
3379
3436
  export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiToolbarProps & React_3.RefAttributes<HTMLDivElement>>;
@@ -3382,10 +3439,10 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
3382
3439
  export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
3383
3440
 
3384
3441
  /** @public @react */
3385
- 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;
3386
3443
 
3387
3444
  /** @public @react */
3388
- 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;
3389
3446
 
3390
3447
  /** @public @react */
3391
3448
  export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
@@ -3402,7 +3459,7 @@ export declare interface TldrawUiTooltipProps {
3402
3459
  }
3403
3460
 
3404
3461
  /** @public @react */
3405
- export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX_2.Element;
3462
+ export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX.Element;
3406
3463
 
3407
3464
  /** @public */
3408
3465
  export declare interface TldrawUiTooltipProviderProps {
@@ -4437,43 +4494,43 @@ export declare interface TLUiZoomMenuProps {
4437
4494
  /* Excluded from this release type: TLV1VideoShape */
4438
4495
 
4439
4496
  /** @public @react */
4440
- export declare function ToggleAutoSizeMenuItem(): JSX_2.Element | null;
4497
+ export declare function ToggleAutoSizeMenuItem(): JSX.Element | null;
4441
4498
 
4442
4499
  /** @public @react */
4443
- export declare function ToggleDebugModeItem(): JSX_2.Element;
4500
+ export declare function ToggleDebugModeItem(): JSX.Element;
4444
4501
 
4445
4502
  /** @public @react */
4446
- export declare function ToggleDynamicSizeModeItem(): JSX_2.Element;
4503
+ export declare function ToggleDynamicSizeModeItem(): JSX.Element;
4447
4504
 
4448
4505
  /** @public @react */
4449
- export declare function ToggleEdgeScrollingItem(): JSX_2.Element;
4506
+ export declare function ToggleEdgeScrollingItem(): JSX.Element;
4450
4507
 
4451
4508
  /** @public @react */
4452
- export declare function ToggleEnhancedA11yModeItem(): JSX_2.Element;
4509
+ export declare function ToggleEnhancedA11yModeItem(): JSX.Element;
4453
4510
 
4454
4511
  /** @public @react */
4455
- export declare function ToggleFocusModeItem(): JSX_2.Element;
4512
+ export declare function ToggleFocusModeItem(): JSX.Element;
4456
4513
 
4457
4514
  /** @public @react */
4458
- export declare function ToggleGridItem(): JSX_2.Element;
4515
+ export declare function ToggleGridItem(): JSX.Element;
4459
4516
 
4460
4517
  /** @public @react */
4461
- export declare function ToggleKeyboardShortcutsItem(): JSX_2.Element;
4518
+ export declare function ToggleKeyboardShortcutsItem(): JSX.Element;
4462
4519
 
4463
4520
  /** @public @react */
4464
- export declare function ToggleLockMenuItem(): JSX_2.Element | null;
4521
+ export declare function ToggleLockMenuItem(): JSX.Element | null;
4465
4522
 
4466
4523
  /** @public @react */
4467
- export declare function TogglePasteAtCursorItem(): JSX_2.Element;
4524
+ export declare function TogglePasteAtCursorItem(): JSX.Element;
4468
4525
 
4469
4526
  /** @public @react */
4470
- export declare function ToggleReduceMotionItem(): JSX_2.Element;
4527
+ export declare function ToggleReduceMotionItem(): JSX.Element;
4471
4528
 
4472
4529
  /** @public @react */
4473
- export declare function ToggleSnapModeItem(): JSX_2.Element;
4530
+ export declare function ToggleSnapModeItem(): JSX.Element;
4474
4531
 
4475
4532
  /** @public @react */
4476
- export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX_2.Element | null;
4533
+ export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX.Element | null;
4477
4534
 
4478
4535
  /** @public */
4479
4536
  export declare interface ToggleToolLockedButtonProps {
@@ -4481,16 +4538,16 @@ export declare interface ToggleToolLockedButtonProps {
4481
4538
  }
4482
4539
 
4483
4540
  /** @public @react */
4484
- export declare function ToggleToolLockItem(): JSX_2.Element;
4541
+ export declare function ToggleToolLockItem(): JSX.Element;
4485
4542
 
4486
4543
  /** @public @react */
4487
- export declare function ToggleTransparentBgMenuItem(): JSX_2.Element;
4544
+ export declare function ToggleTransparentBgMenuItem(): JSX.Element;
4488
4545
 
4489
4546
  /** @public @react */
4490
- export declare function ToggleWrapModeItem(): JSX_2.Element;
4547
+ export declare function ToggleWrapModeItem(): JSX.Element;
4491
4548
 
4492
4549
  /** @public @react */
4493
- export declare function ToolbarItem({ tool }: ToolbarItemProps): JSX_2.Element;
4550
+ export declare function ToolbarItem({ tool }: ToolbarItemProps): JSX.Element;
4494
4551
 
4495
4552
  /** @public */
4496
4553
  export declare interface ToolbarItemProps {
@@ -4498,22 +4555,22 @@ export declare interface ToolbarItemProps {
4498
4555
  }
4499
4556
 
4500
4557
  /** @public @react */
4501
- export declare function TrapezoidToolbarItem(): JSX_2.Element;
4558
+ export declare function TrapezoidToolbarItem(): JSX.Element;
4502
4559
 
4503
4560
  /** @public @react */
4504
- export declare function TriangleToolbarItem(): JSX_2.Element;
4561
+ export declare function TriangleToolbarItem(): JSX.Element;
4505
4562
 
4506
4563
  /** @public */
4507
4564
  export declare const truncateStringWithEllipsis: (str: string, maxLength: number) => string;
4508
4565
 
4509
4566
  /** @public @react */
4510
- export declare function UndoRedoGroup(): JSX_2.Element;
4567
+ export declare function UndoRedoGroup(): JSX.Element;
4511
4568
 
4512
4569
  /** @public @react */
4513
- export declare function UngroupMenuItem(): JSX_2.Element | null;
4570
+ export declare function UngroupMenuItem(): JSX.Element | null;
4514
4571
 
4515
4572
  /** @public @react */
4516
- export declare function UnlockAllMenuItem(): JSX_2.Element;
4573
+ export declare function UnlockAllMenuItem(): JSX.Element;
4517
4574
 
4518
4575
  /** @public */
4519
4576
  export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?: string): string | undefined;
@@ -4639,7 +4696,7 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractSh
4639
4696
  isEditing: boolean;
4640
4697
  isEmpty: boolean;
4641
4698
  isReadyForEditing: boolean;
4642
- rInput: React_3.RefObject<HTMLTextAreaElement>;
4699
+ rInput: React_3.RefObject<HTMLTextAreaElement | null>;
4643
4700
  };
4644
4701
 
4645
4702
  /** @public */
@@ -4660,7 +4717,7 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractSha
4660
4717
  isEditing: boolean;
4661
4718
  isEmpty: boolean | undefined;
4662
4719
  isReadyForEditing: boolean;
4663
- rInput: RefObject<HTMLDivElement>;
4720
+ rInput: RefObject<HTMLDivElement | null>;
4664
4721
  };
4665
4722
 
4666
4723
  /** @public */
@@ -4798,25 +4855,25 @@ export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
4798
4855
  isAspectRatioLocked(): boolean;
4799
4856
  getDefaultProps(): TLVideoShape['props'];
4800
4857
  getAriaDescriptor(shape: TLVideoShape): string;
4801
- component(shape: TLVideoShape): JSX_2.Element;
4802
- indicator(shape: TLVideoShape): JSX_2.Element;
4803
- 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>;
4804
4861
  }
4805
4862
 
4806
4863
  /** @public @react */
4807
- export declare function ViewSubmenu(): JSX_2.Element;
4864
+ export declare function ViewSubmenu(): JSX.Element;
4808
4865
 
4809
4866
  /** @public @react */
4810
- export declare function XBoxToolbarItem(): JSX_2.Element;
4867
+ export declare function XBoxToolbarItem(): JSX.Element;
4811
4868
 
4812
4869
  /** @public @react */
4813
- export declare function ZoomOrRotateMenuItem(): JSX_2.Element;
4870
+ export declare function ZoomOrRotateMenuItem(): JSX.Element;
4814
4871
 
4815
4872
  /** @public @react */
4816
- export declare function ZoomTo100MenuItem(): JSX_2.Element;
4873
+ export declare function ZoomTo100MenuItem(): JSX.Element;
4817
4874
 
4818
4875
  /** @public @react */
4819
- export declare function ZoomToFitMenuItem(): JSX_2.Element;
4876
+ export declare function ZoomToFitMenuItem(): JSX.Element;
4820
4877
 
4821
4878
  /** @public */
4822
4879
  export declare class ZoomTool extends StateNode {
@@ -4839,7 +4896,7 @@ export declare class ZoomTool extends StateNode {
4839
4896
  }
4840
4897
 
4841
4898
  /** @public @react */
4842
- export declare function ZoomToSelectionMenuItem(): JSX_2.Element;
4899
+ export declare function ZoomToSelectionMenuItem(): JSX.Element;
4843
4900
 
4844
4901
 
4845
4902
  export * from "@tldraw/editor";