@dwelle/excalidraw 0.3.53 → 0.3.56

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 (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/excalidraw-assets-dev/{image-73be8b3c1837ea26950c.js → image-eddc6ed66acd3a3f3d46.js} +0 -0
  3. package/dist/excalidraw.development.js +51 -51
  4. package/dist/excalidraw.production.min.js +1 -1
  5. package/package.json +4 -4
  6. package/types/actions/actionAddToLibrary.d.ts +9 -3
  7. package/types/actions/actionBoundText.d.ts +109 -0
  8. package/types/actions/actionCanvas.d.ts +26 -9
  9. package/types/actions/actionClipboard.d.ts +15 -5
  10. package/types/actions/actionDeleteSelected.d.ts +9 -3
  11. package/types/actions/actionExport.d.ts +27 -9
  12. package/types/actions/actionFinalize.d.ts +7 -3
  13. package/types/actions/actionMenu.d.ts +9 -3
  14. package/types/actions/actionProperties.d.ts +39 -13
  15. package/types/actions/actionStyles.d.ts +3 -1
  16. package/types/actions/actionToggleGridMode.d.ts +3 -1
  17. package/types/actions/actionToggleStats.d.ts +3 -1
  18. package/types/actions/actionToggleViewMode.d.ts +3 -1
  19. package/types/actions/actionToggleZenMode.d.ts +3 -1
  20. package/types/actions/index.d.ts +1 -1
  21. package/types/actions/types.d.ts +1 -1
  22. package/types/appState.d.ts +7 -3
  23. package/types/components/Actions.d.ts +5 -4
  24. package/types/components/App.d.ts +5 -4
  25. package/types/components/ToolButton.d.ts +3 -0
  26. package/types/constants.d.ts +1 -0
  27. package/types/data/restore.d.ts +1 -1
  28. package/types/element/Hyperlink.d.ts +3 -1
  29. package/types/element/dragElements.d.ts +1 -1
  30. package/types/element/linearElementEditor.d.ts +3 -1
  31. package/types/element/sizeHelpers.d.ts +2 -1
  32. package/types/element/textElement.d.ts +1 -2
  33. package/types/element/typeChecks.d.ts +2 -2
  34. package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-eddc6ed66acd3a3f3d46.d.ts +0 -0
  35. package/types/shapes.d.ts +1 -1
  36. package/types/types.d.ts +11 -2
  37. package/types/utils.d.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwelle/excalidraw",
3
- "version": "0.3.53",
3
+ "version": "0.3.56",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -49,12 +49,12 @@
49
49
  "babel-loader": "8.2.3",
50
50
  "babel-plugin-transform-class-properties": "6.24.1",
51
51
  "cross-env": "7.0.3",
52
- "css-loader": "6.6.0",
53
- "mini-css-extract-plugin": "2.4.6",
52
+ "css-loader": "6.7.1",
53
+ "mini-css-extract-plugin": "2.6.0",
54
54
  "postcss-loader": "6.2.1",
55
55
  "sass-loader": "12.4.0",
56
56
  "terser-webpack-plugin": "5.3.1",
57
- "ts-loader": "9.2.6",
57
+ "ts-loader": "9.2.8",
58
58
  "typescript": "4.5.4",
59
59
  "webpack": "5.65.0",
60
60
  "webpack-bundle-analyzer": "4.5.0",
@@ -15,7 +15,9 @@ export declare const actionAddToLibrary: {
15
15
  suggestedBindings: import("../element/binding").SuggestedBinding[];
16
16
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
17
17
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
18
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
18
+ activeTool: {
19
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
20
+ };
19
21
  elementLocked: boolean;
20
22
  penMode: boolean;
21
23
  penDetected: boolean;
@@ -100,7 +102,9 @@ export declare const actionAddToLibrary: {
100
102
  suggestedBindings: import("../element/binding").SuggestedBinding[];
101
103
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
102
104
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
103
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
105
+ activeTool: {
106
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
107
+ };
104
108
  elementLocked: boolean;
105
109
  penMode: boolean;
106
110
  penDetected: boolean;
@@ -186,7 +190,9 @@ export declare const actionAddToLibrary: {
186
190
  suggestedBindings: import("../element/binding").SuggestedBinding[];
187
191
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
188
192
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
189
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
193
+ activeTool: {
194
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
195
+ };
190
196
  elementLocked: boolean;
191
197
  penMode: boolean;
192
198
  penDetected: boolean;
@@ -0,0 +1,109 @@
1
+ export declare const actionUnbindText: {
2
+ name: "unbindText";
3
+ contextItemLabel: string;
4
+ contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
5
+ perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
6
+ elements: readonly import("../element/types").ExcalidrawElement[];
7
+ appState: Readonly<import("../types").AppState>;
8
+ commitToHistory: true;
9
+ };
10
+ } & {
11
+ keyTest?: undefined;
12
+ };
13
+ export declare const actionBindText: {
14
+ name: "bindText";
15
+ contextItemLabel: string;
16
+ contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
17
+ perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
18
+ elements: import("../element/types").ExcalidrawElement[];
19
+ appState: {
20
+ selectedElementIds: {
21
+ [x: string]: true;
22
+ };
23
+ isLoading: boolean;
24
+ errorMessage: string | null;
25
+ draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
26
+ resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
27
+ multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
28
+ selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
29
+ isBindingEnabled: boolean;
30
+ startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
31
+ suggestedBindings: import("../element/binding").SuggestedBinding[];
32
+ editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
33
+ editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
34
+ activeTool: {
35
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
36
+ };
37
+ elementLocked: boolean;
38
+ penMode: boolean;
39
+ penDetected: boolean;
40
+ exportBackground: boolean;
41
+ exportEmbedScene: boolean;
42
+ exportWithDarkMode: boolean;
43
+ exportScale: number;
44
+ currentItemStrokeColor: string;
45
+ currentItemBackgroundColor: string;
46
+ currentItemFillStyle: import("../element/types").FillStyle;
47
+ currentItemStrokeWidth: number;
48
+ currentItemStrokeStyle: import("../element/types").StrokeStyle;
49
+ currentItemRoughness: number;
50
+ currentItemOpacity: number;
51
+ currentItemFontFamily: number;
52
+ currentItemFontSize: number;
53
+ currentItemTextAlign: import("../element/types").TextAlign;
54
+ currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
55
+ currentItemStartArrowhead: import("../element/types").Arrowhead | null;
56
+ currentItemEndArrowhead: import("../element/types").Arrowhead | null;
57
+ currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
58
+ viewBackgroundColor: string;
59
+ scrollX: number;
60
+ scrollY: number;
61
+ cursorButton: "up" | "down";
62
+ scrolledOutside: boolean;
63
+ name: string;
64
+ isResizing: boolean;
65
+ isRotating: boolean;
66
+ zoom: Readonly<{
67
+ value: import("../types").NormalizedZoomValue;
68
+ }>;
69
+ openMenu: "canvas" | "shape" | null;
70
+ openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
71
+ lastPointerDownWith: import("../element/types").PointerType;
72
+ previousSelectedElementIds: {
73
+ [id: string]: boolean;
74
+ };
75
+ shouldCacheIgnoreZoom: boolean;
76
+ showHelpDialog: boolean;
77
+ toastMessage: string | null;
78
+ zenModeEnabled: boolean;
79
+ theme: string;
80
+ gridSize: number | null;
81
+ viewModeEnabled: boolean;
82
+ selectedGroupIds: {
83
+ [groupId: string]: boolean;
84
+ };
85
+ editingGroupId: string | null;
86
+ width: number;
87
+ height: number;
88
+ offsetTop: number;
89
+ offsetLeft: number;
90
+ isLibraryOpen: boolean;
91
+ fileHandle: import("browser-fs-access").FileSystemHandle | null;
92
+ collaborators: Map<string, import("../types").Collaborator>;
93
+ showStats: boolean;
94
+ currentChartType: import("../element/types").ChartType;
95
+ pasteDialog: {
96
+ shown: false;
97
+ data: null;
98
+ } | {
99
+ shown: true;
100
+ data: import("../charts").Spreadsheet;
101
+ };
102
+ pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
103
+ showHyperlinkPopup: false | "info" | "editor";
104
+ };
105
+ commitToHistory: true;
106
+ };
107
+ } & {
108
+ keyTest?: undefined;
109
+ };
@@ -32,7 +32,9 @@ export declare const actionClearCanvas: {
32
32
  shown: true;
33
33
  data: import("../charts").Spreadsheet;
34
34
  };
35
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "freedraw" | "eraser";
35
+ activeTool: {
36
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
37
+ };
36
38
  scrollX: number;
37
39
  scrollY: number;
38
40
  viewBackgroundColor: string;
@@ -122,7 +124,9 @@ export declare const actionZoomIn: {
122
124
  suggestedBindings: import("../element/binding").SuggestedBinding[];
123
125
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
124
126
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
125
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
127
+ activeTool: {
128
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
129
+ };
126
130
  elementLocked: boolean;
127
131
  penMode: boolean;
128
132
  penDetected: boolean;
@@ -216,7 +220,9 @@ export declare const actionZoomOut: {
216
220
  suggestedBindings: import("../element/binding").SuggestedBinding[];
217
221
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
218
222
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
219
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
223
+ activeTool: {
224
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
225
+ };
220
226
  elementLocked: boolean;
221
227
  penMode: boolean;
222
228
  penDetected: boolean;
@@ -310,7 +316,9 @@ export declare const actionResetZoom: {
310
316
  suggestedBindings: import("../element/binding").SuggestedBinding[];
311
317
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
312
318
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
313
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
319
+ activeTool: {
320
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
321
+ };
314
322
  elementLocked: boolean;
315
323
  penMode: boolean;
316
324
  penDetected: boolean;
@@ -404,7 +412,9 @@ export declare const actionZoomToSelected: {
404
412
  suggestedBindings: import("../element/binding").SuggestedBinding[];
405
413
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
406
414
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
407
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
415
+ activeTool: {
416
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
417
+ };
408
418
  elementLocked: boolean;
409
419
  penMode: boolean;
410
420
  penDetected: boolean;
@@ -497,7 +507,9 @@ export declare const actionZoomToFit: {
497
507
  suggestedBindings: import("../element/binding").SuggestedBinding[];
498
508
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
499
509
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
500
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
510
+ activeTool: {
511
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
512
+ };
501
513
  elementLocked: boolean;
502
514
  penMode: boolean;
503
515
  penDetected: boolean;
@@ -586,7 +598,9 @@ export declare const actionToggleTheme: {
586
598
  suggestedBindings: import("../element/binding").SuggestedBinding[];
587
599
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
588
600
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
589
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
601
+ activeTool: {
602
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
603
+ };
590
604
  elementLocked: boolean;
591
605
  penMode: boolean;
592
606
  penDetected: boolean;
@@ -670,7 +684,9 @@ export declare const actionErase: {
670
684
  appState: {
671
685
  selectedElementIds: {};
672
686
  selectedGroupIds: {};
673
- elementType: "selection" | "eraser";
687
+ activeTool: {
688
+ type: "selection" | "eraser";
689
+ };
674
690
  isLoading: boolean;
675
691
  errorMessage: string | null;
676
692
  draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
@@ -749,7 +765,8 @@ export declare const actionErase: {
749
765
  };
750
766
  commitToHistory: true;
751
767
  };
768
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
752
769
  PanelComponent: ({ elements, appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
753
770
  } & {
754
- keyTest?: undefined;
771
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
755
772
  };
@@ -25,7 +25,9 @@ export declare const actionCut: {
25
25
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
26
26
  suggestedBindings: import("../element/binding").SuggestedBinding[];
27
27
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
28
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
28
+ activeTool: {
29
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
30
+ };
29
31
  elementLocked: boolean;
30
32
  penMode: boolean;
31
33
  penDetected: boolean;
@@ -129,7 +131,9 @@ export declare const actionCut: {
129
131
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
130
132
  suggestedBindings: import("../element/binding").SuggestedBinding[];
131
133
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
132
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
134
+ activeTool: {
135
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
136
+ };
133
137
  elementLocked: boolean;
134
138
  penMode: boolean;
135
139
  penDetected: boolean;
@@ -205,7 +209,9 @@ export declare const actionCut: {
205
209
  } | {
206
210
  elements: import("../element/types").ExcalidrawElement[];
207
211
  appState: {
208
- elementType: "selection";
212
+ activeTool: {
213
+ type: "selection";
214
+ };
209
215
  multiElement: null;
210
216
  selectedElementIds: {};
211
217
  isLoading: boolean;
@@ -311,7 +317,9 @@ export declare const actionCopyAsSvg: {
311
317
  suggestedBindings: import("../element/binding").SuggestedBinding[];
312
318
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
313
319
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
314
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
320
+ activeTool: {
321
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
322
+ };
315
323
  elementLocked: boolean;
316
324
  penMode: boolean;
317
325
  penDetected: boolean;
@@ -407,7 +415,9 @@ export declare const actionCopyAsPng: {
407
415
  suggestedBindings: import("../element/binding").SuggestedBinding[];
408
416
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
409
417
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
410
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
418
+ activeTool: {
419
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
420
+ };
411
421
  elementLocked: boolean;
412
422
  penMode: boolean;
413
423
  penDetected: boolean;
@@ -18,7 +18,9 @@ export declare const actionDeleteSelected: {
18
18
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
19
19
  suggestedBindings: import("../element/binding").SuggestedBinding[];
20
20
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
21
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
21
+ activeTool: {
22
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
23
+ };
22
24
  elementLocked: boolean;
23
25
  penMode: boolean;
24
26
  penDetected: boolean;
@@ -122,7 +124,9 @@ export declare const actionDeleteSelected: {
122
124
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
123
125
  suggestedBindings: import("../element/binding").SuggestedBinding[];
124
126
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
125
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
127
+ activeTool: {
128
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
129
+ };
126
130
  elementLocked: boolean;
127
131
  penMode: boolean;
128
132
  penDetected: boolean;
@@ -198,7 +202,9 @@ export declare const actionDeleteSelected: {
198
202
  } | {
199
203
  elements: ExcalidrawElement[];
200
204
  appState: {
201
- elementType: "selection";
205
+ activeTool: {
206
+ type: "selection";
207
+ };
202
208
  multiElement: null;
203
209
  selectedElementIds: {};
204
210
  isLoading: boolean;
@@ -16,7 +16,9 @@ export declare const actionChangeProjectName: {
16
16
  suggestedBindings: import("../element/binding").SuggestedBinding[];
17
17
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
18
18
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
19
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
19
+ activeTool: {
20
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
21
+ };
20
22
  elementLocked: boolean;
21
23
  penMode: boolean;
22
24
  penDetected: boolean;
@@ -109,7 +111,9 @@ export declare const actionChangeExportScale: {
109
111
  suggestedBindings: import("../element/binding").SuggestedBinding[];
110
112
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
111
113
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
112
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
114
+ activeTool: {
115
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
116
+ };
113
117
  elementLocked: boolean;
114
118
  penMode: boolean;
115
119
  penDetected: boolean;
@@ -202,7 +206,9 @@ export declare const actionChangeExportBackground: {
202
206
  suggestedBindings: import("../element/binding").SuggestedBinding[];
203
207
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
204
208
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
205
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
209
+ activeTool: {
210
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
211
+ };
206
212
  elementLocked: boolean;
207
213
  penMode: boolean;
208
214
  penDetected: boolean;
@@ -295,7 +301,9 @@ export declare const actionChangeExportEmbedScene: {
295
301
  suggestedBindings: import("../element/binding").SuggestedBinding[];
296
302
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
297
303
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
298
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
304
+ activeTool: {
305
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
306
+ };
299
307
  elementLocked: boolean;
300
308
  penMode: boolean;
301
309
  penDetected: boolean;
@@ -390,7 +398,9 @@ export declare const actionSaveToActiveFile: {
390
398
  suggestedBindings: import("../element/binding").SuggestedBinding[];
391
399
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
392
400
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
393
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
401
+ activeTool: {
402
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
403
+ };
394
404
  elementLocked: boolean;
395
405
  penMode: boolean;
396
406
  penDetected: boolean;
@@ -486,7 +496,9 @@ export declare const actionSaveFileToDisk: {
486
496
  suggestedBindings: import("../element/binding").SuggestedBinding[];
487
497
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
488
498
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
489
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
499
+ activeTool: {
500
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
501
+ };
490
502
  elementLocked: boolean;
491
503
  penMode: boolean;
492
504
  penDetected: boolean;
@@ -571,7 +583,9 @@ export declare const actionLoadScene: {
571
583
  perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
572
584
  elements: import("../element/types").ExcalidrawElement[];
573
585
  appState: {
574
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
586
+ activeTool: {
587
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
588
+ };
575
589
  scrollX: number;
576
590
  scrollY: number;
577
591
  viewBackgroundColor: string;
@@ -666,7 +680,9 @@ export declare const actionLoadScene: {
666
680
  suggestedBindings: import("../element/binding").SuggestedBinding[];
667
681
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
668
682
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
669
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
683
+ activeTool: {
684
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
685
+ };
670
686
  elementLocked: boolean;
671
687
  penMode: boolean;
672
688
  penDetected: boolean;
@@ -762,7 +778,9 @@ export declare const actionExportWithDarkMode: {
762
778
  suggestedBindings: import("../element/binding").SuggestedBinding[];
763
779
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
764
780
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
765
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
781
+ activeTool: {
782
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
783
+ };
766
784
  elementLocked: boolean;
767
785
  penMode: boolean;
768
786
  penDetected: boolean;
@@ -16,7 +16,9 @@ export declare const actionFinalize: {
16
16
  startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
17
17
  suggestedBindings: import("../element/binding").SuggestedBinding[];
18
18
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
19
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
19
+ activeTool: {
20
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
21
+ };
20
22
  elementLocked: boolean;
21
23
  penMode: boolean;
22
24
  penDetected: boolean;
@@ -92,7 +94,9 @@ export declare const actionFinalize: {
92
94
  } | {
93
95
  elements: readonly import("../element/types").ExcalidrawElement[];
94
96
  appState: {
95
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
97
+ activeTool: {
98
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
99
+ };
96
100
  draggingElement: null;
97
101
  multiElement: null;
98
102
  editingElement: null;
@@ -178,7 +182,7 @@ export declare const actionFinalize: {
178
182
  commitToHistory: boolean;
179
183
  };
180
184
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState) => boolean;
181
- PanelComponent: ({ appState, updateData }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
185
+ PanelComponent: ({ appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
182
186
  } & {
183
187
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState) => boolean) | undefined;
184
188
  };
@@ -15,7 +15,9 @@ export declare const actionToggleCanvasMenu: {
15
15
  suggestedBindings: import("../element/binding").SuggestedBinding[];
16
16
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
17
17
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
18
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
18
+ activeTool: {
19
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
20
+ };
19
21
  elementLocked: boolean;
20
22
  penMode: boolean;
21
23
  penDetected: boolean;
@@ -108,7 +110,9 @@ export declare const actionToggleEditMenu: {
108
110
  suggestedBindings: import("../element/binding").SuggestedBinding[];
109
111
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
110
112
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
111
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
113
+ activeTool: {
114
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
115
+ };
112
116
  elementLocked: boolean;
113
117
  penMode: boolean;
114
118
  penDetected: boolean;
@@ -210,7 +214,9 @@ export declare const actionShortcuts: {
210
214
  suggestedBindings: import("../element/binding").SuggestedBinding[];
211
215
  editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
212
216
  editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
213
- elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
217
+ activeTool: {
218
+ type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
219
+ };
214
220
  elementLocked: boolean;
215
221
  penMode: boolean;
216
222
  penDetected: boolean;