@excalidraw/common 0.18.0-5fffc47 → 0.18.0-6135548

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 (207) hide show
  1. package/dist/dev/index.js +1299 -256
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +3 -3
  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 +16 -28
  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 +48 -36
  13. package/dist/types/element/src/Scene.d.ts +4 -4
  14. package/dist/types/element/src/binding.d.ts +58 -44
  15. package/dist/types/element/src/bounds.d.ts +2 -10
  16. package/dist/types/element/src/collision.d.ts +6 -2
  17. package/dist/types/element/src/comparisons.d.ts +7 -7
  18. package/dist/types/element/src/dragElements.d.ts +3 -3
  19. package/dist/types/element/src/duplicate.d.ts +3 -3
  20. package/dist/types/element/src/fractionalIndex.d.ts +2 -2
  21. package/dist/types/element/src/frame.d.ts +7 -3
  22. package/dist/types/element/src/heading.d.ts +2 -1
  23. package/dist/types/element/src/image.d.ts +1 -11
  24. package/dist/types/element/src/index.d.ts +1 -3
  25. package/dist/types/element/src/linearElementEditor.d.ts +16 -20
  26. package/dist/types/element/src/mutateElement.d.ts +3 -1
  27. package/dist/types/element/src/newElement.d.ts +6 -6
  28. package/dist/types/element/src/renderElement.d.ts +1 -7
  29. package/dist/types/element/src/resizeElements.d.ts +10 -10
  30. package/dist/types/element/src/resizeTest.d.ts +6 -5
  31. package/dist/types/element/src/selection.d.ts +3 -7
  32. package/dist/types/element/src/shape.d.ts +8 -7
  33. package/dist/types/element/src/textMeasurements.d.ts +1 -3
  34. package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
  35. package/dist/types/element/src/transformHandles.d.ts +8 -27
  36. package/dist/types/element/src/typeChecks.d.ts +4 -7
  37. package/dist/types/element/src/types.d.ts +7 -11
  38. package/dist/types/element/src/utils.d.ts +5 -2
  39. package/dist/types/element/src/zindex.d.ts +7 -1
  40. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +123 -181
  41. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
  42. package/dist/types/excalidraw/actions/actionBoundText.d.ts +57 -96
  43. package/dist/types/excalidraw/actions/actionCanvas.d.ts +341 -763
  44. package/dist/types/excalidraw/actions/actionClipboard.d.ts +93 -893
  45. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +27 -47
  46. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +95 -159
  47. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
  48. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
  49. package/dist/types/excalidraw/actions/actionElementLink.d.ts +42 -64
  50. package/dist/types/excalidraw/actions/actionElementLock.d.ts +56 -95
  51. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +44 -64
  52. package/dist/types/excalidraw/actions/actionExport.d.ts +124 -1129
  53. package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -404
  54. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
  55. package/dist/types/excalidraw/actions/actionFrame.d.ts +232 -347
  56. package/dist/types/excalidraw/actions/actionGroup.d.ts +60 -107
  57. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +159 -219
  58. package/dist/types/excalidraw/actions/actionLink.d.ts +45 -65
  59. package/dist/types/excalidraw/actions/actionMenu.d.ts +36 -58
  60. package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -369
  61. package/dist/types/excalidraw/actions/actionProperties.d.ts +117 -2560
  62. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +30 -54
  63. package/dist/types/excalidraw/actions/actionStyles.d.ts +27 -47
  64. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  65. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +44 -64
  66. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +44 -64
  67. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +36 -58
  68. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
  69. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +43 -63
  70. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +44 -64
  71. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +44 -64
  72. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
  73. package/dist/types/excalidraw/actions/register.d.ts +2 -2
  74. package/dist/types/excalidraw/actions/types.d.ts +3 -3
  75. package/dist/types/excalidraw/appState.d.ts +15 -14
  76. package/dist/types/excalidraw/clipboard.d.ts +7 -31
  77. package/dist/types/excalidraw/components/Actions.d.ts +5 -2
  78. package/dist/types/excalidraw/components/App.d.ts +58 -58
  79. package/dist/types/excalidraw/components/Card.d.ts +1 -3
  80. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
  81. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -2
  82. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
  83. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  84. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -3
  85. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
  86. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  87. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
  88. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  89. package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
  90. package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
  91. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -1
  92. package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
  93. package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
  94. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
  95. package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
  96. package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
  97. package/dist/types/excalidraw/components/InlineIcon.d.ts +2 -2
  98. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  99. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
  100. package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
  101. package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
  102. package/dist/types/excalidraw/components/MobileMenu.d.ts +1 -1
  103. package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -1
  104. package/dist/types/excalidraw/components/Modal.d.ts +0 -1
  105. package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Popover.d.ts +2 -1
  107. package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
  108. package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
  109. package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
  110. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
  111. package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
  112. package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
  113. package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
  114. package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
  115. package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
  116. package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
  117. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
  118. package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
  119. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
  120. package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
  121. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  122. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
  123. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +27 -0
  124. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
  125. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +26 -0
  126. package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
  127. package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
  128. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
  129. package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
  130. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +4 -25
  131. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +2 -2
  132. package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
  133. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
  134. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
  135. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
  136. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  137. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
  138. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +8 -0
  139. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
  140. package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
  141. package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
  142. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
  143. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +91 -0
  144. package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
  145. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +24 -0
  146. package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
  147. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
  148. package/dist/types/excalidraw/components/Toast.d.ts +3 -3
  149. package/dist/types/excalidraw/components/Trans.d.ts +2 -2
  150. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
  151. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -33
  152. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +5 -5
  153. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
  154. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +12 -19
  155. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
  156. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
  157. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
  158. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
  159. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
  160. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  161. package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
  162. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  163. package/dist/types/excalidraw/components/icons.d.ts +21 -12
  164. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +4 -3
  165. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -2
  166. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +26 -32
  167. package/dist/types/excalidraw/components/shapes.d.ts +1 -1
  168. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +6 -6
  169. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +15 -16
  170. package/dist/types/excalidraw/data/blob.d.ts +321 -3
  171. package/dist/types/excalidraw/data/encode.d.ts +4 -4
  172. package/dist/types/excalidraw/data/encryption.d.ts +5 -5
  173. package/dist/types/excalidraw/data/filesystem.d.ts +2 -2
  174. package/dist/types/excalidraw/data/index.d.ts +3 -3
  175. package/dist/types/excalidraw/data/json.d.ts +159 -2
  176. package/dist/types/excalidraw/data/library.d.ts +24 -9
  177. package/dist/types/excalidraw/data/restore.d.ts +25 -10
  178. package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
  179. package/dist/types/excalidraw/errors.d.ts +14 -0
  180. package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
  181. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
  182. package/dist/types/excalidraw/i18n.d.ts +2 -2
  183. package/dist/types/excalidraw/index.d.ts +6 -7
  184. package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
  185. package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
  186. package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
  187. package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
  188. package/dist/types/excalidraw/scene/export.d.ts +2 -2
  189. package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
  190. package/dist/types/excalidraw/scene/types.d.ts +22 -5
  191. package/dist/types/excalidraw/shortcut.d.ts +1 -0
  192. package/dist/types/excalidraw/snapping.d.ts +5 -5
  193. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
  194. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
  195. package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
  196. package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
  197. package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
  198. package/dist/types/excalidraw/types.d.ts +22 -20
  199. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -2
  200. package/dist/types/math/src/polygon.d.ts +2 -2
  201. package/dist/types/math/src/range.d.ts +1 -3
  202. package/dist/types/math/src/segment.d.ts +3 -3
  203. package/dist/types/utils/src/bbox.d.ts +1 -1
  204. package/dist/types/utils/src/export.d.ts +5 -5
  205. package/dist/types/utils/src/shape.d.ts +6 -6
  206. package/dist/types/utils/src/withinBounds.d.ts +2 -2
  207. package/package.json +7 -1
