type UrlResult = [string | null, Error | null]; interface UrlRecord { promise: Promise; value?: UrlResult; } interface ContentRecord { promise: Promise; value?: T; controller: AbortController; dispose?: ((value: T) => void) | undefined; } /** Request a presigned URL for `path` once and remember the result; a failed or * empty result is not cached so a later mount retries. */ export declare function loadPreviewUrl(path: string, loader: () => Promise): UrlRecord; /** Fetch the object for `path` once and remember it; `dispose` frees the value * (e.g. revokes a blob URL) when the entry is evicted. A rejected fetch is not * cached so a later mount retries. */ export declare function loadPreviewContent(path: string, loader: (signal: AbortSignal) => Promise, dispose?: (value: T) => void): ContentRecord; /** Fetch a preview object over its signed URL; a 401/403 means the URL is stale * or unauthorized, so drop it from the cache and let the next mount fetch a fresh * one instead of replaying the dead one. */ export declare function fetchPreviewObject(path: string, url: string, signal: AbortSignal, headers?: HeadersInit): Promise; export declare function peekPreviewUrl(path: string): UrlResult | undefined; export declare function peekPreviewContent(path: string): T | undefined; export declare function clearPreviewCache(isCleared?: (path: string) => boolean): void; export {};