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

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