{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "page-decode-next",
  "title": "Page Decode for Next.js",
  "author": "zyx1121 (https://github.com/zyx1121)",
  "description": "PageDecode on the Next.js App Router: it follows the router's path and leaves through router.push, so links stay client side.",
  "dependencies": [
    "next"
  ],
  "registryDependencies": [
    "https://ui.zyx.tw/r/page-decode.json"
  ],
  "files": [
    {
      "path": "registry/zyx/components/page-decode-next.tsx",
      "content": "\"use client\"\n\nimport { usePathname, useRouter } from \"next/navigation\"\n\nimport { PageDecode } from \"./page-decode\"\n\n/**\n * PageDecode on the Next.js App Router: the decoder follows the router's\n * path, and a link it holds for the scramble out leaves through router.push,\n * so navigation stays client side. Mount it once in the root layout.\n */\nexport function NextPageDecode() {\n  const pathname = usePathname()\n  const router = useRouter()\n  return (\n    <PageDecode pathname={pathname} navigate={(href) => router.push(href)} />\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "useWhen": "Mounting the page motion once in a Next.js root layout.",
    "notFor": "Vite or other React apps; mount page-decode there.",
    "related": [
      "page-decode",
      "corners"
    ]
  },
  "docs": "Use when: Mounting the page motion once in a Next.js root layout.\nNot for: Vite or other React apps; mount page-decode there.\nGuide: https://ui.zyx.tw/page-decode-next.md",
  "categories": [
    "layout",
    "motion",
    "nextjs"
  ],
  "type": "registry:component"
}