react-native-tvos 0.76.3-0 → 0.76.6-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 (61) hide show
  1. package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
  2. package/Libraries/Core/ReactNativeVersion.js +1 -1
  3. package/Libraries/Pressability/Pressability.js +2 -2
  4. package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +2 -1
  5. package/React/Base/RCTConvert.mm +3 -1
  6. package/React/Base/RCTVersion.m +1 -1
  7. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +1 -1
  8. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +8 -18
  9. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +3 -0
  10. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +17 -18
  11. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +12 -2
  12. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +12 -9
  13. package/React/Views/RCTFont.h +2 -0
  14. package/React/Views/RCTFont.mm +4 -5
  15. package/React/Views/ScrollView/RCTScrollView.h +3 -1
  16. package/React/Views/ScrollView/RCTScrollView.m +6 -0
  17. package/ReactAndroid/api/ReactAndroid.api +2 -0
  18. package/ReactAndroid/cmake-utils/ReactNative-application.cmake +18 -3
  19. package/ReactAndroid/gradle.properties +1 -1
  20. package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java +12 -13
  21. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +8 -2
  22. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +1 -7
  23. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
  24. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
  25. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
  26. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
  27. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
  28. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  29. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +11 -3
  30. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +11 -3
  31. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +25 -0
  32. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +1 -0
  33. package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +17 -19
  34. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
  35. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
  36. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  37. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
  38. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +1 -6
  39. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +47 -65
  40. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
  41. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
  42. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
  43. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
  44. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
  45. package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +2 -3
  46. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +2 -0
  47. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +10 -10
  48. package/ReactCommon/react/renderer/uimanager/UIManager.cpp +29 -8
  49. package/ReactCommon/react/runtime/ReactInstance.cpp +39 -35
  50. package/ReactCommon/react/runtime/ReactInstance.h +2 -1
  51. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +3 -2
  52. package/jest/setup.js +5 -1
  53. package/package.json +8 -8
  54. package/scripts/cocoapods/utils.rb +6 -6
  55. package/scripts/codegen/generate-artifacts-executor.js +68 -7
  56. package/sdks/hermesc/osx-bin/hermes +0 -0
  57. package/sdks/hermesc/osx-bin/hermesc +0 -0
  58. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  59. package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
  60. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
  61. package/types/public/ReactNativeTVTypes.d.ts +9 -7
