react-native 0.73.0-rc.3 → 0.73.0-rc.5
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/Animated/nodes/AnimatedStyle.js +1 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +13 -27
- package/Libraries/Blob/React-RCTBlob.podspec +8 -14
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/React-RCTImage.podspec +9 -13
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +4 -12
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +7 -13
- package/Libraries/Network/React-RCTNetwork.podspec +7 -17
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +7 -13
- package/Libraries/Settings/React-RCTSettings.podspec +7 -16
- package/Libraries/Vibration/React-RCTVibration.podspec +6 -14
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/React-CoreModules.podspec +4 -8
- package/React/Modules/RCTUIManager.m +4 -1
- package/React/React-RCTFabric.podspec +27 -31
- package/React-Core.podspec +1 -9
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +0 -11
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java +3 -9
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSTimerExecutor.java +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +41 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +4 -29
- package/ReactCommon/React-Fabric.podspec +12 -13
- package/ReactCommon/React-FabricImage.podspec +14 -14
- package/ReactCommon/React-Mapbuffer.podspec +2 -2
- package/ReactCommon/React-rncore.podspec +2 -3
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +7 -4
- package/ReactCommon/jsi/React-jsi.podspec +8 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +3 -1
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +18 -6
- package/ReactCommon/react/renderer/attributedstring/conversions.h +6 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +23 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +4 -0
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +2 -3
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +11 -16
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +6 -4
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +2 -1
- package/ReactCommon/react/utils/React-utils.podspec +2 -5
- package/gradle/libs.versions.toml +1 -1
- package/package.json +10 -10
- package/scripts/cocoapods/codegen_utils.rb +16 -17
- package/scripts/cocoapods/new_architecture.rb +15 -12
- package/scripts/cocoapods/utils.rb +75 -25
- package/scripts/react_native_pods.rb +36 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +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/package.json +2 -2
- package/ReactCommon/jsinspector/.clang-tidy +0 -6
- package/ReactCommon/jsinspector/InspectorInterfaces.cpp +0 -106
- package/ReactCommon/jsinspector/InspectorInterfaces.h +0 -92
package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java
CHANGED
|
@@ -13,8 +13,7 @@ import com.facebook.react.bridge.JSExceptionHandler;
|
|
|
13
13
|
import com.facebook.react.bridge.NativeModule;
|
|
14
14
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
15
15
|
import com.facebook.react.bridge.UiThreadUtil;
|
|
16
|
-
import com.facebook.react.devsupport.
|
|
17
|
-
import com.facebook.react.devsupport.DefaultDevLoadingViewImplementation;
|
|
16
|
+
import com.facebook.react.devsupport.DevSupportManagerBase;
|
|
18
17
|
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager;
|
|
19
18
|
import com.facebook.react.module.annotations.ReactModule;
|
|
20
19
|
|
|
@@ -28,14 +27,9 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
|
|
|
28
27
|
public DevLoadingModule(ReactApplicationContext reactContext) {
|
|
29
28
|
super(reactContext);
|
|
30
29
|
mJSExceptionHandler = reactContext.getJSExceptionHandler();
|
|
31
|
-
if (mJSExceptionHandler != null && mJSExceptionHandler instanceof
|
|
30
|
+
if (mJSExceptionHandler != null && mJSExceptionHandler instanceof DevSupportManagerBase) {
|
|
32
31
|
mDevLoadingViewManager =
|
|
33
|
-
((
|
|
34
|
-
mDevLoadingViewManager =
|
|
35
|
-
mDevLoadingViewManager != null
|
|
36
|
-
? mDevLoadingViewManager
|
|
37
|
-
: new DefaultDevLoadingViewImplementation(
|
|
38
|
-
((BridgeDevSupportManager) mJSExceptionHandler).getReactInstanceManagerHelper());
|
|
32
|
+
((DevSupportManagerBase) mJSExceptionHandler).getDevLoadingViewManager();
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
|
|
@@ -9,13 +9,15 @@ package com.facebook.react.runtime;
|
|
|
9
9
|
|
|
10
10
|
import com.facebook.infer.annotation.Nullsafe;
|
|
11
11
|
import com.facebook.jni.HybridData;
|
|
12
|
-
import com.facebook.jni.annotations.
|
|
12
|
+
import com.facebook.jni.annotations.DoNotStripAny;
|
|
13
|
+
import com.facebook.proguard.annotations.DoNotStrip;
|
|
13
14
|
import com.facebook.react.bridge.WritableArray;
|
|
14
15
|
import com.facebook.react.bridge.WritableNativeArray;
|
|
15
16
|
import com.facebook.react.modules.core.JavaScriptTimerExecutor;
|
|
16
17
|
import com.facebook.soloader.SoLoader;
|
|
17
18
|
|
|
18
19
|
@Nullsafe(Nullsafe.Mode.LOCAL)
|
|
20
|
+
@DoNotStripAny
|
|
19
21
|
class JSTimerExecutor implements JavaScriptTimerExecutor {
|
|
20
22
|
|
|
21
23
|
static {
|
|
@@ -24,6 +26,7 @@ class JSTimerExecutor implements JavaScriptTimerExecutor {
|
|
|
24
26
|
|
|
25
27
|
@DoNotStrip private final HybridData mHybridData;
|
|
26
28
|
|
|
29
|
+
@DoNotStrip
|
|
27
30
|
public JSTimerExecutor(HybridData hybridData) {
|
|
28
31
|
mHybridData = hybridData;
|
|
29
32
|
}
|
|
@@ -638,6 +638,9 @@ public class ReactHostImpl implements ReactHost {
|
|
|
638
638
|
final String method = "handleHostException(message = \"" + e.getMessage() + "\")";
|
|
639
639
|
log(method);
|
|
640
640
|
|
|
641
|
+
if (DEV) {
|
|
642
|
+
mDevSupportManager.handleException(e);
|
|
643
|
+
}
|
|
641
644
|
destroy(method, e);
|
|
642
645
|
mReactHostDelegate.handleInstanceException(e);
|
|
643
646
|
}
|
|
@@ -922,6 +925,7 @@ public class ReactHostImpl implements ReactHost {
|
|
|
922
925
|
final JSBundleLoader bundleLoader = task.getResult();
|
|
923
926
|
final BridgelessReactContext reactContext = getOrCreateReactContext();
|
|
924
927
|
final DevSupportManager devSupportManager = getDevSupportManager();
|
|
928
|
+
reactContext.setJSExceptionHandler(devSupportManager);
|
|
925
929
|
|
|
926
930
|
log(method, "Creating ReactInstance");
|
|
927
931
|
final ReactInstance instance =
|
|
@@ -1036,6 +1040,7 @@ public class ReactHostImpl implements ReactHost {
|
|
|
1036
1040
|
|
|
1037
1041
|
final BridgelessReactContext reactContext = getOrCreateReactContext();
|
|
1038
1042
|
final DevSupportManager devSupportManager = getDevSupportManager();
|
|
1043
|
+
reactContext.setJSExceptionHandler(devSupportManager);
|
|
1039
1044
|
|
|
1040
1045
|
return getJsBundleLoader()
|
|
1041
1046
|
.onSuccess(
|
|
@@ -71,6 +71,7 @@ import java.util.HashSet;
|
|
|
71
71
|
import java.util.List;
|
|
72
72
|
import java.util.Map;
|
|
73
73
|
import java.util.Set;
|
|
74
|
+
import java.util.concurrent.ConcurrentHashMap;
|
|
74
75
|
import javax.annotation.Nullable;
|
|
75
76
|
|
|
76
77
|
/**
|
|
@@ -93,6 +94,7 @@ final class ReactInstance {
|
|
|
93
94
|
private final TurboModuleManager mTurboModuleManager;
|
|
94
95
|
private final FabricUIManager mFabricUIManager;
|
|
95
96
|
private final JavaTimerManager mJavaTimerManager;
|
|
97
|
+
private final Map<String, ViewManager> mViewManagers = new ConcurrentHashMap<>();
|
|
96
98
|
|
|
97
99
|
@DoNotStrip @Nullable private ComponentNameResolverManager mComponentNameResolverManager;
|
|
98
100
|
@DoNotStrip @Nullable private UIConstantsProviderManager mUIConstantsProviderManager;
|
|
@@ -489,8 +491,12 @@ final class ReactInstance {
|
|
|
489
491
|
}
|
|
490
492
|
|
|
491
493
|
private @Nullable ViewManager createViewManager(String viewManagerName) {
|
|
494
|
+
// Return cached view manager if available, no matter it's eagerly or lazily loaded
|
|
495
|
+
if (mViewManagers.containsKey(viewManagerName)) {
|
|
496
|
+
return mViewManagers.get(viewManagerName);
|
|
497
|
+
}
|
|
498
|
+
List<ReactPackage> packages = mReactPackages;
|
|
492
499
|
if (mDelegate != null) {
|
|
493
|
-
List<ReactPackage> packages = mReactPackages;
|
|
494
500
|
if (packages != null) {
|
|
495
501
|
synchronized (packages) {
|
|
496
502
|
for (ReactPackage reactPackage : packages) {
|
|
@@ -499,6 +505,7 @@ final class ReactInstance {
|
|
|
499
505
|
((ViewManagerOnDemandReactPackage) reactPackage)
|
|
500
506
|
.createViewManager(mBridgelessReactContext, viewManagerName);
|
|
501
507
|
if (viewManager != null) {
|
|
508
|
+
mViewManagers.put(viewManagerName, viewManager);
|
|
502
509
|
return viewManager;
|
|
503
510
|
}
|
|
504
511
|
}
|
|
@@ -507,7 +514,17 @@ final class ReactInstance {
|
|
|
507
514
|
}
|
|
508
515
|
}
|
|
509
516
|
|
|
510
|
-
|
|
517
|
+
// Once a view manager is not found in all react packages via lazy loading, fall back to default
|
|
518
|
+
// implementation: eagerly initialize all view managers
|
|
519
|
+
for (ReactPackage reactPackage : packages) {
|
|
520
|
+
List<ViewManager> viewManagersInPackage =
|
|
521
|
+
reactPackage.createViewManagers(mBridgelessReactContext);
|
|
522
|
+
for (ViewManager viewManager : viewManagersInPackage) {
|
|
523
|
+
mViewManagers.put(viewManager.getName(), viewManager);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
return mViewManagers.get(viewManagerName);
|
|
511
528
|
}
|
|
512
529
|
|
|
513
530
|
private @NonNull Collection<String> getViewManagerNames() {
|
|
@@ -534,8 +551,28 @@ final class ReactInstance {
|
|
|
534
551
|
|
|
535
552
|
private @NonNull NativeMap getUIManagerConstants() {
|
|
536
553
|
List<ViewManager> viewManagers = new ArrayList<ViewManager>();
|
|
537
|
-
|
|
538
|
-
|
|
554
|
+
boolean canLoadViewManagersLazily = true;
|
|
555
|
+
|
|
556
|
+
List<ReactPackage> packages = mReactPackages;
|
|
557
|
+
for (ReactPackage reactPackage : packages) {
|
|
558
|
+
if (!(reactPackage instanceof ViewManagerOnDemandReactPackage)) {
|
|
559
|
+
canLoadViewManagersLazily = false;
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
// 1, Retrive view managers via on demand loading
|
|
564
|
+
if (canLoadViewManagersLazily) {
|
|
565
|
+
for (String viewManagerName : getViewManagerNames()) {
|
|
566
|
+
viewManagers.add(createViewManager(viewManagerName));
|
|
567
|
+
}
|
|
568
|
+
} else {
|
|
569
|
+
// 2, There are packages that don't implement ViewManagerOnDemandReactPackage so we retrieve
|
|
570
|
+
// view managers via eager loading
|
|
571
|
+
for (ReactPackage reactPackage : packages) {
|
|
572
|
+
List<ViewManager> viewManagersInPackage =
|
|
573
|
+
reactPackage.createViewManagers(mBridgelessReactContext);
|
|
574
|
+
viewManagers.addAll(viewManagersInPackage);
|
|
575
|
+
}
|
|
539
576
|
}
|
|
540
577
|
Map<String, Object> constants =
|
|
541
578
|
UIManagerModule.createConstants(viewManagers, new HashMap<>(), new HashMap<>());
|
|
@@ -59,6 +59,7 @@ public class TextAttributeProps {
|
|
|
59
59
|
public static final short TA_KEY_ACCESSIBILITY_ROLE = 24;
|
|
60
60
|
public static final short TA_KEY_LINE_BREAK_STRATEGY = 25;
|
|
61
61
|
public static final short TA_KEY_ROLE = 26;
|
|
62
|
+
public static final short TA_KEY_TEXT_TRANSFORM = 27;
|
|
62
63
|
|
|
63
64
|
public static final int UNSET = -1;
|
|
64
65
|
|
|
@@ -219,6 +220,9 @@ public class TextAttributeProps {
|
|
|
219
220
|
case TA_KEY_ROLE:
|
|
220
221
|
result.setRole(Role.values()[entry.getIntValue()]);
|
|
221
222
|
break;
|
|
223
|
+
case TA_KEY_TEXT_TRANSFORM:
|
|
224
|
+
result.setTextTransform(entry.getStringValue());
|
|
225
|
+
break;
|
|
222
226
|
}
|
|
223
227
|
}
|
|
224
228
|
|
|
@@ -226,7 +230,6 @@ public class TextAttributeProps {
|
|
|
226
230
|
// setNumberOfLines
|
|
227
231
|
// setColor
|
|
228
232
|
// setIncludeFontPadding
|
|
229
|
-
// setTextTransform
|
|
230
233
|
return result;
|
|
231
234
|
}
|
|
232
235
|
|
|
@@ -9,8 +9,6 @@ package com.facebook.react.views.textinput;
|
|
|
9
9
|
|
|
10
10
|
import static com.facebook.react.uimanager.UIManagerHelper.getReactContext;
|
|
11
11
|
|
|
12
|
-
import android.content.ClipData;
|
|
13
|
-
import android.content.ClipboardManager;
|
|
14
12
|
import android.content.Context;
|
|
15
13
|
import android.graphics.Color;
|
|
16
14
|
import android.graphics.Paint;
|
|
@@ -210,9 +208,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
210
208
|
public void onDestroyActionMode(ActionMode mode) {}
|
|
211
209
|
};
|
|
212
210
|
setCustomSelectionActionModeCallback(customActionModeCallback);
|
|
213
|
-
|
|
214
|
-
setCustomInsertionActionModeCallback(customActionModeCallback);
|
|
215
|
-
}
|
|
211
|
+
setCustomInsertionActionModeCallback(customActionModeCallback);
|
|
216
212
|
}
|
|
217
213
|
|
|
218
214
|
@Override
|
|
@@ -308,26 +304,7 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
308
304
|
@Override
|
|
309
305
|
public boolean onTextContextMenuItem(int id) {
|
|
310
306
|
if (id == android.R.id.paste) {
|
|
311
|
-
|
|
312
|
-
id = android.R.id.pasteAsPlainText;
|
|
313
|
-
} else {
|
|
314
|
-
ClipboardManager clipboard =
|
|
315
|
-
(ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
|
316
|
-
ClipData previousClipData = clipboard.getPrimaryClip();
|
|
317
|
-
if (previousClipData != null) {
|
|
318
|
-
for (int i = 0; i < previousClipData.getItemCount(); i++) {
|
|
319
|
-
final CharSequence text = previousClipData.getItemAt(i).coerceToText(getContext());
|
|
320
|
-
final CharSequence paste = (text instanceof Spanned) ? text.toString() : text;
|
|
321
|
-
if (paste != null) {
|
|
322
|
-
ClipData clipData = ClipData.newPlainText(null, text);
|
|
323
|
-
clipboard.setPrimaryClip(clipData);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
boolean actionPerformed = super.onTextContextMenuItem(id);
|
|
327
|
-
clipboard.setPrimaryClip(previousClipData);
|
|
328
|
-
return actionPerformed;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
307
|
+
id = android.R.id.pasteAsPlainText;
|
|
331
308
|
}
|
|
332
309
|
return super.onTextContextMenuItem(id);
|
|
333
310
|
}
|
|
@@ -702,10 +679,8 @@ public class ReactEditText extends AppCompatEditText {
|
|
|
702
679
|
}
|
|
703
680
|
mDisableTextDiffing = false;
|
|
704
681
|
|
|
705
|
-
if (
|
|
706
|
-
|
|
707
|
-
setBreakStrategy(reactTextUpdate.getTextBreakStrategy());
|
|
708
|
-
}
|
|
682
|
+
if (getBreakStrategy() != reactTextUpdate.getTextBreakStrategy()) {
|
|
683
|
+
setBreakStrategy(reactTextUpdate.getTextBreakStrategy());
|
|
709
684
|
}
|
|
710
685
|
|
|
711
686
|
// Update cached spans (in Fabric only).
|
|
@@ -42,12 +42,12 @@ Pod::Spec.new do |s|
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
s.dependency folly_dep_name, folly_version
|
|
45
|
-
|
|
46
|
-
s.dependency "React-jsiexecutor"
|
|
47
|
-
s.dependency "RCTRequired"
|
|
48
|
-
s.dependency "RCTTypeSafety"
|
|
49
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
50
|
-
s.dependency "React-jsi"
|
|
45
|
+
|
|
46
|
+
s.dependency "React-jsiexecutor"
|
|
47
|
+
s.dependency "RCTRequired"
|
|
48
|
+
s.dependency "RCTTypeSafety"
|
|
49
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
50
|
+
s.dependency "React-jsi"
|
|
51
51
|
s.dependency "React-logger"
|
|
52
52
|
s.dependency "glog"
|
|
53
53
|
s.dependency "DoubleConversion"
|
|
@@ -56,13 +56,15 @@ Pod::Spec.new do |s|
|
|
|
56
56
|
s.dependency "React-debug"
|
|
57
57
|
s.dependency "React-utils"
|
|
58
58
|
s.dependency "React-runtimescheduler"
|
|
59
|
-
s.dependency "React-rendererdebug"
|
|
60
59
|
s.dependency "React-cxxreact"
|
|
61
60
|
|
|
61
|
+
add_dependency(s, "React-rendererdebug")
|
|
62
|
+
add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"])
|
|
63
|
+
|
|
62
64
|
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
63
65
|
s.dependency "hermes-engine"
|
|
64
66
|
else
|
|
65
|
-
s.dependency "React-
|
|
67
|
+
s.dependency "React-jsc"
|
|
66
68
|
end
|
|
67
69
|
|
|
68
70
|
s.subspec "animations" do |ss|
|
|
@@ -88,15 +90,12 @@ Pod::Spec.new do |s|
|
|
|
88
90
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
89
91
|
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
90
92
|
"\"$(PODS_TARGET_SRCROOT)\"",
|
|
93
|
+
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
94
|
+
"\"$(PODS_ROOT)/fmt/include\"",
|
|
91
95
|
]
|
|
92
96
|
|
|
93
97
|
if ENV['USE_FRAMEWORKS']
|
|
94
98
|
header_search_path = header_search_path + [
|
|
95
|
-
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
96
|
-
"\"$(PODS_ROOT)/fmt/include\"",
|
|
97
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
|
|
98
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"",
|
|
99
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\"",
|
|
100
99
|
"\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"",
|
|
101
100
|
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"",
|
|
102
101
|
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/view/platform/cxx\"",
|
|
@@ -27,21 +27,16 @@ header_search_path = [
|
|
|
27
27
|
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
|
|
28
28
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
29
29
|
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
30
|
+
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
31
|
+
"\"$(PODS_ROOT)/fmt/include\"",
|
|
30
32
|
]
|
|
31
33
|
|
|
32
34
|
if ENV['USE_FRAMEWORKS']
|
|
33
35
|
header_search_path = header_search_path + [
|
|
34
36
|
"\"$(PODS_TARGET_SRCROOT)\"",
|
|
35
|
-
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
36
|
-
"\"$(PODS_ROOT)/fmt/include\"",
|
|
37
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
|
|
38
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"",
|
|
39
|
-
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/imagemanager/platform/ios\"",
|
|
40
|
-
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\"",
|
|
41
37
|
"\"$(PODS_TARGET_SRCROOT)/react/renderer/textlayoutmanager/platform/ios\"",
|
|
42
38
|
"\"$(PODS_TARGET_SRCROOT)/react/renderer/components/textinput/iostextinput\"",
|
|
43
|
-
"\"$
|
|
44
|
-
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-rendererdebug/React_rendererdebug.framework/Headers/\""
|
|
39
|
+
# "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-Codegen/React_Codegen.framework/Headers\"",
|
|
45
40
|
]
|
|
46
41
|
end
|
|
47
42
|
|
|
@@ -69,25 +64,30 @@ Pod::Spec.new do |s|
|
|
|
69
64
|
end
|
|
70
65
|
|
|
71
66
|
s.dependency folly_dep_name, folly_version
|
|
72
|
-
|
|
67
|
+
|
|
73
68
|
s.dependency "React-jsiexecutor", version
|
|
74
69
|
s.dependency "RCTRequired", version
|
|
75
70
|
s.dependency "RCTTypeSafety", version
|
|
76
|
-
s.dependency "
|
|
77
|
-
s.dependency "React-jsi", version
|
|
71
|
+
s.dependency "React-jsi"
|
|
78
72
|
s.dependency "React-logger"
|
|
79
73
|
s.dependency "glog"
|
|
80
74
|
s.dependency "DoubleConversion"
|
|
81
75
|
s.dependency 'fmt' , '~> 6.2.1'
|
|
82
76
|
s.dependency "React-ImageManager"
|
|
83
|
-
s.dependency "React-Fabric"
|
|
84
77
|
s.dependency "React-utils"
|
|
85
|
-
s.dependency "React-rendererdebug"
|
|
86
78
|
s.dependency "Yoga"
|
|
87
79
|
|
|
80
|
+
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core")
|
|
81
|
+
add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"])
|
|
82
|
+
add_dependency(s, "React-Fabric", :additional_framework_paths => [
|
|
83
|
+
"react/renderer/components/view/platform/cxx",
|
|
84
|
+
"react/renderer/imagemanager/platform/ios"
|
|
85
|
+
])
|
|
86
|
+
add_dependency(s, "React-rendererdebug")
|
|
87
|
+
|
|
88
88
|
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
89
89
|
s.dependency "hermes-engine"
|
|
90
90
|
else
|
|
91
|
-
s.dependency "React-
|
|
91
|
+
s.dependency "React-jsc"
|
|
92
92
|
end
|
|
93
93
|
end
|
|
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
|
|
|
29
29
|
s.exclude_files = "react/renderer/mapbuffer/tests"
|
|
30
30
|
s.public_header_files = 'react/renderer/mapbuffer/*.h'
|
|
31
31
|
s.header_dir = "react/renderer/mapbuffer"
|
|
32
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"
|
|
32
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"", "USE_HEADERMAP" => "YES",
|
|
33
33
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
|
|
34
34
|
|
|
35
35
|
if ENV['USE_FRAMEWORKS']
|
|
@@ -38,6 +38,6 @@ Pod::Spec.new do |s|
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
s.dependency "glog"
|
|
41
|
-
s
|
|
41
|
+
add_dependency(s, "React-debug")
|
|
42
42
|
|
|
43
43
|
end
|
|
@@ -32,9 +32,8 @@ header_search_paths = [
|
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
if ENV["USE_FRAMEWORKS"]
|
|
35
|
-
|
|
36
|
-
"\"
|
|
37
|
-
])
|
|
35
|
+
create_header_search_path_for_frameworks("ReactCommon", :additional_framework_paths => ["react/nativemodule/core"], :include_base_folder => false)
|
|
36
|
+
.each { |search_path| header_search_paths << "\"#{search_path}\"" }
|
|
38
37
|
end
|
|
39
38
|
|
|
40
39
|
Pod::Spec.new do |s|
|
|
@@ -33,8 +33,10 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.source = source
|
|
34
34
|
s.header_dir = "jserrorhandler"
|
|
35
35
|
s.source_files = "JsErrorHandler.{cpp,h}"
|
|
36
|
-
s.pod_target_xcconfig = {
|
|
37
|
-
|
|
36
|
+
s.pod_target_xcconfig = {
|
|
37
|
+
"USE_HEADERMAP" => "YES",
|
|
38
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
|
|
39
|
+
}
|
|
38
40
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
39
41
|
|
|
40
42
|
if ENV['USE_FRAMEWORKS']
|
|
@@ -43,7 +45,8 @@ Pod::Spec.new do |s|
|
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
s.dependency folly_dep_name, folly_version
|
|
46
|
-
s.dependency "React-jsi"
|
|
47
|
-
s
|
|
48
|
+
s.dependency "React-jsi"
|
|
49
|
+
add_dependency(s, "React-debug")
|
|
50
|
+
add_dependency(s, "React-Mapbuffer")
|
|
48
51
|
|
|
49
52
|
end
|
|
@@ -46,9 +46,15 @@ Pod::Spec.new do |s|
|
|
|
46
46
|
s.dependency "glog"
|
|
47
47
|
|
|
48
48
|
s.source_files = "**/*.{cpp,h}"
|
|
49
|
-
|
|
49
|
+
files_to_exclude = [
|
|
50
50
|
"jsi/jsilib-posix.cpp",
|
|
51
51
|
"jsi/jsilib-windows.cpp",
|
|
52
52
|
"**/test/*"
|
|
53
|
-
|
|
53
|
+
]
|
|
54
|
+
if js_engine == :hermes
|
|
55
|
+
# JSI is a part of hermes-engine. Including them also in react-native will violate the One Definition Rulle.
|
|
56
|
+
files_to_exclude += [ "jsi/jsi.cpp" ]
|
|
57
|
+
s.dependency "hermes-engine"
|
|
58
|
+
end
|
|
59
|
+
s.exclude_files = files_to_exclude
|
|
54
60
|
end
|
|
@@ -48,10 +48,12 @@ Pod::Spec.new do |s|
|
|
|
48
48
|
s.dependency "React-callinvoker"
|
|
49
49
|
s.dependency "React-Core"
|
|
50
50
|
s.dependency "React-cxxreact"
|
|
51
|
-
s.dependency "React-runtimeexecutor"
|
|
52
51
|
s.dependency "React-jsi"
|
|
52
|
+
s.dependency "React-runtimeexecutor"
|
|
53
53
|
|
|
54
54
|
if using_hermes
|
|
55
55
|
s.dependency "hermes-engine"
|
|
56
|
+
else
|
|
57
|
+
s.dependency "React-jsc"
|
|
56
58
|
end
|
|
57
59
|
end
|
|
@@ -20,6 +20,17 @@ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
|
|
|
20
20
|
folly_version = '2022.05.16.00'
|
|
21
21
|
boost_compiler_flags = '-Wno-documentation'
|
|
22
22
|
using_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
|
|
23
|
+
|
|
24
|
+
header_search_paths = [
|
|
25
|
+
"\"$(PODS_ROOT)/boost\"",
|
|
26
|
+
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
27
|
+
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
28
|
+
"\"$(PODS_ROOT)/fmt/include\"",
|
|
29
|
+
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
create_header_search_path_for_frameworks("ReactCommon-Samples").each { |search_path| header_search_paths << "\"#{search_path}\""}
|
|
33
|
+
|
|
23
34
|
Pod::Spec.new do |s|
|
|
24
35
|
s.name = "ReactCommon-Samples"
|
|
25
36
|
s.module_name = "ReactCommon_Samples"
|
|
@@ -32,7 +43,7 @@ Pod::Spec.new do |s|
|
|
|
32
43
|
s.platforms = min_supported_versions
|
|
33
44
|
s.source = source
|
|
34
45
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
35
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" =>
|
|
46
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths,
|
|
36
47
|
"USE_HEADERMAP" => "YES",
|
|
37
48
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
38
49
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
@@ -47,16 +58,17 @@ Pod::Spec.new do |s|
|
|
|
47
58
|
|
|
48
59
|
s.dependency "RCT-Folly"
|
|
49
60
|
s.dependency "DoubleConversion"
|
|
50
|
-
s.dependency
|
|
51
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
52
|
-
s.dependency "React-NativeModulesApple"
|
|
61
|
+
s.dependency "fmt", '~> 6.2.1'
|
|
53
62
|
s.dependency "React-Core"
|
|
54
63
|
s.dependency "React-cxxreact"
|
|
55
|
-
s.dependency "React-
|
|
64
|
+
s.dependency "React-jsi"
|
|
65
|
+
add_dependency(s, "React-Codegen", :additional_framework_paths => ["build/generated/ios"])
|
|
66
|
+
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
|
67
|
+
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
|
56
68
|
|
|
57
69
|
if using_hermes
|
|
58
70
|
s.dependency "hermes-engine"
|
|
59
71
|
else
|
|
60
|
-
s.dependency "React-
|
|
72
|
+
s.dependency "React-jsc"
|
|
61
73
|
end
|
|
62
74
|
end
|
|
@@ -970,6 +970,7 @@ constexpr static MapBuffer::Key TA_KEY_LAYOUT_DIRECTION = 23;
|
|
|
970
970
|
constexpr static MapBuffer::Key TA_KEY_ACCESSIBILITY_ROLE = 24;
|
|
971
971
|
constexpr static MapBuffer::Key TA_KEY_LINE_BREAK_STRATEGY = 25;
|
|
972
972
|
constexpr static MapBuffer::Key TA_KEY_ROLE = 26;
|
|
973
|
+
constexpr static MapBuffer::Key TA_KEY_TEXT_TRANSFORM = 27;
|
|
973
974
|
|
|
974
975
|
// constants for ParagraphAttributes serialization
|
|
975
976
|
constexpr static MapBuffer::Key PA_KEY_MAX_NUMBER_OF_LINES = 0;
|
|
@@ -1077,6 +1078,11 @@ inline MapBuffer toMapBuffer(const TextAttributes& textAttributes) {
|
|
|
1077
1078
|
TA_KEY_LINE_BREAK_STRATEGY,
|
|
1078
1079
|
toString(*textAttributes.lineBreakStrategy));
|
|
1079
1080
|
}
|
|
1081
|
+
if (textAttributes.textTransform.has_value()) {
|
|
1082
|
+
builder.putString(
|
|
1083
|
+
TA_KEY_TEXT_TRANSFORM, toString(*textAttributes.textTransform));
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1080
1086
|
// Decoration
|
|
1081
1087
|
if (textAttributes.textDecorationColor) {
|
|
1082
1088
|
builder.putInt(
|
|
@@ -74,13 +74,29 @@ static Class getViewManagerFromComponentName(const std::string &componentName)
|
|
|
74
74
|
return nil;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
static Class getViewManagerClass(const std::string &componentName, RCTBridge *bridge, RCTBridgeProxy *bridgeProxy)
|
|
78
|
+
{
|
|
79
|
+
Class viewManager = getViewManagerFromComponentName(componentName);
|
|
80
|
+
if (viewManager != nil) {
|
|
81
|
+
return viewManager;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// If all the heuristics fail, let's try to retrieve the view manager from the bridge/bridgeProxy
|
|
85
|
+
if (bridge != nil) {
|
|
86
|
+
return [[bridge moduleForName:RCTNSStringFromString(componentName)] class];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (bridgeProxy != nil) {
|
|
90
|
+
return [[bridgeProxy moduleForName:RCTNSStringFromString(componentName) lazilyLoadIfNecessary:YES] class];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return nil;
|
|
94
|
+
}
|
|
95
|
+
|
|
77
96
|
static const std::shared_ptr<void> constructCoordinator(
|
|
78
97
|
const ContextContainer::Shared &contextContainer,
|
|
79
98
|
const ComponentDescriptor::Flavor &flavor)
|
|
80
99
|
{
|
|
81
|
-
auto componentName = *std::static_pointer_cast<std::string const>(flavor);
|
|
82
|
-
Class viewManagerClass = getViewManagerFromComponentName(componentName);
|
|
83
|
-
assert(viewManagerClass);
|
|
84
100
|
auto optionalBridge = contextContainer->find<std::shared_ptr<void>>("Bridge");
|
|
85
101
|
RCTBridge *bridge;
|
|
86
102
|
if (optionalBridge) {
|
|
@@ -93,6 +109,10 @@ static const std::shared_ptr<void> constructCoordinator(
|
|
|
93
109
|
bridgeProxy = unwrapManagedObjectWeakly(optionalBridgeProxy.value());
|
|
94
110
|
}
|
|
95
111
|
|
|
112
|
+
auto componentName = *std::static_pointer_cast<std::string const>(flavor);
|
|
113
|
+
Class viewManagerClass = getViewManagerClass(componentName, bridge, bridgeProxy);
|
|
114
|
+
assert(viewManagerClass);
|
|
115
|
+
|
|
96
116
|
auto optionalEventDispatcher = contextContainer->find<std::shared_ptr<void>>("RCTEventDispatcher");
|
|
97
117
|
RCTEventDispatcher *eventDispatcher;
|
|
98
118
|
if (optionalEventDispatcher) {
|
|
@@ -101,6 +101,10 @@ using namespace facebook::react;
|
|
|
101
101
|
if (props.isObject()) {
|
|
102
102
|
NSDictionary<NSString *, id> *convertedProps = convertFollyDynamicToId(props);
|
|
103
103
|
[_componentData setProps:convertedProps forView:view];
|
|
104
|
+
|
|
105
|
+
if ([view respondsToSelector:@selector(didSetProps:)]) {
|
|
106
|
+
[view performSelector:@selector(didSetProps:) withObject:[convertedProps allKeys]];
|
|
107
|
+
}
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
|
|
@@ -27,8 +27,7 @@ header_search_paths = [
|
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
if ENV['USE_FRAMEWORKS']
|
|
30
|
-
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" #this is needed to allow the Renderer/Debug access its own files
|
|
31
|
-
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
|
|
30
|
+
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the Renderer/Debug access its own files
|
|
32
31
|
end
|
|
33
32
|
|
|
34
33
|
Pod::Spec.new do |s|
|
|
@@ -55,8 +54,8 @@ Pod::Spec.new do |s|
|
|
|
55
54
|
s.header_mappings_dir = "../../.."
|
|
56
55
|
end
|
|
57
56
|
|
|
58
|
-
s.dependency "React-debug"
|
|
59
57
|
s.dependency "RCT-Folly", folly_version
|
|
60
58
|
s.dependency "DoubleConversion"
|
|
61
59
|
s.dependency 'fmt' , '~> 6.2.1'
|
|
60
|
+
add_dependency(s, "React-debug")
|
|
62
61
|
end
|