import { ParsedValue } from '../utils/units.js'; /** * The state of a panel. * @internal */ export type Panel = { /** The minimum width the panel should have. */ minWidth?: number; /** The preferred width the panel should have when initializing the panels. */ preferredWidth?: string | number; /** Whether the panel is resizable. */ resizable: boolean; /** * The order of the panel. This is needed to be able to sort the panels * and correctly handle conditionally rendered panels. */ order: number; /** * Whether the panel is dismissed to the left or right. * This is used to distribute space accordingly when adding / dismissing a panel. */ dismissible?: DismissOptions; /** * Callback triggered after resizing is finished with the new panel sizes of * all existing panels and the newly applied panel width (in px). */ onResize?: (sizes: PanelSizes, width: number) => void; }; /** * An object containing all the currently rendered panels and their state. * @internal */ export type Panels = Record; /** * The state of a resize handle. * @internal */ export type ResizeHandle = { order: number; }; /** * Array of panels, including their unique name. * @internal */ export type PanelChildren = Array; /** * Array of resize handles, including their unique name. * @internal */ export type ResizeHandles = Array; /** * Array of supported units to specify the size of a panel. * @public */ export declare const panelSizeUnits: readonly ["px", "fr", "%", "vw", "rem"]; /** * The supported units to specify the size of a panel. * @public */ export type PanelSizeUnit = (typeof panelSizeUnits)[number]; /** * The size of a panel. * @public */ export type PanelSize = number | `${number}${PanelSizeUnit}`; /** * An object of panel keys and the panel's current size in fractions or pixels if they're not resizable. * @internal */ export type PanelSizesWithUnit = Record; /** * An object of panel keys and the panel's current size in all available units. * @internal */ export type PanelSizes = Record; /** * Possible options for dismissing a panel. * @internal */ export type DismissOptions = true | false | 'left' | 'right';