import { type DepthClipFrames, type DepthManifest, type DepthMap } from "supervision-js-core"; import type { MediaRendererDepthInput } from "#types/media-depth"; import type { DepthSourceContext } from "./source"; /** The files of one depth map: the 16-bit depth PNG and its confidence. */ export interface DepthMapFiles { readonly file: string; readonly confidenceFile?: string; } type ManifestInput = Extract; /** * Fetches and parses a manifest URL, or checks one passed parsed. Relative * files resolve against the manifest's URL, or against `baseUrl` for a * manifest passed already parsed. */ export declare function loadDepthManifest(input: ManifestInput, context: DepthSourceContext): Promise<{ manifest: DepthManifest; base: string | URL | undefined; }>; export declare function clipFrameFiles(frames: DepthClipFrames, index: number): DepthMapFiles; /** Bytes a decoded exact map holds, its confidence plane included. */ export declare function exactMapBytes(map: DepthMap): number; /** * Fetches and decodes one depth PNG, and its confidence plane, into a map. * The decode runs in the render-preparation worker when there is one. */ export declare function loadDepthMap(manifest: DepthManifest, files: DepthMapFiles, base: string | URL | undefined, context: DepthSourceContext, signal: AbortSignal | undefined): Promise; /** * The whole factor a map can shrink by for upload and still have a texel * for every pixel of the box it is shown in, at the box's pixel ratio; 1 * without a box. */ export declare function displayDecimation(map: { readonly width: number; readonly height: number; }, context: Pick): number; /** * Resolves `file` against `base`, itself resolved against the page. Without * a page (a worker, a test), a relative base still joins by path. */ export declare function resolveUrl(file: string, base: string | URL | undefined): string; /** * The map is stretched over the media rectangle, so a map of another shape * would put depth beside the pixels it measures. */ export declare function assertMediaAspect(map: { readonly width: number; readonly height: number; }, media: { readonly width: number; readonly height: number; }): void; export {}; //# sourceMappingURL=files.d.ts.map