@excalidraw/excalidraw 0.17.1-88812e0 → 0.17.1-96eeec5

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 (316) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/browser/dev/excalidraw-assets-dev/{chunk-47LVF2XL.js → chunk-DEYXWPUO.js} +4933 -1520
  3. package/dist/browser/dev/excalidraw-assets-dev/chunk-DEYXWPUO.js.map +7 -0
  4. package/dist/browser/dev/excalidraw-assets-dev/{chunk-XOM7LNOU.js → chunk-EM6LVGFW.js} +27 -4
  5. package/dist/browser/dev/excalidraw-assets-dev/chunk-EM6LVGFW.js.map +7 -0
  6. package/dist/browser/dev/excalidraw-assets-dev/{dist-ITJNUBZF.js → dist-6QVAH5JA.js} +36 -14
  7. package/dist/browser/dev/excalidraw-assets-dev/dist-6QVAH5JA.js.map +7 -0
  8. package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js → en-AZFA5HJJ.js} +4 -2
  9. package/dist/browser/dev/excalidraw-assets-dev/{image-LHMGJWTI.js → image-5XCR4WHS.js} +2 -2
  10. package/dist/browser/dev/index.css +157 -62
  11. package/dist/browser/dev/index.css.map +3 -3
  12. package/dist/browser/dev/index.js +12016 -7663
  13. package/dist/browser/dev/index.js.map +4 -4
  14. package/dist/browser/prod/excalidraw-assets/{chunk-5SYIAZGL.js → chunk-7DXALCB2.js} +5 -5
  15. package/dist/browser/prod/excalidraw-assets/chunk-ODWTVSS7.js +68 -0
  16. package/dist/browser/prod/excalidraw-assets/dist-567JAXHK.js +7 -0
  17. package/dist/browser/prod/excalidraw-assets/en-6E7MYLWO.js +1 -0
  18. package/dist/browser/prod/excalidraw-assets/image-LQAMCFQI.js +1 -0
  19. package/dist/browser/prod/index.css +1 -1
  20. package/dist/browser/prod/index.js +69 -51
  21. package/dist/dev/{en-XW4JO6VX.json → en-EB2MBPAV.json} +24 -3
  22. package/dist/dev/index.css +157 -62
  23. package/dist/dev/index.css.map +3 -3
  24. package/dist/dev/index.js +18250 -16114
  25. package/dist/dev/index.js.map +4 -4
  26. package/dist/excalidraw/actions/actionAddToLibrary.d.ts +15 -6
  27. package/dist/excalidraw/actions/actionAlign.d.ts +8 -8
  28. package/dist/excalidraw/actions/actionBoundText.d.ts +14 -8
  29. package/dist/excalidraw/actions/actionBoundText.js +3 -1
  30. package/dist/excalidraw/actions/actionCanvas.d.ts +64 -28
  31. package/dist/excalidraw/actions/actionCanvas.js +1 -1
  32. package/dist/excalidraw/actions/actionClipboard.d.ts +40 -19
  33. package/dist/excalidraw/actions/actionDeleteSelected.d.ts +17 -8
  34. package/dist/excalidraw/actions/actionDistribute.d.ts +4 -4
  35. package/dist/excalidraw/actions/actionDuplicateSelection.d.ts +3 -3
  36. package/dist/excalidraw/actions/actionElementLock.d.ts +11 -5
  37. package/dist/excalidraw/actions/actionExport.d.ts +48 -21
  38. package/dist/excalidraw/actions/actionFinalize.d.ts +11 -5
  39. package/dist/excalidraw/actions/actionFinalize.js +1 -1
  40. package/dist/excalidraw/actions/actionFlip.d.ts +4 -4
  41. package/dist/excalidraw/actions/actionFlip.js +5 -6
  42. package/dist/excalidraw/actions/actionFrame.d.ts +328 -8
  43. package/dist/excalidraw/actions/actionGroup.d.ts +320 -4
  44. package/dist/excalidraw/actions/actionHistory.d.ts +3 -3
  45. package/dist/excalidraw/actions/actionHistory.js +4 -4
  46. package/dist/excalidraw/actions/actionLinearEditor.d.ts +9 -4
  47. package/dist/excalidraw/actions/actionLinearEditor.js +19 -4
  48. package/dist/excalidraw/actions/actionLink.d.ts +5 -2
  49. package/dist/excalidraw/actions/actionMenu.d.ts +15 -6
  50. package/dist/excalidraw/actions/actionNavigate.d.ts +11 -5
  51. package/dist/excalidraw/actions/actionProperties.d.ts +67 -28
  52. package/dist/excalidraw/actions/actionProperties.js +1 -1
  53. package/dist/excalidraw/actions/actionSelectAll.d.ts +6 -3
  54. package/dist/excalidraw/actions/actionStyles.d.ts +9 -3
  55. package/dist/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
  56. package/dist/excalidraw/actions/actionTextAutoResize.js +38 -0
  57. package/dist/excalidraw/actions/actionToggleGridMode.d.ts +6 -3
  58. package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
  59. package/dist/excalidraw/actions/actionToggleStats.d.ts +6 -2
  60. package/dist/excalidraw/actions/actionToggleStats.js +4 -3
  61. package/dist/excalidraw/actions/actionToggleViewMode.d.ts +5 -2
  62. package/dist/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
  63. package/dist/excalidraw/actions/actionZindex.d.ts +8 -4
  64. package/dist/excalidraw/actions/actionZindex.js +4 -0
  65. package/dist/excalidraw/actions/manager.d.ts +3 -3
  66. package/dist/excalidraw/actions/register.d.ts +1 -1
  67. package/dist/excalidraw/actions/shortcuts.d.ts +2 -2
  68. package/dist/excalidraw/actions/types.d.ts +6 -6
  69. package/dist/excalidraw/align.d.ts +1 -1
  70. package/dist/excalidraw/animated-trail.d.ts +2 -2
  71. package/dist/excalidraw/appState.d.ts +5 -2
  72. package/dist/excalidraw/appState.js +6 -3
  73. package/dist/excalidraw/change.d.ts +4 -4
  74. package/dist/excalidraw/change.js +14 -7
  75. package/dist/excalidraw/charts.d.ts +1 -1
  76. package/dist/excalidraw/clients.d.ts +2 -2
  77. package/dist/excalidraw/clients.js +1 -1
  78. package/dist/excalidraw/clipboard.d.ts +3 -3
  79. package/dist/excalidraw/colors.d.ts +1 -1
  80. package/dist/excalidraw/components/Actions.d.ts +3 -3
  81. package/dist/excalidraw/components/Actions.js +9 -6
  82. package/dist/excalidraw/components/App.d.ts +10 -16
  83. package/dist/excalidraw/components/App.js +190 -142
  84. package/dist/excalidraw/components/ButtonIconSelect.js +1 -1
  85. package/dist/excalidraw/components/CheckboxItem.js +1 -1
  86. package/dist/excalidraw/components/ColorPicker/ColorInput.d.ts +1 -1
  87. package/dist/excalidraw/components/ColorPicker/ColorInput.js +1 -1
  88. package/dist/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
  89. package/dist/excalidraw/components/ColorPicker/ColorPicker.js +1 -1
  90. package/dist/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
  91. package/dist/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
  92. package/dist/excalidraw/components/ColorPicker/PickerHeading.d.ts +1 -1
  93. package/dist/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
  94. package/dist/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  95. package/dist/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
  96. package/dist/excalidraw/components/ColorPicker/colorPickerUtils.js +1 -1
  97. package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  98. package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.js +1 -1
  99. package/dist/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  100. package/dist/excalidraw/components/CommandPalette/CommandPalette.js +5 -5
  101. package/dist/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -1
  102. package/dist/excalidraw/components/CommandPalette/types.d.ts +3 -3
  103. package/dist/excalidraw/components/ConfirmDialog.d.ts +1 -1
  104. package/dist/excalidraw/components/ContextMenu.d.ts +2 -2
  105. package/dist/excalidraw/components/ContextMenu.js +2 -2
  106. package/dist/excalidraw/components/DarkModeToggle.d.ts +1 -1
  107. package/dist/excalidraw/components/DefaultSidebar.d.ts +2 -2
  108. package/dist/excalidraw/components/Dialog.js +1 -1
  109. package/dist/excalidraw/components/DialogActionButton.d.ts +1 -1
  110. package/dist/excalidraw/components/EyeDropper.d.ts +2 -2
  111. package/dist/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  112. package/dist/excalidraw/components/FollowMode/FollowMode.js +1 -1
  113. package/dist/excalidraw/components/HelpDialog.js +1 -1
  114. package/dist/excalidraw/components/HintViewer.d.ts +1 -1
  115. package/dist/excalidraw/components/IconPicker.js +2 -2
  116. package/dist/excalidraw/components/ImageExportDialog.d.ts +1 -1
  117. package/dist/excalidraw/components/InitializeApp.d.ts +2 -2
  118. package/dist/excalidraw/components/JSONExportDialog.d.ts +3 -3
  119. package/dist/excalidraw/components/LayerUI.d.ts +4 -4
  120. package/dist/excalidraw/components/LayerUI.js +10 -7
  121. package/dist/excalidraw/components/LibraryMenu.d.ts +2 -2
  122. package/dist/excalidraw/components/LibraryMenuBrowseButton.d.ts +1 -1
  123. package/dist/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  124. package/dist/excalidraw/components/LibraryMenuHeaderContent.d.ts +2 -2
  125. package/dist/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  126. package/dist/excalidraw/components/LibraryMenuSection.d.ts +5 -4
  127. package/dist/excalidraw/components/LibraryUnit.d.ts +2 -2
  128. package/dist/excalidraw/components/LoadingMessage.d.ts +1 -1
  129. package/dist/excalidraw/components/MagicSettings.js +2 -2
  130. package/dist/excalidraw/components/MobileMenu.d.ts +3 -3
  131. package/dist/excalidraw/components/MobileMenu.js +2 -6
  132. package/dist/excalidraw/components/Modal.d.ts +1 -1
  133. package/dist/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  134. package/dist/excalidraw/components/PasteChartDialog.d.ts +1 -1
  135. package/dist/excalidraw/components/PasteChartDialog.js +1 -1
  136. package/dist/excalidraw/components/PublishLibrary.d.ts +1 -1
  137. package/dist/excalidraw/components/SVGLayer.d.ts +1 -1
  138. package/dist/excalidraw/components/Sidebar/Sidebar.js +1 -1
  139. package/dist/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -1
  140. package/dist/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -1
  141. package/dist/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  142. package/dist/excalidraw/components/Sidebar/common.d.ts +1 -1
  143. package/dist/excalidraw/components/Stats/Angle.d.ts +12 -0
  144. package/dist/excalidraw/components/Stats/Angle.js +52 -0
  145. package/dist/excalidraw/components/Stats/Collapsible.d.ts +9 -0
  146. package/dist/excalidraw/components/Stats/Collapsible.js +12 -0
  147. package/dist/excalidraw/components/Stats/Dimension.d.ts +12 -0
  148. package/dist/excalidraw/components/Stats/Dimension.js +67 -0
  149. package/dist/excalidraw/components/Stats/DragInput.d.ts +32 -0
  150. package/dist/excalidraw/components/Stats/DragInput.js +174 -0
  151. package/dist/excalidraw/components/Stats/FontSize.d.ts +12 -0
  152. package/dist/excalidraw/components/Stats/FontSize.js +50 -0
  153. package/dist/excalidraw/components/Stats/MultiAngle.d.ts +12 -0
  154. package/dist/excalidraw/components/Stats/MultiAngle.js +66 -0
  155. package/dist/excalidraw/components/Stats/MultiDimension.d.ts +15 -0
  156. package/dist/excalidraw/components/Stats/MultiDimension.js +197 -0
  157. package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +13 -0
  158. package/dist/excalidraw/components/Stats/MultiFontSize.js +72 -0
  159. package/dist/excalidraw/components/Stats/MultiPosition.d.ts +15 -0
  160. package/dist/excalidraw/components/Stats/MultiPosition.js +100 -0
  161. package/dist/excalidraw/components/Stats/Position.d.ts +13 -0
  162. package/dist/excalidraw/components/Stats/Position.js +39 -0
  163. package/dist/excalidraw/components/Stats/index.d.ts +16 -0
  164. package/dist/excalidraw/components/Stats/index.js +78 -0
  165. package/dist/excalidraw/components/Stats/utils.d.ts +25 -0
  166. package/dist/excalidraw/components/Stats/utils.js +158 -0
  167. package/dist/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
  168. package/dist/excalidraw/components/TTDDialog/TTDDialog.js +2 -2
  169. package/dist/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +1 -1
  170. package/dist/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +1 -1
  171. package/dist/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +1 -1
  172. package/dist/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +1 -1
  173. package/dist/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  174. package/dist/excalidraw/components/TTDDialog/common.d.ts +4 -4
  175. package/dist/excalidraw/components/TextField.d.ts +1 -1
  176. package/dist/excalidraw/components/Toast.d.ts +1 -1
  177. package/dist/excalidraw/components/ToolButton.d.ts +3 -2
  178. package/dist/excalidraw/components/Trans.d.ts +1 -1
  179. package/dist/excalidraw/components/UserList.d.ts +1 -1
  180. package/dist/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
  181. package/dist/excalidraw/components/canvases/InteractiveCanvas.js +4 -2
  182. package/dist/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
  183. package/dist/excalidraw/components/canvases/StaticCanvas.js +2 -2
  184. package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +2 -2
  185. package/dist/excalidraw/components/footer/Footer.d.ts +2 -2
  186. package/dist/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  187. package/dist/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  188. package/dist/excalidraw/components/icons.d.ts +6 -2
  189. package/dist/excalidraw/components/icons.js +22 -6
  190. package/dist/excalidraw/constants.d.ts +8 -2
  191. package/dist/excalidraw/constants.js +8 -1
  192. package/dist/excalidraw/context/ui-appState.d.ts +1 -1
  193. package/dist/excalidraw/cursor.d.ts +1 -1
  194. package/dist/excalidraw/data/EditorLocalStorage.d.ts +2 -2
  195. package/dist/excalidraw/data/blob.d.ts +5 -5
  196. package/dist/excalidraw/data/filesystem.d.ts +2 -1
  197. package/dist/excalidraw/data/index.d.ts +4 -4
  198. package/dist/excalidraw/data/json.d.ts +3 -3
  199. package/dist/excalidraw/data/library.d.ts +3 -3
  200. package/dist/excalidraw/data/magic.d.ts +3 -3
  201. package/dist/excalidraw/data/reconcile.d.ts +3 -3
  202. package/dist/excalidraw/data/resave.d.ts +2 -2
  203. package/dist/excalidraw/data/restore.d.ts +3 -3
  204. package/dist/excalidraw/data/restore.js +16 -1
  205. package/dist/excalidraw/data/transform.d.ts +3 -3
  206. package/dist/excalidraw/data/types.d.ts +3 -3
  207. package/dist/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  208. package/dist/excalidraw/element/binding.d.ts +7 -21
  209. package/dist/excalidraw/element/binding.js +127 -102
  210. package/dist/excalidraw/element/bounds.d.ts +3 -3
  211. package/dist/excalidraw/element/collision.d.ts +3 -3
  212. package/dist/excalidraw/element/collision.js +1 -1
  213. package/dist/excalidraw/element/containerCache.d.ts +1 -1
  214. package/dist/excalidraw/element/dragElements.d.ts +4 -4
  215. package/dist/excalidraw/element/dragElements.js +27 -3
  216. package/dist/excalidraw/element/embeddable.d.ts +8 -5
  217. package/dist/excalidraw/element/image.d.ts +2 -2
  218. package/dist/excalidraw/element/index.d.ts +2 -2
  219. package/dist/excalidraw/element/index.js +1 -1
  220. package/dist/excalidraw/element/linearElementEditor.d.ts +8 -5
  221. package/dist/excalidraw/element/linearElementEditor.js +7 -4
  222. package/dist/excalidraw/element/mutateElement.d.ts +2 -2
  223. package/dist/excalidraw/element/mutateElement.js +1 -1
  224. package/dist/excalidraw/element/newElement.d.ts +5 -8
  225. package/dist/excalidraw/element/newElement.js +16 -14
  226. package/dist/excalidraw/element/resizeElements.d.ts +11 -3
  227. package/dist/excalidraw/element/resizeElements.js +75 -23
  228. package/dist/excalidraw/element/resizeTest.d.ts +4 -4
  229. package/dist/excalidraw/element/resizeTest.js +2 -4
  230. package/dist/excalidraw/element/showSelectedShapeActions.d.ts +2 -2
  231. package/dist/excalidraw/element/sizeHelpers.d.ts +2 -2
  232. package/dist/excalidraw/element/sortElements.d.ts +1 -1
  233. package/dist/excalidraw/element/textElement.d.ts +5 -4
  234. package/dist/excalidraw/element/textElement.js +11 -3
  235. package/dist/excalidraw/element/textWysiwyg.d.ts +12 -6
  236. package/dist/excalidraw/element/textWysiwyg.js +38 -17
  237. package/dist/excalidraw/element/transformHandles.d.ts +3 -3
  238. package/dist/excalidraw/element/transformHandles.js +0 -10
  239. package/dist/excalidraw/element/typeChecks.d.ts +4 -4
  240. package/dist/excalidraw/element/types.d.ts +11 -4
  241. package/dist/excalidraw/emitter.d.ts +1 -1
  242. package/dist/excalidraw/fractionalIndex.d.ts +1 -1
  243. package/dist/excalidraw/fractionalIndex.js +2 -4
  244. package/dist/excalidraw/frame.d.ts +3 -3
  245. package/dist/excalidraw/gatransforms.d.ts +1 -1
  246. package/dist/excalidraw/gesture.d.ts +1 -1
  247. package/dist/excalidraw/groups.d.ts +4 -4
  248. package/dist/excalidraw/history.d.ts +4 -4
  249. package/dist/excalidraw/hooks/useEmitter.d.ts +1 -1
  250. package/dist/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  251. package/dist/excalidraw/i18n.d.ts +1 -1
  252. package/dist/excalidraw/index.d.ts +1 -1
  253. package/dist/excalidraw/jotai.d.ts +1 -1
  254. package/dist/excalidraw/laser-trails.d.ts +3 -2
  255. package/dist/excalidraw/locales/en.json +24 -3
  256. package/dist/excalidraw/math.d.ts +4 -2
  257. package/dist/excalidraw/math.js +6 -0
  258. package/dist/excalidraw/mermaid.d.ts +2 -0
  259. package/dist/excalidraw/mermaid.js +28 -0
  260. package/dist/excalidraw/points.d.ts +1 -1
  261. package/dist/excalidraw/queue.d.ts +1 -1
  262. package/dist/excalidraw/renderer/helpers.d.ts +2 -2
  263. package/dist/excalidraw/renderer/interactiveScene.d.ts +2 -2
  264. package/dist/excalidraw/renderer/interactiveScene.js +32 -6
  265. package/dist/excalidraw/renderer/renderElement.d.ts +4 -4
  266. package/dist/excalidraw/renderer/renderElement.js +5 -5
  267. package/dist/excalidraw/renderer/renderSnaps.d.ts +1 -1
  268. package/dist/excalidraw/renderer/staticScene.d.ts +1 -1
  269. package/dist/excalidraw/renderer/staticSvgScene.d.ts +4 -4
  270. package/dist/excalidraw/scene/Fonts.d.ts +2 -4
  271. package/dist/excalidraw/scene/Fonts.js +12 -15
  272. package/dist/excalidraw/scene/Renderer.d.ts +4 -4
  273. package/dist/excalidraw/scene/Renderer.js +2 -3
  274. package/dist/excalidraw/scene/Scene.d.ts +16 -7
  275. package/dist/excalidraw/scene/Scene.js +17 -8
  276. package/dist/excalidraw/scene/Shape.d.ts +1 -1
  277. package/dist/excalidraw/scene/ShapeCache.d.ts +4 -4
  278. package/dist/excalidraw/scene/comparisons.d.ts +2 -2
  279. package/dist/excalidraw/scene/export.d.ts +2 -2
  280. package/dist/excalidraw/scene/export.js +2 -2
  281. package/dist/excalidraw/scene/scroll.d.ts +2 -2
  282. package/dist/excalidraw/scene/scrollbars.d.ts +3 -3
  283. package/dist/excalidraw/scene/selection.d.ts +2 -2
  284. package/dist/excalidraw/scene/types.d.ts +6 -8
  285. package/dist/excalidraw/scene/zoom.d.ts +1 -1
  286. package/dist/excalidraw/shapes.d.ts +7 -0
  287. package/dist/excalidraw/shapes.js +40 -0
  288. package/dist/excalidraw/snapping.d.ts +4 -4
  289. package/dist/excalidraw/snapping.js +2 -1
  290. package/dist/excalidraw/store.d.ts +34 -4
  291. package/dist/excalidraw/store.js +27 -0
  292. package/dist/excalidraw/types.d.ts +25 -20
  293. package/dist/excalidraw/utils.d.ts +4 -4
  294. package/dist/excalidraw/zindex.d.ts +2 -2
  295. package/dist/prod/{en-XW4JO6VX.json → en-EB2MBPAV.json} +24 -3
  296. package/dist/prod/index.css +1 -1
  297. package/dist/prod/index.js +39 -39
  298. package/dist/utils/bbox.d.ts +2 -2
  299. package/dist/utils/collision.d.ts +1 -1
  300. package/dist/utils/export.d.ts +2 -2
  301. package/dist/utils/geometry/geometry.d.ts +1 -1
  302. package/dist/utils/geometry/shape.d.ts +1 -1
  303. package/dist/utils/withinBounds.d.ts +1 -1
  304. package/history.ts +4 -4
  305. package/package.json +2 -2
  306. package/dist/browser/dev/excalidraw-assets-dev/chunk-47LVF2XL.js.map +0 -7
  307. package/dist/browser/dev/excalidraw-assets-dev/chunk-XOM7LNOU.js.map +0 -7
  308. package/dist/browser/dev/excalidraw-assets-dev/dist-ITJNUBZF.js.map +0 -7
  309. package/dist/browser/prod/excalidraw-assets/chunk-4SNEEDZH.js +0 -55
  310. package/dist/browser/prod/excalidraw-assets/dist-54276HPL.js +0 -6
  311. package/dist/browser/prod/excalidraw-assets/en-7GPZE2Y2.js +0 -1
  312. package/dist/browser/prod/excalidraw-assets/image-ISQJGWLB.js +0 -1
  313. package/dist/excalidraw/components/Stats.d.ts +0 -11
  314. package/dist/excalidraw/components/Stats.js +0 -13
  315. /package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js.map → en-AZFA5HJJ.js.map} +0 -0
  316. /package/dist/browser/dev/excalidraw-assets-dev/{image-LHMGJWTI.js.map → image-5XCR4WHS.js.map} +0 -0
