@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,88 @@
|
|
|
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
|
+
const defaultSpringConfig = {
|
|
12
|
+
stiffness: 0,
|
|
13
|
+
damping: 0,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function stiffnessFromOrigamiValue(oValue) {
|
|
17
|
+
return (oValue - 30) * 3.62 + 194
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function dampingFromOrigamiValue(oValue) {
|
|
21
|
+
return (oValue - 8) * 3 + 25
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function fromOrigamiTensionAndFriction(tension, friction) {
|
|
25
|
+
return {
|
|
26
|
+
stiffness: stiffnessFromOrigamiValue(tension),
|
|
27
|
+
damping: dampingFromOrigamiValue(friction),
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function fromBouncinessAndSpeed(bounciness, speed) {
|
|
32
|
+
function normalize(value, startValue, endValue) {
|
|
33
|
+
return (value - startValue) / (endValue - startValue)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function projectNormal(n, start, end) {
|
|
37
|
+
return start + n * (end - start)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function linearInterpolation(t, start, end) {
|
|
41
|
+
return t * end + (1 - t) * start
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function quadraticOutInterpolation(t, start, end) {
|
|
45
|
+
return linearInterpolation(2 * t - t * t, start, end)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function b3Friction1(x) {
|
|
49
|
+
return 0.0007 * x ** 3 - 0.031 * x ** 2 + 0.64 * x + 1.28
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function b3Friction2(x) {
|
|
53
|
+
return 0.000044 * x ** 3 - 0.006 * x ** 2 + 0.36 * x + 2
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function b3Friction3(x) {
|
|
57
|
+
return 0.00000045 * x ** 3 - 0.000332 * x ** 2 + 0.1078 * x + 5.84
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function b3Nobounce(tension) {
|
|
61
|
+
if (tension <= 18) {
|
|
62
|
+
return b3Friction1(tension)
|
|
63
|
+
} else if (tension > 18 && tension <= 44) {
|
|
64
|
+
return b3Friction2(tension)
|
|
65
|
+
} else {
|
|
66
|
+
return b3Friction3(tension)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let b = normalize(bounciness / 1.7, 0, 20)
|
|
71
|
+
b = projectNormal(b, 0, 0.8)
|
|
72
|
+
const s = normalize(speed / 1.7, 0, 20)
|
|
73
|
+
const bouncyTension = projectNormal(s, 0.5, 200)
|
|
74
|
+
const bouncyFriction = quadraticOutInterpolation(b, b3Nobounce(bouncyTension), 0.01)
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
stiffness: stiffnessFromOrigamiValue(bouncyTension),
|
|
78
|
+
damping: dampingFromOrigamiValue(bouncyFriction),
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const SpringConfig = {
|
|
83
|
+
fromOrigamiTensionAndFriction,
|
|
84
|
+
fromBouncinessAndSpeed,
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { SpringConfig }
|
|
88
|
+
export default SpringConfig
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict'
|
|
11
|
+
|
|
12
|
+
import { NativeAnimatedHelper } from '../NativeAnimatedHelper'
|
|
13
|
+
|
|
14
|
+
let startNativeAnimationNextId = 1
|
|
15
|
+
|
|
16
|
+
// Important note: start() and stop() will only be called at most once.
|
|
17
|
+
// Once an animation has been stopped or finished its course, it will
|
|
18
|
+
// not be reused.
|
|
19
|
+
class Animation {
|
|
20
|
+
__active
|
|
21
|
+
__isInteraction
|
|
22
|
+
__nativeId
|
|
23
|
+
__onEnd
|
|
24
|
+
__iterations
|
|
25
|
+
start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}
|
|
26
|
+
stop() {
|
|
27
|
+
if (this.__nativeId) {
|
|
28
|
+
NativeAnimatedHelper.API.stopAnimation(this.__nativeId)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
__getNativeAnimationConfig() {
|
|
32
|
+
// Subclasses that have corresponding animation implementation done in native
|
|
33
|
+
// should override this method
|
|
34
|
+
throw new Error('This animation type cannot be offloaded to native')
|
|
35
|
+
}
|
|
36
|
+
// Helper function for subclasses to make sure onEnd is only called once.
|
|
37
|
+
__debouncedOnEnd(result) {
|
|
38
|
+
const onEnd = this.__onEnd
|
|
39
|
+
this.__onEnd = null
|
|
40
|
+
onEnd && onEnd(result)
|
|
41
|
+
}
|
|
42
|
+
__startNativeAnimation(animatedValue) {
|
|
43
|
+
const startNativeAnimationWaitId = `${startNativeAnimationNextId}:startAnimation`
|
|
44
|
+
startNativeAnimationNextId += 1
|
|
45
|
+
NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId)
|
|
46
|
+
try {
|
|
47
|
+
const config = this.__getNativeAnimationConfig()
|
|
48
|
+
animatedValue.__makeNative(config.platformConfig)
|
|
49
|
+
this.__nativeId = NativeAnimatedHelper.generateNewAnimationId()
|
|
50
|
+
NativeAnimatedHelper.API.startAnimatingNode(
|
|
51
|
+
this.__nativeId,
|
|
52
|
+
animatedValue.__getNativeTag(),
|
|
53
|
+
config,
|
|
54
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
55
|
+
this.__debouncedOnEnd.bind(this)
|
|
56
|
+
)
|
|
57
|
+
} catch (e) {
|
|
58
|
+
throw e
|
|
59
|
+
} finally {
|
|
60
|
+
NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { Animation }
|
|
66
|
+
export default Animation
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict'
|
|
11
|
+
|
|
12
|
+
import { Animation } from './Animation'
|
|
13
|
+
|
|
14
|
+
import { shouldUseNativeDriver } from '../NativeAnimatedHelper'
|
|
15
|
+
|
|
16
|
+
class DecayAnimation extends Animation {
|
|
17
|
+
_startTime
|
|
18
|
+
_lastValue
|
|
19
|
+
_fromValue
|
|
20
|
+
_deceleration
|
|
21
|
+
_velocity
|
|
22
|
+
_onUpdate
|
|
23
|
+
_animationFrame
|
|
24
|
+
_useNativeDriver
|
|
25
|
+
|
|
26
|
+
constructor(config) {
|
|
27
|
+
super()
|
|
28
|
+
this._deceleration = config.deceleration ?? 0.998
|
|
29
|
+
this._velocity = config.velocity
|
|
30
|
+
this._useNativeDriver = shouldUseNativeDriver(config)
|
|
31
|
+
this.__isInteraction = config.isInteraction ?? !this._useNativeDriver
|
|
32
|
+
this.__iterations = config.iterations ?? 1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
__getNativeAnimationConfig() {
|
|
36
|
+
return {
|
|
37
|
+
type: 'decay',
|
|
38
|
+
deceleration: this._deceleration,
|
|
39
|
+
velocity: this._velocity,
|
|
40
|
+
iterations: this.__iterations,
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
|
|
45
|
+
this.__active = true
|
|
46
|
+
this._lastValue = fromValue
|
|
47
|
+
this._fromValue = fromValue
|
|
48
|
+
this._onUpdate = onUpdate
|
|
49
|
+
this.__onEnd = onEnd
|
|
50
|
+
this._startTime = Date.now()
|
|
51
|
+
if (this._useNativeDriver) {
|
|
52
|
+
this.__startNativeAnimation(animatedValue)
|
|
53
|
+
} else {
|
|
54
|
+
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this))
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onUpdate() {
|
|
59
|
+
const now = Date.now()
|
|
60
|
+
|
|
61
|
+
const value =
|
|
62
|
+
this._fromValue +
|
|
63
|
+
(this._velocity / (1 - this._deceleration)) *
|
|
64
|
+
(1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)))
|
|
65
|
+
|
|
66
|
+
this._onUpdate(value)
|
|
67
|
+
|
|
68
|
+
if (Math.abs(this._lastValue - value) < 0.1) {
|
|
69
|
+
this.__debouncedOnEnd({ finished: true })
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
this._lastValue = value
|
|
74
|
+
if (this.__active) {
|
|
75
|
+
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this))
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
stop() {
|
|
80
|
+
super.stop()
|
|
81
|
+
this.__active = false
|
|
82
|
+
global.cancelAnimationFrame(this._animationFrame)
|
|
83
|
+
this.__debouncedOnEnd({ finished: false })
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { DecayAnimation }
|
|
88
|
+
export default DecayAnimation
|
|
@@ -0,0 +1,291 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict'
|
|
11
|
+
|
|
12
|
+
import { Animation } from './Animation'
|
|
13
|
+
import { SpringConfig } from '../SpringConfig'
|
|
14
|
+
|
|
15
|
+
import { invariant } from '@hanzogui/react-native-web-internals'
|
|
16
|
+
|
|
17
|
+
import { shouldUseNativeDriver } from '../NativeAnimatedHelper'
|
|
18
|
+
|
|
19
|
+
class SpringAnimation extends Animation {
|
|
20
|
+
_overshootClamping
|
|
21
|
+
_restDisplacementThreshold
|
|
22
|
+
_restSpeedThreshold
|
|
23
|
+
_lastVelocity
|
|
24
|
+
_startPosition
|
|
25
|
+
_lastPosition
|
|
26
|
+
_fromValue
|
|
27
|
+
_toValue
|
|
28
|
+
_stiffness
|
|
29
|
+
_damping
|
|
30
|
+
_mass
|
|
31
|
+
_initialVelocity
|
|
32
|
+
_delay
|
|
33
|
+
_timeout
|
|
34
|
+
_startTime
|
|
35
|
+
_lastTime
|
|
36
|
+
_frameTime
|
|
37
|
+
_onUpdate
|
|
38
|
+
_animationFrame
|
|
39
|
+
_useNativeDriver
|
|
40
|
+
_platformConfig
|
|
41
|
+
|
|
42
|
+
constructor(config) {
|
|
43
|
+
super()
|
|
44
|
+
|
|
45
|
+
this._overshootClamping = config.overshootClamping ?? false
|
|
46
|
+
this._restDisplacementThreshold = config.restDisplacementThreshold ?? 0.001
|
|
47
|
+
this._restSpeedThreshold = config.restSpeedThreshold ?? 0.001
|
|
48
|
+
this._initialVelocity = config.velocity ?? 0
|
|
49
|
+
this._lastVelocity = config.velocity ?? 0
|
|
50
|
+
this._toValue = config.toValue
|
|
51
|
+
this._delay = config.delay ?? 0
|
|
52
|
+
this._useNativeDriver = shouldUseNativeDriver(config)
|
|
53
|
+
this._platformConfig = config.platformConfig
|
|
54
|
+
this.__isInteraction = config.isInteraction ?? !this._useNativeDriver
|
|
55
|
+
this.__iterations = config.iterations ?? 1
|
|
56
|
+
|
|
57
|
+
if (
|
|
58
|
+
config.stiffness !== undefined ||
|
|
59
|
+
config.damping !== undefined ||
|
|
60
|
+
config.mass !== undefined
|
|
61
|
+
) {
|
|
62
|
+
invariant(
|
|
63
|
+
config.bounciness === undefined &&
|
|
64
|
+
config.speed === undefined &&
|
|
65
|
+
config.tension === undefined &&
|
|
66
|
+
config.friction === undefined,
|
|
67
|
+
'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one'
|
|
68
|
+
)
|
|
69
|
+
this._stiffness = config.stiffness ?? 100
|
|
70
|
+
this._damping = config.damping ?? 10
|
|
71
|
+
this._mass = config.mass ?? 1
|
|
72
|
+
} else if (config.bounciness !== undefined || config.speed !== undefined) {
|
|
73
|
+
// Convert the origami bounciness/speed values to stiffness/damping
|
|
74
|
+
// We assume mass is 1.
|
|
75
|
+
invariant(
|
|
76
|
+
config.tension === undefined &&
|
|
77
|
+
config.friction === undefined &&
|
|
78
|
+
config.stiffness === undefined &&
|
|
79
|
+
config.damping === undefined &&
|
|
80
|
+
config.mass === undefined,
|
|
81
|
+
'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one'
|
|
82
|
+
)
|
|
83
|
+
const springConfig = SpringConfig.fromBouncinessAndSpeed(
|
|
84
|
+
config.bounciness ?? 8,
|
|
85
|
+
config.speed ?? 12
|
|
86
|
+
)
|
|
87
|
+
this._stiffness = springConfig.stiffness
|
|
88
|
+
this._damping = springConfig.damping
|
|
89
|
+
this._mass = 1
|
|
90
|
+
} else {
|
|
91
|
+
// Convert the origami tension/friction values to stiffness/damping
|
|
92
|
+
// We assume mass is 1.
|
|
93
|
+
const springConfig = SpringConfig.fromOrigamiTensionAndFriction(
|
|
94
|
+
config.tension ?? 40,
|
|
95
|
+
config.friction ?? 7
|
|
96
|
+
)
|
|
97
|
+
this._stiffness = springConfig.stiffness
|
|
98
|
+
this._damping = springConfig.damping
|
|
99
|
+
this._mass = 1
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
invariant(this._stiffness > 0, 'Stiffness value must be greater than 0')
|
|
103
|
+
invariant(this._damping > 0, 'Damping value must be greater than 0')
|
|
104
|
+
invariant(this._mass > 0, 'Mass value must be greater than 0')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
__getNativeAnimationConfig() {
|
|
108
|
+
return {
|
|
109
|
+
type: 'spring',
|
|
110
|
+
overshootClamping: this._overshootClamping,
|
|
111
|
+
restDisplacementThreshold: this._restDisplacementThreshold,
|
|
112
|
+
restSpeedThreshold: this._restSpeedThreshold,
|
|
113
|
+
stiffness: this._stiffness,
|
|
114
|
+
damping: this._damping,
|
|
115
|
+
mass: this._mass,
|
|
116
|
+
initialVelocity: this._initialVelocity ?? this._lastVelocity,
|
|
117
|
+
toValue: this._toValue,
|
|
118
|
+
iterations: this.__iterations,
|
|
119
|
+
platformConfig: this._platformConfig,
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
|
|
124
|
+
this.__active = true
|
|
125
|
+
this._startPosition = fromValue
|
|
126
|
+
this._lastPosition = this._startPosition
|
|
127
|
+
|
|
128
|
+
this._onUpdate = onUpdate
|
|
129
|
+
this.__onEnd = onEnd
|
|
130
|
+
this._lastTime = Date.now()
|
|
131
|
+
this._frameTime = 0.0
|
|
132
|
+
|
|
133
|
+
if (previousAnimation instanceof SpringAnimation) {
|
|
134
|
+
const internalState = previousAnimation.getInternalState()
|
|
135
|
+
this._lastPosition = internalState.lastPosition
|
|
136
|
+
this._lastVelocity = internalState.lastVelocity
|
|
137
|
+
// Set the initial velocity to the last velocity
|
|
138
|
+
this._initialVelocity = this._lastVelocity
|
|
139
|
+
this._lastTime = internalState.lastTime
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const start = () => {
|
|
143
|
+
if (this._useNativeDriver) {
|
|
144
|
+
this.__startNativeAnimation(animatedValue)
|
|
145
|
+
} else {
|
|
146
|
+
this.onUpdate()
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// If this._delay is more than 0, we start after the timeout.
|
|
151
|
+
if (this._delay) {
|
|
152
|
+
this._timeout = setTimeout(start, this._delay)
|
|
153
|
+
} else {
|
|
154
|
+
start()
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
getInternalState() {
|
|
159
|
+
return {
|
|
160
|
+
lastPosition: this._lastPosition,
|
|
161
|
+
lastVelocity: this._lastVelocity,
|
|
162
|
+
lastTime: this._lastTime,
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* This spring model is based off of a damped harmonic oscillator
|
|
168
|
+
* (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).
|
|
169
|
+
*
|
|
170
|
+
* We use the closed form of the second order differential equation:
|
|
171
|
+
*
|
|
172
|
+
* x'' + (2ζ⍵_0)x' + ⍵^2x = 0
|
|
173
|
+
*
|
|
174
|
+
* where
|
|
175
|
+
* ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),
|
|
176
|
+
* ζ = c / 2√mk (damping ratio),
|
|
177
|
+
* c = damping constant
|
|
178
|
+
* k = stiffness
|
|
179
|
+
* m = mass
|
|
180
|
+
*
|
|
181
|
+
* The derivation of the closed form is described in detail here:
|
|
182
|
+
* http://planetmath.org/sites/default/files/texpdf/39745.pdf
|
|
183
|
+
*
|
|
184
|
+
* This algorithm happens to match the algorithm used by CASpringAnimation,
|
|
185
|
+
* a QuartzCore (iOS) API that creates spring animations.
|
|
186
|
+
*/
|
|
187
|
+
onUpdate() {
|
|
188
|
+
// If for some reason we lost a lot of frames (e.g. process large payload or
|
|
189
|
+
// stopped in the debugger), we only advance by 4 frames worth of
|
|
190
|
+
// computation and will continue on the next frame. It's better to have it
|
|
191
|
+
// running at faster speed than jumping to the end.
|
|
192
|
+
const MAX_STEPS = 64
|
|
193
|
+
let now = Date.now()
|
|
194
|
+
if (now > this._lastTime + MAX_STEPS) {
|
|
195
|
+
now = this._lastTime + MAX_STEPS
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const deltaTime = (now - this._lastTime) / 1000
|
|
199
|
+
this._frameTime += deltaTime
|
|
200
|
+
|
|
201
|
+
const c = this._damping
|
|
202
|
+
const m = this._mass
|
|
203
|
+
const k = this._stiffness
|
|
204
|
+
const v0 = -this._initialVelocity
|
|
205
|
+
|
|
206
|
+
const zeta = c / (2 * Math.sqrt(k * m)) // damping ratio
|
|
207
|
+
const omega0 = Math.sqrt(k / m) // undamped angular frequency of the oscillator (rad/ms)
|
|
208
|
+
const omega1 = omega0 * Math.sqrt(1.0 - zeta * zeta) // exponential decay
|
|
209
|
+
const x0 = this._toValue - this._startPosition // calculate the oscillation from x0 = 1 to x = 0
|
|
210
|
+
|
|
211
|
+
let position = 0.0
|
|
212
|
+
let velocity = 0.0
|
|
213
|
+
const t = this._frameTime
|
|
214
|
+
if (zeta < 1) {
|
|
215
|
+
// Under damped
|
|
216
|
+
const envelope = Math.exp(-zeta * omega0 * t)
|
|
217
|
+
position =
|
|
218
|
+
this._toValue -
|
|
219
|
+
envelope *
|
|
220
|
+
(((v0 + zeta * omega0 * x0) / omega1) * Math.sin(omega1 * t) +
|
|
221
|
+
x0 * Math.cos(omega1 * t))
|
|
222
|
+
// This looks crazy -- it's actually just the derivative of the
|
|
223
|
+
// oscillation function
|
|
224
|
+
velocity =
|
|
225
|
+
zeta *
|
|
226
|
+
omega0 *
|
|
227
|
+
envelope *
|
|
228
|
+
((Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0)) / omega1 +
|
|
229
|
+
x0 * Math.cos(omega1 * t)) -
|
|
230
|
+
envelope *
|
|
231
|
+
(Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) -
|
|
232
|
+
omega1 * x0 * Math.sin(omega1 * t))
|
|
233
|
+
} else {
|
|
234
|
+
// Critically damped
|
|
235
|
+
const envelope = Math.exp(-omega0 * t)
|
|
236
|
+
position = this._toValue - envelope * (x0 + (v0 + omega0 * x0) * t)
|
|
237
|
+
velocity = envelope * (v0 * (t * omega0 - 1) + t * x0 * (omega0 * omega0))
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
this._lastTime = now
|
|
241
|
+
this._lastPosition = position
|
|
242
|
+
this._lastVelocity = velocity
|
|
243
|
+
|
|
244
|
+
this._onUpdate(position)
|
|
245
|
+
if (!this.__active) {
|
|
246
|
+
// a listener might have stopped us in _onUpdate
|
|
247
|
+
return
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Conditions for stopping the spring animation
|
|
251
|
+
let isOvershooting = false
|
|
252
|
+
if (this._overshootClamping && this._stiffness !== 0) {
|
|
253
|
+
if (this._startPosition < this._toValue) {
|
|
254
|
+
isOvershooting = position > this._toValue
|
|
255
|
+
} else {
|
|
256
|
+
isOvershooting = position < this._toValue
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const isVelocity = Math.abs(velocity) <= this._restSpeedThreshold
|
|
260
|
+
let isDisplacement = true
|
|
261
|
+
if (this._stiffness !== 0) {
|
|
262
|
+
isDisplacement =
|
|
263
|
+
Math.abs(this._toValue - position) <= this._restDisplacementThreshold
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (isOvershooting || (isVelocity && isDisplacement)) {
|
|
267
|
+
if (this._stiffness !== 0) {
|
|
268
|
+
// Ensure that we end up with a round value
|
|
269
|
+
this._lastPosition = this._toValue
|
|
270
|
+
this._lastVelocity = 0
|
|
271
|
+
this._onUpdate(this._toValue)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
this.__debouncedOnEnd({ finished: true })
|
|
275
|
+
return
|
|
276
|
+
}
|
|
277
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
278
|
+
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this))
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
stop() {
|
|
282
|
+
super.stop()
|
|
283
|
+
this.__active = false
|
|
284
|
+
clearTimeout(this._timeout)
|
|
285
|
+
global.cancelAnimationFrame(this._animationFrame)
|
|
286
|
+
this.__debouncedOnEnd({ finished: false })
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export { SpringAnimation }
|
|
291
|
+
export default SpringAnimation
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { Easing } from '../Easing'
|
|
11
|
+
|
|
12
|
+
import { Animation } from './Animation'
|
|
13
|
+
|
|
14
|
+
import { shouldUseNativeDriver } from '../NativeAnimatedHelper'
|
|
15
|
+
|
|
16
|
+
let _easeInOut
|
|
17
|
+
function easeInOut() {
|
|
18
|
+
if (!_easeInOut) {
|
|
19
|
+
_easeInOut = Easing.inOut(Easing.ease)
|
|
20
|
+
}
|
|
21
|
+
return _easeInOut
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class TimingAnimation extends Animation {
|
|
25
|
+
_startTime
|
|
26
|
+
_fromValue
|
|
27
|
+
_toValue
|
|
28
|
+
_duration
|
|
29
|
+
_delay
|
|
30
|
+
_easing
|
|
31
|
+
_onUpdate
|
|
32
|
+
_animationFrame
|
|
33
|
+
_timeout
|
|
34
|
+
_useNativeDriver
|
|
35
|
+
_platformConfig
|
|
36
|
+
|
|
37
|
+
constructor(config) {
|
|
38
|
+
super()
|
|
39
|
+
this._toValue = config.toValue
|
|
40
|
+
this._easing = config.easing ?? easeInOut()
|
|
41
|
+
this._duration = config.duration ?? 500
|
|
42
|
+
this._delay = config.delay ?? 0
|
|
43
|
+
this.__iterations = config.iterations ?? 1
|
|
44
|
+
this._useNativeDriver = shouldUseNativeDriver(config)
|
|
45
|
+
this._platformConfig = config.platformConfig
|
|
46
|
+
this.__isInteraction = config.isInteraction ?? !this._useNativeDriver
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
__getNativeAnimationConfig() {
|
|
50
|
+
const frameDuration = 1000.0 / 60.0
|
|
51
|
+
const frames = []
|
|
52
|
+
const numFrames = Math.round(this._duration / frameDuration)
|
|
53
|
+
for (let frame = 0; frame < numFrames; frame++) {
|
|
54
|
+
frames.push(this._easing(frame / numFrames))
|
|
55
|
+
}
|
|
56
|
+
frames.push(this._easing(1))
|
|
57
|
+
return {
|
|
58
|
+
type: 'frames',
|
|
59
|
+
frames,
|
|
60
|
+
toValue: this._toValue,
|
|
61
|
+
iterations: this.__iterations,
|
|
62
|
+
platformConfig: this._platformConfig,
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {
|
|
67
|
+
this.__active = true
|
|
68
|
+
this._fromValue = fromValue
|
|
69
|
+
this._onUpdate = onUpdate
|
|
70
|
+
this.__onEnd = onEnd
|
|
71
|
+
|
|
72
|
+
const start = () => {
|
|
73
|
+
// Animations that sometimes have 0 duration and sometimes do not
|
|
74
|
+
// still need to use the native driver when duration is 0 so as to
|
|
75
|
+
// not cause intermixed JS and native animations.
|
|
76
|
+
if (this._duration === 0 && !this._useNativeDriver) {
|
|
77
|
+
this._onUpdate(this._toValue)
|
|
78
|
+
this.__debouncedOnEnd({ finished: true })
|
|
79
|
+
} else {
|
|
80
|
+
this._startTime = Date.now()
|
|
81
|
+
if (this._useNativeDriver) {
|
|
82
|
+
this.__startNativeAnimation(animatedValue)
|
|
83
|
+
} else {
|
|
84
|
+
this._animationFrame = requestAnimationFrame(
|
|
85
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
86
|
+
this.onUpdate.bind(this)
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (this._delay) {
|
|
92
|
+
this._timeout = setTimeout(start, this._delay)
|
|
93
|
+
} else {
|
|
94
|
+
start()
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
onUpdate() {
|
|
99
|
+
const now = Date.now()
|
|
100
|
+
if (now >= this._startTime + this._duration) {
|
|
101
|
+
if (this._duration === 0) {
|
|
102
|
+
this._onUpdate(this._toValue)
|
|
103
|
+
} else {
|
|
104
|
+
this._onUpdate(
|
|
105
|
+
this._fromValue + this._easing(1) * (this._toValue - this._fromValue)
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
this.__debouncedOnEnd({ finished: true })
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
this._onUpdate(
|
|
113
|
+
this._fromValue +
|
|
114
|
+
this._easing((now - this._startTime) / this._duration) *
|
|
115
|
+
(this._toValue - this._fromValue)
|
|
116
|
+
)
|
|
117
|
+
if (this.__active) {
|
|
118
|
+
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
|
119
|
+
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this))
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
stop() {
|
|
124
|
+
super.stop()
|
|
125
|
+
this.__active = false
|
|
126
|
+
clearTimeout(this._timeout)
|
|
127
|
+
global.cancelAnimationFrame(this._animationFrame)
|
|
128
|
+
this.__debouncedOnEnd({ finished: false })
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export { TimingAnimation }
|
|
133
|
+
export default TimingAnimation
|