{"_id":"svelte-disable-preload","_rev":"2-dfcaadaa63c2d9dc418257109b5b2e86","name":"svelte-disable-preload","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"svelte-disable-preload","version":"0.0.1","type":"module","keywords":["svelte","sveltekit","preload","canvas","animation"],"exports":{".":"./dist/index.js"},"module":"dist/index.js","types":"dist/index.d.ts","homepage":"https://captaincodeman.github.io/svelte-disable-preload/","repository":{"type":"git","url":"git+https://github.com/captaincodeman/svelte-disable-preload.git"},"author":{"name":"Simon Green","email":"simon@captaincodeman.com","url":"https://www.captaincodeman.com/"},"scripts":{"dev":"vite dev","build":"vite build","preview":"vite preview","package":"tsup","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"devDependencies":{"@sveltejs/adapter-auto":"^1.0.0","@sveltejs/kit":"^1.0.0","svelte":"^3.54.0","svelte-check":"^3.0.1","tslib":"^2.4.1","tsup":"^6.5.0","typescript":"^4.9.3","vite":"^4.0.0"},"gitHead":"bc3ee9609a7d5d829035380d72a092ea8fa1259d","description":"![minified](https://img.shields.io/bundlephobia/min/svelte-disable-preload/0.0.1?style=for-the-badge) ![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-disable-preload/0.0.1?style=for-the-badge)","bugs":{"url":"https://github.com/captaincodeman/svelte-disable-preload/issues"},"_id":"svelte-disable-preload@0.0.1","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Jhqgx056c0tWXZyavWGBFxhzIHGO82OJN5hPCgPY6/nBdrzv3/ZBXFH7T2DBgwNzNmGdc7T+hNc2t9CijZy6AQ==","shasum":"1832dbe7d3688f402176859bb17aa489e2f35c6c","tarball":"https://registry.npmjs.org/svelte-disable-preload/-/svelte-disable-preload-0.0.1.tgz","fileCount":4,"unpackedSize":3079,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCy41kEwW4MtJwNcewzi6gr3VRPfw/U8Ejy6p6dBWB4gIhAKMcD1AuUzgbu99iYX9wELWyFhU15026KyMUoJkQxMJW"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2BxZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpiA//a3CzyosYdtJv2IAbF7fcylvbY4YcqpKd58i2FpSgIkxnYUEK\r\nTkhx2oWEsQwGzwFr67rHXnL3W8FvwfVDk1XTCZpeqHID+1dxowBL5Hhmbp0e\r\nkPP8t1IurKUSDs5XfKliMuDZVBw/Q1Bx0xgms8SIwwSksCdpZlRYs4Wk50Dk\r\n9jxo/8R+wiE7zNXO/YSpKlIfrSttxfg5Kk6kDjt/6//C5k7ywv51qWAeQAZo\r\nbd5QdJ8AZTQyqAhBB685+RyNP0sOZ0Tv0erOMavIDSIacIegDkX/wGW5WBO7\r\ntt1NRrFBjlb42wkx2vQQZy2fyvRMj9qDMwzFaYaFdekP2IHF7U9NKvs7I99U\r\ntBXFkmSUNu9zON9NRODEodLzcvhAJjaVIpHxjnMoLfOKQlu29yYA++VZvFl2\r\nCRN5fRikVg8V4THM9csc5YuZd+8MI5fndlAjJBNqcYUS3Shw9IJLE6iRkSXh\r\ncNG+FQ56amoTKgu7R/wYU533rahOFygvUc9U6kXdDZcPgW/cuHVkNybTkItY\r\nhQqFuz+zFxCOD14Yzx9JwCafga3BUeeeWHfsH095Z4/CZ7KGjfizsGEzpuht\r\nmBxetaCwT53M9Bcxd4gW3aDC2vW8aflL1Di33/k2mj19spcPsZaqr+9A73zt\r\n+33unCEbsqe0HS+8jtnhSyw6ZqYIXeWEVvw=\r\n=X7C7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-disable-preload_0.0.1_1675107416961_0.20635017958561397"},"_hasShrinkwrap":false},"0.0.2":{"name":"svelte-disable-preload","version":"0.0.2","type":"module","keywords":["svelte","sveltekit","preload","canvas","animation"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"module":"dist/index.js","types":"dist/index.d.ts","homepage":"https://captaincodeman.github.io/svelte-disable-preload/","repository":{"type":"git","url":"git+https://github.com/captaincodeman/svelte-disable-preload.git"},"author":{"name":"Simon Green","email":"simon@captaincodeman.com","url":"https://www.captaincodeman.com/"},"license":"MIT","devDependencies":{"@sveltejs/adapter-auto":"^2.1.0","@sveltejs/kit":"^1.20.4","publint":"^0.1.12","svelte":"^4.0.0","svelte-check":"^3.4.4","tslib":"^2.5.3","tsup":"^7.0.0","typescript":"^5.1.3","vite":"^4.3.9"},"scripts":{"dev":"vite dev","build":"vite build","preview":"vite preview","package":"tsup && publint","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"description":"![minified](https://img.shields.io/bundlephobia/min/svelte-disable-preload/0.0.2?style=for-the-badge) ![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-disable-preload/0.0.2?style=for-the-badge)","bugs":{"url":"https://github.com/captaincodeman/svelte-disable-preload/issues"},"_id":"svelte-disable-preload@0.0.2","_integrity":"sha512-xA6aaT3jgcMgSeOpzlfkIUa1SgKIc5yesPou8N/QiSOWYVq8EMlzFiBGaoDJbr+UEGLs8vBCAjwcYXtDXmFRrQ==","_resolved":"/private/var/folders/w1/tr45pbks617dj6jdj17g6df40000gn/T/592ef3e39ce0d60537318e8f591a133d/svelte-disable-preload-0.0.2.tgz","_from":"file:svelte-disable-preload-0.0.2.tgz","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-xA6aaT3jgcMgSeOpzlfkIUa1SgKIc5yesPou8N/QiSOWYVq8EMlzFiBGaoDJbr+UEGLs8vBCAjwcYXtDXmFRrQ==","shasum":"5bbb4e73f905b38eaa08fc292988f074155c4fe5","tarball":"https://registry.npmjs.org/svelte-disable-preload/-/svelte-disable-preload-0.0.2.tgz","fileCount":5,"unpackedSize":4336,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFX39vXtBZ2eycDEgllm5Cbh5OKPdqEZvtTwjgXlByDVAiEAjp93RMlrHZfKsRqNovbVxDzJpGfW77y5LmFbl1t0pD8="}]},"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-disable-preload_0.0.2_1687447840388_0.12251004721621217"},"_hasShrinkwrap":false},"0.0.3":{"name":"svelte-disable-preload","version":"0.0.3","type":"module","keywords":["svelte","sveltekit","preload","canvas","animation"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","svelte":"./dist/index.js"}},"module":"dist/index.js","types":"dist/index.d.ts","homepage":"https://captaincodeman.github.io/svelte-disable-preload/","repository":{"type":"git","url":"git+https://github.com/captaincodeman/svelte-disable-preload.git"},"author":{"name":"Simon Green","email":"simon@captaincodeman.com","url":"https://www.captaincodeman.com/"},"license":"MIT","devDependencies":{"@sveltejs/adapter-auto":"^3.2.0","@sveltejs/kit":"^2.5.7","@sveltejs/vite-plugin-svelte":"^3.1.0","publint":"^0.2.7","svelte":"^4.2.15","svelte-check":"^3.7.0","tslib":"^2.6.2","tsup":"^8.0.2","typescript":"^5.4.5","vite":"^5.2.10"},"scripts":{"dev":"vite dev","build":"vite build","preview":"vite preview","package":"tsup && publint","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"description":"![minified](https://img.shields.io/bundlephobia/min/svelte-disable-preload/0.0.2?style=for-the-badge) ![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-disable-preload/0.0.2?style=for-the-badge)","bugs":{"url":"https://github.com/captaincodeman/svelte-disable-preload/issues"},"_id":"svelte-disable-preload@0.0.3","_integrity":"sha512-PmlGimKnst3KoFlvhkU+LrcJn6gO+HbZEj22EX1LsQy4HGS+62BRwvJSI/wLpziFhovs7m9M6XvFsVCAOnU1zg==","_resolved":"/private/var/folders/w1/tr45pbks617dj6jdj17g6df40000gn/T/45ca0c640c0525a57e96f95b1a92b7cd/svelte-disable-preload-0.0.3.tgz","_from":"file:svelte-disable-preload-0.0.3.tgz","_nodeVersion":"22.0.0","_npmVersion":"10.5.1","dist":{"integrity":"sha512-PmlGimKnst3KoFlvhkU+LrcJn6gO+HbZEj22EX1LsQy4HGS+62BRwvJSI/wLpziFhovs7m9M6XvFsVCAOnU1zg==","shasum":"d1a0017f4f0545beb412b279cb9432a30c252cb4","tarball":"https://registry.npmjs.org/svelte-disable-preload/-/svelte-disable-preload-0.0.3.tgz","fileCount":5,"unpackedSize":4398,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1k8Xiec9CZBNcNaMIXMySZxcYTQ8wUp3mdciNmmChzgIgR1PHsEbxi87/oVDsO4Bp/qQwcJU/TRJjEfA3cDoxw/8="}]},"_npmUser":{"name":"captaincodeman","email":"simon@captaincodeman.com"},"directories":{},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-disable-preload_0.0.3_1714421546488_0.42948573673905877"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-30T19:36:56.960Z","0.0.1":"2023-01-30T19:36:57.148Z","modified":"2024-04-29T20:12:26.868Z","0.0.2":"2023-06-22T15:30:40.535Z","0.0.3":"2024-04-29T20:12:26.681Z"},"maintainers":[{"name":"captaincodeman","email":"simon@captaincodeman.com"}],"description":"![minified](https://img.shields.io/bundlephobia/min/svelte-disable-preload/0.0.2?style=for-the-badge) ![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-disable-preload/0.0.2?style=for-the-badge)","homepage":"https://captaincodeman.github.io/svelte-disable-preload/","keywords":["svelte","sveltekit","preload","canvas","animation"],"repository":{"type":"git","url":"git+https://github.com/captaincodeman/svelte-disable-preload.git"},"author":{"name":"Simon Green","email":"simon@captaincodeman.com","url":"https://www.captaincodeman.com/"},"bugs":{"url":"https://github.com/captaincodeman/svelte-disable-preload/issues"},"readme":"# svelte-disable-preload\n\n![minified](https://img.shields.io/bundlephobia/min/svelte-disable-preload/0.0.2?style=for-the-badge)\n![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-disable-preload/0.0.2?style=for-the-badge)\n\nSveltKit provides a client-side router that handles navigation when anchor elements are clicked. It can also be [configured to preload data](https://kit.svelte.dev/docs/link-options) to make your app seem \"snappier\". It does this by listening for various `click`, `mousedown`, `mousemove`, and `touchstart` events on the document which will bubble from elements.\n\nFor typical \"web-app\" use, this is no problem. But if you're working with HTML `canvas` elements and `requestAnimationFrame` animations, you may not want these extra event handlers being invoked - it can introduce a slight 'juddering' effect and spoil an otherwise smooth animation.\n\nThere is [an option to disable it](https://kit.svelte.dev/docs/link-options#disabling-options) but this only disables the _behavior_ from being invoked, i.e. the preloading itself - the event listeners are still there.\n\nThis package provides a simple action to apply noop event listeners to an element that prevent the document-level SvelteKit event handlers being invoked.\n\n## Usage\n\nInstall using your package manager of choice, e.g.\n\n    pnpm i svelte-no-preload\n\nImport it into your component and `use:` it on an element:\n\n```svelte\n<script lang=\"ts\">\n  import { disablePreload } from 'svelte-disable-preload'\n</script>\n\n<canvas use:disablePreload />\n```\n\nYour canvas interactions should now be slightly smoother.\n","readmeFilename":"README.md","license":"MIT"}