@excalidraw/math 0.18.0-3bdaafe → 0.18.0-4a5c9e9

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