@excalidraw/math 0.18.0-4e471c107 → 0.18.0-4e758db

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 (353) hide show
  1. package/dist/dev/index.js +355 -161
  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 -33
  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 +47 -77
  17. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  18. package/dist/types/element/src/Scene.d.ts +18 -10
  19. package/dist/types/element/src/align.d.ts +3 -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 +79 -51
  25. package/dist/types/element/src/bounds.d.ts +26 -19
  26. package/dist/types/element/src/bucketFill.d.ts +110 -0
  27. package/dist/types/element/src/collision.d.ts +7 -2
  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/delta.d.ts +39 -5
  31. package/dist/types/element/src/distribute.d.ts +4 -2
  32. package/dist/types/element/src/dragElements.d.ts +30 -3
  33. package/dist/types/element/src/duplicate.d.ts +7 -6
  34. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  35. package/dist/types/element/src/embeddable.d.ts +2 -2
  36. package/dist/types/element/src/flowchart.d.ts +11 -7
  37. package/dist/types/element/src/fractionalIndex.d.ts +4 -4
  38. package/dist/types/element/src/frame.d.ts +16 -11
  39. package/dist/types/element/src/groups.d.ts +9 -8
  40. package/dist/types/element/src/heading.d.ts +2 -1
  41. package/dist/types/element/src/image.d.ts +1 -11
  42. package/dist/types/element/src/index.d.ts +10 -4
  43. package/dist/types/element/src/linearElementEditor.d.ts +50 -31
  44. package/dist/types/element/src/mutateElement.d.ts +6 -2
  45. package/dist/types/element/src/newElement.d.ts +44 -8
  46. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  47. package/dist/types/element/src/renderElement.d.ts +4 -10
  48. package/dist/types/element/src/resizeElements.d.ts +12 -12
  49. package/dist/types/element/src/resizeTest.d.ts +6 -5
  50. package/dist/types/element/src/selection.d.ts +14 -14
  51. package/dist/types/element/src/shape.d.ts +21 -8
  52. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  53. package/dist/types/element/src/sortElements.d.ts +10 -0
  54. package/dist/types/element/src/stickyNote.d.ts +183 -0
  55. package/dist/types/element/src/store.d.ts +6 -1
  56. package/dist/types/element/src/textElement.d.ts +15 -11
  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 +15 -6
  64. package/dist/types/element/src/zindex.d.ts +7 -1
  65. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +221 -222
  66. package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
  67. package/dist/types/excalidraw/actions/actionBoundText.d.ts +132 -133
  68. package/dist/types/excalidraw/actions/actionCanvas.d.ts +481 -1576
  69. package/dist/types/excalidraw/actions/actionClipboard.d.ts +159 -904
  70. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +64 -65
  71. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +210 -214
  72. package/dist/types/excalidraw/actions/actionDeselect.d.ts +170 -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 +71 -78
  76. package/dist/types/excalidraw/actions/actionElementLock.d.ts +131 -132
  77. package/dist/types/excalidraw/actions/actionExport.d.ts +210 -1423
  78. package/dist/types/excalidraw/actions/actionFinalize.d.ts +11 -395
  79. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  80. package/dist/types/excalidraw/actions/actionFrame.d.ts +333 -508
  81. package/dist/types/excalidraw/actions/actionGroup.d.ts +142 -151
  82. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +235 -191
  83. package/dist/types/excalidraw/actions/actionLink.d.ts +77 -78
  84. package/dist/types/excalidraw/actions/actionMenu.d.ts +66 -441
  85. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -361
  86. package/dist/types/excalidraw/actions/actionProperties.d.ts +220 -2548
  87. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +71 -76
  88. package/dist/types/excalidraw/actions/actionStyles.d.ts +65 -65
  89. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
  90. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +186 -0
  91. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +79 -81
  92. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +186 -0
  93. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +78 -79
  94. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +67 -75
  95. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
  96. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +77 -78
  97. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +78 -79
  98. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +78 -79
  99. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  100. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  101. package/dist/types/excalidraw/actions/index.d.ts +5 -3
  102. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  103. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  104. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  105. package/dist/types/excalidraw/actions/types.d.ts +11 -7
  106. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  107. package/dist/types/excalidraw/appState.d.ts +55 -26
  108. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  109. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  110. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  111. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  112. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  113. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  114. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  115. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  116. package/dist/types/excalidraw/clipboard.d.ts +57 -19
  117. package/dist/types/excalidraw/components/Actions.d.ts +32 -14
  118. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  119. package/dist/types/excalidraw/components/App.arrowText.d.ts +104 -0
  120. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  121. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  122. package/dist/types/excalidraw/components/App.d.ts +559 -130
  123. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  124. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  125. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  126. package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
  127. package/dist/types/excalidraw/components/App.wheel.d.ts +33 -0
  128. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  129. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  130. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  131. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -4
  132. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  133. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
  134. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -2
  135. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +5 -2
  136. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  137. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  138. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  139. package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
  140. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  141. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  142. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  143. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -4
  144. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  145. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  146. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  147. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  148. package/dist/types/excalidraw/components/Ellipsify.d.ts +3 -0
  149. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  150. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  151. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  152. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  153. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  154. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  155. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  156. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  157. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  158. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  159. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  160. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  161. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  162. package/dist/types/excalidraw/components/LayerUI.d.ts +6 -2
  163. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  164. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  165. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  166. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  167. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  168. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  169. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  170. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  171. package/dist/types/excalidraw/components/MobileMenu.d.ts +5 -7
  172. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  173. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  174. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  175. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  176. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  177. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  178. package/dist/types/excalidraw/components/Popover.d.ts +2 -3
  179. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  180. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  181. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  182. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  183. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  184. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  185. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  186. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  187. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  188. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  189. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  190. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  191. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  192. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  193. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  194. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  195. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  196. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  197. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  198. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -3
  199. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  200. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  201. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  202. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  203. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  204. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  205. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  206. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  207. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  208. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  209. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  210. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  211. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  212. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  213. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  214. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  215. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  216. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  217. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  218. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  219. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  220. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  221. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  222. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  223. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  224. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  225. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  226. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  227. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  228. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  229. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  230. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  231. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  232. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  233. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  234. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  235. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  236. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  237. package/dist/types/excalidraw/components/ToolPopover.d.ts +22 -0
  238. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  239. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  240. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  241. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  242. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  243. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +10 -4
  244. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  245. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  246. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  247. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  248. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  249. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  250. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  251. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  252. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  253. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  254. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  255. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  256. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  257. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  258. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  259. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  260. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  261. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  262. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  263. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  264. package/dist/types/excalidraw/components/icons.d.ts +56 -22
  265. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +25 -3
  266. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  267. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  268. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  269. package/dist/types/excalidraw/data/blob.d.ts +355 -12
  270. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  271. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  272. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  273. package/dist/types/excalidraw/data/index.d.ts +8 -9
  274. package/dist/types/excalidraw/data/json.d.ts +183 -3
  275. package/dist/types/excalidraw/data/library.d.ts +25 -10
  276. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  277. package/dist/types/excalidraw/data/restore.d.ts +27 -7
  278. package/dist/types/excalidraw/data/types.d.ts +4 -1
  279. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  280. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  281. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  282. package/dist/types/excalidraw/errors.d.ts +14 -0
  283. package/dist/types/excalidraw/fonts/Fonts.d.ts +3 -2
  284. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  285. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
  286. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  287. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  288. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  289. package/dist/types/excalidraw/i18n.d.ts +2 -2
  290. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  291. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  292. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  293. package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
  294. package/dist/types/excalidraw/renderer/helpers.d.ts +31 -8
  295. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
  296. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  297. package/dist/types/excalidraw/scene/Renderer.d.ts +477 -18
  298. package/dist/types/excalidraw/scene/export.d.ts +4 -4
  299. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  300. package/dist/types/excalidraw/scene/types.d.ts +27 -8
  301. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  302. package/dist/types/excalidraw/snapping.d.ts +12 -12
  303. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  304. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  305. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  306. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  307. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  308. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  309. package/dist/types/excalidraw/types.d.ts +580 -59
  310. package/dist/types/excalidraw/viewport.d.ts +280 -0
  311. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +8 -5
  312. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  313. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  314. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  315. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  316. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  317. package/dist/types/math/src/constants.d.ts +0 -1
  318. package/dist/types/math/src/curve.d.ts +23 -13
  319. package/dist/types/math/src/index.d.ts +1 -0
  320. package/dist/types/math/src/pca.d.ts +79 -0
  321. package/dist/types/math/src/point.d.ts +8 -2
  322. package/dist/types/math/src/polygon.d.ts +26 -2
  323. package/dist/types/math/src/range.d.ts +1 -3
  324. package/dist/types/math/src/segment.d.ts +10 -3
  325. package/dist/types/math/src/types.d.ts +25 -1
  326. package/dist/types/utils/src/export.d.ts +9 -8
  327. package/dist/types/utils/src/index.d.ts +1 -2
  328. package/dist/types/utils/src/shape.d.ts +8 -8
  329. package/package.json +2 -2
  330. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -186
  331. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  332. package/dist/types/excalidraw/charts.d.ts +0 -27
  333. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  334. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  335. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  336. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  337. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  338. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  339. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  340. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  341. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  342. package/dist/types/excalidraw/components/shapes.d.ts +0 -62
  343. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  344. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  345. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  346. package/dist/types/excalidraw/cursor.d.ts +0 -5
  347. package/dist/types/excalidraw/data/reconcile.d.ts +0 -6
  348. package/dist/types/excalidraw/index.d.ts +0 -46
  349. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  350. package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
  351. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  352. package/dist/types/utils/src/bbox.d.ts +0 -9
  353. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- import { LinearElementEditor } from "@excalidraw/element";
