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
@@ -12,7 +12,7 @@ import type {ViewProps} from '../View/ViewPropTypes';
12
12
  import type {ComponentOrHandleType} from './tagForComponentOrHandle';
13
13
 
14
14
  import Platform from '../../Utilities/Platform';
15
- import setAndForwardRef from '../../Utilities/setAndForwardRef';
15
+ import useMergeRefs from '../../Utilities/useMergeRefs';
16
16
  import View from '../View/View';
17
17
  import {Commands} from '../View/ViewNativeComponent';
18
18
  import tagForComponentOrHandle from './tagForComponentOrHandle';
@@ -57,17 +57,15 @@ export type TVFocusGuideViewImperativeMethods = $ReadOnly<{
57
57
  setDestinations: (destinations: (ComponentOrHandleType | number)[]) => void,
58
58
  }>;
59
59
 
60
- function TVFocusGuideView(
61
- {
62
- enabled = true,
63
- safePadding,
64
- destinations: destinationsProp,
65
- autoFocus,
66
- focusable,
67
- ...props
68
- }: TVFocusGuideViewProps,
69
- forwardedRef: any,
70
- ): React.Node {
60
+ function TVFocusGuideView({
61
+ enabled = true,
62
+ safePadding,
63
+ destinations: destinationsProp,
64
+ autoFocus,
65
+ focusable,
66
+ ref,
67
+ ...props
68
+ }: TVFocusGuideViewProps): React.Node {
71
69
  const focusGuideRef = React.useRef<React.ElementRef<typeof View> | null>(
72
70
  null,
73
71
  );
@@ -78,7 +76,7 @@ function TVFocusGuideView(
78
76
  const dests: number[] = (destinations || [])
79
77
  .map((destination: any) => tagForComponentOrHandle(destination))
80
78
  .filter(Boolean);
81
-
79
+
82
80
  if (focusGuideRef.current != null) {
83
81
  Commands.setDestinations(focusGuideRef.current, dests);
84
82
  }
@@ -87,26 +85,23 @@ function TVFocusGuideView(
87
85
  [],
88
86
  );
89
87
 
90
- const _setNativeRef = React.useMemo(() => {
91
- return setAndForwardRef({
92
- getForwardedRef: () => forwardedRef,
93
- setLocalRef: ref => {
94
- focusGuideRef.current = ref;
95
-
96
- // This is a hack. Ideally we would forwardRef to the underlying
97
- // host component. However, since TVFocusGuide has its own methods that can be
98
- // called as well, if we used the standard forwardRef then these
99
- // methods wouldn't be accessible
100
- //
101
- // Here we mutate the ref, so that the user can use the standard native
102
- // methods like `focus()`, `blur()`, etc. while also having access to
103
- // imperative methods of this component like `setDestinations()`.
104
- if (ref) {
105
- ref.setDestinations = setDestinations;
106
- }
107
- },
108
- })
109
- }, [forwardedRef, setDestinations]);
88
+ const setLocalRef = React.useCallback(
89
+ (instance: HostInstance | null) => {
90
+ // $FlowExpectedError[incompatible-type]
91
+ focusGuideRef.current = instance;
92
+
93
+ if (instance != null) {
94
+ // $FlowFixMe[prop-missing]
95
+ // $FlowFixMe[unsafe-object-assign]
96
+ Object.assign(instance, {
97
+ setDestinations,
98
+ });
99
+ }
100
+ },
101
+ [setDestinations],
102
+ );
103
+
104
+ const mergedRef = useMergeRefs(setLocalRef, ref);
110
105
 
111
106
  React.useEffect(() => {
112
107
  if (destinationsProp !== null && destinationsProp !== undefined) {
@@ -127,7 +122,7 @@ function TVFocusGuideView(
127
122
  <View
128
123
  {...props}
129
124
  style={style}
130
- ref={_setNativeRef}
125
+ ref={mergedRef}
131
126
  collapsable={false}
132
127
  autoFocus={autoFocus}
133
128
  // tvOS only prop
@@ -12,7 +12,7 @@ import type {ViewProps} from './ViewPropTypes';
12
12
 
13
13
  import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
14
14
  import TextAncestorContext from '../../Text/TextAncestorContext';
15
- import setAndForwardRef from '../../Utilities/setAndForwardRef';
15
+ import useMergeRefs from '../../Utilities/useMergeRefs';
16
16
  import ViewNativeComponent from './ViewNativeComponent';
17
17
  import {Commands} from './ViewNativeComponent';
18
18
  import * as React from 'react';
@@ -39,26 +39,23 @@ component View(
39
39
  }
40
40
  }, []);
41
41
 
42
- const _setNativeRef = React.useMemo(() => {
43
- return setAndForwardRef({
44
- getForwardedRef: () => viewRef.current,
45
- setLocalRef: _ref => {
46
- viewRef.current = _ref;
47
-
48
- // This is a hack. Ideally we would forwardRef to the underlying
49
- // host component. However, since TVFocusGuide has its own methods that can be
50
- // called as well, if we used the standard forwardRef then these
51
- // methods wouldn't be accessible
52
- //
53
- // Here we mutate the ref, so that the user can use the standart native
54
- // methods like `measureLayout()` etc. while also having access to
55
- // imperative methods of this component like `requestTVFocus()`.
56
- if (_ref) {
57
- _ref.requestTVFocus = requestTVFocus;
58
- }
59
- },
60
- })
61
- }, [requestTVFocus]);
42
+ const setLocalRef = React.useCallback(
43
+ (instance: HostInstance | null) => {
44
+ // $FlowExpectedError[incompatible-type]
45
+ viewRef.current = instance;
46
+
47
+ if (instance != null) {
48
+ // $FlowFixMe[prop-missing]
49
+ // $FlowFixMe[unsafe-object-assign]
50
+ Object.assign(instance, {
51
+ requestTVFocus,
52
+ });
53
+ }
54
+ },
55
+ [requestTVFocus],
56
+ );
57
+
58
+ const mergedRef = useMergeRefs(setLocalRef, ref);
62
59
 
63
60
  let actualView;
64
61
  if (ReactNativeFeatureFlags.reduceDefaultPropsInView()) {
@@ -151,7 +148,7 @@ component View(
151
148
  ref == null ? (
152
149
  <ViewNativeComponent {...processedProps} />
153
150
  ) : (
154
- <ViewNativeComponent {...processedProps} ref={ref} />
151
+ <ViewNativeComponent {...processedProps} ref={mergedRef} />
155
152
  );
156
153
  } else {
157
154
  const {
@@ -232,7 +229,7 @@ component View(
232
229
  : importantForAccessibility
233
230
  }
234
231
  nativeID={id ?? nativeID}
235
- ref={_setNativeRef}
232
+ ref={mergedRef}
236
233
  />
237
234
  );
238
235
  }
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @flow strict
8
+ * @noformat
8
9
  * @generated by scripts/releases/set-version.js
9
10
  */
10
11
 
@@ -16,6 +17,6 @@ export const version: $ReadOnly<{
16
17
  }> = {
17
18
  major: 0,
18
19
  minor: 81,
19
- patch: 1,
20
- prerelease: '2',
20
+ patch: 2,
21
+ prerelease: '0',
21
22
  };
@@ -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 by scripts/releases/set-rn-version.js
7
+ * @generated by scripts/releases/set-version.js
8
8
  */
9
9
 
10
10
  #import "RCTVersion.h"
@@ -23,8 +23,8 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(81),
26
- RCTVersionPatch: @(1),
27
- RCTVersionPrerelease: @"2",
26
+ RCTVersionPatch: @(2),
27
+ RCTVersionPrerelease: @"0",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -347,6 +347,16 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabr
347
347
  rt
348
348
  );
349
349
  }
350
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
351
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useNativeEqualsInNativeReadableArrayAndroid(
352
+ rt
353
+ );
354
+ }
355
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
356
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useNativeTransformHelperAndroid(
357
+ rt
358
+ );
359
+ }
350
360
  static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
351
361
  return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->useNativeViewConfigsInBridgelessMode(
352
362
  rt
@@ -438,6 +448,8 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
438
448
  methodMap_["updateRuntimeShadowNodeReferencesOnCommit"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_updateRuntimeShadowNodeReferencesOnCommit};
439
449
  methodMap_["useAlwaysAvailableJSErrorHandling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling};
440
450
  methodMap_["useFabricInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop};
451
+ methodMap_["useNativeEqualsInNativeReadableArrayAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeEqualsInNativeReadableArrayAndroid};
452
+ methodMap_["useNativeTransformHelperAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeTransformHelperAndroid};
441
453
  methodMap_["useNativeViewConfigsInBridgelessMode"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode};
442
454
  methodMap_["useOptimizedEventBatchingOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid};
443
455
  methodMap_["useRawPropsJsiValue"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue};
@@ -379,6 +379,8 @@ public:
379
379
  virtual bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime &rt) = 0;
380
380
  virtual bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) = 0;
381
381
  virtual bool useFabricInterop(jsi::Runtime &rt) = 0;
382
+ virtual bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt) = 0;
383
+ virtual bool useNativeTransformHelperAndroid(jsi::Runtime &rt) = 0;
382
384
  virtual bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) = 0;
383
385
  virtual bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) = 0;
384
386
  virtual bool useRawPropsJsiValue(jsi::Runtime &rt) = 0;
@@ -840,6 +842,22 @@ private:
840
842
  return bridging::callFromJs<bool>(
841
843
  rt, &T::useFabricInterop, jsInvoker_, instance_);
842
844
  }
845
+ bool useNativeEqualsInNativeReadableArrayAndroid(jsi::Runtime &rt) override {
846
+ static_assert(
847
+ bridging::getParameterCount(&T::useNativeEqualsInNativeReadableArrayAndroid) == 1,
848
+ "Expected useNativeEqualsInNativeReadableArrayAndroid(...) to have 1 parameters");
849
+
850
+ return bridging::callFromJs<bool>(
851
+ rt, &T::useNativeEqualsInNativeReadableArrayAndroid, jsInvoker_, instance_);
852
+ }
853
+ bool useNativeTransformHelperAndroid(jsi::Runtime &rt) override {
854
+ static_assert(
855
+ bridging::getParameterCount(&T::useNativeTransformHelperAndroid) == 1,
856
+ "Expected useNativeTransformHelperAndroid(...) to have 1 parameters");
857
+
858
+ return bridging::callFromJs<bool>(
859
+ rt, &T::useNativeTransformHelperAndroid, jsInvoker_, instance_);
860
+ }
843
861
  bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) override {
844
862
  static_assert(
845
863
  bridging::getParameterCount(&T::useNativeViewConfigsInBridgelessMode) == 1,
@@ -600,7 +600,7 @@ android {
600
600
  publishing {
601
601
  multipleVariants {
602
602
  withSourcesJar()
603
- includeBuildTypeValues("debug", "release")
603
+ includeBuildTypeValues("debug", "release", "debugOptimized")
604
604
  }
605
605
  }
606
606
 
@@ -608,6 +608,15 @@ android {
608
608
  unitTests { isIncludeAndroidResources = true }
609
609
  targetSdk = libs.versions.targetSdk.get().toInt()
610
610
  }
611
+
612
+ buildTypes {
613
+ create("debugOptimized") {
614
+ initWith(getByName("debug"))
615
+ externalNativeBuild {
616
+ cmake { arguments("-DCMAKE_BUILD_TYPE=Release", "-DREACT_NATIVE_DEBUG_OPTIMIZED=True") }
617
+ }
618
+ }
619
+ }
611
620
  }
612
621
 
613
622
  tasks.withType<KotlinCompile>().configureEach {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.81.1-2
1
+ VERSION_NAME=0.81.2-0
2
2
  react.internal.publishingGroup=io.github.react-native-tvos
3
3
 
4
4
  android.useAndroidX=true
@@ -308,6 +308,12 @@ android {
308
308
  }
309
309
  }
310
310
  }
311
+ buildTypes {
312
+ create("debugOptimized") {
313
+ initWith(getByName("debug"))
314
+ externalNativeBuild { cmake { arguments("-DCMAKE_BUILD_TYPE=Release") } }
315
+ }
316
+ }
311
317
  }
312
318
 
313
319
  sourceSets.getByName("main") {
@@ -8,6 +8,7 @@
8
8
  package com.facebook.react.bridge
9
9
 
10
10
  import com.facebook.proguard.annotations.DoNotStrip
11
+ import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
11
12
  import java.util.ArrayList
12
13
  import java.util.Arrays
13
14
  import kotlin.jvm.JvmStatic
@@ -65,9 +66,16 @@ public open class ReadableNativeArray protected constructor() : NativeArray(), R
65
66
  if (other !is ReadableNativeArray) {
66
67
  return false
67
68
  }
68
- return localArray.contentDeepEquals(other.localArray)
69
+
70
+ return if (ReactNativeFeatureFlags.useNativeEqualsInNativeReadableArrayAndroid()) {
71
+ nativeEquals(other)
72
+ } else {
73
+ localArray.contentDeepEquals(other.localArray)
74
+ }
69
75
  }
70
76
 
77
+ private external fun nativeEquals(other: ReadableNativeArray): Boolean
78
+
71
79
  override fun toArrayList(): ArrayList<Any?> {
72
80
  val arrayList = ArrayList<Any?>()
73
81
  repeat(size()) { i ->
@@ -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<<3e4d74a17c15742d35db9e4247f3e1c1>>
7
+ * @generated SignedSource<<c52f3977ea07f976e36177f13c1ec684>>
8
8
  */
9
9
 
10
10
  /**
@@ -342,6 +342,18 @@ public object ReactNativeFeatureFlags {
342
342
  @JvmStatic
343
343
  public fun useFabricInterop(): Boolean = accessor.useFabricInterop()
344
344
 
345
+ /**
346
+ * Use a native implementation of equals in NativeReadableArray.
347
+ */
348
+ @JvmStatic
349
+ public fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean = accessor.useNativeEqualsInNativeReadableArrayAndroid()
350
+
351
+ /**
352
+ * Use a native implementation of TransformHelper
353
+ */
354
+ @JvmStatic
355
+ public fun useNativeTransformHelperAndroid(): Boolean = accessor.useNativeTransformHelperAndroid()
356
+
345
357
  /**
346
358
  * When enabled, the native view configs are used in bridgeless mode.
347
359
  */
@@ -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<<e7c1c6d184681d98320aac2a23c06288>>
7
+ * @generated SignedSource<<8e0125e82b359e6a175ffc49a4df5537>>
8
8
  */
9
9
 
10
10
  /**
@@ -72,6 +72,8 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
72
72
  private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
73
73
  private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
74
74
  private var useFabricInteropCache: Boolean? = null
75
+ private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null
76
+ private var useNativeTransformHelperAndroidCache: Boolean? = null
75
77
  private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
76
78
  private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
77
79
  private var useRawPropsJsiValueCache: Boolean? = null
@@ -548,6 +550,24 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
548
550
  return cached
549
551
  }
550
552
 
553
+ override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean {
554
+ var cached = useNativeEqualsInNativeReadableArrayAndroidCache
555
+ if (cached == null) {
556
+ cached = ReactNativeFeatureFlagsCxxInterop.useNativeEqualsInNativeReadableArrayAndroid()
557
+ useNativeEqualsInNativeReadableArrayAndroidCache = cached
558
+ }
559
+ return cached
560
+ }
561
+
562
+ override fun useNativeTransformHelperAndroid(): Boolean {
563
+ var cached = useNativeTransformHelperAndroidCache
564
+ if (cached == null) {
565
+ cached = ReactNativeFeatureFlagsCxxInterop.useNativeTransformHelperAndroid()
566
+ useNativeTransformHelperAndroidCache = cached
567
+ }
568
+ return cached
569
+ }
570
+
551
571
  override fun useNativeViewConfigsInBridgelessMode(): Boolean {
552
572
  var cached = useNativeViewConfigsInBridgelessModeCache
553
573
  if (cached == null) {
@@ -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<<ba62d616188ed439c85c66cfd055810d>>
7
+ * @generated SignedSource<<a5d9d11cc2a6529641243dc47a61f201>>
8
8
  */
9
9
 
10
10
  /**
@@ -132,6 +132,10 @@ public object ReactNativeFeatureFlagsCxxInterop {
132
132
 
133
133
  @DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
134
134
 
135
+ @DoNotStrip @JvmStatic public external fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean
136
+
137
+ @DoNotStrip @JvmStatic public external fun useNativeTransformHelperAndroid(): Boolean
138
+
135
139
  @DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean
136
140
 
137
141
  @DoNotStrip @JvmStatic public external fun useOptimizedEventBatchingOnAndroid(): Boolean
@@ -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<<12c2727291b635ef7c3163d153669c2c>>
7
+ * @generated SignedSource<<10d708ce4449eede46d750a1ed48d02e>>
8
8
  */
9
9
 
10
10
  /**
@@ -127,6 +127,10 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
127
127
 
128
128
  override fun useFabricInterop(): Boolean = true
129
129
 
130
+ override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean = false
131
+
132
+ override fun useNativeTransformHelperAndroid(): Boolean = false
133
+
130
134
  override fun useNativeViewConfigsInBridgelessMode(): Boolean = false
131
135
 
132
136
  override fun useOptimizedEventBatchingOnAndroid(): Boolean = false
@@ -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<<3ea9946ef21c8ac8bb9bb63712636e89>>
7
+ * @generated SignedSource<<b04948c792c5db63decf1df80d3a867e>>
8
8
  */
9
9
 
10
10
  /**
@@ -76,6 +76,8 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
76
76
  private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
77
77
  private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
78
78
  private var useFabricInteropCache: Boolean? = null
79
+ private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null
80
+ private var useNativeTransformHelperAndroidCache: Boolean? = null
79
81
  private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
80
82
  private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
81
83
  private var useRawPropsJsiValueCache: Boolean? = null
@@ -604,6 +606,26 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
604
606
  return cached
605
607
  }
606
608
 
609
+ override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean {
610
+ var cached = useNativeEqualsInNativeReadableArrayAndroidCache
611
+ if (cached == null) {
612
+ cached = currentProvider.useNativeEqualsInNativeReadableArrayAndroid()
613
+ accessedFeatureFlags.add("useNativeEqualsInNativeReadableArrayAndroid")
614
+ useNativeEqualsInNativeReadableArrayAndroidCache = cached
615
+ }
616
+ return cached
617
+ }
618
+
619
+ override fun useNativeTransformHelperAndroid(): Boolean {
620
+ var cached = useNativeTransformHelperAndroidCache
621
+ if (cached == null) {
622
+ cached = currentProvider.useNativeTransformHelperAndroid()
623
+ accessedFeatureFlags.add("useNativeTransformHelperAndroid")
624
+ useNativeTransformHelperAndroidCache = cached
625
+ }
626
+ return cached
627
+ }
628
+
607
629
  override fun useNativeViewConfigsInBridgelessMode(): Boolean {
608
630
  var cached = useNativeViewConfigsInBridgelessModeCache
609
631
  if (cached == null) {
@@ -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<<58da46268043f086730132430735b720>>
7
+ * @generated SignedSource<<0bafb0a2fb79c4220d21f1736894af14>>
8
8
  */
9
9
 
10
10
  /**
@@ -24,4 +24,8 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :
24
24
  // but that is more expensive than just duplicating the defaults here.
25
25
 
26
26
  override fun preventShadowTreeCommitExhaustion(): Boolean = true
27
+
28
+ override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean = true
29
+
30
+ override fun useNativeTransformHelperAndroid(): Boolean = true
27
31
  }
@@ -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<<1e81de36735c6c9286b228c75c9a0228>>
7
+ * @generated SignedSource<<21704207ce520def05b05f89dfba1048>>
8
8
  */
9
9
 
10
10
  /**
@@ -127,6 +127,10 @@ public interface ReactNativeFeatureFlagsProvider {
127
127
 
128
128
  @DoNotStrip public fun useFabricInterop(): Boolean
129
129
 
130
+ @DoNotStrip public fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean
131
+
132
+ @DoNotStrip public fun useNativeTransformHelperAndroid(): Boolean
133
+
130
134
  @DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean
131
135
 
132
136
  @DoNotStrip public fun useOptimizedEventBatchingOnAndroid(): Boolean
@@ -14,7 +14,7 @@ public object ReactNativeVersion {
14
14
  public val VERSION: Map<String, Any?> = mapOf(
15
15
  "major" to 0,
16
16
  "minor" to 81,
17
- "patch" to 1,
18
- "prerelease" to null
17
+ "patch" to 2,
18
+ "prerelease" to "0"
19
19
  )
20
20
  }
@@ -8,10 +8,12 @@
8
8
  package com.facebook.react.uimanager
9
9
 
10
10
  import com.facebook.common.logging.FLog
11
+ import com.facebook.react.bridge.NativeArray
11
12
  import com.facebook.react.bridge.ReadableArray
12
13
  import com.facebook.react.bridge.ReadableMap
13
14
  import com.facebook.react.bridge.ReadableType
14
15
  import com.facebook.react.common.ReactConstants
16
+ import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
15
17
 
16
18
  public object TransformHelper {
17
19
 
@@ -69,6 +71,14 @@ public object TransformHelper {
69
71
  transformOrigin: ReadableArray?,
70
72
  allowPercentageResolution: Boolean
71
73
  ) {
74
+ if (allowPercentageResolution &&
75
+ ReactNativeFeatureFlags.useNativeTransformHelperAndroid() &&
76
+ transforms is NativeArray &&
77
+ transformOrigin is NativeArray?) {
78
+ nativeProcessTransform(transforms, result, viewWidth, viewHeight, transformOrigin)
79
+ return
80
+ }
81
+
72
82
  val helperMatrix = helperMatrix.get()!!
73
83
  MatrixMathHelper.resetIdentityMatrix(result)
74
84
  val offsets =
@@ -220,4 +230,13 @@ public object TransformHelper {
220
230
 
221
231
  return doubleArrayOf(newTranslateX, newTranslateY, newTranslateZ)
222
232
  }
233
+
234
+ @JvmStatic
235
+ private external fun nativeProcessTransform(
236
+ transforms: NativeArray,
237
+ result: DoubleArray,
238
+ viewWidth: Float,
239
+ viewHeight: Float,
240
+ transformOrigin: NativeArray?
241
+ )
223
242
  }
@@ -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<<cf7b6ff66c614ca2acc6667a80c5590d>>
7
+ * @generated SignedSource<<bbad4ee8cacd33099874d0c3078ea716>>
8
8
  */
9
9
 
10
10
  /**
@@ -351,6 +351,18 @@ class ReactNativeFeatureFlagsJavaProvider
351
351
  return method(javaProvider_);
352
352
  }
353
353
 
354
+ bool useNativeEqualsInNativeReadableArrayAndroid() override {
355
+ static const auto method =
356
+ getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeEqualsInNativeReadableArrayAndroid");
357
+ return method(javaProvider_);
358
+ }
359
+
360
+ bool useNativeTransformHelperAndroid() override {
361
+ static const auto method =
362
+ getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeTransformHelperAndroid");
363
+ return method(javaProvider_);
364
+ }
365
+
354
366
  bool useNativeViewConfigsInBridgelessMode() override {
355
367
  static const auto method =
356
368
  getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeViewConfigsInBridgelessMode");
@@ -657,6 +669,16 @@ bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
657
669
  return ReactNativeFeatureFlags::useFabricInterop();
658
670
  }
659
671
 
672
+ bool JReactNativeFeatureFlagsCxxInterop::useNativeEqualsInNativeReadableArrayAndroid(
673
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
674
+ return ReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid();
675
+ }
676
+
677
+ bool JReactNativeFeatureFlagsCxxInterop::useNativeTransformHelperAndroid(
678
+ facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
679
+ return ReactNativeFeatureFlags::useNativeTransformHelperAndroid();
680
+ }
681
+
660
682
  bool JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode(
661
683
  facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
662
684
  return ReactNativeFeatureFlags::useNativeViewConfigsInBridgelessMode();
@@ -879,6 +901,12 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
879
901
  makeNativeMethod(
880
902
  "useFabricInterop",
881
903
  JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
904
+ makeNativeMethod(
905
+ "useNativeEqualsInNativeReadableArrayAndroid",
906
+ JReactNativeFeatureFlagsCxxInterop::useNativeEqualsInNativeReadableArrayAndroid),
907
+ makeNativeMethod(
908
+ "useNativeTransformHelperAndroid",
909
+ JReactNativeFeatureFlagsCxxInterop::useNativeTransformHelperAndroid),
882
910
  makeNativeMethod(
883
911
  "useNativeViewConfigsInBridgelessMode",
884
912
  JReactNativeFeatureFlagsCxxInterop::useNativeViewConfigsInBridgelessMode),