@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 ReactFabric-dev
|
|
10
10
|
* @preventMunge
|
|
11
|
-
* @generated SignedSource<<
|
|
11
|
+
* @generated SignedSource<<343bc15819bccf8610b6ff32fcb59b21>>
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
'use strict';
|
|
@@ -7197,30 +7197,27 @@ function readContext(context) {
|
|
|
7197
7197
|
return value;
|
|
7198
7198
|
}
|
|
7199
7199
|
|
|
7200
|
-
// An array of all update queues that received updates during the current
|
|
7201
7200
|
// render. When this render exits, either because it finishes or because it is
|
|
7202
7201
|
// interrupted, the interleaved updates will be transferred onto the main part
|
|
7203
7202
|
// of the queue.
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7203
|
+
|
|
7204
|
+
var concurrentQueues = null;
|
|
7205
|
+
function pushConcurrentUpdateQueue(queue) {
|
|
7206
|
+
if (concurrentQueues === null) {
|
|
7207
|
+
concurrentQueues = [queue];
|
|
7208
7208
|
} else {
|
|
7209
|
-
|
|
7209
|
+
concurrentQueues.push(queue);
|
|
7210
7210
|
}
|
|
7211
7211
|
}
|
|
7212
|
-
function
|
|
7213
|
-
return interleavedQueues !== null;
|
|
7214
|
-
}
|
|
7215
|
-
function enqueueInterleavedUpdates() {
|
|
7212
|
+
function finishQueueingConcurrentUpdates() {
|
|
7216
7213
|
// Transfer the interleaved updates onto the main queue. Each queue has a
|
|
7217
7214
|
// `pending` field and an `interleaved` field. When they are not null, they
|
|
7218
7215
|
// point to the last node in a circular linked list. We need to append the
|
|
7219
7216
|
// interleaved list to the end of the pending list by joining them into a
|
|
7220
7217
|
// single, circular list.
|
|
7221
|
-
if (
|
|
7222
|
-
for (var i = 0; i <
|
|
7223
|
-
var queue =
|
|
7218
|
+
if (concurrentQueues !== null) {
|
|
7219
|
+
for (var i = 0; i < concurrentQueues.length; i++) {
|
|
7220
|
+
var queue = concurrentQueues[i];
|
|
7224
7221
|
var lastInterleavedUpdate = queue.interleaved;
|
|
7225
7222
|
|
|
7226
7223
|
if (lastInterleavedUpdate !== null) {
|
|
@@ -7238,7 +7235,115 @@ function enqueueInterleavedUpdates() {
|
|
|
7238
7235
|
}
|
|
7239
7236
|
}
|
|
7240
7237
|
|
|
7241
|
-
|
|
7238
|
+
concurrentQueues = null;
|
|
7239
|
+
}
|
|
7240
|
+
}
|
|
7241
|
+
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
|
|
7242
|
+
var interleaved = queue.interleaved;
|
|
7243
|
+
|
|
7244
|
+
if (interleaved === null) {
|
|
7245
|
+
// This is the first update. Create a circular list.
|
|
7246
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7247
|
+
// be transferred to the pending queue.
|
|
7248
|
+
|
|
7249
|
+
pushConcurrentUpdateQueue(queue);
|
|
7250
|
+
} else {
|
|
7251
|
+
update.next = interleaved.next;
|
|
7252
|
+
interleaved.next = update;
|
|
7253
|
+
}
|
|
7254
|
+
|
|
7255
|
+
queue.interleaved = update;
|
|
7256
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7257
|
+
}
|
|
7258
|
+
function enqueueConcurrentHookUpdateAndEagerlyBailout(
|
|
7259
|
+
fiber,
|
|
7260
|
+
queue,
|
|
7261
|
+
update,
|
|
7262
|
+
lane
|
|
7263
|
+
) {
|
|
7264
|
+
var interleaved = queue.interleaved;
|
|
7265
|
+
|
|
7266
|
+
if (interleaved === null) {
|
|
7267
|
+
// This is the first update. Create a circular list.
|
|
7268
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7269
|
+
// be transferred to the pending queue.
|
|
7270
|
+
|
|
7271
|
+
pushConcurrentUpdateQueue(queue);
|
|
7272
|
+
} else {
|
|
7273
|
+
update.next = interleaved.next;
|
|
7274
|
+
interleaved.next = update;
|
|
7275
|
+
}
|
|
7276
|
+
|
|
7277
|
+
queue.interleaved = update;
|
|
7278
|
+
}
|
|
7279
|
+
function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
|
|
7280
|
+
var interleaved = queue.interleaved;
|
|
7281
|
+
|
|
7282
|
+
if (interleaved === null) {
|
|
7283
|
+
// This is the first update. Create a circular list.
|
|
7284
|
+
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7285
|
+
// be transferred to the pending queue.
|
|
7286
|
+
|
|
7287
|
+
pushConcurrentUpdateQueue(queue);
|
|
7288
|
+
} else {
|
|
7289
|
+
update.next = interleaved.next;
|
|
7290
|
+
interleaved.next = update;
|
|
7291
|
+
}
|
|
7292
|
+
|
|
7293
|
+
queue.interleaved = update;
|
|
7294
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7295
|
+
}
|
|
7296
|
+
function enqueueConcurrentRenderForLane(fiber, lane) {
|
|
7297
|
+
return markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7298
|
+
} // Calling this function outside this module should only be done for backwards
|
|
7299
|
+
// compatibility and should always be accompanied by a warning.
|
|
7300
|
+
|
|
7301
|
+
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
|
|
7302
|
+
|
|
7303
|
+
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
7304
|
+
// Update the source fiber's lanes
|
|
7305
|
+
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
7306
|
+
var alternate = sourceFiber.alternate;
|
|
7307
|
+
|
|
7308
|
+
if (alternate !== null) {
|
|
7309
|
+
alternate.lanes = mergeLanes(alternate.lanes, lane);
|
|
7310
|
+
}
|
|
7311
|
+
|
|
7312
|
+
{
|
|
7313
|
+
if (
|
|
7314
|
+
alternate === null &&
|
|
7315
|
+
(sourceFiber.flags & (Placement | Hydrating)) !== NoFlags
|
|
7316
|
+
) {
|
|
7317
|
+
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
7318
|
+
}
|
|
7319
|
+
} // Walk the parent path to the root and update the child lanes.
|
|
7320
|
+
|
|
7321
|
+
var node = sourceFiber;
|
|
7322
|
+
var parent = sourceFiber.return;
|
|
7323
|
+
|
|
7324
|
+
while (parent !== null) {
|
|
7325
|
+
parent.childLanes = mergeLanes(parent.childLanes, lane);
|
|
7326
|
+
alternate = parent.alternate;
|
|
7327
|
+
|
|
7328
|
+
if (alternate !== null) {
|
|
7329
|
+
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
|
|
7330
|
+
} else {
|
|
7331
|
+
{
|
|
7332
|
+
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
|
|
7333
|
+
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
7334
|
+
}
|
|
7335
|
+
}
|
|
7336
|
+
}
|
|
7337
|
+
|
|
7338
|
+
node = parent;
|
|
7339
|
+
parent = parent.return;
|
|
7340
|
+
}
|
|
7341
|
+
|
|
7342
|
+
if (node.tag === HostRoot) {
|
|
7343
|
+
var root = node.stateNode;
|
|
7344
|
+
return root;
|
|
7345
|
+
} else {
|
|
7346
|
+
return null;
|
|
7242
7347
|
}
|
|
7243
7348
|
}
|
|
7244
7349
|
|
|
@@ -7304,40 +7409,11 @@ function enqueueUpdate(fiber, update, lane) {
|
|
|
7304
7409
|
|
|
7305
7410
|
if (updateQueue === null) {
|
|
7306
7411
|
// Only occurs if the fiber has been unmounted.
|
|
7307
|
-
return;
|
|
7412
|
+
return null;
|
|
7308
7413
|
}
|
|
7309
7414
|
|
|
7310
7415
|
var sharedQueue = updateQueue.shared;
|
|
7311
7416
|
|
|
7312
|
-
if (isInterleavedUpdate(fiber)) {
|
|
7313
|
-
var interleaved = sharedQueue.interleaved;
|
|
7314
|
-
|
|
7315
|
-
if (interleaved === null) {
|
|
7316
|
-
// This is the first update. Create a circular list.
|
|
7317
|
-
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
7318
|
-
// be transferred to the pending queue.
|
|
7319
|
-
|
|
7320
|
-
pushInterleavedQueue(sharedQueue);
|
|
7321
|
-
} else {
|
|
7322
|
-
update.next = interleaved.next;
|
|
7323
|
-
interleaved.next = update;
|
|
7324
|
-
}
|
|
7325
|
-
|
|
7326
|
-
sharedQueue.interleaved = update;
|
|
7327
|
-
} else {
|
|
7328
|
-
var pending = sharedQueue.pending;
|
|
7329
|
-
|
|
7330
|
-
if (pending === null) {
|
|
7331
|
-
// This is the first update. Create a circular list.
|
|
7332
|
-
update.next = update;
|
|
7333
|
-
} else {
|
|
7334
|
-
update.next = pending.next;
|
|
7335
|
-
pending.next = update;
|
|
7336
|
-
}
|
|
7337
|
-
|
|
7338
|
-
sharedQueue.pending = update;
|
|
7339
|
-
}
|
|
7340
|
-
|
|
7341
7417
|
{
|
|
7342
7418
|
if (
|
|
7343
7419
|
currentlyProcessingQueue === sharedQueue &&
|
|
@@ -7353,6 +7429,29 @@ function enqueueUpdate(fiber, update, lane) {
|
|
|
7353
7429
|
didWarnUpdateInsideUpdate = true;
|
|
7354
7430
|
}
|
|
7355
7431
|
}
|
|
7432
|
+
|
|
7433
|
+
if (isUnsafeClassRenderPhaseUpdate()) {
|
|
7434
|
+
// This is an unsafe render phase update. Add directly to the update
|
|
7435
|
+
// queue so we can process it immediately during the current render.
|
|
7436
|
+
var pending = sharedQueue.pending;
|
|
7437
|
+
|
|
7438
|
+
if (pending === null) {
|
|
7439
|
+
// This is the first update. Create a circular list.
|
|
7440
|
+
update.next = update;
|
|
7441
|
+
} else {
|
|
7442
|
+
update.next = pending.next;
|
|
7443
|
+
pending.next = update;
|
|
7444
|
+
}
|
|
7445
|
+
|
|
7446
|
+
sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering
|
|
7447
|
+
// this fiber. This is for backwards compatibility in the case where you
|
|
7448
|
+
// update a different component during render phase than the one that is
|
|
7449
|
+
// currently renderings (a pattern that is accompanied by a warning).
|
|
7450
|
+
|
|
7451
|
+
return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
7452
|
+
} else {
|
|
7453
|
+
return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);
|
|
7454
|
+
}
|
|
7356
7455
|
}
|
|
7357
7456
|
function entangleTransitions(root, fiber, lane) {
|
|
7358
7457
|
var updateQueue = fiber.updateQueue;
|
|
@@ -7889,10 +7988,10 @@ var classComponentUpdater = {
|
|
|
7889
7988
|
update.callback = callback;
|
|
7890
7989
|
}
|
|
7891
7990
|
|
|
7892
|
-
enqueueUpdate(fiber, update);
|
|
7893
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
7991
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
7894
7992
|
|
|
7895
7993
|
if (root !== null) {
|
|
7994
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
7896
7995
|
entangleTransitions(root, fiber, lane);
|
|
7897
7996
|
}
|
|
7898
7997
|
},
|
|
@@ -7912,10 +8011,10 @@ var classComponentUpdater = {
|
|
|
7912
8011
|
update.callback = callback;
|
|
7913
8012
|
}
|
|
7914
8013
|
|
|
7915
|
-
enqueueUpdate(fiber, update);
|
|
7916
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
8014
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
7917
8015
|
|
|
7918
8016
|
if (root !== null) {
|
|
8017
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
7919
8018
|
entangleTransitions(root, fiber, lane);
|
|
7920
8019
|
}
|
|
7921
8020
|
},
|
|
@@ -7934,10 +8033,10 @@ var classComponentUpdater = {
|
|
|
7934
8033
|
update.callback = callback;
|
|
7935
8034
|
}
|
|
7936
8035
|
|
|
7937
|
-
enqueueUpdate(fiber, update);
|
|
7938
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
8036
|
+
var root = enqueueUpdate(fiber, update, lane);
|
|
7939
8037
|
|
|
7940
8038
|
if (root !== null) {
|
|
8039
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
7941
8040
|
entangleTransitions(root, fiber, lane);
|
|
7942
8041
|
}
|
|
7943
8042
|
}
|
|
@@ -11318,7 +11417,11 @@ function checkIfSnapshotChanged(inst) {
|
|
|
11318
11417
|
}
|
|
11319
11418
|
|
|
11320
11419
|
function forceStoreRerender(fiber) {
|
|
11321
|
-
|
|
11420
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
11421
|
+
|
|
11422
|
+
if (root !== null) {
|
|
11423
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
11424
|
+
}
|
|
11322
11425
|
}
|
|
11323
11426
|
|
|
11324
11427
|
function mountState(initialState) {
|
|
@@ -11804,11 +11907,11 @@ function dispatchReducerAction(fiber, queue, action) {
|
|
|
11804
11907
|
if (isRenderPhaseUpdate(fiber)) {
|
|
11805
11908
|
enqueueRenderPhaseUpdate(queue, update);
|
|
11806
11909
|
} else {
|
|
11807
|
-
|
|
11808
|
-
var eventTime = requestEventTime();
|
|
11809
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
11910
|
+
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
|
|
11810
11911
|
|
|
11811
11912
|
if (root !== null) {
|
|
11913
|
+
var eventTime = requestEventTime();
|
|
11914
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
11812
11915
|
entangleTransitionUpdate(root, queue, lane);
|
|
11813
11916
|
}
|
|
11814
11917
|
}
|
|
@@ -11837,7 +11940,6 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
11837
11940
|
if (isRenderPhaseUpdate(fiber)) {
|
|
11838
11941
|
enqueueRenderPhaseUpdate(queue, update);
|
|
11839
11942
|
} else {
|
|
11840
|
-
enqueueUpdate$1(fiber, queue, update);
|
|
11841
11943
|
var alternate = fiber.alternate;
|
|
11842
11944
|
|
|
11843
11945
|
if (
|
|
@@ -11872,6 +11974,13 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
11872
11974
|
// It's still possible that we'll need to rebase this update later,
|
|
11873
11975
|
// if the component re-renders for a different reason and by that
|
|
11874
11976
|
// time the reducer has changed.
|
|
11977
|
+
// TODO: Do we still need to entangle transitions in this case?
|
|
11978
|
+
enqueueConcurrentHookUpdateAndEagerlyBailout(
|
|
11979
|
+
fiber,
|
|
11980
|
+
queue,
|
|
11981
|
+
update,
|
|
11982
|
+
lane
|
|
11983
|
+
);
|
|
11875
11984
|
return;
|
|
11876
11985
|
}
|
|
11877
11986
|
} catch (error) {
|
|
@@ -11884,10 +11993,11 @@ function dispatchSetState(fiber, queue, action) {
|
|
|
11884
11993
|
}
|
|
11885
11994
|
}
|
|
11886
11995
|
|
|
11887
|
-
var
|
|
11888
|
-
var root = scheduleUpdateOnFiber(fiber, lane, eventTime);
|
|
11996
|
+
var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
|
|
11889
11997
|
|
|
11890
11998
|
if (root !== null) {
|
|
11999
|
+
var eventTime = requestEventTime();
|
|
12000
|
+
scheduleUpdateOnFiber(root, fiber, lane, eventTime);
|
|
11891
12001
|
entangleTransitionUpdate(root, queue, lane);
|
|
11892
12002
|
}
|
|
11893
12003
|
}
|
|
@@ -11917,38 +12027,7 @@ function enqueueRenderPhaseUpdate(queue, update) {
|
|
|
11917
12027
|
}
|
|
11918
12028
|
|
|
11919
12029
|
queue.pending = update;
|
|
11920
|
-
}
|
|
11921
|
-
|
|
11922
|
-
function enqueueUpdate$1(fiber, queue, update, lane) {
|
|
11923
|
-
if (isInterleavedUpdate(fiber)) {
|
|
11924
|
-
var interleaved = queue.interleaved;
|
|
11925
|
-
|
|
11926
|
-
if (interleaved === null) {
|
|
11927
|
-
// This is the first update. Create a circular list.
|
|
11928
|
-
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
|
11929
|
-
// be transferred to the pending queue.
|
|
11930
|
-
|
|
11931
|
-
pushInterleavedQueue(queue);
|
|
11932
|
-
} else {
|
|
11933
|
-
update.next = interleaved.next;
|
|
11934
|
-
interleaved.next = update;
|
|
11935
|
-
}
|
|
11936
|
-
|
|
11937
|
-
queue.interleaved = update;
|
|
11938
|
-
} else {
|
|
11939
|
-
var pending = queue.pending;
|
|
11940
|
-
|
|
11941
|
-
if (pending === null) {
|
|
11942
|
-
// This is the first update. Create a circular list.
|
|
11943
|
-
update.next = update;
|
|
11944
|
-
} else {
|
|
11945
|
-
update.next = pending.next;
|
|
11946
|
-
pending.next = update;
|
|
11947
|
-
}
|
|
11948
|
-
|
|
11949
|
-
queue.pending = update;
|
|
11950
|
-
}
|
|
11951
|
-
}
|
|
12030
|
+
} // TODO: Move to ReactFiberConcurrentUpdates?
|
|
11952
12031
|
|
|
11953
12032
|
function entangleTransitionUpdate(root, queue, lane) {
|
|
11954
12033
|
if (isTransitionLane(lane)) {
|
|
@@ -12996,13 +13075,22 @@ function transferActualDuration(fiber) {
|
|
|
12996
13075
|
}
|
|
12997
13076
|
}
|
|
12998
13077
|
|
|
12999
|
-
function
|
|
13078
|
+
function createCapturedValueAtFiber(value, source) {
|
|
13000
13079
|
// If the value is an error, call this function immediately after it is thrown
|
|
13001
13080
|
// so the stack is accurate.
|
|
13002
13081
|
return {
|
|
13003
13082
|
value: value,
|
|
13004
13083
|
source: source,
|
|
13005
|
-
stack: getStackByFiberInDevAndProd(source)
|
|
13084
|
+
stack: getStackByFiberInDevAndProd(source),
|
|
13085
|
+
digest: null
|
|
13086
|
+
};
|
|
13087
|
+
}
|
|
13088
|
+
function createCapturedValue(value, digest, stack) {
|
|
13089
|
+
return {
|
|
13090
|
+
value: value,
|
|
13091
|
+
source: null,
|
|
13092
|
+
stack: stack != null ? stack : null,
|
|
13093
|
+
digest: digest != null ? digest : null
|
|
13006
13094
|
};
|
|
13007
13095
|
}
|
|
13008
13096
|
|
|
@@ -13358,7 +13446,7 @@ function markSuspenseBoundaryShouldCapture(
|
|
|
13358
13446
|
// prevent a bail out.
|
|
13359
13447
|
var update = createUpdate(NoTimestamp, SyncLane);
|
|
13360
13448
|
update.tag = ForceUpdate;
|
|
13361
|
-
enqueueUpdate(sourceFiber, update);
|
|
13449
|
+
enqueueUpdate(sourceFiber, update, SyncLane);
|
|
13362
13450
|
}
|
|
13363
13451
|
} // The source fiber did not complete. Mark it with Sync priority to
|
|
13364
13452
|
// indicate that it still has pending work.
|
|
@@ -13488,12 +13576,13 @@ function throwException(
|
|
|
13488
13576
|
|
|
13489
13577
|
value = uncaughtSuspenseError;
|
|
13490
13578
|
}
|
|
13491
|
-
}
|
|
13579
|
+
}
|
|
13580
|
+
|
|
13581
|
+
value = createCapturedValueAtFiber(value, sourceFiber);
|
|
13582
|
+
renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start
|
|
13492
13583
|
// over and traverse parent path again, this time treating the exception
|
|
13493
13584
|
// as an error.
|
|
13494
13585
|
|
|
13495
|
-
renderDidError(value);
|
|
13496
|
-
value = createCapturedValue(value, sourceFiber);
|
|
13497
13586
|
var workInProgress = returnFiber;
|
|
13498
13587
|
|
|
13499
13588
|
do {
|
|
@@ -14131,7 +14220,7 @@ function updateClassComponent(
|
|
|
14131
14220
|
|
|
14132
14221
|
var update = createClassErrorUpdate(
|
|
14133
14222
|
workInProgress,
|
|
14134
|
-
|
|
14223
|
+
createCapturedValueAtFiber(error$1, workInProgress),
|
|
14135
14224
|
lane
|
|
14136
14225
|
);
|
|
14137
14226
|
enqueueCapturedUpdate(workInProgress, update);
|
|
@@ -15305,21 +15394,35 @@ function updateDehydratedSuspenseComponent(
|
|
|
15305
15394
|
// This boundary is in a permanent fallback state. In this case, we'll never
|
|
15306
15395
|
// get an update and we'll never be able to hydrate the final content. Let's just try the
|
|
15307
15396
|
// client side render instead.
|
|
15308
|
-
var
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15397
|
+
var digest, message, stack;
|
|
15398
|
+
|
|
15399
|
+
{
|
|
15400
|
+
var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails();
|
|
15401
|
+
|
|
15402
|
+
digest = _getSuspenseInstanceF.digest;
|
|
15403
|
+
message = _getSuspenseInstanceF.message;
|
|
15404
|
+
stack = _getSuspenseInstanceF.stack;
|
|
15405
|
+
}
|
|
15406
|
+
|
|
15407
|
+
var error;
|
|
15408
|
+
|
|
15409
|
+
if (message) {
|
|
15410
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
15411
|
+
error = new Error(message);
|
|
15412
|
+
} else {
|
|
15413
|
+
error = new Error(
|
|
15414
|
+
"The server could not finish this Suspense boundary, likely " +
|
|
15415
|
+
"due to an error during server rendering. Switched to " +
|
|
15416
|
+
"client rendering."
|
|
15417
|
+
);
|
|
15418
|
+
}
|
|
15419
|
+
|
|
15420
|
+
var capturedValue = createCapturedValue(error, digest, stack);
|
|
15318
15421
|
return retrySuspenseComponentWithoutHydrating(
|
|
15319
15422
|
current,
|
|
15320
15423
|
workInProgress,
|
|
15321
15424
|
renderLanes,
|
|
15322
|
-
|
|
15425
|
+
capturedValue
|
|
15323
15426
|
);
|
|
15324
15427
|
}
|
|
15325
15428
|
// any context has changed, we need to treat is as if the input might have changed.
|
|
@@ -15347,7 +15450,13 @@ function updateDehydratedSuspenseComponent(
|
|
|
15347
15450
|
suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render
|
|
15348
15451
|
|
|
15349
15452
|
var eventTime = NoTimestamp;
|
|
15350
|
-
|
|
15453
|
+
enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);
|
|
15454
|
+
scheduleUpdateOnFiber(
|
|
15455
|
+
root,
|
|
15456
|
+
current,
|
|
15457
|
+
attemptHydrationAtLane,
|
|
15458
|
+
eventTime
|
|
15459
|
+
);
|
|
15351
15460
|
}
|
|
15352
15461
|
} // If we have scheduled higher pri work above, this will probably just abort the render
|
|
15353
15462
|
// since we now have higher priority work, but in case it doesn't, we need to prepare to
|
|
@@ -15356,10 +15465,8 @@ function updateDehydratedSuspenseComponent(
|
|
|
15356
15465
|
// Delay having to do this as long as the suspense timeout allows us.
|
|
15357
15466
|
|
|
15358
15467
|
renderDidSuspendDelayIfPossible();
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
workInProgress,
|
|
15362
|
-
renderLanes,
|
|
15468
|
+
|
|
15469
|
+
var _capturedValue = createCapturedValue(
|
|
15363
15470
|
new Error(
|
|
15364
15471
|
"This Suspense boundary received an update before it finished " +
|
|
15365
15472
|
"hydrating. This caused the boundary to switch to client rendering. " +
|
|
@@ -15367,6 +15474,13 @@ function updateDehydratedSuspenseComponent(
|
|
|
15367
15474
|
"in startTransition."
|
|
15368
15475
|
)
|
|
15369
15476
|
);
|
|
15477
|
+
|
|
15478
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
15479
|
+
current,
|
|
15480
|
+
workInProgress,
|
|
15481
|
+
renderLanes,
|
|
15482
|
+
_capturedValue
|
|
15483
|
+
);
|
|
15370
15484
|
} else if (isSuspenseInstancePending()) {
|
|
15371
15485
|
// This component is still pending more data from the server, so we can't hydrate its
|
|
15372
15486
|
// content. We treat it as if this component suspended itself. It might seem as if
|
|
@@ -15411,15 +15525,20 @@ function updateDehydratedSuspenseComponent(
|
|
|
15411
15525
|
if (workInProgress.flags & ForceClientRender) {
|
|
15412
15526
|
// Something errored during hydration. Try again without hydrating.
|
|
15413
15527
|
workInProgress.flags &= ~ForceClientRender;
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
workInProgress,
|
|
15417
|
-
renderLanes,
|
|
15528
|
+
|
|
15529
|
+
var _capturedValue2 = createCapturedValue(
|
|
15418
15530
|
new Error(
|
|
15419
15531
|
"There was an error while hydrating this Suspense boundary. " +
|
|
15420
15532
|
"Switched to client rendering."
|
|
15421
15533
|
)
|
|
15422
15534
|
);
|
|
15535
|
+
|
|
15536
|
+
return retrySuspenseComponentWithoutHydrating(
|
|
15537
|
+
current,
|
|
15538
|
+
workInProgress,
|
|
15539
|
+
renderLanes,
|
|
15540
|
+
_capturedValue2
|
|
15541
|
+
);
|
|
15423
15542
|
} else if (workInProgress.memoizedState !== null) {
|
|
15424
15543
|
// Something suspended and we should still be in dehydrated mode.
|
|
15425
15544
|
// Leave the existing child in place.
|
|
@@ -19198,8 +19317,12 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
19198
19317
|
var offscreenFiber = finishedWork.child;
|
|
19199
19318
|
|
|
19200
19319
|
if (offscreenFiber.flags & Visibility) {
|
|
19320
|
+
var offscreenInstance = offscreenFiber.stateNode;
|
|
19201
19321
|
var newState = offscreenFiber.memoizedState;
|
|
19202
|
-
var isHidden = newState !== null;
|
|
19322
|
+
var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can
|
|
19323
|
+
// read it during an event
|
|
19324
|
+
|
|
19325
|
+
offscreenInstance.isHidden = isHidden;
|
|
19203
19326
|
|
|
19204
19327
|
if (isHidden) {
|
|
19205
19328
|
var wasHidden =
|
|
@@ -19236,7 +19359,13 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
19236
19359
|
commitReconciliationEffects(finishedWork);
|
|
19237
19360
|
|
|
19238
19361
|
if (flags & Visibility) {
|
|
19362
|
+
var _offscreenInstance = finishedWork.stateNode;
|
|
19239
19363
|
var _newState = finishedWork.memoizedState;
|
|
19364
|
+
|
|
19365
|
+
var _isHidden = _newState !== null;
|
|
19366
|
+
// read it during an event
|
|
19367
|
+
|
|
19368
|
+
_offscreenInstance.isHidden = _isHidden;
|
|
19240
19369
|
}
|
|
19241
19370
|
|
|
19242
19371
|
return;
|
|
@@ -19900,7 +20029,7 @@ function requestRetryLane(fiber) {
|
|
|
19900
20029
|
return claimNextRetryLane();
|
|
19901
20030
|
}
|
|
19902
20031
|
|
|
19903
|
-
function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
20032
|
+
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
|
|
19904
20033
|
checkForNestedUpdates();
|
|
19905
20034
|
|
|
19906
20035
|
{
|
|
@@ -19909,12 +20038,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
19909
20038
|
}
|
|
19910
20039
|
}
|
|
19911
20040
|
|
|
19912
|
-
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
|
19913
|
-
|
|
19914
|
-
if (root === null) {
|
|
19915
|
-
return null;
|
|
19916
|
-
}
|
|
19917
|
-
|
|
19918
20041
|
{
|
|
19919
20042
|
if (isFlushingPassiveEffects) {
|
|
19920
20043
|
didScheduleUpdateDuringPassiveEffects = true;
|
|
@@ -19945,7 +20068,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
19945
20068
|
warnIfUpdatesNotWrappedWithActDEV(fiber);
|
|
19946
20069
|
|
|
19947
20070
|
if (root === workInProgressRoot) {
|
|
19948
|
-
// TODO: Consolidate with `isInterleavedUpdate` check
|
|
19949
20071
|
// Received an update to a tree that's in the middle of rendering. Mark
|
|
19950
20072
|
// that there was an interleaved update work on this root. Unless the
|
|
19951
20073
|
// `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
|
|
@@ -19986,76 +20108,14 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
|
|
19986
20108
|
flushSyncCallbacksOnlyInLegacyMode();
|
|
19987
20109
|
}
|
|
19988
20110
|
}
|
|
19989
|
-
|
|
19990
|
-
return root;
|
|
19991
20111
|
}
|
|
19992
|
-
|
|
19993
|
-
//
|
|
19994
|
-
//
|
|
19995
|
-
|
|
19996
|
-
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
19997
|
-
// Update the source fiber's lanes
|
|
19998
|
-
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
19999
|
-
var alternate = sourceFiber.alternate;
|
|
20000
|
-
|
|
20001
|
-
if (alternate !== null) {
|
|
20002
|
-
alternate.lanes = mergeLanes(alternate.lanes, lane);
|
|
20003
|
-
}
|
|
20004
|
-
|
|
20005
|
-
{
|
|
20006
|
-
if (
|
|
20007
|
-
alternate === null &&
|
|
20008
|
-
(sourceFiber.flags & (Placement | Hydrating)) !== NoFlags
|
|
20009
|
-
) {
|
|
20010
|
-
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
20011
|
-
}
|
|
20012
|
-
} // Walk the parent path to the root and update the child lanes.
|
|
20013
|
-
|
|
20014
|
-
var node = sourceFiber;
|
|
20015
|
-
var parent = sourceFiber.return;
|
|
20016
|
-
|
|
20017
|
-
while (parent !== null) {
|
|
20018
|
-
parent.childLanes = mergeLanes(parent.childLanes, lane);
|
|
20019
|
-
alternate = parent.alternate;
|
|
20020
|
-
|
|
20021
|
-
if (alternate !== null) {
|
|
20022
|
-
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
|
|
20023
|
-
} else {
|
|
20024
|
-
{
|
|
20025
|
-
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
|
|
20026
|
-
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
|
20027
|
-
}
|
|
20028
|
-
}
|
|
20029
|
-
}
|
|
20030
|
-
|
|
20031
|
-
node = parent;
|
|
20032
|
-
parent = parent.return;
|
|
20033
|
-
}
|
|
20034
|
-
|
|
20035
|
-
if (node.tag === HostRoot) {
|
|
20036
|
-
var root = node.stateNode;
|
|
20037
|
-
return root;
|
|
20038
|
-
} else {
|
|
20039
|
-
return null;
|
|
20040
|
-
}
|
|
20041
|
-
}
|
|
20042
|
-
|
|
20043
|
-
function isInterleavedUpdate(fiber, lane) {
|
|
20112
|
+
function isUnsafeClassRenderPhaseUpdate(fiber) {
|
|
20113
|
+
// Check if this is a render phase update. Only called by class components,
|
|
20114
|
+
// which special (deprecated) behavior for UNSAFE_componentWillReceive props.
|
|
20044
20115
|
return (
|
|
20045
|
-
// TODO:
|
|
20046
|
-
//
|
|
20047
|
-
|
|
20048
|
-
(workInProgressRoot !== null || // If the interleaved updates queue hasn't been cleared yet, then
|
|
20049
|
-
// we should treat this as an interleaved update, too. This is also a
|
|
20050
|
-
// defensive coding measure in case a new update comes in between when
|
|
20051
|
-
// rendering has finished and when the interleaved updates are transferred
|
|
20052
|
-
// to the main queue.
|
|
20053
|
-
hasInterleavedUpdates()) &&
|
|
20054
|
-
(fiber.mode & ConcurrentMode) !== NoMode && // If this is a render phase update (i.e. UNSAFE_componentWillReceiveProps),
|
|
20055
|
-
// then don't treat this as an interleaved update. This pattern is
|
|
20056
|
-
// accompanied by a warning but we haven't fully deprecated it yet. We can
|
|
20057
|
-
// remove once the deferRenderPhaseUpdateToNextBatch flag is enabled.
|
|
20058
|
-
(executionContext & RenderContext) === NoContext
|
|
20116
|
+
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
|
|
20117
|
+
// decided not to enable it.
|
|
20118
|
+
(executionContext & RenderContext) !== NoContext
|
|
20059
20119
|
);
|
|
20060
20120
|
} // Use this function to schedule a task for a root. There's only one task per
|
|
20061
20121
|
// root; if a task was already scheduled, we'll check to make sure the priority
|
|
@@ -20752,7 +20812,7 @@ function prepareFreshStack(root, lanes) {
|
|
|
20752
20812
|
workInProgressRootPingedLanes = NoLanes;
|
|
20753
20813
|
workInProgressRootConcurrentErrors = null;
|
|
20754
20814
|
workInProgressRootRecoverableErrors = null;
|
|
20755
|
-
|
|
20815
|
+
finishQueueingConcurrentUpdates();
|
|
20756
20816
|
|
|
20757
20817
|
{
|
|
20758
20818
|
ReactStrictModeWarnings.discardPendingWarnings();
|
|
@@ -21397,7 +21457,12 @@ function commitRootImpl(
|
|
|
21397
21457
|
|
|
21398
21458
|
for (var i = 0; i < recoverableErrors.length; i++) {
|
|
21399
21459
|
var recoverableError = recoverableErrors[i];
|
|
21400
|
-
|
|
21460
|
+
var componentStack = recoverableError.stack;
|
|
21461
|
+
var digest = recoverableError.digest;
|
|
21462
|
+
onRecoverableError(recoverableError.value, {
|
|
21463
|
+
componentStack: componentStack,
|
|
21464
|
+
digest: digest
|
|
21465
|
+
});
|
|
21401
21466
|
}
|
|
21402
21467
|
}
|
|
21403
21468
|
|
|
@@ -21579,11 +21644,10 @@ function prepareToThrowUncaughtError(error) {
|
|
|
21579
21644
|
var onUncaughtError = prepareToThrowUncaughtError;
|
|
21580
21645
|
|
|
21581
21646
|
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
|
|
21582
|
-
var errorInfo =
|
|
21647
|
+
var errorInfo = createCapturedValueAtFiber(error, sourceFiber);
|
|
21583
21648
|
var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
|
|
21584
|
-
enqueueUpdate(rootFiber, update);
|
|
21649
|
+
var root = enqueueUpdate(rootFiber, update, SyncLane);
|
|
21585
21650
|
var eventTime = requestEventTime();
|
|
21586
|
-
var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
|
|
21587
21651
|
|
|
21588
21652
|
if (root !== null) {
|
|
21589
21653
|
markRootUpdated(root, SyncLane, eventTime);
|
|
@@ -21623,11 +21687,10 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {
|
|
|
21623
21687
|
(typeof instance.componentDidCatch === "function" &&
|
|
21624
21688
|
!isAlreadyFailedLegacyErrorBoundary(instance))
|
|
21625
21689
|
) {
|
|
21626
|
-
var errorInfo =
|
|
21690
|
+
var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);
|
|
21627
21691
|
var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
|
|
21628
|
-
enqueueUpdate(fiber, update);
|
|
21692
|
+
var root = enqueueUpdate(fiber, update, SyncLane);
|
|
21629
21693
|
var eventTime = requestEventTime();
|
|
21630
|
-
var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
|
|
21631
21694
|
|
|
21632
21695
|
if (root !== null) {
|
|
21633
21696
|
markRootUpdated(root, SyncLane, eventTime);
|
|
@@ -21714,7 +21777,7 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) {
|
|
|
21714
21777
|
} // TODO: Special case idle priority?
|
|
21715
21778
|
|
|
21716
21779
|
var eventTime = requestEventTime();
|
|
21717
|
-
var root =
|
|
21780
|
+
var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
|
|
21718
21781
|
|
|
21719
21782
|
if (root !== null) {
|
|
21720
21783
|
markRootUpdated(root, retryLane, eventTime);
|
|
@@ -21830,7 +21893,6 @@ function flushRenderPhaseStrictModeWarningsInDEV() {
|
|
|
21830
21893
|
}
|
|
21831
21894
|
|
|
21832
21895
|
var didWarnStateUpdateForNotYetMountedComponent = null;
|
|
21833
|
-
|
|
21834
21896
|
function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
|
21835
21897
|
{
|
|
21836
21898
|
if ((executionContext & RenderContext) !== NoContext) {
|
|
@@ -21890,7 +21952,6 @@ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
|
|
21890
21952
|
}
|
|
21891
21953
|
}
|
|
21892
21954
|
}
|
|
21893
|
-
|
|
21894
21955
|
var beginWork$1;
|
|
21895
21956
|
|
|
21896
21957
|
{
|
|
@@ -22416,7 +22477,11 @@ function scheduleFibersWithFamiliesRecursively(
|
|
|
22416
22477
|
}
|
|
22417
22478
|
|
|
22418
22479
|
if (needsRemount || needsRender) {
|
|
22419
|
-
|
|
22480
|
+
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
22481
|
+
|
|
22482
|
+
if (_root !== null) {
|
|
22483
|
+
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
|
|
22484
|
+
}
|
|
22420
22485
|
}
|
|
22421
22486
|
|
|
22422
22487
|
if (child !== null && !needsRemount) {
|
|
@@ -23121,7 +23186,9 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
|
|
|
23121
23186
|
var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
|
|
23122
23187
|
fiber.elementType = REACT_OFFSCREEN_TYPE;
|
|
23123
23188
|
fiber.lanes = lanes;
|
|
23124
|
-
var primaryChildInstance = {
|
|
23189
|
+
var primaryChildInstance = {
|
|
23190
|
+
isHidden: false
|
|
23191
|
+
};
|
|
23125
23192
|
fiber.stateNode = primaryChildInstance;
|
|
23126
23193
|
return fiber;
|
|
23127
23194
|
}
|
|
@@ -23293,7 +23360,7 @@ function createFiberRoot(
|
|
|
23293
23360
|
return root;
|
|
23294
23361
|
}
|
|
23295
23362
|
|
|
23296
|
-
var ReactVersion = "18.2.0-next-
|
|
23363
|
+
var ReactVersion = "18.2.0-next-9e3b772b8-20220608";
|
|
23297
23364
|
|
|
23298
23365
|
function createPortal(
|
|
23299
23366
|
children,
|
|
@@ -23491,10 +23558,10 @@ function updateContainer(element, container, parentComponent, callback) {
|
|
|
23491
23558
|
update.callback = callback;
|
|
23492
23559
|
}
|
|
23493
23560
|
|
|
23494
|
-
enqueueUpdate(current$1, update);
|
|
23495
|
-
var root = scheduleUpdateOnFiber(current$1, lane, eventTime);
|
|
23561
|
+
var root = enqueueUpdate(current$1, update, lane);
|
|
23496
23562
|
|
|
23497
23563
|
if (root !== null) {
|
|
23564
|
+
scheduleUpdateOnFiber(root, current$1, lane, eventTime);
|
|
23498
23565
|
entangleTransitions(root, current$1, lane);
|
|
23499
23566
|
}
|
|
23500
23567
|
|
|
@@ -23654,7 +23721,11 @@ var setSuspenseHandler = null;
|
|
|
23654
23721
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
23655
23722
|
|
|
23656
23723
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
23657
|
-
|
|
23724
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23725
|
+
|
|
23726
|
+
if (root !== null) {
|
|
23727
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23728
|
+
}
|
|
23658
23729
|
}
|
|
23659
23730
|
};
|
|
23660
23731
|
|
|
@@ -23671,7 +23742,11 @@ var setSuspenseHandler = null;
|
|
|
23671
23742
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
23672
23743
|
|
|
23673
23744
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
23674
|
-
|
|
23745
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23746
|
+
|
|
23747
|
+
if (root !== null) {
|
|
23748
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23749
|
+
}
|
|
23675
23750
|
}
|
|
23676
23751
|
};
|
|
23677
23752
|
|
|
@@ -23688,7 +23763,11 @@ var setSuspenseHandler = null;
|
|
|
23688
23763
|
// Shallow cloning props works as a workaround for now to bypass the bailout check.
|
|
23689
23764
|
|
|
23690
23765
|
fiber.memoizedProps = assign({}, fiber.memoizedProps);
|
|
23691
|
-
|
|
23766
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23767
|
+
|
|
23768
|
+
if (root !== null) {
|
|
23769
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23770
|
+
}
|
|
23692
23771
|
}
|
|
23693
23772
|
}; // Support DevTools props for function components, forwardRef, memo, host components, etc.
|
|
23694
23773
|
|
|
@@ -23699,7 +23778,11 @@ var setSuspenseHandler = null;
|
|
|
23699
23778
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
23700
23779
|
}
|
|
23701
23780
|
|
|
23702
|
-
|
|
23781
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23782
|
+
|
|
23783
|
+
if (root !== null) {
|
|
23784
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23785
|
+
}
|
|
23703
23786
|
};
|
|
23704
23787
|
|
|
23705
23788
|
overridePropsDeletePath = function(fiber, path) {
|
|
@@ -23709,7 +23792,11 @@ var setSuspenseHandler = null;
|
|
|
23709
23792
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
23710
23793
|
}
|
|
23711
23794
|
|
|
23712
|
-
|
|
23795
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23796
|
+
|
|
23797
|
+
if (root !== null) {
|
|
23798
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23799
|
+
}
|
|
23713
23800
|
};
|
|
23714
23801
|
|
|
23715
23802
|
overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
@@ -23719,11 +23806,19 @@ var setSuspenseHandler = null;
|
|
|
23719
23806
|
fiber.alternate.pendingProps = fiber.pendingProps;
|
|
23720
23807
|
}
|
|
23721
23808
|
|
|
23722
|
-
|
|
23809
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23810
|
+
|
|
23811
|
+
if (root !== null) {
|
|
23812
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23813
|
+
}
|
|
23723
23814
|
};
|
|
23724
23815
|
|
|
23725
23816
|
scheduleUpdate = function(fiber) {
|
|
23726
|
-
|
|
23817
|
+
var root = enqueueConcurrentRenderForLane(fiber, SyncLane);
|
|
23818
|
+
|
|
23819
|
+
if (root !== null) {
|
|
23820
|
+
scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);
|
|
23821
|
+
}
|
|
23727
23822
|
};
|
|
23728
23823
|
|
|
23729
23824
|
setErrorHandler = function(newShouldErrorImpl) {
|