@excalidraw/excalidraw 0.18.0-a30e1b2 → 0.18.0-a8acc82

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 (175) hide show
  1. package/dist/dev/chunk-6MX365WZ.js +5666 -0
  2. package/dist/dev/chunk-6MX365WZ.js.map +7 -0
  3. package/dist/dev/chunk-CP5DND7P.js +7 -0
  4. package/dist/dev/chunk-CP5DND7P.js.map +7 -0
  5. package/dist/dev/{chunk-CARD3WJZ.js → chunk-QF5FRM6O.js} +7 -2
  6. package/dist/dev/chunk-QF5FRM6O.js.map +7 -0
  7. package/dist/dev/data/{image-AYLHSOBV.js → image-GQCFJKGM.js} +3 -3
  8. package/dist/dev/index.css +187 -21
  9. package/dist/dev/index.css.map +3 -3
  10. package/dist/dev/index.js +15073 -16288
  11. package/dist/dev/index.js.map +4 -4
  12. package/dist/dev/locales/{en-E3O5XSXJ.js → en-SMAPCEOQ.js} +2 -2
  13. package/dist/dev/subset-shared.chunk.js +1 -1
  14. package/dist/dev/subset-worker.chunk.js +1 -1
  15. package/dist/prod/chunk-A66AFZZU.js +7 -0
  16. package/dist/prod/chunk-I4UNSFV6.js +12 -0
  17. package/dist/prod/chunk-R2M7VUMD.js +4 -0
  18. package/dist/prod/data/image-JWK7QZ22.js +1 -0
  19. package/dist/prod/index.css +1 -1
  20. package/dist/prod/index.js +27 -20
  21. package/dist/prod/locales/{en-44IKVKYT.js → en-TYY6KWIJ.js} +1 -1
  22. package/dist/prod/subset-shared.chunk.js +1 -1
  23. package/dist/prod/subset-worker.chunk.js +1 -1
  24. package/dist/types/common/src/constants.d.ts +38 -7
  25. package/dist/types/common/src/utils.d.ts +7 -5
  26. package/dist/types/element/src/Scene.d.ts +10 -6
  27. package/dist/types/element/src/align.d.ts +3 -2
  28. package/dist/types/element/src/binding.d.ts +11 -8
  29. package/dist/types/element/src/bounds.d.ts +12 -4
  30. package/dist/types/element/src/collision.d.ts +18 -12
  31. package/dist/types/element/src/cropElement.d.ts +1 -1
  32. package/dist/types/element/src/delta.d.ts +41 -9
  33. package/dist/types/element/src/distance.d.ts +2 -2
  34. package/dist/types/element/src/distribute.d.ts +2 -1
  35. package/dist/types/element/src/dragElements.d.ts +1 -1
  36. package/dist/types/element/src/flowchart.d.ts +1 -1
  37. package/dist/types/element/src/fractionalIndex.d.ts +8 -2
  38. package/dist/types/element/src/frame.d.ts +2 -2
  39. package/dist/types/element/src/groups.d.ts +1 -0
  40. package/dist/types/element/src/index.d.ts +42 -0
  41. package/dist/types/element/src/linearElementEditor.d.ts +15 -24
  42. package/dist/types/element/src/mutateElement.d.ts +1 -1
  43. package/dist/types/element/src/newElement.d.ts +3 -2
  44. package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
  45. package/dist/types/element/src/renderElement.d.ts +4 -1
  46. package/dist/types/element/src/resizeElements.d.ts +2 -1
  47. package/dist/types/element/src/selection.d.ts +0 -5
  48. package/dist/types/element/src/shape.d.ts +42 -0
  49. package/dist/types/element/src/sizeHelpers.d.ts +2 -1
  50. package/dist/types/element/src/store.d.ts +19 -9
  51. package/dist/types/element/src/textElement.d.ts +2 -2
  52. package/dist/types/element/src/transformHandles.d.ts +2 -2
  53. package/dist/types/element/src/typeChecks.d.ts +16 -1
  54. package/dist/types/element/src/types.d.ts +10 -4
  55. package/dist/types/element/src/utils.d.ts +16 -6
  56. package/dist/types/element/src/zindex.d.ts +3 -3
  57. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +24 -15
  58. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  59. package/dist/types/excalidraw/actions/actionBoundText.d.ts +16 -10
  60. package/dist/types/excalidraw/actions/actionCanvas.d.ts +134 -94
  61. package/dist/types/excalidraw/actions/actionClipboard.d.ts +53 -33
  62. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +8 -5
  63. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +27 -17
  64. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  65. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  66. package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -5
  67. package/dist/types/excalidraw/actions/actionElementLock.d.ts +31 -26
  68. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +8 -5
  69. package/dist/types/excalidraw/actions/actionExport.d.ts +94 -67
  70. package/dist/types/excalidraw/actions/actionFinalize.d.ts +66 -19
  71. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  72. package/dist/types/excalidraw/actions/actionFrame.d.ts +81 -69
  73. package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -14
  74. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +534 -7
  75. package/dist/types/excalidraw/actions/actionLink.d.ts +10 -7
  76. package/dist/types/excalidraw/actions/actionMenu.d.ts +26 -17
  77. package/dist/types/excalidraw/actions/actionNavigate.d.ts +16 -10
  78. package/dist/types/excalidraw/actions/actionProperties.d.ts +145 -83
  79. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -7
  80. package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -9
  81. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -7
  82. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -7
  83. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -7
  84. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -7
  85. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -7
  86. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -7
  87. package/dist/types/excalidraw/actions/actionZindex.d.ts +10 -10
  88. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  89. package/dist/types/excalidraw/actions/types.d.ts +3 -2
  90. package/dist/types/excalidraw/appState.d.ts +20 -10
  91. package/dist/types/excalidraw/clipboard.d.ts +64 -1
  92. package/dist/types/excalidraw/components/Actions.d.ts +8 -5
  93. package/dist/types/excalidraw/components/App.d.ts +22 -21
  94. package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
  95. package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  96. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +7 -2
  97. package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  98. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  99. package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  100. package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  101. package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  102. package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  103. package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  104. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
  105. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  106. package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
  107. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
  108. package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
  109. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
  110. package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
  111. package/dist/types/excalidraw/components/Range.d.ts +3 -3
  112. package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  113. package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  114. package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  115. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
  116. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  117. package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  118. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  119. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  120. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  121. package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
  122. package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
  123. package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
  124. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  125. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
  126. package/dist/types/excalidraw/components/icons.d.ts +9 -0
  127. package/dist/types/excalidraw/components/shapes.d.ts +129 -1
  128. package/dist/types/excalidraw/data/blob.d.ts +3 -7
  129. package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
  130. package/dist/types/excalidraw/data/restore.d.ts +6 -1
  131. package/dist/types/excalidraw/data/transform.d.ts +1 -1
  132. package/dist/types/excalidraw/data/types.d.ts +4 -1
  133. package/dist/types/excalidraw/eraser/index.d.ts +0 -2
  134. package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
  135. package/dist/types/excalidraw/history.d.ts +21 -5
  136. package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
  137. package/dist/types/excalidraw/index.d.ts +11 -10
  138. package/dist/types/excalidraw/lasso/index.d.ts +1 -0
  139. package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
  140. package/dist/types/excalidraw/renderer/helpers.d.ts +4 -4
  141. package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
  142. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
  143. package/dist/types/excalidraw/scene/index.d.ts +2 -2
  144. package/dist/types/excalidraw/snapping.d.ts +2 -2
  145. package/dist/types/excalidraw/types.d.ts +24 -13
  146. package/dist/types/math/src/angle.d.ts +2 -0
  147. package/dist/types/math/src/constants.d.ts +3 -0
  148. package/dist/types/math/src/curve.d.ts +32 -0
  149. package/dist/types/math/src/index.d.ts +1 -0
  150. package/dist/types/math/src/point.d.ts +1 -1
  151. package/dist/types/math/src/rectangle.d.ts +2 -0
  152. package/dist/types/math/src/segment.d.ts +1 -0
  153. package/dist/types/math/src/vector.d.ts +4 -2
  154. package/dist/types/utils/src/bbox.d.ts +1 -1
  155. package/dist/types/utils/src/index.d.ts +1 -1
  156. package/dist/types/utils/src/withinBounds.d.ts +1 -1
  157. package/history.ts +108 -45
  158. package/package.json +13 -10
  159. package/dist/dev/chunk-CARD3WJZ.js.map +0 -7
  160. package/dist/dev/chunk-ETWEPOFC.js +0 -18701
  161. package/dist/dev/chunk-ETWEPOFC.js.map +0 -7
  162. package/dist/dev/chunk-RS23HYC4.js +0 -7
  163. package/dist/dev/chunk-RS23HYC4.js.map +0 -7
  164. package/dist/prod/chunk-6BSJPDKJ.js +0 -33
  165. package/dist/prod/chunk-FGHASORR.js +0 -12
  166. package/dist/prod/chunk-SBKTMZM7.js +0 -7
  167. package/dist/prod/data/image-VAYKYPXV.js +0 -1
  168. package/dist/types/element/src/Shape.d.ts +0 -17
  169. package/dist/types/element/src/ShapeCache.d.ts +0 -25
  170. package/dist/types/element/src/shapes.d.ts +0 -23
  171. package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
  172. package/dist/types/excalidraw/visualdebug.d.ts +0 -41
  173. package/dist/types/utils/src/collision.d.ts +0 -8
  174. /package/dist/dev/data/{image-AYLHSOBV.js.map → image-GQCFJKGM.js.map} +0 -0
  175. /package/dist/dev/locales/{en-E3O5XSXJ.js.map → en-SMAPCEOQ.js.map} +0 -0
