{"name":"@sveltejs/svelte-virtual-list","version":"2.1.1","description":"A <VirtualList> component for Svelte apps","svelte":"src/VirtualList.html","module":"index.mjs","main":"index.js","scripts":{"build":"rollup -c","dev":"rollup -cw","prepublishOnly":"npm test","test":"node test/runner.js","test:browser":"npm run build && serve test/public","pretest":"npm run build"},"devDependencies":{"port-authority":"^1.0.3","puppeteer":"^1.2.0","rollup":"^0.58.2","rollup-plugin-commonjs":"^9.1.0","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-svelte":"^4.1.0","serve":"^6.5.3","svelte":"^2.1.0","tap-diff":"^0.1.1","tap-dot":"^1.0.5","tape-modern":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/sveltejs/svelte-virtual-list.git"},"author":{"name":"Rich Harris"},"license":"LIL","keywords":["svelte"],"files":["src","index.mjs","index.js"],"gitHead":"3d2cb490313f937bbd0d76566a08c1a8652c12bd","bugs":{"url":"https://github.com/sveltejs/svelte-virtual-list/issues"},"homepage":"https://github.com/sveltejs/svelte-virtual-list#readme","_id":"@sveltejs/svelte-virtual-list@2.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.1","_npmUser":{"name":"rich_harris","email":"richard.a.harris@gmail.com"},"dist":{"integrity":"sha512-qrnmLaRmDXf/TQ4A0HcYtCPmLJXYopV844m3XCVqPH6edh0q0wxN/GChCiVyXezbGYuX/K9Wr4Sl3hO5QdlOXA==","shasum":"261ffa6f2d1548dce57877addf0cdd7347a5a85d","tarball":"http://registry-npm.ywwl.com/@sveltejs/svelte-virtual-list/download/@sveltejs/svelte-virtual-list-2.1.1.tgz","fileCount":7,"unpackedSize":42418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8KbOCRA9TVsSAnZWagAAe5MP+wffm5fbjjnk8X+xWA3z\nU7zaXOoMde92oL7SlEr8GsRSeRKW9vuPE57OD587dFrpIuNMFBgOlEbWwPTm\nO3dG5oH4MKNsyCoErGXqD9QyYnWK8+Kzux+2SJjN6dND16sA7XCsqbdiRXoc\n1tp55OWI9YiXnu97hx0KQQiTYutEVw7Z0yJnwOujJKeT610waxtfg/Snxaaa\nyHcNRxkaAfUgtdO6+NcMfVHBEe+so/T2Yq1e3Sdn476z0h0lgHU7MIJiLs8R\n4EVQl179yNPmcB53EkREiYjCFw3urnP0TJ376D//q1eE/z2XWcdemlIbOsM3\nRSlKqWj8WvoJN1FSj5Yn/O8UVL6ZR8jE0gnAKrh2w+tpB43o4aVsBJZq75Zv\n9iztHy4Ud1OrH3zNfFu/hqrlgF2wkn1TVMkKBUgzI25J98SzfnpNFWzBAJlA\n4kKAgKBndOvBf/3rYyX/BKzPbL1Jp1f3cf07mvaybK/atM6+9C5doIjOoXJR\nVLI2ryKZO3ACvW3AzEKArAQe851PwkGNwrmxPj1RODjA5sCtOiZbz6V2qedQ\n1kkMLCOHFOThmDZzhJUFZZqjsHY5kyQ/YuTJcab1uH9HVsVsNlbJNzq0OtCn\nD1MDZvhLfJCYzxKzfZanIh4cef+Vlz2GZJBVnT4StCDM9HpwVNhJ96R+H73t\nHQJe\r\n=ADrU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5aP669GKm4QFH9E9eyMYPfxrgp9xEhYv8eZ7epIbvAAiEA9Zgs+aNzuXlkF0B0anEECvjvmo5nTlqogICXNgOeokA="}],"size":9355,"noattachment":false,"key":"/@sveltejs/svelte-virtual-list/-/@sveltejs/svelte-virtual-list-2.1.1.tgz"},"maintainers":[{"name":"rich_harris","email":"richard.a.harris@gmail.com"},{"name":"svelte-admin","email":"richard.a.harris+svelte@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-virtual-list_2.1.1_1525720781974_0.8106106232430166"},"_hasShrinkwrap":false,"readme":"# svelte-virtual-list ([demo](https://svelte.dev/repl/f78ddd84a1a540a9a40512df39ef751b))\n\nA virtual list component for Svelte apps. Instead of rendering all your data, `<VirtualList>` just renders the bits that are visible, keeping your page nice and light.\n\n## Installation\n\n```bash\nyarn add @sveltejs/svelte-virtual-list\n```\n\n\n## Usage\n\n```html\n<script>\n  import VirtualList from '@sveltejs/svelte-virtual-list';\n\n  const things = [\n    // these can be any values you like\n    { name: 'one', number: 1 },\n    { name: 'two', number: 2 },\n    { name: 'three', number: 3 },\n    // ...\n    { name: 'six thousand and ninety-two', number: 6092 }\n  ];\n</script>\n\n<VirtualList items={things} let:item>\n  <!-- this will be rendered for each currently visible item -->\n  <p>{item.number}: {item.name}</p>\n</VirtualList>\n```\n\n\n## `start` and `end`\n\nYou can track which rows are visible at any given by binding to the `start` and `end` values:\n\n```html\n<VirtualList items={things} bind:start bind:end>\n  <p>{item.number}: {item.name}</p>\n</VirtualList>\n\n<p>showing {start}-{end} of {things.length} rows</p>\n```\n\nYou can rename them with e.g. `bind:start={a} bind:end={b}`.\n\n\n## `height`\n\nBy default, the `<VirtualList>` component will fill the vertical space of its container. You can specify a different height by passing any CSS length:\n\n```html\n<VirtualList height=\"500px\" items={things} let:item>\n  <p>{item.number}: {item.name}</p>\n</VirtualList>\n```\n\n\n## `itemHeight`\n\nYou can optimize initial display and scrolling when the height of items is known in advance. This should be a number representing a pixel value.\n\n```html\n<VirtualList itemHeight={48} items={things} let:item>\n  <p>{item.number}: {item.name}</p>\n</VirtualList>\n```\n\n\n## Configuring webpack\n\nIf you're using webpack with [svelte-loader](https://github.com/sveltejs/svelte-loader), make sure that you add `\"svelte\"` to [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) in your webpack config. This ensures that webpack imports the uncompiled component (`src/index.html`) rather than the compiled version (`index.mjs`) — this is more efficient.\n\nIf you're using Rollup with [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte), this will happen automatically.\n\n\n## License\n\n[LIL](LICENSE)\n","publish_time":1525720782264,"_cnpm_publish_time":1525720782264,"dist-tags":{"latest":"3.0.1","next":"3.0.0-alpha.1"}}