@zsviczian/excalidraw 0.17.1-obsidian-20 → 0.17.1-obsidian-22

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 (197) hide show
  1. package/dist/excalidraw.development.js +217 -96
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +88 -63
  4. package/dist/styles.production.css +6 -6
  5. package/package.json +2 -1
  6. package/types/excalidraw/actions/actionAddToLibrary.d.ts +4 -4
  7. package/types/excalidraw/actions/actionAlign.d.ts +22 -22
  8. package/types/excalidraw/actions/actionBoundText.d.ts +10 -10
  9. package/types/excalidraw/actions/actionCanvas.d.ts +68 -68
  10. package/types/excalidraw/actions/actionClipboard.d.ts +24 -24
  11. package/types/excalidraw/actions/actionDeleteSelected.d.ts +10 -10
  12. package/types/excalidraw/actions/actionDistribute.d.ts +10 -10
  13. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +7 -8
  14. package/types/excalidraw/actions/actionElementLock.d.ts +9 -9
  15. package/types/excalidraw/actions/actionExport.d.ts +33 -33
  16. package/types/excalidraw/actions/actionFinalize.d.ts +9 -9
  17. package/types/excalidraw/actions/actionFlip.d.ts +10 -10
  18. package/types/excalidraw/actions/actionFrame.d.ts +16 -204
  19. package/types/excalidraw/actions/actionGroup.d.ts +12 -388
  20. package/types/excalidraw/actions/actionHistory.d.ts +4 -3
  21. package/types/excalidraw/actions/actionLinearEditor.d.ts +6 -4
  22. package/types/excalidraw/actions/actionLink.d.ts +5 -5
  23. package/types/excalidraw/actions/actionMenu.d.ts +8 -8
  24. package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
  25. package/types/excalidraw/actions/actionProperties.d.ts +34 -34
  26. package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
  27. package/types/excalidraw/actions/actionStyles.d.ts +9 -12
  28. package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
  29. package/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -5
  30. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
  31. package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
  32. package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
  33. package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
  34. package/types/excalidraw/actions/actionZindex.d.ts +22 -19
  35. package/types/excalidraw/actions/manager.d.ts +5 -5
  36. package/types/excalidraw/actions/register.d.ts +1 -1
  37. package/types/excalidraw/actions/shortcuts.d.ts +2 -2
  38. package/types/excalidraw/actions/types.d.ts +8 -8
  39. package/types/excalidraw/align.d.ts +1 -1
  40. package/types/excalidraw/animated-trail.d.ts +2 -2
  41. package/types/excalidraw/appState.d.ts +5 -5
  42. package/types/excalidraw/change.d.ts +191 -0
  43. package/types/excalidraw/charts.d.ts +1 -1
  44. package/types/excalidraw/clients.d.ts +2 -2
  45. package/types/excalidraw/clipboard.d.ts +3 -3
  46. package/types/excalidraw/colors.d.ts +1 -1
  47. package/types/excalidraw/components/Actions.d.ts +3 -3
  48. package/types/excalidraw/components/App.d.ts +28 -14
  49. package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +1 -1
  50. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
  51. package/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
  52. package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
  53. package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +1 -1
  54. package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
  55. package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  56. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
  57. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
  58. package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
  59. package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -1
  60. package/types/excalidraw/components/CommandPalette/types.d.ts +3 -3
  61. package/types/excalidraw/components/ConfirmDialog.d.ts +1 -1
  62. package/types/excalidraw/components/ContextMenu.d.ts +2 -2
  63. package/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  64. package/types/excalidraw/components/DefaultSidebar.d.ts +2 -2
  65. package/types/excalidraw/components/DialogActionButton.d.ts +1 -1
  66. package/types/excalidraw/components/EyeDropper.d.ts +2 -2
  67. package/types/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
  68. package/types/excalidraw/components/HintViewer.d.ts +1 -1
  69. package/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
  70. package/types/excalidraw/components/InitializeApp.d.ts +2 -2
  71. package/types/excalidraw/components/JSONExportDialog.d.ts +3 -3
  72. package/types/excalidraw/components/LayerUI.d.ts +4 -4
  73. package/types/excalidraw/components/LibraryMenu.d.ts +2 -2
  74. package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +1 -1
  75. package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
  76. package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +2 -2
  77. package/types/excalidraw/components/LibraryMenuItems.d.ts +1 -1
  78. package/types/excalidraw/components/LibraryMenuSection.d.ts +5 -4
  79. package/types/excalidraw/components/LibraryUnit.d.ts +2 -2
  80. package/types/excalidraw/components/LoadingMessage.d.ts +1 -1
  81. package/types/excalidraw/components/MobileMenu.d.ts +3 -3
  82. package/types/excalidraw/components/Modal.d.ts +1 -1
  83. package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
  84. package/types/excalidraw/components/PasteChartDialog.d.ts +1 -1
  85. package/types/excalidraw/components/PublishLibrary.d.ts +1 -1
  86. package/types/excalidraw/components/RadioGroup.d.ts +2 -1
  87. package/types/excalidraw/components/SVGLayer.d.ts +1 -1
  88. package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -1
  89. package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -1
  90. package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
  91. package/types/excalidraw/components/Sidebar/common.d.ts +1 -1
  92. package/types/excalidraw/components/Stats.d.ts +2 -2
  93. package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -2
  94. package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +1 -1
  95. package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +1 -1
  96. package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +1 -1
  97. package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +1 -1
  98. package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
  99. package/types/excalidraw/components/TTDDialog/common.d.ts +4 -4
  100. package/types/excalidraw/components/TextField.d.ts +1 -1
  101. package/types/excalidraw/components/Toast.d.ts +1 -1
  102. package/types/excalidraw/components/ToolButton.d.ts +4 -2
  103. package/types/excalidraw/components/Trans.d.ts +1 -1
  104. package/types/excalidraw/components/UserList.d.ts +1 -1
  105. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
  106. package/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
  107. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -0
  108. package/types/excalidraw/components/footer/Footer.d.ts +2 -2
  109. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
  110. package/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
  111. package/types/excalidraw/components/icons.d.ts +6 -1
  112. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +12 -2
  113. package/types/excalidraw/constants.d.ts +5 -2
  114. package/types/excalidraw/context/ui-appState.d.ts +1 -1
  115. package/types/excalidraw/cursor.d.ts +1 -1
  116. package/types/excalidraw/data/EditorLocalStorage.d.ts +2 -2
  117. package/types/excalidraw/data/blob.d.ts +5 -5
  118. package/types/excalidraw/data/filesystem.d.ts +2 -1
  119. package/types/excalidraw/data/index.d.ts +4 -4
  120. package/types/excalidraw/data/json.d.ts +3 -3
  121. package/types/excalidraw/data/library.d.ts +3 -3
  122. package/types/excalidraw/data/magic.d.ts +3 -3
  123. package/types/excalidraw/data/reconcile.d.ts +6 -0
  124. package/types/excalidraw/data/resave.d.ts +2 -2
  125. package/types/excalidraw/data/restore.d.ts +5 -5
  126. package/types/excalidraw/data/transform.d.ts +4 -4
  127. package/types/excalidraw/data/types.d.ts +3 -3
  128. package/types/excalidraw/data/url.d.ts +1 -0
  129. package/types/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
  130. package/types/excalidraw/element/binding.d.ts +52 -9
  131. package/types/excalidraw/element/bounds.d.ts +3 -4
  132. package/types/excalidraw/element/collision.d.ts +14 -19
  133. package/types/excalidraw/element/containerCache.d.ts +1 -1
  134. package/types/excalidraw/element/dragElements.d.ts +3 -3
  135. package/types/excalidraw/element/embeddable.d.ts +9 -6
  136. package/types/excalidraw/element/image.d.ts +2 -2
  137. package/types/excalidraw/element/index.d.ts +2 -3
  138. package/types/excalidraw/element/linearElementEditor.d.ts +12 -12
  139. package/types/excalidraw/element/mutateElement.d.ts +4 -5
  140. package/types/excalidraw/element/newElement.d.ts +4 -11
  141. package/types/excalidraw/element/resizeElements.d.ts +4 -4
  142. package/types/excalidraw/element/resizeTest.d.ts +7 -7
  143. package/types/excalidraw/element/showSelectedShapeActions.d.ts +2 -2
  144. package/types/excalidraw/element/sizeHelpers.d.ts +2 -2
  145. package/types/excalidraw/element/sortElements.d.ts +1 -1
  146. package/types/excalidraw/element/textElement.d.ts +5 -6
  147. package/types/excalidraw/element/textWysiwyg.d.ts +10 -5
  148. package/types/excalidraw/element/transformHandles.d.ts +24 -6
  149. package/types/excalidraw/element/typeChecks.d.ts +4 -4
  150. package/types/excalidraw/element/types.d.ts +33 -10
  151. package/types/excalidraw/emitter.d.ts +1 -1
  152. package/types/excalidraw/errors.d.ts +3 -0
  153. package/types/excalidraw/fractionalIndex.d.ts +40 -0
  154. package/types/excalidraw/frame.d.ts +4 -4
  155. package/types/excalidraw/gatransforms.d.ts +1 -1
  156. package/types/excalidraw/gesture.d.ts +1 -1
  157. package/types/excalidraw/groups.d.ts +5 -3
  158. package/types/excalidraw/history.d.ts +35 -47
  159. package/types/excalidraw/hooks/useEmitter.d.ts +2 -0
  160. package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
  161. package/types/excalidraw/i18n.d.ts +1 -1
  162. package/types/excalidraw/index.d.ts +5 -1
  163. package/types/excalidraw/jotai.d.ts +1 -1
  164. package/types/excalidraw/laser-trails.d.ts +3 -2
  165. package/types/excalidraw/math.d.ts +2 -2
  166. package/types/excalidraw/points.d.ts +1 -1
  167. package/types/excalidraw/queue.d.ts +1 -1
  168. package/types/excalidraw/renderer/helpers.d.ts +2 -2
  169. package/types/excalidraw/renderer/interactiveScene.d.ts +2 -2
  170. package/types/excalidraw/renderer/renderElement.d.ts +3 -3
  171. package/types/excalidraw/renderer/renderSnaps.d.ts +1 -1
  172. package/types/excalidraw/renderer/staticScene.d.ts +1 -1
  173. package/types/excalidraw/renderer/staticSvgScene.d.ts +4 -4
  174. package/types/excalidraw/scene/Fonts.d.ts +2 -4
  175. package/types/excalidraw/scene/Renderer.d.ts +4 -4
  176. package/types/excalidraw/scene/Scene.d.ts +19 -12
  177. package/types/excalidraw/scene/Shape.d.ts +1 -1
  178. package/types/excalidraw/scene/ShapeCache.d.ts +4 -4
  179. package/types/excalidraw/scene/comparisons.d.ts +2 -2
  180. package/types/excalidraw/scene/export.d.ts +2 -2
  181. package/types/excalidraw/scene/scroll.d.ts +2 -2
  182. package/types/excalidraw/scene/scrollbars.d.ts +3 -3
  183. package/types/excalidraw/scene/selection.d.ts +2 -2
  184. package/types/excalidraw/scene/types.d.ts +5 -4
  185. package/types/excalidraw/scene/zoom.d.ts +1 -1
  186. package/types/excalidraw/snapping.d.ts +4 -4
  187. package/types/excalidraw/store.d.ts +99 -0
  188. package/types/excalidraw/types.d.ts +38 -20
  189. package/types/excalidraw/utils.d.ts +11 -4
  190. package/types/excalidraw/webpack.prod.config.d.ts +1 -1
  191. package/types/excalidraw/zindex.d.ts +4 -4
  192. package/types/utils/bbox.d.ts +2 -2
  193. package/types/utils/collision.d.ts +4 -0
  194. package/types/utils/export.d.ts +4 -4
  195. package/types/utils/geometry/geometry.d.ts +71 -0
  196. package/types/utils/geometry/shape.d.ts +56 -0
  197. package/types/utils/withinBounds.d.ts +1 -1
