import type { AnimateKeyframes, AnimateValue } from './animate'; import type { AnimatableElement } from './resolve-target'; /** * A target resolved against the current value. The numeric channels accept the * precise literal form (unitless); a registry property accepts the same plus a * unit (e.g. '+=40px'), which type-checks as a plain string and is detected at * runtime. '*=' scales. */ export type RelativeValue = `+=${number}` | `-=${number}` | `*=${number}`; /** A per-target value: receives the item's index, its element, and the set count. */ export type ValueFn = (index: number, element: AnimatableElement, total: number) => V; /** A single magnitude read from a registry property, plus how to re-emit it preserving the unit/template. */ export interface Magnitude { readonly value: number; reformat(next: number): string; } export interface ResolveContext { readonly index: number; readonly element: AnimatableElement; readonly total: number; /** Current value of a numeric channel (caller bakes in the INITIAL fallback); undefined if `key` is not a numeric channel. */ readNumeric(key: string): number | undefined; /** Current single magnitude of a registry property + a re-emitter; undefined if not resolvable or multi-channel. */ readMagnitude(key: string): Magnitude | undefined; } /** True if a raw value needs per-element resolution (a function, or a relative string incl. inside keyframes). */ export declare const needsResolve: (raw: unknown) => boolean; /** A value before per-target resolution: an absolute value/keyframes, a relative string, or a function returning any of those. */ export type ResolvableValue = AnimateValue | AnimateKeyframes | RelativeValue | ValueFn; /** * Resolve a possibly function/relative/keyframe value to an absolute value or * keyframe array for one element. A function is evaluated first (it may return a * relative string or a keyframe array, which re-enter resolution); relatives read * the LIVE cached value through `ctx`, so a re-fire retargets from the in-flight * position. Pure; never throws. */ export declare function resolveValue(key: string, raw: ResolvableValue, ctx: ResolveContext): AnimateValue | AnimateKeyframes; //# sourceMappingURL=resolve-value.d.ts.map