@dwelle/excalidraw 0.4.0-d68dd48 → 0.4.0-e03b600

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 (163) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +4 -0
  3. package/dist/excalidraw.development.js +1314 -248
  4. package/dist/excalidraw.production.min.js +1 -1
  5. package/package.json +2 -2
  6. package/types/actions/actionAddToLibrary.d.ts +36 -12
  7. package/types/actions/actionAlign.d.ts +6 -0
  8. package/types/actions/actionBoundText.d.ts +24 -8
  9. package/types/actions/actionCanvas.d.ts +235 -41
  10. package/types/actions/actionClipboard.d.ts +60 -20
  11. package/types/actions/actionDeleteSelected.d.ts +36 -12
  12. package/types/actions/actionElementLock.d.ts +254 -0
  13. package/types/actions/actionExport.d.ts +109 -37
  14. package/types/actions/actionFinalize.d.ts +24 -8
  15. package/types/actions/actionFlip.d.ts +2 -4
  16. package/types/actions/actionFrame.d.ts +397 -0
  17. package/types/actions/actionGroup.d.ts +2 -2
  18. package/types/actions/actionHistory.d.ts +1 -1
  19. package/types/actions/actionLinearEditor.d.ts +12 -4
  20. package/types/actions/actionMenu.d.ts +37 -14
  21. package/types/actions/actionNavigate.d.ts +1 -1
  22. package/types/actions/actionProperties.d.ts +158 -54
  23. package/types/actions/actionStyles.d.ts +12 -4
  24. package/types/actions/actionToggleGridMode.d.ts +12 -4
  25. package/types/actions/actionToggleStats.d.ts +12 -4
  26. package/types/actions/actionToggleViewMode.d.ts +12 -4
  27. package/types/actions/actionToggleZenMode.d.ts +12 -4
  28. package/types/actions/actionZindex.d.ts +4 -4
  29. package/types/actions/index.d.ts +1 -1
  30. package/types/actions/manager.d.ts +1 -1
  31. package/types/actions/shortcuts.d.ts +1 -1
  32. package/types/actions/types.d.ts +7 -7
  33. package/types/appState.d.ts +6 -3
  34. package/types/charts.d.ts +2 -2
  35. package/types/clients.d.ts +5 -6
  36. package/types/clipboard.d.ts +2 -2
  37. package/types/colors.d.ts +60 -5
  38. package/types/components/Actions.d.ts +5 -5
  39. package/types/components/ActiveConfirmDialog.d.ts +1 -21
  40. package/types/components/App.d.ts +32 -9
  41. package/types/components/Avatar.d.ts +1 -2
  42. package/types/components/Button.d.ts +3 -1
  43. package/types/components/ColorPicker/ColorInput.d.ts +7 -0
  44. package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
  45. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  46. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  47. package/types/components/ColorPicker/Picker.d.ts +18 -0
  48. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  49. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  50. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  51. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  52. package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
  53. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -0
  54. package/types/components/ContextMenu.d.ts +3 -3
  55. package/types/components/DefaultSidebar.d.ts +30 -0
  56. package/types/components/Dialog.d.ts +3 -4
  57. package/types/components/EyeDropper.d.ts +18 -0
  58. package/types/components/FilledButton.d.ts +17 -0
  59. package/types/components/FixedSideContainer.d.ts +1 -1
  60. package/types/components/HandButton.d.ts +1 -1
  61. package/types/components/HelpButton.d.ts +1 -1
  62. package/types/components/HintViewer.d.ts +2 -2
  63. package/types/components/HomeButton.d.ts +1 -1
  64. package/types/components/ImageExportDialog.d.ts +8 -13
  65. package/types/components/Island.d.ts +1 -1
  66. package/types/components/JSONExportDialog.d.ts +4 -4
  67. package/types/components/LayerUI.d.ts +4 -10
  68. package/types/components/LibraryMenu.d.ts +13 -14
  69. package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
  70. package/types/components/LibraryMenuControlButtons.d.ts +9 -0
  71. package/types/components/LibraryMenuHeaderContent.d.ts +11 -28
  72. package/types/components/LibraryMenuItems.d.ts +6 -7
  73. package/types/components/LibraryMenuSection.d.ts +22 -0
  74. package/types/components/LibraryUnit.d.ts +7 -3
  75. package/types/components/LockButton.d.ts +1 -1
  76. package/types/components/MobileMenu.d.ts +4 -4
  77. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  78. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  79. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  80. package/types/components/PasteChartDialog.d.ts +4 -5
  81. package/types/components/PenModeButton.d.ts +1 -1
  82. package/types/components/Popover.d.ts +1 -1
  83. package/types/components/ProjectName.d.ts +2 -1
  84. package/types/components/PublishLibrary.d.ts +2 -2
  85. package/types/components/RadioGroup.d.ts +12 -0
  86. package/types/components/Sidebar/Sidebar.d.ts +66 -63
  87. package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
  88. package/types/components/Sidebar/SidebarTab.d.ts +9 -0
  89. package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -0
  90. package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -0
  91. package/types/components/Sidebar/SidebarTabs.d.ts +7 -0
  92. package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
  93. package/types/components/Sidebar/common.d.ts +24 -7
  94. package/types/components/Spinner.d.ts +2 -1
  95. package/types/components/Stack.d.ts +4 -3
  96. package/types/components/Stats.d.ts +3 -3
  97. package/types/components/Switch.d.ts +9 -0
  98. package/types/components/ToolButton.d.ts +5 -4
  99. package/types/components/Tooltip.d.ts +1 -1
  100. package/types/components/Trans.d.ts +8 -0
  101. package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
  102. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +4 -2
  103. package/types/components/footer/Footer.d.ts +2 -2
  104. package/types/components/icons.d.ts +11 -1
  105. package/types/components/main-menu/MainMenu.d.ts +3 -2
  106. package/types/constants.d.ts +42 -6
  107. package/types/context/tunnels.d.ts +19 -0
  108. package/types/context/ui-appState.d.ts +4 -0
  109. package/types/data/blob.d.ts +2 -2
  110. package/types/data/encode.d.ts +1 -1
  111. package/types/data/filesystem.d.ts +2 -1
  112. package/types/data/library.d.ts +3 -45
  113. package/types/data/restore.d.ts +2 -2
  114. package/types/data/types.d.ts +3 -5
  115. package/types/element/Hyperlink.d.ts +14 -6
  116. package/types/element/binding.d.ts +3 -3
  117. package/types/element/bounds.d.ts +31 -6
  118. package/types/element/collision.d.ts +7 -7
  119. package/types/element/dragElements.d.ts +2 -1
  120. package/types/element/image.d.ts +11 -1
  121. package/types/element/index.d.ts +3 -2
  122. package/types/element/linearElementEditor.d.ts +13 -5
  123. package/types/element/mutateElement.d.ts +1 -1
  124. package/types/element/newElement.d.ts +10 -3
  125. package/types/element/resizeElements.d.ts +1 -0
  126. package/types/element/showSelectedShapeActions.d.ts +2 -2
  127. package/types/element/textElement.d.ts +3 -2
  128. package/types/element/transformHandles.d.ts +12 -5
  129. package/types/element/typeChecks.d.ts +2 -1
  130. package/types/element/types.d.ts +40 -35
  131. package/types/emitter.d.ts +1 -1
  132. package/types/errors.d.ts +1 -1
  133. package/types/frame.d.ts +40 -0
  134. package/types/ga.d.ts +5 -5
  135. package/types/groups.d.ts +4 -0
  136. package/types/hooks/useCreatePortalContainer.d.ts +4 -0
  137. package/types/hooks/useLibraryItemSvg.d.ts +11 -0
  138. package/types/hooks/useOutsideClick.d.ts +19 -1
  139. package/types/hooks/useScrollPosition.d.ts +2 -0
  140. package/types/hooks/useTransition.d.ts +2 -0
  141. package/types/i18n.d.ts +2 -2
  142. package/types/jotai.d.ts +16 -104
  143. package/types/keys.d.ts +2 -1
  144. package/types/math.d.ts +1 -0
  145. package/types/packages/excalidraw/example/initialData.d.ts +6 -0
  146. package/types/packages/excalidraw/index.d.ts +2 -1
  147. package/types/packages/utils.d.ts +2 -2
  148. package/types/renderer/renderElement.d.ts +4 -3
  149. package/types/renderer/renderScene.d.ts +12 -3
  150. package/types/renderer/roundRect.d.ts +1 -1
  151. package/types/scene/Scene.d.ts +12 -5
  152. package/types/scene/export.d.ts +3 -2
  153. package/types/scene/selection.d.ts +15 -5
  154. package/types/scene/types.d.ts +4 -4
  155. package/types/types.d.ts +91 -52
  156. package/types/utility-types.d.ts +13 -13
  157. package/types/utils.d.ts +20 -25
  158. package/types/zindex.d.ts +4 -4
  159. package/types/actions/actionToggleLock.d.ts +0 -119
  160. package/types/components/ColorPicker.d.ts +0 -14
  161. package/types/components/LibraryButton.d.ts +0 -8
  162. package/types/components/context/tunnels.d.ts +0 -16
  163. package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
