@zsviczian/excalidraw 0.13.0-obsidian-1 → 0.14.0-obsidian
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/README.md +418 -20
- package/dist/excalidraw.development.js +571 -1154
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -102
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +21 -9
- package/types/actions/actionAlign.d.ts +6 -18
- package/types/actions/actionBoundText.d.ts +9 -5
- package/types/actions/actionCanvas.d.ts +83 -55
- package/types/actions/actionClipboard.d.ts +63 -16
- package/types/actions/actionDeleteSelected.d.ts +31 -12
- package/types/actions/actionDistribute.d.ts +2 -6
- package/types/actions/actionDuplicateSelection.d.ts +1 -3
- package/types/actions/actionExport.d.ts +79 -58
- package/types/actions/actionFinalize.d.ts +15 -9
- package/types/actions/actionFlip.d.ts +2 -2
- package/types/actions/actionGroup.d.ts +4 -8
- package/types/actions/actionLinearEditor.d.ts +8 -4
- package/types/actions/actionMenu.d.ts +24 -17
- package/types/actions/actionNavigate.d.ts +2 -3
- package/types/actions/actionProperties.d.ts +106 -80
- package/types/actions/actionStyles.d.ts +7 -3
- package/types/actions/actionToggleGridMode.d.ts +9 -3
- package/types/actions/actionToggleLock.d.ts +7 -3
- package/types/actions/actionToggleStats.d.ts +8 -3
- package/types/actions/actionToggleViewMode.d.ts +9 -3
- package/types/actions/actionToggleZenMode.d.ts +9 -3
- package/types/actions/actionZindex.d.ts +4 -12
- package/types/actions/manager.d.ts +2 -1
- package/types/actions/types.d.ts +6 -5
- package/types/appState.d.ts +8 -9
- package/types/clipboard.d.ts +6 -1
- package/types/components/App.d.ts +8 -51
- package/types/components/Button.d.ts +15 -0
- package/types/components/CollabButton.d.ts +1 -2
- package/types/components/ContextMenu.d.ts +8 -21
- package/types/components/JSONExportDialog.d.ts +3 -1
- package/types/components/LayerUI.d.ts +2 -3
- package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
- package/types/components/MobileMenu.d.ts +4 -6
- package/types/components/UserList.d.ts +0 -2
- package/types/components/dropdownMenu/DropdownMenu.d.ts +64 -0
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +13 -0
- package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +12 -0
- package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
- package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
- package/types/components/footer/Footer.d.ts +13 -0
- package/types/components/footer/FooterCenter.d.ts +8 -0
- package/types/components/icons.d.ts +1 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
- package/types/components/main-menu/DefaultItems.d.ts +44 -0
- package/types/components/main-menu/MainMenu.d.ts +55 -0
- package/types/components/mainMenu/DefaultItems.d.ts +44 -0
- package/types/components/mainMenu/MainMenu.d.ts +63 -0
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
- package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
- package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
- package/types/constants.d.ts +6 -7
- package/types/element/Hyperlink.d.ts +9 -7
- package/types/element/bounds.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +38 -6
- package/types/element/newElement.d.ts +2 -2
- package/types/element/resizeElements.d.ts +0 -1
- package/types/element/textElement.d.ts +24 -2
- package/types/element/textWysiwyg.d.ts +6 -1
- package/types/element/transformHandles.d.ts +2 -3
- package/types/element/typeChecks.d.ts +10 -1
- package/types/element/types.d.ts +11 -4
- package/types/excalidraw-app/data/index.d.ts +13 -9
- package/types/excalidraw-app/data/localStorage.d.ts +13 -9
- package/types/keys.d.ts +2 -0
- package/types/math.d.ts +2 -1
- package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
- package/types/packages/excalidraw/index.d.ts +10 -0
- package/types/renderer/easingFunctions.d.ts +6 -0
- package/types/renderer/renderElement.d.ts +4 -3
- package/types/scene/Fonts.d.ts +21 -0
- package/types/scene/Scene.d.ts +15 -0
- package/types/scene/comparisons.d.ts +2 -3
- package/types/scene/index.d.ts +1 -1
- package/types/types.d.ts +43 -22
- package/types/utils.d.ts +17 -0
|
@@ -13,7 +13,7 @@ export declare const actionFlipHorizontal: {
|
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
15
|
contextItemLabel: string;
|
|
16
|
-
|
|
16
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
17
17
|
} & {
|
|
18
18
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
19
19
|
};
|
|
@@ -29,7 +29,7 @@ export declare const actionFlipVertical: {
|
|
|
29
29
|
};
|
|
30
30
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
31
31
|
contextItemLabel: string;
|
|
32
|
-
|
|
32
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
33
33
|
} & {
|
|
34
34
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
35
|
};
|
|
@@ -16,11 +16,9 @@ export declare const actionGroup: {
|
|
|
16
16
|
commitToHistory: true;
|
|
17
17
|
};
|
|
18
18
|
contextItemLabel: string;
|
|
19
|
-
|
|
19
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
20
20
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
21
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
22
|
-
isInHamburgerMenu: boolean;
|
|
23
|
-
}) => JSX.Element;
|
|
21
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
24
22
|
} & {
|
|
25
23
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
26
24
|
};
|
|
@@ -40,10 +38,8 @@ export declare const actionUngroup: {
|
|
|
40
38
|
};
|
|
41
39
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
42
40
|
contextItemLabel: string;
|
|
43
|
-
|
|
44
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
45
|
-
isInHamburgerMenu: boolean;
|
|
46
|
-
}) => JSX.Element;
|
|
41
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
42
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
47
43
|
} & {
|
|
48
44
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
49
45
|
};
|
|
@@ -5,10 +5,15 @@ export declare const actionToggleLinearEditor: {
|
|
|
5
5
|
trackEvent: {
|
|
6
6
|
category: "element";
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
9
9
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
|
|
10
10
|
appState: {
|
|
11
11
|
editingLinearElement: LinearElementEditor | null;
|
|
12
|
+
contextMenu: {
|
|
13
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
} | null;
|
|
12
17
|
showWelcomeScreen: boolean;
|
|
13
18
|
isLoading: boolean;
|
|
14
19
|
errorMessage: string | null;
|
|
@@ -47,10 +52,9 @@ export declare const actionToggleLinearEditor: {
|
|
|
47
52
|
currentItemFontFamily: number;
|
|
48
53
|
currentItemFontSize: number;
|
|
49
54
|
currentItemTextAlign: string;
|
|
50
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
51
55
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
56
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
53
|
-
|
|
57
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
54
58
|
viewBackgroundColor: string;
|
|
55
59
|
scrollX: number;
|
|
56
60
|
scrollY: number;
|
|
@@ -65,7 +69,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
65
69
|
openMenu: "canvas" | "shape" | null;
|
|
66
70
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
67
71
|
openSidebar: "library" | "customSidebar" | null;
|
|
68
|
-
openDialog: "imageExport" | "help" | null;
|
|
72
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
69
73
|
isSidebarDocked: boolean;
|
|
70
74
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
71
75
|
selectedElementIds: {
|
|
@@ -7,6 +7,11 @@ export declare const actionToggleCanvasMenu: {
|
|
|
7
7
|
perform: (_: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
8
8
|
appState: {
|
|
9
9
|
openMenu: "canvas" | null;
|
|
10
|
+
contextMenu: {
|
|
11
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
} | null;
|
|
10
15
|
showWelcomeScreen: boolean;
|
|
11
16
|
isLoading: boolean;
|
|
12
17
|
errorMessage: string | null;
|
|
@@ -46,10 +51,9 @@ export declare const actionToggleCanvasMenu: {
|
|
|
46
51
|
currentItemFontFamily: number;
|
|
47
52
|
currentItemFontSize: number;
|
|
48
53
|
currentItemTextAlign: string;
|
|
49
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
54
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
55
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
52
|
-
|
|
56
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
53
57
|
viewBackgroundColor: string;
|
|
54
58
|
scrollX: number;
|
|
55
59
|
scrollY: number;
|
|
@@ -63,7 +67,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
63
67
|
}>;
|
|
64
68
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
65
69
|
openSidebar: "library" | "customSidebar" | null;
|
|
66
|
-
openDialog: "imageExport" | "help" | null;
|
|
70
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
67
71
|
isSidebarDocked: boolean;
|
|
68
72
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
69
73
|
selectedElementIds: {
|
|
@@ -114,9 +118,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
114
118
|
};
|
|
115
119
|
commitToHistory: false;
|
|
116
120
|
};
|
|
117
|
-
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps
|
|
118
|
-
isInHamburgerMenu: boolean;
|
|
119
|
-
}) => JSX.Element;
|
|
121
|
+
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
120
122
|
} & {
|
|
121
123
|
keyTest?: undefined;
|
|
122
124
|
};
|
|
@@ -128,6 +130,11 @@ export declare const actionToggleEditMenu: {
|
|
|
128
130
|
perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
129
131
|
appState: {
|
|
130
132
|
openMenu: "shape" | null;
|
|
133
|
+
contextMenu: {
|
|
134
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
135
|
+
top: number;
|
|
136
|
+
left: number;
|
|
137
|
+
} | null;
|
|
131
138
|
showWelcomeScreen: boolean;
|
|
132
139
|
isLoading: boolean;
|
|
133
140
|
errorMessage: string | null;
|
|
@@ -167,10 +174,9 @@ export declare const actionToggleEditMenu: {
|
|
|
167
174
|
currentItemFontFamily: number;
|
|
168
175
|
currentItemFontSize: number;
|
|
169
176
|
currentItemTextAlign: string;
|
|
170
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
171
177
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
172
178
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
173
|
-
|
|
179
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
174
180
|
viewBackgroundColor: string;
|
|
175
181
|
scrollX: number;
|
|
176
182
|
scrollY: number;
|
|
@@ -184,7 +190,7 @@ export declare const actionToggleEditMenu: {
|
|
|
184
190
|
}>;
|
|
185
191
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
186
192
|
openSidebar: "library" | "customSidebar" | null;
|
|
187
|
-
openDialog: "imageExport" | "help" | null;
|
|
193
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
188
194
|
isSidebarDocked: boolean;
|
|
189
195
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
190
196
|
selectedElementIds: {
|
|
@@ -235,14 +241,13 @@ export declare const actionToggleEditMenu: {
|
|
|
235
241
|
};
|
|
236
242
|
commitToHistory: false;
|
|
237
243
|
};
|
|
238
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
239
|
-
isInHamburgerMenu: boolean;
|
|
240
|
-
}) => JSX.Element;
|
|
244
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
241
245
|
} & {
|
|
242
246
|
keyTest?: undefined;
|
|
243
247
|
};
|
|
244
248
|
export declare const actionFullScreen: {
|
|
245
249
|
name: "toggleFullScreen";
|
|
250
|
+
viewMode: true;
|
|
246
251
|
trackEvent: {
|
|
247
252
|
category: "canvas";
|
|
248
253
|
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
@@ -256,6 +261,7 @@ export declare const actionFullScreen: {
|
|
|
256
261
|
};
|
|
257
262
|
export declare const actionShortcuts: {
|
|
258
263
|
name: "toggleShortcuts";
|
|
264
|
+
viewMode: true;
|
|
259
265
|
trackEvent: {
|
|
260
266
|
category: "menu";
|
|
261
267
|
action: string;
|
|
@@ -263,6 +269,11 @@ export declare const actionShortcuts: {
|
|
|
263
269
|
perform: (_elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, { focusContainer }: import("../types").AppClassProperties) => {
|
|
264
270
|
appState: {
|
|
265
271
|
openDialog: "help" | null;
|
|
272
|
+
contextMenu: {
|
|
273
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
274
|
+
top: number;
|
|
275
|
+
left: number;
|
|
276
|
+
} | null;
|
|
266
277
|
showWelcomeScreen: boolean;
|
|
267
278
|
isLoading: boolean;
|
|
268
279
|
errorMessage: string | null;
|
|
@@ -302,10 +313,9 @@ export declare const actionShortcuts: {
|
|
|
302
313
|
currentItemFontFamily: number;
|
|
303
314
|
currentItemFontSize: number;
|
|
304
315
|
currentItemTextAlign: string;
|
|
305
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
306
316
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
307
317
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
308
|
-
|
|
318
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
309
319
|
viewBackgroundColor: string;
|
|
310
320
|
scrollX: number;
|
|
311
321
|
scrollY: number;
|
|
@@ -370,9 +380,6 @@ export declare const actionShortcuts: {
|
|
|
370
380
|
};
|
|
371
381
|
commitToHistory: false;
|
|
372
382
|
};
|
|
373
|
-
PanelComponent: ({ updateData, isInHamburgerMenu }: import("./types").PanelComponentProps & {
|
|
374
|
-
isInHamburgerMenu: boolean;
|
|
375
|
-
}) => JSX.Element;
|
|
376
383
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
377
384
|
} & {
|
|
378
385
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const actionGoToCollaborator: {
|
|
2
2
|
name: "goToCollaborator";
|
|
3
|
+
viewMode: true;
|
|
3
4
|
trackEvent: {
|
|
4
5
|
category: "collab";
|
|
5
6
|
};
|
|
@@ -7,9 +8,7 @@ export declare const actionGoToCollaborator: {
|
|
|
7
8
|
appState: Readonly<import("../types").AppState>;
|
|
8
9
|
commitToHistory: false;
|
|
9
10
|
};
|
|
10
|
-
PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps
|
|
11
|
-
isInHamburgerMenu: boolean;
|
|
12
|
-
}) => JSX.Element;
|
|
11
|
+
PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
13
12
|
} & {
|
|
14
13
|
keyTest?: undefined;
|
|
15
14
|
};
|