@hanzogui/react-native-web-lite 2.0.0-rc.41-hanzoai.5
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 +109 -0
- package/dist/cjs/ActivityIndicator/__tests__/index-test.cjs +209 -0
- package/dist/cjs/ActivityIndicator/index.cjs +130 -0
- package/dist/cjs/Alert/index.cjs +30 -0
- package/dist/cjs/AppRegistry/AppContainer.cjs +75 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.cjs +97 -0
- package/dist/cjs/AppRegistry/__tests__/index-test.node.cjs +162 -0
- package/dist/cjs/AppRegistry/index.cjs +100 -0
- package/dist/cjs/AppRegistry/renderApplication.cjs +74 -0
- package/dist/cjs/AppState/__tests__/index-test.cjs +38 -0
- package/dist/cjs/AppState/index.cjs +85 -0
- package/dist/cjs/Appearance/index.cjs +64 -0
- package/dist/cjs/BackHandler/index.cjs +37 -0
- package/dist/cjs/Clipboard/index.cjs +64 -0
- package/dist/cjs/DeviceEmitter.cjs +29 -0
- package/dist/cjs/DeviceInfo/index.cjs +76 -0
- package/dist/cjs/Dimensions/__tests__/index-test.cjs +67 -0
- package/dist/cjs/Dimensions/index.cjs +112 -0
- package/dist/cjs/FlatList.cjs +241 -0
- package/dist/cjs/I18nManager/index.cjs +40 -0
- package/dist/cjs/Image/index.cjs +355 -0
- package/dist/cjs/Image/types.cjs +18 -0
- package/dist/cjs/ImageBackground/__tests__/index-test.cjs +72 -0
- package/dist/cjs/ImageBackground/index.cjs +69 -0
- package/dist/cjs/InteractionManager/TaskQueue.cjs +111 -0
- package/dist/cjs/InteractionManager/index.cjs +141 -0
- package/dist/cjs/Keyboard/index.cjs +40 -0
- package/dist/cjs/KeyboardAvoidingView/index.cjs +72 -0
- package/dist/cjs/Libraries/Pressability/Pressability.cjs +28 -0
- package/dist/cjs/Libraries/Pressability/usePressability.cjs +28 -0
- package/dist/cjs/Linking/__tests__/index-test.cjs +56 -0
- package/dist/cjs/Linking/index.cjs +103 -0
- package/dist/cjs/LogBox/index.cjs +35 -0
- package/dist/cjs/Modal/ModalAnimation.cjs +174 -0
- package/dist/cjs/Modal/ModalContent.cjs +95 -0
- package/dist/cjs/Modal/ModalPortal.cjs +63 -0
- package/dist/cjs/Modal/index.cjs +28 -0
- package/dist/cjs/NativeModules/index.cjs +31 -0
- package/dist/cjs/PanResponder/index.cjs +39 -0
- package/dist/cjs/PixelRatio/index.cjs +59 -0
- package/dist/cjs/Pressable/index.cjs +172 -0
- package/dist/cjs/RefreshControl/index.cjs +51 -0
- package/dist/cjs/SafeAreaView/index.cjs +70 -0
- package/dist/cjs/ScrollView/ScrollViewBase.cjs +167 -0
- package/dist/cjs/ScrollView/index.cjs +672 -0
- package/dist/cjs/SectionList.cjs +41 -0
- package/dist/cjs/Share/index.cjs +58 -0
- package/dist/cjs/StatusBar/index.cjs +38 -0
- package/dist/cjs/Text/index.cjs +197 -0
- package/dist/cjs/Text/types.cjs +18 -0
- package/dist/cjs/TextInput/index.cjs +396 -0
- package/dist/cjs/TextInput/types.cjs +18 -0
- package/dist/cjs/TouchableNativeFeedback.cjs +28 -0
- package/dist/cjs/TouchableOpacity.cjs +125 -0
- package/dist/cjs/TouchableWithoutFeedback.cjs +95 -0
- package/dist/cjs/UnimplementedView.cjs +52 -0
- package/dist/cjs/Vibration/index.cjs +40 -0
- package/dist/cjs/View/index.cjs +144 -0
- package/dist/cjs/View/types.cjs +18 -0
- package/dist/cjs/VirtualizedList.cjs +41 -0
- package/dist/cjs/codegenNativeCommand.cjs +31 -0
- package/dist/cjs/codegenNativeComponent.cjs +31 -0
- package/dist/cjs/createElement/__tests__/index-test.cjs +828 -0
- package/dist/cjs/createElement/index.cjs +94 -0
- package/dist/cjs/createReactDOMStyle.cjs +30 -0
- package/dist/cjs/index.cjs +174 -0
- package/dist/cjs/modules/requestIdleCallback.cjs +45 -0
- package/dist/cjs/preprocess.cjs +32 -0
- package/dist/cjs/render/index.cjs +34 -0
- package/dist/cjs/styleTypes.cjs +18 -0
- package/dist/cjs/types.cjs +18 -0
- package/dist/cjs/useColorScheme/index.cjs +53 -0
- package/dist/cjs/useLocaleContext/index.cjs +28 -0
- package/dist/cjs/useWindowDimensions/index.cjs +58 -0
- package/dist/cjs/vendor/react-native/Animated/Animated.cjs +48 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedEvent.cjs +164 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedImplementation.cjs +587 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedMock.cjs +147 -0
- package/dist/cjs/vendor/react-native/Animated/AnimatedPlatformConfig.cjs +1 -0
- package/dist/cjs/vendor/react-native/Animated/Easing.cjs +199 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedHelper.cjs +402 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedModule.cjs +80 -0
- package/dist/cjs/vendor/react-native/Animated/NativeAnimatedTurboModule.cjs +77 -0
- package/dist/cjs/vendor/react-native/Animated/SpringConfig.cjs +86 -0
- package/dist/cjs/vendor/react-native/Animated/animations/Animation.cjs +72 -0
- package/dist/cjs/vendor/react-native/Animated/animations/DecayAnimation.cjs +95 -0
- package/dist/cjs/vendor/react-native/Animated/animations/SpringAnimation.cjs +233 -0
- package/dist/cjs/vendor/react-native/Animated/animations/TimingAnimation.cjs +134 -0
- package/dist/cjs/vendor/react-native/Animated/bezier.cjs +124 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedFlatList.cjs +50 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedImage.cjs +44 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedScrollView.cjs +50 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedSectionList.cjs +50 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedText.cjs +32 -0
- package/dist/cjs/vendor/react-native/Animated/components/AnimatedView.cjs +32 -0
- package/dist/cjs/vendor/react-native/Animated/createAnimatedComponent.cjs +65 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedAddition.cjs +69 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedColor.cjs +274 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDiffClamp.cjs +74 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDivision.cjs +84 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedInterpolation.cjs +225 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedModulo.cjs +64 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedMultiplication.cjs +69 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedNode.cjs +174 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedProps.cjs +151 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedStyle.cjs +136 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedSubtraction.cjs +69 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTracking.cjs +90 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTransform.cjs +127 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValue.cjs +239 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValueXY.cjs +119 -0
- package/dist/cjs/vendor/react-native/Animated/nodes/AnimatedWithChildren.cjs +87 -0
- package/dist/cjs/vendor/react-native/Animated/useAnimatedProps.cjs +104 -0
- package/dist/cjs/vendor/react-native/Batchinator/index.cjs +72 -0
- package/dist/cjs/vendor/react-native/EventEmitter/NativeEventEmitter.cjs +73 -0
- package/dist/cjs/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.cjs +31 -0
- package/dist/cjs/vendor/react-native/FeatureFlags.cjs +35 -0
- package/dist/cjs/vendor/react-native/FillRateHelper/index.cjs +189 -0
- package/dist/cjs/vendor/react-native/FlatList/index.cjs +324 -0
- package/dist/cjs/vendor/react-native/JSEventLoopWatchdog/index.cjs +93 -0
- package/dist/cjs/vendor/react-native/LayoutAnimation/index.cjs +116 -0
- package/dist/cjs/vendor/react-native/PanResponder/index.cjs +207 -0
- package/dist/cjs/vendor/react-native/PooledClass/index.cjs +62 -0
- package/dist/cjs/vendor/react-native/ReactNative/ReactNativeFeatureFlags.cjs +36 -0
- package/dist/cjs/vendor/react-native/SectionList/index.cjs +128 -0
- package/dist/cjs/vendor/react-native/StaticContainer/index.cjs +52 -0
- package/dist/cjs/vendor/react-native/StaticRenderer/index.cjs +51 -0
- package/dist/cjs/vendor/react-native/TouchHistoryMath/index.cjs +125 -0
- package/dist/cjs/vendor/react-native/TurboModule/RCTExport.cjs +36 -0
- package/dist/cjs/vendor/react-native/TurboModule/TurboModuleRegistry.cjs +39 -0
- package/dist/cjs/vendor/react-native/Types/CoreEventTypes.cjs +158 -0
- package/dist/cjs/vendor/react-native/Utilities/Platform.cjs +30 -0
- package/dist/cjs/vendor/react-native/Utilities/clamp.cjs +40 -0
- package/dist/cjs/vendor/react-native/Utilities/setAndForwardRef.cjs +45 -0
- package/dist/cjs/vendor/react-native/Utilities/useMergeRefs.cjs +45 -0
- package/dist/cjs/vendor/react-native/Utilities/useRefEffect.cjs +42 -0
- package/dist/cjs/vendor/react-native/ViewabilityHelper/index.cjs +184 -0
- package/dist/cjs/vendor/react-native/ViewabilityHelper.cjs +175 -0
- package/dist/cjs/vendor/react-native/VirtualizeUtils/index.cjs +144 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/CellRenderMask.cjs +110 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/ChildListCollection.cjs +77 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/StateSafePureComponent.cjs +92 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.cjs +182 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListContext.cjs +89 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListProps.cjs +66 -0
- package/dist/cjs/vendor/react-native/VirtualizedList/index.cjs +310 -0
- package/dist/cjs/vendor/react-native/VirtualizedSectionList/index.cjs +165 -0
- package/dist/cjs/vendor/react-native/deepDiffer/index.cjs +74 -0
- package/dist/cjs/vendor/react-native/emitter/EventEmitter.cjs +32 -0
- package/dist/cjs/vendor/react-native/emitter/EventSubscription.cjs +1 -0
- package/dist/cjs/vendor/react-native/emitter/_EmitterSubscription.cjs +59 -0
- package/dist/cjs/vendor/react-native/emitter/_EventEmitter.cjs +136 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscription.cjs +46 -0
- package/dist/cjs/vendor/react-native/emitter/_EventSubscriptionVendor.cjs +96 -0
- package/dist/cjs/vendor/react-native/infoLog/index.cjs +34 -0
- package/dist/cjs/vendor/react-native/useRefEffect.cjs +42 -0
- package/dist/cjs/vendor/react-native/vendor/emitter/EventEmitter.cjs +103 -0
- package/dist/cjs/without-animated.cjs +348 -0
- package/dist/esm/AccessibilityInfo/index.mjs +84 -0
- package/dist/esm/AccessibilityInfo/index.mjs.map +1 -0
- package/dist/esm/ActivityIndicator/__tests__/index-test.mjs +186 -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 +38 -0
- package/dist/esm/AppRegistry/AppContainer.mjs.map +1 -0
- package/dist/esm/AppRegistry/__tests__/index-test.mjs +74 -0
- package/dist/esm/AppRegistry/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/AppRegistry/__tests__/index-test.node.mjs +139 -0
- package/dist/esm/AppRegistry/__tests__/index-test.node.mjs.map +1 -0
- package/dist/esm/AppRegistry/index.mjs +75 -0
- package/dist/esm/AppRegistry/index.mjs.map +1 -0
- package/dist/esm/AppRegistry/renderApplication.mjs +48 -0
- package/dist/esm/AppRegistry/renderApplication.mjs.map +1 -0
- package/dist/esm/AppState/__tests__/index-test.mjs +15 -0
- package/dist/esm/AppState/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/AppState/index.mjs +60 -0
- package/dist/esm/AppState/index.mjs.map +1 -0
- package/dist/esm/Appearance/index.mjs +39 -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 +39 -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 +51 -0
- package/dist/esm/DeviceInfo/index.mjs.map +1 -0
- package/dist/esm/Dimensions/__tests__/index-test.mjs +44 -0
- package/dist/esm/Dimensions/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/Dimensions/index.mjs +86 -0
- package/dist/esm/Dimensions/index.mjs.map +1 -0
- package/dist/esm/FlatList.mjs +204 -0
- package/dist/esm/FlatList.mjs.map +1 -0
- package/dist/esm/I18nManager/index.mjs +15 -0
- package/dist/esm/I18nManager/index.mjs.map +1 -0
- package/dist/esm/Image/index.mjs +318 -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 +49 -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 +86 -0
- package/dist/esm/InteractionManager/TaskQueue.mjs.map +1 -0
- package/dist/esm/InteractionManager/index.mjs +105 -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 +35 -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 +33 -0
- package/dist/esm/Linking/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/Linking/index.mjs +78 -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 +138 -0
- package/dist/esm/Modal/ModalAnimation.mjs.map +1 -0
- package/dist/esm/Modal/ModalContent.mjs +59 -0
- package/dist/esm/Modal/ModalContent.mjs.map +1 -0
- package/dist/esm/Modal/ModalPortal.mjs +27 -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 +133 -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 +33 -0
- package/dist/esm/SafeAreaView/index.mjs.map +1 -0
- package/dist/esm/ScrollView/ScrollViewBase.mjs +130 -0
- package/dist/esm/ScrollView/ScrollViewBase.mjs.map +1 -0
- package/dist/esm/ScrollView/index.mjs +635 -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 +33 -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 +160 -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 +359 -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 +87 -0
- package/dist/esm/TouchableOpacity.mjs.map +1 -0
- package/dist/esm/TouchableWithoutFeedback.mjs +59 -0
- package/dist/esm/TouchableWithoutFeedback.mjs.map +1 -0
- package/dist/esm/UnimplementedView.mjs +16 -0
- package/dist/esm/UnimplementedView.mjs.map +1 -0
- package/dist/esm/Vibration/index.mjs +15 -0
- package/dist/esm/Vibration/index.mjs.map +1 -0
- package/dist/esm/View/index.mjs +107 -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 +6 -0
- package/dist/esm/codegenNativeCommand.mjs.map +1 -0
- package/dist/esm/codegenNativeComponent.mjs +6 -0
- package/dist/esm/codegenNativeComponent.mjs.map +1 -0
- package/dist/esm/createElement/__tests__/index-test.mjs +805 -0
- package/dist/esm/createElement/__tests__/index-test.mjs.map +1 -0
- package/dist/esm/createElement/index.mjs +57 -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 +17 -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 +22 -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 +136 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedEvent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.mjs +558 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/AnimatedMock.mjs +118 -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 +171 -0
- package/dist/esm/vendor/react-native/Animated/Easing.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.mjs +360 -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 +60 -0
- package/dist/esm/vendor/react-native/Animated/SpringConfig.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/Animation.mjs +44 -0
- package/dist/esm/vendor/react-native/Animated/animations/Animation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.mjs +67 -0
- package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.mjs +205 -0
- package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.mjs +108 -0
- package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/bezier.mjs +96 -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 +28 -0
- package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.mjs +41 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.mjs +248 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.mjs +48 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.mjs +56 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.mjs +197 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.mjs +38 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.mjs +41 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.mjs +146 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.mjs +125 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.mjs +110 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.mjs +41 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.mjs +64 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.mjs +99 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.mjs +211 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.mjs +93 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.mjs +59 -0
- package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.mjs +76 -0
- package/dist/esm/vendor/react-native/Animated/useAnimatedProps.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Batchinator/index.mjs +44 -0
- package/dist/esm/vendor/react-native/Batchinator/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/EventEmitter/NativeEventEmitter.mjs +45 -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 +163 -0
- package/dist/esm/vendor/react-native/FillRateHelper/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/FlatList/index.mjs +287 -0
- package/dist/esm/vendor/react-native/FlatList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/JSEventLoopWatchdog/index.mjs +65 -0
- package/dist/esm/vendor/react-native/JSEventLoopWatchdog/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/LayoutAnimation/index.mjs +88 -0
- package/dist/esm/vendor/react-native/LayoutAnimation/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/PanResponder/index.mjs +170 -0
- package/dist/esm/vendor/react-native/PanResponder/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/PooledClass/index.mjs +36 -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 +91 -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 +99 -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 +11 -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 +12 -0
- package/dist/esm/vendor/react-native/Utilities/clamp.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.mjs +17 -0
- package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/useMergeRefs.mjs +19 -0
- package/dist/esm/vendor/react-native/Utilities/useMergeRefs.mjs.map +1 -0
- package/dist/esm/vendor/react-native/Utilities/useRefEffect.mjs +16 -0
- package/dist/esm/vendor/react-native/Utilities/useRefEffect.mjs.map +1 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper/index.mjs +156 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper.mjs +149 -0
- package/dist/esm/vendor/react-native/ViewabilityHelper.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizeUtils/index.mjs +116 -0
- package/dist/esm/vendor/react-native/VirtualizeUtils/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/CellRenderMask.mjs +85 -0
- package/dist/esm/vendor/react-native/VirtualizedList/CellRenderMask.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/ChildListCollection.mjs +51 -0
- package/dist/esm/vendor/react-native/VirtualizedList/ChildListCollection.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/StateSafePureComponent.mjs +55 -0
- package/dist/esm/vendor/react-native/VirtualizedList/StateSafePureComponent.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.mjs +145 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedList/VirtualizedListContext.mjs +50 -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 +284 -0
- package/dist/esm/vendor/react-native/VirtualizedList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/VirtualizedSectionList/index.mjs +128 -0
- package/dist/esm/vendor/react-native/VirtualizedSectionList/index.mjs.map +1 -0
- package/dist/esm/vendor/react-native/deepDiffer/index.mjs +46 -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 +31 -0
- package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.mjs.map +1 -0
- package/dist/esm/vendor/react-native/emitter/_EventEmitter.mjs +110 -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 +68 -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 +16 -0
- package/dist/esm/vendor/react-native/useRefEffect.mjs.map +1 -0
- package/dist/esm/vendor/react-native/vendor/emitter/EventEmitter.mjs +75 -0
- package/dist/esm/vendor/react-native/vendor/emitter/EventEmitter.mjs.map +1 -0
- package/dist/esm/without-animated.mjs +234 -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,204 @@
|
|
|
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
|
+
/**
|
|
12
|
+
* Used to find the indices of the frames that overlap the given offsets. Useful for finding the
|
|
13
|
+
* items that bound different windows of content, such as the visible area or the buffered overscan
|
|
14
|
+
* area.
|
|
15
|
+
*/
|
|
16
|
+
export function elementsThatOverlapOffsets(
|
|
17
|
+
offsets,
|
|
18
|
+
props,
|
|
19
|
+
getFrameMetrics,
|
|
20
|
+
zoomScale = 1
|
|
21
|
+
) {
|
|
22
|
+
const itemCount = props.getItemCount(props.data)
|
|
23
|
+
const result = []
|
|
24
|
+
for (let offsetIndex = 0; offsetIndex < offsets.length; offsetIndex++) {
|
|
25
|
+
const currentOffset = offsets[offsetIndex]
|
|
26
|
+
let left = 0
|
|
27
|
+
let right = itemCount - 1
|
|
28
|
+
|
|
29
|
+
while (left <= right) {
|
|
30
|
+
// eslint-disable-next-line no-bitwise
|
|
31
|
+
const mid = left + ((right - left) >>> 1)
|
|
32
|
+
const frame = getFrameMetrics(mid, props)
|
|
33
|
+
const scaledOffsetStart = frame.offset * zoomScale
|
|
34
|
+
const scaledOffsetEnd = (frame.offset + frame.length) * zoomScale
|
|
35
|
+
|
|
36
|
+
// We want the first frame that contains the offset, with inclusive bounds. Thus, for the
|
|
37
|
+
// first frame the scaledOffsetStart is inclusive, while for other frames it is exclusive.
|
|
38
|
+
if (
|
|
39
|
+
(mid === 0 && currentOffset < scaledOffsetStart) ||
|
|
40
|
+
(mid !== 0 && currentOffset <= scaledOffsetStart)
|
|
41
|
+
) {
|
|
42
|
+
right = mid - 1
|
|
43
|
+
} else if (currentOffset > scaledOffsetEnd) {
|
|
44
|
+
left = mid + 1
|
|
45
|
+
} else {
|
|
46
|
+
result[offsetIndex] = mid
|
|
47
|
+
break
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return result
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Computes the number of elements in the `next` range that are new compared to the `prev` range.
|
|
57
|
+
* Handy for calculating how many new items will be rendered when the render window changes so we
|
|
58
|
+
* can restrict the number of new items render at once so that content can appear on the screen
|
|
59
|
+
* faster.
|
|
60
|
+
*/
|
|
61
|
+
export function newRangeCount(prev, next) {
|
|
62
|
+
return (
|
|
63
|
+
next.last -
|
|
64
|
+
next.first +
|
|
65
|
+
1 -
|
|
66
|
+
Math.max(0, 1 + Math.min(next.last, prev.last) - Math.max(next.first, prev.first))
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Custom logic for determining which items should be rendered given the current frame and scroll
|
|
72
|
+
* metrics, as well as the previous render state. The algorithm may evolve over time, but generally
|
|
73
|
+
* prioritizes the visible area first, then expands that with overscan regions ahead and behind,
|
|
74
|
+
* biased in the direction of scroll.
|
|
75
|
+
*/
|
|
76
|
+
export function computeWindowedRenderLimits(
|
|
77
|
+
props,
|
|
78
|
+
maxToRenderPerBatch,
|
|
79
|
+
windowSize,
|
|
80
|
+
prev,
|
|
81
|
+
getFrameMetricsApprox,
|
|
82
|
+
scrollMetrics
|
|
83
|
+
) {
|
|
84
|
+
const itemCount = props.getItemCount(props.data)
|
|
85
|
+
if (itemCount === 0) {
|
|
86
|
+
return { first: 0, last: -1 }
|
|
87
|
+
}
|
|
88
|
+
const { offset, velocity, visibleLength, zoomScale = 1 } = scrollMetrics
|
|
89
|
+
|
|
90
|
+
// Start with visible area, then compute maximum overscan region by expanding from there, biased
|
|
91
|
+
// in the direction of scroll. Total overscan area is capped, which should cap memory consumption
|
|
92
|
+
// too.
|
|
93
|
+
const visibleBegin = Math.max(0, offset)
|
|
94
|
+
const visibleEnd = visibleBegin + visibleLength
|
|
95
|
+
const overscanLength = (windowSize - 1) * visibleLength
|
|
96
|
+
|
|
97
|
+
// Considering velocity seems to introduce more churn than it's worth.
|
|
98
|
+
const leadFactor = 0.5 // Math.max(0, Math.min(1, velocity / 25 + 0.5));
|
|
99
|
+
|
|
100
|
+
const fillPreference = velocity > 1 ? 'after' : velocity < -1 ? 'before' : 'none'
|
|
101
|
+
|
|
102
|
+
const overscanBegin = Math.max(0, visibleBegin - (1 - leadFactor) * overscanLength)
|
|
103
|
+
const overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength)
|
|
104
|
+
|
|
105
|
+
const lastItemOffset = getFrameMetricsApprox(itemCount - 1, props).offset * zoomScale
|
|
106
|
+
if (lastItemOffset < overscanBegin) {
|
|
107
|
+
// Entire list is before our overscan window
|
|
108
|
+
return {
|
|
109
|
+
first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),
|
|
110
|
+
last: itemCount - 1,
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Find the indices that correspond to the items at the render boundaries we're targeting.
|
|
115
|
+
let [overscanFirst, first, last, overscanLast] = elementsThatOverlapOffsets(
|
|
116
|
+
[overscanBegin, visibleBegin, visibleEnd, overscanEnd],
|
|
117
|
+
props,
|
|
118
|
+
getFrameMetricsApprox,
|
|
119
|
+
zoomScale
|
|
120
|
+
)
|
|
121
|
+
overscanFirst = overscanFirst == null ? 0 : overscanFirst
|
|
122
|
+
first = first == null ? Math.max(0, overscanFirst) : first
|
|
123
|
+
overscanLast = overscanLast == null ? itemCount - 1 : overscanLast
|
|
124
|
+
last = last == null ? Math.min(overscanLast, first + maxToRenderPerBatch - 1) : last
|
|
125
|
+
const visible = { first, last }
|
|
126
|
+
|
|
127
|
+
// We want to limit the number of new cells we're rendering per batch so that we can fill the
|
|
128
|
+
// content on the screen quickly. If we rendered the entire overscan window at once, the user
|
|
129
|
+
// could be staring at white space for a long time waiting for a bunch of offscreen content to
|
|
130
|
+
// render.
|
|
131
|
+
let newCellCount = newRangeCount(prev, visible)
|
|
132
|
+
|
|
133
|
+
while (true) {
|
|
134
|
+
if (first <= overscanFirst && last >= overscanLast) {
|
|
135
|
+
// If we fill the entire overscan range, we're done.
|
|
136
|
+
break
|
|
137
|
+
}
|
|
138
|
+
const maxNewCells = newCellCount >= maxToRenderPerBatch
|
|
139
|
+
const firstWillAddMore = first <= prev.first || first > prev.last
|
|
140
|
+
const firstShouldIncrement =
|
|
141
|
+
first > overscanFirst && (!maxNewCells || !firstWillAddMore)
|
|
142
|
+
const lastWillAddMore = last >= prev.last || last < prev.first
|
|
143
|
+
const lastShouldIncrement = last < overscanLast && (!maxNewCells || !lastWillAddMore)
|
|
144
|
+
if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {
|
|
145
|
+
// We only want to stop if we've hit maxNewCells AND we cannot increment first or last
|
|
146
|
+
// without rendering new items. This let's us preserve as many already rendered items as
|
|
147
|
+
// possible, reducing render churn and keeping the rendered overscan range as large as
|
|
148
|
+
// possible.
|
|
149
|
+
break
|
|
150
|
+
}
|
|
151
|
+
if (
|
|
152
|
+
firstShouldIncrement &&
|
|
153
|
+
!(fillPreference === 'after' && lastShouldIncrement && lastWillAddMore)
|
|
154
|
+
) {
|
|
155
|
+
if (firstWillAddMore) {
|
|
156
|
+
newCellCount++
|
|
157
|
+
}
|
|
158
|
+
first--
|
|
159
|
+
}
|
|
160
|
+
if (
|
|
161
|
+
lastShouldIncrement &&
|
|
162
|
+
!(fillPreference === 'before' && firstShouldIncrement && firstWillAddMore)
|
|
163
|
+
) {
|
|
164
|
+
if (lastWillAddMore) {
|
|
165
|
+
newCellCount++
|
|
166
|
+
}
|
|
167
|
+
last++
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (
|
|
171
|
+
!(
|
|
172
|
+
last >= first &&
|
|
173
|
+
first >= 0 &&
|
|
174
|
+
last < itemCount &&
|
|
175
|
+
first >= overscanFirst &&
|
|
176
|
+
last <= overscanLast &&
|
|
177
|
+
first <= visible.first &&
|
|
178
|
+
last >= visible.last
|
|
179
|
+
)
|
|
180
|
+
) {
|
|
181
|
+
throw new Error(
|
|
182
|
+
'Bad window calculation ' +
|
|
183
|
+
JSON.stringify({
|
|
184
|
+
first,
|
|
185
|
+
last,
|
|
186
|
+
itemCount,
|
|
187
|
+
overscanFirst,
|
|
188
|
+
overscanLast,
|
|
189
|
+
visible,
|
|
190
|
+
})
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
return { first, last }
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function keyExtractor(item, index) {
|
|
197
|
+
if (typeof item === 'object' && item?.key != null) {
|
|
198
|
+
return item.key
|
|
199
|
+
}
|
|
200
|
+
if (typeof item === 'object' && item?.id != null) {
|
|
201
|
+
return item.id
|
|
202
|
+
}
|
|
203
|
+
return String(index)
|
|
204
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
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 { invariant } from '@hanzogui/react-native-web-internals'
|
|
12
|
+
|
|
13
|
+
export class CellRenderMask {
|
|
14
|
+
constructor(numCells) {
|
|
15
|
+
invariant(numCells >= 0, 'CellRenderMask must contain a non-negative number os cells')
|
|
16
|
+
|
|
17
|
+
this._numCells = numCells
|
|
18
|
+
|
|
19
|
+
if (numCells === 0) {
|
|
20
|
+
this._regions = []
|
|
21
|
+
} else {
|
|
22
|
+
this._regions = [
|
|
23
|
+
{
|
|
24
|
+
first: 0,
|
|
25
|
+
last: numCells - 1,
|
|
26
|
+
isSpacer: true,
|
|
27
|
+
},
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
enumerateRegions() {
|
|
33
|
+
return this._regions
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
addCells(cells) {
|
|
37
|
+
invariant(
|
|
38
|
+
cells.first >= 0 &&
|
|
39
|
+
cells.first < this._numCells &&
|
|
40
|
+
cells.last >= -1 &&
|
|
41
|
+
cells.last < this._numCells &&
|
|
42
|
+
cells.last >= cells.first - 1,
|
|
43
|
+
'CellRenderMask.addCells called with invalid cell range'
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
// VirtualizedList uses inclusive ranges, where zero-count states are
|
|
47
|
+
// possible. E.g. [0, -1] for no cells, starting at 0.
|
|
48
|
+
if (cells.last < cells.first) {
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const [firstIntersect, firstIntersectIdx] = this._findRegion(cells.first)
|
|
53
|
+
const [lastIntersect, lastIntersectIdx] = this._findRegion(cells.last)
|
|
54
|
+
|
|
55
|
+
// Fast-path if the cells to add are already all present in the mask. We
|
|
56
|
+
// will otherwise need to do some mutation.
|
|
57
|
+
if (firstIntersectIdx === lastIntersectIdx && !firstIntersect.isSpacer) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// We need to replace the existing covered regions with 1-3 new regions
|
|
62
|
+
// depending whether we need to split spacers out of overlapping regions.
|
|
63
|
+
const newLeadRegion = []
|
|
64
|
+
const newTailRegion = []
|
|
65
|
+
const newMainRegion = {
|
|
66
|
+
...cells,
|
|
67
|
+
isSpacer: false,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (firstIntersect.first < newMainRegion.first) {
|
|
71
|
+
if (firstIntersect.isSpacer) {
|
|
72
|
+
newLeadRegion.push({
|
|
73
|
+
first: firstIntersect.first,
|
|
74
|
+
last: newMainRegion.first - 1,
|
|
75
|
+
isSpacer: true,
|
|
76
|
+
})
|
|
77
|
+
} else {
|
|
78
|
+
newMainRegion.first = firstIntersect.first
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (lastIntersect.last > newMainRegion.last) {
|
|
83
|
+
if (lastIntersect.isSpacer) {
|
|
84
|
+
newTailRegion.push({
|
|
85
|
+
first: newMainRegion.last + 1,
|
|
86
|
+
last: lastIntersect.last,
|
|
87
|
+
isSpacer: true,
|
|
88
|
+
})
|
|
89
|
+
} else {
|
|
90
|
+
newMainRegion.last = lastIntersect.last
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const replacementRegions = [...newLeadRegion, newMainRegion, ...newTailRegion]
|
|
95
|
+
const numRegionsToDelete = lastIntersectIdx - firstIntersectIdx + 1
|
|
96
|
+
this._regions.splice(firstIntersectIdx, numRegionsToDelete, ...replacementRegions)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
numCells() {
|
|
100
|
+
return this._numCells
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
equals(other) {
|
|
104
|
+
return (
|
|
105
|
+
this._numCells === other._numCells &&
|
|
106
|
+
this._regions.length === other._regions.length &&
|
|
107
|
+
this._regions.every(
|
|
108
|
+
(region, i) =>
|
|
109
|
+
region.first === other._regions[i].first &&
|
|
110
|
+
region.last === other._regions[i].last &&
|
|
111
|
+
region.isSpacer === other._regions[i].isSpacer
|
|
112
|
+
)
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
_findRegion(cellIdx) {
|
|
117
|
+
let firstIdx = 0
|
|
118
|
+
let lastIdx = this._regions.length - 1
|
|
119
|
+
|
|
120
|
+
while (firstIdx <= lastIdx) {
|
|
121
|
+
const middleIdx = Math.floor((firstIdx + lastIdx) / 2)
|
|
122
|
+
const middleRegion = this._regions[middleIdx]
|
|
123
|
+
|
|
124
|
+
if (cellIdx >= middleRegion.first && cellIdx <= middleRegion.last) {
|
|
125
|
+
return [middleRegion, middleIdx]
|
|
126
|
+
} else if (cellIdx < middleRegion.first) {
|
|
127
|
+
lastIdx = middleIdx - 1
|
|
128
|
+
} else if (cellIdx > middleRegion.last) {
|
|
129
|
+
firstIdx = middleIdx + 1
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
invariant(false, `A region was not found containing cellIdx ${cellIdx}`)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { invariant } from '@hanzogui/react-native-web-internals'
|
|
12
|
+
|
|
13
|
+
class ChildListCollection {
|
|
14
|
+
_cellKeyToChildren = new Map()
|
|
15
|
+
_childrenToCellKey = new Map()
|
|
16
|
+
|
|
17
|
+
add(list, cellKey) {
|
|
18
|
+
invariant(
|
|
19
|
+
!this._childrenToCellKey.has(list),
|
|
20
|
+
'Trying to add already present child list'
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const cellLists = this._cellKeyToChildren.get(cellKey) ?? new Set()
|
|
24
|
+
cellLists.add(list)
|
|
25
|
+
this._cellKeyToChildren.set(cellKey, cellLists)
|
|
26
|
+
|
|
27
|
+
this._childrenToCellKey.set(list, cellKey)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
remove(list) {
|
|
31
|
+
const cellKey = this._childrenToCellKey.get(list)
|
|
32
|
+
invariant(cellKey != null, 'Trying to remove non-present child list')
|
|
33
|
+
this._childrenToCellKey.delete(list)
|
|
34
|
+
|
|
35
|
+
const cellLists = this._cellKeyToChildren.get(cellKey)
|
|
36
|
+
invariant(cellLists, '_cellKeyToChildren should contain cellKey')
|
|
37
|
+
cellLists.delete(list)
|
|
38
|
+
|
|
39
|
+
if (cellLists.size === 0) {
|
|
40
|
+
this._cellKeyToChildren.delete(cellKey)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
forEach(fn) {
|
|
45
|
+
for (const listSet of this._cellKeyToChildren.values()) {
|
|
46
|
+
for (const list of listSet) {
|
|
47
|
+
fn(list)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
forEachInCell(cellKey, fn) {
|
|
53
|
+
const listSet = this._cellKeyToChildren.get(cellKey) ?? []
|
|
54
|
+
for (const list of listSet) {
|
|
55
|
+
fn(list)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
anyInCell(cellKey, fn) {
|
|
60
|
+
const listSet = this._cellKeyToChildren.get(cellKey) ?? []
|
|
61
|
+
for (const list of listSet) {
|
|
62
|
+
if (fn(list)) {
|
|
63
|
+
return true
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
size() {
|
|
70
|
+
return this._childrenToCellKey.size
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { ChildListCollection }
|
|
75
|
+
export default ChildListCollection
|
|
@@ -0,0 +1,82 @@
|
|
|
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 { invariant } from '@hanzogui/react-native-web-internals'
|
|
12
|
+
import * as React from 'react'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* `setState` is called asynchronously, and should not rely on the value of
|
|
16
|
+
* `this.props` or `this.state`:
|
|
17
|
+
* https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous
|
|
18
|
+
*
|
|
19
|
+
* SafePureComponent adds runtime enforcement, to catch cases where these
|
|
20
|
+
* variables are read in a state updater function, instead of the ones passed
|
|
21
|
+
* in.
|
|
22
|
+
*/
|
|
23
|
+
class StateSafePureComponent extends React.PureComponent {
|
|
24
|
+
_inAsyncStateUpdate = false
|
|
25
|
+
|
|
26
|
+
constructor(props) {
|
|
27
|
+
super(props)
|
|
28
|
+
this._installSetStateHooks()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
setState(partialState, callback) {
|
|
32
|
+
if (typeof partialState === 'function') {
|
|
33
|
+
super.setState((state, props) => {
|
|
34
|
+
this._inAsyncStateUpdate = true
|
|
35
|
+
let ret
|
|
36
|
+
try {
|
|
37
|
+
ret = partialState(state, props)
|
|
38
|
+
} catch (err) {
|
|
39
|
+
throw err
|
|
40
|
+
} finally {
|
|
41
|
+
this._inAsyncStateUpdate = false
|
|
42
|
+
}
|
|
43
|
+
return ret
|
|
44
|
+
}, callback)
|
|
45
|
+
} else {
|
|
46
|
+
super.setState(partialState, callback)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
_installSetStateHooks() {
|
|
51
|
+
const that = this
|
|
52
|
+
let { props, state } = this
|
|
53
|
+
|
|
54
|
+
Object.defineProperty(this, 'props', {
|
|
55
|
+
get() {
|
|
56
|
+
invariant(
|
|
57
|
+
!that._inAsyncStateUpdate,
|
|
58
|
+
'"this.props" should not be accessed during state updates'
|
|
59
|
+
)
|
|
60
|
+
return props
|
|
61
|
+
},
|
|
62
|
+
set(newProps) {
|
|
63
|
+
props = newProps
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
Object.defineProperty(this, 'state', {
|
|
67
|
+
get() {
|
|
68
|
+
invariant(
|
|
69
|
+
!that._inAsyncStateUpdate,
|
|
70
|
+
'"this.state" should not be acceessed during state updates'
|
|
71
|
+
)
|
|
72
|
+
return state
|
|
73
|
+
},
|
|
74
|
+
set(newState) {
|
|
75
|
+
state = newState
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { StateSafePureComponent }
|
|
82
|
+
export default StateSafePureComponent
|
|
@@ -0,0 +1,184 @@
|
|
|
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 { View } from '../../../View'
|
|
12
|
+
import { StyleSheet, invariant } from '@hanzogui/react-native-web-internals'
|
|
13
|
+
import { VirtualizedListCellContextProvider } from './VirtualizedListContext'
|
|
14
|
+
import * as React from 'react'
|
|
15
|
+
|
|
16
|
+
class CellRenderer extends React.Component {
|
|
17
|
+
state = {
|
|
18
|
+
separatorProps: {
|
|
19
|
+
highlighted: false,
|
|
20
|
+
leadingItem: this.props.item,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getDerivedStateFromProps(props, prevState) {
|
|
25
|
+
return {
|
|
26
|
+
separatorProps: {
|
|
27
|
+
...prevState.separatorProps,
|
|
28
|
+
leadingItem: props.item,
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
|
|
34
|
+
// reused by SectionList and we can keep VirtualizedList simpler.
|
|
35
|
+
// $FlowFixMe[missing-local-annot]
|
|
36
|
+
_separators = {
|
|
37
|
+
highlight: () => {
|
|
38
|
+
const { cellKey, prevCellKey } = this.props
|
|
39
|
+
this.props.onUpdateSeparators?.([cellKey, prevCellKey], {
|
|
40
|
+
highlighted: true,
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
unhighlight: () => {
|
|
44
|
+
const { cellKey, prevCellKey } = this.props
|
|
45
|
+
this.props.onUpdateSeparators?.([cellKey, prevCellKey], {
|
|
46
|
+
highlighted: false,
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
updateProps: (select, newProps) => {
|
|
50
|
+
const { cellKey, prevCellKey } = this.props
|
|
51
|
+
this.props.onUpdateSeparators?.(
|
|
52
|
+
[select === 'leading' ? prevCellKey : cellKey],
|
|
53
|
+
newProps
|
|
54
|
+
)
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
updateSeparatorProps(newProps) {
|
|
59
|
+
this.setState((state) => ({
|
|
60
|
+
separatorProps: { ...state.separatorProps, ...newProps },
|
|
61
|
+
}))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
componentWillUnmount() {
|
|
65
|
+
this.props.onUnmount?.(this.props.cellKey)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
_onLayout = (nativeEvent) => {
|
|
69
|
+
this.props.onCellLayout?.(nativeEvent, this.props.cellKey, this.props.index)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
_renderElement(renderItem, ListItemComponent, item, index) {
|
|
73
|
+
if (renderItem && ListItemComponent) {
|
|
74
|
+
console.warn(
|
|
75
|
+
'VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' +
|
|
76
|
+
' precedence over renderItem.'
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (ListItemComponent) {
|
|
81
|
+
/* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This
|
|
82
|
+
* comment suppresses an error found when Flow v0.108 was deployed. To
|
|
83
|
+
* see the error, delete this comment and run Flow. */
|
|
84
|
+
/* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)
|
|
85
|
+
* This comment suppresses an error found when Flow v0.108 was deployed.
|
|
86
|
+
* To see the error, delete this comment and run Flow. */
|
|
87
|
+
return React.createElement(ListItemComponent, {
|
|
88
|
+
item,
|
|
89
|
+
index,
|
|
90
|
+
separators: this._separators,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (renderItem) {
|
|
95
|
+
return renderItem({
|
|
96
|
+
item,
|
|
97
|
+
index,
|
|
98
|
+
separators: this._separators,
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
invariant(
|
|
103
|
+
false,
|
|
104
|
+
'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.'
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
render() {
|
|
109
|
+
const {
|
|
110
|
+
CellRendererComponent,
|
|
111
|
+
ItemSeparatorComponent,
|
|
112
|
+
ListItemComponent,
|
|
113
|
+
cellKey,
|
|
114
|
+
horizontal,
|
|
115
|
+
item,
|
|
116
|
+
index,
|
|
117
|
+
inversionStyle,
|
|
118
|
+
onCellFocusCapture,
|
|
119
|
+
onCellLayout,
|
|
120
|
+
renderItem,
|
|
121
|
+
} = this.props
|
|
122
|
+
const element = this._renderElement(renderItem, ListItemComponent, item, index)
|
|
123
|
+
|
|
124
|
+
// NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
|
|
125
|
+
// called explicitly by `ScrollViewStickyHeader`.
|
|
126
|
+
const itemSeparator = React.isValidElement(ItemSeparatorComponent)
|
|
127
|
+
? // $FlowFixMe[incompatible-type]
|
|
128
|
+
ItemSeparatorComponent
|
|
129
|
+
: // $FlowFixMe[incompatible-type]
|
|
130
|
+
ItemSeparatorComponent && (
|
|
131
|
+
<ItemSeparatorComponent {...this.state.separatorProps} />
|
|
132
|
+
)
|
|
133
|
+
const cellStyle = inversionStyle
|
|
134
|
+
? horizontal
|
|
135
|
+
? [styles.rowReverse, inversionStyle]
|
|
136
|
+
: [styles.columnReverse, inversionStyle]
|
|
137
|
+
: horizontal
|
|
138
|
+
? [styles.row, inversionStyle]
|
|
139
|
+
: inversionStyle
|
|
140
|
+
const result = !CellRendererComponent ? (
|
|
141
|
+
<View
|
|
142
|
+
style={cellStyle}
|
|
143
|
+
onFocusCapture={onCellFocusCapture}
|
|
144
|
+
{...(onCellLayout && { onLayout: this._onLayout })}
|
|
145
|
+
>
|
|
146
|
+
{element}
|
|
147
|
+
{itemSeparator}
|
|
148
|
+
</View>
|
|
149
|
+
) : (
|
|
150
|
+
<CellRendererComponent
|
|
151
|
+
cellKey={cellKey}
|
|
152
|
+
index={index}
|
|
153
|
+
item={item}
|
|
154
|
+
style={cellStyle}
|
|
155
|
+
onFocusCapture={onCellFocusCapture}
|
|
156
|
+
{...(onCellLayout && { onLayout: this._onLayout })}
|
|
157
|
+
>
|
|
158
|
+
{element}
|
|
159
|
+
{itemSeparator}
|
|
160
|
+
</CellRendererComponent>
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<VirtualizedListCellContextProvider cellKey={this.props.cellKey}>
|
|
165
|
+
{result}
|
|
166
|
+
</VirtualizedListCellContextProvider>
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const styles = StyleSheet.create({
|
|
172
|
+
row: {
|
|
173
|
+
flexDirection: 'row',
|
|
174
|
+
},
|
|
175
|
+
rowReverse: {
|
|
176
|
+
flexDirection: 'row-reverse',
|
|
177
|
+
},
|
|
178
|
+
columnReverse: {
|
|
179
|
+
flexDirection: 'column-reverse',
|
|
180
|
+
},
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
export default CellRenderer
|
|
184
|
+
export { CellRenderer }
|