react-native-macos 0.68.68 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +80 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +11 -3
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
- package/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
- package/Libraries/AddressSanitizerCrash/AddressSanitizerCrash.js +13 -0
- package/Libraries/AddressSanitizerCrash/NativeAddressSanitizerCrash.js +19 -0
- package/Libraries/Alert/Alert.d.ts +91 -0
- package/Libraries/Alert/Alert.js +142 -13
- package/Libraries/Alert/Alert.js.flow +65 -0
- package/Libraries/Alert/NativeAlertManager.js +6 -21
- package/Libraries/Alert/RCTAlertManager.ios.js +2 -1
- package/Libraries/Alert/RCTAlertManager.macos.js +1 -1
- package/Libraries/Animated/Animated.d.ts +615 -0
- package/Libraries/Animated/Animated.js +13 -11
- package/Libraries/Animated/AnimatedEvent.js +19 -21
- package/Libraries/Animated/AnimatedImplementation.js +39 -27
- package/Libraries/Animated/AnimatedMock.js +17 -14
- 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 +297 -116
- package/Libraries/Animated/NativeAnimatedModule.js +5 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +5 -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 +12 -17
- package/Libraries/Animated/animations/TimingAnimation.js +17 -26
- 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 +16 -16
- package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +2 -2
- package/Libraries/Animated/nodes/AnimatedAddition.js +9 -9
- package/Libraries/Animated/nodes/AnimatedColor.js +127 -40
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +9 -9
- package/Libraries/Animated/nodes/AnimatedDivision.js +10 -10
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +46 -51
- package/Libraries/Animated/nodes/AnimatedModulo.js +9 -9
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +10 -11
- package/Libraries/Animated/nodes/AnimatedNode.js +12 -10
- package/Libraries/Animated/nodes/AnimatedProps.js +15 -25
- package/Libraries/Animated/nodes/AnimatedStyle.js +14 -21
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +10 -10
- package/Libraries/Animated/nodes/AnimatedTracking.js +8 -12
- package/Libraries/Animated/nodes/AnimatedTransform.js +39 -32
- package/Libraries/Animated/nodes/AnimatedValue.js +24 -16
- package/Libraries/Animated/nodes/AnimatedValueXY.js +31 -7
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +4 -5
- package/Libraries/Animated/useAnimatedProps.js +9 -16
- package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValue.js +25 -0
- package/Libraries/AppDelegate/RCTAppDelegate.h +126 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +193 -0
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +73 -0
- package/Libraries/AppState/AppState.d.ts +58 -0
- package/Libraries/AppState/AppState.js +4 -40
- package/Libraries/AppState/NativeAppState.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +28 -18
- package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
- package/Libraries/BatchedBridge/NativeModules.js +4 -4
- package/Libraries/Blob/Blob.js +6 -0
- package/Libraries/Blob/BlobManager.js +5 -3
- package/Libraries/Blob/File.js +2 -3
- package/Libraries/Blob/FileReader.js +6 -11
- package/Libraries/Blob/NativeBlobModule.js +1 -0
- package/Libraries/Blob/NativeFileReaderModule.js +1 -0
- package/Libraries/Blob/RCTBlobCollector.h +0 -2
- package/Libraries/Blob/RCTBlobCollector.mm +27 -23
- package/Libraries/Blob/RCTBlobManager.h +1 -1
- package/Libraries/Blob/RCTBlobManager.mm +34 -28
- package/Libraries/Blob/RCTFileReaderModule.mm +49 -38
- package/Libraries/Blob/React-RCTBlob.podspec +7 -4
- package/Libraries/Blob/URL.js +18 -10
- package/Libraries/BugReporting/NativeBugReporting.js +1 -0
- package/Libraries/BugReporting/getReactData.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +157 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +223 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +64 -44
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +1 -0
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +7 -2
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.macos.js +1 -1
- 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 +318 -0
- package/Libraries/Components/Button.js +100 -54
- 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/DatePicker/DatePickerIOS.flow.android.js +14 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +113 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +8 -7
- package/Libraries/Components/DatePicker/DatePickerIOS.macos.js +1 -1
- package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +7 -6
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.macos.js +1 -1
- package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +6 -0
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.android.js +2 -2
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.ios.js +2 -2
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.macos.js +3 -4
- package/Libraries/Components/DatePickerMacOS/RCTDatePickerNativeComponentMacOS.js +4 -4
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +9 -8
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +17 -14
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.macos.js +1 -1
- package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
- package/Libraries/Components/Keyboard/Keyboard.js +36 -20
- 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/Picker/PickerAndroid.macos.js +1 -1
- package/Libraries/Components/Picker/PickerIOS.macos.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
- package/Libraries/Components/Pressable/Pressable.js +107 -49
- 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/ProgressBarAndroid.macos.js +1 -1
- 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.macos.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 +2 -4
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +19 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +9 -35
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +48 -38
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +17 -8
- package/Libraries/Components/ScrollView/ScrollView.d.ts +911 -0
- package/Libraries/Components/ScrollView/ScrollView.js +131 -87
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +21 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +243 -265
- package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -0
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.macos.js +1 -1
- package/Libraries/Components/Slider/Slider.d.ts +132 -0
- package/Libraries/Components/Slider/Slider.js +12 -14
- package/Libraries/Components/Slider/SliderNativeComponent.js +4 -6
- package/Libraries/Components/Sound/NativeSoundManager.js +1 -0
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +2 -1
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +1 -0
- package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
- package/Libraries/Components/StatusBar/StatusBar.js +25 -17
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +10 -10
- package/Libraries/Components/Switch/Switch.d.ts +115 -0
- package/Libraries/Components/Switch/Switch.js +18 -8
- package/Libraries/Components/Switch/SwitchNativeComponent.js +9 -4
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +149 -116
- package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
- package/Libraries/Components/TextInput/InputAccessoryView.js +17 -17
- package/Libraries/Components/TextInput/InputAccessoryView.js.flow +25 -0
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +20 -11
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +16 -7
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +27 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +855 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +1186 -0
- package/Libraries/Components/TextInput/TextInput.js +496 -54
- package/Libraries/Components/TextInput/TextInputNativeCommands.js +2 -2
- package/Libraries/Components/TextInput/TextInputState.js +34 -15
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +1 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.macos.js +1 -1
- package/Libraries/Components/Touchable/PooledClass.js +16 -4
- package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
- package/Libraries/Components/Touchable/Touchable.flow.js +258 -0
- package/Libraries/Components/Touchable/Touchable.js +67 -13
- package/Libraries/Components/Touchable/TouchableBounce.js +50 -15
- package/Libraries/Components/Touchable/TouchableHighlight.d.ts +68 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +37 -13
- package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +61 -24
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +109 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +66 -23
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +143 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +86 -33
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/DraggedType.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +14 -9
- package/Libraries/Components/View/ReactNativeViewAttributes.js +4 -3
- package/Libraries/Components/View/View.d.ts +29 -0
- package/Libraries/Components/View/View.js +91 -16
- package/Libraries/Components/View/ViewAccessibility.d.ts +373 -0
- package/Libraries/Components/View/ViewAccessibility.js +70 -6
- package/Libraries/Components/View/ViewNativeComponent.js +68 -8
- package/Libraries/Components/View/ViewPropTypes.d.ts +245 -0
- package/Libraries/Components/View/ViewPropTypes.js +228 -130
- package/Libraries/Core/Devtools/openFileInEditor.js +3 -0
- package/Libraries/Core/Devtools/parseErrorStack.js +1 -1
- package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +11 -1
- package/Libraries/Core/ExtendedError.js +11 -8
- package/Libraries/Core/InitializeCore.js +2 -1
- package/Libraries/Core/NativeExceptionsManager.js +4 -5
- package/Libraries/Core/RawEventEmitter.js +39 -0
- package/Libraries/Core/ReactFiberErrorDialog.js +2 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -6
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -0
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +1 -0
- package/Libraries/Core/Timers/JSTimers.js +15 -13
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/setUpAlert.js +1 -0
- package/Libraries/Core/setUpBatchedBridge.js +6 -6
- package/Libraries/Core/setUpDeveloperTools.js +4 -6
- package/Libraries/Core/setUpPerformance.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +7 -3
- package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
- package/Libraries/Core/setUpTimers.js +1 -1
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.macos.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +70 -0
- package/Libraries/EventEmitter/NativeEventEmitter.js +5 -20
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +30 -0
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +3 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +4 -3
- package/Libraries/Events/CustomEvent.js +32 -0
- package/Libraries/Events/EventPolyfill.js +239 -0
- package/Libraries/FBLazyVector/BUCK +5 -1
- package/Libraries/FBLazyVector/FBLazyVector/FBLazyIterator.h +9 -12
- package/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h +9 -6
- package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +1 -0
- package/Libraries/Image/AssetSourceResolver.js +6 -8
- package/Libraries/Image/Image.android.js +62 -48
- package/Libraries/Image/Image.d.ts +322 -0
- package/Libraries/Image/Image.flow.js +64 -0
- package/Libraries/Image/Image.ios.js +56 -32
- package/Libraries/Image/Image.macos.js +1 -1
- package/Libraries/Image/ImageBackground.js +18 -7
- package/Libraries/Image/ImageBackground.js.flow +17 -0
- 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/ImageSource.js +7 -7
- package/Libraries/Image/ImageSourceUtils.js +80 -0
- package/Libraries/Image/ImageUtils.js +21 -0
- package/Libraries/Image/ImageViewNativeComponent.js +25 -7
- package/Libraries/Image/ImageViewNativeComponent.js.flow +45 -0
- package/Libraries/Image/NativeImageEditor.js +1 -0
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -0
- package/Libraries/Image/NativeImageLoaderIOS.js +1 -0
- package/Libraries/Image/NativeImageStoreAndroid.js +1 -0
- package/Libraries/Image/NativeImageStoreIOS.js +1 -0
- package/Libraries/Image/RCTAnimatedImage.h +3 -3
- package/Libraries/Image/RCTAnimatedImage.m +15 -12
- package/Libraries/Image/RCTDisplayWeakRefreshable.h +4 -3
- package/Libraries/Image/RCTDisplayWeakRefreshable.m +5 -3
- package/Libraries/Image/RCTGIFImageDecoder.mm +7 -4
- package/Libraries/Image/RCTImageBlurUtils.h +1 -1
- package/Libraries/Image/RCTImageBlurUtils.m +38 -28
- package/Libraries/Image/RCTImageCache.h +9 -6
- package/Libraries/Image/RCTImageCache.m +24 -23
- package/Libraries/Image/RCTImageDataDecoder.h +2 -2
- package/Libraries/Image/RCTImageEditingManager.mm +54 -45
- package/Libraries/Image/RCTImageLoader.h +9 -9
- package/Libraries/Image/RCTImageLoader.mm +468 -402
- package/Libraries/Image/RCTImageLoaderProtocol.h +15 -18
- package/Libraries/Image/RCTImageLoaderWithAttributionProtocol.h +4 -4
- package/Libraries/Image/RCTImageStoreManager.h +1 -1
- package/Libraries/Image/RCTImageStoreManager.mm +34 -29
- package/Libraries/Image/RCTImageURLLoader.h +12 -9
- package/Libraries/Image/RCTImageURLLoaderWithAttribution.h +8 -6
- package/Libraries/Image/RCTImageURLLoaderWithAttribution.mm +3 -1
- package/Libraries/Image/RCTImageUtils.h +21 -20
- package/Libraries/Image/RCTImageUtils.m +91 -91
- package/Libraries/Image/RCTImageView.h +4 -12
- package/Libraries/Image/RCTImageView.mm +108 -123
- package/Libraries/Image/RCTImageViewManager.mm +47 -43
- package/Libraries/Image/RCTLocalAssetImageLoader.mm +12 -10
- package/Libraries/Image/RCTResizeMode.h +4 -4
- package/Libraries/Image/RCTResizeMode.m +12 -8
- package/Libraries/Image/RCTUIImageViewAnimated.h +4 -4
- package/Libraries/Image/RCTUIImageViewAnimated.m +34 -24
- package/Libraries/Image/React-RCTImage.podspec +3 -3
- package/Libraries/Image/TextInlineImageNativeComponent.js +26 -17
- package/Libraries/Image/TextInlineImageNativeComponent.js.flow +27 -0
- package/Libraries/Image/nativeImageSource.js +4 -4
- 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 +6 -7
- package/Libraries/Inspector/ElementProperties.js +10 -11
- package/Libraries/Inspector/Inspector.js +23 -111
- package/Libraries/Inspector/InspectorOverlay.js +5 -5
- package/Libraries/Inspector/InspectorPanel.js +12 -10
- package/Libraries/Inspector/NetworkOverlay.js +19 -10
- 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 +5 -4
- package/Libraries/Interaction/InteractionManager.d.ts +74 -0
- package/Libraries/Interaction/InteractionManager.js +9 -20
- 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 +20 -17
- package/Libraries/Interaction/TaskQueue.js +5 -4
- 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 +16 -2
- package/Libraries/Linking/Linking.d.ts +61 -0
- package/Libraries/Linking/Linking.js +5 -15
- package/Libraries/Linking/NativeIntentAndroid.js +1 -0
- package/Libraries/Linking/NativeLinkingManager.js +1 -0
- package/Libraries/LinkingIOS/RCTLinkingManager.h +11 -10
- package/Libraries/LinkingIOS/RCTLinkingManager.mm +75 -63
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +5 -5
- package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +13 -6
- 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 +251 -0
- package/Libraries/Lists/FlatList.js +123 -87
- package/Libraries/Lists/FlatList.js.flow +123 -0
- package/Libraries/Lists/SectionList.d.ts +258 -0
- package/Libraries/Lists/SectionList.js +7 -6
- package/Libraries/Lists/SectionListModern.js +6 -6
- package/Libraries/Lists/StateSafePureComponent.js +85 -0
- package/Libraries/Lists/ViewabilityHelper.js +39 -14
- package/Libraries/Lists/VirtualizeUtils.js +48 -31
- package/Libraries/Lists/VirtualizedList.d.ts +347 -0
- package/Libraries/Lists/VirtualizedList.js +666 -996
- package/Libraries/Lists/VirtualizedListCellRenderer.js +264 -0
- package/Libraries/Lists/VirtualizedListContext.js +15 -51
- package/Libraries/Lists/VirtualizedListProps.js +331 -0
- package/Libraries/Lists/VirtualizedSectionList.js +22 -186
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +12 -11
- package/Libraries/LogBox/Data/LogBoxLog.js +6 -6
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -5
- package/Libraries/LogBox/Data/parseLogBoxLog.js +7 -5
- package/Libraries/LogBox/LogBox.d.ts +28 -0
- package/Libraries/LogBox/LogBox.js +16 -33
- package/Libraries/LogBox/LogBoxInspectorContainer.js +5 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/AnsiHighlight.js +7 -3
- package/Libraries/LogBox/UI/LogBoxButton.js +6 -5
- package/Libraries/LogBox/UI/LogBoxInspector.js +6 -6
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +12 -8
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +4 -3
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +8 -6
- 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 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +5 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +12 -7
- 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 -4
- package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.h +1 -1
- package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.m +6 -9
- package/Libraries/NativeAnimation/Drivers/RCTEventAnimation.h +1 -2
- package/Libraries/NativeAnimation/Drivers/RCTEventAnimation.m +2 -4
- package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.h +1 -1
- package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.m +17 -24
- package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.h +1 -1
- package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.m +9 -23
- package/Libraries/NativeAnimation/Nodes/RCTAdditionAnimatedNode.m +1 -2
- package/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h +2 -3
- package/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m +3 -5
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h +14 -0
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +28 -0
- package/Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.m +7 -4
- package/Libraries/NativeAnimation/Nodes/RCTDivisionAnimatedNode.m +1 -2
- package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.m +14 -20
- package/Libraries/NativeAnimation/Nodes/RCTMultiplicationAnimatedNode.m +1 -2
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +23 -21
- package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +12 -10
- package/Libraries/NativeAnimation/Nodes/RCTSubtractionAnimatedNode.h +0 -1
- package/Libraries/NativeAnimation/Nodes/RCTSubtractionAnimatedNode.m +1 -3
- package/Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h +0 -1
- package/Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m +3 -8
- package/Libraries/NativeAnimation/Nodes/RCTTransformAnimatedNode.m +4 -6
- package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h +1 -1
- package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.m +1 -2
- package/Libraries/NativeAnimation/RCTAnimationUtils.h +14 -12
- package/Libraries/NativeAnimation/RCTAnimationUtils.m +15 -19
- package/Libraries/NativeAnimation/RCTNativeAnimatedModule.h +6 -1
- package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +89 -68
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h +14 -20
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +63 -64
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.h +5 -1
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +76 -73
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +4 -4
- package/Libraries/NativeComponent/BaseViewConfig.android.js +311 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +352 -0
- package/Libraries/NativeComponent/BaseViewConfig.macos.js +86 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +5 -6
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +25 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +8 -43
- package/Libraries/NativeComponent/ViewConfig.js +5 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +54 -0
- package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevMenu.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevSettings.js +1 -3
- 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/FormData.js +7 -1
- package/Libraries/Network/NativeNetworkingAndroid.js +1 -0
- package/Libraries/Network/NativeNetworkingIOS.js +1 -0
- package/Libraries/Network/RCTDataRequestHandler.mm +8 -11
- package/Libraries/Network/RCTFileRequestHandler.mm +13 -19
- package/Libraries/Network/RCTHTTPRequestHandler.h +4 -3
- package/Libraries/Network/RCTHTTPRequestHandler.mm +19 -23
- package/Libraries/Network/RCTNetworkTask.mm +2 -3
- package/Libraries/Network/RCTNetworking.android.js +4 -3
- package/Libraries/Network/RCTNetworking.ios.js +3 -2
- package/Libraries/Network/RCTNetworking.macos.js +1 -1
- package/Libraries/Network/RCTNetworking.mm +189 -168
- package/Libraries/Network/React-RCTNetwork.podspec +4 -4
- package/Libraries/Network/XMLHttpRequest.js +9 -11
- package/Libraries/Network/convertRequestBody.js +1 -2
- package/Libraries/NewAppScreen/components/DebugInstructions.js +6 -3
- 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 +6 -3
- package/Libraries/NewAppScreen/index.js +1 -1
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +1 -0
- package/Libraries/Performance/PureComponentDebug.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 +10 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +115 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +23 -4
- package/Libraries/Pressability/HoverState.js +2 -2
- package/Libraries/Pressability/Pressability.js +156 -73
- package/Libraries/Pressability/PressabilityDebug.js +6 -10
- package/Libraries/Promise.js +0 -1
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +2 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +295 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +21 -16
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.h +10 -9
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +222 -183
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +3 -3
- package/Libraries/RCTRequired/BUCK +5 -1
- package/Libraries/RCTRequired/RCTRequired/RCTRequired.h +31 -18
- package/Libraries/RCTRequired/RCTRequired.podspec +1 -1
- package/Libraries/ReactNative/AppContainer.js +18 -8
- package/Libraries/ReactNative/AppRegistry.d.ts +119 -0
- package/Libraries/ReactNative/AppRegistry.js +30 -28
- package/Libraries/ReactNative/BridgelessUIManager.js +162 -0
- 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 +11 -11
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +60 -0
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -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.d.ts +13 -0
- package/Libraries/ReactNative/RootTag.js +0 -1
- package/Libraries/ReactNative/UIManager.d.ts +157 -0
- package/Libraries/ReactNative/UIManager.js +3 -4
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -0
- package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
- package/Libraries/ReactNative/renderApplication.js +43 -21
- package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
- package/Libraries/ReactNative/requireNativeComponent.js +2 -2
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +16 -7
- package/Libraries/Renderer/README.md +22 -0
- package/Libraries/Renderer/REVISION +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4796 -2871
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +2187 -1644
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2309 -1721
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4762 -3052
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2328 -1810
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +2446 -1878
- 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 +24 -24
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +9 -8
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/Settings/NativeSettingsManager.js +1 -0
- package/Libraries/Settings/RCTSettingsManager.mm +16 -17
- package/Libraries/Settings/React-RCTSettings.podspec +3 -3
- package/Libraries/Settings/Settings.d.ts +18 -0
- package/Libraries/Settings/Settings.macos.js +1 -1
- 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/EdgeInsetsPropType.js +4 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +9 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.macos.js +16 -5
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.js +3 -2
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.macos.js +5 -3
- package/Libraries/StyleSheet/StyleSheet.d.ts +160 -0
- package/Libraries/StyleSheet/StyleSheet.js +15 -11
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +331 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +178 -86
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +2 -2
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/normalizeColor.js +4 -4
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +55 -0
- package/Libraries/StyleSheet/processAspectRatio.js +63 -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 -107
- package/Libraries/StyleSheet/splitLayoutProps.js +7 -0
- package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponent.h +2 -0
- package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponent.mm +23 -17
- package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponentState.h +5 -5
- package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponentState.mm +2 -4
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent+Internal.h +1 -2
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent.h +2 -3
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent.mm +25 -17
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentController.mm +32 -12
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentOptions.h +2 -2
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentState.h +3 -4
- package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentState.mm +3 -8
- package/Libraries/Text/BaseText/RCTBaseTextShadowView.h +4 -2
- package/Libraries/Text/BaseText/RCTBaseTextShadowView.m +13 -12
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +10 -3
- package/Libraries/Text/RCTConvert+Text.h +2 -2
- package/Libraries/Text/RCTConvert+Text.m +16 -14
- package/Libraries/Text/RCTTextAttributes.h +18 -13
- package/Libraries/Text/RCTTextAttributes.m +108 -94
- package/Libraries/Text/RCTTextUIKit.h +2 -0
- package/Libraries/Text/RawText/RCTRawTextShadowView.m +4 -3
- package/Libraries/Text/RawText/RCTRawTextViewManager.m +2 -2
- package/Libraries/Text/React-RCTText.podspec +2 -2
- package/Libraries/Text/Text/NSTextStorage+FontScaling.h +1 -1
- package/Libraries/Text/Text/NSTextStorage+FontScaling.m +22 -42
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +5 -6
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +51 -44
- package/Libraries/Text/Text/RCTTextShadowView.m +179 -200
- package/Libraries/Text/Text/RCTTextView.h +5 -5
- package/Libraries/Text/Text/RCTTextView.m +257 -192
- package/Libraries/Text/Text/RCTTextViewManager.m +13 -14
- package/Libraries/Text/Text.d.ts +209 -0
- package/Libraries/Text/Text.js +108 -12
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +82 -42
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +17 -4
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +13 -12
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +186 -93
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +28 -12
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h +12 -9
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +94 -58
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +21 -22
- package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +54 -52
- package/Libraries/Text/TextInput/RCTBaseTextInputView.h +17 -10
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +358 -215
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +62 -48
- package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m +3 -3
- package/Libraries/Text/TextInput/RCTInputAccessoryView.h +2 -2
- package/Libraries/Text/TextInput/RCTInputAccessoryView.m +5 -6
- package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.h +2 -2
- package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.m +8 -9
- package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.m +1 -1
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +12 -9
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.m +3 -4
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +14 -12
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +131 -61
- package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.h +1 -1
- package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.m +1 -1
- package/Libraries/Text/TextNativeComponent.js +51 -42
- package/Libraries/Text/TextProps.js +73 -8
- package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.m +2 -2
- package/Libraries/TurboModule/RCTExport.d.ts +12 -0
- package/Libraries/TurboModule/TurboModuleRegistry.d.ts +13 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +3 -1
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +1 -0
- package/Libraries/TypeSafety/RCTConvertHelpers.h +30 -19
- package/Libraries/TypeSafety/RCTConvertHelpers.mm +4 -4
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +3 -8
- package/Libraries/TypeSafety/RCTTypedModuleConstants.h +7 -5
- package/Libraries/TypeSafety/RCTTypedModuleConstants.mm +6 -4
- package/Libraries/Types/CoreEventTypes.d.ts +263 -0
- package/Libraries/Types/CoreEventTypes.js +147 -8
- package/Libraries/Utilities/AcessibilityMapping.js +154 -0
- package/Libraries/Utilities/Appearance.d.ts +43 -0
- package/Libraries/Utilities/Appearance.js +5 -13
- package/Libraries/Utilities/BackHandler.android.js +3 -5
- package/Libraries/Utilities/BackHandler.d.ts +38 -0
- package/Libraries/Utilities/BackHandler.macos.js +1 -1
- package/Libraries/Utilities/DevSettings.d.ts +32 -0
- package/Libraries/Utilities/DevSettings.js +5 -3
- package/Libraries/Utilities/Dimensions.d.ts +79 -0
- package/Libraries/Utilities/Dimensions.js +2 -15
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -1
- package/Libraries/Utilities/HMRClient.js +29 -18
- package/Libraries/Utilities/LoadingView.ios.js +1 -1
- package/Libraries/Utilities/LoadingView.macos.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/NativePlatformConstantsMacOS.js +2 -3
- package/Libraries/Utilities/PerformanceLoggerContext.js +3 -2
- package/Libraries/Utilities/PixelRatio.d.ts +64 -0
- package/Libraries/Utilities/PixelRatio.js.flow +21 -0
- package/Libraries/Utilities/Platform.android.js +11 -5
- package/Libraries/Utilities/Platform.d.ts +102 -0
- package/Libraries/Utilities/Platform.ios.js +12 -12
- package/Libraries/Utilities/Platform.macos.js +13 -7
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +13 -16
- package/Libraries/Utilities/codegenNativeCommands.js +2 -2
- package/Libraries/Utilities/codegenNativeComponent.js +21 -7
- package/Libraries/Utilities/createPerformanceLogger.d.ts +48 -0
- package/Libraries/Utilities/createPerformanceLogger.js +7 -8
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/differ/deepDiffer.js +1 -1
- package/Libraries/Utilities/groupByEveryN.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +10 -3
- package/Libraries/Utilities/truncate.js +1 -1
- package/Libraries/Utilities/useColorScheme.js +11 -16
- package/Libraries/Utilities/useRefEffect.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +5 -5
- package/Libraries/Vibration/NativeVibration.js +1 -0
- package/Libraries/Vibration/RCTVibration.mm +5 -5
- package/Libraries/Vibration/React-RCTVibration.podspec +3 -3
- package/Libraries/Vibration/Vibration.d.ts +43 -0
- package/Libraries/Vibration/Vibration.js +2 -1
- package/Libraries/WebPerformance/NativePerformanceObserver.cpp +42 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.h +64 -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/RCTReconnectingWebSocket.m +1 -1
- package/Libraries/WebSocket/WebSocket.js +14 -5
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -2
- package/Libraries/Wrapper/Example/RCTWrapperExampleView.h +1 -1
- package/Libraries/Wrapper/Example/RCTWrapperExampleView.m +5 -12
- package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.h +1 -1
- package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.m +2 -1
- package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.h +5 -1
- package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.m +4 -5
- package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.h +1 -1
- package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.m +2 -3
- package/Libraries/Wrapper/RCTWrapper.h +51 -49
- package/Libraries/Wrapper/RCTWrapperShadowView.h +1 -1
- package/Libraries/Wrapper/RCTWrapperShadowView.m +9 -8
- package/Libraries/Wrapper/RCTWrapperView.h +7 -7
- package/Libraries/Wrapper/RCTWrapperView.m +1 -4
- package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.h +10 -6
- package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.m +1 -2
- 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/vendor/core/ErrorUtils.d.ts +15 -0
- package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
- package/Libraries/vendor/emitter/EventEmitter.js +105 -12
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
- package/README.md +37 -3
- package/React/AppSetup/RCTAppSetupUtils.h +15 -7
- package/React/AppSetup/RCTAppSetupUtils.mm +10 -8
- package/React/Base/RCTAssert.h +46 -19
- package/React/Base/RCTAssert.m +83 -22
- package/React/Base/RCTBridge+Cxx.h +1 -1
- package/React/Base/RCTBridge+Cxx.mm +1 -1
- package/React/Base/RCTBridge.h +4 -108
- package/React/Base/RCTBridge.m +3 -23
- package/React/Base/RCTBridgeConstants.h +71 -0
- package/React/Base/RCTBridgeConstants.m +18 -0
- package/React/Base/RCTBridgeModule.h +9 -49
- package/React/Base/RCTBridgeModuleDecorator.h +35 -0
- package/React/Base/RCTBridgeModuleDecorator.m +73 -0
- package/React/Base/RCTBundleManager.h +23 -0
- package/React/Base/RCTBundleManager.m +1 -1
- package/React/Base/RCTBundleURLProvider.h +1 -1
- package/React/Base/RCTBundleURLProvider.mm +4 -4
- package/React/Base/RCTConstants.h +69 -3
- package/React/Base/RCTConstants.m +63 -6
- package/React/Base/RCTConvert.h +15 -14
- package/React/Base/RCTConvert.m +183 -169
- package/React/Base/RCTDefines.h +2 -2
- package/React/Base/RCTDisplayLink.m +8 -8
- package/React/Base/RCTEventDispatcherProtocol.h +6 -1
- package/React/Base/RCTFrameUpdate.h +2 -2
- package/React/Base/RCTFrameUpdate.m +2 -2
- package/React/Base/RCTImageSource.m +2 -2
- package/React/Base/RCTJSStackFrame.m +2 -2
- package/React/Base/RCTJSThread.h +1 -1
- package/React/Base/RCTJavaScriptLoader.h +2 -5
- package/React/Base/RCTJavaScriptLoader.mm +13 -19
- package/React/Base/RCTKeyCommands.h +2 -0
- package/React/Base/RCTKeyCommands.m +5 -3
- package/React/Base/RCTLog.h +17 -0
- package/React/Base/RCTLog.mm +31 -2
- package/React/Base/RCTModuleData.mm +11 -76
- package/React/Base/RCTModuleMethod.mm +3 -3
- package/React/Base/RCTModuleRegistry.m +3 -1
- package/React/Base/RCTMultipartDataTask.m +2 -20
- package/React/Base/RCTMultipartStreamReader.m +1 -0
- package/React/Base/RCTPlatformDisplayLink.h +1 -1
- package/React/Base/RCTRedBoxSetEnabled.m +1 -1
- package/React/Base/RCTReloadCommand.m +4 -4
- package/React/Base/RCTRootContentView.h +1 -1
- package/React/Base/RCTRootContentView.m +11 -11
- package/React/Base/RCTRootView.h +4 -4
- package/React/Base/RCTRootView.m +26 -77
- package/React/Base/RCTTouchEvent.m +2 -2
- package/React/Base/RCTTouchHandler.h +11 -6
- package/React/Base/RCTTouchHandler.m +98 -68
- package/React/Base/RCTTurboModuleRegistry.h +29 -0
- package/React/Base/RCTUIKit.h +139 -29
- package/React/Base/RCTUtils.h +14 -12
- package/React/Base/RCTUtils.m +94 -35
- package/React/Base/RCTUtilsUIOverride.h +1 -1
- package/React/Base/RCTUtilsUIOverride.m +1 -1
- package/React/Base/RCTVersion.m +2 -6
- package/React/Base/RCTViewRegistry.m +26 -2
- package/React/Base/Surface/RCTSurface.mm +3 -1
- package/React/Base/Surface/RCTSurfaceDelegate.h +1 -1
- package/React/Base/Surface/RCTSurfaceProtocol.h +1 -1
- package/React/Base/Surface/RCTSurfaceRootShadowViewDelegate.h +1 -1
- package/React/Base/Surface/RCTSurfaceRootView.h +1 -1
- package/React/Base/Surface/RCTSurfaceView.h +1 -1
- package/React/Base/Surface/RCTSurfaceView.mm +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +3 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +8 -10
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +3 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +14 -15
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm +1 -1
- package/React/Base/macOS/RCTPlatform.m +3 -1
- package/React/Base/macOS/RCTPlatformDisplayLink.m +6 -2
- package/React/Base/macOS/RCTUIKit.m +234 -12
- package/React/CoreModules/BUCK +7 -5
- package/React/CoreModules/CoreModulesPlugins.h +1 -1
- package/React/CoreModules/CoreModulesPlugins.mm +5 -7
- package/React/CoreModules/RCTAccessibilityManager.h +2 -1
- package/React/CoreModules/RCTAccessibilityManager.mm +15 -4
- package/React/CoreModules/RCTActionSheetManager.h +1 -1
- package/React/CoreModules/RCTActionSheetManager.mm +77 -37
- package/React/CoreModules/RCTAlertController.h +7 -7
- package/React/CoreModules/RCTAlertController.m +41 -9
- package/React/CoreModules/RCTAlertManager.h +1 -1
- package/React/CoreModules/RCTAlertManager.mm +66 -36
- package/React/CoreModules/RCTAppState.mm +8 -8
- package/React/CoreModules/RCTAppearance.h +4 -4
- package/React/CoreModules/RCTAppearance.mm +30 -14
- package/React/CoreModules/RCTClipboard.mm +7 -7
- package/React/CoreModules/RCTDevLoadingView.h +1 -2
- package/React/CoreModules/RCTDevLoadingView.mm +47 -32
- package/React/CoreModules/RCTDevMenu.h +8 -3
- package/React/CoreModules/RCTDevMenu.mm +108 -67
- package/React/CoreModules/RCTDevSettings.h +4 -4
- package/React/CoreModules/RCTDevSettings.mm +12 -29
- package/React/CoreModules/RCTDevSplitBundleLoader.h +1 -1
- package/React/CoreModules/RCTDeviceInfo.h +3 -3
- package/React/CoreModules/RCTDeviceInfo.mm +70 -47
- package/React/CoreModules/RCTEventDispatcher.mm +14 -5
- package/React/CoreModules/RCTExceptionsManager.h +8 -3
- package/React/CoreModules/RCTExceptionsManager.mm +36 -12
- package/React/CoreModules/RCTFPSGraph.h +3 -3
- package/React/CoreModules/RCTFPSGraph.m +5 -5
- package/React/CoreModules/RCTKeyboardObserver.mm +8 -8
- package/React/CoreModules/RCTLogBox.h +2 -2
- package/React/CoreModules/RCTLogBox.mm +36 -20
- package/React/CoreModules/RCTLogBoxView.h +11 -10
- package/React/CoreModules/RCTLogBoxView.mm +72 -26
- package/React/CoreModules/RCTPerfMonitor.mm +1 -1
- package/React/CoreModules/RCTPlatform.mm +3 -1
- package/React/CoreModules/RCTRedBox.h +1 -1
- package/React/CoreModules/RCTRedBox.mm +33 -27
- package/React/CoreModules/RCTStatusBarManager.h +3 -3
- package/React/CoreModules/RCTStatusBarManager.mm +5 -5
- package/React/CoreModules/RCTTiming.mm +2 -2
- package/React/CoreModules/RCTWebSocketModule.mm +3 -3
- package/React/CoreModules/React-CoreModules.podspec +7 -6
- package/React/CxxBridge/JSCExecutorFactory.mm +1 -1
- package/React/CxxBridge/RCTCxxBridge.mm +36 -68
- package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +1 -3
- package/React/CxxModule/RCTCxxMethod.mm +2 -2
- package/React/CxxModule/RCTNativeModule.mm +15 -0
- package/React/CxxUtils/RCTFollyConvert.mm +11 -4
- package/React/DevSupport/RCTDevLoadingViewProtocol.h +2 -2
- package/React/DevSupport/RCTInspectorDevServerHelper.h +1 -1
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +8 -8
- package/React/DevSupport/RCTPackagerConnection.mm +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +3 -4
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
- package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +6 -0
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +12 -8
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +76 -26
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +3 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm +2 -0
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
- package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +1 -0
- package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +1 -0
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +104 -34
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +36 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +13 -6
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +5 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +3 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +4 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +7 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +24 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +136 -21
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +19 -7
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +22 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +10 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +10 -4
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +138 -27
- package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -3
- package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +13 -8
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +7 -4
- package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -7
- package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +11 -40
- package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
- package/React/Fabric/Mounting/RCTMountingManager.mm +31 -19
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +9 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +24 -6
- package/React/Fabric/RCTConversions.h +17 -7
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTImageResponseObserverProxy.h +1 -0
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +8 -1
- package/React/Fabric/RCTScheduler.mm +15 -9
- package/React/Fabric/RCTSurfacePresenter.h +12 -3
- package/React/Fabric/RCTSurfacePresenter.mm +86 -30
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +3 -1
- package/React/Fabric/RCTSurfaceRegistry.h +1 -1
- package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
- package/React/Fabric/RCTSurfaceTouchHandler.mm +747 -37
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +3 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Fabric/Utils/RCTReactTaggedView.h +34 -0
- package/React/Fabric/Utils/RCTReactTaggedView.mm +57 -0
- package/React/Modules/MacOS/RCTAccessibilityManager.m +4 -0
- package/React/Modules/RCTEventEmitter.h +9 -7
- package/React/Modules/RCTEventEmitter.m +15 -0
- package/React/Modules/RCTI18nUtil.m +1 -1
- package/React/Modules/RCTLayoutAnimation.h +1 -1
- package/React/Modules/RCTLayoutAnimation.m +14 -14
- package/React/Modules/RCTLayoutAnimationGroup.h +1 -1
- package/React/Modules/RCTLayoutAnimationGroup.m +2 -2
- package/React/Modules/RCTRedBoxExtraDataViewController.h +3 -0
- package/React/Modules/RCTRedBoxExtraDataViewController.m +2 -0
- package/React/Modules/RCTSurfacePresenterStub.h +8 -2
- package/React/Modules/RCTUIManager.h +12 -12
- package/React/Modules/RCTUIManager.m +149 -105
- package/React/Modules/RCTUIManagerObserverCoordinator.h +1 -1
- package/React/Modules/RCTUIManagerUtils.h +1 -1
- package/React/Profiler/RCTProfile.h +20 -0
- package/React/Profiler/RCTProfile.m +23 -23
- package/React/React-RCTFabric.podspec +4 -3
- package/React/Tests/Mounting/RCTComponentViewRegistryTests.mm +1 -0
- package/React/UIUtils/RCTUIUtils.h +6 -6
- package/React/UIUtils/RCTUIUtils.m +3 -3
- package/React/Views/RCTActivityIndicatorView.h +4 -4
- package/React/Views/RCTActivityIndicatorView.m +4 -4
- package/React/Views/RCTActivityIndicatorViewManager.m +4 -4
- package/React/Views/RCTAnimationType.h +4 -4
- package/React/Views/RCTAutoInsetsProtocol.h +1 -1
- package/React/Views/RCTBorderCurve.h +13 -0
- package/React/Views/RCTBorderDrawing.h +2 -2
- package/React/Views/RCTBorderDrawing.m +223 -189
- package/React/Views/RCTComponent.h +1 -0
- package/React/Views/RCTComponentData.h +3 -3
- package/React/Views/RCTComponentData.m +16 -5
- package/React/Views/RCTCursor.h +39 -0
- package/React/Views/RCTCursor.m +105 -0
- package/React/Views/RCTDatePicker.h +4 -4
- package/React/Views/RCTDatePicker.m +12 -12
- package/React/Views/RCTDatePickerManager.h +3 -3
- package/React/Views/RCTDatePickerManager.m +22 -19
- package/React/Views/RCTFont.h +1 -1
- package/React/Views/RCTFont.mm +89 -9
- package/React/Views/RCTLayout.h +1 -1
- package/React/Views/RCTModalHostView.h +4 -2
- package/React/Views/RCTModalHostView.m +2 -0
- package/React/Views/RCTModalHostViewController.h +2 -0
- package/React/Views/RCTModalHostViewController.m +2 -0
- package/React/Views/RCTModalHostViewManager.h +2 -0
- package/React/Views/RCTModalHostViewManager.m +18 -12
- package/React/Views/RCTModalManager.h +1 -1
- package/React/Views/RCTProgressView.h +6 -6
- package/React/Views/RCTProgressView.m +1 -1
- package/React/Views/RCTProgressViewManager.m +17 -13
- package/React/Views/RCTSegmentedControl.h +6 -6
- package/React/Views/RCTSegmentedControl.m +16 -16
- package/React/Views/RCTSegmentedControlManager.m +7 -3
- package/React/Views/RCTShadowView+Internal.h +1 -1
- package/React/Views/RCTShadowView+Layout.h +1 -1
- package/React/Views/RCTShadowView.h +9 -4
- package/React/Views/RCTShadowView.m +22 -8
- package/React/Views/RCTSlider.h +14 -10
- package/React/Views/RCTSlider.m +38 -38
- package/React/Views/RCTSliderManager.m +9 -9
- package/React/Views/RCTSwitch.h +2 -11
- package/React/Views/RCTSwitch.m +0 -20
- package/React/Views/RCTSwitchManager.m +8 -12
- package/React/Views/RCTView.h +37 -15
- package/React/Views/RCTView.m +229 -187
- package/React/Views/RCTViewKeyboardEvent.h +2 -2
- package/React/Views/RCTViewKeyboardEvent.m +4 -2
- package/React/Views/RCTViewManager.h +5 -5
- package/React/Views/RCTViewManager.m +108 -83
- package/React/Views/RCTViewUtils.h +2 -3
- package/React/Views/RCTViewUtils.m +3 -3
- package/React/Views/RCTWrapperViewController.h +2 -2
- package/React/Views/RCTWrapperViewController.m +11 -10
- package/React/Views/RefreshControl/RCTRefreshControl.h +3 -1
- package/React/Views/RefreshControl/RCTRefreshControl.m +2 -0
- package/React/Views/RefreshControl/RCTRefreshControlManager.m +2 -0
- package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -3
- package/React/Views/SafeAreaView/RCTSafeAreaView.m +6 -72
- package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaViewManager.m +2 -2
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +5 -0
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +4 -0
- package/React/Views/ScrollView/RCTScrollContentShadowView.h +1 -1
- package/React/Views/ScrollView/RCTScrollContentShadowView.m +4 -4
- package/React/Views/ScrollView/RCTScrollContentView.h +5 -1
- package/React/Views/ScrollView/RCTScrollContentView.m +17 -12
- package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
- package/React/Views/ScrollView/RCTScrollEvent.m +3 -3
- package/React/Views/ScrollView/RCTScrollView.h +10 -7
- package/React/Views/ScrollView/RCTScrollView.m +178 -155
- package/React/Views/ScrollView/RCTScrollViewManager.h +2 -2
- package/React/Views/ScrollView/RCTScrollViewManager.m +28 -26
- package/React/Views/ScrollView/RCTScrollableProtocol.h +6 -6
- package/React/Views/UIView+Private.h +4 -4
- package/React/Views/UIView+React.h +13 -12
- package/React/Views/UIView+React.m +66 -55
- package/React/third-party.xcconfig +1 -1
- package/React-Core.podspec +46 -23
- package/React.podspec +1 -1
- package/ReactAndroid/Android-prebuilt.mk +17 -15
- package/ReactAndroid/README.md +3 -2
- package/ReactAndroid/build.gradle +385 -175
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +119 -0
- package/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt +31 -0
- package/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp +88 -0
- package/ReactAndroid/cmake-utils/folly-flags.cmake +22 -0
- package/ReactAndroid/external-artifacts/build.gradle +41 -0
- package/ReactAndroid/gradle.properties +22 -15
- package/ReactAndroid/hermes-engine/build.gradle +251 -0
- package/ReactAndroid/hermes-engine/gradle.properties +1 -0
- package/ReactAndroid/publish.gradle +87 -0
- package/ReactAndroid/src/main/java/com/facebook/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/debug/holder/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/BUCK +7 -27
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/BUCK +5 -22
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +14 -8
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.java +11 -1
- package/ReactAndroid/src/main/java/com/facebook/hermes/unicode/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/perftest/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/proguard/annotations/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/CompositeReactPackage.java +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/CompositeReactPackageTurboModuleManagerDelegate.java +67 -0
- package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java +2 -4
- package/ReactAndroid/src/main/java/com/facebook/react/JSEngineResolutionAlgorithm.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/LazyReactPackage.java +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +33 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +50 -70
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +21 -46
- package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +20 -13
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +140 -11
- package/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ViewManagerOnDemandReactPackage.java +2 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.java +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +6 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +131 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.java +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +338 -58
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +130 -66
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ActivityEventListener.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/AssertionException.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BackgroundExecutor.java +19 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseActivityEventListener.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +10 -19
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ColorPropConverter.java +28 -21
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultJSExceptionHandler.java +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/GuardedAsyncTask.java +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/GuardedResultAsyncTask.java +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/GuardedRunnable.java +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSExceptionHandler.java +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaOnlyMap.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleSpec.java +2 -9
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.java +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +26 -15
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactCxxErrorHandler.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNoCrashBridgeNotAllowedSoftException.java +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactSoftExceptionLogger.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.java +45 -43
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/SoftAssertions.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UiThreadUtil.java +17 -4
- package/ReactAndroid/src/main/java/com/facebook/react/common/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/common/SurfaceDelegate.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/BUCK +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/MapBuffer.kt +180 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/MapBufferSoLoader.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.kt +319 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/WritableMapBuffer.kt +172 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/network/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/config/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +47 -28
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultComponentsRegistry.kt +35 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultJSIModulePackage.kt +58 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactActivityDelegate.kt +46 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +71 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultTurboModuleManagerDelegate.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevLoadingViewController.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +47 -56
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +21 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java +325 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java +126 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/BundleLoadCallback.java +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +9 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.java +40 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/BUCK +13 -7
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.java +24 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/CoreComponentsRegistry.java +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/CppComponentRegistry.java +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/CppViewMutationsWrapper.java +47 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/DevToolsReactPerfLogger.java +233 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricComponents.java +0 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +14 -7
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +126 -44
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/GuardedFrameCallback.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/StateWrapperImpl.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/LayoutMetricsConversions.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +10 -8
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +30 -22
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +510 -35
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java +35 -24
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItem.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/BUCK +6 -25
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/HeadlessJsTaskContext.java +8 -2
- package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/module/model/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appregistry/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BUCK +5 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/bundleloader/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/common/ModuleDataCleaner.java +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK +8 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fabric/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.java +8 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.java +7 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ForwardingCookieHandler.java +12 -11
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.java +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/permissions/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/share/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/sound/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/BUCK +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/surface/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/touch/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/BUCK +9 -3
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +45 -10
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +298 -15
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerAdapter.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java +135 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerInterface.java +78 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.java +3 -14
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/GuardedFrameCallback.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.java +516 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +27 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +291 -24
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java +1 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +6 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/StateWrapper.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +58 -13
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +42 -37
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +5 -42
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +151 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +51 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerResolver.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.java +314 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java +29 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/NativeGestureUtil.java +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.java +363 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEventHelper.java +229 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/ReactEventEmitter.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/util/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/util/BUCK +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/util/JSStackTrace.java +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/util/RNLog.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayout.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK +9 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +33 -121
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/BUCK +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.java +9 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +50 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +74 -37
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +22 -12
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +112 -32
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewAccessibilityDelegate.java +154 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +34 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +14 -8
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java +10 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderEvent.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +7 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.java +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK +11 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactClickableSpan.java +3 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactFontManager.java +10 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java +23 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +107 -9
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +73 -20
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.java +60 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +91 -31
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +6 -25
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +32 -49
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK +12 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +87 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +124 -72
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/BUCK +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactMapBufferPropSetter.kt +504 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactMapBufferViewManager.kt +76 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +49 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundManager.java +10 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +67 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +17 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManagerWrapper.kt +90 -0
- package/ReactAndroid/src/main/java/com/facebook/systrace/BUCK +5 -1
- package/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java +22 -8
- package/ReactAndroid/src/main/java/com/facebook/systrace/SystraceMessage.java +61 -8
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDimension.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDirection.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaFlexDirection.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.java +35 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java +3 -2
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaLogLevel.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureMode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNative.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java +4 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +10 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaOverflow.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaPrintOptions.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaUnit.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java +2 -0
- package/ReactAndroid/src/main/jni/CMakeLists.txt +116 -0
- package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
- package/ReactAndroid/src/main/jni/first-party/fb/CMakeLists.txt +28 -0
- package/ReactAndroid/src/main/jni/first-party/fbgloginit/CMakeLists.txt +15 -0
- package/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt +13 -0
- package/ReactAndroid/src/main/jni/first-party/yogajni/CMakeLists.txt +20 -0
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedGlobalRef.h +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedLocalRef.h +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.cpp +25 -2
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/cxxcomponents/BUCK +44 -0
- package/ReactAndroid/src/main/jni/react/cxxcomponents/CMakeLists.txt +22 -0
- package/ReactAndroid/src/main/jni/react/cxxcomponents/Component.h +66 -0
- package/ReactAndroid/src/main/jni/react/cxxcomponents/ComponentManager.h +26 -0
- package/ReactAndroid/src/main/jni/react/fabric/AsyncEventBeat.cpp +69 -0
- package/ReactAndroid/src/main/jni/react/fabric/AsyncEventBeat.h +39 -0
- package/ReactAndroid/src/main/jni/react/fabric/BUCK +56 -0
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +633 -0
- package/ReactAndroid/src/main/jni/react/fabric/Binding.h +157 -0
- package/ReactAndroid/src/main/jni/react/fabric/CMakeLists.txt +71 -0
- package/ReactAndroid/src/main/jni/react/fabric/ComponentRegistryResolver.cpp +51 -0
- package/ReactAndroid/src/main/jni/react/fabric/ComponentRegistryResolver.h +47 -0
- package/ReactAndroid/src/main/jni/react/fabric/CppComponentRegistry.cpp +73 -0
- package/ReactAndroid/src/main/jni/react/fabric/CppComponentRegistry.h +64 -0
- package/ReactAndroid/src/main/jni/react/fabric/CppViewMutationsWrapper.cpp +100 -0
- package/ReactAndroid/src/main/jni/react/fabric/CppViewMutationsWrapper.h +39 -0
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp +60 -0
- package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h +39 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountItem.cpp +66 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountItem.h +89 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +1014 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h +84 -0
- package/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.cpp +30 -0
- package/ReactAndroid/src/main/jni/react/fabric/JBackgroundExecutor.h +27 -0
- package/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.cpp +18 -0
- package/ReactAndroid/src/main/jni/react/fabric/JFabricUIManager.h +25 -0
- package/ReactAndroid/src/main/jni/react/fabric/OnLoad.cpp +30 -0
- package/ReactAndroid/src/main/jni/react/fabric/ReactNativeConfigHolder.cpp +41 -0
- package/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.cpp +62 -0
- package/ReactAndroid/src/main/jni/react/fabric/StateWrapperImpl.h +42 -0
- package/ReactAndroid/src/main/jni/react/fabric/viewPropConversions.h +215 -0
- package/ReactAndroid/src/main/jni/react/hermes/.clang-tidy +6 -0
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/BUCK +27 -0
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/CMakeLists.txt +31 -0
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/BUCK +19 -0
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +32 -0
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp +131 -0
- package/ReactAndroid/src/main/jni/react/jni/BUCK +6 -4
- package/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +44 -0
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +74 -60
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +2 -10
- package/ReactAndroid/src/main/jni/react/jni/JCallback.h +7 -0
- package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp +5 -7
- package/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp +10 -0
- package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h +3 -1
- package/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp +10 -0
- package/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h +1 -1
- package/ReactAndroid/src/main/jni/react/jscexecutor/BUCK +22 -0
- package/ReactAndroid/src/main/jni/react/jscexecutor/CMakeLists.txt +36 -0
- package/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp +85 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/BUCK +30 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/CMakeLists.txt +34 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/.clang-tidy +3 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp +43 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h +40 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JWritableMapBuffer.cpp +65 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JWritableMapBuffer.h +23 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/OnLoad.cpp +16 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/CMakeLists.txt +22 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +70 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.h +47 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp +60 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h +53 -0
- package/ReactAndroid/src/main/jni/react/newarchdefaults/OnLoad.cpp +18 -0
- package/ReactAndroid/src/main/jni/react/perftests/BUCK +0 -1
- package/ReactAndroid/src/main/jni/react/reactnativeblob/BUCK +19 -0
- package/ReactAndroid/src/main/jni/react/reactnativeblob/CMakeLists.txt +22 -0
- package/ReactAndroid/src/main/jni/react/reactperflogger/BUCK +31 -0
- package/ReactAndroid/src/main/jni/react/reactperflogger/CMakeLists.txt +24 -0
- package/ReactAndroid/src/main/jni/react/reactperflogger/reactperflogger/.clang-tidy +6 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/BUCK +69 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/CMakeLists.txt +63 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.cpp +59 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/CompositeTurboModuleManagerDelegate.h +49 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/OnLoad.cpp +35 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +194 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManagerDelegate.h +37 -0
- package/ReactAndroid/src/main/jni/react/uimanager/BUCK +36 -0
- package/ReactAndroid/src/main/jni/react/uimanager/CMakeLists.txt +26 -0
- package/ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt +22 -0
- package/ReactAndroid/src/main/jni/third-party/double-conversion/CMakeLists.txt +23 -0
- package/ReactAndroid/src/main/jni/third-party/fmt/CMakeLists.txt +13 -0
- package/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +126 -0
- package/ReactAndroid/src/main/jni/third-party/glog/CMakeLists.txt +35 -0
- package/ReactAndroid/src/main/jni/third-party/jsc/CMakeLists.txt +15 -0
- package/ReactAndroid/src/main/jni/third-party/libevent/CMakeLists.txt +42 -0
- package/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK +1 -0
- package/ReactAndroid/src/main/libraries/fbjni/BUCK +1 -1
- package/ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK +7 -6
- package/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK +5 -5
- package/ReactAndroid/src/main/res/shell/values/styles.xml +3 -2
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +18 -15
- package/ReactCommon/React-Fabric.podspec +17 -6
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +27 -5
- package/ReactCommon/butter/BUCK +7 -3
- package/ReactCommon/butter/CMakeLists.txt +22 -0
- package/ReactCommon/callinvoker/BUCK +4 -1
- package/ReactCommon/callinvoker/CMakeLists.txt +19 -0
- package/ReactCommon/callinvoker/React-callinvoker.podspec +2 -2
- package/ReactCommon/cxxreact/BUCK +31 -14
- package/ReactCommon/cxxreact/CMakeLists.txt +29 -0
- package/ReactCommon/cxxreact/CxxNativeModule.cpp +33 -25
- package/ReactCommon/cxxreact/Instance.cpp +0 -35
- package/ReactCommon/cxxreact/Instance.h +0 -3
- package/ReactCommon/cxxreact/JSBigString.h +2 -2
- package/ReactCommon/cxxreact/JSBundleType.cpp +13 -8
- package/ReactCommon/cxxreact/JSBundleType.h +18 -11
- package/ReactCommon/cxxreact/JSExecutor.h +1 -1
- package/ReactCommon/cxxreact/ModuleRegistry.cpp +1 -1
- package/ReactCommon/cxxreact/NativeToJsBridge.cpp +2 -2
- package/ReactCommon/cxxreact/React-cxxreact.podspec +6 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -6
- package/ReactCommon/cxxreact/SampleCxxModule.cpp +1 -1
- package/ReactCommon/cxxreact/SystraceSection.h +11 -1
- package/ReactCommon/cxxreact/tests/BUCK +6 -48
- package/ReactCommon/cxxreact/tests/jsarg_helpers.cpp +3 -4
- package/ReactCommon/cxxreact/tests/jsbigstring.cpp +0 -43
- package/ReactCommon/cxxreact/tests/main.cpp +15 -0
- package/ReactCommon/cxxreact/tests/methodcall.cpp +1 -2
- package/ReactCommon/hermes/React-hermes.podspec +11 -8
- package/ReactCommon/hermes/executor/CMakeLists.txt +30 -0
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +42 -24
- package/ReactCommon/hermes/executor/HermesExecutorFactory.h +9 -1
- package/ReactCommon/hermes/inspector/BUCK +5 -5
- package/ReactCommon/hermes/inspector/CMakeLists.txt +32 -0
- package/ReactCommon/hermes/inspector/Exceptions.h +6 -0
- package/ReactCommon/hermes/inspector/Inspector.cpp +6 -3
- package/ReactCommon/hermes/inspector/Inspector.h +14 -0
- package/ReactCommon/hermes/inspector/InspectorState.cpp +16 -8
- package/ReactCommon/hermes/inspector/RuntimeAdapter.cpp +3 -8
- package/ReactCommon/hermes/inspector/RuntimeAdapter.h +5 -10
- package/ReactCommon/hermes/inspector/chrome/Connection.cpp +462 -4
- package/ReactCommon/hermes/inspector/chrome/Connection.h +1 -1
- package/ReactCommon/hermes/inspector/chrome/ConnectionDemux.cpp +8 -19
- package/ReactCommon/hermes/inspector/chrome/ConnectionDemux.h +3 -2
- package/ReactCommon/hermes/inspector/chrome/MessageConverters.cpp +10 -0
- package/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +371 -12
- package/ReactCommon/hermes/inspector/chrome/MessageTypes.h +188 -2
- package/ReactCommon/hermes/inspector/chrome/Registration.cpp +4 -4
- package/ReactCommon/hermes/inspector/chrome/Registration.h +9 -5
- package/ReactCommon/hermes/inspector/chrome/cli/main.cpp +5 -3
- package/ReactCommon/hermes/inspector/chrome/tests/AsyncHermesRuntime.cpp +21 -0
- package/ReactCommon/hermes/inspector/chrome/tests/AsyncHermesRuntime.h +27 -0
- package/ReactCommon/hermes/inspector/chrome/tests/ConnectionDemuxTests.cpp +3 -5
- package/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp +346 -7
- package/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +1071 -1
- package/ReactCommon/hermes/inspector/chrome/tests/SyncConnection.cpp +1 -3
- package/ReactCommon/hermes/inspector/tests/InspectorTests.cpp +1 -3
- package/ReactCommon/hermes/inspector/tools/message_types.txt +6 -0
- package/ReactCommon/hermes/inspector/tools/run_msggen +20 -13
- package/ReactCommon/jsc/.clang-tidy +6 -0
- package/ReactCommon/jsc/BUCK +34 -0
- package/ReactCommon/jsc/CMakeLists.txt +35 -0
- package/ReactCommon/jsc/JSCRuntime.cpp +1559 -0
- package/ReactCommon/jsc/React-jsc.podspec +37 -0
- package/ReactCommon/jserrorhandler/BUCK +30 -0
- package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +107 -0
- package/ReactCommon/jserrorhandler/JsErrorHandler.h +39 -0
- package/ReactCommon/jsi/BUCK +9 -31
- package/ReactCommon/jsi/CMakeLists.txt +27 -0
- package/ReactCommon/jsi/React-jsi.podspec +22 -19
- package/ReactCommon/jsi/jsi/JSIDynamic.cpp +7 -2
- package/ReactCommon/jsi/jsi/decorator.h +47 -0
- package/ReactCommon/jsi/jsi/jsi-inl.h +35 -2
- package/ReactCommon/jsi/jsi/jsi.cpp +55 -8
- package/ReactCommon/jsi/jsi/jsi.h +182 -5
- package/ReactCommon/jsi/jsi/jsilib.h +1 -1
- package/ReactCommon/jsi/jsi/test/testlib.cpp +3 -1
- package/ReactCommon/jsiexecutor/BUCK +4 -2
- package/ReactCommon/jsiexecutor/CMakeLists.txt +23 -0
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +7 -3
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +2 -7
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +0 -2
- package/ReactCommon/jsinspector/BUCK +6 -2
- package/ReactCommon/jsinspector/CMakeLists.txt +14 -0
- package/ReactCommon/jsinspector/React-jsinspector.podspec +1 -1
- package/ReactCommon/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK +2 -0
- package/ReactCommon/logger/BUCK +4 -1
- package/ReactCommon/logger/CMakeLists.txt +16 -0
- package/ReactCommon/logger/React-logger.podspec +2 -2
- package/ReactCommon/react/bridging/AString.h +42 -0
- package/ReactCommon/react/bridging/Array.h +127 -0
- package/ReactCommon/react/bridging/BUCK +57 -0
- package/ReactCommon/react/bridging/Base.h +153 -0
- package/ReactCommon/react/bridging/Bool.h +25 -0
- package/ReactCommon/react/bridging/Bridging.h +19 -0
- package/ReactCommon/react/bridging/CMakeLists.txt +24 -0
- package/ReactCommon/react/bridging/CallbackWrapper.h +103 -0
- package/ReactCommon/react/bridging/Class.h +92 -0
- package/ReactCommon/react/bridging/Convert.h +162 -0
- package/ReactCommon/react/bridging/Error.h +51 -0
- package/ReactCommon/react/bridging/Function.h +214 -0
- package/ReactCommon/react/bridging/LongLivedObject.cpp +58 -0
- package/ReactCommon/react/bridging/LongLivedObject.h +58 -0
- package/ReactCommon/react/bridging/Number.h +47 -0
- package/ReactCommon/react/bridging/Object.h +100 -0
- package/ReactCommon/react/bridging/Promise.h +102 -0
- package/ReactCommon/react/bridging/Value.h +107 -0
- package/ReactCommon/react/bridging/tests/BridgingTest.cpp +520 -0
- package/ReactCommon/react/bridging/tests/BridgingTest.h +77 -0
- package/ReactCommon/react/bridging/tests/ClassTest.cpp +97 -0
- package/ReactCommon/react/config/BUCK +4 -3
- package/ReactCommon/react/config/CMakeLists.txt +21 -0
- package/ReactCommon/react/debug/BUCK +6 -4
- package/ReactCommon/react/debug/CMakeLists.txt +24 -0
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- package/ReactCommon/react/nativemodule/core/BUCK +7 -5
- package/ReactCommon/react/nativemodule/core/CMakeLists.txt +39 -0
- package/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h +11 -0
- package/ReactCommon/react/nativemodule/core/ReactCommon/LongLivedObject.h +2 -48
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp +35 -18
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h +4 -2
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp +14 -18
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +40 -6
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +46 -61
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h +11 -12
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +1 -83
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +91 -145
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h +5 -22
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.h +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm +3 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.h +2 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +23 -9
- package/ReactCommon/react/nativemodule/samples/BUCK +5 -1
- package/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt +27 -0
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp +39 -12
- package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h +1 -1
- package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.mm +4 -4
- package/ReactCommon/react/renderer/.clang-tidy +144 -0
- package/ReactCommon/react/renderer/animations/BUCK +4 -6
- package/ReactCommon/react/renderer/animations/CMakeLists.txt +39 -0
- package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +4 -6
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +51 -41
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
- package/ReactCommon/react/renderer/animations/conversions.h +11 -11
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +8 -11
- package/ReactCommon/react/renderer/animations/utils.cpp +2 -4
- package/ReactCommon/react/renderer/attributedstring/AttributedString.cpp +22 -5
- package/ReactCommon/react/renderer/attributedstring/AttributedString.h +13 -1
- package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.cpp +2 -4
- package/ReactCommon/react/renderer/attributedstring/BUCK +6 -5
- package/ReactCommon/react/renderer/attributedstring/CMakeLists.txt +36 -0
- package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +2 -4
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +30 -20
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +17 -14
- package/ReactCommon/react/renderer/attributedstring/conversions.h +147 -11
- package/ReactCommon/react/renderer/attributedstring/primitives.h +30 -0
- package/ReactCommon/react/renderer/attributedstring/tests/AttributedStringBoxTest.cpp +2 -4
- package/ReactCommon/react/renderer/attributedstring/tests/ParagraphAttributesTest.cpp +2 -4
- package/ReactCommon/react/renderer/componentregistry/BUCK +4 -8
- package/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +31 -0
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.cpp +3 -5
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h +1 -1
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +7 -14
- package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h +3 -2
- package/ReactCommon/react/renderer/componentregistry/componentNameByReactViewName.cpp +2 -4
- package/ReactCommon/react/renderer/componentregistry/native/BUCK +4 -7
- package/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt +31 -0
- package/ReactCommon/react/renderer/componentregistry/native/NativeComponentRegistryBinding.cpp +5 -7
- package/ReactCommon/react/renderer/components/image/BUCK +4 -4
- package/ReactCommon/react/renderer/components/image/CMakeLists.txt +36 -0
- package/ReactCommon/react/renderer/components/image/ImageEventEmitter.cpp +2 -4
- package/ReactCommon/react/renderer/components/image/ImageProps.cpp +82 -41
- package/ReactCommon/react/renderer/components/image/ImageProps.h +13 -7
- package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/image/ImageState.cpp +2 -4
- package/ReactCommon/react/renderer/components/inputaccessory/BUCK +4 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/BUCK +6 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +16 -5
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +7 -4
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +19 -14
- package/ReactCommon/react/renderer/components/modal/BUCK +5 -4
- package/ReactCommon/react/renderer/components/modal/CMakeLists.txt +38 -0
- package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +1 -1
- package/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.cpp +2 -4
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +1 -1
- package/ReactCommon/react/renderer/components/progressbar/BUCK +5 -5
- package/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt +41 -0
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp +2 -4
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp +3 -5
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +1 -1
- package/ReactCommon/react/renderer/components/root/BUCK +4 -5
- package/ReactCommon/react/renderer/components/root/CMakeLists.txt +33 -0
- package/ReactCommon/react/renderer/components/root/RootProps.cpp +4 -6
- package/ReactCommon/react/renderer/components/root/RootShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/safeareaview/BUCK +4 -1
- package/ReactCommon/react/renderer/components/scrollview/BUCK +5 -5
- package/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt +35 -0
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.cpp +4 -6
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +1 -1
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp +342 -202
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +6 -0
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewState.cpp +2 -4
- package/ReactCommon/react/renderer/components/slider/BUCK +5 -4
- package/ReactCommon/react/renderer/components/slider/CMakeLists.txt +45 -0
- package/ReactCommon/react/renderer/components/slider/SliderShadowNode.cpp +3 -5
- package/ReactCommon/react/renderer/components/slider/SliderState.cpp +2 -4
- package/ReactCommon/react/renderer/components/slider/platform/android/react/renderer/components/slider/SliderMeasurementsManager.cpp +2 -4
- package/ReactCommon/react/renderer/components/switch/BUCK +4 -9
- package/ReactCommon/react/renderer/components/switch/CMakeLists.txt +46 -0
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.cpp +2 -4
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.cpp +3 -5
- package/ReactCommon/react/renderer/components/text/BUCK +4 -6
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +135 -22
- package/ReactCommon/react/renderer/components/text/BaseTextProps.h +6 -0
- package/ReactCommon/react/renderer/components/text/BaseTextShadowNode.cpp +4 -6
- package/ReactCommon/react/renderer/components/text/CMakeLists.txt +40 -0
- package/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.cpp +2 -4
- package/ReactCommon/react/renderer/components/text/ParagraphProps.cpp +103 -21
- package/ReactCommon/react/renderer/components/text/ParagraphProps.h +9 -3
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +5 -6
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/text/ParagraphState.cpp +2 -4
- package/ReactCommon/react/renderer/components/text/ParagraphState.h +9 -0
- package/ReactCommon/react/renderer/components/text/RawTextProps.cpp +2 -4
- package/ReactCommon/react/renderer/components/text/RawTextShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/text/TextProps.cpp +11 -4
- package/ReactCommon/react/renderer/components/text/TextProps.h +6 -0
- package/ReactCommon/react/renderer/components/text/TextShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/text/conversions.h +1 -9
- package/ReactCommon/react/renderer/components/textinput/BUCK +5 -6
- package/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +47 -0
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +229 -72
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h +65 -59
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +9 -11
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp +24 -4
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h +1 -3
- package/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK +7 -10
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputEventEmitter.cpp +2 -4
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputEventEmitter.h +2 -2
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +12 -5
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +7 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.cpp +4 -6
- package/ReactCommon/react/renderer/components/textinput/iostextinput/conversions.h +20 -0
- package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +13 -6
- package/ReactCommon/react/renderer/components/textinput/iostextinput/propsConversions.h +4 -4
- package/ReactCommon/react/renderer/components/unimplementedview/BUCK +4 -9
- package/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt +34 -0
- package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.cpp +2 -4
- package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.cpp +2 -4
- package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.cpp +2 -4
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +41 -6
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +223 -95
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +17 -1
- package/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.cpp +168 -0
- package/ReactCommon/react/renderer/components/view/AccessibilityPropsMapBuffer.h +33 -0
- package/ReactCommon/react/renderer/components/view/BUCK +7 -6
- package/ReactCommon/react/renderer/components/view/CMakeLists.txt +33 -0
- package/ReactCommon/react/renderer/components/view/PointerEvent.cpp +48 -0
- package/ReactCommon/react/renderer/components/view/PointerEvent.h +125 -0
- package/ReactCommon/react/renderer/components/view/Touch.cpp +8 -5
- package/ReactCommon/react/renderer/components/view/Touch.h +28 -1
- package/ReactCommon/react/renderer/components/view/TouchEvent.cpp +3 -5
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.cpp +122 -6
- package/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +16 -1
- package/ReactCommon/react/renderer/components/view/ViewEventEmitter.cpp +3 -5
- package/ReactCommon/react/renderer/components/view/ViewEventEmitter.h +1 -1
- package/ReactCommon/react/renderer/components/view/ViewProps.cpp +345 -144
- package/ReactCommon/react/renderer/components/view/ViewProps.h +30 -7
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +8 -6
- package/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.cpp +202 -0
- package/ReactCommon/react/renderer/components/view/ViewPropsMapBuffer.h +56 -0
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +32 -8
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.h +13 -1
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +46 -36
- package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +123 -7
- package/ReactCommon/react/renderer/components/view/YogaStylableProps.h +14 -2
- package/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.cpp +87 -0
- package/ReactCommon/react/renderer/components/view/YogaStylablePropsMapBuffer.h +24 -0
- package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +33 -0
- package/ReactCommon/react/renderer/components/view/conversions.h +28 -8
- package/ReactCommon/react/renderer/components/view/primitives.h +113 -3
- package/ReactCommon/react/renderer/components/view/propsConversions.h +248 -1
- package/ReactCommon/react/renderer/components/view/tests/LayoutTest.cpp +203 -28
- package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +5 -7
- package/ReactCommon/react/renderer/components/view/viewPropConversions.h +198 -0
- package/ReactCommon/react/renderer/core/BUCK +11 -11
- package/ReactCommon/react/renderer/core/BatchedEventQueue.cpp +2 -4
- package/ReactCommon/react/renderer/core/CMakeLists.txt +30 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.cpp +2 -4
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +35 -8
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +4 -3
- package/ReactCommon/react/renderer/core/CoreFeatures.cpp +17 -0
- package/ReactCommon/react/renderer/core/CoreFeatures.h +31 -0
- package/ReactCommon/react/renderer/core/DynamicPropsUtilities.cpp +2 -4
- package/ReactCommon/react/renderer/core/EventBeat.cpp +2 -4
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +23 -4
- package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +18 -17
- package/ReactCommon/react/renderer/core/EventEmitter.h +5 -6
- package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
- package/ReactCommon/react/renderer/core/EventListener.h +44 -0
- package/ReactCommon/react/renderer/core/EventQueue.cpp +3 -5
- package/ReactCommon/react/renderer/core/EventQueueProcessor.cpp +2 -4
- package/ReactCommon/react/renderer/core/EventTarget.cpp +3 -5
- package/ReactCommon/react/renderer/core/LayoutConstraints.cpp +2 -4
- package/ReactCommon/react/renderer/core/LayoutMetrics.cpp +3 -5
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +96 -18
- package/ReactCommon/react/renderer/core/Props.cpp +31 -14
- package/ReactCommon/react/renderer/core/Props.h +27 -14
- package/ReactCommon/react/renderer/core/PropsMacros.h +108 -0
- package/ReactCommon/react/renderer/core/PropsMapBuffer.cpp +37 -0
- package/ReactCommon/react/renderer/core/PropsMapBuffer.h +23 -0
- package/ReactCommon/react/renderer/core/RawEvent.cpp +2 -4
- package/ReactCommon/react/renderer/core/RawProps.cpp +12 -6
- package/ReactCommon/react/renderer/core/RawProps.h +11 -2
- package/ReactCommon/react/renderer/core/RawPropsKey.cpp +5 -7
- package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +2 -4
- package/ReactCommon/react/renderer/core/RawPropsParser.cpp +72 -10
- package/ReactCommon/react/renderer/core/RawPropsParser.h +9 -1
- package/ReactCommon/react/renderer/core/RawPropsPrimitives.h +2 -0
- package/ReactCommon/react/renderer/core/RawValue.h +12 -14
- package/ReactCommon/react/renderer/core/Sealable.cpp +4 -6
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +14 -12
- package/ReactCommon/react/renderer/core/ShadowNode.h +17 -21
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.cpp +3 -5
- package/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.cpp +2 -4
- package/ReactCommon/react/renderer/core/ShadowNodeFragment.cpp +2 -4
- package/ReactCommon/react/renderer/core/ShadowNodeTraits.cpp +1 -3
- package/ReactCommon/react/renderer/core/ShadowNodeTraits.h +18 -13
- package/ReactCommon/react/renderer/core/State.cpp +2 -4
- package/ReactCommon/react/renderer/core/UnbatchedEventQueue.cpp +2 -4
- package/ReactCommon/react/renderer/core/propsConversions.h +42 -30
- package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +9 -9
- package/ReactCommon/react/renderer/core/tests/EventQueueProcessorTest.cpp +3 -3
- package/ReactCommon/react/renderer/core/tests/FindNodeAtPointTest.cpp +10 -12
- package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +375 -3
- package/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp +2 -2
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +4 -4
- package/ReactCommon/react/renderer/core/tests/TestComponent.h +4 -2
- package/ReactCommon/react/renderer/core/tests/benchmarks/RawPropsBenchmark.cpp +2 -4
- package/ReactCommon/react/renderer/debug/BUCK +4 -4
- package/ReactCommon/react/renderer/debug/CMakeLists.txt +22 -0
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +6 -8
- package/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.cpp +2 -4
- package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
- package/ReactCommon/react/renderer/element/BUCK +4 -1
- package/ReactCommon/react/renderer/element/ComponentBuilder.cpp +2 -4
- package/ReactCommon/react/renderer/element/tests/ElementTest.cpp +3 -3
- package/ReactCommon/react/renderer/graphics/BUCK +5 -5
- package/ReactCommon/react/renderer/graphics/CMakeLists.txt +32 -0
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +2 -2
- package/ReactCommon/react/renderer/graphics/RectangleEdges.h +5 -0
- package/ReactCommon/react/renderer/graphics/Transform.cpp +51 -17
- package/ReactCommon/react/renderer/graphics/Transform.h +29 -8
- package/ReactCommon/react/renderer/graphics/conversions.h +1 -11
- package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h +11 -23
- package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.cpp +4 -6
- package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
- package/ReactCommon/react/renderer/graphics/tests/TransformTest.cpp +7 -0
- package/ReactCommon/react/renderer/imagemanager/BUCK +15 -31
- package/ReactCommon/react/renderer/imagemanager/CMakeLists.txt +41 -0
- package/ReactCommon/react/renderer/imagemanager/ImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/ImageResponse.cpp +2 -4
- package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp +2 -4
- package/ReactCommon/react/renderer/imagemanager/ImageTelemetry.cpp +2 -4
- package/ReactCommon/react/renderer/imagemanager/platform/cxx/react/renderer/imagemanager/ImageManager.cpp +6 -7
- package/ReactCommon/react/renderer/imagemanager/platform/cxx/react/renderer/imagemanager/ImageRequest.cpp +2 -4
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.mm +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +15 -17
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.mm +1 -1
- package/ReactCommon/react/renderer/leakchecker/BUCK +4 -1
- package/ReactCommon/react/renderer/leakchecker/CMakeLists.txt +25 -0
- package/ReactCommon/react/renderer/leakchecker/LeakChecker.cpp +4 -6
- package/ReactCommon/react/renderer/leakchecker/LeakChecker.h +1 -1
- package/ReactCommon/react/renderer/leakchecker/WeakFamilyRegistry.cpp +3 -6
- package/ReactCommon/react/renderer/mapbuffer/BUCK +8 -6
- package/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt +22 -0
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +28 -5
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +10 -8
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +35 -4
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +5 -0
- package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +25 -0
- package/ReactCommon/react/renderer/mounting/BUCK +5 -5
- package/ReactCommon/react/renderer/mounting/CMakeLists.txt +38 -0
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +50 -97
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +6 -8
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +4 -4
- package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
- package/ReactCommon/react/renderer/mounting/MountingTransaction.cpp +3 -5
- package/ReactCommon/react/renderer/mounting/MountingTransaction.h +2 -2
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +12 -11
- package/ReactCommon/react/renderer/mounting/ShadowTree.h +4 -4
- package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.cpp +2 -4
- package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
- package/ReactCommon/react/renderer/mounting/ShadowView.cpp +5 -6
- package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +40 -13
- package/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +39 -6
- package/ReactCommon/react/renderer/mounting/StubView.cpp +4 -6
- package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
- package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +8 -5
- package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +9 -14
- package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
- package/ReactCommon/react/renderer/mounting/stubs.cpp +2 -4
- package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +131 -123
- package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +6 -8
- package/ReactCommon/react/renderer/mounting/tests/StackingContextTest.cpp +3 -5
- package/ReactCommon/react/renderer/mounting/tests/StateReconciliationTest.cpp +6 -6
- package/ReactCommon/react/renderer/runtimescheduler/BUCK +5 -1
- package/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +28 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +44 -40
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +16 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +22 -9
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.cpp +2 -4
- package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +6 -8
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +4 -3
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +88 -62
- package/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h +9 -0
- package/ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.cpp +1 -1
- package/ReactCommon/react/renderer/scheduler/BUCK +4 -5
- package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +41 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +48 -33
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +11 -5
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +0 -8
- package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +7 -0
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +10 -9
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +1 -1
- package/ReactCommon/react/renderer/scheduler/SurfaceManager.cpp +2 -4
- package/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.cpp +3 -5
- package/ReactCommon/react/renderer/telemetry/BUCK +4 -5
- package/ReactCommon/react/renderer/telemetry/CMakeLists.txt +34 -0
- package/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.cpp +2 -4
- package/ReactCommon/react/renderer/telemetry/TransactionTelemetry.cpp +2 -4
- package/ReactCommon/react/renderer/templateprocessor/BUCK +6 -5
- package/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt +33 -0
- package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.cpp +8 -10
- package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h +3 -3
- package/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp +8 -9
- package/ReactCommon/react/renderer/textlayoutmanager/BUCK +4 -5
- package/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt +52 -0
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.cpp +2 -4
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +4 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +144 -76
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +14 -13
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +0 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h +0 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +169 -25
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm +4 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +51 -28
- package/ReactCommon/react/renderer/timeline/BUCK +2 -5
- package/ReactCommon/react/renderer/timeline/Timeline.cpp +7 -8
- package/ReactCommon/react/renderer/timeline/TimelineController.cpp +3 -5
- package/ReactCommon/react/renderer/timeline/TimelineFrame.cpp +2 -4
- package/ReactCommon/react/renderer/timeline/TimelineHandler.cpp +3 -5
- package/ReactCommon/react/renderer/timeline/TimelineHandler.h +2 -2
- package/ReactCommon/react/renderer/timeline/TimelineSnapshot.cpp +2 -4
- package/ReactCommon/react/renderer/uimanager/BUCK +5 -5
- package/ReactCommon/react/renderer/uimanager/CMakeLists.txt +39 -0
- package/ReactCommon/react/renderer/uimanager/LayoutAnimationStatusDelegate.h +2 -0
- package/ReactCommon/react/renderer/uimanager/SurfaceRegistryBinding.cpp +66 -24
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +22 -26
- package/ReactCommon/react/renderer/uimanager/UIManager.h +12 -15
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +58 -61
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +1 -7
- package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +0 -9
- package/ReactCommon/react/renderer/uimanager/primitives.h +7 -7
- package/ReactCommon/react/test_utils/BUCK +4 -1
- package/ReactCommon/react/test_utils/MockSurfaceHandler.h +2 -2
- package/ReactCommon/react/test_utils/shadowTreeGeneration.h +7 -1
- package/ReactCommon/react/utils/BUCK +5 -6
- package/ReactCommon/react/utils/CMakeLists.txt +26 -0
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +5 -1
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/react/utils/Telemetry.h +2 -2
- package/ReactCommon/reactperflogger/BUCK +6 -3
- package/ReactCommon/reactperflogger/CMakeLists.txt +20 -0
- package/ReactCommon/reactperflogger/React-perflogger.podspec +2 -2
- package/ReactCommon/runtimeexecutor/BUCK +4 -1
- package/ReactCommon/runtimeexecutor/CMakeLists.txt +23 -0
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +2 -2
- package/ReactCommon/yoga/CMakeLists.txt +22 -0
- package/ReactCommon/yoga/Yoga.podspec +3 -3
- package/ReactCommon/yoga/yoga/BitUtils.h +4 -0
- package/ReactCommon/yoga/yoga/CompactValue.h +53 -29
- package/ReactCommon/yoga/yoga/Utils.cpp +4 -0
- package/ReactCommon/yoga/yoga/Utils.h +5 -0
- package/ReactCommon/yoga/yoga/YGConfig.h +5 -0
- package/ReactCommon/yoga/yoga/YGEnums.cpp +14 -0
- package/ReactCommon/yoga/yoga/YGEnums.h +31 -52
- package/ReactCommon/yoga/yoga/YGFloatOptional.h +4 -0
- package/ReactCommon/yoga/yoga/YGLayout.h +5 -0
- package/ReactCommon/yoga/yoga/YGMacros.h +43 -0
- package/ReactCommon/yoga/yoga/YGNode.cpp +33 -0
- package/ReactCommon/yoga/yoga/YGNode.h +11 -0
- package/ReactCommon/yoga/yoga/YGNodePrint.cpp +14 -0
- package/ReactCommon/yoga/yoga/YGNodePrint.h +7 -0
- package/ReactCommon/yoga/yoga/YGStyle.cpp +1 -1
- package/ReactCommon/yoga/yoga/YGStyle.h +5 -0
- package/ReactCommon/yoga/yoga/Yoga-internal.h +5 -0
- package/ReactCommon/yoga/yoga/Yoga.cpp +82 -30
- package/ReactCommon/yoga/yoga/Yoga.h +7 -0
- package/ReactCommon/yoga/yoga/event/event.h +3 -0
- package/ReactCommon/yoga/yoga/log.h +4 -0
- package/android/README.md +21 -0
- package/build.gradle.kts +131 -0
- package/flow/JSITimerInternalType.js +30 -0
- package/flow/jest.js +2 -2
- package/flow/use-sync-external-store.js +19 -0
- package/flow-typed/npm/react-dom_v17.x.x.js +139 -0
- package/flow-typed/npm/yargs_v17.x.x.js +341 -0
- package/gradle.properties +12 -0
- package/index.js +112 -85
- package/interface.js +8 -0
- package/jest/assetFileTransformer.js +3 -2
- package/jest/react-native-env.js +18 -0
- package/jest/renderer.js +2 -2
- package/jest/setup.js +11 -9
- package/jest-preset.js +1 -1
- package/local-cli/generator-common/index.js +258 -19
- package/local-cli/generator-macos/index.js +0 -2
- package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/AppDelegate.h +1 -1
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
- package/local-cli/generator-macos/templates/macos/Podfile +1 -1
- package/package.json +90 -65
- package/react-native.config.js +1 -3
- package/react.gradle +70 -26
- package/scripts/cocoapods/codegen.rb +106 -0
- package/scripts/cocoapods/codegen_script_phase_extractor.rb +13 -0
- package/scripts/cocoapods/codegen_utils.rb +331 -0
- package/scripts/cocoapods/fabric.rb +16 -0
- package/scripts/cocoapods/flipper.rb +118 -0
- package/scripts/cocoapods/helpers.rb +28 -0
- package/scripts/cocoapods/jsengine.rb +81 -0
- package/scripts/cocoapods/local_podspec_patch.rb +51 -0
- package/scripts/cocoapods/new_architecture.rb +101 -0
- package/scripts/cocoapods/utils.rb +188 -0
- package/scripts/codegen/codegen-utils.js +37 -0
- package/scripts/codegen/generate-artifacts-executor.js +573 -0
- package/scripts/codegen/generate-specs-cli-executor.js +127 -0
- package/scripts/compose-source-maps.js +1 -0
- package/scripts/find-node-for-xcode.sh +80 -0
- package/scripts/generate-codegen-artifacts.js +72 -0
- package/scripts/generate-specs-cli.js +3 -88
- package/scripts/hermes/hermes-utils.js +321 -0
- package/scripts/hermes/prepare-hermes-for-build.js +46 -0
- package/scripts/ios-configure-glog.sh +3 -2
- package/scripts/launchPackager.command +4 -0
- package/scripts/native_modules.rb +6 -0
- package/scripts/react-native-xcode.sh +25 -23
- package/scripts/react_native_pods.rb +165 -468
- package/scripts/react_native_pods_utils/script_phases.rb +2 -2
- package/scripts/react_native_pods_utils/script_phases.sh +18 -21
- package/scripts/update-ruby.sh +10 -28
- package/scripts/xcode/with-environment.sh +47 -0
- package/sdks/.hermesversion +1 -0
- package/sdks/hermes-engine/hermes-engine.podspec +143 -0
- package/sdks/hermes-engine/hermes-utils.rb +26 -0
- package/sdks/hermes-engine/utils/build-apple-framework.sh +151 -0
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +65 -0
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +22 -0
- package/sdks/hermes-engine/utils/build-ios-framework.sh +21 -0
- package/sdks/hermes-engine/utils/build-mac-framework.sh +17 -0
- package/sdks/hermes-engine/utils/copy-hermes-xcode.sh +22 -0
- package/settings.gradle.kts +34 -0
- package/template/App.tsx +118 -0
- package/template/Gemfile +2 -2
- package/template/_gitignore +11 -9
- package/template/_node-version +1 -0
- package/template/android/app/build.gradle +65 -214
- package/template/android/app/src/debug/java/com/helloworld/ReactNativeFlipper.java +4 -2
- package/template/android/app/src/main/AndroidManifest.xml +1 -2
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +13 -18
- package/template/android/app/src/main/java/com/helloworld/MainApplication.java +18 -47
- package/template/android/app/src/release/java/com/helloworld/ReactNativeFlipper.java +20 -0
- package/template/android/build.gradle +6 -38
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/android/gradle.properties +4 -0
- package/template/android/gradlew.bat +89 -89
- package/template/android/settings.gradle +0 -5
- package/template/ios/HelloWorld/AppDelegate.h +2 -4
- package/template/ios/HelloWorld/AppDelegate.mm +12 -84
- package/template/ios/HelloWorld/Info.plist +2 -2
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +9 -5
- package/template/ios/HelloWorldTests/HelloWorldTests.m +1 -0
- package/template/ios/Podfile +33 -10
- package/template/ios/_xcode.env +11 -0
- package/template/package.json +19 -12
- package/template/tsconfig.json +3 -0
- package/third-party-podspecs/DoubleConversion.podspec +1 -1
- package/third-party-podspecs/RCT-Folly.podspec +9 -5
- package/third-party-podspecs/boost.podspec +1 -1
- package/third-party-podspecs/glog.podspec +1 -1
- package/types/index.d.ts +213 -0
- package/types/modules/BatchedBridge.d.ts +32 -0
- package/types/modules/Codegen.d.ts +74 -0
- package/types/modules/Devtools.d.ts +31 -0
- package/types/modules/LaunchScreen.d.ts +18 -0
- package/types/modules/globals.d.ts +577 -0
- package/types/private/TimerMixin.d.ts +19 -0
- package/types/private/Utilities.d.ts +10 -0
- package/types/public/DeprecatedPropertiesAlias.d.ts +205 -0
- package/types/public/Insets.d.ts +15 -0
- package/types/public/ReactNativeRenderer.d.ts +149 -0
- package/types/public/ReactNativeTypes.d.ts +143 -0
- package/types/tsconfig.json +15 -0
- package/types/tslint.json +23 -0
- package/Libraries/AddressSanitizerCrash/RCTAddressSanitizerCrash.js +0 -24
- package/Libraries/Alert/AlertMacOS.js +0 -211
- package/Libraries/Components/CheckBox/CheckBox.macos.js +0 -19
- package/Libraries/Components/MaskedView/MaskedViewIOS.android.js +0 -13
- package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
- package/Libraries/Components/MaskedView/MaskedViewIOS.macos.js +0 -15
- package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
- package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -45
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
- package/Libraries/Components/View/PlatformViewPropTypes.macos.js +0 -16
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -373
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +0 -60
- package/Libraries/Core/setUpSystrace.js +0 -21
- package/Libraries/Image/ImagePickerIOS.js +0 -103
- package/Libraries/Image/NativeImagePickerIOS.js +0 -38
- package/Libraries/RCTTest/RNTester-macOS/AppDelegate.h +0 -15
- package/Libraries/RCTTest/RNTester-macOS/AppDelegate.m +0 -27
- package/Libraries/RCTTest/RNTester-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -58
- package/Libraries/RCTTest/RNTester-macOS/Base.lproj/Main.storyboard +0 -693
- package/Libraries/RCTTest/RNTester-macOS/Info.plist +0 -32
- package/Libraries/RCTTest/RNTester-macOS/ViewController.h +0 -15
- package/Libraries/RCTTest/RNTester-macOS/ViewController.m +0 -27
- package/Libraries/RCTTest/RNTester-macOS/main.m +0 -13
- package/Libraries/RCTTest/RNTester-macOSTests/Info.plist +0 -22
- package/Libraries/RCTTest/RNTester-macOSTests/RNTester_macOSTests.m +0 -39
- package/Libraries/RCTTest/RNTester-macOSUITests/Info.plist +0 -22
- package/Libraries/RCTTest/RNTester-macOSUITests/RNTester_macOSUITests.m +0 -40
- package/Libraries/ReactNative/DummyUIManager.js +0 -136
- package/Libraries/ReactNative/UIManagerInjection.js +0 -15
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24527
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -8309
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8961
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8400
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -9049
- package/Libraries/Storage/AsyncStorage.js +0 -379
- package/Libraries/Storage/NativeAsyncLocalStorage.js +0 -44
- package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +0 -44
- package/Libraries/Types/RootTagTypes.js~merged +0 -23
- package/Libraries/Utilities/JSDevSupportModule.js +0 -37
- package/Libraries/Utilities/NativeJSDevSupport.js +0 -23
- package/Libraries/vendor/emitter/EventSubscription.js +0 -19
- package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
- package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
- package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
- package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
- package/React/CoreModules/RCTAsyncLocalStorage.h +0 -41
- package/React/CoreModules/RCTAsyncLocalStorage.mm +0 -494
- package/React/Views/RCTFontSmoothing.h +0 -17
- package/React/Views/RCTMaskedView.h +0 -14
- package/React/Views/RCTMaskedView.m +0 -34
- package/React/Views/RCTMaskedViewManager.h +0 -12
- package/React/Views/RCTMaskedViewManager.m +0 -22
- package/React/Views/RCTWeakViewHolder.h +0 -19
- package/ReactAndroid/src/androidTest/AndroidManifest.xml +0 -20
- package/ReactAndroid/src/androidTest/assets/BUCK +0 -7
- package/ReactAndroid/src/androidTest/buck-runner/AndroidManifest.xml +0 -28
- package/ReactAndroid/src/androidTest/buck-runner/BUCK +0 -24
- package/ReactAndroid/src/androidTest/java/com/facebook/react/bridge/ArgumentsTest.java +0 -93
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/AbstractScrollViewTestCase.java +0 -108
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/AssertModule.java +0 -53
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK +0 -46
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/FabricUIManagerFactory.java +0 -19
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/FakeAsyncLocalStorage.java +0 -56
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/FakeWebSocketModule.java +0 -44
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/InstanceSpecForTestPackage.java +0 -38
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/IntRecordingModule.java +0 -54
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/JSIntegrationTestChecker.java +0 -55
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/MultipleFailureException.java +0 -46
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactAppInstrumentationTestCase.java +0 -152
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactAppTestActivity.java +0 -374
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactInstanceSpecForTest.java +0 -114
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactInstrumentationTest.java +0 -117
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactIntegrationTestCase.java +0 -209
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java +0 -59
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestAppShell.java +0 -38
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestApplicationImpl.java +0 -22
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestFactory.java +0 -27
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactTestHelper.java +0 -217
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ScreenshotingFrameLayout.java +0 -77
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/SingleTouchGestureGenerator.java +0 -150
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/StringRecordingModule.java +0 -42
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/idledetection/BUCK +0 -16
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/idledetection/IdleWaiter.java +0 -14
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/idledetection/ReactBridgeIdleSignaler.java +0 -65
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/idledetection/ReactIdleDetectionUtil.java +0 -121
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/network/BUCK +0 -22
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/network/NetworkRecordingModuleMock.java +0 -147
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/BUCK +0 -43
- package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/ReactNativeTestRule.java +0 -184
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/AnimatedTransformTest.java +0 -49
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK +0 -43
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystMeasureLayoutTest.java +0 -138
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystMultitouchHandlingTestCase.java +0 -681
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystNativeJSToJavaParametersTestCase.java +0 -837
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystNativeJavaToJSArgumentsTestCase.java +0 -385
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystNativeJavaToJSReturnValuesTestCase.java +0 -162
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystSubviewsClippingTestCase.java +0 -301
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystTouchBubblingTestCase.java +0 -155
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/CatalystUIManagerTestCase.java +0 -256
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ImageErrorTestCase.java +0 -47
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ImageOverlayColorTestCase.java +0 -25
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/InitialPropsTestCase.java +0 -120
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/JSLocaleTest.java +0 -102
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/JSResponderTestCase.java +0 -62
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/LayoutEventsTestCase.java +0 -37
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/NativeIdTestCase.java +0 -89
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ProgressBarTestCase.java +0 -123
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ReactHorizontalScrollViewTestCase.java +0 -125
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ReactScrollViewTestCase.java +0 -127
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ReactSwipeRefreshLayoutTestCase.java +0 -97
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ShareTestCase.java +0 -92
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TestIdTestCase.java +0 -46
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java +0 -327
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/ViewRenderingTestCase.java +0 -154
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/BUCK +0 -33
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/ReactInstanceManagerTest.java +0 -96
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/ReactRootViewTest.java +0 -203
- package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/WritableNativeMapTest.java +0 -130
- package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +0 -85
- package/ReactAndroid/src/androidTest/js/Asserts.js +0 -38
- package/ReactAndroid/src/androidTest/js/BUCK +0 -26
- package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +0 -62
- package/ReactAndroid/src/androidTest/js/ImageErrorTestApp.js +0 -56
- package/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js +0 -29
- package/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js +0 -25
- package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +0 -66
- package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +0 -89
- package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +0 -214
- package/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js +0 -78
- package/ReactAndroid/src/androidTest/js/NativeIdTestModule.js +0 -76
- package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +0 -59
- package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +0 -183
- package/ReactAndroid/src/androidTest/js/ShareTestModule.js +0 -36
- package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +0 -369
- package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +0 -101
- package/ReactAndroid/src/androidTest/js/TestBundle.js +0 -113
- package/ReactAndroid/src/androidTest/js/TestIdTestModule.js +0 -86
- package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +0 -28
- package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +0 -125
- package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +0 -114
- package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +0 -39
- package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +0 -185
- package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +0 -84
- package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +0 -268
- package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +0 -109
- package/ReactAndroid/src/main/java/com/facebook/hermes/.clang-tidy +0 -5
- package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/Android.mk +0 -34
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk +0 -54
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +0 -117
- package/ReactAndroid/src/main/java/com/facebook/react/JSInterpreter.java +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/DefaultNativeModuleCallExceptionHandler.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleCallExceptionHandler.java +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/NativeRunnable.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.java +0 -388
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBufferSoLoader.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/Android.mk +0 -51
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/BUCK +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/OnLoad.cpp +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.cpp +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/react/common/mapbuffer/ReadableMapBuffer.h +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDevSupport.java +0 -103
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java +0 -316
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxHandler.java +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +0 -106
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h +0 -71
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.cpp +0 -69
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.h +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK +0 -53
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +0 -629
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +0 -163
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp +0 -73
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountItem.cpp +0 -54
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountItem.h +0 -78
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp +0 -962
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h +0 -83
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/JBackgroundExecutor.cpp +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/JBackgroundExecutor.h +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/OnLoad.cpp +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ReactNativeConfigHolder.cpp +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/StateWrapperImpl.cpp +0 -62
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/StateWrapperImpl.h +0 -42
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/Android.mk +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/OnLoad.cpp +0 -85
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/Android.mk +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/BUCK +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncLocalStorageUtil.java +0 -125
- package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncStorageErrorUtil.java +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncStorageModule.java +0 -433
- package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK +0 -23
- package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/ReactDatabaseSupplier.java +0 -163
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/Android.mk +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/BUCK +0 -31
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/reactperflogger/.clang-tidy +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk +0 -63
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/BUCK +0 -63
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/OnLoad.cpp +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/TurboModuleManager.cpp +0 -182
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/TurboModuleManagerDelegate.h +0 -37
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementationProvider.java +0 -72
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/LockFreeEventDispatcherImpl.java +0 -236
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BUCK +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerDelegate.java +0 -127
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/BaseViewManagerInterface.java +0 -74
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/interfaces/ViewProps.java +0 -304
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/Android.mk +0 -47
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/BUCK +0 -35
- package/ReactAndroid/src/main/jni/Application.mk +0 -34
- package/ReactAndroid/src/main/jni/first-party/fb/Android.mk +0 -30
- package/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk +0 -23
- package/ReactAndroid/src/main/jni/first-party/fbjni/Android.mk +0 -14
- package/ReactAndroid/src/main/jni/first-party/hermes/Android.mk +0 -10
- package/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk +0 -27
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +0 -109
- package/ReactAndroid/src/main/jni/react/jni/JNativeRunnable.h +0 -52
- package/ReactAndroid/src/main/jni/third-party/boost/Android.mk +0 -15
- package/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk +0 -22
- package/ReactAndroid/src/main/jni/third-party/fmt/Android.mk +0 -15
- package/ReactAndroid/src/main/jni/third-party/folly/Android.mk +0 -128
- package/ReactAndroid/src/main/jni/third-party/glog/Android.mk +0 -32
- package/ReactAndroid/src/main/jni/third-party/jsc/Android.mk +0 -6
- package/ReactAndroid/src/main/jni/third-party/libevent/Android.mk +0 -36
- package/ReactAndroid/src/main/third-party/android/androidx/BUCK +0 -743
- package/ReactAndroid/src/main/third-party/java/asm/BUCK +0 -75
- package/ReactAndroid/src/main/third-party/java/assertj/BUCK +0 -14
- package/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK +0 -11
- package/ReactAndroid/src/main/third-party/java/buck-android-support/buck-android-support.jar +0 -0
- package/ReactAndroid/src/main/third-party/java/infer-annotations/BUCK +0 -14
- package/ReactAndroid/src/main/third-party/java/javapoet/BUCK +0 -14
- package/ReactAndroid/src/main/third-party/java/jsr-305/BUCK +0 -13
- package/ReactAndroid/src/main/third-party/java/jsr-330/BUCK +0 -13
- package/ReactAndroid/src/main/third-party/java/junit/BUCK +0 -36
- package/ReactAndroid/src/main/third-party/java/mockito/BUCK +0 -36
- package/ReactAndroid/src/main/third-party/java/mockito2/BUCK +0 -75
- package/ReactAndroid/src/main/third-party/java/okhttp/BUCK +0 -46
- package/ReactAndroid/src/main/third-party/java/okio/BUCK +0 -24
- package/ReactAndroid/src/main/third-party/java/robolectric/BUCK +0 -218
- package/ReactAndroid/src/main/third-party/java/sqlite/BUCK +0 -23
- package/ReactAndroid/src/main/third-party/java/testing-support-lib/BUCK +0 -13
- package/ReactAndroid/src/main/third-party/kotlin/BUCK +0 -91
- package/ReactAndroid/src/test/java/com/facebook/common/logging/BUCK +0 -17
- package/ReactAndroid/src/test/java/com/facebook/common/logging/FakeLoggingDelegate.java +0 -138
- package/ReactAndroid/src/test/java/com/facebook/react/BUCK +0 -28
- package/ReactAndroid/src/test/java/com/facebook/react/CompositeReactPackageTest.java +0 -156
- package/ReactAndroid/src/test/java/com/facebook/react/RootViewTest.java +0 -255
- package/ReactAndroid/src/test/java/com/facebook/react/animated/BUCK +0 -22
- package/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedInterpolationTest.java +0 -123
- package/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java +0 -1294
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK +0 -44
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/BaseJavaModuleTest.java +0 -103
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/FallbackJSBundleLoaderTest.java +0 -176
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/InstanceHandleHelper.java +0 -19
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/JavaOnlyArrayTest.java +0 -37
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/JavaScriptModuleRegistryTest.java +0 -35
- package/ReactAndroid/src/test/java/com/facebook/react/bridge/ReactTestHelper.java +0 -59
- package/ReactAndroid/src/test/java/com/facebook/react/devsupport/BUCK +0 -23
- package/ReactAndroid/src/test/java/com/facebook/react/devsupport/JSDebuggerWebSocketClientTest.java +0 -139
- package/ReactAndroid/src/test/java/com/facebook/react/devsupport/MultipartStreamReaderTest.java +0 -151
- package/ReactAndroid/src/test/java/com/facebook/react/devsupport/StackTraceHelperTest.java +0 -65
- package/ReactAndroid/src/test/java/com/facebook/react/fabric/events/BUCK +0 -16
- package/ReactAndroid/src/test/java/com/facebook/react/fabric/events/TouchEventDispatchTest.java +0 -616
- package/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK +0 -45
- package/ReactAndroid/src/test/java/com/facebook/react/modules/blob/BlobModuleTest.java +0 -156
- package/ReactAndroid/src/test/java/com/facebook/react/modules/camera/ImageStoreManagerTest.java +0 -81
- package/ReactAndroid/src/test/java/com/facebook/react/modules/clipboard/ClipboardModuleTest.java +0 -57
- package/ReactAndroid/src/test/java/com/facebook/react/modules/deviceinfo/DeviceInfoModuleTest.java +0 -168
- package/ReactAndroid/src/test/java/com/facebook/react/modules/dialog/DialogModuleTest.java +0 -165
- package/ReactAndroid/src/test/java/com/facebook/react/modules/network/HeaderUtilTest.java +0 -73
- package/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.java +0 -647
- package/ReactAndroid/src/test/java/com/facebook/react/modules/network/ProgressiveStringDecoderTest.java +0 -138
- package/ReactAndroid/src/test/java/com/facebook/react/modules/network/ReactCookieJarContainerTest.java +0 -71
- package/ReactAndroid/src/test/java/com/facebook/react/modules/share/ShareModuleTest.java +0 -230
- package/ReactAndroid/src/test/java/com/facebook/react/modules/storage/AsyncStorageModuleTest.java +0 -345
- package/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.java +0 -306
- package/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/BUCK +0 -18
- package/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java +0 -144
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK +0 -40
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/BaseViewManagerTest.java +0 -79
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/LayoutPropertyApplicatorTest.java +0 -470
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/MatrixMathHelperTest.java +0 -173
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/ReactPropAnnotationSetterSpecTest.java +0 -125
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/ReactPropAnnotationSetterTest.java +0 -499
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/ReactPropConstantsTest.java +0 -163
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/ReactPropForShadowNodeSetterTest.java +0 -160
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/ReactPropForShadowNodeSpecTest.java +0 -122
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/SimpleViewPropertyTest.java +0 -116
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleConstantsTest.java +0 -173
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleTest.java +0 -721
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/layoutanimation/BUCK +0 -16
- package/ReactAndroid/src/test/java/com/facebook/react/uimanager/layoutanimation/InterpolatorTypeTest.java +0 -49
- package/ReactAndroid/src/test/java/com/facebook/react/util/BUCK +0 -17
- package/ReactAndroid/src/test/java/com/facebook/react/util/JSStackTraceTest.java +0 -96
- package/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +0 -38
- package/ReactAndroid/src/test/java/com/facebook/react/views/image/ImageResizeModeTest.java +0 -42
- package/ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.java +0 -143
- package/ReactAndroid/src/test/java/com/facebook/react/views/slider/ReactSliderPropertyTest.java +0 -100
- package/ReactAndroid/src/test/java/com/facebook/react/views/text/CustomLineHeightSpanTest.java +0 -113
- package/ReactAndroid/src/test/java/com/facebook/react/views/text/ReactTextTest.java +0 -516
- package/ReactAndroid/src/test/java/com/facebook/react/views/textinput/ReactTextInputPropertyTest.java +0 -400
- package/ReactAndroid/src/test/java/com/facebook/react/views/textinput/TextInputTest.java +0 -174
- package/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java +0 -47
- package/ReactAndroid/src/test/java/org/mockito/configuration/BUCK +0 -13
- package/ReactAndroid/src/test/java/org/mockito/configuration/MockitoConfiguration.java +0 -24
- package/ReactAndroid/src/test/resources/BUCK +0 -17
- package/ReactAndroid/src/test/resources/robolectric.properties +0 -2
- package/ReactCommon/butter/Android.mk +0 -29
- package/ReactCommon/butter/optional.h +0 -38
- package/ReactCommon/callinvoker/Android.mk +0 -25
- package/ReactCommon/common.mk +0 -29
- package/ReactCommon/cxxreact/Android.mk +0 -48
- package/ReactCommon/hermes/executor/Android.mk +0 -39
- package/ReactCommon/hermes/inspector/Android.mk +0 -35
- package/ReactCommon/hermes/inspector/chrome/AutoAttachUtils.cpp +0 -151
- package/ReactCommon/hermes/inspector/chrome/AutoAttachUtils.h +0 -24
- package/ReactCommon/hermes/inspector/tools/msggen/.babelrc +0 -8
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/CommandTest.js +0 -62
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/EventTest.js +0 -47
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/GraphTest.js +0 -78
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/HeaderWriterTest.js +0 -128
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/ImplementationWriterTest.js +0 -171
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/PropertyTest.js +0 -131
- package/ReactCommon/hermes/inspector/tools/msggen/__tests__/TypeTest.js +0 -50
- package/ReactCommon/hermes/inspector/tools/msggen/package.json +0 -44
- package/ReactCommon/hermes/inspector/tools/msggen/src/Command.js +0 -79
- package/ReactCommon/hermes/inspector/tools/msggen/src/Converters.js +0 -39
- package/ReactCommon/hermes/inspector/tools/msggen/src/Event.js +0 -57
- package/ReactCommon/hermes/inspector/tools/msggen/src/GeneratedHeader.js +0 -16
- package/ReactCommon/hermes/inspector/tools/msggen/src/Graph.js +0 -90
- package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +0 -323
- package/ReactCommon/hermes/inspector/tools/msggen/src/ImplementationWriter.js +0 -408
- package/ReactCommon/hermes/inspector/tools/msggen/src/Property.js +0 -219
- package/ReactCommon/hermes/inspector/tools/msggen/src/TestHelpers.js +0 -40
- package/ReactCommon/hermes/inspector/tools/msggen/src/Type.js +0 -98
- package/ReactCommon/hermes/inspector/tools/msggen/src/custom.json +0 -26
- package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +0 -236
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +0 -5832
- package/ReactCommon/jsi/Android.mk +0 -41
- package/ReactCommon/jsi/JSCRuntime.cpp +0 -1480
- package/ReactCommon/jsiexecutor/Android.mk +0 -23
- package/ReactCommon/jsinspector/Android.mk +0 -20
- package/ReactCommon/logger/Android.mk +0 -24
- package/ReactCommon/microprofiler/.clang-tidy +0 -5
- package/ReactCommon/microprofiler/BUCK +0 -27
- package/ReactCommon/microprofiler/MicroProfiler.cpp +0 -252
- package/ReactCommon/microprofiler/MicroProfiler.h +0 -89
- package/ReactCommon/react/config/Android.mk +0 -26
- package/ReactCommon/react/debug/Android.mk +0 -30
- package/ReactCommon/react/nativemodule/core/Android.mk +0 -37
- package/ReactCommon/react/nativemodule/core/ReactCommon/LongLivedObject.cpp +0 -53
- package/ReactCommon/react/nativemodule/samples/platform/android/Android.mk +0 -23
- package/ReactCommon/react/renderer/animations/Android.mk +0 -59
- package/ReactCommon/react/renderer/attributedstring/Android.mk +0 -54
- package/ReactCommon/react/renderer/componentregistry/Android.mk +0 -42
- package/ReactCommon/react/renderer/componentregistry/native/Android.mk +0 -38
- package/ReactCommon/react/renderer/components/image/Android.mk +0 -51
- package/ReactCommon/react/renderer/components/modal/Android.mk +0 -55
- package/ReactCommon/react/renderer/components/progressbar/Android.mk +0 -54
- package/ReactCommon/react/renderer/components/root/Android.mk +0 -47
- package/ReactCommon/react/renderer/components/scrollview/Android.mk +0 -50
- package/ReactCommon/react/renderer/components/slider/Android.mk +0 -60
- package/ReactCommon/react/renderer/components/switch/Android.mk +0 -54
- package/ReactCommon/react/renderer/components/text/Android.mk +0 -59
- package/ReactCommon/react/renderer/components/textinput/Android.mk +0 -67
- package/ReactCommon/react/renderer/components/unimplementedview/Android.mk +0 -48
- package/ReactCommon/react/renderer/components/view/Android.mk +0 -47
- package/ReactCommon/react/renderer/core/Android.mk +0 -42
- package/ReactCommon/react/renderer/debug/Android.mk +0 -28
- package/ReactCommon/react/renderer/graphics/Android.mk +0 -40
- package/ReactCommon/react/renderer/imagemanager/Android.mk +0 -44
- package/ReactCommon/react/renderer/leakchecker/Android.mk +0 -33
- package/ReactCommon/react/renderer/mapbuffer/Android.mk +0 -34
- package/ReactCommon/react/renderer/mounting/Android.mk +0 -56
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp +0 -12
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
- package/ReactCommon/react/renderer/runtimescheduler/Android.mk +0 -34
- package/ReactCommon/react/renderer/scheduler/Android.mk +0 -63
- package/ReactCommon/react/renderer/telemetry/Android.mk +0 -44
- package/ReactCommon/react/renderer/templateprocessor/Android.mk +0 -47
- package/ReactCommon/react/renderer/textlayoutmanager/Android.mk +0 -64
- package/ReactCommon/react/renderer/uimanager/Android.mk +0 -59
- package/ReactCommon/react/utils/Android.mk +0 -35
- package/ReactCommon/react/utils/LayoutManager.h +0 -150
- package/ReactCommon/reactperflogger/Android.mk +0 -26
- package/ReactCommon/runtimeexecutor/Android.mk +0 -19
- package/ReactCommon/yoga/Android.mk +0 -21
- package/ReactCommon/yoga/yoga/Bitfield.h +0 -144
- package/flow/Promise.js +0 -47
- package/flow/use-subscription.js +0 -19
- package/flow-typed/npm/react-dom_v16.x.x.js +0 -112
- package/jest/preprocessor.js +0 -123
- package/scripts/find-node.sh +0 -69
- package/scripts/generate-artifacts.js +0 -326
- package/template/App.js +0 -112
- package/template/Gemfile.lock +0 -98
- package/template/_buckconfig +0 -6
- package/template/_flowconfig +0 -70
- package/template/_ruby-version +0 -1
- package/template/android/app/_BUCK +0 -55
- package/template/android/app/build_defs.bzl +0 -19
- package/template/android/app/src/main/java/com/helloworld/newarchitecture/MainApplicationReactNativeHost.java +0 -116
- package/template/android/app/src/main/java/com/helloworld/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/template/android/app/src/main/java/com/helloworld/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/template/android/app/src/main/jni/Android.mk +0 -49
- package/template/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -24
- package/template/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/template/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/template/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/template/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -61
- package/template/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/template/android/app/src/main/jni/OnLoad.cpp +0 -11
- /package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{interfaces/FloatUtil.java → FloatUtil.java} +0 -0
- /package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{interfaces/Spacing.java → Spacing.java} +0 -0
- /package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{interfaces/ViewManagerDelegate.java → ViewManagerDelegate.java} +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/ComponentFactory.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/ComponentFactory.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/CoreComponentsRegistry.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/CoreComponentsRegistry.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/EventBeatManager.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/EventBeatManager.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/ReactNativeConfigHolder.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/SurfaceHandlerBinding.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/fabric/jni → jni/react/fabric}/SurfaceHandlerBinding.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook → jni/react}/hermes/instrumentation/HermesMemoryDumper.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook → jni/react}/hermes/instrumentation/HermesSamplingProfiler.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook → jni/react}/hermes/instrumentation/HermesSamplingProfiler.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook → jni/react}/hermes/instrumentation/OnLoad.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/modules/blob/jni → jni/react/reactnativeblob}/BlobCollector.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/modules/blob/jni → jni/react/reactnativeblob}/BlobCollector.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/modules/blob/jni → jni/react/reactnativeblob}/OnLoad.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/reactperflogger/jni → jni/react/reactperflogger}/reactperflogger/JNativeModulePerfLogger.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/reactperflogger/jni → jni/react/reactperflogger}/reactperflogger/OnLoad.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/turbomodule/core/jni → jni/react/turbomodule}/ReactCommon/CallInvokerHolder.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/turbomodule/core/jni → jni/react/turbomodule}/ReactCommon/CallInvokerHolder.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/turbomodule/core/jni → jni/react/turbomodule}/ReactCommon/TurboModuleManager.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/uimanager/jni → jni/react/uimanager}/ComponentNameResolverManager.cpp +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/uimanager/jni → jni/react/uimanager}/ComponentNameResolverManager.h +0 -0
- /package/ReactAndroid/src/main/{java/com/facebook/react/uimanager/jni → jni/react/uimanager}/OnLoad.cpp +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm64 → arm64-v8a}/jump_arm64_aapcs_elf_gas.S +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm64 → arm64-v8a}/make_arm64_aapcs_elf_gas.S +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm64 → arm64-v8a}/ontop_arm64_aapcs_elf_gas.S +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm → armeabi-v7a}/jump_arm_aapcs_elf_gas.S +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm → armeabi-v7a}/make_arm_aapcs_elf_gas.S +0 -0
- /package/ReactAndroid/src/main/jni/third-party/boost/asm/{arm → armeabi-v7a}/ontop_arm_aapcs_elf_gas.S +0 -0
- /package/ReactCommon/{jsi → jsc}/JSCRuntime.h +0 -0
- /package/template/__tests__/{App-test.js → App-test.tsx} +0 -0
|
@@ -8,62 +8,55 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const Batchinator = require('../Interaction/Batchinator');
|
|
12
|
-
const FillRateHelper = require('./FillRateHelper');
|
|
13
|
-
const Platform = require('../Utilities/Platform'); // TODO(macOS GH#774)
|
|
14
|
-
const ReactNative = require('../Renderer/shims/ReactNative');
|
|
15
|
-
const RefreshControl = require('../Components/RefreshControl/RefreshControl');
|
|
16
|
-
const ScrollView = require('../Components/ScrollView/ScrollView');
|
|
17
|
-
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
18
|
-
const View = require('../Components/View/View');
|
|
19
|
-
const ViewabilityHelper = require('./ViewabilityHelper');
|
|
20
|
-
|
|
21
|
-
const flattenStyle = require('../StyleSheet/flattenStyle');
|
|
22
|
-
const infoLog = require('../Utilities/infoLog');
|
|
23
|
-
const invariant = require('invariant');
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
keyExtractor as defaultKeyExtractor,
|
|
27
|
-
computeWindowedRenderLimits,
|
|
28
|
-
} from './VirtualizeUtils';
|
|
29
|
-
|
|
30
|
-
import * as React from 'react';
|
|
31
11
|
import type {ScrollResponderType} from '../Components/ScrollView/ScrollView';
|
|
32
12
|
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
13
|
+
import type {LayoutEvent, ScrollEvent} from '../Types/CoreEventTypes';
|
|
14
|
+
import type {KeyEvent} from '../Types/CoreEventTypes'; // [macOS]
|
|
15
|
+
import type {ViewToken} from './ViewabilityHelper';
|
|
33
16
|
import type {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
FrameMetricProps,
|
|
18
|
+
Item,
|
|
19
|
+
Props,
|
|
20
|
+
RenderItemProps,
|
|
21
|
+
RenderItemType,
|
|
22
|
+
Separators,
|
|
23
|
+
} from './VirtualizedListProps';
|
|
24
|
+
|
|
25
|
+
import RefreshControl from '../Components/RefreshControl/RefreshControl';
|
|
26
|
+
import ScrollView from '../Components/ScrollView/ScrollView';
|
|
27
|
+
import View from '../Components/View/View';
|
|
28
|
+
import Batchinator from '../Interaction/Batchinator';
|
|
29
|
+
import {findNodeHandle} from '../ReactNative/RendererProxy';
|
|
30
|
+
import flattenStyle from '../StyleSheet/flattenStyle';
|
|
31
|
+
import StyleSheet from '../StyleSheet/StyleSheet';
|
|
32
|
+
import clamp from '../Utilities/clamp';
|
|
33
|
+
import infoLog from '../Utilities/infoLog';
|
|
34
|
+
import {CellRenderMask} from './CellRenderMask';
|
|
35
|
+
import ChildListCollection from './ChildListCollection';
|
|
36
|
+
import FillRateHelper from './FillRateHelper';
|
|
37
|
+
import StateSafePureComponent from './StateSafePureComponent';
|
|
38
|
+
import ViewabilityHelper from './ViewabilityHelper';
|
|
39
|
+
import CellRenderer from './VirtualizedListCellRenderer';
|
|
39
40
|
import {
|
|
40
41
|
VirtualizedListCellContextProvider,
|
|
41
42
|
VirtualizedListContext,
|
|
42
43
|
VirtualizedListContextProvider,
|
|
43
|
-
type ChildListState,
|
|
44
|
-
type ListDebugInfo,
|
|
45
44
|
} from './VirtualizedListContext.js';
|
|
45
|
+
import {
|
|
46
|
+
computeWindowedRenderLimits,
|
|
47
|
+
keyExtractor as defaultKeyExtractor,
|
|
48
|
+
} from './VirtualizeUtils';
|
|
49
|
+
import invariant from 'invariant';
|
|
50
|
+
import * as React from 'react';
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
const Platform = require('../Utilities/Platform'); // [macOS]
|
|
48
53
|
|
|
49
|
-
export type
|
|
50
|
-
highlight: () => void,
|
|
51
|
-
unhighlight: () => void,
|
|
52
|
-
updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
|
|
53
|
-
...
|
|
54
|
-
};
|
|
54
|
+
export type {RenderItemProps, RenderItemType, Separators};
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
item: ItemT,
|
|
58
|
-
index: number,
|
|
59
|
-
isSelected: ?boolean, // TODO(macOS GH#774)
|
|
60
|
-
separators: Separators,
|
|
61
|
-
...
|
|
62
|
-
};
|
|
56
|
+
const ON_END_REACHED_EPSILON = 0.001;
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
) => React.Node;
|
|
58
|
+
let _usedIndexForKey = false;
|
|
59
|
+
let _keylessItemComponentName: string = '';
|
|
67
60
|
|
|
68
61
|
type ViewabilityHelperCallbackTuple = {
|
|
69
62
|
viewabilityHelper: ViewabilityHelper,
|
|
@@ -75,298 +68,10 @@ type ViewabilityHelperCallbackTuple = {
|
|
|
75
68
|
...
|
|
76
69
|
};
|
|
77
70
|
|
|
78
|
-
// [TODO(macOS GH#774)
|
|
79
|
-
export type SelectedRowIndexPathType = {
|
|
80
|
-
sectionIndex: number,
|
|
81
|
-
rowIndex: number,
|
|
82
|
-
}; // ]TODO(macOS GH#774)
|
|
83
|
-
|
|
84
|
-
type RequiredProps = {|
|
|
85
|
-
/**
|
|
86
|
-
* The default accessor functions assume this is an Array<{key: string} | {id: string}> but you can override
|
|
87
|
-
* getItem, getItemCount, and keyExtractor to handle any type of index-based data.
|
|
88
|
-
*/
|
|
89
|
-
data?: any,
|
|
90
|
-
/**
|
|
91
|
-
* A generic accessor for extracting an item from any sort of data blob.
|
|
92
|
-
*/
|
|
93
|
-
getItem: (data: any, index: number) => ?Item,
|
|
94
|
-
/**
|
|
95
|
-
* Determines how many items are in the data blob.
|
|
96
|
-
*/
|
|
97
|
-
getItemCount: (data: any) => number,
|
|
98
|
-
|};
|
|
99
|
-
type OptionalProps = {|
|
|
100
|
-
renderItem?: ?RenderItemType<Item>,
|
|
101
|
-
/**
|
|
102
|
-
* `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
|
|
103
|
-
* implementation, but with a significant perf hit.
|
|
104
|
-
*/
|
|
105
|
-
debug?: ?boolean,
|
|
106
|
-
/**
|
|
107
|
-
* DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
|
|
108
|
-
* unmounts react instances that are outside of the render window. You should only need to disable
|
|
109
|
-
* this for debugging purposes. Defaults to false.
|
|
110
|
-
*/
|
|
111
|
-
disableVirtualization?: ?boolean,
|
|
112
|
-
// [TODO(macOS GH#774)
|
|
113
|
-
/**
|
|
114
|
-
* Allows you to 'select' a row using arrow keys. The selected row will have the prop `isSelected`
|
|
115
|
-
* passed in as true to it's renderItem / ListItemComponent. You can also imperatively select a row
|
|
116
|
-
* using the `selectRowAtIndex` method. You can set the initially selected row using the
|
|
117
|
-
* `initialSelectedIndex` prop.
|
|
118
|
-
* Keyboard Behavior:
|
|
119
|
-
* - ArrowUp: Select row above current selected row
|
|
120
|
-
* - ArrowDown: Select row below current selected row
|
|
121
|
-
* - Option+ArrowUp: Select the first row
|
|
122
|
-
* - Opton+ArrowDown: Select the last 'realized' row
|
|
123
|
-
* - Home: Scroll to top of list
|
|
124
|
-
* - End: Scroll to end of list
|
|
125
|
-
*
|
|
126
|
-
* @platform macos
|
|
127
|
-
*/
|
|
128
|
-
enableSelectionOnKeyPress?: ?boolean,
|
|
129
|
-
// ]TODO(macOS GH#774)
|
|
130
|
-
/**
|
|
131
|
-
* A marker property for telling the list to re-render (since it implements `PureComponent`). If
|
|
132
|
-
* any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
|
|
133
|
-
* `data` prop, stick it here and treat it immutably.
|
|
134
|
-
*/
|
|
135
|
-
extraData?: any,
|
|
136
|
-
// e.g. height, y
|
|
137
|
-
getItemLayout?: (
|
|
138
|
-
data: any,
|
|
139
|
-
index: number,
|
|
140
|
-
) => {
|
|
141
|
-
length: number,
|
|
142
|
-
offset: number,
|
|
143
|
-
index: number,
|
|
144
|
-
...
|
|
145
|
-
},
|
|
146
|
-
horizontal?: ?boolean,
|
|
147
|
-
/**
|
|
148
|
-
* How many items to render in the initial batch. This should be enough to fill the screen but not
|
|
149
|
-
* much more. Note these items will never be unmounted as part of the windowed rendering in order
|
|
150
|
-
* to improve perceived performance of scroll-to-top actions.
|
|
151
|
-
*/
|
|
152
|
-
initialNumToRender?: ?number,
|
|
153
|
-
/**
|
|
154
|
-
* Instead of starting at the top with the first item, start at `initialScrollIndex`. This
|
|
155
|
-
* disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
|
|
156
|
-
* always rendered and immediately renders the items starting at this initial index. Requires
|
|
157
|
-
* `getItemLayout` to be implemented.
|
|
158
|
-
*/
|
|
159
|
-
initialScrollIndex?: ?number,
|
|
160
|
-
// [TODO(macOS GH#774)
|
|
161
|
-
/**
|
|
162
|
-
* The initially selected row, if `enableSelectionOnKeyPress` is set.
|
|
163
|
-
*/
|
|
164
|
-
initialSelectedIndex?: ?number,
|
|
165
|
-
// ]TODO(macOS GH#774)
|
|
166
|
-
/**
|
|
167
|
-
* Reverses the direction of scroll. Uses scale transforms of -1.
|
|
168
|
-
*/
|
|
169
|
-
inverted?: ?boolean,
|
|
170
|
-
keyExtractor?: ?(item: Item, index: number) => string,
|
|
171
|
-
/**
|
|
172
|
-
* Each cell is rendered using this element. Can be a React Component Class,
|
|
173
|
-
* or a render function. Defaults to using View.
|
|
174
|
-
*/
|
|
175
|
-
CellRendererComponent?: ?React.ComponentType<any>,
|
|
176
|
-
/**
|
|
177
|
-
* Rendered in between each item, but not at the top or bottom. By default, `highlighted` and
|
|
178
|
-
* `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight`
|
|
179
|
-
* which will update the `highlighted` prop, but you can also add custom props with
|
|
180
|
-
* `separators.updateProps`.
|
|
181
|
-
*/
|
|
182
|
-
ItemSeparatorComponent?: ?React.ComponentType<any>,
|
|
183
|
-
/**
|
|
184
|
-
* Takes an item from `data` and renders it into the list. Example usage:
|
|
185
|
-
*
|
|
186
|
-
* <FlatList
|
|
187
|
-
* ItemSeparatorComponent={Platform.OS !== 'android' && ({highlighted}) => (
|
|
188
|
-
* <View style={[style.separator, highlighted && {marginLeft: 0}]} />
|
|
189
|
-
* )}
|
|
190
|
-
* data={[{title: 'Title Text', key: 'item1'}]}
|
|
191
|
-
* ListItemComponent={({item, separators}) => (
|
|
192
|
-
* <TouchableHighlight
|
|
193
|
-
* onPress={() => this._onPress(item)}
|
|
194
|
-
* onShowUnderlay={separators.highlight}
|
|
195
|
-
* onHideUnderlay={separators.unhighlight}>
|
|
196
|
-
* <View style={{backgroundColor: 'white'}}>
|
|
197
|
-
* <Text>{item.title}</Text>
|
|
198
|
-
* </View>
|
|
199
|
-
* </TouchableHighlight>
|
|
200
|
-
* )}
|
|
201
|
-
* />
|
|
202
|
-
*
|
|
203
|
-
* Provides additional metadata like `index` if you need it, as well as a more generic
|
|
204
|
-
* `separators.updateProps` function which let's you set whatever props you want to change the
|
|
205
|
-
* rendering of either the leading separator or trailing separator in case the more common
|
|
206
|
-
* `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for
|
|
207
|
-
* your use-case.
|
|
208
|
-
*/
|
|
209
|
-
ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
|
|
210
|
-
/**
|
|
211
|
-
* Rendered when the list is empty. Can be a React Component Class, a render function, or
|
|
212
|
-
* a rendered element.
|
|
213
|
-
*/
|
|
214
|
-
ListEmptyComponent?: ?(React.ComponentType<any> | React.Element<any>),
|
|
215
|
-
/**
|
|
216
|
-
* Rendered at the bottom of all the items. Can be a React Component Class, a render function, or
|
|
217
|
-
* a rendered element.
|
|
218
|
-
*/
|
|
219
|
-
ListFooterComponent?: ?(React.ComponentType<any> | React.Element<any>),
|
|
220
|
-
/**
|
|
221
|
-
* Styling for internal View for ListFooterComponent
|
|
222
|
-
*/
|
|
223
|
-
ListFooterComponentStyle?: ViewStyleProp,
|
|
224
|
-
/**
|
|
225
|
-
* Rendered at the top of all the items. Can be a React Component Class, a render function, or
|
|
226
|
-
* a rendered element.
|
|
227
|
-
*/
|
|
228
|
-
ListHeaderComponent?: ?(React.ComponentType<any> | React.Element<any>),
|
|
229
|
-
/**
|
|
230
|
-
* Styling for internal View for ListHeaderComponent
|
|
231
|
-
*/
|
|
232
|
-
ListHeaderComponentStyle?: ViewStyleProp,
|
|
233
|
-
/**
|
|
234
|
-
* A unique identifier for this list. If there are multiple VirtualizedLists at the same level of
|
|
235
|
-
* nesting within another VirtualizedList, this key is necessary for virtualization to
|
|
236
|
-
* work properly.
|
|
237
|
-
*/
|
|
238
|
-
listKey?: string,
|
|
239
|
-
/**
|
|
240
|
-
* The maximum number of items to render in each incremental render batch. The more rendered at
|
|
241
|
-
* once, the better the fill rate, but responsiveness may suffer because rendering content may
|
|
242
|
-
* interfere with responding to button taps or other interactions.
|
|
243
|
-
*/
|
|
244
|
-
maxToRenderPerBatch?: ?number,
|
|
245
|
-
/**
|
|
246
|
-
* Called once when the scroll position gets within `onEndReachedThreshold` of the rendered
|
|
247
|
-
* content.
|
|
248
|
-
*/
|
|
249
|
-
onEndReached?: ?(info: {distanceFromEnd: number, ...}) => void,
|
|
250
|
-
/**
|
|
251
|
-
* How far from the end (in units of visible length of the list) the bottom edge of the
|
|
252
|
-
* list must be from the end of the content to trigger the `onEndReached` callback.
|
|
253
|
-
* Thus a value of 0.5 will trigger `onEndReached` when the end of the content is
|
|
254
|
-
* within half the visible length of the list.
|
|
255
|
-
*/
|
|
256
|
-
onEndReachedThreshold?: ?number,
|
|
257
|
-
/**
|
|
258
|
-
* If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make
|
|
259
|
-
* sure to also set the `refreshing` prop correctly.
|
|
260
|
-
*/
|
|
261
|
-
onRefresh?: ?() => void,
|
|
262
|
-
/**
|
|
263
|
-
* Used to handle failures when scrolling to an index that has not been measured yet. Recommended
|
|
264
|
-
* action is to either compute your own offset and `scrollTo` it, or scroll as far as possible and
|
|
265
|
-
* then try again after more items have been rendered.
|
|
266
|
-
*/
|
|
267
|
-
onScrollToIndexFailed?: ?(info: {
|
|
268
|
-
index: number,
|
|
269
|
-
highestMeasuredFrameIndex: number,
|
|
270
|
-
averageItemLength: number,
|
|
271
|
-
...
|
|
272
|
-
}) => void,
|
|
273
|
-
/**
|
|
274
|
-
* If provided, will be invoked whenever the selection on the list changes. Make sure to set
|
|
275
|
-
* the property enableSelectionOnKeyPress to true to change selection via keyboard (macOS).
|
|
276
|
-
*
|
|
277
|
-
* @platform macos
|
|
278
|
-
*/
|
|
279
|
-
onSelectionChanged?: ?(info: {
|
|
280
|
-
previousSelection: number,
|
|
281
|
-
newSelection: number,
|
|
282
|
-
item: ?Item,
|
|
283
|
-
}) => void, // TODO(macOS GH#774)
|
|
284
|
-
/**
|
|
285
|
-
* If provided, called when 'Enter' key is pressed on an item.
|
|
286
|
-
*
|
|
287
|
-
* @platform macos
|
|
288
|
-
*/
|
|
289
|
-
onSelectionEntered?: ?(item: ?Item) => void, // TODO(macOS GH#774)
|
|
290
|
-
|
|
291
|
-
sectionIndex?: number, // TODO(macOS GH#774)
|
|
292
|
-
rowIndex?: number, // TODO(macOS GH#774)
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Called when the viewability of rows changes, as defined by the
|
|
296
|
-
* `viewabilityConfig` prop.
|
|
297
|
-
*/
|
|
298
|
-
onViewableItemsChanged?: ?(info: {
|
|
299
|
-
viewableItems: Array<ViewToken>,
|
|
300
|
-
changed: Array<ViewToken>,
|
|
301
|
-
...
|
|
302
|
-
}) => void,
|
|
303
|
-
persistentScrollbar?: ?boolean,
|
|
304
|
-
/**
|
|
305
|
-
* Set this when offset is needed for the loading indicator to show correctly.
|
|
306
|
-
*/
|
|
307
|
-
progressViewOffset?: number,
|
|
308
|
-
/**
|
|
309
|
-
* A custom refresh control element. When set, it overrides the default
|
|
310
|
-
* <RefreshControl> component built internally. The onRefresh and refreshing
|
|
311
|
-
* props are also ignored. Only works for vertical VirtualizedList.
|
|
312
|
-
*/
|
|
313
|
-
refreshControl?: ?React.Element<any>,
|
|
314
|
-
/**
|
|
315
|
-
* Set this true while waiting for new data from a refresh.
|
|
316
|
-
*/
|
|
317
|
-
refreshing?: ?boolean,
|
|
318
|
-
/**
|
|
319
|
-
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
|
|
320
|
-
*
|
|
321
|
-
* This may improve scroll performance for large lists.
|
|
322
|
-
*/
|
|
323
|
-
removeClippedSubviews?: boolean,
|
|
324
|
-
/**
|
|
325
|
-
* Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
|
|
326
|
-
*/
|
|
327
|
-
renderScrollComponent?: (props: Object) => React.Element<any>,
|
|
328
|
-
/**
|
|
329
|
-
* Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
|
|
330
|
-
* screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
|
|
331
|
-
*/
|
|
332
|
-
updateCellsBatchingPeriod?: ?number,
|
|
333
|
-
/**
|
|
334
|
-
* See `ViewabilityHelper` for flow type and further documentation.
|
|
335
|
-
*/
|
|
336
|
-
viewabilityConfig?: ViewabilityConfig,
|
|
337
|
-
/**
|
|
338
|
-
* List of ViewabilityConfig/onViewableItemsChanged pairs. A specific onViewableItemsChanged
|
|
339
|
-
* will be called when its corresponding ViewabilityConfig's conditions are met.
|
|
340
|
-
*/
|
|
341
|
-
viewabilityConfigCallbackPairs?: Array<ViewabilityConfigCallbackPair>,
|
|
342
|
-
/**
|
|
343
|
-
* Determines the maximum number of items rendered outside of the visible area, in units of
|
|
344
|
-
* visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will
|
|
345
|
-
* render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
|
|
346
|
-
* this number will reduce memory consumption and may improve performance, but will increase the
|
|
347
|
-
* chance that fast scrolling may reveal momentary blank areas of unrendered content.
|
|
348
|
-
*/
|
|
349
|
-
windowSize?: ?number,
|
|
350
|
-
/**
|
|
351
|
-
* The legacy implementation is no longer supported.
|
|
352
|
-
*/
|
|
353
|
-
legacyImplementation?: empty,
|
|
354
|
-
|};
|
|
355
|
-
|
|
356
|
-
type Props = {|
|
|
357
|
-
...React.ElementConfig<typeof ScrollView>,
|
|
358
|
-
...RequiredProps,
|
|
359
|
-
...OptionalProps,
|
|
360
|
-
|};
|
|
361
|
-
|
|
362
|
-
let _usedIndexForKey = false;
|
|
363
|
-
let _keylessItemComponentName: string = '';
|
|
364
|
-
|
|
365
71
|
type State = {
|
|
366
|
-
|
|
367
|
-
last: number,
|
|
368
|
-
selectedRowIndex: number, //
|
|
369
|
-
...
|
|
72
|
+
renderMask: CellRenderMask,
|
|
73
|
+
cellsAroundViewport: {first: number, last: number},
|
|
74
|
+
selectedRowIndex: number, // [macOS]
|
|
370
75
|
};
|
|
371
76
|
|
|
372
77
|
/**
|
|
@@ -404,6 +109,19 @@ function windowSizeOrDefault(windowSize: ?number) {
|
|
|
404
109
|
return windowSize ?? 21;
|
|
405
110
|
}
|
|
406
111
|
|
|
112
|
+
function findLastWhere<T>(
|
|
113
|
+
arr: $ReadOnlyArray<T>,
|
|
114
|
+
predicate: (element: T) => boolean,
|
|
115
|
+
): T | null {
|
|
116
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
117
|
+
if (predicate(arr[i])) {
|
|
118
|
+
return arr[i];
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
|
|
407
125
|
/**
|
|
408
126
|
* Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist)
|
|
409
127
|
* and [`<SectionList>`](https://reactnative.dev/docs/sectionlist) components, which are also better
|
|
@@ -433,14 +151,17 @@ function windowSizeOrDefault(windowSize: ?number) {
|
|
|
433
151
|
* - As an effort to remove defaultProps, use helper functions when referencing certain props
|
|
434
152
|
*
|
|
435
153
|
*/
|
|
436
|
-
class VirtualizedList extends
|
|
154
|
+
export default class VirtualizedList extends StateSafePureComponent<
|
|
155
|
+
Props,
|
|
156
|
+
State,
|
|
157
|
+
> {
|
|
437
158
|
static contextType: typeof VirtualizedListContext = VirtualizedListContext;
|
|
438
159
|
|
|
439
160
|
// scrollToEnd may be janky without getItemLayout prop
|
|
440
161
|
scrollToEnd(params?: ?{animated?: ?boolean, ...}) {
|
|
441
162
|
const animated = params ? params.animated : true;
|
|
442
163
|
const veryLast = this.props.getItemCount(this.props.data) - 1;
|
|
443
|
-
const frame = this.
|
|
164
|
+
const frame = this.__getFrameMetricsApprox(veryLast, this.props);
|
|
444
165
|
const offset = Math.max(
|
|
445
166
|
0,
|
|
446
167
|
frame.offset +
|
|
@@ -476,7 +197,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
476
197
|
viewOffset?: number,
|
|
477
198
|
viewPosition?: number,
|
|
478
199
|
...
|
|
479
|
-
}) {
|
|
200
|
+
}): $FlowFixMe {
|
|
480
201
|
const {
|
|
481
202
|
data,
|
|
482
203
|
horizontal,
|
|
@@ -514,11 +235,11 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
514
235
|
});
|
|
515
236
|
return;
|
|
516
237
|
}
|
|
517
|
-
const frame = this.
|
|
238
|
+
const frame = this.__getFrameMetricsApprox(Math.floor(index), this.props);
|
|
518
239
|
const offset =
|
|
519
240
|
Math.max(
|
|
520
241
|
0,
|
|
521
|
-
|
|
242
|
+
this._getOffsetApprox(index, this.props) -
|
|
522
243
|
(viewPosition || 0) *
|
|
523
244
|
(this._scrollMetrics.visibleLength - frame.length),
|
|
524
245
|
) - (viewOffset || 0);
|
|
@@ -546,6 +267,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
546
267
|
scrollToItem(params: {
|
|
547
268
|
animated?: ?boolean,
|
|
548
269
|
item: Item,
|
|
270
|
+
viewOffset?: number,
|
|
549
271
|
viewPosition?: number,
|
|
550
272
|
...
|
|
551
273
|
}) {
|
|
@@ -593,9 +315,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
593
315
|
);
|
|
594
316
|
}
|
|
595
317
|
|
|
596
|
-
// [
|
|
318
|
+
// [macOS
|
|
597
319
|
ensureItemAtIndexIsVisible(rowIndex: number) {
|
|
598
|
-
const frame = this.
|
|
320
|
+
const frame = this.__getFrameMetricsApprox(rowIndex, this.props);
|
|
599
321
|
const visTop = this._scrollMetrics.offset;
|
|
600
322
|
const visLen = this._scrollMetrics.visibleLength;
|
|
601
323
|
const visEnd = visTop + visLen;
|
|
@@ -614,16 +336,16 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
614
336
|
selectRowAtIndex(rowIndex: number) {
|
|
615
337
|
this._selectRowAtIndex(rowIndex);
|
|
616
338
|
}
|
|
617
|
-
// ]
|
|
339
|
+
// macOS]
|
|
618
340
|
|
|
619
341
|
recordInteraction() {
|
|
620
342
|
this._nestedChildLists.forEach(childList => {
|
|
621
|
-
childList.
|
|
343
|
+
childList.recordInteraction();
|
|
622
344
|
});
|
|
623
345
|
this._viewabilityTuples.forEach(t => {
|
|
624
346
|
t.viewabilityHelper.recordInteraction();
|
|
625
347
|
});
|
|
626
|
-
this._updateViewableItems(this.props.
|
|
348
|
+
this._updateViewableItems(this.props, this.state.cellsAroundViewport);
|
|
627
349
|
}
|
|
628
350
|
|
|
629
351
|
flashScrollIndicators() {
|
|
@@ -649,7 +371,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
649
371
|
if (this._scrollRef && this._scrollRef.getScrollableNode) {
|
|
650
372
|
return this._scrollRef.getScrollableNode();
|
|
651
373
|
} else {
|
|
652
|
-
return
|
|
374
|
+
return findNodeHandle(this._scrollRef);
|
|
653
375
|
}
|
|
654
376
|
}
|
|
655
377
|
|
|
@@ -673,19 +395,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
673
395
|
return this.context?.cellKey || 'rootList';
|
|
674
396
|
}
|
|
675
397
|
|
|
676
|
-
|
|
677
|
-
return this.props.listKey || this._getCellKey();
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
_getDebugInfo(): ListDebugInfo {
|
|
681
|
-
return {
|
|
682
|
-
listKey: this._getListKey(),
|
|
683
|
-
cellKey: this._getCellKey(),
|
|
684
|
-
horizontal: horizontalOrDefault(this.props.horizontal),
|
|
685
|
-
parent: this.context?.debugInfo,
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
|
|
398
|
+
// $FlowFixMe[missing-local-annot]
|
|
689
399
|
_getScrollMetrics = () => {
|
|
690
400
|
return this._scrollMetrics;
|
|
691
401
|
};
|
|
@@ -694,6 +404,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
694
404
|
return this._hasMore;
|
|
695
405
|
}
|
|
696
406
|
|
|
407
|
+
// $FlowFixMe[missing-local-annot]
|
|
697
408
|
_getOutermostParentListRef = () => {
|
|
698
409
|
if (this._isNestedWithSameOrientation()) {
|
|
699
410
|
return this.context.getOutermostParentListRef();
|
|
@@ -702,56 +413,20 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
702
413
|
}
|
|
703
414
|
};
|
|
704
415
|
|
|
705
|
-
_getNestedChildState = (key: string): ?ChildListState => {
|
|
706
|
-
const existingChildData = this._nestedChildLists.get(key);
|
|
707
|
-
return existingChildData && existingChildData.state;
|
|
708
|
-
};
|
|
709
|
-
|
|
710
416
|
_registerAsNestedChild = (childList: {
|
|
711
417
|
cellKey: string,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
...
|
|
716
|
-
}): ?ChildListState => {
|
|
717
|
-
// Register the mapping between this child key and the cellKey for its cell
|
|
718
|
-
const childListsInCell =
|
|
719
|
-
this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();
|
|
720
|
-
childListsInCell.add(childList.key);
|
|
721
|
-
this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);
|
|
722
|
-
const existingChildData = this._nestedChildLists.get(childList.key);
|
|
723
|
-
if (existingChildData && existingChildData.ref !== null) {
|
|
724
|
-
console.error(
|
|
725
|
-
'A VirtualizedList contains a cell which itself contains ' +
|
|
726
|
-
'more than one VirtualizedList of the same orientation as the parent ' +
|
|
727
|
-
'list. You must pass a unique listKey prop to each sibling list.\n\n' +
|
|
728
|
-
describeNestedLists({
|
|
729
|
-
...childList,
|
|
730
|
-
// We're called from the child's componentDidMount, so it's safe to
|
|
731
|
-
// read the child's props here (albeit weird).
|
|
732
|
-
horizontal: !!childList.ref.props.horizontal,
|
|
733
|
-
}),
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
this._nestedChildLists.set(childList.key, {
|
|
737
|
-
ref: childList.ref,
|
|
738
|
-
state: null,
|
|
739
|
-
});
|
|
740
|
-
|
|
418
|
+
ref: React.ElementRef<typeof VirtualizedList>,
|
|
419
|
+
}): void => {
|
|
420
|
+
this._nestedChildLists.add(childList.ref, childList.cellKey);
|
|
741
421
|
if (this._hasInteracted) {
|
|
742
422
|
childList.ref.recordInteraction();
|
|
743
423
|
}
|
|
744
424
|
};
|
|
745
425
|
|
|
746
426
|
_unregisterAsNestedChild = (childList: {
|
|
747
|
-
|
|
748
|
-
state: ChildListState,
|
|
749
|
-
...
|
|
427
|
+
ref: React.ElementRef<typeof VirtualizedList>,
|
|
750
428
|
}): void => {
|
|
751
|
-
this._nestedChildLists.
|
|
752
|
-
ref: null,
|
|
753
|
-
state: childList.state,
|
|
754
|
-
});
|
|
429
|
+
this._nestedChildLists.remove(childList.ref);
|
|
755
430
|
};
|
|
756
431
|
|
|
757
432
|
state: State;
|
|
@@ -769,6 +444,11 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
769
444
|
'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.',
|
|
770
445
|
);
|
|
771
446
|
|
|
447
|
+
invariant(
|
|
448
|
+
props.getItemCount,
|
|
449
|
+
'VirtualizedList: The "getItemCount" prop must be provided',
|
|
450
|
+
);
|
|
451
|
+
|
|
772
452
|
this._fillRateHelper = new FillRateHelper(this._getFrameMetrics);
|
|
773
453
|
this._updateCellsToRenderBatcher = new Batchinator(
|
|
774
454
|
this._updateCellsToRender,
|
|
@@ -792,56 +472,211 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
792
472
|
}
|
|
793
473
|
}
|
|
794
474
|
|
|
795
|
-
|
|
796
|
-
|
|
475
|
+
invariant(
|
|
476
|
+
!this.context,
|
|
477
|
+
'Unexpectedly saw VirtualizedListContext available in ctor',
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
const initialRenderRegion = VirtualizedList._initialRenderRegion(props);
|
|
481
|
+
|
|
482
|
+
this.state = {
|
|
483
|
+
cellsAroundViewport: initialRenderRegion,
|
|
484
|
+
renderMask: VirtualizedList._createRenderMask(props, initialRenderRegion),
|
|
485
|
+
selectedRowIndex: this.props.initialSelectedIndex ?? -1, // [macOS]
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
static _createRenderMask(
|
|
490
|
+
props: Props,
|
|
491
|
+
cellsAroundViewport: {first: number, last: number},
|
|
492
|
+
additionalRegions?: ?$ReadOnlyArray<{first: number, last: number}>,
|
|
493
|
+
): CellRenderMask {
|
|
494
|
+
const itemCount = props.getItemCount(props.data);
|
|
495
|
+
|
|
496
|
+
invariant(
|
|
497
|
+
cellsAroundViewport.first >= 0 &&
|
|
498
|
+
cellsAroundViewport.last >= cellsAroundViewport.first - 1 &&
|
|
499
|
+
cellsAroundViewport.last < itemCount,
|
|
500
|
+
`Invalid cells around viewport "[${cellsAroundViewport.first}, ${cellsAroundViewport.last}]" was passed to VirtualizedList._createRenderMask`,
|
|
501
|
+
);
|
|
502
|
+
|
|
503
|
+
const renderMask = new CellRenderMask(itemCount);
|
|
504
|
+
|
|
505
|
+
if (itemCount > 0) {
|
|
506
|
+
const allRegions = [cellsAroundViewport, ...(additionalRegions ?? [])];
|
|
507
|
+
for (const region of allRegions) {
|
|
508
|
+
renderMask.addCells(region);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// The initially rendered cells are retained as part of the
|
|
512
|
+
// "scroll-to-top" optimization
|
|
513
|
+
if (props.initialScrollIndex == null || props.initialScrollIndex <= 0) {
|
|
514
|
+
const initialRegion = VirtualizedList._initialRenderRegion(props);
|
|
515
|
+
renderMask.addCells(initialRegion);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// The layout coordinates of sticker headers may be off-screen while the
|
|
519
|
+
// actual header is on-screen. Keep the most recent before the viewport
|
|
520
|
+
// rendered, even if its layout coordinates are not in viewport.
|
|
521
|
+
const stickyIndicesSet = new Set(props.stickyHeaderIndices);
|
|
522
|
+
VirtualizedList._ensureClosestStickyHeader(
|
|
523
|
+
props,
|
|
524
|
+
stickyIndicesSet,
|
|
525
|
+
renderMask,
|
|
526
|
+
cellsAroundViewport.first,
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
return renderMask;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
static _initialRenderRegion(props: Props): {first: number, last: number} {
|
|
534
|
+
const itemCount = props.getItemCount(props.data);
|
|
535
|
+
const scrollIndex = Math.floor(Math.max(0, props.initialScrollIndex ?? 0));
|
|
536
|
+
|
|
537
|
+
return {
|
|
538
|
+
first: scrollIndex,
|
|
797
539
|
last:
|
|
798
540
|
Math.min(
|
|
799
|
-
|
|
800
|
-
(
|
|
801
|
-
initialNumToRenderOrDefault(this.props.initialNumToRender),
|
|
541
|
+
itemCount,
|
|
542
|
+
scrollIndex + initialNumToRenderOrDefault(props.initialNumToRender),
|
|
802
543
|
) - 1,
|
|
803
|
-
selectedRowIndex: this.props.initialSelectedIndex ?? -1, // TODO(macOS GH#774)
|
|
804
544
|
};
|
|
545
|
+
}
|
|
805
546
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
547
|
+
static _ensureClosestStickyHeader(
|
|
548
|
+
props: Props,
|
|
549
|
+
stickyIndicesSet: Set<number>,
|
|
550
|
+
renderMask: CellRenderMask,
|
|
551
|
+
cellIdx: number,
|
|
552
|
+
) {
|
|
553
|
+
const stickyOffset = props.ListHeaderComponent ? 1 : 0;
|
|
554
|
+
|
|
555
|
+
for (let itemIdx = cellIdx - 1; itemIdx >= 0; itemIdx--) {
|
|
556
|
+
if (stickyIndicesSet.has(itemIdx + stickyOffset)) {
|
|
557
|
+
renderMask.addCells({first: itemIdx, last: itemIdx});
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
_adjustCellsAroundViewport(
|
|
564
|
+
props: Props,
|
|
565
|
+
cellsAroundViewport: {first: number, last: number},
|
|
566
|
+
): {first: number, last: number} {
|
|
567
|
+
const {data, getItemCount} = props;
|
|
568
|
+
const onEndReachedThreshold = onEndReachedThresholdOrDefault(
|
|
569
|
+
props.onEndReachedThreshold,
|
|
570
|
+
);
|
|
571
|
+
this._updateViewableItems(props, cellsAroundViewport);
|
|
572
|
+
|
|
573
|
+
const {contentLength, offset, visibleLength} = this._scrollMetrics;
|
|
574
|
+
const distanceFromEnd = contentLength - visibleLength - offset;
|
|
575
|
+
|
|
576
|
+
// Wait until the scroll view metrics have been set up. And until then,
|
|
577
|
+
// we will trust the initialNumToRender suggestion
|
|
578
|
+
if (visibleLength <= 0 || contentLength <= 0) {
|
|
579
|
+
return cellsAroundViewport.last >= getItemCount(data)
|
|
580
|
+
? VirtualizedList._constrainToItemCount(cellsAroundViewport, props)
|
|
581
|
+
: cellsAroundViewport;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
let newCellsAroundViewport: {first: number, last: number};
|
|
585
|
+
if (props.disableVirtualization) {
|
|
586
|
+
const renderAhead =
|
|
587
|
+
distanceFromEnd < onEndReachedThreshold * visibleLength
|
|
588
|
+
? maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch)
|
|
589
|
+
: 0;
|
|
590
|
+
|
|
591
|
+
newCellsAroundViewport = {
|
|
592
|
+
first: 0,
|
|
593
|
+
last: Math.min(
|
|
594
|
+
cellsAroundViewport.last + renderAhead,
|
|
595
|
+
getItemCount(data) - 1,
|
|
596
|
+
),
|
|
597
|
+
};
|
|
598
|
+
} else {
|
|
599
|
+
// If we have a non-zero initialScrollIndex and run this before we've scrolled,
|
|
600
|
+
// we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.
|
|
601
|
+
// So let's wait until we've scrolled the view to the right place. And until then,
|
|
602
|
+
// we will trust the initialScrollIndex suggestion.
|
|
603
|
+
|
|
604
|
+
// Thus, we want to recalculate the windowed render limits if any of the following hold:
|
|
605
|
+
// - initialScrollIndex is undefined or is 0
|
|
606
|
+
// - initialScrollIndex > 0 AND scrolling is complete
|
|
607
|
+
// - initialScrollIndex > 0 AND the end of the list is visible (this handles the case
|
|
608
|
+
// where the list is shorter than the visible area)
|
|
609
|
+
if (
|
|
610
|
+
props.initialScrollIndex &&
|
|
611
|
+
!this._scrollMetrics.offset &&
|
|
612
|
+
Math.abs(distanceFromEnd) >= Number.EPSILON
|
|
613
|
+
) {
|
|
614
|
+
return cellsAroundViewport.last >= getItemCount(data)
|
|
615
|
+
? VirtualizedList._constrainToItemCount(cellsAroundViewport, props)
|
|
616
|
+
: cellsAroundViewport;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
newCellsAroundViewport = computeWindowedRenderLimits(
|
|
620
|
+
props,
|
|
621
|
+
maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch),
|
|
622
|
+
windowSizeOrDefault(props.windowSize),
|
|
623
|
+
cellsAroundViewport,
|
|
624
|
+
this.__getFrameMetricsApprox,
|
|
625
|
+
this._scrollMetrics,
|
|
626
|
+
);
|
|
627
|
+
invariant(
|
|
628
|
+
newCellsAroundViewport.last < getItemCount(data),
|
|
629
|
+
'computeWindowedRenderLimits() should return range in-bounds',
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
if (this._nestedChildLists.size() > 0) {
|
|
634
|
+
// If some cell in the new state has a child list in it, we should only render
|
|
635
|
+
// up through that item, so that we give that list a chance to render.
|
|
636
|
+
// Otherwise there's churn from multiple child lists mounting and un-mounting
|
|
637
|
+
// their items.
|
|
638
|
+
|
|
639
|
+
// Will this prevent rendering if the nested list doesn't realize the end?
|
|
640
|
+
const childIdx = this._findFirstChildWithMore(
|
|
641
|
+
newCellsAroundViewport.first,
|
|
642
|
+
newCellsAroundViewport.last,
|
|
643
|
+
);
|
|
644
|
+
|
|
645
|
+
newCellsAroundViewport.last = childIdx ?? newCellsAroundViewport.last;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return newCellsAroundViewport;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
_findFirstChildWithMore(first: number, last: number): number | null {
|
|
652
|
+
for (let ii = first; ii <= last; ii++) {
|
|
653
|
+
const cellKeyForIndex = this._indicesToKeys.get(ii);
|
|
654
|
+
if (
|
|
655
|
+
cellKeyForIndex != null &&
|
|
656
|
+
this._nestedChildLists.anyInCell(cellKeyForIndex, childList =>
|
|
657
|
+
childList.hasMore(),
|
|
658
|
+
)
|
|
659
|
+
) {
|
|
660
|
+
return ii;
|
|
812
661
|
}
|
|
813
662
|
}
|
|
814
663
|
|
|
815
|
-
|
|
664
|
+
return null;
|
|
816
665
|
}
|
|
817
666
|
|
|
818
667
|
componentDidMount() {
|
|
819
668
|
if (this._isNestedWithSameOrientation()) {
|
|
820
669
|
this.context.registerAsNestedChild({
|
|
821
|
-
cellKey: this._getCellKey(),
|
|
822
|
-
key: this._getListKey(),
|
|
823
670
|
ref: this,
|
|
824
|
-
|
|
825
|
-
// the parent's props. This is why we explicitly propagate debugInfo
|
|
826
|
-
// "down" via context and "up" again via this method call on the
|
|
827
|
-
// parent.
|
|
828
|
-
parentDebugInfo: this.context.debugInfo,
|
|
671
|
+
cellKey: this.context.cellKey,
|
|
829
672
|
});
|
|
830
673
|
}
|
|
831
674
|
}
|
|
832
675
|
|
|
833
676
|
componentWillUnmount() {
|
|
834
677
|
if (this._isNestedWithSameOrientation()) {
|
|
835
|
-
this.context.unregisterAsNestedChild({
|
|
836
|
-
key: this._getListKey(),
|
|
837
|
-
state: {
|
|
838
|
-
first: this.state.first,
|
|
839
|
-
last: this.state.last,
|
|
840
|
-
frames: this._frames,
|
|
841
|
-
},
|
|
842
|
-
});
|
|
678
|
+
this.context.unregisterAsNestedChild({ref: this});
|
|
843
679
|
}
|
|
844
|
-
this._updateViewableItems(null);
|
|
845
680
|
this._updateCellsToRenderBatcher.dispose({abort: true});
|
|
846
681
|
this._viewabilityTuples.forEach(tuple => {
|
|
847
682
|
tuple.viewabilityHelper.dispose();
|
|
@@ -850,22 +685,26 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
850
685
|
}
|
|
851
686
|
|
|
852
687
|
static getDerivedStateFromProps(newProps: Props, prevState: State): State {
|
|
853
|
-
const {data, getItemCount} = newProps;
|
|
854
|
-
const maxToRenderPerBatch = maxToRenderPerBatchOrDefault(
|
|
855
|
-
newProps.maxToRenderPerBatch,
|
|
856
|
-
);
|
|
857
688
|
// first and last could be stale (e.g. if a new, shorter items props is passed in), so we make
|
|
858
689
|
// sure we're rendering a reasonable range here.
|
|
690
|
+
const itemCount = newProps.getItemCount(newProps.data);
|
|
691
|
+
if (itemCount === prevState.renderMask.numCells()) {
|
|
692
|
+
return prevState;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
const constrainedCells = VirtualizedList._constrainToItemCount(
|
|
696
|
+
prevState.cellsAroundViewport,
|
|
697
|
+
newProps,
|
|
698
|
+
);
|
|
699
|
+
|
|
859
700
|
return {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
),
|
|
864
|
-
last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1)),
|
|
701
|
+
cellsAroundViewport: constrainedCells,
|
|
702
|
+
renderMask: VirtualizedList._createRenderMask(newProps, constrainedCells),
|
|
703
|
+
// [macOS
|
|
865
704
|
selectedRowIndex: Math.max(
|
|
866
705
|
-1, // Used to indicate no row is selected
|
|
867
|
-
Math.min(prevState.selectedRowIndex,
|
|
868
|
-
), //
|
|
706
|
+
Math.min(prevState.selectedRowIndex, itemCount),
|
|
707
|
+
), // macOS]
|
|
869
708
|
};
|
|
870
709
|
}
|
|
871
710
|
|
|
@@ -880,18 +719,23 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
880
719
|
const {
|
|
881
720
|
CellRendererComponent,
|
|
882
721
|
ItemSeparatorComponent,
|
|
722
|
+
ListHeaderComponent,
|
|
723
|
+
ListItemComponent,
|
|
883
724
|
data,
|
|
725
|
+
debug,
|
|
884
726
|
getItem,
|
|
885
727
|
getItemCount,
|
|
728
|
+
getItemLayout,
|
|
886
729
|
horizontal,
|
|
730
|
+
renderItem,
|
|
887
731
|
} = this.props;
|
|
888
|
-
const stickyOffset =
|
|
732
|
+
const stickyOffset = ListHeaderComponent ? 1 : 0;
|
|
889
733
|
const end = getItemCount(data) - 1;
|
|
890
734
|
let prevCellKey;
|
|
891
735
|
last = Math.min(end, last);
|
|
892
736
|
for (let ii = first; ii <= last; ii++) {
|
|
893
737
|
const item = getItem(data, ii);
|
|
894
|
-
const key = this._keyExtractor(item, ii);
|
|
738
|
+
const key = this._keyExtractor(item, ii, this.props);
|
|
895
739
|
this._indicesToKeys.set(ii, key);
|
|
896
740
|
if (stickyIndicesFromProps.has(ii + stickyOffset)) {
|
|
897
741
|
stickyHeaderIndices.push(cells.length);
|
|
@@ -900,34 +744,55 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
900
744
|
<CellRenderer
|
|
901
745
|
CellRendererComponent={CellRendererComponent}
|
|
902
746
|
ItemSeparatorComponent={ii < end ? ItemSeparatorComponent : undefined}
|
|
747
|
+
ListItemComponent={ListItemComponent}
|
|
903
748
|
cellKey={key}
|
|
749
|
+
debug={debug}
|
|
904
750
|
fillRateHelper={this._fillRateHelper}
|
|
751
|
+
getItemLayout={getItemLayout}
|
|
905
752
|
horizontal={horizontal}
|
|
906
753
|
index={ii}
|
|
907
754
|
inversionStyle={inversionStyle}
|
|
908
755
|
item={item}
|
|
909
|
-
// [
|
|
756
|
+
// [macOS
|
|
910
757
|
isSelected={
|
|
911
758
|
this.props.enableSelectionOnKeyPress &&
|
|
912
759
|
this.state.selectedRowIndex === ii
|
|
913
760
|
? true
|
|
914
761
|
: false
|
|
915
|
-
} //
|
|
762
|
+
} // macOS]
|
|
916
763
|
key={key}
|
|
917
764
|
prevCellKey={prevCellKey}
|
|
765
|
+
onCellLayout={this._onCellLayout}
|
|
918
766
|
onUpdateSeparators={this._onUpdateSeparators}
|
|
919
|
-
|
|
767
|
+
onCellFocusCapture={e => this._onCellFocusCapture(key)}
|
|
920
768
|
onUnmount={this._onCellUnmount}
|
|
921
|
-
parentProps={this.props}
|
|
922
769
|
ref={ref => {
|
|
923
770
|
this._cellRefs[key] = ref;
|
|
924
771
|
}}
|
|
772
|
+
renderItem={renderItem}
|
|
925
773
|
/>,
|
|
926
774
|
);
|
|
927
775
|
prevCellKey = key;
|
|
928
776
|
}
|
|
929
777
|
}
|
|
930
778
|
|
|
779
|
+
static _constrainToItemCount(
|
|
780
|
+
cells: {first: number, last: number},
|
|
781
|
+
props: Props,
|
|
782
|
+
): {first: number, last: number} {
|
|
783
|
+
const itemCount = props.getItemCount(props.data);
|
|
784
|
+
const last = Math.min(itemCount - 1, cells.last);
|
|
785
|
+
|
|
786
|
+
const maxToRenderPerBatch = maxToRenderPerBatchOrDefault(
|
|
787
|
+
props.maxToRenderPerBatch,
|
|
788
|
+
);
|
|
789
|
+
|
|
790
|
+
return {
|
|
791
|
+
first: clamp(0, itemCount - 1 - maxToRenderPerBatch, cells.first),
|
|
792
|
+
last,
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
|
|
931
796
|
_onUpdateSeparators = (keys: Array<?string>, newProps: Object) => {
|
|
932
797
|
keys.forEach(key => {
|
|
933
798
|
const ref = key != null && this._cellRefs[key];
|
|
@@ -935,10 +800,6 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
935
800
|
});
|
|
936
801
|
};
|
|
937
802
|
|
|
938
|
-
_isVirtualizationDisabled(): boolean {
|
|
939
|
-
return this.props.disableVirtualization || false;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
803
|
_isNestedWithSameOrientation(): boolean {
|
|
943
804
|
const nestedContext = this.context;
|
|
944
805
|
return !!(
|
|
@@ -950,9 +811,17 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
950
811
|
_getSpacerKey = (isVertical: boolean): string =>
|
|
951
812
|
isVertical ? 'height' : 'width';
|
|
952
813
|
|
|
953
|
-
_keyExtractor(
|
|
954
|
-
|
|
955
|
-
|
|
814
|
+
_keyExtractor(
|
|
815
|
+
item: Item,
|
|
816
|
+
index: number,
|
|
817
|
+
props: {
|
|
818
|
+
keyExtractor?: ?(item: Item, index: number) => string,
|
|
819
|
+
...
|
|
820
|
+
},
|
|
821
|
+
// $FlowFixMe[missing-local-annot]
|
|
822
|
+
) {
|
|
823
|
+
if (props.keyExtractor != null) {
|
|
824
|
+
return props.keyExtractor(item, index);
|
|
956
825
|
}
|
|
957
826
|
|
|
958
827
|
const key = defaultKeyExtractor(item, index);
|
|
@@ -978,15 +847,18 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
978
847
|
const {ListEmptyComponent, ListFooterComponent, ListHeaderComponent} =
|
|
979
848
|
this.props;
|
|
980
849
|
const {data, horizontal} = this.props;
|
|
981
|
-
|
|
982
|
-
const inversionStyle =
|
|
983
|
-
|
|
984
|
-
?
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
850
|
+
// macOS natively supports inverted lists, thus not needing an inversion style
|
|
851
|
+
const inversionStyle =
|
|
852
|
+
this.props.inverted && Platform.OS !== 'macos' // [macOS]
|
|
853
|
+
? horizontalOrDefault(this.props.horizontal)
|
|
854
|
+
? styles.horizontallyInverted
|
|
855
|
+
: styles.verticallyInverted
|
|
856
|
+
: null;
|
|
857
|
+
const cells: Array<any | React.Node> = [];
|
|
988
858
|
const stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
|
989
859
|
const stickyHeaderIndices = [];
|
|
860
|
+
|
|
861
|
+
// 1. Add cell for ListHeaderComponent
|
|
990
862
|
if (ListHeaderComponent) {
|
|
991
863
|
if (stickyIndicesFromProps.has(0)) {
|
|
992
864
|
stickyHeaderIndices.push(0);
|
|
@@ -1016,77 +888,91 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1016
888
|
</VirtualizedListCellContextProvider>,
|
|
1017
889
|
);
|
|
1018
890
|
}
|
|
891
|
+
|
|
892
|
+
// 2a. Add a cell for ListEmptyComponent if applicable
|
|
1019
893
|
const itemCount = this.props.getItemCount(data);
|
|
894
|
+
if (itemCount === 0 && ListEmptyComponent) {
|
|
895
|
+
const element: React.Element<any> = ((React.isValidElement(
|
|
896
|
+
ListEmptyComponent,
|
|
897
|
+
) ? (
|
|
898
|
+
ListEmptyComponent
|
|
899
|
+
) : (
|
|
900
|
+
// $FlowFixMe[not-a-component]
|
|
901
|
+
// $FlowFixMe[incompatible-type-arg]
|
|
902
|
+
<ListEmptyComponent />
|
|
903
|
+
)): any);
|
|
904
|
+
cells.push(
|
|
905
|
+
<VirtualizedListCellContextProvider
|
|
906
|
+
cellKey={this._getCellKey() + '-empty'}
|
|
907
|
+
key="$empty">
|
|
908
|
+
{React.cloneElement(element, {
|
|
909
|
+
onLayout: (event: LayoutEvent) => {
|
|
910
|
+
this._onLayoutEmpty(event);
|
|
911
|
+
if (element.props.onLayout) {
|
|
912
|
+
element.props.onLayout(event);
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
style: StyleSheet.compose(inversionStyle, element.props.style),
|
|
916
|
+
})}
|
|
917
|
+
</VirtualizedListCellContextProvider>,
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
// 2b. Add cells and spacers for each item
|
|
1020
922
|
if (itemCount > 0) {
|
|
1021
923
|
_usedIndexForKey = false;
|
|
1022
924
|
_keylessItemComponentName = '';
|
|
1023
925
|
const spacerKey = this._getSpacerKey(!horizontal);
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
inversionStyle,
|
|
1035
|
-
);
|
|
1036
|
-
const firstAfterInitial = Math.max(lastInitialIndex + 1, first);
|
|
1037
|
-
if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {
|
|
1038
|
-
let insertedStickySpacer = false;
|
|
1039
|
-
if (stickyIndicesFromProps.size > 0) {
|
|
1040
|
-
const stickyOffset = ListHeaderComponent ? 1 : 0;
|
|
1041
|
-
// See if there are any sticky headers in the virtualized space that we need to render.
|
|
1042
|
-
for (let ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {
|
|
1043
|
-
if (stickyIndicesFromProps.has(ii + stickyOffset)) {
|
|
1044
|
-
const initBlock = this._getFrameMetricsApprox(lastInitialIndex);
|
|
1045
|
-
const stickyBlock = this._getFrameMetricsApprox(ii);
|
|
1046
|
-
const leadSpace =
|
|
1047
|
-
stickyBlock.offset -
|
|
1048
|
-
initBlock.offset -
|
|
1049
|
-
(this.props.initialScrollIndex ? 0 : initBlock.length);
|
|
1050
|
-
cells.push(
|
|
1051
|
-
<View key="$sticky_lead" style={{[spacerKey]: leadSpace}} />,
|
|
1052
|
-
);
|
|
1053
|
-
this._pushCells(
|
|
1054
|
-
cells,
|
|
1055
|
-
stickyHeaderIndices,
|
|
1056
|
-
stickyIndicesFromProps,
|
|
1057
|
-
ii,
|
|
1058
|
-
ii,
|
|
1059
|
-
inversionStyle,
|
|
1060
|
-
);
|
|
1061
|
-
const trailSpace =
|
|
1062
|
-
this._getFrameMetricsApprox(first).offset -
|
|
1063
|
-
(stickyBlock.offset + stickyBlock.length);
|
|
1064
|
-
cells.push(
|
|
1065
|
-
<View key="$sticky_trail" style={{[spacerKey]: trailSpace}} />,
|
|
1066
|
-
);
|
|
1067
|
-
insertedStickySpacer = true;
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
926
|
+
|
|
927
|
+
const renderRegions = this.state.renderMask.enumerateRegions();
|
|
928
|
+
const lastSpacer = findLastWhere(renderRegions, r => r.isSpacer);
|
|
929
|
+
|
|
930
|
+
for (const section of renderRegions) {
|
|
931
|
+
if (section.isSpacer) {
|
|
932
|
+
// Legacy behavior is to avoid spacers when virtualization is
|
|
933
|
+
// disabled (including head spacers on initial render).
|
|
934
|
+
if (this.props.disableVirtualization) {
|
|
935
|
+
continue;
|
|
1070
936
|
}
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
937
|
+
|
|
938
|
+
// Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to
|
|
939
|
+
// prevent the user for hyperscrolling into un-measured area because otherwise content will
|
|
940
|
+
// likely jump around as it renders in above the viewport.
|
|
941
|
+
const isLastSpacer = section === lastSpacer;
|
|
942
|
+
const constrainToMeasured = isLastSpacer && !this.props.getItemLayout;
|
|
943
|
+
const last = constrainToMeasured
|
|
944
|
+
? clamp(
|
|
945
|
+
section.first - 1,
|
|
946
|
+
section.last,
|
|
947
|
+
this._highestMeasuredFrameIndex,
|
|
948
|
+
)
|
|
949
|
+
: section.last;
|
|
950
|
+
|
|
951
|
+
const firstMetrics = this.__getFrameMetricsApprox(
|
|
952
|
+
section.first,
|
|
953
|
+
this.props,
|
|
954
|
+
);
|
|
955
|
+
const lastMetrics = this.__getFrameMetricsApprox(last, this.props);
|
|
956
|
+
const spacerSize =
|
|
957
|
+
lastMetrics.offset + lastMetrics.length - firstMetrics.offset;
|
|
1077
958
|
cells.push(
|
|
1078
|
-
<View
|
|
959
|
+
<View
|
|
960
|
+
key={`$spacer-${section.first}`}
|
|
961
|
+
style={{[spacerKey]: spacerSize}}
|
|
962
|
+
/>,
|
|
963
|
+
);
|
|
964
|
+
} else {
|
|
965
|
+
this._pushCells(
|
|
966
|
+
cells,
|
|
967
|
+
stickyHeaderIndices,
|
|
968
|
+
stickyIndicesFromProps,
|
|
969
|
+
section.first,
|
|
970
|
+
section.last,
|
|
971
|
+
inversionStyle,
|
|
1079
972
|
);
|
|
1080
973
|
}
|
|
1081
974
|
}
|
|
1082
|
-
|
|
1083
|
-
cells,
|
|
1084
|
-
stickyHeaderIndices,
|
|
1085
|
-
stickyIndicesFromProps,
|
|
1086
|
-
firstAfterInitial,
|
|
1087
|
-
last,
|
|
1088
|
-
inversionStyle,
|
|
1089
|
-
);
|
|
975
|
+
|
|
1090
976
|
if (!this._hasWarned.keys && _usedIndexForKey) {
|
|
1091
977
|
console.warn(
|
|
1092
978
|
'VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' +
|
|
@@ -1095,46 +981,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1095
981
|
);
|
|
1096
982
|
this._hasWarned.keys = true;
|
|
1097
983
|
}
|
|
1098
|
-
if (!isVirtualizationDisabled && last < itemCount - 1) {
|
|
1099
|
-
const lastFrame = this._getFrameMetricsApprox(last);
|
|
1100
|
-
// Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to
|
|
1101
|
-
// prevent the user for hyperscrolling into un-measured area because otherwise content will
|
|
1102
|
-
// likely jump around as it renders in above the viewport.
|
|
1103
|
-
const end = this.props.getItemLayout
|
|
1104
|
-
? itemCount - 1
|
|
1105
|
-
: Math.min(itemCount - 1, this._highestMeasuredFrameIndex);
|
|
1106
|
-
const endFrame = this._getFrameMetricsApprox(end);
|
|
1107
|
-
const tailSpacerLength =
|
|
1108
|
-
endFrame.offset +
|
|
1109
|
-
endFrame.length -
|
|
1110
|
-
(lastFrame.offset + lastFrame.length);
|
|
1111
|
-
cells.push(
|
|
1112
|
-
<View key="$tail_spacer" style={{[spacerKey]: tailSpacerLength}} />,
|
|
1113
|
-
);
|
|
1114
|
-
}
|
|
1115
|
-
} else if (ListEmptyComponent) {
|
|
1116
|
-
const element: React.Element<any> = ((React.isValidElement(
|
|
1117
|
-
ListEmptyComponent,
|
|
1118
|
-
) ? (
|
|
1119
|
-
ListEmptyComponent
|
|
1120
|
-
) : (
|
|
1121
|
-
// $FlowFixMe[not-a-component]
|
|
1122
|
-
// $FlowFixMe[incompatible-type-arg]
|
|
1123
|
-
<ListEmptyComponent />
|
|
1124
|
-
)): any);
|
|
1125
|
-
cells.push(
|
|
1126
|
-
React.cloneElement(element, {
|
|
1127
|
-
key: '$empty',
|
|
1128
|
-
onLayout: event => {
|
|
1129
|
-
this._onLayoutEmpty(event);
|
|
1130
|
-
if (element.props.onLayout) {
|
|
1131
|
-
element.props.onLayout(event);
|
|
1132
|
-
}
|
|
1133
|
-
},
|
|
1134
|
-
style: StyleSheet.compose(inversionStyle, element.props.style),
|
|
1135
|
-
}),
|
|
1136
|
-
);
|
|
1137
984
|
}
|
|
985
|
+
|
|
986
|
+
// 3. Add cell for ListFooterComponent
|
|
1138
987
|
if (ListFooterComponent) {
|
|
1139
988
|
const element = React.isValidElement(ListFooterComponent) ? (
|
|
1140
989
|
ListFooterComponent
|
|
@@ -1161,6 +1010,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1161
1010
|
</VirtualizedListCellContextProvider>,
|
|
1162
1011
|
);
|
|
1163
1012
|
}
|
|
1013
|
+
|
|
1014
|
+
// 4. Render the ScrollView
|
|
1164
1015
|
const scrollProps = {
|
|
1165
1016
|
...this.props,
|
|
1166
1017
|
onContentSizeChange: this._onContentSizeChange,
|
|
@@ -1183,8 +1034,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1183
1034
|
: this.props.style,
|
|
1184
1035
|
};
|
|
1185
1036
|
|
|
1186
|
-
this._hasMore =
|
|
1187
|
-
this.state.last < this.props.getItemCount(this.props.data) - 1;
|
|
1037
|
+
this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;
|
|
1188
1038
|
|
|
1189
1039
|
const innerRet = (
|
|
1190
1040
|
<VirtualizedListContextProvider
|
|
@@ -1193,10 +1043,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1193
1043
|
getScrollMetrics: this._getScrollMetrics,
|
|
1194
1044
|
horizontal: horizontalOrDefault(this.props.horizontal),
|
|
1195
1045
|
getOutermostParentListRef: this._getOutermostParentListRef,
|
|
1196
|
-
getNestedChildState: this._getNestedChildState,
|
|
1197
1046
|
registerAsNestedChild: this._registerAsNestedChild,
|
|
1198
1047
|
unregisterAsNestedChild: this._unregisterAsNestedChild,
|
|
1199
|
-
debugInfo: this._getDebugInfo(),
|
|
1200
1048
|
}}>
|
|
1201
1049
|
{React.cloneElement(
|
|
1202
1050
|
(
|
|
@@ -1210,7 +1058,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1210
1058
|
)}
|
|
1211
1059
|
</VirtualizedListContextProvider>
|
|
1212
1060
|
);
|
|
1213
|
-
let ret = innerRet;
|
|
1061
|
+
let ret: React.Node = innerRet;
|
|
1214
1062
|
if (__DEV__) {
|
|
1215
1063
|
ret = (
|
|
1216
1064
|
<ScrollView.Context.Consumer>
|
|
@@ -1220,7 +1068,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1220
1068
|
!scrollContext.horizontal ===
|
|
1221
1069
|
!horizontalOrDefault(this.props.horizontal) &&
|
|
1222
1070
|
!this._hasWarned.nesting &&
|
|
1223
|
-
this.context == null
|
|
1071
|
+
this.context == null &&
|
|
1072
|
+
this.props.scrollEnabled !== false
|
|
1224
1073
|
) {
|
|
1225
1074
|
// TODO (T46547044): use React.warn once 16.9 is sync'd: https://github.com/facebook/react/pull/15170
|
|
1226
1075
|
// TODO (GitHub #818): Use console.error (as per 646605b90e666c4b0d1c1200a137eacf62b46f87)
|
|
@@ -1274,30 +1123,32 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1274
1123
|
}
|
|
1275
1124
|
|
|
1276
1125
|
_averageCellLength = 0;
|
|
1277
|
-
|
|
1278
|
-
_cellKeysToChildListKeys: Map<string, Set<string>> = new Map();
|
|
1279
|
-
_cellRefs = {};
|
|
1126
|
+
_cellRefs: {[string]: null | CellRenderer<any>} = {};
|
|
1280
1127
|
_fillRateHelper: FillRateHelper;
|
|
1281
|
-
_frames
|
|
1128
|
+
_frames: {
|
|
1129
|
+
[string]: {
|
|
1130
|
+
inLayout?: boolean,
|
|
1131
|
+
index: number,
|
|
1132
|
+
length: number,
|
|
1133
|
+
offset: number,
|
|
1134
|
+
},
|
|
1135
|
+
} = {};
|
|
1282
1136
|
_footerLength = 0;
|
|
1283
|
-
|
|
1137
|
+
// Used for preventing scrollToIndex from being called multiple times for initialScrollIndex
|
|
1138
|
+
_hasTriggeredInitialScrollToIndex = false;
|
|
1284
1139
|
_hasInteracted = false;
|
|
1285
1140
|
_hasMore = false;
|
|
1286
|
-
_hasWarned = {};
|
|
1141
|
+
_hasWarned: {[string]: boolean} = {};
|
|
1287
1142
|
_headerLength = 0;
|
|
1288
1143
|
_hiPriInProgress: boolean = false; // flag to prevent infinite hiPri cell limit update
|
|
1289
1144
|
_highestMeasuredFrameIndex = 0;
|
|
1290
1145
|
_indicesToKeys: Map<number, string> = new Map();
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
ref: ?VirtualizedList,
|
|
1295
|
-
state: ?ChildListState,
|
|
1296
|
-
...
|
|
1297
|
-
},
|
|
1298
|
-
> = new Map();
|
|
1146
|
+
_lastFocusedCellKey: ?string = null;
|
|
1147
|
+
_nestedChildLists: ChildListCollection<VirtualizedList> =
|
|
1148
|
+
new ChildListCollection();
|
|
1299
1149
|
_offsetFromParentVirtualizedList: number = 0;
|
|
1300
1150
|
_prevParentOffset: number = 0;
|
|
1151
|
+
// $FlowFixMe[missing-local-annot]
|
|
1301
1152
|
_scrollMetrics = {
|
|
1302
1153
|
contentLength: 0,
|
|
1303
1154
|
dOffset: 0,
|
|
@@ -1306,6 +1157,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1306
1157
|
timestamp: 0,
|
|
1307
1158
|
velocity: 0,
|
|
1308
1159
|
visibleLength: 0,
|
|
1160
|
+
zoomScale: 1,
|
|
1309
1161
|
};
|
|
1310
1162
|
_scrollRef: ?React.ElementRef<any> = null;
|
|
1311
1163
|
_sentEndForContentLength = 0;
|
|
@@ -1314,6 +1166,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1314
1166
|
_updateCellsToRenderBatcher: Batchinator;
|
|
1315
1167
|
_viewabilityTuples: Array<ViewabilityHelperCallbackTuple> = [];
|
|
1316
1168
|
|
|
1169
|
+
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
|
1170
|
+
* LTI update could not be added via codemod */
|
|
1317
1171
|
_captureScrollRef = ref => {
|
|
1318
1172
|
this._scrollRef = ref;
|
|
1319
1173
|
};
|
|
@@ -1321,18 +1175,23 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1321
1175
|
_computeBlankness() {
|
|
1322
1176
|
this._fillRateHelper.computeBlankness(
|
|
1323
1177
|
this.props,
|
|
1324
|
-
this.state,
|
|
1178
|
+
this.state.cellsAroundViewport,
|
|
1325
1179
|
this._scrollMetrics,
|
|
1326
1180
|
);
|
|
1327
1181
|
}
|
|
1328
1182
|
|
|
1183
|
+
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
|
1184
|
+
* LTI update could not be added via codemod */
|
|
1329
1185
|
_defaultRenderScrollComponent = props => {
|
|
1330
|
-
// [
|
|
1186
|
+
// [macOS
|
|
1331
1187
|
const preferredScrollerStyleDidChangeHandler =
|
|
1332
1188
|
this.props.onPreferredScrollerStyleDidChange;
|
|
1189
|
+
const invertedDidChange = this.props.onInvertedDidChange;
|
|
1333
1190
|
|
|
1334
|
-
const isFirstRowSelected =
|
|
1335
|
-
|
|
1191
|
+
const isFirstRowSelected =
|
|
1192
|
+
this.state.selectedRowIndex === this.state.cellsAroundViewport.first;
|
|
1193
|
+
const isLastRowSelected =
|
|
1194
|
+
this.state.selectedRowIndex === this.state.cellsAroundViewport.last;
|
|
1336
1195
|
|
|
1337
1196
|
// Don't pass in ArrowUp/ArrowDown at the top/bottom of the list so that keyboard event can bubble
|
|
1338
1197
|
let _validKeysDown = ['Home', 'End'];
|
|
@@ -1348,7 +1207,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1348
1207
|
validKeysDown: _validKeysDown,
|
|
1349
1208
|
onKeyDown: this._handleKeyDown,
|
|
1350
1209
|
};
|
|
1351
|
-
|
|
1210
|
+
|
|
1211
|
+
// macOS]
|
|
1352
1212
|
const onRefresh = props.onRefresh;
|
|
1353
1213
|
if (this._isNestedWithSameOrientation()) {
|
|
1354
1214
|
// $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors
|
|
@@ -1362,16 +1222,20 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1362
1222
|
);
|
|
1363
1223
|
return (
|
|
1364
1224
|
// $FlowFixMe[prop-missing] Invalid prop usage
|
|
1225
|
+
// $FlowFixMe[incompatible-use]
|
|
1365
1226
|
<ScrollView
|
|
1366
|
-
// [
|
|
1227
|
+
// [macOS
|
|
1367
1228
|
{...(props.enableSelectionOnKeyPress && keyboardNavigationProps)}
|
|
1229
|
+
onInvertedDidChange={invertedDidChange}
|
|
1368
1230
|
onPreferredScrollerStyleDidChange={
|
|
1369
1231
|
preferredScrollerStyleDidChangeHandler
|
|
1370
|
-
}
|
|
1232
|
+
}
|
|
1371
1233
|
{...props}
|
|
1234
|
+
// macOS]
|
|
1372
1235
|
refreshControl={
|
|
1373
1236
|
props.refreshControl == null ? (
|
|
1374
1237
|
<RefreshControl
|
|
1238
|
+
// $FlowFixMe[incompatible-type]
|
|
1375
1239
|
refreshing={props.refreshing}
|
|
1376
1240
|
onRefresh={onRefresh}
|
|
1377
1241
|
progressViewOffset={props.progressViewOffset}
|
|
@@ -1384,19 +1248,22 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1384
1248
|
);
|
|
1385
1249
|
} else {
|
|
1386
1250
|
return (
|
|
1387
|
-
// $FlowFixMe Invalid prop usage
|
|
1251
|
+
// $FlowFixMe[prop-missing] Invalid prop usage
|
|
1252
|
+
// $FlowFixMe[incompatible-use]
|
|
1388
1253
|
<ScrollView
|
|
1389
|
-
// [
|
|
1254
|
+
// [macOS
|
|
1390
1255
|
{...(props.enableSelectionOnKeyPress && keyboardNavigationProps)}
|
|
1256
|
+
onInvertedDidChange={invertedDidChange}
|
|
1391
1257
|
onPreferredScrollerStyleDidChange={
|
|
1392
1258
|
preferredScrollerStyleDidChangeHandler
|
|
1393
|
-
} //
|
|
1259
|
+
} // macOS]
|
|
1394
1260
|
{...props}
|
|
1395
1261
|
/>
|
|
1396
1262
|
);
|
|
1397
1263
|
}
|
|
1398
1264
|
};
|
|
1399
|
-
|
|
1265
|
+
|
|
1266
|
+
_onCellLayout = (e: LayoutEvent, cellKey: string, index: number): void => {
|
|
1400
1267
|
const layout = e.nativeEvent.layout;
|
|
1401
1268
|
const next = {
|
|
1402
1269
|
offset: this._selectOffset(layout),
|
|
@@ -1428,7 +1295,23 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1428
1295
|
this._triggerRemeasureForChildListsInCell(cellKey);
|
|
1429
1296
|
|
|
1430
1297
|
this._computeBlankness();
|
|
1431
|
-
this._updateViewableItems(this.props.
|
|
1298
|
+
this._updateViewableItems(this.props, this.state.cellsAroundViewport);
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
_onCellFocusCapture(cellKey: string) {
|
|
1302
|
+
this._lastFocusedCellKey = cellKey;
|
|
1303
|
+
const renderMask = VirtualizedList._createRenderMask(
|
|
1304
|
+
this.props,
|
|
1305
|
+
this.state.cellsAroundViewport,
|
|
1306
|
+
this._getNonViewportRenderRegions(this.props),
|
|
1307
|
+
);
|
|
1308
|
+
|
|
1309
|
+
this.setState(state => {
|
|
1310
|
+
if (!renderMask.equals(state.renderMask)) {
|
|
1311
|
+
return {renderMask};
|
|
1312
|
+
}
|
|
1313
|
+
return null;
|
|
1314
|
+
});
|
|
1432
1315
|
}
|
|
1433
1316
|
|
|
1434
1317
|
_onCellUnmount = (cellKey: string) => {
|
|
@@ -1439,15 +1322,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1439
1322
|
};
|
|
1440
1323
|
|
|
1441
1324
|
_triggerRemeasureForChildListsInCell(cellKey: string): void {
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
const childList = this._nestedChildLists.get(childKey);
|
|
1446
|
-
childList &&
|
|
1447
|
-
childList.ref &&
|
|
1448
|
-
childList.ref.measureLayoutRelativeToContainingList();
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1325
|
+
this._nestedChildLists.forEachInCell(cellKey, childList => {
|
|
1326
|
+
childList.measureLayoutRelativeToContainingList();
|
|
1327
|
+
});
|
|
1451
1328
|
}
|
|
1452
1329
|
|
|
1453
1330
|
measureLayoutRelativeToContainingList(): void {
|
|
@@ -1481,15 +1358,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1481
1358
|
|
|
1482
1359
|
// If metrics of the scrollView changed, then we triggered remeasure for child list
|
|
1483
1360
|
// to ensure VirtualizedList has the right information.
|
|
1484
|
-
this.
|
|
1485
|
-
|
|
1486
|
-
for (let childKey of childListKeys) {
|
|
1487
|
-
const childList = this._nestedChildLists.get(childKey);
|
|
1488
|
-
childList &&
|
|
1489
|
-
childList.ref &&
|
|
1490
|
-
childList.ref.measureLayoutRelativeToContainingList();
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1361
|
+
this._nestedChildLists.forEach(childList => {
|
|
1362
|
+
childList.measureLayoutRelativeToContainingList();
|
|
1493
1363
|
});
|
|
1494
1364
|
}
|
|
1495
1365
|
},
|
|
@@ -1508,7 +1378,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1508
1378
|
}
|
|
1509
1379
|
}
|
|
1510
1380
|
|
|
1511
|
-
_onLayout = (e:
|
|
1381
|
+
_onLayout = (e: LayoutEvent) => {
|
|
1512
1382
|
if (this._isNestedWithSameOrientation()) {
|
|
1513
1383
|
// Need to adjust our scroll metrics to be relative to our containing
|
|
1514
1384
|
// VirtualizedList before we can make claims about list item viewability
|
|
@@ -1523,7 +1393,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1523
1393
|
this._maybeCallOnEndReached();
|
|
1524
1394
|
};
|
|
1525
1395
|
|
|
1526
|
-
_onLayoutEmpty = e => {
|
|
1396
|
+
_onLayoutEmpty = (e: LayoutEvent) => {
|
|
1527
1397
|
this.props.onLayout && this.props.onLayout(e);
|
|
1528
1398
|
};
|
|
1529
1399
|
|
|
@@ -1531,17 +1401,17 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1531
1401
|
return this._getCellKey() + '-footer';
|
|
1532
1402
|
}
|
|
1533
1403
|
|
|
1534
|
-
_onLayoutFooter = e => {
|
|
1404
|
+
_onLayoutFooter = (e: LayoutEvent) => {
|
|
1535
1405
|
this._triggerRemeasureForChildListsInCell(this._getFooterCellKey());
|
|
1536
1406
|
this._footerLength = this._selectLength(e.nativeEvent.layout);
|
|
1537
1407
|
};
|
|
1538
1408
|
|
|
1539
|
-
_onLayoutHeader = e => {
|
|
1409
|
+
_onLayoutHeader = (e: LayoutEvent) => {
|
|
1540
1410
|
this._headerLength = this._selectLength(e.nativeEvent.layout);
|
|
1541
1411
|
};
|
|
1542
1412
|
|
|
1543
|
-
// [
|
|
1544
|
-
_selectRowAtIndex = rowIndex => {
|
|
1413
|
+
// [macOS
|
|
1414
|
+
_selectRowAtIndex = (rowIndex: number) => {
|
|
1545
1415
|
const prevIndex = this.state.selectedRowIndex;
|
|
1546
1416
|
const newIndex = rowIndex;
|
|
1547
1417
|
this.setState({selectedRowIndex: newIndex});
|
|
@@ -1557,17 +1427,16 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1557
1427
|
});
|
|
1558
1428
|
}
|
|
1559
1429
|
}
|
|
1560
|
-
|
|
1561
|
-
return newIndex;
|
|
1562
1430
|
};
|
|
1563
1431
|
|
|
1564
|
-
_selectRowAboveIndex = rowIndex => {
|
|
1432
|
+
_selectRowAboveIndex = (rowIndex: number) => {
|
|
1565
1433
|
const rowAbove = rowIndex > 0 ? rowIndex - 1 : rowIndex;
|
|
1566
1434
|
this._selectRowAtIndex(rowAbove);
|
|
1567
1435
|
};
|
|
1568
1436
|
|
|
1569
|
-
_selectRowBelowIndex = rowIndex => {
|
|
1570
|
-
const rowBelow =
|
|
1437
|
+
_selectRowBelowIndex = (rowIndex: number) => {
|
|
1438
|
+
const rowBelow =
|
|
1439
|
+
rowIndex < this.state.cellsAroundViewport.last ? rowIndex + 1 : rowIndex;
|
|
1571
1440
|
this._selectRowAtIndex(rowBelow);
|
|
1572
1441
|
};
|
|
1573
1442
|
|
|
@@ -1596,7 +1465,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1596
1465
|
} else if (key === 'ArrowDown') {
|
|
1597
1466
|
if (nativeEvent.altKey) {
|
|
1598
1467
|
// Option+Down selects the last element
|
|
1599
|
-
this._selectRowAtIndex(this.state.last);
|
|
1468
|
+
this._selectRowAtIndex(this.state.cellsAroundViewport.last);
|
|
1600
1469
|
} else {
|
|
1601
1470
|
this._selectRowBelowIndex(selectedIndex);
|
|
1602
1471
|
}
|
|
@@ -1614,8 +1483,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1614
1483
|
}
|
|
1615
1484
|
}
|
|
1616
1485
|
};
|
|
1617
|
-
// ]
|
|
1486
|
+
// macOS]
|
|
1618
1487
|
|
|
1488
|
+
// $FlowFixMe[missing-local-annot]
|
|
1619
1489
|
_renderDebugOverlay() {
|
|
1620
1490
|
const normalize =
|
|
1621
1491
|
this._scrollMetrics.visibleLength /
|
|
@@ -1623,7 +1493,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1623
1493
|
const framesInLayout = [];
|
|
1624
1494
|
const itemCount = this.props.getItemCount(this.props.data);
|
|
1625
1495
|
for (let ii = 0; ii < itemCount; ii++) {
|
|
1626
|
-
const frame = this.
|
|
1496
|
+
const frame = this.__getFrameMetricsApprox(ii, this.props);
|
|
1627
1497
|
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
|
|
1628
1498
|
* suppresses an error found when Flow v0.68 was deployed. To see the
|
|
1629
1499
|
* error delete this comment and run Flow. */
|
|
@@ -1631,8 +1501,14 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1631
1501
|
framesInLayout.push(frame);
|
|
1632
1502
|
}
|
|
1633
1503
|
}
|
|
1634
|
-
const windowTop = this.
|
|
1635
|
-
|
|
1504
|
+
const windowTop = this.__getFrameMetricsApprox(
|
|
1505
|
+
this.state.cellsAroundViewport.first,
|
|
1506
|
+
this.props,
|
|
1507
|
+
).offset;
|
|
1508
|
+
const frameLast = this.__getFrameMetricsApprox(
|
|
1509
|
+
this.state.cellsAroundViewport.last,
|
|
1510
|
+
this.props,
|
|
1511
|
+
);
|
|
1636
1512
|
const windowLen = frameLast.offset + frameLast.length - windowTop;
|
|
1637
1513
|
const visTop = this._scrollMetrics.offset;
|
|
1638
1514
|
const visLen = this._scrollMetrics.visibleLength;
|
|
@@ -1702,13 +1578,22 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1702
1578
|
const {data, getItemCount, onEndReached, onEndReachedThreshold} =
|
|
1703
1579
|
this.props;
|
|
1704
1580
|
const {contentLength, visibleLength, offset} = this._scrollMetrics;
|
|
1705
|
-
|
|
1581
|
+
let distanceFromEnd = contentLength - visibleLength - offset;
|
|
1582
|
+
|
|
1583
|
+
// Especially when oERT is zero it's necessary to 'floor' very small distanceFromEnd values to be 0
|
|
1584
|
+
// since debouncing causes us to not fire this event for every single "pixel" we scroll and can thus
|
|
1585
|
+
// be at the "end" of the list with a distanceFromEnd approximating 0 but not quite there.
|
|
1586
|
+
if (distanceFromEnd < ON_END_REACHED_EPSILON) {
|
|
1587
|
+
distanceFromEnd = 0;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
// TODO: T121172172 Look into why we're "defaulting" to a threshold of 2 when oERT is not present
|
|
1706
1591
|
const threshold =
|
|
1707
1592
|
onEndReachedThreshold != null ? onEndReachedThreshold * visibleLength : 2;
|
|
1708
1593
|
if (
|
|
1709
1594
|
onEndReached &&
|
|
1710
|
-
this.state.last === getItemCount(data) - 1 &&
|
|
1711
|
-
distanceFromEnd
|
|
1595
|
+
this.state.cellsAroundViewport.last === getItemCount(data) - 1 &&
|
|
1596
|
+
distanceFromEnd <= threshold &&
|
|
1712
1597
|
this._scrollMetrics.contentLength !== this._sentEndForContentLength
|
|
1713
1598
|
) {
|
|
1714
1599
|
// Only call onEndReached once for a given content length
|
|
@@ -1727,7 +1612,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1727
1612
|
height > 0 &&
|
|
1728
1613
|
this.props.initialScrollIndex != null &&
|
|
1729
1614
|
this.props.initialScrollIndex > 0 &&
|
|
1730
|
-
!this.
|
|
1615
|
+
!this._hasTriggeredInitialScrollToIndex
|
|
1731
1616
|
) {
|
|
1732
1617
|
if (this.props.contentOffset == null) {
|
|
1733
1618
|
this.scrollToIndex({
|
|
@@ -1735,7 +1620,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1735
1620
|
index: this.props.initialScrollIndex,
|
|
1736
1621
|
});
|
|
1737
1622
|
}
|
|
1738
|
-
this.
|
|
1623
|
+
this._hasTriggeredInitialScrollToIndex = true;
|
|
1739
1624
|
}
|
|
1740
1625
|
if (this.props.onContentSizeChange) {
|
|
1741
1626
|
this.props.onContentSizeChange(width, height);
|
|
@@ -1752,7 +1637,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1752
1637
|
visibleLength: number,
|
|
1753
1638
|
offset: number,
|
|
1754
1639
|
...
|
|
1755
|
-
}) => {
|
|
1640
|
+
}): $FlowFixMe => {
|
|
1756
1641
|
// Offset of the top of the nested list relative to the top of its parent's viewport
|
|
1757
1642
|
const offset = metrics.offset - this._offsetFromParentVirtualizedList;
|
|
1758
1643
|
// Child's visible length is the same as its parent's
|
|
@@ -1770,7 +1655,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1770
1655
|
|
|
1771
1656
|
_onScroll = (e: Object) => {
|
|
1772
1657
|
this._nestedChildLists.forEach(childList => {
|
|
1773
|
-
childList.
|
|
1658
|
+
childList._onScroll(e);
|
|
1774
1659
|
});
|
|
1775
1660
|
if (this.props.onScroll) {
|
|
1776
1661
|
this.props.onScroll(e);
|
|
@@ -1813,6 +1698,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1813
1698
|
);
|
|
1814
1699
|
this._hasWarned.perf = true;
|
|
1815
1700
|
}
|
|
1701
|
+
|
|
1702
|
+
// For invalid negative values (w/ RTL), set this to 1.
|
|
1703
|
+
const zoomScale = e.nativeEvent.zoomScale < 0 ? 1 : e.nativeEvent.zoomScale;
|
|
1816
1704
|
this._scrollMetrics = {
|
|
1817
1705
|
contentLength,
|
|
1818
1706
|
dt,
|
|
@@ -1821,8 +1709,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1821
1709
|
timestamp,
|
|
1822
1710
|
velocity,
|
|
1823
1711
|
visibleLength,
|
|
1712
|
+
zoomScale,
|
|
1824
1713
|
};
|
|
1825
|
-
this._updateViewableItems(this.props.
|
|
1714
|
+
this._updateViewableItems(this.props, this.state.cellsAroundViewport);
|
|
1826
1715
|
if (!this.props) {
|
|
1827
1716
|
return;
|
|
1828
1717
|
}
|
|
@@ -1835,7 +1724,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1835
1724
|
};
|
|
1836
1725
|
|
|
1837
1726
|
_scheduleCellsToRenderUpdate() {
|
|
1838
|
-
const {first, last} = this.state;
|
|
1727
|
+
const {first, last} = this.state.cellsAroundViewport;
|
|
1839
1728
|
const {offset, visibleLength, velocity} = this._scrollMetrics;
|
|
1840
1729
|
const itemCount = this.props.getItemCount(this.props.data);
|
|
1841
1730
|
let hiPri = false;
|
|
@@ -1846,15 +1735,17 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1846
1735
|
// Mark as high priority if we're close to the start of the first item
|
|
1847
1736
|
// But only if there are items before the first rendered item
|
|
1848
1737
|
if (first > 0) {
|
|
1849
|
-
const distTop =
|
|
1738
|
+
const distTop =
|
|
1739
|
+
offset - this.__getFrameMetricsApprox(first, this.props).offset;
|
|
1850
1740
|
hiPri =
|
|
1851
1741
|
hiPri || distTop < 0 || (velocity < -2 && distTop < scrollingThreshold);
|
|
1852
1742
|
}
|
|
1853
1743
|
// Mark as high priority if we're close to the end of the last item
|
|
1854
1744
|
// But only if there are items after the last rendered item
|
|
1855
|
-
if (last < itemCount - 1) {
|
|
1745
|
+
if (last >= 0 && last < itemCount - 1) {
|
|
1856
1746
|
const distBottom =
|
|
1857
|
-
this.
|
|
1747
|
+
this.__getFrameMetricsApprox(last, this.props).offset -
|
|
1748
|
+
(offset + visibleLength);
|
|
1858
1749
|
hiPri =
|
|
1859
1750
|
hiPri ||
|
|
1860
1751
|
distBottom < 0 ||
|
|
@@ -1883,9 +1774,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1883
1774
|
}
|
|
1884
1775
|
}
|
|
1885
1776
|
|
|
1886
|
-
_onScrollBeginDrag = (e): void => {
|
|
1777
|
+
_onScrollBeginDrag = (e: ScrollEvent): void => {
|
|
1887
1778
|
this._nestedChildLists.forEach(childList => {
|
|
1888
|
-
childList.
|
|
1779
|
+
childList._onScrollBeginDrag(e);
|
|
1889
1780
|
});
|
|
1890
1781
|
this._viewabilityTuples.forEach(tuple => {
|
|
1891
1782
|
tuple.viewabilityHelper.recordInteraction();
|
|
@@ -1894,9 +1785,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1894
1785
|
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
|
|
1895
1786
|
};
|
|
1896
1787
|
|
|
1897
|
-
_onScrollEndDrag = (e): void => {
|
|
1788
|
+
_onScrollEndDrag = (e: ScrollEvent): void => {
|
|
1898
1789
|
this._nestedChildLists.forEach(childList => {
|
|
1899
|
-
childList.
|
|
1790
|
+
childList._onScrollEndDrag(e);
|
|
1900
1791
|
});
|
|
1901
1792
|
const {velocity} = e.nativeEvent;
|
|
1902
1793
|
if (velocity) {
|
|
@@ -1906,16 +1797,16 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1906
1797
|
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
|
|
1907
1798
|
};
|
|
1908
1799
|
|
|
1909
|
-
_onMomentumScrollBegin = (e): void => {
|
|
1800
|
+
_onMomentumScrollBegin = (e: ScrollEvent): void => {
|
|
1910
1801
|
this._nestedChildLists.forEach(childList => {
|
|
1911
|
-
childList.
|
|
1802
|
+
childList._onMomentumScrollBegin(e);
|
|
1912
1803
|
});
|
|
1913
1804
|
this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
|
|
1914
1805
|
};
|
|
1915
1806
|
|
|
1916
|
-
_onMomentumScrollEnd = (e): void => {
|
|
1807
|
+
_onMomentumScrollEnd = (e: ScrollEvent): void => {
|
|
1917
1808
|
this._nestedChildLists.forEach(childList => {
|
|
1918
|
-
childList.
|
|
1809
|
+
childList._onMomentumScrollEnd(e);
|
|
1919
1810
|
});
|
|
1920
1811
|
this._scrollMetrics.velocity = 0;
|
|
1921
1812
|
this._computeBlankness();
|
|
@@ -1923,115 +1814,80 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1923
1814
|
};
|
|
1924
1815
|
|
|
1925
1816
|
_updateCellsToRender = () => {
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
return;
|
|
1938
|
-
}
|
|
1939
|
-
this.setState(state => {
|
|
1940
|
-
let newState;
|
|
1941
|
-
const {contentLength, offset, visibleLength} = this._scrollMetrics;
|
|
1942
|
-
if (!isVirtualizationDisabled) {
|
|
1943
|
-
// If we run this with bogus data, we'll force-render window {first: 0, last: 0},
|
|
1944
|
-
// and wipe out the initialNumToRender rendered elements.
|
|
1945
|
-
// So let's wait until the scroll view metrics have been set up. And until then,
|
|
1946
|
-
// we will trust the initialNumToRender suggestion
|
|
1947
|
-
if (visibleLength > 0 && contentLength > 0) {
|
|
1948
|
-
// If we have a non-zero initialScrollIndex and run this before we've scrolled,
|
|
1949
|
-
// we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.
|
|
1950
|
-
// So let's wait until we've scrolled the view to the right place. And until then,
|
|
1951
|
-
// we will trust the initialScrollIndex suggestion.
|
|
1952
|
-
if (!this.props.initialScrollIndex || this._scrollMetrics.offset) {
|
|
1953
|
-
newState = computeWindowedRenderLimits(
|
|
1954
|
-
this.props.data,
|
|
1955
|
-
this.props.getItemCount,
|
|
1956
|
-
maxToRenderPerBatchOrDefault(this.props.maxToRenderPerBatch),
|
|
1957
|
-
windowSizeOrDefault(this.props.windowSize),
|
|
1958
|
-
state,
|
|
1959
|
-
this._getFrameMetricsApprox,
|
|
1960
|
-
this._scrollMetrics,
|
|
1961
|
-
);
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
} else {
|
|
1965
|
-
const distanceFromEnd = contentLength - visibleLength - offset;
|
|
1966
|
-
const renderAhead =
|
|
1967
|
-
distanceFromEnd < onEndReachedThreshold * visibleLength
|
|
1968
|
-
? maxToRenderPerBatchOrDefault(this.props.maxToRenderPerBatch)
|
|
1969
|
-
: 0;
|
|
1970
|
-
newState = {
|
|
1971
|
-
first: 0,
|
|
1972
|
-
last: Math.min(state.last + renderAhead, getItemCount(data) - 1),
|
|
1973
|
-
};
|
|
1974
|
-
}
|
|
1975
|
-
if (newState && this._nestedChildLists.size > 0) {
|
|
1976
|
-
const newFirst = newState.first;
|
|
1977
|
-
const newLast = newState.last;
|
|
1978
|
-
// If some cell in the new state has a child list in it, we should only render
|
|
1979
|
-
// up through that item, so that we give that list a chance to render.
|
|
1980
|
-
// Otherwise there's churn from multiple child lists mounting and un-mounting
|
|
1981
|
-
// their items.
|
|
1982
|
-
for (let ii = newFirst; ii <= newLast; ii++) {
|
|
1983
|
-
const cellKeyForIndex = this._indicesToKeys.get(ii);
|
|
1984
|
-
const childListKeys =
|
|
1985
|
-
cellKeyForIndex &&
|
|
1986
|
-
this._cellKeysToChildListKeys.get(cellKeyForIndex);
|
|
1987
|
-
if (!childListKeys) {
|
|
1988
|
-
continue;
|
|
1989
|
-
}
|
|
1990
|
-
let someChildHasMore = false;
|
|
1991
|
-
// For each cell, need to check whether any child list in it has more elements to render
|
|
1992
|
-
for (let childKey of childListKeys) {
|
|
1993
|
-
const childList = this._nestedChildLists.get(childKey);
|
|
1994
|
-
if (childList && childList.ref && childList.ref.hasMore()) {
|
|
1995
|
-
someChildHasMore = true;
|
|
1996
|
-
break;
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
if (someChildHasMore) {
|
|
2000
|
-
newState.last = ii;
|
|
2001
|
-
break;
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
1817
|
+
this.setState((state, props) => {
|
|
1818
|
+
const cellsAroundViewport = this._adjustCellsAroundViewport(
|
|
1819
|
+
props,
|
|
1820
|
+
state.cellsAroundViewport,
|
|
1821
|
+
);
|
|
1822
|
+
const renderMask = VirtualizedList._createRenderMask(
|
|
1823
|
+
props,
|
|
1824
|
+
cellsAroundViewport,
|
|
1825
|
+
this._getNonViewportRenderRegions(props),
|
|
1826
|
+
);
|
|
1827
|
+
|
|
2005
1828
|
if (
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1829
|
+
cellsAroundViewport.first === state.cellsAroundViewport.first &&
|
|
1830
|
+
cellsAroundViewport.last === state.cellsAroundViewport.last &&
|
|
1831
|
+
renderMask.equals(state.renderMask)
|
|
2009
1832
|
) {
|
|
2010
|
-
|
|
1833
|
+
return null;
|
|
2011
1834
|
}
|
|
2012
|
-
|
|
1835
|
+
|
|
1836
|
+
return {cellsAroundViewport, renderMask};
|
|
2013
1837
|
});
|
|
2014
1838
|
};
|
|
2015
1839
|
|
|
2016
|
-
_createViewToken = (
|
|
2017
|
-
|
|
1840
|
+
_createViewToken = (
|
|
1841
|
+
index: number,
|
|
1842
|
+
isViewable: boolean,
|
|
1843
|
+
props: FrameMetricProps,
|
|
1844
|
+
// $FlowFixMe[missing-local-annot]
|
|
1845
|
+
) => {
|
|
1846
|
+
const {data, getItem} = props;
|
|
2018
1847
|
const item = getItem(data, index);
|
|
2019
|
-
return {
|
|
1848
|
+
return {
|
|
1849
|
+
index,
|
|
1850
|
+
item,
|
|
1851
|
+
key: this._keyExtractor(item, index, props),
|
|
1852
|
+
isViewable,
|
|
1853
|
+
};
|
|
1854
|
+
};
|
|
1855
|
+
|
|
1856
|
+
/**
|
|
1857
|
+
* Gets an approximate offset to an item at a given index. Supports
|
|
1858
|
+
* fractional indices.
|
|
1859
|
+
*/
|
|
1860
|
+
_getOffsetApprox = (index: number, props: FrameMetricProps): number => {
|
|
1861
|
+
if (Number.isInteger(index)) {
|
|
1862
|
+
return this.__getFrameMetricsApprox(index, props).offset;
|
|
1863
|
+
} else {
|
|
1864
|
+
const frameMetrics = this.__getFrameMetricsApprox(
|
|
1865
|
+
Math.floor(index),
|
|
1866
|
+
props,
|
|
1867
|
+
);
|
|
1868
|
+
const remainder = index - Math.floor(index);
|
|
1869
|
+
return frameMetrics.offset + remainder * frameMetrics.length;
|
|
1870
|
+
}
|
|
2020
1871
|
};
|
|
2021
1872
|
|
|
2022
|
-
|
|
1873
|
+
__getFrameMetricsApprox: (
|
|
2023
1874
|
index: number,
|
|
2024
|
-
|
|
1875
|
+
props: FrameMetricProps,
|
|
1876
|
+
) => {
|
|
2025
1877
|
length: number,
|
|
2026
1878
|
offset: number,
|
|
2027
1879
|
...
|
|
2028
|
-
} => {
|
|
2029
|
-
const frame = this._getFrameMetrics(index);
|
|
1880
|
+
} = (index, props) => {
|
|
1881
|
+
const frame = this._getFrameMetrics(index, props);
|
|
2030
1882
|
if (frame && frame.index === index) {
|
|
2031
1883
|
// check for invalid frames due to row re-ordering
|
|
2032
1884
|
return frame;
|
|
2033
1885
|
} else {
|
|
2034
|
-
const {getItemLayout} =
|
|
1886
|
+
const {data, getItemCount, getItemLayout} = props;
|
|
1887
|
+
invariant(
|
|
1888
|
+
index >= 0 && index < getItemCount(data),
|
|
1889
|
+
'Tried to get frame for out of range index ' + index,
|
|
1890
|
+
);
|
|
2035
1891
|
invariant(
|
|
2036
1892
|
!getItemLayout,
|
|
2037
1893
|
'Should not have to estimate frames when a measurement metrics function is provided',
|
|
@@ -2045,6 +1901,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
2045
1901
|
|
|
2046
1902
|
_getFrameMetrics = (
|
|
2047
1903
|
index: number,
|
|
1904
|
+
props: FrameMetricProps,
|
|
2048
1905
|
): ?{
|
|
2049
1906
|
length: number,
|
|
2050
1907
|
offset: number,
|
|
@@ -2052,277 +1909,101 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
2052
1909
|
inLayout?: boolean,
|
|
2053
1910
|
...
|
|
2054
1911
|
} => {
|
|
2055
|
-
const {data, getItem, getItemCount, getItemLayout} =
|
|
1912
|
+
const {data, getItem, getItemCount, getItemLayout} = props;
|
|
2056
1913
|
invariant(
|
|
2057
|
-
getItemCount(data)
|
|
1914
|
+
index >= 0 && index < getItemCount(data),
|
|
2058
1915
|
'Tried to get frame for out of range index ' + index,
|
|
2059
1916
|
);
|
|
2060
1917
|
const item = getItem(data, index);
|
|
2061
|
-
|
|
1918
|
+
const frame = item && this._frames[this._keyExtractor(item, index, props)];
|
|
2062
1919
|
if (!frame || frame.index !== index) {
|
|
2063
1920
|
if (getItemLayout) {
|
|
2064
|
-
|
|
1921
|
+
/* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment
|
|
1922
|
+
* suppresses an error found when Flow v0.63 was deployed. To see the error
|
|
1923
|
+
* delete this comment and run Flow. */
|
|
1924
|
+
return getItemLayout(data, index);
|
|
2065
1925
|
}
|
|
2066
1926
|
}
|
|
2067
|
-
/* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment
|
|
2068
|
-
* suppresses an error found when Flow v0.63 was deployed. To see the error
|
|
2069
|
-
* delete this comment and run Flow. */
|
|
2070
1927
|
return frame;
|
|
2071
1928
|
};
|
|
2072
1929
|
|
|
2073
|
-
|
|
2074
|
-
|
|
1930
|
+
_getNonViewportRenderRegions = (
|
|
1931
|
+
props: FrameMetricProps,
|
|
1932
|
+
): $ReadOnlyArray<{
|
|
1933
|
+
first: number,
|
|
1934
|
+
last: number,
|
|
1935
|
+
}> => {
|
|
1936
|
+
// Keep a viewport's worth of content around the last focused cell to allow
|
|
1937
|
+
// random navigation around it without any blanking. E.g. tabbing from one
|
|
1938
|
+
// focused item out of viewport to another.
|
|
1939
|
+
if (
|
|
1940
|
+
!(this._lastFocusedCellKey && this._cellRefs[this._lastFocusedCellKey])
|
|
1941
|
+
) {
|
|
1942
|
+
return [];
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
const lastFocusedCellRenderer = this._cellRefs[this._lastFocusedCellKey];
|
|
1946
|
+
const focusedCellIndex = lastFocusedCellRenderer.props.index;
|
|
1947
|
+
const itemCount = props.getItemCount(props.data);
|
|
1948
|
+
|
|
1949
|
+
// The cell may have been unmounted and have a stale index
|
|
1950
|
+
if (
|
|
1951
|
+
focusedCellIndex >= itemCount ||
|
|
1952
|
+
this._indicesToKeys.get(focusedCellIndex) !== this._lastFocusedCellKey
|
|
1953
|
+
) {
|
|
1954
|
+
return [];
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
let first = focusedCellIndex;
|
|
1958
|
+
let heightOfCellsBeforeFocused = 0;
|
|
1959
|
+
for (
|
|
1960
|
+
let i = first - 1;
|
|
1961
|
+
i >= 0 && heightOfCellsBeforeFocused < this._scrollMetrics.visibleLength;
|
|
1962
|
+
i--
|
|
1963
|
+
) {
|
|
1964
|
+
first--;
|
|
1965
|
+
heightOfCellsBeforeFocused += this.__getFrameMetricsApprox(
|
|
1966
|
+
i,
|
|
1967
|
+
props,
|
|
1968
|
+
).length;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
let last = focusedCellIndex;
|
|
1972
|
+
let heightOfCellsAfterFocused = 0;
|
|
1973
|
+
for (
|
|
1974
|
+
let i = last + 1;
|
|
1975
|
+
i < itemCount &&
|
|
1976
|
+
heightOfCellsAfterFocused < this._scrollMetrics.visibleLength;
|
|
1977
|
+
i++
|
|
1978
|
+
) {
|
|
1979
|
+
last++;
|
|
1980
|
+
heightOfCellsAfterFocused += this.__getFrameMetricsApprox(
|
|
1981
|
+
i,
|
|
1982
|
+
props,
|
|
1983
|
+
).length;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
return [{first, last}];
|
|
1987
|
+
};
|
|
2075
1988
|
|
|
1989
|
+
_updateViewableItems(
|
|
1990
|
+
props: FrameMetricProps,
|
|
1991
|
+
cellsAroundViewport: {first: number, last: number},
|
|
1992
|
+
) {
|
|
2076
1993
|
this._viewabilityTuples.forEach(tuple => {
|
|
2077
1994
|
tuple.viewabilityHelper.onUpdate(
|
|
2078
|
-
|
|
1995
|
+
props,
|
|
2079
1996
|
this._scrollMetrics.offset,
|
|
2080
1997
|
this._scrollMetrics.visibleLength,
|
|
2081
1998
|
this._getFrameMetrics,
|
|
2082
1999
|
this._createViewToken,
|
|
2083
2000
|
tuple.onViewableItemsChanged,
|
|
2084
|
-
|
|
2001
|
+
cellsAroundViewport,
|
|
2085
2002
|
);
|
|
2086
2003
|
});
|
|
2087
2004
|
}
|
|
2088
2005
|
}
|
|
2089
2006
|
|
|
2090
|
-
type CellRendererProps = {
|
|
2091
|
-
CellRendererComponent?: ?React.ComponentType<any>,
|
|
2092
|
-
ItemSeparatorComponent: ?React.ComponentType<
|
|
2093
|
-
any | {highlighted: boolean, leadingItem: ?Item},
|
|
2094
|
-
>,
|
|
2095
|
-
cellKey: string,
|
|
2096
|
-
fillRateHelper: FillRateHelper,
|
|
2097
|
-
horizontal: ?boolean,
|
|
2098
|
-
index: number,
|
|
2099
|
-
inversionStyle: ViewStyleProp,
|
|
2100
|
-
isSelected: ?boolean, // TODO(macOS GH#774)
|
|
2101
|
-
item: Item,
|
|
2102
|
-
// This is extracted by ScrollViewStickyHeader
|
|
2103
|
-
onLayout: (event: Object) => void,
|
|
2104
|
-
onUnmount: (cellKey: string) => void,
|
|
2105
|
-
onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
|
|
2106
|
-
parentProps: {
|
|
2107
|
-
// e.g. height, y,
|
|
2108
|
-
getItemLayout?: (
|
|
2109
|
-
data: any,
|
|
2110
|
-
index: number,
|
|
2111
|
-
) => {
|
|
2112
|
-
length: number,
|
|
2113
|
-
offset: number,
|
|
2114
|
-
index: number,
|
|
2115
|
-
...
|
|
2116
|
-
},
|
|
2117
|
-
renderItem?: ?RenderItemType<Item>,
|
|
2118
|
-
ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
|
|
2119
|
-
...
|
|
2120
|
-
},
|
|
2121
|
-
prevCellKey: ?string,
|
|
2122
|
-
...
|
|
2123
|
-
};
|
|
2124
|
-
|
|
2125
|
-
type CellRendererState = {
|
|
2126
|
-
separatorProps: $ReadOnly<{|
|
|
2127
|
-
highlighted: boolean,
|
|
2128
|
-
leadingItem: ?Item,
|
|
2129
|
-
|}>,
|
|
2130
|
-
...
|
|
2131
|
-
};
|
|
2132
|
-
|
|
2133
|
-
class CellRenderer extends React.Component<
|
|
2134
|
-
CellRendererProps,
|
|
2135
|
-
CellRendererState,
|
|
2136
|
-
> {
|
|
2137
|
-
state = {
|
|
2138
|
-
separatorProps: {
|
|
2139
|
-
highlighted: false,
|
|
2140
|
-
leadingItem: this.props.item,
|
|
2141
|
-
},
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
static getDerivedStateFromProps(
|
|
2145
|
-
props: CellRendererProps,
|
|
2146
|
-
prevState: CellRendererState,
|
|
2147
|
-
): ?CellRendererState {
|
|
2148
|
-
return {
|
|
2149
|
-
separatorProps: {
|
|
2150
|
-
...prevState.separatorProps,
|
|
2151
|
-
leadingItem: props.item,
|
|
2152
|
-
},
|
|
2153
|
-
};
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
// TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
|
|
2157
|
-
// reused by SectionList and we can keep VirtualizedList simpler.
|
|
2158
|
-
_separators = {
|
|
2159
|
-
highlight: () => {
|
|
2160
|
-
const {cellKey, prevCellKey} = this.props;
|
|
2161
|
-
this.props.onUpdateSeparators([cellKey, prevCellKey], {
|
|
2162
|
-
highlighted: true,
|
|
2163
|
-
});
|
|
2164
|
-
},
|
|
2165
|
-
unhighlight: () => {
|
|
2166
|
-
const {cellKey, prevCellKey} = this.props;
|
|
2167
|
-
this.props.onUpdateSeparators([cellKey, prevCellKey], {
|
|
2168
|
-
highlighted: false,
|
|
2169
|
-
});
|
|
2170
|
-
},
|
|
2171
|
-
updateProps: (select: 'leading' | 'trailing', newProps: Object) => {
|
|
2172
|
-
const {cellKey, prevCellKey} = this.props;
|
|
2173
|
-
this.props.onUpdateSeparators(
|
|
2174
|
-
[select === 'leading' ? prevCellKey : cellKey],
|
|
2175
|
-
newProps,
|
|
2176
|
-
);
|
|
2177
|
-
},
|
|
2178
|
-
};
|
|
2179
|
-
|
|
2180
|
-
updateSeparatorProps(newProps: Object) {
|
|
2181
|
-
this.setState(state => ({
|
|
2182
|
-
separatorProps: {...state.separatorProps, ...newProps},
|
|
2183
|
-
}));
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
componentWillUnmount() {
|
|
2187
|
-
this.props.onUnmount(this.props.cellKey);
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
_renderElement(
|
|
2191
|
-
renderItem,
|
|
2192
|
-
ListItemComponent,
|
|
2193
|
-
item,
|
|
2194
|
-
index,
|
|
2195
|
-
isSelected, // TODO(macOS GH#774)
|
|
2196
|
-
) {
|
|
2197
|
-
if (renderItem && ListItemComponent) {
|
|
2198
|
-
console.warn(
|
|
2199
|
-
'VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' +
|
|
2200
|
-
' precedence over renderItem.',
|
|
2201
|
-
);
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
if (ListItemComponent) {
|
|
2205
|
-
/* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This
|
|
2206
|
-
* comment suppresses an error found when Flow v0.108 was deployed. To
|
|
2207
|
-
* see the error, delete this comment and run Flow. */
|
|
2208
|
-
/* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)
|
|
2209
|
-
* This comment suppresses an error found when Flow v0.108 was deployed.
|
|
2210
|
-
* To see the error, delete this comment and run Flow. */
|
|
2211
|
-
return React.createElement(ListItemComponent, {
|
|
2212
|
-
item,
|
|
2213
|
-
index,
|
|
2214
|
-
isSelected,
|
|
2215
|
-
separators: this._separators,
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
if (renderItem) {
|
|
2220
|
-
return renderItem({
|
|
2221
|
-
item,
|
|
2222
|
-
index,
|
|
2223
|
-
isSelected, // TODO(macOS GH#774)
|
|
2224
|
-
separators: this._separators,
|
|
2225
|
-
});
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
invariant(
|
|
2229
|
-
false,
|
|
2230
|
-
'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.',
|
|
2231
|
-
);
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
render() {
|
|
2235
|
-
const {
|
|
2236
|
-
CellRendererComponent,
|
|
2237
|
-
ItemSeparatorComponent,
|
|
2238
|
-
fillRateHelper,
|
|
2239
|
-
horizontal,
|
|
2240
|
-
item,
|
|
2241
|
-
index,
|
|
2242
|
-
inversionStyle,
|
|
2243
|
-
isSelected, // TODO(macOS GH#774)
|
|
2244
|
-
parentProps,
|
|
2245
|
-
} = this.props;
|
|
2246
|
-
const {renderItem, getItemLayout, ListItemComponent} = parentProps;
|
|
2247
|
-
const element = this._renderElement(
|
|
2248
|
-
renderItem,
|
|
2249
|
-
ListItemComponent,
|
|
2250
|
-
item,
|
|
2251
|
-
index,
|
|
2252
|
-
isSelected, // TODO(macOS GH#774)
|
|
2253
|
-
);
|
|
2254
|
-
|
|
2255
|
-
const onLayout =
|
|
2256
|
-
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
|
|
2257
|
-
* suppresses an error found when Flow v0.68 was deployed. To see the
|
|
2258
|
-
* error delete this comment and run Flow. */
|
|
2259
|
-
getItemLayout && !parentProps.debug && !fillRateHelper.enabled()
|
|
2260
|
-
? undefined
|
|
2261
|
-
: this.props.onLayout;
|
|
2262
|
-
// NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
|
|
2263
|
-
// called explicitly by `ScrollViewStickyHeader`.
|
|
2264
|
-
const itemSeparator = ItemSeparatorComponent && (
|
|
2265
|
-
<ItemSeparatorComponent {...this.state.separatorProps} />
|
|
2266
|
-
);
|
|
2267
|
-
const cellStyle = inversionStyle
|
|
2268
|
-
? horizontal
|
|
2269
|
-
? [styles.rowReverse, inversionStyle]
|
|
2270
|
-
: [styles.columnReverse, inversionStyle]
|
|
2271
|
-
: horizontal
|
|
2272
|
-
? [styles.row, inversionStyle]
|
|
2273
|
-
: inversionStyle;
|
|
2274
|
-
const result = !CellRendererComponent ? (
|
|
2275
|
-
/* $FlowFixMe[incompatible-type-arg] (>=0.89.0 site=react_native_fb) *
|
|
2276
|
-
This comment suppresses an error found when Flow v0.89 was deployed. *
|
|
2277
|
-
To see the error, delete this comment and run Flow. */
|
|
2278
|
-
<View style={cellStyle} onLayout={onLayout}>
|
|
2279
|
-
{element}
|
|
2280
|
-
{itemSeparator}
|
|
2281
|
-
</View>
|
|
2282
|
-
) : (
|
|
2283
|
-
<CellRendererComponent
|
|
2284
|
-
{...this.props}
|
|
2285
|
-
style={cellStyle}
|
|
2286
|
-
onLayout={onLayout}>
|
|
2287
|
-
{element}
|
|
2288
|
-
{itemSeparator}
|
|
2289
|
-
</CellRendererComponent>
|
|
2290
|
-
);
|
|
2291
|
-
// TODO(macOS GH#774)]
|
|
2292
|
-
|
|
2293
|
-
return (
|
|
2294
|
-
<VirtualizedListCellContextProvider cellKey={this.props.cellKey}>
|
|
2295
|
-
{result}
|
|
2296
|
-
</VirtualizedListCellContextProvider>
|
|
2297
|
-
);
|
|
2298
|
-
}
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
function describeNestedLists(childList: {
|
|
2302
|
-
+cellKey: string,
|
|
2303
|
-
+key: string,
|
|
2304
|
-
+ref: VirtualizedList,
|
|
2305
|
-
+parentDebugInfo: ListDebugInfo,
|
|
2306
|
-
+horizontal: boolean,
|
|
2307
|
-
...
|
|
2308
|
-
}) {
|
|
2309
|
-
let trace =
|
|
2310
|
-
'VirtualizedList trace:\n' +
|
|
2311
|
-
` Child (${childList.horizontal ? 'horizontal' : 'vertical'}):\n` +
|
|
2312
|
-
` listKey: ${childList.key}\n` +
|
|
2313
|
-
` cellKey: ${childList.cellKey}`;
|
|
2314
|
-
|
|
2315
|
-
let debugInfo = childList.parentDebugInfo;
|
|
2316
|
-
while (debugInfo) {
|
|
2317
|
-
trace +=
|
|
2318
|
-
`\n Parent (${debugInfo.horizontal ? 'horizontal' : 'vertical'}):\n` +
|
|
2319
|
-
` listKey: ${debugInfo.listKey}\n` +
|
|
2320
|
-
` cellKey: ${debugInfo.cellKey}`;
|
|
2321
|
-
debugInfo = debugInfo.parent;
|
|
2322
|
-
}
|
|
2323
|
-
return trace;
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
2007
|
const styles = StyleSheet.create({
|
|
2327
2008
|
verticallyInverted: {
|
|
2328
2009
|
transform: [{scaleY: -1}],
|
|
@@ -2330,15 +2011,6 @@ const styles = StyleSheet.create({
|
|
|
2330
2011
|
horizontallyInverted: {
|
|
2331
2012
|
transform: [{scaleX: -1}],
|
|
2332
2013
|
},
|
|
2333
|
-
row: {
|
|
2334
|
-
flexDirection: 'row',
|
|
2335
|
-
},
|
|
2336
|
-
rowReverse: {
|
|
2337
|
-
flexDirection: 'row-reverse',
|
|
2338
|
-
},
|
|
2339
|
-
columnReverse: {
|
|
2340
|
-
flexDirection: 'column-reverse',
|
|
2341
|
-
},
|
|
2342
2014
|
debug: {
|
|
2343
2015
|
flex: 1,
|
|
2344
2016
|
},
|
|
@@ -2368,5 +2040,3 @@ const styles = StyleSheet.create({
|
|
|
2368
2040
|
borderWidth: 2,
|
|
2369
2041
|
},
|
|
2370
2042
|
});
|
|
2371
|
-
|
|
2372
|
-
module.exports = VirtualizedList;
|