react-native-tvos 0.87.1-0 → 0.87.1-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +2 -2
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +96 -0
- package/types_generated/Libraries/Alert/Alert.d.ts +92 -0
- package/types_generated/Libraries/Animated/Animated.d.ts +14 -0
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +30 -0
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +191 -0
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +232 -0
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
- package/types_generated/Libraries/Animated/Easing.d.ts +172 -0
- package/types_generated/Libraries/Animated/animations/Animation.d.ts +35 -0
- package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +42 -0
- package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +130 -0
- package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +54 -0
- package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +23 -0
- package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +19 -0
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +44 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +80 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +38 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +50 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +30 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +32 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +21 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +126 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +135 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedColor.d.ts +16 -0
- package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedValueXY.d.ts +18 -0
- package/types_generated/Libraries/AppState/AppState.d.ts +82 -0
- package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +17 -0
- package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +39 -0
- package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +27 -0
- package/types_generated/Libraries/Blob/Blob.d.ts +80 -0
- package/types_generated/Libraries/Blob/BlobTypes.d.ts +27 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +223 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +133 -0
- package/types_generated/Libraries/Components/Button.d.ts +167 -0
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +43 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +17 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +27 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +157 -0
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +115 -0
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +82 -0
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +23 -0
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +170 -0
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +48 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +32 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +67 -0
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +96 -0
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +31 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +723 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +189 -0
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +143 -0
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +34 -0
- package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +96 -0
- package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +97 -0
- package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +123 -0
- package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +24 -0
- package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +20 -0
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +37 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +162 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +1020 -0
- package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +54 -0
- package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +99 -0
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +62 -0
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +155 -0
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +47 -0
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
- package/types_generated/Libraries/Components/View/View.d.ts +34 -0
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +426 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +38 -0
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +412 -0
- package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +27 -0
- package/types_generated/Libraries/Core/ExceptionsManager.d.ts +43 -0
- package/types_generated/Libraries/Core/ExtendedError.d.ts +26 -0
- package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +17 -0
- package/types_generated/Libraries/Core/RawEventEmitter.d.ts +26 -0
- package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +27 -0
- package/types_generated/Libraries/Core/ReactNativeVersion.d.ts +48 -0
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +75 -0
- package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +19 -0
- package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +24 -0
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +60 -0
- package/types_generated/Libraries/Image/Image.d.ts +18 -0
- package/types_generated/Libraries/Image/ImageBackground.d.ts +55 -0
- package/types_generated/Libraries/Image/ImageProps.d.ts +462 -0
- package/types_generated/Libraries/Image/ImageResizeMode.d.ts +17 -0
- package/types_generated/Libraries/Image/ImageSource.d.ts +94 -0
- package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +62 -0
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +234 -0
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +87 -0
- package/types_generated/Libraries/Linking/Linking.d.ts +76 -0
- package/types_generated/Libraries/Lists/FlatList.d.ts +316 -0
- package/types_generated/Libraries/Lists/SectionList.d.ts +177 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +21 -0
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +21 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +78 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +71 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +17 -0
- package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +49 -0
- package/types_generated/Libraries/LogBox/LogBox.d.ts +32 -0
- package/types_generated/Libraries/Modal/Modal.d.ts +145 -0
- package/types_generated/Libraries/NativeComponent/NativeComponentRegistry.d.ts +50 -0
- package/types_generated/Libraries/Network/FormData.d.ts +56 -0
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +25 -0
- package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +22 -0
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +114 -0
- package/types_generated/Libraries/Network/convertRequestBody.d.ts +21 -0
- package/types_generated/Libraries/Performance/Systrace.d.ts +71 -0
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +139 -0
- package/types_generated/Libraries/Pressability/Pressability.d.ts +241 -0
- package/types_generated/Libraries/Pressability/usePressability.d.ts +27 -0
- package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +327 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +14 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +43 -0
- package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +120 -0
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +42 -0
- package/types_generated/Libraries/ReactNative/IPerformanceLogger.flow.d.ts +57 -0
- package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +31 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +15 -0
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +36 -0
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +13 -0
- package/types_generated/Libraries/ReactNative/RootTag.d.ts +22 -0
- package/types_generated/Libraries/ReactNative/UIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +25 -0
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +17 -0
- package/types_generated/Libraries/Renderer/shims/ReactFabric.d.ts +17 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +155 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +41 -0
- package/types_generated/Libraries/Settings/Settings.d.ts +21 -0
- package/types_generated/Libraries/Share/Share.d.ts +82 -0
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +23 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +27 -0
- package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +16 -0
- package/types_generated/Libraries/StyleSheet/Rect.d.ts +22 -0
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +153 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +94 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +872 -0
- package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +19 -0
- package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +76 -0
- package/types_generated/Libraries/StyleSheet/processColor.d.ts +18 -0
- package/types_generated/Libraries/Text/Text.d.ts +34 -0
- package/types_generated/Libraries/Text/TextAncestorContext.d.ts +20 -0
- package/types_generated/Libraries/Text/TextNativeComponent.d.ts +41 -0
- package/types_generated/Libraries/Text/TextProps.d.ts +175 -0
- package/types_generated/Libraries/TurboModule/RCTExport.d.ts +35 -0
- package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +24 -0
- package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +14 -0
- package/types_generated/Libraries/Types/CoreEventTypes.d.ts +361 -0
- package/types_generated/Libraries/Types/RootTagTypes.d.ts +13 -0
- package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +17 -0
- package/types_generated/Libraries/UTFSequence.d.ts +39 -0
- package/types_generated/Libraries/Utilities/Appearance.d.ts +43 -0
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +43 -0
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +41 -0
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +60 -0
- package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +17 -0
- package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +14 -0
- package/types_generated/Libraries/Utilities/PixelRatio.d.ts +113 -0
- package/types_generated/Libraries/Utilities/Platform.d.ts +20 -0
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +193 -0
- package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +19 -0
- package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +24 -0
- package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +33 -0
- package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +19 -0
- package/types_generated/Libraries/Utilities/useColorScheme.d.ts +25 -0
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +21 -0
- package/types_generated/Libraries/Vibration/Vibration.d.ts +37 -0
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +39 -0
- package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +67 -0
- package/types_generated/index.d.ts +190 -0
- package/types_generated/src/private/assets/AssetRegistry.d.ts +42 -0
- package/types_generated/src/private/components/virtualcollection/FlingConstants.d.ts +20 -0
- package/types_generated/src/private/components/virtualcollection/Virtual.d.ts +46 -0
- package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +81 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +23 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumnGenerator.d.ts +17 -0
- package/types_generated/src/private/components/virtualcollection/dom/getScrollParent.d.ts +21 -0
- package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +23 -0
- package/types_generated/src/private/components/virtualview/VirtualView.d.ts +75 -0
- package/types_generated/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.d.ts +107 -0
- package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +107 -0
- package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +28 -0
- package/types_generated/src/private/renderer/events/dispatchNativeEvent.d.ts +26 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +45 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +109 -0
- package/types_generated/src/private/styles/composeStyles.d.ts +19 -0
- package/types_generated/src/private/types/HostComponent.d.ts +19 -0
- package/types_generated/src/private/types/HostInstance.d.ts +57 -0
- package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +27 -0
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +50 -0
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +35 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +89 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +32 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +56 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +131 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +26 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +23 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +229 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +24 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +27 -0
- package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +46 -0
- package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +73 -0
- package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +27 -0
- package/types_generated/src/react-private-interface.d.ts +33 -0
- package/types_generated/tsconfig.json +3 -0
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
* @generated SignedSource<<deb4750b606ad5eeb96001b63b6e5089>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/AnimatedImplementation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { EventConfig, Mapping } from "./AnimatedEvent";
|
|
14
|
+
import type { EndCallback } from "./animations/Animation";
|
|
15
|
+
import type { DecayAnimationConfig } from "./animations/DecayAnimation";
|
|
16
|
+
import type { SpringAnimationConfig } from "./animations/SpringAnimation";
|
|
17
|
+
import type { TimingAnimationConfig } from "./animations/TimingAnimation";
|
|
18
|
+
import { AnimatedEvent, attachNativeEventImpl } from "./AnimatedEvent";
|
|
19
|
+
import createAnimatedComponent from "./createAnimatedComponent";
|
|
20
|
+
import AnimatedAddition from "./nodes/AnimatedAddition";
|
|
21
|
+
import AnimatedColor from "./nodes/AnimatedColor";
|
|
22
|
+
import AnimatedDiffClamp from "./nodes/AnimatedDiffClamp";
|
|
23
|
+
import AnimatedDivision from "./nodes/AnimatedDivision";
|
|
24
|
+
import AnimatedInterpolation from "./nodes/AnimatedInterpolation";
|
|
25
|
+
import AnimatedModulo from "./nodes/AnimatedModulo";
|
|
26
|
+
import AnimatedMultiplication from "./nodes/AnimatedMultiplication";
|
|
27
|
+
import AnimatedNode from "./nodes/AnimatedNode";
|
|
28
|
+
import AnimatedSubtraction from "./nodes/AnimatedSubtraction";
|
|
29
|
+
import AnimatedValue from "./nodes/AnimatedValue";
|
|
30
|
+
import AnimatedValueXY from "./nodes/AnimatedValueXY";
|
|
31
|
+
export type CompositeAnimation = {
|
|
32
|
+
/**
|
|
33
|
+
* Animations are started by calling start() on your animation.
|
|
34
|
+
* start() takes a completion callback that will be called when the
|
|
35
|
+
* animation is done or when the animation is done because stop() was
|
|
36
|
+
* called on it before it could finish.
|
|
37
|
+
*
|
|
38
|
+
* @param callback - Optional function that will be called
|
|
39
|
+
* after the animation finished running normally or when the animation
|
|
40
|
+
* is done because stop() was called on it before it could finish
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* Animated.timing({}).start(({ finished }) => {
|
|
44
|
+
* // completion callback
|
|
45
|
+
* });
|
|
46
|
+
*/
|
|
47
|
+
start: (callback?: EndCallback | undefined, isLooping?: boolean) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Stops any running animation.
|
|
50
|
+
*/
|
|
51
|
+
stop: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Stops any running animation and resets the value to its original.
|
|
54
|
+
*/
|
|
55
|
+
reset: () => void;
|
|
56
|
+
};
|
|
57
|
+
declare const addImpl: (a: AnimatedNode | number, b: AnimatedNode | number) => AnimatedAddition;
|
|
58
|
+
declare const subtractImpl: (a: AnimatedNode | number, b: AnimatedNode | number) => AnimatedSubtraction;
|
|
59
|
+
declare const divideImpl: (a: AnimatedNode | number, b: AnimatedNode | number) => AnimatedDivision;
|
|
60
|
+
declare const multiplyImpl: (a: AnimatedNode | number, b: AnimatedNode | number) => AnimatedMultiplication;
|
|
61
|
+
declare const moduloImpl: (a: AnimatedNode, modulus: number) => AnimatedModulo;
|
|
62
|
+
declare const diffClampImpl: (a: AnimatedNode, min: number, max: number) => AnimatedDiffClamp;
|
|
63
|
+
declare const springImpl: (value: AnimatedValue | AnimatedValueXY | AnimatedColor, config: SpringAnimationConfig) => CompositeAnimation;
|
|
64
|
+
declare const timingImpl: (value: AnimatedValue | AnimatedValueXY | AnimatedColor, config: TimingAnimationConfig) => CompositeAnimation;
|
|
65
|
+
declare const decayImpl: (value: AnimatedValue | AnimatedValueXY | AnimatedColor, config: DecayAnimationConfig) => CompositeAnimation;
|
|
66
|
+
declare const sequenceImpl: (animations: Array<CompositeAnimation>) => CompositeAnimation;
|
|
67
|
+
type ParallelConfig = {
|
|
68
|
+
stopTogether?: boolean | undefined;
|
|
69
|
+
};
|
|
70
|
+
declare const parallelImpl: (animations: Array<CompositeAnimation>, config?: null | undefined | ParallelConfig) => CompositeAnimation;
|
|
71
|
+
declare const delayImpl: (time: number) => CompositeAnimation;
|
|
72
|
+
declare const staggerImpl: (time: number, animations: Array<CompositeAnimation>) => CompositeAnimation;
|
|
73
|
+
type LoopAnimationConfig = {
|
|
74
|
+
iterations: number;
|
|
75
|
+
resetBeforeIteration?: boolean | undefined;
|
|
76
|
+
};
|
|
77
|
+
declare const loopImpl: (animation: CompositeAnimation, $$PARAM_1$$?: LoopAnimationConfig) => CompositeAnimation;
|
|
78
|
+
declare function forkEventImpl(event: (null | undefined | AnimatedEvent) | (null | undefined | Function), listener: Function): AnimatedEvent | Function;
|
|
79
|
+
declare function unforkEventImpl(event: (null | undefined | AnimatedEvent) | (null | undefined | Function), listener: Function): void;
|
|
80
|
+
declare const eventImpl: <T>(argMapping: ReadonlyArray<null | undefined | Mapping>, config: EventConfig<T>) => (...args: Array<any>) => void;
|
|
81
|
+
type AnimatedNumeric = AnimatedAddition | AnimatedDiffClamp | AnimatedDivision | AnimatedInterpolation<number> | AnimatedModulo | AnimatedMultiplication | AnimatedSubtraction | AnimatedValue;
|
|
82
|
+
export type { AnimatedNumeric as Numeric };
|
|
83
|
+
/**
|
|
84
|
+
* The `Animated` library is designed to make animations fluid, powerful, and
|
|
85
|
+
* easy to build and maintain. `Animated` focuses on declarative relationships
|
|
86
|
+
* between inputs and outputs, with configurable transforms in between, and
|
|
87
|
+
* simple `start`/`stop` methods to control time-based animation execution.
|
|
88
|
+
* If additional transforms are added, be sure to include them in
|
|
89
|
+
* AnimatedMock.js as well.
|
|
90
|
+
*
|
|
91
|
+
* See https://reactnative.dev/docs/animated
|
|
92
|
+
*/
|
|
93
|
+
declare const $$AnimatedImplementation: {
|
|
94
|
+
/**
|
|
95
|
+
* Standard value class for driving animations. Typically initialized with
|
|
96
|
+
* `new Animated.Value(0);`
|
|
97
|
+
*
|
|
98
|
+
* See https://reactnative.dev/docs/animated#value
|
|
99
|
+
*/
|
|
100
|
+
Value: typeof AnimatedValue;
|
|
101
|
+
/**
|
|
102
|
+
* 2D value class for driving 2D animations, such as pan gestures.
|
|
103
|
+
*
|
|
104
|
+
* See https://reactnative.dev/docs/animatedvaluexy
|
|
105
|
+
*/
|
|
106
|
+
ValueXY: typeof AnimatedValueXY;
|
|
107
|
+
/**
|
|
108
|
+
* Value class for driving color animations.
|
|
109
|
+
*/
|
|
110
|
+
Color: typeof AnimatedColor;
|
|
111
|
+
/**
|
|
112
|
+
* Exported to use the Interpolation type in flow.
|
|
113
|
+
*
|
|
114
|
+
* See https://reactnative.dev/docs/animated#interpolation
|
|
115
|
+
*/
|
|
116
|
+
Interpolation: typeof AnimatedInterpolation;
|
|
117
|
+
/**
|
|
118
|
+
* Exported for ease of type checking. All animated values derive from this
|
|
119
|
+
* class.
|
|
120
|
+
*
|
|
121
|
+
* See https://reactnative.dev/docs/animated#node
|
|
122
|
+
*/
|
|
123
|
+
Node: typeof AnimatedNode;
|
|
124
|
+
/**
|
|
125
|
+
* Animates a value from an initial velocity to zero based on a decay
|
|
126
|
+
* coefficient.
|
|
127
|
+
*/
|
|
128
|
+
decay: typeof decayImpl;
|
|
129
|
+
/**
|
|
130
|
+
* Animates a value along a timed easing curve. The `Easing` module has tons
|
|
131
|
+
* of pre-defined curves, or you can use your own function.
|
|
132
|
+
*/
|
|
133
|
+
timing: typeof timingImpl;
|
|
134
|
+
/**
|
|
135
|
+
* Spring animation based on Rebound and Origami. Tracks velocity state to
|
|
136
|
+
* create fluid motions as the `toValue` updates, and can be chained together.
|
|
137
|
+
*/
|
|
138
|
+
spring: typeof springImpl;
|
|
139
|
+
/**
|
|
140
|
+
* Creates a new Animated value composed from two Animated values added
|
|
141
|
+
* together.
|
|
142
|
+
*/
|
|
143
|
+
add: typeof addImpl;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a new Animated value composed by subtracting the second Animated
|
|
146
|
+
* value from the first Animated value.
|
|
147
|
+
*/
|
|
148
|
+
subtract: typeof subtractImpl;
|
|
149
|
+
/**
|
|
150
|
+
* Creates a new Animated value composed by dividing the first Animated
|
|
151
|
+
* value by the second Animated value.
|
|
152
|
+
*/
|
|
153
|
+
divide: typeof divideImpl;
|
|
154
|
+
/**
|
|
155
|
+
* Creates a new Animated value composed from two Animated values multiplied
|
|
156
|
+
* together.
|
|
157
|
+
*/
|
|
158
|
+
multiply: typeof multiplyImpl;
|
|
159
|
+
/**
|
|
160
|
+
* Creates a new Animated value that is the (non-negative) modulo of the
|
|
161
|
+
* provided Animated value
|
|
162
|
+
*/
|
|
163
|
+
modulo: typeof moduloImpl;
|
|
164
|
+
/**
|
|
165
|
+
* Create a new Animated value that is limited between 2 values. It uses the
|
|
166
|
+
* difference between the last value so even if the value is far from the bounds
|
|
167
|
+
* it will start changing when the value starts getting closer again.
|
|
168
|
+
* (`value = clamp(value + diff, min, max)`).
|
|
169
|
+
*
|
|
170
|
+
* This is useful with scroll events, for example, to show the navbar when
|
|
171
|
+
* scrolling up and to hide it when scrolling down.
|
|
172
|
+
*/
|
|
173
|
+
diffClamp: typeof diffClampImpl;
|
|
174
|
+
/**
|
|
175
|
+
* Starts an animation after the given delay.
|
|
176
|
+
*/
|
|
177
|
+
delay: typeof delayImpl;
|
|
178
|
+
/**
|
|
179
|
+
* Starts an array of animations in order, waiting for each to complete
|
|
180
|
+
* before starting the next. If the current running animation is stopped, no
|
|
181
|
+
* following animations will be started.
|
|
182
|
+
*/
|
|
183
|
+
sequence: typeof sequenceImpl;
|
|
184
|
+
/**
|
|
185
|
+
* Starts an array of animations all at the same time. By default, if one
|
|
186
|
+
* of the animations is stopped, they will all be stopped. You can override
|
|
187
|
+
* this with the `stopTogether` flag.
|
|
188
|
+
*/
|
|
189
|
+
parallel: typeof parallelImpl;
|
|
190
|
+
/**
|
|
191
|
+
* Array of animations may run in parallel (overlap), but are started in
|
|
192
|
+
* sequence with successive delays. Nice for doing trailing effects.
|
|
193
|
+
*/
|
|
194
|
+
stagger: typeof staggerImpl;
|
|
195
|
+
/**
|
|
196
|
+
* Loops a given animation continuously, so that each time it reaches the end,
|
|
197
|
+
* it resets and begins again from the start. Can specify number of times to
|
|
198
|
+
* loop using the key 'iterations' in the config. Will loop without blocking
|
|
199
|
+
* the UI thread if the child animation is set to 'useNativeDriver'.
|
|
200
|
+
*/
|
|
201
|
+
loop: typeof loopImpl;
|
|
202
|
+
/**
|
|
203
|
+
* Takes an array of mappings and extracts values from each arg accordingly,
|
|
204
|
+
* then calls `setValue` on the mapped outputs. e.g.
|
|
205
|
+
*
|
|
206
|
+
*```javascript
|
|
207
|
+
* onScroll={Animated.event(
|
|
208
|
+
* [{nativeEvent: {contentOffset: {x: this._scrollX}}}]
|
|
209
|
+
* {listener}, // Optional async listener
|
|
210
|
+
* )
|
|
211
|
+
* ...
|
|
212
|
+
* onPanResponderMove: Animated.event([
|
|
213
|
+
* null, // raw event arg ignored
|
|
214
|
+
* {dx: this._panX}, // gestureState arg
|
|
215
|
+
* ]),
|
|
216
|
+
*```
|
|
217
|
+
*/
|
|
218
|
+
event: typeof eventImpl;
|
|
219
|
+
/**
|
|
220
|
+
* Make any React component Animatable. Used to create `Animated.View`, etc.
|
|
221
|
+
*/
|
|
222
|
+
createAnimatedComponent: typeof createAnimatedComponent;
|
|
223
|
+
attachNativeEvent: typeof attachNativeEventImpl;
|
|
224
|
+
forkEvent: typeof forkEventImpl;
|
|
225
|
+
unforkEvent: typeof unforkEventImpl;
|
|
226
|
+
/**
|
|
227
|
+
* Expose Event class, so it can be used as a type for type checkers.
|
|
228
|
+
*/
|
|
229
|
+
Event: typeof AnimatedEvent;
|
|
230
|
+
};
|
|
231
|
+
declare type $$AnimatedImplementation = typeof $$AnimatedImplementation;
|
|
232
|
+
export default $$AnimatedImplementation;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
* @generated SignedSource<<f114eadc67180861d9b534a3bd091244>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/AnimatedPlatformConfig.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type PlatformConfig = {};
|
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
* @generated SignedSource<<35d2a2219df674cbee4489365c08a539>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/Easing.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type EasingFunction = (t: number) => number;
|
|
14
|
+
declare const EasingStatic: {
|
|
15
|
+
/**
|
|
16
|
+
* A stepping function, returns 1 for any positive value of `n`.
|
|
17
|
+
*/
|
|
18
|
+
step0(n: number): number;
|
|
19
|
+
/**
|
|
20
|
+
* A stepping function, returns 1 if `n` is greater than or equal to 1.
|
|
21
|
+
*/
|
|
22
|
+
step1(n: number): number;
|
|
23
|
+
/**
|
|
24
|
+
* A linear function, `f(t) = t`. Position correlates to elapsed time one to
|
|
25
|
+
* one.
|
|
26
|
+
*
|
|
27
|
+
* http://cubic-bezier.com/#0,0,1,1
|
|
28
|
+
*/
|
|
29
|
+
linear(t: number): number;
|
|
30
|
+
/**
|
|
31
|
+
* A simple inertial interaction, similar to an object slowly accelerating to
|
|
32
|
+
* speed.
|
|
33
|
+
*
|
|
34
|
+
* http://cubic-bezier.com/#.42,0,1,1
|
|
35
|
+
*/
|
|
36
|
+
ease(t: number): number;
|
|
37
|
+
/**
|
|
38
|
+
* A quadratic function, `f(t) = t * t`. Position equals the square of elapsed
|
|
39
|
+
* time.
|
|
40
|
+
*
|
|
41
|
+
* http://easings.net/#easeInQuad
|
|
42
|
+
*/
|
|
43
|
+
quad(t: number): number;
|
|
44
|
+
/**
|
|
45
|
+
* A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed
|
|
46
|
+
* time.
|
|
47
|
+
*
|
|
48
|
+
* http://easings.net/#easeInCubic
|
|
49
|
+
*/
|
|
50
|
+
cubic(t: number): number;
|
|
51
|
+
/**
|
|
52
|
+
* A power function. Position is equal to the Nth power of elapsed time.
|
|
53
|
+
*
|
|
54
|
+
* n = 4: http://easings.net/#easeInQuart
|
|
55
|
+
* n = 5: http://easings.net/#easeInQuint
|
|
56
|
+
*/
|
|
57
|
+
poly(n: number): EasingFunction;
|
|
58
|
+
/**
|
|
59
|
+
* A sinusoidal function.
|
|
60
|
+
*
|
|
61
|
+
* http://easings.net/#easeInSine
|
|
62
|
+
*/
|
|
63
|
+
sin(t: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* A circular function.
|
|
66
|
+
*
|
|
67
|
+
* http://easings.net/#easeInCirc
|
|
68
|
+
*/
|
|
69
|
+
circle(t: number): number;
|
|
70
|
+
/**
|
|
71
|
+
* An exponential function.
|
|
72
|
+
*
|
|
73
|
+
* http://easings.net/#easeInExpo
|
|
74
|
+
*/
|
|
75
|
+
exp(t: number): number;
|
|
76
|
+
/**
|
|
77
|
+
* A simple elastic interaction, similar to a spring oscillating back and
|
|
78
|
+
* forth.
|
|
79
|
+
*
|
|
80
|
+
* Default bounciness is 1, which overshoots a little bit once. 0 bounciness
|
|
81
|
+
* doesn't overshoot at all, and bounciness of N > 1 will overshoot about N
|
|
82
|
+
* times.
|
|
83
|
+
*
|
|
84
|
+
* http://easings.net/#easeInElastic
|
|
85
|
+
*/
|
|
86
|
+
elastic(bounciness?: number): EasingFunction;
|
|
87
|
+
/**
|
|
88
|
+
* Use with `Animated.parallel()` to create a simple effect where the object
|
|
89
|
+
* animates back slightly as the animation starts.
|
|
90
|
+
*
|
|
91
|
+
* https://easings.net/#easeInBack
|
|
92
|
+
*/
|
|
93
|
+
back(s?: number): EasingFunction;
|
|
94
|
+
/**
|
|
95
|
+
* Provides a simple bouncing effect.
|
|
96
|
+
*
|
|
97
|
+
* http://easings.net/#easeInBounce
|
|
98
|
+
*/
|
|
99
|
+
bounce(t: number): number;
|
|
100
|
+
/**
|
|
101
|
+
* Provides a cubic bezier curve, equivalent to CSS Transitions'
|
|
102
|
+
* `transition-timing-function`.
|
|
103
|
+
*
|
|
104
|
+
* A useful tool to visualize cubic bezier curves can be found at
|
|
105
|
+
* http://cubic-bezier.com/
|
|
106
|
+
*/
|
|
107
|
+
bezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
108
|
+
/**
|
|
109
|
+
* Runs an easing function forwards.
|
|
110
|
+
*/
|
|
111
|
+
in(easing: EasingFunction): EasingFunction;
|
|
112
|
+
/**
|
|
113
|
+
* Runs an easing function backwards.
|
|
114
|
+
*/
|
|
115
|
+
out(easing: EasingFunction): EasingFunction;
|
|
116
|
+
/**
|
|
117
|
+
* Makes any easing function symmetrical. The easing function will run
|
|
118
|
+
* forwards for half of the duration, then backwards for the rest of the
|
|
119
|
+
* duration.
|
|
120
|
+
*/
|
|
121
|
+
inOut(easing: EasingFunction): EasingFunction;
|
|
122
|
+
};
|
|
123
|
+
export type Easing = typeof EasingStatic;
|
|
124
|
+
/**
|
|
125
|
+
* Implements common easing functions for use with `Animated.timing()` to convey
|
|
126
|
+
* physically believable motion in animations.
|
|
127
|
+
*
|
|
128
|
+
* You can find a visualization of some common easing functions at
|
|
129
|
+
* http://easings.net/
|
|
130
|
+
*
|
|
131
|
+
* ### Predefined animations
|
|
132
|
+
*
|
|
133
|
+
* The `Easing` module provides several predefined animations through the
|
|
134
|
+
* following methods:
|
|
135
|
+
*
|
|
136
|
+
* - [`back`](docs/easing.html#back) provides a simple animation where the
|
|
137
|
+
* object goes slightly back before moving forward
|
|
138
|
+
* - [`bounce`](docs/easing.html#bounce) provides a bouncing animation
|
|
139
|
+
* - [`ease`](docs/easing.html#ease) provides a simple inertial animation
|
|
140
|
+
* - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction
|
|
141
|
+
*
|
|
142
|
+
* ### Standard functions
|
|
143
|
+
*
|
|
144
|
+
* Three standard easing functions are provided:
|
|
145
|
+
*
|
|
146
|
+
* - [`linear`](docs/easing.html#linear)
|
|
147
|
+
* - [`quad`](docs/easing.html#quad)
|
|
148
|
+
* - [`cubic`](docs/easing.html#cubic)
|
|
149
|
+
*
|
|
150
|
+
* The [`poly`](docs/easing.html#poly) function can be used to implement
|
|
151
|
+
* quartic, quintic, and other higher power functions.
|
|
152
|
+
*
|
|
153
|
+
* ### Additional functions
|
|
154
|
+
*
|
|
155
|
+
* Additional mathematical functions are provided by the following methods:
|
|
156
|
+
*
|
|
157
|
+
* - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve
|
|
158
|
+
* - [`circle`](docs/easing.html#circle) provides a circular function
|
|
159
|
+
* - [`sin`](docs/easing.html#sin) provides a sinusoidal function
|
|
160
|
+
* - [`exp`](docs/easing.html#exp) provides an exponential function
|
|
161
|
+
*
|
|
162
|
+
* The following helpers are used to modify other easing functions.
|
|
163
|
+
*
|
|
164
|
+
* - [`in`](docs/easing.html#in) runs an easing function forwards
|
|
165
|
+
* - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical
|
|
166
|
+
* - [`out`](docs/easing.html#out) runs an easing function backwards
|
|
167
|
+
*
|
|
168
|
+
* @see https://reactnative.dev/docs/easing
|
|
169
|
+
*/
|
|
170
|
+
declare const $$Easing: typeof EasingStatic;
|
|
171
|
+
declare type $$Easing = typeof $$Easing;
|
|
172
|
+
export default $$Easing;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* @generated SignedSource<<75b3486fbb3158cfb8bcab03e5ad45f0>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/animations/Animation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { PlatformConfig } from "../AnimatedPlatformConfig";
|
|
14
|
+
import type AnimatedValue from "../nodes/AnimatedValue";
|
|
15
|
+
export type EndResult = {
|
|
16
|
+
finished: boolean;
|
|
17
|
+
value?: number | undefined;
|
|
18
|
+
offset?: number | undefined;
|
|
19
|
+
};
|
|
20
|
+
export type EndCallback = (result: EndResult) => void;
|
|
21
|
+
export type AnimationConfig = Readonly<{
|
|
22
|
+
isInteraction?: boolean | undefined;
|
|
23
|
+
useNativeDriver: boolean;
|
|
24
|
+
platformConfig?: PlatformConfig | undefined;
|
|
25
|
+
onComplete?: EndCallback | undefined;
|
|
26
|
+
iterations?: number | undefined;
|
|
27
|
+
isLooping?: boolean | undefined;
|
|
28
|
+
debugID?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
declare class Animation {
|
|
31
|
+
constructor(config: AnimationConfig);
|
|
32
|
+
start(fromValue: number, onUpdate: (value: number) => void, onEnd: null | undefined | EndCallback, previousAnimation: null | undefined | Animation, animatedValue: AnimatedValue): void;
|
|
33
|
+
stop(): void;
|
|
34
|
+
}
|
|
35
|
+
export default Animation;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
* @generated SignedSource<<87d33b318553204c4cfbb4837dfeff3b>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/animations/DecayAnimation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type AnimatedValue from "../nodes/AnimatedValue";
|
|
14
|
+
import type { AnimationConfig, EndCallback } from "./Animation";
|
|
15
|
+
import Animation from "./Animation";
|
|
16
|
+
export type DecayAnimationConfig = Readonly<Omit<AnimationConfig, keyof {
|
|
17
|
+
velocity: number | Readonly<{
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}>;
|
|
21
|
+
deceleration?: number | undefined;
|
|
22
|
+
}> & {
|
|
23
|
+
velocity: number | Readonly<{
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}>;
|
|
27
|
+
deceleration?: number | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type DecayAnimationConfigSingle = Readonly<Omit<AnimationConfig, keyof {
|
|
30
|
+
velocity: number;
|
|
31
|
+
deceleration?: number | undefined;
|
|
32
|
+
}> & {
|
|
33
|
+
velocity: number;
|
|
34
|
+
deceleration?: number | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
declare class DecayAnimation extends Animation {
|
|
37
|
+
constructor(config: DecayAnimationConfigSingle);
|
|
38
|
+
start(fromValue: number, onUpdate: (value: number) => void, onEnd: null | undefined | EndCallback, previousAnimation: null | undefined | Animation, animatedValue: AnimatedValue): void;
|
|
39
|
+
onUpdate(): void;
|
|
40
|
+
stop(): void;
|
|
41
|
+
}
|
|
42
|
+
export default DecayAnimation;
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
* @generated SignedSource<<8d1ddb1f144198187d21b409ceca53cd>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/animations/SpringAnimation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type AnimatedInterpolation from "../nodes/AnimatedInterpolation";
|
|
14
|
+
import type AnimatedValue from "../nodes/AnimatedValue";
|
|
15
|
+
import type AnimatedValueXY from "../nodes/AnimatedValueXY";
|
|
16
|
+
import type { AnimationConfig, EndCallback } from "./Animation";
|
|
17
|
+
import AnimatedColor from "../nodes/AnimatedColor";
|
|
18
|
+
import Animation from "./Animation";
|
|
19
|
+
export type SpringAnimationConfig = Readonly<Omit<AnimationConfig, keyof {
|
|
20
|
+
toValue: number | AnimatedValue | {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
} | AnimatedValueXY | {
|
|
24
|
+
r: number;
|
|
25
|
+
g: number;
|
|
26
|
+
b: number;
|
|
27
|
+
a: number;
|
|
28
|
+
} | AnimatedColor | AnimatedInterpolation<number>;
|
|
29
|
+
overshootClamping?: boolean | undefined;
|
|
30
|
+
restDisplacementThreshold?: number | undefined;
|
|
31
|
+
restSpeedThreshold?: number | undefined;
|
|
32
|
+
velocity?: number | Readonly<{
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
}> | undefined;
|
|
36
|
+
bounciness?: number | undefined;
|
|
37
|
+
speed?: number | undefined;
|
|
38
|
+
tension?: number | undefined;
|
|
39
|
+
friction?: number | undefined;
|
|
40
|
+
stiffness?: number | undefined;
|
|
41
|
+
damping?: number | undefined;
|
|
42
|
+
mass?: number | undefined;
|
|
43
|
+
delay?: number | undefined;
|
|
44
|
+
}> & {
|
|
45
|
+
toValue: number | AnimatedValue | {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
} | AnimatedValueXY | {
|
|
49
|
+
r: number;
|
|
50
|
+
g: number;
|
|
51
|
+
b: number;
|
|
52
|
+
a: number;
|
|
53
|
+
} | AnimatedColor | AnimatedInterpolation<number>;
|
|
54
|
+
overshootClamping?: boolean | undefined;
|
|
55
|
+
restDisplacementThreshold?: number | undefined;
|
|
56
|
+
restSpeedThreshold?: number | undefined;
|
|
57
|
+
velocity?: number | Readonly<{
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
}> | undefined;
|
|
61
|
+
bounciness?: number | undefined;
|
|
62
|
+
speed?: number | undefined;
|
|
63
|
+
tension?: number | undefined;
|
|
64
|
+
friction?: number | undefined;
|
|
65
|
+
stiffness?: number | undefined;
|
|
66
|
+
damping?: number | undefined;
|
|
67
|
+
mass?: number | undefined;
|
|
68
|
+
delay?: number | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type SpringAnimationConfigSingle = Readonly<Omit<AnimationConfig, keyof {
|
|
71
|
+
toValue: number;
|
|
72
|
+
overshootClamping?: boolean | undefined;
|
|
73
|
+
restDisplacementThreshold?: number | undefined;
|
|
74
|
+
restSpeedThreshold?: number | undefined;
|
|
75
|
+
velocity?: number | undefined;
|
|
76
|
+
bounciness?: number | undefined;
|
|
77
|
+
speed?: number | undefined;
|
|
78
|
+
tension?: number | undefined;
|
|
79
|
+
friction?: number | undefined;
|
|
80
|
+
stiffness?: number | undefined;
|
|
81
|
+
damping?: number | undefined;
|
|
82
|
+
mass?: number | undefined;
|
|
83
|
+
delay?: number | undefined;
|
|
84
|
+
}> & {
|
|
85
|
+
toValue: number;
|
|
86
|
+
overshootClamping?: boolean | undefined;
|
|
87
|
+
restDisplacementThreshold?: number | undefined;
|
|
88
|
+
restSpeedThreshold?: number | undefined;
|
|
89
|
+
velocity?: number | undefined;
|
|
90
|
+
bounciness?: number | undefined;
|
|
91
|
+
speed?: number | undefined;
|
|
92
|
+
tension?: number | undefined;
|
|
93
|
+
friction?: number | undefined;
|
|
94
|
+
stiffness?: number | undefined;
|
|
95
|
+
damping?: number | undefined;
|
|
96
|
+
mass?: number | undefined;
|
|
97
|
+
delay?: number | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
declare type SpringAnimationInternalState = symbol & {
|
|
100
|
+
__SpringAnimationInternalState__: string;
|
|
101
|
+
};
|
|
102
|
+
declare class SpringAnimation extends Animation {
|
|
103
|
+
constructor(config: SpringAnimationConfigSingle);
|
|
104
|
+
start(fromValue: number, onUpdate: (value: number) => void, onEnd: null | undefined | EndCallback, previousAnimation: null | undefined | Animation, animatedValue: AnimatedValue): void;
|
|
105
|
+
getInternalState(): SpringAnimationInternalState;
|
|
106
|
+
/**
|
|
107
|
+
* This spring model is based off of a damped harmonic oscillator
|
|
108
|
+
* (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).
|
|
109
|
+
*
|
|
110
|
+
* We use the closed form of the second order differential equation:
|
|
111
|
+
*
|
|
112
|
+
* x'' + (2ζ⍵_0)x' + ⍵^2x = 0
|
|
113
|
+
*
|
|
114
|
+
* where
|
|
115
|
+
* ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),
|
|
116
|
+
* ζ = c / 2√mk (damping ratio),
|
|
117
|
+
* c = damping constant
|
|
118
|
+
* k = stiffness
|
|
119
|
+
* m = mass
|
|
120
|
+
*
|
|
121
|
+
* The derivation of the closed form is described in detail here:
|
|
122
|
+
* http://planetmath.org/sites/default/files/texpdf/39745.pdf
|
|
123
|
+
*
|
|
124
|
+
* This algorithm happens to match the algorithm used by CASpringAnimation,
|
|
125
|
+
* a QuartzCore (iOS) API that creates spring animations.
|
|
126
|
+
*/
|
|
127
|
+
onUpdate(): void;
|
|
128
|
+
stop(): void;
|
|
129
|
+
}
|
|
130
|
+
export default SpringAnimation;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
* @generated SignedSource<<38370d2065d999c7ba0074e6b74c9f8f>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Animated/animations/TimingAnimation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { RgbaValue } from "../nodes/AnimatedColor";
|
|
14
|
+
import type AnimatedInterpolation from "../nodes/AnimatedInterpolation";
|
|
15
|
+
import type AnimatedValue from "../nodes/AnimatedValue";
|
|
16
|
+
import type AnimatedValueXY from "../nodes/AnimatedValueXY";
|
|
17
|
+
import type { AnimationConfig, EndCallback } from "./Animation";
|
|
18
|
+
import AnimatedColor from "../nodes/AnimatedColor";
|
|
19
|
+
import Animation from "./Animation";
|
|
20
|
+
export type TimingAnimationConfig = Readonly<Omit<AnimationConfig, keyof {
|
|
21
|
+
toValue: number | AnimatedValue | Readonly<{
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}> | AnimatedValueXY | RgbaValue | AnimatedColor | AnimatedInterpolation<number>;
|
|
25
|
+
easing?: ((value: number) => number) | undefined;
|
|
26
|
+
duration?: number | undefined;
|
|
27
|
+
delay?: number | undefined;
|
|
28
|
+
}> & {
|
|
29
|
+
toValue: number | AnimatedValue | Readonly<{
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}> | AnimatedValueXY | RgbaValue | AnimatedColor | AnimatedInterpolation<number>;
|
|
33
|
+
easing?: ((value: number) => number) | undefined;
|
|
34
|
+
duration?: number | undefined;
|
|
35
|
+
delay?: number | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type TimingAnimationConfigSingle = Readonly<Omit<AnimationConfig, keyof {
|
|
38
|
+
toValue: number;
|
|
39
|
+
easing?: ((value: number) => number) | undefined;
|
|
40
|
+
duration?: number | undefined;
|
|
41
|
+
delay?: number | undefined;
|
|
42
|
+
}> & {
|
|
43
|
+
toValue: number;
|
|
44
|
+
easing?: ((value: number) => number) | undefined;
|
|
45
|
+
duration?: number | undefined;
|
|
46
|
+
delay?: number | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
declare class TimingAnimation extends Animation {
|
|
49
|
+
constructor(config: TimingAnimationConfigSingle);
|
|
50
|
+
start(fromValue: number, onUpdate: (value: number) => void, onEnd: null | undefined | EndCallback, previousAnimation: null | undefined | Animation, animatedValue: AnimatedValue): void;
|
|
51
|
+
onUpdate(): void;
|
|
52
|
+
stop(): void;
|
|
53
|
+
}
|
|
54
|
+
export default TimingAnimation;
|