react-native 0.75.0-rc.7 → 0.75.1
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 +2 -2
- package/React/Base/RCTVersion.m +2 -2
- package/ReactAndroid/api/ReactAndroid.api +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LengthPercentage.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.java +40 -11
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +11 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/cli.js +3 -3
- package/package.json +8 -8
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
package/React/Base/RCTVersion.m
CHANGED
|
@@ -23,8 +23,8 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
23
23
|
__rnVersion = @{
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(75),
|
|
26
|
-
RCTVersionPatch: @(
|
|
27
|
-
RCTVersionPrerelease:
|
|
26
|
+
RCTVersionPatch: @(1),
|
|
27
|
+
RCTVersionPrerelease: [NSNull null],
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -4219,6 +4219,7 @@ public final class com/facebook/react/uimanager/LengthPercentage {
|
|
|
4219
4219
|
public static final field Companion Lcom/facebook/react/uimanager/LengthPercentage$Companion;
|
|
4220
4220
|
public fun <init> ()V
|
|
4221
4221
|
public fun <init> (FLcom/facebook/react/uimanager/LengthPercentageType;)V
|
|
4222
|
+
public final fun getUnit ()Lcom/facebook/react/uimanager/LengthPercentageType;
|
|
4222
4223
|
public final fun resolve (FF)F
|
|
4223
4224
|
public static final fun setFromDynamic (Lcom/facebook/react/bridge/Dynamic;)Lcom/facebook/react/uimanager/LengthPercentage;
|
|
4224
4225
|
}
|
|
@@ -5022,6 +5023,7 @@ public class com/facebook/react/uimanager/TransformHelper {
|
|
|
5022
5023
|
public fun <init> ()V
|
|
5023
5024
|
public static fun processTransform (Lcom/facebook/react/bridge/ReadableArray;[D)V
|
|
5024
5025
|
public static fun processTransform (Lcom/facebook/react/bridge/ReadableArray;[DFFLcom/facebook/react/bridge/ReadableArray;)V
|
|
5026
|
+
public static fun processTransform (Lcom/facebook/react/bridge/ReadableArray;[DFFLcom/facebook/react/bridge/ReadableArray;Z)V
|
|
5025
5027
|
}
|
|
5026
5028
|
|
|
5027
5029
|
public abstract interface class com/facebook/react/uimanager/UIBlock {
|
|
@@ -29,6 +29,8 @@ import com.facebook.react.common.MapBuilder;
|
|
|
29
29
|
import com.facebook.react.common.ReactConstants;
|
|
30
30
|
import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole;
|
|
31
31
|
import com.facebook.react.uimanager.ReactAccessibilityDelegate.Role;
|
|
32
|
+
import com.facebook.react.uimanager.common.UIManagerType;
|
|
33
|
+
import com.facebook.react.uimanager.common.ViewUtil;
|
|
32
34
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
33
35
|
import com.facebook.react.uimanager.events.PointerEventHelper;
|
|
34
36
|
import com.facebook.react.uimanager.util.ReactFindViewUtil;
|
|
@@ -535,13 +537,16 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
535
537
|
return;
|
|
536
538
|
}
|
|
537
539
|
|
|
540
|
+
boolean allowPercentageResolution = ViewUtil.getUIManagerType(view) == UIManagerType.FABRIC;
|
|
541
|
+
|
|
538
542
|
sMatrixDecompositionContext.reset();
|
|
539
543
|
TransformHelper.processTransform(
|
|
540
544
|
transforms,
|
|
541
545
|
sTransformDecompositionArray,
|
|
542
546
|
PixelUtil.toDIPFromPixel(view.getWidth()),
|
|
543
547
|
PixelUtil.toDIPFromPixel(view.getHeight()),
|
|
544
|
-
transformOrigin
|
|
548
|
+
transformOrigin,
|
|
549
|
+
allowPercentageResolution);
|
|
545
550
|
MatrixMathHelper.decomposeMatrix(sTransformDecompositionArray, sMatrixDecompositionContext);
|
|
546
551
|
view.setTranslationX(
|
|
547
552
|
PixelUtil.toPixelFromDIP(
|
|
@@ -45,19 +45,41 @@ public class TransformHelper {
|
|
|
45
45
|
return inRadians ? value : MatrixMathHelper.degreesToRadians(value);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use {@link #processTransform(ReadableArray, double[], float, float, ReadableArray,
|
|
50
|
+
* boolean)} instead.
|
|
51
|
+
*/
|
|
52
|
+
@Deprecated(forRemoval = true, since = "0.75")
|
|
48
53
|
public static void processTransform(ReadableArray transforms, double[] result) {
|
|
49
|
-
processTransform(transforms, result, 0, 0, null);
|
|
54
|
+
processTransform(transforms, result, 0, 0, null, false);
|
|
50
55
|
}
|
|
51
56
|
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use {@link #processTransform(ReadableArray, double[], float, float, ReadableArray,
|
|
59
|
+
* boolean)} instead.
|
|
60
|
+
*/
|
|
61
|
+
@Deprecated(forRemoval = true, since = "0.75")
|
|
52
62
|
public static void processTransform(
|
|
53
63
|
ReadableArray transforms,
|
|
54
64
|
double[] result,
|
|
55
65
|
float viewWidth,
|
|
56
66
|
float viewHeight,
|
|
57
67
|
ReadableArray transformOrigin) {
|
|
68
|
+
processTransform(transforms, result, viewWidth, viewHeight, transformOrigin, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public static void processTransform(
|
|
72
|
+
ReadableArray transforms,
|
|
73
|
+
double[] result,
|
|
74
|
+
float viewWidth,
|
|
75
|
+
float viewHeight,
|
|
76
|
+
ReadableArray transformOrigin,
|
|
77
|
+
boolean allowPercentageResolution) {
|
|
58
78
|
double[] helperMatrix = sHelperMatrix.get();
|
|
59
79
|
MatrixMathHelper.resetIdentityMatrix(result);
|
|
60
|
-
float[] offsets =
|
|
80
|
+
float[] offsets =
|
|
81
|
+
getTranslateForTransformOrigin(
|
|
82
|
+
viewWidth, viewHeight, transformOrigin, allowPercentageResolution);
|
|
61
83
|
|
|
62
84
|
if (offsets != null) {
|
|
63
85
|
MatrixMathHelper.resetIdentityMatrix(helperMatrix);
|
|
@@ -104,13 +126,13 @@ public class TransformHelper {
|
|
|
104
126
|
} else if ("translate".equals(transformType)) {
|
|
105
127
|
ReadableArray value = transform.getArray(transformType);
|
|
106
128
|
double x = 0;
|
|
107
|
-
if (value.getType(0) == ReadableType.String) {
|
|
129
|
+
if (value.getType(0) == ReadableType.String && allowPercentageResolution) {
|
|
108
130
|
x = parseTranslateValue(value.getString(0), viewWidth);
|
|
109
131
|
} else {
|
|
110
132
|
x = value.getDouble(0);
|
|
111
133
|
}
|
|
112
134
|
double y = 0;
|
|
113
|
-
if (value.getType(1) == ReadableType.String) {
|
|
135
|
+
if (value.getType(1) == ReadableType.String && allowPercentageResolution) {
|
|
114
136
|
y = parseTranslateValue(value.getString(1), viewHeight);
|
|
115
137
|
} else {
|
|
116
138
|
y = value.getDouble(1);
|
|
@@ -119,7 +141,8 @@ public class TransformHelper {
|
|
|
119
141
|
MatrixMathHelper.applyTranslate3D(helperMatrix, x, y, z);
|
|
120
142
|
} else if ("translateX".equals(transformType)) {
|
|
121
143
|
double translateValue = 0;
|
|
122
|
-
if (transform.getType(transformType) == ReadableType.String
|
|
144
|
+
if (transform.getType(transformType) == ReadableType.String
|
|
145
|
+
&& allowPercentageResolution) {
|
|
123
146
|
translateValue = parseTranslateValue(transform.getString(transformType), viewWidth);
|
|
124
147
|
} else {
|
|
125
148
|
translateValue = transform.getDouble(transformType);
|
|
@@ -127,7 +150,8 @@ public class TransformHelper {
|
|
|
127
150
|
MatrixMathHelper.applyTranslate2D(helperMatrix, translateValue, 0d);
|
|
128
151
|
} else if ("translateY".equals(transformType)) {
|
|
129
152
|
double translateValue = 0;
|
|
130
|
-
if (transform.getType(transformType) == ReadableType.String
|
|
153
|
+
if (transform.getType(transformType) == ReadableType.String
|
|
154
|
+
&& allowPercentageResolution) {
|
|
131
155
|
translateValue = parseTranslateValue(transform.getString(transformType), viewHeight);
|
|
132
156
|
} else {
|
|
133
157
|
translateValue = transform.getDouble(transformType);
|
|
@@ -167,7 +191,10 @@ public class TransformHelper {
|
|
|
167
191
|
}
|
|
168
192
|
|
|
169
193
|
private static float[] getTranslateForTransformOrigin(
|
|
170
|
-
float viewWidth,
|
|
194
|
+
float viewWidth,
|
|
195
|
+
float viewHeight,
|
|
196
|
+
ReadableArray transformOrigin,
|
|
197
|
+
boolean allowPercentageResolution) {
|
|
171
198
|
if (transformOrigin == null || (viewHeight == 0 && viewWidth == 0)) {
|
|
172
199
|
return null;
|
|
173
200
|
}
|
|
@@ -183,10 +210,12 @@ public class TransformHelper {
|
|
|
183
210
|
break;
|
|
184
211
|
case String:
|
|
185
212
|
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
213
|
+
if (allowPercentageResolution) {
|
|
214
|
+
String part = transformOrigin.getString(i);
|
|
215
|
+
if (part.endsWith("%")) {
|
|
216
|
+
float val = Float.parseFloat(part.substring(0, part.length() - 1));
|
|
217
|
+
origin[i] = (i == 0 ? viewWidth : viewHeight) * val / 100.0f;
|
|
218
|
+
}
|
|
190
219
|
}
|
|
191
220
|
break;
|
|
192
221
|
}
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.uimanager.common
|
|
9
9
|
|
|
10
|
+
import android.view.View
|
|
11
|
+
|
|
10
12
|
public object ViewUtil {
|
|
11
13
|
|
|
12
14
|
public const val NO_SURFACE_ID: Int = -1
|
|
@@ -26,6 +28,12 @@ public object ViewUtil {
|
|
|
26
28
|
UIManagerType.DEFAULT
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Overload for {@link #getUIManagerType(int)} that uses the view's id to determine if it
|
|
33
|
+
* originated from Fabric
|
|
34
|
+
*/
|
|
35
|
+
@JvmStatic @UIManagerType public fun getUIManagerType(view: View): Int = getUIManagerType(view.id)
|
|
36
|
+
|
|
29
37
|
/**
|
|
30
38
|
* Version of getUIManagerType that uses both surfaceId and viewTag heuristics
|
|
31
39
|
*
|
|
@@ -23,6 +23,7 @@ import com.facebook.react.common.ReactConstants;
|
|
|
23
23
|
import com.facebook.react.common.annotations.VisibleForTesting;
|
|
24
24
|
import com.facebook.react.module.annotations.ReactModule;
|
|
25
25
|
import com.facebook.react.uimanager.LengthPercentage;
|
|
26
|
+
import com.facebook.react.uimanager.LengthPercentageType;
|
|
26
27
|
import com.facebook.react.uimanager.PixelUtil;
|
|
27
28
|
import com.facebook.react.uimanager.PointerEvents;
|
|
28
29
|
import com.facebook.react.uimanager.Spacing;
|
|
@@ -31,6 +32,8 @@ import com.facebook.react.uimanager.UIManagerHelper;
|
|
|
31
32
|
import com.facebook.react.uimanager.ViewProps;
|
|
32
33
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
33
34
|
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
|
35
|
+
import com.facebook.react.uimanager.common.UIManagerType;
|
|
36
|
+
import com.facebook.react.uimanager.common.ViewUtil;
|
|
34
37
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
35
38
|
import com.facebook.react.uimanager.style.BorderRadiusProp;
|
|
36
39
|
import com.facebook.yoga.YogaConstants;
|
|
@@ -131,9 +134,16 @@ public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup> {
|
|
|
131
134
|
ViewProps.BORDER_START_START_RADIUS,
|
|
132
135
|
})
|
|
133
136
|
public void setBorderRadius(ReactViewGroup view, int index, Dynamic rawBorderRadius) {
|
|
134
|
-
|
|
135
137
|
@Nullable LengthPercentage borderRadius = LengthPercentage.setFromDynamic(rawBorderRadius);
|
|
136
138
|
|
|
139
|
+
// We do not support percentage border radii on Paper in order to be consistent with iOS (to
|
|
140
|
+
// avoid developer surprise if it works on one platform but not another).
|
|
141
|
+
if (ViewUtil.getUIManagerType(view) != UIManagerType.FABRIC
|
|
142
|
+
&& borderRadius != null
|
|
143
|
+
&& borderRadius.getUnit() == LengthPercentageType.PERCENT) {
|
|
144
|
+
borderRadius = null;
|
|
145
|
+
}
|
|
146
|
+
|
|
137
147
|
view.setBorderRadius(BorderRadiusProp.values()[index], borderRadius);
|
|
138
148
|
}
|
|
139
149
|
|
|
@@ -17,8 +17,8 @@ namespace facebook::react {
|
|
|
17
17
|
constexpr struct {
|
|
18
18
|
int32_t Major = 0;
|
|
19
19
|
int32_t Minor = 75;
|
|
20
|
-
int32_t Patch =
|
|
21
|
-
std::string_view Prerelease = "
|
|
20
|
+
int32_t Patch = 1;
|
|
21
|
+
std::string_view Prerelease = "";
|
|
22
22
|
} ReactNativeVersion;
|
|
23
23
|
|
|
24
24
|
} // namespace facebook::react
|
package/cli.js
CHANGED
|
@@ -42,10 +42,10 @@ const DEFAULT_REGISTRY_HOST =
|
|
|
42
42
|
const HEAD = '1000.0.0';
|
|
43
43
|
|
|
44
44
|
// We're going to deprecate the `init` command proxying requests to @react-native-community/cli transparently
|
|
45
|
-
// on
|
|
45
|
+
// on December 31th, 2024 or 0.76 (whichever arrives first). This is part of work to decouple of community CLI from React Native core.
|
|
46
46
|
//
|
|
47
47
|
// See https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0759-react-native-frameworks.md
|
|
48
|
-
const CLI_DEPRECATION_DATE = new Date('2024-
|
|
48
|
+
const CLI_DEPRECATION_DATE = new Date('2024-12-31');
|
|
49
49
|
|
|
50
50
|
async function getLatestVersion(registryHost = DEFAULT_REGISTRY_HOST) {
|
|
51
51
|
return new Promise((res, rej) => {
|
|
@@ -119,7 +119,7 @@ function warnWithDeprecated() {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
console.warn(`
|
|
122
|
-
|
|
122
|
+
🚨️ The \`init\` command is deprecated.
|
|
123
123
|
|
|
124
124
|
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
|
|
125
125
|
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.75.
|
|
3
|
+
"version": "0.75.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"@react-native-community/cli": "14.0.0",
|
|
113
113
|
"@react-native-community/cli-platform-android": "14.0.0",
|
|
114
114
|
"@react-native-community/cli-platform-ios": "14.0.0",
|
|
115
|
-
"@react-native/assets-registry": "0.75.
|
|
116
|
-
"@react-native/codegen": "0.75.
|
|
117
|
-
"@react-native/community-cli-plugin": "0.75.
|
|
118
|
-
"@react-native/gradle-plugin": "0.75.
|
|
119
|
-
"@react-native/js-polyfills": "0.75.
|
|
120
|
-
"@react-native/normalize-colors": "0.75.
|
|
121
|
-
"@react-native/virtualized-lists": "0.75.
|
|
115
|
+
"@react-native/assets-registry": "0.75.1",
|
|
116
|
+
"@react-native/codegen": "0.75.1",
|
|
117
|
+
"@react-native/community-cli-plugin": "0.75.1",
|
|
118
|
+
"@react-native/gradle-plugin": "0.75.1",
|
|
119
|
+
"@react-native/js-polyfills": "0.75.1",
|
|
120
|
+
"@react-native/normalize-colors": "0.75.1",
|
|
121
|
+
"@react-native/virtualized-lists": "0.75.1",
|
|
122
122
|
"abort-controller": "^3.0.0",
|
|
123
123
|
"anser": "^1.4.9",
|
|
124
124
|
"ansi-regex": "^5.0.0",
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-2024-
|
|
1
|
+
hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|