@dwelle/excalidraw 0.4.0-9db4535 → 0.4.0-9fa56da

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 (143) hide show
  1. package/CHANGELOG.md +255 -1
  2. package/README.md +4 -0
  3. package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
  4. package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
  5. package/dist/excalidraw.development.js +2123 -1783
  6. package/dist/excalidraw.production.min.js +1 -1
  7. package/package.json +7 -2
  8. package/types/actions/actionAddToLibrary.d.ts +84 -43
  9. package/types/actions/actionAlign.d.ts +33 -28
  10. package/types/actions/actionBoundText.d.ts +60 -32
  11. package/types/actions/actionCanvas.d.ts +436 -164
  12. package/types/actions/actionClipboard.d.ts +140 -74
  13. package/types/actions/actionDeleteSelected.d.ts +80 -42
  14. package/types/actions/actionDistribute.d.ts +11 -12
  15. package/types/actions/actionDuplicateSelection.d.ts +2 -3
  16. package/types/actions/actionElementLock.d.ts +58 -30
  17. package/types/actions/actionExport.d.ts +303 -177
  18. package/types/actions/actionFinalize.d.ts +56 -32
  19. package/types/actions/actionFlip.d.ts +8 -9
  20. package/types/actions/actionFrame.d.ts +423 -0
  21. package/types/actions/actionGroup.d.ts +250 -13
  22. package/types/actions/actionLinearEditor.d.ts +30 -17
  23. package/types/actions/actionMenu.d.ts +87 -47
  24. package/types/actions/actionNavigate.d.ts +1 -1
  25. package/types/actions/actionProperties.d.ts +370 -187
  26. package/types/actions/actionSelectAll.d.ts +123 -4
  27. package/types/actions/actionStyles.d.ts +32 -19
  28. package/types/actions/actionToggleGridMode.d.ts +30 -17
  29. package/types/actions/actionToggleObjectsSnapMode.d.ts +137 -0
  30. package/types/actions/actionToggleStats.d.ts +30 -17
  31. package/types/actions/actionToggleViewMode.d.ts +30 -17
  32. package/types/actions/actionToggleZenMode.d.ts +30 -17
  33. package/types/actions/actionZindex.d.ts +12 -12
  34. package/types/actions/index.d.ts +1 -0
  35. package/types/actions/shortcuts.d.ts +1 -1
  36. package/types/actions/types.d.ts +4 -3
  37. package/types/appState.d.ts +10 -15
  38. package/types/clients.d.ts +1 -5
  39. package/types/clipboard.d.ts +1 -0
  40. package/types/colors.d.ts +9 -9
  41. package/types/components/Actions.d.ts +4 -5
  42. package/types/components/App.d.ts +61 -28
  43. package/types/components/Avatar.d.ts +0 -1
  44. package/types/components/Button.d.ts +0 -1
  45. package/types/components/Card.d.ts +0 -1
  46. package/types/components/ColorPicker/ColorInput.d.ts +3 -1
  47. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
  48. package/types/components/DefaultSidebar.d.ts +0 -1
  49. package/types/components/Dialog.d.ts +2 -1
  50. package/types/components/ExcalidrawLogo.d.ts +15 -0
  51. package/types/components/EyeDropper.d.ts +18 -8
  52. package/types/components/FilledButton.d.ts +2 -1
  53. package/types/components/HintViewer.d.ts +3 -4
  54. package/types/components/JSONExportDialog.d.ts +1 -1
  55. package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
  56. package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
  57. package/types/components/LaserTool/LaserTool.d.ts +7 -0
  58. package/types/components/LayerUI.d.ts +6 -2
  59. package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
  60. package/types/components/LibraryUnit.d.ts +0 -1
  61. package/types/components/LoadingMessage.d.ts +0 -1
  62. package/types/components/MobileMenu.d.ts +4 -3
  63. package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
  64. package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
  65. package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
  66. package/types/components/Section.d.ts +1 -1
  67. package/types/components/Sidebar/Sidebar.d.ts +1 -1
  68. package/types/components/Sidebar/SidebarTab.d.ts +0 -1
  69. package/types/components/Sidebar/SidebarTabTrigger.d.ts +0 -1
  70. package/types/components/Sidebar/SidebarTabTriggers.d.ts +0 -1
  71. package/types/components/Sidebar/SidebarTabs.d.ts +0 -1
  72. package/types/components/Stack.d.ts +2 -2
  73. package/types/components/ToolButton.d.ts +2 -1
  74. package/types/components/Trans.d.ts +2 -1
  75. package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
  76. package/types/components/canvases/StaticCanvas.d.ts +18 -0
  77. package/types/components/canvases/index.d.ts +3 -0
  78. package/types/components/dropdownMenu/DropdownMenu.d.ts +9 -5
  79. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -1
  80. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
  81. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +2 -1
  82. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
  83. package/types/components/dropdownMenu/common.d.ts +1 -1
  84. package/types/components/icons.d.ts +6 -0
  85. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
  86. package/types/components/main-menu/MainMenu.d.ts +9 -5
  87. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
  88. package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
  89. package/types/constants.d.ts +35 -3
  90. package/types/context/tunnels.d.ts +1 -0
  91. package/types/data/transform.d.ts +71 -0
  92. package/types/data/url.d.ts +7 -0
  93. package/types/element/Hyperlink.d.ts +40 -23
  94. package/types/element/binding.d.ts +2 -1
  95. package/types/element/bounds.d.ts +30 -6
  96. package/types/element/collision.d.ts +7 -7
  97. package/types/element/dragElements.d.ts +12 -2
  98. package/types/element/embeddable.d.ts +153 -0
  99. package/types/element/index.d.ts +3 -2
  100. package/types/element/linearElementEditor.d.ts +33 -20
  101. package/types/element/newElement.d.ts +15 -6
  102. package/types/element/resizeElements.d.ts +2 -2
  103. package/types/element/sizeHelpers.d.ts +8 -1
  104. package/types/element/textElement.d.ts +5 -7
  105. package/types/element/textWysiwyg.d.ts +1 -1
  106. package/types/element/transformHandles.d.ts +10 -3
  107. package/types/element/typeChecks.d.ts +3 -1
  108. package/types/element/types.d.ts +19 -3
  109. package/types/frame.d.ts +40 -0
  110. package/types/groups.d.ts +15 -11
  111. package/types/history.d.ts +3 -3
  112. package/types/hooks/useOutsideClick.d.ts +0 -1
  113. package/types/hooks/useScrollPosition.d.ts +0 -1
  114. package/types/hooks/useStable.d.ts +1 -0
  115. package/types/i18n.d.ts +5 -2
  116. package/types/keys.d.ts +4 -0
  117. package/types/math.d.ts +3 -0
  118. package/types/packages/excalidraw/example/initialData.d.ts +182 -64
  119. package/types/packages/excalidraw/index.d.ts +3 -1
  120. package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
  121. package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
  122. package/types/packages/utils.d.ts +4 -1
  123. package/types/renderer/renderElement.d.ts +11 -22
  124. package/types/renderer/renderScene.d.ts +19 -27
  125. package/types/renderer/renderSnaps.d.ts +2 -0
  126. package/types/renderer/roundRect.d.ts +1 -1
  127. package/types/scene/Renderer.d.ts +25 -0
  128. package/types/scene/Scene.d.ts +23 -1
  129. package/types/scene/Shape.d.ts +12 -0
  130. package/types/scene/ShapeCache.d.ts +20 -0
  131. package/types/scene/export.d.ts +35 -9
  132. package/types/scene/scroll.d.ts +1 -1
  133. package/types/scene/scrollbars.d.ts +2 -6
  134. package/types/scene/selection.d.ts +26 -5
  135. package/types/scene/types.d.ts +66 -31
  136. package/types/snapping.d.ts +108 -0
  137. package/types/types.d.ts +130 -25
  138. package/types/utility-types.d.ts +3 -1
  139. package/types/utils.d.ts +60 -23
  140. package/types/zindex.d.ts +4 -4
  141. /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
  142. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
  143. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ExcalidrawElement } from "../element/types";
