react-native-tvos 0.83.6-0 → 0.83.10-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.
Files changed (208) hide show
  1. package/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
  2. package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
  3. package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -1
  4. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  5. package/Libraries/Components/Button.js +2 -2
  6. package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
  7. package/Libraries/Components/ScrollView/ScrollView.js +1 -1
  8. package/Libraries/Components/TV/TVViewPropTypes.js +9 -0
  9. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
  10. package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
  11. package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
  12. package/Libraries/Components/View/View.js +7 -3
  13. package/Libraries/Components/View/ViewAccessibility.d.ts +1 -1
  14. package/Libraries/Components/View/ViewAccessibility.js +1 -1
  15. package/Libraries/Core/ReactNativeVersion.js +1 -1
  16. package/Libraries/Core/Timers/JSTimers.js +1 -1
  17. package/Libraries/Core/setUpNavigator.js +1 -1
  18. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +1 -1
  19. package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
  20. package/Libraries/Image/ImageSource.d.ts +1 -1
  21. package/Libraries/Image/RCTImageLoader.mm +1 -1
  22. package/Libraries/Image/React-RCTImage.podspec +1 -1
  23. package/Libraries/Interaction/PanResponder.js +1 -1
  24. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  25. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
  26. package/Libraries/NativeComponent/TVViewConfig.js +1 -0
  27. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  28. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  29. package/Libraries/Renderer/README.md +2 -2
  30. package/Libraries/Required/RCTRequired.podspec +1 -1
  31. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  32. package/Libraries/Text/React-RCTText.podspec +1 -1
  33. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  34. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  35. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  36. package/README-core.md +6 -6
  37. package/README.md +13 -1
  38. package/React/Base/RCTVersion.m +1 -1
  39. package/React/CoreModules/RCTJscSafeUrl+Internal.h +23 -0
  40. package/React/CoreModules/RCTJscSafeUrl.mm +38 -0
  41. package/React/CoreModules/RCTRedBox+Internal.h +42 -0
  42. package/React/CoreModules/RCTRedBox.mm +30 -471
  43. package/React/CoreModules/RCTRedBox2AnsiParser+Internal.h +22 -0
  44. package/React/CoreModules/RCTRedBox2AnsiParser.mm +55 -0
  45. package/React/CoreModules/RCTRedBox2Controller+Internal.h +34 -0
  46. package/React/CoreModules/RCTRedBox2Controller.mm +764 -0
  47. package/React/CoreModules/RCTRedBox2ErrorParser+Internal.h +46 -0
  48. package/React/CoreModules/RCTRedBox2ErrorParser.mm +57 -0
  49. package/React/CoreModules/RCTRedBoxController+Internal.h +31 -0
  50. package/React/CoreModules/RCTRedBoxController.mm +447 -0
  51. package/React/CoreModules/RCTRedBoxHMRClient+Internal.h +26 -0
  52. package/React/CoreModules/RCTRedBoxHMRClient.mm +125 -0
  53. package/React/CoreModules/React-CoreModules.podspec +2 -1
  54. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +24 -0
  55. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +49 -17
  56. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +12 -1
  57. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +35 -7
  58. package/React/React-RCTFBReactNativeSpec.podspec +1 -1
  59. package/React/React-RCTFabric.podspec +1 -1
  60. package/React/Runtime/React-RCTRuntime.podspec +1 -1
  61. package/React/Tests/Mounting/RCTViewComponentViewTests.mm +145 -0
  62. package/React/Views/ScrollView/RCTScrollView.m +1 -1
  63. package/React-Core.podspec +1 -1
  64. package/React.podspec +1 -1
  65. package/ReactAndroid/build.gradle.kts +1 -1
  66. package/ReactAndroid/gradle.properties +1 -1
  67. package/ReactAndroid/hermes-engine/build.gradle.kts +6 -0
  68. package/ReactAndroid/publish.gradle +20 -46
  69. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt +99 -9
  70. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.kt +1 -1
  71. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +2 -2
  72. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +19 -1
  73. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -1
  74. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -1
  75. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -1
  76. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -1
  77. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -1
  78. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt +1 -1
  79. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactAndroidHWInputDeviceHelper.java +1 -0
  80. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +1 -1
  81. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +3 -3
  82. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  83. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +1 -1
  84. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +1 -1
  85. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +14 -4
  86. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +14 -4
  87. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +46 -6
  88. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt +1 -1
  89. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +1 -1
  90. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +2 -2
  91. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +2 -2
  92. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextSelectionWatcher.kt +1 -1
  93. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +1 -0
  94. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +5 -0
  95. package/ReactAndroid/src/main/jni/CMakeLists.txt +7 -0
  96. package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocket.cpp +29 -2
  97. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -1
  98. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -1
  99. package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
  100. package/ReactApple/RCTSwiftUI/RCTSwiftUI.podspec +1 -1
  101. package/ReactApple/RCTSwiftUIWrapper/RCTSwiftUIWrapper.podspec +1 -1
  102. package/ReactCommon/React-Fabric.podspec +7 -1
  103. package/ReactCommon/React-FabricComponents.podspec +1 -1
  104. package/ReactCommon/React-FabricImage.podspec +1 -1
  105. package/ReactCommon/React-Mapbuffer.podspec +1 -1
  106. package/ReactCommon/ReactCommon.podspec +1 -1
  107. package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
  108. package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
  109. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  110. package/ReactCommon/hermes/React-hermes.podspec +1 -1
  111. package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
  112. package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
  113. package/ReactCommon/jsi/React-jsi.podspec +1 -1
  114. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
  115. package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +7 -3
  116. package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
  117. package/ReactCommon/jsinspector-modern/TracingAgent.cpp +1 -5
  118. package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +1 -1
  119. package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +1 -1
  120. package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -1
  121. package/ReactCommon/jsitooling/React-jsitooling.podspec +1 -1
  122. package/ReactCommon/logger/React-logger.podspec +1 -1
  123. package/ReactCommon/oscompat/React-oscompat.podspec +1 -1
  124. package/ReactCommon/react/debug/CMakeLists.txt +2 -1
  125. package/ReactCommon/react/debug/React-debug.podspec +8 -2
  126. package/ReactCommon/react/debug/redbox/AnsiParser.cpp +139 -0
  127. package/ReactCommon/react/debug/redbox/AnsiParser.h +35 -0
  128. package/ReactCommon/react/debug/redbox/JscSafeUrl.cpp +179 -0
  129. package/ReactCommon/react/debug/redbox/JscSafeUrl.h +27 -0
  130. package/ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp +171 -0
  131. package/ReactCommon/react/debug/redbox/RedBoxErrorParser.h +40 -0
  132. package/ReactCommon/react/debug/redbox/tests/AnsiParserTest.cpp +97 -0
  133. package/ReactCommon/react/debug/redbox/tests/JscSafeUrlTest.cpp +173 -0
  134. package/ReactCommon/react/debug/redbox/tests/RedBoxErrorParserTest.cpp +107 -0
  135. package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
  136. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -1
  137. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +16 -1
  138. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +106 -52
  139. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -2
  140. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -1
  141. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +28 -1
  142. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -1
  143. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +1 -1
  144. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
  145. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +1 -1
  146. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +1 -1
  147. package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
  148. package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +7 -0
  149. package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +2 -1
  150. package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +1 -1
  151. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -1
  152. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -1
  153. package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +1 -1
  154. package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +1 -1
  155. package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +1 -1
  156. package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +1 -1
  157. package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +4 -0
  158. package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +66 -0
  159. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  160. package/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec +1 -1
  161. package/ReactCommon/react/networking/React-networking.podspec +1 -1
  162. package/ReactCommon/react/performance/cdpmetrics/React-performancecdpmetrics.podspec +1 -1
  163. package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -1
  164. package/ReactCommon/react/renderer/animated/internal/primitives.h +1 -1
  165. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +7 -0
  166. package/ReactCommon/react/renderer/components/view/BaseViewProps.h +1 -0
  167. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +18 -0
  168. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h +1 -0
  169. package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +1 -1
  170. package/ReactCommon/react/renderer/css/React-renderercss.podspec +1 -1
  171. package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
  172. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  173. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  174. package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +1 -1
  175. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
  176. package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
  177. package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
  178. package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
  179. package/ReactCommon/react/timing/React-timing.podspec +1 -1
  180. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  181. package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
  182. package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +1 -1
  183. package/ReactCommon/yoga/Yoga.podspec +2 -2
  184. package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +2 -0
  185. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +11 -7
  186. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +2 -0
  187. package/ReactCommon/yoga/yoga/node/Node.cpp +6 -1
  188. package/package.json +9 -9
  189. package/scripts/cocoapods/rncore.rb +26 -8
  190. package/scripts/cocoapods/rndependencies.rb +26 -5
  191. package/scripts/cocoapods/spm.rb +1 -1
  192. package/scripts/cocoapods/utils.rb +2 -2
  193. package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +1 -1
  194. package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -1
  195. package/scripts/ios-configure-glog.sh +1 -1
  196. package/scripts/react_native_pods.rb +1 -0
  197. package/sdks/hermes-engine/hermes-engine.podspec +6 -1
  198. package/sdks/hermes-engine/hermes-utils.rb +27 -5
  199. package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -1
  200. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -1
  201. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  202. package/src/private/types/HostInstance.js +1 -1
  203. package/src/types/globals.d.ts +2 -2
  204. package/third-party-podspecs/RCT-Folly.podspec +1 -1
  205. package/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
  206. package/third-party-podspecs/glog.podspec +1 -1
  207. package/types/public/ReactNativeTVTypes.d.ts +9 -0
  208. package/types/public/ReactNativeTypes.d.ts +2 -2
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTRedBoxHMRClient+Internal.h"
9
+
10
+ #if RCT_DEV_MENU
11
+
12
+ @implementation RCTRedBoxHMRClient {
13
+ NSURL *_bundleURL;
14
+ NSURLSessionWebSocketTask *_webSocketTask;
15
+ NSURLSession *_session;
16
+ void (^_onFileChange)(void);
17
+ BOOL _stopped;
18
+ }
19
+
20
+ - (instancetype)initWithBundleURL:(NSURL *)bundleURL onFileChange:(void (^)(void))onFileChange
21
+ {
22
+ if (self = [super init]) {
23
+ _bundleURL = bundleURL;
24
+ _onFileChange = [onFileChange copy];
25
+ }
26
+ return self;
27
+ }
28
+
29
+ - (void)start
30
+ {
31
+ if (![_bundleURL.scheme hasPrefix:@"http"]) {
32
+ return;
33
+ }
34
+
35
+ NSURLComponents *components = [[NSURLComponents alloc] initWithURL:_bundleURL resolvingAgainstBaseURL:NO];
36
+ components.scheme = [_bundleURL.scheme isEqualToString:@"https"] ? @"wss" : @"ws";
37
+ components.path = @"/hot";
38
+ components.query = nil;
39
+ components.fragment = nil;
40
+ NSURL *wsURL = components.URL;
41
+ if (!wsURL) {
42
+ return;
43
+ }
44
+
45
+ _session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]
46
+ delegate:self
47
+ delegateQueue:nil];
48
+ _webSocketTask = [_session webSocketTaskWithURL:wsURL];
49
+ [_webSocketTask resume];
50
+ }
51
+
52
+ - (void)stop
53
+ {
54
+ _stopped = YES;
55
+ _onFileChange = nil;
56
+ [_webSocketTask cancel];
57
+ _webSocketTask = nil;
58
+ [_session invalidateAndCancel];
59
+ _session = nil;
60
+ }
61
+
62
+ - (void)URLSession:(__unused NSURLSession *)session
63
+ webSocketTask:(__unused NSURLSessionWebSocketTask *)webSocketTask
64
+ didOpenWithProtocol:(__unused NSString *)protocol
65
+ {
66
+ NSDictionary *registration = @{
67
+ @"type" : @"register-entrypoints",
68
+ @"entryPoints" : @[ _bundleURL.absoluteString ],
69
+ };
70
+ NSData *json = [NSJSONSerialization dataWithJSONObject:registration options:0 error:nil];
71
+ NSURLSessionWebSocketMessage *msg = [[NSURLSessionWebSocketMessage alloc]
72
+ initWithString:[[NSString alloc] initWithData:json encoding:NSUTF8StringEncoding]];
73
+ [_webSocketTask sendMessage:msg
74
+ completionHandler:^(__unused NSError *error){
75
+ }];
76
+ [self _listenForNextMessage];
77
+ }
78
+
79
+ - (void)_listenForNextMessage
80
+ {
81
+ if (_stopped) {
82
+ return;
83
+ }
84
+ __weak __typeof(self) weakSelf = self;
85
+ [_webSocketTask receiveMessageWithCompletionHandler:^(NSURLSessionWebSocketMessage *message, NSError *error) {
86
+ if (error || !message) {
87
+ return;
88
+ }
89
+ [weakSelf _handleMessage:message];
90
+ [weakSelf _listenForNextMessage];
91
+ }];
92
+ }
93
+
94
+ - (void)_handleMessage:(NSURLSessionWebSocketMessage *)message
95
+ {
96
+ if (message.type != NSURLSessionWebSocketMessageTypeString || _stopped) {
97
+ return;
98
+ }
99
+ NSData *data = [message.string dataUsingEncoding:NSUTF8StringEncoding];
100
+ NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
101
+ if ([json[@"type"] isEqualToString:@"update-start"]) {
102
+ // Ignore the initial update that fires when the client first registers.
103
+ // Only react to subsequent file changes.
104
+ NSDictionary *body = json[@"body"];
105
+ if ([body isKindOfClass:[NSDictionary class]] && [body[@"isInitialUpdate"] boolValue]) {
106
+ return;
107
+ }
108
+ dispatch_async(dispatch_get_main_queue(), ^{
109
+ if (self->_onFileChange) {
110
+ self->_onFileChange();
111
+ }
112
+ });
113
+ }
114
+ }
115
+
116
+ - (void)URLSession:(__unused NSURLSession *)session
117
+ webSocketTask:(__unused NSURLSessionWebSocketTask *)task
118
+ didCloseWithCode:(__unused NSURLSessionWebSocketCloseCode)closeCode
119
+ reason:(__unused NSData *)reason
120
+ {
121
+ }
122
+
123
+ @end
124
+
125
+ #endif
@@ -8,7 +8,7 @@ require "json"
8
8
  package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
