@zsviczian/excalidraw 0.18.0-13 → 0.18.0-15

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 (116) hide show
  1. package/dist/excalidraw.development.js +153 -153
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +38 -2
  4. package/dist/styles.production.css +2 -2
  5. package/package.json +1 -1
  6. package/types/common/src/constants.d.ts +1 -0
  7. package/types/{excalidraw → common/src}/emitter.d.ts +1 -1
  8. package/types/common/src/font-metadata.d.ts +4 -2
  9. package/types/common/src/index.d.ts +1 -0
  10. package/types/common/src/utility-types.d.ts +5 -0
  11. package/types/common/src/utils.d.ts +16 -4
  12. package/types/element/src/Scene.d.ts +4 -4
  13. package/types/element/src/ShapeCache.d.ts +1 -1
  14. package/types/element/src/align.d.ts +1 -1
  15. package/types/element/src/binding.d.ts +1 -1
  16. package/types/element/src/bounds.d.ts +1 -1
  17. package/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
  18. package/types/element/src/dragElements.d.ts +1 -1
  19. package/types/element/src/flowchart.d.ts +1 -1
  20. package/types/element/src/frame.d.ts +3 -2
  21. package/types/element/src/index.d.ts +45 -2
  22. package/types/element/src/linearElementEditor.d.ts +4 -8
  23. package/types/element/src/newElement.d.ts +1 -1
  24. package/types/element/src/resizeElements.d.ts +1 -1
  25. package/types/element/src/selection.d.ts +1 -6
  26. package/types/element/src/store.d.ts +227 -0
  27. package/types/element/src/textElement.d.ts +1 -1
  28. package/types/element/src/transformHandles.d.ts +4 -4
  29. package/types/element/src/typeChecks.d.ts +2 -1
  30. package/types/element/src/types.d.ts +6 -1
  31. package/types/element/src/zindex.d.ts +3 -3
  32. package/types/excalidraw/actions/actionAddToLibrary.d.ts +24 -42
  33. package/types/excalidraw/actions/actionAlign.d.ts +8 -8
  34. package/types/excalidraw/actions/actionBoundText.d.ts +16 -28
  35. package/types/excalidraw/actions/actionCanvas.d.ts +238 -328
  36. package/types/excalidraw/actions/actionClipboard.d.ts +50 -86
  37. package/types/excalidraw/actions/actionCropEditor.d.ts +8 -14
  38. package/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -40
  39. package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  40. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  41. package/types/excalidraw/actions/actionElementLink.d.ts +8 -14
  42. package/types/excalidraw/actions/actionElementLock.d.ts +18 -30
  43. package/types/excalidraw/actions/actionEmbeddable.d.ts +8 -14
  44. package/types/excalidraw/actions/actionExport.d.ts +173 -227
  45. package/types/excalidraw/actions/actionFinalize.d.ts +14 -26
  46. package/types/excalidraw/actions/actionFlip.d.ts +4 -4
  47. package/types/excalidraw/actions/actionFrame.d.ts +81 -105
  48. package/types/excalidraw/actions/actionGroup.d.ts +22 -34
  49. package/types/excalidraw/actions/actionHistory.d.ts +1 -2
  50. package/types/excalidraw/actions/actionLinearEditor.d.ts +7 -13
  51. package/types/excalidraw/actions/actionLink.d.ts +9 -15
  52. package/types/excalidraw/actions/actionMenu.d.ts +26 -44
  53. package/types/excalidraw/actions/actionNavigate.d.ts +16 -28
  54. package/types/excalidraw/actions/actionProperties.d.ts +106 -196
  55. package/types/excalidraw/actions/actionSelectAll.d.ts +10 -16
  56. package/types/excalidraw/actions/actionStyles.d.ts +12 -18
  57. package/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -16
  58. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -16
  59. package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -225
  60. package/types/excalidraw/actions/actionToggleStats.d.ts +10 -16
  61. package/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -16
  62. package/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -16
  63. package/types/excalidraw/actions/actionZindex.d.ts +10 -10
  64. package/types/excalidraw/actions/types.d.ts +1 -1
  65. package/types/excalidraw/appState.d.ts +23 -23
  66. package/types/excalidraw/clipboard.d.ts +4 -4
  67. package/types/excalidraw/components/App.d.ts +8 -8
  68. package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
  69. package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
  70. package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
  71. package/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
  72. package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
  73. package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
  74. package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
  75. package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  76. package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
  77. package/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
  78. package/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
  79. package/types/excalidraw/components/Range.d.ts +3 -3
  80. package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
  81. package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
  82. package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
  83. package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
  84. package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
  85. package/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
  86. package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  87. package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
  88. package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  89. package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  90. package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  91. package/types/excalidraw/components/Stats/Position.d.ts +1 -1
  92. package/types/excalidraw/components/Stats/utils.d.ts +1 -1
  93. package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  94. package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  95. package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
  96. package/types/excalidraw/components/icons.d.ts +1 -0
  97. package/types/excalidraw/components/shapes.d.ts +1 -1
  98. package/types/excalidraw/data/blob.d.ts +1 -1
  99. package/types/excalidraw/data/library.d.ts +1 -1
  100. package/types/excalidraw/data/transform.d.ts +1 -1
  101. package/types/excalidraw/fonts/Fonts.d.ts +1 -1
  102. package/types/excalidraw/history.d.ts +14 -22
  103. package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
  104. package/types/excalidraw/index.d.ts +9 -9
  105. package/types/excalidraw/renderer/helpers.d.ts +6 -1
  106. package/types/excalidraw/scene/Renderer.d.ts +1 -1
  107. package/types/excalidraw/scene/index.d.ts +2 -2
  108. package/types/excalidraw/snapping.d.ts +2 -2
  109. package/types/excalidraw/types.d.ts +13 -6
  110. package/types/excalidraw/visualdebug.d.ts +1 -1
  111. package/types/math/src/curve.d.ts +2 -0
  112. package/types/math/src/vector.d.ts +4 -0
  113. package/types/utils/src/bbox.d.ts +1 -1
  114. package/types/utils/src/index.d.ts +1 -1
  115. package/types/utils/src/withinBounds.d.ts +1 -1
  116. package/types/excalidraw/store.d.ts +0 -129