3
2
  import { AppState, NormalizedZoomValue } from "../types";
4
3
  export declare const actionChangeViewBackgroundColor: {
@@ -23,7 +22,7 @@ export declare const actionClearCanvas: {
23
22
  elements: ExcalidrawElement[];
24
23
  appState: {
25
24
  files: {};
26
- theme: string;
25
+ theme: import("../element/types").Theme;
27
26
  penMode: boolean;
28
27
  penDetected: boolean;
29
28
  exportBackground: boolean;
@@ -38,16 +37,16 @@ export declare const actionClearCanvas: {
38
37
  data: import("../charts").Spreadsheet;
39
38
  };
40
39
  activeTool: {
41
- lastActiveTool: import("../types").LastActiveTool;
40
+ lastActiveTool: import("../types").ActiveTool | null;
42
41
  locked: boolean;
43
- } & ({
44
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
45
- customType: null;
46
- } | {
47
- type: "custom";
48
- customType: string;
49
- });
42
+ } & import("../types").ActiveTool;
50
43
  name: string;
44
+ toast: {
45
+ message: string;
46
+ closable?: boolean | undefined;
47
+ duration?: number | undefined;
48
+ } | null;
49
+ collaborators: Map<string, import("../types").Collaborator>;
51
50
  contextMenu: {
52
51
  items: import("../components/ContextMenu").ContextMenuItems;
53
52
  top: number;
@@ -56,6 +55,10 @@ export declare const actionClearCanvas: {
56
55
  showWelcomeScreen: boolean;
57
56
  isLoading: boolean;
58
57
  errorMessage: import("react").ReactNode;
58
+ activeEmbeddable: {
59
+ element: import("../element/types").NonDeletedExcalidrawElement;
60
+ state: "active" | "hover";
61
+ } | null;
59
62
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
60
63
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
61
64
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -63,6 +66,15 @@ export declare const actionClearCanvas: {
63
66
  isBindingEnabled: boolean;
64
67
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
65
68
  suggestedBindings: import("../element/binding").SuggestedBinding[];
69
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
70
+ frameRendering: {
71
+ enabled: boolean;
72
+ name: boolean;
73
+ outline: boolean;
74
+ clip: boolean;
75
+ };
76
+ editingFrame: string | null;
77
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
66
78
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
67
79
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
68
80
  exportWithDarkMode: boolean;
@@ -99,18 +111,14 @@ export declare const actionClearCanvas: {
99
111
  openDialog: "imageExport" | "help" | "jsonExport" | null;
100
112
  defaultSidebarDockedPreference: boolean;
101
113
  lastPointerDownWith: import("../element/types").PointerType;
102
- selectedElementIds: {
103
- [id: string]: boolean;
104
- };
114
+ selectedElementIds: Readonly<{
115
+ [id: string]: true;
116
+ }>;
105
117
  previousSelectedElementIds: {
106
- [id: string]: boolean;
118
+ [id: string]: true;
107
119
  };
120
+ selectedElementsAreBeingDragged: boolean;
108
121
  shouldCacheIgnoreZoom: boolean;
109
- toast: {
110
- message: string;
111
- closable?: boolean | undefined;
112
- duration?: number | undefined;
113
- } | null;
114
122
  zenModeEnabled: boolean;
115
123
  viewModeEnabled: boolean;
116
124
  selectedGroupIds: {
@@ -118,11 +126,16 @@ export declare const actionClearCanvas: {
118
126
  };
119
127
  editingGroupId: string | null;
120
128
  fileHandle: import("browser-fs-access").FileSystemHandle | null;
121
- collaborators: Map<string, import("../types").Collaborator>;
122
129
  currentChartType: import("../element/types").ChartType;
123
130
  pendingImageElementId: string | null;
124
- showHyperlinkPopup: false | "info" | "editor";
131
+ showHyperlinkPopup: false | "editor" | "info";
125
132
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
133
+ snapLines: readonly import("../snapping").SnapLine[];
134
+ originSnapOffset: {
135
+ x: number;
136
+ y: number;
137
+ } | null;
138
+ objectsSnapModeEnabled: boolean;
126
139
  };
127
140
  commitToHistory: true;
128
141
  };
@@ -150,6 +163,10 @@ export declare const actionZoomIn: {
150
163
  showWelcomeScreen: boolean;
151
164
  isLoading: boolean;
152
165
  errorMessage: import("react").ReactNode;
166
+ activeEmbeddable: {
167
+ element: import("../element/types").NonDeletedExcalidrawElement;
168
+ state: "active" | "hover";
169
+ } | null;
153
170
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
154
171
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
155
172
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -157,18 +174,21 @@ export declare const actionZoomIn: {
157
174
  isBindingEnabled: boolean;
158
175
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
159
176
  suggestedBindings: import("../element/binding").SuggestedBinding[];
177
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
178
+ frameRendering: {
179
+ enabled: boolean;
180
+ name: boolean;
181
+ outline: boolean;
182
+ clip: boolean;
183
+ };
184
+ editingFrame: string | null;
185
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
160
186
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
161
187
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
162
188
  activeTool: {
163
- lastActiveTool: import("../types").LastActiveTool;
189
+ lastActiveTool: import("../types").ActiveTool | null;
164
190
  locked: boolean;
165
- } & ({
166
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
167
- customType: null;
168
- } | {
169
- type: "custom";
170
- customType: string;
171
- });
191
+ } & import("../types").ActiveTool;
172
192
  penMode: boolean;
173
193
  penDetected: boolean;
174
194
  exportBackground: boolean;
@@ -203,12 +223,13 @@ export declare const actionZoomIn: {
203
223
  openDialog: "imageExport" | "help" | "jsonExport" | null;
204
224
  defaultSidebarDockedPreference: boolean;
205
225
  lastPointerDownWith: import("../element/types").PointerType;
206
- selectedElementIds: {
207
- [id: string]: boolean;
208
- };
226
+ selectedElementIds: Readonly<{
227
+ [id: string]: true;
228
+ }>;
209
229
  previousSelectedElementIds: {
210
- [id: string]: boolean;
230
+ [id: string]: true;
211
231
  };
232
+ selectedElementsAreBeingDragged: boolean;
212
233
  shouldCacheIgnoreZoom: boolean;
213
234
  toast: {
214
235
  message: string;
@@ -216,7 +237,7 @@ export declare const actionZoomIn: {
216
237
  duration?: number | undefined;
217
238
  } | null;
218
239
  zenModeEnabled: boolean;
219
- theme: string;
240
+ theme: import("../element/types").Theme;
220
241
  gridSize: number | null;
221
242
  viewModeEnabled: boolean;
222
243
  selectedGroupIds: {
@@ -239,15 +260,21 @@ export declare const actionZoomIn: {
239
260
  data: import("../charts").Spreadsheet;
240
261
  };
241
262
  pendingImageElementId: string | null;
242
- showHyperlinkPopup: false | "info" | "editor";
263
+ showHyperlinkPopup: false | "editor" | "info";
243
264
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
265
+ snapLines: readonly import("../snapping").SnapLine[];
266
+ originSnapOffset: {
267
+ x: number;
268
+ y: number;
269
+ } | null;
270
+ objectsSnapModeEnabled: boolean;
244
271
  };
245
272
  commitToHistory: false;
246
273
  };
247
274
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
248
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
275
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
249
276
  } & {
250
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
277
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
251
278
  };
252
279
  export declare const actionZoomOut: {
253
280
  name: "zoomOut";
@@ -270,6 +297,10 @@ export declare const actionZoomOut: {
270
297
  showWelcomeScreen: boolean;
271
298
  isLoading: boolean;
272
299
  errorMessage: import("react").ReactNode;
300
+ activeEmbeddable: {
301
+ element: import("../element/types").NonDeletedExcalidrawElement;
302
+ state: "active" | "hover";
303
+ } | null;
273
304
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
274
305
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
275
306
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -277,18 +308,21 @@ export declare const actionZoomOut: {
277
308
  isBindingEnabled: boolean;
278
309
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
279
310
  suggestedBindings: import("../element/binding").SuggestedBinding[];
311
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
312
+ frameRendering: {
313
+ enabled: boolean;
314
+ name: boolean;
315
+ outline: boolean;
316
+ clip: boolean;
317
+ };
318
+ editingFrame: string | null;
319
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
280
320
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
281
321
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
282
322
  activeTool: {
283
- lastActiveTool: import("../types").LastActiveTool;
323
+ lastActiveTool: import("../types").ActiveTool | null;
284
324
  locked: boolean;
285
- } & ({
286
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
287
- customType: null;
288
- } | {
289
- type: "custom";
290
- customType: string;
291
- });
325
+ } & import("../types").ActiveTool;
292
326
  penMode: boolean;
293
327
  penDetected: boolean;
294
328
  exportBackground: boolean;
@@ -323,12 +357,13 @@ export declare const actionZoomOut: {
323
357
  openDialog: "imageExport" | "help" | "jsonExport" | null;
324
358
  defaultSidebarDockedPreference: boolean;
325
359
  lastPointerDownWith: import("../element/types").PointerType;
326
- selectedElementIds: {
327
- [id: string]: boolean;
328
- };
360
+ selectedElementIds: Readonly<{
361
+ [id: string]: true;
362
+ }>;
329
363
  previousSelectedElementIds: {
330
- [id: string]: boolean;
364
+ [id: string]: true;
331
365
  };
366
+ selectedElementsAreBeingDragged: boolean;
332
367
  shouldCacheIgnoreZoom: boolean;
333
368
  toast: {
334
369
  message: string;
@@ -336,7 +371,7 @@ export declare const actionZoomOut: {
336
371
  duration?: number | undefined;
337
372
  } | null;
338
373
  zenModeEnabled: boolean;
339
- theme: string;
374
+ theme: import("../element/types").Theme;
340
375
  gridSize: number | null;
341
376
  viewModeEnabled: boolean;
342
377
  selectedGroupIds: {
@@ -359,15 +394,21 @@ export declare const actionZoomOut: {
359
394
  data: import("../charts").Spreadsheet;
360
395
  };
361
396
  pendingImageElementId: string | null;
362
- showHyperlinkPopup: false | "info" | "editor";
397
+ showHyperlinkPopup: false | "editor" | "info";
363
398
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
399
+ snapLines: readonly import("../snapping").SnapLine[];
400
+ originSnapOffset: {
401
+ x: number;
402
+ y: number;
403
+ } | null;
404
+ objectsSnapModeEnabled: boolean;
364
405
  };
365
406
  commitToHistory: false;
366
407
  };
367
408
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
368
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
409
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
369
410
  } & {
370
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
411
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
371
412
  };
372
413
  export declare const actionResetZoom: {
373
414
  name: "resetZoom";
@@ -390,6 +431,10 @@ export declare const actionResetZoom: {
390
431
  showWelcomeScreen: boolean;
391
432
  isLoading: boolean;
392
433
  errorMessage: import("react").ReactNode;
434
+ activeEmbeddable: {
435
+ element: import("../element/types").NonDeletedExcalidrawElement;
436
+ state: "active" | "hover";
437
+ } | null;
393
438
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
394
439
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
395
440
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -397,18 +442,21 @@ export declare const actionResetZoom: {
397
442
  isBindingEnabled: boolean;
398
443
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
399
444
  suggestedBindings: import("../element/binding").SuggestedBinding[];
445
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
446
+ frameRendering: {
447
+ enabled: boolean;
448
+ name: boolean;
449
+ outline: boolean;
450
+ clip: boolean;
451
+ };
452
+ editingFrame: string | null;
453
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
400
454
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
401
455
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
402
456
  activeTool: {
403
- lastActiveTool: import("../types").LastActiveTool;
457
+ lastActiveTool: import("../types").ActiveTool | null;
404
458
  locked: boolean;
405
- } & ({
406
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
407
- customType: null;
408
- } | {
409
- type: "custom";
410
- customType: string;
411
- });
459
+ } & import("../types").ActiveTool;
412
460
  penMode: boolean;
413
461
  penDetected: boolean;
414
462
  exportBackground: boolean;
@@ -443,12 +491,13 @@ export declare const actionResetZoom: {
443
491
  openDialog: "imageExport" | "help" | "jsonExport" | null;
444
492
  defaultSidebarDockedPreference: boolean;
445
493
  lastPointerDownWith: import("../element/types").PointerType;
446
- selectedElementIds: {
447
- [id: string]: boolean;
448
- };
494
+ selectedElementIds: Readonly<{
495
+ [id: string]: true;
496
+ }>;
449
497
  previousSelectedElementIds: {
450
- [id: string]: boolean;
498
+ [id: string]: true;
451
499
  };
500
+ selectedElementsAreBeingDragged: boolean;
452
501
  shouldCacheIgnoreZoom: boolean;
453
502
  toast: {
454
503
  message: string;
@@ -456,7 +505,7 @@ export declare const actionResetZoom: {
456
505
  duration?: number | undefined;
457
506
  } | null;
458
507
  zenModeEnabled: boolean;
459
- theme: string;
508
+ theme: import("../element/types").Theme;
460
509
  gridSize: number | null;
461
510
  viewModeEnabled: boolean;
462
511
  selectedGroupIds: {
@@ -479,23 +528,36 @@ export declare const actionResetZoom: {
479
528
  data: import("../charts").Spreadsheet;
480
529
  };
481
530
  pendingImageElementId: string | null;
482
- showHyperlinkPopup: false | "info" | "editor";
531
+ showHyperlinkPopup: false | "editor" | "info";
483
532
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
533
+ snapLines: readonly import("../snapping").SnapLine[];
534
+ originSnapOffset: {
535
+ x: number;
536
+ y: number;
537
+ } | null;
538
+ objectsSnapModeEnabled: boolean;
484
539
  };
485
540
  commitToHistory: false;
486
541
  };
487
542
  PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
488
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
543
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
489
544
  } & {
490
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
545
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
491
546
  };
492
- export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean) => {
547
+ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
548
+ targetElements: readonly ExcalidrawElement[];
549
+ appState: Readonly<AppState>;
550
+ /** whether to fit content to viewport (beyond >100%) */
551
+ fitToViewport: boolean;
552
+ /** zoom content to cover X of the viewport, when fitToViewport=true */
553
+ viewportZoomFactor?: number | undefined;
554
+ }) => {
493
555
  appState: {
556
+ scrollX: number;
557
+ scrollY: number;
494
558
  zoom: {
495
559
  value: NormalizedZoomValue;
496
560
  };
497
- scrollX: number;
498
- scrollY: number;
499
561
  contextMenu: {
500
562
  items: import("../components/ContextMenu").ContextMenuItems;
501
563
  top: number;
@@ -504,6 +566,10 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
504
566
  showWelcomeScreen: boolean;
505
567
  isLoading: boolean;
506
568
  errorMessage: import("react").ReactNode;
569
+ activeEmbeddable: {
570
+ element: import("../element/types").NonDeletedExcalidrawElement;
571
+ state: "active" | "hover";
572
+ } | null;
507
573
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
508
574
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
509
575
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -511,18 +577,21 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
511
577
  isBindingEnabled: boolean;
512
578
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
513
579
  suggestedBindings: import("../element/binding").SuggestedBinding[];
580
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
581
+ frameRendering: {
582
+ enabled: boolean;
583
+ name: boolean;
584
+ outline: boolean;
585
+ clip: boolean;
586
+ };
587
+ editingFrame: string | null;
588
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
514
589
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
515
590
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
516
591
  activeTool: {
517
- lastActiveTool: import("../types").LastActiveTool;
592
+ lastActiveTool: import("../types").ActiveTool | null;
518
593
  locked: boolean;
519
- } & ({
520
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
521
- customType: null;
522
- } | {
523
- type: "custom";
524
- customType: string;
525
- });
594
+ } & import("../types").ActiveTool;
526
595
  penMode: boolean;
527
596
  penDetected: boolean;
528
597
  exportBackground: boolean;
@@ -557,12 +626,13 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
557
626
  openDialog: "imageExport" | "help" | "jsonExport" | null;
558
627
  defaultSidebarDockedPreference: boolean;
559
628
  lastPointerDownWith: import("../element/types").PointerType;
560
- selectedElementIds: {
561
- [id: string]: boolean;
562
- };
629
+ selectedElementIds: Readonly<{
630
+ [id: string]: true;
631
+ }>;
563
632
  previousSelectedElementIds: {
564
- [id: string]: boolean;
633
+ [id: string]: true;
565
634
  };
635
+ selectedElementsAreBeingDragged: boolean;
566
636
  shouldCacheIgnoreZoom: boolean;
567
637
  toast: {
568
638
  message: string;
@@ -570,7 +640,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
570
640
  duration?: number | undefined;
571
641
  } | null;
572
642
  zenModeEnabled: boolean;
573
- theme: string;
643
+ theme: import("../element/types").Theme;
574
644
  gridSize: number | null;
575
645
  viewModeEnabled: boolean;
576
646
  selectedGroupIds: {
@@ -593,23 +663,161 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
593
663
  data: import("../charts").Spreadsheet;
594
664
  };
595
665
  pendingImageElementId: string | null;
596
- showHyperlinkPopup: false | "info" | "editor";
666
+ showHyperlinkPopup: false | "editor" | "info";
597
667
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
668
+ snapLines: readonly import("../snapping").SnapLine[];
669
+ originSnapOffset: {
670
+ x: number;
671
+ y: number;
672
+ } | null;
673
+ objectsSnapModeEnabled: boolean;
598
674
  };
599
675
  commitToHistory: boolean;
600
676
  };
601
- export declare const actionZoomToSelected: {
602
- name: "zoomToSelection";
677
+ export declare const actionZoomToFitSelectionInViewport: {
678
+ name: "zoomToFitSelectionInViewport";
603
679
  trackEvent: {
604
680
  category: "canvas";
605
681
  };
606
- perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
682
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
607
683
  appState: {
684
+ scrollX: number;
685
+ scrollY: number;
608
686
  zoom: {
609
687
  value: NormalizedZoomValue;
610
688
  };
689
+ contextMenu: {
690
+ items: import("../components/ContextMenu").ContextMenuItems;
691
+ top: number;
692
+ left: number;
693
+ } | null;
694
+ showWelcomeScreen: boolean;
695
+ isLoading: boolean;
696
+ errorMessage: import("react").ReactNode;
697
+ activeEmbeddable: {
698
+ element: import("../element/types").NonDeletedExcalidrawElement;
699
+ state: "active" | "hover";
700
+ } | null;
701
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
702
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
703
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
704
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
705
+ isBindingEnabled: boolean;
706
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
707
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
708
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
709
+ frameRendering: {
710
+ enabled: boolean;
711
+ name: boolean;
712
+ outline: boolean;
713
+ clip: boolean;
714
+ };
715
+ editingFrame: string | null;
716
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
717
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
718
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
719
+ activeTool: {
720
+ lastActiveTool: import("../types").ActiveTool | null;
721
+ locked: boolean;
722
+ } & import("../types").ActiveTool;
723
+ penMode: boolean;
724
+ penDetected: boolean;
725
+ exportBackground: boolean;
726
+ exportEmbedScene: boolean;
727
+ exportWithDarkMode: boolean;
728
+ exportScale: number;
729
+ currentItemStrokeColor: string;
730
+ currentItemBackgroundColor: string;
731
+ currentItemFillStyle: import("../element/types").FillStyle;
732
+ currentItemStrokeWidth: number;
733
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
734
+ currentItemRoughness: number;
735
+ currentItemOpacity: number;
736
+ currentItemFontFamily: number;
737
+ currentItemFontSize: number;
738
+ currentItemTextAlign: string;
739
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
740
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
741
+ currentItemRoundness: import("../element/types").StrokeRoundness;
742
+ viewBackgroundColor: string;
743
+ cursorButton: "up" | "down";
744
+ scrolledOutside: boolean;
745
+ name: string;
746
+ isResizing: boolean;
747
+ isRotating: boolean;
748
+ openMenu: "canvas" | "shape" | null;
749
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
750
+ openSidebar: {
751
+ name: string;
752
+ tab?: string | undefined;
753
+ } | null;
754
+ openDialog: "imageExport" | "help" | "jsonExport" | null;
755
+ defaultSidebarDockedPreference: boolean;
756
+ lastPointerDownWith: import("../element/types").PointerType;
757
+ selectedElementIds: Readonly<{
758
+ [id: string]: true;
759
+ }>;
760
+ previousSelectedElementIds: {
761
+ [id: string]: true;
762
+ };
763
+ selectedElementsAreBeingDragged: boolean;
764
+ shouldCacheIgnoreZoom: boolean;
765
+ toast: {
766
+ message: string;
767
+ closable?: boolean | undefined;
768
+ duration?: number | undefined;
769
+ } | null;
770
+ zenModeEnabled: boolean;
771
+ theme: import("../element/types").Theme;
772
+ gridSize: number | null;
773
+ viewModeEnabled: boolean;
774
+ selectedGroupIds: {
775
+ [groupId: string]: boolean;
776
+ };
777
+ editingGroupId: string | null;
778
+ width: number;
779
+ height: number;
780
+ offsetTop: number;
781
+ offsetLeft: number;
782
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
783
+ collaborators: Map<string, import("../types").Collaborator>;
784
+ showStats: boolean;
785
+ currentChartType: import("../element/types").ChartType;
786
+ pasteDialog: {
787
+ shown: false;
788
+ data: null;
789
+ } | {
790
+ shown: true;
791
+ data: import("../charts").Spreadsheet;
792
+ };
793
+ pendingImageElementId: string | null;
794
+ showHyperlinkPopup: false | "editor" | "info";
795
+ selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
796
+ snapLines: readonly import("../snapping").SnapLine[];
797
+ originSnapOffset: {
798
+ x: number;
799
+ y: number;
800
+ } | null;
801
+ objectsSnapModeEnabled: boolean;
802
+ };
803
+ commitToHistory: boolean;
804
+ };
805
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
806
+ } & {
807
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
808
+ };
809
+ export declare const actionZoomToFitSelection: {
810
+ name: "zoomToFitSelection";
811
+ trackEvent: {
812
+ category: "canvas";
813
+ };
814
+ perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
815
+ appState: {
611
816
  scrollX: number;
612
817
  scrollY: number;
818
+ zoom: {
819
+ value: NormalizedZoomValue;
820
+ };
613
821
  contextMenu: {
614
822
  items: import("../components/ContextMenu").ContextMenuItems;
615
823
  top: number;
@@ -618,6 +826,10 @@ export declare const actionZoomToSelected: {
618
826
  showWelcomeScreen: boolean;
619
827
  isLoading: boolean;
620
828
  errorMessage: import("react").ReactNode;
829
+ activeEmbeddable: {
830
+ element: import("../element/types").NonDeletedExcalidrawElement;
831
+ state: "active" | "hover";
832
+ } | null;
621
833
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
622
834
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
623
835
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -625,18 +837,21 @@ export declare const actionZoomToSelected: {
625
837
  isBindingEnabled: boolean;
626
838
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
627
839
  suggestedBindings: import("../element/binding").SuggestedBinding[];
840
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
841
+ frameRendering: {
842
+ enabled: boolean;
843
+ name: boolean;
844
+ outline: boolean;
845
+ clip: boolean;
846
+ };
847
+ editingFrame: string | null;
848
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
628
849
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
629
850
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
630
851
  activeTool: {
631
- lastActiveTool: import("../types").LastActiveTool;
852
+ lastActiveTool: import("../types").ActiveTool | null;
632
853
  locked: boolean;
633
- } & ({
634
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
635
- customType: null;
636
- } | {
637
- type: "custom";
638
- customType: string;
639
- });
854
+ } & import("../types").ActiveTool;
640
855
  penMode: boolean;
641
856
  penDetected: boolean;
642
857
  exportBackground: boolean;
@@ -671,12 +886,13 @@ export declare const actionZoomToSelected: {
671
886
  openDialog: "imageExport" | "help" | "jsonExport" | null;
672
887
  defaultSidebarDockedPreference: boolean;
673
888
  lastPointerDownWith: import("../element/types").PointerType;
674
- selectedElementIds: {
675
- [id: string]: boolean;
676
- };
889
+ selectedElementIds: Readonly<{
890
+ [id: string]: true;
891
+ }>;
677
892
  previousSelectedElementIds: {
678
- [id: string]: boolean;
893
+ [id: string]: true;
679
894
  };
895
+ selectedElementsAreBeingDragged: boolean;
680
896
  shouldCacheIgnoreZoom: boolean;
681
897
  toast: {
682
898
  message: string;
@@ -684,7 +900,7 @@ export declare const actionZoomToSelected: {
684
900
  duration?: number | undefined;
685
901
  } | null;
686
902
  zenModeEnabled: boolean;
687
- theme: string;
903
+ theme: import("../element/types").Theme;
688
904
  gridSize: number | null;
689
905
  viewModeEnabled: boolean;
690
906
  selectedGroupIds: {
@@ -707,14 +923,20 @@ export declare const actionZoomToSelected: {
707
923
  data: import("../charts").Spreadsheet;
708
924
  };
709
925
  pendingImageElementId: string | null;
710
- showHyperlinkPopup: false | "info" | "editor";
926
+ showHyperlinkPopup: false | "editor" | "info";
711
927
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
928
+ snapLines: readonly import("../snapping").SnapLine[];
929
+ originSnapOffset: {
930
+ x: number;
931
+ y: number;
932
+ } | null;
933
+ objectsSnapModeEnabled: boolean;
712
934
  };
713
935
  commitToHistory: boolean;
714
936
  };
715
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
937
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
716
938
  } & {
717
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
939
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
718
940
  };
719
941
  export declare const actionZoomToFit: {
720
942
  name: "zoomToFit";
@@ -724,11 +946,11 @@ export declare const actionZoomToFit: {
724
946
  };
725
947
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
726
948
  appState: {
949
+ scrollX: number;
950
+ scrollY: number;
727
951
  zoom: {
728
952
  value: NormalizedZoomValue;
729
953
  };
730
- scrollX: number;
731
- scrollY: number;
732
954
  contextMenu: {
733
955
  items: import("../components/ContextMenu").ContextMenuItems;
734
956
  top: number;
@@ -737,6 +959,10 @@ export declare const actionZoomToFit: {
737
959
  showWelcomeScreen: boolean;
738
960
  isLoading: boolean;
739
961
  errorMessage: import("react").ReactNode;
962
+ activeEmbeddable: {
963
+ element: import("../element/types").NonDeletedExcalidrawElement;
964
+ state: "active" | "hover";
965
+ } | null;
740
966
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
741
967
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
742
968
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -744,18 +970,21 @@ export declare const actionZoomToFit: {
744
970
  isBindingEnabled: boolean;
745
971
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
746
972
  suggestedBindings: import("../element/binding").SuggestedBinding[];
973
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
974
+ frameRendering: {
975
+ enabled: boolean;
976
+ name: boolean;
977
+ outline: boolean;
978
+ clip: boolean;
979
+ };
980
+ editingFrame: string | null;
981
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
747
982
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
748
983
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
749
984
  activeTool: {
750
- lastActiveTool: import("../types").LastActiveTool;
985
+ lastActiveTool: import("../types").ActiveTool | null;
751
986
  locked: boolean;
752
- } & ({
753
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
754
- customType: null;
755
- } | {
756
- type: "custom";
757
- customType: string;
758
- });
987
+ } & import("../types").ActiveTool;
759
988
  penMode: boolean;
760
989
  penDetected: boolean;
761
990
  exportBackground: boolean;
@@ -790,12 +1019,13 @@ export declare const actionZoomToFit: {
790
1019
  openDialog: "imageExport" | "help" | "jsonExport" | null;
791
1020
  defaultSidebarDockedPreference: boolean;
792
1021
  lastPointerDownWith: import("../element/types").PointerType;
793
- selectedElementIds: {
794
- [id: string]: boolean;
795
- };
1022
+ selectedElementIds: Readonly<{
1023
+ [id: string]: true;
1024
+ }>;
796
1025
  previousSelectedElementIds: {
797
- [id: string]: boolean;
1026
+ [id: string]: true;
798
1027
  };
1028
+ selectedElementsAreBeingDragged: boolean;
799
1029
  shouldCacheIgnoreZoom: boolean;
800
1030
  toast: {
801
1031
  message: string;
@@ -803,7 +1033,7 @@ export declare const actionZoomToFit: {
803
1033
  duration?: number | undefined;
804
1034
  } | null;
805
1035
  zenModeEnabled: boolean;
806
- theme: string;
1036
+ theme: import("../element/types").Theme;
807
1037
  gridSize: number | null;
808
1038
  viewModeEnabled: boolean;
809
1039
  selectedGroupIds: {
@@ -826,14 +1056,20 @@ export declare const actionZoomToFit: {
826
1056
  data: import("../charts").Spreadsheet;
827
1057
  };
828
1058
  pendingImageElementId: string | null;
829
- showHyperlinkPopup: false | "info" | "editor";
1059
+ showHyperlinkPopup: false | "editor" | "info";
830
1060
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1061
+ snapLines: readonly import("../snapping").SnapLine[];
1062
+ originSnapOffset: {
1063
+ x: number;
1064
+ y: number;
1065
+ } | null;
1066
+ objectsSnapModeEnabled: boolean;
831
1067
  };
832
1068
  commitToHistory: boolean;
833
1069
  };
834
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1070
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
835
1071
  } & {
836
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1072
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
837
1073
  };
838
1074
  export declare const actionToggleTheme: {
839
1075
  name: "toggleTheme";
@@ -852,6 +1088,10 @@ export declare const actionToggleTheme: {
852
1088
  showWelcomeScreen: boolean;
853
1089
  isLoading: boolean;
854
1090
  errorMessage: import("react").ReactNode;
1091
+ activeEmbeddable: {
1092
+ element: import("../element/types").NonDeletedExcalidrawElement;
1093
+ state: "active" | "hover";
1094
+ } | null;
855
1095
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
856
1096
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
857
1097
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -859,18 +1099,21 @@ export declare const actionToggleTheme: {
859
1099
  isBindingEnabled: boolean;
860
1100
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
861
1101
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1102
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1103
+ frameRendering: {
1104
+ enabled: boolean;
1105
+ name: boolean;
1106
+ outline: boolean;
1107
+ clip: boolean;
1108
+ };
1109
+ editingFrame: string | null;
1110
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
862
1111
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
863
1112
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
864
1113
  activeTool: {
865
- lastActiveTool: import("../types").LastActiveTool;
1114
+ lastActiveTool: import("../types").ActiveTool | null;
866
1115
  locked: boolean;
867
- } & ({
868
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
869
- customType: null;
870
- } | {
871
- type: "custom";
872
- customType: string;
873
- });
1116
+ } & import("../types").ActiveTool;
874
1117
  penMode: boolean;
875
1118
  penDetected: boolean;
876
1119
  exportBackground: boolean;
@@ -910,12 +1153,13 @@ export declare const actionToggleTheme: {
910
1153
  openDialog: "imageExport" | "help" | "jsonExport" | null;
911
1154
  defaultSidebarDockedPreference: boolean;
912
1155
  lastPointerDownWith: import("../element/types").PointerType;
913
- selectedElementIds: {
914
- [id: string]: boolean;
915
- };
1156
+ selectedElementIds: Readonly<{
1157
+ [id: string]: true;
1158
+ }>;
916
1159
  previousSelectedElementIds: {
917
- [id: string]: boolean;
1160
+ [id: string]: true;
918
1161
  };
1162
+ selectedElementsAreBeingDragged: boolean;
919
1163
  shouldCacheIgnoreZoom: boolean;
920
1164
  toast: {
921
1165
  message: string;
@@ -945,15 +1189,21 @@ export declare const actionToggleTheme: {
945
1189
  data: import("../charts").Spreadsheet;
946
1190
  };
947
1191
  pendingImageElementId: string | null;
948
- showHyperlinkPopup: false | "info" | "editor";
1192
+ showHyperlinkPopup: false | "editor" | "info";
949
1193
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1194
+ snapLines: readonly import("../snapping").SnapLine[];
1195
+ originSnapOffset: {
1196
+ x: number;
1197
+ y: number;
1198
+ } | null;
1199
+ objectsSnapModeEnabled: boolean;
950
1200
  };
951
1201
  commitToHistory: false;
952
1202
  };
953
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1203
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
954
1204
  predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
955
1205
  } & {
956
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1206
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
957
1207
  };
958
1208
  export declare const actionToggleEraserTool: {
959
1209
  name: "toggleEraserTool";
@@ -964,16 +1214,11 @@ export declare const actionToggleEraserTool: {
964
1214
  appState: {
965
1215
  selectedElementIds: {};
966
1216
  selectedGroupIds: {};
1217
+ activeEmbeddable: null;
967
1218
  activeTool: {
968
- lastActiveTool: import("../types").LastActiveTool;
1219
+ lastActiveTool: import("../types").ActiveTool | null;
969
1220
  locked: boolean;
970
- } & ({
971
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
972
- customType: null;
973
- } | {
974
- type: "custom";
975
- customType: string;
976
- });
1221
+ } & import("../types").ActiveTool;
977
1222
  contextMenu: {
978
1223
  items: import("../components/ContextMenu").ContextMenuItems;
979
1224
  top: number;
@@ -989,6 +1234,15 @@ export declare const actionToggleEraserTool: {
989
1234
  isBindingEnabled: boolean;
990
1235
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
991
1236
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1237
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1238
+ frameRendering: {
1239
+ enabled: boolean;
1240
+ name: boolean;
1241
+ outline: boolean;
1242
+ clip: boolean;
1243
+ };
1244
+ editingFrame: string | null;
1245
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
992
1246
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
993
1247
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
994
1248
  penMode: boolean;
@@ -1031,8 +1285,9 @@ export declare const actionToggleEraserTool: {
1031
1285
  defaultSidebarDockedPreference: boolean;
1032
1286
  lastPointerDownWith: import("../element/types").PointerType;
1033
1287
  previousSelectedElementIds: {
1034
- [id: string]: boolean;
1288
+ [id: string]: true;
1035
1289
  };
1290
+ selectedElementsAreBeingDragged: boolean;
1036
1291
  shouldCacheIgnoreZoom: boolean;
1037
1292
  toast: {
1038
1293
  message: string;
@@ -1040,7 +1295,7 @@ export declare const actionToggleEraserTool: {
1040
1295
  duration?: number | undefined;
1041
1296
  } | null;
1042
1297
  zenModeEnabled: boolean;
1043
- theme: string;
1298
+ theme: import("../element/types").Theme;
1044
1299
  gridSize: number | null;
1045
1300
  viewModeEnabled: boolean;
1046
1301
  editingGroupId: string | null;
@@ -1060,14 +1315,20 @@ export declare const actionToggleEraserTool: {
1060
1315
  data: import("../charts").Spreadsheet;
1061
1316
  };
1062
1317
  pendingImageElementId: string | null;
1063
- showHyperlinkPopup: false | "info" | "editor";
1318
+ showHyperlinkPopup: false | "editor" | "info";
1064
1319
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1320
+ snapLines: readonly import("../snapping").SnapLine[];
1321
+ originSnapOffset: {
1322
+ x: number;
1323
+ y: number;
1324
+ } | null;
1325
+ objectsSnapModeEnabled: boolean;
1065
1326
  };
1066
1327
  commitToHistory: true;
1067
1328
  };
1068
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1329
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
1069
1330
  } & {
1070
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1331
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
1071
1332
  };
1072
1333
  export declare const actionToggleHandTool: {
1073
1334
  name: "toggleHandTool";
@@ -1078,16 +1339,11 @@ export declare const actionToggleHandTool: {
1078
1339
  appState: {
1079
1340
  selectedElementIds: {};
1080
1341
  selectedGroupIds: {};
1342
+ activeEmbeddable: null;
1081
1343
  activeTool: {
1082
- lastActiveTool: import("../types").LastActiveTool;
1344
+ lastActiveTool: import("../types").ActiveTool | null;
1083
1345
  locked: boolean;
1084
- } & ({
1085
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
1086
- customType: null;
1087
- } | {
1088
- type: "custom";
1089
- customType: string;
1090
- });
1346
+ } & import("../types").ActiveTool;
1091
1347
  contextMenu: {
1092
1348
  items: import("../components/ContextMenu").ContextMenuItems;
1093
1349
  top: number;
@@ -1103,6 +1359,15 @@ export declare const actionToggleHandTool: {
1103
1359
  isBindingEnabled: boolean;
1104
1360
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
1105
1361
  suggestedBindings: import("../element/binding").SuggestedBinding[];
1362
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
1363
+ frameRendering: {
1364
+ enabled: boolean;
1365
+ name: boolean;
1366
+ outline: boolean;
1367
+ clip: boolean;
1368
+ };
1369
+ editingFrame: string | null;
1370
+ elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
1106
1371
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
1107
1372
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1108
1373
  penMode: boolean;
@@ -1145,8 +1410,9 @@ export declare const actionToggleHandTool: {
1145
1410
  defaultSidebarDockedPreference: boolean;
1146
1411
  lastPointerDownWith: import("../element/types").PointerType;
1147
1412
  previousSelectedElementIds: {
1148
- [id: string]: boolean;
1413
+ [id: string]: true;
1149
1414
  };
1415
+ selectedElementsAreBeingDragged: boolean;
1150
1416
  shouldCacheIgnoreZoom: boolean;
1151
1417
  toast: {
1152
1418
  message: string;
@@ -1154,7 +1420,7 @@ export declare const actionToggleHandTool: {
1154
1420
  duration?: number | undefined;
1155
1421
  } | null;
1156
1422
  zenModeEnabled: boolean;
1157
- theme: string;
1423
+ theme: import("../element/types").Theme;
1158
1424
  gridSize: number | null;
1159
1425
  viewModeEnabled: boolean;
1160
1426
  editingGroupId: string | null;
@@ -1174,12 +1440,18 @@ export declare const actionToggleHandTool: {
1174
1440
  data: import("../charts").Spreadsheet;
1175
1441
  };
1176
1442
  pendingImageElementId: string | null;
1177
- showHyperlinkPopup: false | "info" | "editor";
1443
+ showHyperlinkPopup: false | "editor" | "info";
1178
1444
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
1445
+ snapLines: readonly import("../snapping").SnapLine[];
1446
+ originSnapOffset: {
1447
+ x: number;
1448
+ y: number;
1449
+ } | null;
1450
+ objectsSnapModeEnabled: boolean;
1179
1451
  };
1180
1452
  commitToHistory: true;
1181
1453
  };
1182
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
1454
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
1183
1455
  } & {
1184
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
1456
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
1185
1457
  };