react-native-tvos 0.85.3-0 → 0.86.0-0
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/Animated/AnimatedImplementation.js +6 -6
- package/Libraries/Animated/NativeAnimatedAllowlist.js +21 -0
- package/Libraries/Animated/components/AnimatedImage.js +3 -3
- package/Libraries/Animated/components/AnimatedText.js +3 -3
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedAddition.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +7 -7
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +1 -1
- package/Libraries/Animated/nodes/AnimatedDivision.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -24
- package/Libraries/Animated/nodes/AnimatedModulo.js +1 -1
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +1 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +2 -2
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -2
- package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +4 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.h +5 -5
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +2 -2
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/RCTBlobCollector.h +1 -1
- package/Libraries/Blob/RCTBlobCollector.mm +14 -26
- package/Libraries/Blob/RCTBlobManager.mm +11 -3
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +29 -23
- package/Libraries/Components/Keyboard/Keyboard.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -27
- package/Libraries/Components/Pressable/Pressable.d.ts +1 -0
- package/Libraries/Components/Pressable/Pressable.js +2 -2
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +7 -8
- package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +4 -4
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +2 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +2 -2
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TV/TVViewPropTypes.js +9 -0
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +25 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +2 -2
- package/Libraries/Components/TextInput/TextInput.d.ts +24 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +24 -0
- package/Libraries/Components/TextInput/TextInput.js +5 -5
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +5 -5
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +5 -5
- package/Libraries/Components/Touchable/PooledClass.js +4 -4
- package/Libraries/Components/Touchable/Touchable.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -10
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +10 -2
- package/Libraries/Components/View/View.js +100 -91
- package/Libraries/Components/View/ViewPropTypes.js +3 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +8 -0
- package/Libraries/Core/ExceptionsManager.js +2 -8
- package/Libraries/Core/InitializeCore.js +0 -13
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +2 -2
- package/Libraries/Core/Timers/immediateShim.js +1 -1
- package/Libraries/Core/setUpBatchedBridge.js +1 -1
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +9 -5
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -2
- package/Libraries/Image/Image.android.js +15 -35
- package/Libraries/Image/RCTImageLoader.mm +4 -2
- package/Libraries/Image/RelativeImageStub.js +2 -2
- package/Libraries/LayoutAnimation/LayoutAnimation.js +12 -12
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/LogBox/LogBox.js +2 -2
- package/Libraries/LogBox/LogBoxInspectorContainer.js +24 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +27 -4
- package/Libraries/LogBox/UI/LogBoxButton.js +47 -33
- package/Libraries/LogBox/UI/LogBoxInspector.js +61 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +6 -0
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +3 -1
- package/Libraries/LogBox/UI/LogBoxNotification.js +2 -0
- package/Libraries/Modal/Modal.js +12 -7
- package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.mm +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +15 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +17 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -2
- package/Libraries/NativeComponent/TVViewConfig.js +1 -0
- package/Libraries/NativeComponent/ViewConfigIgnore.js +4 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.mm +1 -2
- package/Libraries/Network/XMLHttpRequest.js +29 -12
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +2 -3
- package/Libraries/ReactNative/AppContainer-prod.js +1 -2
- package/Libraries/ReactNative/AppContainer.js +0 -1
- package/Libraries/ReactNative/AppRegistry.d.ts +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +1 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +16 -16
- package/Libraries/ReactNative/DeprecatedPerformanceLoggerStub.js +83 -0
- package/Libraries/ReactNative/FabricUIManager.js +6 -0
- package/Libraries/{Utilities → ReactNative}/IPerformanceLogger.d.ts +8 -5
- package/Libraries/{Utilities/IPerformanceLogger.js → ReactNative/IPerformanceLogger.flow.js} +12 -9
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +14 -14
- package/Libraries/ReactNative/RendererImplementation.js +26 -143
- package/Libraries/ReactNative/RendererProxy.js +4 -15
- package/Libraries/ReactNative/renderApplication.js +33 -59
- package/Libraries/ReactNative/requireNativeComponent.js +3 -3
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +5 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -32
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +3 -3
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +2 -2
- package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +6 -8
- package/Libraries/StyleSheet/StyleSheetTypes.js +11 -11
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/private/_TransformStyle.js +1 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +19 -9
- package/Libraries/StyleSheet/processBackgroundSize.js +7 -12
- package/Libraries/StyleSheet/processBoxShadow.js +9 -47
- package/Libraries/StyleSheet/processFilter.js +16 -8
- package/Libraries/StyleSheet/processTransformOrigin.js +10 -3
- package/Libraries/Text/Text.js +4 -4
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm +16 -2
- package/Libraries/Text/TextNativeComponent.js +4 -4
- package/Libraries/TurboModule/RCTExport.js +1 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -3
- package/Libraries/Types/CodegenTypes.js +7 -4
- package/Libraries/Types/ReactDevToolsTypes.js +1 -1
- package/Libraries/Utilities/BackHandler.android.js +11 -3
- package/Libraries/Utilities/BackHandler.d.ts +11 -1
- package/Libraries/Utilities/BackHandler.ios.js +3 -1
- package/Libraries/Utilities/BackHandler.js.flow +6 -1
- package/Libraries/Utilities/HardwareBackPressEvent.js +22 -0
- package/Libraries/Utilities/ReactNativeTestTools.js +4 -4
- package/Libraries/Utilities/binaryToBase64.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +2 -2
- package/Libraries/Utilities/codegenNativeComponent.js +4 -4
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -2
- package/Libraries/Utilities/stringifySafe.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +27 -13
- package/README.md +13 -1
- package/React/Base/RCTBundleURLProvider.h +19 -1
- package/React/Base/RCTBundleURLProvider.mm +82 -0
- package/React/Base/RCTDefines.h +1 -1
- package/React/Base/RCTMultipartDataTask.h +1 -1
- package/React/Base/RCTMultipartDataTask.m +0 -3
- package/React/Base/RCTRootView.h +4 -0
- package/React/Base/RCTRootViewDelegate.h +5 -2
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/Surface/RCTSurface.h +3 -0
- package/React/Base/Surface/RCTSurfaceDelegate.h +7 -3
- package/React/Base/Surface/RCTSurfaceRootView.mm +1 -1
- package/React/Base/Surface/RCTSurfaceView.mm +2 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +2 -0
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +0 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +3 -1
- package/React/CoreModules/RCTDevMenuConfigurationDecorator.h +2 -2
- package/React/CoreModules/RCTRedBox2AnsiParser.mm +1 -1
- package/React/CoreModules/RCTWebSocketModule.mm +45 -6
- package/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm +0 -1
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +4 -0
- package/React/DevSupport/RCTPackagerConnection.mm +13 -11
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +108 -43
- package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +1 -0
- package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +1 -0
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +35 -15
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +70 -8
- package/React/Fabric/RCTConversions.h +14 -0
- package/React/Fabric/RCTScheduler.mm +18 -0
- package/React/Fabric/RCTSurfacePointerHandler.mm +8 -2
- package/React/Fabric/RCTSurfaceTouchHandler.mm +1 -0
- package/React/Fabric/Surface/RCTFabricSurface.mm +3 -0
- package/React/I18n/strings/pt.lproj/fbt_language_pack.bin +0 -0
- package/React/Modules/RCTUIManager.mm +1 -1
- package/React/Profiler/RCTProfile.h +5 -0
- package/React/Profiler/RCTProfile.m +2 -1
- package/React/Profiler/RCTProfileTrampoline-arm.S +1 -1
- package/React/Profiler/RCTProfileTrampoline-arm64.S +1 -1
- package/React/Profiler/RCTProfileTrampoline-i386.S +1 -1
- package/React/Profiler/RCTProfileTrampoline-x86_64.S +1 -1
- package/React/Tests/Mounting/RCTViewComponentViewTests.mm +186 -0
- package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +5 -5
- package/React/Views/RCTLayout.m +4 -3
- package/React/Views/ScrollView/RCTScrollView.h +6 -2
- package/ReactAndroid/api/ReactAndroid.api +37 -27
- package/ReactAndroid/build.gradle.kts +28 -21
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +40 -110
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +32 -87
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.kt +9 -99
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.kt +7 -28
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.kt +2 -19
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.kt +15 -23
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +36 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNativeJNISoLoader.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNativeJniCommonSoLoader.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactSoftExceptionLogger.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultSoLoader.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FpsView.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.kt +15 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/DevSupportHttpClient.kt +9 -34
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +9 -10
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkRequestListener.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayView.kt +10 -10
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/AnimationBackendChoreographer.kt +15 -13
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/DevToolsReactPerfLogger.kt +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +139 -43
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/ViewTransitionSnapshotManager.kt +223 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.kt +25 -8
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.kt +34 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +104 -65
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.kt +9 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +172 -36
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/interfaces/ExtraWindowEventListener.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +41 -29
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +71 -51
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +15 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +16 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +79 -57
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +1 -4
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +15 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt +5 -9
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/rewrite_feature_flag_defaults.py +76 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/tests/test_rewrite_feature_flag_defaults.py +63 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/tracing/PerformanceTracer.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.kt +10 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.kt +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.kt +21 -20
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +63 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +59 -62
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt +45 -36
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +18 -5
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +8 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.kt +21 -19
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt +77 -72
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +7 -16
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BlendModeHelper.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRootViewTagGenerator.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewUtil.kt +17 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.kt +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.kt +20 -12
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.kt +18 -24
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.kt +11 -71
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +10 -17
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +29 -30
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/BackgroundImageDrawable.kt +5 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/InsetBoxShadowDrawable.kt +12 -13
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTModernEventEmitter.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/SynchronousEventReceiver.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchesHelper.kt +9 -9
- package/ReactAndroid/src/main/java/com/facebook/react/util/AndroidVersion.kt +27 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.kt +1 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.kt +1 -22
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +32 -24
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollView.java +20 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +33 -24
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +60 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/FontMetricsUtil.kt +2 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +5 -162
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +71 -97
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt +1 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/DrawCommandSpan.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +7 -13
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +40 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt +59 -20
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +85 -20
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +46 -65
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +85 -13
- package/ReactAndroid/src/main/java/com/facebook/soloader/annotation/SoLoaderLibrary.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java +5 -1
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfigJNIFinalizer.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGridTrackType.java +39 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java +20 -12
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +101 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIFinalizer.kt +33 -0
- package/ReactAndroid/src/main/jni/CMakeLists.txt +10 -1
- package/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp +0 -1
- package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +0 -2
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp +26 -6
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h +3 -3
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +47 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h +20 -6
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +24 -1
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.h +6 -0
- package/ReactAndroid/src/main/jni/react/fabric/FocusOrderingHelper.cpp +0 -1
- package/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp +1 -0
- package/ReactAndroid/src/main/jni/react/fabric/test_helper/FabricMountingManagerTestHelper.cpp +85 -0
- package/ReactAndroid/src/main/jni/react/fabric/test_helper/FabricMountingManagerTestHelper.h +46 -0
- package/ReactAndroid/src/main/jni/react/fabric/test_helper/OnLoad.cpp +16 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +97 -69
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +21 -15
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/HermesSamplingProfiler.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/jni/OnLoad-common.cpp +0 -2
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +2 -1
- package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp +37 -30
- package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h +11 -8
- package/ReactAndroid/src/main/jni/react/reactnativeblob/CMakeLists.txt +2 -1
- package/ReactAndroid/src/main/jni/react/reactnativeblob/OnLoad.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +10 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +7 -0
- package/ReactAndroid/src/main/jni/react/tracing/CMakeLists.txt +28 -0
- package/ReactCommon/React-Fabric.podspec +7 -0
- package/ReactCommon/React-FabricComponents.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +4 -4
- package/ReactCommon/jsc/JSCRuntime.cpp +9 -0
- package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +1 -0
- package/ReactCommon/jserrorhandler/JsErrorHandler.h +1 -1
- package/ReactCommon/jsi/jsi/JSIDynamic.cpp +1 -0
- package/ReactCommon/jsi/jsi/decorator.h +93 -0
- package/ReactCommon/jsi/jsi/jsi-inl.h +97 -68
- package/ReactCommon/jsi/jsi/jsi.cpp +208 -27
- package/ReactCommon/jsi/jsi/jsi.h +553 -224
- package/ReactCommon/jsi/jsi/test/testlib.cpp +453 -0
- package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +1 -1
- package/ReactCommon/jsinspector-modern/EmulationAgent.cpp +108 -0
- package/ReactCommon/jsinspector-modern/EmulationAgent.h +47 -0
- package/ReactCommon/jsinspector-modern/HostAgent.cpp +10 -1
- package/ReactCommon/jsinspector-modern/HostTarget.h +25 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +6 -2
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +5 -2
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +19 -2
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnectionImpl.h +3 -0
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +10 -0
- package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +0 -1
- package/ReactCommon/logger/react_native_log.cpp +0 -1
- package/ReactCommon/react/bridging/Array.h +1 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +29 -21
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +35 -25
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +168 -132
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +18 -14
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +28 -20
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +61 -43
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +3 -3
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +9 -7
- package/ReactCommon/react/featureflags/rewrite_feature_flag_defaults.py +111 -0
- package/ReactCommon/react/featureflags/tests/test_rewrite_feature_flag_defaults.py +60 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.h +3 -9
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +0 -1
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +7 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/NativeFantomTestSpecificMethods.cpp +2 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +35 -25
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +15 -11
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +3 -2
- package/ReactCommon/react/nativemodule/viewtransition/CMakeLists.txt +24 -0
- package/ReactCommon/react/nativemodule/viewtransition/NativeViewTransition.cpp +92 -0
- package/ReactCommon/react/nativemodule/viewtransition/NativeViewTransition.h +37 -0
- package/ReactCommon/react/nativemodule/viewtransition/React-viewtransitionnativemodule.podspec +58 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +10 -1
- package/ReactCommon/react/networking/NetworkReporter.h +0 -1
- package/ReactCommon/react/performance/cdpmetrics/CdpPerfIssuesReporter.h +0 -1
- package/ReactCommon/react/performance/timeline/PerformanceEntry.h +1 -1
- package/ReactCommon/react/performance/timeline/tests/PerformanceEntryTest.cpp +62 -0
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +24 -12
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.h +1 -1
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropSerializer.cpp +3 -0
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.cpp +10 -3
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.h +1 -0
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +4 -0
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.h +1 -1
- package/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.h +0 -1
- package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +8 -3
- package/ReactCommon/react/renderer/animations/tests/MutationComparatorTest.cpp +273 -0
- package/ReactCommon/react/renderer/animations/utils.h +12 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/conversions.h +104 -3
- package/ReactCommon/react/renderer/components/image/conversions.h +2 -3
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +0 -1
- package/ReactCommon/react/renderer/components/scrollview/conversions.h +0 -1
- package/ReactCommon/react/renderer/components/text/stateConversions.h +0 -1
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +531 -21
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +9 -0
- package/ReactCommon/react/renderer/components/view/BaseTouch.cpp +3 -2
- package/ReactCommon/react/renderer/components/view/BaseTouch.h +7 -0
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +15 -0
- package/ReactCommon/react/renderer/components/view/BaseViewProps.h +1 -0
- package/ReactCommon/react/renderer/components/view/PointerEvent.cpp +2 -0
- package/ReactCommon/react/renderer/components/view/PointerEvent.h +5 -0
- package/ReactCommon/react/renderer/components/view/TouchEvent.h +0 -2
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.cpp +23 -5
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +1 -0
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +5 -0
- package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +33 -28
- package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +0 -1
- package/ReactCommon/react/renderer/components/view/conversions.h +44 -28
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +71 -5
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h +1 -0
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/NativeDrawable.h +47 -16
- package/ReactCommon/react/renderer/components/view/platform/cxx/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +2 -2
- package/ReactCommon/react/renderer/{graphics/DoubleConversions.h → components/view/platform/tvos/react/renderer/components/view/HostPlatformTouch.h} +2 -4
- package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewEventEmitter.h +14 -0
- package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewProps.cpp +38 -0
- package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewProps.h +29 -0
- package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +30 -0
- package/ReactCommon/react/renderer/components/view/propsConversions.h +8 -2
- package/ReactCommon/react/renderer/components/view/tests/ConversionsTest.cpp +86 -0
- package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +34 -0
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +67 -2
- package/ReactCommon/react/renderer/core/EventEmitter.h +25 -0
- package/ReactCommon/react/renderer/core/EventPipe.h +3 -1
- package/ReactCommon/react/renderer/core/EventQueueProcessor.cpp +18 -10
- package/ReactCommon/react/renderer/core/EventTarget.cpp +8 -5
- package/ReactCommon/react/renderer/core/LayoutContext.h +9 -2
- package/ReactCommon/react/renderer/core/LayoutMetrics.cpp +5 -3
- package/ReactCommon/react/renderer/core/LayoutPrimitives.h +1 -0
- package/ReactCommon/react/renderer/core/Props.cpp +20 -0
- package/ReactCommon/react/renderer/core/RawEvent.cpp +4 -2
- package/ReactCommon/react/renderer/core/RawEvent.h +6 -6
- package/ReactCommon/react/renderer/core/ShadowNode.h +2 -2
- package/ReactCommon/react/renderer/core/conversions.h +4 -0
- package/ReactCommon/react/renderer/core/graphicsConversions.h +4 -4
- package/ReactCommon/react/renderer/core/propsConversions.h +1 -1
- package/ReactCommon/react/renderer/core/tests/EventQueueProcessorTest.cpp +52 -3
- package/ReactCommon/react/renderer/core/tests/EventTargetTests.cpp +26 -0
- package/ReactCommon/react/renderer/css/tests/CSSValueParserTest.cpp +1 -1
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +42 -26
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.h +4 -2
- package/ReactCommon/react/renderer/debug/tests/DebugStringConvertibleTest.cpp +34 -3
- package/ReactCommon/react/renderer/graphics/BlendMode.h +5 -0
- package/ReactCommon/react/renderer/graphics/CMakeLists.txt +1 -0
- package/ReactCommon/react/renderer/graphics/ColorStop.h +3 -0
- package/ReactCommon/react/renderer/graphics/LinearGradient.h +3 -0
- package/ReactCommon/react/renderer/graphics/RadialGradient.h +4 -0
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -0
- package/ReactCommon/react/renderer/graphics/ValueUnit.cpp +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +0 -5
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +2 -2
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTImagePrimitivesConversions.h +0 -4
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +5 -1
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +12 -4
- package/ReactCommon/react/renderer/mounting/CMakeLists.txt +1 -0
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +307 -4
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +27 -2
- package/ReactCommon/react/renderer/mounting/internal/LongestIncreasingSubsequence.h +95 -0
- package/ReactCommon/react/renderer/mounting/tests/DifferentiatorUnflattenTest.cpp +212 -0
- package/ReactCommon/react/renderer/mounting/tests/LongestIncreasingSubsequenceTest.cpp +154 -0
- package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +314 -18
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +38 -20
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +20 -22
- package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +1 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +76 -3
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +12 -0
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +0 -7
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +2 -1
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +16 -1
- package/ReactCommon/react/renderer/uimanager/UIManager.h +8 -0
- package/ReactCommon/react/renderer/uimanager/UIManagerAnimationBackend.h +1 -0
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +347 -5
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +5 -3
- package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +5 -0
- package/ReactCommon/react/renderer/uimanager/UIManagerViewTransitionDelegate.h +82 -0
- package/ReactCommon/react/renderer/viewtransition/CMakeLists.txt +22 -0
- package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.cpp +520 -0
- package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.h +161 -0
- package/ReactCommon/react/runtime/TimerManager.cpp +4 -2
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +37 -0
- package/ReactCommon/react/timing/PrivacyInfo.xcprivacy +21 -0
- package/ReactCommon/react/timing/React-timing.podspec +2 -0
- package/ReactCommon/react/timing/primitives.h +33 -1
- package/ReactCommon/yoga/yoga/YGEnums.cpp +32 -0
- package/ReactCommon/yoga/yoga/YGEnums.h +20 -4
- package/ReactCommon/yoga/yoga/YGMacros.h +2 -0
- package/ReactCommon/yoga/yoga/YGNode.h +1 -1
- package/ReactCommon/yoga/yoga/YGNodeStyle.cpp +269 -0
- package/ReactCommon/yoga/yoga/YGNodeStyle.h +93 -1
- package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +40 -9
- package/ReactCommon/yoga/yoga/algorithm/Align.h +12 -1
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +106 -14
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +22 -0
- package/ReactCommon/yoga/yoga/enums/Align.h +3 -1
- package/ReactCommon/yoga/yoga/enums/Display.h +2 -1
- package/ReactCommon/yoga/yoga/enums/ExperimentalFeature.h +2 -1
- package/ReactCommon/yoga/yoga/enums/GridTrackType.h +43 -0
- package/ReactCommon/yoga/yoga/enums/Justify.h +5 -1
- package/ReactCommon/yoga/yoga/event/event.cpp +2 -0
- package/ReactCommon/yoga/yoga/event/event.h +1 -0
- package/ReactCommon/yoga/yoga/node/Node.cpp +6 -1
- package/ReactCommon/yoga/yoga/node/Node.h +4 -4
- package/ReactCommon/yoga/yoga/style/GridLine.h +53 -0
- package/ReactCommon/yoga/yoga/style/GridTrack.h +63 -0
- package/ReactCommon/yoga/yoga/style/Style.h +261 -71
- package/ReactCommon/yoga/yoga/style/StyleSizeLength.h +7 -1
- package/ReactCommon/yoga/yoga/style/StyleValueHandle.h +8 -0
- package/ReactCommon/yoga/yoga/style/StyleValuePool.h +10 -0
- package/cli.js +1 -1
- package/flow/HermesInternalType.js +1 -1
- package/flow/bom.js.flow +95 -3
- package/flow/dom.js.flow +89 -89
- package/gradle/libs.versions.toml +3 -1
- package/index.js +30 -3
- package/index.js.flow +23 -1
- package/package.json +11 -11
- package/react-native.config.js +3 -3
- package/scripts/cocoapods/rncore.rb +65 -11
- package/scripts/cocoapods/rndependencies.rb +65 -11
- package/scripts/cocoapods/utils.rb +52 -0
- package/scripts/codegen/generate-artifacts-executor/generateCustomURLHandlers.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/generateNativeCode.js +13 -4
- package/scripts/codegen/generate-artifacts-executor/generateRCTModuleProviders.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +17 -6
- package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/generateUnstableModulesRequiringMainQueueSetupProvider.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/index.js +2 -0
- package/scripts/codegen/generate-artifacts-executor/utils.js +1 -1
- package/scripts/codegen/generate-specs-cli-executor.js +1 -1
- package/scripts/generate-codegen-artifacts.js +20 -2
- package/scripts/generate-provider-cli.js +1 -1
- package/scripts/react_native_pods.rb +25 -2
- package/scripts/react_native_pods_utils/script_phases.rb +9 -3
- package/scripts/replace-rncore-version.js +20 -0
- package/scripts/xcode/with-environment.sh +7 -1
- package/sdks/.hermesv1version +1 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-utils.rb +92 -5
- package/sdks/hermes-engine/version.properties +2 -2
- package/src/private/animated/NativeAnimatedValidation.js +1 -1
- package/src/private/animated/createAnimatedPropsHook.js +2 -2
- package/src/private/components/virtualcollection/FlingConstants.js +21 -0
- package/src/private/components/virtualcollection/Virtual.js +62 -0
- package/src/private/components/virtualcollection/VirtualCollectionView.js +238 -0
- package/src/private/components/virtualcollection/column/VirtualColumn.js +43 -0
- package/src/private/components/virtualcollection/column/VirtualColumnGenerator.js +72 -0
- package/src/private/components/virtualcollection/debug/FlingItemOverlay.js +13 -0
- package/src/private/components/virtualcollection/dom/getScrollParent.js +43 -0
- package/src/private/components/virtualcollection/dom/isScrollableNode.js +22 -0
- package/src/private/components/virtualcollection/row/VirtualRow.js +43 -0
- package/src/private/components/virtualcollection/row/VirtualRowGenerator.js +72 -0
- package/src/private/devsupport/devmenu/elementinspector/getInspectorDataForViewAtPoint.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +1 -1
- package/src/private/devsupport/devmenu/specs/NativeDevMenu.js +1 -1
- package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +41 -37
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +9 -7
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/renderer/events/LegacySyntheticEvent.js +90 -0
- package/src/private/renderer/events/ReactNativeEventTypeMapping.js +103 -0
- package/src/private/renderer/events/ReactNativeResponder.js +687 -0
- package/src/private/renderer/events/ResponderEvent.js +40 -0
- package/src/private/renderer/events/ResponderTouchHistoryStore.js +258 -0
- package/src/private/renderer/events/dispatchNativeEvent.js +83 -0
- package/src/private/setup/setUpDOM.js +20 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeActionSheetManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAlertManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAppState.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAppearance.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeBlobModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeClipboard.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeDevSettings.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeDeviceEventManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeFileReaderModule.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeFrameRateLogger.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeHeadlessJsTaskSupport.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeI18nManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageEditor.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageStoreAndroid.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeImageStoreIOS.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeIntentAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeJSCHeapCapture.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeKeyboardObserver.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeLogBox.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeModalManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeNetworkingAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativePermissionsAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsIOS.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativePushNotificationManagerIOS.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeRedBox.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeSegmentFetcher.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSettingsManager.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeShareModule.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeSoundManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeToastAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeVibration.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeWebSocketModule.js +2 -2
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/utilities/toExtendedError.js +1 -1
- package/src/private/viewtransition/specs/NativeViewTransition.js +33 -0
- package/src/private/webapis/dom/events/Event.js +10 -1
- package/src/private/webapis/dom/events/EventTarget.js +60 -18
- package/src/private/webapis/dom/events/internals/EventInternals.js +18 -1
- package/src/private/webapis/dom/events/internals/EventTargetInternals.js +12 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +24 -0
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +4 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +70 -1
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +10 -0
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +1 -1
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +5 -9
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +2 -2
- package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +2 -2
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +2 -2
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +1 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +1 -1
- package/src/private/webapis/structuredClone/structuredClone.js +1 -1
- package/src/private/webapis/webidl/PlatformObjects.js +4 -4
- package/types/public/ReactNativeTVTypes.d.ts +9 -0
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +0 -19669
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +0 -11129
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +0 -12930
- package/Libraries/Renderer/shims/ReactNative.js +0 -27
- package/Libraries/Utilities/GlobalPerformanceLogger.js +0 -24
- package/Libraries/Utilities/PerformanceLoggerContext.js +0 -33
- package/Libraries/Utilities/createPerformanceLogger.js +0 -329
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.kt +0 -442
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobCollector.kt +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerLegacyView.kt +0 -47
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfigJNIFinalizer.java +0 -31
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIFinalizer.java +0 -35
- package/ReactCommon/react/renderer/graphics/DoubleConversions.cpp +0 -38
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/InsetBoxShadowDrawable.kt
CHANGED
|
@@ -92,19 +92,18 @@ internal class InsetBoxShadowDrawable(
|
|
|
92
92
|
bounds.right - (computedBorderInsets?.right ?: 0f),
|
|
93
93
|
bounds.bottom - (computedBorderInsets?.bottom ?: 0f),
|
|
94
94
|
)
|
|
95
|
-
val paddingBoxRadii =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
95
|
+
val paddingBoxRadii = computedBorderRadii?.let {
|
|
96
|
+
floatArrayOf(
|
|
97
|
+
innerRadius(it.topLeft.horizontal, computedBorderInsets?.left),
|
|
98
|
+
innerRadius(it.topLeft.vertical, computedBorderInsets?.top),
|
|
99
|
+
innerRadius(it.topRight.horizontal, computedBorderInsets?.right),
|
|
100
|
+
innerRadius(it.topRight.vertical, computedBorderInsets?.top),
|
|
101
|
+
innerRadius(it.bottomRight.horizontal, computedBorderInsets?.right),
|
|
102
|
+
innerRadius(it.bottomRight.vertical, computedBorderInsets?.bottom),
|
|
103
|
+
innerRadius(it.bottomLeft.horizontal, computedBorderInsets?.left),
|
|
104
|
+
innerRadius(it.bottomLeft.vertical, computedBorderInsets?.bottom),
|
|
105
|
+
)
|
|
106
|
+
}
|
|
108
107
|
|
|
109
108
|
val x = offsetX.dpToPx()
|
|
110
109
|
val y = offsetY.dpToPx()
|
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTModernEventEmitter.kt
CHANGED
|
@@ -28,11 +28,13 @@ public interface RCTModernEventEmitter : RCTEventEmitter {
|
|
|
28
28
|
receiveEvent(-1, targetTag, eventName, params)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
@Deprecated("Use the overload with eventTimestamp parameter instead.")
|
|
31
32
|
public fun receiveEvent(surfaceId: Int, targetTag: Int, eventName: String, params: WritableMap?) {
|
|
32
33
|
// We assume this event can't be coalesced. `customCoalesceKey` has no meaning in Fabric.
|
|
33
34
|
receiveEvent(surfaceId, targetTag, eventName, false, 0, params, EventCategoryDef.UNSPECIFIED)
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
@Deprecated("Use the overload with eventTimestamp parameter instead.")
|
|
36
38
|
public fun receiveEvent(
|
|
37
39
|
surfaceId: Int,
|
|
38
40
|
targetTag: Int,
|
|
@@ -42,4 +44,32 @@ public interface RCTModernEventEmitter : RCTEventEmitter {
|
|
|
42
44
|
params: WritableMap?,
|
|
43
45
|
@EventCategoryDef category: Int,
|
|
44
46
|
)
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Receives an event with a specific timestamp. The default implementation delegates to the
|
|
50
|
+
* non-timestamped version for backward compatibility with existing implementations.
|
|
51
|
+
*
|
|
52
|
+
* @param eventTimestamp The timestamp when the event was triggered (in milliseconds since boot,
|
|
53
|
+
* from SystemClock.uptimeMillis())
|
|
54
|
+
*/
|
|
55
|
+
public fun receiveEvent(
|
|
56
|
+
surfaceId: Int,
|
|
57
|
+
targetTag: Int,
|
|
58
|
+
eventName: String,
|
|
59
|
+
canCoalesceEvent: Boolean,
|
|
60
|
+
customCoalesceKey: Int,
|
|
61
|
+
params: WritableMap?,
|
|
62
|
+
@EventCategoryDef category: Int,
|
|
63
|
+
eventTimestamp: Long,
|
|
64
|
+
) {
|
|
65
|
+
receiveEvent(
|
|
66
|
+
surfaceId,
|
|
67
|
+
targetTag,
|
|
68
|
+
eventName,
|
|
69
|
+
canCoalesceEvent,
|
|
70
|
+
customCoalesceKey,
|
|
71
|
+
params,
|
|
72
|
+
category,
|
|
73
|
+
)
|
|
74
|
+
}
|
|
45
75
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/SynchronousEventReceiver.kt
CHANGED
|
@@ -21,4 +21,32 @@ internal interface SynchronousEventReceiver {
|
|
|
21
21
|
@EventCategoryDef eventCategory: Int,
|
|
22
22
|
experimentalIsSynchronous: Boolean,
|
|
23
23
|
)
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Receives an event with a specific timestamp. The default implementation delegates to the
|
|
27
|
+
* non-timestamped version for backward compatibility with existing implementations.
|
|
28
|
+
*
|
|
29
|
+
* @param eventTimestamp timestamp when the event was triggered (in milliseconds since boot, from
|
|
30
|
+
* SystemClock.uptimeMillis())
|
|
31
|
+
*/
|
|
32
|
+
fun receiveEvent(
|
|
33
|
+
surfaceId: Int,
|
|
34
|
+
reactTag: Int,
|
|
35
|
+
eventName: String,
|
|
36
|
+
canCoalesceEvent: Boolean,
|
|
37
|
+
params: WritableMap?,
|
|
38
|
+
@EventCategoryDef eventCategory: Int,
|
|
39
|
+
experimentalIsSynchronous: Boolean,
|
|
40
|
+
eventTimestamp: Long,
|
|
41
|
+
) {
|
|
42
|
+
receiveEvent(
|
|
43
|
+
surfaceId,
|
|
44
|
+
reactTag,
|
|
45
|
+
eventName,
|
|
46
|
+
canCoalesceEvent,
|
|
47
|
+
params,
|
|
48
|
+
eventCategory,
|
|
49
|
+
experimentalIsSynchronous,
|
|
50
|
+
)
|
|
51
|
+
}
|
|
24
52
|
}
|
|
@@ -132,15 +132,14 @@ internal object TouchesHelper {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
for (touchData in changedTouches) {
|
|
135
|
-
val eventData =
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
135
|
+
val eventData = touchData?.let { td ->
|
|
136
|
+
val ed = td.copy()
|
|
137
|
+
val changedTouchesArray = getWritableArray(/* copyObjects */ true, changedTouches)
|
|
138
|
+
val touchesArray = getWritableArray(/* copyObjects */ true, touches)
|
|
139
|
+
ed.putArray(CHANGED_TOUCHES_KEY, changedTouchesArray)
|
|
140
|
+
ed.putArray(TOUCHES_KEY, touchesArray)
|
|
141
|
+
ed
|
|
142
|
+
}
|
|
144
143
|
|
|
145
144
|
eventEmitter.receiveEvent(
|
|
146
145
|
event.surfaceId,
|
|
@@ -150,6 +149,7 @@ internal object TouchesHelper {
|
|
|
150
149
|
0,
|
|
151
150
|
eventData,
|
|
152
151
|
event.getEventCategory(),
|
|
152
|
+
event.timestampMs,
|
|
153
153
|
)
|
|
154
154
|
}
|
|
155
155
|
} finally {
|
|
@@ -14,10 +14,34 @@ import android.os.Build
|
|
|
14
14
|
internal object AndroidVersion {
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* This is the version code for Android
|
|
18
|
-
*
|
|
17
|
+
* This is the version code for Android 15 (SDK Level 35). Internally at Meta this code is also
|
|
18
|
+
* compiled against SDK 34, so we need to retain this constant instead of using
|
|
19
|
+
* [Build.VERSION_CODES.VANILLA_ICE_CREAM] directly.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
internal const val VERSION_CODE_VANILLA_ICE_CREAM: Int = 35
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This is the version code for Android 16 (SDK Level 36). Internally at Meta this code is also
|
|
25
|
+
* compiled against SDK 34, so we need to retain this constant instead of using
|
|
26
|
+
* [Build.VERSION_CODES.BAKLAVA] directly.
|
|
27
|
+
*/
|
|
28
|
+
internal const val VERSION_CODE_BAKLAVA: Int = 36
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* android.R.attr.windowOptOutEdgeToEdgeEnforcement added in API 35. Internally at Meta this code
|
|
32
|
+
* is compiled against an SDK that may not have this attribute defined.
|
|
33
|
+
* https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/res/res/values/public-final.xml;l=3848
|
|
34
|
+
*/
|
|
35
|
+
internal const val ATTR_WINDOW_OPT_OUT_EDGE_TO_EDGE_ENFORCEMENT: Int = 0x0101069a
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* This method is used to check if the current device is running Android 15 (SDK Level 35) or
|
|
39
|
+
* higher and the app is targeting Android 15 (SDK Level 35) or higher.
|
|
40
|
+
*/
|
|
41
|
+
@JvmStatic
|
|
42
|
+
internal fun isAtLeastTargetSdk35(context: Context): Boolean =
|
|
43
|
+
Build.VERSION.SDK_INT >= VERSION_CODE_VANILLA_ICE_CREAM &&
|
|
44
|
+
context.applicationInfo.targetSdkVersion >= VERSION_CODE_VANILLA_ICE_CREAM
|
|
21
45
|
|
|
22
46
|
/**
|
|
23
47
|
* This method is used to check if the current device is running Android 16 (SDK Level 36) or
|
|
@@ -197,6 +197,9 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
|
|
197
197
|
|
|
198
198
|
dialog?.let { nonNullDialog ->
|
|
199
199
|
if (nonNullDialog.isShowing) {
|
|
200
|
+
nonNullDialog.window?.let { window ->
|
|
201
|
+
(context as ThemedReactContext).onExtraWindowDestroy(window)
|
|
202
|
+
}
|
|
200
203
|
val dialogContext =
|
|
201
204
|
ContextUtils.findContextOfType(nonNullDialog.context, Activity::class.java)
|
|
202
205
|
if (dialogContext == null || !dialogContext.isFinishing) {
|
|
@@ -363,6 +366,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
|
|
363
366
|
newDialog.show()
|
|
364
367
|
updateSystemAppearance()
|
|
365
368
|
window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
|
369
|
+
(context as ThemedReactContext).onExtraWindowCreate(window)
|
|
366
370
|
}
|
|
367
371
|
}
|
|
368
372
|
|
|
@@ -18,7 +18,6 @@ import com.facebook.react.bridge.UiThreadUtil.runOnUiThread
|
|
|
18
18
|
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
|
19
19
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
20
20
|
import com.facebook.react.uimanager.common.UIManagerType
|
|
21
|
-
import com.facebook.react.uimanager.common.ViewUtil.getUIManagerType
|
|
22
21
|
import com.facebook.react.views.scroll.ReactScrollViewHelper.HasSmoothScroll
|
|
23
22
|
import com.facebook.react.views.view.ReactViewGroup
|
|
24
23
|
import java.lang.ref.WeakReference
|
|
@@ -47,7 +46,7 @@ internal class MaintainVisibleScrollPositionHelper<ScrollViewT>(
|
|
|
47
46
|
checkNotNull(
|
|
48
47
|
UIManagerHelper.getUIManager(
|
|
49
48
|
checkNotNull(scrollView?.context as ReactContext?),
|
|
50
|
-
|
|
49
|
+
UIManagerType.FABRIC,
|
|
51
50
|
)
|
|
52
51
|
)
|
|
53
52
|
|
|
@@ -83,18 +82,6 @@ internal class MaintainVisibleScrollPositionHelper<ScrollViewT>(
|
|
|
83
82
|
uIManager.removeUIManagerEventListener(this)
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
/**
|
|
87
|
-
* Update the scroll position of the managed ScrollView. This should be called after layout has
|
|
88
|
-
* been updated.
|
|
89
|
-
*/
|
|
90
|
-
fun updateScrollPosition() {
|
|
91
|
-
// On Fabric this will be called internally in `didMountItems`.
|
|
92
|
-
if (scrollView == null || getUIManagerType(scrollView.id) == UIManagerType.FABRIC) {
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
updateScrollPositionInternal()
|
|
96
|
-
}
|
|
97
|
-
|
|
98
85
|
private fun updateScrollPositionInternal() {
|
|
99
86
|
val config = config ?: return
|
|
100
87
|
val firstVisibleViewRef = firstVisibleViewRef ?: return
|
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
package com.facebook.react.views.scroll
|
|
9
9
|
|
|
10
10
|
import com.facebook.react.module.annotations.ReactModule
|
|
11
|
-
import com.facebook.react.uimanager.ReactStylesDiffMap
|
|
12
|
-
import com.facebook.react.uimanager.StateWrapper
|
|
13
11
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
14
|
-
import com.facebook.react.uimanager.common.UIManagerType
|
|
15
|
-
import com.facebook.react.uimanager.common.ViewUtil
|
|
16
12
|
import com.facebook.react.views.view.ReactViewGroup
|
|
17
13
|
import com.facebook.react.views.view.ReactViewManager
|
|
18
14
|
|
|
@@ -21,28 +17,11 @@ import com.facebook.react.views.view.ReactViewManager
|
|
|
21
17
|
public class ReactHorizontalScrollContainerViewManager : ReactViewManager() {
|
|
22
18
|
public override fun getName(): String = REACT_CLASS
|
|
23
19
|
|
|
24
|
-
protected override fun createViewInstance(
|
|
25
|
-
reactTag: Int,
|
|
26
|
-
context: ThemedReactContext,
|
|
27
|
-
initialProps: ReactStylesDiffMap?,
|
|
28
|
-
stateWrapper: StateWrapper?,
|
|
29
|
-
): ReactViewGroup {
|
|
30
|
-
check(uiManagerType == null)
|
|
31
|
-
uiManagerType = ViewUtil.getUIManagerType(reactTag)
|
|
32
|
-
val view = super.createViewInstance(reactTag, context, initialProps, stateWrapper)
|
|
33
|
-
uiManagerType = null
|
|
34
|
-
return view
|
|
35
|
-
}
|
|
36
|
-
|
|
37
20
|
public override fun createViewInstance(context: ThemedReactContext): ReactViewGroup {
|
|
38
|
-
return
|
|
39
|
-
UIManagerType.FABRIC -> ReactViewGroup(context)
|
|
40
|
-
else -> ReactHorizontalScrollContainerLegacyView(context)
|
|
41
|
-
}
|
|
21
|
+
return ReactViewGroup(context)
|
|
42
22
|
}
|
|
43
23
|
|
|
44
24
|
public companion object {
|
|
45
25
|
public const val REACT_CLASS: String = "AndroidHorizontalScrollContentView"
|
|
46
|
-
@UIManagerType private var uiManagerType: Int? = null
|
|
47
26
|
}
|
|
48
27
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -103,6 +103,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
103
103
|
private final VelocityHelper mVelocityHelper = new VelocityHelper();
|
|
104
104
|
private final Rect mTempRect = new Rect();
|
|
105
105
|
private final ValueAnimator DEFAULT_FLING_ANIMATOR = ObjectAnimator.ofInt(this, "scrollX", 0, 0);
|
|
106
|
+
private final @Nullable FpsListener mFpsListener;
|
|
106
107
|
|
|
107
108
|
private Rect mOverflowInset = new Rect();
|
|
108
109
|
private @Nullable VirtualViewContainerState mVirtualViewContainerState;
|
|
@@ -115,7 +116,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
115
116
|
private boolean mRemoveClippedSubviews;
|
|
116
117
|
private boolean mScrollEnabled = true;
|
|
117
118
|
private boolean mSendMomentumEvents;
|
|
118
|
-
private @Nullable FpsListener mFpsListener = null;
|
|
119
119
|
private @Nullable String mScrollPerfTag;
|
|
120
120
|
private @Nullable Drawable mEndBackground;
|
|
121
121
|
private int mEndFillColor = Color.TRANSPARENT;
|
|
@@ -163,7 +163,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
163
163
|
/**
|
|
164
164
|
* Set all default values here as opposed to in the constructor or field defaults. It is important
|
|
165
165
|
* that these properties are set during the constructor, but also on-demand whenever an existing
|
|
166
|
-
*
|
|
166
|
+
* ReactHorizontalScrollView is recycled.
|
|
167
167
|
*/
|
|
168
168
|
private void initView() {
|
|
169
169
|
mOverflowInset = new Rect();
|
|
@@ -182,7 +182,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
182
182
|
mRemoveClippedSubviews = false;
|
|
183
183
|
mScrollEnabled = true;
|
|
184
184
|
mSendMomentumEvents = false;
|
|
185
|
-
mFpsListener = null;
|
|
186
185
|
mScrollPerfTag = null;
|
|
187
186
|
mEndBackground = null;
|
|
188
187
|
mEndFillColor = Color.TRANSPARENT;
|
|
@@ -245,6 +244,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
246
|
|
|
247
|
+
@Override
|
|
248
248
|
public boolean getScrollEnabled() {
|
|
249
249
|
return mScrollEnabled;
|
|
250
250
|
}
|
|
@@ -495,14 +495,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
495
495
|
return mOverflowInset;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
@Override
|
|
499
|
-
public boolean getClipToPadding() {
|
|
500
|
-
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
|
501
|
-
return mOverflow != Overflow.VISIBLE;
|
|
502
|
-
}
|
|
503
|
-
return super.getClipToPadding();
|
|
504
|
-
}
|
|
505
|
-
|
|
506
498
|
@Override
|
|
507
499
|
public void onDraw(Canvas canvas) {
|
|
508
500
|
if (mOverflow != Overflow.VISIBLE) {
|
|
@@ -586,29 +578,39 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
586
578
|
}
|
|
587
579
|
|
|
588
580
|
/**
|
|
589
|
-
* Attempts to scroll-snap to the focused child based on snapToAlignment/scrollSnapAlign
|
|
590
|
-
* Returns true if snap scrolling was performed, false otherwise.
|
|
581
|
+
* Attempts to scroll-snap to the focused child based on snapToAlignment/scrollSnapAlign
|
|
582
|
+
* or scrollSnapOffset. Returns true if snap scrolling was performed, false otherwise.
|
|
591
583
|
*/
|
|
592
584
|
private boolean tryScrollSnapToChild(View focused) {
|
|
593
585
|
if (mSnapToAlignment != SNAP_ALIGNMENT_ITEM) {
|
|
594
586
|
return false;
|
|
595
587
|
}
|
|
596
588
|
|
|
597
|
-
kotlin.
|
|
589
|
+
kotlin.Triple<View, String, Integer> result =
|
|
590
|
+
ReactScrollViewHelper.findScrollSnap(focused, this);
|
|
598
591
|
if (result == null) {
|
|
599
592
|
return false;
|
|
600
593
|
}
|
|
601
594
|
|
|
602
595
|
View snapTarget = result.getFirst();
|
|
603
596
|
String alignment = result.getSecond();
|
|
597
|
+
Integer snapOffset = result.getThird();
|
|
604
598
|
|
|
605
599
|
Rect rect = new Rect();
|
|
606
600
|
snapTarget.getDrawingRect(rect);
|
|
607
601
|
offsetDescendantRectToMyCoords(snapTarget, rect);
|
|
608
602
|
|
|
609
|
-
int viewportWidth = getWidth() - getPaddingLeft() - getPaddingRight();
|
|
610
603
|
int maxScrollX = Math.max(0, computeHorizontalScrollRange() - getWidth());
|
|
611
604
|
|
|
605
|
+
if (snapOffset != null) {
|
|
606
|
+
int targetOffset = ReactScrollViewHelper.computeScrollSnapTargetForOffset(
|
|
607
|
+
rect.left, snapOffset, mSnapInterval, maxScrollX);
|
|
608
|
+
reactSmoothScrollTo(targetOffset, getScrollY());
|
|
609
|
+
return true;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
int viewportWidth = getWidth() - getPaddingLeft() - getPaddingRight();
|
|
613
|
+
|
|
612
614
|
Integer targetOffset = ReactScrollViewHelper.computeScrollSnapOffset(
|
|
613
615
|
rect.left, rect.right, viewportWidth, alignment, mSnapInterval, mSnapToItemPadding, maxScrollX);
|
|
614
616
|
if (targetOffset == null) {
|
|
@@ -621,7 +623,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
621
623
|
|
|
622
624
|
/**
|
|
623
625
|
* Since ReactHorizontalScrollView handles layout changes on JS side, it does not call
|
|
624
|
-
* super.
|
|
626
|
+
* super.onLayout due to which mIsLayoutDirty flag in HorizontalScrollView remains true and
|
|
625
627
|
* prevents scrolling to child when requestChildFocus is called. Overriding this method and
|
|
626
628
|
* scrolling to child without checking any layout dirty flag. This will fix focus navigation issue
|
|
627
629
|
* for KeyEvents which are not handled in HorizontalScrollView, for example: KEYCODE_TAB.
|
|
@@ -641,7 +643,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
641
643
|
/**
|
|
642
644
|
* In rare cases where an app overrides the built-in ReactScrollView by overriding it, and also
|
|
643
645
|
* needs to customize scroll into view on focus behaviors, this protected method can be used to
|
|
644
|
-
*
|
|
646
|
+
* unblock such customization.
|
|
645
647
|
*/
|
|
646
648
|
protected void requestChildFocusWithoutScroll(View child, View focused) {
|
|
647
649
|
// Temporarily block HorizontalScrollView's internal scrollToChild from running
|
|
@@ -963,6 +965,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
963
965
|
float hScroll = ev.getAxisValue(MotionEvent.AXIS_HSCROLL);
|
|
964
966
|
if (hScroll != 0) {
|
|
965
967
|
// Perform the scroll
|
|
968
|
+
enableFpsListener();
|
|
966
969
|
boolean result = super.dispatchGenericMotionEvent(ev);
|
|
967
970
|
// Schedule snap alignment to run after scrolling stops
|
|
968
971
|
if (result
|
|
@@ -970,9 +973,10 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
970
973
|
|| mSnapInterval != 0
|
|
971
974
|
|| mSnapOffsets != null
|
|
972
975
|
|| (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED && mSnapToAlignment != SNAP_ALIGNMENT_ITEM))) {
|
|
973
|
-
// Cancel any pending runnable and reschedule
|
|
976
|
+
// Cancel any pending post-touch runnable and reschedule
|
|
974
977
|
if (mPostTouchRunnable != null) {
|
|
975
978
|
removeCallbacks(mPostTouchRunnable);
|
|
979
|
+
mPostTouchRunnable = null;
|
|
976
980
|
}
|
|
977
981
|
mPostTouchRunnable =
|
|
978
982
|
new Runnable() {
|
|
@@ -986,9 +990,12 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
986
990
|
velocityX = 0;
|
|
987
991
|
}
|
|
988
992
|
flingAndSnap(velocityX);
|
|
993
|
+
handlePostTouchScrolling(velocityX, 0);
|
|
989
994
|
}
|
|
990
995
|
};
|
|
991
996
|
postOnAnimationDelayed(mPostTouchRunnable, ReactScrollViewHelper.MOMENTUM_DELAY);
|
|
997
|
+
} else {
|
|
998
|
+
handlePostTouchScrolling(0, 0);
|
|
992
999
|
}
|
|
993
1000
|
return result;
|
|
994
1001
|
}
|
|
@@ -1105,10 +1112,10 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1105
1112
|
return nextFocus;
|
|
1106
1113
|
}
|
|
1107
1114
|
|
|
1108
|
-
@Nullable View
|
|
1115
|
+
@Nullable View nextFocusableView = findNextFocusableView(this, focused, direction);
|
|
1109
1116
|
|
|
1110
|
-
if (
|
|
1111
|
-
return
|
|
1117
|
+
if (nextFocusableView != null) {
|
|
1118
|
+
return nextFocusableView;
|
|
1112
1119
|
}
|
|
1113
1120
|
}
|
|
1114
1121
|
|
|
@@ -1316,6 +1323,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1316
1323
|
}
|
|
1317
1324
|
ReactScrollViewHelper.notifyUserDrivenScrollEnded_internal(
|
|
1318
1325
|
ReactHorizontalScrollView.this);
|
|
1326
|
+
disableFpsListener();
|
|
1319
1327
|
} else {
|
|
1320
1328
|
if (mPagingEnabled && !mSnappingToPage) {
|
|
1321
1329
|
// If we have pagingEnabled and we have not snapped to the page
|
|
@@ -1696,6 +1704,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1696
1704
|
* <p>`smoothScrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between
|
|
1697
1705
|
* scroll view and state. Calling raw `smoothScrollTo` doesn't update state.
|
|
1698
1706
|
*/
|
|
1707
|
+
@Override
|
|
1699
1708
|
public void reactSmoothScrollTo(int x, int y) {
|
|
1700
1709
|
if (mScrollAnimationEnabled || !UiModeUtils.isTVDevice(getContext())) {
|
|
1701
1710
|
ReactScrollViewHelper.smoothScrollTo(this, x, y);
|
|
@@ -1780,8 +1789,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1780
1789
|
// does not work in RTL.
|
|
1781
1790
|
if (v.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
|
1782
1791
|
adjustPositionForContentChangeRTL(left, right, oldLeft, oldRight);
|
|
1783
|
-
} else if (mMaintainVisibleContentPositionHelper != null) {
|
|
1784
|
-
mMaintainVisibleContentPositionHelper.updateScrollPosition();
|
|
1785
1792
|
}
|
|
1786
1793
|
ReactScrollViewHelper.emitLayoutChangeEvent(this);
|
|
1787
1794
|
}
|
|
@@ -1801,7 +1808,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1801
1808
|
|
|
1802
1809
|
if (mScroller != null && !mScroller.isFinished()) {
|
|
1803
1810
|
// Calculate the velocity and position of the fling animation at the time of this layout
|
|
1804
|
-
// event, which may be later than the last ScrollView tick. These values are not
|
|
1811
|
+
// event, which may be later than the last ScrollView tick. These values are not committed to
|
|
1805
1812
|
// the underlying ScrollView, which will recalculate positions on its next tick.
|
|
1806
1813
|
int scrollerXBeforeTick = mScroller.getCurrX();
|
|
1807
1814
|
boolean hasMoreTicks = mScroller.computeScrollOffset();
|
|
@@ -1843,6 +1850,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1843
1850
|
}
|
|
1844
1851
|
|
|
1845
1852
|
@Nullable
|
|
1853
|
+
@Override
|
|
1846
1854
|
public StateWrapper getStateWrapper() {
|
|
1847
1855
|
return mStateWrapper;
|
|
1848
1856
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollView.java
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<2aa191314924bd0f969fba0e64b86142>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -106,6 +106,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
106
106
|
private final VelocityHelper mVelocityHelper = new VelocityHelper();
|
|
107
107
|
private final Rect mTempRect = new Rect();
|
|
108
108
|
private final ValueAnimator DEFAULT_FLING_ANIMATOR = ObjectAnimator.ofInt(this, "scrollY", 0, 0);
|
|
109
|
+
private final @Nullable FpsListener mFpsListener;
|
|
109
110
|
|
|
110
111
|
private Rect mOverflowInset;
|
|
111
112
|
private @Nullable VirtualViewContainerState mVirtualViewContainerState;
|
|
@@ -118,7 +119,6 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
118
119
|
private boolean mRemoveClippedSubviews;
|
|
119
120
|
private boolean mScrollEnabled;
|
|
120
121
|
private boolean mSendMomentumEvents;
|
|
121
|
-
private @Nullable FpsListener mFpsListener;
|
|
122
122
|
private @Nullable String mScrollPerfTag;
|
|
123
123
|
private @Nullable Drawable mEndBackground;
|
|
124
124
|
private int mEndFillColor;
|
|
@@ -300,6 +300,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
300
300
|
mScrollEnabled = scrollEnabled;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
@Override
|
|
303
304
|
public boolean getScrollEnabled() {
|
|
304
305
|
return mScrollEnabled;
|
|
305
306
|
}
|
|
@@ -699,6 +700,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
699
700
|
float vScroll = ev.getAxisValue(MotionEvent.AXIS_VSCROLL);
|
|
700
701
|
if (vScroll != 0) {
|
|
701
702
|
// Perform the scroll
|
|
703
|
+
enableFpsListener();
|
|
702
704
|
boolean result = super.dispatchGenericMotionEvent(ev);
|
|
703
705
|
// Schedule snap alignment to run after scrolling stops
|
|
704
706
|
if (result
|
|
@@ -709,6 +711,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
709
711
|
// Cancel any pending post-touch runnable and reschedule
|
|
710
712
|
if (mPostTouchRunnable != null) {
|
|
711
713
|
removeCallbacks(mPostTouchRunnable);
|
|
714
|
+
mPostTouchRunnable = null;
|
|
712
715
|
}
|
|
713
716
|
mPostTouchRunnable =
|
|
714
717
|
new Runnable() {
|
|
@@ -722,9 +725,12 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
722
725
|
velocityY = 0;
|
|
723
726
|
}
|
|
724
727
|
flingAndSnap(velocityY);
|
|
728
|
+
handlePostTouchScrolling(0, velocityY);
|
|
725
729
|
}
|
|
726
730
|
};
|
|
727
731
|
postOnAnimationDelayed(mPostTouchRunnable, ReactScrollViewHelper.MOMENTUM_DELAY);
|
|
732
|
+
} else {
|
|
733
|
+
handlePostTouchScrolling(0, 0);
|
|
728
734
|
}
|
|
729
735
|
return result;
|
|
730
736
|
}
|
|
@@ -787,14 +793,6 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
787
793
|
}
|
|
788
794
|
}
|
|
789
795
|
|
|
790
|
-
@Override
|
|
791
|
-
public boolean getClipToPadding() {
|
|
792
|
-
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
|
793
|
-
return mOverflow != Overflow.VISIBLE;
|
|
794
|
-
}
|
|
795
|
-
return super.getClipToPadding();
|
|
796
|
-
}
|
|
797
|
-
|
|
798
796
|
@Override
|
|
799
797
|
public void getClippingRect(Rect outClippingRect) {
|
|
800
798
|
outClippingRect.set(Assertions.assertNotNull(mClippingRect));
|
|
@@ -888,6 +886,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
888
886
|
}
|
|
889
887
|
|
|
890
888
|
@Nullable
|
|
889
|
+
@Override
|
|
891
890
|
public StateWrapper getStateWrapper() {
|
|
892
891
|
return mStateWrapper;
|
|
893
892
|
}
|
|
@@ -1353,6 +1352,7 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
1353
1352
|
* <p>`smoothScrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between
|
|
1354
1353
|
* scroll view and state. Calling raw `smoothScrollTo` doesn't update state.
|
|
1355
1354
|
*/
|
|
1355
|
+
@Override
|
|
1356
1356
|
public void reactSmoothScrollTo(int x, int y) {
|
|
1357
1357
|
ReactScrollViewHelper.smoothScrollTo(this, x, y);
|
|
1358
1358
|
setPendingContentOffsets(x, y);
|
|
@@ -1463,10 +1463,6 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
1463
1463
|
return;
|
|
1464
1464
|
}
|
|
1465
1465
|
|
|
1466
|
-
if (mMaintainVisibleContentPositionHelper != null) {
|
|
1467
|
-
mMaintainVisibleContentPositionHelper.updateScrollPosition();
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
1466
|
if (isShown() && isContentReady()) {
|
|
1471
1467
|
int currentScrollY = getScrollY();
|
|
1472
1468
|
int maxScrollY = getMaxScrollY();
|
|
@@ -1524,11 +1520,12 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
1524
1520
|
* and that you are **not** overriding the NestedScrollView content view to pass in a `translateY`
|
|
1525
1521
|
* style. `translateY` must never be set from ReactJS while using this feature!
|
|
1526
1522
|
*/
|
|
1527
|
-
public void
|
|
1528
|
-
|
|
1523
|
+
public void setScrollAwayPaddingEnabledUnstable(int topPadding, int bottomPadding) {
|
|
1524
|
+
setScrollAwayPaddingEnabledUnstable(topPadding, bottomPadding, true);
|
|
1529
1525
|
}
|
|
1530
1526
|
|
|
1531
|
-
public void
|
|
1527
|
+
public void setScrollAwayPaddingEnabledUnstable(
|
|
1528
|
+
int topPadding, int bottomPadding, boolean updateState) {
|
|
1532
1529
|
int count = getChildCount();
|
|
1533
1530
|
|
|
1534
1531
|
Assertions.assertCondition(
|
|
@@ -1545,17 +1542,18 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
1545
1542
|
// Add the topPadding value as the bottom padding for the NestedScrollView.
|
|
1546
1543
|
// Otherwise, we'll push down the contents of the scroll view down too
|
|
1547
1544
|
// far off screen.
|
|
1548
|
-
setPadding(0, 0, 0, topPadding);
|
|
1545
|
+
setPadding(0, 0, 0, topPadding + bottomPadding);
|
|
1549
1546
|
}
|
|
1550
1547
|
|
|
1551
1548
|
if (updateState) {
|
|
1552
|
-
updateScrollAwayState(topPadding);
|
|
1549
|
+
updateScrollAwayState(topPadding, bottomPadding);
|
|
1553
1550
|
}
|
|
1554
1551
|
setRemoveClippedSubviews(mRemoveClippedSubviews);
|
|
1555
1552
|
}
|
|
1556
1553
|
|
|
1557
|
-
private void updateScrollAwayState(int scrollAwayPaddingTop) {
|
|
1554
|
+
private void updateScrollAwayState(int scrollAwayPaddingTop, int scrollAwayPaddingBottom) {
|
|
1558
1555
|
getReactScrollViewScrollState().setScrollAwayPaddingTop(scrollAwayPaddingTop);
|
|
1556
|
+
getReactScrollViewScrollState().setScrollAwayPaddingBottom(scrollAwayPaddingBottom);
|
|
1559
1557
|
ReactScrollViewHelper.forceUpdateState(this);
|
|
1560
1558
|
}
|
|
1561
1559
|
|
|
@@ -1564,7 +1562,8 @@ class ReactNestedScrollView extends NestedScrollView
|
|
|
1564
1562
|
mReactScrollViewScrollState = scrollState;
|
|
1565
1563
|
if (ReactNativeFeatureFlags.enableViewCulling()
|
|
1566
1564
|
|| ReactNativeFeatureFlags.useTraitHiddenOnAndroid()) {
|
|
1567
|
-
|
|
1565
|
+
setScrollAwayPaddingEnabledUnstable(
|
|
1566
|
+
scrollState.getScrollAwayPaddingTop(), scrollState.getScrollAwayPaddingBottom(), false);
|
|
1568
1567
|
|
|
1569
1568
|
Point scrollPosition = scrollState.getLastStateUpdateScroll();
|
|
1570
1569
|
scrollTo(scrollPosition.x, scrollPosition.y);
|