///
import * as t from './libs';
export declare type ShellTheme = 'LIGHT' | 'DARK';
export declare type IShell = {
events: IShellEvents;
state: IShellState;
initial(state: IShellPartialState): IShell;
register: ShellRegisterModule;
main: ShellRegisterModule;
load
>(moduleId: string | number, options?: IShellLoadOptions
): Promise;
progress: IShellProgress;
};
export declare type ShellRegisterModule = (moduleId: string, importer: ShellImporter, options?: {
timeout?: number;
}) => IShell;
export declare type IShellEvents = {
events$: t.Observable;
tree: t.ITreeEvents;
progress: {
start$: t.Observable;
complete$: t.Observable;
};
};
export declare type IShellProgress = {
start(options?: {
duration?: number;
color?: string;
}): Promise;
complete(): void;
};
export declare type IShellLoadOptions> = {
props?: P;
progress?: number;
simulateLatency?: number;
};
export declare type IShellContext = {
shell: IShell;
};
export declare type ShellImporter
> = (props?: P) => Promise;
export declare type ShellImporterResponse = {
init: ShellImportInit;
};
export declare type ShellImportInit = (args: ShellImportInitArgs) => Promise;
export declare type ShellImportInitArgs = {
shell: IShell;
};
export declare type IShellLoadResponse = {
ok: boolean;
count: number;
error?: Error;
timedOut: boolean;
};
export declare type IShellState = {
readonly changed$: t.Observable;
readonly header: IShellHeaderState;
readonly tree: IShellTreeState;
readonly body: IShellBodyState;
readonly sidebar: IShellSidebarState;
readonly footer: IShellFooterState;
};
export declare type IShellPartialState = Partial<{
header: Partial;
tree: Partial;
body: Partial;
sidebar: Partial;
footer: Partial;
}>;
export declare type IShellHeaderState = {
el?: JSX.Element;
foreground: IShellColor | string | number;
background: IShellColor | string | number;
border: IShellColor | string | number;
height: IShellSize | number;
};
export declare type IShellTreeState = {
root?: t.ITreeNode;
current?: string;
width: IShellSize | number;
render?: {
node?: t.RenderTreeNodeBody;
icon?: t.RenderTreeIcon;
panel?: t.RenderTreePanel;
};
};
export declare type IShellBodyState = {
el?: JSX.Element;
foreground: IShellColor | string | number;
background: IShellColor | string | number;
};
export declare type IShellSidebarState = {
el?: JSX.Element;
foreground: IShellColor | string | number;
background: IShellColor | string | number;
width: IShellSize | number;
};
export declare type IShellFooterState = {
el?: JSX.Element;
foreground: IShellColor | string | number;
background: IShellColor | string | number;
border: IShellColor | string | number;
height: IShellSize | number;
};
export declare type IShellColor = {
color: string;
fadeSpeed: number;
};
export declare type IShellSize = {
value: number;
speed: number;
};
export declare type ShellEvent = t.TreeviewEvent | IShellProgressStartEvent | IShellProgressCompleteEvent;
export declare type IShellProgressStartEvent = {
type: 'SHELL/progress/start';
payload: IShellProgressStart;
};
export declare type IShellProgressStart = {
duration?: number;
color?: string;
};
export declare type IShellProgressCompleteEvent = {
type: 'SHELL/progress/complete';
payload: IShellProgressComplete;
};
export declare type IShellProgressComplete = {
success: boolean;
};
export declare type IShellStateChanged = t.IPropChanged & {
field: 'header' | 'footer' | 'tree' | 'body' | 'sidebar';
};