@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.
@@ -5,7 +5,6 @@ type ScrollEventTarget = Window | HTMLElement;
5
5
 
6
6
  interface ScrollViewMethods {
7
7
  getBoundingClientRect(): DOMRect | null | undefined;
8
- getContentNode(): HTMLElement | null;
9
8
  getCurrentScrollOffset(): number;
10
9
  getScrollableNode(): HTMLElement;
11
10
  getScrollEventTarget(): ScrollEventTarget | null;
@@ -184,7 +183,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
184
183
  */
185
184
  extraData?: any;
186
185
  /**
187
- * In case you have distinct item sizes, you can provide a function to get the size of an item.
186
+ * Optional per-item size estimate used before a row is measured.
187
+ *
188
+ * @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
189
+ * when item sizes are known exactly.
188
190
  */
189
191
  getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
190
192
  /**
@@ -202,8 +204,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
202
204
  leadingItem: ItemT;
203
205
  }>;
204
206
  /**
205
- * Ratio of initial container pool size to data length (e.g., 0.5 for half).
206
- * @default 2
207
+ * Ratio used to size the initial recycled container pool.
208
+ * @deprecated The list now manages spare container capacity automatically.
209
+ * @default 3
207
210
  */
208
211
  initialContainerPoolRatio?: number | undefined;
209
212
  /**
@@ -278,6 +281,11 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
278
281
  * Keeps an item visually anchored to the start by adding trailing space when the content below it underflows.
279
282
  */
280
283
  anchoredEndSpace?: AnchoredEndSpaceConfig$1;
284
+ /**
285
+ * Adjusts the effective end content inset for web lists without replacing the base contentInset.
286
+ * The adjustment is also rendered as real content padding so the browser scroll range includes it.
287
+ */
288
+ contentInsetEndAdjustment?: number;
281
289
  /**
282
290
  * Number of columns to render items in.
283
291
  * @default 1
@@ -379,12 +387,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
379
387
  * Array of item indices to use as snap points.
380
388
  */
381
389
  snapToIndices?: number[];
382
- /**
383
- * This will log a suggested estimatedItemSize.
384
- * @required
385
- * @default false
386
- */
387
- suggestEstimatedItemSize?: boolean;
388
390
  /**
389
391
  * Configuration for determining item viewability.
390
392
  */
@@ -473,6 +475,10 @@ interface LegendListMetrics {
473
475
  headerSize: number;
474
476
  footerSize: number;
475
477
  }
478
+ interface LegendListAverageItemSize {
479
+ average: number;
480
+ count: number;
481
+ }
476
482
  interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
477
483
  data: readonly ItemT[];
478
484
  extraData: any;
@@ -494,6 +500,7 @@ type LegendListState$1 = {
494
500
  isEndReached: boolean;
495
501
  isStartReached: boolean;
496
502
  isWithinMaintainScrollAtEndThreshold: boolean;
503
+ getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
497
504
  listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
498
505
  listenToPosition: (key: string, callback: (value: number) => void) => () => void;
499
506
  positionAtIndex: (index: number) => number;
@@ -773,4 +780,4 @@ declare function useSyncLayout(): () => void;
773
780
 
774
781
  declare const LegendList: LegendListComponent;
775
782
 
776
- export { type AlwaysRenderConfig, type AnchoredEndSpaceConfig, type ColumnWrapperStyle, type InitialScrollAnchor, type Insets, type LayoutRectangle, LegendList, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListState, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type OnViewableItemsChangedInfo, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type StickyHeaderConfig, type StyleProp, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };
783
+ export { type AlwaysRenderConfig, type AnchoredEndSpaceConfig, type ColumnWrapperStyle, type InitialScrollAnchor, type Insets, type LayoutRectangle, LegendList, type LegendListAverageItemSize, type LegendListComponent, type LegendListMetrics, type LegendListProps, type LegendListRecyclingState, type LegendListRef, type LegendListRenderItemProps, type LegendListState, type MaintainScrollAtEndOnOptions, type MaintainScrollAtEndOptions, type MaintainVisibleContentPositionConfig, type NativeScrollEvent, type NativeSyntheticEvent, type OnViewableItemsChanged, type OnViewableItemsChangedInfo, type ScrollIndexWithOffset, type ScrollIndexWithOffsetAndContentOffset, type ScrollIndexWithOffsetPosition, type StickyHeaderConfig, type StyleProp, type ViewAmountToken, type ViewStyle, type ViewToken, type ViewabilityAmountCallback, type ViewabilityCallback, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, useIsLastItem, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount };