/** * AppShell geometry and collapse priority. Side regions collapse by fit, not * viewport breakpoints. Pixel values have no current semantic token scale. * TODO(carto-tokens): move these to `layout.size.*` if one ships. */ /** Collapsible/resizable side regions. Chat is always the center. */ export type SideRegion = "rail" | "artifact"; export type RegionWidths = { default: number; min: number; /** * Hard cap. Omit so the region may grow within remaining layout space. */ max?: number; }; /** * Artifact opening width. `regular` is fixed; `large` fills above its floor * while reserving chat space and collapsing the rail. Both remain resizable. */ export type ArtifactWidth = "regular" | "large"; export declare const DEFAULT_ARTIFACT_WIDTH: ArtifactWidth; export declare const REGULAR_ARTIFACT_WIDTH = 560; export declare const LARGE_ARTIFACT_WIDTH_FLOOR = 720; /** * Chat's minimum **while the artifact fills for the `large` preset** (px) — a * roomier floor than {@link CHAT_MIN_WIDTH}, used only to compute `large`'s open * width. Ongoing fit/resize still uses the global chat-min. */ export declare const LARGE_ARTIFACT_CHAT_MIN = 440; export declare const WIDTHS: Record; export declare const RAIL_DRAWER_GUTTER = 40; /** * Rail max is the lesser of its cap and the container minus * {@link RAIL_DRAWER_GUTTER}. */ export declare function maxRailWidth(containerWidth: number): number; export declare function isRegionResizable(region: SideRegion): boolean; export declare const CHAT_MIN_WIDTH = 360; /** * Shell width above which the artifact must remain inline and the rail yields. * Distinct from the large preset floor despite the current shared value. */ export declare const ARTIFACT_INLINE_ONLY_WIDTH = 720; export declare const KEYBOARD_RESIZE_STEP = 16; /** Auto-collapse order, lowest priority first. Chat is never listed. */ export declare const COLLAPSE_PRIORITY: readonly SideRegion[]; /** * Resolves opening width. Large fills after reserving chat space and falls back * to its floor before measurement. */ export declare function artifactOpenWidth(preset: ArtifactWidth, containerWidth: number | null): number; /** Whether opening at this preset should collapse the rail to reclaim its space. */ export declare function presetCollapsesRail(preset: ArtifactWidth): boolean; /** * The widest the artifact can be **inline** without pushing chat below its * minimum. Dragging past this detaches the artifact into a drawer that keeps * growing up to the viewport. `railInline` is the rail's effective inline width * (0 when the rail isn't inline). */ export declare function inlineMaxArtifactWidth(containerWidth: number, railInline: number): number; /** * Width an artifact **drawer** opens at, given the live drag target and the * shell width. Clamped to `[artifact.min, containerWidth]` — a drawer may grow * to the full viewport (chat stays inline at ≥ chat-min underneath). */ export declare function clampDrawerWidth(desired: number, containerWidth: number): number; /** * Clamp a desired side-region width to its own bounds AND to the space left for * chat once the other side is accounted for. The result never forces chat below * its minimum. `otherSideWidth` is the other region's effective px (0 if * collapsed/absent). */ export declare function clampWidth(region: SideRegion, desired: number, containerWidth: number, otherSideWidth: number): number;