react-native-tvos 0.74.5-0 → 0.75.2-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 +2 -0
- package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
- package/Libraries/Animated/createAnimatedComponent.js +10 -4
- package/Libraries/Animated/useAnimatedProps.js +56 -28
- package/Libraries/AppDelegate/RCTAppDelegate.h +9 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +95 -37
- package/Libraries/AppDelegate/RCTAppSetupUtils.mm +23 -27
- package/Libraries/AppDelegate/RCTRootViewFactory.h +71 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +76 -17
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +3 -4
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Blob/RCTBlobCollector.mm +4 -1
- package/Libraries/Blob/RCTBlobManager.h +2 -0
- package/Libraries/Blob/RCTBlobManager.mm +6 -0
- package/Libraries/Blob/React-RCTBlob.podspec +2 -2
- package/Libraries/Components/Button.js +10 -5
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +11 -2
- package/Libraries/Components/Pressable/Pressable.js +29 -7
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +4 -0
- package/Libraries/Components/ScrollView/ScrollView.js +109 -29
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +6 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +13 -1
- package/Libraries/Components/StatusBar/StatusBar.js +1 -21
- package/Libraries/Components/TV/TVViewPropTypes.js +1 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +0 -15
- package/Libraries/Components/TextInput/InputAccessoryView.js +10 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +0 -12
- package/Libraries/Components/TextInput/TextInput.d.ts +0 -19
- package/Libraries/Components/TextInput/TextInput.js +14 -70
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/TouchableHighlight.d.ts +4 -10
- package/Libraries/Components/Touchable/TouchableHighlight.js +3 -1
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +4 -32
- package/Libraries/Components/Touchable/TouchableOpacity.js +3 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +8 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +131 -138
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/View.js +1 -11
- package/Libraries/Components/View/ViewAccessibility.js +4 -4
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -49
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Core/Devtools/loadBundleFromServer.js +3 -3
- package/Libraries/Core/Devtools/parseErrorStack.js +5 -5
- package/Libraries/Core/Devtools/parseHermesStack.js +22 -16
- package/Libraries/Core/ErrorHandlers.js +116 -0
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpDeveloperTools.js +3 -1
- package/Libraries/Core/setUpPerformance.js +6 -4
- package/Libraries/Core/setUpReactDevTools.js +70 -10
- package/Libraries/Core/setUpTimers.js +50 -31
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +1 -1
- package/Libraries/Image/Image.android.js +23 -13
- package/Libraries/Image/Image.d.ts +14 -15
- package/Libraries/Image/Image.ios.js +21 -11
- package/Libraries/Image/ImageProps.js +16 -5
- package/Libraries/Image/ImageTypes.flow.js +7 -2
- package/Libraries/Image/ImageUtils.js +1 -0
- package/Libraries/Image/ImageViewNativeComponent.js +2 -1
- package/Libraries/Image/RCTImageLoader.mm +0 -12
- package/Libraries/Image/RCTImageLoaderLoggable.h +3 -1
- package/Libraries/Image/RCTImageLoaderWithAttributionProtocol.h +0 -3
- package/Libraries/Image/RCTUIImageViewAnimated.mm +21 -17
- package/Libraries/Image/React-RCTImage.podspec +2 -2
- package/Libraries/Inspector/ElementBox.js +6 -3
- package/Libraries/Inspector/ElementProperties.js +1 -1
- package/Libraries/Interaction/TouchHistoryMath.js +4 -4
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +6 -26
- package/Libraries/JSInspector/NetworkAgent.js +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +39 -29
- package/Libraries/LogBox/Data/LogBoxLog.js +114 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +168 -53
- package/Libraries/LogBox/LogBox.js +29 -12
- package/Libraries/LogBox/LogBoxNotificationContainer.js +4 -0
- package/Libraries/LogBox/UI/LogBoxInspector.js +8 -70
- package/Libraries/LogBox/UI/LogBoxInspectorBody.js +87 -0
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +6 -42
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +58 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +5 -66
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +76 -0
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +8 -5
- package/Libraries/LogBox/UI/LogBoxNotification.js +20 -164
- package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +63 -0
- package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +67 -0
- package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +57 -0
- package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.mm +0 -2
- package/Libraries/NativeAnimation/RCTAnimationUtils.h +1 -0
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +5 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +5 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +12 -5
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
- package/Libraries/NativeComponent/TVViewConfig.js +1 -1
- package/Libraries/Network/RCTNetworkTask.mm +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -0
- package/Libraries/Network/React-RCTNetwork.podspec +2 -2
- package/Libraries/Network/XMLHttpRequest.js +5 -1
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
- package/Libraries/Pressability/Pressability.js +3 -51
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.h +0 -7
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +0 -64
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/AppContainer-prod.js +2 -1
- package/Libraries/ReactNative/AppContainer.js +2 -0
- package/Libraries/ReactNative/AppRegistry.d.ts +7 -0
- package/Libraries/ReactNative/AppRegistry.js +10 -4
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -21
- package/Libraries/ReactNative/FabricUIManager.js +0 -51
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
- package/Libraries/ReactNative/RendererImplementation.js +20 -2
- package/Libraries/ReactNative/UIManager.d.ts +0 -21
- package/Libraries/ReactNative/UIManagerProperties.js +0 -3
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +5 -341
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -8
- package/Libraries/ReactNative/renderApplication.js +3 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +862 -1553
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3166 -3510
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3512 -3866
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +829 -1552
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3320 -3680
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3669 -4038
- package/Libraries/Renderer/shims/ReactFabric.js +2 -2
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
- package/Libraries/Renderer/shims/ReactNative.js +2 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +24 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +2 -2
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/Settings/React-RCTSettings.podspec +2 -2
- package/Libraries/Share/Share.d.ts +16 -10
- package/Libraries/Share/Share.js +14 -15
- package/Libraries/StyleSheet/StyleSheet.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheet.js +3 -10
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +21 -21
- package/Libraries/StyleSheet/StyleSheetTypes.js +24 -18
- package/Libraries/StyleSheet/flattenStyle.js +1 -0
- package/Libraries/StyleSheet/processFilter.js +132 -0
- package/Libraries/StyleSheet/processTransform.js +18 -3
- package/Libraries/Text/Text/NSTextStorage+FontScaling.m +5 -0
- package/Libraries/Text/Text.js +150 -129
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +13 -0
- package/Libraries/Text/TextInput/RCTBaseTextInputView.h +0 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +61 -6
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm +0 -1
- package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.mm +2 -2
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +13 -0
- package/Libraries/Text/TextNativeComponent.js +5 -4
- package/Libraries/Text/TextProps.js +6 -6
- package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
- package/Libraries/Types/CodegenTypes.js +3 -0
- package/Libraries/Utilities/DevLoadingView.js +66 -0
- package/Libraries/Utilities/Dimensions.js +1 -0
- package/Libraries/Utilities/HMRClient.js +36 -8
- package/Libraries/Utilities/HMRClientProdShim.js +1 -0
- package/Libraries/Utilities/Platform.android.js +5 -5
- package/Libraries/Utilities/Platform.d.ts +1 -1
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/RCTLog.js +1 -0
- package/Libraries/Utilities/ReactNativeTestTools.js +12 -24
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
- package/Libraries/Vibration/React-RCTVibration.podspec +2 -2
- package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.m +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -0
- package/README-core.md +5 -5
- package/README.md +76 -41
- package/React/Base/RCTBridge+Inspector.h +1 -1
- package/React/Base/RCTBridge.h +0 -4
- package/React/Base/RCTBridge.mm +59 -30
- package/React/Base/RCTBridgeModule.h +7 -6
- package/React/Base/RCTBridgeModuleDecorator.m +1 -1
- package/React/Base/RCTBundleManager.h +2 -0
- package/React/Base/RCTBundleURLProvider.mm +8 -0
- package/React/Base/RCTCallInvoker.h +27 -0
- package/React/Base/RCTCallInvoker.mm +28 -0
- package/React/Base/RCTCallInvokerModule.h +17 -0
- package/React/Base/RCTConvert.h +18 -0
- package/React/Base/RCTConvert.mm +67 -6
- package/React/Base/RCTDefines.h +0 -9
- package/React/Base/RCTJavaScriptLoader.mm +4 -2
- package/React/Base/RCTModuleData.h +10 -8
- package/React/Base/RCTModuleData.mm +23 -17
- package/React/Base/RCTModuleRegistry.m +6 -1
- package/React/Base/RCTRootView.h +1 -1
- package/React/Base/RCTRootView.m +0 -9
- package/React/Base/RCTRuntimeExecutorModule.h +4 -3
- package/React/Base/RCTUtils.h +4 -4
- package/React/Base/RCTUtils.m +4 -4
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +3 -4
- package/React/CoreModules/RCTAccessibilityManager+Internal.h +1 -1
- package/React/CoreModules/RCTAppearance.h +1 -0
- package/React/CoreModules/RCTAppearance.mm +20 -1
- package/React/CoreModules/RCTDevSettings.mm +12 -0
- package/React/CoreModules/RCTDeviceInfo.mm +4 -4
- package/React/CoreModules/RCTEventDispatcher.mm +15 -0
- package/React/CoreModules/RCTPerfMonitor.mm +1 -2
- package/React/CoreModules/RCTPlatform.mm +11 -11
- package/React/CoreModules/RCTRedBox.h +0 -18
- package/React/CoreModules/RCTRedBox.mm +1 -38
- package/React/CoreModules/React-CoreModules.podspec +2 -2
- package/React/CxxBridge/NSDataBigString.mm +1 -1
- package/React/CxxBridge/RCTCxxBridge.mm +19 -8
- package/React/CxxBridge/RCTObjcExecutor.mm +1 -1
- package/React/CxxModule/RCTCxxModule.h +1 -1
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +8 -3
- package/React/DevSupport/RCTPausedInDebuggerOverlayController.h +15 -0
- package/React/DevSupport/RCTPausedInDebuggerOverlayController.mm +134 -0
- package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +28 -8
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +4 -5
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +1 -2
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +1 -8
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +0 -5
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -5
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +63 -38
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +42 -14
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +80 -45
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +45 -3
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +2 -2
- package/React/Fabric/Mounting/RCTMountingManager.mm +1 -1
- package/React/Fabric/RCTImageResponseDelegate.h +5 -2
- package/React/Fabric/RCTImageResponseObserverProxy.h +3 -3
- package/React/Fabric/RCTImageResponseObserverProxy.mm +5 -4
- package/React/Fabric/RCTScheduler.h +0 -2
- package/React/Fabric/RCTScheduler.mm +7 -4
- package/React/Fabric/RCTSurfacePresenter.mm +1 -22
- package/React/Fabric/Utils/RCTColorSpaceUtils.h +16 -0
- package/React/Fabric/Utils/RCTColorSpaceUtils.mm +23 -0
- package/React/I18n/strings/es.lproj/fbt_language_pack.bin +0 -0
- package/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm +1 -1
- package/React/Modules/RCTUIManager.m +0 -18
- package/React/Modules/RCTUIManagerUtils.m +2 -1
- package/React/React-RCTFabric.podspec +8 -3
- package/React/Resources/PrivacyInfo.xcprivacy +29 -0
- package/React/Tests/Text/RCTParagraphComponentViewTests.mm +45 -45
- package/React/Views/RCTActivityIndicatorViewManager.m +0 -3
- package/React/Views/RCTBorderDrawing.m +0 -10
- package/React/Views/RCTFont.mm +3 -1
- package/React/Views/RCTModalHostViewManager.h +0 -6
- package/React/Views/RCTModalHostViewManager.m +0 -17
- package/React/Views/RCTViewManager.m +143 -3
- package/React/Views/ScrollView/RCTScrollView.m +4 -5
- package/React/Views/ScrollView/RCTScrollViewManager.m +1 -2
- package/React-Core.podspec +3 -1
- package/ReactAndroid/api/ReactAndroid.api +1063 -696
- package/ReactAndroid/build.gradle.kts +48 -9
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +11 -6
- package/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp +17 -7
- package/ReactAndroid/gradle.properties +1 -4
- package/ReactAndroid/hermes-engine/build.gradle.kts +36 -17
- package/ReactAndroid/publish.gradle +8 -14
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/NoopPrinter.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/Printer.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/PrinterHolder.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/RuntimeConfig.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/hermes/unicode/AndroidUnicodeUtils.kt +77 -0
- package/ReactAndroid/src/main/java/com/facebook/react/CompositeReactPackageTurboModuleManagerDelegate.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java +43 -35
- package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +31 -21
- package/ReactAndroid/src/main/java/com/facebook/react/LazyReactPackage.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/MemoryPressureRouter.java +8 -12
- package/ReactAndroid/src/main/java/com/facebook/react/NativeModuleRegistryBuilder.java +6 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +40 -26
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +26 -31
- package/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +100 -14
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +18 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +22 -5
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.java +20 -39
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +11 -9
- package/ReactAndroid/src/main/java/com/facebook/react/ViewManagerOnDemandReactPackage.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.java +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt +35 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +20 -13
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseActivityEventListener.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseJavaModule.java +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.java +292 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Callback.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt +137 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +28 -22
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ColorPropConverter.java +88 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Dynamic.kt +32 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSExceptionHandler.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSInstance.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaOnlyArray.java +14 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaOnlyMap.java +15 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/LifecycleEventListener.kt +46 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressureListener.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleSpec.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArrayInterface.kt +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeMap.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModule.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NotThreadSafeBridgeIdleDebugListener.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/OnBatchCompleteListener.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.java +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +69 -154
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContextBaseJavaModule.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactInstanceManagerInspectorTarget.java +59 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMethod.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactModuleWithSpec.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.kt +40 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMap.kt +46 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMapKeySetIterator.kt +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.kt +190 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableType.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/SoftAssertions.kt +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Systrace.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManagerListener.kt +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UiThreadUtil.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UnexpectedNativeTypeException.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WindowFocusChangeListener.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableArray.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableMap.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeArray.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeMap.kt +69 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/common/ClassFinder.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/DebugServerException.java +9 -4
- package/ReactAndroid/src/main/java/com/facebook/react/common/JavascriptException.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/ReactConstants.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/SingleThreadAsserter.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/StandardCharsets.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/SystemClock.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/MapBuffer.kt +19 -1
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.kt +43 -22
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/WritableMapBuffer.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -29
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultComponentsRegistry.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +49 -3
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactActivityDelegate.kt +0 -8
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHost.kt +21 -7
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultTurboModuleManagerDelegate.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +10 -5
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.java +22 -21
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DebugOverlayController.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt +117 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt +114 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +38 -21
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +41 -20
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportSoLoader.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.kt +39 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FpsView.kt +101 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialog.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.kt +73 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxModule.kt +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PausedInDebuggerOverlayDialogManager.java +75 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.java +5 -6
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReleaseDevSupportManager.java +214 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java +35 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/WindowOverlayCompat.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/BundleLoadCallback.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevBundleDownloadListener.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevLoadingViewManager.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevOptionHandler.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSplitBundleCallback.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.kt +127 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/ErrorCustomizer.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/ErrorType.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/PackagerStatusCallback.kt +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/PausedInDebuggerOverlayManager.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.kt +40 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/StackFrame.kt +44 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.kt +72 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/BindingImpl.kt +113 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/ComponentFactory.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/CoreComponentsRegistry.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricComponents.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricSoLoader.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +71 -41
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java +18 -7
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/GuardedFrameCallback.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/StateWrapperImpl.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/SynchronousEvent.kt +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventBeatManager.java +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.java +16 -7
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java +4 -7
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/internal/interop/InteropUiBlockListener.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/interop/UIBlock.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/interop/UIBlockViewResolver.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/LayoutMetricsConversions.kt +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +53 -33
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +42 -28
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/BatchMountItem.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchCommandMountItem.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchIntCommandMountItem.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/FabricNameComponentMapping.kt +45 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java +49 -33
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItem.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItemFactory.kt +70 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java +2 -5
- package/ReactAndroid/src/main/java/com/facebook/react/interfaces/exceptionmanager/ReactJsExceptionHandler.kt +34 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/AndroidChoreographerProvider.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/ChoreographerProvider.kt +32 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +87 -15
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +156 -36
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +32 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +32 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +175 -43
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +32 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/NativeModuleSoLoader.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleInteropUtils.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManagerDelegate.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModulePerfLogger.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/interfaces/TurboModuleRegistry.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/HeadlessJsTaskContext.java +5 -13
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/LinearCountingRetryPolicy.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/NoRetryPolicy.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/ReactModule.kt +42 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/ReactModuleList.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/model/ReactModuleInfo.kt +56 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/model/ReactModuleInfoProvider.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/AccessibilityInfoModule.kt +212 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt +100 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appregistry/AppRegistry.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt +97 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageStoreManager.kt +84 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/common/ModuleDataCleaner.kt +46 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ChoreographerCompat.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/TimingModule.java +21 -56
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.kt +79 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt +158 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/FpsDebugFrameCallback.kt +172 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/SourceCodeModule.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt +46 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +85 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.kt +44 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devtoolssettings/DevToolsSettingsManagerModule.kt +40 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java +67 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.kt +43 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.kt +101 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +305 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java +6 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientFactory.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/share/ShareModule.kt +66 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/sound/SoundManagerModule.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt +185 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/ToastModule.kt +80 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/VibrationModule.kt +64 -0
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/FileIoHandler.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/NotificationOnlyHandler.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/RequestOnlyHandler.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/NativeModulePerfLogger.kt +48 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +31 -57
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java +7 -15
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java +39 -10
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactStateTracker.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java +39 -29
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSCInstance.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSRuntimeFactory.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSTimerExecutor.kt +39 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +223 -139
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostInspectorTarget.kt +57 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +109 -94
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.kt +183 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/cxxreactpackage/CxxReactPackage.kt +3 -14
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Executors.java +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java +25 -492
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainPackageConfig.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +62 -49
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/CallInvokerHolderImpl.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/NativeMethodCallInvokerHolderImpl.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/BindingsInstallerHolder.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModuleWithJSIBindings.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +64 -13
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerInterface.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +102 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt +329 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FloatUtil.kt +32 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/GuardedFrameCallback.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/IViewGroupManager.java +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/IllegalViewOperationException.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +127 -15
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LengthPercentage.kt +73 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.kt +496 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MeasureSpecAssertions.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeKind.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +3 -87
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NoSuchNativeViewException.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PixelUtil.kt +58 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.kt +50 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingViewGroupHelper.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java +12 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRootViewTagGenerator.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +18 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +28 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactStylesDiffMap.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactYogaConfigProvider.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootView.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewManager.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewUtil.kt +45 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/SimpleViewManager.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/Spacing.kt +203 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java +96 -8
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.java +76 -11
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt +47 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +0 -30
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java +10 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -47
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java +3 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +8 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +0 -59
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewDefaults.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupDrawingOrderHelper.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewHierarchyDumper.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerDelegate.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt +305 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/YogaNodePool.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/ReactProp.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/ReactPropGroup.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/UIManagerType.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +79 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/BoxShadowDrawable.kt +102 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CSSBackgroundDrawable.java +1395 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java +21 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.java +36 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/NativeGestureUtil.kt +44 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.java +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTModernEventEmitter.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/ReactEventEmitter.java +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/SynchronousEventReceiver.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.kt +207 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchesHelper.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +32 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +146 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/ComputedBorderRadius.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/util/ExceptionDataHelper.kt +36 -0
- package/ReactAndroid/src/main/java/com/facebook/react/util/JSStackTrace.kt +67 -0
- package/ReactAndroid/src/main/java/com/facebook/react/util/RCTLog.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.kt +108 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ContextUtils.kt +43 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewUtils.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlay.kt +86 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager.kt +151 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/TraceUpdate.kt +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerClosedEvent.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.kt +41 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.kt +44 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/GlobalImageLoadListener.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.kt +156 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMode.kt +66 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactCallerContextFactory.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageDownloadListener.kt +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.java +16 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +32 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ScaleTypeStartInside.kt +41 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt +73 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt +89 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.kt +81 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ModalHostHelper.kt +62 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ModalHostShadowNode.kt +34 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt +149 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +554 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarShadowNode.kt +59 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java +10 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerView.java +15 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +76 -46
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +80 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewAccessibilityDelegate.java +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewCommandHelper.java +8 -8
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +570 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.kt +174 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchEvent.kt +35 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/DefaultStyleValuesUtil.kt +53 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +7 -196
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +61 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +27 -56
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +5 -22
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +328 -133
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLetterSpacingSpan.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.kt +69 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt +79 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactAbsoluteSizeSpan.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundColorSpan.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactClickableSpan.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactForegroundColorSpan.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactSpan.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactStrikethroughSpan.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactTagSpan.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactUnderlineSpan.kt +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/SetSpanOperation.kt +58 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ShadowStyleSpan.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TextInlineImageSpan.kt +58 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TextInlineViewPlaceholderSpan.kt +52 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +14 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +13 -41
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/ReactUnimplementedView.kt +37 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.kt +35 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/MeasureUtil.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactClippingViewManager.java +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +6 -1422
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundManager.java +66 -9
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +124 -205
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +28 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ViewGroupClickEvent.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.kt +85 -0
- package/ReactAndroid/src/main/java/com/facebook/systrace/SystraceMessage.kt +88 -0
- package/ReactAndroid/src/main/java/com/facebook/systrace/TraceListener.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNative.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +5 -0
- package/ReactAndroid/src/main/jni/CMakeLists.txt +11 -6
- package/ReactAndroid/src/main/jni/first-party/fb/include/fb/log.h +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedGlobalRef.h +7 -6
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedLocalRef.h +7 -5
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.h +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.cpp +31 -12
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.cpp +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.h +2 -2
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/common.cpp +8 -8
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/corefunctions.cpp +5 -5
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/yogajni.cpp +2 -2
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.cpp +3 -14
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.h +1 -3
- package/ReactAndroid/src/main/jni/react/fabric/AsyncEventBeat.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +20 -35
- package/ReactAndroid/src/main/jni/react/fabric/Binding.h +0 -1
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp +19 -1
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h +1 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +26 -14
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h +1 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +211 -43
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +44 -8
- package/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +15 -2
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +11 -1
- package/ReactAndroid/src/main/jni/react/jni/JExecutor.cpp +18 -0
- package/ReactAndroid/src/main/jni/react/jni/JExecutor.h +21 -0
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/jni/ReactInstanceManagerInspectorTarget.cpp +122 -0
- package/ReactAndroid/src/main/jni/react/jni/ReactInstanceManagerInspectorTarget.h +76 -0
- package/ReactAndroid/src/main/jni/react/jni/SafeReleaseJniRef.h +73 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/CMakeLists.txt +5 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp +9 -4
- package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp +13 -1
- package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h +2 -0
- package/ReactAndroid/src/main/jni/react/reactperflogger/CMakeLists.txt +3 -4
- package/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/JNativeModulePerfLogger.h +1 -1
- package/ReactAndroid/src/main/jni/react/runtime/cxxreactpackage/CMakeLists.txt +4 -3
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactExceptionManager.cpp +44 -4
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactExceptionManager.h +2 -2
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +104 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +78 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactInstance.cpp +29 -18
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactInstance.h +9 -2
- package/ReactAndroid/src/main/jni/react/runtime/jni/OnLoad.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/CMakeLists.txt +1 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/BindingsInstallerHolder.cpp +22 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/BindingsInstallerHolder.h +30 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +42 -30
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h +8 -6
- package/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverBinding.cpp +59 -0
- package/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverBinding.h +29 -0
- package/ReactAndroid/src/main/jni/react/uimanager/OnLoad.cpp +4 -4
- package/ReactAndroid/src/main/jni/react/uimanager/UIConstantsProviderBinding.cpp +66 -0
- package/ReactAndroid/src/main/jni/react/uimanager/UIConstantsProviderBinding.h +83 -0
- package/ReactAndroid/src/main/res/devsupport/drawable/paused_in_debugger_background.xml +27 -0
- package/ReactAndroid/src/main/res/devsupport/drawable/ripple_effect.xml +10 -0
- package/ReactAndroid/src/main/res/devsupport/drawable-hdpi/ic_resume.png +0 -0
- package/ReactAndroid/src/main/res/devsupport/drawable-mdpi/ic_resume.png +0 -0
- package/ReactAndroid/src/main/res/devsupport/drawable-xhdpi/ic_resume.png +0 -0
- package/ReactAndroid/src/main/res/devsupport/drawable-xxhdpi/ic_resume.png +0 -0
- package/ReactAndroid/src/main/res/devsupport/drawable-xxxhdpi/ic_resume.png +0 -0
- package/ReactAndroid/src/main/res/devsupport/layout/paused_in_debugger_view.xml +35 -0
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +6 -0
- package/ReactAndroid/src/main/res/views/uimanager/values-es/strings.xml +3 -3
- package/ReactCommon/React-Fabric.podspec +50 -100
- package/ReactCommon/React-FabricComponents.podspec +205 -0
- package/ReactCommon/React-FabricImage.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +2 -1
- package/ReactCommon/callinvoker/ReactCommon/CallInvoker.h +21 -3
- package/ReactCommon/cxxreact/CMakeLists.txt +4 -4
- package/ReactCommon/cxxreact/ErrorUtils.h +2 -0
- package/ReactCommon/cxxreact/Instance.cpp +69 -30
- package/ReactCommon/cxxreact/Instance.h +7 -7
- package/ReactCommon/cxxreact/JSExecutor.cpp +6 -10
- package/ReactCommon/cxxreact/JSExecutor.h +14 -11
- package/ReactCommon/cxxreact/MoveWrapper.h +1 -1
- package/ReactCommon/cxxreact/NativeToJsBridge.cpp +4 -4
- package/ReactCommon/cxxreact/PrivacyInfo.xcprivacy +21 -0
- package/ReactCommon/cxxreact/React-cxxreact.podspec +3 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/cxxreact/SharedProxyCxxModule.h +2 -0
- package/ReactCommon/cxxreact/SystraceSection.h +101 -4
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +14 -38
- package/ReactCommon/hermes/executor/HermesExecutorFactory.h +4 -10
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeAgentDelegate.cpp +44 -146
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeAgentDelegate.h +23 -11
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp +237 -0
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.h +75 -0
- package/ReactCommon/jsc/JSCRuntime.cpp +1 -2
- package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +40 -34
- package/ReactCommon/jserrorhandler/JsErrorHandler.h +21 -17
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +0 -1
- package/ReactCommon/jsi/React-jsi.podspec +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +14 -0
- package/ReactCommon/jsi/jsi/jsi-inl.h +1 -1
- package/ReactCommon/jsi/jsi/jsi.h +6 -1
- package/ReactCommon/jsi/jsi/test/testlib.cpp +32 -0
- package/ReactCommon/jsiexecutor/CMakeLists.txt +1 -1
- package/ReactCommon/jsinspector-modern/CONCEPTS.md +2 -2
- package/ReactCommon/jsinspector-modern/CdpJson.cpp +72 -0
- package/ReactCommon/jsinspector-modern/CdpJson.h +138 -0
- package/ReactCommon/jsinspector-modern/ConsoleMessage.cpp +40 -0
- package/ReactCommon/jsinspector-modern/ConsoleMessage.h +89 -0
- package/ReactCommon/jsinspector-modern/FallbackRuntimeAgentDelegate.cpp +9 -10
- package/ReactCommon/jsinspector-modern/FallbackRuntimeTargetDelegate.cpp +47 -0
- package/ReactCommon/jsinspector-modern/FallbackRuntimeTargetDelegate.h +47 -0
- package/ReactCommon/jsinspector-modern/ForwardingConsoleMethods.def +38 -0
- package/ReactCommon/jsinspector-modern/HostAgent.cpp +269 -0
- package/ReactCommon/jsinspector-modern/HostAgent.h +109 -0
- package/ReactCommon/jsinspector-modern/HostCommand.h +19 -0
- package/ReactCommon/jsinspector-modern/HostTarget.cpp +231 -0
- package/ReactCommon/jsinspector-modern/HostTarget.h +256 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +28 -30
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +14 -10
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +2 -1
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.h +3 -2
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +0 -1
- package/ReactCommon/jsinspector-modern/InspectorUtilities.h +8 -0
- package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +86 -6
- package/ReactCommon/jsinspector-modern/InstanceAgent.h +9 -2
- package/ReactCommon/jsinspector-modern/InstanceTarget.cpp +1 -1
- package/ReactCommon/jsinspector-modern/InstanceTarget.h +13 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
- package/ReactCommon/jsinspector-modern/ReactCdp.h +2 -2
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +16 -24
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +2 -3
- package/ReactCommon/jsinspector-modern/RuntimeAgentDelegate.h +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +8 -1
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +65 -12
- package/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp +486 -0
- package/ReactCommon/jsinspector-modern/SessionState.h +12 -0
- package/ReactCommon/jsinspector-modern/StackTrace.h +39 -0
- package/ReactCommon/jsinspector-modern/tests/ConsoleApiTest.cpp +851 -0
- package/ReactCommon/jsinspector-modern/tests/FollyDynamicMatchers.cpp +1 -1
- package/ReactCommon/jsinspector-modern/tests/FollyDynamicMatchers.h +28 -1
- package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +701 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +26 -5
- package/ReactCommon/jsinspector-modern/tests/InspectorPackagerConnectionTest.cpp +0 -1
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +266 -153
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.h +192 -0
- package/ReactCommon/jsinspector-modern/tests/ReactInstanceIntegrationTest.cpp +239 -0
- package/ReactCommon/jsinspector-modern/tests/ReactInstanceIntegrationTest.h +78 -0
- package/ReactCommon/jsinspector-modern/tests/ReactNativeMocks.cpp +94 -0
- package/ReactCommon/jsinspector-modern/tests/ReactNativeMocks.h +65 -0
- package/ReactCommon/jsinspector-modern/tests/engines/JsiIntegrationTestGenericEngineAdapter.cpp +13 -15
- package/ReactCommon/jsinspector-modern/tests/engines/JsiIntegrationTestGenericEngineAdapter.h +8 -7
- package/ReactCommon/jsinspector-modern/tests/engines/JsiIntegrationTestHermesEngineAdapter.cpp +18 -23
- package/ReactCommon/jsinspector-modern/tests/engines/JsiIntegrationTestHermesEngineAdapter.h +10 -9
- package/ReactCommon/jsinspector-modern/tests/prelude.js.h +636 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +49 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +42 -0
- package/ReactCommon/react/bridging/Base.h +3 -3
- package/ReactCommon/react/bridging/Bridging.h +1 -0
- package/ReactCommon/react/bridging/CallbackWrapper.h +6 -7
- package/ReactCommon/react/bridging/EventEmitter.h +134 -0
- package/ReactCommon/react/bridging/Function.h +22 -8
- package/ReactCommon/react/bridging/LongLivedObject.cpp +18 -4
- package/ReactCommon/react/bridging/LongLivedObject.h +4 -2
- package/ReactCommon/react/bridging/Promise.h +5 -3
- package/ReactCommon/react/bridging/tests/BridgingTest.cpp +112 -2
- package/ReactCommon/react/bridging/tests/BridgingTest.h +6 -6
- package/ReactCommon/react/bridging/tests/ClassTest.cpp +2 -4
- package/ReactCommon/react/debug/react_native_assert.h +2 -0
- package/ReactCommon/react/debug/react_native_expect.h +2 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +63 -15
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +86 -22
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +256 -40
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +40 -16
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +56 -8
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +20 -8
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp +15 -16
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp +7 -10
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +21 -7
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +9 -5
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h +5 -2
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp +3 -1
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +2 -4
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +17 -12
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h +6 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTRuntimeExecutor.h +2 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +4 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +51 -34
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleWithJSIBindings.h +20 -0
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +27 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +38 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.h +18 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +51 -0
- package/ReactCommon/react/nativemodule/dom/CMakeLists.txt +28 -0
- package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +355 -0
- package/ReactCommon/react/nativemodule/dom/NativeDOM.h +110 -0
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +50 -0
- package/ReactCommon/react/nativemodule/featureflags/CMakeLists.txt +26 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +77 -15
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +39 -10
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +48 -0
- package/ReactCommon/react/nativemodule/idlecallbacks/CMakeLists.txt +26 -0
- package/ReactCommon/react/nativemodule/idlecallbacks/NativeIdleCallbacks.cpp +168 -0
- package/ReactCommon/react/nativemodule/idlecallbacks/NativeIdleCallbacks.h +42 -0
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +49 -0
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +89 -0
- package/ReactCommon/react/nativemodule/microtasks/CMakeLists.txt +25 -0
- package/ReactCommon/react/nativemodule/microtasks/NativeMicrotasks.cpp +31 -0
- package/ReactCommon/react/nativemodule/microtasks/NativeMicrotasks.h +27 -0
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +48 -0
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +170 -0
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +94 -0
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
- package/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt +2 -1
- package/ReactCommon/react/nativemodule/samples/platform/android/NativeSampleTurboModuleSpec.java +64 -50
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleJSIBindings.cpp +31 -0
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleJSIBindings.h +32 -0
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp +41 -39
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h +2 -1
- package/ReactCommon/react/nativemodule/samples/platform/android/SampleTurboModule.java +21 -7
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h +2 -2
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm +14 -14
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm +21 -8
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModulePlugin.h +37 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +167 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.h +52 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformanceObserver.cpp +123 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformanceObserver.h +91 -0
- package/ReactCommon/react/performance/timeline/BoundedConsumableBuffer.h +247 -0
- package/ReactCommon/react/performance/timeline/CMakeLists.txt +22 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +296 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.h +193 -0
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +56 -0
- package/ReactCommon/react/performance/timeline/tests/BoundedConsumableBufferTest.cpp +219 -0
- package/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp +368 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +7 -5
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +2 -1
- package/ReactCommon/react/renderer/animations/conversions.h +2 -0
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +8 -0
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +3 -0
- package/ReactCommon/react/renderer/attributedstring/conversions.h +57 -166
- package/ReactCommon/react/renderer/attributedstring/primitives.h +7 -0
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h +1 -1
- package/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.cpp +27 -0
- package/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h +6 -15
- package/ReactCommon/react/renderer/components/image/ImageEventEmitter.cpp +35 -6
- package/ReactCommon/react/renderer/components/image/ImageEventEmitter.h +4 -3
- package/ReactCommon/react/renderer/components/image/ImageProps.h +2 -0
- package/ReactCommon/react/renderer/components/image/ImageState.h +1 -4
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp +4 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h +1 -1
- package/ReactCommon/react/renderer/components/modal/CMakeLists.txt +0 -1
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +0 -6
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +2 -0
- package/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.cpp +29 -0
- package/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h +31 -0
- package/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp +132 -0
- package/ReactCommon/react/renderer/components/rncore/EventEmitters.h +169 -0
- package/ReactCommon/react/renderer/components/rncore/Props.cpp +155 -0
- package/ReactCommon/react/renderer/components/rncore/Props.h +396 -0
- package/ReactCommon/react/renderer/components/rncore/RCTComponentViewHelpers.h +293 -0
- package/ReactCommon/react/renderer/components/rncore/ShadowNodes.cpp +24 -0
- package/ReactCommon/react/renderer/components/rncore/ShadowNodes.h +109 -0
- package/ReactCommon/react/renderer/components/rncore/States.cpp +16 -0
- package/ReactCommon/react/renderer/components/rncore/States.h +113 -0
- package/ReactCommon/react/renderer/components/root/RootShadowNode.cpp +1 -1
- package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h +0 -1
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.cpp +21 -16
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +16 -17
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp +32 -6
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +3 -1
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp +8 -3
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h +0 -5
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +12 -0
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +34 -21
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +5 -1
- package/ReactCommon/react/renderer/components/text/ParagraphState.cpp +1 -1
- package/ReactCommon/react/renderer/components/text/ParagraphState.h +7 -6
- package/ReactCommon/react/renderer/components/text/conversions.h +2 -9
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputProps.cpp +186 -0
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputProps.h +68 -0
- package/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +3 -6
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +2 -116
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputProps.h +2 -22
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +20 -2
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +11 -5
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputState.cpp +4 -15
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp +23 -54
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h +28 -34
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputProps.cpp +1 -77
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputProps.h +3 -33
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.cpp +20 -2
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.h +4 -0
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +98 -24
- package/ReactCommon/react/renderer/components/view/BaseViewProps.h +13 -1
- package/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h +20 -3
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.cpp +14 -64
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +0 -2
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +6 -3
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +6 -1
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +21 -14
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/view/conversions.h +278 -50
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +0 -4
- package/ReactCommon/react/renderer/components/view/platform/cxx/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +0 -4
- package/ReactCommon/react/renderer/components/view/primitives.h +40 -2
- package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +2 -2
- package/ReactCommon/react/renderer/consistency/CMakeLists.txt +20 -0
- package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +45 -0
- package/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h +54 -0
- package/ReactCommon/react/renderer/consistency/ShadowTreeRevisionConsistencyManager.cpp +14 -0
- package/ReactCommon/react/renderer/consistency/ShadowTreeRevisionConsistencyManager.h +24 -0
- package/ReactCommon/react/renderer/core/CMakeLists.txt +2 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.cpp +3 -2
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +3 -3
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +1 -0
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +3 -2
- package/ReactCommon/react/renderer/core/ConcreteState.h +17 -15
- package/ReactCommon/react/renderer/core/DynamicPropsUtilities.cpp +6 -1
- package/ReactCommon/react/renderer/core/DynamicPropsUtilities.h +29 -2
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +25 -38
- package/ReactCommon/react/renderer/core/EventDispatcher.h +19 -14
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +6 -13
- package/ReactCommon/react/renderer/core/EventEmitter.h +14 -4
- package/ReactCommon/react/renderer/core/EventLogger.h +1 -3
- package/ReactCommon/react/renderer/core/EventQueue.cpp +25 -2
- package/ReactCommon/react/renderer/core/EventQueue.h +14 -4
- package/ReactCommon/react/renderer/core/EventQueueProcessor.cpp +5 -3
- package/ReactCommon/react/renderer/core/EventQueueProcessor.h +3 -1
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +27 -76
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.h +7 -1
- package/ReactCommon/react/renderer/core/PropsMacros.h +1 -1
- package/ReactCommon/react/renderer/core/RawProps.cpp +1 -1
- package/ReactCommon/react/renderer/core/RawProps.h +1 -1
- package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +1 -1
- package/ReactCommon/react/renderer/core/RawPropsParser.cpp +1 -1
- package/ReactCommon/react/renderer/core/RawPropsParser.h +1 -1
- package/ReactCommon/react/renderer/core/ReactPrimitives.h +0 -2
- package/ReactCommon/react/renderer/core/ReactRootViewTagGenerator.cpp +22 -0
- package/ReactCommon/react/renderer/core/ReactRootViewTagGenerator.h +16 -0
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +61 -16
- package/ReactCommon/react/renderer/core/ShadowNode.h +61 -4
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.cpp +2 -4
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +3 -4
- package/ReactCommon/react/renderer/core/ShadowNodeFragment.cpp +0 -11
- package/ReactCommon/react/renderer/core/ShadowNodeFragment.h +2 -24
- package/ReactCommon/react/renderer/core/ShadowNodeTraits.h +5 -2
- package/ReactCommon/react/renderer/core/State.h +0 -1
- package/ReactCommon/react/renderer/core/propsConversions.h +6 -6
- package/ReactCommon/react/renderer/core/tests/DynamicPropsUtilitiesTest.cpp +19 -5
- package/ReactCommon/react/renderer/core/tests/EventQueueProcessorTest.cpp +12 -1
- package/ReactCommon/react/renderer/core/tests/FindNodeAtPointTest.cpp +140 -0
- package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +155 -106
- package/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp +9 -12
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +118 -8
- package/ReactCommon/react/renderer/core/tests/TestComponent.h +2 -7
- package/ReactCommon/react/renderer/css/CSSAngleUnit.h +66 -0
- package/ReactCommon/react/renderer/css/CSSColorUtils.h +373 -0
- package/ReactCommon/react/renderer/css/CSSDeclaredStyle.h +43 -13
- package/ReactCommon/react/renderer/css/CSSKeywords.h +9 -13
- package/ReactCommon/react/renderer/css/CSSLengthUnit.h +1 -1
- package/ReactCommon/react/renderer/css/CSSProperties.h +280 -80
- package/ReactCommon/react/renderer/css/CSSSyntaxParser.h +322 -0
- package/ReactCommon/react/renderer/css/CSSToken.h +84 -0
- package/ReactCommon/react/renderer/css/CSSTokenizer.h +98 -86
- package/ReactCommon/react/renderer/css/CSSValue.h +12 -197
- package/ReactCommon/react/renderer/css/CSSValueParser.h +317 -0
- package/ReactCommon/react/renderer/css/CSSValueVariant.h +267 -0
- package/ReactCommon/react/renderer/css/tests/CSSDeclaredStyleTest.cpp +22 -9
- package/ReactCommon/react/renderer/css/tests/CSSSyntaxParserTest.cpp +269 -0
- package/ReactCommon/react/renderer/css/tests/CSSTokenizerTest.cpp +150 -82
- package/ReactCommon/react/renderer/css/tests/CSSValueParserTest.cpp +419 -0
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.h +8 -8
- package/ReactCommon/react/renderer/debug/flags.h +7 -9
- package/ReactCommon/react/renderer/dom/CMakeLists.txt +26 -0
- package/ReactCommon/react/renderer/dom/DOM.cpp +574 -0
- package/ReactCommon/react/renderer/dom/DOM.h +123 -0
- package/ReactCommon/react/renderer/element/ComponentBuilder.cpp +1 -1
- package/ReactCommon/react/renderer/element/Element.h +4 -4
- package/ReactCommon/react/renderer/graphics/ColorComponents.cpp +23 -0
- package/ReactCommon/react/renderer/graphics/ColorComponents.h +6 -0
- package/ReactCommon/react/renderer/graphics/Filter.h +61 -0
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +2 -1
- package/ReactCommon/react/renderer/graphics/Transform.cpp +96 -32
- package/ReactCommon/react/renderer/graphics/Transform.h +8 -5
- package/ReactCommon/react/renderer/graphics/ValueUnit.h +11 -0
- package/ReactCommon/react/renderer/graphics/fromRawValueShared.h +18 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +6 -0
- package/ReactCommon/react/renderer/graphics/tests/TransformTest.cpp +44 -0
- package/ReactCommon/react/renderer/imagemanager/ImageResponse.cpp +7 -0
- package/ReactCommon/react/renderer/imagemanager/ImageResponse.h +9 -0
- package/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h +3 -2
- package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp +10 -5
- package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h +11 -2
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTImageManager.mm +4 -3
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +3 -2
- package/ReactCommon/react/renderer/imagemanager/primitives.h +7 -0
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +8 -0
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +3 -0
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +9 -0
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +1 -1
- package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +21 -0
- package/ReactCommon/react/renderer/mounting/CMakeLists.txt +3 -1
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +55 -99
- package/ReactCommon/react/renderer/mounting/Differentiator.h +2 -9
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +38 -25
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +6 -4
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +81 -84
- package/ReactCommon/react/renderer/mounting/ShadowView.cpp +0 -10
- package/ReactCommon/react/renderer/mounting/ShadowView.h +9 -25
- package/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp +313 -0
- package/ReactCommon/react/renderer/mounting/stubs/StubViewTree.h +54 -0
- package/ReactCommon/react/renderer/mounting/stubs/stubs.cpp +106 -0
- package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/tests/OrderIndexTest.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +3 -5
- package/ReactCommon/react/renderer/mounting/tests/StackingContextTest.cpp +174 -3
- package/ReactCommon/react/renderer/mounting/tests/StateReconciliationTest.cpp +726 -98
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +69 -0
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.h +19 -0
- package/ReactCommon/react/renderer/observers/events/CMakeLists.txt +25 -0
- package/ReactCommon/react/renderer/observers/events/EventPerformanceLogger.cpp +200 -0
- package/ReactCommon/react/renderer/observers/events/EventPerformanceLogger.h +63 -0
- package/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp +7 -1
- package/ReactCommon/react/renderer/observers/mutation/MutationObserverManager.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +20 -5
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +27 -9
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +5 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.cpp +3 -3
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp +67 -24
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.h +27 -10
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +131 -61
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +29 -12
- package/ReactCommon/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -4
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +111 -12
- package/ReactCommon/react/renderer/runtimescheduler/tests/SchedulerPriorityTest.cpp +2 -2
- package/ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.cpp +1 -2
- package/ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.h +2 -0
- package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +3 -0
- package/ReactCommon/react/renderer/scheduler/InspectorData.h +2 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +27 -14
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +5 -0
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +1 -2
- package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +0 -6
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +1 -1
- package/ReactCommon/react/renderer/scheduler/SurfaceManager.cpp +1 -1
- package/ReactCommon/react/renderer/scheduler/SurfaceManager.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/TextLayoutContext.h +4 -4
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +12 -150
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +0 -16
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +8 -9
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h +10 -7
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +47 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.h +3 -9
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +83 -87
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.h +1 -7
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm +3 -24
- package/ReactCommon/react/renderer/uimanager/CMakeLists.txt +7 -2
- package/ReactCommon/react/renderer/uimanager/SurfaceRegistryBinding.cpp +1 -1
- package/ReactCommon/react/renderer/uimanager/SurfaceRegistryBinding.h +1 -0
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +86 -170
- package/ReactCommon/react/renderer/uimanager/UIManager.h +18 -14
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +117 -695
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +1 -0
- package/ReactCommon/react/renderer/uimanager/consistency/CMakeLists.txt +26 -0
- package/ReactCommon/react/renderer/uimanager/consistency/LatestShadowTreeRevisionProvider.cpp +29 -0
- package/ReactCommon/react/renderer/uimanager/consistency/LatestShadowTreeRevisionProvider.h +35 -0
- package/ReactCommon/react/renderer/uimanager/consistency/LazyShadowTreeRevisionConsistencyManager.cpp +90 -0
- package/ReactCommon/react/renderer/uimanager/consistency/LazyShadowTreeRevisionConsistencyManager.h +54 -0
- package/ReactCommon/react/renderer/uimanager/consistency/ShadowTreeRevisionProvider.h +27 -0
- package/ReactCommon/react/renderer/uimanager/consistency/tests/LazyShadowTreeRevisionConsistencyManagerTest.cpp +395 -0
- package/ReactCommon/react/renderer/uimanager/primitives.h +9 -77
- package/ReactCommon/react/runtime/BridgelessNativeMethodCallInvoker.cpp +2 -2
- package/ReactCommon/react/runtime/BridgelessNativeMethodCallInvoker.h +4 -2
- package/ReactCommon/react/runtime/BufferedRuntimeExecutor.cpp +1 -1
- package/ReactCommon/react/runtime/BufferedRuntimeExecutor.h +2 -1
- package/ReactCommon/react/runtime/JSRuntimeFactory.cpp +6 -10
- package/ReactCommon/react/runtime/JSRuntimeFactory.h +16 -8
- package/ReactCommon/react/runtime/ReactInstance.cpp +105 -73
- package/ReactCommon/react/runtime/ReactInstance.h +7 -15
- package/ReactCommon/react/runtime/TimerManager.cpp +81 -105
- package/ReactCommon/react/runtime/TimerManager.h +11 -34
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +17 -47
- package/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.cpp +4 -4
- package/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h +2 -4
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +0 -6
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +55 -32
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +1 -2
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +18 -42
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTLegacyUIManagerConstantsProvider.mm +1 -2
- package/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +10 -13
- package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.mm +1 -1
- package/ReactCommon/react/test_utils/shadowTreeGeneration.h +3 -3
- package/ReactCommon/react/utils/ContextContainer.h +1 -1
- package/ReactCommon/react/utils/CoreFeatures.cpp +0 -4
- package/ReactCommon/react/utils/CoreFeatures.h +0 -16
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
- package/ReactCommon/react/utils/OnScopeExit.h +36 -0
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -0
- package/ReactCommon/react/utils/fnv1a.h +14 -1
- package/ReactCommon/react/utils/jsi-utils.cpp +39 -0
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -0
- package/ReactCommon/reactperflogger/reactperflogger/HermesPerfettoDataSource.cpp +120 -0
- package/ReactCommon/reactperflogger/reactperflogger/HermesPerfettoDataSource.h +34 -0
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfetto.cpp +56 -0
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfetto.h +22 -0
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoCategories.cpp +14 -0
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoCategories.h +18 -0
- package/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +0 -40
- package/ReactCommon/yoga/Yoga.podspec +2 -3
- package/ReactCommon/yoga/cmake/project-defaults.cmake +0 -2
- package/ReactCommon/yoga/yoga/YGConfig.h +4 -4
- package/ReactCommon/yoga/yoga/YGMacros.h +6 -0
- package/ReactCommon/yoga/yoga/YGNode.cpp +2 -2
- package/ReactCommon/yoga/yoga/YGNode.h +4 -4
- package/ReactCommon/yoga/yoga/YGNodeStyle.cpp +5 -0
- package/ReactCommon/yoga/yoga/YGNodeStyle.h +2 -0
- package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +2 -0
- package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.h +9 -9
- package/ReactCommon/yoga/yoga/algorithm/Align.h +43 -0
- package/ReactCommon/yoga/yoga/algorithm/BoundAxis.h +5 -5
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +200 -178
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +16 -16
- package/ReactCommon/yoga/yoga/algorithm/FlexLine.cpp +16 -6
- package/ReactCommon/yoga/yoga/algorithm/FlexLine.h +4 -1
- package/ReactCommon/yoga/yoga/algorithm/PixelGrid.h +7 -7
- package/ReactCommon/yoga/yoga/config/Config.cpp +0 -4
- package/ReactCommon/yoga/yoga/config/Config.h +3 -3
- package/ReactCommon/yoga/yoga/debug/Log.h +1 -1
- package/ReactCommon/yoga/yoga/event/event.cpp +2 -2
- package/ReactCommon/yoga/yoga/event/event.h +7 -4
- package/ReactCommon/yoga/yoga/node/Node.cpp +57 -35
- package/ReactCommon/yoga/yoga/node/Node.h +15 -15
- package/ReactCommon/yoga/yoga/style/SmallValueBuffer.h +3 -3
- package/ReactCommon/yoga/yoga/style/Style.h +2 -4
- package/ReactCommon/yoga/yoga/style/StyleValuePool.h +2 -2
- package/build.gradle.kts +2 -0
- package/cli.js +133 -4
- package/gradle/libs.versions.toml +4 -4
- package/jest/mockComponent.js +7 -0
- package/jest/renderer.js +25 -14
- package/jest/setup.js +19 -13
- package/package.json +23 -23
- package/react-native.config.js +54 -22
- package/rn-get-polyfills.js +1 -0
- package/scripts/bundle.js +69 -0
- package/scripts/cocoapods/autolinking.rb +205 -0
- package/scripts/cocoapods/autolinking_utils.rb +25 -0
- package/scripts/cocoapods/codegen_utils.rb +7 -7
- package/scripts/cocoapods/fabric.rb +1 -0
- package/scripts/cocoapods/new_architecture.rb +1 -1
- package/scripts/cocoapods/spm.rb +94 -0
- package/scripts/cocoapods/utils.rb +8 -19
- package/scripts/codegen/generate-artifacts-executor.js +64 -23
- package/scripts/hermes/hermes-utils.js +24 -3
- package/scripts/hermes/prepare-hermes-for-build.js +2 -0
- package/scripts/react-native-xcode.sh +12 -3
- package/scripts/react_native_pods.rb +29 -20
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +8 -2
- package/sdks/hermes-engine/utils/build-apple-framework.sh +10 -4
- package/sdks/hermes-engine/utils/build-ios-framework.sh +1 -1
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermes-lit +1 -1
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
- package/src/private/core/composeStyles.js +27 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +93 -33
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +56 -0
- package/src/private/fusebox/README.md +12 -0
- package/src/private/fusebox/setUpFuseboxReactDevToolsDispatcher.js +108 -0
- package/src/private/specs/modules/NativeBlobModule.js +4 -2
- package/src/private/specs/modules/NativeDevSettings.js +1 -0
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
- package/src/private/specs/modules/NativePushNotificationManagerIOS.js +0 -4
- package/src/private/specs/modules/NativeUIManager.js +0 -7
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +11 -14
- package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +2 -3
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +24 -54
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +5 -13
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +468 -0
- package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +413 -0
- package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +34 -0
- package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +21 -0
- package/src/private/webapis/performance/EventCounts.js +1 -1
- package/src/private/webapis/performance/MemoryInfo.js +9 -9
- package/src/private/webapis/performance/Performance.js +10 -56
- package/src/private/webapis/performance/PerformanceObserver.js +30 -22
- package/src/private/webapis/performance/RawPerformanceEntry.js +2 -7
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
- package/src/private/webapis/performance/UserTiming.js +63 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +34 -0
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +61 -0
- package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +67 -0
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +127 -0
- package/third-party-podspecs/RCT-Folly/PrivacyInfo.xcprivacy +21 -0
- package/third-party-podspecs/RCT-Folly.podspec +2 -0
- package/third-party-podspecs/boost/PrivacyInfo.xcprivacy +29 -0
- package/third-party-podspecs/boost.podspec +7 -3
- package/third-party-podspecs/glog/PrivacyInfo.xcprivacy +21 -0
- package/third-party-podspecs/glog.podspec +2 -13
- package/types/modules/globals.d.ts +4 -0
- package/Libraries/Components/View/ReactNativeViewViewConfigAppleTV.js +0 -20
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.h +0 -91
- package/Libraries/MutationObserver/NativeMutationObserver.cpp +0 -164
- package/Libraries/MutationObserver/NativeMutationObserver.h +0 -92
- package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +0 -13
- package/Libraries/Utilities/LoadingView.android.js +0 -44
- package/Libraries/Utilities/LoadingView.ios.js +0 -50
- package/Libraries/Utilities/LoadingView.js +0 -16
- package/React/Views/RCTSegmentedControl.h +0 -18
- package/React/Views/RCTSegmentedControl.m +0 -68
- package/React/Views/RCTSegmentedControlManager.h +0 -12
- package/React/Views/RCTSegmentedControlManager.m +0 -36
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/NoopPrinter.java +0 -29
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/Printer.java +0 -20
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/PrinterHolder.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/RuntimeConfig.java +0 -13
- package/ReactAndroid/src/main/java/com/facebook/hermes/unicode/AndroidUnicodeUtils.java +0 -82
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +0 -50
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Callback.java +0 -22
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java +0 -156
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Dynamic.java +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSExceptionHandler.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModule.java +0 -22
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleHolder.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModulePackage.java +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleProvider.java +0 -13
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleRegistry.java +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleSpec.java +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleType.java +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSInstance.java +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/LifecycleEventListener.java +0 -50
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressureListener.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArrayInterface.java +0 -13
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeMap.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NotThreadSafeBridgeIdleDebugListener.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/OnBatchCompleteListener.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMethod.java +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactModuleWithSpec.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMap.java +0 -55
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMapKeySetIterator.java +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.java +0 -293
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableType.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/SoftAssertions.java +0 -53
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Systrace.java +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UnexpectedNativeTypeException.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WindowFocusChangeListener.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableArray.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableMap.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/WritableNativeMap.java +0 -81
- package/ReactAndroid/src/main/java/com/facebook/react/common/JavascriptException.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/common/ReactConstants.java +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/common/SingleThreadAsserter.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/common/StandardCharsets.java +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/common/SystemClock.java +0 -30
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java +0 -113
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java +0 -137
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportSoLoader.java +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +0 -207
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java +0 -45
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FpsView.java +0 -104
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialog.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java +0 -93
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxModule.java +0 -90
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/WindowOverlayCompat.java +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/BundleLoadCallback.java +0 -12
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevBundleDownloadListener.java +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevLoadingViewManager.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevOptionHandler.java +0 -22
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSplitBundleCallback.java +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +0 -131
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/ErrorCustomizer.java +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/ErrorType.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/PackagerStatusCallback.java +0 -12
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.java +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/StackFrame.java +0 -44
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/.clang-tidy +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.java +0 -69
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/BindingImpl.java +0 -121
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/ComponentFactory.java +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/CoreComponentsRegistry.java +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricSoLoader.java +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/GuardedFrameCallback.java +0 -43
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/LayoutMetricsConversions.java +0 -54
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/BatchMountItem.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchCommandMountItem.java +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchIntCommandMountItem.java +0 -47
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.java +0 -47
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/FabricNameComponentMapping.java +0 -52
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItem.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItemFactory.java +0 -60
- package/ReactAndroid/src/main/java/com/facebook/react/internal/AndroidChoreographerProvider.java +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/internal/ChoreographerProvider.java +0 -30
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/.clang-tidy +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/LinearCountingRetryPolicy.java +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/NoRetryPolicy.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/ReactModule.java +0 -53
- package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/ReactModuleList.java +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/module/model/ReactModuleInfo.java +0 -93
- package/ReactAndroid/src/main/java/com/facebook/react/module/model/ReactModuleInfoProvider.java +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/modules/.clang-tidy +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/AccessibilityInfoModule.java +0 -238
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java +0 -125
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appregistry/AppRegistry.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.java +0 -120
- package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageStoreManager.java +0 -102
- package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.java +0 -53
- package/ReactAndroid/src/main/java/com/facebook/react/modules/common/ModuleDataCleaner.java +0 -64
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/AnimationsDebugModule.java +0 -106
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java +0 -111
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.java +0 -169
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/FpsDebugFrameCallback.java +0 -225
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/SourceCodeModule.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.java +0 -109
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.java +0 -63
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devtoolssettings/DevToolsSettingsManagerModule.java +0 -53
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java +0 -61
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nUtil.java +0 -98
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.java +0 -319
- package/ReactAndroid/src/main/java/com/facebook/react/modules/share/ShareModule.java +0 -75
- package/ReactAndroid/src/main/java/com/facebook/react/modules/sound/SoundManagerModule.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +0 -210
- package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/ToastModule.java +0 -98
- package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/VibrationModule.java +0 -72
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/NotificationOnlyHandler.java +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/RequestOnlyHandler.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/NativeModulePerfLogger.java +0 -58
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/.clang-tidy +0 -22
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BoltsFutureTask.java +0 -93
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactStateTracker.java +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSCInstance.java +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSRuntimeFactory.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSTimerExecutor.java +0 -50
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.java +0 -253
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/AggregateException.java +0 -129
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/AndroidExecutors.java +0 -137
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/BoltsExecutors.java +0 -120
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/CancellationToken.java +0 -74
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/CancellationTokenRegistration.java +0 -60
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/CancellationTokenSource.java +0 -216
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Capture.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainPackageConfig.java +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/CallInvokerHolderImpl.java +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/NativeMethodCallInvokerHolderImpl.java +0 -36
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverManager.java +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.java +0 -95
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FloatUtil.java +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/GuardedFrameCallback.java +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/IllegalViewOperationException.java +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java +0 -539
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MeasureSpecAssertions.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeKind.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NoSuchNativeViewException.java +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PixelUtil.java +0 -58
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactInvalidPropertyException.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRootViewTagGenerator.java +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactYogaConfigProvider.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewManager.java +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewUtil.java +0 -49
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/SimpleViewManager.java +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/Spacing.java +0 -197
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderManager.java +0 -73
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewDefaults.java +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.java +0 -334
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/YogaNodePool.java +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/UIManagerType.java +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.java +0 -67
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/NativeGestureUtil.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.java +0 -249
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.java +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.java +0 -49
- package/ReactAndroid/src/main/java/com/facebook/react/util/ExceptionDataHelper.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/util/JSStackTrace.java +0 -74
- package/ReactAndroid/src/main/java/com/facebook/react/util/RCTLog.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.java +0 -115
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ContextUtils.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewUtils.java +0 -36
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlay.java +0 -97
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager.java +0 -162
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/TraceUpdate.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerClosedEvent.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.java +0 -49
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.java +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/GlobalImageLoadListener.java +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java +0 -176
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.java +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMode.java +0 -81
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactCallerContextFactory.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageDownloadListener.java +0 -80
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ScaleTypeStartInside.java +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.java +0 -92
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.java +0 -105
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java +0 -83
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ModalHostHelper.java +0 -65
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ModalHostShadowNode.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +0 -180
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +0 -638
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.java +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.java +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarShadowNode.java +0 -81
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.java +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +0 -601
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java +0 -183
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.java +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchEvent.java +0 -52
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/BasicTextAttributeProvider.kt +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/DefaultStyleValuesUtil.java +0 -64
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/EffectiveTextAttributeProvider.kt +0 -22
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/HierarchicTextAttributeProvider.kt +0 -63
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +0 -604
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutUtils.kt +0 -379
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/BridgeTextFragment.kt +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/BridgeTextFragmentList.kt +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/MapBufferTextFragment.kt +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/MapBufferTextFragmentList.kt +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/TextFragment.kt +0 -29
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/fragments/TextFragmentList.kt +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLetterSpacingSpan.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLineHeightSpan.java +0 -66
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.java +0 -93
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactAbsoluteSizeSpan.java +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactBackgroundColorSpan.java +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactClickableSpan.java +0 -69
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactForegroundColorSpan.java +0 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactSpan.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactStrikethroughSpan.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactTagSpan.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactUnderlineSpan.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/SetSpanOperation.java +0 -64
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ShadowStyleSpan.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TextInlineImageSpan.java +0 -59
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TextInlineViewPlaceholderSpan.java +0 -67
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/ReactUnimplementedView.java +0 -39
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager.java +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +0 -75
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/MeasureUtil.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ViewGroupClickEvent.java +0 -46
- package/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java +0 -89
- package/ReactAndroid/src/main/java/com/facebook/systrace/SystraceMessage.java +0 -117
- package/ReactAndroid/src/main/java/com/facebook/systrace/TraceListener.java +0 -14
- package/ReactAndroid/src/main/jni/first-party/.clang-tidy +0 -6
- package/ReactAndroid/src/main/jni/first-party/yogajni/.clang-tidy +0 -5
- package/ReactAndroid/src/main/jni/react/hermes/.clang-tidy +0 -6
- package/ReactAndroid/src/main/jni/react/jni/.clang-tidy +0 -6
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/.clang-tidy +0 -3
- package/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/.clang-tidy +0 -6
- package/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/OnLoad.cpp +0 -14
- package/ReactAndroid/src/main/jni/react/runtime/cxxreactpackage/ReactCommon/OnLoad.cpp +0 -14
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/.clang-tidy +0 -20
- package/ReactAndroid/src/main/jni/react/runtime/jni/.clang-tidy +0 -20
- package/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.cpp +0 -74
- package/ReactAndroid/src/main/jni/react/uimanager/ComponentNameResolverManager.h +0 -52
- package/ReactAndroid/src/main/jni/react/uimanager/UIConstantsProviderManager.cpp +0 -95
- package/ReactAndroid/src/main/jni/react/uimanager/UIConstantsProviderManager.h +0 -113
- package/ReactCommon/.clang-tidy +0 -7
- package/ReactCommon/butter/.clang-tidy +0 -6
- package/ReactCommon/butter/CMakeLists.txt +0 -21
- package/ReactCommon/butter/butter.h +0 -76
- package/ReactCommon/butter/map.h +0 -45
- package/ReactCommon/callinvoker/.clang-tidy +0 -6
- package/ReactCommon/cxxreact/.clang-tidy +0 -6
- package/ReactCommon/hermes/.clang-tidy +0 -6
- package/ReactCommon/jsc/.clang-tidy +0 -6
- package/ReactCommon/jsengineinstance/.clang-tidy +0 -6
- package/ReactCommon/jsi/.clang-tidy +0 -6
- package/ReactCommon/jsiexecutor/.clang-tidy +0 -6
- package/ReactCommon/jsinspector-modern/.clang-tidy +0 -6
- package/ReactCommon/jsinspector-modern/PageAgent.cpp +0 -153
- package/ReactCommon/jsinspector-modern/PageAgent.h +0 -89
- package/ReactCommon/jsinspector-modern/PageTarget.cpp +0 -166
- package/ReactCommon/jsinspector-modern/PageTarget.h +0 -190
- package/ReactCommon/jsinspector-modern/Parsing.cpp +0 -32
- package/ReactCommon/jsinspector-modern/Parsing.h +0 -69
- package/ReactCommon/jsinspector-modern/tests/PageTargetTest.cpp +0 -517
- package/ReactCommon/react/config/.clang-tidy +0 -6
- package/ReactCommon/react/nativemodule/.clang-tidy +0 -6
- package/ReactCommon/react/renderer/.clang-tidy +0 -195
- package/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp +0 -45
- package/ReactCommon/react/renderer/attributedstring/tests/ParagraphAttributesTest.cpp +0 -34
- package/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp +0 -37
- package/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp +0 -100
- package/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.h +0 -94
- package/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp +0 -52
- package/ReactCommon/react/renderer/components/text/tests/TextTest.cpp +0 -14
- package/ReactCommon/react/renderer/core/BatchedEventQueue.cpp +0 -20
- package/ReactCommon/react/renderer/core/BatchedEventQueue.h +0 -28
- package/ReactCommon/react/renderer/core/EventLogger.cpp +0 -22
- package/ReactCommon/react/renderer/core/EventPriority.h +0 -24
- package/ReactCommon/react/renderer/core/UnbatchedEventQueue.cpp +0 -17
- package/ReactCommon/react/renderer/core/UnbatchedEventQueue.h +0 -25
- package/ReactCommon/react/renderer/css/CSSParser.h +0 -220
- package/ReactCommon/react/renderer/css/tests/CSSParserTest.cpp +0 -317
- package/ReactCommon/react/renderer/debug/SystraceSection.h +0 -59
- package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +0 -313
- package/ReactCommon/react/renderer/mounting/StubViewTree.h +0 -54
- package/ReactCommon/react/renderer/mounting/stubs.cpp +0 -98
- package/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.cpp +0 -59
- package/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h +0 -45
- package/ReactCommon/react/renderer/timeline/Timeline.cpp +0 -120
- package/ReactCommon/react/renderer/timeline/Timeline.h +0 -60
- package/ReactCommon/react/renderer/timeline/TimelineController.cpp +0 -74
- package/ReactCommon/react/renderer/timeline/TimelineController.h +0 -75
- package/ReactCommon/react/renderer/timeline/TimelineFrame.cpp +0 -23
- package/ReactCommon/react/renderer/timeline/TimelineFrame.h +0 -44
- package/ReactCommon/react/renderer/timeline/TimelineHandler.cpp +0 -95
- package/ReactCommon/react/renderer/timeline/TimelineHandler.h +0 -78
- package/ReactCommon/react/renderer/timeline/TimelineSnapshot.cpp +0 -30
- package/ReactCommon/react/renderer/timeline/TimelineSnapshot.h +0 -32
- package/ReactCommon/react/runtime/.clang-tidy +0 -17
- package/ReactCommon/react/runtime/BridgelessJSCallInvoker.cpp +0 -29
- package/ReactCommon/react/runtime/BridgelessJSCallInvoker.h +0 -28
- package/ReactCommon/react/utils/.clang-tidy +0 -6
- package/ReactCommon/react/utils/jsi.cpp +0 -39
- package/ReactCommon/reactperflogger/.clang-tidy +0 -6
- package/ReactCommon/runtimeexecutor/.clang-tidy +0 -6
- package/ReactCommon/yoga/.clang-tidy +0 -5
- package/jest/ReactNativeInternalFeatureFlagsMock.js +0 -13
- package/local-cli/cli.js +0 -18
- package/scripts/cocoapods/FlipperConfiguration.rb +0 -31
- package/scripts/native_modules.rb +0 -6
- package/src/private/featureflags/NativeReactNativeFeatureFlags.js +0 -44
- package/src/private/featureflags/__tests__/ReactNativeFeatureFlags-test.js +0 -92
- package/src/private/specs/modules/NativeAnimationsDebugModule.js +0 -20
- package/src/private/webapis/dom/oldstylecollections/__tests__/DOMRectList-test.js +0 -85
- package/src/private/webapis/dom/oldstylecollections/__tests__/HTMLCollection-test.js +0 -80
- package/src/private/webapis/dom/oldstylecollections/__tests__/NodeList-test.js +0 -161
- package/src/private/webapis/performance/BoundedConsumableBuffer.h +0 -244
- package/src/private/webapis/performance/NativePerformance.cpp +0 -95
- package/src/private/webapis/performance/NativePerformance.h +0 -60
- package/src/private/webapis/performance/NativePerformance.js +0 -33
- package/src/private/webapis/performance/NativePerformanceObserver.cpp +0 -140
- package/src/private/webapis/performance/NativePerformanceObserver.h +0 -98
- package/src/private/webapis/performance/NativePerformanceObserver.js +0 -61
- package/src/private/webapis/performance/PerformanceEntryReporter.cpp +0 -470
- package/src/private/webapis/performance/PerformanceEntryReporter.h +0 -207
- package/src/private/webapis/performance/__mocks__/NativePerformance.js +0 -67
- package/src/private/webapis/performance/__mocks__/NativePerformanceObserver.js +0 -128
- package/src/private/webapis/performance/__tests__/BoundedConsumableBufferTest.cpp +0 -201
- package/src/private/webapis/performance/__tests__/EventCounts-test.js +0 -116
- package/src/private/webapis/performance/__tests__/NativePerformanceMock-test.js +0 -82
- package/src/private/webapis/performance/__tests__/NativePerformanceObserverMock-test.js +0 -108
- package/src/private/webapis/performance/__tests__/Performance-test.js +0 -117
- package/src/private/webapis/performance/__tests__/PerformanceEntryReporterTest.cpp +0 -373
- package/src/private/webapis/performance/__tests__/PerformanceObserver-test.js +0 -208
- package/template/App.tsx +0 -118
- package/template/Gemfile +0 -9
- package/template/README.md +0 -79
- package/template/__tests__/App.test.tsx +0 -17
- package/template/_bundle/config +0 -2
- package/template/_eslintrc.js +0 -4
- package/template/_gitignore +0 -74
- package/template/_prettierrc.js +0 -7
- package/template/_watchmanconfig +0 -1
- package/template/android/app/build.gradle +0 -121
- package/template/android/app/debug.keystore +0 -0
- package/template/android/app/proguard-rules.pro +0 -10
- package/template/android/app/src/debug/AndroidManifest.xml +0 -9
- package/template/android/app/src/main/AndroidManifest.xml +0 -32
- package/template/android/app/src/main/java/com/helloworld/MainActivity.kt +0 -22
- package/template/android/app/src/main/java/com/helloworld/MainApplication.kt +0 -43
- package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/template/android/app/src/main/res/drawable/tv_banner.png +0 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/values/strings.xml +0 -3
- package/template/android/app/src/main/res/values/styles.xml +0 -9
- package/template/android/build.gradle +0 -21
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/template/android/gradle.properties +0 -41
- package/template/android/gradlew +0 -249
- package/template/android/gradlew.bat +0 -92
- package/template/android/settings.gradle +0 -4
- package/template/app.json +0 -4
- package/template/babel.config.js +0 -3
- package/template/index.js +0 -9
- package/template/ios/HelloWorld/AppDelegate.h +0 -6
- package/template/ios/HelloWorld/AppDelegate.mm +0 -31
- package/template/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/template/ios/HelloWorld/Images.xcassets/Contents.json +0 -6
- package/template/ios/HelloWorld/Info.plist +0 -52
- package/template/ios/HelloWorld/LaunchScreen.storyboard +0 -47
- package/template/ios/HelloWorld/PrivacyInfo.xcprivacy +0 -38
- package/template/ios/HelloWorld/main.m +0 -10
- package/template/ios/HelloWorld-tvOS/Info.plist +0 -53
- package/template/ios/HelloWorld-tvOSTests/Info.plist +0 -24
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +0 -1154
- package/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld-tvOS.xcscheme +0 -88
- package/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme +0 -88
- package/template/ios/HelloWorldTests/HelloWorldTests.m +0 -66
- package/template/ios/HelloWorldTests/Info.plist +0 -24
- package/template/ios/Podfile +0 -61
- package/template/ios/_xcode.env +0 -11
- package/template/jest.config.js +0 -3
- package/template/metro.config.js +0 -32
- package/template/package.json +0 -38
- package/template/react-native.config.js +0 -12
- package/template/tsconfig.json +0 -3
- package/template.config.js +0 -12
- /package/{Libraries/IntersectionObserver → ReactCommon/react/nativemodule/intersectionobserver}/NativeIntersectionObserver.cpp +0 -0
- /package/ReactCommon/react/renderer/mounting/{StubView.cpp → stubs/StubView.cpp} +0 -0
- /package/ReactCommon/react/renderer/mounting/{StubView.h → stubs/StubView.h} +0 -0
- /package/ReactCommon/react/renderer/mounting/{stubs.h → stubs/stubs.h} +0 -0
- /package/ReactCommon/react/utils/{jsi.h → jsi-utils.h} +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @nolint
|
|
9
9
|
* @providesModule ReactFabric-dev
|
|
10
10
|
* @preventMunge
|
|
11
|
-
* @generated SignedSource<<
|
|
11
|
+
* @generated SignedSource<<b2518f8fc782ae207960d73af4bbc7b4>>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
"use strict";
|
|
@@ -98,292 +98,14 @@ if (__DEV__) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
var fakeNode = null;
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
if (
|
|
105
|
-
typeof window !== "undefined" &&
|
|
106
|
-
typeof window.dispatchEvent === "function" &&
|
|
107
|
-
typeof document !== "undefined" && // $FlowFixMe[method-unbinding]
|
|
108
|
-
typeof document.createEvent === "function"
|
|
109
|
-
) {
|
|
110
|
-
fakeNode = document.createElement("react");
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function invokeGuardedCallbackImpl(name, func, context) {
|
|
115
|
-
{
|
|
116
|
-
// In DEV mode, we use a special version
|
|
117
|
-
// that plays more nicely with the browser's DevTools. The idea is to preserve
|
|
118
|
-
// "Pause on exceptions" behavior. Because React wraps all user-provided
|
|
119
|
-
// functions in invokeGuardedCallback, and the production version of
|
|
120
|
-
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
|
|
121
|
-
// like caught exceptions, and the DevTools won't pause unless the developer
|
|
122
|
-
// takes the extra step of enabling pause on caught exceptions. This is
|
|
123
|
-
// unintuitive, though, because even though React has caught the error, from
|
|
124
|
-
// the developer's perspective, the error is uncaught.
|
|
125
|
-
//
|
|
126
|
-
// To preserve the expected "Pause on exceptions" behavior, we don't use a
|
|
127
|
-
// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
|
|
128
|
-
// DOM node, and call the user-provided callback from inside an event handler
|
|
129
|
-
// for that fake event. If the callback throws, the error is "captured" using
|
|
130
|
-
// event loop context, it does not interrupt the normal program flow.
|
|
131
|
-
// Effectively, this gives us try-catch behavior without actually using
|
|
132
|
-
// try-catch. Neat!
|
|
133
|
-
// fakeNode signifies we are in an environment with a document and window object
|
|
134
|
-
if (fakeNode) {
|
|
135
|
-
var evt = document.createEvent("Event");
|
|
136
|
-
var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
|
|
137
|
-
// set this to true at the beginning, then set it to false right after
|
|
138
|
-
// calling the function. If the function errors, `didError` will never be
|
|
139
|
-
// set to false. This strategy works even if the browser is flaky and
|
|
140
|
-
// fails to call our global error handler, because it doesn't rely on
|
|
141
|
-
// the error event at all.
|
|
142
|
-
|
|
143
|
-
var didError = true; // Keeps track of the value of window.event so that we can reset it
|
|
144
|
-
// during the callback to let user code access window.event in the
|
|
145
|
-
// browsers that support it.
|
|
146
|
-
|
|
147
|
-
var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
|
|
148
|
-
// dispatching: https://github.com/facebook/react/issues/13688
|
|
149
|
-
|
|
150
|
-
var windowEventDescriptor = Object.getOwnPropertyDescriptor(
|
|
151
|
-
window,
|
|
152
|
-
"event"
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
var restoreAfterDispatch = function () {
|
|
156
|
-
// We immediately remove the callback from event listeners so that
|
|
157
|
-
// nested `invokeGuardedCallback` calls do not clash. Otherwise, a
|
|
158
|
-
// nested call would trigger the fake event handlers of any call higher
|
|
159
|
-
// in the stack.
|
|
160
|
-
fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
|
|
161
|
-
// window.event assignment in both IE <= 10 as they throw an error
|
|
162
|
-
// "Member not found" in strict mode, and in Firefox which does not
|
|
163
|
-
// support window.event.
|
|
164
|
-
|
|
165
|
-
if (
|
|
166
|
-
typeof window.event !== "undefined" &&
|
|
167
|
-
window.hasOwnProperty("event")
|
|
168
|
-
) {
|
|
169
|
-
window.event = windowEvent;
|
|
170
|
-
}
|
|
171
|
-
}; // Create an event handler for our fake event. We will synchronously
|
|
172
|
-
// dispatch our fake event using `dispatchEvent`. Inside the handler, we
|
|
173
|
-
// call the user-provided callback.
|
|
174
|
-
// $FlowFixMe[method-unbinding]
|
|
175
|
-
|
|
176
|
-
var _funcArgs = Array.prototype.slice.call(arguments, 3);
|
|
177
|
-
|
|
178
|
-
var callCallback = function () {
|
|
179
|
-
didCall = true;
|
|
180
|
-
restoreAfterDispatch(); // $FlowFixMe[incompatible-call] Flow doesn't understand the arguments splicing.
|
|
181
|
-
|
|
182
|
-
func.apply(context, _funcArgs);
|
|
183
|
-
didError = false;
|
|
184
|
-
}; // Create a global error event handler. We use this to capture the value
|
|
185
|
-
// that was thrown. It's possible that this error handler will fire more
|
|
186
|
-
// than once; for example, if non-React code also calls `dispatchEvent`
|
|
187
|
-
// and a handler for that event throws. We should be resilient to most of
|
|
188
|
-
// those cases. Even if our error event handler fires more than once, the
|
|
189
|
-
// last error event is always used. If the callback actually does error,
|
|
190
|
-
// we know that the last error event is the correct one, because it's not
|
|
191
|
-
// possible for anything else to have happened in between our callback
|
|
192
|
-
// erroring and the code that follows the `dispatchEvent` call below. If
|
|
193
|
-
// the callback doesn't error, but the error event was fired, we know to
|
|
194
|
-
// ignore it because `didError` will be false, as described above.
|
|
195
|
-
|
|
196
|
-
var error; // Use this to track whether the error event is ever called.
|
|
197
|
-
|
|
198
|
-
var didSetError = false;
|
|
199
|
-
var isCrossOriginError = false;
|
|
200
|
-
|
|
201
|
-
var handleWindowError = function (event) {
|
|
202
|
-
error = event.error;
|
|
203
|
-
didSetError = true;
|
|
204
|
-
|
|
205
|
-
if (error === null && event.colno === 0 && event.lineno === 0) {
|
|
206
|
-
isCrossOriginError = true;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (event.defaultPrevented) {
|
|
210
|
-
// Some other error handler has prevented default.
|
|
211
|
-
// Browsers silence the error report if this happens.
|
|
212
|
-
// We'll remember this to later decide whether to log it or not.
|
|
213
|
-
if (error != null && typeof error === "object") {
|
|
214
|
-
try {
|
|
215
|
-
error._suppressLogging = true;
|
|
216
|
-
} catch (inner) {
|
|
217
|
-
// Ignore.
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}; // Create a fake event type.
|
|
222
|
-
|
|
223
|
-
var evtType = "react-" + (name ? name : "invokeguardedcallback"); // Attach our event handlers
|
|
224
|
-
|
|
225
|
-
window.addEventListener("error", handleWindowError);
|
|
226
|
-
fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
|
|
227
|
-
// errors, it will trigger our global error handler.
|
|
228
|
-
|
|
229
|
-
evt.initEvent(evtType, false, false);
|
|
230
|
-
fakeNode.dispatchEvent(evt);
|
|
231
|
-
|
|
232
|
-
if (windowEventDescriptor) {
|
|
233
|
-
Object.defineProperty(window, "event", windowEventDescriptor);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (didCall && didError) {
|
|
237
|
-
if (!didSetError) {
|
|
238
|
-
// The callback errored, but the error event never fired.
|
|
239
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
240
|
-
error = new Error(
|
|
241
|
-
"An error was thrown inside one of your components, but React " +
|
|
242
|
-
"doesn't know what it was. This is likely due to browser " +
|
|
243
|
-
'flakiness. React does its best to preserve the "Pause on ' +
|
|
244
|
-
'exceptions" behavior of the DevTools, which requires some ' +
|
|
245
|
-
"DEV-mode only tricks. It's possible that these don't work in " +
|
|
246
|
-
"your browser. Try triggering the error in production mode, " +
|
|
247
|
-
"or switching to a modern browser. If you suspect that this is " +
|
|
248
|
-
"actually an issue with React, please file an issue."
|
|
249
|
-
);
|
|
250
|
-
} else if (isCrossOriginError) {
|
|
251
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
252
|
-
error = new Error(
|
|
253
|
-
"A cross-origin error was thrown. React doesn't have access to " +
|
|
254
|
-
"the actual error object in development. " +
|
|
255
|
-
"See https://reactjs.org/link/crossorigin-error for more information."
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
this.onError(error);
|
|
260
|
-
} // Remove our event listeners
|
|
261
|
-
|
|
262
|
-
window.removeEventListener("error", handleWindowError);
|
|
263
|
-
|
|
264
|
-
if (didCall) {
|
|
265
|
-
return;
|
|
266
|
-
} else {
|
|
267
|
-
// Something went really wrong, and our event was not dispatched.
|
|
268
|
-
// https://github.com/facebook/react/issues/16734
|
|
269
|
-
// https://github.com/facebook/react/issues/16585
|
|
270
|
-
// Fall back to the production implementation.
|
|
271
|
-
restoreAfterDispatch(); // we fall through and call the prod version instead
|
|
272
|
-
}
|
|
273
|
-
} // We only get here if we are in an environment that either does not support the browser
|
|
274
|
-
// variant or we had trouble getting the browser to emit the error.
|
|
275
|
-
// $FlowFixMe[method-unbinding]
|
|
276
|
-
|
|
277
|
-
var funcArgs = Array.prototype.slice.call(arguments, 3);
|
|
278
|
-
|
|
279
|
-
try {
|
|
280
|
-
// $FlowFixMe[incompatible-call] Flow doesn't understand the arguments splicing.
|
|
281
|
-
func.apply(context, funcArgs);
|
|
282
|
-
} catch (error) {
|
|
283
|
-
this.onError(error);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
var hasError = false;
|
|
289
|
-
var caughtError = null; // Used by event system to capture/rethrow the first error.
|
|
290
|
-
|
|
291
|
-
var hasRethrowError = false;
|
|
292
|
-
var rethrowError = null;
|
|
293
|
-
var reporter = {
|
|
294
|
-
onError: function (error) {
|
|
295
|
-
hasError = true;
|
|
296
|
-
caughtError = error;
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
/**
|
|
300
|
-
* Call a function while guarding against errors that happens within it.
|
|
301
|
-
* Returns an error if it throws, otherwise null.
|
|
302
|
-
*
|
|
303
|
-
* In production, this is implemented using a try-catch. The reason we don't
|
|
304
|
-
* use a try-catch directly is so that we can swap out a different
|
|
305
|
-
* implementation in DEV mode.
|
|
306
|
-
*
|
|
307
|
-
* @param {String} name of the guard to use for logging or debugging
|
|
308
|
-
* @param {Function} func The function to invoke
|
|
309
|
-
* @param {*} context The context to use when calling the function
|
|
310
|
-
* @param {...*} args Arguments for function
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
|
|
314
|
-
hasError = false;
|
|
315
|
-
caughtError = null;
|
|
316
|
-
invokeGuardedCallbackImpl.apply(reporter, arguments);
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Same as invokeGuardedCallback, but instead of returning an error, it stores
|
|
320
|
-
* it in a global so it can be rethrown by `rethrowCaughtError` later.
|
|
321
|
-
* TODO: See if caughtError and rethrowError can be unified.
|
|
322
|
-
*
|
|
323
|
-
* @param {String} name of the guard to use for logging or debugging
|
|
324
|
-
* @param {Function} func The function to invoke
|
|
325
|
-
* @param {*} context The context to use when calling the function
|
|
326
|
-
* @param {...*} args Arguments for function
|
|
327
|
-
*/
|
|
328
|
-
|
|
329
|
-
function invokeGuardedCallbackAndCatchFirstError(
|
|
330
|
-
name,
|
|
331
|
-
func,
|
|
332
|
-
context,
|
|
333
|
-
a,
|
|
334
|
-
b,
|
|
335
|
-
c,
|
|
336
|
-
d,
|
|
337
|
-
e,
|
|
338
|
-
f
|
|
339
|
-
) {
|
|
340
|
-
invokeGuardedCallback.apply(this, arguments);
|
|
341
|
-
|
|
342
|
-
if (hasError) {
|
|
343
|
-
var error = clearCaughtError();
|
|
344
|
-
|
|
345
|
-
if (!hasRethrowError) {
|
|
346
|
-
hasRethrowError = true;
|
|
347
|
-
rethrowError = error;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* During execution of guarded functions we will capture the first error which
|
|
353
|
-
* we will rethrow to be handled by the top level error handler.
|
|
354
|
-
*/
|
|
355
|
-
|
|
356
|
-
function rethrowCaughtError() {
|
|
357
|
-
if (hasRethrowError) {
|
|
358
|
-
var error = rethrowError;
|
|
359
|
-
hasRethrowError = false;
|
|
360
|
-
rethrowError = null;
|
|
361
|
-
throw error;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
function hasCaughtError() {
|
|
365
|
-
return hasError;
|
|
366
|
-
}
|
|
367
|
-
function clearCaughtError() {
|
|
368
|
-
if (hasError) {
|
|
369
|
-
var error = caughtError;
|
|
370
|
-
hasError = false;
|
|
371
|
-
caughtError = null;
|
|
372
|
-
return error;
|
|
373
|
-
} else {
|
|
374
|
-
throw new Error(
|
|
375
|
-
"clearCaughtError was called but no error was captured. This error " +
|
|
376
|
-
"is likely caused by a bug in React. Please file an issue."
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
101
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
382
102
|
|
|
383
103
|
function isArray(a) {
|
|
384
104
|
return isArrayImpl(a);
|
|
385
105
|
}
|
|
386
106
|
|
|
107
|
+
var hasError = false;
|
|
108
|
+
var caughtError = null;
|
|
387
109
|
var getFiberCurrentPropsFromNode$1 = null;
|
|
388
110
|
var getInstanceFromNode$1 = null;
|
|
389
111
|
var getNodeFromInstance$1 = null;
|
|
@@ -399,7 +121,7 @@ if (__DEV__) {
|
|
|
399
121
|
{
|
|
400
122
|
if (!getNodeFromInstance$1 || !getInstanceFromNode$1) {
|
|
401
123
|
error(
|
|
402
|
-
"
|
|
124
|
+
"Injected " +
|
|
403
125
|
"module is missing getNodeFromInstance or getInstanceFromNode."
|
|
404
126
|
);
|
|
405
127
|
}
|
|
@@ -439,9 +161,17 @@ if (__DEV__) {
|
|
|
439
161
|
*/
|
|
440
162
|
|
|
441
163
|
function executeDispatch(event, listener, inst) {
|
|
442
|
-
var type = event.type || "unknown-event";
|
|
443
164
|
event.currentTarget = getNodeFromInstance$1(inst);
|
|
444
|
-
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
listener(event);
|
|
168
|
+
} catch (error) {
|
|
169
|
+
if (!hasError) {
|
|
170
|
+
hasError = true;
|
|
171
|
+
caughtError = error;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
445
175
|
event.currentTarget = null;
|
|
446
176
|
}
|
|
447
177
|
/**
|
|
@@ -534,7 +264,7 @@ if (__DEV__) {
|
|
|
534
264
|
var dispatchInstance = event._dispatchInstances;
|
|
535
265
|
|
|
536
266
|
if (isArray(dispatchListener)) {
|
|
537
|
-
throw new Error("
|
|
267
|
+
throw new Error("Invalid `event`.");
|
|
538
268
|
}
|
|
539
269
|
|
|
540
270
|
event.currentTarget = dispatchListener
|
|
@@ -554,6 +284,14 @@ if (__DEV__) {
|
|
|
554
284
|
function hasDispatches(event) {
|
|
555
285
|
return !!event._dispatchListeners;
|
|
556
286
|
}
|
|
287
|
+
function rethrowCaughtError() {
|
|
288
|
+
if (hasError) {
|
|
289
|
+
var error = caughtError;
|
|
290
|
+
hasError = false;
|
|
291
|
+
caughtError = null;
|
|
292
|
+
throw error;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
557
295
|
|
|
558
296
|
var assign = Object.assign;
|
|
559
297
|
|
|
@@ -840,7 +578,7 @@ if (__DEV__) {
|
|
|
840
578
|
"This synthetic event is reused for performance reasons. If you're seeing this, " +
|
|
841
579
|
"you're %s `%s` on a released/nullified synthetic event. %s. " +
|
|
842
580
|
"If you must keep the original synthetic event around, use event.persist(). " +
|
|
843
|
-
"See https://
|
|
581
|
+
"See https://react.dev/link/event-pooling for more information.",
|
|
844
582
|
action,
|
|
845
583
|
propName,
|
|
846
584
|
result
|
|
@@ -1160,9 +898,7 @@ if (__DEV__) {
|
|
|
1160
898
|
|
|
1161
899
|
function accumulate(current, next) {
|
|
1162
900
|
if (next == null) {
|
|
1163
|
-
throw new Error(
|
|
1164
|
-
"accumulate(...): Accumulated items must not be null or undefined."
|
|
1165
|
-
);
|
|
901
|
+
throw new Error("Accumulated items must not be null or undefined.");
|
|
1166
902
|
}
|
|
1167
903
|
|
|
1168
904
|
if (current == null) {
|
|
@@ -1200,9 +936,7 @@ if (__DEV__) {
|
|
|
1200
936
|
|
|
1201
937
|
function accumulateInto(current, next) {
|
|
1202
938
|
if (next == null) {
|
|
1203
|
-
throw new Error(
|
|
1204
|
-
"accumulateInto(...): Accumulated items must not be null or undefined."
|
|
1205
|
-
);
|
|
939
|
+
throw new Error("Accumulated items must not be null or undefined.");
|
|
1206
940
|
}
|
|
1207
941
|
|
|
1208
942
|
if (current == null) {
|
|
@@ -3229,6 +2963,7 @@ to return true:wantsResponderID| |
|
|
|
3229
2963
|
// where it would do it.
|
|
3230
2964
|
}
|
|
3231
2965
|
|
|
2966
|
+
// -----------------------------------------------------------------------------
|
|
3232
2967
|
var enableSchedulingProfiler = false;
|
|
3233
2968
|
var enableProfilerTimer = true;
|
|
3234
2969
|
var enableProfilerCommitHooks = true;
|
|
@@ -3239,6 +2974,7 @@ to return true:wantsResponderID| |
|
|
|
3239
2974
|
var enableLegacyHidden = false;
|
|
3240
2975
|
var enableAsyncActions = false;
|
|
3241
2976
|
var passChildrenWhenCloningPersistedNodes = false;
|
|
2977
|
+
var enableBigIntSupport = false;
|
|
3242
2978
|
|
|
3243
2979
|
var NoFlags$1 =
|
|
3244
2980
|
/* */
|
|
@@ -3499,7 +3235,7 @@ to return true:wantsResponderID| |
|
|
|
3499
3235
|
error(
|
|
3500
3236
|
"The installed version of React DevTools is too old and will not work " +
|
|
3501
3237
|
"with the current version of React. Please update React DevTools. " +
|
|
3502
|
-
"https://
|
|
3238
|
+
"https://react.dev/link/react-devtools"
|
|
3503
3239
|
);
|
|
3504
3240
|
} // DevTools exists, even though it doesn't support Fiber.
|
|
3505
3241
|
|
|
@@ -4246,7 +3982,7 @@ to return true:wantsResponderID| |
|
|
|
4246
3982
|
|
|
4247
3983
|
return laneMap;
|
|
4248
3984
|
}
|
|
4249
|
-
function markRootUpdated(root, updateLane) {
|
|
3985
|
+
function markRootUpdated$1(root, updateLane) {
|
|
4250
3986
|
root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update
|
|
4251
3987
|
// could unblock them. Clear the suspended lanes so that we can try rendering
|
|
4252
3988
|
// them again.
|
|
@@ -4283,7 +4019,7 @@ to return true:wantsResponderID| |
|
|
|
4283
4019
|
markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
|
|
4284
4020
|
}
|
|
4285
4021
|
}
|
|
4286
|
-
function markRootPinged(root, pingedLanes) {
|
|
4022
|
+
function markRootPinged$1(root, pingedLanes) {
|
|
4287
4023
|
root.pingedLanes |= root.suspendedLanes & pingedLanes;
|
|
4288
4024
|
}
|
|
4289
4025
|
function markRootFinished(root, remainingLanes, spawnedLane) {
|
|
@@ -4895,6 +4631,14 @@ to return true:wantsResponderID| |
|
|
|
4895
4631
|
function waitForCommitToBeReady() {
|
|
4896
4632
|
return null;
|
|
4897
4633
|
}
|
|
4634
|
+
// Microtasks
|
|
4635
|
+
// -------------------
|
|
4636
|
+
|
|
4637
|
+
var supportsMicrotasks =
|
|
4638
|
+
typeof RN$enableMicrotasksInReact !== "undefined" &&
|
|
4639
|
+
!!RN$enableMicrotasksInReact;
|
|
4640
|
+
var scheduleMicrotask =
|
|
4641
|
+
typeof queueMicrotask === "function" ? queueMicrotask : scheduleTimeout;
|
|
4898
4642
|
|
|
4899
4643
|
// This is ok in DOM because they types are interchangeable, but in React Native
|
|
4900
4644
|
// they aren't.
|
|
@@ -4982,7 +4726,9 @@ to return true:wantsResponderID| |
|
|
|
4982
4726
|
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
4983
4727
|
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
4984
4728
|
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
4985
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
4729
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); // TODO: Delete with enableRenderableContext
|
|
4730
|
+
|
|
4731
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
|
|
4986
4732
|
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
4987
4733
|
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
4988
4734
|
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
@@ -5082,13 +4828,21 @@ to return true:wantsResponderID| |
|
|
|
5082
4828
|
}
|
|
5083
4829
|
|
|
5084
4830
|
switch (type.$$typeof) {
|
|
4831
|
+
case REACT_PROVIDER_TYPE: {
|
|
4832
|
+
var provider = type;
|
|
4833
|
+
return getContextName$1(provider._context) + ".Provider";
|
|
4834
|
+
}
|
|
4835
|
+
|
|
5085
4836
|
case REACT_CONTEXT_TYPE:
|
|
5086
4837
|
var context = type;
|
|
5087
|
-
return getContextName$1(context) + ".Consumer";
|
|
5088
4838
|
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
4839
|
+
{
|
|
4840
|
+
return getContextName$1(context) + ".Consumer";
|
|
4841
|
+
}
|
|
4842
|
+
|
|
4843
|
+
case REACT_CONSUMER_TYPE: {
|
|
4844
|
+
return null;
|
|
4845
|
+
}
|
|
5092
4846
|
|
|
5093
4847
|
case REACT_FORWARD_REF_TYPE:
|
|
5094
4848
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
@@ -5141,13 +4895,15 @@ to return true:wantsResponderID| |
|
|
|
5141
4895
|
case CacheComponent:
|
|
5142
4896
|
return "Cache";
|
|
5143
4897
|
|
|
5144
|
-
case ContextConsumer:
|
|
4898
|
+
case ContextConsumer: {
|
|
5145
4899
|
var context = type;
|
|
5146
4900
|
return getContextName(context) + ".Consumer";
|
|
4901
|
+
}
|
|
5147
4902
|
|
|
5148
|
-
case ContextProvider:
|
|
4903
|
+
case ContextProvider: {
|
|
5149
4904
|
var provider = type;
|
|
5150
4905
|
return getContextName(provider._context) + ".Provider";
|
|
4906
|
+
}
|
|
5151
4907
|
|
|
5152
4908
|
case DehydratedFragment:
|
|
5153
4909
|
return "DehydratedFragment";
|
|
@@ -5261,9 +5017,6 @@ to return true:wantsResponderID| |
|
|
|
5261
5017
|
|
|
5262
5018
|
return null;
|
|
5263
5019
|
}
|
|
5264
|
-
function isFiberMounted(fiber) {
|
|
5265
|
-
return getNearestMountedFiber(fiber) === fiber;
|
|
5266
|
-
}
|
|
5267
5020
|
function isMounted(component) {
|
|
5268
5021
|
{
|
|
5269
5022
|
var owner = ReactCurrentOwner$3.current;
|
|
@@ -5509,214 +5262,6 @@ to return true:wantsResponderID| |
|
|
|
5509
5262
|
return false;
|
|
5510
5263
|
}
|
|
5511
5264
|
|
|
5512
|
-
function describeBuiltInComponentFrame(name, ownerFn) {
|
|
5513
|
-
{
|
|
5514
|
-
var ownerName = null;
|
|
5515
|
-
|
|
5516
|
-
if (ownerFn) {
|
|
5517
|
-
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
5518
|
-
}
|
|
5519
|
-
|
|
5520
|
-
return describeComponentFrame(name, ownerName);
|
|
5521
|
-
}
|
|
5522
|
-
}
|
|
5523
|
-
|
|
5524
|
-
{
|
|
5525
|
-
var PossiblyWeakMap$1 = typeof WeakMap === "function" ? WeakMap : Map;
|
|
5526
|
-
new PossiblyWeakMap$1();
|
|
5527
|
-
}
|
|
5528
|
-
|
|
5529
|
-
function describeComponentFrame(name, ownerName) {
|
|
5530
|
-
var sourceInfo = "";
|
|
5531
|
-
|
|
5532
|
-
if (ownerName) {
|
|
5533
|
-
sourceInfo = " (created by " + ownerName + ")";
|
|
5534
|
-
}
|
|
5535
|
-
|
|
5536
|
-
return "\n in " + (name || "Unknown") + sourceInfo;
|
|
5537
|
-
}
|
|
5538
|
-
|
|
5539
|
-
function describeClassComponentFrame(ctor, ownerFn) {
|
|
5540
|
-
{
|
|
5541
|
-
return describeFunctionComponentFrame(ctor, ownerFn);
|
|
5542
|
-
}
|
|
5543
|
-
}
|
|
5544
|
-
function describeFunctionComponentFrame(fn, ownerFn) {
|
|
5545
|
-
{
|
|
5546
|
-
if (!fn) {
|
|
5547
|
-
return "";
|
|
5548
|
-
}
|
|
5549
|
-
|
|
5550
|
-
var name = fn.displayName || fn.name || null;
|
|
5551
|
-
var ownerName = null;
|
|
5552
|
-
|
|
5553
|
-
if (ownerFn) {
|
|
5554
|
-
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
5555
|
-
}
|
|
5556
|
-
|
|
5557
|
-
return describeComponentFrame(name, ownerName);
|
|
5558
|
-
}
|
|
5559
|
-
}
|
|
5560
|
-
|
|
5561
|
-
function describeUnknownElementTypeFrameInDEV(type, ownerFn) {
|
|
5562
|
-
if (type == null) {
|
|
5563
|
-
return "";
|
|
5564
|
-
}
|
|
5565
|
-
|
|
5566
|
-
if (typeof type === "function") {
|
|
5567
|
-
{
|
|
5568
|
-
return describeFunctionComponentFrame(type, ownerFn);
|
|
5569
|
-
}
|
|
5570
|
-
}
|
|
5571
|
-
|
|
5572
|
-
if (typeof type === "string") {
|
|
5573
|
-
return describeBuiltInComponentFrame(type, ownerFn);
|
|
5574
|
-
}
|
|
5575
|
-
|
|
5576
|
-
switch (type) {
|
|
5577
|
-
case REACT_SUSPENSE_TYPE:
|
|
5578
|
-
return describeBuiltInComponentFrame("Suspense", ownerFn);
|
|
5579
|
-
|
|
5580
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
5581
|
-
return describeBuiltInComponentFrame("SuspenseList", ownerFn);
|
|
5582
|
-
}
|
|
5583
|
-
|
|
5584
|
-
if (typeof type === "object") {
|
|
5585
|
-
switch (type.$$typeof) {
|
|
5586
|
-
case REACT_FORWARD_REF_TYPE:
|
|
5587
|
-
return describeFunctionComponentFrame(type.render, ownerFn);
|
|
5588
|
-
|
|
5589
|
-
case REACT_MEMO_TYPE:
|
|
5590
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
5591
|
-
return describeUnknownElementTypeFrameInDEV(type.type, ownerFn);
|
|
5592
|
-
|
|
5593
|
-
case REACT_LAZY_TYPE: {
|
|
5594
|
-
var lazyComponent = type;
|
|
5595
|
-
var payload = lazyComponent._payload;
|
|
5596
|
-
var init = lazyComponent._init;
|
|
5597
|
-
|
|
5598
|
-
try {
|
|
5599
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
5600
|
-
return describeUnknownElementTypeFrameInDEV(
|
|
5601
|
-
init(payload),
|
|
5602
|
-
ownerFn
|
|
5603
|
-
);
|
|
5604
|
-
} catch (x) {}
|
|
5605
|
-
}
|
|
5606
|
-
}
|
|
5607
|
-
}
|
|
5608
|
-
|
|
5609
|
-
return "";
|
|
5610
|
-
}
|
|
5611
|
-
|
|
5612
|
-
// $FlowFixMe[method-unbinding]
|
|
5613
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5614
|
-
|
|
5615
|
-
var loggedTypeFailures = {};
|
|
5616
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
5617
|
-
|
|
5618
|
-
function setCurrentlyValidatingElement(element) {
|
|
5619
|
-
{
|
|
5620
|
-
if (element) {
|
|
5621
|
-
var owner = element._owner;
|
|
5622
|
-
var stack = describeUnknownElementTypeFrameInDEV(
|
|
5623
|
-
element.type,
|
|
5624
|
-
owner ? owner.type : null
|
|
5625
|
-
);
|
|
5626
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
5627
|
-
} else {
|
|
5628
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
5629
|
-
}
|
|
5630
|
-
}
|
|
5631
|
-
}
|
|
5632
|
-
|
|
5633
|
-
function checkPropTypes(
|
|
5634
|
-
typeSpecs,
|
|
5635
|
-
values,
|
|
5636
|
-
location,
|
|
5637
|
-
componentName,
|
|
5638
|
-
element
|
|
5639
|
-
) {
|
|
5640
|
-
{
|
|
5641
|
-
// $FlowFixMe[incompatible-use] This is okay but Flow doesn't know it.
|
|
5642
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
5643
|
-
|
|
5644
|
-
for (var typeSpecName in typeSpecs) {
|
|
5645
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
5646
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
5647
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
5648
|
-
// After these have been cleaned up, we'll let them throw.
|
|
5649
|
-
|
|
5650
|
-
try {
|
|
5651
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
5652
|
-
// behavior as without this statement except with a better message.
|
|
5653
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
5654
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
5655
|
-
var err = Error(
|
|
5656
|
-
(componentName || "React class") +
|
|
5657
|
-
": " +
|
|
5658
|
-
location +
|
|
5659
|
-
" type `" +
|
|
5660
|
-
typeSpecName +
|
|
5661
|
-
"` is invalid; " +
|
|
5662
|
-
"it must be a function, usually from the `prop-types` package, but received `" +
|
|
5663
|
-
typeof typeSpecs[typeSpecName] +
|
|
5664
|
-
"`." +
|
|
5665
|
-
"This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
5666
|
-
);
|
|
5667
|
-
err.name = "Invariant Violation";
|
|
5668
|
-
throw err;
|
|
5669
|
-
}
|
|
5670
|
-
|
|
5671
|
-
error$1 = typeSpecs[typeSpecName](
|
|
5672
|
-
values,
|
|
5673
|
-
typeSpecName,
|
|
5674
|
-
componentName,
|
|
5675
|
-
location,
|
|
5676
|
-
null,
|
|
5677
|
-
"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"
|
|
5678
|
-
);
|
|
5679
|
-
} catch (ex) {
|
|
5680
|
-
error$1 = ex;
|
|
5681
|
-
}
|
|
5682
|
-
|
|
5683
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
5684
|
-
setCurrentlyValidatingElement(element);
|
|
5685
|
-
|
|
5686
|
-
error(
|
|
5687
|
-
"%s: type specification of %s" +
|
|
5688
|
-
" `%s` is invalid; the type checker " +
|
|
5689
|
-
"function must return `null` or an `Error` but returned a %s. " +
|
|
5690
|
-
"You may have forgotten to pass an argument to the type checker " +
|
|
5691
|
-
"creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " +
|
|
5692
|
-
"shape all require an argument).",
|
|
5693
|
-
componentName || "React class",
|
|
5694
|
-
location,
|
|
5695
|
-
typeSpecName,
|
|
5696
|
-
typeof error$1
|
|
5697
|
-
);
|
|
5698
|
-
|
|
5699
|
-
setCurrentlyValidatingElement(null);
|
|
5700
|
-
}
|
|
5701
|
-
|
|
5702
|
-
if (
|
|
5703
|
-
error$1 instanceof Error &&
|
|
5704
|
-
!(error$1.message in loggedTypeFailures)
|
|
5705
|
-
) {
|
|
5706
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
5707
|
-
// same error.
|
|
5708
|
-
loggedTypeFailures[error$1.message] = true;
|
|
5709
|
-
setCurrentlyValidatingElement(element);
|
|
5710
|
-
|
|
5711
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
5712
|
-
|
|
5713
|
-
setCurrentlyValidatingElement(null);
|
|
5714
|
-
}
|
|
5715
|
-
}
|
|
5716
|
-
}
|
|
5717
|
-
}
|
|
5718
|
-
}
|
|
5719
|
-
|
|
5720
5265
|
var valueStack = [];
|
|
5721
5266
|
var fiberStack;
|
|
5722
5267
|
|
|
@@ -5768,280 +5313,33 @@ to return true:wantsResponderID| |
|
|
|
5768
5313
|
cursor.current = value;
|
|
5769
5314
|
}
|
|
5770
5315
|
|
|
5771
|
-
var
|
|
5772
|
-
|
|
5773
|
-
{
|
|
5774
|
-
warnedAboutMissingGetChildContext = {};
|
|
5775
|
-
}
|
|
5776
|
-
|
|
5777
|
-
var emptyContextObject = {};
|
|
5316
|
+
var emptyContextObject = {};
|
|
5778
5317
|
|
|
5779
5318
|
{
|
|
5780
5319
|
Object.freeze(emptyContextObject);
|
|
5781
5320
|
} // A cursor to the current merged context object on the stack.
|
|
5782
5321
|
|
|
5783
|
-
var contextStackCursor$1 = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
|
|
5784
|
-
|
|
5785
|
-
var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
|
|
5786
|
-
// We use this to get access to the parent context after we have already
|
|
5787
|
-
// pushed the next context provider, and now need to merge their contexts.
|
|
5788
|
-
|
|
5789
|
-
var previousContext = emptyContextObject;
|
|
5790
|
-
|
|
5791
|
-
function getUnmaskedContext(
|
|
5792
|
-
workInProgress,
|
|
5793
|
-
Component,
|
|
5794
|
-
didPushOwnContextIfProvider
|
|
5795
|
-
) {
|
|
5796
|
-
{
|
|
5797
|
-
if (didPushOwnContextIfProvider && isContextProvider(Component)) {
|
|
5798
|
-
// If the fiber is a context provider itself, when we read its context
|
|
5799
|
-
// we may have already pushed its own child context on the stack. A context
|
|
5800
|
-
// provider should not "see" its own child context. Therefore we read the
|
|
5801
|
-
// previous (parent) context instead for a context provider.
|
|
5802
|
-
return previousContext;
|
|
5803
|
-
}
|
|
5804
|
-
|
|
5805
|
-
return contextStackCursor$1.current;
|
|
5806
|
-
}
|
|
5807
|
-
}
|
|
5808
|
-
|
|
5809
|
-
function cacheContext(workInProgress, unmaskedContext, maskedContext) {
|
|
5810
|
-
{
|
|
5811
|
-
var instance = workInProgress.stateNode;
|
|
5812
|
-
instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
|
|
5813
|
-
instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
|
|
5814
|
-
}
|
|
5815
|
-
}
|
|
5816
|
-
|
|
5817
|
-
function getMaskedContext(workInProgress, unmaskedContext) {
|
|
5818
|
-
{
|
|
5819
|
-
var type = workInProgress.type;
|
|
5820
|
-
var contextTypes = type.contextTypes;
|
|
5821
|
-
|
|
5822
|
-
if (!contextTypes) {
|
|
5823
|
-
return emptyContextObject;
|
|
5824
|
-
} // Avoid recreating masked context unless unmasked context has changed.
|
|
5825
|
-
// Failing to do this will result in unnecessary calls to componentWillReceiveProps.
|
|
5826
|
-
// This may trigger infinite loops if componentWillReceiveProps calls setState.
|
|
5827
|
-
|
|
5828
|
-
var instance = workInProgress.stateNode;
|
|
5829
|
-
|
|
5830
|
-
if (
|
|
5831
|
-
instance &&
|
|
5832
|
-
instance.__reactInternalMemoizedUnmaskedChildContext ===
|
|
5833
|
-
unmaskedContext
|
|
5834
|
-
) {
|
|
5835
|
-
return instance.__reactInternalMemoizedMaskedChildContext;
|
|
5836
|
-
}
|
|
5837
|
-
|
|
5838
|
-
var context = {};
|
|
5839
|
-
|
|
5840
|
-
for (var key in contextTypes) {
|
|
5841
|
-
context[key] = unmaskedContext[key];
|
|
5842
|
-
}
|
|
5843
|
-
|
|
5844
|
-
{
|
|
5845
|
-
var name = getComponentNameFromFiber(workInProgress) || "Unknown";
|
|
5846
|
-
checkPropTypes(contextTypes, context, "context", name);
|
|
5847
|
-
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
|
|
5848
|
-
// Context is created before the class component is instantiated so check for instance.
|
|
5849
|
-
|
|
5850
|
-
if (instance) {
|
|
5851
|
-
cacheContext(workInProgress, unmaskedContext, context);
|
|
5852
|
-
}
|
|
5853
|
-
|
|
5854
|
-
return context;
|
|
5855
|
-
}
|
|
5856
|
-
}
|
|
5857
|
-
|
|
5858
5322
|
function hasContextChanged() {
|
|
5859
5323
|
{
|
|
5860
|
-
return
|
|
5324
|
+
return false;
|
|
5861
5325
|
}
|
|
5862
5326
|
}
|
|
5863
5327
|
|
|
5864
5328
|
function isContextProvider(type) {
|
|
5865
5329
|
{
|
|
5866
|
-
|
|
5867
|
-
return childContextTypes !== null && childContextTypes !== undefined;
|
|
5868
|
-
}
|
|
5869
|
-
}
|
|
5870
|
-
|
|
5871
|
-
function popContext(fiber) {
|
|
5872
|
-
{
|
|
5873
|
-
pop(didPerformWorkStackCursor, fiber);
|
|
5874
|
-
pop(contextStackCursor$1, fiber);
|
|
5875
|
-
}
|
|
5876
|
-
}
|
|
5877
|
-
|
|
5878
|
-
function popTopLevelContextObject(fiber) {
|
|
5879
|
-
{
|
|
5880
|
-
pop(didPerformWorkStackCursor, fiber);
|
|
5881
|
-
pop(contextStackCursor$1, fiber);
|
|
5882
|
-
}
|
|
5883
|
-
}
|
|
5884
|
-
|
|
5885
|
-
function pushTopLevelContextObject(fiber, context, didChange) {
|
|
5886
|
-
{
|
|
5887
|
-
if (contextStackCursor$1.current !== emptyContextObject) {
|
|
5888
|
-
throw new Error(
|
|
5889
|
-
"Unexpected context found on stack. " +
|
|
5890
|
-
"This error is likely caused by a bug in React. Please file an issue."
|
|
5891
|
-
);
|
|
5892
|
-
}
|
|
5893
|
-
|
|
5894
|
-
push(contextStackCursor$1, context, fiber);
|
|
5895
|
-
push(didPerformWorkStackCursor, didChange, fiber);
|
|
5330
|
+
return false;
|
|
5896
5331
|
}
|
|
5897
5332
|
}
|
|
5898
5333
|
|
|
5899
5334
|
function processChildContext(fiber, type, parentContext) {
|
|
5900
5335
|
{
|
|
5901
|
-
|
|
5902
|
-
var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
|
|
5903
|
-
// It has only been added in Fiber to match the (unintentional) behavior in Stack.
|
|
5904
|
-
|
|
5905
|
-
if (typeof instance.getChildContext !== "function") {
|
|
5906
|
-
{
|
|
5907
|
-
var componentName = getComponentNameFromFiber(fiber) || "Unknown";
|
|
5908
|
-
|
|
5909
|
-
if (!warnedAboutMissingGetChildContext[componentName]) {
|
|
5910
|
-
warnedAboutMissingGetChildContext[componentName] = true;
|
|
5911
|
-
|
|
5912
|
-
error(
|
|
5913
|
-
"%s.childContextTypes is specified but there is no getChildContext() method " +
|
|
5914
|
-
"on the instance. You can either define getChildContext() on %s or remove " +
|
|
5915
|
-
"childContextTypes from it.",
|
|
5916
|
-
componentName,
|
|
5917
|
-
componentName
|
|
5918
|
-
);
|
|
5919
|
-
}
|
|
5920
|
-
}
|
|
5921
|
-
|
|
5922
|
-
return parentContext;
|
|
5923
|
-
}
|
|
5924
|
-
|
|
5925
|
-
var childContext = instance.getChildContext();
|
|
5926
|
-
|
|
5927
|
-
for (var contextKey in childContext) {
|
|
5928
|
-
if (!(contextKey in childContextTypes)) {
|
|
5929
|
-
throw new Error(
|
|
5930
|
-
(getComponentNameFromFiber(fiber) || "Unknown") +
|
|
5931
|
-
'.getChildContext(): key "' +
|
|
5932
|
-
contextKey +
|
|
5933
|
-
'" is not defined in childContextTypes.'
|
|
5934
|
-
);
|
|
5935
|
-
}
|
|
5936
|
-
}
|
|
5937
|
-
|
|
5938
|
-
{
|
|
5939
|
-
var name = getComponentNameFromFiber(fiber) || "Unknown";
|
|
5940
|
-
checkPropTypes(
|
|
5941
|
-
childContextTypes,
|
|
5942
|
-
childContext,
|
|
5943
|
-
"child context",
|
|
5944
|
-
name
|
|
5945
|
-
);
|
|
5946
|
-
}
|
|
5947
|
-
|
|
5948
|
-
return assign({}, parentContext, childContext);
|
|
5949
|
-
}
|
|
5950
|
-
}
|
|
5951
|
-
|
|
5952
|
-
function pushContextProvider(workInProgress) {
|
|
5953
|
-
{
|
|
5954
|
-
var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
|
|
5955
|
-
// If the instance does not exist yet, we will push null at first,
|
|
5956
|
-
// and replace it on the stack later when invalidating the context.
|
|
5957
|
-
|
|
5958
|
-
var memoizedMergedChildContext =
|
|
5959
|
-
(instance && instance.__reactInternalMemoizedMergedChildContext) ||
|
|
5960
|
-
emptyContextObject; // Remember the parent context so we can merge with it later.
|
|
5961
|
-
// Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
|
|
5962
|
-
|
|
5963
|
-
previousContext = contextStackCursor$1.current;
|
|
5964
|
-
push(contextStackCursor$1, memoizedMergedChildContext, workInProgress);
|
|
5965
|
-
push(
|
|
5966
|
-
didPerformWorkStackCursor,
|
|
5967
|
-
didPerformWorkStackCursor.current,
|
|
5968
|
-
workInProgress
|
|
5969
|
-
);
|
|
5970
|
-
return true;
|
|
5971
|
-
}
|
|
5972
|
-
}
|
|
5973
|
-
|
|
5974
|
-
function invalidateContextProvider(workInProgress, type, didChange) {
|
|
5975
|
-
{
|
|
5976
|
-
var instance = workInProgress.stateNode;
|
|
5977
|
-
|
|
5978
|
-
if (!instance) {
|
|
5979
|
-
throw new Error(
|
|
5980
|
-
"Expected to have an instance by this point. " +
|
|
5981
|
-
"This error is likely caused by a bug in React. Please file an issue."
|
|
5982
|
-
);
|
|
5983
|
-
}
|
|
5984
|
-
|
|
5985
|
-
if (didChange) {
|
|
5986
|
-
// Merge parent and own context.
|
|
5987
|
-
// Skip this if we're not updating due to sCU.
|
|
5988
|
-
// This avoids unnecessarily recomputing memoized values.
|
|
5989
|
-
var mergedContext = processChildContext(
|
|
5990
|
-
workInProgress,
|
|
5991
|
-
type,
|
|
5992
|
-
previousContext
|
|
5993
|
-
);
|
|
5994
|
-
instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
|
|
5995
|
-
// It is important to unwind the context in the reverse order.
|
|
5996
|
-
|
|
5997
|
-
pop(didPerformWorkStackCursor, workInProgress);
|
|
5998
|
-
pop(contextStackCursor$1, workInProgress); // Now push the new context and mark that it has changed.
|
|
5999
|
-
|
|
6000
|
-
push(contextStackCursor$1, mergedContext, workInProgress);
|
|
6001
|
-
push(didPerformWorkStackCursor, didChange, workInProgress);
|
|
6002
|
-
} else {
|
|
6003
|
-
pop(didPerformWorkStackCursor, workInProgress);
|
|
6004
|
-
push(didPerformWorkStackCursor, didChange, workInProgress);
|
|
6005
|
-
}
|
|
5336
|
+
return parentContext;
|
|
6006
5337
|
}
|
|
6007
5338
|
}
|
|
6008
5339
|
|
|
6009
5340
|
function findCurrentUnmaskedContext(fiber) {
|
|
6010
5341
|
{
|
|
6011
|
-
|
|
6012
|
-
// makes sense elsewhere
|
|
6013
|
-
if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {
|
|
6014
|
-
throw new Error(
|
|
6015
|
-
"Expected subtree parent to be a mounted class component. " +
|
|
6016
|
-
"This error is likely caused by a bug in React. Please file an issue."
|
|
6017
|
-
);
|
|
6018
|
-
}
|
|
6019
|
-
|
|
6020
|
-
var node = fiber;
|
|
6021
|
-
|
|
6022
|
-
do {
|
|
6023
|
-
switch (node.tag) {
|
|
6024
|
-
case HostRoot:
|
|
6025
|
-
return node.stateNode.context;
|
|
6026
|
-
|
|
6027
|
-
case ClassComponent: {
|
|
6028
|
-
var Component = node.type;
|
|
6029
|
-
|
|
6030
|
-
if (isContextProvider(Component)) {
|
|
6031
|
-
return node.stateNode.__reactInternalMemoizedMergedChildContext;
|
|
6032
|
-
}
|
|
6033
|
-
|
|
6034
|
-
break;
|
|
6035
|
-
}
|
|
6036
|
-
} // $FlowFixMe[incompatible-type] we bail out when we get a null
|
|
6037
|
-
|
|
6038
|
-
node = node.return;
|
|
6039
|
-
} while (node !== null);
|
|
6040
|
-
|
|
6041
|
-
throw new Error(
|
|
6042
|
-
"Found unexpected detached subtree parent. " +
|
|
6043
|
-
"This error is likely caused by a bug in React. Please file an issue."
|
|
6044
|
-
);
|
|
5342
|
+
return emptyContextObject;
|
|
6045
5343
|
}
|
|
6046
5344
|
}
|
|
6047
5345
|
|
|
@@ -6160,16 +5458,8 @@ to return true:wantsResponderID| |
|
|
|
6160
5458
|
}
|
|
6161
5459
|
|
|
6162
5460
|
var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches
|
|
6163
|
-
// due to earlier mismatches or a suspended fiber.
|
|
6164
|
-
|
|
6165
|
-
var didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary
|
|
6166
5461
|
|
|
6167
5462
|
var hydrationErrors = null;
|
|
6168
|
-
function didSuspendOrErrorWhileHydratingDEV() {
|
|
6169
|
-
{
|
|
6170
|
-
return didSuspendOrErrorDEV;
|
|
6171
|
-
}
|
|
6172
|
-
}
|
|
6173
5463
|
|
|
6174
5464
|
function prepareToHydrateHostInstance(fiber, hostContext) {
|
|
6175
5465
|
{
|
|
@@ -6829,7 +6119,31 @@ to return true:wantsResponderID| |
|
|
|
6829
6119
|
} // TODO: Can we land supportsMicrotasks? Which environments don't support it?
|
|
6830
6120
|
// Alternatively, can we move this check to the host config?
|
|
6831
6121
|
|
|
6832
|
-
{
|
|
6122
|
+
if (supportsMicrotasks) {
|
|
6123
|
+
scheduleMicrotask(function () {
|
|
6124
|
+
// In Safari, appending an iframe forces microtasks to run.
|
|
6125
|
+
// https://github.com/facebook/react/issues/22459
|
|
6126
|
+
// We don't support running callbacks in the middle of render
|
|
6127
|
+
// or commit so we need to check against that.
|
|
6128
|
+
var executionContext = getExecutionContext();
|
|
6129
|
+
|
|
6130
|
+
if (
|
|
6131
|
+
(executionContext & (RenderContext | CommitContext)) !==
|
|
6132
|
+
NoContext
|
|
6133
|
+
) {
|
|
6134
|
+
// Note that this would still prematurely flush the callbacks
|
|
6135
|
+
// if this happens outside render or commit phase (e.g. in an event).
|
|
6136
|
+
// Intentionally using a macrotask instead of a microtask here. This is
|
|
6137
|
+
// wrong semantically but it prevents an infinite loop. The bug is
|
|
6138
|
+
// Safari's, not ours, so we just do our best to not crash even though
|
|
6139
|
+
// the behavior isn't completely correct.
|
|
6140
|
+
scheduleCallback$2(ImmediatePriority, cb);
|
|
6141
|
+
return;
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6144
|
+
cb();
|
|
6145
|
+
});
|
|
6146
|
+
} else {
|
|
6833
6147
|
// If microtasks are not supported, use Scheduler.
|
|
6834
6148
|
scheduleCallback$2(ImmediatePriority, cb);
|
|
6835
6149
|
}
|
|
@@ -7511,6 +6825,9 @@ to return true:wantsResponderID| |
|
|
|
7511
6825
|
}
|
|
7512
6826
|
}
|
|
7513
6827
|
|
|
6828
|
+
// $FlowFixMe[method-unbinding]
|
|
6829
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
6830
|
+
|
|
7514
6831
|
/**
|
|
7515
6832
|
* Performs equality by iterating through keys on an object and returning false
|
|
7516
6833
|
* when any key has values which are not strictly equal between the arguments.
|
|
@@ -7552,6 +6869,61 @@ to return true:wantsResponderID| |
|
|
|
7552
6869
|
return true;
|
|
7553
6870
|
}
|
|
7554
6871
|
|
|
6872
|
+
function describeBuiltInComponentFrame(name, ownerFn) {
|
|
6873
|
+
{
|
|
6874
|
+
var ownerName = null;
|
|
6875
|
+
|
|
6876
|
+
if (ownerFn) {
|
|
6877
|
+
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
6878
|
+
}
|
|
6879
|
+
|
|
6880
|
+
return describeComponentFrame(name, ownerName);
|
|
6881
|
+
}
|
|
6882
|
+
}
|
|
6883
|
+
function describeDebugInfoFrame(name, env) {
|
|
6884
|
+
return describeBuiltInComponentFrame(
|
|
6885
|
+
name + (env ? " (" + env + ")" : ""),
|
|
6886
|
+
null
|
|
6887
|
+
);
|
|
6888
|
+
}
|
|
6889
|
+
|
|
6890
|
+
{
|
|
6891
|
+
var PossiblyWeakMap$1 = typeof WeakMap === "function" ? WeakMap : Map;
|
|
6892
|
+
new PossiblyWeakMap$1();
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
function describeComponentFrame(name, ownerName) {
|
|
6896
|
+
var sourceInfo = "";
|
|
6897
|
+
|
|
6898
|
+
if (ownerName) {
|
|
6899
|
+
sourceInfo = " (created by " + ownerName + ")";
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
return "\n in " + (name || "Unknown") + sourceInfo;
|
|
6903
|
+
}
|
|
6904
|
+
|
|
6905
|
+
function describeClassComponentFrame(ctor, ownerFn) {
|
|
6906
|
+
{
|
|
6907
|
+
return describeFunctionComponentFrame(ctor, ownerFn);
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6910
|
+
function describeFunctionComponentFrame(fn, ownerFn) {
|
|
6911
|
+
{
|
|
6912
|
+
if (!fn) {
|
|
6913
|
+
return "";
|
|
6914
|
+
}
|
|
6915
|
+
|
|
6916
|
+
var name = fn.displayName || fn.name || null;
|
|
6917
|
+
var ownerName = null;
|
|
6918
|
+
|
|
6919
|
+
if (ownerFn) {
|
|
6920
|
+
ownerName = ownerFn.displayName || ownerFn.name || null;
|
|
6921
|
+
}
|
|
6922
|
+
|
|
6923
|
+
return describeComponentFrame(name, ownerName);
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
6926
|
+
|
|
7555
6927
|
function describeFiber(fiber) {
|
|
7556
6928
|
var owner = fiber._debugOwner ? fiber._debugOwner.type : null;
|
|
7557
6929
|
|
|
@@ -7592,7 +6964,22 @@ to return true:wantsResponderID| |
|
|
|
7592
6964
|
var node = workInProgress;
|
|
7593
6965
|
|
|
7594
6966
|
do {
|
|
7595
|
-
info += describeFiber(node);
|
|
6967
|
+
info += describeFiber(node);
|
|
6968
|
+
|
|
6969
|
+
if (true) {
|
|
6970
|
+
// Add any Server Component stack frames in reverse order.
|
|
6971
|
+
var debugInfo = node._debugInfo;
|
|
6972
|
+
|
|
6973
|
+
if (debugInfo) {
|
|
6974
|
+
for (var i = debugInfo.length - 1; i >= 0; i--) {
|
|
6975
|
+
var entry = debugInfo[i];
|
|
6976
|
+
|
|
6977
|
+
if (typeof entry.name === "string") {
|
|
6978
|
+
info += describeDebugInfoFrame(entry.name, entry.env);
|
|
6979
|
+
}
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6982
|
+
} // $FlowFixMe[incompatible-type] we bail out when we get a null
|
|
7596
6983
|
|
|
7597
6984
|
node = node.return;
|
|
7598
6985
|
} while (node);
|
|
@@ -7838,7 +7225,7 @@ to return true:wantsResponderID| |
|
|
|
7838
7225
|
|
|
7839
7226
|
error(
|
|
7840
7227
|
"Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. " +
|
|
7841
|
-
"See https://
|
|
7228
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7842
7229
|
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
|
7843
7230
|
"\nPlease update the following components: %s",
|
|
7844
7231
|
sortedNames
|
|
@@ -7853,11 +7240,11 @@ to return true:wantsResponderID| |
|
|
|
7853
7240
|
error(
|
|
7854
7241
|
"Using UNSAFE_componentWillReceiveProps in strict mode is not recommended " +
|
|
7855
7242
|
"and may indicate bugs in your code. " +
|
|
7856
|
-
"See https://
|
|
7243
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7857
7244
|
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
|
7858
7245
|
"* If you're updating state whenever props change, " +
|
|
7859
7246
|
"refactor your code to use memoization techniques or move it to " +
|
|
7860
|
-
"static getDerivedStateFromProps. Learn more at: https://
|
|
7247
|
+
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
|
7861
7248
|
"\nPlease update the following components: %s",
|
|
7862
7249
|
_sortedNames
|
|
7863
7250
|
);
|
|
@@ -7871,7 +7258,7 @@ to return true:wantsResponderID| |
|
|
|
7871
7258
|
error(
|
|
7872
7259
|
"Using UNSAFE_componentWillUpdate in strict mode is not recommended " +
|
|
7873
7260
|
"and may indicate bugs in your code. " +
|
|
7874
|
-
"See https://
|
|
7261
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7875
7262
|
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
|
7876
7263
|
"\nPlease update the following components: %s",
|
|
7877
7264
|
_sortedNames2
|
|
@@ -7885,7 +7272,7 @@ to return true:wantsResponderID| |
|
|
|
7885
7272
|
|
|
7886
7273
|
warn(
|
|
7887
7274
|
"componentWillMount has been renamed, and is not recommended for use. " +
|
|
7888
|
-
"See https://
|
|
7275
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7889
7276
|
"* Move code with side effects to componentDidMount, and set initial state in the constructor.\n" +
|
|
7890
7277
|
"* Rename componentWillMount to UNSAFE_componentWillMount to suppress " +
|
|
7891
7278
|
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
|
@@ -7903,11 +7290,11 @@ to return true:wantsResponderID| |
|
|
|
7903
7290
|
|
|
7904
7291
|
warn(
|
|
7905
7292
|
"componentWillReceiveProps has been renamed, and is not recommended for use. " +
|
|
7906
|
-
"See https://
|
|
7293
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7907
7294
|
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
|
7908
7295
|
"* If you're updating state whenever props change, refactor your " +
|
|
7909
7296
|
"code to use memoization techniques or move it to " +
|
|
7910
|
-
"static getDerivedStateFromProps. Learn more at: https://
|
|
7297
|
+
"static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n" +
|
|
7911
7298
|
"* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress " +
|
|
7912
7299
|
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
|
7913
7300
|
"To rename all deprecated lifecycles to their new names, you can run " +
|
|
@@ -7924,7 +7311,7 @@ to return true:wantsResponderID| |
|
|
|
7924
7311
|
|
|
7925
7312
|
warn(
|
|
7926
7313
|
"componentWillUpdate has been renamed, and is not recommended for use. " +
|
|
7927
|
-
"See https://
|
|
7314
|
+
"See https://react.dev/link/unsafe-component-lifecycles for details.\n\n" +
|
|
7928
7315
|
"* Move data fetching code or side effects to componentDidUpdate.\n" +
|
|
7929
7316
|
"* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress " +
|
|
7930
7317
|
"this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. " +
|
|
@@ -7997,7 +7384,7 @@ to return true:wantsResponderID| |
|
|
|
7997
7384
|
"\n\nThe old API will be supported in all 16.x releases, but applications " +
|
|
7998
7385
|
"using it should migrate to the new version." +
|
|
7999
7386
|
"\n\nPlease update the following components: %s" +
|
|
8000
|
-
"\n\nLearn more about this warning here: https://
|
|
7387
|
+
"\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
|
|
8001
7388
|
sortedNames
|
|
8002
7389
|
);
|
|
8003
7390
|
} finally {
|
|
@@ -8277,20 +7664,20 @@ to return true:wantsResponderID| |
|
|
|
8277
7664
|
rejectedThenable.reason = error;
|
|
8278
7665
|
}
|
|
8279
7666
|
}
|
|
8280
|
-
);
|
|
7667
|
+
);
|
|
7668
|
+
} // Check one more time in case the thenable resolved synchronously.
|
|
8281
7669
|
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
7670
|
+
switch (thenable.status) {
|
|
7671
|
+
case "fulfilled": {
|
|
7672
|
+
var fulfilledThenable = thenable;
|
|
7673
|
+
return fulfilledThenable.value;
|
|
7674
|
+
}
|
|
8287
7675
|
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
}
|
|
7676
|
+
case "rejected": {
|
|
7677
|
+
var rejectedThenable = thenable;
|
|
7678
|
+
var _rejectedError = rejectedThenable.reason;
|
|
7679
|
+
checkIfUseWrappedInAsyncCatch(_rejectedError);
|
|
7680
|
+
throw _rejectedError;
|
|
8294
7681
|
}
|
|
8295
7682
|
} // Suspend.
|
|
8296
7683
|
//
|
|
@@ -8368,11 +7755,26 @@ to return true:wantsResponderID| |
|
|
|
8368
7755
|
|
|
8369
7756
|
var thenableState$1 = null;
|
|
8370
7757
|
var thenableIndexCounter$1 = 0;
|
|
7758
|
+
|
|
7759
|
+
function mergeDebugInfo(outer, inner) {
|
|
7760
|
+
if (inner == null) {
|
|
7761
|
+
return outer;
|
|
7762
|
+
} else if (outer === null) {
|
|
7763
|
+
return inner;
|
|
7764
|
+
} else {
|
|
7765
|
+
// If we have two debugInfo, we need to create a new one. This makes the array no longer
|
|
7766
|
+
// live so we'll miss any future updates if we received more so ideally we should always
|
|
7767
|
+
// do this after both have fully resolved/unsuspended.
|
|
7768
|
+
return outer.concat(inner);
|
|
7769
|
+
}
|
|
7770
|
+
}
|
|
7771
|
+
|
|
8371
7772
|
var didWarnAboutMaps;
|
|
8372
7773
|
var didWarnAboutGenerators;
|
|
8373
7774
|
var didWarnAboutStringRefs;
|
|
8374
7775
|
var ownerHasKeyUseWarning;
|
|
8375
7776
|
var ownerHasFunctionTypeWarning;
|
|
7777
|
+
var ownerHasSymbolTypeWarning;
|
|
8376
7778
|
|
|
8377
7779
|
var warnForMissingKey = function (child, returnFiber) {};
|
|
8378
7780
|
|
|
@@ -8388,6 +7790,7 @@ to return true:wantsResponderID| |
|
|
|
8388
7790
|
|
|
8389
7791
|
ownerHasKeyUseWarning = {};
|
|
8390
7792
|
ownerHasFunctionTypeWarning = {};
|
|
7793
|
+
ownerHasSymbolTypeWarning = {};
|
|
8391
7794
|
|
|
8392
7795
|
warnForMissingKey = function (child, returnFiber) {
|
|
8393
7796
|
if (child === null || typeof child !== "object") {
|
|
@@ -8417,7 +7820,7 @@ to return true:wantsResponderID| |
|
|
|
8417
7820
|
|
|
8418
7821
|
error(
|
|
8419
7822
|
"Each child in a list should have a unique " +
|
|
8420
|
-
'"key" prop. See https://
|
|
7823
|
+
'"key" prop. See https://react.dev/link/warning-keys for ' +
|
|
8421
7824
|
"more information."
|
|
8422
7825
|
);
|
|
8423
7826
|
};
|
|
@@ -8438,122 +7841,128 @@ to return true:wantsResponderID| |
|
|
|
8438
7841
|
return trackUsedThenable(thenableState$1, thenable, index);
|
|
8439
7842
|
}
|
|
8440
7843
|
|
|
8441
|
-
function
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
if (
|
|
8451
|
-
// Will already throw with "Function components cannot have string refs"
|
|
8452
|
-
!(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with "Function components cannot be given refs"
|
|
8453
|
-
!(
|
|
8454
|
-
typeof element.type === "function" && !isReactClass(element.type)
|
|
8455
|
-
) && // Will already throw with "Element ref was specified as a string (someStringRef) but no owner was set"
|
|
8456
|
-
element._owner
|
|
8457
|
-
) {
|
|
8458
|
-
var componentName =
|
|
8459
|
-
getComponentNameFromFiber(returnFiber) || "Component";
|
|
8460
|
-
|
|
8461
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
8462
|
-
error(
|
|
8463
|
-
'Component "%s" contains the string ref "%s". Support for string refs ' +
|
|
8464
|
-
"will be removed in a future major release. We recommend using " +
|
|
8465
|
-
"useRef() or createRef() instead. " +
|
|
8466
|
-
"Learn more about using refs safely here: " +
|
|
8467
|
-
"https://reactjs.org/link/strict-mode-string-ref",
|
|
8468
|
-
componentName,
|
|
8469
|
-
mixedRef
|
|
8470
|
-
);
|
|
8471
|
-
|
|
8472
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
8473
|
-
}
|
|
8474
|
-
}
|
|
8475
|
-
}
|
|
7844
|
+
function convertStringRefToCallbackRef(
|
|
7845
|
+
returnFiber,
|
|
7846
|
+
current,
|
|
7847
|
+
element,
|
|
7848
|
+
mixedRef
|
|
7849
|
+
) {
|
|
7850
|
+
{
|
|
7851
|
+
checkPropStringCoercion(mixedRef, "ref");
|
|
7852
|
+
}
|
|
8476
7853
|
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
var inst;
|
|
7854
|
+
var stringRef = "" + mixedRef;
|
|
7855
|
+
var owner = element._owner;
|
|
8480
7856
|
|
|
8481
|
-
|
|
8482
|
-
|
|
7857
|
+
if (!owner) {
|
|
7858
|
+
throw new Error(
|
|
7859
|
+
"Element ref was specified as a string (" +
|
|
7860
|
+
stringRef +
|
|
7861
|
+
") but no owner was set. This could happen for one of" +
|
|
7862
|
+
" the following reasons:\n" +
|
|
7863
|
+
"1. You may be adding a ref to a function component\n" +
|
|
7864
|
+
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
|
7865
|
+
"3. You have multiple copies of React loaded\n" +
|
|
7866
|
+
"See https://react.dev/link/refs-must-have-owner for more information."
|
|
7867
|
+
);
|
|
7868
|
+
}
|
|
8483
7869
|
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
7870
|
+
if (owner.tag !== ClassComponent) {
|
|
7871
|
+
throw new Error(
|
|
7872
|
+
"Function components cannot have string refs. " +
|
|
7873
|
+
"We recommend using useRef() instead. " +
|
|
7874
|
+
"Learn more about using refs safely here: " +
|
|
7875
|
+
"https://react.dev/link/strict-mode-string-ref"
|
|
7876
|
+
);
|
|
7877
|
+
}
|
|
8492
7878
|
|
|
8493
|
-
|
|
8494
|
-
|
|
7879
|
+
{
|
|
7880
|
+
if (
|
|
7881
|
+
// Will already warn with "Function components cannot be given refs"
|
|
7882
|
+
!(typeof element.type === "function" && !isReactClass(element.type))
|
|
7883
|
+
) {
|
|
7884
|
+
var componentName =
|
|
7885
|
+
getComponentNameFromFiber(returnFiber) || "Component";
|
|
8495
7886
|
|
|
8496
|
-
if (!
|
|
8497
|
-
|
|
8498
|
-
"
|
|
8499
|
-
|
|
8500
|
-
"
|
|
8501
|
-
"
|
|
7887
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
7888
|
+
error(
|
|
7889
|
+
'Component "%s" contains the string ref "%s". Support for string refs ' +
|
|
7890
|
+
"will be removed in a future major release. We recommend using " +
|
|
7891
|
+
"useRef() or createRef() instead. " +
|
|
7892
|
+
"Learn more about using refs safely here: " +
|
|
7893
|
+
"https://react.dev/link/strict-mode-string-ref",
|
|
7894
|
+
componentName,
|
|
7895
|
+
stringRef
|
|
8502
7896
|
);
|
|
8503
|
-
} // Assigning this to a const so Flow knows it won't change in the closure
|
|
8504
|
-
|
|
8505
|
-
var resolvedInst = inst;
|
|
8506
7897
|
|
|
8507
|
-
|
|
8508
|
-
checkPropStringCoercion(mixedRef, "ref");
|
|
7898
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
8509
7899
|
}
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
8510
7902
|
|
|
8511
|
-
|
|
7903
|
+
var inst = owner.stateNode;
|
|
8512
7904
|
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
7905
|
+
if (!inst) {
|
|
7906
|
+
throw new Error(
|
|
7907
|
+
"Missing owner for string ref " +
|
|
7908
|
+
stringRef +
|
|
7909
|
+
". This error is likely caused by a " +
|
|
7910
|
+
"bug in React. Please file an issue."
|
|
7911
|
+
);
|
|
7912
|
+
} // Check if previous string ref matches new string ref
|
|
8521
7913
|
|
|
8522
|
-
|
|
8523
|
-
|
|
7914
|
+
if (
|
|
7915
|
+
current !== null &&
|
|
7916
|
+
current.ref !== null &&
|
|
7917
|
+
typeof current.ref === "function" &&
|
|
7918
|
+
current.ref._stringRef === stringRef
|
|
7919
|
+
) {
|
|
7920
|
+
// Reuse the existing string ref
|
|
7921
|
+
var currentRef = current.ref;
|
|
7922
|
+
return currentRef;
|
|
7923
|
+
} // Create a new string ref
|
|
8524
7924
|
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
} else {
|
|
8528
|
-
refs[stringRef] = value;
|
|
8529
|
-
}
|
|
8530
|
-
};
|
|
7925
|
+
var ref = function (value) {
|
|
7926
|
+
var refs = inst.refs;
|
|
8531
7927
|
|
|
8532
|
-
|
|
8533
|
-
|
|
7928
|
+
if (value === null) {
|
|
7929
|
+
delete refs[stringRef];
|
|
8534
7930
|
} else {
|
|
8535
|
-
|
|
8536
|
-
throw new Error(
|
|
8537
|
-
"Expected ref to be a function, a string, an object returned by React.createRef(), or null."
|
|
8538
|
-
);
|
|
8539
|
-
}
|
|
8540
|
-
|
|
8541
|
-
if (!element._owner) {
|
|
8542
|
-
throw new Error(
|
|
8543
|
-
"Element ref was specified as a string (" +
|
|
8544
|
-
mixedRef +
|
|
8545
|
-
") but no owner was set. This could happen for one of" +
|
|
8546
|
-
" the following reasons:\n" +
|
|
8547
|
-
"1. You may be adding a ref to a function component\n" +
|
|
8548
|
-
"2. You may be adding a ref to a component that was not created inside a component's render method\n" +
|
|
8549
|
-
"3. You have multiple copies of React loaded\n" +
|
|
8550
|
-
"See https://reactjs.org/link/refs-must-have-owner for more information."
|
|
8551
|
-
);
|
|
8552
|
-
}
|
|
7931
|
+
refs[stringRef] = value;
|
|
8553
7932
|
}
|
|
7933
|
+
};
|
|
7934
|
+
|
|
7935
|
+
ref._stringRef = stringRef;
|
|
7936
|
+
return ref;
|
|
7937
|
+
}
|
|
7938
|
+
|
|
7939
|
+
function coerceRef(returnFiber, current, workInProgress, element) {
|
|
7940
|
+
var mixedRef;
|
|
7941
|
+
|
|
7942
|
+
{
|
|
7943
|
+
// Old behavior.
|
|
7944
|
+
mixedRef = element.ref;
|
|
8554
7945
|
}
|
|
8555
7946
|
|
|
8556
|
-
|
|
7947
|
+
var coercedRef;
|
|
7948
|
+
|
|
7949
|
+
if (
|
|
7950
|
+
typeof mixedRef === "string" ||
|
|
7951
|
+
typeof mixedRef === "number" ||
|
|
7952
|
+
typeof mixedRef === "boolean"
|
|
7953
|
+
) {
|
|
7954
|
+
coercedRef = convertStringRefToCallbackRef(
|
|
7955
|
+
returnFiber,
|
|
7956
|
+
current,
|
|
7957
|
+
element,
|
|
7958
|
+
mixedRef
|
|
7959
|
+
);
|
|
7960
|
+
} else {
|
|
7961
|
+
coercedRef = mixedRef;
|
|
7962
|
+
} // TODO: If enableRefAsProp is on, we shouldn't use the `ref` field. We
|
|
7963
|
+
// should always read the ref from the prop.
|
|
7964
|
+
|
|
7965
|
+
workInProgress.ref = coercedRef;
|
|
8557
7966
|
}
|
|
8558
7967
|
|
|
8559
7968
|
function throwOnInvalidObjectType(returnFiber, newChild) {
|
|
@@ -8570,22 +7979,68 @@ to return true:wantsResponderID| |
|
|
|
8570
7979
|
);
|
|
8571
7980
|
}
|
|
8572
7981
|
|
|
8573
|
-
function warnOnFunctionType(returnFiber) {
|
|
7982
|
+
function warnOnFunctionType(returnFiber, invalidChild) {
|
|
8574
7983
|
{
|
|
8575
|
-
var
|
|
8576
|
-
getComponentNameFromFiber(returnFiber) || "Component";
|
|
7984
|
+
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
|
8577
7985
|
|
|
8578
|
-
if (ownerHasFunctionTypeWarning[
|
|
7986
|
+
if (ownerHasFunctionTypeWarning[parentName]) {
|
|
8579
7987
|
return;
|
|
8580
7988
|
}
|
|
8581
7989
|
|
|
8582
|
-
ownerHasFunctionTypeWarning[
|
|
7990
|
+
ownerHasFunctionTypeWarning[parentName] = true;
|
|
7991
|
+
var name = invalidChild.displayName || invalidChild.name || "Component";
|
|
8583
7992
|
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
"
|
|
8587
|
-
|
|
8588
|
-
|
|
7993
|
+
if (returnFiber.tag === HostRoot) {
|
|
7994
|
+
error(
|
|
7995
|
+
"Functions are not valid as a React child. This may happen if " +
|
|
7996
|
+
"you return %s instead of <%s /> from render. " +
|
|
7997
|
+
"Or maybe you meant to call this function rather than return it.\n" +
|
|
7998
|
+
" root.render(%s)",
|
|
7999
|
+
name,
|
|
8000
|
+
name,
|
|
8001
|
+
name
|
|
8002
|
+
);
|
|
8003
|
+
} else {
|
|
8004
|
+
error(
|
|
8005
|
+
"Functions are not valid as a React child. This may happen if " +
|
|
8006
|
+
"you return %s instead of <%s /> from render. " +
|
|
8007
|
+
"Or maybe you meant to call this function rather than return it.\n" +
|
|
8008
|
+
" <%s>{%s}</%s>",
|
|
8009
|
+
name,
|
|
8010
|
+
name,
|
|
8011
|
+
parentName,
|
|
8012
|
+
name,
|
|
8013
|
+
parentName
|
|
8014
|
+
);
|
|
8015
|
+
}
|
|
8016
|
+
}
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
function warnOnSymbolType(returnFiber, invalidChild) {
|
|
8020
|
+
{
|
|
8021
|
+
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
|
8022
|
+
|
|
8023
|
+
if (ownerHasSymbolTypeWarning[parentName]) {
|
|
8024
|
+
return;
|
|
8025
|
+
}
|
|
8026
|
+
|
|
8027
|
+
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
|
8028
|
+
|
|
8029
|
+
var name = String(invalidChild);
|
|
8030
|
+
|
|
8031
|
+
if (returnFiber.tag === HostRoot) {
|
|
8032
|
+
error(
|
|
8033
|
+
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
|
8034
|
+
name
|
|
8035
|
+
);
|
|
8036
|
+
} else {
|
|
8037
|
+
error(
|
|
8038
|
+
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
|
8039
|
+
parentName,
|
|
8040
|
+
name,
|
|
8041
|
+
parentName
|
|
8042
|
+
);
|
|
8043
|
+
}
|
|
8589
8044
|
}
|
|
8590
8045
|
}
|
|
8591
8046
|
|
|
@@ -8632,7 +8087,7 @@ to return true:wantsResponderID| |
|
|
|
8632
8087
|
return null;
|
|
8633
8088
|
}
|
|
8634
8089
|
|
|
8635
|
-
function mapRemainingChildren(
|
|
8090
|
+
function mapRemainingChildren(currentFirstChild) {
|
|
8636
8091
|
// Add the remaining children to a temporary map so that we can find them by
|
|
8637
8092
|
// keys quickly. Implicit (null) keys get added to this set with their index
|
|
8638
8093
|
// instead.
|
|
@@ -8701,7 +8156,13 @@ to return true:wantsResponderID| |
|
|
|
8701
8156
|
return newFiber;
|
|
8702
8157
|
}
|
|
8703
8158
|
|
|
8704
|
-
function updateTextNode(
|
|
8159
|
+
function updateTextNode(
|
|
8160
|
+
returnFiber,
|
|
8161
|
+
current,
|
|
8162
|
+
textContent,
|
|
8163
|
+
lanes,
|
|
8164
|
+
debugInfo
|
|
8165
|
+
) {
|
|
8705
8166
|
if (current === null || current.tag !== HostText) {
|
|
8706
8167
|
// Insert
|
|
8707
8168
|
var created = createFiberFromText(
|
|
@@ -8710,16 +8171,26 @@ to return true:wantsResponderID| |
|
|
|
8710
8171
|
lanes
|
|
8711
8172
|
);
|
|
8712
8173
|
created.return = returnFiber;
|
|
8174
|
+
|
|
8175
|
+
{
|
|
8176
|
+
created._debugInfo = debugInfo;
|
|
8177
|
+
}
|
|
8178
|
+
|
|
8713
8179
|
return created;
|
|
8714
8180
|
} else {
|
|
8715
8181
|
// Update
|
|
8716
8182
|
var existing = useFiber(current, textContent);
|
|
8717
8183
|
existing.return = returnFiber;
|
|
8184
|
+
|
|
8185
|
+
{
|
|
8186
|
+
existing._debugInfo = debugInfo;
|
|
8187
|
+
}
|
|
8188
|
+
|
|
8718
8189
|
return existing;
|
|
8719
8190
|
}
|
|
8720
8191
|
}
|
|
8721
8192
|
|
|
8722
|
-
function updateElement(returnFiber, current, element, lanes) {
|
|
8193
|
+
function updateElement(returnFiber, current, element, lanes, debugInfo) {
|
|
8723
8194
|
var elementType = element.type;
|
|
8724
8195
|
|
|
8725
8196
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
@@ -8728,7 +8199,8 @@ to return true:wantsResponderID| |
|
|
|
8728
8199
|
current,
|
|
8729
8200
|
element.props.children,
|
|
8730
8201
|
lanes,
|
|
8731
|
-
element.key
|
|
8202
|
+
element.key,
|
|
8203
|
+
debugInfo
|
|
8732
8204
|
);
|
|
8733
8205
|
}
|
|
8734
8206
|
|
|
@@ -8746,11 +8218,12 @@ to return true:wantsResponderID| |
|
|
|
8746
8218
|
) {
|
|
8747
8219
|
// Move based on index
|
|
8748
8220
|
var existing = useFiber(current, element.props);
|
|
8749
|
-
|
|
8221
|
+
coerceRef(returnFiber, current, existing, element);
|
|
8750
8222
|
existing.return = returnFiber;
|
|
8751
8223
|
|
|
8752
8224
|
{
|
|
8753
8225
|
existing._debugOwner = element._owner;
|
|
8226
|
+
existing._debugInfo = debugInfo;
|
|
8754
8227
|
}
|
|
8755
8228
|
|
|
8756
8229
|
return existing;
|
|
@@ -8758,12 +8231,17 @@ to return true:wantsResponderID| |
|
|
|
8758
8231
|
} // Insert
|
|
8759
8232
|
|
|
8760
8233
|
var created = createFiberFromElement(element, returnFiber.mode, lanes);
|
|
8761
|
-
|
|
8234
|
+
coerceRef(returnFiber, current, created, element);
|
|
8762
8235
|
created.return = returnFiber;
|
|
8236
|
+
|
|
8237
|
+
{
|
|
8238
|
+
created._debugInfo = debugInfo;
|
|
8239
|
+
}
|
|
8240
|
+
|
|
8763
8241
|
return created;
|
|
8764
8242
|
}
|
|
8765
8243
|
|
|
8766
|
-
function updatePortal(returnFiber, current, portal, lanes) {
|
|
8244
|
+
function updatePortal(returnFiber, current, portal, lanes, debugInfo) {
|
|
8767
8245
|
if (
|
|
8768
8246
|
current === null ||
|
|
8769
8247
|
current.tag !== HostPortal ||
|
|
@@ -8773,16 +8251,33 @@ to return true:wantsResponderID| |
|
|
|
8773
8251
|
// Insert
|
|
8774
8252
|
var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
|
|
8775
8253
|
created.return = returnFiber;
|
|
8254
|
+
|
|
8255
|
+
{
|
|
8256
|
+
created._debugInfo = debugInfo;
|
|
8257
|
+
}
|
|
8258
|
+
|
|
8776
8259
|
return created;
|
|
8777
8260
|
} else {
|
|
8778
8261
|
// Update
|
|
8779
8262
|
var existing = useFiber(current, portal.children || []);
|
|
8780
8263
|
existing.return = returnFiber;
|
|
8264
|
+
|
|
8265
|
+
{
|
|
8266
|
+
existing._debugInfo = debugInfo;
|
|
8267
|
+
}
|
|
8268
|
+
|
|
8781
8269
|
return existing;
|
|
8782
8270
|
}
|
|
8783
8271
|
}
|
|
8784
8272
|
|
|
8785
|
-
function updateFragment(
|
|
8273
|
+
function updateFragment(
|
|
8274
|
+
returnFiber,
|
|
8275
|
+
current,
|
|
8276
|
+
fragment,
|
|
8277
|
+
lanes,
|
|
8278
|
+
key,
|
|
8279
|
+
debugInfo
|
|
8280
|
+
) {
|
|
8786
8281
|
if (current === null || current.tag !== Fragment) {
|
|
8787
8282
|
// Insert
|
|
8788
8283
|
var created = createFiberFromFragment(
|
|
@@ -8792,29 +8287,46 @@ to return true:wantsResponderID| |
|
|
|
8792
8287
|
key
|
|
8793
8288
|
);
|
|
8794
8289
|
created.return = returnFiber;
|
|
8290
|
+
|
|
8291
|
+
{
|
|
8292
|
+
created._debugInfo = debugInfo;
|
|
8293
|
+
}
|
|
8294
|
+
|
|
8795
8295
|
return created;
|
|
8796
8296
|
} else {
|
|
8797
8297
|
// Update
|
|
8798
8298
|
var existing = useFiber(current, fragment);
|
|
8799
8299
|
existing.return = returnFiber;
|
|
8300
|
+
|
|
8301
|
+
{
|
|
8302
|
+
existing._debugInfo = debugInfo;
|
|
8303
|
+
}
|
|
8304
|
+
|
|
8800
8305
|
return existing;
|
|
8801
8306
|
}
|
|
8802
8307
|
}
|
|
8803
8308
|
|
|
8804
|
-
function createChild(returnFiber, newChild, lanes) {
|
|
8309
|
+
function createChild(returnFiber, newChild, lanes, debugInfo) {
|
|
8805
8310
|
if (
|
|
8806
8311
|
(typeof newChild === "string" && newChild !== "") ||
|
|
8807
|
-
typeof newChild === "number"
|
|
8312
|
+
typeof newChild === "number" ||
|
|
8313
|
+
enableBigIntSupport
|
|
8808
8314
|
) {
|
|
8809
8315
|
// Text nodes don't have keys. If the previous node is implicitly keyed
|
|
8810
8316
|
// we can continue to replace it without aborting even if it is not a text
|
|
8811
8317
|
// node.
|
|
8812
8318
|
var created = createFiberFromText(
|
|
8319
|
+
// $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
|
|
8813
8320
|
"" + newChild,
|
|
8814
8321
|
returnFiber.mode,
|
|
8815
8322
|
lanes
|
|
8816
8323
|
);
|
|
8817
8324
|
created.return = returnFiber;
|
|
8325
|
+
|
|
8326
|
+
{
|
|
8327
|
+
created._debugInfo = debugInfo;
|
|
8328
|
+
}
|
|
8329
|
+
|
|
8818
8330
|
return created;
|
|
8819
8331
|
}
|
|
8820
8332
|
|
|
@@ -8827,8 +8339,16 @@ to return true:wantsResponderID| |
|
|
|
8827
8339
|
lanes
|
|
8828
8340
|
);
|
|
8829
8341
|
|
|
8830
|
-
|
|
8342
|
+
coerceRef(returnFiber, null, _created, newChild);
|
|
8831
8343
|
_created.return = returnFiber;
|
|
8344
|
+
|
|
8345
|
+
{
|
|
8346
|
+
_created._debugInfo = mergeDebugInfo(
|
|
8347
|
+
debugInfo,
|
|
8348
|
+
newChild._debugInfo
|
|
8349
|
+
);
|
|
8350
|
+
}
|
|
8351
|
+
|
|
8832
8352
|
return _created;
|
|
8833
8353
|
}
|
|
8834
8354
|
|
|
@@ -8840,13 +8360,23 @@ to return true:wantsResponderID| |
|
|
|
8840
8360
|
);
|
|
8841
8361
|
|
|
8842
8362
|
_created2.return = returnFiber;
|
|
8363
|
+
|
|
8364
|
+
{
|
|
8365
|
+
_created2._debugInfo = debugInfo;
|
|
8366
|
+
}
|
|
8367
|
+
|
|
8843
8368
|
return _created2;
|
|
8844
8369
|
}
|
|
8845
8370
|
|
|
8846
8371
|
case REACT_LAZY_TYPE: {
|
|
8847
8372
|
var payload = newChild._payload;
|
|
8848
8373
|
var init = newChild._init;
|
|
8849
|
-
return createChild(
|
|
8374
|
+
return createChild(
|
|
8375
|
+
returnFiber,
|
|
8376
|
+
init(payload),
|
|
8377
|
+
lanes,
|
|
8378
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo) // call merge after init
|
|
8379
|
+
);
|
|
8850
8380
|
}
|
|
8851
8381
|
}
|
|
8852
8382
|
|
|
@@ -8859,6 +8389,14 @@ to return true:wantsResponderID| |
|
|
|
8859
8389
|
);
|
|
8860
8390
|
|
|
8861
8391
|
_created3.return = returnFiber;
|
|
8392
|
+
|
|
8393
|
+
{
|
|
8394
|
+
_created3._debugInfo = mergeDebugInfo(
|
|
8395
|
+
debugInfo,
|
|
8396
|
+
newChild._debugInfo
|
|
8397
|
+
);
|
|
8398
|
+
}
|
|
8399
|
+
|
|
8862
8400
|
return _created3;
|
|
8863
8401
|
} // Usable node types
|
|
8864
8402
|
//
|
|
@@ -8866,15 +8404,21 @@ to return true:wantsResponderID| |
|
|
|
8866
8404
|
|
|
8867
8405
|
if (typeof newChild.then === "function") {
|
|
8868
8406
|
var thenable = newChild;
|
|
8869
|
-
return createChild(
|
|
8407
|
+
return createChild(
|
|
8408
|
+
returnFiber,
|
|
8409
|
+
unwrapThenable(thenable),
|
|
8410
|
+
lanes,
|
|
8411
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
8412
|
+
);
|
|
8870
8413
|
}
|
|
8871
8414
|
|
|
8872
8415
|
if (newChild.$$typeof === REACT_CONTEXT_TYPE) {
|
|
8873
8416
|
var context = newChild;
|
|
8874
8417
|
return createChild(
|
|
8875
8418
|
returnFiber,
|
|
8876
|
-
|
|
8877
|
-
lanes
|
|
8419
|
+
readContextDuringReconciliation(returnFiber, context, lanes),
|
|
8420
|
+
lanes,
|
|
8421
|
+
debugInfo
|
|
8878
8422
|
);
|
|
8879
8423
|
}
|
|
8880
8424
|
|
|
@@ -8883,20 +8427,25 @@ to return true:wantsResponderID| |
|
|
|
8883
8427
|
|
|
8884
8428
|
{
|
|
8885
8429
|
if (typeof newChild === "function") {
|
|
8886
|
-
warnOnFunctionType(returnFiber);
|
|
8430
|
+
warnOnFunctionType(returnFiber, newChild);
|
|
8431
|
+
}
|
|
8432
|
+
|
|
8433
|
+
if (typeof newChild === "symbol") {
|
|
8434
|
+
warnOnSymbolType(returnFiber, newChild);
|
|
8887
8435
|
}
|
|
8888
8436
|
}
|
|
8889
8437
|
|
|
8890
8438
|
return null;
|
|
8891
8439
|
}
|
|
8892
8440
|
|
|
8893
|
-
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
|
|
8441
|
+
function updateSlot(returnFiber, oldFiber, newChild, lanes, debugInfo) {
|
|
8894
8442
|
// Update the fiber if the keys match, otherwise return null.
|
|
8895
8443
|
var key = oldFiber !== null ? oldFiber.key : null;
|
|
8896
8444
|
|
|
8897
8445
|
if (
|
|
8898
8446
|
(typeof newChild === "string" && newChild !== "") ||
|
|
8899
|
-
typeof newChild === "number"
|
|
8447
|
+
typeof newChild === "number" ||
|
|
8448
|
+
enableBigIntSupport
|
|
8900
8449
|
) {
|
|
8901
8450
|
// Text nodes don't have keys. If the previous node is implicitly keyed
|
|
8902
8451
|
// we can continue to replace it without aborting even if it is not a text
|
|
@@ -8905,14 +8454,26 @@ to return true:wantsResponderID| |
|
|
|
8905
8454
|
return null;
|
|
8906
8455
|
}
|
|
8907
8456
|
|
|
8908
|
-
return updateTextNode(
|
|
8457
|
+
return updateTextNode(
|
|
8458
|
+
returnFiber,
|
|
8459
|
+
oldFiber, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
|
|
8460
|
+
"" + newChild,
|
|
8461
|
+
lanes,
|
|
8462
|
+
debugInfo
|
|
8463
|
+
);
|
|
8909
8464
|
}
|
|
8910
8465
|
|
|
8911
8466
|
if (typeof newChild === "object" && newChild !== null) {
|
|
8912
8467
|
switch (newChild.$$typeof) {
|
|
8913
8468
|
case REACT_ELEMENT_TYPE: {
|
|
8914
8469
|
if (newChild.key === key) {
|
|
8915
|
-
return updateElement(
|
|
8470
|
+
return updateElement(
|
|
8471
|
+
returnFiber,
|
|
8472
|
+
oldFiber,
|
|
8473
|
+
newChild,
|
|
8474
|
+
lanes,
|
|
8475
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
8476
|
+
);
|
|
8916
8477
|
} else {
|
|
8917
8478
|
return null;
|
|
8918
8479
|
}
|
|
@@ -8920,7 +8481,13 @@ to return true:wantsResponderID| |
|
|
|
8920
8481
|
|
|
8921
8482
|
case REACT_PORTAL_TYPE: {
|
|
8922
8483
|
if (newChild.key === key) {
|
|
8923
|
-
return updatePortal(
|
|
8484
|
+
return updatePortal(
|
|
8485
|
+
returnFiber,
|
|
8486
|
+
oldFiber,
|
|
8487
|
+
newChild,
|
|
8488
|
+
lanes,
|
|
8489
|
+
debugInfo
|
|
8490
|
+
);
|
|
8924
8491
|
} else {
|
|
8925
8492
|
return null;
|
|
8926
8493
|
}
|
|
@@ -8929,7 +8496,13 @@ to return true:wantsResponderID| |
|
|
|
8929
8496
|
case REACT_LAZY_TYPE: {
|
|
8930
8497
|
var payload = newChild._payload;
|
|
8931
8498
|
var init = newChild._init;
|
|
8932
|
-
return updateSlot(
|
|
8499
|
+
return updateSlot(
|
|
8500
|
+
returnFiber,
|
|
8501
|
+
oldFiber,
|
|
8502
|
+
init(payload),
|
|
8503
|
+
lanes,
|
|
8504
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
8505
|
+
);
|
|
8933
8506
|
}
|
|
8934
8507
|
}
|
|
8935
8508
|
|
|
@@ -8938,7 +8511,14 @@ to return true:wantsResponderID| |
|
|
|
8938
8511
|
return null;
|
|
8939
8512
|
}
|
|
8940
8513
|
|
|
8941
|
-
return updateFragment(
|
|
8514
|
+
return updateFragment(
|
|
8515
|
+
returnFiber,
|
|
8516
|
+
oldFiber,
|
|
8517
|
+
newChild,
|
|
8518
|
+
lanes,
|
|
8519
|
+
null,
|
|
8520
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
8521
|
+
);
|
|
8942
8522
|
} // Usable node types
|
|
8943
8523
|
//
|
|
8944
8524
|
// Unwrap the inner value and recursively call this function again.
|
|
@@ -8949,7 +8529,8 @@ to return true:wantsResponderID| |
|
|
|
8949
8529
|
returnFiber,
|
|
8950
8530
|
oldFiber,
|
|
8951
8531
|
unwrapThenable(thenable),
|
|
8952
|
-
lanes
|
|
8532
|
+
lanes,
|
|
8533
|
+
debugInfo
|
|
8953
8534
|
);
|
|
8954
8535
|
}
|
|
8955
8536
|
|
|
@@ -8958,8 +8539,9 @@ to return true:wantsResponderID| |
|
|
|
8958
8539
|
return updateSlot(
|
|
8959
8540
|
returnFiber,
|
|
8960
8541
|
oldFiber,
|
|
8961
|
-
|
|
8962
|
-
lanes
|
|
8542
|
+
readContextDuringReconciliation(returnFiber, context, lanes),
|
|
8543
|
+
lanes,
|
|
8544
|
+
debugInfo
|
|
8963
8545
|
);
|
|
8964
8546
|
}
|
|
8965
8547
|
|
|
@@ -8968,7 +8550,11 @@ to return true:wantsResponderID| |
|
|
|
8968
8550
|
|
|
8969
8551
|
{
|
|
8970
8552
|
if (typeof newChild === "function") {
|
|
8971
|
-
warnOnFunctionType(returnFiber);
|
|
8553
|
+
warnOnFunctionType(returnFiber, newChild);
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
if (typeof newChild === "symbol") {
|
|
8557
|
+
warnOnSymbolType(returnFiber, newChild);
|
|
8972
8558
|
}
|
|
8973
8559
|
}
|
|
8974
8560
|
|
|
@@ -8980,20 +8566,23 @@ to return true:wantsResponderID| |
|
|
|
8980
8566
|
returnFiber,
|
|
8981
8567
|
newIdx,
|
|
8982
8568
|
newChild,
|
|
8983
|
-
lanes
|
|
8569
|
+
lanes,
|
|
8570
|
+
debugInfo
|
|
8984
8571
|
) {
|
|
8985
8572
|
if (
|
|
8986
8573
|
(typeof newChild === "string" && newChild !== "") ||
|
|
8987
|
-
typeof newChild === "number"
|
|
8574
|
+
typeof newChild === "number" ||
|
|
8575
|
+
enableBigIntSupport
|
|
8988
8576
|
) {
|
|
8989
8577
|
// Text nodes don't have keys, so we neither have to check the old nor
|
|
8990
8578
|
// new node for the key. If both are text nodes, they match.
|
|
8991
8579
|
var matchedFiber = existingChildren.get(newIdx) || null;
|
|
8992
8580
|
return updateTextNode(
|
|
8993
8581
|
returnFiber,
|
|
8994
|
-
matchedFiber,
|
|
8582
|
+
matchedFiber, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
|
|
8995
8583
|
"" + newChild,
|
|
8996
|
-
lanes
|
|
8584
|
+
lanes,
|
|
8585
|
+
debugInfo
|
|
8997
8586
|
);
|
|
8998
8587
|
}
|
|
8999
8588
|
|
|
@@ -9005,7 +8594,13 @@ to return true:wantsResponderID| |
|
|
|
9005
8594
|
newChild.key === null ? newIdx : newChild.key
|
|
9006
8595
|
) || null;
|
|
9007
8596
|
|
|
9008
|
-
return updateElement(
|
|
8597
|
+
return updateElement(
|
|
8598
|
+
returnFiber,
|
|
8599
|
+
_matchedFiber,
|
|
8600
|
+
newChild,
|
|
8601
|
+
lanes,
|
|
8602
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
8603
|
+
);
|
|
9009
8604
|
}
|
|
9010
8605
|
|
|
9011
8606
|
case REACT_PORTAL_TYPE: {
|
|
@@ -9014,7 +8609,13 @@ to return true:wantsResponderID| |
|
|
|
9014
8609
|
newChild.key === null ? newIdx : newChild.key
|
|
9015
8610
|
) || null;
|
|
9016
8611
|
|
|
9017
|
-
return updatePortal(
|
|
8612
|
+
return updatePortal(
|
|
8613
|
+
returnFiber,
|
|
8614
|
+
_matchedFiber2,
|
|
8615
|
+
newChild,
|
|
8616
|
+
lanes,
|
|
8617
|
+
debugInfo
|
|
8618
|
+
);
|
|
9018
8619
|
}
|
|
9019
8620
|
|
|
9020
8621
|
case REACT_LAZY_TYPE:
|
|
@@ -9025,7 +8626,8 @@ to return true:wantsResponderID| |
|
|
|
9025
8626
|
returnFiber,
|
|
9026
8627
|
newIdx,
|
|
9027
8628
|
init(payload),
|
|
9028
|
-
lanes
|
|
8629
|
+
lanes,
|
|
8630
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9029
8631
|
);
|
|
9030
8632
|
}
|
|
9031
8633
|
|
|
@@ -9037,7 +8639,8 @@ to return true:wantsResponderID| |
|
|
|
9037
8639
|
_matchedFiber3,
|
|
9038
8640
|
newChild,
|
|
9039
8641
|
lanes,
|
|
9040
|
-
null
|
|
8642
|
+
null,
|
|
8643
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9041
8644
|
);
|
|
9042
8645
|
} // Usable node types
|
|
9043
8646
|
//
|
|
@@ -9050,7 +8653,8 @@ to return true:wantsResponderID| |
|
|
|
9050
8653
|
returnFiber,
|
|
9051
8654
|
newIdx,
|
|
9052
8655
|
unwrapThenable(thenable),
|
|
9053
|
-
lanes
|
|
8656
|
+
lanes,
|
|
8657
|
+
debugInfo
|
|
9054
8658
|
);
|
|
9055
8659
|
}
|
|
9056
8660
|
|
|
@@ -9060,8 +8664,9 @@ to return true:wantsResponderID| |
|
|
|
9060
8664
|
existingChildren,
|
|
9061
8665
|
returnFiber,
|
|
9062
8666
|
newIdx,
|
|
9063
|
-
|
|
9064
|
-
lanes
|
|
8667
|
+
readContextDuringReconciliation(returnFiber, context, lanes),
|
|
8668
|
+
lanes,
|
|
8669
|
+
debugInfo
|
|
9065
8670
|
);
|
|
9066
8671
|
}
|
|
9067
8672
|
|
|
@@ -9070,7 +8675,11 @@ to return true:wantsResponderID| |
|
|
|
9070
8675
|
|
|
9071
8676
|
{
|
|
9072
8677
|
if (typeof newChild === "function") {
|
|
9073
|
-
warnOnFunctionType(returnFiber);
|
|
8678
|
+
warnOnFunctionType(returnFiber, newChild);
|
|
8679
|
+
}
|
|
8680
|
+
|
|
8681
|
+
if (typeof newChild === "symbol") {
|
|
8682
|
+
warnOnSymbolType(returnFiber, newChild);
|
|
9074
8683
|
}
|
|
9075
8684
|
}
|
|
9076
8685
|
|
|
@@ -9133,7 +8742,8 @@ to return true:wantsResponderID| |
|
|
|
9133
8742
|
returnFiber,
|
|
9134
8743
|
currentFirstChild,
|
|
9135
8744
|
newChildren,
|
|
9136
|
-
lanes
|
|
8745
|
+
lanes,
|
|
8746
|
+
debugInfo
|
|
9137
8747
|
) {
|
|
9138
8748
|
// This algorithm can't optimize by searching from both ends since we
|
|
9139
8749
|
// don't have backpointers on fibers. I'm trying to see how far we can get
|
|
@@ -9179,7 +8789,8 @@ to return true:wantsResponderID| |
|
|
|
9179
8789
|
returnFiber,
|
|
9180
8790
|
oldFiber,
|
|
9181
8791
|
newChildren[newIdx],
|
|
9182
|
-
lanes
|
|
8792
|
+
lanes,
|
|
8793
|
+
debugInfo
|
|
9183
8794
|
);
|
|
9184
8795
|
|
|
9185
8796
|
if (newFiber === null) {
|
|
@@ -9233,7 +8844,8 @@ to return true:wantsResponderID| |
|
|
|
9233
8844
|
var _newFiber = createChild(
|
|
9234
8845
|
returnFiber,
|
|
9235
8846
|
newChildren[newIdx],
|
|
9236
|
-
lanes
|
|
8847
|
+
lanes,
|
|
8848
|
+
debugInfo
|
|
9237
8849
|
);
|
|
9238
8850
|
|
|
9239
8851
|
if (_newFiber === null) {
|
|
@@ -9255,7 +8867,7 @@ to return true:wantsResponderID| |
|
|
|
9255
8867
|
return resultingFirstChild;
|
|
9256
8868
|
} // Add all children to a key map for quick lookups.
|
|
9257
8869
|
|
|
9258
|
-
var existingChildren = mapRemainingChildren(
|
|
8870
|
+
var existingChildren = mapRemainingChildren(oldFiber); // Keep scanning and use the map to restore deleted items as moves.
|
|
9259
8871
|
|
|
9260
8872
|
for (; newIdx < newChildren.length; newIdx++) {
|
|
9261
8873
|
var _newFiber2 = updateFromMap(
|
|
@@ -9263,7 +8875,8 @@ to return true:wantsResponderID| |
|
|
|
9263
8875
|
returnFiber,
|
|
9264
8876
|
newIdx,
|
|
9265
8877
|
newChildren[newIdx],
|
|
9266
|
-
lanes
|
|
8878
|
+
lanes,
|
|
8879
|
+
debugInfo
|
|
9267
8880
|
);
|
|
9268
8881
|
|
|
9269
8882
|
if (_newFiber2 !== null) {
|
|
@@ -9306,7 +8919,8 @@ to return true:wantsResponderID| |
|
|
|
9306
8919
|
returnFiber,
|
|
9307
8920
|
currentFirstChild,
|
|
9308
8921
|
newChildrenIterable,
|
|
9309
|
-
lanes
|
|
8922
|
+
lanes,
|
|
8923
|
+
debugInfo
|
|
9310
8924
|
) {
|
|
9311
8925
|
// This is the same implementation as reconcileChildrenArray(),
|
|
9312
8926
|
// but using the iterator instead.
|
|
@@ -9391,7 +9005,13 @@ to return true:wantsResponderID| |
|
|
|
9391
9005
|
nextOldFiber = oldFiber.sibling;
|
|
9392
9006
|
}
|
|
9393
9007
|
|
|
9394
|
-
var newFiber = updateSlot(
|
|
9008
|
+
var newFiber = updateSlot(
|
|
9009
|
+
returnFiber,
|
|
9010
|
+
oldFiber,
|
|
9011
|
+
step.value,
|
|
9012
|
+
lanes,
|
|
9013
|
+
debugInfo
|
|
9014
|
+
);
|
|
9395
9015
|
|
|
9396
9016
|
if (newFiber === null) {
|
|
9397
9017
|
// TODO: This breaks on empty slots like null children. That's
|
|
@@ -9441,7 +9061,12 @@ to return true:wantsResponderID| |
|
|
|
9441
9061
|
// If we don't have any more existing children we can choose a fast path
|
|
9442
9062
|
// since the rest will all be insertions.
|
|
9443
9063
|
for (; !step.done; newIdx++, step = newChildren.next()) {
|
|
9444
|
-
var _newFiber3 = createChild(
|
|
9064
|
+
var _newFiber3 = createChild(
|
|
9065
|
+
returnFiber,
|
|
9066
|
+
step.value,
|
|
9067
|
+
lanes,
|
|
9068
|
+
debugInfo
|
|
9069
|
+
);
|
|
9445
9070
|
|
|
9446
9071
|
if (_newFiber3 === null) {
|
|
9447
9072
|
continue;
|
|
@@ -9462,7 +9087,7 @@ to return true:wantsResponderID| |
|
|
|
9462
9087
|
return resultingFirstChild;
|
|
9463
9088
|
} // Add all children to a key map for quick lookups.
|
|
9464
9089
|
|
|
9465
|
-
var existingChildren = mapRemainingChildren(
|
|
9090
|
+
var existingChildren = mapRemainingChildren(oldFiber); // Keep scanning and use the map to restore deleted items as moves.
|
|
9466
9091
|
|
|
9467
9092
|
for (; !step.done; newIdx++, step = newChildren.next()) {
|
|
9468
9093
|
var _newFiber4 = updateFromMap(
|
|
@@ -9470,7 +9095,8 @@ to return true:wantsResponderID| |
|
|
|
9470
9095
|
returnFiber,
|
|
9471
9096
|
newIdx,
|
|
9472
9097
|
step.value,
|
|
9473
|
-
lanes
|
|
9098
|
+
lanes,
|
|
9099
|
+
debugInfo
|
|
9474
9100
|
);
|
|
9475
9101
|
|
|
9476
9102
|
if (_newFiber4 !== null) {
|
|
@@ -9537,7 +9163,8 @@ to return true:wantsResponderID| |
|
|
|
9537
9163
|
returnFiber,
|
|
9538
9164
|
currentFirstChild,
|
|
9539
9165
|
element,
|
|
9540
|
-
lanes
|
|
9166
|
+
lanes,
|
|
9167
|
+
debugInfo
|
|
9541
9168
|
) {
|
|
9542
9169
|
var key = element.key;
|
|
9543
9170
|
var child = currentFirstChild;
|
|
@@ -9556,6 +9183,7 @@ to return true:wantsResponderID| |
|
|
|
9556
9183
|
|
|
9557
9184
|
{
|
|
9558
9185
|
existing._debugOwner = element._owner;
|
|
9186
|
+
existing._debugInfo = debugInfo;
|
|
9559
9187
|
}
|
|
9560
9188
|
|
|
9561
9189
|
return existing;
|
|
@@ -9576,11 +9204,12 @@ to return true:wantsResponderID| |
|
|
|
9576
9204
|
|
|
9577
9205
|
var _existing = useFiber(child, element.props);
|
|
9578
9206
|
|
|
9579
|
-
|
|
9207
|
+
coerceRef(returnFiber, child, _existing, element);
|
|
9580
9208
|
_existing.return = returnFiber;
|
|
9581
9209
|
|
|
9582
9210
|
{
|
|
9583
9211
|
_existing._debugOwner = element._owner;
|
|
9212
|
+
_existing._debugInfo = debugInfo;
|
|
9584
9213
|
}
|
|
9585
9214
|
|
|
9586
9215
|
return _existing;
|
|
@@ -9604,6 +9233,11 @@ to return true:wantsResponderID| |
|
|
|
9604
9233
|
element.key
|
|
9605
9234
|
);
|
|
9606
9235
|
created.return = returnFiber;
|
|
9236
|
+
|
|
9237
|
+
{
|
|
9238
|
+
created._debugInfo = debugInfo;
|
|
9239
|
+
}
|
|
9240
|
+
|
|
9607
9241
|
return created;
|
|
9608
9242
|
} else {
|
|
9609
9243
|
var _created4 = createFiberFromElement(
|
|
@@ -9612,8 +9246,13 @@ to return true:wantsResponderID| |
|
|
|
9612
9246
|
lanes
|
|
9613
9247
|
);
|
|
9614
9248
|
|
|
9615
|
-
|
|
9249
|
+
coerceRef(returnFiber, currentFirstChild, _created4, element);
|
|
9616
9250
|
_created4.return = returnFiber;
|
|
9251
|
+
|
|
9252
|
+
{
|
|
9253
|
+
_created4._debugInfo = debugInfo;
|
|
9254
|
+
}
|
|
9255
|
+
|
|
9617
9256
|
return _created4;
|
|
9618
9257
|
}
|
|
9619
9258
|
}
|
|
@@ -9622,7 +9261,8 @@ to return true:wantsResponderID| |
|
|
|
9622
9261
|
returnFiber,
|
|
9623
9262
|
currentFirstChild,
|
|
9624
9263
|
portal,
|
|
9625
|
-
lanes
|
|
9264
|
+
lanes,
|
|
9265
|
+
debugInfo
|
|
9626
9266
|
) {
|
|
9627
9267
|
var key = portal.key;
|
|
9628
9268
|
var child = currentFirstChild;
|
|
@@ -9662,7 +9302,8 @@ to return true:wantsResponderID| |
|
|
|
9662
9302
|
returnFiber,
|
|
9663
9303
|
currentFirstChild,
|
|
9664
9304
|
newChild,
|
|
9665
|
-
lanes
|
|
9305
|
+
lanes,
|
|
9306
|
+
debugInfo
|
|
9666
9307
|
) {
|
|
9667
9308
|
// This function is not recursive.
|
|
9668
9309
|
// If the top level item is an array, we treat it as a set of children,
|
|
@@ -9690,7 +9331,8 @@ to return true:wantsResponderID| |
|
|
|
9690
9331
|
returnFiber,
|
|
9691
9332
|
currentFirstChild,
|
|
9692
9333
|
newChild,
|
|
9693
|
-
lanes
|
|
9334
|
+
lanes,
|
|
9335
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9694
9336
|
)
|
|
9695
9337
|
);
|
|
9696
9338
|
|
|
@@ -9706,13 +9348,13 @@ to return true:wantsResponderID| |
|
|
|
9706
9348
|
|
|
9707
9349
|
case REACT_LAZY_TYPE:
|
|
9708
9350
|
var payload = newChild._payload;
|
|
9709
|
-
var init = newChild._init;
|
|
9710
|
-
|
|
9711
|
-
return reconcileChildFibers(
|
|
9351
|
+
var init = newChild._init;
|
|
9352
|
+
return reconcileChildFibersImpl(
|
|
9712
9353
|
returnFiber,
|
|
9713
9354
|
currentFirstChild,
|
|
9714
9355
|
init(payload),
|
|
9715
|
-
lanes
|
|
9356
|
+
lanes,
|
|
9357
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9716
9358
|
);
|
|
9717
9359
|
}
|
|
9718
9360
|
|
|
@@ -9721,7 +9363,8 @@ to return true:wantsResponderID| |
|
|
|
9721
9363
|
returnFiber,
|
|
9722
9364
|
currentFirstChild,
|
|
9723
9365
|
newChild,
|
|
9724
|
-
lanes
|
|
9366
|
+
lanes,
|
|
9367
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9725
9368
|
);
|
|
9726
9369
|
}
|
|
9727
9370
|
|
|
@@ -9730,7 +9373,8 @@ to return true:wantsResponderID| |
|
|
|
9730
9373
|
returnFiber,
|
|
9731
9374
|
currentFirstChild,
|
|
9732
9375
|
newChild,
|
|
9733
|
-
lanes
|
|
9376
|
+
lanes,
|
|
9377
|
+
mergeDebugInfo(debugInfo, newChild._debugInfo)
|
|
9734
9378
|
);
|
|
9735
9379
|
} // Usables are a valid React node type. When React encounters a Usable in
|
|
9736
9380
|
// a child position, it unwraps it using the same algorithm as `use`. For
|
|
@@ -9755,7 +9399,8 @@ to return true:wantsResponderID| |
|
|
|
9755
9399
|
returnFiber,
|
|
9756
9400
|
currentFirstChild,
|
|
9757
9401
|
unwrapThenable(thenable),
|
|
9758
|
-
lanes
|
|
9402
|
+
lanes,
|
|
9403
|
+
mergeDebugInfo(debugInfo, thenable._debugInfo)
|
|
9759
9404
|
);
|
|
9760
9405
|
}
|
|
9761
9406
|
|
|
@@ -9764,8 +9409,9 @@ to return true:wantsResponderID| |
|
|
|
9764
9409
|
return reconcileChildFibersImpl(
|
|
9765
9410
|
returnFiber,
|
|
9766
9411
|
currentFirstChild,
|
|
9767
|
-
|
|
9768
|
-
lanes
|
|
9412
|
+
readContextDuringReconciliation(returnFiber, context, lanes),
|
|
9413
|
+
lanes,
|
|
9414
|
+
debugInfo
|
|
9769
9415
|
);
|
|
9770
9416
|
}
|
|
9771
9417
|
|
|
@@ -9774,12 +9420,13 @@ to return true:wantsResponderID| |
|
|
|
9774
9420
|
|
|
9775
9421
|
if (
|
|
9776
9422
|
(typeof newChild === "string" && newChild !== "") ||
|
|
9777
|
-
typeof newChild === "number"
|
|
9423
|
+
typeof newChild === "number" ||
|
|
9424
|
+
enableBigIntSupport
|
|
9778
9425
|
) {
|
|
9779
9426
|
return placeSingleChild(
|
|
9780
9427
|
reconcileSingleTextNode(
|
|
9781
9428
|
returnFiber,
|
|
9782
|
-
currentFirstChild,
|
|
9429
|
+
currentFirstChild, // $FlowFixMe[unsafe-addition] Flow doesn't want us to use `+` operator with string and bigint
|
|
9783
9430
|
"" + newChild,
|
|
9784
9431
|
lanes
|
|
9785
9432
|
)
|
|
@@ -9788,7 +9435,11 @@ to return true:wantsResponderID| |
|
|
|
9788
9435
|
|
|
9789
9436
|
{
|
|
9790
9437
|
if (typeof newChild === "function") {
|
|
9791
|
-
warnOnFunctionType(returnFiber);
|
|
9438
|
+
warnOnFunctionType(returnFiber, newChild);
|
|
9439
|
+
}
|
|
9440
|
+
|
|
9441
|
+
if (typeof newChild === "symbol") {
|
|
9442
|
+
warnOnSymbolType(returnFiber, newChild);
|
|
9792
9443
|
}
|
|
9793
9444
|
} // Remaining cases are all treated as empty.
|
|
9794
9445
|
|
|
@@ -9808,7 +9459,8 @@ to return true:wantsResponderID| |
|
|
|
9808
9459
|
returnFiber,
|
|
9809
9460
|
currentFirstChild,
|
|
9810
9461
|
newChild,
|
|
9811
|
-
lanes
|
|
9462
|
+
lanes,
|
|
9463
|
+
null // debugInfo
|
|
9812
9464
|
);
|
|
9813
9465
|
thenableState$1 = null; // Don't bother to reset `thenableIndexCounter` to 0 because it always gets
|
|
9814
9466
|
// set at the beginning.
|
|
@@ -10244,7 +9896,7 @@ to return true:wantsResponderID| |
|
|
|
10244
9896
|
error(
|
|
10245
9897
|
"React has detected a change in the order of Hooks called by %s. " +
|
|
10246
9898
|
"This will lead to bugs and errors if not fixed. " +
|
|
10247
|
-
"For more information, read the Rules of Hooks: https://
|
|
9899
|
+
"For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n" +
|
|
10248
9900
|
" Previous render Next render\n" +
|
|
10249
9901
|
" ------------------------------------------------------\n" +
|
|
10250
9902
|
"%s" +
|
|
@@ -10295,7 +9947,7 @@ to return true:wantsResponderID| |
|
|
|
10295
9947
|
"1. You might have mismatching versions of React and the renderer (such as React DOM)\n" +
|
|
10296
9948
|
"2. You might be breaking the Rules of Hooks\n" +
|
|
10297
9949
|
"3. You might have more than one copy of React in the same app\n" +
|
|
10298
|
-
"See https://
|
|
9950
|
+
"See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
10299
9951
|
);
|
|
10300
9952
|
}
|
|
10301
9953
|
|
|
@@ -11867,8 +11519,8 @@ to return true:wantsResponderID| |
|
|
|
11867
11519
|
}
|
|
11868
11520
|
|
|
11869
11521
|
function updateTransition() {
|
|
11870
|
-
var
|
|
11871
|
-
booleanOrThenable =
|
|
11522
|
+
var _updateState2 = updateState(),
|
|
11523
|
+
booleanOrThenable = _updateState2[0];
|
|
11872
11524
|
|
|
11873
11525
|
var hook = updateWorkInProgressHook();
|
|
11874
11526
|
var start = hook.memoizedState;
|
|
@@ -12127,7 +11779,7 @@ to return true:wantsResponderID| |
|
|
|
12127
11779
|
"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. " +
|
|
12128
11780
|
"You can only call Hooks at the top level of your React function. " +
|
|
12129
11781
|
"For more information, see " +
|
|
12130
|
-
"https://
|
|
11782
|
+
"https://react.dev/link/rules-of-hooks"
|
|
12131
11783
|
);
|
|
12132
11784
|
};
|
|
12133
11785
|
|
|
@@ -13156,7 +12808,6 @@ to return true:wantsResponderID| |
|
|
|
13156
12808
|
var didWarnAboutLegacyLifecyclesAndDerivedState;
|
|
13157
12809
|
var didWarnAboutUndefinedDerivedState;
|
|
13158
12810
|
var didWarnAboutDirectlyAssigningPropsToState;
|
|
13159
|
-
var didWarnAboutContextTypeAndContextTypes;
|
|
13160
12811
|
var didWarnAboutInvalidateContextType;
|
|
13161
12812
|
var didWarnOnInvalidCallback;
|
|
13162
12813
|
|
|
@@ -13167,7 +12818,6 @@ to return true:wantsResponderID| |
|
|
|
13167
12818
|
didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
|
|
13168
12819
|
didWarnAboutDirectlyAssigningPropsToState = new Set();
|
|
13169
12820
|
didWarnAboutUndefinedDerivedState = new Set();
|
|
13170
|
-
didWarnAboutContextTypeAndContextTypes = new Set();
|
|
13171
12821
|
didWarnAboutInvalidateContextType = new Set();
|
|
13172
12822
|
didWarnOnInvalidCallback = new Set(); // This is so gross but it's at least non-critical and can be removed if
|
|
13173
12823
|
// it causes problems. This is meant to give a nicer error message for
|
|
@@ -13191,21 +12841,20 @@ to return true:wantsResponderID| |
|
|
|
13191
12841
|
Object.freeze(fakeInternalInstance);
|
|
13192
12842
|
}
|
|
13193
12843
|
|
|
13194
|
-
function warnOnInvalidCallback(callback
|
|
12844
|
+
function warnOnInvalidCallback(callback) {
|
|
13195
12845
|
{
|
|
13196
12846
|
if (callback === null || typeof callback === "function") {
|
|
13197
12847
|
return;
|
|
13198
|
-
}
|
|
12848
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
13199
12849
|
|
|
13200
|
-
var key =
|
|
12850
|
+
var key = String(callback);
|
|
13201
12851
|
|
|
13202
12852
|
if (!didWarnOnInvalidCallback.has(key)) {
|
|
13203
12853
|
didWarnOnInvalidCallback.add(key);
|
|
13204
12854
|
|
|
13205
12855
|
error(
|
|
13206
|
-
"
|
|
12856
|
+
"Expected the last optional `callback` argument to be a " +
|
|
13207
12857
|
"function. Instead received: %s.",
|
|
13208
|
-
callerName,
|
|
13209
12858
|
callback
|
|
13210
12859
|
);
|
|
13211
12860
|
}
|
|
@@ -13279,7 +12928,7 @@ to return true:wantsResponderID| |
|
|
|
13279
12928
|
|
|
13280
12929
|
if (callback !== undefined && callback !== null) {
|
|
13281
12930
|
{
|
|
13282
|
-
warnOnInvalidCallback(callback
|
|
12931
|
+
warnOnInvalidCallback(callback);
|
|
13283
12932
|
}
|
|
13284
12933
|
|
|
13285
12934
|
update.callback = callback;
|
|
@@ -13301,7 +12950,7 @@ to return true:wantsResponderID| |
|
|
|
13301
12950
|
|
|
13302
12951
|
if (callback !== undefined && callback !== null) {
|
|
13303
12952
|
{
|
|
13304
|
-
warnOnInvalidCallback(callback
|
|
12953
|
+
warnOnInvalidCallback(callback);
|
|
13305
12954
|
}
|
|
13306
12955
|
|
|
13307
12956
|
update.callback = callback;
|
|
@@ -13323,7 +12972,7 @@ to return true:wantsResponderID| |
|
|
|
13323
12972
|
|
|
13324
12973
|
if (callback !== undefined && callback !== null) {
|
|
13325
12974
|
{
|
|
13326
|
-
warnOnInvalidCallback(callback
|
|
12975
|
+
warnOnInvalidCallback(callback);
|
|
13327
12976
|
}
|
|
13328
12977
|
|
|
13329
12978
|
update.callback = callback;
|
|
@@ -13403,13 +13052,13 @@ to return true:wantsResponderID| |
|
|
|
13403
13052
|
if (!renderPresent) {
|
|
13404
13053
|
if (ctor.prototype && typeof ctor.prototype.render === "function") {
|
|
13405
13054
|
error(
|
|
13406
|
-
"
|
|
13055
|
+
"No `render` method found on the %s " +
|
|
13407
13056
|
"instance: did you accidentally return an object from the constructor?",
|
|
13408
13057
|
name
|
|
13409
13058
|
);
|
|
13410
13059
|
} else {
|
|
13411
13060
|
error(
|
|
13412
|
-
"
|
|
13061
|
+
"No `render` method found on the %s " +
|
|
13413
13062
|
"instance: you may have forgotten to define `render`.",
|
|
13414
13063
|
name
|
|
13415
13064
|
);
|
|
@@ -13458,24 +13107,18 @@ to return true:wantsResponderID| |
|
|
|
13458
13107
|
}
|
|
13459
13108
|
|
|
13460
13109
|
{
|
|
13461
|
-
if (
|
|
13110
|
+
if (ctor.childContextTypes) {
|
|
13462
13111
|
error(
|
|
13463
|
-
"
|
|
13464
|
-
"
|
|
13112
|
+
"%s uses the legacy childContextTypes API which is no longer supported. " +
|
|
13113
|
+
"Use React.createContext() instead.",
|
|
13465
13114
|
name
|
|
13466
13115
|
);
|
|
13467
13116
|
}
|
|
13468
13117
|
|
|
13469
|
-
if (
|
|
13470
|
-
ctor.contextType &&
|
|
13471
|
-
ctor.contextTypes &&
|
|
13472
|
-
!didWarnAboutContextTypeAndContextTypes.has(ctor)
|
|
13473
|
-
) {
|
|
13474
|
-
didWarnAboutContextTypeAndContextTypes.add(ctor);
|
|
13475
|
-
|
|
13118
|
+
if (ctor.contextTypes) {
|
|
13476
13119
|
error(
|
|
13477
|
-
"%s
|
|
13478
|
-
"
|
|
13120
|
+
"%s uses the legacy contextTypes API which is no longer supported. " +
|
|
13121
|
+
"Use React.createContext() with static contextType instead.",
|
|
13479
13122
|
name
|
|
13480
13123
|
);
|
|
13481
13124
|
}
|
|
@@ -13544,9 +13187,8 @@ to return true:wantsResponderID| |
|
|
|
13544
13187
|
|
|
13545
13188
|
if (instance.props !== undefined && hasMutatedProps) {
|
|
13546
13189
|
error(
|
|
13547
|
-
"
|
|
13190
|
+
"When calling super() in `%s`, make sure to pass " +
|
|
13548
13191
|
"up the same props that your component's constructor was passed.",
|
|
13549
|
-
name,
|
|
13550
13192
|
name
|
|
13551
13193
|
);
|
|
13552
13194
|
}
|
|
@@ -13629,8 +13271,6 @@ to return true:wantsResponderID| |
|
|
|
13629
13271
|
}
|
|
13630
13272
|
|
|
13631
13273
|
function constructClassInstance(workInProgress, ctor, props) {
|
|
13632
|
-
var isLegacyContextConsumer = false;
|
|
13633
|
-
var unmaskedContext = emptyContextObject;
|
|
13634
13274
|
var context = emptyContextObject;
|
|
13635
13275
|
var contextType = ctor.contextType;
|
|
13636
13276
|
|
|
@@ -13639,8 +13279,7 @@ to return true:wantsResponderID| |
|
|
|
13639
13279
|
var isValid = // Allow null for conditional declaration
|
|
13640
13280
|
contextType === null ||
|
|
13641
13281
|
(contextType !== undefined &&
|
|
13642
|
-
contextType.$$typeof === REACT_CONTEXT_TYPE
|
|
13643
|
-
contextType._context === undefined); // Not a <Context.Consumer>
|
|
13282
|
+
contextType.$$typeof === REACT_CONTEXT_TYPE);
|
|
13644
13283
|
|
|
13645
13284
|
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
|
13646
13285
|
didWarnAboutInvalidateContextType.add(ctor);
|
|
@@ -13654,11 +13293,7 @@ to return true:wantsResponderID| |
|
|
|
13654
13293
|
"try moving the createContext() call to a separate file.";
|
|
13655
13294
|
} else if (typeof contextType !== "object") {
|
|
13656
13295
|
addendum = " However, it is set to a " + typeof contextType + ".";
|
|
13657
|
-
} else if (contextType.$$typeof ===
|
|
13658
|
-
addendum =
|
|
13659
|
-
" Did you accidentally pass the Context.Provider instead?";
|
|
13660
|
-
} else if (contextType._context !== undefined) {
|
|
13661
|
-
// <Context.Consumer>
|
|
13296
|
+
} else if (contextType.$$typeof === REACT_CONSUMER_TYPE) {
|
|
13662
13297
|
addendum =
|
|
13663
13298
|
" Did you accidentally pass the Context.Consumer instead?";
|
|
13664
13299
|
} else {
|
|
@@ -13680,14 +13315,6 @@ to return true:wantsResponderID| |
|
|
|
13680
13315
|
|
|
13681
13316
|
if (typeof contextType === "object" && contextType !== null) {
|
|
13682
13317
|
context = readContext(contextType);
|
|
13683
|
-
} else {
|
|
13684
|
-
unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
|
|
13685
|
-
var contextTypes = ctor.contextTypes;
|
|
13686
|
-
isLegacyContextConsumer =
|
|
13687
|
-
contextTypes !== null && contextTypes !== undefined;
|
|
13688
|
-
context = isLegacyContextConsumer
|
|
13689
|
-
? getMaskedContext(workInProgress, unmaskedContext)
|
|
13690
|
-
: emptyContextObject;
|
|
13691
13318
|
}
|
|
13692
13319
|
|
|
13693
13320
|
var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.
|
|
@@ -13795,7 +13422,7 @@ to return true:wantsResponderID| |
|
|
|
13795
13422
|
"Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" +
|
|
13796
13423
|
"%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n" +
|
|
13797
13424
|
"The above lifecycles should be removed. Learn more about this warning here:\n" +
|
|
13798
|
-
"https://
|
|
13425
|
+
"https://react.dev/link/unsafe-component-lifecycles",
|
|
13799
13426
|
_componentName,
|
|
13800
13427
|
newApiName,
|
|
13801
13428
|
foundWillMountName !== null ? "\n " + foundWillMountName : "",
|
|
@@ -13807,12 +13434,7 @@ to return true:wantsResponderID| |
|
|
|
13807
13434
|
}
|
|
13808
13435
|
}
|
|
13809
13436
|
}
|
|
13810
|
-
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
|
|
13811
|
-
// ReactFiberContext usually updates this cache but can't for newly-created instances.
|
|
13812
|
-
|
|
13813
|
-
if (isLegacyContextConsumer) {
|
|
13814
|
-
cacheContext(workInProgress, unmaskedContext, context);
|
|
13815
|
-
}
|
|
13437
|
+
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
|
|
13816
13438
|
|
|
13817
13439
|
return instance;
|
|
13818
13440
|
}
|
|
@@ -13902,8 +13524,7 @@ to return true:wantsResponderID| |
|
|
|
13902
13524
|
if (typeof contextType === "object" && contextType !== null) {
|
|
13903
13525
|
instance.context = readContext(contextType);
|
|
13904
13526
|
} else {
|
|
13905
|
-
|
|
13906
|
-
instance.context = getMaskedContext(workInProgress, unmaskedContext);
|
|
13527
|
+
instance.context = emptyContextObject;
|
|
13907
13528
|
}
|
|
13908
13529
|
|
|
13909
13530
|
{
|
|
@@ -13987,16 +13608,6 @@ to return true:wantsResponderID| |
|
|
|
13987
13608
|
|
|
13988
13609
|
if (typeof contextType === "object" && contextType !== null) {
|
|
13989
13610
|
nextContext = readContext(contextType);
|
|
13990
|
-
} else {
|
|
13991
|
-
var nextLegacyUnmaskedContext = getUnmaskedContext(
|
|
13992
|
-
workInProgress,
|
|
13993
|
-
ctor,
|
|
13994
|
-
true
|
|
13995
|
-
);
|
|
13996
|
-
nextContext = getMaskedContext(
|
|
13997
|
-
workInProgress,
|
|
13998
|
-
nextLegacyUnmaskedContext
|
|
13999
|
-
);
|
|
14000
13611
|
}
|
|
14001
13612
|
|
|
14002
13613
|
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
|
@@ -14140,13 +13751,6 @@ to return true:wantsResponderID| |
|
|
|
14140
13751
|
|
|
14141
13752
|
if (typeof contextType === "object" && contextType !== null) {
|
|
14142
13753
|
nextContext = readContext(contextType);
|
|
14143
|
-
} else {
|
|
14144
|
-
var nextUnmaskedContext = getUnmaskedContext(
|
|
14145
|
-
workInProgress,
|
|
14146
|
-
ctor,
|
|
14147
|
-
true
|
|
14148
|
-
);
|
|
14149
|
-
nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
|
|
14150
13754
|
}
|
|
14151
13755
|
|
|
14152
13756
|
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
|
@@ -14300,17 +13904,37 @@ to return true:wantsResponderID| |
|
|
|
14300
13904
|
return shouldUpdate;
|
|
14301
13905
|
}
|
|
14302
13906
|
|
|
13907
|
+
var CapturedStacks = new WeakMap();
|
|
14303
13908
|
function createCapturedValueAtFiber(value, source) {
|
|
14304
13909
|
// If the value is an error, call this function immediately after it is thrown
|
|
14305
13910
|
// so the stack is accurate.
|
|
13911
|
+
var stack;
|
|
13912
|
+
|
|
13913
|
+
if (typeof value === "object" && value !== null) {
|
|
13914
|
+
var capturedStack = CapturedStacks.get(value);
|
|
13915
|
+
|
|
13916
|
+
if (typeof capturedStack === "string") {
|
|
13917
|
+
stack = capturedStack;
|
|
13918
|
+
} else {
|
|
13919
|
+
stack = getStackByFiberInDevAndProd(source);
|
|
13920
|
+
CapturedStacks.set(value, stack);
|
|
13921
|
+
}
|
|
13922
|
+
} else {
|
|
13923
|
+
stack = getStackByFiberInDevAndProd(source);
|
|
13924
|
+
}
|
|
13925
|
+
|
|
14306
13926
|
return {
|
|
14307
13927
|
value: value,
|
|
14308
13928
|
source: source,
|
|
14309
|
-
stack:
|
|
13929
|
+
stack: stack,
|
|
14310
13930
|
digest: null
|
|
14311
13931
|
};
|
|
14312
13932
|
}
|
|
14313
|
-
function
|
|
13933
|
+
function createCapturedValueFromError(value, digest, stack) {
|
|
13934
|
+
if (typeof stack === "string") {
|
|
13935
|
+
CapturedStacks.set(value, stack);
|
|
13936
|
+
}
|
|
13937
|
+
|
|
14314
13938
|
return {
|
|
14315
13939
|
value: value,
|
|
14316
13940
|
source: null,
|
|
@@ -14356,25 +13980,8 @@ to return true:wantsResponderID| |
|
|
|
14356
13980
|
if (true) {
|
|
14357
13981
|
var source = errorInfo.source;
|
|
14358
13982
|
var stack = errorInfo.stack;
|
|
14359
|
-
var componentStack = stack !== null ? stack : ""; //
|
|
14360
|
-
//
|
|
14361
|
-
// We record this information as an expando on the error.
|
|
14362
|
-
|
|
14363
|
-
if (error != null && error._suppressLogging) {
|
|
14364
|
-
if (boundary.tag === ClassComponent) {
|
|
14365
|
-
// The error is recoverable and was silenced.
|
|
14366
|
-
// Ignore it and don't print the stack addendum.
|
|
14367
|
-
// This is handy for testing error boundaries without noise.
|
|
14368
|
-
return;
|
|
14369
|
-
} // The error is fatal. Since the silencing might have
|
|
14370
|
-
// been accidental, we'll surface it anyway.
|
|
14371
|
-
// However, the browser would have silenced the original error
|
|
14372
|
-
// so we'll print it first, and then print the stack addendum.
|
|
14373
|
-
|
|
14374
|
-
console["error"](error); // Don't transform to our wrapper
|
|
14375
|
-
// For a more detailed description of this block, see:
|
|
14376
|
-
// https://github.com/facebook/react/pull/13384
|
|
14377
|
-
}
|
|
13983
|
+
var componentStack = stack !== null ? stack : ""; // TODO: There's no longer a way to silence these warnings e.g. for tests.
|
|
13984
|
+
// See https://github.com/facebook/react/pull/13384
|
|
14378
13985
|
|
|
14379
13986
|
var componentName = source ? getComponentNameFromFiber(source) : null;
|
|
14380
13987
|
var componentNameMessage = componentName
|
|
@@ -14387,7 +13994,7 @@ to return true:wantsResponderID| |
|
|
|
14387
13994
|
if (boundary.tag === HostRoot) {
|
|
14388
13995
|
errorBoundaryMessage =
|
|
14389
13996
|
"Consider adding an error boundary to your tree to customize error handling behavior.\n" +
|
|
14390
|
-
"Visit https://
|
|
13997
|
+
"Visit https://react.dev/link/error-boundaries to learn more about error boundaries.";
|
|
14391
13998
|
} else {
|
|
14392
13999
|
var errorBoundaryName =
|
|
14393
14000
|
getComponentNameFromFiber(boundary) || "Anonymous";
|
|
@@ -14396,19 +14003,17 @@ to return true:wantsResponderID| |
|
|
|
14396
14003
|
("using the error boundary you provided, " +
|
|
14397
14004
|
errorBoundaryName +
|
|
14398
14005
|
".");
|
|
14399
|
-
}
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14411
|
-
console["error"](combinedMessage); // Don't transform to our wrapper
|
|
14006
|
+
} // In development, we provide our own message which includes the component stack
|
|
14007
|
+
// in addition to the error.
|
|
14008
|
+
|
|
14009
|
+
console["error"](
|
|
14010
|
+
// Don't transform to our wrapper
|
|
14011
|
+
"%o\n\n%s\n%s\n\n%s",
|
|
14012
|
+
error,
|
|
14013
|
+
componentNameMessage,
|
|
14014
|
+
componentStack,
|
|
14015
|
+
errorBoundaryMessage
|
|
14016
|
+
);
|
|
14412
14017
|
}
|
|
14413
14018
|
} catch (e) {
|
|
14414
14019
|
// This method must not throw, or React internal state will get messed up.
|
|
@@ -14999,25 +14604,13 @@ to return true:wantsResponderID| |
|
|
|
14999
14604
|
// TODO: current can be non-null here even if the component
|
|
15000
14605
|
// hasn't yet mounted. This happens after the first render suspends.
|
|
15001
14606
|
// We'll need to figure out if this is fine or can cause issues.
|
|
15002
|
-
{
|
|
15003
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
15004
|
-
// Lazy component props can't be validated in createElement
|
|
15005
|
-
// because they're only guaranteed to be resolved here.
|
|
15006
|
-
var innerPropTypes = Component.propTypes;
|
|
15007
|
-
|
|
15008
|
-
if (innerPropTypes) {
|
|
15009
|
-
checkPropTypes(
|
|
15010
|
-
innerPropTypes,
|
|
15011
|
-
nextProps, // Resolved props
|
|
15012
|
-
"prop",
|
|
15013
|
-
getComponentNameFromType(Component)
|
|
15014
|
-
);
|
|
15015
|
-
}
|
|
15016
|
-
}
|
|
15017
|
-
}
|
|
15018
|
-
|
|
15019
14607
|
var render = Component.render;
|
|
15020
|
-
var ref = workInProgress.ref;
|
|
14608
|
+
var ref = workInProgress.ref;
|
|
14609
|
+
var propsWithoutRef;
|
|
14610
|
+
|
|
14611
|
+
{
|
|
14612
|
+
propsWithoutRef = nextProps;
|
|
14613
|
+
} // The rest is a fork of updateFunctionComponent
|
|
15021
14614
|
|
|
15022
14615
|
var nextChildren;
|
|
15023
14616
|
prepareToReadContext(workInProgress, renderLanes);
|
|
@@ -15029,7 +14622,7 @@ to return true:wantsResponderID| |
|
|
|
15029
14622
|
current,
|
|
15030
14623
|
workInProgress,
|
|
15031
14624
|
render,
|
|
15032
|
-
|
|
14625
|
+
propsWithoutRef,
|
|
15033
14626
|
ref,
|
|
15034
14627
|
renderLanes
|
|
15035
14628
|
);
|
|
@@ -15090,19 +14683,6 @@ to return true:wantsResponderID| |
|
|
|
15090
14683
|
}
|
|
15091
14684
|
|
|
15092
14685
|
{
|
|
15093
|
-
var innerPropTypes = type.propTypes;
|
|
15094
|
-
|
|
15095
|
-
if (innerPropTypes) {
|
|
15096
|
-
// Inner memo component props aren't currently validated in createElement.
|
|
15097
|
-
// We could move it there, but we'd still need this for lazy code path.
|
|
15098
|
-
checkPropTypes(
|
|
15099
|
-
innerPropTypes,
|
|
15100
|
-
nextProps, // Resolved props
|
|
15101
|
-
"prop",
|
|
15102
|
-
getComponentNameFromType(type)
|
|
15103
|
-
);
|
|
15104
|
-
}
|
|
15105
|
-
|
|
15106
14686
|
if (Component.defaultProps !== undefined) {
|
|
15107
14687
|
var componentName = getComponentNameFromType(type) || "Unknown";
|
|
15108
14688
|
|
|
@@ -15132,22 +14712,6 @@ to return true:wantsResponderID| |
|
|
|
15132
14712
|
return child;
|
|
15133
14713
|
}
|
|
15134
14714
|
|
|
15135
|
-
{
|
|
15136
|
-
var _type = Component.type;
|
|
15137
|
-
var _innerPropTypes = _type.propTypes;
|
|
15138
|
-
|
|
15139
|
-
if (_innerPropTypes) {
|
|
15140
|
-
// Inner memo component props aren't currently validated in createElement.
|
|
15141
|
-
// We could move it there, but we'd still need this for lazy code path.
|
|
15142
|
-
checkPropTypes(
|
|
15143
|
-
_innerPropTypes,
|
|
15144
|
-
nextProps, // Resolved props
|
|
15145
|
-
"prop",
|
|
15146
|
-
getComponentNameFromType(_type)
|
|
15147
|
-
);
|
|
15148
|
-
}
|
|
15149
|
-
}
|
|
15150
|
-
|
|
15151
14715
|
var currentChild = current.child; // This is always exactly one child
|
|
15152
14716
|
|
|
15153
14717
|
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(
|
|
@@ -15193,40 +14757,6 @@ to return true:wantsResponderID| |
|
|
|
15193
14757
|
// TODO: current can be non-null here even if the component
|
|
15194
14758
|
// hasn't yet mounted. This happens when the inner render suspends.
|
|
15195
14759
|
// We'll need to figure out if this is fine or can cause issues.
|
|
15196
|
-
{
|
|
15197
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
15198
|
-
// Lazy component props can't be validated in createElement
|
|
15199
|
-
// because they're only guaranteed to be resolved here.
|
|
15200
|
-
var outerMemoType = workInProgress.elementType;
|
|
15201
|
-
|
|
15202
|
-
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
|
|
15203
|
-
// We warn when you define propTypes on lazy()
|
|
15204
|
-
// so let's just skip over it to find memo() outer wrapper.
|
|
15205
|
-
// Inner props for memo are validated later.
|
|
15206
|
-
var lazyComponent = outerMemoType;
|
|
15207
|
-
var payload = lazyComponent._payload;
|
|
15208
|
-
var init = lazyComponent._init;
|
|
15209
|
-
|
|
15210
|
-
try {
|
|
15211
|
-
outerMemoType = init(payload);
|
|
15212
|
-
} catch (x) {
|
|
15213
|
-
outerMemoType = null;
|
|
15214
|
-
} // Inner propTypes will be validated in the function component path.
|
|
15215
|
-
|
|
15216
|
-
var outerPropTypes = outerMemoType && outerMemoType.propTypes;
|
|
15217
|
-
|
|
15218
|
-
if (outerPropTypes) {
|
|
15219
|
-
checkPropTypes(
|
|
15220
|
-
outerPropTypes,
|
|
15221
|
-
nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
|
|
15222
|
-
"prop",
|
|
15223
|
-
getComponentNameFromType(outerMemoType)
|
|
15224
|
-
);
|
|
15225
|
-
}
|
|
15226
|
-
}
|
|
15227
|
-
}
|
|
15228
|
-
}
|
|
15229
|
-
|
|
15230
14760
|
if (current !== null) {
|
|
15231
14761
|
var prevProps = current.memoizedProps;
|
|
15232
14762
|
|
|
@@ -15299,7 +14829,7 @@ to return true:wantsResponderID| |
|
|
|
15299
14829
|
var nextIsDetached =
|
|
15300
14830
|
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
|
|
15301
14831
|
var prevState = current !== null ? current.memoizedState : null;
|
|
15302
|
-
markRef
|
|
14832
|
+
markRef(current, workInProgress);
|
|
15303
14833
|
|
|
15304
14834
|
if (nextProps.mode === "hidden" || enableLegacyHidden || nextIsDetached) {
|
|
15305
14835
|
// Rendering a hidden tree.
|
|
@@ -15464,16 +14994,26 @@ to return true:wantsResponderID| |
|
|
|
15464
14994
|
return workInProgress.child;
|
|
15465
14995
|
}
|
|
15466
14996
|
|
|
15467
|
-
function markRef
|
|
14997
|
+
function markRef(current, workInProgress) {
|
|
14998
|
+
// TODO: Check props.ref instead of fiber.ref when enableRefAsProp is on.
|
|
15468
14999
|
var ref = workInProgress.ref;
|
|
15469
15000
|
|
|
15470
|
-
if (
|
|
15471
|
-
(current
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15001
|
+
if (ref === null) {
|
|
15002
|
+
if (current !== null && current.ref !== null) {
|
|
15003
|
+
// Schedule a Ref effect
|
|
15004
|
+
workInProgress.flags |= Ref | RefStatic;
|
|
15005
|
+
}
|
|
15006
|
+
} else {
|
|
15007
|
+
if (typeof ref !== "function" && typeof ref !== "object") {
|
|
15008
|
+
throw new Error(
|
|
15009
|
+
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
|
|
15010
|
+
);
|
|
15011
|
+
}
|
|
15012
|
+
|
|
15013
|
+
if (current === null || current.ref !== ref) {
|
|
15014
|
+
// Schedule a Ref effect
|
|
15015
|
+
workInProgress.flags |= Ref | RefStatic;
|
|
15016
|
+
}
|
|
15477
15017
|
}
|
|
15478
15018
|
}
|
|
15479
15019
|
|
|
@@ -15484,34 +15024,8 @@ to return true:wantsResponderID| |
|
|
|
15484
15024
|
nextProps,
|
|
15485
15025
|
renderLanes
|
|
15486
15026
|
) {
|
|
15487
|
-
{
|
|
15488
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
15489
|
-
// Lazy component props can't be validated in createElement
|
|
15490
|
-
// because they're only guaranteed to be resolved here.
|
|
15491
|
-
var innerPropTypes = Component.propTypes;
|
|
15492
|
-
|
|
15493
|
-
if (innerPropTypes) {
|
|
15494
|
-
checkPropTypes(
|
|
15495
|
-
innerPropTypes,
|
|
15496
|
-
nextProps, // Resolved props
|
|
15497
|
-
"prop",
|
|
15498
|
-
getComponentNameFromType(Component)
|
|
15499
|
-
);
|
|
15500
|
-
}
|
|
15501
|
-
}
|
|
15502
|
-
}
|
|
15503
|
-
|
|
15504
15027
|
var context;
|
|
15505
15028
|
|
|
15506
|
-
{
|
|
15507
|
-
var unmaskedContext = getUnmaskedContext(
|
|
15508
|
-
workInProgress,
|
|
15509
|
-
Component,
|
|
15510
|
-
true
|
|
15511
|
-
);
|
|
15512
|
-
context = getMaskedContext(workInProgress, unmaskedContext);
|
|
15513
|
-
}
|
|
15514
|
-
|
|
15515
15029
|
var nextChildren;
|
|
15516
15030
|
prepareToReadContext(workInProgress, renderLanes);
|
|
15517
15031
|
|
|
@@ -15621,30 +15135,14 @@ to return true:wantsResponderID| |
|
|
|
15621
15135
|
break;
|
|
15622
15136
|
}
|
|
15623
15137
|
}
|
|
15624
|
-
|
|
15625
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
15626
|
-
// Lazy component props can't be validated in createElement
|
|
15627
|
-
// because they're only guaranteed to be resolved here.
|
|
15628
|
-
var innerPropTypes = Component.propTypes;
|
|
15629
|
-
|
|
15630
|
-
if (innerPropTypes) {
|
|
15631
|
-
checkPropTypes(
|
|
15632
|
-
innerPropTypes,
|
|
15633
|
-
nextProps, // Resolved props
|
|
15634
|
-
"prop",
|
|
15635
|
-
getComponentNameFromType(Component)
|
|
15636
|
-
);
|
|
15637
|
-
}
|
|
15638
|
-
}
|
|
15639
15138
|
} // Push context providers early to prevent context stack mismatches.
|
|
15640
15139
|
// During mounting we don't know the child context yet as the instance doesn't exist.
|
|
15641
15140
|
// We will invalidate the child context in finishClassComponent() right after rendering.
|
|
15642
15141
|
|
|
15643
15142
|
var hasContext;
|
|
15644
15143
|
|
|
15645
|
-
if (isContextProvider(
|
|
15144
|
+
if (isContextProvider()) {
|
|
15646
15145
|
hasContext = true;
|
|
15647
|
-
pushContextProvider(workInProgress);
|
|
15648
15146
|
} else {
|
|
15649
15147
|
hasContext = false;
|
|
15650
15148
|
}
|
|
@@ -15714,15 +15212,10 @@ to return true:wantsResponderID| |
|
|
|
15714
15212
|
renderLanes
|
|
15715
15213
|
) {
|
|
15716
15214
|
// Refs should update even if shouldComponentUpdate returns false
|
|
15717
|
-
markRef
|
|
15215
|
+
markRef(current, workInProgress);
|
|
15718
15216
|
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
|
|
15719
15217
|
|
|
15720
15218
|
if (!shouldUpdate && !didCaptureError) {
|
|
15721
|
-
// Context providers should defer to sCU for rendering
|
|
15722
|
-
if (hasContext) {
|
|
15723
|
-
invalidateContextProvider(workInProgress, Component, false);
|
|
15724
|
-
}
|
|
15725
|
-
|
|
15726
15219
|
return bailoutOnAlreadyFinishedWork(
|
|
15727
15220
|
current,
|
|
15728
15221
|
workInProgress,
|
|
@@ -15788,27 +15281,12 @@ to return true:wantsResponderID| |
|
|
|
15788
15281
|
|
|
15789
15282
|
workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
|
|
15790
15283
|
|
|
15791
|
-
if (hasContext) {
|
|
15792
|
-
invalidateContextProvider(workInProgress, Component, true);
|
|
15793
|
-
}
|
|
15794
|
-
|
|
15795
15284
|
return workInProgress.child;
|
|
15796
15285
|
}
|
|
15797
15286
|
|
|
15798
15287
|
function pushHostRootContext(workInProgress) {
|
|
15799
15288
|
var root = workInProgress.stateNode;
|
|
15800
15289
|
|
|
15801
|
-
if (root.pendingContext) {
|
|
15802
|
-
pushTopLevelContextObject(
|
|
15803
|
-
workInProgress,
|
|
15804
|
-
root.pendingContext,
|
|
15805
|
-
root.pendingContext !== root.context
|
|
15806
|
-
);
|
|
15807
|
-
} else if (root.context) {
|
|
15808
|
-
// Should always be set
|
|
15809
|
-
pushTopLevelContextObject(workInProgress, root.context, false);
|
|
15810
|
-
}
|
|
15811
|
-
|
|
15812
15290
|
pushHostContainer(workInProgress, root.containerInfo);
|
|
15813
15291
|
}
|
|
15814
15292
|
|
|
@@ -15860,7 +15338,7 @@ to return true:wantsResponderID| |
|
|
|
15860
15338
|
workInProgress.flags |= ContentReset;
|
|
15861
15339
|
}
|
|
15862
15340
|
|
|
15863
|
-
markRef
|
|
15341
|
+
markRef(current, workInProgress);
|
|
15864
15342
|
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
|
|
15865
15343
|
return workInProgress.child;
|
|
15866
15344
|
}
|
|
@@ -15941,21 +15419,6 @@ to return true:wantsResponderID| |
|
|
|
15941
15419
|
}
|
|
15942
15420
|
|
|
15943
15421
|
case MemoComponent: {
|
|
15944
|
-
{
|
|
15945
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
15946
|
-
var outerPropTypes = Component.propTypes;
|
|
15947
|
-
|
|
15948
|
-
if (outerPropTypes) {
|
|
15949
|
-
checkPropTypes(
|
|
15950
|
-
outerPropTypes,
|
|
15951
|
-
resolvedProps, // Resolved for outer only
|
|
15952
|
-
"prop",
|
|
15953
|
-
getComponentNameFromType(Component)
|
|
15954
|
-
);
|
|
15955
|
-
}
|
|
15956
|
-
}
|
|
15957
|
-
}
|
|
15958
|
-
|
|
15959
15422
|
child = updateMemoComponent(
|
|
15960
15423
|
null,
|
|
15961
15424
|
workInProgress,
|
|
@@ -16005,9 +15468,8 @@ to return true:wantsResponderID| |
|
|
|
16005
15468
|
|
|
16006
15469
|
var hasContext;
|
|
16007
15470
|
|
|
16008
|
-
if (isContextProvider(
|
|
15471
|
+
if (isContextProvider()) {
|
|
16009
15472
|
hasContext = true;
|
|
16010
|
-
pushContextProvider(workInProgress);
|
|
16011
15473
|
} else {
|
|
16012
15474
|
hasContext = false;
|
|
16013
15475
|
}
|
|
@@ -16035,15 +15497,6 @@ to return true:wantsResponderID| |
|
|
|
16035
15497
|
var props = workInProgress.pendingProps;
|
|
16036
15498
|
var context;
|
|
16037
15499
|
|
|
16038
|
-
{
|
|
16039
|
-
var unmaskedContext = getUnmaskedContext(
|
|
16040
|
-
workInProgress,
|
|
16041
|
-
Component,
|
|
16042
|
-
false
|
|
16043
|
-
);
|
|
16044
|
-
context = getMaskedContext(workInProgress, unmaskedContext);
|
|
16045
|
-
}
|
|
16046
|
-
|
|
16047
15500
|
prepareToReadContext(workInProgress, renderLanes);
|
|
16048
15501
|
var value;
|
|
16049
15502
|
|
|
@@ -16153,9 +15606,8 @@ to return true:wantsResponderID| |
|
|
|
16153
15606
|
|
|
16154
15607
|
var hasContext = false;
|
|
16155
15608
|
|
|
16156
|
-
if (isContextProvider(
|
|
15609
|
+
if (isContextProvider()) {
|
|
16157
15610
|
hasContext = true;
|
|
16158
|
-
pushContextProvider(workInProgress);
|
|
16159
15611
|
} else {
|
|
16160
15612
|
hasContext = false;
|
|
16161
15613
|
}
|
|
@@ -16179,6 +15631,16 @@ to return true:wantsResponderID| |
|
|
|
16179
15631
|
// Proceed under the assumption that this is a function component
|
|
16180
15632
|
workInProgress.tag = FunctionComponent;
|
|
16181
15633
|
|
|
15634
|
+
{
|
|
15635
|
+
if (Component.contextTypes) {
|
|
15636
|
+
error(
|
|
15637
|
+
"%s uses the legacy contextTypes API which is no longer supported. " +
|
|
15638
|
+
"Use React.createContext() with React.useContext() instead.",
|
|
15639
|
+
getComponentNameFromType(Component) || "Unknown"
|
|
15640
|
+
);
|
|
15641
|
+
}
|
|
15642
|
+
}
|
|
15643
|
+
|
|
16182
15644
|
reconcileChildren(null, workInProgress, value, renderLanes);
|
|
16183
15645
|
|
|
16184
15646
|
{
|
|
@@ -16194,7 +15656,8 @@ to return true:wantsResponderID| |
|
|
|
16194
15656
|
if (Component) {
|
|
16195
15657
|
if (Component.childContextTypes) {
|
|
16196
15658
|
error(
|
|
16197
|
-
"
|
|
15659
|
+
"childContextTypes cannot be defined on a function component.\n" +
|
|
15660
|
+
" %s.childContextTypes = ...",
|
|
16198
15661
|
Component.displayName || Component.name || "Component"
|
|
16199
15662
|
);
|
|
16200
15663
|
}
|
|
@@ -16828,7 +16291,7 @@ to return true:wantsResponderID| |
|
|
|
16828
16291
|
}
|
|
16829
16292
|
|
|
16830
16293
|
error.digest = digest;
|
|
16831
|
-
capturedValue =
|
|
16294
|
+
capturedValue = createCapturedValueFromError(error, digest, stack);
|
|
16832
16295
|
}
|
|
16833
16296
|
|
|
16834
16297
|
return retrySuspenseComponentWithoutHydrating(
|
|
@@ -16938,7 +16401,7 @@ to return true:wantsResponderID| |
|
|
|
16938
16401
|
pushPrimaryTreeSuspenseHandler(workInProgress);
|
|
16939
16402
|
workInProgress.flags &= ~ForceClientRender;
|
|
16940
16403
|
|
|
16941
|
-
var _capturedValue =
|
|
16404
|
+
var _capturedValue = createCapturedValueFromError(
|
|
16942
16405
|
new Error(
|
|
16943
16406
|
"There was an error while hydrating this Suspense boundary. " +
|
|
16944
16407
|
"Switched to client rendering."
|
|
@@ -17427,8 +16890,12 @@ to return true:wantsResponderID| |
|
|
|
17427
16890
|
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
|
|
17428
16891
|
|
|
17429
16892
|
function updateContextProvider(current, workInProgress, renderLanes) {
|
|
17430
|
-
var
|
|
17431
|
-
|
|
16893
|
+
var context;
|
|
16894
|
+
|
|
16895
|
+
{
|
|
16896
|
+
context = workInProgress.type._context;
|
|
16897
|
+
}
|
|
16898
|
+
|
|
17432
16899
|
var newProps = workInProgress.pendingProps;
|
|
17433
16900
|
var oldProps = workInProgress.memoizedProps;
|
|
17434
16901
|
var newValue = newProps.value;
|
|
@@ -17443,17 +16910,6 @@ to return true:wantsResponderID| |
|
|
|
17443
16910
|
);
|
|
17444
16911
|
}
|
|
17445
16912
|
}
|
|
17446
|
-
|
|
17447
|
-
var providerPropTypes = workInProgress.type.propTypes;
|
|
17448
|
-
|
|
17449
|
-
if (providerPropTypes) {
|
|
17450
|
-
checkPropTypes(
|
|
17451
|
-
providerPropTypes,
|
|
17452
|
-
newProps,
|
|
17453
|
-
"prop",
|
|
17454
|
-
"Context.Provider"
|
|
17455
|
-
);
|
|
17456
|
-
}
|
|
17457
16913
|
}
|
|
17458
16914
|
|
|
17459
16915
|
pushProvider(workInProgress, context, newValue);
|
|
@@ -17487,34 +16943,16 @@ to return true:wantsResponderID| |
|
|
|
17487
16943
|
return workInProgress.child;
|
|
17488
16944
|
}
|
|
17489
16945
|
|
|
17490
|
-
var hasWarnedAboutUsingContextAsConsumer = false;
|
|
17491
|
-
|
|
17492
16946
|
function updateContextConsumer(current, workInProgress, renderLanes) {
|
|
17493
|
-
var context
|
|
17494
|
-
// DEV mode, we create a separate object for Context.Consumer that acts
|
|
17495
|
-
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
|
17496
|
-
// so we use the old behaviour (Context.Consumer references Context) to
|
|
17497
|
-
// reduce size and overhead. The separate object references context via
|
|
17498
|
-
// a property called "_context", which also gives us the ability to check
|
|
17499
|
-
// in DEV mode if this property exists or not and warn if it does not.
|
|
16947
|
+
var context;
|
|
17500
16948
|
|
|
17501
16949
|
{
|
|
17502
|
-
|
|
17503
|
-
// This may be because it's a Context (rather than a Consumer).
|
|
17504
|
-
// Or it may be because it's older React where they're the same thing.
|
|
17505
|
-
// We only want to warn if we're sure it's a new React.
|
|
17506
|
-
if (context !== context.Consumer) {
|
|
17507
|
-
if (!hasWarnedAboutUsingContextAsConsumer) {
|
|
17508
|
-
hasWarnedAboutUsingContextAsConsumer = true;
|
|
16950
|
+
context = workInProgress.type;
|
|
17509
16951
|
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
);
|
|
17514
|
-
}
|
|
16952
|
+
{
|
|
16953
|
+
if (context._context !== undefined) {
|
|
16954
|
+
context = context._context;
|
|
17515
16955
|
}
|
|
17516
|
-
} else {
|
|
17517
|
-
context = context._context;
|
|
17518
16956
|
}
|
|
17519
16957
|
}
|
|
17520
16958
|
|
|
@@ -17615,7 +17053,11 @@ to return true:wantsResponderID| |
|
|
|
17615
17053
|
newWorkInProgress.index = oldWorkInProgress.index;
|
|
17616
17054
|
newWorkInProgress.sibling = oldWorkInProgress.sibling;
|
|
17617
17055
|
newWorkInProgress.return = oldWorkInProgress.return;
|
|
17618
|
-
newWorkInProgress.ref = oldWorkInProgress.ref;
|
|
17056
|
+
newWorkInProgress.ref = oldWorkInProgress.ref;
|
|
17057
|
+
|
|
17058
|
+
{
|
|
17059
|
+
newWorkInProgress._debugInfo = oldWorkInProgress._debugInfo;
|
|
17060
|
+
} // Replace the child/sibling pointers above it.
|
|
17619
17061
|
|
|
17620
17062
|
if (oldWorkInProgress === returnFiber.child) {
|
|
17621
17063
|
returnFiber.child = newWorkInProgress;
|
|
@@ -17687,12 +17129,6 @@ to return true:wantsResponderID| |
|
|
|
17687
17129
|
break;
|
|
17688
17130
|
|
|
17689
17131
|
case ClassComponent: {
|
|
17690
|
-
var Component = workInProgress.type;
|
|
17691
|
-
|
|
17692
|
-
if (isContextProvider(Component)) {
|
|
17693
|
-
pushContextProvider(workInProgress);
|
|
17694
|
-
}
|
|
17695
|
-
|
|
17696
17132
|
break;
|
|
17697
17133
|
}
|
|
17698
17134
|
|
|
@@ -17705,7 +17141,12 @@ to return true:wantsResponderID| |
|
|
|
17705
17141
|
|
|
17706
17142
|
case ContextProvider: {
|
|
17707
17143
|
var newValue = workInProgress.memoizedProps.value;
|
|
17708
|
-
var context
|
|
17144
|
+
var context;
|
|
17145
|
+
|
|
17146
|
+
{
|
|
17147
|
+
context = workInProgress.type._context;
|
|
17148
|
+
}
|
|
17149
|
+
|
|
17709
17150
|
pushProvider(workInProgress, context, newValue);
|
|
17710
17151
|
break;
|
|
17711
17152
|
}
|
|
@@ -17863,7 +17304,7 @@ to return true:wantsResponderID| |
|
|
|
17863
17304
|
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
17864
17305
|
}
|
|
17865
17306
|
|
|
17866
|
-
function beginWork
|
|
17307
|
+
function beginWork(current, workInProgress, renderLanes) {
|
|
17867
17308
|
{
|
|
17868
17309
|
if (workInProgress._debugNeedsRemount && current !== null) {
|
|
17869
17310
|
// This will restart the begin phase with a new fiber.
|
|
@@ -18049,31 +17490,16 @@ to return true:wantsResponderID| |
|
|
|
18049
17490
|
return updateContextConsumer(current, workInProgress, renderLanes);
|
|
18050
17491
|
|
|
18051
17492
|
case MemoComponent: {
|
|
18052
|
-
var
|
|
17493
|
+
var _type = workInProgress.type;
|
|
18053
17494
|
var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
|
|
18054
17495
|
|
|
18055
|
-
var _resolvedProps3 = resolveDefaultProps(
|
|
17496
|
+
var _resolvedProps3 = resolveDefaultProps(_type, _unresolvedProps3);
|
|
18056
17497
|
|
|
18057
|
-
|
|
18058
|
-
if (workInProgress.type !== workInProgress.elementType) {
|
|
18059
|
-
var outerPropTypes = _type2.propTypes;
|
|
18060
|
-
|
|
18061
|
-
if (outerPropTypes) {
|
|
18062
|
-
checkPropTypes(
|
|
18063
|
-
outerPropTypes,
|
|
18064
|
-
_resolvedProps3, // Resolved for outer only
|
|
18065
|
-
"prop",
|
|
18066
|
-
getComponentNameFromType(_type2)
|
|
18067
|
-
);
|
|
18068
|
-
}
|
|
18069
|
-
}
|
|
18070
|
-
}
|
|
18071
|
-
|
|
18072
|
-
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
|
|
17498
|
+
_resolvedProps3 = resolveDefaultProps(_type.type, _resolvedProps3);
|
|
18073
17499
|
return updateMemoComponent(
|
|
18074
17500
|
current,
|
|
18075
17501
|
workInProgress,
|
|
18076
|
-
|
|
17502
|
+
_type,
|
|
18077
17503
|
_resolvedProps3,
|
|
18078
17504
|
renderLanes
|
|
18079
17505
|
);
|
|
@@ -18437,7 +17863,7 @@ to return true:wantsResponderID| |
|
|
|
18437
17863
|
|
|
18438
17864
|
return readContextForConsumer(currentlyRenderingFiber, context);
|
|
18439
17865
|
}
|
|
18440
|
-
function
|
|
17866
|
+
function readContextDuringReconciliation(consumer, context, renderLanes) {
|
|
18441
17867
|
if (currentlyRenderingFiber === null) {
|
|
18442
17868
|
prepareToReadContext(consumer, renderLanes);
|
|
18443
17869
|
}
|
|
@@ -18516,10 +17942,6 @@ to return true:wantsResponderID| |
|
|
|
18516
17942
|
function markUpdate(workInProgress) {
|
|
18517
17943
|
workInProgress.flags |= Update;
|
|
18518
17944
|
}
|
|
18519
|
-
|
|
18520
|
-
function markRef(workInProgress) {
|
|
18521
|
-
workInProgress.flags |= Ref | RefStatic;
|
|
18522
|
-
}
|
|
18523
17945
|
/**
|
|
18524
17946
|
* In persistent mode, return whether this update needs to clone the subtree.
|
|
18525
17947
|
*/
|
|
@@ -19159,12 +18581,6 @@ to return true:wantsResponderID| |
|
|
|
19159
18581
|
return null;
|
|
19160
18582
|
|
|
19161
18583
|
case ClassComponent: {
|
|
19162
|
-
var Component = workInProgress.type;
|
|
19163
|
-
|
|
19164
|
-
if (isContextProvider(Component)) {
|
|
19165
|
-
popContext(workInProgress);
|
|
19166
|
-
}
|
|
19167
|
-
|
|
19168
18584
|
bubbleProperties(workInProgress);
|
|
19169
18585
|
return null;
|
|
19170
18586
|
}
|
|
@@ -19172,7 +18588,6 @@ to return true:wantsResponderID| |
|
|
|
19172
18588
|
case HostRoot: {
|
|
19173
18589
|
var fiberRoot = workInProgress.stateNode;
|
|
19174
18590
|
popHostContainer(workInProgress);
|
|
19175
|
-
popTopLevelContextObject(workInProgress);
|
|
19176
18591
|
|
|
19177
18592
|
if (fiberRoot.pendingContext) {
|
|
19178
18593
|
fiberRoot.context = fiberRoot.pendingContext;
|
|
@@ -19229,10 +18644,6 @@ to return true:wantsResponderID| |
|
|
|
19229
18644
|
|
|
19230
18645
|
if (current !== null && workInProgress.stateNode != null) {
|
|
19231
18646
|
updateHostComponent(current, workInProgress, _type2, newProps);
|
|
19232
|
-
|
|
19233
|
-
if (current.ref !== workInProgress.ref) {
|
|
19234
|
-
markRef(workInProgress);
|
|
19235
|
-
}
|
|
19236
18647
|
} else {
|
|
19237
18648
|
if (!newProps) {
|
|
19238
18649
|
if (workInProgress.stateNode === null) {
|
|
@@ -19272,11 +18683,6 @@ to return true:wantsResponderID| |
|
|
|
19272
18683
|
appendAllChildren(_instance3, workInProgress, false, false);
|
|
19273
18684
|
workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.
|
|
19274
18685
|
}
|
|
19275
|
-
|
|
19276
|
-
if (workInProgress.ref !== null) {
|
|
19277
|
-
// If there is a ref on a host node we need to schedule a callback
|
|
19278
|
-
markRef(workInProgress);
|
|
19279
|
-
}
|
|
19280
18686
|
}
|
|
19281
18687
|
|
|
19282
18688
|
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
|
|
@@ -19331,7 +18737,6 @@ to return true:wantsResponderID| |
|
|
|
19331
18737
|
}
|
|
19332
18738
|
|
|
19333
18739
|
case SuspenseComponent: {
|
|
19334
|
-
popSuspenseHandler(workInProgress);
|
|
19335
18740
|
var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this
|
|
19336
18741
|
// to its own fiber type so that we can add other kinds of hydration
|
|
19337
18742
|
// boundaries that aren't associated with a Suspense tree. In anticipation
|
|
@@ -19352,17 +18757,21 @@ to return true:wantsResponderID| |
|
|
|
19352
18757
|
|
|
19353
18758
|
if (!fallthroughToNormalSuspensePath) {
|
|
19354
18759
|
if (workInProgress.flags & ForceClientRender) {
|
|
19355
|
-
// Special case. There were remaining unhydrated nodes. We treat
|
|
18760
|
+
popSuspenseHandler(workInProgress); // Special case. There were remaining unhydrated nodes. We treat
|
|
19356
18761
|
// this as a mismatch. Revert to client rendering.
|
|
18762
|
+
|
|
19357
18763
|
return workInProgress;
|
|
19358
18764
|
} else {
|
|
19359
|
-
// Did not finish hydrating, either because this is the initial
|
|
18765
|
+
popSuspenseHandler(workInProgress); // Did not finish hydrating, either because this is the initial
|
|
19360
18766
|
// render or because something suspended.
|
|
18767
|
+
|
|
19361
18768
|
return null;
|
|
19362
18769
|
}
|
|
19363
18770
|
} // Continue with the normal Suspense path.
|
|
19364
18771
|
}
|
|
19365
18772
|
|
|
18773
|
+
popSuspenseHandler(workInProgress);
|
|
18774
|
+
|
|
19366
18775
|
if ((workInProgress.flags & DidCapture) !== NoFlags$1) {
|
|
19367
18776
|
// Something suspended. Re-render with the fallback children.
|
|
19368
18777
|
workInProgress.lanes = renderLanes; // Do not reset the effect list.
|
|
@@ -19429,20 +18838,17 @@ to return true:wantsResponderID| |
|
|
|
19429
18838
|
|
|
19430
18839
|
case ContextProvider:
|
|
19431
18840
|
// Pop provider fiber
|
|
19432
|
-
var context
|
|
18841
|
+
var context;
|
|
18842
|
+
|
|
18843
|
+
{
|
|
18844
|
+
context = workInProgress.type._context;
|
|
18845
|
+
}
|
|
18846
|
+
|
|
19433
18847
|
popProvider(context, workInProgress);
|
|
19434
18848
|
bubbleProperties(workInProgress);
|
|
19435
18849
|
return null;
|
|
19436
18850
|
|
|
19437
18851
|
case IncompleteClassComponent: {
|
|
19438
|
-
// Same as class component case. I put it down here so that the tags are
|
|
19439
|
-
// sequential to ensure this switch is compiled to a jump table.
|
|
19440
|
-
var _Component = workInProgress.type;
|
|
19441
|
-
|
|
19442
|
-
if (isContextProvider(_Component)) {
|
|
19443
|
-
popContext(workInProgress);
|
|
19444
|
-
}
|
|
19445
|
-
|
|
19446
18852
|
bubbleProperties(workInProgress);
|
|
19447
18853
|
return null;
|
|
19448
18854
|
}
|
|
@@ -19734,12 +19140,6 @@ to return true:wantsResponderID| |
|
|
|
19734
19140
|
function unwindWork(current, workInProgress, renderLanes) {
|
|
19735
19141
|
switch (workInProgress.tag) {
|
|
19736
19142
|
case ClassComponent: {
|
|
19737
|
-
var Component = workInProgress.type;
|
|
19738
|
-
|
|
19739
|
-
if (isContextProvider(Component)) {
|
|
19740
|
-
popContext(workInProgress);
|
|
19741
|
-
}
|
|
19742
|
-
|
|
19743
19143
|
var flags = workInProgress.flags;
|
|
19744
19144
|
|
|
19745
19145
|
if (flags & ShouldCapture) {
|
|
@@ -19757,7 +19157,6 @@ to return true:wantsResponderID| |
|
|
|
19757
19157
|
|
|
19758
19158
|
case HostRoot: {
|
|
19759
19159
|
popHostContainer(workInProgress);
|
|
19760
|
-
popTopLevelContextObject(workInProgress);
|
|
19761
19160
|
var _flags = workInProgress.flags;
|
|
19762
19161
|
|
|
19763
19162
|
if (
|
|
@@ -19821,7 +19220,12 @@ to return true:wantsResponderID| |
|
|
|
19821
19220
|
return null;
|
|
19822
19221
|
|
|
19823
19222
|
case ContextProvider:
|
|
19824
|
-
var context
|
|
19223
|
+
var context;
|
|
19224
|
+
|
|
19225
|
+
{
|
|
19226
|
+
context = workInProgress.type._context;
|
|
19227
|
+
}
|
|
19228
|
+
|
|
19825
19229
|
popProvider(context, workInProgress);
|
|
19826
19230
|
return null;
|
|
19827
19231
|
|
|
@@ -19858,18 +19262,11 @@ to return true:wantsResponderID| |
|
|
|
19858
19262
|
function unwindInterruptedWork(current, interruptedWork, renderLanes) {
|
|
19859
19263
|
switch (interruptedWork.tag) {
|
|
19860
19264
|
case ClassComponent: {
|
|
19861
|
-
var childContextTypes = interruptedWork.type.childContextTypes;
|
|
19862
|
-
|
|
19863
|
-
if (childContextTypes !== null && childContextTypes !== undefined) {
|
|
19864
|
-
popContext(interruptedWork);
|
|
19865
|
-
}
|
|
19866
|
-
|
|
19867
19265
|
break;
|
|
19868
19266
|
}
|
|
19869
19267
|
|
|
19870
19268
|
case HostRoot: {
|
|
19871
19269
|
popHostContainer(interruptedWork);
|
|
19872
|
-
popTopLevelContextObject(interruptedWork);
|
|
19873
19270
|
break;
|
|
19874
19271
|
}
|
|
19875
19272
|
|
|
@@ -19893,7 +19290,12 @@ to return true:wantsResponderID| |
|
|
|
19893
19290
|
break;
|
|
19894
19291
|
|
|
19895
19292
|
case ContextProvider:
|
|
19896
|
-
var context
|
|
19293
|
+
var context;
|
|
19294
|
+
|
|
19295
|
+
{
|
|
19296
|
+
context = interruptedWork.type._context;
|
|
19297
|
+
}
|
|
19298
|
+
|
|
19897
19299
|
popProvider(context, interruptedWork);
|
|
19898
19300
|
break;
|
|
19899
19301
|
|
|
@@ -19927,20 +19329,6 @@ to return true:wantsResponderID| |
|
|
|
19927
19329
|
);
|
|
19928
19330
|
}
|
|
19929
19331
|
|
|
19930
|
-
function reportUncaughtErrorInDEV(error) {
|
|
19931
|
-
// Wrapping each small part of the commit phase into a guarded
|
|
19932
|
-
// callback is a bit too slow (https://github.com/facebook/react/pull/21666).
|
|
19933
|
-
// But we rely on it to surface errors to DEV tools like overlays
|
|
19934
|
-
// (https://github.com/facebook/react/issues/21712).
|
|
19935
|
-
// As a compromise, rethrow only caught errors in a guard.
|
|
19936
|
-
{
|
|
19937
|
-
invokeGuardedCallback(null, function () {
|
|
19938
|
-
throw error;
|
|
19939
|
-
});
|
|
19940
|
-
clearCaughtError();
|
|
19941
|
-
}
|
|
19942
|
-
}
|
|
19943
|
-
|
|
19944
19332
|
function callComponentWillUnmountWithTimer(current, instance) {
|
|
19945
19333
|
instance.props = current.memoizedProps;
|
|
19946
19334
|
instance.state = current.memoizedState;
|
|
@@ -20317,7 +19705,7 @@ to return true:wantsResponderID| |
|
|
|
20317
19705
|
" }\n" +
|
|
20318
19706
|
" fetchData();\n" +
|
|
20319
19707
|
"}, [someId]); // Or [] if effect doesn't need props or state\n\n" +
|
|
20320
|
-
"Learn more about data fetching with Hooks: https://
|
|
19708
|
+
"Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching";
|
|
20321
19709
|
} else {
|
|
20322
19710
|
addendum = " You returned: " + destroy;
|
|
20323
19711
|
}
|
|
@@ -20866,6 +20254,8 @@ to return true:wantsResponderID| |
|
|
|
20866
20254
|
}
|
|
20867
20255
|
} else {
|
|
20868
20256
|
{
|
|
20257
|
+
// TODO: We should move these warnings to happen during the render
|
|
20258
|
+
// phase (markRef).
|
|
20869
20259
|
if (!ref.hasOwnProperty("current")) {
|
|
20870
20260
|
error(
|
|
20871
20261
|
"Unexpected ref object provided for %s. " +
|
|
@@ -22806,7 +22196,9 @@ to return true:wantsResponderID| |
|
|
|
22806
22196
|
var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.
|
|
22807
22197
|
// We will log them once the tree commits.
|
|
22808
22198
|
|
|
22809
|
-
var workInProgressRootRecoverableErrors = null; //
|
|
22199
|
+
var workInProgressRootRecoverableErrors = null; // Tracks when an update occurs during the render phase.
|
|
22200
|
+
|
|
22201
|
+
var workInProgressRootDidIncludeRecursiveRenderUpdate = false; // Thacks when an update occurs during the commit phase. It's a separate
|
|
22810
22202
|
// filled in with the resolved UI. This lets us throttle the appearance of new
|
|
22811
22203
|
// content as it streams in, to minimize jank.
|
|
22812
22204
|
// TODO: Think of a better name for this variable?
|
|
@@ -22830,7 +22222,7 @@ to return true:wantsResponderID| |
|
|
|
22830
22222
|
}
|
|
22831
22223
|
var hasUncaughtError = false;
|
|
22832
22224
|
var firstUncaughtError = null;
|
|
22833
|
-
var legacyErrorBoundariesThatAlreadyFailed = null;
|
|
22225
|
+
var legacyErrorBoundariesThatAlreadyFailed = null;
|
|
22834
22226
|
var rootDoesHavePassiveEffects = false;
|
|
22835
22227
|
var rootWithPendingPassiveEffects = null;
|
|
22836
22228
|
var pendingPassiveEffectsLanes = NoLanes;
|
|
@@ -23322,6 +22714,7 @@ to return true:wantsResponderID| |
|
|
|
23322
22714
|
root,
|
|
23323
22715
|
workInProgressRootRecoverableErrors,
|
|
23324
22716
|
workInProgressTransitions,
|
|
22717
|
+
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
|
23325
22718
|
workInProgressDeferredLane
|
|
23326
22719
|
);
|
|
23327
22720
|
} else {
|
|
@@ -23352,6 +22745,7 @@ to return true:wantsResponderID| |
|
|
|
23352
22745
|
finishedWork,
|
|
23353
22746
|
workInProgressRootRecoverableErrors,
|
|
23354
22747
|
workInProgressTransitions,
|
|
22748
|
+
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
|
23355
22749
|
lanes,
|
|
23356
22750
|
workInProgressDeferredLane
|
|
23357
22751
|
),
|
|
@@ -23366,6 +22760,7 @@ to return true:wantsResponderID| |
|
|
|
23366
22760
|
finishedWork,
|
|
23367
22761
|
workInProgressRootRecoverableErrors,
|
|
23368
22762
|
workInProgressTransitions,
|
|
22763
|
+
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
|
23369
22764
|
lanes,
|
|
23370
22765
|
workInProgressDeferredLane
|
|
23371
22766
|
);
|
|
@@ -23377,6 +22772,7 @@ to return true:wantsResponderID| |
|
|
|
23377
22772
|
finishedWork,
|
|
23378
22773
|
recoverableErrors,
|
|
23379
22774
|
transitions,
|
|
22775
|
+
didIncludeRenderPhaseUpdate,
|
|
23380
22776
|
lanes,
|
|
23381
22777
|
spawnedLane
|
|
23382
22778
|
) {
|
|
@@ -23401,14 +22797,26 @@ to return true:wantsResponderID| |
|
|
|
23401
22797
|
// us that it's ready. This will be canceled if we start work on the
|
|
23402
22798
|
// root again.
|
|
23403
22799
|
root.cancelPendingCommit = schedulePendingCommit(
|
|
23404
|
-
commitRoot.bind(
|
|
22800
|
+
commitRoot.bind(
|
|
22801
|
+
null,
|
|
22802
|
+
root,
|
|
22803
|
+
recoverableErrors,
|
|
22804
|
+
transitions,
|
|
22805
|
+
didIncludeRenderPhaseUpdate
|
|
22806
|
+
)
|
|
23405
22807
|
);
|
|
23406
22808
|
markRootSuspended(root, lanes, spawnedLane);
|
|
23407
22809
|
return;
|
|
23408
22810
|
}
|
|
23409
22811
|
} // Otherwise, commit immediately.
|
|
23410
22812
|
|
|
23411
|
-
commitRoot(
|
|
22813
|
+
commitRoot(
|
|
22814
|
+
root,
|
|
22815
|
+
recoverableErrors,
|
|
22816
|
+
transitions,
|
|
22817
|
+
didIncludeRenderPhaseUpdate,
|
|
22818
|
+
spawnedLane
|
|
22819
|
+
);
|
|
23412
22820
|
}
|
|
23413
22821
|
|
|
23414
22822
|
function isRenderConsistentWithExternalStores(finishedWork) {
|
|
@@ -23471,13 +22879,23 @@ to return true:wantsResponderID| |
|
|
|
23471
22879
|
// eslint-disable-next-line no-unreachable
|
|
23472
22880
|
|
|
23473
22881
|
return true;
|
|
22882
|
+
} // The extra indirections around markRootUpdated and markRootSuspended is
|
|
22883
|
+
// needed to avoid a circular dependency between this module and
|
|
22884
|
+
// ReactFiberLane. There's probably a better way to split up these modules and
|
|
22885
|
+
// avoid this problem. Perhaps all the root-marking functions should move into
|
|
22886
|
+
// the work loop.
|
|
22887
|
+
|
|
22888
|
+
function markRootUpdated(root, updatedLanes) {
|
|
22889
|
+
markRootUpdated$1(root, updatedLanes);
|
|
22890
|
+
}
|
|
22891
|
+
|
|
22892
|
+
function markRootPinged(root, pingedLanes) {
|
|
22893
|
+
markRootPinged$1(root, pingedLanes);
|
|
23474
22894
|
}
|
|
23475
22895
|
|
|
23476
22896
|
function markRootSuspended(root, suspendedLanes, spawnedLane) {
|
|
23477
22897
|
// When suspending, we should always exclude lanes that were pinged or (more
|
|
23478
22898
|
// rarely, since we try to avoid it) updated during the render phase.
|
|
23479
|
-
// TODO: Lol maybe there's a better way to factor this besides this
|
|
23480
|
-
// obnoxiously named function :)
|
|
23481
22899
|
suspendedLanes = removeLanes(
|
|
23482
22900
|
suspendedLanes,
|
|
23483
22901
|
workInProgressRootPingedLanes
|
|
@@ -23486,6 +22904,7 @@ to return true:wantsResponderID| |
|
|
|
23486
22904
|
suspendedLanes,
|
|
23487
22905
|
workInProgressRootInterleavedUpdatedLanes
|
|
23488
22906
|
);
|
|
22907
|
+
|
|
23489
22908
|
markRootSuspended$1(root, suspendedLanes, spawnedLane);
|
|
23490
22909
|
} // This is the entry point for synchronous tasks that don't go
|
|
23491
22910
|
// through Scheduler
|
|
@@ -23560,6 +22979,7 @@ to return true:wantsResponderID| |
|
|
|
23560
22979
|
root,
|
|
23561
22980
|
workInProgressRootRecoverableErrors,
|
|
23562
22981
|
workInProgressTransitions,
|
|
22982
|
+
workInProgressRootDidIncludeRecursiveRenderUpdate,
|
|
23563
22983
|
workInProgressDeferredLane
|
|
23564
22984
|
); // Before exiting, make sure there's a callback scheduled for the next
|
|
23565
22985
|
// pending level.
|
|
@@ -23704,7 +23124,8 @@ to return true:wantsResponderID| |
|
|
|
23704
23124
|
workInProgressRootPingedLanes = NoLanes;
|
|
23705
23125
|
workInProgressDeferredLane = NoLane;
|
|
23706
23126
|
workInProgressRootConcurrentErrors = null;
|
|
23707
|
-
workInProgressRootRecoverableErrors = null;
|
|
23127
|
+
workInProgressRootRecoverableErrors = null;
|
|
23128
|
+
workInProgressRootDidIncludeRecursiveRenderUpdate = false; // Get the lanes that are entangled with whatever we're about to render. We
|
|
23708
23129
|
// track these separately so we can distinguish the priority of the render
|
|
23709
23130
|
// task from the priority of the lanes it is entangled with. For example, a
|
|
23710
23131
|
// transition may not be allowed to finish unless it includes the Sync lane,
|
|
@@ -24379,15 +23800,6 @@ to return true:wantsResponderID| |
|
|
|
24379
23800
|
: resolveDefaultProps(Component, unresolvedProps);
|
|
24380
23801
|
var context;
|
|
24381
23802
|
|
|
24382
|
-
{
|
|
24383
|
-
var unmaskedContext = getUnmaskedContext(
|
|
24384
|
-
unitOfWork,
|
|
24385
|
-
Component,
|
|
24386
|
-
true
|
|
24387
|
-
);
|
|
24388
|
-
context = getMaskedContext(unitOfWork, unmaskedContext);
|
|
24389
|
-
}
|
|
24390
|
-
|
|
24391
23803
|
next = replayFunctionComponent(
|
|
24392
23804
|
current,
|
|
24393
23805
|
unitOfWork,
|
|
@@ -24668,7 +24080,13 @@ to return true:wantsResponderID| |
|
|
|
24668
24080
|
workInProgress = null;
|
|
24669
24081
|
}
|
|
24670
24082
|
|
|
24671
|
-
function commitRoot(
|
|
24083
|
+
function commitRoot(
|
|
24084
|
+
root,
|
|
24085
|
+
recoverableErrors,
|
|
24086
|
+
transitions,
|
|
24087
|
+
didIncludeRenderPhaseUpdate,
|
|
24088
|
+
spawnedLane
|
|
24089
|
+
) {
|
|
24672
24090
|
// TODO: This no longer makes any sense. We already wrap the mutation and
|
|
24673
24091
|
// layout phases. Should be able to remove.
|
|
24674
24092
|
var previousUpdateLanePriority = getCurrentUpdatePriority();
|
|
@@ -24681,6 +24099,7 @@ to return true:wantsResponderID| |
|
|
|
24681
24099
|
root,
|
|
24682
24100
|
recoverableErrors,
|
|
24683
24101
|
transitions,
|
|
24102
|
+
didIncludeRenderPhaseUpdate,
|
|
24684
24103
|
previousUpdateLanePriority,
|
|
24685
24104
|
spawnedLane
|
|
24686
24105
|
);
|
|
@@ -24696,6 +24115,7 @@ to return true:wantsResponderID| |
|
|
|
24696
24115
|
root,
|
|
24697
24116
|
recoverableErrors,
|
|
24698
24117
|
transitions,
|
|
24118
|
+
didIncludeRenderPhaseUpdate,
|
|
24699
24119
|
renderPriorityLevel,
|
|
24700
24120
|
spawnedLane
|
|
24701
24121
|
) {
|
|
@@ -24755,7 +24175,7 @@ to return true:wantsResponderID| |
|
|
|
24755
24175
|
|
|
24756
24176
|
var concurrentlyUpdatedLanes = getConcurrentlyUpdatedLanes();
|
|
24757
24177
|
remainingLanes = mergeLanes(remainingLanes, concurrentlyUpdatedLanes);
|
|
24758
|
-
markRootFinished(root, remainingLanes, spawnedLane);
|
|
24178
|
+
markRootFinished(root, remainingLanes, spawnedLane); // Reset this before firing side effects so we can detect recursive updates.
|
|
24759
24179
|
|
|
24760
24180
|
if (root === workInProgressRoot) {
|
|
24761
24181
|
// We can reset these now that they are finished.
|
|
@@ -24818,7 +24238,7 @@ to return true:wantsResponderID| |
|
|
|
24818
24238
|
// Mark the current commit time to be shared by all Profilers in this
|
|
24819
24239
|
// batch. This enables them to be grouped later.
|
|
24820
24240
|
recordCommitTime();
|
|
24821
|
-
}
|
|
24241
|
+
} // The next phase is the mutation phase, where we mutate the host tree.
|
|
24822
24242
|
|
|
24823
24243
|
commitMutationEffects(root, finishedWork, lanes);
|
|
24824
24244
|
// the mutation phase, so that the previous tree is still current during
|
|
@@ -24937,6 +24357,9 @@ to return true:wantsResponderID| |
|
|
|
24937
24357
|
// hydration is conceptually not an update.
|
|
24938
24358
|
|
|
24939
24359
|
if (
|
|
24360
|
+
// Check if there was a recursive update spawned by this render, in either
|
|
24361
|
+
// the render phase or the commit phase. We track these explicitly because
|
|
24362
|
+
// we can't infer from the remaining lanes alone.
|
|
24940
24363
|
// Was the finished render the result of an update (not hydration)?
|
|
24941
24364
|
includesSomeLane(lanes, UpdateLanes) && // Did it schedule a sync update?
|
|
24942
24365
|
includesSomeLane(remainingLanes, SyncUpdateLanes)
|
|
@@ -25136,7 +24559,6 @@ to return true:wantsResponderID| |
|
|
|
25136
24559
|
error$1
|
|
25137
24560
|
) {
|
|
25138
24561
|
{
|
|
25139
|
-
reportUncaughtErrorInDEV(error$1);
|
|
25140
24562
|
setIsRunningInsertionEffect(false);
|
|
25141
24563
|
}
|
|
25142
24564
|
|
|
@@ -25358,6 +24780,7 @@ to return true:wantsResponderID| |
|
|
|
25358
24780
|
nestedPassiveUpdateCount = 0;
|
|
25359
24781
|
rootWithNestedUpdates = null;
|
|
25360
24782
|
rootWithPassiveNestedUpdates = null;
|
|
24783
|
+
|
|
25361
24784
|
throw new Error(
|
|
25362
24785
|
"Maximum update depth exceeded. This can happen when a component " +
|
|
25363
24786
|
"repeatedly calls setState inside componentWillUpdate or " +
|
|
@@ -25514,81 +24937,6 @@ to return true:wantsResponderID| |
|
|
|
25514
24937
|
}
|
|
25515
24938
|
}
|
|
25516
24939
|
}
|
|
25517
|
-
var beginWork;
|
|
25518
|
-
|
|
25519
|
-
{
|
|
25520
|
-
var dummyFiber = null;
|
|
25521
|
-
|
|
25522
|
-
beginWork = function (current, unitOfWork, lanes) {
|
|
25523
|
-
// If a component throws an error, we replay it again in a synchronously
|
|
25524
|
-
// dispatched event, so that the debugger will treat it as an uncaught
|
|
25525
|
-
// error See ReactErrorUtils for more information.
|
|
25526
|
-
// Before entering the begin phase, copy the work-in-progress onto a dummy
|
|
25527
|
-
// fiber. If beginWork throws, we'll use this to reset the state.
|
|
25528
|
-
var originalWorkInProgressCopy = assignFiberPropertiesInDEV(
|
|
25529
|
-
dummyFiber,
|
|
25530
|
-
unitOfWork
|
|
25531
|
-
);
|
|
25532
|
-
|
|
25533
|
-
try {
|
|
25534
|
-
return beginWork$1(current, unitOfWork, lanes);
|
|
25535
|
-
} catch (originalError) {
|
|
25536
|
-
if (
|
|
25537
|
-
didSuspendOrErrorWhileHydratingDEV() ||
|
|
25538
|
-
originalError === SuspenseException ||
|
|
25539
|
-
originalError === SelectiveHydrationException ||
|
|
25540
|
-
(originalError !== null &&
|
|
25541
|
-
typeof originalError === "object" &&
|
|
25542
|
-
typeof originalError.then === "function")
|
|
25543
|
-
) {
|
|
25544
|
-
// Don't replay promises.
|
|
25545
|
-
// Don't replay errors if we are hydrating and have already suspended or handled an error
|
|
25546
|
-
throw originalError;
|
|
25547
|
-
} // Don't reset current debug fiber, since we're about to work on the
|
|
25548
|
-
// same fiber again.
|
|
25549
|
-
// Unwind the failed stack frame
|
|
25550
|
-
|
|
25551
|
-
resetSuspendedWorkLoopOnUnwind(unitOfWork);
|
|
25552
|
-
unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.
|
|
25553
|
-
|
|
25554
|
-
assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
|
|
25555
|
-
|
|
25556
|
-
if (unitOfWork.mode & ProfileMode) {
|
|
25557
|
-
// Reset the profiler timer.
|
|
25558
|
-
startProfilerTimer(unitOfWork);
|
|
25559
|
-
} // Run beginWork again.
|
|
25560
|
-
|
|
25561
|
-
invokeGuardedCallback(
|
|
25562
|
-
null,
|
|
25563
|
-
beginWork$1,
|
|
25564
|
-
null,
|
|
25565
|
-
current,
|
|
25566
|
-
unitOfWork,
|
|
25567
|
-
lanes
|
|
25568
|
-
);
|
|
25569
|
-
|
|
25570
|
-
if (hasCaughtError()) {
|
|
25571
|
-
var replayError = clearCaughtError();
|
|
25572
|
-
|
|
25573
|
-
if (
|
|
25574
|
-
typeof replayError === "object" &&
|
|
25575
|
-
replayError !== null &&
|
|
25576
|
-
replayError._suppressLogging &&
|
|
25577
|
-
typeof originalError === "object" &&
|
|
25578
|
-
originalError !== null &&
|
|
25579
|
-
!originalError._suppressLogging
|
|
25580
|
-
) {
|
|
25581
|
-
// If suppressed, let the flag carry over to the original error which is the one we'll rethrow.
|
|
25582
|
-
originalError._suppressLogging = true;
|
|
25583
|
-
}
|
|
25584
|
-
} // We always throw the original error in case the second render pass is not idempotent.
|
|
25585
|
-
// This can happen if a memoized function or CommonJS module doesn't throw after first invocation.
|
|
25586
|
-
|
|
25587
|
-
throw originalError;
|
|
25588
|
-
}
|
|
25589
|
-
};
|
|
25590
|
-
}
|
|
25591
|
-
|
|
25592
24940
|
var didWarnAboutUpdateInRender = false;
|
|
25593
24941
|
var didWarnAboutUpdateInRenderForAnotherComponent;
|
|
25594
24942
|
|
|
@@ -25619,7 +24967,7 @@ to return true:wantsResponderID| |
|
|
|
25619
24967
|
error(
|
|
25620
24968
|
"Cannot update a component (`%s`) while rendering a " +
|
|
25621
24969
|
"different component (`%s`). To locate the bad setState() call inside `%s`, " +
|
|
25622
|
-
"follow the stack trace as described in https://
|
|
24970
|
+
"follow the stack trace as described in https://react.dev/link/setstate-in-render",
|
|
25623
24971
|
setStateComponentName,
|
|
25624
24972
|
renderingComponentName,
|
|
25625
24973
|
renderingComponentName
|
|
@@ -25728,7 +25076,7 @@ to return true:wantsResponderID| |
|
|
|
25728
25076
|
"/* assert on the output */\n\n" +
|
|
25729
25077
|
"This ensures that you're testing the behavior the user would see " +
|
|
25730
25078
|
"in the browser." +
|
|
25731
|
-
" Learn more at https://
|
|
25079
|
+
" Learn more at https://react.dev/link/wrap-tests-with-act",
|
|
25732
25080
|
getComponentNameFromFiber(fiber)
|
|
25733
25081
|
);
|
|
25734
25082
|
} finally {
|
|
@@ -25760,7 +25108,7 @@ to return true:wantsResponderID| |
|
|
|
25760
25108
|
"/* assert on the output */\n\n" +
|
|
25761
25109
|
"This ensures that you're testing the behavior the user would see " +
|
|
25762
25110
|
"in the browser." +
|
|
25763
|
-
" Learn more at https://
|
|
25111
|
+
" Learn more at https://react.dev/link/wrap-tests-with-act"
|
|
25764
25112
|
);
|
|
25765
25113
|
}
|
|
25766
25114
|
}
|
|
@@ -26297,6 +25645,7 @@ to return true:wantsResponderID| |
|
|
|
26297
25645
|
|
|
26298
25646
|
{
|
|
26299
25647
|
// This isn't directly used but is handy for debugging internals:
|
|
25648
|
+
this._debugInfo = null;
|
|
26300
25649
|
this._debugOwner = null;
|
|
26301
25650
|
this._debugNeedsRemount = false;
|
|
26302
25651
|
this._debugHookTypes = null;
|
|
@@ -26435,6 +25784,7 @@ to return true:wantsResponderID| |
|
|
|
26435
25784
|
}
|
|
26436
25785
|
|
|
26437
25786
|
{
|
|
25787
|
+
workInProgress._debugInfo = current._debugInfo;
|
|
26438
25788
|
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
|
26439
25789
|
|
|
26440
25790
|
switch (workInProgress.tag) {
|
|
@@ -26633,14 +25983,21 @@ to return true:wantsResponderID| |
|
|
|
26633
25983
|
default: {
|
|
26634
25984
|
if (typeof type === "object" && type !== null) {
|
|
26635
25985
|
switch (type.$$typeof) {
|
|
26636
|
-
case REACT_PROVIDER_TYPE:
|
|
25986
|
+
case REACT_PROVIDER_TYPE: {
|
|
26637
25987
|
fiberTag = ContextProvider;
|
|
26638
25988
|
break getTag;
|
|
25989
|
+
}
|
|
26639
25990
|
|
|
26640
|
-
|
|
26641
|
-
|
|
25991
|
+
// Fall through
|
|
25992
|
+
|
|
25993
|
+
case REACT_CONTEXT_TYPE: {
|
|
26642
25994
|
fiberTag = ContextConsumer;
|
|
26643
25995
|
break getTag;
|
|
25996
|
+
}
|
|
25997
|
+
|
|
25998
|
+
case REACT_CONSUMER_TYPE:
|
|
25999
|
+
|
|
26000
|
+
// Fall through
|
|
26644
26001
|
|
|
26645
26002
|
case REACT_FORWARD_REF_TYPE:
|
|
26646
26003
|
fiberTag = ForwardRef;
|
|
@@ -26809,54 +26166,6 @@ to return true:wantsResponderID| |
|
|
|
26809
26166
|
implementation: portal.implementation
|
|
26810
26167
|
};
|
|
26811
26168
|
return fiber;
|
|
26812
|
-
} // Used for stashing WIP properties to replay failed work in DEV.
|
|
26813
|
-
|
|
26814
|
-
function assignFiberPropertiesInDEV(target, source) {
|
|
26815
|
-
if (target === null) {
|
|
26816
|
-
// This Fiber's initial properties will always be overwritten.
|
|
26817
|
-
// We only use a Fiber to ensure the same hidden class so DEV isn't slow.
|
|
26818
|
-
target = createFiber(IndeterminateComponent, null, null, NoMode);
|
|
26819
|
-
} // This is intentionally written as a list of all properties.
|
|
26820
|
-
// We tried to use Object.assign() instead but this is called in
|
|
26821
|
-
// the hottest path, and Object.assign() was too slow:
|
|
26822
|
-
// https://github.com/facebook/react/issues/12502
|
|
26823
|
-
// This code is DEV-only so size is not a concern.
|
|
26824
|
-
|
|
26825
|
-
target.tag = source.tag;
|
|
26826
|
-
target.key = source.key;
|
|
26827
|
-
target.elementType = source.elementType;
|
|
26828
|
-
target.type = source.type;
|
|
26829
|
-
target.stateNode = source.stateNode;
|
|
26830
|
-
target.return = source.return;
|
|
26831
|
-
target.child = source.child;
|
|
26832
|
-
target.sibling = source.sibling;
|
|
26833
|
-
target.index = source.index;
|
|
26834
|
-
target.ref = source.ref;
|
|
26835
|
-
target.refCleanup = source.refCleanup;
|
|
26836
|
-
target.pendingProps = source.pendingProps;
|
|
26837
|
-
target.memoizedProps = source.memoizedProps;
|
|
26838
|
-
target.updateQueue = source.updateQueue;
|
|
26839
|
-
target.memoizedState = source.memoizedState;
|
|
26840
|
-
target.dependencies = source.dependencies;
|
|
26841
|
-
target.mode = source.mode;
|
|
26842
|
-
target.flags = source.flags;
|
|
26843
|
-
target.subtreeFlags = source.subtreeFlags;
|
|
26844
|
-
target.deletions = source.deletions;
|
|
26845
|
-
target.lanes = source.lanes;
|
|
26846
|
-
target.childLanes = source.childLanes;
|
|
26847
|
-
target.alternate = source.alternate;
|
|
26848
|
-
|
|
26849
|
-
{
|
|
26850
|
-
target.actualDuration = source.actualDuration;
|
|
26851
|
-
target.actualStartTime = source.actualStartTime;
|
|
26852
|
-
target.selfBaseDuration = source.selfBaseDuration;
|
|
26853
|
-
target.treeBaseDuration = source.treeBaseDuration;
|
|
26854
|
-
}
|
|
26855
|
-
|
|
26856
|
-
target._debugOwner = source._debugOwner;
|
|
26857
|
-
target._debugNeedsRemount = source._debugNeedsRemount;
|
|
26858
|
-
target._debugHookTypes = source._debugHookTypes;
|
|
26859
|
-
return target;
|
|
26860
26169
|
}
|
|
26861
26170
|
|
|
26862
26171
|
function FiberRootNode(
|
|
@@ -26968,7 +26277,7 @@ to return true:wantsResponderID| |
|
|
|
26968
26277
|
return root;
|
|
26969
26278
|
}
|
|
26970
26279
|
|
|
26971
|
-
var ReactVersion = "18.3.0-canary-
|
|
26280
|
+
var ReactVersion = "18.3.0-canary-9372c6311-20240315";
|
|
26972
26281
|
|
|
26973
26282
|
function createPortal$1(
|
|
26974
26283
|
children,
|
|
@@ -27010,12 +26319,12 @@ to return true:wantsResponderID| |
|
|
|
27010
26319
|
}
|
|
27011
26320
|
|
|
27012
26321
|
var fiber = get(parentComponent);
|
|
27013
|
-
var parentContext = findCurrentUnmaskedContext(
|
|
26322
|
+
var parentContext = findCurrentUnmaskedContext();
|
|
27014
26323
|
|
|
27015
26324
|
if (fiber.tag === ClassComponent) {
|
|
27016
26325
|
var Component = fiber.type;
|
|
27017
26326
|
|
|
27018
|
-
if (isContextProvider(
|
|
26327
|
+
if (isContextProvider()) {
|
|
27019
26328
|
return processChildContext(fiber, Component, parentContext);
|
|
27020
26329
|
}
|
|
27021
26330
|
}
|
|
@@ -27060,7 +26369,7 @@ to return true:wantsResponderID| |
|
|
|
27060
26369
|
"%s was passed an instance of %s which is inside StrictMode. " +
|
|
27061
26370
|
"Instead, add a ref directly to the element you want to reference. " +
|
|
27062
26371
|
"Learn more about using refs safely here: " +
|
|
27063
|
-
"https://
|
|
26372
|
+
"https://react.dev/link/strict-mode-find-node",
|
|
27064
26373
|
methodName,
|
|
27065
26374
|
methodName,
|
|
27066
26375
|
componentName
|
|
@@ -27071,7 +26380,7 @@ to return true:wantsResponderID| |
|
|
|
27071
26380
|
"%s was passed an instance of %s which renders StrictMode children. " +
|
|
27072
26381
|
"Instead, add a ref directly to the element you want to reference. " +
|
|
27073
26382
|
"Learn more about using refs safely here: " +
|
|
27074
|
-
"https://
|
|
26383
|
+
"https://react.dev/link/strict-mode-find-node",
|
|
27075
26384
|
methodName,
|
|
27076
26385
|
methodName,
|
|
27077
26386
|
componentName
|
|
@@ -27161,7 +26470,7 @@ to return true:wantsResponderID| |
|
|
|
27161
26470
|
{
|
|
27162
26471
|
if (typeof callback !== "function") {
|
|
27163
26472
|
error(
|
|
27164
|
-
"
|
|
26473
|
+
"Expected the last optional `callback` argument to be a " +
|
|
27165
26474
|
"function. Instead received: %s.",
|
|
27166
26475
|
callback
|
|
27167
26476
|
);
|