@dwelle/excalidraw 0.4.0-e3bee83 → 0.4.0-e587816
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 +525 -0
- package/README.md +18 -1820
- 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 +3071 -1566
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
- package/main.js +1 -8
- package/package.json +9 -4
- package/types/actions/actionAddToLibrary.d.ts +103 -55
- package/types/actions/actionAlign.d.ts +33 -28
- package/types/actions/actionBoundText.d.ts +175 -22
- package/types/actions/actionCanvas.d.ts +680 -170
- package/types/actions/actionClipboard.d.ts +174 -100
- package/types/actions/actionDeleteSelected.d.ts +102 -60
- package/types/actions/actionDistribute.d.ts +11 -12
- package/types/actions/actionDuplicateSelection.d.ts +3 -4
- package/types/actions/actionElementLock.d.ts +271 -0
- package/types/actions/actionExport.d.ts +363 -221
- package/types/actions/actionFinalize.d.ts +70 -42
- package/types/actions/actionFlip.d.ts +8 -11
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +250 -13
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +37 -21
- package/types/actions/actionMenu.d.ts +108 -62
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +465 -256
- package/types/actions/actionSelectAll.d.ts +123 -4
- package/types/actions/actionStyles.d.ts +39 -24
- package/types/actions/actionToggleGridMode.d.ts +37 -22
- package/types/actions/{actionToggleLock.d.ts → actionToggleObjectsSnapMode.d.ts} +49 -32
- package/types/actions/actionToggleStats.d.ts +37 -22
- package/types/actions/actionToggleViewMode.d.ts +37 -22
- package/types/actions/actionToggleZenMode.d.ts +37 -22
- package/types/actions/actionZindex.d.ts +12 -12
- package/types/actions/index.d.ts +2 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +11 -9
- package/types/appState.d.ts +18 -18
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +8 -7
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +7 -12
- package/types/components/ActiveConfirmDialog.d.ts +4 -0
- package/types/components/App.d.ts +93 -35
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/Button.d.ts +3 -2
- package/types/components/ButtonIconSelect.d.ts +11 -3
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/ColorInput.d.ts +9 -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 +20 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +29 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +28 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/HelpButton.d.ts +1 -2
- package/types/components/HintViewer.d.ts +4 -5
- 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 +5 -5
- 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 +9 -15
- 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 +10 -28
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +6 -3
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/LockButton.d.ts +1 -2
- package/types/components/MobileMenu.d.ts +8 -11
- 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/Section.d.ts +1 -1
- 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 +8 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +6 -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 +6 -5
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +9 -0
- 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 +15 -9
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +7 -3
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +4 -4
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +4 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/footer/Footer.d.ts +4 -5
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +16 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/main-menu/MainMenu.d.ts +22 -13
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -3
- package/types/constants.d.ts +94 -10
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/cursor.d.ts +5 -0
- package/types/data/blob.d.ts +5 -3
- 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 +10 -4
- package/types/data/transform.d.ts +73 -0
- package/types/data/types.d.ts +3 -5
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +48 -29
- package/types/element/binding.d.ts +4 -3
- package/types/element/bounds.d.ts +40 -10
- 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/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +43 -27
- package/types/element/mutateElement.d.ts +3 -2
- package/types/element/newElement.d.ts +48 -15
- package/types/element/resizeElements.d.ts +3 -2
- package/types/element/resizeTest.d.ts +2 -1
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +43 -17
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +16 -8
- package/types/element/typeChecks.d.ts +5 -2
- package/types/element/types.d.ts +59 -35
- package/types/emitter.d.ts +1 -2
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +46 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +15 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -2
- package/types/hooks/useScrollPosition.d.ts +1 -0
- package/types/hooks/useStable.d.ts +1 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +11 -2
- package/types/jotai.d.ts +20 -108
- package/types/keys.d.ts +5 -4
- package/types/math.d.ts +5 -0
- package/types/packages/bbox.d.ts +11 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +11 -4
- package/types/packages/excalidraw/main.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 +11 -2
- package/types/packages/withinBounds.d.ts +19 -0
- package/types/renderer/renderElement.d.ts +12 -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 +27 -5
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/comparisons.d.ts +0 -1
- package/types/scene/export.d.ts +50 -11
- package/types/scene/index.d.ts +1 -1
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +27 -6
- package/types/scene/types.d.ts +70 -34
- package/types/snapping.d.ts +108 -0
- package/types/types.d.ts +200 -84
- package/types/utility-types.d.ts +24 -0
- package/types/utils.d.ts +73 -29
- package/types/zindex.d.ts +4 -4
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/SingleLibraryItem.d.ts +0 -10
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
- /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, NormalizedZoomValue } from "../types";
|
|
4
3
|
export declare const actionChangeViewBackgroundColor: {
|
|
@@ -9,7 +8,7 @@ export declare const actionChangeViewBackgroundColor: {
|
|
|
9
8
|
appState: any;
|
|
10
9
|
commitToHistory: boolean;
|
|
11
10
|
};
|
|
12
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
11
|
+
PanelComponent: ({ elements, appState, updateData, appProps }: import("./types").PanelComponentProps) => JSX.Element;
|
|
13
12
|
} & {
|
|
14
13
|
keyTest?: undefined;
|
|
15
14
|
};
|
|
@@ -23,7 +22,7 @@ export declare const actionClearCanvas: {
|
|
|
23
22
|
elements: ExcalidrawElement[];
|
|
24
23
|
appState: {
|
|
25
24
|
files: {};
|
|
26
|
-
theme:
|
|
25
|
+
theme: import("../element/types").Theme;
|
|
27
26
|
penMode: boolean;
|
|
28
27
|
penDetected: boolean;
|
|
29
28
|
exportBackground: boolean;
|
|
@@ -38,16 +37,9 @@ export declare const actionClearCanvas: {
|
|
|
38
37
|
data: import("../charts").Spreadsheet;
|
|
39
38
|
};
|
|
40
39
|
activeTool: {
|
|
41
|
-
|
|
42
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
40
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
43
41
|
locked: boolean;
|
|
44
|
-
|
|
45
|
-
} | {
|
|
46
|
-
type: "custom";
|
|
47
|
-
customType: string;
|
|
48
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
49
|
-
locked: boolean;
|
|
50
|
-
};
|
|
42
|
+
} & import("../types").ActiveTool;
|
|
51
43
|
name: string;
|
|
52
44
|
contextMenu: {
|
|
53
45
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -56,7 +48,11 @@ export declare const actionClearCanvas: {
|
|
|
56
48
|
} | null;
|
|
57
49
|
showWelcomeScreen: boolean;
|
|
58
50
|
isLoading: boolean;
|
|
59
|
-
errorMessage:
|
|
51
|
+
errorMessage: import("react").ReactNode;
|
|
52
|
+
activeEmbeddable: {
|
|
53
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
54
|
+
state: "active" | "hover";
|
|
55
|
+
} | null;
|
|
60
56
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
61
57
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
62
58
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -64,6 +60,15 @@ export declare const actionClearCanvas: {
|
|
|
64
60
|
isBindingEnabled: boolean;
|
|
65
61
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
66
62
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
63
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
64
|
+
frameRendering: {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
name: boolean;
|
|
67
|
+
outline: boolean;
|
|
68
|
+
clip: boolean;
|
|
69
|
+
};
|
|
70
|
+
editingFrame: string | null;
|
|
71
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
67
72
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
68
73
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
69
74
|
exportWithDarkMode: boolean;
|
|
@@ -92,17 +97,21 @@ export declare const actionClearCanvas: {
|
|
|
92
97
|
value: NormalizedZoomValue;
|
|
93
98
|
}>;
|
|
94
99
|
openMenu: "canvas" | "shape" | null;
|
|
95
|
-
openPopup: "
|
|
96
|
-
openSidebar:
|
|
100
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
101
|
+
openSidebar: {
|
|
102
|
+
name: string;
|
|
103
|
+
tab?: string | undefined;
|
|
104
|
+
} | null;
|
|
97
105
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
98
|
-
|
|
106
|
+
defaultSidebarDockedPreference: boolean;
|
|
99
107
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
100
|
-
selectedElementIds: {
|
|
101
|
-
[id: string]:
|
|
102
|
-
}
|
|
108
|
+
selectedElementIds: Readonly<{
|
|
109
|
+
[id: string]: true;
|
|
110
|
+
}>;
|
|
103
111
|
previousSelectedElementIds: {
|
|
104
|
-
[id: string]:
|
|
112
|
+
[id: string]: true;
|
|
105
113
|
};
|
|
114
|
+
selectedElementsAreBeingDragged: boolean;
|
|
106
115
|
shouldCacheIgnoreZoom: boolean;
|
|
107
116
|
toast: {
|
|
108
117
|
message: string;
|
|
@@ -119,8 +128,14 @@ export declare const actionClearCanvas: {
|
|
|
119
128
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
120
129
|
currentChartType: import("../element/types").ChartType;
|
|
121
130
|
pendingImageElementId: string | null;
|
|
122
|
-
showHyperlinkPopup: false | "
|
|
131
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
123
132
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
133
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
134
|
+
originSnapOffset: {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
} | null;
|
|
138
|
+
objectsSnapModeEnabled: boolean;
|
|
124
139
|
};
|
|
125
140
|
commitToHistory: true;
|
|
126
141
|
};
|
|
@@ -147,7 +162,11 @@ export declare const actionZoomIn: {
|
|
|
147
162
|
} | null;
|
|
148
163
|
showWelcomeScreen: boolean;
|
|
149
164
|
isLoading: boolean;
|
|
150
|
-
errorMessage:
|
|
165
|
+
errorMessage: import("react").ReactNode;
|
|
166
|
+
activeEmbeddable: {
|
|
167
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
168
|
+
state: "active" | "hover";
|
|
169
|
+
} | null;
|
|
151
170
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
152
171
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
153
172
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -155,19 +174,21 @@ export declare const actionZoomIn: {
|
|
|
155
174
|
isBindingEnabled: boolean;
|
|
156
175
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
157
176
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
177
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
178
|
+
frameRendering: {
|
|
179
|
+
enabled: boolean;
|
|
180
|
+
name: boolean;
|
|
181
|
+
outline: boolean;
|
|
182
|
+
clip: boolean;
|
|
183
|
+
};
|
|
184
|
+
editingFrame: string | null;
|
|
185
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
158
186
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
159
187
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
160
188
|
activeTool: {
|
|
161
|
-
|
|
162
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
163
|
-
locked: boolean;
|
|
164
|
-
customType: null;
|
|
165
|
-
} | {
|
|
166
|
-
type: "custom";
|
|
167
|
-
customType: string;
|
|
168
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
189
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
169
190
|
locked: boolean;
|
|
170
|
-
};
|
|
191
|
+
} & import("../types").ActiveTool;
|
|
171
192
|
penMode: boolean;
|
|
172
193
|
penDetected: boolean;
|
|
173
194
|
exportBackground: boolean;
|
|
@@ -194,17 +215,21 @@ export declare const actionZoomIn: {
|
|
|
194
215
|
isResizing: boolean;
|
|
195
216
|
isRotating: boolean;
|
|
196
217
|
openMenu: "canvas" | "shape" | null;
|
|
197
|
-
openPopup: "
|
|
198
|
-
openSidebar:
|
|
218
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
219
|
+
openSidebar: {
|
|
220
|
+
name: string;
|
|
221
|
+
tab?: string | undefined;
|
|
222
|
+
} | null;
|
|
199
223
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
200
|
-
|
|
224
|
+
defaultSidebarDockedPreference: boolean;
|
|
201
225
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
202
|
-
selectedElementIds: {
|
|
203
|
-
[id: string]:
|
|
204
|
-
}
|
|
226
|
+
selectedElementIds: Readonly<{
|
|
227
|
+
[id: string]: true;
|
|
228
|
+
}>;
|
|
205
229
|
previousSelectedElementIds: {
|
|
206
|
-
[id: string]:
|
|
230
|
+
[id: string]: true;
|
|
207
231
|
};
|
|
232
|
+
selectedElementsAreBeingDragged: boolean;
|
|
208
233
|
shouldCacheIgnoreZoom: boolean;
|
|
209
234
|
toast: {
|
|
210
235
|
message: string;
|
|
@@ -212,7 +237,7 @@ export declare const actionZoomIn: {
|
|
|
212
237
|
duration?: number | undefined;
|
|
213
238
|
} | null;
|
|
214
239
|
zenModeEnabled: boolean;
|
|
215
|
-
theme:
|
|
240
|
+
theme: import("../element/types").Theme;
|
|
216
241
|
gridSize: number | null;
|
|
217
242
|
viewModeEnabled: boolean;
|
|
218
243
|
selectedGroupIds: {
|
|
@@ -235,15 +260,21 @@ export declare const actionZoomIn: {
|
|
|
235
260
|
data: import("../charts").Spreadsheet;
|
|
236
261
|
};
|
|
237
262
|
pendingImageElementId: string | null;
|
|
238
|
-
showHyperlinkPopup: false | "
|
|
263
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
239
264
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
265
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
266
|
+
originSnapOffset: {
|
|
267
|
+
x: number;
|
|
268
|
+
y: number;
|
|
269
|
+
} | null;
|
|
270
|
+
objectsSnapModeEnabled: boolean;
|
|
240
271
|
};
|
|
241
272
|
commitToHistory: false;
|
|
242
273
|
};
|
|
243
274
|
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
244
|
-
keyTest: (event:
|
|
275
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
245
276
|
} & {
|
|
246
|
-
keyTest?: ((event:
|
|
277
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
247
278
|
};
|
|
248
279
|
export declare const actionZoomOut: {
|
|
249
280
|
name: "zoomOut";
|
|
@@ -265,7 +296,11 @@ export declare const actionZoomOut: {
|
|
|
265
296
|
} | null;
|
|
266
297
|
showWelcomeScreen: boolean;
|
|
267
298
|
isLoading: boolean;
|
|
268
|
-
errorMessage:
|
|
299
|
+
errorMessage: import("react").ReactNode;
|
|
300
|
+
activeEmbeddable: {
|
|
301
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
302
|
+
state: "active" | "hover";
|
|
303
|
+
} | null;
|
|
269
304
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
270
305
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
271
306
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -273,19 +308,21 @@ export declare const actionZoomOut: {
|
|
|
273
308
|
isBindingEnabled: boolean;
|
|
274
309
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
275
310
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
311
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
312
|
+
frameRendering: {
|
|
313
|
+
enabled: boolean;
|
|
314
|
+
name: boolean;
|
|
315
|
+
outline: boolean;
|
|
316
|
+
clip: boolean;
|
|
317
|
+
};
|
|
318
|
+
editingFrame: string | null;
|
|
319
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
276
320
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
277
321
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
278
322
|
activeTool: {
|
|
279
|
-
|
|
280
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
281
|
-
locked: boolean;
|
|
282
|
-
customType: null;
|
|
283
|
-
} | {
|
|
284
|
-
type: "custom";
|
|
285
|
-
customType: string;
|
|
286
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
323
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
287
324
|
locked: boolean;
|
|
288
|
-
};
|
|
325
|
+
} & import("../types").ActiveTool;
|
|
289
326
|
penMode: boolean;
|
|
290
327
|
penDetected: boolean;
|
|
291
328
|
exportBackground: boolean;
|
|
@@ -312,17 +349,21 @@ export declare const actionZoomOut: {
|
|
|
312
349
|
isResizing: boolean;
|
|
313
350
|
isRotating: boolean;
|
|
314
351
|
openMenu: "canvas" | "shape" | null;
|
|
315
|
-
openPopup: "
|
|
316
|
-
openSidebar:
|
|
352
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
353
|
+
openSidebar: {
|
|
354
|
+
name: string;
|
|
355
|
+
tab?: string | undefined;
|
|
356
|
+
} | null;
|
|
317
357
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
318
|
-
|
|
358
|
+
defaultSidebarDockedPreference: boolean;
|
|
319
359
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
320
|
-
selectedElementIds: {
|
|
321
|
-
[id: string]:
|
|
322
|
-
}
|
|
360
|
+
selectedElementIds: Readonly<{
|
|
361
|
+
[id: string]: true;
|
|
362
|
+
}>;
|
|
323
363
|
previousSelectedElementIds: {
|
|
324
|
-
[id: string]:
|
|
364
|
+
[id: string]: true;
|
|
325
365
|
};
|
|
366
|
+
selectedElementsAreBeingDragged: boolean;
|
|
326
367
|
shouldCacheIgnoreZoom: boolean;
|
|
327
368
|
toast: {
|
|
328
369
|
message: string;
|
|
@@ -330,7 +371,7 @@ export declare const actionZoomOut: {
|
|
|
330
371
|
duration?: number | undefined;
|
|
331
372
|
} | null;
|
|
332
373
|
zenModeEnabled: boolean;
|
|
333
|
-
theme:
|
|
374
|
+
theme: import("../element/types").Theme;
|
|
334
375
|
gridSize: number | null;
|
|
335
376
|
viewModeEnabled: boolean;
|
|
336
377
|
selectedGroupIds: {
|
|
@@ -353,15 +394,21 @@ export declare const actionZoomOut: {
|
|
|
353
394
|
data: import("../charts").Spreadsheet;
|
|
354
395
|
};
|
|
355
396
|
pendingImageElementId: string | null;
|
|
356
|
-
showHyperlinkPopup: false | "
|
|
397
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
357
398
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
399
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
400
|
+
originSnapOffset: {
|
|
401
|
+
x: number;
|
|
402
|
+
y: number;
|
|
403
|
+
} | null;
|
|
404
|
+
objectsSnapModeEnabled: boolean;
|
|
358
405
|
};
|
|
359
406
|
commitToHistory: false;
|
|
360
407
|
};
|
|
361
408
|
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
362
|
-
keyTest: (event:
|
|
409
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
363
410
|
} & {
|
|
364
|
-
keyTest?: ((event:
|
|
411
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
365
412
|
};
|
|
366
413
|
export declare const actionResetZoom: {
|
|
367
414
|
name: "resetZoom";
|
|
@@ -383,7 +430,11 @@ export declare const actionResetZoom: {
|
|
|
383
430
|
} | null;
|
|
384
431
|
showWelcomeScreen: boolean;
|
|
385
432
|
isLoading: boolean;
|
|
386
|
-
errorMessage:
|
|
433
|
+
errorMessage: import("react").ReactNode;
|
|
434
|
+
activeEmbeddable: {
|
|
435
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
436
|
+
state: "active" | "hover";
|
|
437
|
+
} | null;
|
|
387
438
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
388
439
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
389
440
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -391,19 +442,21 @@ export declare const actionResetZoom: {
|
|
|
391
442
|
isBindingEnabled: boolean;
|
|
392
443
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
393
444
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
445
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
446
|
+
frameRendering: {
|
|
447
|
+
enabled: boolean;
|
|
448
|
+
name: boolean;
|
|
449
|
+
outline: boolean;
|
|
450
|
+
clip: boolean;
|
|
451
|
+
};
|
|
452
|
+
editingFrame: string | null;
|
|
453
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
394
454
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
395
455
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
396
456
|
activeTool: {
|
|
397
|
-
|
|
398
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
399
|
-
locked: boolean;
|
|
400
|
-
customType: null;
|
|
401
|
-
} | {
|
|
402
|
-
type: "custom";
|
|
403
|
-
customType: string;
|
|
404
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
457
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
405
458
|
locked: boolean;
|
|
406
|
-
};
|
|
459
|
+
} & import("../types").ActiveTool;
|
|
407
460
|
penMode: boolean;
|
|
408
461
|
penDetected: boolean;
|
|
409
462
|
exportBackground: boolean;
|
|
@@ -430,17 +483,21 @@ export declare const actionResetZoom: {
|
|
|
430
483
|
isResizing: boolean;
|
|
431
484
|
isRotating: boolean;
|
|
432
485
|
openMenu: "canvas" | "shape" | null;
|
|
433
|
-
openPopup: "
|
|
434
|
-
openSidebar:
|
|
486
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
487
|
+
openSidebar: {
|
|
488
|
+
name: string;
|
|
489
|
+
tab?: string | undefined;
|
|
490
|
+
} | null;
|
|
435
491
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
436
|
-
|
|
492
|
+
defaultSidebarDockedPreference: boolean;
|
|
437
493
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
438
|
-
selectedElementIds: {
|
|
439
|
-
[id: string]:
|
|
440
|
-
}
|
|
494
|
+
selectedElementIds: Readonly<{
|
|
495
|
+
[id: string]: true;
|
|
496
|
+
}>;
|
|
441
497
|
previousSelectedElementIds: {
|
|
442
|
-
[id: string]:
|
|
498
|
+
[id: string]: true;
|
|
443
499
|
};
|
|
500
|
+
selectedElementsAreBeingDragged: boolean;
|
|
444
501
|
shouldCacheIgnoreZoom: boolean;
|
|
445
502
|
toast: {
|
|
446
503
|
message: string;
|
|
@@ -448,7 +505,7 @@ export declare const actionResetZoom: {
|
|
|
448
505
|
duration?: number | undefined;
|
|
449
506
|
} | null;
|
|
450
507
|
zenModeEnabled: boolean;
|
|
451
|
-
theme:
|
|
508
|
+
theme: import("../element/types").Theme;
|
|
452
509
|
gridSize: number | null;
|
|
453
510
|
viewModeEnabled: boolean;
|
|
454
511
|
selectedGroupIds: {
|
|
@@ -471,28 +528,164 @@ export declare const actionResetZoom: {
|
|
|
471
528
|
data: import("../charts").Spreadsheet;
|
|
472
529
|
};
|
|
473
530
|
pendingImageElementId: string | null;
|
|
474
|
-
showHyperlinkPopup: false | "
|
|
531
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
475
532
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
533
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
534
|
+
originSnapOffset: {
|
|
535
|
+
x: number;
|
|
536
|
+
y: number;
|
|
537
|
+
} | null;
|
|
538
|
+
objectsSnapModeEnabled: boolean;
|
|
476
539
|
};
|
|
477
540
|
commitToHistory: false;
|
|
478
541
|
};
|
|
479
542
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
480
|
-
keyTest: (event:
|
|
543
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
481
544
|
} & {
|
|
482
|
-
keyTest?: ((event:
|
|
545
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
483
546
|
};
|
|
484
|
-
export declare const
|
|
485
|
-
|
|
547
|
+
export declare const zoomToFit: ({ targetElements, appState, fitToViewport, viewportZoomFactor, }: {
|
|
548
|
+
targetElements: readonly ExcalidrawElement[];
|
|
549
|
+
appState: Readonly<AppState>;
|
|
550
|
+
/** whether to fit content to viewport (beyond >100%) */
|
|
551
|
+
fitToViewport: boolean;
|
|
552
|
+
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
553
|
+
viewportZoomFactor?: number | undefined;
|
|
554
|
+
}) => {
|
|
555
|
+
appState: {
|
|
556
|
+
scrollX: number;
|
|
557
|
+
scrollY: number;
|
|
558
|
+
zoom: {
|
|
559
|
+
value: NormalizedZoomValue;
|
|
560
|
+
};
|
|
561
|
+
contextMenu: {
|
|
562
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
563
|
+
top: number;
|
|
564
|
+
left: number;
|
|
565
|
+
} | null;
|
|
566
|
+
showWelcomeScreen: boolean;
|
|
567
|
+
isLoading: boolean;
|
|
568
|
+
errorMessage: import("react").ReactNode;
|
|
569
|
+
activeEmbeddable: {
|
|
570
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
571
|
+
state: "active" | "hover";
|
|
572
|
+
} | null;
|
|
573
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
574
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
575
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
576
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
577
|
+
isBindingEnabled: boolean;
|
|
578
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
579
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
580
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
581
|
+
frameRendering: {
|
|
582
|
+
enabled: boolean;
|
|
583
|
+
name: boolean;
|
|
584
|
+
outline: boolean;
|
|
585
|
+
clip: boolean;
|
|
586
|
+
};
|
|
587
|
+
editingFrame: string | null;
|
|
588
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
589
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
590
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
591
|
+
activeTool: {
|
|
592
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
593
|
+
locked: boolean;
|
|
594
|
+
} & import("../types").ActiveTool;
|
|
595
|
+
penMode: boolean;
|
|
596
|
+
penDetected: boolean;
|
|
597
|
+
exportBackground: boolean;
|
|
598
|
+
exportEmbedScene: boolean;
|
|
599
|
+
exportWithDarkMode: boolean;
|
|
600
|
+
exportScale: number;
|
|
601
|
+
currentItemStrokeColor: string;
|
|
602
|
+
currentItemBackgroundColor: string;
|
|
603
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
604
|
+
currentItemStrokeWidth: number;
|
|
605
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
606
|
+
currentItemRoughness: number;
|
|
607
|
+
currentItemOpacity: number;
|
|
608
|
+
currentItemFontFamily: number;
|
|
609
|
+
currentItemFontSize: number;
|
|
610
|
+
currentItemTextAlign: string;
|
|
611
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
612
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
613
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
614
|
+
viewBackgroundColor: string;
|
|
615
|
+
cursorButton: "up" | "down";
|
|
616
|
+
scrolledOutside: boolean;
|
|
617
|
+
name: string;
|
|
618
|
+
isResizing: boolean;
|
|
619
|
+
isRotating: boolean;
|
|
620
|
+
openMenu: "canvas" | "shape" | null;
|
|
621
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
622
|
+
openSidebar: {
|
|
623
|
+
name: string;
|
|
624
|
+
tab?: string | undefined;
|
|
625
|
+
} | null;
|
|
626
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
627
|
+
defaultSidebarDockedPreference: boolean;
|
|
628
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
629
|
+
selectedElementIds: Readonly<{
|
|
630
|
+
[id: string]: true;
|
|
631
|
+
}>;
|
|
632
|
+
previousSelectedElementIds: {
|
|
633
|
+
[id: string]: true;
|
|
634
|
+
};
|
|
635
|
+
selectedElementsAreBeingDragged: boolean;
|
|
636
|
+
shouldCacheIgnoreZoom: boolean;
|
|
637
|
+
toast: {
|
|
638
|
+
message: string;
|
|
639
|
+
closable?: boolean | undefined;
|
|
640
|
+
duration?: number | undefined;
|
|
641
|
+
} | null;
|
|
642
|
+
zenModeEnabled: boolean;
|
|
643
|
+
theme: import("../element/types").Theme;
|
|
644
|
+
gridSize: number | null;
|
|
645
|
+
viewModeEnabled: boolean;
|
|
646
|
+
selectedGroupIds: {
|
|
647
|
+
[groupId: string]: boolean;
|
|
648
|
+
};
|
|
649
|
+
editingGroupId: string | null;
|
|
650
|
+
width: number;
|
|
651
|
+
height: number;
|
|
652
|
+
offsetTop: number;
|
|
653
|
+
offsetLeft: number;
|
|
654
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
655
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
656
|
+
showStats: boolean;
|
|
657
|
+
currentChartType: import("../element/types").ChartType;
|
|
658
|
+
pasteDialog: {
|
|
659
|
+
shown: false;
|
|
660
|
+
data: null;
|
|
661
|
+
} | {
|
|
662
|
+
shown: true;
|
|
663
|
+
data: import("../charts").Spreadsheet;
|
|
664
|
+
};
|
|
665
|
+
pendingImageElementId: string | null;
|
|
666
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
667
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
668
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
669
|
+
originSnapOffset: {
|
|
670
|
+
x: number;
|
|
671
|
+
y: number;
|
|
672
|
+
} | null;
|
|
673
|
+
objectsSnapModeEnabled: boolean;
|
|
674
|
+
};
|
|
675
|
+
commitToHistory: boolean;
|
|
676
|
+
};
|
|
677
|
+
export declare const actionZoomToFitSelectionInViewport: {
|
|
678
|
+
name: "zoomToFitSelectionInViewport";
|
|
486
679
|
trackEvent: {
|
|
487
680
|
category: "canvas";
|
|
488
681
|
};
|
|
489
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
682
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
490
683
|
appState: {
|
|
684
|
+
scrollX: number;
|
|
685
|
+
scrollY: number;
|
|
491
686
|
zoom: {
|
|
492
687
|
value: NormalizedZoomValue;
|
|
493
688
|
};
|
|
494
|
-
scrollX: number;
|
|
495
|
-
scrollY: number;
|
|
496
689
|
contextMenu: {
|
|
497
690
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
498
691
|
top: number;
|
|
@@ -500,7 +693,11 @@ export declare const actionZoomToSelected: {
|
|
|
500
693
|
} | null;
|
|
501
694
|
showWelcomeScreen: boolean;
|
|
502
695
|
isLoading: boolean;
|
|
503
|
-
errorMessage:
|
|
696
|
+
errorMessage: import("react").ReactNode;
|
|
697
|
+
activeEmbeddable: {
|
|
698
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
699
|
+
state: "active" | "hover";
|
|
700
|
+
} | null;
|
|
504
701
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
505
702
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
506
703
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -508,19 +705,153 @@ export declare const actionZoomToSelected: {
|
|
|
508
705
|
isBindingEnabled: boolean;
|
|
509
706
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
510
707
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
708
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
709
|
+
frameRendering: {
|
|
710
|
+
enabled: boolean;
|
|
711
|
+
name: boolean;
|
|
712
|
+
outline: boolean;
|
|
713
|
+
clip: boolean;
|
|
714
|
+
};
|
|
715
|
+
editingFrame: string | null;
|
|
716
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
511
717
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
512
718
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
513
719
|
activeTool: {
|
|
514
|
-
|
|
515
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
720
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
516
721
|
locked: boolean;
|
|
517
|
-
|
|
722
|
+
} & import("../types").ActiveTool;
|
|
723
|
+
penMode: boolean;
|
|
724
|
+
penDetected: boolean;
|
|
725
|
+
exportBackground: boolean;
|
|
726
|
+
exportEmbedScene: boolean;
|
|
727
|
+
exportWithDarkMode: boolean;
|
|
728
|
+
exportScale: number;
|
|
729
|
+
currentItemStrokeColor: string;
|
|
730
|
+
currentItemBackgroundColor: string;
|
|
731
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
732
|
+
currentItemStrokeWidth: number;
|
|
733
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
734
|
+
currentItemRoughness: number;
|
|
735
|
+
currentItemOpacity: number;
|
|
736
|
+
currentItemFontFamily: number;
|
|
737
|
+
currentItemFontSize: number;
|
|
738
|
+
currentItemTextAlign: string;
|
|
739
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
740
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
741
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
742
|
+
viewBackgroundColor: string;
|
|
743
|
+
cursorButton: "up" | "down";
|
|
744
|
+
scrolledOutside: boolean;
|
|
745
|
+
name: string;
|
|
746
|
+
isResizing: boolean;
|
|
747
|
+
isRotating: boolean;
|
|
748
|
+
openMenu: "canvas" | "shape" | null;
|
|
749
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
750
|
+
openSidebar: {
|
|
751
|
+
name: string;
|
|
752
|
+
tab?: string | undefined;
|
|
753
|
+
} | null;
|
|
754
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
755
|
+
defaultSidebarDockedPreference: boolean;
|
|
756
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
757
|
+
selectedElementIds: Readonly<{
|
|
758
|
+
[id: string]: true;
|
|
759
|
+
}>;
|
|
760
|
+
previousSelectedElementIds: {
|
|
761
|
+
[id: string]: true;
|
|
762
|
+
};
|
|
763
|
+
selectedElementsAreBeingDragged: boolean;
|
|
764
|
+
shouldCacheIgnoreZoom: boolean;
|
|
765
|
+
toast: {
|
|
766
|
+
message: string;
|
|
767
|
+
closable?: boolean | undefined;
|
|
768
|
+
duration?: number | undefined;
|
|
769
|
+
} | null;
|
|
770
|
+
zenModeEnabled: boolean;
|
|
771
|
+
theme: import("../element/types").Theme;
|
|
772
|
+
gridSize: number | null;
|
|
773
|
+
viewModeEnabled: boolean;
|
|
774
|
+
selectedGroupIds: {
|
|
775
|
+
[groupId: string]: boolean;
|
|
776
|
+
};
|
|
777
|
+
editingGroupId: string | null;
|
|
778
|
+
width: number;
|
|
779
|
+
height: number;
|
|
780
|
+
offsetTop: number;
|
|
781
|
+
offsetLeft: number;
|
|
782
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
783
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
784
|
+
showStats: boolean;
|
|
785
|
+
currentChartType: import("../element/types").ChartType;
|
|
786
|
+
pasteDialog: {
|
|
787
|
+
shown: false;
|
|
788
|
+
data: null;
|
|
518
789
|
} | {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
790
|
+
shown: true;
|
|
791
|
+
data: import("../charts").Spreadsheet;
|
|
792
|
+
};
|
|
793
|
+
pendingImageElementId: string | null;
|
|
794
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
795
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
796
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
797
|
+
originSnapOffset: {
|
|
798
|
+
x: number;
|
|
799
|
+
y: number;
|
|
800
|
+
} | null;
|
|
801
|
+
objectsSnapModeEnabled: boolean;
|
|
802
|
+
};
|
|
803
|
+
commitToHistory: boolean;
|
|
804
|
+
};
|
|
805
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
806
|
+
} & {
|
|
807
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
808
|
+
};
|
|
809
|
+
export declare const actionZoomToFitSelection: {
|
|
810
|
+
name: "zoomToFitSelection";
|
|
811
|
+
trackEvent: {
|
|
812
|
+
category: "canvas";
|
|
813
|
+
};
|
|
814
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
815
|
+
appState: {
|
|
816
|
+
scrollX: number;
|
|
817
|
+
scrollY: number;
|
|
818
|
+
zoom: {
|
|
819
|
+
value: NormalizedZoomValue;
|
|
820
|
+
};
|
|
821
|
+
contextMenu: {
|
|
822
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
823
|
+
top: number;
|
|
824
|
+
left: number;
|
|
825
|
+
} | null;
|
|
826
|
+
showWelcomeScreen: boolean;
|
|
827
|
+
isLoading: boolean;
|
|
828
|
+
errorMessage: import("react").ReactNode;
|
|
829
|
+
activeEmbeddable: {
|
|
830
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
831
|
+
state: "active" | "hover";
|
|
832
|
+
} | null;
|
|
833
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
834
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
835
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
836
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
837
|
+
isBindingEnabled: boolean;
|
|
838
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
839
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
840
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
841
|
+
frameRendering: {
|
|
842
|
+
enabled: boolean;
|
|
843
|
+
name: boolean;
|
|
844
|
+
outline: boolean;
|
|
845
|
+
clip: boolean;
|
|
523
846
|
};
|
|
847
|
+
editingFrame: string | null;
|
|
848
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
849
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
850
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
851
|
+
activeTool: {
|
|
852
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
853
|
+
locked: boolean;
|
|
854
|
+
} & import("../types").ActiveTool;
|
|
524
855
|
penMode: boolean;
|
|
525
856
|
penDetected: boolean;
|
|
526
857
|
exportBackground: boolean;
|
|
@@ -547,17 +878,21 @@ export declare const actionZoomToSelected: {
|
|
|
547
878
|
isResizing: boolean;
|
|
548
879
|
isRotating: boolean;
|
|
549
880
|
openMenu: "canvas" | "shape" | null;
|
|
550
|
-
openPopup: "
|
|
551
|
-
openSidebar:
|
|
881
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
882
|
+
openSidebar: {
|
|
883
|
+
name: string;
|
|
884
|
+
tab?: string | undefined;
|
|
885
|
+
} | null;
|
|
552
886
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
553
|
-
|
|
887
|
+
defaultSidebarDockedPreference: boolean;
|
|
554
888
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
555
|
-
selectedElementIds: {
|
|
556
|
-
[id: string]:
|
|
557
|
-
}
|
|
889
|
+
selectedElementIds: Readonly<{
|
|
890
|
+
[id: string]: true;
|
|
891
|
+
}>;
|
|
558
892
|
previousSelectedElementIds: {
|
|
559
|
-
[id: string]:
|
|
893
|
+
[id: string]: true;
|
|
560
894
|
};
|
|
895
|
+
selectedElementsAreBeingDragged: boolean;
|
|
561
896
|
shouldCacheIgnoreZoom: boolean;
|
|
562
897
|
toast: {
|
|
563
898
|
message: string;
|
|
@@ -565,7 +900,7 @@ export declare const actionZoomToSelected: {
|
|
|
565
900
|
duration?: number | undefined;
|
|
566
901
|
} | null;
|
|
567
902
|
zenModeEnabled: boolean;
|
|
568
|
-
theme:
|
|
903
|
+
theme: import("../element/types").Theme;
|
|
569
904
|
gridSize: number | null;
|
|
570
905
|
viewModeEnabled: boolean;
|
|
571
906
|
selectedGroupIds: {
|
|
@@ -588,14 +923,20 @@ export declare const actionZoomToSelected: {
|
|
|
588
923
|
data: import("../charts").Spreadsheet;
|
|
589
924
|
};
|
|
590
925
|
pendingImageElementId: string | null;
|
|
591
|
-
showHyperlinkPopup: false | "
|
|
926
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
592
927
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
928
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
929
|
+
originSnapOffset: {
|
|
930
|
+
x: number;
|
|
931
|
+
y: number;
|
|
932
|
+
} | null;
|
|
933
|
+
objectsSnapModeEnabled: boolean;
|
|
593
934
|
};
|
|
594
935
|
commitToHistory: boolean;
|
|
595
936
|
};
|
|
596
|
-
keyTest: (event:
|
|
937
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
597
938
|
} & {
|
|
598
|
-
keyTest?: ((event:
|
|
939
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
599
940
|
};
|
|
600
941
|
export declare const actionZoomToFit: {
|
|
601
942
|
name: "zoomToFit";
|
|
@@ -605,11 +946,11 @@ export declare const actionZoomToFit: {
|
|
|
605
946
|
};
|
|
606
947
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
607
948
|
appState: {
|
|
949
|
+
scrollX: number;
|
|
950
|
+
scrollY: number;
|
|
608
951
|
zoom: {
|
|
609
952
|
value: NormalizedZoomValue;
|
|
610
953
|
};
|
|
611
|
-
scrollX: number;
|
|
612
|
-
scrollY: number;
|
|
613
954
|
contextMenu: {
|
|
614
955
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
615
956
|
top: number;
|
|
@@ -617,7 +958,11 @@ export declare const actionZoomToFit: {
|
|
|
617
958
|
} | null;
|
|
618
959
|
showWelcomeScreen: boolean;
|
|
619
960
|
isLoading: boolean;
|
|
620
|
-
errorMessage:
|
|
961
|
+
errorMessage: import("react").ReactNode;
|
|
962
|
+
activeEmbeddable: {
|
|
963
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
964
|
+
state: "active" | "hover";
|
|
965
|
+
} | null;
|
|
621
966
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
622
967
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
623
968
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -625,19 +970,21 @@ export declare const actionZoomToFit: {
|
|
|
625
970
|
isBindingEnabled: boolean;
|
|
626
971
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
627
972
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
973
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
974
|
+
frameRendering: {
|
|
975
|
+
enabled: boolean;
|
|
976
|
+
name: boolean;
|
|
977
|
+
outline: boolean;
|
|
978
|
+
clip: boolean;
|
|
979
|
+
};
|
|
980
|
+
editingFrame: string | null;
|
|
981
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
628
982
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
629
983
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
630
984
|
activeTool: {
|
|
631
|
-
|
|
632
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
633
|
-
locked: boolean;
|
|
634
|
-
customType: null;
|
|
635
|
-
} | {
|
|
636
|
-
type: "custom";
|
|
637
|
-
customType: string;
|
|
638
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
985
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
639
986
|
locked: boolean;
|
|
640
|
-
};
|
|
987
|
+
} & import("../types").ActiveTool;
|
|
641
988
|
penMode: boolean;
|
|
642
989
|
penDetected: boolean;
|
|
643
990
|
exportBackground: boolean;
|
|
@@ -664,17 +1011,21 @@ export declare const actionZoomToFit: {
|
|
|
664
1011
|
isResizing: boolean;
|
|
665
1012
|
isRotating: boolean;
|
|
666
1013
|
openMenu: "canvas" | "shape" | null;
|
|
667
|
-
openPopup: "
|
|
668
|
-
openSidebar:
|
|
1014
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1015
|
+
openSidebar: {
|
|
1016
|
+
name: string;
|
|
1017
|
+
tab?: string | undefined;
|
|
1018
|
+
} | null;
|
|
669
1019
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
670
|
-
|
|
1020
|
+
defaultSidebarDockedPreference: boolean;
|
|
671
1021
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
672
|
-
selectedElementIds: {
|
|
673
|
-
[id: string]:
|
|
674
|
-
}
|
|
1022
|
+
selectedElementIds: Readonly<{
|
|
1023
|
+
[id: string]: true;
|
|
1024
|
+
}>;
|
|
675
1025
|
previousSelectedElementIds: {
|
|
676
|
-
[id: string]:
|
|
1026
|
+
[id: string]: true;
|
|
677
1027
|
};
|
|
1028
|
+
selectedElementsAreBeingDragged: boolean;
|
|
678
1029
|
shouldCacheIgnoreZoom: boolean;
|
|
679
1030
|
toast: {
|
|
680
1031
|
message: string;
|
|
@@ -682,7 +1033,7 @@ export declare const actionZoomToFit: {
|
|
|
682
1033
|
duration?: number | undefined;
|
|
683
1034
|
} | null;
|
|
684
1035
|
zenModeEnabled: boolean;
|
|
685
|
-
theme:
|
|
1036
|
+
theme: import("../element/types").Theme;
|
|
686
1037
|
gridSize: number | null;
|
|
687
1038
|
viewModeEnabled: boolean;
|
|
688
1039
|
selectedGroupIds: {
|
|
@@ -705,14 +1056,20 @@ export declare const actionZoomToFit: {
|
|
|
705
1056
|
data: import("../charts").Spreadsheet;
|
|
706
1057
|
};
|
|
707
1058
|
pendingImageElementId: string | null;
|
|
708
|
-
showHyperlinkPopup: false | "
|
|
1059
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
709
1060
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1061
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1062
|
+
originSnapOffset: {
|
|
1063
|
+
x: number;
|
|
1064
|
+
y: number;
|
|
1065
|
+
} | null;
|
|
1066
|
+
objectsSnapModeEnabled: boolean;
|
|
710
1067
|
};
|
|
711
1068
|
commitToHistory: boolean;
|
|
712
1069
|
};
|
|
713
|
-
keyTest: (event:
|
|
1070
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
714
1071
|
} & {
|
|
715
|
-
keyTest?: ((event:
|
|
1072
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
716
1073
|
};
|
|
717
1074
|
export declare const actionToggleTheme: {
|
|
718
1075
|
name: "toggleTheme";
|
|
@@ -730,7 +1087,11 @@ export declare const actionToggleTheme: {
|
|
|
730
1087
|
} | null;
|
|
731
1088
|
showWelcomeScreen: boolean;
|
|
732
1089
|
isLoading: boolean;
|
|
733
|
-
errorMessage:
|
|
1090
|
+
errorMessage: import("react").ReactNode;
|
|
1091
|
+
activeEmbeddable: {
|
|
1092
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
1093
|
+
state: "active" | "hover";
|
|
1094
|
+
} | null;
|
|
734
1095
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
735
1096
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
736
1097
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -738,19 +1099,21 @@ export declare const actionToggleTheme: {
|
|
|
738
1099
|
isBindingEnabled: boolean;
|
|
739
1100
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
740
1101
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1102
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1103
|
+
frameRendering: {
|
|
1104
|
+
enabled: boolean;
|
|
1105
|
+
name: boolean;
|
|
1106
|
+
outline: boolean;
|
|
1107
|
+
clip: boolean;
|
|
1108
|
+
};
|
|
1109
|
+
editingFrame: string | null;
|
|
1110
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
741
1111
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
742
1112
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
743
1113
|
activeTool: {
|
|
744
|
-
|
|
745
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
746
|
-
locked: boolean;
|
|
747
|
-
customType: null;
|
|
748
|
-
} | {
|
|
749
|
-
type: "custom";
|
|
750
|
-
customType: string;
|
|
751
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
1114
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
752
1115
|
locked: boolean;
|
|
753
|
-
};
|
|
1116
|
+
} & import("../types").ActiveTool;
|
|
754
1117
|
penMode: boolean;
|
|
755
1118
|
penDetected: boolean;
|
|
756
1119
|
exportBackground: boolean;
|
|
@@ -782,17 +1145,21 @@ export declare const actionToggleTheme: {
|
|
|
782
1145
|
value: NormalizedZoomValue;
|
|
783
1146
|
}>;
|
|
784
1147
|
openMenu: "canvas" | "shape" | null;
|
|
785
|
-
openPopup: "
|
|
786
|
-
openSidebar:
|
|
1148
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1149
|
+
openSidebar: {
|
|
1150
|
+
name: string;
|
|
1151
|
+
tab?: string | undefined;
|
|
1152
|
+
} | null;
|
|
787
1153
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
788
|
-
|
|
1154
|
+
defaultSidebarDockedPreference: boolean;
|
|
789
1155
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
790
|
-
selectedElementIds: {
|
|
791
|
-
[id: string]:
|
|
792
|
-
}
|
|
1156
|
+
selectedElementIds: Readonly<{
|
|
1157
|
+
[id: string]: true;
|
|
1158
|
+
}>;
|
|
793
1159
|
previousSelectedElementIds: {
|
|
794
|
-
[id: string]:
|
|
1160
|
+
[id: string]: true;
|
|
795
1161
|
};
|
|
1162
|
+
selectedElementsAreBeingDragged: boolean;
|
|
796
1163
|
shouldCacheIgnoreZoom: boolean;
|
|
797
1164
|
toast: {
|
|
798
1165
|
message: string;
|
|
@@ -822,18 +1189,24 @@ export declare const actionToggleTheme: {
|
|
|
822
1189
|
data: import("../charts").Spreadsheet;
|
|
823
1190
|
};
|
|
824
1191
|
pendingImageElementId: string | null;
|
|
825
|
-
showHyperlinkPopup: false | "
|
|
1192
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
826
1193
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1194
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1195
|
+
originSnapOffset: {
|
|
1196
|
+
x: number;
|
|
1197
|
+
y: number;
|
|
1198
|
+
} | null;
|
|
1199
|
+
objectsSnapModeEnabled: boolean;
|
|
827
1200
|
};
|
|
828
1201
|
commitToHistory: false;
|
|
829
1202
|
};
|
|
830
|
-
keyTest: (event:
|
|
1203
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
831
1204
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
832
1205
|
} & {
|
|
833
|
-
keyTest?: ((event:
|
|
1206
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
834
1207
|
};
|
|
835
|
-
export declare const
|
|
836
|
-
name: "
|
|
1208
|
+
export declare const actionToggleEraserTool: {
|
|
1209
|
+
name: "toggleEraserTool";
|
|
837
1210
|
trackEvent: {
|
|
838
1211
|
category: "toolbar";
|
|
839
1212
|
};
|
|
@@ -841,17 +1214,136 @@ export declare const actionErase: {
|
|
|
841
1214
|
appState: {
|
|
842
1215
|
selectedElementIds: {};
|
|
843
1216
|
selectedGroupIds: {};
|
|
1217
|
+
activeEmbeddable: null;
|
|
844
1218
|
activeTool: {
|
|
845
|
-
|
|
846
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
1219
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
847
1220
|
locked: boolean;
|
|
848
|
-
|
|
1221
|
+
} & import("../types").ActiveTool;
|
|
1222
|
+
contextMenu: {
|
|
1223
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1224
|
+
top: number;
|
|
1225
|
+
left: number;
|
|
1226
|
+
} | null;
|
|
1227
|
+
showWelcomeScreen: boolean;
|
|
1228
|
+
isLoading: boolean;
|
|
1229
|
+
errorMessage: import("react").ReactNode;
|
|
1230
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1231
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1232
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
1233
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1234
|
+
isBindingEnabled: boolean;
|
|
1235
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
1236
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1237
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1238
|
+
frameRendering: {
|
|
1239
|
+
enabled: boolean;
|
|
1240
|
+
name: boolean;
|
|
1241
|
+
outline: boolean;
|
|
1242
|
+
clip: boolean;
|
|
1243
|
+
};
|
|
1244
|
+
editingFrame: string | null;
|
|
1245
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
1246
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1247
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1248
|
+
penMode: boolean;
|
|
1249
|
+
penDetected: boolean;
|
|
1250
|
+
exportBackground: boolean;
|
|
1251
|
+
exportEmbedScene: boolean;
|
|
1252
|
+
exportWithDarkMode: boolean;
|
|
1253
|
+
exportScale: number;
|
|
1254
|
+
currentItemStrokeColor: string;
|
|
1255
|
+
currentItemBackgroundColor: string;
|
|
1256
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
1257
|
+
currentItemStrokeWidth: number;
|
|
1258
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
1259
|
+
currentItemRoughness: number;
|
|
1260
|
+
currentItemOpacity: number;
|
|
1261
|
+
currentItemFontFamily: number;
|
|
1262
|
+
currentItemFontSize: number;
|
|
1263
|
+
currentItemTextAlign: string;
|
|
1264
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1265
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1266
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1267
|
+
viewBackgroundColor: string;
|
|
1268
|
+
scrollX: number;
|
|
1269
|
+
scrollY: number;
|
|
1270
|
+
cursorButton: "up" | "down";
|
|
1271
|
+
scrolledOutside: boolean;
|
|
1272
|
+
name: string;
|
|
1273
|
+
isResizing: boolean;
|
|
1274
|
+
isRotating: boolean;
|
|
1275
|
+
zoom: Readonly<{
|
|
1276
|
+
value: NormalizedZoomValue;
|
|
1277
|
+
}>;
|
|
1278
|
+
openMenu: "canvas" | "shape" | null;
|
|
1279
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1280
|
+
openSidebar: {
|
|
1281
|
+
name: string;
|
|
1282
|
+
tab?: string | undefined;
|
|
1283
|
+
} | null;
|
|
1284
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1285
|
+
defaultSidebarDockedPreference: boolean;
|
|
1286
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
1287
|
+
previousSelectedElementIds: {
|
|
1288
|
+
[id: string]: true;
|
|
1289
|
+
};
|
|
1290
|
+
selectedElementsAreBeingDragged: boolean;
|
|
1291
|
+
shouldCacheIgnoreZoom: boolean;
|
|
1292
|
+
toast: {
|
|
1293
|
+
message: string;
|
|
1294
|
+
closable?: boolean | undefined;
|
|
1295
|
+
duration?: number | undefined;
|
|
1296
|
+
} | null;
|
|
1297
|
+
zenModeEnabled: boolean;
|
|
1298
|
+
theme: import("../element/types").Theme;
|
|
1299
|
+
gridSize: number | null;
|
|
1300
|
+
viewModeEnabled: boolean;
|
|
1301
|
+
editingGroupId: string | null;
|
|
1302
|
+
width: number;
|
|
1303
|
+
height: number;
|
|
1304
|
+
offsetTop: number;
|
|
1305
|
+
offsetLeft: number;
|
|
1306
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1307
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
1308
|
+
showStats: boolean;
|
|
1309
|
+
currentChartType: import("../element/types").ChartType;
|
|
1310
|
+
pasteDialog: {
|
|
1311
|
+
shown: false;
|
|
1312
|
+
data: null;
|
|
849
1313
|
} | {
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
853
|
-
locked: boolean;
|
|
1314
|
+
shown: true;
|
|
1315
|
+
data: import("../charts").Spreadsheet;
|
|
854
1316
|
};
|
|
1317
|
+
pendingImageElementId: string | null;
|
|
1318
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
1319
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1320
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1321
|
+
originSnapOffset: {
|
|
1322
|
+
x: number;
|
|
1323
|
+
y: number;
|
|
1324
|
+
} | null;
|
|
1325
|
+
objectsSnapModeEnabled: boolean;
|
|
1326
|
+
};
|
|
1327
|
+
commitToHistory: true;
|
|
1328
|
+
};
|
|
1329
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
1330
|
+
} & {
|
|
1331
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
1332
|
+
};
|
|
1333
|
+
export declare const actionToggleHandTool: {
|
|
1334
|
+
name: "toggleHandTool";
|
|
1335
|
+
trackEvent: {
|
|
1336
|
+
category: "toolbar";
|
|
1337
|
+
};
|
|
1338
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
1339
|
+
appState: {
|
|
1340
|
+
selectedElementIds: {};
|
|
1341
|
+
selectedGroupIds: {};
|
|
1342
|
+
activeEmbeddable: null;
|
|
1343
|
+
activeTool: {
|
|
1344
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
1345
|
+
locked: boolean;
|
|
1346
|
+
} & import("../types").ActiveTool;
|
|
855
1347
|
contextMenu: {
|
|
856
1348
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
857
1349
|
top: number;
|
|
@@ -859,7 +1351,7 @@ export declare const actionErase: {
|
|
|
859
1351
|
} | null;
|
|
860
1352
|
showWelcomeScreen: boolean;
|
|
861
1353
|
isLoading: boolean;
|
|
862
|
-
errorMessage:
|
|
1354
|
+
errorMessage: import("react").ReactNode;
|
|
863
1355
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
864
1356
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
865
1357
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -867,6 +1359,15 @@ export declare const actionErase: {
|
|
|
867
1359
|
isBindingEnabled: boolean;
|
|
868
1360
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
869
1361
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
1362
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
1363
|
+
frameRendering: {
|
|
1364
|
+
enabled: boolean;
|
|
1365
|
+
name: boolean;
|
|
1366
|
+
outline: boolean;
|
|
1367
|
+
clip: boolean;
|
|
1368
|
+
};
|
|
1369
|
+
editingFrame: string | null;
|
|
1370
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
870
1371
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
871
1372
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
872
1373
|
penMode: boolean;
|
|
@@ -900,14 +1401,18 @@ export declare const actionErase: {
|
|
|
900
1401
|
value: NormalizedZoomValue;
|
|
901
1402
|
}>;
|
|
902
1403
|
openMenu: "canvas" | "shape" | null;
|
|
903
|
-
openPopup: "
|
|
904
|
-
openSidebar:
|
|
1404
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1405
|
+
openSidebar: {
|
|
1406
|
+
name: string;
|
|
1407
|
+
tab?: string | undefined;
|
|
1408
|
+
} | null;
|
|
905
1409
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
906
|
-
|
|
1410
|
+
defaultSidebarDockedPreference: boolean;
|
|
907
1411
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
908
1412
|
previousSelectedElementIds: {
|
|
909
|
-
[id: string]:
|
|
1413
|
+
[id: string]: true;
|
|
910
1414
|
};
|
|
1415
|
+
selectedElementsAreBeingDragged: boolean;
|
|
911
1416
|
shouldCacheIgnoreZoom: boolean;
|
|
912
1417
|
toast: {
|
|
913
1418
|
message: string;
|
|
@@ -915,7 +1420,7 @@ export declare const actionErase: {
|
|
|
915
1420
|
duration?: number | undefined;
|
|
916
1421
|
} | null;
|
|
917
1422
|
zenModeEnabled: boolean;
|
|
918
|
-
theme:
|
|
1423
|
+
theme: import("../element/types").Theme;
|
|
919
1424
|
gridSize: number | null;
|
|
920
1425
|
viewModeEnabled: boolean;
|
|
921
1426
|
editingGroupId: string | null;
|
|
@@ -935,13 +1440,18 @@ export declare const actionErase: {
|
|
|
935
1440
|
data: import("../charts").Spreadsheet;
|
|
936
1441
|
};
|
|
937
1442
|
pendingImageElementId: string | null;
|
|
938
|
-
showHyperlinkPopup: false | "
|
|
1443
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
939
1444
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1445
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1446
|
+
originSnapOffset: {
|
|
1447
|
+
x: number;
|
|
1448
|
+
y: number;
|
|
1449
|
+
} | null;
|
|
1450
|
+
objectsSnapModeEnabled: boolean;
|
|
940
1451
|
};
|
|
941
1452
|
commitToHistory: true;
|
|
942
1453
|
};
|
|
943
|
-
keyTest: (event:
|
|
944
|
-
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1454
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
945
1455
|
} & {
|
|
946
|
-
keyTest?: ((event:
|
|
1456
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
947
1457
|
};
|