react-native 0.73.0-rc.1 → 0.73.0-rc.2
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/Libraries/NativeComponent/NativeComponentRegistry.js +10 -4
- package/React/Base/RCTVersion.m +1 -1
- package/React/UIUtils/RCTUIUtils.h +1 -1
- package/React/Views/UIView+React.m +30 -23
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +5 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- 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/template/Gemfile +2 -1
- package/template/index.js +0 -9
- package/template/package.json +1 -1
|
@@ -55,14 +55,20 @@ export function get<Config>(
|
|
|
55
55
|
): HostComponent<Config> {
|
|
56
56
|
ReactNativeViewConfigRegistry.register(name, () => {
|
|
57
57
|
const {native, strict, verify} = getRuntimeConfig?.(name) ?? {
|
|
58
|
-
native:
|
|
58
|
+
native: !global.RN$Bridgeless,
|
|
59
59
|
strict: false,
|
|
60
60
|
verify: false,
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
let viewConfig;
|
|
64
|
+
if (native) {
|
|
65
|
+
viewConfig = getNativeComponentAttributes(name);
|
|
66
|
+
} else {
|
|
67
|
+
viewConfig = createViewConfig(viewConfigProvider());
|
|
68
|
+
if (viewConfig == null) {
|
|
69
|
+
viewConfig = getNativeComponentAttributes(name);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
66
72
|
|
|
67
73
|
if (verify) {
|
|
68
74
|
const nativeViewConfig = native
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -25,7 +25,7 @@ extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGF
|
|
|
25
25
|
|
|
26
26
|
// Get font size multiplier for font base size (Large) by content size category
|
|
27
27
|
extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory(
|
|
28
|
-
UIContentSizeCategory category);
|
|
28
|
+
UIContentSizeCategory category) __deprecated;
|
|
29
29
|
|
|
30
30
|
#ifdef __cplusplus
|
|
31
31
|
}
|
|
@@ -204,7 +204,10 @@
|
|
|
204
204
|
self.center = position;
|
|
205
205
|
self.bounds = bounds;
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
id transformOrigin = objc_getAssociatedObject(self, @selector(reactTransformOrigin));
|
|
208
|
+
if (transformOrigin) {
|
|
209
|
+
updateTransform(self);
|
|
210
|
+
}
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
#pragma mark - Transforms
|
|
@@ -242,31 +245,35 @@
|
|
|
242
245
|
|
|
243
246
|
static void updateTransform(UIView *view)
|
|
244
247
|
{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
248
|
+
CATransform3D transform;
|
|
249
|
+
id rawTansformOrigin = objc_getAssociatedObject(view, @selector(reactTransformOrigin));
|
|
250
|
+
if (rawTansformOrigin) {
|
|
251
|
+
CGSize size = view.bounds.size;
|
|
252
|
+
CGFloat anchorPointX = 0;
|
|
253
|
+
CGFloat anchorPointY = 0;
|
|
254
|
+
CGFloat anchorPointZ = 0;
|
|
255
|
+
RCTTransformOrigin transformOrigin;
|
|
256
|
+
[rawTansformOrigin getValue:&transformOrigin];
|
|
257
|
+
if (transformOrigin.x.unit == YGUnitPoint) {
|
|
258
|
+
anchorPointX = transformOrigin.x.value - size.width * 0.5;
|
|
259
|
+
} else if (transformOrigin.x.unit == YGUnitPercent) {
|
|
260
|
+
anchorPointX = (transformOrigin.x.value * 0.01 - 0.5) * size.width;
|
|
261
|
+
}
|
|
257
262
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
263
|
+
if (transformOrigin.y.unit == YGUnitPoint) {
|
|
264
|
+
anchorPointY = transformOrigin.y.value - size.height * 0.5;
|
|
265
|
+
} else if (transformOrigin.y.unit == YGUnitPercent) {
|
|
266
|
+
anchorPointY = (transformOrigin.y.value * 0.01 - 0.5) * size.height;
|
|
267
|
+
}
|
|
268
|
+
anchorPointZ = transformOrigin.z;
|
|
269
|
+
transform = CATransform3DConcat(
|
|
270
|
+
view.reactTransform, CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ));
|
|
271
|
+
transform =
|
|
272
|
+
CATransform3DConcat(CATransform3DMakeTranslation(-anchorPointX, -anchorPointY, -anchorPointZ), transform);
|
|
273
|
+
} else {
|
|
274
|
+
transform = view.reactTransform;
|
|
262
275
|
}
|
|
263
276
|
|
|
264
|
-
anchorPointZ = transformOrigin.z;
|
|
265
|
-
|
|
266
|
-
CATransform3D transform = CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ);
|
|
267
|
-
transform = CATransform3DConcat(view.reactTransform, transform);
|
|
268
|
-
transform = CATransform3DTranslate(transform, -anchorPointX, -anchorPointY, -anchorPointZ);
|
|
269
|
-
|
|
270
277
|
view.layer.transform = transform;
|
|
271
278
|
// Enable edge antialiasing in rotation, skew, or perspective transforms
|
|
272
279
|
view.layer.allowsEdgeAntialiasing = transform.m12 != 0.0f || transform.m21 != 0.0f || transform.m34 != 0.0f;
|
|
@@ -26,6 +26,7 @@ import com.facebook.react.modules.blob.BlobModule;
|
|
|
26
26
|
import com.facebook.react.modules.blob.FileReaderModule;
|
|
27
27
|
import com.facebook.react.modules.camera.ImageStoreManager;
|
|
28
28
|
import com.facebook.react.modules.clipboard.ClipboardModule;
|
|
29
|
+
import com.facebook.react.modules.devloading.DevLoadingModule;
|
|
29
30
|
import com.facebook.react.modules.devtoolssettings.DevToolsSettingsManagerModule;
|
|
30
31
|
import com.facebook.react.modules.dialog.DialogModule;
|
|
31
32
|
import com.facebook.react.modules.fresco.FrescoModule;
|
|
@@ -73,6 +74,7 @@ import javax.inject.Provider;
|
|
|
73
74
|
AppearanceModule.class,
|
|
74
75
|
AppStateModule.class,
|
|
75
76
|
BlobModule.class,
|
|
77
|
+
DevLoadingModule.class,
|
|
76
78
|
FileReaderModule.class,
|
|
77
79
|
ClipboardModule.class,
|
|
78
80
|
DialogModule.class,
|
|
@@ -114,6 +116,8 @@ public class MainReactPackage extends TurboReactPackage implements ViewManagerOn
|
|
|
114
116
|
return new AppStateModule(context);
|
|
115
117
|
case BlobModule.NAME:
|
|
116
118
|
return new BlobModule(context);
|
|
119
|
+
case DevLoadingModule.NAME:
|
|
120
|
+
return new DevLoadingModule(context);
|
|
117
121
|
case FileReaderModule.NAME:
|
|
118
122
|
return new FileReaderModule(context);
|
|
119
123
|
case ClipboardModule.NAME:
|
|
@@ -260,6 +264,7 @@ public class MainReactPackage extends TurboReactPackage implements ViewManagerOn
|
|
|
260
264
|
AppearanceModule.class,
|
|
261
265
|
AppStateModule.class,
|
|
262
266
|
BlobModule.class,
|
|
267
|
+
DevLoadingModule.class,
|
|
263
268
|
FileReaderModule.class,
|
|
264
269
|
ClipboardModule.class,
|
|
265
270
|
DialogModule.class,
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/Gemfile
CHANGED
package/template/index.js
CHANGED
|
@@ -6,13 +6,4 @@ import {AppRegistry} from 'react-native';
|
|
|
6
6
|
import App from './App';
|
|
7
7
|
import {name as appName} from './app.json';
|
|
8
8
|
|
|
9
|
-
if (global.RN$Bridgeless) {
|
|
10
|
-
require('react-native/Libraries/NativeComponent/NativeComponentRegistry').setRuntimeConfigProvider(
|
|
11
|
-
name => {
|
|
12
|
-
// In bridgeless mode, never load native ViewConfig.
|
|
13
|
-
return {native: false, strict: false, verify: false};
|
|
14
|
-
},
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
9
|
AppRegistry.registerComponent(appName, () => App);
|