@react-native/virtualized-lists 0.84.0-rc.0 → 0.85.0-nightly-20260108-1236b6be4
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/Lists/ListMetricsAggregator.js +3 -3
- package/Lists/ViewabilityHelper.js +1 -1
- package/Lists/VirtualizedList.js +2 -2
- package/Lists/VirtualizedListCellRenderer.js +1 -1
- package/Lists/VirtualizedListContext.js +1 -1
- package/Lists/VirtualizedListProps.js +1 -1
- package/Lists/VirtualizedSectionList.js +3 -3
- package/package.json +1 -1
|
@@ -135,7 +135,7 @@ export default class ListMetricsAggregator {
|
|
|
135
135
|
layout,
|
|
136
136
|
}: {
|
|
137
137
|
orientation: ListOrientation,
|
|
138
|
-
layout:
|
|
138
|
+
layout: Readonly<{width: number, height: number}>,
|
|
139
139
|
}): void {
|
|
140
140
|
this._invalidateIfOrientationChanged(orientation);
|
|
141
141
|
this._contentLength = this._selectLength(layout);
|
|
@@ -320,11 +320,11 @@ export default class ListMetricsAggregator {
|
|
|
320
320
|
_selectLength({
|
|
321
321
|
width,
|
|
322
322
|
height,
|
|
323
|
-
}:
|
|
323
|
+
}: Readonly<{width: number, height: number, ...}>): number {
|
|
324
324
|
return this._orientation.horizontal ? width : height;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
_selectOffset({x, y}:
|
|
327
|
+
_selectOffset({x, y}: Readonly<{x: number, y: number, ...}>): number {
|
|
328
328
|
return this._orientation.horizontal ? x : y;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -38,7 +38,7 @@ export type ViewabilityConfigCallbackPair = {
|
|
|
38
38
|
export type ViewabilityConfigCallbackPairs =
|
|
39
39
|
Array<ViewabilityConfigCallbackPair>;
|
|
40
40
|
|
|
41
|
-
export type ViewabilityConfig =
|
|
41
|
+
export type ViewabilityConfig = Readonly<{
|
|
42
42
|
/**
|
|
43
43
|
* Minimum amount of time (in milliseconds) that an item must be physically viewable before the
|
|
44
44
|
* viewability callback will be fired. A high number means that scrolling through content without
|
package/Lists/VirtualizedList.js
CHANGED
|
@@ -1502,7 +1502,7 @@ class VirtualizedList extends StateSafePureComponent<
|
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
1504
|
_selectLength(
|
|
1505
|
-
metrics:
|
|
1505
|
+
metrics: Readonly<{
|
|
1506
1506
|
height: number,
|
|
1507
1507
|
width: number,
|
|
1508
1508
|
...
|
|
@@ -1513,7 +1513,7 @@ class VirtualizedList extends StateSafePureComponent<
|
|
|
1513
1513
|
: metrics.width;
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
_selectOffset({x, y}:
|
|
1516
|
+
_selectOffset({x, y}: Readonly<{x: number, y: number, ...}>): number {
|
|
1517
1517
|
return this._orientation().horizontal ? x : y;
|
|
1518
1518
|
}
|
|
1519
1519
|
|
|
@@ -13,7 +13,7 @@ import type VirtualizedList from './VirtualizedList';
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import {createContext, useContext, useMemo} from 'react';
|
|
15
15
|
|
|
16
|
-
type Context =
|
|
16
|
+
type Context = Readonly<{
|
|
17
17
|
cellKey: ?string,
|
|
18
18
|
getScrollMetrics: () => {
|
|
19
19
|
contentLength: number,
|
|
@@ -23,7 +23,7 @@ type DefaultVirtualizedSectionT = {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export type SectionData<SectionItemT, SectionT = DefaultVirtualizedSectionT> =
|
|
26
|
-
| (
|
|
26
|
+
| (Readonly<SectionBase<SectionItemT, SectionT>> & SectionT)
|
|
27
27
|
| (SectionBase<SectionItemT, SectionT> & SectionT)
|
|
28
28
|
| SectionT;
|
|
29
29
|
|
|
@@ -478,7 +478,7 @@ class VirtualizedSectionList<
|
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
type ItemWithSeparatorCommonProps<ItemT> =
|
|
481
|
+
type ItemWithSeparatorCommonProps<ItemT> = Readonly<{
|
|
482
482
|
leadingItem: ?ItemT,
|
|
483
483
|
leadingSection: ?Object,
|
|
484
484
|
section: Object,
|
|
@@ -486,7 +486,7 @@ type ItemWithSeparatorCommonProps<ItemT> = $ReadOnly<{
|
|
|
486
486
|
trailingSection: ?Object,
|
|
487
487
|
}>;
|
|
488
488
|
|
|
489
|
-
type ItemWithSeparatorProps<ItemT> =
|
|
489
|
+
type ItemWithSeparatorProps<ItemT> = Readonly<{
|
|
490
490
|
...ItemWithSeparatorCommonProps<ItemT>,
|
|
491
491
|
LeadingSeparatorComponent: ?(React.ComponentType<any> | React.MixedElement),
|
|
492
492
|
SeparatorComponent: ?(React.ComponentType<any> | React.MixedElement),
|