@excalidraw/math 0.18.0-1b287a8ba → 0.18.0-214cd6e

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