react-native-tvos 0.81.1-2 → 0.81.2-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 (64) hide show
  1. package/Libraries/Components/TV/TVFocusGuideView.js +29 -34
  2. package/Libraries/Components/View/View.js +20 -23
  3. package/Libraries/Core/ReactNativeVersion.js +3 -2
  4. package/React/Base/RCTVersion.m +3 -3
  5. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +12 -0
  6. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +18 -0
  7. package/ReactAndroid/build.gradle.kts +10 -1
  8. package/ReactAndroid/gradle.properties +1 -1
  9. package/ReactAndroid/hermes-engine/build.gradle.kts +6 -0
  10. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.kt +9 -1
  11. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
  12. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
  13. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
  15. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +5 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
  19. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.kt +19 -0
  20. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
  21. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
  22. package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +3 -1
  23. package/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +2 -1
  24. package/ReactAndroid/src/main/jni/react/jni/NativeArray.h +4 -0
  25. package/ReactAndroid/src/main/jni/react/jni/OnLoad-common.cpp +2 -0
  26. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp +6 -0
  27. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h +1 -0
  28. package/ReactAndroid/src/main/jni/react/jni/TransformHelper.cpp +60 -0
  29. package/ReactAndroid/src/main/jni/react/jni/TransformHelper.h +22 -0
  30. package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +3 -1
  31. package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +3 -1
  32. package/ReactCommon/cxxreact/ReactNativeVersion.h +7 -3
  33. package/ReactCommon/hermes/executor/CMakeLists.txt +1 -1
  34. package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +1 -1
  35. package/ReactCommon/jsinspector-modern/CMakeLists.txt +6 -4
  36. package/ReactCommon/react/debug/CMakeLists.txt +1 -1
  37. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
  38. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
  39. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +44 -8
  40. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
  41. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
  42. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
  43. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +9 -1
  44. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
  45. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
  46. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
  47. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +8 -2
  48. package/ReactCommon/react/renderer/components/view/BaseViewProps.h +5 -0
  49. package/ReactCommon/react/runtime/CMakeLists.txt +3 -1
  50. package/ReactCommon/react/runtime/hermes/CMakeLists.txt +1 -1
  51. package/package.json +8 -8
  52. package/scripts/cocoapods/autolinking.rb +6 -0
  53. package/scripts/cocoapods/codegen_utils.rb +1 -1
  54. package/scripts/codegen/generate-artifacts-executor/index.js +5 -1
  55. package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
  56. package/scripts/replace-rncore-version.js +4 -2
  57. package/sdks/hermes-engine/utils/replace_hermes_version.js +4 -2
  58. package/sdks/hermesc/osx-bin/hermes +0 -0
  59. package/sdks/hermesc/osx-bin/hermesc +0 -0
  60. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  61. package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
  62. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
  63. package/third-party-podspecs/replace_dependencies_version.js +4 -2
  64. package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +2 -2