@@ -1,21 +1,21 @@
1
- import React from "react";
2
- import { ExcalidrawElement } from "../element/types";
3
- import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
- import { MarkOptional } from "../utility-types";
1
+ import type React from "react";
2
+ import type { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
3
+ import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
+ import type { MarkOptional } from "../utility-types";
5
+ import type { StoreActionType } from "../store";
5
6
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
6
7
  /** if false, the action should be prevented */
7
8
  export type ActionResult = {
8
9
  elements?: readonly ExcalidrawElement[] | null;
9
10
  appState?: MarkOptional<AppState, "offsetTop" | "offsetLeft" | "width" | "height"> | null;
10
11
  files?: BinaryFiles | null;
11
- commitToHistory: boolean;
12
- syncHistory?: boolean;
12
+ storeAction: StoreActionType;
13
13
  replaceFiles?: boolean;
14
14
  } | false;
15
- type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
+ type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
16
16
  export type UpdaterFn = (res: ActionResult) => void;
17
17
  export type ActionFilterFn = (action: Action) => void;
18
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette";
18
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "commandPalette" | "autoResize";
19
19
  export type PanelComponentProps = {
20
20
  elements: readonly ExcalidrawElement[];
21
21
  appState: AppState;
@@ -1,4 +1,4 @@
1
- import { ElementsMap, ExcalidrawElement } from "./element/types";
1
+ import type { ElementsMap, ExcalidrawElement } from "./element/types";
2
2
  export interface Alignment {
3
3
  position: "start" | "center" | "end";
4
4
  axis: "x" | "y";
@@ -1,5 +1,5 @@
1
- import { LaserPointerOptions } from "@zsviczian/laser-pointer";
2
- import { AnimationFrameHandler } from "./animation-frame-handler";
1
+ import type { LaserPointerOptions } from "@zsviczian/laser-pointer";
2
+ import type { AnimationFrameHandler } from "./animation-frame-handler";
3
3
  import type App from "./components/App";
4
4
  export interface Trail {
5
5
  start(container: SVGSVGElement): void;
@@ -1,6 +1,10 @@
1
- import { AppState, NormalizedZoomValue } from "./types";
1
+ import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
+ zenModeEnabled?: boolean | undefined;
5
+ objectsSnapModeEnabled?: boolean | undefined;
6
+ theme?: import("./element/types").Theme | undefined;
7
+ name?: string | null | undefined;
4
8
  showWelcomeScreen?: boolean | undefined;
5
9
  activeTool?: ({
6
10
  lastActiveTool: import("./types").ActiveTool | null;
@@ -30,7 +34,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
30
34
  scrollY?: number | undefined;
31
35
  cursorButton?: "up" | "down" | undefined;
32
36
  scrolledOutside?: boolean | undefined;
33
- name?: string | null | undefined;
34
37
  zoom?: Readonly<{
35
38
  value: NormalizedZoomValue;
36
39
  }> | undefined;
@@ -48,8 +51,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
48
51
  [id: string]: true;
49
52
  } | undefined;
50
53
  shouldCacheIgnoreZoom?: boolean | undefined;
51
- zenModeEnabled?: boolean | undefined;
52
- theme?: import("./element/types").Theme | undefined;
53
54
  gridSize?: number | null | undefined;
54
55
  selectedGroupIds?: {
55
56
  [groupId: string]: boolean;
@@ -58,7 +59,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
58
59
  showStats?: boolean | undefined;
59
60
  currentChartType?: import("./element/types").ChartType | undefined;
60
61
  selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
61
- objectsSnapModeEnabled?: boolean | undefined;
62
62
  };
63
63
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
64
64
  viewBackgroundColor?: string | undefined;
@@ -0,0 +1,191 @@
1
+ import type { ElementUpdate } from "./element/mutateElement";
2
+ import type { OrderedExcalidrawElement, SceneElementsMap } from "./element/types";
3
+ import type { AppState, ObservedAppState } from "./types";
4
+ import type { ValueOf } from "./utility-types";
5
+ /**
6
+ * Represents the difference between two objects of the same type.
7
+ *
8
+ * Both `deleted` and `inserted` partials represent the same set of added, removed or updated properties, where:
9
+ * - `deleted` is a set of all the deleted values
10
+ * - `inserted` is a set of all the inserted (added, updated) values
11
+ *
12
+ * Keeping it as pure object (without transient state, side-effects, etc.), so we won't have to instantiate it on load.
13
+ */
14
+ declare class Delta<T> {
15
+ readonly deleted: Partial<T>;
16
+ readonly inserted: Partial<T>;
17
+ private constructor();
18
+ static create<T>(deleted: Partial<T>, inserted: Partial<T>, modifier?: (delta: Partial<T>) => Partial<T>, modifierOptions?: "deleted" | "inserted"): Delta<T>;
19
+ /**
20
+ * Calculates the delta between two objects.
21
+ *
22
+ * @param prevObject - The previous state of the object.
23
+ * @param nextObject - The next state of the object.
24
+ *
25
+ * @returns new delta instance.
26
+ */
27
+ static calculate<T extends {
28
+ [key: string]: any;
29
+ }>(prevObject: T, nextObject: T, modifier?: (partial: Partial<T>) => Partial<T>, postProcess?: (deleted: Partial<T>, inserted: Partial<T>) => [Partial<T>, Partial<T>]): Delta<T>;
30
+ static empty(): Delta<unknown>;
31
+ static isEmpty<T>(delta: Delta<T>): boolean;
32
+ /**
33
+ * Merges deleted and inserted object partials.
34
+ */
35
+ static mergeObjects<T extends {
36
+ [key: string]: unknown;
37
+ }>(prev: T, added: T, removed: T): T;
38
+ /**
39
+ * Merges deleted and inserted array partials.
40
+ */
41
+ static mergeArrays<T>(prev: readonly T[] | null, added: readonly T[] | null | undefined, removed: readonly T[] | null | undefined, predicate?: (value: T) => string): T[];
42
+ /**
43
+ * Diff object partials as part of the `postProcess`.
44
+ */
45
+ static diffObjects<T, K extends keyof T, V extends ValueOf<T[K]>>(deleted: Partial<T>, inserted: Partial<T>, property: K, setValue: (prevValue: V | undefined) => V): void;
46
+ /**
47
+ * Diff array partials as part of the `postProcess`.
48
+ */
49
+ static diffArrays<T, K extends keyof T, V extends T[K]>(deleted: Partial<T>, inserted: Partial<T>, property: K, groupBy: (value: V extends ArrayLike<infer T> ? T : never) => string): void;
50
+ /**
51
+ * Compares if object1 contains any different value compared to the object2.
52
+ */
53
+ static isLeftDifferent<T extends {}>(object1: T, object2: T, skipShallowCompare?: boolean): boolean;
54
+ /**
55
+ * Compares if object2 contains any different value compared to the object1.
56
+ */
57
+ static isRightDifferent<T extends {}>(object1: T, object2: T, skipShallowCompare?: boolean): boolean;
58
+ /**
59
+ * Returns all the object1 keys that have distinct values.
60
+ */
61
+ static getLeftDifferences<T extends {}>(object1: T, object2: T, skipShallowCompare?: boolean): string[];
62
+ /**
63
+ * Returns all the object2 keys that have distinct values.
64
+ */
65
+ static getRightDifferences<T extends {}>(object1: T, object2: T, skipShallowCompare?: boolean): string[];
66
+ /**
67
+ * Iterator comparing values of object properties based on the passed joining strategy.
68
+ *
69
+ * @yields keys of properties with different values
70
+ *
71
+ * WARN: it's based on shallow compare performed only on the first level and doesn't go deeper than that.
72
+ */
73
+ private static distinctKeysIterator;
74
+ }
75
+ /**
76
+ * Encapsulates the modifications captured as `Delta`/s.
77
+ */
78
+ interface Change<T> {
79
+ /**
80
+ * Inverses the `Delta`s inside while creating a new `Change`.
81
+ */
82
+ inverse(): Change<T>;
83
+ /**
84
+ * Applies the `Change` to the previous object.
85
+ *
86
+ * @returns a tuple of the next object `T` with applied change, and `boolean`, indicating whether the applied change resulted in a visible change.
87
+ */
88
+ applyTo(previous: T, ...options: unknown[]): [T, boolean];
89
+ /**
90
+ * Checks whether there are actually `Delta`s.
91
+ */
92
+ isEmpty(): boolean;
93
+ }
94
+ export declare class AppStateChange implements Change<AppState> {
95
+ private readonly delta;
96
+ private constructor();
97
+ static calculate<T extends ObservedAppState>(prevAppState: T, nextAppState: T): AppStateChange;
98
+ static empty(): AppStateChange;
99
+ inverse(): AppStateChange;
100
+ applyTo(appState: AppState, nextElements: SceneElementsMap): [AppState, boolean];
101
+ isEmpty(): boolean;
102
+ /**
103
+ * It is necessary to post process the partials in case of reference values,
104
+ * for which we need to calculate the real diff between `deleted` and `inserted`.
105
+ */
106
+ private static postProcess;
107
+ /**
108
+ * Mutates `nextAppState` be filtering out state related to deleted elements.
109
+ *
110
+ * @returns `true` if a visible change is found, `false` otherwise.
111
+ */
112
+ private filterInvisibleChanges;
113
+ private static convertToAppStateKey;
114
+ private static filterSelectedElements;
115
+ private static filterSelectedGroups;
116
+ private static stripElementsProps;
117
+ private static stripStandaloneProps;
118
+ }
119
+ type ElementPartial = Omit<ElementUpdate<OrderedExcalidrawElement>, "seed">;
120
+ /**
121
+ * Elements change is a low level primitive to capture a change between two sets of elements.
122
+ * It does so by encapsulating forward and backward `Delta`s, allowing to time-travel in both directions.
123
+ */
124
+ export declare class ElementsChange implements Change<SceneElementsMap> {
125
+ private readonly added;
126
+ private readonly removed;
127
+ private readonly updated;
128
+ private constructor();
129
+ static create(added: Map<string, Delta<ElementPartial>>, removed: Map<string, Delta<ElementPartial>>, updated: Map<string, Delta<ElementPartial>>, options?: {
130
+ shouldRedistribute: boolean;
131
+ }): ElementsChange;
132
+ private static satisfiesAddition;
133
+ private static satisfiesRemoval;
134
+ private static satisfiesUpdate;
135
+ private static validate;
136
+ /**
137
+ * Calculates the `Delta`s between the previous and next set of elements.
138
+ *
139
+ * @param prevElements - Map representing the previous state of elements.
140
+ * @param nextElements - Map representing the next state of elements.
141
+ *
142
+ * @returns `ElementsChange` instance representing the `Delta` changes between the two sets of elements.
143
+ */
144
+ static calculate<T extends OrderedExcalidrawElement>(prevElements: Map<string, T>, nextElements: Map<string, T>): ElementsChange;
145
+ static empty(): ElementsChange;
146
+ inverse(): ElementsChange;
147
+ isEmpty(): boolean;
148
+ /**
149
+ * Update delta/s based on the existing elements.
150
+ *
151
+ * @param elements current elements
152
+ * @param modifierOptions defines which of the delta (`deleted` or `inserted`) will be updated
153
+ * @returns new instance with modified delta/s
154
+ */
155
+ applyLatestChanges(elements: SceneElementsMap): ElementsChange;
156
+ applyTo(elements: SceneElementsMap, snapshot: Map<string, OrderedExcalidrawElement>): [SceneElementsMap, boolean];
157
+ private static createApplier;
158
+ private static createGetter;
159
+ private static applyDelta;
160
+ /**
161
+ * Check for visible changes regardless of whether they were removed, added or updated.
162
+ */
163
+ private static checkForVisibleDifference;
164
+ /**
165
+ * Resolves conflicts for all previously added, removed and updated elements.
166
+ * Updates the previous deltas with all the changes after conflict resolution.
167
+ *
168
+ * @returns all elements affected by the conflict resolution
169
+ */
170
+ private resolveConflicts;
171
+ /**
172
+ * Non deleted affected elements of removed elements (before and after applying delta),
173
+ * should be unbound ~ bindings should not point from non deleted into the deleted element/s.
174
+ */
175
+ private static unbindAffected;
176
+ /**
177
+ * Non deleted affected elements of added or updated element/s (before and after applying delta),
178
+ * should be rebound (if possible) with the current element ~ bindings should be bidirectional.
179
+ */
180
+ private static rebindAffected;
181
+ private static redrawTextBoundingBoxes;
182
+ private static redrawBoundArrows;
183
+ private static reorderElements;
184
+ /**
185
+ * It is necessary to post process the partials in case of reference values,
186
+ * for which we need to calculate the real diff between `deleted` and `inserted`.
187
+ */
188
+ private static postProcess;
189
+ private static stripIrrelevantProps;
190
+ }
191
+ export {};
@@ -1,4 +1,4 @@
1
- import { NonDeletedExcalidrawElement } from "./element/types";
1
+ import type { NonDeletedExcalidrawElement } from "./element/types";
2
2
  export type ChartElements = readonly NonDeletedExcalidrawElement[];
3
3
  export interface Spreadsheet {
4
4
  title: string | null;
@@ -1,5 +1,5 @@
1
- import { InteractiveCanvasRenderConfig } from "./scene/types";
2
- import { Collaborator, InteractiveCanvasAppState, SocketId } from "./types";
1
+ import type { InteractiveCanvasRenderConfig } from "./scene/types";
2
+ import type { Collaborator, InteractiveCanvasAppState, SocketId } from "./types";
3
3
  export declare const getClientColor: (socketId: SocketId, collaborator: Collaborator | undefined) => string;
4
4
  /**
5
5
  * returns first char, capitalized
@@ -1,6 +1,6 @@
1
- import { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
2
- import { BinaryFiles } from "./types";
3
- import { Spreadsheet } from "./charts";
1
+ import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
2
+ import type { BinaryFiles } from "./types";
3
+ import type { Spreadsheet } from "./charts";
4
4
  import { ALLOWED_PASTE_MIME_TYPES } from "./constants";
5
5
  export type PastedMixedContent = {
6
6
  type: "text" | "imageUrl";
@@ -1,5 +1,5 @@
1
1
  import oc from "open-color";
2
- import { Merge } from "./utility-types";
2
+ import type { Merge } from "./utility-types";
3
3
  export type ColorPickerColor = Exclude<keyof oc, "indigo" | "lime"> | "transparent" | "bronze";
4
4
  export type ColorTuple = readonly [string, string, string, string, string];
5
5
  export type ColorPalette = Merge<Record<ColorPickerColor, ColorTuple>, {
@@ -1,6 +1,6 @@
1
- import { ActionManager } from "../actions/manager";
2
- import { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "../element/types";
3
- import { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
1
+ import type { ActionManager } from "../actions/manager";
2
+ import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "../element/types";
3
+ import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
4
4
  import "./Actions.scss";
5
5
  export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
6
6
  export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
@@ -1,16 +1,18 @@
1
1
  import React from "react";
2
- import { RoughCanvas } from "roughjs/bin/canvas";
2
+ import type { RoughCanvas } from "roughjs/bin/canvas";
3
3
  import { ActionManager } from "../actions/manager";
4
- import { EXPORT_IMAGE_TYPES } from "../constants";
5
- import { ExportedElements } from "../data";
4
+ import type { EXPORT_IMAGE_TYPES } from "../constants";
5
+ import type { ExportedElements } from "../data";
6
6
  import { LinearElementEditor } from "../element/linearElementEditor";
7
- import { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement } from "../element/types";
8
- import History from "../history";
7
+ import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "../element/types";
8
+ import { History } from "../history";
9
9
  import Scene from "../scene/Scene";
10
- import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
11
- import { FileSystemHandle } from "../data/filesystem";
10
+ import type { GeometricShape } from "../../utils/geometry/shape";
11
+ import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload } from "../types";
12
+ import type { FileSystemHandle } from "../data/filesystem";
12
13
  import { Renderer } from "../scene/Renderer";
13
14
  import { Emitter } from "../emitter";
15
+ import { Store } from "../store";
14
16
  import { AnimationFrameHandler } from "../animation-frame-handler";
15
17
  import { AnimatedTrail } from "../animated-trail";
16
18
  import { LaserTrails } from "../laser-trails";
@@ -57,6 +59,7 @@ declare class App extends React.Component<AppProps, AppState> {
57
59
  library: AppClassProperties["library"];
58
60
  libraryItemsFromStorage: LibraryItems | undefined;
59
61
  id: string;
62
+ private store;
60
63
  private history;
61
64
  private excalidrawContainerValue;
62
65
  files: BinaryFiles;
@@ -115,7 +118,7 @@ declare class App extends React.Component<AppProps, AppState> {
115
118
  x: number;
116
119
  y: number;
117
120
  };
118
- arrowDirection: "end" | "origin";
121
+ arrowDirection: "origin" | "end";
119
122
  center: {
120
123
  x: number;
121
124
  y: number;
@@ -179,7 +182,7 @@ declare class App extends React.Component<AppProps, AppState> {
179
182
  x: number;
180
183
  y: number;
181
184
  };
182
- arrowDirection: "end" | "origin";
185
+ arrowDirection: "origin" | "end";
183
186
  center: {
184
187
  x: number;
185
188
  y: number;
@@ -235,8 +238,8 @@ declare class App extends React.Component<AppProps, AppState> {
235
238
  private toggleOverscrollBehavior;
236
239
  render(): import("react/jsx-runtime").JSX.Element;
237
240
  focusContainer: AppClassProperties["focusContainer"];
238
- getSceneElementsIncludingDeleted: () => readonly ExcalidrawElement[];
239
- getSceneElements: () => readonly NonDeletedExcalidrawElement[];
241
+ getSceneElementsIncludingDeleted: () => readonly import("../element/types").OrderedExcalidrawElement[];
242
+ getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
240
243
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
241
244
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
242
245
  exportingFrame: ExcalidrawFrameLikeElement | null;
@@ -258,6 +261,7 @@ declare class App extends React.Component<AppProps, AppState> {
258
261
  private onUnload;
259
262
  private disableEvent;
260
263
  private resetHistory;
264
+ private resetStore;
261
265
  /**
262
266
  * Resets scene & history.
263
267
  * ! Do not use to clear scene user action !
@@ -352,9 +356,10 @@ declare class App extends React.Component<AppProps, AppState> {
352
356
  elements?: SceneData["elements"];
353
357
  appState?: Pick<AppState, K> | null | undefined;
354
358
  collaborators?: SceneData["collaborators"];
355
- commitToHistory?: SceneData["commitToHistory"];
359
+ /** @default StoreAction.CAPTURE */
360
+ storeAction?: SceneData["storeAction"];
356
361
  }) => void;
357
- private onSceneUpdated;
362
+ private triggerRender;
358
363
  /**
359
364
  * @returns whether the menu was toggled on or off
360
365
  */
@@ -396,8 +401,17 @@ declare class App extends React.Component<AppProps, AppState> {
396
401
  private handleTextWysiwyg;
397
402
  private deselectElements;
398
403
  private getTextElementAtPosition;
404
+ /**
405
+ * get the pure geometric shape of an excalidraw element
406
+ * which is then used for hit detection
407
+ */
408
+ getElementShape(element: ExcalidrawElement): GeometricShape;
409
+ private getBoundTextShape;
399
410
  private getElementAtPosition;
400
411
  private getElementsAtPosition;
412
+ private getElementHitThreshold;
413
+ private hitElement;
414
+ private getTextBindableContainerAtPosition;
401
415
  private startTextEditing;
402
416
  private handleCanvasDoubleClick;
403
417
  private getElementLinkAtPosition;
@@ -474,7 +488,6 @@ declare class App extends React.Component<AppProps, AppState> {
474
488
  private updateBindingEnabledOnPointerMove;
475
489
  private maybeSuggestBindingAtCursor;
476
490
  private maybeSuggestBindingsForLinearElementAtCoords;
477
- private maybeSuggestBindingForAll;
478
491
  setSelection(elements: readonly NonDeletedExcalidrawElement[]): void;
479
492
  private clearSelection;
480
493
  private handleInteractiveCanvasRef;
@@ -501,6 +514,7 @@ declare global {
501
514
  setState: React.Component<any, AppState>["setState"];
502
515
  app: InstanceType<typeof App>;
503
516
  history: History;
517
+ store: Store;
504
518
  };
505
519
  }
506
520
  }
@@ -1,4 +1,4 @@
1
- import { ColorPickerType } from "./colorPickerUtils";
1
+ import type { ColorPickerType } from "./colorPickerUtils";
2
2
  interface ColorInputProps {
3
3
  color: string;
4
4
  onChange: (color: string) => void;
@@ -1,7 +1,7 @@
1
- import { ExcalidrawElement } from "../../element/types";
2
- import { AppState } from "../../types";
3
- import { ColorPickerType } from "./colorPickerUtils";
4
- import { ColorTuple, ColorPaletteCustom } from "../../colors";
1
+ import type { ExcalidrawElement } from "../../element/types";
2
+ import type { AppState } from "../../types";
3
+ import type { ColorPickerType } from "./colorPickerUtils";
4
+ import type { ColorTuple, ColorPaletteCustom } from "../../colors";
5
5
  import "./ColorPicker.scss";
6
6
  export declare const getColor: (color: string) => string | null;
7
7
  interface ColorPickerProps {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import { ExcalidrawElement } from "../../element/types";
3
- import { ColorPickerType } from "./colorPickerUtils";
4
- import { ColorPaletteCustom } from "../../colors";
2
+ import type { ExcalidrawElement } from "../../element/types";
3
+ import type { ColorPickerType } from "./colorPickerUtils";
4
+ import type { ColorPaletteCustom } from "../../colors";
5
5
  interface PickerProps {
6
6
  color: string;
7
7
  onChange: (color: string) => void;
@@ -1,4 +1,4 @@
1
- import { ColorPaletteCustom } from "../../colors";
1
+ import type { ColorPaletteCustom } from "../../colors";
2
2
  interface PickerColorListProps {
3
3
  palette: ColorPaletteCustom;
4
4
  color: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  declare const PickerHeading: ({ children }: {
3
3
  children: ReactNode;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ColorPaletteCustom } from "../../colors";
1
+ import type { ColorPaletteCustom } from "../../colors";
2
2
  interface ShadeListProps {
3
3
  hex: string;
4
4
  onChange: (color: string) => void;
@@ -1,4 +1,4 @@
1
- import { ColorPickerType } from "./colorPickerUtils";
1
+ import type { ColorPickerType } from "./colorPickerUtils";
2
2
  interface TopPicksProps {
3
3
  onChange: (color: string) => void;
4
4
  type: ColorPickerType;
@@ -1,5 +1,5 @@
1
- import { ExcalidrawElement } from "../../element/types";
2
- import { ColorPickerColor, ColorPaletteCustom } from "../../colors";
1
+ import type { ExcalidrawElement } from "../../element/types";
2
+ import type { ColorPickerColor, ColorPaletteCustom } from "../../colors";
3
3
  export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
4
4
  palette: ColorPaletteCustom;
5
5
  color: string;
@@ -1,5 +1,5 @@
1
- import { ColorPaletteCustom } from "../../colors";
2
- import { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
1
+ import type { ColorPaletteCustom } from "../../colors";
2
+ import type { ActiveColorPickerSectionAtomType } from "./colorPickerUtils";
3
3
  interface ColorPickerKeyNavHandlerProps {
4
4
  event: React.KeyboardEvent;
5
5
  activeColorPickerSection: ActiveColorPickerSectionAtomType;
@@ -1,4 +1,4 @@
1
- import { CommandPaletteItem } from "./types";
1
+ import type { CommandPaletteItem } from "./types";
2
2
  import * as defaultItems from "./defaultCommandPaletteItems";
3
3
  import "./CommandPalette.scss";
4
4
  export declare const DEFAULT_CATEGORIES: {
@@ -1,2 +1,2 @@
1
- import { CommandPaletteItem } from "./types";
1
+ import type { CommandPaletteItem } from "./types";
2
2
  export declare const toggleTheme: CommandPaletteItem;
@@ -1,6 +1,6 @@
1
- import { ActionManager } from "../../actions/manager";
2
- import { Action } from "../../actions/types";
3
- import { UIAppState } from "../../types";
1
+ import type { ActionManager } from "../../actions/manager";
2
+ import type { Action } from "../../actions/types";
3
+ import type { UIAppState } from "../../types";
4
4
  export type CommandPaletteItem = {
5
5
  label: string;
6
6
  /** additional keywords to match against
@@ -1,4 +1,4 @@
1
- import { DialogProps } from "./Dialog";
1
+ import type { DialogProps } from "./Dialog";
2
2
  import "./ConfirmDialog.scss";
3
3
  interface Props extends Omit<DialogProps, "onCloseRequest"> {
4
4
  onConfirm: () => void;
@@ -1,6 +1,6 @@
1
1
  import "./ContextMenu.scss";
2
- import { Action } from "../actions/types";
3
- import { ActionManager } from "../actions/manager";
2
+ import type { Action } from "../actions/types";
3
+ import type { ActionManager } from "../actions/manager";
4
4
  import React from "react";
5
5
  export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action;
6
6
  export type ContextMenuItems = (ContextMenuItem | false | null | undefined)[];
@@ -1,5 +1,5 @@
1
1
  import "./ToolIcon.scss";
2
- import { Theme } from "../element/types";
2
+ import type { Theme } from "../element/types";
3
3
  export declare const DarkModeToggle: (props: {
4
4
  value: Theme;
5
5
  onChange: (value: Theme) => void;
@@ -1,5 +1,5 @@
1
- import { MarkOptional } from "../utility-types";
2
- import { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
1
+ import type { MarkOptional } from "../utility-types";
2
+ import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
3
3
  export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
4
4
  name: string;
5
5
  children: import("react").ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import type { ReactNode } from "react";
2
2
  import "./DialogActionButton.scss";
3
3
  interface DialogActionButtonProps {
4
4
  label: string;
@@ -1,6 +1,6 @@
1
1
  import "./EyeDropper.scss";
2
- import { ColorPickerType } from "./ColorPicker/colorPickerUtils";
3
- import { ExcalidrawElement } from "../element/types";
2
+ import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
3
+ import type { ExcalidrawElement } from "../element/types";
4
4
  export type EyeDropperProperties = {
5
5
  keepOpenOnAlt: boolean;
6
6
  swapPreviewOnAlt?: boolean;
@@ -1,4 +1,4 @@
1
- import { UserToFollow } from "../../types";
1
+ import type { UserToFollow } from "../../types";
2
2
  import "./FollowMode.scss";
3
3
  interface FollowModeProps {
4
4
  width: number;
@@ -1,4 +1,4 @@
1
- import { AppClassProperties, Device, UIAppState } from "../types";
1
+ import type { AppClassProperties, Device, UIAppState } from "../types";
2
2
  import "./HintViewer.scss";
3
3
  interface HintViewerProps {
4
4
  appState: UIAppState;
@@ -1,6 +1,6 @@
1
1
  import type { ActionManager } from "../actions/manager";
2
2
  import type { AppClassProperties, BinaryFiles, UIAppState } from "../types";
3
- import { NonDeletedExcalidrawElement } from "../element/types";
3
+ import type { NonDeletedExcalidrawElement } from "../element/types";
4
4
  import "./ImageExportDialog.scss";
5
5
  export declare const ErrorCanvasPreview: () => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const ImageExportDialog: ({ elements, appState, files, actionManager, onExportImage, onCloseRequest, name, }: {