react-native-macos 0.0.0-cb5eaa9e1 → 0.0.0-ccc088f1d
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/Alert/Alert.js +115 -6
- package/Libraries/Alert/NativeAlertManager.js +1 -19
- package/Libraries/Animated/animations/TimingAnimation.js +2 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +20 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/Pressable/Pressable.js +2 -3
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.js +7 -0
- package/Libraries/Components/View/ViewAccessibility.js +0 -5
- package/Libraries/Components/View/ViewNativeComponent.js +64 -7
- package/Libraries/Components/View/ViewPropTypes.js +97 -117
- package/Libraries/Core/ReactNativeVersion.js +1 -5
- package/Libraries/Core/setUpReactDevTools.js +3 -2
- package/Libraries/Image/RCTImageLoader.mm +19 -13
- package/Libraries/Image/RCTImageView.h +0 -8
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/Inspector/Inspector.js +2 -4
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/Lists/VirtualizedList.js +13 -1
- package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
- 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/NativeComponent/PlatformBaseViewConfig.js +506 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +5 -1
- package/Libraries/NativeComponent/ViewConfig.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +27 -0
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/Pressability/PressabilityDebug.js +5 -9
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/ReactNative/DummyUIManager.js +5 -3
- package/Libraries/ReactNative/UIManager.js +1 -2
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -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.h +1 -1
- package/Libraries/Text/Text/RCTTextView.m +8 -14
- package/Libraries/Text/Text.js +0 -6
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +5 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +55 -5
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +2 -0
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +1 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +7 -3
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +2 -2
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +7 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +2 -3
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTAssert.h +30 -15
- package/React/Base/RCTAssert.m +59 -19
- package/React/Base/RCTBridge.m +5 -3
- package/React/Base/RCTConstants.h +6 -0
- package/React/Base/RCTConstants.m +15 -0
- package/React/Base/RCTEventDispatcherProtocol.h +5 -0
- package/React/Base/RCTRootContentView.m +2 -2
- package/React/Base/RCTTouchHandler.m +4 -3
- package/React/Base/RCTUIKit.h +91 -19
- package/React/Base/RCTVersion.m +1 -5
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
- package/React/Base/macOS/RCTUIKit.m +83 -7
- package/React/CoreModules/RCTAlertManager.mm +1 -1
- package/React/CoreModules/RCTEventDispatcher.mm +6 -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/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
- 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 +2 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
- 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 +10 -5
- 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/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +98 -34
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +19 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +5 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +3 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +4 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +6 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +39 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +9 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +16 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +6 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +14 -4
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +41 -23
- 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 +12 -3
- 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 +4 -4
- package/React/Fabric/Mounting/RCTMountingManager.mm +30 -19
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
- package/React/Fabric/RCTConversions.h +17 -7
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +8 -1
- package/React/Fabric/RCTScheduler.mm +15 -0
- package/React/Fabric/RCTSurfacePresenter.h +10 -2
- package/React/Fabric/RCTSurfacePresenter.mm +59 -27
- 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 -9
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +3 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/Modules/RCTUIManager.h +1 -1
- package/React/Modules/RCTUIManager.m +6 -5
- package/React/React-RCTFabric.podspec +2 -2
- 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/RCTSlider.h +4 -0
- package/React/Views/RCTSwitch.h +1 -10
- package/React/Views/RCTSwitch.m +0 -20
- package/React/Views/RCTSwitchManager.m +0 -4
- package/React/Views/RCTView.m +8 -3
- package/React/Views/RCTViewManager.m +2 -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 +1 -31
- package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +66 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +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/statusbar/StatusBarModule.java +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +19 -0
- 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/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +5 -2
- package/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java +9 -0
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -5
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/hermes/inspector/Exceptions.h +6 -0
- package/ReactCommon/hermes/inspector/Inspector.cpp +5 -2
- package/ReactCommon/hermes/inspector/Inspector.h +14 -0
- package/ReactCommon/hermes/inspector/InspectorState.cpp +16 -8
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +6 -6
- 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/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
- 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/EventDispatcher.cpp +21 -0
- package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
- package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
- package/ReactCommon/react/renderer/core/EventListener.h +44 -0
- 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/React-graphics.podspec +1 -1
- 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/mounting/TelemetryController.cpp +6 -9
- package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +38 -32
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +18 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +40 -4
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -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/RCTTextLayoutManager.mm +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/index.js +0 -11
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
- package/package.json +4 -1
- package/scripts/react_native_pods.rb +1 -1
- package/template/Gemfile.lock +5 -5
- package/template/package.json +1 -1
- package/Libraries/Alert/AlertMacOS.js +0 -211
- package/Libraries/Components/View/PlatformViewPropTypes.macos.js +0 -16
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -374
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/ReactNative/UIManagerInjection.js +0 -15
- package/ReactCommon/butter/optional.h +0 -38
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
#import <React/RCTLog.h>
|
|
11
11
|
#import <React/RCTSurface.h>
|
|
12
|
+
#import <React/RCTSurfaceHostingView.h>
|
|
12
13
|
|
|
13
14
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
14
15
|
|
|
15
|
-
@implementation
|
|
16
|
+
@implementation RCTLogBoxView {
|
|
16
17
|
RCTSurface *_surface;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -34,35 +35,53 @@
|
|
|
34
35
|
self.rootViewController = _rootViewController;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
38
|
+
- (instancetype)initWithFrame:(CGRect)frame surfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
|
|
38
39
|
{
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
if (self = [super initWithFrame:frame]) {
|
|
41
|
+
id<RCTSurfaceProtocol> surface = [surfacePresenter createFabricSurfaceForModuleName:@"LogBox"
|
|
42
|
+
initialProperties:@{}];
|
|
43
|
+
[surface start];
|
|
44
|
+
RCTSurfaceHostingView *rootView = [[RCTSurfaceHostingView alloc]
|
|
45
|
+
initWithSurface:surface
|
|
46
|
+
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
|
|
47
|
+
|
|
48
|
+
[self createRootViewController:rootView];
|
|
49
|
+
}
|
|
50
|
+
return self;
|
|
51
|
+
}
|
|
42
52
|
|
|
43
|
-
|
|
53
|
+
- (instancetype)initWithWindow:(UIWindow *)window bridge:(RCTBridge *)bridge
|
|
54
|
+
{
|
|
55
|
+
if (@available(iOS 13.0, *)) {
|
|
56
|
+
self = [super initWithWindowScene:window.windowScene];
|
|
57
|
+
} else {
|
|
58
|
+
self = [super initWithFrame:window.frame];
|
|
59
|
+
}
|
|
44
60
|
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
self.windowLevel = UIWindowLevelStatusBar - 1;
|
|
62
|
+
self.backgroundColor = [UIColor clearColor];
|
|
47
63
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
64
|
+
_surface = [[RCTSurface alloc] initWithBridge:bridge moduleName:@"LogBox" initialProperties:@{}];
|
|
65
|
+
[_surface start];
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
if (![_surface synchronouslyWaitForStage:RCTSurfaceStageSurfaceDidInitialMounting timeout:1]) {
|
|
68
|
+
RCTLogInfo(@"Failed to mount LogBox within 1s");
|
|
53
69
|
}
|
|
70
|
+
[self createRootViewController:(UIView *)_surface.view];
|
|
71
|
+
|
|
54
72
|
return self;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
- (void)
|
|
75
|
+
- (void)layoutSubviews
|
|
58
76
|
{
|
|
59
|
-
[
|
|
77
|
+
[super layoutSubviews];
|
|
78
|
+
[_surface setSize:self.frame.size];
|
|
60
79
|
}
|
|
61
80
|
|
|
62
|
-
- (void)
|
|
81
|
+
- (void)dealloc
|
|
63
82
|
{
|
|
64
|
-
[
|
|
65
|
-
}
|
|
83
|
+
[RCTSharedApplication().delegate.window makeKeyWindow];
|
|
84
|
+
}
|
|
66
85
|
|
|
67
86
|
- (void)show
|
|
68
87
|
{
|
|
@@ -74,10 +93,30 @@
|
|
|
74
93
|
|
|
75
94
|
#else // [TODO(macOS GH#774)
|
|
76
95
|
|
|
77
|
-
@implementation
|
|
96
|
+
@implementation RCTLogBoxView {
|
|
78
97
|
RCTSurface *_surface;
|
|
79
98
|
}
|
|
80
99
|
|
|
100
|
+
- (instancetype)initWithSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
|
|
101
|
+
{
|
|
102
|
+
NSRect bounds = NSMakeRect(0, 0, 600, 800);
|
|
103
|
+
if ((self = [self initWithContentRect:bounds
|
|
104
|
+
styleMask:NSWindowStyleMaskTitled
|
|
105
|
+
backing:NSBackingStoreBuffered
|
|
106
|
+
defer:YES])) {
|
|
107
|
+
id<RCTSurfaceProtocol> surface = [surfacePresenter createFabricSurfaceForModuleName:@"LogBox"
|
|
108
|
+
initialProperties:@{}];
|
|
109
|
+
[surface start];
|
|
110
|
+
RCTSurfaceHostingView *rootView = [[RCTSurfaceHostingView alloc]
|
|
111
|
+
initWithSurface:surface
|
|
112
|
+
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
|
|
113
|
+
|
|
114
|
+
self.contentView = rootView;
|
|
115
|
+
self.contentView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
|
116
|
+
}
|
|
117
|
+
return self;
|
|
118
|
+
}
|
|
119
|
+
|
|
81
120
|
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
|
82
121
|
{
|
|
83
122
|
NSRect bounds = NSMakeRect(0, 0, 600, 800);
|
|
@@ -100,13 +139,15 @@
|
|
|
100
139
|
return self;
|
|
101
140
|
}
|
|
102
141
|
|
|
103
|
-
- (void)
|
|
142
|
+
- (void)setHidden:(BOOL)hidden // [TODO(macOS GH#774)
|
|
104
143
|
{
|
|
105
|
-
if (
|
|
106
|
-
|
|
144
|
+
if (hidden) {
|
|
145
|
+
if (NSApp.modalWindow == self) {
|
|
146
|
+
[NSApp stopModal];
|
|
147
|
+
}
|
|
148
|
+
[self orderOut:nil];
|
|
107
149
|
}
|
|
108
|
-
|
|
109
|
-
}
|
|
150
|
+
} // ]TODO(macOS GH#774)
|
|
110
151
|
|
|
111
152
|
- (void)show
|
|
112
153
|
{
|
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
s.header_dir = "CoreModules"
|
|
38
38
|
s.pod_target_xcconfig = {
|
|
39
39
|
"USE_HEADERMAP" => "YES",
|
|
40
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++
|
|
40
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
41
41
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import "RCTActivityIndicatorViewComponentView.h"
|
|
9
9
|
|
|
10
10
|
#import <React/RCTConversions.h>
|
|
11
|
+
#import <React/RCTActivityIndicatorView.h> // TODO(macOS GH#774)
|
|
11
12
|
|
|
12
13
|
#import <react/renderer/components/rncore/ComponentDescriptors.h>
|
|
13
14
|
#import <react/renderer/components/rncore/EventEmitters.h>
|
|
@@ -28,7 +29,7 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
@implementation RCTActivityIndicatorViewComponentView {
|
|
31
|
-
|
|
32
|
+
RCTUIActivityIndicatorView *_activityIndicatorView; // TODO(macOS GH#774)
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
#pragma mark - RCTComponentViewProtocol
|
|
@@ -44,7 +45,7 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti
|
|
|
44
45
|
static const auto defaultProps = std::make_shared<const ActivityIndicatorViewProps>();
|
|
45
46
|
_props = defaultProps;
|
|
46
47
|
|
|
47
|
-
_activityIndicatorView = [[
|
|
48
|
+
_activityIndicatorView = [[RCTUIActivityIndicatorView alloc] initWithFrame:self.bounds]; // TODO(macOS GH#774)
|
|
48
49
|
_activityIndicatorView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
49
50
|
|
|
50
51
|
if (defaultProps->animating) {
|
package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm
CHANGED
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
|
|
21
21
|
using namespace facebook::react;
|
|
22
22
|
|
|
23
|
-
static
|
|
23
|
+
static RCTUIView<RCTBackedTextInputViewProtocol> *_Nullable RCTFindTextInputWithNativeId(RCTUIView *view, NSString *nativeId) // TODO(macOS GH#774)
|
|
24
24
|
{
|
|
25
25
|
if ([view respondsToSelector:@selector(inputAccessoryViewID)] &&
|
|
26
26
|
[view respondsToSelector:@selector(setInputAccessoryView:)]) {
|
|
27
|
-
|
|
27
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *typed = (RCTUIView<RCTBackedTextInputViewProtocol> *)view; // TODO(macOS GH#774)
|
|
28
28
|
if (!nativeId || [typed.inputAccessoryViewID isEqualToString:nativeId]) {
|
|
29
29
|
return typed;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
for (
|
|
34
|
-
|
|
33
|
+
for (RCTUIView *subview in view.subviews) { // TODO(macOS GH#774)
|
|
34
|
+
RCTUIView<RCTBackedTextInputViewProtocol> *result = RCTFindTextInputWithNativeId(subview, nativeId); // TODO(macOS GH#774)
|
|
35
35
|
if (result) {
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
@@ -44,7 +44,7 @@ static UIView<RCTBackedTextInputViewProtocol> *_Nullable RCTFindTextInputWithNat
|
|
|
44
44
|
InputAccessoryShadowNode::ConcreteState::Shared _state;
|
|
45
45
|
RCTInputAccessoryContentView *_contentView;
|
|
46
46
|
RCTSurfaceTouchHandler *_touchHandler;
|
|
47
|
-
|
|
47
|
+
RCTUIView<RCTBackedTextInputViewProtocol> __weak *_textInput; // TODO(macOS GH#774)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
@@ -83,7 +83,7 @@ static UIView<RCTBackedTextInputViewProtocol> *_Nullable RCTFindTextInputWithNat
|
|
|
83
83
|
return true;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
- (
|
|
86
|
+
- (RCTUIView *)inputAccessoryView // TODO(macOS GH#774)
|
|
87
87
|
{
|
|
88
88
|
return _contentView;
|
|
89
89
|
}
|
|
@@ -95,12 +95,12 @@ static UIView<RCTBackedTextInputViewProtocol> *_Nullable RCTFindTextInputWithNat
|
|
|
95
95
|
return concreteComponentDescriptorProvider<InputAccessoryComponentDescriptor>();
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
- (void)mountChildComponentView:(
|
|
98
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
99
99
|
{
|
|
100
100
|
[_contentView insertSubview:childComponentView atIndex:index];
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
- (void)unmountChildComponentView:(
|
|
103
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
104
104
|
{
|
|
105
105
|
[childComponentView removeFromSuperview];
|
|
106
106
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
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
|
-
@interface RCTInputAccessoryContentView :
|
|
10
|
+
@interface RCTInputAccessoryContentView : RCTUIView // TODO(macOS GH#774)
|
|
11
11
|
|
|
12
12
|
@end
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
#import "RCTInputAccessoryContentView.h"
|
|
9
9
|
|
|
10
10
|
@implementation RCTInputAccessoryContentView {
|
|
11
|
-
|
|
11
|
+
RCTUIView *_safeAreaContainer; // TODO(macOS GH#774)
|
|
12
12
|
NSLayoutConstraint *_heightConstraint;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
if (self = [super init]) {
|
|
18
18
|
self.autoresizingMask = UIViewAutoresizingFlexibleHeight;
|
|
19
19
|
|
|
20
|
-
_safeAreaContainer = [
|
|
20
|
+
_safeAreaContainer = [RCTUIView new]; // TODO(macOS GH#774)
|
|
21
21
|
_safeAreaContainer.translatesAutoresizingMaskIntoConstraints = NO;
|
|
22
22
|
[self addSubview:_safeAreaContainer];
|
|
23
23
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
return CGSizeZero;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
- (void)insertSubview:(
|
|
43
|
+
- (void)insertSubview:(RCTUIView *)view atIndex:(NSInteger)index // TODO(macOS GH#774)
|
|
44
44
|
{
|
|
45
45
|
[_safeAreaContainer insertSubview:view atIndex:index];
|
|
46
46
|
}
|
|
@@ -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/RCTViewComponentView.h>
|
|
11
11
|
|
|
@@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
19
19
|
+ (BOOL)isSupported:(NSString *)componentName;
|
|
20
20
|
|
|
21
21
|
+ (void)supportLegacyViewManagerWithName:(NSString *)componentName;
|
|
22
|
+
+ (void)supportLegacyViewManagersWithPrefix:(NSString *)prefix;
|
|
22
23
|
|
|
23
24
|
@end
|
|
24
25
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import "RCTLegacyViewManagerInteropComponentView.h"
|
|
9
9
|
|
|
10
10
|
#import <React/RCTAssert.h>
|
|
11
|
+
#import <React/RCTConstants.h>
|
|
11
12
|
#import <React/UIView+React.h>
|
|
12
13
|
#import <react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h>
|
|
13
14
|
#import <react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h>
|
|
@@ -21,28 +22,28 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
21
22
|
|
|
22
23
|
@implementation RCTLegacyViewManagerInteropComponentView {
|
|
23
24
|
NSMutableArray<NSDictionary *> *_viewsToBeMounted;
|
|
24
|
-
NSMutableArray<
|
|
25
|
+
NSMutableArray<RCTUIView *> *_viewsToBeUnmounted; // TODO(macOS GH#774)
|
|
25
26
|
RCTLegacyViewManagerInteropCoordinatorAdapter *_adapter;
|
|
26
27
|
LegacyViewManagerInteropShadowNode::ConcreteState::Shared _state;
|
|
28
|
+
BOOL _hasInvokedForwardingWarning;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
30
32
|
{
|
|
31
33
|
if (self = [super initWithFrame:frame]) {
|
|
32
|
-
RCTWarnNotAllowedForNewArchitecture(
|
|
33
|
-
self, @"ViewManager with interop layer is not allowed in the new architecture.");
|
|
34
34
|
static const auto defaultProps = std::make_shared<const LegacyViewManagerInteropViewProps>();
|
|
35
35
|
_props = defaultProps;
|
|
36
36
|
_viewsToBeMounted = [NSMutableArray new];
|
|
37
37
|
_viewsToBeUnmounted = [NSMutableArray new];
|
|
38
|
+
_hasInvokedForwardingWarning = NO;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
return self;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
- (
|
|
44
|
+
- (RCTUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774)
|
|
44
45
|
{
|
|
45
|
-
|
|
46
|
+
RCTUIView *result = [super hitTest:point withEvent:event]; // TODO(macOS GH#774)
|
|
46
47
|
|
|
47
48
|
if (result == _adapter.paperView) {
|
|
48
49
|
return self;
|
|
@@ -51,6 +52,41 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
51
52
|
return result;
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
- (RCTLegacyViewManagerInteropCoordinator *)_coordinator
|
|
56
|
+
{
|
|
57
|
+
if (_state != nullptr) {
|
|
58
|
+
const auto &state = _state->getData();
|
|
59
|
+
return unwrapManagedObject(state.coordinator);
|
|
60
|
+
} else {
|
|
61
|
+
return nil;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
- (NSString *)componentViewName_DO_NOT_USE_THIS_IS_BROKEN
|
|
66
|
+
{
|
|
67
|
+
const auto &state = _state->getData();
|
|
68
|
+
RCTLegacyViewManagerInteropCoordinator *coordinator = unwrapManagedObject(state.coordinator);
|
|
69
|
+
return coordinator.componentViewName;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#pragma mark - Method forwarding
|
|
73
|
+
|
|
74
|
+
- (void)forwardInvocation:(NSInvocation *)anInvocation
|
|
75
|
+
{
|
|
76
|
+
if (!_hasInvokedForwardingWarning) {
|
|
77
|
+
_hasInvokedForwardingWarning = YES;
|
|
78
|
+
NSLog(
|
|
79
|
+
@"Invoked unsupported method on RCTLegacyViewManagerInteropComponentView. Resulting to noop instead of a crash.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
|
|
84
|
+
{
|
|
85
|
+
return [super methodSignatureForSelector:aSelector] ?: [self.contentView methodSignatureForSelector:aSelector];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#pragma mark - Supported ViewManagers
|
|
89
|
+
|
|
54
90
|
+ (NSMutableSet<NSString *> *)supportedViewManagers
|
|
55
91
|
{
|
|
56
92
|
static NSMutableSet<NSString *> *supported = [NSMutableSet setWithObjects:@"DatePicker",
|
|
@@ -65,31 +101,39 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
65
101
|
return supported;
|
|
66
102
|
}
|
|
67
103
|
|
|
68
|
-
+ (
|
|
104
|
+
+ (NSMutableSet<NSString *> *)supportedViewManagersPrefixes
|
|
69
105
|
{
|
|
70
|
-
|
|
106
|
+
static NSMutableSet<NSString *> *supported = [NSMutableSet new];
|
|
107
|
+
return supported;
|
|
71
108
|
}
|
|
72
109
|
|
|
73
|
-
+ (
|
|
110
|
+
+ (BOOL)isSupported:(NSString *)componentName
|
|
74
111
|
{
|
|
75
|
-
|
|
112
|
+
// Step 1: check if ViewManager with specified name is supported.
|
|
113
|
+
BOOL isComponentNameSupported =
|
|
114
|
+
[[RCTLegacyViewManagerInteropComponentView supportedViewManagers] containsObject:componentName];
|
|
115
|
+
if (isComponentNameSupported) {
|
|
116
|
+
return YES;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Step 2: check if component has supported prefix.
|
|
120
|
+
for (NSString *item in [RCTLegacyViewManagerInteropComponentView supportedViewManagersPrefixes]) {
|
|
121
|
+
if ([componentName hasPrefix:item]) {
|
|
122
|
+
return YES;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return NO;
|
|
76
127
|
}
|
|
77
128
|
|
|
78
|
-
|
|
129
|
+
+ (void)supportLegacyViewManagersWithPrefix:(NSString *)prefix
|
|
79
130
|
{
|
|
80
|
-
|
|
81
|
-
const auto &state = _state->getData();
|
|
82
|
-
return unwrapManagedObject(state.coordinator);
|
|
83
|
-
} else {
|
|
84
|
-
return nil;
|
|
85
|
-
}
|
|
131
|
+
[[RCTLegacyViewManagerInteropComponentView supportedViewManagersPrefixes] addObject:prefix];
|
|
86
132
|
}
|
|
87
133
|
|
|
88
|
-
|
|
134
|
+
+ (void)supportLegacyViewManagerWithName:(NSString *)componentName
|
|
89
135
|
{
|
|
90
|
-
|
|
91
|
-
RCTLegacyViewManagerInteropCoordinator *coordinator = unwrapManagedObject(state.coordinator);
|
|
92
|
-
return coordinator.componentViewName;
|
|
136
|
+
[[RCTLegacyViewManagerInteropComponentView supportedViewManagers] addObject:componentName];
|
|
93
137
|
}
|
|
94
138
|
|
|
95
139
|
#pragma mark - RCTComponentViewProtocol
|
|
@@ -101,10 +145,11 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
101
145
|
[_viewsToBeUnmounted removeAllObjects];
|
|
102
146
|
_state.reset();
|
|
103
147
|
self.contentView = nil;
|
|
148
|
+
_hasInvokedForwardingWarning = NO;
|
|
104
149
|
[super prepareForRecycle];
|
|
105
150
|
}
|
|
106
151
|
|
|
107
|
-
- (void)mountChildComponentView:(
|
|
152
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
108
153
|
{
|
|
109
154
|
[_viewsToBeMounted addObject:@{
|
|
110
155
|
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
|
|
@@ -112,7 +157,7 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
112
157
|
}];
|
|
113
158
|
}
|
|
114
159
|
|
|
115
|
-
- (void)unmountChildComponentView:(
|
|
160
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
116
161
|
{
|
|
117
162
|
if (_adapter) {
|
|
118
163
|
[_adapter.paperView removeReactSubview:childComponentView];
|
|
@@ -136,7 +181,7 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
136
181
|
[super finalizeUpdates:updateMask];
|
|
137
182
|
|
|
138
183
|
if (!_adapter) {
|
|
139
|
-
_adapter = [[RCTLegacyViewManagerInteropCoordinatorAdapter alloc] initWithCoordinator:self
|
|
184
|
+
_adapter = [[RCTLegacyViewManagerInteropCoordinatorAdapter alloc] initWithCoordinator:[self _coordinator]
|
|
140
185
|
reactTag:self.tag];
|
|
141
186
|
__weak __typeof(self) weakSelf = self;
|
|
142
187
|
_adapter.eventInterceptor = ^(std::string eventName, folly::dynamic event) {
|
|
@@ -153,12 +198,17 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
|
|
153
198
|
for (NSDictionary *mountInstruction in _viewsToBeMounted) {
|
|
154
199
|
NSNumber *index = mountInstruction[kRCTLegacyInteropChildIndexKey];
|
|
155
200
|
UIView *childView = mountInstruction[kRCTLegacyInteropChildComponentKey];
|
|
156
|
-
[
|
|
201
|
+
if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
|
|
202
|
+
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView;
|
|
203
|
+
[_adapter.paperView insertReactSubview:target atIndex:index.integerValue];
|
|
204
|
+
} else {
|
|
205
|
+
[_adapter.paperView insertReactSubview:childView atIndex:index.integerValue];
|
|
206
|
+
}
|
|
157
207
|
}
|
|
158
208
|
|
|
159
209
|
[_viewsToBeMounted removeAllObjects];
|
|
160
210
|
|
|
161
|
-
for (
|
|
211
|
+
for (RCTUIView *view in _viewsToBeUnmounted) { // TODO(macOS GH#774)
|
|
162
212
|
[_adapter.paperView removeReactSubview:view];
|
|
163
213
|
}
|
|
164
214
|
|
|
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
14
|
|
|
15
15
|
- (instancetype)initWithCoordinator:(RCTLegacyViewManagerInteropCoordinator *)coordinator reactTag:(NSInteger)tag;
|
|
16
16
|
|
|
17
|
-
@property (strong, nonatomic)
|
|
17
|
+
@property (strong, nonatomic) RCTUIView *paperView; // TODO(macOS GH#774)
|
|
18
18
|
|
|
19
19
|
@property (nonatomic, copy, nullable) void (^eventInterceptor)(std::string eventName, folly::dynamic event);
|
|
20
20
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
@interface RCTModalHostViewComponentView : RCTViewComponentView <RCTMountingTransactionObserving>
|
|
15
15
|
|
|
16
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
16
17
|
/**
|
|
17
18
|
* Subclasses may override this method and present the modal on different view controller.
|
|
18
19
|
* Default implementation presents the modal on `[self reactViewController]`.
|
|
@@ -28,5 +29,6 @@
|
|
|
28
29
|
- (void)dismissViewController:(UIViewController *)modalViewController
|
|
29
30
|
animated:(BOOL)animated
|
|
30
31
|
completion:(void (^)(void))completion;
|
|
32
|
+
#endif // ]TODO(macOS GH#774)
|
|
31
33
|
|
|
32
34
|
@end
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
using namespace facebook::react;
|
|
23
23
|
|
|
24
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
24
25
|
static UIInterfaceOrientationMask supportedOrientationsMask(ModalHostViewSupportedOrientationsMask mask)
|
|
25
26
|
{
|
|
26
27
|
UIInterfaceOrientationMask supportedOrientations = 0;
|
|
@@ -93,6 +94,7 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
|
|
93
94
|
: ModalHostViewEventEmitter::OnOrientationChangeOrientation::Landscape;
|
|
94
95
|
return {orientation};
|
|
95
96
|
}
|
|
97
|
+
#endif // ]TODO(macOS GH#774)
|
|
96
98
|
|
|
97
99
|
@interface RCTModalHostViewComponentView () <RCTFabricModalHostViewControllerDelegate>
|
|
98
100
|
|
|
@@ -104,9 +106,10 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
|
|
104
106
|
BOOL _shouldAnimatePresentation;
|
|
105
107
|
BOOL _shouldPresent;
|
|
106
108
|
BOOL _isPresented;
|
|
107
|
-
|
|
109
|
+
RCTUIView *_modalContentsSnapshot; // TODO(macOS GH#774)
|
|
108
110
|
}
|
|
109
111
|
|
|
112
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
110
113
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
111
114
|
{
|
|
112
115
|
if (self = [super initWithFrame:frame]) {
|
|
@@ -165,7 +168,7 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
|
|
165
168
|
_isPresented = NO;
|
|
166
169
|
// To animate dismissal of view controller, snapshot of
|
|
167
170
|
// view hierarchy needs to be added to the UIViewController.
|
|
168
|
-
|
|
171
|
+
RCTUIView *snapshot = _modalContentsSnapshot; // TODO(macOS GH#774)
|
|
169
172
|
[self.viewController.view addSubview:snapshot];
|
|
170
173
|
|
|
171
174
|
[self dismissViewController:self.viewController
|
|
@@ -192,7 +195,8 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
|
|
192
195
|
|
|
193
196
|
#pragma mark - RCTMountingTransactionObserving
|
|
194
197
|
|
|
195
|
-
- (void)
|
|
198
|
+
- (void)mountingTransactionWillMount:(MountingTransaction const &)transaction
|
|
199
|
+
withSurfaceTelemetry:(facebook::react::SurfaceTelemetry const &)surfaceTelemetry
|
|
196
200
|
{
|
|
197
201
|
_modalContentsSnapshot = [self.viewController.view snapshotViewAfterScreenUpdates:NO];
|
|
198
202
|
}
|
|
@@ -268,15 +272,16 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
|
|
268
272
|
_state = std::static_pointer_cast<const ModalHostViewShadowNode::ConcreteState>(state);
|
|
269
273
|
}
|
|
270
274
|
|
|
271
|
-
- (void)mountChildComponentView:(
|
|
275
|
+
- (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
272
276
|
{
|
|
273
277
|
[self.viewController.view insertSubview:childComponentView atIndex:index];
|
|
274
278
|
}
|
|
275
279
|
|
|
276
|
-
- (void)unmountChildComponentView:(
|
|
280
|
+
- (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
|
|
277
281
|
{
|
|
278
282
|
[childComponentView removeFromSuperview];
|
|
279
283
|
}
|
|
284
|
+
#endif // ]TODO(macOS GH#774)
|
|
280
285
|
|
|
281
286
|
@end
|
|
282
287
|
|