react-native 0.84.0-nightly-20251206-63b0aef13 → 0.84.0-nightly-20251208-8347cc4b5

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.
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 84;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20251206-63b0aef13';
32
+ static prerelease: string | null = 'nightly-20251208-8347cc4b5';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(84),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"nightly-20251206-63b0aef13",
27
+ RCTVersionPrerelease: @"nightly-20251208-8347cc4b5",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.84.0-nightly-20251206-63b0aef13
1
+ VERSION_NAME=0.84.0-nightly-20251208-8347cc4b5
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
  react.internal.hermesPublishingGroup=com.facebook.hermes
4
4
 
@@ -92,17 +92,21 @@ internal class FrameTimingsObserver(
92
92
  if (copyResult == PixelCopy.SUCCESS) {
93
93
  CoroutineScope(Dispatchers.Default).launch {
94
94
  try {
95
- val scaleFactor = 0.5f
95
+ val scaleFactor = 0.25f
96
96
  val scaledWidth = (width * scaleFactor).toInt()
97
97
  val scaledHeight = (height * scaleFactor).toInt()
98
98
  val scaledBitmap =
99
99
  Bitmap.createScaledBitmap(bitmap, scaledWidth, scaledHeight, true)
100
100
 
101
101
  val outputStream = ByteArrayOutputStream()
102
- scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 80, outputStream)
103
- val jpegBytes = outputStream.toByteArray()
104
- val jpegBase64 = Base64.encodeToString(jpegBytes, Base64.NO_WRAP)
105
- continuation.resume(jpegBase64)
102
+ val compressFormat =
103
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
104
+ Bitmap.CompressFormat.WEBP_LOSSY
105
+ else Bitmap.CompressFormat.WEBP
106
+ scaledBitmap.compress(compressFormat, 0, outputStream)
107
+ val bytes = outputStream.toByteArray()
108
+ val base64 = Base64.encodeToString(bytes, Base64.NO_WRAP)
109
+ continuation.resume(base64)
106
110
 
107
111
  scaledBitmap.recycle()
108
112
  } catch (e: Exception) {
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 84,
17
17
  "patch" to 0,
18
- "prerelease" to "nightly-20251206-63b0aef13"
18
+ "prerelease" to "nightly-20251208-8347cc4b5"
19
19
  )
20
20
  }
@@ -620,15 +620,89 @@ internal object TextLayoutManager {
620
620
  )
621
621
  }
622
622
 
623
- val desiredWidth = ceil(Layout.getDesiredWidth(text, paint)).toInt()
623
+ // Pre-Android 15: Use existing advance-based logic
624
+ if (
625
+ Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM ||
626
+ !ReactNativeFeatureFlags.fixTextClippingAndroid15useBoundsForWidth()
627
+ ) {
628
+ val desiredWidth = ceil(Layout.getDesiredWidth(text, paint)).toInt()
629
+
630
+ val layoutWidth =
631
+ when (widthYogaMeasureMode) {
632
+ YogaMeasureMode.EXACTLY -> floor(width).toInt()
633
+ YogaMeasureMode.AT_MOST -> min(desiredWidth, floor(width).toInt())
634
+ else -> desiredWidth
635
+ }
636
+ return buildLayout(
637
+ text,
638
+ layoutWidth,
639
+ includeFontPadding,
640
+ textBreakStrategy,
641
+ hyphenationFrequency,
642
+ alignment,
643
+ justificationMode,
644
+ ellipsizeMode,
645
+ maxNumberOfLines,
646
+ paint,
647
+ )
648
+ }
649
+
650
+ // Android 15+: Need to account for visual bounds
651
+ // Step 1: Create unconstrained layout to get visual bounds width
652
+ val unconstrainedLayout =
653
+ buildLayout(
654
+ text,
655
+ Int.MAX_VALUE / 2,
656
+ includeFontPadding,
657
+ textBreakStrategy,
658
+ hyphenationFrequency,
659
+ alignment,
660
+ justificationMode,
661
+ null,
662
+ ReactConstants.UNSET,
663
+ paint,
664
+ )
665
+
666
+ // Calculate visual bounds width from unconstrained layout
667
+ var desiredVisualWidth = 0f
668
+ for (i in 0 until unconstrainedLayout.lineCount) {
669
+ val lineWidth = unconstrainedLayout.getLineRight(i) - unconstrainedLayout.getLineLeft(i)
670
+ desiredVisualWidth = max(desiredVisualWidth, lineWidth)
671
+ }
624
672
 
625
673
  val layoutWidth =