@@ -16,25 +16,20 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
16
16
  selectedGroupIds?: {
17
17
  [groupId: string]: boolean;
18
18
  } | undefined;
19
- selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
19
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
20
20
  zenModeEnabled?: boolean | undefined;
21
+ showWelcomeScreen?: boolean | undefined;
21
22
  activeTool?: ({
22
23
  lastActiveTool: import("./types").ActiveTool | null;
23
24
  locked: boolean;
24
25
  fromSelection: boolean;
25
26
  } & import("./types").ActiveTool) | undefined;
26
- gridModeEnabled?: boolean | undefined;
27
- objectsSnapModeEnabled?: boolean | undefined;
28
- shouldCacheIgnoreZoom?: boolean | undefined;
29
- exportScale?: number | undefined;
30
- gridSize?: number | undefined;
31
- gridStep?: number | undefined;
32
- showWelcomeScreen?: boolean | undefined;
33
27
  penMode?: boolean | undefined;
34
28
  penDetected?: boolean | undefined;
35
29
  exportBackground?: boolean | undefined;
36
30
  exportEmbedScene?: boolean | undefined;
37
31
  exportWithDarkMode?: boolean | undefined;
32
+ exportScale?: number | undefined;
38
33
  currentItemStrokeColor?: string | undefined;
