tldraw 3.16.0-internal.a478398270c6 → 3.16.0-internal.f8b97f0c414f

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 (656) hide show
  1. package/dist-cjs/index.d.ts +471 -130
  2. package/dist-cjs/index.js +58 -15
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/Tldraw.js +12 -2
  5. package/dist-cjs/lib/Tldraw.js.map +2 -2
  6. package/dist-cjs/lib/TldrawImage.js +5 -2
  7. package/dist-cjs/lib/TldrawImage.js.map +3 -3
  8. package/dist-cjs/lib/canvas/TldrawCropHandles.js +1 -1
  9. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
  10. package/dist-cjs/lib/canvas/TldrawHandles.js +1 -1
  11. package/dist-cjs/lib/canvas/TldrawHandles.js.map +2 -2
  12. package/dist-cjs/lib/canvas/TldrawOverlays.js +1 -1
  13. package/dist-cjs/lib/canvas/TldrawOverlays.js.map +2 -2
  14. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  15. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  16. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +279 -271
  17. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
  18. package/dist-cjs/lib/defaultExternalContentHandlers.js +6 -4
  19. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  20. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +27 -44
  21. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  22. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +22 -4
  23. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
  24. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  25. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  26. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  27. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  28. package/dist-cjs/lib/shapes/arrow/elbow/elbowArrowSnapLines.js.map +1 -1
  29. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +3 -0
  30. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  31. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
  32. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  33. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -6
  34. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  35. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  36. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  37. package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +1 -1
  38. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +25 -18
  39. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  40. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  41. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  42. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +2 -2
  43. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
  44. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +3 -2
  45. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  47. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  48. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -4
  49. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  50. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +6 -3
  51. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
  52. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +20 -5
  53. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  54. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +8 -6
  55. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  56. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
  57. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  58. package/dist-cjs/lib/shapes/shared/PathBuilder.js +21 -3
  59. package/dist-cjs/lib/shapes/shared/PathBuilder.js.map +2 -2
  60. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +2 -3
  61. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
  62. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +5 -2
  63. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
  64. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  65. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  66. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js +4 -3
  67. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js.map +2 -2
  68. package/dist-cjs/lib/shapes/shared/crop.js +1 -0
  69. package/dist-cjs/lib/shapes/shared/crop.js.map +2 -2
  70. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  71. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -4
  72. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
  73. package/dist-cjs/lib/shapes/shared/useEditableRichText.js.map +2 -2
  74. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
  75. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  76. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +10 -1
  77. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  78. package/dist-cjs/lib/shapes/text/PlainTextArea.js +2 -2
  79. package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
  80. package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
  81. package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
  82. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +7 -13
  83. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  84. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  85. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  86. package/dist-cjs/lib/styles.js.map +2 -2
  87. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  88. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  89. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  90. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  91. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +7 -1
  92. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
  93. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +43 -22
  94. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  95. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +2 -15
  96. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  97. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +5 -0
  98. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  99. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +8 -0
  100. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  101. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +8 -0
  102. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  103. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +8 -0
  104. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  105. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  106. package/dist-cjs/lib/ui/TldrawUi.js +27 -12
  107. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  108. package/dist-cjs/lib/ui/components/A11y.js +15 -13
  109. package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
  110. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +35 -0
  111. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +7 -0
  112. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  113. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  114. package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
  115. package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
  116. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  117. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  118. package/dist-cjs/lib/ui/components/EditLinkDialog.js +11 -1
  119. package/dist-cjs/lib/ui/components/EditLinkDialog.js.map +2 -2
  120. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +57 -7
  121. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
  122. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +3 -2
  123. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  124. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  125. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  126. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  127. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  128. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +4 -5
  129. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  130. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +3 -2
  131. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  132. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  133. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  134. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  135. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  136. package/dist-cjs/lib/ui/components/Spinner.js +2 -25
  137. package/dist-cjs/lib/ui/components/Spinner.js.map +2 -2
  138. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +11 -4
  139. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  140. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +249 -278
  141. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  142. package/dist-cjs/lib/ui/components/{primitives/TldrawUiButtonPicker.js → StylePanel/StylePanelButtonPicker.js} +52 -54
  143. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
  144. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
  145. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
  146. package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +26 -25
  147. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
  148. package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +47 -43
  149. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
  150. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
  151. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
  152. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +3 -2
  153. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
  154. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +21 -7
  155. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +3 -3
  156. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +39 -10
  157. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  158. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  159. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  160. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
  161. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
  162. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +3 -3
  163. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
  164. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  165. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  166. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +5 -4
  167. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  168. package/dist-cjs/lib/ui/components/menu-items.js +22 -0
  169. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  170. package/dist-cjs/lib/ui/components/primitives/Button/TldrawUiButtonIcon.js.map +2 -2
  171. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +11 -2
  172. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  173. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js +1 -1
  174. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js.map +2 -2
  175. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js +35 -1
  176. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js.map +2 -2
  177. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +2 -2
  178. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
  179. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  180. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  181. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +23 -6
  182. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  183. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +33 -7
  184. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  185. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +294 -0
  186. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +7 -0
  187. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  188. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  189. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
  190. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  191. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  192. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  193. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +154 -22
  194. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  195. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +3 -2
  196. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  197. package/dist-cjs/lib/ui/context/actions.js +79 -17
  198. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  199. package/dist-cjs/lib/ui/context/components.js +2 -0
  200. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  201. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  202. package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
  203. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
  204. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  205. package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
  206. package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
  207. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
  208. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  209. package/dist-cjs/lib/ui/hooks/useTools.js +94 -9
  210. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  211. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  212. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +13 -0
  213. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  214. package/dist-cjs/lib/ui/kbd-utils.js +11 -4
  215. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  216. package/dist-cjs/lib/ui/version.js +3 -3
  217. package/dist-cjs/lib/ui/version.js.map +1 -1
  218. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +1 -1
  219. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  220. package/dist-cjs/lib/utils/export/copyAs.js +1 -2
  221. package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
  222. package/dist-cjs/lib/utils/export/export.js +0 -20
  223. package/dist-cjs/lib/utils/export/export.js.map +2 -2
  224. package/dist-cjs/lib/utils/export/exportAs.js +1 -2
  225. package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
  226. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +3 -2
  227. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  228. package/dist-esm/index.d.mts +471 -130
  229. package/dist-esm/index.mjs +107 -32
  230. package/dist-esm/index.mjs.map +2 -2
  231. package/dist-esm/lib/Tldraw.mjs +14 -4
  232. package/dist-esm/lib/Tldraw.mjs.map +2 -2
  233. package/dist-esm/lib/TldrawImage.mjs +5 -2
  234. package/dist-esm/lib/TldrawImage.mjs.map +2 -2
  235. package/dist-esm/lib/canvas/TldrawCropHandles.mjs +1 -1
  236. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
  237. package/dist-esm/lib/canvas/TldrawHandles.mjs +1 -1
  238. package/dist-esm/lib/canvas/TldrawHandles.mjs.map +2 -2
  239. package/dist-esm/lib/canvas/TldrawOverlays.mjs +1 -1
  240. package/dist-esm/lib/canvas/TldrawOverlays.mjs.map +2 -2
  241. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  242. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  243. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +279 -271
  244. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
  245. package/dist-esm/lib/defaultExternalContentHandlers.mjs +6 -4
  246. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  247. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +30 -44
  248. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  249. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +25 -5
  250. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
  251. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  252. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  253. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  254. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  255. package/dist-esm/lib/shapes/arrow/elbow/elbowArrowSnapLines.mjs.map +1 -1
  256. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +3 -0
  257. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  258. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +5 -5
  259. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  260. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -6
  261. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  262. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  263. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  264. package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +1 -1
  265. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +26 -18
  266. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  267. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  268. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  269. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +3 -3
  270. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
  271. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +4 -2
  272. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  273. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  274. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  275. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -4
  276. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  277. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +6 -3
  278. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
  279. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +21 -5
  280. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  281. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +9 -6
  282. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  283. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
  284. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  285. package/dist-esm/lib/shapes/shared/PathBuilder.mjs +22 -3
  286. package/dist-esm/lib/shapes/shared/PathBuilder.mjs.map +2 -2
  287. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +2 -3
  288. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  289. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +5 -2
  290. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  291. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  292. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  293. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs +4 -3
  294. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs.map +2 -2
  295. package/dist-esm/lib/shapes/shared/crop.mjs +1 -0
  296. package/dist-esm/lib/shapes/shared/crop.mjs.map +2 -2
  297. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  298. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +4 -5
  299. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
  300. package/dist-esm/lib/shapes/shared/useEditableRichText.mjs.map +2 -2
  301. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
  302. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  303. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +10 -1
  304. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  305. package/dist-esm/lib/shapes/text/PlainTextArea.mjs +3 -3
  306. package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
  307. package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
  308. package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
  309. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +8 -13
  310. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  311. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  312. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  313. package/dist-esm/lib/styles.mjs.map +2 -2
  314. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  315. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  316. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  317. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  318. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +7 -1
  319. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
  320. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +43 -22
  321. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  322. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +2 -15
  323. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  324. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +5 -0
  325. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  326. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +8 -0
  327. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  328. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +8 -0
  329. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  330. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +8 -0
  331. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  332. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  333. package/dist-esm/lib/ui/TldrawUi.mjs +29 -14
  334. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  335. package/dist-esm/lib/ui/components/A11y.mjs +16 -14
  336. package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
  337. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +19 -0
  338. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +7 -0
  339. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  340. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  341. package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
  342. package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
  343. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  344. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  345. package/dist-esm/lib/ui/components/EditLinkDialog.mjs +11 -1
  346. package/dist-esm/lib/ui/components/EditLinkDialog.mjs.map +2 -2
  347. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +57 -7
  348. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
  349. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -3
  350. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  351. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  352. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  353. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  354. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  355. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +4 -5
  356. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  357. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +4 -3
  358. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  359. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  360. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  361. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  362. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  363. package/dist-esm/lib/ui/components/Spinner.mjs +3 -26
  364. package/dist-esm/lib/ui/components/Spinner.mjs.map +2 -2
  365. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +16 -5
  366. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  367. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +251 -282
  368. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  369. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +126 -0
  370. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
  371. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
  372. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
  373. package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +23 -22
  374. package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
  375. package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +44 -40
  376. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
  377. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
  378. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
  379. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +3 -2
  380. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
  381. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +23 -9
  382. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +3 -3
  383. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +39 -10
  384. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  385. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  386. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  387. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
  388. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
  389. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +3 -3
  390. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
  391. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  392. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  393. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +5 -4
  394. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  395. package/dist-esm/lib/ui/components/menu-items.mjs +22 -0
  396. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  397. package/dist-esm/lib/ui/components/primitives/Button/TldrawUiButtonIcon.mjs.map +2 -2
  398. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +12 -3
  399. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  400. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs +1 -1
  401. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs.map +2 -2
  402. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs +36 -2
  403. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs.map +2 -2
  404. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +3 -3
  405. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
  406. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  407. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  408. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +23 -6
  409. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  410. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +33 -7
  411. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  412. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +272 -0
  413. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +7 -0
  414. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  415. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  416. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
  417. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  418. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  419. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  420. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +162 -24
  421. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  422. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +3 -2
  423. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  424. package/dist-esm/lib/ui/context/actions.mjs +79 -17
  425. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  426. package/dist-esm/lib/ui/context/components.mjs +2 -0
  427. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  428. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  429. package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
  430. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -2
  431. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  432. package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
  433. package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
  434. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
  435. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  436. package/dist-esm/lib/ui/hooks/useTools.mjs +102 -10
  437. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  438. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +13 -0
  439. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  440. package/dist-esm/lib/ui/kbd-utils.mjs +11 -4
  441. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  442. package/dist-esm/lib/ui/version.mjs +3 -3
  443. package/dist-esm/lib/ui/version.mjs.map +1 -1
  444. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +1 -1
  445. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  446. package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
  447. package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
  448. package/dist-esm/lib/utils/export/export.mjs +0 -20
  449. package/dist-esm/lib/utils/export/export.mjs.map +2 -2
  450. package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
  451. package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
  452. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +3 -2
  453. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  454. package/package.json +12 -34
  455. package/src/index.ts +80 -24
  456. package/src/lib/Tldraw.tsx +15 -2
  457. package/src/lib/TldrawImage.tsx +6 -2
  458. package/src/lib/canvas/TldrawCropHandles.tsx +3 -1
  459. package/src/lib/canvas/TldrawHandles.tsx +5 -1
  460. package/src/lib/canvas/TldrawOverlays.tsx +1 -1
  461. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  462. package/src/lib/canvas/TldrawSelectionForeground.tsx +5 -1
  463. package/src/lib/defaultExternalContentHandlers.ts +14 -5
  464. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +2 -1
  465. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +6 -5
  466. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +53 -11
  467. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +30 -46
  468. package/src/lib/shapes/arrow/arrowLabel.ts +31 -3
  469. package/src/lib/shapes/arrow/arrowTargetState.ts +3 -2
  470. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  471. package/src/lib/shapes/arrow/elbow/elbowArrowSnapLines.tsx +2 -2
  472. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +3 -0
  473. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +5 -5
  474. package/src/lib/shapes/draw/DrawShapeTool.test.ts +0 -5
  475. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -7
  476. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  477. package/src/lib/shapes/frame/FrameShapeTool.ts +1 -1
  478. package/src/lib/shapes/frame/FrameShapeUtil.tsx +35 -21
  479. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  480. package/src/lib/shapes/frame/components/FrameLabelInput.tsx +3 -3
  481. package/src/lib/shapes/geo/GeoShapeUtil.tsx +4 -2
  482. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  483. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -4
  484. package/src/lib/shapes/image/ImageShapeUtil.tsx +6 -3
  485. package/src/lib/shapes/line/LineShapeUtil.test.tsx +8 -7
  486. package/src/lib/shapes/line/LineShapeUtil.tsx +25 -6
  487. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
  488. package/src/lib/shapes/note/NoteShapeTool.test.ts +2 -1
  489. package/src/lib/shapes/note/NoteShapeUtil.tsx +11 -4
  490. package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
  491. package/src/lib/shapes/shared/PathBuilder.test.tsx +1 -1
  492. package/src/lib/shapes/shared/PathBuilder.tsx +35 -1
  493. package/src/lib/shapes/shared/PlainTextLabel.tsx +3 -7
  494. package/src/lib/shapes/shared/RichTextLabel.tsx +6 -1
  495. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  496. package/src/lib/shapes/shared/SvgTextLabel.tsx +4 -2
  497. package/src/lib/shapes/shared/crop.ts +1 -0
  498. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  499. package/src/lib/shapes/shared/useEditablePlainText.ts +12 -12
  500. package/src/lib/shapes/shared/useEditableRichText.ts +7 -3
  501. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
  502. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +11 -1
  503. package/src/lib/shapes/text/PlainTextArea.tsx +3 -3
  504. package/src/lib/shapes/text/RichTextArea.tsx +3 -4
  505. package/src/lib/shapes/text/TextShapeTool.test.ts +6 -5
  506. package/src/lib/shapes/text/TextShapeUtil.tsx +8 -14
  507. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  508. package/src/lib/styles.tsx +3 -1
  509. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  510. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  511. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +8 -1
  512. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +54 -30
  513. package/src/lib/tools/SelectTool/childStates/Idle.ts +2 -24
  514. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +7 -0
  515. package/src/lib/tools/SelectTool/childStates/Resizing.ts +12 -1
  516. package/src/lib/tools/SelectTool/childStates/Rotating.ts +11 -0
  517. package/src/lib/tools/SelectTool/childStates/Translating.ts +11 -1
  518. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -0
  519. package/src/lib/ui/TldrawUi.tsx +33 -12
  520. package/src/lib/ui/components/A11y.tsx +17 -15
  521. package/src/lib/ui/components/AccessibilityMenu.tsx +20 -0
  522. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  523. package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
  524. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  525. package/src/lib/ui/components/EditLinkDialog.tsx +16 -6
  526. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +46 -6
  527. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -2
  528. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  529. package/src/lib/ui/components/MobileStylePanel.tsx +9 -6
  530. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +4 -5
  531. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +5 -4
  532. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +4 -3
  533. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  534. package/src/lib/ui/components/Spinner.tsx +2 -24
  535. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +28 -12
  536. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +261 -342
  537. package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +66 -48
  538. package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
  539. package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +31 -22
  540. package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
  541. package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
  542. package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +5 -4
  543. package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +25 -9
  544. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +33 -16
  545. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  546. package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
  547. package/src/lib/ui/components/Toolbar/LinkEditor.tsx +5 -5
  548. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  549. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +17 -12
  550. package/src/lib/ui/components/menu-items.tsx +25 -0
  551. package/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx +2 -2
  552. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +8 -3
  553. package/src/lib/ui/components/primitives/TldrawUiDialog.tsx +1 -1
  554. package/src/lib/ui/components/primitives/TldrawUiIcon.tsx +41 -3
  555. package/src/lib/ui/components/primitives/TldrawUiInput.tsx +3 -3
  556. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  557. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +54 -29
  558. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +59 -12
  559. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +365 -0
  560. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  561. package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +2 -2
  562. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  563. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  564. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +224 -23
  565. package/src/lib/ui/context/TldrawUiContextProvider.tsx +23 -20
  566. package/src/lib/ui/context/actions.tsx +81 -18
  567. package/src/lib/ui/context/components.tsx +3 -0
  568. package/src/lib/ui/context/events.tsx +7 -3
  569. package/src/lib/ui/hooks/menu-hooks.ts +1 -0
  570. package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
  571. package/src/lib/ui/hooks/useExportAs.ts +3 -2
  572. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +3 -2
  573. package/src/lib/ui/hooks/useTools.tsx +142 -11
  574. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +13 -0
  575. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +13 -0
  576. package/src/lib/ui/kbd-utils.ts +12 -4
  577. package/src/lib/ui/version.ts +3 -3
  578. package/src/lib/ui.css +432 -315
  579. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +21 -7
  580. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +7 -7
  581. package/src/lib/utils/export/copyAs.ts +1 -24
  582. package/src/lib/utils/export/export.ts +0 -36
  583. package/src/lib/utils/export/exportAs.ts +1 -32
  584. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +28 -7
  585. package/src/lib/utils/tldr/buildFromV1Document.ts +2 -1
  586. package/src/test/A11y.test.tsx +3 -2
  587. package/src/test/ClickManager.test.ts +7 -6
  588. package/src/test/Editor.test.tsx +56 -28
  589. package/src/test/EraserTool.test.ts +184 -13
  590. package/src/test/HandTool.test.ts +10 -9
  591. package/src/test/HighlightShape.test.ts +2 -1
  592. package/src/test/SelectTool.test.ts +40 -13
  593. package/src/test/TLUserPreferences.test.ts +4 -3
  594. package/src/test/TestEditor.ts +13 -15
  595. package/src/test/TldrawEditor.test.tsx +26 -19
  596. package/src/test/ZoomTool.test.ts +7 -6
  597. package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
  598. package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
  599. package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
  600. package/src/test/arrows-megabus.test.tsx +17 -10
  601. package/src/test/bindings.test.tsx +24 -37
  602. package/src/test/bookmark-shapes.test.ts +1 -8
  603. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +23 -7
  604. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
  605. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
  606. package/src/test/commands/alignShapes.test.tsx +25 -24
  607. package/src/test/commands/animationSpeed.test.ts +2 -1
  608. package/src/test/commands/centerOnPoint.test.ts +3 -2
  609. package/src/test/commands/clipboard.test.ts +3 -2
  610. package/src/test/commands/createShapes.test.ts +2 -1
  611. package/src/test/commands/deletePage.test.ts +84 -1
  612. package/src/test/commands/deleteShapes.test.ts +2 -1
  613. package/src/test/commands/distributeShapes.test.tsx +11 -10
  614. package/src/test/commands/getSvgString.test.ts +2 -1
  615. package/src/test/commands/packShapes.test.ts +5 -4
  616. package/src/test/commands/putContent.test.ts +1 -0
  617. package/src/test/commands/resizeShape.test.ts +2 -1
  618. package/src/test/commands/rotateShapes.test.ts +7 -6
  619. package/src/test/commands/setCamera.test.ts +4 -3
  620. package/src/test/commands/setCurrentPage.test.ts +3 -2
  621. package/src/test/commands/stackShapes.test.ts +11 -10
  622. package/src/test/commands/stretch.test.tsx +13 -12
  623. package/src/test/commands/updateShapes.test.ts +9 -5
  624. package/src/test/createDeepLink.test.tsx +2 -1
  625. package/src/test/cropping.test.ts +3 -2
  626. package/src/test/custom-clipping.test.ts +442 -0
  627. package/src/test/customSnapping.test.tsx +55 -41
  628. package/src/test/drawing.test.ts +2 -1
  629. package/src/test/flipShapes.test.ts +4 -3
  630. package/src/test/frames.test.ts +25 -24
  631. package/src/test/getCulledShapes.test.tsx +80 -4
  632. package/src/test/groups.test.tsx +6 -4
  633. package/src/test/handleDeepLink.test.tsx +2 -1
  634. package/src/test/inner-outer-margin.test.ts +315 -0
  635. package/src/test/maxShapes.test.ts +3 -2
  636. package/src/test/modifiers.test.ts +5 -4
  637. package/src/test/navigation.test.ts +264 -9
  638. package/src/test/panning.test.ts +2 -1
  639. package/src/test/perf/perf.test.ts +2 -1
  640. package/src/test/registerDeepLinkListener.test.tsx +10 -9
  641. package/src/test/resizing.test.ts +39 -38
  642. package/src/test/select.test.tsx +4 -3
  643. package/src/test/selection-omnibus.test.ts +11 -10
  644. package/src/test/shapeutils.test.ts +398 -48
  645. package/src/test/translating.test.ts +12 -11
  646. package/tldraw.css +759 -630
  647. package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
  648. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
  649. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
  650. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
  651. package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
  652. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
  653. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
  654. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +0 -113
  655. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
  656. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -109
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/ui/hooks/useTools.tsx"],
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,kBAAkB,sBAAsB;AACzD,YAAY,WAAW;AACvB,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAA0B,mBAAmB;AAE7C,SAA8B,yBAAyB;AAEvD,SAAS,sBAAsB;AA8BxB,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;AAElC,QAAM,eAAe,MAAM;AAAA,IAC1B,CACC,QACA,MACA,OACI;AACJ,WAAK,SAAS,EAAE,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;AACtC,iBAAW,eAAe,EAAE,QAAQ,IAAI,MAAM,KAAK,GAAG,CAAC;AAAA,IACxD;AAAA,IACA,CAAC,MAAM,KAAK,UAAU;AAAA,EACvB;AAEA,QAA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eGeoStyle,\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: 200 }, 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\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AAI,WAAW;AACd,aAAO,UAAU,QAAQA,QAAO,OAAO;AAAA,IACxC;AAEA,WAAOA;AAAA,EACR,GAAG,CAAC,WAAW,QAAQ,SAAS,cAAc,UAAU,CAAC;AAEzD,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;AAuBO,SAAS,+BACf,QACA,MACA,MACC;AACD,QAAM,EAAE,GAAG,EAAE,IAAI,OAAO,OAAO;AAE/B,QAAM,gBAAgB,OAAO,yBAAyB,iBAAiB;AACvE,SAAO,eAAe,oBAAoB;AAE1C,QAAM,KAAK,cAAc;AACzB,OAAK,YAAY,EAAE;AACnB,QAAM,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;",
6
6
  "names": ["tools"]
