@hanzogui/react-native-web-lite 2.0.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/LICENSE +21 -0
- package/README.md +31 -0
- package/dist/cjs/AccessibilityInfo/index.cjs +97 -0
- package/dist/cjs/ActivityIndicator/__tests__/index-test.cjs +188 -0
- package/dist/cjs/ActivityIndicator/index.cjs +128 -0
- package/dist/cjs/Alert/index.cjs +28 -0
- package/dist/cjs/AppRegistry/AppContainer.cjs +70 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.cjs +83 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.node.cjs +155 -0
- package/dist/cjs/AppRegistry/index.cjs +88 -0
- package/dist/cjs/AppRegistry/renderApplication.cjs +69 -0
- package/dist/cjs/AppState/__tests__/index-test.cjs +34 -0
- package/dist/cjs/AppState/index.cjs +69 -0
- package/dist/cjs/Appearance/index.cjs +53 -0
- package/dist/cjs/BackHandler/index.cjs +35 -0
- package/dist/cjs/Clipboard/index.cjs +51 -0
- package/dist/cjs/DeviceEmitter.cjs +27 -0
- package/dist/cjs/DeviceInfo/index.cjs +68 -0
- package/dist/cjs/Dimensions/__tests__/index-test.cjs +54 -0
- package/dist/cjs/Dimensions/index.cjs +82 -0
- package/dist/cjs/FlatList.cjs +197 -0
- package/dist/cjs/I18nManager/index.cjs +34 -0
- package/dist/cjs/Image/index.cjs +293 -0
- package/dist/cjs/Image/types.cjs +16 -0
- package/dist/cjs/ImageBackground/__tests__/index-test.cjs +68 -0
- package/dist/cjs/ImageBackground/index.cjs +67 -0
- package/dist/cjs/InteractionManager/TaskQueue.cjs +87 -0
- package/dist/cjs/InteractionManager/index.cjs +114 -0
- package/dist/cjs/Keyboard/index.cjs +38 -0
- package/dist/cjs/KeyboardAvoidingView/index.cjs +68 -0
- package/dist/cjs/Libraries/Pressability/Pressability.cjs +26 -0
- package/dist/cjs/Libraries/Pressability/usePressability.cjs +26 -0
- package/dist/cjs/Linking/__tests__/index-test.cjs +40 -0
- package/dist/cjs/Linking/index.cjs +89 -0
- package/dist/cjs/LogBox/index.cjs +33 -0
- package/dist/cjs/Modal/ModalAnimation.cjs +147 -0
- package/dist/cjs/Modal/ModalContent.cjs +85 -0
- package/dist/cjs/Modal/ModalPortal.cjs +52 -0
- package/dist/cjs/Modal/index.cjs +26 -0
- package/dist/cjs/NativeModules/index.cjs +29 -0
- package/dist/cjs/PanResponder/index.cjs +37 -0
- package/dist/cjs/PixelRatio/index.cjs +57 -0
- package/dist/cjs/Pressable/index.cjs +144 -0
- package/dist/cjs/RefreshControl/index.cjs +49 -0
- package/dist/cjs/SafeAreaView/index.cjs +63 -0
- package/dist/cjs/ScrollView/ScrollViewBase.cjs +140 -0
- package/dist/cjs/ScrollView/index.cjs +589 -0
- package/dist/cjs/SectionList.cjs +39 -0
- package/dist/cjs/Share/index.cjs +48 -0
- package/dist/cjs/StatusBar/index.cjs +36 -0
- package/dist/cjs/Text/index.cjs +170 -0
- package/dist/cjs/Text/types.cjs +16 -0
- package/dist/cjs/TextInput/index.cjs +285 -0
- package/dist/cjs/TextInput/types.cjs +16 -0
- package/dist/cjs/TouchableNativeFeedback.cjs +26 -0
- package/dist/cjs/TouchableOpacity.cjs +116 -0
- package/dist/cjs/TouchableWithoutFeedback.cjs +91 -0
- package/dist/cjs/UnimplementedView.cjs +47 -0
- package/dist/cjs/Vibration/index.cjs +36 -0
- package/dist/cjs/View/index.cjs +123 -0
- package/dist/cjs/View/types.cjs +16 -0
- package/dist/cjs/VirtualizedList.cjs +39 -0
- package/dist/cjs/codegenNativeCommand.cjs +28 -0
- package/dist/cjs/codegenNativeComponent.cjs +28 -0
- package/dist/cjs/createElement/__tests__/index-test.cjs +765 -0
- package/dist/cjs/createElement/index.cjs +84 -0
- package/dist/cjs/createReactDOMStyle.cjs +28 -0
- package/dist/cjs/index.cjs +172 -0
- package/dist/cjs/modules/requestIdleCallback.cjs +43 -0
- package/dist/cjs/preprocess.cjs +30 -0
- package/dist/cjs/render/index.cjs +32 -0
- package/dist/cjs/styleTypes.cjs +16 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/useColorScheme/index.cjs +50 -0
- package/dist/cjs/useLocaleContext/index.cjs +26 -0
- package/dist/cjs/useWindowDimensions/index.cjs +51 -0
- package/dist/cjs/vendor/react-native/Animated/Animated.cjs +46 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedEvent.cjs +112 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedImplementation.cjs +508 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedMock.cjs +140 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedPlatformConfig.cjs +1 -0
- package/dist/cjs/vendor/react-native/Animated/Easing.cjs +187 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedHelper.cjs +314 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedModule.cjs +78 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedTurboModule.cjs +75 -0
- package/dist/cjs/vendor/react-native/Animated/SpringConfig.cjs +78 -0
- package/dist/cjs/vendor/react-native/Animated/animations/Animation.cjs +64 -0
- package/dist/cjs/vendor/react-native/Animated/animations/DecayAnimation.cjs +71 -0
- package/dist/cjs/vendor/react-native/Animated/animations/SpringAnimation.cjs +161 -0
- package/dist/cjs/vendor/react-native/Animated/animations/TimingAnimation.cjs +89 -0
- package/dist/cjs/vendor/react-native/Animated/bezier.cjs +83 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedFlatList.cjs +48 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedImage.cjs +31 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedScrollView.cjs +48 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedSectionList.cjs +48 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedText.cjs +30 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedView.cjs +30 -0
- package/dist/cjs/vendor/react-native/Animated/createAnimatedComponent.cjs +62 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedAddition.cjs +60 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedColor.cjs +191 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDiffClamp.cjs +64 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDivision.cjs +64 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedInterpolation.cjs +150 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedModulo.cjs +58 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedMultiplication.cjs +60 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedNode.cjs +131 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedProps.cjs +110 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedStyle.cjs +104 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedSubtraction.cjs +60 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTracking.cjs +73 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTransform.cjs +102 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValue.cjs +170 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValueXY.cjs +96 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedWithChildren.cjs +61 -0
- package/dist/cjs/vendor/react-native/Animated/useAnimatedProps.cjs +84 -0
- package/dist/cjs/vendor/react-native/Batchinator/index.cjs +60 -0
- package/dist/cjs/vendor/react-native/EventEmitter/NativeEventEmitter.cjs +61 -0
- package/dist/cjs/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.cjs +29 -0
- package/dist/cjs/vendor/react-native/FeatureFlags.cjs +33 -0
- package/dist/cjs/vendor/react-native/FillRateHelper/index.cjs +139 -0
- package/dist/cjs/vendor/react-native/FlatList/index.cjs +263 -0
- package/dist/cjs/vendor/react-native/JSEventLoopWatchdog/index.cjs +78 -0
- package/dist/cjs/vendor/react-native/LayoutAnimation/index.cjs +112 -0
- package/dist/cjs/vendor/react-native/PanResponder/index.cjs +144 -0
- package/dist/cjs/vendor/react-native/PooledClass/index.cjs +48 -0
- package/dist/cjs/vendor/react-native/ReactNative/ReactNativeFeatureFlags.cjs +34 -0
- package/dist/cjs/vendor/react-native/SectionList/index.cjs +104 -0
- package/dist/cjs/vendor/react-native/StaticContainer/index.cjs +50 -0
- package/dist/cjs/vendor/react-native/StaticRenderer/index.cjs +49 -0
- package/dist/cjs/vendor/react-native/TouchHistoryMath/index.cjs +106 -0
- package/dist/cjs/vendor/react-native/TurboModule/RCTExport.cjs +34 -0
- package/dist/cjs/vendor/react-native/TurboModule/TurboModuleRegistry.cjs +36 -0
- package/dist/cjs/vendor/react-native/Types/CoreEventTypes.cjs +156 -0
- package/dist/cjs/vendor/react-native/Utilities/Platform.cjs +28 -0
- package/dist/cjs/vendor/react-native/Utilities/clamp.cjs +32 -0
- package/dist/cjs/vendor/react-native/Utilities/setAndForwardRef.cjs +38 -0
- package/dist/cjs/vendor/react-native/Utilities/useMergeRefs.cjs +35 -0
- package/dist/cjs/vendor/react-native/Utilities/useRefEffect.cjs +34 -0
- package/dist/cjs/vendor/react-native/ViewabilityHelper/index.cjs +143 -0
- package/dist/cjs/vendor/react-native/ViewabilityHelper.cjs +134 -0
- package/dist/cjs/vendor/react-native/VirtualizeUtils/index.cjs +106 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/CellRenderMask.cjs +79 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/ChildListCollection.cjs +58 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/StateSafePureComponent.cjs +82 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.cjs +173 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListContext.cjs +85 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListProps.cjs +64 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/index.cjs +264 -0
- package/dist/cjs/vendor/react-native/VirtualizedSectionList/index.cjs +130 -0
- package/dist/cjs/vendor/react-native/deepDiffer/index.cjs +44 -0
- package/dist/cjs/vendor/react-native/emitter/EventEmitter.cjs +30 -0
- package/dist/cjs/vendor/react-native/emitter/EventSubscription.cjs +1 -0
- package/dist/cjs/vendor/react-native/emitter/_EmitterSubscription.cjs +54 -0
- package/dist/cjs/vendor/react-native/emitter/_EventEmitter.cjs +125 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscription.cjs +44 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscriptionVendor.cjs +82 -0
- package/dist/cjs/vendor/react-native/infoLog/index.cjs +32 -0
- package/dist/cjs/vendor/react-native/useRefEffect.cjs +34 -0
- package/dist/cjs/vendor/react-native/vendor/emitter/EventEmitter.cjs +88 -0
- package/dist/cjs/without-animated.cjs +331 -0
- package/dist/esm/AccessibilityInfo/index.mjs +74 -0
- package/dist/esm/AccessibilityInfo/index.mjs.map +1 -0
- package/dist/esm/ActivityIndicator/__tests__/index-test.mjs +167 -0
- package/dist/esm/ActivityIndicator/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/ActivityIndicator/index.mjs +93 -0
- package/dist/esm/ActivityIndicator/index.mjs.map +1 -0
- package/dist/esm/Alert/index.mjs +5 -0
- package/dist/esm/Alert/index.mjs.map +1 -0
- package/dist/esm/AppRegistry/AppContainer.mjs +35 -0
- package/dist/esm/AppRegistry/AppContainer.mjs.map +1 -0
- package/dist/esm/AppRegistry/__tests__/index-test.mjs +62 -0
- package/dist/esm/AppRegistry/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/AppRegistry/__tests__/index-test.node.mjs +134 -0
- package/dist/esm/AppRegistry/__tests__/index-test.node.mjs.map +1 -0
- package/dist/esm/AppRegistry/index.mjs +65 -0
- package/dist/esm/AppRegistry/index.mjs.map +1 -0
- package/dist/esm/AppRegistry/renderApplication.mjs +45 -0
- package/dist/esm/AppRegistry/renderApplication.mjs.map +1 -0
- package/dist/esm/AppState/__tests__/index-test.mjs +13 -0
- package/dist/esm/AppState/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/AppState/index.mjs +46 -0
- package/dist/esm/AppState/index.mjs.map +1 -0
- package/dist/esm/Appearance/index.mjs +30 -0
- package/dist/esm/Appearance/index.mjs.map +1 -0
- package/dist/esm/BackHandler/index.mjs +12 -0
- package/dist/esm/BackHandler/index.mjs.map +1 -0
- package/dist/esm/Clipboard/index.mjs +28 -0
- package/dist/esm/Clipboard/index.mjs.map +1 -0
- package/dist/esm/DeviceEmitter.mjs +4 -0
- package/dist/esm/DeviceEmitter.mjs.map +1 -0
- package/dist/esm/DeviceInfo/index.mjs +45 -0
- package/dist/esm/DeviceInfo/index.mjs.map +1 -0
- package/dist/esm/Dimensions/__tests__/index-test.mjs +33 -0
- package/dist/esm/Dimensions/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/Dimensions/index.mjs +58 -0
- package/dist/esm/Dimensions/index.mjs.map +1 -0
- package/dist/esm/FlatList.mjs +162 -0
- package/dist/esm/FlatList.mjs.map +1 -0
- package/dist/esm/I18nManager/index.mjs +11 -0
- package/dist/esm/I18nManager/index.mjs.map +1 -0
- package/dist/esm/Image/index.mjs +258 -0
- package/dist/esm/Image/index.mjs.map +1 -0
- package/dist/esm/Image/types.mjs +2 -0
- package/dist/esm/Image/types.mjs.map +1 -0
- package/dist/esm/ImageBackground/__tests__/index-test.mjs +47 -0
- package/dist/esm/ImageBackground/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/ImageBackground/index.mjs +43 -0
- package/dist/esm/ImageBackground/index.mjs.map +1 -0
- package/dist/esm/InteractionManager/TaskQueue.mjs +64 -0
- package/dist/esm/InteractionManager/TaskQueue.mjs.map +1 -0
- package/dist/esm/InteractionManager/index.mjs +80 -0
- package/dist/esm/InteractionManager/index.mjs.map +1 -0
- package/dist/esm/Keyboard/index.mjs +15 -0
- package/dist/esm/Keyboard/index.mjs.map +1 -0
- package/dist/esm/KeyboardAvoidingView/index.mjs +33 -0
- package/dist/esm/KeyboardAvoidingView/index.mjs.map +1 -0
- package/dist/esm/Libraries/Pressability/Pressability.mjs +3 -0
- package/dist/esm/Libraries/Pressability/Pressability.mjs.map +1 -0
- package/dist/esm/Libraries/Pressability/usePressability.mjs +3 -0
- package/dist/esm/Libraries/Pressability/usePressability.mjs.map +1 -0
- package/dist/esm/Linking/__tests__/index-test.mjs +19 -0
- package/dist/esm/Linking/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/Linking/index.mjs +66 -0
- package/dist/esm/Linking/index.mjs.map +1 -0
- package/dist/esm/LogBox/index.mjs +9 -0
- package/dist/esm/LogBox/index.mjs.map +1 -0
- package/dist/esm/Modal/ModalAnimation.mjs +113 -0
- package/dist/esm/Modal/ModalAnimation.mjs.map +1 -0
- package/dist/esm/Modal/ModalContent.mjs +51 -0
- package/dist/esm/Modal/ModalContent.mjs.map +1 -0
- package/dist/esm/Modal/ModalPortal.mjs +18 -0
- package/dist/esm/Modal/ModalPortal.mjs.map +1 -0
- package/dist/esm/Modal/index.mjs +3 -0
- package/dist/esm/Modal/index.mjs.map +1 -0
- package/dist/esm/NativeModules/index.mjs +6 -0
- package/dist/esm/NativeModules/index.mjs.map +1 -0
- package/dist/esm/PanResponder/index.mjs +3 -0
- package/dist/esm/PanResponder/index.mjs.map +1 -0
- package/dist/esm/PixelRatio/index.mjs +34 -0
- package/dist/esm/PixelRatio/index.mjs.map +1 -0
- package/dist/esm/Pressable/index.mjs +107 -0
- package/dist/esm/Pressable/index.mjs.map +1 -0
- package/dist/esm/RefreshControl/index.mjs +25 -0
- package/dist/esm/RefreshControl/index.mjs.map +1 -0
- package/dist/esm/SafeAreaView/index.mjs +28 -0
- package/dist/esm/SafeAreaView/index.mjs.map +1 -0
- package/dist/esm/ScrollView/ScrollViewBase.mjs +105 -0
- package/dist/esm/ScrollView/ScrollViewBase.mjs.map +1 -0
- package/dist/esm/ScrollView/index.mjs +554 -0
- package/dist/esm/ScrollView/index.mjs.map +1 -0
- package/dist/esm/SectionList.mjs +4 -0
- package/dist/esm/SectionList.mjs.map +1 -0
- package/dist/esm/Share/index.mjs +25 -0
- package/dist/esm/Share/index.mjs.map +1 -0
- package/dist/esm/StatusBar/index.mjs +12 -0
- package/dist/esm/StatusBar/index.mjs.map +1 -0
- package/dist/esm/Text/index.mjs +135 -0
- package/dist/esm/Text/index.mjs.map +1 -0
- package/dist/esm/Text/types.mjs +2 -0
- package/dist/esm/Text/types.mjs.map +1 -0
- package/dist/esm/TextInput/index.mjs +250 -0
- package/dist/esm/TextInput/index.mjs.map +1 -0
- package/dist/esm/TextInput/types.mjs +2 -0
- package/dist/esm/TextInput/types.mjs.map +1 -0
- package/dist/esm/TouchableNativeFeedback.mjs +3 -0
- package/dist/esm/TouchableNativeFeedback.mjs.map +1 -0
- package/dist/esm/TouchableOpacity.mjs +80 -0
- package/dist/esm/TouchableOpacity.mjs.map +1 -0
- package/dist/esm/TouchableWithoutFeedback.mjs +57 -0
- package/dist/esm/TouchableWithoutFeedback.mjs.map +1 -0
- package/dist/esm/UnimplementedView.mjs +13 -0
- package/dist/esm/UnimplementedView.mjs.map +1 -0
- package/dist/esm/Vibration/index.mjs +13 -0
- package/dist/esm/Vibration/index.mjs.map +1 -0
- package/dist/esm/View/index.mjs +88 -0
- package/dist/esm/View/index.mjs.map +1 -0
- package/dist/esm/View/types.mjs +2 -0
- package/dist/esm/View/types.mjs.map +1 -0
- package/dist/esm/VirtualizedList.mjs +4 -0
- package/dist/esm/VirtualizedList.mjs.map +1 -0
- package/dist/esm/codegenNativeCommand.mjs +5 -0
- package/dist/esm/codegenNativeCommand.mjs.map +1 -0
- package/dist/esm/codegenNativeComponent.mjs +5 -0
- package/dist/esm/codegenNativeComponent.mjs.map +1 -0
- package/dist/esm/createElement/__tests__/index-test.mjs +744 -0
- package/dist/esm/createElement/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/createElement/index.mjs +49 -0
- package/dist/esm/createElement/index.mjs.map +1 -0
- package/dist/esm/createReactDOMStyle.mjs +4 -0
- package/dist/esm/createReactDOMStyle.mjs.map +1 -0
- package/dist/esm/index.js +61 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +61 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/modules/requestIdleCallback.mjs +19 -0
- package/dist/esm/modules/requestIdleCallback.mjs.map +1 -0
- package/dist/esm/preprocess.mjs +3 -0
- package/dist/esm/preprocess.mjs.map +1 -0
- package/dist/esm/render/index.mjs +6 -0
- package/dist/esm/render/index.mjs.map +1 -0
- package/dist/esm/styleTypes.mjs +2 -0
- package/dist/esm/styleTypes.mjs.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/dist/esm/useColorScheme/index.mjs +16 -0
- package/dist/esm/useColorScheme/index.mjs.map +1 -0
- package/dist/esm/useLocaleContext/index.mjs +3 -0
- package/dist/esm/useLocaleContext/index.mjs.map +1 -0
- package/dist/esm/useWindowDimensions/index.mjs +17 -0
- package/dist/esm/useWindowDimensions/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/Animated.mjs +22 -0
- package/dist/esm/vendor/react-native/Animated/Animated.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedEvent.mjs +86 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedEvent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.mjs +481 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedMock.mjs +113 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedMock.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.mjs +2 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/Easing.mjs +161 -0
- package/dist/esm/vendor/react-native/Animated/Easing.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.mjs +274 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.mjs +38 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.mjs +35 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/SpringConfig.mjs +54 -0
- package/dist/esm/vendor/react-native/Animated/SpringConfig.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/Animation.mjs +38 -0
- package/dist/esm/vendor/react-native/Animated/animations/Animation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.mjs +45 -0
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.mjs +135 -0
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.mjs +65 -0
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/bezier.mjs +57 -0
- package/dist/esm/vendor/react-native/Animated/bezier.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedFlatList.mjs +13 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedFlatList.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.mjs +7 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.mjs +13 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedSectionList.mjs +13 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedSectionList.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedText.mjs +6 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedText.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedView.mjs +6 -0
- package/dist/esm/vendor/react-native/Animated/components/AnimatedView.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.mjs +27 -0
- package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.mjs +34 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.mjs +167 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.mjs +40 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.mjs +38 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.mjs +124 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.mjs +34 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.mjs +34 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.mjs +105 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.mjs +86 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.mjs +80 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.mjs +34 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.mjs +49 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.mjs +76 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.mjs +144 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.mjs +72 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.mjs +35 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.mjs +58 -0
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Batchinator/index.mjs +34 -0
- package/dist/esm/vendor/react-native/Batchinator/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/EventEmitter/NativeEventEmitter.mjs +35 -0
- package/dist/esm/vendor/react-native/EventEmitter/NativeEventEmitter.mjs.map +1 -0
- package/dist/esm/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.mjs +5 -0
- package/dist/esm/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.mjs.map +1 -0
- package/dist/esm/vendor/react-native/FeatureFlags.mjs +10 -0
- package/dist/esm/vendor/react-native/FeatureFlags.mjs.map +1 -0
- package/dist/esm/vendor/react-native/FillRateHelper/index.mjs +115 -0
- package/dist/esm/vendor/react-native/FillRateHelper/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/FlatList/index.mjs +228 -0
- package/dist/esm/vendor/react-native/FlatList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/JSEventLoopWatchdog/index.mjs +52 -0
- package/dist/esm/vendor/react-native/JSEventLoopWatchdog/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/LayoutAnimation/index.mjs +86 -0
- package/dist/esm/vendor/react-native/LayoutAnimation/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/PanResponder/index.mjs +109 -0
- package/dist/esm/vendor/react-native/PanResponder/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/PooledClass/index.mjs +24 -0
- package/dist/esm/vendor/react-native/PooledClass/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/ReactNative/ReactNativeFeatureFlags.mjs +10 -0
- package/dist/esm/vendor/react-native/ReactNative/ReactNativeFeatureFlags.mjs.map +1 -0
- package/dist/esm/vendor/react-native/SectionList/index.mjs +69 -0
- package/dist/esm/vendor/react-native/SectionList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/StaticContainer/index.mjs +13 -0
- package/dist/esm/vendor/react-native/StaticContainer/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/StaticRenderer/index.mjs +12 -0
- package/dist/esm/vendor/react-native/StaticRenderer/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/TouchHistoryMath/index.mjs +82 -0
- package/dist/esm/vendor/react-native/TouchHistoryMath/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/TurboModule/RCTExport.mjs +8 -0
- package/dist/esm/vendor/react-native/TurboModule/RCTExport.mjs.map +1 -0
- package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.mjs +10 -0
- package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Types/CoreEventTypes.mjs +126 -0
- package/dist/esm/vendor/react-native/Types/CoreEventTypes.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/Platform.mjs +4 -0
- package/dist/esm/vendor/react-native/Utilities/Platform.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/clamp.mjs +6 -0
- package/dist/esm/vendor/react-native/Utilities/clamp.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.mjs +12 -0
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/useMergeRefs.mjs +11 -0
- package/dist/esm/vendor/react-native/Utilities/useMergeRefs.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/useRefEffect.mjs +10 -0
- package/dist/esm/vendor/react-native/Utilities/useRefEffect.mjs.map +1 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper/index.mjs +117 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper.mjs +110 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizeUtils/index.mjs +80 -0
- package/dist/esm/vendor/react-native/VirtualizeUtils/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/CellRenderMask.mjs +56 -0
- package/dist/esm/vendor/react-native/VirtualizedList/CellRenderMask.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/ChildListCollection.mjs +34 -0
- package/dist/esm/vendor/react-native/VirtualizedList/ChildListCollection.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/StateSafePureComponent.mjs +47 -0
- package/dist/esm/vendor/react-native/VirtualizedList/StateSafePureComponent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.mjs +138 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListContext.mjs +48 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListContext.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListProps.mjs +40 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListProps.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/index.mjs +240 -0
- package/dist/esm/vendor/react-native/VirtualizedList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedSectionList/index.mjs +95 -0
- package/dist/esm/vendor/react-native/VirtualizedSectionList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/deepDiffer/index.mjs +18 -0
- package/dist/esm/vendor/react-native/deepDiffer/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/EventEmitter.mjs +4 -0
- package/dist/esm/vendor/react-native/emitter/EventEmitter.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/EventSubscription.mjs +2 -0
- package/dist/esm/vendor/react-native/emitter/EventSubscription.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.mjs +28 -0
- package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/_EventEmitter.mjs +101 -0
- package/dist/esm/vendor/react-native/emitter/_EventEmitter.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/_EventSubscription.mjs +18 -0
- package/dist/esm/vendor/react-native/emitter/_EventSubscription.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.mjs +56 -0
- package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.mjs.map +1 -0
- package/dist/esm/vendor/react-native/infoLog/index.mjs +6 -0
- package/dist/esm/vendor/react-native/infoLog/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/useRefEffect.mjs +10 -0
- package/dist/esm/vendor/react-native/useRefEffect.mjs.map +1 -0
- package/dist/esm/vendor/react-native/vendor/emitter/EventEmitter.mjs +62 -0
- package/dist/esm/vendor/react-native/vendor/emitter/EventEmitter.mjs.map +1 -0
- package/dist/esm/without-animated.mjs +219 -0
- package/dist/esm/without-animated.mjs.map +1 -0
- package/package.json +125 -0
- package/src/AccessibilityInfo/index.tsx +113 -0
- package/src/ActivityIndicator/__tests__/__snapshots__/index-test.js.snap +466 -0
- package/src/ActivityIndicator/__tests__/index-test.tsx +147 -0
- package/src/ActivityIndicator/index.tsx +116 -0
- package/src/Alert/index.tsx +12 -0
- package/src/AppRegistry/AppContainer.tsx +54 -0
- package/src/AppRegistry/__tests__/index-test.node.tsx +144 -0
- package/src/AppRegistry/__tests__/index-test.tsx +94 -0
- package/src/AppRegistry/index.tsx +156 -0
- package/src/AppRegistry/renderApplication.tsx +75 -0
- package/src/AppState/__tests__/index-test.tsx +24 -0
- package/src/AppState/index.tsx +92 -0
- package/src/Appearance/index.tsx +59 -0
- package/src/BackHandler/index.tsx +23 -0
- package/src/Clipboard/index.tsx +61 -0
- package/src/DeviceEmitter.ts +3 -0
- package/src/DeviceInfo/index.tsx +55 -0
- package/src/Dimensions/__tests__/index-test.tsx +54 -0
- package/src/Dimensions/index.tsx +129 -0
- package/src/FlatList.tsx +331 -0
- package/src/I18nManager/index.tsx +31 -0
- package/src/Image/index.tsx +401 -0
- package/src/Image/types.tsx +112 -0
- package/src/ImageBackground/__tests__/index-test.tsx +49 -0
- package/src/ImageBackground/index.tsx +66 -0
- package/src/InteractionManager/TaskQueue.tsx +112 -0
- package/src/InteractionManager/index.tsx +140 -0
- package/src/Keyboard/index.tsx +24 -0
- package/src/KeyboardAvoidingView/index.tsx +55 -0
- package/src/Libraries/Pressability/Pressability.ts +2 -0
- package/src/Libraries/Pressability/usePressability.ts +2 -0
- package/src/Linking/__tests__/index-test.tsx +37 -0
- package/src/Linking/index.tsx +113 -0
- package/src/LogBox/index.tsx +17 -0
- package/src/Modal/ModalAnimation.js +178 -0
- package/src/Modal/ModalContent.js +73 -0
- package/src/Modal/ModalPortal.js +40 -0
- package/src/Modal/index.js +1 -0
- package/src/NativeModules/index.tsx +15 -0
- package/src/PanResponder/Alternative.tsx +385 -0
- package/src/PanResponder/index.tsx +1 -0
- package/src/PixelRatio/index.tsx +49 -0
- package/src/Pressable/__tests__/__snapshots__/index-test.js.snap +196 -0
- package/src/Pressable/index.tsx +236 -0
- package/src/RefreshControl/index.tsx +50 -0
- package/src/SafeAreaView/index.tsx +48 -0
- package/src/ScrollView/ScrollViewBase.tsx +183 -0
- package/src/ScrollView/__tests__/__snapshots__/index-test.js.snap +49 -0
- package/src/ScrollView/index.tsx +892 -0
- package/src/SectionList.tsx +9 -0
- package/src/Share/index.tsx +69 -0
- package/src/StatusBar/index.tsx +22 -0
- package/src/Text/__tests__/__snapshots__/index-test.js.snap +218 -0
- package/src/Text/index.tsx +208 -0
- package/src/Text/types.tsx +96 -0
- package/src/TextInput/index.tsx +453 -0
- package/src/TextInput/types.tsx +74 -0
- package/src/TouchableNativeFeedback.tsx +8 -0
- package/src/TouchableOpacity.tsx +150 -0
- package/src/TouchableWithoutFeedback.tsx +95 -0
- package/src/UnimplementedView.tsx +13 -0
- package/src/Vibration/index.tsx +26 -0
- package/src/View/index.tsx +139 -0
- package/src/View/types.tsx +170 -0
- package/src/VirtualizedList.tsx +9 -0
- package/src/codegenNativeCommand.ts +6 -0
- package/src/codegenNativeComponent.ts +6 -0
- package/src/createElement/__tests__/__snapshots__/index-test.js.snap +13 -0
- package/src/createElement/__tests__/index-test.tsx +647 -0
- package/src/createElement/index.tsx +92 -0
- package/src/createReactDOMStyle.ts +4 -0
- package/src/index.tsx +111 -0
- package/src/modules/requestIdleCallback.ts +32 -0
- package/src/preprocess.ts +7 -0
- package/src/render/index.tsx +16 -0
- package/src/styleTypes.ts +321 -0
- package/src/types.ts +77 -0
- package/src/useColorScheme/index.tsx +28 -0
- package/src/useLocaleContext/index.tsx +10 -0
- package/src/useWindowDimensions/index.tsx +34 -0
- package/src/vendor/react-native/Animated/Animated.js +33 -0
- package/src/vendor/react-native/Animated/AnimatedEvent.js +199 -0
- package/src/vendor/react-native/Animated/AnimatedImplementation.js +649 -0
- package/src/vendor/react-native/Animated/AnimatedMock.js +155 -0
- package/src/vendor/react-native/Animated/AnimatedPlatformConfig.js +11 -0
- package/src/vendor/react-native/Animated/Easing.js +249 -0
- package/src/vendor/react-native/Animated/NativeAnimatedHelper.js +525 -0
- package/src/vendor/react-native/Animated/NativeAnimatedModule.js +57 -0
- package/src/vendor/react-native/Animated/NativeAnimatedTurboModule.js +53 -0
- package/src/vendor/react-native/Animated/SpringConfig.js +88 -0
- package/src/vendor/react-native/Animated/animations/Animation.js +66 -0
- package/src/vendor/react-native/Animated/animations/DecayAnimation.js +88 -0
- package/src/vendor/react-native/Animated/animations/SpringAnimation.js +291 -0
- package/src/vendor/react-native/Animated/animations/TimingAnimation.js +133 -0
- package/src/vendor/react-native/Animated/bezier.js +142 -0
- package/src/vendor/react-native/Animated/components/AnimatedFlatList.jsx +24 -0
- package/src/vendor/react-native/Animated/components/AnimatedImage.js +17 -0
- package/src/vendor/react-native/Animated/components/AnimatedScrollView.jsx +24 -0
- package/src/vendor/react-native/Animated/components/AnimatedSectionList.jsx +24 -0
- package/src/vendor/react-native/Animated/components/AnimatedText.js +15 -0
- package/src/vendor/react-native/Animated/components/AnimatedView.js +15 -0
- package/src/vendor/react-native/Animated/createAnimatedComponent.jsx +39 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedAddition.js +60 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedColor.js +293 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js +67 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedDivision.js +78 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedInterpolation.jsx +327 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedModulo.js +56 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedMultiplication.js +59 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedNode.js +190 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedProps.js +160 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedStyle.js +137 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedSubtraction.js +60 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedTracking.js +90 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedTransform.js +122 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedValue.js +292 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedValueXY.js +108 -0
- package/src/vendor/react-native/Animated/nodes/AnimatedWithChildren.js +89 -0
- package/src/vendor/react-native/Animated/useAnimatedProps.js +173 -0
- package/src/vendor/react-native/Batchinator/index.js +77 -0
- package/src/vendor/react-native/EventEmitter/NativeEventEmitter.js +85 -0
- package/src/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js +22 -0
- package/src/vendor/react-native/FeatureFlags.js +8 -0
- package/src/vendor/react-native/FillRateHelper/index.js +213 -0
- package/src/vendor/react-native/FlatList/index.jsx +518 -0
- package/src/vendor/react-native/JSEventLoopWatchdog/index.js +85 -0
- package/src/vendor/react-native/LayoutAnimation/index.js +119 -0
- package/src/vendor/react-native/PanResponder/index.js +243 -0
- package/src/vendor/react-native/PooledClass/index.js +62 -0
- package/src/vendor/react-native/ReactNative/ReactNativeFeatureFlags.js +20 -0
- package/src/vendor/react-native/SHA +2 -0
- package/src/vendor/react-native/SectionList/index.jsx +100 -0
- package/src/vendor/react-native/StaticContainer/index.js +43 -0
- package/src/vendor/react-native/StaticRenderer/index.js +26 -0
- package/src/vendor/react-native/TouchHistoryMath/index.js +137 -0
- package/src/vendor/react-native/TurboModule/RCTExport.js +37 -0
- package/src/vendor/react-native/TurboModule/TurboModuleRegistry.js +27 -0
- package/src/vendor/react-native/Types/CoreEventTypes.js +151 -0
- package/src/vendor/react-native/Utilities/Platform.js +3 -0
- package/src/vendor/react-native/Utilities/clamp.js +24 -0
- package/src/vendor/react-native/Utilities/setAndForwardRef.js +62 -0
- package/src/vendor/react-native/Utilities/useMergeRefs.js +40 -0
- package/src/vendor/react-native/Utilities/useRefEffect.js +44 -0
- package/src/vendor/react-native/ViewabilityHelper/index.js +251 -0
- package/src/vendor/react-native/ViewabilityHelper.ts +293 -0
- package/src/vendor/react-native/VirtualizeUtils/index.js +204 -0
- package/src/vendor/react-native/VirtualizedList/CellRenderMask.js +135 -0
- package/src/vendor/react-native/VirtualizedList/ChildListCollection.js +75 -0
- package/src/vendor/react-native/VirtualizedList/StateSafePureComponent.js +82 -0
- package/src/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.jsx +184 -0
- package/src/vendor/react-native/VirtualizedList/VirtualizedListContext.jsx +96 -0
- package/src/vendor/react-native/VirtualizedList/VirtualizedListProps.js +46 -0
- package/src/vendor/react-native/VirtualizedList/index.jsx +378 -0
- package/src/vendor/react-native/VirtualizedSectionList/index.jsx +149 -0
- package/src/vendor/react-native/deepDiffer/index.js +69 -0
- package/src/vendor/react-native/emitter/EventEmitter.js +14 -0
- package/src/vendor/react-native/emitter/EventSubscription.js +12 -0
- package/src/vendor/react-native/emitter/_EmitterSubscription.js +47 -0
- package/src/vendor/react-native/emitter/_EventEmitter.js +175 -0
- package/src/vendor/react-native/emitter/_EventSubscription.js +34 -0
- package/src/vendor/react-native/emitter/_EventSubscriptionVendor.js +96 -0
- package/src/vendor/react-native/infoLog/index.js +21 -0
- package/src/vendor/react-native/useRefEffect.js +44 -0
- package/src/vendor/react-native/vendor/emitter/EventEmitter.js +121 -0
- package/src/without-animated.tsx +288 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { VirtualizedList } from '../VirtualizedList'
|
|
12
|
+
|
|
13
|
+
import * as React from 'react'
|
|
14
|
+
import { useContext, useMemo } from 'react'
|
|
15
|
+
|
|
16
|
+
const __DEV__ = process.env.NODE_ENV !== 'production'
|
|
17
|
+
|
|
18
|
+
const defaultContext = {
|
|
19
|
+
cellKey: null,
|
|
20
|
+
getScrollMetrics: () => ({
|
|
21
|
+
contentLength: 0,
|
|
22
|
+
dOffset: 0,
|
|
23
|
+
dt: 0,
|
|
24
|
+
offset: 0,
|
|
25
|
+
timestamp: 0,
|
|
26
|
+
velocity: 0,
|
|
27
|
+
visibleLength: 0,
|
|
28
|
+
zoomScale: 1,
|
|
29
|
+
}),
|
|
30
|
+
horizontal: false,
|
|
31
|
+
getOutermostParentListRef: () => null,
|
|
32
|
+
registerAsNestedChild: (params) => {},
|
|
33
|
+
unregisterAsNestedChild: (params) => {},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const VirtualizedListContext = React.createContext(null)
|
|
37
|
+
if (__DEV__) {
|
|
38
|
+
VirtualizedListContext.displayName = 'VirtualizedListContext'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Resets the context. Intended for use by portal-like components (e.g. Modal).
|
|
43
|
+
*/
|
|
44
|
+
export function VirtualizedListContextResetter({ children }) {
|
|
45
|
+
return (
|
|
46
|
+
<VirtualizedListContext.Provider value={null}>
|
|
47
|
+
{children}
|
|
48
|
+
</VirtualizedListContext.Provider>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Sets the context with memoization. Intended to be used by `VirtualizedList`.
|
|
54
|
+
*/
|
|
55
|
+
export function VirtualizedListContextProvider({ children, value }) {
|
|
56
|
+
// Avoid setting a newly created context object if the values are identical.
|
|
57
|
+
const context = useMemo(
|
|
58
|
+
() => ({
|
|
59
|
+
cellKey: null,
|
|
60
|
+
getScrollMetrics: value.getScrollMetrics,
|
|
61
|
+
horizontal: value.horizontal,
|
|
62
|
+
getOutermostParentListRef: value.getOutermostParentListRef,
|
|
63
|
+
registerAsNestedChild: value.registerAsNestedChild,
|
|
64
|
+
unregisterAsNestedChild: value.unregisterAsNestedChild,
|
|
65
|
+
}),
|
|
66
|
+
[
|
|
67
|
+
value.getScrollMetrics,
|
|
68
|
+
value.horizontal,
|
|
69
|
+
value.getOutermostParentListRef,
|
|
70
|
+
value.registerAsNestedChild,
|
|
71
|
+
value.unregisterAsNestedChild,
|
|
72
|
+
]
|
|
73
|
+
)
|
|
74
|
+
return (
|
|
75
|
+
<VirtualizedListContext.Provider value={context}>
|
|
76
|
+
{children}
|
|
77
|
+
</VirtualizedListContext.Provider>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Sets the `cellKey`. Intended to be used by `VirtualizedList` for each cell.
|
|
83
|
+
*/
|
|
84
|
+
export function VirtualizedListCellContextProvider({ cellKey, children }) {
|
|
85
|
+
// Avoid setting a newly created context object if the values are identical.
|
|
86
|
+
const currContext = useContext(VirtualizedListContext)
|
|
87
|
+
const context = useMemo(
|
|
88
|
+
() => (currContext == null ? null : { ...currContext, cellKey }),
|
|
89
|
+
[currContext, cellKey]
|
|
90
|
+
)
|
|
91
|
+
return (
|
|
92
|
+
<VirtualizedListContext.Provider value={context}>
|
|
93
|
+
{children}
|
|
94
|
+
</VirtualizedListContext.Provider>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const defaultVirtualizedListProps = {
|
|
9
|
+
debug: false,
|
|
10
|
+
disableVirtualization: false,
|
|
11
|
+
extraData: null,
|
|
12
|
+
getItemLayout: null,
|
|
13
|
+
horizontal: false,
|
|
14
|
+
initialNumToRender: 10,
|
|
15
|
+
initialScrollIndex: null,
|
|
16
|
+
inverted: false,
|
|
17
|
+
keyExtractor: null,
|
|
18
|
+
CellRendererComponent: null,
|
|
19
|
+
ItemSeparatorComponent: null,
|
|
20
|
+
ListItemComponent: null,
|
|
21
|
+
ListEmptyComponent: null,
|
|
22
|
+
ListFooterComponent: null,
|
|
23
|
+
ListFooterComponentStyle: null,
|
|
24
|
+
ListHeaderComponent: null,
|
|
25
|
+
ListHeaderComponentStyle: null,
|
|
26
|
+
maxToRenderPerBatch: 10,
|
|
27
|
+
onEndReached: null,
|
|
28
|
+
onEndReachedThreshold: 2,
|
|
29
|
+
onRefresh: null,
|
|
30
|
+
onScrollToIndexFailed: null,
|
|
31
|
+
onStartReached: null,
|
|
32
|
+
onStartReachedThreshold: 2,
|
|
33
|
+
onViewableItemsChanged: null,
|
|
34
|
+
persistentScrollbar: false,
|
|
35
|
+
progressViewOffset: 0,
|
|
36
|
+
refreshControl: null,
|
|
37
|
+
refreshing: false,
|
|
38
|
+
removeClippedSubviews: false,
|
|
39
|
+
renderScrollComponent: null,
|
|
40
|
+
updateCellsBatchingPeriod: 50,
|
|
41
|
+
viewabilityConfig: null,
|
|
42
|
+
viewabilityConfigCallbackPairs: null,
|
|
43
|
+
windowSize: 21,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default defaultVirtualizedListProps
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { invariant } from '@hanzogui/react-native-web-internals'
|
|
9
|
+
import { ScrollView } from '../../../ScrollView'
|
|
10
|
+
import { RefreshControl } from '../../../RefreshControl'
|
|
11
|
+
|
|
12
|
+
import { Batchinator } from '../Batchinator'
|
|
13
|
+
import { ChildListCollection } from './ChildListCollection'
|
|
14
|
+
import { FillRateHelper } from '../FillRateHelper'
|
|
15
|
+
import { StateSafePureComponent } from './StateSafePureComponent'
|
|
16
|
+
import { ViewabilityHelper } from '../ViewabilityHelper'
|
|
17
|
+
import { CellRenderer } from './VirtualizedListCellRenderer'
|
|
18
|
+
import { VirtualizedListContext } from './VirtualizedListContext'
|
|
19
|
+
|
|
20
|
+
const __DEV__ = process.env.NODE_ENV !== 'production'
|
|
21
|
+
|
|
22
|
+
const ON_EDGE_REACHED_EPSILON = 0.001
|
|
23
|
+
|
|
24
|
+
let _usedIndexForKey = false
|
|
25
|
+
let _keylessItemComponentName = ''
|
|
26
|
+
|
|
27
|
+
const defaultViewabilityConfig = {
|
|
28
|
+
viewabilityHelper: null,
|
|
29
|
+
onViewableItemsChanged: null,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const defaultRenderMask = {
|
|
33
|
+
renderMask: null,
|
|
34
|
+
cellsAroundViewport: { first: 0, last: 0 },
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Default Props Helper Functions
|
|
38
|
+
function horizontalOrDefault(horizontal) {
|
|
39
|
+
return horizontal ?? false
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function initialNumToRenderOrDefault(initialNumToRender) {
|
|
43
|
+
return initialNumToRender ?? 10
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function maxToRenderPerBatchOrDefault(maxToRenderPerBatch) {
|
|
47
|
+
return maxToRenderPerBatch ?? 10
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function onStartReachedThresholdOrDefault(onStartReachedThreshold) {
|
|
51
|
+
return onStartReachedThreshold ?? 2
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function onEndReachedThresholdOrDefault(onEndReachedThreshold) {
|
|
55
|
+
return onEndReachedThreshold ?? 2
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getScrollingThreshold(threshold, visibleLength) {
|
|
59
|
+
return (threshold * visibleLength) / 2
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function scrollEventThrottleOrDefault(scrollEventThrottle) {
|
|
63
|
+
return scrollEventThrottle ?? 50
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function windowSizeOrDefault(windowSize) {
|
|
67
|
+
return windowSize ?? 21
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function findLastWhere(arr, predicate) {
|
|
71
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
72
|
+
if (predicate(arr[i])) {
|
|
73
|
+
return arr[i]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return null
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class VirtualizedList extends StateSafePureComponent {
|
|
80
|
+
static contextType = VirtualizedListContext
|
|
81
|
+
|
|
82
|
+
constructor(props) {
|
|
83
|
+
super(props)
|
|
84
|
+
this._nestedChildLists = new ChildListCollection()
|
|
85
|
+
this._viewabilityTuples = []
|
|
86
|
+
this._scrollMetrics = {
|
|
87
|
+
contentLength: 0,
|
|
88
|
+
dOffset: 0,
|
|
89
|
+
dt: 10,
|
|
90
|
+
offset: 0,
|
|
91
|
+
timestamp: 0,
|
|
92
|
+
velocity: 0,
|
|
93
|
+
visibleLength: 0,
|
|
94
|
+
}
|
|
95
|
+
this._highestMeasuredFrameIndex = 0
|
|
96
|
+
this._headerLength = 0
|
|
97
|
+
this._footerLength = 0
|
|
98
|
+
this._averageCellLength = 0
|
|
99
|
+
this._hasWarned = {}
|
|
100
|
+
this._fillRateHelper = new FillRateHelper(this._getFrameMetrics)
|
|
101
|
+
this._updateCellsToRenderBatcher = new Batchinator(
|
|
102
|
+
this._updateCellsToRender,
|
|
103
|
+
this.props.updateCellsBatchingPeriod ?? 50
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
if (this.props.viewabilityConfig && this.props.onViewableItemsChanged) {
|
|
107
|
+
this._viewabilityTuples.push({
|
|
108
|
+
viewabilityHelper: new ViewabilityHelper(this.props.viewabilityConfig),
|
|
109
|
+
onViewableItemsChanged: this.props.onViewableItemsChanged,
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
scrollToEnd(params) {
|
|
115
|
+
const animated = params ? params.animated : true
|
|
116
|
+
const veryLast = this.props.getItemCount(this.props.data) - 1
|
|
117
|
+
if (veryLast < 0) {
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
const frame = this.__getFrameMetricsApprox(veryLast, this.props)
|
|
121
|
+
const offset = Math.max(
|
|
122
|
+
0,
|
|
123
|
+
frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
if (this._scrollRef == null) {
|
|
127
|
+
return
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (this._scrollRef.scrollTo == null) {
|
|
131
|
+
console.warn(
|
|
132
|
+
'No scrollTo method provided. This may be because you have two nested ' +
|
|
133
|
+
'VirtualizedLists with the same orientation, or because you are ' +
|
|
134
|
+
'using a custom component that does not implement scrollTo.'
|
|
135
|
+
)
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
this._scrollRef.scrollTo(
|
|
140
|
+
horizontalOrDefault(this.props.horizontal)
|
|
141
|
+
? { x: offset, animated }
|
|
142
|
+
: { y: offset, animated }
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
scrollToIndex(params) {
|
|
147
|
+
const { data, horizontal, getItemCount, getItemLayout, onScrollToIndexFailed } =
|
|
148
|
+
this.props
|
|
149
|
+
const { animated, index, viewOffset, viewPosition } = params
|
|
150
|
+
invariant(
|
|
151
|
+
index >= 0,
|
|
152
|
+
`scrollToIndex out of range: requested index ${index} but minimum is 0`
|
|
153
|
+
)
|
|
154
|
+
invariant(
|
|
155
|
+
getItemCount(data) >= 1,
|
|
156
|
+
`scrollToIndex out of range: item length ${getItemCount(data)} but minimum is 1`
|
|
157
|
+
)
|
|
158
|
+
invariant(
|
|
159
|
+
index < getItemCount(data),
|
|
160
|
+
`scrollToIndex out of range: requested index ${index} is out of 0 to ${
|
|
161
|
+
getItemCount(data) - 1
|
|
162
|
+
}`
|
|
163
|
+
)
|
|
164
|
+
if (!getItemLayout && index > this._highestMeasuredFrameIndex) {
|
|
165
|
+
invariant(
|
|
166
|
+
!!onScrollToIndexFailed,
|
|
167
|
+
'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' +
|
|
168
|
+
'otherwise there is no way to know the location of offscreen indices or handle failures.'
|
|
169
|
+
)
|
|
170
|
+
onScrollToIndexFailed({
|
|
171
|
+
averageItemLength: this._averageCellLength,
|
|
172
|
+
highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,
|
|
173
|
+
index,
|
|
174
|
+
})
|
|
175
|
+
return
|
|
176
|
+
}
|
|
177
|
+
const frame = this.__getFrameMetricsApprox(Math.floor(index), this.props)
|
|
178
|
+
const offset =
|
|
179
|
+
Math.max(
|
|
180
|
+
0,
|
|
181
|
+
this._getOffsetApprox(index, this.props) -
|
|
182
|
+
(viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)
|
|
183
|
+
) - (viewOffset || 0)
|
|
184
|
+
|
|
185
|
+
if (this._scrollRef == null) {
|
|
186
|
+
return
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
this._scrollRef.scrollTo(
|
|
190
|
+
horizontalOrDefault(horizontal) ? { x: offset, animated } : { y: offset, animated }
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
scrollToItem(params) {
|
|
195
|
+
const { data, getItem, getItemCount, horizontal, onScrollToIndexFailed } = this.props
|
|
196
|
+
const { animated, item, viewPosition, viewOffset } = params
|
|
197
|
+
const index = this.props.data.indexOf(item)
|
|
198
|
+
if (index !== -1) {
|
|
199
|
+
this.scrollToIndex({
|
|
200
|
+
animated,
|
|
201
|
+
index,
|
|
202
|
+
viewOffset,
|
|
203
|
+
viewPosition,
|
|
204
|
+
})
|
|
205
|
+
} else {
|
|
206
|
+
const itemCount = getItemCount(data)
|
|
207
|
+
for (let i = 0; i < itemCount; i++) {
|
|
208
|
+
if (getItem(data, i) === item) {
|
|
209
|
+
this.scrollToIndex({
|
|
210
|
+
animated,
|
|
211
|
+
index: i,
|
|
212
|
+
viewOffset,
|
|
213
|
+
viewPosition,
|
|
214
|
+
})
|
|
215
|
+
break
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
scrollToOffset(params) {
|
|
222
|
+
const { animated, offset } = params
|
|
223
|
+
if (this._scrollRef == null) {
|
|
224
|
+
return
|
|
225
|
+
}
|
|
226
|
+
this._scrollRef.scrollTo(
|
|
227
|
+
horizontalOrDefault(this.props.horizontal)
|
|
228
|
+
? { x: offset, animated }
|
|
229
|
+
: { y: offset, animated }
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
recordInteraction() {
|
|
234
|
+
this._nestedChildLists.forEach((childList) => {
|
|
235
|
+
childList.recordInteraction()
|
|
236
|
+
})
|
|
237
|
+
this._viewabilityTuples.forEach((viewabilityTuple) => {
|
|
238
|
+
viewabilityTuple.viewabilityHelper.recordInteraction()
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
flashScrollIndicators() {
|
|
243
|
+
if (this._scrollRef && this._scrollRef.flashScrollIndicators) {
|
|
244
|
+
this._scrollRef.flashScrollIndicators()
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
getScrollResponder() {
|
|
249
|
+
if (this._scrollRef && this._scrollRef.getScrollResponder) {
|
|
250
|
+
return this._scrollRef.getScrollResponder()
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
getScrollableNode() {
|
|
255
|
+
if (this._scrollRef && this._scrollRef.getScrollableNode) {
|
|
256
|
+
return this._scrollRef.getScrollableNode()
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
getScrollRef() {
|
|
261
|
+
return this._scrollRef
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
setNativeProps(props) {
|
|
265
|
+
if (this._scrollRef) {
|
|
266
|
+
this._scrollRef.setNativeProps(props)
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
render() {
|
|
271
|
+
const {
|
|
272
|
+
ListEmptyComponent,
|
|
273
|
+
ListFooterComponent,
|
|
274
|
+
ListHeaderComponent,
|
|
275
|
+
data,
|
|
276
|
+
debug,
|
|
277
|
+
disableVirtualization,
|
|
278
|
+
getItem,
|
|
279
|
+
getItemCount,
|
|
280
|
+
getItemLayout,
|
|
281
|
+
horizontal,
|
|
282
|
+
keyExtractor,
|
|
283
|
+
numColumns,
|
|
284
|
+
onEndReached,
|
|
285
|
+
onEndReachedThreshold,
|
|
286
|
+
onLayout,
|
|
287
|
+
onRefresh,
|
|
288
|
+
onScroll,
|
|
289
|
+
onScrollBeginDrag,
|
|
290
|
+
onScrollEndDrag,
|
|
291
|
+
onMomentumScrollBegin,
|
|
292
|
+
onMomentumScrollEnd,
|
|
293
|
+
onStartReached,
|
|
294
|
+
onStartReachedThreshold,
|
|
295
|
+
onViewableItemsChanged,
|
|
296
|
+
refreshing,
|
|
297
|
+
removeClippedSubviews,
|
|
298
|
+
renderItem,
|
|
299
|
+
viewabilityConfig,
|
|
300
|
+
viewabilityConfigCallbackPairs,
|
|
301
|
+
...restProps
|
|
302
|
+
} = this.props
|
|
303
|
+
|
|
304
|
+
const itemCount = getItemCount(data)
|
|
305
|
+
|
|
306
|
+
if (itemCount === 0) {
|
|
307
|
+
return ListEmptyComponent ? <ListEmptyComponent /> : null
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return (
|
|
311
|
+
<ScrollView
|
|
312
|
+
{...restProps}
|
|
313
|
+
ref={this._captureRef}
|
|
314
|
+
onContentSizeChange={this._onContentSizeChange}
|
|
315
|
+
onLayout={this._onLayout}
|
|
316
|
+
onScroll={this._onScroll}
|
|
317
|
+
refreshControl={
|
|
318
|
+
onRefresh && <RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
|
319
|
+
}
|
|
320
|
+
scrollEventThrottle={scrollEventThrottleOrDefault(this.props.scrollEventThrottle)}
|
|
321
|
+
removeClippedSubviews={removeClippedSubviews}
|
|
322
|
+
>
|
|
323
|
+
{this._renderChildren()}
|
|
324
|
+
</ScrollView>
|
|
325
|
+
)
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
_renderChildren() {
|
|
329
|
+
const { data, getItem, getItemCount, renderItem } = this.props
|
|
330
|
+
const items = []
|
|
331
|
+
|
|
332
|
+
for (let i = 0; i < getItemCount(data); i++) {
|
|
333
|
+
const item = getItem(data, i)
|
|
334
|
+
items.push(
|
|
335
|
+
<CellRenderer
|
|
336
|
+
key={this.props.keyExtractor ? this.props.keyExtractor(item, i) : i}
|
|
337
|
+
cellKey={String(i)}
|
|
338
|
+
index={i}
|
|
339
|
+
item={item}
|
|
340
|
+
renderItem={renderItem}
|
|
341
|
+
/>
|
|
342
|
+
)
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return items
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
_captureRef = (ref) => {
|
|
349
|
+
this._scrollRef = ref
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
_onContentSizeChange = (width, height) => {
|
|
353
|
+
// Handle content size changes
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
_onLayout = (event) => {
|
|
357
|
+
// Handle layout changes
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
_onScroll = (event) => {
|
|
361
|
+
// Handle scroll events
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
__getFrameMetricsApprox(index, props) {
|
|
365
|
+
const frame = {
|
|
366
|
+
length: this._averageCellLength,
|
|
367
|
+
offset: this._averageCellLength * index,
|
|
368
|
+
}
|
|
369
|
+
return frame
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
_getOffsetApprox(index, props) {
|
|
373
|
+
return this.__getFrameMetricsApprox(index, props).offset
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export { VirtualizedList }
|
|
378
|
+
export default VirtualizedList
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { VirtualizedList } from '../VirtualizedList'
|
|
9
|
+
import * as React from 'react'
|
|
10
|
+
|
|
11
|
+
const defaultProps = {
|
|
12
|
+
data: [],
|
|
13
|
+
key: null,
|
|
14
|
+
renderItem: null,
|
|
15
|
+
ItemSeparatorComponent: null,
|
|
16
|
+
keyExtractor: null,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class VirtualizedSectionList extends React.PureComponent {
|
|
20
|
+
scrollToLocation(params) {
|
|
21
|
+
let index = params.itemIndex
|
|
22
|
+
for (let i = 0; i < params.sectionIndex; i++) {
|
|
23
|
+
index += this.props.getItemCount(this.props.sections[i].data) + 2
|
|
24
|
+
}
|
|
25
|
+
let viewOffset = params.viewOffset || 0
|
|
26
|
+
if (this._listRef == null) {
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {
|
|
30
|
+
const frame = this._listRef.__getFrameMetricsApprox(
|
|
31
|
+
index - params.itemIndex,
|
|
32
|
+
this._listRef.props
|
|
33
|
+
)
|
|
34
|
+
viewOffset += frame.length
|
|
35
|
+
}
|
|
36
|
+
const toIndexParams = {
|
|
37
|
+
...params,
|
|
38
|
+
viewOffset,
|
|
39
|
+
index,
|
|
40
|
+
}
|
|
41
|
+
this._listRef.scrollToIndex(toIndexParams)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
getListRef() {
|
|
45
|
+
return this._listRef
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
render() {
|
|
49
|
+
const {
|
|
50
|
+
ItemSeparatorComponent,
|
|
51
|
+
SectionSeparatorComponent,
|
|
52
|
+
renderItem: _renderItem,
|
|
53
|
+
renderSectionFooter,
|
|
54
|
+
renderSectionHeader,
|
|
55
|
+
sections: _sections,
|
|
56
|
+
stickySectionHeadersEnabled,
|
|
57
|
+
...passThroughProps
|
|
58
|
+
} = this.props
|
|
59
|
+
|
|
60
|
+
const listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0
|
|
61
|
+
|
|
62
|
+
const stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined
|
|
63
|
+
|
|
64
|
+
let itemCount = 0
|
|
65
|
+
for (const section of this.props.sections) {
|
|
66
|
+
if (stickyHeaderIndices != null) {
|
|
67
|
+
stickyHeaderIndices.push(itemCount + listHeaderOffset)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
itemCount += 2
|
|
71
|
+
itemCount += this.props.getItemCount(section.data)
|
|
72
|
+
}
|
|
73
|
+
const renderItem = this._renderItem(itemCount)
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<VirtualizedList
|
|
77
|
+
{...passThroughProps}
|
|
78
|
+
keyExtractor={this._keyExtractor}
|
|
79
|
+
stickyHeaderIndices={stickyHeaderIndices}
|
|
80
|
+
renderItem={renderItem}
|
|
81
|
+
data={this.props.sections}
|
|
82
|
+
getItem={(sections, index) => this._getItem(this.props, sections, index)}
|
|
83
|
+
getItemCount={() => itemCount}
|
|
84
|
+
onViewableItemsChanged={
|
|
85
|
+
this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined
|
|
86
|
+
}
|
|
87
|
+
ref={this._captureRef}
|
|
88
|
+
/>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
_getItem(props, sections, index) {
|
|
93
|
+
if (!sections) {
|
|
94
|
+
return null
|
|
95
|
+
}
|
|
96
|
+
let itemIdx = index - 1
|
|
97
|
+
for (let i = 0; i < sections.length; i++) {
|
|
98
|
+
const section = sections[i]
|
|
99
|
+
const sectionData = section.data
|
|
100
|
+
const itemCount = props.getItemCount(sectionData)
|
|
101
|
+
if (itemIdx === -1 || itemIdx === itemCount) {
|
|
102
|
+
return section
|
|
103
|
+
} else if (itemIdx < itemCount) {
|
|
104
|
+
return props.getItem(sectionData, itemIdx)
|
|
105
|
+
} else {
|
|
106
|
+
itemIdx -= itemCount + 2
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return null
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
_keyExtractor = (item, index) => {
|
|
113
|
+
const keyExtractor = this.props.keyExtractor || this._defaultKeyExtractor
|
|
114
|
+
return keyExtractor(item, index)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
_defaultKeyExtractor = (item, index) => {
|
|
118
|
+
return item.key != null ? item.key : String(index)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_captureRef = (ref) => {
|
|
122
|
+
this._listRef = ref
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
_renderItem = (itemCount) => {
|
|
126
|
+
return ({ item, index }) => {
|
|
127
|
+
if (index === 0 || index === itemCount - 1) {
|
|
128
|
+
return null
|
|
129
|
+
}
|
|
130
|
+
const renderItem = this.props.renderItem || this._defaultRenderItem
|
|
131
|
+
return renderItem({ item, index, section: item })
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
_defaultRenderItem = ({ item }) => {
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
_onViewableItemsChanged = (info) => {
|
|
140
|
+
if (this.props.onViewableItemsChanged) {
|
|
141
|
+
this.props.onViewableItemsChanged(info)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
VirtualizedSectionList.defaultProps = defaultProps
|
|
147
|
+
|
|
148
|
+
export { VirtualizedSectionList }
|
|
149
|
+
export default VirtualizedSectionList
|