import type { Scheduler } from '../scheduler/scheduler'; import type { Animatable } from '../value/animatable'; /** A live scalar slot: a bare Animatable, or anything exposing one (e.g. follow()). */ export type TemplateSource = Animatable | { readonly value: Animatable; }; /** A template interpolation: a live source, or a constant folded into the surrounding literal. */ export type TemplateSlot = TemplateSource | number | string; /** The tag's return: the live sources in slot order plus a pure string-splice. Owns no physics, DOM, or subscription. */ export interface StyleTemplate { readonly sources: readonly Animatable[]; format(parts: readonly string[]): string; } export interface BindTemplateOptions { scheduler?: Scheduler; /** Decimals kept per numeric slot in the tagged form (default 4, matching the complex value type). */ precision?: number; } /** The function form spreads RAW numbers (the author rounds), so `precision` does not apply there. */ type FunctionFormOptions = Pick; /** Map a sources tuple to a same-length tuple of plain numbers, so the function formatter is arity- and order-safe. */ type NumbersOf = { -readonly [K in keyof S]: number; }; /** * Tagged template: compose live scalar sources (an `animatable`, a `follow()`, a * scroll/pointer spring) and constants into one reactive CSS string. The literal * chunks carry the units and CSS punctuation; the interpolations are the live * values. Pure and SSR-inert - it builds in-memory data, touches no DOM, and can * be bound later via bindTemplate(). */ export declare function template(strings: TemplateStringsArray, ...slots: readonly TemplateSlot[]): StyleTemplate; /** * Bind a composed CSS string to one element property, driven each frame by N live * sources. Writes to ANY property including a `--custom` one, through the same * render-phase binder as animate(): one flush per frame, byte-deduped (idle-quiet * at rest), synchronous at bind time. Returns a disposer that tears down every * source subscription and any pending write - drop it into `region.add(...)`. * A read-only projection: it never disposes its sources (the caller owns those). * * Tag form (headline): `bindTemplate(el, 'filter', template`blur(${b}px)`)`. * Function form (escape hatch): `bindTemplate(el, 'transform', [x, y], (px, py) => ...)`. */ export declare function bindTemplate(element: HTMLElement, property: string, styleTemplate: StyleTemplate, options?: BindTemplateOptions): () => void; export declare function bindTemplate(element: HTMLElement, property: string, sources: S, format: (...values: NumbersOf) => string, options?: FunctionFormOptions): () => void; export {}; //# sourceMappingURL=bind-template.d.ts.map