react-native 0.83.0-nightly-20250922-5ef054921 → 0.83.0-nightly-20250923-2065c3180

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 (60) hide show
  1. package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
  2. package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
  3. package/Libraries/Core/ReactNativeVersion.js +1 -1
  4. package/Libraries/Utilities/DevLoadingView.js +14 -6
  5. package/Libraries/Utilities/HMRClient.js +7 -4
  6. package/React/Base/RCTVersion.m +1 -1
  7. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +6 -0
  8. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +9 -0
  9. package/ReactAndroid/api/ReactAndroid.api +2 -0
  10. package/ReactAndroid/gradle.properties +1 -1
  11. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +5 -1
  12. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevLoadingViewImplementation.kt +12 -2
  13. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevLoadingViewManager.kt +2 -0
  14. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
  15. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
  19. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
  20. package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.kt +3 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  22. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.kt +22 -174
  23. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +12 -2
  24. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +13 -2
  25. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
  26. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
  27. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  28. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
  29. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
  30. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +68 -50
  31. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
  32. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
  33. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
  34. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
  35. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
  36. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
  37. package/ReactCommon/react/renderer/components/text/RawTextShadowNode.cpp +1 -0
  38. package/ReactCommon/react/renderer/components/view/conversions.h +30 -3
  39. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +26 -13
  40. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.h +2 -0
  41. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHermesInstance.h +8 -8
  42. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHermesInstance.mm +3 -15
  43. package/package.json +8 -8
  44. package/sdks/hermesc/osx-bin/hermes +0 -0
  45. package/sdks/hermesc/osx-bin/hermesc +0 -0
  46. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  47. package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
  48. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
  49. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.kt +0 -137
  50. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +0 -42
  51. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/BaseLayoutAnimation.kt +0 -96
  52. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +0 -43
  53. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt +0 -46
  54. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt +0 -33
  55. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt +0 -37
  56. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt +0 -42
  57. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +0 -66
  58. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/OpacityAnimation.kt +0 -77
  59. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/PositionAndSizeAnimation.kt +0 -98
  60. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/SimpleSpringInterpolator.kt +0 -62
@@ -14,8 +14,10 @@ import FlatList, {type FlatListProps} from '../../Lists/FlatList';
14
14
  import createAnimatedComponent from '../createAnimatedComponent';
15
15
  import * as React from 'react';
16
16
 
17
- // $FlowExpectedError[unclear-type]
18
- export default (createAnimatedComponent(FlatList): component<ItemT = any>(
17
+ export default createAnimatedComponent(FlatList) as $FlowFixMe as component<
18
+ // $FlowExpectedError[unclear-type]
19
+ ItemT = any,
20
+ >(
19
21
  ref?: React.RefSetter<FlatList<ItemT>>,
20
22
  ...props: AnimatedProps<FlatListProps<ItemT>>
21
- ));
23
+ );
@@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent';
15
15
  import * as React from 'react';
16
16
 
17
17
  // $FlowFixMe[incompatible-type]
18
- export default (createAnimatedComponent(SectionList): component<
18
+ export default createAnimatedComponent(SectionList) as $FlowFixMe as component<
19
19
  // $FlowExpectedError[unclear-type]
20
20
  ItemT = any,
21
21
  // $FlowExpectedError[unclear-type]
@@ -23,4 +23,4 @@ export default (createAnimatedComponent(SectionList): component<
23
23
  >(
24
24
  ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
25
25
  ...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
26
- ));
26
+ );
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 83;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20250922-5ef054921';
32
+ static prerelease: string | null = 'nightly-20250923-2065c3180';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -14,29 +14,37 @@ import NativeDevLoadingView from './NativeDevLoadingView';
14
14
 
