@excalidraw/math 0.18.0-3bdaafe → 0.18.0-43a92e6

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 (371) 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 +102 -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 +5 -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 +52 -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 +2 -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 +85 -51
  25. package/dist/types/element/src/bounds.d.ts +27 -18
  26. package/dist/types/element/src/bucketFill.d.ts +110 -0
  27. package/dist/types/element/src/collision.d.ts +17 -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 +23 -1
  32. package/dist/types/element/src/distribute.d.ts +3 -2
  33. package/dist/types/element/src/dragElements.d.ts +30 -3
  34. package/dist/types/element/src/duplicate.d.ts +67 -6
  35. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  36. package/dist/types/element/src/embeddable.d.ts +2 -2
  37. package/dist/types/element/src/flowchart.d.ts +11 -7
  38. package/dist/types/element/src/fractionalIndex.d.ts +4 -4
  39. package/dist/types/element/src/frame.d.ts +16 -11
  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 +1 -11
  43. package/dist/types/element/src/index.d.ts +10 -4
  44. package/dist/types/element/src/linearElementEditor.d.ts +48 -30
  45. package/dist/types/element/src/listMarker.d.ts +34 -0
  46. package/dist/types/element/src/mutateElement.d.ts +6 -2
  47. package/dist/types/element/src/newElement.d.ts +59 -9
  48. package/dist/types/element/src/renderElement.d.ts +23 -12
  49. package/dist/types/element/src/resizeElements.d.ts +18 -11
  50. package/dist/types/element/src/resizeTest.d.ts +6 -5
  51. package/dist/types/element/src/selection.d.ts +11 -17
  52. package/dist/types/element/src/shape.d.ts +36 -9
  53. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  54. package/dist/types/element/src/sortElements.d.ts +10 -0
  55. package/dist/types/element/src/stickyNote.d.ts +183 -0
  56. package/dist/types/element/src/textElement.d.ts +21 -10
  57. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  58. package/dist/types/element/src/textWrapping.d.ts +26 -0
  59. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +27 -8
  60. package/dist/types/element/src/transformHandles.d.ts +8 -27
  61. package/dist/types/element/src/typeChecks.d.ts +30 -31
  62. package/dist/types/element/src/types.d.ts +55 -20
  63. package/dist/types/element/src/utils.d.ts +22 -6
  64. package/dist/types/element/src/zindex.d.ts +7 -1
  65. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +248 -219
  66. package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
  67. package/dist/types/excalidraw/actions/actionBoundText.d.ts +116 -272
  68. package/dist/types/excalidraw/actions/actionCanvas.d.ts +549 -1582
  69. package/dist/types/excalidraw/actions/actionClipboard.d.ts +177 -899
  70. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +73 -64
  71. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -562
  72. package/dist/types/excalidraw/actions/actionDeselect.d.ts +182 -0
  73. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -6
  74. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  75. package/dist/types/excalidraw/actions/actionElementLink.d.ts +80 -77
  76. package/dist/types/excalidraw/actions/actionElementLock.d.ts +149 -130
  77. package/dist/types/excalidraw/actions/actionExport.d.ts +230 -1416
  78. package/dist/types/excalidraw/actions/actionFinalize.d.ts +11 -394
  79. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  80. package/dist/types/excalidraw/actions/actionFrame.d.ts +247 -875
  81. package/dist/types/excalidraw/actions/actionGroup.d.ts +160 -149
  82. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +220 -197
  83. package/dist/types/excalidraw/actions/actionLink.d.ts +86 -77
  84. package/dist/types/excalidraw/actions/actionMenu.d.ts +75 -438
  85. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  86. package/dist/types/excalidraw/actions/actionProperties.d.ts +238 -2533
  87. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +80 -75
  88. package/dist/types/excalidraw/actions/actionStyles.d.ts +74 -64
  89. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  90. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +195 -0
  91. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +88 -80
  92. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +195 -0
  93. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +87 -78
  94. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +76 -74
  95. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
  96. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +197 -0
  97. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +86 -77
  98. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +87 -78
  99. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  100. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +87 -78
  101. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  102. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  103. package/dist/types/excalidraw/actions/index.d.ts +7 -3
  104. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  105. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  106. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  107. package/dist/types/excalidraw/actions/types.d.ts +11 -7
  108. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  109. package/dist/types/excalidraw/appState.d.ts +59 -28
  110. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  111. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  112. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  113. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  114. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  115. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  116. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  117. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  118. package/dist/types/excalidraw/clipboard.d.ts +56 -19
  119. package/dist/types/excalidraw/components/Actions.d.ts +33 -11
  120. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  121. package/dist/types/excalidraw/components/App.arrowText.d.ts +70 -0
  122. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  123. package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
  124. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  125. package/dist/types/excalidraw/components/App.d.ts +406 -154
  126. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  127. package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
  128. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  129. package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
  130. package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
  131. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  132. package/dist/types/excalidraw/components/App.selectionTool.d.ts +93 -0
  133. package/dist/types/excalidraw/components/App.text.d.ts +146 -0
  134. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  135. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  136. package/dist/types/excalidraw/components/App.viewport.d.ts +113 -0
  137. package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
  138. package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
  139. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  140. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  141. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  142. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -4
  143. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  144. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +7 -1
  145. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -2
  146. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +5 -2
  147. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  148. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  149. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  150. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  151. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  152. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  153. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  154. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -4
  155. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  156. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  157. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  158. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  159. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  160. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  161. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  162. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  163. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  164. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +5 -1
  165. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  166. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  167. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  168. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  169. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  170. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  171. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  172. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  173. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  174. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  175. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  176. package/dist/types/excalidraw/components/LayerUI.d.ts +6 -2
  177. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  178. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  179. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  180. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +7 -3
  181. package/dist/types/excalidraw/components/LibraryUnit.d.ts +9 -5
  182. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  183. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  184. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  185. package/dist/types/excalidraw/components/MobileMenu.d.ts +5 -7
  186. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  187. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  188. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  189. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  190. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  191. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  192. package/dist/types/excalidraw/components/Popover.d.ts +2 -3
  193. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  194. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  195. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  196. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  197. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  198. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  199. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  200. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  201. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  202. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  203. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  204. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  205. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  206. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  207. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  208. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  209. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  210. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  211. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  212. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -3
  213. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  214. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  215. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  216. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  217. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  218. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  219. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  220. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  221. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  222. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  223. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  224. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  225. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  226. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  227. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  228. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  229. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  230. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  231. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  232. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  233. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  234. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  235. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  236. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  237. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  238. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  239. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  240. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  241. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  242. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  243. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  244. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  245. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  246. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  247. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  248. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  249. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  250. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  251. package/dist/types/excalidraw/components/ToolPopover.d.ts +22 -0
  252. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  253. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  254. package/dist/types/excalidraw/components/Tooltip.d.ts +15 -1
  255. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  256. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  257. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  258. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  259. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  260. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  261. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +10 -4
  262. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  263. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  264. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  265. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  266. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  267. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  268. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  269. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  270. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  271. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  272. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  273. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  274. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  275. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  276. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  277. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  278. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  279. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  280. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  281. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  282. package/dist/types/excalidraw/components/icons.d.ts +56 -22
  283. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +26 -3
  284. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  285. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  286. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  287. package/dist/types/excalidraw/data/blob.d.ts +373 -15
  288. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  289. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  290. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  291. package/dist/types/excalidraw/data/index.d.ts +8 -9
  292. package/dist/types/excalidraw/data/json.d.ts +192 -3
  293. package/dist/types/excalidraw/data/library.d.ts +25 -10
  294. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  295. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  296. package/dist/types/excalidraw/data/types.d.ts +4 -1
  297. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  298. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  299. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  300. package/dist/types/excalidraw/errors.d.ts +14 -0
  301. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  302. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  303. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
  304. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  305. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  306. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  307. package/dist/types/excalidraw/i18n.d.ts +2 -2
  308. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  309. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  310. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  311. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  312. package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
  313. package/dist/types/excalidraw/renderer/helpers.d.ts +31 -8
  314. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
  315. package/dist/types/excalidraw/scene/Renderer.d.ts +491 -19
  316. package/dist/types/excalidraw/scene/export.d.ts +4 -4
  317. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  318. package/dist/types/excalidraw/scene/types.d.ts +28 -8
  319. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  320. package/dist/types/excalidraw/snapping.d.ts +12 -12
  321. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  322. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  323. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  324. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  325. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  326. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  327. package/dist/types/excalidraw/types.d.ts +672 -61
  328. package/dist/types/excalidraw/viewport.d.ts +302 -0
  329. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +19 -5
  330. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  331. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  332. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  333. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  334. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  335. package/dist/types/math/src/constants.d.ts +0 -1
  336. package/dist/types/math/src/curve.d.ts +23 -13
  337. package/dist/types/math/src/index.d.ts +1 -0
  338. package/dist/types/math/src/pca.d.ts +79 -0
  339. package/dist/types/math/src/point.d.ts +8 -2
  340. package/dist/types/math/src/polygon.d.ts +26 -2
  341. package/dist/types/math/src/range.d.ts +1 -3
  342. package/dist/types/math/src/segment.d.ts +10 -3
  343. package/dist/types/math/src/types.d.ts +25 -1
  344. package/dist/types/utils/src/export.d.ts +9 -8
  345. package/dist/types/utils/src/index.d.ts +1 -2
  346. package/dist/types/utils/src/shape.d.ts +8 -8
  347. package/package.json +2 -2
  348. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -185
  349. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  350. package/dist/types/excalidraw/charts.d.ts +0 -27
  351. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  352. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  353. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  354. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  355. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  356. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  357. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  358. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  359. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  360. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  361. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  362. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  363. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  364. package/dist/types/excalidraw/cursor.d.ts +0 -5
  365. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  366. package/dist/types/excalidraw/index.d.ts +0 -47
  367. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  368. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  369. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  370. package/dist/types/utils/src/bbox.d.ts +0 -9
  371. 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,9 +135,9 @@ 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;
