{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "motion-provider",
  "title": "Motion provider",
  "description": "LazyMotion in strict mode with domMax loaded async. Wrap the app in it: every animated component imports m from motion/react-m.",
  "dependencies": [
    "motion@^12.23.12"
  ],
  "files": [
    {
      "path": "registry/khaeli/ui/motion-provider.tsx",
      "content": "\"use client\"\n\nimport { LazyMotion, MotionConfig } from \"motion/react\"\nimport type { ReactNode } from \"react\"\n\n// domMax (animations, gestures, drag, layout) loads in its own chunk:\n// layoutId morphs (image-viewer) and layout glides (agent-activity) need the\n// layout feature, which domAnimation does not include.\nconst loadFeatures = () => import(\"./motion-features\").then((m) => m.default)\n\n/**\n * Every animated component in this library imports from `motion/react-m`, the\n * lightweight `m` build. Those components render but never animate unless a\n * `LazyMotion` provider has loaded the features — which leaves them stuck at\n * their `initial` state, typically `opacity: 0`, i.e. invisible.\n *\n * `strict` is deliberate: it throws if anything imports the full `motion.*`\n * components, which would silently defeat the code-splitting this exists for.\n * The features themselves load async as domMax.\n */\nexport function MotionProvider({ children }: { children: ReactNode }) {\n  return (\n    <LazyMotion features={loadFeatures} strict>\n      <MotionConfig reducedMotion=\"user\">{children}</MotionConfig>\n    </LazyMotion>\n  )\n}\n",
      "type": "registry:ui"
    },
    {
      "path": "registry/khaeli/ui/motion-features.ts",
      "content": "import { domMax } from \"motion/react\"\nexport default domMax\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.",
  "type": "registry:ui"
}