/** * Animation system type definitions for PixelMakers Elements */ /** * Animatable properties (e.g., CSS properties, transforms) */ export type AnimationProperties = Record; /** * Animation easing type * - String (e.g., 'ease-in-out', 'power2.out') * - Or a custom cubic-bezier or function */ export type AnimationEasing = string | ((t: number) => number); /** * Options for an animation * @property duration - Animation duration in seconds * @property delay - Animation delay in seconds * @property easing - Easing function or string * @property onComplete - Callback when animation finishes * @property onUpdate - Callback on each animation frame */ export interface AnimationOptions { duration?: number; delay?: number; easing?: AnimationEasing; onComplete?: () => void; onUpdate?: (progress: number) => void; } /** * Animation interface for both GSAP and vanilla adapters */ export interface Animation { /** Start the animation */ play(): Promise; /** Stop/cancel the animation */ stop(): void; } /** * Timeline interface for sequencing multiple animations */ export interface AnimationTimeline { /** Add an animation to the timeline */ add(animation: Animation, position?: number): this; /** Start the timeline */ play(): Promise; /** Stop/cancel the timeline */ stop(): void; }