{"_id":"@bromscandium/router","_rev":"4-833106337f823cdc54b67b1521dac404","name":"@bromscandium/router","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@bromscandium/router","version":"1.0.0","keywords":["bromium","bromiumjs","router","file-based-routing","spa"],"author":{"name":"bromscandium"},"license":"MIT","_id":"@bromscandium/router@1.0.0","maintainers":[{"name":"bromscandium","email":"yarikyeromenko@gmail.com"}],"homepage":"https://github.com/bromscandium/bromiumjs#readme","bugs":{"url":"https://github.com/bromscandium/bromiumjs/issues"},"dist":{"shasum":"15a311d41816881acb6f766a842f67f0b5ae9ad4","tarball":"https://registry.npmjs.org/@bromscandium/router/-/router-1.0.0.tgz","fileCount":23,"integrity":"sha512-PrBFHXgxGfKgsnxwQxUz1g0CRPI7zwIMiPIFnJVvASto/8atVA6hOXN8COvNlRHlbBgWGpFi3WZ1/GdNCRraug==","signatures":[{"sig":"MEQCIF9ULmqd6FkhEIkEwnVRr/IXmzUHcp7KXwXSW4eBqMiIAiAT17uKLrSKE9QcUI4ncF81EXgwAXKm+LTciZDvs7ZTcw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91582},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"872c30e8aae46d23cf6b70895fd6ffc0c89f3f8b","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"bromscandium","email":"yarikyeromenko@gmail.com"},"repository":{"url":"git+https://github.com/bromscandium/bromiumjs.git","type":"git","directory":"packages/router"},"_npmVersion":"11.7.0","description":"BromiumJS router with file-based routing support","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@bromscandium/core":"^1.0.0","@bromscandium/runtime":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/router_1.0.0_1768669466929_0.23176678397123984","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bromscandium/router","version":"1.0.2","keywords":["bromium","bromiumjs","router","file-based-routing","spa"],"author":{"name":"bromscandium"},"license":"MIT","_id":"@bromscandium/router@1.0.2","maintainers":[{"name":"bromscandium","email":"yarikyeromenko@gmail.com"}],"homepage":"https://github.com/bromscandium/bromiumjs#readme","bugs":{"url":"https://github.com/bromscandium/bromiumjs/issues"},"dist":{"shasum":"e1b9d268219aa96fe141aa4b3367b36d9270a093","tarball":"https://registry.npmjs.org/@bromscandium/router/-/router-1.0.2.tgz","fileCount":23,"integrity":"sha512-KkRjV5XXXuPGrl6sXkX7dmmfgoL2hizypQj40esmK6Ha5QveVzWNm/IzLjHvZZddUW+InerF9IXOHCZb7/MSbQ==","signatures":[{"sig":"MEQCIAuD7/ZT8ImED/pRGviqeKqQtiYQ5tWE+7J4stiQdJ1rAiAt0DFC5bjHsytPh08Iyk9nzUJMmQwOUN31VzswaOBKmg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90359},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"dd849c331cc50c2b5a4db2bf7ccd9442a5279040","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"bromscandium","email":"yarikyeromenko@gmail.com"},"repository":{"url":"git+https://github.com/bromscandium/bromiumjs.git","type":"git","directory":"packages/router"},"_npmVersion":"10.8.2","description":"BromiumJS router with file-based routing support","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@bromscandium/core":"^1.0.0","@bromscandium/runtime":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/router_1.0.2_1768675002773_0.3376020972344991","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bromscandium/router","version":"1.0.3","keywords":["bromium","bromiumjs","router","file-based-routing","spa"],"author":{"name":"bromscandium"},"license":"MIT","_id":"@bromscandium/router@1.0.3","maintainers":[{"name":"bromscandium","email":"yarikyeromenko@gmail.com"}],"homepage":"https://github.com/bromscandium/bromiumjs#readme","bugs":{"url":"https://github.com/bromscandium/bromiumjs/issues"},"dist":{"shasum":"b39012d5cac08297b7461ea9913fb87e39b2f9b6","tarball":"https://registry.npmjs.org/@bromscandium/router/-/router-1.0.3.tgz","fileCount":23,"integrity":"sha512-4wY8OO9HEcKDCx+ocvOrGFE7ZNDviBYFj0Jzc8TjU/atS18uHnugIiXGB1vqn/5c7xmeCavP81qWj+17uIOLSA==","signatures":[{"sig":"MEQCIAs2DtdQps/Obz/Bd7FyIAVxec9ciwQH8DCRMkNHkGQBAiAH8wE72UBN0Aia2LBPGm8Ot65cvo5M2ymnp6bbJA+9Zg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90359},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"508e04ac2ac3567c47ecbea59589192857c78aee","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"bromscandium","email":"yarikyeromenko@gmail.com"},"repository":{"url":"git+https://github.com/bromscandium/bromiumjs.git","type":"git","directory":"packages/router"},"_npmVersion":"11.7.0","description":"BromiumJS router with file-based routing support","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@bromscandium/core":"^1.0.0","@bromscandium/runtime":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/router_1.0.3_1768863824422_0.8412123928268536","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bromscandium/router","version":"1.0.4","description":"BromiumJS router with file-based routing support","author":{"name":"bromscandium"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bromscandium/bromiumjs.git","directory":"packages/router"},"homepage":"https://github.com/bromscandium/bromiumjs#readme","bugs":{"url":"https://github.com/bromscandium/bromiumjs/issues"},"keywords":["bromium","bromiumjs","router","file-based-routing","spa"],"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","dev":"tsc --watch"},"dependencies":{"@bromscandium/core":"^1.0.0","@bromscandium/runtime":"^1.0.0"},"devDependencies":{"typescript":"^5.9.3"},"_id":"@bromscandium/router@1.0.4","gitHead":"3246b6f201931014de3e79eeabda24c594e64d95","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-U+hGm0pRsv2jMJP8n8hdGl4O+bFd0tiscLlBbCY2YPZR3Fv0vNgcUzhex8wSaEqeAEXfGH73BbIQtsnZnpZlWQ==","shasum":"7e7c3898b18a42184b5b565cace19b09b3e9782a","tarball":"https://registry.npmjs.org/@bromscandium/router/-/router-1.0.4.tgz","fileCount":23,"unpackedSize":90359,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFtU5S7InTBn9GPe6jxcIhoGr9qo2Sl7V6jcANM+FXIRAiAe2vxwbzc9DNkqL7Ig+l5QAv6330cGIN6TjzIMTNmzWw=="}]},"_npmUser":{"name":"bromscandium","email":"yarikyeromenko@gmail.com"},"directories":{},"maintainers":[{"name":"bromscandium","email":"yarikyeromenko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/router_1.0.4_1768866277689_0.051433978500782906"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-17T17:04:26.833Z","modified":"2026-01-19T23:44:37.940Z","1.0.0":"2026-01-17T17:04:27.076Z","1.0.2":"2026-01-17T18:36:42.918Z","1.0.3":"2026-01-19T23:03:44.610Z","1.0.4":"2026-01-19T23:44:37.825Z"},"bugs":{"url":"https://github.com/bromscandium/bromiumjs/issues"},"author":{"name":"bromscandium"},"license":"MIT","homepage":"https://github.com/bromscandium/bromiumjs#readme","keywords":["bromium","bromiumjs","router","file-based-routing","spa"],"repository":{"type":"git","url":"git+https://github.com/bromscandium/bromiumjs.git","directory":"packages/router"},"description":"BromiumJS router with file-based routing support","maintainers":[{"name":"bromscandium","email":"yarikyeromenko@gmail.com"}],"readme":"# @bromscandium/router\n\nClient-side router for BromiumJS with file-based routing support.\n\n## Installation\n\n```bash\nnpm install @bromscandium/router\n```\n\n## Usage\n\n```tsx\nimport { createRouter, Link, RouterView, useParams } from '@bromscandium/router';\n\nconst router = createRouter({\n  routes: [\n    { path: '/', component: Home },\n    { path: '/users/:id', component: UserProfile },\n  ],\n});\n\nfunction App() {\n  return (\n    <div>\n      <nav>\n        <Link to=\"/\">Home</Link>\n        <Link to=\"/users/123\">User</Link>\n      </nav>\n      <RouterView />\n    </div>\n  );\n}\n\nfunction UserProfile() {\n  const params = useParams();\n  return <div>User ID: {params.value.id}</div>;\n}\n```\n\n### Router Hooks\n\n```tsx\nimport { useRouter, useRoute, useParams, useQuery, useNavigate } from '@bromscandium/router';\n\nfunction Component() {\n  const router = useRouter();\n  const route = useRoute();\n  const params = useParams();\n  const query = useQuery();\n  const nav = useNavigate();\n\n  const goHome = () => nav.push('/');\n  const goBack = () => nav.back();\n\n  return <button onClick={goHome}>Home</button>;\n}\n```\n\n### Link Component\n\n```tsx\n<Link to=\"/about\">About</Link>\n\n<Link\n  to=\"/about\"\n  activeClassName=\"active\"\n  exactActiveClassName=\"exact-active\"\n>\n  About\n</Link>\n```\n\n## API\n\n| Export | Description |\n|--------|-------------|\n| `createRouter(options)` | Create router instance |\n| `Link` | Navigation link component |\n| `RouterView` | Route outlet component |\n| `Navigate` | Programmatic navigation component |\n| `Redirect` | Redirect component |\n| `useRouter()` | Access router instance |\n| `useRoute()` | Access current route (Ref) |\n| `useParams()` | Access route parameters (ComputedRef) |\n| `useQuery()` | Access query parameters (ComputedRef) |\n| `useNavigate()` | Get navigation methods |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}