export interface PanelConstraints { id: string; defaultSize?: number; minSize: number; maxSize: number; collapsible: boolean; collapsedSize: number; } export interface PanelState { id: string; size: number; constraints: PanelConstraints; isCollapsed: boolean; } export interface ResizableContext { direction: 'horizontal' | 'vertical'; disabled: boolean; registerPanel: (id: string, constraints: Omit, element?: HTMLElement) => void; unregisterPanel: (id: string) => void; getPanelSize: (id: string) => number; getPanelOrder: () => string[]; /** Current size and feasible range of the panel before the handle at `handleIndex` (percent). */ getHandleRange: (handleIndex: number) => { now: number; min: number; max: number; } | null; resizePanels: (handleIndex: number, delta: number) => void; collapsePanel: (id: string) => void; expandPanel: (id: string) => void; isCollapsed: (id: string) => boolean; /** Light-DOM host of the panel with this id (the pane a handle controls). */ getPanelElement: (id: string) => HTMLElement | null; getHandleIndex: (handleElement: HTMLElement) => number; } export type ResizableDirection = 'horizontal' | 'vertical';