import { type FrameLifecycleTier, type FrameLodCamera, type FrameLodConfig, type FrameLodFrame, type FrameLodViewport } from './frameLod.js'; /** Frames the controller has not classified render at full detail. */ export declare const DEFAULT_FRAME_LOD_TIER: FrameLifecycleTier; export interface FrameLodCameraSample extends FrameLodCamera { /** Tracked so a canvas switch retriggers the reaction; unused by the math. */ canvas?: string; } export interface FrameLodControllerOptions { /** Read inside the MobX reaction — its observable reads drive recomputes. */ readCamera(): FrameLodCameraSample; /** Read untracked at compute time. */ readFrames(): readonly FrameLodFrame[]; readViewport(): FrameLodViewport; /** Throttle for camera-driven recomputes. Defaults to requestAnimationFrame. */ schedule?(recompute: () => void): () => void; now?(): number; config?: FrameLodConfig; resolveBudget?(frames: readonly FrameLodFrame[]): number; /** Screen device pixels per CSS pixel. Defaults to window.devicePixelRatio. */ readDevicePixelRatio?(): number; /** Called after every recompute with what it read and decided. */ onRecompute?(input: { frames: readonly FrameLodFrame[]; camera: FrameLodCameraSample; viewport: FrameLodViewport; tiers: ReadonlyMap; }): void; } export interface FrameLodController { start(): void; stop(): void; /** Runs the tier computation immediately (initial mount and tests). */ recompute(): void; } /** * The per-runtime frame LOD state: the published tiers and magnification * flags with their per-frame listeners, the camera-global bitmap-resolution * signal, the last recompute diagnostic, and the controller factory that * publishes into them. The bodies below are the former module-level * functions, closed over instance state instead of module state. */ export declare function createFrameLodRuntime(): { getFrameTier: (frameId: string) => FrameLifecycleTier; getFrameMagnification: (frameId: string) => boolean; getFrameBitmapFull: () => boolean; subscribeFrameBitmapScale: (listener: () => void) => () => void; __debugFrameLodState: () => { tiers: [string, FrameLifecycleTier][]; magnified: [string, boolean][]; lastRecompute: { displayDensity?: number; overview?: boolean; frames?: { id: string; screenshotDensity: number | null | undefined; tier: string; }[]; }; }; subscribeFrameLod: (frameId: string, listener: () => void) => () => void; countFrameLodListeners: () => number; createFrameLodController: (options: FrameLodControllerOptions) => FrameLodController; }; export type FrameLodRuntime = ReturnType;