@dwelle/excalidraw 0.4.0-9db4535 → 0.4.0-9fa56da
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 +255 -1
- package/README.md +4 -0
- package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
- package/dist/excalidraw.development.js +2123 -1783
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +7 -2
- package/types/actions/actionAddToLibrary.d.ts +84 -43
- package/types/actions/actionAlign.d.ts +33 -28
- package/types/actions/actionBoundText.d.ts +60 -32
- package/types/actions/actionCanvas.d.ts +436 -164
- package/types/actions/actionClipboard.d.ts +140 -74
- package/types/actions/actionDeleteSelected.d.ts +80 -42
- package/types/actions/actionDistribute.d.ts +11 -12
- package/types/actions/actionDuplicateSelection.d.ts +2 -3
- package/types/actions/actionElementLock.d.ts +58 -30
- package/types/actions/actionExport.d.ts +303 -177
- package/types/actions/actionFinalize.d.ts +56 -32
- package/types/actions/actionFlip.d.ts +8 -9
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +250 -13
- package/types/actions/actionLinearEditor.d.ts +30 -17
- package/types/actions/actionMenu.d.ts +87 -47
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +370 -187
- package/types/actions/actionSelectAll.d.ts +123 -4
- package/types/actions/actionStyles.d.ts +32 -19
- package/types/actions/actionToggleGridMode.d.ts +30 -17
- package/types/actions/actionToggleObjectsSnapMode.d.ts +137 -0
- package/types/actions/actionToggleStats.d.ts +30 -17
- package/types/actions/actionToggleViewMode.d.ts +30 -17
- package/types/actions/actionToggleZenMode.d.ts +30 -17
- package/types/actions/actionZindex.d.ts +12 -12
- package/types/actions/index.d.ts +1 -0
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +4 -3
- package/types/appState.d.ts +10 -15
- package/types/clients.d.ts +1 -5
- package/types/clipboard.d.ts +1 -0
- package/types/colors.d.ts +9 -9
- package/types/components/Actions.d.ts +4 -5
- package/types/components/App.d.ts +61 -28
- package/types/components/Avatar.d.ts +0 -1
- package/types/components/Button.d.ts +0 -1
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/ColorInput.d.ts +3 -1
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
- package/types/components/DefaultSidebar.d.ts +0 -1
- package/types/components/Dialog.d.ts +2 -1
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +18 -8
- package/types/components/FilledButton.d.ts +2 -1
- package/types/components/HintViewer.d.ts +3 -4
- package/types/components/JSONExportDialog.d.ts +1 -1
- package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
- package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
- package/types/components/LaserTool/LaserTool.d.ts +7 -0
- package/types/components/LayerUI.d.ts +6 -2
- package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
- package/types/components/LibraryUnit.d.ts +0 -1
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +4 -3
- package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/Sidebar.d.ts +1 -1
- package/types/components/Sidebar/SidebarTab.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabs.d.ts +0 -1
- package/types/components/Stack.d.ts +2 -2
- package/types/components/ToolButton.d.ts +2 -1
- package/types/components/Trans.d.ts +2 -1
- package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +9 -5
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +1 -1
- package/types/components/icons.d.ts +6 -0
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/main-menu/MainMenu.d.ts +9 -5
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
- package/types/constants.d.ts +35 -3
- package/types/context/tunnels.d.ts +1 -0
- package/types/data/transform.d.ts +71 -0
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +40 -23
- package/types/element/binding.d.ts +2 -1
- package/types/element/bounds.d.ts +30 -6
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +12 -2
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +33 -20
- package/types/element/newElement.d.ts +15 -6
- package/types/element/resizeElements.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/textElement.d.ts +5 -7
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +10 -3
- package/types/element/typeChecks.d.ts +3 -1
- package/types/element/types.d.ts +19 -3
- package/types/frame.d.ts +40 -0
- package/types/groups.d.ts +15 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useOutsideClick.d.ts +0 -1
- package/types/hooks/useScrollPosition.d.ts +0 -1
- package/types/hooks/useStable.d.ts +1 -0
- package/types/i18n.d.ts +5 -2
- package/types/keys.d.ts +4 -0
- package/types/math.d.ts +3 -0
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +3 -1
- package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
- package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
- package/types/packages/utils.d.ts +4 -1
- package/types/renderer/renderElement.d.ts +11 -22
- package/types/renderer/renderScene.d.ts +19 -27
- package/types/renderer/renderSnaps.d.ts +2 -0
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +23 -1
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/export.d.ts +35 -9
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +26 -5
- package/types/scene/types.d.ts +66 -31
- package/types/snapping.d.ts +108 -0
- package/types/types.d.ts +130 -25
- package/types/utility-types.d.ts +3 -1
- package/types/utils.d.ts +60 -23
- package/types/zindex.d.ts +4 -4
- /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
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-9fa56da",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -45,15 +45,19 @@
|
|
|
45
45
|
"@babel/preset-env": "7.18.6",
|
|
46
46
|
"@babel/preset-react": "7.18.6",
|
|
47
47
|
"@babel/preset-typescript": "7.18.6",
|
|
48
|
+
"@size-limit/preset-big-lib": "9.0.0",
|
|
48
49
|
"autoprefixer": "10.4.7",
|
|
49
50
|
"babel-loader": "8.2.5",
|
|
50
51
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
51
52
|
"cross-env": "7.0.3",
|
|
52
53
|
"css-loader": "6.7.1",
|
|
53
54
|
"dotenv": "16.0.1",
|
|
55
|
+
"import-meta-loader": "1.1.0",
|
|
54
56
|
"mini-css-extract-plugin": "2.6.1",
|
|
55
57
|
"postcss-loader": "7.0.1",
|
|
56
58
|
"sass-loader": "13.0.2",
|
|
59
|
+
"size-limit": "9.0.0",
|
|
60
|
+
"style-loader": "3.3.3",
|
|
57
61
|
"terser-webpack-plugin": "5.3.3",
|
|
58
62
|
"ts-loader": "9.3.1",
|
|
59
63
|
"typescript": "4.9.4",
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
"pack": "yarn build:umd && yarn pack",
|
|
73
77
|
"start": "webpack serve --config webpack.dev-server.config.js",
|
|
74
78
|
"install:deps": "yarn install --frozen-lockfile && yarn --cwd ../../../",
|
|
75
|
-
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types"
|
|
79
|
+
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types",
|
|
80
|
+
"size": "yarn build:umd && size-limit"
|
|
76
81
|
}
|
|
77
82
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const actionAddToLibrary: {
|
|
3
2
|
name: "addToLibrary";
|
|
4
3
|
trackEvent: {
|
|
@@ -18,6 +17,10 @@ export declare const actionAddToLibrary: {
|
|
|
18
17
|
showWelcomeScreen: boolean;
|
|
19
18
|
isLoading: boolean;
|
|
20
19
|
errorMessage: import("react").ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "active" | "hover";
|
|
23
|
+
} | null;
|
|
21
24
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
25
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
26
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -25,18 +28,21 @@ export declare const actionAddToLibrary: {
|
|
|
25
28
|
isBindingEnabled: boolean;
|
|
26
29
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
27
30
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
31
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
32
|
+
frameRendering: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
name: boolean;
|
|
35
|
+
outline: boolean;
|
|
36
|
+
clip: boolean;
|
|
37
|
+
};
|
|
38
|
+
editingFrame: string | null;
|
|
39
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
28
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
29
41
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
30
42
|
activeTool: {
|
|
31
|
-
lastActiveTool: import("../types").
|
|
43
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
32
44
|
locked: boolean;
|
|
33
|
-
} & (
|
|
34
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
35
|
-
customType: null;
|
|
36
|
-
} | {
|
|
37
|
-
type: "custom";
|
|
38
|
-
customType: string;
|
|
39
|
-
});
|
|
45
|
+
} & import("../types").ActiveTool;
|
|
40
46
|
penMode: boolean;
|
|
41
47
|
penDetected: boolean;
|
|
42
48
|
exportBackground: boolean;
|
|
@@ -76,15 +82,16 @@ export declare const actionAddToLibrary: {
|
|
|
76
82
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
77
83
|
defaultSidebarDockedPreference: boolean;
|
|
78
84
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
79
|
-
selectedElementIds: {
|
|
80
|
-
[id: string]:
|
|
81
|
-
}
|
|
85
|
+
selectedElementIds: Readonly<{
|
|
86
|
+
[id: string]: true;
|
|
87
|
+
}>;
|
|
82
88
|
previousSelectedElementIds: {
|
|
83
|
-
[id: string]:
|
|
89
|
+
[id: string]: true;
|
|
84
90
|
};
|
|
91
|
+
selectedElementsAreBeingDragged: boolean;
|
|
85
92
|
shouldCacheIgnoreZoom: boolean;
|
|
86
93
|
zenModeEnabled: boolean;
|
|
87
|
-
theme:
|
|
94
|
+
theme: import("../element/types").Theme;
|
|
88
95
|
gridSize: number | null;
|
|
89
96
|
viewModeEnabled: boolean;
|
|
90
97
|
selectedGroupIds: {
|
|
@@ -107,8 +114,14 @@ export declare const actionAddToLibrary: {
|
|
|
107
114
|
data: import("../charts").Spreadsheet;
|
|
108
115
|
};
|
|
109
116
|
pendingImageElementId: string | null;
|
|
110
|
-
showHyperlinkPopup: false | "
|
|
117
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
111
118
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
119
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
120
|
+
originSnapOffset: {
|
|
121
|
+
x: number;
|
|
122
|
+
y: number;
|
|
123
|
+
} | null;
|
|
124
|
+
objectsSnapModeEnabled: boolean;
|
|
112
125
|
};
|
|
113
126
|
} | {
|
|
114
127
|
commitToHistory: false;
|
|
@@ -121,6 +134,10 @@ export declare const actionAddToLibrary: {
|
|
|
121
134
|
} | null;
|
|
122
135
|
showWelcomeScreen: boolean;
|
|
123
136
|
isLoading: boolean;
|
|
137
|
+
activeEmbeddable: {
|
|
138
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
139
|
+
state: "active" | "hover";
|
|
140
|
+
} | null;
|
|
124
141
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
125
142
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
126
143
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -128,18 +145,21 @@ export declare const actionAddToLibrary: {
|
|
|
128
145
|
isBindingEnabled: boolean;
|
|
129
146
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
130
147
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
148
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
149
|
+
frameRendering: {
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
name: boolean;
|
|
152
|
+
outline: boolean;
|
|
153
|
+
clip: boolean;
|
|
154
|
+
};
|
|
155
|
+
editingFrame: string | null;
|
|
156
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
131
157
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
132
158
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
133
159
|
activeTool: {
|
|
134
|
-
lastActiveTool: import("../types").
|
|
160
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
135
161
|
locked: boolean;
|
|
136
|
-
} & (
|
|
137
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
138
|
-
customType: null;
|
|
139
|
-
} | {
|
|
140
|
-
type: "custom";
|
|
141
|
-
customType: string;
|
|
142
|
-
});
|
|
162
|
+
} & import("../types").ActiveTool;
|
|
143
163
|
penMode: boolean;
|
|
144
164
|
penDetected: boolean;
|
|
145
165
|
exportBackground: boolean;
|
|
@@ -179,12 +199,13 @@ export declare const actionAddToLibrary: {
|
|
|
179
199
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
180
200
|
defaultSidebarDockedPreference: boolean;
|
|
181
201
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
182
|
-
selectedElementIds: {
|
|
183
|
-
[id: string]:
|
|
184
|
-
}
|
|
202
|
+
selectedElementIds: Readonly<{
|
|
203
|
+
[id: string]: true;
|
|
204
|
+
}>;
|
|
185
205
|
previousSelectedElementIds: {
|
|
186
|
-
[id: string]:
|
|
206
|
+
[id: string]: true;
|
|
187
207
|
};
|
|
208
|
+
selectedElementsAreBeingDragged: boolean;
|
|
188
209
|
shouldCacheIgnoreZoom: boolean;
|
|
189
210
|
toast: {
|
|
190
211
|
message: string;
|
|
@@ -192,7 +213,7 @@ export declare const actionAddToLibrary: {
|
|
|
192
213
|
duration?: number | undefined;
|
|
193
214
|
} | null;
|
|
194
215
|
zenModeEnabled: boolean;
|
|
195
|
-
theme:
|
|
216
|
+
theme: import("../element/types").Theme;
|
|
196
217
|
gridSize: number | null;
|
|
197
218
|
viewModeEnabled: boolean;
|
|
198
219
|
selectedGroupIds: {
|
|
@@ -215,8 +236,14 @@ export declare const actionAddToLibrary: {
|
|
|
215
236
|
data: import("../charts").Spreadsheet;
|
|
216
237
|
};
|
|
217
238
|
pendingImageElementId: string | null;
|
|
218
|
-
showHyperlinkPopup: false | "
|
|
239
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
219
240
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
241
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
242
|
+
originSnapOffset: {
|
|
243
|
+
x: number;
|
|
244
|
+
y: number;
|
|
245
|
+
} | null;
|
|
246
|
+
objectsSnapModeEnabled: boolean;
|
|
220
247
|
};
|
|
221
248
|
}> | {
|
|
222
249
|
commitToHistory: false;
|
|
@@ -229,6 +256,10 @@ export declare const actionAddToLibrary: {
|
|
|
229
256
|
} | null;
|
|
230
257
|
showWelcomeScreen: boolean;
|
|
231
258
|
isLoading: boolean;
|
|
259
|
+
activeEmbeddable: {
|
|
260
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
261
|
+
state: "active" | "hover";
|
|
262
|
+
} | null;
|
|
232
263
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
233
264
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
234
265
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -236,18 +267,21 @@ export declare const actionAddToLibrary: {
|
|
|
236
267
|
isBindingEnabled: boolean;
|
|
237
268
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
238
269
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
270
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
271
|
+
frameRendering: {
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
name: boolean;
|
|
274
|
+
outline: boolean;
|
|
275
|
+
clip: boolean;
|
|
276
|
+
};
|
|
277
|
+
editingFrame: string | null;
|
|
278
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
239
279
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
240
280
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
241
281
|
activeTool: {
|
|
242
|
-
lastActiveTool: import("../types").
|
|
282
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
243
283
|
locked: boolean;
|
|
244
|
-
} & (
|
|
245
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
246
|
-
customType: null;
|
|
247
|
-
} | {
|
|
248
|
-
type: "custom";
|
|
249
|
-
customType: string;
|
|
250
|
-
});
|
|
284
|
+
} & import("../types").ActiveTool;
|
|
251
285
|
penMode: boolean;
|
|
252
286
|
penDetected: boolean;
|
|
253
287
|
exportBackground: boolean;
|
|
@@ -287,12 +321,13 @@ export declare const actionAddToLibrary: {
|
|
|
287
321
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
288
322
|
defaultSidebarDockedPreference: boolean;
|
|
289
323
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
290
|
-
selectedElementIds: {
|
|
291
|
-
[id: string]:
|
|
292
|
-
}
|
|
324
|
+
selectedElementIds: Readonly<{
|
|
325
|
+
[id: string]: true;
|
|
326
|
+
}>;
|
|
293
327
|
previousSelectedElementIds: {
|
|
294
|
-
[id: string]:
|
|
328
|
+
[id: string]: true;
|
|
295
329
|
};
|
|
330
|
+
selectedElementsAreBeingDragged: boolean;
|
|
296
331
|
shouldCacheIgnoreZoom: boolean;
|
|
297
332
|
toast: {
|
|
298
333
|
message: string;
|
|
@@ -300,7 +335,7 @@ export declare const actionAddToLibrary: {
|
|
|
300
335
|
duration?: number | undefined;
|
|
301
336
|
} | null;
|
|
302
337
|
zenModeEnabled: boolean;
|
|
303
|
-
theme:
|
|
338
|
+
theme: import("../element/types").Theme;
|
|
304
339
|
gridSize: number | null;
|
|
305
340
|
viewModeEnabled: boolean;
|
|
306
341
|
selectedGroupIds: {
|
|
@@ -323,8 +358,14 @@ export declare const actionAddToLibrary: {
|
|
|
323
358
|
data: import("../charts").Spreadsheet;
|
|
324
359
|
};
|
|
325
360
|
pendingImageElementId: string | null;
|
|
326
|
-
showHyperlinkPopup: false | "
|
|
361
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
327
362
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
363
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
364
|
+
originSnapOffset: {
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
} | null;
|
|
368
|
+
objectsSnapModeEnabled: boolean;
|
|
328
369
|
};
|
|
329
370
|
};
|
|
330
371
|
contextItemLabel: string;
|
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
2
|
+
import { AppClassProperties, AppState } from "../types";
|
|
4
3
|
export declare const actionAlignTop: {
|
|
5
4
|
name: "alignTop";
|
|
6
5
|
trackEvent: {
|
|
7
6
|
category: "element";
|
|
8
7
|
};
|
|
9
|
-
|
|
8
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
10
|
appState: Readonly<AppState>;
|
|
11
|
-
elements:
|
|
11
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
|
-
keyTest: (event:
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
14
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
15
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
|
-
keyTest?: ((event:
|
|
17
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
18
18
|
};
|
|
19
19
|
export declare const actionAlignBottom: {
|
|
20
20
|
name: "alignBottom";
|
|
21
21
|
trackEvent: {
|
|
22
22
|
category: "element";
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
25
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
25
26
|
appState: Readonly<AppState>;
|
|
26
|
-
elements:
|
|
27
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
27
28
|
commitToHistory: true;
|
|
28
29
|
};
|
|
29
|
-
keyTest: (event:
|
|
30
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
30
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
31
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
32
|
} & {
|
|
32
|
-
keyTest?: ((event:
|
|
33
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
33
34
|
};
|
|
34
35
|
export declare const actionAlignLeft: {
|
|
35
36
|
name: "alignLeft";
|
|
36
37
|
trackEvent: {
|
|
37
38
|
category: "element";
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
41
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
40
42
|
appState: Readonly<AppState>;
|
|
41
|
-
elements:
|
|
43
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
42
44
|
commitToHistory: true;
|
|
43
45
|
};
|
|
44
|
-
keyTest: (event:
|
|
45
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
46
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
47
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
46
48
|
} & {
|
|
47
|
-
keyTest?: ((event:
|
|
49
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
48
50
|
};
|
|
49
51
|
export declare const actionAlignRight: {
|
|
50
52
|
name: "alignRight";
|
|
51
53
|
trackEvent: {
|
|
52
54
|
category: "element";
|
|
53
55
|
};
|
|
54
|
-
|
|
56
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
57
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
55
58
|
appState: Readonly<AppState>;
|
|
56
|
-
elements:
|
|
59
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
57
60
|
commitToHistory: true;
|
|
58
61
|
};
|
|
59
|
-
keyTest: (event:
|
|
60
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
62
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
63
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
61
64
|
} & {
|
|
62
|
-
keyTest?: ((event:
|
|
65
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
63
66
|
};
|
|
64
67
|
export declare const actionAlignVerticallyCentered: {
|
|
65
68
|
name: "alignVerticallyCentered";
|
|
66
69
|
trackEvent: {
|
|
67
70
|
category: "element";
|
|
68
71
|
};
|
|
69
|
-
|
|
72
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
73
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
70
74
|
appState: Readonly<AppState>;
|
|
71
|
-
elements:
|
|
75
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
72
76
|
commitToHistory: true;
|
|
73
77
|
};
|
|
74
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
78
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
75
79
|
} & {
|
|
76
80
|
keyTest?: undefined;
|
|
77
81
|
};
|
|
@@ -80,12 +84,13 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
80
84
|
trackEvent: {
|
|
81
85
|
category: "element";
|
|
82
86
|
};
|
|
83
|
-
|
|
87
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
88
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
84
89
|
appState: Readonly<AppState>;
|
|
85
|
-
elements:
|
|
90
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
86
91
|
commitToHistory: true;
|
|
87
92
|
};
|
|
88
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
93
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
89
94
|
} & {
|
|
90
95
|
keyTest?: undefined;
|
|
91
96
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
3
2
|
import { AppState } from "../types";
|
|
3
|
+
import { Mutable } from "../utility-types";
|
|
4
4
|
export declare const actionUnbindText: {
|
|
5
5
|
name: "unbindText";
|
|
6
6
|
contextItemLabel: string;
|
|
7
7
|
trackEvent: {
|
|
8
8
|
category: "element";
|
|
9
9
|
};
|
|
10
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
11
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
10
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
11
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
12
12
|
elements: readonly ExcalidrawElement[];
|
|
13
13
|
appState: Readonly<AppState>;
|
|
14
14
|
commitToHistory: true;
|
|
@@ -22,8 +22,8 @@ export declare const actionBindText: {
|
|
|
22
22
|
trackEvent: {
|
|
23
23
|
category: "element";
|
|
24
24
|
};
|
|
25
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
26
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
25
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
26
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
27
27
|
elements: ExcalidrawElement[];
|
|
28
28
|
appState: {
|
|
29
29
|
selectedElementIds: {
|
|
@@ -37,6 +37,10 @@ export declare const actionBindText: {
|
|
|
37
37
|
showWelcomeScreen: boolean;
|
|
38
38
|
isLoading: boolean;
|
|
39
39
|
errorMessage: import("react").ReactNode;
|
|
40
|
+
activeEmbeddable: {
|
|
41
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
42
|
+
state: "active" | "hover";
|
|
43
|
+
} | null;
|
|
40
44
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
41
45
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
42
46
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -44,18 +48,21 @@ export declare const actionBindText: {
|
|
|
44
48
|
isBindingEnabled: boolean;
|
|
45
49
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
46
50
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
51
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
52
|
+
frameRendering: {
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
name: boolean;
|
|
55
|
+
outline: boolean;
|
|
56
|
+
clip: boolean;
|
|
57
|
+
};
|
|
58
|
+
editingFrame: string | null;
|
|
59
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
47
60
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
48
61
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
49
62
|
activeTool: {
|
|
50
|
-
lastActiveTool: import("../types").
|
|
63
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
51
64
|
locked: boolean;
|
|
52
|
-
} & (
|
|
53
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
54
|
-
customType: null;
|
|
55
|
-
} | {
|
|
56
|
-
type: "custom";
|
|
57
|
-
customType: string;
|
|
58
|
-
});
|
|
65
|
+
} & import("../types").ActiveTool;
|
|
59
66
|
penMode: boolean;
|
|
60
67
|
penDetected: boolean;
|
|
61
68
|
exportBackground: boolean;
|
|
@@ -96,8 +103,9 @@ export declare const actionBindText: {
|
|
|
96
103
|
defaultSidebarDockedPreference: boolean;
|
|
97
104
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
98
105
|
previousSelectedElementIds: {
|
|
99
|
-
[id: string]:
|
|
106
|
+
[id: string]: true;
|
|
100
107
|
};
|
|
108
|
+
selectedElementsAreBeingDragged: boolean;
|
|
101
109
|
shouldCacheIgnoreZoom: boolean;
|
|
102
110
|
toast: {
|
|
103
111
|
message: string;
|
|
@@ -105,7 +113,7 @@ export declare const actionBindText: {
|
|
|
105
113
|
duration?: number | undefined;
|
|
106
114
|
} | null;
|
|
107
115
|
zenModeEnabled: boolean;
|
|
108
|
-
theme:
|
|
116
|
+
theme: import("../element/types").Theme;
|
|
109
117
|
gridSize: number | null;
|
|
110
118
|
viewModeEnabled: boolean;
|
|
111
119
|
selectedGroupIds: {
|
|
@@ -128,8 +136,14 @@ export declare const actionBindText: {
|
|
|
128
136
|
data: import("../charts").Spreadsheet;
|
|
129
137
|
};
|
|
130
138
|
pendingImageElementId: string | null;
|
|
131
|
-
showHyperlinkPopup: false | "
|
|
139
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
132
140
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
141
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
142
|
+
originSnapOffset: {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
} | null;
|
|
146
|
+
objectsSnapModeEnabled: boolean;
|
|
133
147
|
};
|
|
134
148
|
commitToHistory: true;
|
|
135
149
|
};
|
|
@@ -142,13 +156,13 @@ export declare const actionWrapTextInContainer: {
|
|
|
142
156
|
trackEvent: {
|
|
143
157
|
category: "element";
|
|
144
158
|
};
|
|
145
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
146
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
159
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
160
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
147
161
|
elements: readonly ExcalidrawElement[];
|
|
148
162
|
appState: {
|
|
149
|
-
selectedElementIds: {
|
|
150
|
-
[id: string]:
|
|
151
|
-
}
|
|
163
|
+
selectedElementIds: Mutable<Readonly<{
|
|
164
|
+
[id: string]: true;
|
|
165
|
+
}>>;
|
|
152
166
|
contextMenu: {
|
|
153
167
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
154
168
|
top: number;
|
|
@@ -157,6 +171,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
157
171
|
showWelcomeScreen: boolean;
|
|
158
172
|
isLoading: boolean;
|
|
159
173
|
errorMessage: import("react").ReactNode;
|
|
174
|
+
activeEmbeddable: {
|
|
175
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
176
|
+
state: "active" | "hover";
|
|
177
|
+
} | null;
|
|
160
178
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
161
179
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
162
180
|
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
@@ -164,18 +182,21 @@ export declare const actionWrapTextInContainer: {
|
|
|
164
182
|
isBindingEnabled: boolean;
|
|
165
183
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
166
184
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
185
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
186
|
+
frameRendering: {
|
|
187
|
+
enabled: boolean;
|
|
188
|
+
name: boolean;
|
|
189
|
+
outline: boolean;
|
|
190
|
+
clip: boolean;
|
|
191
|
+
};
|
|
192
|
+
editingFrame: string | null;
|
|
193
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
167
194
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
168
195
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
169
196
|
activeTool: {
|
|
170
|
-
lastActiveTool: import("../types").
|
|
197
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
171
198
|
locked: boolean;
|
|
172
|
-
} & (
|
|
173
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
174
|
-
customType: null;
|
|
175
|
-
} | {
|
|
176
|
-
type: "custom";
|
|
177
|
-
customType: string;
|
|
178
|
-
});
|
|
199
|
+
} & import("../types").ActiveTool;
|
|
179
200
|
penMode: boolean;
|
|
180
201
|
penDetected: boolean;
|
|
181
202
|
exportBackground: boolean;
|
|
@@ -216,8 +237,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
216
237
|
defaultSidebarDockedPreference: boolean;
|
|
217
238
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
218
239
|
previousSelectedElementIds: {
|
|
219
|
-
[id: string]:
|
|
240
|
+
[id: string]: true;
|
|
220
241
|
};
|
|
242
|
+
selectedElementsAreBeingDragged: boolean;
|
|
221
243
|
shouldCacheIgnoreZoom: boolean;
|
|
222
244
|
toast: {
|
|
223
245
|
message: string;
|
|
@@ -225,7 +247,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
225
247
|
duration?: number | undefined;
|
|
226
248
|
} | null;
|
|
227
249
|
zenModeEnabled: boolean;
|
|
228
|
-
theme:
|
|
250
|
+
theme: import("../element/types").Theme;
|
|
229
251
|
gridSize: number | null;
|
|
230
252
|
viewModeEnabled: boolean;
|
|
231
253
|
selectedGroupIds: {
|
|
@@ -248,8 +270,14 @@ export declare const actionWrapTextInContainer: {
|
|
|
248
270
|
data: import("../charts").Spreadsheet;
|
|
249
271
|
};
|
|
250
272
|
pendingImageElementId: string | null;
|
|
251
|
-
showHyperlinkPopup: false | "
|
|
273
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
252
274
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
275
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
276
|
+
originSnapOffset: {
|
|
277
|
+
x: number;
|
|
278
|
+
y: number;
|
|
279
|
+
} | null;
|
|
280
|
+
objectsSnapModeEnabled: boolean;
|
|
253
281
|
};
|
|
254
282
|
commitToHistory: true;
|
|
255
283
|
};
|