@excalidraw/element 0.18.0-508de2f3a → 0.18.0-54a9826

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 (231) hide show
  1. package/dist/dev/index.js +4778 -2478
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +17 -17
  4. package/dist/types/common/src/bounds.d.ts +10 -0
  5. package/dist/types/common/src/colors.d.ts +59 -39
  6. package/dist/types/common/src/constants.d.ts +36 -26
  7. package/dist/types/common/src/editorInterface.d.ts +34 -0
  8. package/dist/types/common/src/font-metadata.d.ts +1 -3
  9. package/dist/types/common/src/index.d.ts +2 -0
  10. package/dist/types/common/src/keys.d.ts +1 -1
  11. package/dist/types/common/src/utility-types.d.ts +0 -1
  12. package/dist/types/common/src/utils.d.ts +49 -34
  13. package/dist/types/element/src/Scene.d.ts +3 -3
  14. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  15. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  16. package/dist/types/element/src/binding.d.ts +64 -45
  17. package/dist/types/element/src/bounds.d.ts +3 -11
  18. package/dist/types/element/src/collision.d.ts +7 -2
  19. package/dist/types/element/src/comparisons.d.ts +7 -7
  20. package/dist/types/element/src/delta.d.ts +4 -5
  21. package/dist/types/element/src/distribute.d.ts +2 -1
  22. package/dist/types/element/src/dragElements.d.ts +3 -3
  23. package/dist/types/element/src/duplicate.d.ts +3 -3
  24. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  25. package/dist/types/element/src/frame.d.ts +5 -1
  26. package/dist/types/element/src/heading.d.ts +2 -1
  27. package/dist/types/element/src/image.d.ts +1 -11
  28. package/dist/types/element/src/index.d.ts +4 -3
  29. package/dist/types/element/src/linearElementEditor.d.ts +18 -20
  30. package/dist/types/element/src/mutateElement.d.ts +3 -2
  31. package/dist/types/element/src/newElement.d.ts +6 -6
  32. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  33. package/dist/types/element/src/renderElement.d.ts +4 -7
  34. package/dist/types/element/src/resizeElements.d.ts +10 -10
  35. package/dist/types/element/src/resizeTest.d.ts +6 -5
  36. package/dist/types/element/src/selection.d.ts +3 -7
  37. package/dist/types/element/src/shape.d.ts +8 -7
  38. package/dist/types/element/src/store.d.ts +5 -0
  39. package/dist/types/element/src/textElement.d.ts +1 -1
  40. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  41. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  42. package/dist/types/element/src/transformHandles.d.ts +8 -27
  43. package/dist/types/element/src/typeChecks.d.ts +4 -7
  44. package/dist/types/element/src/types.d.ts +7 -11
  45. package/dist/types/element/src/utils.d.ts +5 -2
  46. package/dist/types/element/src/visualdebug.d.ts +59 -0
  47. package/dist/types/element/src/zindex.d.ts +7 -1
  48. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +93 -136
  49. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  50. package/dist/types/excalidraw/actions/actionBoundText.d.ts +67 -96
  51. package/dist/types/excalidraw/actions/actionCanvas.d.ts +402 -758
  52. package/dist/types/excalidraw/actions/actionClipboard.d.ts +86 -856
  53. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +32 -47
  54. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +112 -159
  55. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  56. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -3
  57. package/dist/types/excalidraw/actions/actionElementLink.d.ts +28 -45
  58. package/dist/types/excalidraw/actions/actionElementLock.d.ts +66 -95
  59. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +33 -48
  60. package/dist/types/excalidraw/actions/actionExport.d.ts +144 -1104
  61. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
  62. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  63. package/dist/types/excalidraw/actions/actionFrame.d.ts +227 -322
  64. package/dist/types/excalidraw/actions/actionGroup.d.ts +70 -107
  65. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +142 -195
  66. package/dist/types/excalidraw/actions/actionLink.d.ts +30 -45
  67. package/dist/types/excalidraw/actions/actionMenu.d.ts +27 -410
  68. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
  69. package/dist/types/excalidraw/actions/actionProperties.d.ts +129 -2488
  70. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +35 -54
  71. package/dist/types/excalidraw/actions/actionStyles.d.ts +32 -47
  72. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  73. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +32 -47
  74. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +32 -47
  75. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +25 -42
  76. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  77. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +32 -47
  78. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +32 -47
  79. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +33 -48
  80. package/dist/types/excalidraw/actions/actionZindex.d.ts +2 -3
  81. package/dist/types/excalidraw/actions/index.d.ts +2 -2
  82. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  83. package/dist/types/excalidraw/actions/types.d.ts +4 -4
  84. package/dist/types/excalidraw/appState.d.ts +12 -7
  85. package/dist/types/excalidraw/clipboard.d.ts +58 -17
  86. package/dist/types/excalidraw/components/Actions.d.ts +22 -5
  87. package/dist/types/excalidraw/components/App.d.ts +74 -67
  88. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  89. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  90. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -1
  91. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
  92. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
  93. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
  94. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  95. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  96. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
  97. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
  98. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  99. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  100. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  101. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  102. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  103. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  104. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -2
  105. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  106. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  107. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  108. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
  109. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  110. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  111. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  112. package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
  113. package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
  114. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  115. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  116. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
  117. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  118. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  119. package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
  120. package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
  121. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  122. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  123. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  124. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  125. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  126. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  127. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  128. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  129. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  130. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  131. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  132. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  133. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  134. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  135. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  136. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  137. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  138. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  139. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  140. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  141. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
  142. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  143. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
  144. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  145. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  146. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  147. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  148. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
  149. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  150. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  151. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  152. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  153. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  154. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +2 -3
  155. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  156. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  157. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
  158. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  159. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  160. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  161. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  162. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
  163. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  164. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  165. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  166. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  167. package/dist/types/excalidraw/components/TextField.d.ts +1 -0
  168. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  169. package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
  170. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  171. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  172. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +32 -33
  173. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +6 -5
  174. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  175. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +12 -19
  176. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  177. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  178. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  179. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  180. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  181. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  182. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  183. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  184. package/dist/types/excalidraw/components/icons.d.ts +26 -12
  185. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  186. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  187. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +26 -32
  188. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  189. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  190. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  191. package/dist/types/excalidraw/data/blob.d.ts +324 -10
  192. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  193. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  194. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  195. package/dist/types/excalidraw/data/index.d.ts +3 -3
  196. package/dist/types/excalidraw/data/json.d.ts +159 -2
  197. package/dist/types/excalidraw/data/library.d.ts +24 -9
  198. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  199. package/dist/types/excalidraw/data/types.d.ts +4 -1
  200. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  201. package/dist/types/excalidraw/errors.d.ts +14 -0
  202. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  203. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  204. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  205. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  206. package/dist/types/excalidraw/i18n.d.ts +2 -2
  207. package/dist/types/excalidraw/index.d.ts +7 -7
  208. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  209. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  210. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  211. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  212. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  213. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  214. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  215. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  216. package/dist/types/excalidraw/snapping.d.ts +5 -5
  217. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  218. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  219. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  220. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  221. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  222. package/dist/types/excalidraw/types.d.ts +32 -22
  223. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  224. package/dist/types/math/src/polygon.d.ts +2 -2
  225. package/dist/types/math/src/range.d.ts +1 -3
  226. package/dist/types/math/src/segment.d.ts +4 -3
  227. package/dist/types/utils/src/bbox.d.ts +1 -1
  228. package/dist/types/utils/src/export.d.ts +5 -5
  229. package/dist/types/utils/src/shape.d.ts +6 -6
  230. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  231. package/package.json +9 -3
