react-native 0.84.0-nightly-20251207-e4a5a56df → 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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +85 -4
- package/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +8 -8
|
@@ -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-
|
|
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}` : ''}`;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(84),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20251208-8347cc4b5",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -620,15 +620,89 @@ internal object TextLayoutManager {
|
|
|
620
620
|
)
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
-
|
|
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.
|
|
628
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
164
|
-
"@react-native/codegen": "0.84.0-nightly-
|
|
165
|
-
"@react-native/community-cli-plugin": "0.84.0-nightly-
|
|
166
|
-
"@react-native/gradle-plugin": "0.84.0-nightly-
|
|
167
|
-
"@react-native/js-polyfills": "0.84.0-nightly-
|
|
168
|
-
"@react-native/normalize-colors": "0.84.0-nightly-
|
|
169
|
-
"@react-native/virtualized-lists": "0.84.0-nightly-
|
|
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",
|