{"_id":"@databyss-org/reach-router","_rev":"1-197d089a1d6371300b2b40ecd0e6b99b","name":"@databyss-org/reach-router","dist-tags":{"latest":"1.3.4-b1"},"versions":{"1.3.4-b1":{"name":"@databyss-org/reach-router","version":"1.3.4-b1","description":"Next generation Routing for React.","main":"index.js","module":"es/index.js","private":false,"scripts":{"build":"node build/build.js","watch":"watch -p \"src/**/*.js\" -c \"yarn build\"","test":"jest","clean":"rm -rf lib es umd index.js","precommit":"pretty-quick --staged","format":"prettier '**/*.js' --write","lint":"eslint src"},"jest":{"globals":{"__DEV__":true},"testRegex":".+\\.test\\.js$","testURL":"http://localhost"},"peerDependencies":{"react":"15.x || 16.x || 16.4.0-alpha.0911da3","react-dom":"15.x || 16.x || 16.4.0-alpha.0911da3"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6","babel-eslint":"^7.2.3","babel-plugin-dev-expression":"^0.2.1","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-inline-environment-variables":"^0.3.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-remove-prop-types":"^0.4.13","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","eslint":"^4.18.2","eslint-config-react-app":"^2.1.0","eslint-plugin-flowtype":"^2.34.1","eslint-plugin-import":"^2.9.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.1.0","gzip-size":"^4.1.0","husky":"^0.14.3","jest":"^22.4.2","prettier":"^1.13.4","pretty-bytes":"^4.0.2","pretty-quick":"^1.6.0","react":"16.12.0","react-dom":"16.12.0","react-test-renderer":"16.12","render-markdown-js":"^1.3.0","rollup":"^0.56.3","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-node-resolve":"^3.0.3","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^3.0.0","watch-cli":"^0.2.2"},"author":{"name":"Ryan Florence"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/databyss-org/reach-router.git"},"keywords":["react","react router"],"prettier":{"printWidth":80},"dependencies":{"create-react-context":"0.3.0","invariant":"^2.2.3","prop-types":"^15.6.1","react-lifecycles-compat":"^3.0.4"},"bugs":{"url":"https://github.com/reach/router/issues"},"homepage":"https://github.com/reach/router#readme","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018-present, Ryan Florence\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@databyss-org/reach-router@1.3.4-b1","dist":{"shasum":"d37dcb24e9e42b77d3f56323803215b5f188b256","integrity":"sha512-pNxuVZFaN8JwvcqUjdpbk+X6TnrvrwbmqYHgFKiW314/3iBJyVrN5lSt/zz9/OwtPjS6HglpU5N0C4hLfBmsaA==","tarball":"https://registry.npmjs.org/@databyss-org/reach-router/-/reach-router-1.3.4-b1.tgz","fileCount":17,"unpackedSize":210927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3OZXCRA9TVsSAnZWagAAL1gP/ApYEVKO/s4hPIVDNOM2\nsU2oLkcNLpv/pFjBR9rGeYCtSZUUW5yCuKxHsS8IewHoPyHkg2Akxojzt//Q\nhUNEkLkHNSP+13lro8j6y+JrGyQ4xcHm6s+OW/QL6XmSuCPFAF3GANK86zHt\n244R1OQegCRO152xk+zA1QFwxGEDydCtszKDyhF1H8+SllqyaPbejUaVEAcE\nIBZK13y/t7YRzvUrzIvWVYknk3Lxdm/QVZsD91Q9gKdF4130GtmYRjgJneBZ\n+Y6Oac8uVzOuyEt8L0dU6/+wzOpWRekxxLZNbXqzpvDvFlEppFl+BHZZn/gd\nt6bEsGF5ar9VKAIzG4hNCo1FovP+U3unldlmiF6S/1NrVcIlaJWWTS3Lrjf8\nhDipRpgxosUjISmtnai+xIU3Zk8gVjIe6kdKCrzUfXhvHeYRgypoa5DwGPu8\nRP/WS7shrx5iZY4HU1Wm4ktQ8xVrVnv70WsIKV5w9Xw7gK+o9Evqadp97G0w\ndeoSJNP7YOgKR8GsJCdkwa610CMJHmGDKPychQeblHKtt0aiwOiGAqh0qT3C\nxsgj/hQSvnfNX1xgzciqbWIG+zM6bCly26fFQ4l0w1eEGnyI3WlJWFrPP+Jl\nncLmOQNprXLkP38kok9Kwh8VS1AhdFKKxysti1D5q2i0I4DIUZC5aO0IP0TW\nCb5j\r\n=hbgX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuwqKtGViYYnvX8c3WGamGwy39RfcmGV9sv06T8Ea+EAiEArid1oWFjtn6Wxru14jX41hHrjss8JvEJR3HbXjUSqXk="}]},"_npmUser":{"name":"pzhine","email":"paul@hine.works"},"directories":{},"maintainers":[{"name":"pzhine","email":"paul@hine.works"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reach-router_1.3.4-b1_1608312406496_0.6265845586976575"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-18T17:26:46.329Z","1.3.4-b1":"2020-12-18T17:26:46.656Z","modified":"2022-04-05T02:51:44.058Z"},"maintainers":[{"name":"pzhine","email":"paul@hine.works"}],"description":"Next generation Routing for React.","homepage":"https://github.com/reach/router#readme","keywords":["react","react router"],"repository":{"type":"git","url":"git+https://github.com/databyss-org/reach-router.git"},"author":{"name":"Ryan Florence"},"bugs":{"url":"https://github.com/reach/router/issues"},"license":"MIT","readme":"# @databyss-org/reach-router\nA fork of [@reach/router](https://github.com/reach/router) that permits usage without the focus control.\n\n## The problem\nBy default, Reach Router is designed to control the focus on route changes to comply with certain A11Y expectations. For example, when a user navigates to a new route, a screen reader would need the focus to transition to the newly shown route. If it didn't, the screen reader would not be able to correctly report and navigate the new content. To facilitate this, Reach Router wraps every `<Router>` and child route component in a `<div>`. This can obviously cause problems with some layouts, especially flex layouts.\n\n## The solution, part 1\nAs outlined in [this issue](https://github.com/reach/router/issues/63#issuecomment-457840121), Reach allows you to override the wrapping component described above. If you supply a React Fragment as the `component` property and set the `primary` property on the `<Router>` component, the wrapper is not rendered around the route children components. However, the wrapper is still rendered around the `<Router>` component.\n\n## The solution, part 2\nThis fork incorporates [PR #104](https://github.com/reach/router/pull/104/files), which normalizes the wrapping behavior between the `<Router>` component and its children.\n\n## Suggested usage\nIn Databyss, we don't need Reach to manage the focus transitions during route changes. Where necessary, we update the focus. So we want to disable the focus management and component wrapping everywhere the `<Router>` component is used. We have one library file, `NavigationProvider.js` that composes the Reach `<Router>` component with the props described above set to disable focus management. Then we import that component in our app when we want to use a router.\n\n```js\n// NavigationProvider.js\nimport { Router as ReachRouter } from '@databyss-org/reach-router'\nconst RouteWrapper = ({ children }) => <>{children}</>\nexport const Router = ({ children, ...others }) => (\n  <ReachRouter primary={false} component={RouteWrapper} {...others}>\n    {children}\n  </ReachRouter>\n)\n```","readmeFilename":"README.md"}