tldraw 4.6.0-next.fe1474dc57d8 → 5.0.0

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 (383) hide show
  1. package/dist-cjs/index.d.ts +627 -72
  2. package/dist-cjs/index.js +34 -14
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/Tldraw.js +10 -12
  5. package/dist-cjs/lib/Tldraw.js.map +2 -2
  6. package/dist-cjs/lib/defaultExternalContentHandlers.js +1 -1
  7. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  8. package/dist-cjs/lib/defaultOverlayUtils.js +54 -0
  9. package/dist-cjs/lib/defaultOverlayUtils.js.map +7 -0
  10. package/dist-cjs/lib/overlays/ArrowBindingHintOverlayUtil.js +204 -0
  11. package/dist-cjs/lib/overlays/ArrowBindingHintOverlayUtil.js.map +7 -0
  12. package/dist-cjs/lib/overlays/ArrowHintOverlayUtil.js +180 -0
  13. package/dist-cjs/lib/overlays/ArrowHintOverlayUtil.js.map +7 -0
  14. package/dist-cjs/lib/overlays/BrushOverlayUtil.js +84 -0
  15. package/dist-cjs/lib/overlays/BrushOverlayUtil.js.map +7 -0
  16. package/dist-cjs/lib/overlays/CollaboratorBrushOverlayUtil.js +74 -0
  17. package/dist-cjs/lib/overlays/CollaboratorBrushOverlayUtil.js.map +7 -0
  18. package/dist-cjs/lib/overlays/CollaboratorCursorOverlayUtil.js +218 -0
  19. package/dist-cjs/lib/overlays/CollaboratorCursorOverlayUtil.js.map +7 -0
  20. package/dist-cjs/lib/overlays/CollaboratorHintOverlayUtil.js +87 -0
  21. package/dist-cjs/lib/overlays/CollaboratorHintOverlayUtil.js.map +7 -0
  22. package/dist-cjs/lib/overlays/CollaboratorScribbleOverlayUtil.js +102 -0
  23. package/dist-cjs/lib/overlays/CollaboratorScribbleOverlayUtil.js.map +7 -0
  24. package/dist-cjs/lib/overlays/CollaboratorShapeIndicatorOverlayUtil.js +69 -0
  25. package/dist-cjs/lib/overlays/CollaboratorShapeIndicatorOverlayUtil.js.map +7 -0
  26. package/dist-cjs/lib/overlays/ScribbleOverlayUtil.js +113 -0
  27. package/dist-cjs/lib/overlays/ScribbleOverlayUtil.js.map +7 -0
  28. package/dist-cjs/lib/overlays/SelectionForegroundOverlayUtil.js +462 -0
  29. package/dist-cjs/lib/overlays/SelectionForegroundOverlayUtil.js.map +7 -0
  30. package/dist-cjs/lib/overlays/ShapeHandleOverlayUtil.js +149 -0
  31. package/dist-cjs/lib/overlays/ShapeHandleOverlayUtil.js.map +7 -0
  32. package/dist-cjs/lib/overlays/SnapIndicatorOverlayUtil.js +160 -0
  33. package/dist-cjs/lib/overlays/SnapIndicatorOverlayUtil.js.map +7 -0
  34. package/dist-cjs/lib/overlays/ZoomBrushOverlayUtil.js +71 -0
  35. package/dist-cjs/lib/overlays/ZoomBrushOverlayUtil.js.map +7 -0
  36. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +34 -181
  37. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +3 -3
  38. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -11
  39. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  40. package/dist-cjs/lib/shapes/bookmark/bookmarks.js +11 -2
  41. package/dist-cjs/lib/shapes/bookmark/bookmarks.js.map +2 -2
  42. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +0 -27
  43. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  44. package/dist-cjs/lib/shapes/draw/toolStates/Idle.js +4 -0
  45. package/dist-cjs/lib/shapes/draw/toolStates/Idle.js.map +2 -2
  46. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -19
  47. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
  48. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +0 -6
  49. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  50. package/dist-cjs/lib/shapes/geo/GeoShapeBody.js +2 -2
  51. package/dist-cjs/lib/shapes/geo/GeoShapeBody.js.map +2 -2
  52. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +27 -68
  53. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  54. package/dist-cjs/lib/shapes/geo/getGeoShapePath.js +190 -75
  55. package/dist-cjs/lib/shapes/geo/getGeoShapePath.js.map +2 -2
  56. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +3 -2
  57. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +2 -2
  58. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +0 -21
  59. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  60. package/dist-cjs/lib/shapes/image/ImageAlphaCache.js +1 -1
  61. package/dist-cjs/lib/shapes/image/ImageAlphaCache.js.map +2 -2
  62. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +0 -19
  63. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
  64. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +0 -17
  65. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  66. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +22 -19
  67. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  68. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +0 -9
  69. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  70. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +0 -6
  71. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +2 -2
  72. package/dist-cjs/lib/styles.js +0 -22
  73. package/dist-cjs/lib/styles.js.map +2 -2
  74. package/dist-cjs/lib/tools/EraserTool/EraserTool.js +15 -1
  75. package/dist-cjs/lib/tools/EraserTool/EraserTool.js.map +2 -2
  76. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +8 -25
  77. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  78. package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js +14 -1
  79. package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js.map +2 -2
  80. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +8 -17
  81. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  82. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +46 -18
  83. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +2 -2
  84. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +39 -0
  85. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +2 -2
  86. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +1 -0
  87. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +2 -2
  88. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +92 -6
  89. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  90. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +1 -2
  91. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
  92. package/dist-cjs/lib/tools/selection-logic/updateHoveredOverlayId.js +46 -0
  93. package/dist-cjs/lib/tools/selection-logic/updateHoveredOverlayId.js.map +7 -0
  94. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js +11 -0
  95. package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js.map +2 -2
  96. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +5 -5
  97. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  98. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +25 -7
  99. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +3 -3
  100. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +71 -107
  101. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +3 -3
  102. package/dist-cjs/lib/ui/components/MobileStylePanel.js +8 -2
  103. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  104. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +19 -8
  105. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  106. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js +5 -1
  107. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +2 -2
  108. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +3 -1
  109. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +2 -2
  110. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +267 -75
  111. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +3 -3
  112. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  113. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +1 -0
  114. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  115. package/dist-cjs/lib/ui/version.js +4 -4
  116. package/dist-cjs/lib/ui/version.js.map +1 -1
  117. package/dist-esm/index.d.mts +627 -72
  118. package/dist-esm/index.mjs +57 -14
  119. package/dist-esm/index.mjs.map +2 -2
  120. package/dist-esm/lib/Tldraw.mjs +10 -12
  121. package/dist-esm/lib/Tldraw.mjs.map +2 -2
  122. package/dist-esm/lib/defaultExternalContentHandlers.mjs +1 -1
  123. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  124. package/dist-esm/lib/defaultOverlayUtils.mjs +34 -0
  125. package/dist-esm/lib/defaultOverlayUtils.mjs.map +7 -0
  126. package/dist-esm/lib/overlays/ArrowBindingHintOverlayUtil.mjs +189 -0
  127. package/dist-esm/lib/overlays/ArrowBindingHintOverlayUtil.mjs.map +7 -0
  128. package/dist-esm/lib/overlays/ArrowHintOverlayUtil.mjs +160 -0
  129. package/dist-esm/lib/overlays/ArrowHintOverlayUtil.mjs.map +7 -0
  130. package/dist-esm/lib/overlays/BrushOverlayUtil.mjs +67 -0
  131. package/dist-esm/lib/overlays/BrushOverlayUtil.mjs.map +7 -0
  132. package/dist-esm/lib/overlays/CollaboratorBrushOverlayUtil.mjs +54 -0
  133. package/dist-esm/lib/overlays/CollaboratorBrushOverlayUtil.mjs.map +7 -0
  134. package/dist-esm/lib/overlays/CollaboratorCursorOverlayUtil.mjs +198 -0
  135. package/dist-esm/lib/overlays/CollaboratorCursorOverlayUtil.mjs.map +7 -0
  136. package/dist-esm/lib/overlays/CollaboratorHintOverlayUtil.mjs +67 -0
  137. package/dist-esm/lib/overlays/CollaboratorHintOverlayUtil.mjs.map +7 -0
  138. package/dist-esm/lib/overlays/CollaboratorScribbleOverlayUtil.mjs +82 -0
  139. package/dist-esm/lib/overlays/CollaboratorScribbleOverlayUtil.mjs.map +7 -0
  140. package/dist-esm/lib/overlays/CollaboratorShapeIndicatorOverlayUtil.mjs +49 -0
  141. package/dist-esm/lib/overlays/CollaboratorShapeIndicatorOverlayUtil.mjs.map +7 -0
  142. package/dist-esm/lib/overlays/ScribbleOverlayUtil.mjs +97 -0
  143. package/dist-esm/lib/overlays/ScribbleOverlayUtil.mjs.map +7 -0
  144. package/dist-esm/lib/overlays/SelectionForegroundOverlayUtil.mjs +451 -0
  145. package/dist-esm/lib/overlays/SelectionForegroundOverlayUtil.mjs.map +7 -0
  146. package/dist-esm/lib/overlays/ShapeHandleOverlayUtil.mjs +135 -0
  147. package/dist-esm/lib/overlays/ShapeHandleOverlayUtil.mjs.map +7 -0
  148. package/dist-esm/lib/overlays/SnapIndicatorOverlayUtil.mjs +143 -0
  149. package/dist-esm/lib/overlays/SnapIndicatorOverlayUtil.mjs.map +7 -0
  150. package/dist-esm/lib/overlays/ZoomBrushOverlayUtil.mjs +51 -0
  151. package/dist-esm/lib/overlays/ZoomBrushOverlayUtil.mjs.map +7 -0
  152. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +35 -182
  153. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +3 -3
  154. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +1 -12
  155. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  156. package/dist-esm/lib/shapes/bookmark/bookmarks.mjs +11 -2
  157. package/dist-esm/lib/shapes/bookmark/bookmarks.mjs.map +2 -2
  158. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +0 -27
  159. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  160. package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs +4 -0
  161. package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs.map +2 -2
  162. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -19
  163. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
  164. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +0 -7
  165. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  166. package/dist-esm/lib/shapes/geo/GeoShapeBody.mjs +2 -2
  167. package/dist-esm/lib/shapes/geo/GeoShapeBody.mjs.map +2 -2
  168. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +33 -70
  169. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  170. package/dist-esm/lib/shapes/geo/getGeoShapePath.mjs +190 -75
  171. package/dist-esm/lib/shapes/geo/getGeoShapePath.mjs.map +2 -2
  172. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +3 -2
  173. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +2 -2
  174. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +0 -21
  175. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  176. package/dist-esm/lib/shapes/image/ImageAlphaCache.mjs +2 -2
  177. package/dist-esm/lib/shapes/image/ImageAlphaCache.mjs.map +2 -2
  178. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +0 -20
  179. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
  180. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +0 -17
  181. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  182. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +22 -20
  183. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  184. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +0 -10
  185. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  186. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +0 -7
  187. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +2 -2
  188. package/dist-esm/lib/styles.mjs +0 -22
  189. package/dist-esm/lib/styles.mjs.map +2 -2
  190. package/dist-esm/lib/tools/EraserTool/EraserTool.mjs +15 -1
  191. package/dist-esm/lib/tools/EraserTool/EraserTool.mjs.map +2 -2
  192. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +9 -31
  193. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  194. package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs +15 -2
  195. package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs.map +2 -2
  196. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +9 -18
  197. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  198. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +46 -18
  199. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +2 -2
  200. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +39 -0
  201. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +2 -2
  202. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +1 -0
  203. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +2 -2
  204. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +92 -6
  205. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  206. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +1 -2
  207. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
  208. package/dist-esm/lib/tools/selection-logic/updateHoveredOverlayId.mjs +26 -0
  209. package/dist-esm/lib/tools/selection-logic/updateHoveredOverlayId.mjs.map +7 -0
  210. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs +12 -1
  211. package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs.map +2 -2
  212. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +5 -5
  213. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  214. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +27 -9
  215. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +3 -3
  216. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +71 -108
  217. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +3 -3
  218. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +8 -2
  219. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  220. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +19 -8
  221. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  222. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +7 -2
  223. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +2 -2
  224. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +3 -1
  225. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +2 -2
  226. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +267 -65
  227. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  228. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +1 -0
  229. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  230. package/dist-esm/lib/ui/version.mjs +4 -4
  231. package/dist-esm/lib/ui/version.mjs.map +1 -1
  232. package/package.json +4 -5
  233. package/src/index.ts +52 -7
  234. package/src/lib/Tldraw.test.tsx +161 -9
  235. package/src/lib/Tldraw.tsx +25 -12
  236. package/src/lib/defaultExternalContentHandlers.test.ts +175 -0
  237. package/src/lib/defaultExternalContentHandlers.ts +22 -12
  238. package/src/lib/defaultOverlayUtils.ts +32 -0
  239. package/src/lib/overlays/ArrowBindingHintOverlayUtil.ts +258 -0
  240. package/src/lib/overlays/ArrowHintOverlayUtil.ts +215 -0
  241. package/src/lib/overlays/BrushOverlayUtil.ts +108 -0
  242. package/src/lib/overlays/CollaboratorBrushOverlayUtil.ts +80 -0
  243. package/src/lib/overlays/CollaboratorCursorOverlayUtil.ts +301 -0
  244. package/src/lib/overlays/CollaboratorHintOverlayUtil.ts +110 -0
  245. package/src/lib/overlays/CollaboratorScribbleOverlayUtil.ts +122 -0
  246. package/src/lib/overlays/CollaboratorShapeIndicatorOverlayUtil.ts +85 -0
  247. package/src/lib/overlays/ScribbleOverlayUtil.ts +143 -0
  248. package/src/lib/overlays/SelectionForegroundOverlayUtil.ts +680 -0
  249. package/src/lib/overlays/ShapeHandleOverlayUtil.ts +209 -0
  250. package/src/lib/overlays/SnapIndicatorOverlayUtil.ts +195 -0
  251. package/src/lib/overlays/ZoomBrushOverlayUtil.ts +75 -0
  252. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +40 -232
  253. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +1 -14
  254. package/src/lib/shapes/bookmark/bookmarks.ts +16 -2
  255. package/src/lib/shapes/draw/DrawShapeUtil.tsx +0 -43
  256. package/src/lib/shapes/draw/toolStates/Idle.ts +5 -0
  257. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -21
  258. package/src/lib/shapes/frame/FrameShapeUtil.tsx +0 -9
  259. package/src/lib/shapes/geo/GeoShapeBody.tsx +3 -3
  260. package/src/lib/shapes/geo/GeoShapeUtil.test.tsx +85 -1
  261. package/src/lib/shapes/geo/GeoShapeUtil.tsx +47 -81
  262. package/src/lib/shapes/geo/getGeoShapePath.ts +282 -147
  263. package/src/lib/shapes/geo/toolStates/Pointing.ts +5 -9
  264. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +0 -26
  265. package/src/lib/shapes/image/ImageAlphaCache.ts +2 -2
  266. package/src/lib/shapes/image/ImageShapeUtil.tsx +0 -23
  267. package/src/lib/shapes/line/LineShapeUtil.tsx +0 -20
  268. package/src/lib/shapes/note/NoteShapeUtil.tsx +29 -22
  269. package/src/lib/shapes/text/TextShapeUtil.tsx +0 -12
  270. package/src/lib/shapes/video/VideoShapeUtil.tsx +0 -9
  271. package/src/lib/styles.tsx +0 -22
  272. package/src/lib/tools/EraserTool/EraserTool.ts +18 -1
  273. package/src/lib/tools/EraserTool/childStates/Erasing.ts +14 -38
  274. package/src/lib/tools/EraserTool/childStates/Idle.ts +16 -2
  275. package/src/lib/tools/EraserTool/childStates/Pointing.ts +9 -24
  276. package/src/lib/tools/SelectTool/DragAndDropManager.ts +58 -18
  277. package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +54 -0
  278. package/src/lib/tools/SelectTool/childStates/EditingShape.ts +1 -0
  279. package/src/lib/tools/SelectTool/childStates/Idle.ts +120 -11
  280. package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +1 -2
  281. package/src/lib/tools/selection-logic/updateHoveredOverlayId.ts +41 -0
  282. package/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx +20 -2
  283. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +2 -4
  284. package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +29 -8
  285. package/src/lib/ui/components/Minimap/MinimapManager.ts +97 -127
  286. package/src/lib/ui/components/MobileStylePanel.tsx +10 -5
  287. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +19 -13
  288. package/src/lib/ui/components/StylePanel/StylePanelButtonPicker.tsx +6 -1
  289. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +9 -0
  290. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +335 -75
  291. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +1 -0
  292. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +1 -0
  293. package/src/lib/ui/version.ts +4 -4
  294. package/src/lib/ui.css +3 -3
  295. package/src/test/Editor.test.tsx +2 -2
  296. package/src/test/EraserTool.test.ts +144 -115
  297. package/src/test/SelectTool.test.ts +66 -1
  298. package/src/test/TestEditor.ts +89 -0
  299. package/src/test/TldrawEditor.test.tsx +13 -10
  300. package/src/test/commaKeyClick.test.ts +94 -0
  301. package/src/test/cropping.test.ts +55 -9
  302. package/src/test/custom-clipping.test.ts +2 -4
  303. package/src/test/customSnapping.test.tsx +3 -3
  304. package/src/test/dragAndDrop.test.ts +341 -0
  305. package/src/test/drawing.test.ts +10 -1
  306. package/src/test/frames.test.ts +62 -0
  307. package/src/test/getCulledShapes.test.tsx +2 -2
  308. package/src/test/notVisibleShapes.test.ts +3 -1
  309. package/src/test/overlays/ArrowHintOverlayUtil.test.ts +128 -0
  310. package/src/test/overlays/BrushOverlayUtil.test.ts +50 -0
  311. package/src/test/overlays/BrushOverlayUtilDisplayValues.test.ts +97 -0
  312. package/src/test/overlays/CollaboratorBrushOverlayUtil.test.ts +80 -0
  313. package/src/test/overlays/CollaboratorCursorOverlayUtil.test.ts +343 -0
  314. package/src/test/overlays/CollaboratorHintOverlayUtil.test.ts +111 -0
  315. package/src/test/overlays/CollaboratorScribbleOverlayUtil.test.ts +100 -0
  316. package/src/test/overlays/OverlayManager.test.ts +273 -0
  317. package/src/test/overlays/ScribbleOverlayUtil.test.ts +79 -0
  318. package/src/test/overlays/SelectionForegroundOverlayUtil.test.ts +343 -0
  319. package/src/test/overlays/ShapeHandleOverlayUtil.test.ts +271 -0
  320. package/src/test/overlays/SnapIndicatorOverlayUtil.test.ts +74 -0
  321. package/src/test/overlays/ZoomBrushOverlayUtil.test.ts +50 -0
  322. package/src/test/resizing.test.ts +139 -392
  323. package/src/test/rotating.test.ts +70 -86
  324. package/src/test/shapeutils.test.ts +34 -1
  325. package/src/test/ui/StylePanel.test.tsx +46 -0
  326. package/tldraw.css +7 -242
  327. package/dist-cjs/lib/canvas/TldrawCropHandles.js +0 -174
  328. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +0 -7
  329. package/dist-cjs/lib/canvas/TldrawHandles.js +0 -45
  330. package/dist-cjs/lib/canvas/TldrawHandles.js.map +0 -7
  331. package/dist-cjs/lib/canvas/TldrawOverlays.js +0 -86
  332. package/dist-cjs/lib/canvas/TldrawOverlays.js.map +0 -7
  333. package/dist-cjs/lib/canvas/TldrawScribble.js +0 -65
  334. package/dist-cjs/lib/canvas/TldrawScribble.js.map +0 -7
  335. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +0 -519
  336. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +0 -7
  337. package/dist-cjs/lib/canvas/TldrawShapeIndicators.js +0 -45
  338. package/dist-cjs/lib/canvas/TldrawShapeIndicators.js.map +0 -7
  339. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js +0 -82
  340. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js.map +0 -7
  341. package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js +0 -27
  342. package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js.map +0 -7
  343. package/dist-cjs/lib/ui/components/Minimap/getRgba.js +0 -39
  344. package/dist-cjs/lib/ui/components/Minimap/getRgba.js.map +0 -7
  345. package/dist-cjs/lib/ui/components/Minimap/minimap-webgl-setup.js +0 -158
  346. package/dist-cjs/lib/ui/components/Minimap/minimap-webgl-setup.js.map +0 -7
  347. package/dist-cjs/lib/ui/components/Minimap/minimap-webgl-shapes.js +0 -126
  348. package/dist-cjs/lib/ui/components/Minimap/minimap-webgl-shapes.js.map +0 -7
  349. package/dist-esm/lib/canvas/TldrawCropHandles.mjs +0 -144
  350. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +0 -7
  351. package/dist-esm/lib/canvas/TldrawHandles.mjs +0 -25
  352. package/dist-esm/lib/canvas/TldrawHandles.mjs.map +0 -7
  353. package/dist-esm/lib/canvas/TldrawOverlays.mjs +0 -66
  354. package/dist-esm/lib/canvas/TldrawOverlays.mjs.map +0 -7
  355. package/dist-esm/lib/canvas/TldrawScribble.mjs +0 -35
  356. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +0 -7
  357. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +0 -500
  358. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +0 -7
  359. package/dist-esm/lib/canvas/TldrawShapeIndicators.mjs +0 -25
  360. package/dist-esm/lib/canvas/TldrawShapeIndicators.mjs.map +0 -7
  361. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs +0 -65
  362. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs.map +0 -7
  363. package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs +0 -7
  364. package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs.map +0 -7
  365. package/dist-esm/lib/ui/components/Minimap/getRgba.mjs +0 -19
  366. package/dist-esm/lib/ui/components/Minimap/getRgba.mjs.map +0 -7
  367. package/dist-esm/lib/ui/components/Minimap/minimap-webgl-setup.mjs +0 -138
  368. package/dist-esm/lib/ui/components/Minimap/minimap-webgl-setup.mjs.map +0 -7
  369. package/dist-esm/lib/ui/components/Minimap/minimap-webgl-shapes.mjs +0 -106
  370. package/dist-esm/lib/ui/components/Minimap/minimap-webgl-shapes.mjs.map +0 -7
  371. package/src/lib/canvas/TldrawCropHandles.tsx +0 -136
  372. package/src/lib/canvas/TldrawHandles.tsx +0 -31
  373. package/src/lib/canvas/TldrawOverlays.tsx +0 -85
  374. package/src/lib/canvas/TldrawScribble.tsx +0 -39
  375. package/src/lib/canvas/TldrawSelectionForeground.tsx +0 -557
  376. package/src/lib/canvas/TldrawShapeIndicators.tsx +0 -24
  377. package/src/lib/shapes/shared/SvgTextLabel.tsx +0 -86
  378. package/src/lib/shapes/shared/freehand/getStrokeRadius.ts +0 -13
  379. package/src/lib/ui/components/Minimap/getRgba.ts +0 -18
  380. package/src/lib/ui/components/Minimap/minimap-webgl-setup.ts +0 -155
  381. package/src/lib/ui/components/Minimap/minimap-webgl-shapes.ts +0 -144
  382. package/src/test/testutils/getSnapLines.ts +0 -25
  383. package/src/test/testutils/roundedBox.ts +0 -13
