react-native-tvos 0.73.1-3 → 0.73.4-0
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/Libraries/AppDelegate/RCTAppDelegate.h +0 -2
- package/Libraries/AppDelegate/RCTAppDelegate.mm +20 -13
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +5 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Lists/FillRateHelper.js +3 -3
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/Lists/SectionList.d.ts +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/Lists/ViewabilityHelper.js +3 -3
- package/Libraries/Lists/VirtualizeUtils.js +2 -2
- package/Libraries/Lists/VirtualizedList.js +9 -2094
- package/Libraries/Lists/VirtualizedListContext.js +2 -2
- package/Libraries/Lists/VirtualizedSectionList.js +3 -3
- package/Libraries/Modal/Modal.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +5 -0
- package/README.md +11 -10
- package/React/Base/RCTVersion.m +2 -2
- package/React/CoreModules/RCTDeviceInfo.mm +33 -0
- package/React/CoreModules/RCTRedBox.mm +17 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +24 -1
- package/React/Modules/RCTUIManager.m +9 -3
- package/React/Views/RCTTVView.m +23 -0
- package/React/Views/ScrollView/RCTScrollView.m +81 -0
- package/ReactAndroid/build.gradle +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +11 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +9 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +29 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +2 -2
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +14 -6
- package/ReactCommon/react/renderer/debug/flags.h +2 -4
- package/ReactCommon/react/renderer/debug/tests/DebugStringConvertibleTest.cpp +2 -0
- package/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp +4 -0
- package/package.json +11 -10
- package/scripts/cocoapods/utils.rb +4 -40
- package/scripts/react-native-xcode.sh +1 -1
- package/scripts/react_native_pods.rb +1 -2
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/utils/replace_hermes_version.js +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/Gemfile +4 -2
- package/template/metro.config.js +23 -2
- package/template/package.json +5 -5
- package/third-party-podspecs/boost.podspec +1 -1
- package/types/index.d.ts +1 -1
|
@@ -100,8 +100,6 @@
|
|
|
100
100
|
* By default, it assigns the rootView to the view property of the rootViewController
|
|
101
101
|
* If you are not using a simple UIViewController, then there could be other methods to use to setup the rootView.
|
|
102
102
|
* For example: UISplitViewController requires `setViewController(_:for:)`
|
|
103
|
-
*
|
|
104
|
-
* @return: void
|
|
105
103
|
*/
|
|
106
104
|
- (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController;
|
|
107
105
|
|
|
@@ -49,6 +49,19 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
49
49
|
|
|
50
50
|
#endif
|
|
51
51
|
|
|
52
|
+
static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabricEnabled)
|
|
53
|
+
{
|
|
54
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
55
|
+
NSMutableDictionary *mutableProps = [initialProps mutableCopy] ?: [NSMutableDictionary new];
|
|
56
|
+
// Hardcoding the Concurrent Root as it it not recommended to
|
|
57
|
+
// have the concurrentRoot turned off when Fabric is enabled.
|
|
58
|
+
mutableProps[kRNConcurrentRoot] = @(isFabricEnabled);
|
|
59
|
+
return mutableProps;
|
|
60
|
+
#else
|
|
61
|
+
return initialProps;
|
|
62
|
+
#endif
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
@interface RCTAppDelegate () <RCTCxxBridgeDelegate> {
|
|
53
66
|
std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
|
|
54
67
|
}
|
|
@@ -76,10 +89,13 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
76
89
|
{
|
|
77
90
|
BOOL enableTM = NO;
|
|
78
91
|
BOOL enableBridgeless = NO;
|
|
92
|
+
BOOL fabricEnabled = NO;
|
|
79
93
|
#if RCT_NEW_ARCH_ENABLED
|
|
80
94
|
enableTM = self.turboModuleEnabled;
|
|
81
95
|
enableBridgeless = self.bridgelessEnabled;
|
|
96
|
+
fabricEnabled = [self fabricEnabled];
|
|
82
97
|
#endif
|
|
98
|
+
NSDictionary *initProps = updateInitialProps([self prepareInitialProps], fabricEnabled);
|
|
83
99
|
|
|
84
100
|
RCTAppSetupPrepareApp(application, enableTM);
|
|
85
101
|
|
|
@@ -88,7 +104,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
88
104
|
if (enableBridgeless) {
|
|
89
105
|
#if RCT_NEW_ARCH_ENABLED
|
|
90
106
|
// Enable native view config interop only if both bridgeless mode and Fabric is enabled.
|
|
91
|
-
RCTSetUseNativeViewConfigsInBridgelessMode(
|
|
107
|
+
RCTSetUseNativeViewConfigsInBridgelessMode(fabricEnabled);
|
|
92
108
|
|
|
93
109
|
// Enable TurboModule interop by default in Bridgeless mode
|
|
94
110
|
RCTEnableTurboModuleInterop(YES);
|
|
@@ -97,8 +113,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
97
113
|
[self createReactHost];
|
|
98
114
|
[self unstable_registerLegacyComponents];
|
|
99
115
|
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
|
|
100
|
-
RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName
|
|
101
|
-
initialProperties:launchOptions];
|
|
116
|
+
RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName initialProperties:initProps];
|
|
102
117
|
|
|
103
118
|
RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc]
|
|
104
119
|
initWithSurface:surface
|
|
@@ -118,7 +133,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
118
133
|
[self unstable_registerLegacyComponents];
|
|
119
134
|
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
|
|
120
135
|
#endif
|
|
121
|
-
|
|
136
|
+
|
|
122
137
|
rootView = [self createRootViewWithBridge:self.bridge moduleName:self.moduleName initProps:initProps];
|
|
123
138
|
}
|
|
124
139
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
@@ -140,15 +155,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
140
155
|
|
|
141
156
|
- (NSDictionary *)prepareInitialProps
|
|
142
157
|
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
146
|
-
// Hardcoding the Concurrent Root as it it not recommended to
|
|
147
|
-
// have the concurrentRoot turned off when Fabric is enabled.
|
|
148
|
-
initProps[kRNConcurrentRoot] = @([self fabricEnabled]);
|
|
149
|
-
#endif
|
|
150
|
-
|
|
151
|
-
return initProps;
|
|
158
|
+
return self.initialProps;
|
|
152
159
|
}
|
|
153
160
|
|
|
154
161
|
- (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions
|
|
@@ -234,6 +234,10 @@ class TouchableBounce extends React.Component<Props, State> {
|
|
|
234
234
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
componentDidMount(): mixed {
|
|
238
|
+
this.state.pressability.configure(this._createPressabilityConfig());
|
|
239
|
+
}
|
|
240
|
+
|
|
237
241
|
componentWillUnmount(): void {
|
|
238
242
|
if (Platform.isTV) {
|
|
239
243
|
if (this._tvTouchable != null) {
|
|
@@ -348,7 +348,9 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|
|
348
348
|
onLayout={this.props.onLayout}
|
|
349
349
|
hitSlop={this.props.hitSlop}
|
|
350
350
|
hasTVPreferredFocus={this.props.hasTVPreferredFocus === true}
|
|
351
|
-
isTVSelectable={
|
|
351
|
+
isTVSelectable={
|
|
352
|
+
this.props.isTVSelectable !== false && this.props.accessible !== false
|
|
353
|
+
}
|
|
352
354
|
tvParallaxProperties={this.props.tvParallaxProperties}
|
|
353
355
|
nextFocusDown={tagForComponentOrHandle(this.props.nextFocusDown)}
|
|
354
356
|
nextFocusForward={tagForComponentOrHandle(this.props.nextFocusForward)}
|
|
@@ -376,6 +378,7 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|
|
376
378
|
}
|
|
377
379
|
|
|
378
380
|
componentDidMount(): void {
|
|
381
|
+
this.state.pressability.configure(this._createPressabilityConfig());
|
|
379
382
|
this._isMounted = true;
|
|
380
383
|
if (Platform.isTV) {
|
|
381
384
|
this._tvTouchable = new TVTouchable(this, {
|
|
@@ -408,6 +411,7 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|
|
408
411
|
},
|
|
409
412
|
});
|
|
410
413
|
}
|
|
414
|
+
this.state.pressability.configure(this._createPressabilityConfig());
|
|
411
415
|
}
|
|
412
416
|
|
|
413
417
|
componentDidUpdate(prevProps: Props, prevState: State) {
|
|
@@ -340,6 +340,7 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
|
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
componentDidMount(): void {
|
|
343
|
+
this.state.pressability.configure(this._createPressabilityConfig());
|
|
343
344
|
if (Platform.isTV) {
|
|
344
345
|
this._tvTouchable = new TVTouchable(this, {
|
|
345
346
|
getDisabled: () => this.props.disabled === true,
|
|
@@ -312,6 +312,7 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
componentDidMount(): void {
|
|
315
|
+
this.state.pressability.configure(this._createPressabilityConfig());
|
|
315
316
|
if (Platform.isTV) {
|
|
316
317
|
this._tvTouchable = new TVTouchable(this, {
|
|
317
318
|
getDisabled: () => this.props.disabled === true,
|
|
@@ -192,6 +192,7 @@ class TouchableWithoutFeedback extends React.Component<Props, State> {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
componentDidMount(): void {
|
|
195
|
+
this.state.pressability.configure(createPressabilityConfig(this.props));
|
|
195
196
|
if (Platform.isTV) {
|
|
196
197
|
this._tvTouchable = new TVTouchable(this, {
|
|
197
198
|
getDisabled: () => this.props.disabled === true,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {RenderItemProps} from '@react-native/virtualized-lists';
|
|
13
|
+
import type {RenderItemProps} from '@react-native-tvos/virtualized-lists';
|
|
14
14
|
|
|
15
15
|
const ScrollView = require('../Components/ScrollView/ScrollView');
|
|
16
16
|
const TouchableHighlight = require('../Components/Touchable/TouchableHighlight');
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof FillRateHelper as FillRateHelperType} from '@react-native/virtualized-lists';
|
|
13
|
+
import {typeof FillRateHelper as FillRateHelperType} from '@react-native-tvos/virtualized-lists';
|
|
14
14
|
|
|
15
15
|
const FillRateHelper: FillRateHelperType =
|
|
16
|
-
require('@react-native/virtualized-lists').FillRateHelper;
|
|
16
|
+
require('@react-native-tvos/virtualized-lists').FillRateHelper;
|
|
17
17
|
|
|
18
|
-
export type {FillRateInfo} from '@react-native/virtualized-lists';
|
|
18
|
+
export type {FillRateInfo} from '@react-native-tvos/virtualized-lists';
|
|
19
19
|
module.exports = FillRateHelper;
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
ViewToken,
|
|
14
14
|
VirtualizedListProps,
|
|
15
15
|
ViewabilityConfig,
|
|
16
|
-
} from '@react-native/virtualized-lists';
|
|
16
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
17
17
|
import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
|
|
18
18
|
import type {StyleProp} from '../StyleSheet/StyleSheet';
|
|
19
19
|
import type {ViewStyle} from '../StyleSheet/StyleSheetTypes';
|
|
@@ -15,13 +15,13 @@ import type {
|
|
|
15
15
|
RenderItemType,
|
|
16
16
|
ViewabilityConfigCallbackPair,
|
|
17
17
|
ViewToken,
|
|
18
|
-
} from '@react-native/virtualized-lists';
|
|
18
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
19
19
|
|
|
20
20
|
import {type ScrollResponderType} from '../Components/ScrollView/ScrollView';
|
|
21
21
|
import {
|
|
22
22
|
VirtualizedList,
|
|
23
23
|
keyExtractor as defaultKeyExtractor,
|
|
24
|
-
} from '@react-native/virtualized-lists';
|
|
24
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
25
25
|
import memoizeOne from 'memoize-one';
|
|
26
26
|
|
|
27
27
|
const View = require('../Components/View/View');
|
|
@@ -11,7 +11,7 @@ import type * as React from 'react';
|
|
|
11
11
|
import type {
|
|
12
12
|
ListRenderItemInfo,
|
|
13
13
|
VirtualizedListWithoutRenderItemProps,
|
|
14
|
-
} from '@react-native/virtualized-lists';
|
|
14
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
15
15
|
import type {
|
|
16
16
|
ScrollView,
|
|
17
17
|
ScrollViewProps,
|
|
@@ -15,10 +15,10 @@ import type {
|
|
|
15
15
|
ScrollToLocationParamsType,
|
|
16
16
|
SectionBase as _SectionBase,
|
|
17
17
|
VirtualizedSectionListProps,
|
|
18
|
-
} from '@react-native/virtualized-lists';
|
|
18
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
19
19
|
|
|
20
20
|
import Platform from '../Utilities/Platform';
|
|
21
|
-
import {VirtualizedSectionList} from '@react-native/virtualized-lists';
|
|
21
|
+
import {VirtualizedSectionList} from '@react-native-tvos/virtualized-lists';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
24
|
type Item = any;
|
|
@@ -15,11 +15,11 @@ import type {
|
|
|
15
15
|
ScrollToLocationParamsType,
|
|
16
16
|
SectionBase as _SectionBase,
|
|
17
17
|
VirtualizedSectionListProps,
|
|
18
|
-
} from '@react-native/virtualized-lists';
|
|
18
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
19
19
|
import type {AbstractComponent, Element, ElementRef} from 'react';
|
|
20
20
|
|
|
21
21
|
import Platform from '../Utilities/Platform';
|
|
22
|
-
import {VirtualizedSectionList} from '@react-native/virtualized-lists';
|
|
22
|
+
import {VirtualizedSectionList} from '@react-native-tvos/virtualized-lists';
|
|
23
23
|
import React, {forwardRef, useImperativeHandle, useRef} from 'react';
|
|
24
24
|
|
|
25
25
|
type Item = any;
|
|
@@ -14,11 +14,11 @@ export type {
|
|
|
14
14
|
ViewToken,
|
|
15
15
|
ViewabilityConfig,
|
|
16
16
|
ViewabilityConfigCallbackPair,
|
|
17
|
-
} from '@react-native/virtualized-lists';
|
|
17
|
+
} from '@react-native-tvos/virtualized-lists';
|
|
18
18
|
|
|
19
|
-
import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native/virtualized-lists';
|
|
19
|
+
import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native-tvos/virtualized-lists';
|
|
20
20
|
|
|
21
21
|
const ViewabilityHelper: ViewabilityHelperType =
|
|
22
|
-
require('@react-native/virtualized-lists').ViewabilityHelper;
|
|
22
|
+
require('@react-native-tvos/virtualized-lists').ViewabilityHelper;
|
|
23
23
|
|
|
24
24
|
module.exports = ViewabilityHelper;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import {typeof keyExtractor as KeyExtractorType} from '@react-native/virtualized-lists';
|
|
13
|
+
import {typeof keyExtractor as KeyExtractorType} from '@react-native-tvos/virtualized-lists';
|
|
14
14
|
|
|
15
15
|
const keyExtractor: KeyExtractorType =
|
|
16
|
-
require('@react-native/virtualized-lists').keyExtractor;
|
|
16
|
+
require('@react-native-tvos/virtualized-lists').keyExtractor;
|
|
17
17
|
|
|
18
18
|
module.exports = {keyExtractor};
|