{"name":"@sveltejs/svelte-virtual-list","version":"2.2.0","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.5","puppeteer":"^1.9.0","rollup":"^0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^3.4.0","rollup-plugin-svelte":"^4.3.2","sirv":"^0.2.2","svelte":"^2.13.5","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"],"gitHead":"f8a2575426fa8e97ab890e8ef66479fff3ba9791","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.2.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"rich_harris","email":"richard.a.harris@gmail.com"},"dist":{"integrity":"sha512-oDQ2PZ0Tw5uGQnlCiHiJIqrNuJxfCt1KwQAhPIHCvQZtRW9TL6qkdlWmbRNjE6bksxGzm6hLrJ23C14vLnCsLQ==","shasum":"71d69490364762756248e46e9e83c3b05599184a","tarball":"http://registry-npm.ywwl.com/@sveltejs/svelte-virtual-list/download/@sveltejs/svelte-virtual-list-2.2.0.tgz","fileCount":7,"unpackedSize":42698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvmrGCRA9TVsSAnZWagAATHQP/icxOiO/7X3ZXk7xw1WW\ndxVZqmikqFxA1OPV84Mcn0vggiEwvfdm8TnoUTDoi5s6EOTZAsZ0KXbpB8yj\nU/PgYiUWK0uVriOPk6iU0Y0SZ3algKOTSwWFJvdUHreuDO1aPw/M5AnX12xW\nEzCHYa0Gh7KaFF0eJZOBhyASRQ2Fs3ZJ8S5MQe2ZcYIwW2rkKUgSwSvVq6yh\n3sMIydn+TbqwWYFeTaX6PAseTF+6YCxylCYX5xp9u/wGeFpT35X0Ckq2g2t5\nQxuIGFKutZ2e0o0rumQ3cs3UE3NsYuVUTGGNqEwp1WnuyhJ3+1DL3173ptVe\n/d1RnrbCpFW4c1My4T7x0xHdx4m85s9DL2MsBMEtCJST/sSRZSjJBK9FEHgq\nXBqWT2DJexH7OuzGHttwKqIz8c4+FSGQuFMRSRaQzEaPWX/T7jfM4GbOB670\nA+NY4KLAnSBRCllbO49w2VytizVQIbBwFAvvvyzsDJlNzlmxesr0ee/4+eZ9\nOgIQZkAGfYQGm9jQWA6XyAv0JTnGhghJ6aBpAfMDSwmf7mh420Pnavul6k8z\nzAZmdg5uOrFy8eNvPD1hV6a5pHEsy6Uy6X/eYQ23KlKZxl0b7Abh5lqr0CWF\nMF87vDWt/8D0oHqS8WDfkJoNqMqLOpj86BE5gT83oQs/boWePcWALAkbATtw\nY7Tm\r\n=YevU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGgXEsF45GXG/6bOdy3GNRZ313PQ4vw4pb9M/rg7nstAiAYWQYIr8Bx5qKMMkIKiN+CGNiQAE4dhDUErKBg1sAhlw=="}],"size":9407,"noattachment":false,"key":"/@sveltejs/svelte-virtual-list/-/@sveltejs/svelte-virtual-list-2.2.0.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.2.0_1539205829512_0.19266557196791556"},"_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":1539205829734,"_cnpm_publish_time":1539205829734,"dist-tags":{"latest":"3.0.1","next":"3.0.0-alpha.1"}}