From a700a57ced513b11d6d93f80ddf6868851344a76 Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:42:30 +0900 Subject: [PATCH] 0.33.3 --- docs/API.md | 14 +- docs/classes/vue.VList.md | 453 ------ docs/classes/vue.Virtualizer.md | 517 ------ docs/classes/vue.WindowVirtualizer.md | 339 ---- docs/interfaces/react.CacheSnapshot.md | 23 - .../react.CustomCellComponentProps.md | 32 - .../react.CustomContainerComponentProps.md | 30 - .../react.CustomItemComponentProps.md | 43 - docs/interfaces/react.VGridHandle.md | 163 -- docs/interfaces/react.VGridProps.md | 1299 --------------- docs/interfaces/react.VListHandle.md | 196 --- docs/interfaces/react.VListProps.md | 1434 ----------------- docs/interfaces/react.VirtualizerHandle.md | 164 -- docs/interfaces/react.VirtualizerProps.md | 280 ---- .../react.WindowVirtualizerHandle.md | 23 - .../react.WindowVirtualizerProps.md | 214 --- docs/interfaces/solid.VListHandle.md | 179 -- docs/interfaces/solid.VListProps.md | 1294 --------------- docs/interfaces/solid.VirtualizerHandle.md | 151 -- docs/interfaces/solid.VirtualizerProps.md | 285 ---- .../solid.WindowVirtualizerProps.md | 167 -- docs/modules/react.md | 172 -- docs/modules/solid.md | 101 -- docs/modules/vue.md | 9 - docs/react/API.md | 38 + docs/react/functions/VList.md | 21 + docs/react/functions/Virtualizer.md | 21 + docs/react/functions/WindowVirtualizer.md | 21 + docs/react/functions/experimental_VGrid.md | 21 + docs/react/interfaces/CacheSnapshot.md | 19 + .../interfaces/CustomCellComponentProps.md | 27 + .../CustomContainerComponentProps.md | 25 + .../interfaces/CustomItemComponentProps.md | 37 + .../interfaces/ScrollToIndexOpts.md} | 38 +- docs/react/interfaces/VGridHandle.md | 157 ++ docs/react/interfaces/VGridProps.md | 1226 ++++++++++++++ docs/react/interfaces/VListHandle.md | 183 +++ docs/react/interfaces/VListProps.md | 1345 ++++++++++++++++ docs/react/interfaces/VirtualizerHandle.md | 151 ++ docs/react/interfaces/VirtualizerProps.md | 252 +++ .../interfaces/WindowVirtualizerHandle.md | 19 + .../interfaces/WindowVirtualizerProps.md | 194 +++ .../react/type-aliases/CustomCellComponent.md | 11 + .../type-aliases/CustomContainerComponent.md | 11 + .../react/type-aliases/CustomItemComponent.md | 11 + docs/react/type-aliases/ScrollToIndexAlign.md | 11 + .../ViewportComponentAttributes.md | 11 + docs/solid/API.md | 21 + docs/solid/functions/VList.md | 25 + docs/solid/functions/Virtualizer.md | 25 + docs/solid/functions/WindowVirtualizer.md | 25 + docs/solid/interfaces/VListHandle.md | 167 ++ docs/solid/interfaces/VListProps.md | 1199 ++++++++++++++ docs/solid/interfaces/VirtualizerHandle.md | 139 ++ docs/solid/interfaces/VirtualizerProps.md | 246 +++ .../interfaces/WindowVirtualizerProps.md | 144 ++ docs/vue/API.md | 13 + docs/vue/classes/VList.md | 414 +++++ docs/vue/classes/Virtualizer.md | 474 ++++++ docs/vue/classes/WindowVirtualizer.md | 304 ++++ package-lock.json | 4 +- package.json | 2 +- 62 files changed, 7035 insertions(+), 7599 deletions(-) delete mode 100644 docs/classes/vue.VList.md delete mode 100644 docs/classes/vue.Virtualizer.md delete mode 100644 docs/classes/vue.WindowVirtualizer.md delete mode 100644 docs/interfaces/react.CacheSnapshot.md delete mode 100644 docs/interfaces/react.CustomCellComponentProps.md delete mode 100644 docs/interfaces/react.CustomContainerComponentProps.md delete mode 100644 docs/interfaces/react.CustomItemComponentProps.md delete mode 100644 docs/interfaces/react.VGridHandle.md delete mode 100644 docs/interfaces/react.VGridProps.md delete mode 100644 docs/interfaces/react.VListHandle.md delete mode 100644 docs/interfaces/react.VListProps.md delete mode 100644 docs/interfaces/react.VirtualizerHandle.md delete mode 100644 docs/interfaces/react.VirtualizerProps.md delete mode 100644 docs/interfaces/react.WindowVirtualizerHandle.md delete mode 100644 docs/interfaces/react.WindowVirtualizerProps.md delete mode 100644 docs/interfaces/solid.VListHandle.md delete mode 100644 docs/interfaces/solid.VListProps.md delete mode 100644 docs/interfaces/solid.VirtualizerHandle.md delete mode 100644 docs/interfaces/solid.VirtualizerProps.md delete mode 100644 docs/interfaces/solid.WindowVirtualizerProps.md delete mode 100644 docs/modules/react.md delete mode 100644 docs/modules/solid.md delete mode 100644 docs/modules/vue.md create mode 100644 docs/react/API.md create mode 100644 docs/react/functions/VList.md create mode 100644 docs/react/functions/Virtualizer.md create mode 100644 docs/react/functions/WindowVirtualizer.md create mode 100644 docs/react/functions/experimental_VGrid.md create mode 100644 docs/react/interfaces/CacheSnapshot.md create mode 100644 docs/react/interfaces/CustomCellComponentProps.md create mode 100644 docs/react/interfaces/CustomContainerComponentProps.md create mode 100644 docs/react/interfaces/CustomItemComponentProps.md rename docs/{interfaces/react.ScrollToIndexOpts.md => react/interfaces/ScrollToIndexOpts.md} (51%) create mode 100644 docs/react/interfaces/VGridHandle.md create mode 100644 docs/react/interfaces/VGridProps.md create mode 100644 docs/react/interfaces/VListHandle.md create mode 100644 docs/react/interfaces/VListProps.md create mode 100644 docs/react/interfaces/VirtualizerHandle.md create mode 100644 docs/react/interfaces/VirtualizerProps.md create mode 100644 docs/react/interfaces/WindowVirtualizerHandle.md create mode 100644 docs/react/interfaces/WindowVirtualizerProps.md create mode 100644 docs/react/type-aliases/CustomCellComponent.md create mode 100644 docs/react/type-aliases/CustomContainerComponent.md create mode 100644 docs/react/type-aliases/CustomItemComponent.md create mode 100644 docs/react/type-aliases/ScrollToIndexAlign.md create mode 100644 docs/react/type-aliases/ViewportComponentAttributes.md create mode 100644 docs/solid/API.md create mode 100644 docs/solid/functions/VList.md create mode 100644 docs/solid/functions/Virtualizer.md create mode 100644 docs/solid/functions/WindowVirtualizer.md create mode 100644 docs/solid/interfaces/VListHandle.md create mode 100644 docs/solid/interfaces/VListProps.md create mode 100644 docs/solid/interfaces/VirtualizerHandle.md create mode 100644 docs/solid/interfaces/VirtualizerProps.md create mode 100644 docs/solid/interfaces/WindowVirtualizerProps.md create mode 100644 docs/vue/API.md create mode 100644 docs/vue/classes/VList.md create mode 100644 docs/vue/classes/Virtualizer.md create mode 100644 docs/vue/classes/WindowVirtualizer.md diff --git a/docs/API.md b/docs/API.md index c01e0cd30..7b58e68b9 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,9 +1,11 @@ -# API +**API** • **Docs** + +*** -## Table of contents +# API -### Modules +## Modules -- [react](modules/react.md) -- [vue](modules/vue.md) -- [solid](modules/solid.md) +- [react](react/API.md) +- [vue](vue/API.md) +- [solid](solid/API.md) diff --git a/docs/classes/vue.VList.md b/docs/classes/vue.VList.md deleted file mode 100644 index 33f0d1a99..000000000 --- a/docs/classes/vue.VList.md +++ /dev/null @@ -1,453 +0,0 @@ -# Class: VList - -[vue](../modules/vue.md).VList - -## Table of contents - -### Methods - -- [$watch](vue.VList.md#$watch) -- [getItemOffset](vue.VList.md#getitemoffset) -- [scrollToIndex](vue.VList.md#scrolltoindex) -- [scrollTo](vue.VList.md#scrollto) -- [scrollBy](vue.VList.md#scrollby) - -### Properties - -- [$](vue.VList.md#$) -- [$data](vue.VList.md#$data) -- [$props](vue.VList.md#$props) -- [$attrs](vue.VList.md#$attrs) -- [$refs](vue.VList.md#$refs) -- [$slots](vue.VList.md#$slots) -- [$root](vue.VList.md#$root) -- [$parent](vue.VList.md#$parent) -- [$emit](vue.VList.md#$emit) -- [$el](vue.VList.md#$el) -- [$options](vue.VList.md#$options) -- [$forceUpdate](vue.VList.md#$forceupdate) -- [$nextTick](vue.VList.md#$nexttick) -- [onScroll](vue.VList.md#onscroll) -- [shift](vue.VList.md#shift) -- [data](vue.VList.md#data) -- [overscan](vue.VList.md#overscan) -- [itemSize](vue.VList.md#itemsize) -- [horizontal](vue.VList.md#horizontal) -- [ssrCount](vue.VList.md#ssrcount) -- [onScrollEnd](vue.VList.md#onscrollend) -- [onRangeChange](vue.VList.md#onrangechange) -- [scrollOffset](vue.VList.md#scrolloffset) -- [scrollSize](vue.VList.md#scrollsize) -- [viewportSize](vue.VList.md#viewportsize) - -## Methods - -### $watch - -▸ **$watch**\<`T`\>(`source`, `cb`, `options?`): `WatchStopHandle` - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `string` \| (...`args`: `any`) => `any` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `source` | `T` | -| `cb` | `T` extends (...`args`: `any`) => `R` ? (...`args`: [`R`, `R`, `OnCleanup`]) => `any` : (...`args`: [`any`, `any`, `OnCleanup`]) => `any` | -| `options?` | `WatchOptions`\<`boolean`\> | - -#### Returns - -`WatchStopHandle` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 - -___ - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Defined in - -[src/vue/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L51) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](../interfaces/react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:57](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L57) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L62) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L67) - -## Properties - -### $ - -• **$**: `ComponentInternalInstance` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 - -___ - -### $data - -• **$data**: `Object` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 - -___ - -### $props - -• **$props**: `Partial`\<\{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean }\> & `Omit`\<\{ `shift`: `boolean` = Boolean; `data`: `unknown`[] ; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `itemSize?`: `number` = Number; `ssrCount?`: `number` = Number; `onScroll`: `undefined` \| (...`args`: [offset: number]) => `any` ; `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` } & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `ssrCount`: `NumberConstructor` = Number }\>\> & \{ `onScroll`: `undefined` \| (...`args`: [offset: number]) => `any` ; `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` }, `DefaultKeys`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `ssrCount`: `NumberConstructor` = Number }\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 - -___ - -### $attrs - -• **$attrs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 - -___ - -### $refs - -• **$refs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 - -___ - -### $slots - -• **$slots**: `Readonly`\<\{ `default`: `any` }\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 - -___ - -### $root - -• **$root**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 - -___ - -### $parent - -• **$parent**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 - -___ - -### $emit - -• **$emit**: (`event`: ``"scroll"``, ...`args`: [offset: number]) => `void` & (`event`: ``"scrollEnd"``, ...`args`: []) => `void` & (`event`: ``"rangeChange"``, ...`args`: [startIndex: number, endIndex: number]) => `void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 - -___ - -### $el - -• **$el**: `any` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 - -___ - -### $options - -• **$options**: `ComponentOptionsBase`\<`ResolveProps`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `ssrCount`: `NumberConstructor` = Number }, \{ `scroll`: (`offset`: `number`) => `void` ; `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }\>, `VListHandle`, {}, {}, {}, `ComponentOptionsMixin`, `ComponentOptionsMixin`, \{ `scroll`: (`offset`: `number`) => `void` ; `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }, `string`, \{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean }, {}, `string`, `SlotsType`\<\{ `default`: `any` }\>\> & `MergedComponentOptionsOverride` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 - -___ - -### $forceUpdate - -• **$forceUpdate**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 - -___ - -### $nextTick - -• **$nextTick**: \(`this`: `T`, `fn?`: (`this`: `T`) => `R`) => `Promise`\<`Awaited`\<`R`\>\> - -#### Type declaration - -▸ \<`T`, `R`\>(`this`, `fn?`): `Promise`\<`Awaited`\<`R`\>\> - -##### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `void` | -| `R` | `void` | - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `this` | `T` | -| `fn?` | (`this`: `T`) => `R` | - -##### Returns - -`Promise`\<`Awaited`\<`R`\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 - -___ - -### onScroll - -• **onScroll**: `undefined` \| (...`args`: [offset: number]) => `any` - -___ - -### shift - -• `Readonly` **shift**: `boolean` = `Boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/vue/VList.tsx:34](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L34) - -___ - -### data - -• `Readonly` **data**: `unknown`[] - -The data items rendered by this component. - -#### Defined in - -[src/vue/VList.tsx:18](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L18) - -___ - -### overscan - -• `Readonly` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/vue/VList.tsx:23](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L23) - -___ - -### itemSize - -• `Optional` `Readonly` **itemSize**: `number` = `Number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/vue/VList.tsx:30](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L30) - -___ - -### horizontal - -• `Readonly` **horizontal**: `boolean` = `Boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/vue/VList.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L38) - -___ - -### ssrCount - -• `Optional` `Readonly` **ssrCount**: `number` = `Number` - -A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. - -#### Defined in - -[src/vue/VList.tsx:42](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/VList.tsx#L42) - -___ - -### onScrollEnd - -• **onScrollEnd**: `undefined` \| (...`args`: []) => `any` - -___ - -### onRangeChange - -• **onRangeChange**: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` - -___ - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Defined in - -[src/vue/Virtualizer.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L38) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Defined in - -[src/vue/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L42) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Defined in - -[src/vue/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L46) diff --git a/docs/classes/vue.Virtualizer.md b/docs/classes/vue.Virtualizer.md deleted file mode 100644 index fa211fab4..000000000 --- a/docs/classes/vue.Virtualizer.md +++ /dev/null @@ -1,517 +0,0 @@ -# Class: Virtualizer - -[vue](../modules/vue.md).Virtualizer - -## Table of contents - -### Methods - -- [$watch](vue.Virtualizer.md#$watch) -- [getItemOffset](vue.Virtualizer.md#getitemoffset) -- [scrollToIndex](vue.Virtualizer.md#scrolltoindex) -- [scrollTo](vue.Virtualizer.md#scrollto) -- [scrollBy](vue.Virtualizer.md#scrollby) - -### Properties - -- [$](vue.Virtualizer.md#$) -- [$data](vue.Virtualizer.md#$data) -- [$props](vue.Virtualizer.md#$props) -- [$attrs](vue.Virtualizer.md#$attrs) -- [$refs](vue.Virtualizer.md#$refs) -- [$slots](vue.Virtualizer.md#$slots) -- [$root](vue.Virtualizer.md#$root) -- [$parent](vue.Virtualizer.md#$parent) -- [$emit](vue.Virtualizer.md#$emit) -- [$el](vue.Virtualizer.md#$el) -- [$options](vue.Virtualizer.md#$options) -- [$forceUpdate](vue.Virtualizer.md#$forceupdate) -- [$nextTick](vue.Virtualizer.md#$nexttick) -- [onScroll](vue.Virtualizer.md#onscroll) -- [shift](vue.Virtualizer.md#shift) -- [data](vue.Virtualizer.md#data) -- [overscan](vue.Virtualizer.md#overscan) -- [itemSize](vue.Virtualizer.md#itemsize) -- [horizontal](vue.Virtualizer.md#horizontal) -- [startMargin](vue.Virtualizer.md#startmargin) -- [ssrCount](vue.Virtualizer.md#ssrcount) -- [as](vue.Virtualizer.md#as) -- [item](vue.Virtualizer.md#item) -- [scrollRef](vue.Virtualizer.md#scrollref) -- [onScrollEnd](vue.Virtualizer.md#onscrollend) -- [onRangeChange](vue.Virtualizer.md#onrangechange) -- [scrollOffset](vue.Virtualizer.md#scrolloffset) -- [scrollSize](vue.Virtualizer.md#scrollsize) -- [viewportSize](vue.Virtualizer.md#viewportsize) - -## Methods - -### $watch - -▸ **$watch**\<`T`\>(`source`, `cb`, `options?`): `WatchStopHandle` - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `string` \| (...`args`: `any`) => `any` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `source` | `T` | -| `cb` | `T` extends (...`args`: `any`) => `R` ? (...`args`: [`R`, `R`, `OnCleanup`]) => `any` : (...`args`: [`any`, `any`, `OnCleanup`]) => `any` | -| `options?` | `WatchOptions`\<`boolean`\> | - -#### Returns - -`WatchStopHandle` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 - -___ - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Defined in - -[src/vue/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L51) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](../interfaces/react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:57](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L57) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L62) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Defined in - -[src/vue/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L67) - -## Properties - -### $ - -• **$**: `ComponentInternalInstance` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 - -___ - -### $data - -• **$data**: `Object` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 - -___ - -### $props - -• **$props**: `Partial`\<\{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `startMargin`: `number` ; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` }\> & `Omit`\<\{ `shift`: `boolean` = Boolean; `data`: `unknown`[] ; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `startMargin`: `number` ; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` ; `itemSize?`: `number` = Number; `ssrCount?`: `number` = Number; `scrollRef?`: `HTMLElement` ; `onScroll`: `undefined` \| (...`args`: [offset: number]) => `any` ; `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` } & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `startMargin`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 0 } ; `ssrCount`: `NumberConstructor` = Number; `scrollRef`: `PropType`\<`HTMLElement`\> ; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }\>\> & \{ `onScroll`: `undefined` \| (...`args`: [offset: number]) => `any` ; `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` }, `DefaultKeys`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `startMargin`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 0 } ; `ssrCount`: `NumberConstructor` = Number; `scrollRef`: `PropType`\<`HTMLElement`\> ; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 - -___ - -### $attrs - -• **$attrs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 - -___ - -### $refs - -• **$refs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 - -___ - -### $slots - -• **$slots**: `Readonly`\<\{ `default`: `any` }\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 - -___ - -### $root - -• **$root**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 - -___ - -### $parent - -• **$parent**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 - -___ - -### $emit - -• **$emit**: (`event`: ``"scroll"``, ...`args`: [offset: number]) => `void` & (`event`: ``"scrollEnd"``, ...`args`: []) => `void` & (`event`: ``"rangeChange"``, ...`args`: [startIndex: number, endIndex: number]) => `void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 - -___ - -### $el - -• **$el**: `any` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 - -___ - -### $options - -• **$options**: `ComponentOptionsBase`\<`ResolveProps`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `startMargin`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 0 } ; `ssrCount`: `NumberConstructor` = Number; `scrollRef`: `PropType`\<`HTMLElement`\> ; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }, \{ `scroll`: (`offset`: `number`) => `void` ; `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }\>, `VirtualizerHandle`, {}, {}, {}, `ComponentOptionsMixin`, `ComponentOptionsMixin`, \{ `scroll`: (`offset`: `number`) => `void` ; `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }, `string`, \{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `startMargin`: `number` ; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` }, {}, `string`, `SlotsType`\<\{ `default`: `any` }\>\> & `MergedComponentOptionsOverride` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 - -___ - -### $forceUpdate - -• **$forceUpdate**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 - -___ - -### $nextTick - -• **$nextTick**: \(`this`: `T`, `fn?`: (`this`: `T`) => `R`) => `Promise`\<`Awaited`\<`R`\>\> - -#### Type declaration - -▸ \<`T`, `R`\>(`this`, `fn?`): `Promise`\<`Awaited`\<`R`\>\> - -##### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `void` | -| `R` | `void` | - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `this` | `T` | -| `fn?` | (`this`: `T`) => `R` | - -##### Returns - -`Promise`\<`Awaited`\<`R`\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 - -___ - -### onScroll - -• **onScroll**: `undefined` \| (...`args`: [offset: number]) => `any` - -___ - -### shift - -• `Readonly` **shift**: `boolean` = `Boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/vue/Virtualizer.tsx:90](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L90) - -___ - -### data - -• `Readonly` **data**: `unknown`[] - -The data items rendered by this component. - -#### Defined in - -[src/vue/Virtualizer.tsx:74](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L74) - -___ - -### overscan - -• `Readonly` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/vue/Virtualizer.tsx:79](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L79) - -___ - -### itemSize - -• `Optional` `Readonly` **itemSize**: `number` = `Number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/vue/Virtualizer.tsx:86](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L86) - -___ - -### horizontal - -• `Readonly` **horizontal**: `boolean` = `Boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/vue/Virtualizer.tsx:94](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L94) - -___ - -### startMargin - -• `Readonly` **startMargin**: `number` - -If you put an element before virtualizer, you have to define its height with this prop. - -#### Defined in - -[src/vue/Virtualizer.tsx:98](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L98) - -___ - -### ssrCount - -• `Optional` `Readonly` **ssrCount**: `number` = `Number` - -A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. - -#### Defined in - -[src/vue/Virtualizer.tsx:102](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L102) - -___ - -### as - -• `Readonly` **as**: keyof `IntrinsicElementAttributes` - -Component or element type for container element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/vue/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L111) - -___ - -### item - -• `Readonly` **item**: keyof `IntrinsicElementAttributes` - -Component or element type for item element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/vue/Virtualizer.tsx:116](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L116) - -___ - -### scrollRef - -• `Optional` `Readonly` **scrollRef**: `HTMLElement` - -Reference to the scrollable element. The default will get the parent element of virtualizer. - -#### Defined in - -[src/vue/Virtualizer.tsx:106](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L106) - -___ - -### onScrollEnd - -• **onScrollEnd**: `undefined` \| (...`args`: []) => `any` - -___ - -### onRangeChange - -• **onRangeChange**: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` - -___ - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Defined in - -[src/vue/Virtualizer.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L38) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Defined in - -[src/vue/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L42) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Defined in - -[src/vue/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/Virtualizer.tsx#L46) diff --git a/docs/classes/vue.WindowVirtualizer.md b/docs/classes/vue.WindowVirtualizer.md deleted file mode 100644 index 77d602737..000000000 --- a/docs/classes/vue.WindowVirtualizer.md +++ /dev/null @@ -1,339 +0,0 @@ -# Class: WindowVirtualizer - -[vue](../modules/vue.md).WindowVirtualizer - -## Table of contents - -### Methods - -- [$watch](vue.WindowVirtualizer.md#$watch) - -### Properties - -- [$](vue.WindowVirtualizer.md#$) -- [$data](vue.WindowVirtualizer.md#$data) -- [$props](vue.WindowVirtualizer.md#$props) -- [$attrs](vue.WindowVirtualizer.md#$attrs) -- [$refs](vue.WindowVirtualizer.md#$refs) -- [$slots](vue.WindowVirtualizer.md#$slots) -- [$root](vue.WindowVirtualizer.md#$root) -- [$parent](vue.WindowVirtualizer.md#$parent) -- [$emit](vue.WindowVirtualizer.md#$emit) -- [$el](vue.WindowVirtualizer.md#$el) -- [$options](vue.WindowVirtualizer.md#$options) -- [$forceUpdate](vue.WindowVirtualizer.md#$forceupdate) -- [$nextTick](vue.WindowVirtualizer.md#$nexttick) -- [shift](vue.WindowVirtualizer.md#shift) -- [data](vue.WindowVirtualizer.md#data) -- [overscan](vue.WindowVirtualizer.md#overscan) -- [itemSize](vue.WindowVirtualizer.md#itemsize) -- [horizontal](vue.WindowVirtualizer.md#horizontal) -- [as](vue.WindowVirtualizer.md#as) -- [item](vue.WindowVirtualizer.md#item) -- [onScrollEnd](vue.WindowVirtualizer.md#onscrollend) -- [onRangeChange](vue.WindowVirtualizer.md#onrangechange) - -## Methods - -### $watch - -▸ **$watch**\<`T`\>(`source`, `cb`, `options?`): `WatchStopHandle` - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | extends `string` \| (...`args`: `any`) => `any` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `source` | `T` | -| `cb` | `T` extends (...`args`: `any`) => `R` ? (...`args`: [`R`, `R`, `OnCleanup`]) => `any` : (...`args`: [`any`, `any`, `OnCleanup`]) => `any` | -| `options?` | `WatchOptions`\<`boolean`\> | - -#### Returns - -`WatchStopHandle` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 - -## Properties - -### $ - -• **$**: `ComponentInternalInstance` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 - -___ - -### $data - -• **$data**: `Object` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 - -___ - -### $props - -• **$props**: `Partial`\<\{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` }\> & `Omit`\<\{ `shift`: `boolean` = Boolean; `data`: `unknown`[] ; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` ; `itemSize?`: `number` = Number; `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` } & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }\>\> & \{ `onScrollEnd`: `undefined` \| (...`args`: []) => `any` ; `onRangeChange`: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` }, `DefaultKeys`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 - -___ - -### $attrs - -• **$attrs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 - -___ - -### $refs - -• **$refs**: `Data` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 - -___ - -### $slots - -• **$slots**: `Readonly`\<\{ `default`: `any` }\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 - -___ - -### $root - -• **$root**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 - -___ - -### $parent - -• **$parent**: ``null`` \| `ComponentPublicInstance`\<{}, {}, {}, {}, {}, {}, {}, {}, ``false``, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, {}, {}, `string`, {}\>, {}, {}\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 - -___ - -### $emit - -• **$emit**: (`event`: ``"scrollEnd"``, ...`args`: []) => `void` & (`event`: ``"rangeChange"``, ...`args`: [startIndex: number, endIndex: number]) => `void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 - -___ - -### $el - -• **$el**: `any` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 - -___ - -### $options - -• **$options**: `ComponentOptionsBase`\<`ResolveProps`\<\{ `data`: \{ `type`: `ArrayConstructor` = Array; `required`: ``true`` = true } ; `overscan`: \{ `type`: `NumberConstructor` = Number; `default`: `number` = 4 } ; `itemSize`: `NumberConstructor` = Number; `shift`: `BooleanConstructor` = Boolean; `horizontal`: `BooleanConstructor` = Boolean; `as`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } ; `item`: \{ `type`: `PropType`\ ; `default`: `string` = "div" } }, \{ `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }\>, `void`, {}, {}, {}, `ComponentOptionsMixin`, `ComponentOptionsMixin`, \{ `scrollEnd`: () => `void` ; `rangeChange`: (`startIndex`: `number`, `endIndex`: `number`) => `void` }, `string`, \{ `shift`: `boolean` = Boolean; `overscan`: `number` ; `horizontal`: `boolean` = Boolean; `as`: keyof `IntrinsicElementAttributes` ; `item`: keyof `IntrinsicElementAttributes` }, {}, `string`, `SlotsType`\<\{ `default`: `any` }\>\> & `MergedComponentOptionsOverride` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 - -___ - -### $forceUpdate - -• **$forceUpdate**: () => `void` - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 - -___ - -### $nextTick - -• **$nextTick**: \(`this`: `T`, `fn?`: (`this`: `T`) => `R`) => `Promise`\<`Awaited`\<`R`\>\> - -#### Type declaration - -▸ \<`T`, `R`\>(`this`, `fn?`): `Promise`\<`Awaited`\<`R`\>\> - -##### Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `void` | -| `R` | `void` | - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `this` | `T` | -| `fn?` | (`this`: `T`) => `R` | - -##### Returns - -`Promise`\<`Awaited`\<`R`\>\> - -#### Defined in - -node_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 - -___ - -### shift - -• `Readonly` **shift**: `boolean` = `Boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:49](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L49) - -___ - -### data - -• `Readonly` **data**: `unknown`[] - -The data items rendered by this component. - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:33](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L33) - -___ - -### overscan - -• `Readonly` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L38) - -___ - -### itemSize - -• `Optional` `Readonly` **itemSize**: `number` = `Number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:45](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L45) - -___ - -### horizontal - -• `Readonly` **horizontal**: `boolean` = `Boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:53](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L53) - -___ - -### as - -• `Readonly` **as**: keyof `IntrinsicElementAttributes` - -Component or element type for container element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:58](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L58) - -___ - -### item - -• `Readonly` **item**: keyof `IntrinsicElementAttributes` - -Component or element type for item element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/vue/WindowVirtualizer.tsx:63](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/vue/WindowVirtualizer.tsx#L63) - -___ - -### onScrollEnd - -• **onScrollEnd**: `undefined` \| (...`args`: []) => `any` - -___ - -### onRangeChange - -• **onRangeChange**: `undefined` \| (...`args`: [startIndex: number, endIndex: number]) => `any` diff --git a/docs/interfaces/react.CacheSnapshot.md b/docs/interfaces/react.CacheSnapshot.md deleted file mode 100644 index 5d0248381..000000000 --- a/docs/interfaces/react.CacheSnapshot.md +++ /dev/null @@ -1,23 +0,0 @@ -# Interface: CacheSnapshot - -[react](../modules/react.md).CacheSnapshot - -Serializable cache snapshot. - -**This is not intended to be modified by users. And it is not guaranteed to work if you pass it to the different version of this package.** - -## Table of contents - -### Properties - -- [[cacheSymbol]](react.CacheSnapshot.md#[cachesymbol]) - -## Properties - -### [cacheSymbol] - -• **[cacheSymbol]**: `never` - -#### Defined in - -[src/core/types.ts:16](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/core/types.ts#L16) diff --git a/docs/interfaces/react.CustomCellComponentProps.md b/docs/interfaces/react.CustomCellComponentProps.md deleted file mode 100644 index eee445dfb..000000000 --- a/docs/interfaces/react.CustomCellComponentProps.md +++ /dev/null @@ -1,32 +0,0 @@ -# Interface: CustomCellComponentProps - -[react](../modules/react.md).CustomCellComponentProps - -Props of customized cell component for [VGrid](../modules/react.md#experimental_vgrid). - -## Table of contents - -### Properties - -- [style](react.CustomCellComponentProps.md#style) -- [children](react.CustomCellComponentProps.md#children) - -## Properties - -### style - -• **style**: `CSSProperties` - -#### Defined in - -[src/react/VGrid.tsx:34](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L34) - -___ - -### children - -• **children**: `ReactNode` - -#### Defined in - -[src/react/VGrid.tsx:35](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L35) diff --git a/docs/interfaces/react.CustomContainerComponentProps.md b/docs/interfaces/react.CustomContainerComponentProps.md deleted file mode 100644 index 892898e84..000000000 --- a/docs/interfaces/react.CustomContainerComponentProps.md +++ /dev/null @@ -1,30 +0,0 @@ -# Interface: CustomContainerComponentProps - -[react](../modules/react.md).CustomContainerComponentProps - -## Table of contents - -### Properties - -- [style](react.CustomContainerComponentProps.md#style) -- [children](react.CustomContainerComponentProps.md#children) - -## Properties - -### style - -• **style**: `CSSProperties` - -#### Defined in - -[src/react/types.ts:10](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L10) - -___ - -### children - -• **children**: `ReactNode` - -#### Defined in - -[src/react/types.ts:11](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L11) diff --git a/docs/interfaces/react.CustomItemComponentProps.md b/docs/interfaces/react.CustomItemComponentProps.md deleted file mode 100644 index bc6c524d6..000000000 --- a/docs/interfaces/react.CustomItemComponentProps.md +++ /dev/null @@ -1,43 +0,0 @@ -# Interface: CustomItemComponentProps - -[react](../modules/react.md).CustomItemComponentProps - -Props of customized item component for [Virtualizer](../modules/react.md#virtualizer) or [WindowVirtualizer](../modules/react.md#windowvirtualizer). - -## Table of contents - -### Properties - -- [style](react.CustomItemComponentProps.md#style) -- [index](react.CustomItemComponentProps.md#index) -- [children](react.CustomItemComponentProps.md#children) - -## Properties - -### style - -• **style**: `CSSProperties` - -#### Defined in - -[src/react/types.ts:23](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L23) - -___ - -### index - -• **index**: `number` - -#### Defined in - -[src/react/types.ts:24](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L24) - -___ - -### children - -• **children**: `ReactNode` - -#### Defined in - -[src/react/types.ts:25](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L25) diff --git a/docs/interfaces/react.VGridHandle.md b/docs/interfaces/react.VGridHandle.md deleted file mode 100644 index 56acc7a32..000000000 --- a/docs/interfaces/react.VGridHandle.md +++ /dev/null @@ -1,163 +0,0 @@ -# Interface: VGridHandle - -[react](../modules/react.md).VGridHandle - -Methods of [VGrid](../modules/react.md#experimental_vgrid). - -## Table of contents - -### Methods - -- [scrollToIndex](react.VGridHandle.md#scrolltoindex) -- [scrollTo](react.VGridHandle.md#scrollto) -- [scrollBy](react.VGridHandle.md#scrollby) - -### Properties - -- [scrollTop](react.VGridHandle.md#scrolltop) -- [scrollLeft](react.VGridHandle.md#scrollleft) -- [scrollHeight](react.VGridHandle.md#scrollheight) -- [scrollWidth](react.VGridHandle.md#scrollwidth) -- [viewportHeight](react.VGridHandle.md#viewportheight) -- [viewportWidth](react.VGridHandle.md#viewportwidth) - -## Methods - -### scrollToIndex - -▸ **scrollToIndex**(`indexX`, `indexY`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `indexX` | `number` | horizontal index of item | -| `indexY` | `number` | vertical index of item | - -#### Returns - -`void` - -#### Defined in - -[src/react/VGrid.tsx:133](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L133) - -___ - -### scrollTo - -▸ **scrollTo**(`offsetX`, `offsetY`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offsetX` | `number` | offset from left | -| `offsetY` | `number` | offset from top | - -#### Returns - -`void` - -#### Defined in - -[src/react/VGrid.tsx:139](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L139) - -___ - -### scrollBy - -▸ **scrollBy**(`offsetX`, `offsetY`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offsetX` | `number` | horizontal offset from current position | -| `offsetY` | `number` | vertical offset from current position | - -#### Returns - -`void` - -#### Defined in - -[src/react/VGrid.tsx:145](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L145) - -## Properties - -### scrollTop - -• `Readonly` **scrollTop**: `number` - -Get current scrollTop. - -#### Defined in - -[src/react/VGrid.tsx:107](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L107) - -___ - -### scrollLeft - -• `Readonly` **scrollLeft**: `number` - -Get current scrollLeft. - -#### Defined in - -[src/react/VGrid.tsx:111](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L111) - -___ - -### scrollHeight - -• `Readonly` **scrollHeight**: `number` - -Get current scrollHeight. - -#### Defined in - -[src/react/VGrid.tsx:115](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L115) - -___ - -### scrollWidth - -• `Readonly` **scrollWidth**: `number` - -Get current scrollWidth. - -#### Defined in - -[src/react/VGrid.tsx:119](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L119) - -___ - -### viewportHeight - -• `Readonly` **viewportHeight**: `number` - -Get current offsetHeight. - -#### Defined in - -[src/react/VGrid.tsx:123](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L123) - -___ - -### viewportWidth - -• `Readonly` **viewportWidth**: `number` - -Get current offsetWidth. - -#### Defined in - -[src/react/VGrid.tsx:127](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L127) diff --git a/docs/interfaces/react.VGridProps.md b/docs/interfaces/react.VGridProps.md deleted file mode 100644 index 303995dad..000000000 --- a/docs/interfaces/react.VGridProps.md +++ /dev/null @@ -1,1299 +0,0 @@ -# Interface: VGridProps - -[react](../modules/react.md).VGridProps - -Props of [VGrid](../modules/react.md#experimental_vgrid). - -## Hierarchy - -- [`ViewportComponentAttributes`](../modules/react.md#viewportcomponentattributes) - - ↳ **`VGridProps`** - -## Table of contents - -### Properties - -- [children](react.VGridProps.md#children) -- [row](react.VGridProps.md#row) -- [col](react.VGridProps.md#col) -- [cellHeight](react.VGridProps.md#cellheight) -- [cellWidth](react.VGridProps.md#cellwidth) -- [overscan](react.VGridProps.md#overscan) -- [initialRowCount](react.VGridProps.md#initialrowcount) -- [initialColCount](react.VGridProps.md#initialcolcount) -- [item](react.VGridProps.md#item) -- [className](react.VGridProps.md#classname) -- [style](react.VGridProps.md#style) -- [id](react.VGridProps.md#id) -- [role](react.VGridProps.md#role) -- [tabIndex](react.VGridProps.md#tabindex) -- [onKeyDown](react.VGridProps.md#onkeydown) -- [aria-activedescendant](react.VGridProps.md#aria-activedescendant) -- [aria-atomic](react.VGridProps.md#aria-atomic) -- [aria-autocomplete](react.VGridProps.md#aria-autocomplete) -- [aria-braillelabel](react.VGridProps.md#aria-braillelabel) -- [aria-brailleroledescription](react.VGridProps.md#aria-brailleroledescription) -- [aria-busy](react.VGridProps.md#aria-busy) -- [aria-checked](react.VGridProps.md#aria-checked) -- [aria-colcount](react.VGridProps.md#aria-colcount) -- [aria-colindex](react.VGridProps.md#aria-colindex) -- [aria-colindextext](react.VGridProps.md#aria-colindextext) -- [aria-colspan](react.VGridProps.md#aria-colspan) -- [aria-controls](react.VGridProps.md#aria-controls) -- [aria-current](react.VGridProps.md#aria-current) -- [aria-describedby](react.VGridProps.md#aria-describedby) -- [aria-description](react.VGridProps.md#aria-description) -- [aria-details](react.VGridProps.md#aria-details) -- [aria-disabled](react.VGridProps.md#aria-disabled) -- [aria-dropeffect](react.VGridProps.md#aria-dropeffect) -- [aria-errormessage](react.VGridProps.md#aria-errormessage) -- [aria-expanded](react.VGridProps.md#aria-expanded) -- [aria-flowto](react.VGridProps.md#aria-flowto) -- [aria-grabbed](react.VGridProps.md#aria-grabbed) -- [aria-haspopup](react.VGridProps.md#aria-haspopup) -- [aria-hidden](react.VGridProps.md#aria-hidden) -- [aria-invalid](react.VGridProps.md#aria-invalid) -- [aria-keyshortcuts](react.VGridProps.md#aria-keyshortcuts) -- [aria-label](react.VGridProps.md#aria-label) -- [aria-labelledby](react.VGridProps.md#aria-labelledby) -- [aria-level](react.VGridProps.md#aria-level) -- [aria-live](react.VGridProps.md#aria-live) -- [aria-modal](react.VGridProps.md#aria-modal) -- [aria-multiline](react.VGridProps.md#aria-multiline) -- [aria-multiselectable](react.VGridProps.md#aria-multiselectable) -- [aria-orientation](react.VGridProps.md#aria-orientation) -- [aria-owns](react.VGridProps.md#aria-owns) -- [aria-placeholder](react.VGridProps.md#aria-placeholder) -- [aria-posinset](react.VGridProps.md#aria-posinset) -- [aria-pressed](react.VGridProps.md#aria-pressed) -- [aria-readonly](react.VGridProps.md#aria-readonly) -- [aria-relevant](react.VGridProps.md#aria-relevant) -- [aria-required](react.VGridProps.md#aria-required) -- [aria-roledescription](react.VGridProps.md#aria-roledescription) -- [aria-rowcount](react.VGridProps.md#aria-rowcount) -- [aria-rowindex](react.VGridProps.md#aria-rowindex) -- [aria-rowindextext](react.VGridProps.md#aria-rowindextext) -- [aria-rowspan](react.VGridProps.md#aria-rowspan) -- [aria-selected](react.VGridProps.md#aria-selected) -- [aria-setsize](react.VGridProps.md#aria-setsize) -- [aria-sort](react.VGridProps.md#aria-sort) -- [aria-valuemax](react.VGridProps.md#aria-valuemax) -- [aria-valuemin](react.VGridProps.md#aria-valuemin) -- [aria-valuenow](react.VGridProps.md#aria-valuenow) -- [aria-valuetext](react.VGridProps.md#aria-valuetext) - -## Properties - -### children - -• **children**: (`arg`: \{ `rowIndex`: `number` ; `colIndex`: `number` }) => `ReactNode` - -A function to create elements rendered by this component. - -#### Type declaration - -▸ (`arg`): `ReactNode` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `arg` | `Object` | - | -| `arg.rowIndex` | `number` | row index of cell | -| `arg.colIndex` | `number` | column index of cell | - -##### Returns - -`ReactNode` - -#### Defined in - -[src/react/VGrid.tsx:155](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L155) - -___ - -### row - -• **row**: `number` - -Total row length of grid. - -#### Defined in - -[src/react/VGrid.tsx:168](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L168) - -___ - -### col - -• **col**: `number` - -Total column length of grid. - -#### Defined in - -[src/react/VGrid.tsx:172](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L172) - -___ - -### cellHeight - -• `Optional` **cellHeight**: `number` - -Cell height hint for unmeasured items. It's recommended to specify this prop if item sizes are fixed and known, or much larger than the defaultValue. It will help to reduce scroll jump when items are measured. - -**`Default Value`** - -```ts -40 -``` - -#### Defined in - -[src/react/VGrid.tsx:177](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L177) - -___ - -### cellWidth - -• `Optional` **cellWidth**: `number` - -Cell width hint for unmeasured items. It's recommended to specify this prop if item sizes are fixed and known, or much larger than the defaultValue. It will help to reduce scroll jump when items are measured. - -**`Default Value`** - -```ts -100 -``` - -#### Defined in - -[src/react/VGrid.tsx:182](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L182) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the grid. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -2 -``` - -#### Defined in - -[src/react/VGrid.tsx:187](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L187) - -___ - -### initialRowCount - -• `Optional` **initialRowCount**: `number` - -If set, the specified amount of rows will be mounted in the initial rendering regardless of the container size. This prop is mostly for SSR. - -#### Defined in - -[src/react/VGrid.tsx:191](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L191) - -___ - -### initialColCount - -• `Optional` **initialColCount**: `number` - -If set, the specified amount of cols will be mounted in the initial rendering regardless of the container size. This prop is mostly for SSR. - -#### Defined in - -[src/react/VGrid.tsx:195](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L195) - -___ - -### item - -• `Optional` **item**: keyof IntrinsicElements \| [`CustomCellComponent`](../modules/react.md#customcellcomponent) - -Component or element type for cell element. This component will get [CustomCellComponentProps](react.CustomCellComponentProps.md) as props. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/react/VGrid.tsx:200](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L200) - -___ - -### className - -• `Optional` **className**: `string` - -#### Inherited from - -ViewportComponentAttributes.className - -#### Defined in - -node_modules/@types/react/index.d.ts:2897 - -___ - -### style - -• `Optional` **style**: `CSSProperties` - -#### Inherited from - -ViewportComponentAttributes.style - -#### Defined in - -node_modules/@types/react/index.d.ts:2908 - -___ - -### id - -• `Optional` **id**: `string` - -#### Inherited from - -ViewportComponentAttributes.id - -#### Defined in - -node_modules/@types/react/index.d.ts:2903 - -___ - -### role - -• `Optional` **role**: `AriaRole` - -#### Inherited from - -ViewportComponentAttributes.role - -#### Defined in - -node_modules/@types/react/index.d.ts:2917 - -___ - -### tabIndex - -• `Optional` **tabIndex**: `number` - -#### Inherited from - -ViewportComponentAttributes.tabIndex - -#### Defined in - -node_modules/@types/react/index.d.ts:2909 - -___ - -### onKeyDown - -• `Optional` **onKeyDown**: `KeyboardEventHandler`\<`HTMLElement`\> - -#### Inherited from - -ViewportComponentAttributes.onKeyDown - -#### Defined in - -node_modules/@types/react/index.d.ts:2429 - -___ - -### aria-activedescendant - -• `Optional` **aria-activedescendant**: `string` - -Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. - -#### Inherited from - -ViewportComponentAttributes.aria-activedescendant - -#### Defined in - -node_modules/@types/react/index.d.ts:2593 - -___ - -### aria-atomic - -• `Optional` **aria-atomic**: `Booleanish` - -Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. - -#### Inherited from - -ViewportComponentAttributes.aria-atomic - -#### Defined in - -node_modules/@types/react/index.d.ts:2595 - -___ - -### aria-autocomplete - -• `Optional` **aria-autocomplete**: ``"inline"`` \| ``"none"`` \| ``"both"`` \| ``"list"`` - -Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be -presented if they are made. - -#### Inherited from - -ViewportComponentAttributes.aria-autocomplete - -#### Defined in - -node_modules/@types/react/index.d.ts:2600 - -___ - -### aria-braillelabel - -• `Optional` **aria-braillelabel**: `string` - -Defines a string value that labels the current element, which is intended to be converted into Braille. - -**`See`** - -aria-label. - -#### Inherited from - -ViewportComponentAttributes.aria-braillelabel - -#### Defined in - -node_modules/@types/react/index.d.ts:2606 - -___ - -### aria-brailleroledescription - -• `Optional` **aria-brailleroledescription**: `string` - -Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. - -**`See`** - -aria-roledescription. - -#### Inherited from - -ViewportComponentAttributes.aria-brailleroledescription - -#### Defined in - -node_modules/@types/react/index.d.ts:2611 - -___ - -### aria-busy - -• `Optional` **aria-busy**: `Booleanish` - -#### Inherited from - -ViewportComponentAttributes.aria-busy - -#### Defined in - -node_modules/@types/react/index.d.ts:2612 - -___ - -### aria-checked - -• `Optional` **aria-checked**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - -**`See`** - - - aria-pressed - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-checked - -#### Defined in - -node_modules/@types/react/index.d.ts:2617 - -___ - -### aria-colcount - -• `Optional` **aria-colcount**: `number` - -Defines the total number of columns in a table, grid, or treegrid. - -**`See`** - -aria-colindex. - -#### Inherited from - -ViewportComponentAttributes.aria-colcount - -#### Defined in - -node_modules/@types/react/index.d.ts:2622 - -___ - -### aria-colindex - -• `Optional` **aria-colindex**: `number` - -Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - -**`See`** - - - aria-colcount - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colindex - -#### Defined in - -node_modules/@types/react/index.d.ts:2627 - -___ - -### aria-colindextext - -• `Optional` **aria-colindextext**: `string` - -Defines a human readable text alternative of aria-colindex. - -**`See`** - -aria-rowindextext. - -#### Inherited from - -ViewportComponentAttributes.aria-colindextext - -#### Defined in - -node_modules/@types/react/index.d.ts:2632 - -___ - -### aria-colspan - -• `Optional` **aria-colspan**: `number` - -Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-colindex - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colspan - -#### Defined in - -node_modules/@types/react/index.d.ts:2637 - -___ - -### aria-controls - -• `Optional` **aria-controls**: `string` - -Identifies the element (or elements) whose contents or presence are controlled by the current element. - -**`See`** - -aria-owns. - -#### Inherited from - -ViewportComponentAttributes.aria-controls - -#### Defined in - -node_modules/@types/react/index.d.ts:2642 - -___ - -### aria-current - -• `Optional` **aria-current**: `boolean` \| ``"time"`` \| ``"page"`` \| ``"false"`` \| ``"true"`` \| ``"location"`` \| ``"date"`` \| ``"step"`` - -Indicates the element that represents the current item within a container or set of related elements. - -#### Inherited from - -ViewportComponentAttributes.aria-current - -#### Defined in - -node_modules/@types/react/index.d.ts:2644 - -___ - -### aria-describedby - -• `Optional` **aria-describedby**: `string` - -Identifies the element (or elements) that describes the object. - -**`See`** - -aria-labelledby - -#### Inherited from - -ViewportComponentAttributes.aria-describedby - -#### Defined in - -node_modules/@types/react/index.d.ts:2649 - -___ - -### aria-description - -• `Optional` **aria-description**: `string` - -Defines a string value that describes or annotates the current element. - -**`See`** - -related aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-description - -#### Defined in - -node_modules/@types/react/index.d.ts:2654 - -___ - -### aria-details - -• `Optional` **aria-details**: `string` - -Identifies the element that provides a detailed, extended description for the object. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-details - -#### Defined in - -node_modules/@types/react/index.d.ts:2659 - -___ - -### aria-disabled - -• `Optional` **aria-disabled**: `Booleanish` - -Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - -**`See`** - - - aria-hidden - - aria-readonly. - -#### Inherited from - -ViewportComponentAttributes.aria-disabled - -#### Defined in - -node_modules/@types/react/index.d.ts:2664 - -___ - -### aria-dropeffect - -• `Optional` **aria-dropeffect**: ``"copy"`` \| ``"none"`` \| ``"link"`` \| ``"move"`` \| ``"execute"`` \| ``"popup"`` - -Indicates what functions can be performed when a dragged object is released on the drop target. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-dropeffect - -#### Defined in - -node_modules/@types/react/index.d.ts:2669 - -___ - -### aria-errormessage - -• `Optional` **aria-errormessage**: `string` - -Identifies the element that provides an error message for the object. - -**`See`** - - - aria-invalid - - aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-errormessage - -#### Defined in - -node_modules/@types/react/index.d.ts:2674 - -___ - -### aria-expanded - -• `Optional` **aria-expanded**: `Booleanish` - -Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. - -#### Inherited from - -ViewportComponentAttributes.aria-expanded - -#### Defined in - -node_modules/@types/react/index.d.ts:2676 - -___ - -### aria-flowto - -• `Optional` **aria-flowto**: `string` - -Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, -allows assistive technology to override the general default of reading in document source order. - -#### Inherited from - -ViewportComponentAttributes.aria-flowto - -#### Defined in - -node_modules/@types/react/index.d.ts:2681 - -___ - -### aria-grabbed - -• `Optional` **aria-grabbed**: `Booleanish` - -Indicates an element's "grabbed" state in a drag-and-drop operation. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-grabbed - -#### Defined in - -node_modules/@types/react/index.d.ts:2686 - -___ - -### aria-haspopup - -• `Optional` **aria-haspopup**: `boolean` \| ``"grid"`` \| ``"dialog"`` \| ``"menu"`` \| ``"listbox"`` \| ``"false"`` \| ``"true"`` \| ``"tree"`` - -Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. - -#### Inherited from - -ViewportComponentAttributes.aria-haspopup - -#### Defined in - -node_modules/@types/react/index.d.ts:2688 - -___ - -### aria-hidden - -• `Optional` **aria-hidden**: `Booleanish` - -Indicates whether the element is exposed to an accessibility API. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-hidden - -#### Defined in - -node_modules/@types/react/index.d.ts:2693 - -___ - -### aria-invalid - -• `Optional` **aria-invalid**: `boolean` \| ``"false"`` \| ``"true"`` \| ``"grammar"`` \| ``"spelling"`` - -Indicates the entered value does not conform to the format expected by the application. - -**`See`** - -aria-errormessage. - -#### Inherited from - -ViewportComponentAttributes.aria-invalid - -#### Defined in - -node_modules/@types/react/index.d.ts:2698 - -___ - -### aria-keyshortcuts - -• `Optional` **aria-keyshortcuts**: `string` - -Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. - -#### Inherited from - -ViewportComponentAttributes.aria-keyshortcuts - -#### Defined in - -node_modules/@types/react/index.d.ts:2700 - -___ - -### aria-label - -• `Optional` **aria-label**: `string` - -Defines a string value that labels the current element. - -**`See`** - -aria-labelledby. - -#### Inherited from - -ViewportComponentAttributes.aria-label - -#### Defined in - -node_modules/@types/react/index.d.ts:2705 - -___ - -### aria-labelledby - -• `Optional` **aria-labelledby**: `string` - -Identifies the element (or elements) that labels the current element. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-labelledby - -#### Defined in - -node_modules/@types/react/index.d.ts:2710 - -___ - -### aria-level - -• `Optional` **aria-level**: `number` - -Defines the hierarchical level of an element within a structure. - -#### Inherited from - -ViewportComponentAttributes.aria-level - -#### Defined in - -node_modules/@types/react/index.d.ts:2712 - -___ - -### aria-live - -• `Optional` **aria-live**: ``"off"`` \| ``"assertive"`` \| ``"polite"`` - -Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. - -#### Inherited from - -ViewportComponentAttributes.aria-live - -#### Defined in - -node_modules/@types/react/index.d.ts:2714 - -___ - -### aria-modal - -• `Optional` **aria-modal**: `Booleanish` - -Indicates whether an element is modal when displayed. - -#### Inherited from - -ViewportComponentAttributes.aria-modal - -#### Defined in - -node_modules/@types/react/index.d.ts:2716 - -___ - -### aria-multiline - -• `Optional` **aria-multiline**: `Booleanish` - -Indicates whether a text box accepts multiple lines of input or only a single line. - -#### Inherited from - -ViewportComponentAttributes.aria-multiline - -#### Defined in - -node_modules/@types/react/index.d.ts:2718 - -___ - -### aria-multiselectable - -• `Optional` **aria-multiselectable**: `Booleanish` - -Indicates that the user may select more than one item from the current selectable descendants. - -#### Inherited from - -ViewportComponentAttributes.aria-multiselectable - -#### Defined in - -node_modules/@types/react/index.d.ts:2720 - -___ - -### aria-orientation - -• `Optional` **aria-orientation**: ``"horizontal"`` \| ``"vertical"`` - -Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. - -#### Inherited from - -ViewportComponentAttributes.aria-orientation - -#### Defined in - -node_modules/@types/react/index.d.ts:2722 - -___ - -### aria-owns - -• `Optional` **aria-owns**: `string` - -Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship -between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - -**`See`** - -aria-controls. - -#### Inherited from - -ViewportComponentAttributes.aria-owns - -#### Defined in - -node_modules/@types/react/index.d.ts:2728 - -___ - -### aria-placeholder - -• `Optional` **aria-placeholder**: `string` - -Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. -A hint could be a sample value or a brief description of the expected format. - -#### Inherited from - -ViewportComponentAttributes.aria-placeholder - -#### Defined in - -node_modules/@types/react/index.d.ts:2733 - -___ - -### aria-posinset - -• `Optional` **aria-posinset**: `number` - -Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-setsize. - -#### Inherited from - -ViewportComponentAttributes.aria-posinset - -#### Defined in - -node_modules/@types/react/index.d.ts:2738 - -___ - -### aria-pressed - -• `Optional` **aria-pressed**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "pressed" state of toggle buttons. - -**`See`** - - - aria-checked - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-pressed - -#### Defined in - -node_modules/@types/react/index.d.ts:2743 - -___ - -### aria-readonly - -• `Optional` **aria-readonly**: `Booleanish` - -Indicates that the element is not editable, but is otherwise operable. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-readonly - -#### Defined in - -node_modules/@types/react/index.d.ts:2748 - -___ - -### aria-relevant - -• `Optional` **aria-relevant**: ``"text"`` \| ``"all"`` \| ``"additions"`` \| ``"additions removals"`` \| ``"additions text"`` \| ``"removals"`` \| ``"removals additions"`` \| ``"removals text"`` \| ``"text additions"`` \| ``"text removals"`` - -Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - -**`See`** - -aria-atomic. - -#### Inherited from - -ViewportComponentAttributes.aria-relevant - -#### Defined in - -node_modules/@types/react/index.d.ts:2753 - -___ - -### aria-required - -• `Optional` **aria-required**: `Booleanish` - -Indicates that user input is required on the element before a form may be submitted. - -#### Inherited from - -ViewportComponentAttributes.aria-required - -#### Defined in - -node_modules/@types/react/index.d.ts:2766 - -___ - -### aria-roledescription - -• `Optional` **aria-roledescription**: `string` - -Defines a human-readable, author-localized description for the role of an element. - -#### Inherited from - -ViewportComponentAttributes.aria-roledescription - -#### Defined in - -node_modules/@types/react/index.d.ts:2768 - -___ - -### aria-rowcount - -• `Optional` **aria-rowcount**: `number` - -Defines the total number of rows in a table, grid, or treegrid. - -**`See`** - -aria-rowindex. - -#### Inherited from - -ViewportComponentAttributes.aria-rowcount - -#### Defined in - -node_modules/@types/react/index.d.ts:2773 - -___ - -### aria-rowindex - -• `Optional` **aria-rowindex**: `number` - -Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - -**`See`** - - - aria-rowcount - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowindex - -#### Defined in - -node_modules/@types/react/index.d.ts:2778 - -___ - -### aria-rowindextext - -• `Optional` **aria-rowindextext**: `string` - -Defines a human readable text alternative of aria-rowindex. - -**`See`** - -aria-colindextext. - -#### Inherited from - -ViewportComponentAttributes.aria-rowindextext - -#### Defined in - -node_modules/@types/react/index.d.ts:2783 - -___ - -### aria-rowspan - -• `Optional` **aria-rowspan**: `number` - -Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-rowindex - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowspan - -#### Defined in - -node_modules/@types/react/index.d.ts:2788 - -___ - -### aria-selected - -• `Optional` **aria-selected**: `Booleanish` - -Indicates the current "selected" state of various widgets. - -**`See`** - - - aria-checked - - aria-pressed. - -#### Inherited from - -ViewportComponentAttributes.aria-selected - -#### Defined in - -node_modules/@types/react/index.d.ts:2793 - -___ - -### aria-setsize - -• `Optional` **aria-setsize**: `number` - -Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-posinset. - -#### Inherited from - -ViewportComponentAttributes.aria-setsize - -#### Defined in - -node_modules/@types/react/index.d.ts:2798 - -___ - -### aria-sort - -• `Optional` **aria-sort**: ``"none"`` \| ``"ascending"`` \| ``"descending"`` \| ``"other"`` - -Indicates if items in a table or grid are sorted in ascending or descending order. - -#### Inherited from - -ViewportComponentAttributes.aria-sort - -#### Defined in - -node_modules/@types/react/index.d.ts:2800 - -___ - -### aria-valuemax - -• `Optional` **aria-valuemax**: `number` - -Defines the maximum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemax - -#### Defined in - -node_modules/@types/react/index.d.ts:2802 - -___ - -### aria-valuemin - -• `Optional` **aria-valuemin**: `number` - -Defines the minimum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemin - -#### Defined in - -node_modules/@types/react/index.d.ts:2804 - -___ - -### aria-valuenow - -• `Optional` **aria-valuenow**: `number` - -Defines the current value for a range widget. - -**`See`** - -aria-valuetext. - -#### Inherited from - -ViewportComponentAttributes.aria-valuenow - -#### Defined in - -node_modules/@types/react/index.d.ts:2809 - -___ - -### aria-valuetext - -• `Optional` **aria-valuetext**: `string` - -Defines the human readable text alternative of aria-valuenow for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuetext - -#### Defined in - -node_modules/@types/react/index.d.ts:2811 diff --git a/docs/interfaces/react.VListHandle.md b/docs/interfaces/react.VListHandle.md deleted file mode 100644 index 4a3c96270..000000000 --- a/docs/interfaces/react.VListHandle.md +++ /dev/null @@ -1,196 +0,0 @@ -# Interface: VListHandle - -[react](../modules/react.md).VListHandle - -Methods of [VList](../modules/react.md#vlist). - -## Hierarchy - -- [`VirtualizerHandle`](react.VirtualizerHandle.md) - - ↳ **`VListHandle`** - -## Table of contents - -### Methods - -- [getItemOffset](react.VListHandle.md#getitemoffset) -- [scrollToIndex](react.VListHandle.md#scrolltoindex) -- [scrollTo](react.VListHandle.md#scrollto) -- [scrollBy](react.VListHandle.md#scrollby) - -### Properties - -- [cache](react.VListHandle.md#cache) -- [scrollOffset](react.VListHandle.md#scrolloffset) -- [scrollSize](react.VListHandle.md#scrollsize) -- [viewportSize](react.VListHandle.md#viewportsize) - -## Methods - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[getItemOffset](react.VirtualizerHandle.md#getitemoffset) - -#### Defined in - -[src/react/Virtualizer.tsx:59](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L59) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[scrollToIndex](react.VirtualizerHandle.md#scrolltoindex) - -#### Defined in - -[src/react/Virtualizer.tsx:65](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L65) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[scrollTo](react.VirtualizerHandle.md#scrollto) - -#### Defined in - -[src/react/Virtualizer.tsx:70](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L70) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[scrollBy](react.VirtualizerHandle.md#scrollby) - -#### Defined in - -[src/react/Virtualizer.tsx:75](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L75) - -## Properties - -### cache - -• `Readonly` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -Get current [CacheSnapshot](react.CacheSnapshot.md). - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[cache](react.VirtualizerHandle.md#cache) - -#### Defined in - -[src/react/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L42) - -___ - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[scrollOffset](react.VirtualizerHandle.md#scrolloffset) - -#### Defined in - -[src/react/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L46) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[scrollSize](react.VirtualizerHandle.md#scrollsize) - -#### Defined in - -[src/react/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L50) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Inherited from - -[VirtualizerHandle](react.VirtualizerHandle.md).[viewportSize](react.VirtualizerHandle.md#viewportsize) - -#### Defined in - -[src/react/Virtualizer.tsx:54](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L54) diff --git a/docs/interfaces/react.VListProps.md b/docs/interfaces/react.VListProps.md deleted file mode 100644 index 61b013e70..000000000 --- a/docs/interfaces/react.VListProps.md +++ /dev/null @@ -1,1434 +0,0 @@ -# Interface: VListProps - -[react](../modules/react.md).VListProps - -Props of [VList](../modules/react.md#vlist). - -## Hierarchy - -- `Pick`\<[`VirtualizerProps`](react.VirtualizerProps.md), ``"children"`` \| ``"count"`` \| ``"overscan"`` \| ``"itemSize"`` \| ``"shift"`` \| ``"horizontal"`` \| ``"cache"`` \| ``"ssrCount"`` \| ``"item"`` \| ``"onScroll"`` \| ``"onScrollEnd"`` \| ``"onRangeChange"`` \| ``"keepMounted"``\> - -- [`ViewportComponentAttributes`](../modules/react.md#viewportcomponentattributes) - - ↳ **`VListProps`** - -## Table of contents - -### Properties - -- [reverse](react.VListProps.md#reverse) -- [children](react.VListProps.md#children) -- [onScroll](react.VListProps.md#onscroll) -- [shift](react.VListProps.md#shift) -- [count](react.VListProps.md#count) -- [overscan](react.VListProps.md#overscan) -- [keepMounted](react.VListProps.md#keepmounted) -- [itemSize](react.VListProps.md#itemsize) -- [horizontal](react.VListProps.md#horizontal) -- [cache](react.VListProps.md#cache) -- [ssrCount](react.VListProps.md#ssrcount) -- [item](react.VListProps.md#item) -- [onScrollEnd](react.VListProps.md#onscrollend) -- [onRangeChange](react.VListProps.md#onrangechange) -- [className](react.VListProps.md#classname) -- [style](react.VListProps.md#style) -- [id](react.VListProps.md#id) -- [role](react.VListProps.md#role) -- [tabIndex](react.VListProps.md#tabindex) -- [onKeyDown](react.VListProps.md#onkeydown) -- [aria-activedescendant](react.VListProps.md#aria-activedescendant) -- [aria-atomic](react.VListProps.md#aria-atomic) -- [aria-autocomplete](react.VListProps.md#aria-autocomplete) -- [aria-braillelabel](react.VListProps.md#aria-braillelabel) -- [aria-brailleroledescription](react.VListProps.md#aria-brailleroledescription) -- [aria-busy](react.VListProps.md#aria-busy) -- [aria-checked](react.VListProps.md#aria-checked) -- [aria-colcount](react.VListProps.md#aria-colcount) -- [aria-colindex](react.VListProps.md#aria-colindex) -- [aria-colindextext](react.VListProps.md#aria-colindextext) -- [aria-colspan](react.VListProps.md#aria-colspan) -- [aria-controls](react.VListProps.md#aria-controls) -- [aria-current](react.VListProps.md#aria-current) -- [aria-describedby](react.VListProps.md#aria-describedby) -- [aria-description](react.VListProps.md#aria-description) -- [aria-details](react.VListProps.md#aria-details) -- [aria-disabled](react.VListProps.md#aria-disabled) -- [aria-dropeffect](react.VListProps.md#aria-dropeffect) -- [aria-errormessage](react.VListProps.md#aria-errormessage) -- [aria-expanded](react.VListProps.md#aria-expanded) -- [aria-flowto](react.VListProps.md#aria-flowto) -- [aria-grabbed](react.VListProps.md#aria-grabbed) -- [aria-haspopup](react.VListProps.md#aria-haspopup) -- [aria-hidden](react.VListProps.md#aria-hidden) -- [aria-invalid](react.VListProps.md#aria-invalid) -- [aria-keyshortcuts](react.VListProps.md#aria-keyshortcuts) -- [aria-label](react.VListProps.md#aria-label) -- [aria-labelledby](react.VListProps.md#aria-labelledby) -- [aria-level](react.VListProps.md#aria-level) -- [aria-live](react.VListProps.md#aria-live) -- [aria-modal](react.VListProps.md#aria-modal) -- [aria-multiline](react.VListProps.md#aria-multiline) -- [aria-multiselectable](react.VListProps.md#aria-multiselectable) -- [aria-orientation](react.VListProps.md#aria-orientation) -- [aria-owns](react.VListProps.md#aria-owns) -- [aria-placeholder](react.VListProps.md#aria-placeholder) -- [aria-posinset](react.VListProps.md#aria-posinset) -- [aria-pressed](react.VListProps.md#aria-pressed) -- [aria-readonly](react.VListProps.md#aria-readonly) -- [aria-relevant](react.VListProps.md#aria-relevant) -- [aria-required](react.VListProps.md#aria-required) -- [aria-roledescription](react.VListProps.md#aria-roledescription) -- [aria-rowcount](react.VListProps.md#aria-rowcount) -- [aria-rowindex](react.VListProps.md#aria-rowindex) -- [aria-rowindextext](react.VListProps.md#aria-rowindextext) -- [aria-rowspan](react.VListProps.md#aria-rowspan) -- [aria-selected](react.VListProps.md#aria-selected) -- [aria-setsize](react.VListProps.md#aria-setsize) -- [aria-sort](react.VListProps.md#aria-sort) -- [aria-valuemax](react.VListProps.md#aria-valuemax) -- [aria-valuemin](react.VListProps.md#aria-valuemin) -- [aria-valuenow](react.VListProps.md#aria-valuenow) -- [aria-valuetext](react.VListProps.md#aria-valuetext) - -## Properties - -### reverse - -• `Optional` **reverse**: `boolean` - -If true, items are aligned to the end of the list when total size of items are smaller than viewport size. It's useful for chat like app. - -#### Defined in - -[src/react/VList.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VList.tsx#L38) - -___ - -### children - -• **children**: `ReactNode` \| (`index`: `number`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> - -Elements rendered by this component. - -You can also pass a function and set [VirtualizerProps.count](react.VirtualizerProps.md#count) to create elements lazily. - -#### Inherited from - -Pick.children - -#### Defined in - -[src/react/Virtualizer.tsx:87](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L87) - -___ - -### onScroll - -• `Optional` **onScroll**: (`offset`: `number`) => `void` - -Callback invoked whenever scroll offset changes. - -#### Type declaration - -▸ (`offset`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | Current scrollTop or scrollLeft. | - -##### Returns - -`void` - -#### Inherited from - -Pick.onScroll - -#### Defined in - -[src/react/Virtualizer.tsx:148](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L148) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Inherited from - -Pick.shift - -#### Defined in - -[src/react/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L111) - -___ - -### count - -• `Optional` **count**: `number` - -If you set a function to [VirtualizerProps.children](react.VirtualizerProps.md#children), you have to set total number of items to this prop. - -#### Inherited from - -Pick.count - -#### Defined in - -[src/react/Virtualizer.tsx:91](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L91) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Inherited from - -Pick.overscan - -#### Defined in - -[src/react/Virtualizer.tsx:96](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L96) - -___ - -### keepMounted - -• `Optional` **keepMounted**: `number`[] - -List of indexes that should be always mounted, even when off screen. - -#### Inherited from - -Pick.keepMounted - -#### Defined in - -[src/react/Virtualizer.tsx:100](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L100) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Inherited from - -Pick.itemSize - -#### Defined in - -[src/react/Virtualizer.tsx:107](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L107) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Inherited from - -Pick.horizontal - -#### Defined in - -[src/react/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L115) - -___ - -### cache - -• `Optional` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -You can restore cache by passing a [CacheSnapshot](react.CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [VirtualizerHandle.cache](react.VirtualizerHandle.md#cache). - -**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** - -#### Inherited from - -Pick.cache - -#### Defined in - -[src/react/Virtualizer.tsx:121](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L121) - -___ - -### ssrCount - -• `Optional` **ssrCount**: `number` - -A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. - -#### Inherited from - -Pick.ssrCount - -#### Defined in - -[src/react/Virtualizer.tsx:129](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L129) - -___ - -### item - -• `Optional` **item**: [`CustomItemComponent`](../modules/react.md#customitemcomponent) \| keyof IntrinsicElements - -Component or element type for item element. This component will get [CustomItemComponentProps](react.CustomItemComponentProps.md) as props. - -**`Default Value`** - -```ts -"div" -``` - -#### Inherited from - -Pick.item - -#### Defined in - -[src/react/Virtualizer.tsx:139](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L139) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Inherited from - -Pick.onScrollEnd - -#### Defined in - -[src/react/Virtualizer.tsx:152](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L152) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Inherited from - -Pick.onRangeChange - -#### Defined in - -[src/react/Virtualizer.tsx:156](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L156) - -___ - -### className - -• `Optional` **className**: `string` - -#### Inherited from - -ViewportComponentAttributes.className - -#### Defined in - -node_modules/@types/react/index.d.ts:2897 - -___ - -### style - -• `Optional` **style**: `CSSProperties` - -#### Inherited from - -ViewportComponentAttributes.style - -#### Defined in - -node_modules/@types/react/index.d.ts:2908 - -___ - -### id - -• `Optional` **id**: `string` - -#### Inherited from - -ViewportComponentAttributes.id - -#### Defined in - -node_modules/@types/react/index.d.ts:2903 - -___ - -### role - -• `Optional` **role**: `AriaRole` - -#### Inherited from - -ViewportComponentAttributes.role - -#### Defined in - -node_modules/@types/react/index.d.ts:2917 - -___ - -### tabIndex - -• `Optional` **tabIndex**: `number` - -#### Inherited from - -ViewportComponentAttributes.tabIndex - -#### Defined in - -node_modules/@types/react/index.d.ts:2909 - -___ - -### onKeyDown - -• `Optional` **onKeyDown**: `KeyboardEventHandler`\<`HTMLElement`\> - -#### Inherited from - -ViewportComponentAttributes.onKeyDown - -#### Defined in - -node_modules/@types/react/index.d.ts:2429 - -___ - -### aria-activedescendant - -• `Optional` **aria-activedescendant**: `string` - -Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. - -#### Inherited from - -ViewportComponentAttributes.aria-activedescendant - -#### Defined in - -node_modules/@types/react/index.d.ts:2593 - -___ - -### aria-atomic - -• `Optional` **aria-atomic**: `Booleanish` - -Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. - -#### Inherited from - -ViewportComponentAttributes.aria-atomic - -#### Defined in - -node_modules/@types/react/index.d.ts:2595 - -___ - -### aria-autocomplete - -• `Optional` **aria-autocomplete**: ``"inline"`` \| ``"none"`` \| ``"both"`` \| ``"list"`` - -Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be -presented if they are made. - -#### Inherited from - -ViewportComponentAttributes.aria-autocomplete - -#### Defined in - -node_modules/@types/react/index.d.ts:2600 - -___ - -### aria-braillelabel - -• `Optional` **aria-braillelabel**: `string` - -Defines a string value that labels the current element, which is intended to be converted into Braille. - -**`See`** - -aria-label. - -#### Inherited from - -ViewportComponentAttributes.aria-braillelabel - -#### Defined in - -node_modules/@types/react/index.d.ts:2606 - -___ - -### aria-brailleroledescription - -• `Optional` **aria-brailleroledescription**: `string` - -Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. - -**`See`** - -aria-roledescription. - -#### Inherited from - -ViewportComponentAttributes.aria-brailleroledescription - -#### Defined in - -node_modules/@types/react/index.d.ts:2611 - -___ - -### aria-busy - -• `Optional` **aria-busy**: `Booleanish` - -#### Inherited from - -ViewportComponentAttributes.aria-busy - -#### Defined in - -node_modules/@types/react/index.d.ts:2612 - -___ - -### aria-checked - -• `Optional` **aria-checked**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - -**`See`** - - - aria-pressed - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-checked - -#### Defined in - -node_modules/@types/react/index.d.ts:2617 - -___ - -### aria-colcount - -• `Optional` **aria-colcount**: `number` - -Defines the total number of columns in a table, grid, or treegrid. - -**`See`** - -aria-colindex. - -#### Inherited from - -ViewportComponentAttributes.aria-colcount - -#### Defined in - -node_modules/@types/react/index.d.ts:2622 - -___ - -### aria-colindex - -• `Optional` **aria-colindex**: `number` - -Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - -**`See`** - - - aria-colcount - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colindex - -#### Defined in - -node_modules/@types/react/index.d.ts:2627 - -___ - -### aria-colindextext - -• `Optional` **aria-colindextext**: `string` - -Defines a human readable text alternative of aria-colindex. - -**`See`** - -aria-rowindextext. - -#### Inherited from - -ViewportComponentAttributes.aria-colindextext - -#### Defined in - -node_modules/@types/react/index.d.ts:2632 - -___ - -### aria-colspan - -• `Optional` **aria-colspan**: `number` - -Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-colindex - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colspan - -#### Defined in - -node_modules/@types/react/index.d.ts:2637 - -___ - -### aria-controls - -• `Optional` **aria-controls**: `string` - -Identifies the element (or elements) whose contents or presence are controlled by the current element. - -**`See`** - -aria-owns. - -#### Inherited from - -ViewportComponentAttributes.aria-controls - -#### Defined in - -node_modules/@types/react/index.d.ts:2642 - -___ - -### aria-current - -• `Optional` **aria-current**: `boolean` \| ``"time"`` \| ``"page"`` \| ``"false"`` \| ``"true"`` \| ``"location"`` \| ``"date"`` \| ``"step"`` - -Indicates the element that represents the current item within a container or set of related elements. - -#### Inherited from - -ViewportComponentAttributes.aria-current - -#### Defined in - -node_modules/@types/react/index.d.ts:2644 - -___ - -### aria-describedby - -• `Optional` **aria-describedby**: `string` - -Identifies the element (or elements) that describes the object. - -**`See`** - -aria-labelledby - -#### Inherited from - -ViewportComponentAttributes.aria-describedby - -#### Defined in - -node_modules/@types/react/index.d.ts:2649 - -___ - -### aria-description - -• `Optional` **aria-description**: `string` - -Defines a string value that describes or annotates the current element. - -**`See`** - -related aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-description - -#### Defined in - -node_modules/@types/react/index.d.ts:2654 - -___ - -### aria-details - -• `Optional` **aria-details**: `string` - -Identifies the element that provides a detailed, extended description for the object. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-details - -#### Defined in - -node_modules/@types/react/index.d.ts:2659 - -___ - -### aria-disabled - -• `Optional` **aria-disabled**: `Booleanish` - -Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - -**`See`** - - - aria-hidden - - aria-readonly. - -#### Inherited from - -ViewportComponentAttributes.aria-disabled - -#### Defined in - -node_modules/@types/react/index.d.ts:2664 - -___ - -### aria-dropeffect - -• `Optional` **aria-dropeffect**: ``"copy"`` \| ``"none"`` \| ``"link"`` \| ``"move"`` \| ``"execute"`` \| ``"popup"`` - -Indicates what functions can be performed when a dragged object is released on the drop target. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-dropeffect - -#### Defined in - -node_modules/@types/react/index.d.ts:2669 - -___ - -### aria-errormessage - -• `Optional` **aria-errormessage**: `string` - -Identifies the element that provides an error message for the object. - -**`See`** - - - aria-invalid - - aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-errormessage - -#### Defined in - -node_modules/@types/react/index.d.ts:2674 - -___ - -### aria-expanded - -• `Optional` **aria-expanded**: `Booleanish` - -Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. - -#### Inherited from - -ViewportComponentAttributes.aria-expanded - -#### Defined in - -node_modules/@types/react/index.d.ts:2676 - -___ - -### aria-flowto - -• `Optional` **aria-flowto**: `string` - -Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, -allows assistive technology to override the general default of reading in document source order. - -#### Inherited from - -ViewportComponentAttributes.aria-flowto - -#### Defined in - -node_modules/@types/react/index.d.ts:2681 - -___ - -### aria-grabbed - -• `Optional` **aria-grabbed**: `Booleanish` - -Indicates an element's "grabbed" state in a drag-and-drop operation. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-grabbed - -#### Defined in - -node_modules/@types/react/index.d.ts:2686 - -___ - -### aria-haspopup - -• `Optional` **aria-haspopup**: `boolean` \| ``"grid"`` \| ``"dialog"`` \| ``"menu"`` \| ``"listbox"`` \| ``"false"`` \| ``"true"`` \| ``"tree"`` - -Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. - -#### Inherited from - -ViewportComponentAttributes.aria-haspopup - -#### Defined in - -node_modules/@types/react/index.d.ts:2688 - -___ - -### aria-hidden - -• `Optional` **aria-hidden**: `Booleanish` - -Indicates whether the element is exposed to an accessibility API. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-hidden - -#### Defined in - -node_modules/@types/react/index.d.ts:2693 - -___ - -### aria-invalid - -• `Optional` **aria-invalid**: `boolean` \| ``"false"`` \| ``"true"`` \| ``"grammar"`` \| ``"spelling"`` - -Indicates the entered value does not conform to the format expected by the application. - -**`See`** - -aria-errormessage. - -#### Inherited from - -ViewportComponentAttributes.aria-invalid - -#### Defined in - -node_modules/@types/react/index.d.ts:2698 - -___ - -### aria-keyshortcuts - -• `Optional` **aria-keyshortcuts**: `string` - -Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. - -#### Inherited from - -ViewportComponentAttributes.aria-keyshortcuts - -#### Defined in - -node_modules/@types/react/index.d.ts:2700 - -___ - -### aria-label - -• `Optional` **aria-label**: `string` - -Defines a string value that labels the current element. - -**`See`** - -aria-labelledby. - -#### Inherited from - -ViewportComponentAttributes.aria-label - -#### Defined in - -node_modules/@types/react/index.d.ts:2705 - -___ - -### aria-labelledby - -• `Optional` **aria-labelledby**: `string` - -Identifies the element (or elements) that labels the current element. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-labelledby - -#### Defined in - -node_modules/@types/react/index.d.ts:2710 - -___ - -### aria-level - -• `Optional` **aria-level**: `number` - -Defines the hierarchical level of an element within a structure. - -#### Inherited from - -ViewportComponentAttributes.aria-level - -#### Defined in - -node_modules/@types/react/index.d.ts:2712 - -___ - -### aria-live - -• `Optional` **aria-live**: ``"off"`` \| ``"assertive"`` \| ``"polite"`` - -Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. - -#### Inherited from - -ViewportComponentAttributes.aria-live - -#### Defined in - -node_modules/@types/react/index.d.ts:2714 - -___ - -### aria-modal - -• `Optional` **aria-modal**: `Booleanish` - -Indicates whether an element is modal when displayed. - -#### Inherited from - -ViewportComponentAttributes.aria-modal - -#### Defined in - -node_modules/@types/react/index.d.ts:2716 - -___ - -### aria-multiline - -• `Optional` **aria-multiline**: `Booleanish` - -Indicates whether a text box accepts multiple lines of input or only a single line. - -#### Inherited from - -ViewportComponentAttributes.aria-multiline - -#### Defined in - -node_modules/@types/react/index.d.ts:2718 - -___ - -### aria-multiselectable - -• `Optional` **aria-multiselectable**: `Booleanish` - -Indicates that the user may select more than one item from the current selectable descendants. - -#### Inherited from - -ViewportComponentAttributes.aria-multiselectable - -#### Defined in - -node_modules/@types/react/index.d.ts:2720 - -___ - -### aria-orientation - -• `Optional` **aria-orientation**: ``"horizontal"`` \| ``"vertical"`` - -Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. - -#### Inherited from - -ViewportComponentAttributes.aria-orientation - -#### Defined in - -node_modules/@types/react/index.d.ts:2722 - -___ - -### aria-owns - -• `Optional` **aria-owns**: `string` - -Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship -between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - -**`See`** - -aria-controls. - -#### Inherited from - -ViewportComponentAttributes.aria-owns - -#### Defined in - -node_modules/@types/react/index.d.ts:2728 - -___ - -### aria-placeholder - -• `Optional` **aria-placeholder**: `string` - -Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. -A hint could be a sample value or a brief description of the expected format. - -#### Inherited from - -ViewportComponentAttributes.aria-placeholder - -#### Defined in - -node_modules/@types/react/index.d.ts:2733 - -___ - -### aria-posinset - -• `Optional` **aria-posinset**: `number` - -Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-setsize. - -#### Inherited from - -ViewportComponentAttributes.aria-posinset - -#### Defined in - -node_modules/@types/react/index.d.ts:2738 - -___ - -### aria-pressed - -• `Optional` **aria-pressed**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "pressed" state of toggle buttons. - -**`See`** - - - aria-checked - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-pressed - -#### Defined in - -node_modules/@types/react/index.d.ts:2743 - -___ - -### aria-readonly - -• `Optional` **aria-readonly**: `Booleanish` - -Indicates that the element is not editable, but is otherwise operable. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-readonly - -#### Defined in - -node_modules/@types/react/index.d.ts:2748 - -___ - -### aria-relevant - -• `Optional` **aria-relevant**: ``"text"`` \| ``"all"`` \| ``"additions"`` \| ``"additions removals"`` \| ``"additions text"`` \| ``"removals"`` \| ``"removals additions"`` \| ``"removals text"`` \| ``"text additions"`` \| ``"text removals"`` - -Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - -**`See`** - -aria-atomic. - -#### Inherited from - -ViewportComponentAttributes.aria-relevant - -#### Defined in - -node_modules/@types/react/index.d.ts:2753 - -___ - -### aria-required - -• `Optional` **aria-required**: `Booleanish` - -Indicates that user input is required on the element before a form may be submitted. - -#### Inherited from - -ViewportComponentAttributes.aria-required - -#### Defined in - -node_modules/@types/react/index.d.ts:2766 - -___ - -### aria-roledescription - -• `Optional` **aria-roledescription**: `string` - -Defines a human-readable, author-localized description for the role of an element. - -#### Inherited from - -ViewportComponentAttributes.aria-roledescription - -#### Defined in - -node_modules/@types/react/index.d.ts:2768 - -___ - -### aria-rowcount - -• `Optional` **aria-rowcount**: `number` - -Defines the total number of rows in a table, grid, or treegrid. - -**`See`** - -aria-rowindex. - -#### Inherited from - -ViewportComponentAttributes.aria-rowcount - -#### Defined in - -node_modules/@types/react/index.d.ts:2773 - -___ - -### aria-rowindex - -• `Optional` **aria-rowindex**: `number` - -Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - -**`See`** - - - aria-rowcount - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowindex - -#### Defined in - -node_modules/@types/react/index.d.ts:2778 - -___ - -### aria-rowindextext - -• `Optional` **aria-rowindextext**: `string` - -Defines a human readable text alternative of aria-rowindex. - -**`See`** - -aria-colindextext. - -#### Inherited from - -ViewportComponentAttributes.aria-rowindextext - -#### Defined in - -node_modules/@types/react/index.d.ts:2783 - -___ - -### aria-rowspan - -• `Optional` **aria-rowspan**: `number` - -Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-rowindex - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowspan - -#### Defined in - -node_modules/@types/react/index.d.ts:2788 - -___ - -### aria-selected - -• `Optional` **aria-selected**: `Booleanish` - -Indicates the current "selected" state of various widgets. - -**`See`** - - - aria-checked - - aria-pressed. - -#### Inherited from - -ViewportComponentAttributes.aria-selected - -#### Defined in - -node_modules/@types/react/index.d.ts:2793 - -___ - -### aria-setsize - -• `Optional` **aria-setsize**: `number` - -Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-posinset. - -#### Inherited from - -ViewportComponentAttributes.aria-setsize - -#### Defined in - -node_modules/@types/react/index.d.ts:2798 - -___ - -### aria-sort - -• `Optional` **aria-sort**: ``"none"`` \| ``"ascending"`` \| ``"descending"`` \| ``"other"`` - -Indicates if items in a table or grid are sorted in ascending or descending order. - -#### Inherited from - -ViewportComponentAttributes.aria-sort - -#### Defined in - -node_modules/@types/react/index.d.ts:2800 - -___ - -### aria-valuemax - -• `Optional` **aria-valuemax**: `number` - -Defines the maximum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemax - -#### Defined in - -node_modules/@types/react/index.d.ts:2802 - -___ - -### aria-valuemin - -• `Optional` **aria-valuemin**: `number` - -Defines the minimum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemin - -#### Defined in - -node_modules/@types/react/index.d.ts:2804 - -___ - -### aria-valuenow - -• `Optional` **aria-valuenow**: `number` - -Defines the current value for a range widget. - -**`See`** - -aria-valuetext. - -#### Inherited from - -ViewportComponentAttributes.aria-valuenow - -#### Defined in - -node_modules/@types/react/index.d.ts:2809 - -___ - -### aria-valuetext - -• `Optional` **aria-valuetext**: `string` - -Defines the human readable text alternative of aria-valuenow for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuetext - -#### Defined in - -node_modules/@types/react/index.d.ts:2811 diff --git a/docs/interfaces/react.VirtualizerHandle.md b/docs/interfaces/react.VirtualizerHandle.md deleted file mode 100644 index 2bd86c751..000000000 --- a/docs/interfaces/react.VirtualizerHandle.md +++ /dev/null @@ -1,164 +0,0 @@ -# Interface: VirtualizerHandle - -[react](../modules/react.md).VirtualizerHandle - -Methods of [Virtualizer](../modules/react.md#virtualizer). - -## Hierarchy - -- **`VirtualizerHandle`** - - ↳ [`VListHandle`](react.VListHandle.md) - -## Table of contents - -### Methods - -- [getItemOffset](react.VirtualizerHandle.md#getitemoffset) -- [scrollToIndex](react.VirtualizerHandle.md#scrolltoindex) -- [scrollTo](react.VirtualizerHandle.md#scrollto) -- [scrollBy](react.VirtualizerHandle.md#scrollby) - -### Properties - -- [cache](react.VirtualizerHandle.md#cache) -- [scrollOffset](react.VirtualizerHandle.md#scrolloffset) -- [scrollSize](react.VirtualizerHandle.md#scrollsize) -- [viewportSize](react.VirtualizerHandle.md#viewportsize) - -## Methods - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Defined in - -[src/react/Virtualizer.tsx:59](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L59) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:65](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L65) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:70](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L70) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:75](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L75) - -## Properties - -### cache - -• `Readonly` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -Get current [CacheSnapshot](react.CacheSnapshot.md). - -#### Defined in - -[src/react/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L42) - -___ - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Defined in - -[src/react/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L46) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Defined in - -[src/react/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L50) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Defined in - -[src/react/Virtualizer.tsx:54](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L54) diff --git a/docs/interfaces/react.VirtualizerProps.md b/docs/interfaces/react.VirtualizerProps.md deleted file mode 100644 index 0c93eaed6..000000000 --- a/docs/interfaces/react.VirtualizerProps.md +++ /dev/null @@ -1,280 +0,0 @@ -# Interface: VirtualizerProps - -[react](../modules/react.md).VirtualizerProps - -Props of [Virtualizer](../modules/react.md#virtualizer). - -## Table of contents - -### Properties - -- [children](react.VirtualizerProps.md#children) -- [count](react.VirtualizerProps.md#count) -- [overscan](react.VirtualizerProps.md#overscan) -- [keepMounted](react.VirtualizerProps.md#keepmounted) -- [itemSize](react.VirtualizerProps.md#itemsize) -- [shift](react.VirtualizerProps.md#shift) -- [horizontal](react.VirtualizerProps.md#horizontal) -- [cache](react.VirtualizerProps.md#cache) -- [startMargin](react.VirtualizerProps.md#startmargin) -- [ssrCount](react.VirtualizerProps.md#ssrcount) -- [as](react.VirtualizerProps.md#as) -- [item](react.VirtualizerProps.md#item) -- [scrollRef](react.VirtualizerProps.md#scrollref) -- [onScroll](react.VirtualizerProps.md#onscroll) -- [onScrollEnd](react.VirtualizerProps.md#onscrollend) -- [onRangeChange](react.VirtualizerProps.md#onrangechange) - -## Properties - -### children - -• **children**: `ReactNode` \| (`index`: `number`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> - -Elements rendered by this component. - -You can also pass a function and set [VirtualizerProps.count](react.VirtualizerProps.md#count) to create elements lazily. - -#### Defined in - -[src/react/Virtualizer.tsx:87](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L87) - -___ - -### count - -• `Optional` **count**: `number` - -If you set a function to [VirtualizerProps.children](react.VirtualizerProps.md#children), you have to set total number of items to this prop. - -#### Defined in - -[src/react/Virtualizer.tsx:91](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L91) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/react/Virtualizer.tsx:96](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L96) - -___ - -### keepMounted - -• `Optional` **keepMounted**: `number`[] - -List of indexes that should be always mounted, even when off screen. - -#### Defined in - -[src/react/Virtualizer.tsx:100](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L100) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/react/Virtualizer.tsx:107](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L107) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/react/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L111) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/react/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L115) - -___ - -### cache - -• `Optional` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -You can restore cache by passing a [CacheSnapshot](react.CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [VirtualizerHandle.cache](react.VirtualizerHandle.md#cache). - -**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** - -#### Defined in - -[src/react/Virtualizer.tsx:121](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L121) - -___ - -### startMargin - -• `Optional` **startMargin**: `number` - -If you put an element before virtualizer, you have to define its height with this prop. - -#### Defined in - -[src/react/Virtualizer.tsx:125](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L125) - -___ - -### ssrCount - -• `Optional` **ssrCount**: `number` - -A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. - -#### Defined in - -[src/react/Virtualizer.tsx:129](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L129) - -___ - -### as - -• `Optional` **as**: [`CustomContainerComponent`](../modules/react.md#customcontainercomponent) \| keyof IntrinsicElements - -Component or element type for container element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/react/Virtualizer.tsx:134](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L134) - -___ - -### item - -• `Optional` **item**: [`CustomItemComponent`](../modules/react.md#customitemcomponent) \| keyof IntrinsicElements - -Component or element type for item element. This component will get [CustomItemComponentProps](react.CustomItemComponentProps.md) as props. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/react/Virtualizer.tsx:139](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L139) - -___ - -### scrollRef - -• `Optional` **scrollRef**: `RefObject`\<`HTMLElement`\> - -Reference to the scrollable element. The default will get the parent element of virtualizer. - -#### Defined in - -[src/react/Virtualizer.tsx:143](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L143) - -___ - -### onScroll - -• `Optional` **onScroll**: (`offset`: `number`) => `void` - -Callback invoked whenever scroll offset changes. - -#### Type declaration - -▸ (`offset`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | Current scrollTop or scrollLeft. | - -##### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:148](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L148) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:152](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L152) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Defined in - -[src/react/Virtualizer.tsx:156](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L156) diff --git a/docs/interfaces/react.WindowVirtualizerHandle.md b/docs/interfaces/react.WindowVirtualizerHandle.md deleted file mode 100644 index 2cadbe8dd..000000000 --- a/docs/interfaces/react.WindowVirtualizerHandle.md +++ /dev/null @@ -1,23 +0,0 @@ -# Interface: WindowVirtualizerHandle - -[react](../modules/react.md).WindowVirtualizerHandle - -Methods of [WindowVirtualizer](../modules/react.md#windowvirtualizer). - -## Table of contents - -### Properties - -- [cache](react.WindowVirtualizerHandle.md#cache) - -## Properties - -### cache - -• `Readonly` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -Get current [CacheSnapshot](react.CacheSnapshot.md). - -#### Defined in - -[src/react/WindowVirtualizer.tsx:37](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L37) diff --git a/docs/interfaces/react.WindowVirtualizerProps.md b/docs/interfaces/react.WindowVirtualizerProps.md deleted file mode 100644 index b40bd7e30..000000000 --- a/docs/interfaces/react.WindowVirtualizerProps.md +++ /dev/null @@ -1,214 +0,0 @@ -# Interface: WindowVirtualizerProps - -[react](../modules/react.md).WindowVirtualizerProps - -Props of [WindowVirtualizer](../modules/react.md#windowvirtualizer). - -## Table of contents - -### Properties - -- [children](react.WindowVirtualizerProps.md#children) -- [count](react.WindowVirtualizerProps.md#count) -- [overscan](react.WindowVirtualizerProps.md#overscan) -- [itemSize](react.WindowVirtualizerProps.md#itemsize) -- [shift](react.WindowVirtualizerProps.md#shift) -- [horizontal](react.WindowVirtualizerProps.md#horizontal) -- [cache](react.WindowVirtualizerProps.md#cache) -- [ssrCount](react.WindowVirtualizerProps.md#ssrcount) -- [as](react.WindowVirtualizerProps.md#as) -- [item](react.WindowVirtualizerProps.md#item) -- [onScrollEnd](react.WindowVirtualizerProps.md#onscrollend) -- [onRangeChange](react.WindowVirtualizerProps.md#onrangechange) - -## Properties - -### children - -• **children**: `ReactNode` \| (`index`: `number`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> - -Elements rendered by this component. - -You can also pass a function and set [WindowVirtualizerProps.count](react.WindowVirtualizerProps.md#count) to create elements lazily. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:49](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L49) - -___ - -### count - -• `Optional` **count**: `number` - -If you set a function to [WindowVirtualizerProps.children](react.WindowVirtualizerProps.md#children), you have to set total number of items to this prop. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:53](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L53) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:58](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L58) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:65](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L65) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:69](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L69) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:73](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L73) - -___ - -### cache - -• `Optional` **cache**: [`CacheSnapshot`](react.CacheSnapshot.md) - -You can restore cache by passing a [CacheSnapshot](react.CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [WindowVirtualizerHandle.cache](react.WindowVirtualizerHandle.md#cache). - -**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** - -#### Defined in - -[src/react/WindowVirtualizer.tsx:79](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L79) - -___ - -### ssrCount - -• `Optional` **ssrCount**: `number` - -A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. - -#### Defined in - -[src/react/WindowVirtualizer.tsx:83](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L83) - -___ - -### as - -• `Optional` **as**: [`CustomContainerComponent`](../modules/react.md#customcontainercomponent) \| keyof IntrinsicElements - -Component or element type for container element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:88](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L88) - -___ - -### item - -• `Optional` **item**: [`CustomItemComponent`](../modules/react.md#customitemcomponent) \| keyof IntrinsicElements - -Component or element type for item element. This component will get [CustomItemComponentProps](react.CustomItemComponentProps.md) as props. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:93](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L93) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:97](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L97) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:101](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L101) diff --git a/docs/interfaces/solid.VListHandle.md b/docs/interfaces/solid.VListHandle.md deleted file mode 100644 index 9674c7d7c..000000000 --- a/docs/interfaces/solid.VListHandle.md +++ /dev/null @@ -1,179 +0,0 @@ -# Interface: VListHandle - -[solid](../modules/solid.md).VListHandle - -Methods of [VList](../modules/solid.md#vlist). - -## Hierarchy - -- [`VirtualizerHandle`](solid.VirtualizerHandle.md) - - ↳ **`VListHandle`** - -## Table of contents - -### Methods - -- [getItemOffset](solid.VListHandle.md#getitemoffset) -- [scrollToIndex](solid.VListHandle.md#scrolltoindex) -- [scrollTo](solid.VListHandle.md#scrollto) -- [scrollBy](solid.VListHandle.md#scrollby) - -### Properties - -- [scrollOffset](solid.VListHandle.md#scrolloffset) -- [scrollSize](solid.VListHandle.md#scrollsize) -- [viewportSize](solid.VListHandle.md#viewportsize) - -## Methods - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[getItemOffset](solid.VirtualizerHandle.md#getitemoffset) - -#### Defined in - -[src/solid/Virtualizer.tsx:56](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L56) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[scrollToIndex](solid.VirtualizerHandle.md#scrolltoindex) - -#### Defined in - -[src/solid/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L62) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[scrollTo](solid.VirtualizerHandle.md#scrollto) - -#### Defined in - -[src/solid/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L67) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[scrollBy](solid.VirtualizerHandle.md#scrollby) - -#### Defined in - -[src/solid/Virtualizer.tsx:72](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L72) - -## Properties - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[scrollOffset](solid.VirtualizerHandle.md#scrolloffset) - -#### Defined in - -[src/solid/Virtualizer.tsx:43](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L43) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[scrollSize](solid.VirtualizerHandle.md#scrollsize) - -#### Defined in - -[src/solid/Virtualizer.tsx:47](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L47) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Inherited from - -[VirtualizerHandle](solid.VirtualizerHandle.md).[viewportSize](solid.VirtualizerHandle.md#viewportsize) - -#### Defined in - -[src/solid/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L51) diff --git a/docs/interfaces/solid.VListProps.md b/docs/interfaces/solid.VListProps.md deleted file mode 100644 index 7ca606f70..000000000 --- a/docs/interfaces/solid.VListProps.md +++ /dev/null @@ -1,1294 +0,0 @@ -# Interface: VListProps\ - -[solid](../modules/solid.md).VListProps - -Props of [VList](../modules/solid.md#vlist). - -## Type parameters - -| Name | -| :------ | -| `T` | - -## Hierarchy - -- `Pick`\<[`VirtualizerProps`](solid.VirtualizerProps.md)\<`T`\>, ``"ref"`` \| ``"data"`` \| ``"children"`` \| ``"overscan"`` \| ``"itemSize"`` \| ``"shift"`` \| ``"horizontal"`` \| ``"onScroll"`` \| ``"onScrollEnd"`` \| ``"onRangeChange"``\> - -- `ViewportComponentAttributes` - - ↳ **`VListProps`** - -## Table of contents - -### Properties - -- [children](solid.VListProps.md#children) -- [onScroll](solid.VListProps.md#onscroll) -- [ref](solid.VListProps.md#ref) -- [shift](solid.VListProps.md#shift) -- [data](solid.VListProps.md#data) -- [overscan](solid.VListProps.md#overscan) -- [itemSize](solid.VListProps.md#itemsize) -- [horizontal](solid.VListProps.md#horizontal) -- [onScrollEnd](solid.VListProps.md#onscrollend) -- [onRangeChange](solid.VListProps.md#onrangechange) -- [id](solid.VListProps.md#id) -- [role](solid.VListProps.md#role) -- [tabIndex](solid.VListProps.md#tabindex) -- [onKeyDown](solid.VListProps.md#onkeydown) -- [class](solid.VListProps.md#class) -- [aria-activedescendant](solid.VListProps.md#aria-activedescendant) -- [aria-atomic](solid.VListProps.md#aria-atomic) -- [aria-autocomplete](solid.VListProps.md#aria-autocomplete) -- [aria-busy](solid.VListProps.md#aria-busy) -- [aria-checked](solid.VListProps.md#aria-checked) -- [aria-colcount](solid.VListProps.md#aria-colcount) -- [aria-colindex](solid.VListProps.md#aria-colindex) -- [aria-colspan](solid.VListProps.md#aria-colspan) -- [aria-controls](solid.VListProps.md#aria-controls) -- [aria-current](solid.VListProps.md#aria-current) -- [aria-describedby](solid.VListProps.md#aria-describedby) -- [aria-details](solid.VListProps.md#aria-details) -- [aria-disabled](solid.VListProps.md#aria-disabled) -- [aria-dropeffect](solid.VListProps.md#aria-dropeffect) -- [aria-errormessage](solid.VListProps.md#aria-errormessage) -- [aria-expanded](solid.VListProps.md#aria-expanded) -- [aria-flowto](solid.VListProps.md#aria-flowto) -- [aria-grabbed](solid.VListProps.md#aria-grabbed) -- [aria-haspopup](solid.VListProps.md#aria-haspopup) -- [aria-hidden](solid.VListProps.md#aria-hidden) -- [aria-invalid](solid.VListProps.md#aria-invalid) -- [aria-keyshortcuts](solid.VListProps.md#aria-keyshortcuts) -- [aria-label](solid.VListProps.md#aria-label) -- [aria-labelledby](solid.VListProps.md#aria-labelledby) -- [aria-level](solid.VListProps.md#aria-level) -- [aria-live](solid.VListProps.md#aria-live) -- [aria-modal](solid.VListProps.md#aria-modal) -- [aria-multiline](solid.VListProps.md#aria-multiline) -- [aria-multiselectable](solid.VListProps.md#aria-multiselectable) -- [aria-orientation](solid.VListProps.md#aria-orientation) -- [aria-owns](solid.VListProps.md#aria-owns) -- [aria-placeholder](solid.VListProps.md#aria-placeholder) -- [aria-posinset](solid.VListProps.md#aria-posinset) -- [aria-pressed](solid.VListProps.md#aria-pressed) -- [aria-readonly](solid.VListProps.md#aria-readonly) -- [aria-relevant](solid.VListProps.md#aria-relevant) -- [aria-required](solid.VListProps.md#aria-required) -- [aria-roledescription](solid.VListProps.md#aria-roledescription) -- [aria-rowcount](solid.VListProps.md#aria-rowcount) -- [aria-rowindex](solid.VListProps.md#aria-rowindex) -- [aria-rowspan](solid.VListProps.md#aria-rowspan) -- [aria-selected](solid.VListProps.md#aria-selected) -- [aria-setsize](solid.VListProps.md#aria-setsize) -- [aria-sort](solid.VListProps.md#aria-sort) -- [aria-valuemax](solid.VListProps.md#aria-valuemax) -- [aria-valuemin](solid.VListProps.md#aria-valuemin) -- [aria-valuenow](solid.VListProps.md#aria-valuenow) -- [aria-valuetext](solid.VListProps.md#aria-valuetext) -- [style](solid.VListProps.md#style) - -## Properties - -### children - -• **children**: (`data`: `T`, `index`: `number`) => `Element` - -The elements renderer function. - -#### Type declaration - -▸ (`data`, `index`): `Element` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `T` | -| `index` | `number` | - -##### Returns - -`Element` - -#### Inherited from - -Pick.children - -#### Defined in - -[src/solid/Virtualizer.tsx:90](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L90) - -___ - -### onScroll - -• `Optional` **onScroll**: (`offset`: `number`) => `void` - -Callback invoked whenever scroll offset changes. - -#### Type declaration - -▸ (`offset`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | Current scrollTop or scrollLeft. | - -##### Returns - -`void` - -#### Inherited from - -Pick.onScroll - -#### Defined in - -[src/solid/Virtualizer.tsx:133](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L133) - -___ - -### ref - -• `Optional` **ref**: (`handle?`: [`VirtualizerHandle`](solid.VirtualizerHandle.md)) => `void` - -Get reference to [VirtualizerHandle](solid.VirtualizerHandle.md). - -#### Type declaration - -▸ (`handle?`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `handle?` | [`VirtualizerHandle`](solid.VirtualizerHandle.md) | - -##### Returns - -`void` - -#### Inherited from - -Pick.ref - -#### Defined in - -[src/solid/Virtualizer.tsx:82](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L82) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Inherited from - -Pick.shift - -#### Defined in - -[src/solid/Virtualizer.tsx:120](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L120) - -___ - -### data - -• **data**: `T`[] - -The data items rendered by this component. - -#### Inherited from - -Pick.data - -#### Defined in - -[src/solid/Virtualizer.tsx:86](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L86) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Inherited from - -Pick.overscan - -#### Defined in - -[src/solid/Virtualizer.tsx:95](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L95) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Inherited from - -Pick.itemSize - -#### Defined in - -[src/solid/Virtualizer.tsx:116](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L116) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Inherited from - -Pick.horizontal - -#### Defined in - -[src/solid/Virtualizer.tsx:124](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L124) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Inherited from - -Pick.onScrollEnd - -#### Defined in - -[src/solid/Virtualizer.tsx:137](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L137) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Inherited from - -Pick.onRangeChange - -#### Defined in - -[src/solid/Virtualizer.tsx:141](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L141) - -___ - -### id - -• `Optional` **id**: `string` - -#### Inherited from - -ViewportComponentAttributes.id - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:724 - -___ - -### role - -• `Optional` **role**: ``"grid"`` \| ``"table"`` \| ``"none"`` \| ``"search"`` \| ``"link"`` \| ``"article"`` \| ``"button"`` \| ``"dialog"`` \| ``"figure"`` \| ``"form"`` \| ``"img"`` \| ``"main"`` \| ``"menu"`` \| ``"menuitem"`` \| ``"meter"`` \| ``"option"`` \| ``"switch"`` \| ``"row"`` \| ``"checkbox"`` \| ``"listbox"`` \| ``"radio"`` \| ``"region"`` \| ``"cell"`` \| ``"listitem"`` \| ``"menubar"`` \| ``"progressbar"`` \| ``"separator"`` \| ``"tab"`` \| ``"tabpanel"`` \| ``"toolbar"`` \| ``"tooltip"`` \| ``"treeitem"`` \| ``"scrollbar"`` \| ``"alert"`` \| ``"alertdialog"`` \| ``"application"`` \| ``"banner"`` \| ``"columnheader"`` \| ``"combobox"`` \| ``"complementary"`` \| ``"contentinfo"`` \| ``"definition"`` \| ``"directory"`` \| ``"document"`` \| ``"feed"`` \| ``"gridcell"`` \| ``"group"`` \| ``"heading"`` \| ``"list"`` \| ``"log"`` \| ``"marquee"`` \| ``"math"`` \| ``"menuitemcheckbox"`` \| ``"menuitemradio"`` \| ``"navigation"`` \| ``"note"`` \| ``"presentation"`` \| ``"radiogroup"`` \| ``"rowgroup"`` \| ``"rowheader"`` \| ``"searchbox"`` \| ``"slider"`` \| ``"spinbutton"`` \| ``"status"`` \| ``"tablist"`` \| ``"term"`` \| ``"textbox"`` \| ``"timer"`` \| ``"tree"`` \| ``"treegrid"`` - -#### Inherited from - -ViewportComponentAttributes.role - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:634 - -node_modules/solid-js/types/jsx.d.ts:634 - -___ - -### tabIndex - -• `Optional` **tabIndex**: `string` \| `number` - -#### Inherited from - -ViewportComponentAttributes.tabIndex - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:754 - -___ - -### onKeyDown - -• `Optional` **onKeyDown**: `EventHandlerUnion`\<`HTMLElement`, `KeyboardEvent`\> - -#### Inherited from - -ViewportComponentAttributes.onKeyDown - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:246 - -___ - -### class - -• `Optional` **class**: `string` - -#### Inherited from - -ViewportComponentAttributes.class - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:718 - -___ - -### aria-activedescendant - -• `Optional` **aria-activedescendant**: `string` - -Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. - -#### Inherited from - -ViewportComponentAttributes.aria-activedescendant - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:441 - -___ - -### aria-atomic - -• `Optional` **aria-atomic**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. - -#### Inherited from - -ViewportComponentAttributes.aria-atomic - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:443 - -___ - -### aria-autocomplete - -• `Optional` **aria-autocomplete**: ``"inline"`` \| ``"none"`` \| ``"both"`` \| ``"list"`` - -Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be -presented if they are made. - -#### Inherited from - -ViewportComponentAttributes.aria-autocomplete - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:448 - -___ - -### aria-busy - -• `Optional` **aria-busy**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. - -#### Inherited from - -ViewportComponentAttributes.aria-busy - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:450 - -___ - -### aria-checked - -• `Optional` **aria-checked**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - -**`See`** - - - aria-pressed - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-checked - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:455 - -___ - -### aria-colcount - -• `Optional` **aria-colcount**: `string` \| `number` - -Defines the total number of columns in a table, grid, or treegrid. - -**`See`** - -aria-colindex. - -#### Inherited from - -ViewportComponentAttributes.aria-colcount - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:460 - -___ - -### aria-colindex - -• `Optional` **aria-colindex**: `string` \| `number` - -Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - -**`See`** - - - aria-colcount - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colindex - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:465 - -___ - -### aria-colspan - -• `Optional` **aria-colspan**: `string` \| `number` - -Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-colindex - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-colspan - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:470 - -___ - -### aria-controls - -• `Optional` **aria-controls**: `string` - -Identifies the element (or elements) whose contents or presence are controlled by the current element. - -**`See`** - -aria-owns. - -#### Inherited from - -ViewportComponentAttributes.aria-controls - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:475 - -___ - -### aria-current - -• `Optional` **aria-current**: `boolean` \| ``"time"`` \| ``"page"`` \| ``"false"`` \| ``"true"`` \| ``"location"`` \| ``"date"`` \| ``"step"`` - -Indicates the element that represents the current item within a container or set of related elements. - -#### Inherited from - -ViewportComponentAttributes.aria-current - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:477 - -___ - -### aria-describedby - -• `Optional` **aria-describedby**: `string` - -Identifies the element (or elements) that describes the object. - -**`See`** - -aria-labelledby - -#### Inherited from - -ViewportComponentAttributes.aria-describedby - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:482 - -___ - -### aria-details - -• `Optional` **aria-details**: `string` - -Identifies the element that provides a detailed, extended description for the object. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-details - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:487 - -___ - -### aria-disabled - -• `Optional` **aria-disabled**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - -**`See`** - - - aria-hidden - - aria-readonly. - -#### Inherited from - -ViewportComponentAttributes.aria-disabled - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:492 - -___ - -### aria-dropeffect - -• `Optional` **aria-dropeffect**: ``"copy"`` \| ``"none"`` \| ``"link"`` \| ``"move"`` \| ``"execute"`` \| ``"popup"`` - -Indicates what functions can be performed when a dragged object is released on the drop target. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-dropeffect - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:497 - -___ - -### aria-errormessage - -• `Optional` **aria-errormessage**: `string` - -Identifies the element that provides an error message for the object. - -**`See`** - - - aria-invalid - - aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-errormessage - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:502 - -___ - -### aria-expanded - -• `Optional` **aria-expanded**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. - -#### Inherited from - -ViewportComponentAttributes.aria-expanded - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:504 - -___ - -### aria-flowto - -• `Optional` **aria-flowto**: `string` - -Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, -allows assistive technology to override the general default of reading in document source order. - -#### Inherited from - -ViewportComponentAttributes.aria-flowto - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:509 - -___ - -### aria-grabbed - -• `Optional` **aria-grabbed**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates an element's "grabbed" state in a drag-and-drop operation. - -**`Deprecated`** - -in ARIA 1.1 - -#### Inherited from - -ViewportComponentAttributes.aria-grabbed - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:514 - -___ - -### aria-haspopup - -• `Optional` **aria-haspopup**: `boolean` \| ``"grid"`` \| ``"dialog"`` \| ``"menu"`` \| ``"listbox"`` \| ``"false"`` \| ``"true"`` \| ``"tree"`` - -Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. - -#### Inherited from - -ViewportComponentAttributes.aria-haspopup - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:516 - -___ - -### aria-hidden - -• `Optional` **aria-hidden**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates whether the element is exposed to an accessibility API. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-hidden - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:521 - -___ - -### aria-invalid - -• `Optional` **aria-invalid**: `boolean` \| ``"false"`` \| ``"true"`` \| ``"grammar"`` \| ``"spelling"`` - -Indicates the entered value does not conform to the format expected by the application. - -**`See`** - -aria-errormessage. - -#### Inherited from - -ViewportComponentAttributes.aria-invalid - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:526 - -___ - -### aria-keyshortcuts - -• `Optional` **aria-keyshortcuts**: `string` - -Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. - -#### Inherited from - -ViewportComponentAttributes.aria-keyshortcuts - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:528 - -___ - -### aria-label - -• `Optional` **aria-label**: `string` - -Defines a string value that labels the current element. - -**`See`** - -aria-labelledby. - -#### Inherited from - -ViewportComponentAttributes.aria-label - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:533 - -___ - -### aria-labelledby - -• `Optional` **aria-labelledby**: `string` - -Identifies the element (or elements) that labels the current element. - -**`See`** - -aria-describedby. - -#### Inherited from - -ViewportComponentAttributes.aria-labelledby - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:538 - -___ - -### aria-level - -• `Optional` **aria-level**: `string` \| `number` - -Defines the hierarchical level of an element within a structure. - -#### Inherited from - -ViewportComponentAttributes.aria-level - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:540 - -___ - -### aria-live - -• `Optional` **aria-live**: ``"off"`` \| ``"assertive"`` \| ``"polite"`` - -Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. - -#### Inherited from - -ViewportComponentAttributes.aria-live - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:542 - -___ - -### aria-modal - -• `Optional` **aria-modal**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates whether an element is modal when displayed. - -#### Inherited from - -ViewportComponentAttributes.aria-modal - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:544 - -___ - -### aria-multiline - -• `Optional` **aria-multiline**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates whether a text box accepts multiple lines of input or only a single line. - -#### Inherited from - -ViewportComponentAttributes.aria-multiline - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:546 - -___ - -### aria-multiselectable - -• `Optional` **aria-multiselectable**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates that the user may select more than one item from the current selectable descendants. - -#### Inherited from - -ViewportComponentAttributes.aria-multiselectable - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:548 - -___ - -### aria-orientation - -• `Optional` **aria-orientation**: ``"horizontal"`` \| ``"vertical"`` - -Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. - -#### Inherited from - -ViewportComponentAttributes.aria-orientation - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:550 - -___ - -### aria-owns - -• `Optional` **aria-owns**: `string` - -Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship -between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - -**`See`** - -aria-controls. - -#### Inherited from - -ViewportComponentAttributes.aria-owns - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:556 - -___ - -### aria-placeholder - -• `Optional` **aria-placeholder**: `string` - -Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. -A hint could be a sample value or a brief description of the expected format. - -#### Inherited from - -ViewportComponentAttributes.aria-placeholder - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:561 - -___ - -### aria-posinset - -• `Optional` **aria-posinset**: `string` \| `number` - -Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-setsize. - -#### Inherited from - -ViewportComponentAttributes.aria-posinset - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:566 - -___ - -### aria-pressed - -• `Optional` **aria-pressed**: `boolean` \| ``"mixed"`` \| ``"false"`` \| ``"true"`` - -Indicates the current "pressed" state of toggle buttons. - -**`See`** - - - aria-checked - - aria-selected. - -#### Inherited from - -ViewportComponentAttributes.aria-pressed - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:571 - -___ - -### aria-readonly - -• `Optional` **aria-readonly**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates that the element is not editable, but is otherwise operable. - -**`See`** - -aria-disabled. - -#### Inherited from - -ViewportComponentAttributes.aria-readonly - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:576 - -___ - -### aria-relevant - -• `Optional` **aria-relevant**: ``"text"`` \| ``"all"`` \| ``"additions"`` \| ``"additions removals"`` \| ``"additions text"`` \| ``"removals"`` \| ``"removals additions"`` \| ``"removals text"`` \| ``"text additions"`` \| ``"text removals"`` - -Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - -**`See`** - -aria-atomic. - -#### Inherited from - -ViewportComponentAttributes.aria-relevant - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:581 - -___ - -### aria-required - -• `Optional` **aria-required**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates that user input is required on the element before a form may be submitted. - -#### Inherited from - -ViewportComponentAttributes.aria-required - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:593 - -___ - -### aria-roledescription - -• `Optional` **aria-roledescription**: `string` - -Defines a human-readable, author-localized description for the role of an element. - -#### Inherited from - -ViewportComponentAttributes.aria-roledescription - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:595 - -___ - -### aria-rowcount - -• `Optional` **aria-rowcount**: `string` \| `number` - -Defines the total number of rows in a table, grid, or treegrid. - -**`See`** - -aria-rowindex. - -#### Inherited from - -ViewportComponentAttributes.aria-rowcount - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:600 - -___ - -### aria-rowindex - -• `Optional` **aria-rowindex**: `string` \| `number` - -Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - -**`See`** - - - aria-rowcount - - aria-rowspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowindex - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:605 - -___ - -### aria-rowspan - -• `Optional` **aria-rowspan**: `string` \| `number` - -Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - -**`See`** - - - aria-rowindex - - aria-colspan. - -#### Inherited from - -ViewportComponentAttributes.aria-rowspan - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:610 - -___ - -### aria-selected - -• `Optional` **aria-selected**: `boolean` \| ``"false"`` \| ``"true"`` - -Indicates the current "selected" state of various widgets. - -**`See`** - - - aria-checked - - aria-pressed. - -#### Inherited from - -ViewportComponentAttributes.aria-selected - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:615 - -___ - -### aria-setsize - -• `Optional` **aria-setsize**: `string` \| `number` - -Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - -**`See`** - -aria-posinset. - -#### Inherited from - -ViewportComponentAttributes.aria-setsize - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:620 - -___ - -### aria-sort - -• `Optional` **aria-sort**: ``"none"`` \| ``"ascending"`` \| ``"descending"`` \| ``"other"`` - -Indicates if items in a table or grid are sorted in ascending or descending order. - -#### Inherited from - -ViewportComponentAttributes.aria-sort - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:622 - -___ - -### aria-valuemax - -• `Optional` **aria-valuemax**: `string` \| `number` - -Defines the maximum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemax - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:624 - -___ - -### aria-valuemin - -• `Optional` **aria-valuemin**: `string` \| `number` - -Defines the minimum allowed value for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuemin - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:626 - -___ - -### aria-valuenow - -• `Optional` **aria-valuenow**: `string` \| `number` - -Defines the current value for a range widget. - -**`See`** - -aria-valuetext. - -#### Inherited from - -ViewportComponentAttributes.aria-valuenow - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:631 - -___ - -### aria-valuetext - -• `Optional` **aria-valuetext**: `string` - -Defines the human readable text alternative of aria-valuenow for a range widget. - -#### Inherited from - -ViewportComponentAttributes.aria-valuetext - -#### Defined in - -node_modules/solid-js/types/jsx.d.ts:633 - -___ - -### style - -• `Optional` **style**: `CSSProperties` - -#### Inherited from - -ViewportComponentAttributes.style - -#### Defined in - -[src/solid/types.ts:7](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/types.ts#L7) diff --git a/docs/interfaces/solid.VirtualizerHandle.md b/docs/interfaces/solid.VirtualizerHandle.md deleted file mode 100644 index c1c75ffac..000000000 --- a/docs/interfaces/solid.VirtualizerHandle.md +++ /dev/null @@ -1,151 +0,0 @@ -# Interface: VirtualizerHandle - -[solid](../modules/solid.md).VirtualizerHandle - -Methods of [Virtualizer](../modules/solid.md#virtualizer). - -## Hierarchy - -- **`VirtualizerHandle`** - - ↳ [`VListHandle`](solid.VListHandle.md) - -## Table of contents - -### Methods - -- [getItemOffset](solid.VirtualizerHandle.md#getitemoffset) -- [scrollToIndex](solid.VirtualizerHandle.md#scrolltoindex) -- [scrollTo](solid.VirtualizerHandle.md#scrollto) -- [scrollBy](solid.VirtualizerHandle.md#scrollby) - -### Properties - -- [scrollOffset](solid.VirtualizerHandle.md#scrolloffset) -- [scrollSize](solid.VirtualizerHandle.md#scrollsize) -- [viewportSize](solid.VirtualizerHandle.md#viewportsize) - -## Methods - -### getItemOffset - -▸ **getItemOffset**(`index`): `number` - -Get item offset from start. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | - -#### Returns - -`number` - -#### Defined in - -[src/solid/Virtualizer.tsx:56](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L56) - -___ - -### scrollToIndex - -▸ **scrollToIndex**(`index`, `opts?`): `void` - -Scroll to the item specified by index. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `index` | `number` | index of item | -| `opts?` | [`ScrollToIndexOpts`](react.ScrollToIndexOpts.md) | options | - -#### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L62) - -___ - -### scrollTo - -▸ **scrollTo**(`offset`): `void` - -Scroll to the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from start | - -#### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L67) - -___ - -### scrollBy - -▸ **scrollBy**(`offset`): `void` - -Scroll by the given offset. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | offset from current position | - -#### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:72](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L72) - -## Properties - -### scrollOffset - -• `Readonly` **scrollOffset**: `number` - -Get current scrollTop or scrollLeft. - -#### Defined in - -[src/solid/Virtualizer.tsx:43](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L43) - -___ - -### scrollSize - -• `Readonly` **scrollSize**: `number` - -Get current scrollHeight or scrollWidth. - -#### Defined in - -[src/solid/Virtualizer.tsx:47](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L47) - -___ - -### viewportSize - -• `Readonly` **viewportSize**: `number` - -Get current offsetHeight or offsetWidth. - -#### Defined in - -[src/solid/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L51) diff --git a/docs/interfaces/solid.VirtualizerProps.md b/docs/interfaces/solid.VirtualizerProps.md deleted file mode 100644 index cc85414e7..000000000 --- a/docs/interfaces/solid.VirtualizerProps.md +++ /dev/null @@ -1,285 +0,0 @@ -# Interface: VirtualizerProps\ - -[solid](../modules/solid.md).VirtualizerProps - -Props of [Virtualizer](../modules/solid.md#virtualizer). - -## Type parameters - -| Name | -| :------ | -| `T` | - -## Table of contents - -### Properties - -- [ref](solid.VirtualizerProps.md#ref) -- [data](solid.VirtualizerProps.md#data) -- [children](solid.VirtualizerProps.md#children) -- [overscan](solid.VirtualizerProps.md#overscan) -- [as](solid.VirtualizerProps.md#as) -- [item](solid.VirtualizerProps.md#item) -- [scrollRef](solid.VirtualizerProps.md#scrollref) -- [itemSize](solid.VirtualizerProps.md#itemsize) -- [shift](solid.VirtualizerProps.md#shift) -- [horizontal](solid.VirtualizerProps.md#horizontal) -- [startMargin](solid.VirtualizerProps.md#startmargin) -- [onScroll](solid.VirtualizerProps.md#onscroll) -- [onScrollEnd](solid.VirtualizerProps.md#onscrollend) -- [onRangeChange](solid.VirtualizerProps.md#onrangechange) - -## Properties - -### ref - -• `Optional` **ref**: (`handle?`: [`VirtualizerHandle`](solid.VirtualizerHandle.md)) => `void` - -Get reference to [VirtualizerHandle](solid.VirtualizerHandle.md). - -#### Type declaration - -▸ (`handle?`): `void` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `handle?` | [`VirtualizerHandle`](solid.VirtualizerHandle.md) | - -##### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:82](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L82) - -___ - -### data - -• **data**: `T`[] - -The data items rendered by this component. - -#### Defined in - -[src/solid/Virtualizer.tsx:86](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L86) - -___ - -### children - -• **children**: (`data`: `T`, `index`: `number`) => `Element` - -The elements renderer function. - -#### Type declaration - -▸ (`data`, `index`): `Element` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `T` | -| `index` | `number` | - -##### Returns - -`Element` - -#### Defined in - -[src/solid/Virtualizer.tsx:90](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L90) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/solid/Virtualizer.tsx:95](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L95) - -___ - -### as - -• `Optional` **as**: `ValidComponent` - -Component or element type for container element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/solid/Virtualizer.tsx:100](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L100) - -___ - -### item - -• `Optional` **item**: `ValidComponent` - -Component or element type for item element. - -**`Default Value`** - -```ts -"div" -``` - -#### Defined in - -[src/solid/Virtualizer.tsx:105](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L105) - -___ - -### scrollRef - -• `Optional` **scrollRef**: `HTMLElement` - -Reference to the scrollable element. The default will get the parent element of virtualizer. - -#### Defined in - -[src/solid/Virtualizer.tsx:109](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L109) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/solid/Virtualizer.tsx:116](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L116) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/solid/Virtualizer.tsx:120](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L120) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/solid/Virtualizer.tsx:124](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L124) - -___ - -### startMargin - -• `Optional` **startMargin**: `number` - -If you put an element before virtualizer, you have to define its height with this prop. - -#### Defined in - -[src/solid/Virtualizer.tsx:128](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L128) - -___ - -### onScroll - -• `Optional` **onScroll**: (`offset`: `number`) => `void` - -Callback invoked whenever scroll offset changes. - -#### Type declaration - -▸ (`offset`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `offset` | `number` | Current scrollTop or scrollLeft. | - -##### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:133](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L133) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:137](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L137) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Defined in - -[src/solid/Virtualizer.tsx:141](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L141) diff --git a/docs/interfaces/solid.WindowVirtualizerProps.md b/docs/interfaces/solid.WindowVirtualizerProps.md deleted file mode 100644 index 6157f3131..000000000 --- a/docs/interfaces/solid.WindowVirtualizerProps.md +++ /dev/null @@ -1,167 +0,0 @@ -# Interface: WindowVirtualizerProps\ - -[solid](../modules/solid.md).WindowVirtualizerProps - -Props of [WindowVirtualizer](../modules/solid.md#windowvirtualizer). - -## Type parameters - -| Name | -| :------ | -| `T` | - -## Table of contents - -### Properties - -- [data](solid.WindowVirtualizerProps.md#data) -- [children](solid.WindowVirtualizerProps.md#children) -- [overscan](solid.WindowVirtualizerProps.md#overscan) -- [itemSize](solid.WindowVirtualizerProps.md#itemsize) -- [shift](solid.WindowVirtualizerProps.md#shift) -- [horizontal](solid.WindowVirtualizerProps.md#horizontal) -- [onScrollEnd](solid.WindowVirtualizerProps.md#onscrollend) -- [onRangeChange](solid.WindowVirtualizerProps.md#onrangechange) - -## Properties - -### data - -• **data**: `T`[] - -The data items rendered by this component. - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:46](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L46) - -___ - -### children - -• **children**: (`data`: `T`, `index`: `number`) => `Element` - -The elements renderer function. - -#### Type declaration - -▸ (`data`, `index`): `Element` - -##### Parameters - -| Name | Type | -| :------ | :------ | -| `data` | `T` | -| `index` | `number` | - -##### Returns - -`Element` - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:50](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L50) - -___ - -### overscan - -• `Optional` **overscan**: `number` - -Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. - -**`Default Value`** - -```ts -4 -``` - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:55](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L55) - -___ - -### itemSize - -• `Optional` **itemSize**: `number` - -Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. - -- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. -- If set, you can opt out estimation and use the value as initial item size. - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:62](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L62) - -___ - -### shift - -• `Optional` **shift**: `boolean` - -While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:66](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L66) - -___ - -### horizontal - -• `Optional` **horizontal**: `boolean` - -If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:70](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L70) - -___ - -### onScrollEnd - -• `Optional` **onScrollEnd**: () => `void` - -Callback invoked when scrolling stops. - -#### Type declaration - -▸ (): `void` - -##### Returns - -`void` - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:74](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L74) - -___ - -### onRangeChange - -• `Optional` **onRangeChange**: (`startIndex`: `number`, `endIndex`: `number`) => `void` - -Callback invoked when visible items range changes. - -#### Type declaration - -▸ (`startIndex`, `endIndex`): `void` - -##### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `startIndex` | `number` | The start index of viewable items. | -| `endIndex` | `number` | The end index of viewable items. | - -##### Returns - -`void` - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:78](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L78) diff --git a/docs/modules/react.md b/docs/modules/react.md deleted file mode 100644 index 88c1ea1f0..000000000 --- a/docs/modules/react.md +++ /dev/null @@ -1,172 +0,0 @@ -# Module: react - -## Table of contents - -### Functions - -- [VList](react.md#vlist) -- [Virtualizer](react.md#virtualizer) -- [WindowVirtualizer](react.md#windowvirtualizer) -- [experimental\_VGrid](react.md#experimental_vgrid) - -### Interfaces - -- [CacheSnapshot](../interfaces/react.CacheSnapshot.md) -- [ScrollToIndexOpts](../interfaces/react.ScrollToIndexOpts.md) -- [VListProps](../interfaces/react.VListProps.md) -- [VListHandle](../interfaces/react.VListHandle.md) -- [VirtualizerProps](../interfaces/react.VirtualizerProps.md) -- [VirtualizerHandle](../interfaces/react.VirtualizerHandle.md) -- [WindowVirtualizerProps](../interfaces/react.WindowVirtualizerProps.md) -- [WindowVirtualizerHandle](../interfaces/react.WindowVirtualizerHandle.md) -- [VGridProps](../interfaces/react.VGridProps.md) -- [VGridHandle](../interfaces/react.VGridHandle.md) -- [CustomCellComponentProps](../interfaces/react.CustomCellComponentProps.md) -- [CustomContainerComponentProps](../interfaces/react.CustomContainerComponentProps.md) -- [CustomItemComponentProps](../interfaces/react.CustomItemComponentProps.md) - -### Type Aliases - -- [ScrollToIndexAlign](react.md#scrolltoindexalign) -- [CustomCellComponent](react.md#customcellcomponent) -- [ViewportComponentAttributes](react.md#viewportcomponentattributes) -- [CustomContainerComponent](react.md#customcontainercomponent) -- [CustomItemComponent](react.md#customitemcomponent) - -## Functions - -### VList - -▸ **VList**(`props`): `ReactNode` - -Virtualized list component. See [VListProps](../interfaces/react.VListProps.md) and [VListHandle](../interfaces/react.VListHandle.md). - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`VListProps`](../interfaces/react.VListProps.md) & `RefAttributes`\<[`VListHandle`](../interfaces/react.VListHandle.md)\> | - -#### Returns - -`ReactNode` - -#### Defined in - -[src/react/VList.tsx:44](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VList.tsx#L44) - -___ - -### Virtualizer - -▸ **Virtualizer**(`props`): `ReactNode` - -Customizable list virtualizer for advanced usage. See [VirtualizerProps](../interfaces/react.VirtualizerProps.md) and [VirtualizerHandle](../interfaces/react.VirtualizerHandle.md). - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`VirtualizerProps`](../interfaces/react.VirtualizerProps.md) & `RefAttributes`\<[`VirtualizerHandle`](../interfaces/react.VirtualizerHandle.md)\> | - -#### Returns - -`ReactNode` - -#### Defined in - -[src/react/Virtualizer.tsx:171](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/Virtualizer.tsx#L171) - -___ - -### WindowVirtualizer - -▸ **WindowVirtualizer**(`props`): `ReactNode` - -[Virtualizer](react.md#virtualizer) controlled by the window scrolling. See [WindowVirtualizerProps](../interfaces/react.WindowVirtualizerProps.md) and [WindowVirtualizer](react.md#windowvirtualizer). - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`WindowVirtualizerProps`](../interfaces/react.WindowVirtualizerProps.md) & `RefAttributes`\<[`WindowVirtualizerHandle`](../interfaces/react.WindowVirtualizerHandle.md)\> | - -#### Returns - -`ReactNode` - -#### Defined in - -[src/react/WindowVirtualizer.tsx:116](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/WindowVirtualizer.tsx#L116) - -___ - -### experimental\_VGrid - -▸ **experimental_VGrid**(`props`): `ReactNode` - -Virtualized grid component. See [VGridProps](../interfaces/react.VGridProps.md) and [VGridHandle](../interfaces/react.VGridHandle.md). - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`VGridProps`](../interfaces/react.VGridProps.md) & `RefAttributes`\<[`VGridHandle`](../interfaces/react.VGridHandle.md)\> | - -#### Returns - -`ReactNode` - -#### Defined in - -[src/react/VGrid.tsx:206](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L206) - -## Type Aliases - -### ScrollToIndexAlign - -Ƭ **ScrollToIndexAlign**: ``"start"`` \| ``"center"`` \| ``"end"`` \| ``"nearest"`` - -#### Defined in - -[src/core/types.ts:19](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/core/types.ts#L19) - -___ - -### CustomCellComponent - -Ƭ **CustomCellComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomCellComponentProps`](../interfaces/react.CustomCellComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> - -#### Defined in - -[src/react/VGrid.tsx:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/VGrid.tsx#L38) - -___ - -### ViewportComponentAttributes - -Ƭ **ViewportComponentAttributes**: `Pick`\<`React.HTMLAttributes`\<`HTMLElement`\>, ``"className"`` \| ``"style"`` \| ``"id"`` \| ``"role"`` \| ``"tabIndex"`` \| ``"onKeyDown"``\> & `React.AriaAttributes` - -#### Defined in - -[src/react/types.ts:3](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L3) - -___ - -### CustomContainerComponent - -Ƭ **CustomContainerComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomContainerComponentProps`](../interfaces/react.CustomContainerComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> - -#### Defined in - -[src/react/types.ts:14](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L14) - -___ - -### CustomItemComponent - -Ƭ **CustomItemComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomItemComponentProps`](../interfaces/react.CustomItemComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> - -#### Defined in - -[src/react/types.ts:28](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/react/types.ts#L28) diff --git a/docs/modules/solid.md b/docs/modules/solid.md deleted file mode 100644 index ee2c1c968..000000000 --- a/docs/modules/solid.md +++ /dev/null @@ -1,101 +0,0 @@ -# Module: solid - -## Table of contents - -### Functions - -- [VList](solid.md#vlist) -- [Virtualizer](solid.md#virtualizer) -- [WindowVirtualizer](solid.md#windowvirtualizer) - -### Interfaces - -- [VListProps](../interfaces/solid.VListProps.md) -- [VListHandle](../interfaces/solid.VListHandle.md) -- [VirtualizerProps](../interfaces/solid.VirtualizerProps.md) -- [VirtualizerHandle](../interfaces/solid.VirtualizerHandle.md) -- [WindowVirtualizerProps](../interfaces/solid.WindowVirtualizerProps.md) - -## Functions - -### VList - -▸ **VList**\<`T`\>(`props`): `Element` - -Virtualized list component. See [VListProps](../interfaces/solid.VListProps.md) and [VListHandle](../interfaces/solid.VListHandle.md). - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`VListProps`](../interfaces/solid.VListProps.md)\<`T`\> | - -#### Returns - -`Element` - -#### Defined in - -[src/solid/VList.tsx:39](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/VList.tsx#L39) - -___ - -### Virtualizer - -▸ **Virtualizer**\<`T`\>(`props`): `Element` - -Customizable list virtualizer for advanced usage. See [VirtualizerProps](../interfaces/solid.VirtualizerProps.md) and [VirtualizerHandle](../interfaces/solid.VirtualizerHandle.md). - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`VirtualizerProps`](../interfaces/solid.VirtualizerProps.md)\<`T`\> | - -#### Returns - -`Element` - -#### Defined in - -[src/solid/Virtualizer.tsx:156](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/Virtualizer.tsx#L156) - -___ - -### WindowVirtualizer - -▸ **WindowVirtualizer**\<`T`\>(`props`): `Element` - -[Virtualizer](solid.md#virtualizer) controlled by the window scrolling. See [WindowVirtualizerProps](../interfaces/solid.WindowVirtualizerProps.md) and [WindowVirtualizer](solid.md#windowvirtualizer). - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `props` | [`WindowVirtualizerProps`](../interfaces/solid.WindowVirtualizerProps.md)\<`T`\> | - -#### Returns - -`Element` - -#### Defined in - -[src/solid/WindowVirtualizer.tsx:93](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/solid/WindowVirtualizer.tsx#L93) diff --git a/docs/modules/vue.md b/docs/modules/vue.md deleted file mode 100644 index f25624065..000000000 --- a/docs/modules/vue.md +++ /dev/null @@ -1,9 +0,0 @@ -# Module: vue - -## Table of contents - -### Classes - -- [VList](../classes/vue.VList.md) -- [Virtualizer](../classes/vue.Virtualizer.md) -- [WindowVirtualizer](../classes/vue.WindowVirtualizer.md) diff --git a/docs/react/API.md b/docs/react/API.md new file mode 100644 index 000000000..7e31ace6a --- /dev/null +++ b/docs/react/API.md @@ -0,0 +1,38 @@ +[**API**](../API.md) • **Docs** + +*** + +# react + +## Index + +### Functions + +- [VList](functions/VList.md) +- [Virtualizer](functions/Virtualizer.md) +- [WindowVirtualizer](functions/WindowVirtualizer.md) +- [experimental\_VGrid](functions/experimental_VGrid.md) + +### Interfaces + +- [CacheSnapshot](interfaces/CacheSnapshot.md) +- [ScrollToIndexOpts](interfaces/ScrollToIndexOpts.md) +- [VListProps](interfaces/VListProps.md) +- [VListHandle](interfaces/VListHandle.md) +- [VirtualizerProps](interfaces/VirtualizerProps.md) +- [VirtualizerHandle](interfaces/VirtualizerHandle.md) +- [WindowVirtualizerProps](interfaces/WindowVirtualizerProps.md) +- [WindowVirtualizerHandle](interfaces/WindowVirtualizerHandle.md) +- [VGridProps](interfaces/VGridProps.md) +- [VGridHandle](interfaces/VGridHandle.md) +- [CustomCellComponentProps](interfaces/CustomCellComponentProps.md) +- [CustomContainerComponentProps](interfaces/CustomContainerComponentProps.md) +- [CustomItemComponentProps](interfaces/CustomItemComponentProps.md) + +### Type Aliases + +- [ScrollToIndexAlign](type-aliases/ScrollToIndexAlign.md) +- [CustomCellComponent](type-aliases/CustomCellComponent.md) +- [ViewportComponentAttributes](type-aliases/ViewportComponentAttributes.md) +- [CustomContainerComponent](type-aliases/CustomContainerComponent.md) +- [CustomItemComponent](type-aliases/CustomItemComponent.md) diff --git a/docs/react/functions/VList.md b/docs/react/functions/VList.md new file mode 100644 index 000000000..a4e0133a5 --- /dev/null +++ b/docs/react/functions/VList.md @@ -0,0 +1,21 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: VList() + +> **VList**(`props`): `ReactNode` + +Virtualized list component. See [VListProps](../interfaces/VListProps.md) and [VListHandle](../interfaces/VListHandle.md). + +## Parameters + +• **props**: [`VListProps`](../interfaces/VListProps.md) & `RefAttributes`\<[`VListHandle`](../interfaces/VListHandle.md)\> + +## Returns + +`ReactNode` + +## Defined in + +[src/react/VList.tsx:45](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VList.tsx#L45) diff --git a/docs/react/functions/Virtualizer.md b/docs/react/functions/Virtualizer.md new file mode 100644 index 000000000..0e50f2b8d --- /dev/null +++ b/docs/react/functions/Virtualizer.md @@ -0,0 +1,21 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: Virtualizer() + +> **Virtualizer**(`props`): `ReactNode` + +Customizable list virtualizer for advanced usage. See [VirtualizerProps](../interfaces/VirtualizerProps.md) and [VirtualizerHandle](../interfaces/VirtualizerHandle.md). + +## Parameters + +• **props**: [`VirtualizerProps`](../interfaces/VirtualizerProps.md) & `RefAttributes`\<[`VirtualizerHandle`](../interfaces/VirtualizerHandle.md)\> + +## Returns + +`ReactNode` + +## Defined in + +[src/react/Virtualizer.tsx:171](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L171) diff --git a/docs/react/functions/WindowVirtualizer.md b/docs/react/functions/WindowVirtualizer.md new file mode 100644 index 000000000..25a888c65 --- /dev/null +++ b/docs/react/functions/WindowVirtualizer.md @@ -0,0 +1,21 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: WindowVirtualizer() + +> **WindowVirtualizer**(`props`): `ReactNode` + +[Virtualizer](Virtualizer.md) controlled by the window scrolling. See [WindowVirtualizerProps](../interfaces/WindowVirtualizerProps.md) and [WindowVirtualizer](WindowVirtualizer.md). + +## Parameters + +• **props**: [`WindowVirtualizerProps`](../interfaces/WindowVirtualizerProps.md) & `RefAttributes`\<[`WindowVirtualizerHandle`](../interfaces/WindowVirtualizerHandle.md)\> + +## Returns + +`ReactNode` + +## Defined in + +[src/react/WindowVirtualizer.tsx:117](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L117) diff --git a/docs/react/functions/experimental_VGrid.md b/docs/react/functions/experimental_VGrid.md new file mode 100644 index 000000000..2a88ec999 --- /dev/null +++ b/docs/react/functions/experimental_VGrid.md @@ -0,0 +1,21 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: experimental\_VGrid() + +> **experimental\_VGrid**(`props`): `ReactNode` + +Virtualized grid component. See [VGridProps](../interfaces/VGridProps.md) and [VGridHandle](../interfaces/VGridHandle.md). + +## Parameters + +• **props**: [`VGridProps`](../interfaces/VGridProps.md) & `RefAttributes`\<[`VGridHandle`](../interfaces/VGridHandle.md)\> + +## Returns + +`ReactNode` + +## Defined in + +[src/react/VGrid.tsx:207](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L207) diff --git a/docs/react/interfaces/CacheSnapshot.md b/docs/react/interfaces/CacheSnapshot.md new file mode 100644 index 000000000..3ee16d86d --- /dev/null +++ b/docs/react/interfaces/CacheSnapshot.md @@ -0,0 +1,19 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: CacheSnapshot + +Serializable cache snapshot. + +**This is not intended to be modified by users. And it is not guaranteed to work if you pass it to the different version of this package.** + +## Properties + +### \[cacheSymbol\] + +> **\[cacheSymbol\]**: `never` + +#### Defined in + +[src/core/types.ts:16](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/core/types.ts#L16) diff --git a/docs/react/interfaces/CustomCellComponentProps.md b/docs/react/interfaces/CustomCellComponentProps.md new file mode 100644 index 000000000..680fa084d --- /dev/null +++ b/docs/react/interfaces/CustomCellComponentProps.md @@ -0,0 +1,27 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: CustomCellComponentProps + +Props of customized cell component for [VGrid](../functions/experimental_VGrid.md). + +## Properties + +### style + +> **style**: `CSSProperties` + +#### Defined in + +[src/react/VGrid.tsx:35](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L35) + +*** + +### children + +> **children**: `ReactNode` + +#### Defined in + +[src/react/VGrid.tsx:36](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L36) diff --git a/docs/react/interfaces/CustomContainerComponentProps.md b/docs/react/interfaces/CustomContainerComponentProps.md new file mode 100644 index 000000000..b77f8bf1c --- /dev/null +++ b/docs/react/interfaces/CustomContainerComponentProps.md @@ -0,0 +1,25 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: CustomContainerComponentProps + +## Properties + +### style + +> **style**: `CSSProperties` + +#### Defined in + +[src/react/types.ts:10](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L10) + +*** + +### children + +> **children**: `ReactNode` + +#### Defined in + +[src/react/types.ts:11](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L11) diff --git a/docs/react/interfaces/CustomItemComponentProps.md b/docs/react/interfaces/CustomItemComponentProps.md new file mode 100644 index 000000000..5ed648763 --- /dev/null +++ b/docs/react/interfaces/CustomItemComponentProps.md @@ -0,0 +1,37 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: CustomItemComponentProps + +Props of customized item component for [Virtualizer](../functions/Virtualizer.md) or [WindowVirtualizer](../functions/WindowVirtualizer.md). + +## Properties + +### style + +> **style**: `CSSProperties` + +#### Defined in + +[src/react/types.ts:23](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L23) + +*** + +### index + +> **index**: `number` + +#### Defined in + +[src/react/types.ts:24](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L24) + +*** + +### children + +> **children**: `ReactNode` + +#### Defined in + +[src/react/types.ts:25](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L25) diff --git a/docs/interfaces/react.ScrollToIndexOpts.md b/docs/react/interfaces/ScrollToIndexOpts.md similarity index 51% rename from docs/interfaces/react.ScrollToIndexOpts.md rename to docs/react/interfaces/ScrollToIndexOpts.md index d4011686c..a6868c9ab 100644 --- a/docs/interfaces/react.ScrollToIndexOpts.md +++ b/docs/react/interfaces/ScrollToIndexOpts.md @@ -1,20 +1,14 @@ -# Interface: ScrollToIndexOpts - -[react](../modules/react.md).ScrollToIndexOpts +[**API**](../../API.md) • **Docs** -## Table of contents +*** -### Properties - -- [align](react.ScrollToIndexOpts.md#align) -- [smooth](react.ScrollToIndexOpts.md#smooth) -- [offset](react.ScrollToIndexOpts.md#offset) +# Interface: ScrollToIndexOpts ## Properties -### align +### align? -• `Optional` **align**: [`ScrollToIndexAlign`](../modules/react.md#scrolltoindexalign) +> `optional` **align**: [`ScrollToIndexAlign`](../type-aliases/ScrollToIndexAlign.md) Alignment of item. @@ -23,7 +17,7 @@ Alignment of item. - `end`: Align the item to the end of the list. - `nearest`: If the item is already completely visible, don't scroll. Otherwise scroll until it becomes visible. That is similar behavior to [`nearest` option of scrollIntoView](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView). -**`Default Value`** +#### Default Value ```ts "start" @@ -31,13 +25,13 @@ Alignment of item. #### Defined in -[src/core/types.ts:32](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/core/types.ts#L32) +[src/core/types.ts:32](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/core/types.ts#L32) -___ +*** -### smooth +### smooth? -• `Optional` **smooth**: `boolean` +> `optional` **smooth**: `boolean` If true, scrolling animates smoothly with [`behavior: smooth` of scrollTo](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo#behavior). @@ -45,17 +39,17 @@ If true, scrolling animates smoothly with [`behavior: smooth` of scrollTo](https #### Defined in -[src/core/types.ts:38](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/core/types.ts#L38) +[src/core/types.ts:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/core/types.ts#L38) -___ +*** -### offset +### offset? -• `Optional` **offset**: `number` +> `optional` **offset**: `number` Additional offset from the scrolled position. -**`Default Value`** +#### Default Value ```ts 0 @@ -63,4 +57,4 @@ Additional offset from the scrolled position. #### Defined in -[src/core/types.ts:43](https://github.com/inokawa/virtua/blob/d0d02377f34098a2105ecf6e624698c2df2ab54d/src/core/types.ts#L43) +[src/core/types.ts:43](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/core/types.ts#L43) diff --git a/docs/react/interfaces/VGridHandle.md b/docs/react/interfaces/VGridHandle.md new file mode 100644 index 000000000..f86ddfc18 --- /dev/null +++ b/docs/react/interfaces/VGridHandle.md @@ -0,0 +1,157 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VGridHandle + +Methods of [VGrid](../functions/experimental_VGrid.md). + +## Methods + +### scrollToIndex() + +> **scrollToIndex**(`indexX`, `indexY`): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **indexX**: `number` + +horizontal index of item + +• **indexY**: `number` + +vertical index of item + +#### Returns + +`void` + +#### Defined in + +[src/react/VGrid.tsx:134](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L134) + +*** + +### scrollTo() + +> **scrollTo**(`offsetX`, `offsetY`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offsetX**: `number` + +offset from left + +• **offsetY**: `number` + +offset from top + +#### Returns + +`void` + +#### Defined in + +[src/react/VGrid.tsx:140](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L140) + +*** + +### scrollBy() + +> **scrollBy**(`offsetX`, `offsetY`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offsetX**: `number` + +horizontal offset from current position + +• **offsetY**: `number` + +vertical offset from current position + +#### Returns + +`void` + +#### Defined in + +[src/react/VGrid.tsx:146](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L146) + +## Properties + +### scrollTop + +> `readonly` **scrollTop**: `number` + +Get current scrollTop. + +#### Defined in + +[src/react/VGrid.tsx:108](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L108) + +*** + +### scrollLeft + +> `readonly` **scrollLeft**: `number` + +Get current scrollLeft. + +#### Defined in + +[src/react/VGrid.tsx:112](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L112) + +*** + +### scrollHeight + +> `readonly` **scrollHeight**: `number` + +Get current scrollHeight. + +#### Defined in + +[src/react/VGrid.tsx:116](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L116) + +*** + +### scrollWidth + +> `readonly` **scrollWidth**: `number` + +Get current scrollWidth. + +#### Defined in + +[src/react/VGrid.tsx:120](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L120) + +*** + +### viewportHeight + +> `readonly` **viewportHeight**: `number` + +Get current offsetHeight. + +#### Defined in + +[src/react/VGrid.tsx:124](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L124) + +*** + +### viewportWidth + +> `readonly` **viewportWidth**: `number` + +Get current offsetWidth. + +#### Defined in + +[src/react/VGrid.tsx:128](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L128) diff --git a/docs/react/interfaces/VGridProps.md b/docs/react/interfaces/VGridProps.md new file mode 100644 index 000000000..4f78ec530 --- /dev/null +++ b/docs/react/interfaces/VGridProps.md @@ -0,0 +1,1226 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VGridProps + +Props of [VGrid](../functions/experimental_VGrid.md). + +## Extends + +- [`ViewportComponentAttributes`](../type-aliases/ViewportComponentAttributes.md) + +## Properties + +### children() + +> **children**: (`arg`) => `ReactNode` + +A function to create elements rendered by this component. + +#### Parameters + +• **arg** + +• **arg.rowIndex**: `number` + +row index of cell + +• **arg.colIndex**: `number` + +column index of cell + +#### Returns + +`ReactNode` + +#### Defined in + +[src/react/VGrid.tsx:156](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L156) + +*** + +### row + +> **row**: `number` + +Total row length of grid. + +#### Defined in + +[src/react/VGrid.tsx:169](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L169) + +*** + +### col + +> **col**: `number` + +Total column length of grid. + +#### Defined in + +[src/react/VGrid.tsx:173](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L173) + +*** + +### cellHeight? + +> `optional` **cellHeight**: `number` + +Cell height hint for unmeasured items. It's recommended to specify this prop if item sizes are fixed and known, or much larger than the defaultValue. It will help to reduce scroll jump when items are measured. + +#### Default Value + +```ts +40 +``` + +#### Defined in + +[src/react/VGrid.tsx:178](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L178) + +*** + +### cellWidth? + +> `optional` **cellWidth**: `number` + +Cell width hint for unmeasured items. It's recommended to specify this prop if item sizes are fixed and known, or much larger than the defaultValue. It will help to reduce scroll jump when items are measured. + +#### Default Value + +```ts +100 +``` + +#### Defined in + +[src/react/VGrid.tsx:183](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L183) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the grid. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +2 +``` + +#### Defined in + +[src/react/VGrid.tsx:188](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L188) + +*** + +### initialRowCount? + +> `optional` **initialRowCount**: `number` + +If set, the specified amount of rows will be mounted in the initial rendering regardless of the container size. This prop is mostly for SSR. + +#### Defined in + +[src/react/VGrid.tsx:192](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L192) + +*** + +### initialColCount? + +> `optional` **initialColCount**: `number` + +If set, the specified amount of cols will be mounted in the initial rendering regardless of the container size. This prop is mostly for SSR. + +#### Defined in + +[src/react/VGrid.tsx:196](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L196) + +*** + +### item? + +> `optional` **item**: keyof IntrinsicElements \| [`CustomCellComponent`](../type-aliases/CustomCellComponent.md) + +Component or element type for cell element. This component will get [CustomCellComponentProps](CustomCellComponentProps.md) as props. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/react/VGrid.tsx:201](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L201) + +*** + +### className? + +> `optional` **className**: `string` + +#### Inherited from + +`ViewportComponentAttributes.className` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2897 + +*** + +### style? + +> `optional` **style**: `CSSProperties` + +#### Inherited from + +`ViewportComponentAttributes.style` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2908 + +*** + +### id? + +> `optional` **id**: `string` + +#### Inherited from + +`ViewportComponentAttributes.id` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2903 + +*** + +### role? + +> `optional` **role**: `AriaRole` + +#### Inherited from + +`ViewportComponentAttributes.role` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2917 + +*** + +### tabIndex? + +> `optional` **tabIndex**: `number` + +#### Inherited from + +`ViewportComponentAttributes.tabIndex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2909 + +*** + +### onKeyDown? + +> `optional` **onKeyDown**: `KeyboardEventHandler`\<`HTMLElement`\> + +#### Inherited from + +`ViewportComponentAttributes.onKeyDown` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2429 + +*** + +### aria-activedescendant? + +> `optional` **aria-activedescendant**: `string` + +Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. + +#### Inherited from + +`ViewportComponentAttributes.aria-activedescendant` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2593 + +*** + +### aria-atomic? + +> `optional` **aria-atomic**: `Booleanish` + +Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. + +#### Inherited from + +`ViewportComponentAttributes.aria-atomic` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2595 + +*** + +### aria-autocomplete? + +> `optional` **aria-autocomplete**: `"inline"` \| `"none"` \| `"both"` \| `"list"` + +Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be +presented if they are made. + +#### Inherited from + +`ViewportComponentAttributes.aria-autocomplete` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2600 + +*** + +### aria-braillelabel? + +> `optional` **aria-braillelabel**: `string` + +Defines a string value that labels the current element, which is intended to be converted into Braille. + +#### See + +aria-label. + +#### Inherited from + +`ViewportComponentAttributes.aria-braillelabel` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2606 + +*** + +### aria-brailleroledescription? + +> `optional` **aria-brailleroledescription**: `string` + +Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. + +#### See + +aria-roledescription. + +#### Inherited from + +`ViewportComponentAttributes.aria-brailleroledescription` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2611 + +*** + +### aria-busy? + +> `optional` **aria-busy**: `Booleanish` + +#### Inherited from + +`ViewportComponentAttributes.aria-busy` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2612 + +*** + +### aria-checked? + +> `optional` **aria-checked**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + +#### See + + - aria-pressed + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-checked` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2617 + +*** + +### aria-colcount? + +> `optional` **aria-colcount**: `number` + +Defines the total number of columns in a table, grid, or treegrid. + +#### See + +aria-colindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-colcount` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2622 + +*** + +### aria-colindex? + +> `optional` **aria-colindex**: `number` + +Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + +#### See + + - aria-colcount + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colindex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2627 + +*** + +### aria-colindextext? + +> `optional` **aria-colindextext**: `string` + +Defines a human readable text alternative of aria-colindex. + +#### See + +aria-rowindextext. + +#### Inherited from + +`ViewportComponentAttributes.aria-colindextext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2632 + +*** + +### aria-colspan? + +> `optional` **aria-colspan**: `number` + +Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-colindex + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colspan` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2637 + +*** + +### aria-controls? + +> `optional` **aria-controls**: `string` + +Identifies the element (or elements) whose contents or presence are controlled by the current element. + +#### See + +aria-owns. + +#### Inherited from + +`ViewportComponentAttributes.aria-controls` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2642 + +*** + +### aria-current? + +> `optional` **aria-current**: `boolean` \| `"time"` \| `"page"` \| `"false"` \| `"true"` \| `"location"` \| `"date"` \| `"step"` + +Indicates the element that represents the current item within a container or set of related elements. + +#### Inherited from + +`ViewportComponentAttributes.aria-current` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2644 + +*** + +### aria-describedby? + +> `optional` **aria-describedby**: `string` + +Identifies the element (or elements) that describes the object. + +#### See + +aria-labelledby + +#### Inherited from + +`ViewportComponentAttributes.aria-describedby` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2649 + +*** + +### aria-description? + +> `optional` **aria-description**: `string` + +Defines a string value that describes or annotates the current element. + +#### See + +related aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-description` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2654 + +*** + +### aria-details? + +> `optional` **aria-details**: `string` + +Identifies the element that provides a detailed, extended description for the object. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-details` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2659 + +*** + +### aria-disabled? + +> `optional` **aria-disabled**: `Booleanish` + +Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + +#### See + + - aria-hidden + - aria-readonly. + +#### Inherited from + +`ViewportComponentAttributes.aria-disabled` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2664 + +*** + +### ~~aria-dropeffect?~~ + +> `optional` **aria-dropeffect**: `"copy"` \| `"none"` \| `"link"` \| `"move"` \| `"execute"` \| `"popup"` + +Indicates what functions can be performed when a dragged object is released on the drop target. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-dropeffect` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2669 + +*** + +### aria-errormessage? + +> `optional` **aria-errormessage**: `string` + +Identifies the element that provides an error message for the object. + +#### See + + - aria-invalid + - aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-errormessage` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2674 + +*** + +### aria-expanded? + +> `optional` **aria-expanded**: `Booleanish` + +Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. + +#### Inherited from + +`ViewportComponentAttributes.aria-expanded` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2676 + +*** + +### aria-flowto? + +> `optional` **aria-flowto**: `string` + +Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, +allows assistive technology to override the general default of reading in document source order. + +#### Inherited from + +`ViewportComponentAttributes.aria-flowto` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2681 + +*** + +### ~~aria-grabbed?~~ + +> `optional` **aria-grabbed**: `Booleanish` + +Indicates an element's "grabbed" state in a drag-and-drop operation. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-grabbed` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2686 + +*** + +### aria-haspopup? + +> `optional` **aria-haspopup**: `boolean` \| `"grid"` \| `"dialog"` \| `"menu"` \| `"listbox"` \| `"false"` \| `"true"` \| `"tree"` + +Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-haspopup` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2688 + +*** + +### aria-hidden? + +> `optional` **aria-hidden**: `Booleanish` + +Indicates whether the element is exposed to an accessibility API. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-hidden` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2693 + +*** + +### aria-invalid? + +> `optional` **aria-invalid**: `boolean` \| `"false"` \| `"true"` \| `"grammar"` \| `"spelling"` + +Indicates the entered value does not conform to the format expected by the application. + +#### See + +aria-errormessage. + +#### Inherited from + +`ViewportComponentAttributes.aria-invalid` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2698 + +*** + +### aria-keyshortcuts? + +> `optional` **aria-keyshortcuts**: `string` + +Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-keyshortcuts` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2700 + +*** + +### aria-label? + +> `optional` **aria-label**: `string` + +Defines a string value that labels the current element. + +#### See + +aria-labelledby. + +#### Inherited from + +`ViewportComponentAttributes.aria-label` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2705 + +*** + +### aria-labelledby? + +> `optional` **aria-labelledby**: `string` + +Identifies the element (or elements) that labels the current element. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-labelledby` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2710 + +*** + +### aria-level? + +> `optional` **aria-level**: `number` + +Defines the hierarchical level of an element within a structure. + +#### Inherited from + +`ViewportComponentAttributes.aria-level` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2712 + +*** + +### aria-live? + +> `optional` **aria-live**: `"off"` \| `"assertive"` \| `"polite"` + +Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. + +#### Inherited from + +`ViewportComponentAttributes.aria-live` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2714 + +*** + +### aria-modal? + +> `optional` **aria-modal**: `Booleanish` + +Indicates whether an element is modal when displayed. + +#### Inherited from + +`ViewportComponentAttributes.aria-modal` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2716 + +*** + +### aria-multiline? + +> `optional` **aria-multiline**: `Booleanish` + +Indicates whether a text box accepts multiple lines of input or only a single line. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiline` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2718 + +*** + +### aria-multiselectable? + +> `optional` **aria-multiselectable**: `Booleanish` + +Indicates that the user may select more than one item from the current selectable descendants. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiselectable` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2720 + +*** + +### aria-orientation? + +> `optional` **aria-orientation**: `"horizontal"` \| `"vertical"` + +Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. + +#### Inherited from + +`ViewportComponentAttributes.aria-orientation` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2722 + +*** + +### aria-owns? + +> `optional` **aria-owns**: `string` + +Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship +between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + +#### See + +aria-controls. + +#### Inherited from + +`ViewportComponentAttributes.aria-owns` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2728 + +*** + +### aria-placeholder? + +> `optional` **aria-placeholder**: `string` + +Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. +A hint could be a sample value or a brief description of the expected format. + +#### Inherited from + +`ViewportComponentAttributes.aria-placeholder` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2733 + +*** + +### aria-posinset? + +> `optional` **aria-posinset**: `number` + +Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-setsize. + +#### Inherited from + +`ViewportComponentAttributes.aria-posinset` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2738 + +*** + +### aria-pressed? + +> `optional` **aria-pressed**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "pressed" state of toggle buttons. + +#### See + + - aria-checked + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-pressed` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2743 + +*** + +### aria-readonly? + +> `optional` **aria-readonly**: `Booleanish` + +Indicates that the element is not editable, but is otherwise operable. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-readonly` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2748 + +*** + +### aria-relevant? + +> `optional` **aria-relevant**: `"text"` \| `"all"` \| `"additions"` \| `"additions removals"` \| `"additions text"` \| `"removals"` \| `"removals additions"` \| `"removals text"` \| `"text additions"` \| `"text removals"` + +Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + +#### See + +aria-atomic. + +#### Inherited from + +`ViewportComponentAttributes.aria-relevant` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2753 + +*** + +### aria-required? + +> `optional` **aria-required**: `Booleanish` + +Indicates that user input is required on the element before a form may be submitted. + +#### Inherited from + +`ViewportComponentAttributes.aria-required` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2766 + +*** + +### aria-roledescription? + +> `optional` **aria-roledescription**: `string` + +Defines a human-readable, author-localized description for the role of an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-roledescription` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2768 + +*** + +### aria-rowcount? + +> `optional` **aria-rowcount**: `number` + +Defines the total number of rows in a table, grid, or treegrid. + +#### See + +aria-rowindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowcount` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2773 + +*** + +### aria-rowindex? + +> `optional` **aria-rowindex**: `number` + +Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + +#### See + + - aria-rowcount + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowindex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2778 + +*** + +### aria-rowindextext? + +> `optional` **aria-rowindextext**: `string` + +Defines a human readable text alternative of aria-rowindex. + +#### See + +aria-colindextext. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowindextext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2783 + +*** + +### aria-rowspan? + +> `optional` **aria-rowspan**: `number` + +Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-rowindex + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowspan` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2788 + +*** + +### aria-selected? + +> `optional` **aria-selected**: `Booleanish` + +Indicates the current "selected" state of various widgets. + +#### See + + - aria-checked + - aria-pressed. + +#### Inherited from + +`ViewportComponentAttributes.aria-selected` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2793 + +*** + +### aria-setsize? + +> `optional` **aria-setsize**: `number` + +Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-posinset. + +#### Inherited from + +`ViewportComponentAttributes.aria-setsize` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2798 + +*** + +### aria-sort? + +> `optional` **aria-sort**: `"none"` \| `"ascending"` \| `"descending"` \| `"other"` + +Indicates if items in a table or grid are sorted in ascending or descending order. + +#### Inherited from + +`ViewportComponentAttributes.aria-sort` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2800 + +*** + +### aria-valuemax? + +> `optional` **aria-valuemax**: `number` + +Defines the maximum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemax` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2802 + +*** + +### aria-valuemin? + +> `optional` **aria-valuemin**: `number` + +Defines the minimum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemin` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2804 + +*** + +### aria-valuenow? + +> `optional` **aria-valuenow**: `number` + +Defines the current value for a range widget. + +#### See + +aria-valuetext. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuenow` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2809 + +*** + +### aria-valuetext? + +> `optional` **aria-valuetext**: `string` + +Defines the human readable text alternative of aria-valuenow for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuetext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2811 diff --git a/docs/react/interfaces/VListHandle.md b/docs/react/interfaces/VListHandle.md new file mode 100644 index 000000000..e46dd53e6 --- /dev/null +++ b/docs/react/interfaces/VListHandle.md @@ -0,0 +1,183 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VListHandle + +Methods of [VList](../functions/VList.md). + +## Extends + +- [`VirtualizerHandle`](VirtualizerHandle.md) + +## Methods + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`getItemOffset`](VirtualizerHandle.md#getitemoffset) + +#### Defined in + +[src/react/Virtualizer.tsx:59](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L59) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollToIndex`](VirtualizerHandle.md#scrolltoindex) + +#### Defined in + +[src/react/Virtualizer.tsx:65](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L65) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollTo`](VirtualizerHandle.md#scrollto) + +#### Defined in + +[src/react/Virtualizer.tsx:70](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L70) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollBy`](VirtualizerHandle.md#scrollby) + +#### Defined in + +[src/react/Virtualizer.tsx:75](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L75) + +## Properties + +### cache + +> `readonly` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +Get current [CacheSnapshot](CacheSnapshot.md). + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`cache`](VirtualizerHandle.md#cache) + +#### Defined in + +[src/react/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L42) + +*** + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollOffset`](VirtualizerHandle.md#scrolloffset) + +#### Defined in + +[src/react/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L46) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollSize`](VirtualizerHandle.md#scrollsize) + +#### Defined in + +[src/react/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L50) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`viewportSize`](VirtualizerHandle.md#viewportsize) + +#### Defined in + +[src/react/Virtualizer.tsx:54](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L54) diff --git a/docs/react/interfaces/VListProps.md b/docs/react/interfaces/VListProps.md new file mode 100644 index 000000000..03c455703 --- /dev/null +++ b/docs/react/interfaces/VListProps.md @@ -0,0 +1,1345 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VListProps + +Props of [VList](../functions/VList.md). + +## Extends + +- `Pick`\<[`VirtualizerProps`](VirtualizerProps.md), `"children"` \| `"count"` \| `"overscan"` \| `"itemSize"` \| `"shift"` \| `"horizontal"` \| `"cache"` \| `"ssrCount"` \| `"item"` \| `"onScroll"` \| `"onScrollEnd"` \| `"onRangeChange"` \| `"keepMounted"`\>.[`ViewportComponentAttributes`](../type-aliases/ViewportComponentAttributes.md) + +## Properties + +### reverse? + +> `optional` **reverse**: `boolean` + +If true, items are aligned to the end of the list when total size of items are smaller than viewport size. It's useful for chat like app. + +#### Defined in + +[src/react/VList.tsx:39](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VList.tsx#L39) + +*** + +### children + +> **children**: `ReactNode` \| (`index`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> + +Elements rendered by this component. + +You can also pass a function and set [VirtualizerProps.count](VirtualizerProps.md#count) to create elements lazily. + +#### Inherited from + +`Pick.children` + +#### Defined in + +[src/react/Virtualizer.tsx:87](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L87) + +*** + +### onScroll()? + +> `optional` **onScroll**: (`offset`) => `void` + +Callback invoked whenever scroll offset changes. + +#### Parameters + +• **offset**: `number` + +Current scrollTop or scrollLeft. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onScroll` + +#### Defined in + +[src/react/Virtualizer.tsx:148](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L148) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Inherited from + +`Pick.shift` + +#### Defined in + +[src/react/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L111) + +*** + +### count? + +> `optional` **count**: `number` + +If you set a function to [VirtualizerProps.children](VirtualizerProps.md#children), you have to set total number of items to this prop. + +#### Inherited from + +`Pick.count` + +#### Defined in + +[src/react/Virtualizer.tsx:91](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L91) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Inherited from + +`Pick.overscan` + +#### Defined in + +[src/react/Virtualizer.tsx:96](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L96) + +*** + +### keepMounted? + +> `optional` **keepMounted**: `number`[] + +List of indexes that should be always mounted, even when off screen. + +#### Inherited from + +`Pick.keepMounted` + +#### Defined in + +[src/react/Virtualizer.tsx:100](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L100) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Inherited from + +`Pick.itemSize` + +#### Defined in + +[src/react/Virtualizer.tsx:107](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L107) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Inherited from + +`Pick.horizontal` + +#### Defined in + +[src/react/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L115) + +*** + +### cache? + +> `optional` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +You can restore cache by passing a [CacheSnapshot](CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [VirtualizerHandle.cache](VirtualizerHandle.md#cache). + +**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** + +#### Inherited from + +`Pick.cache` + +#### Defined in + +[src/react/Virtualizer.tsx:121](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L121) + +*** + +### ssrCount? + +> `optional` **ssrCount**: `number` + +A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. + +#### Inherited from + +`Pick.ssrCount` + +#### Defined in + +[src/react/Virtualizer.tsx:129](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L129) + +*** + +### item? + +> `optional` **item**: [`CustomItemComponent`](../type-aliases/CustomItemComponent.md) \| keyof IntrinsicElements + +Component or element type for item element. This component will get [CustomItemComponentProps](CustomItemComponentProps.md) as props. + +#### Default Value + +```ts +"div" +``` + +#### Inherited from + +`Pick.item` + +#### Defined in + +[src/react/Virtualizer.tsx:139](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L139) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onScrollEnd` + +#### Defined in + +[src/react/Virtualizer.tsx:152](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L152) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onRangeChange` + +#### Defined in + +[src/react/Virtualizer.tsx:156](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L156) + +*** + +### className? + +> `optional` **className**: `string` + +#### Inherited from + +`ViewportComponentAttributes.className` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2897 + +*** + +### style? + +> `optional` **style**: `CSSProperties` + +#### Inherited from + +`ViewportComponentAttributes.style` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2908 + +*** + +### id? + +> `optional` **id**: `string` + +#### Inherited from + +`ViewportComponentAttributes.id` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2903 + +*** + +### role? + +> `optional` **role**: `AriaRole` + +#### Inherited from + +`ViewportComponentAttributes.role` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2917 + +*** + +### tabIndex? + +> `optional` **tabIndex**: `number` + +#### Inherited from + +`ViewportComponentAttributes.tabIndex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2909 + +*** + +### onKeyDown? + +> `optional` **onKeyDown**: `KeyboardEventHandler`\<`HTMLElement`\> + +#### Inherited from + +`ViewportComponentAttributes.onKeyDown` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2429 + +*** + +### aria-activedescendant? + +> `optional` **aria-activedescendant**: `string` + +Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. + +#### Inherited from + +`ViewportComponentAttributes.aria-activedescendant` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2593 + +*** + +### aria-atomic? + +> `optional` **aria-atomic**: `Booleanish` + +Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. + +#### Inherited from + +`ViewportComponentAttributes.aria-atomic` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2595 + +*** + +### aria-autocomplete? + +> `optional` **aria-autocomplete**: `"inline"` \| `"none"` \| `"both"` \| `"list"` + +Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be +presented if they are made. + +#### Inherited from + +`ViewportComponentAttributes.aria-autocomplete` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2600 + +*** + +### aria-braillelabel? + +> `optional` **aria-braillelabel**: `string` + +Defines a string value that labels the current element, which is intended to be converted into Braille. + +#### See + +aria-label. + +#### Inherited from + +`ViewportComponentAttributes.aria-braillelabel` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2606 + +*** + +### aria-brailleroledescription? + +> `optional` **aria-brailleroledescription**: `string` + +Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. + +#### See + +aria-roledescription. + +#### Inherited from + +`ViewportComponentAttributes.aria-brailleroledescription` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2611 + +*** + +### aria-busy? + +> `optional` **aria-busy**: `Booleanish` + +#### Inherited from + +`ViewportComponentAttributes.aria-busy` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2612 + +*** + +### aria-checked? + +> `optional` **aria-checked**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + +#### See + + - aria-pressed + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-checked` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2617 + +*** + +### aria-colcount? + +> `optional` **aria-colcount**: `number` + +Defines the total number of columns in a table, grid, or treegrid. + +#### See + +aria-colindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-colcount` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2622 + +*** + +### aria-colindex? + +> `optional` **aria-colindex**: `number` + +Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + +#### See + + - aria-colcount + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colindex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2627 + +*** + +### aria-colindextext? + +> `optional` **aria-colindextext**: `string` + +Defines a human readable text alternative of aria-colindex. + +#### See + +aria-rowindextext. + +#### Inherited from + +`ViewportComponentAttributes.aria-colindextext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2632 + +*** + +### aria-colspan? + +> `optional` **aria-colspan**: `number` + +Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-colindex + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colspan` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2637 + +*** + +### aria-controls? + +> `optional` **aria-controls**: `string` + +Identifies the element (or elements) whose contents or presence are controlled by the current element. + +#### See + +aria-owns. + +#### Inherited from + +`ViewportComponentAttributes.aria-controls` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2642 + +*** + +### aria-current? + +> `optional` **aria-current**: `boolean` \| `"time"` \| `"page"` \| `"false"` \| `"true"` \| `"location"` \| `"date"` \| `"step"` + +Indicates the element that represents the current item within a container or set of related elements. + +#### Inherited from + +`ViewportComponentAttributes.aria-current` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2644 + +*** + +### aria-describedby? + +> `optional` **aria-describedby**: `string` + +Identifies the element (or elements) that describes the object. + +#### See + +aria-labelledby + +#### Inherited from + +`ViewportComponentAttributes.aria-describedby` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2649 + +*** + +### aria-description? + +> `optional` **aria-description**: `string` + +Defines a string value that describes or annotates the current element. + +#### See + +related aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-description` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2654 + +*** + +### aria-details? + +> `optional` **aria-details**: `string` + +Identifies the element that provides a detailed, extended description for the object. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-details` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2659 + +*** + +### aria-disabled? + +> `optional` **aria-disabled**: `Booleanish` + +Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + +#### See + + - aria-hidden + - aria-readonly. + +#### Inherited from + +`ViewportComponentAttributes.aria-disabled` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2664 + +*** + +### ~~aria-dropeffect?~~ + +> `optional` **aria-dropeffect**: `"copy"` \| `"none"` \| `"link"` \| `"move"` \| `"execute"` \| `"popup"` + +Indicates what functions can be performed when a dragged object is released on the drop target. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-dropeffect` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2669 + +*** + +### aria-errormessage? + +> `optional` **aria-errormessage**: `string` + +Identifies the element that provides an error message for the object. + +#### See + + - aria-invalid + - aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-errormessage` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2674 + +*** + +### aria-expanded? + +> `optional` **aria-expanded**: `Booleanish` + +Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. + +#### Inherited from + +`ViewportComponentAttributes.aria-expanded` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2676 + +*** + +### aria-flowto? + +> `optional` **aria-flowto**: `string` + +Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, +allows assistive technology to override the general default of reading in document source order. + +#### Inherited from + +`ViewportComponentAttributes.aria-flowto` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2681 + +*** + +### ~~aria-grabbed?~~ + +> `optional` **aria-grabbed**: `Booleanish` + +Indicates an element's "grabbed" state in a drag-and-drop operation. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-grabbed` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2686 + +*** + +### aria-haspopup? + +> `optional` **aria-haspopup**: `boolean` \| `"grid"` \| `"dialog"` \| `"menu"` \| `"listbox"` \| `"false"` \| `"true"` \| `"tree"` + +Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-haspopup` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2688 + +*** + +### aria-hidden? + +> `optional` **aria-hidden**: `Booleanish` + +Indicates whether the element is exposed to an accessibility API. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-hidden` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2693 + +*** + +### aria-invalid? + +> `optional` **aria-invalid**: `boolean` \| `"false"` \| `"true"` \| `"grammar"` \| `"spelling"` + +Indicates the entered value does not conform to the format expected by the application. + +#### See + +aria-errormessage. + +#### Inherited from + +`ViewportComponentAttributes.aria-invalid` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2698 + +*** + +### aria-keyshortcuts? + +> `optional` **aria-keyshortcuts**: `string` + +Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-keyshortcuts` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2700 + +*** + +### aria-label? + +> `optional` **aria-label**: `string` + +Defines a string value that labels the current element. + +#### See + +aria-labelledby. + +#### Inherited from + +`ViewportComponentAttributes.aria-label` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2705 + +*** + +### aria-labelledby? + +> `optional` **aria-labelledby**: `string` + +Identifies the element (or elements) that labels the current element. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-labelledby` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2710 + +*** + +### aria-level? + +> `optional` **aria-level**: `number` + +Defines the hierarchical level of an element within a structure. + +#### Inherited from + +`ViewportComponentAttributes.aria-level` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2712 + +*** + +### aria-live? + +> `optional` **aria-live**: `"off"` \| `"assertive"` \| `"polite"` + +Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. + +#### Inherited from + +`ViewportComponentAttributes.aria-live` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2714 + +*** + +### aria-modal? + +> `optional` **aria-modal**: `Booleanish` + +Indicates whether an element is modal when displayed. + +#### Inherited from + +`ViewportComponentAttributes.aria-modal` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2716 + +*** + +### aria-multiline? + +> `optional` **aria-multiline**: `Booleanish` + +Indicates whether a text box accepts multiple lines of input or only a single line. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiline` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2718 + +*** + +### aria-multiselectable? + +> `optional` **aria-multiselectable**: `Booleanish` + +Indicates that the user may select more than one item from the current selectable descendants. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiselectable` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2720 + +*** + +### aria-orientation? + +> `optional` **aria-orientation**: `"horizontal"` \| `"vertical"` + +Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. + +#### Inherited from + +`ViewportComponentAttributes.aria-orientation` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2722 + +*** + +### aria-owns? + +> `optional` **aria-owns**: `string` + +Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship +between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + +#### See + +aria-controls. + +#### Inherited from + +`ViewportComponentAttributes.aria-owns` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2728 + +*** + +### aria-placeholder? + +> `optional` **aria-placeholder**: `string` + +Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. +A hint could be a sample value or a brief description of the expected format. + +#### Inherited from + +`ViewportComponentAttributes.aria-placeholder` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2733 + +*** + +### aria-posinset? + +> `optional` **aria-posinset**: `number` + +Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-setsize. + +#### Inherited from + +`ViewportComponentAttributes.aria-posinset` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2738 + +*** + +### aria-pressed? + +> `optional` **aria-pressed**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "pressed" state of toggle buttons. + +#### See + + - aria-checked + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-pressed` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2743 + +*** + +### aria-readonly? + +> `optional` **aria-readonly**: `Booleanish` + +Indicates that the element is not editable, but is otherwise operable. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-readonly` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2748 + +*** + +### aria-relevant? + +> `optional` **aria-relevant**: `"text"` \| `"all"` \| `"additions"` \| `"additions removals"` \| `"additions text"` \| `"removals"` \| `"removals additions"` \| `"removals text"` \| `"text additions"` \| `"text removals"` + +Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + +#### See + +aria-atomic. + +#### Inherited from + +`ViewportComponentAttributes.aria-relevant` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2753 + +*** + +### aria-required? + +> `optional` **aria-required**: `Booleanish` + +Indicates that user input is required on the element before a form may be submitted. + +#### Inherited from + +`ViewportComponentAttributes.aria-required` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2766 + +*** + +### aria-roledescription? + +> `optional` **aria-roledescription**: `string` + +Defines a human-readable, author-localized description for the role of an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-roledescription` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2768 + +*** + +### aria-rowcount? + +> `optional` **aria-rowcount**: `number` + +Defines the total number of rows in a table, grid, or treegrid. + +#### See + +aria-rowindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowcount` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2773 + +*** + +### aria-rowindex? + +> `optional` **aria-rowindex**: `number` + +Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + +#### See + + - aria-rowcount + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowindex` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2778 + +*** + +### aria-rowindextext? + +> `optional` **aria-rowindextext**: `string` + +Defines a human readable text alternative of aria-rowindex. + +#### See + +aria-colindextext. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowindextext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2783 + +*** + +### aria-rowspan? + +> `optional` **aria-rowspan**: `number` + +Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-rowindex + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowspan` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2788 + +*** + +### aria-selected? + +> `optional` **aria-selected**: `Booleanish` + +Indicates the current "selected" state of various widgets. + +#### See + + - aria-checked + - aria-pressed. + +#### Inherited from + +`ViewportComponentAttributes.aria-selected` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2793 + +*** + +### aria-setsize? + +> `optional` **aria-setsize**: `number` + +Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-posinset. + +#### Inherited from + +`ViewportComponentAttributes.aria-setsize` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2798 + +*** + +### aria-sort? + +> `optional` **aria-sort**: `"none"` \| `"ascending"` \| `"descending"` \| `"other"` + +Indicates if items in a table or grid are sorted in ascending or descending order. + +#### Inherited from + +`ViewportComponentAttributes.aria-sort` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2800 + +*** + +### aria-valuemax? + +> `optional` **aria-valuemax**: `number` + +Defines the maximum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemax` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2802 + +*** + +### aria-valuemin? + +> `optional` **aria-valuemin**: `number` + +Defines the minimum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemin` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2804 + +*** + +### aria-valuenow? + +> `optional` **aria-valuenow**: `number` + +Defines the current value for a range widget. + +#### See + +aria-valuetext. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuenow` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2809 + +*** + +### aria-valuetext? + +> `optional` **aria-valuetext**: `string` + +Defines the human readable text alternative of aria-valuenow for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuetext` + +#### Defined in + +node\_modules/@types/react/index.d.ts:2811 diff --git a/docs/react/interfaces/VirtualizerHandle.md b/docs/react/interfaces/VirtualizerHandle.md new file mode 100644 index 000000000..4a351cc2f --- /dev/null +++ b/docs/react/interfaces/VirtualizerHandle.md @@ -0,0 +1,151 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VirtualizerHandle + +Methods of [Virtualizer](../functions/Virtualizer.md). + +## Extended by + +- [`VListHandle`](VListHandle.md) + +## Methods + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Defined in + +[src/react/Virtualizer.tsx:59](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L59) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:65](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L65) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:70](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L70) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:75](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L75) + +## Properties + +### cache + +> `readonly` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +Get current [CacheSnapshot](CacheSnapshot.md). + +#### Defined in + +[src/react/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L42) + +*** + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Defined in + +[src/react/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L46) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Defined in + +[src/react/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L50) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Defined in + +[src/react/Virtualizer.tsx:54](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L54) diff --git a/docs/react/interfaces/VirtualizerProps.md b/docs/react/interfaces/VirtualizerProps.md new file mode 100644 index 000000000..a1a38426c --- /dev/null +++ b/docs/react/interfaces/VirtualizerProps.md @@ -0,0 +1,252 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VirtualizerProps + +Props of [Virtualizer](../functions/Virtualizer.md). + +## Properties + +### children + +> **children**: `ReactNode` \| (`index`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> + +Elements rendered by this component. + +You can also pass a function and set [VirtualizerProps.count](VirtualizerProps.md#count) to create elements lazily. + +#### Defined in + +[src/react/Virtualizer.tsx:87](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L87) + +*** + +### count? + +> `optional` **count**: `number` + +If you set a function to [VirtualizerProps.children](VirtualizerProps.md#children), you have to set total number of items to this prop. + +#### Defined in + +[src/react/Virtualizer.tsx:91](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L91) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/react/Virtualizer.tsx:96](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L96) + +*** + +### keepMounted? + +> `optional` **keepMounted**: `number`[] + +List of indexes that should be always mounted, even when off screen. + +#### Defined in + +[src/react/Virtualizer.tsx:100](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L100) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/react/Virtualizer.tsx:107](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L107) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/react/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L111) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/react/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L115) + +*** + +### cache? + +> `optional` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +You can restore cache by passing a [CacheSnapshot](CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [VirtualizerHandle.cache](VirtualizerHandle.md#cache). + +**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** + +#### Defined in + +[src/react/Virtualizer.tsx:121](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L121) + +*** + +### startMargin? + +> `optional` **startMargin**: `number` + +If you put an element before virtualizer, you have to define its height with this prop. + +#### Defined in + +[src/react/Virtualizer.tsx:125](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L125) + +*** + +### ssrCount? + +> `optional` **ssrCount**: `number` + +A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. + +#### Defined in + +[src/react/Virtualizer.tsx:129](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L129) + +*** + +### as? + +> `optional` **as**: [`CustomContainerComponent`](../type-aliases/CustomContainerComponent.md) \| keyof IntrinsicElements + +Component or element type for container element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/react/Virtualizer.tsx:134](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L134) + +*** + +### item? + +> `optional` **item**: [`CustomItemComponent`](../type-aliases/CustomItemComponent.md) \| keyof IntrinsicElements + +Component or element type for item element. This component will get [CustomItemComponentProps](CustomItemComponentProps.md) as props. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/react/Virtualizer.tsx:139](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L139) + +*** + +### scrollRef? + +> `optional` **scrollRef**: `RefObject`\<`HTMLElement`\> + +Reference to the scrollable element. The default will get the parent element of virtualizer. + +#### Defined in + +[src/react/Virtualizer.tsx:143](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L143) + +*** + +### onScroll()? + +> `optional` **onScroll**: (`offset`) => `void` + +Callback invoked whenever scroll offset changes. + +#### Parameters + +• **offset**: `number` + +Current scrollTop or scrollLeft. + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:148](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L148) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:152](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L152) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Defined in + +[src/react/Virtualizer.tsx:156](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/Virtualizer.tsx#L156) diff --git a/docs/react/interfaces/WindowVirtualizerHandle.md b/docs/react/interfaces/WindowVirtualizerHandle.md new file mode 100644 index 000000000..40c574f6c --- /dev/null +++ b/docs/react/interfaces/WindowVirtualizerHandle.md @@ -0,0 +1,19 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: WindowVirtualizerHandle + +Methods of [WindowVirtualizer](../functions/WindowVirtualizer.md). + +## Properties + +### cache + +> `readonly` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +Get current [CacheSnapshot](CacheSnapshot.md). + +#### Defined in + +[src/react/WindowVirtualizer.tsx:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L38) diff --git a/docs/react/interfaces/WindowVirtualizerProps.md b/docs/react/interfaces/WindowVirtualizerProps.md new file mode 100644 index 000000000..7cb0f0293 --- /dev/null +++ b/docs/react/interfaces/WindowVirtualizerProps.md @@ -0,0 +1,194 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: WindowVirtualizerProps + +Props of [WindowVirtualizer](../functions/WindowVirtualizer.md). + +## Properties + +### children + +> **children**: `ReactNode` \| (`index`) => `ReactElement`\<`any`, string \| JSXElementConstructor\\> + +Elements rendered by this component. + +You can also pass a function and set [WindowVirtualizerProps.count](WindowVirtualizerProps.md#count) to create elements lazily. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:50](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L50) + +*** + +### count? + +> `optional` **count**: `number` + +If you set a function to [WindowVirtualizerProps.children](WindowVirtualizerProps.md#children), you have to set total number of items to this prop. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:54](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L54) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/react/WindowVirtualizer.tsx:59](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L59) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:66](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L66) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:70](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L70) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:74](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L74) + +*** + +### cache? + +> `optional` **cache**: [`CacheSnapshot`](CacheSnapshot.md) + +You can restore cache by passing a [CacheSnapshot](CacheSnapshot.md) on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from [WindowVirtualizerHandle.cache](WindowVirtualizerHandle.md#cache). + +**The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.** + +#### Defined in + +[src/react/WindowVirtualizer.tsx:80](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L80) + +*** + +### ssrCount? + +> `optional` **ssrCount**: `number` + +A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. + +#### Defined in + +[src/react/WindowVirtualizer.tsx:84](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L84) + +*** + +### as? + +> `optional` **as**: [`CustomContainerComponent`](../type-aliases/CustomContainerComponent.md) \| keyof IntrinsicElements + +Component or element type for container element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/react/WindowVirtualizer.tsx:89](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L89) + +*** + +### item? + +> `optional` **item**: [`CustomItemComponent`](../type-aliases/CustomItemComponent.md) \| keyof IntrinsicElements + +Component or element type for item element. This component will get [CustomItemComponentProps](CustomItemComponentProps.md) as props. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/react/WindowVirtualizer.tsx:94](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L94) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Defined in + +[src/react/WindowVirtualizer.tsx:98](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L98) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Defined in + +[src/react/WindowVirtualizer.tsx:102](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/WindowVirtualizer.tsx#L102) diff --git a/docs/react/type-aliases/CustomCellComponent.md b/docs/react/type-aliases/CustomCellComponent.md new file mode 100644 index 000000000..70cf303a9 --- /dev/null +++ b/docs/react/type-aliases/CustomCellComponent.md @@ -0,0 +1,11 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Type Alias: CustomCellComponent + +> **CustomCellComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomCellComponentProps`](../interfaces/CustomCellComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> + +## Defined in + +[src/react/VGrid.tsx:39](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/VGrid.tsx#L39) diff --git a/docs/react/type-aliases/CustomContainerComponent.md b/docs/react/type-aliases/CustomContainerComponent.md new file mode 100644 index 000000000..0084b547d --- /dev/null +++ b/docs/react/type-aliases/CustomContainerComponent.md @@ -0,0 +1,11 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Type Alias: CustomContainerComponent + +> **CustomContainerComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomContainerComponentProps`](../interfaces/CustomContainerComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> + +## Defined in + +[src/react/types.ts:14](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L14) diff --git a/docs/react/type-aliases/CustomItemComponent.md b/docs/react/type-aliases/CustomItemComponent.md new file mode 100644 index 000000000..31e2ea470 --- /dev/null +++ b/docs/react/type-aliases/CustomItemComponent.md @@ -0,0 +1,11 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Type Alias: CustomItemComponent + +> **CustomItemComponent**: `React.ForwardRefExoticComponent`\<`React.PropsWithoutRef`\<[`CustomItemComponentProps`](../interfaces/CustomItemComponentProps.md)\> & `React.RefAttributes`\<`any`\>\> + +## Defined in + +[src/react/types.ts:28](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L28) diff --git a/docs/react/type-aliases/ScrollToIndexAlign.md b/docs/react/type-aliases/ScrollToIndexAlign.md new file mode 100644 index 000000000..f300372a3 --- /dev/null +++ b/docs/react/type-aliases/ScrollToIndexAlign.md @@ -0,0 +1,11 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Type Alias: ScrollToIndexAlign + +> **ScrollToIndexAlign**: `"start"` \| `"center"` \| `"end"` \| `"nearest"` + +## Defined in + +[src/core/types.ts:19](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/core/types.ts#L19) diff --git a/docs/react/type-aliases/ViewportComponentAttributes.md b/docs/react/type-aliases/ViewportComponentAttributes.md new file mode 100644 index 000000000..ee9a5f21d --- /dev/null +++ b/docs/react/type-aliases/ViewportComponentAttributes.md @@ -0,0 +1,11 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Type Alias: ViewportComponentAttributes + +> **ViewportComponentAttributes**: `Pick`\<`React.HTMLAttributes`\<`HTMLElement`\>, `"className"` \| `"style"` \| `"id"` \| `"role"` \| `"tabIndex"` \| `"onKeyDown"`\> & `React.AriaAttributes` + +## Defined in + +[src/react/types.ts:3](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/react/types.ts#L3) diff --git a/docs/solid/API.md b/docs/solid/API.md new file mode 100644 index 000000000..4bf340cf8 --- /dev/null +++ b/docs/solid/API.md @@ -0,0 +1,21 @@ +[**API**](../API.md) • **Docs** + +*** + +# solid + +## Index + +### Functions + +- [VList](functions/VList.md) +- [Virtualizer](functions/Virtualizer.md) +- [WindowVirtualizer](functions/WindowVirtualizer.md) + +### Interfaces + +- [VListProps](interfaces/VListProps.md) +- [VListHandle](interfaces/VListHandle.md) +- [VirtualizerProps](interfaces/VirtualizerProps.md) +- [VirtualizerHandle](interfaces/VirtualizerHandle.md) +- [WindowVirtualizerProps](interfaces/WindowVirtualizerProps.md) diff --git a/docs/solid/functions/VList.md b/docs/solid/functions/VList.md new file mode 100644 index 000000000..75ec13d16 --- /dev/null +++ b/docs/solid/functions/VList.md @@ -0,0 +1,25 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: VList() + +> **VList**\<`T`\>(`props`): `Element` + +Virtualized list component. See [VListProps](../interfaces/VListProps.md) and [VListHandle](../interfaces/VListHandle.md). + +## Type Parameters + +• **T** + +## Parameters + +• **props**: [`VListProps`](../interfaces/VListProps.md)\<`T`\> + +## Returns + +`Element` + +## Defined in + +[src/solid/VList.tsx:39](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/VList.tsx#L39) diff --git a/docs/solid/functions/Virtualizer.md b/docs/solid/functions/Virtualizer.md new file mode 100644 index 000000000..ffdbfaf27 --- /dev/null +++ b/docs/solid/functions/Virtualizer.md @@ -0,0 +1,25 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: Virtualizer() + +> **Virtualizer**\<`T`\>(`props`): `Element` + +Customizable list virtualizer for advanced usage. See [VirtualizerProps](../interfaces/VirtualizerProps.md) and [VirtualizerHandle](../interfaces/VirtualizerHandle.md). + +## Type Parameters + +• **T** + +## Parameters + +• **props**: [`VirtualizerProps`](../interfaces/VirtualizerProps.md)\<`T`\> + +## Returns + +`Element` + +## Defined in + +[src/solid/Virtualizer.tsx:155](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L155) diff --git a/docs/solid/functions/WindowVirtualizer.md b/docs/solid/functions/WindowVirtualizer.md new file mode 100644 index 000000000..595b8c012 --- /dev/null +++ b/docs/solid/functions/WindowVirtualizer.md @@ -0,0 +1,25 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Function: WindowVirtualizer() + +> **WindowVirtualizer**\<`T`\>(`props`): `Element` + +[Virtualizer](Virtualizer.md) controlled by the window scrolling. See [WindowVirtualizerProps](../interfaces/WindowVirtualizerProps.md) and [WindowVirtualizer](WindowVirtualizer.md). + +## Type Parameters + +• **T** + +## Parameters + +• **props**: [`WindowVirtualizerProps`](../interfaces/WindowVirtualizerProps.md)\<`T`\> + +## Returns + +`Element` + +## Defined in + +[src/solid/WindowVirtualizer.tsx:92](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L92) diff --git a/docs/solid/interfaces/VListHandle.md b/docs/solid/interfaces/VListHandle.md new file mode 100644 index 000000000..ddd4c3fb5 --- /dev/null +++ b/docs/solid/interfaces/VListHandle.md @@ -0,0 +1,167 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VListHandle + +Methods of [VList](../functions/VList.md). + +## Extends + +- [`VirtualizerHandle`](VirtualizerHandle.md) + +## Methods + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`getItemOffset`](VirtualizerHandle.md#getitemoffset) + +#### Defined in + +[src/solid/Virtualizer.tsx:55](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L55) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](../../react/interfaces/ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollToIndex`](VirtualizerHandle.md#scrolltoindex) + +#### Defined in + +[src/solid/Virtualizer.tsx:61](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L61) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollTo`](VirtualizerHandle.md#scrollto) + +#### Defined in + +[src/solid/Virtualizer.tsx:66](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L66) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollBy`](VirtualizerHandle.md#scrollby) + +#### Defined in + +[src/solid/Virtualizer.tsx:71](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L71) + +## Properties + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollOffset`](VirtualizerHandle.md#scrolloffset) + +#### Defined in + +[src/solid/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L42) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`scrollSize`](VirtualizerHandle.md#scrollsize) + +#### Defined in + +[src/solid/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L46) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Inherited from + +[`VirtualizerHandle`](VirtualizerHandle.md).[`viewportSize`](VirtualizerHandle.md#viewportsize) + +#### Defined in + +[src/solid/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L50) diff --git a/docs/solid/interfaces/VListProps.md b/docs/solid/interfaces/VListProps.md new file mode 100644 index 000000000..93e23acd4 --- /dev/null +++ b/docs/solid/interfaces/VListProps.md @@ -0,0 +1,1199 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VListProps\ + +Props of [VList](../functions/VList.md). + +## Extends + +- `Pick`\<[`VirtualizerProps`](VirtualizerProps.md)\<`T`\>, `"ref"` \| `"data"` \| `"children"` \| `"overscan"` \| `"itemSize"` \| `"shift"` \| `"horizontal"` \| `"onScroll"` \| `"onScrollEnd"` \| `"onRangeChange"`\>.`ViewportComponentAttributes` + +## Type Parameters + +• **T** + +## Properties + +### children() + +> **children**: (`data`, `index`) => `Element` + +The elements renderer function. + +#### Parameters + +• **data**: `T` + +• **index**: `number` + +#### Returns + +`Element` + +#### Inherited from + +`Pick.children` + +#### Defined in + +[src/solid/Virtualizer.tsx:89](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L89) + +*** + +### onScroll()? + +> `optional` **onScroll**: (`offset`) => `void` + +Callback invoked whenever scroll offset changes. + +#### Parameters + +• **offset**: `number` + +Current scrollTop or scrollLeft. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onScroll` + +#### Defined in + +[src/solid/Virtualizer.tsx:132](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L132) + +*** + +### ref()? + +> `optional` **ref**: (`handle`?) => `void` + +Get reference to [VirtualizerHandle](VirtualizerHandle.md). + +#### Parameters + +• **handle?**: [`VirtualizerHandle`](VirtualizerHandle.md) + +#### Returns + +`void` + +#### Inherited from + +`Pick.ref` + +#### Defined in + +[src/solid/Virtualizer.tsx:81](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L81) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Inherited from + +`Pick.shift` + +#### Defined in + +[src/solid/Virtualizer.tsx:119](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L119) + +*** + +### data + +> **data**: `T`[] + +The data items rendered by this component. + +#### Inherited from + +`Pick.data` + +#### Defined in + +[src/solid/Virtualizer.tsx:85](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L85) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Inherited from + +`Pick.overscan` + +#### Defined in + +[src/solid/Virtualizer.tsx:94](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L94) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Inherited from + +`Pick.itemSize` + +#### Defined in + +[src/solid/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L115) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Inherited from + +`Pick.horizontal` + +#### Defined in + +[src/solid/Virtualizer.tsx:123](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L123) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onScrollEnd` + +#### Defined in + +[src/solid/Virtualizer.tsx:136](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L136) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Inherited from + +`Pick.onRangeChange` + +#### Defined in + +[src/solid/Virtualizer.tsx:140](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L140) + +*** + +### id? + +> `optional` **id**: `string` + +#### Inherited from + +`ViewportComponentAttributes.id` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:728 + +*** + +### role? + +> `optional` **role**: `"grid"` \| `"table"` \| `"none"` \| `"search"` \| `"link"` \| `"article"` \| `"button"` \| `"dialog"` \| `"figure"` \| `"form"` \| `"img"` \| `"main"` \| `"menu"` \| `"menuitem"` \| `"meter"` \| `"option"` \| `"switch"` \| `"row"` \| `"checkbox"` \| `"listbox"` \| `"radio"` \| `"region"` \| `"cell"` \| `"listitem"` \| `"menubar"` \| `"progressbar"` \| `"separator"` \| `"tab"` \| `"tabpanel"` \| `"toolbar"` \| `"tooltip"` \| `"treeitem"` \| `"scrollbar"` \| `"alert"` \| `"alertdialog"` \| `"application"` \| `"banner"` \| `"columnheader"` \| `"combobox"` \| `"complementary"` \| `"contentinfo"` \| `"definition"` \| `"directory"` \| `"document"` \| `"feed"` \| `"gridcell"` \| `"group"` \| `"heading"` \| `"list"` \| `"log"` \| `"marquee"` \| `"math"` \| `"menuitemcheckbox"` \| `"menuitemradio"` \| `"navigation"` \| `"note"` \| `"presentation"` \| `"radiogroup"` \| `"rowgroup"` \| `"rowheader"` \| `"searchbox"` \| `"slider"` \| `"spinbutton"` \| `"status"` \| `"tablist"` \| `"term"` \| `"textbox"` \| `"timer"` \| `"tree"` \| `"treegrid"` + +#### Inherited from + +`ViewportComponentAttributes.role` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:638 + +*** + +### tabIndex? + +> `optional` **tabIndex**: `string` \| `number` + +#### Inherited from + +`ViewportComponentAttributes.tabIndex` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:758 + +*** + +### onKeyDown? + +> `optional` **onKeyDown**: `EventHandlerUnion`\<`HTMLElement`, `KeyboardEvent`\> + +#### Inherited from + +`ViewportComponentAttributes.onKeyDown` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:247 + +*** + +### class? + +> `optional` **class**: `string` + +#### Inherited from + +`ViewportComponentAttributes.class` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:722 + +*** + +### aria-activedescendant? + +> `optional` **aria-activedescendant**: `string` + +Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. + +#### Inherited from + +`ViewportComponentAttributes.aria-activedescendant` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:445 + +*** + +### aria-atomic? + +> `optional` **aria-atomic**: `boolean` \| `"false"` \| `"true"` + +Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. + +#### Inherited from + +`ViewportComponentAttributes.aria-atomic` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:447 + +*** + +### aria-autocomplete? + +> `optional` **aria-autocomplete**: `"inline"` \| `"none"` \| `"both"` \| `"list"` + +Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be +presented if they are made. + +#### Inherited from + +`ViewportComponentAttributes.aria-autocomplete` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:452 + +*** + +### aria-busy? + +> `optional` **aria-busy**: `boolean` \| `"false"` \| `"true"` + +Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. + +#### Inherited from + +`ViewportComponentAttributes.aria-busy` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:454 + +*** + +### aria-checked? + +> `optional` **aria-checked**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + +#### See + + - aria-pressed + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-checked` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:459 + +*** + +### aria-colcount? + +> `optional` **aria-colcount**: `string` \| `number` + +Defines the total number of columns in a table, grid, or treegrid. + +#### See + +aria-colindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-colcount` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:464 + +*** + +### aria-colindex? + +> `optional` **aria-colindex**: `string` \| `number` + +Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + +#### See + + - aria-colcount + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colindex` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:469 + +*** + +### aria-colspan? + +> `optional` **aria-colspan**: `string` \| `number` + +Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-colindex + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-colspan` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:474 + +*** + +### aria-controls? + +> `optional` **aria-controls**: `string` + +Identifies the element (or elements) whose contents or presence are controlled by the current element. + +#### See + +aria-owns. + +#### Inherited from + +`ViewportComponentAttributes.aria-controls` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:479 + +*** + +### aria-current? + +> `optional` **aria-current**: `boolean` \| `"time"` \| `"page"` \| `"false"` \| `"true"` \| `"location"` \| `"date"` \| `"step"` + +Indicates the element that represents the current item within a container or set of related elements. + +#### Inherited from + +`ViewportComponentAttributes.aria-current` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:481 + +*** + +### aria-describedby? + +> `optional` **aria-describedby**: `string` + +Identifies the element (or elements) that describes the object. + +#### See + +aria-labelledby + +#### Inherited from + +`ViewportComponentAttributes.aria-describedby` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:486 + +*** + +### aria-details? + +> `optional` **aria-details**: `string` + +Identifies the element that provides a detailed, extended description for the object. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-details` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:491 + +*** + +### aria-disabled? + +> `optional` **aria-disabled**: `boolean` \| `"false"` \| `"true"` + +Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + +#### See + + - aria-hidden + - aria-readonly. + +#### Inherited from + +`ViewportComponentAttributes.aria-disabled` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:496 + +*** + +### ~~aria-dropeffect?~~ + +> `optional` **aria-dropeffect**: `"copy"` \| `"none"` \| `"link"` \| `"move"` \| `"execute"` \| `"popup"` + +Indicates what functions can be performed when a dragged object is released on the drop target. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-dropeffect` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:501 + +*** + +### aria-errormessage? + +> `optional` **aria-errormessage**: `string` + +Identifies the element that provides an error message for the object. + +#### See + + - aria-invalid + - aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-errormessage` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:506 + +*** + +### aria-expanded? + +> `optional` **aria-expanded**: `boolean` \| `"false"` \| `"true"` + +Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. + +#### Inherited from + +`ViewportComponentAttributes.aria-expanded` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:508 + +*** + +### aria-flowto? + +> `optional` **aria-flowto**: `string` + +Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, +allows assistive technology to override the general default of reading in document source order. + +#### Inherited from + +`ViewportComponentAttributes.aria-flowto` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:513 + +*** + +### ~~aria-grabbed?~~ + +> `optional` **aria-grabbed**: `boolean` \| `"false"` \| `"true"` + +Indicates an element's "grabbed" state in a drag-and-drop operation. + +#### Deprecated + +in ARIA 1.1 + +#### Inherited from + +`ViewportComponentAttributes.aria-grabbed` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:518 + +*** + +### aria-haspopup? + +> `optional` **aria-haspopup**: `boolean` \| `"grid"` \| `"dialog"` \| `"menu"` \| `"listbox"` \| `"false"` \| `"true"` \| `"tree"` + +Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-haspopup` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:520 + +*** + +### aria-hidden? + +> `optional` **aria-hidden**: `boolean` \| `"false"` \| `"true"` + +Indicates whether the element is exposed to an accessibility API. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-hidden` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:525 + +*** + +### aria-invalid? + +> `optional` **aria-invalid**: `boolean` \| `"false"` \| `"true"` \| `"grammar"` \| `"spelling"` + +Indicates the entered value does not conform to the format expected by the application. + +#### See + +aria-errormessage. + +#### Inherited from + +`ViewportComponentAttributes.aria-invalid` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:530 + +*** + +### aria-keyshortcuts? + +> `optional` **aria-keyshortcuts**: `string` + +Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-keyshortcuts` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:532 + +*** + +### aria-label? + +> `optional` **aria-label**: `string` + +Defines a string value that labels the current element. + +#### See + +aria-labelledby. + +#### Inherited from + +`ViewportComponentAttributes.aria-label` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:537 + +*** + +### aria-labelledby? + +> `optional` **aria-labelledby**: `string` + +Identifies the element (or elements) that labels the current element. + +#### See + +aria-describedby. + +#### Inherited from + +`ViewportComponentAttributes.aria-labelledby` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:542 + +*** + +### aria-level? + +> `optional` **aria-level**: `string` \| `number` + +Defines the hierarchical level of an element within a structure. + +#### Inherited from + +`ViewportComponentAttributes.aria-level` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:544 + +*** + +### aria-live? + +> `optional` **aria-live**: `"off"` \| `"assertive"` \| `"polite"` + +Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. + +#### Inherited from + +`ViewportComponentAttributes.aria-live` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:546 + +*** + +### aria-modal? + +> `optional` **aria-modal**: `boolean` \| `"false"` \| `"true"` + +Indicates whether an element is modal when displayed. + +#### Inherited from + +`ViewportComponentAttributes.aria-modal` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:548 + +*** + +### aria-multiline? + +> `optional` **aria-multiline**: `boolean` \| `"false"` \| `"true"` + +Indicates whether a text box accepts multiple lines of input or only a single line. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiline` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:550 + +*** + +### aria-multiselectable? + +> `optional` **aria-multiselectable**: `boolean` \| `"false"` \| `"true"` + +Indicates that the user may select more than one item from the current selectable descendants. + +#### Inherited from + +`ViewportComponentAttributes.aria-multiselectable` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:552 + +*** + +### aria-orientation? + +> `optional` **aria-orientation**: `"horizontal"` \| `"vertical"` + +Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. + +#### Inherited from + +`ViewportComponentAttributes.aria-orientation` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:554 + +*** + +### aria-owns? + +> `optional` **aria-owns**: `string` + +Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship +between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + +#### See + +aria-controls. + +#### Inherited from + +`ViewportComponentAttributes.aria-owns` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:560 + +*** + +### aria-placeholder? + +> `optional` **aria-placeholder**: `string` + +Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. +A hint could be a sample value or a brief description of the expected format. + +#### Inherited from + +`ViewportComponentAttributes.aria-placeholder` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:565 + +*** + +### aria-posinset? + +> `optional` **aria-posinset**: `string` \| `number` + +Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-setsize. + +#### Inherited from + +`ViewportComponentAttributes.aria-posinset` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:570 + +*** + +### aria-pressed? + +> `optional` **aria-pressed**: `boolean` \| `"mixed"` \| `"false"` \| `"true"` + +Indicates the current "pressed" state of toggle buttons. + +#### See + + - aria-checked + - aria-selected. + +#### Inherited from + +`ViewportComponentAttributes.aria-pressed` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:575 + +*** + +### aria-readonly? + +> `optional` **aria-readonly**: `boolean` \| `"false"` \| `"true"` + +Indicates that the element is not editable, but is otherwise operable. + +#### See + +aria-disabled. + +#### Inherited from + +`ViewportComponentAttributes.aria-readonly` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:580 + +*** + +### aria-relevant? + +> `optional` **aria-relevant**: `"text"` \| `"all"` \| `"additions"` \| `"additions removals"` \| `"additions text"` \| `"removals"` \| `"removals additions"` \| `"removals text"` \| `"text additions"` \| `"text removals"` + +Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + +#### See + +aria-atomic. + +#### Inherited from + +`ViewportComponentAttributes.aria-relevant` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:585 + +*** + +### aria-required? + +> `optional` **aria-required**: `boolean` \| `"false"` \| `"true"` + +Indicates that user input is required on the element before a form may be submitted. + +#### Inherited from + +`ViewportComponentAttributes.aria-required` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:597 + +*** + +### aria-roledescription? + +> `optional` **aria-roledescription**: `string` + +Defines a human-readable, author-localized description for the role of an element. + +#### Inherited from + +`ViewportComponentAttributes.aria-roledescription` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:599 + +*** + +### aria-rowcount? + +> `optional` **aria-rowcount**: `string` \| `number` + +Defines the total number of rows in a table, grid, or treegrid. + +#### See + +aria-rowindex. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowcount` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:604 + +*** + +### aria-rowindex? + +> `optional` **aria-rowindex**: `string` \| `number` + +Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + +#### See + + - aria-rowcount + - aria-rowspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowindex` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:609 + +*** + +### aria-rowspan? + +> `optional` **aria-rowspan**: `string` \| `number` + +Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + +#### See + + - aria-rowindex + - aria-colspan. + +#### Inherited from + +`ViewportComponentAttributes.aria-rowspan` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:614 + +*** + +### aria-selected? + +> `optional` **aria-selected**: `boolean` \| `"false"` \| `"true"` + +Indicates the current "selected" state of various widgets. + +#### See + + - aria-checked + - aria-pressed. + +#### Inherited from + +`ViewportComponentAttributes.aria-selected` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:619 + +*** + +### aria-setsize? + +> `optional` **aria-setsize**: `string` \| `number` + +Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + +#### See + +aria-posinset. + +#### Inherited from + +`ViewportComponentAttributes.aria-setsize` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:624 + +*** + +### aria-sort? + +> `optional` **aria-sort**: `"none"` \| `"ascending"` \| `"descending"` \| `"other"` + +Indicates if items in a table or grid are sorted in ascending or descending order. + +#### Inherited from + +`ViewportComponentAttributes.aria-sort` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:626 + +*** + +### aria-valuemax? + +> `optional` **aria-valuemax**: `string` \| `number` + +Defines the maximum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemax` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:628 + +*** + +### aria-valuemin? + +> `optional` **aria-valuemin**: `string` \| `number` + +Defines the minimum allowed value for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuemin` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:630 + +*** + +### aria-valuenow? + +> `optional` **aria-valuenow**: `string` \| `number` + +Defines the current value for a range widget. + +#### See + +aria-valuetext. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuenow` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:635 + +*** + +### aria-valuetext? + +> `optional` **aria-valuetext**: `string` + +Defines the human readable text alternative of aria-valuenow for a range widget. + +#### Inherited from + +`ViewportComponentAttributes.aria-valuetext` + +#### Defined in + +node\_modules/solid-js/types/jsx.d.ts:637 + +*** + +### style? + +> `optional` **style**: `CSSProperties` + +#### Inherited from + +`ViewportComponentAttributes.style` + +#### Defined in + +[src/solid/types.ts:7](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/types.ts#L7) diff --git a/docs/solid/interfaces/VirtualizerHandle.md b/docs/solid/interfaces/VirtualizerHandle.md new file mode 100644 index 000000000..501cceb5b --- /dev/null +++ b/docs/solid/interfaces/VirtualizerHandle.md @@ -0,0 +1,139 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VirtualizerHandle + +Methods of [Virtualizer](../functions/Virtualizer.md). + +## Extended by + +- [`VListHandle`](VListHandle.md) + +## Methods + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Defined in + +[src/solid/Virtualizer.tsx:55](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L55) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](../../react/interfaces/ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:61](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L61) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:66](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L66) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:71](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L71) + +## Properties + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Defined in + +[src/solid/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L42) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Defined in + +[src/solid/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L46) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Defined in + +[src/solid/Virtualizer.tsx:50](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L50) diff --git a/docs/solid/interfaces/VirtualizerProps.md b/docs/solid/interfaces/VirtualizerProps.md new file mode 100644 index 000000000..494aadf27 --- /dev/null +++ b/docs/solid/interfaces/VirtualizerProps.md @@ -0,0 +1,246 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: VirtualizerProps\ + +Props of [Virtualizer](../functions/Virtualizer.md). + +## Type Parameters + +• **T** + +## Properties + +### ref()? + +> `optional` **ref**: (`handle`?) => `void` + +Get reference to [VirtualizerHandle](VirtualizerHandle.md). + +#### Parameters + +• **handle?**: [`VirtualizerHandle`](VirtualizerHandle.md) + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:81](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L81) + +*** + +### data + +> **data**: `T`[] + +The data items rendered by this component. + +#### Defined in + +[src/solid/Virtualizer.tsx:85](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L85) + +*** + +### children() + +> **children**: (`data`, `index`) => `Element` + +The elements renderer function. + +#### Parameters + +• **data**: `T` + +• **index**: `number` + +#### Returns + +`Element` + +#### Defined in + +[src/solid/Virtualizer.tsx:89](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L89) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/solid/Virtualizer.tsx:94](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L94) + +*** + +### as? + +> `optional` **as**: `ValidComponent` + +Component or element type for container element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/solid/Virtualizer.tsx:99](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L99) + +*** + +### item? + +> `optional` **item**: `ValidComponent` + +Component or element type for item element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/solid/Virtualizer.tsx:104](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L104) + +*** + +### scrollRef? + +> `optional` **scrollRef**: `HTMLElement` + +Reference to the scrollable element. The default will get the parent element of virtualizer. + +#### Defined in + +[src/solid/Virtualizer.tsx:108](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L108) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/solid/Virtualizer.tsx:115](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L115) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/solid/Virtualizer.tsx:119](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L119) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/solid/Virtualizer.tsx:123](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L123) + +*** + +### startMargin? + +> `optional` **startMargin**: `number` + +If you put an element before virtualizer, you have to define its height with this prop. + +#### Defined in + +[src/solid/Virtualizer.tsx:127](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L127) + +*** + +### onScroll()? + +> `optional` **onScroll**: (`offset`) => `void` + +Callback invoked whenever scroll offset changes. + +#### Parameters + +• **offset**: `number` + +Current scrollTop or scrollLeft. + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:132](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L132) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:136](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L136) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Defined in + +[src/solid/Virtualizer.tsx:140](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/Virtualizer.tsx#L140) diff --git a/docs/solid/interfaces/WindowVirtualizerProps.md b/docs/solid/interfaces/WindowVirtualizerProps.md new file mode 100644 index 000000000..813b07201 --- /dev/null +++ b/docs/solid/interfaces/WindowVirtualizerProps.md @@ -0,0 +1,144 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Interface: WindowVirtualizerProps\ + +Props of [WindowVirtualizer](../functions/WindowVirtualizer.md). + +## Type Parameters + +• **T** + +## Properties + +### data + +> **data**: `T`[] + +The data items rendered by this component. + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:45](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L45) + +*** + +### children() + +> **children**: (`data`, `index`) => `Element` + +The elements renderer function. + +#### Parameters + +• **data**: `T` + +• **index**: `number` + +#### Returns + +`Element` + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:49](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L49) + +*** + +### overscan? + +> `optional` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:54](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L54) + +*** + +### itemSize? + +> `optional` **itemSize**: `number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:61](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L61) + +*** + +### shift? + +> `optional` **shift**: `boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:65](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L65) + +*** + +### horizontal? + +> `optional` **horizontal**: `boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:69](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L69) + +*** + +### onScrollEnd()? + +> `optional` **onScrollEnd**: () => `void` + +Callback invoked when scrolling stops. + +#### Returns + +`void` + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:73](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L73) + +*** + +### onRangeChange()? + +> `optional` **onRangeChange**: (`startIndex`, `endIndex`) => `void` + +Callback invoked when visible items range changes. + +#### Parameters + +• **startIndex**: `number` + +The start index of viewable items. + +• **endIndex**: `number` + +The end index of viewable items. + +#### Returns + +`void` + +#### Defined in + +[src/solid/WindowVirtualizer.tsx:77](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/solid/WindowVirtualizer.tsx#L77) diff --git a/docs/vue/API.md b/docs/vue/API.md new file mode 100644 index 000000000..6559e7ea3 --- /dev/null +++ b/docs/vue/API.md @@ -0,0 +1,13 @@ +[**API**](../API.md) • **Docs** + +*** + +# vue + +## Index + +### Classes + +- [VList](classes/VList.md) +- [Virtualizer](classes/Virtualizer.md) +- [WindowVirtualizer](classes/WindowVirtualizer.md) diff --git a/docs/vue/classes/VList.md b/docs/vue/classes/VList.md new file mode 100644 index 000000000..12ec2d8b6 --- /dev/null +++ b/docs/vue/classes/VList.md @@ -0,0 +1,414 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Class: VList + +## Methods + +### $watch() + +> **$watch**\<`T`\>(`source`, `cb`, `options`?): `WatchStopHandle` + +#### Type Parameters + +• **T** *extends* `string` \| (...`args`) => `any` + +#### Parameters + +• **source**: `T` + +• **cb**: `T` *extends* (...`args`) => `R` ? (...`args`) => `any` : (...`args`) => `any` + +• **options?**: `WatchOptions`\<`boolean`\> + +#### Returns + +`WatchStopHandle` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 + +*** + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Defined in + +[src/vue/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L51) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](../../react/interfaces/ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:57](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L57) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L62) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L67) + +## Properties + +### $ + +> **$**: `ComponentInternalInstance` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 + +*** + +### $data + +> **$data**: `object` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 + +*** + +### $props + +> **$props**: `Partial`\<`object`\> & `Omit`\<`object` & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<`object`\>\> & `object`, `DefaultKeys`\<`object`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 + +*** + +### $attrs + +> **$attrs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 + +*** + +### $refs + +> **$refs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 + +*** + +### $slots + +> **$slots**: `Readonly`\<`object`\> + +#### Type declaration + +##### default + +> **default**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 + +*** + +### $root + +> **$root**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 + +*** + +### $parent + +> **$parent**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 + +*** + +### $emit + +> **$emit**: (`event`, ...`args`) => `void` & (`event`, ...`args`) => `void` & (`event`, ...`args`) => `void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 + +*** + +### $el + +> **$el**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 + +*** + +### $options + +> **$options**: `ComponentOptionsBase`\<`ResolveProps`\<`object`, `object`\>, `VListHandle`, `object`, `object`, `object`, `ComponentOptionsMixin`, `ComponentOptionsMixin`, `object`, `string`, `object`, `object`, `string`, `SlotsType`\<`object`\>\> & `MergedComponentOptionsOverride` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 + +*** + +### $forceUpdate() + +> **$forceUpdate**: () => `void` + +#### Returns + +`void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 + +*** + +### $nextTick() + +> **$nextTick**: \<`T`, `R`\>(`this`, `fn`?) => `Promise`\<`Awaited`\<`R`\>\> + +#### Type Parameters + +• **T** = `void` + +• **R** = `void` + +#### Parameters + +• **this**: `T` + +• **fn?** + +#### Returns + +`Promise`\<`Awaited`\<`R`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 + +*** + +### onScroll + +> **onScroll**: `undefined` \| (...`args`) => `any` + +*** + +### shift + +> `readonly` **shift**: `boolean` = `Boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/vue/VList.tsx:34](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L34) + +*** + +### data + +> `readonly` **data**: `unknown`[] + +The data items rendered by this component. + +#### Defined in + +[src/vue/VList.tsx:18](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L18) + +*** + +### overscan + +> `readonly` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/vue/VList.tsx:23](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L23) + +*** + +### itemSize? + +> `readonly` `optional` **itemSize**: `number` = `Number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/vue/VList.tsx:30](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L30) + +*** + +### horizontal + +> `readonly` **horizontal**: `boolean` = `Boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/vue/VList.tsx:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L38) + +*** + +### ssrCount? + +> `readonly` `optional` **ssrCount**: `number` = `Number` + +A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. + +#### Defined in + +[src/vue/VList.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/VList.tsx#L42) + +*** + +### onScrollEnd + +> **onScrollEnd**: `undefined` \| (...`args`) => `any` + +*** + +### onRangeChange + +> **onRangeChange**: `undefined` \| (...`args`) => `any` + +*** + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Defined in + +[src/vue/Virtualizer.tsx:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L38) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Defined in + +[src/vue/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L42) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Defined in + +[src/vue/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L46) diff --git a/docs/vue/classes/Virtualizer.md b/docs/vue/classes/Virtualizer.md new file mode 100644 index 000000000..b8ffe1317 --- /dev/null +++ b/docs/vue/classes/Virtualizer.md @@ -0,0 +1,474 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Class: Virtualizer + +## Methods + +### $watch() + +> **$watch**\<`T`\>(`source`, `cb`, `options`?): `WatchStopHandle` + +#### Type Parameters + +• **T** *extends* `string` \| (...`args`) => `any` + +#### Parameters + +• **source**: `T` + +• **cb**: `T` *extends* (...`args`) => `R` ? (...`args`) => `any` : (...`args`) => `any` + +• **options?**: `WatchOptions`\<`boolean`\> + +#### Returns + +`WatchStopHandle` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 + +*** + +### getItemOffset() + +> **getItemOffset**(`index`): `number` + +Get item offset from start. + +#### Parameters + +• **index**: `number` + +index of item + +#### Returns + +`number` + +#### Defined in + +[src/vue/Virtualizer.tsx:51](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L51) + +*** + +### scrollToIndex() + +> **scrollToIndex**(`index`, `opts`?): `void` + +Scroll to the item specified by index. + +#### Parameters + +• **index**: `number` + +index of item + +• **opts?**: [`ScrollToIndexOpts`](../../react/interfaces/ScrollToIndexOpts.md) + +options + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:57](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L57) + +*** + +### scrollTo() + +> **scrollTo**(`offset`): `void` + +Scroll to the given offset. + +#### Parameters + +• **offset**: `number` + +offset from start + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:62](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L62) + +*** + +### scrollBy() + +> **scrollBy**(`offset`): `void` + +Scroll by the given offset. + +#### Parameters + +• **offset**: `number` + +offset from current position + +#### Returns + +`void` + +#### Defined in + +[src/vue/Virtualizer.tsx:67](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L67) + +## Properties + +### $ + +> **$**: `ComponentInternalInstance` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 + +*** + +### $data + +> **$data**: `object` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 + +*** + +### $props + +> **$props**: `Partial`\<`object`\> & `Omit`\<`object` & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<`object`\>\> & `object`, `DefaultKeys`\<`object`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 + +*** + +### $attrs + +> **$attrs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 + +*** + +### $refs + +> **$refs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 + +*** + +### $slots + +> **$slots**: `Readonly`\<`object`\> + +#### Type declaration + +##### default + +> **default**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 + +*** + +### $root + +> **$root**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 + +*** + +### $parent + +> **$parent**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 + +*** + +### $emit + +> **$emit**: (`event`, ...`args`) => `void` & (`event`, ...`args`) => `void` & (`event`, ...`args`) => `void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 + +*** + +### $el + +> **$el**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 + +*** + +### $options + +> **$options**: `ComponentOptionsBase`\<`ResolveProps`\<`object`, `object`\>, `VirtualizerHandle`, `object`, `object`, `object`, `ComponentOptionsMixin`, `ComponentOptionsMixin`, `object`, `string`, `object`, `object`, `string`, `SlotsType`\<`object`\>\> & `MergedComponentOptionsOverride` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 + +*** + +### $forceUpdate() + +> **$forceUpdate**: () => `void` + +#### Returns + +`void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 + +*** + +### $nextTick() + +> **$nextTick**: \<`T`, `R`\>(`this`, `fn`?) => `Promise`\<`Awaited`\<`R`\>\> + +#### Type Parameters + +• **T** = `void` + +• **R** = `void` + +#### Parameters + +• **this**: `T` + +• **fn?** + +#### Returns + +`Promise`\<`Awaited`\<`R`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 + +*** + +### onScroll + +> **onScroll**: `undefined` \| (...`args`) => `any` + +*** + +### shift + +> `readonly` **shift**: `boolean` = `Boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/vue/Virtualizer.tsx:90](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L90) + +*** + +### data + +> `readonly` **data**: `unknown`[] + +The data items rendered by this component. + +#### Defined in + +[src/vue/Virtualizer.tsx:74](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L74) + +*** + +### overscan + +> `readonly` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/vue/Virtualizer.tsx:79](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L79) + +*** + +### itemSize? + +> `readonly` `optional` **itemSize**: `number` = `Number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/vue/Virtualizer.tsx:86](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L86) + +*** + +### horizontal + +> `readonly` **horizontal**: `boolean` = `Boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/vue/Virtualizer.tsx:94](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L94) + +*** + +### startMargin + +> `readonly` **startMargin**: `number` + +If you put an element before virtualizer, you have to define its height with this prop. + +#### Defined in + +[src/vue/Virtualizer.tsx:98](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L98) + +*** + +### ssrCount? + +> `readonly` `optional` **ssrCount**: `number` = `Number` + +A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. + +#### Defined in + +[src/vue/Virtualizer.tsx:102](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L102) + +*** + +### as + +> `readonly` **as**: keyof `IntrinsicElementAttributes` + +Component or element type for container element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/vue/Virtualizer.tsx:111](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L111) + +*** + +### item + +> `readonly` **item**: keyof `IntrinsicElementAttributes` + +Component or element type for item element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/vue/Virtualizer.tsx:116](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L116) + +*** + +### scrollRef? + +> `readonly` `optional` **scrollRef**: `HTMLElement` + +Reference to the scrollable element. The default will get the parent element of virtualizer. + +#### Defined in + +[src/vue/Virtualizer.tsx:106](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L106) + +*** + +### onScrollEnd + +> **onScrollEnd**: `undefined` \| (...`args`) => `any` + +*** + +### onRangeChange + +> **onRangeChange**: `undefined` \| (...`args`) => `any` + +*** + +### scrollOffset + +> `readonly` **scrollOffset**: `number` + +Get current scrollTop or scrollLeft. + +#### Defined in + +[src/vue/Virtualizer.tsx:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L38) + +*** + +### scrollSize + +> `readonly` **scrollSize**: `number` + +Get current scrollHeight or scrollWidth. + +#### Defined in + +[src/vue/Virtualizer.tsx:42](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L42) + +*** + +### viewportSize + +> `readonly` **viewportSize**: `number` + +Get current offsetHeight or offsetWidth. + +#### Defined in + +[src/vue/Virtualizer.tsx:46](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/Virtualizer.tsx#L46) diff --git a/docs/vue/classes/WindowVirtualizer.md b/docs/vue/classes/WindowVirtualizer.md new file mode 100644 index 000000000..64b151a4f --- /dev/null +++ b/docs/vue/classes/WindowVirtualizer.md @@ -0,0 +1,304 @@ +[**API**](../../API.md) • **Docs** + +*** + +# Class: WindowVirtualizer + +## Methods + +### $watch() + +> **$watch**\<`T`\>(`source`, `cb`, `options`?): `WatchStopHandle` + +#### Type Parameters + +• **T** *extends* `string` \| (...`args`) => `any` + +#### Parameters + +• **source**: `T` + +• **cb**: `T` *extends* (...`args`) => `R` ? (...`args`) => `any` : (...`args`) => `any` + +• **options?**: `WatchOptions`\<`boolean`\> + +#### Returns + +`WatchStopHandle` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:131 + +## Properties + +### $ + +> **$**: `ComponentInternalInstance` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:118 + +*** + +### $data + +> **$data**: `object` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:119 + +*** + +### $props + +> **$props**: `Partial`\<`object`\> & `Omit`\<`object` & `VNodeProps` & `AllowedComponentProps` & `ComponentCustomProps` & `Readonly`\<`ExtractPropTypes`\<`object`\>\> & `object`, `DefaultKeys`\<`object`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:120 + +*** + +### $attrs + +> **$attrs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:121 + +*** + +### $refs + +> **$refs**: `Data` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:122 + +*** + +### $slots + +> **$slots**: `Readonly`\<`object`\> + +#### Type declaration + +##### default + +> **default**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:123 + +*** + +### $root + +> **$root**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:124 + +*** + +### $parent + +> **$parent**: `null` \| `ComponentPublicInstance`\<`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `false`, `ComponentOptionsBase`\<`any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `any`, `object`, `object`, `string`, `object`\>, `object`, `object`\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:125 + +*** + +### $emit + +> **$emit**: (`event`, ...`args`) => `void` & (`event`, ...`args`) => `void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:126 + +*** + +### $el + +> **$el**: `any` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:127 + +*** + +### $options + +> **$options**: `ComponentOptionsBase`\<`ResolveProps`\<`object`, `object`\>, `void`, `object`, `object`, `object`, `ComponentOptionsMixin`, `ComponentOptionsMixin`, `object`, `string`, `object`, `object`, `string`, `SlotsType`\<`object`\>\> & `MergedComponentOptionsOverride` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:128 + +*** + +### $forceUpdate() + +> **$forceUpdate**: () => `void` + +#### Returns + +`void` + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:129 + +*** + +### $nextTick() + +> **$nextTick**: \<`T`, `R`\>(`this`, `fn`?) => `Promise`\<`Awaited`\<`R`\>\> + +#### Type Parameters + +• **T** = `void` + +• **R** = `void` + +#### Parameters + +• **this**: `T` + +• **fn?** + +#### Returns + +`Promise`\<`Awaited`\<`R`\>\> + +#### Defined in + +node\_modules/@vue/runtime-core/dist/runtime-core.d.ts:130 + +*** + +### shift + +> `readonly` **shift**: `boolean` = `Boolean` + +While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling. + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:49](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L49) + +*** + +### data + +> `readonly` **data**: `unknown`[] + +The data items rendered by this component. + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:33](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L33) + +*** + +### overscan + +> `readonly` **overscan**: `number` + +Number of items to render above/below the visible bounds of the list. You can increase to avoid showing blank items in fast scrolling. + +#### Default Value + +```ts +4 +``` + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:38](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L38) + +*** + +### itemSize? + +> `readonly` `optional` **itemSize**: `number` = `Number` + +Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly. + +- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases. +- If set, you can opt out estimation and use the value as initial item size. + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:45](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L45) + +*** + +### horizontal + +> `readonly` **horizontal**: `boolean` = `Boolean` + +If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list. + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:53](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L53) + +*** + +### as + +> `readonly` **as**: keyof `IntrinsicElementAttributes` + +Component or element type for container element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:58](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L58) + +*** + +### item + +> `readonly` **item**: keyof `IntrinsicElementAttributes` + +Component or element type for item element. + +#### Default Value + +```ts +"div" +``` + +#### Defined in + +[src/vue/WindowVirtualizer.tsx:63](https://github.com/inokawa/virtua/blob/f2de1ad1dcae7dcd92746003a86e94d236b5972c/src/vue/WindowVirtualizer.tsx#L63) + +*** + +### onScrollEnd + +> **onScrollEnd**: `undefined` \| (...`args`) => `any` + +*** + +### onRangeChange + +> **onRangeChange**: `undefined` \| (...`args`) => `any` diff --git a/package-lock.json b/package-lock.json index e8a434cc9..524e08f53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "virtua", - "version": "0.33.2", + "version": "0.33.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "virtua", - "version": "0.33.2", + "version": "0.33.3", "license": "MIT", "devDependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.2.1", diff --git a/package.json b/package.json index ab41062d0..7fafa1945 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "virtua", - "version": "0.33.2", + "version": "0.33.3", "description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.", "main": "lib/index.js", "module": "lib/index.mjs",