react-native 0.82.0-nightly-20250807-2768c8444 → 0.82.0-nightly-20250808-aaf471278

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 (62) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/Renderer/shims/ReactFabric.js +1 -3
  3. package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
  4. package/Libraries/Renderer/shims/ReactNative.js +1 -3
  5. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
  6. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
  7. package/Libraries/Utilities/HMRClient.js +0 -1
  8. package/React/Base/RCTVersion.m +1 -1
  9. package/ReactAndroid/api/ReactAndroid.api +71 -92
  10. package/ReactAndroid/build.gradle.kts +1 -0
  11. package/ReactAndroid/gradle.properties +1 -1
  12. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +15 -1
  13. package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +2 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +6 -5
  15. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt +5 -0
  16. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.kt +6 -0
  17. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +19 -0
  18. package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +4 -2
  19. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  20. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +3 -3
  21. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +4 -1
  22. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +76 -17
  23. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PixelUtil.kt +4 -4
  24. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +11 -2
  25. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.kt +5 -0
  26. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +5 -0
  27. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/BaseLayoutAnimation.kt +5 -0
  28. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +5 -0
  29. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.kt +5 -0
  30. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt +5 -0
  31. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt +5 -0
  32. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt +2 -0
  33. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt +5 -0
  34. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt +5 -0
  35. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +5 -0
  36. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/OpacityAnimation.kt +5 -0
  37. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/PositionAndSizeAnimation.kt +5 -0
  38. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/SimpleSpringInterpolator.kt +5 -0
  39. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +0 -26
  40. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainer.kt +11 -7
  41. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt +561 -0
  42. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +45 -41
  43. package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt +9 -6
  44. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.kt +18 -0
  45. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  46. package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.cpp +48 -0
  47. package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +10 -0
  48. package/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp +1 -2
  49. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.cpp +1 -0
  50. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h +1 -0
  51. package/gradle/libs.versions.toml +2 -0
  52. package/package.json +8 -8
  53. package/scripts/cocoapods/new_architecture.rb +1 -0
  54. package/scripts/cocoapods/utils.rb +2 -0
  55. package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -0
  56. package/scripts/react_native_pods.rb +1 -1
  57. package/sdks/hermesc/osx-bin/hermes +0 -0
  58. package/sdks/hermesc/osx-bin/hermesc +0 -0
  59. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  60. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +0 -811
  61. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConstants.java +0 -25
  62. package/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h +0 -38
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 82;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20250807-2768c8444';
32
+ static prerelease: string | null = 'nightly-20250808-aaf471278';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -7,9 +7,7 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow
10
- * @generated SignedSource<<16b364e89f43b8a47832b0dfb98af11e>>
11
- *
12
- * This file was sync'd from the facebook/react repository.
10
+ * @generated SignedSource<<cf323fc5ca893bab5669c7d321660412>>
13
11
  */
14
12
 
15
13
  'use strict';
@@ -7,9 +7,7 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<1dd9e9c3f20e37ae14e485fc6ee3d9e9>>
11
- *
12
- * This file was sync'd from the facebook/react repository.
10
+ * @generated SignedSource<<908f5fb85384725318e261f40e49d9a6>>
13
11
  */
14
12
 
15
13
  'use strict';
@@ -7,9 +7,7 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow
10
- * @generated SignedSource<<e2c46705ed927302dbe9332dafba459d>>
11
- *
12
- * This file was sync'd from the facebook/react repository.
10
+ * @generated SignedSource<<8f46fdc9267fcc4fdc9e76842fe24066>>
13
11
  */
14
12
  'use strict';
15
13
 
@@ -7,9 +7,7 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<e8dce0e82b831c91465d04b49fb48ab2>>
11
- *
12
- * This file was sync'd from the facebook/react repository.
10
+ * @generated SignedSource<<83073425aa3f71ced2c8c51f25a25938>>
13
11
  */
14
12
 
15
13
  'use strict';
@@ -7,9 +7,7 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict-local
10
- * @generated SignedSource<<556d1487de0b9e4a09cbc67dd130a884>>
11
- *
12
- * This file was sync'd from the facebook/react repository.
10
+ * @generated SignedSource<<52163887de05f1cff05388145cf85b3b>>
13
11
  */
