@dwelle/excalidraw 0.4.0-d411eb2 → 0.4.0-e1bdbb6
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/CHANGELOG.md +102 -754
- package/README.md +93 -25
- package/dist/excalidraw-assets/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets/vendor-2002fe1b8862917b36c1.js +2 -0
- package/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt → vendor-2002fe1b8862917b36c1.js.LICENSE.txt} +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Bold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Medium.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-Regular.woff2 +0 -0
- package/dist/excalidraw-assets-dev/Assistant-SemiBold.woff2 +0 -0
- package/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.js → vendor-e6df8519da951026ff69.js} +1 -1
- package/dist/excalidraw.development.js +442 -204
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +1 -8
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +15 -12
- package/types/actions/actionAlign.d.ts +18 -6
- package/types/actions/actionBoundText.d.ts +5 -4
- package/types/actions/actionCanvas.d.ts +62 -40
- package/types/actions/actionClipboard.d.ts +26 -21
- package/types/actions/actionDeleteSelected.d.ts +19 -14
- package/types/actions/actionDistribute.d.ts +6 -2
- package/types/actions/actionDuplicateSelection.d.ts +3 -1
- package/types/actions/actionExport.d.ts +71 -46
- package/types/actions/actionFinalize.d.ts +13 -9
- package/types/actions/actionGroup.d.ts +6 -2
- package/types/actions/actionLinearEditor.d.ts +115 -0
- package/types/actions/actionMenu.d.ts +24 -15
- package/types/actions/actionNavigate.d.ts +3 -1
- package/types/actions/actionProperties.d.ts +104 -65
- package/types/actions/actionStyles.d.ts +5 -4
- package/types/actions/actionToggleGridMode.d.ts +5 -4
- package/types/actions/actionToggleLock.d.ts +5 -4
- package/types/actions/actionToggleStats.d.ts +5 -4
- package/types/actions/actionToggleViewMode.d.ts +5 -4
- package/types/actions/actionToggleZenMode.d.ts +5 -4
- package/types/actions/actionZindex.d.ts +12 -4
- package/types/actions/index.d.ts +1 -0
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +4 -2
- package/types/appState.d.ts +6 -5
- package/types/clients.d.ts +1 -1
- package/types/components/Actions.d.ts +14 -2
- package/types/components/App.d.ts +54 -3
- package/types/components/Avatar.d.ts +1 -1
- package/types/components/CollabButton.d.ts +2 -3
- package/types/components/DialogActionButton.d.ts +10 -0
- package/types/components/Footer.d.ts +10 -0
- package/types/components/HelpButton.d.ts +8 -0
- package/types/components/HintViewer.d.ts +3 -2
- package/types/components/HomeButton.d.ts +5 -0
- package/types/components/ImageExportDialog.d.ts +3 -1
- package/types/components/InitializeApp.d.ts +2 -0
- package/types/components/JSONExportDialog.d.ts +2 -2
- package/types/components/LayerUI.d.ts +6 -4
- package/types/components/LibraryButton.d.ts +1 -0
- package/types/components/LibraryMenu.d.ts +14 -6
- package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +12 -0
- package/types/components/LibraryMenuItems.d.ts +5 -14
- package/types/components/LibraryUnit.d.ts +2 -3
- package/types/components/LoadingMessage.d.ts +2 -0
- package/types/components/MenuItem.d.ts +11 -0
- package/types/components/MenuUtils.d.ts +1 -0
- package/types/components/MobileMenu.d.ts +10 -9
- package/types/components/Sidebar/Sidebar.d.ts +73 -0
- package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
- package/types/components/Sidebar/common.d.ts +16 -0
- package/types/components/Stats.d.ts +1 -1
- package/types/components/UserList.d.ts +0 -1
- package/types/components/WelcomeScreen.d.ts +10 -0
- package/types/components/WelcomeScreenDecor.d.ts +6 -0
- package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
- package/types/components/icons.d.ts +81 -122
- package/types/constants.d.ts +15 -7
- package/types/data/blob.d.ts +1 -1
- package/types/data/restore.d.ts +1 -1
- package/types/data/types.d.ts +16 -1
- package/types/element/Hyperlink.d.ts +9 -7
- package/types/element/image.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +24 -11
- package/types/element/newElement.d.ts +14 -1
- package/types/element/textElement.d.ts +6 -2
- package/types/element/transformHandles.d.ts +3 -3
- package/types/element/types.d.ts +3 -2
- package/types/hooks/useOutsideClick.d.ts +2 -0
- package/types/keys.d.ts +13 -3
- package/types/math.d.ts +8 -1
- package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.d.ts → vendor-2002fe1b8862917b36c1.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
- package/types/packages/excalidraw/example/App.d.ts +2 -1
- package/types/packages/excalidraw/example/sidebar/{Sidebar.d.ts → ExampleSidebar.d.ts} +1 -1
- package/types/packages/excalidraw/index.d.ts +2 -1
- package/types/packages/utils.d.ts +4 -1
- package/types/renderer/renderScene.d.ts +1 -1
- package/types/scene/types.d.ts +1 -0
- package/types/shapes.d.ts +27 -3
- package/types/types.d.ts +32 -15
- package/dist/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js +0 -2
- package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -9
- package/types/components/Card.d.ts +0 -7
- package/types/components/HelpIcon.d.ts +0 -8
- package/types/components/SidebarLockButton.d.ts +0 -8
|
@@ -10,6 +10,7 @@ export declare const actionCopyStyles: {
|
|
|
10
10
|
toast: {
|
|
11
11
|
message: string;
|
|
12
12
|
};
|
|
13
|
+
showWelcomeScreen: boolean;
|
|
13
14
|
isLoading: boolean;
|
|
14
15
|
errorMessage: string | null;
|
|
15
16
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -47,7 +48,7 @@ export declare const actionCopyStyles: {
|
|
|
47
48
|
currentItemOpacity: number;
|
|
48
49
|
currentItemFontFamily: number;
|
|
49
50
|
currentItemFontSize: number;
|
|
50
|
-
currentItemTextAlign:
|
|
51
|
+
currentItemTextAlign: string;
|
|
51
52
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
52
53
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
53
54
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -65,6 +66,9 @@ export declare const actionCopyStyles: {
|
|
|
65
66
|
}>;
|
|
66
67
|
openMenu: "canvas" | "shape" | null;
|
|
67
68
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
69
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
70
|
+
openDialog: "imageExport" | "help" | null;
|
|
71
|
+
isSidebarDocked: boolean;
|
|
68
72
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
69
73
|
selectedElementIds: {
|
|
70
74
|
[id: string]: boolean;
|
|
@@ -73,7 +77,6 @@ export declare const actionCopyStyles: {
|
|
|
73
77
|
[id: string]: boolean;
|
|
74
78
|
};
|
|
75
79
|
shouldCacheIgnoreZoom: boolean;
|
|
76
|
-
showHelpDialog: boolean;
|
|
77
80
|
zenModeEnabled: boolean;
|
|
78
81
|
theme: string;
|
|
79
82
|
gridSize: number | null;
|
|
@@ -86,8 +89,6 @@ export declare const actionCopyStyles: {
|
|
|
86
89
|
height: number;
|
|
87
90
|
offsetTop: number;
|
|
88
91
|
offsetLeft: number;
|
|
89
|
-
isLibraryOpen: boolean;
|
|
90
|
-
isLibraryMenuDocked: boolean;
|
|
91
92
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
92
93
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
93
94
|
showStats: boolean;
|
|
@@ -9,6 +9,7 @@ export declare const actionToggleGridMode: {
|
|
|
9
9
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>): {
|
|
10
10
|
appState: {
|
|
11
11
|
gridSize: number | null;
|
|
12
|
+
showWelcomeScreen: boolean;
|
|
12
13
|
isLoading: boolean;
|
|
13
14
|
errorMessage: string | null;
|
|
14
15
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -46,7 +47,7 @@ export declare const actionToggleGridMode: {
|
|
|
46
47
|
currentItemOpacity: number;
|
|
47
48
|
currentItemFontFamily: number;
|
|
48
49
|
currentItemFontSize: number;
|
|
49
|
-
currentItemTextAlign:
|
|
50
|
+
currentItemTextAlign: string;
|
|
50
51
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
51
52
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
53
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -64,6 +65,9 @@ export declare const actionToggleGridMode: {
|
|
|
64
65
|
}>;
|
|
65
66
|
openMenu: "canvas" | "shape" | null;
|
|
66
67
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
68
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
69
|
+
openDialog: "imageExport" | "help" | null;
|
|
70
|
+
isSidebarDocked: boolean;
|
|
67
71
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
68
72
|
selectedElementIds: {
|
|
69
73
|
[id: string]: boolean;
|
|
@@ -72,7 +76,6 @@ export declare const actionToggleGridMode: {
|
|
|
72
76
|
[id: string]: boolean;
|
|
73
77
|
};
|
|
74
78
|
shouldCacheIgnoreZoom: boolean;
|
|
75
|
-
showHelpDialog: boolean;
|
|
76
79
|
toast: {
|
|
77
80
|
message: string;
|
|
78
81
|
closable?: boolean | undefined;
|
|
@@ -89,8 +92,6 @@ export declare const actionToggleGridMode: {
|
|
|
89
92
|
height: number;
|
|
90
93
|
offsetTop: number;
|
|
91
94
|
offsetLeft: number;
|
|
92
|
-
isLibraryOpen: boolean;
|
|
93
|
-
isLibraryMenuDocked: boolean;
|
|
94
95
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
95
96
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
96
97
|
showStats: boolean;
|
|
@@ -9,6 +9,7 @@ export declare const actionToggleLock: {
|
|
|
9
9
|
elements: ExcalidrawElement[];
|
|
10
10
|
appState: {
|
|
11
11
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
12
|
+
showWelcomeScreen: boolean;
|
|
12
13
|
isLoading: boolean;
|
|
13
14
|
errorMessage: string | null;
|
|
14
15
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -46,7 +47,7 @@ export declare const actionToggleLock: {
|
|
|
46
47
|
currentItemOpacity: number;
|
|
47
48
|
currentItemFontFamily: number;
|
|
48
49
|
currentItemFontSize: number;
|
|
49
|
-
currentItemTextAlign:
|
|
50
|
+
currentItemTextAlign: string;
|
|
50
51
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
51
52
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
53
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -64,6 +65,9 @@ export declare const actionToggleLock: {
|
|
|
64
65
|
}>;
|
|
65
66
|
openMenu: "canvas" | "shape" | null;
|
|
66
67
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
68
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
69
|
+
openDialog: "imageExport" | "help" | null;
|
|
70
|
+
isSidebarDocked: boolean;
|
|
67
71
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
68
72
|
selectedElementIds: {
|
|
69
73
|
[id: string]: boolean;
|
|
@@ -72,7 +76,6 @@ export declare const actionToggleLock: {
|
|
|
72
76
|
[id: string]: boolean;
|
|
73
77
|
};
|
|
74
78
|
shouldCacheIgnoreZoom: boolean;
|
|
75
|
-
showHelpDialog: boolean;
|
|
76
79
|
toast: {
|
|
77
80
|
message: string;
|
|
78
81
|
closable?: boolean | undefined;
|
|
@@ -90,8 +93,6 @@ export declare const actionToggleLock: {
|
|
|
90
93
|
height: number;
|
|
91
94
|
offsetTop: number;
|
|
92
95
|
offsetLeft: number;
|
|
93
|
-
isLibraryOpen: boolean;
|
|
94
|
-
isLibraryMenuDocked: boolean;
|
|
95
96
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
96
97
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
97
98
|
showStats: boolean;
|
|
@@ -7,6 +7,7 @@ export declare const actionToggleStats: {
|
|
|
7
7
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
8
8
|
appState: {
|
|
9
9
|
showStats: boolean;
|
|
10
|
+
showWelcomeScreen: boolean;
|
|
10
11
|
isLoading: boolean;
|
|
11
12
|
errorMessage: string | null;
|
|
12
13
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -44,7 +45,7 @@ export declare const actionToggleStats: {
|
|
|
44
45
|
currentItemOpacity: number;
|
|
45
46
|
currentItemFontFamily: number;
|
|
46
47
|
currentItemFontSize: number;
|
|
47
|
-
currentItemTextAlign:
|
|
48
|
+
currentItemTextAlign: string;
|
|
48
49
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
49
50
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
50
51
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -62,6 +63,9 @@ export declare const actionToggleStats: {
|
|
|
62
63
|
}>;
|
|
63
64
|
openMenu: "canvas" | "shape" | null;
|
|
64
65
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
66
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
67
|
+
openDialog: "imageExport" | "help" | null;
|
|
68
|
+
isSidebarDocked: boolean;
|
|
65
69
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
66
70
|
selectedElementIds: {
|
|
67
71
|
[id: string]: boolean;
|
|
@@ -70,7 +74,6 @@ export declare const actionToggleStats: {
|
|
|
70
74
|
[id: string]: boolean;
|
|
71
75
|
};
|
|
72
76
|
shouldCacheIgnoreZoom: boolean;
|
|
73
|
-
showHelpDialog: boolean;
|
|
74
77
|
toast: {
|
|
75
78
|
message: string;
|
|
76
79
|
closable?: boolean | undefined;
|
|
@@ -88,8 +91,6 @@ export declare const actionToggleStats: {
|
|
|
88
91
|
height: number;
|
|
89
92
|
offsetTop: number;
|
|
90
93
|
offsetLeft: number;
|
|
91
|
-
isLibraryOpen: boolean;
|
|
92
|
-
isLibraryMenuDocked: boolean;
|
|
93
94
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
94
95
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
95
96
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -8,6 +8,7 @@ export declare const actionToggleViewMode: {
|
|
|
8
8
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
9
9
|
appState: {
|
|
10
10
|
viewModeEnabled: boolean;
|
|
11
|
+
showWelcomeScreen: boolean;
|
|
11
12
|
isLoading: boolean;
|
|
12
13
|
errorMessage: string | null;
|
|
13
14
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -45,7 +46,7 @@ export declare const actionToggleViewMode: {
|
|
|
45
46
|
currentItemOpacity: number;
|
|
46
47
|
currentItemFontFamily: number;
|
|
47
48
|
currentItemFontSize: number;
|
|
48
|
-
currentItemTextAlign:
|
|
49
|
+
currentItemTextAlign: string;
|
|
49
50
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
51
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
52
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -63,6 +64,9 @@ export declare const actionToggleViewMode: {
|
|
|
63
64
|
}>;
|
|
64
65
|
openMenu: "canvas" | "shape" | null;
|
|
65
66
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
67
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
68
|
+
openDialog: "imageExport" | "help" | null;
|
|
69
|
+
isSidebarDocked: boolean;
|
|
66
70
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
67
71
|
selectedElementIds: {
|
|
68
72
|
[id: string]: boolean;
|
|
@@ -71,7 +75,6 @@ export declare const actionToggleViewMode: {
|
|
|
71
75
|
[id: string]: boolean;
|
|
72
76
|
};
|
|
73
77
|
shouldCacheIgnoreZoom: boolean;
|
|
74
|
-
showHelpDialog: boolean;
|
|
75
78
|
toast: {
|
|
76
79
|
message: string;
|
|
77
80
|
closable?: boolean | undefined;
|
|
@@ -88,8 +91,6 @@ export declare const actionToggleViewMode: {
|
|
|
88
91
|
height: number;
|
|
89
92
|
offsetTop: number;
|
|
90
93
|
offsetLeft: number;
|
|
91
|
-
isLibraryOpen: boolean;
|
|
92
|
-
isLibraryMenuDocked: boolean;
|
|
93
94
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
94
95
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
95
96
|
showStats: boolean;
|
|
@@ -8,6 +8,7 @@ export declare const actionToggleZenMode: {
|
|
|
8
8
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
9
9
|
appState: {
|
|
10
10
|
zenModeEnabled: boolean;
|
|
11
|
+
showWelcomeScreen: boolean;
|
|
11
12
|
isLoading: boolean;
|
|
12
13
|
errorMessage: string | null;
|
|
13
14
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -45,7 +46,7 @@ export declare const actionToggleZenMode: {
|
|
|
45
46
|
currentItemOpacity: number;
|
|
46
47
|
currentItemFontFamily: number;
|
|
47
48
|
currentItemFontSize: number;
|
|
48
|
-
currentItemTextAlign:
|
|
49
|
+
currentItemTextAlign: string;
|
|
49
50
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
51
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
52
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -63,6 +64,9 @@ export declare const actionToggleZenMode: {
|
|
|
63
64
|
}>;
|
|
64
65
|
openMenu: "canvas" | "shape" | null;
|
|
65
66
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
67
|
+
openSidebar: "library" | "customSidebar" | null;
|
|
68
|
+
openDialog: "imageExport" | "help" | null;
|
|
69
|
+
isSidebarDocked: boolean;
|
|
66
70
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
67
71
|
selectedElementIds: {
|
|
68
72
|
[id: string]: boolean;
|
|
@@ -71,7 +75,6 @@ export declare const actionToggleZenMode: {
|
|
|
71
75
|
[id: string]: boolean;
|
|
72
76
|
};
|
|
73
77
|
shouldCacheIgnoreZoom: boolean;
|
|
74
|
-
showHelpDialog: boolean;
|
|
75
78
|
toast: {
|
|
76
79
|
message: string;
|
|
77
80
|
closable?: boolean | undefined;
|
|
@@ -88,8 +91,6 @@ export declare const actionToggleZenMode: {
|
|
|
88
91
|
height: number;
|
|
89
92
|
offsetTop: number;
|
|
90
93
|
offsetLeft: number;
|
|
91
|
-
isLibraryOpen: boolean;
|
|
92
|
-
isLibraryMenuDocked: boolean;
|
|
93
94
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
94
95
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
95
96
|
showStats: boolean;
|
|
@@ -12,7 +12,9 @@ export declare const actionSendBackward: {
|
|
|
12
12
|
contextItemLabel: string;
|
|
13
13
|
keyPriority: number;
|
|
14
14
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
15
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps & {
|
|
16
|
+
isInHamburgerMenu: boolean;
|
|
17
|
+
}) => JSX.Element;
|
|
16
18
|
} & {
|
|
17
19
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
20
|
};
|
|
@@ -29,7 +31,9 @@ export declare const actionBringForward: {
|
|
|
29
31
|
contextItemLabel: string;
|
|
30
32
|
keyPriority: number;
|
|
31
33
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
32
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
34
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps & {
|
|
35
|
+
isInHamburgerMenu: boolean;
|
|
36
|
+
}) => JSX.Element;
|
|
33
37
|
} & {
|
|
34
38
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
39
|
};
|
|
@@ -45,7 +49,9 @@ export declare const actionSendToBack: {
|
|
|
45
49
|
};
|
|
46
50
|
contextItemLabel: string;
|
|
47
51
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
48
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
52
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps & {
|
|
53
|
+
isInHamburgerMenu: boolean;
|
|
54
|
+
}) => JSX.Element;
|
|
49
55
|
} & {
|
|
50
56
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
51
57
|
};
|
|
@@ -61,7 +67,9 @@ export declare const actionBringToFront: {
|
|
|
61
67
|
};
|
|
62
68
|
contextItemLabel: string;
|
|
63
69
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
64
|
-
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps
|
|
70
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps & {
|
|
71
|
+
isInHamburgerMenu: boolean;
|
|
72
|
+
}) => JSX.Element;
|
|
65
73
|
} & {
|
|
66
74
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
67
75
|
};
|
package/types/actions/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { actionToggleStats } from "./actionToggleStats";
|
|
|
21
21
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
22
22
|
export { actionLink } from "../element/Hyperlink";
|
|
23
23
|
export { actionToggleLock } from "./actionToggleLock";
|
|
24
|
+
export { actionToggleLinearEditor } from "./actionLinearEditor";
|
|
@@ -16,5 +16,5 @@ export declare class ActionManager {
|
|
|
16
16
|
/**
|
|
17
17
|
* @param data additional data sent to the PanelComponent
|
|
18
18
|
*/
|
|
19
|
-
renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => JSX.Element | null;
|
|
19
|
+
renderAction: (name: ActionName, data?: PanelComponentProps["data"], isInHamburgerMenu?: boolean) => JSX.Element | null;
|
|
20
20
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ActionName } from "./types";
|
|
2
|
-
export declare type ShortcutName = SubtypeOf<ActionName, "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleLock"
|
|
2
|
+
export declare type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "copyAsSvg" | "group" | "ungroup" | "gridMode" | "zenMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleLock"> | "saveScene" | "imageExport";
|
|
3
3
|
export declare const getShortcutFromShortcutName: (name: ShortcutName) => string;
|
package/types/actions/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare type ActionResult = {
|
|
|
14
14
|
declare type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export declare type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export declare type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "eraser" | "bindText" | "toggleLock";
|
|
17
|
+
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "eraser" | "bindText" | "toggleLock" | "toggleLinearEditor";
|
|
18
18
|
export declare type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -24,7 +24,9 @@ export declare type PanelComponentProps = {
|
|
|
24
24
|
};
|
|
25
25
|
export interface Action {
|
|
26
26
|
name: ActionName;
|
|
27
|
-
PanelComponent?: React.FC<PanelComponentProps
|
|
27
|
+
PanelComponent?: React.FC<PanelComponentProps & {
|
|
28
|
+
isInHamburgerMenu: boolean;
|
|
29
|
+
}>;
|
|
28
30
|
perform: ActionFn;
|
|
29
31
|
keyPriority?: number;
|
|
30
32
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
package/types/appState.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
|
+
theme?: string | undefined;
|
|
5
|
+
name?: string | undefined;
|
|
4
6
|
activeTool?: {
|
|
5
7
|
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
6
8
|
lastActiveToolBeforeEraser: import("./types").LastActiveToolBeforeEraser;
|
|
@@ -19,7 +21,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
19
21
|
value: NormalizedZoomValue;
|
|
20
22
|
}> | undefined;
|
|
21
23
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
22
|
-
|
|
24
|
+
showWelcomeScreen?: boolean | undefined;
|
|
23
25
|
penMode?: boolean | undefined;
|
|
24
26
|
penDetected?: boolean | undefined;
|
|
25
27
|
exportBackground?: boolean | undefined;
|
|
@@ -35,15 +37,16 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
35
37
|
currentItemOpacity?: number | undefined;
|
|
36
38
|
currentItemFontFamily?: number | undefined;
|
|
37
39
|
currentItemFontSize?: number | undefined;
|
|
38
|
-
currentItemTextAlign?:
|
|
40
|
+
currentItemTextAlign?: string | undefined;
|
|
39
41
|
currentItemStrokeSharpness?: import("./element/types").StrokeSharpness | undefined;
|
|
40
42
|
currentItemStartArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
41
43
|
currentItemEndArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
42
44
|
currentItemLinearStrokeSharpness?: import("./element/types").StrokeSharpness | undefined;
|
|
43
45
|
cursorButton?: "up" | "down" | undefined;
|
|
44
46
|
scrolledOutside?: boolean | undefined;
|
|
45
|
-
name?: string | undefined;
|
|
46
47
|
openMenu?: "canvas" | "shape" | null | undefined;
|
|
48
|
+
openSidebar?: "library" | "customSidebar" | null | undefined;
|
|
49
|
+
isSidebarDocked?: boolean | undefined;
|
|
47
50
|
lastPointerDownWith?: import("./element/types").PointerType | undefined;
|
|
48
51
|
selectedElementIds?: {
|
|
49
52
|
[id: string]: boolean;
|
|
@@ -57,8 +60,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
57
60
|
[groupId: string]: boolean;
|
|
58
61
|
} | undefined;
|
|
59
62
|
editingGroupId?: string | null | undefined;
|
|
60
|
-
isLibraryOpen?: boolean | undefined;
|
|
61
|
-
isLibraryMenuDocked?: boolean | undefined;
|
|
62
63
|
showStats?: boolean | undefined;
|
|
63
64
|
currentChartType?: import("./element/types").ChartType | undefined;
|
|
64
65
|
selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
|
package/types/clients.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export declare const getClientColors: (clientId: string, appState: AppState) =>
|
|
|
3
3
|
background: string;
|
|
4
4
|
stroke: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const getClientInitials: (
|
|
6
|
+
export declare const getClientInitials: (userName?: string | null) => string;
|
|
@@ -2,11 +2,11 @@ import React from "react";
|
|
|
2
2
|
import { ActionManager } from "../actions/manager";
|
|
3
3
|
import { ExcalidrawElement, PointerType } from "../element/types";
|
|
4
4
|
import { AppState, Zoom } from "../types";
|
|
5
|
-
|
|
5
|
+
import "./Actions.scss";
|
|
6
|
+
export declare const SelectedShapeActions: ({ appState, elements, renderAction, }: {
|
|
6
7
|
appState: AppState;
|
|
7
8
|
elements: readonly ExcalidrawElement[];
|
|
8
9
|
renderAction: ActionManager["renderAction"];
|
|
9
|
-
activeTool: AppState["activeTool"]["type"];
|
|
10
10
|
}) => JSX.Element;
|
|
11
11
|
export declare const ShapesSwitcher: ({ canvas, activeTool, setAppState, onImageAction, appState, }: {
|
|
12
12
|
canvas: HTMLCanvasElement | null;
|
|
@@ -21,3 +21,15 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
|
|
|
21
21
|
renderAction: ActionManager["renderAction"];
|
|
22
22
|
zoom: Zoom;
|
|
23
23
|
}) => JSX.Element;
|
|
24
|
+
export declare const UndoRedoActions: ({ renderAction, className, }: {
|
|
25
|
+
renderAction: ActionManager["renderAction"];
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
}) => JSX.Element;
|
|
28
|
+
export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }: {
|
|
29
|
+
actionManager: ActionManager;
|
|
30
|
+
showExitZenModeBtn: boolean;
|
|
31
|
+
}) => JSX.Element;
|
|
32
|
+
export declare const FinalizeAction: ({ renderAction, className, }: {
|
|
33
|
+
renderAction: ActionManager["renderAction"];
|
|
34
|
+
className?: string | undefined;
|
|
35
|
+
}) => JSX.Element;
|
|
@@ -8,6 +8,52 @@ import Scene from "../scene/Scene";
|
|
|
8
8
|
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device } from "../types";
|
|
9
9
|
import { FileSystemHandle } from "../data/filesystem";
|
|
10
10
|
import { Emitter } from "../emitter";
|
|
11
|
+
export declare const isMenuOpenAtom: import("jotai").Atom<boolean> & {
|
|
12
|
+
write: (get: {
|
|
13
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
14
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
15
|
+
<Value_2>(atom: import("jotai").Atom<Value_2>): Value_2 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_2;
|
|
16
|
+
} & {
|
|
17
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
18
|
+
unstable_promise: true;
|
|
19
|
+
}): Value_3 | Promise<Value_3>;
|
|
20
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
21
|
+
unstable_promise: true;
|
|
22
|
+
}): Value_4 | Promise<Value_4>;
|
|
23
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
24
|
+
unstable_promise: true;
|
|
25
|
+
}): (Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5) | Promise<Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5>;
|
|
26
|
+
}, set: {
|
|
27
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
28
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
29
|
+
}, update: boolean | ((prev: boolean) => boolean)) => void;
|
|
30
|
+
onMount?: (<S extends (update: boolean | ((prev: boolean) => boolean)) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
init: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare const isDropdownOpenAtom: import("jotai").Atom<boolean> & {
|
|
35
|
+
write: (get: {
|
|
36
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
37
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
38
|
+
<Value_2>(atom: import("jotai").Atom<Value_2>): Value_2 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_2;
|
|
39
|
+
} & {
|
|
40
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
41
|
+
unstable_promise: true;
|
|
42
|
+
}): Value_3 | Promise<Value_3>;
|
|
43
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
44
|
+
unstable_promise: true;
|
|
45
|
+
}): Value_4 | Promise<Value_4>;
|
|
46
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
47
|
+
unstable_promise: true;
|
|
48
|
+
}): (Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5) | Promise<Value_5 extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? V extends Promise<infer V> ? any : V : V : V : V : V : V : V : V : V : V : Value_5>;
|
|
49
|
+
}, set: {
|
|
50
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
51
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
52
|
+
}, update: boolean | ((prev: boolean) => boolean)) => void;
|
|
53
|
+
onMount?: (<S extends (update: boolean | ((prev: boolean) => boolean)) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
54
|
+
} & {
|
|
55
|
+
init: boolean;
|
|
56
|
+
};
|
|
11
57
|
export declare const useDevice: () => Readonly<{
|
|
12
58
|
isSmScreen: boolean;
|
|
13
59
|
isMobile: boolean;
|
|
@@ -18,6 +64,9 @@ export declare const useExcalidrawContainer: () => {
|
|
|
18
64
|
container: HTMLDivElement | null;
|
|
19
65
|
id?: string | null | undefined;
|
|
20
66
|
};
|
|
67
|
+
export declare const useExcalidrawElements: () => readonly NonDeletedExcalidrawElement[];
|
|
68
|
+
export declare const useExcalidrawAppState: () => AppState;
|
|
69
|
+
export declare const useExcalidrawSetAppState: () => <K extends keyof AppState>(state: AppState | ((prevState: Readonly<AppState>, props: Readonly<any>) => AppState | Pick<AppState, K> | null) | Pick<AppState, K> | null, callback?: (() => void) | undefined) => void;
|
|
21
70
|
declare class App extends React.Component<AppProps, AppState> {
|
|
22
71
|
canvas: AppClassProperties["canvas"];
|
|
23
72
|
rc: RoughCanvas | null;
|
|
@@ -94,7 +143,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
94
143
|
wasAddedToSelection: boolean;
|
|
95
144
|
hasBeenDuplicated: boolean;
|
|
96
145
|
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
97
|
-
hasHitElementInside: boolean;
|
|
98
146
|
};
|
|
99
147
|
withCmdOrCtrl: boolean;
|
|
100
148
|
drag: {
|
|
@@ -172,7 +220,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
172
220
|
wasAddedToSelection: boolean;
|
|
173
221
|
hasBeenDuplicated: boolean;
|
|
174
222
|
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
175
|
-
hasHitElementInside: boolean;
|
|
176
223
|
};
|
|
177
224
|
withCmdOrCtrl: boolean;
|
|
178
225
|
drag: {
|
|
@@ -239,7 +286,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
239
286
|
private pasteFromClipboard;
|
|
240
287
|
private addElementsFromPasteOrLibrary;
|
|
241
288
|
private addTextFromPaste;
|
|
242
|
-
setAppState:
|
|
289
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
243
290
|
removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
|
|
244
291
|
toggleLock: (source?: "keyboard" | "ui") => void;
|
|
245
292
|
togglePenMode: () => void;
|
|
@@ -259,6 +306,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
259
306
|
commitToHistory?: SceneData["commitToHistory"];
|
|
260
307
|
}) => void;
|
|
261
308
|
private onSceneUpdated;
|
|
309
|
+
/**
|
|
310
|
+
* @returns whether the menu was toggled on or off
|
|
311
|
+
*/
|
|
312
|
+
toggleMenu: (type: "library" | "customSidebar", force?: boolean) => boolean;
|
|
262
313
|
private updateCurrentCursorPosition;
|
|
263
314
|
private onKeyDown;
|
|
264
315
|
private onWheel;
|
|
@@ -7,5 +7,5 @@ declare type AvatarProps = {
|
|
|
7
7
|
name: string;
|
|
8
8
|
src?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const Avatar: ({ color,
|
|
10
|
+
export declare const Avatar: ({ color, onClick, name, src }: AvatarProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "./CollabButton.scss";
|
|
2
|
-
declare const CollabButton: ({
|
|
3
|
-
isCollaborating: boolean;
|
|
4
|
-
collaboratorCount: number;
|
|
2
|
+
declare const CollabButton: ({ onClick, isInHamburgerMenu, }: {
|
|
5
3
|
onClick: () => void;
|
|
4
|
+
isInHamburgerMenu?: boolean | undefined;
|
|
6
5
|
}) => JSX.Element;
|
|
7
6
|
export default CollabButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import "./DialogActionButton.scss";
|
|
3
|
+
interface DialogActionButtonProps {
|
|
4
|
+
label: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
actionType?: "primary" | "danger";
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DialogActionButton: ({ label, onClick, className, children, actionType, type, isLoading, ...rest }: DialogActionButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>) => JSX.Element;
|
|
10
|
+
export default DialogActionButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionManager } from "../actions/manager";
|
|
2
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
3
|
+
declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, renderWelcomeScreen, }: {
|
|
4
|
+
appState: AppState;
|
|
5
|
+
actionManager: ActionManager;
|
|
6
|
+
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
7
|
+
showExitZenModeBtn: boolean;
|
|
8
|
+
renderWelcomeScreen: boolean;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default Footer;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
2
|
import "./HintViewer.scss";
|
|
3
|
-
import { AppState } from "../types";
|
|
3
|
+
import { AppState, Device } from "../types";
|
|
4
4
|
interface HintViewerProps {
|
|
5
5
|
appState: AppState;
|
|
6
6
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
7
7
|
isMobile: boolean;
|
|
8
|
+
device: Device;
|
|
8
9
|
}
|
|
9
|
-
export declare const HintViewer: ({ appState, elements, isMobile, }: HintViewerProps) => JSX.Element | null;
|
|
10
|
+
export declare const HintViewer: ({ appState, elements, isMobile, device, }: HintViewerProps) => JSX.Element | null;
|
|
10
11
|
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
3
|
import { AppState, BinaryFiles } from "../types";
|
|
3
4
|
import "./ExportDialog.scss";
|
|
4
5
|
import { ActionManager } from "../actions/manager";
|
|
5
6
|
export declare const ErrorCanvasPreview: () => JSX.Element;
|
|
6
7
|
export declare type ExportCB = (elements: readonly NonDeletedExcalidrawElement[], scale?: number) => void;
|
|
7
|
-
export declare const ImageExportDialog: ({ elements, appState, files, exportPadding, actionManager, onExportToPng, onExportToSvg, onExportToClipboard, }: {
|
|
8
|
+
export declare const ImageExportDialog: ({ elements, appState, setAppState, files, exportPadding, actionManager, onExportToPng, onExportToSvg, onExportToClipboard, }: {
|
|
8
9
|
appState: AppState;
|
|
10
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
9
11
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
10
12
|
files: BinaryFiles;
|
|
11
13
|
exportPadding?: number | undefined;
|