@excalidraw/element 0.18.0-200a6bd94 → 0.18.0-2a82821

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 (295) hide show
  1. package/dist/dev/index.js +8373 -5210
  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 +59 -39
  8. package/dist/types/common/src/constants.d.ts +46 -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 +1 -1
  13. package/dist/types/common/src/utility-types.d.ts +0 -1
  14. package/dist/types/common/src/utils.d.ts +53 -41
  15. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  16. package/dist/types/element/src/Scene.d.ts +16 -8
  17. package/dist/types/element/src/arrowheads.d.ts +3 -0
  18. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  19. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  20. package/dist/types/element/src/binding.d.ts +67 -48
  21. package/dist/types/element/src/bounds.d.ts +25 -14
  22. package/dist/types/element/src/collision.d.ts +7 -2
  23. package/dist/types/element/src/comparisons.d.ts +8 -7
  24. package/dist/types/element/src/delta.d.ts +6 -4
  25. package/dist/types/element/src/distribute.d.ts +2 -1
  26. package/dist/types/element/src/dragElements.d.ts +3 -3
  27. package/dist/types/element/src/duplicate.d.ts +4 -3
  28. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  29. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  30. package/dist/types/element/src/frame.d.ts +12 -7
  31. package/dist/types/element/src/heading.d.ts +2 -1
  32. package/dist/types/element/src/image.d.ts +1 -11
  33. package/dist/types/element/src/index.d.ts +5 -3
  34. package/dist/types/element/src/linearElementEditor.d.ts +23 -22
  35. package/dist/types/element/src/mutateElement.d.ts +5 -1
  36. package/dist/types/element/src/newElement.d.ts +7 -6
  37. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  38. package/dist/types/element/src/renderElement.d.ts +4 -7
  39. package/dist/types/element/src/resizeElements.d.ts +10 -10
  40. package/dist/types/element/src/resizeTest.d.ts +6 -5
  41. package/dist/types/element/src/selection.d.ts +10 -10
  42. package/dist/types/element/src/shape.d.ts +9 -8
  43. package/dist/types/element/src/store.d.ts +6 -1
  44. package/dist/types/element/src/textElement.d.ts +2 -2
  45. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  46. package/dist/types/element/src/textWrapping.d.ts +26 -0
  47. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  48. package/dist/types/element/src/transformHandles.d.ts +8 -27
  49. package/dist/types/element/src/typeChecks.d.ts +5 -7
  50. package/dist/types/element/src/types.d.ts +18 -13
  51. package/dist/types/element/src/utils.d.ts +9 -4
  52. package/dist/types/element/src/visualdebug.d.ts +58 -0
  53. package/dist/types/element/src/zindex.d.ts +7 -1
  54. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +137 -174
  55. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  56. package/dist/types/excalidraw/actions/actionBoundText.d.ts +98 -123
  57. package/dist/types/excalidraw/actions/actionCanvas.d.ts +581 -913
  58. package/dist/types/excalidraw/actions/actionClipboard.d.ts +100 -866
  59. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +47 -60
  60. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +157 -198
  61. package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
  62. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  63. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  64. package/dist/types/excalidraw/actions/actionElementLink.d.ts +39 -58
  65. package/dist/types/excalidraw/actions/actionElementLock.d.ts +96 -121
  66. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +48 -61
  67. package/dist/types/excalidraw/actions/actionExport.d.ts +177 -1407
  68. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  69. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  70. package/dist/types/excalidraw/actions/actionFrame.d.ts +288 -374
  71. package/dist/types/excalidraw/actions/actionGroup.d.ts +101 -134
  72. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +158 -208
  73. package/dist/types/excalidraw/actions/actionLink.d.ts +45 -58
  74. package/dist/types/excalidraw/actions/actionMenu.d.ts +38 -423
  75. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  76. package/dist/types/excalidraw/actions/actionProperties.d.ts +164 -2510
  77. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +50 -67
  78. package/dist/types/excalidraw/actions/actionStyles.d.ts +47 -59
  79. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  80. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
  81. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +47 -60
  82. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
  83. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +47 -60
  84. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +36 -55
  85. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  86. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +47 -60
  87. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +47 -60
  88. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +48 -61
  89. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -3
  90. package/dist/types/excalidraw/actions/index.d.ts +5 -2
  91. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  92. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  93. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  94. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  95. package/dist/types/excalidraw/appState.d.ts +24 -15
  96. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  97. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  98. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  99. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  100. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  101. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  102. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  103. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  104. package/dist/types/excalidraw/clipboard.d.ts +57 -19
  105. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  106. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  107. package/dist/types/excalidraw/components/App.d.ts +129 -79
  108. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  109. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  110. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  111. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  112. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  113. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  114. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  115. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
  116. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  117. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  118. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  119. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
  120. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +3 -3
  121. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  122. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  123. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  124. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  125. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  126. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
  127. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  128. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  129. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  130. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  131. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  132. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  133. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  134. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  135. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  136. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  137. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  138. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  139. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  140. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  141. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  142. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  143. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  144. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  145. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  146. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  147. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  148. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  149. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
  150. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  151. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  152. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  153. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  154. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  155. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  156. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
  157. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  158. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  159. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  160. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  161. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  162. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  163. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  164. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  165. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  166. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  167. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  168. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  169. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  170. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  171. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  172. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  173. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  174. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  175. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  176. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  177. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  178. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  179. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  180. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  181. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  182. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  183. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  184. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  185. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  186. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  187. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  188. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  189. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  190. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  191. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  192. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  193. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  194. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  195. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  196. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  197. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  198. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  199. package/dist/types/excalidraw/components/Toast.d.ts +11 -7
  200. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  201. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  202. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +8 -4
  203. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
  204. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  205. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
  206. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
  207. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  208. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
  209. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  210. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  211. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
  212. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  213. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  214. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  215. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  216. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  217. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  218. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
  219. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  220. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  221. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  222. package/dist/types/excalidraw/components/icons.d.ts +51 -21
  223. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
  224. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
  225. package/dist/types/excalidraw/components/shapes.d.ts +209 -1
  226. package/dist/types/excalidraw/data/blob.d.ts +329 -12
  227. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  228. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  229. package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
  230. package/dist/types/excalidraw/data/index.d.ts +4 -5
  231. package/dist/types/excalidraw/data/json.d.ts +171 -4
  232. package/dist/types/excalidraw/data/library.d.ts +25 -10
  233. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  234. package/dist/types/excalidraw/data/restore.d.ts +27 -7
  235. package/dist/types/excalidraw/data/types.d.ts +4 -1
  236. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  237. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  238. package/dist/types/excalidraw/errors.d.ts +14 -0
  239. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
  240. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  241. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  242. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  243. package/dist/types/excalidraw/i18n.d.ts +2 -2
  244. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  245. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  246. package/dist/types/excalidraw/renderer/animation.d.ts +15 -0
  247. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  248. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  249. package/dist/types/excalidraw/scene/Renderer.d.ts +428 -18
  250. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  251. package/dist/types/excalidraw/scene/index.d.ts +1 -1
  252. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  253. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  254. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  255. package/dist/types/excalidraw/snapping.d.ts +5 -5
  256. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  257. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  258. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  259. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  260. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  261. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  262. package/dist/types/excalidraw/types.d.ts +149 -38
  263. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +7 -3
  264. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  265. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  266. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  267. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  268. package/dist/types/laser-pointer/src/state.d.ts +35 -0
  269. package/dist/types/math/src/constants.d.ts +0 -1
  270. package/dist/types/math/src/curve.d.ts +4 -1
  271. package/dist/types/math/src/point.d.ts +8 -2
  272. package/dist/types/math/src/polygon.d.ts +2 -2
  273. package/dist/types/math/src/range.d.ts +1 -3
  274. package/dist/types/math/src/segment.d.ts +4 -3
  275. package/dist/types/math/src/types.d.ts +25 -1
  276. package/dist/types/utils/src/export.d.ts +5 -5
  277. package/dist/types/utils/src/index.d.ts +1 -2
  278. package/dist/types/utils/src/shape.d.ts +6 -6
  279. package/package.json +10 -3
  280. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  281. package/dist/types/excalidraw/charts.d.ts +0 -27
  282. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  283. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
  284. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  285. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
  286. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  287. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
  288. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  289. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  290. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
  291. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  292. package/dist/types/excalidraw/index.d.ts +0 -47
  293. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  294. package/dist/types/utils/src/bbox.d.ts +0 -9
  295. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement, ExcalidrawTextElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
