@dwelle/excalidraw 0.3.54 → 0.3.57
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/CHANGELOG.md +18 -0
- package/dist/excalidraw-assets-dev/{image-73be8b3c1837ea26950c.js → image-eddc6ed66acd3a3f3d46.js} +0 -0
- package/dist/excalidraw.development.js +63 -63
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +18 -6
- package/types/actions/actionAlign.d.ts +18 -0
- package/types/actions/actionBoundText.d.ts +116 -0
- package/types/actions/actionCanvas.d.ts +67 -18
- package/types/actions/actionClipboard.d.ts +37 -10
- package/types/actions/actionDeleteSelected.d.ts +19 -6
- package/types/actions/actionDistribute.d.ts +6 -0
- package/types/actions/actionDuplicateSelection.d.ts +3 -0
- package/types/actions/actionExport.d.ts +71 -18
- package/types/actions/actionFinalize.d.ts +11 -4
- package/types/actions/actionFlip.d.ts +6 -0
- package/types/actions/actionGroup.d.ts +6 -0
- package/types/actions/actionMenu.d.ts +29 -6
- package/types/actions/actionNavigate.d.ts +3 -0
- package/types/actions/actionProperties.d.ts +82 -26
- package/types/actions/actionSelectAll.d.ts +3 -0
- package/types/actions/actionStyles.d.ts +11 -2
- package/types/actions/actionToggleGridMode.d.ts +9 -2
- package/types/actions/actionToggleStats.d.ts +8 -2
- package/types/actions/actionToggleViewMode.d.ts +9 -2
- package/types/actions/actionToggleZenMode.d.ts +9 -2
- package/types/actions/actionZindex.d.ts +12 -0
- package/types/actions/index.d.ts +1 -1
- package/types/actions/manager.d.ts +3 -3
- package/types/actions/types.d.ts +7 -9
- package/types/appState.d.ts +9 -4
- package/types/components/Actions.d.ts +4 -4
- package/types/components/App.d.ts +3 -2
- package/types/components/ImageExportDialog.d.ts +2 -2
- package/types/components/JSONExportDialog.d.ts +2 -2
- package/types/components/ToolButton.d.ts +3 -0
- package/types/constants.d.ts +1 -0
- package/types/data/restore.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +9 -3
- package/types/element/dragElements.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +5 -2
- package/types/element/sizeHelpers.d.ts +2 -1
- package/types/element/textElement.d.ts +1 -2
- package/types/element/typeChecks.d.ts +2 -2
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-eddc6ed66acd3a3f3d46.d.ts +0 -0
- package/types/scene/Scene.d.ts +1 -1
- package/types/types.d.ts +10 -3
- package/types/utils.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwelle/excalidraw",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.57",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
51
51
|
"cross-env": "7.0.3",
|
|
52
52
|
"css-loader": "6.7.1",
|
|
53
|
-
"mini-css-extract-plugin": "2.
|
|
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",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export declare const actionAddToLibrary: {
|
|
2
2
|
name: "addToLibrary";
|
|
3
|
+
trackEvent: {
|
|
4
|
+
category: "element";
|
|
5
|
+
};
|
|
3
6
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<{
|
|
4
7
|
commitToHistory: boolean;
|
|
5
8
|
appState: {
|
|
@@ -15,8 +18,11 @@ export declare const actionAddToLibrary: {
|
|
|
15
18
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
16
19
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
17
20
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
18
|
-
|
|
19
|
-
|
|
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;
|
|
@@ -100,8 +106,11 @@ export declare const actionAddToLibrary: {
|
|
|
100
106
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
101
107
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
102
108
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
activeTool: {
|
|
110
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
111
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
112
|
+
locked: boolean;
|
|
113
|
+
};
|
|
105
114
|
penMode: boolean;
|
|
106
115
|
penDetected: boolean;
|
|
107
116
|
exportBackground: boolean;
|
|
@@ -186,8 +195,11 @@ export declare const actionAddToLibrary: {
|
|
|
186
195
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
187
196
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
188
197
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
189
|
-
|
|
190
|
-
|
|
198
|
+
activeTool: {
|
|
199
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
200
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
201
|
+
locked: boolean;
|
|
202
|
+
};
|
|
191
203
|
penMode: boolean;
|
|
192
204
|
penDetected: boolean;
|
|
193
205
|
exportBackground: boolean;
|
|
@@ -3,6 +3,9 @@ import { ExcalidrawElement } from "../element/types";
|
|
|
3
3
|
import { AppState } from "../types";
|
|
4
4
|
export declare const actionAlignTop: {
|
|
5
5
|
name: "alignTop";
|
|
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 actionAlignTop: {
|
|
|
15
18
|
};
|
|
16
19
|
export declare const actionAlignBottom: {
|
|
17
20
|
name: "alignBottom";
|
|
21
|
+
trackEvent: {
|
|
22
|
+
category: "element";
|
|
23
|
+
};
|
|
18
24
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
19
25
|
appState: Readonly<AppState>;
|
|
20
26
|
elements: ExcalidrawElement[];
|
|
@@ -27,6 +33,9 @@ export declare const actionAlignBottom: {
|
|
|
27
33
|
};
|
|
28
34
|
export declare const actionAlignLeft: {
|
|
29
35
|
name: "alignLeft";
|
|
36
|
+
trackEvent: {
|
|
37
|
+
category: "element";
|
|
38
|
+
};
|
|
30
39
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
31
40
|
appState: Readonly<AppState>;
|
|
32
41
|
elements: ExcalidrawElement[];
|
|
@@ -39,6 +48,9 @@ export declare const actionAlignLeft: {
|
|
|
39
48
|
};
|
|
40
49
|
export declare const actionAlignRight: {
|
|
41
50
|
name: "alignRight";
|
|
51
|
+
trackEvent: {
|
|
52
|
+
category: "element";
|
|
53
|
+
};
|
|
42
54
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
43
55
|
appState: Readonly<AppState>;
|
|
44
56
|
elements: ExcalidrawElement[];
|
|
@@ -51,6 +63,9 @@ export declare const actionAlignRight: {
|
|
|
51
63
|
};
|
|
52
64
|
export declare const actionAlignVerticallyCentered: {
|
|
53
65
|
name: "alignVerticallyCentered";
|
|
66
|
+
trackEvent: {
|
|
67
|
+
category: "element";
|
|
68
|
+
};
|
|
54
69
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
55
70
|
appState: Readonly<AppState>;
|
|
56
71
|
elements: ExcalidrawElement[];
|
|
@@ -62,6 +77,9 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
62
77
|
};
|
|
63
78
|
export declare const actionAlignHorizontallyCentered: {
|
|
64
79
|
name: "alignHorizontallyCentered";
|
|
80
|
+
trackEvent: {
|
|
81
|
+
category: "element";
|
|
82
|
+
};
|
|
65
83
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
66
84
|
appState: Readonly<AppState>;
|
|
67
85
|
elements: ExcalidrawElement[];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export declare const actionUnbindText: {
|
|
2
|
+
name: "unbindText";
|
|
3
|
+
contextItemLabel: string;
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "element";
|
|
6
|
+
};
|
|
7
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
8
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
9
|
+
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
10
|
+
appState: Readonly<import("../types").AppState>;
|
|
11
|
+
commitToHistory: true;
|
|
12
|
+
};
|
|
13
|
+
} & {
|
|
14
|
+
keyTest?: undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare const actionBindText: {
|
|
17
|
+
name: "bindText";
|
|
18
|
+
contextItemLabel: string;
|
|
19
|
+
trackEvent: {
|
|
20
|
+
category: "element";
|
|
21
|
+
};
|
|
22
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
23
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
24
|
+
elements: import("../element/types").ExcalidrawElement[];
|
|
25
|
+
appState: {
|
|
26
|
+
selectedElementIds: {
|
|
27
|
+
[x: string]: true;
|
|
28
|
+
};
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
errorMessage: string | null;
|
|
31
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
32
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
33
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
34
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
35
|
+
isBindingEnabled: boolean;
|
|
36
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
37
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
38
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
39
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
40
|
+
activeTool: {
|
|
41
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
42
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
43
|
+
locked: boolean;
|
|
44
|
+
};
|
|
45
|
+
penMode: boolean;
|
|
46
|
+
penDetected: boolean;
|
|
47
|
+
exportBackground: boolean;
|
|
48
|
+
exportEmbedScene: boolean;
|
|
49
|
+
exportWithDarkMode: boolean;
|
|
50
|
+
exportScale: number;
|
|
51
|
+
currentItemStrokeColor: string;
|
|
52
|
+
currentItemBackgroundColor: string;
|
|
53
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
54
|
+
currentItemStrokeWidth: number;
|
|
55
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
56
|
+
currentItemRoughness: number;
|
|
57
|
+
currentItemOpacity: number;
|
|
58
|
+
currentItemFontFamily: number;
|
|
59
|
+
currentItemFontSize: number;
|
|
60
|
+
currentItemTextAlign: import("../element/types").TextAlign;
|
|
61
|
+
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
62
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
63
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
64
|
+
currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
65
|
+
viewBackgroundColor: string;
|
|
66
|
+
scrollX: number;
|
|
67
|
+
scrollY: number;
|
|
68
|
+
cursorButton: "up" | "down";
|
|
69
|
+
scrolledOutside: boolean;
|
|
70
|
+
name: string;
|
|
71
|
+
isResizing: boolean;
|
|
72
|
+
isRotating: boolean;
|
|
73
|
+
zoom: Readonly<{
|
|
74
|
+
value: import("../types").NormalizedZoomValue;
|
|
75
|
+
}>;
|
|
76
|
+
openMenu: "canvas" | "shape" | null;
|
|
77
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
78
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
79
|
+
previousSelectedElementIds: {
|
|
80
|
+
[id: string]: boolean;
|
|
81
|
+
};
|
|
82
|
+
shouldCacheIgnoreZoom: boolean;
|
|
83
|
+
showHelpDialog: boolean;
|
|
84
|
+
toastMessage: string | null;
|
|
85
|
+
zenModeEnabled: boolean;
|
|
86
|
+
theme: string;
|
|
87
|
+
gridSize: number | null;
|
|
88
|
+
viewModeEnabled: boolean;
|
|
89
|
+
selectedGroupIds: {
|
|
90
|
+
[groupId: string]: boolean;
|
|
91
|
+
};
|
|
92
|
+
editingGroupId: string | null;
|
|
93
|
+
width: number;
|
|
94
|
+
height: number;
|
|
95
|
+
offsetTop: number;
|
|
96
|
+
offsetLeft: number;
|
|
97
|
+
isLibraryOpen: boolean;
|
|
98
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
99
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
100
|
+
showStats: boolean;
|
|
101
|
+
currentChartType: import("../element/types").ChartType;
|
|
102
|
+
pasteDialog: {
|
|
103
|
+
shown: false;
|
|
104
|
+
data: null;
|
|
105
|
+
} | {
|
|
106
|
+
shown: true;
|
|
107
|
+
data: import("../charts").Spreadsheet;
|
|
108
|
+
};
|
|
109
|
+
pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
|
|
110
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
111
|
+
};
|
|
112
|
+
commitToHistory: true;
|
|
113
|
+
};
|
|
114
|
+
} & {
|
|
115
|
+
keyTest?: undefined;
|
|
116
|
+
};
|
|
@@ -3,6 +3,7 @@ import { ExcalidrawElement } from "../element/types";
|
|
|
3
3
|
import { AppState, NormalizedZoomValue } from "../types";
|
|
4
4
|
export declare const actionChangeViewBackgroundColor: {
|
|
5
5
|
name: "changeViewBackgroundColor";
|
|
6
|
+
trackEvent: false;
|
|
6
7
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
7
8
|
appState: any;
|
|
8
9
|
commitToHistory: boolean;
|
|
@@ -13,12 +14,14 @@ export declare const actionChangeViewBackgroundColor: {
|
|
|
13
14
|
};
|
|
14
15
|
export declare const actionClearCanvas: {
|
|
15
16
|
name: "clearCanvas";
|
|
17
|
+
trackEvent: {
|
|
18
|
+
category: "canvas";
|
|
19
|
+
};
|
|
16
20
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
17
21
|
elements: ExcalidrawElement[];
|
|
18
22
|
appState: {
|
|
19
23
|
files: {};
|
|
20
24
|
theme: string;
|
|
21
|
-
elementLocked: boolean;
|
|
22
25
|
penMode: boolean;
|
|
23
26
|
penDetected: boolean;
|
|
24
27
|
exportBackground: boolean;
|
|
@@ -32,7 +35,11 @@ export declare const actionClearCanvas: {
|
|
|
32
35
|
shown: true;
|
|
33
36
|
data: import("../charts").Spreadsheet;
|
|
34
37
|
};
|
|
35
|
-
|
|
38
|
+
activeTool: {
|
|
39
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
40
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
41
|
+
locked: boolean;
|
|
42
|
+
};
|
|
36
43
|
scrollX: number;
|
|
37
44
|
scrollY: number;
|
|
38
45
|
viewBackgroundColor: string;
|
|
@@ -104,6 +111,9 @@ export declare const actionClearCanvas: {
|
|
|
104
111
|
};
|
|
105
112
|
export declare const actionZoomIn: {
|
|
106
113
|
name: "zoomIn";
|
|
114
|
+
trackEvent: {
|
|
115
|
+
category: "canvas";
|
|
116
|
+
};
|
|
107
117
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
108
118
|
appState: {
|
|
109
119
|
scrollX: number;
|
|
@@ -122,8 +132,11 @@ export declare const actionZoomIn: {
|
|
|
122
132
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
123
133
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
124
134
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
125
|
-
|
|
126
|
-
|
|
135
|
+
activeTool: {
|
|
136
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
137
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
138
|
+
locked: boolean;
|
|
139
|
+
};
|
|
127
140
|
penMode: boolean;
|
|
128
141
|
penDetected: boolean;
|
|
129
142
|
exportBackground: boolean;
|
|
@@ -198,6 +211,9 @@ export declare const actionZoomIn: {
|
|
|
198
211
|
};
|
|
199
212
|
export declare const actionZoomOut: {
|
|
200
213
|
name: "zoomOut";
|
|
214
|
+
trackEvent: {
|
|
215
|
+
category: "canvas";
|
|
216
|
+
};
|
|
201
217
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
202
218
|
appState: {
|
|
203
219
|
scrollX: number;
|
|
@@ -216,8 +232,11 @@ export declare const actionZoomOut: {
|
|
|
216
232
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
217
233
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
218
234
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
219
|
-
|
|
220
|
-
|
|
235
|
+
activeTool: {
|
|
236
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
237
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
238
|
+
locked: boolean;
|
|
239
|
+
};
|
|
221
240
|
penMode: boolean;
|
|
222
241
|
penDetected: boolean;
|
|
223
242
|
exportBackground: boolean;
|
|
@@ -292,6 +311,9 @@ export declare const actionZoomOut: {
|
|
|
292
311
|
};
|
|
293
312
|
export declare const actionResetZoom: {
|
|
294
313
|
name: "resetZoom";
|
|
314
|
+
trackEvent: {
|
|
315
|
+
category: "canvas";
|
|
316
|
+
};
|
|
295
317
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
296
318
|
appState: {
|
|
297
319
|
scrollX: number;
|
|
@@ -310,8 +332,11 @@ export declare const actionResetZoom: {
|
|
|
310
332
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
311
333
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
312
334
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
313
|
-
|
|
314
|
-
|
|
335
|
+
activeTool: {
|
|
336
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
337
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
338
|
+
locked: boolean;
|
|
339
|
+
};
|
|
315
340
|
penMode: boolean;
|
|
316
341
|
penDetected: boolean;
|
|
317
342
|
exportBackground: boolean;
|
|
@@ -386,6 +411,9 @@ export declare const actionResetZoom: {
|
|
|
386
411
|
};
|
|
387
412
|
export declare const actionZoomToSelected: {
|
|
388
413
|
name: "zoomToSelection";
|
|
414
|
+
trackEvent: {
|
|
415
|
+
category: "canvas";
|
|
416
|
+
};
|
|
389
417
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
390
418
|
appState: {
|
|
391
419
|
zoom: {
|
|
@@ -404,8 +432,11 @@ export declare const actionZoomToSelected: {
|
|
|
404
432
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
405
433
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
406
434
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
407
|
-
|
|
408
|
-
|
|
435
|
+
activeTool: {
|
|
436
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
437
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
438
|
+
locked: boolean;
|
|
439
|
+
};
|
|
409
440
|
penMode: boolean;
|
|
410
441
|
penDetected: boolean;
|
|
411
442
|
exportBackground: boolean;
|
|
@@ -479,6 +510,9 @@ export declare const actionZoomToSelected: {
|
|
|
479
510
|
};
|
|
480
511
|
export declare const actionZoomToFit: {
|
|
481
512
|
name: "zoomToFit";
|
|
513
|
+
trackEvent: {
|
|
514
|
+
category: "canvas";
|
|
515
|
+
};
|
|
482
516
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
483
517
|
appState: {
|
|
484
518
|
zoom: {
|
|
@@ -497,8 +531,11 @@ export declare const actionZoomToFit: {
|
|
|
497
531
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
498
532
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
499
533
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
500
|
-
|
|
501
|
-
|
|
534
|
+
activeTool: {
|
|
535
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
536
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
537
|
+
locked: boolean;
|
|
538
|
+
};
|
|
502
539
|
penMode: boolean;
|
|
503
540
|
penDetected: boolean;
|
|
504
541
|
exportBackground: boolean;
|
|
@@ -572,6 +609,9 @@ export declare const actionZoomToFit: {
|
|
|
572
609
|
};
|
|
573
610
|
export declare const actionToggleTheme: {
|
|
574
611
|
name: "toggleTheme";
|
|
612
|
+
trackEvent: {
|
|
613
|
+
category: "canvas";
|
|
614
|
+
};
|
|
575
615
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
576
616
|
appState: {
|
|
577
617
|
theme: any;
|
|
@@ -586,8 +626,11 @@ export declare const actionToggleTheme: {
|
|
|
586
626
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
587
627
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
588
628
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
589
|
-
|
|
590
|
-
|
|
629
|
+
activeTool: {
|
|
630
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
631
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
632
|
+
locked: boolean;
|
|
633
|
+
};
|
|
591
634
|
penMode: boolean;
|
|
592
635
|
penDetected: boolean;
|
|
593
636
|
exportBackground: boolean;
|
|
@@ -666,11 +709,18 @@ export declare const actionToggleTheme: {
|
|
|
666
709
|
};
|
|
667
710
|
export declare const actionErase: {
|
|
668
711
|
name: "eraser";
|
|
712
|
+
trackEvent: {
|
|
713
|
+
category: "toolbar";
|
|
714
|
+
};
|
|
669
715
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
670
716
|
appState: {
|
|
671
717
|
selectedElementIds: {};
|
|
672
718
|
selectedGroupIds: {};
|
|
673
|
-
|
|
719
|
+
activeTool: {
|
|
720
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
721
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
722
|
+
locked: boolean;
|
|
723
|
+
};
|
|
674
724
|
isLoading: boolean;
|
|
675
725
|
errorMessage: string | null;
|
|
676
726
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -682,7 +732,6 @@ export declare const actionErase: {
|
|
|
682
732
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
683
733
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
684
734
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
685
|
-
elementLocked: boolean;
|
|
686
735
|
penMode: boolean;
|
|
687
736
|
penDetected: boolean;
|
|
688
737
|
exportBackground: boolean;
|
|
@@ -749,8 +798,8 @@ export declare const actionErase: {
|
|
|
749
798
|
};
|
|
750
799
|
commitToHistory: true;
|
|
751
800
|
};
|
|
752
|
-
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element
|
|
801
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
|
|
753
802
|
PanelComponent: ({ elements, appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
|
|
754
803
|
} & {
|
|
755
|
-
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element
|
|
804
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean) | undefined;
|
|
756
805
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const actionCopy: {
|
|
3
3
|
name: "copy";
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "element";
|
|
6
|
+
};
|
|
4
7
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
5
8
|
commitToHistory: false;
|
|
6
9
|
};
|
|
@@ -11,6 +14,9 @@ export declare const actionCopy: {
|
|
|
11
14
|
};
|
|
12
15
|
export declare const actionCut: {
|
|
13
16
|
name: "cut";
|
|
17
|
+
trackEvent: {
|
|
18
|
+
category: "element";
|
|
19
|
+
};
|
|
14
20
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: any, app: import("../types").AppClassProperties) => false | {
|
|
15
21
|
elements: import("../element/types").ExcalidrawElement[];
|
|
16
22
|
appState: {
|
|
@@ -25,8 +31,11 @@ export declare const actionCut: {
|
|
|
25
31
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
32
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
27
33
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
activeTool: {
|
|
35
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
36
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
37
|
+
locked: boolean;
|
|
38
|
+
};
|
|
30
39
|
penMode: boolean;
|
|
31
40
|
penDetected: boolean;
|
|
32
41
|
exportBackground: boolean;
|
|
@@ -129,8 +138,11 @@ export declare const actionCut: {
|
|
|
129
138
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
130
139
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
131
140
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
132
|
-
|
|
133
|
-
|
|
141
|
+
activeTool: {
|
|
142
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
143
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
144
|
+
locked: boolean;
|
|
145
|
+
};
|
|
134
146
|
penMode: boolean;
|
|
135
147
|
penDetected: boolean;
|
|
136
148
|
exportBackground: boolean;
|
|
@@ -205,7 +217,11 @@ export declare const actionCut: {
|
|
|
205
217
|
} | {
|
|
206
218
|
elements: import("../element/types").ExcalidrawElement[];
|
|
207
219
|
appState: {
|
|
208
|
-
|
|
220
|
+
activeTool: {
|
|
221
|
+
type: "selection";
|
|
222
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
223
|
+
locked: boolean;
|
|
224
|
+
};
|
|
209
225
|
multiElement: null;
|
|
210
226
|
selectedElementIds: {};
|
|
211
227
|
isLoading: boolean;
|
|
@@ -218,7 +234,6 @@ export declare const actionCut: {
|
|
|
218
234
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
219
235
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
220
236
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
221
|
-
elementLocked: boolean;
|
|
222
237
|
penMode: boolean;
|
|
223
238
|
penDetected: boolean;
|
|
224
239
|
exportBackground: boolean;
|
|
@@ -295,6 +310,9 @@ export declare const actionCut: {
|
|
|
295
310
|
};
|
|
296
311
|
export declare const actionCopyAsSvg: {
|
|
297
312
|
name: "copyAsSvg";
|
|
313
|
+
trackEvent: {
|
|
314
|
+
category: "element";
|
|
315
|
+
};
|
|
298
316
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
299
317
|
commitToHistory: false;
|
|
300
318
|
appState?: undefined;
|
|
@@ -311,8 +329,11 @@ export declare const actionCopyAsSvg: {
|
|
|
311
329
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
312
330
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
313
331
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
314
|
-
|
|
315
|
-
|
|
332
|
+
activeTool: {
|
|
333
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
334
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
335
|
+
locked: boolean;
|
|
336
|
+
};
|
|
316
337
|
penMode: boolean;
|
|
317
338
|
penDetected: boolean;
|
|
318
339
|
exportBackground: boolean;
|
|
@@ -391,6 +412,9 @@ export declare const actionCopyAsSvg: {
|
|
|
391
412
|
};
|
|
392
413
|
export declare const actionCopyAsPng: {
|
|
393
414
|
name: "copyAsPng";
|
|
415
|
+
trackEvent: {
|
|
416
|
+
category: "element";
|
|
417
|
+
};
|
|
394
418
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
395
419
|
commitToHistory: false;
|
|
396
420
|
appState?: undefined;
|
|
@@ -407,8 +431,11 @@ export declare const actionCopyAsPng: {
|
|
|
407
431
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
408
432
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
409
433
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
410
|
-
|
|
411
|
-
|
|
434
|
+
activeTool: {
|
|
435
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
436
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
437
|
+
locked: boolean;
|
|
438
|
+
};
|
|
412
439
|
penMode: boolean;
|
|
413
440
|
penDetected: boolean;
|
|
414
441
|
exportBackground: boolean;
|
|
@@ -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
|
-
|
|
22
|
-
|
|
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;
|
|
@@ -122,8 +129,11 @@ export declare const actionDeleteSelected: {
|
|
|
122
129
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
123
130
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
124
131
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
activeTool: {
|
|
133
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
134
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
135
|
+
locked: boolean;
|
|
136
|
+
};
|
|
127
137
|
penMode: boolean;
|
|
128
138
|
penDetected: boolean;
|
|
129
139
|
exportBackground: boolean;
|
|
@@ -198,7 +208,11 @@ export declare const actionDeleteSelected: {
|
|
|
198
208
|
} | {
|
|
199
209
|
elements: ExcalidrawElement[];
|
|
200
210
|
appState: {
|
|
201
|
-
|
|
211
|
+
activeTool: {
|
|
212
|
+
type: "selection";
|
|
213
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
214
|
+
locked: boolean;
|
|
215
|
+
};
|
|
202
216
|
multiElement: null;
|
|
203
217
|
selectedElementIds: {};
|
|
204
218
|
isLoading: boolean;
|
|
@@ -211,7 +225,6 @@ export declare const actionDeleteSelected: {
|
|
|
211
225
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
212
226
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
213
227
|
editingLinearElement: LinearElementEditor | null;
|
|
214
|
-
elementLocked: boolean;
|
|
215
228
|
penMode: boolean;
|
|
216
229
|
penDetected: boolean;
|
|
217
230
|
exportBackground: boolean;
|