@zsviczian/excalidraw 0.17.1-obsidian-19 → 0.17.1-obsidian-21
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 +267 -92
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +1103 -854
- package/dist/styles.production.css +16 -15
- package/package.json +5 -3
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +20 -5
- package/types/excalidraw/actions/actionAlign.d.ts +39 -27
- package/types/excalidraw/actions/actionBoundText.d.ts +20 -10
- package/types/excalidraw/actions/actionCanvas.d.ts +148 -52
- package/types/excalidraw/actions/actionClipboard.d.ts +72 -30
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +25 -9
- package/types/excalidraw/actions/actionDistribute.d.ts +10 -8
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +7 -7
- package/types/excalidraw/actions/actionElementLock.d.ts +24 -11
- package/types/excalidraw/actions/actionExport.d.ts +85 -32
- package/types/excalidraw/actions/actionFinalize.d.ts +19 -8
- package/types/excalidraw/actions/actionFlip.d.ts +13 -11
- package/types/excalidraw/actions/actionFrame.d.ts +30 -200
- package/types/excalidraw/actions/actionGroup.d.ts +15 -379
- package/types/excalidraw/actions/actionHistory.d.ts +3 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +9 -3
- package/types/excalidraw/actions/actionLink.d.ts +12 -6
- package/types/excalidraw/actions/actionMenu.d.ts +25 -8
- package/types/excalidraw/actions/actionNavigate.d.ts +14 -3
- package/types/excalidraw/actions/actionProperties.d.ts +114 -32
- package/types/excalidraw/actions/actionSelectAll.d.ts +12 -5
- package/types/excalidraw/actions/actionStyles.d.ts +18 -14
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -5
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -6
- package/types/excalidraw/actions/actionToggleStats.d.ts +12 -5
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -5
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -5
- package/types/excalidraw/actions/actionZindex.d.ts +26 -23
- package/types/excalidraw/actions/manager.d.ts +3 -3
- package/types/excalidraw/actions/shortcuts.d.ts +2 -2
- package/types/excalidraw/actions/types.d.ts +10 -8
- package/types/excalidraw/appState.d.ts +4 -4
- package/types/excalidraw/change.d.ts +191 -0
- package/types/excalidraw/clients.d.ts +10 -1
- package/types/excalidraw/components/Actions.d.ts +3 -1
- package/types/excalidraw/components/App.d.ts +23 -9
- package/types/excalidraw/components/Avatar.d.ts +2 -3
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +18 -0
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -0
- package/types/excalidraw/components/CommandPalette/types.d.ts +25 -0
- package/types/excalidraw/components/InlineIcon.d.ts +1 -1
- package/types/excalidraw/components/RadioGroup.d.ts +2 -1
- package/types/excalidraw/components/ToolButton.d.ts +1 -0
- package/types/excalidraw/components/UserList.d.ts +3 -7
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -0
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
- package/types/excalidraw/components/icons.d.ts +26 -1
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +15 -1
- package/types/excalidraw/constants.d.ts +8 -0
- package/types/excalidraw/data/reconcile.d.ts +6 -0
- package/types/excalidraw/data/restore.d.ts +3 -3
- package/types/excalidraw/data/transform.d.ts +1 -1
- package/types/excalidraw/data/url.d.ts +1 -0
- package/types/excalidraw/deburr.d.ts +1 -0
- package/types/excalidraw/element/binding.d.ts +52 -9
- package/types/excalidraw/element/bounds.d.ts +0 -1
- package/types/excalidraw/element/collision.d.ts +14 -19
- package/types/excalidraw/element/embeddable.d.ts +14 -4
- package/types/excalidraw/element/index.d.ts +0 -1
- package/types/excalidraw/element/linearElementEditor.d.ts +17 -12
- package/types/excalidraw/element/mutateElement.d.ts +1 -2
- package/types/excalidraw/element/newElement.d.ts +1 -1
- package/types/excalidraw/element/resizeElements.d.ts +1 -1
- package/types/excalidraw/element/resizeTest.d.ts +4 -4
- package/types/excalidraw/element/textElement.d.ts +1 -7
- package/types/excalidraw/element/transformHandles.d.ts +22 -4
- package/types/excalidraw/element/typeChecks.d.ts +2 -2
- package/types/excalidraw/element/types.d.ts +22 -6
- package/types/excalidraw/errors.d.ts +3 -0
- package/types/excalidraw/fractionalIndex.d.ts +40 -0
- package/types/excalidraw/frame.d.ts +1 -1
- package/types/excalidraw/groups.d.ts +2 -0
- package/types/excalidraw/history.d.ts +34 -46
- package/types/excalidraw/hooks/useEmitter.d.ts +2 -0
- package/types/excalidraw/hooks/useStableCallback.d.ts +4 -0
- package/types/excalidraw/index.d.ts +3 -1
- package/types/excalidraw/keys.d.ts +1 -0
- package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/types/excalidraw/scene/Scene.d.ts +7 -6
- package/types/excalidraw/scene/types.d.ts +11 -20
- package/types/excalidraw/store.d.ts +99 -0
- package/types/excalidraw/types.d.ts +39 -6
- package/types/excalidraw/utils.d.ts +7 -0
- package/types/excalidraw/webpack.prod.config.d.ts +1 -1
- package/types/excalidraw/zindex.d.ts +2 -2
- package/types/utils/collision.d.ts +4 -0
- package/types/utils/export.d.ts +2 -2
- package/types/utils/geometry/geometry.d.ts +71 -0
- package/types/utils/geometry/shape.d.ts +56 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export declare let copiedStyles: string;
|
|
2
2
|
export declare const actionCopyStyles: {
|
|
3
3
|
name: "copyStyles";
|
|
4
|
+
label: string;
|
|
5
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
trackEvent: {
|
|
5
7
|
category: "element";
|
|
6
8
|
};
|
|
7
|
-
perform: (elements: readonly import("../element/types").
|
|
9
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
|
|
8
10
|
appState: {
|
|
9
11
|
toast: {
|
|
10
12
|
message: string;
|
|
@@ -88,6 +90,8 @@ export declare const actionCopyStyles: {
|
|
|
88
90
|
} | {
|
|
89
91
|
name: "ttd";
|
|
90
92
|
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
91
95
|
} | null;
|
|
92
96
|
defaultSidebarDockedPreference: boolean;
|
|
93
97
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -129,6 +133,9 @@ export declare const actionCopyStyles: {
|
|
|
129
133
|
id?: string | undefined;
|
|
130
134
|
socketId?: import("../types").SocketId | undefined;
|
|
131
135
|
isCurrentUser?: boolean | undefined;
|
|
136
|
+
isInCall?: boolean | undefined;
|
|
137
|
+
isSpeaking?: boolean | undefined;
|
|
138
|
+
isMuted?: boolean | undefined;
|
|
132
139
|
}>>;
|
|
133
140
|
showStats: boolean;
|
|
134
141
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -183,27 +190,24 @@ export declare const actionCopyStyles: {
|
|
|
183
190
|
userToFollow: import("../types").UserToFollow | null;
|
|
184
191
|
followedBy: Set<import("../types").SocketId>;
|
|
185
192
|
};
|
|
186
|
-
|
|
193
|
+
storeAction: import("../store").StoreActionType;
|
|
187
194
|
};
|
|
188
|
-
|
|
189
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
195
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
190
196
|
} & {
|
|
191
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
197
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
192
198
|
};
|
|
193
199
|
export declare const actionPasteStyles: {
|
|
194
200
|
name: "pasteStyles";
|
|
201
|
+
label: string;
|
|
202
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
195
203
|
trackEvent: {
|
|
196
204
|
category: "element";
|
|
197
205
|
};
|
|
198
|
-
perform: (elements: readonly import("../element/types").
|
|
199
|
-
elements: readonly import("../element/types").
|
|
200
|
-
|
|
201
|
-
} | {
|
|
202
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
203
|
-
commitToHistory: true;
|
|
206
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
|
|
207
|
+
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
208
|
+
storeAction: import("../store").StoreActionType;
|
|
204
209
|
};
|
|
205
|
-
|
|
206
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
210
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
207
211
|
} & {
|
|
208
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
212
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
209
213
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { AppState } from "../types";
|
|
2
2
|
export declare const actionToggleGridMode: {
|
|
3
3
|
name: "gridMode";
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
keywords: string[];
|
|
6
|
+
label: string;
|
|
4
7
|
viewMode: true;
|
|
5
8
|
trackEvent: {
|
|
6
9
|
category: "canvas";
|
|
7
10
|
predicate: (appState: Readonly<AppState>) => boolean;
|
|
8
11
|
};
|
|
9
|
-
perform(elements: readonly import("../element/types").
|
|
12
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>): {
|
|
10
13
|
appState: {
|
|
11
14
|
gridSize: number | null;
|
|
12
15
|
objectsSnapModeEnabled: false;
|
|
@@ -89,6 +92,8 @@ export declare const actionToggleGridMode: {
|
|
|
89
92
|
} | {
|
|
90
93
|
name: "ttd";
|
|
91
94
|
tab: "mermaid" | "text-to-diagram";
|
|
95
|
+
} | {
|
|
96
|
+
name: "commandPalette";
|
|
92
97
|
} | null;
|
|
93
98
|
defaultSidebarDockedPreference: boolean;
|
|
94
99
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -134,6 +139,9 @@ export declare const actionToggleGridMode: {
|
|
|
134
139
|
id?: string | undefined;
|
|
135
140
|
socketId?: import("../types").SocketId | undefined;
|
|
136
141
|
isCurrentUser?: boolean | undefined;
|
|
142
|
+
isInCall?: boolean | undefined;
|
|
143
|
+
isSpeaking?: boolean | undefined;
|
|
144
|
+
isMuted?: boolean | undefined;
|
|
137
145
|
}>>;
|
|
138
146
|
showStats: boolean;
|
|
139
147
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -187,12 +195,11 @@ export declare const actionToggleGridMode: {
|
|
|
187
195
|
userToFollow: import("../types").UserToFollow | null;
|
|
188
196
|
followedBy: Set<import("../types").SocketId>;
|
|
189
197
|
};
|
|
190
|
-
|
|
198
|
+
storeAction: import("../store").StoreActionType;
|
|
191
199
|
};
|
|
192
200
|
checked: (appState: AppState) => boolean;
|
|
193
201
|
predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
194
|
-
|
|
195
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
202
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
196
203
|
} & {
|
|
197
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
204
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
198
205
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export declare const actionToggleObjectsSnapMode: {
|
|
2
2
|
name: "objectsSnapMode";
|
|
3
|
-
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
viewMode: false;
|
|
4
6
|
trackEvent: {
|
|
5
7
|
category: "canvas";
|
|
6
8
|
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
7
9
|
};
|
|
8
|
-
perform(elements: readonly import("../element/types").
|
|
10
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
9
11
|
appState: {
|
|
10
12
|
objectsSnapModeEnabled: boolean;
|
|
11
13
|
gridSize: null;
|
|
@@ -88,6 +90,8 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
88
90
|
} | {
|
|
89
91
|
name: "ttd";
|
|
90
92
|
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
91
95
|
} | null;
|
|
92
96
|
defaultSidebarDockedPreference: boolean;
|
|
93
97
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -133,6 +137,9 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
133
137
|
id?: string | undefined;
|
|
134
138
|
socketId?: import("../types").SocketId | undefined;
|
|
135
139
|
isCurrentUser?: boolean | undefined;
|
|
140
|
+
isInCall?: boolean | undefined;
|
|
141
|
+
isSpeaking?: boolean | undefined;
|
|
142
|
+
isMuted?: boolean | undefined;
|
|
136
143
|
}>>;
|
|
137
144
|
showStats: boolean;
|
|
138
145
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -186,12 +193,11 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
186
193
|
userToFollow: import("../types").UserToFollow | null;
|
|
187
194
|
followedBy: Set<import("../types").SocketId>;
|
|
188
195
|
};
|
|
189
|
-
|
|
196
|
+
storeAction: import("../store").StoreActionType;
|
|
190
197
|
};
|
|
191
198
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
192
199
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
193
|
-
|
|
194
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
200
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
195
201
|
} & {
|
|
196
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
202
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
197
203
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export declare const actionToggleStats: {
|
|
2
2
|
name: "stats";
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
paletteName: string;
|
|
3
6
|
viewMode: true;
|
|
4
7
|
trackEvent: {
|
|
5
8
|
category: "menu";
|
|
6
9
|
};
|
|
7
|
-
perform(elements: readonly import("../element/types").
|
|
10
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
8
11
|
appState: {
|
|
9
12
|
showStats: boolean;
|
|
10
13
|
contextMenu: {
|
|
@@ -86,6 +89,8 @@ export declare const actionToggleStats: {
|
|
|
86
89
|
} | {
|
|
87
90
|
name: "ttd";
|
|
88
91
|
tab: "mermaid" | "text-to-diagram";
|
|
92
|
+
} | {
|
|
93
|
+
name: "commandPalette";
|
|
89
94
|
} | null;
|
|
90
95
|
defaultSidebarDockedPreference: boolean;
|
|
91
96
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -132,6 +137,9 @@ export declare const actionToggleStats: {
|
|
|
132
137
|
id?: string | undefined;
|
|
133
138
|
socketId?: import("../types").SocketId | undefined;
|
|
134
139
|
isCurrentUser?: boolean | undefined;
|
|
140
|
+
isInCall?: boolean | undefined;
|
|
141
|
+
isSpeaking?: boolean | undefined;
|
|
142
|
+
isMuted?: boolean | undefined;
|
|
135
143
|
}>>;
|
|
136
144
|
currentChartType: import("../element/types").ChartType;
|
|
137
145
|
pasteDialog: {
|
|
@@ -185,11 +193,10 @@ export declare const actionToggleStats: {
|
|
|
185
193
|
userToFollow: import("../types").UserToFollow | null;
|
|
186
194
|
followedBy: Set<import("../types").SocketId>;
|
|
187
195
|
};
|
|
188
|
-
|
|
196
|
+
storeAction: import("../store").StoreActionType;
|
|
189
197
|
};
|
|
190
198
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
191
|
-
|
|
192
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
199
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
193
200
|
} & {
|
|
194
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
201
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
195
202
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export declare const actionToggleViewMode: {
|
|
2
2
|
name: "viewMode";
|
|
3
|
+
label: string;
|
|
4
|
+
paletteName: string;
|
|
5
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
viewMode: true;
|
|
4
7
|
trackEvent: {
|
|
5
8
|
category: "canvas";
|
|
6
9
|
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
7
10
|
};
|
|
8
|
-
perform(elements: readonly import("../element/types").
|
|
11
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
|
|
9
12
|
appState: {
|
|
10
13
|
viewModeEnabled: boolean;
|
|
11
14
|
contextMenu: {
|
|
@@ -87,6 +90,8 @@ export declare const actionToggleViewMode: {
|
|
|
87
90
|
} | {
|
|
88
91
|
name: "ttd";
|
|
89
92
|
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
90
95
|
} | null;
|
|
91
96
|
defaultSidebarDockedPreference: boolean;
|
|
92
97
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -132,6 +137,9 @@ export declare const actionToggleViewMode: {
|
|
|
132
137
|
id?: string | undefined;
|
|
133
138
|
socketId?: import("../types").SocketId | undefined;
|
|
134
139
|
isCurrentUser?: boolean | undefined;
|
|
140
|
+
isInCall?: boolean | undefined;
|
|
141
|
+
isSpeaking?: boolean | undefined;
|
|
142
|
+
isMuted?: boolean | undefined;
|
|
135
143
|
}>>;
|
|
136
144
|
showStats: boolean;
|
|
137
145
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -186,12 +194,11 @@ export declare const actionToggleViewMode: {
|
|
|
186
194
|
userToFollow: import("../types").UserToFollow | null;
|
|
187
195
|
followedBy: Set<import("../types").SocketId>;
|
|
188
196
|
};
|
|
189
|
-
|
|
197
|
+
storeAction: import("../store").StoreActionType;
|
|
190
198
|
};
|
|
191
199
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
192
200
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
193
|
-
|
|
194
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
201
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
195
202
|
} & {
|
|
196
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
203
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
197
204
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export declare const actionToggleZenMode: {
|
|
2
2
|
name: "zenMode";
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
paletteName: string;
|
|
3
6
|
viewMode: true;
|
|
4
7
|
trackEvent: {
|
|
5
8
|
category: "canvas";
|
|
6
9
|
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
7
10
|
};
|
|
8
|
-
perform(elements: readonly import("../element/types").
|
|
11
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
9
12
|
appState: {
|
|
10
13
|
zenModeEnabled: boolean;
|
|
11
14
|
contextMenu: {
|
|
@@ -87,6 +90,8 @@ export declare const actionToggleZenMode: {
|
|
|
87
90
|
} | {
|
|
88
91
|
name: "ttd";
|
|
89
92
|
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
90
95
|
} | null;
|
|
91
96
|
defaultSidebarDockedPreference: boolean;
|
|
92
97
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -132,6 +137,9 @@ export declare const actionToggleZenMode: {
|
|
|
132
137
|
id?: string | undefined;
|
|
133
138
|
socketId?: import("../types").SocketId | undefined;
|
|
134
139
|
isCurrentUser?: boolean | undefined;
|
|
140
|
+
isInCall?: boolean | undefined;
|
|
141
|
+
isSpeaking?: boolean | undefined;
|
|
142
|
+
isMuted?: boolean | undefined;
|
|
135
143
|
}>>;
|
|
136
144
|
showStats: boolean;
|
|
137
145
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -186,12 +194,11 @@ export declare const actionToggleZenMode: {
|
|
|
186
194
|
userToFollow: import("../types").UserToFollow | null;
|
|
187
195
|
followedBy: Set<import("../types").SocketId>;
|
|
188
196
|
};
|
|
189
|
-
|
|
197
|
+
storeAction: import("../store").StoreActionType;
|
|
190
198
|
};
|
|
191
199
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
192
200
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
193
|
-
|
|
194
|
-
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
201
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
195
202
|
} & {
|
|
196
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
203
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
197
204
|
};
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
export declare const actionSendBackward: {
|
|
3
2
|
name: "sendBackward";
|
|
3
|
+
label: string;
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
trackEvent: {
|
|
5
6
|
category: "element";
|
|
6
7
|
};
|
|
7
|
-
perform: (elements: readonly import("../element/types").
|
|
8
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
8
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
9
|
+
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
9
10
|
appState: Readonly<import("../types").AppState>;
|
|
10
|
-
|
|
11
|
+
storeAction: import("../store").StoreActionType;
|
|
11
12
|
};
|
|
12
|
-
contextItemLabel: string;
|
|
13
13
|
keyPriority: number;
|
|
14
|
-
keyTest: (event:
|
|
14
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
15
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
} & {
|
|
17
|
-
keyTest?: ((event:
|
|
17
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
18
|
};
|
|
19
19
|
export declare const actionBringForward: {
|
|
20
20
|
name: "bringForward";
|
|
21
|
+
label: string;
|
|
22
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
trackEvent: {
|
|
22
24
|
category: "element";
|
|
23
25
|
};
|
|
24
|
-
perform: (elements: readonly import("../element/types").
|
|
25
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
26
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
27
|
+
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
26
28
|
appState: Readonly<import("../types").AppState>;
|
|
27
|
-
|
|
29
|
+
storeAction: import("../store").StoreActionType;
|
|
28
30
|
};
|
|
29
|
-
contextItemLabel: string;
|
|
30
31
|
keyPriority: number;
|
|
31
|
-
keyTest: (event:
|
|
32
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
32
33
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
} & {
|
|
34
|
-
keyTest?: ((event:
|
|
35
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
36
|
};
|
|
36
37
|
export declare const actionSendToBack: {
|
|
37
38
|
name: "sendToBack";
|
|
39
|
+
label: string;
|
|
40
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
38
41
|
trackEvent: {
|
|
39
42
|
category: "element";
|
|
40
43
|
};
|
|
41
|
-
perform: (elements: readonly import("../element/types").
|
|
44
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
42
45
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
43
46
|
appState: Readonly<import("../types").AppState>;
|
|
44
|
-
|
|
47
|
+
storeAction: import("../store").StoreActionType;
|
|
45
48
|
};
|
|
46
|
-
|
|
47
|
-
keyTest: (event: React.KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
49
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
48
50
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
51
|
} & {
|
|
50
|
-
keyTest?: ((event:
|
|
52
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
51
53
|
};
|
|
52
54
|
export declare const actionBringToFront: {
|
|
53
55
|
name: "bringToFront";
|
|
56
|
+
label: string;
|
|
57
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
54
58
|
trackEvent: {
|
|
55
59
|
category: "element";
|
|
56
60
|
};
|
|
57
|
-
perform: (elements: readonly import("../element/types").
|
|
61
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
58
62
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
59
63
|
appState: Readonly<import("../types").AppState>;
|
|
60
|
-
|
|
64
|
+
storeAction: import("../store").StoreActionType;
|
|
61
65
|
};
|
|
62
|
-
|
|
63
|
-
keyTest: (event: React.KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
66
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
64
67
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
65
68
|
} & {
|
|
66
|
-
keyTest?: ((event:
|
|
69
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
67
70
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
3
|
-
import {
|
|
3
|
+
import { OrderedExcalidrawElement } from "../element/types";
|
|
4
4
|
import { AppClassProperties, AppState } from "../types";
|
|
5
5
|
export declare class ActionManager {
|
|
6
6
|
actions: Record<ActionName, Action>;
|
|
7
7
|
updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
|
|
8
8
|
getAppState: () => Readonly<AppState>;
|
|
9
|
-
getElementsIncludingDeleted: () => readonly
|
|
9
|
+
getElementsIncludingDeleted: () => readonly OrderedExcalidrawElement[];
|
|
10
10
|
app: AppClassProperties;
|
|
11
|
-
constructor(updater: UpdaterFn, getAppState: () => AppState, getElementsIncludingDeleted: () => readonly
|
|
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
14
|
handleKeyDown(event: React.KeyboardEvent | KeyboardEvent): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SubtypeOf } from "../utility-types";
|
|
2
2
|
import { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool"> | "saveScene" | "imageExport";
|
|
4
|
-
export declare const getShortcutFromShortcutName: (name: ShortcutName) => string;
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "toggleLaserPointerTool" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts"> | "saveScene" | "imageExport" | "commandPalette";
|
|
4
|
+
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles } from "../types";
|
|
2
|
+
import { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
3
|
+
import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import { MarkOptional } from "../utility-types";
|
|
5
|
-
|
|
5
|
+
import { StoreActionType } from "../store";
|
|
6
|
+
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
6
7
|
/** if false, the action should be prevented */
|
|
7
8
|
export type ActionResult = {
|
|
8
9
|
elements?: readonly ExcalidrawElement[] | null;
|
|
9
10
|
appState?: MarkOptional<AppState, "offsetTop" | "offsetLeft" | "width" | "height"> | null;
|
|
10
11
|
files?: BinaryFiles | null;
|
|
11
|
-
|
|
12
|
-
syncHistory?: boolean;
|
|
12
|
+
storeAction: StoreActionType;
|
|
13
13
|
replaceFiles?: boolean;
|
|
14
14
|
} | false;
|
|
15
|
-
type ActionFn = (elements: readonly
|
|
15
|
+
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
16
16
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
17
17
|
export type ActionFilterFn = (action: Action) => void;
|
|
18
|
-
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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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";
|
|
18
|
+
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" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "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" | "commandPalette";
|
|
19
19
|
export type PanelComponentProps = {
|
|
20
20
|
elements: readonly ExcalidrawElement[];
|
|
21
21
|
appState: AppState;
|
|
@@ -26,11 +26,13 @@ export type PanelComponentProps = {
|
|
|
26
26
|
};
|
|
27
27
|
export interface Action {
|
|
28
28
|
name: ActionName;
|
|
29
|
+
label: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: AppClassProperties) => string);
|
|
30
|
+
keywords?: string[];
|
|
31
|
+
icon?: React.ReactNode | ((appState: UIAppState, elements: readonly ExcalidrawElement[]) => React.ReactNode);
|
|
29
32
|
PanelComponent?: React.FC<PanelComponentProps>;
|
|
30
33
|
perform: ActionFn;
|
|
31
34
|
keyPriority?: number;
|
|
32
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
33
|
-
contextItemLabel?: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: AppClassProperties) => string);
|
|
34
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
35
37
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
36
38
|
trackEvent: false | {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
|
+
zenModeEnabled?: boolean | undefined;
|
|
5
|
+
objectsSnapModeEnabled?: boolean | undefined;
|
|
6
|
+
theme?: import("./element/types").Theme | undefined;
|
|
7
|
+
name?: string | null | undefined;
|
|
4
8
|
showWelcomeScreen?: boolean | undefined;
|
|
5
9
|
activeTool?: ({
|
|
6
10
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
@@ -30,7 +34,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
30
34
|
scrollY?: number | undefined;
|
|
31
35
|
cursorButton?: "up" | "down" | undefined;
|
|
32
36
|
scrolledOutside?: boolean | undefined;
|
|
33
|
-
name?: string | null | undefined;
|
|
34
37
|
zoom?: Readonly<{
|
|
35
38
|
value: NormalizedZoomValue;
|
|
36
39
|
}> | undefined;
|
|
@@ -48,8 +51,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
48
51
|
[id: string]: true;
|
|
49
52
|
} | undefined;
|
|
50
53
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
51
|
-
zenModeEnabled?: boolean | undefined;
|
|
52
|
-
theme?: import("./element/types").Theme | undefined;
|
|
53
54
|
gridSize?: number | null | undefined;
|
|
54
55
|
selectedGroupIds?: {
|
|
55
56
|
[groupId: string]: boolean;
|
|
@@ -58,7 +59,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
58
59
|
showStats?: boolean | undefined;
|
|
59
60
|
currentChartType?: import("./element/types").ChartType | undefined;
|
|
60
61
|
selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
61
|
-
objectsSnapModeEnabled?: boolean | undefined;
|
|
62
62
|
};
|
|
63
63
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
64
64
|
viewBackgroundColor?: string | undefined;
|