{"_id":"@adaptive-bundle/vue","_rev":"3-4fae03f0866e49f2d6cb670802eda61c","name":"@adaptive-bundle/vue","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@adaptive-bundle/vue","version":"0.1.0","_id":"@adaptive-bundle/vue@0.1.0","maintainers":[{"name":"pizanjavier","email":"javierpicatoste@gmail.com"}],"dist":{"shasum":"9957fb775068451de505df5bc0ebcafff727f335","tarball":"https://registry.npmjs.org/@adaptive-bundle/vue/-/vue-0.1.0.tgz","fileCount":5,"integrity":"sha512-mQEHpI1nHlPOcjrVx+2poPQfLkMVMPgkDLGJTwNUSUbmKUZ2aWFXrwShiM1FhuR3QowyHsC5JrH8kMhy4Wo4+A==","signatures":[{"sig":"MEYCIQDt9gJKD8q0C1WDCldLrsOTtPoYVFywG6d8r6dfUuMHmgIhALpuM+ZJFqMX8d034mmMGbdP9s04q0IsZ5rJtuIyCTbo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12793},"main":"./dist/index.cjs","type":"module","_from":"file:adaptive-bundle-vue-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"pizanjavier","email":"javierpicatoste@gmail.com"},"_resolved":"/tmp/f0e0a08a682dd448284b7f775d8866a0/adaptive-bundle-vue-0.1.0.tgz","_integrity":"sha512-mQEHpI1nHlPOcjrVx+2poPQfLkMVMPgkDLGJTwNUSUbmKUZ2aWFXrwShiM1FhuR3QowyHsC5JrH8kMhy4Wo4+A==","_npmVersion":"10.8.2","description":"Vue adapter for Adaptive — adaptive() API, composables, and components","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","@adaptive-bundle/core":"0.1.0"},"peerDependencies":{"vue":">=3.3.0","@adaptive-bundle/core":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/vue_0.1.0_1773826280869_0.7033224295997456","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@adaptive-bundle/vue","version":"0.2.0","keywords":["adaptive-loading","device-aware","bundle-optimization","performance","adaptive-bundle","vue","vue3","lazy-loading","conditional-rendering","code-splitting","composables","defineAsyncComponent"],"license":"MIT","_id":"@adaptive-bundle/vue@0.2.0","maintainers":[{"name":"pizanjavier","email":"javierpicatoste@gmail.com"}],"homepage":"https://github.com/Pizanjavier/adaptive/tree/main/packages/vue","bugs":{"url":"https://github.com/Pizanjavier/adaptive/issues"},"dist":{"shasum":"200f2c0cebf2349494779a5c7e37da4036f69025","tarball":"https://registry.npmjs.org/@adaptive-bundle/vue/-/vue-0.2.0.tgz","fileCount":7,"integrity":"sha512-ezjzkaJE7fvs0fbS8gLF167/MU9QOhY0PXtSmDlZ3taOYea8LJ7L+tDK9rTJDuEzQ/zm3YtgDXcixRuhu2UnTA==","signatures":[{"sig":"MEUCIGjIuCCHpybQNZZ4miEMvFqobfvKZ00Ui082+rGrl0dAAiEAkyzfcoIA+OVjzhsOxRkgyKpVm3x+Q2c0JsB6SCC8Xjc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17263},"main":"./dist/index.cjs","type":"module","_from":"file:adaptive-bundle-vue-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"pizanjavier","email":"javierpicatoste@gmail.com"},"_resolved":"/tmp/b0a06f8ba5adb922bac462c3e65a2f5d/adaptive-bundle-vue-0.2.0.tgz","_integrity":"sha512-ezjzkaJE7fvs0fbS8gLF167/MU9QOhY0PXtSmDlZ3taOYea8LJ7L+tDK9rTJDuEzQ/zm3YtgDXcixRuhu2UnTA==","repository":{"url":"git+https://github.com/Pizanjavier/adaptive.git","type":"git","directory":"packages/vue"},"_npmVersion":"10.8.2","description":"Vue adapter for adaptive loading — ship different components to high and low-end devices with adaptive(), composables, and AdaptiveHigh/Low.","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","@adaptive-bundle/core":"0.2.0"},"peerDependencies":{"vue":">=3.3.0","@adaptive-bundle/core":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/vue_0.2.0_1773904497549_0.40315573090844947","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@adaptive-bundle/vue","publishConfig":{"access":"public"},"version":"0.3.0","description":"Vue adapter for adaptive loading — ship different components to high and low-end devices with adaptive(), composables, and AdaptiveHigh/Low.","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"peerDependencies":{"vue":">=3.3.0","@adaptive-bundle/core":"0.2.0"},"devDependencies":{"vue":"^3.4.0","@adaptive-bundle/core":"0.2.0"},"sideEffects":false,"keywords":["adaptive-loading","device-aware","bundle-optimization","performance","adaptive-bundle","vue","vue3","lazy-loading","conditional-rendering","code-splitting","composables","defineAsyncComponent"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Pizanjavier/adaptive.git","directory":"packages/vue"},"homepage":"https://github.com/Pizanjavier/adaptive/tree/main/packages/vue","bugs":{"url":"https://github.com/Pizanjavier/adaptive/issues"},"scripts":{"build":"tsup","test":"vitest run","lint":"eslint src/","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"_id":"@adaptive-bundle/vue@0.3.0","_integrity":"sha512-omva4ccBav7zXHFMbOp7+kIgskEHcU8cj9CuqdlvCUEMihs9lTEo2N51NGagpo9rooQFZfLcWiVxDNRROeHHvg==","_resolved":"/tmp/5ff28ccda4c9cfa7558cc739594f6df5/adaptive-bundle-vue-0.3.0.tgz","_from":"file:adaptive-bundle-vue-0.3.0.tgz","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-omva4ccBav7zXHFMbOp7+kIgskEHcU8cj9CuqdlvCUEMihs9lTEo2N51NGagpo9rooQFZfLcWiVxDNRROeHHvg==","shasum":"e08a273df81ce100a917b9567db3fc86c555183b","tarball":"https://registry.npmjs.org/@adaptive-bundle/vue/-/vue-0.3.0.tgz","fileCount":7,"unpackedSize":19945,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAxwzYhzSRAHBuXYzEmMSMneX//r/DNIXSgqFf7TNiRpAiEA3wiETxxryVyXRw63zSp0HR91Uk7jIKBHL5IMqcb5dps="}]},"_npmUser":{"name":"pizanjavier","email":"javierpicatoste@gmail.com"},"directories":{},"maintainers":[{"name":"pizanjavier","email":"javierpicatoste@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vue_0.3.0_1773927515605_0.8670451884656349"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-18T09:31:20.757Z","modified":"2026-03-19T13:38:35.879Z","0.1.0":"2026-03-18T09:31:21.036Z","0.2.0":"2026-03-19T07:14:57.700Z","0.3.0":"2026-03-19T13:38:35.758Z"},"bugs":{"url":"https://github.com/Pizanjavier/adaptive/issues"},"license":"MIT","homepage":"https://github.com/Pizanjavier/adaptive/tree/main/packages/vue","keywords":["adaptive-loading","device-aware","bundle-optimization","performance","adaptive-bundle","vue","vue3","lazy-loading","conditional-rendering","code-splitting","composables","defineAsyncComponent"],"repository":{"type":"git","url":"git+https://github.com/Pizanjavier/adaptive.git","directory":"packages/vue"},"description":"Vue adapter for adaptive loading — ship different components to high and low-end devices with adaptive(), composables, and AdaptiveHigh/Low.","maintainers":[{"name":"pizanjavier","email":"javierpicatoste@gmail.com"}],"readme":"# @adaptive-bundle/vue\n\nVue adapter for adaptive loading. Ship different components to high-end and low-end devices with `adaptive()`, composables, and inline components.\n\n[![npm](https://img.shields.io/npm/v/@adaptive-bundle/vue)](https://www.npmjs.com/package/@adaptive-bundle/vue)\n\n## Install\n\n```bash\npnpm add @adaptive-bundle/vue @adaptive-bundle/core\npnpm add -D @adaptive-bundle/vite-plugin\n```\n\n## Adaptive Boundaries\n\n### Two-Variant Pattern\n\n```vue\n<script setup>\nimport { adaptive } from '@adaptive-bundle/vue';\n\nconst MapView = adaptive({\n  high: () => import('./MapboxMap.vue'),\n  low: () => import('./StaticMap.vue'),\n});\n</script>\n\n<template>\n  <component :is=\"MapView\" :center=\"[40, -3]\" :zoom=\"12\" />\n</template>\n```\n\n### Exclusion Pattern\n\n```ts\nconst MapView = adaptive({\n  component: () => import('./MapboxMap.vue'),\n  lowFallback: { template: '<img src=\"/static-map.png\" alt=\"Map\" />' },\n});\n```\n\n### Three-Tier Mode\n\n```ts\nconst Chart = adaptive({\n  high: () => import('./AnimatedChart.vue'),\n  medium: () => import('./StaticChart.vue'),\n  low: () => import('./ChartTable.vue'),\n  thresholds: { high: 0.65, low: 0.35 },\n});\n```\n\n### Inline Components\n\n```vue\n<script setup>\nimport { AdaptiveHigh, AdaptiveLow } from '@adaptive-bundle/vue';\n</script>\n\n<template>\n  <AdaptiveHigh><AnimatedChart :data=\"data\" /></AdaptiveHigh>\n  <AdaptiveLow><StaticTable :data=\"data\" /></AdaptiveLow>\n</template>\n```\n\n## Loading Strategies\n\n| Strategy             | Behavior                                                                 |\n| -------------------- | ------------------------------------------------------------------------ |\n| `viewport` (default) | Load on first render                                                     |\n| `eager`              | Preload at definition time                                               |\n| `lazy`               | Defer until element enters viewport (IntersectionObserver, 200px margin) |\n\n```ts\nconst Metrics = adaptive({\n  high: () => import('./AnimatedMetrics.vue'),\n  low: () => import('./StaticMetrics.vue'),\n  loading: 'eager',\n});\n\nconst Scene = adaptive({\n  high: () => import('./ThreeScene.vue'),\n  low: () => import('./StaticScene.vue'),\n  loading: 'lazy',\n});\n```\n\n## Composables\n\n```ts\nimport { useAdaptive, useTier, useDeviceProfile, useNetworkAware } from '@adaptive-bundle/vue';\n\nconst { tier, shouldDefer, profile } = useAdaptive();\nconst tier = useTier();\nconst profile = useDeviceProfile();\nconst { shouldDefer, effectiveType } = useNetworkAware();\n```\n\n## Part of Adaptive Bundle\n\nThis is the Vue adapter for the [Adaptive Bundle](https://github.com/Pizanjavier/adaptive) monorepo. Requires [`@adaptive-bundle/core`](https://www.npmjs.com/package/@adaptive-bundle/core) as a peer dependency and Vue 3.3+. For build-time chunk splitting, add [`@adaptive-bundle/vite-plugin`](https://www.npmjs.com/package/@adaptive-bundle/vite-plugin).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}