@@ -28,7 +28,7 @@ export declare const actionToggleViewMode: {
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
30
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
31
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
32
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
33
  frameRendering: {
34
34
  enabled: boolean;
@@ -39,7 +39,7 @@ export declare const actionToggleViewMode: {
39
39
  editingFrame: string | null;
40
40
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
41
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
42
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
43
43
  activeTool: {
44
44
  lastActiveTool: import("../types").ActiveTool | null;
45
45
  locked: boolean;
@@ -159,7 +159,7 @@ export declare const actionToggleViewMode: {
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
161
  pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "editor" | "info";
162
+ showHyperlinkPopup: false | "info" | "editor";
163
163
  linkOpacity: number;
164
164
  trayModeEnabled: boolean;
165
165
  colorPalette?: {
@@ -196,7 +196,7 @@ export declare const actionToggleViewMode: {
196
196
  nameColor: string;
197
197
  };
198
198
  invertBindingBehaviour: boolean;
199
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
199
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
200
200
  snapLines: readonly import("../snapping").SnapLine[];
201
201
  originSnapOffset: {
202
202
  x: number;
@@ -207,22 +207,16 @@ export declare const actionToggleViewMode: {
207
207
  followedBy: Set<import("../types").SocketId>;
208
208
  isCropping: boolean;
209
209
  croppingElementId: string | null;
210
- searchMatches: readonly {
211
- id: string;
212
- focus: boolean;
213
- matchedLines: {
214
- offsetX: number;
215
- offsetY: number;
216
- width: number;
217
- height: number;
218
- }[];
219
- }[];
210
+ searchMatches: Readonly<{
211
+ focusedId: string | null;
212
+ matches: readonly import("../types").SearchMatch[];
213
+ }> | null;
220
214
  };
221
215
  captureUpdate: "EVENTUALLY";
222
216
  };
223
217
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
224
218
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
225
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
219
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
226
220
  } & {
227
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
221
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
228
222
  };
@@ -28,7 +28,7 @@ export declare const actionToggleZenMode: {
28
28
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
29
  isBindingEnabled: boolean;
30
30
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
- suggestedBindings: import("@excalidraw/element/binding").SuggestedBinding[];
31
+ suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
32
32
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
33
33
  frameRendering: {
34
34
  enabled: boolean;
@@ -39,7 +39,7 @@ export declare const actionToggleZenMode: {
39
39
  editingFrame: string | null;
40
40
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
41
41
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
42
- editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
42
+ editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
43
43
  activeTool: {
44
44
  lastActiveTool: import("../types").ActiveTool | null;
45
45
  locked: boolean;
@@ -159,7 +159,7 @@ export declare const actionToggleZenMode: {
159
159
  data: import("../charts").Spreadsheet;
160
160
  };
161
161
  pendingImageElementId: string | null;
162
- showHyperlinkPopup: false | "editor" | "info";
162
+ showHyperlinkPopup: false | "info" | "editor";
163
163
  linkOpacity: number;
164
164
  trayModeEnabled: boolean;
165
165
  colorPalette?: {
@@ -196,7 +196,7 @@ export declare const actionToggleZenMode: {
196
196
  nameColor: string;
197
197
  };
198
198
  invertBindingBehaviour: boolean;
199
- selectedLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
199
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
200
200
  snapLines: readonly import("../snapping").SnapLine[];
201
201
  originSnapOffset: {
202
202
  x: number;
@@ -207,22 +207,16 @@ export declare const actionToggleZenMode: {
207
207
  followedBy: Set<import("../types").SocketId>;
208
208
  isCropping: boolean;
209
209
  croppingElementId: string | null;
210
- searchMatches: readonly {
211
- id: string;
212
- focus: boolean;
213
- matchedLines: {
214
- offsetX: number;
215
- offsetY: number;
216
- width: number;
217
- height: number;
218
- }[];
219
- }[];
210
+ searchMatches: Readonly<{
211
+ focusedId: string | null;
212
+ matches: readonly import("../types").SearchMatch[];
213
+ }> | null;
220
214
  };
221
215
  captureUpdate: "EVENTUALLY";
222
216
  };
223
217
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
224
218
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
225
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
219
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
226
220
  } & {
227
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
221
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
228
222
  };
@@ -12,10 +12,10 @@ export declare const actionSendBackward: {
12
12
  captureUpdate: "IMMEDIATELY";
13
13
  };
14
14
  keyPriority: number;
15
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
15
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
16
16
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
17
17
  } & {
18
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
18
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
19
19
  };
20
20
  export declare const actionBringForward: {
21
21
  name: "bringForward";
@@ -31,10 +31,10 @@ export declare const actionBringForward: {
31
31
  captureUpdate: "IMMEDIATELY";
32
32
  };
33
33
  keyPriority: number;
34
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
34
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
35
35
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
36
36
  } & {
37
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
37
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
38
38
  };
39
39
  export declare const actionSendToBack: {
40
40
  name: "sendToBack";
@@ -45,14 +45,14 @@ export declare const actionSendToBack: {
45
45
  category: "element";
46
46
  };
47
47
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
48
- elements: import("@excalidraw/element/types").ExcalidrawElement[] | readonly import("@excalidraw/element/types").ExcalidrawElement[];
48
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
49
49
  appState: Readonly<import("../types").AppState>;
50
50
  captureUpdate: "IMMEDIATELY";
51
51
  };
52
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
52
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
53
53
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
54
54
  } & {
55
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
55
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
56
56
  };
57
57
  export declare const actionBringToFront: {
58
58
  name: "bringToFront";
@@ -63,12 +63,12 @@ export declare const actionBringToFront: {
63
63
  category: "element";
64
64
  };
65
65
  perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
66
- elements: import("@excalidraw/element/types").ExcalidrawElement[] | readonly import("@excalidraw/element/types").ExcalidrawElement[];
66
+ elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
67
67
  appState: Readonly<import("../types").AppState>;
68
68
  captureUpdate: "IMMEDIATELY";
69
69
  };
70
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
70
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
71
71
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
72
72
  } & {
73
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
73
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
74
74
  };
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
2
- import type { CaptureUpdateActionType } from "../store";
2
+ import type { CaptureUpdateActionType } from "@excalidraw/element";
3
3
  import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
4
4
  import type React from "react";
5
5
  export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
@@ -1,34 +1,24 @@
1
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
- name?: string | null | undefined;
4
+ stats?: {
5
+ open: boolean;
6
+ panels: number;
7
+ } | undefined;
8
+ exportWithDarkMode?: boolean | undefined;
9
+ cursorButton?: "up" | "down" | undefined;
10
+ scrollX?: number | undefined;
11
+ scrollY?: number | undefined;
12
+ showWelcomeScreen?: boolean | undefined;
5
13
  activeTool?: ({
6
14
  lastActiveTool: import("./types").ActiveTool | null;
7
15
  locked: boolean;
8
16
  fromSelection: boolean;
9
17
  } & import("./types").ActiveTool) | undefined;
10
- zoom?: Readonly<{
11
- value: NormalizedZoomValue;
12
- }> | undefined;
13
- scrollX?: number | undefined;
14
- scrollY?: number | undefined;
15
- viewBackgroundColor?: string | undefined;
16
- editingGroupId?: string | null | undefined;
17
- selectedElementIds?: Readonly<{
18
- [id: string]: true;
19
- }> | undefined;
20
- theme?: import("@excalidraw/element/types").Theme | undefined;
21
- selectedGroupIds?: {
22
- [groupId: string]: boolean;
23
- } | undefined;
24
- selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
25
- zenModeEnabled?: boolean | undefined;
26
- showWelcomeScreen?: boolean | undefined;
27
18
  penMode?: boolean | undefined;
28
19
  penDetected?: boolean | undefined;
29
20
  exportBackground?: boolean | undefined;
30
21
  exportEmbedScene?: boolean | undefined;
31
- exportWithDarkMode?: boolean | undefined;
32
22
  exportScale?: number | undefined;
33
23
  currentItemStrokeColor?: string | undefined;
34
24
  currentItemBackgroundColor?: string | undefined;
@@ -44,8 +34,12 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
44
34
  currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
45
35
  currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
46
36
  currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
47
- cursorButton?: "up" | "down" | undefined;
37
+ viewBackgroundColor?: string | undefined;
48
38
  scrolledOutside?: boolean | undefined;
39
+ name?: string | null | undefined;
40
+ zoom?: Readonly<{
41
+ value: NormalizedZoomValue;
42
+ }> | undefined;
49
43
  openMenu?: "canvas" | "shape" | null | undefined;
50
44
  openSidebar?: {
51
45
  name: string;
@@ -53,18 +47,24 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
53
47
  } | null | undefined;
54
48
  defaultSidebarDockedPreference?: boolean | undefined;
55
49
  lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
50
+ selectedElementIds?: Readonly<{
51
+ [id: string]: true;
52
+ }> | undefined;
56
53
  previousSelectedElementIds?: {
57
54
  [id: string]: true;
58
55
  } | undefined;
59
56
  shouldCacheIgnoreZoom?: boolean | undefined;
57
+ zenModeEnabled?: boolean | undefined;
58
+ theme?: import("@excalidraw/element/types").Theme | undefined;
60
59
  gridSize?: number | undefined;
61
60
  gridStep?: number | undefined;
62
61
  gridModeEnabled?: boolean | undefined;
63
- stats?: {
64
- open: boolean;
65
- panels: number;
62
+ selectedGroupIds?: {
63
+ [groupId: string]: boolean;
66
64
  } | undefined;
65
+ editingGroupId?: string | null | undefined;
67
66
  currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
67
+ selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
68
68
  objectsSnapModeEnabled?: boolean | undefined;
69
69
  };
70
70
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
@@ -21,9 +21,9 @@ export declare const probablySupportsClipboardWriteText: boolean;
21
21
  export declare const probablySupportsClipboardBlob: boolean;
22
22
  export declare const createPasteEvent: ({ types, files, }: {
23
23
  types?: {
24
- "image/svg+xml"?: string | File | undefined;
25
- "text/html"?: string | File | undefined;
26
24
  "text/plain"?: string | File | undefined;
25
+ "text/html"?: string | File | undefined;
26
+ "image/svg+xml"?: string | File | undefined;
27
27
  "image/png"?: string | File | undefined;
28
28
  "image/jpeg"?: string | File | undefined;
29
29
  "image/gif"?: string | File | undefined;
@@ -45,9 +45,9 @@ export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawEl
45
45
  * Will prompt user for permission if not granted.
46
46
  */
47
47
  export declare const readSystemClipboard: () => Promise<{
48
- "image/svg+xml"?: string | File | undefined;
49
- "text/html"?: string | File | undefined;
50
48
  "text/plain"?: string | File | undefined;
49
+ "text/html"?: string | File | undefined;
50
+ "image/svg+xml"?: string | File | undefined;
51
51
  "image/png"?: string | File | undefined;
52
52
  "image/jpeg"?: string | File | undefined;
53
53
  "image/gif"?: string | File | undefined;
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { type EXPORT_IMAGE_TYPES } 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 type { ElementUpdate } from "@excalidraw/element/mutateElement";
2
+ import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
3
+ import { LinearElementEditor } from "@excalidraw/element";
4
+ import { FlowChartCreator } from "@excalidraw/element";
5
+ import { Scene } from "@excalidraw/element";
6
+ import type { ElementUpdate } from "@excalidraw/element";
7
7
  import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
8
8
  import type { Mutable } from "@excalidraw/common/utility-types";
9
9
  import { ActionManager } from "../actions/manager";
@@ -11,7 +11,6 @@ import { AnimationFrameHandler } from "../animation-frame-handler";
11
11
  import { Fonts } from "../fonts";
12
12
  import { type WritableAtom } from "../editor-jotai";
13
13
  import { Renderer } from "../scene/Renderer";
14
- import { Emitter } from "../emitter";
15
14
  import { LaserTrails } from "../laser-trails";
16
15
  import { LassoTrail } from "../lasso";
17
16
  import { EraserTrail } from "../eraser";
@@ -127,7 +126,7 @@ declare class App extends React.Component<AppProps, AppState> {
127
126
  };
128
127
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
129
128
  resize: {
130
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
129
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
131
130
  isResizing: boolean;
132
131
  offset: {
133
132
  x: number;
@@ -196,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
196
195
  };
197
196
  originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
198
197
  resize: {
199
- handleType: import("@excalidraw/element/transformHandles").MaybeTransformHandleType;
198
+ handleType: import("@excalidraw/element").MaybeTransformHandleType;
200
199
  isResizing: boolean;
201
200
  offset: {
202
201
  x: number;
@@ -270,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
270
269
  render(): import("react/jsx-runtime").JSX.Element;
271
270
  focusContainer: AppClassProperties["focusContainer"];
272
271
  getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
272
+ getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
273
273
  getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
274
274
  onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
275
275
  onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
@@ -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[];
@@ -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;
@@ -4,7 +4,7 @@ interface ColorPickerKeyNavHandlerProps {
4
4
  event: React.KeyboardEvent;
5
5
  activeColorPickerSection: ActiveColorPickerSectionAtomType;
6
6
  palette: ColorPaletteCustom;
7
- color: string;
7
+ color: string | null;
8
8
  onChange: (color: string) => void;
9
9
  customColors: string[];
10
10
  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, }: {
@@ -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,4 +1,4 @@
1
- import type Scene from "@excalidraw/element/Scene";
1
+ import type { Scene } from "@excalidraw/element";
2
2
  import type { AppState } from "../../types";
3
3
  interface PositionProps {
4
4
  property: "gridStep";
@@ -1,4 +1,4 @@
1
- import type Scene from "@excalidraw/element/Scene";
1
+ import type { Scene } from "@excalidraw/element";
2
2
  import type { AppState } from "../../types";
3
3
  interface PositionProps {
4
4
  property: "gridSize";
@@ -4,6 +4,7 @@ interface CollapsibleProps {
4
4
  openTrigger: () => void;
5
5
  children: React.ReactNode;
6
6
  className?: string;
7
+ showCollapsedIcon?: boolean;
7
8
  }
8
- declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const Collapsible: ({ label, open, openTrigger, children, className, showCollapsedIcon, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default Collapsible;
@@ -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,5 +1,5 @@
1
1
  import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
2
- import type Scene from "@excalidraw/element/Scene";
2
+ import type { Scene } from "@excalidraw/element";
3
3
  import "./DragInput.scss";
4
4
  import type { StatsInputProperty } from "./utils";
5
5
  import type { AppState } from "../../types";
@@ -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 {
@@ -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 { AppState } from "../../types";
4
4
  interface MultiFontSizeProps {
5
5
  elements: readonly ExcalidrawElement[];
@@ -1,5 +1,5 @@
1
1
  import type { ElementsMap, ExcalidrawElement } 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 MultiPositionProps {
@@ -1,5 +1,5 @@
1
1
  import type { ElementsMap, 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 PositionProps {
5
5
  property: "x" | "y";