{"_id":"@1001-digital/dapp-query-vue","_rev":"3-96444969d81e111edffb1b2d095111c5","name":"@1001-digital/dapp-query-vue","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@1001-digital/dapp-query-vue","version":"1.0.0","license":"MIT","_id":"@1001-digital/dapp-query-vue@1.0.0","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"dist":{"shasum":"52f323c52a8416f5c25f4e4e8f2a51f29442d076","tarball":"https://registry.npmjs.org/@1001-digital/dapp-query-vue/-/dapp-query-vue-1.0.0.tgz","fileCount":6,"integrity":"sha512-AwZMG9mJ2fgd8J3mEnNTwRAH+oPVqFgiGu5qAmQn1tjNtZzf/cG0zuwkXOjT88DMIxDgcYf0oZOL+qJ4Xqj//A==","signatures":[{"sig":"MEYCIQC8v/TqqLr7Dk90KuoYL/fHCJUMYJFj9gSp19+wkoyhTQIhAKVnkD7f0Y7TYrMw80TyE1wpLLQqSUFPLuQgcqNST8U9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4100},"type":"module","_from":"file:1001-digital-dapp-query-vue-1.0.0.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","development":"./src/index.ts"}},"scripts":{"build":"vite build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/2f46ce3e4e6a33993b787cce521ba855/1001-digital-dapp-query-vue-1.0.0.tgz","_integrity":"sha512-AwZMG9mJ2fgd8J3mEnNTwRAH+oPVqFgiGu5qAmQn1tjNtZzf/cG0zuwkXOjT88DMIxDgcYf0oZOL+qJ4Xqj//A==","_npmVersion":"11.9.0","description":"Vue composables for dapp-query.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.0","vite":"^6.0.0","typescript":"^5.7.0","vite-plugin-dts":"^4.0.0","@1001-digital/dapp-query-core":"0.2.0"},"peerDependencies":{"vue":">=3.3.0","@1001-digital/dapp-query-core":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dapp-query-vue_1.0.0_1773827125156_0.737891933922558","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@1001-digital/dapp-query-vue","version":"1.0.1","license":"MIT","_id":"@1001-digital/dapp-query-vue@1.0.1","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"dist":{"shasum":"3407e87fc7d208f19af8fdc513b65fb11f7bf47c","tarball":"https://registry.npmjs.org/@1001-digital/dapp-query-vue/-/dapp-query-vue-1.0.1.tgz","fileCount":7,"integrity":"sha512-O1FdE/A+TFmB0DWNyqyoIuWrAsnWxCtUK5p41Szx7In5gvISYT4Pc8Vfco/p4Ha+/cbVd5XbFJ2kRaWvtT3tKA==","signatures":[{"sig":"MEUCICH94mGsm+lsECMvs8PkvO6qjVfg/9sluMxxk1I4xr51AiEA7BYu7d51iIm6EKZ2g+4oaeG/+txAImt84l3Ad0sXlbQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6354},"type":"module","_from":"file:1001-digital-dapp-query-vue-1.0.1.tgz","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","development":"./src/index.ts"}},"scripts":{"build":"vite build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"_resolved":"/tmp/fe8123b284883b921cd14697d5427c89/1001-digital-dapp-query-vue-1.0.1.tgz","_integrity":"sha512-O1FdE/A+TFmB0DWNyqyoIuWrAsnWxCtUK5p41Szx7In5gvISYT4Pc8Vfco/p4Ha+/cbVd5XbFJ2kRaWvtT3tKA==","_npmVersion":"11.9.0","description":"Vue composables for dapp-query.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.0","vite":"^6.0.0","typescript":"^5.7.0","vite-plugin-dts":"^4.0.0","@1001-digital/dapp-query-core":"1.0.0"},"peerDependencies":{"vue":">=3.3.0","@1001-digital/dapp-query-core":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/dapp-query-vue_1.0.1_1773833545277_0.47326397797507647","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@1001-digital/dapp-query-vue","version":"1.1.0","description":"Vue composables for dapp-query.","type":"module","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"peerDependencies":{"vue":">=3.3.0","@1001-digital/dapp-query-core":"1.1.0"},"devDependencies":{"vue":"^3.5.0","typescript":"^5.7.0","vite":"^6.0.0","vite-plugin-dts":"^4.0.0","@1001-digital/dapp-query-core":"1.1.0"},"license":"MIT","scripts":{"build":"vite build","typecheck":"tsc --noEmit"},"_id":"@1001-digital/dapp-query-vue@1.1.0","_integrity":"sha512-7vMXXViF+GlHuuOSKdJMA9PKMa/eYCoAF3H4EM76C2yVKYU0BmigCBlD+yNolAkYvSJN1oKurlMvIwgc9q1nZw==","_resolved":"/tmp/a79f39e9e1587a35f232377d99453974/1001-digital-dapp-query-vue-1.1.0.tgz","_from":"file:1001-digital-dapp-query-vue-1.1.0.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-7vMXXViF+GlHuuOSKdJMA9PKMa/eYCoAF3H4EM76C2yVKYU0BmigCBlD+yNolAkYvSJN1oKurlMvIwgc9q1nZw==","shasum":"20a485ca8f3194f48212b94c257b97c8f2759488","tarball":"https://registry.npmjs.org/@1001-digital/dapp-query-vue/-/dapp-query-vue-1.1.0.tgz","fileCount":7,"unpackedSize":6394,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCjsg7OlG8o/HSEf2gvrOlxRytL8g9b3CGVw3bPrdlpoAIgTKLbCSB5+XDtkSVASbGZqWH2P/tjr2MJhsgm7aYPysA="}]},"_npmUser":{"name":"jwahdatehagh","email":"jalil@1001.digital"},"directories":{},"maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dapp-query-vue_1.1.0_1773834331778_0.5786682676999759"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-18T09:45:25.001Z","modified":"2026-03-18T11:45:32.068Z","1.0.0":"2026-03-18T09:45:25.304Z","1.0.1":"2026-03-18T11:32:25.412Z","1.1.0":"2026-03-18T11:45:31.917Z"},"license":"MIT","description":"Vue composables for dapp-query.","maintainers":[{"name":"jwahdatehagh","email":"jalil@1001.digital"}],"readme":"# @1001-digital/dapp-query-vue\n\nVue 3 composables for [dapp-query](../../README.md).\n\n```\nnpm install @1001-digital/dapp-query-vue @1001-digital/dapp-query-core\n```\n\n## Setup\n\nRegister the plugin with a `QueryClient` instance:\n\n```ts\nimport { createApp } from 'vue'\nimport { createQueryClient, idbCache } from '@1001-digital/dapp-query-core'\nimport { dappQueryPlugin } from '@1001-digital/dapp-query-vue'\n\nconst queryClient = createQueryClient({\n  cache: idbCache('my-app'),\n})\n\nconst app = createApp(App)\napp.use(dappQueryPlugin, queryClient)\n```\n\n## `useQuery`\n\nReactive data fetching composable. Subscribes to a query definition and automatically re-fetches when reactive arguments change.\n\n```ts\nimport { useQuery } from '@1001-digital/dapp-query-vue'\n\nconst { data, pending, error, revalidating, refresh } = useQuery(\n  transfersQuery,\n  () => [address.value] as [string],\n)\n```\n\n### Returns\n\n| Ref | Type | Description |\n|-----|------|-------------|\n| `data` | `Ref<T \\| undefined>` | The query result. |\n| `pending` | `Ref<boolean>` | `true` only on initial load when no cached data exists. |\n| `error` | `Ref<Error \\| undefined>` | The latest fetch error, if any. |\n| `revalidating` | `Ref<boolean>` | `true` when refreshing in the background while showing stale data. |\n| `refresh()` | `() => Promise<void>` | Invalidate cache and trigger a fresh fetch. |\n\n### Reactive arguments\n\nThe second argument is a getter that returns the query args as a tuple. When the returned values change, the composable unsubscribes from the previous query and subscribes to the new one.\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { useQuery } from '@1001-digital/dapp-query-vue'\n\nconst address = ref('0xabc...')\nconst { data, pending } = useQuery(transfersQuery, () => [address.value])\n</script>\n```\n\n### Lifecycle\n\n- Subscribes on component setup\n- Re-subscribes when reactive args change (deep watch)\n- Automatically unsubscribes when the component's effect scope is disposed\n\n## `useQueryClient`\n\nAccess the injected `QueryClient` directly for imperative operations:\n\n```ts\nimport { useQueryClient } from '@1001-digital/dapp-query-vue'\n\nconst client = useQueryClient()\nawait client.invalidate(transfersQuery, '0xabc...')\n```\n\n## Peer Dependencies\n\n- `vue` >= 3.3.0\n- `@1001-digital/dapp-query-core`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}