{"_id":"@codingspook/vanilla-routing","_rev":"9-60f13be2cae7e909d00f434ec120158a","name":"@codingspook/vanilla-routing","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.1":{"name":"@codingspook/vanilla-routing","version":"1.0.1","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"author":{"url":"codingspook","name":"Manuel Di Campli"},"license":"MIT","_id":"@codingspook/vanilla-routing@1.0.1","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"homepage":"https://github.com/codingspook/vanilla-routing#readme","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"dist":{"shasum":"2db935a95ca29be7a3985cf0cc1ce106f0428aec","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.1.tgz","fileCount":22,"integrity":"sha512-AlJPcMTbjNaQmIrM0XCKYLbwnvmFpRhRFmqIdg+hEBxZOuXCT4ar0QkwyQvENx+vxRRRPg2QfbqRAot1Q2KR1A==","signatures":[{"sig":"MEUCIQDGVGeifO2Q1E88QMzhgsElTPE/VyGyW3tGGRdMlu3hzgIgPQPBiZVmZpyqFY0PxfGHTaHyVjYo4bl/0LCFuPNPDnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74134},"fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"url":"https://github.com/jscodelover/vanilla-routing.git","type":"git"}},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f5982ea24f819c334e0ff2db62260edcf28eebe5","scripts":{"____":"APP____","lint":"eslint ./src","test":"npx playwright test","_____":"TEST____","build":"tsup","start":"npm run lint && npm run dev-tsc","format":"prettier ./src -c -w --ignore-path .gitignore","dev-tsc":"tsup --watch","release":"npm run build && npm publish","test-vi":"vitest","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","start:app":"npm run start:browser & npm run start:hash","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:chrome":"npx playwright test --project=chromium","test:report":"npx playwright show-report","test-vi:prod":"vitest run","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser "},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"repository":{"url":"git+https://github.com/codingspook/vanilla-routing.git","type":"git"},"_npmVersion":"10.2.4","description":"Modern Vanilla Javascript routing library.","directories":{},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","husky":"^8.0.3","jsdom":"^23.0.0","eslint":"^8.53.0","vitest":"^0.34.6","express":"^4.18.2","wait-on":"^7.2.0","prettier":"^3.0.3","typescript":"^5.2.2","@types/node":"^20.10.0","lint-staged":"^15.0.2","@playwright/test":"^1.40.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.10.0","@typescript-eslint/eslint-plugin":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/vanilla-routing_1.0.1_1728760255500_0.8100358093346474","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@codingspook/vanilla-routing","version":"1.0.2","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"author":{"url":"codingspook","name":"Manuel Di Campli"},"license":"MIT","_id":"@codingspook/vanilla-routing@1.0.2","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"homepage":"https://github.com/codingspook/vanilla-routing#readme","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"dist":{"shasum":"7d677cbbe4d01eaca4fed3bd28c9f834eda3d773","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.2.tgz","fileCount":22,"integrity":"sha512-4e0ZH3PfWClCGAZ2Rp0KS3qp8nDK4wCnyUUxhISoQI5nloFgJQ/N++7/F/1Ugi6Vt98EMSPl937IMm/0v5UwzQ==","signatures":[{"sig":"MEUCICZW9EBpGz8y+yaTNr+4DraO00ub7oA9O9KzZu7+tgSKAiEAjqqlcBaAgNJf2Q2IPsbT3cyb9ozRIvT6fFcxp0UOGs0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74211},"fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"url":"https://github.com/jscodelover/vanilla-routing.git","type":"git"}},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"3adb8f6394d6fadd1f1542f163097856eafc1f0b","scripts":{"____":"APP____","lint":"eslint ./src","test":"npx playwright test","_____":"TEST____","build":"tsup","start":"npm run lint && npm run dev-tsc","format":"prettier ./src -c -w --ignore-path .gitignore","dev-tsc":"tsup --watch","release":"npm run build && npm publish","test-vi":"vitest","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","start:app":"npm run start:browser & npm run start:hash","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:chrome":"npx playwright test --project=chromium","test:report":"npx playwright show-report","test-vi:prod":"vitest run","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser "},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"repository":{"url":"git+https://github.com/codingspook/vanilla-routing.git","type":"git"},"_npmVersion":"10.2.4","description":"Modern Vanilla Javascript routing library.","directories":{},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","husky":"^8.0.3","jsdom":"^23.0.0","eslint":"^8.53.0","vitest":"^0.34.6","express":"^4.18.2","wait-on":"^7.2.0","prettier":"^3.0.3","typescript":"^5.2.2","@types/node":"^20.10.0","lint-staged":"^15.0.2","@playwright/test":"^1.40.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.10.0","@typescript-eslint/eslint-plugin":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/vanilla-routing_1.0.2_1728760675916_0.8724261800474036","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@codingspook/vanilla-routing","version":"1.0.3","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"author":{"url":"codingspook","name":"Manuel Di Campli"},"license":"MIT","_id":"@codingspook/vanilla-routing@1.0.3","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"homepage":"https://github.com/codingspook/vanilla-routing#readme","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"dist":{"shasum":"e6408ccd34c0fd496769bc6b7454cecab999f4fe","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.3.tgz","fileCount":17,"integrity":"sha512-cyWGFLg6PQaQmeN1L5nw9yOqBOCTiHeV9XCNQsQ8Byv8But32bi5iAMWvxAa2COYzMg1WlDqP04ZzUPyUPuAIQ==","signatures":[{"sig":"MEUCIGSwFMzFHppSYmMk+jjNMKD5m6PXz2nHkcXHk1zkbenaAiEA411Wnk20EU5dsJNG3XObliGTSQMU73DQzGGLY8SHZsM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":57669},"fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"url":"https://github.com/jscodelover/vanilla-routing.git","type":"git"}},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"c663d0c0017d8e77d1e140ba1ad469e726ddca01","scripts":{"____":"APP____","lint":"eslint ./src","test":"npx playwright test","_____":"TEST____","build":"tsup","start":"npm run lint && npm run dev-tsc","format":"prettier ./src -c -w --ignore-path .gitignore","dev-tsc":"tsup --watch","release":"npm run build && npm publish","test-vi":"vitest","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","start:app":"npm run start:browser & npm run start:hash","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:chrome":"npx playwright test --project=chromium","test:report":"npx playwright show-report","test-vi:prod":"vitest run","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser "},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"repository":{"url":"git+https://github.com/codingspook/vanilla-routing.git","type":"git"},"_npmVersion":"10.2.4","description":"Modern Vanilla Javascript routing library.","directories":{},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","husky":"^8.0.3","jsdom":"^23.0.0","eslint":"^8.53.0","vitest":"^0.34.6","express":"^4.18.2","wait-on":"^7.2.0","prettier":"^3.0.3","typescript":"^5.2.2","@types/node":"^20.10.0","lint-staged":"^15.0.2","@playwright/test":"^1.40.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.10.0","@typescript-eslint/eslint-plugin":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/vanilla-routing_1.0.3_1728813054851_0.18829314598702984","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@codingspook/vanilla-routing","version":"1.0.4","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"author":{"url":"codingspook","name":"Manuel Di Campli"},"license":"MIT","_id":"@codingspook/vanilla-routing@1.0.4","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"homepage":"https://github.com/codingspook/vanilla-routing#readme","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"dist":{"shasum":"bc01d6421a75d0010fa4bc5f6d1ff59a9c35666c","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.4.tgz","fileCount":17,"integrity":"sha512-9v9UHdu6pmtulGmZg5GmRbshBbSFEi1Fjd9nyYsGx5PnwbgWLO24jZymicXVMLyBjqeM6eNYn9m4dgjg2Tbdkg==","signatures":[{"sig":"MEUCIQD1TOBslXLOa9oexHVWVp+S8qhYjjwuJUxo/1Ptpd16qAIga4tMY47hs9QWvppY5niA8Rty3dQuztpUP4My/XW2rBo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59889},"fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"url":"https://github.com/jscodelover/vanilla-routing.git","type":"git"}},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"b950def0e2d8a8dbd6380c5d044965b685080749","scripts":{"____":"APP____","lint":"eslint ./src","test":"npx playwright test","_____":"TEST____","build":"tsup","start":"npm run lint && npm run dev-tsc","format":"prettier ./src -c -w --ignore-path .gitignore","dev-tsc":"tsup --watch","release":"npm run build && npm publish","test-vi":"vitest","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","start:app":"npm run start:browser & npm run start:hash","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:chrome":"npx playwright test --project=chromium","test:report":"npx playwright show-report","test-vi:prod":"vitest run","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser "},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"repository":{"url":"git+https://github.com/codingspook/vanilla-routing.git","type":"git"},"_npmVersion":"10.2.4","description":"Modern Vanilla Javascript routing library.","directories":{},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","husky":"^8.0.3","jsdom":"^23.0.0","eslint":"^8.53.0","vitest":"^0.34.6","express":"^4.18.2","wait-on":"^7.2.0","prettier":"^3.0.3","typescript":"^5.2.2","@types/node":"^20.10.0","lint-staged":"^15.0.2","@playwright/test":"^1.40.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.10.0","@typescript-eslint/eslint-plugin":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/vanilla-routing_1.0.4_1744026874131_0.7846495714237103","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@codingspook/vanilla-routing","version":"1.0.5","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"author":{"url":"codingspook","name":"Manuel Di Campli"},"license":"MIT","_id":"@codingspook/vanilla-routing@1.0.5","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"homepage":"https://github.com/codingspook/vanilla-routing#readme","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"dist":{"shasum":"47b95708fa646ea25049bdf1e2db14cfed79eaac","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.5.tgz","fileCount":17,"integrity":"sha512-bO+QDCbt626OAl8bqMQVBTnXMfbaFdZZpFntPn+8e2DGVvFRI2k0G8E7OA/mFsy6okpPXdaOAdBJnStc6KO6ag==","signatures":[{"sig":"MEUCIQDZmiJeGyczF3kJr2rTGK6rRjEd0PpAIfGtB/pE4fdIrgIgTHRxmFkm22hnFGmvuE4axCR56e1Nn/2h4WrTjAOibYg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60085},"fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"url":"https://github.com/jscodelover/vanilla-routing.git","type":"git"}},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"dcab3a6b38853429d58dcf1d235163cea7cdbe72","scripts":{"____":"APP____","lint":"eslint ./src","test":"npx playwright test","_____":"TEST____","build":"tsup","start":"npm run lint && npm run dev-tsc","format":"prettier ./src -c -w --ignore-path .gitignore","dev-tsc":"tsup --watch","release":"npm run build && npm publish","test-vi":"vitest","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","start:app":"npm run start:browser & npm run start:hash","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:chrome":"npx playwright test --project=chromium","test:report":"npx playwright show-report","test-vi:prod":"vitest run","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser "},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"repository":{"url":"git+https://github.com/codingspook/vanilla-routing.git","type":"git"},"_npmVersion":"10.2.4","description":"Modern Vanilla Javascript routing library.","directories":{},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"_nodeVersion":"21.6.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^7.2.0","husky":"^8.0.3","jsdom":"^23.0.0","eslint":"^8.53.0","vitest":"^0.34.6","express":"^4.18.2","wait-on":"^7.2.0","prettier":"^3.0.3","typescript":"^5.2.2","@types/node":"^20.10.0","lint-staged":"^15.0.2","@playwright/test":"^1.40.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","@typescript-eslint/parser":"^6.10.0","@typescript-eslint/eslint-plugin":"^6.10.0"},"_npmOperationalInternal":{"tmp":"tmp/vanilla-routing_1.0.5_1744711331425_0.25839403183673215","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@codingspook/vanilla-routing","license":"MIT","repository":{"type":"git","url":"git+https://github.com/codingspook/vanilla-routing.git"},"version":"1.0.6","author":{"name":"Manuel Di Campli","url":"codingspook"},"description":"Modern Vanilla Javascript routing library.","fork":{"author":"Manisha Basra (jscodelover)","version":"0.0.4","repository":{"type":"git","url":"https://github.com/jscodelover/vanilla-routing.git"}},"keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public"},"scripts":{"start":"npm run lint && npm run dev-tsc","build":"tsup","dev-tsc":"tsup --watch","release":"npm run build && npm publish","lint":"eslint ./src","format":"prettier ./src -c -w --ignore-path .gitignore","____":"APP____","tsup:browser":"tsup --config ./src/app/browser-route/tsup.config.json --watch","tsup:hash":"tsup --config ./src/app/hash-route/tsup.config.json --watch","start:browser":"cd src/app/browser-route && node server.cjs & npm run tsup:browser ","start:hash":"cd src/app/hash-route && npx serve -p 3001 & npm run tsup:hash","start:app":"npm run start:browser & npm run start:hash","_____":"TEST____","test":"npx playwright test","test:chrome":"npx playwright test --project=chromium","test:br:ci":"npm run start:browser & wait-on tcp:3000 -d 1000 && npx playwright test tests/browser* --project=chromium","test:hr:ci":"npm run start:hash & wait-on tcp:3001 -d 1000 && npx playwright test tests/hash* --project=chromium","test:ci":"npm run start:browser &wait-on tcp:3000 -d 1000 && npm run start:hash & wait-on tcp:3001 -d 1000 && npm run test:chrome","test:ui":"npx playwright test --ui","test:report":"npx playwright show-report","test-vi":"vitest","test-vi:prod":"vitest run"},"devDependencies":{"@playwright/test":"^1.40.0","@types/node":"^20.10.0","@typescript-eslint/eslint-plugin":"^6.10.0","@typescript-eslint/parser":"^6.10.0","eslint":"^8.53.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","express":"^4.18.2","husky":"^8.0.3","jsdom":"^23.0.0","lint-staged":"^15.0.2","prettier":"^3.0.3","tsup":"^7.2.0","typescript":"^5.2.2","vitest":"^0.34.6","wait-on":"^7.2.0"},"lint-staged":{"*.{js,ts}":["npm run format","npm run lint"]},"homepage":"https://github.com/codingspook/vanilla-routing#readme","_id":"@codingspook/vanilla-routing@1.0.6","gitHead":"300f2cff319f67bc6727131cd06914024c4e6e67","bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-TGIY9sQEYK++FFQELa8uPKuvDravRUw12htuUp0+qKacYyfroOYMch//k+GzTvUPYs9RD6Ulj6vRSNuQBS42og==","shasum":"f286838f733282f94b4ff3adf5b8a7df32236655","tarball":"https://registry.npmjs.org/@codingspook/vanilla-routing/-/vanilla-routing-1.0.6.tgz","fileCount":17,"unpackedSize":64267,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQChs/DwlppqBxblb81IR9I63Wd6mPo9FGKvBAXtBflXRgIgQft1MjUorJSOt9W+GdQmplzo8v1i5Rzl606iVuAOnDQ="}]},"_npmUser":{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"},"directories":{},"maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vanilla-routing_1.0.6_1744804264622_0.5319163990266331"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-12T19:10:55.408Z","modified":"2025-04-16T11:51:04.965Z","1.0.0":"2024-10-12T16:08:08.569Z","1.0.1":"2024-10-12T19:10:55.767Z","1.0.2":"2024-10-12T19:17:56.114Z","1.0.3":"2024-10-13T09:50:55.054Z","1.0.4":"2025-04-07T11:54:34.332Z","1.0.5":"2025-04-15T10:02:11.609Z","1.0.6":"2025-04-16T11:51:04.808Z"},"bugs":{"url":"https://github.com/codingspook/vanilla-routing/issues"},"author":{"name":"Manuel Di Campli","url":"codingspook"},"license":"MIT","homepage":"https://github.com/codingspook/vanilla-routing#readme","keywords":["route","routing","spa","vanilla routing","client side routing","browser router","hash router","router"],"repository":{"type":"git","url":"git+https://github.com/codingspook/vanilla-routing.git"},"description":"Modern Vanilla Javascript routing library.","maintainers":[{"name":"codingspook","email":"manuel.dicampli@rocketmail.com"}],"readme":"<!-- [![Coverage Status](https://coveralls.io/repos/github/jscodelover/vanilla-routing/badge.svg?branch=main)](https://coveralls.io/github/jscodelover/vanilla-routing?branch=main) -->\n\n# Vanilla Routing\n  \n  [![npm version](https://badge.fury.io/js/@codingspook%2Fvanilla-routing.svg)](https://badge.fury.io/js/@codingspook%2Fvanilla-routing)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Forked from [jscodelover/vanilla-routing]\n\n## Description\n\nThe Vanilla Routing stands out as a lightweight and versatile routing solution designed for vanilla JavaScript web applications. This router seamlessly handles both browser-based and hash-based routing, empowering developers to effortlessly navigate and manage various views within their applications without the need for complete application reloads. As a dedicated Single Page Application (SPA) router tailored for Vanilla JS enthusiasts, it provides a streamlined approach to enhancing user experience and application flow.\n\nVanilla Router for client side routing, inspired by React Router.\n\n##### [Live Example](https://codesandbox.io/p/devbox/autumn-frog-xhyzzs?file=%2Fserver.cjs%3A7%2C7&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clpcv0gcc00083b6h97vyjlz2%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clpcv0gcc00033b6hbtop07qd%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clpcv0gcc00053b6hr1nd2aqi%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clpcv0gcc00073b6hlsd5vfmr%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clpcv0gcc00033b6hbtop07qd%2522%253A%257B%2522id%2522%253A%2522clpcv0gcc00033b6hbtop07qd%2522%252C%2522activeTabId%2522%253A%2522clpgtnm2j00033b6hoh7yet3x%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fpackage.json%2522%252C%2522id%2522%253A%2522clpgtdwmy03183b6h9xv2ete1%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A24%252C%2522startColumn%2522%253A1%252C%2522endLineNumber%2522%253A24%252C%2522endColumn%2522%253A1%257D%255D%257D%252C%257B%2522id%2522%253A%2522clpgtnm2j00033b6hoh7yet3x%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A7%252C%2522startColumn%2522%253A7%252C%2522endLineNumber%2522%253A7%252C%2522endColumn%2522%253A7%257D%255D%252C%2522filepath%2522%253A%2522%252Fserver.cjs%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%257D%252C%2522clpcv0gcc00073b6hlsd5vfmr%2522%253A%257B%2522id%2522%253A%2522clpcv0gcc00073b6hlsd5vfmr%2522%252C%2522activeTabId%2522%253A%2522clpgtuidy01cp3b6h5kuwmsdk%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522port%2522%253A3000%252C%2522taskId%2522%253A%2522start%2522%252C%2522id%2522%253A%2522clpgtuidy01cp3b6h5kuwmsdk%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%257D%252C%2522clpcv0gcc00053b6hr1nd2aqi%2522%253A%257B%2522id%2522%253A%2522clpcv0gcc00053b6hr1nd2aqi%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clpcv0gcc00043b6hpjdqb6r3%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clpcv0gcc00043b6hpjdqb6r3%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D)\n\n##### [Example Repo](https://github.com/jscodelover/vanilla-routing/tree/main/example)\n\n## Installation\n\nTo install the Vanilla Routing, you can use npm or yarn:\n\n```bash\nnpm install vanilla-routing\n```\n\nor\n\n```bash\nyarn add vanilla-routing\n```\n\n## Getting Started\n\nTo get started with the Vanilla Routing, you can use either `BrowserRoute` and `HashRoute` functions to initialize the routing configuration with the desired routes.\n\nHere's a simple example:\n\n### `<BrowserRoute>`\n\nIt is a router implementation that uses the HTML5 history API(pushState, replaceState, and the popstate event) to keep your UI in sync with the URL.\n\n```javascript\nimport { BrowserRoute } from 'vanilla-routing';\n\n// Define your routes here\nconst routes = [\n  {\n    pathname: '/',\n    element: () => document.createElement('div') {/* 👈 Renders at / */}\n  },\n  {\n    pathname: '/post',\n    element: () => document.createElement('div') {/* 👈 Renders at /post */}\n  },\n];\n\nBrowserRoute(routes); // Initialize browser-based routing\n```\n\n### `<HashRoute>`\n\nIt is for use in web browsers when the URL cannot be sent to the server for some reason. `<HashRouter>` makes it possible to store the current location in the hash portion of the current URL, so it is never sent to the server.\n\n```javascript\nimport { HashRoute } from 'vanilla-routing';\n\n// Define your routes here\nconst routes = [\n  {\n    pathname: '/',\n    element: () => document.createElement('div')  {/* 👈 Renders at /#/ */}\n  },\n  {\n    pathname: '/post',\n    element: () => document.createElement('div') {/* 👈 Renders at /#/post/ */}\n  },\n];\n\nHashRoute(routes); // Initialize hash-based routing\n```\n\n## Rendering Routes\n\nTo render the content of the routes, use the `data-vanilla-route-ele` attribute with the value `router-wrap`. This attribute is added to the HTML element where the content of the route should be rendered.\n\n```html\n<section data-vanilla-route-ele=\"router-wrap\">\n  <!-- Content of the routes will be rendered here -->\n</section>\n```\n\nBy using the `data-vanilla-route-ele` attribute, you can easily define the target elements for rendering the content of the routes, allowing for a flexible and organized approach to managing complex page layouts and content.\n\n## Link\n\nTo create a link tag that navigate to the different route without reloading the page you've to add `data-vanilla-route-link` attribute with the value `spa` to the anchor tag.\n\n```html\n<a data-vanilla-route-link=\"spa\" href=\"/\">\n  <!-- Home Page Link -->\n</a>\n<a data-vanilla-route-link=\"spa\" href=\"/\">\n  <!-- About Page Link -->\n</a>\n```\n\n## Nested Routes\n\nIn the Vanilla Routing, you can easily configure nested routes to create a hierarchical structure for your web application. Nested routes allow you to define parent routes with child routes, enabling you to manage and render complex page layouts and content.\n\n## Example Configuration\n\n```javascript\nimport { Router, routeLocation } from 'vanilla-routing';\n\n// Define the main route configuration\nexport const routeConfig= [\n  {\n    pathname: '/',\n    element: () =>  {},\n  },\n  {\n    pathname: '/learn',\n    element: () =>  {},\n    children: [\n      {\n        pathname: '/js',  /* /learn/js */\n        element: () => {},\n        children: [\n          {\n            pathname: '/library-creation', /* /learn/js/library-creation */\n            element: () => {},\n          },\n        ];\n      },\n      {\n        pathname: '/css',\n        element: () => {},\n    },\n    ]\n  },\n];\n```\n\nThe `children` property is used to specify the nested routes within the parent route.\n\n### 404 Route\n\n```javascript\n  {\n    pathname: '*',\n    element: () =>  {},\n  },\n```\n\n## API Reference\n\n#### BrowserRoute\n\nThe `BrowserRoute()` function initializes browser-based routing with the provided routes.\n\n#### HashRoute\n\nThe `HashRoute()` function initializes hash-based routing with the provided routes.\n\n#### routeLocation\n\nThe `routeLocation()` function returns the current route location which contain:\n\n```javascript\n{\n  pathname: '/about/me?detail=true#all',\n  params:{id:'me'},\n  search: {details:true},\n  hash: 'all'\n}\n```\n\n#### router\n\nThe `router()` function returns the configured routes.\n\n### <b>Router</b>\n\nThe `Router` class provides methods for managing routes, navigating, and configuring routing.\n\n##### `go(searchPathname: string, options?: PushHistory)`\n\nThe `go` method is used to navigate to a new route based on the provided `searchPathname`. It also allows for additional options to be passed, such as `PushHistory` options and a boolean flag `replaceState` to indicate whether the navigation should replace the current history state.\n\n- Parameters:\n  - `searchPathname`: A string representing the pathname of the route to navigate to.\n  - `options` (optional): An object containing additional options for the navigation, such as `addToHistory` and `state`.\n\n##### `back()`\n\nThe `back` method is used to navigate to the previous page in the session history.\n\n##### `forward()`\n\nThe `forward` method is used to navigate to the next page in the session history.\n\n##### `replace(searchPathname: string, state?: PushHistory['state'])`\n\nThe `replace` method is used to replace the current route with a new route based on the provided `searchPathname`. It also allows for an optional `state` object to be passed for the history state.\n\n- Parameters:\n  - `searchPathname`: A string representing the pathname of the route to replace.\n  - `state` (optional): An object representing the history state to replace.\n\n##### `refresh()`\n\nThe `refresh` method is used to reload the current page.\n\n##### `config(routeData, basePath = '')`\n\nThe `config` method is used to configure the routes for the application. It takes an array of `Routes` and optional parameter `basePath` to define the base path and nested level for the routes.\n\n- Parameters:\n  - `routeData`: An array of `Routes` representing the routes to be configured.\n    ```javascript\n    Routes = {\n      pathname: '/' /* route path */,\n      element: () => {} /* element to be rendered */,\n      children: [] /* (Optional) nested routes */,\n    };\n    ```\n  - `basePath` (optional): A string representing the base path for the routes.\n\n##### `dispose(cb: () => void)`\n\nThe `dispose` method is used to register a callback function to be executed when the current route is unmounted.\n\n- Parameters:\n  - `cb`: A callback function to be executed when the current route is unmounted.\n\n## Advanced Topics\n\nThe Vanilla Routing supports advanced features such as route disposal, route setup, and event listeners for route navigation.\n\n## Contributing and Support\n\nIf you'd like to contribute to the Vanilla Routing or report any issues, please visit the [GitHub repository](https://github.com/jscodelover/vanilla-routing) for the library.\n\n## License\n\nReleased under the [MIT](https://raw.githubusercontent.com/jscodelover/vanilla-routing/main/LICENSE) license\n\nCopyright (c) 2023 Manisha Basra\n","readmeFilename":"README.md"}