tldraw 3.15.0 → 3.16.0-canary.03deb7f8fe34

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 (374) hide show
  1. package/dist-cjs/index.d.ts +271 -9
  2. package/dist-cjs/index.js +28 -2
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
  5. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  6. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  7. package/dist-cjs/lib/defaultExternalContentHandlers.js +1 -0
  8. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  9. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +25 -39
  10. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +16 -4
  12. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
  13. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  14. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  15. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  16. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  17. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +3 -0
  18. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  19. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -3
  20. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  21. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  22. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  23. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +12 -12
  24. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  25. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  26. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  27. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +2 -2
  28. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  29. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  30. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  31. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -1
  32. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  33. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +3 -3
  34. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +1 -1
  35. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +20 -2
  36. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  37. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +4 -4
  38. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  39. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  40. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  41. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  42. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +10 -1
  43. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  44. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +2 -2
  45. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  47. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  48. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  49. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  50. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  51. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  52. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +43 -22
  53. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  54. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +2 -15
  55. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  56. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +5 -0
  57. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  58. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +8 -0
  59. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  60. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +8 -0
  61. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  62. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +8 -0
  63. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  64. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  65. package/dist-cjs/lib/ui/TldrawUi.js +14 -0
  66. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  67. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +35 -0
  68. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +7 -0
  69. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  70. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  71. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  72. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  73. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +40 -0
  74. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
  75. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +3 -3
  76. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  77. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  78. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  79. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  80. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  81. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +1 -1
  82. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  83. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +2 -1
  84. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  85. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  86. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  87. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  88. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  89. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +2 -0
  90. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  91. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +171 -140
  92. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  93. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +3 -3
  94. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +2 -2
  95. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +26 -25
  96. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +3 -3
  97. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +1 -1
  98. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  99. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  100. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  101. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  102. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  103. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +5 -4
  104. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  105. package/dist-cjs/lib/ui/components/menu-items.js +6 -0
  106. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  107. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +5 -16
  108. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +3 -3
  109. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
  110. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  111. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  112. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  113. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +1 -0
  114. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  115. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +30 -7
  116. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  117. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +268 -0
  118. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +7 -0
  119. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  120. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  121. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  122. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  123. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  124. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +153 -20
  125. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  126. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +3 -2
  127. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  128. package/dist-cjs/lib/ui/context/actions.js +29 -7
  129. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  130. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  131. package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
  132. package/dist-cjs/lib/ui/hooks/useTools.js +94 -9
  133. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  134. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  135. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +7 -0
  136. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  137. package/dist-cjs/lib/ui/kbd-utils.js +2 -1
  138. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  139. package/dist-cjs/lib/ui/version.js +3 -3
  140. package/dist-cjs/lib/ui/version.js.map +1 -1
  141. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +1 -1
  142. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  143. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +3 -2
  144. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  145. package/dist-esm/index.d.mts +271 -9
  146. package/dist-esm/index.mjs +44 -3
  147. package/dist-esm/index.mjs.map +2 -2
  148. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
  149. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  150. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  151. package/dist-esm/lib/defaultExternalContentHandlers.mjs +1 -0
  152. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  153. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +28 -39
  154. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  155. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +19 -5
  156. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
  157. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  158. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  159. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  160. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  161. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +3 -0
  162. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  163. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -3
  164. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  165. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  166. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  167. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +13 -12
  168. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  169. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  170. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  171. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +3 -2
  172. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  173. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  174. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  175. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -1
  176. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  177. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +3 -3
  178. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +1 -1
  179. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +21 -2
  180. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  181. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -4
  182. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  183. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  184. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  185. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  186. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +10 -1
  187. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  188. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +3 -2
  189. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  190. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  191. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  192. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  193. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  194. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  195. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  196. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +43 -22
  197. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  198. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +2 -15
  199. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  200. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +5 -0
  201. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  202. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +8 -0
  203. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  204. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +8 -0
  205. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  206. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +8 -0
  207. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  208. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  209. package/dist-esm/lib/ui/TldrawUi.mjs +16 -2
  210. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  211. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +19 -0
  212. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +7 -0
  213. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  214. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  215. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  216. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  217. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +40 -0
  218. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
  219. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -5
  220. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  221. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  222. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  223. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  224. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  225. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +1 -1
  226. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  227. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +2 -1
  228. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  229. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  230. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  231. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  232. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  233. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +3 -1
  234. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  235. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +171 -140
  236. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  237. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +3 -3
  238. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +2 -2
  239. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +26 -25
  240. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +2 -2
  241. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +1 -1
  242. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  243. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  244. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  245. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  246. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  247. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +5 -4
  248. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  249. package/dist-esm/lib/ui/components/menu-items.mjs +6 -0
  250. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  251. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +6 -6
  252. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +2 -2
  253. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +1 -1
  254. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  255. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  256. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  257. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +1 -0
  258. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  259. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +30 -7
  260. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  261. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +245 -0
  262. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +7 -0
  263. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  264. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  265. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  266. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  267. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  268. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +161 -22
  269. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  270. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +3 -2
  271. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  272. package/dist-esm/lib/ui/context/actions.mjs +29 -7
  273. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  274. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  275. package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
  276. package/dist-esm/lib/ui/hooks/useTools.mjs +102 -10
  277. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  278. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +7 -0
  279. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  280. package/dist-esm/lib/ui/kbd-utils.mjs +2 -1
  281. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  282. package/dist-esm/lib/ui/version.mjs +3 -3
  283. package/dist-esm/lib/ui/version.mjs.map +1 -1
  284. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +1 -1
  285. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  286. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +3 -2
  287. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  288. package/package.json +3 -3
  289. package/src/index.ts +32 -1
  290. package/src/lib/canvas/TldrawCropHandles.tsx +2 -0
  291. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  292. package/src/lib/defaultExternalContentHandlers.ts +2 -1
  293. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +5 -5
  294. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +29 -42
  295. package/src/lib/shapes/arrow/arrowLabel.ts +23 -3
  296. package/src/lib/shapes/arrow/arrowTargetState.ts +2 -1
  297. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  298. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +3 -0
  299. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -3
  300. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  301. package/src/lib/shapes/frame/FrameShapeUtil.tsx +21 -14
  302. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  303. package/src/lib/shapes/geo/GeoShapeUtil.tsx +3 -2
  304. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  305. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -1
  306. package/src/lib/shapes/image/ImageShapeUtil.tsx +3 -3
  307. package/src/lib/shapes/line/LineShapeUtil.tsx +25 -3
  308. package/src/lib/shapes/note/NoteShapeUtil.tsx +9 -4
  309. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  310. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  311. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +11 -1
  312. package/src/lib/shapes/text/TextShapeUtil.tsx +3 -2
  313. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  314. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  315. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  316. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +54 -30
  317. package/src/lib/tools/SelectTool/childStates/Idle.ts +2 -24
  318. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +7 -0
  319. package/src/lib/tools/SelectTool/childStates/Resizing.ts +12 -1
  320. package/src/lib/tools/SelectTool/childStates/Rotating.ts +11 -0
  321. package/src/lib/tools/SelectTool/childStates/Translating.ts +11 -1
  322. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -0
  323. package/src/lib/ui/TldrawUi.tsx +17 -2
  324. package/src/lib/ui/components/AccessibilityMenu.tsx +20 -0
  325. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  326. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  327. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +32 -0
  328. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -4
  329. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  330. package/src/lib/ui/components/MobileStylePanel.tsx +9 -6
  331. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +1 -1
  332. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +3 -2
  333. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +4 -3
  334. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  335. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +3 -1
  336. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +146 -107
  337. package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +3 -3
  338. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +7 -6
  339. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +1 -1
  340. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  341. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  342. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +17 -12
  343. package/src/lib/ui/components/menu-items.tsx +8 -0
  344. package/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx +40 -37
  345. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +1 -1
  346. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  347. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +1 -0
  348. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +51 -12
  349. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +327 -0
  350. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  351. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  352. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  353. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +220 -19
  354. package/src/lib/ui/context/TldrawUiContextProvider.tsx +23 -20
  355. package/src/lib/ui/context/actions.tsx +29 -7
  356. package/src/lib/ui/context/events.tsx +4 -2
  357. package/src/lib/ui/hooks/menu-hooks.ts +1 -0
  358. package/src/lib/ui/hooks/useTools.tsx +140 -10
  359. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +7 -0
  360. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +7 -0
  361. package/src/lib/ui/kbd-utils.ts +2 -1
  362. package/src/lib/ui/version.ts +3 -3
  363. package/src/lib/ui.css +406 -292
  364. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +16 -2
  365. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +1 -1
  366. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +24 -3
  367. package/src/lib/utils/tldr/buildFromV1Document.ts +2 -1
  368. package/src/test/EraserTool.test.ts +176 -6
  369. package/src/test/SelectTool.test.ts +37 -11
  370. package/src/test/arrows-megabus.test.tsx +12 -6
  371. package/src/test/commands/deletePage.test.ts +84 -1
  372. package/src/test/inner-outer-margin.test.ts +315 -0
  373. package/src/test/shapeutils.test.ts +394 -45
  374. package/tldraw.css +703 -603
