aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
52 lines • 2.5 kB
TypeScript
import { ChartDataPoint, ChartSeries, ChartPhysicsConfig } from '../types';
interface SpringConfig {
stiffness: number;
damping: number;
mass: number;
precision: number;
}
export declare function usePhysicsAnimation(config?: ChartPhysicsConfig, enabled?: boolean): {
startAnimation: (key: string, from: number, to: number, callback?: (value: number) => void) => void;
stopAnimation: (key: string) => void;
updateTarget: (key: string, target: number) => void;
getCurrentValue: (key: string) => number;
isAnimating: (key: string) => boolean;
springConfig: SpringConfig;
value: number;
applyPopIn: () => void;
};
export declare function useDataPointAnimation(dataPoints: ChartDataPoint[], physicsConfig?: ChartPhysicsConfig): {
startAnimation: (key: string, from: number, to: number, callback?: (value: number) => void) => void;
stopAnimation: (key: string) => void;
updateTarget: (key: string, target: number) => void;
getCurrentValue: (key: string) => number;
isAnimating: (key: string) => boolean;
springConfig: SpringConfig;
value: number;
applyPopIn: () => void;
animateDataPoints: (targetPoints: ChartDataPoint[], duration?: number, onUpdate?: (points: ChartDataPoint[]) => void) => void;
};
export declare function useSeriesAnimation(series: ChartSeries[], physicsConfig?: ChartPhysicsConfig): {
startAnimation: (key: string, from: number, to: number, callback?: (value: number) => void) => void;
stopAnimation: (key: string) => void;
updateTarget: (key: string, target: number) => void;
getCurrentValue: (key: string) => number;
isAnimating: (key: string) => boolean;
springConfig: SpringConfig;
value: number;
applyPopIn: () => void;
animateSeries: (targetSeries: ChartSeries[], staggerDelay?: number, onUpdate?: (series: ChartSeries[]) => void) => void;
};
export declare function useChartTransition(physicsConfig?: ChartPhysicsConfig): {
startAnimation: (key: string, from: number, to: number, callback?: (value: number) => void) => void;
stopAnimation: (key: string) => void;
updateTarget: (key: string, target: number) => void;
getCurrentValue: (key: string) => number;
isAnimating: (key: string) => boolean;
springConfig: SpringConfig;
value: number;
applyPopIn: () => void;
transitionTo: (fromState: any, toState: any, onTransition?: (currentState: any) => void) => void;
};
export {};
//# sourceMappingURL=usePhysicsAnimation.d.ts.map