@@ -126,20 +126,41 @@ std::shared_ptr<ShadowNode> UIManager::cloneNode(
126
126
 
127
127
  if (!rawProps.isEmpty()) {
128
128
  if (family.nativeProps_DEPRECATED != nullptr) {
129
+ // 1. update the nativeProps_DEPRECATED props.
130
+ //
131
+ // In this step, we want the most recent value for the props
132
+ // managed by setNativeProps.
129
133
  // Values in `rawProps` patch (take precedence over)
130
- // `nativeProps_DEPRECATED`. For example, if both `nativeProps_DEPRECATED`
131
- // and `rawProps` contain key 'A'. Value from `rawProps` overrides what
132
- // was previously in `nativeProps_DEPRECATED`.
134
+ // `nativeProps_DEPRECATED`. For example, if both
135
+ // `nativeProps_DEPRECATED` and `rawProps` contain key 'A'.
136
+ // Value from `rawProps` overrides what was previously in
137
+ // `nativeProps_DEPRECATED`. Notice that the `nativeProps_DEPRECATED`
138
+ // patch will not get more props from `rawProps`: if the key is not
139
+ // present in `nativeProps_DEPRECATED`, it will not be added.
140
+ //
141
+ // The result of this operation is the new `nativeProps_DEPRECATED`.
133
142
  family.nativeProps_DEPRECATED =
134
143
  std::make_unique<folly::dynamic>(mergeDynamicProps(
135
- *family.nativeProps_DEPRECATED,
136
- (folly::dynamic)rawProps,
144
+ *family.nativeProps_DEPRECATED, // source
145
+ (folly::dynamic)rawProps, // patch
137
146
  NullValueStrategy::Ignore));
138
147
 
148
+ // 2. Compute the final set of props.
149
+ //
150
+ // This step takes the new props handled by `setNativeProps` and
151
+ // merges them in the `rawProps` managed by React.
152
+ // The new props handled by `nativeProps` now takes precedence
153
+ // on the props handled by React, as we want to make sure that
154
+ // all the props are applied to the component.
155
+ // We use these finalProps as source of truth for the component.
156
+ auto finalProps = mergeDynamicProps(
157
+ (folly::dynamic)rawProps, // source
158
+ *family.nativeProps_DEPRECATED, // patch
159
+ NullValueStrategy::Override);
160
+
161
+ // 3. Clone the props by using finalProps.
139
162
  props = componentDescriptor.cloneProps(
140
- propsParserContext,
141
- shadowNode.getProps(),
142
- RawProps(*family.nativeProps_DEPRECATED));
163
+ propsParserContext, shadowNode.getProps(), RawProps(finalProps));
143
164
  } else {
144
165
  props = componentDescriptor.cloneProps(
145
166
  propsParserContext, shadowNode.getProps(), std::move(rawProps));
@@ -204,47 +204,51 @@ std::string simpleBasename(const std::string& path) {
204
204
  */
205
205
  void ReactInstance::loadScript(
206
206
  std::unique_ptr<const JSBigString> script,
207
- const std::string& sourceURL) {
207
+ const std::string& sourceURL,
208
+ std::function<void(jsi::Runtime& runtime)>&& completion) {
208
209
  auto buffer = std::make_shared<BigStringBuffer>(std::move(script));
209
210
  std::string scriptName = simpleBasename(sourceURL);
210
211
 
211
- runtimeScheduler_->scheduleWork(
212
- [this,
213
- scriptName,
214
- sourceURL,
215
- buffer = std::move(buffer),
216
- weakBufferedRuntimeExecuter = std::weak_ptr<BufferedRuntimeExecutor>(
217
- bufferedRuntimeExecutor_)](jsi::Runtime& runtime) {
218
- SystraceSection s("ReactInstance::loadScript");
219
- bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl);
220
- if (hasLogger) {
221
- ReactMarker::logTaggedMarkerBridgeless(
222
- ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str());
223
- }
212
+ runtimeScheduler_->scheduleWork([this,
213
+ scriptName,
214
+ sourceURL,
215
+ buffer = std::move(buffer),
216
+ weakBufferedRuntimeExecuter =
217
+ std::weak_ptr<BufferedRuntimeExecutor>(
218
+ bufferedRuntimeExecutor_),
219
+ completion](jsi::Runtime& runtime) {
220
+ SystraceSection s("ReactInstance::loadScript");
221
+ bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl);
222
+ if (hasLogger) {
223
+ ReactMarker::logTaggedMarkerBridgeless(
224
+ ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str());
225
+ }
224
226
 
225
- runtime.evaluateJavaScript(buffer, sourceURL);
227
+ runtime.evaluateJavaScript(buffer, sourceURL);
226
228
 
227
- /**
228
- * TODO(T183610671): We need a safe/reliable way to enable the js
229
- * pipeline from javascript. Remove this after we figure that out, or
230
- * after we just remove the js pipeline.
231
- */
232
- if (!jsErrorHandler_->hasHandledFatalError()) {
233
- jsErrorHandler_->setRuntimeReady();
234
- }
229
+ /**
230
+ * TODO(T183610671): We need a safe/reliable way to enable the js
231
+ * pipeline from javascript. Remove this after we figure that out, or
232
+ * after we just remove the js pipeline.
233
+ */
234
+ if (!jsErrorHandler_->hasHandledFatalError()) {
235
+ jsErrorHandler_->setRuntimeReady();
236
+ }
235
237
 
236
- if (hasLogger) {
237
- ReactMarker::logTaggedMarkerBridgeless(
238
- ReactMarker::RUN_JS_BUNDLE_STOP, scriptName.c_str());
239
- ReactMarker::logMarkerBridgeless(
240
- ReactMarker::INIT_REACT_RUNTIME_STOP);
241
- ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_STOP);
242
- }
243
- if (auto strongBufferedRuntimeExecuter =
244
- weakBufferedRuntimeExecuter.lock()) {
245
- strongBufferedRuntimeExecuter->flush();
246
- }
247
- });
238
+ if (hasLogger) {
239
+ ReactMarker::logTaggedMarkerBridgeless(
240
+ ReactMarker::RUN_JS_BUNDLE_STOP, scriptName.c_str());
241
+ ReactMarker::logMarkerBridgeless(ReactMarker::INIT_REACT_RUNTIME_STOP);
242
+ ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_STOP);
243
+ }
244
+ if (auto strongBufferedRuntimeExecuter =
245
+ weakBufferedRuntimeExecuter.lock()) {
246
+ strongBufferedRuntimeExecuter->flush();
247
+ }
248
+ if (completion) {
249
+ completion(runtime);
250
+ }
251
+ });
248
252
  }
