export declare const GLASS_LENS_ID = "cds-glass-lens"; /** The material's backdrop-filter while a surface's sized def is not ready * yet (first frame before layout): the lens's own blur + saturation grade, * so the swap to the sized def only adds the rim bend. */ export declare const GLASS_LENS_PENDING_FILTER = "blur(6px) saturate(190%)"; /** The displacement-map image for a w x h surface, as a data URI. Exported for * tests, which assert the band geometry instead of eyeballing pixels. */ export declare function lensMapDataUri(w: number, h: number, rimX: number, rimY: number, rx: number, ry: number): string; /** One filter primitive: its tag and its attributes. */ export interface LensNode { tag: string; attrs: Record; } /** A whole `` def: the filter's own attributes plus its primitives. */ export interface LensFilterSpec { attrs: Record; children: LensNode[]; } /** The shared CSS-token def's spec: the blur + saturation grade with NO * displacement (see the header for why it cannot carry one). Pure. */ export declare function sharedLensFilterSpec(id: string): LensFilterSpec; /** The full sized-filter spec. Pure and exported for tests. */ export declare function sizedLensFilterSpec(id: string, w: number, h: number): LensFilterSpec; /** True when the shared (CSS-token) lens def is present in this document. */ export declare function hasGlassLens(): boolean; /** Inject the shared `#cds-glass-lens` def the CSS token layer points at: * blur + saturation only (see the header for why it carries no displacement). * Idempotent; returns whether the def is now available. */ export declare function ensureGlassLens(): boolean; /** Acquire (create if absent) the sized lens def for a w x h surface. Returns * its key and url, or null when no document is available. Pair every acquire * with a release. */ export declare function acquireSizedGlassLens(w: number, h: number): { key: string; url: string; } | null; /** Release a def acquired with acquireSizedGlassLens; the def is removed from * the document when its last holder releases it. */ export declare function releaseSizedGlassLens(key: string): void; /** Test hook: the number of live sized defs. */ export declare function sizedGlassLensCount(): number; /** * Whether this engine can RENDER an SVG-reference backdrop-filter, decided from * the user agent string and a `CSS.supports` probe. Only Chromium renders SVG * filters in `backdrop-filter`; WebKit and Gecko parse-accept the value but * paint no filter at all, which would strip the frost instead of upgrading it, * and with a single inline style value there is no CSS-cascade fallback to * catch that. Render support is therefore not feature-detectable, and the gate * allows the known-good family: every Chromium UA carries "Chrome/" (Edge, * Brave, Arc, Opera, HeadlessChrome included), while iOS Chrome, which is * WebKit underneath, identifies as "CriOS/" and correctly stays on the frost. * The `CSS.supports` probe is the future-proof floor for engines that reject * the value outright. Pure so tests can exercise the truth table directly. */ export declare function lensBackdropSupported(userAgent: string, supports: (property: string, value: string) => boolean): boolean; /** * The lens gate for a glass surface: true only where a document exists and the * engine can render SVG-reference backdrop-filters (Chromium web). The lens * layer itself acquires its sized def on layout; until then it renders the * pending blur + saturate grade, never a reference to a missing filter, which * would resolve to NO filter at all. */ export declare function useGlassLens(glass: boolean): boolean; /** * The sized-def lifecycle for one lens layer: feed it the layer's layout size, * get the backdrop-filter value to render. Acquires the def for the current * size, swaps on resize, releases on unmount, and returns the pending grade * until the def exists. */ export declare function useSizedGlassLens(width: number, height: number): string; //# sourceMappingURL=glass-lens.d.ts.map