react-native-macos 0.0.0-d74468479 → 0.0.0-d7b3947f3
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/AddressSanitizerCrash/RCTAddressSanitizerCrash.js +2 -3
- package/Libraries/Alert/Alert.js +2 -2
- package/Libraries/Alert/RCTAlertManager.android.js +1 -1
- package/Libraries/Animated/AnimatedEvent.js +10 -5
- package/Libraries/Animated/AnimatedImplementation.js +92 -60
- package/Libraries/Animated/AnimatedMock.js +14 -11
- package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/Animated/AnimatedPlatformConfig.js} +6 -5
- package/Libraries/Animated/Easing.js +36 -36
- package/Libraries/Animated/NativeAnimatedHelper.js +23 -20
- package/Libraries/Animated/animations/Animation.js +5 -3
- package/Libraries/Animated/animations/DecayAnimation.js +5 -0
- package/Libraries/Animated/animations/SpringAnimation.js +15 -0
- package/Libraries/Animated/animations/TimingAnimation.js +14 -1
- package/Libraries/Animated/nodes/AnimatedAddition.js +5 -4
- package/Libraries/Animated/nodes/AnimatedColor.js +266 -0
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +4 -3
- package/Libraries/Animated/nodes/AnimatedDivision.js +5 -4
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -3
- package/Libraries/Animated/nodes/AnimatedModulo.js +4 -3
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +5 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +27 -14
- package/Libraries/Animated/nodes/AnimatedProps.js +11 -3
- package/Libraries/Animated/nodes/AnimatedStyle.js +6 -4
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +5 -4
- package/Libraries/Animated/nodes/AnimatedTracking.js +7 -5
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -3
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -0
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +5 -4
- package/Libraries/AppState/AppState.js +8 -7
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +2 -2
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -20
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -2
- package/Libraries/Components/Button.js +1 -2
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +6 -7
- package/Libraries/Components/Keyboard/Keyboard.js +8 -7
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +8 -13
- package/Libraries/Components/Pressable/Pressable.js +1 -2
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +2 -1
- package/Libraries/Components/RefreshControl/RefreshControl.js +2 -7
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +2 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +15 -5
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +3 -5
- package/Libraries/Components/ScrollView/ScrollView.js +34 -100
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +134 -71
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -2
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +2 -8
- package/Libraries/Components/Slider/SliderNativeComponent.js +2 -2
- package/Libraries/Components/Sound/SoundManager.js +1 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +115 -2
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -2
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +9 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +5 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +33 -8
- package/Libraries/Components/TextInput/TextInput.js +137 -11
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +3 -3
- package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +3 -3
- package/Libraries/Components/Touchable/BoundingDimensions.js +2 -2
- package/Libraries/Components/Touchable/PooledClass.js +6 -6
- package/Libraries/Components/Touchable/Position.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +26 -25
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -2
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -2
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -11
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -3
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +1 -0
- package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +3 -3
- package/Libraries/Components/View/View.js +0 -7
- package/Libraries/Components/View/ViewNativeComponent.js +3 -4
- package/Libraries/Components/View/ViewPropTypes.js +17 -6
- package/Libraries/Core/Devtools/parseHermesStack.js +2 -1
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/NativeExceptionsManager.js +2 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -0
- package/Libraries/Core/Timers/JSTimers.js +34 -41
- package/Libraries/Core/setUpAlert.js +1 -1
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
- package/Libraries/Core/setUpSegmentFetcher.js +4 -4
- package/Libraries/EventEmitter/NativeEventEmitter.js +2 -1
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +2 -1
- package/Libraries/HeapCapture/HeapCapture.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +2 -4
- package/Libraries/Image/Image.android.js +20 -11
- package/Libraries/Image/Image.ios.js +3 -3
- package/Libraries/Image/ImageAnalyticsTagContext.js +2 -3
- package/Libraries/Image/ImageBackground.js +1 -2
- package/Libraries/Image/ImagePickerIOS.js +6 -6
- package/Libraries/Image/ImageViewNativeComponent.js +95 -60
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -3
- package/Libraries/Image/RCTImageCache.m +1 -1
- package/Libraries/Image/RCTImageView.mm +36 -24
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +12 -72
- package/Libraries/Inspector/ElementProperties.js +2 -4
- package/Libraries/Inspector/InspectorOverlay.js +1 -2
- package/Libraries/Inspector/InspectorPanel.js +1 -2
- package/Libraries/Inspector/NetworkOverlay.js +5 -11
- package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
- package/Libraries/Interaction/FrameRateLogger.js +2 -2
- package/Libraries/Interaction/InteractionManager.js +2 -4
- package/Libraries/Interaction/JSEventLoopWatchdog.js +4 -4
- package/Libraries/Interaction/PanResponder.js +3 -4
- package/Libraries/Interaction/TouchHistoryMath.js +7 -7
- package/Libraries/JSInspector/NetworkAgent.js +1 -6
- package/Libraries/LayoutAnimation/LayoutAnimation.js +3 -3
- package/Libraries/LinkingIOS/RCTLinkingManager.h +1 -0
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +12 -5
- package/Libraries/Lists/FillRateHelper.js +1 -3
- package/Libraries/Lists/FlatList.js +41 -5
- package/Libraries/Lists/ViewabilityHelper.js +4 -10
- package/Libraries/Lists/VirtualizeUtils.js +2 -6
- package/Libraries/Lists/VirtualizedList.js +162 -131
- package/Libraries/Lists/VirtualizedListContext.js +3 -5
- package/Libraries/Lists/VirtualizedSectionList.js +63 -68
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +12 -23
- package/Libraries/LogBox/UI/LogBoxButton.js +2 -4
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +2 -4
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -2
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +3 -6
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -4
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +2 -4
- package/Libraries/LogBox/UI/LogBoxNotification.js +2 -4
- package/Libraries/Modal/Modal.js +2 -5
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h +14 -0
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
- package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
- package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -4
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +39 -0
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/Network/XHRInterceptor.js +5 -6
- package/Libraries/Network/XMLHttpRequest.js +0 -1
- package/Libraries/NewAppScreen/components/Header.js +2 -4
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -2
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +2 -4
- package/Libraries/Performance/QuickPerformanceLogger.js +17 -0
- package/Libraries/Performance/SamplingProfiler.js +3 -3
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -3
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +4 -2
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +8 -7
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/ReactNative/AppContainer.js +4 -6
- package/Libraries/ReactNative/AppRegistry.js +2 -3
- package/Libraries/ReactNative/I18nManager.js +2 -5
- package/Libraries/ReactNative/PaperUIManager.js +2 -3
- package/Libraries/ReactNative/RootTag.js +2 -3
- package/Libraries/ReactNative/UIManager.js +5 -10
- package/Libraries/ReactNative/UIManagerInjection.js +3 -3
- package/Libraries/ReactNative/getNativeComponentAttributes.js +4 -0
- package/Libraries/ReactNative/renderApplication.js +1 -2
- package/Libraries/Renderer/REVISION +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +278 -356
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +87 -78
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +340 -393
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +278 -356
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +87 -78
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +340 -393
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Storage/AsyncStorage.js +21 -21
- package/Libraries/StyleSheet/StyleSheet.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +26 -1
- package/Libraries/StyleSheet/processColor.js +2 -2
- package/Libraries/StyleSheet/splitLayoutProps.js +1 -3
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +8 -0
- package/Libraries/Text/RCTTextAttributes.h +11 -3
- package/Libraries/Text/RCTTextAttributes.m +64 -14
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
- package/Libraries/Text/Text/RCTTextView.m +123 -58
- package/Libraries/Text/Text.js +2 -9
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +66 -1
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +13 -0
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +2 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +105 -7
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +13 -1
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +20 -3
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +1 -0
- package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +12 -0
- package/Libraries/Text/TextInput/RCTBaseTextInputView.h +9 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +128 -4
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +15 -3
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +4 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +2 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +68 -2
- package/Libraries/Text/TextNativeComponent.js +5 -5
- package/Libraries/Text/TextProps.js +29 -0
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Types/CoreEventTypes.js +0 -1
- package/Libraries/Utilities/Appearance.js +8 -5
- package/Libraries/Utilities/BackHandler.android.js +4 -4
- package/Libraries/Utilities/HMRClient.js +2 -2
- package/Libraries/Utilities/JSDevSupportModule.js +3 -4
- package/Libraries/Utilities/MatrixMath.js +19 -19
- package/Libraries/Utilities/PerformanceLoggerContext.js +2 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +2 -4
- package/Libraries/Utilities/SceneTracker.js +1 -3
- package/Libraries/Utilities/__mocks__/BackHandler.js +3 -3
- package/Libraries/Utilities/buildStyleInterpolator.js +9 -9
- package/Libraries/Utilities/codegenNativeComponent.js +4 -2
- package/Libraries/Utilities/differ/deepDiffer.js +1 -1
- package/Libraries/Utilities/differ/insetsDiffer.js +1 -1
- package/Libraries/Utilities/differ/matricesDiffer.js +1 -1
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/differ/sizesDiffer.js +1 -1
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/mergeIntoFast.js +1 -1
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -0
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/Libraries/Vibration/Vibration.js +2 -2
- package/Libraries/WebSocket/RCTSRWebSocket.m +4 -0
- package/Libraries/WebSocket/WebSocketInterceptor.js +4 -4
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/_EmitterSubscription.js +2 -1
- package/Libraries/vendor/emitter/_EventEmitter.js +2 -1
- package/Libraries/vendor/emitter/_EventSubscription.js +2 -1
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +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/RCTConvert.m +26 -5
- package/React/Base/RCTEventDispatcherProtocol.h +5 -0
- package/React/Base/RCTRootView.m +0 -51
- package/React/Base/RCTTouchHandler.m +15 -1
- package/React/Base/RCTUIKit.h +10 -13
- package/React/Base/RCTUtils.m +33 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
- package/React/Base/macOS/RCTPlatformDisplayLink.m +3 -1
- package/React/Base/macOS/RCTUIKit.m +53 -0
- package/React/CoreModules/RCTAlertController.m +6 -0
- package/React/CoreModules/RCTAppearance.mm +21 -5
- package/React/CoreModules/RCTDevLoadingView.mm +1 -1
- package/React/CoreModules/RCTDevSettings.mm +33 -12
- package/React/CoreModules/RCTEventDispatcher.mm +6 -1
- package/React/CoreModules/RCTExceptionsManager.mm +1 -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/RCTPerfMonitor.mm +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +1 -0
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +69 -19
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +2 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +0 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +35 -9
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +4 -3
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +13 -5
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +1 -1
- package/React/Fabric/Mounting/RCTMountingManager.h +1 -1
- package/React/Fabric/Mounting/RCTMountingManager.mm +19 -11
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +5 -3
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +1 -1
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +1 -1
- package/React/Fabric/RCTConversions.h +9 -1
- package/React/Fabric/RCTImageResponseObserverProxy.h +1 -0
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +7 -0
- package/React/Fabric/RCTScheduler.mm +15 -0
- package/React/Fabric/RCTSurfacePresenter.h +8 -0
- package/React/Fabric/RCTSurfacePresenter.mm +54 -24
- package/React/Fabric/RCTSurfaceTouchHandler.mm +0 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/Modules/RCTUIManager.m +35 -14
- package/React/React-RCTFabric.podspec +2 -2
- package/React/Views/RCTActivityIndicatorView.m +2 -1
- package/React/Views/RCTCursor.h +39 -0
- package/React/Views/RCTCursor.m +105 -0
- package/React/Views/RCTFont.mm +11 -9
- package/React/Views/RCTModalHostView.h +5 -0
- package/React/Views/RCTModalHostViewManager.m +3 -0
- package/React/Views/RCTSliderManager.m +1 -0
- package/React/Views/RCTView.h +16 -0
- package/React/Views/RCTView.m +142 -189
- package/React/Views/RCTViewKeyboardEvent.h +6 -28
- package/React/Views/RCTViewKeyboardEvent.m +66 -61
- package/React/Views/RCTViewManager.m +19 -13
- package/React/Views/ScrollView/RCTScrollContentView.h +4 -0
- package/React/Views/ScrollView/RCTScrollContentView.m +18 -0
- package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
- package/React/Views/ScrollView/RCTScrollView.h +2 -1
- package/React/Views/ScrollView/RCTScrollView.m +72 -80
- package/React/Views/ScrollView/RCTScrollViewManager.m +1 -1
- package/React/Views/UIView+React.h +2 -0
- package/React/Views/UIView+React.m +35 -18
- package/ReactAndroid/build.gradle +16 -6
- package/ReactAndroid/gradle.properties +4 -3
- package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +1 -2
- package/ReactAndroid/src/androidTest/js/Asserts.js +2 -2
- package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +1 -1
- package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +1 -2
- package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +1 -2
- package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +54 -54
- package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +1 -1
- package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +6 -7
- package/ReactAndroid/src/androidTest/js/ShareTestModule.js +1 -1
- package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +12 -19
- package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +2 -3
- package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +2 -2
- package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +17 -17
- package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +10 -10
- package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +2 -2
- package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +2 -3
- package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +3 -6
- package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +3 -6
- package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +12 -4
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AdditionAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.java +39 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/MultiplicationAnimatedNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/SubtractionAnimatedNode.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleRegistry.java +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeArray.java +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeMap.java +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.java +119 -78
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.cpp +7 -35
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.h +5 -18
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerAdapter.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerDelegate.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerInterface.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/ViewProps.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ReactProgressBarViewManager.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +22 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +22 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +23 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +8 -8
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +1 -8
- 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/main/jni/react/jni/JSLoader.cpp +40 -16
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +3 -3
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +3 -3
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp +2 -2
- package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h +3 -3
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -0
- package/ReactAndroid/src/main/third-party/android/androidx/BUCK +16 -4
- package/ReactAndroid/src/main/third-party/java/okhttp/BUCK +4 -4
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/JSBigString.cpp +0 -65
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/package.json +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +346 -1294
- package/ReactCommon/microprofiler/BUCK +1 -1
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +8 -3
- 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 +39 -39
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +4 -2
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/text/conversions.h +4 -4
- 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/ViewShadowNode.cpp +5 -5
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +26 -17
- 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/mapbuffer/MapBuffer.cpp +64 -85
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +101 -27
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +86 -165
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +22 -57
- package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +36 -26
- 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 +10 -19
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +37 -13
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +4 -11
- package/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h +1 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +8 -8
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +4 -0
- 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/jest/assetFileTransformer.js +2 -2
- package/jest/mockModal.js +2 -2
- package/jest/preprocessor.js +2 -2
- package/jest/setup.js +3 -3
- package/package.json +33 -73
- package/react.gradle +0 -4
- package/scripts/find-node.sh +7 -0
- package/scripts/generate-artifacts.js +21 -17
- package/scripts/react_native_pods.rb +7 -9
- package/scripts/react_native_pods_utils/script_phases.rb +2 -2
- package/scripts/react_native_pods_utils/script_phases.sh +1 -1
- package/template/App.js +4 -8
- package/template/Gemfile.lock +10 -10
- package/template/_flowconfig +1 -1
- package/template/_gitignore +2 -1
- package/template/android/build.gradle +1 -1
- package/template/android/gradle.properties +1 -1
- package/template/android/gradlew.bat +89 -89
- package/template/android/settings.gradle +1 -5
- package/template/ios/HelloWorldTests/HelloWorldTests.m +1 -0
- package/template/ios/Podfile +1 -0
- package/template/package.json +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +0 -113
- package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +0 -28
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.android.js +0 -131
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.ios.js +0 -82
- package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +0 -40
- package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +0 -76
- package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +0 -233
- package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +0 -24
- package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +0 -30
- package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +0 -32
- package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +0 -693
- package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +0 -158
- package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +0 -168
- package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +0 -99
- package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +0 -46
- package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +0 -408
- package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +0 -68
- package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +0 -86
- package/Libraries/Types/RootTagTypes.js~merged +0 -23
- package/ReactCommon/butter/optional.h +0 -38
- package/ReactCommon/react/renderer/mapbuffer/primitives.h +0 -91
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
- package/flow-typed/npm/prop-types_v15.x.x.js +0 -42
- package/third-party-podspecs/boost-for-react-native.podspec +0 -20
|
@@ -152,6 +152,7 @@ public class ViewProps {
|
|
|
152
152
|
public static final String ACCESSIBILITY_STATE = "accessibilityState";
|
|
153
153
|
public static final String ACCESSIBILITY_ACTIONS = "accessibilityActions";
|
|
154
154
|
public static final String ACCESSIBILITY_VALUE = "accessibilityValue";
|
|
155
|
+
public static final String ACCESSIBILITY_LABELLED_BY = "accessibilityLabelledBy";
|
|
155
156
|
public static final String IMPORTANT_FOR_ACCESSIBILITY = "importantForAccessibility";
|
|
156
157
|
|
|
157
158
|
// DEPRECATED
|
package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java
CHANGED
|
@@ -154,12 +154,15 @@ public class ReactDrawerLayoutManager extends ViewGroupManager<ReactDrawerLayout
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
@Override
|
|
157
|
+
@ReactProp(name = "keyboardDismissMode")
|
|
157
158
|
public void setKeyboardDismissMode(ReactDrawerLayout view, @Nullable String value) {}
|
|
158
159
|
|
|
159
160
|
@Override
|
|
161
|
+
@ReactProp(name = "drawerBackgroundColor", customType = "Color")
|
|
160
162
|
public void setDrawerBackgroundColor(ReactDrawerLayout view, @Nullable Integer value) {}
|
|
161
163
|
|
|
162
164
|
@Override
|
|
165
|
+
@ReactProp(name = "statusBarBackgroundColor", customType = "Color")
|
|
163
166
|
public void setStatusBarBackgroundColor(ReactDrawerLayout view, @Nullable Integer value) {}
|
|
164
167
|
|
|
165
168
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java
CHANGED
|
@@ -99,15 +99,19 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
@Override
|
|
102
|
+
@ReactProp(name = "presentationStyle")
|
|
102
103
|
public void setPresentationStyle(ReactModalHostView view, @Nullable String value) {}
|
|
103
104
|
|
|
104
105
|
@Override
|
|
106
|
+
@ReactProp(name = "animated")
|
|
105
107
|
public void setAnimated(ReactModalHostView view, boolean value) {}
|
|
106
108
|
|
|
107
109
|
@Override
|
|
110
|
+
@ReactProp(name = "supportedOrientations")
|
|
108
111
|
public void setSupportedOrientations(ReactModalHostView view, @Nullable ReadableArray value) {}
|
|
109
112
|
|
|
110
113
|
@Override
|
|
114
|
+
@ReactProp(name = "identifier")
|
|
111
115
|
public void setIdentifier(ReactModalHostView view, int value) {}
|
|
112
116
|
|
|
113
117
|
@Override
|
|
@@ -146,6 +150,10 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
|
|
|
146
150
|
MapBuilder.<String, Object>builder()
|
|
147
151
|
.put(RequestCloseEvent.EVENT_NAME, MapBuilder.of("registrationName", "onRequestClose"))
|
|
148
152
|
.put(ShowEvent.EVENT_NAME, MapBuilder.of("registrationName", "onShow"))
|
|
153
|
+
// iOS only
|
|
154
|
+
.put("topDismiss", MapBuilder.of("registrationName", "onDismiss"))
|
|
155
|
+
// iOS only
|
|
156
|
+
.put("topOrientationChange", MapBuilder.of("registrationName", "onOrientationChange"))
|
|
149
157
|
.build());
|
|
150
158
|
return eventTypeConstants;
|
|
151
159
|
}
|
|
@@ -44,6 +44,7 @@ public class ReactProgressBarViewManager
|
|
|
44
44
|
private final WeakHashMap<Integer, Pair<Integer, Integer>> mMeasuredStyles = new WeakHashMap<>();
|
|
45
45
|
|
|
46
46
|
/* package */ static final String PROP_STYLE = "styleAttr";
|
|
47
|
+
/* package */ static final String PROP_ATTR = "typeAttr";
|
|
47
48
|
/* package */ static final String PROP_INDETERMINATE = "indeterminate";
|
|
48
49
|
/* package */ static final String PROP_PROGRESS = "progress";
|
|
49
50
|
/* package */ static final String PROP_ANIMATING = "animating";
|
|
@@ -115,6 +116,7 @@ public class ReactProgressBarViewManager
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
@Override
|
|
119
|
+
@ReactProp(name = PROP_ATTR)
|
|
118
120
|
public void setTypeAttr(ProgressBarContainerView view, @Nullable String value) {}
|
|
119
121
|
|
|
120
122
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.views.scroll;
|
|
9
9
|
|
|
10
|
-
import static com.facebook.react.config.ReactFeatureFlags.enableScrollViewSnapToAlignmentProp;
|
|
11
10
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_CENTER;
|
|
12
11
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISABLED;
|
|
13
12
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END;
|
|
@@ -40,6 +39,7 @@ import com.facebook.react.common.build.ReactBuildConfig;
|
|
|
40
39
|
import com.facebook.react.modules.i18nmanager.I18nUtil;
|
|
41
40
|
import com.facebook.react.uimanager.FabricViewStateManager;
|
|
42
41
|
import com.facebook.react.uimanager.MeasureSpecAssertions;
|
|
42
|
+
import com.facebook.react.uimanager.PointerEvents;
|
|
43
43
|
import com.facebook.react.uimanager.ReactClippingViewGroup;
|
|
44
44
|
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
|
45
45
|
import com.facebook.react.uimanager.ReactOverflowViewWithInset;
|
|
@@ -105,6 +105,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
105
105
|
private final FabricViewStateManager mFabricViewStateManager = new FabricViewStateManager();
|
|
106
106
|
private final ReactScrollViewScrollState mReactScrollViewScrollState;
|
|
107
107
|
private final ValueAnimator DEFAULT_FLING_ANIMATOR = ObjectAnimator.ofInt(this, "scrollX", 0, 0);
|
|
108
|
+
private PointerEvents mPointerEvents = PointerEvents.AUTO;
|
|
108
109
|
|
|
109
110
|
private final Rect mTempRect = new Rect();
|
|
110
111
|
|
|
@@ -452,6 +453,11 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
452
453
|
return false;
|
|
453
454
|
}
|
|
454
455
|
|
|
456
|
+
// We intercept the touch event if the children are not supposed to receive it.
|
|
457
|
+
if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
|
|
455
461
|
try {
|
|
456
462
|
if (super.onInterceptTouchEvent(ev)) {
|
|
457
463
|
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
|
|
@@ -519,6 +525,11 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
519
525
|
return false;
|
|
520
526
|
}
|
|
521
527
|
|
|
528
|
+
// We do not accept the touch event if this view is not supposed to receive it.
|
|
529
|
+
if (!PointerEvents.canBeTouchTarget(mPointerEvents)) {
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
|
|
522
533
|
mVelocityHelper.calculateVelocity(ev);
|
|
523
534
|
int action = ev.getAction() & MotionEvent.ACTION_MASK;
|
|
524
535
|
if (action == MotionEvent.ACTION_UP && mDragging) {
|
|
@@ -896,9 +907,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
896
907
|
}
|
|
897
908
|
|
|
898
909
|
// pagingEnabled only allows snapping one interval at a time
|
|
899
|
-
if (mSnapInterval == 0
|
|
900
|
-
&& mSnapOffsets == null
|
|
901
|
-
&& (!enableScrollViewSnapToAlignmentProp || mSnapToAlignment == SNAP_ALIGNMENT_DISABLED)) {
|
|
910
|
+
if (mSnapInterval == 0 && mSnapOffsets == null && mSnapToAlignment == SNAP_ALIGNMENT_DISABLED) {
|
|
902
911
|
smoothScrollAndSnap(velocityX);
|
|
903
912
|
return;
|
|
904
913
|
}
|
|
@@ -943,7 +952,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
943
952
|
}
|
|
944
953
|
}
|
|
945
954
|
}
|
|
946
|
-
} else if (
|
|
955
|
+
} else if (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) {
|
|
947
956
|
if (mSnapInterval > 0) {
|
|
948
957
|
double ratio = (double) targetOffset / mSnapInterval;
|
|
949
958
|
smallerOffset =
|
|
@@ -1253,4 +1262,12 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1253
1262
|
this, velocityX, 0, Math.max(0, computeHorizontalScrollRange() - getWidth()), 0)
|
|
1254
1263
|
.x;
|
|
1255
1264
|
}
|
|
1265
|
+
|
|
1266
|
+
public void setPointerEvents(PointerEvents pointerEvents) {
|
|
1267
|
+
mPointerEvents = pointerEvents;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
public PointerEvents getPointerEvents() {
|
|
1271
|
+
return mPointerEvents;
|
|
1272
|
+
}
|
|
1256
1273
|
}
|
|
@@ -16,6 +16,7 @@ import com.facebook.react.bridge.ReadableMap;
|
|
|
16
16
|
import com.facebook.react.module.annotations.ReactModule;
|
|
17
17
|
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
|
18
18
|
import com.facebook.react.uimanager.PixelUtil;
|
|
19
|
+
import com.facebook.react.uimanager.PointerEvents;
|
|
19
20
|
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
|
20
21
|
import com.facebook.react.uimanager.ReactStylesDiffMap;
|
|
21
22
|
import com.facebook.react.uimanager.Spacing;
|
|
@@ -321,4 +322,9 @@ public class ReactHorizontalScrollViewManager extends ViewGroupManager<ReactHori
|
|
|
321
322
|
view.scrollTo(0, 0);
|
|
322
323
|
}
|
|
323
324
|
}
|
|
325
|
+
|
|
326
|
+
@ReactProp(name = ViewProps.POINTER_EVENTS)
|
|
327
|
+
public void setPointerEvents(ReactHorizontalScrollView view, @Nullable String pointerEventsStr) {
|
|
328
|
+
view.setPointerEvents(PointerEvents.parsePointerEvents(pointerEventsStr));
|
|
329
|
+
}
|
|
324
330
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.views.scroll;
|
|
9
9
|
|
|
10
|
-
import static com.facebook.react.config.ReactFeatureFlags.enableScrollViewSnapToAlignmentProp;
|
|
11
10
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_CENTER;
|
|
12
11
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISABLED;
|
|
13
12
|
import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END;
|
|
@@ -36,6 +35,7 @@ import com.facebook.react.R;
|
|
|
36
35
|
import com.facebook.react.common.ReactConstants;
|
|
37
36
|
import com.facebook.react.uimanager.FabricViewStateManager;
|
|
38
37
|
import com.facebook.react.uimanager.MeasureSpecAssertions;
|
|
38
|
+
import com.facebook.react.uimanager.PointerEvents;
|
|
39
39
|
import com.facebook.react.uimanager.ReactClippingViewGroup;
|
|
40
40
|
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
|
41
41
|
import com.facebook.react.uimanager.ReactOverflowViewWithInset;
|
|
@@ -102,6 +102,7 @@ public class ReactScrollView extends ScrollView
|
|
|
102
102
|
private final ReactScrollViewScrollState mReactScrollViewScrollState =
|
|
103
103
|
new ReactScrollViewScrollState(ViewCompat.LAYOUT_DIRECTION_LTR);
|
|
104
104
|
private final ValueAnimator DEFAULT_FLING_ANIMATOR = ObjectAnimator.ofInt(this, "scrollY", 0, 0);
|
|
105
|
+
private PointerEvents mPointerEvents = PointerEvents.AUTO;
|
|
105
106
|
|
|
106
107
|
public ReactScrollView(Context context) {
|
|
107
108
|
this(context, null);
|
|
@@ -332,6 +333,11 @@ public class ReactScrollView extends ScrollView
|
|
|
332
333
|
return false;
|
|
333
334
|
}
|
|
334
335
|
|
|
336
|
+
// We intercept the touch event if the children are not supposed to receive it.
|
|
337
|
+
if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
|
|
335
341
|
try {
|
|
336
342
|
if (super.onInterceptTouchEvent(ev)) {
|
|
337
343
|
NativeGestureUtil.notifyNativeGestureStarted(this, ev);
|
|
@@ -357,6 +363,11 @@ public class ReactScrollView extends ScrollView
|
|
|
357
363
|
return false;
|
|
358
364
|
}
|
|
359
365
|
|
|
366
|
+
// We do not accept the touch event if this view is not supposed to receive it.
|
|
367
|
+
if (!PointerEvents.canBeTouchTarget(mPointerEvents)) {
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
|
|
360
371
|
mVelocityHelper.calculateVelocity(ev);
|
|
361
372
|
int action = ev.getAction() & MotionEvent.ACTION_MASK;
|
|
362
373
|
if (action == MotionEvent.ACTION_UP && mDragging) {
|
|
@@ -680,9 +691,7 @@ public class ReactScrollView extends ScrollView
|
|
|
680
691
|
}
|
|
681
692
|
|
|
682
693
|
// pagingEnabled only allows snapping one interval at a time
|
|
683
|
-
if (mSnapInterval == 0
|
|
684
|
-
&& mSnapOffsets == null
|
|
685
|
-
&& (!enableScrollViewSnapToAlignmentProp || mSnapToAlignment == SNAP_ALIGNMENT_DISABLED)) {
|
|
694
|
+
if (mSnapInterval == 0 && mSnapOffsets == null && mSnapToAlignment == SNAP_ALIGNMENT_DISABLED) {
|
|
686
695
|
smoothScrollAndSnap(velocityY);
|
|
687
696
|
return;
|
|
688
697
|
}
|
|
@@ -721,7 +730,7 @@ public class ReactScrollView extends ScrollView
|
|
|
721
730
|
}
|
|
722
731
|
}
|
|
723
732
|
|
|
724
|
-
} else if (
|
|
733
|
+
} else if (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) {
|
|
725
734
|
if (mSnapInterval > 0) {
|
|
726
735
|
double ratio = (double) targetOffset / mSnapInterval;
|
|
727
736
|
smallerOffset =
|
|
@@ -1115,4 +1124,12 @@ public class ReactScrollView extends ScrollView
|
|
|
1115
1124
|
return ReactScrollViewHelper.predictFinalScrollPosition(this, 0, velocityY, 0, getMaxScrollY())
|
|
1116
1125
|
.y;
|
|
1117
1126
|
}
|
|
1127
|
+
|
|
1128
|
+
public void setPointerEvents(PointerEvents pointerEvents) {
|
|
1129
|
+
mPointerEvents = pointerEvents;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
public PointerEvents getPointerEvents() {
|
|
1133
|
+
return mPointerEvents;
|
|
1134
|
+
}
|
|
1118
1135
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java
CHANGED
|
@@ -27,6 +27,7 @@ import com.facebook.react.uimanager.PixelUtil;
|
|
|
27
27
|
import com.facebook.react.uimanager.UIManagerHelper;
|
|
28
28
|
import com.facebook.react.uimanager.common.UIManagerType;
|
|
29
29
|
import com.facebook.react.uimanager.common.ViewUtil;
|
|
30
|
+
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
30
31
|
import java.util.Collections;
|
|
31
32
|
import java.util.Set;
|
|
32
33
|
import java.util.WeakHashMap;
|
|
@@ -107,20 +108,28 @@ public class ReactScrollViewHelper {
|
|
|
107
108
|
|
|
108
109
|
ReactContext reactContext = (ReactContext) scrollView.getContext();
|
|
109
110
|
int surfaceId = UIManagerHelper.getSurfaceId(reactContext);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
|
|
112
|
+
// It's possible for the EventDispatcher to go away - for example,
|
|
113
|
+
// if there's a crash initiated from JS and we tap on a ScrollView
|
|
114
|
+
// around teardown of RN, this will cause a NPE. We can safely ignore
|
|
115
|
+
// this since the crash is usually a red herring.
|
|
116
|
+
EventDispatcher eventDispatcher =
|
|
117
|
+
UIManagerHelper.getEventDispatcherForReactTag(reactContext, scrollView.getId());
|
|
118
|
+
if (eventDispatcher != null) {
|
|
119
|
+
eventDispatcher.dispatchEvent(
|
|
120
|
+
ScrollEvent.obtain(
|
|
121
|
+
surfaceId,
|
|
122
|
+
scrollView.getId(),
|
|
123
|
+
scrollEventType,
|
|
124
|
+
scrollView.getScrollX(),
|
|
125
|
+
scrollView.getScrollY(),
|
|
126
|
+
xVelocity,
|
|
127
|
+
yVelocity,
|
|
128
|
+
contentView.getWidth(),
|
|
129
|
+
contentView.getHeight(),
|
|
130
|
+
scrollView.getWidth(),
|
|
131
|
+
scrollView.getHeight()));
|
|
132
|
+
}
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
/** This is only for Java listeners. onLayout events emitted to JS are handled elsewhere. */
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java
CHANGED
|
@@ -19,6 +19,7 @@ import com.facebook.react.common.MapBuilder;
|
|
|
19
19
|
import com.facebook.react.module.annotations.ReactModule;
|
|
20
20
|
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
|
21
21
|
import com.facebook.react.uimanager.PixelUtil;
|
|
22
|
+
import com.facebook.react.uimanager.PointerEvents;
|
|
22
23
|
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
|
23
24
|
import com.facebook.react.uimanager.ReactStylesDiffMap;
|
|
24
25
|
import com.facebook.react.uimanager.Spacing;
|
|
@@ -363,4 +364,9 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
|
|
|
363
364
|
MapBuilder.of("registrationName", "onMomentumScrollEnd"))
|
|
364
365
|
.build();
|
|
365
366
|
}
|
|
367
|
+
|
|
368
|
+
@ReactProp(name = ViewProps.POINTER_EVENTS)
|
|
369
|
+
public void setPointerEvents(ReactScrollView view, @Nullable String pointerEventsStr) {
|
|
370
|
+
view.setPointerEvents(PointerEvents.parsePointerEvents(pointerEventsStr));
|
|
371
|
+
}
|
|
366
372
|
}
|
|
@@ -221,12 +221,15 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider>
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
@Override
|
|
224
|
+
@ReactProp(name = "disabled")
|
|
224
225
|
public void setDisabled(ReactSlider view, boolean value) {}
|
|
225
226
|
|
|
226
227
|
@Override
|
|
228
|
+
@ReactProp(name = "maximumTrackImage", customType = "ImageSource")
|
|
227
229
|
public void setMaximumTrackImage(ReactSlider view, @Nullable ReadableMap value) {}
|
|
228
230
|
|
|
229
231
|
@Override
|
|
232
|
+
@ReactProp(name = "minimumTrackImage", customType = "ImageSource")
|
|
230
233
|
public void setMinimumTrackImage(ReactSlider view, @Nullable ReadableMap value) {}
|
|
231
234
|
|
|
232
235
|
@Override
|
|
@@ -235,9 +238,11 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider>
|
|
|
235
238
|
}
|
|
236
239
|
|
|
237
240
|
@Override
|
|
241
|
+
@ReactProp(name = "thumbImage", customType = "ImageSource")
|
|
238
242
|
public void setThumbImage(ReactSlider view, @Nullable ReadableMap value) {}
|
|
239
243
|
|
|
240
244
|
@Override
|
|
245
|
+
@ReactProp(name = "trackImage", customType = "ImageSource")
|
|
241
246
|
public void setTrackImage(ReactSlider view, @Nullable ReadableMap value) {}
|
|
242
247
|
|
|
243
248
|
@Override
|
|
@@ -258,6 +263,25 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider>
|
|
|
258
263
|
return eventTypeConstants;
|
|
259
264
|
}
|
|
260
265
|
|
|
266
|
+
@Nullable
|
|
267
|
+
@Override
|
|
268
|
+
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
|
|
269
|
+
@Nullable
|
|
270
|
+
Map<String, Object> baseEventTypeConstants =
|
|
271
|
+
super.getExportedCustomBubblingEventTypeConstants();
|
|
272
|
+
Map<String, Object> eventTypeConstants =
|
|
273
|
+
baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
|
|
274
|
+
eventTypeConstants.putAll(
|
|
275
|
+
MapBuilder.<String, Object>builder()
|
|
276
|
+
.put(
|
|
277
|
+
"topValueChange",
|
|
278
|
+
MapBuilder.of(
|
|
279
|
+
"phasedRegistrationNames",
|
|
280
|
+
MapBuilder.of("bubbled", "onValueChange", "captured", "onValueChangeCapture")))
|
|
281
|
+
.build());
|
|
282
|
+
return eventTypeConstants;
|
|
283
|
+
}
|
|
284
|
+
|
|
261
285
|
@Override
|
|
262
286
|
public long measure(
|
|
263
287
|
Context context,
|
|
@@ -149,10 +149,10 @@ public class TextAttributeProps {
|
|
|
149
149
|
ReadableMapBuffer.MapBufferEntry entry = iterator.next();
|
|
150
150
|
switch (entry.getKey()) {
|
|
151
151
|
case TA_KEY_FOREGROUND_COLOR:
|
|
152
|
-
result.setColor(entry.getInt(
|
|
152
|
+
result.setColor(entry.getInt());
|
|
153
153
|
break;
|
|
154
154
|
case TA_KEY_BACKGROUND_COLOR:
|
|
155
|
-
result.setBackgroundColor(entry.getInt(
|
|
155
|
+
result.setBackgroundColor(entry.getInt());
|
|
156
156
|
break;
|
|
157
157
|
case TA_KEY_OPACITY:
|
|
158
158
|
break;
|
|
@@ -160,7 +160,7 @@ public class TextAttributeProps {
|
|
|
160
160
|
result.setFontFamily(entry.getString());
|
|
161
161
|
break;
|
|
162
162
|
case TA_KEY_FONT_SIZE:
|
|
163
|
-
result.setFontSize((float) entry.getDouble(
|
|
163
|
+
result.setFontSize((float) entry.getDouble());
|
|
164
164
|
break;
|
|
165
165
|
case TA_KEY_FONT_SIZE_MULTIPLIER:
|
|
166
166
|
break;
|
|
@@ -174,13 +174,13 @@ public class TextAttributeProps {
|
|
|
174
174
|
result.setFontVariant(entry.getReadableMapBuffer());
|
|
175
175
|
break;
|
|
176
176
|
case TA_KEY_ALLOW_FONT_SCALING:
|
|
177
|
-
result.setAllowFontScaling(entry.getBoolean(
|
|
177
|
+
result.setAllowFontScaling(entry.getBoolean());
|
|
178
178
|
break;
|
|
179
179
|
case TA_KEY_LETTER_SPACING:
|
|
180
|
-
result.setLetterSpacing((float) entry.getDouble(
|
|
180
|
+
result.setLetterSpacing((float) entry.getDouble());
|
|
181
181
|
break;
|
|
182
182
|
case TA_KEY_LINE_HEIGHT:
|
|
183
|
-
result.setLineHeight((float) entry.getDouble(
|
|
183
|
+
result.setLineHeight((float) entry.getDouble());
|
|
184
184
|
break;
|
|
185
185
|
case TA_KEY_ALIGNMENT:
|
|
186
186
|
break;
|
|
@@ -194,10 +194,10 @@ public class TextAttributeProps {
|
|
|
194
194
|
case TA_KEY_TEXT_DECORATION_STYLE:
|
|
195
195
|
break;
|
|
196
196
|
case TA_KEY_TEXT_SHADOW_RAIDUS:
|
|
197
|
-
result.setTextShadowRadius(entry.getInt(
|
|
197
|
+
result.setTextShadowRadius(entry.getInt());
|
|
198
198
|
break;
|
|
199
199
|
case TA_KEY_TEXT_SHADOW_COLOR:
|
|
200
|
-
result.setTextShadowColor(entry.getInt(
|
|
200
|
+
result.setTextShadowColor(entry.getInt());
|
|
201
201
|
break;
|
|
202
202
|
case TA_KEY_IS_HIGHLIGHTED:
|
|
203
203
|
break;
|
package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java
CHANGED
|
@@ -117,7 +117,7 @@ public class TextLayoutManagerMapBuffer {
|
|
|
117
117
|
SpannableStringBuilder sb,
|
|
118
118
|
List<SetSpanOperation> ops) {
|
|
119
119
|
|
|
120
|
-
for (
|
|
120
|
+
for (int i = 0, length = fragments.getCount(); i < length; i++) {
|
|
121
121
|
ReadableMapBuffer fragment = fragments.getMapBuffer(i);
|
|
122
122
|
int start = sb.length();
|
|
123
123
|
|
|
@@ -73,7 +73,7 @@ public class FrescoBasedReactTextInlineImageShadowNode extends ReactTextInlineIm
|
|
|
73
73
|
mHeaders = headers;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
@ReactProp(name = "tintColor")
|
|
76
|
+
@ReactProp(name = "tintColor", customType = "Color")
|
|
77
77
|
public void setTintColor(int tintColor) {
|
|
78
78
|
mTintColor = tintColor;
|
|
79
79
|
}
|
|
@@ -12,8 +12,8 @@ import androidx.annotation.Nullable;
|
|
|
12
12
|
import com.facebook.drawee.backends.pipeline.Fresco;
|
|
13
13
|
import com.facebook.drawee.controller.AbstractDraweeControllerBuilder;
|
|
14
14
|
import com.facebook.react.module.annotations.ReactModule;
|
|
15
|
+
import com.facebook.react.uimanager.BaseViewManager;
|
|
15
16
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
16
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Manages Images embedded in Text nodes using Fresco. Since they are used only as a virtual nodes
|
|
@@ -21,7 +21,7 @@ import com.facebook.react.uimanager.ViewManager;
|
|
|
21
21
|
*/
|
|
22
22
|
@ReactModule(name = FrescoBasedReactTextInlineImageViewManager.REACT_CLASS)
|
|
23
23
|
public class FrescoBasedReactTextInlineImageViewManager
|
|
24
|
-
extends
|
|
24
|
+
extends BaseViewManager<View, FrescoBasedReactTextInlineImageShadowNode> {
|
|
25
25
|
|
|
26
26
|
public static final String REACT_CLASS = "RCTTextInlineImage";
|
|
27
27
|
|
|
@@ -31,7 +31,6 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|
|
31
31
|
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
|
32
32
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
33
33
|
import com.facebook.yoga.YogaConstants;
|
|
34
|
-
import java.util.Locale;
|
|
35
34
|
import java.util.Map;
|
|
36
35
|
|
|
37
36
|
/** View manager for AndroidViews (plain React Views). */
|
|
@@ -161,13 +160,7 @@ public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup> {
|
|
|
161
160
|
|
|
162
161
|
@ReactProp(name = ViewProps.POINTER_EVENTS)
|
|
163
162
|
public void setPointerEvents(ReactViewGroup view, @Nullable String pointerEventsStr) {
|
|
164
|
-
|
|
165
|
-
view.setPointerEvents(PointerEvents.AUTO);
|
|
166
|
-
} else {
|
|
167
|
-
PointerEvents pointerEvents =
|
|
168
|
-
PointerEvents.valueOf(pointerEventsStr.toUpperCase(Locale.US).replace("-", "_"));
|
|
169
|
-
view.setPointerEvents(pointerEvents);
|
|
170
|
-
}
|
|
163
|
+
view.setPointerEvents(PointerEvents.parsePointerEvents(pointerEventsStr));
|
|
171
164
|
}
|
|
172
165
|
|
|
173
166
|
@ReactProp(name = "nativeBackgroundAndroid")
|
|
@@ -27,7 +27,7 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE
|
|
|
27
27
|
APP_STL := c++_shared
|
|
28
28
|
|
|
29
29
|
APP_CFLAGS := -Wall -Werror -fexceptions -frtti -DWITH_INSPECTOR=1
|
|
30
|
-
APP_CPPFLAGS := -std=c++
|
|
30
|
+
APP_CPPFLAGS := -std=c++17
|
|
31
31
|
# Make sure every shared lib includes a .note.gnu.build-id header
|
|
32
32
|
APP_LDFLAGS := -Wl,--build-id
|
|
33
33
|
|
|
@@ -22,7 +22,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
|
22
22
|
# ./../ == react
|
|
23
23
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
24
24
|
|
|
25
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
25
|
+
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
|
|
26
26
|
|
|
27
27
|
LOCAL_LDLIBS += -landroid
|
|
28
28
|
|
|
@@ -79,7 +79,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
|
79
79
|
# ./../ == react
|
|
80
80
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
81
81
|
|
|
82
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
82
|
+
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
|
|
83
83
|
|
|
84
84
|
LOCAL_LDLIBS += -landroid
|
|
85
85
|
|
|
@@ -9,14 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
#include <android/asset_manager_jni.h>
|
|
11
11
|
#include <cxxreact/JSBigString.h>
|
|
12
|
-
#include <
|
|
12
|
+
#include <cxxreact/JSBundleType.h>
|
|
13
13
|
#include <fbjni/fbjni.h>
|
|
14
14
|
#include <folly/Conv.h>
|
|
15
|
-
#include <fstream>
|
|
16
|
-
#include <memory>
|
|
17
|
-
#include <sstream>
|
|
18
|
-
#include <streambuf>
|
|
19
|
-
#include <string>
|
|
20
15
|
|
|
21
16
|
#ifdef WITH_FBSYSTRACE
|
|
22
17
|
#include <fbsystrace.h>
|
|
@@ -28,6 +23,31 @@ using namespace facebook::jni;
|
|
|
28
23
|
namespace facebook {
|
|
29
24
|
namespace react {
|
|
30
25
|
|
|
26
|
+
class AssetManagerString : public JSBigString {
|
|
27
|
+
public:
|
|
28
|
+
AssetManagerString(AAsset *asset) : asset_(asset){};
|
|
29
|
+
|
|
30
|
+
virtual ~AssetManagerString() {
|
|
31
|
+
AAsset_close(asset_);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
bool isAscii() const override {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const char *c_str() const override {
|
|
39
|
+
return (const char *)AAsset_getBuffer(asset_);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Length of the c_str without the NULL byte.
|
|
43
|
+
size_t size() const override {
|
|
44
|
+
return AAsset_getLength(asset_);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private:
|
|
48
|
+
AAsset *asset_;
|
|
49
|
+
};
|
|
50
|
+
|
|
31
51
|
__attribute__((visibility("default"))) AAssetManager *extractAssetManager(
|
|
32
52
|
alias_ref<JAssetManager::javaobject> assetManager) {
|
|
33
53
|
auto env = Environment::current();
|
|
@@ -50,17 +70,21 @@ loadScriptFromAssets(AAssetManager *manager, const std::string &assetName) {
|
|
|
50
70
|
AASSET_MODE_STREAMING); // Optimized for sequential read: see
|
|
51
71
|
// AssetManager.java for docs
|
|
52
72
|
if (asset) {
|
|
53
|
-
auto
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
auto script = std::make_unique<AssetManagerString>(asset);
|
|
74
|
+
if (script->size() >= sizeof(BundleHeader)) {
|
|
75
|
+
// When using bytecode, it's safe for the underlying buffer to not be \0
|
|
76
|
+
// terminated. In all other scenarios, we will force a copy of the
|
|
77
|
+
// script to ensure we have a terminator.
|
|
78
|
+
const BundleHeader *header =
|
|
79
|
+
reinterpret_cast<const BundleHeader *>(script->c_str());
|
|
80
|
+
if (parseTypeFromHeader(*header) == ScriptTag::HBCBundle) {
|
|
81
|
+
return script;
|
|
82
|
+
}
|
|
63
83
|
}
|
|
84
|
+
|
|
85
|
+
auto buf = std::make_unique<JSBigBufferString>(script->size());
|
|
86
|
+
memcpy(buf->data(), script->c_str(), script->size());
|
|
87
|
+
return buf;
|
|
64
88
|
}
|
|
65
89
|
}
|
|
66
90
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "WritableNativeArray.h"
|
|
9
9
|
|
|
10
|
-
#include "
|
|
10
|
+
#include "ReadableNativeMap.h"
|
|
11
11
|
|
|
12
12
|
using namespace facebook::jni;
|
|
13
13
|
|
|
@@ -58,7 +58,7 @@ void WritableNativeArray::pushString(jstring value) {
|
|
|
58
58
|
array_.push_back(wrap_alias(value)->toStdString());
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
void WritableNativeArray::pushNativeArray(
|
|
61
|
+
void WritableNativeArray::pushNativeArray(ReadableNativeArray *otherArray) {
|
|
62
62
|
if (otherArray == NULL) {
|
|
63
63
|
pushNull();
|
|
64
64
|
return;
|
|
@@ -67,7 +67,7 @@ void WritableNativeArray::pushNativeArray(WritableNativeArray *otherArray) {
|
|
|
67
67
|
array_.push_back(otherArray->consume());
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
void WritableNativeArray::pushNativeMap(
|
|
70
|
+
void WritableNativeArray::pushNativeMap(ReadableNativeMap *map) {
|
|
71
71
|
if (map == NULL) {
|
|
72
72
|
pushNull();
|
|
73
73
|
return;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
namespace facebook {
|
|
17
17
|
namespace react {
|
|
18
18
|
|
|
19
|
-
struct
|
|
19
|
+
struct ReadableNativeMap;
|
|
20
20
|
|
|
21
21
|
struct WritableArray : jni::JavaClass<WritableArray> {
|
|
22
22
|
static auto constexpr kJavaDescriptor =
|
|
@@ -38,8 +38,8 @@ struct WritableNativeArray
|
|
|
38
38
|
void pushDouble(jdouble value);
|
|
39
39
|
void pushInt(jint value);
|
|
40
40
|
void pushString(jstring value);
|
|
41
|
-
void pushNativeArray(
|
|
42
|
-
void pushNativeMap(
|
|
41
|
+
void pushNativeArray(ReadableNativeArray *otherArray);
|
|
42
|
+
void pushNativeMap(ReadableNativeMap *map);
|
|
43
43
|
|
|
44
44
|
static void registerNatives();
|
|
45
45
|
};
|