UNPKG

resig.js

Version:

Universal reactive signal library with complete platform features: signals, animations, CRDTs, scheduling, DOM integration. Works identically across React, SolidJS, Svelte, Vue, and Qwik.

53 lines (52 loc) 3.31 kB
/** * Animation System - Main Export * Categorical Animation Engine for Signal-Σ */ import { Animation, EasingFunction, Interpolator } from './core'; export { Animation, AnimationState, EasingFunction, Interpolator, animation, easings, interpolators, } from './core'; export { ParallelAnimation, SequentialAnimation, Timeline, parallel, sequence, timeline, stagger, repeat, } from './composer'; export { AnimationManager, ScheduledAnimation, getGlobalAnimationManager, scheduledAnimation, animate, scheduledTimeline, getAnimationStats, debugAnimations, profileAnimations, } from './scheduler'; export { AnimatedSignal, SpringSignal, SpringConfig, animatedSignal, springSignal, animatedNumber, springNumber, animatedColor, animatedArray, useAnimatedValue, sequence as sequenceSignal, loop, gestureSignal, } from './signals'; import { PathPoint, PathAnimation } from './advanced'; export { CSSAnimationConfig, TransformConfig, AnimatedElement, animatedElement, fadeIn, fadeOut, slideIn, slideOut, scale, rotate, shake, bounce, animateElements, animateOnScroll, } from './dom'; export { Keyframe, KeyframeAnimation, PathPoint, PathAnimation, PhysicsSpring, GestureRecognizer, keyframeAnimation, pathAnimation, physicsSpring, gestureRecognizer, presets, timelineBuilder, } from './advanced'; export { animation as anim } from './core'; export { animatedSignal as animated } from './signals'; export { springSignal as spring } from './signals'; export { timeline as tl } from './composer'; export { animatedElement as element } from './dom'; export type AnimationTarget<T> = T | (() => T) | { value: T; }; export declare const resolveTarget: <T>(target: AnimationTarget<T>) => T; export interface AnimationBuilder<T> { readonly from: (value: T) => AnimationBuilder<T>; readonly to: (value: T) => AnimationBuilder<T>; readonly duration: (ms: number) => AnimationBuilder<T>; readonly easing: (fn: EasingFunction) => AnimationBuilder<T>; readonly interpolator: (fn: Interpolator<T>) => AnimationBuilder<T>; readonly build: () => Animation<T>; readonly start: () => Promise<T>; } export declare const animationBuilder: <T>() => AnimationBuilder<T>; export declare const fadeInOut: (duration?: number) => Promise<void>; export declare const slideInOut: (element: HTMLElement, direction: 'left' | 'right' | 'up' | 'down', duration?: number, delay?: number) => Promise<void>; export declare const morphPath: (from: PathPoint[], to: PathPoint[], duration?: number) => PathAnimation; export interface AnimationStateMachine { readonly currentState: string; readonly states: Record<string, Animation<any>>; readonly transitions: Record<string, string[]>; readonly transition: (to: string) => Promise<void>; readonly addState: (name: string, animation: Animation<any>) => void; readonly addTransition: (from: string, to: string) => void; } export declare const animationStateMachine: (initialState: string) => AnimationStateMachine; export interface AnimationPerformanceMonitor { readonly frameRate: number; readonly droppedFrames: number; readonly averageFrameTime: number; readonly start: () => void; readonly stop: () => void; readonly reset: () => void; } export declare const createPerformanceMonitor: () => AnimationPerformanceMonitor;