{"_id":"@asyncflowstate/svelte","_rev":"4-f607492101991458d585b1c5b7ca4f50","name":"@asyncflowstate/svelte","dist-tags":{"latest":"3.0.0"},"versions":{"2.0.0":{"name":"@asyncflowstate/svelte","version":"2.0.0","keywords":["svelte","svelte5","runes","stores","async","state","loading","error-handling","ux","typescript","data-fetching","state-management"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/svelte@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":"dbaac609bd1b2816668bfd7bd45c28248b9ebbc0","tarball":"https://registry.npmjs.org/@asyncflowstate/svelte/-/svelte-2.0.0.tgz","fileCount":9,"integrity":"sha512-UISE2fVpbGbjAFJSNq2FL8QTUFBUkEoDUeRduKihyzHK03crYAbVCE17AVUgUxx392mU6Vi/RalSJgMlxUGm/w==","signatures":[{"sig":"MEUCIQDsxj9qQMJ+VFLOs7W6871nmypROiTYWO9at86JCoug6gIgICYgE1TPF4XHwtRfLS4XJx8U/nZPIEg1tA97u3d+J1A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89687},"main":"./dist/index.js","_from":"file:asyncflowstate-svelte-2.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","svelte":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"svelte":{"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","test":"vitest","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/13b2dff5ca92aa21647d3f16deab60e3/asyncflowstate-svelte-2.0.0.tgz","_integrity":"sha512-UISE2fVpbGbjAFJSNq2FL8QTUFBUkEoDUeRduKihyzHK03crYAbVCE17AVUgUxx392mU6Vi/RalSJgMlxUGm/w==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/svelte"},"_npmVersion":"10.8.2","description":"Official Svelte bindings for AsyncFlowState. Reactive stores (createFlow, createFlowSequence, createFlowParallel) for managing async loading, error, and success states effortlessly.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.28.6"},"peerDependencies":{"svelte":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte_2.0.0_1775766038057_0.2315085492957658","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@asyncflowstate/svelte","version":"2.0.1","keywords":["svelte","svelte5","runes","stores","async","state","loading","error-handling","ux","typescript","data-fetching","state-management"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/svelte@2.0.1","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://asyncflowstate-js.pages.dev/frameworks/svelte","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"41454ab8d9c7ce1ac5470e7bdde380581425dcd9","tarball":"https://registry.npmjs.org/@asyncflowstate/svelte/-/svelte-2.0.1.tgz","fileCount":9,"integrity":"sha512-RRGbQmee8FDScKb3Odt9AwkmOmio52VK2tOH5BaJqLSphTsSfXmLK/FC29RW/mKvz1iRLU9Mh/35M7mLE/p5HA==","signatures":[{"sig":"MEYCIQDCvVe93T2/o9/+MC4PR4SuuBs10i87XZXycQEuJXquoQIhAKuFdPYsrlwxlhoRC1zS9lrl9BM6rq/NgxSzsoVXRA9v","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90059},"main":"./dist/index.js","_from":"file:asyncflowstate-svelte-2.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","svelte":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"svelte":{"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","test":"vitest","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/67b7bf203e328be10903c25fb70db2d7/asyncflowstate-svelte-2.0.1.tgz","_integrity":"sha512-RRGbQmee8FDScKb3Odt9AwkmOmio52VK2tOH5BaJqLSphTsSfXmLK/FC29RW/mKvz1iRLU9Mh/35M7mLE/p5HA==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/svelte"},"_npmVersion":"10.8.2","description":"Official Svelte bindings for AsyncFlowState. Reactive stores (createFlow, createFlowSequence, createFlowParallel) for managing async loading, error, and success states effortlessly.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.28.6"},"peerDependencies":{"svelte":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte_2.0.1_1775772480267_0.4431380319808791","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@asyncflowstate/svelte","version":"2.0.2","keywords":["svelte","svelte5","runes","stores","async","state","loading","error-handling","ux","typescript","data-fetching","state-management"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","_id":"@asyncflowstate/svelte@2.0.2","maintainers":[{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"}],"homepage":"https://asyncflowstate-js.pages.dev/frameworks/svelte","bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"dist":{"shasum":"b377ef1d0bfb8fff093b5bf4688e97bbf7807804","tarball":"https://registry.npmjs.org/@asyncflowstate/svelte/-/svelte-2.0.2.tgz","fileCount":9,"integrity":"sha512-ZtzGVEElk6FHIqmmuG88qe3hL8//jIr7I6rUVdHgXN7s5th/G9YjXMJ2gIsPIW3DCep6Z+v+Ok3LMEmB0dT8eA==","signatures":[{"sig":"MEUCID5qbVjLhm8/GXyfkktet7liYH1dNtFi9ryFmalAJchAAiEAoBzN2FPS5obncz8OZ4US5O0Se1AZWhOlIAWRML6jAUQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90059},"main":"./dist/index.js","_from":"file:asyncflowstate-svelte-2.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","svelte":"./dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"svelte":{"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","test":"vitest","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"devhimanshuu","email":"devhimanshuu@gmail.com"},"_resolved":"/tmp/645fa71ed020c257a2d1aeacd55031fb/asyncflowstate-svelte-2.0.2.tgz","_integrity":"sha512-ZtzGVEElk6FHIqmmuG88qe3hL8//jIr7I6rUVdHgXN7s5th/G9YjXMJ2gIsPIW3DCep6Z+v+Ok3LMEmB0dT8eA==","repository":{"url":"git+https://github.com/devhimanshuu/asyncflowstate.git","type":"git","directory":"packages/svelte"},"_npmVersion":"10.8.2","description":"Official Svelte bindings for AsyncFlowState. Reactive stores (createFlow, createFlowSequence, createFlowParallel) for managing async loading, error, and success states effortlessly.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.2","dependencies":{"@asyncflowstate/core":"2.0.2"},"_hasShrinkwrap":false,"devDependencies":{"svelte":"^5.28.6"},"peerDependencies":{"svelte":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte_2.0.2_1775774293956_0.5167249805495238","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@asyncflowstate/svelte","version":"3.0.0","private":false,"description":"Official Svelte bindings for AsyncFlowState. Reactive stores (createFlow, createFlowSequence, createFlowParallel) for managing async loading, error, and success states effortlessly.","keywords":["svelte","svelte5","runes","stores","async","state","loading","error-handling","ux","typescript","data-fetching","state-management"],"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/svelte"},"bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"homepage":"https://asyncflowstate-js.pages.dev/frameworks/svelte","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","svelte":"./dist/index.mjs","exports":{".":{"svelte":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"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":{"svelte":"^4.0.0 || ^5.0.0"},"dependencies":{"@asyncflowstate/core":"3.0.0"},"devDependencies":{"svelte":"^5.28.6"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest","typecheck":"tsc --noEmit"},"_id":"@asyncflowstate/svelte@3.0.0","_integrity":"sha512-pYSlvqr3uWP2m/FT6budMO7Aa6AYikaiU9WWiN0ro7uWiwtrpu6sBNsL0APjdh+a2QKnkE2o8s7o5ujcX3YcAg==","_resolved":"C:\\Users\\pc\\AppData\\Local\\Temp\\e5c5810979076c155fad620dc32233e2\\asyncflowstate-svelte-3.0.0.tgz","_from":"file:asyncflowstate-svelte-3.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-pYSlvqr3uWP2m/FT6budMO7Aa6AYikaiU9WWiN0ro7uWiwtrpu6sBNsL0APjdh+a2QKnkE2o8s7o5ujcX3YcAg==","shasum":"3f732e847c89d8597bcb99db2a2918292233ea70","tarball":"https://registry.npmjs.org/@asyncflowstate/svelte/-/svelte-3.0.0.tgz","fileCount":9,"unpackedSize":100157,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIQCuijlZt+lX2Eyzx3AMA67xAclO0rMJDohAi2Ms05z3VgIfWUPNWz8nnc2El34nCpZadma/I6h2+RiwmvDdd+E0Tw=="}]},"_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/svelte_3.0.0_1777546157222_0.10991066785670411"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-09T20:20:37.965Z","modified":"2026-04-30T10:49:17.481Z","2.0.0":"2026-04-09T20:20:38.215Z","2.0.1":"2026-04-09T22:08:00.410Z","2.0.2":"2026-04-09T22:38:14.129Z","3.0.0":"2026-04-30T10:49:17.363Z"},"bugs":{"url":"https://github.com/devhimanshuu/asyncflowstate/issues"},"author":{"name":"AsyncFlowState Contributors"},"license":"MIT","homepage":"https://asyncflowstate-js.pages.dev/frameworks/svelte","keywords":["svelte","svelte5","runes","stores","async","state","loading","error-handling","ux","typescript","data-fetching","state-management"],"repository":{"type":"git","url":"git+https://github.com/devhimanshuu/asyncflowstate.git","directory":"packages/svelte"},"description":"Official Svelte bindings for AsyncFlowState. Reactive stores (createFlow, createFlowSequence, createFlowParallel) for managing async loading, error, and success states effortlessly.","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/svelte <span style=\"font-size: 14px; background: #ff3e0022; color: #ff3e00; padding: 4px 10px; border-radius: 20px; vertical-align: middle; margin-left: 10px;\">v3.0.0 Stable</span></h1>\n  <p><b>Official Svelte bindings for AsyncFlowState — the industry-standard engine for predictable async UI behavior.</b></p>\n\n  <p>\n    <a href=\"https://asyncflowstate-js.pages.dev/frameworks/svelte\"><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/svelte\"><img src=\"https://img.shields.io/npm/v/@asyncflowstate/svelte?color=indigo\" alt=\"NPM Version\" /></a>\n  </p>\n</div>\n\n## Installation\n\n```bash\npnpm add @asyncflowstate/svelte @asyncflowstate/core\n```\n\n## Quick Start\n\n### Basic Usage\n\n```svelte\n<script>\n  import { createFlow } from '@asyncflowstate/svelte';\n\n  const flow = createFlow(async (id) => {\n    const res = await fetch(`/api/users/${id}`);\n    return res.json();\n  }, {\n    onSuccess: (user) => console.log('Fetched:', user.name),\n  });\n</script>\n\n<button on:click={() => flow.execute('user-123')} disabled={$flow.loading}>\n  {$flow.loading ? 'Loading...' : 'Fetch User'}\n</button>\n\n{#if $flow.data}\n  <p>{$flow.data.name}</p>\n{/if}\n\n{#if $flow.error}\n  <p class=\"error\">Error: {$flow.error.message}</p>\n{/if}\n```\n\n### With Retry & Timeout\n\n```svelte\n<script>\n  import { createFlow } from '@asyncflowstate/svelte';\n\n  const flow = createFlow(fetchData, {\n    timeout: 5000,\n    retry: { maxAttempts: 3, backoff: 'exponential' },\n  });\n</script>\n```\n\n### Sequential Workflows\n\n```svelte\n<script>\n  import { createFlowSequence } from '@asyncflowstate/svelte';\n\n  const sequence = createFlowSequence([\n    { name: 'Validate', flow: validateFlow.flow },\n    { name: 'Submit', flow: submitFlow.flow },\n    { name: 'Notify', flow: notifyFlow.flow },\n  ]);\n</script>\n\n<button on:click={() => sequence.execute()} disabled={$sequence.loading}>\n  Run Workflow ({$sequence.progress}%)\n</button>\n```\n\n### Parallel Execution\n\n```svelte\n<script>\n  import { createFlowParallel } from '@asyncflowstate/svelte';\n\n  const parallel = createFlowParallel(\n    { users: usersFlow.flow, posts: postsFlow.flow },\n    'allSettled'\n  );\n</script>\n```\n\n### Keyed Lists (Delete Buttons)\n\n```svelte\n<script>\n  import { createFlowList } from '@asyncflowstate/svelte';\n\n  const list = createFlowList(async (id) => api.deleteItem(id));\n</script>\n\n{#each items as item}\n  <button on:click={() => list.execute(item.id, item.id)}\n          disabled={$list.states[item.id]?.status === 'loading'}>\n    Delete\n  </button>\n{/each}\n```\n\n## <i class=\"fa-solid fa-sparkles text-amber-500\"></i> New in v3.0\n\n- **Flow DNA:** Self-healing stores that adapt to execution patterns.\n- **Ambient Intelligence:** Svelte-native background predictive monitoring.\n- **Speculative Execution:** Low-latency interactions via intent prediction.\n- **Emotional UX:** Adaptive skeletons and transitions for Svelte transitions.\n- **Collaborative Stores:** Real-time state synchronization across devices.\n- **Edge-First Logic:** Native support for edge runtime optimizations.\n- **Temporal Trace:** History replay for Svelte reactive state.\n- **Telemetry Dashboard:** Live monitoring of all application flow stores.\n\n## Comprehensive Examples\n\n### 1. The Power of Auto-Subscription\n\nSvelte's `$` syntax makes AsyncFlowState feels like a native part of the language.\n\n```svelte\n<script>\n  import { createFlow } from '@asyncflowstate/svelte';\n\n  const flow = createFlow(api.saveData, {\n    optimisticResult: (prev) => ({ ...prev, saved: true }),\n    rollbackOnError: true\n  });\n</script>\n\n<button on:click={() => flow.execute()} disabled={$flow.loading}>\n  {$flow.loading ? 'Saving...' : 'Save Changes'}\n</button>\n\n{#if $flow.isSuccess}\n  <p class=\"success\">Data synced across devices!</p>\n{/if}\n```\n\n### 2. AI-Powered: Flow DNA & Speculative Execution\n\nLet the engine predict the next user move and pre-warm the state.\n\n```svelte\n<script>\n  const flow = createFlow(api.fetchDetails, {\n    predictive: { prefetchOnHover: true }\n  });\n</script>\n\n<div on:mouseenter={flow.prewarm} class=\"card\">\n  <button on:click={flow.execute}>\n    {$flow.status === 'prewarmed' ? 'Instant View' : 'Load Details'}\n  </button>\n</div>\n```\n\n### 3. Enterprise Orchestration: `createFlowSequence`\n\nChain multiple stores with built-in progress tracking and failure recovery.\n\n```svelte\n<script>\n  import { createFlowSequence } from '@asyncflowstate/svelte';\n\n  const sequence = createFlowSequence([\n    { name: \"Step 1\", flow: flow1 },\n    { name: \"Step 2\", flow: flow2 },\n  ]);\n</script>\n\n<progress value={$sequence.progress} max=\"100\" />\n<button on:click={sequence.execute}>Run Sequence</button>\n```\n\n### 4. Real-Time Collaboration: Cross-Tab Mesh\n\nSynchronize state across multiple browser tabs automatically.\n\n```svelte\n<script>\n  const flow = createFlow(api.updateTask, {\n    crossTab: { sync: true, channel: 'tasks-mesh' }\n  });\n</script>\n```\n\n### 5. Multi-Keyed Flows: `createFlowList`\n\nPerfect for lists where each item needs its own independent async state.\n\n```svelte\n<script>\n  import { createFlowList } from '@asyncflowstate/svelte';\n  const list = createFlowList(api.deleteItem);\n</script>\n\n{#each items as item}\n  <button on:click={() => list.execute(item.id)}\n          disabled={$list.states[item.id]?.loading}>\n    Delete {item.name}\n  </button>\n{/each}\n```\n\n## <i class=\"fa-solid fa-sparkles text-amber-500\"></i> New in v3.0\n\n- **Flow DNA:** Self-healing stores that adapt to execution patterns.\n- **Ambient Intelligence:** Svelte-native background predictive monitoring.\n- **Speculative Execution:** Low-latency interactions via intent prediction.\n- **Emotional UX:** Adaptive skeletons and transitions for Svelte transitions.\n- **Collaborative Stores:** Real-time state synchronization across devices.\n- **Edge-First Logic:** Native support for edge runtime optimizations.\n- **Temporal Trace:** History replay for Svelte reactive state.\n- **Telemetry Dashboard:** Live monitoring of all application flow stores.\n\n## API Reference\n\n| Function                               | Description                                       |\n| -------------------------------------- | ------------------------------------------------- |\n| `createFlow(action, options?)`         | Core store for managing async actions             |\n| `createFlowSequence(steps)`            | Orchestrate sequential workflows                  |\n| `createFlowParallel(flows, strategy?)` | Run flows in parallel                             |\n| `createFlowList(action, options?)`     | Manage multiple keyed flow instances              |\n| `createInfiniteFlow(action, options)`  | Manage paginated/infinite scrolling data fetching |\n\nAll stores implement the Svelte store contract — use `$store` for auto-subscription.\n\n## Cleanup\n\nCall `flow.destroy()` when you need manual cleanup (e.g., in `onDestroy`):\n\n```svelte\n<script>\n  import { onDestroy } from 'svelte';\n\n  const flow = createFlow(myAction);\n  onDestroy(() => flow.destroy());\n</script>\n```\n\n## License\n\nMIT © [AsyncFlowState Contributors](https://github.com/devhimanshuu/asyncflowstate)\n","readmeFilename":"README.md"}