@dwelle/excalidraw 0.4.0-cfd6fb7 → 0.4.0-d68dd48
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 +316 -544
- package/README.md +16 -1364
- package/dist/excalidraw-assets/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets/vendor-2002fe1b8862917b36c1.js +2 -0
- package/dist/excalidraw-assets-dev/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.js → vendor-e6df8519da951026ff69.js} +1 -1
- package/dist/excalidraw.development.js +1155 -489
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -7
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +47 -34
- package/types/actions/actionBoundText.d.ts +143 -19
- package/types/actions/actionCanvas.d.ts +362 -108
- package/types/actions/actionClipboard.d.ts +107 -60
- package/types/actions/actionDeleteSelected.d.ts +60 -39
- package/types/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/actions/actionExport.d.ts +155 -118
- package/types/actions/actionFinalize.d.ts +32 -24
- package/types/actions/actionFlip.d.ts +2 -2
- package/types/actions/actionGroup.d.ts +2 -2
- package/types/actions/actionLinearEditor.d.ts +119 -0
- package/types/actions/actionMenu.d.ts +50 -37
- package/types/actions/actionNavigate.d.ts +1 -0
- package/types/actions/actionProperties.d.ts +211 -159
- package/types/actions/actionStyles.d.ts +16 -12
- package/types/actions/actionToggleGridMode.d.ts +18 -12
- package/types/actions/actionToggleLock.d.ts +16 -12
- package/types/actions/actionToggleStats.d.ts +17 -12
- package/types/actions/actionToggleViewMode.d.ts +18 -12
- package/types/actions/actionToggleZenMode.d.ts +18 -12
- package/types/actions/index.d.ts +1 -0
- package/types/actions/manager.d.ts +1 -0
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +6 -2
- package/types/appState.d.ts +23 -21
- package/types/clients.d.ts +1 -1
- package/types/clipboard.d.ts +6 -1
- package/types/components/Actions.d.ts +13 -0
- package/types/components/ActiveConfirmDialog.d.ts +24 -0
- package/types/components/App.d.ts +36 -17
- package/types/components/Avatar.d.ts +1 -1
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/Button.d.ts +15 -0
- package/types/components/ButtonIconSelect.d.ts +11 -3
- package/types/components/ContextMenu.d.ts +8 -21
- package/types/components/DialogActionButton.d.ts +10 -0
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/HelpButton.d.ts +7 -0
- package/types/components/HintViewer.d.ts +3 -2
- package/types/components/HomeButton.d.ts +5 -0
- package/types/components/ImageExportDialog.d.ts +3 -1
- package/types/components/InitializeApp.d.ts +2 -0
- package/types/components/JSONExportDialog.d.ts +5 -3
- package/types/components/LayerUI.d.ts +6 -6
- package/types/components/LibraryButton.d.ts +1 -0
- package/types/components/LibraryMenu.d.ts +14 -5
- package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +35 -0
- package/types/components/LibraryMenuItems.d.ts +5 -14
- package/types/components/LibraryUnit.d.ts +2 -3
- package/types/components/LoadingMessage.d.ts +2 -0
- package/types/components/LockButton.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +9 -11
- package/types/components/Sidebar/Sidebar.d.ts +73 -0
- package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
- package/types/components/Sidebar/common.d.ts +16 -0
- package/types/components/Stats.d.ts +1 -1
- package/types/components/ToolButton.d.ts +1 -1
- package/types/components/UserList.d.ts +0 -3
- package/types/components/context/tunnels.d.ts +16 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +66 -0
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
- package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -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 +13 -0
- package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
- package/types/components/footer/Footer.d.ts +12 -0
- package/types/components/footer/FooterCenter.d.ts +8 -0
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
- package/types/components/icons.d.ts +83 -122
- 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 +60 -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 +45 -16
- package/types/data/blob.d.ts +2 -1
- package/types/data/index.d.ts +1 -1
- package/types/data/restore.d.ts +8 -2
- package/types/data/types.d.ts +16 -1
- package/types/element/Hyperlink.d.ts +17 -13
- package/types/element/bounds.d.ts +3 -2
- package/types/element/image.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +65 -22
- package/types/element/mutateElement.d.ts +1 -0
- package/types/element/newElement.d.ts +42 -10
- package/types/element/resizeElements.d.ts +0 -1
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +61 -8
- package/types/element/textWysiwyg.d.ts +6 -1
- package/types/element/transformHandles.d.ts +3 -4
- package/types/element/typeChecks.d.ts +12 -2
- package/types/element/types.d.ts +21 -6
- package/types/hooks/useOutsideClick.d.ts +2 -0
- package/types/i18n.d.ts +6 -0
- package/types/jotai.d.ts +5 -5
- package/types/keys.d.ts +15 -6
- package/types/math.d.ts +10 -1
- package/types/packages/excalidraw/example/App.d.ts +9 -2
- package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/sidebar/{Sidebar.d.ts → ExampleSidebar.d.ts} +1 -1
- package/types/packages/excalidraw/index.d.ts +16 -2
- package/types/packages/utils.d.ts +26 -22
- package/types/renderer/renderElement.d.ts +6 -4
- package/types/renderer/renderScene.d.ts +2 -4
- package/types/scene/Fonts.d.ts +21 -0
- package/types/scene/Scene.d.ts +15 -0
- package/types/scene/comparisons.d.ts +2 -3
- package/types/scene/export.d.ts +156 -10
- package/types/scene/index.d.ts +1 -1
- package/types/scene/types.d.ts +10 -1
- package/types/shapes.d.ts +27 -3
- package/types/types.d.ts +68 -40
- package/types/utility-types.d.ts +22 -0
- package/types/utils.d.ts +30 -4
- package/dist/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js +0 -2
- package/types/components/ActiveFile.d.ts +0 -7
- package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -9
- package/types/components/ClearCanvas.d.ts +0 -4
- package/types/components/CollabButton.d.ts +0 -7
- package/types/components/HelpIcon.d.ts +0 -8
- package/types/components/SidebarLockButton.d.ts +0 -8
- package/types/components/SingleLibraryItem.d.ts +0 -10
- /package/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt → vendor-2002fe1b8862917b36c1.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.d.ts → vendor-2002fe1b8862917b36c1.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
|
@@ -1,15 +1,28 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
* @license
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.min.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
11
|
*/
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* @license React
|
|
12
|
-
*
|
|
15
|
+
* use-sync-external-store-shim.production.min.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @license React
|
|
25
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
13
26
|
*
|
|
14
27
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
28
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwelle/excalidraw",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-d68dd48",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"terser-webpack-plugin": "5.3.3",
|
|
58
58
|
"ts-loader": "9.3.1",
|
|
59
59
|
"typescript": "4.7.4",
|
|
60
|
-
"webpack": "5.
|
|
60
|
+
"webpack": "5.76.0",
|
|
61
61
|
"webpack-bundle-analyzer": "4.5.0",
|
|
62
62
|
"webpack-cli": "4.10.0",
|
|
63
63
|
"webpack-dev-server": "4.9.3",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const actionAddToLibrary: {
|
|
2
3
|
name: "addToLibrary";
|
|
3
4
|
trackEvent: {
|
|
@@ -9,8 +10,14 @@ export declare const actionAddToLibrary: {
|
|
|
9
10
|
toast: {
|
|
10
11
|
message: string;
|
|
11
12
|
};
|
|
13
|
+
contextMenu: {
|
|
14
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
15
|
+
top: number;
|
|
16
|
+
left: number;
|
|
17
|
+
} | null;
|
|
18
|
+
showWelcomeScreen: boolean;
|
|
12
19
|
isLoading: boolean;
|
|
13
|
-
errorMessage:
|
|
20
|
+
errorMessage: import("react").ReactNode;
|
|
14
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
15
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
16
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -21,16 +28,15 @@ export declare const actionAddToLibrary: {
|
|
|
21
28
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
29
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
23
30
|
activeTool: {
|
|
24
|
-
|
|
25
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
31
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
26
32
|
locked: boolean;
|
|
33
|
+
} & ({
|
|
34
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
27
35
|
customType: null;
|
|
28
36
|
} | {
|
|
29
37
|
type: "custom";
|
|
30
38
|
customType: string;
|
|
31
|
-
|
|
32
|
-
locked: boolean;
|
|
33
|
-
};
|
|
39
|
+
});
|
|
34
40
|
penMode: boolean;
|
|
35
41
|
penDetected: boolean;
|
|
36
42
|
exportBackground: boolean;
|
|
@@ -46,11 +52,10 @@ export declare const actionAddToLibrary: {
|
|
|
46
52
|
currentItemOpacity: number;
|
|
47
53
|
currentItemFontFamily: number;
|
|
48
54
|
currentItemFontSize: number;
|
|
49
|
-
currentItemTextAlign:
|
|
50
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
55
|
+
currentItemTextAlign: string;
|
|
51
56
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
57
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
53
|
-
|
|
58
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
54
59
|
viewBackgroundColor: string;
|
|
55
60
|
scrollX: number;
|
|
56
61
|
scrollY: number;
|
|
@@ -64,6 +69,9 @@ export declare const actionAddToLibrary: {
|
|
|
64
69
|
}>;
|
|
65
70
|
openMenu: "canvas" | "shape" | null;
|
|
66
71
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
72
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
73
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
74
|
+
isSidebarDocked: boolean;
|
|
67
75
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
68
76
|
selectedElementIds: {
|
|
69
77
|
[id: string]: boolean;
|
|
@@ -72,7 +80,6 @@ export declare const actionAddToLibrary: {
|
|
|
72
80
|
[id: string]: boolean;
|
|
73
81
|
};
|
|
74
82
|
shouldCacheIgnoreZoom: boolean;
|
|
75
|
-
showHelpDialog: boolean;
|
|
76
83
|
zenModeEnabled: boolean;
|
|
77
84
|
theme: string;
|
|
78
85
|
gridSize: number | null;
|
|
@@ -85,8 +92,6 @@ export declare const actionAddToLibrary: {
|
|
|
85
92
|
height: number;
|
|
86
93
|
offsetTop: number;
|
|
87
94
|
offsetLeft: number;
|
|
88
|
-
isLibraryOpen: boolean;
|
|
89
|
-
isLibraryMenuDocked: boolean;
|
|
90
95
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
91
96
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
92
97
|
showStats: boolean;
|
|
@@ -106,6 +111,12 @@ export declare const actionAddToLibrary: {
|
|
|
106
111
|
commitToHistory: false;
|
|
107
112
|
appState: {
|
|
108
113
|
errorMessage: any;
|
|
114
|
+
contextMenu: {
|
|
115
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
116
|
+
top: number;
|
|
117
|
+
left: number;
|
|
118
|
+
} | null;
|
|
119
|
+
showWelcomeScreen: boolean;
|
|
109
120
|
isLoading: boolean;
|
|
110
121
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
111
122
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -117,16 +128,15 @@ export declare const actionAddToLibrary: {
|
|
|
117
128
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
118
129
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
119
130
|
activeTool: {
|
|
120
|
-
|
|
121
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
131
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
122
132
|
locked: boolean;
|
|
133
|
+
} & ({
|
|
134
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
123
135
|
customType: null;
|
|
124
136
|
} | {
|
|
125
137
|
type: "custom";
|
|
126
138
|
customType: string;
|
|
127
|
-
|
|
128
|
-
locked: boolean;
|
|
129
|
-
};
|
|
139
|
+
});
|
|
130
140
|
penMode: boolean;
|
|
131
141
|
penDetected: boolean;
|
|
132
142
|
exportBackground: boolean;
|
|
@@ -142,11 +152,10 @@ export declare const actionAddToLibrary: {
|
|
|
142
152
|
currentItemOpacity: number;
|
|
143
153
|
currentItemFontFamily: number;
|
|
144
154
|
currentItemFontSize: number;
|
|
145
|
-
currentItemTextAlign:
|
|
146
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
155
|
+
currentItemTextAlign: string;
|
|
147
156
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
148
157
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
149
|
-
|
|
158
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
150
159
|
viewBackgroundColor: string;
|
|
151
160
|
scrollX: number;
|
|
152
161
|
scrollY: number;
|
|
@@ -160,6 +169,9 @@ export declare const actionAddToLibrary: {
|
|
|
160
169
|
}>;
|
|
161
170
|
openMenu: "canvas" | "shape" | null;
|
|
162
171
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
172
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
173
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
174
|
+
isSidebarDocked: boolean;
|
|
163
175
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
164
176
|
selectedElementIds: {
|
|
165
177
|
[id: string]: boolean;
|
|
@@ -168,7 +180,6 @@ export declare const actionAddToLibrary: {
|
|
|
168
180
|
[id: string]: boolean;
|
|
169
181
|
};
|
|
170
182
|
shouldCacheIgnoreZoom: boolean;
|
|
171
|
-
showHelpDialog: boolean;
|
|
172
183
|
toast: {
|
|
173
184
|
message: string;
|
|
174
185
|
closable?: boolean | undefined;
|
|
@@ -186,8 +197,6 @@ export declare const actionAddToLibrary: {
|
|
|
186
197
|
height: number;
|
|
187
198
|
offsetTop: number;
|
|
188
199
|
offsetLeft: number;
|
|
189
|
-
isLibraryOpen: boolean;
|
|
190
|
-
isLibraryMenuDocked: boolean;
|
|
191
200
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
192
201
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
193
202
|
showStats: boolean;
|
|
@@ -207,6 +216,12 @@ export declare const actionAddToLibrary: {
|
|
|
207
216
|
commitToHistory: false;
|
|
208
217
|
appState: {
|
|
209
218
|
errorMessage: string;
|
|
219
|
+
contextMenu: {
|
|
220
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
221
|
+
top: number;
|
|
222
|
+
left: number;
|
|
223
|
+
} | null;
|
|
224
|
+
showWelcomeScreen: boolean;
|
|
210
225
|
isLoading: boolean;
|
|
211
226
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
212
227
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -218,16 +233,15 @@ export declare const actionAddToLibrary: {
|
|
|
218
233
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
219
234
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
220
235
|
activeTool: {
|
|
221
|
-
|
|
222
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
236
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
223
237
|
locked: boolean;
|
|
238
|
+
} & ({
|
|
239
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
224
240
|
customType: null;
|
|
225
241
|
} | {
|
|
226
242
|
type: "custom";
|
|
227
243
|
customType: string;
|
|
228
|
-
|
|
229
|
-
locked: boolean;
|
|
230
|
-
};
|
|
244
|
+
});
|
|
231
245
|
penMode: boolean;
|
|
232
246
|
penDetected: boolean;
|
|
233
247
|
exportBackground: boolean;
|
|
@@ -243,11 +257,10 @@ export declare const actionAddToLibrary: {
|
|
|
243
257
|
currentItemOpacity: number;
|
|
244
258
|
currentItemFontFamily: number;
|
|
245
259
|
currentItemFontSize: number;
|
|
246
|
-
currentItemTextAlign:
|
|
247
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
260
|
+
currentItemTextAlign: string;
|
|
248
261
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
249
262
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
250
|
-
|
|
263
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
251
264
|
viewBackgroundColor: string;
|
|
252
265
|
scrollX: number;
|
|
253
266
|
scrollY: number;
|
|
@@ -261,6 +274,9 @@ export declare const actionAddToLibrary: {
|
|
|
261
274
|
}>;
|
|
262
275
|
openMenu: "canvas" | "shape" | null;
|
|
263
276
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
277
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
278
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
279
|
+
isSidebarDocked: boolean;
|
|
264
280
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
265
281
|
selectedElementIds: {
|
|
266
282
|
[id: string]: boolean;
|
|
@@ -269,7 +285,6 @@ export declare const actionAddToLibrary: {
|
|
|
269
285
|
[id: string]: boolean;
|
|
270
286
|
};
|
|
271
287
|
shouldCacheIgnoreZoom: boolean;
|
|
272
|
-
showHelpDialog: boolean;
|
|
273
288
|
toast: {
|
|
274
289
|
message: string;
|
|
275
290
|
closable?: boolean | undefined;
|
|
@@ -287,8 +302,6 @@ export declare const actionAddToLibrary: {
|
|
|
287
302
|
height: number;
|
|
288
303
|
offsetTop: number;
|
|
289
304
|
offsetLeft: number;
|
|
290
|
-
isLibraryOpen: boolean;
|
|
291
|
-
isLibraryMenuDocked: boolean;
|
|
292
305
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
293
306
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
294
307
|
showStats: boolean;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
3
|
+
import { AppState } from "../types";
|
|
1
4
|
export declare const actionUnbindText: {
|
|
2
5
|
name: "unbindText";
|
|
3
6
|
contextItemLabel: string;
|
|
4
7
|
trackEvent: {
|
|
5
8
|
category: "element";
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
perform: (elements: readonly
|
|
9
|
-
elements: readonly
|
|
10
|
-
appState: Readonly<
|
|
10
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
11
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
12
|
+
elements: readonly ExcalidrawElement[];
|
|
13
|
+
appState: Readonly<AppState>;
|
|
11
14
|
commitToHistory: true;
|
|
12
15
|
};
|
|
13
16
|
} & {
|
|
@@ -19,18 +22,24 @@ export declare const actionBindText: {
|
|
|
19
22
|
trackEvent: {
|
|
20
23
|
category: "element";
|
|
21
24
|
};
|
|
22
|
-
|
|
23
|
-
perform: (elements: readonly
|
|
24
|
-
elements:
|
|
25
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
26
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
27
|
+
elements: ExcalidrawElement[];
|
|
25
28
|
appState: {
|
|
26
29
|
selectedElementIds: {
|
|
27
30
|
[x: string]: true;
|
|
28
31
|
};
|
|
32
|
+
contextMenu: {
|
|
33
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
34
|
+
top: number;
|
|
35
|
+
left: number;
|
|
36
|
+
} | null;
|
|
37
|
+
showWelcomeScreen: boolean;
|
|
29
38
|
isLoading: boolean;
|
|
30
|
-
errorMessage:
|
|
39
|
+
errorMessage: import("react").ReactNode;
|
|
31
40
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
32
41
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
33
|
-
multiElement: import("../element/types").NonDeleted<
|
|
42
|
+
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
34
43
|
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
35
44
|
isBindingEnabled: boolean;
|
|
36
45
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
@@ -38,16 +47,132 @@ export declare const actionBindText: {
|
|
|
38
47
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
39
48
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
40
49
|
activeTool: {
|
|
41
|
-
|
|
42
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
50
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
43
51
|
locked: boolean;
|
|
52
|
+
} & ({
|
|
53
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
44
54
|
customType: null;
|
|
45
55
|
} | {
|
|
46
56
|
type: "custom";
|
|
47
57
|
customType: string;
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
});
|
|
59
|
+
penMode: boolean;
|
|
60
|
+
penDetected: boolean;
|
|
61
|
+
exportBackground: boolean;
|
|
62
|
+
exportEmbedScene: boolean;
|
|
63
|
+
exportWithDarkMode: boolean;
|
|
64
|
+
exportScale: number;
|
|
65
|
+
currentItemStrokeColor: string;
|
|
66
|
+
currentItemBackgroundColor: string;
|
|
67
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
68
|
+
currentItemStrokeWidth: number;
|
|
69
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
70
|
+
currentItemRoughness: number;
|
|
71
|
+
currentItemOpacity: number;
|
|
72
|
+
currentItemFontFamily: number;
|
|
73
|
+
currentItemFontSize: number;
|
|
74
|
+
currentItemTextAlign: string;
|
|
75
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
76
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
77
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
78
|
+
viewBackgroundColor: string;
|
|
79
|
+
scrollX: number;
|
|
80
|
+
scrollY: number;
|
|
81
|
+
cursorButton: "up" | "down";
|
|
82
|
+
scrolledOutside: boolean;
|
|
83
|
+
name: string;
|
|
84
|
+
isResizing: boolean;
|
|
85
|
+
isRotating: boolean;
|
|
86
|
+
zoom: Readonly<{
|
|
87
|
+
value: import("../types").NormalizedZoomValue;
|
|
88
|
+
}>;
|
|
89
|
+
openMenu: "canvas" | "shape" | null;
|
|
90
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
91
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
92
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
93
|
+
isSidebarDocked: boolean;
|
|
94
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
95
|
+
previousSelectedElementIds: {
|
|
96
|
+
[id: string]: boolean;
|
|
97
|
+
};
|
|
98
|
+
shouldCacheIgnoreZoom: boolean;
|
|
99
|
+
toast: {
|
|
100
|
+
message: string;
|
|
101
|
+
closable?: boolean | undefined;
|
|
102
|
+
duration?: number | undefined;
|
|
103
|
+
} | null;
|
|
104
|
+
zenModeEnabled: boolean;
|
|
105
|
+
theme: string;
|
|
106
|
+
gridSize: number | null;
|
|
107
|
+
viewModeEnabled: boolean;
|
|
108
|
+
selectedGroupIds: {
|
|
109
|
+
[groupId: string]: boolean;
|
|
50
110
|
};
|
|
111
|
+
editingGroupId: string | null;
|
|
112
|
+
width: number;
|
|
113
|
+
height: number;
|
|
114
|
+
offsetTop: number;
|
|
115
|
+
offsetLeft: number;
|
|
116
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
117
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
118
|
+
showStats: boolean;
|
|
119
|
+
currentChartType: import("../element/types").ChartType;
|
|
120
|
+
pasteDialog: {
|
|
121
|
+
shown: false;
|
|
122
|
+
data: null;
|
|
123
|
+
} | {
|
|
124
|
+
shown: true;
|
|
125
|
+
data: import("../charts").Spreadsheet;
|
|
126
|
+
};
|
|
127
|
+
pendingImageElementId: string | null;
|
|
128
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
129
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
130
|
+
};
|
|
131
|
+
commitToHistory: true;
|
|
132
|
+
};
|
|
133
|
+
} & {
|
|
134
|
+
keyTest?: undefined;
|
|
135
|
+
};
|
|
136
|
+
export declare const actionWrapTextInContainer: {
|
|
137
|
+
name: "wrapTextInContainer";
|
|
138
|
+
contextItemLabel: string;
|
|
139
|
+
trackEvent: {
|
|
140
|
+
category: "element";
|
|
141
|
+
};
|
|
142
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
143
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
144
|
+
elements: readonly ExcalidrawElement[];
|
|
145
|
+
appState: {
|
|
146
|
+
selectedElementIds: {
|
|
147
|
+
[id: string]: boolean;
|
|
148
|
+
};
|
|
149
|
+
contextMenu: {
|
|
150
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
151
|
+
top: number;
|
|
152
|
+
left: number;
|
|
153
|
+
} | null;
|
|
154
|
+
showWelcomeScreen: boolean;
|
|
155
|
+
isLoading: boolean;
|
|
156
|
+
errorMessage: import("react").ReactNode;
|
|
157
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
158
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
159
|
+
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
160
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
161
|
+
isBindingEnabled: boolean;
|
|
162
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
163
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
164
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
165
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
166
|
+
activeTool: {
|
|
167
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
168
|
+
locked: boolean;
|
|
169
|
+
} & ({
|
|
170
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
171
|
+
customType: null;
|
|
172
|
+
} | {
|
|
173
|
+
type: "custom";
|
|
174
|
+
customType: string;
|
|
175
|
+
});
|
|
51
176
|
penMode: boolean;
|
|
52
177
|
penDetected: boolean;
|
|
53
178
|
exportBackground: boolean;
|
|
@@ -63,11 +188,10 @@ export declare const actionBindText: {
|
|
|
63
188
|
currentItemOpacity: number;
|
|
64
189
|
currentItemFontFamily: number;
|
|
65
190
|
currentItemFontSize: number;
|
|
66
|
-
currentItemTextAlign:
|
|
67
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
191
|
+
currentItemTextAlign: string;
|
|
68
192
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
69
193
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
70
|
-
|
|
194
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
71
195
|
viewBackgroundColor: string;
|
|
72
196
|
scrollX: number;
|
|
73
197
|
scrollY: number;
|
|
@@ -81,12 +205,14 @@ export declare const actionBindText: {
|
|
|
81
205
|
}>;
|
|
82
206
|
openMenu: "canvas" | "shape" | null;
|
|
83
207
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
208
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
209
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
210
|
+
isSidebarDocked: boolean;
|
|
84
211
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
85
212
|
previousSelectedElementIds: {
|
|
86
213
|
[id: string]: boolean;
|
|
87
214
|
};
|
|
88
215
|
shouldCacheIgnoreZoom: boolean;
|
|
89
|
-
showHelpDialog: boolean;
|
|
90
216
|
toast: {
|
|
91
217
|
message: string;
|
|
92
218
|
closable?: boolean | undefined;
|
|
@@ -104,8 +230,6 @@ export declare const actionBindText: {
|
|
|
104
230
|
height: number;
|
|
105
231
|
offsetTop: number;
|
|
106
232
|
offsetLeft: number;
|
|
107
|
-
isLibraryOpen: boolean;
|
|
108
|
-
isLibraryMenuDocked: boolean;
|
|
109
233
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
110
234
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
111
235
|
showStats: boolean;
|