@legendapp/list 3.0.0-beta.52 → 3.0.0-beta.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animated.d.ts +18 -10
- package/index.d.ts +21 -12
- package/index.js +519 -257
- package/index.mjs +519 -257
- package/index.native.js +439 -250
- package/index.native.mjs +439 -250
- package/keyboard-chat.d.ts +20 -4
- package/keyboard-chat.js +32 -3
- package/keyboard-chat.mjs +33 -5
- package/keyboard-test.d.ts +10 -2
- package/keyboard-test.js +3 -3
- package/keyboard-test.mjs +3 -3
- package/keyboard.d.ts +5 -0
- package/package.json +1 -1
- package/react-native.d.ts +19 -11
- package/react-native.js +439 -250
- package/react-native.mjs +439 -250
- package/react-native.web.d.ts +18 -11
- package/react-native.web.js +519 -257
- package/react-native.web.mjs +519 -257
- package/react.d.ts +18 -11
- package/react.js +519 -257
- package/react.mjs +519 -257
- package/reanimated.d.ts +18 -10
- package/reanimated.js +1 -1
- package/reanimated.mjs +1 -1
- package/section-list.d.ts +18 -10
package/animated.d.ts
CHANGED
|
@@ -154,7 +154,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
154
154
|
*/
|
|
155
155
|
extraData?: any;
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* Optional per-item size estimate used before a row is measured.
|
|
158
|
+
*
|
|
159
|
+
* @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
|
|
160
|
+
* when item sizes are known exactly.
|
|
158
161
|
*/
|
|
159
162
|
getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
|
|
160
163
|
/**
|
|
@@ -172,8 +175,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
172
175
|
leadingItem: ItemT;
|
|
173
176
|
}>;
|
|
174
177
|
/**
|
|
175
|
-
* Ratio
|
|
176
|
-
* @
|
|
178
|
+
* Ratio used to size the initial recycled container pool.
|
|
179
|
+
* @deprecated The list now manages spare container capacity automatically.
|
|
180
|
+
* @default 3
|
|
177
181
|
*/
|
|
178
182
|
initialContainerPoolRatio?: number | undefined;
|
|
179
183
|
/**
|
|
@@ -248,6 +252,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
248
252
|
* Keeps an item visually anchored to the start by adding trailing space when the content below it underflows.
|
|
249
253
|
*/
|
|
250
254
|
anchoredEndSpace?: AnchoredEndSpaceConfig;
|
|
255
|
+
/**
|
|
256
|
+
* Adjusts the effective end content inset for web lists without replacing the base contentInset.
|
|
257
|
+
* The adjustment is also rendered as real content padding so the browser scroll range includes it.
|
|
258
|
+
*/
|
|
259
|
+
contentInsetEndAdjustment?: number;
|
|
251
260
|
/**
|
|
252
261
|
* Number of columns to render items in.
|
|
253
262
|
* @default 1
|
|
@@ -349,12 +358,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
349
358
|
* Array of item indices to use as snap points.
|
|
350
359
|
*/
|
|
351
360
|
snapToIndices?: number[];
|
|
352
|
-
/**
|
|
353
|
-
* This will log a suggested estimatedItemSize.
|
|
354
|
-
* @required
|
|
355
|
-
* @default false
|
|
356
|
-
*/
|
|
357
|
-
suggestEstimatedItemSize?: boolean;
|
|
358
361
|
/**
|
|
359
362
|
* Configuration for determining item viewability.
|
|
360
363
|
*/
|
|
@@ -443,6 +446,10 @@ interface LegendListMetrics {
|
|
|
443
446
|
headerSize: number;
|
|
444
447
|
footerSize: number;
|
|
445
448
|
}
|
|
449
|
+
interface LegendListAverageItemSize {
|
|
450
|
+
average: number;
|
|
451
|
+
count: number;
|
|
452
|
+
}
|
|
446
453
|
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
447
454
|
data: readonly ItemT[];
|
|
448
455
|
extraData: any;
|
|
@@ -464,6 +471,7 @@ type LegendListState = {
|
|
|
464
471
|
isEndReached: boolean;
|
|
465
472
|
isStartReached: boolean;
|
|
466
473
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
474
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
467
475
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
468
476
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
469
477
|
positionAtIndex: (index: number) => number;
|
|
@@ -641,7 +649,7 @@ interface ViewabilityConfig {
|
|
|
641
649
|
waitForInteraction?: boolean | undefined;
|
|
642
650
|
}
|
|
643
651
|
|
|
644
|
-
type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omit<LegendListPropsBase<ItemT, ScrollViewProps, TItemType>, "anchoredEndSpace" | "onScroll" | "refScrollView" | "renderScrollComponent" | "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
|
|
652
|
+
type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omit<LegendListPropsBase<ItemT, ScrollViewProps, TItemType>, "anchoredEndSpace" | "contentInsetEndAdjustment" | "onScroll" | "refScrollView" | "renderScrollComponent" | "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
|
|
645
653
|
onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
|
|
646
654
|
refScrollView?: React.Ref<ScrollView>;
|
|
647
655
|
renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
|
package/index.d.ts
CHANGED
|
@@ -228,7 +228,6 @@ interface InternalState$1 {
|
|
|
228
228
|
stickyContainers: Map<number, number>;
|
|
229
229
|
timeouts: Set<number>;
|
|
230
230
|
timeoutSetPaddingTop?: any;
|
|
231
|
-
timeoutSizeMessage: any;
|
|
232
231
|
timeoutCheckFinishedScrollFallback?: any;
|
|
233
232
|
totalSize: number;
|
|
234
233
|
triggerCalculateItemsInView?: (params?: {
|
|
@@ -249,6 +248,7 @@ interface InternalState$1 {
|
|
|
249
248
|
data: readonly any[];
|
|
250
249
|
dataVersion: Key | undefined;
|
|
251
250
|
drawDistance: number;
|
|
251
|
+
contentInsetEndAdjustment: number | undefined;
|
|
252
252
|
estimatedItemSize: number | undefined;
|
|
253
253
|
getEstimatedItemSize: LegendListPropsInternal["getEstimatedItemSize"];
|
|
254
254
|
getFixedItemSize: LegendListPropsInternal["getFixedItemSize"];
|
|
@@ -280,7 +280,6 @@ interface InternalState$1 {
|
|
|
280
280
|
stickyIndicesSet: Set<number>;
|
|
281
281
|
stylePaddingBottom: number | undefined;
|
|
282
282
|
stylePaddingTop: number | undefined;
|
|
283
|
-
suggestEstimatedItemSize: boolean;
|
|
284
283
|
useWindowScroll: boolean;
|
|
285
284
|
};
|
|
286
285
|
}
|
|
@@ -479,7 +478,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
479
478
|
*/
|
|
480
479
|
extraData?: any;
|
|
481
480
|
/**
|
|
482
|
-
*
|
|
481
|
+
* Optional per-item size estimate used before a row is measured.
|
|
482
|
+
*
|
|
483
|
+
* @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
|
|
484
|
+
* when item sizes are known exactly.
|
|
483
485
|
*/
|
|
484
486
|
getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
|
|
485
487
|
/**
|
|
@@ -497,8 +499,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
497
499
|
leadingItem: ItemT;
|
|
498
500
|
}>;
|
|
499
501
|
/**
|
|
500
|
-
* Ratio
|
|
501
|
-
* @
|
|
502
|
+
* Ratio used to size the initial recycled container pool.
|
|
503
|
+
* @deprecated The list now manages spare container capacity automatically.
|
|
504
|
+
* @default 3
|
|
502
505
|
*/
|
|
503
506
|
initialContainerPoolRatio?: number | undefined;
|
|
504
507
|
/**
|
|
@@ -573,6 +576,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
573
576
|
* Keeps an item visually anchored to the start by adding trailing space when the content below it underflows.
|
|
574
577
|
*/
|
|
575
578
|
anchoredEndSpace?: AnchoredEndSpaceConfig$1;
|
|
579
|
+
/**
|
|
580
|
+
* Adjusts the effective end content inset for web lists without replacing the base contentInset.
|
|
581
|
+
* The adjustment is also rendered as real content padding so the browser scroll range includes it.
|
|
582
|
+
*/
|
|
583
|
+
contentInsetEndAdjustment?: number;
|
|
576
584
|
/**
|
|
577
585
|
* Number of columns to render items in.
|
|
578
586
|
* @default 1
|
|
@@ -674,12 +682,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
674
682
|
* Array of item indices to use as snap points.
|
|
675
683
|
*/
|
|
676
684
|
snapToIndices?: number[];
|
|
677
|
-
/**
|
|
678
|
-
* This will log a suggested estimatedItemSize.
|
|
679
|
-
* @required
|
|
680
|
-
* @default false
|
|
681
|
-
*/
|
|
682
|
-
suggestEstimatedItemSize?: boolean;
|
|
683
685
|
/**
|
|
684
686
|
* Configuration for determining item viewability.
|
|
685
687
|
*/
|
|
@@ -768,6 +770,10 @@ interface LegendListMetrics$1 {
|
|
|
768
770
|
headerSize: number;
|
|
769
771
|
footerSize: number;
|
|
770
772
|
}
|
|
773
|
+
interface LegendListAverageItemSize$1 {
|
|
774
|
+
average: number;
|
|
775
|
+
count: number;
|
|
776
|
+
}
|
|
771
777
|
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
772
778
|
data: readonly ItemT[];
|
|
773
779
|
extraData: any;
|
|
@@ -789,6 +795,7 @@ type LegendListState$1 = {
|
|
|
789
795
|
isEndReached: boolean;
|
|
790
796
|
isStartReached: boolean;
|
|
791
797
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
798
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize$1>;
|
|
792
799
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
793
800
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
794
801
|
positionAtIndex: (index: number) => number;
|
|
@@ -1039,6 +1046,8 @@ type ColumnWrapperStyle = ColumnWrapperStyle$1;
|
|
|
1039
1046
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1040
1047
|
type LegendListMetrics = LegendListMetrics$1;
|
|
1041
1048
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1049
|
+
type LegendListAverageItemSize = LegendListAverageItemSize$1;
|
|
1050
|
+
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1042
1051
|
type ThresholdSnapshot = ThresholdSnapshot$1;
|
|
1043
1052
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1044
1053
|
type ScrollTarget = ScrollTarget$1;
|
|
@@ -1325,4 +1334,4 @@ declare function useSyncLayout(): () => void;
|
|
|
1325
1334
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1326
1335
|
declare const LegendList: LegendListComponent;
|
|
1327
1336
|
|
|
1328
|
-
export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type AnchoredEndSpaceConfig, type BaseScrollViewProps, type ColorValue, type ColumnWrapperStyle, type GestureResponderEvent, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutChangeEvent, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type LooseAccessibilityActionEvent, type LooseAccessibilityRole, type LooseAccessibilityState, type LooseAccessibilityValue, type LooseColorValue, type LooseGestureResponderEvent, type LoosePointerEvent, type LooseRefreshControlProps, type LooseRole, type LooseScrollViewProps, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type OnViewableItemsChangedInfo, type PointProp, type PointerEvent, type RefreshControlProps, type Role, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, type ScrollViewPropsLoose, type ScrollableNodeLike, type StickyHeaderConfig, type StyleProp, type ThresholdSnapshot, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
|
|
1337
|
+
export { type AccessibilityActionEvent, type AccessibilityRole, type AccessibilityState, type AccessibilityValue, type AlwaysRenderConfig, type AnchoredEndSpaceConfig, type BaseScrollViewProps, type ColorValue, type ColumnWrapperStyle, type GestureResponderEvent, type GetRenderedItem, type GetRenderedItemResult, type InitialScrollAnchor, type Insets, type InternalState, type LayoutChangeEvent, type LayoutRectangle, LegendList, type LegendListAverageItemSize, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListPropsBase, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListScrollerRef, type LegendListState, type LooseAccessibilityActionEvent, type LooseAccessibilityRole, type LooseAccessibilityState, type LooseAccessibilityValue, type LooseColorValue, type LooseGestureResponderEvent, type LoosePointerEvent, type LooseRefreshControlProps, type LooseRole, type LooseScrollViewProps, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type MaintainVisibleContentPositionNormalized, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type OnViewableItemsChangedInfo, type PointProp, type PointerEvent, type RefreshControlProps, type Role, type ScrollEventTargetLike, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type ScrollTarget, type ScrollViewPropsLoose, type ScrollableNodeLike, type StickyHeaderConfig, type StyleProp, type ThresholdSnapshot, type TypedForwardRef, type TypedMemo, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableRange, typedForwardRef, typedMemo, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
|