{"_id":"@alyvro/turbo","name":"@alyvro/turbo","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alyvro/turbo","version":"1.0.0","description":"Smart link prefetching based on user intent for Next.js.","type":"module","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"peerDependencies":{"next":">=13","react":">=18","react-dom":">=18"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alyvro/turbo.git"},"devDependencies":{"@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^14.0.0","@types/node":"^20.0.0","@types/react":"^18.0.0","jsdom":"^24.0.0","next":"^14.0.0","react":"^18.0.0","react-dom":"^18.0.0","tsup":"^8.0.0","typescript":"^5.0.0","vitest":"^1.0.0"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","type-check":"tsc --noEmit","prebuild":"pnpm type-check"},"_id":"@alyvro/turbo@1.0.0","bugs":{"url":"https://github.com/alyvro/turbo/issues"},"homepage":"https://github.com/alyvro/turbo#readme","_integrity":"sha512-7kiKuSniM8N5V9IsvnITau412yde0Kwypn5t0ZLSrNmtDJA3Vk0aMvoFydEi2SaKy7Q5yEH6GDsrSA4jko4+Iw==","_resolved":"C:\\Users\\nimas\\AppData\\Local\\Temp\\9109f0baff1346a03d49f4f97a33ccea\\alyvro-turbo-1.0.0.tgz","_from":"file:alyvro-turbo-1.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-7kiKuSniM8N5V9IsvnITau412yde0Kwypn5t0ZLSrNmtDJA3Vk0aMvoFydEi2SaKy7Q5yEH6GDsrSA4jko4+Iw==","shasum":"5160eb0b4799900768ebaddd68e6fb5e5d7ce629","tarball":"https://registry.npmjs.org/@alyvro/turbo/-/turbo-1.0.0.tgz","fileCount":9,"unpackedSize":12297,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMInaAdcAwGjIDKXI1IQ6CCZMqVd8ox2T8W0zdpcPe7gIgWphl7/Y6Un10uleyrmifMdqGdK8VzNydeF4C/wTamrg="}]},"_npmUser":{"name":"this_nima","email":"nimastrong852@gmail.com"},"directories":{},"maintainers":[{"name":"this_nima","email":"nimastrong852@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/turbo_1.0.0_1770988339827_0.4758390893768436"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-13T13:12:19.718Z","1.0.0":"2026-02-13T13:12:19.997Z","modified":"2026-02-13T13:12:20.272Z"},"maintainers":[{"name":"this_nima","email":"nimastrong852@gmail.com"}],"description":"Smart link prefetching based on user intent for Next.js.","homepage":"https://github.com/alyvro/turbo#readme","repository":{"type":"git","url":"git+https://github.com/alyvro/turbo.git"},"bugs":{"url":"https://github.com/alyvro/turbo/issues"},"license":"MIT","readme":"# @alyvro/turbo ⚡\r\n\r\n**Smart, intent-based prefetching for Next.js.** Boost your navigation speed without spamming your server with unnecessary requests.\r\n\r\n## 🤔 Why?\r\n\r\nStandard Next.js `<Link>` prefetches routes as soon as they enter the viewport. While this makes navigation fast, it can destroy your bandwidth and server resources on pages with many links (like lists or grids).\r\n\r\n**@alyvro/turbo** solves this by prefetching **only when the user shows intent**:\r\n\r\n1.  **Mouse Hover**: Prefetches after a short delay (e.g., 50ms) to ensure the user actually wants to click.\r\n2.  **Touch Start**: Prefetches immediately on touch (mobile optimization).\r\n\r\n## 🚀 Features\r\n\r\n- 🎯 **Intent-Based**: Only loads what's needed.\r\n- ⚡ **Instant Navigation**: Zero latency on click.\r\n- 📉 **Low Bandwidth**: Saves user data and server costs.\r\n- 📱 **Mobile Optimized**: Smart handling for touch devices.\r\n- 🔌 **Drop-in Replacement**: Works exactly like `next/link`.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\npnpm add @alyvro/turbo\r\n# or\r\nnpm install @alyvro/turbo\r\n```\r\n\r\n---\r\n\r\n## 💻 Usage\r\n\r\nSimply replace Link with TurboLink. It accepts all standard Next.js link props.\r\n\r\n```tsx\r\nimport { TurboLink } from \"@alyvro/turbo\";\r\n\r\nexport default function NavBar() {\r\n  return (\r\n    <nav>\r\n      {/* Standard usage (50ms hover delay) */}\r\n      <TurboLink href=\"/dashboard\">Dashboard</TurboLink>\r\n\r\n      {/* Custom delay for strictly saving bandwidth */}\r\n      <TurboLink href=\"/settings\" delay={200}>\r\n        Settings\r\n      </TurboLink>\r\n    </nav>\r\n  );\r\n}\r\n```\r\n\r\n| Prop     | Type    | Default  | Description                                        |     |\r\n| -------- | ------- | -------- | -------------------------------------------------- | --- |\r\n| href     | string  | Required | The path or URL to navigate to.                    |     |\r\n| delay    | number  | 50       | Time in ms to wait before prefetching on hover.    |     |\r\n| prefetch | boolean | false    | Whether to prefetch immediately (not recommended). |     |\r\n\r\n---\r\n\r\n## 🛡 License\r\n\r\nMIT © [Alyvro](https://github.com/alyvro)\r\n","readmeFilename":"README.md","_rev":"1-94c7fa31e79723cadf7797cb8a64fcfb"}