{"_id":"react-scroll-captor","_rev":"410787","name":"react-scroll-captor","description":"A component that confines scroll events to its immediate child. Great for dropdown menus etc.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"}],"time":{"modified":"2021-08-04T05:07:49.000Z","created":"2018-02-13T00:50:36.203Z","1.0.1":"2018-02-13T00:53:58.121Z","1.0.0":"2018-02-13T00:50:36.203Z"},"users":{},"author":{"name":"Joss Mackison"},"repository":{"type":"git","url":"https://github.com/jossmac/react-scroll-captor.git"},"versions":{"1.0.1":{"name":"react-scroll-captor","version":"1.0.1","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel src -d lib","watch":"babel src -d lib -w","delete":"rm -rf node_modules","lint":"eslint src/.","prepublish":"yarn run build","test":"jest","precommit":"flow check && lint-staged"},"jest":{"setupFiles":["./jest.js"]},"repository":{"type":"git","url":"https://github.com/jossmac/react-scroll-captor.git"},"keywords":["react","scroll","scroll-captor","scroll-capture","scroll-lock","scroll-handler"],"author":{"name":"Joss Mackison"},"license":"MIT","bugs":{"url":"https://github.com/jossmac/react-scroll-captor/issues"},"homepage":"https://github.com/jossmac/react-scroll-captor#readme","dependencies":{"react-node-resolver":"^1.0.1"},"peer-dependencies":{"react":"^15.0 || ^16.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.2.1","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","babel-preset-react":"^6.24.1","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","eslint":"^4.17.0","eslint-plugin-react":"^7.6.1","flow-bin":"^0.65.0","jest":"^22.2.2","jest-cli":"^22.2.2","react":"^16.2.0","react-dom":"^16.2.0"},"lint-staged":{"*.js":"eslint"},"description":"A component that confines scroll events to its immediate child. Great for dropdown menus etc.","licenseText":"MIT License\n\nCopyright (c) 2018 Joss Mackison\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"react-scroll-captor@1.0.1","dist":{"shasum":"3f912df72ab8e7f46d4fa27d8707131ffe59b353","size":4090,"noattachment":false,"key":"/react-scroll-captor/-/react-scroll-captor-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-scroll-captor/download/react-scroll-captor-1.0.1.tgz"},"maintainers":[{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"}],"_npmUser":{"name":"jossmac","email":"joss@keystonejs.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-scroll-captor_1.0.1_1518483238035_0.33507762653997686"},"_hasShrinkwrap":false,"publish_time":1518483238121,"_cnpm_publish_time":1518483238121},"1.0.0":{"name":"react-scroll-captor","version":"1.0.0","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel src -d lib","watch":"babel src -d lib -w","delete":"rm -rf node_modules","lint":"eslint src/.","prepublish":"yarn run build","test":"jest","precommit":"flow check && lint-staged"},"jest":{"setupFiles":["./jest.js"]},"repository":{"type":"git","url":"https://github.com/jossmac/react-scroll-captor.git"},"keywords":["react","scroll","scroll-captor","scroll-capture","scroll-lock","scroll-handler"],"author":{"name":"Joss Mackison"},"license":"MIT","bugs":{"url":"https://github.com/jossmac/react-scroll-captor/issues"},"homepage":"https://github.com/jossmac/react-scroll-captor#readme","dependencies":{"react-node-resolver":"^1.0.1"},"peer-dependencies":{"react":"^15.0 || ^16.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-eslint":"^8.2.1","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-flow":"^6.23.0","babel-preset-react":"^6.24.1","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.1.1","eslint":"^4.17.0","eslint-plugin-react":"^7.6.1","flow-bin":"^0.65.0","jest":"^22.2.2","jest-cli":"^22.2.2","react":"^16.2.0","react-dom":"^16.2.0"},"lint-staged":{"*.js":"eslint"},"description":"A component that confines scroll events to its immediate child. Great for dropdown menus etc.","licenseText":"MIT License\n\nCopyright (c) 2018 Joss Mackison\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"react-scroll-captor@1.0.0","dist":{"shasum":"939573a282bb54b72fccc155cf24bd54fc59d164","size":4107,"noattachment":false,"key":"/react-scroll-captor/-/react-scroll-captor-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-scroll-captor/download/react-scroll-captor-1.0.0.tgz"},"maintainers":[{"name":"jedwatson","email":"jed.watson@me.com"},{"name":"jossmac","email":"joss@keystonejs.com"}],"_npmUser":{"name":"jossmac","email":"joss@keystonejs.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-scroll-captor_1.0.0_1518483036014_0.5306188307556454"},"_hasShrinkwrap":false,"publish_time":1518483036203,"_cnpm_publish_time":1518483036203}},"readme":"# React Scroll Captor\n\nA component that confines scroll events to its immediate child. Great for dropdown menus etc.\n\n### Install\n\n```bash\nyarn add react-scroll-captor\n```\n\n### Use\n\n```jsx\nimport ScrollCaptor from 'react-scroll-captor';\n\nclass GroovyThing extends Component {\n  atBottom = () => {\n    // user has scrolled to the bottom\n  }\n  render () {\n    return (\n      <ScrollCaptor onBottomArrive={this.atBottom}>\n        <ScrollableElement />\n      </ScrollCaptor>\n    );\n  }\n}\n```\n\n### Props\n\n| Property         | Type       | Default    | Description |\n| ---------------- | ---------- | ---------- | ----------- |\n| `isEnabled`      | `boolean`  | `true` | Enable or disable the component. |\n| `onBottomArrive` | `function` | --     | Called when the user reaches the bottom of the scrollable element. |\n| `onBottomLeave`  | `function` | --     | Called when the user leaves the bottom of the scrollable element. |\n| `onTopArrive`    | `function` | --     | Called when the user reaches the top of the scrollable element. |\n| `onTopLeave`     | `function` | --     | Called when the user leaves the top of the scrollable element. |\n","_attachments":{},"homepage":"https://github.com/jossmac/react-scroll-captor#readme","bugs":{"url":"https://github.com/jossmac/react-scroll-captor/issues"},"license":"MIT"}