react-virtuoso
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -37,2 +37,8 @@ import { ForwardRefExoticComponent, ReactNode } from 'react'; | ||
/** | ||
* Set this value to offset the initial location of the list. | ||
* Warning: using this property will still run a render cycle at the scrollTop: 0 list window. | ||
* If possible, avoid using it and stick to `initialTopMostItemIndex` instead. | ||
*/ | ||
initialScrollTop?: number; | ||
/** | ||
* Use for server-side rendering - if set, the list will render the specified amount of items | ||
@@ -39,0 +45,0 @@ * regardless of the container / item size. |
@@ -0,13 +1,14 @@ | ||
import * as u from '@virtuoso.dev/urx'; | ||
export declare const UP: "up"; | ||
export declare const DOWN: "down"; | ||
export declare type ScrollDirection = typeof UP | typeof DOWN; | ||
export declare const domIOSystem: import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
export declare const domIOSystem: u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>; |
@@ -214,3 +214,6 @@ import { FollowOutput } from './interfaces'; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<import("./sizeSystem").Data>; | ||
@@ -239,2 +242,5 @@ totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}]) => { | ||
@@ -241,0 +247,0 @@ scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; |
@@ -0,1 +1,2 @@ | ||
import * as u from '@virtuoso.dev/urx'; | ||
import { IndexLocation } from './scrollToIndexSystem'; | ||
@@ -20,178 +21,178 @@ export interface ElementDimensions { | ||
} | ||
export declare const gridSystem: import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
export declare const gridSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight, deviation }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>, u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}>], ([{ scrollTop }, { isScrolling }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}]) => { | ||
isSeeking: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
scrollSeekConfiguration: import("@virtuoso.dev/urx").StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollSeekRangeChanged: import("@virtuoso.dev/urx").Stream<import("./interfaces").ListRange>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isSeeking: u.StatefulStream<boolean>; | ||
scrollSeekConfiguration: u.StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: u.StatefulStream<number>; | ||
scrollSeekRangeChanged: u.Stream<import("./interfaces").ListRange>; | ||
}>, u.SystemSpec<never[], () => { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}>], ([{ overscan, visibleRange, listBoundary }, { scrollTop, viewportHeight, scrollBy, scrollTo }, stateFlags, scrollSeek, { propsReady, didMount },]: [{ | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}, { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}, { | ||
isSeeking: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
scrollSeekConfiguration: import("@virtuoso.dev/urx").StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollSeekRangeChanged: import("@virtuoso.dev/urx").Stream<import("./interfaces").ListRange>; | ||
isSeeking: u.StatefulStream<boolean>; | ||
scrollSeekConfiguration: u.StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: u.StatefulStream<number>; | ||
scrollSeekRangeChanged: u.Stream<import("./interfaces").ListRange>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}]) => { | ||
startReached: import("@virtuoso.dev/urx").Stream<number>; | ||
endReached: import("@virtuoso.dev/urx").Stream<number>; | ||
rangeChanged: import("@virtuoso.dev/urx").Stream<{ | ||
startReached: u.Stream<number>; | ||
endReached: u.Stream<number>; | ||
rangeChanged: u.Stream<{ | ||
startIndex: number; | ||
endIndex: number; | ||
}>; | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
gridState: import("@virtuoso.dev/urx").StatefulStream<GridState>; | ||
isSeeking: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
scrollSeekConfiguration: import("@virtuoso.dev/urx").StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollSeekRangeChanged: import("@virtuoso.dev/urx").Stream<import("./interfaces").ListRange>; | ||
totalCount: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
viewportDimensions: import("@virtuoso.dev/urx").StatefulStream<ElementDimensions>; | ||
itemDimensions: import("@virtuoso.dev/urx").StatefulStream<ElementDimensions>; | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollToIndex: import("@virtuoso.dev/urx").Stream<IndexLocation>; | ||
initialItemCount: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
propsReady: u.StatefulStream<boolean>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
gridState: u.StatefulStream<GridState>; | ||
isSeeking: u.StatefulStream<boolean>; | ||
scrollSeekConfiguration: u.StatefulStream<false | import("./interfaces").ScrollSeekConfiguration | undefined>; | ||
scrollVelocity: u.StatefulStream<number>; | ||
scrollSeekRangeChanged: u.Stream<import("./interfaces").ListRange>; | ||
totalCount: u.StatefulStream<number>; | ||
viewportDimensions: u.StatefulStream<ElementDimensions>; | ||
itemDimensions: u.StatefulStream<ElementDimensions>; | ||
scrollTop: u.Stream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollToIndex: u.Stream<IndexLocation>; | ||
initialItemCount: u.StatefulStream<number>; | ||
}>; |
@@ -203,3 +203,6 @@ import * as u from '@virtuoso.dev/urx'; | ||
topListHeight: u.StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
}>, u.SystemSpec<never[], () => { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: u.StatefulStream<import("./sizeSystem").Data>; | ||
@@ -228,2 +231,5 @@ totalCount: u.Stream<number>; | ||
topListHeight: u.StatefulStream<number>; | ||
}, { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}]) => { | ||
@@ -230,0 +236,0 @@ scrolledToInitialItem: u.StatefulStream<boolean>; |
@@ -0,1 +1,2 @@ | ||
import * as u from '@virtuoso.dev/urx'; | ||
import { ListRange } from './interfaces'; | ||
@@ -18,383 +19,389 @@ import { Data, SizeState } from './sizeSystem'; | ||
export declare function buildListState(items: Item[], topItems: Item[], totalCount: number, sizes: SizeState, firstItemIndex: number): ListState; | ||
export declare const listStateSystem: import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
export declare const listStateSystem: u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>, u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ totalCount, groupIndices, sizes }, { scrollTop }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}, { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
groupCounts: import("@virtuoso.dev/urx").Stream<number[]>; | ||
topItemsIndexes: import("@virtuoso.dev/urx").Stream<[number]>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
groupCounts: u.Stream<number[]>; | ||
topItemsIndexes: u.Stream<[number]>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight, deviation }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>, u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>, u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight, deviation }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>], ([{ sizes, totalCount, listRefresh }, { viewportHeight, scrollTo, smoothScrollTargetReached }, { headerHeight }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}, { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}]) => { | ||
scrollToIndex: import("@virtuoso.dev/urx").Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
scrollToIndex: u.Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: u.StatefulStream<number>; | ||
}>, u.SystemSpec<never[], () => { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}, { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
scrollToIndex: import("@virtuoso.dev/urx").Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollToIndex: u.Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: u.StatefulStream<number>; | ||
}, { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}]) => { | ||
scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
initialTopMostItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrolledToInitialItem: u.StatefulStream<boolean>; | ||
initialTopMostItemIndex: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>, u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight, deviation }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}>], ([{ sizes, totalCount, listRefresh }, { viewportHeight, scrollTo, smoothScrollTargetReached }, { headerHeight }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}, { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}]) => { | ||
scrollToIndex: import("@virtuoso.dev/urx").Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollToIndex: u.Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: u.StatefulStream<number>; | ||
}>, u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}>, u.SystemSpec<never[], () => { | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}>], ([{ statefulScrollTop }, { sizes, totalCount, data, firstItemIndex }, groupedListSystem, { visibleRange, listBoundary, topListHeight: rangeTopListHeight }, { scrolledToInitialItem, initialTopMostItemIndex }, { topListHeight }, stateFlags, { didMount },]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: import("@virtuoso.dev/urx").StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
deviation: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<import("./domIOSystem").ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}, { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<import("./sizeSystem").SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}, { | ||
groupCounts: import("@virtuoso.dev/urx").Stream<number[]>; | ||
topItemsIndexes: import("@virtuoso.dev/urx").Stream<[number]>; | ||
groupCounts: u.Stream<number[]>; | ||
topItemsIndexes: u.Stream<[number]>; | ||
}, { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
footerHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
overscan: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
visibleRange: import("@virtuoso.dev/urx").StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
listBoundary: u.Stream<import("./sizeRangeSystem").NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<import("./sizeRangeSystem").Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<import("./sizeRangeSystem").NumberTuple>; | ||
}, { | ||
scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
initialTopMostItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrolledToInitialItem: u.StatefulStream<boolean>; | ||
initialTopMostItemIndex: u.StatefulStream<number>; | ||
}, { | ||
scrollToIndex: import("@virtuoso.dev/urx").Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
scrollToIndex: u.Stream<import("./scrollToIndexSystem").IndexLocation>; | ||
topListHeight: u.StatefulStream<number>; | ||
}, { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
propsReady: u.StatefulStream<boolean>; | ||
didMount: u.Stream<boolean>; | ||
}]) => { | ||
isScrolling: import("@virtuoso.dev/urx").Stream<boolean>; | ||
isAtTop: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
isAtBottom: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
atTopStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
atBottomStateChange: import("@virtuoso.dev/urx").Stream<boolean>; | ||
listStateListener: import("@virtuoso.dev/urx").Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
listState: import("@virtuoso.dev/urx").StatefulStream<ListState>; | ||
topItemsIndexes: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
endReached: import("@virtuoso.dev/urx").Stream<number>; | ||
startReached: import("@virtuoso.dev/urx").Stream<number>; | ||
rangeChanged: import("@virtuoso.dev/urx").Stream<ListRange>; | ||
itemsRendered: import("@virtuoso.dev/urx").Stream<ListItem[]>; | ||
isScrolling: u.Stream<boolean>; | ||
isAtTop: u.StatefulStream<boolean>; | ||
isAtBottom: u.StatefulStream<boolean>; | ||
atTopStateChange: u.Stream<boolean>; | ||
atBottomStateChange: u.Stream<boolean>; | ||
listStateListener: u.Stream<import("./stateFlagsSystem").ListBottomInfo>; | ||
listState: u.StatefulStream<ListState>; | ||
topItemsIndexes: u.StatefulStream<number[]>; | ||
endReached: u.Stream<number>; | ||
startReached: u.Stream<number>; | ||
rangeChanged: u.Stream<ListRange>; | ||
itemsRendered: u.Stream<ListItem[]>; | ||
}>; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@virtuoso.dev/react-urx"),n=require("@virtuoso.dev/urx"),r=require("react"),o=(e=require("resize-observer-polyfill"))&&"object"==typeof e&&"default"in e?e.default:e;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){void 0===t&&(t=!0);var n=r.useRef(null),i=new o((function(t){e(t[0].target)}));return function(e){e&&t?(i.observe(e),n.current=e):(n.current&&i.unobserve(n.current),n.current=null)}}var c="up",m=n.system((function(){var e=n.stream(),t=n.statefulStream(0),r=n.stream(),o=n.statefulStream(0),i=n.stream(),a=n.stream(),s=n.stream();n.connect(e,o);var u=n.statefulStream("down");return n.connect(n.pipe(e,n.scan((function(e,t){return{direction:t<e.prevScrollTop?c:"down",prevScrollTop:t}}),{direction:"down",prevScrollTop:0}),n.map((function(e){return e.direction}))),u),{scrollTop:e,viewportHeight:i,smoothScrollTargetReached:r,scrollTo:a,scrollBy:s,scrollDirection:u,statefulScrollTop:o,deviation:t}}),[],{singleton:!0}),f={lvl:0};function p(e,t,n,r,o){return void 0===r&&(r=f),void 0===o&&(o=f),{k:e,v:t,lvl:n,l:r,r:o}}function d(e){return e===f}function h(){return f}function v(e,t){if(d(e))return f;var n=e.k,r=e.l,o=e.r;if(t===n){if(d(r))return o;if(d(o))return r;var i=function e(t){return d(t.r)?[t.k,t.v]:e(t.r)}(r);return T(x(e,{k:i[0],v:i[1],l:S(r)}))}return T(x(e,t<n?{l:v(r,t)}:{r:v(o,t)}))}function g(e,t){if(!d(e))return t===e.k?e.v:g(t<e.k?e.l:e.r,t)}function I(e,t,n){if(void 0===n&&(n="k"),d(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var r=I(e.r,t,n);return-Infinity===r[0]?[e.k,e.v]:r}return I(e.l,t,n)}function C(e,t,n){return d(e)?p(t,n,1):t===e.k?x(e,{k:t,v:n}):function(e){return w(k(e))}(x(e,t<e.k?{l:C(e.l,t,n)}:{r:C(e.r,t,n)}))}function S(e){return d(e.r)?e.l:T(x(e,{r:S(e.r)}))}function x(e,t){return p(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function y(e){return d(e)||e.lvl>e.r.lvl}function T(e){var t=e.l,n=e.r,r=e.lvl;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(y(t))return k(x(e,{lvl:r-1}));if(d(t)||d(t.r))throw new Error("Unexpected empty nodes");return x(t.r,{l:x(t,{r:t.r.l}),r:x(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(y(e))return w(x(e,{lvl:r-1}));if(d(n)||d(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=y(o)?n.lvl-1:n.lvl;return x(o,{l:x(e,{r:o.l,lvl:r-1}),r:w(x(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function b(e,t,n){return d(e)?[]:function(e){if(0===e.length)return[];for(var t=e[0],n=t.k,r=t.v,o=[],i=1;i<=e.length;i++){var a=e[i];o.push({start:n,end:a?a.k-1:Infinity,value:r}),a&&(n=a.k,r=a.v)}return o}(function e(t,n,r){if(d(t))return[];var o=t.k,i=t.v,a=t.r,s=[];return o>n&&(s=s.concat(e(t.l,n,r))),o>=n&&o<=r&&s.push({k:o,v:i}),o<=r&&(s=s.concat(e(a,n,r))),s}(e,I(e,t)[0],n))}function w(e){var t=e.r,n=e.lvl;return d(t)||d(t.r)||t.lvl!==n||t.r.lvl!==n?e:x(t,{l:x(e,{r:t.l}),lvl:n+1})}function k(e){var t=e.l;return d(t)||t.lvl!==e.lvl?e:x(t,{r:x(e,{l:t.r})})}function z(e){var t=e.size,n=e.startIndex,r=e.endIndex;return function(e){return e.start===n&&(e.end===r||Infinity===e.end)&&e.value===t}}function H(e,t){var n=t[0],r=t[1],o=e.sizeTree,i=e.offsetTree,a=o,s=0;if(r.length>0&&d(o)&&2===n.length){var l=n[0].size,c=n[1].size;a=r.reduce((function(e,t){return C(C(e,t,l),t+1,c)}),a)}else{var m=function(e,t,n){void 0===n&&(n=function(){});for(var r,o=d(e)?0:Infinity,i=u(t);!(r=i()).done;){var a=r.value,s=a.size,l=a.startIndex,c=a.endIndex;if(o=Math.min(o,l),d(e))e=C(e,0,s);else{var m=b(e,l-1,c+1);if(!m.some(z(a))){for(var f,p=!1,h=!1,g=u(m);!(f=g()).done;){var I=f.value,S=I.start,x=I.end,y=I.value;p?(c>=S||s===y)&&(e=v(e,S),n(S)):(h=y!==s,p=!0),x>c&&c>=S&&y!==s&&(e=C(e,c+1,y))}h&&(e=C(e,l,s))}}}return[e,o]}(a,n,(function(e){i=v(i,e)}));a=m[0],s=m[1]}if(a===o)return e;var f=0,p=0,S=0;if(0!==s){f=I(i,s-1)[1];var x=I(a,s-1);p=x[0],S=x[1]}else S=g(a,0);for(var y,T=u(b(a,s,Infinity));!(y=T()).done;){var w=y.value,k=w.start,H=w.value,F=(k-p)*S+f;i=C(i,k,F),p=k,f=F,S=H}return{offsetTree:i,sizeTree:a,groupOffsetTree:r.reduce((function(e,t){return C(e,t,L(t,{offsetTree:i,sizeTree:a}))}),h()),lastIndex:p,lastOffset:f,lastSize:S,groupIndices:r}}function L(e,t){if(d(t.offsetTree))return 0;var n=I(t.offsetTree,e),r=n[0],o=n[1];return I(t.sizeTree,e)[1]*(e-r)+o}function F(e,t){if(d(t.groupOffsetTree))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}var E=n.system((function(){var e=n.stream(),t=n.stream(),r=n.stream(),o=n.statefulStream(0),a=n.statefulStream([]),s=n.statefulStream(void 0),u=n.statefulStream(void 0),l=n.statefulStream(void 0),c={offsetTree:h(),sizeTree:h(),groupOffsetTree:h(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},m=n.statefulStream(!1),f=n.statefulStreamFromEmitter(n.pipe(e,n.withLatestFrom(a),n.scan(H,c),n.distinctUntilChanged()),c);n.connect(n.pipe(a,n.withLatestFrom(f),n.map((function(e){var t=e[0],n=e[1];return i({},n,{groupIndices:t,groupOffsetTree:t.reduce((function(e,t){return C(e,t,L(t,n))}),h())})}))),f),n.connect(n.pipe(a,n.mapTo(!0)),m),n.connect(s,u);var p=n.statefulStreamFromEmitter(n.pipe(s,n.map((function(e){return void 0===e}))),!0);n.connect(n.pipe(u,n.filter((function(e){return void 0!==e})),n.map((function(e){return[{startIndex:0,endIndex:0,size:e}]}))),e);var v=n.streamFromEmitter(n.pipe(e,n.withLatestFrom(f),n.scan((function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}}),{changed:!1,sizes:c}),n.map((function(e){return e.changed}))));return n.connect(n.pipe(r,n.withLatestFrom(f),n.map((function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return function e(t){return d(t)?[]:[].concat(e(t.l),[{k:t.k,v:t.v}],e(t.r))}(n.sizeTree).reduce((function(e,n){var r=n.k,o=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:r+t-1,size:e.prevSize}]),prevIndex:r+t,prevSize:o}}),{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges}))),e),n.connect(n.pipe(o,n.scan((function(e,t){return{diff:e.prev-t,prev:t}}),{diff:0,prev:0}),n.map((function(e){return e.diff})),n.filter((function(e){return e>0}))),r),{data:l,totalCount:t,sizeRanges:e,groupIndices:a,defaultItemSize:u,fixedItemSize:s,unshiftWith:r,firstItemIndex:o,sizes:f,listRefresh:v,trackItemSizes:p}}),[],{singleton:!0}),R=function(e,t){return e&&e[0]===t[0]&&e[1]===t[1]},B=function(e,t,n){return"number"==typeof e?n===c&&"top"===t||"down"===n&&"bottom"===t?e:0:n===c?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse},M=n.system((function(e){var t=e[0],r=t.scrollTop,o=t.viewportHeight,i=t.deviation,a=n.stream(),s=n.statefulStream(0),u=n.statefulStream(0),l=n.statefulStream(0),m=n.statefulStream(0);return{listBoundary:a,headerHeight:s,footerHeight:u,overscan:m,topListHeight:l,visibleRange:n.statefulStreamFromEmitter(n.pipe(n.combineLatest(n.duc(r),n.duc(o),n.duc(s),n.duc(a,R),n.duc(m),n.duc(l),n.duc(i)),n.map((function(e){var t=e[0],n=e[1],r=e[3],o=r[0],i=r[1],a=e[4],s=e[6],u=t-e[2]-s,l="none";return(o-=s)>t+e[5]&&(l=c),(i-=s)<t+n&&(l="down"),"none"!==l?[Math.max(u-B(a,"top",l),0),u+n+B(a,"bottom",l)]:null})),n.filter((function(e){return null!=e}))),[0,0])}}),n.tup(m),{singleton:!0});function O(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior||(t.behavior="auto"),t}var P=n.system((function(e){var t=e[0],r=t.sizes,o=t.totalCount,i=t.listRefresh,a=e[1],s=a.viewportHeight,u=a.scrollTo,l=a.smoothScrollTargetReached,c=e[2].headerHeight,m=n.stream(),f=n.statefulStream(0),p=null,d=null,h=null,v=function(){p&&(p(),p=null),h&&(h(),h=null),d&&(clearTimeout(d),d=null)};return n.connect(n.pipe(m,n.withLatestFrom(r,s,o,f,c),n.map((function(e){var t=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=O(t),f=c.index,g=c.align,C=c.behavior;f=F(f,r);var S=L(f=Math.max(0,f,Math.min(a-1,f)),r)+u;"end"===g?S=Math.round(S-o+I(r.sizeTree,f)[1]):"center"===g?S=Math.round(S-o/2+I(r.sizeTree,f)[1]/2):S-=s;var x=function(e){v(),e&&n.publish(m,t)};if(v(),"smooth"===C){var y=!1;h=n.subscribe(i,(function(e){y=y||e})),p=n.handleNext(l,(function(){x(y)}))}else p=n.handleNext(i,x);return d=setTimeout((function(){v()}),1200),{top:S,behavior:C}}))),u),{scrollToIndex:m,topListHeight:f}}),n.tup(E,m,M),{singleton:!0}),U=n.system((function(e){var t=e[0],r=t.scrollTop,o=t.viewportHeight,i=n.statefulStream(!1),a=n.statefulStream(!0),s=n.stream(),u=n.stream(),l=n.stream(),c=n.streamFromEmitter(n.pipe(n.merge(n.pipe(n.duc(r),n.skip(1),n.mapTo(!0)),n.pipe(n.duc(r),n.skip(1),n.mapTo(!1),n.debounceTime(100))),n.distinctUntilChanged()));return n.connect(n.pipe(n.duc(r),n.map((function(e){return 0===e})),n.distinctUntilChanged()),a),n.connect(a,u),n.connect(n.pipe(n.combineLatest(l,n.duc(r),n.duc(o)),n.map((function(e){var t=e[0];return 0===t.offsetBottom&&e[1]+e[2]-t.bottom>-4})),n.distinctUntilChanged()),i),n.subscribe(i,(function(e){setTimeout((function(){return n.publish(s,e)}))})),{isScrolling:c,isAtTop:a,isAtBottom:i,atTopStateChange:u,atBottomStateChange:s,listStateListener:l}}),n.tup(m)),j=n.system((function(){var e=n.statefulStream(!1);return{propsReady:e,didMount:n.streamFromEmitter(n.pipe(e,n.filter((function(e){return e})),n.distinctUntilChanged()))}}),[],{singleton:!0}),V=n.system((function(e){var t=e[0],r=t.sizes,o=t.listRefresh,i=e[1].scrollTop,a=e[2].scrollToIndex,s=e[3].didMount,u=n.statefulStream(!0),l=n.statefulStream(0);return n.connect(n.pipe(s,n.withLatestFrom(l),n.filter((function(e){return 0!==e[1]})),n.mapTo(!1)),u),n.subscribe(n.pipe(o,n.withLatestFrom(u,r),n.filter((function(e){var t=e[1];return!d(e[2].sizeTree)&&!t})),n.withLatestFrom(l)),(function(e){var t=e[1];n.handleNext(i,(function(){n.publish(u,!0)})),n.publish(a,t)})),{scrolledToInitialItem:u,initialTopMostItemIndex:l}}),n.tup(E,m,P,j),{singleton:!0}),A=n.system((function(e){var t=e[0],r=t.totalCount,o=t.listRefresh,i=e[1].isAtBottom,a=e[2].scrollToIndex,s=e[3].scrolledToInitialItem,u=n.statefulStream(!1);return n.subscribe(n.pipe(n.duc(r),n.withLatestFrom(u,i,s),n.filter((function(e){return e[1]&&e[2]&&e[3]}))),(function(e){var t=e[0],r=e[1];n.handleNext(o,(function(){var e;n.publish(a,{index:t-1,align:"end",behavior:(e=r,"smooth"===e?"smooth":"auto")})}))})),{followOutput:u}}),n.tup(E,U,P,V));function G(e){return e.reduce((function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e}),{totalCount:0,groupIndices:[]})}var N=n.system((function(e){var t=e[0],r=t.totalCount,o=t.groupIndices,i=t.sizes,a=e[1].scrollTop,s=n.stream(),u=n.stream(),l=n.streamFromEmitter(n.pipe(s,n.map(G)));return n.connect(n.pipe(l,n.map(n.prop("totalCount"))),r),n.connect(n.pipe(l,n.map(n.prop("groupIndices"))),o),n.connect(n.pipe(n.combineLatest(a,i),n.filter((function(e){return!d(e[1].groupOffsetTree)})),n.map((function(e){return I(e[1].groupOffsetTree,e[0],"v")[0]})),n.distinctUntilChanged(),n.map((function(e){return[e]}))),u),{groupCounts:s,topItemsIndexes:u}}),n.tup(E,m)),W={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0};function K(e,t,n){if(0===e.length)return[];if(d(t.groupOffsetTree))return e.map((function(e){return i({},e,{index:e.index+n,originalIndex:e.index})}));for(var r,o=[],a=b(t.groupOffsetTree,e[0].index,e[e.length-1].index),s=void 0,l=0,c=u(e);!(r=c()).done;){var m=r.value;(!s||s.end<m.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),o.push(i({},m.index===s.start?{type:"group",index:l}:{index:m.index-(l+1)+n,groupIndex:l},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return o}function D(e,t,n,r,o){var i=0,a=0;if(e.length>0){i=e[0].offset;var s=e[e.length-1];a=s.offset+s.size}var u=i,l=r.lastOffset+(n-r.lastIndex)*r.lastSize-a;return{items:K(e,r,o),topItems:K(t,r,o),topListHeight:t.reduce((function(e,t){return t.size+e}),0),offsetTop:i,offsetBottom:l,top:u,bottom:a}}var q,Y,_=n.system((function(e){var t=e[0].statefulScrollTop,r=e[1],o=r.sizes,a=r.totalCount,s=r.data,l=r.firstItemIndex,c=e[2],m=e[3],f=m.visibleRange,p=m.listBoundary,h=m.topListHeight,v=e[4],C=v.scrolledToInitialItem,S=v.initialTopMostItemIndex,x=e[5].topListHeight,y=e[6],T=e[7].didMount,w=n.statefulStream([]),k=n.stream();n.connect(c.topItemsIndexes,w);var z=n.statefulStreamFromEmitter(n.pipe(n.combineLatest(T,n.duc(f),n.duc(a),n.duc(o),n.duc(S),C,n.duc(w),n.duc(l)),n.filter((function(e){return e[0]})),n.withLatestFrom(s),n.map((function(e){var r=e[0],o=r[1],i=o[0],a=o[1],s=r[2],l=r[3],c=r[4],m=r[5],f=r[6],p=r[7],h=e[1],v=l.sizeTree,C=l.offsetTree;if(0===s||0===i&&0===a)return W;if(d(v))return D(function(e,t,n){if(!d(t.groupOffsetTree)){var r=F(e,t);return[{index:I(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(c,l,h),[],s,l,p);var S=[];if(f.length>0)for(var x,y=f[0],T=f[f.length-1],w=0,k=u(b(l.sizeTree,y,T));!(x=k()).done;)for(var z=x.value,H=z.value,L=Math.max(z.start,y),E=Math.min(z.end,T),R=L;R<=E;R++)S.push({index:R,size:H,offset:w,data:h&&h[R]}),w+=H;if(!m)return D([],S,s,l,p);d(l.groupOffsetTree)||(f=[I(l.groupOffsetTree,n.getValue(t),"v")[0]]);var B=f.length>0?f[f.length-1]+1:0,M=Math.max(B,I(C,i,"v")[0]),O=I(C,a,"v")[0],P=s-1;return D(n.tap([],(function(e){for(var t,n=u(b(C,M,O));!(t=n()).done;){var r=t.value,o=r.value,s=r.start,l=g(v,s);r.value<i&&(o+=((s+=Math.floor((i-r.value)/l))-r.start)*l),s<B&&(o+=(B-s)*l,s=B);for(var c=Math.min(r.end,P),m=s;m<=c&&!(o>=a);m++)e.push({index:m,size:l,offset:o,data:h&&h[m]}),o+=l}})),S,s,l,p)})),n.distinctUntilChanged()),W);return n.connect(n.pipe(s,n.filter((function(e){return void 0!==e})),n.map((function(e){return e.length}))),a),n.connect(n.pipe(z,n.map(n.prop("topListHeight"))),x),n.connect(x,h),n.connect(z,y.listStateListener),n.connect(n.pipe(z,n.map((function(e){return[e.top,e.bottom]}))),p),n.connect(n.pipe(z,n.map((function(e){return e.items}))),k),i({listState:z,topItemsIndexes:w,endReached:n.streamFromEmitter(n.pipe(z,n.filter((function(e){return e.items.length>0})),n.withLatestFrom(a),n.filter((function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1})),n.map((function(e){return e[1]-1})),n.distinctUntilChanged())),startReached:n.streamFromEmitter(n.pipe(z,n.filter((function(e){var t=e.items;return t.length>0&&0===t[0].originalIndex})),n.mapTo(0))),rangeChanged:n.streamFromEmitter(n.pipe(z,n.filter((function(e){return e.items.length>0})),n.map((function(e){var t=e.items;return{startIndex:t[0].originalIndex,endIndex:t[t.length-1].originalIndex}})),n.distinctUntilChanged((function(e,t){return e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex})))),itemsRendered:k},y)}),n.tup(m,E,N,M,V,P,U,j),{singleton:!0}),Z=n.system((function(e){var t=e[0],r=t.sizes,o=t.firstItemIndex,i=e[1].listState,a=e[2].didMount,s=n.statefulStream(0);return n.connect(n.pipe(a,n.withLatestFrom(s),n.filter((function(e){return 0!==e[1]})),n.withLatestFrom(r,o),n.map((function(e){var t=e[0][1],n=e[1],r=e[2],o=0;if(n.groupIndices.length>0)for(var i,a=u(n.groupIndices);!((i=a()).done||i.value-o>=t);)o++;var s=t+o;return D(Array.from({length:s}).map((function(e,t){return{index:t,size:0,offset:0}})),[],s,n,r)}))),i),{initialItemCount:s}}),n.tup(E,_,j),{singleton:!0}),$=n.system((function(e){var t=e[0].scrollTop,r=e[1].isScrolling,o=n.statefulStream(0),i=n.statefulStream(!1),a=n.stream(),s=n.statefulStream(!1);return n.connect(n.pipe(r,n.filter((function(e){return!e})),n.mapTo(0)),o),n.connect(n.pipe(t,n.throttleTime(100),n.scan((function(e,t){return[e[1],t]}),[0,0]),n.map((function(e){return e[1]-e[0]}))),o),n.connect(n.pipe(o,n.withLatestFrom(s,i,a),n.filter((function(e){return!!e[1]})),n.map((function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=n.enter;if(r){if((0,n.exit)(t,o))return!1}else if(i(t,o))return!0;return r})),n.distinctUntilChanged()),i),n.subscribe(n.pipe(n.combineLatest(i,o,a),n.withLatestFrom(s)),(function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])})),{isSeeking:i,scrollSeekConfiguration:s,scrollVelocity:o,scrollSeekRangeChanged:a}}),n.tup(m,U),{singleton:!0}),J=n.system((function(e){var t=e[0].topItemsIndexes,r=n.statefulStream(0);return n.connect(n.pipe(r,n.filter((function(e){return e>0})),n.map((function(e){return Array.from({length:e}).map((function(e,t){return t}))}))),t),{topItemCount:r}}),n.tup(_)),Q=n.system((function(e){var t=e[0],r=t.footerHeight,o=t.headerHeight,i=e[1].listState,a=n.stream(),s=n.statefulStreamFromEmitter(n.pipe(n.combineLatest(r,o,i),n.map((function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom}))),0);return n.connect(n.duc(s),a),{totalListHeight:s,totalListHeightChanged:a}}),n.tup(M,_),{singleton:!0}),X="undefined"!=typeof window&&(null===(q=window)||void 0===q||null===(Y=q.navigator)||void 0===Y?void 0:Y.userAgent),ee=X&&(!!X.match(/iPad/i)||!!X.match(/iPhone/i)),te=n.system((function(e){var t=e[0],r=t.scrollBy,o=t.deviation,i=e[1].isScrolling,a=e[2].listState,s=e[3],u=s.unshiftWith,l=s.sizes,m=s.listRefresh,f=n.pipe(a,n.withLatestFrom(t.scrollTop,t.scrollDirection),n.filter((function(e){return 0!==e[1]&&e[2]===c})),n.map((function(e){return e[0]})),n.scan((function(e,t){var n=e[1],r=t.items,o=0;if(n.length>0&&r.length>0&&(0!==n[0].originalIndex||0!==r[0].originalIndex)){var i=function(e){var t=r[e],i=n.find((function(e){return e.originalIndex===t.originalIndex}));return i?t.offset!==i.offset?(o=t.offset-i.offset,"break"):void 0:"continue"};e:for(var a=r.length-1;a>=0;a--)switch(i(a)){case"continue":continue;case"break":break e}}return[o,r]}),[0,[]]),n.filter((function(e){return 0!==e[0]})),n.map((function(e){return e[0]})));return ee?(n.connect(n.pipe(f,n.withLatestFrom(o),n.map((function(e){return e[1]-e[0]}))),o),n.subscribe(n.pipe(i,n.filter((function(e){return!e})),n.withLatestFrom(o),n.filter((function(e){return 0!==e[1]})),n.map((function(e){return e[1]}))),(function(e){n.publish(r,{top:-e,behavior:"auto"}),n.publish(o,0)}))):n.connect(n.pipe(f,n.map((function(e){return{top:e,behavior:"auto"}}))),r),n.subscribe(n.pipe(u,n.withLatestFrom(l,a),n.map((function(e){var t=e[2];return{index:t.items[0].index+e[0],offset:L(t.items[0].index,e[1])}}))),(function(e){var t=e.index,o=e.offset;n.handleNext(m,(function(){var e=L(t,n.getValue(l));n.publish(r,{top:e-o})}))})),{deviation:o}}),n.tup(m,U,_,E)),ne=n.system((function(e){var t=e[0],r=t.totalCount,o=t.sizeRanges,s=t.fixedItemSize,u=t.defaultItemSize,l=t.trackItemSizes,c=t.data,m=t.firstItemIndex,f=t.groupIndices,p=e[1].initialTopMostItemIndex,d=e[2],h=d.deviation,v=d.viewportHeight,g=d.scrollTo,I=d.scrollBy,C=d.scrollTop,S=d.smoothScrollTargetReached,x=e[3],y=e[4],T=y.listState,b=y.topItemsIndexes,w=a(y,["listState","topItemsIndexes"]),k=e[5].scrollToIndex,z=e[7].topItemCount,H=e[8].groupCounts,L=e[9];return n.connect(w.rangeChanged,L.scrollSeekRangeChanged),i({totalCount:r,data:c,firstItemIndex:m,sizeRanges:o,viewportHeight:v,scrollTop:C,smoothScrollTargetReached:S,initialTopMostItemIndex:p,topItemsIndexes:b,topItemCount:z,groupCounts:H,fixedItemHeight:s,defaultItemHeight:u,followOutput:x.followOutput,listState:T,scrollTo:g,scrollBy:I,scrollToIndex:k,trackItemSizes:l,groupIndices:f,deviation:h},w,L)}),n.tup(E,V,m,A,_,P,te,J,N,n.system((function(e){return i({},e[0],e[1],e[2],e[3],e[4])}),n.tup(M,Z,j,$,Q))));function re(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var oe=re((function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"}));function ie(e){return e}var ae=n.system((function(){var e=n.statefulStream((function(e){return"Item "+e})),t=n.statefulStream((function(e){return"Group "+e})),r=n.statefulStream({}),o=n.statefulStream(ie),i=n.statefulStream("div"),a=function(e,t){return void 0===t&&(t=null),n.statefulStreamFromEmitter(n.pipe(r,n.map((function(t){return t[e]})),n.distinctUntilChanged()),t)};return{itemContent:e,groupContent:t,components:r,computeItemKey:o,headerFooterTag:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}));function se(e,t){var r=n.stream();return n.subscribe(r,(function(){return console.warn("react-virtuoso: You are using a deprecated property. "+t,"color: red;","color: inherit;","color: blue;")})),n.connect(r,e),r}var ue=n.system((function(e){var t=e[0],r=e[1],o={item:se(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:se(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:se(t.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:se(t.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:se(t.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:n.stream(),maxHeightCacheSize:n.stream(),footer:n.stream(),header:n.stream(),HeaderContainer:n.stream(),FooterContainer:n.stream(),ItemContainer:n.stream(),ScrollContainer:n.stream(),GroupContainer:n.stream(),ListContainer:n.stream(),emptyComponent:n.stream(),scrollSeek:n.stream()};function s(e,t,o){n.connect(n.pipe(e,n.withLatestFrom(r.components),n.map((function(e){var n,r=e[0],a=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+t+" instead."),i({},a,((n={})[t]=r,n))}))),r.components)}return n.subscribe(o.adjustForPrependedItems,(function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")})),n.subscribe(o.maxHeightCacheSize,(function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")})),n.subscribe(o.HeaderContainer,(function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")})),n.subscribe(o.FooterContainer,(function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")})),n.subscribe(o.scrollSeek,(function(e){var o=e.placeholder,s=a(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),n.publish(r.components,i({},n.getValue(r.components),{ScrollSeekPlaceholder:o})),n.publish(t.scrollSeekConfiguration,s)})),s(o.footer,"Footer","footer"),s(o.header,"Header","header"),s(o.ItemContainer,"Item","ItemContainer"),s(o.ListContainer,"List","ListContainer"),s(o.ScrollContainer,"Scroller","ScrollContainer"),s(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),s(o.GroupContainer,"Group","GroupContainer"),i({},t,r,o)}),n.tup(ne,ae)),le=function(e){return r.createElement("div",{style:{height:e.height}})},ce={position:oe(),zIndex:1},me=r.memo((function(e){var t,n=e.showTopList,o=void 0!==n&&n,i=xe("listState"),a=xe("deviation"),s=Se("sizeRanges"),u=xe("itemContent"),c=xe("groupContent"),m=(t=s,l((function(e){var n=function(e,t){var n=e.length;if(0===n)return null;for(var r=[],o=0;o<n;o++){var i=e.item(o);if(i&&void 0!==i.dataset.index){var a=parseInt(i.dataset.index),s=parseInt(i.dataset.knownSize),u=i.offsetHeight;if(0===u)throw new Error("Zero-sized element, this should not happen");if(u!==s){var l=r[r.length-1];0===r.length||l.size!==u||l.endIndex!==a-1?r.push({startIndex:a,endIndex:a,size:u}):r[r.length-1].endIndex++}}}return r}(e.children);null!==n&&t(n)}),xe("trackItemSizes"))),f=xe("EmptyPlaceholder"),p=xe("ScrollSeekPlaceholder")||le,d=xe("ListComponent"),h=xe("ItemComponent"),v=xe("GroupComponent"),g=xe("computeItemKey"),I=xe("isSeeking"),C=xe("groupIndices").length>0,S=o?{}:{paddingTop:i.offsetTop,paddingBottom:i.offsetBottom,marginTop:a};return!o&&0===i.items.length&&f?r.createElement(f):r.createElement(d,{ref:m,style:S},(o?i.topItems:i.items).map((function(e){var t=e.originalIndex,n=g(t);return I?r.createElement(p,{key:n,index:e.index,height:e.size}):"group"===e.type?r.createElement(v,{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:ce},c(e.index)):r.createElement(h,{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex},u.apply(null,C?[e.index,e.groupIndex,e.data]:[e.index,e.data]))})))})),fe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},pe={width:"100%",height:"100%",position:"absolute",top:0},de={width:"100%",position:oe(),top:0},he=r.memo((function(){var e=xe("HeaderComponent"),t=Se("headerHeight"),n=xe("headerFooterTag"),o=l((function(e){return t(e.offsetHeight)}));return e?r.createElement(n,{ref:o},r.createElement(e)):null})),ve=r.memo((function(){var e=xe("FooterComponent"),t=Se("footerHeight"),n=xe("headerFooterTag"),o=l((function(e){return t(e.offsetHeight)}));return e?r.createElement(n,{ref:o},r.createElement(e)):null}));function ge(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return r.memo((function(e){var s=e.style,u=e.children,l=a(e,["style","children"]),c=t("scrollTop"),m=o("ScrollerComponent"),f=function(e,t,n){var o=r.useRef(null),i=r.useRef(null),a=r.useRef(null),s=r.useCallback((function(n){var r=n.target,o=r.scrollTop;e(Math.max(o,0)),null!==i.current&&(o===i.current||o<=0||o===r.scrollHeight-r.offsetHeight)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))}),[e,t]);return r.useEffect((function(){var e=o.current;return s({target:e}),e.addEventListener("scroll",s,{passive:!0}),function(){e.removeEventListener("scroll",s)}}),[o,s,n]),{scrollerRef:o,scrollByCallback:function(e){null===i.current&&o.current.scrollBy(e)},scrollToCallback:function(n){var r=o.current;if(r){var s="smooth"===n.behavior;if(r.offsetHeight===r.scrollHeight||n.top===r.scrollTop)return e(r.scrollTop),void(s&&t(!0));n.top=Math.max(Math.min(r.scrollHeight-r.offsetHeight,n.top),0),s?(i.current=n.top,a.current&&clearTimeout(a.current),a.current=setTimeout((function(){a.current=null,i.current=null,t(!0)}),1e3)):i.current=null,r.scrollTo(n)}}}}(c,t("smoothScrollTargetReached"),m),p=f.scrollerRef,d=f.scrollByCallback;return n("scrollTo",f.scrollToCallback),n("scrollBy",d),r.createElement(m,i({ref:p,style:i({},fe,s),tabIndex:0},l),u)}))}var Ie=t.systemToComponent(ue,{required:{},optional:{itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",scrollSeekConfiguration:"scrollSeekConfiguration",followOutput:"followOutput",headerFooterTag:"headerFooterTag",data:"data",firstItemIndex:"firstItemIndex",initialItemCount:"initialItemCount",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},r.memo((function(e){var t=i({},e),o=Se("viewportHeight"),a=l(n.compose(o,n.prop("offsetHeight"))),s=xe("headerHeight");return r.createElement(ye,Object.assign({},t),r.createElement("div",{style:pe,ref:a},r.createElement(he,null),r.createElement(me,null),r.createElement(ve,null)),r.createElement("div",{style:i({},de,{marginTop:s+"px"})},r.createElement(me,{showTopList:!0})))}))),Ce=Ie.Component,Se=Ie.usePublisher,xe=Ie.useEmitterValue,ye=ge({usePublisher:Se,useEmitterValue:xe,useEmitter:Ie.useEmitter}),Te={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},be={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},we=Math.ceil,ke=Math.floor,ze=Math.min,He=Math.max,Le=function(e){return we(e)-e<.03?we(e):ke(e)};function Fe(e,t){return Array.from({length:t-e+1}).map((function(t,n){return{index:n+e}}))}var Ee=n.system((function(e){var t=e[0],r=t.overscan,o=t.visibleRange,a=t.listBoundary,s=e[1],u=s.scrollTop,l=s.viewportHeight,c=s.scrollBy,m=s.scrollTo,f=e[2],p=e[3],d=e[4],h=d.propsReady,v=d.didMount,g=n.statefulStream(0),I=n.statefulStream(0),C=n.statefulStream(Te),S=n.statefulStream({height:0,width:0}),x=n.statefulStream({height:0,width:0}),y=n.stream();n.connect(n.pipe(v,n.withLatestFrom(I),n.filter((function(e){return 0!==e[1]})),n.map((function(e){return{items:Fe(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}}))),C),n.connect(n.pipe(n.combineLatest(n.duc(g),o),n.withLatestFrom(S,x),n.map((function(e){var t=e[0],n=t[0],r=t[1],o=r[0],i=r[1],a=e[1],s=e[2],u=s.height,l=s.width;if(0===n)return Te;if(0===l)return be;var c=Le(a.width/l),m=c*ke(o/u),f=c*we(i/u)-1;f=ze(n-1,f);var p=Fe(m=ze(f,He(0,m)),f),d=Re(a,s,p),h=d.top,v=d.bottom;return{items:p,offsetTop:h,offsetBottom:we(n/c)*u-v,top:h,bottom:v,itemHeight:u,itemWidth:l}}))),C),n.connect(n.pipe(S,n.map((function(e){return e.height}))),l),n.connect(n.pipe(n.combineLatest(S,x,C),n.map((function(e){var t=Re(e[0],e[1],e[2].items);return[t.top,t.bottom]}))),a),n.connect(n.pipe(a,n.withLatestFrom(C),n.map((function(e){return{bottom:e[0][1],offsetBottom:e[1].offsetBottom}}))),f.listStateListener);var T=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){return e.items.length>0})),n.withLatestFrom(g),n.filter((function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1})),n.map((function(e){return e[1]-1})),n.distinctUntilChanged())),b=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){var t=e.items;return t.length>0&&0===t[0].index})),n.mapTo(0))),w=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){return e.items.length>0})),n.map((function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),n.distinctUntilChanged((function(e,t){return e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex}))));return n.connect(w,p.scrollSeekRangeChanged),n.connect(n.pipe(y,n.withLatestFrom(S,x,g),n.map((function(e){var t=e[1],n=e[2],r=e[3],o=O(e[0]),i=o.index,a=o.align,s=o.behavior,u=Be(t,n,i=Math.max(0,i,Math.min(r-1,i)));return"end"===a?u=Math.round(u-t.height+n.height):"center"===a&&(u=Math.round(u-t.height/2+n.height/2)),{top:u,behavior:s}}))),m),i({totalCount:g,viewportDimensions:S,itemDimensions:x,scrollTop:u,overscan:r,scrollBy:c,scrollTo:m,scrollToIndex:y,initialItemCount:I},p,{gridState:C},f,{startReached:b,endReached:T,rangeChanged:w,propsReady:h})}),n.tup(M,m,U,$,j));function Re(e,t,n){var r=t.height;return void 0===r||0===n.length?{top:0,bottom:0}:{top:Be(e,t,n[0].index),bottom:Be(e,t,n[n.length-1].index)+r}}function Be(e,t,n){var r=Le(e.width/t.width);return ke(n/r)*t.height}var Me=n.system((function(){var e=n.statefulStream((function(e){return"Item "+e})),t=n.statefulStream({}),r=n.statefulStream("virtuoso-grid-item"),o=n.statefulStream("virtuoso-grid-list"),i=n.statefulStream(ie),a=function(e,r){return void 0===r&&(r=null),n.statefulStreamFromEmitter(n.pipe(t,n.map((function(t){return t[e]})),n.distinctUntilChanged()),r)};return{itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,ListComponent:a("List","div"),ItemComponent:a("Item","div"),ScrollerComponent:a("Scroller","div"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}})),Oe=n.system((function(e){var t=e[0],r=e[1],o={item:se(r.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:n.stream(),ScrollContainer:n.stream(),ListContainer:n.stream(),emptyComponent:n.stream(),scrollSeek:n.stream()};function s(e,t,o){n.connect(n.pipe(e,n.withLatestFrom(r.components),n.map((function(e){var n,r=e[0],a=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+t+" instead."),i({},a,((n={})[t]=r,n))}))),r.components)}return n.subscribe(o.scrollSeek,(function(e){var o=e.placeholder,s=a(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),n.publish(r.components,i({},n.getValue(r.components),{ScrollSeekPlaceholder:o})),n.publish(t.scrollSeekConfiguration,s)})),s(o.ItemContainer,"Item","ItemContainer"),s(o.ListContainer,"List","ListContainer"),s(o.ScrollContainer,"Scroller","ScrollContainer"),i({},t,r,o)}),n.tup(Ee,Me)),Pe=r.memo((function(){var e=Ae("gridState"),t=Ae("listClassName"),n=Ae("itemClassName"),o=Ae("itemContent"),i=Ae("computeItemKey"),a=Ae("isSeeking"),s=Ae("ItemComponent"),u=Ae("ListComponent"),c=Ae("ScrollSeekPlaceholder"),m=Ve("itemDimensions"),f=l((function(e){var t=e.firstChild;t&&m({width:t.offsetWidth,height:t.offsetHeight})}));return r.createElement(u,{ref:f,className:t,style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}},e.items.map((function(t){var u=i(t.index);return a?r.createElement(c,{key:u,style:{height:e.itemHeight,width:e.itemWidth}}):r.createElement(s,{className:n,"data-index":t.index,key:u},o(t.index))})))})),Ue=t.systemToComponent(Oe,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},r.memo((function(e){var t=i({},e),n=Ve("viewportDimensions"),o=l((function(e){n({width:e.offsetWidth,height:e.offsetHeight})}));return r.createElement(Ge,Object.assign({},t),r.createElement("div",{style:pe,ref:o},r.createElement(Pe,null)))}))),je=Ue.Component,Ve=Ue.usePublisher,Ae=Ue.useEmitterValue,Ge=ge({usePublisher:Ve,useEmitterValue:Ae,useEmitter:Ue.useEmitter}),Ne=Ce,We=je;exports.GroupedVirtuoso=Ce,exports.Virtuoso=Ne,exports.VirtuosoGrid=We; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@virtuoso.dev/react-urx"),n=require("@virtuoso.dev/urx"),r=require("react"),o=(e=require("resize-observer-polyfill"))&&"object"==typeof e&&"default"in e?e.default:e;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){void 0===t&&(t=!0);var n=r.useRef(null),i=new o((function(t){var n=t[0].target;null!==n.offsetParent&&e(n)}));return function(e){e&&t?(i.observe(e),n.current=e):(n.current&&i.unobserve(n.current),n.current=null)}}var c="up",m=n.system((function(){var e=n.stream(),t=n.statefulStream(0),r=n.stream(),o=n.statefulStream(0),i=n.stream(),a=n.stream(),s=n.stream();n.connect(e,o);var u=n.statefulStream("down");return n.connect(n.pipe(e,n.scan((function(e,t){return{direction:t<e.prevScrollTop?c:"down",prevScrollTop:t}}),{direction:"down",prevScrollTop:0}),n.map((function(e){return e.direction}))),u),{scrollTop:e,viewportHeight:i,smoothScrollTargetReached:r,scrollTo:a,scrollBy:s,scrollDirection:u,statefulScrollTop:o,deviation:t}}),[],{singleton:!0}),f={lvl:0};function p(e,t,n,r,o){return void 0===r&&(r=f),void 0===o&&(o=f),{k:e,v:t,lvl:n,l:r,r:o}}function d(e){return e===f}function h(){return f}function v(e,t){if(d(e))return f;var n=e.k,r=e.l,o=e.r;if(t===n){if(d(r))return o;if(d(o))return r;var i=function e(t){return d(t.r)?[t.k,t.v]:e(t.r)}(r);return T(x(e,{k:i[0],v:i[1],l:S(r)}))}return T(x(e,t<n?{l:v(r,t)}:{r:v(o,t)}))}function g(e,t){if(!d(e))return t===e.k?e.v:g(t<e.k?e.l:e.r,t)}function I(e,t,n){if(void 0===n&&(n="k"),d(e))return[-Infinity,void 0];if(e[n]===t)return[e.k,e.v];if(e[n]<t){var r=I(e.r,t,n);return-Infinity===r[0]?[e.k,e.v]:r}return I(e.l,t,n)}function C(e,t,n){return d(e)?p(t,n,1):t===e.k?x(e,{k:t,v:n}):function(e){return w(k(e))}(x(e,t<e.k?{l:C(e.l,t,n)}:{r:C(e.r,t,n)}))}function S(e){return d(e.r)?e.l:T(x(e,{r:S(e.r)}))}function x(e,t){return p(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function y(e){return d(e)||e.lvl>e.r.lvl}function T(e){var t=e.l,n=e.r,r=e.lvl;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(y(t))return k(x(e,{lvl:r-1}));if(d(t)||d(t.r))throw new Error("Unexpected empty nodes");return x(t.r,{l:x(t,{r:t.r.l}),r:x(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(y(e))return w(x(e,{lvl:r-1}));if(d(n)||d(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=y(o)?n.lvl-1:n.lvl;return x(o,{l:x(e,{r:o.l,lvl:r-1}),r:w(x(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function b(e,t,n){return d(e)?[]:function(e){if(0===e.length)return[];for(var t=e[0],n=t.k,r=t.v,o=[],i=1;i<=e.length;i++){var a=e[i];o.push({start:n,end:a?a.k-1:Infinity,value:r}),a&&(n=a.k,r=a.v)}return o}(function e(t,n,r){if(d(t))return[];var o=t.k,i=t.v,a=t.r,s=[];return o>n&&(s=s.concat(e(t.l,n,r))),o>=n&&o<=r&&s.push({k:o,v:i}),o<=r&&(s=s.concat(e(a,n,r))),s}(e,I(e,t)[0],n))}function w(e){var t=e.r,n=e.lvl;return d(t)||d(t.r)||t.lvl!==n||t.r.lvl!==n?e:x(t,{l:x(e,{r:t.l}),lvl:n+1})}function k(e){var t=e.l;return d(t)||t.lvl!==e.lvl?e:x(t,{r:x(e,{l:t.r})})}function H(e){var t=e.size,n=e.startIndex,r=e.endIndex;return function(e){return e.start===n&&(e.end===r||Infinity===e.end)&&e.value===t}}function z(e,t){var n=t[0],r=t[1],o=e.sizeTree,i=e.offsetTree,a=o,s=0;if(r.length>0&&d(o)&&2===n.length){var l=n[0].size,c=n[1].size;a=r.reduce((function(e,t){return C(C(e,t,l),t+1,c)}),a)}else{var m=function(e,t,n){void 0===n&&(n=function(){});for(var r,o=d(e)?0:Infinity,i=u(t);!(r=i()).done;){var a=r.value,s=a.size,l=a.startIndex,c=a.endIndex;if(o=Math.min(o,l),d(e))e=C(e,0,s);else{var m=b(e,l-1,c+1);if(!m.some(H(a))){for(var f,p=!1,h=!1,g=u(m);!(f=g()).done;){var I=f.value,S=I.start,x=I.end,y=I.value;p?(c>=S||s===y)&&(e=v(e,S),n(S)):(h=y!==s,p=!0),x>c&&c>=S&&y!==s&&(e=C(e,c+1,y))}h&&(e=C(e,l,s))}}}return[e,o]}(a,n,(function(e){i=v(i,e)}));a=m[0],s=m[1]}if(a===o)return e;var f=0,p=0,S=0;if(0!==s){f=I(i,s-1)[1];var x=I(a,s-1);p=x[0],S=x[1]}else S=g(a,0);for(var y,T=u(b(a,s,Infinity));!(y=T()).done;){var w=y.value,k=w.start,z=w.value,F=(k-p)*S+f;i=C(i,k,F),p=k,f=F,S=z}return{offsetTree:i,sizeTree:a,groupOffsetTree:r.reduce((function(e,t){return C(e,t,L(t,{offsetTree:i,sizeTree:a}))}),h()),lastIndex:p,lastOffset:f,lastSize:S,groupIndices:r}}function L(e,t){if(d(t.offsetTree))return 0;var n=I(t.offsetTree,e),r=n[0],o=n[1];return I(t.sizeTree,e)[1]*(e-r)+o}function F(e,t){if(d(t.groupOffsetTree))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}var E=n.system((function(){var e=n.stream(),t=n.stream(),r=n.stream(),o=n.statefulStream(0),a=n.statefulStream([]),s=n.statefulStream(void 0),u=n.statefulStream(void 0),l=n.statefulStream(void 0),c={offsetTree:h(),sizeTree:h(),groupOffsetTree:h(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},m=n.statefulStreamFromEmitter(n.pipe(e,n.withLatestFrom(a),n.scan(z,c),n.distinctUntilChanged()),c);n.connect(n.pipe(a,n.filter((function(e){return e.length>0})),n.withLatestFrom(m),n.map((function(e){var t=e[0],n=e[1],r=t.reduce((function(e,t,r){return C(e,t,L(t,n)||r)}),h());return i({},n,{groupIndices:t,groupOffsetTree:r})}))),m),n.connect(s,u);var f=n.statefulStreamFromEmitter(n.pipe(s,n.map((function(e){return void 0===e}))),!0);n.connect(n.pipe(u,n.filter((function(e){return void 0!==e})),n.map((function(e){return[{startIndex:0,endIndex:0,size:e}]}))),e);var p=n.streamFromEmitter(n.pipe(e,n.withLatestFrom(m),n.scan((function(e,t){var n=t[1];return{changed:n!==e.sizes,sizes:n}}),{changed:!1,sizes:c}),n.map((function(e){return e.changed}))));return n.connect(n.pipe(r,n.withLatestFrom(m),n.map((function(e){var t=e[0],n=e[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return function e(t){return d(t)?[]:[].concat(e(t.l),[{k:t.k,v:t.v}],e(t.r))}(n.sizeTree).reduce((function(e,n){var r=n.k,o=n.v;return{ranges:[].concat(e.ranges,[{startIndex:e.prevIndex,endIndex:r+t-1,size:e.prevSize}]),prevIndex:r+t,prevSize:o}}),{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges}))),e),n.connect(n.pipe(o,n.scan((function(e,t){return{diff:e.prev-t,prev:t}}),{diff:0,prev:0}),n.map((function(e){return e.diff})),n.filter((function(e){return e>0}))),r),{data:l,totalCount:t,sizeRanges:e,groupIndices:a,defaultItemSize:u,fixedItemSize:s,unshiftWith:r,firstItemIndex:o,sizes:m,listRefresh:p,trackItemSizes:f}}),[],{singleton:!0}),R=function(e,t){return e&&e[0]===t[0]&&e[1]===t[1]},B=function(e,t,n){return"number"==typeof e?n===c&&"top"===t||"down"===n&&"bottom"===t?e:0:n===c?"top"===t?e.main:e.reverse:"bottom"===t?e.main:e.reverse},M=n.system((function(e){var t=e[0],r=t.scrollTop,o=t.viewportHeight,i=t.deviation,a=n.stream(),s=n.statefulStream(0),u=n.statefulStream(0),l=n.statefulStream(0),m=n.statefulStream(0);return{listBoundary:a,headerHeight:s,footerHeight:u,overscan:m,topListHeight:l,visibleRange:n.statefulStreamFromEmitter(n.pipe(n.combineLatest(n.duc(r),n.duc(o),n.duc(s),n.duc(a,R),n.duc(m),n.duc(l),n.duc(i)),n.map((function(e){var t=e[0],n=e[1],r=e[3],o=r[0],i=r[1],a=e[4],s=e[6],u=t-e[2]-s,l="none";return(o-=s)>t+e[5]&&(l=c),(i-=s)<t+n&&(l="down"),"none"!==l?[Math.max(u-B(a,"top",l),0),u+n+B(a,"bottom",l)]:null})),n.filter((function(e){return null!=e})),n.distinctUntilChanged(R)),[0,0])}}),n.tup(m),{singleton:!0});function P(e){var t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior||(t.behavior="auto"),t}var O=n.system((function(e){var t=e[0],r=t.sizes,o=t.totalCount,i=t.listRefresh,a=e[1],s=a.viewportHeight,u=a.scrollTo,l=a.smoothScrollTargetReached,c=e[2].headerHeight,m=n.stream(),f=n.statefulStream(0),p=null,d=null,h=null,v=function(){p&&(p(),p=null),h&&(h(),h=null),d&&(clearTimeout(d),d=null)};return n.connect(n.pipe(m,n.withLatestFrom(r,s,o,f,c),n.map((function(e){var t=e[0],r=e[1],o=e[2],a=e[3],s=e[4],u=e[5],c=P(t),f=c.index,g=c.align,C=c.behavior;f=F(f,r);var S=L(f=Math.max(0,f,Math.min(a-1,f)),r)+u;"end"===g?S=Math.round(S-o+I(r.sizeTree,f)[1]):"center"===g?S=Math.round(S-o/2+I(r.sizeTree,f)[1]/2):S-=s;var x=function(e){v(),e&&n.publish(m,t)};if(v(),"smooth"===C){var y=!1;h=n.subscribe(i,(function(e){y=y||e})),p=n.handleNext(l,(function(){x(y)}))}else p=n.handleNext(i,x);return d=setTimeout((function(){v()}),1200),{top:S,behavior:C}}))),u),{scrollToIndex:m,topListHeight:f}}),n.tup(E,m,M),{singleton:!0}),U=n.system((function(e){var t=e[0],r=t.scrollTop,o=t.viewportHeight,i=n.statefulStream(!1),a=n.statefulStream(!0),s=n.stream(),u=n.stream(),l=n.stream(),c=n.streamFromEmitter(n.pipe(n.merge(n.pipe(n.duc(r),n.skip(1),n.mapTo(!0)),n.pipe(n.duc(r),n.skip(1),n.mapTo(!1),n.debounceTime(100))),n.distinctUntilChanged()));return n.connect(n.pipe(n.duc(r),n.map((function(e){return 0===e})),n.distinctUntilChanged()),a),n.connect(a,u),n.connect(n.pipe(n.combineLatest(l,n.duc(r),n.duc(o)),n.map((function(e){var t=e[0];return 0===t.offsetBottom&&e[1]+e[2]-t.bottom>-4})),n.distinctUntilChanged()),i),n.subscribe(i,(function(e){setTimeout((function(){return n.publish(s,e)}))})),{isScrolling:c,isAtTop:a,isAtBottom:i,atTopStateChange:u,atBottomStateChange:s,listStateListener:l}}),n.tup(m)),j=n.system((function(){var e=n.statefulStream(!1);return{propsReady:e,didMount:n.streamFromEmitter(n.pipe(e,n.filter((function(e){return e})),n.distinctUntilChanged()))}}),[],{singleton:!0}),V=n.system((function(e){var t=e[0],r=t.sizes,o=t.listRefresh,i=e[1].scrollTop,a=e[2].scrollToIndex,s=e[3].didMount,u=n.statefulStream(!0),l=n.statefulStream(0);return n.connect(n.pipe(s,n.withLatestFrom(l),n.filter((function(e){return 0!==e[1]})),n.mapTo(!1)),u),n.subscribe(n.pipe(o,n.withLatestFrom(u,r),n.filter((function(e){var t=e[1];return!d(e[2].sizeTree)&&!t})),n.withLatestFrom(l)),(function(e){var t=e[1];n.handleNext(i,(function(){n.publish(u,!0)})),n.publish(a,t)})),{scrolledToInitialItem:u,initialTopMostItemIndex:l}}),n.tup(E,m,O,j),{singleton:!0}),A=n.system((function(e){var t=e[0],r=t.totalCount,o=t.listRefresh,i=e[1].isAtBottom,a=e[2].scrollToIndex,s=e[3].scrolledToInitialItem,u=n.statefulStream(!1);return n.subscribe(n.pipe(n.duc(r),n.withLatestFrom(u,i,s),n.filter((function(e){return e[1]&&e[2]&&e[3]}))),(function(e){var t=e[0],r=e[1];n.handleNext(o,(function(){var e;n.publish(a,{index:t-1,align:"end",behavior:(e=r,"smooth"===e?"smooth":"auto")})}))})),{followOutput:u}}),n.tup(E,U,O,V));function G(e){return e.reduce((function(e,t){return e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e}),{totalCount:0,groupIndices:[]})}var N=n.system((function(e){var t=e[0],r=t.totalCount,o=t.groupIndices,i=t.sizes,a=e[1].scrollTop,s=n.stream(),u=n.stream(),l=n.streamFromEmitter(n.pipe(s,n.map(G)));return n.connect(n.pipe(l,n.map(n.prop("totalCount"))),r),n.connect(n.pipe(l,n.map(n.prop("groupIndices"))),o),n.connect(n.pipe(n.combineLatest(a,i),n.filter((function(e){return!d(e[1].groupOffsetTree)})),n.map((function(e){return I(e[1].groupOffsetTree,e[0],"v")[0]})),n.distinctUntilChanged(),n.map((function(e){return[e]}))),u),{groupCounts:s,topItemsIndexes:u}}),n.tup(E,m)),W={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0};function K(e,t,n){if(0===e.length)return[];if(d(t.groupOffsetTree))return e.map((function(e){return i({},e,{index:e.index+n,originalIndex:e.index})}));for(var r,o=[],a=b(t.groupOffsetTree,e[0].index,e[e.length-1].index),s=void 0,l=0,c=u(e);!(r=c()).done;){var m=r.value;(!s||s.end<m.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),o.push(i({},m.index===s.start?{type:"group",index:l}:{index:m.index-(l+1)+n,groupIndex:l},{size:m.size,offset:m.offset,originalIndex:m.index,data:m.data}))}return o}function D(e,t,n,r,o){var i=0,a=0;if(e.length>0){i=e[0].offset;var s=e[e.length-1];a=s.offset+s.size}var u=i,l=r.lastOffset+(n-r.lastIndex)*r.lastSize-a;return{items:K(e,r,o),topItems:K(t,r,o),topListHeight:t.reduce((function(e,t){return t.size+e}),0),offsetTop:i,offsetBottom:l,top:u,bottom:a}}var q,Y,_=n.system((function(e){var t=e[0].statefulScrollTop,r=e[1],o=r.sizes,a=r.totalCount,s=r.data,l=r.firstItemIndex,c=e[2],m=e[3],f=m.visibleRange,p=m.listBoundary,h=m.topListHeight,v=e[4],C=v.scrolledToInitialItem,S=v.initialTopMostItemIndex,x=e[5].topListHeight,y=e[6],T=e[7].didMount,w=n.statefulStream([]),k=n.stream();n.connect(c.topItemsIndexes,w);var H=n.statefulStreamFromEmitter(n.pipe(n.combineLatest(T,n.duc(f),n.duc(a),n.duc(o),n.duc(S),C,n.duc(w),n.duc(l),s),n.filter((function(e){return e[0]})),n.map((function(e){var r=e[1],o=r[0],i=r[1],a=e[2],s=e[4],l=e[5],c=e[6],m=e[7],f=e[8],p=e[3],h=p.sizeTree,v=p.offsetTree;if(0===a||0===o&&0===i)return W;if(d(h))return D(function(e,t,n){if(!d(t.groupOffsetTree)){var r=F(e,t);return[{index:I(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(s,p,f),[],a,p,m);var C=[];if(c.length>0)for(var S,x=c[0],y=c[c.length-1],T=0,w=u(b(h,x,y));!(S=w()).done;)for(var k=S.value,H=k.value,z=Math.max(k.start,x),L=Math.min(k.end,y),E=z;E<=L;E++)C.push({index:E,size:H,offset:T,data:f&&f[E]}),T+=H;if(!l)return D([],C,a,p,m);d(p.groupOffsetTree)||(c=[I(p.groupOffsetTree,n.getValue(t),"v")[0]]);var R=c.length>0?c[c.length-1]+1:0,B=Math.max(R,I(v,o,"v")[0]),M=I(v,i,"v")[0],P=a-1;return D(n.tap([],(function(e){for(var t,n=u(b(v,B,M));!(t=n()).done;){var r=t.value,a=r.value,s=r.start,l=g(h,s);r.value<o&&(a+=((s+=Math.floor((o-r.value)/l))-r.start)*l),s<R&&(a+=(R-s)*l,s=R);for(var c=Math.min(r.end,P),m=s;m<=c&&!(a>=i);m++)e.push({index:m,size:l,offset:a,data:f&&f[m]}),a+=l}})),C,a,p,m)})),n.distinctUntilChanged()),W);return n.connect(n.pipe(s,n.filter((function(e){return void 0!==e})),n.map((function(e){return e.length}))),a),n.connect(n.pipe(H,n.map(n.prop("topListHeight"))),x),n.connect(x,h),n.connect(H,y.listStateListener),n.connect(n.pipe(H,n.map((function(e){return[e.top,e.bottom]}))),p),n.connect(n.pipe(H,n.map((function(e){return e.items}))),k),i({listState:H,topItemsIndexes:w,endReached:n.streamFromEmitter(n.pipe(H,n.filter((function(e){return e.items.length>0})),n.withLatestFrom(a),n.filter((function(e){var t=e[0].items;return t[t.length-1].originalIndex===e[1]-1})),n.map((function(e){return e[1]-1})),n.distinctUntilChanged())),startReached:n.streamFromEmitter(n.pipe(H,n.filter((function(e){var t=e.items;return t.length>0&&t[0].originalIndex===e.topItems.length})),n.map((function(e){return e.items[0].index})),n.distinctUntilChanged())),rangeChanged:n.streamFromEmitter(n.pipe(H,n.filter((function(e){return e.items.length>0})),n.map((function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),n.distinctUntilChanged((function(e,t){return e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex})))),itemsRendered:k},y)}),n.tup(m,E,N,M,V,O,U,j),{singleton:!0}),Z=n.system((function(e){var t=e[0],r=t.sizes,o=t.firstItemIndex,i=e[1].listState,a=e[2].didMount,s=n.statefulStream(0);return n.connect(n.pipe(a,n.withLatestFrom(s),n.filter((function(e){return 0!==e[1]})),n.withLatestFrom(r,o),n.map((function(e){var t=e[0][1],n=e[1],r=e[2],o=0;if(n.groupIndices.length>0)for(var i,a=u(n.groupIndices);!((i=a()).done||i.value-o>=t);)o++;var s=t+o;return D(Array.from({length:s}).map((function(e,t){return{index:t,size:0,offset:0}})),[],s,n,r)}))),i),{initialItemCount:s}}),n.tup(E,_,j),{singleton:!0}),$=n.system((function(e){var t=e[0].scrollTop,r=e[1].isScrolling,o=n.statefulStream(0),i=n.statefulStream(!1),a=n.stream(),s=n.statefulStream(!1);return n.connect(n.pipe(r,n.filter((function(e){return!e})),n.mapTo(0)),o),n.connect(n.pipe(t,n.throttleTime(100),n.scan((function(e,t){return[e[1],t]}),[0,0]),n.map((function(e){return e[1]-e[0]}))),o),n.connect(n.pipe(o,n.withLatestFrom(s,i,a),n.filter((function(e){return!!e[1]})),n.map((function(e){var t=e[0],n=e[1],r=e[2],o=e[3],i=n.enter;if(r){if((0,n.exit)(t,o))return!1}else if(i(t,o))return!0;return r})),n.distinctUntilChanged()),i),n.subscribe(n.pipe(n.combineLatest(i,o,a),n.withLatestFrom(s)),(function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change&&n.change(t[1],t[2])})),{isSeeking:i,scrollSeekConfiguration:s,scrollVelocity:o,scrollSeekRangeChanged:a}}),n.tup(m,U),{singleton:!0}),J=n.system((function(e){var t=e[0].topItemsIndexes,r=n.statefulStream(0);return n.connect(n.pipe(r,n.filter((function(e){return e>0})),n.map((function(e){return Array.from({length:e}).map((function(e,t){return t}))}))),t),{topItemCount:r}}),n.tup(_)),Q=n.system((function(e){var t=e[0],r=t.footerHeight,o=t.headerHeight,i=e[1].listState,a=n.stream(),s=n.statefulStreamFromEmitter(n.pipe(n.combineLatest(r,o,i),n.map((function(e){var t=e[2];return e[0]+e[1]+t.offsetBottom+t.bottom}))),0);return n.connect(n.duc(s),a),{totalListHeight:s,totalListHeightChanged:a}}),n.tup(M,_),{singleton:!0}),X="undefined"!=typeof window&&(null===(q=window)||void 0===q||null===(Y=q.navigator)||void 0===Y?void 0:Y.userAgent),ee=X&&(!!X.match(/iPad/i)||!!X.match(/iPhone/i)),te=n.system((function(e){var t=e[0],r=t.scrollBy,o=t.deviation,i=e[1].isScrolling,a=e[2].listState,s=e[3],u=s.unshiftWith,l=s.sizes,m=s.listRefresh,f=n.pipe(a,n.withLatestFrom(t.scrollTop,t.scrollDirection),n.filter((function(e){return 0!==e[1]&&e[2]===c})),n.map((function(e){return e[0]})),n.scan((function(e,t){var n=e[1],r=t.items,o=0;if(n.length>0&&r.length>0&&(0!==n[0].originalIndex||0!==r[0].originalIndex)){var i=function(e){var t=r[e],i=n.find((function(e){return e.originalIndex===t.originalIndex}));return i?t.offset!==i.offset?(o=t.offset-i.offset,"break"):void 0:"continue"};e:for(var a=r.length-1;a>=0;a--)switch(i(a)){case"continue":continue;case"break":break e}}return[o,r]}),[0,[]]),n.filter((function(e){return 0!==e[0]})),n.map((function(e){return e[0]})));return ee?(n.connect(n.pipe(f,n.withLatestFrom(o),n.map((function(e){return e[1]-e[0]}))),o),n.subscribe(n.pipe(i,n.filter((function(e){return!e})),n.withLatestFrom(o),n.filter((function(e){return 0!==e[1]})),n.map((function(e){return e[1]}))),(function(e){n.publish(r,{top:-e,behavior:"auto"}),n.publish(o,0)}))):n.connect(n.pipe(f,n.map((function(e){return{top:e,behavior:"auto"}}))),r),n.subscribe(n.pipe(u,n.withLatestFrom(l,a),n.map((function(e){var t=e[2];return{index:t.items[0].index+e[0],offset:L(t.items[0].index,e[1])}}))),(function(e){var t=e.index,o=e.offset;n.handleNext(m,(function(){var e=L(t,n.getValue(l));n.publish(r,{top:e-o})}))})),{deviation:o}}),n.tup(m,U,_,E)),ne=n.system((function(e){var t=e[0].totalListHeight,r=e[1].didMount,o=e[2].scrollTo,i=n.statefulStream(0);return n.subscribe(n.pipe(r,n.withLatestFrom(i),n.filter((function(e){return 0!==e[1]})),n.map((function(e){return{top:e[1]}}))),(function(e){n.handleNext(n.pipe(t,n.filter((function(e){return 0!==e}))),(function(){n.publish(o,e)}))})),{initialScrollTop:i}}),n.tup(Q,j,m),{singleton:!0}),re=n.system((function(e){var t=e[0],r=t.totalCount,o=t.sizeRanges,s=t.fixedItemSize,u=t.defaultItemSize,l=t.trackItemSizes,c=t.data,m=t.firstItemIndex,f=t.groupIndices,p=e[1].initialTopMostItemIndex,d=e[2],h=d.deviation,v=d.viewportHeight,g=d.scrollTo,I=d.scrollBy,C=d.scrollTop,S=d.smoothScrollTargetReached,x=e[3],y=e[4],T=y.listState,b=y.topItemsIndexes,w=a(y,["listState","topItemsIndexes"]),k=e[5].scrollToIndex,H=e[7].topItemCount,z=e[8].groupCounts,L=e[9];return n.connect(w.rangeChanged,L.scrollSeekRangeChanged),i({totalCount:r,data:c,firstItemIndex:m,sizeRanges:o,viewportHeight:v,scrollTop:C,smoothScrollTargetReached:S,initialTopMostItemIndex:p,topItemsIndexes:b,topItemCount:H,groupCounts:z,fixedItemHeight:s,defaultItemHeight:u,followOutput:x.followOutput,listState:T,scrollTo:g,scrollBy:I,scrollToIndex:k,trackItemSizes:l,groupIndices:f,deviation:h},w,L)}),n.tup(E,V,m,A,_,O,te,J,N,n.system((function(e){return i({},e[0],e[1],e[2],e[3],e[4],e[5])}),n.tup(M,Z,j,$,Q,ne))));function oe(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var ie=oe((function(){if("undefined"==typeof document)return"sticky";var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"}));function ae(e){return e}var se=n.system((function(){var e=n.statefulStream((function(e){return"Item "+e})),t=n.statefulStream((function(e){return"Group "+e})),r=n.statefulStream({}),o=n.statefulStream(ae),i=n.statefulStream("div"),a=function(e,t){return void 0===t&&(t=null),n.statefulStreamFromEmitter(n.pipe(r,n.map((function(t){return t[e]})),n.distinctUntilChanged()),t)};return{itemContent:e,groupContent:t,components:r,computeItemKey:o,headerFooterTag:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}));function ue(e,t){var r=n.stream();return n.subscribe(r,(function(){return console.warn("react-virtuoso: You are using a deprecated property. "+t,"color: red;","color: inherit;","color: blue;")})),n.connect(r,e),r}var le=n.system((function(e){var t=e[0],r=e[1],o={item:ue(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:ue(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:ue(t.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:ue(t.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:ue(t.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:n.stream(),maxHeightCacheSize:n.stream(),footer:n.stream(),header:n.stream(),HeaderContainer:n.stream(),FooterContainer:n.stream(),ItemContainer:n.stream(),ScrollContainer:n.stream(),GroupContainer:n.stream(),ListContainer:n.stream(),emptyComponent:n.stream(),scrollSeek:n.stream()};function s(e,t,o){n.connect(n.pipe(e,n.withLatestFrom(r.components),n.map((function(e){var n,r=e[0],a=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+t+" instead."),i({},a,((n={})[t]=r,n))}))),r.components)}return n.subscribe(o.adjustForPrependedItems,(function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;")})),n.subscribe(o.maxHeightCacheSize,(function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.")})),n.subscribe(o.HeaderContainer,(function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.")})),n.subscribe(o.FooterContainer,(function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.")})),n.subscribe(o.scrollSeek,(function(e){var o=e.placeholder,s=a(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),n.publish(r.components,i({},n.getValue(r.components),{ScrollSeekPlaceholder:o})),n.publish(t.scrollSeekConfiguration,s)})),s(o.footer,"Footer","footer"),s(o.header,"Header","header"),s(o.ItemContainer,"Item","ItemContainer"),s(o.ListContainer,"List","ListContainer"),s(o.ScrollContainer,"Scroller","ScrollContainer"),s(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),s(o.GroupContainer,"Group","GroupContainer"),i({},t,r,o)}),n.tup(re,se)),ce=function(e){return r.createElement("div",{style:{height:e.height}})},me={position:ie(),zIndex:1},fe=r.memo((function(e){var t,n=e.showTopList,o=void 0!==n&&n,i=ye("listState"),a=ye("deviation"),s=xe("sizeRanges"),u=ye("itemContent"),c=ye("groupContent"),m=(t=s,l((function(e){var n=function(e,t){var n=e.length;if(0===n)return null;for(var r=[],o=0;o<n;o++){var i=e.item(o);if(i&&void 0!==i.dataset.index){var a=parseInt(i.dataset.index),s=parseInt(i.dataset.knownSize),u=i.offsetHeight;if(0===u)throw new Error("Zero-sized element, this should not happen");if(u!==s){var l=r[r.length-1];0===r.length||l.size!==u||l.endIndex!==a-1?r.push({startIndex:a,endIndex:a,size:u}):r[r.length-1].endIndex++}}}return r}(e.children);null!==n&&t(n)}),ye("trackItemSizes"))),f=ye("EmptyPlaceholder"),p=ye("ScrollSeekPlaceholder")||ce,d=ye("ListComponent"),h=ye("ItemComponent"),v=ye("GroupComponent"),g=ye("computeItemKey"),I=ye("isSeeking"),C=ye("groupIndices").length>0,S=o?{}:{paddingTop:i.offsetTop,paddingBottom:i.offsetBottom,marginTop:a};return!o&&0===i.items.length&&f?r.createElement(f):r.createElement(d,{ref:m,style:S},(o?i.topItems:i.items).map((function(e){var t=e.originalIndex,n=g(t);return I?r.createElement(p,{key:n,index:e.index,height:e.size}):"group"===e.type?r.createElement(v,{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:me},c(e.index)):r.createElement(h,{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex},u.apply(null,C?[e.index,e.groupIndex,e.data]:[e.index,e.data]))})))})),pe={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},de={width:"100%",height:"100%",position:"absolute",top:0},he={width:"100%",position:ie(),top:0},ve=r.memo((function(){var e=ye("HeaderComponent"),t=xe("headerHeight"),n=ye("headerFooterTag"),o=l((function(e){return t(e.offsetHeight)}));return e?r.createElement(n,{ref:o},r.createElement(e)):null})),ge=r.memo((function(){var e=ye("FooterComponent"),t=xe("footerHeight"),n=ye("headerFooterTag"),o=l((function(e){return t(e.offsetHeight)}));return e?r.createElement(n,{ref:o},r.createElement(e)):null}));function Ie(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return r.memo((function(e){var s=e.style,u=e.children,l=a(e,["style","children"]),c=t("scrollTop"),m=o("ScrollerComponent"),f=function(e,t,n){var o=r.useRef(null),i=r.useRef(null),a=r.useRef(null),s=r.useCallback((function(n){var r=n.target,o=r.scrollTop;e(Math.max(o,0)),null!==i.current&&(o===i.current||o<=0||o===r.scrollHeight-r.offsetHeight)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))}),[e,t]);return r.useEffect((function(){var e=o.current;return s({target:e}),e.addEventListener("scroll",s,{passive:!0}),function(){e.removeEventListener("scroll",s)}}),[o,s,n]),{scrollerRef:o,scrollByCallback:function(e){null===i.current&&o.current.scrollBy(e)},scrollToCallback:function(n){var r=o.current;if(r){var s="smooth"===n.behavior;if(r.offsetHeight===r.scrollHeight||n.top===r.scrollTop)return e(r.scrollTop),void(s&&t(!0));n.top=Math.max(Math.min(r.scrollHeight-r.offsetHeight,n.top),0),s?(i.current=n.top,a.current&&clearTimeout(a.current),a.current=setTimeout((function(){a.current=null,i.current=null,t(!0)}),1e3)):i.current=null,r.scrollTo(n)}}}}(c,t("smoothScrollTargetReached"),m),p=f.scrollerRef,d=f.scrollByCallback;return n("scrollTo",f.scrollToCallback),n("scrollBy",d),r.createElement(m,i({ref:p,style:i({},pe,s),tabIndex:0},l),u)}))}var Ce=t.systemToComponent(le,{required:{},optional:{itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",scrollSeekConfiguration:"scrollSeekConfiguration",followOutput:"followOutput",headerFooterTag:"headerFooterTag",data:"data",firstItemIndex:"firstItemIndex",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},r.memo((function(e){var t=i({},e),o=xe("viewportHeight"),a=l(n.compose(o,n.prop("offsetHeight"))),s=ye("headerHeight");return r.createElement(Te,Object.assign({},t),r.createElement("div",{style:de,ref:a},r.createElement(ve,null),r.createElement(fe,null),r.createElement(ge,null)),r.createElement("div",{style:i({},he,{marginTop:s+"px"})},r.createElement(fe,{showTopList:!0})))}))),Se=Ce.Component,xe=Ce.usePublisher,ye=Ce.useEmitterValue,Te=Ie({usePublisher:xe,useEmitterValue:ye,useEmitter:Ce.useEmitter}),be={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},we={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},ke=Math.ceil,He=Math.floor,ze=Math.min,Le=Math.max,Fe=function(e){return ke(e)-e<.03?ke(e):He(e)};function Ee(e,t){return Array.from({length:t-e+1}).map((function(t,n){return{index:n+e}}))}var Re=n.system((function(e){var t=e[0],r=t.overscan,o=t.visibleRange,a=t.listBoundary,s=e[1],u=s.scrollTop,l=s.viewportHeight,c=s.scrollBy,m=s.scrollTo,f=e[2],p=e[3],d=e[4],h=d.propsReady,v=d.didMount,g=n.statefulStream(0),I=n.statefulStream(0),C=n.statefulStream(be),S=n.statefulStream({height:0,width:0}),x=n.statefulStream({height:0,width:0}),y=n.stream();n.connect(n.pipe(v,n.withLatestFrom(I),n.filter((function(e){return 0!==e[1]})),n.map((function(e){return{items:Ee(0,e[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}}))),C),n.connect(n.pipe(n.combineLatest(n.duc(g),o,x),n.withLatestFrom(S),n.map((function(e){var t=e[0],n=t[0],r=t[1],o=r[0],i=r[1],a=t[2],s=e[1],u=a.height,l=a.width;if(0===n)return be;if(0===l)return we;var c=Fe(s.width/l),m=c*He(o/u),f=c*ke(i/u)-1;f=ze(n-1,f);var p=Ee(m=ze(f,Le(0,m)),f),d=Be(s,a,p),h=d.top,v=d.bottom;return{items:p,offsetTop:h,offsetBottom:ke(n/c)*u-v,top:h,bottom:v,itemHeight:u,itemWidth:l}}))),C),n.connect(n.pipe(S,n.map((function(e){return e.height}))),l),n.connect(n.pipe(n.combineLatest(S,x,C),n.map((function(e){var t=Be(e[0],e[1],e[2].items);return[t.top,t.bottom]}))),a),n.connect(n.pipe(a,n.withLatestFrom(C),n.map((function(e){return{bottom:e[0][1],offsetBottom:e[1].offsetBottom}}))),f.listStateListener);var T=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){return e.items.length>0})),n.withLatestFrom(g),n.filter((function(e){var t=e[0].items;return t[t.length-1].index===e[1]-1})),n.map((function(e){return e[1]-1})),n.distinctUntilChanged())),b=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){var t=e.items;return t.length>0&&0===t[0].index})),n.mapTo(0))),w=n.streamFromEmitter(n.pipe(n.duc(C),n.filter((function(e){return e.items.length>0})),n.map((function(e){var t=e.items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),n.distinctUntilChanged((function(e,t){return e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex}))));return n.connect(w,p.scrollSeekRangeChanged),n.connect(n.pipe(y,n.withLatestFrom(S,x,g),n.map((function(e){var t=e[1],n=e[2],r=e[3],o=P(e[0]),i=o.index,a=o.align,s=o.behavior,u=Me(t,n,i=Math.max(0,i,Math.min(r-1,i)));return"end"===a?u=Math.round(u-t.height+n.height):"center"===a&&(u=Math.round(u-t.height/2+n.height/2)),{top:u,behavior:s}}))),m),i({totalCount:g,viewportDimensions:S,itemDimensions:x,scrollTop:u,overscan:r,scrollBy:c,scrollTo:m,scrollToIndex:y,initialItemCount:I},p,{gridState:C},f,{startReached:b,endReached:T,rangeChanged:w,propsReady:h})}),n.tup(M,m,U,$,j));function Be(e,t,n){var r=t.height;return void 0===r||0===n.length?{top:0,bottom:0}:{top:Me(e,t,n[0].index),bottom:Me(e,t,n[n.length-1].index)+r}}function Me(e,t,n){var r=Fe(e.width/t.width);return He(n/r)*t.height}var Pe=n.system((function(){var e=n.statefulStream((function(e){return"Item "+e})),t=n.statefulStream({}),r=n.statefulStream("virtuoso-grid-item"),o=n.statefulStream("virtuoso-grid-list"),i=n.statefulStream(ae),a=function(e,r){return void 0===r&&(r=null),n.statefulStreamFromEmitter(n.pipe(t,n.map((function(t){return t[e]})),n.distinctUntilChanged()),r)};return{itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,ListComponent:a("List","div"),ItemComponent:a("Item","div"),ScrollerComponent:a("Scroller","div"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}})),Oe=n.system((function(e){var t=e[0],r=e[1],o={item:ue(r.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:n.stream(),ScrollContainer:n.stream(),ListContainer:n.stream(),emptyComponent:n.stream(),scrollSeek:n.stream()};function s(e,t,o){n.connect(n.pipe(e,n.withLatestFrom(r.components),n.map((function(e){var n,r=e[0],a=e[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+t+" instead."),i({},a,((n={})[t]=r,n))}))),r.components)}return n.subscribe(o.scrollSeek,(function(e){var o=e.placeholder,s=a(e,["placeholder"]);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),n.publish(r.components,i({},n.getValue(r.components),{ScrollSeekPlaceholder:o})),n.publish(t.scrollSeekConfiguration,s)})),s(o.ItemContainer,"Item","ItemContainer"),s(o.ListContainer,"List","ListContainer"),s(o.ScrollContainer,"Scroller","ScrollContainer"),i({},t,r,o)}),n.tup(Re,Pe)),Ue=r.memo((function(){var e=Ge("gridState"),t=Ge("listClassName"),n=Ge("itemClassName"),o=Ge("itemContent"),i=Ge("computeItemKey"),a=Ge("isSeeking"),s=Ge("ItemComponent"),u=Ge("ListComponent"),c=Ge("ScrollSeekPlaceholder"),m=Ae("itemDimensions"),f=l((function(e){var t=e.firstChild;t&&m({width:t.offsetWidth,height:t.offsetHeight})}));return r.createElement(u,{ref:f,className:t,style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom}},e.items.map((function(t){var u=i(t.index);return a?r.createElement(c,{key:u,style:{height:e.itemHeight,width:e.itemWidth}}):r.createElement(s,{className:n,"data-index":t.index,key:u},o(t.index))})))})),je=t.systemToComponent(Oe,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},r.memo((function(e){var t=i({},e),n=Ae("viewportDimensions"),o=l((function(e){n({width:e.offsetWidth,height:e.offsetHeight})}));return r.createElement(Ne,Object.assign({},t),r.createElement("div",{style:de,ref:o},r.createElement(Ue,null)))}))),Ve=je.Component,Ae=je.usePublisher,Ge=je.useEmitterValue,Ne=Ie({usePublisher:Ae,useEmitterValue:Ge,useEmitter:je.useEmitter}),We=Se,Ke=Ve;exports.GroupedVirtuoso=Se,exports.Virtuoso=We,exports.VirtuosoGrid=Ke; | ||
//# sourceMappingURL=react-virtuoso.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
import { StatefulStream } from '@virtuoso.dev/urx'; | ||
import * as u from '@virtuoso.dev/urx'; | ||
import { DOWN, ScrollDirection, UP } from './domIOSystem'; | ||
@@ -14,27 +14,27 @@ export declare type NumberTuple = [number, number]; | ||
export declare const getOverscan: (overscan: Overscan, end: ListEnd, direction: ScrollDirection) => number; | ||
export declare const sizeRangeSystem: import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: StatefulStream<ScrollDirection>; | ||
statefulScrollTop: StatefulStream<number>; | ||
deviation: StatefulStream<number>; | ||
export declare const sizeRangeSystem: u.SystemSpec<[u.SystemSpec<never[], () => { | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}>], ([{ scrollTop, viewportHeight, deviation }]: [{ | ||
scrollTop: import("@virtuoso.dev/urx").Stream<number>; | ||
viewportHeight: import("@virtuoso.dev/urx").Stream<number>; | ||
smoothScrollTargetReached: import("@virtuoso.dev/urx").Stream<true>; | ||
scrollTo: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollBy: import("@virtuoso.dev/urx").Stream<ScrollToOptions>; | ||
scrollDirection: StatefulStream<ScrollDirection>; | ||
statefulScrollTop: StatefulStream<number>; | ||
deviation: StatefulStream<number>; | ||
scrollTop: u.Stream<number>; | ||
viewportHeight: u.Stream<number>; | ||
smoothScrollTargetReached: u.Stream<true>; | ||
scrollTo: u.Stream<ScrollToOptions>; | ||
scrollBy: u.Stream<ScrollToOptions>; | ||
scrollDirection: u.StatefulStream<ScrollDirection>; | ||
statefulScrollTop: u.StatefulStream<number>; | ||
deviation: u.StatefulStream<number>; | ||
}]) => { | ||
listBoundary: import("@virtuoso.dev/urx").Stream<NumberTuple>; | ||
headerHeight: StatefulStream<number>; | ||
footerHeight: StatefulStream<number>; | ||
overscan: StatefulStream<Overscan>; | ||
topListHeight: StatefulStream<number>; | ||
visibleRange: StatefulStream<NumberTuple>; | ||
listBoundary: u.Stream<NumberTuple>; | ||
headerHeight: u.StatefulStream<number>; | ||
footerHeight: u.StatefulStream<number>; | ||
overscan: u.StatefulStream<Overscan>; | ||
topListHeight: u.StatefulStream<number>; | ||
visibleRange: u.StatefulStream<NumberTuple>; | ||
}>; |
@@ -0,1 +1,2 @@ | ||
import * as u from '@virtuoso.dev/urx'; | ||
import { AANode } from './AATree'; | ||
@@ -22,14 +23,14 @@ export interface SizeRange { | ||
export declare function originalIndexFromItemIndex(itemIndex: number, sizes: SizeState): number; | ||
export declare const sizeSystem: import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
data: import("@virtuoso.dev/urx").StatefulStream<Data>; | ||
totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
sizeRanges: import("@virtuoso.dev/urx").Stream<SizeRange[]>; | ||
groupIndices: import("@virtuoso.dev/urx").StatefulStream<number[]>; | ||
defaultItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
fixedItemSize: import("@virtuoso.dev/urx").StatefulStream<number | undefined>; | ||
unshiftWith: import("@virtuoso.dev/urx").Stream<number>; | ||
firstItemIndex: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
sizes: import("@virtuoso.dev/urx").StatefulStream<SizeState>; | ||
listRefresh: import("@virtuoso.dev/urx").Stream<boolean>; | ||
trackItemSizes: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
export declare const sizeSystem: u.SystemSpec<never[], () => { | ||
data: u.StatefulStream<Data>; | ||
totalCount: u.Stream<number>; | ||
sizeRanges: u.Stream<SizeRange[]>; | ||
groupIndices: u.StatefulStream<number[]>; | ||
defaultItemSize: u.StatefulStream<number | undefined>; | ||
fixedItemSize: u.StatefulStream<number | undefined>; | ||
unshiftWith: u.Stream<number>; | ||
firstItemIndex: u.StatefulStream<number>; | ||
sizes: u.StatefulStream<SizeState>; | ||
listRefresh: u.Stream<boolean>; | ||
trackItemSizes: u.StatefulStream<boolean>; | ||
}>; |
@@ -190,3 +190,6 @@ export declare const topItemCountSystem: import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<import("./sizeSystem").Data>; | ||
@@ -215,2 +218,5 @@ totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}]) => { | ||
@@ -217,0 +223,0 @@ scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; |
@@ -215,3 +215,6 @@ export declare const totalListHeightSystem: import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<[import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<import("./sizeSystem").Data>; | ||
@@ -240,2 +243,5 @@ totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}]) => { | ||
@@ -242,0 +248,0 @@ scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; |
@@ -228,3 +228,6 @@ import { ListItem } from './interfaces'; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }]: [{ | ||
}>, import("@virtuoso.dev/urx").SystemSpec<never[], () => { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}>], ([{ sizes, listRefresh }, { scrollTop }, { scrollToIndex }, { didMount }]: [{ | ||
data: import("@virtuoso.dev/urx").StatefulStream<import("./sizeSystem").Data>; | ||
@@ -253,2 +256,5 @@ totalCount: import("@virtuoso.dev/urx").Stream<number>; | ||
topListHeight: import("@virtuoso.dev/urx").StatefulStream<number>; | ||
}, { | ||
propsReady: import("@virtuoso.dev/urx").StatefulStream<boolean>; | ||
didMount: import("@virtuoso.dev/urx").Stream<boolean>; | ||
}]) => { | ||
@@ -255,0 +261,0 @@ scrolledToInitialItem: import("@virtuoso.dev/urx").StatefulStream<boolean>; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"homepage": "https://virtuoso.dev/", | ||
@@ -22,3 +22,4 @@ "license": "MIT", | ||
"prepare": "tsdx build", | ||
"preview": "node e2e/preview.js" | ||
"preview": "node e2e/preview.js", | ||
"semantic-release": "semantic-release" | ||
}, | ||
@@ -60,2 +61,3 @@ "dependencies": { | ||
"react-test-renderer": "^16.13.1", | ||
"semantic-release": "^17.3.0", | ||
"tsdx": "^0.13.2", | ||
@@ -81,3 +83,7 @@ "tslib": "^2.0.0", | ||
"trailingComma": "es5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/petyosi/react-virtuoso.git" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1455473
43
16731
1
29