/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ /** * Widths of the two rails, in pixels. The shell is a three-column grid and * both outer columns are draggable, so the numbers live here — clamping and * persistence are the parts worth testing, and neither needs a DOM. */ export type RailSide = "left" | "right"; export declare const RAIL_DEFAULTS: Readonly>; export interface RailWidths { readonly left: number; readonly right: number; } /** * The width a drag actually lands on: never below the side's minimum, never * past `RAIL_MAX`, and never so wide that the centre column drops under * `MIN_MAIN`. The minimum wins over the viewport budget on a narrow window — * a rail that collapses to nothing is worse than one that overflows, and the * layout drops to stacked panes down there anyway. */ export declare function clampRailWidth(side: RailSide, width: number, viewport: number, otherWidth: number): number; interface WidthStore { getItem(key: string): string | null; setItem(key: string, value: string): void; } /** * Last session's widths, or the defaults. Anything unparseable is the default: * a corrupt entry must not leave the page with no rails. */ export declare function loadRailWidths(store?: WidthStore | undefined): RailWidths; export declare function saveRailWidths(widths: RailWidths, store?: WidthStore | undefined): void; export {};