{"_id":"@asyncflowstate/next","_rev":"5-4f7fdd8480e16802519c18f0959297b6","name":"@asyncflowstate/next","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.1":{"name":"@asyncflowstate/next","version":"1.0.1","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/next@1.0.1","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"0c594be8cf224df09726fbbb3cb32db581b9a4e9","tarball":"https://registry.npmjs.org/@asyncflowstate/next/-/next-1.0.1.tgz","fileCount":9,"integrity":"sha512-XF+kvWg8jIpXaLSk2yvvivnSymeEtGJ1thYzQDRZOtDJ6ha8EGoTlc69Wo9rolQTeBfhBNCu9OxIn0weo/PtKw==","signatures":[{"sig":"MEUCIB2Zx30FYPBkE0BP1yqUHjHoGhDdvdM5S3Z8rRMXBwYSAiEA402aozKzpfZ921MV8CwZLY+xLtPioSqq/ijuYwFfxQE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107621},"main":"./dist/index.js","_from":"file:asyncflowstate-next-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"private":false,"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"C:\\Users\\pc\\AppData\\Local\\Temp\\d97d2f551309c37cd0c43a6b5d24ccf0\\asyncflowstate-next-1.0.1.tgz","_integrity":"sha512-XF+kvWg8jIpXaLSk2yvvivnSymeEtGJ1thYzQDRZOtDJ6ha8EGoTlc69Wo9rolQTeBfhBNCu9OxIn0weo/PtKw==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/next"},"_npmVersion":"11.4.2","description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","dependencies":{"@asyncflowstate/core":"1.0.1","@asyncflowstate/react":"1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"next":"^15.1.6","react":"^18.3.1","react-dom":"^18.3.1","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"peerDependencies":{"next":"^13.4.0 || ^14.0.0 || ^15.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_1.0.1_1774805191198_0.6874494049050679","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@asyncflowstate/next","version":"2.0.0","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/next@2.0.0","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"841d943e6d906f840f7d12d18abce8bf173ed2f1","tarball":"https://registry.npmjs.org/@asyncflowstate/next/-/next-2.0.0.tgz","fileCount":9,"integrity":"sha512-dSYbAfMUtgNwCS/h8gCHGuwnWxLcGaRFo+4Vv8/Ke4DoAP2OGHC0W5on9NwLvVjLThpvDnnzeOXRvt4zKx32fw==","signatures":[{"sig":"MEUCIHqTereMh7rmCmguQnDMquFSpObmJ62Tw/YgGqpKhsndAiEAlvS/VWg2L3g3XCI6ysZTA5ics+zuDd+1FK/RilOJED8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109079},"main":"./dist/index.js","_from":"file:asyncflowstate-next-2.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"private":false,"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/8640f4792cf59d53f0605906a9f6d904/asyncflowstate-next-2.0.0.tgz","_integrity":"sha512-dSYbAfMUtgNwCS/h8gCHGuwnWxLcGaRFo+4Vv8/Ke4DoAP2OGHC0W5on9NwLvVjLThpvDnnzeOXRvt4zKx32fw==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/next"},"_npmVersion":"10.8.2","description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.0","@asyncflowstate/react":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"next":"^15.1.6","react":"^18.3.1","react-dom":"^18.3.1","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"peerDependencies":{"next":"^13.4.0 || ^14.0.0 || ^15.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_2.0.0_1775766037977_0.5710331939830806","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@asyncflowstate/next","version":"2.0.1","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/next@2.0.1","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://asyncflowstate-js.pages.dev/frameworks/next","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"ec7663a13e94e17396f69deddcced6ba7b8fe8cf","tarball":"https://registry.npmjs.org/@asyncflowstate/next/-/next-2.0.1.tgz","fileCount":9,"integrity":"sha512-ZnuCTSObbZe72oSeYE4pCYVVDjPCy/ee5asUo+7O7TLe759JdqMlUiHZGDrZGGk0e7yBWgIiUzfqME9fAoq/9w==","signatures":[{"sig":"MEUCIFOi79lgyDhKslM2/SgyMDYwgURAo2Kor7XWgtEzdpzlAiEA89S3DWH9YO/eSrFlBAUovXEn/4DZCUYvBPom6/6wSyo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109239},"main":"./dist/index.js","_from":"file:asyncflowstate-next-2.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"private":false,"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/64bb9bcc8c9b0595f97e7d54457ee600/asyncflowstate-next-2.0.1.tgz","_integrity":"sha512-ZnuCTSObbZe72oSeYE4pCYVVDjPCy/ee5asUo+7O7TLe759JdqMlUiHZGDrZGGk0e7yBWgIiUzfqME9fAoq/9w==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/next"},"_npmVersion":"10.8.2","description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.1","@asyncflowstate/react":"2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"next":"^15.1.6","react":"^18.3.1","react-dom":"^18.3.1","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"peerDependencies":{"next":"^13.4.0 || ^14.0.0 || ^15.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_2.0.1_1775772480028_0.24433708117842423","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@asyncflowstate/next","version":"2.0.2","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/next@2.0.2","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://asyncflowstate-js.pages.dev/frameworks/next/nextjs","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"90c900dc81e2157c245e69e994e72eb4072185e4","tarball":"https://registry.npmjs.org/@asyncflowstate/next/-/next-2.0.2.tgz","fileCount":9,"integrity":"sha512-KBBtNgp0wBIZHazruu55CNiHeMo5Mt4ufLJ1JrjvcCUDm9Z/Yqs10MjNi+KcvFSpEHUGK17w3H4DvHvlO/fRpw==","signatures":[{"sig":"MEYCIQCPPqWXP72v5m0IbiZoPtHDBrisgsihbUAKmrVAEgz/JQIhAKxu4aWsXRYoj6NfijD+nrV1voZ8hkxJgVfpOUDOTwDM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109246},"main":"./dist/index.js","_from":"file:asyncflowstate-next-2.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"private":false,"scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/fb2363e64f0888e9754aebd7a2478736/asyncflowstate-next-2.0.2.tgz","_integrity":"sha512-KBBtNgp0wBIZHazruu55CNiHeMo5Mt4ufLJ1JrjvcCUDm9Z/Yqs10MjNi+KcvFSpEHUGK17w3H4DvHvlO/fRpw==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/next"},"_npmVersion":"10.8.2","description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.2","@asyncflowstate/react":"2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"next":"^15.1.6","react":"^18.3.1","react-dom":"^18.3.1","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"peerDependencies":{"next":"^13.4.0 || ^14.0.0 || ^15.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next_2.0.2_1775774293397_0.10305273248087277","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@asyncflowstate/next","version":"3.0.0","private":false,"description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/next"},"bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"homepage":"https://asyncflowstate-js.pages.dev/frameworks/next/nextjs","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"engines":{"node":">=16.0.0"},"peerDependencies":{"next":"^13.4.0 || ^14.0.0 || ^15.0.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"dependencies":{"@asyncflowstate/core":"3.0.0","@asyncflowstate/react":"3.0.0"},"devDependencies":{"next":"^15.1.6","react":"^18.3.1","react-dom":"^18.3.1","@types/react":"^18.3.27","@types/react-dom":"^18.3.7"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit"},"_id":"@asyncflowstate/next@3.0.0","_integrity":"sha512-UkIJA42unErTnKZaQqa4r4DmELZ9T/1gPFjv1W37aFeLA0yqP2oYHrbDptl7KDXqoLQA/9vDbGLrzAg4eztTGQ==","_resolved":"C:\\Users\\pc\\AppData\\Local\\Temp\\822666b87b18f124f7f9a1072b39c2ee\\asyncflowstate-next-3.0.0.tgz","_from":"file:asyncflowstate-next-3.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-UkIJA42unErTnKZaQqa4r4DmELZ9T/1gPFjv1W37aFeLA0yqP2oYHrbDptl7KDXqoLQA/9vDbGLrzAg4eztTGQ==","shasum":"504cc26afe204987b294d319e0f6bf7b4e086885","tarball":"https://registry.npmjs.org/@asyncflowstate/next/-/next-3.0.0.tgz","fileCount":9,"unpackedSize":111577,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCS/EIJQzPNcMfn9O8yWBNkuuqI78hnkVcu80lB3HYDhQIhAP+n4rl/nc/iHVjkJrPEe1UlzAXHVWtihSM5eo8TMIf8"}]},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"directories":{},"maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next_3.0.0_1777546157206_0.6531064403314117"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-29T17:26:31.111Z","modified":"2026-04-30T10:49:17.591Z","1.0.1":"2026-03-29T17:26:31.343Z","2.0.0":"2026-04-09T20:20:38.138Z","2.0.1":"2026-04-09T22:08:00.182Z","2.0.2":"2026-04-09T22:38:13.547Z","3.0.0":"2026-04-30T10:49:17.454Z"},"bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","homepage":"https://asyncflowstate-js.pages.dev/frameworks/next/nextjs","keywords":["nextjs","react","async","state","loading","server-actions","app-router","ux","typescript"],"repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/next"},"description":"Next.js optimized integration for AsyncFlowState. Handle SSR, server actions, and app router transitions with declarative loading states.","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"readme":"<div align=\"center\">\n  <a href=\"https://github.com/devhimanshuu/asyncflowstate\">\n    <img src=\"https://raw.githubusercontent.com/devhimanshuu/asyncflowstate/main/assets/AsyncFlowState_logo.png\" width=\"120\" height=\"120\" alt=\"AsyncFlowState Logo\" />\n  </a>\n  <h1>@asyncflowstate/next <span style=\"font-size: 14px; background: #6366f122; color: #6366f1; padding: 4px 10px; border-radius: 20px; vertical-align: middle; margin-left: 10px;\">v3.0.0 Stable</span></h1>\n  <p><b>Next.js optimized integration for AsyncFlowState.</b></p>\n  <p>Handle SSR, Server Actions, and App Router transitions with declarative behavior orchestration.</p>\n\n  <p>\n    <a href=\"https://asyncflowstate-js.pages.dev/frameworks/next\"><img src=\"https://img.shields.io/badge/Documentation-Link-blue.svg\" alt=\"Documentation\" /></a>\n    <a href=\"https://opensource.org/licenses/MIT\"><img src=\"https://img.shields.io/badge/License-MIT-emerald.svg\" alt=\"License: MIT\" /></a>\n    <a href=\"https://www.npmjs.com/package/@asyncflowstate/next\"><img src=\"https://img.shields.io/npm/v/@asyncflowstate/next?color=indigo\" alt=\"NPM Version\" /></a>\n  </p>\n</div>\n\n---\n\n## Installation\n\n```bash\npnpm add @asyncflowstate/next @asyncflowstate/react @asyncflowstate/core\n# or\nnpm install @asyncflowstate/next @asyncflowstate/react @asyncflowstate/core\n```\n\n## Transitions & Revalidation\n\n### `useTransitionFlow`\n\nPerfect for React 19 and Next.js 15. Wraps execution in `startTransition` and provides automatic cache revalidation.\n\n```tsx\nimport { useTransitionFlow } from \"@asyncflowstate/next\";\n\nconst flow = useTransitionFlow(submitAction, {\n  refresh: true, // router.refresh() on success\n  revalidatePath: \"/dash\", // Declarative revalidation hint\n  scrollToTop: true,\n});\n\nreturn (\n  <button onClick={() => flow.execute()} disabled={flow.isPending}>\n    {flow.isPending ? \"Processing...\" : \"Submit\"}\n  </button>\n);\n```\n\n## Comprehensive Examples\n\n### 1. Server Actions with Transitions\n\nNative integration with React 19 / Next.js 15 `useTransition` for smooth navigation and automatic cache revalidation.\n\n```tsx\nimport { useTransitionFlow } from \"@asyncflowstate/next\";\nimport { updateProfileAction } from \"./actions\";\n\nfunction ProfileForm() {\n  const flow = useTransitionFlow(updateProfileAction, {\n    revalidatePath: \"/profile\", // Automatic revalidation on success\n    onSuccess: () => toast.success(\"Profile updated!\"),\n  });\n\n  return (\n    <form action={flow.execute}>\n      <input name=\"username\" />\n      <button type=\"submit\" disabled={flow.isPending}>\n        {flow.isPending ? \"Saving...\" : \"Save\"}\n      </button>\n    </form>\n  );\n}\n```\n\n### 2. Edge-First Architecture\n\nOptimized for the Edge Runtime. AsyncFlowState automatically leverages Edge Cache and detects environmental telemetry.\n\n```tsx\nexport const runtime = \"edge\";\n\nconst flow = useServerActionFlow(apiAction, {\n  edge: {\n    cache: \"force-cache\",\n    ttl: 3600,\n  },\n});\n```\n\n### 3. AI-Powered: Speculative Navigation\n\nPredict user navigation intent and pre-warm server action states before the user clicks.\n\n```tsx\nconst flow = useServerActionFlow(detailsAction, {\n  predictive: { prefetchOnHover: true },\n});\n\nreturn (\n  <Link href=\"/details\" onMouseEnter={flow.prewarm}>\n    View Details\n  </Link>\n);\n```\n\n### 4. Collaborative Server State: Cross-Tab Mesh\n\nSynchronize Server Action results across multiple open tabs for the same user session.\n\n```tsx\nconst flow = useServerActionFlow(updateSettings, {\n  crossTab: { sync: true, channel: \"user-session-mesh\" },\n});\n```\n\n### 5. Multi-Step Server Sequences\n\nOrchestrate complex server-side workflows with individual step tracking and aggregate progress.\n\n```tsx\nconst sequence = useFlowSequence([\n  { name: \"Auth\", flow: loginAction },\n  { name: \"Sync\", flow: syncAction },\n]);\n```\n\n## <i class=\"fa-solid fa-sparkles text-amber-500\"></i> New in v3.0\n\n- **Flow DNA:** Self-healing Server Actions that optimize based on user patterns.\n- **Speculative Navigation:** Intent-based pre-fetching and execution.\n- **Ambient ISR Monitoring:** Background orchestration for incremental static regeneration.\n- **Collaborative Server State:** Real-time state synchronization across Next.js instances.\n- **Edge-First Flows:** Optimized integration with Next.js Edge Runtime.\n- **Temporal Replay:** Full history replay for complex multi-step Server Action flows.\n- **Telemetry Dashboard:** Live monitoring of Server Action health and performance.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}