UNPKG

@teaui/core

Version:

A high-level terminal UI library for Node

44 lines (43 loc) 1.42 kB
import type { Viewport } from '../Viewport.js'; import { View } from '../View.js'; import { Container, type Props as ContainerProps } from '../Container.js'; import { Size } from '../geometry.js'; import { type MouseEvent } from '../events/index.js'; import { System } from '../System.js'; interface Props extends ContainerProps { /** * Draw a border around the entire pane. * @default false */ border?: boolean; /** * Whether browser panes can be collapsed by clicking the separator or * dragging to a very small width. When false, the minimum pane width is 4. * @default true */ collapsible?: boolean; } /** * A split-pane container for index/detail layouts. The first N-1 children are * collapsible "browser" panes with draggable separators. The last child is the * "detail" pane that takes remaining space. */ export declare class Pane extends Container { #private; constructor(props?: Props); update(props: Props): void; get border(): boolean; set border(value: boolean); /** * Returns the browser panes (all children except the last). */ get browserViews(): View[]; /** * Returns the detail pane (the last child). */ get detailView(): View | undefined; naturalSize(available: Size): Size; receiveMouse(event: MouseEvent, system: System): void; render(viewport: Viewport): void; } export {};