15
15
  const COLOR_SCHEME = {
16
16
  dark: {
17
+ load: {
18
+ backgroundColor: '#fafafa',
19
+ textColor: '#242526',
20
+ },
17
21
  refresh: {
18
22
  backgroundColor: '#2584e8',
19
23
  textColor: '#ffffff',
20
24
  },
21
- load: {
22
- backgroundColor: '#fafafa',
23
- textColor: '#242526',
25
+ error: {
26
+ backgroundColor: '#1065AF',
27
+ textColor: '#ffffff',
24
28
  },
25
29
  },
26
30
  default: {
31
+ load: {
32
+ backgroundColor: '#404040',
33
+ textColor: '#ffffff',
34
+ },
27
35
  refresh: {
28
36
  backgroundColor: '#2584e8',
29
37
  textColor: '#ffffff',
30
38
  },
31
- load: {
32
- backgroundColor: '#404040',
39
+ error: {
40
+ backgroundColor: '#1065AF',
33
41
  textColor: '#ffffff',
34
42
  },
35
43
  },
36
44
  };
37
45
 
38
46
  export default {
39
- showMessage(message: string, type: 'load' | 'refresh') {
47
+ showMessage(message: string, type: 'load' | 'refresh' | 'error') {
40
48
  if (NativeDevLoadingView) {
41
49
  const colorScheme =
42
50
  getColorScheme() === 'dark' ? COLOR_SCHEME.dark : COLOR_SCHEME.default;
@@ -232,8 +232,6 @@ Error: ${e.message}`;
232
232
  });
233
233
 
234
234
  client.on('error', data => {
235
- DevLoadingView.hide();
236
-
237
235
  if (data.type === 'GraphNotFoundError') {
238
236
  client.close();
239
237
  setHMRUnavailableReason(
@@ -253,8 +251,6 @@ Error: ${e.message}`;
253
251
  });
254
252
 
255
253
  client.on('close', closeEvent => {
256
- DevLoadingView.hide();
257
-
258
254
  // https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1
259
255
  // https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5
260
256
  const isNormalOrUnsetCloseReason =
@@ -296,10 +292,17 @@ function setHMRUnavailableReason(reason: string) {
296
292
  }
297
293
  hmrUnavailableReason = reason;
298
294
 
295
+ const DevLoadingView = require('./DevLoadingView').default;
296
+ DevLoadingView.hide();
297
+
299
298
  // We only want to show a warning if Fast Refresh is on *and* if we ever
300
299
  // previously managed to connect successfully. We don't want to show
301
300
  // the warning to native engineers who use cached bundles without Metro.
302
301
  if (hmrClient.isEnabled() && didConnect) {
302
+ DevLoadingView.showMessage(
303
+ 'Fast Refresh disconnected. Reload app to reconnect.',
304
+ 'error',
305
+ );
303
306
  console.warn(reason);
304
307
  // (Not using the `warning` module to prevent a Buck cycle.)
305
308
  }
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(83),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"nightly-20250922-5ef054921",
27
+ RCTVersionPrerelease: @"nightly-20250923-2065c3180",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -212,6 +212,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableI
212
212
  rt
213
213
  );
214
214
  }
215
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingJNIBatchingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
216
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableImagePrefetchingJNIBatchingAndroid(
217
+ rt
218
+ );
219
+ }
215
220
  static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingOnUiThreadAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
216
221
  return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableImagePrefetchingOnUiThreadAndroid(
217
222
  rt
@@ -486,6 +491,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
486
491
  methodMap_["enableIOSTextBaselineOffsetPerLine"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSTextBaselineOffsetPerLine};
487
492
  methodMap_["enableIOSViewClipToPaddingBox"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSViewClipToPaddingBox};
488
493
  methodMap_["enableImagePrefetchingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid};
494
+ methodMap_["enableImagePrefetchingJNIBatchingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingJNIBatchingAndroid};
489
495
  methodMap_["enableImagePrefetchingOnUiThreadAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingOnUiThreadAndroid};
490
496
  methodMap_["enableImmediateUpdateModeForContentOffsetChanges"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges};
491
497
  methodMap_["enableImperativeFocus"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImperativeFocus};
@@ -352,6 +352,7 @@ public:
352
352
  virtual bool enableIOSTextBaselineOffsetPerLine(jsi::Runtime &rt) = 0;
353
353
  virtual bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) = 0;
354
354
  virtual bool enableImagePrefetchingAndroid(jsi::Runtime &rt) = 0;
355
+ virtual bool enableImagePrefetchingJNIBatchingAndroid(jsi::Runtime &rt) = 0;
355
356
  virtual bool enableImagePrefetchingOnUiThreadAndroid(jsi::Runtime &rt) = 0;
356
357
  virtual bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt) = 0;
357
358
  virtual bool enableImperativeFocus(jsi::Runtime &rt) = 0;
@@ -639,6 +640,14 @@ private:
639
640
  return bridging::callFromJs<bool>(
640
641
  rt, &T::enableImagePrefetchingAndroid, jsInvoker_, instance_);
641
642
  }
643
+ bool enableImagePrefetchingJNIBatchingAndroid(jsi::Runtime &rt) override {
644
+ static_assert(
645
+ bridging::getParameterCount(&T::enableImagePrefetchingJNIBatchingAndroid) == 1,
646
+ "Expected enableImagePrefetchingJNIBatchingAndroid(...) to have 1 parameters");
647
+
648
+ return bridging::callFromJs<bool>(
649
+ rt, &T::enableImagePrefetchingJNIBatchingAndroid, jsInvoker_, instance_);
650
+ }
642
651
  bool enableImagePrefetchingOnUiThreadAndroid(jsi::Runtime &rt) override {
643
652
  static_assert(
644
653
  bridging::getParameterCount(&T::enableImagePrefetchingOnUiThreadAndroid) == 1,
@@ -1892,6 +1892,7 @@ public final class com/facebook/react/devsupport/DefaultDevLoadingViewImplementa
1892
1892
  public fun <init> (Lcom/facebook/react/devsupport/ReactInstanceDevHelper;)V
1893
1893
  public fun hide ()V
1894
1894
  public fun showMessage (Ljava/lang/String;)V
1895
+ public fun showMessage (Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;)V
1895
1896
  public fun updateProgress (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V
1896
1897
  }
1897
1898
 
@@ -2119,6 +2120,7 @@ public abstract interface class com/facebook/react/devsupport/interfaces/DevBund
2119
2120
  public abstract interface class com/facebook/react/devsupport/interfaces/DevLoadingViewManager {
2120
2121
  public abstract fun hide ()V
2121
2122
  public abstract fun showMessage (Ljava/lang/String;)V
2123
+ public abstract fun showMessage (Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;)V
2122
2124
  public abstract fun updateProgress (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V
2123
2125
  }
2124
2126
 
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.83.0-nightly-20250922-5ef054921
1
+ VERSION_NAME=0.83.0-nightly-20250923-2065c3180
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
  react.internal.hermesPublishingGroup=com.facebook.hermes
4
4
 
@@ -120,7 +120,11 @@ public object DefaultNewArchitectureEntryPoint {
120
120
  privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()
121
121
 
122
122
  val (isValid, errorMessage) =
123
- isConfigurationValid(turboModulesEnabled, fabricEnabled, bridgelessEnabled)
123
+ isConfigurationValid(
124
+ privateTurboModulesEnabled,
125
+ privateFabricEnabled,
126
+ privateBridgelessEnabled,
127
+ )
124
128
  if (!isValid) {
125
129
  error(errorMessage)
126
130
  }
@@ -33,10 +33,14 @@ public class DefaultDevLoadingViewImplementation(
33
33
  private var devLoadingPopup: PopupWindow? = null
34
34
 
35
35
  override fun showMessage(message: String) {
36
+ showMessage(message, color = null, backgroundColor = null)
37
+ }
38
+
39
+ override fun showMessage(message: String, color: Double?, backgroundColor: Double?) {
36
40
  if (!isEnabled) {
37
41
  return
38
42
  }
39
- UiThreadUtil.runOnUiThread { showInternal(message) }
43
+ UiThreadUtil.runOnUiThread { showInternal(message, color, backgroundColor) }
40
44
  }
41
45
 
42
46
  override fun updateProgress(status: String?, done: Int?, total: Int?) {
@@ -59,7 +63,7 @@ public class DefaultDevLoadingViewImplementation(
59
63
  }
60
64
  }
61
65
 
62
- private fun showInternal(message: String) {
66
+ private fun showInternal(message: String, color: Double?, backgroundColor: Double?) {
63
67
  if (devLoadingPopup?.isShowing == true) {
64
68
  // already showing
65
69
  return
@@ -84,6 +88,12 @@ public class DefaultDevLoadingViewImplementation(
84
88
  currentActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
85
89
  val view = inflater.inflate(R.layout.dev_loading_view, null) as TextView
86
90
  view.text = message
91
+ if (color != null) {
92
+ view.setTextColor(color.toInt())
93
+ }
94
+ if (backgroundColor != null) {
95
+ view.setBackgroundColor(backgroundColor.toInt())
96
+ }
87
97
  val popup =
88
98
  PopupWindow(
89
99
  view,
@@ -11,6 +11,8 @@ package com.facebook.react.devsupport.interfaces
11
11
  public interface DevLoadingViewManager {
12
12
  public fun showMessage(message: String)
13
13
 
14
+ public fun showMessage(message: String, color: Double?, backgroundColor: Double?)
15
+
14
16
  public fun updateProgress(status: String?, done: Int?, total: Int?)
15
17
 
16
18
  public fun hide()
@@ -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<<ce122427070db337420728a1028bc2b6>>
7
+ * @generated SignedSource<<6b632ac7553ae149fa42a67efde5acfa>>
8
8
  */
9
9
 
10
10
  /**
@@ -180,6 +180,12 @@ public object ReactNativeFeatureFlags {
180
180
  @JvmStatic
181
181
  public fun enableImagePrefetchingAndroid(): Boolean = accessor.enableImagePrefetchingAndroid()
182
182
 
183
+ /**
184
+ * When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout and batch them together in a single JNI call
185
+ */
186
+ @JvmStatic
187
+ public fun enableImagePrefetchingJNIBatchingAndroid(): Boolean = accessor.enableImagePrefetchingJNIBatchingAndroid()
188
+
183
189
  /**
184
190
  * When enabled, Android will initiate image prefetch requested on ImageShadowNode::layout on the UI thread
185
191
  */
@@ -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<<e7581ab264bca8b059723bd7bd788790>>
7
+ * @generated SignedSource<<c228bdbf6120b4715f49e03c04918a7c>>
8
8
  */
9
9
 
10
10
  /**
@@ -45,6 +45,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
45
45
  private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
46
46
  private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
47
47
  private var enableImagePrefetchingAndroidCache: Boolean? = null
48
+ private var enableImagePrefetchingJNIBatchingAndroidCache: Boolean? = null
48
49
  private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
49
50
  private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
50
51
  private var enableImperativeFocusCache: Boolean? = null
@@ -320,6 +321,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
320
321
  return cached
321
322
  }
322
323
 
324
+ override fun enableImagePrefetchingJNIBatchingAndroid(): Boolean {
325
+ var cached = enableImagePrefetchingJNIBatchingAndroidCache
326
+ if (cached == null) {
327
+ cached = ReactNativeFeatureFlagsCxxInterop.enableImagePrefetchingJNIBatchingAndroid()
328
+ enableImagePrefetchingJNIBatchingAndroidCache = cached
329
+ }
330
+ return cached
331
+ }
332
+
323
333
  override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean {
324
334
  var cached = enableImagePrefetchingOnUiThreadAndroidCache
325
335
  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<<d73f5df2130479a4cd1000dc76b15d1b>>
7
+ * @generated SignedSource<<26dce1945df5641ab84cbca9eaf2b10f>>
8
8
  */
9
9
 
10
10
  /**
@@ -78,6 +78,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
78
78
 
79
79
  @DoNotStrip @JvmStatic public external fun enableImagePrefetchingAndroid(): Boolean
80
80
 
81
+ @DoNotStrip @JvmStatic public external fun enableImagePrefetchingJNIBatchingAndroid(): Boolean
82
+
81
83
  @DoNotStrip @JvmStatic public external fun enableImagePrefetchingOnUiThreadAndroid(): Boolean
82
84
 
83
85
  @DoNotStrip @JvmStatic public external fun enableImmediateUpdateModeForContentOffsetChanges(): 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<<4fa15189361a6c92bdd44bafc9356167>>
7
+ * @generated SignedSource<<11051ece1b61fd4bf4ca003a3b7fc4f9>>
8
8
  */
9
9
 
10
10
  /**
@@ -73,6 +73,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
73
73
 
74
74
  override fun enableImagePrefetchingAndroid(): Boolean = false
75
75
 
76
+ override fun enableImagePrefetchingJNIBatchingAndroid(): Boolean = false
77
+
76
78
  override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean = false
77
79
 
78
80
  override fun enableImmediateUpdateModeForContentOffsetChanges(): 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<<962c60d1761b0a1f4945b44767aa7b02>>
7
+ * @generated SignedSource<<66fa583c37021750123a483ab0ccb030>>
8
8
  */
9
9
 
10
10
  /**
@@ -49,6 +49,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
49
49
  private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
50
50
  private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
51
51
  private var enableImagePrefetchingAndroidCache: Boolean? = null
52
+ private var enableImagePrefetchingJNIBatchingAndroidCache: Boolean? = null
52
53
  private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
53
54
  private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
54
55
  private var enableImperativeFocusCache: Boolean? = null
@@ -349,6 +350,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
349
350
  return cached
350
351
  }
351
352
 
353
+ override fun enableImagePrefetchingJNIBatchingAndroid(): Boolean {
354
+ var cached = enableImagePrefetchingJNIBatchingAndroidCache
355
+ if (cached == null) {
356
+ cached = currentProvider.enableImagePrefetchingJNIBatchingAndroid()
357
+ accessedFeatureFlags.add("enableImagePrefetchingJNIBatchingAndroid")
358
+ enableImagePrefetchingJNIBatchingAndroidCache = cached
359
+ }
360
+ return cached
361
+ }
362
+
352
363
  override fun enableImagePrefetchingOnUiThreadAndroid(): Boolean {
353
364
  var cached = enableImagePrefetchingOnUiThreadAndroidCache
354
365
  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<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
7
+ * @generated SignedSource<<f26998daf87c8b90c2ec822c8316b134>>
8
8
  */
9
9
 
10
10
  /**
@@ -73,6 +73,8 @@ public interface ReactNativeFeatureFlagsProvider {
73
73
 
74
74
  @DoNotStrip public fun enableImagePrefetchingAndroid(): Boolean
75
75
 
76
+ @DoNotStrip public fun enableImagePrefetchingJNIBatchingAndroid(): Boolean
77
+
76
78
  @DoNotStrip public fun enableImagePrefetchingOnUiThreadAndroid(): Boolean
77
79
 
78
80
  @DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
@@ -31,7 +31,9 @@ internal class DevLoadingModule(reactContext: ReactApplicationContext) :
31
31
  }
32
32
 
33
33
  override fun showMessage(message: String, color: Double?, backgroundColor: Double?) {
34
- UiThreadUtil.runOnUiThread { devLoadingViewManager?.showMessage(message) }
34
+ UiThreadUtil.runOnUiThread {
35
+ devLoadingViewManager?.showMessage(message, color, backgroundColor)
36
+ }
35
37
  }
36
38
 
37
39
  override fun hide() {
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 83,
17
17
  "patch" to 0,
18
- "prerelease" to "nightly-20250922-5ef054921"
18
+ "prerelease" to "nightly-20250923-2065c3180"
19
19
  )
20
20
  }
@@ -9,19 +9,12 @@
9
9
 
10
10
  package com.facebook.react.uimanager.layoutanimation
11
11
 
12
- import android.util.SparseArray
13
12
  import android.view.View
14
- import android.view.ViewGroup
15
- import android.view.animation.Animation
16
- import android.view.animation.Animation.AnimationListener
17
13
  import com.facebook.react.bridge.Callback
18
14
  import com.facebook.react.bridge.ReadableMap
19
- import com.facebook.react.bridge.UiThreadUtil.assertOnUiThread
20
- import com.facebook.react.bridge.UiThreadUtil.getUiThreadHandler
21
15
  import com.facebook.react.common.annotations.internal.LegacyArchitecture
22
16
  import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
23
- import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger.assertLegacyArchitecture
24
- import com.facebook.react.uimanager.layoutanimation.LayoutAnimationType.Companion.toString
17
+ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
25
18
  import javax.annotation.concurrent.NotThreadSafe
26
19
 
27
20
  /**
@@ -36,75 +29,27 @@ import javax.annotation.concurrent.NotThreadSafe
36
29
  level = DeprecationLevel.WARNING,
37
30
  )
38
31
  public open class LayoutAnimationController {
39
- private val layoutCreateAnimation: AbstractLayoutAnimation = LayoutCreateAnimation()
40
- private val layoutUpdateAnimation: AbstractLayoutAnimation = LayoutUpdateAnimation()
41
- private val layoutDeleteAnimation: AbstractLayoutAnimation = LayoutDeleteAnimation()
42
- private val layoutHandlers = SparseArray<LayoutHandlingAnimation?>(0)
43
-
44
- private var shouldAnimateLayout = false
45
- private var maxAnimationDuration: Long = -1
46
- private var completionRunnable: Runnable? = null
47
32
 
48
33
  public fun initializeFromConfig(config: ReadableMap?, completionCallback: Callback?) {
49
- if (config == null) {
50
- reset()
51
- return
52
- }
53
-
54
- shouldAnimateLayout = false
55
- val globalDuration = if (config.hasKey("duration")) config.getInt("duration") else 0
56
- if (config.hasKey(toString(LayoutAnimationType.CREATE))) {
57
- layoutCreateAnimation.initializeFromConfig(
58
- config.getMap(toString(LayoutAnimationType.CREATE))!!,
59
- globalDuration,
60
- )
61
- shouldAnimateLayout = true
62
- }
63
- if (config.hasKey(toString(LayoutAnimationType.UPDATE))) {
64
- layoutUpdateAnimation.initializeFromConfig(
65
- config.getMap(toString(LayoutAnimationType.UPDATE))!!,
66
- globalDuration,
67
- )
68
- shouldAnimateLayout = true
69
- }
70
- if (config.hasKey(toString(LayoutAnimationType.DELETE))) {
71
- layoutDeleteAnimation.initializeFromConfig(
72
- config.getMap(toString(LayoutAnimationType.DELETE))!!,
73
- globalDuration,
74
- )
75
- shouldAnimateLayout = true
76
- }
77
-
78
- if (shouldAnimateLayout && completionCallback != null) {
79
- completionRunnable = Runnable { completionCallback.invoke(java.lang.Boolean.TRUE) }
80
- }
34
+ LegacyArchitectureLogger.assertLegacyArchitecture(
35
+ "LayoutAnimationController",
36
+ LegacyArchitectureLogLevel.ERROR,
37
+ )
81
38
  }
82
39
 
83
40
  public open fun reset() {
84
- layoutCreateAnimation.reset()
85
- layoutUpdateAnimation.reset()
86
- layoutDeleteAnimation.reset()
87
- completionRunnable = null
88
- shouldAnimateLayout = false
89
- maxAnimationDuration = -1
90
- for (i in layoutHandlers.size() - 1 downTo 0) {
91
- val animation = layoutHandlers.valueAt(i)
92
- if (!animation!!.isValid()) {
93
- layoutHandlers.removeAt(i)
94
- }
95
- }
41
+ LegacyArchitectureLogger.assertLegacyArchitecture(
42
+ "LayoutAnimationController",
43
+ LegacyArchitectureLogLevel.ERROR,
44
+ )
96
45
  }
97
46
 
98
47
  public open fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
99
- // if view parent is null, skip animation: view have been clipped, we don't want animation to
100
- // resume when view is re-attached to parent, which is the standard android animation behavior.
101
- // If there's a layout handling animation going on, it should be animated nonetheless since the
102
- // ongoing animation needs to be updated.
103
- if (viewToAnimate == null) {
104
- return false
105
- }
106
- return ((shouldAnimateLayout && viewToAnimate.parent != null) ||
107
- layoutHandlers[viewToAnimate.id] != null)
48
+ LegacyArchitectureLogger.assertLegacyArchitecture(
49
+ "LayoutAnimationController",
50
+ LegacyArchitectureLogLevel.ERROR,
51
+ )
52
+ return false
108
53
  }
109
54
 
110
55
  /**
@@ -119,57 +64,10 @@ public open class LayoutAnimationController {
119
64
  * @param height the new height value for the view
120
65
  */
121
66
  public open fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
122
- assertOnUiThread()
123
-
124
- val reactTag = view.id
125
-
126
- // Update an ongoing animation if possible, otherwise the layout update would be ignored as
127
- // the existing animation would still animate to the old layout.
128
- val existingAnimation = layoutHandlers[reactTag]
129
- if (existingAnimation != null) {
130
- if (!existingAnimation.isValid()) {
131
- layoutHandlers.remove(reactTag)
132
- } else {
133
- existingAnimation.onLayoutUpdate(x, y, width, height)
134
- return
135
- }
136
- }
137
-
138
- // Determine which animation to use : if view is initially invisible, use create animation,
139
- // otherwise use update animation. This approach is easier than maintaining a list of tags
140
- // for recently created views.
141
- val layoutAnimation =
142
- if ((view.width == 0 || view.height == 0)) layoutCreateAnimation else layoutUpdateAnimation
143
-
144
- val animation = layoutAnimation.createAnimation(view, x, y, width, height)
145
-
146
- if (animation is LayoutHandlingAnimation) {
147
- animation.setAnimationListener(
148
- object : AnimationListener {
149
- override fun onAnimationStart(animation: Animation) {
150
- layoutHandlers.put(reactTag, animation as LayoutHandlingAnimation)
151
- }
152
-
153
- override fun onAnimationEnd(animation: Animation) {
154
- layoutHandlers.remove(reactTag)
155
- }
156
-
157
- override fun onAnimationRepeat(animation: Animation) = Unit
158
- }
159
- )
160
- } else {
161
- view.layout(x, y, x + width, y + height)
162
- }
163
-
164
- if (animation != null) {
165
- val animationDuration = animation.duration
166
- if (animationDuration > maxAnimationDuration) {
167
- maxAnimationDuration = animationDuration
168
- scheduleCompletionCallback(animationDuration)
169
- }
170
-
171
- view.startAnimation(animation)
172
- }
67
+ LegacyArchitectureLogger.assertLegacyArchitecture(
68
+ "LayoutAnimationController",
69
+ LegacyArchitectureLogLevel.ERROR,
70
+ )
173
71
  }
174
72
 
175
73
  /**
@@ -181,59 +79,9 @@ public open class LayoutAnimationController {
181
79
  * view.
182
80
  */
183
81
  public open fun deleteView(view: View, listener: LayoutAnimationListener) {
184
- assertOnUiThread()
185
-
186
- val animation =
187
- layoutDeleteAnimation.createAnimation(view, view.left, view.top, view.width, view.height)
188
-
189
- if (animation != null) {
190
- disableUserInteractions(view)
191
-
192
- animation.setAnimationListener(
193
- object : AnimationListener {
194
- override fun onAnimationStart(anim: Animation) = Unit
195
-
196
- override fun onAnimationRepeat(anim: Animation) = Unit
197
-
198
- override fun onAnimationEnd(anim: Animation) {
199
- listener.onAnimationEnd()
200
- }
201
- }
202
- )
203
-
204
- val animationDuration = animation.duration
205
- if (animationDuration > maxAnimationDuration) {
206
- scheduleCompletionCallback(animationDuration)
207
- maxAnimationDuration = animationDuration
208
- }
209
-
210
- view.startAnimation(animation)
211
- } else {
212
- listener.onAnimationEnd()
213
- }
214
- }
215
-
216
- /** Disables user interactions for a view and all it's subviews. */
217
- private fun disableUserInteractions(view: View) {
218
- view.isClickable = false
219
- if (view is ViewGroup) {
220
- for (i in 0 until view.childCount) {
221
- disableUserInteractions(view.getChildAt(i))
222
- }
223
- }
224
- }
225
-
226
- private fun scheduleCompletionCallback(delayMillis: Long) {
227
- if (completionRunnable != null) {
228
- val completionHandler = getUiThreadHandler()
229
- completionHandler.removeCallbacks(completionRunnable!!)
230
- completionHandler.postDelayed(completionRunnable!!, delayMillis)
231
- }
232
- }
233
-
234
- private companion object {
235
- init {
236
- assertLegacyArchitecture("LayoutAnimationController", LegacyArchitectureLogLevel.ERROR)
237
- }
82
+ LegacyArchitectureLogger.assertLegacyArchitecture(
83
+ "LayoutAnimationController",
84
+ LegacyArchitectureLogLevel.ERROR,
85
+ )
238
86
  }
239
87
  }