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
|
@@ -15,3 +15,9 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec
|
|
|
15
15
|
*/
|
|
16
16
|
RCT_EXTERN BOOL RCTExperimentGetPreemptiveViewAllocationDisabled(void);
|
|
17
17
|
RCT_EXTERN void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value);
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* W3C Pointer Events
|
|
21
|
+
*/
|
|
22
|
+
RCT_EXTERN BOOL RCTGetDispatchW3CPointerEvents(void);
|
|
23
|
+
RCT_EXTERN void RCTSetDispatchW3CPointerEvents(BOOL value);
|
|
@@ -24,3 +24,18 @@ void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value)
|
|
|
24
24
|
{
|
|
25
25
|
RCTExperimentPreemptiveViewAllocationDisabled = value;
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* W3C Pointer Events
|
|
30
|
+
*/
|
|
31
|
+
static BOOL RCTDispatchW3CPointerEvents = NO;
|
|
32
|
+
|
|
33
|
+
BOOL RCTGetDispatchW3CPointerEvents()
|
|
34
|
+
{
|
|
35
|
+
return RCTDispatchW3CPointerEvents;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
void RCTSetDispatchW3CPointerEvents(BOOL value)
|
|
39
|
+
{
|
|
40
|
+
RCTDispatchW3CPointerEvents = value;
|
|
41
|
+
}
|
|
@@ -102,6 +102,11 @@ typedef NS_ENUM(NSInteger, RCTTextEventType) {
|
|
|
102
102
|
key:(NSString *)key
|
|
103
103
|
eventCount:(NSInteger)eventCount;
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Notify Observers of event
|
|
107
|
+
*/
|
|
108
|
+
- (void)notifyObserversOfEvent:(id<RCTEvent>)event;
|
|
109
|
+
|
|
105
110
|
/**
|
|
106
111
|
* Send a pre-prepared event object.
|
|
107
112
|
*
|
|
@@ -132,10 +132,10 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (nonnull NSCoder *)aDecoder)
|
|
|
132
132
|
[_bridge.uiManager setAvailableSize:self.availableSize forRootView:self];
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
- (
|
|
135
|
+
- (RCTPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS ISS#3536887)
|
|
136
136
|
{
|
|
137
137
|
// The root content view itself should never receive touches
|
|
138
|
-
|
|
138
|
+
RCTPlatformView *hitView = [super hitTest:point withEvent:event]; // TODO(macOS ISS#3536887)
|
|
139
139
|
if (_passThroughTouches && hitView == self) {
|
|
140
140
|
return nil;
|
|
141
141
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
NSMutableArray<NSMutableDictionary *> *_reactTouches;
|
|
41
41
|
NSMutableArray<RCTPlatformView *> *_touchViews; // TODO(macOS GH#774)
|
|
42
42
|
|
|
43
|
-
__weak
|
|
43
|
+
__weak RCTPlatformView *_cachedRootView; // TODO(macOS GH#774)
|
|
44
44
|
|
|
45
45
|
uint16_t _coalescingKey;
|
|
46
46
|
#if TARGET_OS_OSX// [TODO(macOS GH#774)
|
|
@@ -228,7 +228,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)coder)
|
|
|
228
228
|
#else // [TODO(macOS GH#774)
|
|
229
229
|
NSEvent *nativeTouch = _nativeTouches[touchIndex];
|
|
230
230
|
CGPoint location = nativeTouch.locationInWindow;
|
|
231
|
-
|
|
231
|
+
RCTAssert(_cachedRootView, @"We were unable to find a root view for the touch");
|
|
232
|
+
CGPoint rootViewLocation = [_cachedRootView.window.contentView convertPoint:location toView:_cachedRootView];
|
|
232
233
|
NSView *touchView = _touchViews[touchIndex];
|
|
233
234
|
CGPoint touchViewLocation = [touchView convertPoint:location fromView:nil];
|
|
234
235
|
#endif // ]TODO(macOS GH#774)
|
|
@@ -362,7 +363,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)coder)
|
|
|
362
363
|
*/
|
|
363
364
|
- (void)_cacheRootView
|
|
364
365
|
{
|
|
365
|
-
|
|
366
|
+
RCTPlatformView *rootView = self.view; // TODO(macOS ISS#3536887)
|
|
366
367
|
while (rootView.superview && ![rootView isReactRootView] && ![rootView isKindOfClass:[RCTSurfaceView class]]) {
|
|
367
368
|
rootView = rootView.superview;
|
|
368
369
|
}
|
package/React/Base/RCTUIKit.h
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
#import <UIKit/UIKit.h>
|
|
17
17
|
|
|
18
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
19
|
+
|
|
18
20
|
//
|
|
19
21
|
// functionally equivalent types
|
|
20
22
|
//
|
|
@@ -65,7 +67,7 @@ UIKIT_STATIC_INLINE CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path)
|
|
|
65
67
|
|
|
66
68
|
#define RCTPlatformWindow UIWindow
|
|
67
69
|
|
|
68
|
-
UIKIT_STATIC_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, UIEvent *event)
|
|
70
|
+
UIKIT_STATIC_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, __unused UIEvent *__nullable event)
|
|
69
71
|
{
|
|
70
72
|
return [view hitTest:point withEvent:event];
|
|
71
73
|
}
|
|
@@ -80,11 +82,6 @@ UIKIT_STATIC_INLINE void RCTUIViewSetContentModeRedraw(UIView *view)
|
|
|
80
82
|
view.contentMode = UIViewContentModeRedraw;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
UIKIT_STATIC_INLINE BOOL RCTUIViewDrawViewHierarchyInRectAfterScreenUpdates(RCTPlatformView *view, CGRect rect, BOOL afterUpdates)
|
|
84
|
-
{
|
|
85
|
-
return [view drawViewHierarchyInRect:rect afterScreenUpdates:afterUpdates];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
85
|
UIKIT_STATIC_INLINE BOOL RCTUIViewIsDescendantOfView(RCTPlatformView *view, RCTPlatformView *parent)
|
|
89
86
|
{
|
|
90
87
|
return [view isDescendantOfView:parent];
|
|
@@ -121,10 +118,14 @@ UIKIT_STATIC_INLINE CGFloat UIFontLineHeight(UIFont *font)
|
|
|
121
118
|
return [font lineHeight];
|
|
122
119
|
}
|
|
123
120
|
|
|
121
|
+
NS_ASSUME_NONNULL_END
|
|
122
|
+
|
|
124
123
|
#else // TARGET_OS_OSX [
|
|
125
124
|
|
|
126
125
|
#import <AppKit/AppKit.h>
|
|
127
126
|
|
|
127
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
128
|
+
|
|
128
129
|
//
|
|
129
130
|
// semantically equivalent constants
|
|
130
131
|
//
|
|
@@ -211,8 +212,7 @@ enum : NSUInteger
|
|
|
211
212
|
};
|
|
212
213
|
|
|
213
214
|
// UIView/NSView.h
|
|
214
|
-
|
|
215
|
-
{
|
|
215
|
+
typedef NS_ENUM(NSInteger, UIViewContentMode) {
|
|
216
216
|
UIViewContentModeScaleAspectFill = NSViewLayerContentsPlacementScaleProportionallyToFill,
|
|
217
217
|
UIViewContentModeScaleAspectFit = NSViewLayerContentsPlacementScaleProportionallyToFit,
|
|
218
218
|
UIViewContentModeScaleToFill = NSViewLayerContentsPlacementScaleAxesIndependently,
|
|
@@ -327,6 +327,11 @@ NS_INLINE NSEdgeInsets UIEdgeInsetsMake(CGFloat top, CGFloat left, CGFloat botto
|
|
|
327
327
|
// UIImage
|
|
328
328
|
@compatibility_alias UIImage NSImage;
|
|
329
329
|
|
|
330
|
+
typedef NS_ENUM(NSInteger, UIImageRenderingMode) {
|
|
331
|
+
UIImageRenderingModeAlwaysOriginal,
|
|
332
|
+
UIImageRenderingModeAlwaysTemplate,
|
|
333
|
+
};
|
|
334
|
+
|
|
330
335
|
#ifdef __cplusplus
|
|
331
336
|
extern "C"
|
|
332
337
|
#endif
|
|
@@ -373,7 +378,7 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
|
|
|
373
378
|
|
|
374
379
|
@property (nonatomic, getter=isUserInteractionEnabled) BOOL userInteractionEnabled;
|
|
375
380
|
|
|
376
|
-
- (NSView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
|
|
381
|
+
- (NSView *)hitTest:(CGPoint)point withEvent:(UIEvent *_Nullable)event;
|
|
377
382
|
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event;
|
|
378
383
|
|
|
379
384
|
- (void)insertSubview:(NSView *)view atIndex:(NSInteger)index;
|
|
@@ -390,7 +395,6 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
|
|
|
390
395
|
// An override of an undocumented API that controls the layer's masksToBounds property
|
|
391
396
|
@property (nonatomic) BOOL clipsToBounds;
|
|
392
397
|
@property (nonatomic, copy) NSColor *backgroundColor;
|
|
393
|
-
@property (nonatomic, readwrite, getter=isOpaque) BOOL opaque;
|
|
394
398
|
@property (nonatomic) CGAffineTransform transform;
|
|
395
399
|
|
|
396
400
|
/**
|
|
@@ -427,10 +431,18 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
|
|
|
427
431
|
@property (nonatomic, assign) BOOL alwaysBounceVertical;
|
|
428
432
|
// macOS specific properties
|
|
429
433
|
@property (nonatomic, assign) BOOL enableFocusRing;
|
|
434
|
+
@property (nonatomic, assign, getter=isScrollEnabled) BOOL scrollEnabled;
|
|
430
435
|
|
|
431
436
|
@end
|
|
432
437
|
|
|
433
|
-
|
|
438
|
+
@interface RCTClipView : NSClipView // [TODO(macOS GH#774)
|
|
439
|
+
|
|
440
|
+
@property (nonatomic, assign) BOOL constrainScrolling;
|
|
441
|
+
|
|
442
|
+
@end // ]TODO(macOS GH#774)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
NS_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, __unused UIEvent *__nullable event)
|
|
434
446
|
{
|
|
435
447
|
return [view hitTest:point];
|
|
436
448
|
}
|
|
@@ -442,14 +454,6 @@ NS_INLINE void RCTUIViewSetContentModeRedraw(RCTPlatformView *view)
|
|
|
442
454
|
view.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;
|
|
443
455
|
}
|
|
444
456
|
|
|
445
|
-
NS_INLINE BOOL RCTUIViewDrawViewHierarchyInRectAfterScreenUpdates(RCTPlatformView *view, CGRect rect, __unused BOOL afterUpdates)
|
|
446
|
-
{
|
|
447
|
-
RCTAssert(afterUpdates, @"We're redrawing the view so it will necessarily include the latest changes.");
|
|
448
|
-
(void) afterUpdates;
|
|
449
|
-
[view displayRectIgnoringOpacity:NSRectToCGRect(rect)];
|
|
450
|
-
return YES;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
457
|
NS_INLINE BOOL RCTUIViewIsDescendantOfView(RCTPlatformView *view, RCTPlatformView *parent)
|
|
454
458
|
{
|
|
455
459
|
return [view isDescendantOf:parent];
|
|
@@ -472,4 +476,72 @@ NS_INLINE CGRect CGRectValue(NSValue *value)
|
|
|
472
476
|
return rect;
|
|
473
477
|
}
|
|
474
478
|
|
|
479
|
+
NS_ASSUME_NONNULL_END
|
|
480
|
+
|
|
475
481
|
#endif // ] TARGET_OS_OSX
|
|
482
|
+
|
|
483
|
+
//
|
|
484
|
+
// fabric component types
|
|
485
|
+
//
|
|
486
|
+
|
|
487
|
+
// RCTUISlider
|
|
488
|
+
|
|
489
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
490
|
+
typedef UISlider RCTUISlider;
|
|
491
|
+
#else
|
|
492
|
+
@interface RCTUISlider : NSSlider
|
|
493
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
494
|
+
@property (nonatomic, readonly) BOOL pressed;
|
|
495
|
+
@property (nonatomic, assign) float value;
|
|
496
|
+
@property (nonatomic, assign) float minimumValue;
|
|
497
|
+
@property (nonatomic, assign) float maximumValue;
|
|
498
|
+
@property (nonatomic, strong) NSColor *minimumTrackTintColor;
|
|
499
|
+
@property (nonatomic, strong) NSColor *maximumTrackTintColor;
|
|
500
|
+
|
|
501
|
+
- (void)setValue:(float)value animated:(BOOL)animated;
|
|
502
|
+
NS_ASSUME_NONNULL_END
|
|
503
|
+
@end
|
|
504
|
+
#endif // ]TODO(macOS GH#774)
|
|
505
|
+
|
|
506
|
+
// RCTUILabel
|
|
507
|
+
|
|
508
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
509
|
+
typedef UILabel RCTUILabel;
|
|
510
|
+
#else
|
|
511
|
+
@interface RCTUILabel : NSTextField
|
|
512
|
+
@end
|
|
513
|
+
#endif // ]TODO(macOS GH#774)
|
|
514
|
+
|
|
515
|
+
// RCTUISwitch
|
|
516
|
+
|
|
517
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
518
|
+
typedef UISwitch RCTUISwitch;
|
|
519
|
+
#else
|
|
520
|
+
@interface RCTUISwitch : NSSwitch
|
|
521
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
522
|
+
@property (nonatomic, assign, getter=isOn) BOOL on;
|
|
523
|
+
|
|
524
|
+
- (void)setOn:(BOOL)on animated:(BOOL)animated;
|
|
525
|
+
|
|
526
|
+
NS_ASSUME_NONNULL_END
|
|
527
|
+
@end
|
|
528
|
+
#endif // ]TODO(macOS GH#774)
|
|
529
|
+
|
|
530
|
+
// RCTUIActivityIndicatorView
|
|
531
|
+
|
|
532
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
533
|
+
typedef UIActivityIndicatorView RCTUIActivityIndicatorView;
|
|
534
|
+
#else
|
|
535
|
+
@interface RCTUIActivityIndicatorView : NSProgressIndicator
|
|
536
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
537
|
+
@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
|
|
538
|
+
@property (nonatomic, assign) BOOL hidesWhenStopped;
|
|
539
|
+
@property (nullable, readwrite, nonatomic, strong) RCTUIColor *color;
|
|
540
|
+
@property (nonatomic, readonly, getter=isAnimating) BOOL animating;
|
|
541
|
+
|
|
542
|
+
- (void)startAnimating;
|
|
543
|
+
- (void)stopAnimating;
|
|
544
|
+
NS_ASSUME_NONNULL_END
|
|
545
|
+
@end
|
|
546
|
+
|
|
547
|
+
#endif // ]TODO(macOS GH#774)
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -15,10 +15,6 @@ NSString* const RCTVersionPatch = @"patch";
|
|
|
15
15
|
NSString* const RCTVersionPrerelease = @"prerelease";
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
// [TODO(macOS GH#944)
|
|
19
|
-
// Note: Be careful not to override these version numbers
|
|
20
|
-
// when we merge upstream stable branches into main
|
|
21
|
-
// TODO(macOS GH#944)]
|
|
22
18
|
NSDictionary* RCTGetReactNativeVersion(void)
|
|
23
19
|
{
|
|
24
20
|
static NSDictionary* __rnVersion;
|
|
@@ -28,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
28
24
|
RCTVersionMajor: @(0),
|
|
29
25
|
RCTVersionMinor: @(0),
|
|
30
26
|
RCTVersionPatch: @(0),
|
|
31
|
-
RCTVersionPrerelease: @"
|
|
27
|
+
RCTVersionPrerelease: @"ccc088f1d",
|
|
32
28
|
};
|
|
33
29
|
});
|
|
34
30
|
return __rnVersion;
|
|
@@ -131,7 +131,7 @@ NSData *UIImagePNGRepresentation(NSImage *image) {
|
|
|
131
131
|
NSData *UIImageJPEGRepresentation(NSImage *image, CGFloat compressionQuality) {
|
|
132
132
|
return NSImageDataForFileType(image,
|
|
133
133
|
NSBitmapImageFileTypeJPEG,
|
|
134
|
-
@{NSImageCompressionFactor: @(
|
|
134
|
+
@{NSImageCompressionFactor: @(compressionQuality)});
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
// UIBezierPath
|
|
@@ -207,7 +207,6 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *bezierPath)
|
|
|
207
207
|
@private
|
|
208
208
|
NSColor *_backgroundColor;
|
|
209
209
|
BOOL _clipsToBounds;
|
|
210
|
-
BOOL _opaque;
|
|
211
210
|
BOOL _userInteractionEnabled;
|
|
212
211
|
}
|
|
213
212
|
|
|
@@ -287,11 +286,6 @@ static RCTUIView *RCTUIViewCommonInit(RCTUIView *self)
|
|
|
287
286
|
return YES;
|
|
288
287
|
}
|
|
289
288
|
|
|
290
|
-
- (BOOL)isOpaque
|
|
291
|
-
{
|
|
292
|
-
return _opaque;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
289
|
- (CGFloat)alpha
|
|
296
290
|
{
|
|
297
291
|
return self.alphaValue;
|
|
@@ -436,6 +430,15 @@ static RCTUIView *RCTUIViewCommonInit(RCTUIView *self)
|
|
|
436
430
|
|
|
437
431
|
@implementation RCTUIScrollView // TODO(macOS ISS#3536887)
|
|
438
432
|
|
|
433
|
+
- (instancetype)initWithFrame:(CGRect)frame
|
|
434
|
+
{
|
|
435
|
+
if (self = [super initWithFrame:frame]) {
|
|
436
|
+
self.scrollEnabled = YES;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return self;
|
|
440
|
+
}
|
|
441
|
+
|
|
439
442
|
- (void)setEnableFocusRing:(BOOL)enableFocusRing {
|
|
440
443
|
if (_enableFocusRing != enableFocusRing) {
|
|
441
444
|
_enableFocusRing = enableFocusRing;
|
|
@@ -557,3 +560,76 @@ BOOL RCTUIViewSetClipsToBounds(RCTPlatformView *view)
|
|
|
557
560
|
|
|
558
561
|
return clipsToBounds;
|
|
559
562
|
}
|
|
563
|
+
|
|
564
|
+
@implementation RCTClipView
|
|
565
|
+
|
|
566
|
+
- (instancetype)initWithFrame:(NSRect)frameRect
|
|
567
|
+
{
|
|
568
|
+
if (self = [super initWithFrame:frameRect]) {
|
|
569
|
+
self.constrainScrolling = NO;
|
|
570
|
+
self.drawsBackground = NO;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
return self;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
- (NSRect)constrainBoundsRect:(NSRect)proposedBounds
|
|
577
|
+
{
|
|
578
|
+
if (self.constrainScrolling) {
|
|
579
|
+
return NSMakeRect(0, 0, 0, 0);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
return [super constrainBoundsRect:proposedBounds];
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
@end
|
|
586
|
+
|
|
587
|
+
// RCTUISlider
|
|
588
|
+
|
|
589
|
+
@implementation RCTUISlider {} // [TODO(macOS GH#774)
|
|
590
|
+
|
|
591
|
+
- (void)setValue:(float)value animated:(__unused BOOL)animated
|
|
592
|
+
{
|
|
593
|
+
self.animator.floatValue = value;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@end // ]TODO(macOS GH#774)
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
// RCTUILabel
|
|
600
|
+
|
|
601
|
+
@implementation RCTUILabel {} // [TODO(macOS GH#774)
|
|
602
|
+
|
|
603
|
+
- (instancetype)initWithFrame:(NSRect)frameRect
|
|
604
|
+
{
|
|
605
|
+
if (self = [super initWithFrame:frameRect]) {
|
|
606
|
+
[self setBezeled:NO];
|
|
607
|
+
[self setDrawsBackground:NO];
|
|
608
|
+
[self setEditable:NO];
|
|
609
|
+
[self setSelectable:NO];
|
|
610
|
+
[self setWantsLayer:YES];
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
return self;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
@end // ]TODO(macOS GH#774)
|
|
617
|
+
|
|
618
|
+
@implementation RCTUISwitch
|
|
619
|
+
|
|
620
|
+
- (BOOL)isOn
|
|
621
|
+
{
|
|
622
|
+
return self.state == NSControlStateValueOn;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
- (void)setOn:(BOOL)on
|
|
626
|
+
{
|
|
627
|
+
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
- (void)setOn:(BOOL)on animated:(BOOL)animated {
|
|
631
|
+
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
@end
|
|
@@ -78,7 +78,7 @@ RCT_EXPORT_MODULE()
|
|
|
78
78
|
* The key from the `buttons` dictionary is passed back in the callback on click.
|
|
79
79
|
* Buttons are displayed in the order they are specified.
|
|
80
80
|
*/
|
|
81
|
-
RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::
|
|
81
|
+
RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback : (RCTResponseSenderBlock)callback)
|
|
82
82
|
{
|
|
83
83
|
NSString *title = [RCTConvert NSString:args.title()];
|
|
84
84
|
NSString *message = [RCTConvert NSString:args.message()];
|
|
@@ -110,7 +110,7 @@ RCT_EXPORT_MODULE()
|
|
|
110
110
|
[self sendEvent:event];
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
- (void)
|
|
113
|
+
- (void)notifyObserversOfEvent:(id<RCTEvent>)event
|
|
114
114
|
{
|
|
115
115
|
[_observersLock lock];
|
|
116
116
|
|
|
@@ -119,6 +119,11 @@ RCT_EXPORT_MODULE()
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
[_observersLock unlock];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
- (void)sendEvent:(id<RCTEvent>)event
|
|
125
|
+
{
|
|
126
|
+
[self notifyObserversOfEvent:event];
|
|
122
127
|
|
|
123
128
|
[_eventQueueLock lock];
|
|
124
129
|
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
#import <React/RCTLog.h>
|
|
14
14
|
#import <React/RCTRedBoxSetEnabled.h>
|
|
15
15
|
#import <React/RCTSurface.h>
|
|
16
|
-
|
|
17
16
|
#import "CoreModulesPlugins.h"
|
|
18
17
|
|
|
19
18
|
#if RCT_DEV_MENU
|
|
@@ -22,7 +21,8 @@
|
|
|
22
21
|
@end
|
|
23
22
|
|
|
24
23
|
@implementation RCTLogBox {
|
|
25
|
-
|
|
24
|
+
RCTLogBoxView *_view;
|
|
25
|
+
__weak id<RCTSurfacePresenterStub> _bridgelessSurfacePresenter;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@synthesize bridge = _bridge;
|
|
@@ -34,6 +34,11 @@ RCT_EXPORT_MODULE()
|
|
|
34
34
|
return YES;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
- (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
|
|
38
|
+
{
|
|
39
|
+
_bridgelessSurfacePresenter = surfacePresenter;
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
RCT_EXPORT_METHOD(show)
|
|
38
43
|
{
|
|
39
44
|
if (RCTRedBoxGetEnabled()) {
|
|
@@ -44,25 +49,36 @@ RCT_EXPORT_METHOD(show)
|
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
|
-
if (strongSelf->
|
|
48
|
-
[strongSelf->
|
|
52
|
+
if (strongSelf->_view) {
|
|
53
|
+
[strongSelf->_view show];
|
|
49
54
|
return;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
if (strongSelf->
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
if (strongSelf->_bridgelessSurfacePresenter) {
|
|
58
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
59
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithFrame:RCTKeyWindow().frame
|
|
60
|
+
surfacePresenter:strongSelf->_bridgelessSurfacePresenter];
|
|
61
|
+
#else
|
|
62
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithSurfacePresenter:strongSelf->_bridgelessSurfacePresenter]; // TODO(macOS GH#774)
|
|
63
|
+
#endif // ]TODO(macOS GH#774)
|
|
64
|
+
} else if (strongSelf->_bridge && strongSelf->_bridge.valid) {
|
|
65
|
+
if (strongSelf->_bridge.surfacePresenter) {
|
|
66
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
67
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithFrame:RCTKeyWindow().frame
|
|
68
|
+
surfacePresenter:strongSelf->_bridge.surfacePresenter];
|
|
69
|
+
#else // TODO(macOS GH#774)
|
|
70
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithSurfacePresenter:strongSelf->_bridge.surfacePresenter]; // TODO(macOS GH#774)
|
|
71
|
+
#endif // ]TODO(macOS GH#774)
|
|
72
|
+
} else {
|
|
73
|
+
#if !TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
74
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithWindow:RCTKeyWindow() bridge:strongSelf->_bridge];
|
|
75
|
+
#else // TODO(macOS GH#774)
|
|
76
|
+
strongSelf->_view = [[RCTLogBoxView alloc] initWithBridge:self->_bridge]; // TODO(macOS GH#774)
|
|
59
77
|
#endif // ]TODO(macOS GH#774)
|
|
60
|
-
[strongSelf->_window show]; // TODO(macOS GH#774) Renamed from _view to _window
|
|
61
78
|
}
|
|
62
|
-
} else {
|
|
63
|
-
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:strongSelf, @"logbox", nil];
|
|
64
|
-
[[NSNotificationCenter defaultCenter] postNotificationName:@"CreateLogBoxSurface" object:nil userInfo:userInfo];
|
|
65
79
|
}
|
|
80
|
+
|
|
81
|
+
[strongSelf->_view show];
|
|
66
82
|
});
|
|
67
83
|
}
|
|
68
84
|
}
|
|
@@ -76,8 +92,8 @@ RCT_EXPORT_METHOD(hide)
|
|
|
76
92
|
if (!strongSelf) {
|
|
77
93
|
return;
|
|
78
94
|
}
|
|
79
|
-
[strongSelf->
|
|
80
|
-
strongSelf->
|
|
95
|
+
[strongSelf->_view setHidden:YES];
|
|
96
|
+
strongSelf->_view = nil;
|
|
81
97
|
});
|
|
82
98
|
}
|
|
83
99
|
}
|
|
@@ -88,9 +104,9 @@ RCT_EXPORT_METHOD(hide)
|
|
|
88
104
|
return std::make_shared<facebook::react::NativeLogBoxSpecJSI>(params);
|
|
89
105
|
}
|
|
90
106
|
|
|
91
|
-
- (void)
|
|
107
|
+
- (void)setRCTLogBoxView:(RCTLogBoxView *)view
|
|
92
108
|
{
|
|
93
|
-
self->
|
|
109
|
+
self->_view = view;
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
@end
|
|
@@ -6,20 +6,21 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <React/RCTBridge.h>
|
|
9
|
+
#import <React/RCTSurfacePresenterStub.h>
|
|
9
10
|
#import <React/RCTSurfaceView.h>
|
|
10
11
|
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
11
12
|
|
|
12
13
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
13
14
|
|
|
14
|
-
@interface
|
|
15
|
+
@interface RCTLogBoxView : UIWindow
|
|
15
16
|
|
|
16
17
|
- (instancetype)initWithFrame:(CGRect)frame;
|
|
17
18
|
|
|
18
19
|
- (void)createRootViewController:(UIView *)view;
|
|
19
20
|
|
|
20
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
21
|
+
- (instancetype)initWithFrame:(CGRect)frame surfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter;
|
|
21
22
|
|
|
22
|
-
- (
|
|
23
|
+
- (instancetype)initWithWindow:(UIWindow *)window bridge:(RCTBridge *)bridge;
|
|
23
24
|
|
|
24
25
|
- (void)show;
|
|
25
26
|
|
|
@@ -27,11 +28,13 @@
|
|
|
27
28
|
|
|
28
29
|
#else // [TODO(macOS GH#774)
|
|
29
30
|
|
|
30
|
-
@interface
|
|
31
|
+
@interface RCTLogBoxView : NSWindow // TODO(macOS GH#774)
|
|
32
|
+
|
|
33
|
+
- (instancetype)initWithSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter;
|
|
31
34
|
|
|
32
35
|
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
33
36
|
|
|
34
|
-
- (void)
|
|
37
|
+
- (void)setHidden:(BOOL)hidden;
|
|
35
38
|
|
|
36
39
|
- (void)show;
|
|
37
40
|
|