{"name":"@sveltejs/svelte-virtual-list","version":"3.0.0-alpha.1","description":"A <VirtualList> component for Svelte apps","main":"VirtualList.html","svelte":"VirtualList.html","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","lint":"eslint src/VirtualList.html"},"devDependencies":{"eslint":"^5.12.1","eslint-plugin-svelte3":"git+https://github.com/sveltejs/eslint-plugin-svelte3.git","port-authority":"^1.0.5","puppeteer":"^1.9.0","rollup":"^1.1.2","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-svelte":"^5.0.1","sirv":"^0.2.2","svelte":"^3.0.0-beta.2","tap-diff":"^0.1.1","tap-dot":"^2.0.0","tape-modern":"^1.1.1"},"repository":{"type":"git","url":"git+https://github.com/sveltejs/svelte-virtual-list.git"},"author":{"name":"Rich Harris"},"license":"LIL","keywords":["svelte"],"readme":"# svelte-virtual-list ([demo](https://svelte.technology/repl?version=2&gist=f5a127d9c21f529016d434dcbe405c3f))\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","readmeFilename":"README.md","gitHead":"7c947ba9ec7b42b05e1a780cd2066d4e297265dd","bugs":{"url":"https://github.com/sveltejs/svelte-virtual-list/issues"},"homepage":"https://github.com/sveltejs/svelte-virtual-list#readme","_id":"@sveltejs/svelte-virtual-list@3.0.0-alpha.1","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"rich_harris","email":"richard.a.harris@gmail.com"},"dist":{"integrity":"sha512-zQra5tpFpm/X1bNvupgDcvB/ZAnrIZ9Wsfq6rXaY++GbbI8wwv4cvipy7zcChm0QSJhZIYzq1kXlm1W/5oMPtA==","shasum":"7d49022c3c2400b64289dd92273c0a7b5cee09dd","tarball":"http://registry-npm.ywwl.com/@sveltejs/svelte-virtual-list/download/@sveltejs/svelte-virtual-list-3.0.0-alpha.1.tgz","fileCount":7,"unpackedSize":41935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWOU0CRA9TVsSAnZWagAALvIP/30AX8qG0mQwRejrpBmH\n6cvBFQG1MLs1tSflWwnCF28J9td8TCwvvVrodkIDQPQ3FnBPCEYh6r0mzI8V\n+9W8DLUkXA0QfWwbDj6NxZ9ygmNSfpRC4HUlR4bpmvt6rsZPbRmx4zJ2tbEz\nSg1+aROVgcizqhtrzbY/1EjmCBA8wTInsGk7Bk9uXxL3Vh08ulCU9LRdrh1m\nY5jnmHKNTvpOpXib/2pMFUByp7UtADkLBYsuKgDcqQfxdP14keqKH7ByWBDC\n5m5CLjmXzCKbNSaE9apaWlRFUNwbpFq3CNnVdnOAdU8baJ+8K8snqrlbBDsr\nGvR3uunpPWv7fq047PB0rGCSl9qQ4ZKCEG7KDGvpG29zcILA2brpSC433cie\nUbMQfu4QsGI4zM6oxImeP7n2BOo+IU5qdWOyKK6qAIU2hpaVBrwAulsnon77\nxiOvBJnBeyNN0bqWkOl5vylinmg0IZVhhlvk17yxqu9+vCDr9WhqhxBa0AtR\nTLnVSTpAcQlyq2z3AotAPawTVusUKZuAECPRK5mcVbi18TTiTL7ikXb5Fcjg\nerVL4PrE7BdZrVvNb1UiLT2lO6HEFBMjtOE7MN+N0LwFCAKry0/7Hz/zOxjf\nJgEBIIiWoc/Ox0CyRhzOKb2bkcCOOMU05BRTH12SWV3Fle2DUVh778VDk1Xa\nofL1\r\n=Uksy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvK2S/YyZBhNhft1qoFSiJFtZqdmlTYH7uv9gPX3VlEAiEAlC157SgWAroidUirc9kdsussyK6+hQPFqJg8RA75AfI="}],"size":9895,"noattachment":false,"key":"/@sveltejs/svelte-virtual-list/-/@sveltejs/svelte-virtual-list-3.0.0-alpha.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_3.0.0-alpha.1_1549329715852_0.49227182915266066"},"_hasShrinkwrap":false,"publish_time":1549329716048,"_cnpm_publish_time":1549329716048,"dist-tags":{"latest":"3.0.1","next":"3.0.0-alpha.1"}}