39
34
  currentItemBackgroundColor?: string | undefined;
40
35
  currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
@@ -61,23 +56,38 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
61
56
  previousSelectedElementIds?: {
62
57
  [id: string]: true;
63
58
  } | undefined;
59
+ shouldCacheIgnoreZoom?: boolean | undefined;
60
+ gridSize?: number | undefined;
61
+ gridStep?: number | undefined;
62
+ gridModeEnabled?: boolean | undefined;
64
63
  stats?: {
65
64
  open: boolean;
66
65
  panels: number;
67
66
  } | undefined;
68
67
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
68
+ objectsSnapModeEnabled?: boolean | undefined;
69
+ lockedMultiSelections?: {
70
+ [groupId: string]: true;
71
+ } | undefined;
72
+ stylesPanelMode?: "compact" | "full" | undefined;
69
73
  };
70
74
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
71
75
  viewBackgroundColor?: string | undefined;
72
- gridModeEnabled?: boolean | undefined;
73
76
  gridSize?: number | undefined;
74
77
  gridStep?: number | undefined;
78
+ gridModeEnabled?: boolean | undefined;
79
+ lockedMultiSelections?: {
80
+ [groupId: string]: true;
81
+ } | undefined;
75
82
  };
76
83
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
77
84
  viewBackgroundColor?: string | undefined;