249
253
 
250
254
  /*
@@ -48,7 +48,8 @@ class ReactInstance final : private jsinspector_modern::InstanceTargetDelegate {
48
48
 
49
49
  void loadScript(
50
50
  std::unique_ptr<const JSBigString> script,
51
- const std::string& sourceURL);
51
+ const std::string& sourceURL,
52
+ std::function<void(jsi::Runtime& runtime)>&& completion = nullptr);
52
53
 
53
54
  void registerSegment(uint32_t segmentId, const std::string& segmentPath);
54
55
 
@@ -470,8 +470,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
470
470
 
471
471
  auto script = std::make_unique<NSDataBigString>(source.data);
472
472
  const auto *url = deriveSourceURL(source.url).UTF8String;
473
- _reactInstance->loadScript(std::move(script), url);
474
- [[NSNotificationCenter defaultCenter] postNotificationName:@"RCTInstanceDidLoadBundle" object:nil];
473
+ _reactInstance->loadScript(std::move(script), url, [](jsi::Runtime &_) {
474
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"RCTInstanceDidLoadBundle" object:nil];
475
+ });
475
476
  }
476
477
 
477
478
  - (void)_handleJSError:(const JsErrorHandler::ParsedError &)error
package/jest/setup.js CHANGED
@@ -417,4 +417,8 @@ jest
417
417
  return jest.requireActual(
418
418
  '../Libraries/ReactNative/RendererImplementation',
419
419
  );
420
- });
420
+ })
421
+ .mock('../Libraries/Utilities/useColorScheme', () => ({
422
+ __esModule: true,
423
+ default: jest.fn().mockReturnValue('light'),
424
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.76.3-0",
3
+ "version": "0.76.6-0",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -110,13 +110,13 @@
110
110
  },
111
111
  "dependencies": {
112
112
  "@jest/create-cache-key-function": "^29.6.3",
113
- "@react-native/assets-registry": "0.76.3",
114
- "@react-native/codegen": "0.76.3",
115
- "@react-native/community-cli-plugin": "0.76.3",
116
- "@react-native/gradle-plugin": "0.76.3",
117
- "@react-native/js-polyfills": "0.76.3",
118
- "@react-native/normalize-colors": "0.76.3",
119
- "@react-native-tvos/virtualized-lists": "0.76.3-0",
113
+ "@react-native/assets-registry": "0.76.6",
114
+ "@react-native/codegen": "0.76.6",
115
+ "@react-native/community-cli-plugin": "0.76.6",
116
+ "@react-native/gradle-plugin": "0.76.6",
117
+ "@react-native/js-polyfills": "0.76.6",
118
+ "@react-native/normalize-colors": "0.76.6",
119
+ "@react-native-tvos/virtualized-lists": "0.76.6-0",
120
120
  "abort-controller": "^3.0.0",
121
121
  "anser": "^1.4.9",
122
122
  "ansi-regex": "^5.0.0",
@@ -44,10 +44,10 @@ class ReactNativePodsUtils
44
44
  end
45
45
 
46
46
  def self.set_gcc_preprocessor_definition_for_React_hermes(installer)
47
- self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-hermes", "Debug")
48
- self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-jsinspector", "Debug")
49
- self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "hermes-engine", "Debug")
50
- self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes", "Debug")
47
+ self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-hermes", :debug)
48
+ self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-jsinspector", :debug)
49
+ self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "hermes-engine", :debug)
50
+ self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes", :debug)
51
51
  end
52
52
 
53
53
  def self.turn_off_resource_bundle_react_core(installer)
@@ -193,11 +193,11 @@ class ReactNativePodsUtils
193
193
 
194
194
  private
195
195
 
196
- def self.add_build_settings_to_pod(installer, settings_name, settings_value, target_pod_name, configuration)
196
+ def self.add_build_settings_to_pod(installer, settings_name, settings_value, target_pod_name, configuration_type)
197
197
  installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
198
198
  if pod_name.to_s == target_pod_name
199
199
  target_installation_result.native_target.build_configurations.each do |config|
200
- if configuration == nil || (configuration != nil && config.name.include?(configuration))
200
+ if configuration_type == nil || (configuration_type != nil && config.type == configuration_type)
201
201
  config.build_settings[settings_name] ||= '$(inherited) '
202
202
  config.build_settings[settings_name] << settings_value
203
203
  end
@@ -152,6 +152,7 @@ function extractLibrariesFromJSON(configFile, dependencyPath) {
152
152
  const config = configFile.codegenConfig;
153
153
  return [
154
154
  {
155
+ libraryName: configFile.name,
155
156
  config,
156
157
  libraryPath: dependencyPath,
157
158
  },
@@ -252,19 +253,23 @@ function findExternalLibraries(pkgJson, projectRoot) {
252
253
  });
253
254
  }
254
255
 
255
- function findLibrariesFromReactNativeConfig(projectRoot) {
256
+ function readRNConfigJSFile(projectRoot) {
256
257
  const rnConfigFileName = 'react-native.config.js';
257
258
 
258
- console.log(
259
- `\n\n[Codegen] >>>>> Searching for codegen-enabled libraries in ${rnConfigFileName}`,
260
- );
261
-
262
259
  const rnConfigFilePath = path.resolve(projectRoot, rnConfigFileName);
263
260
 
264
261
  if (!fs.existsSync(rnConfigFilePath)) {
265
262
  return [];
266
263
  }
267
- const rnConfig = require(rnConfigFilePath);
264
+ return require(rnConfigFilePath);
265
+ }
266
+
267
+ function findLibrariesFromReactNativeConfig(projectRoot) {
268
+ console.log(
269
+ `\n\n[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js`,
270
+ );
271
+
272
+ const rnConfig = readRNConfigJSFile(projectRoot);
268
273
 
269
274
  if (rnConfig.dependencies == null) {
270
275
  return [];
@@ -290,6 +295,48 @@ function findLibrariesFromReactNativeConfig(projectRoot) {
290
295
  });
291
296
  }
292
297
 
298
+ // Function to look for libraries explicitly unlinked from the app
299
+ // through the react-native.config.js file.
300
+ // If this happens, it might be that the app does not need
301
+ // to generate code for that library as it won't be used by that platform
302
+ // @return { [libraryName: string]: [platform: string] }
303
+ function findNotLinkedLibraries(projectRoot) {
304
+ const rnConfig = readRNConfigJSFile(projectRoot);
305
+
306
+ if (rnConfig.dependencies == null) {
307
+ return {};
308
+ }
309
+
310
+ let notLinkedLibraries = {};
311
+
312
+ Object.keys(rnConfig.dependencies).forEach(name => {
313
+ const dependency = rnConfig.dependencies[name];
314
+ let notLinkedPlatforms = [];
315
+
316
+ // dependency.platforms might not be defined, as the format
317
+ // {
318
+ // "dependencies": {
319
+ // "dependency-name": {
320
+ // "root": "path/to/dependency",
321
+ // }
322
+ // }
323
+ // }
324
+ // is also supported.
325
+ // In this case, we assume that the library is linked to all platforms.
326
+ // We don't consider the case were `dependency-name.root` is equal to `null`, because that
327
+ // means that the library is not linked to the app at all, and in that case the dependency
328
+ // should be removed by the user.
329
+ dependency.platforms &&
330
+ Object.keys(dependency.platforms).forEach(platform => {
331
+ if (dependency.platforms[platform] == null) {
332
+ notLinkedPlatforms.push(platform);
333
+ }
334
+ });
335
+ notLinkedLibraries[name] = notLinkedPlatforms;
336
+ });
337
+ return notLinkedLibraries;
338
+ }
339
+
293
340
  function findProjectRootLibraries(pkgJson, projectRoot) {
294
341
  console.log('[Codegen] Searching for codegen-enabled libraries in the app.');
295
342
 
@@ -695,6 +742,8 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
695
742
  let platforms =
696
743
  targetPlatform === 'all' ? supportedPlatforms : [targetPlatform];
697
744
 
745
+ const notLinkedLibraries = findNotLinkedLibraries(projectRoot);
746
+
698
747
  for (const platform of platforms) {
699
748
  const outputPath = computeOutputPath(
700
749
  projectRoot,
@@ -703,7 +752,19 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
703
752
  platform,
704
753
  );
705
754
 
706
- const schemaInfos = generateSchemaInfos(libraries);
755
+ const schemaInfos = generateSchemaInfos(
756
+ libraries.filter(library => {
757
+ const unlinkedPlatforms = notLinkedLibraries[library.libraryName];
758
+ if (unlinkedPlatforms && unlinkedPlatforms.includes(platform)) {
759
+ console.log(
760
+ `[Codegen - ${library.libraryName}] Skipping Codegen on ${platform}`,
761
+ );
762
+ return false;
763
+ }
764
+ return true;
765
+ }),
766
+ );
767
+
707
768
  generateNativeCode(
708
769
  outputPath,
709
770
  schemaInfos.filter(schemaInfo =>
Binary file
Binary file
Binary file
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<0bff47ec5af8ed96d8b2abe351f318f1>>
7
+ * @generated SignedSource<<cbc00457c9b6f4639083b6fa970683eb>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -46,7 +46,6 @@ export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureF
46
46
  export type ReactNativeFeatureFlags = {
47
47
  ...ReactNativeFeatureFlagsJsOnly,
48
48
  commonTestFlag: Getter<boolean>,
49
- allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
50
49
  batchRenderingUpdatesInEventLoop: Getter<boolean>,
51
50
  completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
52
51
  destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
@@ -164,10 +163,6 @@ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGet
164
163
  * Common flag for testing. Do NOT modify.
165
164
  */