@@ -1,6 +1,6 @@
1
1
  import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
2
2
  import "./Actions.scss";
3
- import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
3
+ import type { AppClassProperties, AppProps, UIAppState, Zoom, AppState } from "../types";
4
4
  import type { ActionManager } from "../actions/manager";
5
5
  export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
6
6
  export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
@@ -10,9 +10,23 @@ export declare const SelectedShapeActions: ({ appState, elementsMap, renderActio
10
10
  renderAction: ActionManager["renderAction"];
11
11
  app: AppClassProperties;
12
12
  }) => import("react/jsx-runtime").JSX.Element;
13
- export declare const ShapesSwitcher: ({ activeTool, appState, app, UIOptions, }: {
14
- activeTool: UIAppState["activeTool"];
13
+ export declare const CompactShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
15
14
  appState: UIAppState;
15
+ elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
16
+ renderAction: ActionManager["renderAction"];
17
+ app: AppClassProperties;
18
+ setAppState: React.Component<any, AppState>["setState"];
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const MobileShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
21
+ appState: UIAppState;
22
+ elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
23
+ renderAction: ActionManager["renderAction"];
24
+ app: AppClassProperties;
25
+ setAppState: React.Component<any, AppState>["setState"];
26
+ }) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const ShapesSwitcher: ({ activeTool, setAppState, app, UIOptions, }: {
28
+ activeTool: UIAppState["activeTool"];
29
+ setAppState: React.Component<any, AppState>["setState"];
16
30
  app: AppClassProperties;
17
31
  UIOptions: AppProps["UIOptions"];
18
32
  }) => import("react/jsx-runtime").JSX.Element;
