@excalidraw/math 0.18.0-51ad895 → 0.18.0-51ca8ab

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/dev/index.js +44 -10
  2. package/dist/dev/index.js.map +2 -2
  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 +26 -18
  9. package/dist/types/common/src/editorInterface.d.ts +1 -1
  10. package/dist/types/common/src/font-metadata.d.ts +1 -3
  11. package/dist/types/common/src/index.d.ts +4 -1
  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 +40 -76
  15. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  16. package/dist/types/element/src/Scene.d.ts +10 -6
  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 +19 -12
  21. package/dist/types/element/src/bounds.d.ts +24 -17
  22. package/dist/types/element/src/collision.d.ts +4 -3
  23. package/dist/types/element/src/comparisons.d.ts +8 -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 +4 -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 +12 -7
  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 -0
  33. package/dist/types/element/src/linearElementEditor.d.ts +8 -4
  34. package/dist/types/element/src/mutateElement.d.ts +5 -1
  35. package/dist/types/element/src/newElement.d.ts +7 -6
  36. package/dist/types/element/src/renderElement.d.ts +0 -6
  37. package/dist/types/element/src/resizeElements.d.ts +10 -10
  38. package/dist/types/element/src/resizeTest.d.ts +1 -1
  39. package/dist/types/element/src/selection.d.ts +10 -10
  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 +3 -23
  46. package/dist/types/element/src/typeChecks.d.ts +3 -4
  47. package/dist/types/element/src/types.d.ts +11 -2
  48. package/dist/types/element/src/utils.d.ts +9 -5
  49. package/dist/types/element/src/zindex.d.ts +1 -1
  50. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +152 -207
  51. package/dist/types/excalidraw/actions/actionAlign.d.ts +0 -1
  52. package/dist/types/excalidraw/actions/actionBoundText.d.ts +79 -116
  53. package/dist/types/excalidraw/actions/actionCanvas.d.ts +413 -977
  54. package/dist/types/excalidraw/actions/actionClipboard.d.ts +111 -148
  55. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +38 -57
  56. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +121 -178
  57. package/dist/types/excalidraw/actions/actionDeselect.d.ts +161 -0
  58. package/dist/types/excalidraw/actions/actionDistribute.d.ts +0 -1
  59. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  60. package/dist/types/excalidraw/actions/actionElementLink.d.ts +50 -73
  61. package/dist/types/excalidraw/actions/actionElementLock.d.ts +79 -116
  62. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +54 -73
  63. package/dist/types/excalidraw/actions/actionExport.d.ts +116 -469
  64. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -2
  65. package/dist/types/excalidraw/actions/actionFlip.d.ts +0 -1
  66. package/dist/types/excalidraw/actions/actionFrame.d.ts +236 -344
  67. package/dist/types/excalidraw/actions/actionGroup.d.ts +83 -128
  68. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +122 -174
  69. package/dist/types/excalidraw/actions/actionLink.d.ts +56 -75
  70. package/dist/types/excalidraw/actions/actionMenu.d.ts +44 -67
  71. package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -17
  72. package/dist/types/excalidraw/actions/actionProperties.d.ts +104 -132
  73. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +41 -64
  74. package/dist/types/excalidraw/actions/actionStyles.d.ts +37 -55
  75. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  76. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +174 -0
  77. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +54 -73
  78. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +174 -0
  79. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +54 -73
  80. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +44 -67
  81. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +53 -72
  82. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +54 -73
  83. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +54 -73
  84. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  85. package/dist/types/excalidraw/actions/index.d.ts +4 -1
  86. package/dist/types/excalidraw/actions/manager.d.ts +1 -1
  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 +1 -1
  90. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  91. package/dist/types/excalidraw/appState.d.ts +23 -19
  92. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  93. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  94. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  95. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  96. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  97. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  98. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  99. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  100. package/dist/types/excalidraw/clipboard.d.ts +13 -38
  101. package/dist/types/excalidraw/components/Actions.d.ts +1 -1
  102. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  103. package/dist/types/excalidraw/components/App.d.ts +135 -79
  104. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  105. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  106. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  107. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  108. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  109. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  110. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  111. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
  112. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +3 -3
  113. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  114. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  115. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  116. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  117. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  118. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  119. package/dist/types/excalidraw/components/FilledButton.d.ts +1 -0
  120. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  121. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  122. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  123. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  124. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  125. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  126. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  127. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  128. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  129. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  130. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -1
  131. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  132. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  133. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  134. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  135. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  136. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  137. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  138. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  139. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  140. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  141. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  142. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  143. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  144. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  145. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  146. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  147. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  148. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  149. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  150. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  151. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  152. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  153. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  154. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  155. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  156. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  157. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  158. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  159. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  160. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  161. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  162. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  163. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  164. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  165. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  166. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  167. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  168. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  169. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  170. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  171. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  172. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  173. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  174. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  175. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  176. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  177. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  178. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  179. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  180. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  181. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  182. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  183. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  184. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  185. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  186. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  187. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  188. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +48 -38
  189. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -6
  190. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  191. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  192. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  193. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  194. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  195. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  196. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  197. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  198. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  199. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  200. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  201. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  202. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  203. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  204. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  205. package/dist/types/excalidraw/components/icons.d.ts +41 -21
  206. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  207. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -32
  208. package/dist/types/excalidraw/components/shapes.d.ts +81 -1
  209. package/dist/types/excalidraw/data/blob.d.ts +330 -7
  210. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  211. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  212. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  213. package/dist/types/excalidraw/data/index.d.ts +4 -5
  214. package/dist/types/excalidraw/data/json.d.ts +172 -4
  215. package/dist/types/excalidraw/data/library.d.ts +25 -10
  216. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  217. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  218. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  219. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  220. package/dist/types/excalidraw/errors.d.ts +14 -0
  221. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  222. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +1 -2
  223. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  224. package/dist/types/excalidraw/i18n.d.ts +2 -2
  225. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  226. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  227. package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
  228. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -4
  229. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -6
  230. package/dist/types/excalidraw/scene/Renderer.d.ts +428 -18
  231. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  232. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  233. package/dist/types/excalidraw/scene/types.d.ts +7 -2
  234. package/dist/types/excalidraw/snapping.d.ts +5 -5
  235. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  236. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  237. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  238. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  239. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  240. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  241. package/dist/types/excalidraw/types.d.ts +264 -25
  242. package/dist/types/excalidraw/viewport.d.ts +316 -0
  243. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +7 -3
  244. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  245. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  246. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  247. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  248. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  249. package/dist/types/math/src/constants.d.ts +0 -1
  250. package/dist/types/math/src/curve.d.ts +4 -1
  251. package/dist/types/math/src/point.d.ts +8 -2
  252. package/dist/types/math/src/polygon.d.ts +2 -2
  253. package/dist/types/math/src/range.d.ts +1 -3
  254. package/dist/types/math/src/segment.d.ts +3 -3
  255. package/dist/types/math/src/types.d.ts +25 -1
  256. package/dist/types/utils/src/export.d.ts +5 -5
  257. package/dist/types/utils/src/index.d.ts +1 -2
  258. package/dist/types/utils/src/shape.d.ts +6 -6
  259. package/package.json +2 -2
  260. package/dist/types/common/src/visualdebug.d.ts +0 -41
  261. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  262. package/dist/types/excalidraw/charts.d.ts +0 -27
  263. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  264. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  265. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  266. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  267. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  268. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -22
  269. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  270. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  271. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  272. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  273. package/dist/types/excalidraw/index.d.ts +0 -46
  274. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  275. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  276. package/dist/types/utils/src/bbox.d.ts +0 -9
  277. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,32 +1,40 @@