166
165
  export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
167
- /**
168
- * Adds support for recursively processing commits that mount synchronously (Android only).
169
- */
170
- export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
171
166
  /**
172
167
  * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
173
168
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<6d4aa48dfdd3b78ac5f0f8e70eb3895f>>
7
+ * @generated SignedSource<<ac46e3eb810d890a0f8199fe100936cb>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -24,7 +24,6 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
24
24
 
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
- +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
28
27
  +batchRenderingUpdatesInEventLoop?: () => boolean;
29
28
  +completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
30
29
  +destroyFabricSurfacesInReactInstanceManager?: () => boolean;
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  import type { View, ScrollViewProps, HostComponent, EventSubscription } from 'react-native';
3
3
 
4
4
  declare module 'react-native' {
5
+ export type FocusDestination = null | number | React.Component<any, any> | React.ComponentClass<any>;
6
+
5
7
  interface ViewProps {
6
8
  /**
7
9
  * Android TV only prop
@@ -10,29 +12,29 @@ declare module 'react-native' {
10
12
  /**
11
13
  * TV next focus down (see documentation for the View component).
12
14
  */
13
- nextFocusDown?: number | undefined,
15
+ nextFocusDown?: FocusDestination | undefined,
14
16
 
15
17
  /**
16
18
  * TV next focus forward (see documentation for the View component).
17
19
  *
18
20
  * @platform android
19
21
  */