7
7
  }
@@ -51,6 +51,7 @@ 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",
54
55
  "action.open-file": "Open file",
55
56
  "action.pack": "Pack",
56
57
  "action.paste": "Paste",
@@ -86,6 +87,10 @@ const DEFAULT_TRANSLATION = {
86
87
  "action.toggle-wrap-mode": "Toggle Select on wrap",
87
88
  "action.toggle-reduce-motion.menu": "Reduce motion",
88
89
  "action.toggle-reduce-motion": "Toggle reduce motion",
90
+ "action.toggle-keyboard-shortcuts.menu": "Enable keyboard shortcuts",
91
+ "action.toggle-keyboard-shortcuts": "Toggle keyboard shortcuts",
92
+ "action.toggle-ui-labels.menu": "Enable UI labels",
93
+ "action.toggle-ui-labels": "Toggle UI labels",
89
94
  "action.toggle-edge-scrolling.menu": "Edge scrolling",
90
95
  "action.toggle-edge-scrolling": "Toggle edge scrolling",
91
96
  "action.toggle-debug-mode.menu": "Debug mode",
@@ -177,6 +182,7 @@ const DEFAULT_TRANSLATION = {
177
182
  "geo-style.pentagon": "Pentagon",
178
183
  "geo-style.rectangle": "Rectangle",
179
184
  "geo-style.rhombus": "Rhombus",
185
+ "geo-style.rhombus-2": "Rhombus left",
180
186
  "geo-style.star": "Star",
181
187
  "geo-style.trapezoid": "Trapezoid",
182
188
  "geo-style.triangle": "Triangle",
@@ -251,6 +257,7 @@ const DEFAULT_TRANSLATION = {
251
257
  "tool.aspect-ratio.wide": "Wide (16:9)",
252
258
  "tool.image-toolbar-title": "Image tools",
253
259
  "tool.image-crop": "Crop image",
260
+ "tool.image-crop-confirm": "Confirm",
254
261
  "tool.media-alt-text": "Alternative text",
255
262
  "tool.media-alt-text-desc": "Give a description\u2026",
256
263
  "tool.media-alt-text-confirm": "Confirm",
@@ -279,13 +286,19 @@ const DEFAULT_TRANSLATION = {
279
286
  "a11y.repeat-shape": "Repeat shape",
280
287
  "a11y.move-shape": "Move shape",
281
288
  "a11y.move-shape-faster": "Move shape faster",
289
+ "a11y.rotate-shape-cw": "Rotate shape clockwise",
290
+ "a11y.rotate-shape-ccw": "Rotate shape counterclockwise",
291
+ "a11y.rotate-shape-cw-fine": "Rotate shape clockwise (fine)",
292
+ "a11y.rotate-shape-ccw-fine": "Rotate shape counterclockwise (fine)",
282
293
  "a11y.enlarge-shape": "Enlarge shape",
283
294
  "a11y.shrink-shape": "Shrink shape",
284
295
  "a11y.pan-camera": "Pan camera",
285
296
  "a11y.adjust-shape-styles": "Adjust shape styles",
286
297
  "a11y.open-context-menu": "Open context menu",
298
+ "a11y.open-keyboard-shortcuts": "Open keyboard shortcuts",
287
299
  "menu.title": "Menu",
288
300
  "menu.theme": "Theme",
301
+ "menu.accessibility": "Accessibility",
289
302
  "menu.copy-as": "Copy as",
290
303
  "menu.edit": "Edit",
291
304
  "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-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,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,uBAAuB;AAAA,EACvB,iCAAiC;AAAA,EACj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AAA,EACjB,qCAAqC;AAAA,EACrC,iDACC;AAAA,EACD,2DACC;AAAA,EACD,sDAAsD;AAAA,EACtD,kCAAkC;AAAA,EAClC,wCACC;AAAA,EACD,mCAAmC;AAAA,EACnC,iCAAiC;AAAA,EACjC,4CAA4C;AAAA,EAC5C,mCAAmC;AAAA,EACnC,yCACC;AAAA,EACD,oCAAoC;AAAA,EACpC,sCAAsC;AAAA,EACtC,6CAA6C;AAAA,EAC7C,qDAAqD;AAAA,EACrD,2DACC;AAAA,EACD,+BAA+B;AAAA,EAC/B,qCACC;AAAA,EACD,gCAAgC;AAAA,EAChC,+BAA+B;AAAA,EAC/B,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-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': 'Enable keyboard shortcuts',\n\t'action.toggle-keyboard-shortcuts': 'Toggle keyboard shortcuts',\n\t'action.toggle-ui-labels.menu': 'Enable 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.rhombus-2': 'Rhombus left',\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.image-crop-confirm': 'Confirm',\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,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,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,kCAAkC;AAAA,EAClC,4BAA4B;AAAA,EAC5B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,gCAAgC;AAAA,EAChC,8BAA8B;AAAA,EAC9B,uBAAuB;AAAA,EACvB,iCAAiC;AAAA,EACjC,gBAAgB;AAAA,EAChB,uBAAuB;AAAA,EACvB,uBAAuB;AAAA,EACvB,+BAA+B;AAAA,EAC/B,sBAAsB;AA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EACxB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,EAC3B,4BAA4B;AAAA,EAC5B,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,gBAAgB;AACjB;",
6
6
  "names": []
7
7
  }
@@ -1,14 +1,21 @@
1
1
  import { tlenv } from "@tldraw/editor";
2
2
  const cmdKey = tlenv.isDarwin ? "\u2318" : "__CTRL__";
3
+ const ctrlKey = tlenv.isDarwin ? "\u2303" : "__CTRL__";
3
4
  const altKey = tlenv.isDarwin ? "\u2325" : "__ALT__";
4
5
  function kbd(str) {
5
6
  if (str === ",") return [","];
6
7
  return str.split(",")[0].split(/(\[\[[^\]]+\]\])/g).map(
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) || []
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) || []
8
9
  ).flat().map((sub, index) => {
9
- if (sub === "__CTRL__") return "Ctrl";
10
- if (sub === "__ALT__") return "Alt";
11
- const modifiedKey = sub[0].toUpperCase() + sub.slice(1);
10
+ if (sub[0] === "+") return [];
11
+ let modifiedKey;
12
+ if (sub === "__CTRL__") {
13
+ modifiedKey = "Ctrl";
14
+ } else if (sub === "__ALT__") {
15
+ modifiedKey = "Alt";
16
+ } else {
17
+ modifiedKey = sub[0].toUpperCase() + sub.slice(1);
18
+ }
12
19
  return tlenv.isDarwin || !index ? modifiedKey : ["+", modifiedKey];
13
20
  }).flat();
14
21
  }
