import { type AnyResolvedKeyframe, type MotionValue, type TransformOptions } from "motion-dom"; export type InputRange = number[]; /** * Branded wrapper for a getter that returns the **input range** (breakpoints) of a range→range transform. * In motion-vue this role is `MaybeRef`; in Svelte use `reactiveInputRange` so the second * argument position stays unambiguous (plain functions remain value transformers only). */ declare const ReactiveInputRangeBrand: unique symbol; export type ReactiveInputRange = { readonly [ReactiveInputRangeBrand]: true; readonly read: () => InputRange; }; /** * Mark a getter as a reactive **input range** for `useTransform` (range→range overload). * * @remarks * When breakpoints must update (layout, config, etc.), wrap them with `reactiveInputRange(() => [...])`. * Do not pass a bare function for this purpose — unmarked functions in the second position are always * interpreted as `SingleTransformer` / `MultiTransformer`. * * @param read - Getter returning a linear series of numbers (same rules as a static `InputRange`). * @returns Opaque value to pass as `inputRange` to `useTransform`. * * @public */ export declare function reactiveInputRange(read: () => InputRange): ReactiveInputRange; type SingleTransformer = (input: I) => O; type MultiTransformer = (input: I[]) => O; /** * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another. * * @remarks * * Given an input range of `[-200, -100, 100, 200]` and an output range of * `[0, 1, 1, 0]`, the returned `MotionValue` will: * * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`. * - When provided a value between `-100` and `100`, will return `1`. * - When provided a value between `100` and `200`, will return a value between `1` and `0` * * The input range must be a linear series of numbers. The output range * can be any value type supported by Motion: numbers, colors, shadows, etc. * * Every value in the output range must be of the same type and in the same format. * * ```svelte * * * * ``` * * @param inputValue - `MotionValue` * @param inputRange - A linear series of numbers (either all increasing or decreasing), or {@link reactiveInputRange} when the breakpoints should be reactive. * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`. * @param options - * * - clamp: boolean. Clamp values to within the given range. Defaults to `true` * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each. * * @returns `MotionValue` * * @public */ export declare function useTransform(value: MotionValue, inputRange: InputRange | ReactiveInputRange, outputRange: O[], options?: TransformOptions): MotionValue; export declare function useTransform(transformer: () => O): MotionValue; export declare function useTransform(input: MotionValue, transformer: SingleTransformer): MotionValue; export declare function useTransform(input: MotionValue[] | MotionValue[] | MotionValue[], transformer: MultiTransformer): MotionValue; /** * Create multiple `MotionValue`s that transform the output of a single `MotionValue`. * * @remarks * * Allows transforming a single input into multiple outputs, useful for coordinated animations. * * ```svelte * * * * ``` * * @param value - `MotionValue` to transform * @param inputRange - A linear series of numbers (either all increasing or decreasing), or {@link reactiveInputRange} when reactive. * @param outputRange - An object where each key maps to an output range array * @param options - Transform options (clamp, ease) * * @returns Object containing `MotionValue` for each output key * * @public */ export declare function useTransform(value: MotionValue, inputRange: InputRange | ReactiveInputRange, outputRange: { [K in keyof O]: O[K][]; }, options?: TransformOptions): { [K in keyof O]: MotionValue; }; export {};