20
- nextFocusForward?: number | undefined,
22
+ nextFocusForward?: FocusDestination | undefined,
21
23
 
22
24
  /**
23
25
  * TV next focus left (see documentation for the View component).
24
26
  */
25
- nextFocusLeft?: number | undefined,
27
+ nextFocusLeft?: FocusDestination | undefined,
26
28
 
27
29
  /**
28
30
  * TV next focus right (see documentation for the View component).
29
31
  */
30
- nextFocusRight?: number | undefined,
32
+ nextFocusRight?: FocusDestination | undefined,
31
33
 
32
34
  /**
33
35
  * TV next focus up (see documentation for the View component).
34
36
  */
35
- nextFocusUp?: number | undefined,
37
+ nextFocusUp?: FocusDestination | undefined,
36
38
  }
37
39
 
38
40
  export interface NativeMethods {
@@ -118,7 +120,7 @@ declare module 'react-native' {
118
120
  /**
119
121
  * Array of `Component`s to register as destinations with `UIFocusGuide`
120
122
  */
121
- destinations?: (null | number | React.Component<any, any> | React.ComponentClass<any>)[] | undefined;
123
+ destinations?: FocusDestination[] | undefined;
122
124
  /**
123
125
  * If true, `TVFocusGuide` will automatically manage focus for you.
124
126
  * It will redirect the focus to the first focusable child on the first visit.
@@ -154,7 +156,7 @@ declare module 'react-native' {
154
156
 
155
157
  export type FocusGuideMethods = {
156
158
  setDestinations: (
157
- destinations: (React.ElementRef<HostComponent<unknown>> | null | undefined)[],
159
+ destinations: FocusDestination[],
158
160
  ) => void;
159
161
  }
160
162