@@ -130,6 +130,11 @@ class BaseViewProps : public YogaStylableProps, public AccessibilityProps {
130
130
  Transform resolveTransform(const LayoutMetrics& layoutMetrics) const;
131
131
  bool getClipsContentToBounds() const;
132
132
 
133
+ static Transform resolveTransform(
134
+ const Size& frameSize,
135
+ const Transform& transform,
136
+ const TransformOrigin& transformOrigin);
137
+
133
138
  #if RN_DEBUG_STRING_CONVERTIBLE
134
139
  SharedDebugStringConvertibleList getDebugProps() const override;
135
140
  #endif
@@ -16,7 +16,9 @@ add_library(bridgeless
16
16
  ${bridgeless_SRC}
17
17
  )
18
18
  target_compile_reactnative_options(bridgeless PRIVATE)
19
- target_compile_options(bridgeless PRIVATE $<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>)
19
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
20
+ target_compile_options(bridgeless PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
21
+ endif ()
20
22
  target_include_directories(bridgeless PUBLIC .)
21
23
 
22
24
  react_native_android_selector(fabricjni fabricjni "")
@@ -29,7 +29,7 @@ target_link_libraries(bridgelesshermes
29
29
  )
30
30
 
31
31
  target_compile_reactnative_options(bridgelesshermes PRIVATE)
32
- if(${CMAKE_BUILD_TYPE} MATCHES Debug)
32
+ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
33
33
  target_compile_options(
34
34
  bridgelesshermes
35
35
  PRIVATE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.81.1-2",
3
+ "version": "0.81.2-0",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -166,12 +166,12 @@
166
166
  },
167
167
  "dependencies": {
168
168
  "@jest/create-cache-key-function": "^29.7.0",
169
- "@react-native/assets-registry": "0.81.1",
170
- "@react-native/codegen": "0.81.1",
171
- "@react-native/community-cli-plugin": "0.81.1",
172
- "@react-native/gradle-plugin": "0.81.1",
173
- "@react-native/js-polyfills": "0.81.1",
174
- "@react-native/normalize-colors": "0.81.1",
169
+ "@react-native/assets-registry": "0.81.2",
170
+ "@react-native/codegen": "0.81.2",
171
+ "@react-native/community-cli-plugin": "0.81.2",
172
+ "@react-native/gradle-plugin": "0.81.2",
173
+ "@react-native/js-polyfills": "0.81.2",
174
+ "@react-native/normalize-colors": "0.81.2",
175
175
  "abort-controller": "^3.0.0",
176
176
  "anser": "^1.4.9",
177
177
  "ansi-regex": "^5.0.0",
@@ -198,7 +198,7 @@
198
198
  "whatwg-fetch": "^3.0.0",
199
199
  "ws": "^6.2.3",
200
200
  "yargs": "^17.6.2",
201
- "@react-native-tvos/virtualized-lists": "0.81.1-2"
201
+ "@react-native-tvos/virtualized-lists": "0.81.2-0"
202
202
  },
203
203
  "codegenConfig": {
204
204
  "libraries": [
@@ -40,6 +40,12 @@ def list_native_modules!(config_command)
40
40
  packages = config["dependencies"]
41
41
  ios_project_root = Pathname.new(config["project"]["ios"]["sourceDir"])
42
42
  react_native_path = Pathname.new(config["reactNativePath"])
43
+ codegen_output_path = ios_project_root.join("build/generated/autolinking/autolinking.json")
44
+
45
+ # Write autolinking react-native-config output to codegen folder
46
+ FileUtils.mkdir_p(File.dirname(codegen_output_path))
47
+ File.write(codegen_output_path, json)
48
+
43
49
  found_pods = []
44
50
 
45
51
  packages.each do |package_name, package|
@@ -87,7 +87,7 @@ class CodegenUtils
87
87
  codegen_path = file_manager.join(ios_folder, codegen_dir)
88
88
  return if !dir_manager.exist?(codegen_path)
89
89
 
90
- FileUtils.rm_rf(dir_manager.glob("#{codegen_path}/*"))
90
+ FileUtils.rm_rf("#{codegen_path}")
91
91
  base_provider_path = file_manager.join(rn_path, 'React', 'Fabric', 'RCTThirdPartyFabricComponentsProvider')
92
92
  FileUtils.rm_rf("#{base_provider_path}.h")
93
93
  FileUtils.rm_rf("#{base_provider_path}.mm")
@@ -86,10 +86,14 @@ function execute(
86
86
  buildCodegenIfNeeded();
87
87
  }
88
88
 
89
- const reactNativeConfig = readReactNativeConfig(projectRoot);
89
+ const reactNativeConfig = readReactNativeConfig(
90
+ projectRoot,
91
+ baseOutputPath,
92
+ );
90
93
  const codegenEnabledLibraries = findCodegenEnabledLibraries(
91
94
  pkgJson,
92
95
  projectRoot,
96
+ baseOutputPath,
93
97
  reactNativeConfig,
94
98
  );
95
99
 
@@ -97,15 +97,40 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
97
97
  }
98
98
  }
99
99
 
100
- function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
101
- const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
100
+ function readGeneratedAutolinkingOutput(
101
+ baseOutputPath /*: string */,
102
+ ) /*: $FlowFixMe */ {
103
+ // NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
104
+ const autolinkingGeneratedPath = path.resolve(
105
+ baseOutputPath,
106
+ 'build/generated/autolinking/autolinking.json',
107
+ );
108
+ if (fs.existsSync(autolinkingGeneratedPath)) {
109
+ // $FlowFixMe[unsupported-syntax]
110
+ return require(autolinkingGeneratedPath);
111
+ } else {
112
+ codegenLog(
113
+ `Could not find generated autolinking output at: ${autolinkingGeneratedPath}`,
114
+ );
115
+ return null;
116
+ }
117
+ }
102
118
 
103
- if (!fs.existsSync(rnConfigFilePath)) {
119
+ function readReactNativeConfig(
120
+ projectRoot /*: string */,
121
+ baseOutputPath /*: string */,
122
+ ) /*: $FlowFixMe */ {
123
+ const autolinkingOutput = readGeneratedAutolinkingOutput(baseOutputPath);
124
+ const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
125
+ if (autolinkingOutput) {
126
+ return autolinkingOutput;
127
+ } else if (fs.existsSync(rnConfigFilePath)) {
128
+ // $FlowIgnore[unsupported-syntax]
129
+ return require(rnConfigFilePath);
130
+ } else {
131
+ codegenLog(`Could not find React Native config at: ${rnConfigFilePath}`);
104
132
  return {};
105
133
  }
106
-
107
- // $FlowIgnore[unsupported-syntax]
108
- return require(rnConfigFilePath);
109
134
  }
110
135
 
111
136
  /**
@@ -114,17 +139,23 @@ function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
114
139
  function findCodegenEnabledLibraries(
115
140
  pkgJson /*: $FlowFixMe */,
116
141
  projectRoot /*: string */,
142
+ baseOutputPath /*: string */,
117
143
  reactNativeConfig /*: $FlowFixMe */,
118
144
  ) /*: Array<$FlowFixMe> */ {
119
145
  const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
120
146
  if (pkgJsonIncludesGeneratedCode(pkgJson)) {
121
147
  return projectLibraries;
122
148
  } else {
123
- return [
124
- ...projectLibraries,
125
- ...findExternalLibraries(pkgJson, projectRoot),
149
+ const libraries = [...projectLibraries];
150
+ // If we ran autolinking, we shouldn't try to run our own "autolinking-like"
151
+ // library discovery
152
+ if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
153
+ libraries.push(...findExternalLibraries(pkgJson, projectRoot));
154
+ }
155
+ libraries.push(
126
156
  ...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
127
- ];
157
+ );
158
+ return libraries;
128
159
  }
129
160
  }
130
161
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- const {execSync} = require('child_process');
13
+ const {spawnSync} = require('child_process');
14
14
  const fs = require('fs');
15
15
  const yargs = require('yargs');
16
16
 
@@ -67,7 +67,9 @@ function replaceRNCoreConfiguration(
67
67
  fs.mkdirSync(finalLocation, {recursive: true});
68
68
 
69
69
  console.log('Extracting the tarball', tarballURLPath);
70
- execSync(`tar -xf ${tarballURLPath} -C ${finalLocation}`);
70
+ spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
71
+ stdio: 'inherit',
72
+ });
71
73
  }
