@excalidraw/math 0.18.0-b9d27d3 → 0.18.0-c0a0ca3

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 (384) hide show
  1. package/dist/dev/index.js +363 -163
  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 +94 -31
  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 -77
  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 +33 -12
  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 -219
  67. package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
  68. package/dist/types/excalidraw/actions/actionBoundText.d.ts +117 -272
  69. package/dist/types/excalidraw/actions/actionCanvas.d.ts +556 -1582
  70. package/dist/types/excalidraw/actions/actionClipboard.d.ts +179 -899
  71. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +74 -64
  72. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -562
  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 -77
  77. package/dist/types/excalidraw/actions/actionElementLock.d.ts +151 -130
  78. package/dist/types/excalidraw/actions/actionExport.d.ts +232 -1416
  79. package/dist/types/excalidraw/actions/actionFinalize.d.ts +11 -394
  80. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  81. package/dist/types/excalidraw/actions/actionFrame.d.ts +253 -875
  82. package/dist/types/excalidraw/actions/actionGroup.d.ts +162 -149
  83. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +221 -197
  84. package/dist/types/excalidraw/actions/actionLink.d.ts +87 -77
  85. package/dist/types/excalidraw/actions/actionMenu.d.ts +76 -438
  86. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  87. package/dist/types/excalidraw/actions/actionProperties.d.ts +240 -2533
  88. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +81 -75
  89. package/dist/types/excalidraw/actions/actionStyles.d.ts +75 -64
  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 -80
  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 -78
  96. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +77 -74
  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 -77
  100. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +88 -78
  101. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  102. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +88 -78
  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 -28
  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 -36
  121. package/dist/types/excalidraw/components/Actions.d.ts +41 -11
  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 -154
  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 -4
  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 +5 -1
  168. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  169. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -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 +2 -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 +57 -22
  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/data/types.d.ts +4 -1
  306. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  307. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  308. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  309. package/dist/types/excalidraw/errors.d.ts +14 -0
  310. package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
  311. package/dist/types/excalidraw/history.d.ts +10 -4
  312. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  313. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
  314. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  315. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  316. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  317. package/dist/types/excalidraw/i18n.d.ts +2 -2
  318. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  319. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  320. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  321. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  322. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  323. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  324. package/dist/types/excalidraw/renderer/animation.d.ts +23 -0
  325. package/dist/types/excalidraw/renderer/helpers.d.ts +31 -8
  326. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
  327. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  328. package/dist/types/excalidraw/scene/Renderer.d.ts +492 -20
  329. package/dist/types/excalidraw/scene/export.d.ts +344 -21
  330. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  331. package/dist/types/excalidraw/scene/types.d.ts +51 -9
  332. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  333. package/dist/types/excalidraw/snapping.d.ts +12 -12
  334. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  335. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  336. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  337. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  338. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  339. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  340. package/dist/types/excalidraw/types.d.ts +728 -61
  341. package/dist/types/excalidraw/viewport.d.ts +303 -0
  342. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +19 -5
  343. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  344. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  345. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  346. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  347. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  348. package/dist/types/math/src/constants.d.ts +0 -1
  349. package/dist/types/math/src/curve.d.ts +23 -13
  350. package/dist/types/math/src/index.d.ts +1 -0
  351. package/dist/types/math/src/pca.d.ts +79 -0
  352. package/dist/types/math/src/point.d.ts +8 -2
  353. package/dist/types/math/src/polygon.d.ts +26 -2
  354. package/dist/types/math/src/range.d.ts +1 -3
  355. package/dist/types/math/src/segment.d.ts +10 -3
  356. package/dist/types/math/src/types.d.ts +25 -1
  357. package/dist/types/utils/src/index.d.ts +4 -3
  358. package/dist/types/utils/src/shape.d.ts +8 -8
  359. package/package.json +2 -2
  360. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -185
  361. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  362. package/dist/types/excalidraw/charts.d.ts +0 -27
  363. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  364. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  365. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  366. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  367. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  368. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  369. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  370. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  371. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  372. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  373. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  374. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  375. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  376. package/dist/types/excalidraw/cursor.d.ts +0 -5
  377. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  378. package/dist/types/excalidraw/index.d.ts +0 -47
  379. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  380. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  381. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  382. package/dist/types/utils/src/bbox.d.ts +0 -9
  383. package/dist/types/utils/src/export.d.ts +0 -35
  384. 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" | 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,18 +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
  };
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;
179
190
  };
180
191
  captureUpdate: "IMMEDIATELY";
