{"_id":"@adaptive-debounce/vue","_rev":"2-c0150b9bb959789c25250d3c8727d67d","name":"@adaptive-debounce/vue","dist-tags":{"next":"0.1.0-rc.1","latest":"0.1.0"},"versions":{"0.1.0-rc.1":{"name":"@adaptive-debounce/vue","version":"0.1.0-rc.1","license":"MIT","_id":"@adaptive-debounce/vue@0.1.0-rc.1","maintainers":[{"name":"kjaal","email":"olivergamborg@gmail.com"}],"homepage":"https://github.com/Kjaal/adaptive-debounce#readme","bugs":{"url":"https://github.com/Kjaal/adaptive-debounce/issues"},"dist":{"shasum":"27fd9cb0f9299ad07bdcd9a1c0f9b65b73e1210d","tarball":"https://registry.npmjs.org/@adaptive-debounce/vue/-/vue-0.1.0-rc.1.tgz","fileCount":11,"integrity":"sha512-owL9zCixplDY7Y3pKDZ8/KhDMxG/q5HeDHcQOeNyASayZUEaJn2/9BkAoRIyqIY9hAIVOj8J9xg4wVhsRwSvHw==","signatures":[{"sig":"MEYCIQDj4kGMyp8OgUSqoNUlv0IxmvvgSPqfRK/Hywti5QV3WwIhAJCEXbMXwupxxPjLxGqeyRerm7BIDRPY6eZwhE2lg+Ms","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaptive-debounce%2fvue@0.1.0-rc.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":74214},"main":"./dist/index.cjs","type":"module","_from":"file:/home/runner/work/adaptive-debounce/adaptive-debounce/release/adaptive-debounce-vue-0.1.0-rc.1.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"lint":"biome lint .","test":"vitest run --config vitest.config.ts","build":"tsdown","typecheck":"tsc --noEmit -p tsconfig.json","format:check":"biome format ."},"_npmUser":{"name":"kjaal","email":"olivergamborg@gmail.com"},"_resolved":"/home/runner/work/adaptive-debounce/adaptive-debounce/release/adaptive-debounce-vue-0.1.0-rc.1.tgz","_integrity":"sha512-owL9zCixplDY7Y3pKDZ8/KhDMxG/q5HeDHcQOeNyASayZUEaJn2/9BkAoRIyqIY9hAIVOj8J9xg4wVhsRwSvHw==","repository":{"url":"git+https://github.com/Kjaal/adaptive-debounce.git","type":"git","directory":"packages/vue"},"_npmVersion":"11.19.0","description":"Vue integration for adaptive-debounce.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"adaptive-debounce":"^0.1.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"3.5.41","tsdown":"0.22.14","vitest":"4.1.11","happy-dom":"20.11.6","typescript":"7.0.2","@biomejs/biome":"2.5.10"},"peerDependencies":{"vue":">=3.5.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vue_0.1.0-rc.1_1787866314785_0.19133848489217753","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@adaptive-debounce/vue","version":"0.1.0","description":"Vue integration for adaptive-debounce.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Kjaal/adaptive-debounce.git","directory":"packages/vue"},"bugs":{"url":"https://github.com/Kjaal/adaptive-debounce/issues"},"homepage":"https://github.com/Kjaal/adaptive-debounce#readme","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"dependencies":{"adaptive-debounce":"^0.1.0"},"peerDependencies":{"vue":">=3.5.0 <4.0.0"},"devDependencies":{"@biomejs/biome":"2.5.10","happy-dom":"20.11.6","tsdown":"0.22.14","typescript":"7.0.2","vitest":"4.1.11","vue":"3.5.41"},"scripts":{"build":"tsdown","format:check":"biome format .","lint":"biome lint .","test":"vitest run --config vitest.config.ts","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@adaptive-debounce/vue@0.1.0","_integrity":"sha512-UTAVQOe5+TPVBNdMLAf65JlImfK1ZbhFHWZeb3wIgTMHiihIthlUbZw0+7DgCbrAnM6Doqxz4xT1m54herPJCA==","_resolved":"/home/runner/work/adaptive-debounce/adaptive-debounce/release/adaptive-debounce-vue-0.1.0.tgz","_from":"file:/home/runner/work/adaptive-debounce/adaptive-debounce/release/adaptive-debounce-vue-0.1.0.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-UTAVQOe5+TPVBNdMLAf65JlImfK1ZbhFHWZeb3wIgTMHiihIthlUbZw0+7DgCbrAnM6Doqxz4xT1m54herPJCA==","shasum":"840c5f99ba9fcd5e7fce3881685727b4f059910e","tarball":"https://registry.npmjs.org/@adaptive-debounce/vue/-/vue-0.1.0.tgz","fileCount":11,"unpackedSize":75973,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@adaptive-debounce%2fvue@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCerW0qF1YtCYBdWBiT0L9qVp2JnRt90/KHHe/eSwRwyAIgPHb8DjUavdr40dlraC+ExvJiVwmo8hfWWIwY5nNhTfI="}]},"_npmUser":{"name":"kjaal","email":"olivergamborg@gmail.com"},"directories":{},"maintainers":[{"name":"kjaal","email":"olivergamborg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vue_0.1.0_1788720123428_0.518576583088125"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-27T21:31:54.540Z","modified":"2026-09-06T18:42:03.949Z","0.1.0-rc.1":"2026-08-27T21:31:54.950Z","0.1.0":"2026-09-06T18:42:03.576Z"},"bugs":{"url":"https://github.com/Kjaal/adaptive-debounce/issues"},"license":"MIT","homepage":"https://github.com/Kjaal/adaptive-debounce#readme","repository":{"type":"git","url":"git+https://github.com/Kjaal/adaptive-debounce.git","directory":"packages/vue"},"description":"Vue integration for adaptive-debounce.","maintainers":[{"name":"kjaal","email":"olivergamborg@gmail.com"}],"readme":"# @adaptive-debounce/vue\n\nInstall adaptive debounce once for a Vue application. Every component shares one learned typing\nprofile, while each debounced callback keeps its own timer, arguments, promise, and cancellation.\n\n## Install\n\n```sh\nnpm install adaptive-debounce@0.1.0 @adaptive-debounce/vue@0.1.0\n```\n\n## Set up once\n\n```ts\nimport { createApp } from 'vue'\nimport { createAdaptiveDebouncePlugin } from '@adaptive-debounce/vue'\nimport App from './App.vue'\n\ncreateApp(App)\n  .use(createAdaptiveDebouncePlugin())\n  .mount('#app')\n```\n\nObservation is enabled by default. Persistence is not. Enable same-origin localStorage explicitly:\n\n```ts\napp.use(createAdaptiveDebouncePlugin({ persistence: true }))\n```\n\nThe built-in provider loads when the runtime starts and saves one second after learned timing\nchanges. It stores timing metadata only, never input values.\n\nCalling `runtime.persistence.clear()` resets learning without stopping observation. If startup is\nstill loading a profile, that profile is discarded and observation starts when the load settles.\n\n## Use anywhere\n\n```ts\nimport { useAdaptiveDebouncedFn, useAdaptiveDelay } from '@adaptive-debounce/vue'\n\nconst delayMs = useAdaptiveDelay() // Readonly ref; templates unwrap it automatically.\nconst saveDraft = useAdaptiveDebouncedFn(async (draft: Draft) => {\n  await api.saveDraft(draft)\n})\n\nvoid saveDraft(draft)\n```\n\nComponent teardown cancels that component's pending callback. It does not flush it. Other\ncomponents keep their own pending work. Call and await `saveDraft.flush()` before navigation when a\npending save must finish first.\n\nInstall the plugin above the router to keep one learner across client-side routes. Enable\n`persistence` to restore the timing profile after a hard reload; without it, learning lasts only for\nthat application instance. Neither mode reads or stores input text.\n\n## SSR\n\nImporting and installing the plugin is SSR-safe. Automatic startup waits until `app.mount()` returns,\nincluding functional roots, keeping the initial root hydration state deterministic even when startup awaits router readiness.\nBrowser observation and opted-in localStorage loading then start once for that app. Set\n`autoStart: false` to own startup explicitly through `runtime.start()` after hydration.\nEach Vue application receives a separate runtime, so server requests do not\nshare learned state. No module-global runtime is created.\n\nFor Nuxt, use `@adaptive-debounce/nuxt` instead of wiring client lifecycle hooks yourself.\n","readmeFilename":"README.md"}