@@ -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 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;",
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[0] === '+') return []\n\n\t\t\t\tlet modifiedKey\n\t\t\t\tif (sub === '__CTRL__') {\n\t\t\t\t\tmodifiedKey = 'Ctrl'\n\t\t\t\t} else if (sub === '__ALT__') {\n\t\t\t\t\tmodifiedKey = 'Alt'\n\t\t\t\t} else {\n\t\t\t\t\tmodifiedKey = sub[0].toUpperCase() + sub.slice(1)\n\t\t\t\t}\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,IAAI,CAAC,MAAM,IAAK,QAAO,CAAC;AAE5B,QAAI;AACJ,QAAI,QAAQ,YAAY;AACvB,oBAAc;AAAA,IACf,WAAW,QAAQ,WAAW;AAC7B,oBAAc;AAAA,IACf,OAAO;AACN,oBAAc,IAAI,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAAA,IACjD;AACA,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.a478398270c6";
1
+ const version = "3.16.0-internal.f8b97f0c414f";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-08-19T10:21:26.717Z",
5
- patch: "2025-08-19T10:21:26.717Z"
4
+ minor: "2025-09-15T18:16:53.704Z",
5
+ patch: "2025-09-15T18:16:53.704Z"
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.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"],
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.f8b97f0c414f'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-09-15T18:16:53.704Z',\n\tpatch: '2025-09-15T18:16:53.704Z',\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
- text,
173
+ richText: toRichText(text),
174
174
  kind: element.elbowed ? "elbow" : "arc",
