refactor(arvr/xplat): update imports to resolve packaged virtualized list from react-native (#36035)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36035

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D42805202

fbshipit-source-id: 1f1d6e36ec6e19a1b46ce340be095bb60b8048f4
This commit is contained in:
Ruslan Lesiutin
2023-02-06 13:39:13 -08:00
committed by Facebook GitHub Bot
parent 2e3dbe9c2f
commit 1479b2ac26
7 changed files with 67 additions and 0 deletions
+2
View File
@@ -724,6 +724,8 @@ rn_library(
"Libraries/**/*.js",
"Libraries/NewAppScreen/**/*.png",
"Libraries/LogBox/**/*.png",
"packages/virtualized-lists/**/*.js",
"packages/virtualized-lists/**/*.json",
],
exclude = [
"**/__*__/**",
+19
View File
@@ -0,0 +1,19 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import {typeof FillRateHelper as FillRateHelperType} from '@react-native/virtualized-lists';
const FillRateHelper: FillRateHelperType =
require('@react-native/virtualized-lists').FillRateHelper;
export type {FillRateInfo} from '@react-native/virtualized-lists';
module.exports = FillRateHelper;
+1
View File
@@ -12,6 +12,7 @@
export type {
ViewToken,
ViewabilityConfig,
ViewabilityConfigCallbackPair,
} from '@react-native/virtualized-lists';
+18
View File
@@ -0,0 +1,18 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import {typeof keyExtractor as KeyExtractorType} from '@react-native/virtualized-lists';
const keyExtractor: KeyExtractorType =
require('@react-native/virtualized-lists').keyExtractor;
module.exports = {keyExtractor};
+18
View File
@@ -0,0 +1,18 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import {typeof VirtualizedListContextResetter as VirtualizedListContextResetterType} from '@react-native/virtualized-lists';
const VirtualizedListContextResetter: VirtualizedListContextResetterType =
require('@react-native/virtualized-lists').VirtualizedListContextResetter;
module.exports = {VirtualizedListContextResetter};
+6
View File
@@ -16,9 +16,11 @@ import typeof VirtualizedList from './Lists/VirtualizedList';
import typeof VirtualizedSectionList from './Lists/VirtualizedSectionList';
import {typeof VirtualizedListContextResetter} from './Lists/VirtualizedListContext';
import typeof ViewabilityHelper from './Lists/ViewabilityHelper';
import typeof FillRateHelper from './Lists/FillRateHelper';
export type {
ViewToken,
ViewabilityConfig,
ViewabilityConfigCallbackPair,
} from './Lists/ViewabilityHelper';
export type {
@@ -31,6 +33,7 @@ export type {
ScrollToLocationParamsType,
SectionBase,
} from './Lists/VirtualizedSectionList';
export type {FillRateInfo} from './Lists/FillRateHelper';
module.exports = {
keyExtractor,
@@ -48,4 +51,7 @@ module.exports = {
get ViewabilityHelper(): ViewabilityHelper {
return require('./Lists/ViewabilityHelper');
},
get FillRateHelper(): FillRateHelper {
return require('./Lists/FillRateHelper');
},
};
+3
View File
@@ -8,6 +8,9 @@
"directory": "packages/virtualized-lists"
},
"license": "MIT",
"dependencies": {
"invariant": "^2.2.4"
},
"devDependencies": {
"react-test-renderer": "18.2.0"
},