@dwelle/excalidraw 0.4.0-c863147 → 0.4.0-c8d325d
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 +22 -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 +2103 -1697
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +15 -0
- package/package.json +7 -2
- package/types/actions/actionAddToLibrary.d.ts +63 -22
- package/types/actions/actionAlign.d.ts +25 -20
- package/types/actions/actionBoundText.d.ts +46 -18
- package/types/actions/actionCanvas.d.ts +350 -78
- package/types/actions/actionClipboard.d.ts +101 -35
- package/types/actions/actionDeleteSelected.d.ts +57 -19
- package/types/actions/actionDistribute.d.ts +7 -8
- package/types/actions/actionDuplicateSelection.d.ts +0 -1
- package/types/actions/actionElementLock.d.ts +44 -16
- package/types/actions/actionExport.d.ts +198 -72
- package/types/actions/actionFinalize.d.ts +40 -16
- package/types/actions/actionFlip.d.ts +4 -5
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +246 -9
- package/types/actions/actionLinearEditor.d.ts +23 -10
- package/types/actions/actionMenu.d.ts +64 -24
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +273 -92
- package/types/actions/actionSelectAll.d.ts +121 -2
- package/types/actions/actionStyles.d.ts +21 -8
- package/types/actions/actionToggleGridMode.d.ts +21 -8
- package/types/actions/actionToggleStats.d.ts +21 -8
- package/types/actions/actionToggleViewMode.d.ts +21 -8
- package/types/actions/actionToggleZenMode.d.ts +21 -8
- package/types/actions/actionZindex.d.ts +4 -4
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/types.d.ts +4 -3
- package/types/appState.d.ts +9 -9
- package/types/clients.d.ts +1 -5
- package/types/clipboard.d.ts +1 -0
- package/types/colors.d.ts +10 -9
- package/types/components/Actions.d.ts +2 -2
- package/types/components/ActiveConfirmDialog.d.ts +1 -21
- package/types/components/App.d.ts +48 -13
- 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 +1 -1
- package/types/components/ColorPicker/ColorPicker.d.ts +3 -2
- package/types/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/types/components/ColorPicker/Picker.d.ts +4 -2
- package/types/components/ColorPicker/PickerColorList.d.ts +1 -1
- package/types/components/ColorPicker/ShadeList.d.ts +1 -1
- package/types/components/ColorPicker/TopPicks.d.ts +1 -1
- package/types/components/ColorPicker/colorPickerUtils.d.ts +4 -24
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +8 -4
- package/types/components/DefaultSidebar.d.ts +0 -1
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/EyeDropper.d.ts +17 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/HintViewer.d.ts +3 -4
- package/types/components/ImageExportDialog.d.ts +3 -4
- package/types/components/JSONExportDialog.d.ts +1 -1
- package/types/components/LayerUI.d.ts +4 -2
- package/types/components/LibraryMenu.d.ts +5 -23
- package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
- package/types/components/LibraryMenuItems.d.ts +3 -1
- package/types/components/LibraryMenuSection.d.ts +9 -3
- package/types/components/LibraryUnit.d.ts +5 -2
- 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/ProjectName.d.ts +1 -0
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/Sidebar.d.ts +1 -21
- 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 +3 -2
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +2 -1
- package/types/components/Trans.d.ts +2 -1
- package/types/components/canvases/InteractiveCanvas.d.ts +26 -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 +3 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/types/components/icons.d.ts +11 -0
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/main-menu/MainMenu.d.ts +3 -2
- 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 +32 -8
- package/types/context/tunnels.d.ts +1 -0
- package/types/data/index.d.ts +1 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/transform.d.ts +71 -0
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +31 -14
- package/types/element/binding.d.ts +2 -1
- package/types/element/bounds.d.ts +31 -6
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +2 -1
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +25 -12
- package/types/element/newElement.d.ts +15 -6
- 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 +14 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +9 -23
- package/types/hooks/useOutsideClick.d.ts +19 -2
- package/types/hooks/useScrollPosition.d.ts +1 -0
- package/types/i18n.d.ts +5 -2
- package/types/jotai.d.ts +16 -104
- package/types/keys.d.ts +3 -0
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +2 -0
- 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 +26 -26
- package/types/renderer/renderElement.d.ts +15 -19
- package/types/renderer/renderScene.d.ts +19 -27
- 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/ShapeCache.d.ts +24 -0
- package/types/scene/export.d.ts +11 -152
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +25 -5
- package/types/scene/types.d.ts +43 -32
- package/types/types.d.ts +89 -11
- package/types/utility-types.d.ts +3 -1
- package/types/utils.d.ts +58 -20
- 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
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -29,3 +35,12 @@
|
|
|
29
35
|
* This source code is licensed under the MIT license found in the
|
|
30
36
|
* LICENSE file in the root directory of this source tree.
|
|
31
37
|
*/
|
|
38
|
+
|
|
39
|
+
/** @license React v17.0.2
|
|
40
|
+
* react-jsx-runtime.production.min.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
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-c8d325d",
|
|
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": "8.2.6",
|
|
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": "8.2.4",
|
|
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,13 +28,22 @@ 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
43
|
lastActiveTool: import("../types").LastActiveTool;
|
|
32
44
|
locked: boolean;
|
|
33
45
|
} & ({
|
|
34
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
46
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
35
47
|
customType: null;
|
|
36
48
|
} | {
|
|
37
49
|
type: "custom";
|
|
@@ -76,15 +88,16 @@ export declare const actionAddToLibrary: {
|
|
|
76
88
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
77
89
|
defaultSidebarDockedPreference: boolean;
|
|
78
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
79
|
-
selectedElementIds: {
|
|
80
|
-
[id: string]:
|
|
81
|
-
}
|
|
91
|
+
selectedElementIds: Readonly<{
|
|
92
|
+
[id: string]: true;
|
|
93
|
+
}>;
|
|
82
94
|
previousSelectedElementIds: {
|
|
83
|
-
[id: string]:
|
|
95
|
+
[id: string]: true;
|
|
84
96
|
};
|
|
97
|
+
selectedElementsAreBeingDragged: boolean;
|
|
85
98
|
shouldCacheIgnoreZoom: boolean;
|
|
86
99
|
zenModeEnabled: boolean;
|
|
87
|
-
theme:
|
|
100
|
+
theme: import("../element/types").Theme;
|
|
88
101
|
gridSize: number | null;
|
|
89
102
|
viewModeEnabled: boolean;
|
|
90
103
|
selectedGroupIds: {
|
|
@@ -107,7 +120,7 @@ export declare const actionAddToLibrary: {
|
|
|
107
120
|
data: import("../charts").Spreadsheet;
|
|
108
121
|
};
|
|
109
122
|
pendingImageElementId: string | null;
|
|
110
|
-
showHyperlinkPopup: false | "
|
|
123
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
111
124
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
112
125
|
};
|
|
113
126
|
} | {
|
|
@@ -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,13 +145,22 @@ 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
160
|
lastActiveTool: import("../types").LastActiveTool;
|
|
135
161
|
locked: boolean;
|
|
136
162
|
} & ({
|
|
137
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
163
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
138
164
|
customType: null;
|
|
139
165
|
} | {
|
|
140
166
|
type: "custom";
|
|
@@ -179,12 +205,13 @@ export declare const actionAddToLibrary: {
|
|
|
179
205
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
180
206
|
defaultSidebarDockedPreference: boolean;
|
|
181
207
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
182
|
-
selectedElementIds: {
|
|
183
|
-
[id: string]:
|
|
184
|
-
}
|
|
208
|
+
selectedElementIds: Readonly<{
|
|
209
|
+
[id: string]: true;
|
|
210
|
+
}>;
|
|
185
211
|
previousSelectedElementIds: {
|
|
186
|
-
[id: string]:
|
|
212
|
+
[id: string]: true;
|
|
187
213
|
};
|
|
214
|
+
selectedElementsAreBeingDragged: boolean;
|
|
188
215
|
shouldCacheIgnoreZoom: boolean;
|
|
189
216
|
toast: {
|
|
190
217
|
message: string;
|
|
@@ -192,7 +219,7 @@ export declare const actionAddToLibrary: {
|
|
|
192
219
|
duration?: number | undefined;
|
|
193
220
|
} | null;
|
|
194
221
|
zenModeEnabled: boolean;
|
|
195
|
-
theme:
|
|
222
|
+
theme: import("../element/types").Theme;
|
|
196
223
|
gridSize: number | null;
|
|
197
224
|
viewModeEnabled: boolean;
|
|
198
225
|
selectedGroupIds: {
|
|
@@ -215,7 +242,7 @@ export declare const actionAddToLibrary: {
|
|
|
215
242
|
data: import("../charts").Spreadsheet;
|
|
216
243
|
};
|
|
217
244
|
pendingImageElementId: string | null;
|
|
218
|
-
showHyperlinkPopup: false | "
|
|
245
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
219
246
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
220
247
|
};
|
|
221
248
|
}> | {
|
|
@@ -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,13 +267,22 @@ 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
282
|
lastActiveTool: import("../types").LastActiveTool;
|
|
243
283
|
locked: boolean;
|
|
244
284
|
} & ({
|
|
245
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
285
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
246
286
|
customType: null;
|
|
247
287
|
} | {
|
|
248
288
|
type: "custom";
|
|
@@ -287,12 +327,13 @@ export declare const actionAddToLibrary: {
|
|
|
287
327
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
288
328
|
defaultSidebarDockedPreference: boolean;
|
|
289
329
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
290
|
-
selectedElementIds: {
|
|
291
|
-
[id: string]:
|
|
292
|
-
}
|
|
330
|
+
selectedElementIds: Readonly<{
|
|
331
|
+
[id: string]: true;
|
|
332
|
+
}>;
|
|
293
333
|
previousSelectedElementIds: {
|
|
294
|
-
[id: string]:
|
|
334
|
+
[id: string]: true;
|
|
295
335
|
};
|
|
336
|
+
selectedElementsAreBeingDragged: boolean;
|
|
296
337
|
shouldCacheIgnoreZoom: boolean;
|
|
297
338
|
toast: {
|
|
298
339
|
message: string;
|
|
@@ -300,7 +341,7 @@ export declare const actionAddToLibrary: {
|
|
|
300
341
|
duration?: number | undefined;
|
|
301
342
|
} | null;
|
|
302
343
|
zenModeEnabled: boolean;
|
|
303
|
-
theme:
|
|
344
|
+
theme: import("../element/types").Theme;
|
|
304
345
|
gridSize: number | null;
|
|
305
346
|
viewModeEnabled: boolean;
|
|
306
347
|
selectedGroupIds: {
|
|
@@ -323,7 +364,7 @@ export declare const actionAddToLibrary: {
|
|
|
323
364
|
data: import("../charts").Spreadsheet;
|
|
324
365
|
};
|
|
325
366
|
pendingImageElementId: string | null;
|
|
326
|
-
showHyperlinkPopup: false | "
|
|
367
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
327
368
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
328
369
|
};
|
|
329
370
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
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
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
15
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
17
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
18
|
};
|
|
@@ -21,13 +21,14 @@ export declare const actionAlignBottom: {
|
|
|
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
30
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
30
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
32
|
} & {
|
|
32
33
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
33
34
|
};
|
|
@@ -36,13 +37,14 @@ export declare const actionAlignLeft: {
|
|
|
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
46
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
45
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
47
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
46
48
|
} & {
|
|
47
49
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
48
50
|
};
|
|
@@ -51,13 +53,14 @@ export declare const actionAlignRight: {
|
|
|
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
62
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
60
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
63
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
61
64
|
} & {
|
|
62
65
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
63
66
|
};
|
|
@@ -66,12 +69,13 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
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,13 +48,22 @@ 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
63
|
lastActiveTool: import("../types").LastActiveTool;
|
|
51
64
|
locked: boolean;
|
|
52
65
|
} & ({
|
|
53
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
66
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
54
67
|
customType: null;
|
|
55
68
|
} | {
|
|
56
69
|
type: "custom";
|
|
@@ -96,8 +109,9 @@ export declare const actionBindText: {
|
|
|
96
109
|
defaultSidebarDockedPreference: boolean;
|
|
97
110
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
98
111
|
previousSelectedElementIds: {
|
|
99
|
-
[id: string]:
|
|
112
|
+
[id: string]: true;
|
|
100
113
|
};
|
|
114
|
+
selectedElementsAreBeingDragged: boolean;
|
|
101
115
|
shouldCacheIgnoreZoom: boolean;
|
|
102
116
|
toast: {
|
|
103
117
|
message: string;
|
|
@@ -105,7 +119,7 @@ export declare const actionBindText: {
|
|
|
105
119
|
duration?: number | undefined;
|
|
106
120
|
} | null;
|
|
107
121
|
zenModeEnabled: boolean;
|
|
108
|
-
theme:
|
|
122
|
+
theme: import("../element/types").Theme;
|
|
109
123
|
gridSize: number | null;
|
|
110
124
|
viewModeEnabled: boolean;
|
|
111
125
|
selectedGroupIds: {
|
|
@@ -128,7 +142,7 @@ export declare const actionBindText: {
|
|
|
128
142
|
data: import("../charts").Spreadsheet;
|
|
129
143
|
};
|
|
130
144
|
pendingImageElementId: string | null;
|
|
131
|
-
showHyperlinkPopup: false | "
|
|
145
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
132
146
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
133
147
|
};
|
|
134
148
|
commitToHistory: true;
|
|
@@ -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,13 +182,22 @@ 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
197
|
lastActiveTool: import("../types").LastActiveTool;
|
|
171
198
|
locked: boolean;
|
|
172
199
|
} & ({
|
|
173
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
200
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
174
201
|
customType: null;
|
|
175
202
|
} | {
|
|
176
203
|
type: "custom";
|
|
@@ -216,8 +243,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
216
243
|
defaultSidebarDockedPreference: boolean;
|
|
217
244
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
218
245
|
previousSelectedElementIds: {
|
|
219
|
-
[id: string]:
|
|
246
|
+
[id: string]: true;
|
|
220
247
|
};
|
|
248
|
+
selectedElementsAreBeingDragged: boolean;
|
|
221
249
|
shouldCacheIgnoreZoom: boolean;
|
|
222
250
|
toast: {
|
|
223
251
|
message: string;
|
|
@@ -225,7 +253,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
225
253
|
duration?: number | undefined;
|
|
226
254
|
} | null;
|
|
227
255
|
zenModeEnabled: boolean;
|
|
228
|
-
theme:
|
|
256
|
+
theme: import("../element/types").Theme;
|
|
229
257
|
gridSize: number | null;
|
|
230
258
|
viewModeEnabled: boolean;
|
|
231
259
|
selectedGroupIds: {
|
|
@@ -248,7 +276,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
248
276
|
data: import("../charts").Spreadsheet;
|
|
249
277
|
};
|
|
250
278
|
pendingImageElementId: string | null;
|
|
251
|
-
showHyperlinkPopup: false | "
|
|
279
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
252
280
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
253
281
|
};
|
|
254
282
|
commitToHistory: true;
|