@@ -22,9 +36,12 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
22
36
  }) => import("react/jsx-runtime").JSX.Element;
23
37
  export declare const UndoRedoActions: ({ renderAction, className, }: {
24
38
  renderAction: ActionManager["renderAction"];
25
- className?: string | undefined;
39
+ className?: string;
26
40
  }) => import("react/jsx-runtime").JSX.Element;
27
- export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }: {
41
+ export declare const ExitZenModeButton: ({ actionManager, showExitZenModeBtn, }: {
28
42
  actionManager: ActionManager;
29
43
  showExitZenModeBtn: boolean;
30
44
  }) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const ExitViewModeButton: ({ actionManager, }: {
46
+ actionManager: ActionManager;
47
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
- import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta } from "@excalidraw/element";
4
- import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, OrderedExcalidrawElement, SceneElementsMap } from "@excalidraw/element/types";
2
+ import { type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
3
+ import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
4
+ import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
5
5
  import type { Mutable } from "@excalidraw/common/utility-types";
6
6
  import { ActionManager } from "../actions/manager";
7
7
  import { AnimationFrameHandler } from "../animation-frame-handler";
@@ -10,11 +10,12 @@ import { Fonts } from "../fonts";
10
10
  import { type WritableAtom } from "../editor-jotai";
11
11
  import { Renderer } from "../scene/Renderer";
12
12
  import { LaserTrails } from "../laser-trails";
13
+ import { isOverScrollBars } from "../scene/scrollbars";
13
14
  import { LassoTrail } from "../lasso";
14
15
  import { EraserTrail } from "../eraser";
15
16
  import type { ExportedElements } from "../data";
16
17
  import type { FileSystemHandle } from "../data/filesystem";
17
- import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets, ApplyDeltasOptions } from "../types";
18
+ import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
18
19
  import type { RoughCanvas } from "roughjs/bin/canvas";
19
20
  import type { ActionResult } from "../actions/types";
20
21
  export declare const ExcalidrawContainerContext: React.Context<{
@@ -23,17 +24,18 @@ export declare const ExcalidrawContainerContext: React.Context<{
23
24
  }>;
24
25
  export declare const useApp: () => AppClassProperties;
25
26
  export declare const useAppProps: () => AppProps;
26
- export declare const useDevice: () => Readonly<{
27
- viewport: {
28
- isMobile: boolean;
29
- isLandscape: boolean;
30
- };
31
- editor: {
32
- isMobile: boolean;
33
- canFitSidebar: boolean;
34
- };
27
+ export declare const useEditorInterface: () => Readonly<{
28
+ formFactor: "phone" | "tablet" | "desktop";
29
+ desktopUIMode: "compact" | "full";
30
+ userAgent: Readonly<{
31
+ isMobileDevice: boolean;
32
+ platform: "ios" | "android" | "other" | "unknown";
33
+ }>;
35
34
  isTouchScreen: boolean;
35
+ canFitSidebar: boolean;
36
+ isLandscape: boolean;
36
37
  }>;
38
+ export declare const useStylesPanelMode: () => StylesPanelMode;
37
39
  export declare const useExcalidrawContainer: () => {
38
40
  container: HTMLDivElement | null;
39
41
  id: string | null;
@@ -48,14 +50,14 @@ declare class App extends React.Component<AppProps, AppState> {
48
50
  rc: RoughCanvas;
49
51
  unmounted: boolean;
50
52
  actionManager: ActionManager;
51
- device: Device;
53
+ editorInterface: EditorInterface;
54
+ private stylesPanelMode;
52
55
  private excalidrawContainerRef;
53
56
  scene: Scene;
54
57
  fonts: Fonts;
55
58
  renderer: Renderer;
56
59
  visibleElements: readonly NonDeletedExcalidrawElement[];
57
60
  private resizeObserver;
58
- private nearestScrollableContainer;
59
61
  library: AppClassProperties["library"];
60
62
  libraryItemsFromStorage: LibraryItems | undefined;
61
63
  id: string;
@@ -82,14 +84,21 @@ declare class App extends React.Component<AppProps, AppState> {
82
84
  private elementsPendingErasure;
83
85
  flowChartCreator: FlowChartCreator;
84
86
  private flowChartNavigator;
87
+ bindModeHandler: ReturnType<typeof setTimeout> | null;
85
88
  hitLinkElement?: NonDeletedExcalidrawElement;
86
89
  lastPointerDownEvent: React.PointerEvent<HTMLElement> | null;
87
90
  lastPointerUpEvent: React.PointerEvent<HTMLElement> | PointerEvent | null;
88
91
  lastPointerMoveEvent: PointerEvent | null;
92
+ /** current frame pointer cords */
89
93
  lastPointerMoveCoords: {
90
94
  x: number;
91
95
  y: number;
92
96
  } | null;
97
+ /** previous frame pointer coords */
98
+ previousPointerMoveCoords: {
99
+ x: number;
100
+ y: number;
101
+ } | null;
93
102
  lastViewportPosition: {
94
103
  x: number;
95
104
  y: number;
@@ -112,11 +121,7 @@ declare class App extends React.Component<AppProps, AppState> {
112
121
  x: number;
113
122
  y: number;
114
123
  }>;
115
- scrollbars: {
116
- isOverEither: boolean;
117
- isOverHorizontal: boolean;
118
- isOverVertical: boolean;
119
- };
124
+ scrollbars: ReturnType<typeof isOverScrollBars>;
120
125
  lastCoords: {
121
126
  x: number;
122
127
  y: number;
@@ -129,7 +134,7 @@ declare class App extends React.Component<AppProps, AppState> {
129
134
  x: number;
130
135
  y: number;
131
136
  };
132
- arrowDirection: "end" | "origin";
137
+ arrowDirection: "origin" | "end";
133
138
  center: {
134
139
  x: number;
135
140
  y: number;
@@ -153,16 +158,13 @@ declare class App extends React.Component<AppProps, AppState> {
153
158
  x: number;
154
159
  y: number;
155
160
  };
161
+ blockDragging: boolean;
156
162
  };
157
163
  eventListeners: {
158
- onMove: {
159
- (...args: any[]): void;
160
- flush(): void;
161
- cancel(): void;
162
- } | null;
163
- onUp: ((event: PointerEvent) => void) | null;
164
- onKeyDown: ((event: KeyboardEvent) => void) | null;
165
- onKeyUp: ((event: KeyboardEvent) => void) | null;
164
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
165
+ onUp: null | ((event: PointerEvent) => void);
166
+ onKeyDown: null | ((event: KeyboardEvent) => void);
167
+ onKeyUp: null | ((event: KeyboardEvent) => void);
166
168
  };
167
169
  boxSelection: {
168
170
  hasOccurred: boolean;
@@ -181,11 +183,7 @@ declare class App extends React.Component<AppProps, AppState> {
181
183
  x: number;
182
184
  y: number;
183
185
  }>;
184
- scrollbars: {
185
- isOverEither: boolean;
186
- isOverHorizontal: boolean;
187
- isOverVertical: boolean;
188
- };
186
+ scrollbars: ReturnType<typeof isOverScrollBars>;
189
187
  lastCoords: {
190
188
  x: number;
191
189
  y: number;
@@ -198,7 +196,7 @@ declare class App extends React.Component<AppProps, AppState> {
198
196
  x: number;
199
197
  y: number;
200
198
  };
201
- arrowDirection: "end" | "origin";
199
+ arrowDirection: "origin" | "end";
202
200
  center: {
203
201
  x: number;
204
202
  y: number;
@@ -222,16 +220,13 @@ declare class App extends React.Component<AppProps, AppState> {
222
220
  x: number;
223
221
  y: number;
224
222
  };
223
+ blockDragging: boolean;
225
224
  };
226
225
  eventListeners: {
227
- onMove: {
228
- (...args: any[]): void;
229
- flush(): void;
230
- cancel(): void;
231
- } | null;
232
- onUp: ((event: PointerEvent) => void) | null;
233
- onKeyDown: ((event: KeyboardEvent) => void) | null;
234
- onKeyUp: ((event: KeyboardEvent) => void) | null;
226
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
227
+ onUp: null | ((event: PointerEvent) => void);
228
+ onKeyDown: null | ((event: KeyboardEvent) => void);
229
+ onKeyUp: null | ((event: KeyboardEvent) => void);
235
230
  };
236
231
  boxSelection: {
237
232
  hasOccurred: boolean;
@@ -246,6 +241,10 @@ declare class App extends React.Component<AppProps, AppState> {
246
241
  constructor(props: AppProps);
247
242
  updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
248
243
  private onWindowMessage;
244
+ private handleSkipBindMode;
245
+ private resetDelayedBindMode;
246
+ private previousHoveredBindableElement;
247
+ private handleDelayedBindModeChange;
249
248
  private cacheEmbeddableRef;
250
249
  /**
251
250
  * Returns gridSize taking into account `gridModeEnabled`.
@@ -265,8 +264,8 @@ declare class App extends React.Component<AppProps, AppState> {
265
264
  private toggleOverscrollBehavior;
266
265
  render(): import("react/jsx-runtime").JSX.Element;
267
266
  focusContainer: AppClassProperties["focusContainer"];
268
- getSceneElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[];
269
- getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
267
+ getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
268
+ getSceneElementsMapIncludingDeleted: () => SceneElementsMap;
270
269
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
271
270
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
272
271
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -297,9 +296,11 @@ declare class App extends React.Component<AppProps, AppState> {
297
296
  */
298
297
  private resetScene;
299
298
  private initializeScene;
300
- private isMobileBreakpoint;
301
- private refreshViewportBreakpoints;
302
- private refreshEditorBreakpoints;
299
+ private getFormFactor;
300
+ refreshEditorInterface: () => void;
301
+ private reconcileStylesPanelMode;
302
+ /** TO BE USED LATER */
303
+ private setDesktopUIMode;
303
304
  private clearImageShapeCache;
304
305
  componentDidMount(): Promise<void>;
305
306
  componentWillUnmount(): void;
@@ -316,6 +317,7 @@ declare class App extends React.Component<AppProps, AppState> {
316
317
  private static resetTapTwice;
317
318
  private onTouchStart;
318
319
  private onTouchEnd;
320
+ private insertClipboardContent;
319
321
  pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
320
322
  addElementsFromPasteOrLibrary: (opts: {
321
323
  elements: readonly ExcalidrawElement[];
@@ -332,20 +334,27 @@ declare class App extends React.Component<AppProps, AppState> {
332
334
  setAppState: React.Component<any, AppState>["setState"];
333
335
  removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
334
336
  toggleLock: (source?: "keyboard" | "ui") => void;
335
- updateFrameRendering: (opts: Partial<{
336
- enabled: boolean;
337
- name: boolean;
338
- outline: boolean;
339
- clip: boolean;
340
- }> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
337
+ updateFrameRendering: (opts: Partial<AppState["frameRendering"]> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
341
338
  togglePenMode: (force: boolean | null) => void;
342
339
  onHandToolToggle: () => void;
343
340
  /**
344
341
  * Zooms on canvas viewport center
345
342
  */
346
- zoomCanvas: (value: number) => void;
343
+ zoomCanvas: (
344
+ /**
345
+ * Decimal fraction, auto-clamped between MIN_ZOOM and MAX_ZOOM.
346
+ * 1 = 100% zoom, 2 = 200% zoom, 0.5 = 50% zoom
347
+ */
348
+ value: number) => void;
347
349
  private cancelInProgressAnimation;
348
- scrollToContent: (target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
350
+ scrollToContent: (
351
+ /**
352
+ * target to scroll to
353
+ *
354
+ * - string - id of element or group, or url containing elementLink
355
+ * - ExcalidrawElement | ExcalidrawElement[] - element(s) objects
356
+ */
357
+ target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
349
358
  fitToContent?: boolean;
350
359
  fitToViewport?: never;
351
360
  viewportZoomFactor?: number;
@@ -382,7 +391,7 @@ declare class App extends React.Component<AppProps, AppState> {
382
391
  private addMissingFiles;
383
392
  updateScene: <K extends keyof AppState>(sceneData: {
384
393
  elements?: SceneData["elements"];
385
- appState?: Pick<AppState, K> | null | undefined;
394
+ appState?: Pick<AppState, K> | null;
386
395
  collaborators?: SceneData["collaborators"];
387
396
  /**
388
397
  * Controls which updates should be captured by the `Store`. Captured updates are emmitted and listened to by other components, such as `History` for undo / redo purposes.
@@ -397,7 +406,7 @@ declare class App extends React.Component<AppProps, AppState> {
397
406
  */
398
407
  captureUpdate?: SceneData["captureUpdate"];
399
408
  }) => void;
400
- applyDeltas: (deltas: StoreDelta[], options?: ApplyDeltasOptions) => [SceneElementsMap, AppState, boolean];
409
+ applyDeltas: (deltas: StoreDelta[], options?: ApplyToOptions) => [SceneElementsMap, AppState, boolean];
401
410
  mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
402
411
  private triggerRender;
403
412
  /**
@@ -405,8 +414,8 @@ declare class App extends React.Component<AppProps, AppState> {
405
414
  */
406
415
  toggleSidebar: ({ name, tab, force, }: {
407
416
  name: SidebarName | null;
408
- tab?: string | undefined;
409
- force?: boolean | undefined;
417
+ tab?: SidebarTabName;
418
+ force?: boolean;
410
419
  }) => boolean;
411
420
  private updateCurrentCursorPosition;
412
421
  getEditorUIOffsets: () => Offsets;
@@ -489,7 +498,7 @@ declare class App extends React.Component<AppProps, AppState> {
489
498
  sceneY: number;
490
499
  link: string;
491
500
  }) => NonDeleted<ExcalidrawEmbeddableElement> | undefined;
492
- private createImageElement;
501
+ private newImagePlaceholder;
493
502
  private handleLinearElementOnPointerDown;
494
503
  private getCurrentItemRoundness;
495
504
  private createGenericElementOnPointerDown;
@@ -510,11 +519,7 @@ declare class App extends React.Component<AppProps, AppState> {
510
519
  * and when you don't want to loose those modifications
511
520
  */
512
521
  private getLatestInitializedImageElement;
513
- /**
514
- * inserts image into elements array and rerenders
515
- */
516
- private insertImageElement;
517
- private onImageAction;
522
+ private onImageToolbarButtonClick;
518
523
  private getImageNaturalDimensions;
519
524
  /** updates image cache, refreshing updated elements and/or setting status
520
525
  to error for images that fail during <img> element creation */
@@ -525,9 +530,9 @@ declare class App extends React.Component<AppProps, AppState> {
525
530
  * to render new images. This is just a failsafe */
526
531
  private scheduleImageRefresh;
527
532
  private updateBindingEnabledOnPointerMove;
528
- private maybeSuggestBindingAtCursor;
529
533
  private clearSelection;
530
534
  private handleInteractiveCanvasRef;
535
+ private insertImages;
531
536
  private handleAppOnDrop;
532
537
  loadFileToCanvas: (file: File, fileHandle: FileSystemHandle | null) => Promise<void>;
533
538
  private handleCanvasContextMenu;
@@ -542,6 +547,7 @@ declare class App extends React.Component<AppProps, AppState> {
542
547
  private updateDOMRect;
543
548
  refresh: () => void;
544
549
  private getCanvasOffsets;
550
+ watchState: () => void;
545
551
  private updateLanguage;
546
552
  }
547
553
  declare global {
@@ -551,6 +557,7 @@ declare global {
551
557
  elements: readonly ExcalidrawElement[];
552
558
  state: AppState;
553
559
  setState: React.Component<any, AppState>["setState"];
560
+ watchState: (prev: any, next: any) => void | undefined;
554
561
  app: InstanceType<typeof App>;
555
562
  history: History;
556
563
  store: Store;
@@ -1,7 +1,5 @@
1
- /// <reference types="react" />
2
- import OpenColor from "open-color";
3
1
  import "./Card.scss";
4
2
  export declare const Card: React.FC<{
5
- color: keyof OpenColor | "primary";
3
+ color: "primary" | "lime" | "pink";
6
4
  children?: React.ReactNode;
7
5
  }>;
@@ -1,10 +1,8 @@
1
1
  import type { ColorPickerType } from "./colorPickerUtils";
2
- interface ColorInputProps {
2
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: {
3
3
  color: string;
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  colorPickerType: ColorPickerType;
7
7
  placeholder?: string;
8
- }
9
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,6 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import "./ColorPicker.scss";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  import type { AppState } from "../../types";
6
- export declare const getColor: (color: string) => string | null;
7
6
  interface ColorPickerProps {
8
7
  type: ColorPickerType;
9
8
  /**
@@ -10,8 +10,10 @@ interface PickerProps {
10
10
  palette: ColorPaletteCustom;
11
11
  updateData: (formData?: any) => void;
12
12
  children?: React.ReactNode;
13
+ showTitle?: boolean;
13
14
  onEyeDropperToggle: (force?: boolean) => void;
14
15
  onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
16
+ showHotKey?: boolean;
15
17
  }
16
18
  export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
17
19
  export {};
@@ -4,6 +4,7 @@ interface PickerColorListProps {
4
4
  color: string | null;
5
5
  onChange: (color: string) => void;
6
6
  activeShade: number;
7
+ showHotKey?: boolean;
7
8
  }
8
- declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PickerColorList: ({ palette, color, onChange, activeShade, showHotKey, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default PickerColorList;
@@ -3,6 +3,7 @@ interface ShadeListProps {
3
3
  color: string | null;
4
4
  onChange: (color: string) => void;
5
5
  palette: ColorPaletteCustom;
6
+ showHotKey?: boolean;
6
7
  }
7
- export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ShadeList: ({ color, onChange, palette, showHotKey, }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -17,5 +17,4 @@ export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades
17
17
  export declare const activeColorPickerSectionAtom: import("jotai/vanilla/atom").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
18
18
  init: ActiveColorPickerSectionAtomType;
19
19
  };
20
- export declare const isColorDark: (color: string, threshold?: number) => boolean;
21
20
  export type ColorPickerType = "canvasBackground" | "elementBackground" | "elementStroke";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
3
2
  import type { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
4
3
  interface ColorPickerKeyNavHandlerProps {
@@ -8,6 +8,7 @@ export declare const DEFAULT_CATEGORIES: {
8
8
  editor: string;
9
9
  elements: string;
10
10
  links: string;
11
+ library: string;
11
12
  };
12
13
  type CommandPaletteProps = {
13
14
  customCommandPaletteItems?: CommandPaletteItem[];
@@ -1,7 +1,5 @@
1
- /// <reference types="react" />
2
1
  import type { ActionManager } from "../../actions/manager";
3
2
  import type { Action } from "../../actions/types";
4
- import type { UIAppState } from "../../types";
5
3
  export type CommandPaletteItem = {
6
4
  label: string;
7
5
  /** additional keywords to match against
@@ -12,7 +10,7 @@ export type CommandPaletteItem = {
12
10
  * (deburred name + keywords)
13
11
  */
14
12
  haystack?: string;
15
- icon?: React.ReactNode | ((appState: UIAppState) => React.ReactNode);
13
+ icon?: Action["icon"];
16
14
  category: string;
17
15
  order?: number;
18
16
  predicate?: boolean | Action["predicate"];
@@ -16,8 +16,8 @@ export declare const adjustBoundTextSize: (container: ExcalidrawTextContainer, b
16
16
  type ConversionType = "generic" | "linear" | null;
17
17
  export declare const convertElementTypes: (app: App, { conversionType, nextType, direction, }: {
18
18
  conversionType: ConversionType;
19
- nextType?: ConvertibleTypes | undefined;
20
- direction?: "left" | "right" | undefined;
19
+ nextType?: ConvertibleTypes;
20
+ direction?: "left" | "right";
21
21
  }) => boolean;
22
22
  export declare const getConversionTypeFromElements: (elements: ExcalidrawElement[]) => ConversionType;
23
23
  export default ConvertElementTypePopup;
@@ -3,5 +3,5 @@ import "./ToolIcon.scss";
3
3
  export declare const DarkModeToggle: (props: {
4
4
  value: Theme;
5
5
  onChange: (value: Theme) => void;
6
- title?: string | undefined;
6
+ title?: string;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,22 @@
1
- /// <reference types="react" />
2
1
  import type { MarkOptional } from "@excalidraw/common/utility-types";
3
2
  import "../components/dropdownMenu/DropdownMenu.scss";
4
3
  import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
5
4
  export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
6
- name: string;
7
- children: import("react").ReactNode;
8
- onStateChange?: ((state: {
9
- name: string;
10
- tab?: string | undefined;
11
- } | null) => void) | undefined;
12
- onDock?: ((docked: boolean) => void) | undefined;
13
- docked?: boolean | undefined;
14
- className?: string | undefined;
15
- __fallback?: boolean | undefined;
5
+ name: import("../types").SidebarName;
6
+ children: React.ReactNode;
7
+ onStateChange?: (state: import("../types").AppState["openSidebar"]) => void;
8
+ onDock?: (docked: boolean) => void;
9
+ docked?: boolean;
10
+ className?: string;
11
+ __fallback?: boolean;
16
12
  }, "name">, "children">, "onDock"> & {
17
13
  /** pass `false` to disable docking */
18
14
  onDock?: SidebarProps["onDock"] | false;
19
15
  } & {
20
- __fallback?: boolean | undefined;
16
+ __fallback?: boolean;
21
17
  }> & {
22
18
  Trigger: import("react").FC<Omit<SidebarTriggerProps, "name"> & import("react").HTMLAttributes<HTMLDivElement> & {
23
- __fallback?: boolean | undefined;
19
+ __fallback?: boolean;
24
20
  }>;
25
21
  TabTriggers: {
26
22
  ({ children }: {
@@ -6,7 +6,7 @@ declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, g
6
6
  sourceElementId: ExcalidrawElement["id"];
7
7
  appState: UIAppState;
8
8
  scene: Scene;
9
- onClose?: (() => void) | undefined;
9
+ onClose?: () => void;
10
10
  generateLinkForSelection: AppProps["generateLinkForSelection"];
11
11
  }) => import("react/jsx-runtime").JSX.Element;
12
12
  export default ElementLinkDialog;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Ellipsify: ({ children, ...rest }: {
3
2
  children: React.ReactNode;
4
- } & import("react").HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
3
+ } & React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  export declare const ErrorDialog: ({ children, onClose, }: {
3
3
  children?: React.ReactNode;
4
- onClose?: (() => void) | undefined;
4
+ onClose?: () => void;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import "./ExcalidrawLogo.scss";
3
- type LogoSize = "xs" | "small" | "normal" | "large" | "custom";
2
+ type LogoSize = "xs" | "small" | "normal" | "large" | "custom" | "mobile";
4
3
  interface LogoProps {
5
4
  size?: LogoSize;
6
5
  withText?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
3
2
  import "./EyeDropper.scss";
4
3
  import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
@@ -4,7 +4,7 @@ export type ButtonVariant = "filled" | "outlined" | "icon";
4
4
  export type ButtonColor = "primary" | "danger" | "warning" | "muted" | "success";
5
5
  export type ButtonSize = "medium" | "large";
6
6
  export type FilledButtonProps = {
7
- label: string;
7
+ label?: string;
8
8
  children?: React.ReactNode;
9
9
  onClick?: (event: React.MouseEvent) => void;
10
10
  status?: null | "loading" | "success";
@@ -14,5 +14,6 @@ export type FilledButtonProps = {
14
14
  className?: string;
15
15
  fullWidth?: boolean;
16
16
  icon?: React.ReactNode;
17
+ disabled?: boolean;
17
18
  };
18
19
  export declare const FilledButton: React.ForwardRefExoticComponent<FilledButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -16,6 +16,7 @@ interface FontPickerProps {
16
16
  onHover: (fontFamily: FontFamilyValues) => void;
17
17
  onLeave: () => void;
18
18
  onPopupChange: (open: boolean) => void;
19
+ compactMode?: boolean;
19
20
  }
20
- export declare const FontPicker: React.MemoExoticComponent<({ isOpened, selectedFontFamily, hoveredFontFamily, onSelect, onHover, onLeave, onPopupChange, }: FontPickerProps) => import("react/jsx-runtime").JSX.Element>;
21
+ export declare const FontPicker: React.MemoExoticComponent<({ isOpened, selectedFontFamily, hoveredFontFamily, onSelect, onHover, onLeave, onPopupChange, compactMode, }: FontPickerProps) => import("react/jsx-runtime").JSX.Element>;
21
22
  export {};
@@ -1,6 +1,8 @@
1
1
  import type { FontFamilyValues } from "@excalidraw/element/types";
2
2
  interface FontPickerTriggerProps {
3
3
  selectedFontFamily: FontFamilyValues | null;
4
+ isOpened?: boolean;
5
+ compactMode?: boolean;
4
6
  }
5
- export declare const FontPickerTrigger: ({ selectedFontFamily, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const FontPickerTrigger: ({ selectedFontFamily, isOpened, compactMode, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Node } from "@excalidraw/common";
3
2
  import { type FontDescriptor } from "./FontPickerList";
4
3
  interface FontPickerKeyNavHandlerProps {
@@ -1,4 +1,4 @@
1
1
  import "./HelpDialog.scss";
2
2
  export declare const HelpDialog: ({ onClose }: {
3
- onClose?: (() => void) | undefined;
3
+ onClose?: () => void;
4
4
  }) => import("react/jsx-runtime").JSX.Element;