@zsviczian/excalidraw 0.13.0-obsidian → 0.13.0-obsidian-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +1103 -142
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +104 -0
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +6 -3
- package/types/actions/actionAlign.d.ts +18 -6
- package/types/actions/actionBoundText.d.ts +2 -1
- package/types/actions/actionCanvas.d.ts +41 -18
- package/types/actions/actionClipboard.d.ts +10 -5
- package/types/actions/actionDeleteSelected.d.ts +9 -4
- package/types/actions/actionDistribute.d.ts +6 -2
- package/types/actions/actionDuplicateSelection.d.ts +3 -1
- package/types/actions/actionExport.d.ts +44 -19
- package/types/actions/actionFinalize.d.ts +7 -3
- package/types/actions/actionGroup.d.ts +6 -2
- package/types/actions/actionLinearEditor.d.ts +2 -1
- package/types/actions/actionMenu.d.ts +15 -6
- package/types/actions/actionNavigate.d.ts +3 -1
- package/types/actions/actionProperties.d.ts +65 -26
- package/types/actions/actionStyles.d.ts +2 -1
- package/types/actions/actionToggleGridMode.d.ts +2 -1
- package/types/actions/actionToggleLock.d.ts +2 -1
- package/types/actions/actionToggleStats.d.ts +2 -1
- package/types/actions/actionToggleViewMode.d.ts +2 -1
- package/types/actions/actionToggleZenMode.d.ts +2 -1
- package/types/actions/actionZindex.d.ts +12 -4
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +3 -1
- package/types/appState.d.ts +3 -2
- package/types/bug-issue-template.d.ts +2 -0
- package/types/clients.d.ts +1 -1
- package/types/components/Actions.d.ts +1 -0
- package/types/components/App.d.ts +46 -0
- package/types/components/Avatar.d.ts +1 -1
- package/types/components/CollabButton.d.ts +2 -1
- package/types/components/DialogActionButton.d.ts +10 -0
- package/types/components/EncryptedIcon.d.ts +2 -0
- package/types/components/Footer.d.ts +2 -1
- package/types/components/HelpButton.d.ts +8 -0
- package/types/components/ImageExportDialog.d.ts +3 -1
- package/types/components/LayerUI.d.ts +2 -1
- package/types/components/LibraryButton.d.ts +1 -0
- package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
- package/types/components/LibraryMenuItems.d.ts +5 -2
- package/types/components/MenuItem.d.ts +11 -0
- package/types/components/MenuUtils.d.ts +2 -0
- package/types/components/MobileMenu.d.ts +2 -1
- package/types/components/Sidebar/Sidebar.d.ts +1 -1
- package/types/components/Sidebar/common.d.ts +1 -0
- package/types/components/TopErrorBoundary.d.ts +15 -0
- package/types/components/WelcomeScreen.d.ts +8 -0
- package/types/components/WelcomeScreenDecor.d.ts +6 -0
- package/types/components/icons.d.ts +83 -124
- package/types/constants.d.ts +1 -0
- package/types/element/Hyperlink.d.ts +5 -2
- package/types/element/linearElementEditor.d.ts +2 -1
- package/types/element/transformHandles.d.ts +1 -1
- package/types/excalidraw-app/CustomStats.d.ts +9 -0
- package/types/excalidraw-app/app_constants.d.ts +32 -0
- package/types/excalidraw-app/collab/Collab.d.ts +163 -0
- package/types/excalidraw-app/collab/Portal.d.ts +28 -0
- package/types/excalidraw-app/collab/RoomDialog.d.ts +13 -0
- package/types/excalidraw-app/collab/reconciliation.d.ts +10 -0
- package/types/excalidraw-app/components/ExportToExcalidrawPlus.d.ts +9 -0
- package/types/excalidraw-app/components/LanguageList.d.ts +4 -0
- package/types/excalidraw-app/components/icons.d.ts +1 -0
- package/types/excalidraw-app/data/FileManager.d.ts +66 -0
- package/types/excalidraw-app/data/LocalData.d.ts +32 -0
- package/types/excalidraw-app/data/Locker.d.ts +8 -0
- package/types/excalidraw-app/data/firebase.d.ts +25 -0
- package/types/excalidraw-app/data/index.d.ts +186 -0
- package/types/excalidraw-app/data/localStorage.d.ts +112 -0
- package/types/excalidraw-app/data/tabSync.d.ts +9 -0
- package/types/excalidraw-app/index.d.ts +26 -0
- package/types/hooks/useOutsideClick.d.ts +2 -0
- package/types/keys.d.ts +10 -0
- package/types/packages/excalidraw/index.d.ts +3 -0
- package/types/packages/utils.d.ts +3 -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 +13 -1
|
@@ -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;
|
|
@@ -64,6 +65,7 @@ export declare const actionToggleZenMode: {
|
|
|
64
65
|
openMenu: "canvas" | "shape" | null;
|
|
65
66
|
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
66
67
|
openSidebar: "library" | "customSidebar" | null;
|
|
68
|
+
openDialog: "imageExport" | "help" | null;
|
|
67
69
|
isSidebarDocked: boolean;
|
|
68
70
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
69
71
|
selectedElementIds: {
|
|
@@ -73,7 +75,6 @@ export declare const actionToggleZenMode: {
|
|
|
73
75
|
[id: string]: boolean;
|
|
74
76
|
};
|
|
75
77
|
shouldCacheIgnoreZoom: boolean;
|
|
76
|
-
showHelpDialog: boolean;
|
|
77
78
|
toast: {
|
|
78
79
|
message: string;
|
|
79
80
|
closable?: boolean | undefined;
|
|
@@ -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
|
};
|
|
@@ -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
|
@@ -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;
|
|
@@ -42,7 +44,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
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;
|
|
47
48
|
openSidebar?: "library" | "customSidebar" | null | undefined;
|
|
48
49
|
isSidebarDocked?: boolean | 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,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[];
|
|
@@ -9,6 +9,52 @@ import Scene from "../scene/Scene";
|
|
|
9
9
|
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device } from "../types";
|
|
10
10
|
import { FileSystemHandle } from "../data/filesystem";
|
|
11
11
|
import { ImportedDataState } from "../data/types";
|
|
12
|
+
export declare const isMenuOpenAtom: import("jotai").Atom<boolean> & {
|
|
13
|
+
write: (get: {
|
|
14
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
15
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
16
|
+
<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;
|
|
17
|
+
} & {
|
|
18
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
19
|
+
unstable_promise: true;
|
|
20
|
+
}): Value_3 | Promise<Value_3>;
|
|
21
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
22
|
+
unstable_promise: true;
|
|
23
|
+
}): Value_4 | Promise<Value_4>;
|
|
24
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
25
|
+
unstable_promise: true;
|
|
26
|
+
}): (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>;
|
|
27
|
+
}, set: {
|
|
28
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
29
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
30
|
+
}, update: boolean | ((prev: boolean) => boolean)) => void;
|
|
31
|
+
onMount?: (<S extends (update: boolean | ((prev: boolean) => boolean)) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
32
|
+
} & {
|
|
33
|
+
init: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare const isDropdownOpenAtom: import("jotai").Atom<boolean> & {
|
|
36
|
+
write: (get: {
|
|
37
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
38
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
39
|
+
<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;
|
|
40
|
+
} & {
|
|
41
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
42
|
+
unstable_promise: true;
|
|
43
|
+
}): Value_3 | Promise<Value_3>;
|
|
44
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
45
|
+
unstable_promise: true;
|
|
46
|
+
}): Value_4 | Promise<Value_4>;
|
|
47
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
48
|
+
unstable_promise: true;
|
|
49
|
+
}): (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>;
|
|
50
|
+
}, set: {
|
|
51
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
52
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
53
|
+
}, update: boolean | ((prev: boolean) => boolean)) => void;
|
|
54
|
+
onMount?: (<S extends (update: boolean | ((prev: boolean) => boolean)) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
55
|
+
} & {
|
|
56
|
+
init: boolean;
|
|
57
|
+
};
|
|
12
58
|
export declare let showFourthFont: boolean;
|
|
13
59
|
export declare const useDevice: () => Readonly<{
|
|
14
60
|
isSmScreen: boolean;
|
|
@@ -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,8 @@
|
|
|
1
1
|
import "./CollabButton.scss";
|
|
2
|
-
declare const CollabButton: ({ isCollaborating, collaboratorCount, onClick, }: {
|
|
2
|
+
declare const CollabButton: ({ isCollaborating, collaboratorCount, onClick, isInHamburgerMenu, }: {
|
|
3
3
|
isCollaborating: boolean;
|
|
4
4
|
collaboratorCount: number;
|
|
5
5
|
onClick: () => void;
|
|
6
|
+
isInHamburgerMenu?: boolean | undefined;
|
|
6
7
|
}) => JSX.Element;
|
|
7
8
|
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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ActionManager } from "../actions/manager";
|
|
2
2
|
import { AppState, ExcalidrawProps } from "../types";
|
|
3
|
-
declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, }: {
|
|
3
|
+
declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, renderWelcomeScreen, }: {
|
|
4
4
|
appState: AppState;
|
|
5
5
|
actionManager: ActionManager;
|
|
6
6
|
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
7
7
|
showExitZenModeBtn: boolean;
|
|
8
|
+
renderWelcomeScreen: boolean;
|
|
8
9
|
}) => JSX.Element;
|
|
9
10
|
export default Footer;
|
|
@@ -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;
|
|
@@ -32,6 +32,7 @@ interface LayerUIProps {
|
|
|
32
32
|
onImageAction: (data: {
|
|
33
33
|
insertOnCanvasDirectly: boolean;
|
|
34
34
|
}) => void;
|
|
35
|
+
renderWelcomeScreen: boolean;
|
|
35
36
|
}
|
|
36
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, showExitZenModeBtn, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, renderCustomSidebar, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
37
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, showExitZenModeBtn, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, renderCustomSidebar, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, renderWelcomeScreen, }: LayerUIProps) => JSX.Element>;
|
|
37
38
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
2
|
+
declare const LibraryMenuBrowseButton: ({ theme, id, libraryReturnUrl, }: {
|
|
3
|
+
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
4
|
+
theme: AppState["theme"];
|
|
5
|
+
id: string;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export default LibraryMenuBrowseButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LibraryItem, LibraryItems } from "../types";
|
|
1
|
+
import { AppState, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
|
|
2
2
|
import "./LibraryMenuItems.scss";
|
|
3
|
-
declare const LibraryMenuItems: ({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, selectedItems, onSelectItems, }: {
|
|
3
|
+
declare const LibraryMenuItems: ({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, selectedItems, onSelectItems, theme, id, libraryReturnUrl, }: {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
libraryItems: LibraryItems;
|
|
6
6
|
pendingElements: LibraryItem["elements"];
|
|
@@ -8,5 +8,8 @@ declare const LibraryMenuItems: ({ isLoading, libraryItems, onAddToLibrary, onIn
|
|
|
8
8
|
onAddToLibrary: (elements: LibraryItem["elements"]) => void;
|
|
9
9
|
selectedItems: LibraryItem["id"][];
|
|
10
10
|
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
11
|
+
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
12
|
+
theme: AppState["theme"];
|
|
13
|
+
id: string;
|
|
11
14
|
}) => JSX.Element;
|
|
12
15
|
export default LibraryMenuItems;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./Menu.scss";
|
|
2
|
+
interface MenuProps {
|
|
3
|
+
icon: JSX.Element;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
label: string;
|
|
6
|
+
dataTestId: string;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
isCollaborating?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const MenuItem: ({ icon, onClick, label, dataTestId, shortcut, isCollaborating, }: MenuProps) => JSX.Element;
|
|
11
|
+
export default MenuItem;
|
|
@@ -22,6 +22,7 @@ declare type MobileMenuProps = {
|
|
|
22
22
|
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
23
23
|
renderSidebars: () => JSX.Element | null;
|
|
24
24
|
device: Device;
|
|
25
|
+
renderWelcomeScreen?: boolean;
|
|
25
26
|
};
|
|
26
|
-
export declare const MobileMenu: ({ appState, elements, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, onImageAction, renderTopRightUI, renderCustomStats, renderSidebars, device, }: MobileMenuProps) => JSX.Element;
|
|
27
|
+
export declare const MobileMenu: ({ appState, elements, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, onImageAction, renderTopRightUI, renderCustomStats, renderSidebars, device, renderWelcomeScreen, }: MobileMenuProps) => JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -44,7 +44,6 @@ export declare const hostSidebarCountersAtom: import("jotai").Atom<{
|
|
|
44
44
|
docked: number;
|
|
45
45
|
})) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
46
46
|
} & {
|
|
47
|
-
/** @private internal */
|
|
48
47
|
init: {
|
|
49
48
|
rendered: number;
|
|
50
49
|
docked: number;
|
|
@@ -55,6 +54,7 @@ export declare const Sidebar: import("react").ForwardRefExoticComponent<{
|
|
|
55
54
|
onClose?: (() => boolean | void) | undefined;
|
|
56
55
|
onDock?: ((docked: boolean) => void) | undefined;
|
|
57
56
|
docked?: boolean | undefined;
|
|
57
|
+
initialDockedState?: boolean | undefined;
|
|
58
58
|
dockable?: boolean | undefined;
|
|
59
59
|
className?: string | undefined;
|
|
60
60
|
} & {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TopErrorBoundaryState {
|
|
3
|
+
hasError: boolean;
|
|
4
|
+
sentryEventId: string;
|
|
5
|
+
localStorage: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class TopErrorBoundary extends React.Component<any, TopErrorBoundaryState> {
|
|
8
|
+
state: TopErrorBoundaryState;
|
|
9
|
+
render(): any;
|
|
10
|
+
componentDidCatch(error: Error, errorInfo: any): void;
|
|
11
|
+
private selectTextArea;
|
|
12
|
+
private createGithubIssue;
|
|
13
|
+
private errorSplash;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionManager } from "../actions/manager";
|
|
2
|
+
import { AppState } from "../types";
|
|
3
|
+
import "./WelcomeScreen.scss";
|
|
4
|
+
declare const WelcomeScreen: ({ appState, actionManager, }: {
|
|
5
|
+
appState: AppState;
|
|
6
|
+
actionManager: ActionManager;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default WelcomeScreen;
|