@dwelle/excalidraw 0.4.0-cfd6fb7 → 0.4.0-d8d86cf
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 +100 -756
- package/README.md +85 -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 +649 -301
- 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 +69 -47
- package/types/actions/actionClipboard.d.ts +35 -21
- package/types/actions/actionDeleteSelected.d.ts +28 -14
- package/types/actions/actionDistribute.d.ts +6 -2
- package/types/actions/actionDuplicateSelection.d.ts +3 -1
- package/types/actions/actionExport.d.ts +78 -53
- 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 +13 -12
- package/types/clients.d.ts +1 -1
- package/types/clipboard.d.ts +6 -1
- package/types/components/Actions.d.ts +13 -0
- package/types/components/App.d.ts +54 -2
- 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 -5
- 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 +8 -5
- package/types/element/bounds.d.ts +2 -1
- package/types/element/image.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +54 -14
- package/types/element/newElement.d.ts +16 -3
- package/types/element/resizeElements.d.ts +0 -1
- package/types/element/textElement.d.ts +23 -4
- package/types/element/transformHandles.d.ts +3 -4
- package/types/element/typeChecks.d.ts +1 -0
- package/types/element/types.d.ts +6 -3
- 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/renderElement.d.ts +4 -3
- package/types/renderer/renderScene.d.ts +1 -1
- package/types/scene/Fonts.d.ts +21 -0
- package/types/scene/Scene.d.ts +15 -0
- package/types/scene/comparisons.d.ts +1 -2
- package/types/scene/index.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 -14
- 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;
|
|
@@ -12,14 +14,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
12
14
|
lastActiveToolBeforeEraser: import("./types").LastActiveToolBeforeEraser;
|
|
13
15
|
locked: boolean;
|
|
14
16
|
} | undefined;
|
|
15
|
-
|
|
16
|
-
scrollY?: number | undefined;
|
|
17
|
-
viewBackgroundColor?: string | undefined;
|
|
18
|
-
zoom?: Readonly<{
|
|
19
|
-
value: NormalizedZoomValue;
|
|
20
|
-
}> | undefined;
|
|
21
|
-
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
22
|
-
theme?: string | undefined;
|
|
17
|
+
showWelcomeScreen?: boolean | undefined;
|
|
23
18
|
penMode?: boolean | undefined;
|
|
24
19
|
penDetected?: boolean | undefined;
|
|
25
20
|
exportBackground?: boolean | undefined;
|
|
@@ -35,15 +30,22 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
35
30
|
currentItemOpacity?: number | undefined;
|
|
36
31
|
currentItemFontFamily?: number | undefined;
|
|
37
32
|
currentItemFontSize?: number | undefined;
|
|
38
|
-
currentItemTextAlign?:
|
|
33
|
+
currentItemTextAlign?: string | undefined;
|
|
39
34
|
currentItemStrokeSharpness?: import("./element/types").StrokeSharpness | undefined;
|
|
40
35
|
currentItemStartArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
41
36
|
currentItemEndArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
42
37
|
currentItemLinearStrokeSharpness?: import("./element/types").StrokeSharpness | undefined;
|
|
38
|
+
viewBackgroundColor?: string | undefined;
|
|
39
|
+
scrollX?: number | undefined;
|
|
40
|
+
scrollY?: number | undefined;
|
|
43
41
|
cursorButton?: "up" | "down" | undefined;
|
|
44
42
|
scrolledOutside?: boolean | undefined;
|
|
45
|
-
|
|
43
|
+
zoom?: Readonly<{
|
|
44
|
+
value: NormalizedZoomValue;
|
|
45
|
+
}> | undefined;
|
|
46
46
|
openMenu?: "canvas" | "shape" | null | undefined;
|
|
47
|
+
openSidebar?: "library" | "customSidebar" | null | undefined;
|
|
48
|
+
isSidebarDocked?: boolean | undefined;
|
|
47
49
|
lastPointerDownWith?: import("./element/types").PointerType | undefined;
|
|
48
50
|
selectedElementIds?: {
|
|
49
51
|
[id: string]: boolean;
|
|
@@ -51,14 +53,13 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
51
53
|
previousSelectedElementIds?: {
|
|
52
54
|
[id: string]: boolean;
|
|
53
55
|
} | undefined;
|
|
56
|
+
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
54
57
|
zenModeEnabled?: boolean | undefined;
|
|
55
58
|
gridSize?: number | null | undefined;
|
|
56
59
|
selectedGroupIds?: {
|
|
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;
|
package/types/clipboard.d.ts
CHANGED
|
@@ -12,9 +12,14 @@ export declare const probablySupportsClipboardReadText: boolean;
|
|
|
12
12
|
export declare const probablySupportsClipboardWriteText: boolean;
|
|
13
13
|
export declare const probablySupportsClipboardBlob: boolean;
|
|
14
14
|
export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, files: BinaryFiles | null) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves content from system clipboard (either from ClipboardEvent or
|
|
17
|
+
* via async clipboard API if supported)
|
|
18
|
+
*/
|
|
19
|
+
export declare const getSystemClipboard: (event: ClipboardEvent | null) => Promise<string>;
|
|
15
20
|
/**
|
|
16
21
|
* Attempts to parse clipboard. Prefers system clipboard.
|
|
17
22
|
*/
|
|
18
|
-
export declare const parseClipboard: (event: ClipboardEvent | null) => Promise<ClipboardData>;
|
|
23
|
+
export declare const parseClipboard: (event: ClipboardEvent | null, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
19
24
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
20
25
|
export declare const copyTextToSystemClipboard: (text: string | null) => Promise<void>;
|
|
@@ -2,6 +2,7 @@ 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
|
+
import "./Actions.scss";
|
|
5
6
|
export declare const SelectedShapeActions: ({ appState, elements, renderAction, }: {
|
|
6
7
|
appState: AppState;
|
|
7
8
|
elements: readonly ExcalidrawElement[];
|
|
@@ -20,3 +21,15 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
|
|
|
20
21
|
renderAction: ActionManager["renderAction"];
|
|
21
22
|
zoom: Zoom;
|
|
22
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;
|
|
@@ -20,6 +66,7 @@ export declare const useExcalidrawContainer: () => {
|
|
|
20
66
|
};
|
|
21
67
|
export declare const useExcalidrawElements: () => readonly NonDeletedExcalidrawElement[];
|
|
22
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;
|
|
23
70
|
declare class App extends React.Component<AppProps, AppState> {
|
|
24
71
|
canvas: AppClassProperties["canvas"];
|
|
25
72
|
rc: RoughCanvas | null;
|
|
@@ -30,6 +77,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
30
77
|
private excalidrawContainerRef;
|
|
31
78
|
static defaultProps: Partial<AppProps>;
|
|
32
79
|
scene: Scene;
|
|
80
|
+
private fonts;
|
|
33
81
|
private resizeObserver;
|
|
34
82
|
private nearestScrollableContainer;
|
|
35
83
|
library: AppClassProperties["library"];
|
|
@@ -212,7 +260,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
212
260
|
private onBlur;
|
|
213
261
|
private onUnload;
|
|
214
262
|
private disableEvent;
|
|
215
|
-
private onFontLoaded;
|
|
216
263
|
private resetHistory;
|
|
217
264
|
/**
|
|
218
265
|
* Resets scene & history.
|
|
@@ -225,6 +272,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
225
272
|
componentWillUnmount(): void;
|
|
226
273
|
private onResize;
|
|
227
274
|
private removeEventListeners;
|
|
275
|
+
private onFontsLoadingDone;
|
|
228
276
|
private addEventListeners;
|
|
229
277
|
componentDidUpdate(prevProps: AppProps, prevState: AppState): void;
|
|
230
278
|
private renderScene;
|
|
@@ -239,7 +287,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
239
287
|
private pasteFromClipboard;
|
|
240
288
|
private addElementsFromPasteOrLibrary;
|
|
241
289
|
private addTextFromPaste;
|
|
242
|
-
setAppState:
|
|
290
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
243
291
|
removePointer: (event: React.PointerEvent<HTMLElement> | PointerEvent) => void;
|
|
244
292
|
toggleLock: (source?: "keyboard" | "ui") => void;
|
|
245
293
|
togglePenMode: () => void;
|
|
@@ -259,6 +307,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
259
307
|
commitToHistory?: SceneData["commitToHistory"];
|
|
260
308
|
}) => void;
|
|
261
309
|
private onSceneUpdated;
|
|
310
|
+
/**
|
|
311
|
+
* @returns whether the menu was toggled on or off
|
|
312
|
+
*/
|
|
313
|
+
toggleMenu: (type: "library" | "customSidebar", force?: boolean) => boolean;
|
|
262
314
|
private updateCurrentCursorPosition;
|
|
263
315
|
private onKeyDown;
|
|
264
316
|
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 {};
|