@@ -23,26 +23,16 @@ export declare const probablySupportsClipboardReadText: boolean;
23
23
  export declare const probablySupportsClipboardWriteText: boolean;
24
24
  export declare const probablySupportsClipboardBlob: boolean;
25
25
  export declare const createPasteEvent: ({ types, files, }: {
26
- types?: {
27
- "text/plain"?: string | File | undefined;
28
- "text/html"?: string | File | undefined;
29
- "image/svg+xml"?: string | File | undefined;
30
- "image/png"?: string | File | undefined;
31
- "image/jpeg"?: string | File | undefined;
32
- "image/gif"?: string | File | undefined;
33
- "image/webp"?: string | File | undefined;
34
- "image/bmp"?: string | File | undefined;
35
- "image/x-icon"?: string | File | undefined;
36
- "image/avif"?: string | File | undefined;
37
- "image/jfif"?: string | File | undefined;
38
- } | undefined;
39
- files?: File[] | undefined;
26
+ types?: { [key in AllowedPasteMimeTypes]?: string | File; };
27
+ files?: File[];
40
28
  }) => ClipboardEvent;
41
29
  export declare const serializeAsClipboardJSON: ({ elements, files, }: {
42
30
  elements: readonly NonDeletedExcalidrawElement[];
43
31
  files: BinaryFiles | null;
44
32
  }) => string;
