@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
  export declare const actionCopy: {
3
2
  name: "copy";
4
3
  trackEvent: {
@@ -44,6 +43,10 @@ export declare const actionCut: {
44
43
  showWelcomeScreen: boolean;
45
44
  isLoading: boolean;
46
45
  errorMessage: import("react").ReactNode;
46
+ activeEmbeddable: {
47
+ element: import("../element/types").NonDeletedExcalidrawElement;
48
+ state: "active" | "hover";
49
+ } | null;
47
50
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
48
51
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
49
52
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -51,17 +54,20 @@ export declare const actionCut: {
51
54
  isBindingEnabled: boolean;
52
55
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
53
56
  suggestedBindings: import("../element/binding").SuggestedBinding[];
57
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
58
+ frameRendering: {
59
+ enabled: boolean;
60
+ name: boolean;
61
+ outline: boolean;
62
+ clip: boolean;
63
+ };
64
+ editingFrame: string | null;
65
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
54
66
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
55
67
  activeTool: {
56
- lastActiveTool: import("../types").LastActiveTool;
68
+ lastActiveTool: import("../types").ActiveTool | null;
57
69
  locked: boolean;
58
- } & ({
59
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
60
- customType: null;
61
- } | {
62
- type: "custom";
63
- customType: string;
64
- });
70
+ } & import("../types").ActiveTool;
65
71
  penMode: boolean;
66
72
  penDetected: boolean;
67
73
  exportBackground: boolean;
@@ -101,12 +107,13 @@ export declare const actionCut: {
101
107
  openDialog: "imageExport" | "help" | "jsonExport" | null;
102
108
  defaultSidebarDockedPreference: boolean;
103
109
  lastPointerDownWith: import("../element/types").PointerType;
104
- selectedElementIds: {
105
- [id: string]: boolean;
106
- };
110
+ selectedElementIds: Readonly<{
111
+ [id: string]: true;
112
+ }>;
107
113
  previousSelectedElementIds: {
108
- [id: string]: boolean;
114
+ [id: string]: true;
109
115
  };
116
+ selectedElementsAreBeingDragged: boolean;
110
117
  shouldCacheIgnoreZoom: boolean;
111
118
  toast: {
112
119
  message: string;
@@ -114,7 +121,7 @@ export declare const actionCut: {
114
121
  duration?: number | undefined;
115
122
  } | null;
116
123
  zenModeEnabled: boolean;
117
- theme: string;
124
+ theme: import("../element/types").Theme;
118
125
  gridSize: number | null;
119
126
  viewModeEnabled: boolean;
120
127
  selectedGroupIds: {
@@ -137,8 +144,14 @@ export declare const actionCut: {
137
144
  data: import("../charts").Spreadsheet;
138
145
  };
139
146
  pendingImageElementId: string | null;
140
- showHyperlinkPopup: false | "info" | "editor";
147
+ showHyperlinkPopup: false | "editor" | "info";
141
148
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
149
+ snapLines: readonly import("../snapping").SnapLine[];
150
+ originSnapOffset: {
151
+ x: number;
152
+ y: number;
153
+ } | null;
154
+ objectsSnapModeEnabled: boolean;
142
155
  };
143
156
  commitToHistory: false;
144
157
  } | {
@@ -181,6 +194,10 @@ export declare const actionCut: {
181
194
  showWelcomeScreen: boolean;
182
195
  isLoading: boolean;
183
196
  errorMessage: import("react").ReactNode;
197
+ activeEmbeddable: {
198
+ element: import("../element/types").NonDeletedExcalidrawElement;
199
+ state: "active" | "hover";
200
+ } | null;
184
201
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
185
202
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
186
203
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -188,17 +205,20 @@ export declare const actionCut: {
188
205
  isBindingEnabled: boolean;
189
206
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
190
207
  suggestedBindings: import("../element/binding").SuggestedBinding[];
208
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
209
+ frameRendering: {
210
+ enabled: boolean;
211
+ name: boolean;
212
+ outline: boolean;
213
+ clip: boolean;
214
+ };
215
+ editingFrame: string | null;
216
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
191
217
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
192
218
  activeTool: {
193
- lastActiveTool: import("../types").LastActiveTool;
219
+ lastActiveTool: import("../types").ActiveTool | null;
194
220
  locked: boolean;
195
- } & ({
196
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
197
- customType: null;
198
- } | {
199
- type: "custom";
200
- customType: string;
201
- });
221
+ } & import("../types").ActiveTool;
202
222
  penMode: boolean;
203
223
  penDetected: boolean;
204
224
  exportBackground: boolean;
@@ -238,12 +258,13 @@ export declare const actionCut: {
238
258
  openDialog: "imageExport" | "help" | "jsonExport" | null;
239
259
  defaultSidebarDockedPreference: boolean;
240
260
  lastPointerDownWith: import("../element/types").PointerType;
241
- selectedElementIds: {
242
- [id: string]: boolean;
243
- };
261
+ selectedElementIds: Readonly<{
262
+ [id: string]: true;
263
+ }>;
244
264
  previousSelectedElementIds: {
245
- [id: string]: boolean;
265
+ [id: string]: true;
246
266
  };
267
+ selectedElementsAreBeingDragged: boolean;
247
268
  shouldCacheIgnoreZoom: boolean;
248
269
  toast: {
249
270
  message: string;
@@ -251,7 +272,7 @@ export declare const actionCut: {
251
272
  duration?: number | undefined;
252
273
  } | null;
253
274
  zenModeEnabled: boolean;
254
- theme: string;
275
+ theme: import("../element/types").Theme;
255
276
  gridSize: number | null;
256
277
  viewModeEnabled: boolean;
257
278
  selectedGroupIds: {
@@ -274,24 +295,25 @@ export declare const actionCut: {
274
295
  data: import("../charts").Spreadsheet;
275
296
  };
276
297
  pendingImageElementId: string | null;
277
- showHyperlinkPopup: false | "info" | "editor";
298
+ showHyperlinkPopup: false | "editor" | "info";
278
299
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
300
+ snapLines: readonly import("../snapping").SnapLine[];
301
+ originSnapOffset: {
302
+ x: number;
303
+ y: number;
304
+ } | null;
305
+ objectsSnapModeEnabled: boolean;
279
306
  };
280
307
  commitToHistory: true;
281
308
  } | {
282
309
  elements: import("../element/types").ExcalidrawElement[];
283
310
  appState: {
284
311
  activeTool: {
285
- lastActiveTool: import("../types").LastActiveTool;
312
+ lastActiveTool: import("../types").ActiveTool | null;
286
313
  locked: boolean;
287
- } & ({
288
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
289
- customType: null;
290
- } | {
291
- type: "custom";
292
- customType: string;
293
- });
314
+ } & import("../types").ActiveTool;
294
315
  multiElement: null;
316
+ activeEmbeddable: null;
295
317
  selectedElementIds: {};
296
318
  contextMenu: {
297
319
  items: import("../components/ContextMenu").ContextMenuItems;
@@ -307,6 +329,15 @@ export declare const actionCut: {
307
329
  isBindingEnabled: boolean;
308
330
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
309
331
  suggestedBindings: import("../element/binding").SuggestedBinding[];
332
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
333
+ frameRendering: {
334
+ enabled: boolean;
335
+ name: boolean;
336
+ outline: boolean;
337
+ clip: boolean;
338
+ };
339
+ editingFrame: string | null;
340
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
310
341
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
311
342
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
312
343
  penMode: boolean;
@@ -349,8 +380,9 @@ export declare const actionCut: {
349
380
  defaultSidebarDockedPreference: boolean;
350
381
  lastPointerDownWith: import("../element/types").PointerType;
351
382
  previousSelectedElementIds: {
352
- [id: string]: boolean;
383
+ [id: string]: true;
353
384
  };
385
+ selectedElementsAreBeingDragged: boolean;
354
386
  shouldCacheIgnoreZoom: boolean;
355
387
  toast: {
356
388
  message: string;
@@ -358,7 +390,7 @@ export declare const actionCut: {
358
390
  duration?: number | undefined;
359
391
  } | null;
360
392
  zenModeEnabled: boolean;
361
- theme: string;
393
+ theme: import("../element/types").Theme;
362
394
  gridSize: number | null;
363
395
  viewModeEnabled: boolean;
364
396
  selectedGroupIds: {
@@ -381,16 +413,22 @@ export declare const actionCut: {
381
413
  data: import("../charts").Spreadsheet;
382
414
  };
383
415
  pendingImageElementId: string | null;
384
- showHyperlinkPopup: false | "info" | "editor";
416
+ showHyperlinkPopup: false | "editor" | "info";
385
417
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
418
+ snapLines: readonly import("../snapping").SnapLine[];
419
+ originSnapOffset: {
420
+ x: number;
421
+ y: number;
422
+ } | null;
423
+ objectsSnapModeEnabled: boolean;
386
424
  };
387
425
  commitToHistory: boolean;
388
426
  };
389
427
  predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
390
428
  contextItemLabel: string;
391
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
429
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
392
430
  } & {
393
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
431
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
394
432
  };
395
433
  export declare const actionCopyAsSvg: {
396
434
  name: "copyAsSvg";
@@ -410,6 +448,10 @@ export declare const actionCopyAsSvg: {
410
448
  } | null;
411
449
  showWelcomeScreen: boolean;
412
450
  isLoading: boolean;
451
+ activeEmbeddable: {
452
+ element: import("../element/types").NonDeletedExcalidrawElement;
453
+ state: "active" | "hover";
454
+ } | null;
413
455
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
414
456
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
415
457
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -417,18 +459,21 @@ export declare const actionCopyAsSvg: {
417
459
  isBindingEnabled: boolean;
418
460
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
419
461
  suggestedBindings: import("../element/binding").SuggestedBinding[];
462
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
463
+ frameRendering: {
464
+ enabled: boolean;
465
+ name: boolean;
466
+ outline: boolean;
467
+ clip: boolean;
468
+ };
469
+ editingFrame: string | null;
470
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
420
471
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
421
472
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
422
473
  activeTool: {
423
- lastActiveTool: import("../types").LastActiveTool;
474
+ lastActiveTool: import("../types").ActiveTool | null;
424
475
  locked: boolean;
425
- } & ({
426
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
427
- customType: null;
428
- } | {
429
- type: "custom";
430
- customType: string;
431
- });
476
+ } & import("../types").ActiveTool;
432
477
  penMode: boolean;
433
478
  penDetected: boolean;
434
479
  exportBackground: boolean;
@@ -468,12 +513,13 @@ export declare const actionCopyAsSvg: {
468
513
  openDialog: "imageExport" | "help" | "jsonExport" | null;
469
514
  defaultSidebarDockedPreference: boolean;
470
515
  lastPointerDownWith: import("../element/types").PointerType;
471
- selectedElementIds: {
472
- [id: string]: boolean;
473
- };
516
+ selectedElementIds: Readonly<{
517
+ [id: string]: true;
518
+ }>;
474
519
  previousSelectedElementIds: {
475
- [id: string]: boolean;
520
+ [id: string]: true;
476
521
  };
522
+ selectedElementsAreBeingDragged: boolean;
477
523
  shouldCacheIgnoreZoom: boolean;
478
524
  toast: {
479
525
  message: string;
@@ -481,7 +527,7 @@ export declare const actionCopyAsSvg: {
481
527
  duration?: number | undefined;
482
528
  } | null;
483
529
  zenModeEnabled: boolean;
484
- theme: string;
530
+ theme: import("../element/types").Theme;
485
531
  gridSize: number | null;
486
532
  viewModeEnabled: boolean;
487
533
  selectedGroupIds: {
@@ -504,8 +550,14 @@ export declare const actionCopyAsSvg: {
504
550
  data: import("../charts").Spreadsheet;
505
551
  };
506
552
  pendingImageElementId: string | null;
507
- showHyperlinkPopup: false | "info" | "editor";
553
+ showHyperlinkPopup: false | "editor" | "info";
508
554
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
555
+ snapLines: readonly import("../snapping").SnapLine[];
556
+ originSnapOffset: {
557
+ x: number;
558
+ y: number;
559
+ } | null;
560
+ objectsSnapModeEnabled: boolean;
509
561
  };
510
562
  commitToHistory: false;
511
563
  }>;
@@ -532,6 +584,10 @@ export declare const actionCopyAsPng: {
532
584
  } | null;
533
585
  showWelcomeScreen: boolean;
534
586
  isLoading: boolean;
587
+ activeEmbeddable: {
588
+ element: import("../element/types").NonDeletedExcalidrawElement;
589
+ state: "active" | "hover";
590
+ } | null;
535
591
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
536
592
  resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
537
593
  multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
@@ -539,18 +595,21 @@ export declare const actionCopyAsPng: {
539
595
  isBindingEnabled: boolean;
540
596
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
541
597
  suggestedBindings: import("../element/binding").SuggestedBinding[];
598
+ frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
599
+ frameRendering: {
600
+ enabled: boolean;
601
+ name: boolean;
602
+ outline: boolean;
603
+ clip: boolean;
604
+ };
605
+ editingFrame: string | null;
606
+ elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
542
607
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
543
608
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
544
609
  activeTool: {
545
- lastActiveTool: import("../types").LastActiveTool;
610
+ lastActiveTool: import("../types").ActiveTool | null;
546
611
  locked: boolean;
547
- } & ({
548
- type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
549
- customType: null;
550
- } | {
551
- type: "custom";
552
- customType: string;
553
- });
612
+ } & import("../types").ActiveTool;
554
613
  penMode: boolean;
555
614
  penDetected: boolean;
556
615
  exportBackground: boolean;
@@ -590,12 +649,13 @@ export declare const actionCopyAsPng: {
590
649
  openDialog: "imageExport" | "help" | "jsonExport" | null;
591
650
  defaultSidebarDockedPreference: boolean;
592
651
  lastPointerDownWith: import("../element/types").PointerType;
593
- selectedElementIds: {
594
- [id: string]: boolean;
595
- };
652
+ selectedElementIds: Readonly<{
653
+ [id: string]: true;
654
+ }>;
596
655
  previousSelectedElementIds: {
597
- [id: string]: boolean;
656
+ [id: string]: true;
598
657
  };
658
+ selectedElementsAreBeingDragged: boolean;
599
659
  shouldCacheIgnoreZoom: boolean;
600
660
  toast: {
601
661
  message: string;
@@ -603,7 +663,7 @@ export declare const actionCopyAsPng: {
603
663
  duration?: number | undefined;
604
664
  } | null;
605
665
  zenModeEnabled: boolean;
606
- theme: string;
666
+ theme: import("../element/types").Theme;
607
667
  gridSize: number | null;
608
668
  viewModeEnabled: boolean;
609
669
  selectedGroupIds: {
@@ -626,26 +686,32 @@ export declare const actionCopyAsPng: {
626
686
  data: import("../charts").Spreadsheet;
627
687
  };
628
688
  pendingImageElementId: string | null;
629
- showHyperlinkPopup: false | "info" | "editor";
689
+ showHyperlinkPopup: false | "editor" | "info";
630
690
  selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
691
+ snapLines: readonly import("../snapping").SnapLine[];
692
+ originSnapOffset: {
693
+ x: number;
694
+ y: number;
695
+ } | null;
696
+ objectsSnapModeEnabled: boolean;
631
697
  };
632
698
  commitToHistory: false;
633
699
  }>;
634
700
  predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
635
701
  contextItemLabel: string;
636
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
702
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
637
703
  } & {
638
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
704
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
639
705
  };
640
706
  export declare const copyText: {
641
707
  name: "copyText";
642
708
  trackEvent: {
643
709
  category: "element";
644
710
  };
645
- perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
711
+ perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
646
712
  commitToHistory: false;
647
713
  };
648
- predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
714
+ predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
649
715
  contextItemLabel: string;
650
716
  } & {
651
717
  keyTest?: undefined;