@@ -0,0 +1,397 @@
1
+ /// <reference types="react" />
2
+ import { ExcalidrawElement } from "../element/types";
3
+ import { AppState } from "../types";
4
+ export declare const actionSelectAllElementsInFrame: {
5
+ name: "selectAllElementsInFrame";
6
+ trackEvent: {
7
+ category: "canvas";
8
+ };
9
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
10
+ elements: readonly ExcalidrawElement[];
11
+ appState: Readonly<AppState>;
12
+ commitToHistory: false;
13
+ };
14
+ contextItemLabel: string;
15
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
16
+ } & {
17
+ keyTest?: undefined;
18
+ };
19
+ export declare const actionRemoveAllElementsFromFrame: {
20
+ name: "removeAllElementsFromFrame";
21
+ trackEvent: {
22
+ category: "history";
23
+ };
24
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
25
+ elements: 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
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
39
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
40
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
41
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
42
+ isBindingEnabled: boolean;
43
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
44
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
45
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
46
+ shouldRenderFrames: boolean;
47
+ editingFrame: string | null;
48
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
49
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
50
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
51
+ activeTool: {
52
+ lastActiveTool: import("../types").LastActiveTool;
53
+ locked: boolean;
54
+ } & ({
55
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
56
+ customType: null;
57
+ } | {
58
+ type: "custom";
59
+ customType: string;
60
+ });
61
+ penMode: boolean;
62
+ penDetected: boolean;
63
+ exportBackground: boolean;
64
+ exportEmbedScene: boolean;
65
+ exportWithDarkMode: boolean;
66
+ exportScale: number;
67
+ currentItemStrokeColor: string;
68
+ currentItemBackgroundColor: string;
69
+ currentItemFillStyle: import("../element/types").FillStyle;
70
+ currentItemStrokeWidth: number;
71
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
72
+ currentItemRoughness: number;
73
+ currentItemOpacity: number;
74
+ currentItemFontFamily: number;
75
+ currentItemFontSize: number;
76
+ currentItemTextAlign: string;
77
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
78
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
79
+ currentItemRoundness: import("../element/types").StrokeRoundness;
80
+ viewBackgroundColor: string;
81
+ scrollX: number;
82
+ scrollY: number;
83
+ cursorButton: "up" | "down";
84
+ scrolledOutside: boolean;
85
+ name: string;
86
+ isResizing: boolean;
87
+ isRotating: boolean;
88
+ zoom: Readonly<{
89
+ value: import("../types").NormalizedZoomValue;
90
+ }>;
91
+ openMenu: "canvas" | "shape" | null;
92
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
93
+ openSidebar: {
94
+ name: string;
95
+ tab?: string | undefined;
96
+ } | null;
97
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
98
+ defaultSidebarDockedPreference: boolean;
99
+ lastPointerDownWith: import("../element/types").PointerType;
100
+ previousSelectedElementIds: {
101
+ [id: string]: boolean;
102
+ };
103
+ selectedElementsAreBeingDragged: boolean;
104
+ shouldCacheIgnoreZoom: boolean;
105
+ toast: {
106
+ message: string;
107
+ closable?: boolean | undefined;
108
+ duration?: number | undefined;
109
+ } | null;
110
+ zenModeEnabled: boolean;
111
+ theme: string;
112
+ gridSize: number | null;
113
+ viewModeEnabled: boolean;
114
+ selectedGroupIds: {
115
+ [groupId: string]: boolean;
116
+ };
117
+ editingGroupId: string | null;
118
+ width: number;
119
+ height: number;
120
+ offsetTop: number;
121
+ offsetLeft: number;
122
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
123
+ collaborators: Map<string, import("../types").Collaborator>;
124
+ showStats: boolean;
125
+ currentChartType: import("../element/types").ChartType;
126
+ pasteDialog: {
127
+ shown: false;
128
+ data: null;
129
+ } | {
130
+ shown: true;
131
+ data: import("../charts").Spreadsheet;
132
+ };
133
+ pendingImageElementId: string | null;
134
+ showHyperlinkPopup: false | "info" | "editor";
135
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
136
+ };
137
+ commitToHistory: true;
138
+ } | {
139
+ elements: readonly ExcalidrawElement[];
140
+ appState: Readonly<AppState>;
141
+ commitToHistory: false;
142
+ };
143
+ contextItemLabel: string;
144
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
145
+ } & {
146
+ keyTest?: undefined;
147
+ };
148
+ export declare const actionToggleFrameRendering: {
149
+ name: "toggleFrameRendering";
150
+ viewMode: true;
151
+ trackEvent: {
152
+ category: "canvas";
153
+ };
154
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
155
+ elements: readonly ExcalidrawElement[];
156
+ appState: {
157
+ shouldRenderFrames: boolean;
158
+ contextMenu: {
159
+ items: import("../components/ContextMenu").ContextMenuItems;
160
+ top: number;
161
+ left: number;
162
+ } | null;
163
+ showWelcomeScreen: boolean;
164
+ isLoading: boolean;
165
+ errorMessage: import("react").ReactNode;
166
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
167
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
168
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
169
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
170
+ isBindingEnabled: boolean;
171
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
172
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
173
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
174
+ editingFrame: string | null;
175
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
176
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
177
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
178
+ activeTool: {
179
+ lastActiveTool: import("../types").LastActiveTool;
180
+ locked: boolean;
181
+ } & ({
182
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
183
+ customType: null;
184
+ } | {
185
+ type: "custom";
186
+ customType: string;
187
+ });
188
+ penMode: boolean;
189
+ penDetected: boolean;
190
+ exportBackground: boolean;
191
+ exportEmbedScene: boolean;
192
+ exportWithDarkMode: boolean;
193
+ exportScale: number;
194
+ currentItemStrokeColor: string;
195
+ currentItemBackgroundColor: string;
196
+ currentItemFillStyle: import("../element/types").FillStyle;
197
+ currentItemStrokeWidth: number;
198
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
199
+ currentItemRoughness: number;
200
+ currentItemOpacity: number;
201
+ currentItemFontFamily: number;
202
+ currentItemFontSize: number;
203
+ currentItemTextAlign: string;
204
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
205
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
206
+ currentItemRoundness: import("../element/types").StrokeRoundness;
207
+ viewBackgroundColor: string;
208
+ scrollX: number;
209
+ scrollY: number;
210
+ cursorButton: "up" | "down";
211
+ scrolledOutside: boolean;
212
+ name: string;
213
+ isResizing: boolean;
214
+ isRotating: boolean;
215
+ zoom: Readonly<{
216
+ value: import("../types").NormalizedZoomValue;
217
+ }>;
218
+ openMenu: "canvas" | "shape" | null;
219
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
220
+ openSidebar: {
221
+ name: string;
222
+ tab?: string | undefined;
223
+ } | null;
224
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
225
+ defaultSidebarDockedPreference: boolean;
226
+ lastPointerDownWith: import("../element/types").PointerType;
227
+ selectedElementIds: {
228
+ [id: string]: boolean;
229
+ };
230
+ previousSelectedElementIds: {
231
+ [id: string]: boolean;
232
+ };
233
+ selectedElementsAreBeingDragged: boolean;
234
+ shouldCacheIgnoreZoom: boolean;
235
+ toast: {
236
+ message: string;
237
+ closable?: boolean | undefined;
238
+ duration?: number | undefined;
239
+ } | null;
240
+ zenModeEnabled: boolean;
241
+ theme: string;
242
+ gridSize: number | null;
243
+ viewModeEnabled: boolean;
244
+ selectedGroupIds: {
245
+ [groupId: string]: boolean;
246
+ };
247
+ editingGroupId: string | null;
248
+ width: number;
249
+ height: number;
250
+ offsetTop: number;
251
+ offsetLeft: number;
252
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
253
+ collaborators: Map<string, import("../types").Collaborator>;
254
+ showStats: boolean;
255
+ currentChartType: import("../element/types").ChartType;
256
+ pasteDialog: {
257
+ shown: false;
258
+ data: null;
259
+ } | {
260
+ shown: true;
261
+ data: import("../charts").Spreadsheet;
262
+ };
263
+ pendingImageElementId: string | null;
264
+ showHyperlinkPopup: false | "info" | "editor";
265
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
266
+ };
267
+ commitToHistory: false;
268
+ };
269
+ contextItemLabel: string;
270
+ checked: (appState: AppState) => boolean;
271
+ } & {
272
+ keyTest?: undefined;
273
+ };
274
+ export declare const actionSetFrameAsActiveTool: {
275
+ name: "setFrameAsActiveTool";
276
+ trackEvent: {
277
+ category: "toolbar";
278
+ };
279
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
280
+ elements: readonly ExcalidrawElement[];
281
+ appState: {
282
+ activeTool: {
283
+ lastActiveTool: import("../types").LastActiveTool;
284
+ locked: boolean;
285
+ } & ({
286
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
287
+ customType: null;
288
+ } | {
289
+ type: "custom";
290
+ customType: string;
291
+ });
292
+ contextMenu: {
293
+ items: import("../components/ContextMenu").ContextMenuItems;
294
+ top: number;
295
+ left: number;
296
+ } | null;
297
+ showWelcomeScreen: boolean;
298
+ isLoading: boolean;
299
+ errorMessage: import("react").ReactNode;
300
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
301
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
302
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
303
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
304
+ isBindingEnabled: boolean;
305
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
306
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
307
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
308
+ shouldRenderFrames: boolean;
309
+ editingFrame: string | null;
310
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
311
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
312
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
313
+ penMode: boolean;
314
+ penDetected: boolean;
315
+ exportBackground: boolean;
316
+ exportEmbedScene: boolean;
317
+ exportWithDarkMode: boolean;
318
+ exportScale: number;
319
+ currentItemStrokeColor: string;
320
+ currentItemBackgroundColor: string;
321
+ currentItemFillStyle: import("../element/types").FillStyle;
322
+ currentItemStrokeWidth: number;
323
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
324
+ currentItemRoughness: number;
325
+ currentItemOpacity: number;
326
+ currentItemFontFamily: number;
327
+ currentItemFontSize: number;
328
+ currentItemTextAlign: string;
329
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
330
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
331
+ currentItemRoundness: import("../element/types").StrokeRoundness;
332
+ viewBackgroundColor: string;
333
+ scrollX: number;
334
+ scrollY: number;
335
+ cursorButton: "up" | "down";
336
+ scrolledOutside: boolean;
337
+ name: string;
338
+ isResizing: boolean;
339
+ isRotating: boolean;
340
+ zoom: Readonly<{
341
+ value: import("../types").NormalizedZoomValue;
342
+ }>;
343
+ openMenu: "canvas" | "shape" | null;
344
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
345
+ openSidebar: {
346
+ name: string;
347
+ tab?: string | undefined;
348
+ } | null;
349
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
350
+ defaultSidebarDockedPreference: boolean;
351
+ lastPointerDownWith: import("../element/types").PointerType;
352
+ selectedElementIds: {
353
+ [id: string]: boolean;
354
+ };
355
+ previousSelectedElementIds: {
356
+ [id: string]: boolean;
357
+ };
358
+ selectedElementsAreBeingDragged: boolean;
359
+ shouldCacheIgnoreZoom: boolean;
360
+ toast: {
361
+ message: string;
362
+ closable?: boolean | undefined;
363
+ duration?: number | undefined;
364
+ } | null;
365
+ zenModeEnabled: boolean;
366
+ theme: string;
367
+ gridSize: number | null;
368
+ viewModeEnabled: boolean;
369
+ selectedGroupIds: {
370
+ [groupId: string]: boolean;
371
+ };
372
+ editingGroupId: string | null;
373
+ width: number;
374
+ height: number;
375
+ offsetTop: number;
376
+ offsetLeft: number;
377
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
378
+ collaborators: Map<string, import("../types").Collaborator>;
379
+ showStats: boolean;
380
+ currentChartType: import("../element/types").ChartType;
381
+ pasteDialog: {
382
+ shown: false;
383
+ data: null;
384
+ } | {
385
+ shown: true;
386
+ data: import("../charts").Spreadsheet;
387
+ };
388
+ pendingImageElementId: string | null;
389
+ showHyperlinkPopup: false | "info" | "editor";
390
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
391
+ };
392
+ commitToHistory: false;
393
+ };
394
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
395
+ } & {
396
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
397
+ };
@@ -6,7 +6,7 @@ export declare const actionGroup: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
9
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
10
10
  appState: Readonly<AppState>;
