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

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 (82) hide show
  1. package/dist/excalidraw.development.js +190 -80
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/dist/styles.development.css +78 -50
  4. package/dist/styles.production.css +5 -5
  5. package/package.json +2 -1
  6. package/types/excalidraw/actions/actionAddToLibrary.d.ts +4 -4
  7. package/types/excalidraw/actions/actionAlign.d.ts +20 -20
  8. package/types/excalidraw/actions/actionBoundText.d.ts +7 -7
  9. package/types/excalidraw/actions/actionCanvas.d.ts +65 -65
  10. package/types/excalidraw/actions/actionClipboard.d.ts +24 -24
  11. package/types/excalidraw/actions/actionDeleteSelected.d.ts +8 -8
  12. package/types/excalidraw/actions/actionDistribute.d.ts +8 -8
  13. package/types/excalidraw/actions/actionDuplicateSelection.d.ts +5 -6
  14. package/types/excalidraw/actions/actionElementLock.d.ts +8 -8
  15. package/types/excalidraw/actions/actionExport.d.ts +32 -32
  16. package/types/excalidraw/actions/actionFinalize.d.ts +8 -8
  17. package/types/excalidraw/actions/actionFlip.d.ts +9 -9
  18. package/types/excalidraw/actions/actionFrame.d.ts +14 -202
  19. package/types/excalidraw/actions/actionGroup.d.ts +11 -387
  20. package/types/excalidraw/actions/actionHistory.d.ts +3 -2
  21. package/types/excalidraw/actions/actionLinearEditor.d.ts +2 -2
  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 +3 -3
  25. package/types/excalidraw/actions/actionProperties.d.ts +32 -32
  26. package/types/excalidraw/actions/actionSelectAll.d.ts +4 -4
  27. package/types/excalidraw/actions/actionStyles.d.ts +9 -12
  28. package/types/excalidraw/actions/actionToggleGridMode.d.ts +6 -4
  29. package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
  30. package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
  31. package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
  32. package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
  33. package/types/excalidraw/actions/actionZindex.d.ts +18 -19
  34. package/types/excalidraw/actions/manager.d.ts +3 -3
  35. package/types/excalidraw/actions/types.d.ts +4 -4
  36. package/types/excalidraw/appState.d.ts +4 -4
  37. package/types/excalidraw/change.d.ts +191 -0
  38. package/types/excalidraw/components/App.d.ts +22 -8
  39. package/types/excalidraw/components/RadioGroup.d.ts +2 -1
  40. package/types/excalidraw/components/ToolButton.d.ts +1 -0
  41. package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
  42. package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -0
  43. package/types/excalidraw/components/icons.d.ts +4 -0
  44. package/types/excalidraw/components/main-menu/DefaultItems.d.ts +12 -2
  45. package/types/excalidraw/constants.d.ts +3 -0
  46. package/types/excalidraw/data/reconcile.d.ts +6 -0
  47. package/types/excalidraw/data/restore.d.ts +3 -3
  48. package/types/excalidraw/data/transform.d.ts +1 -1
  49. package/types/excalidraw/data/url.d.ts +1 -0
  50. package/types/excalidraw/element/binding.d.ts +52 -9
  51. package/types/excalidraw/element/bounds.d.ts +0 -1
  52. package/types/excalidraw/element/collision.d.ts +14 -19
  53. package/types/excalidraw/element/embeddable.d.ts +7 -4
  54. package/types/excalidraw/element/index.d.ts +0 -1
  55. package/types/excalidraw/element/linearElementEditor.d.ts +12 -12
  56. package/types/excalidraw/element/mutateElement.d.ts +1 -2
  57. package/types/excalidraw/element/newElement.d.ts +1 -1
  58. package/types/excalidraw/element/resizeElements.d.ts +1 -1
  59. package/types/excalidraw/element/resizeTest.d.ts +4 -4
  60. package/types/excalidraw/element/textElement.d.ts +1 -2
  61. package/types/excalidraw/element/transformHandles.d.ts +22 -4
  62. package/types/excalidraw/element/typeChecks.d.ts +2 -2
  63. package/types/excalidraw/element/types.d.ts +22 -6
  64. package/types/excalidraw/errors.d.ts +3 -0
  65. package/types/excalidraw/fractionalIndex.d.ts +40 -0
  66. package/types/excalidraw/frame.d.ts +1 -1
  67. package/types/excalidraw/groups.d.ts +2 -0
  68. package/types/excalidraw/history.d.ts +34 -46
  69. package/types/excalidraw/hooks/useEmitter.d.ts +2 -0
  70. package/types/excalidraw/index.d.ts +2 -0
  71. package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
  72. package/types/excalidraw/scene/Scene.d.ts +7 -6
  73. package/types/excalidraw/scene/types.d.ts +2 -1
  74. package/types/excalidraw/store.d.ts +99 -0
  75. package/types/excalidraw/types.d.ts +18 -4
  76. package/types/excalidraw/utils.d.ts +7 -0
  77. package/types/excalidraw/webpack.prod.config.d.ts +1 -1
  78. package/types/excalidraw/zindex.d.ts +2 -2
  79. package/types/utils/collision.d.ts +4 -0
  80. package/types/utils/export.d.ts +2 -2
  81. package/types/utils/geometry/geometry.d.ts +71 -0
  82. package/types/utils/geometry/shape.d.ts +56 -0
