{"_id":"@flourish/smooth-resize","_rev":"97-d061d6630d0dc87d7703707fcd8c2381","name":"@flourish/smooth-resize","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@flourish/smooth-resize","version":"0.1.0","author":{"name":"Kiln Enterprises Ltd"},"license":"UNLICENSED","_id":"@flourish/smooth-resize@0.1.0","maintainers":[{"name":"robinhouston","email":"accounts@kiln.it"}],"homepage":"https://github.com/kiln/smooth-resize#readme","bugs":{"url":"https://github.com/kiln/smooth-resize/issues"},"dist":{"shasum":"d6347dce45d3683d5657fc3121dcd188cfd4aba5","tarball":"https://registry.npmjs.org/@flourish/smooth-resize/-/smooth-resize-0.1.0.tgz","integrity":"sha512-cmXuz1EcJr1lGKCwp4hvCzrskbqXTUPBOZxD38EV8W2mBfgN3H17lYPO0ZXcmGZw+qhickDgr1LSP2AU0lEx5A==","signatures":[{"sig":"MEUCIQCkAPhi9OBgTuXlNEKxoTaIaxFcFtCEq65vqxHZLxfUGwIgISbn6vhHa2B9eCq/WZapBU5FyV+S2oWB43CGazdWcI8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"smooth_resize.js","_from":".","module":"src/index.js","_shasum":"d6347dce45d3683d5657fc3121dcd188cfd4aba5","gitHead":"f0d22dd3c26b685d3bea698719df76d77d4cd45b","scripts":{"prepublish":"rollup -c"},"_npmUser":{"name":"robinhouston","email":"accounts@kiln.it"},"repository":{"url":"git://github.com/kiln/smooth-resize.git","type":"git"},"_npmVersion":"4.0.3","description":"Smoothly animated window resizing","directories":{},"_nodeVersion":"6.3.0","devDependencies":{"rollup":"^0.41.1"},"_npmOperationalInternal":{"tmp":"tmp/smooth-resize-0.1.0.tgz_1484594987285_0.010096003068611026","host":"packages-18-east.internal.npmjs.com"}},"0.2.0":{"name":"@flourish/smooth-resize","version":"0.2.0","author":{"name":"Kiln Enterprises Ltd"},"license":"BSD-3-Clause","_id":"@flourish/smooth-resize@0.2.0","maintainers":[{"name":"duncanclark","email":"duncan@kiln.digital"},{"name":"robinhouston","email":"accounts@kiln.it"}],"homepage":"https://github.com/kiln/smooth-resize#readme","bugs":{"url":"https://github.com/kiln/smooth-resize/issues"},"dist":{"shasum":"7fd48a726c8c0bafa119f38946cafaa88bacb47a","tarball":"https://registry.npmjs.org/@flourish/smooth-resize/-/smooth-resize-0.2.0.tgz","integrity":"sha512-Z8IoYGXRVsoYPY4qVTthqI0iKlnMptVhYmCVYTWIOX8BNN4VX/BJhBe3YSWuYk7yIwfdI5iodwougShzkd2CXg==","signatures":[{"sig":"MEUCIHW3h+ckELincTDsLkXdCqBJ09y7U4PcwYdUM0anguHyAiEAh4kji4aGCSm6IBmIIlSO14PJIDtC4+hW9hfHUUmCDwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"smooth-resize.js","_from":".","module":"src/index.js","_shasum":"7fd48a726c8c0bafa119f38946cafaa88bacb47a","gitHead":"7510b285a3ffd35a0d0bbc7d8e88b25a9643f305","scripts":{"minify":"uglifyjs -m -o smooth-resize.min.js smooth-resize.js","prepublish":"rollup -c && npm run minify"},"_npmUser":{"name":"robinhouston","email":"accounts@kiln.it"},"repository":{"url":"git://github.com/kiln/smooth-resize.git","type":"git"},"_npmVersion":"4.0.3","description":"Smoothly animated window resizing","directories":{},"_nodeVersion":"6.3.0","devDependencies":{"rollup":"^0.41.1","uglify":"^0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/smooth-resize-0.2.0.tgz_1484849110095_0.7378496227320284","host":"packages-12-west.internal.npmjs.com"}},"0.2.1":{"name":"@flourish/smooth-resize","version":"0.2.1","author":{"name":"Kiln Enterprises Ltd"},"license":"BSD-3-Clause","_id":"@flourish/smooth-resize@0.2.1","maintainers":[{"name":"duncanclark","email":"duncan@kiln.digital"},{"name":"robinhouston","email":"accounts@kiln.it"}],"homepage":"https://github.com/kiln/smooth-resize#readme","bugs":{"url":"https://github.com/kiln/smooth-resize/issues"},"dist":{"shasum":"a2461c2c7360e90f9ee49894ff639d49f03cc45d","tarball":"https://registry.npmjs.org/@flourish/smooth-resize/-/smooth-resize-0.2.1.tgz","integrity":"sha512-+MKte1beSNqRo9y3tkOH6Y3/FTxW+PSyUaXhHCe7vyLbiCQhAVhRFFiKUwFsAXqlnF12IS9bckqU1F1m96fmGw==","signatures":[{"sig":"MEQCIEK9fovGmQaJbumG9y802YoYK17eubvHvsCweLq69iwRAiAfNQRfhLkUf+BQ5/pzRNWqG/cp9qo7Z+ptGDmqtz6WDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"smooth-resize.js","_from":".","module":"src/index.js","_shasum":"a2461c2c7360e90f9ee49894ff639d49f03cc45d","gitHead":"f9f7c997b4b6846b35d80ed2b900e053bd6442da","scripts":{"minify":"uglifyjs -m -o smooth-resize.min.js smooth-resize.js","prepublish":"rollup -c && npm run minify"},"_npmUser":{"name":"robinhouston","email":"accounts@kiln.it"},"repository":{"url":"git://github.com/kiln/smooth-resize.git","type":"git"},"_npmVersion":"4.0.3","description":"Smoothly animated window resizing","directories":{},"_nodeVersion":"6.3.0","devDependencies":{"rollup":"^0.41.1","uglify":"^0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/smooth-resize-0.2.1.tgz_1484849237233_0.5703832523431629","host":"packages-12-west.internal.npmjs.com"}}},"time":{"created":"2017-01-16T19:29:47.793Z","modified":"2026-08-19T18:13:32.440Z","0.1.0":"2017-01-16T19:29:47.793Z","0.2.0":"2017-01-19T18:05:12.084Z","0.2.1":"2017-01-19T18:07:19.205Z"},"bugs":{"url":"https://github.com/kiln/smooth-resize/issues"},"author":{"name":"Kiln Enterprises Ltd"},"license":"BSD-3-Clause","homepage":"https://github.com/kiln/smooth-resize#readme","repository":{"url":"git://github.com/kiln/smooth-resize.git","type":"git"},"description":"Smoothly animated window resizing","maintainers":[{"email":"duncan@kiln.digital","name":"duncanclark"},{"email":"daan.louter@gmail.com","name":"daanlouter"},{"email":"hello@animateddata.co.uk","name":"animateddata"},{"email":"lars@datamake.io","name":"larsvers"},{"email":"luisabider@hotmail.com","name":"luptilu"},{"email":"h.robertson@icloud.com","name":"hrobertson"},{"email":"florin@kiln.digital","name":"florin.oprina"},{"email":"ben.lloyd@canva.com","name":"b3n-canva"},{"email":"brunoriddy@canva.com","name":"bruno-riddy"},{"email":"katietanner@canva.com","name":"katietannercanva"},{"email":"josephw@canva.com","name":"jwitcombe"},{"email":"becky.rush14@yahoo.co.uk","name":"rushlet"},{"email":"winna@canva.com","name":"winna_canva"},{"email":"jonty@canva.com","name":"jontyt"},{"email":"scottb@canva.com","name":"scottb-flourish"},{"email":"gwyneth@canva.com","name":"gwyneth.bassett"},{"email":"snavad@canva.com","name":"sega-canva"},{"email":"ci@kiln.it","name":"kiln-ci"},{"email":"niamhb@canva.com","name":"niamhb"},{"email":"guy.n@canva.com","name":"guyneedhamcanva"}],"readme":"# Smooth animations while the window is being resized\n\nResponsive online graphics may need to update in response to changes in window\nsize. It’s common to do this by listening for the `resize` event on the window\nobject, but this results in a choppy effect since the resize event is not\ntriggered frequently enough for a smooth animation.\n\nThis module makes it easy to implement smooth resize animations. While the window\nis being resized it uses `requestAnimationFrame` to run your drawing function\nat a (hopefully) decent frame rate.\n\nIt’s designed to be used with an ES6 module bundler such as [rollup.js](http://rollupjs.org/)\nwith [rollup-plugin-node-resolve](https://github.com/rollup/rollup-plugin-node-resolve):\n\n```\nimport smoothResize from \"smooth-resize\";\n\nsmoothresize(function(width, height) {\n\t// Redraw at the specified size\n});\n```\n\nor you can include a self-contained version directly in your HTML:\n\n```\n<script src=\"https://cdn.flourish.rocks/smooth-resize-v0.min.js\"></script>\n```\n\nIt’s self-contained and tiny. Even the non-minified version is smaller than 1k.\n\nIt was developed for use in [Flourish](https://flourish.studio) templates, but it’s\nopen source and you can use it for anything.\n","readmeFilename":"README.md"}