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
|
@@ -34,7 +34,7 @@ using namespace facebook::react;
|
|
|
34
34
|
// `SurfaceHandler` is a thread-safe object, so we don't need additional synchronization.
|
|
35
35
|
// Objective-C++ classes cannot have instance variables without default constructors,
|
|
36
36
|
// hence we wrap a value into `optional` to workaround it.
|
|
37
|
-
|
|
37
|
+
std::optional<SurfaceHandler> _surfaceHandler;
|
|
38
38
|
|
|
39
39
|
// Protects Surface's start and stop processes.
|
|
40
40
|
// Even though SurfaceHandler is tread-safe, it will crash if we try to stop a surface that is not running.
|
|
@@ -66,10 +66,12 @@ using namespace facebook::react;
|
|
|
66
66
|
|
|
67
67
|
[self _updateLayoutContext];
|
|
68
68
|
|
|
69
|
+
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
69
70
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
70
71
|
selector:@selector(handleContentSizeCategoryDidChangeNotification:)
|
|
71
72
|
name:UIContentSizeCategoryDidChangeNotification
|
|
72
73
|
object:nil];
|
|
74
|
+
#endif // TODO(macOS GH#774)
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
return self;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
#import <React/RCTBridge.h>
|
|
11
11
|
#import <React/RCTUIKit.h> // TODO(macOS GH#774)
|
|
12
12
|
|
|
13
|
+
@protocol RCTSurfaceProtocol;
|
|
14
|
+
|
|
13
15
|
NS_ASSUME_NONNULL_BEGIN
|
|
14
16
|
|
|
15
17
|
// TODO: Eventually this should go away and files should just include RCTSurfacePresenter.h, but
|
|
@@ -27,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
27
29
|
|
|
28
30
|
@protocol RCTSurfacePresenterStub <NSObject>
|
|
29
31
|
|
|
32
|
+
- (id<RCTSurfaceProtocol>)createFabricSurfaceForModuleName:(NSString *)moduleName
|
|
33
|
+
initialProperties:(NSDictionary *)initialProperties;
|
|
30
34
|
- (nullable RCTPlatformView *)findComponentViewWithTag_DO_NOT_USE_DEPRECATED:(NSInteger)tag; // TODO(macOS GH#774)
|
|
31
35
|
- (BOOL)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag props:(NSDictionary *)props;
|
|
32
36
|
- (void)addObserver:(id<RCTSurfacePresenterObserver>)observer;
|
|
@@ -134,7 +134,7 @@ void RCTTraverseViewNodes(id<RCTComponent> view, void (^block)(id<RCTComponent>)
|
|
|
134
134
|
* @param nativeID the id reference to native component relative to root view.
|
|
135
135
|
* @param rootTag the react tag of root view hierarchy from which to find the view.
|
|
136
136
|
*/
|
|
137
|
-
- (
|
|
137
|
+
- (RCTPlatformView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag; // TODO(macOS ISS#3536887)
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Register a view that is tagged with nativeID as its nativeID prop
|
|
@@ -111,7 +111,7 @@ RCT_EXPORT_MODULE()
|
|
|
111
111
|
RCTExecuteOnMainQueue(^{
|
|
112
112
|
RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"UIManager invalidate", nil);
|
|
113
113
|
for (NSNumber *rootViewTag in self->_rootViewTags) {
|
|
114
|
-
|
|
114
|
+
RCTPlatformView *rootView = self->_viewRegistry[rootViewTag]; // TODO(macOS ISS#3536887)
|
|
115
115
|
if ([rootView conformsToProtocol:@protocol(RCTInvalidating)]) {
|
|
116
116
|
[(id<RCTInvalidating>)rootView invalidate];
|
|
117
117
|
}
|
|
@@ -156,7 +156,8 @@ RCT_EXPORT_MODULE()
|
|
|
156
156
|
|
|
157
157
|
- (void)setBridge:(RCTBridge *)bridge
|
|
158
158
|
{
|
|
159
|
-
|
|
159
|
+
RCTEnforceNewArchitectureValidation(
|
|
160
|
+
RCTNotAllowedInBridgeless, self, @"RCTUIManager must not be initialized for the new architecture");
|
|
160
161
|
|
|
161
162
|
RCTAssert(_bridge == nil, @"Should not re-use same UIManager instance");
|
|
162
163
|
_bridge = bridge;
|
|
@@ -454,12 +455,12 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation)
|
|
|
454
455
|
forTag:view.reactTag];
|
|
455
456
|
}
|
|
456
457
|
|
|
457
|
-
- (
|
|
458
|
+
- (RCTPlatformView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag
|
|
458
459
|
{
|
|
459
460
|
if (!nativeID || !rootTag) {
|
|
460
461
|
return nil;
|
|
461
462
|
}
|
|
462
|
-
|
|
463
|
+
RCTPlatformView *view; // TODO(macOS ISS#3536887)
|
|
463
464
|
@synchronized(self) {
|
|
464
465
|
view = [_nativeIDRegistry objectForKey:RCTNativeIDRegistryKey(nativeID, rootTag)];
|
|
465
466
|
}
|
|
@@ -1100,7 +1101,7 @@ RCT_EXPORT_METHOD(updateView
|
|
|
1100
1101
|
{
|
|
1101
1102
|
RCTAssertMainQueue();
|
|
1102
1103
|
RCTComponentData *componentData = _componentDataByName[viewName];
|
|
1103
|
-
|
|
1104
|
+
RCTPlatformView *view = _viewRegistry[reactTag]; // TODO(macOS ISS#3536887)
|
|
1104
1105
|
[componentData setProps:props forView:view];
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
|
|
|
28
28
|
s.homepage = "https://reactnative.dev/"
|
|
29
29
|
s.license = package["license"]
|
|
30
30
|
s.author = "Facebook, Inc. and its affiliates"
|
|
31
|
-
s.platforms = { :ios => "11.0" }
|
|
31
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
32
32
|
s.source = source
|
|
33
33
|
s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}"
|
|
34
34
|
s.exclude_files = "**/tests/*",
|
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
s.header_dir = "React"
|
|
38
38
|
s.framework = "JavaScriptCore"
|
|
39
39
|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\"" }
|
|
40
|
-
s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"",
|
|
40
|
+
s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
41
41
|
"OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags }
|
|
42
42
|
|
|
43
43
|
s.dependency "React-Core", version
|
|
@@ -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/RCTInvalidating.h>
|
|
11
11
|
#import <React/RCTModalHostViewManager.h>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@protocol RCTModalHostViewInteractor;
|
|
18
18
|
|
|
19
|
-
@interface RCTModalHostView :
|
|
19
|
+
@interface RCTModalHostView : RCTUIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate> // TODO(macOS GH#774)
|
|
20
20
|
|
|
21
21
|
@property (nonatomic, copy) NSString *animationType;
|
|
22
22
|
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
|
package/React/Views/RCTSlider.h
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponent.h>
|
|
11
11
|
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
12
14
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
13
15
|
@protocol RCTSliderDelegate;
|
|
14
16
|
#endif
|
|
@@ -50,3 +52,5 @@
|
|
|
50
52
|
- (void)slider:(RCTSlider *)slider didPress:(BOOL)press;
|
|
51
53
|
@end
|
|
52
54
|
#endif // ]TODO(macOS GH#774)
|
|
55
|
+
|
|
56
|
+
NS_ASSUME_NONNULL_END
|
package/React/Views/RCTSwitch.h
CHANGED
|
@@ -9,18 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
#import <React/RCTComponent.h>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@interface RCTSwitch : UISwitch
|
|
14
|
-
#else // [TODO(macOS GH#774)
|
|
15
|
-
@interface RCTSwitch : NSSwitch
|
|
16
|
-
#endif // ]TODO(macOS GH#774)
|
|
12
|
+
@interface RCTSwitch : RCTUISwitch
|
|
17
13
|
|
|
18
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
19
14
|
@property (nonatomic, assign) BOOL wasOn;
|
|
20
|
-
#else // [TODO(macOS GH#774)
|
|
21
|
-
@property (nonatomic, assign) BOOL on;
|
|
22
|
-
- (void)setOn:(BOOL)on animated:(BOOL)animated;
|
|
23
|
-
#endif // ]TODO(macOS GH#774)
|
|
24
15
|
@property (nonatomic, copy) RCTBubblingEventBlock onChange;
|
|
25
16
|
|
|
26
17
|
@end
|
package/React/Views/RCTSwitch.m
CHANGED
|
@@ -11,30 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
@implementation RCTSwitch
|
|
13
13
|
|
|
14
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
15
14
|
- (void)setOn:(BOOL)on animated:(BOOL)animated
|
|
16
15
|
{
|
|
17
16
|
_wasOn = on;
|
|
18
17
|
[super setOn:on animated:animated];
|
|
19
18
|
}
|
|
20
|
-
#else // [TODO(macOS GH#774)
|
|
21
|
-
- (void)setOn:(BOOL)on animated:(BOOL)animated {
|
|
22
|
-
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
23
|
-
}
|
|
24
|
-
#endif // ]TODO(macOS GH#774)
|
|
25
|
-
|
|
26
|
-
#if TARGET_OS_OSX
|
|
27
|
-
|
|
28
|
-
- (BOOL)on
|
|
29
|
-
{
|
|
30
|
-
return self.state == NSControlStateValueOn;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
- (void)setOn:(BOOL)on
|
|
34
|
-
{
|
|
35
|
-
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#endif // ]TODO(macOS GH#774)
|
|
39
19
|
|
|
40
20
|
@end
|
|
@@ -30,16 +30,12 @@ RCT_EXPORT_MODULE()
|
|
|
30
30
|
|
|
31
31
|
- (void)onChange:(RCTSwitch *)sender
|
|
32
32
|
{
|
|
33
|
-
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
34
33
|
if (sender.wasOn != sender.on) {
|
|
35
34
|
if (sender.onChange) {
|
|
36
35
|
sender.onChange(@{@"value" : @(sender.on)});
|
|
37
36
|
}
|
|
38
37
|
sender.wasOn = sender.on;
|
|
39
38
|
}
|
|
40
|
-
#else // [TODO(macOS GH#774)
|
|
41
|
-
sender.onChange(@{ @"value": @(sender.on) });
|
|
42
|
-
#endif // ]TODO(macOS GH#774)
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
RCT_EXPORT_METHOD(setValue : (nonnull NSNumber *)viewTag toValue : (BOOL)value)
|
package/React/Views/RCTView.m
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#import "RCTView.h"
|
|
9
9
|
|
|
10
|
-
#import <QuartzCore/QuartzCore.h>
|
|
10
|
+
#import <QuartzCore/QuartzCore.h>
|
|
11
11
|
|
|
12
12
|
#import "RCTAutoInsetsProtocol.h"
|
|
13
13
|
#import "RCTBorderDrawing.h"
|
|
@@ -227,7 +227,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
227
227
|
BOOL needsHitSubview = !(_pointerEvents == RCTPointerEventsNone || _pointerEvents == RCTPointerEventsBoxOnly);
|
|
228
228
|
if (needsHitSubview && (![self clipsToBounds] || isPointInside)) {
|
|
229
229
|
// Take z-index into account when calculating the touch target.
|
|
230
|
-
NSArray<
|
|
230
|
+
NSArray<RCTPlatformView *> *sortedSubviews = [self reactZIndexSortedSubviews]; // TODO(macOS ISS#3536887)
|
|
231
231
|
|
|
232
232
|
// The default behaviour of UIKit is that if a view does not contain a point,
|
|
233
233
|
// then no subviews will be returned from hit testing, even if they contain
|
|
@@ -1440,9 +1440,14 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
|
|
1443
|
+
- (BOOL)needsPanelToBecomeKey {
|
|
1444
|
+
// We need to override this so that mouse clicks don't move keyboard focus on focusable views by default.
|
|
1445
|
+
return false;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1443
1448
|
- (BOOL)acceptsFirstResponder
|
|
1444
1449
|
{
|
|
1445
|
-
|
|
1450
|
+
return [self focusable] || [super acceptsFirstResponder];
|
|
1446
1451
|
}
|
|
1447
1452
|
|
|
1448
1453
|
- (void)updateTrackingAreas
|
|
@@ -95,7 +95,8 @@ RCT_EXPORT_MODULE()
|
|
|
95
95
|
|
|
96
96
|
- (void)setBridge:(RCTBridge *)bridge
|
|
97
97
|
{
|
|
98
|
-
|
|
98
|
+
RCTErrorNewArchitectureValidation(
|
|
99
|
+
RCTNotAllowedInBridgeless, self, @"RCTViewManager must not be initialized for the new architecture");
|
|
99
100
|
_bridge = bridge;
|
|
100
101
|
}
|
|
101
102
|
|
|
@@ -5,12 +5,12 @@
|
|
|
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
|
@class RCTWrapperViewController;
|
|
11
11
|
|
|
12
12
|
@interface RCTWrapperViewController : UIViewController
|
|
13
13
|
|
|
14
|
-
- (instancetype)initWithContentView:(
|
|
14
|
+
- (instancetype)initWithContentView:(RCTUIView *)contentView NS_DESIGNATED_INITIALIZER; // TODO(macOS GH#774)
|
|
15
15
|
|
|
16
16
|
@end
|
|
@@ -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/RCTComponent.h>
|
|
11
11
|
#import <React/RCTScrollableProtocol.h>
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
@property (nonatomic, copy) NSString *title;
|
|
16
16
|
@property (nonatomic, copy) RCTDirectEventBlock onRefresh;
|
|
17
|
-
@property (nonatomic, weak)
|
|
17
|
+
@property (nonatomic, weak) RCTUIScrollView *scrollView; // TODO(macOS GH#774)
|
|
18
18
|
|
|
19
19
|
@end
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
|
|
117
117
|
- (void)scrollWheel:(NSEvent *)theEvent
|
|
118
118
|
{
|
|
119
|
-
if (!self.
|
|
119
|
+
if (!self.isScrollEnabled) {
|
|
120
120
|
[[self nextResponder] scrollWheel:theEvent];
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
@@ -339,21 +339,6 @@
|
|
|
339
339
|
#endif // TODO(macOS GH#774)
|
|
340
340
|
|
|
341
341
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
342
|
-
- (BOOL)canBecomeFirstResponder
|
|
343
|
-
{
|
|
344
|
-
return YES;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
- (BOOL)becomeFirstResponder
|
|
348
|
-
{
|
|
349
|
-
return YES;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
- (BOOL)resignFirstResponder
|
|
353
|
-
{
|
|
354
|
-
return YES;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
342
|
- (void)setAccessibilityLabel:(NSString *)accessibilityLabel
|
|
358
343
|
{
|
|
359
344
|
[super setAccessibilityLabel:accessibilityLabel];
|
|
@@ -538,21 +523,6 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
|
|
538
523
|
return _scrollView.documentView;
|
|
539
524
|
}
|
|
540
525
|
|
|
541
|
-
- (BOOL)canBecomeFirstResponder
|
|
542
|
-
{
|
|
543
|
-
return [_scrollView canBecomeFirstResponder];
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
- (BOOL)becomeFirstResponder
|
|
547
|
-
{
|
|
548
|
-
return [_scrollView becomeFirstResponder];
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
- (BOOL)resignFirstResponder
|
|
552
|
-
{
|
|
553
|
-
return [_scrollView resignFirstResponder];
|
|
554
|
-
}
|
|
555
|
-
|
|
556
526
|
- (void)setAccessibilityLabel:(NSString *)accessibilityLabel
|
|
557
527
|
{
|
|
558
528
|
[_scrollView setAccessibilityLabel:accessibilityLabel];
|
|
@@ -97,8 +97,6 @@ import com.facebook.react.surface.ReactStage;
|
|
|
97
97
|
import com.facebook.react.turbomodule.core.TurboModuleManager;
|
|
98
98
|
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate;
|
|
99
99
|
import com.facebook.react.turbomodule.core.interfaces.TurboModuleRegistry;
|
|
100
|
-
import com.facebook.react.uimanager.ComponentNameResolver;
|
|
101
|
-
import com.facebook.react.uimanager.ComponentNameResolverManager;
|
|
102
100
|
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
|
103
101
|
import com.facebook.react.uimanager.ReactRoot;
|
|
104
102
|
import com.facebook.react.uimanager.UIImplementationProvider;
|
|
@@ -168,7 +166,6 @@ public class ReactInstanceManager {
|
|
|
168
166
|
private final DevSupportManager mDevSupportManager;
|
|
169
167
|
private final boolean mUseDeveloperSupport;
|
|
170
168
|
private final boolean mRequireActivity;
|
|
171
|
-
private @Nullable ComponentNameResolverManager mComponentNameResolverManager;
|
|
172
169
|
private final @Nullable NotThreadSafeBridgeIdleDebugListener mBridgeIdleDebugListener;
|
|
173
170
|
private final Object mReactContextLock = new Object();
|
|
174
171
|
private @Nullable volatile ReactContext mCurrentReactContext;
|
|
@@ -770,7 +767,6 @@ public class ReactInstanceManager {
|
|
|
770
767
|
synchronized (mPackages) {
|
|
771
768
|
mViewManagerNames = null;
|
|
772
769
|
}
|
|
773
|
-
mComponentNameResolverManager = null;
|
|
774
770
|
FLog.d(ReactConstants.TAG, "ReactInstanceManager has been destroyed");
|
|
775
771
|
}
|
|
776
772
|
|
|
@@ -1399,23 +1395,6 @@ public class ReactInstanceManager {
|
|
|
1399
1395
|
if (Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) {
|
|
1400
1396
|
catalystInstance.setGlobalVariable("__RCTProfileIsProfiling", "true");
|
|
1401
1397
|
}
|
|
1402
|
-
if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) {
|
|
1403
|
-
mComponentNameResolverManager =
|
|
1404
|
-
new ComponentNameResolverManager(
|
|
1405
|
-
catalystInstance.getRuntimeExecutor(),
|
|
1406
|
-
new ComponentNameResolver() {
|
|
1407
|
-
@Override
|
|
1408
|
-
public String[] getComponentNames() {
|
|
1409
|
-
List<String> viewManagerNames = getViewManagerNames();
|
|
1410
|
-
if (viewManagerNames == null) {
|
|
1411
|
-
FLog.e(TAG, "No ViewManager names found");
|
|
1412
|
-
return new String[0];
|
|
1413
|
-
}
|
|
1414
|
-
return viewManagerNames.toArray(new String[0]);
|
|
1415
|
-
}
|
|
1416
|
-
});
|
|
1417
|
-
catalystInstance.setGlobalVariable("__fbStaticViewConfig", "true");
|
|
1418
|
-
}
|
|
1419
1398
|
|
|
1420
1399
|
ReactMarker.logMarker(ReactMarkerConstants.PRE_RUN_JS_BUNDLE_START);
|
|
1421
1400
|
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle");
|
|
@@ -27,6 +27,7 @@ import android.view.Surface;
|
|
|
27
27
|
import android.view.View;
|
|
28
28
|
import android.view.ViewGroup;
|
|
29
29
|
import android.view.ViewTreeObserver;
|
|
30
|
+
import android.view.WindowInsets;
|
|
30
31
|
import android.view.WindowManager;
|
|
31
32
|
import android.widget.FrameLayout;
|
|
32
33
|
import androidx.annotation.Nullable;
|
|
@@ -826,9 +827,12 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
826
827
|
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
|
|
827
828
|
int notchHeight = 0;
|
|
828
829
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
829
|
-
|
|
830
|
-
if (
|
|
831
|
-
|
|
830
|
+
WindowInsets insets = getRootView().getRootWindowInsets();
|
|
831
|
+
if (insets != null) {
|
|
832
|
+
DisplayCutout displayCutout = insets.getDisplayCutout();
|
|
833
|
+
if (displayCutout != null) {
|
|
834
|
+
notchHeight = displayCutout.getSafeInsetTop();
|
|
835
|
+
}
|
|
832
836
|
}
|
|
833
837
|
}
|
|
834
838
|
final int heightDiff =
|
|
@@ -28,6 +28,7 @@ rn_android_library(
|
|
|
28
28
|
react_native_target("java/com/facebook/react/modules/core:core"),
|
|
29
29
|
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
|
30
30
|
react_native_target("java/com/facebook/react/uimanager/annotations:annotations"),
|
|
31
|
+
react_native_target("java/com/facebook/react/views/view:view"),
|
|
31
32
|
],
|
|
32
33
|
exported_deps = [react_native_root_target(":FBReactNativeSpec")],
|
|
33
34
|
)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package com.facebook.react.animated;
|
|
9
|
+
|
|
10
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
11
|
+
import com.facebook.react.views.view.ColorUtil;
|
|
12
|
+
|
|
13
|
+
/** Animated node that represents a color. */
|
|
14
|
+
/*package*/ class ColorAnimatedNode extends AnimatedNode {
|
|
15
|
+
|
|
16
|
+
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager;
|
|
17
|
+
private final int mRNodeId;
|
|
18
|
+
private final int mGNodeId;
|
|
19
|
+
private final int mBNodeId;
|
|
20
|
+
private final int mANodeId;
|
|
21
|
+
private int mColor;
|
|
22
|
+
|
|
23
|
+
public ColorAnimatedNode(
|
|
24
|
+
ReadableMap config, NativeAnimatedNodesManager nativeAnimatedNodesManager) {
|
|
25
|
+
mNativeAnimatedNodesManager = nativeAnimatedNodesManager;
|
|
26
|
+
mRNodeId = config.getInt("r");
|
|
27
|
+
mGNodeId = config.getInt("g");
|
|
28
|
+
mBNodeId = config.getInt("b");
|
|
29
|
+
mANodeId = config.getInt("a");
|
|
30
|
+
|
|
31
|
+
// TODO (T110930421): Support platform color
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public int getColor() {
|
|
35
|
+
return mColor;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Override
|
|
39
|
+
public void update() {
|
|
40
|
+
AnimatedNode rNode = mNativeAnimatedNodesManager.getNodeById(mRNodeId);
|
|
41
|
+
AnimatedNode gNode = mNativeAnimatedNodesManager.getNodeById(mGNodeId);
|
|
42
|
+
AnimatedNode bNode = mNativeAnimatedNodesManager.getNodeById(mBNodeId);
|
|
43
|
+
AnimatedNode aNode = mNativeAnimatedNodesManager.getNodeById(mANodeId);
|
|
44
|
+
|
|
45
|
+
double r = ((ValueAnimatedNode) rNode).getValue();
|
|
46
|
+
double g = ((ValueAnimatedNode) gNode).getValue();
|
|
47
|
+
double b = ((ValueAnimatedNode) bNode).getValue();
|
|
48
|
+
double a = ((ValueAnimatedNode) aNode).getValue();
|
|
49
|
+
|
|
50
|
+
mColor = ColorUtil.normalize(r, g, b, a);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@Override
|
|
54
|
+
public String prettyPrint() {
|
|
55
|
+
return "ColorAnimatedNode["
|
|
56
|
+
+ mTag
|
|
57
|
+
+ "]: r: "
|
|
58
|
+
+ mRNodeId
|
|
59
|
+
+ " g: "
|
|
60
|
+
+ mGNodeId
|
|
61
|
+
+ " b: "
|
|
62
|
+
+ mBNodeId
|
|
63
|
+
+ " a: "
|
|
64
|
+
+ mANodeId;
|
|
65
|
+
}
|
|
66
|
+
}
|
package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java
CHANGED
|
@@ -129,6 +129,8 @@ import java.util.Queue;
|
|
|
129
129
|
node = new StyleAnimatedNode(config, this);
|
|
130
130
|
} else if ("value".equals(type)) {
|
|
131
131
|
node = new ValueAnimatedNode(config);
|
|
132
|
+
} else if ("color".equals(type)) {
|
|
133
|
+
node = new ColorAnimatedNode(config, this);
|
|
132
134
|
} else if ("props".equals(type)) {
|
|
133
135
|
node = new PropsAnimatedNode(config, this);
|
|
134
136
|
} else if ("interpolation".equals(type)) {
|
|
@@ -105,6 +105,8 @@ import java.util.Map;
|
|
|
105
105
|
} else {
|
|
106
106
|
mPropMap.putDouble(entry.getKey(), ((ValueAnimatedNode) node).getValue());
|
|
107
107
|
}
|
|
108
|
+
} else if (node instanceof ColorAnimatedNode) {
|
|
109
|
+
mPropMap.putInt(entry.getKey(), ((ColorAnimatedNode) node).getColor());
|
|
108
110
|
} else {
|
|
109
111
|
throw new IllegalArgumentException(
|
|
110
112
|
"Unsupported type of node used in property node " + node.getClass());
|
|
@@ -43,6 +43,8 @@ import java.util.Map;
|
|
|
43
43
|
((TransformAnimatedNode) node).collectViewUpdates(propsMap);
|
|
44
44
|
} else if (node instanceof ValueAnimatedNode) {
|
|
45
45
|
propsMap.putDouble(entry.getKey(), ((ValueAnimatedNode) node).getValue());
|
|
46
|
+
} else if (node instanceof ColorAnimatedNode) {
|
|
47
|
+
propsMap.putInt(entry.getKey(), ((ColorAnimatedNode) node).getColor());
|
|
46
48
|
} else {
|
|
47
49
|
throw new IllegalArgumentException(
|
|
48
50
|
"Unsupported type of node used in property node " + node.getClass());
|
|
@@ -64,9 +64,6 @@ public class ReactFeatureFlags {
|
|
|
64
64
|
/** This feature flag enables logs for Fabric */
|
|
65
65
|
public static boolean enableFabricLogs = false;
|
|
66
66
|
|
|
67
|
-
/** Enables Static ViewConfig in RN Android native code. */
|
|
68
|
-
public static boolean enableExperimentalStaticViewConfigs = false;
|
|
69
|
-
|
|
70
67
|
public static boolean enableRuntimeScheduler = false;
|
|
71
68
|
|
|
72
69
|
public static boolean enableRuntimeSchedulerInTurboModule = false;
|
|
@@ -405,7 +405,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
|
|
405
405
|
|
|
406
406
|
ViewManagerPropertyUpdater.clear();
|
|
407
407
|
|
|
408
|
-
// When using
|
|
408
|
+
// When using StaticViewConfigs is enabled, FabriUIManager is
|
|
409
409
|
// responsible for initializing and deallocating EventDispatcher.
|
|
410
410
|
// TODO T83943316: Remove this IF once StaticViewConfigs are enabled by default
|
|
411
411
|
if (mShouldDeallocateEventDispatcher) {
|