{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "grow-from-origin",
  "title": "Grow from Origin",
  "description": "Fade + scale (~0.85 → 1) anchored to a transform-origin corner — the dropdown/tooltip/popover entrance.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://motion.asmitsah.dev/r/provider.json"
  ],
  "files": [
    {
      "path": "components/motion/grow-from-origin.tsx",
      "content": "\"use client\";\n\nimport type { TargetAndTransition, Variants } from \"motion/react\";\nimport * as m from \"motion/react-m\";\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { growVariants, type Origin, revealTransition, viewportOnce } from \"@/lib/motion\";\n\ntype GrowFromOriginProps = {\n  children: ReactNode;\n  className?: string;\n  style?: CSSProperties;\n  delay?: number;\n  /** transform-origin corner/center the element grows from. */\n  origin?: Origin;\n  trigger?: \"inView\" | \"mount\";\n};\n\n/**\n * Grow from origin — fade + scale ~0.85 → 1, anchored to a transform-origin\n * corner/center. The dropdown/tooltip/popover entrance. Mounts by default\n * (menus don't wait on a scroll trigger); pass trigger=\"inView\" to scope it\n * to viewport entry instead. Transform-only — the reduced-motion provider\n * strips it for free, no manual guard needed.\n */\nexport function GrowFromOrigin({\n  children,\n  className,\n  style,\n  delay = 0,\n  origin = \"top\",\n  trigger = \"mount\",\n}: GrowFromOriginProps) {\n  const base = growVariants(origin);\n  // growVariants bakes revealTransition into `animate` itself — a delay has\n  // to be merged into that same target, since a component-level `transition`\n  // prop only applies as a fallback when the variant has none of its own.\n  const variants: Variants = {\n    ...base,\n    animate: {\n      ...(base.animate as TargetAndTransition),\n      transition: { ...revealTransition, delay },\n    },\n  };\n  const play =\n    trigger === \"mount\"\n      ? ({ animate: \"animate\" } as const)\n      : ({ whileInView: \"animate\", viewport: viewportOnce } as const);\n\n  return (\n    <m.div className={className} style={style} variants={variants} initial=\"initial\" {...play}>\n      {children}\n    </m.div>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/motion/grow-from-origin.tsx"
    }
  ],
  "type": "registry:component"
}