@zsviczian/excalidraw 0.11.0-obsidian-6 → 0.11.0-obsidian-9

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 (64) hide show
  1. package/dist/excalidraw.development.js +92 -81
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +4 -4
  4. package/types/actions/actionAddToLibrary.d.ts +18 -6
  5. package/types/actions/actionAlign.d.ts +18 -0
  6. package/types/actions/actionBoundText.d.ts +123 -0
  7. package/types/actions/actionCanvas.d.ts +72 -19
  8. package/types/actions/actionClipboard.d.ts +50 -10
  9. package/types/actions/actionDeleteSelected.d.ts +19 -6
  10. package/types/actions/actionDistribute.d.ts +6 -0
  11. package/types/actions/actionDuplicateSelection.d.ts +3 -0
  12. package/types/actions/actionExport.d.ts +71 -18
  13. package/types/actions/actionFinalize.d.ts +13 -6
  14. package/types/actions/actionFlip.d.ts +6 -0
  15. package/types/actions/actionGroup.d.ts +6 -0
  16. package/types/actions/actionMenu.d.ts +29 -6
  17. package/types/actions/actionNavigate.d.ts +3 -0
  18. package/types/actions/actionProperties.d.ts +82 -26
  19. package/types/actions/actionSelectAll.d.ts +3 -0
  20. package/types/actions/actionStyles.d.ts +11 -2
  21. package/types/actions/actionToggleGridMode.d.ts +9 -2
  22. package/types/actions/actionToggleLock.d.ts +17 -0
  23. package/types/actions/actionToggleStats.d.ts +8 -2
  24. package/types/actions/actionToggleViewMode.d.ts +9 -2
  25. package/types/actions/actionToggleZenMode.d.ts +9 -2
  26. package/types/actions/actionZindex.d.ts +12 -0
  27. package/types/actions/index.d.ts +3 -2
  28. package/types/actions/manager.d.ts +3 -3
  29. package/types/actions/shortcuts.d.ts +1 -1
  30. package/types/actions/types.d.ts +7 -9
  31. package/types/appState.d.ts +9 -4
  32. package/types/clipboard.d.ts +1 -1
  33. package/types/components/Actions.d.ts +5 -4
  34. package/types/components/App.d.ts +6 -5
  35. package/types/components/ImageExportDialog.d.ts +2 -2
  36. package/types/components/JSONExportDialog.d.ts +2 -2
  37. package/types/components/ToolButton.d.ts +3 -0
  38. package/types/constants.d.ts +1 -0
  39. package/types/createInverseContext.d.ts +20 -1
  40. package/types/data/index.d.ts +1 -1
  41. package/types/data/json.d.ts +1 -0
  42. package/types/data/restore.d.ts +1 -1
  43. package/types/element/Hyperlink.d.ts +9 -3
  44. package/types/element/dragElements.d.ts +1 -1
  45. package/types/element/linearElementEditor.d.ts +6 -3
  46. package/types/element/sizeHelpers.d.ts +2 -1
  47. package/types/element/textElement.d.ts +1 -2
  48. package/types/element/typeChecks.d.ts +5 -5
  49. package/types/element/types.d.ts +1 -0
  50. package/types/excalidraw-app/app_constants.d.ts +13 -1
  51. package/types/excalidraw-app/collab/CollabWrapper.d.ts +20 -8
  52. package/types/excalidraw-app/collab/Portal.d.ts +2 -2
  53. package/types/excalidraw-app/collab/reconciliation.d.ts +9 -0
  54. package/types/excalidraw-app/data/FileManager.d.ts +66 -0
  55. package/types/excalidraw-app/data/firebase.d.ts +11 -11
  56. package/types/excalidraw-app/data/index.d.ts +32 -27
  57. package/types/excalidraw-app/data/localStorage.d.ts +19 -19
  58. package/types/excalidraw-app/data/tabSync.d.ts +9 -0
  59. package/types/packages/excalidraw/index.d.ts +5 -1
  60. package/types/packages/utils.d.ts +1 -1
  61. package/types/scene/Scene.d.ts +1 -1
  62. package/types/shapes.d.ts +1 -1
  63. package/types/types.d.ts +14 -3
  64. package/types/utils.d.ts +7 -2
@@ -4,6 +4,10 @@ import { AppState } from "../types";
4
4
  import { LinearElementEditor } from "../element/linearElementEditor";
