{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitive-reveal",
  "type": "registry:ui",
  "title": "Reveal",
  "description": "Reveal content with clipping and slight travel for headings, media, and sections.",
  "dependencies": [
    "motion"
  ],
  "categories": [
    "primitive",
    "entrances"
  ],
  "docs": "https://motion-lexicon.pages.dev/en/primitives/reveal/",
  "files": [
    {
      "path": "src/registry/primitives/reveal.tsx",
      "type": "registry:ui",
      "target": "components/motion-lexicon/primitives/reveal.tsx",
      "content": "\"use client\";\n\nimport { AnimatePresence, 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 RevealMode = \"clip\" | \"mask\" | \"blur\";\n\nexport type RevealPrimitiveProps = {\n  present: boolean;\n  children: ReactNode;\n  mode?: RevealMode;\n  distance?: number;\n  duration?: number;\n  easing?: Transition[\"ease\"];\n  delay?: number;\n  className?: string;\n};\n\nexport function RevealPrimitive({\n  present,\n  children,\n  mode = \"clip\",\n  distance = 20,\n  duration = 0.26,\n  easing = EASE_OUT,\n  delay = 0,\n  className,\n}: RevealPrimitiveProps) {\n  const reduceMotion = useReducedMotion();\n  const initial = reduceMotion\n    ? { opacity: 0 }\n    : {\n        opacity: 0,\n        transform: `translate3d(0, ${distance}px, 0)`,\n        clipPath: mode === \"clip\" ? \"inset(0 0 100% 0 round 12px)\" : \"inset(0 0 0% 0 round 12px)\",\n        filter: mode === \"blur\" ? \"blur(10px)\" : \"blur(0px)\",\n        maskPosition: mode === \"mask\" ? \"100% 0\" : \"0% 0\",\n      };\n\n  return (\n    <AnimatePresence initial={false}>\n      {present ? (\n        <motion.div\n          className={className}\n          style={mode === \"mask\" ? {\n            maskImage: \"linear-gradient(90deg, transparent, #000 36%, #000)\",\n            maskSize: \"220% 100%\",\n          } : undefined}\n          initial={initial}\n          animate={{\n            opacity: 1,\n            transform: \"translate3d(0, 0, 0)\",\n            clipPath: \"inset(0 0 0% 0 round 12px)\",\n            filter: \"blur(0px)\",\n            maskPosition: \"0% 0\",\n          }}\n          exit={{ opacity: 0 }}\n          transition={reduceMotion ? { duration: 0.12 } : { duration, delay, ease: easing }}\n        >\n          {children}\n        </motion.div>\n      ) : null}\n    </AnimatePresence>\n  );\n}\n"
    }
  ]
}
