UNPKG

@ssgoi/core

Version:

Core animation engine for SSGOI - Native app-like page transitions with spring physics

20 lines 873 B
import { StrategyContext, TRANSITION_STRATEGY, TransitionStrategy } from './transition-strategy'; import { Transition, TransitionCallback } from './types'; /** * Key type for transitions - can be string or symbol */ type TransitionKey = string | symbol; /** * Framework-agnostic transition function that can be used as a ref * Usage: <div ref={transition({ key: 'fade', in, out })} /> * * @template TAnimationValue - The type of value being animated (number | object) */ export declare function transition<TAnimationValue = number>(options: { key: TransitionKey; in?: Transition<undefined, TAnimationValue>["in"]; out?: Transition<undefined, TAnimationValue>["out"]; [TRANSITION_STRATEGY]?: (context: StrategyContext<TAnimationValue>) => TransitionStrategy<TAnimationValue>; }): TransitionCallback; export {}; //# sourceMappingURL=transition.d.ts.map