{"_id":"@artginzburg/use-scroll-sync","_rev":"2-41b1359fb11c627d144971c31a43b084","name":"@artginzburg/use-scroll-sync","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@artginzburg/use-scroll-sync","version":"1.0.1","description":"Sync scroll positions between multiple elements (on both axes).","author":{"name":"Travis Arnold"},"contributors":[{"name":"Art Ginzburg","email":"art.ginzburg@ya.ru","url":"https://ginzburg.art"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/artginzburg/use-scroll-sync.git"},"module":"dist/use-scroll-sync.esm.js","main":"dist/index.js","typings":"dist/index.d.ts","keywords":["react","sync","scroll","hook"],"scripts":{"develop":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build"},"peerDependencies":{"react":">=16.8"},"devDependencies":{"@types/jest":"^26.0.20","@types/react":"^17.0.3","@types/react-dom":"^17.0.2","husky":"^5.1.3","react":"^17.0.1","react-dom":"^17.0.1","tsdx":"^0.14.1","tslib":"^2.1.0","typescript":"^4.2.3"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":false,"singleQuote":true,"trailingComma":"es5"},"gitHead":"e8105ca3ac30a624fbaaec521169d957afbbae80","bugs":{"url":"https://github.com/artginzburg/use-scroll-sync/issues"},"homepage":"https://github.com/artginzburg/use-scroll-sync#readme","_id":"@artginzburg/use-scroll-sync@1.0.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-s2hHUYaST8m7ibKggg/Sawk+sqc6kDO1mFuCyvyOH6dl4VF+1IFqQwXrFPDsSXCL6zCAJdJT+G1e3WEpANnE1g==","shasum":"7f3a8ebf27906dbcc76994c0744d49d54fcc2162","tarball":"https://registry.npmjs.org/@artginzburg/use-scroll-sync/-/use-scroll-sync-1.0.1.tgz","fileCount":11,"unpackedSize":18000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHfbiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp48g/+O7Tpfo+6g3YW9Ng5OZFsUko0a+V4fNdqhVus67FiVh4CG29R\r\nr77/FzGyik2iok7Wpn9szZSnseE1e7HghQ53rKNzEUQS3fmIkZlBo9PXJ5ZJ\r\nLdITmRJ3HsGfbljs+PqMoIGDXmcEAf3bDsWuROUqiJ++n14fU4FM+AQ0dImz\r\nF9LhL5QZ6sojvACTYKXC+qsyWUSFNqswY2flsc/1oniHvzouSNH3NFHfvdnS\r\nk2BZ3r0uWkwZAToL+L8Fx0jPBq0PoutGR3B/ni2QYrQr2oO/bbpa8L4SyVeM\r\nmbeIh/TQLlcv5dLAE5opJXfgJVe0dQywiTCGWGyr9x+352WWnoZzCC21EEd1\r\nMPw3EOWgIWfc5R7l5pV56kcSU86xNPC9Qes83MiLCWwHstKQkxKx3KMcxi8T\r\nrORat8ZxLYWgjFEGa9wfaJdt2SmTTTkudtfMKZQeyZf1vFwlbqdtD7vdb3N6\r\nIL4saMpDhrHiQDvqHNw0QaMYZBiis6ZvEdmgUqHFWbM2T64BSJVMnP/q4hXZ\r\n7eyV789YouDOB8JiZbpUry9mwaVYn/a34FMCO4SALFT+FNwc6frOtJdnNxsY\r\nwPyh9b0kzgdNvz4uoJm7/UQEfTWrwC5eZV4oTmxCwf63L/S+rovCf5loD7gq\r\nzpZqbZqoX4dRocEVjnkijIVtjKUlAjO6By4=\r\n=BLsS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZQQ2eAlAx7uvq06CLEvnJRRFqG3zvGZPFLWrugFqpLwIhAJrJMN5WuVKvfjm90JHRqfK07W5ygYttcCGEox4OxxcI"}]},"_npmUser":{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"},"directories":{},"maintainers":[{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-scroll-sync_1.0.1_1646130913761_0.8624085491235123"},"_hasShrinkwrap":false},"1.0.2":{"name":"@artginzburg/use-scroll-sync","version":"1.0.2","description":"Sync scroll positions between multiple elements (on both axes).","author":{"name":"Travis Arnold"},"contributors":[{"name":"Art Ginzburg","email":"art.ginzburg@ya.ru","url":"https://ginzburg.art"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/artginzburg/use-scroll-sync.git"},"module":"dist/use-scroll-sync.esm.js","main":"dist/index.js","typings":"dist/index.d.ts","keywords":["react","sync","scroll","hook"],"scripts":{"develop":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build"},"peerDependencies":{"react":">=16.8"},"devDependencies":{"@types/jest":"^26.0.20","@types/react":"^17.0.3","@types/react-dom":"^17.0.2","husky":"^5.1.3","react":"^17.0.1","react-dom":"^17.0.1","tsdx":"^0.14.1","tslib":"^2.1.0","typescript":"^4.2.3"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":false,"singleQuote":true,"trailingComma":"es5"},"gitHead":"0f06eea7de514ebdbe4e41229358f339d0cc8e31","bugs":{"url":"https://github.com/artginzburg/use-scroll-sync/issues"},"homepage":"https://github.com/artginzburg/use-scroll-sync#readme","_id":"@artginzburg/use-scroll-sync@1.0.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-49fsX+lUNL0efMlSROxdxNwF+EOvFE0blChexVRQJLv95QQapP68ERuOu2dCx3Zo3sXA91lW8VKl38lvD8QpGA==","shasum":"a5f06924296d8faf85edad9cf61cfd5a01705d9d","tarball":"https://registry.npmjs.org/@artginzburg/use-scroll-sync/-/use-scroll-sync-1.0.2.tgz","fileCount":11,"unpackedSize":19200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHf7KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1nhAAhoJLXM8jDgM1gUcBLKk7bGaseLePniFR3Bijc2rNp+8E61+e\r\niOxuXTHsBJaDAvgOKRRZdw3TbEw/5UnKxC5GpuAASice/P5f0BozajDl3Xho\r\n5q3ic1FGX4cvs/GdxYdsqC1YIFsPgXy6f1I+5ZD/hNID8u/yInf9pSpMKOGS\r\nrTRXypgb3Wm6Zwt2DUPggJ89sCF/3OqUWwVqpDy1/245ua/KEURbXX31xgeK\r\nb+hZMc5hOt1CkD8F789OV1As6Zs7Eg66RxTouuxhPDCe9M26l7dVJcPfqYhe\r\n3jUtS4zTzr1bsRdJLbHaX3iKw4+TC5zSDnswBQxu+ybfUJIwV9/5V6TFKeoH\r\nMnr14ArV/LMGonFl7066fciIXEY/IpCkGuunGN+3hvL+C0S+7PnXaQ8Wv+FZ\r\n+CjDBGxX4ZKIoUbchuALrNaR2PkP3jG0v/jaaMV0sefwtiO0XAbVJz6Hsw1Y\r\nTlKrp6Z9laKmC4eytchSmeAT1cjlc8HKK/HcCMjzlQ4CIJHGtmaGWY4pLjmD\r\nw2Qci3ccEMrBVjqCsiPcUptyoz3BpFd1kfHLf0bh022SqQnS+ly090v4ATVf\r\nMukzYDcF/GPueM3hVodxLusUjerxGROhsZNZka1yrK+as8gs6f+sFNJxOvwI\r\n3APDtIePMetAU044rCcFNpR+oKnq6u2Jv88=\r\n=MPGb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy1capkvIz8Sbsw48Dp3m32iO89bIG5zYgrZql376ExgIgKQ5iei5k/3q35iTCEJnGrDDqUOxTFhpE+4WNm2aK3Pc="}]},"_npmUser":{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"},"directories":{},"maintainers":[{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-scroll-sync_1.0.2_1646132938542_0.6052091688792063"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-01T10:35:13.684Z","1.0.1":"2022-03-01T10:35:14.088Z","modified":"2022-04-04T15:37:18.472Z","1.0.2":"2022-03-01T11:08:58.678Z"},"maintainers":[{"name":"artginzburg","email":"ginzburg.arthur@gmail.com"}],"description":"Sync scroll positions between multiple elements (on both axes).","homepage":"https://github.com/artginzburg/use-scroll-sync#readme","keywords":["react","sync","scroll","hook"],"repository":{"type":"git","url":"git+https://github.com/artginzburg/use-scroll-sync.git"},"contributors":[{"name":"Art Ginzburg","email":"art.ginzburg@ya.ru","url":"https://ginzburg.art"}],"author":{"name":"Travis Arnold"},"bugs":{"url":"https://github.com/artginzburg/use-scroll-sync/issues"},"license":"MIT","readme":"# useScrollSync\n\nSync scroll positions between multiple elements.\n\nThis fork differs from the main one — it allows to also sync vertical scrolling position, in addition to horizontal, and requires first argument as the synchronization options.\n\n<small>Note, if the main thread is too busy or the user's battery is low, scrollbars can get out of sync.</small>\n\n## Install\n\n```bash\nyarn add @artginzburg/use-scroll-sync\n```\n\n```bash\nnpm install @artginzburg/use-scroll-sync\n```\n\n## Example\n\n```jsx\nimport * as React from 'react'\nimport { useScrollSync } from 'use-scroll-sync'\n\nfunction SyncedScrollbars() {\n  const headerRef = React.useRef()\n  const mainRef = React.useRef()\n  useScrollSync({ vertical: true }, headerRef, mainRef)\n  return (\n    <div>\n      <header ref={headerRef}>...</header>\n      <main ref={mainRef}>...</main>\n    </div>\n  )\n}\n```\n","readmeFilename":"README.md"}