@react-native-tvos/virtualized-lists 0.74.5-0 → 0.75.2-0rc1

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.
@@ -122,6 +122,7 @@ class FillRateHelper {
122
122
  };
123
123
  for (const key in derived) {
124
124
  // $FlowFixMe[prop-missing]
125
+ // $FlowFixMe[invalid-computed-prop]
125
126
  derived[key] = Math.round(1000 * derived[key]) / 1000;
126
127
  }
127
128
  console.debug('FillRateHelper deactivateAndFlush: ', {derived, info});
@@ -140,17 +140,13 @@ export default class CellRenderer<ItemT> extends React.Component<
140
140
  }
141
141
 
142
142
  if (ListItemComponent) {
143
- /* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This
144
- * comment suppresses an error found when Flow v0.108 was deployed. To
145
- * see the error, delete this comment and run Flow. */
146
- /* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)
147
- * This comment suppresses an error found when Flow v0.108 was deployed.
148
- * To see the error, delete this comment and run Flow. */
149
- return React.createElement(ListItemComponent, {
150
- item,
151
- index,
152
- separators: this._separators,
153
- });
143
+ return (
144
+ <ListItemComponent
145
+ item={item}
146
+ index={index}
147
+ separators={this._separators}
148
+ />
149
+ );
154
150
  }
155
151
 
156
152
  if (renderItem) {
@@ -203,8 +199,8 @@ export default class CellRenderer<ItemT> extends React.Component<
203
199
  ? [styles.rowReverse, inversionStyle]
204
200
  : [styles.columnReverse, inversionStyle]
205
201
  : horizontal
206
- ? [styles.row, inversionStyle]
207
- : inversionStyle;
202
+ ? [styles.row, inversionStyle]
203
+ : inversionStyle;
208
204
  const result = !CellRendererComponent ? (
209
205
  <View
210
206
  style={cellStyle}
@@ -14,8 +14,6 @@ import VirtualizedList from './VirtualizedList';
14
14
  import {keyExtractor as defaultKeyExtractor} from './VirtualizeUtils';
15
15
  import invariant from 'invariant';
16
16
  import * as React from 'react';
17
- import {View} from 'react-native';
18
-
19
17
  type Item = any;
20
18
 
21
19
  export type SectionBase<SectionItemT> = {
@@ -593,14 +591,16 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {
593
591
  {...separatorProps}
594
592
  />
595
593
  );
596
- return leadingSeparator || separator ? (
597
- <View>
598
- {inverted === false ? leadingSeparator : separator}
594
+ const RenderSeparator = leadingSeparator || separator;
595
+ const firstSeparator = inverted === false ? leadingSeparator : separator;
596
+ const secondSeparator = inverted === false ? separator : leadingSeparator;
597
+
598
+ return (
599
+ <>
600
+ {RenderSeparator ? firstSeparator : null}
599
601
  {element}
600
- {inverted === false ? separator : leadingSeparator}
601
- </View>
602
- ) : (
603
- element
602
+ {RenderSeparator ? secondSeparator : null}
603
+ </>
604
604
  );
605
605
  }
606
606
 
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@react-native-tvos/virtualized-lists",
3
- "version": "0.74.5-0",
4
- "description": "Virtualized lists for React Native with TV focus engine support.",
3
+ "version": "0.75.2-0rc1",
4
+ "description": "Virtualized lists for React Native.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/react-native-tvos/react-native-tvos.git",
8
+ "url": "git+https://github.com/facebook/react-native.git",
9
9
  "directory": "packages/virtualized-lists"
10
10
  },
11
- "homepage": "https://github.com/react-native-tvos/react-native-tvos/tree/HEAD/packages/virtualized-lists#readme",
11
+ "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/virtualized-lists#readme",
12
12
  "keywords": [
13
13
  "lists",
14
14
  "virtualized-lists",
15
15
  "section-lists",
16
16
  "react-native"
17
17
  ],
18
- "bugs": "https://github.com/react-native-tvos/react-native-tvos/issues",
18
+ "bugs": "https://github.com/facebook/react-native/issues",
19
19
  "engines": {
20
20
  "node": ">=18"
21
21
  },
@@ -24,16 +24,16 @@
24
24
  "nullthrows": "^1.1.1"
25
25
  },
26
26
  "devDependencies": {
27
- "react-test-renderer": "18.2.0"
27
+ "react-test-renderer": "18.3.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@types/react": "^18.2.6",
31
31
  "react": "*",
32
- "react-native": "*"
32
+ "react-native-tvos": "*"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@types/react": {
36
36
  "optional": true
37
37
  }
38
38
  }
39
- }
39
+ }