@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
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Language } from "../i18n";
|
|
3
|
+
import { Theme } from "../element/types";
|
|
3
4
|
interface Props {
|
|
4
5
|
langCode: Language["code"];
|
|
5
6
|
children: React.ReactElement;
|
|
7
|
+
theme?: Theme;
|
|
6
8
|
}
|
|
7
9
|
export declare const InitializeApp: (props: Props) => JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
2
|
-
import { AppState,
|
|
2
|
+
import { AppState, ExportOpts, BinaryFiles } from "../types";
|
|
3
3
|
import "./ExportDialog.scss";
|
|
4
4
|
import { ActionManager } from "../actions/manager";
|
|
5
5
|
export declare type ExportCB = (elements: readonly NonDeletedExcalidrawElement[], scale?: number) => void;
|
|
@@ -8,6 +8,6 @@ export declare const JSONExportDialog: ({ elements, appState, files, actionManag
|
|
|
8
8
|
appState: AppState;
|
|
9
9
|
files: BinaryFiles;
|
|
10
10
|
actionManager: ActionManager;
|
|
11
|
-
exportOpts:
|
|
11
|
+
exportOpts: ExportOpts;
|
|
12
12
|
canvas: HTMLCanvasElement | null;
|
|
13
13
|
}) => JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ActionManager } from "../actions/manager";
|
|
3
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
3
|
+
import { NonDeletedExcalidrawElement, Theme } from "../element/types";
|
|
4
4
|
import { Language } from "../i18n";
|
|
5
5
|
import { AppProps, AppState, ExcalidrawProps, BinaryFiles } from "../types";
|
|
6
6
|
import Library from "../data/library";
|
|
7
7
|
import "./LayerUI.scss";
|
|
8
8
|
import "./Toolbar.scss";
|
|
9
9
|
interface LayerUIProps {
|
|
10
|
-
onHomeButtonClick?: () => void;
|
|
11
10
|
actionManager: ActionManager;
|
|
12
11
|
appState: AppState;
|
|
13
12
|
files: BinaryFiles;
|
|
@@ -19,12 +18,12 @@ interface LayerUIProps {
|
|
|
19
18
|
onPenModeToggle: () => void;
|
|
20
19
|
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
|
21
20
|
showExitZenModeBtn: boolean;
|
|
22
|
-
showThemeBtn: boolean;
|
|
23
21
|
langCode: Language["code"];
|
|
24
22
|
isCollaborating: boolean;
|
|
25
23
|
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
26
24
|
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
27
25
|
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
26
|
+
renderCustomSidebar?: ExcalidrawProps["renderSidebar"];
|
|
28
27
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
29
28
|
UIOptions: AppProps["UIOptions"];
|
|
30
29
|
focusContainer: () => void;
|
|
@@ -33,6 +32,9 @@ interface LayerUIProps {
|
|
|
33
32
|
onImageAction: (data: {
|
|
34
33
|
insertOnCanvasDirectly: boolean;
|
|
35
34
|
}) => void;
|
|
35
|
+
renderWelcomeScreen: boolean;
|
|
36
|
+
onHomeButtonClick: () => void;
|
|
37
|
+
onThemeToggle: (theme: Theme) => void;
|
|
36
38
|
}
|
|
37
|
-
declare const _default: React.MemoExoticComponent<({
|
|
39
|
+
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, onHomeButtonClick, onThemeToggle, }: LayerUIProps) => JSX.Element>;
|
|
38
40
|
export default _default;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import Library from "../data/library";
|
|
2
|
-
import { LibraryItems, LibraryItem, AppState,
|
|
3
|
+
import { LibraryItems, LibraryItem, AppState, ExcalidrawProps } from "../types";
|
|
3
4
|
import "./LibraryMenu.scss";
|
|
4
|
-
|
|
5
|
+
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
6
|
+
export declare const LibraryMenuContent: ({ onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, libraryReturnUrl, library, id, appState, selectedItems, onSelectItems, }: {
|
|
5
7
|
pendingElements: LibraryItem["elements"];
|
|
6
|
-
onClose: () => void;
|
|
7
8
|
onInsertLibraryItems: (libraryItems: LibraryItems) => void;
|
|
8
9
|
onAddToLibrary: () => void;
|
|
9
|
-
theme: AppState["theme"];
|
|
10
|
-
files: BinaryFiles;
|
|
11
10
|
setAppState: React.Component<any, AppState>["setState"];
|
|
12
11
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
13
|
-
focusContainer: () => void;
|
|
14
12
|
library: Library;
|
|
15
13
|
id: string;
|
|
16
14
|
appState: AppState;
|
|
15
|
+
selectedItems: LibraryItem["id"][];
|
|
16
|
+
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
17
17
|
}) => JSX.Element;
|
|
18
|
+
export declare const LibraryMenu: React.FC<{
|
|
19
|
+
appState: AppState;
|
|
20
|
+
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
|
21
|
+
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
22
|
+
focusContainer: () => void;
|
|
23
|
+
library: Library;
|
|
24
|
+
id: string;
|
|
25
|
+
}>;
|
|
@@ -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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Library from "../data/library";
|
|
3
|
+
import { AppState, LibraryItem } from "../types";
|
|
4
|
+
export declare const LibraryMenuHeader: React.FC<{
|
|
5
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
6
|
+
selectedItems: LibraryItem["id"][];
|
|
7
|
+
library: Library;
|
|
8
|
+
onRemoveFromLibrary: () => void;
|
|
9
|
+
resetLibrary: () => void;
|
|
10
|
+
onSelectItems: (items: LibraryItem["id"][]) => void;
|
|
11
|
+
appState: AppState;
|
|
12
|
+
}>;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Library from "../data/library";
|
|
3
|
-
import { AppState, BinaryFiles, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
|
|
1
|
+
import { AppState, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
|
|
4
2
|
import "./LibraryMenuItems.scss";
|
|
5
|
-
declare const LibraryMenuItems: ({ isLoading, libraryItems,
|
|
3
|
+
declare const LibraryMenuItems: ({ isLoading, libraryItems, onAddToLibrary, onInsertLibraryItems, pendingElements, selectedItems, onSelectItems, theme, id, libraryReturnUrl, }: {
|
|
6
4
|
isLoading: boolean;
|
|
7
5
|
libraryItems: LibraryItems;
|
|
8
6
|
pendingElements: LibraryItem["elements"];
|
|
9
|
-
onRemoveFromLibrary: () => void;
|
|
10
7
|
onInsertLibraryItems: (libraryItems: LibraryItems) => void;
|
|
11
8
|
onAddToLibrary: (elements: LibraryItem["elements"]) => void;
|
|
12
|
-
theme: AppState["theme"];
|
|
13
|
-
files: BinaryFiles;
|
|
14
|
-
setAppState: React.Component<any, AppState>["setState"];
|
|
15
|
-
appState: AppState;
|
|
16
|
-
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
17
|
-
library: Library;
|
|
18
|
-
id: string;
|
|
19
9
|
selectedItems: LibraryItem["id"][];
|
|
20
10
|
onSelectItems: (id: LibraryItem["id"][]) => void;
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
12
|
+
theme: AppState["theme"];
|
|
13
|
+
id: string;
|
|
23
14
|
}) => JSX.Element;
|
|
24
15
|
export default LibraryMenuItems;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LibraryItem } from "../types";
|
|
2
2
|
import "./LibraryUnit.scss";
|
|
3
|
-
export declare const LibraryUnit: ({ id, elements,
|
|
3
|
+
export declare const LibraryUnit: ({ id, elements, isPending, onClick, selected, onToggle, onDrag, }: {
|
|
4
4
|
id: LibraryItem["id"] | /** for pending item */ null;
|
|
5
5
|
elements?: readonly import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | undefined;
|
|
6
|
-
files: BinaryFiles;
|
|
7
6
|
isPending?: boolean | undefined;
|
|
8
7
|
onClick: () => void;
|
|
9
8
|
selected: boolean;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Separator: () => JSX.Element;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { AppState, Device, ExcalidrawProps } from "../types";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
|
-
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
4
|
+
import { NonDeletedExcalidrawElement, Theme } from "../element/types";
|
|
5
5
|
declare type MobileMenuProps = {
|
|
6
|
-
onHomeButtonClick?: () => void;
|
|
7
6
|
appState: AppState;
|
|
8
7
|
actionManager: ActionManager;
|
|
9
8
|
renderJSONExportDialog: () => React.ReactNode;
|
|
10
9
|
renderImageExportDialog: () => React.ReactNode;
|
|
11
10
|
setAppState: React.Component<any, AppState>["setState"];
|
|
12
11
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
13
|
-
libraryMenu: JSX.Element | null;
|
|
14
12
|
onCollabButtonClick?: () => void;
|
|
15
13
|
onLockToggle: () => void;
|
|
16
14
|
onPenModeToggle: () => void;
|
|
17
15
|
canvas: HTMLCanvasElement | null;
|
|
18
16
|
isCollaborating: boolean;
|
|
19
17
|
renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
20
|
-
showThemeBtn: boolean;
|
|
21
18
|
onImageAction: (data: {
|
|
22
19
|
insertOnCanvasDirectly: boolean;
|
|
23
20
|
}) => void;
|
|
24
|
-
renderTopRightUI?: (isMobile: boolean, appState: AppState
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
22
|
+
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
23
|
+
renderSidebars: () => JSX.Element | null;
|
|
24
|
+
device: Device;
|
|
25
|
+
renderWelcomeScreen?: boolean;
|
|
26
|
+
onHomeButtonClick: () => void;
|
|
27
|
+
onThemeToggle: (theme: Theme) => void;
|
|
27
28
|
};
|
|
28
|
-
export declare const MobileMenu: ({
|
|
29
|
+
export declare const MobileMenu: ({ appState, elements, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, onImageAction, renderTopRightUI, renderCustomStats, renderSidebars, device, renderWelcomeScreen, onHomeButtonClick, onThemeToggle, }: MobileMenuProps) => JSX.Element;
|
|
29
30
|
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./Sidebar.scss";
|
|
3
|
+
/** using a counter instead of boolean to handle race conditions where
|
|
4
|
+
* the host app may render (mount/unmount) multiple different sidebar */
|
|
5
|
+
export declare const hostSidebarCountersAtom: import("jotai").Atom<{
|
|
6
|
+
rendered: number;
|
|
7
|
+
docked: number;
|
|
8
|
+
}> & {
|
|
9
|
+
write: (get: {
|
|
10
|
+
<Value>(atom: import("jotai").Atom<Value | Promise<Value>>): Value;
|
|
11
|
+
<Value_1>(atom: import("jotai").Atom<Promise<Value_1>>): Value_1;
|
|
12
|
+
<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;
|
|
13
|
+
} & {
|
|
14
|
+
<Value_3>(atom: import("jotai").Atom<Value_3 | Promise<Value_3>>, options: {
|
|
15
|
+
unstable_promise: true;
|
|
16
|
+
}): Value_3 | Promise<Value_3>;
|
|
17
|
+
<Value_4>(atom: import("jotai").Atom<Promise<Value_4>>, options: {
|
|
18
|
+
unstable_promise: true;
|
|
19
|
+
}): Value_4 | Promise<Value_4>;
|
|
20
|
+
<Value_5>(atom: import("jotai").Atom<Value_5>, options: {
|
|
21
|
+
unstable_promise: true;
|
|
22
|
+
}): (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>;
|
|
23
|
+
}, set: {
|
|
24
|
+
<Value_6, Result extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_6, undefined, Result>): Result;
|
|
25
|
+
<Value_7, Update, Result_1 extends void | Promise<void>>(atom: import("jotai").WritableAtom<Value_7, Update, Result_1>, update: Update): Result_1;
|
|
26
|
+
}, update: {
|
|
27
|
+
rendered: number;
|
|
28
|
+
docked: number;
|
|
29
|
+
} | ((prev: {
|
|
30
|
+
rendered: number;
|
|
31
|
+
docked: number;
|
|
32
|
+
}) => {
|
|
33
|
+
rendered: number;
|
|
34
|
+
docked: number;
|
|
35
|
+
})) => void;
|
|
36
|
+
onMount?: (<S extends (update: {
|
|
37
|
+
rendered: number;
|
|
38
|
+
docked: number;
|
|
39
|
+
} | ((prev: {
|
|
40
|
+
rendered: number;
|
|
41
|
+
docked: number;
|
|
42
|
+
}) => {
|
|
43
|
+
rendered: number;
|
|
44
|
+
docked: number;
|
|
45
|
+
})) => void>(setAtom: S) => void | (() => void)) | undefined;
|
|
46
|
+
} & {
|
|
47
|
+
init: {
|
|
48
|
+
rendered: number;
|
|
49
|
+
docked: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const Sidebar: import("react").ForwardRefExoticComponent<{
|
|
53
|
+
children: import("react").ReactNode;
|
|
54
|
+
onClose?: (() => boolean | void) | undefined;
|
|
55
|
+
onDock?: ((docked: boolean) => void) | undefined;
|
|
56
|
+
docked?: boolean | undefined;
|
|
57
|
+
initialDockedState?: boolean | undefined;
|
|
58
|
+
dockable?: boolean | undefined;
|
|
59
|
+
className?: string | undefined;
|
|
60
|
+
} & {
|
|
61
|
+
/** @private internal */
|
|
62
|
+
__isInternal?: boolean | undefined;
|
|
63
|
+
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
64
|
+
Header: {
|
|
65
|
+
(props: {
|
|
66
|
+
children?: import("react").ReactNode;
|
|
67
|
+
className?: string | undefined;
|
|
68
|
+
} & {
|
|
69
|
+
__isFallback?: boolean | undefined;
|
|
70
|
+
}): JSX.Element | null;
|
|
71
|
+
displayName: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SidebarDockButton: (props: {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange?(): void;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
/** @private */
|
|
7
|
+
export declare const SidebarHeaderComponents: {
|
|
8
|
+
Context: import("react").FC<{
|
|
9
|
+
children: import("react").ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
Component: {
|
|
12
|
+
(props: {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
__isFallback?: boolean | undefined;
|
|
17
|
+
}): JSX.Element | null;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare type SidebarProps<P = {}> = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Called on sidebar close (either by user action or by the editor).
|
|
6
|
+
*/
|
|
7
|
+
onClose?: () => void | boolean;
|
|
8
|
+
/** if not supplied, sidebar won't be dockable */
|
|
9
|
+
onDock?: (docked: boolean) => void;
|
|
10
|
+
docked?: boolean;
|
|
11
|
+
initialDockedState?: boolean;
|
|
12
|
+
dockable?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
} & P;
|
|
15
|
+
export declare type SidebarPropsContextValue = Pick<SidebarProps, "onClose" | "onDock" | "docked" | "dockable">;
|
|
16
|
+
export declare const SidebarPropsContext: React.Context<SidebarPropsContextValue>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionManager } from "../actions/manager";
|
|
2
|
+
import { AppState } from "../types";
|
|
3
|
+
import { AppProps } from "../types";
|
|
4
|
+
import "./WelcomeScreen.scss";
|
|
5
|
+
declare const WelcomeScreen: ({ appState, actionManager, onCollabButtonClick, }: {
|
|
6
|
+
appState: AppState;
|
|
7
|
+
actionManager: ActionManager;
|
|
8
|
+
onCollabButtonClick: AppProps["onCollabButtonClick"];
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default WelcomeScreen;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const withUpstreamOverride: <P>(Component: React.ComponentType<P>) => readonly [React.FC<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}>, {
|
|
5
|
+
(props: P & {
|
|
6
|
+
/** @private internal */
|
|
7
|
+
__isFallback?: boolean | undefined;
|
|
8
|
+
}): JSX.Element | null;
|
|
9
|
+
displayName: string;
|
|
10
|
+
}];
|