14
12
 
15
13
  'use strict';
@@ -128,7 +128,6 @@ const HMRClient: HMRClientNativeInterface = {
128
128
  JSON.stringify({
129
129
  type: 'log',
130
130
  level,
131
- mode: global.RN$Bridgeless === true ? 'NOBRIDGE' : 'BRIDGE',
132
131
  data: data.map(item =>
133
132
  typeof item === 'string'
134
133
  ? item
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(82),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"nightly-20250807-2768c8444",
27
+ RCTVersionPrerelease: @"nightly-20250808-aaf471278",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -3348,8 +3348,10 @@ public final class com/facebook/react/uimanager/DisplayMetricsHolder {
3348
3348
  public static final fun getDisplayMetricsWritableMap (D)Lcom/facebook/react/bridge/WritableMap;
3349
3349
  public static final fun getScreenDisplayMetrics ()Landroid/util/DisplayMetrics;
3350
3350
  public static final fun getWindowDisplayMetrics ()Landroid/util/DisplayMetrics;
3351
- public static final fun initDisplayMetrics (Landroid/content/Context;)V
3352
- public static final fun initDisplayMetricsIfNotInitialized (Landroid/content/Context;)V
3351
+ public static final fun initScreenDisplayMetrics (Landroid/content/Context;)V
3352
+ public static final fun initScreenDisplayMetricsIfNotInitialized (Landroid/content/Context;)V
3353
+ public static final fun initWindowDisplayMetrics (Landroid/content/Context;)V
3354
+ public static final fun initWindowDisplayMetricsIfNotInitialized (Landroid/content/Context;)V
3353
3355
  public static final fun setScreenDisplayMetrics (Landroid/util/DisplayMetrics;)V
3354
3356
  public static final fun setWindowDisplayMetrics (Landroid/util/DisplayMetrics;)V
3355
3357
  }
@@ -6211,97 +6213,74 @@ public final class com/facebook/react/views/text/ReactTypefaceUtils {
6211
6213
  public static final fun parseFontWeight (Ljava/lang/String;)I
6212
6214
  }
6213
6215
 
6214
- public class com/facebook/react/views/text/TextAttributeProps {
6215
- public static final field TA_KEY_ACCESSIBILITY_ROLE S
6216
- public static final field TA_KEY_ALIGNMENT S
6217
- public static final field TA_KEY_ALLOW_FONT_SCALING S
6218
- public static final field TA_KEY_BACKGROUND_COLOR S
6219
- public static final field TA_KEY_BEST_WRITING_DIRECTION S
6220
- public static final field TA_KEY_FONT_FAMILY S
6221
- public static final field TA_KEY_FONT_SIZE S
6222
- public static final field TA_KEY_FONT_SIZE_MULTIPLIER S
6223
- public static final field TA_KEY_FONT_STYLE S
6224
- public static final field TA_KEY_FONT_VARIANT S
6225
- public static final field TA_KEY_FONT_WEIGHT S
6226
- public static final field TA_KEY_FOREGROUND_COLOR S
6227
- public static final field TA_KEY_IS_HIGHLIGHTED S
6228
- public static final field TA_KEY_LAYOUT_DIRECTION S
6229
- public static final field TA_KEY_LETTER_SPACING S
6230
- public static final field TA_KEY_LINE_BREAK_STRATEGY S
6231
- public static final field TA_KEY_LINE_HEIGHT S
6232
- public static final field TA_KEY_MAX_FONT_SIZE_MULTIPLIER S
6233
- public static final field TA_KEY_OPACITY S
6234
- public static final field TA_KEY_ROLE S
6235
- public static final field TA_KEY_TEXT_DECORATION_COLOR S
6236
- public static final field TA_KEY_TEXT_DECORATION_LINE S
6237
- public static final field TA_KEY_TEXT_DECORATION_STYLE S
6238
- public static final field TA_KEY_TEXT_SHADOW_COLOR S
6239
- public static final field TA_KEY_TEXT_SHADOW_OFFSET_DX S
6240
- public static final field TA_KEY_TEXT_SHADOW_OFFSET_DY S
6241
- public static final field TA_KEY_TEXT_SHADOW_RADIUS S
6242
- public static final field TA_KEY_TEXT_TRANSFORM S
6216
+ public final class com/facebook/react/views/text/TextAttributeProps {
6217
+ public static final field Companion Lcom/facebook/react/views/text/TextAttributeProps$Companion;
6218
+ public static final field TA_KEY_ACCESSIBILITY_ROLE I
6219
+ public static final field TA_KEY_ALIGNMENT I
6220
+ public static final field TA_KEY_ALLOW_FONT_SCALING I
6221
+ public static final field TA_KEY_BACKGROUND_COLOR I
6222
+ public static final field TA_KEY_BEST_WRITING_DIRECTION I
6223
+ public static final field TA_KEY_FONT_FAMILY I
6224
+ public static final field TA_KEY_FONT_SIZE I
6225
+ public static final field TA_KEY_FONT_SIZE_MULTIPLIER I
6226
+ public static final field TA_KEY_FONT_STYLE I
6227
+ public static final field TA_KEY_FONT_VARIANT I
6228
+ public static final field TA_KEY_FONT_WEIGHT I
6229
+ public static final field TA_KEY_FOREGROUND_COLOR I
6230
+ public static final field TA_KEY_IS_HIGHLIGHTED I
6231
+ public static final field TA_KEY_LAYOUT_DIRECTION I
6232
+ public static final field TA_KEY_LETTER_SPACING I
6233
+ public static final field TA_KEY_LINE_BREAK_STRATEGY I
6234
+ public static final field TA_KEY_LINE_HEIGHT I
6235
+ public static final field TA_KEY_MAX_FONT_SIZE_MULTIPLIER I
6236
+ public static final field TA_KEY_OPACITY I
6237
+ public static final field TA_KEY_ROLE I
6238
+ public static final field TA_KEY_TEXT_DECORATION_COLOR I
6239
+ public static final field TA_KEY_TEXT_DECORATION_LINE I
6240
+ public static final field TA_KEY_TEXT_DECORATION_STYLE I
6241
+ public static final field TA_KEY_TEXT_SHADOW_COLOR I
6242
+ public static final field TA_KEY_TEXT_SHADOW_OFFSET_DX I
6243
+ public static final field TA_KEY_TEXT_SHADOW_OFFSET_DY I
6244
+ public static final field TA_KEY_TEXT_SHADOW_RADIUS I
6245
+ public static final field TA_KEY_TEXT_TRANSFORM I
6243
6246
  public static final field UNSET I
6244
- protected field mAccessibilityRole Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
6245
- protected field mAllowFontScaling Z
6246
- protected field mBackgroundColor I
6247
- protected field mColor I
6248
- protected field mContainsImages Z
6249
- protected field mFontFamily Ljava/lang/String;
6250
- protected field mFontFeatureSettings Ljava/lang/String;
6251
- protected field mFontSize I
6252
- protected field mFontSizeInput F
6253
- protected field mFontStyle I
6254
- protected field mFontWeight I
6255
- protected field mHeightOfTallestInlineImage F
6256
- protected field mIncludeFontPadding Z
6257
- protected field mIsBackgroundColorSet Z
6258
- protected field mIsColorSet Z
6259
- protected field mIsLineThroughTextDecorationSet Z
6260
- protected field mIsUnderlineTextDecorationSet Z
6261
- protected field mLayoutDirection I
6262
- protected field mLetterSpacingInput F
6263
- protected field mLineHeight F
6264
- protected field mLineHeightInput F
6265
- protected field mMaxFontSizeMultiplier F
6266
- protected field mNumberOfLines I
6267
- protected field mOpacity F
6268
- protected field mRole Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
6269
- protected field mTextAlign I
6270
- protected field mTextShadowColor I
6271
- protected field mTextShadowOffsetDx F
6272
- protected field mTextShadowOffsetDy F
6273
- protected field mTextShadowRadius F
6274
- protected field mTextTransform Lcom/facebook/react/views/text/TextTransform;
6275
- public static fun fromMapBuffer (Lcom/facebook/react/common/mapbuffer/MapBuffer;)Lcom/facebook/react/views/text/TextAttributeProps;
6276
- public static fun fromReadableMap (Lcom/facebook/react/uimanager/ReactStylesDiffMap;)Lcom/facebook/react/views/text/TextAttributeProps;
6277
- public fun getAccessibilityRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
6278
- public fun getBackgroundColor ()I
6279
- public fun getColor ()I
6280
- public fun getEffectiveFontSize ()I
6281
- public fun getEffectiveLetterSpacing ()F
6282
- public fun getEffectiveLineHeight ()F
6283
- public static fun getEllipsizeMode (Ljava/lang/String;)Landroid/text/TextUtils$TruncateAt;
6284
- public fun getFontFamily ()Ljava/lang/String;
6285
- public fun getFontFeatureSettings ()Ljava/lang/String;
6286
- public fun getFontStyle ()I
6287
- public fun getFontWeight ()I
6288
- public static fun getHyphenationFrequency (Ljava/lang/String;)I
6289
- public static fun getJustificationMode (Lcom/facebook/react/uimanager/ReactStylesDiffMap;I)I
6290
- public static fun getLayoutDirection (Ljava/lang/String;)I
6291
- public fun getLetterSpacing ()F
6292
- public fun getOpacity ()F
6293
- public fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
6294
- public static fun getTextAlignment (Lcom/facebook/react/uimanager/ReactStylesDiffMap;ZI)I
6295
- public static fun getTextBreakStrategy (Ljava/lang/String;)I
6296
- public fun getTextShadowColor ()I
6297
- public fun getTextShadowOffsetDx ()F
6298
- public fun getTextShadowOffsetDy ()F
6299
- public fun getTextShadowRadius ()F
6300
- public fun getTextTransform ()Lcom/facebook/react/views/text/TextTransform;
6301
- public fun isBackgroundColorSet ()Z
6302
- public fun isColorSet ()Z
6303
- public fun isLineThroughTextDecorationSet ()Z
6304
- public fun isUnderlineTextDecorationSet ()Z
6247
+ public final fun getAccessibilityRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
6248
+ public final fun getAllowFontScaling ()Z
6249
+ public final fun getBackgroundColor ()Ljava/lang/Integer;
6250
+ public final fun getColor ()Ljava/lang/Integer;
6251
+ public final fun getEffectiveLetterSpacing ()F
6252
+ public final fun getEffectiveLineHeight ()F
6253
+ public final fun getFontFamily ()Ljava/lang/String;
6254
+ public final fun getFontFeatureSettings ()Ljava/lang/String;
6255
+ public final fun getFontSize ()I
6256
+ public final fun getFontStyle ()I
6257
+ public final fun getFontWeight ()I
6258
+ public final fun getLayoutDirection ()I
6259
+ public final fun getLetterSpacing ()F
6260
+ public final fun getLineHeight ()F
6261
+ public final fun getMaxFontSizeMultiplier ()F
6262
+ public final fun getNumberOfLines ()I
6263
+ public final fun getOpacity ()F
6264
+ public final fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
6265
+ public final fun getTextShadowColor ()I
6266
+ public final fun getTextShadowOffsetDx ()F
6267
+ public final fun getTextShadowOffsetDy ()F
6268
+ public final fun getTextShadowRadius ()F
6269
+ public final fun isBackgroundColorSet ()Z
6270
+ public final fun isColorSet ()Z
6271
+ public final fun isLineThroughTextDecorationSet ()Z
6272
+ public final fun isUnderlineTextDecorationSet ()Z
6273
+ }
6274
+
6275
+ public final class com/facebook/react/views/text/TextAttributeProps$Companion {
6276
+ public final fun fromMapBuffer (Lcom/facebook/react/common/mapbuffer/MapBuffer;)Lcom/facebook/react/views/text/TextAttributeProps;
6277
+ public final fun fromReadableMap (Lcom/facebook/react/uimanager/ReactStylesDiffMap;)Lcom/facebook/react/views/text/TextAttributeProps;
6278
+ public final fun getEllipsizeMode (Ljava/lang/String;)Landroid/text/TextUtils$TruncateAt;
6279
+ public final fun getHyphenationFrequency (Ljava/lang/String;)I
6280
+ public final fun getJustificationMode (Lcom/facebook/react/uimanager/ReactStylesDiffMap;I)I
6281
+ public final fun getLayoutDirection (Ljava/lang/String;)I
6282
+ public final fun getTextAlignment (Lcom/facebook/react/uimanager/ReactStylesDiffMap;ZI)I
6283
+ public final fun getTextBreakStrategy (Ljava/lang/String;)I
6305
6284
  }
6306
6285
 
6307
6286
  public final class com/facebook/react/views/text/TextAttributes {
@@ -630,6 +630,7 @@ dependencies {
630
630
  api(libs.androidx.autofill)
631
631
  api(libs.androidx.swiperefreshlayout)
632
632
  api(libs.androidx.tracing)
633
+ api(libs.androidx.window)
633
634
 
634
635
  api(libs.fbjni)
635
636
  api(libs.fresco)
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.82.0-nightly-20250807-2768c8444
1
+ VERSION_NAME=0.82.0-nightly-20250808-aaf471278
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -229,6 +229,9 @@ public class ReactInstanceManager {
229
229
  return new ReactInstanceManagerBuilder();
230
230
  }
231
231
 
232
+ /**
233
+ * @noinspection deprecation
234
+ */
232
235
  /* package */ ReactInstanceManager(
233
236
  Context applicationContext,
234
237
  @Nullable Activity currentActivity,
@@ -259,7 +262,11 @@ public class ReactInstanceManager {
259
262
  FLog.d(TAG, "ReactInstanceManager.ctor()");
260
263
  initializeSoLoaderIfNecessary(applicationContext);
261
264
 
262
- DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);
265
+ DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(applicationContext);
266
+
267
+ if (currentActivity != null) {
268
+ DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(currentActivity);
269
+ }
263
270
 
264
271
  // See {@code ReactInstanceManagerBuilder} for description of all flags here.
265
272
  mApplicationContext = applicationContext;
@@ -924,6 +931,13 @@ public class ReactInstanceManager {
924
931
 
925
932
  ReactContext currentReactContext = getCurrentReactContext();
926
933
  if (currentReactContext != null) {
934
+ DisplayMetricsHolder.initScreenDisplayMetrics(currentReactContext);
935
+ Activity currentActivity = currentReactContext.getCurrentActivity();
936
+
937
+ if (currentActivity != null) {
938
+ DisplayMetricsHolder.initWindowDisplayMetrics(currentActivity);
939
+ }
940
+
927
941
  AppearanceModule appearanceModule =
928
942
  currentReactContext.getNativeModule(AppearanceModule.class);
929
943
 
@@ -35,7 +35,8 @@ import java.util.List;
35
35
  *
36
36
  * @deprecated This class will be replaced by com.facebook.react.ReactHost in the New Architecture.
37
37
  */
38
- @Deprecated
38
+ @Deprecated(
39
+ since = "This class is part of Legacy Architecture and will be removed in a future release")
39
40
  @LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
40
41
  @Nullsafe(Nullsafe.Mode.LOCAL)
41
42
  public abstract class ReactNativeHost {
@@ -136,9 +136,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
136
136
  setRootViewTag(ReactRootViewTagGenerator.getNextRootViewTag());
137
137
  setClipChildren(false);
138
138
 
139
- if (ReactNativeFeatureFlags.enableFontScaleChangesUpdatingLayout()) {
140
- DisplayMetricsHolder.initDisplayMetrics(getContext().getApplicationContext());
141
- }
139
+ DisplayMetricsHolder.initScreenDisplayMetrics(getContext());
140
+ DisplayMetricsHolder.initWindowDisplayMetrics(getContext());
142
141
  }
143
142
 
144
143
  @Override
@@ -883,7 +882,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
883
882
  private int mDeviceRotation = 0;
884
883
 
885
884
  /* package */ CustomGlobalLayoutListener() {
886
- DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(getContext().getApplicationContext());
885
+ DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(getContext());
886
+ DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(getContext());
887
887
  mVisibleViewArea = new Rect();
888
888
  mMinKeyboardHeightDetected = (int) PixelUtil.toPixelFromDIP(60);
889
889
  }
@@ -1006,7 +1006,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
1006
1006
  return;
1007
1007
  }
1008
1008
  mDeviceRotation = rotation;
1009
- DisplayMetricsHolder.initDisplayMetrics(getContext().getApplicationContext());
1009
+ DisplayMetricsHolder.initScreenDisplayMetrics(getContext());
1010
+ DisplayMetricsHolder.initWindowDisplayMetrics(getContext());
1010
1011
  emitOrientationChanged(rotation);
1011
1012
  }
1012
1013
 
@@ -25,6 +25,11 @@ import com.facebook.react.packagerconnection.RequestHandler
25
25
  */
26
26
  internal class DefaultDevSupportManagerFactory : DevSupportManagerFactory {
27
27
 
28
+ @Deprecated(
29
+ "Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
30
+ replaceWith =
31
+ ReplaceWith(
32
+ "create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
28
33
  override fun create(
29
34
  applicationContext: Context,
30
35
  reactInstanceManagerHelper: ReactInstanceDevHelper,
@@ -22,6 +22,12 @@ public interface DevSupportManagerFactory {
22
22
  * Factory used by the Old Architecture flow to create a [DevSupportManager] and a
23
23
  * [BridgeDevSupportManager]
24
24
  */
25
+ @Deprecated(
26
+ message =
27
+ "Use the other create() method with useDevSupport parameter for New Architecture. This method will be removed in a future release.",
28
+ replaceWith =
29
+ ReplaceWith(
30
+ "create(applicationContext, reactInstanceManagerHelper, packagerPathForJSBundleName, enableOnCreate, redBoxHandler, devBundleDownloadListener, minNumShakes, customPackagerCommandHandlers, surfaceDelegateFactory, devLoadingViewManager, pausedInDebuggerOverlayManager)"))
25
31
  public fun create(
26
32
  applicationContext: Context,
27
33
  reactInstanceManagerHelper: ReactInstanceDevHelper,
@@ -70,6 +70,7 @@ import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatur
70
70
  import com.facebook.react.internal.interop.InteropEventEmitter;
71
71
  import com.facebook.react.modules.core.ReactChoreographer;
72
72
  import com.facebook.react.modules.i18nmanager.I18nUtil;
73
+ import com.facebook.react.uimanager.DisplayMetricsHolder;
73
74
  import com.facebook.react.uimanager.GuardedFrameCallback;
74
75
  import com.facebook.react.uimanager.IllegalViewOperationException;
75
76
  import com.facebook.react.uimanager.PixelUtil;
@@ -97,6 +98,7 @@ import java.util.HashMap;
97
98
  import java.util.HashSet;
98
99
  import java.util.List;
99
100
  import java.util.Map;
101
+ import java.util.Objects;
100
102
  import java.util.Queue;
101
103
  import java.util.Set;
102
104
  import java.util.concurrent.CopyOnWriteArrayList;
@@ -725,6 +727,23 @@ public class FabricUIManager
725
727
  return true;
726
728
  }
727
729
 
730
+ /**
731
+ * This method is used to get the encoded screen size without vertical insets for a given surface.
732
+ * It's used by the Modal component to determine the size of the screen without vertical insets.
733
+ * The method is private as it's accessed via JNI from C++.
734
+ *
735
+ * @param surfaceId The surface ID of the surface for which the Modal is going to render.
736
+ * @return The encoded screen size as a long (both width and height) are represented without
737
+ * vertical insets.
738
+ */
739
+ private long getEncodedScreenSizeWithoutVerticalInsets(int surfaceId) {
740
+ SurfaceMountingManager surfaceMountingManager = mMountingManager.getSurfaceManager(surfaceId);
741
+ Objects.requireNonNull(surfaceMountingManager);
742
+ ThemedReactContext context = Objects.requireNonNull(surfaceMountingManager.getContext());
743
+ return DisplayMetricsHolder.getEncodedScreenSizeWithoutVerticalInsets(
744
+ context.getCurrentActivity());
745
+ }
746
+
728
747
  @Override
729
748
  public void addUIManagerEventListener(UIManagerListener listener) {
730
749
  mListeners.add(listener);
@@ -15,7 +15,8 @@ import com.facebook.react.bridge.ReactSoftExceptionLogger
15
15
  import com.facebook.react.bridge.ReadableMap
16
16
  import com.facebook.react.module.annotations.ReactModule
17
17
  import com.facebook.react.uimanager.DisplayMetricsHolder.getDisplayMetricsWritableMap
18
- import com.facebook.react.uimanager.DisplayMetricsHolder.initDisplayMetricsIfNotInitialized
18
+ import com.facebook.react.uimanager.DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized
19
+ import com.facebook.react.uimanager.DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized
19
20
  import com.facebook.react.views.view.isEdgeToEdgeFeatureFlagOn
20
21
 
21
22
  /** Module that exposes Android Constants to JS. */
@@ -26,7 +27,8 @@ internal class DeviceInfoModule(reactContext: ReactApplicationContext) :
26
27
  private var previousDisplayMetrics: ReadableMap? = null
27
28
 
28
29
  init {
29
- initDisplayMetricsIfNotInitialized(reactContext)
30
+ initScreenDisplayMetricsIfNotInitialized(reactContext)
31
+ reactContext.currentActivity?.let { initWindowDisplayMetricsIfNotInitialized(it) }
30
32
  reactContext.addLifecycleEventListener(this)
31
33
  }
32
34
 
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 82,
17
17
  "patch" to 0,
18
- "prerelease" to "nightly-20250807-2768c8444"
18
+ "prerelease" to "nightly-20250808-aaf471278"
19
19
  )
20
20
  }
@@ -625,9 +625,8 @@ public class ReactHostImpl(
625
625
  override fun onConfigurationChanged(context: Context) {
626
626
  val currentReactContext = this.currentReactContext
627
627
  if (currentReactContext != null) {
628
- if (ReactNativeFeatureFlags.enableFontScaleChangesUpdatingLayout()) {
629
- DisplayMetricsHolder.initDisplayMetrics(currentReactContext)
630
- }
628
+ DisplayMetricsHolder.initScreenDisplayMetrics(currentReactContext)
629
+ currentReactContext.currentActivity?.let { DisplayMetricsHolder.initWindowDisplayMetrics(it) }
631
630
 
632
631
  val appearanceModule = currentReactContext.getNativeModule(AppearanceModule::class.java)
633
632
  appearanceModule?.onConfigurationChanged(context)
@@ -918,6 +917,7 @@ public class ReactHostImpl(
918
917
  val instance =
919
918
  ReactInstance(
920
919
  reactContext,
920
+ currentActivity,
921
921
  reactHostDelegate,
922
922
  componentFactory,
923
923
  devSupportManager,
@@ -7,6 +7,7 @@
7
7
 
8
8
  package com.facebook.react.runtime
9
9
 
10
+ import android.app.Activity
10
11
  import android.content.res.AssetManager
11
12
  import android.view.View
12
13
  import com.facebook.common.logging.FLog
@@ -88,6 +89,7 @@ import kotlin.jvm.JvmStatic
88
89
  @UnstableReactNativeAPI
89
90
  internal class ReactInstance(
90
91
  private val context: BridgelessReactContext,
92
+ private val activity: Activity?,
91
93
  delegate: ReactHostDelegate,
92
94
  componentFactory: ComponentFactory,
93
95
  devSupportManager: DevSupportManager,
@@ -240,7 +242,8 @@ internal class ReactInstance(
240
242
  FabricUIManager(context, ViewManagerRegistry(viewManagerResolver), eventBeatManager)
241
243
 
242
244
  // Misc initialization that needs to be done before Fabric init
243
- DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(context)
245
+ DisplayMetricsHolder.initScreenDisplayMetricsIfNotInitialized(context)
246
+ activity?.let { DisplayMetricsHolder.initWindowDisplayMetricsIfNotInitialized(it) }
244
247
 
245
248
  val binding = FabricUIManagerBinding()
246
249
  binding.register(