181
192
  } | {
@@ -193,7 +204,7 @@ export declare const actionRemoveAllElementsFromFrame: {
193
204
  trackEvent: {
194
205
  category: "history";
195
206
  };
196
- 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) => {
197
208
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
198
209
  appState: {
199
210
  selectedElementIds: {
@@ -206,33 +217,55 @@ export declare const actionRemoveAllElementsFromFrame: {
206
217
  } | null;
207
218
  showWelcomeScreen: boolean;
208
219
  isLoading: boolean;
209
- errorMessage: import("react").ReactNode;
220
+ errorMessage: React.ReactNode;
210
221
  activeEmbeddable: {
211
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
212
- state: "active" | "hover";
222
+ element: NonDeletedExcalidrawElement;
223
+ state: "hover" | "active";
213
224
  } | null;
214
225
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
215
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
226
+ resizingElement: NonDeletedExcalidrawElement | null;
216
227
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
217
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
228
+ selectionElement: NonDeletedExcalidrawElement | null;
218
229
  isBindingEnabled: boolean;
219
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
220
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
221
- 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;
222
251
  frameRendering: {
223
252
  enabled: boolean;
224
253
  name: boolean;
225
254
  outline: boolean;
226
255
  clip: boolean;
227
256
  };
228
- editingFrame: string | null;
229
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
230
- 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;
231
260
  activeTool: {
232
261
  lastActiveTool: import("../types").ActiveTool | null;
233
262
  locked: boolean;
234
263
  fromSelection: boolean;
235
264
  } & import("../types").ActiveTool;
265
+ preferredSelectionTool: {
266
+ type: "selection" | "lasso";
267
+ initialized: boolean;
268
+ };
236
269
  penMode: boolean;
237
270
  penDetected: boolean;
238
271
  exportBackground: boolean;
@@ -240,48 +273,56 @@ export declare const actionRemoveAllElementsFromFrame: {
240
273
  exportWithDarkMode: boolean;
241
274
  exportScale: number;
242
275
  currentItemStrokeColor: string;
276
+ currentItemStickynoteStrokeColor: string;
277
+ currentItemStickynoteBackgroundColor: string;
243
278
  currentItemBackgroundColor: string;
244
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
245
- currentItemStrokeWidth: number;
246
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
279
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
280
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
281
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
247
282
  currentItemRoughness: number;
283
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
248
284
  currentItemOpacity: number;
249
- currentItemFontFamily: number;
285
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
250
286
  currentItemFontSize: number;
251
- currentItemTextAlign: string;
287
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
252
288
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
253
289
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
254
- currentHoveredFontFamily: number | null;
290
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
255
291
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
256
- currentItemArrowType: "round" | "sharp" | "elbow";
292
+ currentItemArrowType: "sharp" | "round" | "elbow";
257
293
  viewBackgroundColor: string;
258
294
  scrollX: number;
259
295
  scrollY: number;
296
+ scrollConstraints: import("../types").ScrollConstraints | null;
260
297
  cursorButton: "up" | "down";
261
298
  scrolledOutside: boolean;
262
299
  name: string | null;
263
300
  isResizing: boolean;
264
301
  isRotating: boolean;
265
- zoom: Readonly<{
266
- value: import("../types").NormalizedZoomValue;
267
- }>;
268
- openMenu: "canvas" | "shape" | null;
269
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
302
+ zoom: import("../types").Zoom;
303
+ openMenu: "canvas" | null;
304
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
270
305
  openSidebar: {
271
- name: string;
272
- tab?: string | undefined;
306
+ name: import("../types").SidebarName;
307
+ tab?: import("../types").SidebarTabName;
273
308
  } | null;
274
- openDialog: {
309
+ openDialog: null | {
275
310
  name: "imageExport" | "help" | "jsonExport";
276
311
  } | {
277
312
  name: "ttd";
278
- tab: "mermaid" | "text-to-diagram";
313
+ tab: "text-to-diagram" | "mermaid";
279
314
  } | {
280
315
  name: "commandPalette";
316
+ } | {
317
+ name: "settings";
281
318
  } | {
282
319
  name: "elementLinkSelector";
283
- sourceElementId: string;
284
- } | null;
320
+ sourceElementId: ExcalidrawElement["id"];
321
+ } | {
322
+ name: "charts";
323
+ data: import("../charts").Spreadsheet;
324
+ rawText: string;
325
+ };
285
326
  defaultSidebarDockedPreference: boolean;
286
327
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
287
328
  hoveredElementIds: Readonly<{
@@ -293,11 +334,12 @@ export declare const actionRemoveAllElementsFromFrame: {
293
334
  selectedElementsAreBeingDragged: boolean;
294
335
  shouldCacheIgnoreZoom: boolean;
295
336
  toast: {
296
- message: string;
297
- closable?: boolean | undefined;
298
- duration?: number | undefined;
337
+ message: React.ReactNode;
338
+ closable?: boolean;
339
+ duration?: number;
299
340
  } | null;
300
341
  zenModeEnabled: boolean;
342
+ minimapEnabled: boolean;
301
343
  theme: import("@excalidraw/element/types").Theme;
302
344
  gridSize: number;
303
345
  gridStep: number;
@@ -306,45 +348,18 @@ export declare const actionRemoveAllElementsFromFrame: {
306
348
  selectedGroupIds: {
307
349
  [groupId: string]: boolean;
308
350
  };
309
- editingGroupId: string | null;
351
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
310
352
  width: number;
311
353
  height: number;
312
354
  offsetTop: number;
313
355
  offsetLeft: number;
314
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
315
- collaborators: Map<import("../types").SocketId, Readonly<{
316
- pointer?: import("../types").CollaboratorPointer | undefined;
317
- button?: "up" | "down" | undefined;
318
- selectedElementIds?: Readonly<{
319
- [id: string]: true;
320
- }> | undefined;
321
- username?: string | null | undefined;
322
- userState?: import("@excalidraw/common").UserIdleState | undefined;
323
- color?: {
324
- background: string;
325
- stroke: string;
326
- } | undefined;
327
- avatarUrl?: string | undefined;
328
- id?: string | undefined;
329
- socketId?: import("../types").SocketId | undefined;
330
- isCurrentUser?: boolean | undefined;
331
- isInCall?: boolean | undefined;
332
- isSpeaking?: boolean | undefined;
333
- isMuted?: boolean | undefined;
334
- }>>;
356
+ fileHandle: FileSystemFileHandle | null;
357
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
335
358
  stats: {
336
359
  open: boolean;
337
360
  panels: number;
338
361
  };
339
- currentChartType: import("@excalidraw/element/types").ChartType;
340
- pasteDialog: {
341
- shown: false;
342
- data: null;
343
- } | {
344
- shown: true;
345
- data: import("../charts").Spreadsheet;
346
- };
347
- showHyperlinkPopup: false | "editor" | "info";
362
+ showHyperlinkPopup: false | "info" | "editor";
348
363
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
349
364
  snapLines: readonly import("../snapping").SnapLine[];
350
365
  originSnapOffset: {
@@ -352,18 +367,25 @@ export declare const actionRemoveAllElementsFromFrame: {
352
367
  y: number;
353
368
  } | null;
354
369
  objectsSnapModeEnabled: boolean;
355
- userToFollow: import("../types").UserToFollow | null;
356
- followedBy: Set<import("../types").SocketId>;
357
370
  isCropping: boolean;
358
- croppingElementId: string | null;
371
+ croppingElementId: ExcalidrawElement["id"] | null;
359
372
  searchMatches: Readonly<{
360
- focusedId: string | null;
373
+ focusedId: ExcalidrawElement["id"] | null;
361
374
  matches: readonly import("../types").SearchMatch[];
362
375
  }> | null;
363
376
  activeLockedId: string | null;
364
377
  lockedMultiSelections: {
365
378
  [groupId: string]: true;
366
379
  };
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;
367
389
  };
368
390
  captureUpdate: "IMMEDIATELY";
369
391
  } | {
@@ -398,213 +420,49 @@ export declare const actionupdateFrameRendering: {
398
420
  } | null;
399
421
  showWelcomeScreen: boolean;
400
422
  isLoading: boolean;
401
- errorMessage: import("react").ReactNode;
423
+ errorMessage: React.ReactNode;
402
424
  activeEmbeddable: {
403
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
404
- state: "active" | "hover";
425
+ element: NonDeletedExcalidrawElement;
426
+ state: "hover" | "active";
405
427
  } | null;
406
428
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
407
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
429
+ resizingElement: NonDeletedExcalidrawElement | null;
408
430
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
409
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
431
+ selectionElement: NonDeletedExcalidrawElement | null;
410
432
  isBindingEnabled: boolean;
411
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
412
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
413
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
414
- editingFrame: string | null;
415
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
416
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
417
- activeTool: {
418
- lastActiveTool: import("../types").ActiveTool | null;
419
- locked: boolean;
420
- fromSelection: boolean;
421
- } & import("../types").ActiveTool;
422
- penMode: boolean;
423
- penDetected: boolean;
424
- exportBackground: boolean;
425
- exportEmbedScene: boolean;
426
- exportWithDarkMode: boolean;
427
- exportScale: number;
428
- currentItemStrokeColor: string;
429
- currentItemBackgroundColor: string;
430
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
431
- currentItemStrokeWidth: number;
432
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
433
- currentItemRoughness: number;
434
- currentItemOpacity: number;
435
- currentItemFontFamily: number;
436
- currentItemFontSize: number;
437
- currentItemTextAlign: string;
438
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
439
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
440
- currentHoveredFontFamily: number | null;
441
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
442
- currentItemArrowType: "round" | "sharp" | "elbow";
443
- viewBackgroundColor: string;
444
- scrollX: number;
445
- scrollY: number;
446
- cursorButton: "up" | "down";
447
- scrolledOutside: boolean;
448
- name: string | null;
449
- isResizing: boolean;
450
- isRotating: boolean;
451
- zoom: Readonly<{
452
- value: import("../types").NormalizedZoomValue;
453
- }>;
454
- openMenu: "canvas" | "shape" | null;
455
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
456
- openSidebar: {
457
- name: string;
458
- tab?: string | undefined;
459
- } | null;
460
- openDialog: {
461
- name: "imageExport" | "help" | "jsonExport";
462
- } | {
463
- name: "ttd";
464
- tab: "mermaid" | "text-to-diagram";
465
- } | {
466
- name: "commandPalette";
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"];
467
445
  } | {
468
- name: "elementLinkSelector";
469
- sourceElementId: string;
470
- } | null;
471
- defaultSidebarDockedPreference: boolean;
472
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
473
- selectedElementIds: Readonly<{
474
- [id: string]: true;
475
- }>;
476
- hoveredElementIds: Readonly<{
477
- [id: string]: true;
478
- }>;
479
- previousSelectedElementIds: {
480
- [id: string]: true;
481
- };
482
- selectedElementsAreBeingDragged: boolean;
483
- shouldCacheIgnoreZoom: boolean;
484
- toast: {
485
- message: string;
486
- closable?: boolean | undefined;
487
- duration?: number | undefined;
488
- } | null;
489
- zenModeEnabled: boolean;
490
- theme: import("@excalidraw/element/types").Theme;
491
- gridSize: number;
492
- gridStep: number;
493
- gridModeEnabled: boolean;
494
- viewModeEnabled: boolean;
495
- selectedGroupIds: {
496
- [groupId: string]: boolean;
497
- };
498
- editingGroupId: string | null;
499
- width: number;
500
- height: number;
501
- offsetTop: number;
502
- offsetLeft: number;
503
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
504
- collaborators: Map<import("../types").SocketId, Readonly<{
505
- pointer?: import("../types").CollaboratorPointer | undefined;
506
- button?: "up" | "down" | undefined;
507
- selectedElementIds?: Readonly<{
508
- [id: string]: true;
509
- }> | undefined;
510
- username?: string | null | undefined;
511
- userState?: import("@excalidraw/common").UserIdleState | undefined;
512
- color?: {
513
- background: string;
514
- stroke: string;
515
- } | undefined;
516
- avatarUrl?: string | undefined;
517
- id?: string | undefined;
518
- socketId?: import("../types").SocketId | undefined;
519
- isCurrentUser?: boolean | undefined;
520
- isInCall?: boolean | undefined;
521
- isSpeaking?: boolean | undefined;
522
- isMuted?: boolean | undefined;
523
- }>>;
524
- stats: {
525
- open: boolean;
526
- panels: number;
527
- };
528
- currentChartType: import("@excalidraw/element/types").ChartType;
529
- pasteDialog: {
530
- shown: false;
531
- data: null;
446
+ type: "container";
447
+ elementId: ExcalidrawElement["id"];
532
448
  } | {
533
- shown: true;
534
- data: import("../charts").Spreadsheet;
535
- };
536
- showHyperlinkPopup: false | "editor" | "info";
537
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
538
- snapLines: readonly import("../snapping").SnapLine[];
539
- originSnapOffset: {
540
- x: number;
541
- y: number;
542
- } | null;
543
- objectsSnapModeEnabled: boolean;
544
- userToFollow: import("../types").UserToFollow | null;
545
- followedBy: Set<import("../types").SocketId>;
546
- isCropping: boolean;
547
- croppingElementId: string | null;
548
- searchMatches: Readonly<{
549
- focusedId: string | null;
550
- matches: readonly import("../types").SearchMatch[];
551
- }> | null;
552
- activeLockedId: string | null;
553
- lockedMultiSelections: {
554
- [groupId: string]: true;
555
- };
556
- };
557
- captureUpdate: "EVENTUALLY";
558
- };
559
- checked: (appState: AppState) => boolean;
560
- } & {
561
- keyTest?: undefined;
562
- };
563
- export declare const actionSetFrameAsActiveTool: {
564
- name: "setFrameAsActiveTool";
565
- label: string;
566
- trackEvent: {
567
- category: "toolbar";
568
- };
569
- icon: import("react/jsx-runtime").JSX.Element;
570
- viewMode: false;
571
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
572
- elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
573
- 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;
574
457
  activeTool: {
575
458
  lastActiveTool: import("../types").ActiveTool | null;
576
459
  locked: boolean;
577
460
  fromSelection: boolean;
578
461
  } & import("../types").ActiveTool;
579
- contextMenu: {
580
- items: import("../components/ContextMenu").ContextMenuItems;
581
- top: number;
582
- left: number;
583
- } | null;
584
- showWelcomeScreen: boolean;
585
- isLoading: boolean;
586
- errorMessage: import("react").ReactNode;
587
- activeEmbeddable: {
588
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
589
- state: "active" | "hover";
590
- } | null;
591
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
592
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
593
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
594
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
595
- isBindingEnabled: boolean;
596
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
597
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
598
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
599
- frameRendering: {
600
- enabled: boolean;
601
- name: boolean;
602
- outline: boolean;
603
- clip: boolean;
462
+ preferredSelectionTool: {
463
+ type: "selection" | "lasso";
464
+ initialized: boolean;
604
465
  };
605
- editingFrame: string | null;
606
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
607
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
608
466
  penMode: boolean;
609
467
  penDetected: boolean;
610
468
  exportBackground: boolean;
@@ -612,48 +470,56 @@ export declare const actionSetFrameAsActiveTool: {
612
470
  exportWithDarkMode: boolean;
613
471
  exportScale: number;
614
472
  currentItemStrokeColor: string;
473
+ currentItemStickynoteStrokeColor: string;
474
+ currentItemStickynoteBackgroundColor: string;
615
475
  currentItemBackgroundColor: string;
616
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
617
- currentItemStrokeWidth: number;
618
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
476
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
477
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
478
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
619
479
  currentItemRoughness: number;
480
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
620
481
  currentItemOpacity: number;
621
- currentItemFontFamily: number;
482
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
622
483
  currentItemFontSize: number;
623
- currentItemTextAlign: string;
484
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
624
485
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
625
486
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
626
- currentHoveredFontFamily: number | null;
487
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
627
488
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
628
- currentItemArrowType: "round" | "sharp" | "elbow";
489
+ currentItemArrowType: "sharp" | "round" | "elbow";
629
490
  viewBackgroundColor: string;
630
491
  scrollX: number;
631
492
  scrollY: number;
493
+ scrollConstraints: import("../types").ScrollConstraints | null;
632
494
  cursorButton: "up" | "down";
633
495
  scrolledOutside: boolean;
634
496
  name: string | null;
635
497
  isResizing: boolean;
636
498
  isRotating: boolean;
637
- zoom: Readonly<{
638
- value: import("../types").NormalizedZoomValue;
639
- }>;
640
- openMenu: "canvas" | "shape" | null;
641
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
499
+ zoom: import("../types").Zoom;
500
+ openMenu: "canvas" | null;
501
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
642
502
  openSidebar: {
643
- name: string;
644
- tab?: string | undefined;
503
+ name: import("../types").SidebarName;
504
+ tab?: import("../types").SidebarTabName;
645
505
  } | null;
646
- openDialog: {
506
+ openDialog: null | {
647
507
  name: "imageExport" | "help" | "jsonExport";
648
508
  } | {
649
509
  name: "ttd";
650
- tab: "mermaid" | "text-to-diagram";
510
+ tab: "text-to-diagram" | "mermaid";
651
511
  } | {
652
512
  name: "commandPalette";
513
+ } | {
514
+ name: "settings";
653
515
  } | {
654
516
  name: "elementLinkSelector";
655
- sourceElementId: string;
656
- } | null;
517
+ sourceElementId: ExcalidrawElement["id"];
518
+ } | {
519
+ name: "charts";
520
+ data: import("../charts").Spreadsheet;
521
+ rawText: string;
522
+ };
657
523
  defaultSidebarDockedPreference: boolean;
658
524
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
659
525
  selectedElementIds: Readonly<{
@@ -668,11 +534,12 @@ export declare const actionSetFrameAsActiveTool: {
668
534
  selectedElementsAreBeingDragged: boolean;
669
535
  shouldCacheIgnoreZoom: boolean;
670
536
  toast: {
671
- message: string;
672
- closable?: boolean | undefined;
673
- duration?: number | undefined;
537
+ message: React.ReactNode;
538
+ closable?: boolean;
539
+ duration?: number;
674
540
  } | null;
675
541
  zenModeEnabled: boolean;
542
+ minimapEnabled: boolean;
676
543
  theme: import("@excalidraw/element/types").Theme;
677
544
  gridSize: number;
678
545
  gridStep: number;
@@ -681,45 +548,18 @@ export declare const actionSetFrameAsActiveTool: {
681
548
  selectedGroupIds: {
682
549
  [groupId: string]: boolean;
683
550
  };
684
- editingGroupId: string | null;
551
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
685
552
  width: number;
686
553
  height: number;
687
554
  offsetTop: number;
688
555
  offsetLeft: number;
689
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
690
- collaborators: Map<import("../types").SocketId, Readonly<{
691
- pointer?: import("../types").CollaboratorPointer | undefined;
692
- button?: "up" | "down" | undefined;
693
- selectedElementIds?: Readonly<{
694
- [id: string]: true;
695
- }> | undefined;
696
- username?: string | null | undefined;
697
- userState?: import("@excalidraw/common").UserIdleState | undefined;
698
- color?: {
699
- background: string;
700
- stroke: string;
701
- } | undefined;
702
- avatarUrl?: string | undefined;
703
- id?: string | undefined;
704
- socketId?: import("../types").SocketId | undefined;
705
- isCurrentUser?: boolean | undefined;
706
- isInCall?: boolean | undefined;
707
- isSpeaking?: boolean | undefined;
708
- isMuted?: boolean | undefined;
709
- }>>;
556
+ fileHandle: FileSystemFileHandle | null;
557
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
710
558
  stats: {
711
559
  open: boolean;
712
560
  panels: number;
713
561
  };
714
- currentChartType: import("@excalidraw/element/types").ChartType;
715
- pasteDialog: {
716
- shown: false;
717
- data: null;
718
- } | {
719
- shown: true;
720
- data: import("../charts").Spreadsheet;
721
- };
722
- showHyperlinkPopup: false | "editor" | "info";
562
+ showHyperlinkPopup: false | "info" | "editor";
723
563
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
724
564
  snapLines: readonly import("../snapping").SnapLine[];
725
565
  originSnapOffset: {
@@ -727,515 +567,53 @@ export declare const actionSetFrameAsActiveTool: {
727
567
  y: number;
728
568
  } | null;
729
569
  objectsSnapModeEnabled: boolean;
730
- userToFollow: import("../types").UserToFollow | null;
731
- followedBy: Set<import("../types").SocketId>;
732
570
  isCropping: boolean;
733
- croppingElementId: string | null;
571
+ croppingElementId: ExcalidrawElement["id"] | null;
734
572
  searchMatches: Readonly<{
735
- focusedId: string | null;
573
+ focusedId: ExcalidrawElement["id"] | null;
736
574
  matches: readonly import("../types").SearchMatch[];
737
575
  }> | null;
738
576
  activeLockedId: string | null;
739
577
  lockedMultiSelections: {
740
578
  [groupId: string]: true;
741
579
  };
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;
742
589
  };
743
590
  captureUpdate: "EVENTUALLY";
744
591
  };
745
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
592
+ checked: (appState: Readonly<UIAppState>) => boolean;
746
593
  } & {
747
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
594
+ keyTest?: undefined;
748
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;
749
609
  export declare const actionWrapSelectionInFrame: {
750
610
  name: "wrapSelectionInFrame";
751
- label: string;
611
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => "labels.removeFrame" | "labels.wrapSelectionInFrame";
752
612
  trackEvent: {
753
613
  category: "element";
754
614
  };
755
615
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
756
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
757
- elements: ((Readonly<{
758
- id: string;
759
- x: number;
760
- y: number;
761
- strokeColor: string;
762
- backgroundColor: string;
763
- fillStyle: import("@excalidraw/element/types").FillStyle;
764
- strokeWidth: number;
765
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
766
- roundness: {
767
- type: import("@excalidraw/element/types").RoundnessType;
768
- value?: number | undefined;
769
- } | null;
770
- roughness: number;
771
- opacity: number;
772
- width: number;
773
- height: number;
774
- angle: import("@excalidraw/math").Radians;
775
- seed: number;
776
- version: number;
777
- versionNonce: number;
778
- index: import("@excalidraw/element/types").FractionalIndex | null;
779
- isDeleted: boolean;
780
- groupIds: readonly string[];
781
- frameId: string | null;
782
- boundElements: readonly Readonly<{
783
- id: string;
784
- type: "arrow" | "text";
785
- }>[] | null;
786
- updated: number;
787
- link: string | null;
788
- locked: boolean;
789
- customData?: Record<string, any> | undefined;
790
- }> & Readonly<{
791
- type: "line" | "arrow";
792
- points: readonly import("@excalidraw/math").LocalPoint[];
793
- lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
794
- startBinding: import("@excalidraw/element/types").PointBinding | null;
795
- endBinding: import("@excalidraw/element/types").PointBinding | null;
796
- startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
797
- endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
798
- }> & {
799
- index: import("@excalidraw/element/types").FractionalIndex;
800
- }) | (Readonly<{
801
- id: string;
802
- x: number;
803
- y: number;
804
- strokeColor: string;
805
- backgroundColor: string;
806
- fillStyle: import("@excalidraw/element/types").FillStyle;
807
- strokeWidth: number;
808
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
809
- roundness: {
810
- type: import("@excalidraw/element/types").RoundnessType;
811
- value?: number | undefined;
812
- } | null;
813
- roughness: number;
814
- opacity: number;
815
- width: number;
816
- height: number;
817
- angle: import("@excalidraw/math").Radians;
818
- seed: number;
819
- version: number;
820
- versionNonce: number;
821
- index: import("@excalidraw/element/types").FractionalIndex | null;
822
- isDeleted: boolean;
823
- groupIds: readonly string[];
824
- frameId: string | null;
825
- boundElements: readonly Readonly<{
826
- id: string;
827
- type: "arrow" | "text";
828
- }>[] | null;
829
- updated: number;
830
- link: string | null;
831
- locked: boolean;
832
- customData?: Record<string, any> | undefined;
833
- }> & {
834
- type: "selection";
835
- } & {
836
- index: import("@excalidraw/element/types").FractionalIndex;
837
- }) | (Readonly<{
838
- id: string;
839
- x: number;
840
- y: number;
841
- strokeColor: string;
842
- backgroundColor: string;
843
- fillStyle: import("@excalidraw/element/types").FillStyle;
844
- strokeWidth: number;
845
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
846
- roundness: {
847
- type: import("@excalidraw/element/types").RoundnessType;
848
- value?: number | undefined;
849
- } | null;
850
- roughness: number;
851
- opacity: number;
852
- width: number;
853
- height: number;
854
- angle: import("@excalidraw/math").Radians;
855
- seed: number;
856
- version: number;
857
- versionNonce: number;
858
- index: import("@excalidraw/element/types").FractionalIndex | null;
859
- isDeleted: boolean;
860
- groupIds: readonly string[];
861
- frameId: string | null;
862
- boundElements: readonly Readonly<{
863
- id: string;
864
- type: "arrow" | "text";
865
- }>[] | null;
866
- updated: number;
867
- link: string | null;
868
- locked: boolean;
869
- customData?: Record<string, any> | undefined;
870
- }> & {
871
- type: "rectangle";
872
- } & {
873
- index: import("@excalidraw/element/types").FractionalIndex;
874
- }) | (Readonly<{
875
- id: string;
876
- x: number;
877
- y: number;
878
- strokeColor: string;
879
- backgroundColor: string;
880
- fillStyle: import("@excalidraw/element/types").FillStyle;
881
- strokeWidth: number;
882
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
883
- roundness: {
884
- type: import("@excalidraw/element/types").RoundnessType;
885
- value?: number | undefined;
886
- } | null;
887
- roughness: number;
888
- opacity: number;
889
- width: number;
890
- height: number;
891
- angle: import("@excalidraw/math").Radians;
892
- seed: number;
893
- version: number;
894
- versionNonce: number;
895
- index: import("@excalidraw/element/types").FractionalIndex | null;
896
- isDeleted: boolean;
897
- groupIds: readonly string[];
898
- frameId: string | null;
899
- boundElements: readonly Readonly<{
900
- id: string;
901
- type: "arrow" | "text";
902
- }>[] | null;
903
- updated: number;
904
- link: string | null;
905
- locked: boolean;
906
- customData?: Record<string, any> | undefined;
907
- }> & {
908
- type: "diamond";
909
- } & {
910
- index: import("@excalidraw/element/types").FractionalIndex;
911
- }) | (Readonly<{
912
- id: string;
913
- x: number;
914
- y: number;
915
- strokeColor: string;
916
- backgroundColor: string;
917
- fillStyle: import("@excalidraw/element/types").FillStyle;
918
- strokeWidth: number;
919
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
920
- roundness: {
921
- type: import("@excalidraw/element/types").RoundnessType;
922
- value?: number | undefined;
923
- } | null;
924
- roughness: number;
925
- opacity: number;
926
- width: number;
927
- height: number;
928
- angle: import("@excalidraw/math").Radians;
929
- seed: number;
930
- version: number;
931
- versionNonce: number;
932
- index: import("@excalidraw/element/types").FractionalIndex | null;
933
- isDeleted: boolean;
934
- groupIds: readonly string[];
935
- frameId: string | null;
936
- boundElements: readonly Readonly<{
937
- id: string;
938
- type: "arrow" | "text";
939
- }>[] | null;
940
- updated: number;
941
- link: string | null;
942
- locked: boolean;
943
- customData?: Record<string, any> | undefined;
944
- }> & {
945
- type: "ellipse";
946
- } & {
947
- index: import("@excalidraw/element/types").FractionalIndex;
948
- }) | (Readonly<{
949
- id: string;
950
- x: number;
951
- y: number;
952
- strokeColor: string;
953
- backgroundColor: string;
954
- fillStyle: import("@excalidraw/element/types").FillStyle;
955
- strokeWidth: number;
956
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
957
- roundness: {
958
- type: import("@excalidraw/element/types").RoundnessType;
959
- value?: number | undefined;
960
- } | null;
961
- roughness: number;
962
- opacity: number;
963
- width: number;
964
- height: number;
965
- angle: import("@excalidraw/math").Radians;
966
- seed: number;
967
- version: number;
968
- versionNonce: number;
969
- index: import("@excalidraw/element/types").FractionalIndex | null;
970
- isDeleted: boolean;
971
- groupIds: readonly string[];
972
- frameId: string | null;
973
- boundElements: readonly Readonly<{
974
- id: string;
975
- type: "arrow" | "text";
976
- }>[] | null;
977
- updated: number;
978
- link: string | null;
979
- locked: boolean;
980
- customData?: Record<string, any> | undefined;
981
- }> & Readonly<{
982
- type: "embeddable";
983
- }> & {
984
- index: import("@excalidraw/element/types").FractionalIndex;
985
- }) | (Readonly<{
986
- id: string;
987
- x: number;
988
- y: number;
989
- strokeColor: string;
990
- backgroundColor: string;
991
- fillStyle: import("@excalidraw/element/types").FillStyle;
992
- strokeWidth: number;
993
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
994
- roundness: {
995
- type: import("@excalidraw/element/types").RoundnessType;
996
- value?: number | undefined;
997
- } | null;
998
- roughness: number;
999
- opacity: number;
1000
- width: number;
1001
- height: number;
1002
- angle: import("@excalidraw/math").Radians;
1003
- seed: number;
1004
- version: number;
1005
- versionNonce: number;
1006
- index: import("@excalidraw/element/types").FractionalIndex | null;
1007
- isDeleted: boolean;
1008
- groupIds: readonly string[];
1009
- frameId: string | null;
1010
- boundElements: readonly Readonly<{
1011
- id: string;
1012
- type: "arrow" | "text";
1013
- }>[] | null;
1014
- updated: number;
1015
- link: string | null;
1016
- locked: boolean;
1017
- customData?: Record<string, any> | undefined;
1018
- }> & Readonly<{
1019
- type: "iframe";
1020
- customData?: {
1021
- generationData?: import("@excalidraw/element/types").MagicGenerationData | undefined;
1022
- } | undefined;
1023
- }> & {
1024
- index: import("@excalidraw/element/types").FractionalIndex;
1025
- }) | (Readonly<{
1026
- id: string;
1027
- x: number;
1028
- y: number;
1029
- strokeColor: string;
1030
- backgroundColor: string;
1031
- fillStyle: import("@excalidraw/element/types").FillStyle;
1032
- strokeWidth: number;
1033
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1034
- roundness: {
1035
- type: import("@excalidraw/element/types").RoundnessType;
1036
- value?: number | undefined;
1037
- } | null;
1038
- roughness: number;
1039
- opacity: number;
1040
- width: number;
1041
- height: number;
1042
- angle: import("@excalidraw/math").Radians;
1043
- seed: number;
1044
- version: number;
1045
- versionNonce: number;
1046
- index: import("@excalidraw/element/types").FractionalIndex | null;
1047
- isDeleted: boolean;
1048
- groupIds: readonly string[];
1049
- frameId: string | null;
1050
- boundElements: readonly Readonly<{
1051
- id: string;
1052
- type: "arrow" | "text";
1053
- }>[] | null;
1054
- updated: number;
1055
- link: string | null;
1056
- locked: boolean;
1057
- customData?: Record<string, any> | undefined;
1058
- }> & Readonly<{
1059
- type: "image";
1060
- fileId: import("@excalidraw/element/types").FileId | null;
1061
- status: "pending" | "error" | "saved";
1062
- scale: [number, number];
1063
- crop: import("@excalidraw/element/types").ImageCrop | null;
1064
- }> & {
1065
- index: import("@excalidraw/element/types").FractionalIndex;
1066
- }) | (Readonly<{
1067
- id: string;
1068
- x: number;
1069
- y: number;
1070
- strokeColor: string;
1071
- backgroundColor: string;
1072
- fillStyle: import("@excalidraw/element/types").FillStyle;
1073
- strokeWidth: number;
1074
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1075
- roundness: {
1076
- type: import("@excalidraw/element/types").RoundnessType;
1077
- value?: number | undefined;
1078
- } | null;
1079
- roughness: number;
1080
- opacity: number;
1081
- width: number;
1082
- height: number;
1083
- angle: import("@excalidraw/math").Radians;
1084
- seed: number;
1085
- version: number;
1086
- versionNonce: number;
1087
- index: import("@excalidraw/element/types").FractionalIndex | null;
1088
- isDeleted: boolean;
1089
- groupIds: readonly string[];
1090
- frameId: string | null;
1091
- boundElements: readonly Readonly<{
1092
- id: string;
1093
- type: "arrow" | "text";
1094
- }>[] | null;
1095
- updated: number;
1096
- link: string | null;
1097
- locked: boolean;
1098
- customData?: Record<string, any> | undefined;
1099
- }> & {
1100
- type: "frame";
1101
- name: string | null;
1102
- } & {
1103
- index: import("@excalidraw/element/types").FractionalIndex;
1104
- }) | (Readonly<{
1105
- id: string;
1106
- x: number;
1107
- y: number;
1108
- strokeColor: string;
1109
- backgroundColor: string;
1110
- fillStyle: import("@excalidraw/element/types").FillStyle;
1111
- strokeWidth: number;
1112
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1113
- roundness: {
1114
- type: import("@excalidraw/element/types").RoundnessType;
1115
- value?: number | undefined;
1116
- } | null;
1117
- roughness: number;
1118
- opacity: number;
1119
- width: number;
1120
- height: number;
1121
- angle: import("@excalidraw/math").Radians;
1122
- seed: number;
1123
- version: number;
1124
- versionNonce: number;
1125
- index: import("@excalidraw/element/types").FractionalIndex | null;
1126
- isDeleted: boolean;
1127
- groupIds: readonly string[];
1128
- frameId: string | null;
1129
- boundElements: readonly Readonly<{
1130
- id: string;
1131
- type: "arrow" | "text";
1132
- }>[] | null;
1133
- updated: number;
1134
- link: string | null;
1135
- locked: boolean;
1136
- customData?: Record<string, any> | undefined;
1137
- }> & {
1138
- type: "magicframe";
1139
- name: string | null;
1140
- } & {
1141
- index: import("@excalidraw/element/types").FractionalIndex;
1142
- }) | (Readonly<{
1143
- id: string;
1144
- x: number;
1145
- y: number;
1146
- strokeColor: string;
1147
- backgroundColor: string;
1148
- fillStyle: import("@excalidraw/element/types").FillStyle;
1149
- strokeWidth: number;
1150
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1151
- roundness: {
1152
- type: import("@excalidraw/element/types").RoundnessType;
1153
- value?: number | undefined;
1154
- } | null;
1155
- roughness: number;
1156
- opacity: number;
1157
- width: number;
1158
- height: number;
1159
- angle: import("@excalidraw/math").Radians;
1160
- seed: number;
1161
- version: number;
1162
- versionNonce: number;
1163
- index: import("@excalidraw/element/types").FractionalIndex | null;
1164
- isDeleted: boolean;
1165
- groupIds: readonly string[];
1166
- frameId: string | null;
1167
- boundElements: readonly Readonly<{
1168
- id: string;
1169
- type: "arrow" | "text";
1170
- }>[] | null;
1171
- updated: number;
1172
- link: string | null;
1173
- locked: boolean;
1174
- customData?: Record<string, any> | undefined;
1175
- }> & Readonly<{
1176
- type: "text";
1177
- fontSize: number;
1178
- fontFamily: number;
1179
- text: string;
1180
- textAlign: string;
1181
- verticalAlign: string;
1182
- containerId: string | null;
1183
- originalText: string;
1184
- autoResize: boolean;
1185
- lineHeight: number & {
1186
- _brand: "unitlessLineHeight";
1187
- };
1188
- }> & {
1189
- index: import("@excalidraw/element/types").FractionalIndex;
1190
- }) | (Readonly<{
1191
- id: string;
1192
- x: number;
1193
- y: number;
1194
- strokeColor: string;
1195
- backgroundColor: string;
1196
- fillStyle: import("@excalidraw/element/types").FillStyle;
1197
- strokeWidth: number;
1198
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1199
- roundness: {
1200
- type: import("@excalidraw/element/types").RoundnessType;
1201
- value?: number | undefined;
1202
- } | null;
1203
- roughness: number;
1204
- opacity: number;
1205
- width: number;
1206
- height: number;
1207
- angle: import("@excalidraw/math").Radians;
1208
- seed: number;
1209
- version: number;
1210
- versionNonce: number;
1211
- index: import("@excalidraw/element/types").FractionalIndex | null;
1212
- isDeleted: boolean;
1213
- groupIds: readonly string[];
1214
- frameId: string | null;
1215
- boundElements: readonly Readonly<{
1216
- id: string;
1217
- type: "arrow" | "text";
1218
- }>[] | null;
1219
- updated: number;
1220
- link: string | null;
1221
- locked: boolean;
1222
- customData?: Record<string, any> | undefined;
1223
- }> & Readonly<{
1224
- type: "freedraw";
1225
- points: readonly import("@excalidraw/math").LocalPoint[];
1226
- pressures: readonly number[];
1227
- simulatePressure: boolean;
1228
- lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
1229
- }> & {
1230
- index: import("@excalidraw/element/types").FractionalIndex;
1231
- }) | import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameElement>)[];
1232
- appState: {
1233
- selectedElementIds: {
1234
- [x: string]: true;
1235
- };
1236
- };
1237
- captureUpdate: "IMMEDIATELY";
1238
- };
616
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
1239
617
  } & {
1240
618
  keyTest?: undefined;
1241
619
  };