@bigbluebutton/tldraw 2.0.0-alpha.19

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 (1357) hide show
  1. package/LICENSE +190 -0
  2. package/dist-cjs/index.d.ts +2954 -0
  3. package/dist-cjs/index.js +216 -0
  4. package/dist-cjs/index.js.map +7 -0
  5. package/dist-cjs/lib/Tldraw.js +136 -0
  6. package/dist-cjs/lib/Tldraw.js.map +7 -0
  7. package/dist-cjs/lib/canvas/TldrawCropHandles.js +164 -0
  8. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +7 -0
  9. package/dist-cjs/lib/canvas/TldrawHandles.js +37 -0
  10. package/dist-cjs/lib/canvas/TldrawHandles.js.map +7 -0
  11. package/dist-cjs/lib/canvas/TldrawHoveredShapeIndicator.js +42 -0
  12. package/dist-cjs/lib/canvas/TldrawHoveredShapeIndicator.js.map +7 -0
  13. package/dist-cjs/lib/canvas/TldrawScribble.js +72 -0
  14. package/dist-cjs/lib/canvas/TldrawScribble.js.map +7 -0
  15. package/dist-cjs/lib/canvas/TldrawSelectionBackground.js +44 -0
  16. package/dist-cjs/lib/canvas/TldrawSelectionBackground.js.map +7 -0
  17. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +509 -0
  18. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +7 -0
  19. package/dist-cjs/lib/defaultExternalContentHandlers.js +400 -0
  20. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +7 -0
  21. package/dist-cjs/lib/defaultShapeTools.js +42 -0
  22. package/dist-cjs/lib/defaultShapeTools.js.map +7 -0
  23. package/dist-cjs/lib/defaultShapeUtils.js +50 -0
  24. package/dist-cjs/lib/defaultShapeUtils.js.map +7 -0
  25. package/dist-cjs/lib/defaultSideEffects.js +69 -0
  26. package/dist-cjs/lib/defaultSideEffects.js.map +7 -0
  27. package/dist-cjs/lib/defaultTools.js +30 -0
  28. package/dist-cjs/lib/defaultTools.js.map +7 -0
  29. package/dist-cjs/lib/shapes/arrow/ArrowShapeTool.js +33 -0
  30. package/dist-cjs/lib/shapes/arrow/ArrowShapeTool.js.map +7 -0
  31. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +805 -0
  32. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +7 -0
  33. package/dist-cjs/lib/shapes/arrow/components/ArrowTextLabel.js +114 -0
  34. package/dist-cjs/lib/shapes/arrow/components/ArrowTextLabel.js.map +7 -0
  35. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js +53 -0
  36. package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js.map +7 -0
  37. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +182 -0
  38. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +7 -0
  39. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +163 -0
  40. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +7 -0
  41. package/dist-cjs/lib/shapes/draw/DrawShapeTool.js +37 -0
  42. package/dist-cjs/lib/shapes/draw/DrawShapeTool.js.map +7 -0
  43. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +243 -0
  44. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +7 -0
  45. package/dist-cjs/lib/shapes/draw/getPath.js +102 -0
  46. package/dist-cjs/lib/shapes/draw/getPath.js.map +7 -0
  47. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +556 -0
  48. package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +7 -0
  49. package/dist-cjs/lib/shapes/draw/toolStates/Idle.js +37 -0
  50. package/dist-cjs/lib/shapes/draw/toolStates/Idle.js.map +7 -0
  51. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +192 -0
  52. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +7 -0
  53. package/dist-cjs/lib/shapes/frame/FrameShapeTool.js +66 -0
  54. package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +7 -0
  55. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +234 -0
  56. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +7 -0
  57. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +106 -0
  58. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +7 -0
  59. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +101 -0
  60. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +7 -0
  61. package/dist-cjs/lib/shapes/geo/GeoShapeTool.js +33 -0
  62. package/dist-cjs/lib/shapes/geo/GeoShapeTool.js.map +7 -0
  63. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +999 -0
  64. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +7 -0
  65. package/dist-cjs/lib/shapes/geo/cloudOutline.js +288 -0
  66. package/dist-cjs/lib/shapes/geo/cloudOutline.js.map +7 -0
  67. package/dist-cjs/lib/shapes/geo/components/DashStyleCloud.js +124 -0
  68. package/dist-cjs/lib/shapes/geo/components/DashStyleCloud.js.map +7 -0
  69. package/dist-cjs/lib/shapes/geo/components/DashStyleEllipse.js +123 -0
  70. package/dist-cjs/lib/shapes/geo/components/DashStyleEllipse.js.map +7 -0
  71. package/dist-cjs/lib/shapes/geo/components/DashStyleOval.js +118 -0
  72. package/dist-cjs/lib/shapes/geo/components/DashStyleOval.js.map +7 -0
  73. package/dist-cjs/lib/shapes/geo/components/DashStylePolygon.js +155 -0
  74. package/dist-cjs/lib/shapes/geo/components/DashStylePolygon.js.map +7 -0
  75. package/dist-cjs/lib/shapes/geo/components/DrawStyleCloud.js +79 -0
  76. package/dist-cjs/lib/shapes/geo/components/DrawStyleCloud.js.map +7 -0
  77. package/dist-cjs/lib/shapes/geo/components/DrawStyleEllipse.js +133 -0
  78. package/dist-cjs/lib/shapes/geo/components/DrawStyleEllipse.js.map +7 -0
  79. package/dist-cjs/lib/shapes/geo/components/DrawStylePolygon.js +93 -0
  80. package/dist-cjs/lib/shapes/geo/components/DrawStylePolygon.js.map +7 -0
  81. package/dist-cjs/lib/shapes/geo/components/SolidStyleCloud.js +79 -0
  82. package/dist-cjs/lib/shapes/geo/components/SolidStyleCloud.js.map +7 -0
  83. package/dist-cjs/lib/shapes/geo/components/SolidStyleEllipse.js +84 -0
  84. package/dist-cjs/lib/shapes/geo/components/SolidStyleEllipse.js.map +7 -0
  85. package/dist-cjs/lib/shapes/geo/components/SolidStyleOval.js +99 -0
  86. package/dist-cjs/lib/shapes/geo/components/SolidStyleOval.js.map +7 -0
  87. package/dist-cjs/lib/shapes/geo/components/SolidStylePolygon.js +86 -0
  88. package/dist-cjs/lib/shapes/geo/components/SolidStylePolygon.js.map +7 -0
  89. package/dist-cjs/lib/shapes/geo/helpers.js +53 -0
  90. package/dist-cjs/lib/shapes/geo/helpers.js.map +7 -0
  91. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js +53 -0
  92. package/dist-cjs/lib/shapes/geo/toolStates/Idle.js.map +7 -0
  93. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +118 -0
  94. package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +7 -0
  95. package/dist-cjs/lib/shapes/highlight/HighlightShapeTool.js +37 -0
  96. package/dist-cjs/lib/shapes/highlight/HighlightShapeTool.js.map +7 -0
  97. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +208 -0
  98. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +7 -0
  99. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +262 -0
  100. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +7 -0
  101. package/dist-cjs/lib/shapes/line/LineShapeTool.js +33 -0
  102. package/dist-cjs/lib/shapes/line/LineShapeTool.js.map +7 -0
  103. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +359 -0
  104. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +7 -0
  105. package/dist-cjs/lib/shapes/line/components/getLinePath.js +88 -0
  106. package/dist-cjs/lib/shapes/line/components/getLinePath.js.map +7 -0
  107. package/dist-cjs/lib/shapes/line/components/svg.js +73 -0
  108. package/dist-cjs/lib/shapes/line/components/svg.js.map +7 -0
  109. package/dist-cjs/lib/shapes/line/toolStates/Idle.js +39 -0
  110. package/dist-cjs/lib/shapes/line/toolStates/Idle.js.map +7 -0
  111. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js +145 -0
  112. package/dist-cjs/lib/shapes/line/toolStates/Pointing.js.map +7 -0
  113. package/dist-cjs/lib/shapes/note/NoteShapeTool.js +33 -0
  114. package/dist-cjs/lib/shapes/note/NoteShapeTool.js.map +7 -0
  115. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +205 -0
  116. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +7 -0
  117. package/dist-cjs/lib/shapes/note/toolStates/Idle.js +37 -0
  118. package/dist-cjs/lib/shapes/note/toolStates/Idle.js.map +7 -0
  119. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js +114 -0
  120. package/dist-cjs/lib/shapes/note/toolStates/Pointing.js.map +7 -0
  121. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +65 -0
  122. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +7 -0
  123. package/dist-cjs/lib/shapes/shared/ShapeFill.js +117 -0
  124. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +7 -0
  125. package/dist-cjs/lib/shapes/shared/TextHelpers.js +228 -0
  126. package/dist-cjs/lib/shapes/shared/TextHelpers.js.map +7 -0
  127. package/dist-cjs/lib/shapes/shared/TextLabel.js +138 -0
  128. package/dist-cjs/lib/shapes/shared/TextLabel.js.map +7 -0
  129. package/dist-cjs/lib/shapes/shared/createTextSvgElementFromSpans.js +75 -0
  130. package/dist-cjs/lib/shapes/shared/createTextSvgElementFromSpans.js.map +7 -0
  131. package/dist-cjs/lib/shapes/shared/default-shape-constants.js +72 -0
  132. package/dist-cjs/lib/shapes/shared/default-shape-constants.js.map +7 -0
  133. package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js +252 -0
  134. package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js.map +7 -0
  135. package/dist-cjs/lib/shapes/shared/freehand/getStroke.js +33 -0
  136. package/dist-cjs/lib/shapes/shared/freehand/getStroke.js.map +7 -0
  137. package/dist-cjs/lib/shapes/shared/freehand/getStrokeOutlinePoints.js +175 -0
  138. package/dist-cjs/lib/shapes/shared/freehand/getStrokeOutlinePoints.js.map +7 -0
  139. package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js +144 -0
  140. package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js.map +7 -0
  141. package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js +27 -0
  142. package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js.map +7 -0
  143. package/dist-cjs/lib/shapes/shared/freehand/setStrokePointRadii.js +101 -0
  144. package/dist-cjs/lib/shapes/shared/freehand/setStrokePointRadii.js.map +7 -0
  145. package/dist-cjs/lib/shapes/shared/freehand/svg.js +56 -0
  146. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +7 -0
  147. package/dist-cjs/lib/shapes/shared/freehand/svgInk.js +163 -0
  148. package/dist-cjs/lib/shapes/shared/freehand/svgInk.js.map +7 -0
  149. package/dist-cjs/lib/shapes/shared/freehand/types.js +17 -0
  150. package/dist-cjs/lib/shapes/shared/freehand/types.js.map +7 -0
  151. package/dist-cjs/lib/shapes/shared/getBrowserCanvasMaxSize.js +52 -0
  152. package/dist-cjs/lib/shapes/shared/getBrowserCanvasMaxSize.js.map +7 -0
  153. package/dist-cjs/lib/shapes/shared/getPerfectDashProps.js +96 -0
  154. package/dist-cjs/lib/shapes/shared/getPerfectDashProps.js.map +7 -0
  155. package/dist-cjs/lib/shapes/shared/getTextLabelSvgElement.js +56 -0
  156. package/dist-cjs/lib/shapes/shared/getTextLabelSvgElement.js.map +7 -0
  157. package/dist-cjs/lib/shapes/shared/legacyProps.js +42 -0
  158. package/dist-cjs/lib/shapes/shared/legacyProps.js.map +7 -0
  159. package/dist-cjs/lib/shapes/shared/polygon-helpers.js +116 -0
  160. package/dist-cjs/lib/shapes/shared/polygon-helpers.js.map +7 -0
  161. package/dist-cjs/lib/shapes/shared/resizeBox.js +117 -0
  162. package/dist-cjs/lib/shapes/shared/resizeBox.js.map +7 -0
  163. package/dist-cjs/lib/shapes/shared/resizeScaled.js +48 -0
  164. package/dist-cjs/lib/shapes/shared/resizeScaled.js.map +7 -0
  165. package/dist-cjs/lib/shapes/shared/rotated-box-shadow.js +50 -0
  166. package/dist-cjs/lib/shapes/shared/rotated-box-shadow.js.map +7 -0
  167. package/dist-cjs/lib/shapes/shared/useColorSpace.js +39 -0
  168. package/dist-cjs/lib/shapes/shared/useColorSpace.js.map +7 -0
  169. package/dist-cjs/lib/shapes/shared/useEditableText.js +179 -0
  170. package/dist-cjs/lib/shapes/shared/useEditableText.js.map +7 -0
  171. package/dist-cjs/lib/shapes/shared/useForceSolid.js +29 -0
  172. package/dist-cjs/lib/shapes/shared/useForceSolid.js.map +7 -0
  173. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +38 -0
  174. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +7 -0
  175. package/dist-cjs/lib/shapes/text/TextShapeTool.js +33 -0
  176. package/dist-cjs/lib/shapes/text/TextShapeTool.js.map +7 -0
  177. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +341 -0
  178. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +7 -0
  179. package/dist-cjs/lib/shapes/text/toolStates/Idle.js +62 -0
  180. package/dist-cjs/lib/shapes/text/toolStates/Idle.js.map +7 -0
  181. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js +109 -0
  182. package/dist-cjs/lib/shapes/text/toolStates/Pointing.js.map +7 -0
  183. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +202 -0
  184. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +7 -0
  185. package/dist-cjs/lib/tools/EraserTool/EraserTool.js +36 -0
  186. package/dist-cjs/lib/tools/EraserTool/EraserTool.js.map +7 -0
  187. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +111 -0
  188. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +7 -0
  189. package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js +34 -0
  190. package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js.map +7 -0
  191. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +84 -0
  192. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +7 -0
  193. package/dist-cjs/lib/tools/HandTool/HandTool.js +58 -0
  194. package/dist-cjs/lib/tools/HandTool/HandTool.js.map +7 -0
  195. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js +58 -0
  196. package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js.map +7 -0
  197. package/dist-cjs/lib/tools/HandTool/childStates/Idle.js +37 -0
  198. package/dist-cjs/lib/tools/HandTool/childStates/Idle.js.map +7 -0
  199. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js +55 -0
  200. package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js.map +7 -0
  201. package/dist-cjs/lib/tools/LaserTool/LaserTool.js +35 -0
  202. package/dist-cjs/lib/tools/LaserTool/LaserTool.js.map +7 -0
  203. package/dist-cjs/lib/tools/LaserTool/childStates/Idle.js +31 -0
  204. package/dist-cjs/lib/tools/LaserTool/childStates/Idle.js.map +7 -0
  205. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js +66 -0
  206. package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js.map +7 -0
  207. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +100 -0
  208. package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +7 -0
  209. package/dist-cjs/lib/tools/SelectTool/SelectTool.js +70 -0
  210. package/dist-cjs/lib/tools/SelectTool/SelectTool.js.map +7 -0
  211. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +145 -0
  212. package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +7 -0
  213. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/Crop.js +33 -0
  214. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/Crop.js.map +7 -0
  215. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +204 -0
  216. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +7 -0
  217. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +39 -0
  218. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +7 -0
  219. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js +101 -0
  220. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js.map +7 -0
  221. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js +58 -0
  222. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js.map +7 -0
  223. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/crop-constants.js +25 -0
  224. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/crop-constants.js.map +7 -0
  225. package/dist-cjs/lib/tools/SelectTool/childStates/Cropping.js +210 -0
  226. package/dist-cjs/lib/tools/SelectTool/childStates/Cropping.js.map +7 -0
  227. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +230 -0
  228. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +7 -0
  229. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +121 -0
  230. package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +7 -0
  231. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +461 -0
  232. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +7 -0
  233. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js +56 -0
  234. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js.map +7 -0
  235. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCropHandle.js +89 -0
  236. package/dist-cjs/lib/tools/SelectTool/childStates/PointingCropHandle.js.map +7 -0
  237. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +67 -0
  238. package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +7 -0
  239. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +91 -0
  240. package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +7 -0
  241. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +83 -0
  242. package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +7 -0
  243. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js +73 -0
  244. package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js.map +7 -0
  245. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +176 -0
  246. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +7 -0
  247. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +371 -0
  248. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +7 -0
  249. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +148 -0
  250. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +7 -0
  251. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +140 -0
  252. package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +7 -0
  253. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +315 -0
  254. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +7 -0
  255. package/dist-cjs/lib/tools/SelectTool/children/DraggingHandle.js +230 -0
  256. package/dist-cjs/lib/tools/SelectTool/children/DraggingHandle.js.map +7 -0
  257. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js +79 -0
  258. package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js.map +7 -0
  259. package/dist-cjs/lib/tools/ZoomTool/childStates/Idle.js +35 -0
  260. package/dist-cjs/lib/tools/ZoomTool/childStates/Idle.js.map +7 -0
  261. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js +55 -0
  262. package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js.map +7 -0
  263. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js +72 -0
  264. package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js.map +7 -0
  265. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +41 -0
  266. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +7 -0
  267. package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js +28 -0
  268. package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js.map +7 -0
  269. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +80 -0
  270. package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +7 -0
  271. package/dist-cjs/lib/tools/selection-logic/updateHoveredId.js +47 -0
  272. package/dist-cjs/lib/tools/selection-logic/updateHoveredId.js.map +7 -0
  273. package/dist-cjs/lib/ui/TldrawUi.js +155 -0
  274. package/dist-cjs/lib/ui/TldrawUi.js.map +7 -0
  275. package/dist-cjs/lib/ui/TldrawUiContextProvider.js +57 -0
  276. package/dist-cjs/lib/ui/TldrawUiContextProvider.js.map +7 -0
  277. package/dist-cjs/lib/ui/assetUrls.js +67 -0
  278. package/dist-cjs/lib/ui/assetUrls.js.map +7 -0
  279. package/dist-cjs/lib/ui/components/ActionsMenu.js +96 -0
  280. package/dist-cjs/lib/ui/components/ActionsMenu.js.map +7 -0
  281. package/dist-cjs/lib/ui/components/BackToContent.js +67 -0
  282. package/dist-cjs/lib/ui/components/BackToContent.js.map +7 -0
  283. package/dist-cjs/lib/ui/components/ContextMenu.js +214 -0
  284. package/dist-cjs/lib/ui/components/ContextMenu.js.map +7 -0
  285. package/dist-cjs/lib/ui/components/DebugPanel.js +334 -0
  286. package/dist-cjs/lib/ui/components/DebugPanel.js.map +7 -0
  287. package/dist-cjs/lib/ui/components/Dialogs.js +64 -0
  288. package/dist-cjs/lib/ui/components/Dialogs.js.map +7 -0
  289. package/dist-cjs/lib/ui/components/DuplicateButton.js +47 -0
  290. package/dist-cjs/lib/ui/components/DuplicateButton.js.map +7 -0
  291. package/dist-cjs/lib/ui/components/EditLinkDialog.js +161 -0
  292. package/dist-cjs/lib/ui/components/EditLinkDialog.js.map +7 -0
  293. package/dist-cjs/lib/ui/components/EmbedDialog.js +152 -0
  294. package/dist-cjs/lib/ui/components/EmbedDialog.js.map +7 -0
  295. package/dist-cjs/lib/ui/components/FollowingIndicator.js +41 -0
  296. package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +7 -0
  297. package/dist-cjs/lib/ui/components/HTMLCanvas.js +66 -0
  298. package/dist-cjs/lib/ui/components/HTMLCanvas.js.map +7 -0
  299. package/dist-cjs/lib/ui/components/HelpMenu.js +116 -0
  300. package/dist-cjs/lib/ui/components/HelpMenu.js.map +7 -0
  301. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog.js +74 -0
  302. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog.js.map +7 -0
  303. package/dist-cjs/lib/ui/components/LanguageMenu.js +60 -0
  304. package/dist-cjs/lib/ui/components/LanguageMenu.js.map +7 -0
  305. package/dist-cjs/lib/ui/components/Menu.js +139 -0
  306. package/dist-cjs/lib/ui/components/Menu.js.map +7 -0
  307. package/dist-cjs/lib/ui/components/MenuZone.js +51 -0
  308. package/dist-cjs/lib/ui/components/MenuZone.js.map +7 -0
  309. package/dist-cjs/lib/ui/components/MobileStylePanel.js +69 -0
  310. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +7 -0
  311. package/dist-cjs/lib/ui/components/MoveToPageMenu.js +142 -0
  312. package/dist-cjs/lib/ui/components/MoveToPageMenu.js.map +7 -0
  313. package/dist-cjs/lib/ui/components/NavigationZone/Minimap.js +208 -0
  314. package/dist-cjs/lib/ui/components/NavigationZone/Minimap.js.map +7 -0
  315. package/dist-cjs/lib/ui/components/NavigationZone/MinimapManager.js +293 -0
  316. package/dist-cjs/lib/ui/components/NavigationZone/MinimapManager.js.map +7 -0
  317. package/dist-cjs/lib/ui/components/NavigationZone/NavigationZone.js +103 -0
  318. package/dist-cjs/lib/ui/components/NavigationZone/NavigationZone.js.map +7 -0
  319. package/dist-cjs/lib/ui/components/NavigationZone/ZoomMenu.js +118 -0
  320. package/dist-cjs/lib/ui/components/NavigationZone/ZoomMenu.js.map +7 -0
  321. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +47 -0
  322. package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js.map +7 -0
  323. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js +63 -0
  324. package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js.map +7 -0
  325. package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js +88 -0
  326. package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js.map +7 -0
  327. package/dist-cjs/lib/ui/components/PageMenu/PageMenu.js +395 -0
  328. package/dist-cjs/lib/ui/components/PageMenu/PageMenu.js.map +7 -0
  329. package/dist-cjs/lib/ui/components/PageMenu/edit-pages-shared.js +45 -0
  330. package/dist-cjs/lib/ui/components/PageMenu/edit-pages-shared.js.map +7 -0
  331. package/dist-cjs/lib/ui/components/PenModeToggle.js +45 -0
  332. package/dist-cjs/lib/ui/components/PenModeToggle.js.map +7 -0
  333. package/dist-cjs/lib/ui/components/RedoButton.js +49 -0
  334. package/dist-cjs/lib/ui/components/RedoButton.js.map +7 -0
  335. package/dist-cjs/lib/ui/components/Spinner.js +41 -0
  336. package/dist-cjs/lib/ui/components/Spinner.js.map +7 -0
  337. package/dist-cjs/lib/ui/components/StopFollowing.js +45 -0
  338. package/dist-cjs/lib/ui/components/StopFollowing.js.map +7 -0
  339. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +138 -0
  340. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +7 -0
  341. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +89 -0
  342. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +7 -0
  343. package/dist-cjs/lib/ui/components/StylePanel/StylePanel.js +313 -0
  344. package/dist-cjs/lib/ui/components/StylePanel/StylePanel.js.map +7 -0
  345. package/dist-cjs/lib/ui/components/StylePanel/styles.js +119 -0
  346. package/dist-cjs/lib/ui/components/StylePanel/styles.js.map +7 -0
  347. package/dist-cjs/lib/ui/components/Toasts.js +101 -0
  348. package/dist-cjs/lib/ui/components/Toasts.js.map +7 -0
  349. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +73 -0
  350. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +7 -0
  351. package/dist-cjs/lib/ui/components/Toolbar/Toolbar.js +247 -0
  352. package/dist-cjs/lib/ui/components/Toolbar/Toolbar.js.map +7 -0
  353. package/dist-cjs/lib/ui/components/TrashButton.js +51 -0
  354. package/dist-cjs/lib/ui/components/TrashButton.js.map +7 -0
  355. package/dist-cjs/lib/ui/components/UndoButton.js +49 -0
  356. package/dist-cjs/lib/ui/components/UndoButton.js.map +7 -0
  357. package/dist-cjs/lib/ui/components/primitives/Button.js +79 -0
  358. package/dist-cjs/lib/ui/components/primitives/Button.js.map +7 -0
  359. package/dist-cjs/lib/ui/components/primitives/ButtonPicker.js +121 -0
  360. package/dist-cjs/lib/ui/components/primitives/ButtonPicker.js.map +7 -0
  361. package/dist-cjs/lib/ui/components/primitives/Dialog.js +70 -0
  362. package/dist-cjs/lib/ui/components/primitives/Dialog.js.map +7 -0
  363. package/dist-cjs/lib/ui/components/primitives/DropdownMenu.js +187 -0
  364. package/dist-cjs/lib/ui/components/primitives/DropdownMenu.js.map +7 -0
  365. package/dist-cjs/lib/ui/components/primitives/Icon.js +71 -0
  366. package/dist-cjs/lib/ui/components/primitives/Icon.js.map +7 -0
  367. package/dist-cjs/lib/ui/components/primitives/Input.js +155 -0
  368. package/dist-cjs/lib/ui/components/primitives/Input.js.map +7 -0
  369. package/dist-cjs/lib/ui/components/primitives/Kbd.js +29 -0
  370. package/dist-cjs/lib/ui/components/primitives/Kbd.js.map +7 -0
  371. package/dist-cjs/lib/ui/components/primitives/Popover.js +69 -0
  372. package/dist-cjs/lib/ui/components/primitives/Popover.js.map +7 -0
  373. package/dist-cjs/lib/ui/components/primitives/Slider.js +69 -0
  374. package/dist-cjs/lib/ui/components/primitives/Slider.js.map +7 -0
  375. package/dist-cjs/lib/ui/components/primitives/shared.js +44 -0
  376. package/dist-cjs/lib/ui/components/primitives/shared.js.map +7 -0
  377. package/dist-cjs/lib/ui/constants.js +25 -0
  378. package/dist-cjs/lib/ui/constants.js.map +7 -0
  379. package/dist-cjs/lib/ui/hooks/clipboard/pasteExcalidrawContent.js +454 -0
  380. package/dist-cjs/lib/ui/hooks/clipboard/pasteExcalidrawContent.js.map +7 -0
  381. package/dist-cjs/lib/ui/hooks/clipboard/pasteFiles.js +37 -0
  382. package/dist-cjs/lib/ui/hooks/clipboard/pasteFiles.js.map +7 -0
  383. package/dist-cjs/lib/ui/hooks/clipboard/pasteTldrawContent.js +32 -0
  384. package/dist-cjs/lib/ui/hooks/clipboard/pasteTldrawContent.js.map +7 -0
  385. package/dist-cjs/lib/ui/hooks/clipboard/pasteUrl.js +48 -0
  386. package/dist-cjs/lib/ui/hooks/clipboard/pasteUrl.js.map +7 -0
  387. package/dist-cjs/lib/ui/hooks/menuHelpers.js +172 -0
  388. package/dist-cjs/lib/ui/hooks/menuHelpers.js.map +7 -0
  389. package/dist-cjs/lib/ui/hooks/useActions.js +1152 -0
  390. package/dist-cjs/lib/ui/hooks/useActions.js.map +7 -0
  391. package/dist-cjs/lib/ui/hooks/useActionsMenuSchema.js +112 -0
  392. package/dist-cjs/lib/ui/hooks/useActionsMenuSchema.js.map +7 -0
  393. package/dist-cjs/lib/ui/hooks/useAssetUrls.js +41 -0
  394. package/dist-cjs/lib/ui/hooks/useAssetUrls.js.map +7 -0
  395. package/dist-cjs/lib/ui/hooks/useBreakpoint.js +64 -0
  396. package/dist-cjs/lib/ui/hooks/useBreakpoint.js.map +7 -0
  397. package/dist-cjs/lib/ui/hooks/useCanRedo.js +29 -0
  398. package/dist-cjs/lib/ui/hooks/useCanRedo.js.map +7 -0
  399. package/dist-cjs/lib/ui/hooks/useCanUndo.js +29 -0
  400. package/dist-cjs/lib/ui/hooks/useCanUndo.js.map +7 -0
  401. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +463 -0
  402. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +7 -0
  403. package/dist-cjs/lib/ui/hooks/useContextMenuSchema.js +228 -0
  404. package/dist-cjs/lib/ui/hooks/useContextMenuSchema.js.map +7 -0
  405. package/dist-cjs/lib/ui/hooks/useCopyAs.js +47 -0
  406. package/dist-cjs/lib/ui/hooks/useCopyAs.js.map +7 -0
  407. package/dist-cjs/lib/ui/hooks/useDialogsProvider.js +108 -0
  408. package/dist-cjs/lib/ui/hooks/useDialogsProvider.js.map +7 -0
  409. package/dist-cjs/lib/ui/hooks/useEditorEvents.js +43 -0
  410. package/dist-cjs/lib/ui/hooks/useEditorEvents.js.map +7 -0
  411. package/dist-cjs/lib/ui/hooks/useEventsProvider.js +47 -0
  412. package/dist-cjs/lib/ui/hooks/useEventsProvider.js.map +7 -0
  413. package/dist-cjs/lib/ui/hooks/useExportAs.js +51 -0
  414. package/dist-cjs/lib/ui/hooks/useExportAs.js.map +7 -0
  415. package/dist-cjs/lib/ui/hooks/useHasLinkShapeSelected.js +36 -0
  416. package/dist-cjs/lib/ui/hooks/useHasLinkShapeSelected.js.map +7 -0
  417. package/dist-cjs/lib/ui/hooks/useHelpMenuSchema.js +103 -0
  418. package/dist-cjs/lib/ui/hooks/useHelpMenuSchema.js.map +7 -0
  419. package/dist-cjs/lib/ui/hooks/useHighDpiCanvas.js +35 -0
  420. package/dist-cjs/lib/ui/hooks/useHighDpiCanvas.js.map +7 -0
  421. package/dist-cjs/lib/ui/hooks/useInsertMedia.js +57 -0
  422. package/dist-cjs/lib/ui/hooks/useInsertMedia.js.map +7 -0
  423. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +138 -0
  424. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +7 -0
  425. package/dist-cjs/lib/ui/hooks/useKeyboardShortcutsSchema.js +134 -0
  426. package/dist-cjs/lib/ui/hooks/useKeyboardShortcutsSchema.js.map +7 -0
  427. package/dist-cjs/lib/ui/hooks/useLocalStorageState.js +59 -0
  428. package/dist-cjs/lib/ui/hooks/useLocalStorageState.js.map +7 -0
  429. package/dist-cjs/lib/ui/hooks/useMenuIsOpen.js +74 -0
  430. package/dist-cjs/lib/ui/hooks/useMenuIsOpen.js.map +7 -0
  431. package/dist-cjs/lib/ui/hooks/useMenuSchema.js +260 -0
  432. package/dist-cjs/lib/ui/hooks/useMenuSchema.js.map +7 -0
  433. package/dist-cjs/lib/ui/hooks/useOnlyFlippableShape.js +38 -0
  434. package/dist-cjs/lib/ui/hooks/useOnlyFlippableShape.js.map +7 -0
  435. package/dist-cjs/lib/ui/hooks/usePreloadAssets.js +106 -0
  436. package/dist-cjs/lib/ui/hooks/usePreloadAssets.js.map +7 -0
  437. package/dist-cjs/lib/ui/hooks/usePreloadIcons.js +51 -0
  438. package/dist-cjs/lib/ui/hooks/usePreloadIcons.js.map +7 -0
  439. package/dist-cjs/lib/ui/hooks/usePrint.js +220 -0
  440. package/dist-cjs/lib/ui/hooks/usePrint.js.map +7 -0
  441. package/dist-cjs/lib/ui/hooks/useReadonly.js +29 -0
  442. package/dist-cjs/lib/ui/hooks/useReadonly.js.map +7 -0
  443. package/dist-cjs/lib/ui/hooks/useRevelantStyles.js +45 -0
  444. package/dist-cjs/lib/ui/hooks/useRevelantStyles.js.map +7 -0
  445. package/dist-cjs/lib/ui/hooks/useShowAutoSizeToggle.js +36 -0
  446. package/dist-cjs/lib/ui/hooks/useShowAutoSizeToggle.js.map +7 -0
  447. package/dist-cjs/lib/ui/hooks/useToastsProvider.js +53 -0
  448. package/dist-cjs/lib/ui/hooks/useToastsProvider.js.map +7 -0
  449. package/dist-cjs/lib/ui/hooks/useToolbarSchema.js +99 -0
  450. package/dist-cjs/lib/ui/hooks/useToolbarSchema.js.map +7 -0
  451. package/dist-cjs/lib/ui/hooks/useTools.js +235 -0
  452. package/dist-cjs/lib/ui/hooks/useTools.js.map +7 -0
  453. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js +17 -0
  454. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +7 -0
  455. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +377 -0
  456. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +7 -0
  457. package/dist-cjs/lib/ui/hooks/useTranslation/translations.js +67 -0
  458. package/dist-cjs/lib/ui/hooks/useTranslation/translations.js.map +7 -0
  459. package/dist-cjs/lib/ui/hooks/useTranslation/useLanguages.js +32 -0
  460. package/dist-cjs/lib/ui/hooks/useTranslation/useLanguages.js.map +7 -0
  461. package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js +101 -0
  462. package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js.map +7 -0
  463. package/dist-cjs/lib/ui/icon-types.js +190 -0
  464. package/dist-cjs/lib/ui/icon-types.js.map +7 -0
  465. package/dist-cjs/lib/ui/overrides.js +178 -0
  466. package/dist-cjs/lib/ui/overrides.js.map +7 -0
  467. package/dist-cjs/lib/ui/version.js +25 -0
  468. package/dist-cjs/lib/ui/version.js.map +7 -0
  469. package/dist-cjs/lib/utils/assets/assets.js +91 -0
  470. package/dist-cjs/lib/utils/assets/assets.js.map +7 -0
  471. package/dist-cjs/lib/utils/assets/is-gif-animated.js +74 -0
  472. package/dist-cjs/lib/utils/assets/is-gif-animated.js.map +7 -0
  473. package/dist-cjs/lib/utils/assets.js +91 -0
  474. package/dist-cjs/lib/utils/assets.js.map +7 -0
  475. package/dist-cjs/lib/utils/embeds/embeds.js +85 -0
  476. package/dist-cjs/lib/utils/embeds/embeds.js.map +7 -0
  477. package/dist-cjs/lib/utils/export/copyAs.js +116 -0
  478. package/dist-cjs/lib/utils/export/copyAs.js.map +7 -0
  479. package/dist-cjs/lib/utils/export/export.js +117 -0
  480. package/dist-cjs/lib/utils/export/export.js.map +7 -0
  481. package/dist-cjs/lib/utils/export/exportAs.js +88 -0
  482. package/dist-cjs/lib/utils/export/exportAs.js.map +7 -0
  483. package/dist-cjs/lib/utils/frames/frames.js +92 -0
  484. package/dist-cjs/lib/utils/frames/frames.js.map +7 -0
  485. package/dist-cjs/lib/utils/static-assets/assetUrls.js +48 -0
  486. package/dist-cjs/lib/utils/static-assets/assetUrls.js.map +7 -0
  487. package/dist-cjs/lib/utils/text/text.js +57 -0
  488. package/dist-cjs/lib/utils/text/text.js.map +7 -0
  489. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +792 -0
  490. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +7 -0
  491. package/dist-cjs/lib/utils/tldr/file.js +230 -0
  492. package/dist-cjs/lib/utils/tldr/file.js.map +7 -0
  493. package/dist-esm/index.d.mts +2954 -0
  494. package/dist-esm/index.mjs +234 -0
  495. package/dist-esm/index.mjs.map +7 -0
  496. package/dist-esm/lib/Tldraw.mjs +127 -0
  497. package/dist-esm/lib/Tldraw.mjs.map +7 -0
  498. package/dist-esm/lib/canvas/TldrawCropHandles.mjs +134 -0
  499. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +7 -0
  500. package/dist-esm/lib/canvas/TldrawHandles.mjs +17 -0
  501. package/dist-esm/lib/canvas/TldrawHandles.mjs.map +7 -0
  502. package/dist-esm/lib/canvas/TldrawHoveredShapeIndicator.mjs +26 -0
  503. package/dist-esm/lib/canvas/TldrawHoveredShapeIndicator.mjs.map +7 -0
  504. package/dist-esm/lib/canvas/TldrawScribble.mjs +42 -0
  505. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +7 -0
  506. package/dist-esm/lib/canvas/TldrawSelectionBackground.mjs +28 -0
  507. package/dist-esm/lib/canvas/TldrawSelectionBackground.mjs.map +7 -0
  508. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +487 -0
  509. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +7 -0
  510. package/dist-esm/lib/defaultExternalContentHandlers.mjs +387 -0
  511. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +7 -0
  512. package/dist-esm/lib/defaultShapeTools.mjs +22 -0
  513. package/dist-esm/lib/defaultShapeTools.mjs.map +7 -0
  514. package/dist-esm/lib/defaultShapeUtils.mjs +30 -0
  515. package/dist-esm/lib/defaultShapeUtils.mjs.map +7 -0
  516. package/dist-esm/lib/defaultSideEffects.mjs +49 -0
  517. package/dist-esm/lib/defaultSideEffects.mjs.map +7 -0
  518. package/dist-esm/lib/defaultTools.mjs +10 -0
  519. package/dist-esm/lib/defaultTools.mjs.map +7 -0
  520. package/dist-esm/lib/shapes/arrow/ArrowShapeTool.mjs +13 -0
  521. package/dist-esm/lib/shapes/arrow/ArrowShapeTool.mjs.map +7 -0
  522. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +808 -0
  523. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +7 -0
  524. package/dist-esm/lib/shapes/arrow/components/ArrowTextLabel.mjs +84 -0
  525. package/dist-esm/lib/shapes/arrow/components/ArrowTextLabel.mjs.map +7 -0
  526. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs +33 -0
  527. package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs.map +7 -0
  528. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +162 -0
  529. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +7 -0
  530. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +154 -0
  531. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +7 -0
  532. package/dist-esm/lib/shapes/draw/DrawShapeTool.mjs +17 -0
  533. package/dist-esm/lib/shapes/draw/DrawShapeTool.mjs.map +7 -0
  534. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +237 -0
  535. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +7 -0
  536. package/dist-esm/lib/shapes/draw/getPath.mjs +87 -0
  537. package/dist-esm/lib/shapes/draw/getPath.mjs.map +7 -0
  538. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +546 -0
  539. package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +7 -0
  540. package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs +17 -0
  541. package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs.map +7 -0
  542. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +181 -0
  543. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +7 -0
  544. package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs +46 -0
  545. package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +7 -0
  546. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +216 -0
  547. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +7 -0
  548. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +93 -0
  549. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +7 -0
  550. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +81 -0
  551. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +7 -0
  552. package/dist-esm/lib/shapes/geo/GeoShapeTool.mjs +13 -0
  553. package/dist-esm/lib/shapes/geo/GeoShapeTool.mjs.map +7 -0
  554. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +1010 -0
  555. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +7 -0
  556. package/dist-esm/lib/shapes/geo/cloudOutline.mjs +275 -0
  557. package/dist-esm/lib/shapes/geo/cloudOutline.mjs.map +7 -0
  558. package/dist-esm/lib/shapes/geo/components/DashStyleCloud.mjs +102 -0
  559. package/dist-esm/lib/shapes/geo/components/DashStyleCloud.mjs.map +7 -0
  560. package/dist-esm/lib/shapes/geo/components/DashStyleEllipse.mjs +101 -0
  561. package/dist-esm/lib/shapes/geo/components/DashStyleEllipse.mjs.map +7 -0
  562. package/dist-esm/lib/shapes/geo/components/DashStyleOval.mjs +93 -0
  563. package/dist-esm/lib/shapes/geo/components/DashStyleOval.mjs.map +7 -0
  564. package/dist-esm/lib/shapes/geo/components/DashStylePolygon.mjs +130 -0
  565. package/dist-esm/lib/shapes/geo/components/DashStylePolygon.mjs.map +7 -0
  566. package/dist-esm/lib/shapes/geo/components/DrawStyleCloud.mjs +54 -0
  567. package/dist-esm/lib/shapes/geo/components/DrawStyleCloud.mjs.map +7 -0
  568. package/dist-esm/lib/shapes/geo/components/DrawStyleEllipse.mjs +116 -0
  569. package/dist-esm/lib/shapes/geo/components/DrawStyleEllipse.mjs.map +7 -0
  570. package/dist-esm/lib/shapes/geo/components/DrawStylePolygon.mjs +68 -0
  571. package/dist-esm/lib/shapes/geo/components/DrawStylePolygon.mjs.map +7 -0
  572. package/dist-esm/lib/shapes/geo/components/SolidStyleCloud.mjs +54 -0
  573. package/dist-esm/lib/shapes/geo/components/SolidStyleCloud.mjs.map +7 -0
  574. package/dist-esm/lib/shapes/geo/components/SolidStyleEllipse.mjs +59 -0
  575. package/dist-esm/lib/shapes/geo/components/SolidStyleEllipse.mjs.map +7 -0
  576. package/dist-esm/lib/shapes/geo/components/SolidStyleOval.mjs +74 -0
  577. package/dist-esm/lib/shapes/geo/components/SolidStyleOval.mjs.map +7 -0
  578. package/dist-esm/lib/shapes/geo/components/SolidStylePolygon.mjs +61 -0
  579. package/dist-esm/lib/shapes/geo/components/SolidStylePolygon.mjs.map +7 -0
  580. package/dist-esm/lib/shapes/geo/helpers.mjs +33 -0
  581. package/dist-esm/lib/shapes/geo/helpers.mjs.map +7 -0
  582. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs +33 -0
  583. package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs.map +7 -0
  584. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +104 -0
  585. package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +7 -0
  586. package/dist-esm/lib/shapes/highlight/HighlightShapeTool.mjs +17 -0
  587. package/dist-esm/lib/shapes/highlight/HighlightShapeTool.mjs.map +7 -0
  588. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +198 -0
  589. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +7 -0
  590. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +252 -0
  591. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +7 -0
  592. package/dist-esm/lib/shapes/line/LineShapeTool.mjs +13 -0
  593. package/dist-esm/lib/shapes/line/LineShapeTool.mjs.map +7 -0
  594. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +357 -0
  595. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +7 -0
  596. package/dist-esm/lib/shapes/line/components/getLinePath.mjs +68 -0
  597. package/dist-esm/lib/shapes/line/components/getLinePath.mjs.map +7 -0
  598. package/dist-esm/lib/shapes/line/components/svg.mjs +57 -0
  599. package/dist-esm/lib/shapes/line/components/svg.mjs.map +7 -0
  600. package/dist-esm/lib/shapes/line/toolStates/Idle.mjs +19 -0
  601. package/dist-esm/lib/shapes/line/toolStates/Idle.mjs.map +7 -0
  602. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs +134 -0
  603. package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs.map +7 -0
  604. package/dist-esm/lib/shapes/note/NoteShapeTool.mjs +13 -0
  605. package/dist-esm/lib/shapes/note/NoteShapeTool.mjs.map +7 -0
  606. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +193 -0
  607. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +7 -0
  608. package/dist-esm/lib/shapes/note/toolStates/Idle.mjs +17 -0
  609. package/dist-esm/lib/shapes/note/toolStates/Idle.mjs.map +7 -0
  610. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs +97 -0
  611. package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs.map +7 -0
  612. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +35 -0
  613. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +7 -0
  614. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +93 -0
  615. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +7 -0
  616. package/dist-esm/lib/shapes/shared/TextHelpers.mjs +208 -0
  617. package/dist-esm/lib/shapes/shared/TextHelpers.mjs.map +7 -0
  618. package/dist-esm/lib/shapes/shared/TextLabel.mjs +112 -0
  619. package/dist-esm/lib/shapes/shared/TextLabel.mjs.map +7 -0
  620. package/dist-esm/lib/shapes/shared/createTextSvgElementFromSpans.mjs +57 -0
  621. package/dist-esm/lib/shapes/shared/createTextSvgElementFromSpans.mjs.map +7 -0
  622. package/dist-esm/lib/shapes/shared/default-shape-constants.mjs +52 -0
  623. package/dist-esm/lib/shapes/shared/default-shape-constants.mjs.map +7 -0
  624. package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs +240 -0
  625. package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs.map +7 -0
  626. package/dist-esm/lib/shapes/shared/freehand/getStroke.mjs +13 -0
  627. package/dist-esm/lib/shapes/shared/freehand/getStroke.mjs.map +7 -0
  628. package/dist-esm/lib/shapes/shared/freehand/getStrokeOutlinePoints.mjs +155 -0
  629. package/dist-esm/lib/shapes/shared/freehand/getStrokeOutlinePoints.mjs.map +7 -0
  630. package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs +124 -0
  631. package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs.map +7 -0
  632. package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs +7 -0
  633. package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs.map +7 -0
  634. package/dist-esm/lib/shapes/shared/freehand/setStrokePointRadii.mjs +81 -0
  635. package/dist-esm/lib/shapes/shared/freehand/setStrokePointRadii.mjs.map +7 -0
  636. package/dist-esm/lib/shapes/shared/freehand/svg.mjs +36 -0
  637. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +7 -0
  638. package/dist-esm/lib/shapes/shared/freehand/svgInk.mjs +150 -0
  639. package/dist-esm/lib/shapes/shared/freehand/svgInk.mjs.map +7 -0
  640. package/dist-esm/lib/shapes/shared/freehand/types.mjs +1 -0
  641. package/dist-esm/lib/shapes/shared/freehand/types.mjs.map +7 -0
  642. package/dist-esm/lib/shapes/shared/getBrowserCanvasMaxSize.mjs +22 -0
  643. package/dist-esm/lib/shapes/shared/getBrowserCanvasMaxSize.mjs.map +7 -0
  644. package/dist-esm/lib/shapes/shared/getPerfectDashProps.mjs +76 -0
  645. package/dist-esm/lib/shapes/shared/getPerfectDashProps.mjs.map +7 -0
  646. package/dist-esm/lib/shapes/shared/getTextLabelSvgElement.mjs +36 -0
  647. package/dist-esm/lib/shapes/shared/getTextLabelSvgElement.mjs.map +7 -0
  648. package/dist-esm/lib/shapes/shared/legacyProps.mjs +22 -0
  649. package/dist-esm/lib/shapes/shared/legacyProps.mjs.map +7 -0
  650. package/dist-esm/lib/shapes/shared/polygon-helpers.mjs +96 -0
  651. package/dist-esm/lib/shapes/shared/polygon-helpers.mjs.map +7 -0
  652. package/dist-esm/lib/shapes/shared/resizeBox.mjs +99 -0
  653. package/dist-esm/lib/shapes/shared/resizeBox.mjs.map +7 -0
  654. package/dist-esm/lib/shapes/shared/resizeScaled.mjs +28 -0
  655. package/dist-esm/lib/shapes/shared/resizeScaled.mjs.map +7 -0
  656. package/dist-esm/lib/shapes/shared/rotated-box-shadow.mjs +30 -0
  657. package/dist-esm/lib/shapes/shared/rotated-box-shadow.mjs.map +7 -0
  658. package/dist-esm/lib/shapes/shared/useColorSpace.mjs +19 -0
  659. package/dist-esm/lib/shapes/shared/useColorSpace.mjs.map +7 -0
  660. package/dist-esm/lib/shapes/shared/useEditableText.mjs +165 -0
  661. package/dist-esm/lib/shapes/shared/useEditableText.mjs.map +7 -0
  662. package/dist-esm/lib/shapes/shared/useForceSolid.mjs +9 -0
  663. package/dist-esm/lib/shapes/shared/useForceSolid.mjs.map +7 -0
  664. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +18 -0
  665. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +7 -0
  666. package/dist-esm/lib/shapes/text/TextShapeTool.mjs +13 -0
  667. package/dist-esm/lib/shapes/text/TextShapeTool.mjs.map +7 -0
  668. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +334 -0
  669. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +7 -0
  670. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs +42 -0
  671. package/dist-esm/lib/shapes/text/toolStates/Idle.mjs.map +7 -0
  672. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs +89 -0
  673. package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs.map +7 -0
  674. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +180 -0
  675. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +7 -0
  676. package/dist-esm/lib/tools/EraserTool/EraserTool.mjs +16 -0
  677. package/dist-esm/lib/tools/EraserTool/EraserTool.mjs.map +7 -0
  678. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +95 -0
  679. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +7 -0
  680. package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs +14 -0
  681. package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs.map +7 -0
  682. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +67 -0
  683. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +7 -0
  684. package/dist-esm/lib/tools/HandTool/HandTool.mjs +38 -0
  685. package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +7 -0
  686. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs +38 -0
  687. package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs.map +7 -0
  688. package/dist-esm/lib/tools/HandTool/childStates/Idle.mjs +17 -0
  689. package/dist-esm/lib/tools/HandTool/childStates/Idle.mjs.map +7 -0
  690. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs +35 -0
  691. package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs.map +7 -0
  692. package/dist-esm/lib/tools/LaserTool/LaserTool.mjs +15 -0
  693. package/dist-esm/lib/tools/LaserTool/LaserTool.mjs.map +7 -0
  694. package/dist-esm/lib/tools/LaserTool/childStates/Idle.mjs +11 -0
  695. package/dist-esm/lib/tools/LaserTool/childStates/Idle.mjs.map +7 -0
  696. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs +46 -0
  697. package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs.map +7 -0
  698. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +80 -0
  699. package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +7 -0
  700. package/dist-esm/lib/tools/SelectTool/SelectTool.mjs +50 -0
  701. package/dist-esm/lib/tools/SelectTool/SelectTool.mjs.map +7 -0
  702. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +131 -0
  703. package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +7 -0
  704. package/dist-esm/lib/tools/SelectTool/childStates/Crop/Crop.mjs +13 -0
  705. package/dist-esm/lib/tools/SelectTool/childStates/Crop/Crop.mjs.map +7 -0
  706. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +187 -0
  707. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +7 -0
  708. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +19 -0
  709. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +7 -0
  710. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs +81 -0
  711. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs.map +7 -0
  712. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs +40 -0
  713. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs.map +7 -0
  714. package/dist-esm/lib/tools/SelectTool/childStates/Crop/crop-constants.mjs +5 -0
  715. package/dist-esm/lib/tools/SelectTool/childStates/Crop/crop-constants.mjs.map +7 -0
  716. package/dist-esm/lib/tools/SelectTool/childStates/Cropping.mjs +194 -0
  717. package/dist-esm/lib/tools/SelectTool/childStates/Cropping.mjs.map +7 -0
  718. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +217 -0
  719. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +7 -0
  720. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +103 -0
  721. package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +7 -0
  722. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +447 -0
  723. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +7 -0
  724. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs +36 -0
  725. package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs.map +7 -0
  726. package/dist-esm/lib/tools/SelectTool/childStates/PointingCropHandle.mjs +69 -0
  727. package/dist-esm/lib/tools/SelectTool/childStates/PointingCropHandle.mjs.map +7 -0
  728. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +47 -0
  729. package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +7 -0
  730. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +73 -0
  731. package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +7 -0
  732. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +63 -0
  733. package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +7 -0
  734. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs +55 -0
  735. package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs.map +7 -0
  736. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +159 -0
  737. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +7 -0
  738. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +360 -0
  739. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +7 -0
  740. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +136 -0
  741. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +7 -0
  742. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +125 -0
  743. package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +7 -0
  744. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +302 -0
  745. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +7 -0
  746. package/dist-esm/lib/tools/SelectTool/children/DraggingHandle.mjs +217 -0
  747. package/dist-esm/lib/tools/SelectTool/children/DraggingHandle.mjs.map +7 -0
  748. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs +61 -0
  749. package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs.map +7 -0
  750. package/dist-esm/lib/tools/ZoomTool/childStates/Idle.mjs +15 -0
  751. package/dist-esm/lib/tools/ZoomTool/childStates/Idle.mjs.map +7 -0
  752. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs +35 -0
  753. package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs.map +7 -0
  754. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs +52 -0
  755. package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs.map +7 -0
  756. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +21 -0
  757. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +7 -0
  758. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs +8 -0
  759. package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs.map +7 -0
  760. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs +60 -0
  761. package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +7 -0
  762. package/dist-esm/lib/tools/selection-logic/updateHoveredId.mjs +27 -0
  763. package/dist-esm/lib/tools/selection-logic/updateHoveredId.mjs.map +7 -0
  764. package/dist-esm/lib/ui/TldrawUi.mjs +125 -0
  765. package/dist-esm/lib/ui/TldrawUi.mjs.map +7 -0
  766. package/dist-esm/lib/ui/TldrawUiContextProvider.mjs +37 -0
  767. package/dist-esm/lib/ui/TldrawUiContextProvider.mjs.map +7 -0
  768. package/dist-esm/lib/ui/assetUrls.mjs +47 -0
  769. package/dist-esm/lib/ui/assetUrls.mjs.map +7 -0
  770. package/dist-esm/lib/ui/components/ActionsMenu.mjs +66 -0
  771. package/dist-esm/lib/ui/components/ActionsMenu.mjs.map +7 -0
  772. package/dist-esm/lib/ui/components/BackToContent.mjs +47 -0
  773. package/dist-esm/lib/ui/components/BackToContent.mjs.map +7 -0
  774. package/dist-esm/lib/ui/components/ContextMenu.mjs +184 -0
  775. package/dist-esm/lib/ui/components/ContextMenu.mjs.map +7 -0
  776. package/dist-esm/lib/ui/components/DebugPanel.mjs +315 -0
  777. package/dist-esm/lib/ui/components/DebugPanel.mjs.map +7 -0
  778. package/dist-esm/lib/ui/components/Dialogs.mjs +34 -0
  779. package/dist-esm/lib/ui/components/Dialogs.mjs.map +7 -0
  780. package/dist-esm/lib/ui/components/DuplicateButton.mjs +27 -0
  781. package/dist-esm/lib/ui/components/DuplicateButton.mjs.map +7 -0
  782. package/dist-esm/lib/ui/components/EditLinkDialog.mjs +131 -0
  783. package/dist-esm/lib/ui/components/EditLinkDialog.mjs.map +7 -0
  784. package/dist-esm/lib/ui/components/EmbedDialog.mjs +122 -0
  785. package/dist-esm/lib/ui/components/EmbedDialog.mjs.map +7 -0
  786. package/dist-esm/lib/ui/components/FollowingIndicator.mjs +21 -0
  787. package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +7 -0
  788. package/dist-esm/lib/ui/components/HTMLCanvas.mjs +36 -0
  789. package/dist-esm/lib/ui/components/HTMLCanvas.mjs.map +7 -0
  790. package/dist-esm/lib/ui/components/HelpMenu.mjs +86 -0
  791. package/dist-esm/lib/ui/components/HelpMenu.mjs.map +7 -0
  792. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog.mjs +44 -0
  793. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog.mjs.map +7 -0
  794. package/dist-esm/lib/ui/components/LanguageMenu.mjs +30 -0
  795. package/dist-esm/lib/ui/components/LanguageMenu.mjs.map +7 -0
  796. package/dist-esm/lib/ui/components/Menu.mjs +109 -0
  797. package/dist-esm/lib/ui/components/Menu.mjs.map +7 -0
  798. package/dist-esm/lib/ui/components/MenuZone.mjs +31 -0
  799. package/dist-esm/lib/ui/components/MenuZone.mjs.map +7 -0
  800. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +54 -0
  801. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +7 -0
  802. package/dist-esm/lib/ui/components/MoveToPageMenu.mjs +112 -0
  803. package/dist-esm/lib/ui/components/MoveToPageMenu.mjs.map +7 -0
  804. package/dist-esm/lib/ui/components/NavigationZone/Minimap.mjs +191 -0
  805. package/dist-esm/lib/ui/components/NavigationZone/Minimap.mjs.map +7 -0
  806. package/dist-esm/lib/ui/components/NavigationZone/MinimapManager.mjs +279 -0
  807. package/dist-esm/lib/ui/components/NavigationZone/MinimapManager.mjs.map +7 -0
  808. package/dist-esm/lib/ui/components/NavigationZone/NavigationZone.mjs +83 -0
  809. package/dist-esm/lib/ui/components/NavigationZone/NavigationZone.mjs.map +7 -0
  810. package/dist-esm/lib/ui/components/NavigationZone/ZoomMenu.mjs +88 -0
  811. package/dist-esm/lib/ui/components/NavigationZone/ZoomMenu.mjs.map +7 -0
  812. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs +17 -0
  813. package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs.map +7 -0
  814. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs +43 -0
  815. package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs.map +7 -0
  816. package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs +58 -0
  817. package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs.map +7 -0
  818. package/dist-esm/lib/ui/components/PageMenu/PageMenu.mjs +381 -0
  819. package/dist-esm/lib/ui/components/PageMenu/PageMenu.mjs.map +7 -0
  820. package/dist-esm/lib/ui/components/PageMenu/edit-pages-shared.mjs +29 -0
  821. package/dist-esm/lib/ui/components/PageMenu/edit-pages-shared.mjs.map +7 -0
  822. package/dist-esm/lib/ui/components/PenModeToggle.mjs +25 -0
  823. package/dist-esm/lib/ui/components/PenModeToggle.mjs.map +7 -0
  824. package/dist-esm/lib/ui/components/RedoButton.mjs +29 -0
  825. package/dist-esm/lib/ui/components/RedoButton.mjs.map +7 -0
  826. package/dist-esm/lib/ui/components/Spinner.mjs +21 -0
  827. package/dist-esm/lib/ui/components/Spinner.mjs.map +7 -0
  828. package/dist-esm/lib/ui/components/StopFollowing.mjs +25 -0
  829. package/dist-esm/lib/ui/components/StopFollowing.mjs.map +7 -0
  830. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +108 -0
  831. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +7 -0
  832. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +59 -0
  833. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +7 -0
  834. package/dist-esm/lib/ui/components/StylePanel/StylePanel.mjs +297 -0
  835. package/dist-esm/lib/ui/components/StylePanel/StylePanel.mjs.map +7 -0
  836. package/dist-esm/lib/ui/components/StylePanel/styles.mjs +99 -0
  837. package/dist-esm/lib/ui/components/StylePanel/styles.mjs.map +7 -0
  838. package/dist-esm/lib/ui/components/Toasts.mjs +71 -0
  839. package/dist-esm/lib/ui/components/Toasts.mjs.map +7 -0
  840. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +43 -0
  841. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +7 -0
  842. package/dist-esm/lib/ui/components/Toolbar/Toolbar.mjs +217 -0
  843. package/dist-esm/lib/ui/components/Toolbar/Toolbar.mjs.map +7 -0
  844. package/dist-esm/lib/ui/components/TrashButton.mjs +31 -0
  845. package/dist-esm/lib/ui/components/TrashButton.mjs.map +7 -0
  846. package/dist-esm/lib/ui/components/UndoButton.mjs +29 -0
  847. package/dist-esm/lib/ui/components/UndoButton.mjs.map +7 -0
  848. package/dist-esm/lib/ui/components/primitives/Button.mjs +49 -0
  849. package/dist-esm/lib/ui/components/primitives/Button.mjs.map +7 -0
  850. package/dist-esm/lib/ui/components/primitives/ButtonPicker.mjs +96 -0
  851. package/dist-esm/lib/ui/components/primitives/ButtonPicker.mjs.map +7 -0
  852. package/dist-esm/lib/ui/components/primitives/Dialog.mjs +40 -0
  853. package/dist-esm/lib/ui/components/primitives/Dialog.mjs.map +7 -0
  854. package/dist-esm/lib/ui/components/primitives/DropdownMenu.mjs +157 -0
  855. package/dist-esm/lib/ui/components/primitives/DropdownMenu.mjs.map +7 -0
  856. package/dist-esm/lib/ui/components/primitives/Icon.mjs +41 -0
  857. package/dist-esm/lib/ui/components/primitives/Icon.mjs.map +7 -0
  858. package/dist-esm/lib/ui/components/primitives/Input.mjs +125 -0
  859. package/dist-esm/lib/ui/components/primitives/Input.mjs.map +7 -0
  860. package/dist-esm/lib/ui/components/primitives/Kbd.mjs +9 -0
  861. package/dist-esm/lib/ui/components/primitives/Kbd.mjs.map +7 -0
  862. package/dist-esm/lib/ui/components/primitives/Popover.mjs +39 -0
  863. package/dist-esm/lib/ui/components/primitives/Popover.mjs.map +7 -0
  864. package/dist-esm/lib/ui/components/primitives/Slider.mjs +49 -0
  865. package/dist-esm/lib/ui/components/primitives/Slider.mjs.map +7 -0
  866. package/dist-esm/lib/ui/components/primitives/shared.mjs +24 -0
  867. package/dist-esm/lib/ui/components/primitives/shared.mjs.map +7 -0
  868. package/dist-esm/lib/ui/constants.mjs +5 -0
  869. package/dist-esm/lib/ui/constants.mjs.map +7 -0
  870. package/dist-esm/lib/ui/hooks/clipboard/pasteExcalidrawContent.mjs +444 -0
  871. package/dist-esm/lib/ui/hooks/clipboard/pasteExcalidrawContent.mjs.map +7 -0
  872. package/dist-esm/lib/ui/hooks/clipboard/pasteFiles.mjs +17 -0
  873. package/dist-esm/lib/ui/hooks/clipboard/pasteFiles.mjs.map +7 -0
  874. package/dist-esm/lib/ui/hooks/clipboard/pasteTldrawContent.mjs +12 -0
  875. package/dist-esm/lib/ui/hooks/clipboard/pasteTldrawContent.mjs.map +7 -0
  876. package/dist-esm/lib/ui/hooks/clipboard/pasteUrl.mjs +28 -0
  877. package/dist-esm/lib/ui/hooks/clipboard/pasteUrl.mjs.map +7 -0
  878. package/dist-esm/lib/ui/hooks/menuHelpers.mjs +157 -0
  879. package/dist-esm/lib/ui/hooks/menuHelpers.mjs.map +7 -0
  880. package/dist-esm/lib/ui/hooks/useActions.mjs +1132 -0
  881. package/dist-esm/lib/ui/hooks/useActions.mjs.map +7 -0
  882. package/dist-esm/lib/ui/hooks/useActionsMenuSchema.mjs +87 -0
  883. package/dist-esm/lib/ui/hooks/useActionsMenuSchema.mjs.map +7 -0
  884. package/dist-esm/lib/ui/hooks/useAssetUrls.mjs +21 -0
  885. package/dist-esm/lib/ui/hooks/useAssetUrls.mjs.map +7 -0
  886. package/dist-esm/lib/ui/hooks/useBreakpoint.mjs +34 -0
  887. package/dist-esm/lib/ui/hooks/useBreakpoint.mjs.map +7 -0
  888. package/dist-esm/lib/ui/hooks/useCanRedo.mjs +9 -0
  889. package/dist-esm/lib/ui/hooks/useCanRedo.mjs.map +7 -0
  890. package/dist-esm/lib/ui/hooks/useCanUndo.mjs +9 -0
  891. package/dist-esm/lib/ui/hooks/useCanUndo.mjs.map +7 -0
  892. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +448 -0
  893. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +7 -0
  894. package/dist-esm/lib/ui/hooks/useContextMenuSchema.mjs +208 -0
  895. package/dist-esm/lib/ui/hooks/useContextMenuSchema.mjs.map +7 -0
  896. package/dist-esm/lib/ui/hooks/useCopyAs.mjs +27 -0
  897. package/dist-esm/lib/ui/hooks/useCopyAs.mjs.map +7 -0
  898. package/dist-esm/lib/ui/hooks/useDialogsProvider.mjs +88 -0
  899. package/dist-esm/lib/ui/hooks/useDialogsProvider.mjs.map +7 -0
  900. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs +23 -0
  901. package/dist-esm/lib/ui/hooks/useEditorEvents.mjs.map +7 -0
  902. package/dist-esm/lib/ui/hooks/useEventsProvider.mjs +17 -0
  903. package/dist-esm/lib/ui/hooks/useEventsProvider.mjs.map +7 -0
  904. package/dist-esm/lib/ui/hooks/useExportAs.mjs +31 -0
  905. package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +7 -0
  906. package/dist-esm/lib/ui/hooks/useHasLinkShapeSelected.mjs +16 -0
  907. package/dist-esm/lib/ui/hooks/useHasLinkShapeSelected.mjs.map +7 -0
  908. package/dist-esm/lib/ui/hooks/useHelpMenuSchema.mjs +73 -0
  909. package/dist-esm/lib/ui/hooks/useHelpMenuSchema.mjs.map +7 -0
  910. package/dist-esm/lib/ui/hooks/useHighDpiCanvas.mjs +15 -0
  911. package/dist-esm/lib/ui/hooks/useHighDpiCanvas.mjs.map +7 -0
  912. package/dist-esm/lib/ui/hooks/useInsertMedia.mjs +37 -0
  913. package/dist-esm/lib/ui/hooks/useInsertMedia.mjs.map +7 -0
  914. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +108 -0
  915. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +7 -0
  916. package/dist-esm/lib/ui/hooks/useKeyboardShortcutsSchema.mjs +104 -0
  917. package/dist-esm/lib/ui/hooks/useKeyboardShortcutsSchema.mjs.map +7 -0
  918. package/dist-esm/lib/ui/hooks/useLocalStorageState.mjs +29 -0
  919. package/dist-esm/lib/ui/hooks/useLocalStorageState.mjs.map +7 -0
  920. package/dist-esm/lib/ui/hooks/useMenuIsOpen.mjs +54 -0
  921. package/dist-esm/lib/ui/hooks/useMenuIsOpen.mjs.map +7 -0
  922. package/dist-esm/lib/ui/hooks/useMenuSchema.mjs +239 -0
  923. package/dist-esm/lib/ui/hooks/useMenuSchema.mjs.map +7 -0
  924. package/dist-esm/lib/ui/hooks/useOnlyFlippableShape.mjs +21 -0
  925. package/dist-esm/lib/ui/hooks/useOnlyFlippableShape.mjs.map +7 -0
  926. package/dist-esm/lib/ui/hooks/usePreloadAssets.mjs +86 -0
  927. package/dist-esm/lib/ui/hooks/usePreloadAssets.mjs.map +7 -0
  928. package/dist-esm/lib/ui/hooks/usePreloadIcons.mjs +31 -0
  929. package/dist-esm/lib/ui/hooks/usePreloadIcons.mjs.map +7 -0
  930. package/dist-esm/lib/ui/hooks/usePrint.mjs +200 -0
  931. package/dist-esm/lib/ui/hooks/usePrint.mjs.map +7 -0
  932. package/dist-esm/lib/ui/hooks/useReadonly.mjs +9 -0
  933. package/dist-esm/lib/ui/hooks/useReadonly.mjs.map +7 -0
  934. package/dist-esm/lib/ui/hooks/useRevelantStyles.mjs +33 -0
  935. package/dist-esm/lib/ui/hooks/useRevelantStyles.mjs.map +7 -0
  936. package/dist-esm/lib/ui/hooks/useShowAutoSizeToggle.mjs +16 -0
  937. package/dist-esm/lib/ui/hooks/useShowAutoSizeToggle.mjs.map +7 -0
  938. package/dist-esm/lib/ui/hooks/useToastsProvider.mjs +33 -0
  939. package/dist-esm/lib/ui/hooks/useToastsProvider.mjs.map +7 -0
  940. package/dist-esm/lib/ui/hooks/useToolbarSchema.mjs +69 -0
  941. package/dist-esm/lib/ui/hooks/useToolbarSchema.mjs.map +7 -0
  942. package/dist-esm/lib/ui/hooks/useTools.mjs +205 -0
  943. package/dist-esm/lib/ui/hooks/useTools.mjs.map +7 -0
  944. package/dist-esm/lib/ui/hooks/useTranslation/TLUiTranslationKey.mjs +1 -0
  945. package/dist-esm/lib/ui/hooks/useTranslation/TLUiTranslationKey.mjs.map +7 -0
  946. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +357 -0
  947. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +7 -0
  948. package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs +47 -0
  949. package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs.map +7 -0
  950. package/dist-esm/lib/ui/hooks/useTranslation/useLanguages.mjs +12 -0
  951. package/dist-esm/lib/ui/hooks/useTranslation/useLanguages.mjs.map +7 -0
  952. package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs +71 -0
  953. package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs.map +7 -0
  954. package/dist-esm/lib/ui/icon-types.mjs +170 -0
  955. package/dist-esm/lib/ui/icon-types.mjs.map +7 -0
  956. package/dist-esm/lib/ui/overrides.mjs +158 -0
  957. package/dist-esm/lib/ui/overrides.mjs.map +7 -0
  958. package/dist-esm/lib/ui/version.mjs +5 -0
  959. package/dist-esm/lib/ui/version.mjs.map +7 -0
  960. package/dist-esm/lib/utils/assets/assets.mjs +61 -0
  961. package/dist-esm/lib/utils/assets/assets.mjs.map +7 -0
  962. package/dist-esm/lib/utils/assets/is-gif-animated.mjs +54 -0
  963. package/dist-esm/lib/utils/assets/is-gif-animated.mjs.map +7 -0
  964. package/dist-esm/lib/utils/assets.mjs +61 -0
  965. package/dist-esm/lib/utils/assets.mjs.map +7 -0
  966. package/dist-esm/lib/utils/embeds/embeds.mjs +65 -0
  967. package/dist-esm/lib/utils/embeds/embeds.mjs.map +7 -0
  968. package/dist-esm/lib/utils/export/copyAs.mjs +96 -0
  969. package/dist-esm/lib/utils/export/copyAs.mjs.map +7 -0
  970. package/dist-esm/lib/utils/export/export.mjs +97 -0
  971. package/dist-esm/lib/utils/export/export.mjs.map +7 -0
  972. package/dist-esm/lib/utils/export/exportAs.mjs +68 -0
  973. package/dist-esm/lib/utils/export/exportAs.mjs.map +7 -0
  974. package/dist-esm/lib/utils/frames/frames.mjs +76 -0
  975. package/dist-esm/lib/utils/frames/frames.mjs.map +7 -0
  976. package/dist-esm/lib/utils/static-assets/assetUrls.mjs +28 -0
  977. package/dist-esm/lib/utils/static-assets/assetUrls.mjs.map +7 -0
  978. package/dist-esm/lib/utils/text/text.mjs +37 -0
  979. package/dist-esm/lib/utils/text/text.mjs.map +7 -0
  980. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +779 -0
  981. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +7 -0
  982. package/dist-esm/lib/utils/tldr/file.mjs +219 -0
  983. package/dist-esm/lib/utils/tldr/file.mjs.map +7 -0
  984. package/package.json +105 -0
  985. package/src/index.ts +174 -0
  986. package/src/lib/Tldraw.test.tsx +78 -0
  987. package/src/lib/Tldraw.tsx +179 -0
  988. package/src/lib/canvas/TldrawCropHandles.tsx +126 -0
  989. package/src/lib/canvas/TldrawHandles.tsx +15 -0
  990. package/src/lib/canvas/TldrawHoveredShapeIndicator.tsx +30 -0
  991. package/src/lib/canvas/TldrawScribble.tsx +45 -0
  992. package/src/lib/canvas/TldrawSelectionBackground.tsx +29 -0
  993. package/src/lib/canvas/TldrawSelectionForeground.tsx +526 -0
  994. package/src/lib/defaultExternalContentHandlers.ts +533 -0
  995. package/src/lib/defaultShapeTools.ts +20 -0
  996. package/src/lib/defaultShapeUtils.ts +29 -0
  997. package/src/lib/defaultSideEffects.ts +48 -0
  998. package/src/lib/defaultTools.ts +8 -0
  999. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +558 -0
  1000. package/src/lib/shapes/arrow/ArrowShapeTool.ts +12 -0
  1001. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +595 -0
  1002. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +1036 -0
  1003. package/src/lib/shapes/arrow/components/ArrowTextLabel.tsx +87 -0
  1004. package/src/lib/shapes/arrow/toolStates/Idle.ts +37 -0
  1005. package/src/lib/shapes/arrow/toolStates/Pointing.ts +190 -0
  1006. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +196 -0
  1007. package/src/lib/shapes/draw/DrawShapeTool.test.ts +52 -0
  1008. package/src/lib/shapes/draw/DrawShapeTool.ts +17 -0
  1009. package/src/lib/shapes/draw/DrawShapeUtil.tsx +298 -0
  1010. package/src/lib/shapes/draw/getPath.ts +108 -0
  1011. package/src/lib/shapes/draw/toolStates/Drawing.ts +722 -0
  1012. package/src/lib/shapes/draw/toolStates/Idle.ts +17 -0
  1013. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +218 -0
  1014. package/src/lib/shapes/frame/FrameShapeTool.test.ts +169 -0
  1015. package/src/lib/shapes/frame/FrameShapeTool.ts +53 -0
  1016. package/src/lib/shapes/frame/FrameShapeUtil.tsx +258 -0
  1017. package/src/lib/shapes/frame/components/FrameHeading.tsx +115 -0
  1018. package/src/lib/shapes/frame/components/FrameLabelInput.tsx +85 -0
  1019. package/src/lib/shapes/geo/GeoShapeTool.test.ts +191 -0
  1020. package/src/lib/shapes/geo/GeoShapeTool.ts +11 -0
  1021. package/src/lib/shapes/geo/GeoShapeUtil.tsx +1153 -0
  1022. package/src/lib/shapes/geo/cloudOutline.ts +391 -0
  1023. package/src/lib/shapes/geo/components/DashStyleCloud.tsx +135 -0
  1024. package/src/lib/shapes/geo/components/DashStyleEllipse.tsx +117 -0
  1025. package/src/lib/shapes/geo/components/DashStyleOval.tsx +102 -0
  1026. package/src/lib/shapes/geo/components/DashStylePolygon.tsx +152 -0
  1027. package/src/lib/shapes/geo/components/DrawStyleCloud.tsx +65 -0
  1028. package/src/lib/shapes/geo/components/DrawStyleEllipse.tsx +145 -0
  1029. package/src/lib/shapes/geo/components/DrawStylePolygon.tsx +263 -0
  1030. package/src/lib/shapes/geo/components/SolidStyleCloud.tsx +65 -0
  1031. package/src/lib/shapes/geo/components/SolidStyleEllipse.tsx +68 -0
  1032. package/src/lib/shapes/geo/components/SolidStyleOval.tsx +83 -0
  1033. package/src/lib/shapes/geo/components/SolidStylePolygon.tsx +77 -0
  1034. package/src/lib/shapes/geo/helpers.ts +34 -0
  1035. package/src/lib/shapes/geo/toolStates/Idle.ts +38 -0
  1036. package/src/lib/shapes/geo/toolStates/Pointing.ts +131 -0
  1037. package/src/lib/shapes/highlight/HighlightShapeTool.test.ts +3 -0
  1038. package/src/lib/shapes/highlight/HighlightShapeTool.ts +17 -0
  1039. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +255 -0
  1040. package/src/lib/shapes/image/ImageShapeUtil.tsx +313 -0
  1041. package/src/lib/shapes/line/LineShapeTool.test.ts +228 -0
  1042. package/src/lib/shapes/line/LineShapeTool.ts +12 -0
  1043. package/src/lib/shapes/line/LineShapeUtil.test.ts +222 -0
  1044. package/src/lib/shapes/line/LineShapeUtil.tsx +421 -0
  1045. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.ts.snap +41 -0
  1046. package/src/lib/shapes/line/components/getLinePath.ts +91 -0
  1047. package/src/lib/shapes/line/components/svg.ts +62 -0
  1048. package/src/lib/shapes/line/toolStates/Idle.ts +20 -0
  1049. package/src/lib/shapes/line/toolStates/Pointing.ts +165 -0
  1050. package/src/lib/shapes/note/NoteShapeTool.test.ts +146 -0
  1051. package/src/lib/shapes/note/NoteShapeTool.ts +11 -0
  1052. package/src/lib/shapes/note/NoteShapeUtil.tsx +221 -0
  1053. package/src/lib/shapes/note/toolStates/Idle.ts +17 -0
  1054. package/src/lib/shapes/note/toolStates/Pointing.ts +121 -0
  1055. package/src/lib/shapes/shared/HyperlinkButton.tsx +30 -0
  1056. package/src/lib/shapes/shared/ShapeFill.tsx +113 -0
  1057. package/src/lib/shapes/shared/TextHelpers.ts +289 -0
  1058. package/src/lib/shapes/shared/TextLabel.tsx +131 -0
  1059. package/src/lib/shapes/shared/createTextSvgElementFromSpans.ts +101 -0
  1060. package/src/lib/shapes/shared/default-shape-constants.ts +57 -0
  1061. package/src/lib/shapes/shared/defaultStyleDefs.tsx +276 -0
  1062. package/src/lib/shapes/shared/freehand/getStroke.ts +23 -0
  1063. package/src/lib/shapes/shared/freehand/getStrokeOutlinePoints.ts +333 -0
  1064. package/src/lib/shapes/shared/freehand/getStrokePoints.ts +187 -0
  1065. package/src/lib/shapes/shared/freehand/getStrokeRadius.ts +13 -0
  1066. package/src/lib/shapes/shared/freehand/setStrokePointRadii.ts +127 -0
  1067. package/src/lib/shapes/shared/freehand/svg.ts +50 -0
  1068. package/src/lib/shapes/shared/freehand/svgInk.ts +195 -0
  1069. package/src/lib/shapes/shared/freehand/types.ts +49 -0
  1070. package/src/lib/shapes/shared/getBrowserCanvasMaxSize.tsx +28 -0
  1071. package/src/lib/shapes/shared/getPerfectDashProps.ts +96 -0
  1072. package/src/lib/shapes/shared/getTextLabelSvgElement.ts +42 -0
  1073. package/src/lib/shapes/shared/legacyProps.ts +25 -0
  1074. package/src/lib/shapes/shared/polygon-helpers.ts +131 -0
  1075. package/src/lib/shapes/shared/resizeBox.ts +130 -0
  1076. package/src/lib/shapes/shared/resizeScaled.ts +40 -0
  1077. package/src/lib/shapes/shared/rotated-box-shadow.ts +29 -0
  1078. package/src/lib/shapes/shared/useColorSpace.tsx +21 -0
  1079. package/src/lib/shapes/shared/useEditableText.ts +211 -0
  1080. package/src/lib/shapes/shared/useForceSolid.ts +6 -0
  1081. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +18 -0
  1082. package/src/lib/shapes/text/TextShapeTool.test.ts +157 -0
  1083. package/src/lib/shapes/text/TextShapeTool.ts +11 -0
  1084. package/src/lib/shapes/text/TextShapeUtil.tsx +401 -0
  1085. package/src/lib/shapes/text/toolStates/Idle.ts +47 -0
  1086. package/src/lib/shapes/text/toolStates/Pointing.ts +105 -0
  1087. package/src/lib/shapes/video/VideoShapeUtil.tsx +215 -0
  1088. package/src/lib/tools/EraserTool/EraserTool.ts +15 -0
  1089. package/src/lib/tools/EraserTool/childStates/Erasing.ts +131 -0
  1090. package/src/lib/tools/EraserTool/childStates/Idle.ts +13 -0
  1091. package/src/lib/tools/EraserTool/childStates/Pointing.ts +93 -0
  1092. package/src/lib/tools/HandTool/HandTool.ts +40 -0
  1093. package/src/lib/tools/HandTool/childStates/Dragging.ts +45 -0
  1094. package/src/lib/tools/HandTool/childStates/Idle.ts +17 -0
  1095. package/src/lib/tools/HandTool/childStates/Pointing.ts +39 -0
  1096. package/src/lib/tools/LaserTool/LaserTool.ts +14 -0
  1097. package/src/lib/tools/LaserTool/childStates/Idle.ts +9 -0
  1098. package/src/lib/tools/LaserTool/childStates/Lasering.ts +53 -0
  1099. package/src/lib/tools/SelectTool/DragAndDropManager.ts +112 -0
  1100. package/src/lib/tools/SelectTool/SelectTool.ts +49 -0
  1101. package/src/lib/tools/SelectTool/childStates/Brushing.ts +206 -0
  1102. package/src/lib/tools/SelectTool/childStates/Crop/Crop.ts +10 -0
  1103. package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +217 -0
  1104. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +19 -0
  1105. package/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +108 -0
  1106. package/src/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.ts +64 -0
  1107. package/src/lib/tools/SelectTool/childStates/Crop/crop-constants.ts +2 -0
  1108. package/src/lib/tools/SelectTool/childStates/Cropping.ts +249 -0
  1109. package/src/lib/tools/SelectTool/childStates/DraggingHandle.ts +308 -0
  1110. package/src/lib/tools/SelectTool/childStates/EditingShape.ts +130 -0
  1111. package/src/lib/tools/SelectTool/childStates/Idle.ts +575 -0
  1112. package/src/lib/tools/SelectTool/childStates/PointingCanvas.ts +41 -0
  1113. package/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts +83 -0
  1114. package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +56 -0
  1115. package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +90 -0
  1116. package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +76 -0
  1117. package/src/lib/tools/SelectTool/childStates/PointingSelection.ts +71 -0
  1118. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +218 -0
  1119. package/src/lib/tools/SelectTool/childStates/Resizing.ts +511 -0
  1120. package/src/lib/tools/SelectTool/childStates/Rotating.ts +175 -0
  1121. package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +167 -0
  1122. package/src/lib/tools/SelectTool/childStates/Translating.ts +418 -0
  1123. package/src/lib/tools/SelectTool/children/DraggingHandle.ts +308 -0
  1124. package/src/lib/tools/ZoomTool/ZoomTool.ts +72 -0
  1125. package/src/lib/tools/ZoomTool/childStates/Idle.ts +15 -0
  1126. package/src/lib/tools/ZoomTool/childStates/Pointing.ts +39 -0
  1127. package/src/lib/tools/ZoomTool/childStates/ZoomBrushing.ts +62 -0
  1128. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +20 -0
  1129. package/src/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.ts +10 -0
  1130. package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +94 -0
  1131. package/src/lib/tools/selection-logic/selection.tldr +1041 -0
  1132. package/src/lib/tools/selection-logic/updateHoveredId.ts +32 -0
  1133. package/src/lib/ui/TldrawUi.tsx +195 -0
  1134. package/src/lib/ui/TldrawUiContextProvider.tsx +99 -0
  1135. package/src/lib/ui/assetUrls.ts +57 -0
  1136. package/src/lib/ui/components/ActionsMenu.tsx +75 -0
  1137. package/src/lib/ui/components/BackToContent.tsx +55 -0
  1138. package/src/lib/ui/components/ContextMenu.tsx +234 -0
  1139. package/src/lib/ui/components/DebugPanel.tsx +355 -0
  1140. package/src/lib/ui/components/Dialogs.tsx +52 -0
  1141. package/src/lib/ui/components/DuplicateButton.tsx +23 -0
  1142. package/src/lib/ui/components/EditLinkDialog.tsx +180 -0
  1143. package/src/lib/ui/components/EmbedDialog.tsx +143 -0
  1144. package/src/lib/ui/components/FollowingIndicator.tsx +16 -0
  1145. package/src/lib/ui/components/HTMLCanvas.tsx +54 -0
  1146. package/src/lib/ui/components/HelpMenu.tsx +109 -0
  1147. package/src/lib/ui/components/KeyboardShortcutsDialog.tsx +62 -0
  1148. package/src/lib/ui/components/LanguageMenu.tsx +38 -0
  1149. package/src/lib/ui/components/Menu.tsx +129 -0
  1150. package/src/lib/ui/components/MenuZone.tsx +35 -0
  1151. package/src/lib/ui/components/MobileStylePanel.tsx +61 -0
  1152. package/src/lib/ui/components/MoveToPageMenu.tsx +104 -0
  1153. package/src/lib/ui/components/NavigationZone/Minimap.tsx +245 -0
  1154. package/src/lib/ui/components/NavigationZone/MinimapManager.ts +382 -0
  1155. package/src/lib/ui/components/NavigationZone/NavigationZone.tsx +81 -0
  1156. package/src/lib/ui/components/NavigationZone/ZoomMenu.tsx +87 -0
  1157. package/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx +17 -0
  1158. package/src/lib/ui/components/PageMenu/PageItemInput.tsx +46 -0
  1159. package/src/lib/ui/components/PageMenu/PageItemSubmenu.tsx +86 -0
  1160. package/src/lib/ui/components/PageMenu/PageMenu.tsx +415 -0
  1161. package/src/lib/ui/components/PageMenu/edit-pages-shared.ts +32 -0
  1162. package/src/lib/ui/components/PenModeToggle.tsx +24 -0
  1163. package/src/lib/ui/components/RedoButton.tsx +26 -0
  1164. package/src/lib/ui/components/Spinner.tsx +22 -0
  1165. package/src/lib/ui/components/StopFollowing.tsx +23 -0
  1166. package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +150 -0
  1167. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +76 -0
  1168. package/src/lib/ui/components/StylePanel/StylePanel.tsx +332 -0
  1169. package/src/lib/ui/components/StylePanel/styles.tsx +100 -0
  1170. package/src/lib/ui/components/Toasts.tsx +104 -0
  1171. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +45 -0
  1172. package/src/lib/ui/components/Toolbar/Toolbar.tsx +281 -0
  1173. package/src/lib/ui/components/TrashButton.tsx +28 -0
  1174. package/src/lib/ui/components/UndoButton.tsx +26 -0
  1175. package/src/lib/ui/components/primitives/Button.tsx +69 -0
  1176. package/src/lib/ui/components/primitives/ButtonPicker.tsx +128 -0
  1177. package/src/lib/ui/components/primitives/Dialog.tsx +57 -0
  1178. package/src/lib/ui/components/primitives/DropdownMenu.tsx +229 -0
  1179. package/src/lib/ui/components/primitives/Icon.tsx +55 -0
  1180. package/src/lib/ui/components/primitives/Input.tsx +165 -0
  1181. package/src/lib/ui/components/primitives/Kbd.tsx +17 -0
  1182. package/src/lib/ui/components/primitives/Popover.tsx +61 -0
  1183. package/src/lib/ui/components/primitives/Slider.tsx +62 -0
  1184. package/src/lib/ui/components/primitives/shared.ts +40 -0
  1185. package/src/lib/ui/constants.ts +2 -0
  1186. package/src/lib/ui/hooks/clipboard/pasteExcalidrawContent.ts +514 -0
  1187. package/src/lib/ui/hooks/clipboard/pasteFiles.ts +31 -0
  1188. package/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts +19 -0
  1189. package/src/lib/ui/hooks/clipboard/pasteUrl.ts +44 -0
  1190. package/src/lib/ui/hooks/menuHelpers.ts +247 -0
  1191. package/src/lib/ui/hooks/useActions.tsx +1180 -0
  1192. package/src/lib/ui/hooks/useActionsMenuSchema.tsx +123 -0
  1193. package/src/lib/ui/hooks/useAssetUrls.tsx +28 -0
  1194. package/src/lib/ui/hooks/useBreakpoint.tsx +42 -0
  1195. package/src/lib/ui/hooks/useCanRedo.ts +7 -0
  1196. package/src/lib/ui/hooks/useCanUndo.ts +7 -0
  1197. package/src/lib/ui/hooks/useClipboardEvents.ts +705 -0
  1198. package/src/lib/ui/hooks/useContextMenuSchema.tsx +260 -0
  1199. package/src/lib/ui/hooks/useCopyAs.ts +26 -0
  1200. package/src/lib/ui/hooks/useDialogsProvider.tsx +128 -0
  1201. package/src/lib/ui/hooks/useEditorEvents.ts +23 -0
  1202. package/src/lib/ui/hooks/useEventsProvider.tsx +129 -0
  1203. package/src/lib/ui/hooks/useExportAs.ts +30 -0
  1204. package/src/lib/ui/hooks/useHasLinkShapeSelected.ts +17 -0
  1205. package/src/lib/ui/hooks/useHelpMenuSchema.tsx +105 -0
  1206. package/src/lib/ui/hooks/useHighDpiCanvas.ts +14 -0
  1207. package/src/lib/ui/hooks/useInsertMedia.ts +35 -0
  1208. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +121 -0
  1209. package/src/lib/ui/hooks/useKeyboardShortcutsSchema.tsx +127 -0
  1210. package/src/lib/ui/hooks/useLocalStorageState.ts +30 -0
  1211. package/src/lib/ui/hooks/useMenuIsOpen.ts +73 -0
  1212. package/src/lib/ui/hooks/useMenuSchema.tsx +280 -0
  1213. package/src/lib/ui/hooks/useOnlyFlippableShape.ts +29 -0
  1214. package/src/lib/ui/hooks/usePreloadAssets.ts +120 -0
  1215. package/src/lib/ui/hooks/usePreloadIcons.ts +38 -0
  1216. package/src/lib/ui/hooks/usePrint.ts +223 -0
  1217. package/src/lib/ui/hooks/useReadonly.ts +7 -0
  1218. package/src/lib/ui/hooks/useRevelantStyles.ts +38 -0
  1219. package/src/lib/ui/hooks/useShowAutoSizeToggle.ts +17 -0
  1220. package/src/lib/ui/hooks/useToastsProvider.tsx +75 -0
  1221. package/src/lib/ui/hooks/useToolbarSchema.tsx +99 -0
  1222. package/src/lib/ui/hooks/useTools.tsx +245 -0
  1223. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +356 -0
  1224. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +367 -0
  1225. package/src/lib/ui/hooks/useTranslation/translations.ts +74 -0
  1226. package/src/lib/ui/hooks/useTranslation/useLanguages.tsx +10 -0
  1227. package/src/lib/ui/hooks/useTranslation/useTranslation.tsx +117 -0
  1228. package/src/lib/ui/icon-types.ts +337 -0
  1229. package/src/lib/ui/overrides.ts +211 -0
  1230. package/src/lib/ui/version.ts +1 -0
  1231. package/src/lib/ui.css +1603 -0
  1232. package/src/lib/utils/assets/assets.ts +103 -0
  1233. package/src/lib/utils/assets/is-gif-animated.ts +106 -0
  1234. package/src/lib/utils/assets.ts +103 -0
  1235. package/src/lib/utils/embeds/embeds.test.ts +612 -0
  1236. package/src/lib/utils/embeds/embeds.ts +99 -0
  1237. package/src/lib/utils/export/copyAs.ts +139 -0
  1238. package/src/lib/utils/export/export.ts +128 -0
  1239. package/src/lib/utils/export/exportAs.ts +94 -0
  1240. package/src/lib/utils/frames/frames.ts +101 -0
  1241. package/src/lib/utils/static-assets/assetUrls.ts +41 -0
  1242. package/src/lib/utils/text/text.test.ts +11 -0
  1243. package/src/lib/utils/text/text.ts +59 -0
  1244. package/src/lib/utils/tldr/buildFromV1Document.ts +1171 -0
  1245. package/src/lib/utils/tldr/file.ts +303 -0
  1246. package/src/test/ClickManager.test.ts +258 -0
  1247. package/src/test/Editor.test.tsx +647 -0
  1248. package/src/test/EraserTool.test.ts +446 -0
  1249. package/src/test/HandTool.test.ts +191 -0
  1250. package/src/test/HighlightShape.test.ts +24 -0
  1251. package/src/test/LaserTool.test.ts +3 -0
  1252. package/src/test/SelectTool.test.ts +445 -0
  1253. package/src/test/TLSessionStateSnapshot.test.ts +152 -0
  1254. package/src/test/TLUserPreferences.test.ts +123 -0
  1255. package/src/test/TestEditor.test.ts +7 -0
  1256. package/src/test/TestEditor.ts +661 -0
  1257. package/src/test/TldrawEditor.test.tsx +377 -0
  1258. package/src/test/ZoomTool.test.ts +210 -0
  1259. package/src/test/__snapshots__/groups.test.ts.snap +46 -0
  1260. package/src/test/__snapshots__/resizing.test.ts.snap +43 -0
  1261. package/src/test/arrowBindingsIndex.test.tsx +295 -0
  1262. package/src/test/arrows-megabus.test.ts +652 -0
  1263. package/src/test/assets.test.ts +38 -0
  1264. package/src/test/bookmark-shapes.test.ts +141 -0
  1265. package/src/test/cleanup.test.ts +127 -0
  1266. package/src/test/commands/__snapshots__/getSvg.test.ts.snap +174 -0
  1267. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +185 -0
  1268. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +12 -0
  1269. package/src/test/commands/alignShapes.test.tsx +388 -0
  1270. package/src/test/commands/allShapesCommonBounds.test.ts +91 -0
  1271. package/src/test/commands/animateShapes.test.ts +3 -0
  1272. package/src/test/commands/animateToShape.test.ts +3 -0
  1273. package/src/test/commands/animationSpeed.test.ts +38 -0
  1274. package/src/test/commands/blur.test.ts +3 -0
  1275. package/src/test/commands/cancel.test.ts +3 -0
  1276. package/src/test/commands/centerOnPoint.test.ts +21 -0
  1277. package/src/test/commands/clipboard.test.ts +481 -0
  1278. package/src/test/commands/complete.test.ts +3 -0
  1279. package/src/test/commands/createPage.test.ts +65 -0
  1280. package/src/test/commands/createShapes.test.ts +141 -0
  1281. package/src/test/commands/deletePage.test.ts +79 -0
  1282. package/src/test/commands/deleteShapes.test.ts +113 -0
  1283. package/src/test/commands/distributeShapes.test.ts +232 -0
  1284. package/src/test/commands/duplicatePage.test.ts +55 -0
  1285. package/src/test/commands/getContent.test.ts +9 -0
  1286. package/src/test/commands/getInitialMetaForShape.test.ts +21 -0
  1287. package/src/test/commands/getSvg.test.ts +110 -0
  1288. package/src/test/commands/groupShapes.test.ts +42 -0
  1289. package/src/test/commands/guide.md +12 -0
  1290. package/src/test/commands/interrupt.test.ts +3 -0
  1291. package/src/test/commands/lockShapes.test.ts +176 -0
  1292. package/src/test/commands/moveShapesToPage.test.ts +254 -0
  1293. package/src/test/commands/nudge.test.ts +292 -0
  1294. package/src/test/commands/packShapes.test.ts +62 -0
  1295. package/src/test/commands/pageToScreen.test.ts +25 -0
  1296. package/src/test/commands/pan.test.ts +32 -0
  1297. package/src/test/commands/penmode.test.ts +27 -0
  1298. package/src/test/commands/pinch.test.ts +11 -0
  1299. package/src/test/commands/putContent.test.ts +39 -0
  1300. package/src/test/commands/reorderShapes.test.ts +950 -0
  1301. package/src/test/commands/reparentShapesById.test.ts +162 -0
  1302. package/src/test/commands/resetZoom.test.ts +30 -0
  1303. package/src/test/commands/resizeShape.test.ts +58 -0
  1304. package/src/test/commands/rotateShapes.test.ts +82 -0
  1305. package/src/test/commands/screenToPage.test.ts +246 -0
  1306. package/src/test/commands/setAppState.test.ts +9 -0
  1307. package/src/test/commands/setBrush.test.ts +38 -0
  1308. package/src/test/commands/setCurrentPage.test.ts +88 -0
  1309. package/src/test/commands/setPageState.test.ts +9 -0
  1310. package/src/test/commands/setSelectedIds.test.ts +57 -0
  1311. package/src/test/commands/setSelectedTool.test.ts +23 -0
  1312. package/src/test/commands/setSettings.test.ts +9 -0
  1313. package/src/test/commands/setStyle.test.ts +11 -0
  1314. package/src/test/commands/squash.test.ts +13 -0
  1315. package/src/test/commands/stackShapes.test.ts +227 -0
  1316. package/src/test/commands/stretch.test.tsx +245 -0
  1317. package/src/test/commands/ungroup.test.ts +17 -0
  1318. package/src/test/commands/updateShapes.test.ts +192 -0
  1319. package/src/test/commands/updateViewportPageBounds.test.ts +123 -0
  1320. package/src/test/commands/zoomIn.test.ts +43 -0
  1321. package/src/test/commands/zoomOut.test.ts +31 -0
  1322. package/src/test/commands/zoomToBounds.test.ts +50 -0
  1323. package/src/test/commands/zoomToFit.test.ts +20 -0
  1324. package/src/test/commands/zoomToSelection.test.ts +42 -0
  1325. package/src/test/cropping.test.ts +1033 -0
  1326. package/src/test/drawing.test.ts +262 -0
  1327. package/src/test/duplicate.test.ts +217 -0
  1328. package/src/test/flipShapes.test.ts +581 -0
  1329. package/src/test/frames.test.ts +995 -0
  1330. package/src/test/getShapeAtPoint.test.ts +168 -0
  1331. package/src/test/getSnapLines.ts +25 -0
  1332. package/src/test/groups.test.ts +2005 -0
  1333. package/src/test/middleMouseButtonPanning.test.ts +31 -0
  1334. package/src/test/modifiers.test.ts +36 -0
  1335. package/src/test/panning.test.ts +25 -0
  1336. package/src/test/parentsToChildrenWithIndexes.test.ts +117 -0
  1337. package/src/test/paste.test.ts +494 -0
  1338. package/src/test/renderingShapes.test.tsx +223 -0
  1339. package/src/test/resizeBox.test.ts +106 -0
  1340. package/src/test/resizing.test.ts +3901 -0
  1341. package/src/test/rotating.test.ts +321 -0
  1342. package/src/test/roundedBox.ts +13 -0
  1343. package/src/test/select.test.tsx +172 -0
  1344. package/src/test/selection-omnibus.test.ts +1710 -0
  1345. package/src/test/shapeIdsInCurrentPage.test.ts +75 -0
  1346. package/src/test/shapeutils.test.ts +204 -0
  1347. package/src/test/spacebarPanning.test.ts +50 -0
  1348. package/src/test/styles2.test.tsx +199 -0
  1349. package/src/test/styles3.test.ts +70 -0
  1350. package/src/test/test-jsx.tsx +134 -0
  1351. package/src/test/testutils/getSnapLines.ts +25 -0
  1352. package/src/test/testutils/roundedBox.ts +13 -0
  1353. package/src/test/text.test.ts +269 -0
  1354. package/src/test/translating-snapping.test.ts +584 -0
  1355. package/src/test/translating.test.ts +1829 -0
  1356. package/src/test/viewport-following.test.ts +18 -0
  1357. package/tldraw.css +3264 -0
