/** * Configuration for panel resizing and collapsing. * * - `collapseDirection` is always required — it determines which side the panel collapses to. * - Size constraints (`initialWidth`, `minWidth`, `maxWidth`) are all optional: * - If none are set, the panel width is determined by its content. * - If only `initialWidth` is set, the panel gets a fixed width with no drag resizing. * - For drag resizing to work, at least 2 of the 3 size values must be provided so the resizer * has a range to operate in. * - When `minWidth` is omitted, `initialWidth` acts as the lower bound. * - When `maxWidth` is omitted, `initialWidth` acts as the upper bound. */ export type PanelResizingSettings = { collapseDirection: 'left' | 'right'; initialWidth?: number; minWidth?: number; maxWidth?: number; }; export type PanelBorder = 'top' | 'right' | 'bottom' | 'left'; /** * Config for one `PageLayout` header chrome button. Set `active` only for toggles — it drives both * `aria-pressed` and the pressed background, and is omitted entirely for plain action buttons. */ export type PageLayoutAction = { active?: boolean; onClick: () => void; }; /** Editor chrome — a fixed pair, so an editor never ships half of it. */ export type EditorControls = { panelsToggle: PageLayoutAction; close: PageLayoutAction; };