@dwelle/excalidraw 0.4.0-d68dd48 → 0.4.0-e03b600
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 +30 -0
- package/README.md +4 -0
- package/dist/excalidraw.development.js +1314 -248
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +36 -12
- package/types/actions/actionAlign.d.ts +6 -0
- package/types/actions/actionBoundText.d.ts +24 -8
- package/types/actions/actionCanvas.d.ts +235 -41
- package/types/actions/actionClipboard.d.ts +60 -20
- package/types/actions/actionDeleteSelected.d.ts +36 -12
- package/types/actions/actionElementLock.d.ts +254 -0
- package/types/actions/actionExport.d.ts +109 -37
- package/types/actions/actionFinalize.d.ts +24 -8
- package/types/actions/actionFlip.d.ts +2 -4
- package/types/actions/actionFrame.d.ts +397 -0
- package/types/actions/actionGroup.d.ts +2 -2
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +12 -4
- package/types/actions/actionMenu.d.ts +37 -14
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +158 -54
- package/types/actions/actionStyles.d.ts +12 -4
- package/types/actions/actionToggleGridMode.d.ts +12 -4
- package/types/actions/actionToggleStats.d.ts +12 -4
- package/types/actions/actionToggleViewMode.d.ts +12 -4
- package/types/actions/actionToggleZenMode.d.ts +12 -4
- package/types/actions/actionZindex.d.ts +4 -4
- package/types/actions/index.d.ts +1 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +7 -7
- package/types/appState.d.ts +6 -3
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +2 -2
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +5 -5
- package/types/components/ActiveConfirmDialog.d.ts +1 -21
- package/types/components/App.d.ts +32 -9
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/Button.d.ts +3 -1
- package/types/components/ColorPicker/ColorInput.d.ts +7 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
- package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
- package/types/components/ColorPicker/Picker.d.ts +18 -0
- package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/types/components/ColorPicker/ShadeList.d.ts +8 -0
- package/types/components/ColorPicker/TopPicks.d.ts +9 -0
- package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +30 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/EyeDropper.d.ts +18 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +1 -1
- package/types/components/HelpButton.d.ts +1 -1
- package/types/components/HintViewer.d.ts +2 -2
- package/types/components/HomeButton.d.ts +1 -1
- package/types/components/ImageExportDialog.d.ts +8 -13
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +4 -4
- package/types/components/LayerUI.d.ts +4 -10
- package/types/components/LibraryMenu.d.ts +13 -14
- package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
- package/types/components/LibraryMenuControlButtons.d.ts +9 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +11 -28
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +7 -3
- package/types/components/LockButton.d.ts +1 -1
- package/types/components/MobileMenu.d.ts +4 -4
- 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/PasteChartDialog.d.ts +4 -5
- package/types/components/PenModeButton.d.ts +1 -1
- package/types/components/Popover.d.ts +1 -1
- package/types/components/ProjectName.d.ts +2 -1
- package/types/components/PublishLibrary.d.ts +2 -2
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Sidebar/Sidebar.d.ts +66 -63
- package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
- package/types/components/Sidebar/SidebarTab.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +7 -0
- package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
- package/types/components/Sidebar/common.d.ts +24 -7
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +4 -3
- package/types/components/Stats.d.ts +3 -3
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +5 -4
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +8 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +4 -2
- package/types/components/footer/Footer.d.ts +2 -2
- package/types/components/icons.d.ts +11 -1
- package/types/components/main-menu/MainMenu.d.ts +3 -2
- package/types/constants.d.ts +42 -6
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/data/blob.d.ts +2 -2
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +2 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +2 -2
- package/types/data/types.d.ts +3 -5
- package/types/element/Hyperlink.d.ts +14 -6
- package/types/element/binding.d.ts +3 -3
- 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/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +13 -5
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +10 -3
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/textElement.d.ts +3 -2
- package/types/element/transformHandles.d.ts +12 -5
- package/types/element/typeChecks.d.ts +2 -1
- package/types/element/types.d.ts +40 -35
- package/types/emitter.d.ts +1 -1
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +40 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +4 -0
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -1
- package/types/hooks/useScrollPosition.d.ts +2 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +2 -2
- package/types/jotai.d.ts +16 -104
- package/types/keys.d.ts +2 -1
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +6 -0
- package/types/packages/excalidraw/index.d.ts +2 -1
- package/types/packages/utils.d.ts +2 -2
- package/types/renderer/renderElement.d.ts +4 -3
- package/types/renderer/renderScene.d.ts +12 -3
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Scene.d.ts +12 -5
- package/types/scene/export.d.ts +3 -2
- package/types/scene/selection.d.ts +15 -5
- package/types/scene/types.d.ts +4 -4
- package/types/types.d.ts +91 -52
- package/types/utility-types.d.ts +13 -13
- package/types/utils.d.ts +20 -25
- package/types/zindex.d.ts +4 -4
- package/types/actions/actionToggleLock.d.ts +0 -119
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/context/tunnels.d.ts +0 -16
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
|
@@ -9,7 +9,7 @@ export declare const actionChangeViewBackgroundColor: {
|
|
|
9
9
|
appState: any;
|
|
10
10
|
commitToHistory: boolean;
|
|
11
11
|
};
|
|
12
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
12
|
+
PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
|
|
13
13
|
} & {
|
|
14
14
|
keyTest?: undefined;
|
|
15
15
|
};
|
|
@@ -41,7 +41,7 @@ export declare const actionClearCanvas: {
|
|
|
41
41
|
lastActiveTool: import("../types").LastActiveTool;
|
|
42
42
|
locked: boolean;
|
|
43
43
|
} & ({
|
|
44
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
44
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
45
45
|
customType: null;
|
|
46
46
|
} | {
|
|
47
47
|
type: "custom";
|
|
@@ -63,6 +63,10 @@ export declare const actionClearCanvas: {
|
|
|
63
63
|
isBindingEnabled: boolean;
|
|
64
64
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
65
65
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
66
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
67
|
+
shouldRenderFrames: boolean;
|
|
68
|
+
editingFrame: string | null;
|
|
69
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
66
70
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
67
71
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
68
72
|
exportWithDarkMode: boolean;
|
|
@@ -91,10 +95,13 @@ export declare const actionClearCanvas: {
|
|
|
91
95
|
value: NormalizedZoomValue;
|
|
92
96
|
}>;
|
|
93
97
|
openMenu: "canvas" | "shape" | null;
|
|
94
|
-
openPopup: "
|
|
95
|
-
openSidebar:
|
|
98
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
99
|
+
openSidebar: {
|
|
100
|
+
name: string;
|
|
101
|
+
tab?: string | undefined;
|
|
102
|
+
} | null;
|
|
96
103
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
97
|
-
|
|
104
|
+
defaultSidebarDockedPreference: boolean;
|
|
98
105
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
99
106
|
selectedElementIds: {
|
|
100
107
|
[id: string]: boolean;
|
|
@@ -102,6 +109,7 @@ export declare const actionClearCanvas: {
|
|
|
102
109
|
previousSelectedElementIds: {
|
|
103
110
|
[id: string]: boolean;
|
|
104
111
|
};
|
|
112
|
+
selectedElementsAreBeingDragged: boolean;
|
|
105
113
|
shouldCacheIgnoreZoom: boolean;
|
|
106
114
|
toast: {
|
|
107
115
|
message: string;
|
|
@@ -154,13 +162,17 @@ export declare const actionZoomIn: {
|
|
|
154
162
|
isBindingEnabled: boolean;
|
|
155
163
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
156
164
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
165
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
166
|
+
shouldRenderFrames: boolean;
|
|
167
|
+
editingFrame: string | null;
|
|
168
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
157
169
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
158
170
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
159
171
|
activeTool: {
|
|
160
172
|
lastActiveTool: import("../types").LastActiveTool;
|
|
161
173
|
locked: boolean;
|
|
162
174
|
} & ({
|
|
163
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
175
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
164
176
|
customType: null;
|
|
165
177
|
} | {
|
|
166
178
|
type: "custom";
|
|
@@ -192,10 +204,13 @@ export declare const actionZoomIn: {
|
|
|
192
204
|
isResizing: boolean;
|
|
193
205
|
isRotating: boolean;
|
|
194
206
|
openMenu: "canvas" | "shape" | null;
|
|
195
|
-
openPopup: "
|
|
196
|
-
openSidebar:
|
|
207
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
208
|
+
openSidebar: {
|
|
209
|
+
name: string;
|
|
210
|
+
tab?: string | undefined;
|
|
211
|
+
} | null;
|
|
197
212
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
198
|
-
|
|
213
|
+
defaultSidebarDockedPreference: boolean;
|
|
199
214
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
200
215
|
selectedElementIds: {
|
|
201
216
|
[id: string]: boolean;
|
|
@@ -203,6 +218,7 @@ export declare const actionZoomIn: {
|
|
|
203
218
|
previousSelectedElementIds: {
|
|
204
219
|
[id: string]: boolean;
|
|
205
220
|
};
|
|
221
|
+
selectedElementsAreBeingDragged: boolean;
|
|
206
222
|
shouldCacheIgnoreZoom: boolean;
|
|
207
223
|
toast: {
|
|
208
224
|
message: string;
|
|
@@ -271,13 +287,17 @@ export declare const actionZoomOut: {
|
|
|
271
287
|
isBindingEnabled: boolean;
|
|
272
288
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
273
289
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
290
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
291
|
+
shouldRenderFrames: boolean;
|
|
292
|
+
editingFrame: string | null;
|
|
293
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
274
294
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
275
295
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
276
296
|
activeTool: {
|
|
277
297
|
lastActiveTool: import("../types").LastActiveTool;
|
|
278
298
|
locked: boolean;
|
|
279
299
|
} & ({
|
|
280
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
300
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
281
301
|
customType: null;
|
|
282
302
|
} | {
|
|
283
303
|
type: "custom";
|
|
@@ -309,10 +329,13 @@ export declare const actionZoomOut: {
|
|
|
309
329
|
isResizing: boolean;
|
|
310
330
|
isRotating: boolean;
|
|
311
331
|
openMenu: "canvas" | "shape" | null;
|
|
312
|
-
openPopup: "
|
|
313
|
-
openSidebar:
|
|
332
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
333
|
+
openSidebar: {
|
|
334
|
+
name: string;
|
|
335
|
+
tab?: string | undefined;
|
|
336
|
+
} | null;
|
|
314
337
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
315
|
-
|
|
338
|
+
defaultSidebarDockedPreference: boolean;
|
|
316
339
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
317
340
|
selectedElementIds: {
|
|
318
341
|
[id: string]: boolean;
|
|
@@ -320,6 +343,7 @@ export declare const actionZoomOut: {
|
|
|
320
343
|
previousSelectedElementIds: {
|
|
321
344
|
[id: string]: boolean;
|
|
322
345
|
};
|
|
346
|
+
selectedElementsAreBeingDragged: boolean;
|
|
323
347
|
shouldCacheIgnoreZoom: boolean;
|
|
324
348
|
toast: {
|
|
325
349
|
message: string;
|
|
@@ -388,13 +412,17 @@ export declare const actionResetZoom: {
|
|
|
388
412
|
isBindingEnabled: boolean;
|
|
389
413
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
390
414
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
415
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
416
|
+
shouldRenderFrames: boolean;
|
|
417
|
+
editingFrame: string | null;
|
|
418
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
391
419
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
392
420
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
393
421
|
activeTool: {
|
|
394
422
|
lastActiveTool: import("../types").LastActiveTool;
|
|
395
423
|
locked: boolean;
|
|
396
424
|
} & ({
|
|
397
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
425
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
398
426
|
customType: null;
|
|
399
427
|
} | {
|
|
400
428
|
type: "custom";
|
|
@@ -426,10 +454,13 @@ export declare const actionResetZoom: {
|
|
|
426
454
|
isResizing: boolean;
|
|
427
455
|
isRotating: boolean;
|
|
428
456
|
openMenu: "canvas" | "shape" | null;
|
|
429
|
-
openPopup: "
|
|
430
|
-
openSidebar:
|
|
457
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
458
|
+
openSidebar: {
|
|
459
|
+
name: string;
|
|
460
|
+
tab?: string | undefined;
|
|
461
|
+
} | null;
|
|
431
462
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
432
|
-
|
|
463
|
+
defaultSidebarDockedPreference: boolean;
|
|
433
464
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
434
465
|
selectedElementIds: {
|
|
435
466
|
[id: string]: boolean;
|
|
@@ -437,6 +468,7 @@ export declare const actionResetZoom: {
|
|
|
437
468
|
previousSelectedElementIds: {
|
|
438
469
|
[id: string]: boolean;
|
|
439
470
|
};
|
|
471
|
+
selectedElementsAreBeingDragged: boolean;
|
|
440
472
|
shouldCacheIgnoreZoom: boolean;
|
|
441
473
|
toast: {
|
|
442
474
|
message: string;
|
|
@@ -499,13 +531,131 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
499
531
|
isBindingEnabled: boolean;
|
|
500
532
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
501
533
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
534
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
535
|
+
shouldRenderFrames: boolean;
|
|
536
|
+
editingFrame: string | null;
|
|
537
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
538
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
539
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
540
|
+
activeTool: {
|
|
541
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
542
|
+
locked: boolean;
|
|
543
|
+
} & ({
|
|
544
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
545
|
+
customType: null;
|
|
546
|
+
} | {
|
|
547
|
+
type: "custom";
|
|
548
|
+
customType: string;
|
|
549
|
+
});
|
|
550
|
+
penMode: boolean;
|
|
551
|
+
penDetected: boolean;
|
|
552
|
+
exportBackground: boolean;
|
|
553
|
+
exportEmbedScene: boolean;
|
|
554
|
+
exportWithDarkMode: boolean;
|
|
555
|
+
exportScale: number;
|
|
556
|
+
currentItemStrokeColor: string;
|
|
557
|
+
currentItemBackgroundColor: string;
|
|
558
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
559
|
+
currentItemStrokeWidth: number;
|
|
560
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
561
|
+
currentItemRoughness: number;
|
|
562
|
+
currentItemOpacity: number;
|
|
563
|
+
currentItemFontFamily: number;
|
|
564
|
+
currentItemFontSize: number;
|
|
565
|
+
currentItemTextAlign: string;
|
|
566
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
567
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
568
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
569
|
+
viewBackgroundColor: string;
|
|
570
|
+
cursorButton: "up" | "down";
|
|
571
|
+
scrolledOutside: boolean;
|
|
572
|
+
name: string;
|
|
573
|
+
isResizing: boolean;
|
|
574
|
+
isRotating: boolean;
|
|
575
|
+
openMenu: "canvas" | "shape" | null;
|
|
576
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
577
|
+
openSidebar: {
|
|
578
|
+
name: string;
|
|
579
|
+
tab?: string | undefined;
|
|
580
|
+
} | null;
|
|
581
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
582
|
+
defaultSidebarDockedPreference: boolean;
|
|
583
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
584
|
+
selectedElementIds: {
|
|
585
|
+
[id: string]: boolean;
|
|
586
|
+
};
|
|
587
|
+
previousSelectedElementIds: {
|
|
588
|
+
[id: string]: boolean;
|
|
589
|
+
};
|
|
590
|
+
selectedElementsAreBeingDragged: boolean;
|
|
591
|
+
shouldCacheIgnoreZoom: boolean;
|
|
592
|
+
toast: {
|
|
593
|
+
message: string;
|
|
594
|
+
closable?: boolean | undefined;
|
|
595
|
+
duration?: number | undefined;
|
|
596
|
+
} | null;
|
|
597
|
+
zenModeEnabled: boolean;
|
|
598
|
+
theme: string;
|
|
599
|
+
gridSize: number | null;
|
|
600
|
+
viewModeEnabled: boolean;
|
|
601
|
+
selectedGroupIds: {
|
|
602
|
+
[groupId: string]: boolean;
|
|
603
|
+
};
|
|
604
|
+
editingGroupId: string | null;
|
|
605
|
+
width: number;
|
|
606
|
+
height: number;
|
|
607
|
+
offsetTop: number;
|
|
608
|
+
offsetLeft: number;
|
|
609
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
610
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
611
|
+
showStats: boolean;
|
|
612
|
+
currentChartType: import("../element/types").ChartType;
|
|
613
|
+
pasteDialog: {
|
|
614
|
+
shown: false;
|
|
615
|
+
data: null;
|
|
616
|
+
} | {
|
|
617
|
+
shown: true;
|
|
618
|
+
data: import("../charts").Spreadsheet;
|
|
619
|
+
};
|
|
620
|
+
pendingImageElementId: string | null;
|
|
621
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
622
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
623
|
+
};
|
|
624
|
+
commitToHistory: boolean;
|
|
625
|
+
};
|
|
626
|
+
export declare const zoomToFitViewport: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean) => {
|
|
627
|
+
appState: {
|
|
628
|
+
scrollX: number;
|
|
629
|
+
scrollY: number;
|
|
630
|
+
zoom: {
|
|
631
|
+
value: NormalizedZoomValue;
|
|
632
|
+
};
|
|
633
|
+
contextMenu: {
|
|
634
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
635
|
+
top: number;
|
|
636
|
+
left: number;
|
|
637
|
+
} | null;
|
|
638
|
+
showWelcomeScreen: boolean;
|
|
639
|
+
isLoading: boolean;
|
|
640
|
+
errorMessage: import("react").ReactNode;
|
|
641
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
642
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
643
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
644
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
645
|
+
isBindingEnabled: boolean;
|
|
646
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
647
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
648
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
649
|
+
shouldRenderFrames: boolean;
|
|
650
|
+
editingFrame: string | null;
|
|
651
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
502
652
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
503
653
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
504
654
|
activeTool: {
|
|
505
655
|
lastActiveTool: import("../types").LastActiveTool;
|
|
506
656
|
locked: boolean;
|
|
507
657
|
} & ({
|
|
508
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
658
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
509
659
|
customType: null;
|
|
510
660
|
} | {
|
|
511
661
|
type: "custom";
|
|
@@ -537,10 +687,13 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
537
687
|
isResizing: boolean;
|
|
538
688
|
isRotating: boolean;
|
|
539
689
|
openMenu: "canvas" | "shape" | null;
|
|
540
|
-
openPopup: "
|
|
541
|
-
openSidebar:
|
|
690
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
691
|
+
openSidebar: {
|
|
692
|
+
name: string;
|
|
693
|
+
tab?: string | undefined;
|
|
694
|
+
} | null;
|
|
542
695
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
543
|
-
|
|
696
|
+
defaultSidebarDockedPreference: boolean;
|
|
544
697
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
545
698
|
selectedElementIds: {
|
|
546
699
|
[id: string]: boolean;
|
|
@@ -548,6 +701,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
548
701
|
previousSelectedElementIds: {
|
|
549
702
|
[id: string]: boolean;
|
|
550
703
|
};
|
|
704
|
+
selectedElementsAreBeingDragged: boolean;
|
|
551
705
|
shouldCacheIgnoreZoom: boolean;
|
|
552
706
|
toast: {
|
|
553
707
|
message: string;
|
|
@@ -610,13 +764,17 @@ export declare const actionZoomToSelected: {
|
|
|
610
764
|
isBindingEnabled: boolean;
|
|
611
765
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
612
766
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
767
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
768
|
+
shouldRenderFrames: boolean;
|
|
769
|
+
editingFrame: string | null;
|
|
770
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
613
771
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
614
772
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
615
773
|
activeTool: {
|
|
616
774
|
lastActiveTool: import("../types").LastActiveTool;
|
|
617
775
|
locked: boolean;
|
|
618
776
|
} & ({
|
|
619
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
777
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
620
778
|
customType: null;
|
|
621
779
|
} | {
|
|
622
780
|
type: "custom";
|
|
@@ -648,10 +806,13 @@ export declare const actionZoomToSelected: {
|
|
|
648
806
|
isResizing: boolean;
|
|
649
807
|
isRotating: boolean;
|
|
650
808
|
openMenu: "canvas" | "shape" | null;
|
|
651
|
-
openPopup: "
|
|
652
|
-
openSidebar:
|
|
809
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
810
|
+
openSidebar: {
|
|
811
|
+
name: string;
|
|
812
|
+
tab?: string | undefined;
|
|
813
|
+
} | null;
|
|
653
814
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
654
|
-
|
|
815
|
+
defaultSidebarDockedPreference: boolean;
|
|
655
816
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
656
817
|
selectedElementIds: {
|
|
657
818
|
[id: string]: boolean;
|
|
@@ -659,6 +820,7 @@ export declare const actionZoomToSelected: {
|
|
|
659
820
|
previousSelectedElementIds: {
|
|
660
821
|
[id: string]: boolean;
|
|
661
822
|
};
|
|
823
|
+
selectedElementsAreBeingDragged: boolean;
|
|
662
824
|
shouldCacheIgnoreZoom: boolean;
|
|
663
825
|
toast: {
|
|
664
826
|
message: string;
|
|
@@ -726,13 +888,17 @@ export declare const actionZoomToFit: {
|
|
|
726
888
|
isBindingEnabled: boolean;
|
|
727
889
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
728
890
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
891
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
892
|
+
shouldRenderFrames: boolean;
|
|
893
|
+
editingFrame: string | null;
|
|
894
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
729
895
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
730
896
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
731
897
|
activeTool: {
|
|
732
898
|
lastActiveTool: import("../types").LastActiveTool;
|
|
733
899
|
locked: boolean;
|
|
734
900
|
} & ({
|
|
735
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
901
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
736
902
|
customType: null;
|
|
737
903
|
} | {
|
|
738
904
|
type: "custom";
|
|
@@ -764,10 +930,13 @@ export declare const actionZoomToFit: {
|
|
|
764
930
|
isResizing: boolean;
|
|
765
931
|
isRotating: boolean;
|
|
766
932
|
openMenu: "canvas" | "shape" | null;
|
|
767
|
-
openPopup: "
|
|
768
|
-
openSidebar:
|
|
933
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
934
|
+
openSidebar: {
|
|
935
|
+
name: string;
|
|
936
|
+
tab?: string | undefined;
|
|
937
|
+
} | null;
|
|
769
938
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
770
|
-
|
|
939
|
+
defaultSidebarDockedPreference: boolean;
|
|
771
940
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
772
941
|
selectedElementIds: {
|
|
773
942
|
[id: string]: boolean;
|
|
@@ -775,6 +944,7 @@ export declare const actionZoomToFit: {
|
|
|
775
944
|
previousSelectedElementIds: {
|
|
776
945
|
[id: string]: boolean;
|
|
777
946
|
};
|
|
947
|
+
selectedElementsAreBeingDragged: boolean;
|
|
778
948
|
shouldCacheIgnoreZoom: boolean;
|
|
779
949
|
toast: {
|
|
780
950
|
message: string;
|
|
@@ -838,13 +1008,17 @@ export declare const actionToggleTheme: {
|
|
|
838
1008
|
isBindingEnabled: boolean;
|
|
839
1009
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
840
1010
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1011
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1012
|
+
shouldRenderFrames: boolean;
|
|
1013
|
+
editingFrame: string | null;
|
|
1014
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
841
1015
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
842
1016
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
843
1017
|
activeTool: {
|
|
844
1018
|
lastActiveTool: import("../types").LastActiveTool;
|
|
845
1019
|
locked: boolean;
|
|
846
1020
|
} & ({
|
|
847
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
1021
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
848
1022
|
customType: null;
|
|
849
1023
|
} | {
|
|
850
1024
|
type: "custom";
|
|
@@ -881,10 +1055,13 @@ export declare const actionToggleTheme: {
|
|
|
881
1055
|
value: NormalizedZoomValue;
|
|
882
1056
|
}>;
|
|
883
1057
|
openMenu: "canvas" | "shape" | null;
|
|
884
|
-
openPopup: "
|
|
885
|
-
openSidebar:
|
|
1058
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1059
|
+
openSidebar: {
|
|
1060
|
+
name: string;
|
|
1061
|
+
tab?: string | undefined;
|
|
1062
|
+
} | null;
|
|
886
1063
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
887
|
-
|
|
1064
|
+
defaultSidebarDockedPreference: boolean;
|
|
888
1065
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
889
1066
|
selectedElementIds: {
|
|
890
1067
|
[id: string]: boolean;
|
|
@@ -892,6 +1069,7 @@ export declare const actionToggleTheme: {
|
|
|
892
1069
|
previousSelectedElementIds: {
|
|
893
1070
|
[id: string]: boolean;
|
|
894
1071
|
};
|
|
1072
|
+
selectedElementsAreBeingDragged: boolean;
|
|
895
1073
|
shouldCacheIgnoreZoom: boolean;
|
|
896
1074
|
toast: {
|
|
897
1075
|
message: string;
|
|
@@ -944,7 +1122,7 @@ export declare const actionToggleEraserTool: {
|
|
|
944
1122
|
lastActiveTool: import("../types").LastActiveTool;
|
|
945
1123
|
locked: boolean;
|
|
946
1124
|
} & ({
|
|
947
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
1125
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
948
1126
|
customType: null;
|
|
949
1127
|
} | {
|
|
950
1128
|
type: "custom";
|
|
@@ -965,6 +1143,10 @@ export declare const actionToggleEraserTool: {
|
|
|
965
1143
|
isBindingEnabled: boolean;
|
|
966
1144
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
967
1145
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1146
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1147
|
+
shouldRenderFrames: boolean;
|
|
1148
|
+
editingFrame: string | null;
|
|
1149
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
968
1150
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
969
1151
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
970
1152
|
penMode: boolean;
|
|
@@ -998,14 +1180,18 @@ export declare const actionToggleEraserTool: {
|
|
|
998
1180
|
value: NormalizedZoomValue;
|
|
999
1181
|
}>;
|
|
1000
1182
|
openMenu: "canvas" | "shape" | null;
|
|
1001
|
-
openPopup: "
|
|
1002
|
-
openSidebar:
|
|
1183
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1184
|
+
openSidebar: {
|
|
1185
|
+
name: string;
|
|
1186
|
+
tab?: string | undefined;
|
|
1187
|
+
} | null;
|
|
1003
1188
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1004
|
-
|
|
1189
|
+
defaultSidebarDockedPreference: boolean;
|
|
1005
1190
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1006
1191
|
previousSelectedElementIds: {
|
|
1007
1192
|
[id: string]: boolean;
|
|
1008
1193
|
};
|
|
1194
|
+
selectedElementsAreBeingDragged: boolean;
|
|
1009
1195
|
shouldCacheIgnoreZoom: boolean;
|
|
1010
1196
|
toast: {
|
|
1011
1197
|
message: string;
|
|
@@ -1055,7 +1241,7 @@ export declare const actionToggleHandTool: {
|
|
|
1055
1241
|
lastActiveTool: import("../types").LastActiveTool;
|
|
1056
1242
|
locked: boolean;
|
|
1057
1243
|
} & ({
|
|
1058
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
1244
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
1059
1245
|
customType: null;
|
|
1060
1246
|
} | {
|
|
1061
1247
|
type: "custom";
|
|
@@ -1076,6 +1262,10 @@ export declare const actionToggleHandTool: {
|
|
|
1076
1262
|
isBindingEnabled: boolean;
|
|
1077
1263
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
1078
1264
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1265
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1266
|
+
shouldRenderFrames: boolean;
|
|
1267
|
+
editingFrame: string | null;
|
|
1268
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1079
1269
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1080
1270
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1081
1271
|
penMode: boolean;
|
|
@@ -1109,14 +1299,18 @@ export declare const actionToggleHandTool: {
|
|
|
1109
1299
|
value: NormalizedZoomValue;
|
|
1110
1300
|
}>;
|
|
1111
1301
|
openMenu: "canvas" | "shape" | null;
|
|
1112
|
-
openPopup: "
|
|
1113
|
-
openSidebar:
|
|
1302
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1303
|
+
openSidebar: {
|
|
1304
|
+
name: string;
|
|
1305
|
+
tab?: string | undefined;
|
|
1306
|
+
} | null;
|
|
1114
1307
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1115
|
-
|
|
1308
|
+
defaultSidebarDockedPreference: boolean;
|
|
1116
1309
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1117
1310
|
previousSelectedElementIds: {
|
|
1118
1311
|
[id: string]: boolean;
|
|
1119
1312
|
};
|
|
1313
|
+
selectedElementsAreBeingDragged: boolean;
|
|
1120
1314
|
shouldCacheIgnoreZoom: boolean;
|
|
1121
1315
|
toast: {
|
|
1122
1316
|
message: string;
|