/** How the panel participates in layout inside `container`. */ export type BasePanelPlacement = "floating" | "embedded"; /** Optional hint for embedded sidebars (adds modifier classes for styling). */ export type BasePanelDock = "left" | "right"; /** * BasePanel options */ export interface BasePanelOptions { /** * Panel parent container in DOM. */ container: HTMLElement; /** * Panel title */ title: string; /** * The css class name. This will be added to panel root div. * Caller can use this to override initial panel position, size, etc. */ cssClass?: string; /** * Callback when panel is hidden */ onClose?: () => void; /** * Used by drag, when user want to limit the panel to be dragged within a certain area. */ viewportContainer?: HTMLElement; /** * `floating` (default): absolute palette over the host, draggable header. * `embedded`: fill `container`; caller lays out the host (e.g. flex column). No dock semantics by itself. */ placement?: BasePanelPlacement; /** * When set with `placement: "embedded"`, adds `base-panel--dock-left` or `base-panel--dock-right` for styling. * Ignored for floating panels. */ dock?: BasePanelDock; /** * Whether the header can drag the panel. Defaults to `true` for floating, `false` for embedded. */ draggable?: boolean; /** Header close (✕). Default `true`. */ showCloseButton?: boolean; /** Header collapse chevron. Default `true`. */ showCollapseButton?: boolean; } /** * Base panel, which defined common draggable header, close button, style, etc. */ export declare class BasePanel { root: HTMLDivElement; header: HTMLDivElement; content: HTMLDivElement; collapseBtn?: HTMLSpanElement; closeBtn?: HTMLSpanElement; protected mouseDownPositionX: number; protected mouseDownPositionY: number; protected onClose: () => void; protected viewportContainer?: HTMLElement; protected draggable: boolean; constructor(options: BasePanelOptions); setVisible(visible: boolean): void; isVisible(): boolean; setTitle(title: string): void; setContent(html: string): void; destroy(): void; }