@excalidraw/common 0.18.0-9ba0f5d → 0.18.0-9fbeaed

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 (307) hide show
  1. package/dist/dev/index.js +550 -123
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +3 -3
  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/colors.d.ts +36 -14
  7. package/dist/types/common/src/constants.d.ts +72 -7
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/keys.d.ts +6 -0
  10. package/dist/types/common/src/points.d.ts +1 -1
  11. package/dist/types/common/src/random.d.ts +7 -0
  12. package/dist/types/common/src/utils.d.ts +16 -50
  13. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  14. package/dist/types/element/src/Scene.d.ts +9 -5
  15. package/dist/types/element/src/align.d.ts +5 -2
  16. package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
  17. package/dist/types/element/src/arrowheads.d.ts +3 -0
  18. package/dist/types/element/src/arrows/focus.d.ts +30 -0
  19. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  20. package/dist/types/element/src/binding.d.ts +99 -17
  21. package/dist/types/element/src/bounds.d.ts +32 -9
  22. package/dist/types/element/src/bucketFill.d.ts +110 -0
  23. package/dist/types/element/src/collision.d.ts +20 -3
  24. package/dist/types/element/src/comparisons.d.ts +8 -5
  25. package/dist/types/element/src/convertToShape.d.ts +23 -0
  26. package/dist/types/element/src/cropElement.d.ts +36 -4
  27. package/dist/types/element/src/delta.d.ts +30 -2
  28. package/dist/types/element/src/distribute.d.ts +6 -2
  29. package/dist/types/element/src/dragElements.d.ts +34 -2
  30. package/dist/types/element/src/duplicate.d.ts +64 -3
  31. package/dist/types/element/src/elbowArrow.d.ts +7 -0
  32. package/dist/types/element/src/embeddable.d.ts +3 -2
  33. package/dist/types/element/src/flowchart.d.ts +9 -11
  34. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  35. package/dist/types/element/src/frame.d.ts +30 -11
  36. package/dist/types/element/src/groups.d.ts +10 -15
  37. package/dist/types/element/src/image.d.ts +5 -2
  38. package/dist/types/element/src/index.d.ts +10 -1
  39. package/dist/types/element/src/linearElementEditor.d.ts +36 -11
  40. package/dist/types/element/src/listMarker.d.ts +39 -0
  41. package/dist/types/element/src/mutateElement.d.ts +3 -1
  42. package/dist/types/element/src/newElement.d.ts +55 -3
  43. package/dist/types/element/src/renderElement.d.ts +31 -7
  44. package/dist/types/element/src/renderEnvironment.d.ts +66 -0
  45. package/dist/types/element/src/resizeElements.d.ts +14 -4
  46. package/dist/types/element/src/selection.d.ts +11 -13
  47. package/dist/types/element/src/shape.d.ts +30 -2
  48. package/dist/types/element/src/sizeHelpers.d.ts +6 -0
  49. package/dist/types/element/src/sortElements.d.ts +10 -0
  50. package/dist/types/element/src/stickyNote.d.ts +191 -0
  51. package/dist/types/element/src/textElement.d.ts +23 -11
  52. package/dist/types/element/src/textMeasurements.d.ts +15 -11
  53. package/dist/types/element/src/textWrapping.d.ts +28 -1
  54. package/dist/types/element/src/transform.d.ts +31 -8
  55. package/dist/types/element/src/typeChecks.d.ts +29 -27
  56. package/dist/types/element/src/types.d.ts +48 -9
  57. package/dist/types/element/src/utils.d.ts +19 -6
  58. package/dist/types/element/src/zindex.d.ts +2 -2
  59. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +128 -53
  60. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  61. package/dist/types/excalidraw/actions/actionBoundText.d.ts +87 -213
  62. package/dist/types/excalidraw/actions/actionCanvas.d.ts +420 -1076
  63. package/dist/types/excalidraw/actions/actionClipboard.d.ts +86 -36
  64. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +43 -18
  65. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -513
  66. package/dist/types/excalidraw/actions/actionDeselect.d.ts +183 -0
  67. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  68. package/dist/types/excalidraw/actions/actionElementLink.d.ts +39 -18
  69. package/dist/types/excalidraw/actions/actionElementLock.d.ts +87 -37
  70. package/dist/types/excalidraw/actions/actionExport.d.ts +175 -399
  71. package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
  72. package/dist/types/excalidraw/actions/actionFrame.d.ts +157 -684
  73. package/dist/types/excalidraw/actions/actionGroup.d.ts +102 -52
  74. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +100 -21
  75. package/dist/types/excalidraw/actions/actionLink.d.ts +44 -19
  76. package/dist/types/excalidraw/actions/actionMenu.d.ts +39 -18
  77. package/dist/types/excalidraw/actions/actionProperties.d.ts +122 -56
  78. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +48 -23
  79. package/dist/types/excalidraw/actions/actionStyles.d.ts +44 -18
  80. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +452 -6
  81. package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleArrowBinding.d.ts} +58 -32
  82. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +47 -23
  83. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +196 -0
  84. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
  85. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +44 -19
  86. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +43 -23
  87. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  88. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +198 -0
  89. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +44 -19
  90. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +45 -20
  91. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  92. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +44 -19
  93. package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
  94. package/dist/types/excalidraw/actions/index.d.ts +7 -2
  95. package/dist/types/excalidraw/actions/manager.d.ts +1 -0
  96. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  97. package/dist/types/excalidraw/actions/types.d.ts +8 -4
  98. package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
  99. package/dist/types/excalidraw/appState.d.ts +56 -29
  100. package/dist/types/excalidraw/charts/charts.bar.d.ts +3 -0
  101. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  102. package/dist/types/excalidraw/charts/charts.helpers.d.ts +33 -0
  103. package/dist/types/excalidraw/charts/charts.line.d.ts +3 -0
  104. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  105. package/dist/types/excalidraw/charts/charts.radar.d.ts +3 -0
  106. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  107. package/dist/types/excalidraw/charts/index.d.ts +8 -0
  108. package/dist/types/excalidraw/clipboard.d.ts +8 -9
  109. package/dist/types/excalidraw/components/Actions.d.ts +26 -13
  110. package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
  111. package/dist/types/excalidraw/components/App.arrowText.d.ts +70 -0
  112. package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
  113. package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
  114. package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
  115. package/dist/types/excalidraw/components/App.d.ts +376 -112
  116. package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
  117. package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
  118. package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
  119. package/dist/types/excalidraw/components/App.host.d.ts +102 -0
  120. package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
  121. package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
  122. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  123. package/dist/types/excalidraw/components/App.selectionTool.d.ts +94 -0
  124. package/dist/types/excalidraw/components/App.text.d.ts +197 -0
  125. package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
  126. package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
  127. package/dist/types/excalidraw/components/App.viewport.d.ts +133 -0
  128. package/dist/types/excalidraw/components/App.wheel.d.ts +30 -0
  129. package/dist/types/excalidraw/components/App.wrap.d.ts +39 -0
  130. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  131. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
  132. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
  133. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
  134. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
  135. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
  136. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
  137. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  138. package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
  139. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
  140. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
  141. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  142. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -3
  143. package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
  144. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  145. package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
  146. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
  147. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
  148. package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
  149. package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
  150. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  151. package/dist/types/excalidraw/components/Island.d.ts +7 -0
  152. package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
  153. package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
  154. package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
  155. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
  156. package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
  157. package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
  158. package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
  159. package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
  160. package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
  161. package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
  162. package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
  163. package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
  164. package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
  165. package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
  166. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  167. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  168. package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
  169. package/dist/types/excalidraw/components/Popover.d.ts +1 -3
  170. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  171. package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
  172. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  173. package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
  174. package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
  175. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  176. package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
  177. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
  178. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  179. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
  180. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
  181. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
  182. package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
  183. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
  184. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  185. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  186. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  187. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
  188. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
  189. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  190. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  191. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +8 -2
  192. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
  193. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  194. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +3 -1
  195. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
  196. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
  197. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  198. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +18 -1
  199. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
  200. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  201. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +26 -0
  202. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  203. package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
  204. package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
  205. package/dist/types/excalidraw/components/Tools.d.ts +151 -0
  206. package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
  207. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
  208. package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
  209. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
  210. package/dist/types/excalidraw/components/UserList.d.ts +3 -2
  211. package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
  212. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -2
  213. package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
  214. package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
  215. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  216. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  217. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  218. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  219. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  220. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
  221. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  222. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  223. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  224. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  225. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  226. package/dist/types/excalidraw/components/footer/Footer.d.ts +5 -1
  227. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  228. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +15 -4
  229. package/dist/types/excalidraw/components/icons.d.ts +31 -10
  230. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +27 -3
  231. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  232. package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
  233. package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
  234. package/dist/types/excalidraw/data/blob.d.ts +223 -174
  235. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  236. package/dist/types/excalidraw/data/index.d.ts +9 -10
  237. package/dist/types/excalidraw/data/json.d.ts +120 -87
  238. package/dist/types/excalidraw/data/library.d.ts +1 -1
  239. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  240. package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
  241. package/dist/types/excalidraw/eraser/index.d.ts +2 -3
  242. package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
  243. package/dist/types/excalidraw/history.d.ts +10 -4
  244. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  245. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  246. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
  247. package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
  248. package/dist/types/excalidraw/lasso/index.d.ts +2 -3
  249. package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
  250. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  251. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  252. package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
  253. package/dist/types/excalidraw/renderer/animation.d.ts +15 -4
  254. package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
  255. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
  256. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  257. package/dist/types/excalidraw/scene/Renderer.d.ts +490 -21
  258. package/dist/types/excalidraw/scene/export.d.ts +344 -21
  259. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  260. package/dist/types/excalidraw/scene/types.d.ts +30 -5
  261. package/dist/types/excalidraw/snapping.d.ts +7 -7
  262. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  263. package/dist/types/excalidraw/types.d.ts +702 -44
  264. package/dist/types/excalidraw/viewport.d.ts +303 -0
  265. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +17 -3
  266. package/dist/types/fractional-indexing/src/index.d.ts +29 -0
  267. package/dist/types/laser-pointer/src/index.d.ts +2 -0
  268. package/dist/types/laser-pointer/src/math.d.ts +16 -0
  269. package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
  270. package/dist/types/laser-pointer/src/state.d.ts +36 -0
  271. package/dist/types/math/src/constants.d.ts +0 -1
  272. package/dist/types/math/src/curve.d.ts +23 -13
  273. package/dist/types/math/src/index.d.ts +1 -0
  274. package/dist/types/math/src/pca.d.ts +79 -0
  275. package/dist/types/math/src/point.d.ts +8 -2
  276. package/dist/types/math/src/polygon.d.ts +25 -1
  277. package/dist/types/math/src/segment.d.ts +6 -0
  278. package/dist/types/math/src/types.d.ts +25 -1
  279. package/dist/types/utils/src/index.d.ts +4 -3
  280. package/dist/types/utils/src/shape.d.ts +2 -2
  281. package/package.json +1 -1
  282. package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
  283. package/dist/types/excalidraw/charts.d.ts +0 -27
  284. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  285. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  286. package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
  287. package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
  288. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  289. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
  290. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  291. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  292. package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
  293. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  294. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  295. package/dist/types/excalidraw/components/shapes.d.ts +0 -190
  296. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  297. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  298. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  299. package/dist/types/excalidraw/cursor.d.ts +0 -5
  300. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  301. package/dist/types/excalidraw/index.d.ts +0 -46
  302. package/dist/types/excalidraw/polyfill.d.ts +0 -2
  303. package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
  304. package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
  305. package/dist/types/utils/src/bbox.d.ts +0 -9
  306. package/dist/types/utils/src/export.d.ts +0 -35
  307. package/dist/types/utils/src/withinBounds.d.ts +0 -19
