@legendapp/list 3.0.0-beta.53 → 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 +12 -9
- package/index.d.ts +15 -12
- package/index.js +391 -219
- package/index.mjs +391 -219
- package/index.native.js +332 -211
- package/index.native.mjs +332 -211
- package/keyboard-chat.d.ts +17 -2
- package/keyboard-chat.js +29 -0
- package/keyboard-chat.mjs +30 -2
- package/keyboard-test.d.ts +5 -0
- package/keyboard.d.ts +5 -0
- package/package.json +1 -1
- package/react-native.d.ts +13 -10
- package/react-native.js +332 -211
- package/react-native.mjs +332 -211
- package/react-native.web.d.ts +13 -10
- package/react-native.web.js +391 -219
- package/react-native.web.mjs +391 -219
- package/react.d.ts +13 -10
- package/react.js +391 -219
- package/react.mjs +391 -219
- package/reanimated.d.ts +12 -9
- package/reanimated.js +1 -1
- package/reanimated.mjs +1 -1
- package/section-list.d.ts +12 -9
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
|
/**
|
|
@@ -354,12 +358,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
354
358
|
* Array of item indices to use as snap points.
|
|
355
359
|
*/
|
|
356
360
|
snapToIndices?: number[];
|
|
357
|
-
/**
|
|
358
|
-
* This will log a suggested estimatedItemSize.
|
|
359
|
-
* @required
|
|
360
|
-
* @default false
|
|
361
|
-
*/
|
|
362
|
-
suggestEstimatedItemSize?: boolean;
|
|
363
361
|
/**
|
|
364
362
|
* Configuration for determining item viewability.
|
|
365
363
|
*/
|
|
@@ -448,6 +446,10 @@ interface LegendListMetrics {
|
|
|
448
446
|
headerSize: number;
|
|
449
447
|
footerSize: number;
|
|
450
448
|
}
|
|
449
|
+
interface LegendListAverageItemSize {
|
|
450
|
+
average: number;
|
|
451
|
+
count: number;
|
|
452
|
+
}
|
|
451
453
|
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
452
454
|
data: readonly ItemT[];
|
|
453
455
|
extraData: any;
|
|
@@ -469,6 +471,7 @@ type LegendListState = {
|
|
|
469
471
|
isEndReached: boolean;
|
|
470
472
|
isStartReached: boolean;
|
|
471
473
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
474
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
472
475
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
473
476
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
474
477
|
positionAtIndex: (index: number) => number;
|
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?: {
|
|
@@ -281,7 +280,6 @@ interface InternalState$1 {
|
|
|
281
280
|
stickyIndicesSet: Set<number>;
|
|
282
281
|
stylePaddingBottom: number | undefined;
|
|
283
282
|
stylePaddingTop: number | undefined;
|
|
284
|
-
suggestEstimatedItemSize: boolean;
|
|
285
283
|
useWindowScroll: boolean;
|
|
286
284
|
};
|
|
287
285
|
}
|
|
@@ -480,7 +478,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
480
478
|
*/
|
|
481
479
|
extraData?: any;
|
|
482
480
|
/**
|
|
483
|
-
*
|
|
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.
|
|
484
485
|
*/
|
|
485
486
|
getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
|
|
486
487
|
/**
|
|
@@ -498,8 +499,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
498
499
|
leadingItem: ItemT;
|
|
499
500
|
}>;
|
|
500
501
|
/**
|
|
501
|
-
* Ratio
|
|
502
|
-
* @
|
|
502
|
+
* Ratio used to size the initial recycled container pool.
|
|
503
|
+
* @deprecated The list now manages spare container capacity automatically.
|
|
504
|
+
* @default 3
|
|
503
505
|
*/
|
|
504
506
|
initialContainerPoolRatio?: number | undefined;
|
|
505
507
|
/**
|
|
@@ -680,12 +682,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
680
682
|
* Array of item indices to use as snap points.
|
|
681
683
|
*/
|
|
682
684
|
snapToIndices?: number[];
|
|
683
|
-
/**
|
|
684
|
-
* This will log a suggested estimatedItemSize.
|
|
685
|
-
* @required
|
|
686
|
-
* @default false
|
|
687
|
-
*/
|
|
688
|
-
suggestEstimatedItemSize?: boolean;
|
|
689
685
|
/**
|
|
690
686
|
* Configuration for determining item viewability.
|
|
691
687
|
*/
|
|
@@ -774,6 +770,10 @@ interface LegendListMetrics$1 {
|
|
|
774
770
|
headerSize: number;
|
|
775
771
|
footerSize: number;
|
|
776
772
|
}
|
|
773
|
+
interface LegendListAverageItemSize$1 {
|
|
774
|
+
average: number;
|
|
775
|
+
count: number;
|
|
776
|
+
}
|
|
777
777
|
interface LegendListRenderItemProps$1<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
778
778
|
data: readonly ItemT[];
|
|
779
779
|
extraData: any;
|
|
@@ -795,6 +795,7 @@ type LegendListState$1 = {
|
|
|
795
795
|
isEndReached: boolean;
|
|
796
796
|
isStartReached: boolean;
|
|
797
797
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
798
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize$1>;
|
|
798
799
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
799
800
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
800
801
|
positionAtIndex: (index: number) => number;
|
|
@@ -1045,6 +1046,8 @@ type ColumnWrapperStyle = ColumnWrapperStyle$1;
|
|
|
1045
1046
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1046
1047
|
type LegendListMetrics = LegendListMetrics$1;
|
|
1047
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 */
|
|
1048
1051
|
type ThresholdSnapshot = ThresholdSnapshot$1;
|
|
1049
1052
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1050
1053
|
type ScrollTarget = ScrollTarget$1;
|
|
@@ -1331,4 +1334,4 @@ declare function useSyncLayout(): () => void;
|
|
|
1331
1334
|
/** @deprecated Use `@legendapp/list/react-native` or `@legendapp/list/react` for strict typing */
|
|
1332
1335
|
declare const LegendList: LegendListComponent;
|
|
1333
1336
|
|
|
1334
|
-
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 };
|