5
5
  export declare const actionDeleteSelected: {
6
6
  name: "deleteSelectedElements";
7
+ trackEvent: {
8
+ category: "element";
9
+ action: string;
10
+ };
7
11
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => false | {
8
12
  elements: ExcalidrawElement[];
9
13
  appState: {
@@ -18,8 +22,11 @@ export declare const actionDeleteSelected: {
18
22
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
19
23
  suggestedBindings: import("../element/binding").SuggestedBinding[];
20
24
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
22
- elementLocked: boolean;
25
+ activeTool: {
26
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
27
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
28
+ locked: boolean;
29
+ };
23
30
  penMode: boolean;
24
31
  penDetected: boolean;
25
32
  exportBackground: boolean;
@@ -129,8 +136,11 @@ export declare const actionDeleteSelected: {
129
136
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
130
137
  suggestedBindings: import("../element/binding").SuggestedBinding[];
131
138
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
132
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
133
- elementLocked: boolean;
139
+ activeTool: {
140
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
141
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
142
+ locked: boolean;
143
+ };
134
144
  penMode: boolean;
135
145
  penDetected: boolean;
136
146
  exportBackground: boolean;
@@ -212,7 +222,11 @@ export declare const actionDeleteSelected: {
212
222
  } | {
213
223
  elements: ExcalidrawElement[];
214
224
  appState: {
215
- elementType: "selection";
225
+ activeTool: {
226
+ type: "selection";
227
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
228
+ locked: boolean;
229
+ };
216
230
  multiElement: null;
217
231
  selectedElementIds: {};
218
232
  isLoading: boolean;
@@ -225,7 +239,6 @@ export declare const actionDeleteSelected: {
225
239
  suggestedBindings: import("../element/binding").SuggestedBinding[];
226
240
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
227
241
  editingLinearElement: LinearElementEditor | null;
228
- elementLocked: boolean;
229
242
  penMode: boolean;
230
243
  penDetected: boolean;
231
244
  exportBackground: boolean;
@@ -3,6 +3,9 @@ import { ExcalidrawElement } from "../element/types";
3
3
  import { AppState } from "../types";
4
4
  export declare const distributeHorizontally: {
5
5
  name: "distributeHorizontally";
6
+ trackEvent: {
7
+ category: "element";
8
+ };
6
9
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
7
10
  appState: Readonly<AppState>;
8
11
  elements: ExcalidrawElement[];
@@ -15,6 +18,9 @@ export declare const distributeHorizontally: {
15
18
  };
16
19
  export declare const distributeVertically: {
17
20
  name: "distributeVertically";
21
+ trackEvent: {
22
+ category: "element";
23
+ };
18
24
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
19
25
  appState: Readonly<AppState>;
20
26
  elements: ExcalidrawElement[];
@@ -3,6 +3,9 @@ import { ExcalidrawElement } from "../element/types";
3
3
  import { AppState } from "../types";
4
4
  export declare const actionDuplicateSelection: {
5
5
  name: "duplicateSelection";
6
+ trackEvent: {
7
+ category: "element";
8
+ };
6
9
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => false | {
7
10
  commitToHistory: true;
8
11
  elements?: readonly ExcalidrawElement[] | null | undefined;
@@ -2,6 +2,7 @@
2
2
  import "../components/ToolIcon.scss";
3
3
  export declare const actionChangeProjectName: {
4
4
  name: "changeProjectName";
5
+ trackEvent: false;
5
6
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
6
7
  appState: {
7
8
  name: any;
@@ -16,8 +17,11 @@ export declare const actionChangeProjectName: {
16
17
  suggestedBindings: import("../element/binding").SuggestedBinding[];
17
18
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
18
19
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
19
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
20
- elementLocked: boolean;
20
+ activeTool: {
21
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
22
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
23
+ locked: boolean;
24
+ };
21
25
  penMode: boolean;
22
26
  penDetected: boolean;
23
27
  exportBackground: boolean;
@@ -102,6 +106,10 @@ export declare const actionChangeProjectName: {
102
106
  };
103
107
  export declare const actionChangeExportScale: {
104
108
  name: "changeExportScale";
109
+ trackEvent: {
110
+ category: "export";
111
+ action: string;
112
+ };
105
113
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
106
114
  appState: {
107
115
  exportScale: any;
@@ -116,8 +124,11 @@ export declare const actionChangeExportScale: {
116
124
  suggestedBindings: import("../element/binding").SuggestedBinding[];
117
125
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
118
126
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
119
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
120
- elementLocked: boolean;
127
+ activeTool: {
128
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
129
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
130
+ locked: boolean;
131
+ };
121
132
  penMode: boolean;
122
133
  penDetected: boolean;
123
134
  exportBackground: boolean;
@@ -202,6 +213,10 @@ export declare const actionChangeExportScale: {
202
213
  };
203
214
  export declare const actionChangeExportBackground: {
204
215
  name: "changeExportBackground";
216
+ trackEvent: {
217
+ category: "export";
218
+ action: string;
219
+ };
205
220
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
206
221
  appState: {
207
222
  exportBackground: any;
@@ -216,8 +231,11 @@ export declare const actionChangeExportBackground: {
216
231
  suggestedBindings: import("../element/binding").SuggestedBinding[];
217
232
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
218
233
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
219
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
220
- elementLocked: boolean;
234
+ activeTool: {
235
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
236
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
237
+ locked: boolean;
238
+ };
221
239
  penMode: boolean;
222
240
  penDetected: boolean;
223
241
  exportEmbedScene: boolean;
@@ -302,6 +320,10 @@ export declare const actionChangeExportBackground: {
302
320
  };
303
321
  export declare const actionChangeExportEmbedScene: {
304
322
  name: "changeExportEmbedScene";
323
+ trackEvent: {
324
+ category: "export";
325
+ action: string;
326
+ };
305
327
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
306
328
  appState: {
307
329
  exportEmbedScene: any;
@@ -316,8 +338,11 @@ export declare const actionChangeExportEmbedScene: {
316
338
  suggestedBindings: import("../element/binding").SuggestedBinding[];
317
339
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
318
340
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
319
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
320
- elementLocked: boolean;
341
+ activeTool: {
342
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
343
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
344
+ locked: boolean;
345
+ };
321
346
  penMode: boolean;
322
347
  penDetected: boolean;
323
348
  exportBackground: boolean;
@@ -402,6 +427,9 @@ export declare const actionChangeExportEmbedScene: {
402
427
  };
403
428
  export declare const actionSaveToActiveFile: {
404
429
  name: "saveToActiveFile";
430
+ trackEvent: {
431
+ category: "export";
432
+ };
405
433
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
406
434
  commitToHistory: false;
407
435
  appState: {
@@ -418,8 +446,11 @@ export declare const actionSaveToActiveFile: {
418
446
  suggestedBindings: import("../element/binding").SuggestedBinding[];
419
447
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
420
448
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
421
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
422
- elementLocked: boolean;
449
+ activeTool: {
450
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
451
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
452
+ locked: boolean;
453
+ };
423
454
  penMode: boolean;
424
455
  penDetected: boolean;
425
456
  exportBackground: boolean;
@@ -506,6 +537,9 @@ export declare const actionSaveToActiveFile: {
506
537
  };
507
538
  export declare const actionSaveFileToDisk: {
508
539
  name: "saveFileToDisk";
540
+ trackEvent: {
541
+ category: "export";
542
+ };
509
543
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
510
544
  commitToHistory: false;
511
545
  appState: {
@@ -521,8 +555,11 @@ export declare const actionSaveFileToDisk: {
521
555
  suggestedBindings: import("../element/binding").SuggestedBinding[];
522
556
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
523
557
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
524
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
525
- elementLocked: boolean;
558
+ activeTool: {
559
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
560
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
561
+ locked: boolean;
562
+ };
526
563
  penMode: boolean;
527
564
  penDetected: boolean;
528
565
  exportBackground: boolean;
@@ -610,10 +647,17 @@ export declare const actionSaveFileToDisk: {
610
647
  };
611
648
  export declare const actionLoadScene: {
612
649
  name: "loadScene";
650
+ trackEvent: {
651
+ category: "export";
652
+ };
613
653
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
614
654
  elements: import("../element/types").ExcalidrawElement[];
615
655
  appState: {
616
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
656
+ activeTool: {
657
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
658
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
659
+ locked: boolean;
660
+ };
617
661
  scrollX: number;
618
662
  scrollY: number;
619
663
  viewBackgroundColor: string;
@@ -634,7 +678,6 @@ export declare const actionLoadScene: {
634
678
  suggestedBindings: import("../element/binding").SuggestedBinding[];
635
679
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
636
680
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
637
- elementLocked: boolean;
638
681
  penMode: boolean;
639
682
  penDetected: boolean;
640
683
  exportBackground: boolean;
@@ -715,8 +758,11 @@ export declare const actionLoadScene: {
715
758
  suggestedBindings: import("../element/binding").SuggestedBinding[];
716
759
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
717
760
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
718
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
719
- elementLocked: boolean;
761
+ activeTool: {
762
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
763
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
764
+ locked: boolean;
765
+ };
720
766
  penMode: boolean;
721
767
  penDetected: boolean;
722
768
  exportBackground: boolean;
@@ -804,6 +850,10 @@ export declare const actionLoadScene: {
804
850
  };
805
851
  export declare const actionExportWithDarkMode: {
806
852
  name: "exportWithDarkMode";
853
+ trackEvent: {
854
+ category: "export";
855
+ action: string;
856
+ };
807
857
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
808
858
  appState: {
809
859
  exportWithDarkMode: any;
@@ -818,8 +868,11 @@ export declare const actionExportWithDarkMode: {
818
868
  suggestedBindings: import("../element/binding").SuggestedBinding[];
819
869
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
820
870
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
821
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
822
- elementLocked: boolean;
871
+ activeTool: {
872
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
873
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
874
+ locked: boolean;
875
+ };
823
876
  penMode: boolean;
824
877
  penDetected: boolean;
825
878
  exportBackground: boolean;
@@ -2,9 +2,11 @@
2
2
  import { LinearElementEditor } from "../element/linearElementEditor";
3
3
  export declare const actionFinalize: {
4
4
  name: "finalize";
5
+ trackEvent: false;
5
6
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { canvas, focusContainer }: import("../types").AppClassProperties) => {
6
7
  elements: import("../element/types").ExcalidrawElement[] | undefined;
7
8
  appState: {
9
+ cursorButton: "up";
8
10
  editingLinearElement: null;
9
11
  isLoading: boolean;
10
12
  errorMessage: string | null;
@@ -16,8 +18,11 @@ export declare const actionFinalize: {
16
18
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
17
19
  suggestedBindings: import("../element/binding").SuggestedBinding[];
18
20
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
19
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
20
- elementLocked: boolean;
21
+ activeTool: {
22
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
23
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
24
+ locked: boolean;
25
+ };
21
26
  penMode: boolean;
22
27
  penDetected: boolean;
23
28
  exportBackground: boolean;
@@ -41,7 +46,6 @@ export declare const actionFinalize: {
41
46
  viewBackgroundColor: string;
42
47
  scrollX: number;
43
48
  scrollY: number;
44
- cursorButton: "up" | "down";
45
49
  scrolledOutside: boolean;
46
50
  name: string;
47
51
  isResizing: boolean;
@@ -99,7 +103,12 @@ export declare const actionFinalize: {
99
103
  } | {
100
104
  elements: readonly import("../element/types").ExcalidrawElement[];
101
105
  appState: {
102
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
106
+ cursorButton: "up";
107
+ activeTool: {
108
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
109
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
110
+ locked: boolean;
111
+ };
103
112
  draggingElement: null;
104
113
  multiElement: null;
105
114
  editingElement: null;
@@ -115,7 +124,6 @@ export declare const actionFinalize: {
115
124
  selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
116
125
  isBindingEnabled: boolean;
117
126
  editingLinearElement: LinearElementEditor | null;
118
- elementLocked: boolean;
119
127
  penMode: boolean;
120
128
  penDetected: boolean;
121
129
  exportBackground: boolean;
@@ -139,7 +147,6 @@ export declare const actionFinalize: {
139
147
  viewBackgroundColor: string;
140
148
  scrollX: number;
141
149
  scrollY: number;
142
- cursorButton: "up" | "down";
143
150
  scrolledOutside: boolean;
144
151
  name: string;
145
152
  isResizing: boolean;
@@ -3,6 +3,9 @@ import { ExcalidrawElement } from "../element/types";
3
3
  import { AppState } from "../types";
4
4
  export declare const actionFlipHorizontal: {
5
5
  name: "flipHorizontal";
6
+ trackEvent: {
7
+ category: "element";
8
+ };
6
9
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
7
10
  elements: readonly ExcalidrawElement[];
8
11
  appState: Readonly<AppState>;
@@ -16,6 +19,9 @@ export declare const actionFlipHorizontal: {
16
19
  };
17
20
  export declare const actionFlipVertical: {
18
21
  name: "flipVertical";
22
+ trackEvent: {
23
+ category: "element";
24
+ };
19
25
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
20
26
  elements: readonly ExcalidrawElement[];
21
27
  appState: Readonly<AppState>;
@@ -3,6 +3,9 @@ import { ExcalidrawElement } from "../element/types";
3
3
  import { AppState } from "../types";
4
4
  export declare const actionGroup: {
5
5
  name: "group";
6
+ trackEvent: {
7
+ category: "element";
8
+ };
6
9
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
7
10
  appState: Readonly<AppState>;
8
11
  elements: readonly ExcalidrawElement[];
@@ -21,6 +24,9 @@ export declare const actionGroup: {
21
24
  };
22
25
  export declare const actionUngroup: {
23
26
  name: "ungroup";
27
+ trackEvent: {
28
+ category: "element";
29
+ };
24
30
  perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
25
31
  appState: Readonly<AppState>;
26
32
  elements: readonly ExcalidrawElement[];
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export declare const actionToggleCanvasMenu: {
3
3
  name: "toggleCanvasMenu";
4
+ trackEvent: {
5
+ category: "menu";
6
+ };
4
7
  perform: (_: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
5
8
  appState: {
6
9
  openMenu: "canvas" | null;
@@ -15,8 +18,11 @@ export declare const actionToggleCanvasMenu: {
15
18
  suggestedBindings: import("../element/binding").SuggestedBinding[];
16
19
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
17
20
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
18
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
19
- elementLocked: boolean;
21
+ activeTool: {
22
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
23
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
24
+ locked: boolean;
25
+ };
20
26
  penMode: boolean;
21
27
  penDetected: boolean;
22
28
  exportBackground: boolean;
@@ -101,6 +107,9 @@ export declare const actionToggleCanvasMenu: {
101
107
  };
102
108
  export declare const actionToggleEditMenu: {
103
109
  name: "toggleEditMenu";
110
+ trackEvent: {
111
+ category: "menu";
112
+ };
104
113
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
105
114
  appState: {
106
115
  openMenu: "shape" | null;
@@ -115,8 +124,11 @@ export declare const actionToggleEditMenu: {
115
124
  suggestedBindings: import("../element/binding").SuggestedBinding[];
116
125
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
117
126
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
118
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
119
- elementLocked: boolean;
127
+ activeTool: {
128
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
129
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
130
+ locked: boolean;
131
+ };
120
132
  penMode: boolean;
121
133
  penDetected: boolean;
122
134
  exportBackground: boolean;
@@ -201,6 +213,10 @@ export declare const actionToggleEditMenu: {
201
213
  };
202
214
  export declare const actionFullScreen: {
203
215
  name: "toggleFullScreen";
216
+ trackEvent: {
217
+ category: "canvas";
218
+ predicate: (appState: Readonly<import("../types").AppState>) => boolean;
219
+ };
204
220
  perform: () => {
205
221
  commitToHistory: false;
206
222
  };
@@ -210,6 +226,10 @@ export declare const actionFullScreen: {
210
226
  };
211
227
  export declare const actionShortcuts: {
212
228
  name: "toggleShortcuts";
229
+ trackEvent: {
230
+ category: "menu";
231
+ action: string;
232
+ };
213
233
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { focusContainer }: import("../types").AppClassProperties) => {
214
234
  appState: {
215
235
  showHelpDialog: boolean;
@@ -224,8 +244,11 @@ export declare const actionShortcuts: {
224
244
  suggestedBindings: import("../element/binding").SuggestedBinding[];
225
245
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
226
246
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
227
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
228
- elementLocked: boolean;
247
+ activeTool: {
248
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
249
+ lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
250
+ locked: boolean;
251
+ };
229
252
  penMode: boolean;
230
253
  penDetected: boolean;
231
254
  exportBackground: boolean;
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export declare const actionGoToCollaborator: {
3
3
  name: "goToCollaborator";
4
+ trackEvent: {
5
+ category: "collab";
6
+ };
4
7
  perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any) => {
5
8
  appState: Readonly<import("../types").AppState>;
6
9
  commitToHistory: false;