@@ -0,0 +1,2954 @@
1
+ /// <reference types="react" />
2
+
3
+ import { ArrayOfValidator } from '@bigbluebutton/editor';
4
+ import { BaseBoxShapeTool } from '@bigbluebutton/editor';
5
+ import { BaseBoxShapeUtil } from '@bigbluebutton/editor';
6
+ import { Box2d } from '@bigbluebutton/editor';
7
+ import { Circle2d } from '@bigbluebutton/editor';
8
+ import { CubicSpline2d } from '@bigbluebutton/editor';
9
+ import { DictValidator } from '@bigbluebutton/editor';
10
+ import { Editor } from '@bigbluebutton/editor';
11
+ import { EMBED_DEFINITIONS } from '@bigbluebutton/editor';
12
+ import { EmbedDefinition } from '@bigbluebutton/editor';
13
+ import { EnumStyleProp } from '@bigbluebutton/editor';
14
+ import { Geometry2d } from '@bigbluebutton/editor';
15
+ import { Group2d } from '@bigbluebutton/editor';
16
+ import { JsonObject } from '@bigbluebutton/editor';
17
+ import { LANGUAGES } from '@bigbluebutton/editor';
18
+ import { Matrix2d } from '@bigbluebutton/editor';
19
+ import { Matrix2dModel } from '@bigbluebutton/editor';
20
+ import { MigrationFailureReason } from '@bigbluebutton/editor';
21
+ import { Migrations } from '@bigbluebutton/editor';
22
+ import { NamedExoticComponent } from 'react';
23
+ import { ObjectValidator } from '@bigbluebutton/editor';
24
+ import { Polygon2d } from '@bigbluebutton/editor';
25
+ import { Polyline2d } from '@bigbluebutton/editor';
26
+ import { default as React_2 } from 'react';
27
+ import * as React_3 from 'react';
28
+ import { ReactNode } from 'react';
29
+ import { Rectangle2d } from '@bigbluebutton/editor';
30
+ import { RecursivePartial } from '@bigbluebutton/editor';
31
+ import { Result } from '@bigbluebutton/editor';
32
+ import { SelectionCorner } from '@bigbluebutton/editor';
33
+ import { SelectionEdge } from '@bigbluebutton/editor';
34
+ import { SelectionHandle } from '@bigbluebutton/editor';
35
+ import { SerializedSchema } from '@bigbluebutton/editor';
36
+ import { ShapeUtil } from '@bigbluebutton/editor';
37
+ import { SnapPoint } from '@bigbluebutton/editor';
38
+ import { StateNode } from '@bigbluebutton/editor';
39
+ import { StoreSnapshot } from '@bigbluebutton/editor';
40
+ import { SvgExportContext } from '@bigbluebutton/editor';
41
+ import { TLAnyShapeUtilConstructor } from '@bigbluebutton/editor';
42
+ import { TLArrowShape } from '@bigbluebutton/editor';
43
+ import { TLAssetId } from '@bigbluebutton/editor';
44
+ import { TLBaseEventInfo } from '@bigbluebutton/editor';
45
+ import { TLBookmarkShape } from '@bigbluebutton/editor';
46
+ import { TLCancelEvent } from '@bigbluebutton/editor';
47
+ import { TLClickEvent } from '@bigbluebutton/editor';
48
+ import { TLClickEventInfo } from '@bigbluebutton/editor';
49
+ import { TLDefaultSizeStyle } from '@bigbluebutton/editor';
50
+ import { TldrawEditorBaseProps } from '@bigbluebutton/editor';
51
+ import { TLDrawShape } from '@bigbluebutton/editor';
52
+ import { TLDrawShapeSegment } from '@bigbluebutton/editor';
53
+ import { TLEmbedShape } from '@bigbluebutton/editor';
54
+ import { TLEnterEventHandler } from '@bigbluebutton/editor';
55
+ import { TLEventHandlers } from '@bigbluebutton/editor';
56
+ import { TLExitEventHandler } from '@bigbluebutton/editor';
57
+ import { TLFrameShape } from '@bigbluebutton/editor';
58
+ import { TLGeoShape } from '@bigbluebutton/editor';
59
+ import { TLHandle } from '@bigbluebutton/editor';
60
+ import { TLHandlesComponent } from '@bigbluebutton/editor';
61
+ import { TLHighlightShape } from '@bigbluebutton/editor';
62
+ import { TLHoveredShapeIndicatorComponent } from '@bigbluebutton/editor';
63
+ import { TLImageShape } from '@bigbluebutton/editor';
64
+ import { TLInterruptEvent } from '@bigbluebutton/editor';
65
+ import { TLKeyboardEvent } from '@bigbluebutton/editor';
66
+ import { TLKeyboardEventInfo } from '@bigbluebutton/editor';
67
+ import { TLLanguage } from '@bigbluebutton/editor';
68
+ import { TLLineShape } from '@bigbluebutton/editor';
69
+ import { TLNoteShape } from '@bigbluebutton/editor';
70
+ import { TLOnBeforeCreateHandler } from '@bigbluebutton/editor';
71
+ import { TLOnBeforeUpdateHandler } from '@bigbluebutton/editor';
72
+ import { TLOnDoubleClickHandler } from '@bigbluebutton/editor';
73
+ import { TLOnEditEndHandler } from '@bigbluebutton/editor';
74
+ import { TLOnHandleChangeHandler } from '@bigbluebutton/editor';
75
+ import { TLOnResizeEndHandler } from '@bigbluebutton/editor';
76
+ import { TLOnResizeHandler } from '@bigbluebutton/editor';
77
+ import { TLOnTranslateStartHandler } from '@bigbluebutton/editor';
78
+ import { TLParentId } from '@bigbluebutton/editor';
79
+ import { TLPointerEvent } from '@bigbluebutton/editor';
80
+ import { TLPointerEventInfo } from '@bigbluebutton/editor';
81
+ import { TLPointerEventName } from '@bigbluebutton/editor';
82
+ import { TLRecord } from '@bigbluebutton/editor';
83
+ import { TLRotationSnapshot } from '@bigbluebutton/editor';
84
+ import { TLSchema } from '@bigbluebutton/editor';
85
+ import { TLScribbleComponent } from '@bigbluebutton/editor';
86
+ import { TLSelectionBackgroundComponent } from '@bigbluebutton/editor';
87
+ import { TLSelectionForegroundComponent } from '@bigbluebutton/editor';
88
+ import { TLSelectionHandle } from '@bigbluebutton/editor';
89
+ import { TLShape } from '@bigbluebutton/editor';
90
+ import { TLShapeId } from '@bigbluebutton/editor';
91
+ import { TLShapePartial } from '@bigbluebutton/editor';
92
+ import { TLShapeUtilCanvasSvgDef } from '@bigbluebutton/editor';
93
+ import { TLShapeUtilFlag } from '@bigbluebutton/editor';
94
+ import { TLStore } from '@bigbluebutton/editor';
95
+ import { TLStoreWithStatus } from '@bigbluebutton/editor';
96
+ import { TLSvgOptions } from '@bigbluebutton/editor';
97
+ import { TLTextShape } from '@bigbluebutton/editor';
98
+ import { TLUnknownShape } from '@bigbluebutton/editor';
99
+ import { TLVideoShape } from '@bigbluebutton/editor';
100
+ import { UnionValidator } from '@bigbluebutton/editor';
101
+ import { UnknownRecord } from '@bigbluebutton/editor';
102
+ import { Validator } from '@bigbluebutton/editor';
103
+ import { Vec2d } from '@bigbluebutton/editor';
104
+ import { Vec2dModel } from '@bigbluebutton/editor';
105
+ import { VecLike } from '@bigbluebutton/editor';
106
+
107
+ /** @public */
108
+ declare type ActionsMenuSchemaProviderProps = {
109
+ overrides?: (editor: Editor, schema: TLUiActionsMenuSchemaContextType, helpers: {
110
+ actions: ReturnType<typeof useActions>;
111
+ oneSelected: boolean;
112
+ twoSelected: boolean;
113
+ threeSelected: boolean;
114
+ }) => TLUiActionsMenuSchemaContextType;
115
+ children: any;
116
+ };
117
+
118
+ /** @public */
119
+ declare type ActionsProviderProps = {
120
+ overrides?: (editor: Editor, actions: TLUiActionsContextType, helpers: undefined) => TLUiActionsContextType;
121
+ children: any;
122
+ };
123
+
124
+ declare enum AlignStyle {
125
+ Start = "start",
126
+ Middle = "middle",
127
+ End = "end",
128
+ Justify = "justify"
129
+ }
130
+
131
+ declare interface ArrowBinding extends TLV1Binding {
132
+ handleId: keyof ArrowShape['handles'];
133
+ distance: number;
134
+ point: number[];
135
+ }
136
+
137
+ declare interface ArrowShape extends TDBaseShape {
138
+ type: TDShapeType.Arrow;
139
+ bend: number;
140
+ handles: {
141
+ start: TDHandle;
142
+ bend: TDHandle;
143
+ end: TDHandle;
144
+ };
145
+ decorations?: {
146
+ start?: Decoration;
147
+ end?: Decoration;
148
+ middle?: Decoration;
149
+ };
150
+ label?: string;
151
+ labelPoint?: number[];
152
+ }
153
+
154
+ /** @public */
155
+ export declare class ArrowShapeTool extends StateNode {
156
+ static id: string;
157
+ static initial: string;
158
+ static children: () => (typeof Idle | typeof Pointing)[];
159
+ shapeType: string;
160
+ }
161
+
162
+ /** @public */
163
+ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
164
+ static type: "arrow";
165
+ static props: {
166
+ labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
167
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
168
+ fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
169
+ dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
170
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
171
+ arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
172
+ arrowheadEnd: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
173
+ font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
174
+ start: UnionValidator<"type", {
175
+ binding: ObjectValidator< {
176
+ type: "binding";
177
+ boundShapeId: TLShapeId;
178
+ normalizedAnchor: Vec2dModel;
179
+ isExact: boolean;
180
+ isPrecise: boolean;
181
+ }>;
182
+ point: ObjectValidator< {
183
+ type: "point";
184
+ x: number;
185
+ y: number;
186
+ }>;
187
+ }, never>;
188
+ end: UnionValidator<"type", {
189
+ binding: ObjectValidator< {
190
+ type: "binding";
191
+ boundShapeId: TLShapeId;
192
+ normalizedAnchor: Vec2dModel;
193
+ isExact: boolean;
194
+ isPrecise: boolean;
195
+ }>;
196
+ point: ObjectValidator< {
197
+ type: "point";
198
+ x: number;
199
+ y: number;
200
+ }>;
201
+ }, never>;
202
+ bend: Validator<number>;
203
+ text: Validator<string>;
204
+ };
205
+ static migrations: Migrations;
206
+ canEdit: () => boolean;
207
+ canBind: () => boolean;
208
+ canSnap: () => boolean;
209
+ hideResizeHandles: TLShapeUtilFlag<TLArrowShape>;
210
+ hideRotateHandle: TLShapeUtilFlag<TLArrowShape>;
211
+ hideSelectionBoundsBg: TLShapeUtilFlag<TLArrowShape>;
212
+ hideSelectionBoundsFg: TLShapeUtilFlag<TLArrowShape>;
213
+ getDefaultProps(): TLArrowShape['props'];
214
+ getGeometry(shape: TLArrowShape): Group2d;
215
+ getHandles(shape: TLArrowShape): TLHandle[];
216
+ onHandleChange: TLOnHandleChangeHandler<TLArrowShape>;
217
+ onTranslateStart: TLOnTranslateStartHandler<TLArrowShape>;
218
+ onResize: TLOnResizeHandler<TLArrowShape>;
219
+ onDoubleClickHandle: (shape: TLArrowShape, handle: TLHandle) => TLShapePartial<TLArrowShape> | void;
220
+ component(shape: TLArrowShape): JSX.Element | null;
221
+ indicator(shape: TLArrowShape): JSX.Element | null;
222
+ onEditEnd: TLOnEditEndHandler<TLArrowShape>;
223
+ toSvg(shape: TLArrowShape, ctx: SvgExportContext): SVGGElement;
224
+ getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
225
+ }
226
+
227
+ /* Excluded from this release type: AssetUrlsProvider */
228
+
229
+ /** @public */
230
+ declare function Body_2({ className, children, style, }: {
231
+ className?: string;
232
+ children: any;
233
+ style?: React.CSSProperties;
234
+ }): JSX.Element;
235
+
236
+ /** @public */
237
+ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
238
+ static type: "bookmark";
239
+ static props: {
240
+ w: Validator<number>;
241
+ h: Validator<number>;
242
+ assetId: Validator<null | TLAssetId>;
243
+ url: Validator<string>;
244
+ };
245
+ static migrations: Migrations;
246
+ canResize: () => boolean;
247
+ hideSelectionBoundsFg: () => boolean;
248
+ getDefaultProps(): TLBookmarkShape['props'];
249
+ component(shape: TLBookmarkShape): JSX.Element;
250
+ indicator(shape: TLBookmarkShape): JSX.Element;
251
+ onBeforeCreate?: TLOnBeforeCreateHandler<TLBookmarkShape>;
252
+ onBeforeUpdate?: TLOnBeforeUpdateHandler<TLBookmarkShape>;
253
+ }
254
+
255
+ declare type BoxWidthHeight = {
256
+ w: number;
257
+ h: number;
258
+ };
259
+
260
+ /** @public */
261
+ export declare function BreakPointProvider({ forceMobile, children, }: {
262
+ forceMobile?: boolean;
263
+ children: any;
264
+ }): JSX.Element;
265
+
266
+ declare class Brushing extends StateNode {
267
+ static id: string;
268
+ info: TLBaseEventInfo & {
269
+ type: "pointer";
270
+ name: TLPointerEventName;
271
+ point: VecLike;
272
+ pointerId: number;
273
+ button: number;
274
+ isPen: boolean;
275
+ } & {
276
+ target: "canvas";
277
+ shape?: undefined;
278
+ } & {
279
+ target: 'canvas';
280
+ };
281
+ brush: Box2d;
282
+ initialSelectedShapeIds: TLShapeId[];
283
+ excludedShapeIds: Set<TLShapeId>;
284
+ initialStartShape: null | TLShape;
285
+ onEnter: (info: TLPointerEventInfo & {
286
+ target: 'canvas';
287
+ }) => void;
288
+ onExit: () => void;
289
+ onPointerMove: () => void;
290
+ onPointerUp: TLEventHandlers['onPointerUp'];
291
+ onComplete: TLEventHandlers['onComplete'];
292
+ onCancel?: TLCancelEvent | undefined;
293
+ onKeyDown: TLEventHandlers['onKeyDown'];
294
+ onKeyUp?: TLKeyboardEvent | undefined;
295
+ private complete;
296
+ private hitTestShapes;
297
+ onInterrupt: TLInterruptEvent;
298
+ private handleHit;
299
+ }
300
+
301
+ /* Excluded from this release type: buildFromV1Document */
302
+
303
+ /** @public */
304
+ export declare const Button: React_3.ForwardRefExoticComponent<TLUiButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
305
+
306
+ /** @public */
307
+ declare function CheckboxItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
308
+
309
+ /** @public */
310
+ declare function CloseButton(): JSX.Element;
311
+
312
+ declare enum ColorStyle {
313
+ White = "white",
314
+ LightGray = "lightGray",
315
+ Gray = "gray",
316
+ Black = "black",
317
+ Green = "green",
318
+ Cyan = "cyan",
319
+ Blue = "blue",
320
+ Indigo = "indigo",
321
+ Violet = "violet",
322
+ Red = "red",
323
+ Orange = "orange",
324
+ Yellow = "yellow"
325
+ }
326
+
327
+ /** @public */
328
+ export declare function compactMenuItems<T>(arr: T[]): Exclude<T, false | null | undefined>[];
329
+
330
+ /**
331
+ * Contains the size within the given box size
332
+ *
333
+ * @param originalSize - The size of the asset
334
+ * @param containBoxSize - The container size
335
+ * @returns Adjusted size
336
+ * @public
337
+ */
338
+ export declare function containBoxSize(originalSize: BoxWidthHeight, containBoxSize: BoxWidthHeight): BoxWidthHeight;
339
+
340
+ /** @public */
341
+ declare function Content({ side, align, sideOffset, alignOffset, children, }: {
342
+ children: any;
343
+ alignOffset?: number;
344
+ sideOffset?: number;
345
+ align?: 'center' | 'end' | 'start';
346
+ side?: 'bottom' | 'left' | 'right' | 'top';
347
+ }): JSX.Element;
348
+
349
+ /** @public */
350
+ export declare const ContextMenu: ({ children }: {
351
+ children: any;
352
+ }) => JSX.Element;
353
+
354
+ /**
355
+ * Copy the given shapes to the clipboard.
356
+ *
357
+ * @param editor - The editor instance.
358
+ * @param ids - The ids of the shapes to copy.
359
+ * @param format - The format to copy as.
360
+ * @param opts - Options for the copy.
361
+ *
362
+ * @public
363
+ */
364
+ export declare function copyAs(editor: Editor, ids: TLShapeId[], format?: TLCopyType, opts?: Partial<TLSvgOptions>): Promise<void>;
365
+
366
+ declare class Crop extends StateNode {
367
+ static id: string;
368
+ static initial: string;
369
+ static children: () => (typeof Idle_10 | typeof PointingCrop | typeof TranslatingCrop)[];
370
+ }
371
+
372
+ declare class Cropping extends StateNode {
373
+ static id: string;
374
+ info: TLBaseEventInfo & {
375
+ type: "pointer";
376
+ name: TLPointerEventName;
377
+ point: VecLike;
378
+ pointerId: number;
379
+ button: number;
380
+ isPen: boolean;
381
+ } & {
382
+ target: "selection";
383
+ handle?: TLSelectionHandle | undefined;
384
+ shape?: undefined;
385
+ } & {
386
+ target: 'selection';
387
+ handle: SelectionHandle;
388
+ onInteractionEnd?: string | undefined;
389
+ };
390
+ markId: string;
391
+ private snapshot;
392
+ onEnter: TLEnterEventHandler;
393
+ onPointerMove: TLEventHandlers['onPointerMove'];
394
+ onPointerUp: TLEventHandlers['onPointerUp'];
395
+ onComplete: TLEventHandlers['onComplete'];
396
+ onCancel: TLEventHandlers['onCancel'];
397
+ private updateCursor;
398
+ private getDefaultCrop;
399
+ private updateShapes;
400
+ private complete;
401
+ private cancel;
402
+ private createSnapshot;
403
+ }
404
+
405
+ declare enum DashStyle {
406
+ Draw = "draw",
407
+ Solid = "solid",
408
+ Dashed = "dashed",
409
+ Dotted = "dotted"
410
+ }
411
+
412
+ declare enum Decoration {
413
+ Arrow = "arrow"
414
+ }
415
+
416
+ /** @public */
417
+ export declare const DEFAULT_ACCEPTED_IMG_TYPE: string[];
418
+
419
+ /** @public */
420
+ export declare const DEFAULT_ACCEPTED_VID_TYPE: string[];
421
+
422
+ declare type DefaultHelpers = ReturnType<typeof useDefaultHelpers>;
423
+
424
+ /** @public */
425
+ export declare const defaultShapeTools: (typeof ArrowShapeTool | typeof DrawShapeTool | typeof FrameShapeTool | typeof GeoShapeTool | typeof LineShapeTool | typeof NoteShapeTool | typeof TextShapeTool)[];
426
+
427
+ /** @public */
428
+ export declare const defaultShapeUtils: TLAnyShapeUtilConstructor[];
429
+
430
+ /** @public */
431
+ export declare const defaultTools: (typeof EraserTool | typeof HandTool | typeof LaserTool | typeof SelectTool | typeof ZoomTool)[];
432
+
433
+ declare namespace Dialog {
434
+ export {
435
+ Header,
436
+ Title,
437
+ CloseButton,
438
+ Body_2 as Body,
439
+ Footer
440
+ }
441
+ }
442
+ export { Dialog }
443
+
444
+ /** @public */
445
+ declare class DragAndDropManager {
446
+ editor: Editor;
447
+ constructor(editor: Editor);
448
+ prevDroppingShapeId: null | TLShapeId;
449
+ droppingNodeTimer: null | ReturnType<typeof setTimeout>;
450
+ first: boolean;
451
+ updateDroppingNode(movingShapes: TLShape[], cb: () => void): void;
452
+ private setDragTimer;
453
+ private handleDrag;
454
+ dropShapes(shapes: TLShape[]): void;
455
+ clear(): void;
456
+ dispose: () => void;
457
+ }
458
+
459
+ declare class Dragging extends StateNode {
460
+ static id: string;
461
+ onEnter: () => void;
462
+ onPointerMove: TLEventHandlers['onPointerMove'];
463
+ onPointerUp: TLEventHandlers['onPointerUp'];
464
+ onCancel: TLEventHandlers['onCancel'];
465
+ onComplete: () => void;
466
+ private update;
467
+ private complete;
468
+ }
469
+
470
+ declare class DraggingHandle extends StateNode {
471
+ static id: string;
472
+ shapeId: TLShapeId;
473
+ initialHandle: TLHandle;
474
+ initialAdjacentHandle: null | TLHandle;
475
+ initialPagePoint: Vec2d;
476
+ markId: string;
477
+ initialPageTransform: any;
478
+ initialPageRotation: any;
479
+ info: TLBaseEventInfo & {
480
+ type: "pointer";
481
+ name: TLPointerEventName;
482
+ point: VecLike;
483
+ pointerId: number;
484
+ button: number;
485
+ isPen: boolean;
486
+ } & {
487
+ target: "handle";
488
+ shape: TLShape;
489
+ handle: TLHandle;
490
+ } & {
491
+ shape: TLArrowShape;
492
+ target: 'handle';
493
+ onInteractionEnd?: string | undefined;
494
+ isCreating: boolean;
495
+ };
496
+ isPrecise: boolean;
497
+ isPreciseId: null | TLShapeId;
498
+ pointingId: null | TLShapeId;
499
+ onEnter: TLEnterEventHandler;
500
+ private exactTimeout;
501
+ private resetExactTimeout;
502
+ private clearExactTimeout;
503
+ onPointerMove: TLEventHandlers['onPointerMove'];
504
+ onKeyDown: TLKeyboardEvent | undefined;
505
+ onKeyUp: TLKeyboardEvent | undefined;
506
+ onPointerUp: TLEventHandlers['onPointerUp'];
507
+ onComplete: TLEventHandlers['onComplete'];
508
+ onCancel: TLCancelEvent;
509
+ onExit: () => void;
510
+ private complete;
511
+ private cancel;
512
+ private update;
513
+ }
514
+
515
+ declare type DrawableShape = TLDrawShape | TLHighlightShape;
516
+
517
+ declare class Drawing extends StateNode {
518
+ static id: string;
519
+ info: TLPointerEventInfo;
520
+ initialShape?: DrawableShape;
521
+ shapeType: "draw" | "highlight";
522
+ util: ShapeUtil<TLUnknownShape>;
523
+ isPen: boolean;
524
+ segmentMode: "free" | "starting_free" | "starting_straight" | "straight";
525
+ didJustShiftClickToExtendPreviousShapeLine: boolean;
526
+ pagePointWhereCurrentSegmentChanged: Vec2d;
527
+ pagePointWhereNextSegmentChanged: null | Vec2d;
528
+ lastRecordedPoint: Vec2d;
529
+ mergeNextPoint: boolean;
530
+ currentLineLength: number;
531
+ canDraw: boolean;
532
+ markId: null | string;
533
+ onEnter: (info: TLPointerEventInfo) => void;
534
+ onPointerMove: TLEventHandlers['onPointerMove'];
535
+ onKeyDown: TLEventHandlers['onKeyDown'];
536
+ onKeyUp: TLEventHandlers['onKeyUp'];
537
+ onExit?: (() => void) | undefined;
538
+ canClose(): boolean;
539
+ getIsClosed(segments: TLDrawShapeSegment[], size: TLDefaultSizeStyle): boolean;
540
+ private startShape;
541
+ private updateShapes;
542
+ private getLineLength;
543
+ onPointerUp: TLEventHandlers['onPointerUp'];
544
+ onCancel: TLEventHandlers['onCancel'];
545
+ onComplete: TLEventHandlers['onComplete'];
546
+ onInterrupt: TLEventHandlers['onInterrupt'];
547
+ complete(): void;
548
+ cancel(): void;
549
+ }
550
+
551
+ declare interface DrawShape extends TDBaseShape {
552
+ type: TDShapeType.Draw;
553
+ points: number[][];
554
+ isComplete: boolean;
555
+ }
556
+
557
+ /** @public */
558
+ export declare class DrawShapeTool extends StateNode {
559
+ static id: string;
560
+ static initial: string;
561
+ static children: () => (typeof Drawing | typeof Idle_2)[];
562
+ shapeType: string;
563
+ onExit: () => void;
564
+ }
565
+
566
+ /** @public */
567
+ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
568
+ static type: "draw";
569
+ static props: {
570
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
571
+ fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
572
+ dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
573
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
574
+ segments: ArrayOfValidator< {
575
+ type: "free" | "straight";
576
+ points: Vec2dModel[];
577
+ }>;
578
+ isComplete: Validator<boolean>;
579
+ isClosed: Validator<boolean>;
580
+ isPen: Validator<boolean>;
581
+ };
582
+ static migrations: Migrations;
583
+ hideResizeHandles: (shape: TLDrawShape) => boolean;
584
+ hideRotateHandle: (shape: TLDrawShape) => boolean;
585
+ hideSelectionBoundsFg: (shape: TLDrawShape) => boolean;
586
+ getDefaultProps(): TLDrawShape['props'];
587
+ getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
588
+ component(shape: TLDrawShape): JSX.Element;
589
+ indicator(shape: TLDrawShape): JSX.Element;
590
+ toSvg(shape: TLDrawShape, ctx: SvgExportContext): SVGGElement;
591
+ getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
592
+ onResize: TLOnResizeHandler<TLDrawShape>;
593
+ expandSelectionOutlinePx(shape: TLDrawShape): number;
594
+ }
595
+
596
+ declare namespace DropdownMenu {
597
+ export {
598
+ Root,
599
+ Trigger,
600
+ Content,
601
+ Sub,
602
+ SubTrigger,
603
+ SubContent,
604
+ Group,
605
+ Indicator,
606
+ Item,
607
+ CheckboxItem,
608
+ RadioItem,
609
+ DropdownMenuItemProps,
610
+ DropdownMenuCheckboxItemProps
611
+ }
612
+ }
613
+ export { DropdownMenu }
614
+
615
+ /** @public */
616
+ declare interface DropdownMenuCheckboxItemProps {
617
+ checked?: boolean;
618
+ onSelect?: (e: Event) => void;
619
+ disabled?: boolean;
620
+ title: string;
621
+ children: any;
622
+ }
623
+
624
+ /** @public */
625
+ declare interface DropdownMenuItemProps extends TLUiButtonProps {
626
+ noClose?: boolean;
627
+ }
628
+
629
+ declare class EditingShape extends StateNode {
630
+ static id: string;
631
+ onEnter: () => void;
632
+ onExit: () => void;
633
+ onPointerMove: TLEventHandlers['onPointerMove'];
634
+ onPointerDown: TLEventHandlers['onPointerDown'];
635
+ onComplete: TLEventHandlers['onComplete'];
636
+ onCancel: TLEventHandlers['onCancel'];
637
+ }
638
+
639
+ declare interface EllipseShape extends TDBaseShape {
640
+ type: TDShapeType.Ellipse;
641
+ radius: number[];
642
+ label?: string;
643
+ labelPoint?: number[];
644
+ }
645
+
646
+ /** @public */
647
+ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
648
+ static type: "embed";
649
+ static props: {
650
+ w: Validator<number>;
651
+ h: Validator<number>;
652
+ url: Validator<string>;
653
+ };
654
+ static migrations: Migrations;
655
+ hideSelectionBoundsFg: TLShapeUtilFlag<TLEmbedShape>;
656
+ canEdit: TLShapeUtilFlag<TLEmbedShape>;
657
+ canUnmount: TLShapeUtilFlag<TLEmbedShape>;
658
+ canResize: (shape: TLEmbedShape) => boolean;
659
+ canEditInReadOnly: () => boolean;
660
+ getDefaultProps(): TLEmbedShape['props'];
661
+ isAspectRatioLocked: TLShapeUtilFlag<TLEmbedShape>;
662
+ onResize: TLOnResizeHandler<TLEmbedShape>;
663
+ component(shape: TLEmbedShape): JSX.Element;
664
+ indicator(shape: TLEmbedShape): JSX.Element;
665
+ }
666
+
667
+ /** @public */
668
+ export declare class EraserTool extends StateNode {
669
+ static id: string;
670
+ static initial: string;
671
+ static children: () => (typeof Erasing | typeof Idle_7 | typeof Pointing_6)[];
672
+ onEnter: () => void;
673
+ }
674
+
675
+ declare class Erasing extends StateNode {
676
+ static id: string;
677
+ private info;
678
+ private scribbleId;
679
+ private markId;
680
+ private excludedShapeIds;
681
+ onEnter: (info: TLPointerEventInfo) => void;
682
+ private pushPointToScribble;
683
+ onExit: () => void;
684
+ onPointerMove: () => void;
685
+ onPointerUp: TLEventHandlers['onPointerUp'];
686
+ onCancel: TLEventHandlers['onCancel'];
687
+ onComplete: TLEventHandlers['onComplete'];
688
+ update(): void;
689
+ complete(): void;
690
+ cancel(): void;
691
+ }
692
+
693
+ /** @public */
694
+ export declare type EventsProviderProps = {
695
+ onEvent?: TLUiEventHandler;
696
+ children: any;
697
+ };
698
+
699
+ /**
700
+ * Export the given shapes as files.
701
+ *
702
+ * @param editor - The editor instance.
703
+ * @param ids - The ids of the shapes to export.
704
+ * @param format - The format to export as.
705
+ * @param opts - Options for the export.
706
+ *
707
+ * @public
708
+ */
709
+ export declare function exportAs(editor: Editor, ids: TLShapeId[], format?: TLExportType, opts?: Partial<TLSvgOptions>): Promise<void>;
710
+
711
+ /** @public */
712
+ export declare function findMenuItem(menu: TLUiMenuSchema, path: string[]): TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem | TLUiSubMenu<string>;
713
+
714
+ /**
715
+ * Fit a frame to its content.
716
+ *
717
+ * @param id - Id of the frame you wish to fit to content.
718
+ * @param editor - tlraw editor instance.
719
+ * @param opts - Options for fitting the frame.
720
+ *
721
+ * @public
722
+ */
723
+ export declare function fitFrameToContent(editor: Editor, id: TLShapeId, opts?: {
724
+ padding: number;
725
+ }): void;
726
+
727
+ declare enum FontStyle {
728
+ Script = "script",
729
+ Sans = "sans",
730
+ Serif = "serif",
731
+ Mono = "mono"
732
+ }
733
+
734
+ /** @public */
735
+ declare function Footer({ className, children }: {
736
+ className?: string;
737
+ children: any;
738
+ }): JSX.Element;
739
+
740
+ /** @public */
741
+ export declare class FrameShapeTool extends BaseBoxShapeTool {
742
+ static id: string;
743
+ static initial: string;
744
+ shapeType: string;
745
+ onCreate: (shape: null | TLShape) => void;
746
+ }
747
+
748
+ /** @public */
749
+ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
750
+ static type: "frame";
751
+ static props: {
752
+ w: Validator<number>;
753
+ h: Validator<number>;
754
+ name: Validator<string>;
755
+ };
756
+ static migrations: Migrations;
757
+ canBind: () => boolean;
758
+ canEdit: () => boolean;
759
+ getDefaultProps(): TLFrameShape['props'];
760
+ getGeometry(shape: TLFrameShape): Geometry2d;
761
+ component(shape: TLFrameShape): JSX.Element;
762
+ toSvg(shape: TLFrameShape): Promise<SVGElement> | SVGElement;
763
+ indicator(shape: TLFrameShape): JSX.Element;
764
+ canReceiveNewChildrenOfType: (shape: TLShape, _type: TLShape['type']) => boolean;
765
+ providesBackgroundForChildren(): boolean;
766
+ canDropShapes: (shape: TLFrameShape, _shapes: TLShape[]) => boolean;
767
+ onDragShapesOver: (frame: TLFrameShape, shapes: TLShape[]) => {
768
+ shouldHint: boolean;
769
+ };
770
+ onDragShapesOut: (_shape: TLFrameShape, shapes: TLShape[]) => void;
771
+ onResizeEnd: TLOnResizeEndHandler<TLFrameShape>;
772
+ onResize: TLOnResizeHandler<any>;
773
+ }
774
+
775
+ /** @public */
776
+ export declare class GeoShapeTool extends StateNode {
777
+ static id: string;
778
+ static initial: string;
779
+ static children: () => (typeof Idle_3 | typeof Pointing_2)[];
780
+ shapeType: string;
781
+ }
782
+
783
+ /** @public */
784
+ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
785
+ static type: "geo";
786
+ static props: {
787
+ geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">;
788
+ labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
789
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
790
+ fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
791
+ dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
792
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
793
+ font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
794
+ align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
795
+ verticalAlign: EnumStyleProp<"end" | "middle" | "start">;
796
+ url: Validator<string>;
797
+ w: Validator<number>;
798
+ h: Validator<number>;
799
+ growY: Validator<number>;
800
+ text: Validator<string>;
801
+ };
802
+ static migrations: Migrations;
803
+ canEdit: () => boolean;
804
+ getDefaultProps(): TLGeoShape['props'];
805
+ getGeometry(shape: TLGeoShape): Geometry2d;
806
+ onEditEnd: TLOnEditEndHandler<TLGeoShape>;
807
+ component(shape: TLGeoShape): JSX.Element;
808
+ indicator(shape: TLGeoShape): JSX.Element;
809
+ toSvg(shape: TLGeoShape, ctx: SvgExportContext): SVGElement;
810
+ getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
811
+ onResize: TLOnResizeHandler<TLGeoShape>;
812
+ onBeforeCreate: (shape: TLGeoShape) => {
813
+ props: {
814
+ growY: number;
815
+ geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
816
+ labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
817
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
818
+ fill: "none" | "pattern" | "semi" | "solid";
819
+ dash: "dashed" | "dotted" | "draw" | "solid";
820
+ size: "l" | "m" | "s" | "xl";
821
+ font: "draw" | "mono" | "sans" | "serif";
822
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
823
+ verticalAlign: "end" | "middle" | "start";
824
+ url: string;
825
+ w: number;
826
+ h: number;
827
+ text: string;
828
+ };
829
+ type: "geo";
830
+ x: number;
831
+ y: number;
832
+ rotation: number;
833
+ index: string;
834
+ parentId: TLParentId;
835
+ isLocked: boolean;
836
+ opacity: number;
837
+ meta: JsonObject;
838
+ id: TLShapeId;
839
+ typeName: "shape";
840
+ } | undefined;
841
+ onBeforeUpdate: (prev: TLGeoShape, next: TLGeoShape) => {
842
+ props: {
843
+ growY: number;
844
+ geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
845
+ labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
846
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
847
+ fill: "none" | "pattern" | "semi" | "solid";
848
+ dash: "dashed" | "dotted" | "draw" | "solid";
849
+ size: "l" | "m" | "s" | "xl";
850
+ font: "draw" | "mono" | "sans" | "serif";
851
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
852
+ verticalAlign: "end" | "middle" | "start";
853
+ url: string;
854
+ w: number;
855
+ h: number;
856
+ text: string;
857
+ };
858
+ type: "geo";
859
+ x: number;
860
+ y: number;
861
+ rotation: number;
862
+ index: string;
863
+ parentId: TLParentId;
864
+ isLocked: boolean;
865
+ opacity: number;
866
+ meta: JsonObject;
867
+ id: TLShapeId;
868
+ typeName: "shape";
869
+ } | undefined;
870
+ onDoubleClick: (shape: TLGeoShape) => {
871
+ props: {
872
+ geo: "check-box";
873
+ };
874
+ type: "geo";
875
+ x: number;
876
+ y: number;
877
+ rotation: number;
878
+ index: string;
879
+ parentId: TLParentId;
880
+ isLocked: boolean;
881
+ opacity: number;
882
+ meta: JsonObject;
883
+ id: TLShapeId;
884
+ typeName: "shape";
885
+ } | {
886
+ props: {
887
+ geo: "rectangle";
888
+ };
889
+ type: "geo";
890
+ x: number;
891
+ y: number;
892
+ rotation: number;
893
+ index: string;
894
+ parentId: TLParentId;
895
+ isLocked: boolean;
896
+ opacity: number;
897
+ meta: JsonObject;
898
+ id: TLShapeId;
899
+ typeName: "shape";
900
+ } | undefined;
901
+ }
902
+
903
+ /**
904
+ * Tests whether an URL supports embedding and returns the result. If we encounter an error, we
905
+ * return undefined.
906
+ *
907
+ * @param inputUrl - The URL to match
908
+ * @public
909
+ */
910
+ export declare function getEmbedInfo(inputUrl: string): TLEmbedResult;
911
+
912
+ /**
913
+ * Get the size of an image from its source.
914
+ *
915
+ * @example
916
+ * ```ts
917
+ * const size = await getImageSize('https://example.com/image.jpg')
918
+ * const dataUrl = await getResizedImageDataUrl('https://example.com/image.jpg', size.w, size.h, { type: "image/jpeg", quality: 0.92 })
919
+ * ```
920
+ *
921
+ * @param dataURLForImage - The image file as a string.
922
+ * @param width - The desired width.
923
+ * @param height - The desired height.
924
+ * @param opts - Options for the image.
925
+ * @public
926
+ */
927
+ export declare function getResizedImageDataUrl(dataURLForImage: string, width: number, height: number, opts?: {
928
+ type?: string | undefined;
929
+ quality?: number | undefined;
930
+ }): Promise<string>;
931
+
932
+ /** @public */
933
+ export declare function getSvgAsImage(svg: SVGElement, isSafari: boolean, options: {
934
+ type: 'jpeg' | 'png' | 'svg' | 'webp';
935
+ quality: number;
936
+ scale: number;
937
+ }): Promise<Blob | null>;
938
+
939
+ declare function getTranslatingSnapshot(editor: Editor): {
940
+ averagePagePoint: Vec2d;
941
+ movingShapes: TLShape[];
942
+ shapeSnapshots: MovingShapeSnapshot[];
943
+ initialPageBounds: Box2d;
944
+ initialSnapPoints: SnapPoint[];
945
+ };
946
+
947
+ /** @public */
948
+ declare function Group({ children, size, }: {
949
+ children: any;
950
+ size?: 'medium' | 'small' | 'tiny' | 'wide';
951
+ }): JSX.Element;
952
+
953
+ declare interface GroupShape extends TDBaseShape {
954
+ type: TDShapeType.Group;
955
+ size: number[];
956
+ children: string[];
957
+ }
958
+
959
+ /** @public */
960
+ export declare class HandTool extends StateNode {
961
+ static id: string;
962
+ static initial: string;
963
+ static children: () => (typeof Dragging | typeof Idle_8 | typeof Pointing_7)[];
964
+ onDoubleClick: TLClickEvent;
965
+ onTripleClick: TLClickEvent;
966
+ onQuadrupleClick: TLClickEvent;
967
+ }
968
+
969
+ /** @public */
970
+ declare function Header({ className, children }: {
971
+ className?: string;
972
+ children: any;
973
+ }): JSX.Element;
974
+
975
+ /** @public */
976
+ export declare class HighlightShapeTool extends StateNode {
977
+ static id: string;
978
+ static initial: string;
979
+ static children: () => (typeof Drawing | typeof Idle_2)[];
980
+ shapeType: string;
981
+ onExit: () => void;
982
+ }
983
+
984
+ /** @public */
985
+ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
986
+ static type: "highlight";
987
+ static props: {
988
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
989
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
990
+ segments: ArrayOfValidator< {
991
+ type: "free" | "straight";
992
+ points: Vec2dModel[];
993
+ }>;
994
+ isComplete: Validator<boolean>;
995
+ isPen: Validator<boolean>;
996
+ };
997
+ static migrations: Migrations;
998
+ hideResizeHandles: (shape: TLHighlightShape) => boolean;
999
+ hideRotateHandle: (shape: TLHighlightShape) => boolean;
1000
+ hideSelectionBoundsFg: (shape: TLHighlightShape) => boolean;
1001
+ getDefaultProps(): TLHighlightShape['props'];
1002
+ getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
1003
+ component(shape: TLHighlightShape): JSX.Element;
1004
+ backgroundComponent(shape: TLHighlightShape): JSX.Element;
1005
+ indicator(shape: TLHighlightShape): JSX.Element;
1006
+ toSvg(shape: TLHighlightShape): SVGPathElement;
1007
+ toBackgroundSvg(shape: TLHighlightShape): SVGPathElement;
1008
+ onResize: TLOnResizeHandler<TLHighlightShape>;
1009
+ }
1010
+
1011
+ /** @public */
1012
+ export declare const Icon: NamedExoticComponent<TLUiIconProps>;
1013
+
1014
+ declare class Idle extends StateNode {
1015
+ static id: string;
1016
+ onPointerDown: TLEventHandlers['onPointerDown'];
1017
+ onEnter: () => void;
1018
+ onCancel: () => void;
1019
+ onKeyUp: TLEventHandlers['onKeyUp'];
1020
+ }
1021
+
1022
+ declare class Idle_10 extends StateNode {
1023
+ static id: string;
1024
+ onEnter: () => void;
1025
+ onExit: TLExitEventHandler;
1026
+ onCancel: TLEventHandlers['onCancel'];
1027
+ onPointerDown: TLEventHandlers['onPointerDown'];
1028
+ onDoubleClick: TLEventHandlers['onDoubleClick'];
1029
+ onKeyDown: TLEventHandlers['onKeyDown'];
1030
+ onKeyRepeat: TLEventHandlers['onKeyRepeat'];
1031
+ onKeyUp: TLEventHandlers['onKeyUp'];
1032
+ private cancel;
1033
+ private cleanupCroppingState;
1034
+ private nudgeCroppingImage;
1035
+ }
1036
+
1037
+ declare class Idle_11 extends StateNode {
1038
+ static id: string;
1039
+ onEnter: () => void;
1040
+ onPointerMove: TLEventHandlers['onPointerMove'];
1041
+ onPointerDown: TLEventHandlers['onPointerDown'];
1042
+ onDoubleClick: TLEventHandlers['onDoubleClick'];
1043
+ onRightClick: TLEventHandlers['onRightClick'];
1044
+ onCancel: TLEventHandlers['onCancel'];
1045
+ onKeyDown: TLEventHandlers['onKeyDown'];
1046
+ onKeyRepeat: TLEventHandlers['onKeyDown'];
1047
+ onKeyUp: (info: TLKeyboardEventInfo) => void;
1048
+ private shouldStartEditingShape;
1049
+ private startEditingShape;
1050
+ isDarwin: boolean;
1051
+ handleDoubleClickOnCanvas(info: TLClickEventInfo): void;
1052
+ private nudgeSelectedShapes;
1053
+ private canInteractWithShapeInReadOnly;
1054
+ }
1055
+
1056
+ declare class Idle_12 extends StateNode {
1057
+ static id: string;
1058
+ info: TLPointerEventInfo & {
1059
+ onInteractionEnd?: string | undefined;
1060
+ };
1061
+ onEnter: (info: TLPointerEventInfo & {
1062
+ onInteractionEnd: string;
1063
+ }) => void;
1064
+ onPointerDown: TLEventHandlers['onPointerUp'];
1065
+ }
1066
+
1067
+ declare class Idle_2 extends StateNode {
1068
+ static id: string;
1069
+ onPointerDown: TLEventHandlers['onPointerDown'];
1070
+ onEnter: () => void;
1071
+ onCancel: () => void;
1072
+ }
1073
+
1074
+ declare class Idle_3 extends StateNode {
1075
+ static id: string;
1076
+ onPointerDown: TLEventHandlers['onPointerDown'];
1077
+ onEnter: () => void;
1078
+ onKeyUp: TLEventHandlers['onKeyUp'];
1079
+ onCancel: () => void;
1080
+ }
1081
+
1082
+ declare class Idle_4 extends StateNode {
1083
+ static id: string;
1084
+ private shapeId;
1085
+ onEnter: (info: {
1086
+ shapeId: TLShapeId;
1087
+ }) => void;
1088
+ onPointerDown: TLEventHandlers['onPointerDown'];
1089
+ onCancel: () => void;
1090
+ }
1091
+
1092
+ declare class Idle_5 extends StateNode {
1093
+ static id: string;
1094
+ onPointerDown: TLEventHandlers['onPointerDown'];
1095
+ onEnter: () => void;
1096
+ onCancel: () => void;
1097
+ }
1098
+
1099
+ declare class Idle_6 extends StateNode {
1100
+ static id: string;
1101
+ onPointerMove: TLEventHandlers['onPointerMove'];
1102
+ onPointerDown: TLEventHandlers['onPointerDown'];
1103
+ onEnter: () => void;
1104
+ onKeyDown: TLEventHandlers['onKeyDown'];
1105
+ onCancel: () => void;
1106
+ }
1107
+
1108
+ declare class Idle_7 extends StateNode {
1109
+ static id: string;
1110
+ onPointerDown: TLEventHandlers['onPointerDown'];
1111
+ onCancel: () => void;
1112
+ }
1113
+
1114
+ declare class Idle_8 extends StateNode {
1115
+ static id: string;
1116
+ onEnter: () => void;
1117
+ onPointerDown: TLEventHandlers['onPointerDown'];
1118
+ onCancel: () => void;
1119
+ }
1120
+
1121
+ declare class Idle_9 extends StateNode {
1122
+ static id: string;
1123
+ onPointerDown: TLEventHandlers['onPointerDown'];
1124
+ }
1125
+
1126
+ declare interface ImageShape extends TDBaseShape {
1127
+ type: TDShapeType.Image;
1128
+ size: number[];
1129
+ assetId: string;
1130
+ }
1131
+
1132
+ /** @public */
1133
+ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
1134
+ static type: "image";
1135
+ static props: {
1136
+ w: Validator<number>;
1137
+ h: Validator<number>;
1138
+ playing: Validator<boolean>;
1139
+ url: Validator<string>;
1140
+ assetId: Validator<TLAssetId | null>;
1141
+ crop: Validator< {
1142
+ topLeft: Vec2dModel;
1143
+ bottomRight: Vec2dModel;
1144
+ } | null>;
1145
+ };
1146
+ static migrations: Migrations;
1147
+ isAspectRatioLocked: () => boolean;
1148
+ canCrop: () => boolean;
1149
+ getDefaultProps(): TLImageShape['props'];
1150
+ component(shape: TLImageShape): JSX.Element;
1151
+ indicator(shape: TLImageShape): JSX.Element | null;
1152
+ toSvg(shape: TLImageShape): Promise<SVGGElement>;
1153
+ onDoubleClick: (shape: TLImageShape) => void;
1154
+ onDoubleClickEdge: TLOnDoubleClickHandler<TLImageShape>;
1155
+ }
1156
+
1157
+ /** @public */
1158
+ declare function Indicator(): JSX.Element;
1159
+
1160
+ /** @public */
1161
+ export declare const Input: React_3.ForwardRefExoticComponent<TLUiInputProps & React_3.RefAttributes<HTMLInputElement>>;
1162
+
1163
+ /** @public */
1164
+ export declare function isGifAnimated(file: File): Promise<boolean>;
1165
+
1166
+ /** @public */
1167
+ declare function Item({ noClose, ...props }: DropdownMenuItemProps): JSX.Element;
1168
+
1169
+ declare type Join<T, K> = K extends null ? {
1170
+ [R in keyof T]: T[R];
1171
+ } : {
1172
+ [R in keyof T]: T[R];
1173
+ } & {
1174
+ [R in keyof K]: K[R];
1175
+ };
1176
+
1177
+ declare class Lasering extends StateNode {
1178
+ static id: string;
1179
+ scribbleId: string;
1180
+ onEnter: () => void;
1181
+ onExit: () => void;
1182
+ onPointerMove: () => void;
1183
+ onPointerUp: () => void;
1184
+ private pushPointToScribble;
1185
+ onCancel: TLEventHandlers['onCancel'];
1186
+ onComplete: TLEventHandlers['onComplete'];
1187
+ private complete;
1188
+ private cancel;
1189
+ }
1190
+
1191
+ /** @public */
1192
+ export declare class LaserTool extends StateNode {
1193
+ static id: string;
1194
+ static initial: string;
1195
+ static children: () => (typeof Idle_9 | typeof Lasering)[];
1196
+ onEnter: () => void;
1197
+ }
1198
+
1199
+ /* Excluded from this release type: LegacyTldrawDocument */
1200
+
1201
+ /** @public */
1202
+ export declare class LineShapeTool extends StateNode {
1203
+ static id: string;
1204
+ static initial: string;
1205
+ static children: () => (typeof Idle_4 | typeof Pointing_3)[];
1206
+ shapeType: string;
1207
+ }
1208
+
1209
+ /** @public */
1210
+ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
1211
+ static type: "line";
1212
+ static props: {
1213
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
1214
+ dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
1215
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
1216
+ spline: EnumStyleProp<"cubic" | "line">;
1217
+ handles: DictValidator<string, TLHandle>;
1218
+ };
1219
+ static migrations: Migrations;
1220
+ hideResizeHandles: () => boolean;
1221
+ hideRotateHandle: () => boolean;
1222
+ hideSelectionBoundsFg: () => boolean;
1223
+ hideSelectionBoundsBg: () => boolean;
1224
+ getDefaultProps(): TLLineShape['props'];
1225
+ getGeometry(shape: TLLineShape): CubicSpline2d | Polyline2d;
1226
+ getHandles(shape: TLLineShape): TLHandle[];
1227
+ getOutlineSegments(shape: TLLineShape): Vec2d[][];
1228
+ onResize: TLOnResizeHandler<TLLineShape>;
1229
+ onHandleChange: TLOnHandleChangeHandler<TLLineShape>;
1230
+ component(shape: TLLineShape): JSX.Element | undefined;
1231
+ indicator(shape: TLLineShape): JSX.Element;
1232
+ toSvg(shape: TLLineShape): SVGGElement;
1233
+ }
1234
+
1235
+ /** @public */
1236
+ export declare function menuCustom(id: string, opts?: Partial<{
1237
+ readonlyOk: boolean;
1238
+ disabled: boolean;
1239
+ }>): {
1240
+ id: string;
1241
+ type: "custom";
1242
+ disabled: boolean;
1243
+ readonlyOk: boolean;
1244
+ };
1245
+
1246
+ /** @public */
1247
+ export declare function menuGroup(id: string, ...children: (false | TLUiMenuChild)[]): null | TLUiMenuGroup;
1248
+
1249
+ /** @public */
1250
+ export declare function menuItem(actionItem: TLUiActionItem | TLUiToolItem, opts?: Partial<{
1251
+ checked: boolean;
1252
+ disabled: boolean;
1253
+ }>): TLUiMenuItem;
1254
+
1255
+ /** @public */
1256
+ export declare function menuSubmenu(id: string, label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey, ...children: (false | TLUiMenuChild)[]): null | TLUiSubMenu;
1257
+
1258
+ declare interface MovingShapeSnapshot {
1259
+ shape: TLShape;
1260
+ pagePoint: Vec2d;
1261
+ parentTransform: Matrix2dModel | null;
1262
+ }
1263
+
1264
+ /** @public */
1265
+ export declare class NoteShapeTool extends StateNode {
1266
+ static id: string;
1267
+ static initial: string;
1268
+ static children: () => (typeof Idle_5 | typeof Pointing_4)[];
1269
+ shapeType: string;
1270
+ }
1271
+
1272
+ /** @public */
1273
+ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
1274
+ static type: "note";
1275
+ static props: {
1276
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
1277
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
1278
+ font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
1279
+ align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
1280
+ verticalAlign: EnumStyleProp<"end" | "middle" | "start">;
1281
+ growY: Validator<number>;
1282
+ url: Validator<string>;
1283
+ text: Validator<string>;
1284
+ };
1285
+ static migrations: Migrations;
1286
+ canEdit: () => boolean;
1287
+ hideResizeHandles: () => boolean;
1288
+ hideSelectionBoundsFg: () => boolean;
1289
+ getDefaultProps(): TLNoteShape['props'];
1290
+ getHeight(shape: TLNoteShape): number;
1291
+ getGeometry(shape: TLNoteShape): Rectangle2d;
1292
+ component(shape: TLNoteShape): JSX.Element;
1293
+ indicator(shape: TLNoteShape): JSX.Element;
1294
+ toSvg(shape: TLNoteShape, ctx: SvgExportContext): SVGGElement;
1295
+ onBeforeCreate: (next: TLNoteShape) => {
1296
+ props: {
1297
+ growY: number;
1298
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
1299
+ size: "l" | "m" | "s" | "xl";
1300
+ font: "draw" | "mono" | "sans" | "serif";
1301
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
1302
+ verticalAlign: "end" | "middle" | "start";
1303
+ url: string;
1304
+ text: string;
1305
+ };
1306
+ type: "note";
1307
+ x: number;
1308
+ y: number;
1309
+ rotation: number;
1310
+ index: string;
1311
+ parentId: TLParentId;
1312
+ isLocked: boolean;
1313
+ opacity: number;
1314
+ meta: JsonObject;
1315
+ id: TLShapeId;
1316
+ typeName: "shape";
1317
+ } | undefined;
1318
+ onBeforeUpdate: (prev: TLNoteShape, next: TLNoteShape) => {
1319
+ props: {
1320
+ growY: number;
1321
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
1322
+ size: "l" | "m" | "s" | "xl";
1323
+ font: "draw" | "mono" | "sans" | "serif";
1324
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
1325
+ verticalAlign: "end" | "middle" | "start";
1326
+ url: string;
1327
+ text: string;
1328
+ };
1329
+ type: "note";
1330
+ x: number;
1331
+ y: number;
1332
+ rotation: number;
1333
+ index: string;
1334
+ parentId: TLParentId;
1335
+ isLocked: boolean;
1336
+ opacity: number;
1337
+ meta: JsonObject;
1338
+ id: TLShapeId;
1339
+ typeName: "shape";
1340
+ } | undefined;
1341
+ onEditEnd: TLOnEditEndHandler<TLNoteShape>;
1342
+ }
1343
+
1344
+ /** @public */
1345
+ export declare function OfflineIndicator(): JSX.Element;
1346
+
1347
+ /* Excluded from this release type: parseAndLoadDocument */
1348
+
1349
+ /** @public */
1350
+ export declare function parseTldrawJsonFile({ json, schema, }: {
1351
+ schema: TLSchema;
1352
+ json: string;
1353
+ }): Result<TLStore, TldrawFileParseError>;
1354
+
1355
+ declare class Pointing extends StateNode {
1356
+ static id: string;
1357
+ shape?: TLArrowShape;
1358
+ markId: string;
1359
+ onEnter: () => void;
1360
+ onExit: () => void;
1361
+ onPointerMove: TLEventHandlers['onPointerMove'];
1362
+ onPointerUp: TLEventHandlers['onPointerUp'];
1363
+ onCancel: TLEventHandlers['onCancel'];
1364
+ onComplete: TLEventHandlers['onComplete'];
1365
+ onInterrupt: TLEventHandlers['onInterrupt'];
1366
+ cancel(): void;
1367
+ createArrowShape(): void;
1368
+ updateArrowShapeEndHandle(): void;
1369
+ private preciseTimeout;
1370
+ private didTimeout;
1371
+ private startPreciseTimeout;
1372
+ private clearPreciseTimeout;
1373
+ }
1374
+
1375
+ declare class Pointing_2 extends StateNode {
1376
+ static id: string;
1377
+ markId: string;
1378
+ onPointerUp: TLEventHandlers['onPointerUp'];
1379
+ onPointerMove: TLEventHandlers['onPointerMove'];
1380
+ onCancel: TLEventHandlers['onCancel'];
1381
+ onComplete: TLEventHandlers['onComplete'];
1382
+ onInterrupt: TLEventHandlers['onInterrupt'];
1383
+ private complete;
1384
+ private cancel;
1385
+ }
1386
+
1387
+ declare class Pointing_3 extends StateNode {
1388
+ static id: string;
1389
+ shape: TLLineShape;
1390
+ markId: string | undefined;
1391
+ onEnter: (info: {
1392
+ shapeId?: TLShapeId;
1393
+ }) => void;
1394
+ onPointerMove: TLEventHandlers['onPointerMove'];
1395
+ onPointerUp: TLEventHandlers['onPointerUp'];
1396
+ onCancel: TLEventHandlers['onCancel'];
1397
+ onComplete: TLEventHandlers['onComplete'];
1398
+ onInterrupt: TLInterruptEvent;
1399
+ complete(): void;
1400
+ cancel(): void;
1401
+ }
1402
+
1403
+ declare class Pointing_4 extends StateNode {
1404
+ static id: string;
1405
+ dragged: boolean;
1406
+ info: TLPointerEventInfo;
1407
+ wasFocusedOnEnter: boolean;
1408
+ markId: string;
1409
+ shape: TLNoteShape;
1410
+ onEnter: () => void;
1411
+ onPointerMove: TLEventHandlers['onPointerMove'];
1412
+ onPointerUp: TLEventHandlers['onPointerUp'];
1413
+ onInterrupt: TLInterruptEvent;
1414
+ onComplete: TLEventHandlers['onComplete'];
1415
+ onCancel: TLEventHandlers['onCancel'];
1416
+ private complete;
1417
+ private cancel;
1418
+ private createShape;
1419
+ }
1420
+
1421
+ declare class Pointing_5 extends StateNode {
1422
+ static id: string;
1423
+ shape?: TLTextShape;
1424
+ markId: string;
1425
+ onExit: () => void;
1426
+ onPointerMove: TLEventHandlers['onPointerMove'];
1427
+ onPointerUp: () => void;
1428
+ onComplete: () => void;
1429
+ onCancel: () => void;
1430
+ onInterrupt: () => void;
1431
+ private complete;
1432
+ private cancel;
1433
+ }
1434
+
1435
+ declare class Pointing_6 extends StateNode {
1436
+ static id: string;
1437
+ onEnter: () => void;
1438
+ onPointerMove: TLEventHandlers['onPointerMove'];
1439
+ onPointerUp: TLEventHandlers['onPointerUp'];
1440
+ onCancel: TLEventHandlers['onCancel'];
1441
+ onComplete: TLEventHandlers['onComplete'];
1442
+ onInterrupt: TLEventHandlers['onInterrupt'];
1443
+ complete(): void;
1444
+ cancel(): void;
1445
+ }
1446
+
1447
+ declare class Pointing_7 extends StateNode {
1448
+ static id: string;
1449
+ onEnter: () => void;
1450
+ onPointerMove: TLEventHandlers['onPointerMove'];
1451
+ onPointerUp: TLEventHandlers['onPointerUp'];
1452
+ onCancel: TLEventHandlers['onCancel'];
1453
+ onComplete: TLEventHandlers['onComplete'];
1454
+ onInterrupt: TLEventHandlers['onInterrupt'];
1455
+ private complete;
1456
+ }
1457
+
1458
+ declare class Pointing_8 extends StateNode {
1459
+ static id: string;
1460
+ info: TLPointerEventInfo & {
1461
+ onInteractionEnd?: string | undefined;
1462
+ };
1463
+ onEnter: (info: TLPointerEventInfo & {
1464
+ onInteractionEnd: string;
1465
+ }) => void;
1466
+ onPointerUp: TLEventHandlers['onPointerUp'];
1467
+ onPointerMove: TLEventHandlers['onPointerUp'];
1468
+ onCancel: TLEventHandlers['onCancel'];
1469
+ private complete;
1470
+ private cancel;
1471
+ }
1472
+
1473
+ declare class PointingCanvas extends StateNode {
1474
+ static id: string;
1475
+ onEnter: () => void;
1476
+ onPointerMove: TLEventHandlers['onPointerMove'];
1477
+ onPointerUp: TLEventHandlers['onPointerUp'];
1478
+ onComplete: TLEventHandlers['onComplete'];
1479
+ onInterrupt: () => void;
1480
+ private complete;
1481
+ }
1482
+
1483
+ declare class PointingCrop extends StateNode {
1484
+ static id: string;
1485
+ onCancel: TLEventHandlers['onCancel'];
1486
+ onPointerMove: TLPointerEvent;
1487
+ onPointerUp: TLPointerEvent;
1488
+ }
1489
+
1490
+ declare class PointingCropHandle extends StateNode {
1491
+ static id: string;
1492
+ private info;
1493
+ private updateCursor;
1494
+ onEnter: (info: TLPointingCropHandleInfo) => void;
1495
+ onExit: () => void;
1496
+ onPointerMove: TLEventHandlers['onPointerMove'];
1497
+ onPointerUp: TLEventHandlers['onPointerUp'];
1498
+ onCancel: TLEventHandlers['onCancel'];
1499
+ onComplete: TLEventHandlers['onComplete'];
1500
+ onInterrupt: () => void;
1501
+ private cancel;
1502
+ }
1503
+
1504
+ declare class PointingHandle extends StateNode {
1505
+ static id: string;
1506
+ info: TLBaseEventInfo & {
1507
+ type: "pointer";
1508
+ name: TLPointerEventName;
1509
+ point: VecLike;
1510
+ pointerId: number;
1511
+ button: number;
1512
+ isPen: boolean;
1513
+ } & {
1514
+ target: "handle";
1515
+ shape: TLShape;
1516
+ handle: TLHandle;
1517
+ } & {
1518
+ target: 'handle';
1519
+ };
1520
+ onEnter: (info: TLPointerEventInfo & {
1521
+ target: 'handle';
1522
+ }) => void;
1523
+ onExit: () => void;
1524
+ onPointerUp: TLEventHandlers['onPointerUp'];
1525
+ onPointerMove: TLEventHandlers['onPointerMove'];
1526
+ onCancel: TLEventHandlers['onCancel'];
1527
+ onComplete: TLEventHandlers['onComplete'];
1528
+ onInterrupt: () => void;
1529
+ private cancel;
1530
+ }
1531
+
1532
+ declare class PointingResizeHandle extends StateNode {
1533
+ static id: string;
1534
+ private info;
1535
+ private updateCursor;
1536
+ onEnter: (info: PointingResizeHandleInfo) => void;
1537
+ onPointerMove: TLEventHandlers['onPointerMove'];
1538
+ onPointerUp: TLEventHandlers['onPointerUp'];
1539
+ onCancel: TLEventHandlers['onCancel'];
1540
+ onComplete: TLEventHandlers['onComplete'];
1541
+ onInterrupt: () => void;
1542
+ private complete;
1543
+ private cancel;
1544
+ }
1545
+
1546
+ declare type PointingResizeHandleInfo = Extract<TLPointerEventInfo, {
1547
+ target: 'selection';
1548
+ }> & {
1549
+ onInteractionEnd?: string;
1550
+ };
1551
+
1552
+ declare class PointingRotateHandle extends StateNode {
1553
+ static id: string;
1554
+ private info;
1555
+ private updateCursor;
1556
+ onEnter: (info: PointingRotateHandleInfo) => void;
1557
+ onExit: () => void;
1558
+ onPointerMove: () => void;
1559
+ onPointerUp: () => void;
1560
+ onCancel: TLEventHandlers['onCancel'];
1561
+ onComplete: TLEventHandlers['onComplete'];
1562
+ onInterrupt: () => void;
1563
+ private complete;
1564
+ private cancel;
1565
+ }
1566
+
1567
+ declare type PointingRotateHandleInfo = Extract<TLPointerEventInfo, {
1568
+ target: 'selection';
1569
+ }> & {
1570
+ onInteractionEnd?: string;
1571
+ };
1572
+
1573
+ declare class PointingSelection extends StateNode {
1574
+ static id: string;
1575
+ info: TLBaseEventInfo & {
1576
+ type: "pointer";
1577
+ name: TLPointerEventName;
1578
+ point: VecLike;
1579
+ pointerId: number;
1580
+ button: number;
1581
+ isPen: boolean;
1582
+ } & {
1583
+ target: "selection";
1584
+ handle?: TLSelectionHandle | undefined;
1585
+ shape?: undefined;
1586
+ } & {
1587
+ target: 'selection';
1588
+ };
1589
+ onEnter: (info: TLPointerEventInfo & {
1590
+ target: 'selection';
1591
+ }) => void;
1592
+ onPointerUp: TLEventHandlers['onPointerUp'];
1593
+ onPointerMove: TLEventHandlers['onPointerMove'];
1594
+ onDoubleClick?: TLClickEvent | undefined;
1595
+ onCancel: TLEventHandlers['onCancel'];
1596
+ onComplete: TLEventHandlers['onComplete'];
1597
+ onInterrupt: () => void;
1598
+ private cancel;
1599
+ }
1600
+
1601
+ declare class PointingShape extends StateNode {
1602
+ static id: string;
1603
+ hitShape: TLShape;
1604
+ hitShapeForPointerUp: TLShape;
1605
+ didSelectOnEnter: boolean;
1606
+ onEnter: (info: TLPointerEventInfo & {
1607
+ target: 'shape';
1608
+ }) => void;
1609
+ onPointerUp: TLEventHandlers['onPointerUp'];
1610
+ onPointerMove: TLEventHandlers['onPointerMove'];
1611
+ onCancel: TLEventHandlers['onCancel'];
1612
+ onComplete: TLEventHandlers['onComplete'];
1613
+ onInterrupt: () => void;
1614
+ private cancel;
1615
+ }
1616
+
1617
+ /** @public */
1618
+ declare function RadioItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
1619
+
1620
+ declare interface RectangleShape extends TDBaseShape {
1621
+ type: TDShapeType.Rectangle;
1622
+ size: number[];
1623
+ label?: string;
1624
+ labelPoint?: number[];
1625
+ }
1626
+
1627
+ /**
1628
+ * Remove a frame.
1629
+ *
1630
+ * @param editor - tlraw editor instance.
1631
+ * @param ids - Ids of the frames you wish to remove.
1632
+ *
1633
+ * @public
1634
+ */
1635
+ export declare function removeFrame(editor: Editor, ids: TLShapeId[]): void;
1636
+
1637
+ declare class Resizing extends StateNode {
1638
+ static id: string;
1639
+ info: TLBaseEventInfo & {
1640
+ type: "pointer";
1641
+ name: TLPointerEventName;
1642
+ point: VecLike;
1643
+ pointerId: number;
1644
+ button: number;
1645
+ isPen: boolean;
1646
+ } & {
1647
+ target: "selection";
1648
+ handle?: TLSelectionHandle | undefined;
1649
+ shape?: undefined;
1650
+ } & {
1651
+ target: "selection";
1652
+ handle: SelectionCorner | SelectionEdge;
1653
+ isCreating?: boolean | undefined;
1654
+ onCreate?: ((shape: null | TLShape) => void) | undefined;
1655
+ creationCursorOffset?: undefined | VecLike;
1656
+ onInteractionEnd?: string | undefined;
1657
+ };
1658
+ markId: string;
1659
+ private didHoldCommand;
1660
+ creationCursorOffset: VecLike;
1661
+ private snapshot;
1662
+ onEnter: TLEnterEventHandler;
1663
+ onPointerMove: TLEventHandlers['onPointerMove'];
1664
+ onKeyDown: TLEventHandlers['onKeyDown'];
1665
+ onKeyUp: TLEventHandlers['onKeyUp'];
1666
+ onPointerUp: TLEventHandlers['onPointerUp'];
1667
+ onComplete: TLEventHandlers['onComplete'];
1668
+ onCancel: TLEventHandlers['onCancel'];
1669
+ private cancel;
1670
+ private complete;
1671
+ private handleResizeStart;
1672
+ private handleResizeEnd;
1673
+ private updateShapes;
1674
+ private updateCursor;
1675
+ onExit: () => void;
1676
+ _createSnapshot: () => {
1677
+ shapeSnapshots: Map<TLShapeId, {
1678
+ shape: TLShape;
1679
+ bounds: Box2d;
1680
+ pageTransform: Matrix2d;
1681
+ pageRotation: number;
1682
+ isAspectRatioLocked: boolean;
1683
+ }>;
1684
+ selectionBounds: Box2d;
1685
+ cursorHandleOffset: Vec2d;
1686
+ selectionRotation: number;
1687
+ selectedShapeIds: TLShapeId[];
1688
+ canShapesDeform: boolean;
1689
+ initialSelectionPageBounds: Box2d;
1690
+ frames: {
1691
+ id: TLShapeId;
1692
+ children: TLShape[];
1693
+ }[];
1694
+ };
1695
+ _createShapeSnapshot: (shape: TLShape) => {
1696
+ shape: TLShape;
1697
+ bounds: Box2d;
1698
+ pageTransform: Matrix2d;
1699
+ pageRotation: number;
1700
+ isAspectRatioLocked: boolean;
1701
+ };
1702
+ }
1703
+
1704
+ /** @public */
1705
+ declare function Root({ id, children, modal, debugOpen, }: {
1706
+ id: string;
1707
+ children: any;
1708
+ modal?: boolean;
1709
+ debugOpen?: boolean;
1710
+ }): JSX.Element;
1711
+
1712
+ declare class Rotating extends StateNode {
1713
+ static id: string;
1714
+ snapshot: TLRotationSnapshot;
1715
+ info: TLBaseEventInfo & {
1716
+ type: "pointer";
1717
+ name: TLPointerEventName;
1718
+ point: VecLike;
1719
+ pointerId: number;
1720
+ button: number;
1721
+ isPen: boolean;
1722
+ } & {
1723
+ target: "selection";
1724
+ handle?: TLSelectionHandle | undefined;
1725
+ shape?: undefined;
1726
+ } & {
1727
+ onInteractionEnd?: string | undefined;
1728
+ };
1729
+ markId: string;
1730
+ onEnter: (info: TLPointerEventInfo & {
1731
+ target: 'selection';
1732
+ onInteractionEnd?: string;
1733
+ }) => StateNode | undefined;
1734
+ onExit: () => void;
1735
+ onPointerMove: () => void;
1736
+ onKeyDown: () => void;
1737
+ onKeyUp: () => void;
1738
+ onPointerUp: TLEventHandlers['onPointerUp'];
1739
+ onComplete: TLEventHandlers['onComplete'];
1740
+ onCancel: () => void;
1741
+ private update;
1742
+ private cancel;
1743
+ private complete;
1744
+ protected handleStart(): void;
1745
+ _getRotationFromPointerPosition({ snapToNearestDegree }: {
1746
+ snapToNearestDegree: boolean;
1747
+ }): number;
1748
+ }
1749
+
1750
+ declare class ScribbleBrushing extends StateNode {
1751
+ static id: string;
1752
+ hits: Set<TLShapeId>;
1753
+ size: number;
1754
+ scribbleId: string;
1755
+ initialSelectedShapeIds: Set<TLShapeId>;
1756
+ newlySelectedShapeIds: Set<TLShapeId>;
1757
+ onEnter: () => void;
1758
+ onExit: () => void;
1759
+ onPointerMove: () => void;
1760
+ onPointerUp: () => void;
1761
+ onKeyDown: () => void;
1762
+ onKeyUp: () => void;
1763
+ onCancel: TLEventHandlers['onCancel'];
1764
+ onComplete: TLEventHandlers['onComplete'];
1765
+ private pushPointToScribble;
1766
+ private updateScribbleSelection;
1767
+ private complete;
1768
+ private cancel;
1769
+ }
1770
+
1771
+ /** @public */
1772
+ export declare class SelectTool extends StateNode {
1773
+ static id: string;
1774
+ static initial: string;
1775
+ static children: () => (typeof Brushing | typeof Crop | typeof Cropping | typeof DraggingHandle | typeof EditingShape | typeof Idle_11 | typeof PointingCanvas | typeof PointingCropHandle | typeof PointingHandle | typeof PointingResizeHandle | typeof PointingRotateHandle | typeof PointingSelection | typeof PointingShape | typeof Resizing | typeof Rotating | typeof ScribbleBrushing | typeof Translating)[];
1776
+ onExit: () => void;
1777
+ }
1778
+
1779
+ /** @public */
1780
+ export declare function serializeTldrawJson(store: TLStore): Promise<string>;
1781
+
1782
+ /** @public */
1783
+ export declare function serializeTldrawJsonBlob(store: TLStore): Promise<Blob>;
1784
+
1785
+ /** @public */
1786
+ export declare function setDefaultEditorAssetUrls(assetUrls: TLEditorAssetUrls): void;
1787
+
1788
+ /* Excluded from this release type: setDefaultUiAssetUrls */
1789
+
1790
+ declare type ShapeStyles = {
1791
+ color: ColorStyle;
1792
+ size: SizeStyle;
1793
+ dash: DashStyle;
1794
+ font?: FontStyle;
1795
+ textAlign?: AlignStyle;
1796
+ isFilled?: boolean;
1797
+ scale?: number;
1798
+ };
1799
+
1800
+ declare enum SizeStyle {
1801
+ Small = "small",
1802
+ Medium = "medium",
1803
+ Large = "large"
1804
+ }
1805
+
1806
+ /* Excluded from this release type: Spinner */
1807
+
1808
+ declare interface StickyShape extends TDBaseShape {
1809
+ type: TDShapeType.Sticky;
1810
+ size: number[];
1811
+ text: string;
1812
+ }
1813
+
1814
+ /** @public */
1815
+ declare function Sub({ id, children }: {
1816
+ id: string;
1817
+ children: any;
1818
+ }): JSX.Element;
1819
+
1820
+ /** @public */
1821
+ declare function SubContent({ alignOffset, sideOffset, children, }: {
1822
+ alignOffset?: number;
1823
+ sideOffset?: number;
1824
+ children: any;
1825
+ }): JSX.Element;
1826
+
1827
+ /** @public */
1828
+ declare function SubTrigger({ label, 'data-testid': testId, 'data-direction': dataDirection, }: {
1829
+ label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
1830
+ 'data-testid'?: string;
1831
+ 'data-direction'?: 'left' | 'right';
1832
+ }): JSX.Element;
1833
+
1834
+ declare type TDAsset = TDImageAsset | TDVideoAsset;
1835
+
1836
+ declare type TDAssets = Record<string, TDAsset>;
1837
+
1838
+ declare enum TDAssetType {
1839
+ Image = "image",
1840
+ Video = "video"
1841
+ }
1842
+
1843
+ declare interface TDBaseShape extends TLV1Shape {
1844
+ style: ShapeStyles;
1845
+ type: TDShapeType;
1846
+ label?: string;
1847
+ handles?: Record<string, TDHandle>;
1848
+ }
1849
+
1850
+ declare type TDBinding = ArrowBinding;
1851
+
1852
+ declare interface TDHandle extends TLV1Handle {
1853
+ canBind?: boolean;
1854
+ bindingId?: string;
1855
+ }
1856
+
1857
+ declare interface TDImageAsset extends TLV1Asset {
1858
+ type: TDAssetType.Image;
1859
+ fileName: string;
1860
+ src: string;
1861
+ size: number[];
1862
+ }
1863
+
1864
+ declare type TDPage = {
1865
+ id: string;
1866
+ name?: string;
1867
+ childIndex?: number;
1868
+ shapes: Record<string, TDShape>;
1869
+ bindings: Record<string, TDBinding>;
1870
+ };
1871
+
1872
+ declare type TDShape = ArrowShape | DrawShape | EllipseShape | GroupShape | ImageShape | RectangleShape | StickyShape | TextShape | TriangleShape | VideoShape;
1873
+
1874
+ declare enum TDShapeType {
1875
+ Sticky = "sticky",
1876
+ Ellipse = "ellipse",
1877
+ Rectangle = "rectangle",
1878
+ Triangle = "triangle",
1879
+ Draw = "draw",
1880
+ Arrow = "arrow",
1881
+ Text = "text",
1882
+ Group = "group",
1883
+ Image = "image",
1884
+ Video = "video"
1885
+ }
1886
+
1887
+ declare interface TDVideoAsset extends TLV1Asset {
1888
+ type: TDAssetType.Video;
1889
+ fileName: string;
1890
+ src: string;
1891
+ size: number[];
1892
+ }
1893
+
1894
+ declare interface TextShape extends TDBaseShape {
1895
+ type: TDShapeType.Text;
1896
+ text: string;
1897
+ }
1898
+
1899
+ /** @public */
1900
+ export declare class TextShapeTool extends StateNode {
1901
+ static id: string;
1902
+ static initial: string;
1903
+ static children: () => (typeof Idle_6 | typeof Pointing_5)[];
1904
+ shapeType: string;
1905
+ }
1906
+
1907
+ /** @public */
1908
+ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
1909
+ static type: "text";
1910
+ static props: {
1911
+ color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
1912
+ size: EnumStyleProp<"l" | "m" | "s" | "xl">;
1913
+ font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
1914
+ align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
1915
+ w: Validator<number>;
1916
+ text: Validator<string>;
1917
+ scale: Validator<number>;
1918
+ autoSize: Validator<boolean>;
1919
+ };
1920
+ static migrations: Migrations;
1921
+ getDefaultProps(): TLTextShape['props'];
1922
+ getMinDimensions(shape: TLTextShape): {
1923
+ height: number;
1924
+ width: number;
1925
+ };
1926
+ getGeometry(shape: TLTextShape): Rectangle2d;
1927
+ canEdit: () => boolean;
1928
+ isAspectRatioLocked: TLShapeUtilFlag<TLTextShape>;
1929
+ component(shape: TLTextShape): JSX.Element;
1930
+ indicator(shape: TLTextShape): JSX.Element | null;
1931
+ toSvg(shape: TLTextShape, ctx: SvgExportContext): SVGGElement;
1932
+ onResize: TLOnResizeHandler<TLTextShape>;
1933
+ onBeforeCreate: (shape: TLTextShape) => {
1934
+ x: number;
1935
+ y: number;
1936
+ type: "text";
1937
+ rotation: number;
1938
+ index: string;
1939
+ parentId: TLParentId;
1940
+ isLocked: boolean;
1941
+ opacity: number;
1942
+ props: {
1943
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
1944
+ size: "l" | "m" | "s" | "xl";
1945
+ font: "draw" | "mono" | "sans" | "serif";
1946
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
1947
+ w: number;
1948
+ text: string;
1949
+ scale: number;
1950
+ autoSize: boolean;
1951
+ };
1952
+ meta: JsonObject;
1953
+ id: TLShapeId;
1954
+ typeName: "shape";
1955
+ } | undefined;
1956
+ onEditEnd: TLOnEditEndHandler<TLTextShape>;
1957
+ onBeforeUpdate: (prev: TLTextShape, next: TLTextShape) => {
1958
+ x: number;
1959
+ y: number;
1960
+ props: {
1961
+ w: number;
1962
+ color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
1963
+ size: "l" | "m" | "s" | "xl";
1964
+ font: "draw" | "mono" | "sans" | "serif";
1965
+ align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
1966
+ text: string;
1967
+ scale: number;
1968
+ autoSize: boolean;
1969
+ };
1970
+ type: "text";
1971
+ rotation: number;
1972
+ index: string;
1973
+ parentId: TLParentId;
1974
+ isLocked: boolean;
1975
+ opacity: number;
1976
+ meta: JsonObject;
1977
+ id: TLShapeId;
1978
+ typeName: "shape";
1979
+ } | undefined;
1980
+ onDoubleClickEdge: (shape: TLTextShape) => {
1981
+ id: TLShapeId;
1982
+ type: "text";
1983
+ props: {
1984
+ autoSize: boolean;
1985
+ scale?: undefined;
1986
+ };
1987
+ } | {
1988
+ id: TLShapeId;
1989
+ type: "text";
1990
+ props: {
1991
+ scale: number;
1992
+ autoSize?: undefined;
1993
+ };
1994
+ } | undefined;
1995
+ }
1996
+
1997
+ /** @public */
1998
+ declare function Title({ className, children }: {
1999
+ className?: string;
2000
+ children: any;
2001
+ }): JSX.Element;
2002
+
2003
+ /** @public */
2004
+ declare type TLCopyType = 'jpeg' | 'json' | 'png' | 'svg';
2005
+
2006
+ /** @public */
2007
+ export declare function Tldraw(props: TldrawProps): JSX.Element;
2008
+
2009
+ /** @public */
2010
+ export declare const TLDRAW_FILE_EXTENSION: ".tldr";
2011
+
2012
+ /** @public */
2013
+ export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX.Element;
2014
+
2015
+ /** @public */
2016
+ export declare interface TldrawCropHandlesProps {
2017
+ size: number;
2018
+ width: number;
2019
+ height: number;
2020
+ hideAlternateHandles: boolean;
2021
+ }
2022
+
2023
+ /** @public */
2024
+ export declare interface TldrawFile {
2025
+ tldrawFileFormatVersion: number;
2026
+ schema: SerializedSchema;
2027
+ records: UnknownRecord[];
2028
+ }
2029
+
2030
+ /** @public */
2031
+ declare type TldrawFileParseError = {
2032
+ type: 'fileFormatVersionTooNew';
2033
+ version: number;
2034
+ } | {
2035
+ type: 'invalidRecords';
2036
+ cause: unknown;
2037
+ } | {
2038
+ type: 'migrationFailed';
2039
+ reason: MigrationFailureReason;
2040
+ } | {
2041
+ type: 'notATldrawFile';
2042
+ cause: unknown;
2043
+ } | {
2044
+ type: 'v1File';
2045
+ data: any;
2046
+ };
2047
+
2048
+ /** @public */
2049
+ export declare const TldrawHandles: TLHandlesComponent;
2050
+
2051
+ /** @public */
2052
+ export declare const TldrawHoveredShapeIndicator: TLHoveredShapeIndicatorComponent;
2053
+
2054
+ /** @public */
2055
+ export declare type TldrawProps = TldrawEditorBaseProps & ({
2056
+ store: TLStore | TLStoreWithStatus;
2057
+ } | {
2058
+ store?: undefined;
2059
+ persistenceKey?: string;
2060
+ sessionId?: string;
2061
+ defaultName?: string;
2062
+ /**
2063
+ * A snapshot to load for the store's initial data / schema.
2064
+ */
2065
+ snapshot?: StoreSnapshot<TLRecord>;
2066
+ }) & TldrawUiProps & Partial<TLExternalContentProps>;
2067
+
2068
+ /** @public */
2069
+ export declare const TldrawScribble: TLScribbleComponent;
2070
+
2071
+ /** @public */
2072
+ export declare const TldrawSelectionBackground: TLSelectionBackgroundComponent;
2073
+
2074
+ /** @public */
2075
+ export declare const TldrawSelectionForeground: TLSelectionForegroundComponent;
2076
+
2077
+ /**
2078
+ * @public
2079
+ */
2080
+ export declare const TldrawUi: React_2.NamedExoticComponent<TldrawUiProps>;
2081
+
2082
+ /**
2083
+ * Base props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
2084
+ *
2085
+ * @public
2086
+ */
2087
+ export declare interface TldrawUiBaseProps {
2088
+ /**
2089
+ * The component's children.
2090
+ */
2091
+ children?: ReactNode;
2092
+ /**
2093
+ * Whether to hide the user interface and only display the canvas.
2094
+ */
2095
+ hideUi?: boolean;
2096
+ /**
2097
+ * A component to use for the share zone (will be deprecated)
2098
+ */
2099
+ shareZone?: ReactNode;
2100
+ /* Excluded from this release type: topZone */
2101
+ /**
2102
+ * Additional items to add to the debug menu (will be deprecated)
2103
+ */
2104
+ renderDebugMenuItems?: () => React_2.ReactNode;
2105
+ /** Asset URL override. */
2106
+ assetUrls?: TLUiAssetUrlOverrides;
2107
+ }
2108
+
2109
+ /** @public */
2110
+ export declare function TldrawUiContextProvider({ overrides, assetUrls, onUiEvent, forceMobile, children, }: TldrawUiContextProviderProps): JSX.Element;
2111
+
2112
+ /**
2113
+ * Props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
2114
+ *
2115
+ * @public
2116
+ **/
2117
+ export declare interface TldrawUiContextProviderProps {
2118
+ /**
2119
+ * Urls for where to find fonts and other assets for the UI.
2120
+ */
2121
+ assetUrls?: RecursivePartial<TLUiAssetUrls>;
2122
+ /**
2123
+ * Overrides for the UI.
2124
+ */
2125
+ overrides?: TLUiOverrides | TLUiOverrides[];
2126
+ /**
2127
+ * Callback for when an event occurs in the UI.
2128
+ */
2129
+ onUiEvent?: TLUiEventHandler;
2130
+ /**
2131
+ * Whether to always should the mobile breakpoints.
2132
+ */
2133
+ forceMobile?: boolean;
2134
+ /**
2135
+ * The component's children.
2136
+ */
2137
+ children?: any;
2138
+ }
2139
+
2140
+ /**
2141
+ * Props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
2142
+ *
2143
+ * @public
2144
+ */
2145
+ export declare type TldrawUiProps = TldrawUiBaseProps & TldrawUiContextProviderProps;
2146
+
2147
+ /** @public */
2148
+ declare type TLEditorAssetUrls = {
2149
+ fonts: {
2150
+ monospace: string;
2151
+ serif: string;
2152
+ sansSerif: string;
2153
+ draw: string;
2154
+ };
2155
+ };
2156
+
2157
+ /** @public */
2158
+ declare type TLEmbedResult = {
2159
+ definition: EmbedDefinition;
2160
+ url: string;
2161
+ embedUrl: string;
2162
+ } | undefined;
2163
+
2164
+ /** @public */
2165
+ declare type TLExportType = 'jpeg' | 'json' | 'png' | 'svg' | 'webp';
2166
+
2167
+ /** @public */
2168
+ declare type TLExternalContentProps = {
2169
+ maxImageDimension: number;
2170
+ maxAssetSize: number;
2171
+ acceptedImageMimeTypes: string[];
2172
+ acceptedVideoMimeTypes: string[];
2173
+ };
2174
+
2175
+ declare type TLPointingCropHandleInfo = TLPointerEventInfo & {
2176
+ target: 'selection';
2177
+ } & {
2178
+ onInteractionEnd?: string;
2179
+ };
2180
+
2181
+ /** @public */
2182
+ export declare interface TLUiActionItem<TransationKey extends string = string, IconType extends string = string> {
2183
+ icon?: IconType;
2184
+ id: string;
2185
+ kbd?: string;
2186
+ title?: string;
2187
+ label?: TransationKey;
2188
+ menuLabel?: TransationKey;
2189
+ shortcutsLabel?: TransationKey;
2190
+ contextMenuLabel?: TransationKey;
2191
+ readonlyOk: boolean;
2192
+ checkbox?: boolean;
2193
+ onSelect: (source: TLUiEventSource) => Promise<void> | void;
2194
+ }
2195
+
2196
+ /** @public */
2197
+ export declare type TLUiActionsContextType = Record<string, TLUiActionItem>;
2198
+
2199
+ /** @public */
2200
+ export declare type TLUiActionsMenuSchemaContextType = TLUiMenuSchema;
2201
+
2202
+ /** @public */
2203
+ export declare type TLUiAssetUrlOverrides = RecursivePartial<TLUiAssetUrls>;
2204
+
2205
+ declare type TLUiAssetUrls = TLEditorAssetUrls & {
2206
+ icons: Record<Exclude<string, TLUiIconType> | TLUiIconType, string>;
2207
+ translations: Record<(typeof LANGUAGES)[number]['locale'], string>;
2208
+ embedIcons: Record<(typeof EMBED_DEFINITIONS)[number]['type'], string>;
2209
+ };
2210
+
2211
+ /** @public */
2212
+ export declare interface TLUiButtonProps extends React_3.HTMLAttributes<HTMLButtonElement> {
2213
+ loading?: boolean;
2214
+ disabled?: boolean;
2215
+ label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
2216
+ icon?: Exclude<string, TLUiIconType> | TLUiIconType;
2217
+ spinner?: boolean;
2218
+ iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType;
2219
+ smallIcon?: boolean;
2220
+ kbd?: string;
2221
+ isChecked?: boolean;
2222
+ invertIcon?: boolean;
2223
+ type: 'danger' | 'help' | 'icon' | 'low' | 'menu' | 'normal' | 'primary' | 'tool';
2224
+ }
2225
+
2226
+ /** @public */
2227
+ export declare interface TLUiContextMenuProps {
2228
+ children: any;
2229
+ }
2230
+
2231
+ /** @public */
2232
+ declare type TLUiContextMenuSchemaProviderProps = {
2233
+ overrides?: (editor: Editor, schema: TLUiContextTTLUiMenuSchemaContextType, helpers: {
2234
+ actions: ReturnType<typeof useActions>;
2235
+ oneSelected: boolean;
2236
+ twoSelected: boolean;
2237
+ threeSelected: boolean;
2238
+ showAutoSizeToggle: boolean;
2239
+ showUngroup: boolean;
2240
+ onlyFlippableShapeSelected: boolean;
2241
+ }) => TLUiContextTTLUiMenuSchemaContextType;
2242
+ children: any;
2243
+ };
2244
+
2245
+ /** @public */
2246
+ export declare type TLUiContextTTLUiMenuSchemaContextType = TLUiMenuSchema;
2247
+
2248
+ /** @public */
2249
+ export declare type TLUiCustomMenuItem = {
2250
+ id: string;
2251
+ type: 'custom';
2252
+ disabled: boolean;
2253
+ readonlyOk: boolean;
2254
+ };
2255
+
2256
+ /** @public */
2257
+ export declare interface TLUiDialog {
2258
+ id: string;
2259
+ onClose?: () => void;
2260
+ component: (props: TLUiDialogProps) => any;
2261
+ }
2262
+
2263
+ /** @public */
2264
+ export declare interface TLUiDialogProps {
2265
+ onClose: () => void;
2266
+ }
2267
+
2268
+ /** @public */
2269
+ export declare type TLUiDialogsContextType = {
2270
+ addDialog: (dialog: Omit<TLUiDialog, 'id'> & {
2271
+ id?: string;
2272
+ }) => string;
2273
+ removeDialog: (id: string) => string;
2274
+ updateDialog: (id: string, newDialogData: Partial<TLUiDialog>) => string;
2275
+ clearDialogs: () => void;
2276
+ dialogs: TLUiDialog[];
2277
+ };
2278
+
2279
+ /** @public */
2280
+ export declare type TLUiEventContextType = TLUiEventHandler<keyof TLUiEventMap>;
2281
+
2282
+ /** @public */
2283
+ export declare type TLUiEventHandler<T extends keyof TLUiEventMap = keyof TLUiEventMap> = (name: T, data: Join<{
2284
+ source: TLUiEventSource;
2285
+ }, TLUiEventMap[T]>) => void;
2286
+
2287
+ /** @public */
2288
+ export declare interface TLUiEventMap {
2289
+ undo: null;
2290
+ redo: null;
2291
+ 'group-shapes': null;
2292
+ 'ungroup-shapes': null;
2293
+ 'remove-frame': null;
2294
+ 'fit-frame-to-content': null;
2295
+ 'convert-to-embed': null;
2296
+ 'convert-to-bookmark': null;
2297
+ 'open-embed-link': null;
2298
+ 'toggle-auto-size': null;
2299
+ 'copy-as': {
2300
+ format: 'json' | 'png' | 'svg';
2301
+ };
2302
+ 'export-as': {
2303
+ format: 'json' | 'png' | 'svg';
2304
+ };
2305
+ 'edit-link': null;
2306
+ 'insert-embed': null;
2307
+ 'insert-media': null;
2308
+ 'align-shapes': {
2309
+ operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top';
2310
+ };
2311
+ 'duplicate-shapes': null;
2312
+ 'pack-shapes': null;
2313
+ 'stack-shapes': {
2314
+ operation: 'horizontal' | 'vertical';
2315
+ };
2316
+ 'flip-shapes': {
2317
+ operation: 'horizontal' | 'vertical';
2318
+ };
2319
+ 'distribute-shapes': {
2320
+ operation: 'horizontal' | 'vertical';
2321
+ };
2322
+ 'stretch-shapes': {
2323
+ operation: 'horizontal' | 'vertical';
2324
+ };
2325
+ 'reorder-shapes': {
2326
+ operation: 'backward' | 'forward' | 'toBack' | 'toFront';
2327
+ };
2328
+ 'delete-shapes': null;
2329
+ 'select-all-shapes': null;
2330
+ 'select-none-shapes': null;
2331
+ 'rotate-ccw': null;
2332
+ 'rotate-cw': null;
2333
+ 'zoom-in': null;
2334
+ 'zoom-out': null;
2335
+ 'zoom-to-fit': null;
2336
+ 'zoom-to-selection': null;
2337
+ 'reset-zoom': null;
2338
+ 'zoom-into-view': null;
2339
+ 'zoom-to-content': null;
2340
+ 'open-menu': {
2341
+ id: string;
2342
+ };
2343
+ 'close-menu': {
2344
+ id: string;
2345
+ };
2346
+ 'create-new-project': null;
2347
+ 'save-project-to-file': null;
2348
+ 'open-file': null;
2349
+ 'select-tool': {
2350
+ id: string;
2351
+ };
2352
+ print: null;
2353
+ copy: null;
2354
+ paste: null;
2355
+ cut: null;
2356
+ 'toggle-transparent': null;
2357
+ 'toggle-snap-mode': null;
2358
+ 'toggle-tool-lock': null;
2359
+ 'toggle-grid-mode': null;
2360
+ 'toggle-dark-mode': null;
2361
+ 'toggle-focus-mode': null;
2362
+ 'toggle-debug-mode': null;
2363
+ 'toggle-lock': null;
2364
+ 'toggle-reduce-motion': null;
2365
+ 'exit-pen-mode': null;
2366
+ 'stop-following': null;
2367
+ 'open-cursor-chat': null;
2368
+ 'zoom-tool': null;
2369
+ 'unlock-all': null;
2370
+ }
2371
+
2372
+ /** @public */
2373
+ export declare type TLUiEventSource = 'actions-menu' | 'context-menu' | 'debug-panel' | 'dialog' | 'export-menu' | 'help-menu' | 'helper-buttons' | 'kbd' | 'menu' | 'navigation-zone' | 'page-menu' | 'people-menu' | 'quick-actions' | 'share-menu' | 'toolbar' | 'unknown' | 'zoom-menu';
2374
+
2375
+ /** @public */
2376
+ export declare type TLUiHelpMenuSchemaContextType = TLUiMenuSchema;
2377
+
2378
+ /** @public */
2379
+ declare type TLUiHelpMenuSchemaProviderProps = {
2380
+ overrides?: (editor: Editor, schema: TLUiHelpMenuSchemaContextType, helpers: {
2381
+ actions: ReturnType<typeof useActions>;
2382
+ languages: readonly TLLanguage[];
2383
+ currentLanguage: string;
2384
+ oneSelected: boolean;
2385
+ twoSelected: boolean;
2386
+ threeSelected: boolean;
2387
+ }) => TLUiHelpMenuSchemaContextType;
2388
+ children: any;
2389
+ };
2390
+
2391
+ /** @public */
2392
+ export declare interface TLUiIconProps extends React.HTMLProps<HTMLDivElement> {
2393
+ icon: Exclude<string, TLUiIconType> | TLUiIconType;
2394
+ small?: boolean;
2395
+ color?: string;
2396
+ children?: undefined;
2397
+ invertIcon?: boolean;
2398
+ crossOrigin?: 'anonymous' | 'use-credentials';
2399
+ }
2400
+
2401
+ /** @public */
2402
+ export declare type TLUiIconType = 'align-bottom-center' | 'align-bottom-left' | 'align-bottom-right' | 'align-bottom' | 'align-center-center' | 'align-center-horizontal' | 'align-center-left' | 'align-center-right' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top-center' | 'align-top-left' | 'align-top-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'aspect-ratio' | 'avatar' | 'blob' | 'bring-forward' | 'bring-to-front' | 'check' | 'checkbox-checked' | 'checkbox-empty' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'code' | 'collab' | 'color' | 'comment' | 'cross-2' | 'cross' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'external-link' | 'file' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'hidden' | 'image' | 'info-circle' | 'leading' | 'link' | 'lock-small' | 'lock' | 'menu' | 'minus' | 'mixed' | 'pack' | 'page' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'ruler' | 'search' | 'send-backward' | 'send-to-back' | 'settings-horizontal' | 'settings-vertical-1' | 'settings-vertical' | 'share-1' | 'share-2' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'spline-cubic' | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'status-offline' | 'status-online' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-justify' | 'text-align-left' | 'text-align-right' | 'tool-arrow' | 'tool-embed' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-text' | 'trash' | 'triangle-down' | 'triangle-up' | 'twitter' | 'undo' | 'ungroup' | 'unlock-small' | 'unlock' | 'vertical-align-center' | 'vertical-align-end' | 'vertical-align-start' | 'visible' | 'warning-triangle' | 'zoom-in' | 'zoom-out';
2403
+
2404
+ /** @public */
2405
+ export declare interface TLUiInputProps {
2406
+ disabled?: boolean;
2407
+ label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
2408
+ icon?: Exclude<string, TLUiIconType> | TLUiIconType;
2409
+ iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType;
2410
+ autofocus?: boolean;
2411
+ autoselect?: boolean;
2412
+ children?: any;
2413
+ defaultValue?: string;
2414
+ placeholder?: string;
2415
+ onComplete?: (value: string) => void;
2416
+ onValueChange?: (value: string) => void;
2417
+ onCancel?: (value: string) => void;
2418
+ onBlur?: (value: string) => void;
2419
+ className?: string;
2420
+ /**
2421
+ * Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input
2422
+ * into view. Sometimes this doesn't work properly though - for example, if the input is newly
2423
+ * created, iOS seems to have a hard time adjusting the viewport for it. This prop allows you to
2424
+ * opt-in to some extra code to manually bring the input into view when the visual viewport of the
2425
+ * browser changes, but we don't want to use it everywhere because generally the native behavior
2426
+ * looks nicer in scenarios where it's sufficient.
2427
+ */
2428
+ shouldManuallyMaintainScrollPositionWhenFocused?: boolean;
2429
+ value?: string;
2430
+ }
2431
+
2432
+ /** @public */
2433
+ export declare type TLUiKeyboardShortcutsSchemaContextType = TLUiMenuSchema;
2434
+
2435
+ /** @public */
2436
+ export declare type TLUiKeyboardShortcutsSchemaProviderProps = {
2437
+ overrides?: (editor: Editor, schema: TLUiKeyboardShortcutsSchemaContextType, more: {
2438
+ tools: TLUiToolsContextType;
2439
+ actions: TLUiActionsContextType;
2440
+ }) => TLUiKeyboardShortcutsSchemaContextType;
2441
+ children: any;
2442
+ };
2443
+
2444
+ /** @public */
2445
+ export declare type TLUiMenuChild<TranslationKey extends string = string> = null | TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem | TLUiSubMenu<TranslationKey>;
2446
+
2447
+ /** @public */
2448
+ export declare type TLUiMenuGroup = {
2449
+ id: string;
2450
+ type: 'group';
2451
+ checkbox: boolean;
2452
+ disabled: boolean;
2453
+ readonlyOk: boolean;
2454
+ children: TLUiMenuChild[];
2455
+ };
2456
+
2457
+ /** @public */
2458
+ export declare type TLUiMenuItem = {
2459
+ id: string;
2460
+ type: 'item';
2461
+ readonlyOk: boolean;
2462
+ actionItem: TLUiActionItem;
2463
+ disabled: boolean;
2464
+ checked: boolean;
2465
+ };
2466
+
2467
+ /** @public */
2468
+ export declare type TLUiMenuSchema = (TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem)[];
2469
+
2470
+ /** @public */
2471
+ export declare type TLUiMenuSchemaContextType = TLUiMenuSchema;
2472
+
2473
+ /** @public */
2474
+ export declare type TLUiMenuSchemaProviderProps = {
2475
+ overrides?: (editor: Editor, schema: TLUiMenuSchemaContextType, helpers: {
2476
+ actions: ReturnType<typeof useActions>;
2477
+ noneSelected: boolean;
2478
+ oneSelected: boolean;
2479
+ twoSelected: boolean;
2480
+ threeSelected: boolean;
2481
+ }) => TLUiMenuSchemaContextType;
2482
+ children: any;
2483
+ };
2484
+
2485
+ declare type TLUiOverride<Type, Helpers> = (editor: Editor, schema: Type, helpers: Helpers) => Type;
2486
+
2487
+ /** @public */
2488
+ export declare type TLUiOverrides = Partial<{
2489
+ actionsMenu: WithDefaultHelpers<NonNullable<ActionsMenuSchemaProviderProps['overrides']>>;
2490
+ actions: WithDefaultHelpers<NonNullable<ActionsProviderProps['overrides']>>;
2491
+ contextMenu: WithDefaultHelpers<NonNullable<TLUiContextMenuSchemaProviderProps['overrides']>>;
2492
+ helpMenu: WithDefaultHelpers<NonNullable<TLUiHelpMenuSchemaProviderProps['overrides']>>;
2493
+ menu: WithDefaultHelpers<NonNullable<TLUiMenuSchemaProviderProps['overrides']>>;
2494
+ toolbar: WithDefaultHelpers<NonNullable<TLUiToolbarSchemaProviderProps['overrides']>>;
2495
+ keyboardShortcutsMenu: WithDefaultHelpers<NonNullable<TLUiKeyboardShortcutsSchemaProviderProps['overrides']>>;
2496
+ tools: WithDefaultHelpers<NonNullable<TLUiToolsProviderProps['overrides']>>;
2497
+ translations: TLUiTranslationProviderProps['overrides'];
2498
+ }>;
2499
+
2500
+ /** @public */
2501
+ export declare type TLUiSubMenu<TranslationKey extends string = string> = {
2502
+ id: string;
2503
+ type: 'submenu';
2504
+ label: TranslationKey;
2505
+ disabled: boolean;
2506
+ readonlyOk: boolean;
2507
+ children: TLUiMenuChild[];
2508
+ };
2509
+
2510
+ /** @public */
2511
+ export declare interface TLUiToast {
2512
+ id: string;
2513
+ icon?: TLUiIconType;
2514
+ title?: string;
2515
+ description?: string;
2516
+ actions?: TLUiToastAction[];
2517
+ keepOpen?: boolean;
2518
+ closeLabel?: string;
2519
+ }
2520
+
2521
+ /** @public */
2522
+ export declare interface TLUiToastAction {
2523
+ type: 'danger' | 'normal' | 'primary';
2524
+ label: string;
2525
+ onClick: () => void;
2526
+ }
2527
+
2528
+ /** @public */
2529
+ export declare type TLUiToastsContextType = {
2530
+ addToast: (toast: Omit<TLUiToast, 'id'> & {
2531
+ id?: string;
2532
+ }) => string;
2533
+ removeToast: (id: TLUiToast['id']) => string;
2534
+ clearToasts: () => void;
2535
+ toasts: TLUiToast[];
2536
+ };
2537
+
2538
+ /** @public */
2539
+ export declare type TLUiToolbarItem = {
2540
+ id: string;
2541
+ type: 'item';
2542
+ readonlyOk: boolean;
2543
+ toolItem: TLUiToolItem;
2544
+ };
2545
+
2546
+ /** @public */
2547
+ export declare type TLUiToolbarSchemaContextType = TLUiToolbarItem[];
2548
+
2549
+ /** @public */
2550
+ declare type TLUiToolbarSchemaProviderProps = {
2551
+ overrides?: (editor: Editor, schema: TLUiToolbarSchemaContextType, more: {
2552
+ tools: TLUiToolsContextType;
2553
+ }) => TLUiToolbarSchemaContextType;
2554
+ children: any;
2555
+ };
2556
+
2557
+ /** @public */
2558
+ export declare interface TLUiToolItem<TranslationKey extends string = string, IconType extends string = string> {
2559
+ id: string;
2560
+ label: TranslationKey;
2561
+ shortcutsLabel?: TranslationKey;
2562
+ icon: IconType;
2563
+ onSelect: (source: TLUiEventSource) => void;
2564
+ kbd?: string;
2565
+ readonlyOk: boolean;
2566
+ meta?: {
2567
+ [key: string]: any;
2568
+ };
2569
+ }
2570
+
2571
+ /** @public */
2572
+ export declare type TLUiToolsContextType = Record<string, TLUiToolItem>;
2573
+
2574
+ /** @public */
2575
+ export declare type TLUiToolsProviderProps = {
2576
+ overrides?: (editor: Editor, tools: TLUiToolsContextType, helpers: {
2577
+ insertMedia: () => void;
2578
+ }) => TLUiToolsContextType;
2579
+ children: any;
2580
+ };
2581
+
2582
+ /** @public */
2583
+ export declare type TLUiTranslation = {
2584
+ readonly locale: string;
2585
+ readonly label: string;
2586
+ readonly messages: Record<TLUiTranslationKey, string>;
2587
+ };
2588
+
2589
+ /** @public */
2590
+ export declare type TLUiTranslationContextType = TLUiTranslation;
2591
+
2592
+ /** @public */
2593
+ export declare type TLUiTranslationKey = '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.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-as-json.short' | 'action.export-as-json' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | '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.pack' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-lock' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | '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' | '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.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'debug-panel.more' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'edit-pages-dialog.move-down' | 'edit-pages-dialog.move-up' | '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.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.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' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.keyboard-shortcuts' | 'help-menu.title' | 'help-menu.twitter' | 'home-project-dialog.description' | 'home-project-dialog.ok' | 'home-project-dialog.title' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.title' | 'menu.view' | '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.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'rename-project-dialog.cancel' | 'rename-project-dialog.rename' | 'rename-project-dialog.title' | '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.default-project-name' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.readonly-link' | '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.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | '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' | 'status.online' | 'style-panel.align' | '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.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'tool-panel.drawing' | 'tool-panel.more' | 'tool-panel.shapes' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.asset' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.frame' | 'tool.hand' | 'tool.hexagon' | 'tool.highlight' | 'tool.laser' | 'tool.line' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.rectangle' | 'tool.rhombus' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | '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';
2594
+
2595
+ /** @public */
2596
+ declare interface TLUiTranslationProviderProps {
2597
+ children: any;
2598
+ /**
2599
+ * A collection of overrides different locales.
2600
+ *
2601
+ * @example
2602
+ *
2603
+ * ```ts
2604
+ * <TranslationProvider overrides={{ en: { 'style-panel.styles': 'Properties' } }} />
2605
+ * ```
2606
+ */
2607
+ overrides?: Record<string, Record<string, string>>;
2608
+ }
2609
+
2610
+ declare interface TLV1Asset {
2611
+ id: string;
2612
+ type: string;
2613
+ }
2614
+
2615
+ declare interface TLV1Binding {
2616
+ id: string;
2617
+ toId: string;
2618
+ fromId: string;
2619
+ }
2620
+
2621
+ declare interface TLV1Bounds {
2622
+ minX: number;
2623
+ minY: number;
2624
+ maxX: number;
2625
+ maxY: number;
2626
+ width: number;
2627
+ height: number;
2628
+ rotation?: number;
2629
+ }
2630
+
2631
+ declare interface TLV1Handle {
2632
+ id: string;
2633
+ index: number;
2634
+ point: number[];
2635
+ }
2636
+
2637
+ declare interface TLV1PageState {
2638
+ id: string;
2639
+ selectedIds: string[];
2640
+ camera: {
2641
+ point: number[];
2642
+ zoom: number;
2643
+ };
2644
+ brush?: null | TLV1Bounds;
2645
+ pointedId?: null | string;
2646
+ hoveredId?: null | string;
2647
+ editingId?: null | string;
2648
+ bindingId?: null | string;
2649
+ }
2650
+
2651
+ declare interface TLV1Shape {
2652
+ id: string;
2653
+ type: string;
2654
+ parentId: string;
2655
+ childIndex: number;
2656
+ name: string;
2657
+ point: number[];
2658
+ assetId?: string;
2659
+ rotation?: number;
2660
+ children?: string[];
2661
+ handles?: Record<string, TLV1Handle>;
2662
+ isGhost?: boolean;
2663
+ isHidden?: boolean;
2664
+ isLocked?: boolean;
2665
+ isGenerated?: boolean;
2666
+ isAspectRatioLocked?: boolean;
2667
+ }
2668
+
2669
+ /** @public */
2670
+ export declare function toolbarItem(toolItem: TLUiToolItem): TLUiToolbarItem;
2671
+
2672
+ declare class Translating extends StateNode {
2673
+ static id: string;
2674
+ info: TLBaseEventInfo & {
2675
+ type: "pointer";
2676
+ name: TLPointerEventName;
2677
+ point: VecLike;
2678
+ pointerId: number;
2679
+ button: number;
2680
+ isPen: boolean;
2681
+ } & {
2682
+ target: "shape";
2683
+ shape: TLShape;
2684
+ } & {
2685
+ target: 'shape';
2686
+ isCreating?: boolean | undefined;
2687
+ onCreate?: (() => void) | undefined;
2688
+ onInteractionEnd?: string | undefined;
2689
+ };
2690
+ selectionSnapshot: TranslatingSnapshot;
2691
+ snapshot: TranslatingSnapshot;
2692
+ markId: string;
2693
+ isCloning: boolean;
2694
+ isCreating: boolean;
2695
+ onCreate: (shape: null | TLShape) => void;
2696
+ dragAndDropManager: DragAndDropManager;
2697
+ onEnter: (info: TLPointerEventInfo & {
2698
+ target: 'shape';
2699
+ isCreating?: boolean;
2700
+ onCreate?: () => void;
2701
+ onInteractionEnd?: string;
2702
+ }) => void;
2703
+ onExit: () => void;
2704
+ onPointerMove: () => void;
2705
+ onKeyDown: () => void;
2706
+ onKeyUp: TLEventHandlers['onKeyUp'];
2707
+ onPointerUp: TLEventHandlers['onPointerUp'];
2708
+ onComplete: TLEventHandlers['onComplete'];
2709
+ onCancel: TLEventHandlers['onCancel'];
2710
+ protected startCloning(): void;
2711
+ protected stopCloning(): void;
2712
+ updateParent: () => void;
2713
+ reset(): void;
2714
+ protected complete(): void;
2715
+ private cancel;
2716
+ protected handleStart(): void;
2717
+ protected handleEnd(): void;
2718
+ protected handleChange(): void;
2719
+ protected updateShapes(): void;
2720
+ protected updateParentTransforms: () => void;
2721
+ }
2722
+
2723
+ declare class TranslatingCrop extends StateNode {
2724
+ static id: string;
2725
+ info: TLBaseEventInfo & {
2726
+ type: "pointer";
2727
+ name: TLPointerEventName;
2728
+ point: VecLike;
2729
+ pointerId: number;
2730
+ button: number;
2731
+ isPen: boolean;
2732
+ } & {
2733
+ target: "shape";
2734
+ shape: TLShape;
2735
+ } & {
2736
+ target: 'shape';
2737
+ isCreating?: boolean | undefined;
2738
+ onInteractionEnd?: string | undefined;
2739
+ };
2740
+ markId: string;
2741
+ private snapshot;
2742
+ onEnter: (info: TLPointerEventInfo & {
2743
+ target: 'shape';
2744
+ isCreating?: boolean;
2745
+ onInteractionEnd?: string;
2746
+ }) => void;
2747
+ onExit: () => void;
2748
+ onPointerMove: () => void;
2749
+ onPointerUp: TLEventHandlers['onPointerUp'];
2750
+ onComplete: TLEventHandlers['onComplete'];
2751
+ onCancel: TLEventHandlers['onCancel'];
2752
+ onKeyDown: TLEventHandlers['onKeyDown'];
2753
+ onKeyUp: TLEventHandlers['onKeyUp'];
2754
+ protected complete(): void;
2755
+ private cancel;
2756
+ private createSnapshot;
2757
+ protected updateShapes(): void;
2758
+ }
2759
+
2760
+ declare type TranslatingSnapshot = ReturnType<typeof getTranslatingSnapshot>;
2761
+
2762
+ declare interface TriangleShape extends TDBaseShape {
2763
+ type: TDShapeType.Triangle;
2764
+ size: number[];
2765
+ label?: string;
2766
+ labelPoint?: number[];
2767
+ }
2768
+
2769
+ /** @public */
2770
+ declare function Trigger({ children, 'data-testid': testId, }: {
2771
+ children: any;
2772
+ 'data-testid'?: string;
2773
+ }): JSX.Element;
2774
+
2775
+ /** @public */
2776
+ export declare const truncateStringWithEllipsis: (str: string, maxLength: number) => string;
2777
+
2778
+ /** @public */
2779
+ export declare function UiEventsProvider({ onEvent, children }: EventsProviderProps): JSX.Element;
2780
+
2781
+ /** @public */
2782
+ export declare function useActions(): TLUiActionsContextType;
2783
+
2784
+ /** @public */
2785
+ export declare function useActionsMenuSchema(): TLUiMenuSchema;
2786
+
2787
+ /* Excluded from this release type: useAssetUrls */
2788
+
2789
+ /** @public */
2790
+ export declare function useBreakpoint(): number;
2791
+
2792
+ /** @public */
2793
+ export declare function useCanRedo(): boolean;
2794
+
2795
+ /** @public */
2796
+ export declare function useCanUndo(): boolean;
2797
+
2798
+ /** @public */
2799
+ export declare function useContextMenuSchema(): TLUiMenuSchema;
2800
+
2801
+ /** @public */
2802
+ export declare function useCopyAs(): (ids: TLShapeId[], format?: TLCopyType) => void;
2803
+
2804
+ /** @public */
2805
+ export declare function useDefaultHelpers(): {
2806
+ addToast: (toast: Omit<TLUiToast, "id"> & {
2807
+ id?: string | undefined;
2808
+ }) => string;
2809
+ removeToast: (id: string) => string;
2810
+ clearToasts: () => void;
2811
+ addDialog: (dialog: Omit<TLUiDialog, "id"> & {
2812
+ id?: string | undefined;
2813
+ }) => string;
2814
+ clearDialogs: () => void;
2815
+ removeDialog: (id: string) => string;
2816
+ updateDialog: (id: string, newDialogData: Partial<TLUiDialog>) => string;
2817
+ msg: (id: string) => string;
2818
+ isMobile: boolean;
2819
+ };
2820
+
2821
+ /** @public */
2822
+ export declare function useDialogs(): TLUiDialogsContextType;
2823
+
2824
+ /** @public */
2825
+ export declare function useExportAs(): (ids: TLShapeId[], format?: TLExportType) => void;
2826
+
2827
+ /** @public */
2828
+ export declare function useHelpMenuSchema(): TLUiMenuSchema;
2829
+
2830
+ /** @public */
2831
+ export declare function useKeyboardShortcuts(): void;
2832
+
2833
+ /** @public */
2834
+ export declare function useKeyboardShortcutsSchema(): TLUiKeyboardShortcutsSchemaContextType;
2835
+
2836
+ /** @public */
2837
+ export declare function useLocalStorageState<T = any>(key: string, defaultValue: T): readonly [T, (setter: ((value: T) => T) | T) => void];
2838
+
2839
+ /** @public */
2840
+ export declare function useMenuClipboardEvents(): {
2841
+ copy: (source: TLUiEventSource) => void;
2842
+ cut: (source: TLUiEventSource) => void;
2843
+ paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
2844
+ };
2845
+
2846
+ /** @public */
2847
+ export declare function useMenuIsOpen(id: string, cb?: (isOpen: boolean) => void): readonly [boolean, (isOpen: boolean) => void];
2848
+
2849
+ /** @public */
2850
+ export declare function useMenuSchema(): TLUiMenuSchema;
2851
+
2852
+ /** @public */
2853
+ export declare function useNativeClipboardEvents(): void;
2854
+
2855
+ /** @public */
2856
+ export declare function useReadonly(): boolean;
2857
+
2858
+ /** @public */
2859
+ export declare function useToasts(): TLUiToastsContextType;
2860
+
2861
+ /** @public */
2862
+ export declare function useToolbarSchema(): TLUiToolbarSchemaContextType;
2863
+
2864
+ /** @public */
2865
+ export declare function useTools(): TLUiToolsContextType;
2866
+
2867
+ /**
2868
+ * Returns a function to translate a translation key into a string based on the current translation.
2869
+ *
2870
+ * @example
2871
+ *
2872
+ * ```ts
2873
+ * const msg = useTranslation()
2874
+ * const label = msg('style-panel.styles')
2875
+ * ```
2876
+ *
2877
+ * @public
2878
+ */
2879
+ export declare function useTranslation(): (id: Exclude<string, TLUiTranslationKey> | string) => string;
2880
+
2881
+ /** @public */
2882
+ export declare function useUiEvents(): TLUiEventContextType;
2883
+
2884
+ declare interface VideoShape extends TDBaseShape {
2885
+ type: TDShapeType.Video;
2886
+ size: number[];
2887
+ assetId: string;
2888
+ isPlaying: boolean;
2889
+ currentTime: number;
2890
+ }
2891
+
2892
+ /** @public */
2893
+ export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
2894
+ static type: "video";
2895
+ static props: {
2896
+ w: Validator<number>;
2897
+ h: Validator<number>;
2898
+ time: Validator<number>;
2899
+ playing: Validator<boolean>;
2900
+ url: Validator<string>;
2901
+ assetId: Validator<TLAssetId | null>;
2902
+ };
2903
+ static migrations: Migrations;
2904
+ canEdit: () => boolean;
2905
+ isAspectRatioLocked: () => boolean;
2906
+ getDefaultProps(): TLVideoShape['props'];
2907
+ component(shape: TLVideoShape): JSX.Element;
2908
+ indicator(shape: TLVideoShape): JSX.Element;
2909
+ toSvg(shape: TLVideoShape): SVGGElement;
2910
+ }
2911
+
2912
+ declare type WithDefaultHelpers<T extends TLUiOverride<any, any>> = T extends TLUiOverride<infer Type, infer Helpers> ? TLUiOverride<Type, Helpers extends undefined ? DefaultHelpers : Helpers & DefaultHelpers> : never;
2913
+
2914
+ declare class ZoomBrushing extends StateNode {
2915
+ static id: string;
2916
+ info: TLPointerEventInfo & {
2917
+ onInteractionEnd?: string | undefined;
2918
+ };
2919
+ zoomBrush: Box2d;
2920
+ onEnter: (info: TLPointerEventInfo & {
2921
+ onInteractionEnd: string;
2922
+ }) => void;
2923
+ onExit: () => void;
2924
+ onPointerMove: () => void;
2925
+ onPointerUp: TLEventHandlers['onPointerUp'];
2926
+ onCancel: TLEventHandlers['onCancel'];
2927
+ private update;
2928
+ private cancel;
2929
+ private complete;
2930
+ }
2931
+
2932
+ /** @public */
2933
+ export declare class ZoomTool extends StateNode {
2934
+ static id: string;
2935
+ static initial: string;
2936
+ static children: () => (typeof Idle_12 | typeof Pointing_8 | typeof ZoomBrushing)[];
2937
+ info: TLPointerEventInfo & {
2938
+ onInteractionEnd?: string | undefined;
2939
+ };
2940
+ onEnter: (info: TLPointerEventInfo & {
2941
+ onInteractionEnd: string;
2942
+ }) => void;
2943
+ onExit: () => void;
2944
+ onKeyDown: TLKeyboardEvent | undefined;
2945
+ onKeyUp: TLKeyboardEvent;
2946
+ onInterrupt: TLInterruptEvent;
2947
+ private complete;
2948
+ private updateCursor;
2949
+ }
2950
+
2951
+
2952
+ export * from "@bigbluebutton/editor";
2953
+
2954
+ export { }