175
175
  bend: getBend(element, start, end),
176
176
  dash: getDash(element),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/utils/excalidraw/putExcalidrawContent.ts"],
4
- "sourcesContent": ["import {\n\tAssetRecordType,\n\tBox,\n\tEditor,\n\tTLArrowShapeArrowheadStyle,\n\tTLAssetId,\n\tTLContent,\n\tTLDefaultColorStyle,\n\tTLDefaultDashStyle,\n\tTLDefaultFillStyle,\n\tTLDefaultFontStyle,\n\tTLDefaultHorizontalAlignStyle,\n\tTLDefaultSizeStyle,\n\tTLDefaultTextAlignStyle,\n\tTLOpacityType,\n\tTLShapeId,\n\tVec,\n\tVecLike,\n\tZERO_INDEX_KEY,\n\tcompact,\n\tcreateBindingId,\n\tcreateShapeId,\n\tgetIndexAbove,\n\tgetIndices,\n\tisShapeId,\n\ttoRichText,\n} from '@tldraw/editor'\n\n/**\n * Put excalidraw clipboard content onto the current page.\n *\n * @param editor - The editor instance.\n * @param excalidrawClipboardContent - The excalidraw clipboard model.\n * @param point - The point at which to put the excalidraw content.\n * @public\n */\nexport async function putExcalidrawContent(\n\teditor: Editor,\n\texcalidrawClipboardContent: any,\n\tpoint?: VecLike\n) {\n\tconst { elements, files } = excalidrawClipboardContent\n\n\tconst tldrawContent: TLContent = {\n\t\tshapes: [],\n\t\tbindings: [],\n\t\trootShapeIds: [],\n\t\tassets: [],\n\t\tschema: editor.store.schema.serialize(),\n\t}\n\n\tconst groupShapeIdToChildren = new Map<string, TLShapeId[]>()\n\tconst rotatedElements = new Map<TLShapeId, number>()\n\n\tconst currentPageId = editor.getCurrentPageId()\n\n\tconst excElementIdsToTldrawShapeIds = new Map<string, TLShapeId>()\n\tconst rootShapeIds: TLShapeId[] = []\n\n\tconst skipIds = new Set<string>()\n\n\telements.forEach((element: any) => {\n\t\texcElementIdsToTldrawShapeIds.set(element.id, createShapeId())\n\n\t\tif (element.boundElements !== null) {\n\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\tskipIds.add(boundElement.id)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tlet index = ZERO_INDEX_KEY\n\n\tfor (const element of elements) {\n\t\tif (skipIds.has(element.id)) {\n\t\t\tcontinue\n\t\t}\n\n\t\tconst id = excElementIdsToTldrawShapeIds.get(element.id)!\n\n\t\tconst base = {\n\t\t\tid,\n\t\t\ttypeName: 'shape',\n\t\t\tparentId: currentPageId,\n\t\t\tindex,\n\t\t\tx: element.x,\n\t\t\ty: element.y,\n\t\t\trotation: 0,\n\t\t\tisLocked: element.locked,\n\t\t\topacity: getOpacity(element.opacity),\n\t\t\tmeta: {},\n\t\t} as const\n\n\t\tif (element.angle !== 0) {\n\t\t\trotatedElements.set(id, element.angle)\n\t\t}\n\n\t\tif (element.groupIds && element.groupIds.length > 0) {\n\t\t\tif (groupShapeIdToChildren.has(element.groupIds[0])) {\n\t\t\t\tgroupShapeIdToChildren.get(element.groupIds[0])?.push(id)\n\t\t\t} else {\n\t\t\t\tgroupShapeIdToChildren.set(element.groupIds[0], [id])\n\t\t\t}\n\t\t} else {\n\t\t\trootShapeIds.push(id)\n\t\t}\n\n\t\tswitch (element.type) {\n\t\t\tcase 'rectangle':\n\t\t\tcase 'ellipse':\n\t\t\tcase 'diamond': {\n\t\t\t\tlet text = ''\n\t\t\t\tlet align: TLDefaultHorizontalAlignStyle = 'middle'\n\n\t\t\t\tif (element.boundElements !== null) {\n\t\t\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\t\t\tconst labelElement = elements.find((elm: any) => elm.id === boundElement.id)\n\t\t\t\t\t\t\tif (labelElement) {\n\t\t\t\t\t\t\t\ttext = labelElement.text\n\t\t\t\t\t\t\t\talign = textAlignToAlignTypes[labelElement.textAlign]\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}\n\n\t\t\t\tconst colorToUse =\n\t\t\t\t\telement.backgroundColor === 'transparent' ? element.strokeColor : element.backgroundColor\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'geo',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tgeo: element.type,\n\t\t\t\t\t\turl: element.link ?? '',\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth] ?? 'draw',\n\t\t\t\t\t\tcolor: colorsToColors[colorToUse] ?? 'black',\n\t\t\t\t\t\trichText: toRichText(text),\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tfill: getFill(element),\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'freedraw': {\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'draw',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth],\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tsegments: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'free',\n\t\t\t\t\t\t\t\tpoints: element.points.map(([x, y, z = 0.5]: number[]) => ({\n\t\t\t\t\t\t\t\t\tx,\n\t\t\t\t\t\t\t\t\ty,\n\t\t\t\t\t\t\t\t\tz,\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})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'line': {\n\t\t\t\tconst points = element.points.slice()\n\t\t\t\tif (points.length < 2) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tconst indices = getIndices(element.points.length)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth],\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tspline: element.roundness ? 'cubic' : 'line',\n\t\t\t\t\t\tpoints: {\n\t\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\t\telement.points.map(([x, y]: number[], i: number) => {\n\t\t\t\t\t\t\t\t\tconst index = indices[i]\n\t\t\t\t\t\t\t\t\treturn [index, { id: index, index, x, y }]\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})\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'arrow': {\n\t\t\t\tlet text = ''\n\n\t\t\t\tif (element.boundElements !== null) {\n\t\t\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\t\t\tconst labelElement = elements.find((elm: any) => elm.id === boundElement.id)\n\t\t\t\t\t\t\tif (labelElement) {\n\t\t\t\t\t\t\t\ttext = labelElement.text\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}\n\n\t\t\t\tconst start = element.points[0]\n\t\t\t\tconst end = element.points[element.points.length - 1]\n\n\t\t\t\tconst startTargetId = excElementIdsToTldrawShapeIds.get(element.startBinding?.elementId)\n\t\t\t\tconst endTargetId = excElementIdsToTldrawShapeIds.get(element.endBinding?.elementId)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\ttext,\n\t\t\t\t\t\tkind: element.elbowed ? 'elbow' : 'arc',\n\t\t\t\t\t\tbend: getBend(element, start, end),\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth] ?? 'm',\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tstart: { x: start[0], y: start[1] },\n\t\t\t\t\t\tend: { x: end[0], y: end[1] },\n\t\t\t\t\t\tarrowheadEnd: arrowheadsToArrowheadTypes[element.endArrowhead] ?? 'none',\n\t\t\t\t\t\tarrowheadStart: arrowheadsToArrowheadTypes[element.startArrowhead] ?? 'none',\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (startTargetId) {\n\t\t\t\t\ttldrawContent.bindings!.push({\n\t\t\t\t\t\tid: createBindingId(),\n\t\t\t\t\t\ttypeName: 'binding',\n\t\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\t\tfromId: id,\n\t\t\t\t\t\ttoId: startTargetId,\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tterminal: 'start',\n\t\t\t\t\t\t\tnormalizedAnchor: { x: 0.5, y: 0.5 },\n\t\t\t\t\t\t\tisPrecise: false,\n\t\t\t\t\t\t\tisExact: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (endTargetId) {\n\t\t\t\t\ttldrawContent.bindings!.push({\n\t\t\t\t\t\tid: createBindingId(),\n\t\t\t\t\t\ttypeName: 'binding',\n\t\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\t\tfromId: id,\n\t\t\t\t\t\ttoId: endTargetId,\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tterminal: 'end',\n\t\t\t\t\t\t\tnormalizedAnchor: { x: 0.5, y: 0.5 },\n\t\t\t\t\t\t\tisPrecise: false,\n\t\t\t\t\t\t\tisExact: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'text': {\n\t\t\t\tconst { size, scale } = getFontSizeAndScale(element.fontSize)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'text',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tsize,\n\t\t\t\t\t\tscale,\n\t\t\t\t\t\tfont: fontFamilyToFontType[element.fontFamily] ?? 'draw',\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\trichText: toRichText(element.text),\n\t\t\t\t\t\ttextAlign: textAlignToTextAlignTypes[element.textAlign],\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'image': {\n\t\t\t\tconst file = files[element.fileId]\n\t\t\t\tif (!file) break\n\n\t\t\t\tconst assetId: TLAssetId = AssetRecordType.createId()\n\t\t\t\ttldrawContent.assets.push({\n\t\t\t\t\tid: assetId,\n\t\t\t\t\ttypeName: 'asset',\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tfileSize: file.size,\n\t\t\t\t\t\tname: element.id ?? 'Untitled',\n\t\t\t\t\t\tisAnimated: false,\n\t\t\t\t\t\tmimeType: file.mimeType,\n\t\t\t\t\t\tsrc: file.dataURL,\n\t\t\t\t\t},\n\t\t\t\t\tmeta: {},\n\t\t\t\t})\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tassetId,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tindex = getIndexAbove(index)\n\t}\n\n\tconst p = point ?? (editor.inputs.shiftKey ? editor.inputs.currentPagePoint : undefined)\n\n\teditor.putContentOntoCurrentPage(tldrawContent, {\n\t\tpoint: p,\n\t\tselect: false,\n\t\tpreserveIds: true,\n\t})\n\tfor (const groupedShapeIds of groupShapeIdToChildren.values()) {\n\t\tif (groupedShapeIds.length > 1) {\n\t\t\teditor.groupShapes(groupedShapeIds)\n\t\t\tconst groupShape = editor.getShape(groupedShapeIds[0])\n\t\t\tif (groupShape?.parentId && isShapeId(groupShape.parentId)) {\n\t\t\t\trootShapeIds.push(groupShape.parentId)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const [id, angle] of rotatedElements) {\n\t\teditor.select(id)\n\t\teditor.rotateShapesBy([id], angle)\n\t}\n\n\tconst rootShapes = compact(rootShapeIds.map((id) => editor.getShape(id)))\n\tconst bounds = Box.Common(rootShapes.map((s) => editor.getShapePageBounds(s)!))\n\tconst viewPortCenter = editor.getViewportPageBounds().center\n\teditor.updateShapes(\n\t\trootShapes.map((s) => {\n\t\t\tconst delta = {\n\t\t\t\tx: (s.x ?? 0) - (bounds.x + bounds.w / 2),\n\t\t\t\ty: (s.y ?? 0) - (bounds.y + bounds.h / 2),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tid: s.id,\n\t\t\t\ttype: s.type,\n\t\t\t\tx: viewPortCenter.x + delta.x,\n\t\t\t\ty: viewPortCenter.y + delta.y,\n\t\t\t}\n\t\t})\n\t)\n\teditor.setSelectedShapes(rootShapeIds)\n}\n\n/* --------------- Translating Helpers --------_------ */\n\nconst getOpacity = (opacity: number): TLOpacityType => {\n\tconst t = opacity / 100\n\tif (t < 0.2) {\n\t\treturn 0.1\n\t} else if (t < 0.4) {\n\t\treturn 0.25\n\t} else if (t < 0.6) {\n\t\treturn 0.5\n\t} else if (t < 0.8) {\n\t\treturn 0.75\n\t}\n\n\treturn 1\n}\n\nconst strokeWidthsToSizes: Record<number, TLDefaultSizeStyle> = {\n\t1: 's',\n\t2: 'm',\n\t3: 'l',\n\t4: 'xl',\n}\n\nconst fontSizesToSizes: Record<number, TLDefaultSizeStyle> = {\n\t16: 's',\n\t20: 'm',\n\t28: 'l',\n\t36: 'xl',\n}\n\nfunction getFontSizeAndScale(fontSize: number): { size: TLDefaultSizeStyle; scale: number } {\n\tconst size = fontSizesToSizes[fontSize]\n\tif (size) {\n\t\treturn { size, scale: 1 }\n\t}\n\tif (fontSize < 16) {\n\t\treturn { size: 's', scale: fontSize / 16 }\n\t}\n\tif (fontSize > 36) {\n\t\treturn { size: 'xl', scale: fontSize / 36 }\n\t}\n\treturn { size: 'm', scale: 1 }\n}\n\nconst fontFamilyToFontType: Record<number, TLDefaultFontStyle> = {\n\t1: 'draw',\n\t2: 'sans',\n\t3: 'mono',\n}\n\nconst oc = {\n\tgray: ['#f8f9fa', '#e9ecef', '#ced4da', '#868e96', '#343a40'],\n\tred: ['#fff5f5', '#ffc9c9', '#ff8787', '#fa5252', '#e03131'],\n\tpink: ['#fff0f6', '#fcc2d7', '#f783ac', '#e64980', '#c2255c'],\n\tgrape: ['#f8f0fc', '#eebefa', '#da77f2', '#be4bdb', '#9c36b5'],\n\tviolet: ['#f3f0ff', '#d0bfff', '#9775fa', '#7950f2', '#6741d9'],\n\tindigo: ['#edf2ff', '#bac8ff', '#748ffc', '#4c6ef5', '#3b5bdb'],\n\tblue: ['#e7f5ff', '#a5d8ff', '#4dabf7', '#228be6', '#1971c2'],\n\tcyan: ['#e3fafc', '#99e9f2', '#3bc9db', '#15aabf', '#0c8599'],\n\tteal: ['#e6fcf5', '#96f2d7', '#38d9a9', '#12b886', '#099268'],\n\tgreen: ['#ebfbee', '#b2f2bb', '#69db7c', '#40c057', '#2f9e44'],\n\tlime: ['#f4fce3', '#d8f5a2', '#a9e34b', '#82c91e', '#66a80f'],\n\tyellow: ['#fff9db', '#ffec99', '#ffd43b', '#fab005', '#f08c00'],\n\torange: ['#fff4e6', '#ffd8a8', '#ffa94d', '#fd7e14', '#e8590c'],\n}\n\nfunction mapExcalidrawColorToTldrawColors(\n\texcalidrawColor: keyof typeof oc,\n\tlight: TLDefaultColorStyle,\n\tdark: TLDefaultColorStyle\n) {\n\tconst colors = [0, 1, 2, 3, 4].map((index) => oc[excalidrawColor][index])\n\treturn Object.fromEntries(colors.map((c, i) => [c, i < 3 ? light : dark]))\n}\n\nconst colorsToColors: Record<string, TLDefaultColorStyle> = {\n\t...mapExcalidrawColorToTldrawColors('gray', 'grey', 'black'),\n\t...mapExcalidrawColorToTldrawColors('red', 'light-red', 'red'),\n\t...mapExcalidrawColorToTldrawColors('pink', 'light-red', 'red'),\n\t...mapExcalidrawColorToTldrawColors('grape', 'light-violet', 'violet'),\n\t...mapExcalidrawColorToTldrawColors('blue', 'light-blue', 'blue'),\n\t...mapExcalidrawColorToTldrawColors('cyan', 'light-blue', 'blue'),\n\t...mapExcalidrawColorToTldrawColors('teal', 'light-green', 'green'),\n\t...mapExcalidrawColorToTldrawColors('green', 'light-green', 'green'),\n\t...mapExcalidrawColorToTldrawColors('yellow', 'yellow', 'orange'),\n\t...mapExcalidrawColorToTldrawColors('orange', 'yellow', 'orange'),\n\t'#ffffff': 'white',\n\t'#000000': 'black',\n}\n\nconst strokeStylesToStrokeTypes: Record<string, TLDefaultDashStyle> = {\n\tsolid: 'draw',\n\tdashed: 'dashed',\n\tdotted: 'dotted',\n}\n\nconst fillStylesToFillType: Record<string, TLDefaultFillStyle> = {\n\t'cross-hatch': 'pattern',\n\thachure: 'pattern',\n\tsolid: 'solid',\n}\n\nconst textAlignToAlignTypes: Record<string, TLDefaultHorizontalAlignStyle> = {\n\tleft: 'start',\n\tcenter: 'middle',\n\tright: 'end',\n}\n\nconst textAlignToTextAlignTypes: Record<string, TLDefaultTextAlignStyle> = {\n\tleft: 'start',\n\tcenter: 'middle',\n\tright: 'end',\n}\n\nconst arrowheadsToArrowheadTypes: Record<string, TLArrowShapeArrowheadStyle> = {\n\tarrow: 'arrow',\n\tdot: 'dot',\n\ttriangle: 'triangle',\n\tbar: 'pipe',\n}\n\nfunction getBend(element: any, startPoint: any, endPoint: any) {\n\tlet bend = 0\n\tif (element.points.length > 2) {\n\t\tconst start = new Vec(startPoint[0], startPoint[1])\n\t\tconst end = new Vec(endPoint[0], endPoint[1])\n\t\tconst handle = new Vec(element.points[1][0], element.points[1][1])\n\t\tconst delta = Vec.Sub(end, start)\n\t\tconst v = Vec.Per(delta)\n\n\t\tconst med = Vec.Med(end, start)\n\t\tconst A = Vec.Sub(med, v)\n\t\tconst B = Vec.Add(med, v)\n\n\t\tconst point = Vec.NearestPointOnLineSegment(A, B, handle, false)\n\t\tbend = Vec.Dist(point, med)\n\t\tif (Vec.Clockwise(point, end, med)) bend *= -1\n\t}\n\treturn bend\n}\n\nconst getDash = (element: any): TLDefaultDashStyle => {\n\tlet dash: TLDefaultDashStyle = strokeStylesToStrokeTypes[element.strokeStyle] ?? 'draw'\n\tif (dash === 'draw' && element.roughness === 0) {\n\t\tdash = 'solid'\n\t}\n\treturn dash\n}\n\nconst getFill = (element: any): TLDefaultFillStyle => {\n\tif (element.backgroundColor === 'transparent') {\n\t\treturn 'none'\n\t}\n\treturn fillStylesToFillType[element.fillStyle] ??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SAAQ;AAAA,EAC7C;AACA,SAAO;AACR;AAEA,MAAM,UAAU,CAAC,YAAqC;AACrD,MAAI,OAA2B,0BAA0B,QAAQ,WAAW,KAAK;AACjF,MAAI,SAAS,UAAU,QAAQ,cAAc,GAAG;AAC/C,WAAO;AAAA,EACR;AACA,SAAO;AACR;AAEA,MAAM,UAAU,CAAC,YAAqC;AACrD,MAAI,QAAQ,oBAAoB,eAAe;AAC9C,WAAO;AAAA,EACR;AACA,SAAO,qBAAqB,QAAQ,SAAS,KAAK;AACnD;",
4
+ "sourcesContent": ["import {\n\tAssetRecordType,\n\tBox,\n\tEditor,\n\tTLArrowShapeArrowheadStyle,\n\tTLAssetId,\n\tTLContent,\n\tTLDefaultColorStyle,\n\tTLDefaultDashStyle,\n\tTLDefaultFillStyle,\n\tTLDefaultFontStyle,\n\tTLDefaultHorizontalAlignStyle,\n\tTLDefaultSizeStyle,\n\tTLDefaultTextAlignStyle,\n\tTLOpacityType,\n\tTLShapeId,\n\tVec,\n\tVecLike,\n\tZERO_INDEX_KEY,\n\tcompact,\n\tcreateBindingId,\n\tcreateShapeId,\n\tgetIndexAbove,\n\tgetIndices,\n\tisShapeId,\n\ttoRichText,\n} from '@tldraw/editor'\n\n/**\n * Put excalidraw clipboard content onto the current page.\n *\n * @param editor - The editor instance.\n * @param excalidrawClipboardContent - The excalidraw clipboard model.\n * @param point - The point at which to put the excalidraw content.\n * @public\n */\nexport async function putExcalidrawContent(\n\teditor: Editor,\n\texcalidrawClipboardContent: any,\n\tpoint?: VecLike\n) {\n\tconst { elements, files } = excalidrawClipboardContent\n\n\tconst tldrawContent: TLContent = {\n\t\tshapes: [],\n\t\tbindings: [],\n\t\trootShapeIds: [],\n\t\tassets: [],\n\t\tschema: editor.store.schema.serialize(),\n\t}\n\n\tconst groupShapeIdToChildren = new Map<string, TLShapeId[]>()\n\tconst rotatedElements = new Map<TLShapeId, number>()\n\n\tconst currentPageId = editor.getCurrentPageId()\n\n\tconst excElementIdsToTldrawShapeIds = new Map<string, TLShapeId>()\n\tconst rootShapeIds: TLShapeId[] = []\n\n\tconst skipIds = new Set<string>()\n\n\telements.forEach((element: any) => {\n\t\texcElementIdsToTldrawShapeIds.set(element.id, createShapeId())\n\n\t\tif (element.boundElements !== null) {\n\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\tskipIds.add(boundElement.id)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tlet index = ZERO_INDEX_KEY\n\n\tfor (const element of elements) {\n\t\tif (skipIds.has(element.id)) {\n\t\t\tcontinue\n\t\t}\n\n\t\tconst id = excElementIdsToTldrawShapeIds.get(element.id)!\n\n\t\tconst base = {\n\t\t\tid,\n\t\t\ttypeName: 'shape',\n\t\t\tparentId: currentPageId,\n\t\t\tindex,\n\t\t\tx: element.x,\n\t\t\ty: element.y,\n\t\t\trotation: 0,\n\t\t\tisLocked: element.locked,\n\t\t\topacity: getOpacity(element.opacity),\n\t\t\tmeta: {},\n\t\t} as const\n\n\t\tif (element.angle !== 0) {\n\t\t\trotatedElements.set(id, element.angle)\n\t\t}\n\n\t\tif (element.groupIds && element.groupIds.length > 0) {\n\t\t\tif (groupShapeIdToChildren.has(element.groupIds[0])) {\n\t\t\t\tgroupShapeIdToChildren.get(element.groupIds[0])?.push(id)\n\t\t\t} else {\n\t\t\t\tgroupShapeIdToChildren.set(element.groupIds[0], [id])\n\t\t\t}\n\t\t} else {\n\t\t\trootShapeIds.push(id)\n\t\t}\n\n\t\tswitch (element.type) {\n\t\t\tcase 'rectangle':\n\t\t\tcase 'ellipse':\n\t\t\tcase 'diamond': {\n\t\t\t\tlet text = ''\n\t\t\t\tlet align: TLDefaultHorizontalAlignStyle = 'middle'\n\n\t\t\t\tif (element.boundElements !== null) {\n\t\t\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\t\t\tconst labelElement = elements.find((elm: any) => elm.id === boundElement.id)\n\t\t\t\t\t\t\tif (labelElement) {\n\t\t\t\t\t\t\t\ttext = labelElement.text\n\t\t\t\t\t\t\t\talign = textAlignToAlignTypes[labelElement.textAlign]\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}\n\n\t\t\t\tconst colorToUse =\n\t\t\t\t\telement.backgroundColor === 'transparent' ? element.strokeColor : element.backgroundColor\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'geo',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tgeo: element.type,\n\t\t\t\t\t\turl: element.link ?? '',\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth] ?? 'draw',\n\t\t\t\t\t\tcolor: colorsToColors[colorToUse] ?? 'black',\n\t\t\t\t\t\trichText: toRichText(text),\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tfill: getFill(element),\n\t\t\t\t\t} as any,\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'freedraw': {\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'draw',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth],\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tsegments: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'free',\n\t\t\t\t\t\t\t\tpoints: element.points.map(([x, y, z = 0.5]: number[]) => ({\n\t\t\t\t\t\t\t\t\tx,\n\t\t\t\t\t\t\t\t\ty,\n\t\t\t\t\t\t\t\t\tz,\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} as any,\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'line': {\n\t\t\t\tconst points = element.points.slice()\n\t\t\t\tif (points.length < 2) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tconst indices = getIndices(element.points.length)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth],\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tspline: element.roundness ? 'cubic' : 'line',\n\t\t\t\t\t\tpoints: {\n\t\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\t\telement.points.map(([x, y]: number[], i: number) => {\n\t\t\t\t\t\t\t\t\tconst index = indices[i]\n\t\t\t\t\t\t\t\t\treturn [index, { id: index, index, x, y }]\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} as any,\n\t\t\t\t})\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'arrow': {\n\t\t\t\tlet text = ''\n\n\t\t\t\tif (element.boundElements !== null) {\n\t\t\t\t\tfor (const boundElement of element.boundElements) {\n\t\t\t\t\t\tif (boundElement.type === 'text') {\n\t\t\t\t\t\t\tconst labelElement = elements.find((elm: any) => elm.id === boundElement.id)\n\t\t\t\t\t\t\tif (labelElement) {\n\t\t\t\t\t\t\t\ttext = labelElement.text\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}\n\n\t\t\t\tconst start = element.points[0]\n\t\t\t\tconst end = element.points[element.points.length - 1]\n\n\t\t\t\tconst startTargetId = excElementIdsToTldrawShapeIds.get(element.startBinding?.elementId)\n\t\t\t\tconst endTargetId = excElementIdsToTldrawShapeIds.get(element.endBinding?.elementId)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trichText: toRichText(text),\n\t\t\t\t\t\tkind: element.elbowed ? 'elbow' : 'arc',\n\t\t\t\t\t\tbend: getBend(element, start, end),\n\t\t\t\t\t\tdash: getDash(element),\n\t\t\t\t\t\tsize: strokeWidthsToSizes[element.strokeWidth] ?? 'm',\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\tstart: { x: start[0], y: start[1] },\n\t\t\t\t\t\tend: { x: end[0], y: end[1] },\n\t\t\t\t\t\tarrowheadEnd: arrowheadsToArrowheadTypes[element.endArrowhead] ?? 'none',\n\t\t\t\t\t\tarrowheadStart: arrowheadsToArrowheadTypes[element.startArrowhead] ?? 'none',\n\t\t\t\t\t} as any,\n\t\t\t\t})\n\n\t\t\t\tif (startTargetId) {\n\t\t\t\t\ttldrawContent.bindings!.push({\n\t\t\t\t\t\tid: createBindingId(),\n\t\t\t\t\t\ttypeName: 'binding',\n\t\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\t\tfromId: id,\n\t\t\t\t\t\ttoId: startTargetId,\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tterminal: 'start',\n\t\t\t\t\t\t\tnormalizedAnchor: { x: 0.5, y: 0.5 },\n\t\t\t\t\t\t\tisPrecise: false,\n\t\t\t\t\t\t\tisExact: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (endTargetId) {\n\t\t\t\t\ttldrawContent.bindings!.push({\n\t\t\t\t\t\tid: createBindingId(),\n\t\t\t\t\t\ttypeName: 'binding',\n\t\t\t\t\t\ttype: 'arrow',\n\t\t\t\t\t\tfromId: id,\n\t\t\t\t\t\ttoId: endTargetId,\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tterminal: 'end',\n\t\t\t\t\t\t\tnormalizedAnchor: { x: 0.5, y: 0.5 },\n\t\t\t\t\t\t\tisPrecise: false,\n\t\t\t\t\t\t\tisExact: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'text': {\n\t\t\t\tconst { size, scale } = getFontSizeAndScale(element.fontSize)\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'text',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tsize,\n\t\t\t\t\t\tscale,\n\t\t\t\t\t\tfont: fontFamilyToFontType[element.fontFamily] ?? 'draw',\n\t\t\t\t\t\tcolor: colorsToColors[element.strokeColor] ?? 'black',\n\t\t\t\t\t\trichText: toRichText(element.text),\n\t\t\t\t\t\ttextAlign: textAlignToTextAlignTypes[element.textAlign],\n\t\t\t\t\t} as any,\n\t\t\t\t})\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'image': {\n\t\t\t\tconst file = files[element.fileId]\n\t\t\t\tif (!file) break\n\n\t\t\t\tconst assetId: TLAssetId = AssetRecordType.createId()\n\t\t\t\ttldrawContent.assets.push({\n\t\t\t\t\tid: assetId,\n\t\t\t\t\ttypeName: 'asset',\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tfileSize: file.size,\n\t\t\t\t\t\tname: element.id ?? 'Untitled',\n\t\t\t\t\t\tisAnimated: false,\n\t\t\t\t\t\tmimeType: file.mimeType,\n\t\t\t\t\t\tsrc: file.dataURL,\n\t\t\t\t\t},\n\t\t\t\t\tmeta: {},\n\t\t\t\t})\n\n\t\t\t\ttldrawContent.shapes.push({\n\t\t\t\t\t...base,\n\t\t\t\t\ttype: 'image',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tw: element.width,\n\t\t\t\t\t\th: element.height,\n\t\t\t\t\t\tassetId,\n\t\t\t\t\t} as any,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tindex = getIndexAbove(index)\n\t}\n\n\tconst p = point ?? (editor.inputs.shiftKey ? editor.inputs.currentPagePoint : undefined)\n\n\teditor.putContentOntoCurrentPage(tldrawContent, {\n\t\tpoint: p,\n\t\tselect: false,\n\t\tpreserveIds: true,\n\t})\n\tfor (const groupedShapeIds of groupShapeIdToChildren.values()) {\n\t\tif (groupedShapeIds.length > 1) {\n\t\t\teditor.groupShapes(groupedShapeIds)\n\t\t\tconst groupShape = editor.getShape(groupedShapeIds[0])\n\t\t\tif (groupShape?.parentId && isShapeId(groupShape.parentId)) {\n\t\t\t\trootShapeIds.push(groupShape.parentId)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const [id, angle] of rotatedElements) {\n\t\teditor.select(id)\n\t\teditor.rotateShapesBy([id], angle)\n\t}\n\n\tconst rootShapes = compact(rootShapeIds.map((id) => editor.getShape(id)))\n\tconst bounds = Box.Common(rootShapes.map((s) => editor.getShapePageBounds(s)!))\n\tconst viewPortCenter = editor.getViewportPageBounds().center\n\teditor.updateShapes(\n\t\trootShapes.map((s) => {\n\t\t\tconst delta = {\n\t\t\t\tx: (s.x ?? 0) - (bounds.x + bounds.w / 2),\n\t\t\t\ty: (s.y ?? 0) - (bounds.y + bounds.h / 2),\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tid: s.id,\n\t\t\t\ttype: s.type,\n\t\t\t\tx: viewPortCenter.x + delta.x,\n\t\t\t\ty: viewPortCenter.y + delta.y,\n\t\t\t}\n\t\t})\n\t)\n\teditor.setSelectedShapes(rootShapeIds)\n}\n\n/* --------------- Translating Helpers --------_------ */\n\nconst getOpacity = (opacity: number): TLOpacityType => {\n\tconst t = opacity / 100\n\tif (t < 0.2) {\n\t\treturn 0.1\n\t} else if (t < 0.4) {\n\t\treturn 0.25\n\t} else if (t < 0.6) {\n\t\treturn 0.5\n\t} else if (t < 0.8) {\n\t\treturn 0.75\n\t}\n\n\treturn 1\n}\n\nconst strokeWidthsToSizes: Record<number, TLDefaultSizeStyle> = {\n\t1: 's',\n\t2: 'm',\n\t3: 'l',\n\t4: 'xl',\n}\n\nconst fontSizesToSizes: Record<number, TLDefaultSizeStyle> = {\n\t16: 's',\n\t20: 'm',\n\t28: 'l',\n\t36: 'xl',\n}\n\nfunction getFontSizeAndScale(fontSize: number): { size: TLDefaultSizeStyle; scale: number } {\n\tconst size = fontSizesToSizes[fontSize]\n\tif (size) {\n\t\treturn { size, scale: 1 }\n\t}\n\tif (fontSize < 16) {\n\t\treturn { size: 's', scale: fontSize / 16 }\n\t}\n\tif (fontSize > 36) {\n\t\treturn { size: 'xl', scale: fontSize / 36 }\n\t}\n\treturn { size: 'm', scale: 1 }\n}\n\nconst fontFamilyToFontType: Record<number, TLDefaultFontStyle> = {\n\t1: 'draw',\n\t2: 'sans',\n\t3: 'mono',\n}\n\nconst oc = {\n\tgray: ['#f8f9fa', '#e9ecef', '#ced4da', '#868e96', '#343a40'],\n\tred: ['#fff5f5', '#ffc9c9', '#ff8787', '#fa5252', '#e03131'],\n\tpink: ['#fff0f6', '#fcc2d7', '#f783ac', '#e64980', '#c2255c'],\n\tgrape: ['#f8f0fc', '#eebefa', '#da77f2', '#be4bdb', '#9c36b5'],\n\tviolet: ['#f3f0ff', '#d0bfff', '#9775fa', '#7950f2', '#6741d9'],\n\tindigo: ['#edf2ff', '#bac8ff', '#748ffc', '#4c6ef5', '#3b5bdb'],\n\tblue: ['#e7f5ff', '#a5d8ff', '#4dabf7', '#228be6', '#1971c2'],\n\tcyan: ['#e3fafc', '#99e9f2', '#3bc9db', '#15aabf', '#0c8599'],\n\tteal: ['#e6fcf5', '#96f2d7', '#38d9a9', '#12b886', '#099268'],\n\tgreen: ['#ebfbee', '#b2f2bb', '#69db7c', '#40c057', '#2f9e44'],\n\tlime: ['#f4fce3', '#d8f5a2', '#a9e34b', '#82c91e', '#66a80f'],\n\tyellow: ['#fff9db', '#ffec99', '#ffd43b', '#fab005', '#f08c00'],\n\torange: ['#fff4e6', '#ffd8a8', '#ffa94d', '#fd7e14', '#e8590c'],\n}\n\nfunction mapExcalidrawColorToTldrawColors(\n\texcalidrawColor: keyof typeof oc,\n\tlight: TLDefaultColorStyle,\n\tdark: TLDefaultColorStyle\n) {\n\tconst colors = [0, 1, 2, 3, 4].map((index) => oc[excalidrawColor][index])\n\treturn Object.fromEntries(colors.map((c, i) => [c, i < 3 ? light : dark]))\n}\n\nconst colorsToColors: Record<string, TLDefaultColorStyle> = {\n\t...mapExcalidrawColorToTldrawColors('gray', 'grey', 'black'),\n\t...mapExcalidrawColorToTldrawColors('red', 'light-red', 'red'),\n\t...mapExcalidrawColorToTldrawColors('pink', 'light-red', 'red'),\n\t...mapExcalidrawColorToTldrawColors('grape', 'light-violet', 'violet'),\n\t...mapExcalidrawColorToTldrawColors('blue', 'light-blue', 'blue'),\n\t...mapExcalidrawColorToTldrawColors('cyan', 'light-blue', 'blue'),\n\t...mapExcalidrawColorToTldrawColors('teal', 'light-green', 'green'),\n\t...mapExcalidrawColorToTldrawColors('green', 'light-green', 'green'),\n\t...mapExcalidrawColorToTldrawColors('yellow', 'yellow', 'orange'),\n\t...mapExcalidrawColorToTldrawColors('orange', 'yellow', 'orange'),\n\t'#ffffff': 'white',\n\t'#000000': 'black',\n}\n\nconst strokeStylesToStrokeTypes: Record<string, TLDefaultDashStyle> = {\n\tsolid: 'draw',\n\tdashed: 'dashed',\n\tdotted: 'dotted',\n}\n\nconst fillStylesToFillType: Record<string, TLDefaultFillStyle> = {\n\t'cross-hatch': 'pattern',\n\thachure: 'pattern',\n\tsolid: 'solid',\n}\n\nconst textAlignToAlignTypes: Record<string, TLDefaultHorizontalAlignStyle> = {\n\tleft: 'start',\n\tcenter: 'middle',\n\tright: 'end',\n}\n\nconst textAlignToTextAlignTypes: Record<string, TLDefaultTextAlignStyle> = {\n\tleft: 'start',\n\tcenter: 'middle',\n\tright: 'end',\n}\n\nconst arrowheadsToArrowheadTypes: Record<string, TLArrowShapeArrowheadStyle> = {\n\tarrow: 'arrow',\n\tdot: 'dot',\n\ttriangle: 'triangle',\n\tbar: 'pipe',\n}\n\nfunction getBend(element: any, startPoint: any, endPoint: any) {\n\tlet bend = 0\n\tif (element.points.length > 2) {\n\t\tconst start = new Vec(startPoint[0], startPoint[1])\n\t\tconst end = new Vec(endPoint[0], endPoint[1])\n\t\tconst handle = new Vec(element.points[1][0], element.points[1][1])\n\t\tconst delta = Vec.Sub(end, start)\n\t\tconst v = Vec.Per(delta)\n\n\t\tconst med = Vec.Med(end, start)\n\t\tconst A = Vec.Sub(med, v)\n\t\tconst B = Vec.Add(med, v)\n\n\t\tconst point = Vec.NearestPointOnLineSegment(A, B, handle, false)\n\t\tbend = Vec.Dist(point, med)\n\t\tif (Vec.Clockwise(point, end, med)) bend *= -1\n\t}\n\treturn bend\n}\n\nconst getDash = (element: any): TLDefaultDashStyle => {\n\tlet dash: TLDefaultDashStyle = strokeStylesToStrokeTypes[element.strokeStyle] ?? 'draw'\n\tif (dash === 'draw' && element.roughness === 0) {\n\t\tdash = 'solid'\n\t}\n\treturn dash\n}\n\nconst getFill = (element: any): TLDefaultFillStyle => {\n\tif (element.backgroundColor === 'transparent') {\n\t\treturn 'none'\n\t}\n\treturn fillStylesToFillType[element.fillStyle] ?? 'solid'\n}\n"],
5
+ "mappings": "AAAA;AAAA,EACC;AAAA,EACA;AAAA,EAcA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAUP,eAAsB,qBACrB,QACA,4BACA,OACC;AACD,QAAM,EAAE,UAAU,MAAM,IAAI;AAE5B,QAAM,gBAA2B;AAAA,IAChC,QAAQ,CAAC;AAAA,IACT,UAAU,CAAC;AAAA,IACX,cAAc,CAAC;AAAA,IACf,QAAQ,CAAC;AAAA,IACT,QAAQ,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
7
  }
