@excalidraw/common 0.18.0-508de2f3a → 0.18.0-51ca8ab

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 (296) hide show
  1. package/dist/dev/index.js +1693 -324
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +3 -3
  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 +59 -39
  8. package/dist/types/common/src/constants.d.ts +47 -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 +1 -1
  13. package/dist/types/common/src/utility-types.d.ts +0 -1
  14. package/dist/types/common/src/utils.d.ts +47 -77
  15. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  16. package/dist/types/element/src/Scene.d.ts +11 -7
  17. package/dist/types/element/src/arrowheads.d.ts +3 -0
  18. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  19. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  20. package/dist/types/element/src/binding.d.ts +67 -48
  21. package/dist/types/element/src/bounds.d.ts +25 -18
  22. package/dist/types/element/src/collision.d.ts +7 -2
  23. package/dist/types/element/src/comparisons.d.ts +8 -7
  24. package/dist/types/element/src/delta.d.ts +4 -5
  25. package/dist/types/element/src/distribute.d.ts +2 -1
  26. package/dist/types/element/src/dragElements.d.ts +3 -3
  27. package/dist/types/element/src/duplicate.d.ts +4 -3
  28. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  29. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  30. package/dist/types/element/src/frame.d.ts +14 -9
  31. package/dist/types/element/src/heading.d.ts +2 -1
  32. package/dist/types/element/src/image.d.ts +1 -11
  33. package/dist/types/element/src/index.d.ts +5 -3
  34. package/dist/types/element/src/linearElementEditor.d.ts +23 -22
  35. package/dist/types/element/src/mutateElement.d.ts +5 -2
  36. package/dist/types/element/src/newElement.d.ts +7 -6
  37. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  38. package/dist/types/element/src/renderElement.d.ts +4 -7
  39. package/dist/types/element/src/resizeElements.d.ts +10 -10
  40. package/dist/types/element/src/resizeTest.d.ts +6 -5
  41. package/dist/types/element/src/selection.d.ts +10 -10
  42. package/dist/types/element/src/shape.d.ts +9 -8
  43. package/dist/types/element/src/store.d.ts +5 -0
  44. package/dist/types/element/src/textElement.d.ts +2 -2
  45. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  46. package/dist/types/element/src/textWrapping.d.ts +26 -0
  47. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  48. package/dist/types/element/src/transformHandles.d.ts +8 -27
  49. package/dist/types/element/src/typeChecks.d.ts +5 -7
  50. package/dist/types/element/src/types.d.ts +18 -13
  51. package/dist/types/element/src/utils.d.ts +9 -4
  52. package/dist/types/element/src/zindex.d.ts +7 -1
  53. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +176 -210
  54. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  55. package/dist/types/excalidraw/actions/actionBoundText.d.ts +100 -123
  56. package/dist/types/excalidraw/actions/actionCanvas.d.ts +545 -1218
  57. package/dist/types/excalidraw/actions/actionClipboard.d.ts +129 -893
  58. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +48 -60
  59. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +160 -198
  60. package/dist/types/excalidraw/actions/actionDeselect.d.ts +161 -0
  61. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  62. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  63. package/dist/types/excalidraw/actions/actionElementLink.d.ts +56 -74
  64. package/dist/types/excalidraw/actions/actionElementLock.d.ts +98 -121
  65. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +62 -74
  66. package/dist/types/excalidraw/actions/actionExport.d.ts +180 -1408
  67. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  68. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  69. package/dist/types/excalidraw/actions/actionFrame.d.ts +317 -399
  70. package/dist/types/excalidraw/actions/actionGroup.d.ts +103 -134
  71. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +184 -233
  72. package/dist/types/excalidraw/actions/actionLink.d.ts +62 -74
  73. package/dist/types/excalidraw/actions/actionMenu.d.ts +51 -435
  74. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  75. package/dist/types/excalidraw/actions/actionProperties.d.ts +166 -2510
  76. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +51 -67
  77. package/dist/types/excalidraw/actions/actionStyles.d.ts +48 -59
  78. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  79. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +174 -0
  80. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +62 -74
  81. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +174 -0
  82. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +62 -74
  83. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +50 -68
  84. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  85. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +61 -73
  86. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +62 -74
  87. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +62 -74
  88. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  89. package/dist/types/excalidraw/actions/index.d.ts +5 -2
  90. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  91. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  92. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  93. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  94. package/dist/types/excalidraw/appState.d.ts +45 -36
  95. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  96. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  97. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  98. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  99. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  100. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  101. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  102. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  103. package/dist/types/excalidraw/clipboard.d.ts +59 -21
  104. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  105. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  106. package/dist/types/excalidraw/components/App.d.ts +168 -103
  107. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  108. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  109. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  110. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  111. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  112. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  113. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  114. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  115. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  116. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  117. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  118. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  119. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +3 -3
  120. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  121. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  122. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  123. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  124. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  125. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  126. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  127. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  128. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  129. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  130. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  131. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  132. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  133. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  134. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  135. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  136. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  137. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  138. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  139. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  140. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  141. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  142. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  143. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  144. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  145. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  146. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  147. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  148. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  149. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  150. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  151. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  152. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  153. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  154. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  155. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  156. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  157. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  158. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  159. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  160. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  161. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  162. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  163. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  164. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  165. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  166. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  167. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  168. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  169. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  170. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  171. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  172. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  173. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  174. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  175. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  176. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  177. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  178. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  179. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  180. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  181. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  182. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  183. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  184. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  185. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  186. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  187. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  188. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  189. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  190. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  191. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  192. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  193. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  194. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  195. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  196. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  197. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  198. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  199. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  200. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  201. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  202. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +8 -4
  203. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  204. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  205. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  206. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  207. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  208. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  209. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  210. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  211. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  212. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  213. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  214. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  215. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  216. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  217. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  218. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  219. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  220. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  221. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  222. package/dist/types/excalidraw/components/icons.d.ts +51 -21
  223. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  224. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  225. package/dist/types/excalidraw/components/shapes.d.ts +209 -1
  226. package/dist/types/excalidraw/data/blob.d.ts +331 -12
  227. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  228. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  229. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  230. package/dist/types/excalidraw/data/index.d.ts +4 -5
  231. package/dist/types/excalidraw/data/json.d.ts +172 -4
  232. package/dist/types/excalidraw/data/library.d.ts +25 -10
  233. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  234. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  235. package/dist/types/excalidraw/data/types.d.ts +4 -1
  236. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  237. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  238. package/dist/types/excalidraw/errors.d.ts +14 -0
  239. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
  240. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  241. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  242. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  243. package/dist/types/excalidraw/i18n.d.ts +2 -2
  244. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  245. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  246. package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
  247. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  248. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  249. package/dist/types/excalidraw/scene/Renderer.d.ts +428 -18
  250. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  251. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  252. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  253. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  254. package/dist/types/excalidraw/snapping.d.ts +5 -5
  255. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  256. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  257. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  258. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  259. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  260. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  261. package/dist/types/excalidraw/types.d.ts +290 -40
  262. package/dist/types/excalidraw/viewport.d.ts +316 -0
  263. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +7 -3
  264. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  265. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  266. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  267. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  268. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  269. package/dist/types/math/src/constants.d.ts +0 -1
  270. package/dist/types/math/src/curve.d.ts +4 -1
  271. package/dist/types/math/src/point.d.ts +8 -2
  272. package/dist/types/math/src/polygon.d.ts +2 -2
  273. package/dist/types/math/src/range.d.ts +1 -3
  274. package/dist/types/math/src/segment.d.ts +4 -3
  275. package/dist/types/math/src/types.d.ts +25 -1
  276. package/dist/types/utils/src/export.d.ts +5 -5
  277. package/dist/types/utils/src/index.d.ts +1 -2
  278. package/dist/types/utils/src/shape.d.ts +6 -6
  279. package/package.json +7 -1
  280. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  281. package/dist/types/excalidraw/charts.d.ts +0 -27
  282. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  283. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  284. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  285. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  286. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  287. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  288. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  289. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  290. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  291. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  292. package/dist/types/excalidraw/index.d.ts +0 -47
  293. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  294. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  295. package/dist/types/utils/src/bbox.d.ts +0 -9
  296. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,19 +1,6 @@
