{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitive-scroll-reveal",
  "type": "registry:ui",
  "title": "Scroll reveal",
  "description": "Reveal content once as it enters the viewport with a reduced-motion fallback.",
  "dependencies": [
    "motion"
  ],
  "categories": [
    "primitive",
    "scroll"
  ],
  "docs": "https://motion-lexicon.pages.dev/en/primitives/scroll-reveal/",
  "files": [
    {
      "path": "src/registry/primitives/scroll-reveal.tsx",
      "type": "registry:ui",
      "target": "components/motion-lexicon/primitives/scroll-reveal.tsx",
      "content": "\"use client\";\n\nimport { motion, useReducedMotion, type Transition } from \"motion/react\";\nimport type { ReactNode } from \"react\";\n\nconst EASE_OUT = [0.23, 1, 0.32, 1] as const;\n\nexport type ScrollRevealPrimitiveProps = {\n  children: ReactNode;\n  threshold?: number;\n  distance?: number;\n  duration?: number;\n  easing?: Transition[\"ease\"];\n  once?: boolean;\n  className?: string;\n};\n\nexport function ScrollRevealPrimitive({\n  children,\n  threshold = 0.2,\n  distance = 28,\n  duration = 0.26,\n  easing = EASE_OUT,\n  once = true,\n  className,\n}: ScrollRevealPrimitiveProps) {\n  const reduceMotion = useReducedMotion();\n\n  return (\n    <motion.div\n      className={className}\n      initial={reduceMotion ? { opacity: 0 } : { opacity: 0, transform: `translate3d(0, ${distance}px, 0)` }}\n      whileInView={{ opacity: 1, transform: \"translate3d(0, 0, 0)\" }}\n      viewport={{ once, amount: Math.max(0, Math.min(1, threshold)) }}\n      transition={reduceMotion ? { duration: 0.12 } : { duration, ease: easing }}\n    >\n      {children}\n    </motion.div>\n  );\n}\n"
    }
  ]
}
