@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
|
@@ -4,13 +4,12 @@ import { AppState, NormalizedZoomValue } from "../types";
|
|
|
4
4
|
export declare const actionChangeViewBackgroundColor: {
|
|
5
5
|
name: "changeViewBackgroundColor";
|
|
6
6
|
trackEvent: false;
|
|
7
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
7
8
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
8
9
|
appState: any;
|
|
9
10
|
commitToHistory: boolean;
|
|
10
11
|
};
|
|
11
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps
|
|
12
|
-
isInHamburgerMenu: boolean;
|
|
13
|
-
}) => JSX.Element;
|
|
12
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
14
13
|
} & {
|
|
15
14
|
keyTest?: undefined;
|
|
16
15
|
};
|
|
@@ -19,6 +18,7 @@ export declare const actionClearCanvas: {
|
|
|
19
18
|
trackEvent: {
|
|
20
19
|
category: "canvas";
|
|
21
20
|
};
|
|
21
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
22
22
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
23
23
|
elements: ExcalidrawElement[];
|
|
24
24
|
appState: {
|
|
@@ -55,13 +55,11 @@ export declare const actionClearCanvas: {
|
|
|
55
55
|
};
|
|
56
56
|
trayModeEnabled: boolean;
|
|
57
57
|
name: string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}>;
|
|
64
|
-
shouldCacheIgnoreZoom: boolean;
|
|
58
|
+
contextMenu: {
|
|
59
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
60
|
+
top: number;
|
|
61
|
+
left: number;
|
|
62
|
+
} | null;
|
|
65
63
|
showWelcomeScreen: boolean;
|
|
66
64
|
isLoading: boolean;
|
|
67
65
|
errorMessage: string | null;
|
|
@@ -86,18 +84,23 @@ export declare const actionClearCanvas: {
|
|
|
86
84
|
currentItemFontFamily: number;
|
|
87
85
|
currentItemFontSize: number;
|
|
88
86
|
currentItemTextAlign: string;
|
|
89
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
90
87
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
91
88
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
92
|
-
|
|
89
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
90
|
+
viewBackgroundColor: string;
|
|
91
|
+
scrollX: number;
|
|
92
|
+
scrollY: number;
|
|
93
93
|
cursorButton: "up" | "down";
|
|
94
94
|
scrolledOutside: boolean;
|
|
95
95
|
isResizing: boolean;
|
|
96
96
|
isRotating: boolean;
|
|
97
|
+
zoom: Readonly<{
|
|
98
|
+
value: NormalizedZoomValue;
|
|
99
|
+
}>;
|
|
97
100
|
openMenu: "canvas" | "shape" | null;
|
|
98
101
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
99
102
|
openSidebar: "library" | "customSidebar" | null;
|
|
100
|
-
openDialog: "imageExport" | "help" | null;
|
|
103
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
101
104
|
isSidebarDocked: boolean;
|
|
102
105
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
103
106
|
selectedElementIds: {
|
|
@@ -106,6 +109,7 @@ export declare const actionClearCanvas: {
|
|
|
106
109
|
previousSelectedElementIds: {
|
|
107
110
|
[id: string]: boolean;
|
|
108
111
|
};
|
|
112
|
+
shouldCacheIgnoreZoom: boolean;
|
|
109
113
|
toast: {
|
|
110
114
|
message: string;
|
|
111
115
|
closable?: boolean | undefined;
|
|
@@ -127,14 +131,12 @@ export declare const actionClearCanvas: {
|
|
|
127
131
|
};
|
|
128
132
|
commitToHistory: true;
|
|
129
133
|
};
|
|
130
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps & {
|
|
131
|
-
isInHamburgerMenu: boolean;
|
|
132
|
-
}) => JSX.Element;
|
|
133
134
|
} & {
|
|
134
135
|
keyTest?: undefined;
|
|
135
136
|
};
|
|
136
137
|
export declare const actionZoomIn: {
|
|
137
138
|
name: "zoomIn";
|
|
139
|
+
viewMode: true;
|
|
138
140
|
trackEvent: {
|
|
139
141
|
category: "canvas";
|
|
140
142
|
};
|
|
@@ -145,6 +147,11 @@ export declare const actionZoomIn: {
|
|
|
145
147
|
zoom: {
|
|
146
148
|
value: NormalizedZoomValue;
|
|
147
149
|
};
|
|
150
|
+
contextMenu: {
|
|
151
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
152
|
+
top: number;
|
|
153
|
+
left: number;
|
|
154
|
+
} | null;
|
|
148
155
|
showWelcomeScreen: boolean;
|
|
149
156
|
isLoading: boolean;
|
|
150
157
|
errorMessage: string | null;
|
|
@@ -184,10 +191,9 @@ export declare const actionZoomIn: {
|
|
|
184
191
|
currentItemFontFamily: number;
|
|
185
192
|
currentItemFontSize: number;
|
|
186
193
|
currentItemTextAlign: string;
|
|
187
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
188
194
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
189
195
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
190
|
-
|
|
196
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
191
197
|
viewBackgroundColor: string;
|
|
192
198
|
cursorButton: "up" | "down";
|
|
193
199
|
scrolledOutside: boolean;
|
|
@@ -197,7 +203,7 @@ export declare const actionZoomIn: {
|
|
|
197
203
|
openMenu: "canvas" | "shape" | null;
|
|
198
204
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
199
205
|
openSidebar: "library" | "customSidebar" | null;
|
|
200
|
-
openDialog: "imageExport" | "help" | null;
|
|
206
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
201
207
|
isSidebarDocked: boolean;
|
|
202
208
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
203
209
|
selectedElementIds: {
|
|
@@ -248,15 +254,14 @@ export declare const actionZoomIn: {
|
|
|
248
254
|
};
|
|
249
255
|
commitToHistory: false;
|
|
250
256
|
};
|
|
251
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps
|
|
252
|
-
isInHamburgerMenu: boolean;
|
|
253
|
-
}) => JSX.Element;
|
|
257
|
+
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
254
258
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
255
259
|
} & {
|
|
256
260
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
257
261
|
};
|
|
258
262
|
export declare const actionZoomOut: {
|
|
259
263
|
name: "zoomOut";
|
|
264
|
+
viewMode: true;
|
|
260
265
|
trackEvent: {
|
|
261
266
|
category: "canvas";
|
|
262
267
|
};
|
|
@@ -267,6 +272,11 @@ export declare const actionZoomOut: {
|
|
|
267
272
|
zoom: {
|
|
268
273
|
value: NormalizedZoomValue;
|
|
269
274
|
};
|
|
275
|
+
contextMenu: {
|
|
276
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
277
|
+
top: number;
|
|
278
|
+
left: number;
|
|
279
|
+
} | null;
|
|
270
280
|
showWelcomeScreen: boolean;
|
|
271
281
|
isLoading: boolean;
|
|
272
282
|
errorMessage: string | null;
|
|
@@ -306,10 +316,9 @@ export declare const actionZoomOut: {
|
|
|
306
316
|
currentItemFontFamily: number;
|
|
307
317
|
currentItemFontSize: number;
|
|
308
318
|
currentItemTextAlign: string;
|
|
309
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
310
319
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
311
320
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
312
|
-
|
|
321
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
313
322
|
viewBackgroundColor: string;
|
|
314
323
|
cursorButton: "up" | "down";
|
|
315
324
|
scrolledOutside: boolean;
|
|
@@ -319,7 +328,7 @@ export declare const actionZoomOut: {
|
|
|
319
328
|
openMenu: "canvas" | "shape" | null;
|
|
320
329
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
321
330
|
openSidebar: "library" | "customSidebar" | null;
|
|
322
|
-
openDialog: "imageExport" | "help" | null;
|
|
331
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
323
332
|
isSidebarDocked: boolean;
|
|
324
333
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
325
334
|
selectedElementIds: {
|
|
@@ -370,15 +379,14 @@ export declare const actionZoomOut: {
|
|
|
370
379
|
};
|
|
371
380
|
commitToHistory: false;
|
|
372
381
|
};
|
|
373
|
-
PanelComponent: ({ updateData }: import("./types").PanelComponentProps
|
|
374
|
-
isInHamburgerMenu: boolean;
|
|
375
|
-
}) => JSX.Element;
|
|
382
|
+
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => 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;
|
|
379
386
|
};
|
|
380
387
|
export declare const actionResetZoom: {
|
|
381
388
|
name: "resetZoom";
|
|
389
|
+
viewMode: true;
|
|
382
390
|
trackEvent: {
|
|
383
391
|
category: "canvas";
|
|
384
392
|
};
|
|
@@ -389,6 +397,11 @@ export declare const actionResetZoom: {
|
|
|
389
397
|
zoom: {
|
|
390
398
|
value: NormalizedZoomValue;
|
|
391
399
|
};
|
|
400
|
+
contextMenu: {
|
|
401
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
402
|
+
top: number;
|
|
403
|
+
left: number;
|
|
404
|
+
} | null;
|
|
392
405
|
showWelcomeScreen: boolean;
|
|
393
406
|
isLoading: boolean;
|
|
394
407
|
errorMessage: string | null;
|
|
@@ -428,10 +441,9 @@ export declare const actionResetZoom: {
|
|
|
428
441
|
currentItemFontFamily: number;
|
|
429
442
|
currentItemFontSize: number;
|
|
430
443
|
currentItemTextAlign: string;
|
|
431
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
432
444
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
433
445
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
434
|
-
|
|
446
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
435
447
|
viewBackgroundColor: string;
|
|
436
448
|
cursorButton: "up" | "down";
|
|
437
449
|
scrolledOutside: boolean;
|
|
@@ -441,7 +453,7 @@ export declare const actionResetZoom: {
|
|
|
441
453
|
openMenu: "canvas" | "shape" | null;
|
|
442
454
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
443
455
|
openSidebar: "library" | "customSidebar" | null;
|
|
444
|
-
openDialog: "imageExport" | "help" | null;
|
|
456
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
445
457
|
isSidebarDocked: boolean;
|
|
446
458
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
447
459
|
selectedElementIds: {
|
|
@@ -492,9 +504,7 @@ export declare const actionResetZoom: {
|
|
|
492
504
|
};
|
|
493
505
|
commitToHistory: false;
|
|
494
506
|
};
|
|
495
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
496
|
-
isInHamburgerMenu: boolean;
|
|
497
|
-
}) => JSX.Element;
|
|
507
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
498
508
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
499
509
|
} & {
|
|
500
510
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -506,6 +516,11 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
506
516
|
};
|
|
507
517
|
scrollX: number;
|
|
508
518
|
scrollY: number;
|
|
519
|
+
contextMenu: {
|
|
520
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
521
|
+
top: number;
|
|
522
|
+
left: number;
|
|
523
|
+
} | null;
|
|
509
524
|
showWelcomeScreen: boolean;
|
|
510
525
|
isLoading: boolean;
|
|
511
526
|
errorMessage: string | null;
|
|
@@ -545,10 +560,9 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
545
560
|
currentItemFontFamily: number;
|
|
546
561
|
currentItemFontSize: number;
|
|
547
562
|
currentItemTextAlign: string;
|
|
548
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
549
563
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
550
564
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
551
|
-
|
|
565
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
552
566
|
viewBackgroundColor: string;
|
|
553
567
|
cursorButton: "up" | "down";
|
|
554
568
|
scrolledOutside: boolean;
|
|
@@ -558,7 +572,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
558
572
|
openMenu: "canvas" | "shape" | null;
|
|
559
573
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
560
574
|
openSidebar: "library" | "customSidebar" | null;
|
|
561
|
-
openDialog: "imageExport" | "help" | null;
|
|
575
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
562
576
|
isSidebarDocked: boolean;
|
|
563
577
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
564
578
|
selectedElementIds: {
|
|
@@ -621,6 +635,11 @@ export declare const actionZoomToSelected: {
|
|
|
621
635
|
};
|
|
622
636
|
scrollX: number;
|
|
623
637
|
scrollY: number;
|
|
638
|
+
contextMenu: {
|
|
639
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
640
|
+
top: number;
|
|
641
|
+
left: number;
|
|
642
|
+
} | null;
|
|
624
643
|
showWelcomeScreen: boolean;
|
|
625
644
|
isLoading: boolean;
|
|
626
645
|
errorMessage: string | null;
|
|
@@ -660,10 +679,9 @@ export declare const actionZoomToSelected: {
|
|
|
660
679
|
currentItemFontFamily: number;
|
|
661
680
|
currentItemFontSize: number;
|
|
662
681
|
currentItemTextAlign: string;
|
|
663
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
664
682
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
665
683
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
666
|
-
|
|
684
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
667
685
|
viewBackgroundColor: string;
|
|
668
686
|
cursorButton: "up" | "down";
|
|
669
687
|
scrolledOutside: boolean;
|
|
@@ -673,7 +691,7 @@ export declare const actionZoomToSelected: {
|
|
|
673
691
|
openMenu: "canvas" | "shape" | null;
|
|
674
692
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
675
693
|
openSidebar: "library" | "customSidebar" | null;
|
|
676
|
-
openDialog: "imageExport" | "help" | null;
|
|
694
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
677
695
|
isSidebarDocked: boolean;
|
|
678
696
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
679
697
|
selectedElementIds: {
|
|
@@ -730,6 +748,7 @@ export declare const actionZoomToSelected: {
|
|
|
730
748
|
};
|
|
731
749
|
export declare const actionZoomToFit: {
|
|
732
750
|
name: "zoomToFit";
|
|
751
|
+
viewMode: true;
|
|
733
752
|
trackEvent: {
|
|
734
753
|
category: "canvas";
|
|
735
754
|
};
|
|
@@ -740,6 +759,11 @@ export declare const actionZoomToFit: {
|
|
|
740
759
|
};
|
|
741
760
|
scrollX: number;
|
|
742
761
|
scrollY: number;
|
|
762
|
+
contextMenu: {
|
|
763
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
764
|
+
top: number;
|
|
765
|
+
left: number;
|
|
766
|
+
} | null;
|
|
743
767
|
showWelcomeScreen: boolean;
|
|
744
768
|
isLoading: boolean;
|
|
745
769
|
errorMessage: string | null;
|
|
@@ -779,10 +803,9 @@ export declare const actionZoomToFit: {
|
|
|
779
803
|
currentItemFontFamily: number;
|
|
780
804
|
currentItemFontSize: number;
|
|
781
805
|
currentItemTextAlign: string;
|
|
782
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
783
806
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
784
807
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
785
|
-
|
|
808
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
786
809
|
viewBackgroundColor: string;
|
|
787
810
|
cursorButton: "up" | "down";
|
|
788
811
|
scrolledOutside: boolean;
|
|
@@ -792,7 +815,7 @@ export declare const actionZoomToFit: {
|
|
|
792
815
|
openMenu: "canvas" | "shape" | null;
|
|
793
816
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
794
817
|
openSidebar: "library" | "customSidebar" | null;
|
|
795
|
-
openDialog: "imageExport" | "help" | null;
|
|
818
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
796
819
|
isSidebarDocked: boolean;
|
|
797
820
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
798
821
|
selectedElementIds: {
|
|
@@ -849,12 +872,18 @@ export declare const actionZoomToFit: {
|
|
|
849
872
|
};
|
|
850
873
|
export declare const actionToggleTheme: {
|
|
851
874
|
name: "toggleTheme";
|
|
875
|
+
viewMode: true;
|
|
852
876
|
trackEvent: {
|
|
853
877
|
category: "canvas";
|
|
854
878
|
};
|
|
855
879
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app: import("../types").AppClassProperties) => {
|
|
856
880
|
appState: {
|
|
857
881
|
theme: any;
|
|
882
|
+
contextMenu: {
|
|
883
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
884
|
+
top: number;
|
|
885
|
+
left: number;
|
|
886
|
+
} | null;
|
|
858
887
|
showWelcomeScreen: boolean;
|
|
859
888
|
isLoading: boolean;
|
|
860
889
|
errorMessage: string | null;
|
|
@@ -894,10 +923,9 @@ export declare const actionToggleTheme: {
|
|
|
894
923
|
currentItemFontFamily: number;
|
|
895
924
|
currentItemFontSize: number;
|
|
896
925
|
currentItemTextAlign: string;
|
|
897
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
898
926
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
899
927
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
900
|
-
|
|
928
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
901
929
|
viewBackgroundColor: string;
|
|
902
930
|
scrollX: number;
|
|
903
931
|
scrollY: number;
|
|
@@ -912,7 +940,7 @@ export declare const actionToggleTheme: {
|
|
|
912
940
|
openMenu: "canvas" | "shape" | null;
|
|
913
941
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
914
942
|
openSidebar: "library" | "customSidebar" | null;
|
|
915
|
-
openDialog: "imageExport" | "help" | null;
|
|
943
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
916
944
|
isSidebarDocked: boolean;
|
|
917
945
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
918
946
|
selectedElementIds: {
|
|
@@ -962,10 +990,8 @@ export declare const actionToggleTheme: {
|
|
|
962
990
|
};
|
|
963
991
|
commitToHistory: false;
|
|
964
992
|
};
|
|
965
|
-
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps & {
|
|
966
|
-
isInHamburgerMenu: boolean;
|
|
967
|
-
}) => JSX.Element;
|
|
968
993
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
994
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
969
995
|
} & {
|
|
970
996
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
971
997
|
};
|
|
@@ -989,6 +1015,11 @@ export declare const actionErase: {
|
|
|
989
1015
|
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
990
1016
|
locked: boolean;
|
|
991
1017
|
};
|
|
1018
|
+
contextMenu: {
|
|
1019
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
1020
|
+
top: number;
|
|
1021
|
+
left: number;
|
|
1022
|
+
} | null;
|
|
992
1023
|
showWelcomeScreen: boolean;
|
|
993
1024
|
isLoading: boolean;
|
|
994
1025
|
errorMessage: string | null;
|
|
@@ -1017,10 +1048,9 @@ export declare const actionErase: {
|
|
|
1017
1048
|
currentItemFontFamily: number;
|
|
1018
1049
|
currentItemFontSize: number;
|
|
1019
1050
|
currentItemTextAlign: string;
|
|
1020
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
1021
1051
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1022
1052
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1023
|
-
|
|
1053
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1024
1054
|
viewBackgroundColor: string;
|
|
1025
1055
|
scrollX: number;
|
|
1026
1056
|
scrollY: number;
|
|
@@ -1035,7 +1065,7 @@ export declare const actionErase: {
|
|
|
1035
1065
|
openMenu: "canvas" | "shape" | null;
|
|
1036
1066
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
1037
1067
|
openSidebar: "library" | "customSidebar" | null;
|
|
1038
|
-
openDialog: "imageExport" | "help" | null;
|
|
1068
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
1039
1069
|
isSidebarDocked: boolean;
|
|
1040
1070
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
1041
1071
|
previousSelectedElementIds: {
|
|
@@ -1081,9 +1111,7 @@ export declare const actionErase: {
|
|
|
1081
1111
|
commitToHistory: true;
|
|
1082
1112
|
};
|
|
1083
1113
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1084
|
-
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps
|
|
1085
|
-
isInHamburgerMenu: boolean;
|
|
1086
|
-
}) => JSX.Element;
|
|
1114
|
+
PanelComponent: ({ elements, appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1087
1115
|
} & {
|
|
1088
1116
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
1089
1117
|
};
|
|
@@ -7,6 +7,21 @@ export declare const actionCopy: {
|
|
|
7
7
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
8
8
|
commitToHistory: false;
|
|
9
9
|
};
|
|
10
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => true;
|
|
11
|
+
contextItemLabel: string;
|
|
12
|
+
keyTest: undefined;
|
|
13
|
+
} & {
|
|
14
|
+
keyTest?: undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare const actionPaste: {
|
|
17
|
+
name: "paste";
|
|
18
|
+
trackEvent: {
|
|
19
|
+
category: "element";
|
|
20
|
+
};
|
|
21
|
+
perform: (elements: any, appStates: any, data: any, app: import("../types").AppClassProperties) => {
|
|
22
|
+
commitToHistory: false;
|
|
23
|
+
};
|
|
24
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => true;
|
|
10
25
|
contextItemLabel: string;
|
|
11
26
|
keyTest: undefined;
|
|
12
27
|
} & {
|
|
@@ -21,6 +36,11 @@ export declare const actionCut: {
|
|
|
21
36
|
elements: import("../element/types").ExcalidrawElement[];
|
|
22
37
|
appState: {
|
|
23
38
|
editingLinearElement: null;
|
|
39
|
+
contextMenu: {
|
|
40
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
41
|
+
top: number;
|
|
42
|
+
left: number;
|
|
43
|
+
} | null;
|
|
24
44
|
showWelcomeScreen: boolean;
|
|
25
45
|
isLoading: boolean;
|
|
26
46
|
errorMessage: string | null;
|
|
@@ -59,10 +79,9 @@ export declare const actionCut: {
|
|
|
59
79
|
currentItemFontFamily: number;
|
|
60
80
|
currentItemFontSize: number;
|
|
61
81
|
currentItemTextAlign: string;
|
|
62
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
63
82
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
64
83
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
65
|
-
|
|
84
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
66
85
|
viewBackgroundColor: string;
|
|
67
86
|
scrollX: number;
|
|
68
87
|
scrollY: number;
|
|
@@ -77,7 +96,7 @@ export declare const actionCut: {
|
|
|
77
96
|
openMenu: "canvas" | "shape" | null;
|
|
78
97
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
79
98
|
openSidebar: "library" | "customSidebar" | null;
|
|
80
|
-
openDialog: "imageExport" | "help" | null;
|
|
99
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
81
100
|
isSidebarDocked: boolean;
|
|
82
101
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
83
102
|
selectedElementIds: {
|
|
@@ -140,6 +159,15 @@ export declare const actionCut: {
|
|
|
140
159
|
pointerDownState: Readonly<{
|
|
141
160
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
142
161
|
lastClickedPoint: number;
|
|
162
|
+
origin: Readonly<{
|
|
163
|
+
x: number;
|
|
164
|
+
y: number;
|
|
165
|
+
}> | null;
|
|
166
|
+
segmentMidpoint: {
|
|
167
|
+
value: readonly [number, number] | null;
|
|
168
|
+
index: number | null;
|
|
169
|
+
added: boolean;
|
|
170
|
+
};
|
|
143
171
|
}>;
|
|
144
172
|
isDragging: boolean;
|
|
145
173
|
lastUncommittedPoint: readonly [number, number] | null;
|
|
@@ -150,6 +178,11 @@ export declare const actionCut: {
|
|
|
150
178
|
hoverPointIndex: number;
|
|
151
179
|
segmentMidPointHoveredCoords: readonly [number, number] | null;
|
|
152
180
|
};
|
|
181
|
+
contextMenu: {
|
|
182
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
183
|
+
top: number;
|
|
184
|
+
left: number;
|
|
185
|
+
} | null;
|
|
153
186
|
showWelcomeScreen: boolean;
|
|
154
187
|
isLoading: boolean;
|
|
155
188
|
errorMessage: string | null;
|
|
@@ -188,10 +221,9 @@ export declare const actionCut: {
|
|
|
188
221
|
currentItemFontFamily: number;
|
|
189
222
|
currentItemFontSize: number;
|
|
190
223
|
currentItemTextAlign: string;
|
|
191
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
192
224
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
193
225
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
194
|
-
|
|
226
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
195
227
|
viewBackgroundColor: string;
|
|
196
228
|
scrollX: number;
|
|
197
229
|
scrollY: number;
|
|
@@ -206,7 +238,7 @@ export declare const actionCut: {
|
|
|
206
238
|
openMenu: "canvas" | "shape" | null;
|
|
207
239
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
208
240
|
openSidebar: "library" | "customSidebar" | null;
|
|
209
|
-
openDialog: "imageExport" | "help" | null;
|
|
241
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
210
242
|
isSidebarDocked: boolean;
|
|
211
243
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
212
244
|
selectedElementIds: {
|
|
@@ -272,6 +304,11 @@ export declare const actionCut: {
|
|
|
272
304
|
};
|
|
273
305
|
multiElement: null;
|
|
274
306
|
selectedElementIds: {};
|
|
307
|
+
contextMenu: {
|
|
308
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
309
|
+
top: number;
|
|
310
|
+
left: number;
|
|
311
|
+
} | null;
|
|
275
312
|
showWelcomeScreen: boolean;
|
|
276
313
|
isLoading: boolean;
|
|
277
314
|
errorMessage: string | null;
|
|
@@ -299,10 +336,9 @@ export declare const actionCut: {
|
|
|
299
336
|
currentItemFontFamily: number;
|
|
300
337
|
currentItemFontSize: number;
|
|
301
338
|
currentItemTextAlign: string;
|
|
302
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
303
339
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
304
340
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
305
|
-
|
|
341
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
306
342
|
viewBackgroundColor: string;
|
|
307
343
|
scrollX: number;
|
|
308
344
|
scrollY: number;
|
|
@@ -317,7 +353,7 @@ export declare const actionCut: {
|
|
|
317
353
|
openMenu: "canvas" | "shape" | null;
|
|
318
354
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
319
355
|
openSidebar: "library" | "customSidebar" | null;
|
|
320
|
-
openDialog: "imageExport" | "help" | null;
|
|
356
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
321
357
|
isSidebarDocked: boolean;
|
|
322
358
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
323
359
|
previousSelectedElementIds: {
|
|
@@ -365,6 +401,7 @@ export declare const actionCut: {
|
|
|
365
401
|
};
|
|
366
402
|
commitToHistory: boolean;
|
|
367
403
|
};
|
|
404
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
368
405
|
contextItemLabel: string;
|
|
369
406
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
370
407
|
} & {
|
|
@@ -381,6 +418,11 @@ export declare const actionCopyAsSvg: {
|
|
|
381
418
|
} | {
|
|
382
419
|
appState: {
|
|
383
420
|
errorMessage: any;
|
|
421
|
+
contextMenu: {
|
|
422
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
423
|
+
top: number;
|
|
424
|
+
left: number;
|
|
425
|
+
} | null;
|
|
384
426
|
showWelcomeScreen: boolean;
|
|
385
427
|
isLoading: boolean;
|
|
386
428
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -419,10 +461,9 @@ export declare const actionCopyAsSvg: {
|
|
|
419
461
|
currentItemFontFamily: number;
|
|
420
462
|
currentItemFontSize: number;
|
|
421
463
|
currentItemTextAlign: string;
|
|
422
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
423
464
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
424
465
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
425
|
-
|
|
466
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
426
467
|
viewBackgroundColor: string;
|
|
427
468
|
scrollX: number;
|
|
428
469
|
scrollY: number;
|
|
@@ -437,7 +478,7 @@ export declare const actionCopyAsSvg: {
|
|
|
437
478
|
openMenu: "canvas" | "shape" | null;
|
|
438
479
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
439
480
|
openSidebar: "library" | "customSidebar" | null;
|
|
440
|
-
openDialog: "imageExport" | "help" | null;
|
|
481
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
441
482
|
isSidebarDocked: boolean;
|
|
442
483
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
443
484
|
selectedElementIds: {
|
|
@@ -488,6 +529,7 @@ export declare const actionCopyAsSvg: {
|
|
|
488
529
|
};
|
|
489
530
|
commitToHistory: false;
|
|
490
531
|
}>;
|
|
532
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
|
|
491
533
|
contextItemLabel: string;
|
|
492
534
|
} & {
|
|
493
535
|
keyTest?: undefined;
|
|
@@ -503,6 +545,11 @@ export declare const actionCopyAsPng: {
|
|
|
503
545
|
} | {
|
|
504
546
|
appState: {
|
|
505
547
|
errorMessage: any;
|
|
548
|
+
contextMenu: {
|
|
549
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
550
|
+
top: number;
|
|
551
|
+
left: number;
|
|
552
|
+
} | null;
|
|
506
553
|
showWelcomeScreen: boolean;
|
|
507
554
|
isLoading: boolean;
|
|
508
555
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -541,10 +588,9 @@ export declare const actionCopyAsPng: {
|
|
|
541
588
|
currentItemFontFamily: number;
|
|
542
589
|
currentItemFontSize: number;
|
|
543
590
|
currentItemTextAlign: string;
|
|
544
|
-
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
545
591
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
546
592
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
547
|
-
|
|
593
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
548
594
|
viewBackgroundColor: string;
|
|
549
595
|
scrollX: number;
|
|
550
596
|
scrollY: number;
|
|
@@ -559,7 +605,7 @@ export declare const actionCopyAsPng: {
|
|
|
559
605
|
openMenu: "canvas" | "shape" | null;
|
|
560
606
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
561
607
|
openSidebar: "library" | "customSidebar" | null;
|
|
562
|
-
openDialog: "imageExport" | "help" | null;
|
|
608
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
563
609
|
isSidebarDocked: boolean;
|
|
564
610
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
565
611
|
selectedElementIds: {
|
|
@@ -610,6 +656,7 @@ export declare const actionCopyAsPng: {
|
|
|
610
656
|
};
|
|
611
657
|
commitToHistory: false;
|
|
612
658
|
}>;
|
|
659
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
|
|
613
660
|
contextItemLabel: string;
|
|
614
661
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
615
662
|
} & {
|
|
@@ -623,7 +670,7 @@ export declare const copyText: {
|
|
|
623
670
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
624
671
|
commitToHistory: false;
|
|
625
672
|
};
|
|
626
|
-
|
|
673
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
627
674
|
contextItemLabel: string;
|
|
628
675
|
} & {
|
|
629
676
|
keyTest?: undefined;
|