113
143
  theme: import("@excalidraw/element/types").Theme;
@@ -118,45 +148,18 @@ export declare const actionSelectAllElementsInFrame: {
118
148
  selectedGroupIds: {
119
149
  [groupId: string]: boolean;
120
150
  };
121
- editingGroupId: string | null;
151
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
122
152
  width: number;
123
153
  height: number;
124
154
  offsetTop: number;
125
155
  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
- }>>;
156
+ fileHandle: FileSystemFileHandle | null;
157
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
147
158
  stats: {
148
159
  open: boolean;
149
160
  panels: number;
150
161
  };
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";
162
+ showHyperlinkPopup: false | "info" | "editor";
160
163
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
161
164
  snapLines: readonly import("../snapping").SnapLine[];
162
165
  originSnapOffset: {
@@ -164,18 +167,25 @@ export declare const actionSelectAllElementsInFrame: {
164
167
  y: number;
165
168
  } | null;
166
169
  objectsSnapModeEnabled: boolean;
167
- userToFollow: import("../types").UserToFollow | null;
168
- followedBy: Set<import("../types").SocketId>;
169
170
  isCropping: boolean;
170
- croppingElementId: string | null;
171
+ croppingElementId: ExcalidrawElement["id"] | null;
171
172
  searchMatches: Readonly<{
172
- focusedId: string | null;
173
+ focusedId: ExcalidrawElement["id"] | null;
173
174
  matches: readonly import("../types").SearchMatch[];
174
175
  }> | null;
175
176
  activeLockedId: string | null;
176
177
  lockedMultiSelections: {
177
178
  [groupId: string]: true;
178
179
  };
180
+ bindMode: import("@excalidraw/element/types").BindMode;
181
+ colorTopPicks: {
182
+ elementStroke: readonly string[] | null;
183
+ elementBackground: readonly string[] | null;
184
+ bucketFill: readonly string[] | null;
185
+ stickyNoteStroke: readonly string[] | null;
186
+ stickyNoteBackground: readonly string[] | null;
187
+ };
188
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
179
189
  };
