/** * `` is a declarative wrapper around `play()`. It renders a * host element (configurable via the `as` prop) and drives animation * via a template ref. * * * * Variants. Pass a `variants` map of named `MotionValues` and use a * string key for `initial`, `animate`, `exit`, `whileHover`, or * `whileTap` to drive a declarative state machine: * * const v = { closed: { opacity: 0 }, open: { opacity: 1 } } * * * Parent-child propagation. A `` whose `animate` is a key * provides that key (via `inject`) to descendants that have their own * `variants` but no explicit `animate`. The descendants resolve the * inherited key against their own map. * * whileHover / whileTap. Resolved values from these props temporarily * override `animate` while the pointer is over (hover) or pressed * (tap). Tap takes precedence over hover. * * The resolved `initial` object is applied as inline styles on first * render so the element paints at the starting state before any animation * frame runs. */ import type { EasingFn, NormalizedVelocity, PlayOpts } from "@kinem/core"; import { type PropType } from "vue"; export type MotionValues = Readonly>; export type Variants = Readonly>; /** * What `initial`, `animate`, `exit`, `whileHover`, and `whileTap` accept: * inline values, a single variant key, or an array of keys merged in * order (later wins). String / array forms require a `variants` map; * otherwise they resolve to `undefined` and the prop is ignored. */ export type VariantTarget = MotionValues | string | readonly string[]; export interface MotionTransition { /** * "tween" (default) plays a fixed-duration easing; "spring" plays a * physical spring. When omitted, the presence of any spring field * implies "spring". */ readonly type?: "tween" | "spring"; readonly duration?: number; readonly easing?: EasingFn; readonly stiffness?: number; readonly damping?: number; readonly mass?: number; /** * Spring: initial velocity, in normalized [0, 1]/sec units of travel. * Mint with `normalizedVelocity()` or `velocityFromSpan()` from * `@kinem/core`. */ readonly velocity?: NormalizedVelocity; readonly backend?: PlayOpts["backend"]; /** * Per-element delay in ms before the tween starts. Composes with any * stagger delay inherited from a parent. */ readonly delay?: number; /** * When set on a parent ``, descendants that inherit the * parent's animate key are staggered by `staggerChildren` ms in * mount order: the first child has zero delay, the second * `staggerChildren` ms, the third `2 * staggerChildren`, and so on. * Applies only to animate-key-driven changes; whileHover and * whileTap never stagger. */ readonly staggerChildren?: number; } export declare const Motion: import("vue").DefineComponent; default: undefined; }; initial: { type: PropType; default: undefined; }; animate: { type: PropType; default: undefined; }; exit: { type: PropType; default: undefined; }; whileHover: { type: PropType; default: undefined; }; whileTap: { type: PropType; default: undefined; }; transition: { type: PropType; default: undefined; }; }>, () => import("vue").VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly; default: undefined; }; initial: { type: PropType; default: undefined; }; animate: { type: PropType; default: undefined; }; exit: { type: PropType; default: undefined; }; whileHover: { type: PropType; default: undefined; }; whileTap: { type: PropType; default: undefined; }; transition: { type: PropType; default: undefined; }; }>> & Readonly<{}>, { as: string; variants: Readonly>>>; initial: VariantTarget; animate: VariantTarget; exit: VariantTarget; whileHover: VariantTarget; whileTap: VariantTarget; transition: MotionTransition; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; //# sourceMappingURL=Motion.d.ts.map