1
- /// <reference types="react" />
1
+ import { type StrokeWidthKey } from "@excalidraw/common";
2
2
  import { LinearElementEditor } from "@excalidraw/element";
3
- import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement } from "@excalidraw/element/types";
3
+ import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, StrokeVariability, TextAlign } from "@excalidraw/element/types";
4
4
  import type { AppClassProperties, AppState, Primitive } from "../types";
5
5
  export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
6
- export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
6
+ export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties,
7
+ /**
8
+ * input value (usually the element attribute value,
9
+ * but depends on what the action's PanelComponent input expects)
10
+ */
11
+ getValue: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
7
12
  export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
8
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
13
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
9
14
  };
10
15
  export declare const actionChangeBackgroundColor: import("./types").Action<Pick<AppState, "viewBackgroundColor" | "currentItemBackgroundColor">> & {
11
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
16
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
12
17
  };
13
18
  export declare const actionChangeFillStyle: import("./types").Action<import("@excalidraw/element/types").FillStyle> & {
14
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
19
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
15
20
  };
16
- export declare const actionChangeStrokeWidth: import("./types").Action<number> & {
17
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
21
+ export declare const actionChangeStrokeWidth: import("./types").Action<StrokeWidthKey> & {
22
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
18
23
  };
19
24
  export declare const actionChangeSloppiness: import("./types").Action<number> & {
20
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
25
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
26
+ };
27
+ export declare const actionChangeFreedrawMode: import("./types").Action<StrokeVariability> & {
28
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
21
29
  };
22
30
  export declare const actionChangeStrokeStyle: import("./types").Action<import("@excalidraw/element/types").StrokeStyle> & {
23
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
31
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
24
32
  };
25
33
  export declare const actionChangeOpacity: import("./types").Action<number> & {
26
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
34
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
27
35
  };
28
36
  export declare const actionChangeFontSize: import("./types").Action<number> & {
29
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
37
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
30
38
  };
31
39
  export declare const actionDecreaseFontSize: {
32
40
  name: "decreaseFontSize";
@@ -44,18 +52,23 @@ export declare const actionDecreaseFontSize: {
44
52
  } | null;
45
53
  showWelcomeScreen: boolean;
46
54
  isLoading: boolean;
47
- errorMessage: import("react").ReactNode;
55
+ errorMessage: React.ReactNode;
48
56
  activeEmbeddable: {
49
57
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
50
- state: "active" | "hover";
58
+ state: "hover" | "active";
51
59
  } | null;
52
60
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
53
61
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
54
62
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
55
63
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
56
64
  isBindingEnabled: boolean;
57
- startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
58
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
65
+ boxSelectionMode: import("../types").BoxSelectionMode;
66
+ bindingPreference: "enabled" | "disabled";
67
+ isMidpointSnappingEnabled: boolean;
68
+ suggestedBinding: {
69
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
70
+ midPoint?: import("@excalidraw/math").GlobalPoint;
71
+ } | null;
59
72
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
60
73
  frameRendering: {
61
74
  enabled: boolean;
@@ -65,7 +78,7 @@ export declare const actionDecreaseFontSize: {
65
78
  };
66
79
  editingFrame: string | null;
67
80
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
68
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
81
+ editingTextElement: ExcalidrawTextElement | null;
69
82
  activeTool: {
70
83
  lastActiveTool: import("../types").ActiveTool | null;
71
84
  locked: boolean;
@@ -83,48 +96,52 @@ export declare const actionDecreaseFontSize: {
83
96
  exportScale: number;
84
97
  currentItemStrokeColor: string;
85
98
  currentItemBackgroundColor: string;
86
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
87
- currentItemStrokeWidth: number;
88
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
99
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
100
+ currentItemStrokeWidthKey: StrokeWidthKey;
101
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
89
102
  currentItemRoughness: number;
103
+ currentItemStrokeVariability: StrokeVariability;
90
104
  currentItemOpacity: number;
91
- currentItemFontFamily: number;
92
- currentItemTextAlign: string;
105
+ currentItemFontFamily: FontFamilyValues;
106
+ currentItemTextAlign: TextAlign;
93
107
  currentItemStartArrowhead: Arrowhead | null;
94
108
  currentItemEndArrowhead: Arrowhead | null;
95
- currentHoveredFontFamily: number | null;
109
+ currentHoveredFontFamily: FontFamilyValues | null;
96
110
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
97
- currentItemArrowType: "round" | "sharp" | "elbow";
111
+ currentItemArrowType: "sharp" | "round" | "elbow";
98
112
  viewBackgroundColor: string;
99
113
  scrollX: number;
100
114
  scrollY: number;
115
+ scrollConstraints: import("../types").ScrollConstraints | null;
101
116
  cursorButton: "up" | "down";
102
117
  scrolledOutside: boolean;
103
118
  name: string | null;
104
119
  isResizing: boolean;
105
120
  isRotating: boolean;
106
- zoom: Readonly<{
107
- value: import("../types").NormalizedZoomValue;
108
- }>;
121
+ zoom: import("../types").Zoom;
109
122
  openMenu: "canvas" | null;
110
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
123
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
111
124
  openSidebar: {
112
- name: string;
113
- tab?: string | undefined;
125
+ name: import("../types").SidebarName;
126
+ tab?: import("../types").SidebarTabName;
114
127
  } | null;
115
- openDialog: {
128
+ openDialog: null | {
116
129
  name: "imageExport" | "help" | "jsonExport";
117
130
  } | {
118
131
  name: "ttd";
119
- tab: "mermaid" | "text-to-diagram";
132
+ tab: "text-to-diagram" | "mermaid";
120
133
  } | {
121
134
  name: "commandPalette";
122
135
  } | {
123
136
  name: "settings";
124
137
  } | {
125
138
  name: "elementLinkSelector";
126
- sourceElementId: string;
127
- } | null;
139
+ sourceElementId: ExcalidrawElement["id"];
140
+ } | {
141
+ name: "charts";
142
+ data: import("../charts").Spreadsheet;
143
+ rawText: string;
144
+ };
128
145
  defaultSidebarDockedPreference: boolean;
129
146
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
130
147
  selectedElementIds: Readonly<{
@@ -139,9 +156,9 @@ export declare const actionDecreaseFontSize: {
139
156
  selectedElementsAreBeingDragged: boolean;
140
157
  shouldCacheIgnoreZoom: boolean;
141
158
  toast: {
142
- message: string;
143
- closable?: boolean | undefined;
144
- duration?: number | undefined;
159
+ message: React.ReactNode;
160
+ closable?: boolean;
161
+ duration?: number;
145
162
  } | null;
146
163
  zenModeEnabled: boolean;
147
164
  theme: import("@excalidraw/element/types").Theme;
@@ -152,44 +169,17 @@ export declare const actionDecreaseFontSize: {
152
169
  selectedGroupIds: {
153
170
  [groupId: string]: boolean;
154
171
  };
155
- editingGroupId: string | null;
172
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
156
173
  width: number;
157
174
  height: number;
158
175
  offsetTop: number;
159
176
  offsetLeft: number;
160
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
161
- collaborators: Map<import("../types").SocketId, Readonly<{
162
- pointer?: import("../types").CollaboratorPointer | undefined;
163
- button?: "up" | "down" | undefined;
164
- selectedElementIds?: Readonly<{
165
- [id: string]: true;
166
- }> | undefined;
167
- username?: string | null | undefined;
168
- userState?: import("@excalidraw/common").UserIdleState | undefined;
169
- color?: {
170
- background: string;
171
- stroke: string;
172
- } | undefined;
173
- avatarUrl?: string | undefined;
174
- id?: string | undefined;
175
- socketId?: import("../types").SocketId | undefined;
176
- isCurrentUser?: boolean | undefined;
177
- isInCall?: boolean | undefined;
178
- isSpeaking?: boolean | undefined;
179
- isMuted?: boolean | undefined;
180
- }>>;
177
+ fileHandle: FileSystemFileHandle | null;
178
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
181
179
  stats: {
182
180
  open: boolean;
183
181
  panels: number;
184
182
  };
185
- currentChartType: import("@excalidraw/element/types").ChartType;
186
- pasteDialog: {
187
- shown: false;
188
- data: null;
189
- } | {
190
- shown: true;
191
- data: import("../charts").Spreadsheet;
192
- };
193
183
  showHyperlinkPopup: false | "info" | "editor";
194
184
  selectedLinearElement: LinearElementEditor | null;
195
185
  snapLines: readonly import("../snapping").SnapLine[];
@@ -201,9 +191,9 @@ export declare const actionDecreaseFontSize: {
201
191
  userToFollow: import("../types").UserToFollow | null;
202
192
  followedBy: Set<import("../types").SocketId>;
203
193
  isCropping: boolean;
204
- croppingElementId: string | null;
194
+ croppingElementId: ExcalidrawElement["id"] | null;
205
195
  searchMatches: Readonly<{
206
- focusedId: string | null;
196
+ focusedId: ExcalidrawElement["id"] | null;
207
197
  matches: readonly import("../types").SearchMatch[];
208
198
  }> | null;
209
199
  activeLockedId: string | null;
@@ -234,18 +224,23 @@ export declare const actionIncreaseFontSize: {
234
224
  } | null;
235
225
  showWelcomeScreen: boolean;
236
226
  isLoading: boolean;
237
- errorMessage: import("react").ReactNode;
227
+ errorMessage: React.ReactNode;
238
228
  activeEmbeddable: {
239
229
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
240
- state: "active" | "hover";
230
+ state: "hover" | "active";
241
231
  } | null;
242
232
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
243
233
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
244
234
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
245
235
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
246
236
  isBindingEnabled: boolean;
247
- startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
248
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
237
+ boxSelectionMode: import("../types").BoxSelectionMode;
238
+ bindingPreference: "enabled" | "disabled";
239
+ isMidpointSnappingEnabled: boolean;
240
+ suggestedBinding: {
241
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
242
+ midPoint?: import("@excalidraw/math").GlobalPoint;
243
+ } | null;
249
244
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
250
245
  frameRendering: {
251
246
  enabled: boolean;
@@ -255,7 +250,7 @@ export declare const actionIncreaseFontSize: {
255
250
  };
256
251
  editingFrame: string | null;
257
252
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
258
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
253
+ editingTextElement: ExcalidrawTextElement | null;
259
254
  activeTool: {
260
255
  lastActiveTool: import("../types").ActiveTool | null;
261
256
  locked: boolean;
@@ -273,48 +268,52 @@ export declare const actionIncreaseFontSize: {
273
268
  exportScale: number;
274
269
  currentItemStrokeColor: string;
275
270
  currentItemBackgroundColor: string;
276
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
277
- currentItemStrokeWidth: number;
278
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
271
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
272
+ currentItemStrokeWidthKey: StrokeWidthKey;
273
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
279
274
  currentItemRoughness: number;
275
+ currentItemStrokeVariability: StrokeVariability;
280
276
  currentItemOpacity: number;
281
- currentItemFontFamily: number;
282
- currentItemTextAlign: string;
277
+ currentItemFontFamily: FontFamilyValues;
278
+ currentItemTextAlign: TextAlign;
283
279
  currentItemStartArrowhead: Arrowhead | null;
284
280
  currentItemEndArrowhead: Arrowhead | null;
285
- currentHoveredFontFamily: number | null;
281
+ currentHoveredFontFamily: FontFamilyValues | null;
286
282
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
287
- currentItemArrowType: "round" | "sharp" | "elbow";
283
+ currentItemArrowType: "sharp" | "round" | "elbow";
288
284
  viewBackgroundColor: string;
289
285
  scrollX: number;
290
286
  scrollY: number;
287
+ scrollConstraints: import("../types").ScrollConstraints | null;
291
288
  cursorButton: "up" | "down";
292
289
  scrolledOutside: boolean;
293
290
  name: string | null;
294
291
  isResizing: boolean;
295
292
  isRotating: boolean;
296
- zoom: Readonly<{
297
- value: import("../types").NormalizedZoomValue;
298
- }>;
293
+ zoom: import("../types").Zoom;
299
294
  openMenu: "canvas" | null;
300
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
295
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
301
296
  openSidebar: {
302
- name: string;
303
- tab?: string | undefined;
297
+ name: import("../types").SidebarName;
298
+ tab?: import("../types").SidebarTabName;
304
299
  } | null;
305
- openDialog: {
300
+ openDialog: null | {
306
301
  name: "imageExport" | "help" | "jsonExport";
307
302
  } | {
308
303
  name: "ttd";
309
- tab: "mermaid" | "text-to-diagram";
304
+ tab: "text-to-diagram" | "mermaid";
310
305
  } | {
311
306
  name: "commandPalette";
312
307
  } | {
313
308
  name: "settings";
314
309
  } | {
315
310
  name: "elementLinkSelector";
316
- sourceElementId: string;
317
- } | null;
311
+ sourceElementId: ExcalidrawElement["id"];
312
+ } | {
313
+ name: "charts";
314
+ data: import("../charts").Spreadsheet;
315
+ rawText: string;
316
+ };
318
317
  defaultSidebarDockedPreference: boolean;
319
318
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
320
319
  selectedElementIds: Readonly<{
@@ -329,9 +328,9 @@ export declare const actionIncreaseFontSize: {
329
328
  selectedElementsAreBeingDragged: boolean;
330
329
  shouldCacheIgnoreZoom: boolean;
331
330
  toast: {
332
- message: string;
333
- closable?: boolean | undefined;
334
- duration?: number | undefined;
331
+ message: React.ReactNode;
332
+ closable?: boolean;
333
+ duration?: number;
335
334
  } | null;
336
335
  zenModeEnabled: boolean;
337
336
  theme: import("@excalidraw/element/types").Theme;
@@ -342,44 +341,17 @@ export declare const actionIncreaseFontSize: {
342
341
  selectedGroupIds: {
343
342
  [groupId: string]: boolean;
344
343
  };
345
- editingGroupId: string | null;
344
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
346
345
  width: number;
347
346
  height: number;
348
347
  offsetTop: number;
349
348
  offsetLeft: number;
350
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
351
- collaborators: Map<import("../types").SocketId, Readonly<{
352
- pointer?: import("../types").CollaboratorPointer | undefined;
353
- button?: "up" | "down" | undefined;
354
- selectedElementIds?: Readonly<{
355
- [id: string]: true;
356
- }> | undefined;
357
- username?: string | null | undefined;
358
- userState?: import("@excalidraw/common").UserIdleState | undefined;
359
- color?: {
360
- background: string;
361
- stroke: string;
362
- } | undefined;
363
- avatarUrl?: string | undefined;
364
- id?: string | undefined;
365
- socketId?: import("../types").SocketId | undefined;
366
- isCurrentUser?: boolean | undefined;
367
- isInCall?: boolean | undefined;
368
- isSpeaking?: boolean | undefined;
369
- isMuted?: boolean | undefined;
370
- }>>;
349
+ fileHandle: FileSystemFileHandle | null;
350
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
371
351
  stats: {
372
352
  open: boolean;
373
353
  panels: number;
374
354
  };
375
- currentChartType: import("@excalidraw/element/types").ChartType;
376
- pasteDialog: {
377
- shown: false;
378
- data: null;
379
- } | {
380
- shown: true;
381
- data: import("../charts").Spreadsheet;
382
- };
383
355
  showHyperlinkPopup: false | "info" | "editor";
384
356
  selectedLinearElement: LinearElementEditor | null;
385
357
  snapLines: readonly import("../snapping").SnapLine[];
@@ -391,9 +363,9 @@ export declare const actionIncreaseFontSize: {
391
363
  userToFollow: import("../types").UserToFollow | null;
392
364
  followedBy: Set<import("../types").SocketId>;
393
365
  isCropping: boolean;
394
- croppingElementId: string | null;
366
+ croppingElementId: ExcalidrawElement["id"] | null;
395
367
  searchMatches: Readonly<{
396
- focusedId: string | null;
368
+ focusedId: ExcalidrawElement["id"] | null;
397
369
  matches: readonly import("../types").SearchMatch[];
398
370
  }> | null;
399
371
  activeLockedId: string | null;
@@ -412,22 +384,22 @@ export declare const actionChangeFontFamily: import("./types").Action<{
412
384
  currentItemFontFamily: any;
413
385
  currentHoveredFontFamily: any;
414
386
  }> & {
415
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
387
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
416
388
  };
417
389
  export declare const actionChangeTextAlign: import("./types").Action<string> & {
418
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
390
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
419
391
  };
420
392
  export declare const actionChangeVerticalAlign: import("./types").Action<string> & {
421
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
393
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
422
394
  };
423
395
  export declare const actionChangeRoundness: import("./types").Action<"round" | "sharp"> & {
424
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
396
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
425
397
  };
426
398
  export declare const actionChangeArrowhead: import("./types").Action<{
427
399
  position: "start" | "end";
428
400
  type: Arrowhead;
429
401
  }> & {
430
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
402
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
431
403
  };
432
404
  export declare const actionChangeArrowProperties: {
433
405
  name: "changeArrowProperties";
@@ -439,5 +411,5 @@ export declare const actionChangeArrowProperties: {
439
411
  keyTest?: undefined;
440
412
  };
441
413
  export declare const actionChangeArrowType: import("./types").Action<"round" | "sharp" | "elbow"> & {
442
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
414
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
443
415
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LinearElementEditor } from "@excalidraw/element";
3
2
  import type { ExcalidrawElement } from "@excalidraw/element/types";
4
3
  export declare const actionSelectAll: {
@@ -12,13 +11,9 @@ export declare const actionSelectAll: {
12
11
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
13
12
  appState: {
14
13
  selectedLinearElement: LinearElementEditor | null;
15
- editingGroupId: string | null;
16
- selectedElementIds: Readonly<{
17
- [id: string]: true;
18
- }>;
19
- selectedGroupIds: {
20
- [groupId: string]: boolean;
21
- };
14
+ editingGroupId: import("../types").AppState["editingGroupId"];
15
+ selectedElementIds: import("../types").AppState["selectedElementIds"];
16
+ selectedGroupIds: import("../types").AppState["selectedGroupIds"];
22
17
  contextMenu: {
23
18
  items: import("../components/ContextMenu").ContextMenuItems;
24
19
  top: number;
@@ -26,18 +21,23 @@ export declare const actionSelectAll: {
26
21
  } | null;
27
22
  showWelcomeScreen: boolean;
28
23
  isLoading: boolean;
29
- errorMessage: import("react").ReactNode;
24
+ errorMessage: React.ReactNode;
30
25
  activeEmbeddable: {
31
26
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
32
- state: "active" | "hover";
27
+ state: "hover" | "active";
33
28
  } | null;
34
29
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
35
30
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
36
31
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
37
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
33
  isBindingEnabled: boolean;
39
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
40
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
+ boxSelectionMode: import("../types").BoxSelectionMode;
35
+ bindingPreference: "enabled" | "disabled";
36
+ isMidpointSnappingEnabled: boolean;
37
+ suggestedBinding: {
38
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
39
+ midPoint?: import("@excalidraw/math").GlobalPoint;
40
+ } | null;
41
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
42
42
  frameRendering: {
43
43
  enabled: boolean;
@@ -47,7 +47,7 @@ export declare const actionSelectAll: {
47
47
  };
48
48
  editingFrame: string | null;
49
49
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
50
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
50
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
51
51
  activeTool: {
52
52
  lastActiveTool: import("../types").ActiveTool | null;
53
53
  locked: boolean;
@@ -65,49 +65,53 @@ export declare const actionSelectAll: {
65
65
  exportScale: number;
66
66
  currentItemStrokeColor: string;
67
67
  currentItemBackgroundColor: string;
68
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
69
- currentItemStrokeWidth: number;
70
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
68
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
69
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
70
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
71
71
  currentItemRoughness: number;
72
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
72
73
  currentItemOpacity: number;
73
- currentItemFontFamily: number;
74
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
74
75
  currentItemFontSize: number;
75
- currentItemTextAlign: string;
76
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
76
77
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
77
78
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
78
- currentHoveredFontFamily: number | null;
79
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
79
80
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
80
- currentItemArrowType: "round" | "sharp" | "elbow";
81
+ currentItemArrowType: "sharp" | "round" | "elbow";
81
82
  viewBackgroundColor: string;
82
83
  scrollX: number;
83
84
  scrollY: number;
85
+ scrollConstraints: import("../types").ScrollConstraints | null;
84
86
  cursorButton: "up" | "down";
85
87
  scrolledOutside: boolean;
86
88
  name: string | null;
87
89
  isResizing: boolean;
88
90
  isRotating: boolean;
89
- zoom: Readonly<{
90
- value: import("../types").NormalizedZoomValue;
91
- }>;
91
+ zoom: import("../types").Zoom;
92
92
  openMenu: "canvas" | null;
93
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
93
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
94
94
  openSidebar: {
95
- name: string;
96
- tab?: string | undefined;
95
+ name: import("../types").SidebarName;
96
+ tab?: import("../types").SidebarTabName;
97
97
  } | null;
98
- openDialog: {
98
+ openDialog: null | {
99
99
  name: "imageExport" | "help" | "jsonExport";
100
100
  } | {
101
101
  name: "ttd";
102
- tab: "mermaid" | "text-to-diagram";
102
+ tab: "text-to-diagram" | "mermaid";
103
103
  } | {
104
104
  name: "commandPalette";
105
105
  } | {
106
106
  name: "settings";
107
107
  } | {
108
108
  name: "elementLinkSelector";
109
- sourceElementId: string;
110
- } | null;
109
+ sourceElementId: ExcalidrawElement["id"];
110
+ } | {
111
+ name: "charts";
112
+ data: import("../charts").Spreadsheet;
113
+ rawText: string;
114
+ };
111
115
  defaultSidebarDockedPreference: boolean;
112
116
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
113
117
  hoveredElementIds: Readonly<{
@@ -119,9 +123,9 @@ export declare const actionSelectAll: {
119
123
  selectedElementsAreBeingDragged: boolean;
120
124
  shouldCacheIgnoreZoom: boolean;
121
125
  toast: {
122
- message: string;
123
- closable?: boolean | undefined;
124
- duration?: number | undefined;
126
+ message: React.ReactNode;
127
+ closable?: boolean;
128
+ duration?: number;
125
129
  } | null;
126
130
  zenModeEnabled: boolean;
127
131
  theme: import("@excalidraw/element/types").Theme;
@@ -133,39 +137,12 @@ export declare const actionSelectAll: {
133
137
  height: number;
134
138
  offsetTop: number;
135
139
  offsetLeft: number;
136
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
137
- collaborators: Map<import("../types").SocketId, Readonly<{
138
- pointer?: import("../types").CollaboratorPointer | undefined;
139
- button?: "up" | "down" | undefined;
140
- selectedElementIds?: Readonly<{
141
- [id: string]: true;
142
- }> | undefined;
143
- username?: string | null | undefined;
144
- userState?: import("@excalidraw/common").UserIdleState | undefined;
145
- color?: {
146
- background: string;
147
- stroke: string;
148
- } | undefined;
149
- avatarUrl?: string | undefined;
150
- id?: string | undefined;
151
- socketId?: import("../types").SocketId | undefined;
152
- isCurrentUser?: boolean | undefined;
153
- isInCall?: boolean | undefined;
154
- isSpeaking?: boolean | undefined;
155
- isMuted?: boolean | undefined;
156
- }>>;
140
+ fileHandle: FileSystemFileHandle | null;
141
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
157
142
  stats: {
158
143
  open: boolean;
159
144
  panels: number;
160
145
  };
161
- currentChartType: import("@excalidraw/element/types").ChartType;
162
- pasteDialog: {
163
- shown: false;
164
- data: null;
165
- } | {
166
- shown: true;
167
- data: import("../charts").Spreadsheet;
168
- };
169
146
  showHyperlinkPopup: false | "info" | "editor";
170
147
  snapLines: readonly import("../snapping").SnapLine[];
171
148
  originSnapOffset: {
@@ -176,9 +153,9 @@ export declare const actionSelectAll: {
176
153
  userToFollow: import("../types").UserToFollow | null;
177
154
  followedBy: Set<import("../types").SocketId>;
178
155
  isCropping: boolean;
179
- croppingElementId: string | null;
156
+ croppingElementId: ExcalidrawElement["id"] | null;
180
157
  searchMatches: Readonly<{
181
- focusedId: string | null;
158
+ focusedId: ExcalidrawElement["id"] | null;
182
159
  matches: readonly import("../types").SearchMatch[];
183
160
  }> | null;
184
161
  activeLockedId: string | null;