@depup/react-native 0.85.0-depup.1 → 0.86.0-depup.49
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.js +3 -3
- 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/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 +82 -77
- 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 +1 -1
- 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 -24
- 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/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 -142
- 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 +1 -31
- 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/HMRClient.js +28 -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 +10 -10
- 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 +1 -1
- 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.h +5 -0
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +26 -0
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +0 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +3 -1
- package/React/CoreModules/RCTDevLoadingView.mm +17 -0
- package/React/CoreModules/RCTDevMenuConfigurationDecorator.h +2 -2
- package/React/CoreModules/RCTJscSafeUrl+Internal.h +23 -0
- package/React/CoreModules/RCTJscSafeUrl.mm +38 -0
- package/React/CoreModules/RCTRedBox+Internal.h +42 -0
- package/React/CoreModules/RCTRedBox.mm +30 -454
- package/React/CoreModules/RCTRedBox2AnsiParser+Internal.h +22 -0
- package/React/CoreModules/RCTRedBox2AnsiParser.mm +55 -0
- package/React/CoreModules/RCTRedBox2Controller+Internal.h +34 -0
- package/React/CoreModules/RCTRedBox2Controller.mm +764 -0
- package/React/CoreModules/RCTRedBox2ErrorParser+Internal.h +46 -0
- package/React/CoreModules/RCTRedBox2ErrorParser.mm +57 -0
- package/React/CoreModules/RCTRedBoxController+Internal.h +31 -0
- package/React/CoreModules/RCTRedBoxController.mm +447 -0
- package/React/CoreModules/RCTRedBoxHMRClient+Internal.h +26 -0
- package/React/CoreModules/RCTRedBoxHMRClient.mm +125 -0
- package/React/CoreModules/RCTWebSocketModule.mm +45 -6
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm +0 -1
- package/React/DevSupport/RCTFrameTimingsObserver.h +24 -0
- package/React/DevSupport/RCTFrameTimingsObserver.mm +298 -0
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +4 -0
- package/React/DevSupport/RCTPackagerConnection.mm +13 -11
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +148 -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/TextInput/RCTTextInputComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +122 -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/hermes-engine/build.gradle.kts +12 -13
- 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 +33 -88
- 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 +6 -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/FrameTimingSequence.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +135 -35
- 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 +71 -29
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +121 -51
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +25 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +26 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +134 -57
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +7 -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 +25 -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 +40 -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/NetworkEventUtil.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.kt +2 -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 +1 -1
- 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 +68 -15
- 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 +18 -20
- 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 +19 -20
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +14 -5
- 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 +84 -20
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +41 -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 +17 -1
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.cpp +22 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.h +2 -0
- 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 +167 -69
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +36 -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 +24 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +25 -4
- package/ReactAndroid/src/main/jni/react/tracing/CMakeLists.txt +28 -0
- package/ReactCommon/React-Fabric.podspec +13 -0
- package/ReactCommon/React-FabricComponents.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- 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 +46 -1
- package/ReactCommon/jsinspector-modern/HostTarget.cpp +7 -1
- package/ReactCommon/jsinspector-modern/HostTarget.h +50 -0
- package/ReactCommon/jsinspector-modern/HostTargetTracing.cpp +1 -1
- package/ReactCommon/jsinspector-modern/HostTargetTracing.h +4 -4
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +18 -2
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +17 -2
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +19 -2
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnectionImpl.h +3 -0
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +19 -0
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +7 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +33 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +6 -0
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +10 -0
- package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +12 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +3 -2
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +1 -1
- package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +1 -1
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +10 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +3 -1
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/FrameTimingSequence.h +7 -3
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.cpp +52 -29
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.h +6 -6
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracerSection.h +113 -0
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.cpp +12 -5
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h +3 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.cpp +42 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.h +7 -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/debug/CMakeLists.txt +2 -1
- package/ReactCommon/react/debug/React-debug.podspec +7 -1
- package/ReactCommon/react/debug/redbox/AnsiParser.cpp +139 -0
- package/ReactCommon/react/debug/redbox/AnsiParser.h +35 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.cpp +179 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.h +27 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp +171 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.h +40 -0
- package/ReactCommon/react/debug/redbox/tests/AnsiParserTest.cpp +97 -0
- package/ReactCommon/react/debug/redbox/tests/JscSafeUrlTest.cpp +173 -0
- package/ReactCommon/react/debug/redbox/tests/RedBoxErrorParserTest.cpp +107 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +49 -21
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +60 -25
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +267 -141
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +28 -14
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +48 -20
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +106 -43
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +11 -3
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +14 -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 +2 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +14 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +2 -0
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/NativeFantomTestSpecificMethods.cpp +2 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +60 -25
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +25 -11
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +3 -2
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +4 -0
- package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +66 -0
- 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/PerformanceObserver.cpp +18 -6
- package/ReactCommon/react/performance/timeline/PerformanceObserver.h +2 -0
- package/ReactCommon/react/performance/timeline/tests/PerformanceEntryTest.cpp +62 -0
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +28 -13
- 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 +62 -25
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.h +10 -1
- package/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.h +0 -1
- package/ReactCommon/react/renderer/animationbackend/AnimationChoreographer.h +5 -0
- 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 +8 -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 +52 -5
- 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 +2 -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 +152 -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/{jsinspector-modern → react/utils}/Base64.h +2 -2
- 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/changes.json +12 -12
- 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 +31 -31
- 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 +53 -0
- package/scripts/codegen/generate-artifacts-executor/generateAppDependencyProvider.js +4 -4
- package/scripts/codegen/generate-artifacts-executor/generateCustomURLHandlers.js +4 -4
- package/scripts/codegen/generate-artifacts-executor/generateNativeCode.js +15 -7
- package/scripts/codegen/generate-artifacts-executor/generatePackageSwift.js +2 -2
- package/scripts/codegen/generate-artifacts-executor/generateRCTModuleProviders.js +4 -3
- package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +4 -3
- package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +19 -8
- package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +1 -1
- package/scripts/codegen/generate-artifacts-executor/generateUnstableModulesRequiringMainQueueSetupProvider.js +4 -4
- package/scripts/codegen/generate-artifacts-executor/index.js +2 -0
- package/scripts/codegen/generate-artifacts-executor/utils.js +49 -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 +26 -2
- package/scripts/react_native_pods_utils/script_phases.rb +9 -3
- package/scripts/replace-rncore-version.js +91 -14
- 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 +66 -37
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -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/setup/setUpDefaultReactNativeEnvironment.js +6 -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_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +5 -1
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +3 -4
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +5 -2
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +14 -2
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +8 -6
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +4 -2
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +23 -4
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +2 -3
- package/types_generated/Libraries/{Utilities/IPerformanceLogger.d.ts → ReactNative/IPerformanceLogger.flow.d.ts} +12 -6
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +12 -25
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +1 -16
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +1 -16
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +3 -3
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +6 -2
- package/types_generated/index.d.ts +11 -2
- package/types_generated/src/private/components/virtualcollection/FlingConstants.d.ts +20 -0
- package/types_generated/src/private/components/virtualcollection/Virtual.d.ts +46 -0
- package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +81 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +23 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumnGenerator.d.ts +17 -0
- package/types_generated/src/private/components/virtualcollection/dom/getScrollParent.d.ts +21 -0
- package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +23 -0
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +1 -9
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +1 -13
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +5 -2
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +8 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +0 -19668
- 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/types_generated/Libraries/Renderer/shims/ReactNative.d.ts +0 -16
- package/types_generated/Libraries/Utilities/createPerformanceLogger.d.ts +0 -23
|
@@ -10,14 +10,12 @@ package com.facebook.react;
|
|
|
10
10
|
import static com.facebook.infer.annotation.ThreadConfined.UI;
|
|
11
11
|
import static com.facebook.react.uimanager.BlendModeHelper.needsIsolatedLayer;
|
|
12
12
|
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
|
13
|
-
import static com.facebook.react.uimanager.common.UIManagerType.LEGACY;
|
|
14
13
|
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT;
|
|
15
14
|
|
|
16
15
|
import android.annotation.SuppressLint;
|
|
17
16
|
import android.content.Context;
|
|
18
17
|
import android.graphics.BlendMode;
|
|
19
18
|
import android.graphics.Canvas;
|
|
20
|
-
import android.graphics.Insets;
|
|
21
19
|
import android.graphics.Paint;
|
|
22
20
|
import android.graphics.Point;
|
|
23
21
|
import android.graphics.Rect;
|
|
@@ -25,18 +23,18 @@ import android.os.Build;
|
|
|
25
23
|
import android.os.Bundle;
|
|
26
24
|
import android.util.AttributeSet;
|
|
27
25
|
import android.util.DisplayMetrics;
|
|
28
|
-
import android.view.DisplayCutout;
|
|
29
26
|
import android.view.KeyEvent;
|
|
30
27
|
import android.view.MotionEvent;
|
|
31
28
|
import android.view.Surface;
|
|
32
29
|
import android.view.View;
|
|
33
30
|
import android.view.ViewGroup;
|
|
34
31
|
import android.view.ViewTreeObserver;
|
|
35
|
-
import android.view.WindowInsets;
|
|
36
32
|
import android.view.WindowManager;
|
|
37
33
|
import android.widget.FrameLayout;
|
|
38
34
|
import androidx.annotation.Nullable;
|
|
39
|
-
import androidx.
|
|
35
|
+
import androidx.core.graphics.Insets;
|
|
36
|
+
import androidx.core.view.ViewCompat;
|
|
37
|
+
import androidx.core.view.WindowInsetsCompat;
|
|
40
38
|
import com.facebook.common.logging.FLog;
|
|
41
39
|
import com.facebook.infer.annotation.Assertions;
|
|
42
40
|
import com.facebook.infer.annotation.ThreadConfined;
|
|
@@ -52,6 +50,7 @@ import com.facebook.react.bridge.UiThreadUtil;
|
|
|
52
50
|
import com.facebook.react.bridge.WritableMap;
|
|
53
51
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
54
52
|
import com.facebook.react.common.annotations.VisibleForTesting;
|
|
53
|
+
import com.facebook.react.common.annotations.internal.LegacyArchitecture;
|
|
55
54
|
import com.facebook.react.config.ReactFeatureFlags;
|
|
56
55
|
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
|
57
56
|
import com.facebook.react.modules.appregistry.AppRegistry;
|
|
@@ -70,7 +69,6 @@ import com.facebook.react.uimanager.RootView;
|
|
|
70
69
|
import com.facebook.react.uimanager.RootViewUtil;
|
|
71
70
|
import com.facebook.react.uimanager.UIManagerHelper;
|
|
72
71
|
import com.facebook.react.uimanager.common.UIManagerType;
|
|
73
|
-
import com.facebook.react.uimanager.common.ViewUtil;
|
|
74
72
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
75
73
|
import com.facebook.systrace.Systrace;
|
|
76
74
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
@@ -117,7 +115,6 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
117
115
|
private int mLastHeight = 0;
|
|
118
116
|
private int mLastOffsetX = Integer.MIN_VALUE;
|
|
119
117
|
private int mLastOffsetY = Integer.MIN_VALUE;
|
|
120
|
-
private @UIManagerType int mUIManagerType = LEGACY;
|
|
121
118
|
private final AtomicInteger mState = new AtomicInteger(STATE_STOPPED);
|
|
122
119
|
|
|
123
120
|
public ReactRootView(Context context) {
|
|
@@ -308,9 +305,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
308
305
|
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
|
|
309
306
|
|
|
310
307
|
BlendMode mixBlendMode = null;
|
|
311
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
|
312
|
-
&& ViewUtil.getUIManagerType(this) == UIManagerType.FABRIC
|
|
313
|
-
&& needsIsolatedLayer(this)) {
|
|
308
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && needsIsolatedLayer(this)) {
|
|
314
309
|
mixBlendMode = (BlendMode) child.getTag(R.id.mix_blend_mode);
|
|
315
310
|
if (mixBlendMode != null) {
|
|
316
311
|
Paint p = new Paint();
|
|
@@ -475,7 +470,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
475
470
|
}
|
|
476
471
|
|
|
477
472
|
private boolean isFabric() {
|
|
478
|
-
return
|
|
473
|
+
return true;
|
|
479
474
|
}
|
|
480
475
|
|
|
481
476
|
@Override
|
|
@@ -647,9 +642,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
647
642
|
final ReactContext reactApplicationContext = getCurrentReactContext();
|
|
648
643
|
|
|
649
644
|
if (reactApplicationContext != null) {
|
|
650
|
-
@Nullable
|
|
651
|
-
UIManager uiManager =
|
|
652
|
-
UIManagerHelper.getUIManager(reactApplicationContext, getUIManagerType());
|
|
645
|
+
@Nullable UIManager uiManager = UIManagerHelper.getUIManager(reactApplicationContext, FABRIC);
|
|
653
646
|
// Ignore calling updateRootLayoutSpecs if UIManager is not properly initialized.
|
|
654
647
|
if (uiManager != null) {
|
|
655
648
|
// In Fabric only, get position of view within screen
|
|
@@ -801,11 +794,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
801
794
|
|
|
802
795
|
@VisibleForTesting
|
|
803
796
|
/* package */ void simulateCheckForKeyboardForTesting() {
|
|
804
|
-
|
|
805
|
-
getCustomGlobalLayoutListener().checkForKeyboardEvents();
|
|
806
|
-
} else {
|
|
807
|
-
getCustomGlobalLayoutListener().checkForKeyboardEventsLegacy();
|
|
808
|
-
}
|
|
797
|
+
getCustomGlobalLayoutListener().checkForKeyboardEvents();
|
|
809
798
|
}
|
|
810
799
|
|
|
811
800
|
private CustomGlobalLayoutListener getCustomGlobalLayoutListener() {
|
|
@@ -868,6 +857,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
868
857
|
+ " or in the onDestroyView() of your hosting Fragment.");
|
|
869
858
|
}
|
|
870
859
|
|
|
860
|
+
@Override
|
|
871
861
|
public int getRootViewTag() {
|
|
872
862
|
return mRootViewTag;
|
|
873
863
|
}
|
|
@@ -876,6 +866,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
876
866
|
return mRootViewTag != 0 && mRootViewTag != NO_ID;
|
|
877
867
|
}
|
|
878
868
|
|
|
869
|
+
@Override
|
|
879
870
|
public void setRootViewTag(int rootViewTag) {
|
|
880
871
|
mRootViewTag = rootViewTag;
|
|
881
872
|
}
|
|
@@ -890,15 +881,18 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
890
881
|
getCurrentReactContext().handleException(e);
|
|
891
882
|
}
|
|
892
883
|
|
|
884
|
+
@LegacyArchitecture
|
|
885
|
+
@Deprecated
|
|
893
886
|
public void setIsFabric(boolean isFabric) {
|
|
894
|
-
|
|
887
|
+
/* noop */
|
|
895
888
|
}
|
|
896
889
|
|
|
897
890
|
@Override
|
|
898
891
|
public @UIManagerType int getUIManagerType() {
|
|
899
|
-
return
|
|
892
|
+
return FABRIC;
|
|
900
893
|
}
|
|
901
894
|
|
|
895
|
+
@LegacyArchitecture
|
|
902
896
|
@Nullable
|
|
903
897
|
public ReactInstanceManager getReactInstanceManager() {
|
|
904
898
|
return mReactInstanceManager;
|
|
@@ -932,16 +926,14 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
932
926
|
|
|
933
927
|
private class CustomGlobalLayoutListener implements ViewTreeObserver.OnGlobalLayoutListener {
|
|
934
928
|
private final Rect mVisibleViewArea;
|
|
935
|
-
private final int mMinKeyboardHeightDetected;
|
|
936
929
|
|
|
937
930
|
private boolean mKeyboardIsVisible = false;
|
|
938
|
-
private int mKeyboardHeight = 0;
|
|
931
|
+
private int mKeyboardHeight = 0;
|
|
939
932
|
private int mDeviceRotation = 0;
|
|
940
933
|
|
|
941
934
|
/* package */ CustomGlobalLayoutListener() {
|
|
942
935
|
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(getContext().getApplicationContext());
|
|
943
936
|
mVisibleViewArea = new Rect();
|
|
944
|
-
mMinKeyboardHeightDetected = (int) PixelUtil.toPixelFromDIP(60);
|
|
945
937
|
}
|
|
946
938
|
|
|
947
939
|
@Override
|
|
@@ -950,32 +942,30 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
950
942
|
return;
|
|
951
943
|
}
|
|
952
944
|
|
|
953
|
-
|
|
954
|
-
checkForKeyboardEvents();
|
|
955
|
-
} else {
|
|
956
|
-
checkForKeyboardEventsLegacy();
|
|
957
|
-
}
|
|
958
|
-
|
|
945
|
+
checkForKeyboardEvents();
|
|
959
946
|
checkForDeviceOrientationChanges();
|
|
960
947
|
checkForDeviceDimensionsChanges();
|
|
961
948
|
}
|
|
962
949
|
|
|
963
|
-
@RequiresApi(api = Build.VERSION_CODES.R)
|
|
964
950
|
private void checkForKeyboardEvents() {
|
|
965
951
|
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
|
|
966
|
-
|
|
952
|
+
WindowInsetsCompat rootInsets = ViewCompat.getRootWindowInsets(getRootView());
|
|
967
953
|
if (rootInsets == null) {
|
|
968
954
|
return;
|
|
969
955
|
}
|
|
970
956
|
|
|
971
|
-
boolean keyboardIsVisible = rootInsets.isVisible(
|
|
972
|
-
|
|
973
|
-
|
|
957
|
+
boolean keyboardIsVisible = rootInsets.isVisible(WindowInsetsCompat.Type.ime());
|
|
958
|
+
Insets barInsets = rootInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
959
|
+
|
|
960
|
+
if (keyboardIsVisible) {
|
|
961
|
+
Insets imeInsets = rootInsets.getInsets(WindowInsetsCompat.Type.ime());
|
|
962
|
+
int height = imeInsets.bottom - barInsets.bottom;
|
|
974
963
|
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
964
|
+
// Re-emit on height change while keyboard stays visible (e.g., emoji
|
|
965
|
+
// panel toggle); JS consumers cache endCoordinates from keyboardDidShow.
|
|
966
|
+
if (!mKeyboardIsVisible || height != mKeyboardHeight) {
|
|
967
|
+
mKeyboardIsVisible = true;
|
|
968
|
+
mKeyboardHeight = height;
|
|
979
969
|
|
|
980
970
|
ViewGroup.LayoutParams rootLayoutParams = getRootView().getLayoutParams();
|
|
981
971
|
Assertions.assertCondition(rootLayoutParams instanceof WindowManager.LayoutParams);
|
|
@@ -993,60 +983,15 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
993
983
|
PixelUtil.toDIPFromPixel(mVisibleViewArea.left),
|
|
994
984
|
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
|
|
995
985
|
PixelUtil.toDIPFromPixel(height)));
|
|
996
|
-
} else {
|
|
997
|
-
sendEvent(
|
|
998
|
-
"keyboardDidHide",
|
|
999
|
-
createKeyboardEventPayload(
|
|
1000
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.height()),
|
|
1001
|
-
0,
|
|
1002
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
|
|
1003
|
-
0));
|
|
1004
986
|
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
private void checkForKeyboardEventsLegacy() {
|
|
1009
|
-
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
|
|
1010
|
-
|
|
1011
|
-
int notchHeight = 0;
|
|
1012
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
1013
|
-
WindowInsets insets = getRootView().getRootWindowInsets();
|
|
1014
|
-
if (insets != null) {
|
|
1015
|
-
DisplayCutout displayCutout = insets.getDisplayCutout();
|
|
1016
|
-
if (displayCutout != null) {
|
|
1017
|
-
notchHeight = displayCutout.getSafeInsetTop();
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
final int heightDiff =
|
|
1022
|
-
DisplayMetricsHolder.getWindowDisplayMetrics().heightPixels
|
|
1023
|
-
- mVisibleViewArea.bottom
|
|
1024
|
-
+ notchHeight;
|
|
1025
|
-
|
|
1026
|
-
boolean isKeyboardShowingOrKeyboardHeightChanged =
|
|
1027
|
-
mKeyboardHeight != heightDiff && heightDiff > mMinKeyboardHeightDetected;
|
|
1028
|
-
|
|
1029
|
-
if (isKeyboardShowingOrKeyboardHeightChanged) {
|
|
1030
|
-
mKeyboardHeight = heightDiff;
|
|
1031
|
-
mKeyboardIsVisible = true;
|
|
1032
|
-
sendEvent(
|
|
1033
|
-
"keyboardDidShow",
|
|
1034
|
-
createKeyboardEventPayload(
|
|
1035
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.bottom),
|
|
1036
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.left),
|
|
1037
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
|
|
1038
|
-
PixelUtil.toDIPFromPixel(mKeyboardHeight)));
|
|
1039
|
-
return;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
boolean isKeyboardHidden = mKeyboardHeight != 0 && heightDiff <= mMinKeyboardHeightDetected;
|
|
1043
|
-
if (isKeyboardHidden) {
|
|
1044
|
-
mKeyboardHeight = 0;
|
|
987
|
+
} else if (mKeyboardIsVisible) {
|
|
1045
988
|
mKeyboardIsVisible = false;
|
|
989
|
+
mKeyboardHeight = 0;
|
|
990
|
+
|
|
1046
991
|
sendEvent(
|
|
1047
992
|
"keyboardDidHide",
|
|
1048
993
|
createKeyboardEventPayload(
|
|
1049
|
-
PixelUtil.toDIPFromPixel(mVisibleViewArea.
|
|
994
|
+
PixelUtil.toDIPFromPixel(mVisibleViewArea.bottom + barInsets.bottom),
|
|
1050
995
|
0,
|
|
1051
996
|
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
|
|
1052
997
|
0));
|
|
@@ -22,6 +22,7 @@ internal class EventAnimationDriver(
|
|
|
22
22
|
private val eventPath: List<String>,
|
|
23
23
|
@JvmField internal var valueNode: ValueAnimatedNode,
|
|
24
24
|
) : RCTModernEventEmitter {
|
|
25
|
+
@Deprecated("Use the overload with eventTimestamp parameter instead.")
|
|
25
26
|
override fun receiveEvent(
|
|
26
27
|
surfaceId: Int,
|
|
27
28
|
targetTag: Int,
|
|
@@ -23,14 +23,11 @@ import com.facebook.react.bridge.UIManagerListener
|
|
|
23
23
|
import com.facebook.react.bridge.buildReadableMap
|
|
24
24
|
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
|
25
25
|
import com.facebook.react.common.annotations.VisibleForTesting
|
|
26
|
-
import com.facebook.react.common.build.ReactBuildConfig
|
|
27
26
|
import com.facebook.react.module.annotations.ReactModule
|
|
28
27
|
import com.facebook.react.modules.core.ReactChoreographer
|
|
29
28
|
import com.facebook.react.uimanager.GuardedFrameCallback
|
|
30
|
-
import com.facebook.react.uimanager.UIBlock
|
|
31
29
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
32
30
|
import com.facebook.react.uimanager.common.UIManagerType
|
|
33
|
-
import com.facebook.react.uimanager.common.ViewUtil
|
|
34
31
|
import java.util.ArrayList
|
|
35
32
|
import java.util.Queue
|
|
36
33
|
import java.util.concurrent.ConcurrentLinkedQueue
|
|
@@ -207,11 +204,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
207
204
|
@Volatile private var currentBatchNumber: Long = 0
|
|
208
205
|
|
|
209
206
|
private var initializedForFabric = false
|
|
210
|
-
private var initializedForNonFabric = false
|
|
211
|
-
|
|
212
|
-
@UIManagerType private var uiManagerType = UIManagerType.LEGACY
|
|
213
|
-
private var numFabricAnimations = 0
|
|
214
|
-
private var numNonFabricAnimations = 0
|
|
215
207
|
|
|
216
208
|
/**
|
|
217
209
|
* This method is used to notify the JS side that the user has stopped scrolling. With natively
|
|
@@ -285,10 +277,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
285
277
|
// For FabricUIManager only
|
|
286
278
|
@UiThread
|
|
287
279
|
override fun didDispatchMountItems(uiManager: UIManager) {
|
|
288
|
-
if (uiManagerType != UIManagerType.FABRIC) {
|
|
289
|
-
return
|
|
290
|
-
}
|
|
291
|
-
|
|
292
280
|
var batchNumber = currentBatchNumber - 1
|
|
293
281
|
|
|
294
282
|
// TODO T71377544: delete this when the JS method is confirmed safe
|
|
@@ -313,33 +301,10 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
313
301
|
operations.executeBatch(batchNumber, nodesManager)
|
|
314
302
|
}
|
|
315
303
|
|
|
316
|
-
// For non-FabricUIManager only
|
|
317
|
-
@Suppress("DEPRECATION")
|
|
304
|
+
// For non-FabricUIManager only (no-op since Fabric is the only supported UIManager)
|
|
318
305
|
@UiThread
|
|
319
306
|
override fun willDispatchViewUpdates(uiManager: UIManager) {
|
|
320
|
-
|
|
321
|
-
return
|
|
322
|
-
}
|
|
323
|
-
if (
|
|
324
|
-
uiManagerType == UIManagerType.FABRIC ||
|
|
325
|
-
ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE
|
|
326
|
-
) {
|
|
327
|
-
return
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
// The following code ONLY executes for non-fabric
|
|
331
|
-
// When ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE is true, the folowing code
|
|
332
|
-
// might be stripped out.
|
|
333
|
-
val frameNo = currentBatchNumber++
|
|
334
|
-
|
|
335
|
-
val preOperationsUIBlock = UIBlock { preOperations.executeBatch(frameNo, nodesManager) }
|
|
336
|
-
|
|
337
|
-
val operationsUIBlock = UIBlock { operations.executeBatch(frameNo, nodesManager) }
|
|
338
|
-
|
|
339
|
-
assert(uiManager is com.facebook.react.uimanager.UIManagerModule)
|
|
340
|
-
val uiManagerModule = uiManager as com.facebook.react.uimanager.UIManagerModule
|
|
341
|
-
uiManagerModule.prependUIBlock(preOperationsUIBlock)
|
|
342
|
-
uiManagerModule.addUIBlock(operationsUIBlock)
|
|
307
|
+
// No-op: Fabric is the only supported UIManager
|
|
343
308
|
}
|
|
344
309
|
|
|
345
310
|
override fun onHostPause() {
|
|
@@ -411,23 +376,15 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
411
376
|
}
|
|
412
377
|
|
|
413
378
|
/**
|
|
414
|
-
* Given a viewTag,
|
|
415
|
-
*
|
|
416
|
-
* module thread, and not concurrently.
|
|
379
|
+
* Given a viewTag, attach an event listener to the Fabric UIManager if necessary. This is
|
|
380
|
+
* expected to only be called from the native module thread, and not concurrently.
|
|
417
381
|
*
|
|
418
382
|
* @param viewTag
|
|
419
383
|
*/
|
|
420
384
|
private fun initializeLifecycleEventListenersForViewTag(viewTag: Int) {
|
|
421
|
-
uiManagerType = ViewUtil.getUIManagerType(viewTag)
|
|
422
|
-
if (uiManagerType == UIManagerType.FABRIC) {
|
|
423
|
-
numFabricAnimations++
|
|
424
|
-
} else {
|
|
425
|
-
numNonFabricAnimations++
|
|
426
|
-
}
|
|
427
|
-
|
|
428
385
|
val nodesManager = this.nodesManager
|
|
429
386
|
if (nodesManager != null) {
|
|
430
|
-
nodesManager.initializeEventListenerForUIManagerType(
|
|
387
|
+
nodesManager.initializeEventListenerForUIManagerType(UIManagerType.FABRIC)
|
|
431
388
|
} else {
|
|
432
389
|
ReactSoftExceptionLogger.logSoftException(
|
|
433
390
|
NAME,
|
|
@@ -437,62 +394,21 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
437
394
|
)
|
|
438
395
|
}
|
|
439
396
|
|
|
440
|
-
// Subscribe to
|
|
441
|
-
|
|
442
|
-
if (uiManagerType == UIManagerType.FABRIC) initializedForFabric else initializedForNonFabric
|
|
443
|
-
if (initialized) {
|
|
397
|
+
// Subscribe to Fabric UIManager lifecycle events if we haven't yet
|
|
398
|
+
if (initializedForFabric) {
|
|
444
399
|
return
|
|
445
400
|
}
|
|
446
401
|
|
|
447
402
|
val reactApplicationContext = reactApplicationContextIfActiveOrWarn
|
|
448
403
|
if (reactApplicationContext != null) {
|
|
449
|
-
val uiManager = UIManagerHelper.getUIManager(reactApplicationContext,
|
|
404
|
+
val uiManager = UIManagerHelper.getUIManager(reactApplicationContext, UIManagerType.FABRIC)
|
|
450
405
|
if (uiManager != null) {
|
|
451
406
|
uiManager.addUIManagerEventListener(this)
|
|
452
|
-
|
|
453
|
-
initializedForFabric = true
|
|
454
|
-
} else {
|
|
455
|
-
initializedForNonFabric = true
|
|
456
|
-
}
|
|
407
|
+
initializedForFabric = true
|
|
457
408
|
}
|
|
458
409
|
}
|
|
459
410
|
}
|
|
460
411
|
|
|
461
|
-
/**
|
|
462
|
-
* Given a viewTag and the knowledge that a "disconnect" or "stop"-type imperative command is
|
|
463
|
-
* being executed, decrement the number of inflight animations and possibly switch UIManager
|
|
464
|
-
* modes.
|
|
465
|
-
*
|
|
466
|
-
* @param viewTag
|
|
467
|
-
*/
|
|
468
|
-
private fun decrementInFlightAnimationsForViewTag(viewTag: Int) {
|
|
469
|
-
@UIManagerType val animationManagerType = ViewUtil.getUIManagerType(viewTag)
|
|
470
|
-
if (animationManagerType == UIManagerType.FABRIC) {
|
|
471
|
-
numFabricAnimations--
|
|
472
|
-
} else {
|
|
473
|
-
numNonFabricAnimations--
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// Should we switch to a different animation mode?
|
|
477
|
-
// This can be useful when navigating between Fabric and non-Fabric screens:
|
|
478
|
-
// If there are ongoing Fabric animations from a previous screen,
|
|
479
|
-
// and we tear down the current non-Fabric screen, we should expect
|
|
480
|
-
// the animation mode to switch back - and vice-versa.
|
|
481
|
-
if (
|
|
482
|
-
numNonFabricAnimations == 0 &&
|
|
483
|
-
numFabricAnimations > 0 &&
|
|
484
|
-
uiManagerType != UIManagerType.FABRIC
|
|
485
|
-
) {
|
|
486
|
-
uiManagerType = UIManagerType.FABRIC
|
|
487
|
-
} else if (
|
|
488
|
-
numFabricAnimations == 0 &&
|
|
489
|
-
numNonFabricAnimations > 0 &&
|
|
490
|
-
uiManagerType != UIManagerType.LEGACY
|
|
491
|
-
) {
|
|
492
|
-
uiManagerType = UIManagerType.LEGACY
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
412
|
override fun startOperationBatch() {
|
|
497
413
|
batchingControlledByJS = true
|
|
498
414
|
currentBatchNumber++
|
|
@@ -804,8 +720,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
804
720
|
FLog.d(NAME, "queue disconnectAnimatedNodeFromView: $animatedNodeTag viewTag: $viewTag")
|
|
805
721
|
}
|
|
806
722
|
|
|
807
|
-
decrementInFlightAnimationsForViewTag(viewTag)
|
|
808
|
-
|
|
809
723
|
addOperation(
|
|
810
724
|
object : UIThreadOperation() {
|
|
811
725
|
override fun execute(animatedNodesManager: NativeAnimatedNodesManager) {
|
|
@@ -883,8 +797,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
883
797
|
)
|
|
884
798
|
}
|
|
885
799
|
|
|
886
|
-
decrementInFlightAnimationsForViewTag(viewTag)
|
|
887
|
-
|
|
888
800
|
addOperation(
|
|
889
801
|
object : UIThreadOperation() {
|
|
890
802
|
override fun execute(animatedNodesManager: NativeAnimatedNodesManager) {
|
|
@@ -1085,7 +997,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
1085
997
|
BatchExecutionOpCodes.OP_CODE_DISCONNECT_ANIMATED_NODE_FROM_VIEW -> {
|
|
1086
998
|
val animatedNodeTag = opsAndArgs.getInt(i++)
|
|
1087
999
|
viewTag = opsAndArgs.getInt(i++)
|
|
1088
|
-
decrementInFlightAnimationsForViewTag(viewTag)
|
|
1089
1000
|
animatedNodesManager.disconnectAnimatedNodeFromView(animatedNodeTag, viewTag)
|
|
1090
1001
|
}
|
|
1091
1002
|
|
|
@@ -1104,7 +1015,6 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
|
|
1104
1015
|
|
|
1105
1016
|
BatchExecutionOpCodes.OP_CODE_REMOVE_ANIMATED_EVENT_FROM_VIEW -> {
|
|
1106
1017
|
viewTag = opsAndArgs.getInt(i++)
|
|
1107
|
-
decrementInFlightAnimationsForViewTag(viewTag)
|
|
1108
1018
|
animatedNodesManager.removeAnimatedEventFromView(
|
|
1109
1019
|
viewTag,
|
|
1110
1020
|
checkNotNull(opsAndArgs.getString(i++)),
|
package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.kt
CHANGED
|
@@ -61,25 +61,17 @@ public class NativeAnimatedNodesManager(
|
|
|
61
61
|
private val runUpdateNodeList: MutableList<AnimatedNode> = LinkedList()
|
|
62
62
|
|
|
63
63
|
private var eventListenerInitializedForFabric = false
|
|
64
|
-
private var eventListenerInitializedForNonFabric = false
|
|
65
64
|
|
|
66
65
|
private var warnedAboutGraphTraversal = false
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
|
-
* Initialize event listeners for Fabric UIManager
|
|
70
|
-
*
|
|
71
|
-
* from the native module thread.
|
|
68
|
+
* Initialize event listeners for Fabric UIManager exactly once. This is expected to only be
|
|
69
|
+
* called from the native module thread.
|
|
72
70
|
*
|
|
73
71
|
* @param uiManagerType
|
|
74
72
|
*/
|
|
75
73
|
public fun initializeEventListenerForUIManagerType(@UIManagerType uiManagerType: Int) {
|
|
76
|
-
|
|
77
|
-
when (uiManagerType) {
|
|
78
|
-
UIManagerType.FABRIC -> eventListenerInitializedForFabric
|
|
79
|
-
else -> eventListenerInitializedForNonFabric
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (isEventListenerInitialized) {
|
|
74
|
+
if (eventListenerInitializedForFabric) {
|
|
83
75
|
return
|
|
84
76
|
}
|
|
85
77
|
|
|
@@ -87,11 +79,7 @@ public class NativeAnimatedNodesManager(
|
|
|
87
79
|
UIManagerHelper.getUIManager(checkNotNull(reactApplicationContext), uiManagerType)
|
|
88
80
|
if (uiManager != null) {
|
|
89
81
|
uiManager.eventDispatcher.addListener(this)
|
|
90
|
-
|
|
91
|
-
eventListenerInitializedForFabric = true
|
|
92
|
-
} else {
|
|
93
|
-
eventListenerInitializedForNonFabric = true
|
|
94
|
-
}
|
|
82
|
+
eventListenerInitializedForFabric = true
|
|
95
83
|
}
|
|
96
84
|
}
|
|
97
85
|
|
|
@@ -763,7 +751,6 @@ public class NativeAnimatedNodesManager(
|
|
|
763
751
|
FLog.e(TAG, node.prettyPrintWithChildren())
|
|
764
752
|
}
|
|
765
753
|
|
|
766
|
-
// If we're running only in non-Fabric, we still throw an exception.
|
|
767
754
|
// In Fabric, it seems that animations enter an inconsistent state fairly often.
|
|
768
755
|
// We detect if the inconsistency is due to a cycle (a fatal error for which we must crash)
|
|
769
756
|
// or disconnected regions, indicating a partially-set-up animation graph, which is not
|
|
@@ -773,17 +760,9 @@ public class NativeAnimatedNodesManager(
|
|
|
773
760
|
IllegalStateException(
|
|
774
761
|
("Looks like animated nodes graph has ${reason}, there are $activeNodesCount but toposort visited only $updatedNodesCount")
|
|
775
762
|
)
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
|
|
780
|
-
} else if (eventListenerInitializedForFabric) {
|
|
781
|
-
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
|
|
782
|
-
// or fix the root cause
|
|
783
|
-
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
|
|
784
|
-
} else {
|
|
785
|
-
throw ex
|
|
786
|
-
}
|
|
763
|
+
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
|
|
764
|
+
// or fix the root cause
|
|
765
|
+
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
|
|
787
766
|
} else {
|
|
788
767
|
warnedAboutGraphTraversal = false
|
|
789
768
|
}
|
|
@@ -12,8 +12,6 @@ import com.facebook.react.bridge.JSApplicationIllegalArgumentException
|
|
|
12
12
|
import com.facebook.react.bridge.JavaOnlyMap
|
|
13
13
|
import com.facebook.react.bridge.ReadableMap
|
|
14
14
|
import com.facebook.react.bridge.UIManager
|
|
15
|
-
import com.facebook.react.uimanager.common.UIManagerType
|
|
16
|
-
import com.facebook.react.uimanager.common.ViewUtil.getUIManagerType
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
17
|
* Animated node that represents view properties. There is a special handling logic implemented for
|
|
@@ -67,23 +65,8 @@ internal class PropsAnimatedNode(
|
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
fun restoreDefaultValues() {
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
// Don't restore default values in Fabric.
|
|
75
|
-
// In Non-Fabric this had the effect of "restore the value to whatever the value was on the
|
|
76
|
-
// ShadowNode instead of in the View hierarchy". However, "synchronouslyUpdateViewOnUIThread"
|
|
77
|
-
// will not have that impact on Fabric, because the FabricUIManager doesn't have access to the
|
|
78
|
-
// ShadowNode layer.
|
|
79
|
-
if (getUIManagerType(connectedViewTag) == UIManagerType.FABRIC) {
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
val it = propMap.keySetIterator()
|
|
83
|
-
while (it.hasNextKey()) {
|
|
84
|
-
propMap.putNull(it.nextKey())
|
|
85
|
-
}
|
|
86
|
-
connectedViewUIManager?.synchronouslyUpdateViewOnUIThread(connectedViewTag, propMap)
|
|
68
|
+
// In Fabric, we don't restore default values since the FabricUIManager doesn't have access
|
|
69
|
+
// to the ShadowNode layer. This method was only relevant for the legacy Paper renderer.
|
|
87
70
|
}
|
|
88
71
|
|
|
89
72
|
fun updateView() {
|
|
@@ -25,15 +25,9 @@ import java.lang.reflect.Method
|
|
|
25
25
|
@DoNotStrip
|
|
26
26
|
@InteropLegacyArchitecture
|
|
27
27
|
internal class JavaModuleWrapper(
|
|
28
|
-
@Suppress("DEPRECATION") private val jsInstance: JSInstance,
|
|
28
|
+
@Suppress("DEPRECATION", "unused") private val jsInstance: JSInstance,
|
|
29
29
|
private val moduleHolder: ModuleHolder,
|
|
30
30
|
) {
|
|
31
|
-
interface NativeMethod {
|
|
32
|
-
@Suppress("DEPRECATION") fun invoke(jsInstance: JSInstance, parameters: ReadableArray)
|
|
33
|
-
|
|
34
|
-
val type: String
|
|
35
|
-
}
|
|
36
|
-
|
|
37
31
|
@DoNotStrip
|
|
38
32
|
class MethodDescriptor {
|
|
39
33
|
@DoNotStrip var method: Method? = null
|
|
@@ -45,7 +39,6 @@ internal class JavaModuleWrapper(
|
|
|
45
39
|
@DoNotStrip var type: String? = null
|
|
46
40
|
}
|
|
47
41
|
|
|
48
|
-
private val methods = ArrayList<NativeMethod>()
|
|
49
42
|
private val descs = ArrayList<MethodDescriptor>()
|
|
50
43
|
|
|
51
44
|
@get:DoNotStrip
|
|
@@ -63,26 +56,26 @@ internal class JavaModuleWrapper(
|
|
|
63
56
|
var classForMethods: Class<*> = moduleHolder.module.javaClass
|
|
64
57
|
val superClass = classForMethods.superclass
|
|
65
58
|
if (superClass != null && TurboModule::class.java.isAssignableFrom(superClass)) {
|
|
66
|
-
// For java module that is based on generated flow-type spec, inspect the
|
|
67
|
-
// spec abstract class instead, which is the super class of the given Java
|
|
68
|
-
// module.
|
|
69
59
|
classForMethods = superClass
|
|
70
60
|
}
|
|
71
61
|
|
|
72
62
|
val targetMethods = classForMethods.declaredMethods
|
|
73
63
|
for (targetMethod in targetMethods) {
|
|
74
64
|
targetMethod.getAnnotation(ReactMethod::class.java)?.let { annotation ->
|
|
75
|
-
val methodName = targetMethod.name
|
|
76
65
|
val md = MethodDescriptor()
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
md.name = targetMethod.name
|
|
67
|
+
md.type =
|
|
68
|
+
when {
|
|
69
|
+
annotation.isBlockingSynchronousMethod -> BaseJavaModule.METHOD_TYPE_SYNC
|
|
70
|
+
targetMethod.parameterTypes.let { params ->
|
|
71
|
+
params.isNotEmpty() && params.last() == Promise::class.java
|
|
72
|
+
} -> BaseJavaModule.METHOD_TYPE_PROMISE
|
|
73
|
+
else -> BaseJavaModule.METHOD_TYPE_ASYNC
|
|
74
|
+
}
|
|
81
75
|
if (BaseJavaModule.METHOD_TYPE_SYNC == md.type) {
|
|
82
|
-
md.signature =
|
|
76
|
+
md.signature = ""
|
|
83
77
|
md.method = targetMethod
|
|
84
78
|
}
|
|
85
|
-
methods.add(method)
|
|
86
79
|
descs.add(md)
|
|
87
80
|
}
|
|
88
81
|
}
|
|
@@ -128,11 +121,10 @@ internal class JavaModuleWrapper(
|
|
|
128
121
|
|
|
129
122
|
@DoNotStrip
|
|
130
123
|
fun invoke(methodId: Int, parameters: ReadableNativeArray) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
methods[methodId].invoke(jsInstance, parameters)
|
|
124
|
+
throw UnsupportedOperationException(
|
|
125
|
+
"JavaModuleWrapper.invoke() is no longer supported. " +
|
|
126
|
+
"Use TurboModule interop instead (ReactNativeFeatureFlags.useTurboModuleInterop)."
|
|
127
|
+
)
|
|
136
128
|
}
|
|
137
129
|
|
|
138
130
|
private companion object {
|