180
190
  captureUpdate: "IMMEDIATELY";
181
191
  } | {
@@ -193,7 +203,7 @@ export declare const actionRemoveAllElementsFromFrame: {
193
203
  trackEvent: {
194
204
  category: "history";
195
205
  };
196
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
206
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
197
207
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
198
208
  appState: {
199
209
  selectedElementIds: {
@@ -206,33 +216,55 @@ export declare const actionRemoveAllElementsFromFrame: {
206
216
  } | null;
207
217
  showWelcomeScreen: boolean;
208
218
  isLoading: boolean;
209
- errorMessage: import("react").ReactNode;
219
+ errorMessage: React.ReactNode;
210
220
  activeEmbeddable: {
211
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
212
- state: "active" | "hover";
221
+ element: NonDeletedExcalidrawElement;
222
+ state: "hover" | "active";
213
223
  } | null;
214
224
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
215
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
225
+ resizingElement: NonDeletedExcalidrawElement | null;
216
226
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
217
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
227
+ selectionElement: NonDeletedExcalidrawElement | null;
218
228
  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;
229
+ boxSelectionMode: import("../types").BoxSelectionMode;
230
+ bindingPreference: "enabled" | "disabled";
231
+ isMidpointSnappingEnabled: boolean;
232
+ showHints: boolean;
233
+ inputDevice: import("../types").InputDevice;
234
+ suggestedBinding: {
235
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
236
+ midPoint?: import("@excalidraw/math").GlobalPoint;
237
+ } | null;
238
+ textToolHover: {
239
+ type: "text";
240
+ elementId: ExcalidrawElement["id"];
241
+ } | {
242
+ type: "container";
243
+ elementId: ExcalidrawElement["id"];
244
+ } | {
245
+ type: "arrow";
246
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
247
+ anchor: "start" | "end" | "label";
248
+ } | null;
249
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
222
250
  frameRendering: {
223
251
  enabled: boolean;
224
252
  name: boolean;
225
253
  outline: boolean;
226
254
  clip: boolean;
227
255
  };
228
- editingFrame: string | null;
229
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
230
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
256
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
257
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
258
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
231
259
  activeTool: {
232
260
  lastActiveTool: import("../types").ActiveTool | null;
233
261
  locked: boolean;
234
262
  fromSelection: boolean;
235
263
  } & import("../types").ActiveTool;
264
+ preferredSelectionTool: {
265
+ type: "selection" | "lasso";
266
+ initialized: boolean;
267
+ };
236
268
  penMode: boolean;
237
269
  penDetected: boolean;
238
270
  exportBackground: boolean;
@@ -240,48 +272,56 @@ export declare const actionRemoveAllElementsFromFrame: {
240
272
  exportWithDarkMode: boolean;
241
273
  exportScale: number;
242
274
  currentItemStrokeColor: string;
275
+ currentItemStickynoteStrokeColor: string;
276
+ currentItemStickynoteBackgroundColor: string;
243
277
  currentItemBackgroundColor: string;
244
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
245
- currentItemStrokeWidth: number;
246
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
278
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
279
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
280
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
247
281
  currentItemRoughness: number;
282
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
248
283
  currentItemOpacity: number;
249
- currentItemFontFamily: number;
284
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
250
285
  currentItemFontSize: number;
251
- currentItemTextAlign: string;
286
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
252
287
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
253
288
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
254
- currentHoveredFontFamily: number | null;
289
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
255
290
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
256
- currentItemArrowType: "round" | "sharp" | "elbow";
291
+ currentItemArrowType: "sharp" | "round" | "elbow";
257
292
  viewBackgroundColor: string;
258
293
  scrollX: number;
259
294
  scrollY: number;
295
+ scrollConstraints: import("../types").ScrollConstraints | null;
260
296
  cursorButton: "up" | "down";
261
297
  scrolledOutside: boolean;
262
298
  name: string | null;
263
299
  isResizing: boolean;
264
300
  isRotating: boolean;
265
- zoom: Readonly<{
266
- value: import("../types").NormalizedZoomValue;
267
- }>;
268
- openMenu: "canvas" | "shape" | null;
269
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
301
+ zoom: import("../types").Zoom;
302
+ openMenu: "canvas" | null;
303
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
270
304
  openSidebar: {
271
- name: string;
272
- tab?: string | undefined;
305
+ name: import("../types").SidebarName;
306
+ tab?: import("../types").SidebarTabName;
273
307
  } | null;
274
- openDialog: {
308
+ openDialog: null | {
275
309
  name: "imageExport" | "help" | "jsonExport";
276
310
  } | {
277
311
  name: "ttd";
278
- tab: "mermaid" | "text-to-diagram";
312
+ tab: "text-to-diagram" | "mermaid";
279
313
  } | {
280
314
  name: "commandPalette";
315
+ } | {
316
+ name: "settings";
281
317
  } | {
282
318
  name: "elementLinkSelector";
283
- sourceElementId: string;
284
- } | null;
319
+ sourceElementId: ExcalidrawElement["id"];
320
+ } | {
321
+ name: "charts";
322
+ data: import("../charts").Spreadsheet;
323
+ rawText: string;
324
+ };
285
325
  defaultSidebarDockedPreference: boolean;
286
326
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
287
327
  hoveredElementIds: Readonly<{
@@ -293,9 +333,9 @@ export declare const actionRemoveAllElementsFromFrame: {
293
333
  selectedElementsAreBeingDragged: boolean;
294
334
  shouldCacheIgnoreZoom: boolean;
295
335
  toast: {
296
- message: string;
297
- closable?: boolean | undefined;
298
- duration?: number | undefined;
336
+ message: React.ReactNode;
337
+ closable?: boolean;
338
+ duration?: number;
299
339
  } | null;
300
340
  zenModeEnabled: boolean;
301
341
  theme: import("@excalidraw/element/types").Theme;
@@ -306,45 +346,18 @@ export declare const actionRemoveAllElementsFromFrame: {
306
346
  selectedGroupIds: {
307
347
  [groupId: string]: boolean;
308
348
  };
309
- editingGroupId: string | null;
349
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
310
350
  width: number;
311
351
  height: number;
312
352
  offsetTop: number;
313
353
  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
- }>>;
354
+ fileHandle: FileSystemFileHandle | null;
355
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
335
356
  stats: {
336
357
  open: boolean;
337
358
  panels: number;
338
359
  };
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";
360
+ showHyperlinkPopup: false | "info" | "editor";
348
361
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
349
362
  snapLines: readonly import("../snapping").SnapLine[];
350
363
  originSnapOffset: {
@@ -352,18 +365,25 @@ export declare const actionRemoveAllElementsFromFrame: {
352
365
  y: number;
353
366
  } | null;
354
367
  objectsSnapModeEnabled: boolean;
355
- userToFollow: import("../types").UserToFollow | null;
356
- followedBy: Set<import("../types").SocketId>;
357
368
  isCropping: boolean;
358
- croppingElementId: string | null;
369
+ croppingElementId: ExcalidrawElement["id"] | null;
359
370
  searchMatches: Readonly<{
360
- focusedId: string | null;
371
+ focusedId: ExcalidrawElement["id"] | null;
361
372
  matches: readonly import("../types").SearchMatch[];
362
373
  }> | null;
363
374
  activeLockedId: string | null;
364
375
  lockedMultiSelections: {
365
376
  [groupId: string]: true;
366
377
  };
378
+ bindMode: import("@excalidraw/element/types").BindMode;
379
+ colorTopPicks: {
380
+ elementStroke: readonly string[] | null;
381
+ elementBackground: readonly string[] | null;
382
+ bucketFill: readonly string[] | null;
383
+ stickyNoteStroke: readonly string[] | null;
384
+ stickyNoteBackground: readonly string[] | null;
385
+ };
386
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
367
387
  };
368
388
  captureUpdate: "IMMEDIATELY";
369
389
  } | {
@@ -398,213 +418,49 @@ export declare const actionupdateFrameRendering: {
398
418
  } | null;
399
419
  showWelcomeScreen: boolean;
400
420
  isLoading: boolean;
401
- errorMessage: import("react").ReactNode;
421
+ errorMessage: React.ReactNode;
402
422
  activeEmbeddable: {
403
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
404
- state: "active" | "hover";
423
+ element: NonDeletedExcalidrawElement;
424
+ state: "hover" | "active";
405
425
  } | null;
406
426
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
407
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
427
+ resizingElement: NonDeletedExcalidrawElement | null;
408
428
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
409
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
429
+ selectionElement: NonDeletedExcalidrawElement | null;
410
430
  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";
431
+ boxSelectionMode: import("../types").BoxSelectionMode;
432
+ bindingPreference: "enabled" | "disabled";
433
+ isMidpointSnappingEnabled: boolean;
434
+ showHints: boolean;
435
+ inputDevice: import("../types").InputDevice;
436
+ suggestedBinding: {
437
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
438
+ midPoint?: import("@excalidraw/math").GlobalPoint;
439
+ } | null;
440
+ textToolHover: {
441
+ type: "text";
442
+ elementId: ExcalidrawElement["id"];
467
443
  } | {
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;
444
+ type: "container";
445
+ elementId: ExcalidrawElement["id"];
532
446
  } | {
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: {
447
+ type: "arrow";
448
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
449
+ anchor: "start" | "end" | "label";
450
+ } | null;
451
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
452
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
453
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
454
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
574
455
  activeTool: {
575
456
  lastActiveTool: import("../types").ActiveTool | null;
576
457
  locked: boolean;
577
458
  fromSelection: boolean;
578
459
  } & 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;
460
+ preferredSelectionTool: {
461
+ type: "selection" | "lasso";
462
+ initialized: boolean;
604
463
  };
605
- editingFrame: string | null;
606
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
607
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
608
464
  penMode: boolean;
609
465
  penDetected: boolean;
610
466
  exportBackground: boolean;
@@ -612,48 +468,56 @@ export declare const actionSetFrameAsActiveTool: {
612
468
  exportWithDarkMode: boolean;
613
469
  exportScale: number;
614
470
  currentItemStrokeColor: string;
471
+ currentItemStickynoteStrokeColor: string;
472
+ currentItemStickynoteBackgroundColor: string;
615
473
  currentItemBackgroundColor: string;
616
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
617
- currentItemStrokeWidth: number;
618
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
474
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
475
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
476
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
619
477
  currentItemRoughness: number;
478
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
620
479
  currentItemOpacity: number;
621
- currentItemFontFamily: number;
480
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
622
481
  currentItemFontSize: number;
623
- currentItemTextAlign: string;
482
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
624
483
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
625
484
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
626
- currentHoveredFontFamily: number | null;
485
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
627
486
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
628
- currentItemArrowType: "round" | "sharp" | "elbow";
487
+ currentItemArrowType: "sharp" | "round" | "elbow";
629
488
  viewBackgroundColor: string;
630
489
  scrollX: number;
631
490
  scrollY: number;
491
+ scrollConstraints: import("../types").ScrollConstraints | null;
632
492
  cursorButton: "up" | "down";
633
493
  scrolledOutside: boolean;
634
494
  name: string | null;
635
495
  isResizing: boolean;
636
496
  isRotating: boolean;
637
- zoom: Readonly<{
638
- value: import("../types").NormalizedZoomValue;
639
- }>;
640
- openMenu: "canvas" | "shape" | null;
641
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
497
+ zoom: import("../types").Zoom;
498
+ openMenu: "canvas" | null;
499
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
642
500
  openSidebar: {
643
- name: string;
644
- tab?: string | undefined;
501
+ name: import("../types").SidebarName;
502
+ tab?: import("../types").SidebarTabName;
645
503
  } | null;
646
- openDialog: {
504
+ openDialog: null | {
647
505
  name: "imageExport" | "help" | "jsonExport";
648
506
  } | {
649
507
  name: "ttd";
650
- tab: "mermaid" | "text-to-diagram";
508
+ tab: "text-to-diagram" | "mermaid";
651
509
  } | {
652
510
  name: "commandPalette";
511
+ } | {
512
+ name: "settings";
653
513
  } | {
654
514
  name: "elementLinkSelector";
655
- sourceElementId: string;
656
- } | null;
515
+ sourceElementId: ExcalidrawElement["id"];
516
+ } | {
517
+ name: "charts";
518
+ data: import("../charts").Spreadsheet;
519
+ rawText: string;
520
+ };
657
521
  defaultSidebarDockedPreference: boolean;
658
522
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
659
523
  selectedElementIds: Readonly<{
@@ -668,9 +532,9 @@ export declare const actionSetFrameAsActiveTool: {
668
532
  selectedElementsAreBeingDragged: boolean;
669
533
  shouldCacheIgnoreZoom: boolean;
670
534
  toast: {
671
- message: string;
672
- closable?: boolean | undefined;
673
- duration?: number | undefined;
535
+ message: React.ReactNode;
536
+ closable?: boolean;
537
+ duration?: number;
674
538
  } | null;
675
539
  zenModeEnabled: boolean;
676
540
  theme: import("@excalidraw/element/types").Theme;
@@ -681,45 +545,18 @@ export declare const actionSetFrameAsActiveTool: {
681
545
  selectedGroupIds: {
682
546
  [groupId: string]: boolean;
683
547
  };
684
- editingGroupId: string | null;
548
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
685
549
  width: number;
686
550
  height: number;
687
551
  offsetTop: number;
688
552
  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
- }>>;
553
+ fileHandle: FileSystemFileHandle | null;
554
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
710
555
  stats: {
711
556
  open: boolean;
712
557
  panels: number;
713
558
  };
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";
559
+ showHyperlinkPopup: false | "info" | "editor";
723
560
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
724
561
  snapLines: readonly import("../snapping").SnapLine[];
725
562
  originSnapOffset: {
@@ -727,515 +564,50 @@ export declare const actionSetFrameAsActiveTool: {
727
564
  y: number;
728
565
  } | null;
729
566
  objectsSnapModeEnabled: boolean;
730
- userToFollow: import("../types").UserToFollow | null;
731
- followedBy: Set<import("../types").SocketId>;
732
567
  isCropping: boolean;
733
- croppingElementId: string | null;
568
+ croppingElementId: ExcalidrawElement["id"] | null;
734
569
  searchMatches: Readonly<{
735
- focusedId: string | null;
570
+ focusedId: ExcalidrawElement["id"] | null;
736
571
  matches: readonly import("../types").SearchMatch[];
737
572
  }> | null;
738
573
  activeLockedId: string | null;
739
574
  lockedMultiSelections: {
740
575
  [groupId: string]: true;
741
576
  };
577
+ bindMode: import("@excalidraw/element/types").BindMode;
578
+ colorTopPicks: {
579
+ elementStroke: readonly string[] | null;
580
+ elementBackground: readonly string[] | null;
581
+ bucketFill: readonly string[] | null;
582
+ stickyNoteStroke: readonly string[] | null;
583
+ stickyNoteBackground: readonly string[] | null;
584
+ };
585
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
742
586
  };
743
587
  captureUpdate: "EVENTUALLY";
744
588
  };
745
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
589
+ checked: (appState: Readonly<UIAppState>) => boolean;
746
590
  } & {
747
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
591
+ keyTest?: undefined;
748
592
  };
593
+ /**
594
+ * The frame that wrapping the selection removes instead: the one frame the
595
+ * selection holds (along with any of its children), or, with no frame
596
+ * selected, the frame whose children are all selected.
597
+ */
598
+ export declare const getFrameToUnwrap: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
599
+ /** removes the frame, keeping its children selected in its place */
600
+ export declare const unwrapFrame: (elements: readonly ExcalidrawElement[], appState: AppState, frame: ExcalidrawFrameLikeElement, app: AppClassProperties) => ActionResult;
601
+ /** wraps the selection in a new frame — edge to edge when it's an image */
602
+ export declare const wrapInFrame: (elements: readonly ExcalidrawElement[], appState: AppState, selectedElements: NonDeletedExcalidrawElement[], app: AppClassProperties) => ActionResult;
749
603
  export declare const actionWrapSelectionInFrame: {
750
604
  name: "wrapSelectionInFrame";
751
- label: string;
605
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => "labels.removeFrame" | "labels.wrapSelectionInFrame";
752
606
  trackEvent: {
753
607
  category: "element";
754
608
  };
755
609
  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
- };
610
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
1239
611
  } & {
1240
612
  keyTest?: undefined;
1241
613
  };