@@ -37,6 +37,8 @@ import { MigrationFailureReason } from '@tldraw/editor';
37
37
  import { MigrationSequence } from '@tldraw/store';
38
38
  import { NamedExoticComponent } from 'react';
39
39
  import { Node as Node_2 } from '@tiptap/pm/model';
40
+ import { OverlayOptionsWithDisplayValues } from '@tldraw/editor';
41
+ import { OverlayUtil } from '@tldraw/editor';
40
42
  import { PerfectDashTerminal } from '@tldraw/editor';
41
43
  import { PointerEvent as PointerEvent_2 } from 'react';
42
44
  import { Polygon2d } from '@tldraw/editor';
@@ -54,10 +56,13 @@ import { RefAttributes } from 'react';
54
56
  import { RefObject } from 'react';
55
57
  import { Result } from '@tldraw/editor';
56
58
  import { RichTextFontVisitorState } from '@tldraw/editor';
59
+ import { RotateCorner } from '@tldraw/editor';
57
60
  import { SerializedSchema } from '@tldraw/editor';
61
+ import { ShapeIndicatorOverlayUtil } from '@tldraw/editor';
58
62
  import { ShapeUtil } from '@tldraw/editor';
59
63
  import { ShapeWithCrop } from '@tldraw/editor';
60
64
  import { SharedStyle } from '@tldraw/editor';
