@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,402 +1,38 @@
|
|
|
1
|
-
import { ExcalidrawElement } from "../element/types";
|
|
1
|
+
import { ExcalidrawElement, OrderedExcalidrawElement } from "../element/types";
|
|
2
2
|
import { AppClassProperties, AppState } from "../types";
|
|
3
3
|
export declare const actionGroup: {
|
|
4
4
|
name: "group";
|
|
5
|
+
label: string;
|
|
6
|
+
icon: (appState: import("../types").UIAppState) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
trackEvent: {
|
|
6
8
|
category: "element";
|
|
7
9
|
};
|
|
8
|
-
perform: (elements: readonly
|
|
10
|
+
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
9
11
|
appState: Readonly<AppState>;
|
|
10
|
-
elements: readonly
|
|
11
|
-
|
|
12
|
-
} | {
|
|
13
|
-
appState: {
|
|
14
|
-
selectedElementIds: Readonly<{
|
|
15
|
-
[id: string]: true;
|
|
16
|
-
}>;
|
|
17
|
-
selectedGroupIds: {
|
|
18
|
-
[groupId: string]: boolean;
|
|
19
|
-
};
|
|
20
|
-
editingGroupId: string | null;
|
|
21
|
-
contextMenu: {
|
|
22
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
23
|
-
top: number;
|
|
24
|
-
left: number;
|
|
25
|
-
} | null;
|
|
26
|
-
showWelcomeScreen: boolean;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
errorMessage: import("react").ReactNode;
|
|
29
|
-
activeEmbeddable: {
|
|
30
|
-
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
31
|
-
state: "active" | "hover";
|
|
32
|
-
} | null;
|
|
33
|
-
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
34
|
-
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
35
|
-
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
36
|
-
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
37
|
-
isBindingEnabled: boolean;
|
|
38
|
-
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
39
|
-
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
40
|
-
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
|
|
41
|
-
frameRendering: {
|
|
42
|
-
enabled: boolean;
|
|
43
|
-
name: boolean;
|
|
44
|
-
outline: boolean;
|
|
45
|
-
clip: boolean;
|
|
46
|
-
};
|
|
47
|
-
editingFrame: string | null;
|
|
48
|
-
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
49
|
-
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
50
|
-
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
51
|
-
activeTool: {
|
|
52
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
53
|
-
locked: boolean;
|
|
54
|
-
} & import("../types").ActiveTool;
|
|
55
|
-
penMode: boolean;
|
|
56
|
-
penDetected: boolean;
|
|
57
|
-
exportBackground: boolean;
|
|
58
|
-
exportEmbedScene: boolean;
|
|
59
|
-
exportWithDarkMode: boolean;
|
|
60
|
-
exportScale: number;
|
|
61
|
-
currentItemStrokeColor: string;
|
|
62
|
-
currentItemBackgroundColor: string;
|
|
63
|
-
currentItemFillStyle: import("../element/types").FillStyle;
|
|
64
|
-
currentItemStrokeWidth: number;
|
|
65
|
-
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
66
|
-
currentItemRoughness: number;
|
|
67
|
-
currentItemOpacity: number;
|
|
68
|
-
currentItemFontFamily: number;
|
|
69
|
-
currentItemFontSize: number;
|
|
70
|
-
currentItemTextAlign: string;
|
|
71
|
-
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
72
|
-
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
73
|
-
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
74
|
-
viewBackgroundColor: string;
|
|
75
|
-
scrollX: number;
|
|
76
|
-
scrollY: number;
|
|
77
|
-
cursorButton: "up" | "down";
|
|
78
|
-
scrolledOutside: boolean;
|
|
79
|
-
name: string | null;
|
|
80
|
-
isResizing: boolean;
|
|
81
|
-
isRotating: boolean;
|
|
82
|
-
zoom: Readonly<{
|
|
83
|
-
value: import("../types").NormalizedZoomValue;
|
|
84
|
-
}>;
|
|
85
|
-
openMenu: "canvas" | "shape" | null;
|
|
86
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
87
|
-
openSidebar: {
|
|
88
|
-
name: string;
|
|
89
|
-
tab?: string | undefined;
|
|
90
|
-
} | null;
|
|
91
|
-
openDialog: {
|
|
92
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
93
|
-
} | {
|
|
94
|
-
name: "settings";
|
|
95
|
-
source: "settings" | "tool" | "generation";
|
|
96
|
-
tab: "text-to-diagram" | "diagram-to-code";
|
|
97
|
-
} | {
|
|
98
|
-
name: "ttd";
|
|
99
|
-
tab: "mermaid" | "text-to-diagram";
|
|
100
|
-
} | null;
|
|
101
|
-
defaultSidebarDockedPreference: boolean;
|
|
102
|
-
lastPointerDownWith: import("../element/types").PointerType;
|
|
103
|
-
previousSelectedElementIds: {
|
|
104
|
-
[id: string]: true;
|
|
105
|
-
};
|
|
106
|
-
selectedElementsAreBeingDragged: boolean;
|
|
107
|
-
shouldCacheIgnoreZoom: boolean;
|
|
108
|
-
toast: {
|
|
109
|
-
message: string;
|
|
110
|
-
closable?: boolean | undefined;
|
|
111
|
-
duration?: number | undefined;
|
|
112
|
-
} | null;
|
|
113
|
-
zenModeEnabled: boolean;
|
|
114
|
-
theme: import("../element/types").Theme;
|
|
115
|
-
gridSize: number | null;
|
|
116
|
-
previousGridSize: number | null;
|
|
117
|
-
viewModeEnabled: boolean;
|
|
118
|
-
width: number;
|
|
119
|
-
height: number;
|
|
120
|
-
offsetTop: number;
|
|
121
|
-
offsetLeft: number;
|
|
122
|
-
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
123
|
-
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
124
|
-
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
125
|
-
button?: "up" | "down" | undefined;
|
|
126
|
-
selectedElementIds?: Readonly<{
|
|
127
|
-
[id: string]: true;
|
|
128
|
-
}> | undefined;
|
|
129
|
-
username?: string | null | undefined;
|
|
130
|
-
userState?: import("../types").UserIdleState | undefined;
|
|
131
|
-
color?: {
|
|
132
|
-
background: string;
|
|
133
|
-
stroke: string;
|
|
134
|
-
} | undefined;
|
|
135
|
-
avatarUrl?: string | undefined;
|
|
136
|
-
id?: string | undefined;
|
|
137
|
-
socketId?: import("../types").SocketId | undefined;
|
|
138
|
-
isCurrentUser?: boolean | undefined;
|
|
139
|
-
}>>;
|
|
140
|
-
showStats: boolean;
|
|
141
|
-
currentChartType: import("../element/types").ChartType;
|
|
142
|
-
pasteDialog: {
|
|
143
|
-
shown: false;
|
|
144
|
-
data: null;
|
|
145
|
-
} | {
|
|
146
|
-
shown: true;
|
|
147
|
-
data: import("../charts").Spreadsheet;
|
|
148
|
-
};
|
|
149
|
-
pendingImageElementId: string | null;
|
|
150
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
151
|
-
linkOpacity: number;
|
|
152
|
-
trayModeEnabled: boolean;
|
|
153
|
-
colorPalette?: {
|
|
154
|
-
canvasBackground: import("../colors").ColorPaletteCustom;
|
|
155
|
-
elementBackground: import("../colors").ColorPaletteCustom;
|
|
156
|
-
elementStroke: import("../colors").ColorPaletteCustom;
|
|
157
|
-
topPicks: {
|
|
158
|
-
canvasBackground: [string, string, string, string, string];
|
|
159
|
-
elementStroke: [string, string, string, string, string];
|
|
160
|
-
elementBackground: [string, string, string, string, string];
|
|
161
|
-
};
|
|
162
|
-
} | undefined;
|
|
163
|
-
allowWheelZoom?: boolean | undefined;
|
|
164
|
-
allowPinchZoom?: boolean | undefined;
|
|
165
|
-
pinnedScripts?: string[] | undefined;
|
|
166
|
-
customPens?: any[] | undefined;
|
|
167
|
-
currentStrokeOptions?: any;
|
|
168
|
-
resetCustomPen?: any;
|
|
169
|
-
gridColor: {
|
|
170
|
-
Bold: string;
|
|
171
|
-
Regular: string;
|
|
172
|
-
MajorGridFrequency?: number | undefined;
|
|
173
|
-
};
|
|
174
|
-
dynamicStyle: {
|
|
175
|
-
[x: string]: string;
|
|
176
|
-
};
|
|
177
|
-
frameColor: {
|
|
178
|
-
stroke: string;
|
|
179
|
-
fill: string;
|
|
180
|
-
nameColor: string;
|
|
181
|
-
};
|
|
182
|
-
invertBindingBehaviour: boolean;
|
|
183
|
-
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
184
|
-
snapLines: readonly import("../snapping").SnapLine[];
|
|
185
|
-
originSnapOffset: {
|
|
186
|
-
x: number;
|
|
187
|
-
y: number;
|
|
188
|
-
} | null;
|
|
189
|
-
objectsSnapModeEnabled: boolean;
|
|
190
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
191
|
-
followedBy: Set<import("../types").SocketId>;
|
|
192
|
-
};
|
|
193
|
-
elements: ExcalidrawElement[];
|
|
194
|
-
commitToHistory: true;
|
|
12
|
+
elements: readonly OrderedExcalidrawElement[];
|
|
13
|
+
storeAction: import("../store").StoreActionType;
|
|
195
14
|
};
|
|
196
|
-
contextItemLabel: string;
|
|
197
15
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
198
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
16
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
199
17
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
200
18
|
} & {
|
|
201
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
19
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
202
20
|
};
|
|
203
21
|
export declare const actionUngroup: {
|
|
204
22
|
name: "ungroup";
|
|
23
|
+
label: string;
|
|
24
|
+
icon: (appState: import("../types").UIAppState) => import("react/jsx-runtime").JSX.Element;
|
|
205
25
|
trackEvent: {
|
|
206
26
|
category: "element";
|
|
207
27
|
};
|
|
208
|
-
perform: (elements: readonly
|
|
28
|
+
perform: (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
209
29
|
appState: Readonly<AppState>;
|
|
210
|
-
elements: readonly
|
|
211
|
-
|
|
212
|
-
} | {
|
|
213
|
-
appState: {
|
|
214
|
-
selectedElementIds: Readonly<{
|
|
215
|
-
[id: string]: true;
|
|
216
|
-
}>;
|
|
217
|
-
selectedGroupIds: {
|
|
218
|
-
[groupId: string]: boolean;
|
|
219
|
-
};
|
|
220
|
-
editingGroupId: string | null;
|
|
221
|
-
contextMenu: {
|
|
222
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
223
|
-
top: number;
|
|
224
|
-
left: number;
|
|
225
|
-
} | null;
|
|
226
|
-
showWelcomeScreen: boolean;
|
|
227
|
-
isLoading: boolean;
|
|
228
|
-
errorMessage: import("react").ReactNode;
|
|
229
|
-
activeEmbeddable: {
|
|
230
|
-
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
231
|
-
state: "active" | "hover";
|
|
232
|
-
} | null;
|
|
233
|
-
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
234
|
-
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
235
|
-
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
236
|
-
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
237
|
-
isBindingEnabled: boolean;
|
|
238
|
-
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
239
|
-
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
240
|
-
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameLikeElement> | null;
|
|
241
|
-
frameRendering: {
|
|
242
|
-
enabled: boolean;
|
|
243
|
-
name: boolean;
|
|
244
|
-
outline: boolean;
|
|
245
|
-
clip: boolean;
|
|
246
|
-
};
|
|
247
|
-
editingFrame: string | null;
|
|
248
|
-
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
249
|
-
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
250
|
-
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
251
|
-
activeTool: {
|
|
252
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
253
|
-
locked: boolean;
|
|
254
|
-
} & import("../types").ActiveTool;
|
|
255
|
-
penMode: boolean;
|
|
256
|
-
penDetected: boolean;
|
|
257
|
-
exportBackground: boolean;
|
|
258
|
-
exportEmbedScene: boolean;
|
|
259
|
-
exportWithDarkMode: boolean;
|
|
260
|
-
exportScale: number;
|
|
261
|
-
currentItemStrokeColor: string;
|
|
262
|
-
currentItemBackgroundColor: string;
|
|
263
|
-
currentItemFillStyle: import("../element/types").FillStyle;
|
|
264
|
-
currentItemStrokeWidth: number;
|
|
265
|
-
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
266
|
-
currentItemRoughness: number;
|
|
267
|
-
currentItemOpacity: number;
|
|
268
|
-
currentItemFontFamily: number;
|
|
269
|
-
currentItemFontSize: number;
|
|
270
|
-
currentItemTextAlign: string;
|
|
271
|
-
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
272
|
-
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
273
|
-
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
274
|
-
viewBackgroundColor: string;
|
|
275
|
-
scrollX: number;
|
|
276
|
-
scrollY: number;
|
|
277
|
-
cursorButton: "up" | "down";
|
|
278
|
-
scrolledOutside: boolean;
|
|
279
|
-
name: string | null;
|
|
280
|
-
isResizing: boolean;
|
|
281
|
-
isRotating: boolean;
|
|
282
|
-
zoom: Readonly<{
|
|
283
|
-
value: import("../types").NormalizedZoomValue;
|
|
284
|
-
}>;
|
|
285
|
-
openMenu: "canvas" | "shape" | null;
|
|
286
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
287
|
-
openSidebar: {
|
|
288
|
-
name: string;
|
|
289
|
-
tab?: string | undefined;
|
|
290
|
-
} | null;
|
|
291
|
-
openDialog: {
|
|
292
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
293
|
-
} | {
|
|
294
|
-
name: "settings";
|
|
295
|
-
source: "settings" | "tool" | "generation";
|
|
296
|
-
tab: "text-to-diagram" | "diagram-to-code";
|
|
297
|
-
} | {
|
|
298
|
-
name: "ttd";
|
|
299
|
-
tab: "mermaid" | "text-to-diagram";
|
|
300
|
-
} | null;
|
|
301
|
-
defaultSidebarDockedPreference: boolean;
|
|
302
|
-
lastPointerDownWith: import("../element/types").PointerType;
|
|
303
|
-
previousSelectedElementIds: {
|
|
304
|
-
[id: string]: true;
|
|
305
|
-
};
|
|
306
|
-
selectedElementsAreBeingDragged: boolean;
|
|
307
|
-
shouldCacheIgnoreZoom: boolean;
|
|
308
|
-
toast: {
|
|
309
|
-
message: string;
|
|
310
|
-
closable?: boolean | undefined;
|
|
311
|
-
duration?: number | undefined;
|
|
312
|
-
} | null;
|
|
313
|
-
zenModeEnabled: boolean;
|
|
314
|
-
theme: import("../element/types").Theme;
|
|
315
|
-
gridSize: number | null;
|
|
316
|
-
previousGridSize: number | null;
|
|
317
|
-
viewModeEnabled: boolean;
|
|
318
|
-
width: number;
|
|
319
|
-
height: number;
|
|
320
|
-
offsetTop: number;
|
|
321
|
-
offsetLeft: number;
|
|
322
|
-
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
323
|
-
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
324
|
-
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
325
|
-
button?: "up" | "down" | undefined;
|
|
326
|
-
selectedElementIds?: Readonly<{
|
|
327
|
-
[id: string]: true;
|
|
328
|
-
}> | undefined;
|
|
329
|
-
username?: string | null | undefined;
|
|
330
|
-
userState?: import("../types").UserIdleState | undefined;
|
|
331
|
-
color?: {
|
|
332
|
-
background: string;
|
|
333
|
-
stroke: string;
|
|
334
|
-
} | undefined;
|
|
335
|
-
avatarUrl?: string | undefined;
|
|
336
|
-
id?: string | undefined;
|
|
337
|
-
socketId?: import("../types").SocketId | undefined;
|
|
338
|
-
isCurrentUser?: boolean | undefined;
|
|
339
|
-
}>>;
|
|
340
|
-
showStats: boolean;
|
|
341
|
-
currentChartType: import("../element/types").ChartType;
|
|
342
|
-
pasteDialog: {
|
|
343
|
-
shown: false;
|
|
344
|
-
data: null;
|
|
345
|
-
} | {
|
|
346
|
-
shown: true;
|
|
347
|
-
data: import("../charts").Spreadsheet;
|
|
348
|
-
};
|
|
349
|
-
pendingImageElementId: string | null;
|
|
350
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
351
|
-
linkOpacity: number;
|
|
352
|
-
trayModeEnabled: boolean;
|
|
353
|
-
colorPalette?: {
|
|
354
|
-
canvasBackground: import("../colors").ColorPaletteCustom;
|
|
355
|
-
elementBackground: import("../colors").ColorPaletteCustom;
|
|
356
|
-
elementStroke: import("../colors").ColorPaletteCustom;
|
|
357
|
-
topPicks: {
|
|
358
|
-
canvasBackground: [string, string, string, string, string];
|
|
359
|
-
elementStroke: [string, string, string, string, string];
|
|
360
|
-
elementBackground: [string, string, string, string, string];
|
|
361
|
-
};
|
|
362
|
-
} | undefined;
|
|
363
|
-
allowWheelZoom?: boolean | undefined;
|
|
364
|
-
allowPinchZoom?: boolean | undefined;
|
|
365
|
-
pinnedScripts?: string[] | undefined;
|
|
366
|
-
customPens?: any[] | undefined;
|
|
367
|
-
currentStrokeOptions?: any;
|
|
368
|
-
resetCustomPen?: any;
|
|
369
|
-
gridColor: {
|
|
370
|
-
Bold: string;
|
|
371
|
-
Regular: string;
|
|
372
|
-
MajorGridFrequency?: number | undefined;
|
|
373
|
-
};
|
|
374
|
-
dynamicStyle: {
|
|
375
|
-
[x: string]: string;
|
|
376
|
-
};
|
|
377
|
-
frameColor: {
|
|
378
|
-
stroke: string;
|
|
379
|
-
fill: string;
|
|
380
|
-
nameColor: string;
|
|
381
|
-
};
|
|
382
|
-
invertBindingBehaviour: boolean;
|
|
383
|
-
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
384
|
-
snapLines: readonly import("../snapping").SnapLine[];
|
|
385
|
-
originSnapOffset: {
|
|
386
|
-
x: number;
|
|
387
|
-
y: number;
|
|
388
|
-
} | null;
|
|
389
|
-
objectsSnapModeEnabled: boolean;
|
|
390
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
391
|
-
followedBy: Set<import("../types").SocketId>;
|
|
392
|
-
};
|
|
393
|
-
elements: ExcalidrawElement[];
|
|
394
|
-
commitToHistory: true;
|
|
30
|
+
elements: readonly OrderedExcalidrawElement[];
|
|
31
|
+
storeAction: import("../store").StoreActionType;
|
|
395
32
|
};
|
|
396
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
397
|
-
contextItemLabel: string;
|
|
33
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
398
34
|
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
399
35
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
400
36
|
} & {
|
|
401
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
37
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
402
38
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Action } from "./types";
|
|
2
|
-
import History from "../history";
|
|
3
|
-
|
|
2
|
+
import { History } from "../history";
|
|
3
|
+
import { Store } from "../store";
|
|
4
|
+
type ActionCreator = (history: History, store: Store) => Action;
|
|
4
5
|
export declare const createUndoAction: ActionCreator;
|
|
5
6
|
export declare const createRedoAction: ActionCreator;
|
|
6
7
|
export {};
|
|
@@ -2,11 +2,13 @@ import { LinearElementEditor } from "../element/linearElementEditor";
|
|
|
2
2
|
import { ExcalidrawLinearElement } from "../element/types";
|
|
3
3
|
export declare const actionToggleLinearEditor: {
|
|
4
4
|
name: "toggleLinearEditor";
|
|
5
|
+
category: string;
|
|
6
|
+
label: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.exit" | "labels.lineEditor.edit";
|
|
5
7
|
trackEvent: {
|
|
6
8
|
category: "element";
|
|
7
9
|
};
|
|
8
10
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
9
|
-
perform(elements: readonly import("../element/types").
|
|
11
|
+
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
|
|
10
12
|
appState: {
|
|
11
13
|
editingLinearElement: LinearElementEditor | null;
|
|
12
14
|
contextMenu: {
|
|
@@ -87,6 +89,8 @@ export declare const actionToggleLinearEditor: {
|
|
|
87
89
|
} | {
|
|
88
90
|
name: "ttd";
|
|
89
91
|
tab: "mermaid" | "text-to-diagram";
|
|
92
|
+
} | {
|
|
93
|
+
name: "commandPalette";
|
|
90
94
|
} | null;
|
|
91
95
|
defaultSidebarDockedPreference: boolean;
|
|
92
96
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -133,6 +137,9 @@ export declare const actionToggleLinearEditor: {
|
|
|
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;
|
|
@@ -187,9 +194,8 @@ export declare const actionToggleLinearEditor: {
|
|
|
187
194
|
userToFollow: import("../types").UserToFollow | null;
|
|
188
195
|
followedBy: Set<import("../types").SocketId>;
|
|
189
196
|
};
|
|
190
|
-
|
|
197
|
+
storeAction: import("../store").StoreActionType;
|
|
191
198
|
};
|
|
192
|
-
contextItemLabel: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.exit" | "labels.lineEditor.edit";
|
|
193
199
|
} & {
|
|
194
200
|
keyTest?: undefined;
|
|
195
201
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const actionLink: {
|
|
2
2
|
name: "hyperlink";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
label: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.createEmbed" | "labels.link.create";
|
|
4
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
|
|
6
|
+
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
5
7
|
appState: {
|
|
6
8
|
showHyperlinkPopup: "editor";
|
|
7
9
|
openMenu: null;
|
|
@@ -83,6 +85,8 @@ export declare const actionLink: {
|
|
|
83
85
|
} | {
|
|
84
86
|
name: "ttd";
|
|
85
87
|
tab: "mermaid" | "text-to-diagram";
|
|
88
|
+
} | {
|
|
89
|
+
name: "commandPalette";
|
|
86
90
|
} | null;
|
|
87
91
|
defaultSidebarDockedPreference: boolean;
|
|
88
92
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -129,6 +133,9 @@ export declare const actionLink: {
|
|
|
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;
|
|
@@ -182,16 +189,15 @@ export declare const actionLink: {
|
|
|
182
189
|
userToFollow: import("../types").UserToFollow | null;
|
|
183
190
|
followedBy: Set<import("../types").SocketId>;
|
|
184
191
|
};
|
|
185
|
-
|
|
192
|
+
storeAction: import("../store").StoreActionType;
|
|
186
193
|
};
|
|
187
194
|
trackEvent: {
|
|
188
195
|
category: "hyperlink";
|
|
189
196
|
action: string;
|
|
190
197
|
};
|
|
191
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
192
|
-
contextItemLabel: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.createEmbed" | "labels.link.create";
|
|
198
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
193
199
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
194
200
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
195
201
|
} & {
|
|
196
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
202
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
197
203
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export declare const actionToggleCanvasMenu: {
|
|
2
2
|
name: "toggleCanvasMenu";
|
|
3
|
+
label: string;
|
|
3
4
|
trackEvent: {
|
|
4
5
|
category: "menu";
|
|
5
6
|
};
|
|
6
|
-
perform: (_: readonly import("../element/types").
|
|
7
|
+
perform: (_: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
7
8
|
appState: {
|
|
8
9
|
openMenu: "canvas" | null;
|
|
9
10
|
contextMenu: {
|
|
@@ -84,6 +85,8 @@ export declare const actionToggleCanvasMenu: {
|
|
|
84
85
|
} | {
|
|
85
86
|
name: "ttd";
|
|
86
87
|
tab: "mermaid" | "text-to-diagram";
|
|
88
|
+
} | {
|
|
89
|
+
name: "commandPalette";
|
|
87
90
|
} | null;
|
|
88
91
|
defaultSidebarDockedPreference: boolean;
|
|
89
92
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -130,6 +133,9 @@ export declare const actionToggleCanvasMenu: {
|
|
|
130
133
|
id?: string | undefined;
|
|
131
134
|
socketId?: import("../types").SocketId | undefined;
|
|
132
135
|
isCurrentUser?: boolean | undefined;
|
|
136
|
+
isInCall?: boolean | undefined;
|
|
137
|
+
isSpeaking?: boolean | undefined;
|
|
138
|
+
isMuted?: boolean | undefined;
|
|
133
139
|
}>>;
|
|
134
140
|
showStats: boolean;
|
|
135
141
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -184,7 +190,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
184
190
|
userToFollow: import("../types").UserToFollow | null;
|
|
185
191
|
followedBy: Set<import("../types").SocketId>;
|
|
186
192
|
};
|
|
187
|
-
|
|
193
|
+
storeAction: import("../store").StoreActionType;
|
|
188
194
|
};
|
|
189
195
|
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
190
196
|
} & {
|
|
@@ -192,10 +198,11 @@ export declare const actionToggleCanvasMenu: {
|
|
|
192
198
|
};
|
|
193
199
|
export declare const actionToggleEditMenu: {
|
|
194
200
|
name: "toggleEditMenu";
|
|
201
|
+
label: string;
|
|
195
202
|
trackEvent: {
|
|
196
203
|
category: "menu";
|
|
197
204
|
};
|
|
198
|
-
perform: (_elements: readonly import("../element/types").
|
|
205
|
+
perform: (_elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
199
206
|
appState: {
|
|
200
207
|
openMenu: "shape" | null;
|
|
201
208
|
contextMenu: {
|
|
@@ -276,6 +283,8 @@ export declare const actionToggleEditMenu: {
|
|
|
276
283
|
} | {
|
|
277
284
|
name: "ttd";
|
|
278
285
|
tab: "mermaid" | "text-to-diagram";
|
|
286
|
+
} | {
|
|
287
|
+
name: "commandPalette";
|
|
279
288
|
} | null;
|
|
280
289
|
defaultSidebarDockedPreference: boolean;
|
|
281
290
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -322,6 +331,9 @@ export declare const actionToggleEditMenu: {
|
|
|
322
331
|
id?: string | undefined;
|
|
323
332
|
socketId?: import("../types").SocketId | undefined;
|
|
324
333
|
isCurrentUser?: boolean | undefined;
|
|
334
|
+
isInCall?: boolean | undefined;
|
|
335
|
+
isSpeaking?: boolean | undefined;
|
|
336
|
+
isMuted?: boolean | undefined;
|
|
325
337
|
}>>;
|
|
326
338
|
showStats: boolean;
|
|
327
339
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -376,7 +388,7 @@ export declare const actionToggleEditMenu: {
|
|
|
376
388
|
userToFollow: import("../types").UserToFollow | null;
|
|
377
389
|
followedBy: Set<import("../types").SocketId>;
|
|
378
390
|
};
|
|
379
|
-
|
|
391
|
+
storeAction: import("../store").StoreActionType;
|
|
380
392
|
};
|
|
381
393
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
382
394
|
} & {
|
|
@@ -384,12 +396,14 @@ export declare const actionToggleEditMenu: {
|
|
|
384
396
|
};
|
|
385
397
|
export declare const actionShortcuts: {
|
|
386
398
|
name: "toggleShortcuts";
|
|
399
|
+
label: string;
|
|
400
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
387
401
|
viewMode: true;
|
|
388
402
|
trackEvent: {
|
|
389
403
|
category: "menu";
|
|
390
404
|
action: string;
|
|
391
405
|
};
|
|
392
|
-
perform: (_elements: readonly import("../element/types").
|
|
406
|
+
perform: (_elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { focusContainer }: import("../types").AppClassProperties) => {
|
|
393
407
|
appState: {
|
|
394
408
|
openDialog: {
|
|
395
409
|
name: "help";
|
|
@@ -509,6 +523,9 @@ export declare const actionShortcuts: {
|
|
|
509
523
|
id?: string | undefined;
|
|
510
524
|
socketId?: import("../types").SocketId | undefined;
|
|
511
525
|
isCurrentUser?: boolean | undefined;
|
|
526
|
+
isInCall?: boolean | undefined;
|
|
527
|
+
isSpeaking?: boolean | undefined;
|
|
528
|
+
isMuted?: boolean | undefined;
|
|
512
529
|
}>>;
|
|
513
530
|
showStats: boolean;
|
|
514
531
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -563,9 +580,9 @@ export declare const actionShortcuts: {
|
|
|
563
580
|
userToFollow: import("../types").UserToFollow | null;
|
|
564
581
|
followedBy: Set<import("../types").SocketId>;
|
|
565
582
|
};
|
|
566
|
-
|
|
583
|
+
storeAction: import("../store").StoreActionType;
|
|
567
584
|
};
|
|
568
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
585
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
569
586
|
} & {
|
|
570
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
587
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
571
588
|
};
|