@@ -6,10 +6,10 @@ export declare const actionSelectAllElementsInFrame: {
6
6
  trackEvent: {
7
7
  category: "canvas";
8
8
  };
9
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
10
- elements: readonly ExcalidrawElement[];
9
+ perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
10
+ elements: readonly import("../element/types").OrderedExcalidrawElement[];
11
11
  appState: Readonly<AppState>;
12
- commitToHistory: false;
12
+ storeAction: import("../store").StoreActionType;
13
13
  };
14
14
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
15
15
  } & {
@@ -21,198 +21,10 @@ export declare const actionRemoveAllElementsFromFrame: {
21
21
  trackEvent: {
22
22
  category: "history";
23
23
  };
24
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
25
- elements: readonly ExcalidrawElement[];
26
- appState: {
27
- selectedElementIds: {
28
- [x: string]: true;
29
- };
30
- contextMenu: {
31
- items: import("../components/ContextMenu").ContextMenuItems;
32
- top: number;
33
- left: number;
34
- } | null;
35
- showWelcomeScreen: boolean;
36
- isLoading: boolean;
37
- errorMessage: import("react").ReactNode;
38
- activeEmbeddable: {
39
- element: import("../element/types").NonDeletedExcalidrawElement;
40
- state: "active" | "hover";
41
- } | null;
42
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
43
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
44
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
45
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
46
- isBindingEnabled: boolean;
47
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
48
- suggestedBindings: import("../element/binding").SuggestedBinding[];
49
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
50
- frameRendering: {
51
- enabled: boolean;
52
- name: boolean;
53
- outline: boolean;
54
- clip: boolean;
55
- };
56
- editingFrame: string | null;
57
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
58
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
59
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
60
- activeTool: {
61
- lastActiveTool: import("../types").ActiveTool | null;
62
- locked: boolean;
63
- } & import("../types").ActiveTool;
64
- penMode: boolean;
65
- penDetected: boolean;
66
- exportBackground: boolean;
67
- exportEmbedScene: boolean;
68
- exportWithDarkMode: boolean;
69
- exportScale: number;
70
- currentItemStrokeColor: string;
71
- currentItemBackgroundColor: string;
72
- currentItemFillStyle: import("../element/types").FillStyle;
73
- currentItemStrokeWidth: number;
74
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
75
- currentItemRoughness: number;
76
- currentItemOpacity: number;
77
- currentItemFontFamily: number;
78
- currentItemFontSize: number;
79
- currentItemTextAlign: string;
80
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
81
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
82
- currentItemRoundness: import("../element/types").StrokeRoundness;
83
- viewBackgroundColor: string;
84
- scrollX: number;
85
- scrollY: number;
86
- cursorButton: "up" | "down";
87
- scrolledOutside: boolean;
88
- name: string | null;
89
- isResizing: boolean;
90
- isRotating: boolean;
91
- zoom: Readonly<{
92
- value: import("../types").NormalizedZoomValue;
93
- }>;
94
- openMenu: "canvas" | "shape" | null;
95
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
96
- openSidebar: {
97
- name: string;
98
- tab?: string | undefined;
99
- } | null;
100
- openDialog: {
101
- name: "imageExport" | "help" | "jsonExport";
102
- } | {
103
- name: "settings";
104
- source: "settings" | "tool" | "generation";
105
- tab: "text-to-diagram" | "diagram-to-code";
106
- } | {
107
- name: "ttd";
108
- tab: "mermaid" | "text-to-diagram";
109
- } | {
110
- name: "commandPalette";
111
- } | null;
112
- defaultSidebarDockedPreference: boolean;
113
- lastPointerDownWith: import("../element/types").PointerType;
114
- previousSelectedElementIds: {
115
- [id: string]: true;
116
- };
117
- selectedElementsAreBeingDragged: boolean;
118
- shouldCacheIgnoreZoom: boolean;
119
- toast: {
120
- message: string;
121
- closable?: boolean | undefined;
122
- duration?: number | undefined;
123
- } | null;
124
- zenModeEnabled: boolean;
125
- theme: import("../element/types").Theme;
126
- gridSize: number | null;
127
- previousGridSize: number | null;
128
- viewModeEnabled: boolean;
129
- selectedGroupIds: {
130
- [groupId: string]: boolean;
131
- };
132
- editingGroupId: string | null;
133
- width: number;
134
- height: number;
135
- offsetTop: number;
136
- offsetLeft: number;
137
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
138
- collaborators: Map<import("../types").SocketId, Readonly<{
139
- pointer?: import("../types").CollaboratorPointer | undefined;
140
- button?: "up" | "down" | undefined;
141
- selectedElementIds?: Readonly<{
142
- [id: string]: true;
143
- }> | undefined;
144
- username?: string | null | undefined;
145
- userState?: import("../types").UserIdleState | undefined;
146
- color?: {
147
- background: string;
148
- stroke: string;
149
- } | undefined;
150
- avatarUrl?: string | undefined;
151
- id?: string | undefined;
152
- socketId?: import("../types").SocketId | undefined;
153
- isCurrentUser?: boolean | undefined;
154
- isInCall?: boolean | undefined;
155
- isSpeaking?: boolean | undefined;
156
- isMuted?: boolean | undefined;
157
- }>>;
158
- showStats: boolean;
159
- currentChartType: import("../element/types").ChartType;
160
- pasteDialog: {
161
- shown: false;
162
- data: null;
163
- } | {
164
- shown: true;
165
- data: import("../charts").Spreadsheet;
166
- };
167
- pendingImageElementId: string | null;
168
- showHyperlinkPopup: false | "info" | "editor";
169
- linkOpacity: number;
170
- trayModeEnabled: boolean;
171
- colorPalette?: {
172
- canvasBackground: import("../colors").ColorPaletteCustom;
173
- elementBackground: import("../colors").ColorPaletteCustom;
174
- elementStroke: import("../colors").ColorPaletteCustom;
175
- topPicks: {
176
- canvasBackground: [string, string, string, string, string];
177
- elementStroke: [string, string, string, string, string];
178
- elementBackground: [string, string, string, string, string];
179
- };
180
- } | undefined;
181
- allowWheelZoom?: boolean | undefined;
182
- allowPinchZoom?: boolean | undefined;
183
- pinnedScripts?: string[] | undefined;
184
- customPens?: any[] | undefined;
185
- currentStrokeOptions?: any;
186
- resetCustomPen?: any;
187
- gridColor: {
188
- Bold: string;
189
- Regular: string;
190
- MajorGridFrequency?: number | undefined;
191
- };
192
- dynamicStyle: {
193
- [x: string]: string;
194
- };
195
- frameColor: {
196
- stroke: string;
197
- fill: string;
198
- nameColor: string;
199
- };
200
- invertBindingBehaviour: boolean;
201
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
202
- snapLines: readonly import("../snapping").SnapLine[];
203
- originSnapOffset: {
204
- x: number;
205
- y: number;
206
- } | null;
207
- objectsSnapModeEnabled: boolean;
208
- userToFollow: import("../types").UserToFollow | null;
209
- followedBy: Set<import("../types").SocketId>;
210
- };
211
- commitToHistory: true;
212
- } | {
213
- elements: readonly ExcalidrawElement[];
24
+ perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
25
+ elements: readonly import("../element/types").OrderedExcalidrawElement[];
214
26
  appState: Readonly<AppState>;
215
- commitToHistory: false;
27
+ storeAction: import("../store").StoreActionType;
216
28
  };
217
29
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
218
30
  } & {
@@ -225,8 +37,8 @@ export declare const actionupdateFrameRendering: {
225
37
  trackEvent: {
226
38
  category: "canvas";
227
39
  };
228
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
229
- elements: readonly ExcalidrawElement[];
40
+ perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
41
+ elements: readonly import("../element/types").OrderedExcalidrawElement[];
230
42
  appState: {
231
43
  frameRendering: {
232
44
  enabled: boolean;
@@ -412,7 +224,7 @@ export declare const actionupdateFrameRendering: {
412
224
  userToFollow: import("../types").UserToFollow | null;
413
225
  followedBy: Set<import("../types").SocketId>;
414
226
  };
415
- commitToHistory: false;
227
+ storeAction: import("../store").StoreActionType;
416
228
  };
417
229
  checked: (appState: AppState) => boolean;
418
230
  } & {
@@ -426,8 +238,8 @@ export declare const actionSetFrameAsActiveTool: {
426
238
  };
427
239
  icon: import("react/jsx-runtime").JSX.Element;
428
240
  viewMode: false;
429
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
430
- elements: readonly ExcalidrawElement[];
241
+ perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
242
+ elements: readonly import("../element/types").OrderedExcalidrawElement[];
431
243
  appState: {
432
244
  activeTool: {
433
245
  lastActiveTool: import("../types").ActiveTool | null;
@@ -613,9 +425,9 @@ export declare const actionSetFrameAsActiveTool: {
613
425
  userToFollow: import("../types").UserToFollow | null;
614
426
  followedBy: Set<import("../types").SocketId>;
615
427
  };
616
- commitToHistory: false;
428
+ storeAction: import("../store").StoreActionType;
617
429
  };
618
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
430
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
619
431
  } & {
620
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
432
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
621
433
  };
@@ -1,4 +1,4 @@
1
- import { ExcalidrawElement } from "../element/types";
1
+ import { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
2
2
  import { AppClassProperties, AppState } from "../types";
3
3
  export declare const actionGroup: {
4
4
  name: "group";
@@ -7,204 +7,16 @@ export declare const actionGroup: {
7
7
  trackEvent: {
8
8
  category: "element";
9
9
  };
10
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
10
+ perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
11
11
  appState: Readonly<AppState>;
12
- elements: readonly ExcalidrawElement[];
13
- commitToHistory: false;
14
- } | {
15
- appState: {
16
- selectedElementIds: Readonly<{
17
- [id: string]: true;
18
- }>;
19
- selectedGroupIds: {
20
- [groupId: string]: boolean;
21
- };
22
- editingGroupId: string | null;
23
- contextMenu: {
24
- items: import("../components/ContextMenu").ContextMenuItems;
25
- top: number;
26
- left: number;
27
- } | null;
28
- showWelcomeScreen: boolean;
29
- isLoading: boolean;
30
- errorMessage: import("react").ReactNode;
31
- activeEmbeddable: {
32
- element: import("../element/types").NonDeletedExcalidrawElement;
33
- state: "active" | "hover";
34
- } | null;
35
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
36
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
37
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
38
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
39
- isBindingEnabled: boolean;
40
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
41
- suggestedBindings: import("../element/binding").SuggestedBinding[];
42
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
43
- frameRendering: {
44
- enabled: boolean;
45
- name: boolean;
46
- outline: boolean;
47
- clip: boolean;
48
- };
49
- editingFrame: string | null;
50
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
51
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
52
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
53
- activeTool: {
54
- lastActiveTool: import("../types").ActiveTool | null;
55
- locked: boolean;
56
- } & import("../types").ActiveTool;
57
- penMode: boolean;
58
- penDetected: boolean;
59
- exportBackground: boolean;
60
- exportEmbedScene: boolean;
61
- exportWithDarkMode: boolean;
62
- exportScale: number;
63
- currentItemStrokeColor: string;
64
- currentItemBackgroundColor: string;
65
- currentItemFillStyle: import("../element/types").FillStyle;
66
- currentItemStrokeWidth: number;
67
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
68
- currentItemRoughness: number;
69
- currentItemOpacity: number;
70
- currentItemFontFamily: number;
71
- currentItemFontSize: number;
72
- currentItemTextAlign: string;
73
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
74
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
75
- currentItemRoundness: import("../element/types").StrokeRoundness;
76
- viewBackgroundColor: string;
77
- scrollX: number;
78
- scrollY: number;
79
- cursorButton: "up" | "down";
80
- scrolledOutside: boolean;
81
- name: string | null;
82
- isResizing: boolean;
83
- isRotating: boolean;
84
- zoom: Readonly<{
85
- value: import("../types").NormalizedZoomValue;
86
- }>;
87
- openMenu: "canvas" | "shape" | null;
88
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
89
- openSidebar: {
90
- name: string;
91
- tab?: string | undefined;
92
- } | null;
93
- openDialog: {
94
- name: "imageExport" | "help" | "jsonExport";
95
- } | {
96
- name: "settings";
97
- source: "settings" | "tool" | "generation";
98
- tab: "text-to-diagram" | "diagram-to-code";
99
- } | {
100
- name: "ttd";
101
- tab: "mermaid" | "text-to-diagram";
102
- } | {
103
- name: "commandPalette";
104
- } | null;
105
- defaultSidebarDockedPreference: boolean;
106
- lastPointerDownWith: import("../element/types").PointerType;
107
- previousSelectedElementIds: {
108
- [id: string]: true;
109
- };
110
- selectedElementsAreBeingDragged: boolean;
111
- shouldCacheIgnoreZoom: boolean;
112
- toast: {
113
- message: string;
114
- closable?: boolean | undefined;
115
- duration?: number | undefined;
116
- } | null;
117
- zenModeEnabled: boolean;
118
- theme: import("../element/types").Theme;
119
- gridSize: number | null;
120
- previousGridSize: number | null;
121
- viewModeEnabled: boolean;
122
- width: number;
123
- height: number;
124
- offsetTop: number;
125
- offsetLeft: number;
126
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
127
- collaborators: Map<import("../types").SocketId, Readonly<{
128
- pointer?: import("../types").CollaboratorPointer | undefined;
129
- button?: "up" | "down" | undefined;
130
- selectedElementIds?: Readonly<{
131
- [id: string]: true;
132
- }> | undefined;
133
- username?: string | null | undefined;
134
- userState?: import("../types").UserIdleState | undefined;
135
- color?: {
136
- background: string;
137
- stroke: string;
138
- } | undefined;
139
- avatarUrl?: string | undefined;
140
- id?: string | undefined;
141
- socketId?: import("../types").SocketId | undefined;
142
- isCurrentUser?: boolean | undefined;
143
- isInCall?: boolean | undefined;
144
- isSpeaking?: boolean | undefined;
145
- isMuted?: boolean | undefined;
146
- }>>;
147
- showStats: boolean;
148
- currentChartType: import("../element/types").ChartType;
149
- pasteDialog: {
150
- shown: false;
151
- data: null;
152
- } | {
153
- shown: true;
154
- data: import("../charts").Spreadsheet;
155
- };
156
- pendingImageElementId: string | null;
157
- showHyperlinkPopup: false | "info" | "editor";
158
- linkOpacity: number;
159
- trayModeEnabled: boolean;
160
- colorPalette?: {
161
- canvasBackground: import("../colors").ColorPaletteCustom;
162
- elementBackground: import("../colors").ColorPaletteCustom;
163
- elementStroke: import("../colors").ColorPaletteCustom;
164
- topPicks: {
165
- canvasBackground: [string, string, string, string, string];
166
- elementStroke: [string, string, string, string, string];
167
- elementBackground: [string, string, string, string, string];
168
- };
169
- } | undefined;
170
- allowWheelZoom?: boolean | undefined;
171
- allowPinchZoom?: boolean | undefined;
172
- pinnedScripts?: string[] | undefined;
173
- customPens?: any[] | undefined;
174
- currentStrokeOptions?: any;
175
- resetCustomPen?: any;
176
- gridColor: {
177
- Bold: string;
178
- Regular: string;
179
- MajorGridFrequency?: number | undefined;
180
- };
181
- dynamicStyle: {
182
- [x: string]: string;
183
- };
184
- frameColor: {
185
- stroke: string;
186
- fill: string;
187
- nameColor: string;
188
- };
189
- invertBindingBehaviour: boolean;
190
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
191
- snapLines: readonly import("../snapping").SnapLine[];
192
- originSnapOffset: {
193
- x: number;
194
- y: number;
195
- } | null;
196
- objectsSnapModeEnabled: boolean;
197
- userToFollow: import("../types").UserToFollow | null;
198
- followedBy: Set<import("../types").SocketId>;
199
- };
200
- elements: ExcalidrawElement[];
201
- commitToHistory: true;
12
+ elements: readonly OrderedExcalidrawElement[];
13
+ storeAction: import("../store").StoreActionType;
202
14
  };
203
15
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
204
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
16
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
205
17
  PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
206
18
  } & {
207
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
19
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
208
20
  };
209
21
  export declare const actionUngroup: {
210
22
  name: "ungroup";
@@ -213,202 +25,14 @@ export declare const actionUngroup: {
213
25
  trackEvent: {
214
26
  category: "element";
215
27
  };
216
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
28
+ perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
217
29
  appState: Readonly<AppState>;
218
- elements: readonly ExcalidrawElement[];
219
- commitToHistory: false;
220
- } | {
221
- appState: {
222
- selectedElementIds: Readonly<{
223
- [id: string]: true;
224
- }>;
225
- selectedGroupIds: {
226
- [groupId: string]: boolean;
227
- };
228
- editingGroupId: string | null;
229
- contextMenu: {
230
- items: import("../components/ContextMenu").ContextMenuItems;
231
- top: number;
232
- left: number;
233
- } | null;
234
- showWelcomeScreen: boolean;
235
- isLoading: boolean;
236
- errorMessage: import("react").ReactNode;
237
- activeEmbeddable: {
238
- element: import("../element/types").NonDeletedExcalidrawElement;
239
- state: "active" | "hover";
240
- } | null;
241
- draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
242
- resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
243
- multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
244
- selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
245
- isBindingEnabled: boolean;
246
- startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
247
- suggestedBindings: import("../element/binding").SuggestedBinding[];
248
- frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
249
- frameRendering: {
250
- enabled: boolean;
251
- name: boolean;
252
- outline: boolean;
253
- clip: boolean;
254
- };
255
- editingFrame: string | null;
256
- elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
257
- editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
258
- editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
259
- activeTool: {
260
- lastActiveTool: import("../types").ActiveTool | null;
261
- locked: boolean;
262
- } & import("../types").ActiveTool;
263
- penMode: boolean;
264
- penDetected: boolean;
265
- exportBackground: boolean;
266
- exportEmbedScene: boolean;
267
- exportWithDarkMode: boolean;
268
- exportScale: number;
269
- currentItemStrokeColor: string;
270
- currentItemBackgroundColor: string;
271
- currentItemFillStyle: import("../element/types").FillStyle;
272
- currentItemStrokeWidth: number;
273
- currentItemStrokeStyle: import("../element/types").StrokeStyle;
274
- currentItemRoughness: number;
275
- currentItemOpacity: number;
276
- currentItemFontFamily: number;
277
- currentItemFontSize: number;
278
- currentItemTextAlign: string;
279
- currentItemStartArrowhead: import("../element/types").Arrowhead | null;
280
- currentItemEndArrowhead: import("../element/types").Arrowhead | null;
281
- currentItemRoundness: import("../element/types").StrokeRoundness;
282
- viewBackgroundColor: string;
283
- scrollX: number;
284
- scrollY: number;
285
- cursorButton: "up" | "down";
286
- scrolledOutside: boolean;
287
- name: string | null;
288
- isResizing: boolean;
289
- isRotating: boolean;
290
- zoom: Readonly<{
291
- value: import("../types").NormalizedZoomValue;
292
- }>;
293
- openMenu: "canvas" | "shape" | null;
294
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
295
- openSidebar: {
296
- name: string;
297
- tab?: string | undefined;
298
- } | null;
299
- openDialog: {
300
- name: "imageExport" | "help" | "jsonExport";
301
- } | {
302
- name: "settings";
303
- source: "settings" | "tool" | "generation";
304
- tab: "text-to-diagram" | "diagram-to-code";
305
- } | {
306
- name: "ttd";
307
- tab: "mermaid" | "text-to-diagram";
308
- } | {
309
- name: "commandPalette";
310
- } | null;
311
- defaultSidebarDockedPreference: boolean;
312
- lastPointerDownWith: import("../element/types").PointerType;
313
- previousSelectedElementIds: {
314
- [id: string]: true;
315
- };
316
- selectedElementsAreBeingDragged: boolean;
317
- shouldCacheIgnoreZoom: boolean;
318
- toast: {
319
- message: string;
320
- closable?: boolean | undefined;
321
- duration?: number | undefined;
322
- } | null;
323
- zenModeEnabled: boolean;
324
- theme: import("../element/types").Theme;
325
- gridSize: number | null;
326
- previousGridSize: number | null;
327
- viewModeEnabled: boolean;
328
- width: number;
329
- height: number;
330
- offsetTop: number;
331
- offsetLeft: number;
332
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
333
- collaborators: Map<import("../types").SocketId, Readonly<{
334
- pointer?: import("../types").CollaboratorPointer | undefined;
335
- button?: "up" | "down" | undefined;
336
- selectedElementIds?: Readonly<{
337
- [id: string]: true;
338
- }> | undefined;
339
- username?: string | null | undefined;
340
- userState?: import("../types").UserIdleState | undefined;
341
- color?: {
342
- background: string;
343
- stroke: string;
344
- } | undefined;
345
- avatarUrl?: string | undefined;
346
- id?: string | undefined;
347
- socketId?: import("../types").SocketId | undefined;
348
- isCurrentUser?: boolean | undefined;
349
- isInCall?: boolean | undefined;
350
- isSpeaking?: boolean | undefined;
351
- isMuted?: boolean | undefined;
352
- }>>;
353
- showStats: boolean;
354
- currentChartType: import("../element/types").ChartType;
355
- pasteDialog: {
356
- shown: false;
357
- data: null;
358
- } | {
359
- shown: true;
360
- data: import("../charts").Spreadsheet;
361
- };
362
- pendingImageElementId: string | null;
363
- showHyperlinkPopup: false | "info" | "editor";
364
- linkOpacity: number;
365
- trayModeEnabled: boolean;
366
- colorPalette?: {
367
- canvasBackground: import("../colors").ColorPaletteCustom;
368
- elementBackground: import("../colors").ColorPaletteCustom;
369
- elementStroke: import("../colors").ColorPaletteCustom;
370
- topPicks: {
371
- canvasBackground: [string, string, string, string, string];
372
- elementStroke: [string, string, string, string, string];
373
- elementBackground: [string, string, string, string, string];
374
- };
375
- } | undefined;
376
- allowWheelZoom?: boolean | undefined;
377
- allowPinchZoom?: boolean | undefined;
378
- pinnedScripts?: string[] | undefined;
379
- customPens?: any[] | undefined;
380
- currentStrokeOptions?: any;
381
- resetCustomPen?: any;
382
- gridColor: {
383
- Bold: string;
384
- Regular: string;
385
- MajorGridFrequency?: number | undefined;
386
- };
387
- dynamicStyle: {
388
- [x: string]: string;
389
- };
390
- frameColor: {
391
- stroke: string;
392
- fill: string;
393
- nameColor: string;
394
- };
395
- invertBindingBehaviour: boolean;
396
- selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
397
- snapLines: readonly import("../snapping").SnapLine[];
398
- originSnapOffset: {
399
- x: number;
400
- y: number;
401
- } | null;
402
- objectsSnapModeEnabled: boolean;
403
- userToFollow: import("../types").UserToFollow | null;
404
- followedBy: Set<import("../types").SocketId>;
405
- };
406
- elements: ExcalidrawElement[];
407
- commitToHistory: true;
30
+ elements: readonly OrderedExcalidrawElement[];
31
+ storeAction: import("../store").StoreActionType;
408
32
  };
409
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
33
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
410
34
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
411
35
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
412
36
  } & {
413
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
37
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
414
38
  };