{"_id":"@a993576769/virtual-list","_rev":"7-7396e067cc1766f6bde16b5f5e43b68c","name":"@a993576769/virtual-list","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.2":{"name":"@a993576769/virtual-list","version":"0.0.2","keywords":["vue","typescript","virtual list"],"author":{"name":"a993576769"},"license":"MIT","_id":"@a993576769/virtual-list@0.0.2","maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"homepage":"https://github.com/a993576769/virtual-list","bugs":{"url":"https://github.com/a993576769/virtual-list/issues"},"dist":{"shasum":"eb6650eae6fea721f77bd098d98542a8329e10b8","tarball":"https://registry.npmjs.org/@a993576769/virtual-list/-/virtual-list-0.0.2.tgz","fileCount":19,"integrity":"sha512-Ys55Qvr8e5uH5GMoY/ocbDaXcH+VD22D5ViNQsgB8wnvM5z2+I7+G96IfarJvrM6GSK5EadixSkBWBSD9Np/HA==","signatures":[{"sig":"MEUCICRs4VIgmVPx7UTy71BLZYKKa3xDXDSalOI8wSYSRj6AAiEAjruaDzsIqXGtYwY28/5Nt6YvkW8Q4xPrpf6GX4GpXGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92803},"main":"lib/virtual-list.cjs.js","types":"lib/index.d.ts","module":"lib/virtual-list.es.js","engines":{"node":">=16.0.0"},"gitHead":"e2e376300add34a041738da03e90bc0a2022cd47","scripts":{"dev":"vite","lint":"eslint .","preview":"vite preview","release":"npm run clean && npm run build && npm publish","lint:fix":"eslint --fix .","build:lib":"vite build --config vite.config.lib.ts","build:page":"vite build --config vite.config.page.ts"},"_npmUser":{"name":"a993576769","email":"993576769@qq.com"},"repository":{"url":"git+https://github.com/a993576769/virtual-list.git","type":"git"},"_npmVersion":"10.8.3","description":"Virtual list for Vue 3","directories":{},"_nodeVersion":"22.9.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.11","vite":"^5.4.8","eslint":"^9.12.0","vue-tsc":"^2.1.6","lodash-es":"^4.17.21","typescript":"^5.6.2","vue-router":"^4.4.5","@types/node":"^22.7.5","@vueuse/core":"^11.1.0","vite-plugin-dts":"^4.2.3","@types/lodash-es":"^4.17.12","@vitejs/plugin-vue":"^5.1.4","@antfu/eslint-config":"^3.7.3"},"peerDependencies":{"vue":"^3.5.11"},"_npmOperationalInternal":{"tmp":"tmp/virtual-list_0.0.2_1728379714427_0.44359609191719884","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@a993576769/virtual-list","version":"0.0.3","keywords":["vue","typescript","virtual list"],"author":{"name":"a993576769"},"license":"MIT","_id":"@a993576769/virtual-list@0.0.3","maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"homepage":"https://github.com/a993576769/virtual-list","bugs":{"url":"https://github.com/a993576769/virtual-list/issues"},"dist":{"shasum":"b799e2a003849751f3fe368e0c8414760e119c57","tarball":"https://registry.npmjs.org/@a993576769/virtual-list/-/virtual-list-0.0.3.tgz","fileCount":20,"integrity":"sha512-igcSjeaNQEX0cnEyaVwYbGRhCKCtDQR2e0je/SdJPEhwv4DKk+d3YfLyugTBgDb40OTtgfyYKr8rKwbT0i2MSA==","signatures":[{"sig":"MEYCIQDZ6SLBWgeTg49MII30FhcG//JQMEc1jQ3p/znOKNAnzQIhALHp5B2ANiq62qg9SfODFmbrtmMk84r07/3aJCdMZpAx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95891},"main":"lib/virtual-list.cjs.js","types":"lib/index.d.ts","module":"lib/virtual-list.es.js","engines":{"node":">=16.0.0"},"gitHead":"b645c21264b6de86b0e29afbabc2c2cc61ad2227","scripts":{"dev":"vite","lint":"eslint .","preview":"vite preview","release":"npm run clean && npm run build && npm publish","lint:fix":"eslint --fix .","build:lib":"vite build --config vite.config.lib.ts","build:page":"vite build --config vite.config.page.ts"},"_npmUser":{"name":"a993576769","email":"993576769@qq.com"},"repository":{"url":"git+https://github.com/a993576769/virtual-list.git","type":"git"},"_npmVersion":"10.8.3","description":"Virtual list for Vue 3","directories":{},"_nodeVersion":"22.9.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.11","vite":"^5.4.8","eslint":"^9.12.0","vue-tsc":"^2.1.6","lodash-es":"^4.17.21","typescript":"^5.6.2","vue-router":"^4.4.5","@types/node":"^22.7.5","@vueuse/core":"^11.1.0","vite-plugin-dts":"^4.2.3","@types/lodash-es":"^4.17.12","@vitejs/plugin-vue":"^5.1.4","@antfu/eslint-config":"^3.7.3"},"peerDependencies":{"vue":"^3.5.11"},"_npmOperationalInternal":{"tmp":"tmp/virtual-list_0.0.3_1728382974698_0.907494230942812","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@a993576769/virtual-list","version":"0.0.4","keywords":["vue","typescript","virtual list"],"author":{"name":"a993576769"},"license":"MIT","_id":"@a993576769/virtual-list@0.0.4","maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"homepage":"https://github.com/993576769/virtual-list","bugs":{"url":"https://github.com/993576769/virtual-list/issues"},"dist":{"shasum":"7fecf082c546c1532a4d5b99dc0a8aa71216037d","tarball":"https://registry.npmjs.org/@a993576769/virtual-list/-/virtual-list-0.0.4.tgz","fileCount":21,"integrity":"sha512-bZj3d27C5YI09jNXpYU0DMpgefECNIhmuFMhvkd6vQsmcpR9r0UC6hxlRJ9O+AgTzlNiGBU8dDNTn3lzjxwAHw==","signatures":[{"sig":"MEUCIQC33//rnbnupb2SMAy5YQtV3XLI2jtgv6BbTPEH5BPCbwIgZoDOGA2tcDX16lx535KtJf5/RaXzPeFTiHjcakogs0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":96558},"main":"lib/virtual-list.cjs.js","types":"lib/index.d.ts","module":"lib/virtual-list.es.js","engines":{"node":">=16.0.0"},"gitHead":"a8da04d37a087d47d8849854d53c0854349828df","scripts":{"dev":"vite","lint":"eslint .","preview":"vite preview","release":"npm run clean && npm run build && npm publish","lint:fix":"eslint --fix .","build:lib":"vite build --config vite.config.lib.ts","build:page":"vite build --config vite.config.page.ts"},"_npmUser":{"name":"a993576769","email":"993576769@qq.com"},"repository":{"url":"git+https://github.com/993576769/virtual-list.git","type":"git"},"_npmVersion":"10.8.3","description":"Virtual list for Vue 3","directories":{},"_nodeVersion":"22.9.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.11","vite":"^5.4.8","eslint":"^9.12.0","vue-tsc":"^2.1.6","lodash-es":"^4.17.21","typescript":"^5.6.2","vue-router":"^4.4.5","@types/node":"^22.7.5","@vueuse/core":"^11.1.0","vite-plugin-dts":"^4.2.3","@types/lodash-es":"^4.17.12","@vitejs/plugin-vue":"^5.1.4","@antfu/eslint-config":"^3.7.3"},"peerDependencies":{"vue":"^3.5.11"},"_npmOperationalInternal":{"tmp":"tmp/virtual-list_0.0.4_1728460277529_0.6031996062059839","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@a993576769/virtual-list","version":"0.0.5","keywords":["vue","typescript","virtual list"],"author":{"name":"a993576769"},"license":"MIT","_id":"@a993576769/virtual-list@0.0.5","maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"homepage":"https://github.com/993576769/virtual-list","bugs":{"url":"https://github.com/993576769/virtual-list/issues"},"dist":{"shasum":"6d90e4c414d61ace89d1e01cef53a01431432e37","tarball":"https://registry.npmjs.org/@a993576769/virtual-list/-/virtual-list-0.0.5.tgz","fileCount":22,"integrity":"sha512-hNFny4xHdfX+PzcmsA6xlv2PdFbKUk/UAwDIcrG3yeoMBkJxa0MvOIwDMmz46DJ/UxKy+OuszawFGSzVT8CSZg==","signatures":[{"sig":"MEYCIQDuBJlRqJBkasZ928qPigPvodmjDvKFfQ5M58XTJZMMGQIhAMJqW78QnSlnIki2mDlhORN3sMVcfobmUPtqCE+AWOtR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":99788},"main":"lib/virtual-list.cjs.js","type":"module","types":"lib/index.d.ts","module":"lib/virtual-list.es.js","engines":{"node":">=16.0.0"},"gitHead":"20b69f53ca8a58a37cd1e8f9e1fb80578c10e33c","scripts":{"dev":"vite --config vite.config.page.ts","lint":"eslint .","preview":"vite preview","release":"npm run clean && npm run build && npm publish","lint:fix":"eslint --fix .","build:lib":"vite build --config vite.config.lib.ts","build:page":"vite build --config vite.config.page.ts"},"_npmUser":{"name":"a993576769","email":"993576769@qq.com"},"repository":{"url":"git+https://github.com/993576769/virtual-list.git","type":"git"},"_npmVersion":"10.8.3","description":"Virtual list for Vue 3","directories":{},"_nodeVersion":"22.9.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.11","vite":"^5.4.8","eslint":"^9.12.0","vue-tsc":"^2.1.6","lodash-es":"^4.17.21","typescript":"^5.6.2","vue-router":"^4.4.5","@types/node":"^22.7.5","@vueuse/core":"^11.1.0","vite-plugin-dts":"^4.2.3","@types/lodash-es":"^4.17.12","@vitejs/plugin-vue":"^5.1.4","@antfu/eslint-config":"^3.7.3"},"peerDependencies":{"vue":"^3.5.11"},"_npmOperationalInternal":{"tmp":"tmp/virtual-list_0.0.5_1728549590495_0.9730336061769593","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@a993576769/virtual-list","type":"module","version":"0.0.6","description":"Virtual list for Vue 3","author":{"name":"a993576769"},"license":"MIT","homepage":"https://github.com/993576769/virtual-list","repository":{"type":"git","url":"git+https://github.com/993576769/virtual-list.git"},"keywords":["vue","typescript","virtual list"],"main":"lib/virtual-list.cjs.js","module":"lib/virtual-list.es.js","types":"lib/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"vite --config vite.config.page.ts","build:page":"vite build --config vite.config.page.ts","build:lib":"vite build --config vite.config.lib.ts","preview":"vite preview","lint":"eslint .","lint:fix":"eslint --fix .","release":"npm run clean && npm run build && npm publish"},"peerDependencies":{"vue":"^3.5.11"},"devDependencies":{"@antfu/eslint-config":"^3.7.3","@types/lodash-es":"^4.17.12","@types/node":"^22.7.5","@vitejs/plugin-vue":"^5.1.4","@vueuse/core":"^11.1.0","eslint":"^9.12.0","lodash-es":"^4.17.21","typescript":"^5.6.2","vite":"^5.4.8","vite-plugin-dts":"^4.2.3","vue":"^3.5.11","vue-router":"^4.4.5","vue-tsc":"^2.1.6"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_id":"@a993576769/virtual-list@0.0.6","gitHead":"2df898dab44c5414679e241c92c8faa2ae9854fc","bugs":{"url":"https://github.com/993576769/virtual-list/issues"},"_nodeVersion":"22.10.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-oVm8udJeIZ488bhAS9Gp3nvT+EbwOK/Bnw1pda8sodvcBAI9ykoA52dUn3C4dJWFJJ21U8RfvnG7DsVUcuTT/Q==","shasum":"5cdbbac6caf95afe8fb1260233d12f6dc14747b4","tarball":"https://registry.npmjs.org/@a993576769/virtual-list/-/virtual-list-0.0.6.tgz","fileCount":23,"unpackedSize":99896,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtJnO2i+3+qyBjmQHrWUxgwOnW1U+DNpoF8Ybz8mRUIwIhAPNkwjCM7WgO71LN8deiItF21gf930KCvCwHTNCo/N2u"}]},"_npmUser":{"name":"a993576769","email":"993576769@qq.com"},"directories":{},"maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/virtual-list_0.0.6_1730084547611_0.6139611533801754"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-08T09:28:34.336Z","modified":"2024-10-28T03:02:28.081Z","0.0.1":"2024-10-08T09:07:37.291Z","0.0.2":"2024-10-08T09:28:34.609Z","0.0.3":"2024-10-08T10:22:54.872Z","0.0.4":"2024-10-09T07:51:17.710Z","0.0.5":"2024-10-10T08:39:50.671Z","0.0.6":"2024-10-28T03:02:27.867Z"},"bugs":{"url":"https://github.com/993576769/virtual-list/issues"},"author":{"name":"a993576769"},"license":"MIT","homepage":"https://github.com/993576769/virtual-list","keywords":["vue","typescript","virtual list"],"repository":{"type":"git","url":"git+https://github.com/993576769/virtual-list.git"},"description":"Virtual list for Vue 3","maintainers":[{"name":"a993576769","email":"993576769@qq.com"}],"readme":"# Virtual List Component Documentation\n\n[![Build](https://github.com/993576769/virtual-list/actions/workflows/build.yml/badge.svg)](https://github.com/993576769/virtual-list/actions/workflows/build.yml)\n[![Publish](https://github.com/993576769/virtual-list/actions/workflows/publish.yml/badge.svg)](https://github.com/993576769/virtual-list/actions/workflows/publish.yml)\n\n## Demo\n\n[https://993576769.github.io/virtual-list/](https://993576769.github.io/virtual-list/)\n\n## Installation\n\n```bash\nnpm install @a993576769/virtual-list\n```\n\n## Virtual List Component\n\n### Props\n\n| Prop Name | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `items` | `Array<T>` | Required | Array of items to be rendered |\n| `itemHeight` | `Number` | 48 | Height of each item, if `fixedHeight` is true, this value will be ignored |\n| `buffer` | `Number` | 0 | Number of items to render outside the visible area |\n| `keyField` | `keyof T` | 'id' | Unique key field for each item |\n| `topThreshold` | `Number` | 50 | Threshold for triggering the `topArrived` event |\n| `bottomThreshold` | `Number` | 50 | Threshold for triggering the `bottomArrived` event |\n| `initialPosition` | `'top' \\| 'bottom' \\| T[keyof T]` | 'bottom' | Initial scroll position |\n\n### Events\n\n| Event Name | Parameters | Description |\n|------------|------------|-------------|\n| `topArrived` | None | Triggered when scrolling reaches the top threshold |\n| `bottomArrived` | None | Triggered when scrolling reaches the bottom threshold |\n| `scroll` | None | Triggered on scroll |\n\n### Exposed Methods and Refs\n\n| Name | Type | Description |\n|------|------|-------------|\n| `visibleItems` | `Ref<RenderedItem<T>[]>` | Array of currently visible items |\n| `renderItems` | `Ref<RenderedItem<T>[]>` | Array of all rendered items, including buffer |\n| `scrollToItem` | ``({ key: T[keyof T]; alignment: `start` \\| `center` \\| `end`; smooth?: boolean }) => Promise<void>`` | Scrolls to a specific item |\n| `scrollToTop` | `(smooth?: boolean) => void` | Scrolls to the top of the list |\n| `scrollToBottom` | `(smooth?: boolean) => Promise<void>` | Scrolls to the bottom of the list |\n| `getScroll` | `() => { scrollHeight: number; scrollTop: number; clientHeight: number }` | Returns current scroll information |\n\n## Virtual List Item Component\n\n### Props\n\n| Prop Name | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `item` | `T` | Yes | The data object for the list item |\n| `index` | `Number` | Yes | The index of the item in the list |\n| `resize` | `Function` | Yes | Callback function to report item height changes |\n\n## Usage\n\nTo use the Virtual List components together:\n\n```vue\n<script setup lang=\"ts\">\nimport { VirtualList, VirtualListItem } from '@a993576769/virtual-list';\nimport { ref } from 'vue';\n\nconst myItems = ref([/* your items array */]);\n</script>\n\n<template>\n  <VirtualList :items=\"myItems\">\n    <template #default=\"{ item, index, resize }\">\n      <VirtualListItem :item=\"item\" :index=\"index\" :resize=\"resize\">\n        <!-- Your item content here -->\n      </VirtualListItem>\n    </template>\n  </VirtualList>\n</template>\n```\n\n## License\n\nThis project is licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","readmeFilename":"README.md"}