//#region src/inspector/pane-width.d.ts /** * Width arithmetic for a docked inspector pane. * * The pane is a fixed overlay backed by an in-flow spacer, so nothing in * the layout pushes back when it grows: whatever the pane takes comes * straight out of the content column. Without a clamp against the space * actually available, shrinking the window (or expanding the sidebar) * leaves the content column a few dozen pixels wide instead of folding. * * The host application's sidebar width is a parameter rather than an * import, so the policy carries no coupling to any particular shell. */ export declare const INSPECTOR_PANE_DEFAULT_WIDTH = 512; export declare const INSPECTOR_PANE_MIN_WIDTH = 320; /** * Absolute ceiling, reached only on a very wide viewport. Past this the pane * is no longer a reading column, and the two documents it compares stop * being scannable side by side. */ export declare const INSPECTOR_PANE_MAX_WIDTH = 1400; /** * Floor for the content column beside the pane. Below this the content * surface stops being usable, so the pane yields space first. */ export declare const INSPECTOR_CONTENT_MIN_WIDTH = 400; /** * Comfortable measure for the document editor beside the pane, distinct from * {@link INSPECTOR_CONTENT_MIN_WIDTH}: that one is the hard floor any content * surface must keep (and the width the sidebar collapses to protect), this * one is the width a page of prose still reads at. The pane's *ceiling* * respects the readable measure; the hard floor still wins when the viewport * cannot give both. */ export declare const INSPECTOR_EDITOR_MIN_WIDTH = 560; /** Inline size of the collapsed icon rail, in CSS pixels. */ export declare const INSPECTOR_RAIL_WIDTH = 48; type ForceSidebarCollapsedInput = { /** Inline size the expanded sidebar takes out of the layout row. */ expandedSidebarWidth: number; inspectorPaneOpen: boolean; /** Viewport width in CSS pixels; 0 before the viewport is known. */ viewportWidth: number; }; /** * The expanded sidebar yields its optional width before either docked pane * can violate its minimum. The collapsed rail plus both minimums fit at the * desktop breakpoint, so this policy keeps every desktop width usable. */ export declare const shouldForceSidebarCollapsed: ({ expandedSidebarWidth, inspectorPaneOpen, viewportWidth }: ForceSidebarCollapsedInput) => boolean; type InspectorPaneWidthInput = { /** Width the user dragged the pane to. */ desiredWidth: number; /** Inline size the sidebar takes out of the same layout row. */ sidebarWidth: number; /** Viewport width in CSS pixels; 0 before the viewport is known. */ viewportWidth: number; }; /** * Largest width the pane may take without starving the content column. * Never returns less than {@link INSPECTOR_PANE_MIN_WIDTH}: a pane too * narrow to read is no better than a content column too narrow to read, * and collapsing the sidebar is the escape hatch for a genuinely small * viewport. */ export declare const resolveInspectorPaneMaxWidth: ({ sidebarWidth, viewportWidth }: Omit) => number; /** * A width inside the pane's own bounds, independent of any viewport. * * Every width the pane keeps goes through this, because the kept width is * also the persisted one and the persistence owner rejects — * and so resets — anything outside these bounds. A raw cursor position is * routinely outside them, so a drag past the edge has to be remembered as * the bound it stopped at rather than as the pixel the pointer reached. */ export declare const clampInspectorPaneWidth: (width: number) => number; /** Width the pane renders at, given the width the user asked for. */ export declare const resolveInspectorPaneWidth: ({ desiredWidth, sidebarWidth, viewportWidth }: InspectorPaneWidthInput) => number; /** * Width the dock reserves in the layout: the full pane while content is * shown, the bare rail while it is collapsed or minimized. */ export declare const resolveInspectorDockWidth: ({ paneWidth, showPaneContent }: { paneWidth: number; showPaneContent: boolean; }) => number; //#endregion