@legendapp/list 3.0.0-beta.53 → 3.0.0-beta.55
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 +25 -9
- package/index.d.ts +32 -12
- package/index.js +716 -292
- package/index.mjs +716 -292
- package/index.native.js +581 -264
- package/index.native.mjs +582 -265
- 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 +26 -10
- package/react-native.js +581 -264
- package/react-native.mjs +582 -265
- package/react-native.web.d.ts +26 -10
- package/react-native.web.js +716 -292
- package/react-native.web.mjs +716 -292
- package/react.d.ts +26 -10
- package/react.js +716 -292
- package/react.mjs +716 -292
- package/reanimated.d.ts +25 -9
- package/reanimated.js +1 -1
- package/reanimated.mjs +1 -1
- package/section-list.d.ts +25 -9
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
|
-
*
|
|
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
|
|
177
|
-
* @
|
|
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
|
/**
|
|
@@ -225,6 +229,13 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
225
229
|
* Style for the header component.
|
|
226
230
|
*/
|
|
227
231
|
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* Estimated height of the ListHeaderComponent. Provide this when the expected header height
|
|
234
|
+
* is known before layout so that only the items actually visible below the header are rendered
|
|
235
|
+
* on the initial frame, rather than a full screen's worth of items that are hidden behind it.
|
|
236
|
+
* The measured header size still replaces this value after layout.
|
|
237
|
+
*/
|
|
238
|
+
estimatedHeaderSize?: number;
|
|
228
239
|
/**
|
|
229
240
|
* If true, auto-scrolls to end when new items are added.
|
|
230
241
|
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
@@ -259,6 +270,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
259
270
|
* @default 1
|
|
260
271
|
*/
|
|
261
272
|
numColumns?: number;
|
|
273
|
+
/**
|
|
274
|
+
* Force RTL mode for this list instance.
|
|
275
|
+
* When undefined, uses React Native's global I18nManager.isRTL.
|
|
276
|
+
* @default undefined
|
|
277
|
+
*/
|
|
278
|
+
rtl?: boolean;
|
|
262
279
|
/**
|
|
263
280
|
* Called when scrolling reaches the end within onEndReachedThreshold.
|
|
264
281
|
*/
|
|
@@ -355,12 +372,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
355
372
|
* Array of item indices to use as snap points.
|
|
356
373
|
*/
|
|
357
374
|
snapToIndices?: number[];
|
|
358
|
-
/**
|
|
359
|
-
* This will log a suggested estimatedItemSize.
|
|
360
|
-
* @required
|
|
361
|
-
* @default false
|
|
362
|
-
*/
|
|
363
|
-
suggestEstimatedItemSize?: boolean;
|
|
364
375
|
/**
|
|
365
376
|
* Configuration for determining item viewability.
|
|
366
377
|
*/
|
|
@@ -449,6 +460,10 @@ interface LegendListMetrics {
|
|
|
449
460
|
headerSize: number;
|
|
450
461
|
footerSize: number;
|
|
451
462
|
}
|
|
463
|
+
interface LegendListAverageItemSize {
|
|
464
|
+
average: number;
|
|
465
|
+
count: number;
|
|
466
|
+
}
|
|
452
467
|
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
453
468
|
data: readonly ItemT[];
|
|
454
469
|
extraData: any;
|
|
@@ -470,6 +485,7 @@ type LegendListState = {
|
|
|
470
485
|
isEndReached: boolean;
|
|
471
486
|
isStartReached: boolean;
|
|
472
487
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
488
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
473
489
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
474
490
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
475
491
|
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
|
-
*
|
|
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
|
|
233
|
-
* @
|
|
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
|
/**
|
|
@@ -281,6 +285,13 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
281
285
|
* Style for the header component.
|
|
282
286
|
*/
|
|
283
287
|
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* Estimated height of the ListHeaderComponent. Provide this when the expected header height
|
|
290
|
+
* is known before layout so that only the items actually visible below the header are rendered
|
|
291
|
+
* on the initial frame, rather than a full screen's worth of items that are hidden behind it.
|
|
292
|
+
* The measured header size still replaces this value after layout.
|
|
293
|
+
*/
|
|
294
|
+
estimatedHeaderSize?: number;
|
|
284
295
|
/**
|
|
285
296
|
* If true, auto-scrolls to end when new items are added.
|
|
286
297
|
* Use an options object to opt into specific triggers and control whether that scroll is animated.
|
|
@@ -315,6 +326,12 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
315
326
|
* @default 1
|
|
316
327
|
*/
|
|
317
328
|
numColumns?: number;
|
|
329
|
+
/**
|
|
330
|
+
* Force RTL mode for this list instance.
|
|
331
|
+
* When undefined, uses React Native's global I18nManager.isRTL.
|
|
332
|
+
* @default undefined
|
|
333
|
+
*/
|
|
334
|
+
rtl?: boolean;
|
|
318
335
|
/**
|
|
319
336
|
* Called when scrolling reaches the end within onEndReachedThreshold.
|
|
320
337
|
*/
|
|
@@ -411,12 +428,6 @@ interface LegendListSpecificProps<ItemT, TItemType extends string | undefined> {
|
|
|
411
428
|
* Array of item indices to use as snap points.
|
|
412
429
|
*/
|
|
413
430
|
snapToIndices?: number[];
|
|
414
|
-
/**
|
|
415
|
-
* This will log a suggested estimatedItemSize.
|
|
416
|
-
* @required
|
|
417
|
-
* @default false
|
|
418
|
-
*/
|
|
419
|
-
suggestEstimatedItemSize?: boolean;
|
|
420
431
|
/**
|
|
421
432
|
* Configuration for determining item viewability.
|
|
422
433
|
*/
|
|
@@ -505,6 +516,10 @@ interface LegendListMetrics {
|
|
|
505
516
|
headerSize: number;
|
|
506
517
|
footerSize: number;
|
|
507
518
|
}
|
|
519
|
+
interface LegendListAverageItemSize {
|
|
520
|
+
average: number;
|
|
521
|
+
count: number;
|
|
522
|
+
}
|
|
508
523
|
interface LegendListRenderItemProps<ItemT, TItemType extends string | number | undefined = string | number | undefined> {
|
|
509
524
|
data: readonly ItemT[];
|
|
510
525
|
extraData: any;
|
|
@@ -526,6 +541,7 @@ type LegendListState = {
|
|
|
526
541
|
isEndReached: boolean;
|
|
527
542
|
isStartReached: boolean;
|
|
528
543
|
isWithinMaintainScrollAtEndThreshold: boolean;
|
|
544
|
+
getAverageItemSizes: () => Record<string, LegendListAverageItemSize>;
|
|
529
545
|
listen: <T extends LegendListListenerType>(listenerType: T, callback: (value: ListenerTypeValueMap[T]) => void) => () => void;
|
|
530
546
|
listenToPosition: (key: string, callback: (value: number) => void) => () => void;
|
|
531
547
|
positionAtIndex: (index: number) => number;
|