@excalidraw/element 0.18.0-ac0d305 → 0.18.0-afa3a65

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