@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
3
2
|
import { AppState } from "../types";
|
|
4
3
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
@@ -20,6 +19,10 @@ export declare const actionDeleteSelected: {
|
|
|
20
19
|
showWelcomeScreen: boolean;
|
|
21
20
|
isLoading: boolean;
|
|
22
21
|
errorMessage: import("react").ReactNode;
|
|
22
|
+
activeEmbeddable: {
|
|
23
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
24
|
+
state: "active" | "hover";
|
|
25
|
+
} | null;
|
|
23
26
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
24
27
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
25
28
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -27,17 +30,20 @@ export declare const actionDeleteSelected: {
|
|
|
27
30
|
isBindingEnabled: boolean;
|
|
28
31
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
29
32
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
33
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
34
|
+
frameRendering: {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
name: boolean;
|
|
37
|
+
outline: boolean;
|
|
38
|
+
clip: boolean;
|
|
39
|
+
};
|
|
40
|
+
editingFrame: string | null;
|
|
41
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
30
42
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
31
43
|
activeTool: {
|
|
32
|
-
lastActiveTool: import("../types").
|
|
44
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
33
45
|
locked: boolean;
|
|
34
|
-
} & (
|
|
35
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
36
|
-
customType: null;
|
|
37
|
-
} | {
|
|
38
|
-
type: "custom";
|
|
39
|
-
customType: string;
|
|
40
|
-
});
|
|
46
|
+
} & import("../types").ActiveTool;
|
|
41
47
|
penMode: boolean;
|
|
42
48
|
penDetected: boolean;
|
|
43
49
|
exportBackground: boolean;
|
|
@@ -77,12 +83,13 @@ export declare const actionDeleteSelected: {
|
|
|
77
83
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
78
84
|
defaultSidebarDockedPreference: boolean;
|
|
79
85
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
80
|
-
selectedElementIds: {
|
|
81
|
-
[id: string]:
|
|
82
|
-
}
|
|
86
|
+
selectedElementIds: Readonly<{
|
|
87
|
+
[id: string]: true;
|
|
88
|
+
}>;
|
|
83
89
|
previousSelectedElementIds: {
|
|
84
|
-
[id: string]:
|
|
90
|
+
[id: string]: true;
|
|
85
91
|
};
|
|
92
|
+
selectedElementsAreBeingDragged: boolean;
|
|
86
93
|
shouldCacheIgnoreZoom: boolean;
|
|
87
94
|
toast: {
|
|
88
95
|
message: string;
|
|
@@ -90,7 +97,7 @@ export declare const actionDeleteSelected: {
|
|
|
90
97
|
duration?: number | undefined;
|
|
91
98
|
} | null;
|
|
92
99
|
zenModeEnabled: boolean;
|
|
93
|
-
theme:
|
|
100
|
+
theme: import("../element/types").Theme;
|
|
94
101
|
gridSize: number | null;
|
|
95
102
|
viewModeEnabled: boolean;
|
|
96
103
|
selectedGroupIds: {
|
|
@@ -113,8 +120,14 @@ export declare const actionDeleteSelected: {
|
|
|
113
120
|
data: import("../charts").Spreadsheet;
|
|
114
121
|
};
|
|
115
122
|
pendingImageElementId: string | null;
|
|
116
|
-
showHyperlinkPopup: false | "
|
|
123
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
117
124
|
selectedLinearElement: LinearElementEditor | null;
|
|
125
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
126
|
+
originSnapOffset: {
|
|
127
|
+
x: number;
|
|
128
|
+
y: number;
|
|
129
|
+
} | null;
|
|
130
|
+
objectsSnapModeEnabled: boolean;
|
|
118
131
|
};
|
|
119
132
|
commitToHistory: false;
|
|
120
133
|
} | {
|
|
@@ -157,6 +170,10 @@ export declare const actionDeleteSelected: {
|
|
|
157
170
|
showWelcomeScreen: boolean;
|
|
158
171
|
isLoading: boolean;
|
|
159
172
|
errorMessage: import("react").ReactNode;
|
|
173
|
+
activeEmbeddable: {
|
|
174
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
175
|
+
state: "active" | "hover";
|
|
176
|
+
} | null;
|
|
160
177
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
161
178
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
162
179
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -164,17 +181,20 @@ export declare const actionDeleteSelected: {
|
|
|
164
181
|
isBindingEnabled: boolean;
|
|
165
182
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
166
183
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
184
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
185
|
+
frameRendering: {
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
name: boolean;
|
|
188
|
+
outline: boolean;
|
|
189
|
+
clip: boolean;
|
|
190
|
+
};
|
|
191
|
+
editingFrame: string | null;
|
|
192
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
167
193
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
168
194
|
activeTool: {
|
|
169
|
-
lastActiveTool: import("../types").
|
|
195
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
170
196
|
locked: boolean;
|
|
171
|
-
} & (
|
|
172
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
173
|
-
customType: null;
|
|
174
|
-
} | {
|
|
175
|
-
type: "custom";
|
|
176
|
-
customType: string;
|
|
177
|
-
});
|
|
197
|
+
} & import("../types").ActiveTool;
|
|
178
198
|
penMode: boolean;
|
|
179
199
|
penDetected: boolean;
|
|
180
200
|
exportBackground: boolean;
|
|
@@ -214,12 +234,13 @@ export declare const actionDeleteSelected: {
|
|
|
214
234
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
215
235
|
defaultSidebarDockedPreference: boolean;
|
|
216
236
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
217
|
-
selectedElementIds: {
|
|
218
|
-
[id: string]:
|
|
219
|
-
}
|
|
237
|
+
selectedElementIds: Readonly<{
|
|
238
|
+
[id: string]: true;
|
|
239
|
+
}>;
|
|
220
240
|
previousSelectedElementIds: {
|
|
221
|
-
[id: string]:
|
|
241
|
+
[id: string]: true;
|
|
222
242
|
};
|
|
243
|
+
selectedElementsAreBeingDragged: boolean;
|
|
223
244
|
shouldCacheIgnoreZoom: boolean;
|
|
224
245
|
toast: {
|
|
225
246
|
message: string;
|
|
@@ -227,7 +248,7 @@ export declare const actionDeleteSelected: {
|
|
|
227
248
|
duration?: number | undefined;
|
|
228
249
|
} | null;
|
|
229
250
|
zenModeEnabled: boolean;
|
|
230
|
-
theme:
|
|
251
|
+
theme: import("../element/types").Theme;
|
|
231
252
|
gridSize: number | null;
|
|
232
253
|
viewModeEnabled: boolean;
|
|
233
254
|
selectedGroupIds: {
|
|
@@ -250,24 +271,25 @@ export declare const actionDeleteSelected: {
|
|
|
250
271
|
data: import("../charts").Spreadsheet;
|
|
251
272
|
};
|
|
252
273
|
pendingImageElementId: string | null;
|
|
253
|
-
showHyperlinkPopup: false | "
|
|
274
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
254
275
|
selectedLinearElement: LinearElementEditor | null;
|
|
276
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
277
|
+
originSnapOffset: {
|
|
278
|
+
x: number;
|
|
279
|
+
y: number;
|
|
280
|
+
} | null;
|
|
281
|
+
objectsSnapModeEnabled: boolean;
|
|
255
282
|
};
|
|
256
283
|
commitToHistory: true;
|
|
257
284
|
} | {
|
|
258
285
|
elements: ExcalidrawElement[];
|
|
259
286
|
appState: {
|
|
260
287
|
activeTool: {
|
|
261
|
-
lastActiveTool: import("../types").
|
|
288
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
262
289
|
locked: boolean;
|
|
263
|
-
} & (
|
|
264
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
265
|
-
customType: null;
|
|
266
|
-
} | {
|
|
267
|
-
type: "custom";
|
|
268
|
-
customType: string;
|
|
269
|
-
});
|
|
290
|
+
} & import("../types").ActiveTool;
|
|
270
291
|
multiElement: null;
|
|
292
|
+
activeEmbeddable: null;
|
|
271
293
|
selectedElementIds: {};
|
|
272
294
|
contextMenu: {
|
|
273
295
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -283,6 +305,15 @@ export declare const actionDeleteSelected: {
|
|
|
283
305
|
isBindingEnabled: boolean;
|
|
284
306
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
285
307
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
308
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
309
|
+
frameRendering: {
|
|
310
|
+
enabled: boolean;
|
|
311
|
+
name: boolean;
|
|
312
|
+
outline: boolean;
|
|
313
|
+
clip: boolean;
|
|
314
|
+
};
|
|
315
|
+
editingFrame: string | null;
|
|
316
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
286
317
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
287
318
|
editingLinearElement: LinearElementEditor | null;
|
|
288
319
|
penMode: boolean;
|
|
@@ -325,8 +356,9 @@ export declare const actionDeleteSelected: {
|
|
|
325
356
|
defaultSidebarDockedPreference: boolean;
|
|
326
357
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
327
358
|
previousSelectedElementIds: {
|
|
328
|
-
[id: string]:
|
|
359
|
+
[id: string]: true;
|
|
329
360
|
};
|
|
361
|
+
selectedElementsAreBeingDragged: boolean;
|
|
330
362
|
shouldCacheIgnoreZoom: boolean;
|
|
331
363
|
toast: {
|
|
332
364
|
message: string;
|
|
@@ -334,7 +366,7 @@ export declare const actionDeleteSelected: {
|
|
|
334
366
|
duration?: number | undefined;
|
|
335
367
|
} | null;
|
|
336
368
|
zenModeEnabled: boolean;
|
|
337
|
-
theme:
|
|
369
|
+
theme: import("../element/types").Theme;
|
|
338
370
|
gridSize: number | null;
|
|
339
371
|
viewModeEnabled: boolean;
|
|
340
372
|
selectedGroupIds: {
|
|
@@ -357,14 +389,20 @@ export declare const actionDeleteSelected: {
|
|
|
357
389
|
data: import("../charts").Spreadsheet;
|
|
358
390
|
};
|
|
359
391
|
pendingImageElementId: string | null;
|
|
360
|
-
showHyperlinkPopup: false | "
|
|
392
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
361
393
|
selectedLinearElement: LinearElementEditor | null;
|
|
394
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
395
|
+
originSnapOffset: {
|
|
396
|
+
x: number;
|
|
397
|
+
y: number;
|
|
398
|
+
} | null;
|
|
399
|
+
objectsSnapModeEnabled: boolean;
|
|
362
400
|
};
|
|
363
401
|
commitToHistory: boolean;
|
|
364
402
|
};
|
|
365
403
|
contextItemLabel: string;
|
|
366
|
-
keyTest: (event:
|
|
404
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
367
405
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
368
406
|
} & {
|
|
369
|
-
keyTest?: ((event:
|
|
407
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
|
|
370
408
|
};
|
|
@@ -1,33 +1,32 @@
|
|
|
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 distributeHorizontally: {
|
|
5
4
|
name: "distributeHorizontally";
|
|
6
5
|
trackEvent: {
|
|
7
6
|
category: "element";
|
|
8
7
|
};
|
|
9
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
8
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
9
|
appState: Readonly<AppState>;
|
|
11
|
-
elements:
|
|
10
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
12
11
|
commitToHistory: true;
|
|
13
12
|
};
|
|
14
|
-
keyTest: (event:
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
13
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
14
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
15
|
} & {
|
|
17
|
-
keyTest?: ((event:
|
|
16
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
18
17
|
};
|
|
19
18
|
export declare const distributeVertically: {
|
|
20
19
|
name: "distributeVertically";
|
|
21
20
|
trackEvent: {
|
|
22
21
|
category: "element";
|
|
23
22
|
};
|
|
24
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
23
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
25
24
|
appState: Readonly<AppState>;
|
|
26
|
-
elements:
|
|
25
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
27
26
|
commitToHistory: true;
|
|
28
27
|
};
|
|
29
|
-
keyTest: (event:
|
|
30
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
28
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
29
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
30
|
} & {
|
|
32
|
-
keyTest?: ((event:
|
|
31
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
33
32
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
3
2
|
import { AppState } from "../types";
|
|
4
3
|
export declare const actionDuplicateSelection: {
|
|
@@ -15,8 +14,8 @@ export declare const actionDuplicateSelection: {
|
|
|
15
14
|
replaceFiles?: boolean | undefined;
|
|
16
15
|
};
|
|
17
16
|
contextItemLabel: string;
|
|
18
|
-
keyTest: (event:
|
|
17
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
19
18
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
20
19
|
} & {
|
|
21
|
-
keyTest?: ((event:
|
|
20
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
22
21
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
3
2
|
export declare const actionToggleElementLock: {
|
|
4
3
|
name: "toggleElementLock";
|
|
5
4
|
trackEvent: {
|
|
6
5
|
category: "element";
|
|
7
6
|
};
|
|
8
|
-
|
|
7
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
8
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
|
|
9
9
|
elements: ExcalidrawElement[];
|
|
10
10
|
appState: {
|
|
11
11
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
@@ -17,6 +17,10 @@ export declare const actionToggleElementLock: {
|
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
19
|
errorMessage: import("react").ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "active" | "hover";
|
|
23
|
+
} | null;
|
|
20
24
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
25
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
26
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -24,18 +28,21 @@ export declare const actionToggleElementLock: {
|
|
|
24
28
|
isBindingEnabled: boolean;
|
|
25
29
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
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<ExcalidrawElement>[] | null;
|
|
27
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
28
41
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
29
42
|
activeTool: {
|
|
30
|
-
lastActiveTool: import("../types").
|
|
43
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
31
44
|
locked: boolean;
|
|
32
|
-
} & (
|
|
33
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
34
|
-
customType: null;
|
|
35
|
-
} | {
|
|
36
|
-
type: "custom";
|
|
37
|
-
customType: string;
|
|
38
|
-
});
|
|
45
|
+
} & import("../types").ActiveTool;
|
|
39
46
|
penMode: boolean;
|
|
40
47
|
penDetected: boolean;
|
|
41
48
|
exportBackground: boolean;
|
|
@@ -75,12 +82,13 @@ export declare const actionToggleElementLock: {
|
|
|
75
82
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
76
83
|
defaultSidebarDockedPreference: boolean;
|
|
77
84
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
78
|
-
selectedElementIds: {
|
|
79
|
-
[id: string]:
|
|
80
|
-
}
|
|
85
|
+
selectedElementIds: Readonly<{
|
|
86
|
+
[id: string]: true;
|
|
87
|
+
}>;
|
|
81
88
|
previousSelectedElementIds: {
|
|
82
|
-
[id: string]:
|
|
89
|
+
[id: string]: true;
|
|
83
90
|
};
|
|
91
|
+
selectedElementsAreBeingDragged: boolean;
|
|
84
92
|
shouldCacheIgnoreZoom: boolean;
|
|
85
93
|
toast: {
|
|
86
94
|
message: string;
|
|
@@ -88,7 +96,7 @@ export declare const actionToggleElementLock: {
|
|
|
88
96
|
duration?: number | undefined;
|
|
89
97
|
} | null;
|
|
90
98
|
zenModeEnabled: boolean;
|
|
91
|
-
theme:
|
|
99
|
+
theme: import("../element/types").Theme;
|
|
92
100
|
gridSize: number | null;
|
|
93
101
|
viewModeEnabled: boolean;
|
|
94
102
|
selectedGroupIds: {
|
|
@@ -111,14 +119,20 @@ export declare const actionToggleElementLock: {
|
|
|
111
119
|
data: import("../charts").Spreadsheet;
|
|
112
120
|
};
|
|
113
121
|
pendingImageElementId: string | null;
|
|
114
|
-
showHyperlinkPopup: false | "
|
|
122
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
123
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
124
|
+
originSnapOffset: {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
} | null;
|
|
128
|
+
objectsSnapModeEnabled: boolean;
|
|
115
129
|
};
|
|
116
130
|
commitToHistory: true;
|
|
117
131
|
};
|
|
118
|
-
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
119
|
-
keyTest: (event:
|
|
132
|
+
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
133
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
120
134
|
} & {
|
|
121
|
-
keyTest?: ((event:
|
|
135
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
|
|
122
136
|
};
|
|
123
137
|
export declare const actionUnlockAllElements: {
|
|
124
138
|
name: "unlockAllElements";
|
|
@@ -141,6 +155,10 @@ export declare const actionUnlockAllElements: {
|
|
|
141
155
|
showWelcomeScreen: boolean;
|
|
142
156
|
isLoading: boolean;
|
|
143
157
|
errorMessage: import("react").ReactNode;
|
|
158
|
+
activeEmbeddable: {
|
|
159
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
160
|
+
state: "active" | "hover";
|
|
161
|
+
} | null;
|
|
144
162
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
145
163
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
146
164
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -148,18 +166,21 @@ export declare const actionUnlockAllElements: {
|
|
|
148
166
|
isBindingEnabled: boolean;
|
|
149
167
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
150
168
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
169
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
170
|
+
frameRendering: {
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
name: boolean;
|
|
173
|
+
outline: boolean;
|
|
174
|
+
clip: boolean;
|
|
175
|
+
};
|
|
176
|
+
editingFrame: string | null;
|
|
177
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
151
178
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
152
179
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
153
180
|
activeTool: {
|
|
154
|
-
lastActiveTool: import("../types").
|
|
181
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
155
182
|
locked: boolean;
|
|
156
|
-
} & (
|
|
157
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
158
|
-
customType: null;
|
|
159
|
-
} | {
|
|
160
|
-
type: "custom";
|
|
161
|
-
customType: string;
|
|
162
|
-
});
|
|
183
|
+
} & import("../types").ActiveTool;
|
|
163
184
|
penMode: boolean;
|
|
164
185
|
penDetected: boolean;
|
|
165
186
|
exportBackground: boolean;
|
|
@@ -200,8 +221,9 @@ export declare const actionUnlockAllElements: {
|
|
|
200
221
|
defaultSidebarDockedPreference: boolean;
|
|
201
222
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
202
223
|
previousSelectedElementIds: {
|
|
203
|
-
[id: string]:
|
|
224
|
+
[id: string]: true;
|
|
204
225
|
};
|
|
226
|
+
selectedElementsAreBeingDragged: boolean;
|
|
205
227
|
shouldCacheIgnoreZoom: boolean;
|
|
206
228
|
toast: {
|
|
207
229
|
message: string;
|
|
@@ -209,7 +231,7 @@ export declare const actionUnlockAllElements: {
|
|
|
209
231
|
duration?: number | undefined;
|
|
210
232
|
} | null;
|
|
211
233
|
zenModeEnabled: boolean;
|
|
212
|
-
theme:
|
|
234
|
+
theme: import("../element/types").Theme;
|
|
213
235
|
gridSize: number | null;
|
|
214
236
|
viewModeEnabled: boolean;
|
|
215
237
|
selectedGroupIds: {
|
|
@@ -232,8 +254,14 @@ export declare const actionUnlockAllElements: {
|
|
|
232
254
|
data: import("../charts").Spreadsheet;
|
|
233
255
|
};
|
|
234
256
|
pendingImageElementId: string | null;
|
|
235
|
-
showHyperlinkPopup: false | "
|
|
257
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
236
258
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
259
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
260
|
+
originSnapOffset: {
|
|
261
|
+
x: number;
|
|
262
|
+
y: number;
|
|
263
|
+
} | null;
|
|
264
|
+
objectsSnapModeEnabled: boolean;
|
|
237
265
|
};
|
|
238
266
|
commitToHistory: true;
|
|
239
267
|
};
|