{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "line-reveal",
  "title": "Line Reveal",
  "description": "Word/line stagger enter — opacity + y + clip. Marketing default.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "@atroui/motion",
    "@atroui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/line-reveal.tsx",
      "content": "\"use client\"\n\nimport { motion, useReducedMotion } from \"motion/react\"\n\nimport {\n  enterTween,\n  easeOutExpo,\n  stagger as clampStagger,\n} from \"@/lib/motion\"\nimport { cn } from \"@/lib/utils\"\n\ntype LineRevealProps = {\n  children: string\n  className?: string\n  /** Split by word (default) or by line breaks. */\n  by?: \"word\" | \"line\"\n  /** Stagger between units — clamped ≤50ms for kit; pass through clamp. */\n  stagger?: number\n  once?: boolean\n  preview?: boolean\n  as?: \"p\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"span\" | \"div\"\n}\n\n/**\n * Marketing / essay enter — clipped opacity + y stagger.\n * The only recommended text enter for landing sections (no blur / scramble).\n */\nexport function LineReveal({\n  children,\n  className,\n  by = \"word\",\n  stagger: staggerProp = 0.04,\n  once = true,\n  preview = false,\n  as: Tag = \"p\",\n}: LineRevealProps) {\n  const reduce = useReducedMotion()\n  const units =\n    by === \"line\"\n      ? children.split(/\\n+/).filter(Boolean)\n      : children.split(/(\\s+)/).filter((p) => p.length > 0)\n\n  if (reduce) {\n    return <Tag className={className}>{children}</Tag>\n  }\n\n  const container = {\n    hidden: {},\n    show: {\n      transition: {\n        staggerChildren: clampStagger(staggerProp),\n      },\n    },\n  }\n\n  const item = {\n    hidden: { opacity: 0, y: 12 },\n    show: {\n      opacity: 1,\n      y: 0,\n      transition: enterTween(0.32, easeOutExpo),\n    },\n  }\n\n  return (\n    <motion.div\n      className={cn(\"overflow-hidden\", className)}\n      initial=\"hidden\"\n      {...(preview\n        ? { animate: \"show\" as const }\n        : {\n            whileInView: \"show\" as const,\n            viewport: { once, amount: 0.2 },\n          })}\n      variants={container}\n      role=\"text\"\n      aria-label={children}\n    >\n      <Tag className=\"m-0\">\n        {units.map((unit, i) => (\n          <motion.span\n            key={`${unit}-${i}`}\n            className=\"inline-block\"\n            variants={item}\n            aria-hidden\n          >\n            {unit === \" \" ? \"\\u00A0\" : unit}\n            {by === \"line\" && i < units.length - 1 ? <br /> : null}\n          </motion.span>\n        ))}\n      </Tag>\n    </motion.div>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/ui/line-reveal.tsx"
    }
  ],
  "type": "registry:ui"
}