3
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
4
2
  import type { AppClassProperties, AppState } from "../types";
5
3
  export declare const actionDeleteSelected: {
@@ -10,10 +8,10 @@ export declare const actionDeleteSelected: {
10
8
  category: "element";
11
9
  action: string;
12
10
  };
13
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => false | {
11
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: unknown, app: AppClassProperties) => false | {
14
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
15
13
  appState: {
16
- editingLinearElement: null;
14
+ selectedLinearElement: null;
17
15
  contextMenu: {
18
16
  items: import("../components/ContextMenu").ContextMenuItems;
19
17
  top: number;
@@ -21,18 +19,28 @@ export declare const actionDeleteSelected: {
21
19
  } | null;
22
20
  showWelcomeScreen: boolean;
23
21
  isLoading: boolean;
24
- errorMessage: import("react").ReactNode;
22
+ errorMessage: React.ReactNode;
25
23
  activeEmbeddable: {
26
24
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
27
- state: "active" | "hover";
25
+ state: "hover" | "active";
28
26
  } | null;
29
27
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
30
28
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
31
29
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
32
30
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
31
  isBindingEnabled: boolean;
34
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
+ boxSelectionMode: import("../types").BoxSelectionMode;
33
+ bindingPreference: "enabled" | "disabled";
34
+ isMidpointSnappingEnabled: 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
+ hoveredArrowTextAnchor: {
41
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
42
+ anchor: "start" | "end" | "label";
43
+ } | null;
36
44
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
45
  frameRendering: {
38
46
  enabled: boolean;
@@ -40,14 +48,18 @@ export declare const actionDeleteSelected: {
40
48
  outline: boolean;
41
49
  clip: boolean;
42
50
  };
43
- editingFrame: string | null;
44
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
45
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
51
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
52
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
53
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
46
54
  activeTool: {
47
55
  lastActiveTool: import("../types").ActiveTool | null;
48
56
  locked: boolean;
49
57
  fromSelection: boolean;
50
58
  } & import("../types").ActiveTool;
59
+ preferredSelectionTool: {
60
+ type: "selection" | "lasso";
61
+ initialized: boolean;
62
+ };
51
63
  penMode: boolean;
52
64
  penDetected: boolean;
53
65
  exportBackground: boolean;
@@ -55,48 +67,56 @@ export declare const actionDeleteSelected: {
55
67
  exportWithDarkMode: boolean;
56
68
  exportScale: number;
57
69
  currentItemStrokeColor: string;
70
+ currentItemStickynoteStrokeColor: string;
71
+ currentItemStickynoteBackgroundColor: string;
58
72
  currentItemBackgroundColor: string;
59
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
60
- currentItemStrokeWidth: number;
61
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
73
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
74
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
75
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
62
76
  currentItemRoughness: number;
77
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
63
78
  currentItemOpacity: number;
64
- currentItemFontFamily: number;
79
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
65
80
  currentItemFontSize: number;
66
- currentItemTextAlign: string;
81
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
67
82
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
68
83
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
69
- currentHoveredFontFamily: number | null;
84
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
70
85
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
71
- currentItemArrowType: "round" | "sharp" | "elbow";
86
+ currentItemArrowType: "sharp" | "round" | "elbow";
72
87
  viewBackgroundColor: string;
73
88
  scrollX: number;
74
89
  scrollY: number;
90
+ scrollConstraints: import("../types").ScrollConstraints | null;
75
91
  cursorButton: "up" | "down";
76
92
  scrolledOutside: boolean;
77
93
  name: string | null;
78
94
  isResizing: boolean;
79
95
  isRotating: boolean;
80
- zoom: Readonly<{
81
- value: import("../types").NormalizedZoomValue;
82
- }>;
83
- openMenu: "canvas" | "shape" | null;
84
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
96
+ zoom: import("../types").Zoom;
97
+ openMenu: "canvas" | null;
98
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
85
99
  openSidebar: {
86
- name: string;
87
- tab?: string | undefined;
100
+ name: import("../types").SidebarName;
101
+ tab?: import("../types").SidebarTabName;
88
102
  } | null;
89
- openDialog: {
103
+ openDialog: null | {
90
104
  name: "imageExport" | "help" | "jsonExport";
91
105
  } | {
92
106
  name: "ttd";
93
- tab: "mermaid" | "text-to-diagram";
107
+ tab: "text-to-diagram" | "mermaid";
94
108
  } | {
95
109
  name: "commandPalette";
110
+ } | {
111
+ name: "settings";
96
112
  } | {
97
113
  name: "elementLinkSelector";
98
- sourceElementId: string;
99
- } | null;
114
+ sourceElementId: ExcalidrawElement["id"];
115
+ } | {
116
+ name: "charts";
117
+ data: import("../charts").Spreadsheet;
118
+ rawText: string;
119
+ };
100
120
  defaultSidebarDockedPreference: boolean;
101
121
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
102
122
  selectedElementIds: Readonly<{
@@ -111,9 +131,9 @@ export declare const actionDeleteSelected: {
111
131
  selectedElementsAreBeingDragged: boolean;
112
132
  shouldCacheIgnoreZoom: boolean;
113
133
  toast: {
114
- message: string;
115
- closable?: boolean | undefined;
116
- duration?: number | undefined;
134
+ message: React.ReactNode;
135
+ closable?: boolean;
136
+ duration?: number;
117
137
  } | null;
118
138
  zenModeEnabled: boolean;
119
139
  theme: import("@excalidraw/element/types").Theme;
@@ -124,100 +144,80 @@ export declare const actionDeleteSelected: {
124
144
  selectedGroupIds: {
125
145
  [groupId: string]: boolean;
126
146
  };
127
- editingGroupId: string | null;
147
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
128
148
  width: number;
129
149
  height: number;
130
150
  offsetTop: number;
131
151
  offsetLeft: number;
132
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
133
- collaborators: Map<import("../types").SocketId, Readonly<{
134
- pointer?: import("../types").CollaboratorPointer | undefined;
135
- button?: "up" | "down" | undefined;
136
- selectedElementIds?: Readonly<{
137
- [id: string]: true;
138
- }> | undefined;
139
- username?: string | null | undefined;
140
- userState?: import("@excalidraw/common").UserIdleState | undefined;
141
- color?: {
142
- background: string;
143
- stroke: string;
144
- } | undefined;
145
- avatarUrl?: string | undefined;
146
- id?: string | undefined;
147
- socketId?: import("../types").SocketId | undefined;
148
- isCurrentUser?: boolean | undefined;
149
- isInCall?: boolean | undefined;
150
- isSpeaking?: boolean | undefined;
151
- isMuted?: boolean | undefined;
152
- }>>;
152
+ fileHandle: FileSystemFileHandle | null;
153
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
153
154
  stats: {
154
155
  open: boolean;
155
156
  panels: number;
156
157
  };
157
- currentChartType: import("@excalidraw/element/types").ChartType;
158
- pasteDialog: {
159
- shown: false;
160
- data: null;
161
- } | {
162
- shown: true;
163
- data: import("../charts").Spreadsheet;
164
- };
165
- showHyperlinkPopup: false | "editor" | "info";
166
- selectedLinearElement: LinearElementEditor | null;
158
+ showHyperlinkPopup: false | "info" | "editor";
167
159
  snapLines: readonly import("../snapping").SnapLine[];
168
160
  originSnapOffset: {
169
161
  x: number;
170
162
  y: number;
171
163
  } | null;
172
164
  objectsSnapModeEnabled: boolean;
173
- userToFollow: import("../types").UserToFollow | null;
174
- followedBy: Set<import("../types").SocketId>;
175
165
  isCropping: boolean;
176
- croppingElementId: string | null;
166
+ croppingElementId: ExcalidrawElement["id"] | null;
177
167
  searchMatches: Readonly<{
178
- focusedId: string | null;
168
+ focusedId: ExcalidrawElement["id"] | null;
179
169
  matches: readonly import("../types").SearchMatch[];
180
170
  }> | null;
181
171
  activeLockedId: string | null;
182
172
  lockedMultiSelections: {
183
173
  [groupId: string]: true;
184
174
  };
175
+ bindMode: import("@excalidraw/element/types").BindMode;
176
+ colorTopPicks: {
177
+ elementStroke: readonly string[] | null;
178
+ elementBackground: readonly string[] | null;
179
+ bucketFill: readonly string[] | null;
180
+ stickyNoteStroke: readonly string[] | null;
181
+ stickyNoteBackground: readonly string[] | null;
182
+ };
185
183
  };
186
184
  captureUpdate: "IMMEDIATELY";
187
185
  } | {
188
186
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
189
187
  appState: {
190
- editingLinearElement: {
188
+ selectedLinearElement: {
191
189
  selectedPointsIndices: number[];
192
- startBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
193
- endBindingElement: import("@excalidraw/element/types").ExcalidrawBindableElement | "keep" | null;
194
- elementId: string & {
190
+ elementId: ExcalidrawElement["id"] & {
195
191
  _brand: "excalidrawLinearElementId";
196
192
  };
197
- pointerDownState: Readonly<{
193
+ initialState: Readonly<{
198
194
  prevSelectedPointsIndices: readonly number[] | null;
199
195
  lastClickedPoint: number;
200
- lastClickedIsEndPoint: boolean;
201
- origin: Readonly<{
202
- x: number;
203
- y: number;
204
- }> | null;
196
+ origin: Readonly<import("@excalidraw/math").GlobalPoint> | null;
205
197
  segmentMidpoint: {
206
198
  value: import("@excalidraw/math").GlobalPoint | null;
207
199
  index: number | null;
208
200
  added: boolean;
209
201
  };
202
+ arrowStartIsInside: boolean;
203
+ altFocusPoint: Readonly<import("@excalidraw/math").GlobalPoint> | null;
204
+ arrowOtherEndpointInitialBinding: import("@excalidraw/element/types").FixedPointBinding | null;
210
205
  }>;
211
206
  isDragging: boolean;
212
207
  lastUncommittedPoint: import("@excalidraw/math").LocalPoint | null;
208
+ lastCommittedPoint: import("@excalidraw/math").LocalPoint | null;
213
209
  pointerOffset: Readonly<{
214
210
  x: number;
215
211
  y: number;
216
212
  }>;
217
213
  hoverPointIndex: number;
218
214
  segmentMidPointHoveredCoords: import("@excalidraw/math").GlobalPoint | null;
215
+ hoveredFocusPointBinding: "start" | "end" | null;
216
+ draggedFocusPointBinding: "start" | "end" | null;
219
217
  elbowed: boolean;
220
218
  customLineAngle: number | null;
219
+ isEditing: boolean;
220
+ pointerDownState: never;
221
221
  };
222
222
  contextMenu: {
223
223
  items: import("../components/ContextMenu").ContextMenuItems;
@@ -226,18 +226,28 @@ export declare const actionDeleteSelected: {
226
226
  } | null;
227
227
  showWelcomeScreen: boolean;
228
228
  isLoading: boolean;
229
- errorMessage: import("react").ReactNode;
229
+ errorMessage: React.ReactNode;
230
230
  activeEmbeddable: {
231
231
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
232
- state: "active" | "hover";
232
+ state: "hover" | "active";
233
233
  } | null;
234
234
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
235
235
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
236
236
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
237
237
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
238
238
  isBindingEnabled: boolean;
239
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
240
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
239
+ boxSelectionMode: import("../types").BoxSelectionMode;
240
+ bindingPreference: "enabled" | "disabled";
241
+ isMidpointSnappingEnabled: boolean;
242
+ inputDevice: import("../types").InputDevice;
243
+ suggestedBinding: {
244
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
245
+ midPoint?: import("@excalidraw/math").GlobalPoint;
246
+ } | null;
247
+ hoveredArrowTextAnchor: {
248
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
249
+ anchor: "start" | "end" | "label";
250
+ } | null;
241
251
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
242
252
  frameRendering: {
243
253
  enabled: boolean;
@@ -245,14 +255,18 @@ export declare const actionDeleteSelected: {
245
255
  outline: boolean;
246
256
  clip: boolean;
247
257
  };
248
- editingFrame: string | null;
249
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
250
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
258
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
259
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
260
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
251
261
  activeTool: {
252
262
  lastActiveTool: import("../types").ActiveTool | null;
253
263
  locked: boolean;
254
264
  fromSelection: boolean;
255
265
  } & import("../types").ActiveTool;
266
+ preferredSelectionTool: {
267
+ type: "selection" | "lasso";
268
+ initialized: boolean;
269
+ };
256
270
  penMode: boolean;
257
271
  penDetected: boolean;
258
272
  exportBackground: boolean;
@@ -260,48 +274,56 @@ export declare const actionDeleteSelected: {
260
274
  exportWithDarkMode: boolean;
261
275
  exportScale: number;
262
276
  currentItemStrokeColor: string;
277
+ currentItemStickynoteStrokeColor: string;
278
+ currentItemStickynoteBackgroundColor: string;
263
279
  currentItemBackgroundColor: string;
264
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
265
- currentItemStrokeWidth: number;
266
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
280
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
281
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
282
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
267
283
  currentItemRoughness: number;
284
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
268
285
  currentItemOpacity: number;
269
- currentItemFontFamily: number;
286
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
270
287
  currentItemFontSize: number;
271
- currentItemTextAlign: string;
288
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
272
289
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
273
290
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
274
- currentHoveredFontFamily: number | null;
291
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
275
292
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
276
- currentItemArrowType: "round" | "sharp" | "elbow";
293
+ currentItemArrowType: "sharp" | "round" | "elbow";
277
294
  viewBackgroundColor: string;
278
295
  scrollX: number;
279
296
  scrollY: number;
297
+ scrollConstraints: import("../types").ScrollConstraints | null;
280
298
  cursorButton: "up" | "down";
281
299
  scrolledOutside: boolean;
282
300
  name: string | null;
283
301
  isResizing: boolean;
284
302
  isRotating: boolean;
285
- zoom: Readonly<{
286
- value: import("../types").NormalizedZoomValue;
287
- }>;
288
- openMenu: "canvas" | "shape" | null;
289
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
303
+ zoom: import("../types").Zoom;
304
+ openMenu: "canvas" | null;
305
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
290
306
  openSidebar: {
291
- name: string;
292
- tab?: string | undefined;
307
+ name: import("../types").SidebarName;
308
+ tab?: import("../types").SidebarTabName;
293
309
  } | null;
294
- openDialog: {
310
+ openDialog: null | {
295
311
  name: "imageExport" | "help" | "jsonExport";
296
312
  } | {
297
313
  name: "ttd";
298
- tab: "mermaid" | "text-to-diagram";
314
+ tab: "text-to-diagram" | "mermaid";
299
315
  } | {
300
316
  name: "commandPalette";
317
+ } | {
318
+ name: "settings";
301
319
  } | {
302
320
  name: "elementLinkSelector";
303
- sourceElementId: string;
304
- } | null;
321
+ sourceElementId: ExcalidrawElement["id"];
322
+ } | {
323
+ name: "charts";
324
+ data: import("../charts").Spreadsheet;
325
+ rawText: string;
326
+ };
305
327
  defaultSidebarDockedPreference: boolean;
306
328
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
307
329
  selectedElementIds: Readonly<{
@@ -316,9 +338,9 @@ export declare const actionDeleteSelected: {
316
338
  selectedElementsAreBeingDragged: boolean;
317
339
  shouldCacheIgnoreZoom: boolean;
318
340
  toast: {
319
- message: string;
320
- closable?: boolean | undefined;
321
- duration?: number | undefined;
341
+ message: React.ReactNode;
342
+ closable?: boolean;
343
+ duration?: number;
322
344
  } | null;
323
345
  zenModeEnabled: boolean;
324
346
  theme: import("@excalidraw/element/types").Theme;
@@ -329,68 +351,46 @@ export declare const actionDeleteSelected: {
329
351
  selectedGroupIds: {
330
352
  [groupId: string]: boolean;
331
353
  };
332
- editingGroupId: string | null;
354
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
333
355
  width: number;
334
356
  height: number;
335
357
  offsetTop: number;
336
358
  offsetLeft: number;
337
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
338
- collaborators: Map<import("../types").SocketId, Readonly<{
339
- pointer?: import("../types").CollaboratorPointer | undefined;
340
- button?: "up" | "down" | undefined;
341
- selectedElementIds?: Readonly<{
342
- [id: string]: true;
343
- }> | undefined;
344
- username?: string | null | undefined;
345
- userState?: import("@excalidraw/common").UserIdleState | undefined;
346
- color?: {
347
- background: string;
348
- stroke: string;
349
- } | undefined;
350
- avatarUrl?: string | undefined;
351
- id?: string | undefined;
352
- socketId?: import("../types").SocketId | undefined;
353
- isCurrentUser?: boolean | undefined;
354
- isInCall?: boolean | undefined;
355
- isSpeaking?: boolean | undefined;
356
- isMuted?: boolean | undefined;
357
- }>>;
359
+ fileHandle: FileSystemFileHandle | null;
360
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
358
361
  stats: {
359
362
  open: boolean;
360
363
  panels: number;
361
364
  };
362
- currentChartType: import("@excalidraw/element/types").ChartType;
363
- pasteDialog: {
364
- shown: false;
365
- data: null;
366
- } | {
367
- shown: true;
368
- data: import("../charts").Spreadsheet;
369
- };
370
- showHyperlinkPopup: false | "editor" | "info";
371
- selectedLinearElement: LinearElementEditor | null;
365
+ showHyperlinkPopup: false | "info" | "editor";
372
366
  snapLines: readonly import("../snapping").SnapLine[];
373
367
  originSnapOffset: {
374
368
  x: number;
375
369
  y: number;
376
370
  } | null;
377
371
  objectsSnapModeEnabled: boolean;
378
- userToFollow: import("../types").UserToFollow | null;
379
- followedBy: Set<import("../types").SocketId>;
380
372
  isCropping: boolean;
381
- croppingElementId: string | null;
373
+ croppingElementId: ExcalidrawElement["id"] | null;
382
374
  searchMatches: Readonly<{
383
- focusedId: string | null;
375
+ focusedId: ExcalidrawElement["id"] | null;
384
376
  matches: readonly import("../types").SearchMatch[];
385
377
  }> | null;
386
378
  activeLockedId: string | null;
387
379
  lockedMultiSelections: {
388
380
  [groupId: string]: true;
389
381
  };
382
+ bindMode: import("@excalidraw/element/types").BindMode;
383
+ colorTopPicks: {
384
+ elementStroke: readonly string[] | null;
385
+ elementBackground: readonly string[] | null;
386
+ bucketFill: readonly string[] | null;
387
+ stickyNoteStroke: readonly string[] | null;
388
+ stickyNoteBackground: readonly string[] | null;
389
+ };
390
390
  };
391
391
  captureUpdate: "IMMEDIATELY";
392
392
  } | {
393
- elements: ExcalidrawElement[];
393
+ elements: (import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawStickyNoteElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement)[];
394
394
  appState: {
395
395
  activeTool: {
396
396
  lastActiveTool: import("../types").ActiveTool | null;
@@ -398,15 +398,12 @@ export declare const actionDeleteSelected: {
398
398
  fromSelection: boolean;
399
399
  } & import("../types").ActiveTool;
400
400
  multiElement: null;
401
+ newElement: null;
401
402
  activeEmbeddable: null;
402
403
  selectedLinearElement: null;
403
- editingGroupId: string | null;
404
- selectedElementIds: Readonly<{
405
- [id: string]: true;
406
- }>;
407
- selectedGroupIds: {
408
- [groupId: string]: boolean;
409
- };
404
+ editingGroupId: AppState["editingGroupId"];
405
+ selectedElementIds: AppState["selectedElementIds"];
406
+ selectedGroupIds: AppState["selectedGroupIds"];
410
407
  contextMenu: {
411
408
  items: import("../components/ContextMenu").ContextMenuItems;
412
409
  top: number;
@@ -414,13 +411,22 @@ export declare const actionDeleteSelected: {
414
411
  } | null;
415
412
  showWelcomeScreen: boolean;
416
413
  isLoading: boolean;
417
- errorMessage: import("react").ReactNode;
418
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
414
+ errorMessage: React.ReactNode;
419
415
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
420
416
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
421
417
  isBindingEnabled: boolean;
422
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
423
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
418
+ boxSelectionMode: import("../types").BoxSelectionMode;
419
+ bindingPreference: "enabled" | "disabled";
420
+ isMidpointSnappingEnabled: boolean;
421
+ inputDevice: import("../types").InputDevice;
422
+ suggestedBinding: {
423
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
424
+ midPoint?: import("@excalidraw/math").GlobalPoint;
425
+ } | null;
426
+ hoveredArrowTextAnchor: {
427
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
428
+ anchor: "start" | "end" | "label";
429
+ } | null;
424
430
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
425
431
  frameRendering: {
426
432
  enabled: boolean;
@@ -428,10 +434,13 @@ export declare const actionDeleteSelected: {
428
434
  outline: boolean;
429
435
  clip: boolean;
430
436
  };
431
- editingFrame: string | null;
432
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
433
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
434
- editingLinearElement: LinearElementEditor | null;
437
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
438
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
439
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
440
+ preferredSelectionTool: {
441
+ type: "selection" | "lasso";
442
+ initialized: boolean;
443
+ };
435
444
  penMode: boolean;
436
445
  penDetected: boolean;
437
446
  exportBackground: boolean;
@@ -439,48 +448,56 @@ export declare const actionDeleteSelected: {
439
448
  exportWithDarkMode: boolean;
440
449
  exportScale: number;
441
450
  currentItemStrokeColor: string;
451
+ currentItemStickynoteStrokeColor: string;
452
+ currentItemStickynoteBackgroundColor: string;
442
453
  currentItemBackgroundColor: string;
443
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
444
- currentItemStrokeWidth: number;
445
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
454
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
455
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
456
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
446
457
  currentItemRoughness: number;
458
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
447
459
  currentItemOpacity: number;
448
- currentItemFontFamily: number;
460
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
449
461
  currentItemFontSize: number;
450
- currentItemTextAlign: string;
462
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
451
463
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
452
464
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
453
- currentHoveredFontFamily: number | null;
465
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
454
466
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
455
- currentItemArrowType: "round" | "sharp" | "elbow";
467
+ currentItemArrowType: "sharp" | "round" | "elbow";
456
468
  viewBackgroundColor: string;
457
469
  scrollX: number;
458
470
  scrollY: number;
471
+ scrollConstraints: import("../types").ScrollConstraints | null;
459
472
  cursorButton: "up" | "down";
460
473
  scrolledOutside: boolean;
461
474
  name: string | null;
462
475
  isResizing: boolean;
463
476
  isRotating: boolean;
464
- zoom: Readonly<{
465
- value: import("../types").NormalizedZoomValue;
466
- }>;
467
- openMenu: "canvas" | "shape" | null;
468
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
477
+ zoom: import("../types").Zoom;
478
+ openMenu: "canvas" | null;
479
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
469
480
  openSidebar: {
470
- name: string;
471
- tab?: string | undefined;
481
+ name: import("../types").SidebarName;
482
+ tab?: import("../types").SidebarTabName;
472
483
  } | null;
473
- openDialog: {
484
+ openDialog: null | {
474
485
  name: "imageExport" | "help" | "jsonExport";
475
486
  } | {
476
487
  name: "ttd";
477
- tab: "mermaid" | "text-to-diagram";
488
+ tab: "text-to-diagram" | "mermaid";
478
489
  } | {
479
490
  name: "commandPalette";
491
+ } | {
492
+ name: "settings";
480
493
  } | {
481
494
  name: "elementLinkSelector";
482
- sourceElementId: string;
483
- } | null;
495
+ sourceElementId: ExcalidrawElement["id"];
496
+ } | {
497
+ name: "charts";
498
+ data: import("../charts").Spreadsheet;
499
+ rawText: string;
500
+ };
484
501
  defaultSidebarDockedPreference: boolean;
485
502
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
486
503
  hoveredElementIds: Readonly<{
@@ -492,9 +509,9 @@ export declare const actionDeleteSelected: {
492
509
  selectedElementsAreBeingDragged: boolean;
493
510
  shouldCacheIgnoreZoom: boolean;
494
511
  toast: {
495
- message: string;
496
- closable?: boolean | undefined;
497
- duration?: number | undefined;
512
+ message: React.ReactNode;
513
+ closable?: boolean;
514
+ duration?: number;
498
515
  } | null;
499
516
  zenModeEnabled: boolean;
500
517
  theme: import("@excalidraw/element/types").Theme;
@@ -506,63 +523,42 @@ export declare const actionDeleteSelected: {
506
523
  height: number;
507
524
  offsetTop: number;
508
525
  offsetLeft: number;
509
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
510
- collaborators: Map<import("../types").SocketId, Readonly<{
511
- pointer?: import("../types").CollaboratorPointer | undefined;
512
- button?: "up" | "down" | undefined;
513
- selectedElementIds?: Readonly<{
514
- [id: string]: true;
515
- }> | undefined;
516
- username?: string | null | undefined;
517
- userState?: import("@excalidraw/common").UserIdleState | undefined;
518
- color?: {
519
- background: string;
520
- stroke: string;
521
- } | undefined;
522
- avatarUrl?: string | undefined;
523
- id?: string | undefined;
524
- socketId?: import("../types").SocketId | undefined;
525
- isCurrentUser?: boolean | undefined;
526
- isInCall?: boolean | undefined;
527
- isSpeaking?: boolean | undefined;
528
- isMuted?: boolean | undefined;
529
- }>>;
526
+ fileHandle: FileSystemFileHandle | null;
527
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
530
528
  stats: {
531
529
  open: boolean;
532
530
  panels: number;
533
531
  };
534
- currentChartType: import("@excalidraw/element/types").ChartType;
535
- pasteDialog: {
536
- shown: false;
537
- data: null;
538
- } | {
539
- shown: true;
540
- data: import("../charts").Spreadsheet;
541
- };
542
- showHyperlinkPopup: false | "editor" | "info";
532
+ showHyperlinkPopup: false | "info" | "editor";
543
533
  snapLines: readonly import("../snapping").SnapLine[];
544
534
  originSnapOffset: {
545
535
  x: number;
546
536
  y: number;
547
537
  } | null;
548
538
  objectsSnapModeEnabled: boolean;
549
- userToFollow: import("../types").UserToFollow | null;
550
- followedBy: Set<import("../types").SocketId>;
551
539
  isCropping: boolean;
552
- croppingElementId: string | null;
540
+ croppingElementId: ExcalidrawElement["id"] | null;
553
541
  searchMatches: Readonly<{
554
- focusedId: string | null;
542
+ focusedId: ExcalidrawElement["id"] | null;
555
543
  matches: readonly import("../types").SearchMatch[];
556
544
  }> | null;
557
545
  activeLockedId: string | null;
558
546
  lockedMultiSelections: {
559
547
  [groupId: string]: true;
560
548
  };
549
+ bindMode: import("@excalidraw/element/types").BindMode;
550
+ colorTopPicks: {
551
+ elementStroke: readonly string[] | null;
552
+ elementBackground: readonly string[] | null;
553
+ bucketFill: readonly string[] | null;
554
+ stickyNoteStroke: readonly string[] | null;
555
+ stickyNoteBackground: readonly string[] | null;
556
+ };
561
557
  };
562
558
  captureUpdate: "IMMEDIATELY" | "EVENTUALLY";
563
559
  };
564
560
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
565
- PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
561
+ PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
566
562
  } & {
567
563
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
568
564
  };