@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/reanimated.d.ts CHANGED
@@ -155,7 +155,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
155
155
  */
156
156
  extraData?: any;
157
157
  /**
158
- * In case you have distinct item sizes, you can provide a function to get the size of an item.
158
+ * Optional per-item size estimate used before a row is measured.
159
+ *
160
+ * @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
161
+ * when item sizes are known exactly.
159
162
  */
160
163
  getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
161
164
  /**
@@ -173,8 +176,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
173
176
  leadingItem: ItemT;
174
177
  }>;
175
178
  /**
176
- * Ratio of initial container pool size to data length (e.g., 0.5 for half).
177
- * @default 2
179
+ * Ratio used to size the initial recycled container pool.
180
+ * @deprecated The list now manages spare container capacity automatically.
181
+ * @default 3
178
182
  */
179
183
  initialContainerPoolRatio?: number | undefined;
180
184
  /**
@@ -355,12 +359,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
355
359
  * Array of item indices to use as snap points.
356
360
  */
357
361
  snapToIndices?: number[];
358
- /**
359
- * This will log a suggested estimatedItemSize.
360
- * @required
361
- * @default false
362
- */
363
- suggestEstimatedItemSize?: boolean;
364
362
  /**
365
363
  * Configuration for determining item viewability.
366
364
  */
@@ -449,6 +447,10 @@ interface LegendListMetrics {
449
447
  headerSize: number;
450
448
  footerSize: number;
451
449
  }
450
+ interface LegendListAverageItemSize {
451
+ average: number;
452
+ count: number;
453
+ }
452
454
  interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
453
455
  data: readonly ItemT[];
454
456
  extraData: any;
@@ -470,6 +472,7 @@ type LegendListState = {
470
472
  isEndReached: boolean;
471
473
  isStartReached: boolean;
472
474
  isWithinMaintainScrollAtEndThreshold: boolean;
475
+ getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
473
476
  listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
474
477
  listenToPosition: (key: string, callback: (value: number) => void) => () => void;
475
478
  positionAtIndex: (index: number) => number;
package/reanimated.js CHANGED
@@ -50,7 +50,7 @@ var ReanimatedScrollBridge = typedMemo(function ReanimatedScrollBridgeComponent(
50
50
  const combinedRef = useCombinedRef(animatedScrollRef, forwardedRef);
51
51
  const ScrollComponent = React__namespace.useMemo(
52
52
  () => renderScrollComponent ? React__namespace.forwardRef(
53
- (scrollViewProps, ref) => renderScrollComponent({ ...scrollViewProps, ref })
53
+ (scrollViewProps, ref) => renderScrollComponent({ ...scrollViewProps, ref, scrollEventThrottle: 1 })
54
54
  ) : Reanimated__default.default.ScrollView,
55
55
  [renderScrollComponent]
56
56
  );
package/reanimated.mjs CHANGED
@@ -26,7 +26,7 @@ var ReanimatedScrollBridge = typedMemo(function ReanimatedScrollBridgeComponent(
26
26
  const combinedRef = useCombinedRef(animatedScrollRef, forwardedRef);
27
27
  const ScrollComponent = React.useMemo(
28
28
  () => renderScrollComponent ? React.forwardRef(
29
- (scrollViewProps, ref) => renderScrollComponent({ ...scrollViewProps, ref })
29
+ (scrollViewProps, ref) => renderScrollComponent({ ...scrollViewProps, ref, scrollEventThrottle: 1 })
30
30
  ) : Reanimated.ScrollView,
31
31
  [renderScrollComponent]
32
32
  );
package/section-list.d.ts CHANGED
@@ -211,7 +211,10 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
211
211
  */
212
212
  extraData?: any;
213
213
  /**
214
- * In case you have distinct item sizes, you can provide a function to get the size of an item.
214
+ * Optional per-item size estimate used before a row is measured.
215
+ *
216
+ * @deprecated Prefer a single `estimatedItemSize` for initial size hints, or `getFixedItemSize`
217
+ * when item sizes are known exactly.
215
218
  */
216
219
  getEstimatedItemSize?: (item: ItemT, index: number, type: TItemType) => number;
217
220
  /**
@@ -229,8 +232,9 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
229
232
  leadingItem: ItemT;
230
233
  }>;
231
234
  /**
232
- * Ratio of initial container pool size to data length (e.g., 0.5 for half).
233
- * @default 2
235
+ * Ratio used to size the initial recycled container pool.
236
+ * @deprecated The list now manages spare container capacity automatically.
237
+ * @default 3
234
238
  */
235
239
  initialContainerPoolRatio?: number | undefined;
236
240
  /**
@@ -411,12 +415,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
411
415
  * Array of item indices to use as snap points.
412
416
  */
413
417
  snapToIndices?: number[];
414
- /**
415
- * This will log a suggested estimatedItemSize.
416
- * @required
417
- * @default false
418
- */
419
- suggestEstimatedItemSize?: boolean;
420
418
  /**
421
419
  * Configuration for determining item viewability.
422
420
  */
@@ -505,6 +503,10 @@ interface LegendListMetrics {
505
503
  headerSize: number;
506
504
  footerSize: number;
507
505
  }
506
+ interface LegendListAverageItemSize {
507
+ average: number;
508
+ count: number;
509
+ }
508
510
  interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
509
511
  data: readonly ItemT[];
510
512
  extraData: any;
@@ -526,6 +528,7 @@ type LegendListState = {
526
528
  isEndReached: boolean;
527
529
  isStartReached: boolean;
528
530
  isWithinMaintainScrollAtEndThreshold: boolean;
531
+ getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
529
532
  listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
530
533
  listenToPosition: (key: string, callback: (value: number) => void) => () => void;
531
534
  positionAtIndex: (index: number) => number;