import type { FileLoader } from './media.js'; /** * The preload cache: a few whole clip files, so a later `showClip` swaps * without waiting (spec/player.md, `preload`). Keys name a file (edge, * format, size), not its URL, so cached files survive a signed-link refresh. * Each pose's preloads come most important first; when the cache is full, * older poses' files go first and a pose's later preloads are skipped. */ export declare class ClipCache { private readonly files; private readonly capacity; private readonly entries; private batch; constructor(files: FileLoader, capacity?: number); /** A pose was entered: the preloads that follow are the ones to keep. */ nextBatch(): void; /** Loads a file. Resolves true when cached, false when skipped; rejects when it cannot load. */ preload(key: string, url: string): Promise; /** * The cached or loading file for a slot to play, kept until `release`. A * file the loader left in the browser's cache (no in-memory copy) plays * from `url`, the current link, not the one it was loaded with, which a * refresh may have replaced since. */ acquire(key: string, url?: string): Promise | null; release(key: string): void; has(key: string): boolean; get size(): number; /** Frees every file, including those in use: the player is going away. */ clear(): void; private makeRoom; private drop; }