@office-iss/react-native-win32 0.70.2 → 0.71.0-preview.1
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/.eslintignore +1 -0
- package/.eslintrc.js +2 -0
- package/.flowconfig +3 -6
- package/CHANGELOG.json +281 -43
- package/CHANGELOG.md +105 -24
- package/IntegrationTests/AccessibilityManagerTest.js +1 -1
- package/IntegrationTests/AppEventsTest.js +0 -1
- package/IntegrationTests/BUCK +0 -1
- package/IntegrationTests/GlobalEvalWithSourceUrlTest.js +1 -1
- package/IntegrationTests/ImageSnapshotTest.js +1 -1
- package/IntegrationTests/IntegrationTestsApp.js +2 -3
- package/IntegrationTests/SimpleSnapshotTest.js +1 -1
- package/IntegrationTests/SyncMethodTest.js +1 -1
- package/IntegrationTests/TimersTest.js +4 -4
- package/IntegrationTests/WebSocketTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +80 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +4 -3
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
- package/Libraries/Alert/Alert.d.ts +90 -0
- package/Libraries/Alert/Alert.js +7 -1
- package/Libraries/Alert/Alert.win32.js +1 -0
- package/Libraries/Alert/NativeAlertManager.js +2 -0
- package/Libraries/Alert/RCTAlertManager.ios.js +2 -1
- package/Libraries/Animated/Animated.d.ts +587 -0
- package/Libraries/Animated/Animated.js +13 -11
- package/Libraries/Animated/AnimatedEvent.js +12 -17
- package/Libraries/Animated/AnimatedImplementation.js +21 -23
- package/Libraries/Animated/AnimatedMock.js +11 -13
- package/Libraries/Animated/AnimatedWeb.js +2 -2
- package/Libraries/Animated/Easing.d.ts +37 -0
- package/Libraries/Animated/Easing.js +2 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +32 -22
- package/Libraries/Animated/NativeAnimatedModule.js +1 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
- package/Libraries/Animated/SpringConfig.js +2 -7
- package/Libraries/Animated/animations/Animation.js +3 -4
- package/Libraries/Animated/animations/DecayAnimation.js +5 -8
- package/Libraries/Animated/animations/SpringAnimation.js +9 -14
- package/Libraries/Animated/animations/TimingAnimation.js +9 -13
- package/Libraries/Animated/bezier.js +2 -2
- package/Libraries/Animated/components/AnimatedFlatList.js +5 -6
- package/Libraries/Animated/components/AnimatedImage.js +5 -6
- package/Libraries/Animated/components/AnimatedScrollView.js +110 -14
- package/Libraries/Animated/components/AnimatedSectionList.js +4 -5
- package/Libraries/Animated/components/AnimatedText.js +5 -6
- package/Libraries/Animated/components/AnimatedView.js +5 -6
- package/Libraries/Animated/createAnimatedComponent.js +13 -20
- package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +2 -2
- package/Libraries/Animated/nodes/AnimatedAddition.js +6 -8
- package/Libraries/Animated/nodes/AnimatedColor.js +7 -7
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +6 -8
- package/Libraries/Animated/nodes/AnimatedDivision.js +7 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +7 -10
- package/Libraries/Animated/nodes/AnimatedModulo.js +6 -8
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +7 -9
- package/Libraries/Animated/nodes/AnimatedNode.js +10 -8
- package/Libraries/Animated/nodes/AnimatedProps.js +12 -30
- package/Libraries/Animated/nodes/AnimatedStyle.js +12 -22
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +7 -9
- package/Libraries/Animated/nodes/AnimatedTracking.js +8 -12
- package/Libraries/Animated/nodes/AnimatedTransform.js +38 -31
- package/Libraries/Animated/nodes/AnimatedValue.js +9 -10
- package/Libraries/Animated/nodes/AnimatedValueXY.js +4 -7
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +4 -5
- package/Libraries/Animated/useAnimatedProps.js +8 -16
- package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValue.js +25 -0
- package/Libraries/AppState/AppState.d.ts +58 -0
- package/Libraries/AppState/AppState.js +3 -7
- package/Libraries/AppState/NativeAppState.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +9 -5
- package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
- package/Libraries/BatchedBridge/NativeModules.js +1 -0
- package/Libraries/Blob/BlobManager.js +5 -3
- package/Libraries/Blob/File.js +2 -3
- package/Libraries/Blob/FileReader.js +6 -5
- package/Libraries/Blob/NativeBlobModule.js +1 -0
- package/Libraries/Blob/NativeFileReaderModule.js +1 -0
- package/Libraries/Blob/URL.js +11 -9
- package/Libraries/BugReporting/NativeBugReporting.js +1 -0
- package/Libraries/BugReporting/getReactData.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +128 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +208 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +40 -8
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +40 -8
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +1 -0
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +5 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +86 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +58 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +7 -8
- package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +2 -3
- package/Libraries/Components/Button.d.ts +42 -0
- package/Libraries/Components/Button.flow.js +265 -0
- package/Libraries/Components/Button.js +62 -18
- package/Libraries/Components/Clipboard/Clipboard.d.ts +28 -0
- package/Libraries/Components/Clipboard/NativeClipboard.js +1 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.android.js +4 -2
- package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +92 -0
- package/Libraries/Components/{MaskedView/MaskedViewIOS.android.js → DatePicker/DatePickerIOS.flow.android.js} +3 -2
- package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +113 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +8 -7
- package/Libraries/Components/DatePicker/DatePickerIOS.win32.js +4 -2
- package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +7 -6
- package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +1 -0
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +9 -8
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +13 -14
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
- package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
- package/Libraries/Components/Keyboard/Keyboard.js +35 -8
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +46 -0
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +35 -15
- package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +1 -0
- package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
- package/Libraries/Components/Pressable/Pressable.js +73 -15
- package/Libraries/Components/Pressable/Pressable.win32.js +77 -19
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +6 -3
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +3 -3
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +83 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +2 -2
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +1 -1
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +62 -0
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +4 -4
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.win32.js +1 -1
- package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +2 -2
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +5 -6
- package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +4 -4
- package/Libraries/Components/RefreshControl/RefreshControl.d.ts +87 -0
- package/Libraries/Components/RefreshControl/RefreshControl.js +4 -3
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +19 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +5 -4
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +5 -4
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -1
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +2 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +911 -0
- package/Libraries/Components/ScrollView/ScrollView.js +87 -52
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +243 -269
- package/Libraries/Components/Slider/Slider.d.ts +132 -0
- package/Libraries/Components/Slider/Slider.js +9 -9
- package/Libraries/Components/Slider/SliderNativeComponent.js +4 -5
- package/Libraries/Components/Sound/NativeSoundManager.js +1 -0
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +1 -0
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +1 -0
- package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
- package/Libraries/Components/StatusBar/StatusBar.js +7 -7
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +10 -10
- package/Libraries/Components/Switch/Switch.d.ts +115 -0
- package/Libraries/Components/Switch/Switch.js +7 -7
- package/Libraries/Components/Switch/SwitchNativeComponent.js +9 -4
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +40 -12
- package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
- package/Libraries/Components/TextInput/InputAccessoryView.js +3 -4
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +3 -2
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +3 -2
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +840 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +1057 -0
- package/Libraries/Components/TextInput/TextInput.js +344 -38
- package/Libraries/Components/TextInput/TextInput.win32.d.ts +1 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +1 -1
- package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
- package/Libraries/Components/TextInput/TextInputNativeCommands.js +2 -2
- package/Libraries/Components/TextInput/TextInputState.js +22 -5
- package/Libraries/Components/TextInput/TextInputState.win32.js +24 -5
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +1 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
- package/Libraries/Components/Touchable/Touchable.flow.js +258 -0
- package/Libraries/Components/Touchable/Touchable.js +12 -12
- package/Libraries/Components/Touchable/Touchable.win32.js +12 -12
- package/Libraries/Components/Touchable/TouchableBounce.js +44 -10
- package/Libraries/Components/Touchable/TouchableHighlight.d.ts +68 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +32 -9
- package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +54 -20
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +109 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +54 -16
- package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +2 -1
- package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +0 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +143 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +64 -10
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +13 -2
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.d.ts +29 -0
- package/Libraries/Components/View/View.js +91 -8
- package/Libraries/Components/View/View.win32.js +176 -89
- package/Libraries/Components/View/ViewAccessibility.d.ts +360 -0
- package/Libraries/Components/View/ViewAccessibility.js +70 -1
- package/Libraries/Components/View/ViewNativeComponent.js +3 -3
- package/Libraries/Components/View/ViewPropTypes.d.ts +245 -0
- package/Libraries/Components/View/ViewPropTypes.js +105 -13
- package/Libraries/Components/View/ViewPropTypes.win32.js +105 -13
- package/Libraries/Components/View/ViewWin32.Props.d.ts +6 -1
- package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
- package/Libraries/Core/Devtools/openFileInEditor.js +3 -0
- package/Libraries/Core/Devtools/parseErrorStack.js +1 -1
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +8 -0
- package/Libraries/Core/ExtendedError.js +11 -8
- package/Libraries/Core/InitializeCore.js +2 -1
- package/Libraries/Core/NativeExceptionsManager.js +3 -4
- package/Libraries/Core/RawEventEmitter.js +2 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +2 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -0
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -0
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +1 -0
- package/Libraries/Core/Timers/JSTimers.js +13 -11
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/setUpBatchedBridge.js +1 -5
- package/Libraries/Core/setUpDeveloperTools.js +4 -6
- package/Libraries/Core/setUpReactDevTools.js +4 -1
- package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
- package/Libraries/Core/setUpTimers.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +70 -0
- package/Libraries/EventEmitter/NativeEventEmitter.js +1 -0
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +30 -0
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +1 -0
- package/Libraries/Events/EventPolyfill.js +1 -1
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +1 -0
- package/Libraries/Image/AssetSourceResolver.js +4 -6
- package/Libraries/Image/Image.android.js +63 -45
- package/Libraries/Image/Image.d.ts +322 -0
- package/Libraries/Image/Image.flow.js +64 -0
- package/Libraries/Image/Image.ios.js +55 -28
- package/Libraries/Image/Image.win32.js +54 -25
- package/Libraries/Image/ImageBackground.js +18 -7
- package/Libraries/Image/ImageInjection.js +2 -1
- package/Libraries/Image/ImageProps.js +88 -5
- package/Libraries/Image/ImageResizeMode.d.ts +49 -0
- package/Libraries/Image/ImageSource.d.ts +76 -0
- package/Libraries/Image/ImageSourceUtils.js +80 -0
- package/Libraries/Image/ImageUtils.js +21 -0
- package/Libraries/Image/ImageViewNativeComponent.js +8 -5
- package/Libraries/Image/NativeImageEditor.js +1 -0
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -0
- package/Libraries/Image/NativeImageLoaderIOS.js +1 -0
- package/Libraries/Image/NativeImageLoaderWin32.js +1 -0
- package/Libraries/Image/NativeImageStoreAndroid.js +1 -0
- package/Libraries/Image/NativeImageStoreIOS.js +1 -0
- package/Libraries/Image/TextInlineImageNativeComponent.js +4 -3
- package/Libraries/Image/nativeImageSource.js +2 -2
- package/Libraries/Image/resolveAssetSource.js +5 -5
- package/Libraries/Inspector/BorderBox.js +1 -1
- package/Libraries/Inspector/BoxInspector.js +3 -4
- package/Libraries/Inspector/DevtoolsOverlay.js +213 -0
- package/Libraries/Inspector/ElementBox.js +4 -5
- package/Libraries/Inspector/ElementProperties.js +10 -11
- package/Libraries/Inspector/Inspector.js +22 -108
- package/Libraries/Inspector/Inspector.win32.js +23 -109
- package/Libraries/Inspector/InspectorOverlay.js +5 -5
- package/Libraries/Inspector/InspectorOverlay.win32.js +5 -5
- package/Libraries/Inspector/InspectorPanel.js +12 -10
- package/Libraries/Inspector/NetworkOverlay.js +7 -3
- package/Libraries/Inspector/PerformanceOverlay.js +3 -3
- package/Libraries/Inspector/StyleInspector.js +2 -2
- package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +71 -0
- package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
- package/Libraries/Interaction/InteractionManager.d.ts +74 -0
- package/Libraries/Interaction/InteractionManager.js +8 -8
- package/Libraries/Interaction/NativeFrameRateLogger.js +1 -0
- package/Libraries/Interaction/PanResponder.d.ts +202 -0
- package/Libraries/Interaction/PanResponder.flow.js +257 -0
- package/Libraries/Interaction/PanResponder.js +4 -3
- package/Libraries/JSInspector/JSInspector.js +0 -3
- package/Libraries/JSInspector/NetworkAgent.js +3 -3
- package/Libraries/LayoutAnimation/LayoutAnimation.d.ts +84 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +4 -3
- package/Libraries/Linking/Linking.d.ts +61 -0
- package/Libraries/Linking/Linking.js +3 -2
- package/Libraries/Linking/NativeIntentAndroid.js +1 -0
- package/Libraries/Linking/NativeLinkingManager.js +1 -0
- package/Libraries/Lists/CellRenderMask.js +13 -3
- package/Libraries/Lists/ChildListCollection.js +72 -0
- package/Libraries/Lists/FillRateHelper.js +28 -17
- package/Libraries/Lists/FlatList.d.ts +292 -0
- package/Libraries/Lists/FlatList.js +70 -70
- package/Libraries/Lists/SectionList.d.ts +300 -0
- package/Libraries/Lists/SectionList.js +5 -5
- package/Libraries/Lists/SectionListModern.js +6 -6
- package/Libraries/Lists/StateSafePureComponent.js +85 -0
- package/Libraries/Lists/ViewabilityHelper.js +33 -12
- package/Libraries/Lists/VirtualizeUtils.js +17 -13
- package/Libraries/Lists/VirtualizedList.d.ts +317 -0
- package/Libraries/Lists/VirtualizedList.js +548 -890
- package/Libraries/Lists/VirtualizedListCellRenderer.js +259 -0
- package/Libraries/Lists/VirtualizedListContext.js +7 -48
- package/Libraries/Lists/VirtualizedListProps.js +279 -0
- package/Libraries/Lists/VirtualizedSectionList.js +6 -3
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +9 -8
- package/Libraries/LogBox/Data/LogBoxLog.js +5 -5
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +4 -4
- package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -3
- package/Libraries/LogBox/LogBox.d.ts +28 -0
- package/Libraries/LogBox/LogBox.js +11 -11
- package/Libraries/LogBox/LogBoxInspectorContainer.js +5 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/AnsiHighlight.js +5 -3
- package/Libraries/LogBox/UI/LogBoxButton.js +6 -5
- package/Libraries/LogBox/UI/LogBoxInspector.js +6 -6
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +9 -8
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +3 -3
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +7 -6
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +6 -5
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -5
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +7 -6
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +3 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +5 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +5 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +5 -5
- package/Libraries/LogBox/UI/LogBoxMessage.js +3 -3
- package/Libraries/LogBox/UI/LogBoxNotification.js +6 -5
- package/Libraries/Modal/Modal.d.ts +104 -0
- package/Libraries/Modal/Modal.js +14 -14
- package/Libraries/Modal/NativeModalManager.js +1 -0
- package/Libraries/Modal/RCTModalHostViewNativeComponent.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +27 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +8 -3
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +8 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +5 -4
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +1 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +1 -0
- package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevMenu.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevSettings.js +1 -0
- package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +1 -0
- package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +1 -0
- package/Libraries/NativeModules/specs/NativeLogBox.js +3 -2
- package/Libraries/NativeModules/specs/NativeRedBox.js +1 -0
- package/Libraries/NativeModules/specs/NativeSourceCode.js +1 -0
- package/Libraries/Network/NativeNetworkingAndroid.js +1 -0
- package/Libraries/Network/NativeNetworkingIOS.js +1 -0
- package/Libraries/Network/RCTNetworking.android.js +4 -3
- package/Libraries/Network/RCTNetworking.ios.js +3 -2
- package/Libraries/Network/RCTNetworking.win32.js +1 -0
- package/Libraries/Network/convertRequestBody.js +1 -2
- package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -1
- package/Libraries/NewAppScreen/components/Header.js +6 -2
- package/Libraries/NewAppScreen/components/HermesBadge.js +6 -2
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +8 -9
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +4 -1
- package/Libraries/NewAppScreen/index.js +1 -1
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +1 -0
- package/Libraries/Performance/QuickPerformanceLogger.js +34 -10
- package/Libraries/Performance/Systrace.d.ts +66 -0
- package/Libraries/Performance/Systrace.js +110 -195
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +115 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +5 -4
- package/Libraries/Pressability/Pressability.js +12 -10
- package/Libraries/Pressability/Pressability.win32.js +9 -7
- package/Libraries/Pressability/PressabilityDebug.js +2 -2
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +275 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +19 -14
- package/Libraries/ReactNative/AppContainer.js +17 -7
- package/Libraries/ReactNative/AppRegistry.d.ts +68 -0
- package/Libraries/ReactNative/AppRegistry.js +11 -14
- package/Libraries/ReactNative/BridgelessUIManager.js +4 -3
- package/Libraries/ReactNative/FabricUIManager.js +3 -3
- package/Libraries/ReactNative/I18nManager.d.ts +25 -0
- package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +1 -0
- package/Libraries/ReactNative/NativeI18nManager.js +1 -0
- package/Libraries/ReactNative/NativeUIManager.js +1 -0
- package/Libraries/ReactNative/PaperUIManager.js +2 -2
- package/Libraries/ReactNative/PaperUIManager.win32.js +1 -1
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +9 -0
- package/Libraries/ReactNative/RendererImplementation.js +112 -0
- package/Libraries/ReactNative/RendererProxy.d.ts +20 -0
- package/Libraries/ReactNative/RendererProxy.js +26 -0
- package/Libraries/ReactNative/RootTag.js +0 -1
- package/Libraries/ReactNative/UIManager.d.ts +157 -0
- package/Libraries/ReactNative/UIManager.js +1 -1
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +38 -20
- package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
- package/Libraries/ReactNative/requireNativeComponent.js +2 -2
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +10 -9
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +312 -217
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +212 -177
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +248 -213
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +311 -218
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +226 -196
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +262 -232
- package/Libraries/Renderer/implementations/ReactNativeRenderer.d.ts +149 -0
- package/Libraries/Renderer/shims/ReactFabric.js +2 -2
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
- package/Libraries/Renderer/shims/ReactNative.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.d.ts +141 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +23 -22
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +8 -8
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/Settings/NativeSettingsManager.js +1 -0
- package/Libraries/Settings/Settings.d.ts +18 -0
- package/Libraries/Share/NativeShareModule.js +1 -0
- package/Libraries/Share/Share.d.ts +80 -0
- package/Libraries/Share/Share.js +7 -5
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.d.ts +156 -0
- package/Libraries/StyleSheet/StyleSheet.js +15 -11
- package/Libraries/StyleSheet/StyleSheet.win32.js +16 -12
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +332 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +101 -24
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +2 -2
- package/Libraries/StyleSheet/normalizeColor.js +3 -3
- package/Libraries/StyleSheet/private/_TransformStyle.js +26 -24
- package/Libraries/StyleSheet/processAspectRatio.js +53 -0
- package/Libraries/StyleSheet/processColor.d.ts +16 -0
- package/Libraries/StyleSheet/processColor.js +3 -4
- package/Libraries/StyleSheet/processColorArray.js +1 -0
- package/Libraries/StyleSheet/processFontVariant.js +30 -0
- package/Libraries/StyleSheet/processTransform.js +114 -105
- package/Libraries/StyleSheet/splitLayoutProps.js +5 -0
- package/Libraries/Text/Text.d.ts +209 -0
- package/Libraries/Text/Text.js +94 -12
- package/Libraries/Text/TextNativeComponent.js +49 -41
- package/Libraries/Text/TextNativeComponent.win32.js +67 -48
- package/Libraries/Text/TextProps.js +64 -7
- package/Libraries/{Components/MaskedView/MaskedViewIOS.win32.js → TurboModule/RCTExport.d.ts} +3 -4
- package/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -1
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +1 -0
- package/Libraries/Types/CoreEventTypes.d.ts +263 -0
- package/Libraries/Types/CoreEventTypes.js +2 -1
- package/Libraries/Types/CoreEventTypes.win32.js +2 -1
- package/Libraries/Utilities/AcessibilityMapping.js +154 -0
- package/Libraries/Utilities/Appearance.d.ts +43 -0
- package/Libraries/Utilities/Appearance.js +3 -3
- package/Libraries/Utilities/BackHandler.android.js +3 -5
- package/Libraries/Utilities/BackHandler.d.ts +38 -0
- package/Libraries/Utilities/BackHandler.win32.js +3 -5
- package/Libraries/Utilities/DevSettings.d.ts +32 -0
- package/Libraries/Utilities/DevSettings.js +4 -2
- package/Libraries/Utilities/Dimensions.d.ts +79 -0
- package/Libraries/Utilities/Dimensions.js +2 -2
- package/Libraries/Utilities/Dimensions.win32.js +2 -2
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -1
- package/Libraries/Utilities/HMRClient.js +23 -8
- package/Libraries/Utilities/LoadingView.ios.js +1 -1
- package/Libraries/Utilities/NativeAppearance.js +1 -0
- package/Libraries/Utilities/NativeDevLoadingView.js +1 -0
- package/Libraries/Utilities/NativeDevSplitBundleLoader.js +1 -0
- package/Libraries/Utilities/NativeDeviceInfo.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -0
- package/Libraries/Utilities/PerformanceLoggerContext.js +3 -2
- package/Libraries/Utilities/PixelRatio.d.ts +64 -0
- package/Libraries/Utilities/Platform.android.js +11 -5
- package/Libraries/Utilities/Platform.d.ts +102 -0
- package/Libraries/Utilities/Platform.ios.js +12 -5
- package/Libraries/Utilities/Platform.win32.js +11 -5
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +9 -15
- package/Libraries/Utilities/codegenNativeCommands.js +1 -10
- package/Libraries/Utilities/codegenNativeComponent.js +4 -1
- package/Libraries/Utilities/createPerformanceLogger.js +7 -8
- package/Libraries/Utilities/differ/deepDiffer.js +1 -1
- package/Libraries/Utilities/groupByEveryN.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -1
- package/Libraries/Utilities/useColorScheme.js +3 -2
- package/Libraries/Utilities/useRefEffect.js +1 -1
- package/Libraries/Vibration/NativeVibration.js +1 -0
- package/Libraries/Vibration/Vibration.d.ts +43 -0
- package/Libraries/Vibration/Vibration.js +1 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.js +41 -0
- package/Libraries/WebPerformance/PerformanceObserver.js +223 -0
- package/Libraries/WebSocket/NativeWebSocketModule.js +1 -0
- package/Libraries/WebSocket/WebSocket.js +11 -3
- package/Libraries/WebSocket/WebSocketInterceptor.js +1 -1
- package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +19 -0
- package/Libraries/YellowBox/YellowBoxDeprecated.js +2 -3
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -1
- package/Libraries/__tests__/ButtonWin32-test.js +16 -0
- package/Libraries/platform-types.d.ts +25 -0
- package/Libraries/vendor/core/ErrorUtils.d.ts +15 -0
- package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
- package/babel.config.js +3 -0
- package/flow/jest.js +2 -2
- package/flow-typed/npm/{react-dom_v16.x.x.js → react-dom_v17.x.x.js} +58 -31
- package/flow-typed/npm/yargs_v17.x.x.js +341 -0
- package/index.js +89 -55
- package/index.win32.js +89 -55
- package/interface.js +8 -0
- package/jest/react-native-env.js +18 -0
- package/jest/renderer.js +2 -2
- package/jest/setup.js +7 -9
- package/jest.config.js +9 -2
- package/overrides.json +40 -101
- package/package.json +34 -33
- package/src/Libraries/Components/TextInput/TextInput.win32.tsx +2 -1
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
- package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +2 -1
- package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/src/Libraries/Components/View/ViewWin32.Props.ts +10 -1
- package/src/Libraries/__tests__/__snapshots__/ButtonWin32-test.js.snap +22 -0
- package/src/Libraries/platform-types.d.ts +25 -0
- package/types/index.d.ts +215 -0
- package/IntegrationTests/AsyncStorageTest.js +0 -261
- package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
- package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
- package/Libraries/Core/setUpSystrace.js +0 -21
- package/Libraries/Image/ImagePickerIOS.js +0 -103
- package/Libraries/Image/NativeImagePickerIOS.js +0 -38
- package/Libraries/Lists/VirtualizedList.win32.js +0 -9
- package/Libraries/Lists/__tests__/CellRenderMask-test.js +0 -179
- package/Libraries/Lists/__tests__/FillRateHelper-test.js +0 -120
- package/Libraries/Lists/__tests__/FlatList-test.js +0 -155
- package/Libraries/Lists/__tests__/SectionList-test.js +0 -109
- package/Libraries/Lists/__tests__/ViewabilityHelper-test.js +0 -440
- package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +0 -91
- package/Libraries/Lists/__tests__/VirtualizedList-test.js +0 -1587
- package/Libraries/Lists/__tests__/VirtualizedSectionList-test.js +0 -269
- package/Libraries/Storage/AsyncStorage.js +0 -385
- package/Libraries/Storage/NativeAsyncLocalStorage.js +0 -44
- package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +0 -44
- package/Libraries/Utilities/JSDevSupportModule.js +0 -37
- package/Libraries/Utilities/NativeJSDevSupport.js +0 -23
- package/rntypes/BatchedBridge.d.ts +0 -23
- package/rntypes/Devtools.d.ts +0 -20
- package/rntypes/LaunchScreen.d.ts +0 -9
- package/rntypes/globals.d.ts +0 -497
- package/rntypes/index.d.ts +0 -9754
- package/rntypes/legacy-properties.d.ts +0 -238
- package/src/Libraries/Lists/__tests__/__snapshots__/FlatList-test.js.snap +0 -427
- package/src/Libraries/Lists/__tests__/__snapshots__/SectionList-test.js.snap +0 -391
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap +0 -4565
- package/src/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +0 -1153
- package/src/rntypes/BatchedBridge.d.ts +0 -23
- package/src/rntypes/Devtools.d.ts +0 -20
- package/src/rntypes/LaunchScreen.d.ts +0 -9
- package/src/rntypes/globals.d.ts +0 -497
- package/src/rntypes/index.d.ts +0 -9754
- package/src/rntypes/legacy-properties.d.ts +0 -238
- package/src/typings-index.ts +0 -37
- package/typings-index.d.ts +0 -23
- package/typings-index.js +0 -47
- package/typings-index.js.map +0 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @nolint
|
|
9
9
|
* @providesModule ReactNativeRenderer-dev
|
|
10
10
|
* @preventMunge
|
|
11
|
-
* @generated SignedSource<<
|
|
11
|
+
* @generated SignedSource<<bfa2bf0648000d40e0e1b109070049f6>>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
'use strict';
|
|
@@ -7326,30 +7326,27 @@ function readContext(context) {
|
|
|
7326
7326
|
return value;
|
|
7327
7327
|
}
|
|
7328
7328
|
|
|
7329
|
-
// An array of all update queues that received updates during the current
|
|
7330
7329
|
// render. When this render exits, either because it finishes or because it is
|
|
7331
7330
|
// interrupted, the interleaved updates will be transferred onto the main part
|
|
7332
7331
|
// of the queue.
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7332
|
+
|
|
7333
|
+
var concurrentQueues = null;
|
|
7334
|
+
function pushConcurrentUpdateQueue(queue) {
|
|
7335
|
+
if (concurrentQueues === null) {
|
|
7336
|
+
concurrentQueues = [queue];
|
|
7337
7337
|
} else {
|
|
7338
|
-
|
|
7338
|
+
concurrentQueues.push(queue);
|
|
7339
7339
|
}
|
|
7340
7340
|
}
|
|
7341
|
-
function
|
|
7342
|
-
return interleavedQueues !== null;
|
|
7343
|
-
}
|
|
7344
|
-
function enqueueInterleavedUpdates() {
|
|
7341
|
+
function finishQueueingConcurrentUpdates() {
|
|
7345
7342
|
// Transfer the interleaved updates onto the main queue. Each queue has a
|
|
7346
7343
|
// `pending` field and an `interleaved` field. When they are not null, they
|
|
7347
7344
|
// point to the last node in a circular linked list. We need to append the
|
|
7348
7345
|
// interleaved list to the end of the pending list by joining them into a
|
|
7349
7346
|
// single, circular list.
|
|
7350
|
-
if (
|
|
7351
|
-
for (var i = 0; i <
|
|
7352
|
-
var queue =
|
|
7347
|
+
if (concurrentQueues !== null) {
|
|
7348
|
+
for (var i = 0; i < concurrentQueues.length; i++) {
|
|
7349
|
+
var queue = concurrentQueues[i];
|
|
7353
7350
|
var lastInterleavedUpdate = queue.interleaved;
|
|
7354
7351
|
|
|
7355
7352
|
if (lastInterleavedUpdate !== null) {
|
|
@@ -7367,7 +7364,115 @@ function enqueueInterleavedUpdates() {
|
|
|
7367
7364
|
}
|
|
7368
7365
|
}
|
|
7369
7366
|
|
|
7370
|
-
|
|
7367
|
+
concurrentQueues = null;
|
|
7368
|
+
}
|
|
7369
|
+
}
|
|
7370
|
+
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
|
|
7371
|
+
var interleaved = queue.interleaved;
|
|
7372
|
+
|
|
7373
|
+
if (interleaved === null) {
|
|
7374
|
+
// This is the first update. Create a circular list.
|
|
7375
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7376
|
+
// be transferred to the pending queue.
|
|
7377
|
+
|
|
7378
|
+
pushConcurrentUpdateQueue(queue);
|
|
7379
|
+
} else {
|
|
7380
|
+
update.next = interleaved.next;
|
|
7381
|
+
interleaved.next = update;
|
|
7382
|
+
}
|
|
7383
|
+
|
|
7384
|
+
queue.interleaved = update;
|
|
7385
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7386
|
+
}
|
|
7387
|
+
function enqueueConcurrentHookUpdateAndEagerlyBailout(
|
|
7388
|
+
fiber,
|
|
7389
|
+
queue,
|
|
7390
|
+
update,
|
|
7391
|
+
lane
|
|
7392
|
+
) {
|
|
7393
|
+
var interleaved = queue.interleaved;
|
|
7394
|
+
|
|
7395
|
+
if (interleaved === null) {
|
|
7396
|
+
// This is the first update. Create a circular list.
|
|
7397
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7398
|
+
// be transferred to the pending queue.
|
|
7399
|
+
|
|
7400
|
+
pushConcurrentUpdateQueue(queue);
|
|
7401
|
+
} else {
|
|
7402
|
+
update.next = interleaved.next;
|
|
7403
|
+
interleaved.next = update;
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7406
|
+
queue.interleaved = update;
|
|
7407
|
+
}
|
|
7408
|
+
function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
|
|
7409
|
+
var interleaved = queue.interleaved;
|
|
7410
|
+
|
|
7411
|
+
if (interleaved === null) {
|
|
7412
|
+
// This is the first update. Create a circular list.
|
|
7413
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7414
|
+
// be transferred to the pending queue.
|
|
7415
|
+
|
|
7416
|
+
pushConcurrentUpdateQueue(queue);
|
|
7417
|
+
} else {
|
|
7418
|
+
update.next = interleaved.next;
|
|
7419
|
+
interleaved.next = update;
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
queue.interleaved = update;
|
|
7423
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7424
|
+
}
|
|
7425
|
+
function enqueueConcurrentRenderForLane(fiber, lane) {
|
|
7426
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7427
|
+
} // Calling this function outside this module should only be done for backwards
|
|
7428
|
+
// compatibility and should always be accompanied by a warning.
|
|
7429
|
+
|
|
7430
|
+
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
|
|
7431
|
+
|
|
7432
|
+
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
7433
|
+
// Update the source fiber's lanes
|
|
7434
|
+
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
7435
|
+
var alternate = sourceFiber.alternate;
|
|
7436
|
+
|
|
7437
|
+
if (alternate !== null) {
|
|
7438
|
+
alternate.lanes = mergeLanes(alternate.lanes, lane);
|
|
7439
|
+
}
|
|
7440
|
+
|
|
7441
|
+
{
|
|
7442
|
+
if (
|
|
7443
|
+
alternate === null &&
|
|
7444
|
+
(sourceFiber.flags & (Placement | Hydrating)) !== NoFlags
|
|
7445
|
+
) {
|
|
7446
|
+
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
7447
|
+
}
|
|
7448
|
+
} // Walk the parent path to the root and update the child lanes.
|
|
7449
|
+
|
|
7450
|
+
var node = sourceFiber;
|
|
7451
|
+
var parent = sourceFiber.return;
|
|
7452
|
+
|
|
7453
|
+
while (parent !== null) {
|
|
7454
|
+
parent.childLanes = mergeLanes(parent.childLanes, lane);
|
|
7455
|
+
alternate = parent.alternate;
|
|
7456
|
+
|
|
7457
|
+
if (alternate !== null) {
|
|
7458
|
+
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
|
|
7459
|
+
} else {
|
|
7460
|
+
{
|
|
7461
|
+
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
|
|
7462
|
+
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
7463
|
+
}
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
|
|
7467
|
+
node = parent;
|
|
7468
|
+
parent = parent.return;
|
|
7469
|
+
}
|
|
7470
|
+
|
|
7471
|
+
if (node.tag === HostRoot) {
|
|
7472
|
+
var root = node.stateNode;
|
|
7473
|
+
return root;
|
|
7474
|
+
} else {
|
|
7475
|
+
return null;
|
|
7371
7476
|
}
|
|
7372
7477
|
}
|
|
7373
7478
|
|
|
@@ -7433,40 +7538,11 @@ function enqueueUpdate(fiber, update, lane) {
|
|
|
7433
7538
|
|
|
7434
7539
|
if (updateQueue === null) {
|
|
7435
7540
|
// Only occurs if the fiber has been unmounted.
|
|
7436
|
-
return;
|
|
7541
|
+
return null;
|
|
7437
7542
|
}
|
|
7438
7543
|
|
|
7439
7544
|
var sharedQueue = updateQueue.shared;
|
|
7440
7545
|
|
|
7441
|
-
if (isInterleavedUpdate(fiber)) {
|
|
7442
|
-
var interleaved = sharedQueue.interleaved;
|
|
7443
|
-
|
|
7444
|
-
if (interleaved === null) {
|
|
7445
|
-
// This is the first update. Create a circular list.
|
|
7446
|
-
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7447
|
-
// be transferred to the pending queue.
|
|
7448
|
-
|
|
7449
|
-
pushInterleavedQueue(sharedQueue);
|
|
7450
|
-
} else {
|
|
7451
|
-
update.next = interleaved.next;
|
|
7452
|
-
interleaved.next = update;
|
|
7453
|
-
}
|
|
7454
|
-
|
|
7455
|
-
sharedQueue.interleaved = update;
|
|
7456
|
-
} else {
|
|
7457
|
-
var pending = sharedQueue.pending;
|
|
7458
|
-
|
|
7459
|
-
if (pending === null) {
|
|
7460
|
-
// This is the first update. Create a circular list.
|
|
7461
|
-
update.next = update;
|
|
7462
|
-
} else {
|
|
7463
|
-
update.next = pending.next;
|
|
7464
|
-
pending.next = update;
|
|
7465
|
-
}
|
|
7466
|
-
|
|
7467
|
-
sharedQueue.pending = update;
|
|
7468
|
-
}
|
|
7469
|
-
|
|
7470
7546
|
{
|
|
7471
7547
|
if (
|
|
7472
7548
|
currentlyProcessingQueue === sharedQueue &&
|
|
@@ -7482,6 +7558,29 @@ function enqueueUpdate(fiber, update, lane) {
|
|
|
7482
7558
|
didWarnUpdateInsideUpdate = true;
|
|
7483
7559
|
}
|
|
7484
7560
|
}
|
|
7561
|
+
|
|
7562
|
+
if (isUnsafeClassRenderPhaseUpdate()) {
|
|
7563
|
+
// This is an unsafe render phase update. Add directly to the update
|
|
7564
|
+
// queue so we can process it immediately during the current render.
|
|
7565
|
+
var pending = sharedQueue.pending;
|
|
7566
|
+
|
|
7567
|
+
if (pending === null) {
|
|
7568
|
+
// This is the first update. Create a circular list.
|
|
7569
|
+
update.next = update;
|
|
7570
|
+
} else {
|
|
7571
|
+
update.next = pending.next;
|
|
7572
|
+
pending.next = update;
|
|
7573
|
+
}
|
|
7574
|
+
|
|
7575
|
+
sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering
|
|
7576
|
+
// this fiber. This is for backwards compatibility in the case where you
|
|
7577
|
+
// update a different component during render phase than the one that is
|
|
7578
|
+
// currently renderings (a pattern that is accompanied by a warning).
|
|
7579
|
+
|
|
7580
|
+
return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7581
|
+
} else {
|
|
7582
|
+
return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);
|
|
7583
|
+
}
|
|
7485
7584
|
}
|
|
7486
7585
|
function entangleTransitions(root, fiber, lane) {
|
|
7487
7586
|
var updateQueue = fiber.updateQueue;
|
|
@@ -8018,10 +8117,10 @@ var classComponentUpdater = {
|
|
|
8018
8117
|
update.callback = callback;
|
|
8019
8118
|
}
|
|
8020
8119
|
|
|
8021
|
-
enqueueUpdate(fiber, update);
|
|
8022
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
8120
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
8023
8121
|
|
|
8024
8122
|
if (root !== null) {
|
|
8123
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
8025
8124
|
entangleTransitions(root, fiber, lane);
|
|
8026
8125
|
}
|
|
8027
8126
|
},
|
|
@@ -8041,10 +8140,10 @@ var classComponentUpdater = {
|
|
|
8041
8140
|
update.callback = callback;
|
|
8042
8141
|
}
|
|
8043
8142
|
|
|
8044
|
-
enqueueUpdate(fiber, update);
|
|
8045
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
8143
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
8046
8144
|
|
|
8047
8145
|
if (root !== null) {
|
|
8146
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
8048
8147
|
entangleTransitions(root, fiber, lane);
|
|
8049
8148
|
}
|
|
8050
8149
|
},
|
|
@@ -8063,10 +8162,10 @@ var classComponentUpdater = {
|
|
|
8063
8162
|
update.callback = callback;
|
|
8064
8163
|
}
|
|
8065
8164
|
|
|
8066
|
-
enqueueUpdate(fiber, update);
|
|
8067
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
8165
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
8068
8166
|
|
|
8069
8167
|
if (root !== null) {
|
|
8168
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
8070
8169
|
entangleTransitions(root, fiber, lane);
|
|
8071
8170
|
}
|
|
8072
8171
|
}
|
|
@@ -11447,7 +11546,11 @@ function checkIfSnapshotChanged(inst) {
|
|
|
11447
11546
|
}
|
|
11448
11547
|
|
|
11449
11548
|
function forceStoreRerender(fiber) {
|
|
11450
|
-
|
|
11549
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
11550
|
+
|
|
11551
|
+
if (root !== null) {
|
|
11552
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
11553
|
+
}
|
|
11451
11554
|
}
|
|
11452
11555
|
|
|
11453
11556
|
function mountState(initialState) {
|
|
@@ -11933,11 +12036,11 @@ function dispatchReducerAction(fiber, queue, action) {
|
|
|
11933
12036
|
if (isRenderPhaseUpdate(fiber)) {
|
|
11934
12037
|
enqueueRenderPhaseUpdate(queue, update);
|
|
11935
12038
|
} else {
|
|
11936
|
-
|
|
11937
|
-
var eventTime = requestEventTime();
|
|
11938
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
12039
|
+
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
|
|
11939
12040
|
|
|
11940
12041
|
if (root !== null) {
|
|
12042
|
+
var eventTime = requestEventTime();
|
|
12043
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
11941
12044
|
entangleTransitionUpdate(root, queue, lane);
|
|
11942
12045
|
}
|
|
11943
12046
|
}
|
|
@@ -11966,7 +12069,6 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
11966
12069
|
if (isRenderPhaseUpdate(fiber)) {
|
|
11967
12070
|
enqueueRenderPhaseUpdate(queue, update);
|
|
11968
12071
|
} else {
|
|
11969
|
-
enqueueUpdate$1(fiber, queue, update);
|
|
11970
12072
|
var alternate = fiber.alternate;
|
|
11971
12073
|
|
|
11972
12074
|
if (
|
|
@@ -12001,6 +12103,13 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
12001
12103
|
// It's still possible that we'll need to rebase this update later,
|
|
12002
12104
|
// if the component re-renders for a different reason and by that
|
|
12003
12105
|
// time the reducer has changed.
|
|
12106
|
+
// TODO: Do we still need to entangle transitions in this case?
|
|
12107
|
+
enqueueConcurrentHookUpdateAndEagerlyBailout(
|
|
12108
|
+
fiber,
|
|
12109
|
+
queue,
|
|
12110
|
+
update,
|
|
12111
|
+
lane
|
|
12112
|
+
);
|
|
12004
12113
|
return;
|
|
12005
12114
|
}
|
|
12006
12115
|
} catch (error) {
|
|
@@ -12013,10 +12122,11 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
12013
12122
|
}
|
|
12014
12123
|
}
|
|
12015
12124
|
|
|
12016
|
-
var
|
|
12017
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
12125
|
+
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
|
|
12018
12126
|
|
|
12019
12127
|
if (root !== null) {
|
|
12128
|
+
var eventTime = requestEventTime();
|
|
12129
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
12020
12130
|
entangleTransitionUpdate(root, queue, lane);
|
|
12021
12131
|
}
|
|
12022
12132
|
}
|
|
@@ -12046,38 +12156,7 @@ function enqueueRenderPhaseUpdate(queue, update) {
|
|
|
12046
12156
|
}
|
|
12047
12157
|
|
|
12048
12158
|
queue.pending = update;
|
|
12049
|
-
}
|
|
12050
|
-
|
|
12051
|
-
function enqueueUpdate$1(fiber, queue, update, lane) {
|
|
12052
|
-
if (isInterleavedUpdate(fiber)) {
|
|
12053
|
-
var interleaved = queue.interleaved;
|
|
12054
|
-
|
|
12055
|
-
if (interleaved === null) {
|
|
12056
|
-
// This is the first update. Create a circular list.
|
|
12057
|
-
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
12058
|
-
// be transferred to the pending queue.
|
|
12059
|
-
|
|
12060
|
-
pushInterleavedQueue(queue);
|
|
12061
|
-
} else {
|
|
12062
|
-
update.next = interleaved.next;
|
|
12063
|
-
interleaved.next = update;
|
|
12064
|
-
}
|
|
12065
|
-
|
|
12066
|
-
queue.interleaved = update;
|
|
12067
|
-
} else {
|
|
12068
|
-
var pending = queue.pending;
|
|
12069
|
-
|
|
12070
|
-
if (pending === null) {
|
|
12071
|
-
// This is the first update. Create a circular list.
|
|
12072
|
-
update.next = update;
|
|
12073
|
-
} else {
|
|
12074
|
-
update.next = pending.next;
|
|
12075
|
-
pending.next = update;
|
|
12076
|
-
}
|
|
12077
|
-
|
|
12078
|
-
queue.pending = update;
|
|
12079
|
-
}
|
|
12080
|
-
}
|
|
12159
|
+
} // TODO: Move to ReactFiberConcurrentUpdates?
|
|
12081
12160
|
|
|
12082
12161
|
function entangleTransitionUpdate(root, queue, lane) {
|
|
12083
12162
|
if (isTransitionLane(lane)) {
|
|
@@ -13125,13 +13204,22 @@ function transferActualDuration(fiber) {
|
|
|
13125
13204
|
}
|
|
13126
13205
|
}
|
|
13127
13206
|
|
|
13128
|
-
function
|
|
13207
|
+
function createCapturedValueAtFiber(value, source) {
|
|
13129
13208
|
// If the value is an error, call this function immediately after it is thrown
|
|
13130
13209
|
// so the stack is accurate.
|
|
13131
13210
|
return {
|
|
13132
13211
|
value: value,
|
|
13133
13212
|
source: source,
|
|
13134
|
-
stack: getStackByFiberInDevAndProd(source)
|
|
13213
|
+
stack: getStackByFiberInDevAndProd(source),
|
|
13214
|
+
digest: null
|
|
13215
|
+
};
|
|
13216
|
+
}
|
|
13217
|
+
function createCapturedValue(value, digest, stack) {
|
|
13218
|
+
return {
|
|
13219
|
+
value: value,
|
|
13220
|
+
source: null,
|
|
13221
|
+
stack: stack != null ? stack : null,
|
|
13222
|
+
digest: digest != null ? digest : null
|
|
13135
13223
|
};
|
|
13136
13224
|
}
|
|
13137
13225
|
|
|
@@ -13487,7 +13575,7 @@ function markSuspenseBoundaryShouldCapture(
|
|
|
13487
13575
|
// prevent a bail out.
|
|
13488
13576
|
var update = createUpdate(NoTimestamp, SyncLane);
|
|
13489
13577
|
update.tag = ForceUpdate;
|
|
13490
|
-
enqueueUpdate(sourceFiber, update);
|
|
13578
|
+
enqueueUpdate(sourceFiber, update, SyncLane);
|
|
13491
13579
|
}
|
|
13492
13580
|
} // The source fiber did not complete. Mark it with Sync priority to
|
|
13493
13581
|
// indicate that it still has pending work.
|
|
@@ -13617,12 +13705,13 @@ function throwException(
|
|
|
13617
13705
|
|
|
13618
13706
|
value = uncaughtSuspenseError;
|
|
13619
13707
|
}
|
|
13620
|
-
}
|
|
13708
|
+
}
|
|
13709
|
+
|
|
13710
|
+
value = createCapturedValueAtFiber(value, sourceFiber);
|
|
13711
|
+
renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start
|
|
13621
13712
|
// over and traverse parent path again, this time treating the exception
|
|
13622
13713
|
// as an error.
|
|
13623
13714
|
|
|
13624
|
-
renderDidError(value);
|
|
13625
|
-
value = createCapturedValue(value, sourceFiber);
|
|
13626
13715
|
var workInProgress = returnFiber;
|
|
13627
13716
|
|
|
13628
13717
|
do {
|
|
@@ -14260,7 +14349,7 @@ function updateClassComponent(
|
|
|
14260
14349
|
|
|
14261
14350
|
var update = createClassErrorUpdate(
|
|
14262
14351
|
workInProgress,
|
|
14263
|
-
|
|
14352
|
+
createCapturedValueAtFiber(error$1, workInProgress),
|
|
14264
14353
|
lane
|
|
14265
14354
|
);
|
|
14266
14355
|
enqueueCapturedUpdate(workInProgress, update);
|
|
@@ -15434,21 +15523,35 @@ function updateDehydratedSuspenseComponent(
|
|
|
15434
15523
|
// This boundary is in a permanent fallback state. In this case, we'll never
|
|
15435
15524
|
// get an update and we'll never be able to hydrate the final content. Let's just try the
|
|
15436
15525
|
// client side render instead.
|
|
15437
|
-
var
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15526
|
+
var digest, message, stack;
|
|
15527
|
+
|
|
15528
|
+
{
|
|
15529
|
+
var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails();
|
|
15530
|
+
|
|
15531
|
+
digest = _getSuspenseInstanceF.digest;
|
|
15532
|
+
message = _getSuspenseInstanceF.message;
|
|
15533
|
+
stack = _getSuspenseInstanceF.stack;
|
|
15534
|
+
}
|
|
15535
|
+
|
|
15536
|
+
var error;
|
|
15537
|
+
|
|
15538
|
+
if (message) {
|
|
15539
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
15540
|
+
error = new Error(message);
|
|
15541
|
+
} else {
|
|
15542
|
+
error = new Error(
|
|
15543
|
+
"The server could not finish this Suspense boundary, likely " +
|
|
15544
|
+
"due to an error during server rendering. Switched to " +
|
|
15545
|
+
"client rendering."
|
|
15546
|
+
);
|
|
15547
|
+
}
|
|
15548
|
+
|
|
15549
|
+
var capturedValue = createCapturedValue(error, digest, stack);
|
|
15447
15550
|
return retrySuspenseComponentWithoutHydrating(
|
|
15448
15551
|
current,
|
|
15449
15552
|
workInProgress,
|
|
15450
15553
|
renderLanes,
|
|
15451
|
-
|
|
15554
|
+
capturedValue
|
|
15452
15555
|
);
|
|
15453
15556
|
}
|
|
15454
15557
|
// any context has changed, we need to treat is as if the input might have changed.
|
|
@@ -15476,7 +15579,13 @@ function updateDehydratedSuspenseComponent(
|
|
|
15476
15579
|
suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render
|
|
15477
15580
|
|
|
15478
15581
|
var eventTime = NoTimestamp;
|
|
15479
|
-
|
|
15582
|
+
enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);
|
|
15583
|
+
scheduleUpdateOnFiber(
|
|
15584
|
+
root,
|
|
15585
|
+
current,
|
|
15586
|
+
attemptHydrationAtLane,
|
|
15587
|
+
eventTime
|
|
15588
|
+
);
|
|
15480
15589
|
}
|
|
15481
15590
|
} // If we have scheduled higher pri work above, this will probably just abort the render
|
|
15482
15591
|
// since we now have higher priority work, but in case it doesn't, we need to prepare to
|
|
@@ -15485,10 +15594,8 @@ function updateDehydratedSuspenseComponent(
|
|
|
15485
15594
|
// Delay having to do this as long as the suspense timeout allows us.
|
|
15486
15595
|
|
|
15487
15596
|
renderDidSuspendDelayIfPossible();
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
workInProgress,
|
|
15491
|
-
renderLanes,
|
|
15597
|
+
|
|
15598
|
+
var _capturedValue = createCapturedValue(
|
|
15492
15599
|
new Error(
|
|
15493
15600
|
"This Suspense boundary received an update before it finished " +
|
|
15494
15601
|
"hydrating. This caused the boundary to switch to client rendering. " +
|
|
@@ -15496,6 +15603,13 @@ function updateDehydratedSuspenseComponent(
|
|
|
15496
15603
|
"in startTransition."
|
|
15497
15604
|
)
|
|
15498
15605
|
);
|
|
15606
|
+
|
|
15607
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
15608
|
+
current,
|
|
15609
|
+
workInProgress,
|
|
15610
|
+
renderLanes,
|
|
15611
|
+
_capturedValue
|
|
15612
|
+
);
|
|
15499
15613
|
} else if (isSuspenseInstancePending()) {
|
|
15500
15614
|
// This component is still pending more data from the server, so we can't hydrate its
|
|
15501
15615
|
// content. We treat it as if this component suspended itself. It might seem as if
|
|
@@ -15540,15 +15654,20 @@ function updateDehydratedSuspenseComponent(
|
|
|
15540
15654
|
if (workInProgress.flags & ForceClientRender) {
|
|
15541
15655
|
// Something errored during hydration. Try again without hydrating.
|
|
15542
15656
|
workInProgress.flags &= ~ForceClientRender;
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
workInProgress,
|
|
15546
|
-
renderLanes,
|
|
15657
|
+
|
|
15658
|
+
var _capturedValue2 = createCapturedValue(
|
|
15547
15659
|
new Error(
|
|
15548
15660
|
"There was an error while hydrating this Suspense boundary. " +
|
|
15549
15661
|
"Switched to client rendering."
|
|
15550
15662
|
)
|
|
15551
15663
|
);
|
|
15664
|
+
|
|
15665
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
15666
|
+
current,
|
|
15667
|
+
workInProgress,
|
|
15668
|
+
renderLanes,
|
|
15669
|
+
_capturedValue2
|
|
15670
|
+
);
|
|
15552
15671
|
} else if (workInProgress.memoizedState !== null) {
|
|
15553
15672
|
// Something suspended and we should still be in dehydrated mode.
|
|
15554
15673
|
// Leave the existing child in place.
|
|
@@ -19540,8 +19659,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
19540
19659
|
var offscreenFiber = finishedWork.child;
|
|
19541
19660
|
|
|
19542
19661
|
if (offscreenFiber.flags & Visibility) {
|
|
19662
|
+
var offscreenInstance = offscreenFiber.stateNode;
|
|
19543
19663
|
var newState = offscreenFiber.memoizedState;
|
|
19544
|
-
var isHidden = newState !== null;
|
|
19664
|
+
var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can
|
|
19665
|
+
// read it during an event
|
|
19666
|
+
|
|
19667
|
+
offscreenInstance.isHidden = isHidden;
|
|
19545
19668
|
|
|
19546
19669
|
if (isHidden) {
|
|
19547
19670
|
var wasHidden =
|
|
@@ -19578,11 +19701,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
19578
19701
|
commitReconciliationEffects(finishedWork);
|
|
19579
19702
|
|
|
19580
19703
|
if (flags & Visibility) {
|
|
19704
|
+
var _offscreenInstance = finishedWork.stateNode;
|
|
19581
19705
|
var _newState = finishedWork.memoizedState;
|
|
19582
19706
|
|
|
19583
19707
|
var _isHidden = _newState !== null;
|
|
19584
19708
|
|
|
19585
|
-
var offscreenBoundary = finishedWork;
|
|
19709
|
+
var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can
|
|
19710
|
+
// read it during an event
|
|
19711
|
+
|
|
19712
|
+
_offscreenInstance.isHidden = _isHidden;
|
|
19586
19713
|
|
|
19587
19714
|
{
|
|
19588
19715
|
// TODO: This needs to run whenever there's an insertion or update
|
|
@@ -20254,7 +20381,7 @@ function requestRetryLane(fiber) {
|
|
|
20254
20381
|
return claimNextRetryLane();
|
|
20255
20382
|
}
|
|
20256
20383
|
|
|
20257
|
-
function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
20384
|
+
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
|
|
20258
20385
|
checkForNestedUpdates();
|
|
20259
20386
|
|
|
20260
20387
|
{
|
|
@@ -20263,12 +20390,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
20263
20390
|
}
|
|
20264
20391
|
}
|
|
20265
20392
|
|
|
20266
|
-
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
20267
|
-
|
|
20268
|
-
if (root === null) {
|
|
20269
|
-
return null;
|
|
20270
|
-
}
|
|
20271
|
-
|
|
20272
20393
|
{
|
|
20273
20394
|
if (isFlushingPassiveEffects) {
|
|
20274
20395
|
didScheduleUpdateDuringPassiveEffects = true;
|
|
@@ -20299,7 +20420,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
20299
20420
|
warnIfUpdatesNotWrappedWithActDEV(fiber);
|
|
20300
20421
|
|
|
20301
20422
|
if (root === workInProgressRoot) {
|
|
20302
|
-
// TODO: Consolidate with `isInterleavedUpdate` check
|
|
20303
20423
|
// Received an update to a tree that's in the middle of rendering. Mark
|
|
20304
20424
|
// that there was an interleaved update work on this root. Unless the
|
|
20305
20425
|
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
|
|
@@ -20340,76 +20460,14 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
20340
20460
|
flushSyncCallbacksOnlyInLegacyMode();
|
|
20341
20461
|
}
|
|
20342
20462
|
}
|
|
20343
|
-
|
|
20344
|
-
return root;
|
|
20345
|
-
}
|
|
20346
|
-
// work without treating it as a typical update that originates from an event;
|
|
20347
|
-
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
|
|
20348
|
-
// on a fiber.
|
|
20349
|
-
|
|
20350
|
-
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
20351
|
-
// Update the source fiber's lanes
|
|
20352
|
-
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
20353
|
-
var alternate = sourceFiber.alternate;
|
|
20354
|
-
|
|
20355
|
-
if (alternate !== null) {
|
|
20356
|
-
alternate.lanes = mergeLanes(alternate.lanes, lane);
|
|
20357
|
-
}
|
|
20358
|
-
|
|
20359
|
-
{
|
|
20360
|
-
if (
|
|
20361
|
-
alternate === null &&
|
|
20362
|
-
(sourceFiber.flags & (Placement | Hydrating)) !== NoFlags
|
|
20363
|
-
) {
|
|
20364
|
-
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
20365
|
-
}
|
|
20366
|
-
} // Walk the parent path to the root and update the child lanes.
|
|
20367
|
-
|
|
20368
|
-
var node = sourceFiber;
|
|
20369
|
-
var parent = sourceFiber.return;
|
|
20370
|
-
|
|
20371
|
-
while (parent !== null) {
|
|
20372
|
-
parent.childLanes = mergeLanes(parent.childLanes, lane);
|
|
20373
|
-
alternate = parent.alternate;
|
|
20374
|
-
|
|
20375
|
-
if (alternate !== null) {
|
|
20376
|
-
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
|
|
20377
|
-
} else {
|
|
20378
|
-
{
|
|
20379
|
-
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
|
|
20380
|
-
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
20381
|
-
}
|
|
20382
|
-
}
|
|
20383
|
-
}
|
|
20384
|
-
|
|
20385
|
-
node = parent;
|
|
20386
|
-
parent = parent.return;
|
|
20387
|
-
}
|
|
20388
|
-
|
|
20389
|
-
if (node.tag === HostRoot) {
|
|
20390
|
-
var root = node.stateNode;
|
|
20391
|
-
return root;
|
|
20392
|
-
} else {
|
|
20393
|
-
return null;
|
|
20394
|
-
}
|
|
20395
20463
|
}
|
|
20396
|
-
|
|
20397
|
-
|
|
20464
|
+
function isUnsafeClassRenderPhaseUpdate(fiber) {
|
|
20465
|
+
// Check if this is a render phase update. Only called by class components,
|
|
20466
|
+
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
|
|
20398
20467
|
return (
|
|
20399
|
-
// TODO:
|
|
20400
|
-
//
|
|
20401
|
-
|
|
20402
|
-
(workInProgressRoot !== null || // If the interleaved updates queue hasn't been cleared yet, then
|
|
20403
|
-
// we should treat this as an interleaved update, too. This is also a
|
|
20404
|
-
// defensive coding measure in case a new update comes in between when
|
|
20405
|
-
// rendering has finished and when the interleaved updates are transferred
|
|
20406
|
-
// to the main queue.
|
|
20407
|
-
hasInterleavedUpdates()) &&
|
|
20408
|
-
(fiber.mode & ConcurrentMode) !== NoMode && // If this is a render phase update (i.e. UNSAFE_componentWillReceiveProps),
|
|
20409
|
-
// then don't treat this as an interleaved update. This pattern is
|
|
20410
|
-
// accompanied by a warning but we haven't fully deprecated it yet. We can
|
|
20411
|
-
// remove once the deferRenderPhaseUpdateToNextBatch flag is enabled.
|
|
20412
|
-
(executionContext & RenderContext) === NoContext
|
|
20468
|
+
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
|
|
20469
|
+
// decided not to enable it.
|
|
20470
|
+
(executionContext & RenderContext) !== NoContext
|
|
20413
20471
|
);
|
|
20414
20472
|
} // Use this function to schedule a task for a root. There's only one task per
|
|
20415
20473
|
// root; if a task was already scheduled, we'll check to make sure the priority
|
|
@@ -21106,7 +21164,7 @@ function prepareFreshStack(root, lanes) {
|
|
|
21106
21164
|
workInProgressRootPingedLanes = NoLanes;
|
|
21107
21165
|
workInProgressRootConcurrentErrors = null;
|
|
21108
21166
|
workInProgressRootRecoverableErrors = null;
|
|
21109
|
-
|
|
21167
|
+
finishQueueingConcurrentUpdates();
|
|
21110
21168
|
|
|
21111
21169
|
{
|
|
21112
21170
|
ReactStrictModeWarnings.discardPendingWarnings();
|
|
@@ -21751,7 +21809,12 @@ function commitRootImpl(
|
|
|
21751
21809
|
|
|
21752
21810
|
for (var i = 0; i < recoverableErrors.length; i++) {
|
|
21753
21811
|
var recoverableError = recoverableErrors[i];
|
|
21754
|
-
|
|
21812
|
+
var componentStack = recoverableError.stack;
|
|
21813
|
+
var digest = recoverableError.digest;
|
|
21814
|
+
onRecoverableError(recoverableError.value, {
|
|
21815
|
+
componentStack: componentStack,
|
|
21816
|
+
digest: digest
|
|
21817
|
+
});
|
|
21755
21818
|
}
|
|
21756
21819
|
}
|
|
21757
21820
|
|
|
@@ -21933,11 +21996,10 @@ function prepareToThrowUncaughtError(error) {
|
|
|
21933
21996
|
var onUncaughtError = prepareToThrowUncaughtError;
|
|
21934
21997
|
|
|
21935
21998
|
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
|
|
21936
|
-
var errorInfo =
|
|
21999
|
+
var errorInfo = createCapturedValueAtFiber(error, sourceFiber);
|
|
21937
22000
|
var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
|
|
21938
|
-
enqueueUpdate(rootFiber, update);
|
|
22001
|
+
var root = enqueueUpdate(rootFiber, update, SyncLane);
|
|
21939
22002
|
var eventTime = requestEventTime();
|
|
21940
|
-
var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
|
|
21941
22003
|
|
|
21942
22004
|
if (root !== null) {
|
|
21943
22005
|
markRootUpdated(root, SyncLane, eventTime);
|
|
@@ -21977,11 +22039,10 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {
|
|
|
21977
22039
|
(typeof instance.componentDidCatch === "function" &&
|
|
21978
22040
|
!isAlreadyFailedLegacyErrorBoundary(instance))
|
|
21979
22041
|
) {
|
|
21980
|
-
var errorInfo =
|
|
22042
|
+
var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);
|
|
21981
22043
|
var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
|
|
21982
|
-
enqueueUpdate(fiber, update);
|
|
22044
|
+
var root = enqueueUpdate(fiber, update, SyncLane);
|
|
21983
22045
|
var eventTime = requestEventTime();
|
|
21984
|
-
var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
|
|
21985
22046
|
|
|
21986
22047
|
if (root !== null) {
|
|
21987
22048
|
markRootUpdated(root, SyncLane, eventTime);
|
|
@@ -22068,7 +22129,7 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) {
|
|
|
22068
22129
|
} // TODO: Special case idle priority?
|
|
22069
22130
|
|
|
22070
22131
|
var eventTime = requestEventTime();
|
|
22071
|
-
var root =
|
|
22132
|
+
var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
|
|
22072
22133
|
|
|
22073
22134
|
if (root !== null) {
|
|
22074
22135
|
markRootUpdated(root, retryLane, eventTime);
|
|
@@ -22184,7 +22245,6 @@ function flushRenderPhaseStrictModeWarningsInDEV() {
|
|
|
22184
22245
|
}
|
|
22185
22246
|
|
|
22186
22247
|
var didWarnStateUpdateForNotYetMountedComponent = null;
|
|
22187
|
-
|
|
22188
22248
|
function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
|
22189
22249
|
{
|
|
22190
22250
|
if ((executionContext & RenderContext) !== NoContext) {
|
|
@@ -22244,7 +22304,6 @@ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
|
|
22244
22304
|
}
|
|
22245
22305
|
}
|
|
22246
22306
|
}
|
|
22247
|
-
|
|
22248
22307
|
var beginWork$1;
|
|
22249
22308
|
|
|
22250
22309
|
{
|
|
@@ -22770,7 +22829,11 @@ function scheduleFibersWithFamiliesRecursively(
|
|
|
22770
22829
|
}
|
|
22771
22830
|
|
|
22772
22831
|
if (needsRemount || needsRender) {
|
|
22773
|
-
|
|
22832
|
+
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
22833
|
+
|
|
22834
|
+
if (_root !== null) {
|
|
22835
|
+
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
|
|
22836
|
+
}
|
|
22774
22837
|
}
|
|
22775
22838
|
|
|
22776
22839
|
if (child !== null && !needsRemount) {
|
|
@@ -23475,7 +23538,9 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
|
|
|
23475
23538
|
var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
|
|
23476
23539
|
fiber.elementType = REACT_OFFSCREEN_TYPE;
|
|
23477
23540
|
fiber.lanes = lanes;
|
|
23478
|
-
var primaryChildInstance = {
|
|
23541
|
+
var primaryChildInstance = {
|
|
23542
|
+
isHidden: false
|
|
23543
|
+
};
|
|
23479
23544
|
fiber.stateNode = primaryChildInstance;
|
|
23480
23545
|
return fiber;
|
|
23481
23546
|
}
|
|
@@ -23647,7 +23712,7 @@ function createFiberRoot(
|
|
|
23647
23712
|
return root;
|
|
23648
23713
|
}
|
|
23649
23714
|
|
|
23650
|
-
var ReactVersion = "18.2.0-next-
|
|
23715
|
+
var ReactVersion = "18.2.0-next-9e3b772b8-20220608";
|
|
23651
23716
|
|
|
23652
23717
|
function createPortal(
|
|
23653
23718
|
children,
|
|
@@ -23845,10 +23910,10 @@ function updateContainer(element, container, parentComponent, callback) {
|
|
|
23845
23910
|
update.callback = callback;
|
|
23846
23911
|
}
|
|
23847
23912
|
|
|
23848
|
-
enqueueUpdate(current$1, update);
|
|
23849
|
-
var root = scheduleUpdateOnFiber(current$1, lane, eventTime);
|
|
23913
|
+
var root = enqueueUpdate(current$1, update, lane);
|
|
23850
23914
|
|
|
23851
23915
|
if (root !== null) {
|
|
23916
|
+
scheduleUpdateOnFiber(root, current$1, lane, eventTime);
|
|
23852
23917
|
entangleTransitions(root, current$1, lane);
|
|
23853
23918
|
}
|
|
23854
23919
|
|
|
@@ -24008,7 +24073,11 @@ var setSuspenseHandler = null;
|
|
|
24008
24073
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
24009
24074
|
|
|
24010
24075
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
24011
|
-
|
|
24076
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24077
|
+
|
|
24078
|
+
if (root !== null) {
|
|
24079
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24080
|
+
}
|
|
24012
24081
|
}
|
|
24013
24082
|
};
|
|
24014
24083
|
|
|
@@ -24025,7 +24094,11 @@ var setSuspenseHandler = null;
|
|
|
24025
24094
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
24026
24095
|
|
|
24027
24096
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
24028
|
-
|
|
24097
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24098
|
+
|
|
24099
|
+
if (root !== null) {
|
|
24100
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24101
|
+
}
|
|
24029
24102
|
}
|
|
24030
24103
|
};
|
|
24031
24104
|
|
|
@@ -24042,7 +24115,11 @@ var setSuspenseHandler = null;
|
|
|
24042
24115
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
24043
24116
|
|
|
24044
24117
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
24045
|
-
|
|
24118
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24119
|
+
|
|
24120
|
+
if (root !== null) {
|
|
24121
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24122
|
+
}
|
|
24046
24123
|
}
|
|
24047
24124
|
}; // Support DevTools props for function components, forwardRef, memo, host components, etc.
|
|
24048
24125
|
|
|
@@ -24053,7 +24130,11 @@ var setSuspenseHandler = null;
|
|
|
24053
24130
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
24054
24131
|
}
|
|
24055
24132
|
|
|
24056
|
-
|
|
24133
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24134
|
+
|
|
24135
|
+
if (root !== null) {
|
|
24136
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24137
|
+
}
|
|
24057
24138
|
};
|
|
24058
24139
|
|
|
24059
24140
|
overridePropsDeletePath = function(fiber, path) {
|
|
@@ -24063,7 +24144,11 @@ var setSuspenseHandler = null;
|
|
|
24063
24144
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
24064
24145
|
}
|
|
24065
24146
|
|
|
24066
|
-
|
|
24147
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24148
|
+
|
|
24149
|
+
if (root !== null) {
|
|
24150
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24151
|
+
}
|
|
24067
24152
|
};
|
|
24068
24153
|
|
|
24069
24154
|
overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
@@ -24073,11 +24158,19 @@ var setSuspenseHandler = null;
|
|
|
24073
24158
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
24074
24159
|
}
|
|
24075
24160
|
|
|
24076
|
-
|
|
24161
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24162
|
+
|
|
24163
|
+
if (root !== null) {
|
|
24164
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24165
|
+
}
|
|
24077
24166
|
};
|
|
24078
24167
|
|
|
24079
24168
|
scheduleUpdate = function(fiber) {
|
|
24080
|
-
|
|
24169
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
24170
|
+
|
|
24171
|
+
if (root !== null) {
|
|
24172
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
24173
|
+
}
|
|
24081
24174
|
};
|
|
24082
24175
|
|
|
24083
24176
|
setErrorHandler = function(newShouldErrorImpl) {
|