{"_id":"@ekwoka/x-router","_rev":"11-c4acba12fab1b48006407d4257a947cb","name":"@ekwoka/x-router","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@ekwoka/x-router","version":"0.0.1","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","devDependencies":{"esbuild":"^0.13.2"},"dependencies":{"alpinejs":"^3.4.1"},"gitHead":"f1579fd080ddf12a530b1ad0eb3e3792dea11aae","_id":"@ekwoka/x-router@0.0.1","_nodeVersion":"16.10.0","_npmVersion":"7.24.1","dist":{"integrity":"sha512-6pxWEM4bFF+/uWuqRpVbsfgcYyAN8pwleSTi5xbczMIKYAEntcXHS3F4lAHVJhRD//6a1Mnn4/I5XFIVhiIJvg==","shasum":"0f05a73873858fc960620fffe76acd7821555205","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.0.1.tgz","fileCount":2,"unpackedSize":2122,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERKFDL/kIO+o7Msc+xtZmOOmwDYJq01eyu4Y5u/NVYbAiA09S4aMFaghNnswtIgjgltuQEdqUL9CdPBUsIQnVBHZw=="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.0.1_1632756095833_0.6734276468631228"},"_hasShrinkwrap":false},"0.0.2":{"name":"@ekwoka/x-router","version":"0.0.2","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","devDependencies":{"esbuild":"^0.13.2"},"dependencies":{"alpinejs":"^3.4.1"},"gitHead":"24c3d7ed4c56702ce459a690703596ba70e63be8","_id":"@ekwoka/x-router@0.0.2","_nodeVersion":"16.10.0","_npmVersion":"7.24.1","dist":{"integrity":"sha512-EgTtVCwx9d61SZ9zeYWf5+jF0nQt4O+72H44MfPrYrGvghrD2u962dpaTo/jtRWBfNUpPWSSkt1rwWpG7yoURA==","shasum":"03aa3dea56649e1a5c382c46430d8a1f4c0bad5f","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.0.2.tgz","fileCount":3,"unpackedSize":4133,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXD6kA4UZYVAkGOHYGlwjzWUdFSNdpAu9WLqxaBIezUAiEA977OttDHD7REKX84AM8fBTw/eeX0dx+uS/yvtrVQRkQ="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.0.2_1632757745302_0.05749095407595539"},"_hasShrinkwrap":false},"0.0.3":{"name":"@ekwoka/x-router","version":"0.0.3","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","devDependencies":{"esbuild":"^0.13.2"},"dependencies":{"alpinejs":"^3.4.1"},"gitHead":"77d8ced2b072912ebc1a365dcaac6c151f2a1494","_id":"@ekwoka/x-router@0.0.3","_nodeVersion":"16.10.0","_npmVersion":"7.24.1","dist":{"integrity":"sha512-7WKMe6LeUv2du70ZJiCgoi+i1JxmcwognC+tv+VgoyzVV8rfeq7+bz6pXA1eYMf1QsdB5bRFEBujbwDjJqXEiQ==","shasum":"5cfa1b195bcefe5e3304b5dd09ffa9d5feaa24f1","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.0.3.tgz","fileCount":3,"unpackedSize":3948,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD67r5NwUEOl9dIH8fQRCmcshsIDvKMHY6qR3v0MlChDwIgHCinihwNSkDkIFOFc2l3OJjzm8BVlahcqEYVvbG1i/w="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.0.3_1632760676829_0.19529383135608103"},"_hasShrinkwrap":false},"0.1.0":{"name":"@ekwoka/x-router","version":"0.1.0","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","devDependencies":{"esbuild":"^0.13.2"},"dependencies":{"alpinejs":"^3.4.1"},"gitHead":"9a6a640e94aa450d974e3c5490849bea45b4c48a","_id":"@ekwoka/x-router@0.1.0","_nodeVersion":"16.10.0","_npmVersion":"7.24.1","dist":{"integrity":"sha512-z4zSob93SUtqS4oCyYR5vVvEqeAqRwXbKirhBTzJXXpboF2N5kLC4+RJ/CTEjvg28M28B3dChZeNz6jOyGrjww==","shasum":"c267d0c9f6b461ba74b7012c2e3d605fdd1ffded","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.0.tgz","fileCount":3,"unpackedSize":5146,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIjbMdD1HMop6CamWSWMm1oerc9/qtMljkrs8+W5dBWQIhAN8gobCtM59/u/8wGCqa/b1d4SSN9vkN5nA8dSgoEL/h"}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.0_1632842282828_0.8189083915293753"},"_hasShrinkwrap":false},"0.1.1":{"name":"@ekwoka/x-router","version":"0.1.1","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","dependencies":{"alpinejs":"^3.4.2"},"gitHead":"1ffd873fc52b336b8a93b981743631bc40fe3c3d","_id":"@ekwoka/x-router@0.1.1","_nodeVersion":"16.10.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-Q8EtLaXObpMyU03IXD9O3P4JuTr5O+uws3HzBrRSY8CZSxIBBSljcXgFrFkM/0yVbD1TGpaU9yB+0csK0wTuCg==","shasum":"84f756a643b0d93465b3f07db00938be84556d5c","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.1.tgz","fileCount":3,"unpackedSize":5092,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsmv+7p5PS1vqVpS37J6/cbX+PhFjnaTaYg0XeOZzX/QIgDkThUBdsMGgVsSmnMbh6a0Y44OI8KBk/JcbtPYFvEd0="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.1_1633374504055_0.605362327053077"},"_hasShrinkwrap":false},"0.1.2":{"name":"@ekwoka/x-router","version":"0.1.2","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","dependencies":{"alpinejs":"^3.4.2"},"gitHead":"e127c122b637f2179d6b995fa1ab9b05a846eea2","_id":"@ekwoka/x-router@0.1.2","_nodeVersion":"16.10.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-/D5p1/aJCkX5jdEjrCoznrarOaDl7bN/3S/1Ixuy5QyOyJmDo8aW/AhQ+jWaw91MIpw65hNnUxnLbStYarrK/g==","shasum":"ddb5265c1a91db248b2e243bb58e884a88d38e73","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.2.tgz","fileCount":3,"unpackedSize":5169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDcamyEvwJt3f/BaTi65H9xS9I0eKHmY2bosWDy/CNyDAiA0mKQk8zBApVRV9z13D0rYeAw76GSQCX/leZTxTWtoGQ=="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.2_1633374749390_0.07711010608018132"},"_hasShrinkwrap":false},"0.1.3":{"name":"@ekwoka/x-router","version":"0.1.3","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","dependencies":{"alpinejs":"^3.4.2"},"gitHead":"c0bf11b78519a4a24233e479adc6e7087f5adf27","_id":"@ekwoka/x-router@0.1.3","_nodeVersion":"16.10.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-23+kCpAmoPmEUDexLvjAcdiyZQ4O+fNiMi4BopELhjiwW8J8RXi7MjAPs8JTyNd2FRUR9h71eLZPhRucj9D5NA==","shasum":"3a8dfb75b881da89a92becc1d83a1b37ed145732","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.3.tgz","fileCount":3,"unpackedSize":5209,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQSn+lJhJbKxyzVhfEiaTJqch4GwQw4UO3dcUqZuFjnwIhAJY29EQJlAVqLnEV7CqKhgkoG4jTa7SftlGQXd2Y0/f9"}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.3_1633691548525_0.7466195587246118"},"_hasShrinkwrap":false},"0.1.4":{"name":"@ekwoka/x-router","version":"0.1.4","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","dependencies":{"alpinejs":"^3.4.2"},"gitHead":"2d640e98e315a905a7daf3e2f160c325e0418d79","_id":"@ekwoka/x-router@0.1.4","_nodeVersion":"16.10.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-pCbusqLoG+si2rlOteH86IdKerDQaTmJgfGrYNoRydvXgzHMRy6QQJkB7RlfYZLIK+zIF81s6TR4m/4WrFQ7Og==","shasum":"c2837bd79a636e161b6aaa91a96e8dac9aabafb2","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.4.tgz","fileCount":3,"unpackedSize":5165,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/ucj3ULCFDZV3Y62e5uDlFCf9qrSMx5pbp/9IMchDeAIhAPHjN8I9rz1qFAKrRX3uPdc4+x0Ujl/dmJ849tVXby7i"}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.4_1633864294334_0.0981787367233442"},"_hasShrinkwrap":false},"0.1.5":{"name":"@ekwoka/x-router","version":"0.1.5","description":"A Router plugin for AlpineJS","main":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","dependencies":{"alpinejs":"^3.4.2"},"gitHead":"b3b5462d55a078024116184b313ab1cda3125b06","_id":"@ekwoka/x-router@0.1.5","_nodeVersion":"16.10.0","_npmVersion":"8.0.0","dist":{"integrity":"sha512-wVvl+B0x8RRpL8I7BYjafipagQKaP0y2fSNgahbEjlOUwqYeg1Z7hhg/Bhxa9vvZlZEpg/pPJJLRDy+TO87i8g==","shasum":"10fa80d6eb99b73607e631a18e0f80611fc2c3d2","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.1.5.tgz","fileCount":3,"unpackedSize":5118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0ZULCRA9TVsSAnZWagAAnJcQAJIAJAofY+K/TAufcNJT\nIf6YchDBXf02s3j07mFICJxQxMMaTCydv17p7VMaUohmjI0BtMAnlIhoU2bD\nA8nn0TErqZYRuzp+eJy6PcZnJO1qboSbyfDv22KoC/14KgtY92g6Xabsm/sL\nk6vPs/cQTXIjTY593cjSw/JY48WJ7GGcKCd1UrZ9UfyT1oqu/C6YTyP3pkun\nojZ85sq0vsSGIF5b9JmfXEKcXIpayxmS8J7kB3aQKcuETxXhZj7FqlEsC3+/\nwurEIElXL5N0n+6FMo271f7Dz8YvpT0zUILL5/J8KrIbzMZn07r8U/rkOGHk\nCqJsptgVb1vrDEDGqyaGabmFFk9qMgIC99KEcCF0xo/VJpn81ManZUeKFTvt\npsJU+5x6I6OIJNnzT3lFc6anV6HS63+FbjD8KrkCuc4z/iu8+r2Kr1Dt3X+B\nbaUoO+1ICI0PKWWYZwXMqvJtmHdmYumEFx3u0EiJZj7G3LwexSHZDHXnomXu\nuAQjVL0AMlpXIYUhTkK8OIM6bl00Ldg5GLVUOestn6xX4VwQT+xNw/JuboQd\nAxTbI5LgKE1ReHyyG9ncqngE3qBqeoLohAoSfIFPSQVHSKsbE0y3uk1oxSfk\nFa/vqbFhOxLwRol5JP0GjLdVzWTuFmuDdtB6g6zlw+0HbPddNFvspEQjboWX\nb7Ej\r\n=w50I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICKwgPXWkPhbvgrwl1lOGGz281+UuNrw182AxzD1LKThAiB6SfYCKQesHX59+Jm+BmLMEzk/bjz3NliA5T/ZgT4iDA=="}]},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.1.5_1633865035881_0.19469060640705238"},"_hasShrinkwrap":false},"0.2.0":{"name":"@ekwoka/x-router","version":"0.2.0","description":"A Router plugin for AlpineJS","main":"src/index.js","keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","peerDependencies":{"alpinejs":"3.x"},"repository":{"type":"git","url":"git+https://github.com/ekwoka/alpine-plugins.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"bugs":{"url":"https://github.com/ekwoka/alpine-plugins/issues"},"homepage":"https://github.com/ekwoka/alpine-plugins#readme","_id":"@ekwoka/x-router@0.2.0","_integrity":"sha512-IP5q2JTKqnsTvC7Hnf6G7pt6U+Ig+9VdTUQBMOfsFnbimAFO/FVR47CdGufyshZy0LcbaPHu2QyChuq+ACpI0w==","_resolved":"/private/var/folders/9x/mjsjrd1n2r3c8vs05jtn3cnc0000gn/T/017118db1d7f17a783c899571bd93aaf/ekwoka-x-router-0.2.0.tgz","_from":"file:ekwoka-x-router-0.2.0.tgz","_nodeVersion":"16.14.2","_npmVersion":"8.8.0","dist":{"integrity":"sha512-IP5q2JTKqnsTvC7Hnf6G7pt6U+Ig+9VdTUQBMOfsFnbimAFO/FVR47CdGufyshZy0LcbaPHu2QyChuq+ACpI0w==","shasum":"d99aa466250aaa9eaf366367ce4565c6e1eecd3e","tarball":"https://registry.npmjs.org/@ekwoka/x-router/-/x-router-0.2.0.tgz","fileCount":3,"unpackedSize":5214,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsOyg3yxjcaEpefMnFK3ueaMPzHxZglNS7/wBoU2YNoAiEA/UatPGkubOjAHIP8YzWvyqCTcg3d1qo7jxaJPbB080I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibpLpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlZw/9FnB0EYsvy7OGTSXC5utmKK46wZFT8+T7Npux76g8dI82HDdG\r\n6ex+CmanyOYK1xdAAcwaLFMT+JtZhCd5lEidLsj3IxQ6Z8GHOlNkzjE4UT6E\r\n280Btp2rmJb286DJ5DmhzlyUk4zlw5Gwcpe1dEYD48lTnSxOb9paSQ50iDvI\r\n2RxAG7DJOFxHN1TbuZpNSRRlSe5049IA3CMA+y3GSuIizD2//ZIMUfQE+cJU\r\n7dB8hieWpxMtBQPo5ONBWF0fUqbO7pOAsIuP9SLvMchro/dzx9aWUci/RfLU\r\neGuwnWDv+zvjb1z4sXyK6rAdKIsUywmIeNG6m2dICTmZ0QJR4PmhTi4n4ouJ\r\nc+l/ueWbBYCn0WpStrCD68Ik8eI0WFClyJMnsvC2sAbC+xrAV4myl3X+x+iK\r\n8cExKplC+yWXzII1UEc8LbLDncsY4GQ+63YLylDEkTHK1JYx8fTRVPpTArVt\r\n+KMVuCE0PL2AcRW/FlyWhSHLcadcTZavnsxUHim6WScVxWrmGau9lOkdUfWl\r\n39QLQmh3STQvtuy6CBUeOrm/KWov39+OwLLIxxmHOuZiCq1rAHjrgblCnmpm\r\n75xA92z3CkxvTq9anL46JVeYi6CxvLDXHMfcPsPd/7sNVtMlajJmCXNi+SZ6\r\nrAEli8rXGasvGBLC+9FCLRFhQj7uhJvKxe8=\r\n=daGs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ekwoka","email":"ninjatheory@gmail.com"},"directories":{},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/x-router_0.2.0_1651413737593_0.36004910874256235"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-27T15:21:35.794Z","0.0.1":"2021-09-27T15:21:36.004Z","modified":"2022-05-01T14:02:17.800Z","0.0.2":"2021-09-27T15:49:05.414Z","0.0.3":"2021-09-27T16:37:57.221Z","0.1.0":"2021-09-28T15:18:02.980Z","0.1.1":"2021-10-04T19:08:24.424Z","0.1.2":"2021-10-04T19:12:29.566Z","0.1.3":"2021-10-08T11:12:28.673Z","0.1.4":"2021-10-10T11:11:34.579Z","0.1.5":"2021-10-10T11:23:56.038Z","0.2.0":"2022-05-01T14:02:17.735Z"},"maintainers":[{"name":"ekwoka","email":"ninjatheory@gmail.com"}],"description":"A Router plugin for AlpineJS","keywords":["AlpineJS","router"],"author":{"name":"Eric Kwoka"},"license":"MIT","readme":"<h1 align=\"center\">X-Router for AlpineJS</h1>\n<p>\n  <a href=\"https://www.npmjs.com/package/@ekwoka/x-router\"><img src=\"https://badge.fury.io/js/@ekwoka%2Fx-router.svg\" alt=\"npm version\" height=\"18\"></a>\n  <a href=\"#\" target=\"_blank\">\n    <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" />\n  </a>\n</p>\n\nBuilt on top of the core `x-if` directive, `x-route` aims to simplify some of the process of having select content appear on different routes for simple Single Page Applications build with AlpineJS\n\n```html\nBefore:\n<template x-if=\"window.location.path.includes('/products')\"></template>\n\nAfter:\n<template x-route=\"products\"></template>\n```\n> Note: To enable consistent reactivity, this uses a shim for history.pushState.\n\n\n## Install\n\n```sh\nnpm i @ekwoka/x-router\n```\n\n## Usage\n\nImport into your JS build as shown.\n\n```js\nimport Alpine from \"alpinejs\"\nimport Router from \"@ekwoka/x-router\"\n\nAlpine.plugin(Router)\n\nwindow.Alpine = Alpine\nAlpine.start()\n```\n\nAdd `x-route` to a `<template>` tag. As with `x-if` and `x-for`, the template needs to have a single child.\n\nFor simple first level routes, just add `x-route`.\n\nBy default, these are evaluated as strings, not as reactive variables. This is for simplicity, as dynamic routes seems against the idea of a router.\n\n```html\n<template x-route></template> // root\n\n<template x-route=\"products\"></template>\n// domain.com/products\n```\n\nTo use a specific level in the route, apped `.[index]`. This can be helpful for handling nested routes.\n\n```html\n<template x-route.1=\"orders\"></template>\n// will show on domain.com/customer/orders and domain.com/account/orders\n\n<template x-route.0=\"account\"> // domain.com/account\n  <div>\n    <template x-route.1=\"orders\"></template> // domain.com/account/orders\n    <template x-route.1=\"settings\"></template> //domain.com/account/settings\n  </div>\n</template>\n```\n\nTo use the entire route, just append `.full` to the directive:\n\n```html\n<template x-route.full=\"account/orders\"></template> \n// will show on domain.com/account/orders\n// will not show on domain.com/account/settings or domain.com/custom/orders\n```\n\nTo use a reactive variable from your Alpine component, append `.reactive` to the directive.\n\n```html\n<div x-data=\"{routeURL: 'account/orders'}\">\n  <template x-route.full.reactive=\"routeURL\"></template>\n</div>\n```\n\nTrigger page changes in a normal manner:\n\n```js\nhistory.pushState({},'products','/products')\n```\n\n## Known Limitations\n- No support for anything that changes the current route other than `history.pushState`\n\n## Roadmap\n\n- Support for other methods of URL change\n\n## Author\n\n👤 **Eric Kwoka**\n\n* Github: [@ekwoka](https://github.com/ekwoka)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!","readmeFilename":"README.md","homepage":"https://github.com/ekwoka/alpine-plugins#readme","repository":{"type":"git","url":"git+https://github.com/ekwoka/alpine-plugins.git"},"bugs":{"url":"https://github.com/ekwoka/alpine-plugins/issues"}}