@@ -8,8 +8,7 @@ import {
8
8
  getAdditionalClipboardWriteType
9
9
  } from "../clipboard.mjs";
10
10
  import { exportToImagePromiseForClipboard } from "./export.mjs";
11
- function copyAs(...args) {
12
- const [editor, ids, opts] = typeof args[2] === "string" ? [args[0], args[1], { ...args[3], format: args[2] }] : args;
11
+ function copyAs(editor, ids, opts) {
13
12
  if (!navigator.clipboard) return Promise.reject(new Error("Copy not supported"));
14
13
  if (navigator.clipboard.write) {
15
14
  const { blobPromise, mimeType } = exportToImagePromiseForClipboard(editor, ids, opts);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/utils/export/copyAs.ts"],
4
- "sourcesContent": ["import {\n\tEditor,\n\tFileHelpers,\n\tTLImageExportOptions,\n\tTLShapeId,\n\texhaustiveSwitchError,\n} from '@tldraw/editor'\nimport {\n\tclipboardWrite,\n\tdoesClipboardSupportType,\n\tgetAdditionalClipboardWriteType,\n} from '../clipboard'\nimport { exportToImagePromiseForClipboard } from './export'\n\n/** @public */\nexport type TLCopyType = 'svg' | 'png'\n\n/** @public */\nexport interface CopyAsOptions extends TLImageExportOptions {\n\t/** The format to copy as. */\n\tformat: TLCopyType\n}\n\n/**\n * Copy the given shapes to the clipboard.\n *\n * @param editor - The editor instance.\n * @param ids - The ids of the shapes to copy.\n * @param format - The format to copy as. Defaults to png.\n * @param opts - Options for the copy.\n *\n * @public\n */\nexport function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>\n/**\n * @deprecated The format parameter is now part of the opts object.\n * @public\n */\nexport function copyAs(\n\teditor: Editor,\n\tids: TLShapeId[],\n\tformat: TLCopyType,\n\topts?: TLImageExportOptions & { format?: undefined }\n): Promise<void>\nexport function copyAs(\n\t...args:\n\t\t| [editor: Editor, ids: TLShapeId[], opts: TLImageExportOptions & { format: TLCopyType }]\n\t\t| [\n\t\t\t\teditor: Editor,\n\t\t\t\tids: TLShapeId[],\n\t\t\t\tformat: TLCopyType,\n\t\t\t\topts?: TLImageExportOptions & { format?: undefined },\n\t\t ]\n) {\n\tconst [editor, ids, opts] =\n\t\ttypeof args[2] === 'string' ? [args[0], args[1], { ...args[3], format: args[2] }] : args\n\n\t// Note: it's important that this function itself isn't async and doesn't really use promises -\n\t// we need to create the relevant `ClipboardItem`s and call navigator.clipboard.write\n\t// synchronously to make sure safari knows that the user _wants_ to copy See\n\t// https://bugs.webkit.org/show_bug.cgi?id=222262\n\n\tif (!navigator.clipboard) return Promise.reject(new Error('Copy not supported'))\n\tif (navigator.clipboard.write as any) {\n\t\tconst { blobPromise, mimeType } = exportToImagePromiseForClipboard(editor, ids, opts)\n\n\t\tconst types: Record<string, Promise<Blob>> = { [mimeType]: blobPromise }\n\t\tconst additionalMimeType = getAdditionalClipboardWriteType(opts.format)\n\t\tif (additionalMimeType && doesClipboardSupportType(additionalMimeType)) {\n\t\t\ttypes[additionalMimeType] = blobPromise.then((blob) =>\n\t\t\t\tFileHelpers.rewriteMimeType(blob, additionalMimeType)\n\t\t\t)\n\t\t}\n\n\t\treturn clipboardWrite(types)\n\t}\n\n\tswitch (opts.format) {\n\t\tcase 'svg': {\n\t\t\treturn fallbackWriteTextAsync(async () => {\n\t\t\t\tconst result = await editor.getSvgString(ids, opts)\n\n\t\t\t\tif (!result) throw new Error('Failed to copy')\n\t\t\t\treturn result.svg\n\t\t\t})\n\t\t}\n\n\t\tcase 'png':\n\t\t\tthrow new Error('Copy not supported')\n\t\tdefault:\n\t\t\texhaustiveSwitchError(opts.format)\n\t}\n}\n\nasync function fallbackWriteTextAsync(getText: () => Promise<string>) {\n\tawait navigator.clipboard?.writeText?.(await getText())\n}\n"],
5
- "mappings": "AAAA;AAAA,EAEC;AAAA,EAGA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,wCAAwC;AAgC1C,SAAS,UACZ,MAQF;AACD,QAAM,CAAC,QAAQ,KAAK,IAAI,IACvB,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,QAAQ,KAAK,CAAC,EAAE,CAAC,IAAI;AAOrF,MAAI,CAAC,UAAU,UAAW,QAAO,QAAQ,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAC/E,MAAI,UAAU,UAAU,OAAc;AACrC,UAAM,EAAE,aAAa,SAAS,IAAI,iCAAiC,QAAQ,KAAK,IAAI;AAEpF,UAAM,QAAuC,EAAE,CAAC,QAAQ,GAAG,YAAY;AACvE,UAAM,qBAAqB,gCAAgC,KAAK,MAAM;AACtE,QAAI,sBAAsB,yBAAyB,kBAAkB,GAAG;AACvE,YAAM,kBAAkB,IAAI,YAAY;AAAA,QAAK,CAAC,SAC7C,YAAY,gBAAgB,MAAM,kBAAkB;AAAA,MACrD;AAAA,IACD;AAEA,WAAO,eAAe,KAAK;AAAA,EAC5B;AAEA,UAAQ,KAAK,QAAQ;AAAA,IACpB,KAAK,OAAO;AACX,aAAO,uBAAuB,YAAY;AACzC,cAAM,SAAS,MAAM,OAAO,aAAa,KAAK,IAAI;AAElD,YAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,gBAAgB;AAC7C,eAAO,OAAO;AAAA,MACf,CAAC;AAAA,IACF;AAAA,IAEA,KAAK;AACJ,YAAM,IAAI,MAAM,oBAAoB;AAAA,IACrC;AACC,4BAAsB,KAAK,MAAM;AAAA,EACnC;AACD;AAEA,eAAe,uBAAuB,SAAgC;AACrE,QAAM,UAAU,WAAW,YAAY,MAAM,QAAQ,CAAC;AACvD;",
4
+ "sourcesContent": ["import {\n\tEditor,\n\tFileHelpers,\n\tTLImageExportOptions,\n\tTLShapeId,\n\texhaustiveSwitchError,\n} from '@tldraw/editor'\nimport {\n\tclipboardWrite,\n\tdoesClipboardSupportType,\n\tgetAdditionalClipboardWriteType,\n} from '../clipboard'\nimport { exportToImagePromiseForClipboard } from './export'\n\n/** @public */\nexport type TLCopyType = 'svg' | 'png'\n\n/** @public */\nexport interface CopyAsOptions extends TLImageExportOptions {\n\t/** The format to copy as. */\n\tformat: TLCopyType\n}\n\n/**\n * Copy the given shapes to the clipboard.\n *\n * @param editor - The editor instance.\n * @param ids - The ids of the shapes to copy.\n * @param format - The format to copy as. Defaults to png.\n * @param opts - Options for the copy.\n *\n * @public\n */\nexport function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void> {\n\t// Note: it's important that this function itself isn't async and doesn't really use promises -\n\t// we need to create the relevant `ClipboardItem`s and call navigator.clipboard.write\n\t// synchronously to make sure safari knows that the user _wants_ to copy See\n\t// https://bugs.webkit.org/show_bug.cgi?id=222262\n\n\tif (!navigator.clipboard) return Promise.reject(new Error('Copy not supported'))\n\tif (navigator.clipboard.write as any) {\n\t\tconst { blobPromise, mimeType } = exportToImagePromiseForClipboard(editor, ids, opts)\n\n\t\tconst types: Record<string, Promise<Blob>> = { [mimeType]: blobPromise }\n\t\tconst additionalMimeType = getAdditionalClipboardWriteType(opts.format)\n\t\tif (additionalMimeType && doesClipboardSupportType(additionalMimeType)) {\n\t\t\ttypes[additionalMimeType] = blobPromise.then((blob) =>\n\t\t\t\tFileHelpers.rewriteMimeType(blob, additionalMimeType)\n\t\t\t)\n\t\t}\n\n\t\treturn clipboardWrite(types)\n\t}\n\n\tswitch (opts.format) {\n\t\tcase 'svg': {\n\t\t\treturn fallbackWriteTextAsync(async () => {\n\t\t\t\tconst result = await editor.getSvgString(ids, opts)\n\n\t\t\t\tif (!result) throw new Error('Failed to copy')\n\t\t\t\treturn result.svg\n\t\t\t})\n\t\t}\n\n\t\tcase 'png':\n\t\t\tthrow new Error('Copy not supported')\n\t\tdefault:\n\t\t\texhaustiveSwitchError(opts.format)\n\t}\n}\n\nasync function fallbackWriteTextAsync(getText: () => Promise<string>) {\n\tawait navigator.clipboard?.writeText?.(await getText())\n}\n"],
5
+ "mappings": "AAAA;AAAA,EAEC;AAAA,EAGA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,wCAAwC;AAqB1C,SAAS,OAAO,QAAgB,KAAkB,MAAoC;AAM5F,MAAI,CAAC,UAAU,UAAW,QAAO,QAAQ,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAC/E,MAAI,UAAU,UAAU,OAAc;AACrC,UAAM,EAAE,aAAa,SAAS,IAAI,iCAAiC,QAAQ,KAAK,IAAI;AAEpF,UAAM,QAAuC,EAAE,CAAC,QAAQ,GAAG,YAAY;AACvE,UAAM,qBAAqB,gCAAgC,KAAK,MAAM;AACtE,QAAI,sBAAsB,yBAAyB,kBAAkB,GAAG;AACvE,YAAM,kBAAkB,IAAI,YAAY;AAAA,QAAK,CAAC,SAC7C,YAAY,gBAAgB,MAAM,kBAAkB;AAAA,MACrD;AAAA,IACD;AAEA,WAAO,eAAe,KAAK;AAAA,EAC5B;AAEA,UAAQ,KAAK,QAAQ;AAAA,IACpB,KAAK,OAAO;AACX,aAAO,uBAAuB,YAAY;AACzC,cAAM,SAAS,MAAM,OAAO,aAAa,KAAK,IAAI;AAElD,YAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,gBAAgB;AAC7C,eAAO,OAAO;AAAA,MACf,CAAC;AAAA,IACF;AAAA,IAEA,KAAK;AACJ,YAAM,IAAI,MAAM,oBAAoB;AAAA,IACrC;AACC,4BAAsB,KAAK,MAAM;AAAA,EACnC;AACD;AAEA,eAAe,uBAAuB,SAAgC;AACrE,QAAM,UAAU,WAAW,YAAY,MAAM,QAAQ,CAAC;AACvD;",
6
6
  "names": []
7
7
  }