@@ -0,0 +1,158 @@
1
+ import { bindOrUnbindLinearElements, updateBoundElements, } from "../../element/binding";
2
+ import { mutateElement } from "../../element/mutateElement";
3
+ import { measureFontSizeFromWidth, rescalePointsInElement, } from "../../element/resizeElements";
4
+ import { getApproxMinLineHeight, getApproxMinLineWidth, getBoundTextElement, getBoundTextMaxWidth, handleBindTextResize, } from "../../element/textElement";
5
+ import { isFrameLikeElement, isLinearElement, isTextElement, } from "../../element/typeChecks";
6
+ import { getSelectedGroupIds, getElementsInGroup, isInGroup, } from "../../groups";
7
+ import { rotate } from "../../math";
8
+ import { getFontString } from "../../utils";
9
+ export const SMALLEST_DELTA = 0.01;
10
+ export const isPropertyEditable = (element, property) => {
11
+ if (property === "height" && isTextElement(element)) {
12
+ return false;
13
+ }
14
+ if (property === "width" && isTextElement(element)) {
15
+ return false;
16
+ }
17
+ if (property === "angle" && isFrameLikeElement(element)) {
18
+ return false;
19
+ }
20
+ return true;
21
+ };
22
+ export const getStepSizedValue = (value, stepSize) => {
23
+ const v = value + stepSize / 2;
24
+ return v - (v % stepSize);
25
+ };
26
+ export const getElementsInAtomicUnit = (atomicUnit, elementsMap, originalElementsMap) => {
27
+ return Object.keys(atomicUnit)
28
+ .map((id) => ({
29
+ original: (originalElementsMap ?? elementsMap).get(id),
30
+ latest: elementsMap.get(id),
31
+ }))
32
+ .filter((el) => el.original !== undefined && el.latest !== undefined);
33
+ };
34
+ export const newOrigin = (x1, y1, w1, h1, w2, h2, angle) => {
35
+ /**
36
+ * The formula below is the result of solving
37
+ * rotate(x1, y1, cx1, cy1, angle) = rotate(x2, y2, cx2, cy2, angle)
38
+ * where rotate is the function defined in math.ts
39
+ *
40
+ * This is so that the new origin (x2, y2),
41
+ * when rotated against the new center (cx2, cy2),
42
+ * coincides with (x1, y1) rotated against (cx1, cy1)
43
+ *
44
+ * The reason for doing this computation is so the element's top left corner
45
+ * on the canvas remains fixed after any changes in its dimension.
46
+ */
47
+ return {
48
+ x: x1 +
49
+ (w1 - w2) / 2 +
50
+ ((w2 - w1) / 2) * Math.cos(angle) +
51
+ ((h1 - h2) / 2) * Math.sin(angle),
52
+ y: y1 +
53
+ (h1 - h2) / 2 +
54
+ ((w2 - w1) / 2) * Math.sin(angle) +
55
+ ((h2 - h1) / 2) * Math.cos(angle),
56
+ };
57
+ };
58
+ export const resizeElement = (nextWidth, nextHeight, keepAspectRatio, origElement, elementsMap, shouldInformMutation = true) => {
59
+ const latestElement = elementsMap.get(origElement.id);
60
+ if (!latestElement) {
61
+ return;
62
+ }
63
+ let boundTextFont = {};
64
+ const boundTextElement = getBoundTextElement(latestElement, elementsMap);
65
+ if (boundTextElement) {
66
+ const minWidth = getApproxMinLineWidth(getFontString(boundTextElement), boundTextElement.lineHeight);
67
+ const minHeight = getApproxMinLineHeight(boundTextElement.fontSize, boundTextElement.lineHeight);
68
+ nextWidth = Math.max(nextWidth, minWidth);
69
+ nextHeight = Math.max(nextHeight, minHeight);
70
+ }
71
+ mutateElement(latestElement, {
72
+ ...newOrigin(latestElement.x, latestElement.y, latestElement.width, latestElement.height, nextWidth, nextHeight, latestElement.angle),
73
+ width: nextWidth,
74
+ height: nextHeight,
75
+ ...rescalePointsInElement(origElement, nextWidth, nextHeight, true),
76
+ }, shouldInformMutation);
77
+ updateBindings(latestElement, elementsMap, {
78
+ newSize: {
79
+ width: nextWidth,
80
+ height: nextHeight,
81
+ },
82
+ });
83
+ if (boundTextElement) {
84
+ boundTextFont = {
85
+ fontSize: boundTextElement.fontSize,
86
+ };
87
+ if (keepAspectRatio) {
88
+ const updatedElement = {
89
+ ...latestElement,
90
+ width: nextWidth,
91
+ height: nextHeight,
92
+ };
93
+ const nextFont = measureFontSizeFromWidth(boundTextElement, elementsMap, getBoundTextMaxWidth(updatedElement, boundTextElement));
94
+ boundTextFont = {
95
+ fontSize: nextFont?.size ?? boundTextElement.fontSize,
96
+ };
97
+ }
98
+ }
99
+ if (boundTextElement && boundTextFont) {
100
+ mutateElement(boundTextElement, {
101
+ fontSize: boundTextFont.fontSize,
102
+ });
103
+ }
104
+ handleBindTextResize(latestElement, elementsMap, "e", keepAspectRatio);
105
+ };
106
+ export const moveElement = (newTopLeftX, newTopLeftY, originalElement, elementsMap, originalElementsMap, shouldInformMutation = true) => {
107
+ const latestElement = elementsMap.get(originalElement.id);
108
+ if (!latestElement) {
109
+ return;
110
+ }
111
+ const [cx, cy] = [
112
+ originalElement.x + originalElement.width / 2,
113
+ originalElement.y + originalElement.height / 2,
114
+ ];
115
+ const [topLeftX, topLeftY] = rotate(originalElement.x, originalElement.y, cx, cy, originalElement.angle);
116
+ const changeInX = newTopLeftX - topLeftX;
117
+ const changeInY = newTopLeftY - topLeftY;
118
+ const [x, y] = rotate(newTopLeftX, newTopLeftY, cx + changeInX, cy + changeInY, -originalElement.angle);
119
+ mutateElement(latestElement, {
120
+ x,
121
+ y,
122
+ }, shouldInformMutation);
123
+ updateBindings(latestElement, elementsMap);
124
+ const boundTextElement = getBoundTextElement(originalElement, originalElementsMap);
125
+ if (boundTextElement) {
126
+ const latestBoundTextElement = elementsMap.get(boundTextElement.id);
127
+ latestBoundTextElement &&
128
+ mutateElement(latestBoundTextElement, {
129
+ x: boundTextElement.x + changeInX,
130
+ y: boundTextElement.y + changeInY,
131
+ }, shouldInformMutation);
132
+ }
133
+ };
134
+ export const getAtomicUnits = (targetElements, appState) => {
135
+ const selectedGroupIds = getSelectedGroupIds(appState);
136
+ const _atomicUnits = selectedGroupIds.map((gid) => {
137
+ return getElementsInGroup(targetElements, gid).reduce((acc, el) => {
138
+ acc[el.id] = true;
139
+ return acc;
140
+ }, {});
141
+ });
142
+ targetElements
143
+ .filter((el) => !isInGroup(el))
144
+ .forEach((el) => {
145
+ _atomicUnits.push({
146
+ [el.id]: true,
147
+ });
148
+ });
149
+ return _atomicUnits;
150
+ };
151
+ export const updateBindings = (latestElement, elementsMap, options) => {
152
+ if (isLinearElement(latestElement)) {
153
+ bindOrUnbindLinearElements([latestElement], elementsMap, true, []);
154
+ }
155
+ else {
156
+ updateBoundElements(latestElement, elementsMap, options);
157
+ }
158
+ };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import "./MermaidToExcalidraw.scss";
3
- import { MermaidToExcalidrawLibProps } from "./common";
3
+ import type { MermaidToExcalidrawLibProps } from "./common";
4
4
  declare const MermaidToExcalidraw: ({ mermaidToExcalidrawLib, }: {
5
5
  mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
6
6
  }) => JSX.Element;