45
- export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
33
+ export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null,
34
+ /** supply if available to make the operation more certain to succeed */
35
+ clipboardEvent?: ClipboardEvent | null) => Promise<void>;
46
36
  /**
47
37
  * Reads OS clipboard programmatically. May not work on all browsers.
48
38
  * Will prompt user for permission if not granted.
@@ -101,22 +91,8 @@ type ParsedDataTranferList = ParsedDataTransferItem[] & {
101
91
  getData: typeof getDataTransferItemData;
102
92
  getFiles: typeof getDataTransferFiles;
103
93
  };
104
- declare const findDataTransferItemType: <T extends ValueOf<{
105
- readonly text: "text/plain";
106
- readonly html: "text/html";
107
- readonly json: "application/json";
108
- readonly excalidraw: "application/vnd.excalidraw+json";
109
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
110
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
111
- }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
112
- declare const getDataTransferItemData: <T extends ValueOf<{
113
- readonly text: "text/plain";
114
- readonly html: "text/html";
115
- readonly json: "application/json";
116
- readonly excalidraw: "application/vnd.excalidraw+json";
117
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
118
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
119
- }>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
94
+ declare const findDataTransferItemType: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
95
+ declare const getDataTransferItemData: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
120
96
  declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
121
97
  export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
122
98
  /**
@@ -36,9 +36,12 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
36
36
  }) => import("react/jsx-runtime").JSX.Element;
37
37
  export declare const UndoRedoActions: ({ renderAction, className, }: {
38
38
  renderAction: ActionManager["renderAction"];
39
- className?: string | undefined;
39
+ className?: string;
40
40
  }) => import("react/jsx-runtime").JSX.Element;
41
- export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }: {
41
+ export declare const ExitZenModeButton: ({ actionManager, showExitZenModeBtn, }: {
42
42
  actionManager: ActionManager;
43
43
  showExitZenModeBtn: boolean;
44
44
  }) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const ExitViewModeButton: ({ actionManager, }: {
46
+ actionManager: ActionManager;
47
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
2
+ import { type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
3
3
  import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
4
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";
@@ -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 } 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,6 +84,7 @@ 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;
@@ -112,11 +115,7 @@ declare class App extends React.Component<AppProps, AppState> {
112
115
  x: number;
113
116
  y: number;
114
117
  }>;
115
- scrollbars: {
116
- isOverEither: boolean;
117
- isOverHorizontal: boolean;
118
- isOverVertical: boolean;
119
- };
118
+ scrollbars: ReturnType<typeof isOverScrollBars>;
120
119
  lastCoords: {
121
120
  x: number;
122
121
  y: number;
@@ -129,7 +128,7 @@ declare class App extends React.Component<AppProps, AppState> {
129
128
  x: number;
130
129
  y: number;
131
130
  };
132
- arrowDirection: "end" | "origin";
131
+ arrowDirection: "origin" | "end";
133
132
  center: {
134
133
  x: number;
135
134
  y: number;
@@ -156,14 +155,10 @@ declare class App extends React.Component<AppProps, AppState> {
156
155
  blockDragging: boolean;
157
156
  };
158
157
  eventListeners: {
159
- onMove: {
160
- (...args: any[]): void;
161
- flush(): void;
162
- cancel(): void;
163
- } | null;
164
- onUp: ((event: PointerEvent) => void) | null;
165
- onKeyDown: ((event: KeyboardEvent) => void) | null;
166
- onKeyUp: ((event: KeyboardEvent) => void) | null;
158
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
159
+ onUp: null | ((event: PointerEvent) => void);
160
+ onKeyDown: null | ((event: KeyboardEvent) => void);
161
+ onKeyUp: null | ((event: KeyboardEvent) => void);
167
162
  };
168
163
  boxSelection: {
169
164
  hasOccurred: boolean;
@@ -182,11 +177,7 @@ declare class App extends React.Component<AppProps, AppState> {
182
177
  x: number;
183
178
  y: number;
184
179
  }>;
185
- scrollbars: {
186
- isOverEither: boolean;
187
- isOverHorizontal: boolean;
188
- isOverVertical: boolean;
189
- };
180
+ scrollbars: ReturnType<typeof isOverScrollBars>;
190
181
  lastCoords: {
191
182
  x: number;
192
183
  y: number;
@@ -199,7 +190,7 @@ declare class App extends React.Component<AppProps, AppState> {
199
190
  x: number;
200
191
  y: number;
201
192
  };
202
- arrowDirection: "end" | "origin";
193
+ arrowDirection: "origin" | "end";
203
194
  center: {
204
195
  x: number;
205
196
  y: number;
@@ -226,14 +217,10 @@ declare class App extends React.Component<AppProps, AppState> {
226
217
  blockDragging: boolean;
227
218
  };
228
219
  eventListeners: {
229
- onMove: {
230
- (...args: any[]): void;
231
- flush(): void;
232
- cancel(): void;
233
- } | null;
234
- onUp: ((event: PointerEvent) => void) | null;
235
- onKeyDown: ((event: KeyboardEvent) => void) | null;
236
- onKeyUp: ((event: KeyboardEvent) => void) | null;
220
+ onMove: null | ReturnType<typeof import("@excalidraw/common").throttleRAF>;
221
+ onUp: null | ((event: PointerEvent) => void);
222
+ onKeyDown: null | ((event: KeyboardEvent) => void);
223
+ onKeyUp: null | ((event: KeyboardEvent) => void);
237
224
  };
238
225
  boxSelection: {
239
226
  hasOccurred: boolean;
@@ -248,6 +235,10 @@ declare class App extends React.Component<AppProps, AppState> {
248
235
  constructor(props: AppProps);
249
236
  updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
250
237
  private onWindowMessage;
238
+ private handleSkipBindMode;
239
+ private resetDelayedBindMode;
240
+ private previousHoveredBindableElement;
241
+ private handleDelayedBindModeChange;
251
242
  private cacheEmbeddableRef;
252
243
  /**
253
244
  * Returns gridSize taking into account `gridModeEnabled`.
@@ -268,7 +259,7 @@ declare class App extends React.Component<AppProps, AppState> {
268
259
  render(): import("react/jsx-runtime").JSX.Element;
269
260
  focusContainer: AppClassProperties["focusContainer"];
270
261
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
271
- getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
262
+ getSceneElementsMapIncludingDeleted: () => SceneElementsMap;
272
263
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
273
264
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
274
265
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -299,10 +290,11 @@ declare class App extends React.Component<AppProps, AppState> {
299
290
  */
