@legendapp/list 3.3.3 → 3.3.4
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/CHANGELOG.md +11 -0
- package/animated.d.ts +7 -1
- package/keyboard-legacy.d.ts +1 -0
- package/keyboard.d.ts +7 -5
- package/keyboard.js +1 -1
- package/keyboard.mjs +1 -1
- package/package.json +1 -1
- package/react-native.d.ts +8 -2
- package/react-native.js +355 -246
- package/react-native.mjs +355 -246
- package/react-native.web.d.ts +8 -5
- package/react-native.web.js +358 -232
- package/react-native.web.mjs +358 -232
- package/react.d.ts +8 -5
- package/react.js +358 -232
- package/react.mjs +358 -232
- package/reanimated.d.ts +7 -1
- package/section-list.d.ts +7 -1
package/react-native.web.d.ts
CHANGED
|
@@ -310,7 +310,7 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
310
310
|
/**
|
|
311
311
|
* Keeps an item visually anchored to the start by adding trailing space when the content below it underflows.
|
|
312
312
|
*/
|
|
313
|
-
anchoredEndSpace?: AnchoredEndSpaceConfig
|
|
313
|
+
anchoredEndSpace?: AnchoredEndSpaceConfig;
|
|
314
314
|
/**
|
|
315
315
|
* Adjusts the effective end content inset for web lists without replacing the base contentInset.
|
|
316
316
|
* The adjustment is also rendered as real content padding so the browser scroll range includes it.
|
|
@@ -477,12 +477,16 @@ interface ScrollToEndOptions {
|
|
|
477
477
|
animated?: boolean;
|
|
478
478
|
viewOffset?: number;
|
|
479
479
|
}
|
|
480
|
-
interface AnchoredEndSpaceConfig
|
|
480
|
+
interface AnchoredEndSpaceConfig {
|
|
481
|
+
/** Index of the item whose row should remain anchored when trailing space is added. */
|
|
481
482
|
anchorIndex: number;
|
|
483
|
+
/** Desired distance from the viewport's start edge to the anchored row. */
|
|
482
484
|
anchorOffset?: number;
|
|
485
|
+
/** Optional cap for the anchor item's contribution to its row size. */
|
|
483
486
|
anchorMaxSize?: number;
|
|
484
|
-
|
|
487
|
+
/** Called whenever the resolved trailing space changes. */
|
|
485
488
|
onSizeChanged?: (size: number) => void;
|
|
489
|
+
/** Called once the anchor and every row after it have authoritative sizes. */
|
|
486
490
|
onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
|
|
487
491
|
}
|
|
488
492
|
interface StickyHeaderConfig {
|
|
@@ -557,6 +561,7 @@ type LegendListState$1 = {
|
|
|
557
561
|
isStartReached: boolean;
|
|
558
562
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
559
563
|
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
564
|
+
indexByKey: (key: string) => number | undefined;
|
|
560
565
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
561
566
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
562
567
|
positionAtIndex: (index: number) => number;
|
|
@@ -799,8 +804,6 @@ interface LooseScrollViewProps {
|
|
|
799
804
|
style?: StyleProp<ViewStyle>;
|
|
800
805
|
}
|
|
801
806
|
|
|
802
|
-
interface AnchoredEndSpaceConfig extends Omit<AnchoredEndSpaceConfig$1, "includeInEndInset"> {
|
|
803
|
-
}
|
|
804
807
|
type ScrollViewPropsWeb = Omit<LooseScrollViewProps, "style" | "contentContainerStyle" | "onScroll" | "onLayout" | "onMomentumScrollBegin" | "onMomentumScrollEnd" | "onScrollBeginDrag" | "pagingEnabled" | "snapToInterval"> & Omit<HTMLAttributes<HTMLDivElement>, "onScroll" | "onLayout" | "style"> & {
|
|
805
808
|
style?: CSSProperties;
|
|
806
809
|
contentContainerClassName?: string;
|