Samad14's picture
Add MSA pairwise refinement, new UI components (SmoothLoader, Reveal, CursorGlow, Parallax), rate-limit handling in AIInterpretation
ace64e6
Raw History Blame Contribute Delete
870 Bytes
'use client';
import type { ReactNode } from 'react';
import { motion, useReducedMotion } from 'framer-motion';
/**
* Entrance reveal for content below the fold. Fades + slides the child in the
* first time it scrolls into view, then stays. Respects reduced motion.
*/
export function Reveal({
children,
delay = 0,
y = 28,
once = true,
className = '',
}: {
children: ReactNode;
delay?: number;
y?: number;
once?: boolean;
className?: string;
}) {
const reduceMotion = useReducedMotion();
return (
<motion.div
className={className}
initial={reduceMotion ? { opacity: 0 } : { opacity: 0, y }}
whileInView={reduceMotion ? { opacity: 1 } : { opacity: 1, y: 0 }}
viewport={{ once, margin: '-60px' }}
transition={{ duration: 0.5, delay, ease: [0.25, 1, 0.5, 1] }}
>
{children}
</motion.div>
);
}