{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "motion",
  "title": "Motion",
  "description": "Shared spring presets that respect reduced motion.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "src/registry/kinematic/lib/motion.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { useReducedMotion, type Transition } from \"motion/react\"\n\nexport const springs = {\n  snappy: { type: \"spring\", visualDuration: 0.18, bounce: 0.1 },\n  smooth: { type: \"spring\", visualDuration: 0.28, bounce: 0.15 },\n  gentle: { type: \"spring\", visualDuration: 0.42, bounce: 0.2 },\n} as const satisfies Record<string, Transition>\n\nexport type SpringName = keyof typeof springs\n\nconst easeOut = [0.22, 1, 0.36, 1] as const\nconst easeShape = [0.4, 0, 0.2, 1] as const\n\nexport const eases = {\n  quick: { type: \"tween\", duration: 0.2, ease: easeOut },\n  base: { type: \"tween\", duration: 0.32, ease: easeOut },\n  slow: { type: \"tween\", duration: 0.45, ease: easeOut },\n  morphIn: { type: \"tween\", duration: 0.4, ease: easeShape },\n  morphOut: { type: \"tween\", duration: 0.34, ease: easeShape },\n} as const satisfies Record<string, Transition>\n\nexport type EaseName = keyof typeof eases\n\nconst instant: Transition = { duration: 0 }\n\nconst MotionSpeedContext = React.createContext(1)\n\nexport function MotionSpeedProvider({ speed, children }: { speed: number; children: React.ReactNode }) {\n  return <MotionSpeedContext.Provider value={speed}>{children}</MotionSpeedContext.Provider>\n}\n\nexport function useSpringPreset(name: SpringName): Transition {\n  const reduced = useReducedMotion()\n  const speed = React.useContext(MotionSpeedContext)\n\n  return React.useMemo(() => {\n    if (reduced) return instant\n    const preset = springs[name]\n    if (speed === 1) return preset\n    return { ...preset, visualDuration: preset.visualDuration / speed }\n  }, [reduced, speed, name])\n}\n\nexport function useEasePreset(name: EaseName): Transition {\n  const reduced = useReducedMotion()\n  const speed = React.useContext(MotionSpeedContext)\n\n  return React.useMemo(() => {\n    if (reduced) return instant\n    const preset = eases[name]\n    if (speed === 1) return preset\n    return { ...preset, duration: preset.duration / speed }\n  }, [reduced, speed, name])\n}\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:lib"
}