aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
69 lines • 1.95 kB
TypeScript
import React from 'react';
export interface PhysicsInteractionOptions {
scale?: number;
duration?: number;
easing?: string;
damping?: number;
stiffness?: number;
mass?: number;
enableHover?: boolean;
enableClick?: boolean;
enableDrag?: boolean;
threshold?: number;
onInteractionStart?: () => void;
onInteractionEnd?: () => void;
}
export interface PhysicsState {
isInteracting: boolean;
velocity: {
x: number;
y: number;
};
position: {
x: number;
y: number;
};
scale: number;
rotation: number;
}
/**
* Enhanced physics interaction hook with spring animations and accessibility
*/
export declare function usePhysicsInteraction(options?: PhysicsInteractionOptions): {
ref: React.RefObject<HTMLElement>;
physicsState: PhysicsState;
isInteracting: boolean;
startInteraction: () => void;
endInteraction: () => void;
};
/**
* Simplified physics interaction hook for basic hover effects
*/
export declare function useSimplePhysicsHover(scale?: number, duration?: number): {
ref: React.RefObject<HTMLElement>;
physicsState: PhysicsState;
isInteracting: boolean;
startInteraction: () => void;
endInteraction: () => void;
};
/**
* Physics interaction hook optimized for buttons
*/
export declare function usePhysicsButton(options?: Partial<PhysicsInteractionOptions>): {
ref: React.RefObject<HTMLElement>;
physicsState: PhysicsState;
isInteracting: boolean;
startInteraction: () => void;
endInteraction: () => void;
};
/**
* Physics interaction hook for draggable elements
*/
export declare function usePhysicsDrag(options?: Partial<PhysicsInteractionOptions>): {
ref: React.RefObject<HTMLElement>;
physicsState: PhysicsState;
isInteracting: boolean;
startInteraction: () => void;
endInteraction: () => void;
};
//# sourceMappingURL=usePhysicsInteraction.d.ts.map