import * as React from 'react'; /** Minimum sidebar width. Equal to the previous fixed width, so it never shrinks below the old default. */ export declare const MIN_SIDEBAR_WIDTH = 410; /** Maximum sidebar width, roughly half a laptop viewport. */ export declare const MAX_SIDEBAR_WIDTH = 720; export declare const DEFAULT_SIDEBAR_WIDTH = 410; export declare const SIDEBAR_WIDTH_STORAGE_KEY = "cdt:sidebar-width"; /** Clamp to [MIN, MAX]. NaN falls back to the default; ±Infinity clamps to the bounds. */ export declare function clampSidebarWidth(width: number): number; /** SSR-safe read of the persisted width, clamped; falls back to the default on missing/corrupt values. */ export declare function readStoredSidebarWidth(): number; /** SSR-safe persist of a clamped width. Swallows storage errors (private mode, quota). */ export declare function writeStoredSidebarWidth(width: number): void; export interface ResizableSidebarWidth { /** Current width in px. Only meaningful when `canResize` is true; mobile uses the fixed drawer width. */ width: number; /** True while a drag is in progress (for cursor / no-select styling). */ isResizing: boolean; /** True on desktop only. Mobile uses a fixed drawer width and is not resizable. */ canResize: boolean; /** Attach to the drag handle's onPointerDown. */ startResize: (e: React.PointerEvent) => void; } /** * Drives a user-resizable sidebar width on desktop. Width is restored from and persisted to * localStorage, clamped to [MIN_SIDEBAR_WIDTH, MAX_SIDEBAR_WIDTH]. On mobile (`useIsMobile`) * resizing is disabled and the sidebar renders at the fixed mobile drawer width. */ export declare function useResizableSidebarWidth(): ResizableSidebarWidth; //# sourceMappingURL=useResizableSidebarWidth.d.ts.map