@@ -13,11 +13,13 @@ import { CSSProperties } from 'react';
13
13
  import { Editor } from '@tldraw/editor';
14
14
  import { Extension } from '@tiptap/core';
15
15
  import { Extensions } from '@tiptap/core';
16
+ import { ForwardRefExoticComponent } from 'react';
16
17
  import { Geometry2d } from '@tldraw/editor';
17
18
  import { Geometry2dFilters } from '@tldraw/editor';
18
19
  import { Geometry2dOptions } from '@tldraw/editor';
19
20
  import { Group2d } from '@tldraw/editor';
20
21
  import { HandleSnapGeometry } from '@tldraw/editor';
22
+ import { HTMLAttributes } from 'react';
21
23
  import { IndexKey } from '@tldraw/editor';
22
24
  import { JsonObject } from '@tldraw/editor';
23
25
  import { JSX as JSX_2 } from 'react/jsx-runtime';
@@ -37,6 +39,7 @@ import { ReadonlySharedStyleMap } from '@tldraw/editor';
37
39
  import { RecordProps } from '@tldraw/editor';
38
40
  import { Rectangle2d } from '@tldraw/editor';
39
41
  import { RecursivePartial } from '@tldraw/editor';
42
+ import { RefAttributes } from 'react';
40
43
  import { RefObject } from 'react';