9
9
  version = package['version']
10
10
 
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
11
+ source = { :git => 'https://github.com/react/react-native.git' }
12
12
  if version == '1000.0.0'
13
13
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
14
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
@@ -51,6 +51,7 @@ Pod::Spec.new do |s|
51
51
  s.dependency "React-Core/CoreModulesHeaders", version
52
52
  s.dependency "React-RCTImage", version
53
53
  s.dependency "React-jsi", version
54
+ add_dependency(s, "React-featureflags")
54
55
  s.dependency 'React-RCTBlob'
55
56
  add_dependency(s, "React-debug")
56
57
  add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])
@@ -260,6 +260,7 @@ protected:
260
260
  methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableLayoutAnimationsOnIOS};
261
261
  methodMap_["enableMainQueueCoordinatorOnIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableMainQueueCoordinatorOnIOS};
262
262
  methodMap_["enableModuleArgumentNSNullConversionIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableModuleArgumentNSNullConversionIOS};
263
+ methodMap_["enableMutationObserverByDefault"] = MethodMetadata {.argCount = 0, .invoker = __enableMutationObserverByDefault};
263
264
  methodMap_["enableNativeCSSParsing"] = MethodMetadata {.argCount = 0, .invoker = __enableNativeCSSParsing};
264
265
  methodMap_["enableNetworkEventReporting"] = MethodMetadata {.argCount = 0, .invoker = __enableNetworkEventReporting};
265
266
  methodMap_["enablePreparedTextLayout"] = MethodMetadata {.argCount = 0, .invoker = __enablePreparedTextLayout};
@@ -290,6 +291,8 @@ protected:
290
291
  methodMap_["perfMonitorV2Enabled"] = MethodMetadata {.argCount = 0, .invoker = __perfMonitorV2Enabled};
291
292
  methodMap_["preparedTextCacheSize"] = MethodMetadata {.argCount = 0, .invoker = __preparedTextCacheSize};
292
293
  methodMap_["preventShadowTreeCommitExhaustion"] = MethodMetadata {.argCount = 0, .invoker = __preventShadowTreeCommitExhaustion};
294
+ methodMap_["redBoxV2Android"] = MethodMetadata {.argCount = 0, .invoker = __redBoxV2Android};
295
+ methodMap_["redBoxV2IOS"] = MethodMetadata {.argCount = 0, .invoker = __redBoxV2IOS};
293
296
  methodMap_["shouldPressibilityUseW3CPointerEventsForHover"] = MethodMetadata {.argCount = 0, .invoker = __shouldPressibilityUseW3CPointerEventsForHover};
294
297
  methodMap_["shouldTriggerResponderTransferOnScrollAndroid"] = MethodMetadata {.argCount = 0, .invoker = __shouldTriggerResponderTransferOnScrollAndroid};
295
298
  methodMap_["skipActivityIdentityAssertionOnHostPause"] = MethodMetadata {.argCount = 0, .invoker = __skipActivityIdentityAssertionOnHostPause};
@@ -573,6 +576,13 @@ private:
573
576
  return bridging::callFromJs<bool>(rt, &T::enableModuleArgumentNSNullConversionIOS, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
574
577
  }
575
578
 
579
+ static jsi::Value __enableMutationObserverByDefault(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
580
+ static_assert(
581
+ bridging::getParameterCount(&T::enableMutationObserverByDefault) == 1,
582
+ "Expected enableMutationObserverByDefault(...) to have 1 parameters");
583
+ return bridging::callFromJs<bool>(rt, &T::enableMutationObserverByDefault, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
584
+ }
585
+
576
586
  static jsi::Value __enableNativeCSSParsing(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
577
587
  static_assert(
578
588
  bridging::getParameterCount(&T::enableNativeCSSParsing) == 1,
@@ -783,6 +793,20 @@ private:
783
793
  return bridging::callFromJs<bool>(rt, &T::preventShadowTreeCommitExhaustion, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
784
794
  }
785
795
 
796
+ static jsi::Value __redBoxV2Android(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
797
+ static_assert(
798
+ bridging::getParameterCount(&T::redBoxV2Android) == 1,
799
+ "Expected redBoxV2Android(...) to have 1 parameters");
800
+ return bridging::callFromJs<bool>(rt, &T::redBoxV2Android, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
801
+ }
802
+
803
+ static jsi::Value __redBoxV2IOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
804
+ static_assert(
805
+ bridging::getParameterCount(&T::redBoxV2IOS) == 1,
806
+ "Expected redBoxV2IOS(...) to have 1 parameters");
807
+ return bridging::callFromJs<bool>(rt, &T::redBoxV2IOS, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
808
+ }
809
+
786
810
  static jsi::Value __shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
787
811
  static_assert(
788
812
  bridging::getParameterCount(&T::shouldPressibilityUseW3CPointerEventsForHover) == 1,
@@ -264,7 +264,7 @@ RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInt
264
264
  if (@available(iOS 14.0, *)) {
265
265
  // On iOS when Prefer Cross-Fade Transitions is enabled, the keyboard position
266
266
  // & height is reported differently (0 instead of Y position value matching height of frame)
267
- // Fixes similar issue we saw with https://github.com/facebook/react-native/pull/34503
267
+ // Fixes similar issue we saw with https://github.com/react/react-native/pull/34503
268
268
  if (UIAccessibilityPrefersCrossFadeTransitions() && keyboardEndFrame.size.height == 0) {
269
269
  newContentOffset.y = 0;
270
270
  newEdgeInsets.bottom = 0;
@@ -1154,13 +1154,20 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
1154
1154
  #pragma mark Apple TV swipe and focus handling
1155
1155
 
1156
1156
  #if TARGET_OS_TV
1157
- // Focus marker helper: traverses view hierarchy to find scrollSnapAlign prop
1158
- // Returns the view that has the property via the output parameter
1159
- - (NSString *)findScrollSnapAlignInView:(UIView *)view foundView:(UIView **)outView
1157
+ // Focus marker helper: traverses view hierarchy to find either scrollSnapAlign
1158
+ // or scrollSnapOffset. Returns the view that has the property via the output
1159
+ // parameter and the marker type via outAlign/outOffset (exactly one non-nil on
1160
+ // return). Walk is inner→outer, latest marker wins (same as PR-1068's
1161
+ // scrollSnapAlign behavior). On a single view declaring both, scrollSnapOffset
1162
+ // wins as the more specific config.
1163
+ - (UIView *)findScrollSnapInView:(UIView *)view
1164
+ outAlign:(NSString **)outAlign
1165
+ outOffset:(NSNumber **)outOffset
1160
1166
  {
1161
1167
  UIView *testView = view;
1162
1168
  UIView *snapTarget;
1163
- NSString *marker;
1169
+ NSString *align;
1170
+ NSNumber *offset;
1164
1171
 
1165
1172
  while (testView && testView != self) {
1166
1173
  if (![testView isKindOfClass:RCTViewComponentView.class])
@@ -1171,28 +1178,37 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
1171
1178
  RCTViewComponentView *componentView = (RCTViewComponentView *)testView;
1172
1179
 
1173
1180
  const auto &viewProps = static_cast<const facebook::react::BaseViewProps &>(*componentView.props);
1174
- if (viewProps.scrollSnapAlign.has_value() && !viewProps.scrollSnapAlign.value().empty()) {
1175
- marker = [NSString stringWithUTF8String:viewProps.scrollSnapAlign.value().c_str()];
1181
+ if (viewProps.scrollSnapOffset.has_value()) {
1182
+ offset = @(viewProps.scrollSnapOffset.value());
1183
+ align = nil;
1184
+ snapTarget = componentView;
1185
+ } else if (viewProps.scrollSnapAlign.has_value() && !viewProps.scrollSnapAlign.value().empty()) {
1186
+ align = [NSString stringWithUTF8String:viewProps.scrollSnapAlign.value().c_str()];
1187
+ offset = nil;
1176
1188
  snapTarget = componentView;
1177
1189
  }
1178
1190
 
1179
1191
  testView = [testView superview];
1180
1192
  }
1181
- *outView = snapTarget;
1182
- return marker;
1193
+ *outAlign = align;
1194
+ *outOffset = offset;
1195
+ return snapTarget;
1183
1196
  }
1184
1197
 
1185
1198
  - (void)_handleScrollSnapForFocusedView:(UIView *)focusedView
1186
1199
  {
1187
1200
  const auto &scrollProps = static_cast<const ScrollViewProps &>(*_props);
1188
- UIView *snapAlignView = nil;
1189
- NSString *scrollSnapAlign = [self findScrollSnapAlignInView:focusedView foundView:&snapAlignView];
1190
- if (scrollSnapAlign == nil || snapAlignView == nil) {
1201
+
1202
+ NSString *scrollSnapAlign = nil;
1203
+ NSNumber *scrollSnapOffset = nil;
1204
+ UIView *snapTargetView = [self findScrollSnapInView:focusedView
1205
+ outAlign:&scrollSnapAlign
1206
+ outOffset:&scrollSnapOffset];
1207
+ if (snapTargetView == nil || (scrollSnapAlign == nil && scrollSnapOffset == nil)) {
1191
1208
  return;
1192
1209
  }
1193
-
1194
1210
  RCTEnhancedScrollView *scrollView = (RCTEnhancedScrollView *)_scrollView;
1195
- CGRect focusedFrame = [snapAlignView convertRect:snapAlignView.bounds toView:_scrollView];
1211
+ CGRect focusedFrame = [snapTargetView convertRect:snapTargetView.bounds toView:_scrollView];
1196
1212
  CGFloat targetOffset;
1197
1213
  CGFloat snapToItemPadding = scrollProps.snapToItemPadding;
1198
1214
 
@@ -1212,8 +1228,12 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
1212
1228
  currentOffset = scrollView.contentOffset.y;
1213
1229
  maxContentSize = scrollView.contentSize.height;
1214
1230
  }
1215
- // Calculate target offset based on scrollSnapAlign (unified for both axes)
1216
- if ([scrollSnapAlign isEqualToString:@"start"]) {
1231
+
1232
+ if (scrollSnapOffset != nil) {
1233
+ // Per-item pixel offset path: land the snap target's leading edge
1234
+ // at viewport coordinate = scrollSnapOffset.
1235
+ targetOffset = focusedOrigin - scrollSnapOffset.doubleValue;
1236
+ } else if ([scrollSnapAlign isEqualToString:@"start"]) {
1217
1237
  targetOffset = focusedOrigin - snapToItemPadding;
1218
1238
  } else if ([scrollSnapAlign isEqualToString:@"center"]) {
1219
1239
  CGFloat viewportCenter = viewportSize / 2;
@@ -1237,8 +1257,20 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
1237
1257
  CGPoint targetContentOffset = isHorizontalSnap
1238
1258
  ? CGPointMake(targetOffset, scrollView.contentOffset.y)
1239
1259
  : CGPointMake(scrollView.contentOffset.x, targetOffset);
1260
+ // Where the focused item should snap to. We don't scroll to it here: this view's
1261
+ // scrollViewWillEndDragging:withVelocity:targetContentOffset: override sets
1262
+ // *targetContentOffset = preferredContentOffset. On tvOS the focus engine routes its
1263
+ // focus-driven scroll through that delegate, so the item snaps to this offset via the
1264
+ // engine's own scroll, even when it's already on screen. An explicit setContentOffset here
1265
+ // would just scroll a second time.
1266
+ // https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/scrollviewwillenddragging(_:withvelocity:targetcontentoffset:)
1267
+ // https://developer.apple.com/forums/thread/22103?answerId=73300022#73300022
1240
1268
  self.preferredContentOffset = targetContentOffset;
1241
- [_scrollView setContentOffset:targetContentOffset animated:scrollProps.scrollAnimationEnabled];
1269
+ if (!scrollProps.scrollAnimationEnabled) {
1270
+ // Animations off: RCTEnhancedScrollView.didUpdateFocusInContext blocks the engine's
1271
+ // scroll, so the delegate never fires — set the offset directly.
1272
+ scrollView.contentOffset = targetContentOffset;
1273
+ }
1242
1274
  }
1243
1275
 
1244
1276
  - (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context
@@ -775,12 +775,23 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
775
775
 
776
776
  - (void)_setAttributedString:(NSAttributedString *)attributedString
777
777
  {
778
+ #if TARGET_OS_TV
779
+ // Attribute-free string prevents the tvOS keyboard from inheriting the component's small font.
780
+ if ([attributedString.string isEqualToString:_backedTextInputView.attributedText.string]) {
781
+ return;
782
+ }
783
+ #else
778
784
  if ([self _textOf:attributedString equals:_backedTextInputView.attributedText]) {
779
785
  return;
780
786
  }
787
+ #endif
781
788
  UITextRange *selectedRange = _backedTextInputView.selectedTextRange;
782
789
  NSInteger oldTextLength = _backedTextInputView.attributedText.string.length;
790
+ #if TARGET_OS_TV
791
+ _backedTextInputView.attributedText = [[NSAttributedString alloc] initWithString:attributedString.string];
792
+ #else
783
793
  _backedTextInputView.attributedText = attributedString;
794
+ #endif
784
795
  // Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
785
796
  // a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
786
797
  // This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
@@ -805,7 +816,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
805
816
  // Ensure that newly typed text will inherit any custom attributes. We follow the logic of RN Android, where attributes
806
817
  // to the left of the cursor are copied into new text, unless we are at the start of the field, in which case we will
807
818
  // copy the attributes from text to the right. This allows consistency between backed input and new AttributedText
808
- // https://github.com/facebook/react-native/blob/3102a58df38d96f3dacef0530e4dbb399037fcd2/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/SetSpanOperation.kt#L30
819
+ // https://github.com/react/react-native/blob/3102a58df38d96f3dacef0530e4dbb399037fcd2/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/SetSpanOperation.kt#L30
809
820
  - (void)_updateTypingAttributes
810
821
  {
811
822
  if (_backedTextInputView.attributedText.length > 0 && _backedTextInputView.selectedTextRange != nil) {
@@ -610,11 +610,10 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
610
610
  // [self isTVFocusGuide] is false when autofocus and destinations are not used, so we cannot use that.
611
611
  // Generally speaking, it would happen for any non-collapsable `View`.
612
612
  } else if (context.previouslyFocusedView == self) {
613
- [self disableDirectionalFocusGuides];
614
613
  [coordinator addCoordinatedAnimations:^(void){
615
614
  [self removeParallaxMotionEffects];
616
615
  if (self->_eventEmitter) self->_eventEmitter->onBlur();
617
- } completion:^(void){}];
616
+ } completion:^(void){[self disableDirectionalFocusGuides];}];
618
617
  [self resignFirstResponder];
619
618
  }
620
619
  }
@@ -698,11 +697,18 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
698
697
  [_reactSubviews removeObjectAtIndex:index];
699
698
  } else {
700
699
  RCTAssert(
701
- childComponentView.superview == self.currentContainerView,
702
- @"Attempt to unmount a view which is mounted inside different view. (parent: %@, child: %@, index: %@)",
700
+ childComponentView.superview != nil,
701
+ @"Attempt to unmount a view which is not mounted. (parent: %@, child: %@, index: %@)",
703
702
  self,
704
703
  childComponentView,
705
704
  @(index));
705
+ RCTAssert(
706
+ childComponentView.superview == self.currentContainerView,
707
+ @"Attempt to unmount a view which is mounted inside a different view. (parent: %@, child: %@, index: %@, existing parent: %@)",
708
+ self,
709
+ childComponentView,
710
+ @(index),
711
+ @([childComponentView.superview tag]));
706
712
  RCTAssert(
707
713
  (self.currentContainerView.subviews.count > index) &&
708
714
  [self.currentContainerView.subviews objectAtIndex:index] == childComponentView,
@@ -717,6 +723,30 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
717
723
  [childComponentView removeFromSuperview];
718
724
  }
719
725
 
726
+ - (void)_updateRemoveClippedSubviewsState
727
+ {
728
+ if (_removeClippedSubviews) {
729
+ // Toggled ON: populate _reactSubviews from the current view hierarchy.
730
+ // Actual clipping will happen on the next scroll event.
731
+ RCTAssert(
732
+ _reactSubviews.count == 0,
733
+ @"_reactSubviews should be empty when toggling removeClippedSubviews on. (view: %@, count: %@)",
734
+ self,
735
+ @(_reactSubviews.count));
736
+ if (self.currentContainerView.subviews.count > 0) {
737
+ _reactSubviews = [NSMutableArray arrayWithArray:self.currentContainerView.subviews];
738
+ }
739
+ } else {
740
+ // Toggled OFF: re-mount all children in the correct order, then clear the tracking array.
741
+ // addSubview: on an already-present child moves it to the front, so iterating in order
742
+ // produces the correct subview ordering.
743
+ for (UIView *view in _reactSubviews) {
744
+ [self.currentContainerView addSubview:view];
745
+ }
746
+ [_reactSubviews removeAllObjects];
747
+ }
748
+ }
749
+
720
750
  - (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView
721
751
  {
722
752
  if (!_removeClippedSubviews) {
@@ -782,9 +812,7 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
782
812
  if (!ReactNativeFeatureFlags::enableViewCulling()) {
783
813
  if (oldViewProps.removeClippedSubviews != newViewProps.removeClippedSubviews) {
784
814
  _removeClippedSubviews = newViewProps.removeClippedSubviews;
785
- if (_removeClippedSubviews && self.currentContainerView.subviews.count > 0) {
786
- _reactSubviews = [NSMutableArray arrayWithArray:self.currentContainerView.subviews];
787
- }
815
+ [self _updateRemoveClippedSubviewsState];
788
816
  }
789
817
  }
790
818
 
@@ -11,7 +11,7 @@ require "json"
11
11
  package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
12
12
  version = package['version']
13
13
 
14
- source = { :git => 'https://github.com/facebook/react-native.git' }
14
+ source = { :git => 'https://github.com/react/react-native.git' }
15
15
  if version == '1000.0.0'
16
16
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
17
17
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
@@ -8,7 +8,7 @@ require "json"
8
8
  package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
9
9
  version = package['version']
10
10
 
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
11
+ source = { :git => 'https://github.com/react/react-native.git' }
12
12
  if version == '1000.0.0'
13
13
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
14
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
@@ -8,7 +8,7 @@ require "json"
8
8
  package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
9
9
  version = package['version']
10
10
 
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
11
+ source = { :git => 'https://github.com/react/react-native.git' }
12
12
  if version == '1000.0.0'
13
13
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
14
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
@@ -0,0 +1,145 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <React/RCTViewComponentView.h>
9
+ #import <XCTest/XCTest.h>
10
+ #import <react/renderer/components/view/ViewProps.h>
11
+ #import <react/renderer/components/view/ViewShadowNode.h>
12
+
13
+ using namespace facebook::react;
14
+
15
+ static Props::Shared makeViewProps(bool removeClippedSubviews)
16
+ {
17
+ auto props = std::make_shared<ViewProps>();
18
+ props->removeClippedSubviews = removeClippedSubviews;
19
+ return props;
20
+ }
21
+
22
+ @interface RCTViewComponentViewTests : XCTestCase
23
+ @end
24
+
25
+ @implementation RCTViewComponentViewTests
26
+
27
+ #pragma mark - removeClippedSubviews toggle
28
+
29
+ - (void)testToggleRemoveClippedSubviewsOffRemountsClippedChildren
30
+ {
31
+ RCTViewComponentView *parent = [RCTViewComponentView new];
32
+ UIView *child1 = [UIView new];
33
+ child1.frame = CGRectMake(0, 0, 50, 50);
34
+ UIView *child2 = [UIView new];
35
+ child2.frame = CGRectMake(0, 200, 50, 50);
36
+ UIView *child3 = [UIView new];
37
+ child3.frame = CGRectMake(0, 400, 50, 50);
38
+
39
+ // Mount children normally
40
+ [parent mountChildComponentView:(id)child1 index:0];
41
+ [parent mountChildComponentView:(id)child2 index:1];
42
+ [parent mountChildComponentView:(id)child3 index:2];
43
+
44
+ XCTAssertEqual(parent.subviews.count, 3u);
45
+
46
+ // Toggle removeClippedSubviews ON via props
47
+ auto propsOn = makeViewProps(true);
48
+ [parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
49
+
50
+ // Simulate clipping: remove child2 and child3 from superview (as updateClippedSubviewsWithClipRect would)
51
+ [child2 removeFromSuperview];
52
+ [child3 removeFromSuperview];
53
+ XCTAssertEqual(parent.subviews.count, 1u);
54
+ XCTAssertNil(child2.superview);
55
+ XCTAssertNil(child3.superview);
56
+
57
+ // Toggle removeClippedSubviews OFF via props
58
+ auto propsOff = makeViewProps(false);
59
+ [parent updateProps:propsOff oldProps:propsOn];
60
+
61
+ // All children should be re-mounted
62
+ XCTAssertEqual(parent.subviews.count, 3u);
63
+ XCTAssertEqual(child1.superview, parent);
64
+ XCTAssertEqual(child2.superview, parent);
65
+ XCTAssertEqual(child3.superview, parent);
66
+ }
67
+
68
+ - (void)testToggleRemoveClippedSubviewsOffPreservesOrder
69
+ {
70
+ RCTViewComponentView *parent = [RCTViewComponentView new];
71
+ UIView *child1 = [UIView new];
72
+ child1.frame = CGRectMake(0, 0, 50, 50);
73
+ UIView *child2 = [UIView new];
74
+ child2.frame = CGRectMake(0, 100, 50, 50);
75
+ UIView *child3 = [UIView new];
76
+ child3.frame = CGRectMake(0, 200, 50, 50);
77
+
78
+ [parent mountChildComponentView:(id)child1 index:0];
79
+ [parent mountChildComponentView:(id)child2 index:1];
80
+ [parent mountChildComponentView:(id)child3 index:2];
81
+
82
+ // Toggle ON and clip child1 (first child)
83
+ auto propsOn = makeViewProps(true);
84
+ [parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
85
+ [child1 removeFromSuperview];
86
+ XCTAssertEqual(parent.subviews.count, 2u);
87
+
88
+ // Toggle OFF — all children re-mounted in correct order
89
+ auto propsOff = makeViewProps(false);
90
+ [parent updateProps:propsOff oldProps:propsOn];
91
+
92
+ XCTAssertEqual(parent.subviews.count, 3u);
93
+ XCTAssertEqual(parent.subviews[0], child1);
94
+ XCTAssertEqual(parent.subviews[1], child2);
95
+ XCTAssertEqual(parent.subviews[2], child3);
96
+ }
97
+
98
+ - (void)testToggleRemoveClippedSubviewsOffClearsReactSubviews
99
+ {
100
+ RCTViewComponentView *parent = [RCTViewComponentView new];
101
+ UIView *child1 = [UIView new];
102
+ child1.frame = CGRectMake(0, 0, 50, 50);
103
+
104
+ [parent mountChildComponentView:(id)child1 index:0];
105
+
106
+ // Toggle ON
107
+ auto propsOn = makeViewProps(true);
108
+ [parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
109
+
110
+ // Toggle OFF
111
+ auto propsOff = makeViewProps(false);
112
+ [parent updateProps:propsOff oldProps:propsOn];
113
+
114
+ // _reactSubviews should be cleared
115
+ NSMutableArray *reactSubviews = [parent valueForKey:@"_reactSubviews"];
116
+ XCTAssertEqual(reactSubviews.count, 0u);
117
+ }
118
+
119
+ - (void)testUnmountAfterToggleOffCleansUpReactSubviews
120
+ {
121
+ RCTViewComponentView *parent = [RCTViewComponentView new];
122
+ UIView *child1 = [UIView new];
123
+ child1.frame = CGRectMake(0, 0, 50, 50);
124
+ UIView *child2 = [UIView new];
125
+ child2.frame = CGRectMake(0, 100, 50, 50);
126
+
127
+ // Toggle ON first, then mount children
128
+ auto propsOn = makeViewProps(true);
129
+ [parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
130
+ [parent mountChildComponentView:(id)child1 index:0];
131
+ [parent mountChildComponentView:(id)child2 index:1];
132
+
133
+ // Toggle OFF — re-mounts children
134
+ auto propsOff = makeViewProps(false);
135
+ [parent updateProps:propsOff oldProps:propsOn];
136
+
137
+ XCTAssertEqual(parent.subviews.count, 2u);
138
+
139
+ // Unmount child2 — should succeed without assert failures
140
+ [parent unmountChildComponentView:(id)child2 index:1];
141
+ XCTAssertEqual(parent.subviews.count, 1u);
142
+ XCTAssertNil(child2.superview);
143
+ }
144
+
145
+ @end
@@ -366,7 +366,7 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
366
366
  if (@available(iOS 14.0, *)) {
367
367
  // On iOS when Prefer Cross-Fade Transitions is enabled, the keyboard position
368
368
  // & height is reported differently (0 instead of Y position value matching height of frame)
369
- // Fixes similar issue we saw with https://github.com/facebook/react-native/pull/34503
369
+ // Fixes similar issue we saw with https://github.com/react/react-native/pull/34503
370
370
  if (UIAccessibilityPrefersCrossFadeTransitions() && endFrame.size.height == 0) {
371
371
  newContentOffset.y = 0;
372
372
  newEdgeInsets.bottom = 0;
@@ -8,7 +8,7 @@ require "json"
8
8
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
9
9
  version = package['version']
10
10
 
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
11
+ source = { :git => 'https://github.com/react/react-native.git' }
12
12
  if version == '1000.0.0'
13
13
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
14
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
package/React.podspec CHANGED
@@ -8,7 +8,7 @@ require "json"
8
8
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
9
9
  version = package['version']
10
10
 
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
11
+ source = { :git => 'https://github.com/react/react-native.git' }
12
12
  if version == '1000.0.0'
13
13
  # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
14
  source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
@@ -749,7 +749,7 @@ apply(from = "./publish.gradle")
749
749
  // We need to override the artifact ID as this project is called `ReactAndroid` but
750
750
  // the maven coordinates are on `react-android`.
751
751
  // Please note that the original coordinates, `react-native`, have been voided
752
- // as they caused https://github.com/facebook/react-native/issues/35210
752
+ // as they caused https://github.com/react/react-native/issues/35210
753
753
  publishing {
754
754
  publications { getByName("release", MavenPublication::class) { artifactId = "react-android" } }
755
755
  }
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.83.6-0
1
+ VERSION_NAME=0.83.10-0
2
2
  react.internal.publishingGroup=io.github.react-native-tvos
3
3
  react.internal.hermesPublishingGroup=com.facebook.hermes
4
4
 
@@ -392,3 +392,9 @@ tasks.withType<JavaCompile>().configureEach {
392
392
  options.compilerArgs.add("-Xlint:deprecation,unchecked")
393
393
  options.compilerArgs.add("-Werror")
394
394
  }
395
+
396
+ /* Publishing Configuration */
397
+ // Reuses the publish.gradle template applied to ReactAndroid; the file is
398
+ // generated by the build-android-artifacts EAS workflow. Resulting artifact
399
+ // coordinate: io.github.react-native-tvos:hermes-engine:<version>.
400
+ apply(from = "../publish.gradle")