UNPKG

motion-v

Version:

<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>

43 lines (42 loc) 1.92 kB
import { AnimateUpdates } from './types'; import { Feature } from '../feature'; import { MotionState } from '../../state'; import { $Transition, AnimationFactory, Options } from '../../types'; declare const STATE_TYPES: readonly ["initial", "animate", "whileInView", "whileHover", "whilePress", "whileDrag", "whileFocus", "exit"]; export type StateType = typeof STATE_TYPES[number]; export declare class AnimationFeature extends Feature { unmountControls?: () => void; constructor(state: MotionState); updateAnimationControlsSubscription(): void; animateUpdates: AnimateUpdates; executeAnimations({ factories, getChildAnimations, transition, controlActiveState, isExit, }: { factories: AnimationFactory[]; getChildAnimations: () => Promise<any>; transition: $Transition | undefined; controlActiveState: Partial<Record<string, boolean>> | undefined; isExit: boolean; }): Promise<any> | (() => Promise<any>); /** * Setup child animations */ setupChildAnimations(transition: $Transition | undefined, controlActiveState: Partial<Record<string, boolean>> | undefined): { getChildAnimations: () => Promise<void>; } | { getChildAnimations: () => Promise<any[]>; }; createAnimationFactories(prevTarget: Record<string, any>, animationOptions: $Transition, controlDelay: number): AnimationFactory[]; resolveStateAnimation({ controlActiveState, directAnimate, directTransition, }: { controlActiveState: Partial<Record<string, boolean>> | undefined; directAnimate: Options['animate']; directTransition: Options['transition'] | undefined; }): import('motion-dom').Transition<any> & { layout?: $Transition; }; /** * Subscribe any provided AnimationControls to the component's VisualElement */ mount(): void; update(): void; unmount(): void; } export {};