626
674
  when (widthYogaMeasureMode) {
627
- YogaMeasureMode.EXACTLY -> floor(width).toInt()
628
- YogaMeasureMode.AT_MOST -> min(desiredWidth, floor(width).toInt())
629
- else -> desiredWidth
675
+ YogaMeasureMode.AT_MOST -> min(ceil(desiredVisualWidth).toInt(), floor(width).toInt())
676
+ else -> ceil(desiredVisualWidth).toInt()
630
677
  }
631
678
 
679
+ // Step 2: Create final layout with correct width
680
+ return buildLayout(
681
+ text,
682
+ layoutWidth,
683
+ includeFontPadding,
684
+ textBreakStrategy,
685
+ hyphenationFrequency,
686
+ alignment,
687
+ justificationMode,
688
+ ellipsizeMode,
689
+ maxNumberOfLines,
690
+ paint,
691
+ )
692
+ }
693
+
694
+ private fun buildLayout(
695
+ text: Spannable,
696
+ layoutWidth: Int,
697
+ includeFontPadding: Boolean,
698
+ textBreakStrategy: Int,
699
+ hyphenationFrequency: Int,
700
+ alignment: Layout.Alignment,
701
+ justificationMode: Int,
702
+ ellipsizeMode: TextUtils.TruncateAt?,
703
+ maxNumberOfLines: Int,
704
+ paint: TextPaint,
705
+ ): Layout {
632
706
  val builder =
633
707
  StaticLayout.Builder.obtain(text, 0, text.length, paint, layoutWidth)
634
708
  .setAlignment(alignment)
@@ -649,6 +723,13 @@ internal object TextLayoutManager {
649
723
  builder.setUseLineSpacingFromFallbacks(true)
650
724
  }
651
725
 
726
+ if (
727
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM &&
728
+ ReactNativeFeatureFlags.fixTextClippingAndroid15useBoundsForWidth()
729
+ ) {
730
+ builder.setUseBoundsForWidth(true)
731
+ }
732
+
652
733
  return builder.build()
653
734
  }
654
735
 
@@ -9,6 +9,7 @@
9
9
  <string name="header_description" gender="unknown">शीर्षक</string>
10
10
  <string name="combobox_description" gender="unknown">कम्बो बक्स</string>
11
11
  <string name="menu_description" gender="unknown">मेनु</string>
12
+ <string name="menubar_description" gender="unknown">मेनु बार</string>
12
13
  <string name="menuitem_description" gender="unknown">मेनु वस्तु</string>
13
14
  <string name="scrollbar_description" gender="unknown">स्क्रोल बार</string>
14
15
  <string name="rn_tab_description" gender="unknown">टयाब</string>
@@ -22,7 +22,7 @@ constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 84;
24
24
  int32_t Patch = 0;
25
- std::string_view Prerelease = "nightly-20251206-63b0aef13";
25
+ std::string_view Prerelease = "nightly-20251208-8347cc4b5";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.84.0-nightly-20251206-63b0aef13",
3
+ "version": "0.84.0-nightly-20251208-8347cc4b5",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -160,13 +160,13 @@
160
160
  },
161
161
  "dependencies": {
162
162
  "@jest/create-cache-key-function": "^29.7.0",
163
- "@react-native/assets-registry": "0.84.0-nightly-20251206-63b0aef13",
164
- "@react-native/codegen": "0.84.0-nightly-20251206-63b0aef13",
165
- "@react-native/community-cli-plugin": "0.84.0-nightly-20251206-63b0aef13",
166
- "@react-native/gradle-plugin": "0.84.0-nightly-20251206-63b0aef13",
167
- "@react-native/js-polyfills": "0.84.0-nightly-20251206-63b0aef13",
168
- "@react-native/normalize-colors": "0.84.0-nightly-20251206-63b0aef13",
169
- "@react-native/virtualized-lists": "0.84.0-nightly-20251206-63b0aef13",
163
+ "@react-native/assets-registry": "0.84.0-nightly-20251208-8347cc4b5",
164
+ "@react-native/codegen": "0.84.0-nightly-20251208-8347cc4b5",
165
+ "@react-native/community-cli-plugin": "0.84.0-nightly-20251208-8347cc4b5",
166
+ "@react-native/gradle-plugin": "0.84.0-nightly-20251208-8347cc4b5",
167
+ "@react-native/js-polyfills": "0.84.0-nightly-20251208-8347cc4b5",
168
+ "@react-native/normalize-colors": "0.84.0-nightly-20251208-8347cc4b5",
169
+ "@react-native/virtualized-lists": "0.84.0-nightly-20251208-8347cc4b5",
170
170
  "abort-controller": "^3.0.0",
171
171
  "anser": "^1.4.9",
172
172
  "ansi-regex": "^5.0.0",