65
+ import { SnapIndicator } from '@tldraw/editor';
61
66
  import { StateNode } from '@tldraw/editor';
62
67
  import { StyleProp } from '@tldraw/editor';
63
68
  import { SvgExportContext } from '@tldraw/editor';
@@ -80,6 +85,7 @@ import { TLClickEventInfo } from '@tldraw/editor';
80
85
  import { TLClipboardWriteInfo } from '@tldraw/editor';
81
86
  import { TLContent } from '@tldraw/editor';
82
87
  import { TLCropInfo } from '@tldraw/editor';
88
+ import { TLCursorType } from '@tldraw/editor';
83
89
  import { TLDefaultColorStyle } from '@tldraw/tlschema';
84
90
  import { TLDefaultFontStyle } from '@tldraw/tlschema';
85
91
  import { TLDefaultSizeStyle } from '@tldraw/editor';
@@ -107,7 +113,6 @@ import { TLGeoShape } from '@tldraw/editor';
107
113
  import { TLGeoShapeProps } from '@tldraw/editor';
108
114
  import { TLHandle } from '@tldraw/editor';
109
115
  import { TLHandleDragInfo } from '@tldraw/editor';
110
- import { TLHandlesProps } from '@tldraw/editor';
111
116
  import { TLHighlightShape } from '@tldraw/editor';
112
117
  import { TLHighlightShapeProps } from '@tldraw/editor';
113
118
  import { TLImageAsset } from '@tldraw/editor';
@@ -119,6 +124,7 @@ import { TLLineShape } from '@tldraw/editor';
119
124
  import { TLLineShapePoint } from '@tldraw/editor';
120
125
  import { TLNoteShape } from '@tldraw/editor';
121
126
  import { TLNoteShapeProps } from '@tldraw/editor';
127
+ import { TLOverlay } from '@tldraw/editor';
122
128
  import { TLPageId } from '@tldraw/editor';
123
129
  import { TLParentId } from '@tldraw/tlschema';
124
130
  import { TLPointerEventInfo } from '@tldraw/editor';
@@ -126,8 +132,8 @@ import { TLPropsMigrations } from '@tldraw/tlschema';
126
132
  import { TLResizeInfo } from '@tldraw/editor';
127
133
  import { TLRichText } from '@tldraw/editor';
128
134
  import { TLSchema } from '@tldraw/editor';
