@excalidraw/element 0.18.0-0457ac9 → 0.18.0-063e025
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/dev/index.js +1305 -895
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +18 -18
- package/dist/types/common/src/colors.d.ts +1 -1
- package/dist/types/common/src/constants.d.ts +9 -7
- package/dist/types/common/src/utils.d.ts +0 -42
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/align.d.ts +2 -2
- package/dist/types/element/src/binding.d.ts +6 -6
- package/dist/types/element/src/bounds.d.ts +19 -6
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/distribute.d.ts +2 -2
- package/dist/types/element/src/duplicate.d.ts +3 -3
- package/dist/types/element/src/embeddable.d.ts +2 -2
- package/dist/types/element/src/flowchart.d.ts +3 -3
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +4 -4
- package/dist/types/element/src/groups.d.ts +9 -9
- package/dist/types/element/src/index.d.ts +1 -1
- package/dist/types/element/src/linearElementEditor.d.ts +10 -10
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/renderElement.d.ts +0 -3
- package/dist/types/element/src/resizeElements.d.ts +2 -2
- package/dist/types/element/src/selection.d.ts +5 -5
- package/dist/types/element/src/textElement.d.ts +7 -7
- package/dist/types/element/src/transform.d.ts +2 -2
- package/dist/types/element/src/typeChecks.d.ts +25 -25
- package/dist/types/element/src/types.d.ts +8 -1
- package/dist/types/element/src/visualdebug.d.ts +1 -2
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +61 -389
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +13 -7
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +9 -5
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +29 -20
- package/dist/types/excalidraw/actions/actionGroup.d.ts +23 -19
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionLink.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +35 -22
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +9 -7
- package/dist/types/excalidraw/actions/actionStyles.d.ts +4 -2
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +8 -7
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -7
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -3
- package/dist/types/excalidraw/actions/index.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +4 -4
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +2 -1
- package/dist/types/excalidraw/components/Actions.d.ts +2 -3
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +61 -32
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/Island.d.ts +7 -0
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +6 -3
- package/dist/types/excalidraw/data/blob.d.ts +8 -4
- package/dist/types/excalidraw/data/index.d.ts +4 -4
- package/dist/types/excalidraw/data/json.d.ts +10 -8
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
- package/dist/types/excalidraw/scene/Renderer.d.ts +12 -11
- package/dist/types/excalidraw/scene/export.d.ts +3 -3
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +1 -3
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/types.d.ts +168 -11
- package/dist/types/excalidraw/viewport.d.ts +316 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -3
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/dist/types/utils/src/export.d.ts +3 -3
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +4 -4
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { ExcalidrawElement, ExcalidrawTextElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { AppClassProperties,
|
|
2
|
+
import type { AppClassProperties, UIAppState } from "../types";
|
|
3
3
|
export declare const actionGroup: {
|
|
4
4
|
name: "group";
|
|
5
5
|
label: string;
|
|
6
|
-
icon: (appState:
|
|
6
|
+
icon: (appState: UIAppState) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
trackEvent: {
|
|
8
8
|
category: "element";
|
|
9
9
|
};
|
|
10
|
-
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
11
|
-
appState: Readonly<AppState>;
|
|
10
|
+
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
|
|
11
|
+
appState: Readonly<import("../types").AppState>;
|
|
12
12
|
elements: readonly OrderedExcalidrawElement[];
|
|
13
13
|
captureUpdate: "EVENTUALLY";
|
|
14
14
|
} | {
|
|
15
15
|
appState: {
|
|
16
|
-
editingGroupId: AppState["editingGroupId"];
|
|
17
|
-
selectedElementIds: AppState["selectedElementIds"];
|
|
18
|
-
selectedGroupIds: AppState["selectedGroupIds"];
|
|
16
|
+
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
17
|
+
selectedElementIds: import("../types").AppState["selectedElementIds"];
|
|
18
|
+
selectedGroupIds: import("../types").AppState["selectedGroupIds"];
|
|
19
19
|
contextMenu: {
|
|
20
20
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
21
21
|
top: number;
|
|
@@ -48,7 +48,7 @@ export declare const actionGroup: {
|
|
|
48
48
|
clip: boolean;
|
|
49
49
|
};
|
|
50
50
|
editingFrame: string | null;
|
|
51
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
51
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
52
52
|
editingTextElement: ExcalidrawTextElement | null;
|
|
53
53
|
activeTool: {
|
|
54
54
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -68,9 +68,10 @@ export declare const actionGroup: {
|
|
|
68
68
|
currentItemStrokeColor: string;
|
|
69
69
|
currentItemBackgroundColor: string;
|
|
70
70
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
71
|
-
|
|
71
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
72
72
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
73
73
|
currentItemRoughness: number;
|
|
74
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
74
75
|
currentItemOpacity: number;
|
|
75
76
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
76
77
|
currentItemFontSize: number;
|
|
@@ -83,6 +84,7 @@ export declare const actionGroup: {
|
|
|
83
84
|
viewBackgroundColor: string;
|
|
84
85
|
scrollX: number;
|
|
85
86
|
scrollY: number;
|
|
87
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
86
88
|
cursorButton: "up" | "down";
|
|
87
89
|
scrolledOutside: boolean;
|
|
88
90
|
name: string | null;
|
|
@@ -168,7 +170,7 @@ export declare const actionGroup: {
|
|
|
168
170
|
elements: OrderedExcalidrawElement[];
|
|
169
171
|
captureUpdate: "IMMEDIATELY";
|
|
170
172
|
};
|
|
171
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
173
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
172
174
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
173
175
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
174
176
|
} & {
|
|
@@ -177,19 +179,19 @@ export declare const actionGroup: {
|
|
|
177
179
|
export declare const actionUngroup: {
|
|
178
180
|
name: "ungroup";
|
|
179
181
|
label: string;
|
|
180
|
-
icon: (appState:
|
|
182
|
+
icon: (appState: UIAppState) => import("react/jsx-runtime").JSX.Element;
|
|
181
183
|
trackEvent: {
|
|
182
184
|
category: "element";
|
|
183
185
|
};
|
|
184
|
-
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
185
|
-
appState: Readonly<AppState>;
|
|
186
|
+
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
|
|
187
|
+
appState: Readonly<import("../types").AppState>;
|
|
186
188
|
elements: readonly OrderedExcalidrawElement[];
|
|
187
189
|
captureUpdate: "EVENTUALLY";
|
|
188
190
|
} | {
|
|
189
191
|
appState: {
|
|
190
|
-
editingGroupId: AppState["editingGroupId"];
|
|
191
|
-
selectedElementIds: AppState["selectedElementIds"];
|
|
192
|
-
selectedGroupIds: AppState["selectedGroupIds"];
|
|
192
|
+
editingGroupId: import("../types").AppState["editingGroupId"];
|
|
193
|
+
selectedElementIds: import("../types").AppState["selectedElementIds"];
|
|
194
|
+
selectedGroupIds: import("../types").AppState["selectedGroupIds"];
|
|
193
195
|
contextMenu: {
|
|
194
196
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
195
197
|
top: number;
|
|
@@ -222,7 +224,7 @@ export declare const actionUngroup: {
|
|
|
222
224
|
clip: boolean;
|
|
223
225
|
};
|
|
224
226
|
editingFrame: string | null;
|
|
225
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
227
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
226
228
|
editingTextElement: ExcalidrawTextElement | null;
|
|
227
229
|
activeTool: {
|
|
228
230
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -242,9 +244,10 @@ export declare const actionUngroup: {
|
|
|
242
244
|
currentItemStrokeColor: string;
|
|
243
245
|
currentItemBackgroundColor: string;
|
|
244
246
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
245
|
-
|
|
247
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
246
248
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
247
249
|
currentItemRoughness: number;
|
|
250
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
248
251
|
currentItemOpacity: number;
|
|
249
252
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
250
253
|
currentItemFontSize: number;
|
|
@@ -257,6 +260,7 @@ export declare const actionUngroup: {
|
|
|
257
260
|
viewBackgroundColor: string;
|
|
258
261
|
scrollX: number;
|
|
259
262
|
scrollY: number;
|
|
263
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
260
264
|
cursorButton: "up" | "down";
|
|
261
265
|
scrolledOutside: boolean;
|
|
262
266
|
name: string | null;
|
|
@@ -343,7 +347,7 @@ export declare const actionUngroup: {
|
|
|
343
347
|
captureUpdate: "IMMEDIATELY";
|
|
344
348
|
};
|
|
345
349
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
346
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
350
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
347
351
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
348
352
|
} & {
|
|
349
353
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -2,7 +2,7 @@ import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
|
|
|
2
2
|
export declare const actionToggleLinearEditor: {
|
|
3
3
|
name: "toggleLinearEditor";
|
|
4
4
|
category: string;
|
|
5
|
-
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").
|
|
5
|
+
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").UIAppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.editArrow" | "labels.lineEditor.edit";
|
|
6
6
|
keywords: string[];
|
|
7
7
|
trackEvent: {
|
|
8
8
|
category: "element";
|
|
@@ -75,7 +75,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
75
75
|
clip: boolean;
|
|
76
76
|
};
|
|
77
77
|
editingFrame: string | null;
|
|
78
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
78
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
79
79
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
80
80
|
activeTool: {
|
|
81
81
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -95,9 +95,10 @@ export declare const actionToggleLinearEditor: {
|
|
|
95
95
|
currentItemStrokeColor: string;
|
|
96
96
|
currentItemBackgroundColor: string;
|
|
97
97
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
98
|
-
|
|
98
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
99
99
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
100
100
|
currentItemRoughness: number;
|
|
101
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
101
102
|
currentItemOpacity: number;
|
|
102
103
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
103
104
|
currentItemFontSize: number;
|
|
@@ -110,6 +111,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
110
111
|
viewBackgroundColor: string;
|
|
111
112
|
scrollX: number;
|
|
112
113
|
scrollY: number;
|
|
114
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
113
115
|
cursorButton: "up" | "down";
|
|
114
116
|
scrolledOutside: boolean;
|
|
115
117
|
name: string | null;
|
|
@@ -209,7 +211,7 @@ export declare const actionTogglePolygon: {
|
|
|
209
211
|
category: string;
|
|
210
212
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
211
213
|
keywords: string[];
|
|
212
|
-
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").
|
|
214
|
+
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").UIAppState>, app: import("../types").AppClassProperties) => "labels.polygon.breakPolygon" | "labels.polygon.convertToPolygon";
|
|
213
215
|
trackEvent: {
|
|
214
216
|
category: "element";
|
|
215
217
|
};
|
|
@@ -649,6 +651,7 @@ export declare const actionTogglePolygon: {
|
|
|
649
651
|
points: readonly import("@excalidraw/math").LocalPoint[];
|
|
650
652
|
pressures: readonly number[];
|
|
651
653
|
simulatePressure: boolean;
|
|
654
|
+
strokeOptions: import("@excalidraw/element/types").StrokeOptions;
|
|
652
655
|
}> & {
|
|
653
656
|
index: import("@excalidraw/element/types").FractionalIndex;
|
|
654
657
|
}))[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const actionLink: {
|
|
2
2
|
name: "hyperlink";
|
|
3
|
-
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").
|
|
3
|
+
label: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: Readonly<import("../types").UIAppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
|
|
4
4
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
|
|
6
6
|
elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
@@ -39,7 +39,7 @@ export declare const actionLink: {
|
|
|
39
39
|
clip: boolean;
|
|
40
40
|
};
|
|
41
41
|
editingFrame: string | null;
|
|
42
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
42
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
43
43
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
44
44
|
activeTool: {
|
|
45
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -59,9 +59,10 @@ export declare const actionLink: {
|
|
|
59
59
|
currentItemStrokeColor: string;
|
|
60
60
|
currentItemBackgroundColor: string;
|
|
61
61
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
62
|
-
|
|
62
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
63
63
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
64
64
|
currentItemRoughness: number;
|
|
65
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
65
66
|
currentItemOpacity: number;
|
|
66
67
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
67
68
|
currentItemFontSize: number;
|
|
@@ -74,6 +75,7 @@ export declare const actionLink: {
|
|
|
74
75
|
viewBackgroundColor: string;
|
|
75
76
|
scrollX: number;
|
|
76
77
|
scrollY: number;
|
|
78
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
77
79
|
cursorButton: "up" | "down";
|
|
78
80
|
scrolledOutside: boolean;
|
|
79
81
|
name: string | null;
|
|
@@ -46,7 +46,7 @@ export declare const actionShortcuts: {
|
|
|
46
46
|
clip: boolean;
|
|
47
47
|
};
|
|
48
48
|
editingFrame: string | null;
|
|
49
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
49
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
50
50
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
51
51
|
activeTool: {
|
|
52
52
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -66,9 +66,10 @@ export declare const actionShortcuts: {
|
|
|
66
66
|
currentItemStrokeColor: string;
|
|
67
67
|
currentItemBackgroundColor: string;
|
|
68
68
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
69
|
-
|
|
69
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
70
70
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
71
71
|
currentItemRoughness: number;
|
|
72
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
72
73
|
currentItemOpacity: number;
|
|
73
74
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
74
75
|
currentItemFontSize: number;
|
|
@@ -81,6 +82,7 @@ export declare const actionShortcuts: {
|
|
|
81
82
|
viewBackgroundColor: string;
|
|
82
83
|
scrollX: number;
|
|
83
84
|
scrollY: number;
|
|
85
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
84
86
|
cursorButton: "up" | "down";
|
|
85
87
|
scrolledOutside: boolean;
|
|
86
88
|
name: string | null;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { type StrokeWidthKey } from "@excalidraw/common";
|
|
1
2
|
import { LinearElementEditor } from "@excalidraw/element";
|
|
2
|
-
import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
|
|
3
|
+
import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, StrokeVariability, NonDeleted, NonDeletedExcalidrawElement, TextAlign } from "@excalidraw/element/types";
|
|
3
4
|
import type { AppClassProperties, AppState, Primitive } from "../types";
|
|
4
|
-
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element:
|
|
5
|
-
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties,
|
|
5
|
+
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: NonDeletedExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
|
|
6
|
+
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties,
|
|
7
|
+
/**
|
|
8
|
+
* input value (usually the element attribute value,
|
|
9
|
+
* but depends on what the action's PanelComponent input expects)
|
|
10
|
+
*/
|
|
11
|
+
getValue: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
|
|
6
12
|
export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
|
|
7
13
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
8
14
|
};
|
|
@@ -12,12 +18,15 @@ export declare const actionChangeBackgroundColor: import("./types").Action<Pick<
|
|
|
12
18
|
export declare const actionChangeFillStyle: import("./types").Action<import("@excalidraw/element/types").FillStyle> & {
|
|
13
19
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
14
20
|
};
|
|
15
|
-
export declare const actionChangeStrokeWidth: import("./types").Action<
|
|
21
|
+
export declare const actionChangeStrokeWidth: import("./types").Action<StrokeWidthKey> & {
|
|
16
22
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
17
23
|
};
|
|
18
24
|
export declare const actionChangeSloppiness: import("./types").Action<number> & {
|
|
19
25
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
20
26
|
};
|
|
27
|
+
export declare const actionChangeFreedrawMode: import("./types").Action<StrokeVariability> & {
|
|
28
|
+
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
29
|
+
};
|
|
21
30
|
export declare const actionChangeStrokeStyle: import("./types").Action<import("@excalidraw/element/types").StrokeStyle> & {
|
|
22
31
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
23
32
|
};
|
|
@@ -45,22 +54,22 @@ export declare const actionDecreaseFontSize: {
|
|
|
45
54
|
isLoading: boolean;
|
|
46
55
|
errorMessage: React.ReactNode;
|
|
47
56
|
activeEmbeddable: {
|
|
48
|
-
element:
|
|
57
|
+
element: NonDeletedExcalidrawElement;
|
|
49
58
|
state: "hover" | "active";
|
|
50
59
|
} | null;
|
|
51
|
-
newElement:
|
|
52
|
-
resizingElement:
|
|
53
|
-
multiElement:
|
|
54
|
-
selectionElement:
|
|
60
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
61
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
62
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
63
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
55
64
|
isBindingEnabled: boolean;
|
|
56
65
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
57
66
|
bindingPreference: "enabled" | "disabled";
|
|
58
67
|
isMidpointSnappingEnabled: boolean;
|
|
59
68
|
suggestedBinding: {
|
|
60
|
-
element:
|
|
69
|
+
element: NonDeleted<ExcalidrawBindableElement>;
|
|
61
70
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
62
71
|
} | null;
|
|
63
|
-
frameToHighlight:
|
|
72
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
64
73
|
frameRendering: {
|
|
65
74
|
enabled: boolean;
|
|
66
75
|
name: boolean;
|
|
@@ -68,7 +77,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
68
77
|
clip: boolean;
|
|
69
78
|
};
|
|
70
79
|
editingFrame: string | null;
|
|
71
|
-
elementsToHighlight:
|
|
80
|
+
elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
|
|
72
81
|
editingTextElement: ExcalidrawTextElement | null;
|
|
73
82
|
activeTool: {
|
|
74
83
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -88,9 +97,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
88
97
|
currentItemStrokeColor: string;
|
|
89
98
|
currentItemBackgroundColor: string;
|
|
90
99
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
91
|
-
|
|
100
|
+
currentItemStrokeWidthKey: StrokeWidthKey;
|
|
92
101
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
93
102
|
currentItemRoughness: number;
|
|
103
|
+
currentItemStrokeVariability: StrokeVariability;
|
|
94
104
|
currentItemOpacity: number;
|
|
95
105
|
currentItemFontFamily: FontFamilyValues;
|
|
96
106
|
currentItemTextAlign: TextAlign;
|
|
@@ -102,6 +112,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
102
112
|
viewBackgroundColor: string;
|
|
103
113
|
scrollX: number;
|
|
104
114
|
scrollY: number;
|
|
115
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
105
116
|
cursorButton: "up" | "down";
|
|
106
117
|
scrolledOutside: boolean;
|
|
107
118
|
name: string | null;
|
|
@@ -215,22 +226,22 @@ export declare const actionIncreaseFontSize: {
|
|
|
215
226
|
isLoading: boolean;
|
|
216
227
|
errorMessage: React.ReactNode;
|
|
217
228
|
activeEmbeddable: {
|
|
218
|
-
element:
|
|
229
|
+
element: NonDeletedExcalidrawElement;
|
|
219
230
|
state: "hover" | "active";
|
|
220
231
|
} | null;
|
|
221
|
-
newElement:
|
|
222
|
-
resizingElement:
|
|
223
|
-
multiElement:
|
|
224
|
-
selectionElement:
|
|
232
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
233
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
234
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
235
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
225
236
|
isBindingEnabled: boolean;
|
|
226
237
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
227
238
|
bindingPreference: "enabled" | "disabled";
|
|
228
239
|
isMidpointSnappingEnabled: boolean;
|
|
229
240
|
suggestedBinding: {
|
|
230
|
-
element:
|
|
241
|
+
element: NonDeleted<ExcalidrawBindableElement>;
|
|
231
242
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
232
243
|
} | null;
|
|
233
|
-
frameToHighlight:
|
|
244
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
234
245
|
frameRendering: {
|
|
235
246
|
enabled: boolean;
|
|
236
247
|
name: boolean;
|
|
@@ -238,7 +249,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
238
249
|
clip: boolean;
|
|
239
250
|
};
|
|
240
251
|
editingFrame: string | null;
|
|
241
|
-
elementsToHighlight:
|
|
252
|
+
elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
|
|
242
253
|
editingTextElement: ExcalidrawTextElement | null;
|
|
243
254
|
activeTool: {
|
|
244
255
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -258,9 +269,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
258
269
|
currentItemStrokeColor: string;
|
|
259
270
|
currentItemBackgroundColor: string;
|
|
260
271
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
261
|
-
|
|
272
|
+
currentItemStrokeWidthKey: StrokeWidthKey;
|
|
262
273
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
263
274
|
currentItemRoughness: number;
|
|
275
|
+
currentItemStrokeVariability: StrokeVariability;
|
|
264
276
|
currentItemOpacity: number;
|
|
265
277
|
currentItemFontFamily: FontFamilyValues;
|
|
266
278
|
currentItemTextAlign: TextAlign;
|
|
@@ -272,6 +284,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
272
284
|
viewBackgroundColor: string;
|
|
273
285
|
scrollX: number;
|
|
274
286
|
scrollY: number;
|
|
287
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
275
288
|
cursorButton: "up" | "down";
|
|
276
289
|
scrolledOutside: boolean;
|
|
277
290
|
name: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LinearElementEditor } from "@excalidraw/element";
|
|
2
|
-
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted } from "@excalidraw/element/types";
|
|
3
3
|
export declare const actionSelectAll: {
|
|
4
4
|
name: "selectAll";
|
|
5
5
|
label: string;
|
|
@@ -26,19 +26,19 @@ export declare const actionSelectAll: {
|
|
|
26
26
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
27
27
|
state: "hover" | "active";
|
|
28
28
|
} | null;
|
|
29
|
-
newElement:
|
|
29
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
30
30
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
31
|
-
multiElement:
|
|
31
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
32
32
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
33
33
|
isBindingEnabled: boolean;
|
|
34
34
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
35
35
|
bindingPreference: "enabled" | "disabled";
|
|
36
36
|
isMidpointSnappingEnabled: boolean;
|
|
37
37
|
suggestedBinding: {
|
|
38
|
-
element:
|
|
38
|
+
element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
39
39
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
40
40
|
} | null;
|
|
41
|
-
frameToHighlight:
|
|
41
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
42
42
|
frameRendering: {
|
|
43
43
|
enabled: boolean;
|
|
44
44
|
name: boolean;
|
|
@@ -46,7 +46,7 @@ export declare const actionSelectAll: {
|
|
|
46
46
|
clip: boolean;
|
|
47
47
|
};
|
|
48
48
|
editingFrame: string | null;
|
|
49
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
49
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
50
50
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
51
51
|
activeTool: {
|
|
52
52
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -66,9 +66,10 @@ export declare const actionSelectAll: {
|
|
|
66
66
|
currentItemStrokeColor: string;
|
|
67
67
|
currentItemBackgroundColor: string;
|
|
68
68
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
69
|
-
|
|
69
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
70
70
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
71
71
|
currentItemRoughness: number;
|
|
72
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
72
73
|
currentItemOpacity: number;
|
|
73
74
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
74
75
|
currentItemFontSize: number;
|
|
@@ -81,6 +82,7 @@ export declare const actionSelectAll: {
|
|
|
81
82
|
viewBackgroundColor: string;
|
|
82
83
|
scrollX: number;
|
|
83
84
|
scrollY: number;
|
|
85
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
84
86
|
cursorButton: "up" | "down";
|
|
85
87
|
scrolledOutside: boolean;
|
|
86
88
|
name: string | null;
|
|
@@ -44,7 +44,7 @@ export declare const actionCopyStyles: {
|
|
|
44
44
|
clip: boolean;
|
|
45
45
|
};
|
|
46
46
|
editingFrame: string | null;
|
|
47
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
47
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
48
48
|
editingTextElement: ExcalidrawTextElement | null;
|
|
49
49
|
activeTool: {
|
|
50
50
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -64,9 +64,10 @@ export declare const actionCopyStyles: {
|
|
|
64
64
|
currentItemStrokeColor: string;
|
|
65
65
|
currentItemBackgroundColor: string;
|
|
66
66
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
67
|
-
|
|
67
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
68
68
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
69
69
|
currentItemRoughness: number;
|
|
70
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
70
71
|
currentItemOpacity: number;
|
|
71
72
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
72
73
|
currentItemFontSize: number;
|
|
@@ -79,6 +80,7 @@ export declare const actionCopyStyles: {
|
|
|
79
80
|
viewBackgroundColor: string;
|
|
80
81
|
scrollX: number;
|
|
81
82
|
scrollY: number;
|
|
83
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
82
84
|
cursorButton: "up" | "down";
|
|
83
85
|
scrolledOutside: boolean;
|
|
84
86
|
name: string | null;
|
|
@@ -40,7 +40,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
40
40
|
clip: boolean;
|
|
41
41
|
};
|
|
42
42
|
editingFrame: string | null;
|
|
43
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
43
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
44
44
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
45
|
activeTool: {
|
|
46
46
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -60,9 +60,10 @@ export declare const actionToggleArrowBinding: {
|
|
|
60
60
|
currentItemStrokeColor: string;
|
|
61
61
|
currentItemBackgroundColor: string;
|
|
62
62
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
-
|
|
63
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
64
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
65
|
currentItemRoughness: number;
|
|
66
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
66
67
|
currentItemOpacity: number;
|
|
67
68
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
68
69
|
currentItemFontSize: number;
|
|
@@ -75,6 +76,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
75
76
|
viewBackgroundColor: string;
|
|
76
77
|
scrollX: number;
|
|
77
78
|
scrollY: number;
|
|
79
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
78
80
|
cursorButton: "up" | "down";
|
|
79
81
|
scrolledOutside: boolean;
|
|
80
82
|
name: string | null;
|
|
@@ -166,7 +168,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
166
168
|
};
|
|
167
169
|
captureUpdate: "NEVER";
|
|
168
170
|
};
|
|
169
|
-
checked: (appState: Readonly<import("../types").
|
|
171
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
170
172
|
} & {
|
|
171
173
|
keyTest?: undefined;
|
|
172
174
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AppState } from "../types";
|
|
2
1
|
export declare const actionToggleGridMode: {
|
|
3
2
|
name: "gridMode";
|
|
4
3
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,9 +6,9 @@ export declare const actionToggleGridMode: {
|
|
|
7
6
|
viewMode: true;
|
|
8
7
|
trackEvent: {
|
|
9
8
|
category: "canvas";
|
|
10
|
-
predicate: (appState: Readonly<AppState>) => boolean;
|
|
9
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
11
10
|
};
|
|
12
|
-
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>): {
|
|
11
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
13
12
|
appState: {
|
|
14
13
|
gridModeEnabled: boolean;
|
|
15
14
|
objectsSnapModeEnabled: false;
|
|
@@ -45,7 +44,7 @@ export declare const actionToggleGridMode: {
|
|
|
45
44
|
clip: boolean;
|
|
46
45
|
};
|
|
47
46
|
editingFrame: string | null;
|
|
48
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
47
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
49
48
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
50
49
|
activeTool: {
|
|
51
50
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -65,9 +64,10 @@ export declare const actionToggleGridMode: {
|
|
|
65
64
|
currentItemStrokeColor: string;
|
|
66
65
|
currentItemBackgroundColor: string;
|
|
67
66
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
68
|
-
|
|
67
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
69
68
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
70
69
|
currentItemRoughness: number;
|
|
70
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
71
71
|
currentItemOpacity: number;
|
|
72
72
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
73
73
|
currentItemFontSize: number;
|
|
@@ -80,6 +80,7 @@ export declare const actionToggleGridMode: {
|
|
|
80
80
|
viewBackgroundColor: string;
|
|
81
81
|
scrollX: number;
|
|
82
82
|
scrollY: number;
|
|
83
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
83
84
|
cursorButton: "up" | "down";
|
|
84
85
|
scrolledOutside: boolean;
|
|
85
86
|
name: string | null;
|
|
@@ -169,8 +170,8 @@ export declare const actionToggleGridMode: {
|
|
|
169
170
|
};
|
|
170
171
|
captureUpdate: "EVENTUALLY";
|
|
171
172
|
};
|
|
172
|
-
checked: (appState:
|
|
173
|
-
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
173
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
174
|
+
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
174
175
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
175
176
|
} & {
|
|
176
177
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -40,7 +40,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
40
40
|
clip: boolean;
|
|
41
41
|
};
|
|
42
42
|
editingFrame: string | null;
|
|
43
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
43
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
44
44
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
45
|
activeTool: {
|
|
46
46
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -60,9 +60,10 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
60
60
|
currentItemStrokeColor: string;
|
|
61
61
|
currentItemBackgroundColor: string;
|
|
62
62
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
-
|
|
63
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
64
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
65
|
currentItemRoughness: number;
|
|
66
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
66
67
|
currentItemOpacity: number;
|
|
67
68
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
68
69
|
currentItemFontSize: number;
|
|
@@ -75,6 +76,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
75
76
|
viewBackgroundColor: string;
|
|
76
77
|
scrollX: number;
|
|
77
78
|
scrollY: number;
|
|
79
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
78
80
|
cursorButton: "up" | "down";
|
|
79
81
|
scrolledOutside: boolean;
|
|
80
82
|
name: string | null;
|
|
@@ -166,7 +168,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
166
168
|
};
|
|
167
169
|
captureUpdate: "NEVER";
|
|
168
170
|
};
|
|
169
|
-
checked: (appState: Readonly<import("../types").
|
|
171
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
170
172
|
} & {
|
|
171
173
|
keyTest?: undefined;
|
|
172
174
|
};
|