41
44
  import { Result } from '@tldraw/editor';
42
45
  import { RichTextFontVisitorState } from '@tldraw/editor';
@@ -148,6 +151,9 @@ export declare interface A11yProviderProps {
148
151
  children: React.ReactNode;
149
152
  }
150
153
 
154
+ /** @public @react */
155
+ export declare function AccessibilityMenu(): JSX_2.Element;
156
+
151
157
  /** @public */
152
158
  export declare interface ActionsProviderProps {
153
159
  overrides?(editor: Editor, actions: TLUiActionsContextType, helpers: TLUiOverrideHelpers): TLUiActionsContextType;
@@ -354,7 +360,6 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
354
360
  component(shape: TLArrowShape): JSX_2.Element | null;
355
361
  indicator(shape: TLArrowShape): JSX_2.Element | null;
356
362
  onEditStart(shape: TLArrowShape): void;
357
- onEditEnd(shape: TLArrowShape): void;
358
363
  toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element;
359
364
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
360
365
  getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
@@ -1012,6 +1017,11 @@ export declare function DefaultToolbarContent(): JSX_2.Element;
1012
1017
  /** @public */
1013
1018
  export declare interface DefaultToolbarProps {
1014
1019
  children?: ReactNode;
1020
+ orientation?: 'horizontal' | 'vertical';
1021
+ minItems?: number;
1022
+ minSizePx?: number;
1023
+ maxItems?: number;
1024
+ maxSizePx?: number;
1015
1025
  }
1016
1026
 
1017
1027
  /** @public */
@@ -1740,6 +1750,9 @@ export declare function getArrowTerminalsInArrowSpace(editor: Editor, shape: TLA
1740
1750
  start: Vec;
1741
1751
  };
1742
1752
 
1753
+ /** @public */
1754
+ export declare function getAssetInfo(file: File, options: TLDefaultExternalContentHandlerOpts, assetId?: TLAssetId): Promise<TLImageAsset | TLVideoAsset>;
1755
+
1743
1756
  /** @public */
1744
1757
  export declare function getCropBox<T extends ShapeWithCrop>(shape: T, info: TLCropInfo<T>, opts?: CropBoxOptions): {
1745
1758
  id: TLShapeId;
@@ -1761,9 +1774,35 @@ export declare function getDefaultCrop(): TLShapeCrop;
1761
1774
  */
1762
1775
  export declare function getEmbedInfo(definitions: readonly TLEmbedDefinition[], inputUrl: string): TLEmbedResult;
1763
1776
 
1777
+ /** @public */
1778
+ export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels?: boolean): TLShape | undefined;
1779
+
1764
1780
  /** @public */
1765
1781
  export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
1766
1782
 
1783
+ /**
1784
+ * ## getStrokePoints
1785
+ *
1786
+ * Get an array of points as objects with an adjusted point, pressure, vector, distance, and
1787
+ * runningLength.
1788
+ *
1789
+ * @param points - An array of points (as `[x, y, pressure]` or `{x, y, pressure}`). Pressure is
1790
+ * optional in both cases.
1791
+ * @param options - An object with options.
1792
+ * @public
1793
+ */
1794
+ export declare function getStrokePoints(rawInputPoints: VecLike[], options?: StrokeOptions): StrokePoint[];
1795
+
1796
+ /**
1797
+ * Turn an array of stroke points into a path of quadradic curves.
1798
+ *
1799
+ * @param points - The stroke points returned from perfect-freehand
1800
+ * @param closed - Whether the shape is closed
1801
+ *
1802
+ * @public
1803
+ */
1804
+ export declare function getSvgPathFromStrokePoints(points: StrokePoint[], closed?: boolean): string;
1805
+
1767
1806
  /**
1768
1807
  * Original (uncropped) width and height of shape.
1769
1808
  *
@@ -1954,6 +1993,34 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
1954
1993
  typeName: "shape";
1955
1994
  x: number;
1956
1995
  y: number;
1996
+ };
1997
+ onHandleDragStart(shape: TLLineShape, { handle }: TLHandleDragInfo<TLLineShape>): {
1998
+ id: TLShapeId;
1999
+ index: IndexKey;
2000
+ isLocked: boolean;
2001
+ meta: JsonObject;
2002
+ opacity: TLOpacityType;
2003
+ parentId: TLParentId;
2004
+ props: {
2005
+ color: TLDefaultColorStyle;
2006
+ dash: TLDefaultDashStyle;
2007
+ points: {
2008
+ [x: string]: {
2009
+ id: IndexKey;
2010
+ index: IndexKey;
2011
+ x: number;
2012
+ y: number;
2013
+ } | TLLineShapePoint;
2014
+ };
2015
+ scale: number;
2016
+ size: TLDefaultSizeStyle;
2017
+ spline: TLLineShapeSplineStyle;
2018
+ };
2019
+ rotation: number;
2020
+ type: "line";
2021
+ typeName: "shape";
2022
+ x: number;
2023
+ y: number;
1957
2024
  } | undefined;
1958
2025
  component(shape: TLLineShape): JSX_2.Element;
1959
2026
  indicator(shape: TLLineShape): JSX_2.Element;
@@ -1967,6 +2034,9 @@ export declare function LineToolbarItem(): JSX_2.Element;
1967
2034
 
1968
2035
  /* Excluded from this release type: LineToPathBuilderCommand */
1969
2036
 
2037
+ /** @public @react */
2038
+ export declare function LockGroup(): JSX_2.Element;
2039
+
1970
2040
  /** @public @react */
1971
2041
  export declare function MiscMenuGroup(): JSX_2.Element;
1972
2042
 
@@ -2081,6 +2151,29 @@ export declare function NoteToolbarItem(): JSX_2.Element;
2081
2151
  /** @public @react */
2082
2152
  export declare function OfflineIndicator(): JSX_2.Element;
2083
2153
 
2154
+ /**
2155
+ * A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from
2156
+ * the toolbar.
2157
+ * @public
2158
+ */
2159
+ export declare function onDragFromToolbarToCreateShape(editor: Editor, info: TLPointerEventInfo, opts: OnDragFromToolbarToCreateShapesOpts): void;
2160
+
2161
+ /**
2162
+ * Options for {@link onDragFromToolbarToCreateShape}.
2163
+ * @public
2164
+ */
2165
+ export declare interface OnDragFromToolbarToCreateShapesOpts {
2166
+ /**
2167
+ * Create the shape being dragged. You don't need to worry about positioning it, as it'll be
2168
+ * immediately updated with the correct position.
2169
+ */
2170
+ createShape(id: TLShapeId): void;
2171
+ /**
2172
+ * Called once the drag interaction has finished.
2173
+ */
2174
+ onDragEnd?(id: TLShapeId): void;
2175
+ }
2176
+
2084
2177
  /** @public @react */
2085
2178
  export declare function OpacitySlider(): JSX_2.Element | null;
2086
2179
 
@@ -2088,11 +2181,17 @@ export declare function OpacitySlider(): JSX_2.Element | null;
2088
2181
  export declare function OvalToolbarItem(): JSX_2.Element;
2089
2182
 
2090
2183
  /** @public @react */
2091
- export declare function OverflowingToolbar({ children }: OverflowingToolbarProps): JSX_2.Element;
2184
+ export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX_2.Element;
2092
2185
 
2093
2186
  /** @public */
2094
2187
  export declare interface OverflowingToolbarProps {
2095
2188
  children: React.ReactNode;
2189
+ orientation: 'horizontal' | 'vertical';
2190
+ sizingParentClassName: string;
2191
+ minItems: number;
2192
+ minSizePx: number;
2193
+ maxItems: number;
2194
+ maxSizePx: number;
2096
2195
  }
2097
2196
 
2098
2197
  /** @public @react */
@@ -2481,6 +2580,54 @@ export declare function StarToolbarItem(): JSX_2.Element;
2481
2580
  /** @public */
2482
2581
  export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
2483
2582
 
2583
+ /**
2584
+ * The options object for `getStroke` or `getStrokePoints`.
2585
+ *
2586
+ * @public
2587
+ */
2588
+ export declare interface StrokeOptions {
2589
+ /** The base size (diameter) of the stroke. */
2590
+ size?: number;
2591
+ /** The effect of pressure on the stroke's size. */
2592
+ thinning?: number;
2593
+ /** How much to soften the stroke's edges. */
2594
+ smoothing?: number;
2595
+ streamline?: number;
2596
+ /** An easing function to apply to each point's pressure. */
2597
+ easing?(pressure: number): number;
2598
+ /** Whether to simulate pressure based on velocity. */
2599
+ simulatePressure?: boolean;
2600
+ /** Cap, taper and easing for the start of the line. */
2601
+ start?: {
2602
+ cap?: boolean;
2603
+ easing?(distance: number): number;
2604
+ taper?: boolean | number;
2605
+ };
2606
+ /** Cap, taper and easing for the end of the line. */
2607
+ end?: {
2608
+ cap?: boolean;
2609
+ easing?(distance: number): number;
2610
+ taper?: boolean | number;
2611
+ };
2612
+ /** Whether to handle the points as a completed stroke. */
2613
+ last?: boolean;
2614
+ }
2615
+
2616
+ /**
2617
+ * The points returned by `getStrokePoints`, and the input for `getStrokeOutlinePoints`
2618
+ *
2619
+ * @public
2620
+ */
2621
+ export declare interface StrokePoint {
2622
+ point: Vec;
2623
+ input: Vec;
2624
+ vector: Vec;
2625
+ pressure: number;
2626
+ distance: number;
2627
+ runningLength: number;
2628
+ radius: number;
2629
+ }
2630
+
2484
2631
  /** @public */
2485
2632
  export declare interface StylePickerSetProps {
2486
2633
  styles: ReadonlySharedStyleMap;
@@ -2745,6 +2892,17 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
2745
2892
  embeds?: TLEmbedDefinition[];
2746
2893
  }
2747
2894
 
2895
+ /** @public @react */
2896
+ export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX_2.Element;
2897
+
2898
+ /** @public */
2899
+ export declare interface TldrawCropHandlesProps {
2900
+ size: number;
2901
+ width: number;
2902
+ height: number;
2903
+ hideAlternateHandles: boolean;
2904
+ }
2905
+
2748
2906
  /** @public */
2749
2907
  export declare interface TldrawFile {
2750
2908
  tldrawFileFormatVersion: number;
@@ -2868,6 +3026,13 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
2868
3026
  /** @public */
2869
3027
  export declare const TldrawUiButtonPicker: <T extends string>(props: TLUiButtonPickerProps<T>) => ReactElement;
2870
3028
 
3029
+ /**
3030
+ * A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
3031
+ *
3032
+ * @public @react
3033
+ */
3034
+ export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
3035
+
2871
3036
  /** @public @react */
2872
3037
  export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX_2.Element;
2873
3038
 
@@ -2930,6 +3095,13 @@ export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiD
2930
3095
  /** @public @react */
2931
3096
  export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX_2.Element;
2932
3097
 
3098
+ /**
3099
+ * A tight grid 4 elements wide, usually of UI controls like buttons, select dropdown, checkboxes,
3100
+ * etc.
3101
+ *
3102
+ * @public @react */
3103
+ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
3104
+
2933
3105
  /** @public @react */
2934
3106
  export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
2935
3107
 
@@ -2955,7 +3127,7 @@ export declare function TldrawUiMenuContextProvider({ type, sourceId, children,
2955
3127
  export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): boolean | JSX_2.Element | Iterable<ReactNode> | null | number | string | undefined;
2956
3128
 
2957
3129
  /** @public @react */
2958
- export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX_2.Element | null;
3130
+ 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;
2959
3131
 
2960
3132
  /** @public @react */
2961
3133
  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;
@@ -2963,8 +3135,24 @@ export declare function TldrawUiMenuSubmenu<Translation extends string = string>
2963
3135
  /** @public @react */
2964
3136
  export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX_2.Element | null;
2965
3137
 
3138
+ /** @public */
3139
+ export declare interface TldrawUiOrientationContext {
3140
+ orientation: 'horizontal' | 'vertical';
3141
+ tooltipSide: 'bottom' | 'left' | 'right' | 'top';
3142
+ }
3143
+
3144
+ /** @public @react */
3145
+ export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX_2.Element;
3146
+
3147
+ /** @public */
3148
+ export declare interface TldrawUiOrientationProviderProps {
3149
+ children: ReactNode;
3150
+ orientation: 'horizontal' | 'vertical';
3151
+ tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
3152
+ }
3153
+
2966
3154
  /** @public @react */
2967
- export declare function TldrawUiPopover({ id, children, onOpenChange, open }: TLUiPopoverProps): JSX_2.Element;
3155
+ export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX_2.Element;
2968
3156
 
2969
3157
  /** @public @react */
2970
3158
  export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX_2.Element;
@@ -2994,6 +3182,13 @@ export declare interface TldrawUiProps extends TLUiContextProviderProps {
2994
3182
  assetUrls?: TLUiAssetUrlOverrides;
2995
3183
  }
2996
3184
 
3185
+ /**
3186
+ * A row, usually of UI controls like buttons, select dropdown, checkboxes, etc.
3187
+ *
3188
+ * @public @react
3189
+ */
3190
+ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
3191
+
2997
3192
  /** @public @react */
2998
3193
  export declare const TldrawUiSlider: React_3.ForwardRefExoticComponent<TLUiSliderProps & React_3.RefAttributes<HTMLDivElement>>;
2999
3194
 
@@ -3010,7 +3205,29 @@ export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TL
3010
3205
  export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
3011
3206
 
3012
3207
  /** @public @react */
3013
- export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
3208
+ export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
3209
+
3210
+ /** @public @react */
3211
+ export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
3212
+
3213
+ /** @public */
3214
+ export declare interface TldrawUiTooltipProps {
3215
+ children: React_3.ReactNode;
3216
+ content?: React_3.ReactNode | string;
3217
+ side?: 'bottom' | 'left' | 'right' | 'top';
3218
+ sideOffset?: number;
3219
+ disabled?: boolean;
3220
+ showOnMobile?: boolean;
3221
+ delayDuration?: number;
3222
+ }
3223
+
3224
+ /** @public @react */
3225
+ export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX_2.Element;
3226
+
3227
+ /** @public */
3228
+ export declare interface TldrawUiTooltipProviderProps {
3229
+ children: React_3.ReactNode;
3230
+ }
3014
3231
 
3015
3232
  /* Excluded from this release type: TldrawUiTranslationProvider */
3016
3233
 
@@ -3476,8 +3693,12 @@ export declare interface TLUiEventMap {
3476
3693
  'delete-shapes': null;
3477
3694
  'select-all-shapes': null;
3478
3695
  'select-none-shapes': null;
3479
- 'rotate-ccw': null;
3480
- 'rotate-cw': null;
3696
+ 'rotate-ccw': {
3697
+ fine: boolean;
3698
+ };
3699
+ 'rotate-cw': {
3700
+ fine: boolean;
3701
+ };
3481
3702
  'zoom-in': {
3482
3703
  towardsCursor: boolean;
3483
3704
  };
@@ -3521,6 +3742,7 @@ export declare interface TLUiEventMap {
3521
3742
  'toggle-lock': null;
3522
3743
  'toggle-reduce-motion': null;
3523
3744
  'toggle-keyboard-shortcuts': null;
3745
+ 'toggle-ui-labels': null;
3524
3746
  'toggle-edge-scrolling': null;
3525
3747
  'color-scheme': {
3526
3748
  value: string;
@@ -3543,6 +3765,9 @@ export declare interface TLUiEventMap {
3543
3765
  'open-context-menu': null;
3544
3766
  'adjust-shape-styles': null;
3545
3767
  'copy-link': null;
3768
+ 'drag-tool': {
3769
+ id: string;
3770
+ };
3546
3771
  'image-replace': null;
3547
3772
  'video-replace': null;
3548
3773
  'open-kbd-shortcuts': null;
@@ -3629,6 +3854,13 @@ export declare type TLUiKeyboardShortcutsDialogProps = TLUiDialogProps & {
3629
3854
  children?: ReactNode;
3630
3855
  };
3631
3856
 
3857
+ /** @public */
3858
+ export declare interface TLUiLayoutProps extends HTMLAttributes<HTMLDivElement> {
3859
+ children: ReactNode;
3860
+ tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
3861
+ asChild?: boolean;
3862
+ }
3863
+
3632
3864
  /** @public */
3633
3865
  export declare interface TLUiMainMenuProps {
3634
3866
  children?: ReactNode;
@@ -3668,7 +3900,7 @@ export declare interface TLUiMenuContextProviderProps {
3668
3900
  }
3669
3901
 
3670
3902
  /** @public */
3671
- export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | 'panel' | 'small-icons' | 'toolbar-overflow' | 'toolbar';
3903
+ export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | 'small-icons' | 'toolbar-overflow' | 'toolbar';
3672
3904
 
3673
3905
  /** @public */
3674
3906
  export declare interface TLUiMenuGroupProps<TranslationKey extends string = string> {
@@ -3728,6 +3960,10 @@ export declare interface TLUiMenuItemProps<TranslationKey extends string = strin
3728
3960
  * Whether the item is selected.
3729
3961
  */
3730
3962
  isSelected?: boolean;
3963
+ /**
3964
+ * The function to call when the item is dragged. If this is provided, the item will be draggable.
3965
+ */
3966
+ onDragStart?(source: TLUiEventSource, info: TLPointerEventInfo): void;
3731
3967
  }
3732
3968
 
3733
3969
  /** @public */
@@ -3773,6 +4009,7 @@ export declare interface TLUiPopoverProps {
3773
4009
  open?: boolean;
3774
4010
  children: React_3.ReactNode;
3775
4011
  onOpenChange?(isOpen: boolean): void;
4012
+ className?: string;
3776
4013
  }
3777
4014
 
3778
4015
  /** @public */
@@ -3858,6 +4095,7 @@ export declare interface TLUiToolbarButtonProps extends React_3.HTMLAttributes<H
3858
4095
  disabled?: boolean;
3859
4096
  isActive?: boolean;
3860
4097
  type: 'icon' | 'menu' | 'tool';
4098
+ tooltip?: string;
3861
4099
  }
3862
4100
 
3863
4101
  /** @public */
@@ -3866,6 +4104,8 @@ export declare interface TLUiToolbarProps extends React_3.HTMLAttributes<HTMLDiv
3866
4104
  className?: string;
3867
4105
  dir?: 'ltr' | 'rtl';
3868
4106
  label: string;
4107
+ orientation?: 'grid' | 'horizontal' | 'vertical';
4108
+ tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
3869
4109
  }
3870
4110
 
3871
4111
  /** @public */
@@ -3884,6 +4124,7 @@ export declare interface TLUiToolbarToggleItemProps extends React_3.HTMLAttribut
3884
4124
  className?: string;
3885
4125
  type: 'icon' | 'tool';
3886
4126
  value: string;
4127
+ tooltip?: string;
3887
4128
  }
3888
4129
 
3889
4130
  /** @public */
@@ -3893,6 +4134,7 @@ export declare interface TLUiToolItem<TranslationKey extends string = string, Ic
3893
4134
  shortcutsLabel?: TranslationKey;
3894
4135
  icon: IconType | TLUiIconJsx;
3895
4136
  onSelect(source: TLUiEventSource): void;
4137
+ onDragStart?(source: TLUiEventSource, info: TLPointerEventInfo): void;
3896
4138
  /**
3897
4139
  * The keyboard shortcut for this tool. This is a string that can be a single key,
3898
4140
  * or a combination of keys.
@@ -3928,7 +4170,7 @@ export declare interface TLUiTranslation {
3928
4170
  export declare type TLUiTranslationContextType = TLUiTranslation;
3929
4171
 
3930
4172
  /** @public */
3931
- export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
4173
+ export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.rotate-shape-ccw-fine' | 'a11y.rotate-shape-ccw' | 'a11y.rotate-shape-cw-fine' | 'a11y.rotate-shape-cw' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-ui-labels.menu' | 'action.toggle-ui-labels' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
3932
4174
 
3933
4175
  /** @public */
3934
4176
  export declare interface TLUiTranslationProviderProps {
@@ -4055,12 +4297,23 @@ export declare function ToggleReduceMotionItem(): JSX_2.Element;
4055
4297
  /** @public @react */
4056
4298
  export declare function ToggleSnapModeItem(): JSX_2.Element;
4057
4299
 
4300
+ /** @public @react */
4301
+ export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX_2.Element | null;
4302
+
4303
+ /** @public */
4304
+ export declare interface ToggleToolLockedButtonProps {
4305
+ activeToolId?: string;
4306
+ }
4307
+
4058
4308
  /** @public @react */
4059
4309
  export declare function ToggleToolLockItem(): JSX_2.Element;
4060
4310
 
4061
4311
  /** @public @react */
4062
4312
  export declare function ToggleTransparentBgMenuItem(): JSX_2.Element;
4063
4313
 
4314
+ /** @public @react */
4315
+ export declare function ToggleUiLabelsItem(): JSX_2.Element;
4316
+
4064
4317
  /** @public @react */
4065
4318
  export declare function ToggleWrapModeItem(): JSX_2.Element;
4066
4319
 
@@ -4294,6 +4547,9 @@ export declare function useShowCollaborationUi(): boolean;
4294
4547
  /** @public */
4295
4548
  export declare function useTldrawUiComponents(): TLUiComponents;
4296
4549
 
4550
+ /** @public */
4551
+ export declare function useTldrawUiOrientation(): TldrawUiOrientationContext;
4552
+
4297
4553
  /** @public */
4298
4554
  export declare function useToasts(): TLUiToastsContextType;
4299
4555
 
@@ -4317,6 +4573,12 @@ export declare function useTranslation(): (id?: Exclude<string, TLUiTranslationK
4317
4573
  /** @public */
4318
4574
  export declare function useUiEvents(): TLUiEventContextType;
4319
4575
 
4576
+ /**
4577
+ * Returns true if the number of UNLOCKED selected shapes is at least min or at most max.
4578
+ * @public
4579
+ */
4580
+ export declare function useUnlockedSelectedShapesCount(min?: number, max?: number): boolean | number;
4581
+
4320
4582
  /** @public */
4321
4583
  export declare interface VideoShapeOptions {
4322
4584
  /**