@legendapp/list 3.0.3 → 3.0.5
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 +13 -0
- package/animated.d.ts +11 -4
- package/keyboard-legacy.d.ts +5 -4
- package/keyboard.d.ts +11 -4
- package/package.json +1 -1
- package/react-native.d.ts +11 -4
- package/react-native.js +489 -284
- package/react-native.mjs +489 -284
- package/react-native.web.d.ts +11 -4
- package/react-native.web.js +489 -284
- package/react-native.web.mjs +490 -285
- package/react.d.ts +11 -4
- package/react.js +489 -284
- package/react.mjs +490 -285
- package/reanimated.d.ts +11 -4
- package/section-list.d.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 3.0.5
|
|
2
|
+
|
|
3
|
+
- Fix: clearCaches now rechecks the rows that are already on screen, so resetting the size cache does not leave items stuck in old positions.
|
|
4
|
+
- Perf: Scrolling through content that is already rendered now updates viewability with less work.
|
|
5
|
+
- Perf: Trimmed repeated work during scrolls, especially around recycled containers, sticky headers, size checks, and viewability.
|
|
6
|
+
- Perf: Large and fast scrolls now reuse more of the same scroll state instead of recalculating it in multiple places.
|
|
7
|
+
|
|
8
|
+
## 3.0.4
|
|
9
|
+
|
|
10
|
+
- Fix: scrollToEnd now waits for newly committed data before targeting the final item, improving chat-style append-and-scroll flows.
|
|
11
|
+
- Fix: Anchored end space waits for measured or fixed tail sizes before reporting readiness, avoiding stale end-space values during append flows.
|
|
12
|
+
- Feat: Add anchoredEndSpace.onReady to notify when the anchored tail has authoritative sizing.
|
|
13
|
+
|
|
1
14
|
## 3.0.3
|
|
2
15
|
|
|
3
16
|
- Fix: MVCP was getting batched to improve big jumps, but was making scroll worse
|
package/animated.d.ts
CHANGED
|
@@ -388,12 +388,22 @@ interface MaintainVisibleContentPositionConfig<ItemT = any> {
|
|
|
388
388
|
size?: boolean;
|
|
389
389
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
390
390
|
}
|
|
391
|
+
interface AnchoredEndSpaceReadyInfo {
|
|
392
|
+
anchorIndex: number | undefined;
|
|
393
|
+
anchorKey: string | undefined;
|
|
394
|
+
size: number;
|
|
395
|
+
}
|
|
396
|
+
interface ScrollToEndOptions {
|
|
397
|
+
animated?: boolean;
|
|
398
|
+
viewOffset?: number;
|
|
399
|
+
}
|
|
391
400
|
interface AnchoredEndSpaceConfig {
|
|
392
401
|
anchorIndex: number;
|
|
393
402
|
anchorOffset?: number;
|
|
394
403
|
anchorMaxSize?: number;
|
|
395
404
|
includeInEndInset?: boolean;
|
|
396
405
|
onSizeChanged?: (size: number) => void;
|
|
406
|
+
onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
|
|
397
407
|
}
|
|
398
408
|
interface StickyHeaderConfig {
|
|
399
409
|
/**
|
|
@@ -525,10 +535,7 @@ type LegendListRef$1 = {
|
|
|
525
535
|
* @param options.animated - If true, animates the scroll. Default: true.
|
|
526
536
|
* @param options.viewOffset - Offset from the target position.
|
|
527
537
|
*/
|
|
528
|
-
scrollToEnd(options?:
|
|
529
|
-
animated?: boolean | undefined;
|
|
530
|
-
viewOffset?: number | undefined;
|
|
531
|
-
}): Promise<void>;
|
|
538
|
+
scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
|
|
532
539
|
/**
|
|
533
540
|
* Scrolls to a specific index in the list.
|
|
534
541
|
* @param params - Parameters for scrolling.
|
package/keyboard-legacy.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ interface Insets {
|
|
|
63
63
|
bottom: number;
|
|
64
64
|
right: number;
|
|
65
65
|
}
|
|
66
|
+
interface ScrollToEndOptions {
|
|
67
|
+
animated?: boolean;
|
|
68
|
+
viewOffset?: number;
|
|
69
|
+
}
|
|
66
70
|
interface LegendListAverageItemSize {
|
|
67
71
|
average: number;
|
|
68
72
|
count: number;
|
|
@@ -141,10 +145,7 @@ type LegendListRef$1 = {
|
|
|
141
145
|
* @param options.animated - If true, animates the scroll. Default: true.
|
|
142
146
|
* @param options.viewOffset - Offset from the target position.
|
|
143
147
|
*/
|
|
144
|
-
scrollToEnd(options?:
|
|
145
|
-
animated?: boolean | undefined;
|
|
146
|
-
viewOffset?: number | undefined;
|
|
147
|
-
}): Promise<void>;
|
|
148
|
+
scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
|
|
148
149
|
/**
|
|
149
150
|
* Scrolls to a specific index in the list.
|
|
150
151
|
* @param params - Parameters for scrolling.
|
package/keyboard.d.ts
CHANGED
|
@@ -64,12 +64,22 @@ interface Insets {
|
|
|
64
64
|
bottom: number;
|
|
65
65
|
right: number;
|
|
66
66
|
}
|
|
67
|
+
interface AnchoredEndSpaceReadyInfo {
|
|
68
|
+
anchorIndex: number | undefined;
|
|
69
|
+
anchorKey: string | undefined;
|
|
70
|
+
size: number;
|
|
71
|
+
}
|
|
72
|
+
interface ScrollToEndOptions {
|
|
73
|
+
animated?: boolean;
|
|
74
|
+
viewOffset?: number;
|
|
75
|
+
}
|
|
67
76
|
interface AnchoredEndSpaceConfig$1 {
|
|
68
77
|
anchorIndex: number;
|
|
69
78
|
anchorOffset?: number;
|
|
70
79
|
anchorMaxSize?: number;
|
|
71
80
|
includeInEndInset?: boolean;
|
|
72
81
|
onSizeChanged?: (size: number) => void;
|
|
82
|
+
onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
|
|
73
83
|
}
|
|
74
84
|
interface LegendListAverageItemSize {
|
|
75
85
|
average: number;
|
|
@@ -149,10 +159,7 @@ type LegendListRef$1 = {
|
|
|
149
159
|
* @param options.animated - If true, animates the scroll. Default: true.
|
|
150
160
|
* @param options.viewOffset - Offset from the target position.
|
|
151
161
|
*/
|
|
152
|
-
scrollToEnd(options?:
|
|
153
|
-
animated?: boolean | undefined;
|
|
154
|
-
viewOffset?: number | undefined;
|
|
155
|
-
}): Promise<void>;
|
|
162
|
+
scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
|
|
156
163
|
/**
|
|
157
164
|
* Scrolls to a specific index in the list.
|
|
158
165
|
* @param params - Parameters for scrolling.
|
package/package.json
CHANGED
package/react-native.d.ts
CHANGED
|
@@ -394,12 +394,22 @@ interface MaintainVisibleContentPositionConfig<ItemT = any> {
|
|
|
394
394
|
size?: boolean;
|
|
395
395
|
shouldRestorePosition?: (item: ItemT, index: number, data: readonly ItemT[]) => boolean;
|
|
396
396
|
}
|
|
397
|
+
interface AnchoredEndSpaceReadyInfo {
|
|
398
|
+
anchorIndex: number | undefined;
|
|
399
|
+
anchorKey: string | undefined;
|
|
400
|
+
size: number;
|
|
401
|
+
}
|
|
402
|
+
interface ScrollToEndOptions {
|
|
403
|
+
animated?: boolean;
|
|
404
|
+
viewOffset?: number;
|
|
405
|
+
}
|
|
397
406
|
interface AnchoredEndSpaceConfig {
|
|
398
407
|
anchorIndex: number;
|
|
399
408
|
anchorOffset?: number;
|
|
400
409
|
anchorMaxSize?: number;
|
|
401
410
|
includeInEndInset?: boolean;
|
|
402
411
|
onSizeChanged?: (size: number) => void;
|
|
412
|
+
onReady?: (info: AnchoredEndSpaceReadyInfo) => void;
|
|
403
413
|
}
|
|
404
414
|
interface StickyHeaderConfig {
|
|
405
415
|
/**
|
|
@@ -531,10 +541,7 @@ type LegendListRef$1 = {
|
|
|
531
541
|
* @param options.animated - If true, animates the scroll. Default: true.
|
|
532
542
|
* @param options.viewOffset - Offset from the target position.
|
|
533
543
|
*/
|
|
534
|
-
scrollToEnd(options?:
|
|
535
|
-
animated?: boolean | undefined;
|
|
536
|
-
viewOffset?: number | undefined;
|
|
537
|
-
}): Promise<void>;
|
|
544
|
+
scrollToEnd(options?: ScrollToEndOptions): Promise<void>;
|
|
538
545
|
/**
|
|
539
546
|
* Scrolls to a specific index in the list.
|
|
540
547
|
* @param params - Parameters for scrolling.
|