129
- import { TLScribbleProps } from '@tldraw/editor';
130
- import { TLSelectionForegroundProps } from '@tldraw/editor';
135
+ import { TLScribble } from '@tldraw/editor';
136
+ import { TLSelectionHandle } from '@tldraw/editor';
131
137
  import { TLShape } from '@tldraw/editor';
132
138
  import { TLShapeCrop } from '@tldraw/editor';
133
139
  import { TLShapeId } from '@tldraw/editor';
@@ -183,6 +189,33 @@ export declare const allDefaultFontFaces: TLFontFace_2[];
183
189
  /** @public @react */
184
190
  export declare function ArrangeMenuSubmenu(): JSX.Element | null;
185
191
 
192
+ /**
193
+ * Overlay util for the dashed binding hint shown on bound arrows. Draws stubs
194
+ * along the arrow's handle path, from each bound endpoint's snapped body
195
+ * position to the user's intended (handle) position, with a precision marker
196
+ * at the handle.
197
+ *
198
+ * @public
199
+ */
200
+ export declare class ArrowBindingHintOverlayUtil extends OverlayUtil<TLArrowBindingHintOverlay> {
201
+ static type: string;
202
+ options: {
203
+ crossSize: number;
204
+ dashedMinZoom: number;
205
+ dashLengthRatio: number;
206
+ dotRadius: number;
207
+ opacity: number;
208
+ strokeWidth: number;
209
+ zIndex: number;
210
+ };
211
+ isActive(): boolean;
212
+ getOverlays(): TLArrowBindingHintOverlay[];
213
+ render(ctx: CanvasRenderingContext2D, overlays: TLArrowBindingHintOverlay[]): void;
214
+ private drawEndpoint;
215
+ /** Tangent direction at the handle, oriented toward the body. */
216
+ private getMarkerAngle;
217
+ }
218
+
186
219
  /**
187
220
  * @public
188
221
  */
@@ -201,6 +234,26 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
201
234
  /** @public @react */
202
235
  export declare function ArrowDownToolbarItem(): JSX.Element;
203
236
 
237
+ /**
238
+ * Overlay util for arrow target hints (target shape indicator + edge snap circles).
239
+ *
240
+ * @public
241
+ */
242
+ export declare class ArrowHintOverlayUtil extends OverlayUtil<TLArrowHintOverlay> {
243
+ static type: string;
244
+ options: {
245
+ edgePointRadius: number;
246
+ edgeRadius: number;
247
+ handleRadius: number;
248
+ lineWidth: number;
249
+ zIndex: number;
250
+ };
251
+ isActive(): boolean;
252
+ getOverlays(): TLArrowHintOverlay[];
253
+ render(ctx: CanvasRenderingContext2D, overlays: TLArrowHintOverlay[]): void;
254
+ /* Excluded from this release type: _renderIndicatorPath */
255
+ }
256
+
204
257
  /** @public @react */
205
258
  export declare function ArrowLeftToolbarItem(): JSX.Element;
206
259
 
@@ -366,8 +419,6 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
366
419
  };
367
420
  onDoubleClickHandle(shape: TLArrowShape, handle: TLHandle): TLShapePartial<TLArrowShape> | void;
368
421
  component(shape: TLArrowShape): JSX.Element | null;