1
- /// <reference types="react" />
2
- import { type SceneBounds } from "@excalidraw/element";
3
- import type { ExcalidrawElement } from "@excalidraw/element/types";
4
- import type { AppState, Offsets } from "../types";
5
- export declare const actionChangeViewBackgroundColor: {
6
- name: "changeViewBackgroundColor";
7
- label: string;
8
- trackEvent: false;
9
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
10
- perform: (_: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
11
- appState: any;
12
- captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
13
- };
14
- PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
15
- } & {
16
- keyTest?: undefined;
1
+ import type { AppState } from "../types";
2
+ export declare const actionChangeViewBackgroundColor: import("./types").Action<Partial<AppState>> & {
3
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
17
4
  };
18
5
  export declare const actionClearCanvas: {
19
6
  name: "clearCanvas";
@@ -22,8 +9,8 @@ export declare const actionClearCanvas: {
22
9
  trackEvent: {
23
10
  category: "canvas";
24
11
  };
25
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
26
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
12
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
13
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
27
14
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
28
15
  appState: {
29
16
  files: {};
@@ -39,180 +26,16 @@ export declare const actionClearCanvas: {
39
26
  open: boolean;
40
27
  panels: number;
41
28
  };
42
- pasteDialog: {
43
- shown: false;
44
- data: null;
45
- } | {
46
- shown: true;
47
- data: import("../charts").Spreadsheet;
48
- };
49
29
  activeTool: {
50
30
  lastActiveTool: import("../types").ActiveTool | null;
51
31
  locked: boolean;
52
32
  fromSelection: boolean;
53
33
  } & import("../types").ActiveTool;
54
- viewBackgroundColor: string;
55
- frameRendering: {
56
- enabled: boolean;
57
- name: boolean;
58
- outline: boolean;
59
- clip: boolean;
60
- };
61
- name: string | null;
62
- zoom: Readonly<{
63
- value: import("../types").NormalizedZoomValue;
64
- }>;
65
- scrollX: number;
66
- scrollY: number;
67
34
  viewModeEnabled: boolean;
68
- openDialog: {
69
- name: "imageExport" | "help" | "jsonExport";
70
- } | {
71
- name: "ttd";
72
- tab: "mermaid" | "text-to-diagram";
73
- } | {
74
- name: "commandPalette";
75
- } | {
76
- name: "elementLinkSelector";
77
- sourceElementId: string;
78
- } | null;
79
- editingGroupId: string | null;
80
- selectedElementIds: Readonly<{
81
- [id: string]: true;
82
- }>;
83
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
84
- activeEmbeddable: {
85
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
86
- state: "active" | "hover";
87
- } | null;
88
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
89
- selectedGroupIds: {
90
- [groupId: string]: boolean;
91
- };
92
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
93
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
94
- isBindingEnabled: boolean;
95
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
96
- isRotating: boolean;
97
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
98
- collaborators: Map<import("../types").SocketId, Readonly<{
99
- pointer?: import("../types").CollaboratorPointer | undefined;
100
- button?: "up" | "down" | undefined;
101
- selectedElementIds?: Readonly<{
102
- [id: string]: true;
103
- }> | undefined;
104
- username?: string | null | undefined;
105
- userState?: import("@excalidraw/common").UserIdleState | undefined;
106
- color?: {
107
- background: string;
108
- stroke: string;
109
- } | undefined;
110
- avatarUrl?: string | undefined;
111
- id?: string | undefined;
112
- socketId?: import("../types").SocketId | undefined;
113
- isCurrentUser?: boolean | undefined;
114
- isInCall?: boolean | undefined;
115
- isSpeaking?: boolean | undefined;
116
- isMuted?: boolean | undefined;
117
- }>>;
118
- snapLines: readonly import("../snapping").SnapLine[];
119
35
  zenModeEnabled: boolean;
120
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
121
- isCropping: boolean;
122
- croppingElementId: string | null;
123
- searchMatches: Readonly<{
124
- focusedId: string | null;
125
- matches: readonly import("../types").SearchMatch[];
126
- }> | null;
127
- activeLockedId: string | null;
128
- contextMenu: {
129
- items: import("../components/ContextMenu").ContextMenuItems;
130
- top: number;
131
- left: number;
132
- } | null;
133
- showWelcomeScreen: boolean;
134
- isLoading: boolean;
135
- errorMessage: import("react").ReactNode;
136
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
137
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
138
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
139
- editingFrame: string | null;
140
- exportWithDarkMode: boolean;
141
- exportScale: number;
142
- currentItemStrokeColor: string;
143
- currentItemBackgroundColor: string;
144
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
145
- currentItemStrokeWidth: number;
146
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
147
- currentItemRoughness: number;
148
- currentItemOpacity: number;
149
- currentItemFontFamily: number;
150
- currentItemFontSize: number;
151
- currentItemTextAlign: string;
152
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
153
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
154
- currentHoveredFontFamily: number | null;
155
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
156
- currentItemArrowType: "round" | "sharp" | "elbow";
157
- cursorButton: "up" | "down";
158
- scrolledOutside: boolean;
159
- isResizing: boolean;
160
- openMenu: "canvas" | "shape" | null;
161
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
162
- openSidebar: {
163
- name: string;
164
- tab?: string | undefined;
165
- } | null;
166
- defaultSidebarDockedPreference: boolean;
167
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
168
- hoveredElementIds: Readonly<{
169
- [id: string]: true;
170
- }>;
171
- previousSelectedElementIds: {
172
- [id: string]: true;
173
- };
174
- selectedElementsAreBeingDragged: boolean;
175
- shouldCacheIgnoreZoom: boolean;
176
- toast: {
177
- message: string;
178
- closable?: boolean | undefined;
179
- duration?: number | undefined;
180
- } | null;
181
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
182
- currentChartType: import("@excalidraw/element/types").ChartType;
183
- showHyperlinkPopup: false | "editor" | "info";
184
- originSnapOffset: {
185
- x: number;
186
- y: number;
187
- } | null;
188
36
  objectsSnapModeEnabled: boolean;
189
- userToFollow: import("../types").UserToFollow | null;
190
- followedBy: Set<import("../types").SocketId>;
191
- lockedMultiSelections: {
192
- [groupId: string]: true;
193
- };
194
- };
195
- captureUpdate: "IMMEDIATELY";
196
- };
197
- } & {
198
- keyTest?: undefined;
199
- };
200
- export declare const actionZoomIn: {
201
- name: "zoomIn";
202
- label: string;
203
- viewMode: true;
204
- icon: import("react/jsx-runtime").JSX.Element;
205
- trackEvent: {
206
- category: "canvas";
207
- };
208
- perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
209
- appState: {
210
- userToFollow: null;
211
- scrollX: number;
212
- scrollY: number;
213
- zoom: {
214
- value: import("../types").NormalizedZoomValue;
215
- };
37
+ name: string | null;
38
+ currentItemArrowType: "sharp" | "round" | "elbow";
216
39
  contextMenu: {
217
40
  items: import("../components/ContextMenu").ContextMenuItems;
218
41
  top: number;
@@ -220,18 +43,23 @@ export declare const actionZoomIn: {
220
43
  } | null;
221
44
  showWelcomeScreen: boolean;
222
45
  isLoading: boolean;
223
- errorMessage: import("react").ReactNode;
46
+ errorMessage: React.ReactNode;
224
47
  activeEmbeddable: {
225
48
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
226
- state: "active" | "hover";
49
+ state: "hover" | "active";
227
50
  } | null;
228
51
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
229
52
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
230
53
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
231
54
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
232
55
  isBindingEnabled: boolean;
233
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
234
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
56
+ boxSelectionMode: import("../types").BoxSelectionMode;
57
+ bindingPreference: "enabled" | "disabled";
58
+ isMidpointSnappingEnabled: boolean;
59
+ suggestedBinding: {
60
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
61
+ midPoint?: import("@excalidraw/math").GlobalPoint;
62
+ } | null;
235
63
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
236
64
  frameRendering: {
237
65
  enabled: boolean;
@@ -240,57 +68,61 @@ export declare const actionZoomIn: {
240
68
  clip: boolean;
241
69
  };
242
70
  editingFrame: string | null;
243
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
244
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
245
- activeTool: {
246
- lastActiveTool: import("../types").ActiveTool | null;
247
- locked: boolean;
248
- fromSelection: boolean;
249
- } & import("../types").ActiveTool;
250
- penMode: boolean;
251
- penDetected: boolean;
252
- exportBackground: boolean;
253
- exportEmbedScene: boolean;
71
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
72
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
73
+ preferredSelectionTool: {
74
+ type: "selection" | "lasso";
75
+ initialized: boolean;
76
+ };
254
77
  exportWithDarkMode: boolean;
255
78
  exportScale: number;
256
79
  currentItemStrokeColor: string;
257
80
  currentItemBackgroundColor: string;
258
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
259
- currentItemStrokeWidth: number;
260
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
81
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
82
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
83
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
261
84
  currentItemRoughness: number;
85
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
262
86
  currentItemOpacity: number;
263
- currentItemFontFamily: number;
87
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
264
88
  currentItemFontSize: number;
265
- currentItemTextAlign: string;
89
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
266
90
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
267
91
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
268
- currentHoveredFontFamily: number | null;
92
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
269
93
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
270
- currentItemArrowType: "round" | "sharp" | "elbow";
271
94
  viewBackgroundColor: string;
95
+ scrollX: number;
96
+ scrollY: number;
97
+ scrollConstraints: import("../types").ScrollConstraints | null;
272
98
  cursorButton: "up" | "down";
273
99
  scrolledOutside: boolean;
274
- name: string | null;
275
100
  isResizing: boolean;
276
101
  isRotating: boolean;
277
- openMenu: "canvas" | "shape" | null;
278
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
102
+ zoom: import("../types").Zoom;
103
+ openMenu: "canvas" | null;
104
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
279
105
  openSidebar: {
280
- name: string;
281
- tab?: string | undefined;
106
+ name: import("../types").SidebarName;
107
+ tab?: import("../types").SidebarTabName;
282
108
  } | null;
283
- openDialog: {
109
+ openDialog: null | {
284
110
  name: "imageExport" | "help" | "jsonExport";
285
111
  } | {
286
112
  name: "ttd";
287
- tab: "mermaid" | "text-to-diagram";
113
+ tab: "text-to-diagram" | "mermaid";
288
114
  } | {
289
115
  name: "commandPalette";
116
+ } | {
117
+ name: "settings";
290
118
  } | {
291
119
  name: "elementLinkSelector";
292
- sourceElementId: string;
293
- } | null;
120
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
121
+ } | {
122
+ name: "charts";
123
+ data: import("../charts").Spreadsheet;
124
+ rawText: string;
125
+ };
294
126
  defaultSidebarDockedPreference: boolean;
295
127
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
296
128
  selectedElementIds: Readonly<{
@@ -305,100 +137,56 @@ export declare const actionZoomIn: {
305
137
  selectedElementsAreBeingDragged: boolean;
306
138
  shouldCacheIgnoreZoom: boolean;
307
139
  toast: {
308
- message: string;
309
- closable?: boolean | undefined;
310
- duration?: number | undefined;
140
+ message: React.ReactNode;
141
+ closable?: boolean;
142
+ duration?: number;
311
143
  } | null;
312
- zenModeEnabled: boolean;
313
- theme: import("@excalidraw/element/types").Theme;
314
- gridSize: number;
315
- gridStep: number;
316
- gridModeEnabled: boolean;
317
- viewModeEnabled: boolean;
318
144
  selectedGroupIds: {
319
145
  [groupId: string]: boolean;
320
146
  };
321
- editingGroupId: string | null;
322
- width: number;
323
- height: number;
324
- offsetTop: number;
325
- offsetLeft: number;
326
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
327
- collaborators: Map<import("../types").SocketId, Readonly<{
328
- pointer?: import("../types").CollaboratorPointer | undefined;
329
- button?: "up" | "down" | undefined;
330
- selectedElementIds?: Readonly<{
331
- [id: string]: true;
332
- }> | undefined;
333
- username?: string | null | undefined;
334
- userState?: import("@excalidraw/common").UserIdleState | undefined;
335
- color?: {
336
- background: string;
337
- stroke: string;
338
- } | undefined;
339
- avatarUrl?: string | undefined;
340
- id?: string | undefined;
341
- socketId?: import("../types").SocketId | undefined;
342
- isCurrentUser?: boolean | undefined;
343
- isInCall?: boolean | undefined;
344
- isSpeaking?: boolean | undefined;
345
- isMuted?: boolean | undefined;
346
- }>>;
347
- stats: {
348
- open: boolean;
349
- panels: number;
350
- };
351
- currentChartType: import("@excalidraw/element/types").ChartType;
352
- pasteDialog: {
353
- shown: false;
354
- data: null;
355
- } | {
356
- shown: true;
357
- data: import("../charts").Spreadsheet;
358
- };
359
- showHyperlinkPopup: false | "editor" | "info";
147
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
148
+ fileHandle: FileSystemFileHandle | null;
149
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
150
+ showHyperlinkPopup: false | "info" | "editor";
360
151
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
361
152
  snapLines: readonly import("../snapping").SnapLine[];
362
153
  originSnapOffset: {
363
154
  x: number;
364
155
  y: number;
365
156
  } | null;
366
- objectsSnapModeEnabled: boolean;
157
+ userToFollow: import("../types").UserToFollow | null;
367
158
  followedBy: Set<import("../types").SocketId>;
368
159
  isCropping: boolean;
369
- croppingElementId: string | null;
160
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
370
161
  searchMatches: Readonly<{
371
- focusedId: string | null;
162
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
372
163
  matches: readonly import("../types").SearchMatch[];
373
164
  }> | null;
374
165
  activeLockedId: string | null;
375
166
  lockedMultiSelections: {
376
167
  [groupId: string]: true;
377
168
  };
169
+ bindMode: import("@excalidraw/element/types").BindMode;
378
170
  };
379
- captureUpdate: "EVENTUALLY";
171
+ captureUpdate: "IMMEDIATELY";
380
172
  };
381
- PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
382
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
383
173
  } & {
384
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
174
+ keyTest?: undefined;
385
175
  };
386
- export declare const actionZoomOut: {
387
- name: "zoomOut";
176
+ export declare const actionZoomIn: {
177
+ name: "zoomIn";
388
178
  label: string;
389
- icon: import("react/jsx-runtime").JSX.Element;
390
179
  viewMode: true;
180
+ icon: import("react/jsx-runtime").JSX.Element;
391
181
  trackEvent: {
392
182
  category: "canvas";
393
183
  };
394
- perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
184
+ perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
395
185
  appState: {
396
- userToFollow: null;
397
186
  scrollX: number;
398
187
  scrollY: number;
399
- zoom: {
400
- value: import("../types").NormalizedZoomValue;
401
- };
188
+ zoom: import("../types").Zoom;
189
+ userToFollow: null;
402
190
  contextMenu: {
403
191
  items: import("../components/ContextMenu").ContextMenuItems;
404
192
  top: number;
@@ -406,18 +194,23 @@ export declare const actionZoomOut: {
406
194
  } | null;
407
195
  showWelcomeScreen: boolean;
408
196
  isLoading: boolean;
409
- errorMessage: import("react").ReactNode;
197
+ errorMessage: React.ReactNode;
410
198
  activeEmbeddable: {
411
199
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
412
- state: "active" | "hover";
200
+ state: "hover" | "active";
413
201
  } | null;
414
202
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
415
203
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
416
204
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
417
205
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
418
206
  isBindingEnabled: boolean;
419
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
420
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
207
+ boxSelectionMode: import("../types").BoxSelectionMode;
208
+ bindingPreference: "enabled" | "disabled";
209
+ isMidpointSnappingEnabled: boolean;
210
+ suggestedBinding: {
211
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
212
+ midPoint?: import("@excalidraw/math").GlobalPoint;
213
+ } | null;
421
214
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
422
215
  frameRendering: {
423
216
  enabled: boolean;
@@ -426,13 +219,17 @@ export declare const actionZoomOut: {
426
219
  clip: boolean;
427
220
  };
428
221
  editingFrame: string | null;
429
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
430
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
222
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
223
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
431
224
  activeTool: {
432
225
  lastActiveTool: import("../types").ActiveTool | null;
433
226
  locked: boolean;
434
227
  fromSelection: boolean;
435
228
  } & import("../types").ActiveTool;
229
+ preferredSelectionTool: {
230
+ type: "selection" | "lasso";
231
+ initialized: boolean;
232
+ };
436
233
  penMode: boolean;
437
234
  penDetected: boolean;
438
235
  exportBackground: boolean;
@@ -441,42 +238,50 @@ export declare const actionZoomOut: {
441
238
  exportScale: number;
442
239
  currentItemStrokeColor: string;
443
240
  currentItemBackgroundColor: string;
444
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
445
- currentItemStrokeWidth: number;
446
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
241
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
242
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
243
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
447
244
  currentItemRoughness: number;
245
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
448
246
  currentItemOpacity: number;
449
- currentItemFontFamily: number;
247
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
450
248
  currentItemFontSize: number;
451
- currentItemTextAlign: string;
249
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
452
250
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
453
251
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
454
- currentHoveredFontFamily: number | null;
252
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
455
253
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
456
- currentItemArrowType: "round" | "sharp" | "elbow";
254
+ currentItemArrowType: "sharp" | "round" | "elbow";
457
255
  viewBackgroundColor: string;
256
+ scrollConstraints: import("../types").ScrollConstraints | null;
458
257
  cursorButton: "up" | "down";
459
258
  scrolledOutside: boolean;
460
259
  name: string | null;
461
260
  isResizing: boolean;
462
261
  isRotating: boolean;
463
- openMenu: "canvas" | "shape" | null;
464
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
262
+ openMenu: "canvas" | null;
263
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
465
264
  openSidebar: {
466
- name: string;
467
- tab?: string | undefined;
265
+ name: import("../types").SidebarName;
266
+ tab?: import("../types").SidebarTabName;
468
267
  } | null;
469
- openDialog: {
268
+ openDialog: null | {
470
269
  name: "imageExport" | "help" | "jsonExport";
471
270
  } | {
472
271
  name: "ttd";
473
- tab: "mermaid" | "text-to-diagram";
272
+ tab: "text-to-diagram" | "mermaid";
474
273
  } | {
475
274
  name: "commandPalette";
275
+ } | {
276
+ name: "settings";
476
277
  } | {
477
278
  name: "elementLinkSelector";
478
- sourceElementId: string;
479
- } | null;
279
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
280
+ } | {
281
+ name: "charts";
282
+ data: import("../charts").Spreadsheet;
283
+ rawText: string;
284
+ };
480
285
  defaultSidebarDockedPreference: boolean;
481
286
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
482
287
  selectedElementIds: Readonly<{
@@ -491,9 +296,9 @@ export declare const actionZoomOut: {
491
296
  selectedElementsAreBeingDragged: boolean;
492
297
  shouldCacheIgnoreZoom: boolean;
493
298
  toast: {
494
- message: string;
495
- closable?: boolean | undefined;
496
- duration?: number | undefined;
299
+ message: React.ReactNode;
300
+ closable?: boolean;
301
+ duration?: number;
497
302
  } | null;
498
303
  zenModeEnabled: boolean;
499
304
  theme: import("@excalidraw/element/types").Theme;
@@ -504,45 +309,18 @@ export declare const actionZoomOut: {
504
309
  selectedGroupIds: {
505
310
  [groupId: string]: boolean;
506
311
  };
507
- editingGroupId: string | null;
312
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
508
313
  width: number;
509
314
  height: number;
510
315
  offsetTop: number;
511
316
  offsetLeft: number;
512
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
513
- collaborators: Map<import("../types").SocketId, Readonly<{
514
- pointer?: import("../types").CollaboratorPointer | undefined;
515
- button?: "up" | "down" | undefined;
516
- selectedElementIds?: Readonly<{
517
- [id: string]: true;
518
- }> | undefined;
519
- username?: string | null | undefined;
520
- userState?: import("@excalidraw/common").UserIdleState | undefined;
521
- color?: {
522
- background: string;
523
- stroke: string;
524
- } | undefined;
525
- avatarUrl?: string | undefined;
526
- id?: string | undefined;
527
- socketId?: import("../types").SocketId | undefined;
528
- isCurrentUser?: boolean | undefined;
529
- isInCall?: boolean | undefined;
530
- isSpeaking?: boolean | undefined;
531
- isMuted?: boolean | undefined;
532
- }>>;
317
+ fileHandle: FileSystemFileHandle | null;
318
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
533
319
  stats: {
534
320
  open: boolean;
535
321
  panels: number;
536
322
  };
537
- currentChartType: import("@excalidraw/element/types").ChartType;
538
- pasteDialog: {
539
- shown: false;
540
- data: null;
541
- } | {
542
- shown: true;
543
- data: import("../charts").Spreadsheet;
544
- };
545
- showHyperlinkPopup: false | "editor" | "info";
323
+ showHyperlinkPopup: false | "info" | "editor";
546
324
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
547
325
  snapLines: readonly import("../snapping").SnapLine[];
548
326
  originSnapOffset: {
@@ -552,15 +330,16 @@ export declare const actionZoomOut: {
552
330
  objectsSnapModeEnabled: boolean;
553
331
  followedBy: Set<import("../types").SocketId>;
554
332
  isCropping: boolean;
555
- croppingElementId: string | null;
333
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
556
334
  searchMatches: Readonly<{
557
- focusedId: string | null;
335
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
558
336
  matches: readonly import("../types").SearchMatch[];
559
337
  }> | null;
560
338
  activeLockedId: string | null;
561
339
  lockedMultiSelections: {
562
340
  [groupId: string]: true;
563
341
  };
342
+ bindMode: import("@excalidraw/element/types").BindMode;
564
343
  };
565
344
  captureUpdate: "EVENTUALLY";
566
345
  };
@@ -569,22 +348,20 @@ export declare const actionZoomOut: {
569
348
  } & {
570
349
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
571
350
  };
572
- export declare const actionResetZoom: {
573
- name: "resetZoom";
351
+ export declare const actionZoomOut: {
352
+ name: "zoomOut";
574
353
  label: string;
575
354
  icon: import("react/jsx-runtime").JSX.Element;
576
355
  viewMode: true;
577
356
  trackEvent: {
578
357
  category: "canvas";
579
358
  };
580
- perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
359
+ perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
581
360
  appState: {
582
- userToFollow: null;
583
361
  scrollX: number;
584
362
  scrollY: number;
585
- zoom: {
586
- value: import("../types").NormalizedZoomValue;
587
- };
363
+ zoom: import("../types").Zoom;
364
+ userToFollow: null;
588
365
  contextMenu: {
589
366
  items: import("../components/ContextMenu").ContextMenuItems;
590
367
  top: number;
@@ -592,18 +369,23 @@ export declare const actionResetZoom: {
592
369
  } | null;
593
370
  showWelcomeScreen: boolean;
594
371
  isLoading: boolean;
595
- errorMessage: import("react").ReactNode;
372
+ errorMessage: React.ReactNode;
596
373
  activeEmbeddable: {
597
374
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
598
- state: "active" | "hover";
375
+ state: "hover" | "active";
599
376
  } | null;
600
377
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
601
378
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
602
379
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
603
380
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
604
381
  isBindingEnabled: boolean;
605
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
606
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
382
+ boxSelectionMode: import("../types").BoxSelectionMode;
383
+ bindingPreference: "enabled" | "disabled";
384
+ isMidpointSnappingEnabled: boolean;
385
+ suggestedBinding: {
386
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
387
+ midPoint?: import("@excalidraw/math").GlobalPoint;
388
+ } | null;
607
389
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
608
390
  frameRendering: {
609
391
  enabled: boolean;
@@ -612,13 +394,17 @@ export declare const actionResetZoom: {
612
394
  clip: boolean;
613
395
  };
614
396
  editingFrame: string | null;
615
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
616
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
397
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
398
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
617
399
  activeTool: {
618
400
  lastActiveTool: import("../types").ActiveTool | null;
619
401
  locked: boolean;
620
402
  fromSelection: boolean;
621
403
  } & import("../types").ActiveTool;
404
+ preferredSelectionTool: {
405
+ type: "selection" | "lasso";
406
+ initialized: boolean;
407
+ };
622
408
  penMode: boolean;
623
409
  penDetected: boolean;
624
410
  exportBackground: boolean;
@@ -627,42 +413,50 @@ export declare const actionResetZoom: {
627
413
  exportScale: number;
628
414
  currentItemStrokeColor: string;
629
415
  currentItemBackgroundColor: string;
630
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
631
- currentItemStrokeWidth: number;
632
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
416
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
417
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
418
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
633
419
  currentItemRoughness: number;
420
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
634
421
  currentItemOpacity: number;
635
- currentItemFontFamily: number;
422
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
636
423
  currentItemFontSize: number;
637
- currentItemTextAlign: string;
424
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
638
425
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
639
426
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
640
- currentHoveredFontFamily: number | null;
427
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
641
428
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
642
- currentItemArrowType: "round" | "sharp" | "elbow";
429
+ currentItemArrowType: "sharp" | "round" | "elbow";
643
430
  viewBackgroundColor: string;
431
+ scrollConstraints: import("../types").ScrollConstraints | null;
644
432
  cursorButton: "up" | "down";
645
433
  scrolledOutside: boolean;
646
434
  name: string | null;
647
435
  isResizing: boolean;
648
436
  isRotating: boolean;
649
- openMenu: "canvas" | "shape" | null;
650
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
437
+ openMenu: "canvas" | null;
438
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
651
439
  openSidebar: {
652
- name: string;
653
- tab?: string | undefined;
440
+ name: import("../types").SidebarName;
441
+ tab?: import("../types").SidebarTabName;
654
442
  } | null;
655
- openDialog: {
443
+ openDialog: null | {
656
444
  name: "imageExport" | "help" | "jsonExport";
657
445
  } | {
658
446
  name: "ttd";
659
- tab: "mermaid" | "text-to-diagram";
447
+ tab: "text-to-diagram" | "mermaid";
660
448
  } | {
661
449
  name: "commandPalette";
450
+ } | {
451
+ name: "settings";
662
452
  } | {
663
453
  name: "elementLinkSelector";
664
- sourceElementId: string;
665
- } | null;
454
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
455
+ } | {
456
+ name: "charts";
457
+ data: import("../charts").Spreadsheet;
458
+ rawText: string;
459
+ };
666
460
  defaultSidebarDockedPreference: boolean;
667
461
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
668
462
  selectedElementIds: Readonly<{
@@ -677,9 +471,9 @@ export declare const actionResetZoom: {
677
471
  selectedElementsAreBeingDragged: boolean;
678
472
  shouldCacheIgnoreZoom: boolean;
679
473
  toast: {
680
- message: string;
681
- closable?: boolean | undefined;
682
- duration?: number | undefined;
474
+ message: React.ReactNode;
475
+ closable?: boolean;
476
+ duration?: number;
683
477
  } | null;
684
478
  zenModeEnabled: boolean;
685
479
  theme: import("@excalidraw/element/types").Theme;
@@ -690,45 +484,18 @@ export declare const actionResetZoom: {
690
484
  selectedGroupIds: {
691
485
  [groupId: string]: boolean;
692
486
  };
693
- editingGroupId: string | null;
487
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
694
488
  width: number;
695
489
  height: number;
696
490
  offsetTop: number;
697
491
  offsetLeft: number;
698
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
699
- collaborators: Map<import("../types").SocketId, Readonly<{
700
- pointer?: import("../types").CollaboratorPointer | undefined;
701
- button?: "up" | "down" | undefined;
702
- selectedElementIds?: Readonly<{
703
- [id: string]: true;
704
- }> | undefined;
705
- username?: string | null | undefined;
706
- userState?: import("@excalidraw/common").UserIdleState | undefined;
707
- color?: {
708
- background: string;
709
- stroke: string;
710
- } | undefined;
711
- avatarUrl?: string | undefined;
712
- id?: string | undefined;
713
- socketId?: import("../types").SocketId | undefined;
714
- isCurrentUser?: boolean | undefined;
715
- isInCall?: boolean | undefined;
716
- isSpeaking?: boolean | undefined;
717
- isMuted?: boolean | undefined;
718
- }>>;
492
+ fileHandle: FileSystemFileHandle | null;
493
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
719
494
  stats: {
720
495
  open: boolean;
721
496
  panels: number;
722
497
  };
723
- currentChartType: import("@excalidraw/element/types").ChartType;
724
- pasteDialog: {
725
- shown: false;
726
- data: null;
727
- } | {
728
- shown: true;
729
- data: import("../charts").Spreadsheet;
730
- };
731
- showHyperlinkPopup: false | "editor" | "info";
498
+ showHyperlinkPopup: false | "info" | "editor";
732
499
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
733
500
  snapLines: readonly import("../snapping").SnapLine[];
734
501
  originSnapOffset: {
@@ -738,15 +505,16 @@ export declare const actionResetZoom: {
738
505
  objectsSnapModeEnabled: boolean;
739
506
  followedBy: Set<import("../types").SocketId>;
740
507
  isCropping: boolean;
741
- croppingElementId: string | null;
508
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
742
509
  searchMatches: Readonly<{
743
- focusedId: string | null;
510
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
744
511
  matches: readonly import("../types").SearchMatch[];
745
512
  }> | null;
746
513
  activeLockedId: string | null;
747
514
  lockedMultiSelections: {
748
515
  [groupId: string]: true;
749
516
  };
517
+ bindMode: import("@excalidraw/element/types").BindMode;
750
518
  };
751
519
  captureUpdate: "EVENTUALLY";
752
520
  };
@@ -755,396 +523,20 @@ export declare const actionResetZoom: {
755
523
  } & {
756
524
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
757
525
  };
758
- export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
759
- bounds: SceneBounds;
760
- canvasOffsets?: Partial<{
761
- top: number;
762
- right: number;
763
- bottom: number;
764
- left: number;
765
- }> | undefined;
766
- appState: Readonly<AppState>;
767
- /** whether to fit content to viewport (beyond >100%) */
768
- fitToViewport: boolean;
769
- /** zoom content to cover X of the viewport, when fitToViewport=true */
770
- viewportZoomFactor?: number | undefined;
771
- minZoom?: number | undefined;
772
- maxZoom?: number | undefined;
773
- }) => {
774
- appState: {
775
- scrollX: number;
776
- scrollY: number;
777
- zoom: {
778
- value: import("../types").NormalizedZoomValue;
779
- };
780
- contextMenu: {
781
- items: import("../components/ContextMenu").ContextMenuItems;
782
- top: number;
783
- left: number;
784
- } | null;
785
- showWelcomeScreen: boolean;
786
- isLoading: boolean;
787
- errorMessage: import("react").ReactNode;
788
- activeEmbeddable: {
789
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
790
- state: "active" | "hover";
791
- } | null;
792
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
793
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
794
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
795
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
796
- isBindingEnabled: boolean;
797
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
798
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
799
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
800
- frameRendering: {
801
- enabled: boolean;
802
- name: boolean;
803
- outline: boolean;
804
- clip: boolean;
805
- };
806
- editingFrame: string | null;
807
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
808
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
809
- activeTool: {
810
- lastActiveTool: import("../types").ActiveTool | null;
811
- locked: boolean;
812
- fromSelection: boolean;
813
- } & import("../types").ActiveTool;
814
- penMode: boolean;
815
- penDetected: boolean;
816
- exportBackground: boolean;
817
- exportEmbedScene: boolean;
818
- exportWithDarkMode: boolean;
819
- exportScale: number;
820
- currentItemStrokeColor: string;
821
- currentItemBackgroundColor: string;
822
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
823
- currentItemStrokeWidth: number;
824
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
825
- currentItemRoughness: number;
826
- currentItemOpacity: number;
827
- currentItemFontFamily: number;
828
- currentItemFontSize: number;
829
- currentItemTextAlign: string;
830
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
831
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
832
- currentHoveredFontFamily: number | null;
833
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
834
- currentItemArrowType: "round" | "sharp" | "elbow";
835
- viewBackgroundColor: string;
836
- cursorButton: "up" | "down";
837
- scrolledOutside: boolean;
838
- name: string | null;
839
- isResizing: boolean;
840
- isRotating: boolean;
841
- openMenu: "canvas" | "shape" | null;
842
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
843
- openSidebar: {
844
- name: string;
845
- tab?: string | undefined;
846
- } | null;
847
- openDialog: {
848
- name: "imageExport" | "help" | "jsonExport";
849
- } | {
850
- name: "ttd";
851
- tab: "mermaid" | "text-to-diagram";
852
- } | {
853
- name: "commandPalette";
854
- } | {
855
- name: "elementLinkSelector";
856
- sourceElementId: string;
857
- } | null;
858
- defaultSidebarDockedPreference: boolean;
859
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
860
- selectedElementIds: Readonly<{
861
- [id: string]: true;
862
- }>;
863
- hoveredElementIds: Readonly<{
864
- [id: string]: true;
865
- }>;
866
- previousSelectedElementIds: {
867
- [id: string]: true;
868
- };
869
- selectedElementsAreBeingDragged: boolean;
870
- shouldCacheIgnoreZoom: boolean;
871
- toast: {
872
- message: string;
873
- closable?: boolean | undefined;
874
- duration?: number | undefined;
875
- } | null;
876
- zenModeEnabled: boolean;
877
- theme: import("@excalidraw/element/types").Theme;
878
- gridSize: number;
879
- gridStep: number;
880
- gridModeEnabled: boolean;
881
- viewModeEnabled: boolean;
882
- selectedGroupIds: {
883
- [groupId: string]: boolean;
884
- };
885
- editingGroupId: string | null;
886
- width: number;
887
- height: number;
888
- offsetTop: number;
889
- offsetLeft: number;
890
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
891
- collaborators: Map<import("../types").SocketId, Readonly<{
892
- pointer?: import("../types").CollaboratorPointer | undefined;
893
- button?: "up" | "down" | undefined;
894
- selectedElementIds?: Readonly<{
895
- [id: string]: true;
896
- }> | undefined;
897
- username?: string | null | undefined;
898
- userState?: import("@excalidraw/common").UserIdleState | undefined;
899
- color?: {
900
- background: string;
901
- stroke: string;
902
- } | undefined;
903
- avatarUrl?: string | undefined;
904
- id?: string | undefined;
905
- socketId?: import("../types").SocketId | undefined;
906
- isCurrentUser?: boolean | undefined;
907
- isInCall?: boolean | undefined;
908
- isSpeaking?: boolean | undefined;
909
- isMuted?: boolean | undefined;
910
- }>>;
911
- stats: {
912
- open: boolean;
913
- panels: number;
914
- };
915
- currentChartType: import("@excalidraw/element/types").ChartType;
916
- pasteDialog: {
917
- shown: false;
918
- data: null;
919
- } | {
920
- shown: true;
921
- data: import("../charts").Spreadsheet;
922
- };
923
- showHyperlinkPopup: false | "editor" | "info";
924
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
925
- snapLines: readonly import("../snapping").SnapLine[];
926
- originSnapOffset: {
927
- x: number;
928
- y: number;
929
- } | null;
930
- objectsSnapModeEnabled: boolean;
931
- userToFollow: import("../types").UserToFollow | null;
932
- followedBy: Set<import("../types").SocketId>;
933
- isCropping: boolean;
934
- croppingElementId: string | null;
935
- searchMatches: Readonly<{
936
- focusedId: string | null;
937
- matches: readonly import("../types").SearchMatch[];
938
- }> | null;
939
- activeLockedId: string | null;
940
- lockedMultiSelections: {
941
- [groupId: string]: true;
942
- };
943
- };
944
- captureUpdate: "EVENTUALLY";
945
- };
946
- export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitToViewport, viewportZoomFactor, minZoom, maxZoom, }: {
947
- canvasOffsets?: Partial<{
948
- top: number;
949
- right: number;
950
- bottom: number;
951
- left: number;
952
- }> | undefined;
953
- targetElements: readonly ExcalidrawElement[];
954
- appState: Readonly<AppState>;
955
- /** whether to fit content to viewport (beyond >100%) */
956
- fitToViewport: boolean;
957
- /** zoom content to cover X of the viewport, when fitToViewport=true */
958
- viewportZoomFactor?: number | undefined;
959
- minZoom?: number | undefined;
960
- maxZoom?: number | undefined;
961
- }) => {
962
- appState: {
963
- scrollX: number;
964
- scrollY: number;
965
- zoom: {
966
- value: import("../types").NormalizedZoomValue;
967
- };
968
- contextMenu: {
969
- items: import("../components/ContextMenu").ContextMenuItems;
970
- top: number;
971
- left: number;
972
- } | null;
973
- showWelcomeScreen: boolean;
974
- isLoading: boolean;
975
- errorMessage: import("react").ReactNode;
976
- activeEmbeddable: {
977
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
978
- state: "active" | "hover";
979
- } | null;
980
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
981
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
982
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
983
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
984
- isBindingEnabled: boolean;
985
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
986
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
987
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
988
- frameRendering: {
989
- enabled: boolean;
990
- name: boolean;
991
- outline: boolean;
992
- clip: boolean;
993
- };
994
- editingFrame: string | null;
995
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
996
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
997
- activeTool: {
998
- lastActiveTool: import("../types").ActiveTool | null;
999
- locked: boolean;
1000
- fromSelection: boolean;
1001
- } & import("../types").ActiveTool;
1002
- penMode: boolean;
1003
- penDetected: boolean;
1004
- exportBackground: boolean;
1005
- exportEmbedScene: boolean;
1006
- exportWithDarkMode: boolean;
1007
- exportScale: number;
1008
- currentItemStrokeColor: string;
1009
- currentItemBackgroundColor: string;
1010
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1011
- currentItemStrokeWidth: number;
1012
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
1013
- currentItemRoughness: number;
1014
- currentItemOpacity: number;
1015
- currentItemFontFamily: number;
1016
- currentItemFontSize: number;
1017
- currentItemTextAlign: string;
1018
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1019
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1020
- currentHoveredFontFamily: number | null;
1021
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1022
- currentItemArrowType: "round" | "sharp" | "elbow";
1023
- viewBackgroundColor: string;
1024
- cursorButton: "up" | "down";
1025
- scrolledOutside: boolean;
1026
- name: string | null;
1027
- isResizing: boolean;
1028
- isRotating: boolean;
1029
- openMenu: "canvas" | "shape" | null;
1030
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1031
- openSidebar: {
1032
- name: string;
1033
- tab?: string | undefined;
1034
- } | null;
1035
- openDialog: {
1036
- name: "imageExport" | "help" | "jsonExport";
1037
- } | {
1038
- name: "ttd";
1039
- tab: "mermaid" | "text-to-diagram";
1040
- } | {
1041
- name: "commandPalette";
1042
- } | {
1043
- name: "elementLinkSelector";
1044
- sourceElementId: string;
1045
- } | null;
1046
- defaultSidebarDockedPreference: boolean;
1047
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1048
- selectedElementIds: Readonly<{
1049
- [id: string]: true;
1050
- }>;
1051
- hoveredElementIds: Readonly<{
1052
- [id: string]: true;
1053
- }>;
1054
- previousSelectedElementIds: {
1055
- [id: string]: true;
1056
- };
1057
- selectedElementsAreBeingDragged: boolean;
1058
- shouldCacheIgnoreZoom: boolean;
1059
- toast: {
1060
- message: string;
1061
- closable?: boolean | undefined;
1062
- duration?: number | undefined;
1063
- } | null;
1064
- zenModeEnabled: boolean;
1065
- theme: import("@excalidraw/element/types").Theme;
1066
- gridSize: number;
1067
- gridStep: number;
1068
- gridModeEnabled: boolean;
1069
- viewModeEnabled: boolean;
1070
- selectedGroupIds: {
1071
- [groupId: string]: boolean;
1072
- };
1073
- editingGroupId: string | null;
1074
- width: number;
1075
- height: number;
1076
- offsetTop: number;
1077
- offsetLeft: number;
1078
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1079
- collaborators: Map<import("../types").SocketId, Readonly<{
1080
- pointer?: import("../types").CollaboratorPointer | undefined;
1081
- button?: "up" | "down" | undefined;
1082
- selectedElementIds?: Readonly<{
1083
- [id: string]: true;
1084
- }> | undefined;
1085
- username?: string | null | undefined;
1086
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1087
- color?: {
1088
- background: string;
1089
- stroke: string;
1090
- } | undefined;
1091
- avatarUrl?: string | undefined;
1092
- id?: string | undefined;
1093
- socketId?: import("../types").SocketId | undefined;
1094
- isCurrentUser?: boolean | undefined;
1095
- isInCall?: boolean | undefined;
1096
- isSpeaking?: boolean | undefined;
1097
- isMuted?: boolean | undefined;
1098
- }>>;
1099
- stats: {
1100
- open: boolean;
1101
- panels: number;
1102
- };
1103
- currentChartType: import("@excalidraw/element/types").ChartType;
1104
- pasteDialog: {
1105
- shown: false;
1106
- data: null;
1107
- } | {
1108
- shown: true;
1109
- data: import("../charts").Spreadsheet;
1110
- };
1111
- showHyperlinkPopup: false | "editor" | "info";
1112
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1113
- snapLines: readonly import("../snapping").SnapLine[];
1114
- originSnapOffset: {
1115
- x: number;
1116
- y: number;
1117
- } | null;
1118
- objectsSnapModeEnabled: boolean;
1119
- userToFollow: import("../types").UserToFollow | null;
1120
- followedBy: Set<import("../types").SocketId>;
1121
- isCropping: boolean;
1122
- croppingElementId: string | null;
1123
- searchMatches: Readonly<{
1124
- focusedId: string | null;
1125
- matches: readonly import("../types").SearchMatch[];
1126
- }> | null;
1127
- activeLockedId: string | null;
1128
- lockedMultiSelections: {
1129
- [groupId: string]: true;
1130
- };
1131
- };
1132
- captureUpdate: "EVENTUALLY";
1133
- };
1134
- export declare const actionZoomToFitSelectionInViewport: {
1135
- name: "zoomToFitSelectionInViewport";
526
+ export declare const actionResetZoom: {
527
+ name: "resetZoom";
1136
528
  label: string;
1137
529
  icon: import("react/jsx-runtime").JSX.Element;
530
+ viewMode: true;
1138
531
  trackEvent: {
1139
532
  category: "canvas";
1140
533
  };
1141
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
534
+ perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1142
535
  appState: {
1143
536
  scrollX: number;
1144
537
  scrollY: number;
1145
- zoom: {
1146
- value: import("../types").NormalizedZoomValue;
1147
- };
538
+ zoom: import("../types").Zoom;
539
+ userToFollow: null;
1148
540
  contextMenu: {
1149
541
  items: import("../components/ContextMenu").ContextMenuItems;
1150
542
  top: number;
@@ -1152,18 +544,23 @@ export declare const actionZoomToFitSelectionInViewport: {
1152
544
  } | null;
1153
545
  showWelcomeScreen: boolean;
1154
546
  isLoading: boolean;
1155
- errorMessage: import("react").ReactNode;
547
+ errorMessage: React.ReactNode;
1156
548
  activeEmbeddable: {
1157
549
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
1158
- state: "active" | "hover";
550
+ state: "hover" | "active";
1159
551
  } | null;
1160
552
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1161
553
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1162
554
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1163
555
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1164
556
  isBindingEnabled: boolean;
1165
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1166
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
557
+ boxSelectionMode: import("../types").BoxSelectionMode;
558
+ bindingPreference: "enabled" | "disabled";
559
+ isMidpointSnappingEnabled: boolean;
560
+ suggestedBinding: {
561
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
562
+ midPoint?: import("@excalidraw/math").GlobalPoint;
563
+ } | null;
1167
564
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1168
565
  frameRendering: {
1169
566
  enabled: boolean;
@@ -1172,13 +569,17 @@ export declare const actionZoomToFitSelectionInViewport: {
1172
569
  clip: boolean;
1173
570
  };
1174
571
  editingFrame: string | null;
1175
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1176
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
572
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
573
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1177
574
  activeTool: {
1178
575
  lastActiveTool: import("../types").ActiveTool | null;
1179
576
  locked: boolean;
1180
577
  fromSelection: boolean;
1181
578
  } & import("../types").ActiveTool;
579
+ preferredSelectionTool: {
580
+ type: "selection" | "lasso";
581
+ initialized: boolean;
582
+ };
1182
583
  penMode: boolean;
1183
584
  penDetected: boolean;
1184
585
  exportBackground: boolean;
@@ -1187,42 +588,50 @@ export declare const actionZoomToFitSelectionInViewport: {
1187
588
  exportScale: number;
1188
589
  currentItemStrokeColor: string;
1189
590
  currentItemBackgroundColor: string;
1190
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1191
- currentItemStrokeWidth: number;
1192
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
591
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
592
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
593
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1193
594
  currentItemRoughness: number;
595
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1194
596
  currentItemOpacity: number;
1195
- currentItemFontFamily: number;
597
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1196
598
  currentItemFontSize: number;
1197
- currentItemTextAlign: string;
599
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1198
600
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1199
601
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1200
- currentHoveredFontFamily: number | null;
602
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1201
603
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1202
- currentItemArrowType: "round" | "sharp" | "elbow";
604
+ currentItemArrowType: "sharp" | "round" | "elbow";
1203
605
  viewBackgroundColor: string;
606
+ scrollConstraints: import("../types").ScrollConstraints | null;
1204
607
  cursorButton: "up" | "down";
1205
608
  scrolledOutside: boolean;
1206
609
  name: string | null;
1207
610
  isResizing: boolean;
1208
611
  isRotating: boolean;
1209
- openMenu: "canvas" | "shape" | null;
1210
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
612
+ openMenu: "canvas" | null;
613
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1211
614
  openSidebar: {
1212
- name: string;
1213
- tab?: string | undefined;
615
+ name: import("../types").SidebarName;
616
+ tab?: import("../types").SidebarTabName;
1214
617
  } | null;
1215
- openDialog: {
618
+ openDialog: null | {
1216
619
  name: "imageExport" | "help" | "jsonExport";
1217
620
  } | {
1218
621
  name: "ttd";
1219
- tab: "mermaid" | "text-to-diagram";
622
+ tab: "text-to-diagram" | "mermaid";
1220
623
  } | {
1221
624
  name: "commandPalette";
625
+ } | {
626
+ name: "settings";
1222
627
  } | {
1223
628
  name: "elementLinkSelector";
1224
- sourceElementId: string;
1225
- } | null;
629
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
630
+ } | {
631
+ name: "charts";
632
+ data: import("../charts").Spreadsheet;
633
+ rawText: string;
634
+ };
1226
635
  defaultSidebarDockedPreference: boolean;
1227
636
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1228
637
  selectedElementIds: Readonly<{
@@ -1237,9 +646,9 @@ export declare const actionZoomToFitSelectionInViewport: {
1237
646
  selectedElementsAreBeingDragged: boolean;
1238
647
  shouldCacheIgnoreZoom: boolean;
1239
648
  toast: {
1240
- message: string;
1241
- closable?: boolean | undefined;
1242
- duration?: number | undefined;
649
+ message: React.ReactNode;
650
+ closable?: boolean;
651
+ duration?: number;
1243
652
  } | null;
1244
653
  zenModeEnabled: boolean;
1245
654
  theme: import("@excalidraw/element/types").Theme;
@@ -1250,45 +659,18 @@ export declare const actionZoomToFitSelectionInViewport: {
1250
659
  selectedGroupIds: {
1251
660
  [groupId: string]: boolean;
1252
661
  };
1253
- editingGroupId: string | null;
662
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1254
663
  width: number;
1255
664
  height: number;
1256
665
  offsetTop: number;
1257
666
  offsetLeft: number;
1258
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1259
- collaborators: Map<import("../types").SocketId, Readonly<{
1260
- pointer?: import("../types").CollaboratorPointer | undefined;
1261
- button?: "up" | "down" | undefined;
1262
- selectedElementIds?: Readonly<{
1263
- [id: string]: true;
1264
- }> | undefined;
1265
- username?: string | null | undefined;
1266
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1267
- color?: {
1268
- background: string;
1269
- stroke: string;
1270
- } | undefined;
1271
- avatarUrl?: string | undefined;
1272
- id?: string | undefined;
1273
- socketId?: import("../types").SocketId | undefined;
1274
- isCurrentUser?: boolean | undefined;
1275
- isInCall?: boolean | undefined;
1276
- isSpeaking?: boolean | undefined;
1277
- isMuted?: boolean | undefined;
1278
- }>>;
667
+ fileHandle: FileSystemFileHandle | null;
668
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1279
669
  stats: {
1280
670
  open: boolean;
1281
671
  panels: number;
1282
672
  };
1283
- currentChartType: import("@excalidraw/element/types").ChartType;
1284
- pasteDialog: {
1285
- shown: false;
1286
- data: null;
1287
- } | {
1288
- shown: true;
1289
- data: import("../charts").Spreadsheet;
1290
- };
1291
- showHyperlinkPopup: false | "editor" | "info";
673
+ showHyperlinkPopup: false | "info" | "editor";
1292
674
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1293
675
  snapLines: readonly import("../snapping").SnapLine[];
1294
676
  originSnapOffset: {
@@ -1296,33 +678,35 @@ export declare const actionZoomToFitSelectionInViewport: {
1296
678
  y: number;
1297
679
  } | null;
1298
680
  objectsSnapModeEnabled: boolean;
1299
- userToFollow: import("../types").UserToFollow | null;
1300
681
  followedBy: Set<import("../types").SocketId>;
1301
682
  isCropping: boolean;
1302
- croppingElementId: string | null;
683
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1303
684
  searchMatches: Readonly<{
1304
- focusedId: string | null;
685
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1305
686
  matches: readonly import("../types").SearchMatch[];
1306
687
  }> | null;
1307
688
  activeLockedId: string | null;
1308
689
  lockedMultiSelections: {
1309
690
  [groupId: string]: true;
1310
691
  };
692
+ bindMode: import("@excalidraw/element/types").BindMode;
1311
693
  };
1312
694
  captureUpdate: "EVENTUALLY";
1313
695
  };
696
+ PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
1314
697
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1315
698
  } & {
1316
699
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1317
700
  };
1318
- export declare const actionZoomToFitSelection: {
1319
- name: "zoomToFitSelection";
701
+ export declare const actionZoomToFitSelectionInViewport: {
702
+ name: "zoomToFitSelectionInViewport";
1320
703
  label: string;
1321
704
  icon: import("react/jsx-runtime").JSX.Element;
1322
705
  trackEvent: {
1323
706
  category: "canvas";
1324
707
  };
1325
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
708
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState) => boolean;
709
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1326
710
  appState: {
1327
711
  scrollX: number;
1328
712
  scrollY: number;
@@ -1336,18 +720,23 @@ export declare const actionZoomToFitSelection: {
1336
720
  } | null;
1337
721
  showWelcomeScreen: boolean;
1338
722
  isLoading: boolean;
1339
- errorMessage: import("react").ReactNode;
723
+ errorMessage: React.ReactNode;
1340
724
  activeEmbeddable: {
1341
725
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
1342
- state: "active" | "hover";
726
+ state: "hover" | "active";
1343
727
  } | null;
1344
728
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1345
729
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1346
730
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1347
731
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1348
732
  isBindingEnabled: boolean;
1349
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1350
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
733
+ boxSelectionMode: import("../types").BoxSelectionMode;
734
+ bindingPreference: "enabled" | "disabled";
735
+ isMidpointSnappingEnabled: boolean;
736
+ suggestedBinding: {
737
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
738
+ midPoint?: import("@excalidraw/math").GlobalPoint;
739
+ } | null;
1351
740
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1352
741
  frameRendering: {
1353
742
  enabled: boolean;
@@ -1356,13 +745,17 @@ export declare const actionZoomToFitSelection: {
1356
745
  clip: boolean;
1357
746
  };
1358
747
  editingFrame: string | null;
1359
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1360
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
748
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
749
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1361
750
  activeTool: {
1362
751
  lastActiveTool: import("../types").ActiveTool | null;
1363
752
  locked: boolean;
1364
753
  fromSelection: boolean;
1365
754
  } & import("../types").ActiveTool;
755
+ preferredSelectionTool: {
756
+ type: "selection" | "lasso";
757
+ initialized: boolean;
758
+ };
1366
759
  penMode: boolean;
1367
760
  penDetected: boolean;
1368
761
  exportBackground: boolean;
@@ -1371,42 +764,50 @@ export declare const actionZoomToFitSelection: {
1371
764
  exportScale: number;
1372
765
  currentItemStrokeColor: string;
1373
766
  currentItemBackgroundColor: string;
1374
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1375
- currentItemStrokeWidth: number;
1376
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
767
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
768
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
769
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1377
770
  currentItemRoughness: number;
771
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1378
772
  currentItemOpacity: number;
1379
- currentItemFontFamily: number;
773
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1380
774
  currentItemFontSize: number;
1381
- currentItemTextAlign: string;
775
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1382
776
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1383
777
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1384
- currentHoveredFontFamily: number | null;
778
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1385
779
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1386
- currentItemArrowType: "round" | "sharp" | "elbow";
780
+ currentItemArrowType: "sharp" | "round" | "elbow";
1387
781
  viewBackgroundColor: string;
782
+ scrollConstraints: import("../types").ScrollConstraints | null;
1388
783
  cursorButton: "up" | "down";
1389
784
  scrolledOutside: boolean;
1390
785
  name: string | null;
1391
786
  isResizing: boolean;
1392
787
  isRotating: boolean;
1393
- openMenu: "canvas" | "shape" | null;
1394
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
788
+ openMenu: "canvas" | null;
789
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1395
790
  openSidebar: {
1396
- name: string;
1397
- tab?: string | undefined;
791
+ name: import("../types").SidebarName;
792
+ tab?: import("../types").SidebarTabName;
1398
793
  } | null;
1399
- openDialog: {
794
+ openDialog: null | {
1400
795
  name: "imageExport" | "help" | "jsonExport";
1401
796
  } | {
1402
797
  name: "ttd";
1403
- tab: "mermaid" | "text-to-diagram";
798
+ tab: "text-to-diagram" | "mermaid";
1404
799
  } | {
1405
800
  name: "commandPalette";
801
+ } | {
802
+ name: "settings";
1406
803
  } | {
1407
804
  name: "elementLinkSelector";
1408
- sourceElementId: string;
1409
- } | null;
805
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
806
+ } | {
807
+ name: "charts";
808
+ data: import("../charts").Spreadsheet;
809
+ rawText: string;
810
+ };
1410
811
  defaultSidebarDockedPreference: boolean;
1411
812
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1412
813
  selectedElementIds: Readonly<{
@@ -1421,9 +822,9 @@ export declare const actionZoomToFitSelection: {
1421
822
  selectedElementsAreBeingDragged: boolean;
1422
823
  shouldCacheIgnoreZoom: boolean;
1423
824
  toast: {
1424
- message: string;
1425
- closable?: boolean | undefined;
1426
- duration?: number | undefined;
825
+ message: React.ReactNode;
826
+ closable?: boolean;
827
+ duration?: number;
1427
828
  } | null;
1428
829
  zenModeEnabled: boolean;
1429
830
  theme: import("@excalidraw/element/types").Theme;
@@ -1434,45 +835,18 @@ export declare const actionZoomToFitSelection: {
1434
835
  selectedGroupIds: {
1435
836
  [groupId: string]: boolean;
1436
837
  };
1437
- editingGroupId: string | null;
838
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1438
839
  width: number;
1439
840
  height: number;
1440
841
  offsetTop: number;
1441
842
  offsetLeft: number;
1442
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1443
- collaborators: Map<import("../types").SocketId, Readonly<{
1444
- pointer?: import("../types").CollaboratorPointer | undefined;
1445
- button?: "up" | "down" | undefined;
1446
- selectedElementIds?: Readonly<{
1447
- [id: string]: true;
1448
- }> | undefined;
1449
- username?: string | null | undefined;
1450
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1451
- color?: {
1452
- background: string;
1453
- stroke: string;
1454
- } | undefined;
1455
- avatarUrl?: string | undefined;
1456
- id?: string | undefined;
1457
- socketId?: import("../types").SocketId | undefined;
1458
- isCurrentUser?: boolean | undefined;
1459
- isInCall?: boolean | undefined;
1460
- isSpeaking?: boolean | undefined;
1461
- isMuted?: boolean | undefined;
1462
- }>>;
843
+ fileHandle: FileSystemFileHandle | null;
844
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1463
845
  stats: {
1464
846
  open: boolean;
1465
847
  panels: number;
1466
848
  };
1467
- currentChartType: import("@excalidraw/element/types").ChartType;
1468
- pasteDialog: {
1469
- shown: false;
1470
- data: null;
1471
- } | {
1472
- shown: true;
1473
- data: import("../charts").Spreadsheet;
1474
- };
1475
- showHyperlinkPopup: false | "editor" | "info";
849
+ showHyperlinkPopup: false | "info" | "editor";
1476
850
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1477
851
  snapLines: readonly import("../snapping").SnapLine[];
1478
852
  originSnapOffset: {
@@ -1483,31 +857,32 @@ export declare const actionZoomToFitSelection: {
1483
857
  userToFollow: import("../types").UserToFollow | null;
1484
858
  followedBy: Set<import("../types").SocketId>;
1485
859
  isCropping: boolean;
1486
- croppingElementId: string | null;
860
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1487
861
  searchMatches: Readonly<{
1488
- focusedId: string | null;
862
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1489
863
  matches: readonly import("../types").SearchMatch[];
1490
864
  }> | null;
1491
865
  activeLockedId: string | null;
1492
866
  lockedMultiSelections: {
1493
867
  [groupId: string]: true;
1494
868
  };
869
+ bindMode: import("@excalidraw/element/types").BindMode;
1495
870
  };
1496
871
  captureUpdate: "EVENTUALLY";
1497
872
  };
1498
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
873
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1499
874
  } & {
1500
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
875
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1501
876
  };
1502
- export declare const actionZoomToFit: {
1503
- name: "zoomToFit";
877
+ export declare const actionZoomToFitSelection: {
878
+ name: "zoomToFitSelection";
1504
879
  label: string;
1505
880
  icon: import("react/jsx-runtime").JSX.Element;
1506
- viewMode: true;
1507
881
  trackEvent: {
1508
882
  category: "canvas";
1509
883
  };
1510
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
884
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState) => boolean;
885
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1511
886
  appState: {
1512
887
  scrollX: number;
1513
888
  scrollY: number;
@@ -1521,18 +896,23 @@ export declare const actionZoomToFit: {
1521
896
  } | null;
1522
897
  showWelcomeScreen: boolean;
1523
898
  isLoading: boolean;
1524
- errorMessage: import("react").ReactNode;
899
+ errorMessage: React.ReactNode;
1525
900
  activeEmbeddable: {
1526
901
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
1527
- state: "active" | "hover";
902
+ state: "hover" | "active";
1528
903
  } | null;
1529
904
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1530
905
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1531
906
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1532
907
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1533
908
  isBindingEnabled: boolean;
1534
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1535
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
909
+ boxSelectionMode: import("../types").BoxSelectionMode;
910
+ bindingPreference: "enabled" | "disabled";
911
+ isMidpointSnappingEnabled: boolean;
912
+ suggestedBinding: {
913
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
914
+ midPoint?: import("@excalidraw/math").GlobalPoint;
915
+ } | null;
1536
916
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1537
917
  frameRendering: {
1538
918
  enabled: boolean;
@@ -1541,13 +921,17 @@ export declare const actionZoomToFit: {
1541
921
  clip: boolean;
1542
922
  };
1543
923
  editingFrame: string | null;
1544
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1545
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
924
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
925
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1546
926
  activeTool: {
1547
927
  lastActiveTool: import("../types").ActiveTool | null;
1548
928
  locked: boolean;
1549
929
  fromSelection: boolean;
1550
930
  } & import("../types").ActiveTool;
931
+ preferredSelectionTool: {
932
+ type: "selection" | "lasso";
933
+ initialized: boolean;
934
+ };
1551
935
  penMode: boolean;
1552
936
  penDetected: boolean;
1553
937
  exportBackground: boolean;
@@ -1556,42 +940,50 @@ export declare const actionZoomToFit: {
1556
940
  exportScale: number;
1557
941
  currentItemStrokeColor: string;
1558
942
  currentItemBackgroundColor: string;
1559
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1560
- currentItemStrokeWidth: number;
1561
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
943
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
944
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
945
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1562
946
  currentItemRoughness: number;
947
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1563
948
  currentItemOpacity: number;
1564
- currentItemFontFamily: number;
949
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1565
950
  currentItemFontSize: number;
1566
- currentItemTextAlign: string;
951
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1567
952
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1568
953
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1569
- currentHoveredFontFamily: number | null;
954
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1570
955
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1571
- currentItemArrowType: "round" | "sharp" | "elbow";
956
+ currentItemArrowType: "sharp" | "round" | "elbow";
1572
957
  viewBackgroundColor: string;
958
+ scrollConstraints: import("../types").ScrollConstraints | null;
1573
959
  cursorButton: "up" | "down";
1574
960
  scrolledOutside: boolean;
1575
961
  name: string | null;
1576
962
  isResizing: boolean;
1577
963
  isRotating: boolean;
1578
- openMenu: "canvas" | "shape" | null;
1579
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
964
+ openMenu: "canvas" | null;
965
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1580
966
  openSidebar: {
1581
- name: string;
1582
- tab?: string | undefined;
967
+ name: import("../types").SidebarName;
968
+ tab?: import("../types").SidebarTabName;
1583
969
  } | null;
1584
- openDialog: {
970
+ openDialog: null | {
1585
971
  name: "imageExport" | "help" | "jsonExport";
1586
972
  } | {
1587
973
  name: "ttd";
1588
- tab: "mermaid" | "text-to-diagram";
974
+ tab: "text-to-diagram" | "mermaid";
1589
975
  } | {
1590
976
  name: "commandPalette";
977
+ } | {
978
+ name: "settings";
1591
979
  } | {
1592
980
  name: "elementLinkSelector";
1593
- sourceElementId: string;
1594
- } | null;
981
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
982
+ } | {
983
+ name: "charts";
984
+ data: import("../charts").Spreadsheet;
985
+ rawText: string;
986
+ };
1595
987
  defaultSidebarDockedPreference: boolean;
1596
988
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1597
989
  selectedElementIds: Readonly<{
@@ -1606,9 +998,9 @@ export declare const actionZoomToFit: {
1606
998
  selectedElementsAreBeingDragged: boolean;
1607
999
  shouldCacheIgnoreZoom: boolean;
1608
1000
  toast: {
1609
- message: string;
1610
- closable?: boolean | undefined;
1611
- duration?: number | undefined;
1001
+ message: React.ReactNode;
1002
+ closable?: boolean;
1003
+ duration?: number;
1612
1004
  } | null;
1613
1005
  zenModeEnabled: boolean;
1614
1006
  theme: import("@excalidraw/element/types").Theme;
@@ -1619,45 +1011,18 @@ export declare const actionZoomToFit: {
1619
1011
  selectedGroupIds: {
1620
1012
  [groupId: string]: boolean;
1621
1013
  };
1622
- editingGroupId: string | null;
1014
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1623
1015
  width: number;
1624
1016
  height: number;
1625
1017
  offsetTop: number;
1626
1018
  offsetLeft: number;
1627
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1628
- collaborators: Map<import("../types").SocketId, Readonly<{
1629
- pointer?: import("../types").CollaboratorPointer | undefined;
1630
- button?: "up" | "down" | undefined;
1631
- selectedElementIds?: Readonly<{
1632
- [id: string]: true;
1633
- }> | undefined;
1634
- username?: string | null | undefined;
1635
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1636
- color?: {
1637
- background: string;
1638
- stroke: string;
1639
- } | undefined;
1640
- avatarUrl?: string | undefined;
1641
- id?: string | undefined;
1642
- socketId?: import("../types").SocketId | undefined;
1643
- isCurrentUser?: boolean | undefined;
1644
- isInCall?: boolean | undefined;
1645
- isSpeaking?: boolean | undefined;
1646
- isMuted?: boolean | undefined;
1647
- }>>;
1019
+ fileHandle: FileSystemFileHandle | null;
1020
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1648
1021
  stats: {
1649
1022
  open: boolean;
1650
1023
  panels: number;
1651
1024
  };
1652
- currentChartType: import("@excalidraw/element/types").ChartType;
1653
- pasteDialog: {
1654
- shown: false;
1655
- data: null;
1656
- } | {
1657
- shown: true;
1658
- data: import("../charts").Spreadsheet;
1659
- };
1660
- showHyperlinkPopup: false | "editor" | "info";
1025
+ showHyperlinkPopup: false | "info" | "editor";
1661
1026
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1662
1027
  snapLines: readonly import("../snapping").SnapLine[];
1663
1028
  originSnapOffset: {
@@ -1668,34 +1033,39 @@ export declare const actionZoomToFit: {
1668
1033
  userToFollow: import("../types").UserToFollow | null;
1669
1034
  followedBy: Set<import("../types").SocketId>;
1670
1035
  isCropping: boolean;
1671
- croppingElementId: string | null;
1036
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1672
1037
  searchMatches: Readonly<{
1673
- focusedId: string | null;
1038
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1674
1039
  matches: readonly import("../types").SearchMatch[];
1675
1040
  }> | null;
1676
1041
  activeLockedId: string | null;
1677
1042
  lockedMultiSelections: {
1678
1043
  [groupId: string]: true;
1679
1044
  };
1045
+ bindMode: import("@excalidraw/element/types").BindMode;
1680
1046
  };
1681
1047
  captureUpdate: "EVENTUALLY";
1682
1048
  };
1683
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1049
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1684
1050
  } & {
1685
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1051
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1686
1052
  };
1687
- export declare const actionToggleTheme: {
1688
- name: "toggleTheme";
1689
- label: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>) => "buttons.lightMode" | "buttons.darkMode";
1690
- keywords: string[];
1691
- icon: (appState: import("../types").UIAppState) => import("react/jsx-runtime").JSX.Element;
1053
+ export declare const actionZoomToFit: {
1054
+ name: "zoomToFit";
1055
+ label: string;
1056
+ icon: import("react/jsx-runtime").JSX.Element;
1692
1057
  viewMode: true;
1693
1058
  trackEvent: {
1694
1059
  category: "canvas";
1695
1060
  };
1696
- perform: (_: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
1061
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState) => boolean;
1062
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1697
1063
  appState: {
1698
- theme: any;
1064
+ scrollX: number;
1065
+ scrollY: number;
1066
+ zoom: {
1067
+ value: import("../types").NormalizedZoomValue;
1068
+ };
1699
1069
  contextMenu: {
1700
1070
  items: import("../components/ContextMenu").ContextMenuItems;
1701
1071
  top: number;
@@ -1703,18 +1073,23 @@ export declare const actionToggleTheme: {
1703
1073
  } | null;
1704
1074
  showWelcomeScreen: boolean;
1705
1075
  isLoading: boolean;
1706
- errorMessage: import("react").ReactNode;
1076
+ errorMessage: React.ReactNode;
1707
1077
  activeEmbeddable: {
1708
1078
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
1709
- state: "active" | "hover";
1079
+ state: "hover" | "active";
1710
1080
  } | null;
1711
1081
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1712
1082
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1713
1083
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1714
1084
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1715
1085
  isBindingEnabled: boolean;
1716
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1717
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
1086
+ boxSelectionMode: import("../types").BoxSelectionMode;
1087
+ bindingPreference: "enabled" | "disabled";
1088
+ isMidpointSnappingEnabled: boolean;
1089
+ suggestedBinding: {
1090
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1091
+ midPoint?: import("@excalidraw/math").GlobalPoint;
1092
+ } | null;
1718
1093
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1719
1094
  frameRendering: {
1720
1095
  enabled: boolean;
@@ -1723,13 +1098,17 @@ export declare const actionToggleTheme: {
1723
1098
  clip: boolean;
1724
1099
  };
1725
1100
  editingFrame: string | null;
1726
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1727
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1101
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
1102
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1728
1103
  activeTool: {
1729
1104
  lastActiveTool: import("../types").ActiveTool | null;
1730
1105
  locked: boolean;
1731
1106
  fromSelection: boolean;
1732
1107
  } & import("../types").ActiveTool;
1108
+ preferredSelectionTool: {
1109
+ type: "selection" | "lasso";
1110
+ initialized: boolean;
1111
+ };
1733
1112
  penMode: boolean;
1734
1113
  penDetected: boolean;
1735
1114
  exportBackground: boolean;
@@ -1738,47 +1117,50 @@ export declare const actionToggleTheme: {
1738
1117
  exportScale: number;
1739
1118
  currentItemStrokeColor: string;
1740
1119
  currentItemBackgroundColor: string;
1741
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1742
- currentItemStrokeWidth: number;
1743
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
1120
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1121
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1122
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1744
1123
  currentItemRoughness: number;
1124
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1745
1125
  currentItemOpacity: number;
1746
- currentItemFontFamily: number;
1126
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1747
1127
  currentItemFontSize: number;
1748
- currentItemTextAlign: string;
1128
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1749
1129
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1750
1130
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1751
- currentHoveredFontFamily: number | null;
1131
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1752
1132
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1753
- currentItemArrowType: "round" | "sharp" | "elbow";
1133
+ currentItemArrowType: "sharp" | "round" | "elbow";
1754
1134
  viewBackgroundColor: string;
1755
- scrollX: number;
1756
- scrollY: number;
1135
+ scrollConstraints: import("../types").ScrollConstraints | null;
1757
1136
  cursorButton: "up" | "down";
1758
1137
  scrolledOutside: boolean;
1759
1138
  name: string | null;
1760
1139
  isResizing: boolean;
1761
1140
  isRotating: boolean;
1762
- zoom: Readonly<{
1763
- value: import("../types").NormalizedZoomValue;
1764
- }>;
1765
- openMenu: "canvas" | "shape" | null;
1766
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1141
+ openMenu: "canvas" | null;
1142
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1767
1143
  openSidebar: {
1768
- name: string;
1769
- tab?: string | undefined;
1144
+ name: import("../types").SidebarName;
1145
+ tab?: import("../types").SidebarTabName;
1770
1146
  } | null;
1771
- openDialog: {
1147
+ openDialog: null | {
1772
1148
  name: "imageExport" | "help" | "jsonExport";
1773
1149
  } | {
1774
1150
  name: "ttd";
1775
- tab: "mermaid" | "text-to-diagram";
1151
+ tab: "text-to-diagram" | "mermaid";
1776
1152
  } | {
1777
1153
  name: "commandPalette";
1154
+ } | {
1155
+ name: "settings";
1778
1156
  } | {
1779
1157
  name: "elementLinkSelector";
1780
- sourceElementId: string;
1781
- } | null;
1158
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1159
+ } | {
1160
+ name: "charts";
1161
+ data: import("../charts").Spreadsheet;
1162
+ rawText: string;
1163
+ };
1782
1164
  defaultSidebarDockedPreference: boolean;
1783
1165
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1784
1166
  selectedElementIds: Readonly<{
@@ -1793,11 +1175,12 @@ export declare const actionToggleTheme: {
1793
1175
  selectedElementsAreBeingDragged: boolean;
1794
1176
  shouldCacheIgnoreZoom: boolean;
1795
1177
  toast: {
1796
- message: string;
1797
- closable?: boolean | undefined;
1798
- duration?: number | undefined;
1178
+ message: React.ReactNode;
1179
+ closable?: boolean;
1180
+ duration?: number;
1799
1181
  } | null;
1800
1182
  zenModeEnabled: boolean;
1183
+ theme: import("@excalidraw/element/types").Theme;
1801
1184
  gridSize: number;
1802
1185
  gridStep: number;
1803
1186
  gridModeEnabled: boolean;
@@ -1805,45 +1188,18 @@ export declare const actionToggleTheme: {
1805
1188
  selectedGroupIds: {
1806
1189
  [groupId: string]: boolean;
1807
1190
  };
1808
- editingGroupId: string | null;
1191
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1809
1192
  width: number;
1810
1193
  height: number;
1811
1194
  offsetTop: number;
1812
1195
  offsetLeft: number;
1813
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1814
- collaborators: Map<import("../types").SocketId, Readonly<{
1815
- pointer?: import("../types").CollaboratorPointer | undefined;
1816
- button?: "up" | "down" | undefined;
1817
- selectedElementIds?: Readonly<{
1818
- [id: string]: true;
1819
- }> | undefined;
1820
- username?: string | null | undefined;
1821
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1822
- color?: {
1823
- background: string;
1824
- stroke: string;
1825
- } | undefined;
1826
- avatarUrl?: string | undefined;
1827
- id?: string | undefined;
1828
- socketId?: import("../types").SocketId | undefined;
1829
- isCurrentUser?: boolean | undefined;
1830
- isInCall?: boolean | undefined;
1831
- isSpeaking?: boolean | undefined;
1832
- isMuted?: boolean | undefined;
1833
- }>>;
1196
+ fileHandle: FileSystemFileHandle | null;
1197
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
1834
1198
  stats: {
1835
1199
  open: boolean;
1836
1200
  panels: number;
1837
1201
  };
1838
- currentChartType: import("@excalidraw/element/types").ChartType;
1839
- pasteDialog: {
1840
- shown: false;
1841
- data: null;
1842
- } | {
1843
- shown: true;
1844
- data: import("../charts").Spreadsheet;
1845
- };
1846
- showHyperlinkPopup: false | "editor" | "info";
1202
+ showHyperlinkPopup: false | "info" | "editor";
1847
1203
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
1848
1204
  snapLines: readonly import("../snapping").SnapLine[];
1849
1205
  originSnapOffset: {
@@ -1854,22 +1210,25 @@ export declare const actionToggleTheme: {
1854
1210
  userToFollow: import("../types").UserToFollow | null;
1855
1211
  followedBy: Set<import("../types").SocketId>;
1856
1212
  isCropping: boolean;
1857
- croppingElementId: string | null;
1213
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1858
1214
  searchMatches: Readonly<{
1859
- focusedId: string | null;
1215
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
1860
1216
  matches: readonly import("../types").SearchMatch[];
1861
1217
  }> | null;
1862
1218
  activeLockedId: string | null;
1863
1219
  lockedMultiSelections: {
1864
1220
  [groupId: string]: true;
1865
1221
  };
1222
+ bindMode: import("@excalidraw/element/types").BindMode;
1866
1223
  };
1867
1224
  captureUpdate: "EVENTUALLY";
1868
1225
  };
1869
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1870
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1226
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
1871
1227
  } & {
1872
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1228
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
1229
+ };
1230
+ export declare const actionToggleTheme: import("./types").Action<import("@excalidraw/element/types").Theme> & {
1231
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
1873
1232
  };
1874
1233
  export declare const actionToggleEraserTool: {
1875
1234
  name: "toggleEraserTool";
@@ -1877,7 +1236,7 @@ export declare const actionToggleEraserTool: {
1877
1236
  trackEvent: {
1878
1237
  category: "toolbar";
1879
1238
  };
1880
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
1239
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
1881
1240
  appState: {
1882
1241
  selectedElementIds: {};
1883
1242
  selectedGroupIds: {};
@@ -1894,14 +1253,19 @@ export declare const actionToggleEraserTool: {
1894
1253
  } | null;
1895
1254
  showWelcomeScreen: boolean;
1896
1255
  isLoading: boolean;
1897
- errorMessage: import("react").ReactNode;
1256
+ errorMessage: React.ReactNode;
1898
1257
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
1899
1258
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1900
1259
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
1901
1260
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1902
1261
  isBindingEnabled: boolean;
1903
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
1904
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
1262
+ boxSelectionMode: import("../types").BoxSelectionMode;
1263
+ bindingPreference: "enabled" | "disabled";
1264
+ isMidpointSnappingEnabled: boolean;
1265
+ suggestedBinding: {
1266
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1267
+ midPoint?: import("@excalidraw/math").GlobalPoint;
1268
+ } | null;
1905
1269
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
1906
1270
  frameRendering: {
1907
1271
  enabled: boolean;
@@ -1910,8 +1274,12 @@ export declare const actionToggleEraserTool: {
1910
1274
  clip: boolean;
1911
1275
  };
1912
1276
  editingFrame: string | null;
1913
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
1914
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1277
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
1278
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1279
+ preferredSelectionTool: {
1280
+ type: "selection" | "lasso";
1281
+ initialized: boolean;
1282
+ };
1915
1283
  penMode: boolean;
1916
1284
  penDetected: boolean;
1917
1285
  exportBackground: boolean;
@@ -1920,47 +1288,53 @@ export declare const actionToggleEraserTool: {
1920
1288
  exportScale: number;
1921
1289
  currentItemStrokeColor: string;
1922
1290
  currentItemBackgroundColor: string;
1923
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
1924
- currentItemStrokeWidth: number;
1925
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
1291
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1292
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1293
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
1926
1294
  currentItemRoughness: number;
1295
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
1927
1296
  currentItemOpacity: number;
1928
- currentItemFontFamily: number;
1297
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
1929
1298
  currentItemFontSize: number;
1930
- currentItemTextAlign: string;
1299
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
1931
1300
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1932
1301
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
1933
- currentHoveredFontFamily: number | null;
1302
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
1934
1303
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
1935
- currentItemArrowType: "round" | "sharp" | "elbow";
1304
+ currentItemArrowType: "sharp" | "round" | "elbow";
1936
1305
  viewBackgroundColor: string;
1937
1306
  scrollX: number;
1938
1307
  scrollY: number;
1308
+ scrollConstraints: import("../types").ScrollConstraints | null;
1939
1309
  cursorButton: "up" | "down";
1940
1310
  scrolledOutside: boolean;
1941
1311
  name: string | null;
1942
1312
  isResizing: boolean;
1943
1313
  isRotating: boolean;
1944
- zoom: Readonly<{
1945
- value: import("../types").NormalizedZoomValue;
1946
- }>;
1947
- openMenu: "canvas" | "shape" | null;
1948
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1314
+ zoom: import("../types").Zoom;
1315
+ openMenu: "canvas" | null;
1316
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
1949
1317
  openSidebar: {
1950
- name: string;
1951
- tab?: string | undefined;
1318
+ name: import("../types").SidebarName;
1319
+ tab?: import("../types").SidebarTabName;
1952
1320
  } | null;
1953
- openDialog: {
1321
+ openDialog: null | {
1954
1322
  name: "imageExport" | "help" | "jsonExport";
1955
1323
  } | {
1956
1324
  name: "ttd";
1957
- tab: "mermaid" | "text-to-diagram";
1325
+ tab: "text-to-diagram" | "mermaid";
1958
1326
  } | {
1959
1327
  name: "commandPalette";
1328
+ } | {
1329
+ name: "settings";
1960
1330
  } | {
1961
1331
  name: "elementLinkSelector";
1962
- sourceElementId: string;
1963
- } | null;
1332
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1333
+ } | {
1334
+ name: "charts";
1335
+ data: import("../charts").Spreadsheet;
1336
+ rawText: string;
1337
+ };
1964
1338
  defaultSidebarDockedPreference: boolean;
1965
1339
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
1966
1340
  hoveredElementIds: Readonly<{
@@ -1972,9 +1346,9 @@ export declare const actionToggleEraserTool: {
1972
1346
  selectedElementsAreBeingDragged: boolean;
1973
1347
  shouldCacheIgnoreZoom: boolean;
1974
1348
  toast: {
1975
- message: string;
1976
- closable?: boolean | undefined;
1977
- duration?: number | undefined;
1349
+ message: React.ReactNode;
1350
+ closable?: boolean;
1351
+ duration?: number;
1978
1352
  } | null;
1979
1353
  zenModeEnabled: boolean;
1980
1354
  theme: import("@excalidraw/element/types").Theme;
@@ -1982,45 +1356,18 @@ export declare const actionToggleEraserTool: {
1982
1356
  gridStep: number;
1983
1357
  gridModeEnabled: boolean;
1984
1358
  viewModeEnabled: boolean;
1985
- editingGroupId: string | null;
1359
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
1986
1360
  width: number;
1987
1361
  height: number;
1988
1362
  offsetTop: number;
1989
1363
  offsetLeft: number;
1990
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
1991
- collaborators: Map<import("../types").SocketId, Readonly<{
1992
- pointer?: import("../types").CollaboratorPointer | undefined;
1993
- button?: "up" | "down" | undefined;
1994
- selectedElementIds?: Readonly<{
1995
- [id: string]: true;
1996
- }> | undefined;
1997
- username?: string | null | undefined;
1998
- userState?: import("@excalidraw/common").UserIdleState | undefined;
1999
- color?: {
2000
- background: string;
2001
- stroke: string;
2002
- } | undefined;
2003
- avatarUrl?: string | undefined;
2004
- id?: string | undefined;
2005
- socketId?: import("../types").SocketId | undefined;
2006
- isCurrentUser?: boolean | undefined;
2007
- isInCall?: boolean | undefined;
2008
- isSpeaking?: boolean | undefined;
2009
- isMuted?: boolean | undefined;
2010
- }>>;
1364
+ fileHandle: FileSystemFileHandle | null;
1365
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
2011
1366
  stats: {
2012
1367
  open: boolean;
2013
1368
  panels: number;
2014
1369
  };
2015
- currentChartType: import("@excalidraw/element/types").ChartType;
2016
- pasteDialog: {
2017
- shown: false;
2018
- data: null;
2019
- } | {
2020
- shown: true;
2021
- data: import("../charts").Spreadsheet;
2022
- };
2023
- showHyperlinkPopup: false | "editor" | "info";
1370
+ showHyperlinkPopup: false | "info" | "editor";
2024
1371
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2025
1372
  snapLines: readonly import("../snapping").SnapLine[];
2026
1373
  originSnapOffset: {
@@ -2031,21 +1378,22 @@ export declare const actionToggleEraserTool: {
2031
1378
  userToFollow: import("../types").UserToFollow | null;
2032
1379
  followedBy: Set<import("../types").SocketId>;
2033
1380
  isCropping: boolean;
2034
- croppingElementId: string | null;
1381
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2035
1382
  searchMatches: Readonly<{
2036
- focusedId: string | null;
1383
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2037
1384
  matches: readonly import("../types").SearchMatch[];
2038
1385
  }> | null;
2039
1386
  activeLockedId: string | null;
2040
1387
  lockedMultiSelections: {
2041
1388
  [groupId: string]: true;
2042
1389
  };
1390
+ bindMode: import("@excalidraw/element/types").BindMode;
2043
1391
  };
2044
1392
  captureUpdate: "IMMEDIATELY";
2045
1393
  };
2046
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1394
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
2047
1395
  } & {
2048
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1396
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
2049
1397
  };
2050
1398
  export declare const actionToggleLassoTool: {
2051
1399
  name: "toggleLassoTool";
@@ -2054,7 +1402,8 @@ export declare const actionToggleLassoTool: {
2054
1402
  trackEvent: {
2055
1403
  category: "toolbar";
2056
1404
  };
2057
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
1405
+ predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
1406
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
2058
1407
  appState: {
2059
1408
  selectedElementIds: {};
2060
1409
  selectedGroupIds: {};
@@ -2071,14 +1420,19 @@ export declare const actionToggleLassoTool: {
2071
1420
  } | null;
2072
1421
  showWelcomeScreen: boolean;
2073
1422
  isLoading: boolean;
2074
- errorMessage: import("react").ReactNode;
1423
+ errorMessage: React.ReactNode;
2075
1424
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
2076
1425
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2077
1426
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
2078
1427
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2079
1428
  isBindingEnabled: boolean;
2080
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
2081
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
1429
+ boxSelectionMode: import("../types").BoxSelectionMode;
1430
+ bindingPreference: "enabled" | "disabled";
1431
+ isMidpointSnappingEnabled: boolean;
1432
+ suggestedBinding: {
1433
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1434
+ midPoint?: import("@excalidraw/math").GlobalPoint;
1435
+ } | null;
2082
1436
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
2083
1437
  frameRendering: {
2084
1438
  enabled: boolean;
@@ -2087,8 +1441,12 @@ export declare const actionToggleLassoTool: {
2087
1441
  clip: boolean;
2088
1442
  };
2089
1443
  editingFrame: string | null;
2090
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2091
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1444
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
1445
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1446
+ preferredSelectionTool: {
1447
+ type: "selection" | "lasso";
1448
+ initialized: boolean;
1449
+ };
2092
1450
  penMode: boolean;
2093
1451
  penDetected: boolean;
2094
1452
  exportBackground: boolean;
@@ -2097,47 +1455,53 @@ export declare const actionToggleLassoTool: {
2097
1455
  exportScale: number;
2098
1456
  currentItemStrokeColor: string;
2099
1457
  currentItemBackgroundColor: string;
2100
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
2101
- currentItemStrokeWidth: number;
2102
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
1458
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1459
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1460
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
2103
1461
  currentItemRoughness: number;
1462
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
2104
1463
  currentItemOpacity: number;
2105
- currentItemFontFamily: number;
1464
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
2106
1465
  currentItemFontSize: number;
2107
- currentItemTextAlign: string;
1466
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
2108
1467
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
2109
1468
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
2110
- currentHoveredFontFamily: number | null;
1469
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
2111
1470
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
2112
- currentItemArrowType: "round" | "sharp" | "elbow";
1471
+ currentItemArrowType: "sharp" | "round" | "elbow";
2113
1472
  viewBackgroundColor: string;
2114
1473
  scrollX: number;
2115
1474
  scrollY: number;
1475
+ scrollConstraints: import("../types").ScrollConstraints | null;
2116
1476
  cursorButton: "up" | "down";
2117
1477
  scrolledOutside: boolean;
2118
1478
  name: string | null;
2119
1479
  isResizing: boolean;
2120
1480
  isRotating: boolean;
2121
- zoom: Readonly<{
2122
- value: import("../types").NormalizedZoomValue;
2123
- }>;
2124
- openMenu: "canvas" | "shape" | null;
2125
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1481
+ zoom: import("../types").Zoom;
1482
+ openMenu: "canvas" | null;
1483
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2126
1484
  openSidebar: {
2127
- name: string;
2128
- tab?: string | undefined;
1485
+ name: import("../types").SidebarName;
1486
+ tab?: import("../types").SidebarTabName;
2129
1487
  } | null;
2130
- openDialog: {
1488
+ openDialog: null | {
2131
1489
  name: "imageExport" | "help" | "jsonExport";
2132
1490
  } | {
2133
1491
  name: "ttd";
2134
- tab: "mermaid" | "text-to-diagram";
1492
+ tab: "text-to-diagram" | "mermaid";
2135
1493
  } | {
2136
1494
  name: "commandPalette";
1495
+ } | {
1496
+ name: "settings";
2137
1497
  } | {
2138
1498
  name: "elementLinkSelector";
2139
- sourceElementId: string;
2140
- } | null;
1499
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1500
+ } | {
1501
+ name: "charts";
1502
+ data: import("../charts").Spreadsheet;
1503
+ rawText: string;
1504
+ };
2141
1505
  defaultSidebarDockedPreference: boolean;
2142
1506
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
2143
1507
  hoveredElementIds: Readonly<{
@@ -2149,9 +1513,9 @@ export declare const actionToggleLassoTool: {
2149
1513
  selectedElementsAreBeingDragged: boolean;
2150
1514
  shouldCacheIgnoreZoom: boolean;
2151
1515
  toast: {
2152
- message: string;
2153
- closable?: boolean | undefined;
2154
- duration?: number | undefined;
1516
+ message: React.ReactNode;
1517
+ closable?: boolean;
1518
+ duration?: number;
2155
1519
  } | null;
2156
1520
  zenModeEnabled: boolean;
2157
1521
  theme: import("@excalidraw/element/types").Theme;
@@ -2159,45 +1523,18 @@ export declare const actionToggleLassoTool: {
2159
1523
  gridStep: number;
2160
1524
  gridModeEnabled: boolean;
2161
1525
  viewModeEnabled: boolean;
2162
- editingGroupId: string | null;
1526
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
2163
1527
  width: number;
2164
1528
  height: number;
2165
1529
  offsetTop: number;
2166
1530
  offsetLeft: number;
2167
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
2168
- collaborators: Map<import("../types").SocketId, Readonly<{
2169
- pointer?: import("../types").CollaboratorPointer | undefined;
2170
- button?: "up" | "down" | undefined;
2171
- selectedElementIds?: Readonly<{
2172
- [id: string]: true;
2173
- }> | undefined;
2174
- username?: string | null | undefined;
2175
- userState?: import("@excalidraw/common").UserIdleState | undefined;
2176
- color?: {
2177
- background: string;
2178
- stroke: string;
2179
- } | undefined;
2180
- avatarUrl?: string | undefined;
2181
- id?: string | undefined;
2182
- socketId?: import("../types").SocketId | undefined;
2183
- isCurrentUser?: boolean | undefined;
2184
- isInCall?: boolean | undefined;
2185
- isSpeaking?: boolean | undefined;
2186
- isMuted?: boolean | undefined;
2187
- }>>;
1531
+ fileHandle: FileSystemFileHandle | null;
1532
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
2188
1533
  stats: {
2189
1534
  open: boolean;
2190
1535
  panels: number;
2191
1536
  };
2192
- currentChartType: import("@excalidraw/element/types").ChartType;
2193
- pasteDialog: {
2194
- shown: false;
2195
- data: null;
2196
- } | {
2197
- shown: true;
2198
- data: import("../charts").Spreadsheet;
2199
- };
2200
- showHyperlinkPopup: false | "editor" | "info";
1537
+ showHyperlinkPopup: false | "info" | "editor";
2201
1538
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2202
1539
  snapLines: readonly import("../snapping").SnapLine[];
2203
1540
  originSnapOffset: {
@@ -2208,15 +1545,16 @@ export declare const actionToggleLassoTool: {
2208
1545
  userToFollow: import("../types").UserToFollow | null;
2209
1546
  followedBy: Set<import("../types").SocketId>;
2210
1547
  isCropping: boolean;
2211
- croppingElementId: string | null;
1548
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2212
1549
  searchMatches: Readonly<{
2213
- focusedId: string | null;
1550
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2214
1551
  matches: readonly import("../types").SearchMatch[];
2215
1552
  }> | null;
2216
1553
  activeLockedId: string | null;
2217
1554
  lockedMultiSelections: {
2218
1555
  [groupId: string]: true;
2219
1556
  };
1557
+ bindMode: import("@excalidraw/element/types").BindMode;
2220
1558
  };
2221
1559
  captureUpdate: "NEVER";
2222
1560
  };
@@ -2231,7 +1569,7 @@ export declare const actionToggleHandTool: {
2231
1569
  };
2232
1570
  icon: import("react/jsx-runtime").JSX.Element;
2233
1571
  viewMode: false;
2234
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
1572
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
2235
1573
  appState: {
2236
1574
  selectedElementIds: {};
2237
1575
  selectedGroupIds: {};
@@ -2248,14 +1586,19 @@ export declare const actionToggleHandTool: {
2248
1586
  } | null;
2249
1587
  showWelcomeScreen: boolean;
2250
1588
  isLoading: boolean;
2251
- errorMessage: import("react").ReactNode;
1589
+ errorMessage: React.ReactNode;
2252
1590
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
2253
1591
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2254
1592
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
2255
1593
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
2256
1594
  isBindingEnabled: boolean;
2257
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
2258
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
1595
+ boxSelectionMode: import("../types").BoxSelectionMode;
1596
+ bindingPreference: "enabled" | "disabled";
1597
+ isMidpointSnappingEnabled: boolean;
1598
+ suggestedBinding: {
1599
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
1600
+ midPoint?: import("@excalidraw/math").GlobalPoint;
1601
+ } | null;
2259
1602
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
2260
1603
  frameRendering: {
2261
1604
  enabled: boolean;
@@ -2264,8 +1607,12 @@ export declare const actionToggleHandTool: {
2264
1607
  clip: boolean;
2265
1608
  };
2266
1609
  editingFrame: string | null;
2267
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
2268
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
1610
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
1611
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
1612
+ preferredSelectionTool: {
1613
+ type: "selection" | "lasso";
1614
+ initialized: boolean;
1615
+ };
2269
1616
  penMode: boolean;
2270
1617
  penDetected: boolean;
2271
1618
  exportBackground: boolean;
@@ -2274,47 +1621,53 @@ export declare const actionToggleHandTool: {
2274
1621
  exportScale: number;
2275
1622
  currentItemStrokeColor: string;
2276
1623
  currentItemBackgroundColor: string;
2277
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
2278
- currentItemStrokeWidth: number;
2279
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
1624
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
1625
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
1626
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
2280
1627
  currentItemRoughness: number;
1628
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
2281
1629
  currentItemOpacity: number;
2282
- currentItemFontFamily: number;
1630
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
2283
1631
  currentItemFontSize: number;
2284
- currentItemTextAlign: string;
1632
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
2285
1633
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
2286
1634
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
2287
- currentHoveredFontFamily: number | null;
1635
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
2288
1636
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
2289
- currentItemArrowType: "round" | "sharp" | "elbow";
1637
+ currentItemArrowType: "sharp" | "round" | "elbow";
2290
1638
  viewBackgroundColor: string;
2291
1639
  scrollX: number;
2292
1640
  scrollY: number;
1641
+ scrollConstraints: import("../types").ScrollConstraints | null;
2293
1642
  cursorButton: "up" | "down";
2294
1643
  scrolledOutside: boolean;
2295
1644
  name: string | null;
2296
1645
  isResizing: boolean;
2297
1646
  isRotating: boolean;
2298
- zoom: Readonly<{
2299
- value: import("../types").NormalizedZoomValue;
2300
- }>;
2301
- openMenu: "canvas" | "shape" | null;
2302
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
1647
+ zoom: import("../types").Zoom;
1648
+ openMenu: "canvas" | null;
1649
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
2303
1650
  openSidebar: {
2304
- name: string;
2305
- tab?: string | undefined;
1651
+ name: import("../types").SidebarName;
1652
+ tab?: import("../types").SidebarTabName;
2306
1653
  } | null;
2307
- openDialog: {
1654
+ openDialog: null | {
2308
1655
  name: "imageExport" | "help" | "jsonExport";
2309
1656
  } | {
2310
1657
  name: "ttd";
2311
- tab: "mermaid" | "text-to-diagram";
1658
+ tab: "text-to-diagram" | "mermaid";
2312
1659
  } | {
2313
1660
  name: "commandPalette";
1661
+ } | {
1662
+ name: "settings";
2314
1663
  } | {
2315
1664
  name: "elementLinkSelector";
2316
- sourceElementId: string;
2317
- } | null;
1665
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
1666
+ } | {
1667
+ name: "charts";
1668
+ data: import("../charts").Spreadsheet;
1669
+ rawText: string;
1670
+ };
2318
1671
  defaultSidebarDockedPreference: boolean;
2319
1672
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
2320
1673
  hoveredElementIds: Readonly<{
@@ -2326,9 +1679,9 @@ export declare const actionToggleHandTool: {
2326
1679
  selectedElementsAreBeingDragged: boolean;
2327
1680
  shouldCacheIgnoreZoom: boolean;
2328
1681
  toast: {
2329
- message: string;
2330
- closable?: boolean | undefined;
2331
- duration?: number | undefined;
1682
+ message: React.ReactNode;
1683
+ closable?: boolean;
1684
+ duration?: number;
2332
1685
  } | null;
2333
1686
  zenModeEnabled: boolean;
2334
1687
  theme: import("@excalidraw/element/types").Theme;
@@ -2336,45 +1689,18 @@ export declare const actionToggleHandTool: {
2336
1689
  gridStep: number;
2337
1690
  gridModeEnabled: boolean;
2338
1691
  viewModeEnabled: boolean;
2339
- editingGroupId: string | null;
1692
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
2340
1693
  width: number;
2341
1694
  height: number;
2342
1695
  offsetTop: number;
2343
1696
  offsetLeft: number;
2344
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
2345
- collaborators: Map<import("../types").SocketId, Readonly<{
2346
- pointer?: import("../types").CollaboratorPointer | undefined;
2347
- button?: "up" | "down" | undefined;
2348
- selectedElementIds?: Readonly<{
2349
- [id: string]: true;
2350
- }> | undefined;
2351
- username?: string | null | undefined;
2352
- userState?: import("@excalidraw/common").UserIdleState | undefined;
2353
- color?: {
2354
- background: string;
2355
- stroke: string;
2356
- } | undefined;
2357
- avatarUrl?: string | undefined;
2358
- id?: string | undefined;
2359
- socketId?: import("../types").SocketId | undefined;
2360
- isCurrentUser?: boolean | undefined;
2361
- isInCall?: boolean | undefined;
2362
- isSpeaking?: boolean | undefined;
2363
- isMuted?: boolean | undefined;
2364
- }>>;
1697
+ fileHandle: FileSystemFileHandle | null;
1698
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
2365
1699
  stats: {
2366
1700
  open: boolean;
2367
1701
  panels: number;
2368
1702
  };
2369
- currentChartType: import("@excalidraw/element/types").ChartType;
2370
- pasteDialog: {
2371
- shown: false;
2372
- data: null;
2373
- } | {
2374
- shown: true;
2375
- data: import("../charts").Spreadsheet;
2376
- };
2377
- showHyperlinkPopup: false | "editor" | "info";
1703
+ showHyperlinkPopup: false | "info" | "editor";
2378
1704
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
2379
1705
  snapLines: readonly import("../snapping").SnapLine[];
2380
1706
  originSnapOffset: {
@@ -2385,15 +1711,16 @@ export declare const actionToggleHandTool: {
2385
1711
  userToFollow: import("../types").UserToFollow | null;
2386
1712
  followedBy: Set<import("../types").SocketId>;
2387
1713
  isCropping: boolean;
2388
- croppingElementId: string | null;
1714
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2389
1715
  searchMatches: Readonly<{
2390
- focusedId: string | null;
1716
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
2391
1717
  matches: readonly import("../types").SearchMatch[];
2392
1718
  }> | null;
2393
1719
  activeLockedId: string | null;
2394
1720
  lockedMultiSelections: {
2395
1721
  [groupId: string]: true;
2396
1722
  };
1723
+ bindMode: import("@excalidraw/element/types").BindMode;
2397
1724
  };
2398
1725
  captureUpdate: "IMMEDIATELY";
2399
1726
  };