@excalidraw/math 0.18.0-4e0441e → 0.18.0-4e758db

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 (344) hide show
  1. package/dist/dev/index.js +313 -116
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/bounds.d.ts +10 -0
  7. package/dist/types/common/src/colors.d.ts +81 -39
  8. package/dist/types/common/src/constants.d.ts +75 -34
  9. package/dist/types/common/src/editorInterface.d.ts +34 -0
  10. package/dist/types/common/src/font-metadata.d.ts +1 -3
  11. package/dist/types/common/src/index.d.ts +5 -0
  12. package/dist/types/common/src/keys.d.ts +5 -1
  13. package/dist/types/common/src/points.d.ts +1 -1
  14. package/dist/types/common/src/random.d.ts +7 -0
  15. package/dist/types/common/src/utility-types.d.ts +0 -1
  16. package/dist/types/common/src/utils.d.ts +45 -77
  17. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  18. package/dist/types/element/src/Scene.d.ts +12 -8
  19. package/dist/types/element/src/align.d.ts +2 -2
  20. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  21. package/dist/types/element/src/arrowheads.d.ts +3 -0
  22. package/dist/types/element/src/arrows/focus.d.ts +30 -0
  23. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  24. package/dist/types/element/src/binding.d.ts +79 -51
  25. package/dist/types/element/src/bounds.d.ts +25 -18
  26. package/dist/types/element/src/bucketFill.d.ts +110 -0
  27. package/dist/types/element/src/collision.d.ts +7 -2
  28. package/dist/types/element/src/comparisons.d.ts +10 -7
  29. package/dist/types/element/src/convertToShape.d.ts +23 -0
  30. package/dist/types/element/src/delta.d.ts +23 -1
  31. package/dist/types/element/src/distribute.d.ts +3 -2
  32. package/dist/types/element/src/dragElements.d.ts +30 -3
  33. package/dist/types/element/src/duplicate.d.ts +7 -6
  34. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  35. package/dist/types/element/src/embeddable.d.ts +2 -2
  36. package/dist/types/element/src/flowchart.d.ts +11 -7
  37. package/dist/types/element/src/fractionalIndex.d.ts +4 -4
  38. package/dist/types/element/src/frame.d.ts +16 -11
  39. package/dist/types/element/src/groups.d.ts +9 -9
  40. package/dist/types/element/src/heading.d.ts +2 -1
  41. package/dist/types/element/src/image.d.ts +1 -11
  42. package/dist/types/element/src/index.d.ts +9 -4
  43. package/dist/types/element/src/linearElementEditor.d.ts +48 -30
  44. package/dist/types/element/src/mutateElement.d.ts +6 -2
  45. package/dist/types/element/src/newElement.d.ts +44 -8
  46. package/dist/types/element/src/renderElement.d.ts +1 -10
  47. package/dist/types/element/src/resizeElements.d.ts +12 -12
  48. package/dist/types/element/src/resizeTest.d.ts +6 -5
  49. package/dist/types/element/src/selection.d.ts +14 -14
  50. package/dist/types/element/src/shape.d.ts +21 -8
  51. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  52. package/dist/types/element/src/sortElements.d.ts +10 -0
  53. package/dist/types/element/src/stickyNote.d.ts +183 -0
  54. package/dist/types/element/src/textElement.d.ts +14 -10
  55. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  56. package/dist/types/element/src/textWrapping.d.ts +26 -0
  57. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +27 -8
  58. package/dist/types/element/src/transformHandles.d.ts +8 -27
  59. package/dist/types/element/src/typeChecks.d.ts +30 -31
  60. package/dist/types/element/src/types.d.ts +55 -20
  61. package/dist/types/element/src/utils.d.ts +15 -6
  62. package/dist/types/element/src/zindex.d.ts +7 -1
  63. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +206 -219
  64. package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
  65. package/dist/types/excalidraw/actions/actionBoundText.d.ts +122 -131
  66. package/dist/types/excalidraw/actions/actionCanvas.d.ts +446 -1594
  67. package/dist/types/excalidraw/actions/actionClipboard.d.ts +149 -919
  68. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +59 -64
  69. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +192 -208
  70. package/dist/types/excalidraw/actions/actionDeselect.d.ts +170 -0
  71. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -6
  72. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  73. package/dist/types/excalidraw/actions/actionElementLink.d.ts +66 -77
  74. package/dist/types/excalidraw/actions/actionElementLock.d.ts +121 -130
  75. package/dist/types/excalidraw/actions/actionExport.d.ts +200 -1449
  76. package/dist/types/excalidraw/actions/actionFinalize.d.ts +11 -404
  77. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  78. package/dist/types/excalidraw/actions/actionFrame.d.ts +318 -509
  79. package/dist/types/excalidraw/actions/actionGroup.d.ts +132 -149
  80. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +205 -196
  81. package/dist/types/excalidraw/actions/actionLink.d.ts +73 -78
  82. package/dist/types/excalidraw/actions/actionMenu.d.ts +60 -71
  83. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -369
  84. package/dist/types/excalidraw/actions/actionProperties.d.ts +213 -2610
  85. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +66 -75
  86. package/dist/types/excalidraw/actions/actionStyles.d.ts +60 -64
  87. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  88. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +186 -0
  89. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +74 -80
  90. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +186 -0
  91. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +73 -78
  92. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +62 -74
  93. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
  94. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +72 -77
  95. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +73 -78
  96. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +73 -78
  97. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  98. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  99. package/dist/types/excalidraw/actions/index.d.ts +4 -2
  100. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  101. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  102. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  103. package/dist/types/excalidraw/actions/types.d.ts +11 -7
  104. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  105. package/dist/types/excalidraw/appState.d.ts +50 -25
  106. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  107. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  108. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  109. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  110. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  111. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  112. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  113. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  114. package/dist/types/excalidraw/clipboard.d.ts +13 -38
  115. package/dist/types/excalidraw/components/Actions.d.ts +22 -14
  116. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  117. package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
  118. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  119. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  120. package/dist/types/excalidraw/components/App.d.ts +552 -125
  121. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  122. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  123. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  124. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  125. package/dist/types/excalidraw/components/App.wheel.d.ts +33 -0
  126. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  127. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  128. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  129. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -5
  130. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  131. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -1
  132. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  133. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  134. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  135. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  136. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  137. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  138. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  139. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  140. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -4
  141. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  142. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  143. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  144. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  145. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  146. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  147. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  148. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  149. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  150. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  151. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  152. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  153. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  154. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  155. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  156. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  157. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  158. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  159. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  160. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  161. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  162. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  163. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  164. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  165. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  166. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  167. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  168. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  169. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  170. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  171. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  172. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  173. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  174. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  175. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  176. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  177. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  178. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  179. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  180. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  181. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  182. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  183. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  184. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  185. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  186. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  187. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  188. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  189. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  190. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  191. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  192. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -3
  193. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  194. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  195. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  196. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  197. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  198. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  199. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  200. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  201. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  202. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  203. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  204. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  205. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  206. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  207. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  208. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  209. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  210. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  211. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  212. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  213. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  214. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  215. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  216. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  217. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  218. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  219. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  220. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  221. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  222. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  223. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  224. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  225. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  226. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  227. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  228. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  229. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  230. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  231. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  232. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  233. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  234. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  235. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  236. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +10 -4
  237. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  238. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  239. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +48 -38
  240. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -6
  241. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  242. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  243. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  244. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  245. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  246. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  247. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  248. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  249. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  250. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  251. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  252. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  253. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  254. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  255. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  256. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  257. package/dist/types/excalidraw/components/icons.d.ts +51 -22
  258. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +25 -3
  259. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  260. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  261. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  262. package/dist/types/excalidraw/data/blob.d.ts +354 -7
  263. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  264. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  265. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  266. package/dist/types/excalidraw/data/index.d.ts +8 -9
  267. package/dist/types/excalidraw/data/json.d.ts +183 -3
  268. package/dist/types/excalidraw/data/library.d.ts +25 -10
  269. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  270. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  271. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  272. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  273. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  274. package/dist/types/excalidraw/errors.d.ts +14 -0
  275. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  276. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  277. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  278. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  279. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  280. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  281. package/dist/types/excalidraw/i18n.d.ts +2 -2
  282. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  283. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  284. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  285. package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
  286. package/dist/types/excalidraw/renderer/helpers.d.ts +31 -8
  287. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
  288. package/dist/types/excalidraw/scene/Renderer.d.ts +477 -18
  289. package/dist/types/excalidraw/scene/export.d.ts +4 -4
  290. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  291. package/dist/types/excalidraw/scene/types.d.ts +27 -8
  292. package/dist/types/excalidraw/snapping.d.ts +12 -12
  293. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  294. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  295. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  296. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  297. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  298. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  299. package/dist/types/excalidraw/types.d.ts +566 -55
  300. package/dist/types/excalidraw/viewport.d.ts +280 -0
  301. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +8 -5
  302. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  303. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  304. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  305. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  306. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  307. package/dist/types/math/src/constants.d.ts +0 -1
  308. package/dist/types/math/src/curve.d.ts +23 -13
  309. package/dist/types/math/src/index.d.ts +1 -0
  310. package/dist/types/math/src/pca.d.ts +79 -0
  311. package/dist/types/math/src/point.d.ts +8 -2
  312. package/dist/types/math/src/polygon.d.ts +26 -2
  313. package/dist/types/math/src/range.d.ts +1 -3
  314. package/dist/types/math/src/segment.d.ts +9 -3
  315. package/dist/types/math/src/types.d.ts +25 -1
  316. package/dist/types/utils/src/export.d.ts +9 -8
  317. package/dist/types/utils/src/index.d.ts +1 -2
  318. package/dist/types/utils/src/shape.d.ts +8 -8
  319. package/package.json +2 -2
  320. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -190
  321. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  322. package/dist/types/excalidraw/charts.d.ts +0 -27
  323. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  324. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  325. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  326. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  327. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  328. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -11
  329. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  330. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  331. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  332. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  333. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  334. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  335. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  336. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  337. package/dist/types/excalidraw/cursor.d.ts +0 -5
  338. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  339. package/dist/types/excalidraw/index.d.ts +0 -47
  340. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  341. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  342. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  343. package/dist/types/utils/src/bbox.d.ts +0 -9
  344. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,195 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const actionCopy: {
3
- name: "copy";
4
- label: string;
5
- icon: import("react/jsx-runtime").JSX.Element;
6
- trackEvent: {
7
- category: "element";
8
- };
9
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => Promise<{
10
- captureUpdate: "EVENTUALLY";
11
- appState: {
12
- errorMessage: any;
13
- contextMenu: {
14
- items: import("../components/ContextMenu").ContextMenuItems;
15
- top: number;
16
- left: number;
17
- } | null;
18
- showWelcomeScreen: boolean;
19
- isLoading: boolean;
20
- activeEmbeddable: {
21
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
22
- state: "active" | "hover";
23
- } | null;
24
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
25
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
26
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
27
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
28
- isBindingEnabled: boolean;
29
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
30
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
31
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
32
- frameRendering: {
33
- enabled: boolean;
34
- name: boolean;
35
- outline: boolean;
36
- clip: boolean;
37
- };
38
- editingFrame: string | null;
39
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
40
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
41
- activeTool: {
42
- lastActiveTool: import("../types").ActiveTool | null;
43
- locked: boolean;
44
- fromSelection: boolean;
45
- } & import("../types").ActiveTool;
46
- preferredSelectionTool: {
47
- type: "selection" | "lasso";
48
- initialized: boolean;
49
- };
50
- penMode: boolean;
51
- penDetected: boolean;
52
- exportBackground: boolean;
53
- exportEmbedScene: boolean;
54
- exportWithDarkMode: boolean;
55
- exportScale: number;
56
- currentItemStrokeColor: string;
57
- currentItemBackgroundColor: string;
58
- currentItemFillStyle: import("../../element/src/types").FillStyle;
59
- currentItemStrokeWidth: number;
60
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
61
- currentItemRoughness: number;
62
- currentItemOpacity: number;
63
- currentItemFontFamily: number;
64
- currentItemFontSize: number;
65
- currentItemTextAlign: string;
66
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
67
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
68
- currentHoveredFontFamily: number | null;
69
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
70
- currentItemArrowType: "round" | "sharp" | "elbow";
71
- viewBackgroundColor: string;
72
- scrollX: number;
73
- scrollY: number;
74
- cursorButton: "up" | "down";
75
- scrolledOutside: boolean;
76
- name: string | null;
77
- isResizing: boolean;
78
- isRotating: boolean;
79
- zoom: Readonly<{
80
- value: import("../types").NormalizedZoomValue;
81
- }>;
82
- openMenu: "canvas" | null;
83
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
84
- openSidebar: {
85
- name: string;
86
- tab?: string | undefined;
87
- } | null;
88
- openDialog: {
89
- name: "imageExport" | "help" | "jsonExport";
90
- } | {
91
- name: "ttd";
92
- tab: "mermaid" | "text-to-diagram";
93
- } | {
94
- name: "commandPalette";
95
- } | {
96
- name: "elementLinkSelector";
97
- sourceElementId: string;
98
- } | null;
99
- defaultSidebarDockedPreference: boolean;
100
- lastPointerDownWith: import("../../element/src/types").PointerType;
101
- selectedElementIds: Readonly<{
102
- [id: string]: true;
103
- }>;
104
- hoveredElementIds: Readonly<{
105
- [id: string]: true;
106
- }>;
107
- previousSelectedElementIds: {
108
- [id: string]: true;
109
- };
110
- selectedElementsAreBeingDragged: boolean;
111
- shouldCacheIgnoreZoom: boolean;
112
- toast: {
113
- message: string;
114
- closable?: boolean | undefined;
115
- duration?: number | undefined;
116
- } | null;
117
- zenModeEnabled: boolean;
118
- theme: import("../../element/src/types").Theme;
119
- gridSize: number;
120
- gridStep: number;
121
- gridModeEnabled: boolean;
122
- viewModeEnabled: boolean;
123
- selectedGroupIds: {
124
- [groupId: string]: boolean;
125
- };
126
- editingGroupId: string | null;
127
- width: number;
128
- height: number;
129
- offsetTop: number;
130
- offsetLeft: number;
131
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
132
- collaborators: Map<import("../types").SocketId, Readonly<{
133
- pointer?: import("../types").CollaboratorPointer | undefined;
134
- button?: "up" | "down" | undefined;
135
- selectedElementIds?: Readonly<{
136
- [id: string]: true;
137
- }> | undefined;
138
- username?: string | null | undefined;
139
- userState?: import("@excalidraw/common").UserIdleState | undefined;
140
- color?: {
141
- background: string;
142
- stroke: string;
143
- } | undefined;
144
- avatarUrl?: string | undefined;
145
- id?: string | undefined;
146
- socketId?: import("../types").SocketId | undefined;
147
- isCurrentUser?: boolean | undefined;
148
- isInCall?: boolean | undefined;
149
- isSpeaking?: boolean | undefined;
150
- isMuted?: boolean | undefined;
151
- }>>;
152
- stats: {
153
- open: boolean;
154
- panels: number;
155
- };
156
- currentChartType: import("../../element/src/types").ChartType;
157
- pasteDialog: {
158
- shown: false;
159
- data: null;
160
- } | {
161
- shown: true;
162
- data: import("../charts").Spreadsheet;
163
- };
164
- showHyperlinkPopup: false | "editor" | "info";
165
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
166
- snapLines: readonly import("../snapping").SnapLine[];
167
- originSnapOffset: {
168
- x: number;
169
- y: number;
170
- } | null;
171
- objectsSnapModeEnabled: boolean;
172
- userToFollow: import("../types").UserToFollow | null;
173
- followedBy: Set<import("../types").SocketId>;
174
- isCropping: boolean;
175
- croppingElementId: string | null;
176
- searchMatches: Readonly<{
177
- focusedId: string | null;
178
- matches: readonly import("../types").SearchMatch[];
179
- }> | null;
180
- activeLockedId: string | null;
181
- lockedMultiSelections: {
182
- [groupId: string]: true;
183
- };
184
- stylesPanelMode: "compact" | "full" | "mobile";
185
- };
186
- } | {
187
- captureUpdate: "EVENTUALLY";
188
- appState?: undefined;
189
- }>;
190
- keyTest: undefined;
191
- } & {
192
- keyTest?: undefined;
1
+ export declare const actionCopy: import("./types").Action<ClipboardEvent | null> & {
2
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
193
3
  };
194
4
  export declare const actionPaste: {
195
5
  name: "paste";
@@ -197,7 +7,7 @@ export declare const actionPaste: {
197
7
  trackEvent: {
198
8
  category: "element";
199
9
  };
200
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: any, app: import("../types").AppClassProperties) => Promise<false | {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: unknown, app: import("../types").AppClassProperties) => Promise<false | {
201
11
  captureUpdate: "EVENTUALLY";
202
12
  appState: {
203
13
  errorMessage: string;
@@ -209,26 +19,36 @@ export declare const actionPaste: {
209
19
  showWelcomeScreen: boolean;
210
20
  isLoading: boolean;
211
21
  activeEmbeddable: {
212
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
213
- state: "active" | "hover";
22
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
+ state: "hover" | "active";
214
24
  } | null;
215
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
216
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
217
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
218
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
25
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
219
29
  isBindingEnabled: boolean;
220
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
221
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
222
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
30
+ boxSelectionMode: import("../types").BoxSelectionMode;
31
+ bindingPreference: "enabled" | "disabled";
32
+ isMidpointSnappingEnabled: boolean;
33
+ inputDevice: import("../types").InputDevice;
34
+ suggestedBinding: {
35
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
36
+ midPoint?: import("@excalidraw/math").GlobalPoint;
37
+ } | null;
38
+ hoveredArrowTextAnchor: {
39
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
40
+ anchor: "start" | "end" | "label";
41
+ } | null;
42
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
223
43
  frameRendering: {
224
44
  enabled: boolean;
225
45
  name: boolean;
226
46
  outline: boolean;
227
47
  clip: boolean;
228
48
  };
229
- editingFrame: string | null;
230
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
231
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
49
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
50
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
51
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
232
52
  activeTool: {
233
53
  lastActiveTool: import("../types").ActiveTool | null;
234
54
  locked: boolean;
@@ -245,50 +65,58 @@ export declare const actionPaste: {
245
65
  exportWithDarkMode: boolean;
246
66
  exportScale: number;
247
67
  currentItemStrokeColor: string;
68
+ currentItemStickynoteStrokeColor: string;
69
+ currentItemStickynoteBackgroundColor: string;
248
70
  currentItemBackgroundColor: string;
249
- currentItemFillStyle: import("../../element/src/types").FillStyle;
250
- currentItemStrokeWidth: number;
251
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
71
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
72
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
73
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
252
74
  currentItemRoughness: number;
75
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
253
76
  currentItemOpacity: number;
254
- currentItemFontFamily: number;
77
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
255
78
  currentItemFontSize: number;
256
- currentItemTextAlign: string;
257
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
258
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
259
- currentHoveredFontFamily: number | null;
260
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
261
- currentItemArrowType: "round" | "sharp" | "elbow";
79
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
80
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
81
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
82
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
83
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
84
+ currentItemArrowType: "sharp" | "round" | "elbow";
262
85
  viewBackgroundColor: string;
263
86
  scrollX: number;
264
87
  scrollY: number;
88
+ scrollConstraints: import("../types").ScrollConstraints | null;
265
89
  cursorButton: "up" | "down";
266
90
  scrolledOutside: boolean;
267
91
  name: string | null;
268
92
  isResizing: boolean;
269
93
  isRotating: boolean;
270
- zoom: Readonly<{
271
- value: import("../types").NormalizedZoomValue;
272
- }>;
94
+ zoom: import("../types").Zoom;
273
95
  openMenu: "canvas" | null;
274
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
96
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
275
97
  openSidebar: {
276
- name: string;
277
- tab?: string | undefined;
98
+ name: import("../types").SidebarName;
99
+ tab?: import("../types").SidebarTabName;
278
100
  } | null;
279
- openDialog: {
101
+ openDialog: null | {
280
102
  name: "imageExport" | "help" | "jsonExport";
281
103
  } | {
282
104
  name: "ttd";
283
- tab: "mermaid" | "text-to-diagram";
105
+ tab: "text-to-diagram" | "mermaid";
284
106
  } | {
285
107
  name: "commandPalette";
108
+ } | {
109
+ name: "settings";
286
110
  } | {
287
111
  name: "elementLinkSelector";
288
- sourceElementId: string;
289
- } | null;
112
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
113
+ } | {
114
+ name: "charts";
115
+ data: import("../charts").Spreadsheet;
116
+ rawText: string;
117
+ };
290
118
  defaultSidebarDockedPreference: boolean;
291
- lastPointerDownWith: import("../../element/src/types").PointerType;
119
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
292
120
  selectedElementIds: Readonly<{
293
121
  [id: string]: true;
294
122
  }>;
@@ -301,12 +129,12 @@ export declare const actionPaste: {
301
129
  selectedElementsAreBeingDragged: boolean;
302
130
  shouldCacheIgnoreZoom: boolean;
303
131
  toast: {
304
- message: string;
305
- closable?: boolean | undefined;
306
- duration?: number | undefined;
132
+ message: React.ReactNode;
133
+ closable?: boolean;
134
+ duration?: number;
307
135
  } | null;
308
136
  zenModeEnabled: boolean;
309
- theme: import("../../element/src/types").Theme;
137
+ theme: import("@excalidraw/element/types").Theme;
310
138
  gridSize: number;
311
139
  gridStep: number;
312
140
  gridModeEnabled: boolean;
@@ -314,45 +142,18 @@ export declare const actionPaste: {
314
142
  selectedGroupIds: {
315
143
  [groupId: string]: boolean;
316
144
  };
317
- editingGroupId: string | null;
145
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
318
146
  width: number;
319
147
  height: number;
320
148
  offsetTop: number;
321
149
  offsetLeft: number;
322
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
323
- collaborators: Map<import("../types").SocketId, Readonly<{
324
- pointer?: import("../types").CollaboratorPointer | undefined;
325
- button?: "up" | "down" | undefined;
326
- selectedElementIds?: Readonly<{
327
- [id: string]: true;
328
- }> | undefined;
329
- username?: string | null | undefined;
330
- userState?: import("@excalidraw/common").UserIdleState | undefined;
331
- color?: {
332
- background: string;
333
- stroke: string;
334
- } | undefined;
335
- avatarUrl?: string | undefined;
336
- id?: string | undefined;
337
- socketId?: import("../types").SocketId | undefined;
338
- isCurrentUser?: boolean | undefined;
339
- isInCall?: boolean | undefined;
340
- isSpeaking?: boolean | undefined;
341
- isMuted?: boolean | undefined;
342
- }>>;
150
+ fileHandle: FileSystemFileHandle | null;
151
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
343
152
  stats: {
344
153
  open: boolean;
345
154
  panels: number;
346
155
  };
347
- currentChartType: import("../../element/src/types").ChartType;
348
- pasteDialog: {
349
- shown: false;
350
- data: null;
351
- } | {
352
- shown: true;
353
- data: import("../charts").Spreadsheet;
354
- };
355
- showHyperlinkPopup: false | "editor" | "info";
156
+ showHyperlinkPopup: false | "info" | "editor";
356
157
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
357
158
  snapLines: readonly import("../snapping").SnapLine[];
358
159
  originSnapOffset: {
@@ -360,19 +161,24 @@ export declare const actionPaste: {
360
161
  y: number;
361
162
  } | null;
362
163
  objectsSnapModeEnabled: boolean;
363
- userToFollow: import("../types").UserToFollow | null;
364
- followedBy: Set<import("../types").SocketId>;
365
164
  isCropping: boolean;
366
- croppingElementId: string | null;
165
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
367
166
  searchMatches: Readonly<{
368
- focusedId: string | null;
167
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
369
168
  matches: readonly import("../types").SearchMatch[];
370
169
  }> | null;
371
170
  activeLockedId: string | null;
372
171
  lockedMultiSelections: {
373
172
  [groupId: string]: true;
374
173
  };
375
- stylesPanelMode: "compact" | "full" | "mobile";
174
+ bindMode: import("@excalidraw/element/types").BindMode;
175
+ colorTopPicks: {
176
+ elementStroke: readonly string[] | null;
177
+ elementBackground: readonly string[] | null;
178
+ bucketFill: readonly string[] | null;
179
+ stickyNoteStroke: readonly string[] | null;
180
+ stickyNoteBackground: readonly string[] | null;
181
+ };
376
182
  };
377
183
  } | {
378
184
  captureUpdate: "EVENTUALLY";
@@ -382,580 +188,8 @@ export declare const actionPaste: {
382
188
  } & {
383
189
  keyTest?: undefined;
384
190
  };
385
- export declare const actionCut: {
386
- name: "cut";
387
- label: string;
388
- icon: import("react/jsx-runtime").JSX.Element;
389
- trackEvent: {
390
- category: "element";
391
- };
392
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => false | {
393
- elements: import("../../element/src/types").OrderedExcalidrawElement[];
394
- appState: {
395
- selectedLinearElement: null;
396
- contextMenu: {
397
- items: import("../components/ContextMenu").ContextMenuItems;
398
- top: number;
399
- left: number;
400
- } | null;
401
- showWelcomeScreen: boolean;
402
- isLoading: boolean;
403
- errorMessage: import("react").ReactNode;
404
- activeEmbeddable: {
405
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
406
- state: "active" | "hover";
407
- } | null;
408
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
409
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
410
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
411
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
412
- isBindingEnabled: boolean;
413
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
414
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
415
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
416
- frameRendering: {
417
- enabled: boolean;
418
- name: boolean;
419
- outline: boolean;
420
- clip: boolean;
421
- };
422
- editingFrame: string | null;
423
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
424
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
425
- activeTool: {
426
- lastActiveTool: import("../types").ActiveTool | null;
427
- locked: boolean;
428
- fromSelection: boolean;
429
- } & import("../types").ActiveTool;
430
- preferredSelectionTool: {
431
- type: "selection" | "lasso";
432
- initialized: boolean;
433
- };
434
- penMode: boolean;
435
- penDetected: boolean;
436
- exportBackground: boolean;
437
- exportEmbedScene: boolean;
438
- exportWithDarkMode: boolean;
439
- exportScale: number;
440
- currentItemStrokeColor: string;
441
- currentItemBackgroundColor: string;
442
- currentItemFillStyle: import("../../element/src/types").FillStyle;
443
- currentItemStrokeWidth: number;
444
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
445
- currentItemRoughness: number;
446
- currentItemOpacity: number;
447
- currentItemFontFamily: number;
448
- currentItemFontSize: number;
449
- currentItemTextAlign: string;
450
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
451
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
452
- currentHoveredFontFamily: number | null;
453
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
454
- currentItemArrowType: "round" | "sharp" | "elbow";
455
- viewBackgroundColor: string;
456
- scrollX: number;
457
- scrollY: number;
458
- cursorButton: "up" | "down";
459
- scrolledOutside: boolean;
460
- name: string | null;
461
- isResizing: boolean;
462
- isRotating: boolean;
463
- zoom: Readonly<{
464
- value: import("../types").NormalizedZoomValue;
465
- }>;
466
- openMenu: "canvas" | null;
467
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
468
- openSidebar: {
469
- name: string;
470
- tab?: string | undefined;
471
- } | null;
472
- openDialog: {
473
- name: "imageExport" | "help" | "jsonExport";
474
- } | {
475
- name: "ttd";
476
- tab: "mermaid" | "text-to-diagram";
477
- } | {
478
- name: "commandPalette";
479
- } | {
480
- name: "elementLinkSelector";
481
- sourceElementId: string;
482
- } | null;
483
- defaultSidebarDockedPreference: boolean;
484
- lastPointerDownWith: import("../../element/src/types").PointerType;
485
- selectedElementIds: Readonly<{
486
- [id: string]: true;
487
- }>;
488
- hoveredElementIds: Readonly<{
489
- [id: string]: true;
490
- }>;
491
- previousSelectedElementIds: {
492
- [id: string]: true;
493
- };
494
- selectedElementsAreBeingDragged: boolean;
495
- shouldCacheIgnoreZoom: boolean;
496
- toast: {
497
- message: string;
498
- closable?: boolean | undefined;
499
- duration?: number | undefined;
500
- } | null;
501
- zenModeEnabled: boolean;
502
- theme: import("../../element/src/types").Theme;
503
- gridSize: number;
504
- gridStep: number;
505
- gridModeEnabled: boolean;
506
- viewModeEnabled: boolean;
507
- selectedGroupIds: {
508
- [groupId: string]: boolean;
509
- };
510
- editingGroupId: string | null;
511
- width: number;
512
- height: number;
513
- offsetTop: number;
514
- offsetLeft: number;
515
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
516
- collaborators: Map<import("../types").SocketId, Readonly<{
517
- pointer?: import("../types").CollaboratorPointer | undefined;
518
- button?: "up" | "down" | undefined;
519
- selectedElementIds?: Readonly<{
520
- [id: string]: true;
521
- }> | undefined;
522
- username?: string | null | undefined;
523
- userState?: import("@excalidraw/common").UserIdleState | undefined;
524
- color?: {
525
- background: string;
526
- stroke: string;
527
- } | undefined;
528
- avatarUrl?: string | undefined;
529
- id?: string | undefined;
530
- socketId?: import("../types").SocketId | undefined;
531
- isCurrentUser?: boolean | undefined;
532
- isInCall?: boolean | undefined;
533
- isSpeaking?: boolean | undefined;
534
- isMuted?: boolean | undefined;
535
- }>>;
536
- stats: {
537
- open: boolean;
538
- panels: number;
539
- };
540
- currentChartType: import("../../element/src/types").ChartType;
541
- pasteDialog: {
542
- shown: false;
543
- data: null;
544
- } | {
545
- shown: true;
546
- data: import("../charts").Spreadsheet;
547
- };
548
- showHyperlinkPopup: false | "editor" | "info";
549
- snapLines: readonly import("../snapping").SnapLine[];
550
- originSnapOffset: {
551
- x: number;
552
- y: number;
553
- } | null;
554
- objectsSnapModeEnabled: boolean;
555
- userToFollow: import("../types").UserToFollow | null;
556
- followedBy: Set<import("../types").SocketId>;
557
- isCropping: boolean;
558
- croppingElementId: string | null;
559
- searchMatches: Readonly<{
560
- focusedId: string | null;
561
- matches: readonly import("../types").SearchMatch[];
562
- }> | null;
563
- activeLockedId: string | null;
564
- lockedMultiSelections: {
565
- [groupId: string]: true;
566
- };
567
- stylesPanelMode: "compact" | "full" | "mobile";
568
- };
569
- captureUpdate: "IMMEDIATELY";
570
- } | {
571
- elements: readonly import("../../element/src/types").OrderedExcalidrawElement[];
572
- appState: {
573
- selectedLinearElement: {
574
- selectedPointsIndices: number[];
575
- startBindingElement: import("../../element/src/types").ExcalidrawBindableElement | "keep" | null;
576
- endBindingElement: import("../../element/src/types").ExcalidrawBindableElement | "keep" | null;
577
- elementId: string & {
578
- _brand: "excalidrawLinearElementId";
579
- };
580
- pointerDownState: Readonly<{
581
- prevSelectedPointsIndices: readonly number[] | null;
582
- lastClickedPoint: number;
583
- lastClickedIsEndPoint: boolean;
584
- origin: Readonly<{
585
- x: number;
586
- y: number;
587
- }> | null;
588
- segmentMidpoint: {
589
- value: import("@excalidraw/math").GlobalPoint | null;
590
- index: number | null;
591
- added: boolean;
592
- };
593
- }>;
594
- isDragging: boolean;
595
- lastUncommittedPoint: import("@excalidraw/math").LocalPoint | null;
596
- pointerOffset: Readonly<{
597
- x: number;
598
- y: number;
599
- }>;
600
- hoverPointIndex: number;
601
- segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
602
- elbowed: boolean;
603
- customLineAngle: number | null;
604
- isEditing: boolean;
605
- };
606
- contextMenu: {
607
- items: import("../components/ContextMenu").ContextMenuItems;
608
- top: number;
609
- left: number;
610
- } | null;
611
- showWelcomeScreen: boolean;
612
- isLoading: boolean;
613
- errorMessage: import("react").ReactNode;
614
- activeEmbeddable: {
615
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
616
- state: "active" | "hover";
617
- } | null;
618
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
619
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
620
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
621
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
622
- isBindingEnabled: boolean;
623
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
624
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
625
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
626
- frameRendering: {
627
- enabled: boolean;
628
- name: boolean;
629
- outline: boolean;
630
- clip: boolean;
631
- };
632
- editingFrame: string | null;
633
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
634
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
635
- activeTool: {
636
- lastActiveTool: import("../types").ActiveTool | null;
637
- locked: boolean;
638
- fromSelection: boolean;
639
- } & import("../types").ActiveTool;
640
- preferredSelectionTool: {
641
- type: "selection" | "lasso";
642
- initialized: boolean;
643
- };
644
- penMode: boolean;
645
- penDetected: boolean;
646
- exportBackground: boolean;
647
- exportEmbedScene: boolean;
648
- exportWithDarkMode: boolean;
649
- exportScale: number;
650
- currentItemStrokeColor: string;
651
- currentItemBackgroundColor: string;
652
- currentItemFillStyle: import("../../element/src/types").FillStyle;
653
- currentItemStrokeWidth: number;
654
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
655
- currentItemRoughness: number;
656
- currentItemOpacity: number;
657
- currentItemFontFamily: number;
658
- currentItemFontSize: number;
659
- currentItemTextAlign: string;
660
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
661
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
662
- currentHoveredFontFamily: number | null;
663
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
664
- currentItemArrowType: "round" | "sharp" | "elbow";
665
- viewBackgroundColor: string;
666
- scrollX: number;
667
- scrollY: number;
668
- cursorButton: "up" | "down";
669
- scrolledOutside: boolean;
670
- name: string | null;
671
- isResizing: boolean;
672
- isRotating: boolean;
673
- zoom: Readonly<{
674
- value: import("../types").NormalizedZoomValue;
675
- }>;
676
- openMenu: "canvas" | null;
677
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
678
- openSidebar: {
679
- name: string;
680
- tab?: string | undefined;
681
- } | null;
682
- openDialog: {
683
- name: "imageExport" | "help" | "jsonExport";
684
- } | {
685
- name: "ttd";
686
- tab: "mermaid" | "text-to-diagram";
687
- } | {
688
- name: "commandPalette";
689
- } | {
690
- name: "elementLinkSelector";
691
- sourceElementId: string;
692
- } | null;
693
- defaultSidebarDockedPreference: boolean;
694
- lastPointerDownWith: import("../../element/src/types").PointerType;
695
- selectedElementIds: Readonly<{
696
- [id: string]: true;
697
- }>;
698
- hoveredElementIds: Readonly<{
699
- [id: string]: true;
700
- }>;
701
- previousSelectedElementIds: {
702
- [id: string]: true;
703
- };
704
- selectedElementsAreBeingDragged: boolean;
705
- shouldCacheIgnoreZoom: boolean;
706
- toast: {
707
- message: string;
708
- closable?: boolean | undefined;
709
- duration?: number | undefined;
710
- } | null;
711
- zenModeEnabled: boolean;
712
- theme: import("../../element/src/types").Theme;
713
- gridSize: number;
714
- gridStep: number;
715
- gridModeEnabled: boolean;
716
- viewModeEnabled: boolean;
717
- selectedGroupIds: {
718
- [groupId: string]: boolean;
719
- };
720
- editingGroupId: string | null;
721
- width: number;
722
- height: number;
723
- offsetTop: number;
724
- offsetLeft: number;
725
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
726
- collaborators: Map<import("../types").SocketId, Readonly<{
727
- pointer?: import("../types").CollaboratorPointer | undefined;
728
- button?: "up" | "down" | undefined;
729
- selectedElementIds?: Readonly<{
730
- [id: string]: true;
731
- }> | undefined;
732
- username?: string | null | undefined;
733
- userState?: import("@excalidraw/common").UserIdleState | undefined;
734
- color?: {
735
- background: string;
736
- stroke: string;
737
- } | undefined;
738
- avatarUrl?: string | undefined;
739
- id?: string | undefined;
740
- socketId?: import("../types").SocketId | undefined;
741
- isCurrentUser?: boolean | undefined;
742
- isInCall?: boolean | undefined;
743
- isSpeaking?: boolean | undefined;
744
- isMuted?: boolean | undefined;
745
- }>>;
746
- stats: {
747
- open: boolean;
748
- panels: number;
749
- };
750
- currentChartType: import("../../element/src/types").ChartType;
751
- pasteDialog: {
752
- shown: false;
753
- data: null;
754
- } | {
755
- shown: true;
756
- data: import("../charts").Spreadsheet;
757
- };
758
- showHyperlinkPopup: false | "editor" | "info";
759
- snapLines: readonly import("../snapping").SnapLine[];
760
- originSnapOffset: {
761
- x: number;
762
- y: number;
763
- } | null;
764
- objectsSnapModeEnabled: boolean;
765
- userToFollow: import("../types").UserToFollow | null;
766
- followedBy: Set<import("../types").SocketId>;
767
- isCropping: boolean;
768
- croppingElementId: string | null;
769
- searchMatches: Readonly<{
770
- focusedId: string | null;
771
- matches: readonly import("../types").SearchMatch[];
772
- }> | null;
773
- activeLockedId: string | null;
774
- lockedMultiSelections: {
775
- [groupId: string]: true;
776
- };
777
- stylesPanelMode: "compact" | "full" | "mobile";
778
- };
779
- captureUpdate: "IMMEDIATELY";
780
- } | {
781
- elements: import("../../element/src/types").ExcalidrawElement[];
782
- appState: {
783
- activeTool: {
784
- lastActiveTool: import("../types").ActiveTool | null;
785
- locked: boolean;
786
- fromSelection: boolean;
787
- } & import("../types").ActiveTool;
788
- multiElement: null;
789
- activeEmbeddable: null;
790
- selectedLinearElement: null;
791
- editingGroupId: string | null;
792
- selectedElementIds: Readonly<{
793
- [id: string]: true;
794
- }>;
795
- selectedGroupIds: {
796
- [groupId: string]: boolean;
797
- };
798
- contextMenu: {
799
- items: import("../components/ContextMenu").ContextMenuItems;
800
- top: number;
801
- left: number;
802
- } | null;
803
- showWelcomeScreen: boolean;
804
- isLoading: boolean;
805
- errorMessage: import("react").ReactNode;
806
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
807
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
808
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
809
- isBindingEnabled: boolean;
810
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
811
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
812
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
813
- frameRendering: {
814
- enabled: boolean;
815
- name: boolean;
816
- outline: boolean;
817
- clip: boolean;
818
- };
819
- editingFrame: string | null;
820
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
821
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
822
- preferredSelectionTool: {
823
- type: "selection" | "lasso";
824
- initialized: boolean;
825
- };
826
- penMode: boolean;
827
- penDetected: boolean;
828
- exportBackground: boolean;
829
- exportEmbedScene: boolean;
830
- exportWithDarkMode: boolean;
831
- exportScale: number;
832
- currentItemStrokeColor: string;
833
- currentItemBackgroundColor: string;
834
- currentItemFillStyle: import("../../element/src/types").FillStyle;
835
- currentItemStrokeWidth: number;
836
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
837
- currentItemRoughness: number;
838
- currentItemOpacity: number;
839
- currentItemFontFamily: number;
840
- currentItemFontSize: number;
841
- currentItemTextAlign: string;
842
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
843
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
844
- currentHoveredFontFamily: number | null;
845
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
846
- currentItemArrowType: "round" | "sharp" | "elbow";
847
- viewBackgroundColor: string;
848
- scrollX: number;
849
- scrollY: number;
850
- cursorButton: "up" | "down";
851
- scrolledOutside: boolean;
852
- name: string | null;
853
- isResizing: boolean;
854
- isRotating: boolean;
855
- zoom: Readonly<{
856
- value: import("../types").NormalizedZoomValue;
857
- }>;
858
- openMenu: "canvas" | null;
859
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
860
- openSidebar: {
861
- name: string;
862
- tab?: string | undefined;
863
- } | null;
864
- openDialog: {
865
- name: "imageExport" | "help" | "jsonExport";
866
- } | {
867
- name: "ttd";
868
- tab: "mermaid" | "text-to-diagram";
869
- } | {
870
- name: "commandPalette";
871
- } | {
872
- name: "elementLinkSelector";
873
- sourceElementId: string;
874
- } | null;
875
- defaultSidebarDockedPreference: boolean;
876
- lastPointerDownWith: import("../../element/src/types").PointerType;
877
- hoveredElementIds: Readonly<{
878
- [id: string]: true;
879
- }>;
880
- previousSelectedElementIds: {
881
- [id: string]: true;
882
- };
883
- selectedElementsAreBeingDragged: boolean;
884
- shouldCacheIgnoreZoom: boolean;
885
- toast: {
886
- message: string;
887
- closable?: boolean | undefined;
888
- duration?: number | undefined;
889
- } | null;
890
- zenModeEnabled: boolean;
891
- theme: import("../../element/src/types").Theme;
892
- gridSize: number;
893
- gridStep: number;
894
- gridModeEnabled: boolean;
895
- viewModeEnabled: boolean;
896
- width: number;
897
- height: number;
898
- offsetTop: number;
899
- offsetLeft: number;
900
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
901
- collaborators: Map<import("../types").SocketId, Readonly<{
902
- pointer?: import("../types").CollaboratorPointer | undefined;
903
- button?: "up" | "down" | undefined;
904
- selectedElementIds?: Readonly<{
905
- [id: string]: true;
906
- }> | undefined;
907
- username?: string | null | undefined;
908
- userState?: import("@excalidraw/common").UserIdleState | undefined;
909
- color?: {
910
- background: string;
911
- stroke: string;
912
- } | undefined;
913
- avatarUrl?: string | undefined;
914
- id?: string | undefined;
915
- socketId?: import("../types").SocketId | undefined;
916
- isCurrentUser?: boolean | undefined;
917
- isInCall?: boolean | undefined;
918
- isSpeaking?: boolean | undefined;
919
- isMuted?: boolean | undefined;
920
- }>>;
921
- stats: {
922
- open: boolean;
923
- panels: number;
924
- };
925
- currentChartType: import("../../element/src/types").ChartType;
926
- pasteDialog: {
927
- shown: false;
928
- data: null;
929
- } | {
930
- shown: true;
931
- data: import("../charts").Spreadsheet;
932
- };
933
- showHyperlinkPopup: false | "editor" | "info";
934
- snapLines: readonly import("../snapping").SnapLine[];
935
- originSnapOffset: {
936
- x: number;
937
- y: number;
938
- } | null;
939
- objectsSnapModeEnabled: boolean;
940
- userToFollow: import("../types").UserToFollow | null;
941
- followedBy: Set<import("../types").SocketId>;
942
- isCropping: boolean;
943
- croppingElementId: string | null;
944
- searchMatches: Readonly<{
945
- focusedId: string | null;
946
- matches: readonly import("../types").SearchMatch[];
947
- }> | null;
948
- activeLockedId: string | null;
949
- lockedMultiSelections: {
950
- [groupId: string]: true;
951
- };
952
- stylesPanelMode: "compact" | "full" | "mobile";
953
- };
954
- captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
955
- };
956
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
957
- } & {
958
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
191
+ export declare const actionCut: import("./types").Action<ClipboardEvent | null> & {
192
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
959
193
  };
960
194
  export declare const actionCopyAsSvg: {
961
195
  name: "copyAsSvg";
@@ -964,7 +198,7 @@ export declare const actionCopyAsSvg: {
964
198
  trackEvent: {
965
199
  category: "element";
966
200
  };
967
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
201
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: unknown, app: import("../types").AppClassProperties) => Promise<{
968
202
  captureUpdate: "EVENTUALLY";
969
203
  appState?: undefined;
970
204
  } | {
@@ -982,7 +216,7 @@ export declare const actionCopyAsSvg: {
982
216
  };
983
217
  captureUpdate: "EVENTUALLY";
984
218
  }>;
985
- predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[]) => boolean;
219
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[]) => boolean;
986
220
  keywords: string[];
987
221
  } & {
988
222
  keyTest?: undefined;
@@ -994,7 +228,7 @@ export declare const actionCopyAsPng: {
994
228
  trackEvent: {
995
229
  category: "element";
996
230
  };
997
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
231
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: unknown, app: import("../types").AppClassProperties) => Promise<{
998
232
  captureUpdate: "EVENTUALLY";
999
233
  appState?: undefined;
1000
234
  } | {
@@ -1008,26 +242,36 @@ export declare const actionCopyAsPng: {
1008
242
  showWelcomeScreen: boolean;
1009
243
  isLoading: boolean;
1010
244
  activeEmbeddable: {
1011
- element: import("../../element/src/types").NonDeletedExcalidrawElement;
1012
- state: "active" | "hover";
245
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
246
+ state: "hover" | "active";
1013
247
  } | null;
1014
- newElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawNonSelectionElement> | null;
1015
- resizingElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
1016
- multiElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawLinearElement> | null;
1017
- selectionElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
248
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
249
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
250
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
251
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1018
252
  isBindingEnabled: boolean;
1019
- startBoundElement: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawBindableElement> | null;
1020
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
1021
- frameToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawFrameLikeElement> | null;
253
+ boxSelectionMode: import("../types").BoxSelectionMode;
254
+ bindingPreference: "enabled" | "disabled";
255
+ isMidpointSnappingEnabled: boolean;
256
+ inputDevice: import("../types").InputDevice;
257
+ suggestedBinding: {
258
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
259
+ midPoint?: import("@excalidraw/math").GlobalPoint;
260
+ } | null;
261
+ hoveredArrowTextAnchor: {
262
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
263
+ anchor: "start" | "end" | "label";
264
+ } | null;
265
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1022
266
  frameRendering: {
1023
267
  enabled: boolean;
1024
268
  name: boolean;
1025
269
  outline: boolean;
1026
270
  clip: boolean;
1027
271
  };
1028
- editingFrame: string | null;
1029
- elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
1030
- editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
272
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
273
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
274
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1031
275
  activeTool: {
1032
276
  lastActiveTool: import("../types").ActiveTool | null;
1033
277
  locked: boolean;
@@ -1044,50 +288,58 @@ export declare const actionCopyAsPng: {
1044
288
  exportWithDarkMode: boolean;
1045
289
  exportScale: number;
1046
290
  currentItemStrokeColor: string;
291
+ currentItemStickynoteStrokeColor: string;
292
+ currentItemStickynoteBackgroundColor: string;
1047
293
  currentItemBackgroundColor: string;
1048
- currentItemFillStyle: import("../../element/src/types").FillStyle;
1049
- currentItemStrokeWidth: number;
1050
- currentItemStrokeStyle: import("../../element/src/types").StrokeStyle;
294
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
295
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
296
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1051
297
  currentItemRoughness: number;
298
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1052
299
  currentItemOpacity: number;
1053
- currentItemFontFamily: number;
300
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1054
301
  currentItemFontSize: number;
1055
- currentItemTextAlign: string;
1056
- currentItemStartArrowhead: import("../../element/src/types").Arrowhead | null;
1057
- currentItemEndArrowhead: import("../../element/src/types").Arrowhead | null;
1058
- currentHoveredFontFamily: number | null;
1059
- currentItemRoundness: import("../../element/src/types").StrokeRoundness;
1060
- currentItemArrowType: "round" | "sharp" | "elbow";
302
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
303
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
304
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
305
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
306
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
307
+ currentItemArrowType: "sharp" | "round" | "elbow";
1061
308
  viewBackgroundColor: string;
1062
309
  scrollX: number;
1063
310
  scrollY: number;
311
+ scrollConstraints: import("../types").ScrollConstraints | null;
1064
312
  cursorButton: "up" | "down";
1065
313
  scrolledOutside: boolean;
1066
314
  name: string | null;
1067
315
  isResizing: boolean;
1068
316
  isRotating: boolean;
1069
- zoom: Readonly<{
1070
- value: import("../types").NormalizedZoomValue;
1071
- }>;
317
+ zoom: import("../types").Zoom;
1072
318
  openMenu: "canvas" | null;
1073
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
319
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1074
320
  openSidebar: {
1075
- name: string;
1076
- tab?: string | undefined;
321
+ name: import("../types").SidebarName;
322
+ tab?: import("../types").SidebarTabName;
1077
323
  } | null;
1078
- openDialog: {
324
+ openDialog: null | {
1079
325
  name: "imageExport" | "help" | "jsonExport";
1080
326
  } | {
1081
327
  name: "ttd";
1082
- tab: "mermaid" | "text-to-diagram";
328
+ tab: "text-to-diagram" | "mermaid";
1083
329
  } | {
1084
330
  name: "commandPalette";
331
+ } | {
332
+ name: "settings";
1085
333
  } | {
1086
334
  name: "elementLinkSelector";
1087
- sourceElementId: string;
1088
- } | null;
335
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
336
+ } | {
337
+ name: "charts";
338
+ data: import("../charts").Spreadsheet;
339
+ rawText: string;
340
+ };
1089
341
  defaultSidebarDockedPreference: boolean;
1090
- lastPointerDownWith: import("../../element/src/types").PointerType;
342
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1091
343
  selectedElementIds: Readonly<{
1092
344
  [id: string]: true;
1093
345
  }>;
@@ -1100,12 +352,12 @@ export declare const actionCopyAsPng: {
1100
352
  selectedElementsAreBeingDragged: boolean;
1101
353
  shouldCacheIgnoreZoom: boolean;
1102
354
  toast: {
1103
- message: string;
1104
- closable?: boolean | undefined;
1105
- duration?: number | undefined;
355
+ message: React.ReactNode;
356
+ closable?: boolean;
357
+ duration?: number;
1106
358
  } | null;
1107
359
  zenModeEnabled: boolean;
1108
- theme: import("../../element/src/types").Theme;
360
+ theme: import("@excalidraw/element/types").Theme;
1109
361
  gridSize: number;
1110
362
  gridStep: number;
1111
363
  gridModeEnabled: boolean;
@@ -1113,45 +365,18 @@ export declare const actionCopyAsPng: {
1113
365
  selectedGroupIds: {
1114
366
  [groupId: string]: boolean;
1115
367
  };
1116
- editingGroupId: string | null;
368
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1117
369
  width: number;
1118
370
  height: number;
1119
371
  offsetTop: number;
1120
372
  offsetLeft: number;
1121
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1122
- collaborators: Map<import("../types").SocketId, Readonly<{
1123
- pointer?: import("../types").CollaboratorPointer | undefined;
1124
- button?: "up" | "down" | undefined;
1125
- selectedElementIds?: Readonly<{
1126
- [id: string]: true;
1127
- }> | undefined;
1128
- username?: string | null | undefined;
1129
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1130
- color?: {
1131
- background: string;
1132
- stroke: string;
1133
- } | undefined;
1134
- avatarUrl?: string | undefined;
1135
- id?: string | undefined;
1136
- socketId?: import("../types").SocketId | undefined;
1137
- isCurrentUser?: boolean | undefined;
1138
- isInCall?: boolean | undefined;
1139
- isSpeaking?: boolean | undefined;
1140
- isMuted?: boolean | undefined;
1141
- }>>;
373
+ fileHandle: FileSystemFileHandle | null;
374
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1142
375
  stats: {
1143
376
  open: boolean;
1144
377
  panels: number;
1145
378
  };
1146
- currentChartType: import("../../element/src/types").ChartType;
1147
- pasteDialog: {
1148
- shown: false;
1149
- data: null;
1150
- } | {
1151
- shown: true;
1152
- data: import("../charts").Spreadsheet;
1153
- };
1154
- showHyperlinkPopup: false | "editor" | "info";
379
+ showHyperlinkPopup: false | "info" | "editor";
1155
380
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1156
381
  snapLines: readonly import("../snapping").SnapLine[];
1157
382
  originSnapOffset: {
@@ -1159,23 +384,28 @@ export declare const actionCopyAsPng: {
1159
384
  y: number;
1160
385
  } | null;
1161
386
  objectsSnapModeEnabled: boolean;
1162
- userToFollow: import("../types").UserToFollow | null;
1163
- followedBy: Set<import("../types").SocketId>;
1164
387
  isCropping: boolean;
1165
- croppingElementId: string | null;
388
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1166
389
  searchMatches: Readonly<{
1167
- focusedId: string | null;
390
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1168
391
  matches: readonly import("../types").SearchMatch[];
1169
392
  }> | null;
1170
393
  activeLockedId: string | null;
1171
394
  lockedMultiSelections: {
1172
395
  [groupId: string]: true;
1173
396
  };
1174
- stylesPanelMode: "compact" | "full" | "mobile";
397
+ bindMode: import("@excalidraw/element/types").BindMode;
398
+ colorTopPicks: {
399
+ elementStroke: readonly string[] | null;
400
+ elementBackground: readonly string[] | null;
401
+ bucketFill: readonly string[] | null;
402
+ stickyNoteStroke: readonly string[] | null;
403
+ stickyNoteBackground: readonly string[] | null;
404
+ };
1175
405
  };
1176
406
  captureUpdate: "EVENTUALLY";
1177
407
  }>;
1178
- predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[]) => boolean;
408
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[]) => boolean;
1179
409
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1180
410
  keywords: string[];
1181
411
  } & {
@@ -1187,10 +417,10 @@ export declare const copyText: {
1187
417
  trackEvent: {
1188
418
  category: "element";
1189
419
  };
1190
- perform: (elements: readonly import("../../element/src/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
420
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1191
421
  captureUpdate: "EVENTUALLY";
1192
422
  };
1193
- predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
423
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1194
424
  keywords: string[];
1195
425
  } & {
1196
426
  keyTest?: undefined;