@@ -2,12 +2,11 @@ import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
2
2
  import type { ValueOf } from "@excalidraw/common/utility-types";
3
3
  import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
4
4
  import type { AppState, DataURL, LibraryItem } from "../types";
5
- import type { FileSystemHandle } from "browser-fs-access";
6
5
  import type { ImportedLibraryData } from "./types";
7
6
  export declare const getMimeType: (blob: Blob | string) => string;
8
- export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
7
+ export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
9
8
  export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
10
- export declare const isImageFileHandle: (handle: FileSystemHandle | null) => boolean;
9
+ export declare const isImageFileHandle: (handle: FileSystemFileHandle | null) => handle is FileSystemFileHandle;
11
10
  export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
12
11
  export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
13
12
  type: ValueOf<typeof IMAGE_MIME_TYPES>;
@@ -15,76 +14,28 @@ export declare const isSupportedImageFile: (blob: Blob | null | undefined) => bl
15
14
  export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File,
16
15
  /** @see restore.localAppState */
17
16
  localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
18
- /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
19
- fileHandle?: FileSystemHandle | null) => Promise<{
17
+ /** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
18
+ fileHandle?: FileSystemFileHandle | null) => Promise<{
20
19
  type: "application/vnd.excalidraw+json";
21
20
  data: {
22
21
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
23
22
  appState: {
24
- viewBackgroundColor: string;
25
- theme: import("@excalidraw/element/types").Theme;
26
- frameRendering: {
27
- enabled: boolean;
28
- name: boolean;
29
- outline: boolean;
30
- clip: boolean;
31
- };
32
- name: string | null;
33
23
  zoom: import("../types").Zoom;
34
- scrollX: number;
35
- scrollY: number;
36
24
  viewModeEnabled: boolean;
37
- openDialog: null | {
38
- name: "imageExport" | "help" | "jsonExport";
39
- } | {
40
- name: "ttd";
41
- tab: "text-to-diagram" | "mermaid";
42
- } | {
43
- name: "commandPalette";
44
- } | {
45
- name: "settings";
46
- } | {
47
- name: "elementLinkSelector";
48
- sourceElementId: ExcalidrawElement["id"];
49
- };
50
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
51
- selectedElementIds: Readonly<{
52
- [id: string]: true;
53
- }>;
54
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
55
- activeEmbeddable: {
56
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
57
- state: "hover" | "active";
58
- } | null;
59
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
60
- selectedGroupIds: {
61
- [groupId: string]: boolean;
62
- };
63
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
64
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
65
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
66
- isBindingEnabled: boolean;
67
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
68
- isRotating: boolean;
69
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
70
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
71
- snapLines: readonly import("../snapping").SnapLine[];
25
+ activeTool: {
26
+ lastActiveTool: import("../types").ActiveTool | null;
27
+ locked: boolean;
28
+ fromSelection: boolean;
29
+ } & import("../types").ActiveTool;
72
30
  zenModeEnabled: boolean;
73
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
74
- isCropping: boolean;
75
- croppingElementId: ExcalidrawElement["id"] | null;
76
- searchMatches: Readonly<{
77
- focusedId: ExcalidrawElement["id"] | null;
78
- matches: readonly import("../types").SearchMatch[];
79
- }> | null;
80
- activeLockedId: string | null;
81
- hoveredElementIds: Readonly<{
82
- [id: string]: true;
83
- }>;
84
- shouldCacheIgnoreZoom: boolean;
85
- exportScale: number;
86
- bindMode: import("@excalidraw/element/types").BindMode;
31
+ gridModeEnabled: boolean;
32
+ objectsSnapModeEnabled: boolean;
33
+ theme: import("@excalidraw/element/types").Theme;
34
+ name: string | null;
35
+ currentItemArrowType: "sharp" | "round" | "elbow";
87
36
  gridSize: number;
37
+ scrollX: number;
38
+ scrollY: number;
88
39
  contextMenu: {
89
40
  items: import("../components/ContextMenu").ContextMenuItems;
90
41
  top: number;
@@ -93,14 +44,45 @@ fileHandle?: FileSystemHandle | null) => Promise<{
93
44
  showWelcomeScreen: boolean;
94
45
  isLoading: boolean;
95
46
  errorMessage: React.ReactNode;
47
+ activeEmbeddable: {
48
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
49
+ state: "hover" | "active";
50
+ } | null;
51
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
96
52
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
97
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
98
- editingFrame: string | null;
99
- activeTool: {
100
- lastActiveTool: import("../types").ActiveTool | null;
101
- locked: boolean;
102
- fromSelection: boolean;
103
- } & import("../types").ActiveTool;
53
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
54
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
55
+ isBindingEnabled: boolean;
56
+ boxSelectionMode: import("../types").BoxSelectionMode;
57
+ bindingPreference: "enabled" | "disabled";
58
+ isMidpointSnappingEnabled: boolean;
59
+ showHints: boolean;
60
+ inputDevice: import("../types").InputDevice;
61
+ suggestedBinding: {
62
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
63
+ midPoint?: import("@excalidraw/math").GlobalPoint;
64
+ } | null;
65
+ textToolHover: {
66
+ type: "text";
67
+ elementId: ExcalidrawElement["id"];
68
+ } | {
69
+ type: "container";
70
+ elementId: ExcalidrawElement["id"];
71
+ } | {
72
+ type: "arrow";
73
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
74
+ anchor: "start" | "end" | "label";
75
+ } | null;
76
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
77
+ frameRendering: {
78
+ enabled: boolean;
79
+ name: boolean;
80
+ outline: boolean;
81
+ clip: boolean;
82
+ };
83
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
84
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
85
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
104
86
  preferredSelectionTool: {
105
87
  type: "selection" | "lasso";
106
88
  initialized: boolean;
@@ -110,12 +92,16 @@ fileHandle?: FileSystemHandle | null) => Promise<{
110
92
  exportBackground: boolean;
111
93
  exportEmbedScene: boolean;
112
94
  exportWithDarkMode: boolean;
95
+ exportScale: number;
113
96
  currentItemStrokeColor: string;
97
+ currentItemStickynoteStrokeColor: string;
98
+ currentItemStickynoteBackgroundColor: string;
114
99
  currentItemBackgroundColor: string;
115
100
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
116
- currentItemStrokeWidth: number;
101
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
117
102
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
118
103
  currentItemRoughness: number;
104
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
119
105
  currentItemOpacity: number;
120
106
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
121
107
  currentItemFontSize: number;
@@ -124,53 +110,91 @@ fileHandle?: FileSystemHandle | null) => Promise<{
124
110
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
125
111
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
126
112
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
127
- currentItemArrowType: "sharp" | "round" | "elbow";
113
+ viewBackgroundColor: string;
114
+ scrollConstraints: import("../types").ScrollConstraints | null;
128
115
  cursorButton: "up" | "down";
129
116
  scrolledOutside: boolean;
130
117
  isResizing: boolean;
118
+ isRotating: boolean;
131
119
  openMenu: "canvas" | null;
132
120
  openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
133
121
  openSidebar: {
134
122
  name: import("../types").SidebarName;
135
123
  tab?: import("../types").SidebarTabName;
136
124
  } | null;
125
+ openDialog: null | {
126
+ name: "imageExport" | "help" | "jsonExport";
127
+ } | {
128
+ name: "ttd";
129
+ tab: "text-to-diagram" | "mermaid";
130
+ } | {
131
+ name: "commandPalette";
132
+ } | {
133
+ name: "settings";
134
+ } | {
135
+ name: "elementLinkSelector";
136
+ sourceElementId: ExcalidrawElement["id"];
137
+ } | {
138
+ name: "charts";
139
+ data: import("../charts").Spreadsheet;
140
+ rawText: string;
141
+ };
137
142
  defaultSidebarDockedPreference: boolean;
138
143
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
144
+ selectedElementIds: Readonly<{
145
+ [id: string]: true;
146
+ }>;
147
+ hoveredElementIds: Readonly<{
148
+ [id: string]: true;
149
+ }>;
139
150
  previousSelectedElementIds: {
140
151
  [id: string]: true;
141
152
  };
142
153
  selectedElementsAreBeingDragged: boolean;
154
+ shouldCacheIgnoreZoom: boolean;
143
155
  toast: {
144
- message: string;
156
+ message: React.ReactNode;
145
157
  closable?: boolean;
146
158
  duration?: number;
147
159
  } | null;
160
+ minimapEnabled: boolean;
148
161
  gridStep: number;
149
- gridModeEnabled: boolean;
150
- fileHandle: FileSystemHandle | null;
162
+ selectedGroupIds: {
163
+ [groupId: string]: boolean;
164
+ };
165
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
166
+ fileHandle: FileSystemFileHandle | null;
167
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
151
168
  stats: {
152
169
  open: boolean;
153
170
  panels: number;
154
171
  };
155
- currentChartType: import("@excalidraw/element/types").ChartType;
156
- pasteDialog: {
157
- shown: false;
158
- data: null;
159
- } | {
160
- shown: true;
161
- data: import("../charts").Spreadsheet;
162
- };
163
172
  showHyperlinkPopup: false | "info" | "editor";
173
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
174
+ snapLines: readonly import("../snapping").SnapLine[];
164
175
  originSnapOffset: {
165
176
  x: number;
166
177
  y: number;
167
178
  } | null;
168
- objectsSnapModeEnabled: boolean;
169
- userToFollow: import("../types").UserToFollow | null;
170
- followedBy: Set<import("../types").SocketId>;
179
+ isCropping: boolean;
180
+ croppingElementId: ExcalidrawElement["id"] | null;
181
+ searchMatches: Readonly<{
182
+ focusedId: ExcalidrawElement["id"] | null;
183
+ matches: readonly import("../types").SearchMatch[];
184
+ }> | null;
185
+ activeLockedId: string | null;
171
186
  lockedMultiSelections: {
172
187
  [groupId: string]: true;
173
188
  };
189
+ bindMode: import("@excalidraw/element/types").BindMode;
190
+ colorTopPicks: {
191
+ elementStroke: readonly string[] | null;
192
+ elementBackground: readonly string[] | null;
193
+ bucketFill: readonly string[] | null;
194
+ stickyNoteStroke: readonly string[] | null;
195
+ stickyNoteBackground: readonly string[] | null;
196
+ };
197
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
174
198
  };
175
199
  files: import("../types").BinaryFiles;
176
200
  };
@@ -181,74 +205,26 @@ fileHandle?: FileSystemHandle | null) => Promise<{
181
205
  export declare const loadFromBlob: (blob: Blob,
182
206
  /** @see restore.localAppState */
183
207
  localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
184
- /** FileSystemHandle. Defaults to `blob.handle` if defined, otherwise null. */
185
- fileHandle?: FileSystemHandle | null) => Promise<{
208
+ /** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
209
+ fileHandle?: FileSystemFileHandle | null) => Promise<{
186
210
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
187
211
  appState: {
188
- viewBackgroundColor: string;
189
- theme: import("@excalidraw/element/types").Theme;
190
- frameRendering: {
191
- enabled: boolean;
192
- name: boolean;
193
- outline: boolean;
194
- clip: boolean;
195
- };
196
- name: string | null;
197
212
  zoom: import("../types").Zoom;
198
- scrollX: number;
199
- scrollY: number;
200
213
  viewModeEnabled: boolean;
201
- openDialog: null | {
202
- name: "imageExport" | "help" | "jsonExport";
203
- } | {
204
- name: "ttd";
205
- tab: "text-to-diagram" | "mermaid";
206
- } | {
207
- name: "commandPalette";
208
- } | {
209
- name: "settings";
210
- } | {
211
- name: "elementLinkSelector";
212
- sourceElementId: ExcalidrawElement["id"];
213
- };
214
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
215
- selectedElementIds: Readonly<{
216
- [id: string]: true;
217
- }>;
218
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
219
- activeEmbeddable: {
220
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
221
- state: "hover" | "active";
222
- } | null;
223
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
224
- selectedGroupIds: {
225
- [groupId: string]: boolean;
226
- };
227
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
228
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
229
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
230
- isBindingEnabled: boolean;
231
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
232
- isRotating: boolean;
233
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
234
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
235
- snapLines: readonly import("../snapping").SnapLine[];
214
+ activeTool: {
215
+ lastActiveTool: import("../types").ActiveTool | null;
216
+ locked: boolean;
217
+ fromSelection: boolean;
218
+ } & import("../types").ActiveTool;
236
219
  zenModeEnabled: boolean;
237
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
238
- isCropping: boolean;
239
- croppingElementId: ExcalidrawElement["id"] | null;
240
- searchMatches: Readonly<{
241
- focusedId: ExcalidrawElement["id"] | null;
242
- matches: readonly import("../types").SearchMatch[];
243
- }> | null;
244
- activeLockedId: string | null;
245
- hoveredElementIds: Readonly<{
246
- [id: string]: true;
247
- }>;
248
- shouldCacheIgnoreZoom: boolean;
249
- exportScale: number;
250
- bindMode: import("@excalidraw/element/types").BindMode;
220
+ gridModeEnabled: boolean;
221
+ objectsSnapModeEnabled: boolean;
222
+ theme: import("@excalidraw/element/types").Theme;
223
+ name: string | null;
224
+ currentItemArrowType: "sharp" | "round" | "elbow";
251
225
  gridSize: number;
226
+ scrollX: number;
227
+ scrollY: number;
252
228
  contextMenu: {
253
229
  items: import("../components/ContextMenu").ContextMenuItems;
254
230
  top: number;
@@ -257,14 +233,45 @@ fileHandle?: FileSystemHandle | null) => Promise<{
257
233
  showWelcomeScreen: boolean;
258
234
  isLoading: boolean;
259
235
  errorMessage: React.ReactNode;
236
+ activeEmbeddable: {
237
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
238
+ state: "hover" | "active";
239
+ } | null;
240
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
260
241
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
261
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
262
- editingFrame: string | null;
263
- activeTool: {
264
- lastActiveTool: import("../types").ActiveTool | null;
265
- locked: boolean;
266
- fromSelection: boolean;
267
- } & import("../types").ActiveTool;
242
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
243
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
244
+ isBindingEnabled: boolean;
245
+ boxSelectionMode: import("../types").BoxSelectionMode;
246
+ bindingPreference: "enabled" | "disabled";
247
+ isMidpointSnappingEnabled: boolean;
248
+ showHints: boolean;
249
+ inputDevice: import("../types").InputDevice;
250
+ suggestedBinding: {
251
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
252
+ midPoint?: import("@excalidraw/math").GlobalPoint;
253
+ } | null;
254
+ textToolHover: {
255
+ type: "text";
256
+ elementId: ExcalidrawElement["id"];
257
+ } | {
258
+ type: "container";
259
+ elementId: ExcalidrawElement["id"];
260
+ } | {
261
+ type: "arrow";
262
+ elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
263
+ anchor: "start" | "end" | "label";
264
+ } | null;
265
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
266
+ frameRendering: {
267
+ enabled: boolean;
268
+ name: boolean;
269
+ outline: boolean;
270
+ clip: boolean;
271
+ };
272
+ editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
273
+ elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
274
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
268
275
  preferredSelectionTool: {
269
276
  type: "selection" | "lasso";
270
277
  initialized: boolean;
@@ -274,12 +281,16 @@ fileHandle?: FileSystemHandle | null) => Promise<{
274
281
  exportBackground: boolean;
275
282
  exportEmbedScene: boolean;
276
283
  exportWithDarkMode: boolean;
284
+ exportScale: number;
277
285
  currentItemStrokeColor: string;
286
+ currentItemStickynoteStrokeColor: string;
287
+ currentItemStickynoteBackgroundColor: string;
278
288
  currentItemBackgroundColor: string;
279
289
  currentItemFillStyle: ExcalidrawElement["fillStyle"];
280
- currentItemStrokeWidth: number;
290
+ currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
281
291
  currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
282
292
  currentItemRoughness: number;
293
+ currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
283
294
  currentItemOpacity: number;
284
295
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
285
296
  currentItemFontSize: number;
@@ -288,53 +299,91 @@ fileHandle?: FileSystemHandle | null) => Promise<{
288
299
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
289
300
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
290
301
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
291
- currentItemArrowType: "sharp" | "round" | "elbow";
302
+ viewBackgroundColor: string;
303
+ scrollConstraints: import("../types").ScrollConstraints | null;
292
304
  cursorButton: "up" | "down";
293
305
  scrolledOutside: boolean;
294
306
  isResizing: boolean;
307
+ isRotating: boolean;
295
308
  openMenu: "canvas" | null;
296
309
  openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
297
310
  openSidebar: {
298
311
  name: import("../types").SidebarName;
299
312
  tab?: import("../types").SidebarTabName;
300
313
  } | null;
314
+ openDialog: null | {
315
+ name: "imageExport" | "help" | "jsonExport";
316
+ } | {
317
+ name: "ttd";
318
+ tab: "text-to-diagram" | "mermaid";
319
+ } | {
320
+ name: "commandPalette";
321
+ } | {
322
+ name: "settings";
323
+ } | {
324
+ name: "elementLinkSelector";
325
+ sourceElementId: ExcalidrawElement["id"];
326
+ } | {
327
+ name: "charts";
328
+ data: import("../charts").Spreadsheet;
329
+ rawText: string;
330
+ };
301
331
  defaultSidebarDockedPreference: boolean;
302
332
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
333
+ selectedElementIds: Readonly<{
334
+ [id: string]: true;
335
+ }>;
336
+ hoveredElementIds: Readonly<{
337
+ [id: string]: true;
338
+ }>;
303
339
  previousSelectedElementIds: {
304
340
  [id: string]: true;
305
341
  };
306
342
  selectedElementsAreBeingDragged: boolean;
343
+ shouldCacheIgnoreZoom: boolean;
307
344
  toast: {
308
- message: string;
345
+ message: React.ReactNode;
309
346
  closable?: boolean;
310
347
  duration?: number;
311
348
  } | null;
349
+ minimapEnabled: boolean;
312
350
  gridStep: number;
313
- gridModeEnabled: boolean;
314
- fileHandle: FileSystemHandle | null;
351
+ selectedGroupIds: {
352
+ [groupId: string]: boolean;
353
+ };
354
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
355
+ fileHandle: FileSystemFileHandle | null;
356
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
315
357
  stats: {
316
358
  open: boolean;
317
359
  panels: number;
318
360
  };
319
- currentChartType: import("@excalidraw/element/types").ChartType;
320
- pasteDialog: {
321
- shown: false;
322
- data: null;
323
- } | {
324
- shown: true;
325
- data: import("../charts").Spreadsheet;
326
- };
327
361
  showHyperlinkPopup: false | "info" | "editor";
362
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
363
+ snapLines: readonly import("../snapping").SnapLine[];
328
364
  originSnapOffset: {
329
365
  x: number;
330
366
  y: number;
331
367
  } | null;
332
- objectsSnapModeEnabled: boolean;
333
- userToFollow: import("../types").UserToFollow | null;
334
- followedBy: Set<import("../types").SocketId>;
368
+ isCropping: boolean;
369
+ croppingElementId: ExcalidrawElement["id"] | null;
370
+ searchMatches: Readonly<{
371
+ focusedId: ExcalidrawElement["id"] | null;
372
+ matches: readonly import("../types").SearchMatch[];
373
+ }> | null;
374
+ activeLockedId: string | null;
335
375
  lockedMultiSelections: {
336
376
  [groupId: string]: true;
337
377
  };
378
+ bindMode: import("@excalidraw/element/types").BindMode;
379
+ colorTopPicks: {
380
+ elementStroke: readonly string[] | null;
381
+ elementBackground: readonly string[] | null;
382
+ bucketFill: readonly string[] | null;
383
+ stickyNoteStroke: readonly string[] | null;
384
+ stickyNoteBackground: readonly string[] | null;
385
+ };
386
+ fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
338
387
  };
339
388
  files: import("../types").BinaryFiles;
340
389
  }>;
@@ -358,7 +407,7 @@ export declare const SVGStringToFile: (SVGString: string, filename?: string) =>
358
407
  type: typeof MIME_TYPES.svg;
359
408
  };
360
409
  export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
361
- export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemHandle | null>;
410
+ export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemFileHandle | null>;
362
411
  export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
363
412
  /** attempts to detect correct mimeType if none is set, or if an image
364
413
  * has an incorrect extension.
@@ -1,6 +1,5 @@
1
1
  import { supported as nativeFileSystemSupported } from "browser-fs-access";
2
2
  import { MIME_TYPES } from "@excalidraw/common";
3
- import type { FileSystemHandle } from "browser-fs-access";
4
3
  type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
5
4
  export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
6
5
  extensions?: FILE_EXTENSION[];
@@ -14,8 +13,7 @@ export declare const fileSave: (blob: Blob | Promise<Blob>, opts: {
14
13
  extension: FILE_EXTENSION;
15
14
  mimeTypes?: string[];
16
15
  description: string;
17
- /** existing FileSystemHandle */
18
- fileHandle?: FileSystemHandle | null;
19
- }) => Promise<FileSystemHandle | null>;
16
+ /** existing FileSystemFileHandle */
17
+ fileHandle?: FileSystemFileHandle | null;
18
+ }) => Promise<FileSystemFileHandle | null>;
20
19
  export { nativeFileSystemSupported };
