@zsviczian/excalidraw 0.18.0-6 → 0.18.0-60
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/dist/excalidraw.development.js +757 -504
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -2
- package/dist/styles.development.css +1080 -437
- package/dist/styles.production.css +26 -22
- package/package.json +15 -4
- package/types/common/src/commonObsidianUtils.d.ts +20 -0
- package/types/common/src/constants.d.ts +42 -18
- package/types/common/src/editorInterface.d.ts +35 -0
- package/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/types/common/src/font-metadata.d.ts +4 -2
- package/types/common/src/index.d.ts +4 -0
- package/types/common/src/utility-types.d.ts +5 -0
- package/types/common/src/utils.d.ts +25 -6
- package/types/{excalidraw → common/src}/visualdebug.d.ts +2 -2
- package/types/{excalidraw/scene → element/src}/Scene.d.ts +16 -15
- package/types/element/src/align.d.ts +4 -3
- package/types/element/src/binding.d.ts +62 -41
- package/types/element/src/bounds.d.ts +14 -6
- package/types/element/src/collision.d.ts +23 -13
- package/types/element/src/cropElement.d.ts +1 -1
- package/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +77 -40
- package/types/element/src/distance.d.ts +2 -2
- package/types/element/src/distribute.d.ts +2 -1
- package/types/element/src/dragElements.d.ts +3 -2
- package/types/element/src/duplicate.d.ts +10 -13
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/flowchart.d.ts +3 -2
- package/types/element/src/fractionalIndex.d.ts +9 -3
- package/types/element/src/frame.d.ts +5 -4
- package/types/element/src/groups.d.ts +1 -0
- package/types/element/src/index.d.ts +44 -5
- package/types/element/src/linearElementEditor.d.ts +34 -50
- package/types/element/src/mutateElement.d.ts +11 -3
- package/types/element/src/newElement.d.ts +6 -4
- package/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/types/element/src/renderElement.d.ts +5 -2
- package/types/element/src/resizeElements.d.ts +6 -5
- package/types/element/src/resizeTest.d.ts +5 -4
- package/types/element/src/selection.d.ts +11 -5
- package/types/element/src/shape.d.ts +42 -0
- package/types/element/src/sizeHelpers.d.ts +2 -2
- package/types/element/src/store.d.ts +237 -0
- package/types/element/src/textElement.d.ts +4 -3
- package/types/element/src/transformHandles.d.ts +5 -4
- package/types/element/src/typeChecks.d.ts +20 -3
- package/types/element/src/types.d.ts +31 -12
- package/types/element/src/utils.d.ts +17 -6
- package/types/element/src/zindex.d.ts +8 -2
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +88 -58
- package/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +61 -41
- package/types/excalidraw/actions/actionCanvas.d.ts +430 -519
- package/types/excalidraw/actions/actionClipboard.d.ts +81 -944
- package/types/excalidraw/actions/actionCropEditor.d.ts +30 -20
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +97 -68
- package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLink.d.ts +28 -20
- package/types/excalidraw/actions/actionElementLock.d.ts +73 -54
- package/types/excalidraw/actions/actionEmbeddable.d.ts +30 -20
- package/types/excalidraw/actions/actionExport.d.ts +142 -1185
- package/types/excalidraw/actions/actionFinalize.d.ts +10 -424
- package/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +176 -129
- package/types/excalidraw/actions/actionGroup.d.ts +60 -40
- package/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +564 -22
- package/types/excalidraw/actions/actionLink.d.ts +27 -17
- package/types/excalidraw/actions/actionMenu.d.ts +27 -457
- package/types/excalidraw/actions/actionNavigate.d.ts +21 -431
- package/types/excalidraw/actions/actionProperties.d.ts +169 -2702
- package/types/excalidraw/actions/actionSelectAll.d.ts +30 -20
- package/types/excalidraw/actions/actionStyles.d.ts +31 -21
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +27 -224
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/types/excalidraw/actions/actionToggleStats.d.ts +29 -19
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +30 -20
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +30 -20
- package/types/excalidraw/actions/actionTrayMenu.d.ts +229 -0
- package/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/types/excalidraw/actions/index.d.ts +4 -2
- package/types/excalidraw/actions/manager.d.ts +1 -1
- package/types/excalidraw/actions/register.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +7 -6
- package/types/excalidraw/appState.d.ts +22 -7
- package/types/excalidraw/clipboard.d.ts +68 -5
- package/types/excalidraw/components/Actions.d.ts +20 -7
- package/types/excalidraw/components/App.d.ts +68 -46
- package/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +4 -3
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +3 -3
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +3 -2
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
- package/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
- package/types/excalidraw/components/Ellipsify.d.ts +3 -0
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/types/excalidraw/components/FixedSideContainer.d.ts +2 -1
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/types/excalidraw/components/LinkButton.d.ts +4 -0
- package/types/excalidraw/components/MobileMenu.d.ts +4 -5
- package/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/types/excalidraw/components/Popover.d.ts +2 -1
- package/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/types/excalidraw/components/Range.d.ts +3 -3
- package/types/excalidraw/components/Section.d.ts +1 -0
- package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
- package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/types/excalidraw/components/Stats/utils.d.ts +4 -11
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/types/excalidraw/components/TextField.d.ts +1 -0
- package/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/types/excalidraw/components/TrayMenu.d.ts +26 -0
- package/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +7 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
- package/types/excalidraw/components/icons.d.ts +17 -0
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +14 -1
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
- package/types/excalidraw/components/shapes.d.ts +115 -5
- package/types/excalidraw/data/blob.d.ts +3 -7
- package/types/excalidraw/data/reconcile.d.ts +1 -0
- package/types/excalidraw/data/restore.d.ts +7 -2
- package/types/excalidraw/data/transform.d.ts +1 -1
- package/types/excalidraw/data/types.d.ts +4 -1
- package/types/excalidraw/editor-jotai.d.ts +6 -6
- package/types/excalidraw/eraser/index.d.ts +0 -2
- package/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/types/excalidraw/history.d.ts +30 -22
- package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
- package/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/types/excalidraw/index.d.ts +16 -15
- package/types/excalidraw/lasso/index.d.ts +1 -0
- package/types/excalidraw/lasso/utils.d.ts +2 -1
- package/types/excalidraw/obsidianUtils.d.ts +22 -9
- package/types/excalidraw/renderer/animation.d.ts +12 -0
- package/types/excalidraw/renderer/helpers.d.ts +3 -2
- package/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
- package/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/types/excalidraw/scene/Renderer.d.ts +1 -2
- package/types/excalidraw/scene/index.d.ts +2 -2
- package/types/excalidraw/scene/scrollbars.d.ts +2 -3
- package/types/excalidraw/scene/types.d.ts +17 -3
- package/types/excalidraw/shortcut.d.ts +1 -0
- package/types/excalidraw/snapping.d.ts +2 -2
- package/types/excalidraw/types.d.ts +83 -33
- package/types/excalidraw/webpack.dev.config.d.ts +2 -0
- package/types/excalidraw/webpack.prod.config.d.ts +2 -0
- package/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
- package/types/math/src/angle.d.ts +2 -0
- package/types/math/src/constants.d.ts +3 -0
- package/types/math/src/curve.d.ts +34 -0
- package/types/math/src/index.d.ts +1 -0
- package/types/math/src/point.d.ts +1 -1
- package/types/math/src/rectangle.d.ts +2 -0
- package/types/math/src/segment.d.ts +1 -0
- package/types/math/src/vector.d.ts +8 -2
- package/types/utils/src/bbox.d.ts +1 -1
- package/types/utils/src/index.d.ts +1 -1
- package/types/utils/src/withinBounds.d.ts +1 -1
- package/types/element/src/Shape.d.ts +0 -17
- package/types/element/src/ShapeCache.d.ts +0 -25
- package/types/element/src/shapes.d.ts +0 -23
- package/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/types/excalidraw/store.d.ts +0 -129
- package/types/utils/src/collision.d.ts +0 -8
|
@@ -28,23 +28,28 @@ export declare const actionToggleZenMode: {
|
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
30
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
|
-
|
|
31
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
32
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
33
33
|
frameRendering: {
|
|
34
34
|
enabled: boolean;
|
|
35
35
|
name: boolean;
|
|
36
36
|
outline: boolean;
|
|
37
37
|
clip: boolean;
|
|
38
|
+
markerName: boolean;
|
|
39
|
+
markerEnabled: boolean;
|
|
38
40
|
};
|
|
39
41
|
editingFrame: string | null;
|
|
40
42
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
41
43
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
42
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null;
|
|
43
44
|
activeTool: {
|
|
44
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
45
46
|
locked: boolean;
|
|
46
47
|
fromSelection: boolean;
|
|
47
48
|
} & import("../types").ActiveTool;
|
|
49
|
+
preferredSelectionTool: {
|
|
50
|
+
type: "selection" | "lasso";
|
|
51
|
+
initialized: boolean;
|
|
52
|
+
};
|
|
48
53
|
penMode: boolean;
|
|
49
54
|
penDetected: boolean;
|
|
50
55
|
exportBackground: boolean;
|
|
@@ -66,6 +71,7 @@ export declare const actionToggleZenMode: {
|
|
|
66
71
|
currentHoveredFontFamily: number | null;
|
|
67
72
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
68
73
|
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
74
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
69
75
|
viewBackgroundColor: string;
|
|
70
76
|
scrollX: number;
|
|
71
77
|
scrollY: number;
|
|
@@ -77,19 +83,21 @@ export declare const actionToggleZenMode: {
|
|
|
77
83
|
zoom: Readonly<{
|
|
78
84
|
value: import("../types").NormalizedZoomValue;
|
|
79
85
|
}>;
|
|
80
|
-
openMenu: "
|
|
81
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
86
|
+
openMenu: "canvas" | "shape" | null;
|
|
87
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
82
88
|
openSidebar: {
|
|
83
89
|
name: string;
|
|
84
90
|
tab?: string | undefined;
|
|
85
91
|
} | null;
|
|
86
92
|
openDialog: {
|
|
87
|
-
name: "
|
|
93
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
88
94
|
} | {
|
|
89
95
|
name: "ttd";
|
|
90
96
|
tab: "mermaid" | "text-to-diagram";
|
|
91
97
|
} | {
|
|
92
98
|
name: "commandPalette";
|
|
99
|
+
} | {
|
|
100
|
+
name: "settings";
|
|
93
101
|
} | {
|
|
94
102
|
name: "elementLinkSelector";
|
|
95
103
|
sourceElementId: string;
|
|
@@ -158,10 +166,8 @@ export declare const actionToggleZenMode: {
|
|
|
158
166
|
shown: true;
|
|
159
167
|
data: import("../charts").Spreadsheet;
|
|
160
168
|
};
|
|
161
|
-
|
|
162
|
-
showHyperlinkPopup: false | "editor" | "info";
|
|
169
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
170
|
linkOpacity: number;
|
|
164
|
-
trayModeEnabled: boolean;
|
|
165
171
|
colorPalette?: {
|
|
166
172
|
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
167
173
|
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
@@ -174,6 +180,7 @@ export declare const actionToggleZenMode: {
|
|
|
174
180
|
} | undefined;
|
|
175
181
|
allowWheelZoom?: boolean | undefined;
|
|
176
182
|
allowPinchZoom?: boolean | undefined;
|
|
183
|
+
disableContextMenu: boolean;
|
|
177
184
|
pinnedScripts?: string[] | undefined;
|
|
178
185
|
customPens?: any[] | undefined;
|
|
179
186
|
currentStrokeOptions?: any;
|
|
@@ -182,6 +189,10 @@ export declare const actionToggleZenMode: {
|
|
|
182
189
|
Bold: string;
|
|
183
190
|
Regular: string;
|
|
184
191
|
};
|
|
192
|
+
gridDirection: {
|
|
193
|
+
horizontal: boolean;
|
|
194
|
+
vertical: boolean;
|
|
195
|
+
};
|
|
185
196
|
highlightSearchResult: boolean;
|
|
186
197
|
dynamicStyle: {
|
|
187
198
|
[x: string]: string;
|
|
@@ -192,7 +203,7 @@ export declare const actionToggleZenMode: {
|
|
|
192
203
|
nameColor: string;
|
|
193
204
|
};
|
|
194
205
|
invertBindingBehaviour: boolean;
|
|
195
|
-
selectedLinearElement: import("@excalidraw/element
|
|
206
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
196
207
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
197
208
|
originSnapOffset: {
|
|
198
209
|
x: number;
|
|
@@ -203,21 +214,20 @@ export declare const actionToggleZenMode: {
|
|
|
203
214
|
followedBy: Set<import("../types").SocketId>;
|
|
204
215
|
isCropping: boolean;
|
|
205
216
|
croppingElementId: string | null;
|
|
206
|
-
searchMatches:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}[];
|
|
217
|
+
searchMatches: Readonly<{
|
|
218
|
+
focusedId: string | null;
|
|
219
|
+
matches: readonly import("../types").SearchMatch[];
|
|
220
|
+
}> | null;
|
|
221
|
+
activeLockedId: string | null;
|
|
222
|
+
lockedMultiSelections: {
|
|
223
|
+
[groupId: string]: true;
|
|
224
|
+
};
|
|
225
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
216
226
|
};
|
|
217
227
|
captureUpdate: "EVENTUALLY";
|
|
218
228
|
};
|
|
219
229
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
220
|
-
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
230
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
221
231
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
222
232
|
} & {
|
|
223
233
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export declare const actionToggleTrayEditMenu: {
|
|
2
|
+
name: "toggleTrayEditMenu";
|
|
3
|
+
label: string;
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "menu";
|
|
6
|
+
};
|
|
7
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
8
|
+
appState: {
|
|
9
|
+
openMenu: "shape" | null;
|
|
10
|
+
contextMenu: {
|
|
11
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
} | null;
|
|
15
|
+
showWelcomeScreen: boolean;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
errorMessage: import("react").ReactNode;
|
|
18
|
+
activeEmbeddable: {
|
|
19
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
20
|
+
state: "active" | "hover";
|
|
21
|
+
} | null;
|
|
22
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
23
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
24
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
25
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
26
|
+
isBindingEnabled: boolean;
|
|
27
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
28
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
29
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
30
|
+
frameRendering: {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
name: boolean;
|
|
33
|
+
outline: boolean;
|
|
34
|
+
clip: boolean;
|
|
35
|
+
markerName: boolean;
|
|
36
|
+
markerEnabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
editingFrame: string | null;
|
|
39
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
40
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
41
|
+
activeTool: {
|
|
42
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
43
|
+
locked: boolean;
|
|
44
|
+
fromSelection: boolean;
|
|
45
|
+
} & import("../types").ActiveTool;
|
|
46
|
+
preferredSelectionTool: {
|
|
47
|
+
type: "selection" | "lasso";
|
|
48
|
+
initialized: boolean;
|
|
49
|
+
};
|
|
50
|
+
penMode: boolean;
|
|
51
|
+
penDetected: boolean;
|
|
52
|
+
exportBackground: boolean;
|
|
53
|
+
exportEmbedScene: boolean;
|
|
54
|
+
exportWithDarkMode: boolean;
|
|
55
|
+
exportScale: number;
|
|
56
|
+
currentItemStrokeColor: string;
|
|
57
|
+
currentItemBackgroundColor: string;
|
|
58
|
+
currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
|
|
59
|
+
currentItemStrokeWidth: number;
|
|
60
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
61
|
+
currentItemRoughness: number;
|
|
62
|
+
currentItemOpacity: number;
|
|
63
|
+
currentItemFontFamily: number;
|
|
64
|
+
currentItemFontSize: number;
|
|
65
|
+
currentItemTextAlign: string;
|
|
66
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
67
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
68
|
+
currentHoveredFontFamily: number | null;
|
|
69
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
70
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
71
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
72
|
+
viewBackgroundColor: string;
|
|
73
|
+
scrollX: number;
|
|
74
|
+
scrollY: number;
|
|
75
|
+
cursorButton: "up" | "down";
|
|
76
|
+
scrolledOutside: boolean;
|
|
77
|
+
name: string | null;
|
|
78
|
+
isResizing: boolean;
|
|
79
|
+
isRotating: boolean;
|
|
80
|
+
zoom: Readonly<{
|
|
81
|
+
value: import("../types").NormalizedZoomValue;
|
|
82
|
+
}>;
|
|
83
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
84
|
+
openSidebar: {
|
|
85
|
+
name: string;
|
|
86
|
+
tab?: string | undefined;
|
|
87
|
+
} | null;
|
|
88
|
+
openDialog: {
|
|
89
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
90
|
+
} | {
|
|
91
|
+
name: "ttd";
|
|
92
|
+
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
95
|
+
} | {
|
|
96
|
+
name: "settings";
|
|
97
|
+
} | {
|
|
98
|
+
name: "elementLinkSelector";
|
|
99
|
+
sourceElementId: string;
|
|
100
|
+
} | null;
|
|
101
|
+
defaultSidebarDockedPreference: boolean;
|
|
102
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
103
|
+
selectedElementIds: Readonly<{
|
|
104
|
+
[id: string]: true;
|
|
105
|
+
}>;
|
|
106
|
+
hoveredElementIds: Readonly<{
|
|
107
|
+
[id: string]: true;
|
|
108
|
+
}>;
|
|
109
|
+
previousSelectedElementIds: {
|
|
110
|
+
[id: string]: true;
|
|
111
|
+
};
|
|
112
|
+
selectedElementsAreBeingDragged: boolean;
|
|
113
|
+
shouldCacheIgnoreZoom: boolean;
|
|
114
|
+
toast: {
|
|
115
|
+
message: string;
|
|
116
|
+
closable?: boolean | undefined;
|
|
117
|
+
duration?: number | undefined;
|
|
118
|
+
} | null;
|
|
119
|
+
zenModeEnabled: boolean;
|
|
120
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
121
|
+
gridSize: number;
|
|
122
|
+
gridStep: number;
|
|
123
|
+
gridModeEnabled: boolean;
|
|
124
|
+
viewModeEnabled: boolean;
|
|
125
|
+
selectedGroupIds: {
|
|
126
|
+
[groupId: string]: boolean;
|
|
127
|
+
};
|
|
128
|
+
editingGroupId: string | null;
|
|
129
|
+
width: number;
|
|
130
|
+
height: number;
|
|
131
|
+
offsetTop: number;
|
|
132
|
+
offsetLeft: number;
|
|
133
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
134
|
+
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
135
|
+
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
136
|
+
button?: "up" | "down" | undefined;
|
|
137
|
+
selectedElementIds?: Readonly<{
|
|
138
|
+
[id: string]: true;
|
|
139
|
+
}> | undefined;
|
|
140
|
+
username?: string | null | undefined;
|
|
141
|
+
userState?: import("@excalidraw/common").UserIdleState | undefined;
|
|
142
|
+
color?: {
|
|
143
|
+
background: string;
|
|
144
|
+
stroke: string;
|
|
145
|
+
} | undefined;
|
|
146
|
+
avatarUrl?: string | undefined;
|
|
147
|
+
id?: string | undefined;
|
|
148
|
+
socketId?: import("../types").SocketId | undefined;
|
|
149
|
+
isCurrentUser?: boolean | undefined;
|
|
150
|
+
isInCall?: boolean | undefined;
|
|
151
|
+
isSpeaking?: boolean | undefined;
|
|
152
|
+
isMuted?: boolean | undefined;
|
|
153
|
+
}>>;
|
|
154
|
+
stats: {
|
|
155
|
+
open: boolean;
|
|
156
|
+
panels: number;
|
|
157
|
+
};
|
|
158
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
159
|
+
pasteDialog: {
|
|
160
|
+
shown: false;
|
|
161
|
+
data: null;
|
|
162
|
+
} | {
|
|
163
|
+
shown: true;
|
|
164
|
+
data: import("../charts").Spreadsheet;
|
|
165
|
+
};
|
|
166
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
167
|
+
linkOpacity: number;
|
|
168
|
+
colorPalette?: {
|
|
169
|
+
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
170
|
+
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
171
|
+
elementStroke: import("@excalidraw/common").ColorPaletteCustom;
|
|
172
|
+
topPicks: {
|
|
173
|
+
canvasBackground: [string, string, string, string, string];
|
|
174
|
+
elementStroke: [string, string, string, string, string];
|
|
175
|
+
elementBackground: [string, string, string, string, string];
|
|
176
|
+
};
|
|
177
|
+
} | undefined;
|
|
178
|
+
allowWheelZoom?: boolean | undefined;
|
|
179
|
+
allowPinchZoom?: boolean | undefined;
|
|
180
|
+
disableContextMenu: boolean;
|
|
181
|
+
pinnedScripts?: string[] | undefined;
|
|
182
|
+
customPens?: any[] | undefined;
|
|
183
|
+
currentStrokeOptions?: any;
|
|
184
|
+
resetCustomPen?: any;
|
|
185
|
+
gridColor: {
|
|
186
|
+
Bold: string;
|
|
187
|
+
Regular: string;
|
|
188
|
+
};
|
|
189
|
+
gridDirection: {
|
|
190
|
+
horizontal: boolean;
|
|
191
|
+
vertical: boolean;
|
|
192
|
+
};
|
|
193
|
+
highlightSearchResult: boolean;
|
|
194
|
+
dynamicStyle: {
|
|
195
|
+
[x: string]: string;
|
|
196
|
+
};
|
|
197
|
+
frameColor: {
|
|
198
|
+
stroke: string;
|
|
199
|
+
fill: string;
|
|
200
|
+
nameColor: string;
|
|
201
|
+
};
|
|
202
|
+
invertBindingBehaviour: boolean;
|
|
203
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
204
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
205
|
+
originSnapOffset: {
|
|
206
|
+
x: number;
|
|
207
|
+
y: number;
|
|
208
|
+
} | null;
|
|
209
|
+
objectsSnapModeEnabled: boolean;
|
|
210
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
211
|
+
followedBy: Set<import("../types").SocketId>;
|
|
212
|
+
isCropping: boolean;
|
|
213
|
+
croppingElementId: string | null;
|
|
214
|
+
searchMatches: Readonly<{
|
|
215
|
+
focusedId: string | null;
|
|
216
|
+
matches: readonly import("../types").SearchMatch[];
|
|
217
|
+
}> | null;
|
|
218
|
+
activeLockedId: string | null;
|
|
219
|
+
lockedMultiSelections: {
|
|
220
|
+
[groupId: string]: true;
|
|
221
|
+
};
|
|
222
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
223
|
+
};
|
|
224
|
+
captureUpdate: "EVENTUALLY";
|
|
225
|
+
};
|
|
226
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
227
|
+
} & {
|
|
228
|
+
keyTest?: undefined;
|
|
229
|
+
};
|
|
@@ -6,7 +6,7 @@ export declare const actionSendBackward: {
|
|
|
6
6
|
trackEvent: {
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value:
|
|
9
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
|
|
10
10
|
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
|
|
11
11
|
appState: Readonly<import("../types").AppState>;
|
|
12
12
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -25,7 +25,7 @@ export declare const actionBringForward: {
|
|
|
25
25
|
trackEvent: {
|
|
26
26
|
category: "element";
|
|
27
27
|
};
|
|
28
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value:
|
|
28
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
|
|
29
29
|
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[];
|
|
30
30
|
appState: Readonly<import("../types").AppState>;
|
|
31
31
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -2,13 +2,15 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
|
|
|
2
2
|
export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
|
|
3
3
|
export { actionSelectAll } from "./actionSelectAll";
|
|
4
4
|
export { actionDuplicateSelection } from "./actionDuplicateSelection";
|
|
5
|
-
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, zoomToFitElements, } from "./actionCanvas";
|
|
7
7
|
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
8
|
export { actionFinalize } from "./actionFinalize";
|
|
9
9
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
10
|
+
export { actionToggleFrameRole } from "./actionProperties";
|
|
10
11
|
export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
11
|
-
export {
|
|
12
|
+
export { actionToggleTrayEditMenu } from "./actionTrayMenu";
|
|
13
|
+
export { actionShortcuts } from "./actionMenu";
|
|
12
14
|
export { actionGroup, actionUngroup } from "./actionGroup";
|
|
13
15
|
export { actionGoToCollaborator } from "./actionNavigate";
|
|
14
16
|
export { actionAddToLibrary } from "./actionAddToLibrary";
|
|
@@ -3,7 +3,7 @@ import type { OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
|
3
3
|
import type { AppClassProperties, AppState } from "../types";
|
|
4
4
|
import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
5
5
|
export declare class ActionManager {
|
|
6
|
-
actions: Record<ActionName, Action
|
|
6
|
+
actions: Record<ActionName, Action<any>>;
|
|
7
7
|
updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
|
|
8
8
|
getAppState: () => Readonly<AppState>;
|
|
9
9
|
getElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from "./types";
|
|
2
2
|
export declare let actions: readonly Action[];
|
|
3
|
-
export declare const register: <T extends Action>(action: T) => T & {
|
|
3
|
+
export declare const register: <TData extends unknown, T extends Action<TData> = Action<TData>>(action: T) => T & {
|
|
4
4
|
keyTest?: (unknown extends T["keyTest"] ? never : T["keyTest"]) | undefined;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { CaptureUpdateActionType } from "
|
|
2
|
+
import type { CaptureUpdateActionType } from "@excalidraw/element";
|
|
3
3
|
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import type React from "react";
|
|
5
5
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
@@ -11,10 +11,10 @@ export type ActionResult = {
|
|
|
11
11
|
captureUpdate: CaptureUpdateActionType;
|
|
12
12
|
replaceFiles?: boolean;
|
|
13
13
|
} | false;
|
|
14
|
-
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData:
|
|
14
|
+
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "toggleTrayEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "toggleLaserPointerTool" | "toggleFrameRole" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -22,20 +22,21 @@ export type PanelComponentProps = {
|
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
24
24
|
app: AppClassProperties;
|
|
25
|
+
renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
|
|
25
26
|
};
|
|
26
|
-
export interface Action {
|
|
27
|
+
export interface Action<TData = any> {
|
|
27
28
|
name: ActionName;
|
|
28
29
|
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: AppClassProperties) => string);
|
|
29
30
|
keywords?: string[];
|
|
30
31
|
icon?: React.ReactNode | ((appState: UIAppState, elements: readonly ExcalidrawElement[]) => React.ReactNode);
|
|
31
32
|
PanelComponent?: React.FC<PanelComponentProps>;
|
|
32
|
-
perform: ActionFn
|
|
33
|
+
perform: ActionFn<TData>;
|
|
33
34
|
keyPriority?: number;
|
|
34
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
35
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
36
37
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
37
38
|
trackEvent: false | {
|
|
38
|
-
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
|
|
39
|
+
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
|
|
39
40
|
action?: string;
|
|
40
41
|
predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
|
|
41
42
|
};
|
|
@@ -16,20 +16,22 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
16
16
|
selectedGroupIds?: {
|
|
17
17
|
[groupId: string]: boolean;
|
|
18
18
|
} | undefined;
|
|
19
|
-
selectedLinearElement?: import("@excalidraw/element
|
|
19
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
20
20
|
zenModeEnabled?: boolean | undefined;
|
|
21
|
-
gridModeEnabled?: boolean | undefined;
|
|
22
|
-
objectsSnapModeEnabled?: boolean | undefined;
|
|
23
21
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
24
22
|
exportScale?: number | undefined;
|
|
23
|
+
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
25
24
|
gridSize?: number | undefined;
|
|
26
|
-
gridStep?: number | undefined;
|
|
27
25
|
showWelcomeScreen?: boolean | undefined;
|
|
28
26
|
activeTool?: ({
|
|
29
27
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
30
28
|
locked: boolean;
|
|
31
29
|
fromSelection: boolean;
|
|
32
30
|
} & import("./types").ActiveTool) | undefined;
|
|
31
|
+
preferredSelectionTool?: {
|
|
32
|
+
type: "selection" | "lasso";
|
|
33
|
+
initialized: boolean;
|
|
34
|
+
} | undefined;
|
|
33
35
|
penMode?: boolean | undefined;
|
|
34
36
|
penDetected?: boolean | undefined;
|
|
35
37
|
exportBackground?: boolean | undefined;
|
|
@@ -49,9 +51,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
49
51
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
50
52
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
51
53
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
54
|
+
currentItemFrameRole?: ("marker" | null) | undefined;
|
|
52
55
|
cursorButton?: "up" | "down" | undefined;
|
|
53
56
|
scrolledOutside?: boolean | undefined;
|
|
54
|
-
openMenu?: "
|
|
57
|
+
openMenu?: "canvas" | "shape" | null | undefined;
|
|
55
58
|
openSidebar?: {
|
|
56
59
|
name: string;
|
|
57
60
|
tab?: string | undefined;
|
|
@@ -61,23 +64,35 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
61
64
|
previousSelectedElementIds?: {
|
|
62
65
|
[id: string]: true;
|
|
63
66
|
} | undefined;
|
|
67
|
+
gridStep?: number | undefined;
|
|
68
|
+
gridModeEnabled?: boolean | undefined;
|
|
64
69
|
stats?: {
|
|
65
70
|
open: boolean;
|
|
66
71
|
panels: number;
|
|
67
72
|
} | undefined;
|
|
68
73
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
74
|
+
objectsSnapModeEnabled?: boolean | undefined;
|
|
75
|
+
lockedMultiSelections?: {
|
|
76
|
+
[groupId: string]: true;
|
|
77
|
+
} | undefined;
|
|
69
78
|
};
|
|
70
79
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
71
80
|
viewBackgroundColor?: string | undefined;
|
|
72
|
-
gridModeEnabled?: boolean | undefined;
|
|
73
81
|
gridSize?: number | undefined;
|
|
74
82
|
gridStep?: number | undefined;
|
|
83
|
+
gridModeEnabled?: boolean | undefined;
|
|
84
|
+
lockedMultiSelections?: {
|
|
85
|
+
[groupId: string]: true;
|
|
86
|
+
} | undefined;
|
|
75
87
|
};
|
|
76
88
|
export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
|
|
77
89
|
viewBackgroundColor?: string | undefined;
|
|
78
|
-
gridModeEnabled?: boolean | undefined;
|
|
79
90
|
gridSize?: number | undefined;
|
|
80
91
|
gridStep?: number | undefined;
|
|
92
|
+
gridModeEnabled?: boolean | undefined;
|
|
93
|
+
lockedMultiSelections?: {
|
|
94
|
+
[groupId: string]: true;
|
|
95
|
+
} | undefined;
|
|
81
96
|
};
|
|
82
97
|
export declare const isEraserActive: ({ activeTool, }: {
|
|
83
98
|
activeTool: AppState["activeTool"];
|