@myoc/math 0.19.521 → 0.19.522
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 +261 -92
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +1 -1
- package/dist/types/common/src/colors.d.ts +14 -0
- package/dist/types/common/src/constants.d.ts +3 -0
- package/dist/types/common/src/keys.d.ts +2 -0
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/utils.d.ts +1 -1
- 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/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrows/focus.d.ts +5 -2
- package/dist/types/element/src/binding.d.ts +17 -8
- package/dist/types/element/src/bounds.d.ts +5 -9
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/element/src/comparisons.d.ts +4 -4
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/distribute.d.ts +2 -2
- package/dist/types/element/src/dragElements.d.ts +27 -0
- 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 +7 -7
- 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 +4 -1
- package/dist/types/element/src/linearElementEditor.d.ts +17 -10
- package/dist/types/element/src/newElement.d.ts +13 -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/shape.d.ts +12 -0
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/textElement.d.ts +12 -9
- 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 +2 -1
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +24 -8
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +128 -961
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -8
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -4
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +38 -13
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +9 -4
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +12 -4
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +25 -9
- package/dist/types/excalidraw/actions/actionExport.d.ts +26 -10
- package/dist/types/excalidraw/actions/actionFrame.d.ts +47 -205
- package/dist/types/excalidraw/actions/actionGroup.d.ts +39 -23
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -6
- package/dist/types/excalidraw/actions/actionLink.d.ts +13 -5
- package/dist/types/excalidraw/actions/actionMenu.d.ts +12 -4
- package/dist/types/excalidraw/actions/actionProperties.d.ts +43 -24
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +17 -9
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -4
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +16 -9
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +13 -5
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -5
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +16 -9
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -5
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -5
- package/dist/types/excalidraw/actions/index.d.ts +1 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +8 -4
- package/dist/types/excalidraw/appState.d.ts +10 -5
- package/dist/types/excalidraw/components/Actions.d.ts +17 -12
- package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +30 -0
- package/dist/types/excalidraw/components/App.d.ts +384 -60
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/topPicksDnD.d.ts +31 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
- package/dist/types/excalidraw/components/Island.d.ts +7 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
- package/dist/types/excalidraw/components/LayerUI.d.ts +5 -2
- package/dist/types/excalidraw/components/LockButton.d.ts +9 -0
- package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
- package/dist/types/excalidraw/components/Popover.d.ts +1 -3
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- 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/ToolPopover.d.ts +3 -6
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +146 -0
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
- package/dist/types/excalidraw/components/icons.d.ts +4 -1
- package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
- package/dist/types/excalidraw/context/tunnels.d.ts +0 -1
- package/dist/types/excalidraw/data/blob.d.ts +14 -6
- package/dist/types/excalidraw/data/index.d.ts +4 -4
- package/dist/types/excalidraw/data/json.d.ts +20 -12
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +10 -3
- package/dist/types/excalidraw/scene/Renderer.d.ts +11 -11
- package/dist/types/excalidraw/scene/export.d.ts +3 -3
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +4 -3
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/types.d.ts +423 -27
- package/dist/types/excalidraw/viewport.d.ts +283 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +2 -3
- package/dist/types/laser-pointer/src/state.d.ts +1 -0
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/pca.d.ts +79 -0
- package/dist/types/math/src/polygon.d.ts +25 -1
- package/dist/types/utils/src/export.d.ts +3 -3
- package/package.json +2 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -180
- package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +0 -16
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +0 -27
- package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +0 -7
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
- package/dist/types/excalidraw/components/MagicButton.d.ts +0 -10
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -12
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
- package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
- package/dist/types/excalidraw/scroll.d.ts +0 -46
|
@@ -7,7 +7,7 @@ export declare const actionTextAutoResize: {
|
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
9
|
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: unknown) => boolean;
|
|
10
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown) => {
|
|
10
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown, app: import("../types").AppClassProperties) => false | {
|
|
11
11
|
appState: Readonly<import("../types").AppState>;
|
|
12
12
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
13
13
|
captureUpdate: "IMMEDIATELY";
|
|
@@ -8,7 +8,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
8
8
|
};
|
|
9
9
|
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
10
|
appState: {
|
|
11
|
-
bindingPreference: "
|
|
11
|
+
bindingPreference: "enabled" | "disabled";
|
|
12
12
|
isBindingEnabled: boolean;
|
|
13
13
|
contextMenu: {
|
|
14
14
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
@@ -44,6 +44,10 @@ export declare const actionToggleArrowBinding: {
|
|
|
44
44
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
45
45
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
46
46
|
} | null;
|
|
47
|
+
hoveredArrowTextAnchor: {
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
49
|
+
anchor: "start" | "end" | "label";
|
|
50
|
+
} | null;
|
|
47
51
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
48
52
|
frameRendering: {
|
|
49
53
|
enabled: boolean;
|
|
@@ -51,8 +55,8 @@ export declare const actionToggleArrowBinding: {
|
|
|
51
55
|
outline: boolean;
|
|
52
56
|
clip: boolean;
|
|
53
57
|
};
|
|
54
|
-
editingFrame:
|
|
55
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
58
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
59
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
56
60
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
57
61
|
activeTool: {
|
|
58
62
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -88,6 +92,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
88
92
|
viewBackgroundColor: string;
|
|
89
93
|
scrollX: number;
|
|
90
94
|
scrollY: number;
|
|
95
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
91
96
|
cursorButton: "up" | "down";
|
|
92
97
|
scrolledOutside: boolean;
|
|
93
98
|
name: string | null;
|
|
@@ -159,8 +164,6 @@ export declare const actionToggleArrowBinding: {
|
|
|
159
164
|
y: number;
|
|
160
165
|
} | null;
|
|
161
166
|
objectsSnapModeEnabled: boolean;
|
|
162
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
163
|
-
followedBy: Set<import("../types").SocketId>;
|
|
164
167
|
isCropping: boolean;
|
|
165
168
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
166
169
|
searchMatches: Readonly<{
|
|
@@ -172,10 +175,15 @@ export declare const actionToggleArrowBinding: {
|
|
|
172
175
|
[groupId: string]: true;
|
|
173
176
|
};
|
|
174
177
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
178
|
+
colorTopPicks: {
|
|
179
|
+
elementStroke: readonly string[] | null;
|
|
180
|
+
elementBackground: readonly string[] | null;
|
|
181
|
+
bucketFill: readonly string[] | null;
|
|
182
|
+
};
|
|
175
183
|
};
|
|
176
184
|
captureUpdate: "NEVER";
|
|
177
185
|
};
|
|
178
|
-
checked: (appState: Readonly<import("../types").
|
|
186
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
179
187
|
} & {
|
|
180
188
|
keyTest?: undefined;
|
|
181
189
|
};
|
|
@@ -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;
|
|
@@ -49,6 +48,10 @@ export declare const actionToggleGridMode: {
|
|
|
49
48
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
50
49
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
51
50
|
} | null;
|
|
51
|
+
hoveredArrowTextAnchor: {
|
|
52
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
53
|
+
anchor: "start" | "end" | "label";
|
|
54
|
+
} | null;
|
|
52
55
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
53
56
|
frameRendering: {
|
|
54
57
|
enabled: boolean;
|
|
@@ -56,8 +59,8 @@ export declare const actionToggleGridMode: {
|
|
|
56
59
|
outline: boolean;
|
|
57
60
|
clip: boolean;
|
|
58
61
|
};
|
|
59
|
-
editingFrame:
|
|
60
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
62
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
63
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
61
64
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
62
65
|
activeTool: {
|
|
63
66
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -93,6 +96,7 @@ export declare const actionToggleGridMode: {
|
|
|
93
96
|
viewBackgroundColor: string;
|
|
94
97
|
scrollX: number;
|
|
95
98
|
scrollY: number;
|
|
99
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
96
100
|
cursorButton: "up" | "down";
|
|
97
101
|
scrolledOutside: boolean;
|
|
98
102
|
name: string | null;
|
|
@@ -162,8 +166,6 @@ export declare const actionToggleGridMode: {
|
|
|
162
166
|
x: number;
|
|
163
167
|
y: number;
|
|
164
168
|
} | null;
|
|
165
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
166
|
-
followedBy: Set<import("../types").SocketId>;
|
|
167
169
|
isCropping: boolean;
|
|
168
170
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
169
171
|
searchMatches: Readonly<{
|
|
@@ -175,11 +177,16 @@ export declare const actionToggleGridMode: {
|
|
|
175
177
|
[groupId: string]: true;
|
|
176
178
|
};
|
|
177
179
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
180
|
+
colorTopPicks: {
|
|
181
|
+
elementStroke: readonly string[] | null;
|
|
182
|
+
elementBackground: readonly string[] | null;
|
|
183
|
+
bucketFill: readonly string[] | null;
|
|
184
|
+
};
|
|
178
185
|
};
|
|
179
186
|
captureUpdate: "EVENTUALLY";
|
|
180
187
|
};
|
|
181
|
-
checked: (appState:
|
|
182
|
-
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
188
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
189
|
+
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
183
190
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
184
191
|
} & {
|
|
185
192
|
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
@@ -44,6 +44,10 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
44
44
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
45
45
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
46
46
|
} | null;
|
|
47
|
+
hoveredArrowTextAnchor: {
|
|
48
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
49
|
+
anchor: "start" | "end" | "label";
|
|
50
|
+
} | null;
|
|
47
51
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
48
52
|
frameRendering: {
|
|
49
53
|
enabled: boolean;
|
|
@@ -51,8 +55,8 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
51
55
|
outline: boolean;
|
|
52
56
|
clip: boolean;
|
|
53
57
|
};
|
|
54
|
-
editingFrame:
|
|
55
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
58
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
59
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
56
60
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
57
61
|
activeTool: {
|
|
58
62
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -88,6 +92,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
88
92
|
viewBackgroundColor: string;
|
|
89
93
|
scrollX: number;
|
|
90
94
|
scrollY: number;
|
|
95
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
91
96
|
cursorButton: "up" | "down";
|
|
92
97
|
scrolledOutside: boolean;
|
|
93
98
|
name: string | null;
|
|
@@ -159,8 +164,6 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
159
164
|
y: number;
|
|
160
165
|
} | null;
|
|
161
166
|
objectsSnapModeEnabled: boolean;
|
|
162
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
163
|
-
followedBy: Set<import("../types").SocketId>;
|
|
164
167
|
isCropping: boolean;
|
|
165
168
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
166
169
|
searchMatches: Readonly<{
|
|
@@ -172,10 +175,15 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
172
175
|
[groupId: string]: true;
|
|
173
176
|
};
|
|
174
177
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
178
|
+
colorTopPicks: {
|
|
179
|
+
elementStroke: readonly string[] | null;
|
|
180
|
+
elementBackground: readonly string[] | null;
|
|
181
|
+
bucketFill: readonly string[] | null;
|
|
182
|
+
};
|
|
175
183
|
};
|
|
176
184
|
captureUpdate: "NEVER";
|
|
177
185
|
};
|
|
178
|
-
checked: (appState: Readonly<import("../types").
|
|
186
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
179
187
|
} & {
|
|
180
188
|
keyTest?: undefined;
|
|
181
189
|
};
|
|
@@ -47,6 +47,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
47
47
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
48
48
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
49
49
|
} | null;
|
|
50
|
+
hoveredArrowTextAnchor: {
|
|
51
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
52
|
+
anchor: "start" | "end" | "label";
|
|
53
|
+
} | null;
|
|
50
54
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
51
55
|
frameRendering: {
|
|
52
56
|
enabled: boolean;
|
|
@@ -54,8 +58,8 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
54
58
|
outline: boolean;
|
|
55
59
|
clip: boolean;
|
|
56
60
|
};
|
|
57
|
-
editingFrame:
|
|
58
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
61
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
62
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
59
63
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
60
64
|
activeTool: {
|
|
61
65
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -91,6 +95,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
91
95
|
viewBackgroundColor: string;
|
|
92
96
|
scrollX: number;
|
|
93
97
|
scrollY: number;
|
|
98
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
94
99
|
cursorButton: "up" | "down";
|
|
95
100
|
scrolledOutside: boolean;
|
|
96
101
|
name: string | null;
|
|
@@ -160,8 +165,6 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
160
165
|
x: number;
|
|
161
166
|
y: number;
|
|
162
167
|
} | null;
|
|
163
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
164
|
-
followedBy: Set<import("../types").SocketId>;
|
|
165
168
|
isCropping: boolean;
|
|
166
169
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
167
170
|
searchMatches: Readonly<{
|
|
@@ -173,10 +176,15 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
173
176
|
[groupId: string]: true;
|
|
174
177
|
};
|
|
175
178
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
179
|
+
colorTopPicks: {
|
|
180
|
+
elementStroke: readonly string[] | null;
|
|
181
|
+
elementBackground: readonly string[] | null;
|
|
182
|
+
bucketFill: readonly string[] | null;
|
|
183
|
+
};
|
|
176
184
|
};
|
|
177
185
|
captureUpdate: "EVENTUALLY";
|
|
178
186
|
};
|
|
179
|
-
checked: (appState: Readonly<import("../types").
|
|
187
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
180
188
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
181
189
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
182
190
|
} & {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AppState } from "../types";
|
|
2
1
|
export declare const actionToggleSearchMenu: {
|
|
3
2
|
name: "searchMenu";
|
|
4
3
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,9 +7,9 @@ export declare const actionToggleSearchMenu: {
|
|
|
8
7
|
trackEvent: {
|
|
9
8
|
category: "search_menu";
|
|
10
9
|
action: string;
|
|
11
|
-
predicate: (appState: Readonly<AppState>) => boolean;
|
|
10
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
12
11
|
};
|
|
13
|
-
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties): false | {
|
|
12
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): false | {
|
|
14
13
|
appState: {
|
|
15
14
|
openSidebar: {
|
|
16
15
|
name: "default";
|
|
@@ -53,6 +52,10 @@ export declare const actionToggleSearchMenu: {
|
|
|
53
52
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
54
53
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
55
54
|
} | null;
|
|
55
|
+
hoveredArrowTextAnchor: {
|
|
56
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
57
|
+
anchor: "start" | "end" | "label";
|
|
58
|
+
} | null;
|
|
56
59
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
57
60
|
frameRendering: {
|
|
58
61
|
enabled: boolean;
|
|
@@ -60,8 +63,8 @@ export declare const actionToggleSearchMenu: {
|
|
|
60
63
|
outline: boolean;
|
|
61
64
|
clip: boolean;
|
|
62
65
|
};
|
|
63
|
-
editingFrame:
|
|
64
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
66
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
67
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
65
68
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
66
69
|
activeTool: {
|
|
67
70
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -97,6 +100,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
97
100
|
viewBackgroundColor: string;
|
|
98
101
|
scrollX: number;
|
|
99
102
|
scrollY: number;
|
|
103
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
100
104
|
cursorButton: "up" | "down";
|
|
101
105
|
scrolledOutside: boolean;
|
|
102
106
|
name: string | null;
|
|
@@ -152,8 +156,6 @@ export declare const actionToggleSearchMenu: {
|
|
|
152
156
|
y: number;
|
|
153
157
|
} | null;
|
|
154
158
|
objectsSnapModeEnabled: boolean;
|
|
155
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
156
|
-
followedBy: Set<import("../types").SocketId>;
|
|
157
159
|
isCropping: boolean;
|
|
158
160
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
159
161
|
searchMatches: Readonly<{
|
|
@@ -165,11 +167,16 @@ export declare const actionToggleSearchMenu: {
|
|
|
165
167
|
[groupId: string]: true;
|
|
166
168
|
};
|
|
167
169
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
170
|
+
colorTopPicks: {
|
|
171
|
+
elementStroke: readonly string[] | null;
|
|
172
|
+
elementBackground: readonly string[] | null;
|
|
173
|
+
bucketFill: readonly string[] | null;
|
|
174
|
+
};
|
|
168
175
|
};
|
|
169
176
|
captureUpdate: "EVENTUALLY";
|
|
170
177
|
};
|
|
171
|
-
checked: (appState:
|
|
172
|
-
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
178
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
179
|
+
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
173
180
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
174
181
|
} & {
|
|
175
182
|
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
@@ -49,6 +49,10 @@ export declare const actionToggleStats: {
|
|
|
49
49
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
50
50
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
51
51
|
} | null;
|
|
52
|
+
hoveredArrowTextAnchor: {
|
|
53
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
54
|
+
anchor: "start" | "end" | "label";
|
|
55
|
+
} | null;
|
|
52
56
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
53
57
|
frameRendering: {
|
|
54
58
|
enabled: boolean;
|
|
@@ -56,8 +60,8 @@ export declare const actionToggleStats: {
|
|
|
56
60
|
outline: boolean;
|
|
57
61
|
clip: boolean;
|
|
58
62
|
};
|
|
59
|
-
editingFrame:
|
|
60
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
63
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
64
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
61
65
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
62
66
|
activeTool: {
|
|
63
67
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -93,6 +97,7 @@ export declare const actionToggleStats: {
|
|
|
93
97
|
viewBackgroundColor: string;
|
|
94
98
|
scrollX: number;
|
|
95
99
|
scrollY: number;
|
|
100
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
96
101
|
cursorButton: "up" | "down";
|
|
97
102
|
scrolledOutside: boolean;
|
|
98
103
|
name: string | null;
|
|
@@ -160,8 +165,6 @@ export declare const actionToggleStats: {
|
|
|
160
165
|
y: number;
|
|
161
166
|
} | null;
|
|
162
167
|
objectsSnapModeEnabled: boolean;
|
|
163
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
164
|
-
followedBy: Set<import("../types").SocketId>;
|
|
165
168
|
isCropping: boolean;
|
|
166
169
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
167
170
|
searchMatches: Readonly<{
|
|
@@ -173,10 +176,15 @@ export declare const actionToggleStats: {
|
|
|
173
176
|
[groupId: string]: true;
|
|
174
177
|
};
|
|
175
178
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
179
|
+
colorTopPicks: {
|
|
180
|
+
elementStroke: readonly string[] | null;
|
|
181
|
+
elementBackground: readonly string[] | null;
|
|
182
|
+
bucketFill: readonly string[] | null;
|
|
183
|
+
};
|
|
176
184
|
};
|
|
177
185
|
captureUpdate: "EVENTUALLY";
|
|
178
186
|
};
|
|
179
|
-
checked: (appState: Readonly<import("../types").
|
|
187
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
180
188
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
181
189
|
} & {
|
|
182
190
|
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
@@ -46,6 +46,10 @@ export declare const actionToggleViewMode: {
|
|
|
46
46
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
47
47
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
48
48
|
} | null;
|
|
49
|
+
hoveredArrowTextAnchor: {
|
|
50
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
51
|
+
anchor: "start" | "end" | "label";
|
|
52
|
+
} | null;
|
|
49
53
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
50
54
|
frameRendering: {
|
|
51
55
|
enabled: boolean;
|
|
@@ -53,8 +57,8 @@ export declare const actionToggleViewMode: {
|
|
|
53
57
|
outline: boolean;
|
|
54
58
|
clip: boolean;
|
|
55
59
|
};
|
|
56
|
-
editingFrame:
|
|
57
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
60
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
61
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
58
62
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
59
63
|
activeTool: {
|
|
60
64
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -90,6 +94,7 @@ export declare const actionToggleViewMode: {
|
|
|
90
94
|
viewBackgroundColor: string;
|
|
91
95
|
scrollX: number;
|
|
92
96
|
scrollY: number;
|
|
97
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
93
98
|
cursorButton: "up" | "down";
|
|
94
99
|
scrolledOutside: boolean;
|
|
95
100
|
name: string | null;
|
|
@@ -160,8 +165,6 @@ export declare const actionToggleViewMode: {
|
|
|
160
165
|
y: number;
|
|
161
166
|
} | null;
|
|
162
167
|
objectsSnapModeEnabled: boolean;
|
|
163
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
164
|
-
followedBy: Set<import("../types").SocketId>;
|
|
165
168
|
isCropping: boolean;
|
|
166
169
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
167
170
|
searchMatches: Readonly<{
|
|
@@ -173,11 +176,16 @@ export declare const actionToggleViewMode: {
|
|
|
173
176
|
[groupId: string]: true;
|
|
174
177
|
};
|
|
175
178
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
179
|
+
colorTopPicks: {
|
|
180
|
+
elementStroke: readonly string[] | null;
|
|
181
|
+
elementBackground: readonly string[] | null;
|
|
182
|
+
bucketFill: readonly string[] | null;
|
|
183
|
+
};
|
|
176
184
|
};
|
|
177
185
|
captureUpdate: "EVENTUALLY";
|
|
178
186
|
};
|
|
179
|
-
checked: (appState: Readonly<import("../types").
|
|
180
|
-
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
187
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
188
|
+
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
181
189
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
182
190
|
PanelComponent: ({ data, updateData, appState, appProps }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
183
191
|
} & {
|
|
@@ -46,6 +46,10 @@ export declare const actionToggleZenMode: {
|
|
|
46
46
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
47
47
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
48
48
|
} | null;
|
|
49
|
+
hoveredArrowTextAnchor: {
|
|
50
|
+
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
51
|
+
anchor: "start" | "end" | "label";
|
|
52
|
+
} | null;
|
|
49
53
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
50
54
|
frameRendering: {
|
|
51
55
|
enabled: boolean;
|
|
@@ -53,8 +57,8 @@ export declare const actionToggleZenMode: {
|
|
|
53
57
|
outline: boolean;
|
|
54
58
|
clip: boolean;
|
|
55
59
|
};
|
|
56
|
-
editingFrame:
|
|
57
|
-
elementsToHighlight: import("@excalidraw/element/types").
|
|
60
|
+
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
61
|
+
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
58
62
|
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
59
63
|
activeTool: {
|
|
60
64
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -90,6 +94,7 @@ export declare const actionToggleZenMode: {
|
|
|
90
94
|
viewBackgroundColor: string;
|
|
91
95
|
scrollX: number;
|
|
92
96
|
scrollY: number;
|
|
97
|
+
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
93
98
|
cursorButton: "up" | "down";
|
|
94
99
|
scrolledOutside: boolean;
|
|
95
100
|
name: string | null;
|
|
@@ -160,8 +165,6 @@ export declare const actionToggleZenMode: {
|
|
|
160
165
|
y: number;
|
|
161
166
|
} | null;
|
|
162
167
|
objectsSnapModeEnabled: boolean;
|
|
163
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
164
|
-
followedBy: Set<import("../types").SocketId>;
|
|
165
168
|
isCropping: boolean;
|
|
166
169
|
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
167
170
|
searchMatches: Readonly<{
|
|
@@ -173,10 +176,15 @@ export declare const actionToggleZenMode: {
|
|
|
173
176
|
[groupId: string]: true;
|
|
174
177
|
};
|
|
175
178
|
bindMode: import("@excalidraw/element/types").BindMode;
|
|
179
|
+
colorTopPicks: {
|
|
180
|
+
elementStroke: readonly string[] | null;
|
|
181
|
+
elementBackground: readonly string[] | null;
|
|
182
|
+
bucketFill: readonly string[] | null;
|
|
183
|
+
};
|
|
176
184
|
};
|
|
177
185
|
captureUpdate: "EVENTUALLY";
|
|
178
186
|
};
|
|
179
|
-
checked: (appState: Readonly<import("../types").
|
|
187
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
180
188
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
181
189
|
} & {
|
|
182
190
|
keyTest?: undefined;
|
|
@@ -2,9 +2,8 @@ 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, actionChangeFreedrawMode, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeBucketFillBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeFreedrawMode, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
|
-
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
7
|
export { actionFinalize } from "./actionFinalize";
|
|
9
8
|
export { actionDeselect } from "./actionDeselect";
|
|
10
9
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
@@ -11,6 +11,7 @@ export declare class ActionManager {
|
|
|
11
11
|
constructor(updater: UpdaterFn, getAppState: () => AppState, getElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[], app: AppClassProperties);
|
|
12
12
|
registerAction(action: Action): void;
|
|
13
13
|
registerAll(actions: readonly Action[]): void;
|
|
14
|
+
private isActionBlockedByViewportTransition;
|
|
14
15
|
handleKeyDown(event: React.KeyboardEvent | KeyboardEvent): boolean;
|
|
15
16
|
executeAction<T extends Action>(action: T, source?: ActionSource, value?: Parameters<T["perform"]>[2]): void;
|
|
16
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,10 +14,10 @@ export type ActionResult = {
|
|
|
14
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" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
|
-
appState:
|
|
20
|
+
appState: UIAppState;
|
|
21
21
|
updateData: <T = any>(formData?: T) => void;
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
@@ -26,7 +26,7 @@ export type PanelComponentProps = {
|
|
|
26
26
|
};
|
|
27
27
|
export interface Action<TData = any> {
|
|
28
28
|
name: ActionName;
|
|
29
|
-
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<
|
|
29
|
+
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => string);
|
|
30
30
|
keywords?: string[];
|
|
31
31
|
icon?: React.ReactNode | ((appState: UIAppState, elements: readonly ExcalidrawElement[]) => React.ReactNode);
|
|
32
32
|
PanelComponent?: React.FC<PanelComponentProps>;
|
|
@@ -34,7 +34,7 @@ export interface Action<TData = any> {
|
|
|
34
34
|
keyPriority?: number;
|
|
35
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
36
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
37
|
-
checked?: (appState: Readonly<
|
|
37
|
+
checked?: (appState: Readonly<UIAppState>) => boolean;
|
|
38
38
|
trackEvent: false | {
|
|
39
39
|
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
|
|
40
40
|
action?: string;
|
|
@@ -43,5 +43,9 @@ export interface Action<TData = any> {
|
|
|
43
43
|
/** if set to `true`, allow action to be performed in viewMode.
|
|
44
44
|
* Defaults to `false` */
|
|
45
45
|
viewMode?: boolean;
|
|
46
|
+
/** if set to `true`, the action counts as canvas navigation and remains
|
|
47
|
+
* available in the non-interactive editor when
|
|
48
|
+
* `interaction: { enabled: { navigation: true } }`. Defaults to `false` */
|
|
49
|
+
navigation?: boolean;
|
|
46
50
|
}
|
|
47
51
|
export {};
|