import { WebpMachineOptions, PolyfillDocumentOptions, DetectWebpImage, DetectWebpBackground } from "./interfaces.js"; export declare class WebpMachineError extends Error { } export declare const defaultDetectWebpImage: DetectWebpImage; export declare const defaultDetectWebpBackground: DetectWebpBackground; /** * Webp Machine * - decode and polyfill webp images * - can only decode images one-at-a-time (otherwise will throw busy error) */ export declare class WebpMachine { private readonly webp; private readonly webpSupport; private readonly detectWebpImage; private readonly detectWebpBackground; private processing; private busy; private cache; constructor({ webp, webpSupport, detectWebpImage, detectWebpBackground }?: WebpMachineOptions); /** * Decode raw webp data into a png data url */ decode(webpData: Uint8Array): Promise; /** * Polyfill the webp format on the given element */ polyfillImage(image: HTMLImageElement): Promise; /** * Polyfill the webp format on the given
element */ polyfillBackground(el: HTMLDivElement): Promise; /** * Polyfill webp format on the entire web page */ polyfillDocument({ document, selectors, }?: PolyfillDocumentOptions): Promise; }