{"_id":"lethargy-ts","_rev":"10-2649f826c01c42ede51f00032a54a842","name":"lethargy-ts","dist-tags":{"latest":"0.1.0","beta":"0.0.6-beta.4"},"versions":{"0.0.1":{"name":"lethargy-ts","version":"0.0.1","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic","mouse"],"main":"lib/index.js","module":"lib/index.esm.js","types":"lib/types/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint","lint-fix":"eslint --fix","fix":"npm run prettier && npm run lint-fix","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","eslint-config-prettier":"^8.6.0","husky":"^8.0.3","lint-staged":"^13.1.2","prettier":"^2.8.4","pretty-quick":"^3.1.3","rollup":"^3.15.0","typescript":"^4.9.5"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"cb2d1b2264d68dff7a375a70f10596e372512762","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.1","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-+YY+Z0YSJmN5mvNzYdxY1XgL3oSe2HWnD/+Y2U0vGruUe0HpOzXcIKXzbIpo0wQhMfcjxiYfKros8pVuBoP6qw==","shasum":"c0f1ad8f17e0e5a8a975062d8c2e6d7cfb793636","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.1.tgz","fileCount":11,"unpackedSize":33112,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb2W38vi/TIeqW8lbqlwCk/adnSDYeb1gH3XsCrFd9qwIgORazXyAITyoA1GR1kJzRo0qCL3DlE2P1lRCtjfIbL9s="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj75a3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNUQ/+NIpTa2PjPnBL3Ji9w+gM1Krmkm1Xt0cN3hOT1IyfVcW2wxqE\r\n0v2YoSjdrahMgWTkv8LtRuuT/T/ZC4YsLMFLdGrRgDJxYCPrKrV8mCX2KAMt\r\nqjy+PusPtkVlLRcPiAGiNL3bCk7i9OEEcJz4i3KcMF+dtJp9sFiee/tFD8CE\r\nQ3wn4gs72ga28KPpxLuYorrBAtTxv6Oqr2p0H3uHNMaIzLZjjD3IgWV8W3gA\r\nv7/MWhP+NV7yBecAINAoJm8BFBFEidJnY4GRDHRJ4fPtEooDc1aP2otD89zB\r\nIHMPFJIv2PqYsel2qTxp54z6cYJ7DEKlX42bkI8nkSYkMm2qnjrKbrrC/Ljl\r\nsUIGEeJ0bO1Ap/qpOvpOzBm+mQsuBgR0koTqEM5MpUS7n4UF0mJGSuxRbchW\r\nZzaed84lGGYAhn+fEZb3/SJ4fD6wmWUn85ZxMD6g1IiADK9/Yj+D2h5edAgJ\r\nISnr0ADiFMJUkr2JUB2RG/O3CGCh3UahU2jH1TIA9Hh6k6WrGWlKgYbzGOyb\r\np78MWGHS3Wf410jq7XxTVk9VSRstfzBqTNU+dH+cv+wvL+yjSSHrMj/82a3D\r\n5sj7uV6BfHqcNUUIgnXcLB73Jx7bPV3PgBBbas5cNAaVoL0RZ/nDgOEVLwys\r\n7NOxD7CLaizeXbx1BtFmsQGJEj8S/EqFiA0=\r\n=KjkD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.1_1676646071102_0.028075895931597206"},"_hasShrinkwrap":false},"0.0.2":{"name":"lethargy-ts","version":"0.0.2","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"main":"lib/index.js","module":"lib/index.esm.js","types":"lib/types/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint","lint-fix":"eslint --fix","fix":"npm run prettier && npm run lint-fix","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","eslint-config-prettier":"^8.6.0","husky":"^8.0.3","lint-staged":"^13.1.2","prettier":"^2.8.4","pretty-quick":"^3.1.3","rollup":"^3.16.0","typescript":"^4.9.5"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"37c967c84d8b47b2dfa6b9e87417a2f6fb88e333","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.2","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-gzZyHM4iwbc6NV1nfSnrZnbMjGPxW470wJGUJeslVJLZqa9Yk5N7kkNhydKCvV0Qq9ppWxiI3YCPuW5jhZg2Eg==","shasum":"b5ebd057c2b7b2e41b325113a1b9bbdda7d8fa2c","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.2.tgz","fileCount":11,"unpackedSize":32575,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICn9vnjzmdj088VExXxH2+v4evJi8Ktzf9ln7XFbSzr6AiAr7kCYVIGx6Njp1EeWc7fcTqxRlrJlTxv8u8lsU2MA2A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj76TdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6mA//eMnN1dysnOT7eV8yJ/Ivrv9bisUun51MaHCZ3XuIZkUEUjET\r\nPQNH1ObFJnGLI1WebzRQ/x3py17zrB1Xus45kYoBF4aQID08TQg3xQH16s2e\r\nDze9UQ6+iB6fsgQl3ro4KC6WLnMD8b6MFi6nQjeEZBWohfNylYC+qYxLzeQe\r\nak/Zd5tlPIVjq1yBddrK+8YpWoLFsmy93ndijgPb2IdTcya7APi9uqLqjFMI\r\nv2kO9UP9rihVXFKdW8hx0wkclvpsdkMFzBnTf8DTV5m6D9rPjrVwZBBOvXdg\r\ncTs+CAaG9L4iL0mzDfJgXUOFJeReIabuPAdbsvfnlopjKkG1D0pibPF4hSkj\r\nPNSifptzpgkWQ+rYQ019cK/98OIblRA3I3w7TQ9Abh7p2FeLEXFLpw4W4KE2\r\nIq7d7iPQh/KwZD3DU8GRV+lKjPRXSS0cbOuPoV455ldx97+tfHMY0mO+gREL\r\nSxzyQ6LNFo0QEeNRQmsRepgmaOmoYPOdzWK/XCp4GNJf3OXVSLbQtfV/GAb5\r\naQwQp35X8yWNIarAlHEwTIJcsvr0npJ3DMeoGfLBGGvONMZCHePLxH2qojhu\r\nqEfelHBZfuegv9NJk0N+rDiYdc+0wqFBcta4nwCr6IwgDlYKap57dXaU3qp0\r\njaT9GUwFRUagJXIjNMuu9wxS2+I7pmxWSAo=\r\n=zEYB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.2_1676649693005_0.7919642544716652"},"_hasShrinkwrap":false},"0.0.3":{"name":"lethargy-ts","version":"0.0.3","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"main":"lib/index.js","module":"lib/index.esm.js","types":"lib/types/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint","lint-fix":"eslint --fix","fix":"npm run prettier && npm run lint-fix","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","eslint-config-prettier":"^8.6.0","husky":"^8.0.3","lint-staged":"^13.1.2","prettier":"^2.8.4","pretty-quick":"^3.1.3","rollup":"^3.17.0","typescript":"^4.9.5"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"4f00825c5e04f2c4c31a4da77f6df0738ba4c179","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.3","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-QZeXTD9+RNVpV+BE8/XbZl5hXiNX7JA0T329Gpw9a65OnSKQwpCa2N60obFa8ODA72HS5+PYjzlmL2c8dHLmew==","shasum":"80ca4af7fc5f1d0b5446497f706c2017e5dd30e4","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.3.tgz","fileCount":11,"unpackedSize":34800,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkcRF49AqfC1Jk9e5L4KtNqkIIZ0liq92CR/6Z/hH/awIhAOj//KGcVzGjyChIxeAHULT5cbPf+uf4JfXw1SqWYJgq"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8N6UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn3Q//UdW2+z8EdQERp/+FYFV/O05Itpjn30Xh+laDpDgiME2xYppE\r\nKgBPmU0w9VRu1+C7b/+1ZfuPuq+0Qq9IIj+Zu+s4zf1suiNM+zIPbz3zzDFR\r\nnyAveGbMU8TMzrws/SnJ7IYQPfwuc2z0594yg62f4qeNu5lHxyxNJa+JOXnh\r\nBmGj847MtKlFqjdkJAtO9GttVnX+hThiQL6vk7U1yBaWYnFyeUGu2Uui7ROD\r\nncYzZH3M3Wu8xx6XX9/n1SmhjODPP2WgtlSJZOKIl0l/D5Am3g5OjtDtCEnX\r\nGZb5mKjtcJXpNXMWwl8WF64ZMUn/O26uj+PAdXJ+CF1dxjeUZPH5Mz9a0iDt\r\nIOGXxlonaxDFvUzBArfcJcQR2FUl/HVW3J09+Fhu0rfBXxeZKhJeZ872Q6ym\r\n9iltdWGsGrRiAzn4sRJmdMzZh837KHHnZ9OifVf1eJueTK/TQ6yokslvaMMU\r\nZP3wj6QxfRRGQWJ4eyAIKWCeKpYCkpX5S/94JWkFXD9nmfRCBck6Jc+5HAbL\r\nK7CaX9ZvSuEqsSAmjfYBt+BIkLd2Al+Yem73E5gWhPaZkPhTosv2j4sWZLzo\r\njrDuV0QxwN+zqkJUbNAWX2vNXIEKT9LL9TfIrxzZzBCRRHay1Pf0PlTi7AX4\r\nW5cqC518ueh5to3E7S+KE1fHOp6a8WZePSg=\r\n=UmQg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.3_1676730003906_0.8786254413932053"},"_hasShrinkwrap":false},"0.0.4":{"name":"lethargy-ts","version":"0.0.4","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"main":"lib/index.js","module":"lib/index.esm.js","types":"lib/types/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint","lint-fix":"eslint --fix","fix":"npm run prettier && npm run lint-fix","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/eslint-plugin":"^5.54.1","@typescript-eslint/parser":"^5.54.1","@vitest/coverage-c8":"^0.29.2","eslint":"^8.35.0","eslint-config-prettier":"^8.7.0","happy-dom":"^8.9.0","husky":"^8.0.3","lint-staged":"^13.1.2","prettier":"^2.8.4","pretty-quick":"^3.1.3","rollup":"^3.18.0","typescript":"^4.9.5","vite":"^4.1.4","vitest":"^0.29.2"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"691629ff5a2452a9e14884fab8461907959b3d26","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.4","_nodeVersion":"19.7.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-4c2kcEBMjrUl5i7D0Nu7+3nuw0aPiJBipxg3M3bCBpvcRtZb/42wZgDYqpXpFrofySaoqfoM4oY1mB760e6Ncg==","shasum":"851067d7b161bb022b3da703a6ddb22b9ce9dc09","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.4.tgz","fileCount":15,"unpackedSize":48707,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDk036m1Y5MAKclB5BnI4PeNuaq+W1D8zKUVVJEXmffbAiAeGy5ZsKi8EZHTsDUG0vrAltDcOIw4x03s145RUCcwPA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBlhFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfOxAAhNWuw7faXoAG87XNk2Q9p68WAbvQrK/BDLhlSLgJPIbPXPB8\r\n86jZIXNCcaKjaocelrLA80vJ8EpXQAEclSU0uWjN+SyFCAPNQ4BveGOywKMb\r\n60vy8VzlI4iMthqSDRnY0lwxifK0wI0tSiihjp+gz0cZIsTziwjbjtMKEiiF\r\nhkXehDpZWLlZMSfOHX05HOXBEpjaVTO07tZSpP9FuHhv5EsIepaSgm7+L4lj\r\ndFndvv4tlOgh5wPKiWC7gphVD8q5fwwquxeCDjrC1cqB+k6N+qsjgBrV9XbN\r\ne6bF7kWomutg1yMUAvZNgcvNvQFjOQXrPBGkizWlw1VKnPxc/ceq48T7V+kk\r\nvGIe9ne4RX9xBvIDW/3aIzUZE8OCvmw9pVSOrWTKEtx+UkoxJ+xNTVAf0Cxy\r\n4H//bg5WwfKAfOz8ROYmHrXr45P+tDjHeWlvYtUWamD4a4RewciG9FGVdiDh\r\nqOUJDKQ/hGnoc7n+x0fMq1Z3p00pG1rXnZVKi+TPbRhpbS+sTJYot9lD1daM\r\noNZ91LtZT5yI7faRu+YdTjl20FxNQ9y5Ds6KA/0aqBhEmJ4/zJw+95L6hIaa\r\nZ0d2BOJbs1KLiM1mRvUDSVphb+7bJ+oLI20o1dxJPG1tUX57dLdgJal5AfHy\r\nLqdgyZIEWEYz9623424Pu4LLEhYgpOxsY5A=\r\n=+Egq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.4_1678137413698_0.09909500157209883"},"_hasShrinkwrap":false},"0.0.5":{"name":"lethargy-ts","version":"0.0.5","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"main":"lib/index.js","module":"lib/index.esm.js","types":"lib/types/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint","lint-fix":"eslint --fix","fix":"npm run prettier && npm run lint-fix","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/eslint-plugin":"^5.55.0","@typescript-eslint/parser":"^5.55.0","@vitest/coverage-c8":"^0.29.3","eslint":"^8.36.0","eslint-config-prettier":"^8.7.0","happy-dom":"^8.9.0","husky":"^8.0.3","lint-staged":"^13.2.0","prettier":"^2.8.5","pretty-quick":"^3.1.3","rollup":"^3.20.0","typescript":"^5.0.2","vite":"^4.2.0","vitest":"^0.29.3"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"08eed28b300f0fba83eefc21cdade3408ee1d7aa","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.5","_nodeVersion":"19.7.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-zgtxmwztrhTjiWOsNWM8vvI/UodRfzLb86F+mah9paNGngM+mlbZqiT5DIOQ6DwbZn+uVy5v6BYUHbhn+ThlbA==","shasum":"a6eeded9e028f4400b425c5d87e9650cc7668799","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.5.tgz","fileCount":15,"unpackedSize":48339,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDj9Av4CFd6MqF2fChx+7JZ6aHsX0xCInD2VW8Vj24GXAiAOZ6DwIYkwJ6zFBLHPqaIt2GwNPB4ztX2Y5yj7br9kJw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGCY5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSMQ/9FEvgziw9hiL7UoneHWvIL9dYzXFJRubsWvpBDLU4B3UX2q2E\r\niSYIiGXsVuhbEgWX0QF89O9VIaYLI7Kei5xWJ8wFVYdbzck14qg/ccEZ25Tr\r\n5CQTfvv9FI16SK/kBh0SyBzRc74Qtpf4EpoL4NZtrLwyO3KywuyKLfaz0dwV\r\n1/3yBP3mZUkLflGngGh9lQtNC4OZkFXEfK2VV7N0WLL+yR5jTRa8L/fkrSID\r\niCwyZVY092WazCli43/B48bjWKgHcfVbXUY7dozPVMCMrEiNPwttkVVc4QhX\r\niX2NrYmGamfJdJx9mUBSlqRnGASBDqXYkW858P+FIvB4fQ+bC8A5TThVZ434\r\n7/n9ZBPRLpjJXn27DbXueSTwapFrQWaSYaFCUH6LbyZreHUeZA8J4Q9tgfx7\r\nN1G0lkymVm6MWACkOPRjdjHLL/mJhkecO6yebMngidI7G+VjE0Tnw1feONAg\r\n86BkOIjHtTxdxEBSs11Jz0LFydHfL4+XtbYf7c/sSkutN22f1uL5YUAVPye6\r\n/vPngQutQPLLA1SU2Iwm4ieTgGqZ2zwxBjGyLFGefyP1wrWTyHK+d84msJ2U\r\nI6IgxdDXU8rfGuxjZ2bnN9b1ydoMX25FJ5TGXsqaXjlocYjUXVcNyg+DlzVZ\r\n0cWP/GwKR+Qt3OBfBurI/UlJ7QfmexeDzjk=\r\n=R/OY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.5_1679304249490_0.2354255835267378"},"_hasShrinkwrap":false},"0.0.6-beta.0":{"name":"lethargy-ts","version":"0.0.6-beta.0","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.7.1","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and inertia decay parameters to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  inertiaDecay: 20,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - Threshold for the amount of time between wheel events for them to be deemed separate.\n\n- `inertiaDecay` - Inertia event may be no more than this percent smaller than the previous event.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event is bigger than the delta of the previous event.\n\n- The vector of the event differs from the previous event.\n\n- The delta of the event has a high velocity and doesn't decrease.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The speed of the delta's change suddenly jumped.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","gitHead":"d541bd2b77cafb291e83481f46afab0f5ba4924d","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.6-beta.0","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-HsSqfWzaeUqxz/eXLMAbJiet7TRkT5u0jjczzUQ19nk3n1vjzRIGCtRvq4v9qoiaPOP2IUKCdpzyU3ubEVG32A==","shasum":"66557ac4b1aefd26696b3919d42ed2eda094d00e","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.6-beta.0.tgz","fileCount":14,"unpackedSize":30887,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOjeIR2g1I/qcVA9dJxH9zEWGa8J5O8SB0zMw/avldZAiEAxAKBd499jkHiqKfUpO+8YYqnuz0oG8fVH5TZ+rbZrvI="}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.6-beta.0_1715603269431_0.21196541489802279"},"_hasShrinkwrap":false},"0.0.6-beta.1":{"name":"lethargy-ts","version":"0.0.6-beta.1","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.7.1","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and [other parameters](https://github.com/snelsi/lethargy-ts/blob/master/src/types.ts) to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  highVelocity: 100,\n  increasingDeltasThreshold: 3,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - If there was a pause of this amount of milliseconds between two events, the current event is assumed to be user-triggered.\n\n- `highVelocity` - Events with high `wheelDelta` usually decay quickly. If `wheelDelta` is above this threshold and doesn't decrease, it's assumed to be user-triggered.\n\n- `increasingDeltasThreshold` - If `wheelDelta` has been increasing for this amount of consecutive events, the current event is assumed to be user-triggered.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The delta of the event doesn't decrease and has a high velocity.\n\n- The delta of the event has been increasing for `n` consecutive events.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","gitHead":"6a1c5995a7d99d6acab3a8a341ee1469caa8c633","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.6-beta.1","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-cslmCHwzJBGPK6HmfW5J24UrqRiioyHj0eRpX/AaTjrV4WikxOXwzA0JOo/Aj3LZqF72CYW44eLpAMKX662nHg==","shasum":"2d671432b8ac91b2c3bdb5b8f4ad11a971a52420","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.6-beta.1.tgz","fileCount":14,"unpackedSize":29235,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBySsU951KVnpLQPt3OKyo1kSAt5SmrYQws7ogzn9rpeAiAe41wu+x04mzNjxkohIJ7Iqau6O03fHONpdIK5bLaBKQ=="}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.6-beta.1_1715613538186_0.9746338982700753"},"_hasShrinkwrap":false},"0.0.6-beta.2":{"name":"lethargy-ts","version":"0.0.6-beta.2","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.7.1","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and [other parameters](https://github.com/snelsi/lethargy-ts/blob/master/src/types.ts) to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  highVelocity: 100,\n  increasingDeltasThreshold: 3,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - If there was a pause of this amount of milliseconds between two events, the current event is assumed to be user-triggered.\n\n- `highVelocity` - Events with high `wheelDelta` usually decay quickly. If `wheelDelta` is above this threshold and doesn't decrease, it's assumed to be user-triggered.\n\n- `increasingDeltasThreshold` - If `wheelDelta` has been increasing for this amount of consecutive events, the current event is assumed to be user-triggered.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The delta of the event doesn't decrease and has a high velocity.\n\n- The delta of the event has been increasing for `n` consecutive events.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","gitHead":"c8e0199c424cfd7f03f57dd2856d9bd759e9b61b","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.6-beta.2","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-hgu0dOxCJOacUaCOP7z6R/VdKm/t7QaGz1FBo3wAo18vAejHE4Le8rjL8285KK2BSdAE55DlldRKg+jtxe/+NA==","shasum":"5ccd7389515964ec4ef2ef7eab0c7cb7db2a1108","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.6-beta.2.tgz","fileCount":14,"unpackedSize":29565,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX3jnBoXoXgETU3mDPGbhGINw66A1VdV/lpfp7fV8UXgIgTCrPjHd6Q3czfFwVhOyyD5MXWyeNs54PMV+vlWbOekw="}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.6-beta.2_1715614347581_0.4611494198005417"},"_hasShrinkwrap":false},"0.0.6-beta.3":{"name":"lethargy-ts","version":"0.0.6-beta.3","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.7.1","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and [other parameters](https://github.com/snelsi/lethargy-ts/blob/master/src/types.ts) to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  highVelocity: 100,\n  increasingDeltasThreshold: 3,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - If there was a pause of this amount of milliseconds between two events, the current event is assumed to be user-triggered.\n\n- `highVelocity` - Events with high `wheelDelta` usually decay quickly. If `wheelDelta` is above this threshold and doesn't decrease, it's assumed to be user-triggered.\n\n- `increasingDeltasThreshold` - If `wheelDelta` has been increasing for this amount of consecutive events, the current event is assumed to be user-triggered.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The delta of the event doesn't decrease and has a high velocity.\n\n- The delta of the event has been increasing for `n` consecutive events.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","gitHead":"10b0ba8370f59c2f9e1c577d653df27c975ae261","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.6-beta.3","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-vpIEq282pGJA3UAE1U5PznzPb2SfsAldIO4DqI/let305zvLupqRXHEzI/q1dk1P21bDtCeKefqAk+GkEXeD0g==","shasum":"f628d82de6f99b713f9d7111f8590586470255a8","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.6-beta.3.tgz","fileCount":14,"unpackedSize":29577,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDlZHydI3sYPVSkS5O8X0olDEj+juRaqa/5AkANVbLYNAiACe18ZZOj1Zt9B85SIq5bW5STVH5MDz0q1Jm41j/gFHA=="}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.6-beta.3_1715784232198_0.544747338387443"},"_hasShrinkwrap":false},"0.0.6-beta.4":{"name":"lethargy-ts","version":"0.0.6-beta.4","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.7.1","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and [other parameters](https://github.com/snelsi/lethargy-ts/blob/master/src/types.ts) to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  increasingDeltasThreshold: 4,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - If there was a pause of this amount of milliseconds between two events, the current event is assumed to be user-triggered.\n\n- `increasingDeltasThreshold` - If `wheelDelta` has been increasing for this amount of consecutive events, the current event is assumed to be user-triggered.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The delta of the event has been increasing for `n` consecutive events.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","gitHead":"1085544276fce51e6c2cc0e6c1f90e5fc2e5aca1","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.0.6-beta.4","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-fK8yY4hN+AbAIFDEOyPEKM9D5aRq8SnjKYhBGhjX6S5WrQ225cZ8N+ddtI7KgLLXNQnxTPF+e3rTHKclC+4YSQ==","shasum":"87af763bb8ba0da52cdd68a1cbbb98495c3c0c7e","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.0.6-beta.4.tgz","fileCount":14,"unpackedSize":26791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMgYhcKlvwYKJuTNf3mlji0feG0N/RqUeUdcZ8BWi+WwIhAIIBHsVuCzrffkRDXPkA57m4DchDoPyObPXaP+gxWYn8"}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.0.6-beta.4_1715785839156_0.4568772197396491"},"_hasShrinkwrap":false},"0.1.0":{"name":"lethargy-ts","version":"0.1.0","description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"license":"MIT","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"type":"module","exports":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"rollup":"rollup -c","prettier":"prettier --write .","lint":"eslint --fix","fix":"npm run prettier && npm run lint","test":"vitest","coverage":"vitest run --coverage","pre-commit":"npm run lint && lint-staged","prepublishOnly":"npm run rollup"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","@typescript-eslint/eslint-plugin":"^7.9.0","@typescript-eslint/parser":"^7.9.0","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","happy-dom":"^14.11.0","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","pretty-quick":"^4.0.0","rollup":"^4.17.2","typescript":"^5.4.5","vite":"^5.2.11","vitest":"^1.6.0"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["pretty-quick --staged"]},"gitHead":"fed0c2a03f006360331fbafafb3216835af3d885","bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"homepage":"https://github.com/snelsi/lethargy-ts#readme","_id":"lethargy-ts@0.1.0","_nodeVersion":"20.10.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-ZNwMby5hVdtKsLCmQAw6ZwZV/YMnZglu6f7tCuoFq1nEGkBAqdzoGdtaObNa/tDQaA8yuyMNNfLpRaeIo8jXeA==","shasum":"70c40c2e26ab0899e049eee8dd31b5fd07ff6640","tarball":"https://registry.npmjs.org/lethargy-ts/-/lethargy-ts-0.1.0.tgz","fileCount":14,"unpackedSize":26785,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJV9c0geOfUZEJGjv1TxK85BT4oBqO+B6MFIggD0VswAiAB7fqj1ul/t08EH08SxpxHhEovSq1L2BVBLw9+FkMyBw=="}]},"_npmUser":{"name":"snelsi","email":"npm@snelsi.com"},"directories":{},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lethargy-ts_0.1.0_1715787109942_0.5806674987284748"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-17T15:01:11.101Z","0.0.1":"2023-02-17T15:01:11.290Z","modified":"2024-05-15T15:31:50.307Z","0.0.2":"2023-02-17T16:01:33.172Z","0.0.3":"2023-02-18T14:20:04.071Z","0.0.4":"2023-03-06T21:16:53.856Z","0.0.5":"2023-03-20T09:24:09.608Z","0.0.6-beta.0":"2024-05-13T12:27:49.572Z","0.0.6-beta.1":"2024-05-13T15:18:58.336Z","0.0.6-beta.2":"2024-05-13T15:32:27.771Z","0.0.6-beta.3":"2024-05-15T14:43:52.347Z","0.0.6-beta.4":"2024-05-15T15:10:39.307Z","0.1.0":"2024-05-15T15:31:50.130Z"},"maintainers":[{"name":"snelsi","email":"npm@snelsi.com"}],"description":"Distinguish between scroll events initiated by the user, and those by inertial scrolling","homepage":"https://github.com/snelsi/lethargy-ts#readme","keywords":["scroll","wheel","mouse","mousewheel","scrolljacking","inertial","trackpad","magic"],"repository":{"type":"git","url":"git+https://github.com/snelsi/lethargy-ts.git"},"bugs":{"url":"https://github.com/snelsi/lethargy-ts/issues"},"license":"MIT","readme":"# ⭐ Lethargy-TS\n\n`lethargy-ts` is a modern TypeScript rewrite of `lethargy` – a popular JavaScript library to help distinguish between scroll events initiated by the user, and those by inertial scrolling.\n\n[![npm (scoped)](https://img.shields.io/npm/v/lethargy-ts?style=flat-square)](https://www.npmjs.com/package/lethargy-ts)\n[![Bundle Size](https://img.shields.io/bundlephobia/min/lethargy-ts?style=flat-square)](https://bundlephobia.com/result?p=lethargy-ts)\n![type definition](https://img.shields.io/npm/types/lethargy-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/snelsi/lethargy-ts/blob/master/LICENSE)\n\n🌳 Tiny and easy to use\n\n🦄 Written in TypeScript\n\n🎏 Highly customizable\n\n🏖 No external dependencies\n\n## Install\n\nInstall with Yarn:\n\n```ssh\nyarn add lethargy-ts\n```\n\nOr with npm:\n\n```ssh\nnpm install --save lethargy-ts\n```\n\n## Usage\n\nImport and create an instance of `Lethargy`. It will remember previously checked `wheelEvents` to help determine if they are inertial or not:\n\n```tsx\nimport { Lethargy } from \"lethargy-ts\";\n\nconst lethargy = new Lethargy();\n```\n\nYou can customize the sensitivity, delay, and [other parameters](https://github.com/snelsi/lethargy-ts/blob/master/src/types.ts) to better match your application's needs:\n\n```tsx\nconst lethargy = new Lethargy({\n  sensitivity: 2,\n  delay: 100,\n  increasingDeltasThreshold: 3,\n});\n```\n\n> 😉 If you find optimizations for the defaults, please share them in this [discussion](https://github.com/snelsi/lethargy-ts/discussions/2)!\n\nBind the wheel event and pass the event to `Lethargy`:\n\n```tsx\nconst checkWheelEvent = (e: WheelEvent) => {\n  const isIntentional = lethargy.check(e);\n\n  if (isIntentional) {\n    // Do something with the scroll event\n  }\n};\n\nwindow.addEventListener(\"wheel\", checkWheelEvent, { passive: true });\n```\n\n`lethargy.check(e)` will return `true` if it's a normal wheel event initiated by the user, and `false` if it's initiated by inertial scrolling.\n\n## Options\n\nAll parameters are optional:\n\n- `sensitivity` - Specifies the minimum value for `wheelDelta` for it to register as a valid scroll event. Because the tail of the curve has low `wheelDelta` values, this will stop them from registering as valid scroll events.\n\n- `delay` - If there was a pause of this amount of milliseconds between two events, the current event is assumed to be user-triggered.\n\n- `increasingDeltasThreshold` - If `wheelDelta` has been increasing for this amount of consecutive events, the current event is assumed to be user-triggered.\n\n## What problem does it solve?\n\nScroll plugins such as [smartscroll](https://github.com/d4nyll/smartscroll), [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel), or [fullPage.js](http://alvarotrigo.com/fullPage/) work by detecting scroll events and then doing something with them, such as scrolling to the next frame. However, inertial scrolling continues to emit scroll events even after the user stopped, and this can often lead to problems, such as scrolling multiple frames when the user only intended to scroll once. `lethargy-ts` helps distinguish between scroll events initiated by the user and those by inertial scrolling, making it easier to create smooth and accurate scrolling experiences.\n\n## How it works\n\n`lethargy-ts` uses a set of checks to determine if a scroll event is initiated by the user or by inertial scrolling. The following checks are performed:\n\n- Enough time has passed between two events.\n\n- The delta of the event doesn't decrease and immediately follows a known human event.\n\n- The delta of the event has been increasing for `n` consecutive events.\n\nIf any of these checks are true, the event is considered intentional. Otherwise, it is considered to be initiated by inertial scrolling.\n\n## Limitations\n\nNot all trackpads work the same, so `Lethargy` makes its best effort to cover as many use cases as possible, but full coverage is not guaranteed. `Lethargy` focuses on preventing false positives (i.e., saying it's a normal scroll event when it wasn't) but tolerates false negatives (i.e., saying it's not a normal scroll event when it is).\n\nSadly, right now there is no easy native way to tell if the wheel event was generated by the user or by inertia.\nYou can change this by leaving an upvote and a comment in the [w3c proposal ticket](https://github.com/w3c/uievents/issues/58). 👈\n\n## TypeScript\n\nThe module is written in TypeScript and type definitions are included.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## Show your support\n\nIf you find this project useful, please give it a star on GitHub! ⭐️\n\n## LICENSE\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}