369
- indicator(shape: TLArrowShape): JSX.Element | null;
370
- useLegacyIndicator(): boolean;
371
422
  getIndicatorPath(shape: TLArrowShape): {
372
423
  additionalPaths: Path2D[];
373
424
  clipPath: Path2D;
@@ -487,8 +538,6 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
487
538
  getAriaDescriptor(shape: TLBookmarkShape): string | undefined;
488
539
  getDefaultProps(): TLBookmarkShape['props'];
489
540
  component(shape: TLBookmarkShape): JSX.Element;
490
- indicator(shape: TLBookmarkShape): JSX.Element;
491
- useLegacyIndicator(): boolean;
492
541
  getIndicatorPath(shape: TLBookmarkShape): Path2D;
493
542
  onBeforeCreate(next: TLBookmarkShape): {
494
543
  id: TLShapeId_2;
@@ -549,6 +598,32 @@ export declare interface BreakPointProviderProps {
549
598
  children: ReactNode;
550
599
  }
551
600
 
601
+ /**
602
+ * Overlay util for the selection brush rectangle.
603
+ *
604
+ * @public
605
+ */
606
+ export declare class BrushOverlayUtil extends OverlayUtil<TLBrushOverlay> {
607
+ static type: string;
608
+ options: BrushOverlayUtilOptions;
609
+ isActive(): boolean;
610
+ getOverlays(): TLBrushOverlay[];
611
+ render(ctx: CanvasRenderingContext2D, overlays: TLBrushOverlay[]): void;
612
+ renderMinimap(ctx: CanvasRenderingContext2D, overlays: TLBrushOverlay[], zoom: number): void;
613
+ }
614
+
615
+ /** @public */
616
+ export declare interface BrushOverlayUtilDisplayValues {
617
+ fillColor: string;
618
+ strokeColor: string;
619
+ lineWidth: number;
620
+ }
621
+
622
+ /** @public */
623
+ export declare interface BrushOverlayUtilOptions extends OverlayOptionsWithDisplayValues<TLBrushOverlay, BrushOverlayUtilDisplayValues> {
624
+ zIndex: number;
625
+ }
626
+
552
627
  /* Excluded from this release type: buildFromV1Document */
553
628
 
554
629
  /** @public @react */
@@ -593,6 +668,111 @@ export declare function ClipboardMenuGroup(): JSX.Element;
593
668
  /** @public @react */
594
669
  export declare function CloudToolbarItem(): JSX.Element;
595
670
 
671
+ /**
672
+ * Overlay util for collaborator selection brushes.
673
+ *
674
+ * @public
675
+ */
676
+ export declare class CollaboratorBrushOverlayUtil extends OverlayUtil<TLCollaboratorBrushOverlay> {
677
+ static type: string;
678
+ options: {
679
+ lineWidth: number;
680
+ zIndex: number;
681
+ };
682
+ isActive(): boolean;
683
+ getOverlays(): TLCollaboratorBrushOverlay[];
684
+ render(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorBrushOverlay[]): void;
685
+ renderMinimap(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorBrushOverlay[]): void;
686
+ }
687
+
688
+ /**
689
+ * Overlay util for collaborator cursors (arrow + name tag + chat message).
690
+ *
691
+ * @public
692
+ */
693
+ export declare class CollaboratorCursorOverlayUtil extends OverlayUtil<TLCollaboratorCursorOverlay> {
694
+ static type: string;
695
+ options: {
696
+ chatMaxWidth: number;
697
+ fontSize: number;
698
+ nameMaxWidth: number;
699
+ zIndex: number;
700
+ };
701
+ private _truncateCache;
702
+ isActive(): boolean;
703
+ getOverlays(): TLCollaboratorCursorOverlay[];
704
+ render(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorCursorOverlay[]): void;
705
+ /** Name tag (no chat) - colored background with white text */
706
+ private _drawNameTag;
707
+ /** Name title (when chat is present) - text with shadow, no background */
708
+ private _drawNameTitle;
709
+ /** Chat bubble - colored background with white text */
710
+ private _drawChatBubble;
711
+ renderMinimap(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorCursorOverlay[], zoom: number): void;
712
+ private _truncateText;
713
+ private _setTruncatedTextCache;
714
+ }
715
+
716
+ /**
717
+ * Overlay util for off-screen collaborator cursor hints.
718
+ * Shows a small directional arrow at the viewport edge pointing toward the collaborator.
719
+ *
720
+ * @public
721
+ */
722
+ export declare class CollaboratorHintOverlayUtil extends OverlayUtil<TLCollaboratorHintOverlay> {
723
+ static type: string;
724
+ options: {
725
+ lineWidth: number;
726
+ viewportPadding: number;
727
+ zIndex: number;
728
+ };
729
+ isActive(): boolean;
730
+ getOverlays(): TLCollaboratorHintOverlay[];
731
+ render(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorHintOverlay[]): void;
732
+ /* Excluded from this release type: _isCursorInViewport */
733
+ }
734
+
735
+ /**
736
+ * Overlay util for collaborator scribble strokes (eraser, lasso, etc.).
737
+ *
738
+ * @public
739
+ */
740
+ export declare class CollaboratorScribbleOverlayUtil extends OverlayUtil<TLCollaboratorScribbleOverlay> {
741
+ static type: string;
742
+ options: {
743
+ cacheSize: number;
744
+ streamline: number;
745
+ zIndex: number;
746
+ };
747
+ private _collabScribblePathCache;
748
+ isActive(): boolean;
749
+ getOverlays(): TLCollaboratorScribbleOverlay[];
750
+ render(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorScribbleOverlay[]): void;
751
+ }
752
+
753
+ /**
754
+ * Overlay util for remote collaborators' shape selection indicators.
755
+ *
756
+ * Renders a per-peer outline around each shape another user has selected,
757
+ * using the peer's color. Drawn under the local `ShapeIndicatorOverlayUtil`
758
+ * (lower z-index) so the local user's selection always appears on top.
759
+ *
760
+ * Non-interactive: contributes no hit-test geometry.
761
+ *
762
+ * @public
763
+ */
764
+ export declare class CollaboratorShapeIndicatorOverlayUtil extends OverlayUtil<TLCollaboratorShapeIndicatorOverlay> {
765
+ static type: string;
766
+ options: {
767
+ alpha: number;
768
+ lineWidth: number;
769
+ zIndex: number;
770
+ };
771
+ isActive(): boolean;
772
+ getOverlays(): TLCollaboratorShapeIndicatorOverlay[];
773
+ render(ctx: CanvasRenderingContext2D, overlays: TLCollaboratorShapeIndicatorOverlay[]): void;
774
+ }
775
+
596
776
  /** @public @react */
597
777
  export declare function ColorSchemeMenu(): JSX.Element;
598
778
 
@@ -989,6 +1169,130 @@ export declare function DefaultFollowingIndicator(): JSX.Element | null;
989
1169
  /** @public */
990
1170
  export declare const DefaultFontFaces: TLDefaultFonts;
991
1171
 
1172
+ /**
1173
+ * Built-in geo type definitions keyed by their `geo` prop value. Every default
1174
+ * geo type (rectangle, ellipse, cloud, etc.) is registered here. The same
1175
+ * registry powers path generation, handle snapping, the style panel picker,
1176
+ * and creation defaults — so custom types added through
1177
+ * {@link @tldraw/tldraw#GeoShapeUtil.configure | GeoShapeUtil.configure()} get
1178
+ * the same treatment as the built-ins.
1179
+ *
1180
+ * The key order here defines the visual order of items in the geo style panel
1181
+ * picker.
1182
+ *
1183
+ * @public
1184
+ */
1185
+ export declare const defaultGeoTypeDefinitions: {
1186
+ readonly 'arrow-down': {
1187
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1188
+ readonly icon: "geo-arrow-down";
1189
+ readonly snapType: "polygon";
1190
+ };
1191
+ readonly 'arrow-left': {
1192
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1193
+ readonly icon: "geo-arrow-left";
1194
+ readonly snapType: "polygon";
1195
+ };
1196
+ readonly 'arrow-right': {
1197
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1198
+ readonly icon: "geo-arrow-right";
1199
+ readonly snapType: "polygon";
1200
+ };
1201
+ readonly 'arrow-up': {
1202
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1203
+ readonly icon: "geo-arrow-up";
1204
+ readonly snapType: "polygon";
1205
+ };
1206
+ readonly 'check-box': {
1207
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1208
+ readonly icon: "geo-check-box";
1209
+ readonly snapType: "polygon";
1210
+ };
1211
+ readonly 'rhombus-2': {
1212
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1213
+ readonly icon: "geo-rhombus-2";
1214
+ readonly snapType: "polygon";
1215
+ };
1216
+ readonly 'x-box': {
1217
+ readonly getPath: (w: number, h: number, shape: TLGeoShape, strokeWidth: number) => PathBuilder;
1218
+ readonly icon: "geo-x-box";
1219
+ readonly snapType: "polygon";
1220
+ };
1221
+ readonly cloud: {
1222
+ readonly defaultSize: {
1223
+ readonly h: 180;
1224
+ readonly w: 300;
1225
+ };
1226
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1227
+ readonly icon: "geo-cloud";
1228
+ readonly snapType: "blobby";
1229
+ };
1230
+ readonly diamond: {
1231
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1232
+ readonly icon: "geo-diamond";
1233
+ readonly snapType: "polygon";
1234
+ };
1235
+ readonly ellipse: {
1236
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1237
+ readonly icon: "geo-ellipse";
1238
+ readonly snapType: "blobby";
1239
+ };
1240
+ readonly heart: {
1241
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1242
+ readonly icon: "geo-heart";
1243
+ readonly snapType: "blobby";
1244
+ };
1245
+ readonly hexagon: {
1246
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1247
+ readonly icon: "geo-hexagon";
1248
+ readonly snapType: "polygon";
1249
+ };
1250
+ readonly octagon: {
1251
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1252
+ readonly icon: "geo-octagon";
1253
+ readonly snapType: "polygon";
1254
+ };
1255
+ readonly oval: {
1256
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1257
+ readonly icon: "geo-oval";
1258
+ readonly snapType: "blobby";
1259
+ };
1260
+ readonly pentagon: {
1261
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1262
+ readonly icon: "geo-pentagon";
1263
+ readonly snapType: "polygon";
1264
+ };
1265
+ readonly rectangle: {
1266
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1267
+ readonly icon: "geo-rectangle";
1268
+ readonly snapType: "polygon";
1269
+ };
1270
+ readonly rhombus: {
1271
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1272
+ readonly icon: "geo-rhombus";
1273
+ readonly snapType: "polygon";
1274
+ };
1275
+ readonly star: {
1276
+ readonly defaultSize: {
1277
+ readonly h: 190;
1278
+ readonly w: 200;
1279
+ };
1280
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1281
+ readonly icon: "geo-star";
1282
+ readonly snapType: "polygon";
1283
+ };
1284
+ readonly trapezoid: {
1285
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1286
+ readonly icon: "geo-trapezoid";
1287
+ readonly snapType: "polygon";
1288
+ };
1289
+ readonly triangle: {
1290
+ readonly getPath: (w: number, h: number, shape: TLGeoShape) => PathBuilder;
1291
+ readonly icon: "geo-triangle";
1292
+ readonly snapType: "polygon";
1293
+ };
1294
+ };
1295
+
992
1296
  /** @public */
993
1297
  export declare function defaultHandleExternalEmbedContent<T>(editor: Editor, { point, url, embed }: {
994
1298
  embed: T;
@@ -1090,6 +1394,9 @@ export declare function DefaultMinimap(): JSX.Element;
1090
1394
  /** @public @react */
1091
1395
  export declare const DefaultNavigationPanel: NamedExoticComponent<object>;
1092
1396
 
1397
+ /** @public */
1398
+ export declare const defaultOverlayUtils: readonly [typeof CollaboratorShapeIndicatorOverlayUtil, typeof ShapeIndicatorOverlayUtil, typeof SelectionForegroundOverlayUtil, typeof ShapeHandleOverlayUtil, typeof BrushOverlayUtil, typeof ZoomBrushOverlayUtil, typeof SnapIndicatorOverlayUtil, typeof ScribbleOverlayUtil, typeof CollaboratorBrushOverlayUtil, typeof CollaboratorScribbleOverlayUtil, typeof CollaboratorHintOverlayUtil, typeof ArrowHintOverlayUtil, typeof ArrowBindingHintOverlayUtil, typeof CollaboratorCursorOverlayUtil];
1399
+
1093
1400
  /** @public @react */
1094
1401
  export declare const DefaultPageMenu: NamedExoticComponent<object>;
1095
1402
 
@@ -1292,8 +1599,6 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
1292
1599
  getDefaultProps(): TLDrawShape['props'];
1293
1600
  getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
1294
1601
  component(shape: TLDrawShape): JSX.Element;
1295
- indicator(shape: TLDrawShape): JSX.Element;
1296
- useLegacyIndicator(): boolean;
1297
1602
  getIndicatorPath(shape: TLDrawShape): Path2D;
1298
1603
  toSvg(shape: TLDrawShape, ctx: SvgExportContext): JSX.Element;
1299
1604
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
@@ -1630,8 +1935,6 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
1630
1935
  isAspectRatioLocked(shape: TLEmbedShape): boolean;
1631
1936
  onResize(shape: TLEmbedShape, info: TLResizeInfo<TLEmbedShape>): TLEmbedShape;
1632
1937
  component(shape: TLEmbedShape): JSX.Element | null;
1633
- indicator(shape: TLEmbedShape): JSX.Element;
1634
- useLegacyIndicator(): boolean;
1635
1938
  getIndicatorPath(shape: TLEmbedShape): Path2D;
1636
1939
  getInterpolatedProps(startShape: TLEmbedShape, endShape: TLEmbedShape, t: number): TLEmbedShapeProps;
1637
1940
  }
@@ -1647,7 +1950,14 @@ export declare class EraserTool extends StateNode {
1647
1950
  static initial: string;
1648
1951
  static isLockable: boolean;
1649
1952
  static children(): TLStateNodeConstructor[];
1650
- onEnter(): void;
1953
+ info: {
1954
+ onInteractionEnd?: string | undefined;
1955
+ };
1956
+ onEnter(info?: {
1957
+ onInteractionEnd?: string;
1958
+ }): void;
1959
+ onExit(): void;
1960
+ maybeReturnToOriginatingTool(): void;
1651
1961
  }
1652
1962
 
1653
1963
  /** @public @react */
@@ -1762,8 +2072,6 @@ export declare class FrameShapeUtil extends BaseFrameLikeShapeUtil<TLFrameShape>
1762
2072
  getText(shape: TLFrameShape): string | undefined;
1763
2073
  component(shape: TLFrameShape): JSX.Element;
1764
2074
  toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX.Element;
1765
- indicator(shape: TLFrameShape): JSX.Element;
1766
- useLegacyIndicator(): boolean;
1767
2075
  getIndicatorPath(shape: TLFrameShape): Path2D;
1768
2076
  getInterpolatedProps(startShape: TLFrameShape, endShape: TLFrameShape, t: number): TLFrameShapeProps;
1769
2077
  onDoubleClickEdge(shape: TLFrameShape, info: TLClickEventInfo): {
@@ -1801,15 +2109,15 @@ export declare function FrameToolbarItem(): JSX.Element;
1801
2109
  export declare interface GeoShapeOptions extends ShapeOptionsWithDisplayValues<TLGeoShape, GeoShapeUtilDisplayValues> {
1802
2110
  showTextOutline: boolean;
1803
2111
  /**
1804
- * A map of custom geo style definitions. Each key becomes a new value for
2112
+ * A map of custom geo type definitions. Each key becomes a new value for
1805
2113
  * {@link @tldraw/editor#GeoShapeGeoStyle} that can be used in the style panel
1806
- * and on shapes. Custom styles inherit all standard geo shape behavior
2114
+ * and on shapes. Custom geo types inherit all standard geo shape behavior
1807
2115
  * (labels, resizing, styling, etc.).
1808
2116
  *
1809
2117
  * @example
1810
2118
  * ```ts
1811
2119
  * const MyGeoShapeUtil = GeoShapeUtil.configure({
1812
- * customGeoStyles: {
2120
+ * customGeoTypes: {
1813
2121
  * 'my-shape': {
1814
2122
  * getPath: (w, h) => new PathBuilder().moveTo(0, 0).lineTo(w, 0).lineTo(w, h).lineTo(0, h).close(),
1815
2123
  * snapType: 'polygon',
@@ -1819,7 +2127,7 @@ export declare interface GeoShapeOptions extends ShapeOptionsWithDisplayValues<T
1819
2127
  * })
1820
2128
  * ```
1821
2129
  */
1822
- customGeoStyles?: Record<string, GeoTypeDefinition>;
2130
+ customGeoTypes?: Record<string, GeoTypeDefinition>;
1823
2131
  }
1824
2132
 
1825
2133
  /** @public */
@@ -1846,8 +2154,6 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
1846
2154
  getText(shape: TLGeoShape): string;
1847
2155
  getFontFaces(shape: TLGeoShape): TLFontFace[];
1848
2156
  component(shape: TLGeoShape): JSX.Element;
1849
- indicator(shape: TLGeoShape): JSX.Element | null;
1850
- useLegacyIndicator(): boolean;
1851
2157
  getIndicatorPath(shape: TLGeoShape): Path2D | undefined;
1852
2158
  toSvg(shape: TLGeoShape, ctx: SvgExportContext): JSX.Element;
1853
2159
  getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
@@ -2042,8 +2348,10 @@ export declare interface GeoShapeUtilDisplayValues {
2042
2348
  }
2043
2349
 
2044
2350
  /**
2045
- * Defines the behavior for a custom geo shape type. Register custom geo types
2046
- * via {@link @tldraw/tldraw#GeoShapeUtil.configure | GeoShapeUtil.configure()}.
2351
+ * Defines the behavior for a geo shape type. Every built-in geo type is
2352
+ * registered through this same interface (see {@link defaultGeoTypeDefinitions}),
2353
+ * and consumers can register additional types via
2354
+ * {@link @tldraw/tldraw#GeoShapeUtil.configure | GeoShapeUtil.configure()}.
2047
2355
  *
2048
2356
  * @public
2049
2357
  */
@@ -2155,6 +2463,14 @@ export declare function getFontFamily(theme: TLTheme, font: string): string;
2155
2463
  */
2156
2464
  export declare function getFontStyleItems(theme: TLTheme): StyleValuesForUi<string>;
2157
2465
 
2466
+ /**
2467
+ * Look up a geo type definition by name, checking custom types first then
2468
+ * falling back to the built-in registry.
2469
+ *
2470
+ * @public
2471
+ */
2472
+ export declare function getGeoTypeDefinition(name: string, customGeoTypes?: Record<string, GeoTypeDefinition>): GeoTypeDefinition | undefined;
2473
+
2158
2474
  /** @public */
2159
2475
  export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels?: boolean): TLShape | undefined;
2160
2476
 
@@ -2292,8 +2608,6 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
2292
2608
  getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
2293
2609
  component(shape: TLHighlightShape): JSX.Element;
2294
2610
  backgroundComponent(shape: TLHighlightShape): JSX.Element;
2295
- indicator(shape: TLHighlightShape): JSX.Element;
2296
- useLegacyIndicator(): boolean;
2297
2611
  getIndicatorPath(shape: TLHighlightShape): Path2D;
2298
2612
  toSvg(shape: TLHighlightShape, ctx: SvgExportContext): JSX.Element;
2299
2613
  toBackgroundSvg(shape: TLHighlightShape, ctx: SvgExportContext): JSX.Element;
@@ -2363,8 +2677,6 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
2363
2677
  getAriaDescriptor(shape: TLImageShape): string;
2364
2678
  onResize(shape: TLImageShape, info: TLResizeInfo<TLImageShape>): TLImageShape;
2365
2679
  component(shape: TLImageShape): JSX.Element;
2366
- indicator(shape: TLImageShape): JSX.Element | null;
2367
- useLegacyIndicator(): boolean;
2368
2680
  getIndicatorPath(shape: TLImageShape): Path2D | undefined;
2369
2681
  toSvg(shape: TLImageShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
2370
2682
  onDoubleClickEdge(shape: TLImageShape): void;
@@ -2375,6 +2687,9 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
2375
2687
  export declare interface ImageShapeUtilDisplayValues {
2376
2688
  }
2377
2689
 
2690
+ /** @public @react */
2691
+ export declare function InputModeMenu(): JSX.Element;
2692
+
2378
2693
  /** @public */
2379
2694
  export declare const KeyboardShiftEnterTweakExtension: Extension<any, any>;
2380
2695
 
@@ -2499,8 +2814,6 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
2499
2814
  y: number;
2500
2815
  } | undefined;
2501
2816
  component(shape: TLLineShape): JSX.Element;
2502
- indicator(shape: TLLineShape): JSX.Element | null;
2503
- useLegacyIndicator(): boolean;
2504
2817
  getIndicatorPath(shape: TLLineShape): Path2D;
2505
2818
  toSvg(shape: TLLineShape, ctx: SvgExportContext): JSX.Element;
2506
2819
  getHandleSnapGeometry(shape: TLLineShape): HandleSnapGeometry;
@@ -2578,8 +2891,6 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
2578
2891
  getReferencedUserIds(shape: TLNoteShape): string[];
2579
2892
  getFontFaces(shape: TLNoteShape): TLFontFace[];
2580
2893
  component(shape: TLNoteShape): JSX.Element;
2581
- indicator(shape: TLNoteShape): JSX.Element;
2582
- useLegacyIndicator(): boolean;
2583
2894
  getIndicatorPath(shape: TLNoteShape): Path2D;
2584
2895
  toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX.Element;
2585
2896
  onBeforeCreate(next: TLNoteShape): {
@@ -3071,9 +3382,71 @@ export declare const RTL_LANGUAGES: Set<string>;
3071
3382
  */
3072
3383
  export declare function sanitizeSvg(svgText: string): string;
3073
3384
 
3385
+ /**
3386
+ * Overlay util for scribble strokes (eraser, lasso selection, etc.).
3387
+ *
3388
+ * @public
3389
+ */
3390
+ export declare class ScribbleOverlayUtil extends OverlayUtil<TLScribbleOverlay> {
3391
+ static type: string;
3392
+ options: {
3393
+ cacheSize: number;
3394
+ streamline: number;
3395
+ zIndex: number;
3396
+ };
3397
+ private _scribblePathCache;
3398
+ isActive(): boolean;
3399
+ getOverlays(): TLScribbleOverlay[];
3400
+ render(ctx: CanvasRenderingContext2D, overlays: TLScribbleOverlay[]): void;
3401
+ }
3402
+
3074
3403
  /** @public @react */
3075
3404
  export declare function SelectAllMenuItem(): JSX.Element;
3076
3405
 
3406
+ /**
3407
+ * Overlay util for selection foreground handles (resize corners/edges, rotate corners, mobile rotate).
3408
+ * Each interactive element of the selection foreground becomes its own overlay instance.
3409
+ *
3410
+ * @public
3411
+ */
3412
+ export declare class SelectionForegroundOverlayUtil extends OverlayUtil<TLSelectionForegroundOverlay> {
3413
+ static type: string;
3414
+ options: {
3415
+ lineWidth: number;
3416
+ zIndex: number;
3417
+ };
3418
+ isActive(): boolean;
3419
+ getOverlays(): TLSelectionForegroundOverlay[];
3420
+ getGeometry(overlay: TLSelectionForegroundOverlay): Geometry2d | null;
3421
+ render(ctx: CanvasRenderingContext2D, _overlays: TLSelectionForegroundOverlay[]): void;
3422
+ getCursor(overlay: TLSelectionForegroundOverlay): TLCursorType | undefined;
3423
+ private _collectResizeCornerOverlays;
3424
+ private _collectResizeEdgeOverlays;
3425
+ private _collectRotateOverlays;
3426
+ private _getResizeHandleGeometry;
3427
+ private _getRotateHandleGeometry;
3428
+ private _getMobileRotateGeometry;
3429
+ private _renderSelectionBox;
3430
+ private _renderResizeCorners;
3431
+ private _renderCropHandles;
3432
+ private _renderMobileRotateHandle;
3433
+ private _renderTextResizeHandles;
3434
+ /**
3435
+ * Single source of truth for the derived state the selection foreground needs.
3436
+ * Called from `getOverlays()`, `getGeometry()`, and `render()` so their visibility
3437
+ * predicates can't drift. Returns `null` when no selection UI should appear at all
3438
+ * (nothing selected, or the only selected shape is hidden).
3439
+ */
3440
+ private _computeSelectionState;
3441
+ private _getMobileRotateCenter;
3442
+ private _getThemeColors;
3443
+ private _makeOverlay;
3444
+ private _getEdgeLocalPoints;
3445
+ private _getRotateHandleLocalCenter;
3446
+ private _getCornerLocalPoint;
3447
+ private _localRectToPoints;
3448
+ }
3449
+
3077
3450
  /** @public */
3078
3451
  export declare class SelectTool extends StateNode {
3079
3452
  static id: string;
@@ -3102,12 +3475,48 @@ export declare function serializeTldrawJsonBlob(editor: Editor): Promise<Blob>;
3102
3475
  /** @public */
3103
3476
  export declare function setStrokePointRadii(strokePoints: StrokePoint[], options: StrokeOptions): StrokePoint[];
3104
3477
 
3478
+ /**
3479
+ * Overlay util for shape handles (arrow endpoints, line vertices, etc.).
3480
+ *
3481
+ * @public
3482
+ */
3483
+ export declare class ShapeHandleOverlayUtil extends OverlayUtil<TLShapeHandleOverlay> {
3484
+ static type: string;
3485
+ options: {
3486
+ lineWidth: number;
3487
+ zIndex: number;
3488
+ };
3489
+ isActive(): boolean;
3490
+ getOverlays(): TLShapeHandleOverlay[];
3491
+ getGeometry(overlay: TLShapeHandleOverlay): Geometry2d | null;
3492
+ getCursor(_overlay: TLShapeHandleOverlay): TLCursorType | undefined;
3493
+ render(ctx: CanvasRenderingContext2D, overlays: TLShapeHandleOverlay[]): void;
3494
+ }
3495
+
3105
3496
  /** @public */
3106
3497
  export declare interface ShapeOptionsWithDisplayValues<Shape extends TLShape, DisplayValues extends object> {
3107
3498
  getDefaultDisplayValues(editor: Editor, shape: Shape, theme: TLTheme, colorMode: 'dark' | 'light'): DisplayValues;
3108
3499
  getCustomDisplayValues(editor: Editor, shape: Shape, theme: TLTheme, colorMode: 'dark' | 'light'): Partial<DisplayValues>;
3109
3500
  }
3110
3501
 
3502
+ /**
3503
+ * Overlay util for snap alignment indicators (point snap lines and gap indicators).
3504
+ *
3505
+ * @public
3506
+ */
3507
+ export declare class SnapIndicatorOverlayUtil extends OverlayUtil<TLSnapIndicatorOverlay> {
3508
+ static type: string;
3509
+ options: {
3510
+ lineWidth: number;
3511
+ zIndex: number;
3512
+ };
3513
+ isActive(): boolean;
3514
+ getOverlays(): TLSnapIndicatorOverlay[];
3515
+ render(ctx: CanvasRenderingContext2D, overlays: TLSnapIndicatorOverlay[]): void;
3516
+ private _renderPoints;
3517
+ private _renderGaps;
3518
+ }
3519
+
3111
3520
  /** @public */
3112
3521
  export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
3113
3522
  style: 'solid';
@@ -3372,8 +3781,6 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
3372
3781
  canEdit(shape: TLTextShape): boolean;
3373
3782
  isAspectRatioLocked(shape: TLTextShape): boolean;
3374
3783
  component(shape: TLTextShape): JSX.Element;
3375
- indicator(shape: TLTextShape): JSX.Element | null;
3376
- useLegacyIndicator(): boolean;
3377
3784
  getIndicatorPath(shape: TLTextShape): Path2D | undefined;
3378
3785
  toSvg(shape: TLTextShape, ctx: SvgExportContext): JSX.Element;
3379
3786
  onResize(shape: TLTextShape, info: TLResizeInfo<TLTextShape>): {
@@ -3467,12 +3874,55 @@ export declare interface TLArcInfo {
3467
3874
  sweepFlag: number;
3468
3875
  }
3469
3876
 
3877
+ /** @public */
3878
+ export declare interface TLArrowBindingHintOverlay extends TLOverlay {
3879
+ props: {
3880
+ arrowId: TLShapeId;
3881
+ };
3882
+ }
3883
+
3470
3884
  /** @public */
3471
3885
  export declare interface TLArrowBindings {
3472
3886
  start: TLArrowBinding | undefined;
3473
3887
  end: TLArrowBinding | undefined;
3474
3888
  }
3475
3889
 
3890
+ /** @public */
3891
+ export declare interface TLArrowHintOverlay extends TLOverlay {
3892
+ props: {
3893
+ anchorX: number;
3894
+ anchorY: number;
3895
+ arrowKind: string;
3896
+ handles: {
3897
+ bottom: {
3898
+ isEnabled: boolean;
3899
+ x: number;
3900
+ y: number;
3901
+ };
3902
+ left: {
3903
+ isEnabled: boolean;
3904
+ x: number;
3905
+ y: number;
3906
+ };
3907
+ right: {
3908
+ isEnabled: boolean;
3909
+ x: number;
3910
+ y: number;
3911
+ };
3912
+ top: {
3913
+ isEnabled: boolean;
3914
+ x: number;
3915
+ y: number;
3916
+ };
3917
+ };
3918
+ isExact: boolean;
3919
+ isPrecise: boolean;
3920
+ showEdgeHints: boolean;
3921
+ snap: string;
3922
+ targetId: TLShapeId;
3923
+ };
3924
+ }
3925
+
3476
3926
  /** @public */
3477
3927
  export declare type TLArrowInfo = TLArcArrowInfo | TLElbowArrowInfo | TLStraightArrowInfo;
3478
3928
 
@@ -3483,6 +3933,68 @@ export declare interface TLArrowPoint {
3483
3933
  arrowhead: TLArrowShapeArrowheadStyle;
3484
3934
  }
3485
3935
 
3936
+ /** @public */
3937
+ export declare interface TLBrushOverlay extends TLOverlay {
3938
+ props: {
3939
+ h: number;
3940
+ w: number;
3941
+ x: number;
3942
+ y: number;
3943
+ };
3944
+ }
3945
+
3946
+ /** @public */
3947
+ export declare interface TLCollaboratorBrushOverlay extends TLOverlay {
3948
+ props: {
3949
+ color: string;
3950
+ h: number;
3951
+ w: number;
3952
+ x: number;
3953
+ y: number;
3954
+ };
3955
+ }
3956
+
3957
+ /** @public */
3958
+ export declare interface TLCollaboratorCursorOverlay extends TLOverlay {
3959
+ props: {
3960
+ chatMessage: string;
3961
+ color: string;
3962
+ name: null | string;
3963
+ x: number;
3964
+ y: number;
3965
+ };
3966
+ }
3967
+
3968
+ /** @public */
3969
+ export declare interface TLCollaboratorHintOverlay extends TLOverlay {
3970
+ props: {
3971
+ /** Clamped point on viewport edge, in page coordinates */
3972
+ x: number;
3973
+ /** Rotation angle pointing toward the collaborator's actual cursor */
3974
+ rotation: number;
3975
+ color: string;
3976
+ y: number;
3977
+ };
3978
+ }
3979
+
3980
+ /** @public */
3981
+ export declare interface TLCollaboratorScribbleOverlay extends TLOverlay {
3982
+ props: {
3983
+ color: string;
3984
+ scribble: TLScribble;
3985
+ };
3986
+ }
3987
+
3988
+ /** @public */
3989
+ export declare interface TLCollaboratorShapeIndicatorOverlay extends TLOverlay {
3990
+ props: {
3991
+ indicators: Array<{
3992
+ color: string;
3993
+ shapeIds: TLShapeId[];
3994
+ }>;
3995
+ };
3996
+ }
3997
+
3486
3998
  /**
3487
3999
  * Override the default react components used by the editor and UI. Set components to null to
3488
4000
  * disable them entirely.
@@ -3541,9 +4053,6 @@ export declare function Tldraw(props: TldrawProps): JSX.Element;
3541
4053
  /** @public */
3542
4054
  export declare const TLDRAW_FILE_EXTENSION: ".tldr";
3543
4055
 
3544
- /** @public @react */
3545
- export declare function TldrawArrowHints(): JSX.Element | null;
3546
-
3547
4056
  /** @public */
3548
4057
  export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps {
3549
4058
  /** Urls for custom assets.
@@ -3569,17 +4078,19 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
3569
4078
  * @deprecated Use `options.text` instead. This prop will be removed in a future release.
3570
4079
  */
3571
4080
  textOptions?: TLTextOptions;
3572
- }
3573
-
3574
- /** @public @react */
3575
- export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles }: TldrawCropHandlesProps): JSX.Element;
3576
-
3577
- /** @public */
3578
- export declare interface TldrawCropHandlesProps {
3579
- size: number;
3580
- width: number;
3581
- height: number;
3582
- hideAlternateHandles: boolean;
4081
+ /**
4082
+ * The locale to use for the editor's UI. When set, this takes priority over
4083
+ * both the browser's language preferences (`navigator.languages`) and the
4084
+ * user's locale preference (e.g. via
4085
+ * `editor.user.updateUserPreferences({ locale: '...' })`), giving the
4086
+ * application explicit control over the displayed language.
4087
+ *
4088
+ * @example
4089
+ * ```tsx
4090
+ * <Tldraw locale="fr" />
4091
+ * ```
4092
+ */
4093
+ locale?: string;
3583
4094
  }
3584
4095
 
3585
4096
  /** @public */
@@ -3607,9 +4118,6 @@ export declare type TldrawFileParseError = {
3607
4118
  version: number;
3608
4119
  };
3609
4120
 
3610
- /** @public @react */
3611
- export declare function TldrawHandles({ children }: TLHandlesProps): JSX.Element | null;
3612
-
3613
4121
  /**
3614
4122
  * A rendered SVG image of a Tldraw snapshot.
3615
4123
  *
@@ -3672,21 +4180,9 @@ export declare interface TldrawImageProps extends TLImageExportOptions {
3672
4180
  textOptions?: TLTextOptions;
3673
4181
  }
3674
4182
 
3675
- /** @public @react */
3676
- export declare function TldrawOverlays(): JSX.Element | null;
3677
-
3678
4183
  /** @public */
3679
4184
  export declare type TldrawProps = TldrawBaseProps & TldrawEditorStoreProps;
3680
4185
 
3681
- /** @public @react */
3682
- export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps): JSX.Element | null;
3683
-
3684
- /** @public */
3685
- export declare const TldrawSelectionForeground: NamedExoticComponent<TLSelectionForegroundProps>;
3686
-
3687
- /** @public @react */
3688
- export declare function TldrawShapeIndicators(): JSX.Element;
3689
-
3690
4186
  /**
3691
4187
  * @public
3692
4188
  * @react
@@ -4034,21 +4530,55 @@ export declare interface TLExternalContentProps {
4034
4530
  */
4035
4531
  maxAssetSize?: number;
4036
4532
  /**
4037
- * The mime types of images that are allowed to be handled. When using the
4038
- * `Tldraw` component, defaults to `DEFAULT_SUPPORTED_IMAGE_TYPES`. If neither
4039
- * this nor `acceptedVideoMimeTypes` is provided, the registered asset utils
4040
- * determine which MIME types are allowed.
4533
+ * The mime types of images that are allowed to be handled. When passed to
4534
+ * the `Tldraw` component, this also reconfigures the default `ImageAssetUtil`
4535
+ * to only accept files matching these types. If you only want to accept a
4536
+ * subset of image types and want to additionally block videos, pass
4537
+ * `acceptedVideoMimeTypes={[]}`. A file is accepted if its MIME type is in
4538
+ * this list, in `acceptedVideoMimeTypes`, or if any registered asset util
4539
+ * accepts it.
4041
4540
  */
4042
4541
  acceptedImageMimeTypes?: readonly string[];
4043
4542
  /**
4044
- * The mime types of videos that are allowed to be handled. When using the
4045
- * `Tldraw` component, defaults to `DEFAULT_SUPPORT_VIDEO_TYPES`. If neither
4046
- * this nor `acceptedImageMimeTypes` is provided, the registered asset utils
4047
- * determine which MIME types are allowed.
4543
+ * The mime types of videos that are allowed to be handled. When passed to
4544
+ * the `Tldraw` component, this also reconfigures the default `VideoAssetUtil`
4545
+ * to only accept files matching these types. A file is accepted if its MIME
4546
+ * type is in this list, in `acceptedImageMimeTypes`, or if any registered
4547
+ * asset util accepts it.
4048
4548
  */
4049
4549
  acceptedVideoMimeTypes?: readonly string[];
4050
4550
  }
4051
4551
 
4552
+ /** @public */
4553
+ export declare interface TLScribbleOverlay extends TLOverlay {
4554
+ props: {
4555
+ scribble: TLScribble;
4556
+ };
4557
+ }
4558
+
4559
+ /** @public */
4560
+ export declare interface TLSelectionForegroundOverlay extends TLOverlay {
4561
+ props: {
4562
+ handle: RotateCorner | TLSelectionHandle;
4563
+ overlayType: 'mobile_rotate' | 'resize_handle' | 'rotate_handle';
4564
+ };
4565
+ }
4566
+
4567
+ /** @public */
4568
+ export declare interface TLShapeHandleOverlay extends TLOverlay {
4569
+ props: {
4570
+ handle: TLHandle;
4571
+ shapeId: TLShapeId;
4572
+ };
4573
+ }
4574
+
4575
+ /** @public */
4576
+ export declare interface TLSnapIndicatorOverlay extends TLOverlay {
4577
+ props: {
4578
+ line: SnapIndicator;
4579
+ };
4580
+ }
4581
+
4052
4582
  /** @public */
4053
4583
  export declare interface TLStraightArrowInfo {
4054
4584
  bindings: TLArrowBindings;
@@ -4983,7 +5513,7 @@ export declare interface TLUiTranslation {
4983
5513
  export declare type TLUiTranslationContextType = TLUiTranslation;
4984
5514
 
4985
5515
  /** @public */
4986
- 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-json.short' | 'action.copy-as-json' | '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.enhanced-a11y-mode.menu' | 'action.enhanced-a11y-mode' | '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.select-zoom-tool' | '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-none' | 'action.toggle-auto-pan' | 'action.toggle-auto-size' | 'action.toggle-auto-zoom' | '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-invert-zoom.menu' | 'action.toggle-invert-zoom' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-mouse' | '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-trackpad' | '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-quick' | '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.maximum-size' | '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.lined-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-2' | '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.input-device' | '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.selected' | '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-confirm' | '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';
5516
+ 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-json.short' | 'action.copy-as-json' | '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.enhanced-a11y-mode.menu' | 'action.enhanced-a11y-mode' | '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.select-zoom-tool' | '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-none' | 'action.toggle-auto-pan' | 'action.toggle-auto-size' | 'action.toggle-auto-zoom' | '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-invert-zoom.menu' | 'action.toggle-invert-zoom' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-mouse' | '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-trackpad' | '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-quick' | '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.maximum-size' | '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.lined-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-2' | '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.color-theme' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.input-device' | '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.selected' | '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-confirm' | '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';
4987
5517
 
4988
5518
  /** @public */
4989
5519
  export declare interface TLUiTranslationProviderProps {
@@ -5077,6 +5607,16 @@ export declare interface TLUiZoomMenuProps {
5077
5607
 
5078
5608
  /* Excluded from this release type: TLV1VideoShape */
5079
5609
 
5610
+ /** @public */
5611
+ export declare interface TLZoomBrushOverlay extends TLOverlay {
5612
+ props: {
5613
+ h: number;
5614
+ w: number;
5615
+ x: number;
5616
+ y: number;
5617
+ };
5618
+ }
5619
+
5080
5620
  /** @public @react */
5081
5621
  export declare function ToggleAutoSizeMenuItem(): JSX.Element | null;
5082
5622
 
@@ -5474,8 +6014,6 @@ export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
5474
6014
  createShapeForAsset(asset: TLAsset, position: VecModel): null | TLShapePartial;
5475
6015
  getAriaDescriptor(shape: TLVideoShape): string;
5476
6016
  component(shape: TLVideoShape): JSX.Element;
5477
- indicator(shape: TLVideoShape): JSX.Element;
5478
- useLegacyIndicator(): boolean;
5479
6017
  getIndicatorPath(shape: TLVideoShape): Path2D;
5480
6018
  toSvg(shape: TLVideoShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
5481
6019
  }
@@ -5490,6 +6028,23 @@ export declare function ViewSubmenu(): JSX.Element;
5490
6028
  /** @public @react */
5491
6029
  export declare function XBoxToolbarItem(): JSX.Element;
5492
6030
 
6031
+ /**
6032
+ * Overlay util for the zoom brush rectangle.
6033
+ *
6034
+ * @public
6035
+ */
6036
+ export declare class ZoomBrushOverlayUtil extends OverlayUtil<TLZoomBrushOverlay> {
6037
+ static type: string;
6038
+ options: {
6039
+ lineWidth: number;
6040
+ zIndex: number;
6041
+ };
6042
+ isActive(): boolean;
6043
+ getOverlays(): TLZoomBrushOverlay[];
6044
+ render(ctx: CanvasRenderingContext2D, overlays: TLZoomBrushOverlay[]): void;
6045
+ renderMinimap(ctx: CanvasRenderingContext2D, overlays: TLZoomBrushOverlay[], zoom: number): void;
6046
+ }
6047
+
5493
6048
  /** @public @react */
5494
6049
  export declare function ZoomOrRotateMenuItem(): JSX.Element;
5495
6050