@sanity/desk-tool
Version:
Tool for managing all sorts of content in a structured manner
18 lines • 868 B
TypeScript
import { PaneConfigOpts, PaneData } from './types';
export interface PaneLayoutState {
expandedElement: HTMLElement | null;
panes: PaneData[];
resizing: boolean;
}
export declare type PaneLayoutStateObserver = (state: PaneLayoutState) => void;
export interface PaneLayoutController {
collapse: (element: HTMLElement) => void;
expand: (element: HTMLElement) => void;
mount: (element: HTMLElement, options: PaneConfigOpts) => () => void;
resize: (type: 'start' | 'move' | 'end', leftElement: HTMLElement, deltaX: number) => void;
setRootElement: (nextRootElement: HTMLElement | null) => void;
setRootWidth: (nextRootWidth: number) => void;
subscribe: (observer: PaneLayoutStateObserver) => () => void;
}
export declare function createPaneLayoutController(): PaneLayoutController;
//# sourceMappingURL=paneLayoutController.d.ts.map