aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
72 lines • 2.02 kB
TypeScript
/**
* Animation Orchestration Hook
* Provides synchronized multi-element animation control with sequencing and choreography
*/
/**
* Public animation stage states
*/
export declare enum PublicAnimationStage {
IDLE = "idle",
PREPARING = "preparing",
ENTERING = "entering",
ACTIVE = "active",
EXITING = "exiting",
COMPLETED = "completed",
PAUSED = "paused",
ERROR = "error"
}
/**
* Animation element configuration
*/
export interface AnimationElement {
id: string;
delay?: number;
duration?: number;
easing?: string;
properties?: Record<string, any>;
onStart?: () => void;
onComplete?: () => void;
}
/**
* Orchestration sequence configuration
*/
export interface OrchestrationSequence {
elements: AnimationElement[];
mode?: 'parallel' | 'sequential' | 'stagger';
staggerDelay?: number;
loop?: boolean | number;
onSequenceStart?: () => void;
onSequenceComplete?: () => void;
onStageChange?: (stage: PublicAnimationStage) => void;
}
/**
* Hook for orchestrating complex animations
*/
export declare const useOrchestration: (sequence: OrchestrationSequence) => {
stage: PublicAnimationStage;
progress: number;
currentElementId: string | null;
start: () => Promise<void>;
pause: () => void;
resume: () => void;
stop: () => void;
reset: () => void;
seekToElement: (elementId: string) => void;
getState: () => {
stage: PublicAnimationStage;
currentElementIndex: number;
currentElementId: string | null;
iteration: number;
progress: number;
activeAnimations: string[];
elapsedTime: number;
};
isAnimating: boolean;
isPaused: boolean;
isCompleted: boolean;
};
/**
* Higher-order function to create orchestration sequences
*/
export declare const createOrchestrationSequence: (elements: AnimationElement[], options?: Partial<OrchestrationSequence>) => OrchestrationSequence;
//# sourceMappingURL=useOrchestration.d.ts.map