@zsviczian/excalidraw 0.11.0-obsidian-8 → 0.11.0-obsidian-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +84 -73
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +3 -3
- package/types/actions/actionAddToLibrary.d.ts +18 -6
- package/types/actions/actionAlign.d.ts +18 -0
- package/types/actions/actionBoundText.d.ts +123 -0
- package/types/actions/actionCanvas.d.ts +72 -19
- package/types/actions/actionClipboard.d.ts +50 -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 +13 -6
- 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/actionToggleLock.d.ts +17 -0
- 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 +3 -2
- package/types/actions/manager.d.ts +3 -3
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +7 -9
- package/types/appState.d.ts +9 -4
- package/types/clipboard.d.ts +1 -1
- 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/createInverseContext.d.ts +20 -1
- package/types/data/index.d.ts +1 -1
- package/types/data/json.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 +6 -3
- package/types/element/sizeHelpers.d.ts +2 -1
- package/types/element/textElement.d.ts +1 -2
- package/types/element/typeChecks.d.ts +5 -5
- package/types/element/types.d.ts +1 -0
- package/types/excalidraw-app/app_constants.d.ts +13 -1
- package/types/excalidraw-app/collab/CollabWrapper.d.ts +20 -8
- package/types/excalidraw-app/collab/Portal.d.ts +2 -2
- package/types/excalidraw-app/collab/reconciliation.d.ts +9 -0
- package/types/excalidraw-app/data/FileManager.d.ts +66 -0
- package/types/excalidraw-app/data/firebase.d.ts +11 -11
- package/types/excalidraw-app/data/index.d.ts +32 -27
- package/types/excalidraw-app/data/localStorage.d.ts +19 -19
- package/types/excalidraw-app/data/tabSync.d.ts +9 -0
- package/types/packages/excalidraw/index.d.ts +1 -1
- package/types/packages/utils.d.ts +1 -1
- package/types/scene/Scene.d.ts +1 -1
- package/types/shapes.d.ts +1 -1
- package/types/types.d.ts +10 -3
- package/types/utils.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zsviczian/excalidraw",
|
|
3
|
-
"version": "0.11.0-obsidian-
|
|
3
|
+
"version": "0.11.0-obsidian-9",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
58
58
|
"cross-env": "7.0.3",
|
|
59
59
|
"css-loader": "6.7.1",
|
|
60
|
-
"mini-css-extract-plugin": "2.
|
|
60
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
61
61
|
"postcss-loader": "6.2.1",
|
|
62
62
|
"sass-loader": "12.4.0",
|
|
63
63
|
"terser-webpack-plugin": "5.3.1",
|
|
64
|
-
"ts-loader": "9.2.
|
|
64
|
+
"ts-loader": "9.2.8",
|
|
65
65
|
"typescript": "4.5.4",
|
|
66
66
|
"webpack": "5.65.0",
|
|
67
67
|
"webpack-bundle-analyzer": "4.5.0",
|
|
@@ -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;
|
|
@@ -107,8 +113,11 @@ export declare const actionAddToLibrary: {
|
|
|
107
113
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
108
114
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
109
115
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
activeTool: {
|
|
117
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
118
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
119
|
+
locked: boolean;
|
|
120
|
+
};
|
|
112
121
|
penMode: boolean;
|
|
113
122
|
penDetected: boolean;
|
|
114
123
|
exportBackground: boolean;
|
|
@@ -200,8 +209,11 @@ export declare const actionAddToLibrary: {
|
|
|
200
209
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
201
210
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
202
211
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
203
|
-
|
|
204
|
-
|
|
212
|
+
activeTool: {
|
|
213
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
214
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
215
|
+
locked: boolean;
|
|
216
|
+
};
|
|
205
217
|
penMode: boolean;
|
|
206
218
|
penDetected: boolean;
|
|
207
219
|
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,123 @@
|
|
|
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
|
+
linkOpacity: number;
|
|
112
|
+
trayModeEnabled: boolean;
|
|
113
|
+
colorPalette: {
|
|
114
|
+
canvasBackground?: string[] | undefined;
|
|
115
|
+
elementBackground?: string[] | undefined;
|
|
116
|
+
elementStroke?: string[] | undefined;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
commitToHistory: true;
|
|
120
|
+
};
|
|
121
|
+
} & {
|
|
122
|
+
keyTest?: undefined;
|
|
123
|
+
};
|
|
@@ -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;
|
|
@@ -111,6 +118,9 @@ export declare const actionClearCanvas: {
|
|
|
111
118
|
};
|
|
112
119
|
export declare const actionZoomIn: {
|
|
113
120
|
name: "zoomIn";
|
|
121
|
+
trackEvent: {
|
|
122
|
+
category: "canvas";
|
|
123
|
+
};
|
|
114
124
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
115
125
|
appState: {
|
|
116
126
|
scrollX: number;
|
|
@@ -129,8 +139,11 @@ export declare const actionZoomIn: {
|
|
|
129
139
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
130
140
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
131
141
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
activeTool: {
|
|
143
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
144
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
145
|
+
locked: boolean;
|
|
146
|
+
};
|
|
134
147
|
penMode: boolean;
|
|
135
148
|
penDetected: boolean;
|
|
136
149
|
exportBackground: boolean;
|
|
@@ -212,6 +225,9 @@ export declare const actionZoomIn: {
|
|
|
212
225
|
};
|
|
213
226
|
export declare const actionZoomOut: {
|
|
214
227
|
name: "zoomOut";
|
|
228
|
+
trackEvent: {
|
|
229
|
+
category: "canvas";
|
|
230
|
+
};
|
|
215
231
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
216
232
|
appState: {
|
|
217
233
|
scrollX: number;
|
|
@@ -230,8 +246,11 @@ export declare const actionZoomOut: {
|
|
|
230
246
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
231
247
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
232
248
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
233
|
-
|
|
234
|
-
|
|
249
|
+
activeTool: {
|
|
250
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
251
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
252
|
+
locked: boolean;
|
|
253
|
+
};
|
|
235
254
|
penMode: boolean;
|
|
236
255
|
penDetected: boolean;
|
|
237
256
|
exportBackground: boolean;
|
|
@@ -313,6 +332,9 @@ export declare const actionZoomOut: {
|
|
|
313
332
|
};
|
|
314
333
|
export declare const actionResetZoom: {
|
|
315
334
|
name: "resetZoom";
|
|
335
|
+
trackEvent: {
|
|
336
|
+
category: "canvas";
|
|
337
|
+
};
|
|
316
338
|
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
317
339
|
appState: {
|
|
318
340
|
scrollX: number;
|
|
@@ -331,8 +353,11 @@ export declare const actionResetZoom: {
|
|
|
331
353
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
332
354
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
333
355
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
334
|
-
|
|
335
|
-
|
|
356
|
+
activeTool: {
|
|
357
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
358
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
359
|
+
locked: boolean;
|
|
360
|
+
};
|
|
336
361
|
penMode: boolean;
|
|
337
362
|
penDetected: boolean;
|
|
338
363
|
exportBackground: boolean;
|
|
@@ -430,8 +455,11 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
430
455
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
431
456
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
432
457
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
433
|
-
|
|
434
|
-
|
|
458
|
+
activeTool: {
|
|
459
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
460
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
461
|
+
locked: boolean;
|
|
462
|
+
};
|
|
435
463
|
penMode: boolean;
|
|
436
464
|
penDetected: boolean;
|
|
437
465
|
exportBackground: boolean;
|
|
@@ -508,6 +536,9 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
508
536
|
};
|
|
509
537
|
export declare const actionZoomToSelected: {
|
|
510
538
|
name: "zoomToSelection";
|
|
539
|
+
trackEvent: {
|
|
540
|
+
category: "canvas";
|
|
541
|
+
};
|
|
511
542
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
512
543
|
appState: {
|
|
513
544
|
zoom: {
|
|
@@ -526,8 +557,11 @@ export declare const actionZoomToSelected: {
|
|
|
526
557
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
527
558
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
528
559
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
529
|
-
|
|
530
|
-
|
|
560
|
+
activeTool: {
|
|
561
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
562
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
563
|
+
locked: boolean;
|
|
564
|
+
};
|
|
531
565
|
penMode: boolean;
|
|
532
566
|
penDetected: boolean;
|
|
533
567
|
exportBackground: boolean;
|
|
@@ -608,6 +642,9 @@ export declare const actionZoomToSelected: {
|
|
|
608
642
|
};
|
|
609
643
|
export declare const actionZoomToFit: {
|
|
610
644
|
name: "zoomToFit";
|
|
645
|
+
trackEvent: {
|
|
646
|
+
category: "canvas";
|
|
647
|
+
};
|
|
611
648
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
612
649
|
appState: {
|
|
613
650
|
zoom: {
|
|
@@ -626,8 +663,11 @@ export declare const actionZoomToFit: {
|
|
|
626
663
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
627
664
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
628
665
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
629
|
-
|
|
630
|
-
|
|
666
|
+
activeTool: {
|
|
667
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
668
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
669
|
+
locked: boolean;
|
|
670
|
+
};
|
|
631
671
|
penMode: boolean;
|
|
632
672
|
penDetected: boolean;
|
|
633
673
|
exportBackground: boolean;
|
|
@@ -708,6 +748,9 @@ export declare const actionZoomToFit: {
|
|
|
708
748
|
};
|
|
709
749
|
export declare const actionToggleTheme: {
|
|
710
750
|
name: "toggleTheme";
|
|
751
|
+
trackEvent: {
|
|
752
|
+
category: "canvas";
|
|
753
|
+
};
|
|
711
754
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app: import("../types").AppClassProperties) => {
|
|
712
755
|
appState: {
|
|
713
756
|
theme: any;
|
|
@@ -722,8 +765,11 @@ export declare const actionToggleTheme: {
|
|
|
722
765
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
723
766
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
724
767
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
725
|
-
|
|
726
|
-
|
|
768
|
+
activeTool: {
|
|
769
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
770
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
771
|
+
locked: boolean;
|
|
772
|
+
};
|
|
727
773
|
penMode: boolean;
|
|
728
774
|
penDetected: boolean;
|
|
729
775
|
exportBackground: boolean;
|
|
@@ -809,11 +855,18 @@ export declare const actionToggleTheme: {
|
|
|
809
855
|
};
|
|
810
856
|
export declare const actionErase: {
|
|
811
857
|
name: "eraser";
|
|
858
|
+
trackEvent: {
|
|
859
|
+
category: "toolbar";
|
|
860
|
+
};
|
|
812
861
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
813
862
|
appState: {
|
|
814
863
|
selectedElementIds: {};
|
|
815
864
|
selectedGroupIds: {};
|
|
816
|
-
|
|
865
|
+
activeTool: {
|
|
866
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
867
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
868
|
+
locked: boolean;
|
|
869
|
+
};
|
|
817
870
|
isLoading: boolean;
|
|
818
871
|
errorMessage: string | null;
|
|
819
872
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -825,7 +878,6 @@ export declare const actionErase: {
|
|
|
825
878
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
826
879
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
827
880
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
828
|
-
elementLocked: boolean;
|
|
829
881
|
penMode: boolean;
|
|
830
882
|
penDetected: boolean;
|
|
831
883
|
exportBackground: boolean;
|
|
@@ -899,7 +951,8 @@ export declare const actionErase: {
|
|
|
899
951
|
};
|
|
900
952
|
commitToHistory: true;
|
|
901
953
|
};
|
|
954
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
902
955
|
PanelComponent: ({ elements, appState, updateData, data }: import("react").PropsWithChildren<import("./types").PanelComponentProps>) => JSX.Element;
|
|
903
956
|
} & {
|
|
904
|
-
keyTest?: undefined;
|
|
957
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
905
958
|
};
|
|
@@ -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;
|
|
@@ -136,8 +145,11 @@ export declare const actionCut: {
|
|
|
136
145
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
137
146
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
138
147
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
activeTool: {
|
|
149
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
150
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
151
|
+
locked: boolean;
|
|
152
|
+
};
|
|
141
153
|
penMode: boolean;
|
|
142
154
|
penDetected: boolean;
|
|
143
155
|
exportBackground: boolean;
|
|
@@ -219,7 +231,11 @@ export declare const actionCut: {
|
|
|
219
231
|
} | {
|
|
220
232
|
elements: import("../element/types").ExcalidrawElement[];
|
|
221
233
|
appState: {
|
|
222
|
-
|
|
234
|
+
activeTool: {
|
|
235
|
+
type: "selection";
|
|
236
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
237
|
+
locked: boolean;
|
|
238
|
+
};
|
|
223
239
|
multiElement: null;
|
|
224
240
|
selectedElementIds: {};
|
|
225
241
|
isLoading: boolean;
|
|
@@ -232,7 +248,6 @@ export declare const actionCut: {
|
|
|
232
248
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
233
249
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
234
250
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
235
|
-
elementLocked: boolean;
|
|
236
251
|
penMode: boolean;
|
|
237
252
|
penDetected: boolean;
|
|
238
253
|
exportBackground: boolean;
|
|
@@ -316,6 +331,9 @@ export declare const actionCut: {
|
|
|
316
331
|
};
|
|
317
332
|
export declare const actionCopyAsSvg: {
|
|
318
333
|
name: "copyAsSvg";
|
|
334
|
+
trackEvent: {
|
|
335
|
+
category: "element";
|
|
336
|
+
};
|
|
319
337
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
320
338
|
commitToHistory: false;
|
|
321
339
|
appState?: undefined;
|
|
@@ -332,8 +350,11 @@ export declare const actionCopyAsSvg: {
|
|
|
332
350
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
333
351
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
334
352
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
335
|
-
|
|
336
|
-
|
|
353
|
+
activeTool: {
|
|
354
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
355
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
356
|
+
locked: boolean;
|
|
357
|
+
};
|
|
337
358
|
penMode: boolean;
|
|
338
359
|
penDetected: boolean;
|
|
339
360
|
exportBackground: boolean;
|
|
@@ -419,6 +440,9 @@ export declare const actionCopyAsSvg: {
|
|
|
419
440
|
};
|
|
420
441
|
export declare const actionCopyAsPng: {
|
|
421
442
|
name: "copyAsPng";
|
|
443
|
+
trackEvent: {
|
|
444
|
+
category: "element";
|
|
445
|
+
};
|
|
422
446
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
423
447
|
commitToHistory: false;
|
|
424
448
|
appState?: undefined;
|
|
@@ -435,8 +459,11 @@ export declare const actionCopyAsPng: {
|
|
|
435
459
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
436
460
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
437
461
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
438
|
-
|
|
439
|
-
|
|
462
|
+
activeTool: {
|
|
463
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
464
|
+
lastActiveToolBeforeEraser: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | null;
|
|
465
|
+
locked: boolean;
|
|
466
|
+
};
|
|
440
467
|
penMode: boolean;
|
|
441
468
|
penDetected: boolean;
|
|
442
469
|
exportBackground: boolean;
|
|
@@ -521,3 +548,16 @@ export declare const actionCopyAsPng: {
|
|
|
521
548
|
} & {
|
|
522
549
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
523
550
|
};
|
|
551
|
+
export declare const copyText: {
|
|
552
|
+
name: "copyText";
|
|
553
|
+
trackEvent: {
|
|
554
|
+
category: "element";
|
|
555
|
+
};
|
|
556
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
557
|
+
commitToHistory: false;
|
|
558
|
+
};
|
|
559
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
560
|
+
contextItemLabel: string;
|
|
561
|
+
} & {
|
|
562
|
+
keyTest?: undefined;
|
|
563
|
+
};
|