{"_id":"@asyncflowstate/remix","name":"@asyncflowstate/remix","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@asyncflowstate/remix","version":"3.0.0","private":false,"description":"Official Remix bindings for AsyncFlowState. Seamlessly integrates with Remix's actions, loaders, and useNavigation.","author":{"name":"AsyncFlowState Contributors"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/remix"},"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":{"@remix-run/react":"^2.0.0","react":"^18.0.0","react-dom":"^18.0.0"},"dependencies":{"@asyncflowstate/core":"3.0.0","@asyncflowstate/react":"3.0.0"},"devDependencies":{"@remix-run/react":"^2.15.3","@types/react":"^18.3.18","@types/react-dom":"^18.3.5","react":"^18.3.1","react-dom":"^18.3.1"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest","typecheck":"tsc --noEmit"},"_id":"@asyncflowstate/remix@3.0.0","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","_integrity":"sha512-qFPLN0lHFQNSi1Dijwy1KCh8jjKL/5fEz5v+Pd3ytib1o0+fWRk/dRi1AhjkcXhJ5knzzgjzP8omH6wAMAgJqg==","_resolved":"C:\\Users\\pc\\AppData\\Local\\Temp\\eb98d1b916cbbcc93b6ef330313a9fb9\\asyncflowstate-remix-3.0.0.tgz","_from":"file:asyncflowstate-remix-3.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-qFPLN0lHFQNSi1Dijwy1KCh8jjKL/5fEz5v+Pd3ytib1o0+fWRk/dRi1AhjkcXhJ5knzzgjzP8omH6wAMAgJqg==","shasum":"a603f7f3c6ee33f4e800257f3c671492903458b0","tarball":"https://registry.npmjs.org/@asyncflowstate/remix/-/remix-3.0.0.tgz","fileCount":9,"unpackedSize":95344,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDsd5QbNgZcxux1DNpCWmLFC2Kkr/mwdP9RBp3HjQjTygIhAKzYfW4GCpgVXfb1njZdg3VdUMBycCrWVpulkJZ4nchy"}]},"_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/remix_3.0.0_1777546157314_0.3904228249728203"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-30T10:49:17.250Z","3.0.0":"2026-04-30T10:49:17.565Z","modified":"2026-04-30T10:49:17.724Z"},"maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"description":"Official Remix bindings for AsyncFlowState. Seamlessly integrates with Remix's actions, loaders, and useNavigation.","homepage":"https://github.com/devhimanshuu/asyncflowstate#readme","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/remix"},"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/remix <span style=\"font-size: 14px; background: #00000022; color: #000000; padding: 4px 10px; border-radius: 20px; vertical-align: middle; margin-left: 10px;\">v3.0.0 Stable</span></h1>\n  <p><b>Remix-optimized behavior orchestration for AsyncFlowState.</b></p>\n\n  <p>\n    <a href=\"https://asyncflowstate-js.pages.dev/frameworks/remix\"><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/remix\"><img src=\"https://img.shields.io/npm/v/@asyncflowstate/remix?color=indigo\" alt=\"NPM Version\" /></a>\n  </p>\n</div>\n\n---\n\n## Installation\n\n```bash\npnpm add @asyncflowstate/remix @asyncflowstate/react @asyncflowstate/core\n```\n\n## Quick Start\n\n### Basic Action Flow\n\n```tsx\nimport { useActionFlow } from \"@asyncflowstate/remix\";\n\nexport function CreatePost() {\n  const flow = useActionFlow({\n    onSuccess: () => toast.success(\"Post created!\"),\n  });\n\n  return (\n    <form method=\"post\" onSubmit={flow.form().onSubmit}>\n      <input name=\"title\" />\n      <button type=\"submit\" disabled={flow.isSubmitting}>\n        {flow.isSubmitting ? \"Creating...\" : \"Create Post\"}\n      </button>\n    </form>\n  );\n}\n```\n\n## Comprehensive Examples\n\n### 1. Optimistic UI with Deep-Diff Rollback\n\nInstantly update your UI and let AsyncFlowState handle the rollback if the Remix Action fails.\n\n```tsx\nconst flow = useActionFlow({\n  optimisticResult: (prev) => ({ ...prev, liked: true }),\n  rollbackOnError: true,\n});\n```\n\n### 2. AI-Powered: Speculative Navigation\n\nPredict which action the user will take and pre-warm the server-side state.\n\n```tsx\nconst flow = useActionFlow({\n  predictive: { prefetchOnHover: true },\n});\n\nreturn (\n  <button onMouseEnter={flow.prewarm} onClick={() => flow.execute()}>\n    Quick Save\n  </button>\n);\n```\n\n### 3. Multi-Step Sequences\n\nOrchestrate complex sequences involving multiple Remix Actions or external APIs.\n\n```tsx\nconst sequence = useFlowSequence([\n  { name: \"Step 1\", flow: action1 },\n  { name: \"Step 2\", flow: action2 },\n]);\n```\n\n## <i class=\"fa-solid fa-sparkles text-amber-500\"></i> New in v3.0\n\n- **Flow DNA:** Self-healing actions that adapt to user behavior patterns.\n- **Speculative Execution:** Low-latency interactions via intent prediction.\n- **Ambient Intelligence:** Background monitoring of Remix navigation lifecycle.\n- **Collaborative Mesh:** Sync action states across multiple browser tabs.\n- **Edge-First Fetching:** Optimized for Remix on Cloudflare Workers and Vercel Edge.\n- **Telemetry Dashboard:** Live monitoring of action health and latency.\n\n## License\n\nMIT © [AsyncFlowState Contributors](https://github.com/devhimanshuu/asyncflowstate)\n","readmeFilename":"README.md","_rev":"1-68333ceca796f9f42c77ce102194486e"}