{"_id":"@arijs/remix-run-router","_rev":"1-e2f4f5216cf75d21e3c8708d44223a20","name":"@arijs/remix-run-router","dist-tags":{"arijs":"1.3.4-arijs.2","latest":"1.3.4-arijs.3"},"versions":{"1.3.4-arijs.2":{"name":"@arijs/remix-run-router","version":"1.3.4-arijs.2","description":"Nested/Data-driven/Framework-agnostic Routing","keywords":["remix","router","location"],"repository":{"type":"git","url":"git+https://github.com/arijs/react-router.git","directory":"packages/router"},"license":"MIT","author":{"name":"Remix Software","email":"hello@remix.run"},"sideEffects":false,"main":"./dist/router.cjs.js","unpkg":"./dist/router.umd.min.js","module":"./dist/router.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","browser":"./dist/router.mjs","umd":"./dist/router.umd.min.js","import":"./dist/router.mjs","require":"./dist/router.cjs.js"}},"engines":{"node":">=14"},"publishConfig":{"access":"public"},"gitHead":"92b17b2e157f6e417047e656dda41e1dda42cdc3","bugs":{"url":"https://github.com/arijs/react-router/issues"},"homepage":"https://github.com/arijs/react-router#readme","_id":"@arijs/remix-run-router@1.3.4-arijs.2","_nodeVersion":"16.14.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-isavOYeFaDoaySILhkUC9XL6GlG5o7qo7pK3VVjQD/cJB39SaZewR09CrYmgM5k9YEKVHmnyo96hURSy9US+AA==","shasum":"53344aad2a9af581628e806e032894835c97054e","tarball":"https://registry.npmjs.org/@arijs/remix-run-router/-/remix-run-router-1.3.4-arijs.2.tgz","fileCount":22,"unpackedSize":2318474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG7vJhneQcnEoPyiE4yZhGLwyhBwxDws6BDNqn6WcpiXAiEA6Qo7CfB9LVjp/3+HxJ+JT34Ye+ZCs2SJ12Q8FCAV/gs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCinyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOMw/+O+JZEn/nEhiIEriMAF/Mxu+fgEUGdrS6btts6OP2wb/u5tob\r\ngym2APZcMzs+l5+KEMjOQX8NkvroWC9Jv9+JmPKvS64aEWO7E/70NtPj/CcV\r\nmgHGvAmW05XFe+9evOyVCQKyhY4mDhBFMVpKHM+ZCJQIPJi1n789NQlUVoDz\r\neB52FLzfj6Qkx69LLm5OQkMkuHrQAYxlFT2SwXBC8Tw80Z1JfA6e+E2L9eAr\r\n4v5wQzRAWI34p5xZ4SaOoZuw1lTFiM85FKkKBf/2mhYh9PxWMRRlaBYNuaBQ\r\nehpBU7LCXSUiBNlBwR0PJmDu9ptxZ0GiCb+ifXjBZmvT9trasXxRdR6vhX8t\r\nMAd0INUA54mQWH/TCfZ8tnhDSwKYlud46z4eiX5TU2/MIQmURk/XmxQbOhsT\r\nXjIHSFZQ/TIHGiEPtlYJNnJ8EXXntOhviK/Rw5W8AJsNyfUZvh44x6GCnKDr\r\ng0wtnLsQn/KAn0XmTJKhzS8hhrt3OvtVzMkHxAgpOzGBcmV6Btke9mg16ITl\r\nanMyU711llgpVt0JVOQqJFOBLzL/gPz9cgDtiEMdJV7SgVA/FoobGyPmxkQL\r\nc3elJJnVYUzzsdFeX3eS3hLphADQSMYlkgltBVLS5fwm25oz30v8igFRhdjN\r\n0efzsB3rSpYvztpUTOYTX9oR6tvOSHYUibk=\r\n=vDaE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"arijs","email":"arijs@arijs.org"},"directories":{},"maintainers":[{"name":"arijs","email":"arijs@arijs.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remix-run-router_1.3.4-arijs.2_1678387697900_0.6564948227708123"},"_hasShrinkwrap":false},"1.3.4-arijs.3":{"name":"@arijs/remix-run-router","version":"1.3.4-arijs.3","description":"Nested/Data-driven/Framework-agnostic Routing","keywords":["remix","router","location"],"repository":{"type":"git","url":"git+https://github.com/arijs/react-router.git","directory":"packages/router"},"license":"MIT","author":{"name":"Remix Software","email":"hello@remix.run"},"sideEffects":false,"main":"./dist/router.cjs.js","unpkg":"./dist/router.umd.min.js","module":"./dist/router.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","browser":"./dist/router.mjs","umd":"./dist/router.umd.min.js","import":"./dist/router.mjs","require":"./dist/router.cjs.js"}},"engines":{"node":">=14"},"publishConfig":{"access":"public"},"gitHead":"710dc34dba7e39d45a421d342797cc492afe673f","bugs":{"url":"https://github.com/arijs/react-router/issues"},"homepage":"https://github.com/arijs/react-router#readme","_id":"@arijs/remix-run-router@1.3.4-arijs.3","_nodeVersion":"16.14.0","_npmVersion":"9.6.0","dist":{"integrity":"sha512-1nfIBMFpWlfLLTjhCW2CZZnoAkM7o4nIiQBdZ3aYYR2eXCNb5ERXR527arNWQ9BGRK/AhaUuAEcpGI1VW/O0FQ==","shasum":"6ebb19df6fbc1a0c0d05a05a9a6acd5ce6070c22","tarball":"https://registry.npmjs.org/@arijs/remix-run-router/-/remix-run-router-1.3.4-arijs.3.tgz","fileCount":22,"unpackedSize":2318712,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGU9nnthkO5aXsAWqY/3nwjkUHGnn8YjkshCbXLJSSxAiAE7IdleTH69sfjncKkhCu22hMGZQWDevY45H7Ko95Qmw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCi8WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGvA/+Nbpskx9rtONxO13n3MZVdj6kZNA+PD2pkeCjVJbyxyjF69Xq\r\nQdrBqyR8ZU+XazC/C/uAmRiFbYqiE7LeH+W6IQDBQFsso5o+IIcs457nbHi/\r\nT/83b5ks9MtQ9CqrrIaq0gSsj2bi6JKDPO0h9BYvbm4KZ4Cu62wcQq2dDZG7\r\ngozAcNlFk7vnGdAktLqXoonLwL4kBuR7P8q8Z2ZRv8wsPXVNw6F5jMwRa9/d\r\nxM1JKJsHecNjOTZ2QxSHIMeQOEkzFNuwzcSSKEVsKblrBk40WWV2kuOTFE3R\r\nNlz7mzeXUpSqjsWApg2jSZAg6puDGREHu0rWMcqhf+y7BTGInYYiF/hyeIyP\r\n1YOcXrGprH434eoJdgRqTqEjknNIrlkwgsnQQBmkWGO7IBcbPyBaUT/7L0Wb\r\n3/CX6f/bZK2ogxwrKMtx7CJEXy3j5DPf/Yl/yluXbMQkzI9oLQzVIo0APYvI\r\nqrjulWLntErfgTfQGSxIUNXL6z4JrwoUbbKmy0UJD67H2BX/SB19cX5czi0a\r\njtTQYmY0GEaMkdGYuCQQ2p+mdz+qTr14oy50SBgAn2qycHllVijwxI2ruGzp\r\npQj/KrFlR6AzBferszMKmtmWjf0UQtifztUozK7QqptsPFKZHSdc05wT4EgV\r\nrMCygKnqq91Tmywn5shmnUEqPlkh2gkwaI8=\r\n=NPBF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"arijs","email":"arijs@arijs.org"},"directories":{},"maintainers":[{"name":"arijs","email":"arijs@arijs.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remix-run-router_1.3.4-arijs.3_1678389014334_0.22623534964130587"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-09T18:48:17.835Z","1.3.4-arijs.2":"2023-03-09T18:48:18.032Z","modified":"2023-03-09T19:10:14.641Z","1.3.4-arijs.3":"2023-03-09T19:10:14.510Z"},"maintainers":[{"name":"arijs","email":"arijs@arijs.org"}],"description":"Nested/Data-driven/Framework-agnostic Routing","homepage":"https://github.com/arijs/react-router#readme","keywords":["remix","router","location"],"repository":{"type":"git","url":"git+https://github.com/arijs/react-router.git","directory":"packages/router"},"author":{"name":"Remix Software","email":"hello@remix.run"},"bugs":{"url":"https://github.com/arijs/react-router/issues"},"license":"MIT","readme":"# Remix Router\n\nThe `@remix-run/router` package is a framework-agnostic routing package (sometimes referred to as a browser-emulator) that serves as the heart of [React Router][react-router] and [Remix][remix] and provides all the core functionality for routing coupled with data loading and data mutations. It comes with built-in handling of errors, race-conditions, interruptions, cancellations, lazy-loading data, and much, much more.\n\nIf you're using React Router, you should never `import` anything directly from the `@remix-run/router` or `react-router` packages, but you should have everything you need in either `react-router-dom` or `react-router-native`. Both of those packages re-export everything from `@remix-run/router` and `react-router`.\n\n> **Warning**\n>\n> This router is a low-level package intended to be consumed by UI layer routing libraries. You should very likely not be using this package directly unless you are authoring a routing library such as [`react-router-dom`][react-router-repo] or one of it's other [UI ports][remix-routers-repo].\n\n## API\n\nA Router instance can be created using `createRouter`:\n\n```js\n// Create and initialize a router.  \"initialize\" contains all side effects\n// including history listeners and kicking off the initial data fetch\nlet router = createRouter({\n  // Routes array\n  routes: ,\n  // History instance\n  history,\n}).initialize()\n```\n\nInternally, the Router represents the state in an object of the following format, which is available through `router.state`. You can also register a subscriber of the signature `(state: RouterState) => void` to execute when the state updates via `router.subscribe()`;\n\n```ts\ninterface RouterState {\n  // False during the initial data load, true once we have our initial data\n  initialized: boolean;\n  // The `history` action of the most recently completed navigation\n  historyAction: Action;\n  // The current location of the router.  During a navigation this reflects\n  // the \"old\" location and is updated upon completion of the navigation\n  location: Location;\n  // The current set of route matches\n  matches: DataRouteMatch[];\n  // The state of the current navigation\n  navigation: Navigation;\n  // The state of any in-progress router.revalidate() calls\n  revalidation: RevalidationState;\n  // Data from the loaders for the current matches\n  loaderData: RouteData;\n  // Data from the action for the current matches\n  actionData: RouteData | null;\n  // Errors thrown from loaders/actions for the current matches\n  errors: RouteData | null;\n  // Map of all active fetchers\n  fetchers: Map<string, Fetcher>;\n  // Scroll position to restore to for the active Location, false if we\n  // should not restore, or null if we don't have a saved position\n  // Note: must be enabled via router.enableScrollRestoration()\n  restoreScrollPosition: number | false | null;\n  // Proxied `preventScrollReset` value passed to router.navigate()\n  preventScrollReset: boolean;\n}\n```\n\n### Navigations\n\nAll navigations are done through the `router.navigate` API which is overloaded to support different types of navigations:\n\n```js\n// Link navigation (pushes onto the history stack by default)\nrouter.navigate(\"/page\");\n\n// Link navigation (replacing the history stack)\nrouter.navigate(\"/page\", { replace: true });\n\n// Pop navigation (moving backward/forward in the history stack)\nrouter.navigate(-1);\n\n// Form submission navigation\nlet formData = new FormData();\nformData.append(key, value);\nrouter.navigate(\"/page\", {\n  formMethod: \"post\",\n  formData,\n});\n```\n\n### Fetchers\n\nFetchers are a mechanism to call loaders/actions without triggering a navigation, and are done through the `router.fetch()` API. All fetch calls require a unique key to identify the fetcher.\n\n```js\n// Execute the loader for /page\nrouter.fetch(\"key\", \"/page\");\n\n// Submit to the action for /page\nlet formData = new FormData();\nformData.append(key, value);\nrouter.fetch(\"key\", \"/page\", {\n  formMethod: \"post\",\n  formData,\n});\n```\n\n### Revalidation\n\nBy default, active loaders will revalidate after any navigation or fetcher mutation. If you need to kick off a revalidation for other use-cases, you can use `router.revalidate()` to re-execute all active loaders.\n\n[react-router]: https://reactrouter.com\n[remix]: https://remix.run\n[react-router-repo]: https://github.com/remix-run/react-router\n[remix-routers-repo]: https://github.com/brophdawg11/remix-routers\n","readmeFilename":"README.md"}