3
2
  import type { AppClassProperties, AppState } from "../types";
4
3
  export declare const actionGroup: {
5
4
  name: "group";
@@ -8,19 +7,15 @@ export declare const actionGroup: {
8
7
  trackEvent: {
9
8
  category: "element";
10
9
  };
11
- perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
10
+ perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
12
11
  appState: Readonly<AppState>;
13
12
  elements: readonly OrderedExcalidrawElement[];
14
13
  captureUpdate: "EVENTUALLY";
15
14
  } | {
16
15
  appState: {
17
- editingGroupId: string | null;
18
- selectedElementIds: Readonly<{
19
- [id: string]: true;
20
- }>;
21
- selectedGroupIds: {
22
- [groupId: string]: boolean;
23
- };
16
+ editingGroupId: AppState["editingGroupId"];
17
+ selectedElementIds: AppState["selectedElementIds"];
18
+ selectedGroupIds: AppState["selectedGroupIds"];
24
19
  contextMenu: {
25
20
  items: import("../components/ContextMenu").ContextMenuItems;
26
21
  top: number;
@@ -28,18 +23,23 @@ export declare const actionGroup: {
28
23
  } | null;
29
24
  showWelcomeScreen: boolean;
30
25
  isLoading: boolean;
31
- errorMessage: import("react").ReactNode;
26
+ errorMessage: React.ReactNode;
32
27
  activeEmbeddable: {
33
28
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
34
- state: "active" | "hover";
29
+ state: "hover" | "active";
35
30
  } | null;
36
31
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
37
32
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
38
33
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
39
34
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
40
35
  isBindingEnabled: boolean;
41
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
42
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
36
+ boxSelectionMode: import("../types").BoxSelectionMode;
37
+ bindingPreference: "enabled" | "disabled";
38
+ isMidpointSnappingEnabled: boolean;
39
+ suggestedBinding: {
40
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
41
+ midPoint?: import("@excalidraw/math").GlobalPoint;
42
+ } | null;
43
43
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
44
44
  frameRendering: {
45
45
  enabled: boolean;
@@ -49,12 +49,16 @@ export declare const actionGroup: {
49
49
  };
50
50
  editingFrame: string | null;
51
51
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
52
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
52
+ editingTextElement: ExcalidrawTextElement | null;
53
53
  activeTool: {
54
54
  lastActiveTool: import("../types").ActiveTool | null;
55
55
  locked: boolean;
56
56
  fromSelection: boolean;
57
57
  } & import("../types").ActiveTool;
58
+ preferredSelectionTool: {
59
+ type: "selection" | "lasso";
60
+ initialized: boolean;
61
+ };
58
62
  penMode: boolean;
59
63
  penDetected: boolean;
60
64
  exportBackground: boolean;
@@ -63,19 +67,20 @@ export declare const actionGroup: {
63
67
  exportScale: number;
64
68
  currentItemStrokeColor: string;
65
69
  currentItemBackgroundColor: string;
66
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
67
- currentItemStrokeWidth: number;
68
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
70
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
71
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
72
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
69
73
  currentItemRoughness: number;
74
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
70
75
  currentItemOpacity: number;
71
- currentItemFontFamily: number;
76
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
72
77
  currentItemFontSize: number;
73
- currentItemTextAlign: string;
78
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
74
79
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
75
80
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
76
- currentHoveredFontFamily: number | null;
81
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
77
82
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
78
- currentItemArrowType: "round" | "sharp" | "elbow";
83
+ currentItemArrowType: "sharp" | "round" | "elbow";
79
84
  viewBackgroundColor: string;
80
85
  scrollX: number;
81
86
  scrollY: number;
@@ -84,26 +89,30 @@ export declare const actionGroup: {
84
89
  name: string | null;
85
90
  isResizing: boolean;
86
91
  isRotating: boolean;
87
- zoom: Readonly<{
88
- value: import("../types").NormalizedZoomValue;
89
- }>;
90
- openMenu: "canvas" | "shape" | null;
91
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
92
+ zoom: import("../types").Zoom;
93
+ openMenu: "canvas" | null;
94
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
92
95
  openSidebar: {
93
- name: string;
94
- tab?: string | undefined;
96
+ name: import("../types").SidebarName;
97
+ tab?: import("../types").SidebarTabName;
95
98
  } | null;
96
- openDialog: {
99
+ openDialog: null | {
97
100
  name: "imageExport" | "help" | "jsonExport";
98
101
  } | {
99
102
  name: "ttd";
100
- tab: "mermaid" | "text-to-diagram";
103
+ tab: "text-to-diagram" | "mermaid";
101
104
  } | {
102
105
  name: "commandPalette";
106
+ } | {
107
+ name: "settings";
103
108
  } | {
104
109
  name: "elementLinkSelector";
105
- sourceElementId: string;
106
- } | null;
110
+ sourceElementId: ExcalidrawElement["id"];
111
+ } | {
112
+ name: "charts";
113
+ data: import("../charts").Spreadsheet;
114
+ rawText: string;
115
+ };
107
116
  defaultSidebarDockedPreference: boolean;
108
117
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
109
118
  hoveredElementIds: Readonly<{
@@ -115,9 +124,9 @@ export declare const actionGroup: {
115
124
  selectedElementsAreBeingDragged: boolean;
116
125
  shouldCacheIgnoreZoom: boolean;
117
126
  toast: {
118
- message: string;
119
- closable?: boolean | undefined;
120
- duration?: number | undefined;
127
+ message: React.ReactNode;
128
+ closable?: boolean;
129
+ duration?: number;
121
130
  } | null;
122
131
  zenModeEnabled: boolean;
123
132
  theme: import("@excalidraw/element/types").Theme;
@@ -129,40 +138,13 @@ export declare const actionGroup: {
129
138
  height: number;
130
139
  offsetTop: number;
131
140
  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
- }>>;
141
+ fileHandle: FileSystemFileHandle | null;
142
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
153
143
  stats: {
154
144
  open: boolean;
155
145
  panels: number;
156
146
  };
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";
147
+ showHyperlinkPopup: false | "info" | "editor";
166
148
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
167
149
  snapLines: readonly import("../snapping").SnapLine[];
168
150
  originSnapOffset: {
@@ -173,15 +155,16 @@ export declare const actionGroup: {
173
155
  userToFollow: import("../types").UserToFollow | null;
174
156
  followedBy: Set<import("../types").SocketId>;
175
157
  isCropping: boolean;
176
- croppingElementId: string | null;
158
+ croppingElementId: ExcalidrawElement["id"] | null;
177
159
  searchMatches: Readonly<{
178
- focusedId: string | null;
160
+ focusedId: ExcalidrawElement["id"] | null;
179
161
  matches: readonly import("../types").SearchMatch[];
180
162
  }> | null;
181
163
  activeLockedId: string | null;
182
164
  lockedMultiSelections: {
183
165
  [groupId: string]: true;
184
166
  };
167
+ bindMode: import("@excalidraw/element/types").BindMode;
185
168
  };
186
169
  elements: OrderedExcalidrawElement[];
187
170
  captureUpdate: "IMMEDIATELY";
@@ -199,19 +182,15 @@ export declare const actionUngroup: {
199
182
  trackEvent: {
200
183
  category: "element";
201
184
  };
202
- perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
185
+ perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
203
186
  appState: Readonly<AppState>;
204
187
  elements: readonly OrderedExcalidrawElement[];
205
188
  captureUpdate: "EVENTUALLY";
206
189
  } | {
207
190
  appState: {
208
- editingGroupId: string | null;
209
- selectedElementIds: Readonly<{
210
- [id: string]: true;
211
- }>;
212
- selectedGroupIds: {
213
- [groupId: string]: boolean;
214
- };
191
+ editingGroupId: AppState["editingGroupId"];
192
+ selectedElementIds: AppState["selectedElementIds"];
193
+ selectedGroupIds: AppState["selectedGroupIds"];
215
194
  contextMenu: {
216
195
  items: import("../components/ContextMenu").ContextMenuItems;
217
196
  top: number;
@@ -219,18 +198,23 @@ export declare const actionUngroup: {
219
198
  } | null;
220
199
  showWelcomeScreen: boolean;
221
200
  isLoading: boolean;
222
- errorMessage: import("react").ReactNode;
201
+ errorMessage: React.ReactNode;
223
202
  activeEmbeddable: {
224
203
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
225
- state: "active" | "hover";
204
+ state: "hover" | "active";
226
205
  } | null;
227
206
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
228
207
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
229
208
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
230
209
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
231
210
  isBindingEnabled: boolean;
232
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
233
- suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
211
+ boxSelectionMode: import("../types").BoxSelectionMode;
212
+ bindingPreference: "enabled" | "disabled";
213
+ isMidpointSnappingEnabled: boolean;
214
+ suggestedBinding: {
215
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
216
+ midPoint?: import("@excalidraw/math").GlobalPoint;
217
+ } | null;
234
218
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
235
219
  frameRendering: {
236
220
  enabled: boolean;
@@ -240,12 +224,16 @@ export declare const actionUngroup: {
240
224
  };
241
225
  editingFrame: string | null;
242
226
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
243
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
227
+ editingTextElement: ExcalidrawTextElement | null;
244
228
  activeTool: {
245
229
  lastActiveTool: import("../types").ActiveTool | null;
246
230
  locked: boolean;
247
231
  fromSelection: boolean;
248
232
  } & import("../types").ActiveTool;
233
+ preferredSelectionTool: {
234
+ type: "selection" | "lasso";
235
+ initialized: boolean;
236
+ };
249
237
  penMode: boolean;
250
238
  penDetected: boolean;
251
239
  exportBackground: boolean;
@@ -254,19 +242,20 @@ export declare const actionUngroup: {
254
242
  exportScale: number;
255
243
  currentItemStrokeColor: string;
256
244
  currentItemBackgroundColor: string;
257
- currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
258
- currentItemStrokeWidth: number;
259
- currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
245
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
246
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
247
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
260
248
  currentItemRoughness: number;
249
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
261
250
  currentItemOpacity: number;
262
- currentItemFontFamily: number;
251
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
263
252
  currentItemFontSize: number;
264
- currentItemTextAlign: string;
253
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
265
254
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
266
255
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
267
- currentHoveredFontFamily: number | null;
256
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
268
257
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
269
- currentItemArrowType: "round" | "sharp" | "elbow";
258
+ currentItemArrowType: "sharp" | "round" | "elbow";
270
259
  viewBackgroundColor: string;
271
260
  scrollX: number;
272
261
  scrollY: number;
@@ -275,26 +264,30 @@ export declare const actionUngroup: {
275
264
  name: string | null;
276
265
  isResizing: boolean;
277
266
  isRotating: boolean;
278
- zoom: Readonly<{
279
- value: import("../types").NormalizedZoomValue;
280
- }>;
281
- openMenu: "canvas" | "shape" | null;
282
- openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
267
+ zoom: import("../types").Zoom;
268
+ openMenu: "canvas" | null;
269
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
283
270
  openSidebar: {
284
- name: string;
285
- tab?: string | undefined;
271
+ name: import("../types").SidebarName;
272
+ tab?: import("../types").SidebarTabName;
286
273
  } | null;
287
- openDialog: {
274
+ openDialog: null | {
288
275
  name: "imageExport" | "help" | "jsonExport";
289
276
  } | {
290
277
  name: "ttd";
291
- tab: "mermaid" | "text-to-diagram";
278
+ tab: "text-to-diagram" | "mermaid";
292
279
  } | {
293
280
  name: "commandPalette";
281
+ } | {
282
+ name: "settings";
294
283
  } | {
295
284
  name: "elementLinkSelector";
296
- sourceElementId: string;
297
- } | null;
285
+ sourceElementId: ExcalidrawElement["id"];
286
+ } | {
287
+ name: "charts";
288
+ data: import("../charts").Spreadsheet;
289
+ rawText: string;
290
+ };
298
291
  defaultSidebarDockedPreference: boolean;
299
292
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
300
293
  hoveredElementIds: Readonly<{
@@ -306,9 +299,9 @@ export declare const actionUngroup: {
306
299
  selectedElementsAreBeingDragged: boolean;
307
300
  shouldCacheIgnoreZoom: boolean;
308
301
  toast: {
309
- message: string;
310
- closable?: boolean | undefined;
311
- duration?: number | undefined;
302
+ message: React.ReactNode;
303
+ closable?: boolean;
304
+ duration?: number;
312
305
  } | null;
313
306
  zenModeEnabled: boolean;
314
307
  theme: import("@excalidraw/element/types").Theme;
@@ -320,40 +313,13 @@ export declare const actionUngroup: {
320
313
  height: number;
321
314
  offsetTop: number;
322
315
  offsetLeft: number;
323
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
324
- collaborators: Map<import("../types").SocketId, Readonly<{
325
- pointer?: import("../types").CollaboratorPointer | undefined;
326
- button?: "up" | "down" | undefined;
327
- selectedElementIds?: Readonly<{
328
- [id: string]: true;
329
- }> | undefined;
330
- username?: string | null | undefined;
331
- userState?: import("@excalidraw/common").UserIdleState | undefined;
332
- color?: {
333
- background: string;
334
- stroke: string;
335
- } | undefined;
336
- avatarUrl?: string | undefined;
337
- id?: string | undefined;
338
- socketId?: import("../types").SocketId | undefined;
339
- isCurrentUser?: boolean | undefined;
340
- isInCall?: boolean | undefined;
341
- isSpeaking?: boolean | undefined;
342
- isMuted?: boolean | undefined;
343
- }>>;
316
+ fileHandle: FileSystemFileHandle | null;
317
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
344
318
  stats: {
345
319
  open: boolean;
346
320
  panels: number;
347
321
  };
348
- currentChartType: import("@excalidraw/element/types").ChartType;
349
- pasteDialog: {
350
- shown: false;
351
- data: null;
352
- } | {
353
- shown: true;
354
- data: import("../charts").Spreadsheet;
355
- };
356
- showHyperlinkPopup: false | "editor" | "info";
322
+ showHyperlinkPopup: false | "info" | "editor";
357
323
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
358
324
  snapLines: readonly import("../snapping").SnapLine[];
359
325
  originSnapOffset: {
@@ -364,15 +330,16 @@ export declare const actionUngroup: {
364
330
  userToFollow: import("../types").UserToFollow | null;
365
331
  followedBy: Set<import("../types").SocketId>;
366
332
  isCropping: boolean;
367
- croppingElementId: string | null;
333
+ croppingElementId: ExcalidrawElement["id"] | null;
368
334
  searchMatches: Readonly<{
369
- focusedId: string | null;
335
+ focusedId: ExcalidrawElement["id"] | null;
370
336
  matches: readonly import("../types").SearchMatch[];
371
337
  }> | null;
372
338
  activeLockedId: string | null;
373
339
  lockedMultiSelections: {
374
340
  [groupId: string]: true;
375
341
  };
342
+ bindMode: import("@excalidraw/element/types").BindMode;
376
343
  };
377
344
  elements: OrderedExcalidrawElement[];
378
345
  captureUpdate: "IMMEDIATELY";