@dwelle/excalidraw 0.4.0-d8d86cf → 0.4.0-e3bee83
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 +189 -0
- package/README.md +417 -19
- package/dist/excalidraw.development.js +427 -229
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +21 -9
- package/types/actions/actionAlign.d.ts +6 -18
- package/types/actions/actionBoundText.d.ts +9 -5
- package/types/actions/actionCanvas.d.ts +69 -45
- package/types/actions/actionClipboard.d.ts +54 -16
- package/types/actions/actionDeleteSelected.d.ts +22 -12
- package/types/actions/actionDistribute.d.ts +2 -6
- package/types/actions/actionDuplicateSelection.d.ts +1 -3
- package/types/actions/actionExport.d.ts +72 -51
- package/types/actions/actionFinalize.d.ts +15 -9
- package/types/actions/actionFlip.d.ts +2 -2
- package/types/actions/actionGroup.d.ts +4 -8
- package/types/actions/actionLinearEditor.d.ts +8 -4
- package/types/actions/actionMenu.d.ts +24 -17
- package/types/actions/actionNavigate.d.ts +2 -3
- package/types/actions/actionProperties.d.ts +106 -80
- package/types/actions/actionStyles.d.ts +7 -3
- package/types/actions/actionToggleGridMode.d.ts +9 -3
- package/types/actions/actionToggleLock.d.ts +7 -3
- package/types/actions/actionToggleStats.d.ts +8 -3
- package/types/actions/actionToggleViewMode.d.ts +9 -3
- package/types/actions/actionToggleZenMode.d.ts +9 -3
- package/types/actions/actionZindex.d.ts +4 -12
- package/types/actions/manager.d.ts +2 -1
- package/types/actions/types.d.ts +6 -5
- package/types/appState.d.ts +3 -4
- package/types/components/App.d.ts +7 -50
- package/types/components/Button.d.ts +15 -0
- package/types/components/Card.d.ts +7 -0
- package/types/components/ContextMenu.d.ts +8 -21
- package/types/components/JSONExportDialog.d.ts +3 -1
- package/types/components/LayerUI.d.ts +3 -5
- package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
- package/types/components/MobileMenu.d.ts +5 -8
- package/types/components/UserList.d.ts +0 -2
- package/types/components/dropdownMenu/DropdownMenu.d.ts +64 -0
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +13 -0
- package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +12 -0
- package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
- package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
- package/types/components/footer/Footer.d.ts +13 -0
- package/types/components/footer/FooterCenter.d.ts +8 -0
- package/types/components/icons.d.ts +1 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
- package/types/components/main-menu/DefaultItems.d.ts +47 -0
- package/types/components/main-menu/MainMenu.d.ts +55 -0
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
- package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
- package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
- package/types/constants.d.ts +11 -8
- package/types/data/index.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +9 -7
- package/types/element/bounds.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +8 -4
- package/types/element/textElement.d.ts +7 -0
- package/types/element/textWysiwyg.d.ts +6 -1
- package/types/element/typeChecks.d.ts +9 -1
- package/types/element/types.d.ts +9 -5
- package/types/keys.d.ts +2 -0
- package/types/math.d.ts +2 -1
- package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
- package/types/packages/excalidraw/index.d.ts +12 -1
- package/types/packages/utils.d.ts +22 -25
- package/types/renderer/renderScene.d.ts +1 -3
- package/types/scene/comparisons.d.ts +1 -1
- package/types/scene/export.d.ts +143 -9
- package/types/scene/index.d.ts +1 -1
- package/types/scene/types.d.ts +9 -1
- package/types/types.d.ts +44 -24
- package/types/utils.d.ts +17 -0
- package/types/components/ActiveFile.d.ts +0 -7
- package/types/components/ClearCanvas.d.ts +0 -4
- package/types/components/CollabButton.d.ts +0 -6
- package/types/components/Footer.d.ts +0 -10
- package/types/components/MenuItem.d.ts +0 -11
- package/types/components/MenuUtils.d.ts +0 -1
- package/types/components/WelcomeScreen.d.ts +0 -10
- package/types/components/WelcomeScreenDecor.d.ts +0 -6
package/package.json
CHANGED
|
@@ -9,6 +9,11 @@ export declare const actionAddToLibrary: {
|
|
|
9
9
|
toast: {
|
|
10
10
|
message: string;
|
|
11
11
|
};
|
|
12
|
+
contextMenu: {
|
|
13
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
} | null;
|
|
12
17
|
showWelcomeScreen: boolean;
|
|
13
18
|
isLoading: boolean;
|
|
14
19
|
errorMessage: string | null;
|
|
@@ -48,10 +53,9 @@ export declare const actionAddToLibrary: {
|
|
|
48
53
|
currentItemFontFamily: number;
|
|
49
54
|
currentItemFontSize: number;
|
|
50
55
|
currentItemTextAlign: string;
|
|
51
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
52
56
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
53
57
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
54
|
-
|
|
58
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
55
59
|
viewBackgroundColor: string;
|
|
56
60
|
scrollX: number;
|
|
57
61
|
scrollY: number;
|
|
@@ -66,7 +70,7 @@ export declare const actionAddToLibrary: {
|
|
|
66
70
|
openMenu: "canvas" | "shape" | null;
|
|
67
71
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
68
72
|
openSidebar: "library" | "customSidebar" | null;
|
|
69
|
-
openDialog: "imageExport" | "help" | null;
|
|
73
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
70
74
|
isSidebarDocked: boolean;
|
|
71
75
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
72
76
|
selectedElementIds: {
|
|
@@ -107,6 +111,11 @@ export declare const actionAddToLibrary: {
|
|
|
107
111
|
commitToHistory: false;
|
|
108
112
|
appState: {
|
|
109
113
|
errorMessage: any;
|
|
114
|
+
contextMenu: {
|
|
115
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
116
|
+
top: number;
|
|
117
|
+
left: number;
|
|
118
|
+
} | null;
|
|
110
119
|
showWelcomeScreen: boolean;
|
|
111
120
|
isLoading: boolean;
|
|
112
121
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -145,10 +154,9 @@ export declare const actionAddToLibrary: {
|
|
|
145
154
|
currentItemFontFamily: number;
|
|
146
155
|
currentItemFontSize: number;
|
|
147
156
|
currentItemTextAlign: string;
|
|
148
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
149
157
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
150
158
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
151
|
-
|
|
159
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
152
160
|
viewBackgroundColor: string;
|
|
153
161
|
scrollX: number;
|
|
154
162
|
scrollY: number;
|
|
@@ -163,7 +171,7 @@ export declare const actionAddToLibrary: {
|
|
|
163
171
|
openMenu: "canvas" | "shape" | null;
|
|
164
172
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
165
173
|
openSidebar: "library" | "customSidebar" | null;
|
|
166
|
-
openDialog: "imageExport" | "help" | null;
|
|
174
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
167
175
|
isSidebarDocked: boolean;
|
|
168
176
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
169
177
|
selectedElementIds: {
|
|
@@ -209,6 +217,11 @@ export declare const actionAddToLibrary: {
|
|
|
209
217
|
commitToHistory: false;
|
|
210
218
|
appState: {
|
|
211
219
|
errorMessage: string;
|
|
220
|
+
contextMenu: {
|
|
221
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
222
|
+
top: number;
|
|
223
|
+
left: number;
|
|
224
|
+
} | null;
|
|
212
225
|
showWelcomeScreen: boolean;
|
|
213
226
|
isLoading: boolean;
|
|
214
227
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -247,10 +260,9 @@ export declare const actionAddToLibrary: {
|
|
|
247
260
|
currentItemFontFamily: number;
|
|
248
261
|
currentItemFontSize: number;
|
|
249
262
|
currentItemTextAlign: string;
|
|
250
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
251
263
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
252
264
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
253
|
-
|
|
265
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
254
266
|
viewBackgroundColor: string;
|
|
255
267
|
scrollX: number;
|
|
256
268
|
scrollY: number;
|
|
@@ -265,7 +277,7 @@ export declare const actionAddToLibrary: {
|
|
|
265
277
|
openMenu: "canvas" | "shape" | null;
|
|
266
278
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
267
279
|
openSidebar: "library" | "customSidebar" | null;
|
|
268
|
-
openDialog: "imageExport" | "help" | null;
|
|
280
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
269
281
|
isSidebarDocked: boolean;
|
|
270
282
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
271
283
|
selectedElementIds: {
|
|
@@ -12,9 +12,7 @@ export declare const actionAlignTop: {
|
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
16
|
-
isInHamburgerMenu: boolean;
|
|
17
|
-
}) => JSX.Element;
|
|
15
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
18
16
|
} & {
|
|
19
17
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
20
18
|
};
|
|
@@ -29,9 +27,7 @@ export declare const actionAlignBottom: {
|
|
|
29
27
|
commitToHistory: true;
|
|
30
28
|
};
|
|
31
29
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
32
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
33
|
-
isInHamburgerMenu: boolean;
|
|
34
|
-
}) => JSX.Element;
|
|
30
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
35
31
|
} & {
|
|
36
32
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
37
33
|
};
|
|
@@ -46,9 +42,7 @@ export declare const actionAlignLeft: {
|
|
|
46
42
|
commitToHistory: true;
|
|
47
43
|
};
|
|
48
44
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
49
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
50
|
-
isInHamburgerMenu: boolean;
|
|
51
|
-
}) => JSX.Element;
|
|
45
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
52
46
|
} & {
|
|
53
47
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
54
48
|
};
|
|
@@ -63,9 +57,7 @@ export declare const actionAlignRight: {
|
|
|
63
57
|
commitToHistory: true;
|
|
64
58
|
};
|
|
65
59
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
66
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
67
|
-
isInHamburgerMenu: boolean;
|
|
68
|
-
}) => JSX.Element;
|
|
60
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
69
61
|
} & {
|
|
70
62
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
71
63
|
};
|
|
@@ -79,9 +71,7 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
79
71
|
elements: ExcalidrawElement[];
|
|
80
72
|
commitToHistory: true;
|
|
81
73
|
};
|
|
82
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
83
|
-
isInHamburgerMenu: boolean;
|
|
84
|
-
}) => JSX.Element;
|
|
74
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
85
75
|
} & {
|
|
86
76
|
keyTest?: undefined;
|
|
87
77
|
};
|
|
@@ -95,9 +85,7 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
95
85
|
elements: ExcalidrawElement[];
|
|
96
86
|
commitToHistory: true;
|
|
97
87
|
};
|
|
98
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
99
|
-
isInHamburgerMenu: boolean;
|
|
100
|
-
}) => JSX.Element;
|
|
88
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
101
89
|
} & {
|
|
102
90
|
keyTest?: undefined;
|
|
103
91
|
};
|
|
@@ -4,7 +4,7 @@ export declare const actionUnbindText: {
|
|
|
4
4
|
trackEvent: {
|
|
5
5
|
category: "element";
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
8
8
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
9
9
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
10
10
|
appState: Readonly<import("../types").AppState>;
|
|
@@ -19,13 +19,18 @@ export declare const actionBindText: {
|
|
|
19
19
|
trackEvent: {
|
|
20
20
|
category: "element";
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
23
23
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
24
24
|
elements: import("../element/types").ExcalidrawElement[];
|
|
25
25
|
appState: {
|
|
26
26
|
selectedElementIds: {
|
|
27
27
|
[x: string]: true;
|
|
28
28
|
};
|
|
29
|
+
contextMenu: {
|
|
30
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
31
|
+
top: number;
|
|
32
|
+
left: number;
|
|
33
|
+
} | null;
|
|
29
34
|
showWelcomeScreen: boolean;
|
|
30
35
|
isLoading: boolean;
|
|
31
36
|
errorMessage: string | null;
|
|
@@ -65,10 +70,9 @@ export declare const actionBindText: {
|
|
|
65
70
|
currentItemFontFamily: number;
|
|
66
71
|
currentItemFontSize: number;
|
|
67
72
|
currentItemTextAlign: string;
|
|
68
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
69
73
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
70
74
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
71
|
-
|
|
75
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
72
76
|
viewBackgroundColor: string;
|
|
73
77
|
scrollX: number;
|
|
74
78
|
scrollY: number;
|
|
@@ -83,7 +87,7 @@ export declare const actionBindText: {
|
|
|
83
87
|
openMenu: "canvas" | "shape" | null;
|
|
84
88
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
85
89
|
openSidebar: "library" | "customSidebar" | null;
|
|
86
|
-
openDialog: "imageExport" | "help" | null;
|
|
90
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
87
91
|
isSidebarDocked: boolean;
|
|
88
92
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
89
93
|
previousSelectedElementIds: {
|
|
@@ -4,13 +4,12 @@ import { AppState, NormalizedZoomValue } from "../types";
|
|
|
4
4
|
export declare const actionChangeViewBackgroundColor: {
|
|
5
5
|
name: "changeViewBackgroundColor";
|
|
6
6
|
trackEvent: false;
|
|
7
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
7
8
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
8
9
|
appState: any;
|
|
9
10
|
commitToHistory: boolean;
|
|
10
11
|
};
|
|
11
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
12
|
-
isInHamburgerMenu: boolean;
|
|
13
|
-
}) => JSX.Element;
|
|
12
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
14
13
|
} & {
|
|
15
14
|
keyTest?: undefined;
|
|
16
15
|
};
|
|
@@ -19,6 +18,7 @@ export declare const actionClearCanvas: {
|
|
|
19
18
|
trackEvent: {
|
|
20
19
|
category: "canvas";
|
|
21
20
|
};
|
|
21
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
22
22
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
23
23
|
elements: ExcalidrawElement[];
|
|
24
24
|
appState: {
|
|
@@ -49,6 +49,11 @@ export declare const actionClearCanvas: {
|
|
|
49
49
|
locked: boolean;
|
|
50
50
|
};
|
|
51
51
|
name: string;
|
|
52
|
+
contextMenu: {
|
|
53
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
54
|
+
top: number;
|
|
55
|
+
left: number;
|
|
56
|
+
} | null;
|
|
52
57
|
showWelcomeScreen: boolean;
|
|
53
58
|
isLoading: boolean;
|
|
54
59
|
errorMessage: string | null;
|
|
@@ -73,10 +78,9 @@ export declare const actionClearCanvas: {
|
|
|
73
78
|
currentItemFontFamily: number;
|
|
74
79
|
currentItemFontSize: number;
|
|
75
80
|
currentItemTextAlign: string;
|
|
76
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
77
81
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
78
82
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
79
|
-
|
|
83
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
80
84
|
viewBackgroundColor: string;
|
|
81
85
|
scrollX: number;
|
|
82
86
|
scrollY: number;
|
|
@@ -90,7 +94,7 @@ export declare const actionClearCanvas: {
|
|
|
90
94
|
openMenu: "canvas" | "shape" | null;
|
|
91
95
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
92
96
|
openSidebar: "library" | "customSidebar" | null;
|
|
93
|
-
openDialog: "imageExport" | "help" | null;
|
|
97
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
94
98
|
isSidebarDocked: boolean;
|
|
95
99
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
96
100
|
selectedElementIds: {
|
|
@@ -120,14 +124,12 @@ export declare const actionClearCanvas: {
|
|
|
120
124
|
};
|
|
121
125
|
commitToHistory: true;
|
|
122
126
|
};
|
|
123
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps & {
|
|
124
|
-
isInHamburgerMenu: boolean;
|
|
125
|
-
}) => JSX.Element;
|
|
126
127
|
} & {
|
|
127
128
|
keyTest?: undefined;
|
|
128
129
|
};
|
|
129
130
|
export declare const actionZoomIn: {
|
|
130
131
|
name: "zoomIn";
|
|
132
|
+
viewMode: true;
|
|
131
133
|
trackEvent: {
|
|
132
134
|
category: "canvas";
|
|
133
135
|
};
|
|
@@ -138,6 +140,11 @@ export declare const actionZoomIn: {
|
|
|
138
140
|
zoom: {
|
|
139
141
|
value: NormalizedZoomValue;
|
|
140
142
|
};
|
|
143
|
+
contextMenu: {
|
|
144
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
145
|
+
top: number;
|
|
146
|
+
left: number;
|
|
147
|
+
} | null;
|
|
141
148
|
showWelcomeScreen: boolean;
|
|
142
149
|
isLoading: boolean;
|
|
143
150
|
errorMessage: string | null;
|
|
@@ -177,10 +184,9 @@ export declare const actionZoomIn: {
|
|
|
177
184
|
currentItemFontFamily: number;
|
|
178
185
|
currentItemFontSize: number;
|
|
179
186
|
currentItemTextAlign: string;
|
|
180
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
181
187
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
182
188
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
183
|
-
|
|
189
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
184
190
|
viewBackgroundColor: string;
|
|
185
191
|
cursorButton: "up" | "down";
|
|
186
192
|
scrolledOutside: boolean;
|
|
@@ -190,7 +196,7 @@ export declare const actionZoomIn: {
|
|
|
190
196
|
openMenu: "canvas" | "shape" | null;
|
|
191
197
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
192
198
|
openSidebar: "library" | "customSidebar" | null;
|
|
193
|
-
openDialog: "imageExport" | "help" | null;
|
|
199
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
194
200
|
isSidebarDocked: boolean;
|
|
195
201
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
196
202
|
selectedElementIds: {
|
|
@@ -234,15 +240,14 @@ export declare const actionZoomIn: {
|
|
|
234
240
|
};
|
|
235
241
|
commitToHistory: false;
|
|
236
242
|
};
|
|
237
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps
|
|
238
|
-
isInHamburgerMenu: boolean;
|
|
239
|
-
}) => JSX.Element;
|
|
243
|
+
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
240
244
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
241
245
|
} & {
|
|
242
246
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
243
247
|
};
|
|
244
248
|
export declare const actionZoomOut: {
|
|
245
249
|
name: "zoomOut";
|
|
250
|
+
viewMode: true;
|
|
246
251
|
trackEvent: {
|
|
247
252
|
category: "canvas";
|
|
248
253
|
};
|
|
@@ -253,6 +258,11 @@ export declare const actionZoomOut: {
|
|
|
253
258
|
zoom: {
|
|
254
259
|
value: NormalizedZoomValue;
|
|
255
260
|
};
|
|
261
|
+
contextMenu: {
|
|
262
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
263
|
+
top: number;
|
|
264
|
+
left: number;
|
|
265
|
+
} | null;
|
|
256
266
|
showWelcomeScreen: boolean;
|
|
257
267
|
isLoading: boolean;
|
|
258
268
|
errorMessage: string | null;
|
|
@@ -292,10 +302,9 @@ export declare const actionZoomOut: {
|
|
|
292
302
|
currentItemFontFamily: number;
|
|
293
303
|
currentItemFontSize: number;
|
|
294
304
|
currentItemTextAlign: string;
|
|
295
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
296
305
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
297
306
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
298
|
-
|
|
307
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
299
308
|
viewBackgroundColor: string;
|
|
300
309
|
cursorButton: "up" | "down";
|
|
301
310
|
scrolledOutside: boolean;
|
|
@@ -305,7 +314,7 @@ export declare const actionZoomOut: {
|
|
|
305
314
|
openMenu: "canvas" | "shape" | null;
|
|
306
315
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
307
316
|
openSidebar: "library" | "customSidebar" | null;
|
|
308
|
-
openDialog: "imageExport" | "help" | null;
|
|
317
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
309
318
|
isSidebarDocked: boolean;
|
|
310
319
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
311
320
|
selectedElementIds: {
|
|
@@ -349,15 +358,14 @@ export declare const actionZoomOut: {
|
|
|
349
358
|
};
|
|
350
359
|
commitToHistory: false;
|
|
351
360
|
};
|
|
352
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps
|
|
353
|
-
isInHamburgerMenu: boolean;
|
|
354
|
-
}) => JSX.Element;
|
|
361
|
+
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
355
362
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
356
363
|
} & {
|
|
357
364
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
358
365
|
};
|
|
359
366
|
export declare const actionResetZoom: {
|
|
360
367
|
name: "resetZoom";
|
|
368
|
+
viewMode: true;
|
|
361
369
|
trackEvent: {
|
|
362
370
|
category: "canvas";
|
|
363
371
|
};
|
|
@@ -368,6 +376,11 @@ export declare const actionResetZoom: {
|
|
|
368
376
|
zoom: {
|
|
369
377
|
value: NormalizedZoomValue;
|
|
370
378
|
};
|
|
379
|
+
contextMenu: {
|
|
380
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
381
|
+
top: number;
|
|
382
|
+
left: number;
|
|
383
|
+
} | null;
|
|
371
384
|
showWelcomeScreen: boolean;
|
|
372
385
|
isLoading: boolean;
|
|
373
386
|
errorMessage: string | null;
|
|
@@ -407,10 +420,9 @@ export declare const actionResetZoom: {
|
|
|
407
420
|
currentItemFontFamily: number;
|
|
408
421
|
currentItemFontSize: number;
|
|
409
422
|
currentItemTextAlign: string;
|
|
410
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
411
423
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
412
424
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
413
|
-
|
|
425
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
414
426
|
viewBackgroundColor: string;
|
|
415
427
|
cursorButton: "up" | "down";
|
|
416
428
|
scrolledOutside: boolean;
|
|
@@ -420,7 +432,7 @@ export declare const actionResetZoom: {
|
|
|
420
432
|
openMenu: "canvas" | "shape" | null;
|
|
421
433
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
422
434
|
openSidebar: "library" | "customSidebar" | null;
|
|
423
|
-
openDialog: "imageExport" | "help" | null;
|
|
435
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
424
436
|
isSidebarDocked: boolean;
|
|
425
437
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
426
438
|
selectedElementIds: {
|
|
@@ -464,9 +476,7 @@ export declare const actionResetZoom: {
|
|
|
464
476
|
};
|
|
465
477
|
commitToHistory: false;
|
|
466
478
|
};
|
|
467
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
468
|
-
isInHamburgerMenu: boolean;
|
|
469
|
-
}) => JSX.Element;
|
|
479
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
470
480
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
471
481
|
} & {
|
|
472
482
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -483,6 +493,11 @@ export declare const actionZoomToSelected: {
|
|
|
483
493
|
};
|
|
484
494
|
scrollX: number;
|
|
485
495
|
scrollY: number;
|
|
496
|
+
contextMenu: {
|
|
497
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
498
|
+
top: number;
|
|
499
|
+
left: number;
|
|
500
|
+
} | null;
|
|
486
501
|
showWelcomeScreen: boolean;
|
|
487
502
|
isLoading: boolean;
|
|
488
503
|
errorMessage: string | null;
|
|
@@ -522,10 +537,9 @@ export declare const actionZoomToSelected: {
|
|
|
522
537
|
currentItemFontFamily: number;
|
|
523
538
|
currentItemFontSize: number;
|
|
524
539
|
currentItemTextAlign: string;
|
|
525
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
526
540
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
527
541
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
528
|
-
|
|
542
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
529
543
|
viewBackgroundColor: string;
|
|
530
544
|
cursorButton: "up" | "down";
|
|
531
545
|
scrolledOutside: boolean;
|
|
@@ -535,7 +549,7 @@ export declare const actionZoomToSelected: {
|
|
|
535
549
|
openMenu: "canvas" | "shape" | null;
|
|
536
550
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
537
551
|
openSidebar: "library" | "customSidebar" | null;
|
|
538
|
-
openDialog: "imageExport" | "help" | null;
|
|
552
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
539
553
|
isSidebarDocked: boolean;
|
|
540
554
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
541
555
|
selectedElementIds: {
|
|
@@ -585,6 +599,7 @@ export declare const actionZoomToSelected: {
|
|
|
585
599
|
};
|
|
586
600
|
export declare const actionZoomToFit: {
|
|
587
601
|
name: "zoomToFit";
|
|
602
|
+
viewMode: true;
|
|
588
603
|
trackEvent: {
|
|
589
604
|
category: "canvas";
|
|
590
605
|
};
|
|
@@ -595,6 +610,11 @@ export declare const actionZoomToFit: {
|
|
|
595
610
|
};
|
|
596
611
|
scrollX: number;
|
|
597
612
|
scrollY: number;
|
|
613
|
+
contextMenu: {
|
|
614
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
615
|
+
top: number;
|
|
616
|
+
left: number;
|
|
617
|
+
} | null;
|
|
598
618
|
showWelcomeScreen: boolean;
|
|
599
619
|
isLoading: boolean;
|
|
600
620
|
errorMessage: string | null;
|
|
@@ -634,10 +654,9 @@ export declare const actionZoomToFit: {
|
|
|
634
654
|
currentItemFontFamily: number;
|
|
635
655
|
currentItemFontSize: number;
|
|
636
656
|
currentItemTextAlign: string;
|
|
637
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
638
657
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
639
658
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
640
|
-
|
|
659
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
641
660
|
viewBackgroundColor: string;
|
|
642
661
|
cursorButton: "up" | "down";
|
|
643
662
|
scrolledOutside: boolean;
|
|
@@ -647,7 +666,7 @@ export declare const actionZoomToFit: {
|
|
|
647
666
|
openMenu: "canvas" | "shape" | null;
|
|
648
667
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
649
668
|
openSidebar: "library" | "customSidebar" | null;
|
|
650
|
-
openDialog: "imageExport" | "help" | null;
|
|
669
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
651
670
|
isSidebarDocked: boolean;
|
|
652
671
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
653
672
|
selectedElementIds: {
|
|
@@ -697,12 +716,18 @@ export declare const actionZoomToFit: {
|
|
|
697
716
|
};
|
|
698
717
|
export declare const actionToggleTheme: {
|
|
699
718
|
name: "toggleTheme";
|
|
719
|
+
viewMode: true;
|
|
700
720
|
trackEvent: {
|
|
701
721
|
category: "canvas";
|
|
702
722
|
};
|
|
703
723
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
704
724
|
appState: {
|
|
705
725
|
theme: any;
|
|
726
|
+
contextMenu: {
|
|
727
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
728
|
+
top: number;
|
|
729
|
+
left: number;
|
|
730
|
+
} | null;
|
|
706
731
|
showWelcomeScreen: boolean;
|
|
707
732
|
isLoading: boolean;
|
|
708
733
|
errorMessage: string | null;
|
|
@@ -742,10 +767,9 @@ export declare const actionToggleTheme: {
|
|
|
742
767
|
currentItemFontFamily: number;
|
|
743
768
|
currentItemFontSize: number;
|
|
744
769
|
currentItemTextAlign: string;
|
|
745
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
746
770
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
747
771
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
748
|
-
|
|
772
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
749
773
|
viewBackgroundColor: string;
|
|
750
774
|
scrollX: number;
|
|
751
775
|
scrollY: number;
|
|
@@ -760,7 +784,7 @@ export declare const actionToggleTheme: {
|
|
|
760
784
|
openMenu: "canvas" | "shape" | null;
|
|
761
785
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
762
786
|
openSidebar: "library" | "customSidebar" | null;
|
|
763
|
-
openDialog: "imageExport" | "help" | null;
|
|
787
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
764
788
|
isSidebarDocked: boolean;
|
|
765
789
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
766
790
|
selectedElementIds: {
|
|
@@ -803,10 +827,8 @@ export declare const actionToggleTheme: {
|
|
|
803
827
|
};
|
|
804
828
|
commitToHistory: false;
|
|
805
829
|
};
|
|
806
|
-
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
|
|
807
|
-
isInHamburgerMenu: boolean;
|
|
808
|
-
}) => JSX.Element;
|
|
809
830
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
831
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
810
832
|
} & {
|
|
811
833
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
812
834
|
};
|
|
@@ -830,6 +852,11 @@ export declare const actionErase: {
|
|
|
830
852
|
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
831
853
|
locked: boolean;
|
|
832
854
|
};
|
|
855
|
+
contextMenu: {
|
|
856
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
857
|
+
top: number;
|
|
858
|
+
left: number;
|
|
859
|
+
} | null;
|
|
833
860
|
showWelcomeScreen: boolean;
|
|
834
861
|
isLoading: boolean;
|
|
835
862
|
errorMessage: string | null;
|
|
@@ -858,10 +885,9 @@ export declare const actionErase: {
|
|
|
858
885
|
currentItemFontFamily: number;
|
|
859
886
|
currentItemFontSize: number;
|
|
860
887
|
currentItemTextAlign: string;
|
|
861
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
862
888
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
863
889
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
864
|
-
|
|
890
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
865
891
|
viewBackgroundColor: string;
|
|
866
892
|
scrollX: number;
|
|
867
893
|
scrollY: number;
|
|
@@ -876,7 +902,7 @@ export declare const actionErase: {
|
|
|
876
902
|
openMenu: "canvas" | "shape" | null;
|
|
877
903
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
878
904
|
openSidebar: "library" | "customSidebar" | null;
|
|
879
|
-
openDialog: "imageExport" | "help" | null;
|
|
905
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
880
906
|
isSidebarDocked: boolean;
|
|
881
907
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
882
908
|
previousSelectedElementIds: {
|
|
@@ -915,9 +941,7 @@ export declare const actionErase: {
|
|
|
915
941
|
commitToHistory: true;
|
|
916
942
|
};
|
|
917
943
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
918
|
-
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps
|
|
919
|
-
isInHamburgerMenu: boolean;
|
|
920
|
-
}) => JSX.Element;
|
|
944
|
+
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
921
945
|
} & {
|
|
922
946
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
923
947
|
};
|