300
291
  private resetScene;
301
292
  private initializeScene;
302
- private isMobileBreakpoint;
303
- private isTabletBreakpoint;
304
- private refreshViewportBreakpoints;
305
- private refreshEditorBreakpoints;
293
+ private getFormFactor;
294
+ refreshEditorInterface: () => void;
295
+ private reconcileStylesPanelMode;
296
+ /** TO BE USED LATER */
297
+ private setDesktopUIMode;
306
298
  private clearImageShapeCache;
307
299
  componentDidMount(): Promise<void>;
308
300
  componentWillUnmount(): void;
@@ -336,20 +328,27 @@ declare class App extends React.Component<AppProps, AppState> {
336
328
  setAppState: React.Component<any, AppState>["setState"];
337
329
  removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
338
330
  toggleLock: (source?: "keyboard" | "ui") => void;
339
- updateFrameRendering: (opts: Partial<{
340
- enabled: boolean;
341
- name: boolean;
342
- outline: boolean;
343
- clip: boolean;
344
- }> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
331
+ updateFrameRendering: (opts: Partial<AppState["frameRendering"]> | ((prevState: AppState["frameRendering"]) => Partial<AppState["frameRendering"]>)) => void;
345
332
  togglePenMode: (force: boolean | null) => void;
346
333
  onHandToolToggle: () => void;
347
334
  /**
348
335
  * Zooms on canvas viewport center
349
336
  */
350
- zoomCanvas: (value: number) => void;
337
+ zoomCanvas: (
338
+ /**
339
+ * Decimal fraction, auto-clamped between MIN_ZOOM and MAX_ZOOM.
340
+ * 1 = 100% zoom, 2 = 200% zoom, 0.5 = 50% zoom
341
+ */
342
+ value: number) => void;
351
343
  private cancelInProgressAnimation;
352
- scrollToContent: (target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
344
+ scrollToContent: (
345
+ /**
346
+ * target to scroll to
347
+ *
348
+ * - string - id of element or group, or url containing elementLink
349
+ * - ExcalidrawElement | ExcalidrawElement[] - element(s) objects
350
+ */
351
+ target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
353
352
  fitToContent?: boolean;
354
353
  fitToViewport?: never;
355
354
  viewportZoomFactor?: number;
@@ -386,7 +385,7 @@ declare class App extends React.Component<AppProps, AppState> {
386
385
  private addMissingFiles;
387
386
  updateScene: <K extends keyof AppState>(sceneData: {
388
387
  elements?: SceneData["elements"];
389
- appState?: Pick<AppState, K> | null | undefined;
388
+ appState?: Pick<AppState, K> | null;
390
389
  collaborators?: SceneData["collaborators"];
391
390
  /**
392
391
  * 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.
@@ -409,8 +408,8 @@ declare class App extends React.Component<AppProps, AppState> {
409
408
  */
410
409
  toggleSidebar: ({ name, tab, force, }: {
411
410
  name: SidebarName | null;
412
- tab?: string | undefined;
413
- force?: boolean | undefined;
411
+ tab?: SidebarTabName;
412
+ force?: boolean;
414
413
  }) => boolean;
415
414
  private updateCurrentCursorPosition;
416
415
  getEditorUIOffsets: () => Offsets;
@@ -525,7 +524,6 @@ declare class App extends React.Component<AppProps, AppState> {
525
524
  * to render new images. This is just a failsafe */
526
525
  private scheduleImageRefresh;
527
526
  private updateBindingEnabledOnPointerMove;
528
- private maybeSuggestBindingAtCursor;
529
527
  private clearSelection;
530
528
  private handleInteractiveCanvasRef;
531
529
  private insertImages;
@@ -543,6 +541,7 @@ declare class App extends React.Component<AppProps, AppState> {
543
541
  private updateDOMRect;
544
542
  refresh: () => void;
545
543
  private getCanvasOffsets;
544
+ watchState: () => void;
546
545
  private updateLanguage;
547
546
  }
548
547
  declare global {
@@ -552,6 +551,7 @@ declare global {
552
551
  elements: readonly ExcalidrawElement[];
553
552
  state: AppState;
554
553
  setState: React.Component<any, AppState>["setState"];
554
+ watchState: (prev: any, next: any) => void | undefined;
555
555
  app: InstanceType<typeof App>;
556
556
  history: History;
557
557
  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
  /**
@@ -18,7 +17,6 @@ interface ColorPickerProps {
18
17
  palette?: ColorPaletteCustom | null;
19
18
  topPicks?: ColorTuple;
20
19
  updateData: (formData?: any) => void;
21
- compactMode?: boolean;
22
20
  }
23
21
  export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
24
22
  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 {
@@ -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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./ExcalidrawLogo.scss";
3
2
  type LogoSize = "xs" | "small" | "normal" | "large" | "custom" | "mobile";
4
3
  interface LogoProps {
@@ -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>>;
@@ -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;
@@ -1,10 +1,11 @@
1
+ import type { EditorInterface } from "@excalidraw/common";
1
2
  import "./HintViewer.scss";
2
- import type { AppClassProperties, Device, UIAppState } from "../types";
3
+ import type { AppClassProperties, UIAppState } from "../types";
3
4
  interface HintViewerProps {
4
5
  appState: UIAppState;
5
6
  isMobile: boolean;
6
- device: Device;
7
+ editorInterface: EditorInterface;
7
8
  app: AppClassProperties;
8
9
  }
9
- export declare const HintViewer: ({ appState, isMobile, device, app, }: HintViewerProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export declare const HintViewer: ({ appState, isMobile, editorInterface, app, }: HintViewerProps) => import("react/jsx-runtime").JSX.Element | null;
10
11
  export {};
@@ -1,5 +1,5 @@
1
1
  export declare const InlineIcon: ({ className, icon, size, }: {
2
- className?: string | undefined;
2
+ className?: string;
3
3
  icon: React.ReactNode;
4
- size?: string | undefined;
4
+ size?: string;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ export declare const LibraryMenuControlButtons: ({ libraryReturnUrl, theme, id,
5
5
  id: string;
6
6
  style: React.CSSProperties;
7
7
  children?: React.ReactNode;
8
- className?: string | undefined;
8
+ className?: string;
9
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type Library from "../data/library";
3
2
  import type { LibraryItem, UIAppState } from "../types";
4
3
  export declare const LibraryDropdownMenuButton: React.FC<{
@@ -14,5 +13,5 @@ export declare const LibraryDropdownMenuButton: React.FC<{
14
13
  export declare const LibraryDropdownMenu: ({ selectedItems, onSelectItems, className, }: {
15
14
  selectedItems: LibraryItem["id"][];
16
15
  onSelectItems: (id: LibraryItem["id"][]) => void;
17
- className?: string | undefined;
16
+ className?: string;
18
17
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,10 @@
1
- /// <reference types="react" />
2
1
  import "./LibraryUnit.scss";
3
2
  import type { LibraryItem } from "../types";
4
3
  import type { SvgCache } from "../hooks/useLibraryItemSvg";
5
4
  export declare const LibraryUnit: import("react").MemoExoticComponent<({ id, elements, isPending, onClick, selected, onToggle, onDrag, svgCache, }: {
6
5
  id: LibraryItem["id"] | /** for pending item */ null;
7
- elements?: readonly import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | undefined;
8
- isPending?: boolean | undefined;
6
+ elements?: LibraryItem["elements"];
7
+ isPending?: boolean;
9
8
  onClick: (id: LibraryItem["id"] | null) => void;
10
9
  selected: boolean;
11
10
  onToggle: (id: string, event: React.MouseEvent) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Theme } from "@excalidraw/element/types";
3
2
  export declare const LoadingMessage: React.FC<{
4
3
  delay?: number;
@@ -19,5 +19,5 @@ type MobileMenuProps = {
19
19
  UIOptions: AppProps["UIOptions"];
20
20
  app: AppClassProperties;
21
21
  };
22
- export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, onPenModeToggle, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
23
23
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./ToolIcon.scss";
3
2
  import "./MobileToolBar.scss";
4
3
  import type { AppClassProperties, UIAppState } from "../types";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./Modal.scss";
3
2
  import type { AppState } from "../types";
4
3
  export declare const Modal: React.FC<{
@@ -4,7 +4,7 @@ export type OverwriteConfirmDialogProps = {
4
4
  children: React.ReactNode;
5
5
  };
6
6
  declare const OverwriteConfirmDialog: React.FC<OverwriteConfirmDialogProps & {
7
- __fallback?: boolean | undefined;
7
+ __fallback?: boolean;
8
8
  }> & {
9
9
  Actions: (({ children }: {
10
10
  children: React.ReactNode;