tldraw 3.16.0-internal.51e99e128bd4 → 3.16.0-internal.a478398270c6

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 (517) hide show
  1. package/dist-cjs/index.d.ts +23 -297
  2. package/dist-cjs/index.js +2 -30
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/TldrawImage.js +2 -5
  5. package/dist-cjs/lib/TldrawImage.js.map +3 -3
  6. package/dist-cjs/lib/canvas/TldrawCropHandles.js +1 -1
  7. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
  8. package/dist-cjs/lib/canvas/TldrawHandles.js +1 -1
  9. package/dist-cjs/lib/canvas/TldrawHandles.js.map +2 -2
  10. package/dist-cjs/lib/canvas/TldrawOverlays.js +1 -1
  11. package/dist-cjs/lib/canvas/TldrawOverlays.js.map +2 -2
  12. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  13. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  14. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +271 -279
  15. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
  16. package/dist-cjs/lib/defaultExternalContentHandlers.js +0 -1
  17. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  18. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +44 -27
  19. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  20. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +4 -16
  21. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
  22. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  23. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  24. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  25. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  26. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +0 -3
  27. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  28. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +6 -3
  29. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  30. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  31. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  32. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +17 -17
  33. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  34. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  35. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  36. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +2 -2
  37. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  38. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +1 -2
  39. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  40. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +4 -5
  41. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  42. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +3 -3
  43. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +1 -1
  44. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +5 -20
  45. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +5 -6
  47. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  48. package/dist-cjs/lib/shapes/shared/PathBuilder.js +3 -21
  49. package/dist-cjs/lib/shapes/shared/PathBuilder.js.map +2 -2
  50. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +0 -1
  51. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
  52. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +2 -5
  53. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
  54. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  55. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  56. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js +3 -4
  57. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js.map +2 -2
  58. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  59. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +1 -10
  60. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  61. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +13 -7
  62. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  63. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  64. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  65. package/dist-cjs/lib/styles.js.map +2 -2
  66. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +1 -25
  67. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  68. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +0 -12
  69. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  70. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +1 -7
  71. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
  72. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +22 -43
  73. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  74. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +15 -2
  75. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  76. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +0 -5
  77. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  78. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +0 -8
  79. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  80. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +0 -8
  81. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  82. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +0 -8
  83. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  84. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  85. package/dist-cjs/lib/ui/TldrawUi.js +0 -14
  86. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  87. package/dist-cjs/lib/ui/components/A11y.js +12 -14
  88. package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
  89. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +3 -12
  90. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  91. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +2 -3
  92. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  93. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +1 -51
  94. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
  95. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +2 -3
  96. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  97. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  98. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  99. package/dist-cjs/lib/ui/components/MobileStylePanel.js +3 -5
  100. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  101. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +5 -4
  102. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  103. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +1 -2
  104. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  105. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +2 -3
  106. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  107. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  108. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  109. package/dist-cjs/lib/ui/components/Spinner.js +25 -2
  110. package/dist-cjs/lib/ui/components/Spinner.js.map +2 -2
  111. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +0 -2
  112. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  113. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +139 -171
  114. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  115. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +3 -3
  116. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +2 -2
  117. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +25 -26
  118. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +3 -3
  119. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +7 -21
  120. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +3 -3
  121. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +1 -1
  122. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  123. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +21 -66
  124. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  125. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +80 -189
  126. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  127. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +4 -5
  128. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  129. package/dist-cjs/lib/ui/components/menu-items.js +0 -22
  130. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  131. package/dist-cjs/lib/ui/components/primitives/Button/TldrawUiButtonIcon.js.map +2 -2
  132. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +16 -7
  133. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +3 -3
  134. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
  135. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  136. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js +1 -1
  137. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js.map +2 -2
  138. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js +1 -35
  139. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js.map +2 -2
  140. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +2 -3
  141. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  142. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +2 -6
  143. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  144. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +7 -31
  145. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  146. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
  147. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  148. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +12 -25
  149. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  150. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +22 -154
  151. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  152. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +2 -3
  153. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  154. package/dist-cjs/lib/ui/context/actions.js +8 -57
  155. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  156. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  157. package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
  158. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
  159. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  160. package/dist-cjs/lib/ui/hooks/useTools.js +9 -94
  161. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  162. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  163. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +0 -11
  164. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  165. package/dist-cjs/lib/ui/kbd-utils.js +1 -2
  166. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  167. package/dist-cjs/lib/ui/version.js +3 -3
  168. package/dist-cjs/lib/ui/version.js.map +1 -1
  169. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +1 -1
  170. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  171. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +2 -3
  172. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  173. package/dist-esm/index.d.mts +23 -297
  174. package/dist-esm/index.mjs +4 -51
  175. package/dist-esm/index.mjs.map +2 -2
  176. package/dist-esm/lib/TldrawImage.mjs +2 -5
  177. package/dist-esm/lib/TldrawImage.mjs.map +2 -2
  178. package/dist-esm/lib/canvas/TldrawCropHandles.mjs +1 -1
  179. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
  180. package/dist-esm/lib/canvas/TldrawHandles.mjs +1 -1
  181. package/dist-esm/lib/canvas/TldrawHandles.mjs.map +2 -2
  182. package/dist-esm/lib/canvas/TldrawOverlays.mjs +1 -1
  183. package/dist-esm/lib/canvas/TldrawOverlays.mjs.map +2 -2
  184. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  185. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  186. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +271 -279
  187. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
  188. package/dist-esm/lib/defaultExternalContentHandlers.mjs +0 -1
  189. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  190. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +44 -30
  191. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  192. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +5 -19
  193. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
  194. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  195. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  196. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  197. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  198. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +0 -3
  199. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  200. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +6 -4
  201. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  202. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  203. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  204. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +17 -18
  205. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  206. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  207. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  208. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +2 -3
  209. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  210. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +1 -2
  211. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  212. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +4 -6
  213. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  214. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +3 -3
  215. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +1 -1
  216. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +5 -21
  217. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  218. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -7
  219. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  220. package/dist-esm/lib/shapes/shared/PathBuilder.mjs +3 -22
  221. package/dist-esm/lib/shapes/shared/PathBuilder.mjs.map +2 -2
  222. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +0 -1
  223. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  224. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +2 -5
  225. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  226. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +4 -5
  227. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  228. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs +3 -4
  229. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs.map +2 -2
  230. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  231. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +1 -10
  232. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  233. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +13 -8
  234. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  235. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  236. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  237. package/dist-esm/lib/styles.mjs.map +2 -2
  238. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +1 -26
  239. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  240. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +0 -13
  241. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  242. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +1 -7
  243. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
  244. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +22 -43
  245. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  246. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +15 -2
  247. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  248. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +0 -5
  249. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  250. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +0 -8
  251. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  252. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +0 -8
  253. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  254. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +0 -8
  255. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  256. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  257. package/dist-esm/lib/ui/TldrawUi.mjs +2 -16
  258. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  259. package/dist-esm/lib/ui/components/A11y.mjs +12 -14
  260. package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
  261. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +3 -12
  262. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  263. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +2 -3
  264. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  265. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +1 -51
  266. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
  267. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -3
  268. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  269. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  270. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  271. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +3 -6
  272. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  273. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +5 -4
  274. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  275. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +1 -2
  276. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  277. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +2 -3
  278. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  279. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  280. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  281. package/dist-esm/lib/ui/components/Spinner.mjs +26 -3
  282. package/dist-esm/lib/ui/components/Spinner.mjs.map +2 -2
  283. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +1 -3
  284. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  285. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +139 -171
  286. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  287. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +3 -3
  288. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +2 -2
  289. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +25 -26
  290. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +2 -2
  291. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +9 -23
  292. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +3 -3
  293. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +1 -1
  294. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  295. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +21 -56
  296. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  297. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +81 -192
  298. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  299. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +4 -5
  300. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  301. package/dist-esm/lib/ui/components/menu-items.mjs +0 -22
  302. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  303. package/dist-esm/lib/ui/components/primitives/Button/TldrawUiButtonIcon.mjs.map +2 -2
  304. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +6 -8
  305. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +2 -2
  306. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +1 -1
  307. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  308. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs +1 -1
  309. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs.map +2 -2
  310. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs +2 -36
  311. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs.map +2 -2
  312. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +2 -3
  313. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  314. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +2 -6
  315. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  316. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +7 -31
  317. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  318. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
  319. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  320. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +12 -25
  321. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  322. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +24 -162
  323. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  324. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +2 -3
  325. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  326. package/dist-esm/lib/ui/context/actions.mjs +8 -57
  327. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  328. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  329. package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
  330. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
  331. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  332. package/dist-esm/lib/ui/hooks/useTools.mjs +10 -102
  333. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  334. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +0 -11
  335. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  336. package/dist-esm/lib/ui/kbd-utils.mjs +1 -2
  337. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  338. package/dist-esm/lib/ui/version.mjs +3 -3
  339. package/dist-esm/lib/ui/version.mjs.map +1 -1
  340. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +1 -1
  341. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  342. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +2 -3
  343. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  344. package/package.json +34 -12
  345. package/src/index.ts +2 -39
  346. package/src/lib/TldrawImage.tsx +2 -6
  347. package/src/lib/canvas/TldrawCropHandles.tsx +1 -3
  348. package/src/lib/canvas/TldrawHandles.tsx +1 -5
  349. package/src/lib/canvas/TldrawOverlays.tsx +1 -1
  350. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  351. package/src/lib/canvas/TldrawSelectionForeground.tsx +1 -5
  352. package/src/lib/defaultExternalContentHandlers.ts +1 -2
  353. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +1 -2
  354. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +3 -4
  355. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +11 -12
  356. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +46 -30
  357. package/src/lib/shapes/arrow/arrowLabel.ts +3 -23
  358. package/src/lib/shapes/arrow/arrowTargetState.ts +1 -2
  359. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  360. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +0 -3
  361. package/src/lib/shapes/draw/DrawShapeTool.test.ts +5 -0
  362. package/src/lib/shapes/draw/DrawShapeUtil.tsx +7 -4
  363. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  364. package/src/lib/shapes/frame/FrameShapeUtil.tsx +21 -26
  365. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  366. package/src/lib/shapes/geo/GeoShapeUtil.tsx +2 -3
  367. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  368. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +4 -7
  369. package/src/lib/shapes/image/ImageShapeUtil.tsx +3 -3
  370. package/src/lib/shapes/line/LineShapeUtil.test.tsx +3 -4
  371. package/src/lib/shapes/line/LineShapeUtil.tsx +6 -25
  372. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
  373. package/src/lib/shapes/note/NoteShapeUtil.tsx +4 -10
  374. package/src/lib/shapes/shared/PathBuilder.test.tsx +1 -1
  375. package/src/lib/shapes/shared/PathBuilder.tsx +1 -35
  376. package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -1
  377. package/src/lib/shapes/shared/RichTextLabel.tsx +0 -4
  378. package/src/lib/shapes/shared/ShapeFill.tsx +4 -5
  379. package/src/lib/shapes/shared/SvgTextLabel.tsx +2 -4
  380. package/src/lib/shapes/shared/freehand/svg.ts +0 -2
  381. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +1 -11
  382. package/src/lib/shapes/text/TextShapeTool.test.ts +5 -6
  383. package/src/lib/shapes/text/TextShapeUtil.tsx +14 -8
  384. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  385. package/src/lib/styles.tsx +1 -3
  386. package/src/lib/tools/EraserTool/childStates/Erasing.ts +1 -34
  387. package/src/lib/tools/EraserTool/childStates/Pointing.ts +0 -20
  388. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +1 -8
  389. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +30 -54
  390. package/src/lib/tools/SelectTool/childStates/Idle.ts +24 -2
  391. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +0 -7
  392. package/src/lib/tools/SelectTool/childStates/Resizing.ts +1 -12
  393. package/src/lib/tools/SelectTool/childStates/Rotating.ts +0 -11
  394. package/src/lib/tools/SelectTool/childStates/Translating.ts +1 -11
  395. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +0 -1
  396. package/src/lib/ui/TldrawUi.tsx +2 -17
  397. package/src/lib/ui/components/A11y.tsx +13 -15
  398. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +3 -15
  399. package/src/lib/ui/components/DefaultMenuPanel.tsx +3 -4
  400. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +0 -40
  401. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +2 -4
  402. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  403. package/src/lib/ui/components/MobileStylePanel.tsx +6 -9
  404. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +5 -4
  405. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +2 -3
  406. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +3 -4
  407. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  408. package/src/lib/ui/components/Spinner.tsx +24 -2
  409. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +1 -3
  410. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +106 -146
  411. package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +3 -3
  412. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +6 -7
  413. package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +9 -25
  414. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +1 -1
  415. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +23 -55
  416. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +61 -212
  417. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +12 -17
  418. package/src/lib/ui/components/menu-items.tsx +0 -25
  419. package/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx +2 -2
  420. package/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx +35 -40
  421. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +1 -1
  422. package/src/lib/ui/components/primitives/TldrawUiDialog.tsx +1 -1
  423. package/src/lib/ui/components/primitives/TldrawUiIcon.tsx +3 -41
  424. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +2 -4
  425. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +1 -6
  426. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +12 -56
  427. package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +2 -2
  428. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +1 -0
  429. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +16 -29
  430. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +23 -224
  431. package/src/lib/ui/context/TldrawUiContextProvider.tsx +20 -23
  432. package/src/lib/ui/context/actions.tsx +9 -59
  433. package/src/lib/ui/context/events.tsx +2 -6
  434. package/src/lib/ui/hooks/menu-hooks.ts +0 -1
  435. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +2 -3
  436. package/src/lib/ui/hooks/useTools.tsx +11 -142
  437. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +0 -11
  438. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +0 -11
  439. package/src/lib/ui/kbd-utils.ts +1 -2
  440. package/src/lib/ui/version.ts +3 -3
  441. package/src/lib/ui.css +314 -414
  442. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +7 -21
  443. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +1 -1
  444. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +7 -28
  445. package/src/lib/utils/tldr/buildFromV1Document.ts +1 -2
  446. package/src/test/A11y.test.tsx +2 -3
  447. package/src/test/ClickManager.test.ts +6 -7
  448. package/src/test/Editor.test.tsx +20 -21
  449. package/src/test/EraserTool.test.ts +13 -184
  450. package/src/test/HandTool.test.ts +9 -10
  451. package/src/test/HighlightShape.test.ts +1 -2
  452. package/src/test/SelectTool.test.ts +13 -40
  453. package/src/test/TLUserPreferences.test.ts +3 -4
  454. package/src/test/TestEditor.ts +15 -13
  455. package/src/test/TldrawEditor.test.tsx +10 -11
  456. package/src/test/ZoomTool.test.ts +6 -7
  457. package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
  458. package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
  459. package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
  460. package/src/test/arrows-megabus.test.tsx +10 -17
  461. package/src/test/bindings.test.tsx +37 -24
  462. package/src/test/bookmark-shapes.test.ts +8 -1
  463. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +7 -23
  464. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
  465. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
  466. package/src/test/commands/alignShapes.test.tsx +24 -25
  467. package/src/test/commands/animationSpeed.test.ts +1 -2
  468. package/src/test/commands/centerOnPoint.test.ts +2 -3
  469. package/src/test/commands/clipboard.test.ts +2 -3
  470. package/src/test/commands/createShapes.test.ts +1 -2
  471. package/src/test/commands/deletePage.test.ts +1 -84
  472. package/src/test/commands/deleteShapes.test.ts +1 -2
  473. package/src/test/commands/distributeShapes.test.tsx +10 -11
  474. package/src/test/commands/getSvgString.test.ts +1 -2
  475. package/src/test/commands/packShapes.test.ts +4 -5
  476. package/src/test/commands/resizeShape.test.ts +1 -2
  477. package/src/test/commands/rotateShapes.test.ts +6 -7
  478. package/src/test/commands/setCamera.test.ts +3 -4
  479. package/src/test/commands/setCurrentPage.test.ts +2 -3
  480. package/src/test/commands/stackShapes.test.ts +10 -11
  481. package/src/test/commands/stretch.test.tsx +12 -13
  482. package/src/test/createDeepLink.test.tsx +1 -2
  483. package/src/test/cropping.test.ts +2 -3
  484. package/src/test/drawing.test.ts +1 -2
  485. package/src/test/flipShapes.test.ts +3 -4
  486. package/src/test/frames.test.ts +24 -25
  487. package/src/test/getCulledShapes.test.tsx +2 -3
  488. package/src/test/groups.test.tsx +2 -2
  489. package/src/test/handleDeepLink.test.tsx +1 -2
  490. package/src/test/maxShapes.test.ts +2 -3
  491. package/src/test/modifiers.test.ts +4 -5
  492. package/src/test/navigation.test.ts +9 -264
  493. package/src/test/panning.test.ts +1 -2
  494. package/src/test/perf/perf.test.ts +1 -2
  495. package/src/test/registerDeepLinkListener.test.tsx +9 -10
  496. package/src/test/resizing.test.ts +38 -39
  497. package/src/test/select.test.tsx +3 -4
  498. package/src/test/selection-omnibus.test.ts +10 -11
  499. package/src/test/shapeutils.test.ts +48 -398
  500. package/src/test/translating.test.ts +9 -10
  501. package/tldraw.css +627 -726
  502. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +0 -35
  503. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +0 -7
  504. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +0 -268
  505. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +0 -7
  506. package/dist-cjs/lib/ui/components/primitives/layout.js +0 -76
  507. package/dist-cjs/lib/ui/components/primitives/layout.js.map +0 -7
  508. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +0 -19
  509. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +0 -7
  510. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +0 -245
  511. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +0 -7
  512. package/dist-esm/lib/ui/components/primitives/layout.mjs +0 -46
  513. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +0 -7
  514. package/src/lib/ui/components/AccessibilityMenu.tsx +0 -20
  515. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +0 -327
  516. package/src/lib/ui/components/primitives/layout.tsx +0 -107
  517. package/src/test/inner-outer-margin.test.ts +0 -315
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/hooks/useKeyboardShortcuts.ts"],
4
- "sourcesContent": ["import {\n\tEditor,\n\tTLPointerEventInfo,\n\tisAccelKey,\n\tpreventDefault,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport hotkeys from 'hotkeys-js'\nimport { useEffect } from 'react'\nimport { useActions } from '../context/actions'\nimport { useReadonly } from './useReadonly'\nimport { useTools } from './useTools'\n\nconst SKIP_KBDS = [\n\t// we set these in useNativeClipboardEvents instead\n\t'copy',\n\t'cut',\n\t'paste',\n\t// There's also an upload asset action, so we don't want to set the kbd twice\n\t'asset',\n]\n\n/** @public */\nexport function useKeyboardShortcuts() {\n\tconst editor = useEditor()\n\n\tconst isReadonlyMode = useReadonly()\n\tconst actions = useActions()\n\tconst tools = useTools()\n\tconst isFocused = useValue('is focused', () => editor.getInstanceState().isFocused, [editor])\n\tuseEffect(() => {\n\t\tif (!isFocused) return\n\n\t\tconst disposables = new Array<() => void>()\n\t\tconst container = editor.getContainer()\n\n\t\tconst hot = (keys: string, callback: (event: KeyboardEvent) => void) => {\n\t\t\thotkeys(keys, { element: container.ownerDocument.body }, callback)\n\t\t\tdisposables.push(() => {\n\t\t\t\thotkeys.unbind(keys, callback)\n\t\t\t})\n\t\t}\n\n\t\tconst hotUp = (keys: string, callback: (event: KeyboardEvent) => void) => {\n\t\t\thotkeys(\n\t\t\t\tkeys,\n\t\t\t\t{ element: container.ownerDocument.body, keyup: true, keydown: false },\n\t\t\t\tcallback\n\t\t\t)\n\t\t\tdisposables.push(() => {\n\t\t\t\thotkeys.unbind(keys, callback)\n\t\t\t})\n\t\t}\n\n\t\t// Add hotkeys for actions and tools.\n\t\t// Except those that in SKIP_KBDS!\n\t\tfor (const action of Object.values(actions)) {\n\t\t\tif (!action.kbd) continue\n\t\t\tif (isReadonlyMode && !action.readonlyOk) continue\n\t\t\tif (SKIP_KBDS.includes(action.id)) continue\n\n\t\t\thot(getHotkeysStringFromKbd(action.kbd), (event) => {\n\t\t\t\tif (areShortcutsDisabled(editor) && !action.isRequiredA11yAction) return\n\t\t\t\tpreventDefault(event)\n\t\t\t\taction.onSelect('kbd')\n\t\t\t})\n\t\t}\n\n\t\tfor (const tool of Object.values(tools)) {\n\t\t\tif (!tool.kbd || (!tool.readonlyOk && editor.getIsReadonly())) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif (SKIP_KBDS.includes(tool.id)) continue\n\n\t\t\thot(getHotkeysStringFromKbd(tool.kbd), (event) => {\n\t\t\t\tif (areShortcutsDisabled(editor)) return\n\t\t\t\tpreventDefault(event)\n\t\t\t\ttool.onSelect('kbd')\n\t\t\t})\n\t\t}\n\n\t\thot(',', (e) => {\n\t\t\t// Skip if shortcuts are disabled\n\t\t\tif (areShortcutsDisabled(editor)) return\n\n\t\t\t// Don't press again if already pressed\n\t\t\tif (editor.inputs.keys.has('Comma')) return\n\n\t\t\tpreventDefault(e) // prevent whatever would normally happen\n\t\t\teditor.focus() // Focus if not already focused\n\n\t\t\teditor.inputs.keys.add('Comma')\n\n\t\t\tconst { x, y, z } = editor.inputs.currentPagePoint\n\t\t\tconst screenpoints = editor.pageToScreen({ x, y })\n\n\t\t\tconst info: TLPointerEventInfo = {\n\t\t\t\ttype: 'pointer',\n\t\t\t\tname: 'pointer_down',\n\t\t\t\tpoint: { x: screenpoints.x, y: screenpoints.y, z },\n\t\t\t\tshiftKey: e.shiftKey,\n\t\t\t\taltKey: e.altKey,\n\t\t\t\tctrlKey: e.metaKey || e.ctrlKey,\n\t\t\t\tmetaKey: e.metaKey,\n\t\t\t\taccelKey: isAccelKey(e),\n\t\t\t\tpointerId: 0,\n\t\t\t\tbutton: 0,\n\t\t\t\tisPen: editor.getInstanceState().isPenMode,\n\t\t\t\ttarget: 'canvas',\n\t\t\t}\n\n\t\t\teditor.dispatch(info)\n\t\t})\n\n\t\thotUp(',', (e) => {\n\t\t\tif (areShortcutsDisabled(editor)) return\n\t\t\tif (!editor.inputs.keys.has('Comma')) return\n\n\t\t\teditor.inputs.keys.delete('Comma')\n\n\t\t\tconst { x, y, z } = editor.inputs.currentScreenPoint\n\t\t\tconst info: TLPointerEventInfo = {\n\t\t\t\ttype: 'pointer',\n\t\t\t\tname: 'pointer_up',\n\t\t\t\tpoint: { x, y, z },\n\t\t\t\tshiftKey: e.shiftKey,\n\t\t\t\taltKey: e.altKey,\n\t\t\t\tctrlKey: e.metaKey || e.ctrlKey,\n\t\t\t\tmetaKey: e.metaKey,\n\t\t\t\taccelKey: isAccelKey(e),\n\t\t\t\tpointerId: 0,\n\t\t\t\tbutton: 0,\n\t\t\t\tisPen: editor.getInstanceState().isPenMode,\n\t\t\t\ttarget: 'canvas',\n\t\t\t}\n\n\t\t\teditor.dispatch(info)\n\t\t})\n\n\t\treturn () => {\n\t\t\tdisposables.forEach((d) => d())\n\t\t}\n\t}, [actions, tools, isReadonlyMode, editor, isFocused])\n}\n\nexport function areShortcutsDisabled(editor: Editor) {\n\treturn (\n\t\teditor.menus.hasAnyOpenMenus() ||\n\t\teditor.getEditingShapeId() !== null ||\n\t\teditor.getCrashingError() ||\n\t\t!editor.user.getAreKeyboardShortcutsEnabled()\n\t)\n}\n\n// The \"raw\" kbd here will look something like \"a\" or a combination of keys \"del,backspace\".\n// We need to first split them up by comma, then parse each key to ensure backwards compatibility\n// with the old kbd format. We used to have symbols to denote cmd/alt/shift,\n// using ! for shift, $ for cmd, and ? for alt.\nfunction getHotkeysStringFromKbd(kbd: string) {\n\treturn getKeys(kbd)\n\t\t.map((kbd) => {\n\t\t\tlet str = ''\n\n\t\t\tconst shift = kbd.includes('!')\n\t\t\tconst alt = kbd.includes('?')\n\t\t\tconst cmd = kbd.includes('$')\n\n\t\t\t// remove the modifiers; the remaining string are the actual key\n\t\t\tconst k = kbd.replace(/[!?$]/g, '')\n\n\t\t\tif (shift && alt && cmd) {\n\t\t\t\tstr = `cmd+shift+alt+${k},ctrl+shift+alt+${k}`\n\t\t\t} else if (shift && cmd) {\n\t\t\t\tstr = `cmd+shift+${k},ctrl+shift+${k}`\n\t\t\t} else if (alt && cmd) {\n\t\t\t\tstr = `cmd+alt+${k},ctrl+alt+${k}`\n\t\t\t} else if (alt && shift) {\n\t\t\t\tstr = `shift+alt+${k}`\n\t\t\t} else if (shift) {\n\t\t\t\tstr = `shift+${k}`\n\t\t\t} else if (alt) {\n\t\t\t\tstr = `alt+${k}`\n\t\t\t} else if (cmd) {\n\t\t\t\tstr = `cmd+${k},ctrl+${k}`\n\t\t\t} else {\n\t\t\t\tstr = k\n\t\t\t}\n\n\t\t\treturn str\n\t\t})\n\t\t.join(',')\n}\n\n// Logic to split kbd string from hotkeys-js util.\nfunction getKeys(key: string) {\n\tif (typeof key !== 'string') key = ''\n\tkey = key.replace(/\\s/g, '')\n\tconst keys = key.split(',')\n\tlet index = keys.lastIndexOf('')\n\n\tfor (; index >= 0; ) {\n\t\tk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,CAAC;AAAA,IACrC,WAAW,OAAO,KAAK;AACtB,YAAM,WAAW,CAAC,aAAa,CAAC;AAAA,IACjC,WAAW,OAAO,OAAO;AACxB,YAAM,aAAa,CAAC;AAAA,IACrB,WAAW,OAAO;AACjB,YAAM,SAAS,CAAC;AAAA,IACjB,WAAW,KAAK;AACf,YAAM,OAAO,CAAC;AAAA,IACf,WAAW,KAAK;AACf,YAAM,OAAO,CAAC,SAAS,CAAC;AAAA,IACzB,OAAO;AACN,YAAM;AAAA,IACP;AAEA,WAAO;AAAA,EACR,CAAC,EACA,KAAK,GAAG;AACX;AAGA,SAAS,QAAQ,KAAa;AAC7B,MAAI,OAAO,QAAQ,SAAU,OAAM;AACnC,QAAM,IAAI,QAAQ,OAAO,EAAE;AAC3B,QAAM,OAAO,IAAI,MAAM,GAAG;AAC1B,MAAI,QAAQ,KAAK,YAAY,EAAE;AAE/B,SAAO,SAAS,KAAK;AACpB,SAAK,QAAQ,CAAC,KAAK;AACnB,SAAK,OAAO,OAAO,CAAC;AACpB,YAAQ,KAAK,YAAY,EAAE;AAAA,EAC5B;AAEA,SAAO;AACR;",
4
+ "sourcesContent": ["import {\n\tEditor,\n\tTLPointerEventInfo,\n\tisAccelKey,\n\tpreventDefault,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport hotkeys from 'hotkeys-js'\nimport { useEffect } from 'react'\nimport { useActions } from '../context/actions'\nimport { useReadonly } from './useReadonly'\nimport { useTools } from './useTools'\n\nconst SKIP_KBDS = [\n\t// we set these in useNativeClipboardEvents instead\n\t'copy',\n\t'cut',\n\t'paste',\n\t// There's also an upload asset action, so we don't want to set the kbd twice\n\t'asset',\n]\n\n/** @public */\nexport function useKeyboardShortcuts() {\n\tconst editor = useEditor()\n\n\tconst isReadonlyMode = useReadonly()\n\tconst actions = useActions()\n\tconst tools = useTools()\n\tconst isFocused = useValue('is focused', () => editor.getInstanceState().isFocused, [editor])\n\tuseEffect(() => {\n\t\tif (!isFocused) return\n\n\t\tconst disposables = new Array<() => void>()\n\t\tconst container = editor.getContainer()\n\n\t\tconst hot = (keys: string, callback: (event: KeyboardEvent) => void) => {\n\t\t\thotkeys(keys, { element: container.ownerDocument.body }, callback)\n\t\t\tdisposables.push(() => {\n\t\t\t\thotkeys.unbind(keys, callback)\n\t\t\t})\n\t\t}\n\n\t\tconst hotUp = (keys: string, callback: (event: KeyboardEvent) => void) => {\n\t\t\thotkeys(\n\t\t\t\tkeys,\n\t\t\t\t{ element: container.ownerDocument.body, keyup: true, keydown: false },\n\t\t\t\tcallback\n\t\t\t)\n\t\t\tdisposables.push(() => {\n\t\t\t\thotkeys.unbind(keys, callback)\n\t\t\t})\n\t\t}\n\n\t\t// Add hotkeys for actions and tools.\n\t\t// Except those that in SKIP_KBDS!\n\t\tfor (const action of Object.values(actions)) {\n\t\t\tif (!action.kbd) continue\n\t\t\tif (isReadonlyMode && !action.readonlyOk) continue\n\t\t\tif (SKIP_KBDS.includes(action.id)) continue\n\n\t\t\thot(getHotkeysStringFromKbd(action.kbd), (event) => {\n\t\t\t\tif (areShortcutsDisabled(editor)) return\n\t\t\t\tpreventDefault(event)\n\t\t\t\taction.onSelect('kbd')\n\t\t\t})\n\t\t}\n\n\t\tfor (const tool of Object.values(tools)) {\n\t\t\tif (!tool.kbd || (!tool.readonlyOk && editor.getIsReadonly())) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif (SKIP_KBDS.includes(tool.id)) continue\n\n\t\t\thot(getHotkeysStringFromKbd(tool.kbd), (event) => {\n\t\t\t\tif (areShortcutsDisabled(editor)) return\n\t\t\t\tpreventDefault(event)\n\t\t\t\ttool.onSelect('kbd')\n\t\t\t})\n\t\t}\n\n\t\thot(',', (e) => {\n\t\t\t// Skip if shortcuts are disabled\n\t\t\tif (areShortcutsDisabled(editor)) return\n\n\t\t\t// Don't press again if already pressed\n\t\t\tif (editor.inputs.keys.has('Comma')) return\n\n\t\t\tpreventDefault(e) // prevent whatever would normally happen\n\t\t\teditor.focus() // Focus if not already focused\n\n\t\t\teditor.inputs.keys.add('Comma')\n\n\t\t\tconst { x, y, z } = editor.inputs.currentPagePoint\n\t\t\tconst screenpoints = editor.pageToScreen({ x, y })\n\n\t\t\tconst info: TLPointerEventInfo = {\n\t\t\t\ttype: 'pointer',\n\t\t\t\tname: 'pointer_down',\n\t\t\t\tpoint: { x: screenpoints.x, y: screenpoints.y, z },\n\t\t\t\tshiftKey: e.shiftKey,\n\t\t\t\taltKey: e.altKey,\n\t\t\t\tctrlKey: e.metaKey || e.ctrlKey,\n\t\t\t\tmetaKey: e.metaKey,\n\t\t\t\taccelKey: isAccelKey(e),\n\t\t\t\tpointerId: 0,\n\t\t\t\tbutton: 0,\n\t\t\t\tisPen: editor.getInstanceState().isPenMode,\n\t\t\t\ttarget: 'canvas',\n\t\t\t}\n\n\t\t\teditor.dispatch(info)\n\t\t})\n\n\t\thotUp(',', (e) => {\n\t\t\tif (areShortcutsDisabled(editor)) return\n\t\t\tif (!editor.inputs.keys.has('Comma')) return\n\n\t\t\teditor.inputs.keys.delete('Comma')\n\n\t\t\tconst { x, y, z } = editor.inputs.currentScreenPoint\n\t\t\tconst info: TLPointerEventInfo = {\n\t\t\t\ttype: 'pointer',\n\t\t\t\tname: 'pointer_up',\n\t\t\t\tpoint: { x, y, z },\n\t\t\t\tshiftKey: e.shiftKey,\n\t\t\t\taltKey: e.altKey,\n\t\t\t\tctrlKey: e.metaKey || e.ctrlKey,\n\t\t\t\tmetaKey: e.metaKey,\n\t\t\t\taccelKey: isAccelKey(e),\n\t\t\t\tpointerId: 0,\n\t\t\t\tbutton: 0,\n\t\t\t\tisPen: editor.getInstanceState().isPenMode,\n\t\t\t\ttarget: 'canvas',\n\t\t\t}\n\n\t\t\teditor.dispatch(info)\n\t\t})\n\n\t\treturn () => {\n\t\t\tdisposables.forEach((d) => d())\n\t\t}\n\t}, [actions, tools, isReadonlyMode, editor, isFocused])\n}\n\nexport function areShortcutsDisabled(editor: Editor) {\n\treturn (\n\t\teditor.menus.hasAnyOpenMenus() ||\n\t\teditor.getEditingShapeId() !== null ||\n\t\teditor.getCrashingError()\n\t)\n}\n\n// The \"raw\" kbd here will look something like \"a\" or a combination of keys \"del,backspace\".\n// We need to first split them up by comma, then parse each key to ensure backwards compatibility\n// with the old kbd format. We used to have symbols to denote cmd/alt/shift,\n// using ! for shift, $ for cmd, and ? for alt.\nfunction getHotkeysStringFromKbd(kbd: string) {\n\treturn getKeys(kbd)\n\t\t.map((kbd) => {\n\t\t\tlet str = ''\n\n\t\t\tconst shift = kbd.includes('!')\n\t\t\tconst alt = kbd.includes('?')\n\t\t\tconst cmd = kbd.includes('$')\n\n\t\t\t// remove the modifiers; the remaining string are the actual key\n\t\t\tconst k = kbd.replace(/[!?$]/g, '')\n\n\t\t\tif (shift && alt && cmd) {\n\t\t\t\tstr = `cmd+shift+alt+${k},ctrl+shift+alt+${k}`\n\t\t\t} else if (shift && cmd) {\n\t\t\t\tstr = `cmd+shift+${k},ctrl+shift+${k}`\n\t\t\t} else if (alt && cmd) {\n\t\t\t\tstr = `cmd+alt+${k},ctrl+alt+${k}`\n\t\t\t} else if (alt && shift) {\n\t\t\t\tstr = `shift+alt+${k}`\n\t\t\t} else if (shift) {\n\t\t\t\tstr = `shift+${k}`\n\t\t\t} else if (alt) {\n\t\t\t\tstr = `alt+${k}`\n\t\t\t} else if (cmd) {\n\t\t\t\tstr = `cmd+${k},ctrl+${k}`\n\t\t\t} else {\n\t\t\t\tstr = k\n\t\t\t}\n\n\t\t\treturn str\n\t\t})\n\t\t.join(',')\n}\n\n// Logic to split kbd string from hotkeys-js util.\nfunction getKeys(key: string) {\n\tif (typeof key !== 'string') key = ''\n\tkey = key.replace(/\\s/g, '')\n\tconst keys = key.split(',')\n\tlet index = keys.lastIndexOf('')\n\n\tfor (; index >= 0; ) {\n\t\tkeys[index - 1] += ','\n\t\tkeys.splice(index, 1)\n\t\tindex = keys.lastIndexOf('')\n\t}\n\n\treturn keys\n}\n"],
5
+ "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OAAO;AACjB,YAAM,SAAS,CAAC;AAAA,IACjB,WAAW,KAAK;AACf,YAAM,OAAO,CAAC;AAAA,IACf,WAAW,KAAK;AACf,YAAM,OAAO,CAAC,SAAS,CAAC;AAAA,IACzB,OAAO;AACN,YAAM;AAAA,IACP;AAEA,WAAO;AAAA,EACR,CAAC,EACA,KAAK,GAAG;AACX;AAGA,SAAS,QAAQ,KAAa;AAC7B,MAAI,OAAO,QAAQ,SAAU,OAAM;AACnC,QAAM,IAAI,QAAQ,OAAO,EAAE;AAC3B,QAAM,OAAO,IAAI,MAAM,GAAG;AAC1B,MAAI,QAAQ,KAAK,YAAY,EAAE;AAE/B,SAAO,SAAS,KAAK;AACpB,SAAK,QAAQ,CAAC,KAAK;AACnB,SAAK,OAAO,OAAO,CAAC;AACpB,YAAQ,KAAK,YAAY,EAAE;AAAA,EAC5B;AAEA,SAAO;AACR;",
6
6
  "names": ["kbd"]
7
7
  }