78
- gridModeEnabled?: boolean | undefined;
79
85
  gridSize?: number | undefined;
80
86
  gridStep?: number | undefined;
87
+ gridModeEnabled?: boolean | undefined;
88
+ lockedMultiSelections?: {
89
+ [groupId: string]: true;
90
+ } | undefined;
81
91
  };
82
92
  export declare const isEraserActive: ({ activeTool, }: {
83
93
  activeTool: AppState["activeTool"];
@@ -1,5 +1,8 @@
1
1
  import { ALLOWED_PASTE_MIME_TYPES } from "@excalidraw/common";
2
+ import type { ValueOf } from "@excalidraw/common/utility-types";
3
+ import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
2
4
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
5
+ import type { FileSystemHandle } from "./data/filesystem";
3
6
  import type { Spreadsheet } from "./charts";
4
7
  import type { BinaryFiles } from "./types";
5
8
  export type PastedMixedContent = {
@@ -57,10 +60,70 @@ export declare const readSystemClipboard: () => Promise<{
57
60
  "image/avif"?: string | File | undefined;
58
61
  "image/jfif"?: string | File | undefined;
59
62
  }>;
63
+ type AllowedParsedDataTransferItem = {
64
+ type: ValueOf<typeof IMAGE_MIME_TYPES>;
65
+ kind: "file";
66
+ file: File;
67
+ fileHandle: FileSystemHandle | null;
68
+ } | {
69
+ type: ValueOf<typeof STRING_MIME_TYPES>;
70
+ kind: "string";
71
+ value: string;
72
+ };
73
+ type ParsedDataTransferItem = {
74
+ type: string;
75
+ kind: "file";
76
+ file: File;
77
+ fileHandle: FileSystemHandle | null;
78
+ } | {
79
+ type: string;
80
+ kind: "string";
81
+ value: string;
82
+ };
83
+ type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]> = AllowedParsedDataTransferItem & {
84
+ type: T;
85
+ };
86
+ export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
87
+ kind: "file";
88
+ }>;
89
+ type ParsedDataTranferList = ParsedDataTransferItem[] & {
90
+ /**
91
+ * Only allows filtering by known `string` data types, since `file`
92
+ * types can have multiple items of the same type (e.g. multiple image files)
93
+ * unlike `string` data transfer items.
94
+ */
95
+ findByType: typeof findDataTransferItemType;
96
+ /**
97
+ * Only allows filtering by known `string` data types, since `file`
98
+ * types can have multiple items of the same type (e.g. multiple image files)
99
+ * unlike `string` data transfer items.
100
+ */
101
+ getData: typeof getDataTransferItemData;
102
+ getFiles: typeof getDataTransferFiles;
103
+ };
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;
120
+ declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
121
+ export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
60
122
  /**
61
123
  * Attempts to parse clipboard event.
62
124
  */
63
- export declare const parseClipboard: (event: ClipboardEvent, isPlainPaste?: boolean) => Promise<ClipboardData>;
125
+ export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
64
126
  export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
65
127
  export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
128
+ export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
66
129
  export {};
@@ -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,6 +10,13 @@ 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 CompactShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
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;
13
20
  export declare const ShapesSwitcher: ({ activeTool, appState, app, UIOptions, }: {
14
21
  activeTool: UIAppState["activeTool"];
15
22
  appState: UIAppState;
@@ -28,7 +35,3 @@ export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }:
28
35
  actionManager: ActionManager;
29
36
  showExitZenModeBtn: boolean;
30
37
  }) => import("react/jsx-runtime").JSX.Element;