11
11
  elements: readonly ExcalidrawElement[];
12
12
  commitToHistory: false;
@@ -27,7 +27,7 @@ export declare const actionUngroup: {
27
27
  trackEvent: {
28
28
  category: "element";
29
29
  };
30
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
30
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
31
31
  appState: Readonly<AppState>;
32
32
  elements: readonly ExcalidrawElement[];
33
33
  commitToHistory: false;
@@ -1,6 +1,6 @@
1
1
  import { Action } from "./types";
2
2
  import History from "../history";
3
- declare type ActionCreator = (history: History) => Action;
3
+ type ActionCreator = (history: History) => Action;
4
4
  export declare const createUndoAction: ActionCreator;
5
5
  export declare const createRedoAction: ActionCreator;
6
6
  export {};
@@ -25,12 +25,16 @@ export declare const actionToggleLinearEditor: {
25
25
  isBindingEnabled: boolean;
26
26
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
27
27
  suggestedBindings: import("../element/binding").SuggestedBinding[];
28
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
29
+ shouldRenderFrames: boolean;
30
+ editingFrame: string | null;
31
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
28
32
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
29
33
  activeTool: {
30
34
  lastActiveTool: import("../types").LastActiveTool;
31
35
  locked: boolean;
32
36
  } & ({
33
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
37
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
34
38
  customType: null;
35
39
  } | {
36
40
  type: "custom";
@@ -67,10 +71,13 @@ export declare const actionToggleLinearEditor: {
67
71
  value: import("../types").NormalizedZoomValue;
68
72
  }>;
69
73
  openMenu: "canvas" | "shape" | null;
70
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
71
- openSidebar: "library" | "customSidebar" | null;
74
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
75
+ openSidebar: {
76
+ name: string;
77
+ tab?: string | undefined;
78
+ } | null;
72
79
  openDialog: "imageExport" | "help" | "jsonExport" | null;
73
- isSidebarDocked: boolean;
80
+ defaultSidebarDockedPreference: boolean;
74
81
  lastPointerDownWith: import("../element/types").PointerType;
75
82
  selectedElementIds: {
76
83
  [id: string]: boolean;
@@ -78,6 +85,7 @@ export declare const actionToggleLinearEditor: {
78
85
  previousSelectedElementIds: {
79
86
  [id: string]: boolean;
80
87
  };
88
+ selectedElementsAreBeingDragged: boolean;
81
89
  shouldCacheIgnoreZoom: boolean;
82
90
  toast: {
83
91
  message: string;
@@ -22,13 +22,17 @@ export declare const actionToggleCanvasMenu: {
22
22
  isBindingEnabled: boolean;
23
23
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
24
24
  suggestedBindings: import("../element/binding").SuggestedBinding[];
25
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
26
+ shouldRenderFrames: boolean;
27
+ editingFrame: string | null;
28
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
25
29
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
26
30
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
27
31
  activeTool: {
28
32
  lastActiveTool: import("../types").LastActiveTool;
29
33
  locked: boolean;
30
34
  } & ({
31
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
35
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
32
36
  customType: null;
33
37
  } | {
34
38
  type: "custom";
@@ -64,10 +68,13 @@ export declare const actionToggleCanvasMenu: {
64
68
  zoom: Readonly<{
65
69
  value: import("../types").NormalizedZoomValue;
66
70
  }>;
67
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
68
- openSidebar: "library" | "customSidebar" | null;
71
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
72
+ openSidebar: {
73
+ name: string;
74
+ tab?: string | undefined;
75
+ } | null;
69
76
  openDialog: "imageExport" | "help" | "jsonExport" | null;
70
- isSidebarDocked: boolean;
77
+ defaultSidebarDockedPreference: boolean;
71
78
  lastPointerDownWith: import("../element/types").PointerType;
72
79
  selectedElementIds: {
73
80
  [id: string]: boolean;
@@ -75,6 +82,7 @@ export declare const actionToggleCanvasMenu: {
75
82
  previousSelectedElementIds: {
76
83
  [id: string]: boolean;
77
84
  };
85
+ selectedElementsAreBeingDragged: boolean;
78
86
  shouldCacheIgnoreZoom: boolean;
79
87
  toast: {
80
88
  message: string;
@@ -137,13 +145,17 @@ export declare const actionToggleEditMenu: {
137
145
  isBindingEnabled: boolean;
138
146
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
139
147
  suggestedBindings: import("../element/binding").SuggestedBinding[];
148
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
149
+ shouldRenderFrames: boolean;
150
+ editingFrame: string | null;
151
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
140
152
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
141
153
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
142
154
  activeTool: {
143
155
  lastActiveTool: import("../types").LastActiveTool;
144
156
  locked: boolean;
145
157
  } & ({
146
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
158
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
147
159
  customType: null;
148
160
  } | {
149
161
  type: "custom";
@@ -179,10 +191,13 @@ export declare const actionToggleEditMenu: {
179
191
  zoom: Readonly<{
180
192
  value: import("../types").NormalizedZoomValue;
181
193
  }>;
182
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
183
- openSidebar: "library" | "customSidebar" | null;
194
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
195
+ openSidebar: {
196
+ name: string;
197
+ tab?: string | undefined;
198
+ } | null;
184
199
  openDialog: "imageExport" | "help" | "jsonExport" | null;
185
- isSidebarDocked: boolean;
200
+ defaultSidebarDockedPreference: boolean;
186
201
  lastPointerDownWith: import("../element/types").PointerType;
187
202
  selectedElementIds: {
188
203
  [id: string]: boolean;
@@ -190,6 +205,7 @@ export declare const actionToggleEditMenu: {
190
205
  previousSelectedElementIds: {
191
206
  [id: string]: boolean;
192
207
  };
208
+ selectedElementsAreBeingDragged: boolean;
193
209
  shouldCacheIgnoreZoom: boolean;
194
210
  toast: {
195
211
  message: string;
@@ -239,9 +255,8 @@ export declare const actionFullScreen: {
239
255
  perform: () => {
240
256
  commitToHistory: false;
241
257
  };
242
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
243
258
  } & {
244
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
259
+ keyTest?: undefined;
245
260
  };
246
261
  export declare const actionShortcuts: {
247
262
  name: "toggleShortcuts";
@@ -268,13 +283,17 @@ export declare const actionShortcuts: {
268
283
  isBindingEnabled: boolean;
269
284
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
270
285
  suggestedBindings: import("../element/binding").SuggestedBinding[];
286
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
287
+ shouldRenderFrames: boolean;
288
+ editingFrame: string | null;
289
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
271
290
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
272
291
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
273
292
  activeTool: {
274
293
  lastActiveTool: import("../types").LastActiveTool;
275
294
  locked: boolean;
276
295
  } & ({
277
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
296
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
278
297
  customType: null;
279
298
  } | {
280
299
  type: "custom";
@@ -311,9 +330,12 @@ export declare const actionShortcuts: {
311
330
  value: import("../types").NormalizedZoomValue;
312
331
  }>;
313
332
  openMenu: "canvas" | "shape" | null;
314
- openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
315
- openSidebar: "library" | "customSidebar" | null;
316
- isSidebarDocked: boolean;
333
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
334
+ openSidebar: {
335
+ name: string;
336
+ tab?: string | undefined;
337
+ } | null;
338
+ defaultSidebarDockedPreference: boolean;
317
339
  lastPointerDownWith: import("../element/types").PointerType;
318
340
  selectedElementIds: {
319
341
  [id: string]: boolean;
@@ -321,6 +343,7 @@ export declare const actionShortcuts: {
321
343
  previousSelectedElementIds: {
322
344
  [id: string]: boolean;
323
345
  };
346
+ selectedElementsAreBeingDragged: boolean;
324
347
  shouldCacheIgnoreZoom: boolean;
325
348
  toast: {
326
349
  message: string;
@@ -8,7 +8,7 @@ export declare const actionGoToCollaborator: {
8
8
  appState: Readonly<import("../types").AppState>;
9
9
  commitToHistory: false;
10
10
  };
11
- PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
11
+ PanelComponent: ({ updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
12
12
  } & {
13
13
  keyTest?: undefined;
14
14
  };