@excalidraw/math 0.18.0-91c7748 → 0.18.0-9fbeaed

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