@@ -1,12 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import {
3
- assertExists,
4
- createShapeId,
5
- GeoShapeGeoStyle,
6
- getIndicesBetween,
7
- toRichText,
8
- useMaybeEditor
9
- } from "@tldraw/editor";
2
+ import { GeoShapeGeoStyle, useMaybeEditor } from "@tldraw/editor";
10
3
  import * as React from "react";
11
4
  import { EmbedDialog } from "../components/EmbedDialog.mjs";
12
5
  import { useA11y } from "../context/a11y.mjs";
@@ -77,26 +70,20 @@ function ToolsProvider({ overrides, children }) {
77
70
  onToolSelect(source, this);
78
71
  }
79
72
  },
80
- ...[...GeoShapeGeoStyle.values].map((geo) => ({
81
- id: geo,
82
- label: `tool.${geo}`,
73
+ ...[...GeoShapeGeoStyle.values].map((id) => ({
74
+ id,
75
+ label: `tool.${id}`,
83
76
  meta: {
84
- geo
77
+ geo: id
85
78
  },
86
- kbd: geo === "rectangle" ? "r" : geo === "ellipse" ? "o" : void 0,
87
- icon: "geo-" + geo,
79
+ kbd: id === "rectangle" ? "r" : id === "ellipse" ? "o" : void 0,
80
+ icon: "geo-" + id,
88
81
  onSelect(source) {
89
82
  editor.run(() => {
90
- editor.setStyleForNextShapes(GeoShapeGeoStyle, geo);
83
+ editor.setStyleForNextShapes(GeoShapeGeoStyle, id);
91
84
  editor.setCurrentTool("geo");
92
- onToolSelect(source, this, `geo-${geo}`);
85
+ onToolSelect(source, this, `geo-${id}`);
93
86
  });
94
- },
95
- onDragStart(source, info) {
96
- onDragFromToolbarToCreateShape(editor, info, {
97
- createShape: (id) => editor.createShape({ id, type: "geo", props: { w: 200, h: 200, geo } })
98
- });
99
- trackEvent("drag-tool", { source, id: "geo" });
100
87
  }
101
88
  })),
102
89
  {
@@ -107,16 +94,6 @@ function ToolsProvider({ overrides, children }) {
107
94
  onSelect(source) {
108
95
  editor.setCurrentTool("arrow");
109
96
  onToolSelect(source, this);
110
- },
111
- onDragStart(source, info) {
112
- onDragFromToolbarToCreateShape(editor, info, {
113
- createShape: (id) => editor.createShape({
114
- id,
115
- type: "arrow",
116
- props: { start: { x: 0, y: 0 }, end: { x: 200, y: 0 } }
117
- })
118
- });
119
- trackEvent("drag-tool", { source, id: "arrow" });
120
97
  }
121
98
  },
122
99
  {
@@ -127,24 +104,6 @@ function ToolsProvider({ overrides, children }) {
127
104
  onSelect(source) {
128
105
  editor.setCurrentTool("line");
129
106
  onToolSelect(source, this);
130
- },
131
- onDragStart(source, info) {
132
- onDragFromToolbarToCreateShape(editor, info, {
133
- createShape: (id) => {
134
- const [start, end] = getIndicesBetween(null, null, 2);
135
- editor.createShape({
136
- id,
137
- type: "line",
138
- props: {
139
- points: {
140
- [start]: { id: start, index: start, x: 0, y: 200 },
141
- [end]: { id: end, index: end, x: 200, y: 0 }
142
- }
143
- }
144
- });
145
- }
146
- });
147
- trackEvent("drag-tool", { source, id: "line" });
148
107
  }
149
108
  },
150
109
  {
@@ -155,12 +114,6 @@ function ToolsProvider({ overrides, children }) {
155
114
  onSelect(source) {
156
115
  editor.setCurrentTool("frame");
157
116
  onToolSelect(source, this);
158
- },
159
- onDragStart(source, info) {
160
- onDragFromToolbarToCreateShape(editor, info, {
161
- createShape: (id) => editor.createShape({ id, type: "frame" })
162
- });
163
- trackEvent("drag-tool", { source, id: "frame" });
164
117
  }
165
118
  },
166
119
  {
@@ -171,16 +124,6 @@ function ToolsProvider({ overrides, children }) {
171
124
  onSelect(source) {
172
125
  editor.setCurrentTool("text");
173
126
  onToolSelect(source, this);
174
- },
175
- onDragStart(source, info) {
176
- onDragFromToolbarToCreateShape(editor, info, {
177
- createShape: (id) => editor.createShape({ id, type: "text", props: { richText: toRichText("Text") } }),
178
- onDragEnd: (id) => {
179
- editor.setEditingShape(id);
180
- editor.emit("select-all-text", { shapeId: id });
181
- }
182
- });
183
- trackEvent("drag-tool", { source, id: "text" });
184
127
  }
185
128
  },
186
129
  {
@@ -201,16 +144,6 @@ function ToolsProvider({ overrides, children }) {
201
144
  onSelect(source) {
202
145
  editor.setCurrentTool("note");
203
146
  onToolSelect(source, this);
204
- },
205
- onDragStart(source, info) {
206
- onDragFromToolbarToCreateShape(editor, info, {
207
- createShape: (id) => editor.createShape({ id, type: "note" }),
208
- onDragEnd: (id) => {
209
- editor.setEditingShape(id);
210
- editor.emit("select-all-text", { shapeId: id });
211
- }
212
- });
213
- trackEvent("drag-tool", { source, id: "note" });
214
147
  }
215
148
  },
216
149
  {
@@ -251,7 +184,7 @@ function ToolsProvider({ overrides, children }) {
251
184
  return overrides(editor, tools2, helpers);
252
185
  }
253
186
  return tools2;
254
- }, [overrides, editor, helpers, onToolSelect, trackEvent]);
187
+ }, [overrides, editor, helpers, onToolSelect]);
255
188
  return /* @__PURE__ */ jsx(ToolsContext.Provider, { value: tools, children });
256
189
  }
257
190
  function useTools() {
@@ -261,34 +194,9 @@ function useTools() {
261
194
  }
262
195
  return ctx;
263
196
  }
264
- function onDragFromToolbarToCreateShape(editor, info, opts) {
265
- const { x, y } = editor.inputs.currentPagePoint;
266
- const stoppingPoint = editor.markHistoryStoppingPoint("drag shape tool");
267
- editor.setCurrentTool("select.translating");
268
- const id = createShapeId();
269
- opts.createShape(id);
270
- const shape = assertExists(editor.getShape(id), "Shape not found");
271
- const { w, h } = editor.getShapePageBounds(id);
272
- editor.updateShape({ id, type: shape.type, x: x - w / 2, y: y - h / 2 });
273
- editor.select(id);
274
- editor.setCurrentTool("select.translating", {
275
- ...info,
276
- target: "shape",
277
- shape: editor.getShape(id),
278
- isCreating: true,
279
- creatingMarkId: stoppingPoint,
280
- onCreate() {
281
- editor.setCurrentTool("select.idle");
282
- editor.select(id);
283
- opts.onDragEnd?.(id);
284
- }
285
- });
286
- editor.getCurrentTool().setCurrentToolIdMask(shape.type);
287
- }
288
197
  export {
289
198
  ToolsContext,
290
199
  ToolsProvider,
291
- onDragFromToolbarToCreateShape,
292
200
  useTools
293
201
  };
294
202
  //# sourceMappingURL=useTools.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/hooks/useTools.tsx"],
4
- "sourcesContent": ["import {\n\tassertExists,\n\tcreateShapeId,\n\tEditor,\n\tGeoShapeGeoStyle,\n\tgetIndicesBetween,\n\tTLLineShape,\n\tTLPointerEventInfo,\n\tTLShapeId,\n\ttoRichText,\n\tuseMaybeEditor,\n} from '@tldraw/editor'\nimport * as React from 'react'\nimport { EmbedDialog } from '../components/EmbedDialog'\nimport { TLUiIconJsx } from '../components/primitives/TldrawUiIcon'\nimport { useA11y } from '../context/a11y'\nimport { TLUiEventSource, useUiEvents } from '../context/events'\nimport { TLUiIconType } from '../icon-types'\nimport { TLUiOverrideHelpers, useDefaultHelpers } from '../overrides'\nimport { TLUiTranslationKey } from './useTranslation/TLUiTranslationKey'\nimport { useTranslation } from './useTranslation/useTranslation'\n\n/** @public */\nexport interface TLUiToolItem<\n\tTranslationKey extends string = string,\n\tIconType extends string = string,\n> {\n\tid: string\n\tlabel: TranslationKey\n\tshortcutsLabel?: TranslationKey\n\ticon: IconType | TLUiIconJsx\n\tonSelect(source: TLUiEventSource): void\n\tonDragStart?(source: TLUiEventSource, info: TLPointerEventInfo): void\n\t/**\n\t * The keyboard shortcut for this tool. This is a string that can be a single key,\n\t * or a combination of keys.\n\t * For example, `cmd+z` or `cmd+shift+z` or `cmd+u,ctrl+u`, or just `v` or `a`.\n\t * We have backwards compatibility with the old system, where we used to use\n\t * symbols to denote cmd/alt/shift, using `!` for shift, `$` for cmd, and `?` for alt.\n\t */\n\tkbd?: string\n\treadonlyOk?: boolean\n\tmeta?: {\n\t\t[key: string]: any\n\t}\n}\n\n/** @public */\nexport type TLUiToolsContextType = Record<string, TLUiToolItem>\n\n/** @internal */\nexport const ToolsContext = React.createContext<null | TLUiToolsContextType>(null)\n\n/** @public */\nexport interface TLUiToolsProviderProps {\n\toverrides?(\n\t\teditor: Editor,\n\t\ttools: TLUiToolsContextType,\n\t\thelpers: Partial<TLUiOverrideHelpers>\n\t): TLUiToolsContextType\n\tchildren: React.ReactNode\n}\n\n/** @internal */\nexport function ToolsProvider({ overrides, children }: TLUiToolsProviderProps) {\n\tconst editor = useMaybeEditor()\n\tconst trackEvent = useUiEvents()\n\n\tconst a11y = useA11y()\n\tconst msg = useTranslation()\n\tconst helpers = useDefaultHelpers()\n\n\tconst onToolSelect = React.useCallback(\n\t\t(\n\t\t\tsource: TLUiEventSource,\n\t\t\ttool: TLUiToolItem<TLUiTranslationKey, TLUiIconType>,\n\t\t\tid?: string\n\t\t) => {\n\t\t\ta11y.announce({ msg: msg(tool.label) })\n\t\t\ttrackEvent('select-tool', { source, id: id ?? tool.id })\n\t\t},\n\t\t[a11y, msg, trackEvent]\n\t)\n\n\tconst tools = React.useMemo<TLUiToolsContextType>(() => {\n\t\tif (!editor) return {}\n\t\tconst toolsArray: TLUiToolItem<TLUiTranslationKey, TLUiIconType>[] = [\n\t\t\t{\n\t\t\t\tid: 'select',\n\t\t\t\tlabel: 'tool.select',\n\t\t\t\ticon: 'tool-pointer',\n\t\t\t\tkbd: 'v',\n\t\t\t\treadonlyOk: true,\n\t\t\t\tonSelect(source) {\n\t\t\t\t\tif (editor.isIn('select')) {\n\t\t\t\t\t\t// There's a quirk of select mode, where editing a shape is a sub-state of select.\n\t\t\t\t\t\t// Because the text tool can be locked/sticky, we need to make sure we exit the\n\t\t\t\t\t\t// text tool.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// psst, if you're changing this code, also change the code\n\t\t\t\t\t\t// in strange-tools.test.ts! Sadly it's duplicated there.\n\t\t\t\t\t\tconst currentNode = editor.root.getCurrent()!\n\t\t\t\t\t\tcurrentNode.exit({}, currentNode.id)\n\t\t\t\t\t\tcurrentNode.enter({}, currentNode.id)\n\t\t\t\t\t}\n\t\t\t\t\teditor.setCurrentTool('select')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'hand',\n\t\t\t\tlabel: 'tool.hand',\n\t\t\t\ticon: 'tool-hand',\n\t\t\t\tkbd: 'h',\n\t\t\t\treadonlyOk: true,\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('hand')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'eraser',\n\t\t\t\tlabel: 'tool.eraser',\n\t\t\t\ticon: 'tool-eraser',\n\t\t\t\tkbd: 'e',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('eraser')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'draw',\n\t\t\t\tlabel: 'tool.draw',\n\t\t\t\ticon: 'tool-pencil',\n\t\t\t\tkbd: 'd,b,x',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('draw')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t...[...GeoShapeGeoStyle.values].map((geo) => ({\n\t\t\t\tid: geo,\n\t\t\t\tlabel: `tool.${geo}` as TLUiTranslationKey,\n\t\t\t\tmeta: {\n\t\t\t\t\tgeo,\n\t\t\t\t},\n\t\t\t\tkbd: geo === 'rectangle' ? 'r' : geo === 'ellipse' ? 'o' : undefined,\n\t\t\t\ticon: ('geo-' + geo) as TLUiIconType,\n\t\t\t\tonSelect(source: TLUiEventSource) {\n\t\t\t\t\teditor.run(() => {\n\t\t\t\t\t\teditor.setStyleForNextShapes(GeoShapeGeoStyle, geo)\n\t\t\t\t\t\teditor.setCurrentTool('geo')\n\t\t\t\t\t\tonToolSelect(source, this, `geo-${geo}`)\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tonDragStart(source: TLUiEventSource, info: TLPointerEventInfo) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) =>\n\t\t\t\t\t\t\teditor.createShape({ id, type: 'geo', props: { w: 200, h: 200, geo } }),\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'geo' })\n\t\t\t\t},\n\t\t\t})),\n\t\t\t{\n\t\t\t\tid: 'arrow',\n\t\t\t\tlabel: 'tool.arrow',\n\t\t\t\ticon: 'tool-arrow',\n\t\t\t\tkbd: 'a',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('arrow')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t\tonDragStart(source: TLUiEventSource, info: TLPointerEventInfo) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) =>\n\t\t\t\t\t\t\teditor.createShape({\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\t\t\t\tprops: { start: { x: 0, y: 0 }, end: { x: 200, y: 0 } },\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'arrow' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'line',\n\t\t\t\tlabel: 'tool.line',\n\t\t\t\ticon: 'tool-line',\n\t\t\t\tkbd: 'l',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('line')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t\tonDragStart(source, info) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) => {\n\t\t\t\t\t\t\tconst [start, end] = getIndicesBetween(null, null, 2)\n\t\t\t\t\t\t\teditor.createShape<TLLineShape>({\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\ttype: 'line',\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tpoints: {\n\t\t\t\t\t\t\t\t\t\t[start]: { id: start, index: start, x: 0, y: 200 },\n\t\t\t\t\t\t\t\t\t\t[end]: { id: end, index: end, x: 200, y: 0 },\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'line' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'frame',\n\t\t\t\tlabel: 'tool.frame',\n\t\t\t\ticon: 'tool-frame',\n\t\t\t\tkbd: 'f',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('frame')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t\tonDragStart(source, info) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) => editor.createShape({ id, type: 'frame' }),\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'frame' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'text',\n\t\t\t\tlabel: 'tool.text',\n\t\t\t\ticon: 'tool-text',\n\t\t\t\tkbd: 't',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('text')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t\tonDragStart(source, info) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) =>\n\t\t\t\t\t\t\teditor.createShape({ id, type: 'text', props: { richText: toRichText('Text') } }),\n\t\t\t\t\t\tonDragEnd: (id) => {\n\t\t\t\t\t\t\teditor.setEditingShape(id)\n\t\t\t\t\t\t\teditor.emit('select-all-text', { shapeId: id })\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'text' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'asset',\n\t\t\t\tlabel: 'tool.media',\n\t\t\t\ticon: 'tool-media',\n\t\t\t\tkbd: 'cmd+u,ctrl+u',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\thelpers.insertMedia()\n\t\t\t\t\tonToolSelect(source, this, 'media')\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'note',\n\t\t\t\tlabel: 'tool.note',\n\t\t\t\ticon: 'tool-note',\n\t\t\t\tkbd: 'n',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('note')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t\tonDragStart(source, info) {\n\t\t\t\t\tonDragFromToolbarToCreateShape(editor, info, {\n\t\t\t\t\t\tcreateShape: (id) => editor.createShape({ id, type: 'note' }),\n\t\t\t\t\t\tonDragEnd: (id) => {\n\t\t\t\t\t\t\teditor.setEditingShape(id)\n\t\t\t\t\t\t\teditor.emit('select-all-text', { shapeId: id })\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\ttrackEvent('drag-tool', { source, id: 'note' })\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'laser',\n\t\t\t\tlabel: 'tool.laser',\n\t\t\t\treadonlyOk: true,\n\t\t\t\ticon: 'tool-laser',\n\t\t\t\tkbd: 'k',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('laser')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'embed',\n\t\t\t\tlabel: 'tool.embed',\n\t\t\t\ticon: 'dot',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\thelpers.addDialog({ component: EmbedDialog })\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'highlight',\n\t\t\t\tlabel: 'tool.highlight',\n\t\t\t\ticon: 'tool-highlight',\n\t\t\t\t// TODO: pick a better shortcut\n\t\t\t\tkbd: 'shift+d',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('highlight')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t]\n\n\t\ttoolsArray.forEach((t) => (t.onSelect = t.onSelect.bind(t)))\n\n\t\tconst tools = Object.fromEntries(toolsArray.map((t) => [t.id, t]))\n\n\t\tif (overrides) {\n\t\t\treturn overrides(editor, tools, helpers)\n\t\t}\n\n\t\treturn tools\n\t}, [overrides, editor, helpers, onToolSelect, trackEvent])\n\n\treturn <ToolsContext.Provider value={tools}>{children}</ToolsContext.Provider>\n}\n\n/** @public */\nexport function useTools() {\n\tconst ctx = React.useContext(ToolsContext)\n\n\tif (!ctx) {\n\t\tthrow new Error('useTools must be used within a ToolProvider')\n\t}\n\n\treturn ctx\n}\n\n/**\n * Options for {@link onDragFromToolbarToCreateShape}.\n * @public\n */\nexport interface OnDragFromToolbarToCreateShapesOpts {\n\t/**\n\t * Create the shape being dragged. You don't need to worry about positioning it, as it'll be\n\t * immediately updated with the correct position.\n\t */\n\tcreateShape(id: TLShapeId): void\n\t/**\n\t * Called once the drag interaction has finished.\n\t */\n\tonDragEnd?(id: TLShapeId): void\n}\n\n/**\n * A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from\n * the toolbar.\n * @public\n */\nexport function onDragFromToolbarToCreateShape(\n\teditor: Editor,\n\tinfo: TLPointerEventInfo,\n\topts: OnDragFromToolbarToCreateShapesOpts\n) {\n\tconst { x, y } = editor.inputs.currentPagePoint\n\n\tconst stoppingPoint = editor.markHistoryStoppingPoint('drag shape tool')\n\teditor.setCurrentTool('select.translating')\n\n\tconst id = createShapeId()\n\topts.createShape(id)\n\tconst shape = assertExists(editor.getShape(id), 'Shape not found')\n\n\tconst { w, h } = editor.getShapePageBounds(id)!\n\teditor.updateShape({ id, type: shape.type, x: x - w / 2, y: y - h / 2 })\n\teditor.select(id)\n\n\teditor.setCurrentTool('select.translating', {\n\t\t...info,\n\t\ttarget: 'shape',\n\t\tshape: editor.getShape(id),\n\t\tisCreating: true,\n\t\tcreatingMarkId: stoppingPoint,\n\t\tonCreate() {\n\t\t\teditor.setCurrentTool('select.idle')\n\t\t\teditor.select(id)\n\t\t\topts.onDragEnd?.(id)\n\t\t},\n\t})\n\n\teditor.getCurrentTool().setCurrentToolIdMask(shape.type)\n}\n"],
5
- "mappings": "AAmUQ;AAnUR;AAAA,EACC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACM;AACP,YAAY,WAAW;AACvB,SAAS,mBAAmB;AAE5B,SAAS,eAAe;AACxB,SAA0B,mBAAmB;AAE7C,SAA8B,yBAAyB;AAEvD,SAAS,sBAAsB;AA+BxB,MAAM,eAAe,MAAM,cAA2C,IAAI;AAa1E,SAAS,cAAc,EAAE,WAAW,SAAS,GAA2B;AAC9E,QAAM,SAAS,eAAe;AAC9B,QAAM,aAAa,YAAY;AAE/B,QAAM,OAAO,QAAQ;AACrB,QAAM,MAAM,eAAe;AAC3B,QAAM,UAAU,kBAAkB;AA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AM,QAAQ,aAAa,OAAO,SAAS,EAAE,GAAG,iBAAiB;AAEjE,QAAM,EAAE,GAAG,EAAE,IAAI,OAAO,mBAAmB,EAAE;AAC7C,SAAO,YAAY,EAAE,IAAI,MAAM,MAAM,MAAM,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AACvE,SAAO,OAAO,EAAE;AAEhB,SAAO,eAAe,sBAAsB;AAAA,IAC3C,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,OAAO,OAAO,SAAS,EAAE;AAAA,IACzB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,WAAW;AACV,aAAO,eAAe,aAAa;AACnC,aAAO,OAAO,EAAE;AAChB,WAAK,YAAY,EAAE;AAAA,IACpB;AAAA,EACD,CAAC;AAED,SAAO,eAAe,EAAE,qBAAqB,MAAM,IAAI;AACxD;",
4
+ "sourcesContent": ["import { Editor, GeoShapeGeoStyle, useMaybeEditor } from '@tldraw/editor'\nimport * as React from 'react'\nimport { EmbedDialog } from '../components/EmbedDialog'\nimport { useA11y } from '../context/a11y'\nimport { TLUiEventSource, useUiEvents } from '../context/events'\nimport { TLUiIconType } from '../icon-types'\nimport { TLUiOverrideHelpers, useDefaultHelpers } from '../overrides'\nimport { TLUiTranslationKey } from './useTranslation/TLUiTranslationKey'\nimport { useTranslation } from './useTranslation/useTranslation'\n\n/** @public */\nexport interface TLUiToolItem<\n\tTranslationKey extends string = string,\n\tIconType extends string = string,\n> {\n\tid: string\n\tlabel: TranslationKey\n\tshortcutsLabel?: TranslationKey\n\ticon: IconType\n\tonSelect(source: TLUiEventSource): void\n\t/**\n\t * The keyboard shortcut for this tool. This is a string that can be a single key,\n\t * or a combination of keys.\n\t * For example, `cmd+z` or `cmd+shift+z` or `cmd+u,ctrl+u`, or just `v` or `a`.\n\t * We have backwards compatibility with the old system, where we used to use\n\t * symbols to denote cmd/alt/shift, using `!` for shift, `$` for cmd, and `?` for alt.\n\t */\n\tkbd?: string\n\treadonlyOk?: boolean\n\tmeta?: {\n\t\t[key: string]: any\n\t}\n}\n\n/** @public */\nexport type TLUiToolsContextType = Record<string, TLUiToolItem>\n\n/** @internal */\nexport const ToolsContext = React.createContext<null | TLUiToolsContextType>(null)\n\n/** @public */\nexport interface TLUiToolsProviderProps {\n\toverrides?(\n\t\teditor: Editor,\n\t\ttools: TLUiToolsContextType,\n\t\thelpers: Partial<TLUiOverrideHelpers>\n\t): TLUiToolsContextType\n\tchildren: React.ReactNode\n}\n\n/** @internal */\nexport function ToolsProvider({ overrides, children }: TLUiToolsProviderProps) {\n\tconst editor = useMaybeEditor()\n\tconst trackEvent = useUiEvents()\n\n\tconst a11y = useA11y()\n\tconst msg = useTranslation()\n\tconst helpers = useDefaultHelpers()\n\n\tconst onToolSelect = React.useCallback(\n\t\t(\n\t\t\tsource: TLUiEventSource,\n\t\t\ttool: TLUiToolItem<TLUiTranslationKey, TLUiIconType>,\n\t\t\tid?: string\n\t\t) => {\n\t\t\ta11y.announce({ msg: msg(tool.label) })\n\t\t\ttrackEvent('select-tool', { source, id: id ?? tool.id })\n\t\t},\n\t\t[a11y, msg, trackEvent]\n\t)\n\n\tconst tools = React.useMemo<TLUiToolsContextType>(() => {\n\t\tif (!editor) return {}\n\t\tconst toolsArray: TLUiToolItem<TLUiTranslationKey, TLUiIconType>[] = [\n\t\t\t{\n\t\t\t\tid: 'select',\n\t\t\t\tlabel: 'tool.select',\n\t\t\t\ticon: 'tool-pointer',\n\t\t\t\tkbd: 'v',\n\t\t\t\treadonlyOk: true,\n\t\t\t\tonSelect(source) {\n\t\t\t\t\tif (editor.isIn('select')) {\n\t\t\t\t\t\t// There's a quirk of select mode, where editing a shape is a sub-state of select.\n\t\t\t\t\t\t// Because the text tool can be locked/sticky, we need to make sure we exit the\n\t\t\t\t\t\t// text tool.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// psst, if you're changing this code, also change the code\n\t\t\t\t\t\t// in strange-tools.test.ts! Sadly it's duplicated there.\n\t\t\t\t\t\tconst currentNode = editor.root.getCurrent()!\n\t\t\t\t\t\tcurrentNode.exit({}, currentNode.id)\n\t\t\t\t\t\tcurrentNode.enter({}, currentNode.id)\n\t\t\t\t\t}\n\t\t\t\t\teditor.setCurrentTool('select')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'hand',\n\t\t\t\tlabel: 'tool.hand',\n\t\t\t\ticon: 'tool-hand',\n\t\t\t\tkbd: 'h',\n\t\t\t\treadonlyOk: true,\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('hand')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'eraser',\n\t\t\t\tlabel: 'tool.eraser',\n\t\t\t\ticon: 'tool-eraser',\n\t\t\t\tkbd: 'e',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('eraser')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'draw',\n\t\t\t\tlabel: 'tool.draw',\n\t\t\t\ticon: 'tool-pencil',\n\t\t\t\tkbd: 'd,b,x',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('draw')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t...[...GeoShapeGeoStyle.values].map((id) => ({\n\t\t\t\tid,\n\t\t\t\tlabel: `tool.${id}` as TLUiTranslationKey,\n\t\t\t\tmeta: {\n\t\t\t\t\tgeo: id,\n\t\t\t\t},\n\t\t\t\tkbd: id === 'rectangle' ? 'r' : id === 'ellipse' ? 'o' : undefined,\n\t\t\t\ticon: ('geo-' + id) as TLUiIconType,\n\t\t\t\tonSelect(source: TLUiEventSource) {\n\t\t\t\t\teditor.run(() => {\n\t\t\t\t\t\teditor.setStyleForNextShapes(GeoShapeGeoStyle, id)\n\t\t\t\t\t\teditor.setCurrentTool('geo')\n\t\t\t\t\t\tonToolSelect(source, this, `geo-${id}`)\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t})),\n\t\t\t{\n\t\t\t\tid: 'arrow',\n\t\t\t\tlabel: 'tool.arrow',\n\t\t\t\ticon: 'tool-arrow',\n\t\t\t\tkbd: 'a',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('arrow')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'line',\n\t\t\t\tlabel: 'tool.line',\n\t\t\t\ticon: 'tool-line',\n\t\t\t\tkbd: 'l',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('line')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'frame',\n\t\t\t\tlabel: 'tool.frame',\n\t\t\t\ticon: 'tool-frame',\n\t\t\t\tkbd: 'f',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('frame')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'text',\n\t\t\t\tlabel: 'tool.text',\n\t\t\t\ticon: 'tool-text',\n\t\t\t\tkbd: 't',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('text')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'asset',\n\t\t\t\tlabel: 'tool.media',\n\t\t\t\ticon: 'tool-media',\n\t\t\t\tkbd: 'cmd+u,ctrl+u',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\thelpers.insertMedia()\n\t\t\t\t\tonToolSelect(source, this, 'media')\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'note',\n\t\t\t\tlabel: 'tool.note',\n\t\t\t\ticon: 'tool-note',\n\t\t\t\tkbd: 'n',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('note')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'laser',\n\t\t\t\tlabel: 'tool.laser',\n\t\t\t\treadonlyOk: true,\n\t\t\t\ticon: 'tool-laser',\n\t\t\t\tkbd: 'k',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('laser')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'embed',\n\t\t\t\tlabel: 'tool.embed',\n\t\t\t\ticon: 'dot',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\thelpers.addDialog({ component: EmbedDialog })\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'highlight',\n\t\t\t\tlabel: 'tool.highlight',\n\t\t\t\ticon: 'tool-highlight',\n\t\t\t\t// TODO: pick a better shortcut\n\t\t\t\tkbd: 'shift+d',\n\t\t\t\tonSelect(source) {\n\t\t\t\t\teditor.setCurrentTool('highlight')\n\t\t\t\t\tonToolSelect(source, this)\n\t\t\t\t},\n\t\t\t},\n\t\t]\n\n\t\ttoolsArray.forEach((t) => (t.onSelect = t.onSelect.bind(t)))\n\n\t\tconst tools = Object.fromEntries(toolsArray.map((t) => [t.id, t]))\n\n\t\tif (overrides) {\n\t\t\treturn overrides(editor, tools, helpers)\n\t\t}\n\n\t\treturn tools\n\t}, [overrides, editor, helpers, onToolSelect])\n\n\treturn <ToolsContext.Provider value={tools}>{children}</ToolsContext.Provider>\n}\n\n/** @public */\nexport function useTools() {\n\tconst ctx = React.useContext(ToolsContext)\n\n\tif (!ctx) {\n\t\tthrow new Error('useTools must be used within a ToolProvider')\n\t}\n\n\treturn ctx\n}\n"],
5
+ "mappings": "AAuPQ;AAvPR,SAAiB,kBAA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AAA,MACD;AAAA,IACD;AAEA,eAAW,QAAQ,CAAC,MAAO,EAAE,WAAW,EAAE,SAAS,KAAK,CAAC,CAAE;AAE3D,UAAMA,SAAQ,OAAO,YAAY,WAAW,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAEjE,QAAI,WAAW;AACd,aAAO,UAAU,QAAQA,QAAO,OAAO;AAAA,IACxC;AAEA,WAAOA;AAAA,EACR,GAAG,CAAC,WAAW,QAAQ,SAAS,YAAY,CAAC;AAE7C,SAAO,oBAAC,aAAa,UAAb,EAAsB,OAAO,OAAQ,UAAS;AACvD;AAGO,SAAS,WAAW;AAC1B,QAAM,MAAM,MAAM,WAAW,YAAY;AAEzC,MAAI,CAAC,KAAK;AACT,UAAM,IAAI,MAAM,6CAA6C;AAAA,EAC9D;AAEA,SAAO;AACR;",
6
6
  "names": ["tools"]
7
7
  }
@@ -51,7 +51,6 @@ const DEFAULT_TRANSLATION = {
51
51
  "action.new-project": "New project",
52
52
  "action.new-shared-project": "New shared project",
53
53
  "action.open-cursor-chat": "Cursor chat",
54
- "action.open-kbd-shortcuts": "Open keyboard shortcuts",
55
54
  "action.open-file": "Open file",
56
55
  "action.pack": "Pack",
57
56
  "action.paste": "Paste",
@@ -87,10 +86,6 @@ const DEFAULT_TRANSLATION = {
87
86
  "action.toggle-wrap-mode": "Toggle Select on wrap",
88
87
  "action.toggle-reduce-motion.menu": "Reduce motion",
89
88
  "action.toggle-reduce-motion": "Toggle reduce motion",
90
- "action.toggle-keyboard-shortcuts.menu": "Keyboard shortcuts",
91
- "action.toggle-keyboard-shortcuts": "Toggle keyboard shortcuts",
92
- "action.toggle-ui-labels.menu": "UI labels",
93
- "action.toggle-ui-labels": "Toggle UI labels",
94
89
  "action.toggle-edge-scrolling.menu": "Edge scrolling",
95
90
  "action.toggle-edge-scrolling": "Toggle edge scrolling",
96
91
  "action.toggle-debug-mode.menu": "Debug mode",
@@ -284,19 +279,13 @@ const DEFAULT_TRANSLATION = {
284
279
  "a11y.repeat-shape": "Repeat shape",
285
280
  "a11y.move-shape": "Move shape",
286
281
  "a11y.move-shape-faster": "Move shape faster",
287
- "a11y.rotate-shape-cw": "Rotate shape clockwise",
288
- "a11y.rotate-shape-ccw": "Rotate shape counterclockwise",
289
- "a11y.rotate-shape-cw-fine": "Rotate shape clockwise (fine)",
290
- "a11y.rotate-shape-ccw-fine": "Rotate shape counterclockwise (fine)",
291
282
  "a11y.enlarge-shape": "Enlarge shape",
292
283
  "a11y.shrink-shape": "Shrink shape",
293
284
  "a11y.pan-camera": "Pan camera",
294
285
  "a11y.adjust-shape-styles": "Adjust shape styles",
295
286
  "a11y.open-context-menu": "Open context menu",
296
- "a11y.open-keyboard-shortcuts": "Open keyboard shortcuts",
297
287
  "menu.title": "Menu",
298
288
  "menu.theme": "Theme",
299
- "menu.accessibility": "Accessibility",
300
289
  "menu.copy-as": "Copy as",
301
290
  "menu.edit": "Edit",
302
291
  "menu.export-as": "Export as",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/ui/hooks/useTranslation/defaultTranslation.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\n\t'action.convert-to-bookmark': 'Convert to Bookmark',\n\t'action.convert-to-embed': 'Convert to Embed',\n\t'action.open-embed-link': 'Open link',\n\t'action.align-bottom': 'Align bottom',\n\t'action.align-center-horizontal': 'Align horizontally',\n\t'action.align-center-vertical': 'Align vertically',\n\t'action.align-center-horizontal.short': 'Align H',\n\t'action.align-center-vertical.short': 'Align V',\n\t'action.align-left': 'Align left',\n\t'action.align-right': 'Align right',\n\t'action.align-top': 'Align top',\n\t'action.back-to-content': 'Back to content',\n\t'action.bring-forward': 'Bring forward',\n\t'action.bring-to-front': 'Bring to front',\n\t'action.copy-as-png.short': 'PNG',\n\t'action.copy-as-png': 'Copy as PNG',\n\t'action.copy-as-svg.short': 'SVG',\n\t'action.copy-as-svg': 'Copy as SVG',\n\t'action.copy': 'Copy',\n\t'action.cut': 'Cut',\n\t'action.delete': 'Delete',\n\t'action.unlock-all': 'Unlock all',\n\t'action.distribute-horizontal': 'Distribute horizontally',\n\t'action.distribute-vertical': 'Distribute vertically',\n\t'action.distribute-horizontal.short': 'Distribute H',\n\t'action.distribute-vertical.short': 'Distribute V',\n\t'action.download-original': 'Download original',\n\t'action.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-png.short': 'PNG',\n\t'action.export-as-png': 'Export as PNG',\n\t'action.export-as-svg.short': 'SVG',\n\t'action.export-as-svg': 'Export as SVG',\n\t'action.export-all-as-png.short': 'PNG',\n\t'action.export-all-as-png': 'Export as PNG',\n\t'action.export-all-as-svg.short': 'SVG',\n\t'action.export-all-as-svg': 'Export as SVG',\n\t'action.fit-frame-to-content': 'Fit to content',\n\t'action.flip-horizontal': 'Flip horizontally',\n\t'action.flip-vertical': 'Flip vertically',\n\t'action.flip-horizontal.short': 'Flip H',\n\t'action.flip-vertical.short': 'Flip V',\n\t'action.fork-project': 'Fork this project',\n\t'action.fork-project-on-tldraw': 'Fork project on tldraw',\n\t'action.group': 'Group',\n\t'action.insert-embed': 'Insert embed',\n\t'action.insert-media': 'Upload media',\n\t'action.leave-shared-project': 'Leave shared project',\n\t'action.new-project': 'New project',\n\t'action.new-shared-project': 'New shared project',\n\t'action.open-cursor-chat': 'Cursor chat',\n\t'action.open-kbd-shortcuts': 'Open keyboard shortcuts',\n\t'action.open-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.paste-error-title': 'Pasting failed',\n\t'action.paste-error-description':\n\t\t'Could not paste due to missing clipboard permissions. Please enable the permissions and try again.',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\n\t'action.rename': 'Rename',\n\t'action.rotate-ccw': 'Rotate counterclockwise',\n\t'action.rotate-cw': 'Rotate clockwise',\n\t'action.save-copy': 'Save a copy',\n\t'action.select-all': 'Select all',\n\t'action.select-none': 'Select none',\n\t'action.send-backward': 'Send backward',\n\t'action.send-to-back': 'Send to back',\n\t'action.share-project': 'Share this project',\n\t'action.stack-horizontal': 'Stack horizontally',\n\t'action.stack-vertical': 'Stack vertically',\n\t'action.stack-horizontal.short': 'Stack H',\n\t'action.stack-vertical.short': 'Stack V',\n\t'action.stop-following': 'Stop following',\n\t'action.stretch-horizontal': 'Stretch horizontally',\n\t'action.stretch-vertical': 'Stretch vertically',\n\t'action.stretch-horizontal.short': 'Stretch H',\n\t'action.stretch-vertical.short': 'Stretch V',\n\t'action.toggle-auto-size': 'Toggle auto size',\n\t'action.toggle-dark-mode.menu': 'Dark mode',\n\t'action.toggle-dark-mode': 'Toggle dark mode',\n\t'action.toggle-paste-at-cursor.menu': 'Paste at cursor',\n\t'action.toggle-paste-at-cursor': 'Toggle paste at cursor',\n\t'action.toggle-wrap-mode.menu': 'Select on wrap',\n\t'action.toggle-wrap-mode': 'Toggle Select on wrap',\n\t'action.toggle-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\n\t'action.toggle-keyboard-shortcuts.menu': 'Keyboard shortcuts',\n\t'action.toggle-keyboard-shortcuts': 'Toggle keyboard shortcuts',\n\t'action.toggle-ui-labels.menu': 'UI labels',\n\t'action.toggle-ui-labels': 'Toggle UI labels',\n\t'action.toggle-edge-scrolling.menu': 'Edge scrolling',\n\t'action.toggle-edge-scrolling': 'Toggle edge scrolling',\n\t'action.toggle-debug-mode.menu': 'Debug mode',\n\t'action.toggle-debug-mode': 'Toggle debug mode',\n\t'action.toggle-focus-mode.menu': 'Focus mode',\n\t'action.toggle-focus-mode': 'Toggle focus mode',\n\t'action.toggle-dynamic-size-mode.menu': 'Dynamic size',\n\t'action.toggle-dynamic-size-mode': 'Toggle dynamic size',\n\t'action.toggle-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\n\t'action.flatten-to-image': 'Flatten',\n\t'action.toggle-snap-mode.menu': 'Always snap',\n\t'action.toggle-snap-mode': 'Toggle always snap',\n\t'action.toggle-tool-lock.menu': 'Tool lock',\n\t'action.toggle-tool-lock': 'Toggle tool lock',\n\t'action.toggle-transparent.context-menu': 'Transparent',\n\t'action.toggle-transparent.menu': 'Transparent',\n\t'action.toggle-transparent': 'Toggle transparent background',\n\t'action.undo': 'Undo',\n\t'action.ungroup': 'Ungroup',\n\t'action.zoom-in': 'Zoom in',\n\t'action.zoom-out': 'Zoom out',\n\t'action.zoom-to-100': 'Zoom to 100%',\n\t'action.zoom-to-fit': 'Zoom to fit',\n\t'action.zoom-to-selection': 'Zoom to selection',\n\t'assets.files.size-too-big': 'File size is too big',\n\t'assets.files.type-not-allowed': 'File type is not allowed',\n\t'assets.files.upload-failed': 'Upload failed',\n\t'assets.files.amount-too-many': 'Too many files',\n\t'assets.url.failed': 'Couldn\u2019t load URL preview',\n\t'theme.dark': 'Dark',\n\t'theme.light': 'Light',\n\t'theme.system': 'System',\n\t'color-style.white': 'White',\n\t'color-style.black': 'Black',\n\t'color-style.blue': 'Blue',\n\t'color-style.green': 'Green',\n\t'color-style.grey': 'Grey',\n\t'color-style.light-blue': 'Light blue',\n\t'color-style.light-green': 'Light green',\n\t'color-style.light-red': 'Light red',\n\t'color-style.light-violet': 'Light violet',\n\t'color-style.orange': 'Orange',\n\t'color-style.red': 'Red',\n\t'color-style.violet': 'Violet',\n\t'color-style.yellow': 'Yellow',\n\t'fill-style.none': 'None',\n\t'document.default-name': 'Untitled',\n\t'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\n\t'fill-style.fill': 'Fill',\n\t'dash-style.dashed': 'Dashed',\n\t'dash-style.dotted': 'Dotted',\n\t'dash-style.draw': 'Draw',\n\t'dash-style.solid': 'Solid',\n\t'size-style.s': 'Small',\n\t'size-style.m': 'Medium',\n\t'size-style.l': 'Large',\n\t'size-style.xl': 'Extra large',\n\t'opacity-style.0.1': '10%',\n\t'opacity-style.0.25': '25%',\n\t'opacity-style.0.5': '50%',\n\t'opacity-style.0.75': '75%',\n\t'opacity-style.1': '100%',\n\t'font-style.draw': 'Draw',\n\t'font-style.sans': 'Sans',\n\t'font-style.serif': 'Serif',\n\t'font-style.mono': 'Mono',\n\t'align-style.start': 'Start',\n\t'align-style.middle': 'Middle',\n\t'align-style.end': 'End',\n\t'align-style.justify': 'Justify',\n\t'verticalAlign-style.start': 'Top',\n\t'verticalAlign-style.middle': 'Middle',\n\t'verticalAlign-style.end': 'Bottom',\n\t'geo-style.arrow-down': 'Arrow down',\n\t'geo-style.arrow-left': 'Arrow left',\n\t'geo-style.arrow-right': 'Arrow right',\n\t'geo-style.arrow-up': 'Arrow up',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.heart': 'Heart',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus': 'Rhombus',\n\t'geo-style.star': 'Star',\n\t'geo-style.trapezoid': 'Trapezoid',\n\t'geo-style.triangle': 'Triangle',\n\t'geo-style.x-box': 'X box',\n\t'geo-style.check-box': 'Check box',\n\t'arrowheadStart-style.none': 'None',\n\t'arrowheadStart-style.arrow': 'Arrow',\n\t'arrowheadStart-style.bar': 'Bar',\n\t'arrowheadStart-style.diamond': 'Diamond',\n\t'arrowheadStart-style.dot': 'Dot',\n\t'arrowheadStart-style.inverted': 'Inverted',\n\t'arrowheadStart-style.pipe': 'Pipe',\n\t'arrowheadStart-style.square': 'Square',\n\t'arrowheadStart-style.triangle': 'Triangle',\n\t'arrowheadEnd-style.none': 'None',\n\t'arrowheadEnd-style.arrow': 'Arrow',\n\t'arrowheadEnd-style.bar': 'Bar',\n\t'arrowheadEnd-style.diamond': 'Diamond',\n\t'arrowheadEnd-style.dot': 'Dot',\n\t'arrowheadEnd-style.inverted': 'Inverted',\n\t'arrowheadEnd-style.pipe': 'Pipe',\n\t'arrowheadEnd-style.square': 'Square',\n\t'arrowheadEnd-style.triangle': 'Triangle',\n\t'spline-style.line': 'Line',\n\t'spline-style.cubic': 'Cubic',\n\t'arrow-kind-style.arc': 'Arc',\n\t'arrow-kind-style.elbow': 'Elbow',\n\t'tool.select': 'Select',\n\t'tool.hand': 'Hand',\n\t'tool.draw': 'Draw',\n\t'tool.eraser': 'Eraser',\n\t'tool.arrow-down': 'Arrow down',\n\t'tool.arrow-left': 'Arrow left',\n\t'tool.arrow-right': 'Arrow right',\n\t'tool.arrow-up': 'Arrow up',\n\t'tool.arrow': 'Arrow',\n\t'tool.cloud': 'Cloud',\n\t'tool.diamond': 'Diamond',\n\t'tool.ellipse': 'Ellipse',\n\t'tool.heart': 'Heart',\n\t'tool.hexagon': 'Hexagon',\n\t'tool.highlight': 'Highlight',\n\t'tool.line': 'Line',\n\t'tool.octagon': 'Octagon',\n\t'tool.oval': 'Oval',\n\t'tool.pentagon': 'Pentagon',\n\t'tool.rectangle': 'Rectangle',\n\t'tool.rhombus': 'Rhombus',\n\t'tool.star': 'Star',\n\t'tool.trapezoid': 'Trapezoid',\n\t'tool.triangle': 'Triangle',\n\t'tool.x-box': 'X box',\n\t'tool.check-box': 'Check box',\n\t'tool.media': 'Media',\n\t'tool.frame': 'Frame',\n\t'tool.note': 'Note',\n\t'tool.laser': 'Laser',\n\t'tool.embed': 'Embed',\n\t'tool.text': 'Text',\n\t'tool.pointer-down': 'Pointer down',\n\t'tool.image-zoom': 'Zoom',\n\t'tool.replace-media': 'Replace media',\n\t'tool.flip-horz': 'Flip horizontally',\n\t'tool.flip-vert': 'Flip vertically',\n\t'tool.rotate-cw': 'Rotate',\n\t'tool.aspect-ratio': 'Aspect ratio',\n\t'tool.aspect-ratio.original': 'Original',\n\t'tool.aspect-ratio.square': 'Square (1:1)',\n\t'tool.aspect-ratio.circle': 'Circle (1:1)',\n\t'tool.aspect-ratio.landscape': 'Landscape (4:3)',\n\t'tool.aspect-ratio.portrait': 'Portrait (3:4)',\n\t'tool.aspect-ratio.wide': 'Wide (16:9)',\n\t'tool.image-toolbar-title': 'Image tools',\n\t'tool.image-crop': 'Crop image',\n\t'tool.media-alt-text': 'Alternative text',\n\t'tool.media-alt-text-desc': 'Give a description\u2026',\n\t'tool.media-alt-text-confirm': 'Confirm',\n\t'tool.rich-text-bold': 'Bold',\n\t'tool.rich-text-italic': 'Italic',\n\t'tool.rich-text-code': 'Code',\n\t'tool.rich-text-highlight': 'Highlight',\n\t'tool.rich-text-strikethrough': 'Strikethrough',\n\t'tool.rich-text-link': 'Link',\n\t'tool.rich-text-link-visit': 'Visit link',\n\t'tool.rich-text-link-remove': 'Remove link',\n\t'tool.rich-text-header': 'Header',\n\t'tool.rich-text-bulletList': 'Bulleted list',\n\t'tool.rich-text-toolbar-title': 'Text formatting',\n\t'tool.rich-text-orderedList': 'Ordered list',\n\t'tool.bookmark': 'Bookmark',\n\t'a11y.status': 'Status',\n\t'a11y.skip-to-main-content': 'Move focus to canvas',\n\t'a11y.shape-index': '{num} of {total}',\n\t'a11y.shape-image': 'Image',\n\t'a11y.shape-video': 'Video',\n\t'a11y.multiple-shapes': '{num} shapes selected',\n\t'a11y.select-shape': 'Select next shape',\n\t'a11y.select-shape-direction': 'Select shape in direction',\n\t'a11y.enter-leave-container': 'Enter/leave container',\n\t'a11y.repeat-shape': 'Repeat shape',\n\t'a11y.move-shape': 'Move shape',\n\t'a11y.move-shape-faster': 'Move shape faster',\n\t'a11y.rotate-shape-cw': 'Rotate shape clockwise',\n\t'a11y.rotate-shape-ccw': 'Rotate shape counterclockwise',\n\t'a11y.rotate-shape-cw-fine': 'Rotate shape clockwise (fine)',\n\t'a11y.rotate-shape-ccw-fine': 'Rotate shape counterclockwise (fine)',\n\t'a11y.enlarge-shape': 'Enlarge shape',\n\t'a11y.shrink-shape': 'Shrink shape',\n\t'a11y.pan-camera': 'Pan camera',\n\t'a11y.adjust-shape-styles': 'Adjust shape styles',\n\t'a11y.open-context-menu': 'Open context menu',\n\t'a11y.open-keyboard-shortcuts': 'Open keyboard shortcuts',\n\t'menu.title': 'Menu',\n\t'menu.theme': 'Theme',\n\t'menu.accessibility': 'Accessibility',\n\t'menu.copy-as': 'Copy as',\n\t'menu.edit': 'Edit',\n\t'menu.export-as': 'Export as',\n\t'menu.file': 'File',\n\t'menu.language': 'Language',\n\t'menu.preferences': 'Preferences',\n\t'menu.view': 'View',\n\t'context-menu.title': 'Context menu',\n\t'context-menu.edit': 'Edit',\n\t'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\n\t'context-menu.export-all-as': 'Export',\n\t'context-menu.move-to-page': 'Move to page',\n\t'context-menu.reorder': 'Reorder',\n\t'page-menu.title': 'Pages',\n\t'page-menu.create-new-page': 'Create new page',\n\t'page-menu.max-page-count-reached': 'Max pages reached',\n\t'page-menu.new-page-initial-name': 'Page 1',\n\t'page-menu.edit-start': 'Edit',\n\t'page-menu.edit-done': 'Done',\n\t'page-menu.go-to-page': 'Go to page',\n\t'page-menu.submenu.rename': 'Rename',\n\t'page-menu.submenu.duplicate-page': 'Duplicate',\n\t'page-menu.submenu.title': 'Menu',\n\t'page-menu.submenu.move-down': 'Move down',\n\t'page-menu.submenu.move-up': 'Move up',\n\t'page-menu.submenu.delete': 'Delete',\n\t'share-menu.title': 'Share',\n\t'share-menu.save-note': 'Download this project to your computer as a .tldr file.',\n\t'share-menu.fork-note': 'Create a new shared project based on this snapshot.',\n\t'share-menu.share-project': 'Share this project',\n\t'share-menu.copy-link': 'Copy editor link',\n\t'share-menu.create-snapshot-link': 'Copy snapshot link',\n\t'share-menu.snapshot-link-note': 'Capture and share this project as a read-only snapshot link.',\n\t'share-menu.copy-readonly-link': 'Copy viewer link',\n\t'share-menu.offline-note': 'Create a new shared project based on your current project.',\n\t'share-menu.copy-link-note': 'Anyone with the link will be able to view and edit this project.',\n\t'share-menu.copy-readonly-link-note': 'Anyone with the link will be able to access this project.',\n\t'share-menu.project-too-large':\n\t\t'Sorry, this project can\u2019t be shared because it\u2019s too large. We\u2019re working on it!',\n\t'share-menu.upload-failed':\n\t\t'Sorry, we couldn\u2019t upload your project at the moment. Please try again or let us know if the problem persists.',\n\t'share-menu.creating-project': 'Creating the new project\u2026',\n\t'share-menu.copied': 'Copied link',\n\t'document-name-menu.copy-link': 'Copy link',\n\t'status.offline': 'Offline',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\n\t'people-menu.avatar-color': 'Avatar color',\n\t'people-menu.change-color': 'Change color',\n\t'people-menu.follow': 'Following',\n\t'people-menu.following': 'Following',\n\t'people-menu.leading': 'Following You',\n\t'people-menu.user': '(You)',\n\t'people-menu.invite': 'Invite others',\n\t'people-menu.anonymous-user': 'New user',\n\t'help-menu.import-tldr-file': 'Import file\u2026',\n\t'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About tldraw',\n\t'help-menu.discord': 'Discord',\n\t'help-menu.github': 'GitHub',\n\t'help-menu.keyboard-shortcuts': 'Keyboard shortcuts',\n\t'help-menu.twitter': 'Twitter',\n\t'help-menu.terms': 'Terms of service',\n\t'help-menu.privacy': 'Privacy policy',\n\t'actions-menu.title': 'Actions',\n\t'edit-link-dialog.title': 'Edit link',\n\t'edit-link-dialog.invalid-url': 'A link must be a valid URL.',\n\t'edit-link-dialog.detail': 'Links will open in a new tab.',\n\t'edit-link-dialog.url': 'URL',\n\t'edit-link-dialog.clear': 'Clear',\n\t'edit-link-dialog.save': 'Continue',\n\t'edit-link-dialog.cancel': 'Cancel',\n\t'edit-link-dialog.external-link': 'External link',\n\t'embed-dialog.title': 'Insert embed',\n\t'embed-dialog.back': 'Back',\n\t'embed-dialog.create': 'Create',\n\t'embed-dialog.cancel': 'Cancel',\n\t'embed-dialog.url': 'URL',\n\t'embed-dialog.instruction': 'Paste in the site\u2019s URL to create the embed.',\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'shortcuts-dialog.title': 'Keyboard shortcuts',\n\t'shortcuts-dialog.edit': 'Edit',\n\t'shortcuts-dialog.file': 'File',\n\t'shortcuts-dialog.preferences': 'Preferences',\n\t'shortcuts-dialog.tools': 'Tools',\n\t'shortcuts-dialog.transform': 'Transform',\n\t'shortcuts-dialog.view': 'View',\n\t'shortcuts-dialog.collaboration': 'Collaboration',\n\t'shortcuts-dialog.a11y': 'Accessibility',\n\t'shortcuts-dialog.text-formatting': 'Text formatting',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': 'Align',\n\t'style-panel.label-align': 'Label align',\n\t'style-panel.vertical-align': 'Vertical align',\n\t'style-panel.position': 'Position',\n\t'style-panel.arrowheads': 'Arrows',\n\t'style-panel.arrowhead-start': 'Start',\n\t'style-panel.arrowhead-end': 'End',\n\t'style-panel.arrow-kind': 'Line',\n\t'style-panel.color': 'Color',\n\t'style-panel.dash': 'Dash',\n\t'style-panel.fill': 'Fill',\n\t'style-panel.font': 'Font',\n\t'style-panel.geo': 'Shape',\n\t'style-panel.mixed': 'Mixed',\n\t'style-panel.opacity': 'Opacity',\n\t'style-panel.size': 'Size',\n\t'style-panel.spline': 'Spline',\n\t'tool-panel.title': 'Tools',\n\t'tool-panel.more': 'More',\n\t'navigation-zone.title': 'Navigation',\n\t'navigation-zone.minimap': 'Minimap',\n\t'navigation-zone.toggle-minimap': 'Toggle minimap',\n\t'navigation-zone.zoom': 'Zoom',\n\t'focus-mode.toggle-focus-mode': 'Toggle focus mode',\n\t'toast.close': 'Close',\n\t'toast.success': 'Success',\n\t'toast.error': 'Error',\n\t'toast.info': 'Info',\n\t'toast.warning': 'Warning',\n\t'file-system.file-open-error.title': 'Could not open file',\n\t'file-system.file-open-error.not-a-tldraw-file':\n\t\t'The file you tried to open doesn\u2019t look like a tldraw file.',\n\t'file-system.file-open-error.file-format-version-too-new':\n\t\t'The file you tried to open is from a newer version of tldraw. Please reload the page and try again.',\n\t'file-system.file-open-error.generic-corrupted-file': 'The file you tried to open is corrupted.',\n\t'file-system.confirm-open.title': 'Overwrite current project?',\n\t'file-system.confirm-open.description':\n\t\t'Opening a file will replace your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-open.cancel': 'Cancel',\n\t'file-system.confirm-open.open': 'Open file',\n\t'file-system.confirm-open.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.confirm-clear.title': 'Clear current project?',\n\t'file-system.confirm-clear.description':\n\t\t'Creating a new project will clear your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-clear.cancel': 'Cancel',\n\t'file-system.confirm-clear.continue': 'Continue',\n\t'file-system.confirm-clear.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.shared-document-file-open-error.title': 'Could not open file',\n\t'file-system.shared-document-file-open-error.description':\n\t\t'Opening files from shared projects is not supported.',\n\t'sharing.confirm-leave.title': 'Leave current project?',\n\t'sharing.confirm-leave.description':\n\t\t'Are you sure you want to leave this shared project? You can return to it by navigating to its URL.',\n\t'sharing.confirm-leave.cancel': 'Cancel',\n\t'sharing.confirm-leave.leave': 'Leave',\n\t'sharing.confirm-leave.dont-show-again': 'Don\u2019t ask again',\n\t'toast.error.export-fail.title': 'Failed export',\n\t'toast.error.export-fail.desc': 'Failed to export image',\n\t'toast.error.copy-fail.title': 'Failed copy',\n\t'toast.error.copy-fail.desc': 'Failed to copy image',\n\t'context.pages.new-page': 'New page',\n\t'vscode.file-open.desc':\n\t\t'We\u2019ve updated this document to work with the current version of tldraw. If you\u2019d like to keep the original version (which will work on old.tldraw.com), click below to create a backup.',\n\t'vscode.file-open.open': 'Continue',\n\t'vscode.file-open.backup': 'Backup',\n\t'vscode.file-open.backup-saved': 'Backup saved',\n\t'vscode.file-open.backup-failed': 'Backup failed: this is not a .tldr file.',\n\t'vscode.file-open.dont-show-again': 'Don\u2019t ask again',\n\t'cursor-chat.type-to-chat': 'Type to chat\u2026',\n\t'app.loading': 'Loading tldraw\u2026',\n\t'handle.resize-top': 'Resize top',\n\t'handle.resize-bottom': 'Resize bottom',\n\t'handle.resize-left': 'Resize left',\n\t'handle.resize-right': 'Resize right',\n\t'handle.resize-top-left': 'Resize top left',\n\t'handle.resize-top-right': 'Resize top right',\n\t'handle.resize-bottom-left': 'Resize bottom left',\n\t'handle.resize-bottom-right': 'Resize bottom right',\n\t'handle.rotate.top_left_rotate': 'Rotate top left',\n\t'handle.rotate.top_right_rotate': 'Rotate top right',\n\t'handle.rotate.bottom_left_rotate': 'Rotate bottom left',\n\t'handle.rotate.bottom_right_rotate': 'Rotate bottom right',\n\t'handle.rotate.mobile_rotate': 'Rotate',\n\t'handle.crop.top': 'Crop top',\n\t'handle.crop.bottom': 'Crop bottom',\n\t'handle.crop.left': 'Crop left',\n\t'handle.crop.right': 'Crop right',\n\t'handle.crop.top-left': 'Crop top left',\n\t'handle.crop.top-right': 'Crop top right',\n\t'handle.crop.bottom-left': 'Crop bottom left',\n\t'handle.crop.bottom-right': 'Crop bottom right',\n\t'ui.close': 'Close',\n\t'ui.checked': 'Checked',\n\t'ui.unchecked': 'Unchecked',\n}\n"],
5
- "mappings": "AAIO,MAAM,sBAAsB;AAAA,EAClC,8BAA8B;AAAA,EAC9B,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,kCAAkC;AAAA,EAClC,gCAAgC;AAAA,EAChC,wCAAwC;AAAA,EACxC,sCAAsC;AAAA,EACtC,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EAC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yCAAyC;AAAA,EACzC,iCAAiC;AAAA,EACjC,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,8BAA8B;AAAA,EAC9B,0BAA0B;AAAA,EAC1B,yBACC;AAAA,EACD,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,0BAA0B;AAAA,EAC1B,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA,EACjC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,qCAAqC;AAAA,EACrC,+BAA+B;AAAA,EAC/B,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AACjB;",
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\n/** @internal */\nexport const DEFAULT_TRANSLATION = {\n\t'action.convert-to-bookmark': 'Convert to Bookmark',\n\t'action.convert-to-embed': 'Convert to Embed',\n\t'action.open-embed-link': 'Open link',\n\t'action.align-bottom': 'Align bottom',\n\t'action.align-center-horizontal': 'Align horizontally',\n\t'action.align-center-vertical': 'Align vertically',\n\t'action.align-center-horizontal.short': 'Align H',\n\t'action.align-center-vertical.short': 'Align V',\n\t'action.align-left': 'Align left',\n\t'action.align-right': 'Align right',\n\t'action.align-top': 'Align top',\n\t'action.back-to-content': 'Back to content',\n\t'action.bring-forward': 'Bring forward',\n\t'action.bring-to-front': 'Bring to front',\n\t'action.copy-as-png.short': 'PNG',\n\t'action.copy-as-png': 'Copy as PNG',\n\t'action.copy-as-svg.short': 'SVG',\n\t'action.copy-as-svg': 'Copy as SVG',\n\t'action.copy': 'Copy',\n\t'action.cut': 'Cut',\n\t'action.delete': 'Delete',\n\t'action.unlock-all': 'Unlock all',\n\t'action.distribute-horizontal': 'Distribute horizontally',\n\t'action.distribute-vertical': 'Distribute vertically',\n\t'action.distribute-horizontal.short': 'Distribute H',\n\t'action.distribute-vertical.short': 'Distribute V',\n\t'action.download-original': 'Download original',\n\t'action.duplicate': 'Duplicate',\n\t'action.edit-link': 'Edit link',\n\t'action.exit-pen-mode': 'Exit pen mode',\n\t'action.export-as-png.short': 'PNG',\n\t'action.export-as-png': 'Export as PNG',\n\t'action.export-as-svg.short': 'SVG',\n\t'action.export-as-svg': 'Export as SVG',\n\t'action.export-all-as-png.short': 'PNG',\n\t'action.export-all-as-png': 'Export as PNG',\n\t'action.export-all-as-svg.short': 'SVG',\n\t'action.export-all-as-svg': 'Export as SVG',\n\t'action.fit-frame-to-content': 'Fit to content',\n\t'action.flip-horizontal': 'Flip horizontally',\n\t'action.flip-vertical': 'Flip vertically',\n\t'action.flip-horizontal.short': 'Flip H',\n\t'action.flip-vertical.short': 'Flip V',\n\t'action.fork-project': 'Fork this project',\n\t'action.fork-project-on-tldraw': 'Fork project on tldraw',\n\t'action.group': 'Group',\n\t'action.insert-embed': 'Insert embed',\n\t'action.insert-media': 'Upload media',\n\t'action.leave-shared-project': 'Leave shared project',\n\t'action.new-project': 'New project',\n\t'action.new-shared-project': 'New shared project',\n\t'action.open-cursor-chat': 'Cursor chat',\n\t'action.open-file': 'Open file',\n\t'action.pack': 'Pack',\n\t'action.paste': 'Paste',\n\t'action.paste-error-title': 'Pasting failed',\n\t'action.paste-error-description':\n\t\t'Could not paste due to missing clipboard permissions. Please enable the permissions and try again.',\n\t'action.print': 'Print',\n\t'action.redo': 'Redo',\n\t'action.remove-frame': 'Remove frame',\n\t'action.rename': 'Rename',\n\t'action.rotate-ccw': 'Rotate counterclockwise',\n\t'action.rotate-cw': 'Rotate clockwise',\n\t'action.save-copy': 'Save a copy',\n\t'action.select-all': 'Select all',\n\t'action.select-none': 'Select none',\n\t'action.send-backward': 'Send backward',\n\t'action.send-to-back': 'Send to back',\n\t'action.share-project': 'Share this project',\n\t'action.stack-horizontal': 'Stack horizontally',\n\t'action.stack-vertical': 'Stack vertically',\n\t'action.stack-horizontal.short': 'Stack H',\n\t'action.stack-vertical.short': 'Stack V',\n\t'action.stop-following': 'Stop following',\n\t'action.stretch-horizontal': 'Stretch horizontally',\n\t'action.stretch-vertical': 'Stretch vertically',\n\t'action.stretch-horizontal.short': 'Stretch H',\n\t'action.stretch-vertical.short': 'Stretch V',\n\t'action.toggle-auto-size': 'Toggle auto size',\n\t'action.toggle-dark-mode.menu': 'Dark mode',\n\t'action.toggle-dark-mode': 'Toggle dark mode',\n\t'action.toggle-paste-at-cursor.menu': 'Paste at cursor',\n\t'action.toggle-paste-at-cursor': 'Toggle paste at cursor',\n\t'action.toggle-wrap-mode.menu': 'Select on wrap',\n\t'action.toggle-wrap-mode': 'Toggle Select on wrap',\n\t'action.toggle-reduce-motion.menu': 'Reduce motion',\n\t'action.toggle-reduce-motion': 'Toggle reduce motion',\n\t'action.toggle-edge-scrolling.menu': 'Edge scrolling',\n\t'action.toggle-edge-scrolling': 'Toggle edge scrolling',\n\t'action.toggle-debug-mode.menu': 'Debug mode',\n\t'action.toggle-debug-mode': 'Toggle debug mode',\n\t'action.toggle-focus-mode.menu': 'Focus mode',\n\t'action.toggle-focus-mode': 'Toggle focus mode',\n\t'action.toggle-dynamic-size-mode.menu': 'Dynamic size',\n\t'action.toggle-dynamic-size-mode': 'Toggle dynamic size',\n\t'action.toggle-grid.menu': 'Show grid',\n\t'action.toggle-grid': 'Toggle grid',\n\t'action.toggle-lock': 'Toggle locked',\n\t'action.flatten-to-image': 'Flatten',\n\t'action.toggle-snap-mode.menu': 'Always snap',\n\t'action.toggle-snap-mode': 'Toggle always snap',\n\t'action.toggle-tool-lock.menu': 'Tool lock',\n\t'action.toggle-tool-lock': 'Toggle tool lock',\n\t'action.toggle-transparent.context-menu': 'Transparent',\n\t'action.toggle-transparent.menu': 'Transparent',\n\t'action.toggle-transparent': 'Toggle transparent background',\n\t'action.undo': 'Undo',\n\t'action.ungroup': 'Ungroup',\n\t'action.zoom-in': 'Zoom in',\n\t'action.zoom-out': 'Zoom out',\n\t'action.zoom-to-100': 'Zoom to 100%',\n\t'action.zoom-to-fit': 'Zoom to fit',\n\t'action.zoom-to-selection': 'Zoom to selection',\n\t'assets.files.size-too-big': 'File size is too big',\n\t'assets.files.type-not-allowed': 'File type is not allowed',\n\t'assets.files.upload-failed': 'Upload failed',\n\t'assets.files.amount-too-many': 'Too many files',\n\t'assets.url.failed': 'Couldn\u2019t load URL preview',\n\t'theme.dark': 'Dark',\n\t'theme.light': 'Light',\n\t'theme.system': 'System',\n\t'color-style.white': 'White',\n\t'color-style.black': 'Black',\n\t'color-style.blue': 'Blue',\n\t'color-style.green': 'Green',\n\t'color-style.grey': 'Grey',\n\t'color-style.light-blue': 'Light blue',\n\t'color-style.light-green': 'Light green',\n\t'color-style.light-red': 'Light red',\n\t'color-style.light-violet': 'Light violet',\n\t'color-style.orange': 'Orange',\n\t'color-style.red': 'Red',\n\t'color-style.violet': 'Violet',\n\t'color-style.yellow': 'Yellow',\n\t'fill-style.none': 'None',\n\t'document.default-name': 'Untitled',\n\t'fill-style.semi': 'Semi',\n\t'fill-style.solid': 'Solid',\n\t'fill-style.pattern': 'Pattern',\n\t'fill-style.fill': 'Fill',\n\t'dash-style.dashed': 'Dashed',\n\t'dash-style.dotted': 'Dotted',\n\t'dash-style.draw': 'Draw',\n\t'dash-style.solid': 'Solid',\n\t'size-style.s': 'Small',\n\t'size-style.m': 'Medium',\n\t'size-style.l': 'Large',\n\t'size-style.xl': 'Extra large',\n\t'opacity-style.0.1': '10%',\n\t'opacity-style.0.25': '25%',\n\t'opacity-style.0.5': '50%',\n\t'opacity-style.0.75': '75%',\n\t'opacity-style.1': '100%',\n\t'font-style.draw': 'Draw',\n\t'font-style.sans': 'Sans',\n\t'font-style.serif': 'Serif',\n\t'font-style.mono': 'Mono',\n\t'align-style.start': 'Start',\n\t'align-style.middle': 'Middle',\n\t'align-style.end': 'End',\n\t'align-style.justify': 'Justify',\n\t'verticalAlign-style.start': 'Top',\n\t'verticalAlign-style.middle': 'Middle',\n\t'verticalAlign-style.end': 'Bottom',\n\t'geo-style.arrow-down': 'Arrow down',\n\t'geo-style.arrow-left': 'Arrow left',\n\t'geo-style.arrow-right': 'Arrow right',\n\t'geo-style.arrow-up': 'Arrow up',\n\t'geo-style.cloud': 'Cloud',\n\t'geo-style.diamond': 'Diamond',\n\t'geo-style.ellipse': 'Ellipse',\n\t'geo-style.heart': 'Heart',\n\t'geo-style.hexagon': 'Hexagon',\n\t'geo-style.octagon': 'Octagon',\n\t'geo-style.oval': 'Oval',\n\t'geo-style.pentagon': 'Pentagon',\n\t'geo-style.rectangle': 'Rectangle',\n\t'geo-style.rhombus': 'Rhombus',\n\t'geo-style.star': 'Star',\n\t'geo-style.trapezoid': 'Trapezoid',\n\t'geo-style.triangle': 'Triangle',\n\t'geo-style.x-box': 'X box',\n\t'geo-style.check-box': 'Check box',\n\t'arrowheadStart-style.none': 'None',\n\t'arrowheadStart-style.arrow': 'Arrow',\n\t'arrowheadStart-style.bar': 'Bar',\n\t'arrowheadStart-style.diamond': 'Diamond',\n\t'arrowheadStart-style.dot': 'Dot',\n\t'arrowheadStart-style.inverted': 'Inverted',\n\t'arrowheadStart-style.pipe': 'Pipe',\n\t'arrowheadStart-style.square': 'Square',\n\t'arrowheadStart-style.triangle': 'Triangle',\n\t'arrowheadEnd-style.none': 'None',\n\t'arrowheadEnd-style.arrow': 'Arrow',\n\t'arrowheadEnd-style.bar': 'Bar',\n\t'arrowheadEnd-style.diamond': 'Diamond',\n\t'arrowheadEnd-style.dot': 'Dot',\n\t'arrowheadEnd-style.inverted': 'Inverted',\n\t'arrowheadEnd-style.pipe': 'Pipe',\n\t'arrowheadEnd-style.square': 'Square',\n\t'arrowheadEnd-style.triangle': 'Triangle',\n\t'spline-style.line': 'Line',\n\t'spline-style.cubic': 'Cubic',\n\t'arrow-kind-style.arc': 'Arc',\n\t'arrow-kind-style.elbow': 'Elbow',\n\t'tool.select': 'Select',\n\t'tool.hand': 'Hand',\n\t'tool.draw': 'Draw',\n\t'tool.eraser': 'Eraser',\n\t'tool.arrow-down': 'Arrow down',\n\t'tool.arrow-left': 'Arrow left',\n\t'tool.arrow-right': 'Arrow right',\n\t'tool.arrow-up': 'Arrow up',\n\t'tool.arrow': 'Arrow',\n\t'tool.cloud': 'Cloud',\n\t'tool.diamond': 'Diamond',\n\t'tool.ellipse': 'Ellipse',\n\t'tool.heart': 'Heart',\n\t'tool.hexagon': 'Hexagon',\n\t'tool.highlight': 'Highlight',\n\t'tool.line': 'Line',\n\t'tool.octagon': 'Octagon',\n\t'tool.oval': 'Oval',\n\t'tool.pentagon': 'Pentagon',\n\t'tool.rectangle': 'Rectangle',\n\t'tool.rhombus': 'Rhombus',\n\t'tool.star': 'Star',\n\t'tool.trapezoid': 'Trapezoid',\n\t'tool.triangle': 'Triangle',\n\t'tool.x-box': 'X box',\n\t'tool.check-box': 'Check box',\n\t'tool.media': 'Media',\n\t'tool.frame': 'Frame',\n\t'tool.note': 'Note',\n\t'tool.laser': 'Laser',\n\t'tool.embed': 'Embed',\n\t'tool.text': 'Text',\n\t'tool.pointer-down': 'Pointer down',\n\t'tool.image-zoom': 'Zoom',\n\t'tool.replace-media': 'Replace media',\n\t'tool.flip-horz': 'Flip horizontally',\n\t'tool.flip-vert': 'Flip vertically',\n\t'tool.rotate-cw': 'Rotate',\n\t'tool.aspect-ratio': 'Aspect ratio',\n\t'tool.aspect-ratio.original': 'Original',\n\t'tool.aspect-ratio.square': 'Square (1:1)',\n\t'tool.aspect-ratio.circle': 'Circle (1:1)',\n\t'tool.aspect-ratio.landscape': 'Landscape (4:3)',\n\t'tool.aspect-ratio.portrait': 'Portrait (3:4)',\n\t'tool.aspect-ratio.wide': 'Wide (16:9)',\n\t'tool.image-toolbar-title': 'Image tools',\n\t'tool.image-crop': 'Crop image',\n\t'tool.media-alt-text': 'Alternative text',\n\t'tool.media-alt-text-desc': 'Give a description\u2026',\n\t'tool.media-alt-text-confirm': 'Confirm',\n\t'tool.rich-text-bold': 'Bold',\n\t'tool.rich-text-italic': 'Italic',\n\t'tool.rich-text-code': 'Code',\n\t'tool.rich-text-highlight': 'Highlight',\n\t'tool.rich-text-strikethrough': 'Strikethrough',\n\t'tool.rich-text-link': 'Link',\n\t'tool.rich-text-link-visit': 'Visit link',\n\t'tool.rich-text-link-remove': 'Remove link',\n\t'tool.rich-text-header': 'Header',\n\t'tool.rich-text-bulletList': 'Bulleted list',\n\t'tool.rich-text-toolbar-title': 'Text formatting',\n\t'tool.rich-text-orderedList': 'Ordered list',\n\t'tool.bookmark': 'Bookmark',\n\t'a11y.status': 'Status',\n\t'a11y.skip-to-main-content': 'Move focus to canvas',\n\t'a11y.shape-index': '{num} of {total}',\n\t'a11y.shape-image': 'Image',\n\t'a11y.shape-video': 'Video',\n\t'a11y.multiple-shapes': '{num} shapes selected',\n\t'a11y.select-shape': 'Select next shape',\n\t'a11y.select-shape-direction': 'Select shape in direction',\n\t'a11y.enter-leave-container': 'Enter/leave container',\n\t'a11y.repeat-shape': 'Repeat shape',\n\t'a11y.move-shape': 'Move shape',\n\t'a11y.move-shape-faster': 'Move shape faster',\n\t'a11y.enlarge-shape': 'Enlarge shape',\n\t'a11y.shrink-shape': 'Shrink shape',\n\t'a11y.pan-camera': 'Pan camera',\n\t'a11y.adjust-shape-styles': 'Adjust shape styles',\n\t'a11y.open-context-menu': 'Open context menu',\n\t'menu.title': 'Menu',\n\t'menu.theme': 'Theme',\n\t'menu.copy-as': 'Copy as',\n\t'menu.edit': 'Edit',\n\t'menu.export-as': 'Export as',\n\t'menu.file': 'File',\n\t'menu.language': 'Language',\n\t'menu.preferences': 'Preferences',\n\t'menu.view': 'View',\n\t'context-menu.title': 'Context menu',\n\t'context-menu.edit': 'Edit',\n\t'context-menu.arrange': 'Arrange',\n\t'context-menu.copy-as': 'Copy as',\n\t'context-menu.export-as': 'Export as',\n\t'context-menu.export-all-as': 'Export',\n\t'context-menu.move-to-page': 'Move to page',\n\t'context-menu.reorder': 'Reorder',\n\t'page-menu.title': 'Pages',\n\t'page-menu.create-new-page': 'Create new page',\n\t'page-menu.max-page-count-reached': 'Max pages reached',\n\t'page-menu.new-page-initial-name': 'Page 1',\n\t'page-menu.edit-start': 'Edit',\n\t'page-menu.edit-done': 'Done',\n\t'page-menu.go-to-page': 'Go to page',\n\t'page-menu.submenu.rename': 'Rename',\n\t'page-menu.submenu.duplicate-page': 'Duplicate',\n\t'page-menu.submenu.title': 'Menu',\n\t'page-menu.submenu.move-down': 'Move down',\n\t'page-menu.submenu.move-up': 'Move up',\n\t'page-menu.submenu.delete': 'Delete',\n\t'share-menu.title': 'Share',\n\t'share-menu.save-note': 'Download this project to your computer as a .tldr file.',\n\t'share-menu.fork-note': 'Create a new shared project based on this snapshot.',\n\t'share-menu.share-project': 'Share this project',\n\t'share-menu.copy-link': 'Copy editor link',\n\t'share-menu.create-snapshot-link': 'Copy snapshot link',\n\t'share-menu.snapshot-link-note': 'Capture and share this project as a read-only snapshot link.',\n\t'share-menu.copy-readonly-link': 'Copy viewer link',\n\t'share-menu.offline-note': 'Create a new shared project based on your current project.',\n\t'share-menu.copy-link-note': 'Anyone with the link will be able to view and edit this project.',\n\t'share-menu.copy-readonly-link-note': 'Anyone with the link will be able to access this project.',\n\t'share-menu.project-too-large':\n\t\t'Sorry, this project can\u2019t be shared because it\u2019s too large. We\u2019re working on it!',\n\t'share-menu.upload-failed':\n\t\t'Sorry, we couldn\u2019t upload your project at the moment. Please try again or let us know if the problem persists.',\n\t'share-menu.creating-project': 'Creating the new project\u2026',\n\t'share-menu.copied': 'Copied link',\n\t'document-name-menu.copy-link': 'Copy link',\n\t'status.offline': 'Offline',\n\t'people-menu.title': 'People',\n\t'people-menu.change-name': 'Change name',\n\t'people-menu.avatar-color': 'Avatar color',\n\t'people-menu.change-color': 'Change color',\n\t'people-menu.follow': 'Following',\n\t'people-menu.following': 'Following',\n\t'people-menu.leading': 'Following You',\n\t'people-menu.user': '(You)',\n\t'people-menu.invite': 'Invite others',\n\t'people-menu.anonymous-user': 'New user',\n\t'help-menu.import-tldr-file': 'Import file\u2026',\n\t'help-menu.title': 'Help and resources',\n\t'help-menu.about': 'About tldraw',\n\t'help-menu.discord': 'Discord',\n\t'help-menu.github': 'GitHub',\n\t'help-menu.keyboard-shortcuts': 'Keyboard shortcuts',\n\t'help-menu.twitter': 'Twitter',\n\t'help-menu.terms': 'Terms of service',\n\t'help-menu.privacy': 'Privacy policy',\n\t'actions-menu.title': 'Actions',\n\t'edit-link-dialog.title': 'Edit link',\n\t'edit-link-dialog.invalid-url': 'A link must be a valid URL.',\n\t'edit-link-dialog.detail': 'Links will open in a new tab.',\n\t'edit-link-dialog.url': 'URL',\n\t'edit-link-dialog.clear': 'Clear',\n\t'edit-link-dialog.save': 'Continue',\n\t'edit-link-dialog.cancel': 'Cancel',\n\t'edit-link-dialog.external-link': 'External link',\n\t'embed-dialog.title': 'Insert embed',\n\t'embed-dialog.back': 'Back',\n\t'embed-dialog.create': 'Create',\n\t'embed-dialog.cancel': 'Cancel',\n\t'embed-dialog.url': 'URL',\n\t'embed-dialog.instruction': 'Paste in the site\u2019s URL to create the embed.',\n\t'embed-dialog.invalid-url': 'We could not create an embed from that URL.',\n\t'shortcuts-dialog.title': 'Keyboard shortcuts',\n\t'shortcuts-dialog.edit': 'Edit',\n\t'shortcuts-dialog.file': 'File',\n\t'shortcuts-dialog.preferences': 'Preferences',\n\t'shortcuts-dialog.tools': 'Tools',\n\t'shortcuts-dialog.transform': 'Transform',\n\t'shortcuts-dialog.view': 'View',\n\t'shortcuts-dialog.collaboration': 'Collaboration',\n\t'shortcuts-dialog.a11y': 'Accessibility',\n\t'shortcuts-dialog.text-formatting': 'Text formatting',\n\t'style-panel.title': 'Styles',\n\t'style-panel.align': 'Align',\n\t'style-panel.label-align': 'Label align',\n\t'style-panel.vertical-align': 'Vertical align',\n\t'style-panel.position': 'Position',\n\t'style-panel.arrowheads': 'Arrows',\n\t'style-panel.arrowhead-start': 'Start',\n\t'style-panel.arrowhead-end': 'End',\n\t'style-panel.arrow-kind': 'Line',\n\t'style-panel.color': 'Color',\n\t'style-panel.dash': 'Dash',\n\t'style-panel.fill': 'Fill',\n\t'style-panel.font': 'Font',\n\t'style-panel.geo': 'Shape',\n\t'style-panel.mixed': 'Mixed',\n\t'style-panel.opacity': 'Opacity',\n\t'style-panel.size': 'Size',\n\t'style-panel.spline': 'Spline',\n\t'tool-panel.title': 'Tools',\n\t'tool-panel.more': 'More',\n\t'navigation-zone.title': 'Navigation',\n\t'navigation-zone.minimap': 'Minimap',\n\t'navigation-zone.toggle-minimap': 'Toggle minimap',\n\t'navigation-zone.zoom': 'Zoom',\n\t'focus-mode.toggle-focus-mode': 'Toggle focus mode',\n\t'toast.close': 'Close',\n\t'toast.success': 'Success',\n\t'toast.error': 'Error',\n\t'toast.info': 'Info',\n\t'toast.warning': 'Warning',\n\t'file-system.file-open-error.title': 'Could not open file',\n\t'file-system.file-open-error.not-a-tldraw-file':\n\t\t'The file you tried to open doesn\u2019t look like a tldraw file.',\n\t'file-system.file-open-error.file-format-version-too-new':\n\t\t'The file you tried to open is from a newer version of tldraw. Please reload the page and try again.',\n\t'file-system.file-open-error.generic-corrupted-file': 'The file you tried to open is corrupted.',\n\t'file-system.confirm-open.title': 'Overwrite current project?',\n\t'file-system.confirm-open.description':\n\t\t'Opening a file will replace your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-open.cancel': 'Cancel',\n\t'file-system.confirm-open.open': 'Open file',\n\t'file-system.confirm-open.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.confirm-clear.title': 'Clear current project?',\n\t'file-system.confirm-clear.description':\n\t\t'Creating a new project will clear your current project and any unsaved changes will be lost. Are you sure you want to continue?',\n\t'file-system.confirm-clear.cancel': 'Cancel',\n\t'file-system.confirm-clear.continue': 'Continue',\n\t'file-system.confirm-clear.dont-show-again': 'Don\u2019t ask again',\n\t'file-system.shared-document-file-open-error.title': 'Could not open file',\n\t'file-system.shared-document-file-open-error.description':\n\t\t'Opening files from shared projects is not supported.',\n\t'sharing.confirm-leave.title': 'Leave current project?',\n\t'sharing.confirm-leave.description':\n\t\t'Are you sure you want to leave this shared project? You can return to it by navigating to its URL.',\n\t'sharing.confirm-leave.cancel': 'Cancel',\n\t'sharing.confirm-leave.leave': 'Leave',\n\t'sharing.confirm-leave.dont-show-again': 'Don\u2019t ask again',\n\t'toast.error.export-fail.title': 'Failed export',\n\t'toast.error.export-fail.desc': 'Failed to export image',\n\t'toast.error.copy-fail.title': 'Failed copy',\n\t'toast.error.copy-fail.desc': 'Failed to copy image',\n\t'context.pages.new-page': 'New page',\n\t'vscode.file-open.desc':\n\t\t'We\u2019ve updated this document to work with the current version of tldraw. If you\u2019d like to keep the original version (which will work on old.tldraw.com), click below to create a backup.',\n\t'vscode.file-open.open': 'Continue',\n\t'vscode.file-open.backup': 'Backup',\n\t'vscode.file-open.backup-saved': 'Backup saved',\n\t'vscode.file-open.backup-failed': 'Backup failed: this is not a .tldr file.',\n\t'vscode.file-open.dont-show-again': 'Don\u2019t ask again',\n\t'cursor-chat.type-to-chat': 'Type to chat\u2026',\n\t'app.loading': 'Loading tldraw\u2026',\n\t'handle.resize-top': 'Resize top',\n\t'handle.resize-bottom': 'Resize bottom',\n\t'handle.resize-left': 'Resize left',\n\t'handle.resize-right': 'Resize right',\n\t'handle.resize-top-left': 'Resize top left',\n\t'handle.resize-top-right': 'Resize top right',\n\t'handle.resize-bottom-left': 'Resize bottom left',\n\t'handle.resize-bottom-right': 'Resize bottom right',\n\t'handle.rotate.top_left_rotate': 'Rotate top left',\n\t'handle.rotate.top_right_rotate': 'Rotate top right',\n\t'handle.rotate.bottom_left_rotate': 'Rotate bottom left',\n\t'handle.rotate.bottom_right_rotate': 'Rotate bottom right',\n\t'handle.rotate.mobile_rotate': 'Rotate',\n\t'handle.crop.top': 'Crop top',\n\t'handle.crop.bottom': 'Crop bottom',\n\t'handle.crop.left': 'Crop left',\n\t'handle.crop.right': 'Crop right',\n\t'handle.crop.top-left': 'Crop top left',\n\t'handle.crop.top-right': 'Crop top right',\n\t'handle.crop.bottom-left': 'Crop bottom left',\n\t'handle.crop.bottom-right': 'Crop bottom right',\n\t'ui.close': 'Close',\n\t'ui.checked': 'Checked',\n\t'ui.unchecked': 'Unchecked',\n}\n"],
5
+ "mappings": "AAIO,MAAM,sBAAsB;AAAA,EAClC,8BAA8B;AAAA,EAC9B,2BAA2B;AAAA,EAC3B,0BAA0B;AAAA,EAC1B,uBAAuB;AAAA,EACvB,kCAAkC;AAAA,EAClC,gCAAgC;AAAA,EAChC,wCAAwC;AAAA,EACxC,sCAAsC;AAAA,EACtC,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,sCAAsC;AAAA,EACtC,oCAAoC;AAAA,EACpC,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,kCAAk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AAAA,EACpB,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AACjB;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,10 @@
1
1
  import { tlenv } from "@tldraw/editor";
2
2
  const cmdKey = tlenv.isDarwin ? "\u2318" : "__CTRL__";
3
- const ctrlKey = tlenv.isDarwin ? "\u2303" : "__CTRL__";
4
3
  const altKey = tlenv.isDarwin ? "\u2325" : "__ALT__";
5
4
  function kbd(str) {
6
5
  if (str === ",") return [","];
7
6
  return str.split(",")[0].split(/(\[\[[^\]]+\]\])/g).map(
8
- (s) => s.startsWith("[[") ? s.replace(/[[\]]/g, "") : s.replace(/cmd\+/g, cmdKey).replace(/ctrl\+/g, ctrlKey).replace(/alt\+/g, altKey).replace(/shift\+/g, "\u21E7").replace(/\$/g, cmdKey).replace(/\?/g, altKey).replace(/!/g, "\u21E7").match(/__CTRL__|__ALT__|./g) || []
7
+ (s) => s.startsWith("[[") ? s.replace(/[[\]]/g, "") : s.replace(/cmd\+/g, cmdKey).replace(/ctrl\+/g, cmdKey).replace(/alt\+/g, altKey).replace(/shift\+/g, "\u21E7").replace(/\$/g, cmdKey).replace(/\?/g, altKey).replace(/!/g, "\u21E7").match(/__CTRL__|__ALT__|./g) || []
9
8
  ).flat().map((sub, index) => {
10
9
  if (sub === "__CTRL__") return "Ctrl";
11
10
  if (sub === "__ALT__") return "Alt";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/kbd-utils.ts"],
4
- "sourcesContent": ["import { tlenv } from '@tldraw/editor'\n\n// N.B. We rework these Windows placeholders down below.\nconst cmdKey = tlenv.isDarwin ? '\u2318' : '__CTRL__'\nconst ctrlKey = tlenv.isDarwin ? '\u2303' : '__CTRL__'\nconst altKey = tlenv.isDarwin ? '\u2325' : '__ALT__'\n\n/** @public */\nexport function kbd(str: string) {\n\tif (str === ',') return [',']\n\n\treturn (\n\t\tstr\n\t\t\t.split(',')[0]\n\t\t\t// If the string contains [[Tab]], we don't split these up\n\t\t\t// as they're meant to be atomic.\n\t\t\t.split(/(\\[\\[[^\\]]+\\]\\])/g)\n\t\t\t.map((s) =>\n\t\t\t\ts.startsWith('[[')\n\t\t\t\t\t? s.replace(/[[\\]]/g, '')\n\t\t\t\t\t: s\n\t\t\t\t\t\t\t.replace(/cmd\\+/g, cmdKey)\n\t\t\t\t\t\t\t.replace(/ctrl\\+/g, ctrlKey)\n\t\t\t\t\t\t\t.replace(/alt\\+/g, altKey)\n\t\t\t\t\t\t\t.replace(/shift\\+/g, '\u21E7')\n\t\t\t\t\t\t\t// Backwards compatibility with the old system.\n\t\t\t\t\t\t\t.replace(/\\$/g, cmdKey)\n\t\t\t\t\t\t\t.replace(/\\?/g, altKey)\n\t\t\t\t\t\t\t.replace(/!/g, '\u21E7')\n\t\t\t\t\t\t\t.match(/__CTRL__|__ALT__|./g) || []\n\t\t\t)\n\t\t\t.flat()\n\t\t\t.map((sub, index) => {\n\t\t\t\tif (sub === '__CTRL__') return 'Ctrl'\n\t\t\t\tif (sub === '__ALT__') return 'Alt'\n\t\t\t\tconst modifiedKey = sub[0].toUpperCase() + sub.slice(1)\n\t\t\t\treturn tlenv.isDarwin || !index ? modifiedKey : ['+', modifiedKey]\n\t\t\t})\n\t\t\t.flat()\n\t)\n}\n\n/** @public */\nexport function kbdStr(str: string) {\n\treturn '\u2014 ' + kbd(str).join('\u2009')\n}\n"],
5
- "mappings": "AAAA,SAAS,aAAa;AAGtB,MAAM,SAAS,MAAM,WAAW,WAAM;AACtC,MAAM,UAAU,MAAM,WAAW,WAAM;AACvC,MAAM,SAAS,MAAM,WAAW,WAAM;AAG/B,SAAS,IAAI,KAAa;AAChC,MAAI,QAAQ,IAAK,QAAO,CAAC,GAAG;AAE5B,SACC,IACE,MAAM,GAAG,EAAE,CAAC,EAGZ,MAAM,mBAAmB,EACzB;AAAA,IAAI,CAAC,MACL,EAAE,WAAW,IAAI,IACd,EAAE,QAAQ,UAAU,EAAE,IACtB,EACC,QAAQ,UAAU,MAAM,EACxB,QAAQ,WAAW,OAAO,EAC1B,QAAQ,UAAU,MAAM,EACxB,QAAQ,YAAY,QAAG,EAEvB,QAAQ,OAAO,MAAM,EACrB,QAAQ,OAAO,MAAM,EACrB,QAAQ,MAAM,QAAG,EACjB,MAAM,qBAAqB,KAAK,CAAC;AAAA,EACtC,EACC,KAAK,EACL,IAAI,CAAC,KAAK,UAAU;AACpB,QAAI,QAAQ,WAAY,QAAO;AAC/B,QAAI,QAAQ,UAAW,QAAO;AAC9B,UAAM,cAAc,IAAI,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AACtD,WAAO,MAAM,YAAY,CAAC,QAAQ,cAAc,CAAC,KAAK,WAAW;AAAA,EAClE,CAAC,EACA,KAAK;AAET;AAGO,SAAS,OAAO,KAAa;AACnC,SAAO,YAAO,IAAI,GAAG,EAAE,KAAK,QAAG;AAChC;",
4
+ "sourcesContent": ["import { tlenv } from '@tldraw/editor'\n\n// N.B. We rework these Windows placeholders down below.\nconst cmdKey = tlenv.isDarwin ? '\u2318' : '__CTRL__'\nconst altKey = tlenv.isDarwin ? '\u2325' : '__ALT__'\n\n/** @public */\nexport function kbd(str: string) {\n\tif (str === ',') return [',']\n\n\treturn (\n\t\tstr\n\t\t\t.split(',')[0]\n\t\t\t// If the string contains [[Tab]], we don't split these up\n\t\t\t// as they're meant to be atomic.\n\t\t\t.split(/(\\[\\[[^\\]]+\\]\\])/g)\n\t\t\t.map((s) =>\n\t\t\t\ts.startsWith('[[')\n\t\t\t\t\t? s.replace(/[[\\]]/g, '')\n\t\t\t\t\t: s\n\t\t\t\t\t\t\t.replace(/cmd\\+/g, cmdKey)\n\t\t\t\t\t\t\t.replace(/ctrl\\+/g, cmdKey)\n\t\t\t\t\t\t\t.replace(/alt\\+/g, altKey)\n\t\t\t\t\t\t\t.replace(/shift\\+/g, '\u21E7')\n\t\t\t\t\t\t\t// Backwards compatibility with the old system.\n\t\t\t\t\t\t\t.replace(/\\$/g, cmdKey)\n\t\t\t\t\t\t\t.replace(/\\?/g, altKey)\n\t\t\t\t\t\t\t.replace(/!/g, '\u21E7')\n\t\t\t\t\t\t\t.match(/__CTRL__|__ALT__|./g) || []\n\t\t\t)\n\t\t\t.flat()\n\t\t\t.map((sub, index) => {\n\t\t\t\tif (sub === '__CTRL__') return 'Ctrl'\n\t\t\t\tif (sub === '__ALT__') return 'Alt'\n\t\t\t\tconst modifiedKey = sub[0].toUpperCase() + sub.slice(1)\n\t\t\t\treturn tlenv.isDarwin || !index ? modifiedKey : ['+', modifiedKey]\n\t\t\t})\n\t\t\t.flat()\n\t)\n}\n\n/** @public */\nexport function kbdStr(str: string) {\n\treturn '\u2014 ' + kbd(str).join('\u2009')\n}\n"],
5
+ "mappings": "AAAA,SAAS,aAAa;AAGtB,MAAM,SAAS,MAAM,WAAW,WAAM;AACtC,MAAM,SAAS,MAAM,WAAW,WAAM;AAG/B,SAAS,IAAI,KAAa;AAChC,MAAI,QAAQ,IAAK,QAAO,CAAC,GAAG;AAE5B,SACC,IACE,MAAM,GAAG,EAAE,CAAC,EAGZ,MAAM,mBAAmB,EACzB;AAAA,IAAI,CAAC,MACL,EAAE,WAAW,IAAI,IACd,EAAE,QAAQ,UAAU,EAAE,IACtB,EACC,QAAQ,UAAU,MAAM,EACxB,QAAQ,WAAW,MAAM,EACzB,QAAQ,UAAU,MAAM,EACxB,QAAQ,YAAY,QAAG,EAEvB,QAAQ,OAAO,MAAM,EACrB,QAAQ,OAAO,MAAM,EACrB,QAAQ,MAAM,QAAG,EACjB,MAAM,qBAAqB,KAAK,CAAC;AAAA,EACtC,EACC,KAAK,EACL,IAAI,CAAC,KAAK,UAAU;AACpB,QAAI,QAAQ,WAAY,QAAO;AAC/B,QAAI,QAAQ,UAAW,QAAO;AAC9B,UAAM,cAAc,IAAI,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AACtD,WAAO,MAAM,YAAY,CAAC,QAAQ,cAAc,CAAC,KAAK,WAAW;AAAA,EAClE,CAAC,EACA,KAAK;AAET;AAGO,SAAS,OAAO,KAAa;AACnC,SAAO,YAAO,IAAI,GAAG,EAAE,KAAK,QAAG;AAChC;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
- const version = "3.16.0-internal.51e99e128bd4";
1
+ const version = "3.16.0-internal.a478398270c6";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-08-19T10:06:54.740Z",
5
- patch: "2025-08-19T10:06:54.740Z"
4
+ minor: "2025-08-19T10:21:26.717Z",
5
+ patch: "2025-08-19T10:21:26.717Z"
6
6
  };
7
7
  export {
8
8
  publishDates,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '3.16.0-internal.51e99e128bd4'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-08-19T10:06:54.740Z',\n\tpatch: '2025-08-19T10:06:54.740Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '3.16.0-internal.a478398270c6'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-08-19T10:21:26.717Z',\n\tpatch: '2025-08-19T10:21:26.717Z',\n}\n"],
5
5
  "mappings": "AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -170,7 +170,7 @@ async function putExcalidrawContent(editor, excalidrawClipboardContent, point) {
170
170
  ...base,
171
171
  type: "arrow",
172
172
  props: {
173
- richText: toRichText(text),
173
+ text,
174
174
  kind: element.elbowed ? "elbow" : "arc",
175
175
  bend: getBend(element, start, end),
176
176
  dash: getDash(element),