react-native-macos 0.0.0-dae9a3e3b → 0.0.0-db2cc6efb
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/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h +14 -0
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
- package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +7 -0
- package/Libraries/Text/RCTTextAttributes.h +9 -3
- package/Libraries/Text/RCTTextAttributes.m +17 -0
- package/Libraries/Text/Text/RCTTextView.m +1 -7
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTUIKit.h +11 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
- package/React/CoreModules/RCTLogBox.h +1 -1
- package/React/CoreModules/RCTLogBox.mm +35 -19
- package/React/CoreModules/RCTLogBoxView.h +8 -5
- package/React/CoreModules/RCTLogBoxView.mm +64 -23
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +6 -14
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +8 -4
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +3 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +22 -22
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +7 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +23 -22
- package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +10 -1
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
- package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
- package/React/Fabric/Mounting/RCTMountingManager.h +3 -3
- package/React/Fabric/Mounting/RCTMountingManager.mm +19 -11
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +1 -1
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
- package/React/Fabric/RCTConversions.h +6 -6
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTScheduler.h +1 -1
- package/React/Fabric/RCTSurfacePresenter.h +8 -2
- package/React/Fabric/RCTSurfacePresenter.mm +14 -6
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
- package/React/Fabric/RCTSurfaceRegistry.h +1 -1
- package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
- package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -8
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/React-RCTFabric.podspec +1 -1
- package/React/Views/RCTMaskedView.h +1 -1
- package/React/Views/RCTModalHostView.h +2 -2
- package/React/Views/RCTModalHostViewController.h +1 -1
- package/React/Views/RCTModalManager.h +1 -1
- package/React/Views/RCTView.m +1 -1
- package/React/Views/RCTWeakViewHolder.h +1 -1
- package/React/Views/RCTWrapperViewController.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +0 -30
- package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/jni/Application.mk +1 -1
- package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/microprofiler/BUCK +1 -1
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
- package/ReactCommon/react/renderer/animations/conversions.h +11 -11
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
- package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +3 -3
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
- package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
- package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
- package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
- package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
- package/ReactCommon/react/renderer/core/Props.h +0 -4
- package/ReactCommon/react/renderer/core/RawProps.h +1 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
- package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
- package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
- package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
- package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
- package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
- package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
- package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
- package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
- package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +1 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/package.json +4 -1
- package/scripts/react_native_pods.rb +1 -1
- package/template/Gemfile.lock +2 -2
- package/template/package.json +1 -1
- package/ReactCommon/butter/optional.h +0 -38
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import "RCTViewComponentView.h"
|
|
9
9
|
|
|
10
10
|
#import <CoreGraphics/CoreGraphics.h>
|
|
11
|
+
#import <QuartzCore/QuartzCore.h>
|
|
11
12
|
#import <objc/runtime.h>
|
|
12
13
|
|
|
13
14
|
#import <React/RCTAssert.h>
|
|
@@ -20,12 +21,12 @@
|
|
|
20
21
|
using namespace facebook::react;
|
|
21
22
|
|
|
22
23
|
@implementation RCTViewComponentView {
|
|
23
|
-
|
|
24
|
+
RCTUIColor *_backgroundColor; // TODO(macOS GH#774)
|
|
24
25
|
CALayer *_borderLayer;
|
|
25
26
|
BOOL _needsInvalidateLayer;
|
|
26
27
|
BOOL _isJSResponder;
|
|
27
28
|
BOOL _removeClippedSubviews;
|
|
28
|
-
NSMutableArray<
|
|
29
|
+
NSMutableArray<RCTUIView *> *_reactSubviews; // TODO(macOS GH#774)
|
|
29
30
|
NSSet<NSString *> *_Nullable _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -42,12 +43,12 @@ using namespace facebook::react;
|
|
|
42
43
|
return self;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
- (facebook::react::
|
|
46
|
+
- (facebook::react::Props::Shared)props
|
|
46
47
|
{
|
|
47
48
|
return _props;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
- (void)setContentView:(
|
|
51
|
+
- (void)setContentView:(RCTUIView *)contentView // TODO(macOS GH#774)
|
|
51
52
|
{
|
|
52
53
|
if (_contentView) {
|
|
53
54
|
[_contentView removeFromSuperview];
|
|
@@ -70,12 +71,12 @@ using namespace facebook::react;
|
|
|
70
71
|
return CGRectContainsPoint(hitFrame, point);
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
- (
|
|
74
|
+
- (RCTUIColor *)backgroundColor // TODO(macOS GH#774)
|
|
74
75
|
{
|
|
75
76
|
return _backgroundColor;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
- (void)setBackgroundColor:(
|
|
79
|
+
- (void)setBackgroundColor:(RCTUIColor *)backgroundColor // TODO(macOS GH#774)
|
|
79
80
|
{
|
|
80
81
|
_backgroundColor = backgroundColor;
|
|
81
82
|
}
|
|
@@ -91,7 +92,7 @@ using namespace facebook::react;
|
|
|
91
92
|
return concreteComponentDescriptorProvider<ViewComponentDescriptor>();
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
- (void)mountChildComponentView:(
|
|
95
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
95
96
|
{
|
|
96
97
|
RCTAssert(
|
|
97
98
|
childComponentView.superview == nil,
|
|
@@ -108,7 +109,7 @@ using namespace facebook::react;
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
- (void)unmountChildComponentView:(
|
|
112
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
112
113
|
{
|
|
113
114
|
if (_removeClippedSubviews) {
|
|
114
115
|
[_reactSubviews removeObjectAtIndex:index];
|
|
@@ -132,7 +133,7 @@ using namespace facebook::react;
|
|
|
132
133
|
[childComponentView removeFromSuperview];
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(
|
|
136
|
+
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774)
|
|
136
137
|
{
|
|
137
138
|
if (!_removeClippedSubviews) {
|
|
138
139
|
// Use default behavior if unmounting is disabled
|
|
@@ -153,7 +154,7 @@ using namespace facebook::react;
|
|
|
153
154
|
clipRect = [clipView convertRect:clipRect toView:self];
|
|
154
155
|
|
|
155
156
|
// Mount / unmount views
|
|
156
|
-
for (
|
|
157
|
+
for (RCTUIView *view in _reactSubviews) { // TODO(macOS GH#774)
|
|
157
158
|
if (CGRectIntersectsRect(clipRect, view.frame)) {
|
|
158
159
|
// View is at least partially visible, so remount it if unmounted
|
|
159
160
|
[self addSubview:view];
|
|
@@ -202,13 +203,13 @@ using namespace facebook::react;
|
|
|
202
203
|
|
|
203
204
|
// `backgroundColor`
|
|
204
205
|
if (oldViewProps.backgroundColor != newViewProps.backgroundColor) {
|
|
205
|
-
self.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor);
|
|
206
|
+
self.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor); // TODO(macOS GH#774)
|
|
206
207
|
needsInvalidateLayer = YES;
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
// `foregroundColor`
|
|
210
211
|
if (oldViewProps.foregroundColor != newViewProps.foregroundColor) {
|
|
211
|
-
self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor);
|
|
212
|
+
self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor); // TODO(macOS GH#774)
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
// `shadowColor`
|
|
@@ -335,12 +336,12 @@ using namespace facebook::react;
|
|
|
335
336
|
|
|
336
337
|
// `accessibilityValue`
|
|
337
338
|
if (oldViewProps.accessibilityValue != newViewProps.accessibilityValue) {
|
|
338
|
-
if (newViewProps.accessibilityValue.text.
|
|
339
|
+
if (newViewProps.accessibilityValue.text.has_value()) {
|
|
339
340
|
self.accessibilityElement.accessibilityValue =
|
|
340
341
|
RCTNSStringFromStringNilIfEmpty(newViewProps.accessibilityValue.text.value());
|
|
341
342
|
} else if (
|
|
342
|
-
newViewProps.accessibilityValue.now.
|
|
343
|
-
newViewProps.accessibilityValue.max.
|
|
343
|
+
newViewProps.accessibilityValue.now.has_value() && newViewProps.accessibilityValue.min.has_value() &&
|
|
344
|
+
newViewProps.accessibilityValue.max.has_value()) {
|
|
344
345
|
CGFloat val = (CGFloat)(newViewProps.accessibilityValue.now.value()) /
|
|
345
346
|
(newViewProps.accessibilityValue.max.value() - newViewProps.accessibilityValue.min.value());
|
|
346
347
|
self.accessibilityElement.accessibilityValue =
|
|
@@ -437,7 +438,7 @@ using namespace facebook::react;
|
|
|
437
438
|
return _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
|
|
438
439
|
}
|
|
439
440
|
|
|
440
|
-
- (
|
|
441
|
+
- (RCTUIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774)
|
|
441
442
|
{
|
|
442
443
|
// This is a classic textbook implementation of `hitTest:` with a couple of improvements:
|
|
443
444
|
// * It does not stop algorithm if some touch is outside the view
|
|
@@ -459,8 +460,8 @@ using namespace facebook::react;
|
|
|
459
460
|
return nil;
|
|
460
461
|
}
|
|
461
462
|
|
|
462
|
-
for (
|
|
463
|
-
|
|
463
|
+
for (RCTUIView *subview in [self.subviews reverseObjectEnumerator]) { // TODO(macOS GH#774)
|
|
464
|
+
RCTUIView *hitView = [subview hitTest:[subview convertPoint:point fromView:self] withEvent:event]; // TODO(macOS GH#774)
|
|
464
465
|
if (hitView) {
|
|
465
466
|
return hitView;
|
|
466
467
|
}
|
|
@@ -469,7 +470,7 @@ using namespace facebook::react;
|
|
|
469
470
|
return isPointInside ? self : nil;
|
|
470
471
|
}
|
|
471
472
|
|
|
472
|
-
- (
|
|
473
|
+
- (RCTUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774)
|
|
473
474
|
{
|
|
474
475
|
switch (_props->pointerEvents) {
|
|
475
476
|
case PointerEventsMode::Auto:
|
|
@@ -479,7 +480,7 @@ using namespace facebook::react;
|
|
|
479
480
|
case PointerEventsMode::BoxOnly:
|
|
480
481
|
return [self pointInside:point withEvent:event] ? self : nil;
|
|
481
482
|
case PointerEventsMode::BoxNone:
|
|
482
|
-
|
|
483
|
+
RCTUIView *view = [self betterHitTest:point withEvent:event]; // TODO(macOS GH#774)
|
|
483
484
|
return view != self ? view : nil;
|
|
484
485
|
}
|
|
485
486
|
}
|
|
@@ -661,10 +662,10 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
|
|
661
662
|
return self;
|
|
662
663
|
}
|
|
663
664
|
|
|
664
|
-
static NSString *RCTRecursiveAccessibilityLabel(
|
|
665
|
+
static NSString *RCTRecursiveAccessibilityLabel(RCTUIView *view) // TODO(macOS GH#774)
|
|
665
666
|
{
|
|
666
667
|
NSMutableString *result = [NSMutableString stringWithString:@""];
|
|
667
|
-
for (
|
|
668
|
+
for (RCTUIView *subview in view.subviews) { // TODO(macOS GH#774)
|
|
668
669
|
NSString *label = subview.accessibilityLabel;
|
|
669
670
|
if (!label) {
|
|
670
671
|
label = RCTRecursiveAccessibilityLabel(subview);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponentViewProtocol.h>
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ class RCTComponentViewDescriptor final {
|
|
|
21
21
|
/*
|
|
22
22
|
* Associated (and owned) native view instance.
|
|
23
23
|
*/
|
|
24
|
-
__strong
|
|
24
|
+
__strong RCTUIView<RCTComponentViewProtocol> *view = nil; // TODO(macOS GH#774)
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
* Indicates a requirement to call on the view methods from
|
|
@@ -117,7 +117,16 @@ static Class<RCTComponentViewProtocol> RCTComponentViewClassWithName(const char
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
// Fallback 2: Try to use Paper Interop.
|
|
120
|
-
|
|
120
|
+
NSString *componentNameString = RCTNSStringFromString(name);
|
|
121
|
+
if ([RCTLegacyViewManagerInteropComponentView isSupported:componentNameString]) {
|
|
122
|
+
RCTLogNewArchitectureValidation(
|
|
123
|
+
RCTNotAllowedInBridgeless,
|
|
124
|
+
self,
|
|
125
|
+
[NSString
|
|
126
|
+
stringWithFormat:
|
|
127
|
+
@"Legacy ViewManagers should be migrated to Fabric ComponentViews in the new architecture to reduce risk. Component using interop layer: %@",
|
|
128
|
+
componentNameString]);
|
|
129
|
+
|
|
121
130
|
auto flavor = std::make_shared<std::string const>(name);
|
|
122
131
|
auto componentName = ComponentName{flavor->c_str()};
|
|
123
132
|
auto componentHandle = reinterpret_cast<ComponentHandle>(componentName);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <react/renderer/componentregistry/ComponentDescriptorProvider.h>
|
|
11
11
|
#import <react/renderer/core/EventEmitter.h>
|
|
@@ -54,14 +54,14 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) {
|
|
|
54
54
|
* component view.
|
|
55
55
|
* Receiver must add `childComponentView` as a subview.
|
|
56
56
|
*/
|
|
57
|
-
- (void)mountChildComponentView:(
|
|
57
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
|
|
58
58
|
|
|
59
59
|
/*
|
|
60
60
|
* Called for unmounting (detaching) a child component view from `self`
|
|
61
61
|
* component view.
|
|
62
62
|
* Receiver must remove `childComponentView` as a subview.
|
|
63
63
|
*/
|
|
64
|
-
- (void)unmountChildComponentView:(
|
|
64
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
|
|
65
65
|
|
|
66
66
|
/*
|
|
67
67
|
* Called for updating component's props.
|
|
@@ -114,7 +114,7 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) {
|
|
|
114
114
|
/*
|
|
115
115
|
* Read the last props used to update the view.
|
|
116
116
|
*/
|
|
117
|
-
- (facebook::react::
|
|
117
|
+
- (facebook::react::Props::Shared)props;
|
|
118
118
|
|
|
119
119
|
- (BOOL)isJSResponder;
|
|
120
120
|
- (void)setIsJSResponder:(BOOL)isJSResponder;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponentViewDescriptor.h>
|
|
11
11
|
#import <React/RCTComponentViewFactory.h>
|
|
@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
48
48
|
* Finds a native component view by given `tag`.
|
|
49
49
|
* Returns `nil` if there is no registered component with the `tag`.
|
|
50
50
|
*/
|
|
51
|
-
- (nullable
|
|
51
|
+
- (nullable RCTUIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(facebook::react::Tag)tag; // TODO(macOS GH#774)
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Creates a component view with a given type and puts it to the recycle pool.
|
|
@@ -31,10 +31,12 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024;
|
|
|
31
31
|
if (self = [super init]) {
|
|
32
32
|
_componentViewFactory = [RCTComponentViewFactory currentComponentViewFactory];
|
|
33
33
|
|
|
34
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
34
35
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
35
36
|
selector:@selector(handleApplicationDidReceiveMemoryWarningNotification)
|
|
36
37
|
name:UIApplicationDidReceiveMemoryWarningNotification
|
|
37
38
|
object:nil];
|
|
39
|
+
#endif // ]TODO(macOS GH#774)
|
|
38
40
|
|
|
39
41
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
40
42
|
// Calling this a bit later, when the main thread is probably idle while JavaScript thread is busy.
|
|
@@ -116,7 +118,7 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024;
|
|
|
116
118
|
return iterator->second;
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
- (nullable
|
|
121
|
+
- (nullable RCTUIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(Tag)tag // TODO(macOS GH#774)
|
|
120
122
|
{
|
|
121
123
|
RCTAssertMainQueue();
|
|
122
124
|
auto iterator = _registry.find(tag);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTMountingManagerDelegate.h>
|
|
11
11
|
#import <React/RCTPrimitives.h>
|
|
@@ -36,12 +36,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
36
36
|
* influence the intrinsic size of the view and cannot be measured using UIView/UIKit layout API.
|
|
37
37
|
* Must be called on the main thead.
|
|
38
38
|
*/
|
|
39
|
-
- (void)attachSurfaceToView:(
|
|
39
|
+
- (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774)
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Stops designating the view as a rendering viewport of a React Native surface.
|
|
43
43
|
*/
|
|
44
|
-
- (void)detachSurfaceFromView:(
|
|
44
|
+
- (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774)
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Schedule a mounting transaction to be performed on the main thread.
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#import "RCTMountingManager.h"
|
|
9
9
|
|
|
10
|
+
#import <QuartzCore/QuartzCore.h>
|
|
10
11
|
#import <butter/map.h>
|
|
11
12
|
|
|
12
13
|
#import <React/RCTAssert.h>
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
#import <React/RCTFollyConvert.h>
|
|
15
16
|
#import <React/RCTLog.h>
|
|
16
17
|
#import <React/RCTUtils.h>
|
|
18
|
+
#import <react/config/ReactNativeConfig.h>
|
|
17
19
|
#import <react/renderer/components/root/RootShadowNode.h>
|
|
18
20
|
#import <react/renderer/core/LayoutableShadowNode.h>
|
|
19
21
|
#import <react/renderer/core/RawProps.h>
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
|
|
28
30
|
using namespace facebook::react;
|
|
29
31
|
|
|
30
|
-
static SurfaceId RCTSurfaceIdForView(
|
|
32
|
+
static SurfaceId RCTSurfaceIdForView(RCTUIView *view) // TODO(macOS GH#774)
|
|
31
33
|
{
|
|
32
34
|
do {
|
|
33
35
|
if (RCTIsReactRootView(@(view.tag))) {
|
|
@@ -79,7 +81,7 @@ static void RCTPerformMountInstructions(
|
|
|
79
81
|
auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag];
|
|
80
82
|
auto &parentViewDescriptor = [registry componentViewDescriptorWithTag:parentShadowView.tag];
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
RCTUIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774)
|
|
83
85
|
|
|
84
86
|
RCTAssert(newChildShadowView.props, @"`newChildShadowView.props` must not be null.");
|
|
85
87
|
|
|
@@ -107,7 +109,7 @@ static void RCTPerformMountInstructions(
|
|
|
107
109
|
auto &oldChildShadowView = mutation.oldChildShadowView;
|
|
108
110
|
auto &newChildShadowView = mutation.newChildShadowView;
|
|
109
111
|
auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag];
|
|
110
|
-
|
|
112
|
+
RCTUIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774)
|
|
111
113
|
|
|
112
114
|
auto mask = RNComponentViewUpdateMask{};
|
|
113
115
|
|
|
@@ -166,7 +168,7 @@ static void RCTPerformMountInstructions(
|
|
|
166
168
|
_contextContainer = contextContainer;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
- (void)attachSurfaceToView:(
|
|
171
|
+
- (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774)
|
|
170
172
|
{
|
|
171
173
|
RCTAssertMainQueue();
|
|
172
174
|
|
|
@@ -177,7 +179,7 @@ static void RCTPerformMountInstructions(
|
|
|
177
179
|
[view addSubview:rootViewDescriptor.view];
|
|
178
180
|
}
|
|
179
181
|
|
|
180
|
-
- (void)detachSurfaceFromView:(
|
|
182
|
+
- (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774)
|
|
181
183
|
{
|
|
182
184
|
RCTAssertMainQueue();
|
|
183
185
|
RCTComponentViewDescriptor rootViewDescriptor = [_componentViewRegistry componentViewDescriptorWithTag:surfaceId];
|
|
@@ -285,7 +287,8 @@ static void RCTPerformMountInstructions(
|
|
|
285
287
|
{
|
|
286
288
|
ReactTag reactTag = shadowView.tag;
|
|
287
289
|
RCTExecuteOnMainQueue(^{
|
|
288
|
-
|
|
290
|
+
RCTUIView<RCTComponentViewProtocol> *componentView =
|
|
291
|
+
[self->_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
|
|
289
292
|
[componentView setIsJSResponder:isJSResponder];
|
|
290
293
|
});
|
|
291
294
|
}
|
|
@@ -295,10 +298,10 @@ static void RCTPerformMountInstructions(
|
|
|
295
298
|
componentDescriptor:(const ComponentDescriptor &)componentDescriptor
|
|
296
299
|
{
|
|
297
300
|
RCTAssertMainQueue();
|
|
298
|
-
|
|
301
|
+
RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
|
|
299
302
|
SurfaceId surfaceId = RCTSurfaceIdForView(componentView);
|
|
300
|
-
|
|
301
|
-
|
|
303
|
+
Props::Shared oldProps = [componentView props];
|
|
304
|
+
Props::Shared newProps = componentDescriptor.cloneProps(
|
|
302
305
|
PropsParserContext{surfaceId, *_contextContainer.get()}, oldProps, RawProps(convertIdToFollyDynamic(props)));
|
|
303
306
|
|
|
304
307
|
NSSet<NSString *> *propKeys = componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN ?: [NSSet new];
|
|
@@ -317,6 +320,11 @@ static void RCTPerformMountInstructions(
|
|
|
317
320
|
if (props[@"opacity"] && componentView.layer.opacity != (float)newViewProps.opacity) {
|
|
318
321
|
componentView.layer.opacity = newViewProps.opacity;
|
|
319
322
|
}
|
|
323
|
+
|
|
324
|
+
auto reactNativeConfig = _contextContainer->at<std::shared_ptr<ReactNativeConfig const>>("ReactNativeConfig");
|
|
325
|
+
if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:finalize_updates_on_synchronous_update_view_ios")) {
|
|
326
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
|
|
327
|
+
}
|
|
320
328
|
}
|
|
321
329
|
|
|
322
330
|
- (void)synchronouslyDispatchCommandOnUIThread:(ReactTag)reactTag
|
|
@@ -324,14 +332,14 @@ static void RCTPerformMountInstructions(
|
|
|
324
332
|
args:(NSArray *)args
|
|
325
333
|
{
|
|
326
334
|
RCTAssertMainQueue();
|
|
327
|
-
|
|
335
|
+
RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
|
|
328
336
|
[componentView handleCommand:commandName args:args];
|
|
329
337
|
}
|
|
330
338
|
|
|
331
339
|
- (void)synchronouslyDispatchAccessbilityEventOnUIThread:(ReactTag)reactTag eventType:(NSString *)eventType
|
|
332
340
|
{
|
|
333
341
|
if ([@"focus" isEqualToString:eventType]) {
|
|
334
|
-
|
|
342
|
+
RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
|
|
335
343
|
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, componentView);
|
|
336
344
|
}
|
|
337
345
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponentViewProtocol.h>
|
|
11
11
|
|
|
@@ -14,13 +14,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
14
|
/**
|
|
15
15
|
* Default implementation of RCTComponentViewProtocol.
|
|
16
16
|
*/
|
|
17
|
-
@interface
|
|
17
|
+
@interface RCTUIView (ComponentViewProtocol) <RCTComponentViewProtocol> // TODO(macOS GH#774)
|
|
18
18
|
|
|
19
19
|
+ (std::vector<facebook::react::ComponentDescriptorProvider>)supplementalComponentDescriptorProviders;
|
|
20
20
|
|
|
21
|
-
- (void)mountChildComponentView:(
|
|
21
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
|
|
22
22
|
|
|
23
|
-
- (void)unmountChildComponentView:(
|
|
23
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
|
|
24
24
|
|
|
25
25
|
- (void)updateProps:(facebook::react::Props::Shared const &)props
|
|
26
26
|
oldProps:(facebook::react::Props::Shared const &)oldProps;
|
|
@@ -37,14 +37,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
37
37
|
|
|
38
38
|
- (void)prepareForRecycle;
|
|
39
39
|
|
|
40
|
-
- (facebook::react::
|
|
40
|
+
- (facebook::react::Props::Shared)props;
|
|
41
41
|
|
|
42
42
|
- (void)setIsJSResponder:(BOOL)isJSResponder;
|
|
43
43
|
|
|
44
44
|
- (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(nullable NSSet<NSString *> *)props;
|
|
45
45
|
- (nullable NSSet<NSString *> *)propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
|
|
46
46
|
|
|
47
|
-
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(
|
|
47
|
+
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView; // TODO(macOS GH#774)
|
|
48
48
|
|
|
49
49
|
@end
|
|
50
50
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
using namespace facebook::react;
|
|
17
17
|
|
|
18
|
-
@implementation
|
|
18
|
+
@implementation RCTUIView (ComponentViewProtocol) // TODO(macOS GH#774)
|
|
19
19
|
|
|
20
20
|
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
21
21
|
{
|
|
@@ -28,7 +28,7 @@ using namespace facebook::react;
|
|
|
28
28
|
return {};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
- (void)mountChildComponentView:(
|
|
31
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
32
32
|
{
|
|
33
33
|
RCTAssert(
|
|
34
34
|
childComponentView.superview == nil,
|
|
@@ -40,7 +40,7 @@ using namespace facebook::react;
|
|
|
40
40
|
[self insertSubview:childComponentView atIndex:index];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
- (void)unmountChildComponentView:(
|
|
43
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
44
44
|
{
|
|
45
45
|
RCTAssert(
|
|
46
46
|
childComponentView.superview == self,
|
|
@@ -129,7 +129,7 @@ using namespace facebook::react;
|
|
|
129
129
|
// Default implementation does nothing.
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
- (facebook::react::
|
|
132
|
+
- (facebook::react::Props::Shared)props
|
|
133
133
|
{
|
|
134
134
|
RCTAssert(NO, @"props access should be implemented by RCTViewComponentView.");
|
|
135
135
|
return nullptr;
|
|
@@ -156,14 +156,14 @@ using namespace facebook::react;
|
|
|
156
156
|
return nil;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(
|
|
159
|
+
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774)
|
|
160
160
|
{
|
|
161
161
|
clipRect = [clipView convertRect:clipRect toView:self];
|
|
162
162
|
|
|
163
163
|
// Normal views don't support unmounting, so all
|
|
164
164
|
// this does is forward message to our subviews,
|
|
165
165
|
// in case any of those do support it
|
|
166
|
-
for (
|
|
166
|
+
for (RCTUIView *subview in self.subviews) { // TODO(macOS GH#774)
|
|
167
167
|
[subview updateClippedSubviewsWithClipRect:clipRect relativeToView:self];
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <react/renderer/components/view/AccessibilityPrimitives.h>
|
|
11
11
|
#import <react/renderer/components/view/primitives.h>
|
|
@@ -35,26 +35,26 @@ inline std::string RCTStringFromNSString(NSString *string)
|
|
|
35
35
|
return std::string{string.UTF8String ?: ""};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
inline
|
|
38
|
+
inline RCTUIColor *_Nullable RCTUIColorFromSharedColor(facebook::react::SharedColor const &sharedColor) // TODO(macOS GH#774)
|
|
39
39
|
{
|
|
40
40
|
if (!sharedColor) {
|
|
41
41
|
return nil;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (*facebook::react::clearColor() == *sharedColor) {
|
|
45
|
-
return [
|
|
45
|
+
return [RCTUIColor clearColor]; // TODO(macOS GH#774)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
if (*facebook::react::blackColor() == *sharedColor) {
|
|
49
|
-
return [
|
|
49
|
+
return [RCTUIColor blackColor]; // TODO(macOS GH#774)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
if (*facebook::react::whiteColor() == *sharedColor) {
|
|
53
|
-
return [
|
|
53
|
+
return [RCTUIColor whiteColor]; // TODO(macOS GH#774)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
auto components = facebook::react::colorComponentsFromColor(sharedColor);
|
|
57
|
-
return [
|
|
57
|
+
return [RCTUIColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha]; // TODO(macOS GH#774)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
inline CF_RETURNS_RETAINED CGColorRef
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#import <
|
|
8
|
+
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
9
9
|
|
|
10
10
|
#import <React/RCTPrimitives.h>
|
|
11
11
|
#import <React/RCTSurfacePresenterStub.h>
|
|
@@ -56,6 +56,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
56
56
|
@property (readonly) RCTMountingManager *mountingManager;
|
|
57
57
|
@property (readonly, nullable) RCTScheduler *scheduler;
|
|
58
58
|
|
|
59
|
+
/*
|
|
60
|
+
* Allow callers to initialize a new fabric surface without adding Fabric as a Buck dependency.
|
|
61
|
+
*/
|
|
62
|
+
- (id<RCTSurfaceProtocol>)createFabricSurfaceForModuleName:(NSString *)moduleName
|
|
63
|
+
initialProperties:(NSDictionary *)initialProperties;
|
|
64
|
+
|
|
59
65
|
- (nullable RCTFabricSurface *)surfaceForRootTag:(ReactTag)rootTag;
|
|
60
66
|
|
|
61
67
|
- (BOOL)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag props:(NSDictionary *)props;
|
|
@@ -72,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
72
78
|
/*
|
|
73
79
|
* Please do not use this, this will be deleted soon.
|
|
74
80
|
*/
|
|
75
|
-
- (nullable
|
|
81
|
+
- (nullable RCTUIView *)findComponentViewWithTag_DO_NOT_USE_DEPRECATED:(NSInteger)tag; // TODO(macOS GH#774)
|
|
76
82
|
|
|
77
83
|
@end
|
|
78
84
|
|