@sc4rfurryx/proteusjs
Version:
The Modern Web Development Framework for Accessible, Responsive, and High-Performance Applications. Intelligent container queries, fluid typography, WCAG compliance, and performance optimization.
44 lines (42 loc) • 1.31 kB
TypeScript
/**
* @sc4rfurryx/proteusjs/scroll
* Scroll-driven animations with CSS Scroll-Linked Animations
*
* @version 2.0.0
* @author sc4rfurry
* @license MIT
*/
interface ScrollAnimateOptions {
keyframes: Keyframe[];
range?: [string, string];
timeline?: {
axis?: 'block' | 'inline';
start?: string;
end?: string;
};
fallback?: 'io' | false;
}
/**
* Zero-boilerplate setup for CSS Scroll-Linked Animations with fallbacks
*/
declare function scrollAnimate(target: Element | string, opts: ScrollAnimateOptions): void;
/**
* Create a scroll-triggered animation that plays once when element enters viewport
*/
declare function scrollTrigger(target: Element | string, keyframes: Keyframe[], options?: KeyframeAnimationOptions): void;
/**
* Parallax effect using scroll-driven animations
*/
declare function parallax(target: Element | string, speed?: number): void;
/**
* Cleanup function to remove scroll animations
*/
declare function cleanup(target: Element | string): void;
declare const _default: {
scrollAnimate: typeof scrollAnimate;
scrollTrigger: typeof scrollTrigger;
parallax: typeof parallax;
cleanup: typeof cleanup;
};
export { cleanup, _default as default, parallax, scrollAnimate, scrollTrigger };
export type { ScrollAnimateOptions };