{"_id":"@asyncflowstate/nuxt","name":"@asyncflowstate/nuxt","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@asyncflowstate/nuxt","version":"3.0.0","private":false,"description":"Official Nuxt bindings for AsyncFlowState. Seamlessly integrates with Nuxt's auto-imports, App Config, and useAsyncData.","author":{"name":"AsyncFlowState Contributors"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/nuxt"},"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"}}},"peerDependencies":{"nuxt":"^3.0.0","vue":"^3.3.0"},"dependencies":{"@asyncflowstate/core":"3.0.0","@asyncflowstate/vue":"3.0.0"},"devDependencies":{"nuxt":"^3.15.4","vue":"^3.5.13"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest","typecheck":"tsc --noEmit"},"_id":"@asyncflowstate/nuxt@3.0.0","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","_integrity":"sha512-hR59SqBqBSYPlGe4M4y1VYDA/6uTe55YiUKmv/nrdG01K3Chx1IuzRP/3YDm+O+ImtWyLDmUXBpMVzmlXsfUQA==","_resolved":"C:\\Users\\pc\\AppData\\Local\\Temp\\afaa5801fdc8ea0e33d159ce4703b818\\asyncflowstate-nuxt-3.0.0.tgz","_from":"file:asyncflowstate-nuxt-3.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-hR59SqBqBSYPlGe4M4y1VYDA/6uTe55YiUKmv/nrdG01K3Chx1IuzRP/3YDm+O+ImtWyLDmUXBpMVzmlXsfUQA==","shasum":"19fb66ca3e441efcf253f30abf86fb8149d3b3fb","tarball":"https://registry.npmjs.org/@asyncflowstate/nuxt/-/nuxt-3.0.0.tgz","fileCount":9,"unpackedSize":28469,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDRVL9xsr6EYmc4N4qj63NCkkSVxo4NpZogIszE6sgXFAIgUShQNMqLn1ozCCabQ9gmq8dIkrkTqO3d32m7Q3E3aTo="}]},"_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/nuxt_3.0.0_1777546157289_0.031048034146375025"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-30T10:49:17.184Z","3.0.0":"2026-04-30T10:49:17.512Z","modified":"2026-04-30T10:49:17.759Z"},"maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"description":"Official Nuxt bindings for AsyncFlowState. Seamlessly integrates with Nuxt's auto-imports, App Config, and useAsyncData.","homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/nuxt"},"author":{"name":"AsyncFlowState Contributors"},"bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"license":"MIT","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/nuxt <span style=\"font-size: 14px; background: #00dc8222; color: #00dc82; padding: 4px 10px; border-radius: 20px; vertical-align: middle; margin-left: 10px;\">v3.0.0 Stable</span></h1>\n  <p><b>Nuxt 3 optimized behavior orchestration for AsyncFlowState.</b></p>\n\n  <p>\n    <a href=\"https://asyncflowstate-js.pages.dev/frameworks/nuxt\"><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/nuxt\"><img src=\"https://img.shields.io/npm/v/@asyncflowstate/nuxt?color=indigo\" alt=\"NPM Version\" /></a>\n  </p>\n</div>\n\n---\n\n## Installation\n\n```bash\npnpm add @asyncflowstate/nuxt @asyncflowstate/vue @asyncflowstate/core\n```\n\n## Quick Start\n\n### Basic Nuxt Flow\n\n```vue\n<script setup>\nconst { data, loading, execute, button } = useNuxtFlow(async (id) => {\n  return await $fetch(`/api/users/${id}`);\n});\n</script>\n\n<template>\n  <button v-bind=\"button({ onClick: () => execute(123) })\">\n    {{ loading ? \"Loading...\" : \"Fetch User\" }}\n  </button>\n</template>\n```\n\n## Comprehensive Examples\n\n### 1. Optimistic UI with Deep-Diff Rollback\n\nUpdate your Nuxt state instantly and trust AsyncFlowState to revert if the `$fetch` fails.\n\n```vue\n<script setup>\nconst { data, execute } = useNuxtFlow(api.likePost, {\n  optimisticResult: (prev) => ({\n    ...prev,\n    likes: prev.likes + 1,\n    isLiked: true,\n  }),\n  rollbackOnError: true,\n});\n</script>\n```\n\n### 2. AI-Powered: Predictive Intent & Flow DNA\n\nPre-warm your Nuxt composables before the user even clicks.\n\n```vue\n<script setup>\nconst { status, prewarm, execute } = useNuxtFlow(api.getDetails, {\n  predictive: { prefetchOnHover: true },\n});\n</script>\n\n<template>\n  <div @mouseenter=\"prewarm\" class=\"card\">\n    <button @click=\"execute\">\n      {{ status === \"prewarmed\" ? \"Instant View\" : \"Load Details\" }}\n    </button>\n  </div>\n</template>\n```\n\n### 3. Server-Side Rendering (SSR) Support\n\nSeamless integration with Nuxt's `useAsyncData` and `useFetch`.\n\n```vue\n<script setup>\nconst { data: initialData } = await useAsyncData(\"user\", () =>\n  $fetch(\"/api/user\"),\n);\n\nconst flow = useNuxtFlow(api.updateUser, {\n  initialData: initialData.value,\n});\n</script>\n```\n\n### 4. Cross-Tab Sync: Real-Time Coordination\n\nKeep all open Nuxt tabs in sync with the same async state.\n\n```vue\n<script setup>\nconst flow = useNuxtFlow(api.updateSettings, {\n  crossTab: { sync: true, channel: \"nuxt-settings-mesh\" },\n});\n</script>\n```\n\n## <i class=\"fa-solid fa-sparkles text-amber-500\"></i> New in v3.0\n\n- **Flow DNA:** Self-healing composables for Nuxt 3.\n- **Speculative Execution:** Predicted user intent for zero-latency interactions.\n- **Ambient Intelligence:** Background monitoring for Nuxt hydration and navigation.\n- **Collaborative Mesh:** Real-time state synchronization across Nuxt instances.\n- **Edge-First Logic:** Optimized for Nuxt Nitro on the Edge.\n- **Telemetry Dashboard:** Live monitoring of Nuxt async health.\n\n## License\n\nMIT © [AsyncFlowState Contributors](https://github.com/devhimanshuu/asyncflowstate)\n","readmeFilename":"README.md","_rev":"1-17abc01a7e40418dbe4f9f47ccdad893"}