@@ -141,8 +141,8 @@ export const TTDDialogBase = withInternalFallback("TTDDialogBase", ({ tab, ...re
141
141
  marginLeft: "10px",
142
142
  fontSize: 10,
143
143
  borderRadius: "12px",
144
- background: "pink",
145
- color: "#000",
144
+ background: "var(--color-promo)",
145
+ color: "var(--color-surface-lowest)",
146
146
  }, children: "AI Beta" })] }) }), _jsx(TTDDialogTabTrigger, { tab: "mermaid", children: "Mermaid" })] })), _jsx(TTDDialogTab, { className: "ttd-dialog-content", tab: "mermaid", children: _jsx(MermaidToExcalidraw, { mermaidToExcalidrawLib: mermaidToExcalidrawLib }) }), !("__fallback" in rest) && (_jsxs(TTDDialogTab, { className: "ttd-dialog-content", tab: "text-to-diagram", children: [_jsx("div", { className: "ttd-dialog-desc", children: "Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar." }), _jsxs(TTDDialogPanels, { children: [_jsx(TTDDialogPanel, { label: t("labels.prompt"), panelAction: {
147
147
  action: onGenerate,
148
148
  label: "Generate",
@@ -1,4 +1,4 @@
1
- import { ChangeEventHandler } from "react";
1
+ import type { ChangeEventHandler } from "react";
2
2
  interface TTDDialogInputProps {
3
3
  input: string;
4
4
  placeholder: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  interface TTDDialogPanelProps {
3
3
  label: string;
4
4
  children: ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  export declare const TTDDialogPanels: ({ children }: {
3
3
  children: ReactNode;
4
4
  }) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  declare const TTDDialogTabs: {
3
3
  (props: {
4
4
  children: ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  export declare const TTDDialogTrigger: {
3
3
  ({ children, icon, }: {
4
4
  children?: ReactNode;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { MermaidOptions } from "@excalidraw/mermaid-to-excalidraw";
3
- import { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces";
4
- import { NonDeletedExcalidrawElement } from "../../element/types";
5
- import { AppClassProperties, BinaryFiles } from "../../types";
2
+ import type { MermaidOptions } from "@excalidraw/mermaid-to-excalidraw";
3
+ import type { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces";
4
+ import type { NonDeletedExcalidrawElement } from "../../element/types";
5
+ import type { AppClassProperties, BinaryFiles } from "../../types";
6
6
  export interface MermaidToExcalidrawLibProps {
7
7
  loaded: boolean;
8
8
  api: Promise<{
@@ -1,4 +1,4 @@
1
- import { KeyboardEvent } from "react";
1
+ import type { KeyboardEvent } from "react";
2
2
  import "./TextField.scss";
3
3
  type TextFieldProps = {
4
4
  onChange?: (value: string) => void;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from "react";
1
+ import type { CSSProperties } from "react";
2
2
  import "./Toast.scss";
3
3
  export declare const Toast: ({ message, onClose, closable, duration, style, }: {
4
4
  message: string;
@@ -1,6 +1,7 @@
1
1
  import "./ToolIcon.scss";
2
- import React, { CSSProperties } from "react";
3
- import { PointerType } from "../element/types";
2
+ import type { CSSProperties } from "react";
3
+ import React from "react";
4
+ import type { PointerType } from "../element/types";
4
5
  export type ToolButtonSize = "small" | "medium";
5
6
  type ToolButtonBaseProps = {
6
7
  icon?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TranslationKeys } from "../i18n";
2
+ import type { TranslationKeys } from "../i18n";
3
3
  declare const Trans: ({ i18nKey, children, ...props }: {
4
4
  [key: string]: React.ReactNode | ((el: React.ReactNode) => React.ReactNode);
5
5
  i18nKey: TranslationKeys;
@@ -1,6 +1,6 @@
1
1
  import "./UserList.scss";
2
2
  import React from "react";
3
- import { Collaborator, SocketId } from "../types";
3
+ import type { Collaborator, SocketId } from "../types";
4
4
  export type GoToCollaboratorComponentProps = {
5
5
  socketId: SocketId;
6
6
  collaborator: Collaborator;
@@ -2,14 +2,15 @@ import React from "react";
2
2
  import type { DOMAttributes } from "react";
3
3
  import type { Device, InteractiveCanvasAppState } from "../../types";
4
4
  import type { RenderableElementsMap, RenderInteractiveSceneCallback } from "../../scene/types";
5
- import type { NonDeletedExcalidrawElement } from "../../element/types";
5
+ import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
6
6
  type InteractiveCanvasProps = {
7
7
  containerRef: React.RefObject<HTMLDivElement>;
8
8
  canvas: HTMLCanvasElement | null;
9
9
  elementsMap: RenderableElementsMap;
10
10
  visibleElements: readonly NonDeletedExcalidrawElement[];
11
11
  selectedElements: readonly NonDeletedExcalidrawElement[];
12
- versionNonce: number | undefined;
12
+ allElementsMap: NonDeletedSceneElementsMap;
13
+ sceneNonce: number | undefined;
13
14
  selectionNonce: number | undefined;
14
15
  scale: number;
15
16
  appState: InteractiveCanvasAppState;
@@ -49,6 +49,7 @@ const InteractiveCanvas = (props) => {
49
49
  elementsMap: props.elementsMap,
50
50
  visibleElements: props.visibleElements,
51
51
  selectedElements: props.selectedElements,
52
+ allElementsMap: props.allElementsMap,
52
53
  scale: window.devicePixelRatio,
53
54
  appState: props.appState,
54
55
  renderConfig: {
@@ -99,14 +100,15 @@ const getRelevantAppStateProps = (appState) => ({
99
100
  activeEmbeddable: appState.activeEmbeddable,
100
101
  snapLines: appState.snapLines,
101
102
  zenModeEnabled: appState.zenModeEnabled,
103
+ editingElement: appState.editingElement,
102
104
  });
103
105
  const areEqual = (prevProps, nextProps) => {
104
106
  // This could be further optimised if needed, as we don't have to render interactive canvas on each scene mutation
105
107
  if (prevProps.selectionNonce !== nextProps.selectionNonce ||
106
- prevProps.versionNonce !== nextProps.versionNonce ||
108
+ prevProps.sceneNonce !== nextProps.sceneNonce ||
107
109
  prevProps.scale !== nextProps.scale ||
108
110
  // we need to memoize on elementsMap because they may have renewed
109
- // even if versionNonce didn't change (e.g. we filter elements out based
111
+ // even if sceneNonce didn't change (e.g. we filter elements out based
110
112
  // on appState)
111
113
  prevProps.elementsMap !== nextProps.elementsMap ||
112
114
  prevProps.visibleElements !== nextProps.visibleElements ||
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { RoughCanvas } from "roughjs/bin/canvas";
2
+ import type { RoughCanvas } from "roughjs/bin/canvas";
3
3
  import type { StaticCanvasAppState } from "../../types";
4
4
  import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
5
5
  import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "../../element/types";
@@ -9,7 +9,7 @@ type StaticCanvasProps = {
9
9
  elementsMap: RenderableElementsMap;
10
10
  allElementsMap: NonDeletedSceneElementsMap;
11
11
  visibleElements: readonly NonDeletedExcalidrawElement[];
12
- versionNonce: number | undefined;
12
+ sceneNonce: number | undefined;
13
13
  selectionNonce: number | undefined;
14
14
  scale: number;
15
15
  appState: StaticCanvasAppState;
@@ -70,10 +70,10 @@ const getRelevantAppStateProps = (appState) => ({
70
70
  editingGroupId: appState.editingGroupId,
71
71
  });
72
72
  const areEqual = (prevProps, nextProps) => {
73
- if (prevProps.versionNonce !== nextProps.versionNonce ||
73
+ if (prevProps.sceneNonce !== nextProps.sceneNonce ||
74
74
  prevProps.scale !== nextProps.scale ||
75
75
  // we need to memoize on elementsMap because they may have renewed
76
- // even if versionNonce didn't change (e.g. we filter elements out based
76
+ // even if sceneNonce didn't change (e.g. we filter elements out based
77
77
  // on appState)
78
78
  prevProps.elementsMap !== nextProps.elementsMap ||
79
79
  prevProps.visibleElements !== nextProps.visibleElements) {
@@ -11,10 +11,10 @@ export const DropDownMenuItemBadge = ({ children, }) => {
11
11
  display: "inline-flex",
12
12
  marginLeft: "auto",
13
13
  padding: "2px 4px",
14
- background: "pink",
14
+ background: "var(--color-promo)",
15
+ color: "var(--color-surface-lowest)",
15
16
  borderRadius: 6,
16
17
  fontSize: 9,
17
- color: "black",
18
18
  fontFamily: "Cascadia, monospace",
19
19
  }, children: children }));
20
20
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ActionManager } from "../../actions/manager";
3
- import { UIAppState } from "../../types";
2
+ import type { ActionManager } from "../../actions/manager";
3
+ import type { UIAppState } from "../../types";
4
4
  declare const Footer: {
5
5
  ({ appState, actionManager, showExitZenModeBtn, renderWelcomeScreen, }: {
6
6
  appState: UIAppState;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { AppState, ExcalidrawProps, UIAppState } from "../../types";
3
- import { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
2
+ import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
3
+ import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "../../element/types";
4
4
  import "./Hyperlink.scss";
5
5
  export declare const Hyperlink: ({ element, elementsMap, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
6
6
  element: NonDeletedExcalidrawElement;
@@ -1,6 +1,6 @@
1
- import { Bounds } from "../../element/bounds";
2
- import { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
3
- import { AppState, UIAppState } from "../../types";
1
+ import type { Bounds } from "../../element/bounds";
2
+ import type { ElementsMap, NonDeletedExcalidrawElement } from "../../element/types";
3
+ import type { AppState, UIAppState } from "../../types";
4
4
  export declare const EXTERNAL_LINK_IMG: HTMLImageElement;
5
5
  export declare const getLinkHandleFromCoords: ([x1, y1, x2, y2]: Bounds, angle: number, appState: Pick<UIAppState, "zoom">) => Bounds;
6
6
  export declare const isPointHittingLinkIcon: (element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, [x, y]: readonly [number, number]) => boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Theme } from "../element/types";
2
+ import type { Theme } from "../element/types";
3
3
  export declare const iconFillColor: (theme: Theme) => string;
4
4
  type Opts = {
5
5
  width?: number;
@@ -154,6 +154,7 @@ export declare const TextAlignBottomIcon: React.MemoExoticComponent<({ theme }:
154
154
  export declare const TextAlignMiddleIcon: React.MemoExoticComponent<({ theme }: {
155
155
  theme: Theme;
156
156
  }) => JSX.Element>;
157
+ export declare const angleIcon: JSX.Element;
157
158
  export declare const publishIcon: JSX.Element;
158
159
  export declare const eraser: JSX.Element;
159
160
  export declare const handIcon: JSX.Element;
@@ -195,7 +196,10 @@ export declare const pngIcon: JSX.Element;
195
196
  export declare const magnetIcon: JSX.Element;
196
197
  export declare const coffeeIcon: JSX.Element;
197
198
  export declare const DeviceDesktopIcon: JSX.Element;
198
- export declare const arrowBarToLeftIcon: JSX.Element;
199
+ export declare const loginIcon: JSX.Element;
199
200
  export declare const youtubeIcon: JSX.Element;
200
201
  export declare const gridIcon: JSX.Element;
202
+ export declare const lineEditorIcon: JSX.Element;
203
+ export declare const collapseDownIcon: JSX.Element;
204
+ export declare const collapseUpIcon: JSX.Element;
201
205
  export {};
@@ -121,10 +121,22 @@ export const shareWindows = createIcon(_jsxs(_Fragment, { children: [_jsx("path"
121
121
  // Icon imported form Storybook
122
122
  // Storybook is licensed under MIT https://github.com/storybookjs/storybook/blob/next/LICENSE
123
123
  export const resetZoom = createIcon(_jsx("path", { stroke: "currentColor", strokeWidth: "40", fill: "currentColor", d: "M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z" }), { width: 1024 });
124
- export const BringForwardIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z", fill: "currentColor" }), _jsx("path", { d: "M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
125
- export const SendBackwardIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388", fill: "currentColor" }), _jsx("path", { d: "M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
126
- export const BringToFrontIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", stroke: "currentColor", strokeWidth: "1.25", children: [_jsx("path", { d: "M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z", fill: "currentColor" }), _jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
127
- export const SendToBackIcon = createIcon(_jsxs(_Fragment, { children: [_jsxs("g", { clipPath: "url(#a)", children: [_jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z", stroke: "currentColor", strokeWidth: "1.25" }), _jsx("path", { d: "M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z", stroke: "currentColor", strokeWidth: "1.25" }), _jsx("mask", { id: "SendToBackIcon", fill: "#fff", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z" }) }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z", fill: "currentColor" }), _jsx("path", { d: "M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z", fill: "currentColor", mask: "url(#SendToBackIcon)" }), _jsx("path", { d: "M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z", stroke: "currentColor", strokeWidth: "1.25" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "a", children: _jsx("path", { fill: "#fff", d: "M0 0h20v20H0z" }) }) })] }), modifiedTablerIconProps);
124
+ const arrowBarToTopJSX = (_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M12 10l0 10" }), _jsx("path", { d: "M12 10l4 4" }), _jsx("path", { d: "M12 10l-4 4" }), _jsx("path", { d: "M4 4l16 0" })] }));
125
+ const arrownNarrowUpJSX = (_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M12 5l0 14" }), _jsx("path", { d: "M16 9l-4 -4" }), _jsx("path", { d: "M8 9l4 -4" })] }));
126
+ export const BringForwardIcon = createIcon(arrownNarrowUpJSX, tablerIconProps);
127
+ export const SendBackwardIcon = createIcon(arrownNarrowUpJSX, {
128
+ ...tablerIconProps,
129
+ style: {
130
+ transform: "rotate(180deg)",
131
+ },
132
+ });
133
+ export const BringToFrontIcon = createIcon(arrowBarToTopJSX, tablerIconProps);
134
+ export const SendToBackIcon = createIcon(arrowBarToTopJSX, {
135
+ ...tablerIconProps,
136
+ style: {
137
+ transform: "rotate(180deg)",
138
+ },
139
+ });
128
140
  //
129
141
  // Align action icons created from scratch to match those of z-index actions
130
142
  // Note: vertical align icons are flipped so the larger item is always the
@@ -200,6 +212,7 @@ export const TextAlignTopIcon = React.memo(({ theme }) => createIcon(_jsxs("g",
200
212
  export const TextAlignBottomIcon = React.memo(({ theme }) => createIcon(_jsxs("g", { strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("line", { x1: "4", y1: "20", x2: "20", y2: "20" }), _jsx("rect", { x: "9", y: "4", width: "6", height: "12", rx: "2" })] }), tablerIconProps));
201
213
  // tabler-icons: layout-align-middle
202
214
  export const TextAlignMiddleIcon = React.memo(({ theme }) => createIcon(_jsxs("g", { strokeWidth: "1.5", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("line", { x1: "4", y1: "12", x2: "9", y2: "12" }), _jsx("line", { x1: "15", y1: "12", x2: "20", y2: "12" }), _jsx("rect", { x: "9", y: "6", width: "6", height: "12", rx: "2" })] }), tablerIconProps));
215
+ export const angleIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M21 19h-18l9 -15" }), _jsx("path", { d: "M20.615 15.171h.015" }), _jsx("path", { d: "M19.515 11.771h.015" }), _jsx("path", { d: "M17.715 8.671h.015" }), _jsx("path", { d: "M15.415 5.971h.015" })] }), tablerIconProps);
203
216
  export const publishIcon = createIcon(_jsx("path", { d: "M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z", fill: "currentColor" }), { width: 640, height: 512 });
204
217
  export const eraser = createIcon(_jsx("path", { d: "M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z" }));
205
218
  export const handIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5" }), _jsx("path", { d: "M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5" }), _jsx("path", { d: "M14 5.5a1.5 1.5 0 0 1 3 0v6.5" }), _jsx("path", { d: "M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47" })] }), tablerIconProps);
@@ -241,7 +254,10 @@ export const pngIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_js
241
254
  export const magnetIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0" }), _jsx("path", { d: "M4 8l5 0" }), _jsx("path", { d: "M15 8l4 0" })] }), tablerIconProps);
242
255
  export const coffeeIcon = createIcon(_jsxs("g", { strokeWidth: 1.25, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1" }), _jsx("path", { d: "M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2" }), _jsx("path", { d: "M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2" }), _jsx("path", { d: "M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z" }), _jsx("path", { d: "M16.746 16.726a3 3 0 1 0 .252 -5.555" })] }), tablerIconProps);
243
256
  export const DeviceDesktopIcon = createIcon(_jsxs("g", { stroke: "currentColor", children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4" })] }), { ...tablerIconProps, strokeWidth: 1.5 });
244
- // arrow-bar-to-left
245
- export const arrowBarToLeftIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M10 12l10 0" }), _jsx("path", { d: "M10 12l4 4" }), _jsx("path", { d: "M10 12l4 -4" }), _jsx("path", { d: "M4 4l0 16" })] }), tablerIconProps);
257
+ // login
258
+ export const loginIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" }), _jsx("path", { d: "M21 12h-13l3 -3" }), _jsx("path", { d: "M11 15l-3 -3" })] }), tablerIconProps);
246
259
  export const youtubeIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z" }), _jsx("path", { d: "M10 9l5 3l-5 3z" })] }), tablerIconProps);
247
260
  export const gridIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M3 6h18" }), _jsx("path", { d: "M3 12h18" }), _jsx("path", { d: "M3 18h18" }), _jsx("path", { d: "M6 3v18" }), _jsx("path", { d: "M12 3v18" }), _jsx("path", { d: "M18 3v18" })] }), tablerIconProps);
261
+ export const lineEditorIcon = createIcon(_jsxs("g", { strokeWidth: 1.5, children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" }), _jsx("path", { d: "M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z" }), _jsx("path", { d: "M17 5c-6.627 0 -12 5.373 -12 12" })] }), tablerIconProps);
262
+ export const collapseDownIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M6 9l6 6l6 -6" })] }), tablerIconProps);
263
+ export const collapseUpIcon = createIcon(_jsxs("g", { children: [_jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), _jsx("path", { d: "M6 15l6 -6l6 6" })] }), tablerIconProps);
@@ -1,5 +1,5 @@
1
- import { AppProps } from "./types";
2
- import { ExcalidrawElement, FontFamilyValues } from "./element/types";
1
+ import type { AppProps } from "./types";
2
+ import type { ExcalidrawElement, FontFamilyValues } from "./element/types";
3
3
  export declare const isDarwin: boolean;
4
4
  export declare const isWindows: boolean;
5
5
  export declare const isAndroid: boolean;
@@ -10,6 +10,7 @@ export declare const isIOS: boolean;
10
10
  export declare const isBrave: () => boolean;
11
11
  export declare const supportsResizeObserver: boolean;
12
12
  export declare const APP_NAME = "Excalidraw";
13
+ export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
13
14
  export declare const DRAGGING_THRESHOLD = 10;
14
15
  export declare const LINE_CONFIRM_THRESHOLD = 8;
15
16
  export declare const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
@@ -279,3 +280,8 @@ export declare const EDITOR_LS_KEYS: {
279
280
  * where filename is optional and we can't retrieve name from app state
280
281
  */
281
282
  export declare const DEFAULT_FILENAME = "Untitled";
283
+ export declare const STATS_PANELS: {
284
+ readonly generalStats: 1;
285
+ readonly elementProperties: 2;
286
+ };
287
+ export declare const MIN_WIDTH_OR_HEIGHT = 1;
@@ -15,6 +15,11 @@ export const isIOS = /iPad|iPhone/.test(navigator.platform) ||
15
15
  export const isBrave = () => navigator.brave?.isBrave?.name === "isBrave";
16
16
  export const supportsResizeObserver = typeof window !== "undefined" && "ResizeObserver" in window;
17
17
  export const APP_NAME = "Excalidraw";
18
+ // distance when creating text before it's considered `autoResize: false`
19
+ // we're using higher threshold so that clicks that end up being drags
20
+ // don't unintentionally create text elements that are wrapped to a few chars
21
+ // (happens a lot with fast clicks with the text tool)
22
+ export const TEXT_AUTOWRAP_THRESHOLD = 36; // px
18
23
  export const DRAGGING_THRESHOLD = 10; // px
19
24
  export const LINE_CONFIRM_THRESHOLD = 8; // px
20
25
  export const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
@@ -226,7 +231,7 @@ export const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
226
231
  export const EXPORT_SCALES = [1, 2, 3];
227
232
  export const DEFAULT_EXPORT_PADDING = 10; // px
228
233
  export const DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT = 1440;
229
- export const MAX_ALLOWED_FILE_BYTES = 2 * 1024 * 1024;
234
+ export const MAX_ALLOWED_FILE_BYTES = 4 * 1024 * 1024;
230
235
  export const SVG_NS = "http://www.w3.org/2000/svg";
231
236
  export const ENCRYPTION_KEY_BITS = 128;
232
237
  export const VERSIONS = {
@@ -329,3 +334,5 @@ export const EDITOR_LS_KEYS = {
329
334
  * where filename is optional and we can't retrieve name from app state
330
335
  */
331
336
  export const DEFAULT_FILENAME = "Untitled";
337
+ export const STATS_PANELS = { generalStats: 1, elementProperties: 2 };
338
+ export const MIN_WIDTH_OR_HEIGHT = 1;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import { UIAppState } from "../types";
2
+ import type { UIAppState } from "../types";
3
3
  export declare const UIAppStateContext: React.Context<UIAppState>;
4
4
  export declare const useUIAppState: () => UIAppState;
@@ -1,4 +1,4 @@
1
- import { AppState } from "./types";
1
+ import type { AppState } from "./types";
2
2
  export declare const resetCursor: (interactiveCanvas: HTMLCanvasElement | null) => void;
3
3
  export declare const setCursor: (interactiveCanvas: HTMLCanvasElement | null, cursor: string) => void;
4
4
  export declare const setEraserCursor: (interactiveCanvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
@@ -1,5 +1,5 @@
1
- import { EDITOR_LS_KEYS } from "../constants";
2
- import { JSONValue } from "../types";
1
+ import type { EDITOR_LS_KEYS } from "../constants";
2
+ import type { JSONValue } from "../types";
3
3
  export declare class EditorLocalStorage {
4
4
  static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): boolean;
5
5
  static get<T extends JSONValue>(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): T | null;
@@ -1,9 +1,9 @@
1
1
  import { IMAGE_MIME_TYPES, MIME_TYPES } from "../constants";
2
- import { ExcalidrawElement, FileId } from "../element/types";
3
- import { AppState, DataURL, LibraryItem } from "../types";
4
- import { ValueOf } from "../utility-types";
5
- import { FileSystemHandle } from "./filesystem";
6
- import { ImportedLibraryData } from "./types";
2
+ import type { ExcalidrawElement, FileId } from "../element/types";
3
+ import type { AppState, DataURL, LibraryItem } from "../types";
4
+ import type { ValueOf } from "../utility-types";
5
+ import type { FileSystemHandle } from "./filesystem";
6
+ import type { ImportedLibraryData } from "./types";
7
7
  export declare const getMimeType: (blob: Blob | string) => string;
8
8
  export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
9
9
  export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
@@ -1,4 +1,5 @@
1
- import { FileSystemHandle, supported as nativeFileSystemSupported } from "browser-fs-access";
1
+ import type { FileSystemHandle } from "browser-fs-access";
2
+ import { supported as nativeFileSystemSupported } from "browser-fs-access";
2
3
  import { MIME_TYPES } from "../constants";
3
4
  type FILE_EXTENSION = Exclude<keyof typeof MIME_TYPES, "binary">;
4
5
  export declare const fileOpen: <M extends boolean | undefined = false>(opts: {
@@ -1,7 +1,7 @@
1
- import { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
2
- import { ExportType } from "../scene/types";
3
- import { AppState, BinaryFiles } from "../types";
4
- import { FileSystemHandle } from "./filesystem";
1
+ import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "../element/types";
2
+ import type { ExportType } from "../scene/types";
3
+ import type { AppState, BinaryFiles } from "../types";
4
+ import type { FileSystemHandle } from "./filesystem";
5
5
  export { loadFromBlob } from "./blob";
6
6
  export { loadFromJSON, saveAsJSON } from "./json";
7
7
  export type ExportedElements = readonly NonDeletedExcalidrawElement[] & {
@@ -1,6 +1,6 @@
1
- import { ExcalidrawElement } from "../element/types";
2
- import { AppState, BinaryFiles, LibraryItems } from "../types";
3
- import { ImportedDataState, ImportedLibraryData } from "./types";
1
+ import type { ExcalidrawElement } from "../element/types";
2
+ import type { AppState, BinaryFiles, LibraryItems } from "../types";
3
+ import type { ImportedDataState, ImportedLibraryData } from "./types";
4
4
  export declare const serializeAsJSON: (elements: readonly ExcalidrawElement[], appState: Partial<AppState>, files: BinaryFiles, type: "local" | "database") => string;
5
5
  export declare const saveAsJSON: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles, name?: string) => Promise<{
6
6
  fileHandle: import("browser-fs-access").FileSystemHandle | null;