@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/reanimated.d.ts CHANGED
@@ -456,11 +456,15 @@ interface ScrollToEndOptions {
456
456
  viewOffset?: number;
457
457
  }
458
458
  interface AnchoredEndSpaceConfig {
459
+ /** Index of the item whose row should remain anchored when trailing space is added. */
459
460
  anchorIndex: number;
461
+ /** Desired distance from the viewport's start edge to the anchored row. */
460
462
  anchorOffset?: number;
463
+ /** Optional cap for the anchor item's contribution to its row size. */
461
464
  anchorMaxSize?: number;
462
- includeInEndInset?: boolean;
465
+ /** Called whenever the resolved trailing space changes. */
463
466
  onSizeChanged?: (size: number) => void;
467
+ /** Called once the anchor and every row after it have authoritative sizes. */
464
468
  onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
465
469
  }
466
470
  interface StickyHeaderConfig {
@@ -535,6 +539,7 @@ type LegendListState = {
535
539
  isStartReached: boolean;
536
540
  isWithinMaintainScrollAtEndThreshold: boolean;
537
541
  getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
542
+ indexByKey: (key: string) => number | undefined;
538
543
  listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
539
544
  listenToPosition: (key: string, callback: (value: number) => void) => () => void;
540
545
  positionAtIndex: (index: number) => number;
@@ -720,6 +725,7 @@ interface ViewabilityConfig {
720
725
  }
721
726
 
722
727
  type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omit<LegendListPropsBase<ItemT, ScrollViewProps, TItemType>, "anchoredEndSpace" | "contentInsetEndAdjustment" | "onScroll" | "refScrollView" | "renderScrollComponent" | "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
728
+ anchoredEndSpace?: AnchoredEndSpaceConfig;
723
729
  onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
724
730
  refScrollView?: React.Ref<ScrollView>;
725
731
  renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
package/section-list.d.ts CHANGED
@@ -512,11 +512,15 @@ interface ScrollToEndOptions {
512
512
  viewOffset?: number;
513
513
  }
514
514
  interface AnchoredEndSpaceConfig {
515
+ /** Index of the item whose row should remain anchored when trailing space is added. */
515
516
  anchorIndex: number;
517
+ /** Desired distance from the viewport's start edge to the anchored row. */
516
518
  anchorOffset?: number;
519
+ /** Optional cap for the anchor item's contribution to its row size. */
517
520
  anchorMaxSize?: number;
518
- includeInEndInset?: boolean;
521
+ /** Called whenever the resolved trailing space changes. */
519
522
  onSizeChanged?: (size: number) => void;
523
+ /** Called once the anchor and every row after it have authoritative sizes. */
520
524
  onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
521
525
  }
522
526
  interface StickyHeaderConfig {
@@ -591,6 +595,7 @@ type LegendListState = {
591
595
  isStartReached: boolean;
592
596
  isWithinMaintainScrollAtEndThreshold: boolean;
593
597
  getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
598
+ indexByKey: (key: string) => number | undefined;
594
599
  listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
595
600
  listenToPosition: (key: string, callback: (value: number) => void) => () => void;
596
601
  positionAtIndex: (index: number) => number;
@@ -776,6 +781,7 @@ interface ViewabilityConfig {
776
781
  }
777
782
 
778
783
  type LegendListPropsOverrides<ItemT, TItemType extends string | undefined> = Omit<LegendListPropsBase<ItemT, ScrollViewProps, TItemType>, "anchoredEndSpace" | "contentInsetEndAdjustment" | "onScroll" | "refScrollView" | "renderScrollComponent" | "ListHeaderComponentStyle" | "ListFooterComponentStyle"> & {
784
+ anchoredEndSpace?: AnchoredEndSpaceConfig;
779
785
  onScroll?: (event: NativeSyntheticEvent$1<NativeScrollEvent$1>) => void;
780
786
  refScrollView?: React.Ref<ScrollView>;
781
787
  renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;