/** * A Node-native image {@link @nhtio/adk/batteries/media/contracts!MediaEngine} * backed by sharp (libvips bindings — fast, full-format). * * @module @nhtio/adk/batteries/media/engines/sharp * * @remarks * The performance/fidelity engine for Node deployments: native speed plus webp/avif output * and the full `fit` mode set, plus a generation edge — `EMPTY_MIME` → a blank 1024×1024 * white canvas in any supported encoding (resize in the same statement). sharp is permanently * Node-only (native bindings); for a cross-environment engine compose the jimp implementation * instead — the capability declaration is the seam, and BYO instances adapt via * {@link fromSharp}. * * `sharp` is an optional peer dependency, lazily imported on first actual use. */ import { default as SharpDefault } from 'sharp'; import type { MediaEngine } from "../contracts"; type SharpFn = typeof SharpDefault; /** Options for {@link sharpEngine}. */ export interface SharpEngineOptions { /** Override the module resolution (electron/custom builds). Default: `import('sharp')`. */ sharp?: () => SharpFn | { default: SharpFn; } | Promise; } /** * Construct the sharp-backed image engine. * * @param options - Optional module resolver override. * @returns The engine. */ export declare const sharpEngine: (options?: SharpEngineOptions) => MediaEngine; /** * Adapt an already-configured sharp module (your import, your build flags) to the engine * contract — the BYO transformer. * * @param sharp - The sharp function you imported. * @returns The engine. */ export declare const fromSharp: (sharp: SharpFn) => MediaEngine; export {};