72
74
 
73
75
  function updateLastBuildConfiguration(configuration /*: string */) {
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- const {execSync} = require('child_process');
13
+ const {spawnSync} = require('child_process');
14
14
  const fs = require('fs');
15
15
  const yargs = require('yargs');
16
16
 
@@ -62,7 +62,9 @@ function replaceHermesConfiguration(configuration, version, podsRoot) {
62
62
  fs.mkdirSync(finalLocation, {recursive: true});
63
63
 
64
64
  console.log('Extracting the tarball');
65
- execSync(`tar -xf ${tarballURLPath} -C ${finalLocation}`);
65
+ spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
66
+ stdio: 'inherit',
67
+ });
66
68
  }
67
69
 
68
70
  function updateLastBuildConfiguration(configuration) {
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<<999a8d329cdab258ac64c03b24f1a516>>
7
+ * @generated SignedSource<<f17b8e4e33228e19b346837e7a33a2dd>>
8
8
  * @flow strict
9
9
  * @noformat
10
10
  */
@@ -103,6 +103,8 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
103
103
  updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
104
104
  useAlwaysAvailableJSErrorHandling: Getter<boolean>,
105
105
  useFabricInterop: Getter<boolean>,
106
+ useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean>,
107
+ useNativeTransformHelperAndroid: Getter<boolean>,
106
108
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
107
109
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
108
110
  useRawPropsJsiValue: Getter<boolean>,
@@ -404,6 +406,14 @@ export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFl
404
406
  * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
405
407
  */
406
408
  export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', true);
409
+ /**
410
+ * Use a native implementation of equals in NativeReadableArray.
411
+ */
412
+ export const useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean> = createNativeFlagGetter('useNativeEqualsInNativeReadableArrayAndroid', false);
413
+ /**
414
+ * Use a native implementation of TransformHelper
415
+ */
416
+ export const useNativeTransformHelperAndroid: Getter<boolean> = createNativeFlagGetter('useNativeTransformHelperAndroid', false);
407
417
  /**
408
418
  * When enabled, the native view configs are used in bridgeless mode.
409
419
  */
@@ -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<<1b84b6e04c214f6c2798010372937990>>
7
+ * @generated SignedSource<<8b4f1275a16d5b83f5594da1eb89c6c1>>
8
8
  * @flow strict
9
9
  * @noformat
10
10
  */
@@ -77,6 +77,8 @@ export interface Spec extends TurboModule {
77
77
  +updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
78
78
  +useAlwaysAvailableJSErrorHandling?: () => boolean;
79
79
  +useFabricInterop?: () => boolean;
80
+ +useNativeEqualsInNativeReadableArrayAndroid?: () => boolean;
81
+ +useNativeTransformHelperAndroid?: () => boolean;
80
82
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
81
83
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
82
84
  +useRawPropsJsiValue?: () => boolean;
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- const {execSync} = require('child_process');
13
+ const {spawnSync} = require('child_process');
14
14
  const fs = require('fs');
15
15
  const yargs = require('yargs');
16
16
 
@@ -66,7 +66,9 @@ function replaceRNDepsConfiguration(
66
66
  fs.mkdirSync(finalLocation, {recursive: true});
67
67
 
68
68
  console.log('Extracting the tarball', tarballURLPath);
69
- execSync(`tar -xf ${tarballURLPath} -C ${finalLocation}`);
69
+ spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
70
+ stdio: 'inherit',
71
+ });
70
72
 
71
73
  // Now we need to remove the extra third-party folder as we do in the podspec's prepare-script
72
74
  // We need to take the ReactNativeDependencies.xcframework folder and move it up one level
@@ -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<<dce51078df5fd03980baaac9a31ca8a0>>
7
+ * @generated SignedSource<<6a73d474d9a2542964617b14e756698c>>
8
8
  *
9
9
  * This file was translated from Flow by scripts/build-types/index.js.
10
10
  * Original file: packages/react-native/Libraries/Components/TV/TVFocusGuideView.js
@@ -65,7 +65,7 @@ type TVFocusGuideViewProps = Readonly<Omit<ViewProps, keyof {
65
65
  export type TVFocusGuideViewImperativeMethods = Readonly<{
66
66
  setDestinations: (destinations: (ComponentOrHandleType | number)[]) => void;
67
67
  }>;
68
- declare function TVFocusGuideView($$PARAM_0$$: TVFocusGuideViewProps, forwardedRef: any): React.ReactNode;
68
+ declare function TVFocusGuideView($$PARAM_0$$: TVFocusGuideViewProps): React.ReactNode;
69
69
  declare const $$TVFocusGuideView: typeof TVFocusGuideView;
70
70
  declare type $$TVFocusGuideView = typeof $$TVFocusGuideView;
71
71
  export default $$TVFocusGuideView;