31
- export declare const FinalizeAction: ({ renderAction, className, }: {
32
- renderAction: ActionManager["renderAction"];
33
- className?: string | undefined;
34
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,7 @@
1
1
  import React from "react";
2
2
  import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
- import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
4
- import { FlowChartCreator } from "@excalidraw/element/flowchart";
5
- import Scene from "@excalidraw/element/Scene";
6
- import { Store } from "@excalidraw/element/store";
7
- import type { ElementUpdate } from "@excalidraw/element/mutateElement";
8
- import type { ExcalidrawElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
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";
9
5
  import type { Mutable } from "@excalidraw/common/utility-types";
10
6
  import { ActionManager } from "../actions/manager";
11
7
  import { AnimationFrameHandler } from "../animation-frame-handler";
@@ -82,6 +78,7 @@ declare class App extends React.Component<AppProps, AppState> {
82
78
  /** embeds that have been inserted to DOM (as a perf optim, we don't want to
83
79
  * insert to DOM before user initially scrolls to them) */
84
80
  private initializedEmbeds;
81
+ private handleToastClose;
85
82
  private elementsPendingErasure;
86
83
  flowChartCreator: FlowChartCreator;
87
84
  private flowChartNavigator;
@@ -126,7 +123,7 @@ declare class App extends React.Component<AppProps, AppState> {
126
123
  };
127
124
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
128
125
  resize: {
129
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
126
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
130
127
  isResizing: boolean;
131
128
  offset: {
132
129
  x: number;
@@ -156,6 +153,7 @@ declare class App extends React.Component<AppProps, AppState> {
156
153
  x: number;
157
154
  y: number;
158
155
  };
156
+ blockDragging: boolean;
159
157
  };
160
158
  eventListeners: {
161
159
  onMove: {
@@ -195,7 +193,7 @@ declare class App extends React.Component<AppProps, AppState> {
195
193
  };
196
194
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
197
195
  resize: {
198
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
196
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
199
197
  isResizing: boolean;
200
198
  offset: {
201
199
  x: number;
@@ -225,6 +223,7 @@ declare class App extends React.Component<AppProps, AppState> {
225
223
  x: number;
226
224
  y: number;
227
225
  };
226
+ blockDragging: boolean;
228
227
  };
229
228
  eventListeners: {
230
229
  onMove: {
@@ -246,6 +245,7 @@ declare class App extends React.Component<AppProps, AppState> {
246
245
  }>]>;
247
246
  missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
248
247
  onRemoveEventListenersEmitter: Emitter<[]>;
248
+ defaultSelectionTool: "selection" | "lasso";
249
249
  constructor(props: AppProps);
250
250
  updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
251
251
  private onWindowMessage;
@@ -301,6 +301,7 @@ declare class App extends React.Component<AppProps, AppState> {
301
301
  private resetScene;
302
302
  private initializeScene;
303
303
  private isMobileBreakpoint;
304
+ private isTabletBreakpoint;
304
305
  private refreshViewportBreakpoints;
305
306
  private refreshEditorBreakpoints;
306
307
  private clearImageShapeCache;
@@ -319,6 +320,7 @@ declare class App extends React.Component<AppProps, AppState> {
319
320
  private static resetTapTwice;
320
321
  private onTouchStart;
321
322
  private onTouchEnd;
323
+ private insertClipboardContent;
322
324
  pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
323
325
  addElementsFromPasteOrLibrary: (opts: {
324
326
  elements: readonly ExcalidrawElement[];
@@ -400,6 +402,7 @@ declare class App extends React.Component<AppProps, AppState> {
400
402
  */
401
403
  captureUpdate?: SceneData["captureUpdate"];
402
404
  }) => void;
405
+ applyDeltas: (deltas: StoreDelta[], options?: ApplyToOptions) => [SceneElementsMap, AppState, boolean];
403
406
  mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
404
407
  private triggerRender;
405
408
  /**
@@ -415,12 +418,9 @@ declare class App extends React.Component<AppProps, AppState> {
415
418
  private onKeyDown;
416
419
  private onKeyUp;
417
420
  private isToolSupported;
418
- setActiveTool: (tool: (({
419
- type: Exclude<ToolType, "image">;
421
+ setActiveTool: (tool: ({
422
+ type: ToolType;
420
423
  } | {
421
- type: Extract<ToolType, "image">;
422
- insertOnCanvasDirectly?: boolean;
423
- }) | {
424
424
  type: "custom";
425
425
  customType: string;
426
426
  }) & {
@@ -446,7 +446,7 @@ declare class App extends React.Component<AppProps, AppState> {
446
446
  private getTextElementAtPosition;
447
447
  private getElementAtPosition;
448
448
  private getElementsAtPosition;
449
- getElementHitThreshold(): number;
449
+ getElementHitThreshold(element: ExcalidrawElement): number;
450
450
  private hitElement;
451
451
  private getTextBindableContainerAtPosition;
452
452
  private startTextEditing;
@@ -494,7 +494,7 @@ declare class App extends React.Component<AppProps, AppState> {
494
494
  sceneY: number;
495
495
  link: string;
496
496
  }) => NonDeleted<ExcalidrawEmbeddableElement> | undefined;
497
- private createImageElement;
497
+ private newImagePlaceholder;
498
498
  private handleLinearElementOnPointerDown;
499
499
  private getCurrentItemRoundness;
500
500
  private createGenericElementOnPointerDown;
@@ -510,12 +510,13 @@ declare class App extends React.Component<AppProps, AppState> {
510
510
  private eraseElements;
511
511
  private initializeImage;
512
512
  /**
513
- * inserts image into elements array and rerenders
513
+ * use during async image initialization,
514
+ * when the placeholder image could have been modified in the meantime,
515
+ * and when you don't want to loose those modifications
514
516
  */
515
- insertImageElement: (imageElement: ExcalidrawImageElement, imageFile: File, showCursorImagePreview?: boolean) => Promise<NonDeleted<InitializedExcalidrawImageElement> | null | undefined>;
516
- private setImagePreviewCursor;
517
- private onImageAction;
518
- initializeImageDimensions: (imageElement: ExcalidrawImageElement, forceNaturalSize?: boolean) => void;
517
+ private getLatestInitializedImageElement;
518
+ private onImageToolbarButtonClick;
519
+ private getImageNaturalDimensions;
519
520
  /** updates image cache, refreshing updated elements and/or setting status
520
521
  to error for images that fail during <img> element creation */
521
522
  private updateImageCache;
@@ -526,9 +527,9 @@ declare class App extends React.Component<AppProps, AppState> {
526
527
  private scheduleImageRefresh;
527
528
  private updateBindingEnabledOnPointerMove;
528
529
  private maybeSuggestBindingAtCursor;
529
- private maybeSuggestBindingsForLinearElementAtCoords;
530
530
  private clearSelection;
531
531
  private handleInteractiveCanvasRef;
532
+ private insertImages;
532
533
  private handleAppOnDrop;
533
534
  loadFileToCanvas: (file: File, fileHandle: FileSystemHandle | null) => Promise<void>;
534
535
  private handleCanvasContextMenu;
@@ -10,6 +10,7 @@ interface ButtonIconProps {
10
10
  /** include standalone style (could interfere with parent styles) */
11
11
  standalone?: boolean;
12
12
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ style?: React.CSSProperties;
13
14
  }
14
15
  export declare const ButtonIcon: import("react").ForwardRefExoticComponent<ButtonIconProps & import("react").RefAttributes<HTMLButtonElement>>;
15
16
  export {};
@@ -4,6 +4,7 @@ interface ColorInputProps {
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  colorPickerType: ColorPickerType;
7
+ placeholder?: string;
7
8
  }
8
- export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -6,7 +6,11 @@ import type { AppState } from "../../types";
6
6
  export declare const getColor: (color: string) => string | null;
7
7
  interface ColorPickerProps {
8
8
  type: ColorPickerType;
9
- color: string;
9
+ /**
10
+ * null indicates no color should be displayed as active
11
+ * (e.g. when multiple shapes selected with different colors)
12
+ */
13
+ color: string | null;
10
14
  onChange: (color: string) => void;
11
15
  label: string;
12
16
  elements: readonly ExcalidrawElement[];
@@ -14,6 +18,7 @@ interface ColorPickerProps {
14
18
  palette?: ColorPaletteCustom | null;
15
19
  topPicks?: ColorTuple;
16
20
  updateData: (formData?: any) => void;
21
+ compactMode?: boolean;
17
22
  }
18
- export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, compactMode, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
19
24
  export {};
@@ -1,6 +1,6 @@
1
1
  interface CustomColorListProps {
2
2
  colors: string[];
3
- color: string;
3
+ color: string | null;
4
4
  onChange: (color: string) => void;
5
5
  label: string;
6
6
  }
@@ -3,9 +3,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
3
3
  import type { ColorPaletteCustom } from "@excalidraw/common";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  interface PickerProps {
6
- color: string;
6
+ color: string | null;
7
7
  onChange: (color: string) => void;
8
- label: string;
9
8
  type: ColorPickerType;
10
9
  elements: readonly ExcalidrawElement[];
11
10
  palette: ColorPaletteCustom;
@@ -14,5 +13,5 @@ interface PickerProps {
14
13
  onEyeDropperToggle: (force?: boolean) => void;
15
14
  onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
16
15
  }
17
- export declare const Picker: ({ color, onChange, label, type, elements, palette, updateData, children, onEyeDropperToggle, onEscape, }: PickerProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
18
17
  export {};
@@ -1,10 +1,9 @@
1
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
2
2
  interface PickerColorListProps {
3
3
  palette: ColorPaletteCustom;
4
- color: string;
4
+ color: string | null;
5
5
  onChange: (color: string) => void;
6
- label: string;
7
6
  activeShade: number;
8
7
  }
9
- declare const PickerColorList: ({ palette, color, onChange, label, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
10
9
  export default PickerColorList;
@@ -1,8 +1,8 @@
1
1
  import type { ColorPaletteCustom } from "@excalidraw/common";
2
2
  interface ShadeListProps {
3
- hex: string;
3
+ color: string | null;
4
4
  onChange: (color: string) => void;
5
5
  palette: ColorPaletteCustom;
6
6
  }
7
- export declare const ShadeList: ({ hex, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { ColorPickerType } from "./colorPickerUtils";
2
2
  interface TopPicksProps {
3
3
  onChange: (color: string) => void;
4
4
  type: ColorPickerType;
5
- activeColor: string;
5
+ activeColor: string | null;
6
6
  topPicks?: readonly string[];
7
7
  }
8
8
  export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -2,7 +2,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
2
  import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
3
3
  export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
4
4
  palette: ColorPaletteCustom;
5
- color: string;
5
+ color: string | null;
6
6
  }) => {
7
7
  colorName: ColorPickerColor;
8
8
  shade: number | null;
@@ -5,7 +5,7 @@ interface ColorPickerKeyNavHandlerProps {
5
5
  event: React.KeyboardEvent;
6
6
  activeColorPickerSection: ActiveColorPickerSectionAtomType;
7
7
  palette: ColorPaletteCustom;
8
- color: string;
8
+ color: string | null;
9
9
  onChange: (color: string) => void;
10
10
  customColors: string[];
11
11
  setActiveColorPickerSection: (update: React.SetStateAction<ActiveColorPickerSectionAtomType>) => void;
@@ -1,5 +1,5 @@
1
- import type { ConvertibleGenericTypes, ConvertibleLinearTypes, ConvertibleTypes, ExcalidrawElbowArrowElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
1
+ import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import "./ConvertElementTypePopup.scss";
4
4
  import type App from "./App";
5
5
  export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
@@ -9,32 +9,6 @@ export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").P
9
9
  type: "panel";
10
10
  } | null;
11
11
  };
12
- export declare const fontSize_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
13
- [id: string]: {
14
- fontSize: number;
15
- elementType: ConvertibleGenericTypes;
16
- };
17
- } | null> & {
18
- init: {
19
- [id: string]: {
20
- fontSize: number;
21
- elementType: ConvertibleGenericTypes;
22
- };
23
- } | null;
24
- };
25
- export declare const linearElement_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
26
- [id: string]: {
27
- properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
28
- initialType: ConvertibleLinearTypes;
29
- };
30
- } | null> & {
31
- init: {
32
- [id: string]: {
33
- properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
34
- initialType: ConvertibleLinearTypes;
35
- };
36
- } | null;
37
- };
38
12
  declare const ConvertElementTypePopup: ({ app }: {
39
13
  app: App;
40
14
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import "./ElementLinkDialog.scss";
4
4
  import type { AppProps, UIAppState } from "../types";
5
5
  declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const Ellipsify: ({ children, ...rest }: {
3
+ children: React.ReactNode;
4
+ } & import("react").HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
@@ -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,7 @@
1
1
  import type { FontFamilyValues } from "@excalidraw/element/types";
2
2
  interface FontPickerTriggerProps {
3
3
  selectedFontFamily: FontFamilyValues | null;
4
+ isOpened?: boolean;
4
5
  }
5
- export declare const FontPickerTrigger: ({ selectedFontFamily, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const FontPickerTrigger: ({ selectedFontFamily, isOpened, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -10,6 +10,7 @@ interface PropertiesPopoverProps {
10
10
  onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
11
11
  onFocusOutside?: Popover.PopoverContentProps["onFocusOutside"];
12
12
  onPointerDownOutside?: Popover.PopoverContentProps["onPointerDownOutside"];
13
+ preventAutoFocusOnTouch?: boolean;
13
14
  }
14
15
  export declare const PropertiesPopover: React.ForwardRefExoticComponent<PropertiesPopoverProps & React.RefAttributes<HTMLDivElement>>;
15
16
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from "react";
2
- export declare const ButtonIconSelect: <T extends Object>(props: {
2
+ export declare const RadioSelection: <T extends Object>(props: {
3
3
  options: {
4
4
  value: T;
5
5
  text: string;
@@ -1,8 +1,8 @@
1
1
  import "./Range.scss";
2
+ import type { AppClassProperties } from "../types";
2
3
  export type RangeProps = {
3
4
  updateData: (value: number) => void;
4
- appState: any;
5
- elements: any;
5
+ app: AppClassProperties;
6
6
  testId?: string;
7
7
  };
8
- export declare const Range: ({ updateData, appState, elements, testId, }: RangeProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Range: ({ updateData, app, testId }: RangeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AppState } from "../../types";
4
4
  interface AngleProps {
5
5
  element: ExcalidrawElement;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AppState } from "../../types";
4
4
  interface PositionProps {
5
5
  property: "gridStep";
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AppState } from "../../types";
4
4
  interface DimensionDragInputProps {
5
5
  property: "width" | "height";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
3
- import type Scene from "@excalidraw/element/Scene";
3
+ import type { Scene } from "@excalidraw/element";
4
+ import { useApp, useExcalidrawSetAppState } from "../App";
4
5
  import "./DragInput.scss";
5
6
  import type { StatsInputProperty } from "./utils";
6
7
  import type { AppState } from "../../types";
@@ -16,6 +17,14 @@ export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawEl
16
17
  property: P;
17
18
  originalAppState: AppState;
18
19
  setInputValue: (value: number) => void;
20
+ app: ReturnType<typeof useApp>;
21
+ setAppState: ReturnType<typeof useExcalidrawSetAppState>;
22
+ }) => void;
23
+ export type DragFinishedCallbackType<E = ExcalidrawElement> = (props: {
24
+ app: ReturnType<typeof useApp>;
25
+ setAppState: ReturnType<typeof useExcalidrawSetAppState>;
26
+ originalElements: readonly E[] | null;
27
+ originalAppState: AppState;
19
28
  }) => void;
20
29
  interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElement> {
21
30
  label: string | React.ReactNode;
@@ -30,6 +39,7 @@ interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElemen
30
39
  appState: AppState;
31
40
  /** how many px you need to drag to get 1 unit change */
32
41
  sensitivity?: number;
42
+ dragFinishedCallback?: DragFinishedCallbackType;
33
43
  }
34
- declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
44
+ declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, dragFinishedCallback, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
35
45
  export default StatsDragInput;
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AppState } from "../../types";
4
4
  interface FontSizeProps {
5
5
  element: ExcalidrawElement;
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AppState } from "../../types";
4
4
  interface MultiAngleProps {
5
5
  elements: readonly ExcalidrawElement[];
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import type { AtomicUnit } from "./utils";
4
4
  import type { AppState } from "../../types";
5
5
  interface MultiDimensionProps {