21
- export type { FileSystemHandle };
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { FileSystemHandle } from "./filesystem";
1
+ import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
+ import type { RenderEnvironment } from "@excalidraw/element";
3
3
  import type { ExportType } from "../scene/types";
4
4
  import type { AppState, BinaryFiles } from "../types";
5
5
  export { loadFromBlob } from "./blob";
@@ -7,16 +7,15 @@ export { loadFromJSON, saveAsJSON } from "./json";
7
7
  export type ExportedElements = readonly NonDeletedExcalidrawElement[] & {
8
8
  _brand: "exportedElements";
9
9
  };
10
- export declare const prepareElementsForExport: (elements: readonly ExcalidrawElement[], { selectedElementIds }: Pick<AppState, "selectedElementIds">, exportSelectionOnly: boolean) => {
11
- exportingFrame: ExcalidrawFrameLikeElement | null;
10
+ export declare const prepareElementsForExport: (allElements: readonly ExcalidrawElement[], { selectedElementIds }: Pick<AppState, "selectedElementIds">, exportSelectionOnly: boolean) => {
11
+ exportingFrame: NonDeleted<ExcalidrawFrameLikeElement> | null;
12
12
  exportedElements: ExportedElements;
13
13
  };
14
- export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements: ExportedElements, appState: AppState, files: BinaryFiles, { exportBackground, exportPadding, viewBackgroundColor, name, fileHandle, exportingFrame, }: {
15
- exportBackground: boolean;
14
+ export declare const exportCanvas: (type: Omit<ExportType, "backend">, elements: ExportedElements, appState: AppState, files: BinaryFiles, { exportPadding, name, fileHandle, exportingFrame, renderEnvironment, }: {
16
15
  exportPadding?: number;
17
- viewBackgroundColor: string;
18
16
  /** filename, if applicable */
19
17
  name?: string;
20
- fileHandle?: FileSystemHandle | null;
21
- exportingFrame: ExcalidrawFrameLikeElement | null;
22
- }) => Promise<FileSystemHandle | null | undefined>;
18
+ fileHandle?: FileSystemFileHandle | null;
19
+ exportingFrame: NonDeleted<ExcalidrawFrameLikeElement> | null;
20
+ renderEnvironment?: RenderEnvironment;
21
+ }) => Promise<FileSystemFileHandle | null | undefined>;