@dwelle/excalidraw 0.3.48 → 0.3.51
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.
- package/dist/excalidraw.development.js +22 -22
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +3 -3
- package/types/actions/actionCanvas.d.ts +96 -7
- package/types/actions/actionClipboard.d.ts +4 -4
- package/types/actions/actionDeleteSelected.d.ts +2 -2
- package/types/actions/actionExport.d.ts +9 -9
- package/types/actions/actionFinalize.d.ts +2 -2
- package/types/actions/actionMenu.d.ts +3 -3
- package/types/actions/actionProperties.d.ts +13 -13
- package/types/actions/actionStyles.d.ts +1 -1
- package/types/actions/actionToggleGridMode.d.ts +1 -1
- package/types/actions/actionToggleStats.d.ts +1 -1
- package/types/actions/actionToggleViewMode.d.ts +1 -1
- package/types/actions/actionToggleZenMode.d.ts +1 -1
- package/types/actions/types.d.ts +1 -1
- package/types/appState.d.ts +4 -1
- package/types/components/Actions.d.ts +2 -2
- package/types/components/App.d.ts +6 -0
- package/types/components/icons.d.ts +1 -0
- package/types/data/restore.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +1 -1
- package/types/element/dragElements.d.ts +1 -2
- package/types/element/linearElementEditor.d.ts +1 -1
- package/types/element/typeChecks.d.ts +3 -2
- package/types/types.d.ts +4 -1
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ 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";
|
|
18
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
19
19
|
elementLocked: boolean;
|
|
20
20
|
penMode: boolean;
|
|
21
21
|
penDetected: boolean;
|
|
@@ -100,7 +100,7 @@ export declare const actionAddToLibrary: {
|
|
|
100
100
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
101
101
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
102
102
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
103
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
103
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
104
104
|
elementLocked: boolean;
|
|
105
105
|
penMode: boolean;
|
|
106
106
|
penDetected: boolean;
|
|
@@ -186,7 +186,7 @@ export declare const actionAddToLibrary: {
|
|
|
186
186
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
187
187
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
188
188
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
189
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
189
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
190
190
|
elementLocked: boolean;
|
|
191
191
|
penMode: boolean;
|
|
192
192
|
penDetected: boolean;
|
|
@@ -32,7 +32,7 @@ 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";
|
|
35
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "freedraw" | "eraser";
|
|
36
36
|
scrollX: number;
|
|
37
37
|
scrollY: number;
|
|
38
38
|
viewBackgroundColor: string;
|
|
@@ -122,7 +122,7 @@ export declare const actionZoomIn: {
|
|
|
122
122
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
123
123
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
124
124
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
125
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
125
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
126
126
|
elementLocked: boolean;
|
|
127
127
|
penMode: boolean;
|
|
128
128
|
penDetected: boolean;
|
|
@@ -216,7 +216,7 @@ export declare const actionZoomOut: {
|
|
|
216
216
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
217
217
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
218
218
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
219
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
219
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
220
220
|
elementLocked: boolean;
|
|
221
221
|
penMode: boolean;
|
|
222
222
|
penDetected: boolean;
|
|
@@ -310,7 +310,7 @@ export declare const actionResetZoom: {
|
|
|
310
310
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
311
311
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
312
312
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
313
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
313
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
314
314
|
elementLocked: boolean;
|
|
315
315
|
penMode: boolean;
|
|
316
316
|
penDetected: boolean;
|
|
@@ -404,7 +404,7 @@ export declare const actionZoomToSelected: {
|
|
|
404
404
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
405
405
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
406
406
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
407
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
407
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
408
408
|
elementLocked: boolean;
|
|
409
409
|
penMode: boolean;
|
|
410
410
|
penDetected: boolean;
|
|
@@ -497,7 +497,7 @@ export declare const actionZoomToFit: {
|
|
|
497
497
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
498
498
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
499
499
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
500
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
500
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
501
501
|
elementLocked: boolean;
|
|
502
502
|
penMode: boolean;
|
|
503
503
|
penDetected: boolean;
|
|
@@ -586,7 +586,7 @@ export declare const actionToggleTheme: {
|
|
|
586
586
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
587
587
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
588
588
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
589
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
589
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
590
590
|
elementLocked: boolean;
|
|
591
591
|
penMode: boolean;
|
|
592
592
|
penDetected: boolean;
|
|
@@ -664,3 +664,92 @@ export declare const actionToggleTheme: {
|
|
|
664
664
|
} & {
|
|
665
665
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
666
666
|
};
|
|
667
|
+
export declare const actionErase: {
|
|
668
|
+
name: "eraser";
|
|
669
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
670
|
+
appState: {
|
|
671
|
+
selectedElementIds: {};
|
|
672
|
+
selectedGroupIds: {};
|
|
673
|
+
elementType: "selection" | "eraser";
|
|
674
|
+
isLoading: boolean;
|
|
675
|
+
errorMessage: string | null;
|
|
676
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
677
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
678
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
679
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
680
|
+
isBindingEnabled: boolean;
|
|
681
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
682
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
683
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
684
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
685
|
+
elementLocked: boolean;
|
|
686
|
+
penMode: boolean;
|
|
687
|
+
penDetected: boolean;
|
|
688
|
+
exportBackground: boolean;
|
|
689
|
+
exportEmbedScene: boolean;
|
|
690
|
+
exportWithDarkMode: boolean;
|
|
691
|
+
exportScale: number;
|
|
692
|
+
currentItemStrokeColor: string;
|
|
693
|
+
currentItemBackgroundColor: string;
|
|
694
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
695
|
+
currentItemStrokeWidth: number;
|
|
696
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
697
|
+
currentItemRoughness: number;
|
|
698
|
+
currentItemOpacity: number;
|
|
699
|
+
currentItemFontFamily: number;
|
|
700
|
+
currentItemFontSize: number;
|
|
701
|
+
currentItemTextAlign: import("../element/types").TextAlign;
|
|
702
|
+
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
703
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
704
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
705
|
+
currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
706
|
+
viewBackgroundColor: string;
|
|
707
|
+
scrollX: number;
|
|
708
|
+
scrollY: number;
|
|
709
|
+
cursorButton: "up" | "down";
|
|
710
|
+
scrolledOutside: boolean;
|
|
711
|
+
name: string;
|
|
712
|
+
isResizing: boolean;
|
|
713
|
+
isRotating: boolean;
|
|
714
|
+
zoom: Readonly<{
|
|
715
|
+
value: NormalizedZoomValue;
|
|
716
|
+
}>;
|
|
717
|
+
openMenu: "canvas" | "shape" | null;
|
|
718
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
719
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
720
|
+
previousSelectedElementIds: {
|
|
721
|
+
[id: string]: boolean;
|
|
722
|
+
};
|
|
723
|
+
shouldCacheIgnoreZoom: boolean;
|
|
724
|
+
showHelpDialog: boolean;
|
|
725
|
+
toastMessage: string | null;
|
|
726
|
+
zenModeEnabled: boolean;
|
|
727
|
+
theme: string;
|
|
728
|
+
gridSize: number | null;
|
|
729
|
+
viewModeEnabled: boolean;
|
|
730
|
+
editingGroupId: string | null;
|
|
731
|
+
width: number;
|
|
732
|
+
height: number;
|
|
733
|
+
offsetTop: number;
|
|
734
|
+
offsetLeft: number;
|
|
735
|
+
isLibraryOpen: boolean;
|
|
736
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
737
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
738
|
+
showStats: boolean;
|
|
739
|
+
currentChartType: import("../element/types").ChartType;
|
|
740
|
+
pasteDialog: {
|
|
741
|
+
shown: false;
|
|
742
|
+
data: null;
|
|
743
|
+
} | {
|
|
744
|
+
shown: true;
|
|
745
|
+
data: import("../charts").Spreadsheet;
|
|
746
|
+
};
|
|
747
|
+
pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
|
|
748
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
749
|
+
};
|
|
750
|
+
commitToHistory: true;
|
|
751
|
+
};
|
|
752
|
+
PanelComponent: ({ elements, appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
|
|
753
|
+
} & {
|
|
754
|
+
keyTest?: undefined;
|
|
755
|
+
};
|
|
@@ -25,7 +25,7 @@ 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";
|
|
28
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
29
29
|
elementLocked: boolean;
|
|
30
30
|
penMode: boolean;
|
|
31
31
|
penDetected: boolean;
|
|
@@ -129,7 +129,7 @@ export declare const actionCut: {
|
|
|
129
129
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
130
130
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
131
131
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
132
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
132
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
133
133
|
elementLocked: boolean;
|
|
134
134
|
penMode: boolean;
|
|
135
135
|
penDetected: boolean;
|
|
@@ -311,7 +311,7 @@ export declare const actionCopyAsSvg: {
|
|
|
311
311
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
312
312
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
313
313
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
314
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
314
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
315
315
|
elementLocked: boolean;
|
|
316
316
|
penMode: boolean;
|
|
317
317
|
penDetected: boolean;
|
|
@@ -407,7 +407,7 @@ export declare const actionCopyAsPng: {
|
|
|
407
407
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
408
408
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
409
409
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
410
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
410
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
411
411
|
elementLocked: boolean;
|
|
412
412
|
penMode: boolean;
|
|
413
413
|
penDetected: boolean;
|
|
@@ -18,7 +18,7 @@ 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";
|
|
21
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
22
22
|
elementLocked: boolean;
|
|
23
23
|
penMode: boolean;
|
|
24
24
|
penDetected: boolean;
|
|
@@ -122,7 +122,7 @@ export declare const actionDeleteSelected: {
|
|
|
122
122
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
123
123
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
124
124
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
125
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
125
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
126
126
|
elementLocked: boolean;
|
|
127
127
|
penMode: boolean;
|
|
128
128
|
penDetected: boolean;
|
|
@@ -16,7 +16,7 @@ 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";
|
|
19
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
20
20
|
elementLocked: boolean;
|
|
21
21
|
penMode: boolean;
|
|
22
22
|
penDetected: boolean;
|
|
@@ -109,7 +109,7 @@ export declare const actionChangeExportScale: {
|
|
|
109
109
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
110
110
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
111
111
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
112
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
112
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
113
113
|
elementLocked: boolean;
|
|
114
114
|
penMode: boolean;
|
|
115
115
|
penDetected: boolean;
|
|
@@ -202,7 +202,7 @@ export declare const actionChangeExportBackground: {
|
|
|
202
202
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
203
203
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
204
204
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
205
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
205
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
206
206
|
elementLocked: boolean;
|
|
207
207
|
penMode: boolean;
|
|
208
208
|
penDetected: boolean;
|
|
@@ -295,7 +295,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
295
295
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
296
296
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
297
297
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
298
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
298
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
299
299
|
elementLocked: boolean;
|
|
300
300
|
penMode: boolean;
|
|
301
301
|
penDetected: boolean;
|
|
@@ -390,7 +390,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
390
390
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
391
391
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
392
392
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
393
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
393
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
394
394
|
elementLocked: boolean;
|
|
395
395
|
penMode: boolean;
|
|
396
396
|
penDetected: boolean;
|
|
@@ -486,7 +486,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
486
486
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
487
487
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
488
488
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
489
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
489
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
490
490
|
elementLocked: boolean;
|
|
491
491
|
penMode: boolean;
|
|
492
492
|
penDetected: boolean;
|
|
@@ -571,6 +571,7 @@ export declare const actionLoadScene: {
|
|
|
571
571
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
|
|
572
572
|
elements: import("../element/types").ExcalidrawElement[];
|
|
573
573
|
appState: {
|
|
574
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
574
575
|
scrollX: number;
|
|
575
576
|
scrollY: number;
|
|
576
577
|
viewBackgroundColor: string;
|
|
@@ -591,7 +592,6 @@ export declare const actionLoadScene: {
|
|
|
591
592
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
592
593
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
593
594
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
594
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
595
595
|
elementLocked: boolean;
|
|
596
596
|
penMode: boolean;
|
|
597
597
|
penDetected: boolean;
|
|
@@ -666,7 +666,7 @@ export declare const actionLoadScene: {
|
|
|
666
666
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
667
667
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
668
668
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
669
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
669
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
670
670
|
elementLocked: boolean;
|
|
671
671
|
penMode: boolean;
|
|
672
672
|
penDetected: boolean;
|
|
@@ -762,7 +762,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
762
762
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
763
763
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
764
764
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
765
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
765
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
766
766
|
elementLocked: boolean;
|
|
767
767
|
penMode: boolean;
|
|
768
768
|
penDetected: boolean;
|
|
@@ -16,7 +16,7 @@ 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";
|
|
19
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
20
20
|
elementLocked: boolean;
|
|
21
21
|
penMode: boolean;
|
|
22
22
|
penDetected: boolean;
|
|
@@ -92,7 +92,7 @@ export declare const actionFinalize: {
|
|
|
92
92
|
} | {
|
|
93
93
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
94
94
|
appState: {
|
|
95
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
95
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
96
96
|
draggingElement: null;
|
|
97
97
|
multiElement: null;
|
|
98
98
|
editingElement: null;
|
|
@@ -15,7 +15,7 @@ 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";
|
|
18
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
19
19
|
elementLocked: boolean;
|
|
20
20
|
penMode: boolean;
|
|
21
21
|
penDetected: boolean;
|
|
@@ -108,7 +108,7 @@ export declare const actionToggleEditMenu: {
|
|
|
108
108
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
109
109
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
110
110
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
111
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
111
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
112
112
|
elementLocked: boolean;
|
|
113
113
|
penMode: boolean;
|
|
114
114
|
penDetected: boolean;
|
|
@@ -210,7 +210,7 @@ export declare const actionShortcuts: {
|
|
|
210
210
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
211
211
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
212
212
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
213
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
213
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
214
214
|
elementLocked: boolean;
|
|
215
215
|
penMode: boolean;
|
|
216
216
|
penDetected: boolean;
|
|
@@ -32,7 +32,7 @@ export declare const actionChangeFillStyle: {
|
|
|
32
32
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
33
33
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
34
34
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
35
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
35
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
36
36
|
elementLocked: boolean;
|
|
37
37
|
penMode: boolean;
|
|
38
38
|
penDetected: boolean;
|
|
@@ -126,7 +126,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
126
126
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
127
127
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
128
128
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
129
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
129
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
130
130
|
elementLocked: boolean;
|
|
131
131
|
penMode: boolean;
|
|
132
132
|
penDetected: boolean;
|
|
@@ -220,7 +220,7 @@ export declare const actionChangeSloppiness: {
|
|
|
220
220
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
221
221
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
222
222
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
223
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
223
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
224
224
|
elementLocked: boolean;
|
|
225
225
|
penMode: boolean;
|
|
226
226
|
penDetected: boolean;
|
|
@@ -314,7 +314,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
314
314
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
315
315
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
316
316
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
317
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
317
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
318
318
|
elementLocked: boolean;
|
|
319
319
|
penMode: boolean;
|
|
320
320
|
penDetected: boolean;
|
|
@@ -408,7 +408,7 @@ export declare const actionChangeOpacity: {
|
|
|
408
408
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
409
409
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
410
410
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
411
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
411
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
412
412
|
elementLocked: boolean;
|
|
413
413
|
penMode: boolean;
|
|
414
414
|
penDetected: boolean;
|
|
@@ -502,7 +502,7 @@ export declare const actionChangeFontSize: {
|
|
|
502
502
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
503
503
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
504
504
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
505
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
505
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
506
506
|
elementLocked: boolean;
|
|
507
507
|
penMode: boolean;
|
|
508
508
|
penDetected: boolean;
|
|
@@ -596,7 +596,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
596
596
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
597
597
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
598
598
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
599
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
599
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
600
600
|
elementLocked: boolean;
|
|
601
601
|
penMode: boolean;
|
|
602
602
|
penDetected: boolean;
|
|
@@ -690,7 +690,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
690
690
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
691
691
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
692
692
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
693
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
693
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
694
694
|
elementLocked: boolean;
|
|
695
695
|
penMode: boolean;
|
|
696
696
|
penDetected: boolean;
|
|
@@ -784,7 +784,7 @@ export declare const actionChangeFontFamily: {
|
|
|
784
784
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
785
785
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
786
786
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
787
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
787
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
788
788
|
elementLocked: boolean;
|
|
789
789
|
penMode: boolean;
|
|
790
790
|
penDetected: boolean;
|
|
@@ -878,7 +878,7 @@ export declare const actionChangeTextAlign: {
|
|
|
878
878
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
879
879
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
880
880
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
881
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
881
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
882
882
|
elementLocked: boolean;
|
|
883
883
|
penMode: boolean;
|
|
884
884
|
penDetected: boolean;
|
|
@@ -971,7 +971,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
971
971
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
972
972
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
973
973
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
974
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
974
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
975
975
|
elementLocked: boolean;
|
|
976
976
|
penMode: boolean;
|
|
977
977
|
penDetected: boolean;
|
|
@@ -1067,7 +1067,7 @@ export declare const actionChangeSharpness: {
|
|
|
1067
1067
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1068
1068
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1069
1069
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1070
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
1070
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
1071
1071
|
elementLocked: boolean;
|
|
1072
1072
|
penMode: boolean;
|
|
1073
1073
|
penDetected: boolean;
|
|
@@ -1162,7 +1162,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1162
1162
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1163
1163
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1164
1164
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1165
|
-
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw";
|
|
1165
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
1166
1166
|
elementLocked: boolean;
|
|
1167
1167
|
penMode: boolean;
|
|
1168
1168
|
penDetected: boolean;
|
|
@@ -16,7 +16,7 @@ export declare const actionCopyStyles: {
|
|
|
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";
|
|
19
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
20
20
|
elementLocked: boolean;
|
|
21
21
|
penMode: boolean;
|
|
22
22
|
penDetected: boolean;
|
|
@@ -16,7 +16,7 @@ export declare const actionToggleGridMode: {
|
|
|
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";
|
|
19
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
20
20
|
elementLocked: boolean;
|
|
21
21
|
penMode: boolean;
|
|
22
22
|
penDetected: boolean;
|
|
@@ -15,7 +15,7 @@ export declare const actionToggleStats: {
|
|
|
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";
|
|
18
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
19
19
|
elementLocked: boolean;
|
|
20
20
|
penMode: boolean;
|
|
21
21
|
penDetected: boolean;
|
|
@@ -15,7 +15,7 @@ export declare const actionToggleViewMode: {
|
|
|
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";
|
|
18
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
19
19
|
elementLocked: boolean;
|
|
20
20
|
penMode: boolean;
|
|
21
21
|
penDetected: boolean;
|
|
@@ -15,7 +15,7 @@ export declare const actionToggleZenMode: {
|
|
|
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";
|
|
18
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
19
19
|
elementLocked: boolean;
|
|
20
20
|
penMode: boolean;
|
|
21
21
|
penDetected: boolean;
|
package/types/actions/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare type ActionResult = {
|
|
|
14
14
|
declare type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export declare type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export declare type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink";
|
|
17
|
+
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "eraser";
|
|
18
18
|
export declare type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
package/types/appState.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
|
+
elementType?: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | undefined;
|
|
4
5
|
scrollX?: number | undefined;
|
|
5
6
|
scrollY?: number | undefined;
|
|
6
7
|
viewBackgroundColor?: string | undefined;
|
|
@@ -10,7 +11,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
10
11
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
11
12
|
theme?: string | undefined;
|
|
12
13
|
name?: string | undefined;
|
|
13
|
-
elementType?: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | undefined;
|
|
14
14
|
elementLocked?: boolean | undefined;
|
|
15
15
|
exportBackground?: boolean | undefined;
|
|
16
16
|
exportEmbedScene?: boolean | undefined;
|
|
@@ -57,3 +57,6 @@ export declare const clearAppStateForDatabase: (appState: Partial<AppState>) =>
|
|
|
57
57
|
viewBackgroundColor?: string | undefined;
|
|
58
58
|
gridSize?: number | null | undefined;
|
|
59
59
|
};
|
|
60
|
+
export declare const isEraserActive: ({ elementType, }: {
|
|
61
|
+
elementType: AppState["elementType"];
|
|
62
|
+
}) => boolean;
|