react-native-reanimated 2.3.0-alpha.1 → 2.3.0-beta.2
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/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +15 -8
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +170 -166
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +36 -34
- package/Common/cpp/Registries/EventHandlerRegistry.cpp +13 -6
- package/Common/cpp/Registries/MapperRegistry.cpp +19 -15
- package/Common/cpp/Registries/WorkletsCache.cpp +19 -9
- package/Common/cpp/SharedItems/FrozenObject.cpp +19 -8
- package/Common/cpp/SharedItems/MutableValue.cpp +38 -25
- package/Common/cpp/SharedItems/MutableValueSetterProxy.cpp +11 -7
- package/Common/cpp/SharedItems/RemoteObject.cpp +9 -5
- package/Common/cpp/SharedItems/ShareableValue.cpp +216 -143
- package/Common/cpp/Tools/JSIStoreValueUser.cpp +36 -24
- package/Common/cpp/Tools/Mapper.cpp +41 -29
- package/Common/cpp/Tools/RuntimeDecorator.cpp +103 -84
- package/Common/cpp/Tools/Scheduler.cpp +14 -6
- package/Common/cpp/Tools/WorkletEventHandler.cpp +1 -1
- package/Common/cpp/headers/LayoutAnimations/LayoutAnimationsProxy.h +12 -11
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +45 -34
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +28 -16
- package/Common/cpp/headers/Registries/EventHandlerRegistry.h +14 -8
- package/Common/cpp/headers/Registries/MapperRegistry.h +4 -4
- package/Common/cpp/headers/Registries/WorkletsCache.h +9 -7
- package/Common/cpp/headers/SharedItems/FrozenObject.h +15 -11
- package/Common/cpp/headers/SharedItems/HostFunctionHandler.h +6 -4
- package/Common/cpp/headers/SharedItems/MutableValue.h +21 -12
- package/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h +10 -7
- package/Common/cpp/headers/SharedItems/RemoteObject.h +16 -8
- package/Common/cpp/headers/SharedItems/RuntimeManager.h +39 -21
- package/Common/cpp/headers/SharedItems/ShareableValue.h +31 -27
- package/Common/cpp/headers/SharedItems/SharedParent.h +7 -4
- package/Common/cpp/headers/SharedItems/ValueWrapper.h +80 -61
- package/Common/cpp/headers/SpecTools/ErrorHandler.h +17 -19
- package/Common/cpp/headers/Tools/JSIStoreValueUser.h +18 -13
- package/Common/cpp/headers/Tools/Mapper.h +24 -18
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +12 -7
- package/Common/cpp/headers/Tools/ReanimatedHiddenHeaders.h +7 -7
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +29 -23
- package/Common/cpp/headers/Tools/Scheduler.h +28 -33
- package/Common/cpp/headers/Tools/WorkletEventHandler.h +9 -7
- package/Common/cpp/hidden_headers/Logger.h +14 -14
- package/Common/cpp/hidden_headers/LoggerInterface.h +8 -9
- package/Common/cpp/hidden_headers/SpeedChecker.h +7 -8
- package/README.md +1 -1
- package/RNReanimated.podspec +4 -4
- package/android/build.gradle +80 -3
- package/android/react-native-reanimated-63-hermes.aar +0 -0
- package/android/react-native-reanimated-63-jsc.aar +0 -0
- package/android/react-native-reanimated-64-hermes.aar +0 -0
- package/android/react-native-reanimated-64-jsc.aar +0 -0
- package/android/react-native-reanimated-65-hermes.aar +0 -0
- package/android/react-native-reanimated-65-jsc.aar +0 -0
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
- package/ios/LayoutReanimation/REAAnimationsManager.h +19 -10
- package/ios/LayoutReanimation/REAAnimationsManager.m +195 -200
- package/ios/LayoutReanimation/REASnapshot.h +13 -0
- package/ios/LayoutReanimation/REASnapshot.m +29 -0
- package/ios/LayoutReanimation/REAUIManager.h +16 -0
- package/ios/LayoutReanimation/REAUIManager.mm +348 -0
- package/ios/Nodes/REAAlwaysNode.m +14 -15
- package/ios/Nodes/REABezierNode.m +8 -7
- package/ios/Nodes/REABlockNode.m +1 -1
- package/ios/Nodes/REACallFuncNode.h +0 -1
- package/ios/Nodes/REACallFuncNode.m +10 -8
- package/ios/Nodes/REAClockNodes.m +22 -20
- package/ios/Nodes/REAConcatNode.h +0 -1
- package/ios/Nodes/REAConcatNode.m +2 -2
- package/ios/Nodes/REACondNode.m +7 -5
- package/ios/Nodes/READebugNode.m +5 -4
- package/ios/Nodes/REAEventNode.m +1 -1
- package/ios/Nodes/REAFunctionNode.h +0 -1
- package/ios/Nodes/REAFunctionNode.m +2 -2
- package/ios/Nodes/REAJSCallNode.m +4 -5
- package/ios/Nodes/REANode.h +3 -4
- package/ios/Nodes/REANode.m +9 -11
- package/ios/Nodes/REAOperatorNode.m +68 -67
- package/ios/Nodes/REAParamNode.h +1 -3
- package/ios/Nodes/REAParamNode.m +15 -17
- package/ios/Nodes/REAPropsNode.h +1 -3
- package/ios/Nodes/REAPropsNode.m +19 -22
- package/ios/Nodes/REASetNode.h +0 -1
- package/ios/Nodes/REASetNode.m +7 -5
- package/ios/Nodes/REAStyleNode.h +0 -1
- package/ios/Nodes/REAStyleNode.m +2 -4
- package/ios/Nodes/REATransformNode.h +0 -1
- package/ios/Nodes/REATransformNode.m +3 -5
- package/ios/Nodes/REAValueNode.m +5 -7
- package/ios/REAEventDispatcher.m +3 -3
- package/ios/REAModule.h +0 -2
- package/ios/REAModule.m +29 -40
- package/ios/REANodesManager.h +11 -19
- package/ios/REANodesManager.m +105 -130
- package/ios/REAUtils.h +5 -3
- package/ios/Transitioning/RCTConvert+REATransition.m +45 -29
- package/ios/Transitioning/REAAllTransitions.h +2 -2
- package/ios/Transitioning/REAAllTransitions.m +14 -25
- package/ios/Transitioning/REATransition.h +8 -7
- package/ios/Transitioning/REATransition.m +19 -16
- package/ios/Transitioning/REATransitionAnimation.h +1 -1
- package/ios/Transitioning/REATransitionAnimation.m +2 -3
- package/ios/Transitioning/REATransitionManager.m +3 -3
- package/ios/native/NativeMethods.h +15 -5
- package/ios/native/NativeProxy.h +4 -3
- package/ios/native/NativeProxy.mm +19 -5
- package/ios/native/REAIOSErrorHandler.h +13 -10
- package/ios/native/REAIOSLogger.h +8 -8
- package/ios/native/REAIOSScheduler.h +5 -5
- package/ios/native/REAIOSScheduler.mm +7 -5
- package/ios/native/REAInitializer.h +37 -0
- package/ios/native/REAInitializer.mm +63 -0
- package/ios/native/UIResponder+Reanimated.mm +9 -48
- package/lib/ConfigHelper.js +1 -0
- package/lib/ReanimatedModule.native.js +10 -2
- package/lib/createAnimatedComponent.js +64 -30
- package/lib/reanimated1/core/AnimatedAlways.js +1 -1
- package/lib/reanimated1/core/AnimatedBezier.js +1 -1
- package/lib/reanimated1/core/AnimatedBlock.js +1 -1
- package/lib/reanimated1/core/AnimatedCall.js +1 -1
- package/lib/reanimated1/core/AnimatedCallFunc.js +1 -1
- package/lib/reanimated1/core/AnimatedConcat.js +1 -1
- package/lib/reanimated1/core/AnimatedCond.js +1 -1
- package/lib/reanimated1/core/AnimatedDebug.js +1 -1
- package/lib/reanimated1/core/AnimatedEvent.js +1 -1
- package/lib/reanimated1/core/AnimatedFunction.js +1 -1
- package/lib/reanimated1/core/AnimatedOperator.js +1 -1
- package/lib/reanimated1/core/AnimatedParam.js +1 -1
- package/lib/reanimated1/core/AnimatedProps.js +2 -2
- package/lib/reanimated1/core/AnimatedSet.js +1 -1
- package/lib/reanimated1/core/AnimatedStartClock.js +1 -1
- package/lib/reanimated1/core/AnimatedStopClock.js +1 -1
- package/lib/reanimated1/core/AnimatedStyle.js +1 -1
- package/lib/reanimated1/core/AnimatedTransform.js +1 -1
- package/lib/reanimated1/core/Core.test.js +30 -0
- package/lib/reanimated1/core/InternalAnimatedValue.js +1 -1
- package/lib/reanimated1/core/__mocks__/AnimatedProps.js +1 -1
- package/lib/reanimated1/derived/interpolate.js +1 -1
- package/lib/reanimated2/Colors.js +16 -12
- package/lib/reanimated2/NativeMethods.js +3 -14
- package/lib/reanimated2/{NativeReanimated.native.js → NativeReanimated/NativeReanimated.js} +19 -24
- package/lib/reanimated2/NativeReanimated/index.js +15 -0
- package/lib/reanimated2/PlatformChecker.js +16 -0
- package/lib/reanimated2/PropAdapters.js +14 -4
- package/lib/reanimated2/UpdateProps.js +14 -11
- package/lib/reanimated2/ViewDescriptorsSet.js +73 -0
- package/lib/reanimated2/WorkletEventHandler.js +15 -13
- package/lib/reanimated2/animation/commonTypes.js +1 -0
- package/lib/reanimated2/animation/decay.js +71 -0
- package/lib/reanimated2/animation/delay.js +64 -0
- package/lib/reanimated2/animation/index.js +8 -0
- package/lib/reanimated2/animation/repeat.js +69 -0
- package/lib/reanimated2/animation/sequence.js +72 -0
- package/lib/reanimated2/animation/spring.js +101 -0
- package/lib/reanimated2/animation/styleAnimation.js +166 -0
- package/lib/reanimated2/animation/timing.js +64 -0
- package/lib/reanimated2/animation/util.js +157 -0
- package/lib/reanimated2/commonTypes.js +1 -0
- package/lib/reanimated2/core.js +35 -39
- package/lib/reanimated2/globals.d.ts +47 -1
- package/lib/reanimated2/hook/Hooks.js +9 -0
- package/lib/reanimated2/hook/commonTypes.js +1 -0
- package/lib/reanimated2/hook/index.js +8 -0
- package/lib/reanimated2/hook/useAnimatedGestureHandler.js +50 -0
- package/lib/reanimated2/hook/useAnimatedReaction.js +37 -0
- package/lib/reanimated2/hook/useAnimatedRef.js +25 -0
- package/lib/reanimated2/hook/useAnimatedScrollHandler.js +41 -0
- package/lib/reanimated2/hook/useAnimatedStyle.js +376 -0
- package/lib/reanimated2/hook/useDerivedValue.js +36 -0
- package/lib/reanimated2/hook/useSharedValue.js +17 -0
- package/lib/reanimated2/hook/utils.js +175 -0
- package/lib/reanimated2/index.js +3 -2
- package/lib/reanimated2/interpolation.js +95 -86
- package/lib/reanimated2/jestUtils.js +0 -12
- package/lib/reanimated2/js-reanimated/JSReanimated.js +9 -10
- package/lib/reanimated2/js-reanimated/index.js +57 -1
- package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +58 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +69 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +125 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +193 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +1 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/index.js +3 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +325 -207
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +36 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +235 -187
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +327 -269
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +146 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +85 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +119 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +289 -0
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +159 -121
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +83 -65
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +371 -277
- package/lib/reanimated2/layoutReanimation/defaultAnimations/index.js +4 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +78 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +128 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +37 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +41 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +34 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +46 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/index.js +6 -0
- package/lib/reanimated2/layoutReanimation/index.js +3 -2
- package/lib/reanimated2/platform-specific/RNRenderer.web.js +2 -0
- package/lib/reanimated2/utils.js +9 -0
- package/libSo/fbjni/jni/arm64-v8a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/armeabi-v7a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86_64/libfbjni.so +0 -0
- package/package.json +21 -10
- package/plugin.js +244 -85
- package/react-native-reanimated.d.ts +531 -453
- package/src/ConfigHelper.js +1 -0
- package/src/ReanimatedModule.native.js +10 -2
- package/src/createAnimatedComponent.js +64 -30
- package/src/reanimated1/core/AnimatedAlways.js +1 -1
- package/src/reanimated1/core/AnimatedBezier.js +1 -1
- package/src/reanimated1/core/AnimatedBlock.js +1 -1
- package/src/reanimated1/core/AnimatedCall.js +1 -1
- package/src/reanimated1/core/AnimatedCallFunc.js +1 -1
- package/src/reanimated1/core/AnimatedConcat.js +1 -1
- package/src/reanimated1/core/AnimatedCond.js +1 -1
- package/src/reanimated1/core/AnimatedDebug.js +1 -1
- package/src/reanimated1/core/AnimatedEvent.js +1 -1
- package/src/reanimated1/core/AnimatedFunction.js +1 -1
- package/src/reanimated1/core/AnimatedOperator.js +1 -1
- package/src/reanimated1/core/AnimatedParam.js +1 -1
- package/src/reanimated1/core/AnimatedProps.js +2 -2
- package/src/reanimated1/core/AnimatedSet.js +1 -1
- package/src/reanimated1/core/AnimatedStartClock.js +1 -1
- package/src/reanimated1/core/AnimatedStopClock.js +1 -1
- package/src/reanimated1/core/AnimatedStyle.js +1 -1
- package/src/reanimated1/core/AnimatedTransform.js +1 -1
- package/src/reanimated1/core/Core.test.js +30 -0
- package/src/reanimated1/core/InternalAnimatedValue.js +1 -1
- package/src/reanimated1/core/__mocks__/AnimatedProps.js +1 -1
- package/src/reanimated1/derived/interpolate.js +1 -1
- package/src/reanimated2/Colors.ts +30 -27
- package/src/reanimated2/Easing.ts +3 -1
- package/src/reanimated2/NativeMethods.ts +26 -16
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +78 -0
- package/src/reanimated2/NativeReanimated/index.ts +18 -0
- package/src/reanimated2/PlatformChecker.ts +21 -0
- package/src/reanimated2/PropAdapters.ts +52 -34
- package/src/reanimated2/UpdateProps.ts +40 -20
- package/src/reanimated2/ViewDescriptorsSet.ts +108 -0
- package/src/reanimated2/WorkletEventHandler.ts +41 -23
- package/src/reanimated2/animation/commonTypes.ts +48 -0
- package/src/reanimated2/animation/decay.ts +141 -0
- package/src/reanimated2/animation/delay.ts +103 -0
- package/src/reanimated2/animation/index.ts +16 -0
- package/src/reanimated2/animation/repeat.ts +128 -0
- package/src/reanimated2/animation/sequence.ts +110 -0
- package/src/reanimated2/animation/spring.ts +165 -0
- package/src/reanimated2/animation/styleAnimation.ts +253 -0
- package/src/reanimated2/animation/timing.ts +109 -0
- package/src/reanimated2/animation/util.ts +242 -0
- package/src/reanimated2/commonTypes.ts +81 -0
- package/src/reanimated2/core.ts +128 -82
- package/src/reanimated2/globals.d.ts +47 -1
- package/src/reanimated2/hook/Hooks.ts +16 -0
- package/src/reanimated2/hook/commonTypes.ts +12 -0
- package/src/reanimated2/hook/index.ts +25 -0
- package/src/reanimated2/hook/useAnimatedGestureHandler.ts +110 -0
- package/src/reanimated2/hook/useAnimatedReaction.ts +49 -0
- package/src/reanimated2/hook/useAnimatedRef.ts +34 -0
- package/src/reanimated2/hook/useAnimatedScrollHandler.ts +83 -0
- package/src/reanimated2/hook/useAnimatedStyle.ts +538 -0
- package/src/reanimated2/hook/useDerivedValue.ts +48 -0
- package/src/reanimated2/hook/useSharedValue.ts +22 -0
- package/src/reanimated2/hook/utils.ts +259 -0
- package/src/reanimated2/index.ts +3 -2
- package/src/reanimated2/interpolation.ts +170 -101
- package/src/reanimated2/jestUtils.ts +0 -12
- package/src/reanimated2/js-reanimated/JSReanimated.ts +47 -22
- package/src/reanimated2/js-reanimated/Mapper.ts +1 -1
- package/src/reanimated2/js-reanimated/index.ts +71 -0
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.tsx +62 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +91 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +169 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +263 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +78 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +16 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +243 -121
- package/src/reanimated2/layoutReanimation/defaultAnimations/Default.ts +43 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +95 -53
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +114 -64
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +179 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +93 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +132 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +333 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +84 -50
- package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +41 -23
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +234 -154
- package/src/reanimated2/layoutReanimation/defaultAnimations/index.ts +4 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +104 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +213 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +60 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +58 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +41 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +78 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/index.ts +6 -0
- package/src/reanimated2/layoutReanimation/index.ts +3 -2
- package/src/reanimated2/platform-specific/RNRenderer.web.ts +2 -0
- package/src/reanimated2/utils.ts +21 -0
- package/android/react-native-reanimated-62-hermes.aar +0 -0
- package/android/react-native-reanimated-62-jsc.aar +0 -0
- package/ios/LayoutReanimation/REAAnimationRootView.h +0 -12
- package/ios/LayoutReanimation/REAAnimationRootView.m +0 -16
- package/ios/LayoutReanimation/REAAnimationRootViewManager.h +0 -9
- package/ios/LayoutReanimation/REAAnimationRootViewManager.m +0 -49
- package/ios/LayoutReanimation/REAReactBatchObserver.h +0 -20
- package/ios/LayoutReanimation/REAReactBatchObserver.m +0 -125
- package/ios/LayoutReanimation/REASnapshooter.h +0 -19
- package/ios/LayoutReanimation/REASnapshooter.m +0 -64
- package/ios/LayoutReanimation/REAViewTraverser.h +0 -13
- package/ios/LayoutReanimation/REAViewTraverser.m +0 -40
- package/lib/reanimated2/Hooks.js +0 -732
- package/lib/reanimated2/NativeReanimated.js +0 -4
- package/lib/reanimated2/animations.js +0 -713
- package/lib/reanimated2/js-reanimated/index.web.js +0 -20
- package/lib/reanimated2/layoutReanimation/AnimatedRoot.js +0 -55
- package/lib/reanimated2/layoutReanimation/defaultAnimationsBuilder.js +0 -374
- package/src/reanimated2/Hooks.ts +0 -918
- package/src/reanimated2/NativeReanimated.native.ts +0 -61
- package/src/reanimated2/NativeReanimated.ts +0 -5
- package/src/reanimated2/animations.ts +0 -868
- package/src/reanimated2/js-reanimated/index.js +0 -0
- package/src/reanimated2/js-reanimated/index.web.ts +0 -29
- package/src/reanimated2/layoutReanimation/AnimatedRoot.tsx +0 -68
- package/src/reanimated2/layoutReanimation/defaultAnimationsBuilder.ts +0 -440
|
@@ -38,12 +38,12 @@ declare module 'react-native-reanimated' {
|
|
|
38
38
|
} from 'react-native-gesture-handler';
|
|
39
39
|
namespace Animated {
|
|
40
40
|
type Nullable<T> = T | null | undefined;
|
|
41
|
-
|
|
42
41
|
class AnimatedNode<T> {
|
|
43
42
|
constructor(
|
|
44
43
|
nodeConfig: object,
|
|
45
44
|
inputNodes?: ReadonlyArray<AnimatedNode<any>>
|
|
46
45
|
);
|
|
46
|
+
|
|
47
47
|
isNativelyInitialized(): boolean;
|
|
48
48
|
/**
|
|
49
49
|
* ' __value' is not available at runtime on AnimatedNode<T>. It is
|
|
@@ -52,7 +52,6 @@ declare module 'react-native-reanimated' {
|
|
|
52
52
|
*/
|
|
53
53
|
' __value': T;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
55
|
class AnimatedClock extends AnimatedNode<number> {
|
|
57
56
|
constructor();
|
|
58
57
|
}
|
|
@@ -82,6 +81,11 @@ declare module 'react-native-reanimated' {
|
|
|
82
81
|
|
|
83
82
|
interpolate(config: InterpolationConfig): AnimatedNode<number>;
|
|
84
83
|
}
|
|
84
|
+
export interface AnimationState {
|
|
85
|
+
finished: AnimatedValue<number>;
|
|
86
|
+
position: AnimatedValue<number>;
|
|
87
|
+
time: AnimatedValue<number>;
|
|
88
|
+
}
|
|
85
89
|
|
|
86
90
|
export type SharedValue<T> = { value: T };
|
|
87
91
|
export type DerivedValue<T> = Readonly<SharedValue<T>>;
|
|
@@ -101,11 +105,54 @@ declare module 'react-native-reanimated' {
|
|
|
101
105
|
...others: Adaptable<number>[]
|
|
102
106
|
) => AnimatedNode<T>;
|
|
103
107
|
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
export type TransformStyleTypes = TransformsStyle['transform'] extends
|
|
109
|
+
| readonly (infer T)[]
|
|
110
|
+
| undefined
|
|
111
|
+
? T
|
|
112
|
+
: never;
|
|
113
|
+
export type AdaptTransforms<T> = {
|
|
114
|
+
[P in keyof T]: Adaptable<T[P]>;
|
|
115
|
+
};
|
|
116
|
+
export type AnimatedTransform = AdaptTransforms<TransformStyleTypes>[];
|
|
117
|
+
|
|
118
|
+
export type AnimateStyle<S> = {
|
|
119
|
+
[K in keyof S]: K extends 'transform'
|
|
120
|
+
? AnimatedTransform
|
|
121
|
+
: S[K] extends ReadonlyArray<any>
|
|
122
|
+
? ReadonlyArray<AnimateStyle<S[K][0]>>
|
|
123
|
+
: S[K] extends object
|
|
124
|
+
? AnimateStyle<S[K]>
|
|
125
|
+
: S[K] extends ColorValue | undefined
|
|
126
|
+
? S[K] | number
|
|
127
|
+
:
|
|
128
|
+
| S[K]
|
|
129
|
+
| AnimatedNode<
|
|
130
|
+
// allow `number` where `string` normally is to support colors
|
|
131
|
+
S[K] extends ColorValue | undefined ? S[K] | number : S[K]
|
|
132
|
+
>;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type AnimateProps<P extends object> = {
|
|
136
|
+
[K in keyof P]: K extends 'style'
|
|
137
|
+
? StyleProp<AnimateStyle<P[K]>>
|
|
138
|
+
: P[K] | AnimatedNode<P[K]>;
|
|
139
|
+
} & {
|
|
140
|
+
animatedProps?: Partial<AnimateProps<P>>;
|
|
141
|
+
layout?:
|
|
142
|
+
| BaseAnimationBuilder
|
|
143
|
+
| LayoutAnimationFunction
|
|
144
|
+
| typeof BaseAnimationBuilder;
|
|
145
|
+
entering?:
|
|
146
|
+
| BaseAnimationBuilder
|
|
147
|
+
| typeof BaseAnimationBuilder
|
|
148
|
+
| EntryExitAnimationFunction
|
|
149
|
+
| Keyframe;
|
|
150
|
+
exiting?:
|
|
151
|
+
| BaseAnimationBuilder
|
|
152
|
+
| typeof BaseAnimationBuilder
|
|
153
|
+
| EntryExitAnimationFunction
|
|
154
|
+
| Keyframe;
|
|
155
|
+
};
|
|
109
156
|
|
|
110
157
|
export interface PhysicsAnimationState extends AnimationState {
|
|
111
158
|
velocity: AnimatedValue<number>;
|
|
@@ -116,12 +163,6 @@ declare module 'react-native-reanimated' {
|
|
|
116
163
|
export interface DecayConfig {
|
|
117
164
|
deceleration: Adaptable<number>;
|
|
118
165
|
}
|
|
119
|
-
export interface WithDecayConfig {
|
|
120
|
-
deceleration?: number;
|
|
121
|
-
velocity?: number;
|
|
122
|
-
clamp?: [number, number];
|
|
123
|
-
velocityFactor?: number;
|
|
124
|
-
}
|
|
125
166
|
export interface BackwardCompatibleWrapper {
|
|
126
167
|
start: (callback?: (data: { finished: boolean }) => any) => void;
|
|
127
168
|
stop: () => void;
|
|
@@ -151,17 +192,6 @@ declare module 'react-native-reanimated' {
|
|
|
151
192
|
restDisplacementThreshold: Adaptable<number>;
|
|
152
193
|
toValue: Adaptable<number>;
|
|
153
194
|
}
|
|
154
|
-
|
|
155
|
-
export interface WithSpringConfig {
|
|
156
|
-
damping?: number;
|
|
157
|
-
mass?: number;
|
|
158
|
-
stiffness?: number;
|
|
159
|
-
overshootClamping?: boolean;
|
|
160
|
-
restSpeedThreshold?: number;
|
|
161
|
-
restDisplacementThreshold?: number;
|
|
162
|
-
velocity?: number;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
195
|
interface SpringConfigWithOrigamiTensionAndFriction {
|
|
166
196
|
tension: Adaptable<number>;
|
|
167
197
|
mass: Adaptable<number>;
|
|
@@ -194,75 +224,6 @@ declare module 'react-native-reanimated' {
|
|
|
194
224
|
|
|
195
225
|
export const SpringUtils: SpringUtils;
|
|
196
226
|
|
|
197
|
-
export type TransformStyleTypes = TransformsStyle['transform'] extends
|
|
198
|
-
| readonly (infer T)[]
|
|
199
|
-
| undefined
|
|
200
|
-
? T
|
|
201
|
-
: never;
|
|
202
|
-
export type AdaptTransforms<T> = {
|
|
203
|
-
[P in keyof T]: Adaptable<T[P]>;
|
|
204
|
-
};
|
|
205
|
-
export type AnimatedTransform = AdaptTransforms<TransformStyleTypes>[];
|
|
206
|
-
|
|
207
|
-
export type AnimateStyle<S> = {
|
|
208
|
-
[K in keyof S]: K extends 'transform'
|
|
209
|
-
? AnimatedTransform
|
|
210
|
-
: S[K] extends ReadonlyArray<any>
|
|
211
|
-
? ReadonlyArray<AnimateStyle<S[K][0]>>
|
|
212
|
-
: S[K] extends object
|
|
213
|
-
? AnimateStyle<S[K]>
|
|
214
|
-
: S[K] extends ColorValue | undefined
|
|
215
|
-
? S[K] | number
|
|
216
|
-
:
|
|
217
|
-
| S[K]
|
|
218
|
-
| AnimatedNode<
|
|
219
|
-
// allow `number` where `string` normally is to support colors
|
|
220
|
-
S[K] extends ColorValue | undefined ? S[K] | number : S[K]
|
|
221
|
-
>;
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
export type LayoutAnimation = {
|
|
225
|
-
initialValues: StyleProp
|
|
226
|
-
animations: AnimateStyle
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
export type EntryExitAnimationsValues = {
|
|
230
|
-
originX: number;
|
|
231
|
-
originY: number;
|
|
232
|
-
width: number;
|
|
233
|
-
height: number;
|
|
234
|
-
globalOriginX: number;
|
|
235
|
-
globalOriginY: number;
|
|
236
|
-
};
|
|
237
|
-
export type EntryExitAnimationFunction = (targetValues: EntryExitAnimationsValues) => LayoutAnimation;
|
|
238
|
-
|
|
239
|
-
export type LayoutAnimationsValues = {
|
|
240
|
-
originX: number;
|
|
241
|
-
originY: number;
|
|
242
|
-
width: number;
|
|
243
|
-
height: number;
|
|
244
|
-
globalOriginX: number;
|
|
245
|
-
globalOriginY: number;
|
|
246
|
-
boriginX: number;
|
|
247
|
-
boriginY: number;
|
|
248
|
-
bwidth: number;
|
|
249
|
-
bheight: number;
|
|
250
|
-
bglobalOriginX: number;
|
|
251
|
-
bglobalOriginY: number;
|
|
252
|
-
};
|
|
253
|
-
export type LayoutAnimationFunction = (targetValues: LayoutAnimationsTargetValues) => LayoutAnimation;
|
|
254
|
-
|
|
255
|
-
export type AnimateProps<P extends object> = {
|
|
256
|
-
[K in keyof P]: K extends 'style'
|
|
257
|
-
? StyleProp<AnimateStyle<P[K]>>
|
|
258
|
-
: P[K] | AnimatedNode<P[K]>;
|
|
259
|
-
} & {
|
|
260
|
-
animatedProps?: Partial<AnimateProps<P>>;
|
|
261
|
-
layout?: Layout | LayoutAnimationFunction;
|
|
262
|
-
entering?: BaseAnimationBuilder | ZoomRotateAnimationBuilder | BounceAnimationBuilder | EntryExitAnimationFunction;
|
|
263
|
-
exiting?: BaseAnimationBuilder | ZoomRotateAnimationBuilder | BounceAnimationBuilder | EntryExitAnimationFunction;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
227
|
type CodeProps = {
|
|
267
228
|
exec?: AnimatedNode<number>;
|
|
268
229
|
children?: () => AnimatedNode<number>;
|
|
@@ -286,7 +247,7 @@ declare module 'react-native-reanimated' {
|
|
|
286
247
|
|
|
287
248
|
type Options<P> = {
|
|
288
249
|
setNativeProps: (ref: any, props: P) => void;
|
|
289
|
-
}
|
|
250
|
+
};
|
|
290
251
|
export function createAnimatedComponent<P extends object>(
|
|
291
252
|
component: ComponentClass<P>,
|
|
292
253
|
options?: Options<P>
|
|
@@ -413,14 +374,6 @@ declare module 'react-native-reanimated' {
|
|
|
413
374
|
export const max: BinaryOperator;
|
|
414
375
|
export const min: BinaryOperator;
|
|
415
376
|
|
|
416
|
-
// reanimated2 derived operations
|
|
417
|
-
export function interpolate(
|
|
418
|
-
x: number,
|
|
419
|
-
input: Array<number>,
|
|
420
|
-
output: Array<number>,
|
|
421
|
-
type?: ExtrapolateParameter
|
|
422
|
-
): number;
|
|
423
|
-
|
|
424
377
|
// animations
|
|
425
378
|
export function decay(
|
|
426
379
|
clock: AnimatedClock,
|
|
@@ -451,38 +404,6 @@ declare module 'react-native-reanimated' {
|
|
|
451
404
|
config: DecayConfig
|
|
452
405
|
): BackwardCompatibleWrapper;
|
|
453
406
|
|
|
454
|
-
// reanimated2 animations
|
|
455
|
-
export interface WithTimingConfig {
|
|
456
|
-
duration?: number;
|
|
457
|
-
easing?: EasingFunction;
|
|
458
|
-
}
|
|
459
|
-
export function withTiming(
|
|
460
|
-
toValue: number | Exclude<ColorValue, OpaqueColorValue>, // string as a color value like `"rgba(20,20,20,0)"`
|
|
461
|
-
userConfig?: WithTimingConfig,
|
|
462
|
-
callback?: (isFinished: boolean) => void
|
|
463
|
-
): number;
|
|
464
|
-
export function withSpring(
|
|
465
|
-
toValue: number | Exclude<ColorValue, OpaqueColorValue>, // string as a color value like `"rgba(20,20,20,0)"`
|
|
466
|
-
userConfig?: WithSpringConfig,
|
|
467
|
-
callback?: (isFinished: boolean) => void
|
|
468
|
-
): number;
|
|
469
|
-
export function withDecay(
|
|
470
|
-
userConfig: WithDecayConfig,
|
|
471
|
-
callback?: (isFinished: boolean) => void
|
|
472
|
-
): number;
|
|
473
|
-
export function cancelAnimation<T>(sharedValue: SharedValue<T>): void;
|
|
474
|
-
export function withDelay(
|
|
475
|
-
delayMS: number,
|
|
476
|
-
delayedAnimation: number
|
|
477
|
-
): number;
|
|
478
|
-
export function withRepeat(
|
|
479
|
-
animation: number,
|
|
480
|
-
numberOfReps?: number,
|
|
481
|
-
reverse?: boolean,
|
|
482
|
-
callback?: (isFinished: boolean) => void
|
|
483
|
-
): number;
|
|
484
|
-
export function withSequence(...animations: [number, ...number[]]): number;
|
|
485
|
-
|
|
486
407
|
// hooks
|
|
487
408
|
export function useCode(
|
|
488
409
|
exec: () =>
|
|
@@ -494,252 +415,500 @@ declare module 'react-native-reanimated' {
|
|
|
494
415
|
initialValue: T
|
|
495
416
|
): AnimatedValue<T>;
|
|
496
417
|
|
|
497
|
-
//
|
|
498
|
-
export function
|
|
499
|
-
|
|
500
|
-
):
|
|
501
|
-
export function
|
|
502
|
-
|
|
503
|
-
): (...args: Parameters<typeof fn>) => void;
|
|
504
|
-
|
|
505
|
-
type PropsAdapterFunction = (props: Record<string, unknown>) => void;
|
|
506
|
-
export function createAnimatedPropAdapter(
|
|
507
|
-
adapter: PropsAdapterFunction,
|
|
508
|
-
nativeProps?: string[]
|
|
509
|
-
): PropsAdapterFunction;
|
|
510
|
-
|
|
511
|
-
export function processColor(color: number | string): number;
|
|
512
|
-
export function createWorklet<A extends any[], R>(
|
|
513
|
-
fn: (...args: A) => R
|
|
514
|
-
): (...args: Parameters<typeof fn>) => R;
|
|
515
|
-
|
|
516
|
-
export function interpolateColor(
|
|
517
|
-
value: number,
|
|
518
|
-
inputRange: readonly number[],
|
|
519
|
-
outputRange: readonly (string | number)[],
|
|
520
|
-
colorSpace?: 'RGB' | 'HSV'
|
|
521
|
-
): string | number;
|
|
522
|
-
|
|
523
|
-
export function makeMutable<T>(initialValue: T): SharedValue<T>;
|
|
524
|
-
|
|
525
|
-
type DependencyList = ReadonlyArray<any>;
|
|
526
|
-
|
|
527
|
-
// reanimated2 hooks
|
|
528
|
-
export function useSharedValue<T>(initialValue: T): SharedValue<T>;
|
|
529
|
-
|
|
530
|
-
export function useDerivedValue<T>(
|
|
531
|
-
processor: () => T,
|
|
532
|
-
deps?: DependencyList
|
|
533
|
-
): DerivedValue<T>;
|
|
534
|
-
|
|
535
|
-
export function useAnimatedReaction<D>(
|
|
536
|
-
prepare: () => D,
|
|
537
|
-
react: (prepareResult: D, preparePreviousResult: D | null) => void,
|
|
538
|
-
deps?: DependencyList
|
|
539
|
-
): void;
|
|
418
|
+
// configuration
|
|
419
|
+
export function addWhitelistedNativeProps(props: {
|
|
420
|
+
[key: string]: true;
|
|
421
|
+
}): void;
|
|
422
|
+
export function addWhitelistedUIProps(props: { [key: string]: true }): void;
|
|
423
|
+
}
|
|
540
424
|
|
|
541
|
-
|
|
542
|
-
| AnimateStyle<T>
|
|
543
|
-
| RegisteredStyle<AnimateStyle<T>>;
|
|
544
|
-
export function useAnimatedStyle<
|
|
545
|
-
T extends AnimatedStyleProp<ViewStyle | ImageStyle | TextStyle>
|
|
546
|
-
>(updater: () => T, deps?: DependencyList | null): T;
|
|
547
|
-
export function useAnimatedProps<T extends {}>(
|
|
548
|
-
updater: () => Partial<T>,
|
|
549
|
-
deps?: DependencyList | null,
|
|
550
|
-
adapters?: PropsAdapterFunction | PropsAdapterFunction[] | null
|
|
551
|
-
): Partial<T>;
|
|
552
|
-
export function useAnimatedGestureHandler<
|
|
553
|
-
T extends GestureHandlerGestureEvent = PanGestureHandlerGestureEvent,
|
|
554
|
-
TContext extends Context = {}
|
|
555
|
-
>(
|
|
556
|
-
handlers: GestureHandlers<T['nativeEvent'], TContext>,
|
|
557
|
-
deps?: DependencyList
|
|
558
|
-
): OnGestureEvent<T>;
|
|
559
|
-
export function useAnimatedScrollHandler<TContext extends Context = {}>(
|
|
560
|
-
handler: ScrollHandler<TContext>,
|
|
561
|
-
deps?: DependencyList
|
|
562
|
-
): OnScroll;
|
|
563
|
-
export function useAnimatedScrollHandler<TContext extends Context = {}>(
|
|
564
|
-
handlers: ScrollHandlers<TContext>,
|
|
565
|
-
deps?: DependencyList
|
|
566
|
-
): OnScroll;
|
|
567
|
-
export function useWorkletCallback<A extends any[], R>(
|
|
568
|
-
fn: (...args: A) => R,
|
|
569
|
-
deps?: DependencyList
|
|
570
|
-
): (...args: Parameters<typeof fn>) => R;
|
|
571
|
-
|
|
572
|
-
export function useAnimatedRef<T extends Component>(): RefObject<T>;
|
|
573
|
-
export function defineAnimation<T>(starting: any, factory: () => T): number;
|
|
574
|
-
export function measure<T extends Component>(
|
|
575
|
-
ref: RefObject<T>
|
|
576
|
-
): {
|
|
577
|
-
width: number;
|
|
578
|
-
height: number;
|
|
579
|
-
x: number;
|
|
580
|
-
y: number;
|
|
581
|
-
pageX: number;
|
|
582
|
-
pageY: number;
|
|
583
|
-
};
|
|
425
|
+
export default Animated;
|
|
584
426
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
427
|
+
export type SharedValue<T> = Animated.SharedValue<T>;
|
|
428
|
+
export type AnimateStyle<S> = Animated.AnimateStyle<S>;
|
|
429
|
+
export type DerivedValue<T> = Animated.DerivedValue<T>;
|
|
430
|
+
export type Mapping = Animated.Mapping;
|
|
431
|
+
export type Adaptable<T> = Animated.Adaptable<T>;
|
|
432
|
+
export type TransformStyleTypes = Animated.TransformStyleTypes;
|
|
433
|
+
export type AdaptTransforms<T> = Animated.AdaptTransforms<T>;
|
|
434
|
+
export type AnimatedTransform = Animated.AnimatedTransform;
|
|
435
|
+
export type AnimateProps<P extends object> = Animated.AnimateProps<P>;
|
|
436
|
+
|
|
437
|
+
export type LayoutAnimation = {
|
|
438
|
+
initialValues: StyleProps;
|
|
439
|
+
animations: AnimateStyle;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export type EntryExitAnimationsValues = {
|
|
443
|
+
originX: number;
|
|
444
|
+
originY: number;
|
|
445
|
+
width: number;
|
|
446
|
+
height: number;
|
|
447
|
+
globalOriginX: number;
|
|
448
|
+
globalOriginY: number;
|
|
449
|
+
};
|
|
450
|
+
export type EntryExitAnimationFunction = (
|
|
451
|
+
targetValues: EntryExitAnimationsValues
|
|
452
|
+
) => LayoutAnimation;
|
|
453
|
+
|
|
454
|
+
export type LayoutAnimationsValues = {
|
|
455
|
+
originX: number;
|
|
456
|
+
originY: number;
|
|
457
|
+
width: number;
|
|
458
|
+
height: number;
|
|
459
|
+
globalOriginX: number;
|
|
460
|
+
globalOriginY: number;
|
|
461
|
+
boriginX: number;
|
|
462
|
+
boriginY: number;
|
|
463
|
+
bwidth: number;
|
|
464
|
+
bheight: number;
|
|
465
|
+
bglobalOriginX: number;
|
|
466
|
+
bglobalOriginY: number;
|
|
467
|
+
windowWidth: number;
|
|
468
|
+
windowHeight: number;
|
|
469
|
+
};
|
|
470
|
+
export type LayoutAnimationFunction = (
|
|
471
|
+
targetValues: LayoutAnimationsValues
|
|
472
|
+
) => LayoutAnimation;
|
|
473
|
+
|
|
474
|
+
export interface ILayoutAnimationBuilder {
|
|
475
|
+
build: () => LayoutAnimationFunction;
|
|
476
|
+
}
|
|
591
477
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
) => void;
|
|
478
|
+
export interface IEntryExitAnimationBuilder {
|
|
479
|
+
build: () => EntryExitAnimationFunction;
|
|
480
|
+
}
|
|
596
481
|
|
|
597
|
-
|
|
482
|
+
export type PrimitiveValue = number | string;
|
|
598
483
|
|
|
599
|
-
|
|
484
|
+
// reanimated2 derived operations
|
|
485
|
+
export enum Extrapolation {
|
|
486
|
+
IDENTITY = 'identity',
|
|
487
|
+
CLAMP = 'clamp',
|
|
488
|
+
EXTEND = 'extend',
|
|
489
|
+
}
|
|
490
|
+
export interface InterpolatedNode {
|
|
491
|
+
__nodeId: number;
|
|
492
|
+
}
|
|
493
|
+
export interface ExtrapolationConfig {
|
|
494
|
+
extrapolateLeft?: Extrapolation | string;
|
|
495
|
+
extrapolateRight?: Extrapolation | string;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export type ExtrapolationType =
|
|
499
|
+
| ExtrapolationConfig
|
|
500
|
+
| Extrapolation
|
|
501
|
+
| string
|
|
502
|
+
| undefined;
|
|
503
|
+
|
|
504
|
+
export function interpolate(
|
|
505
|
+
x: number,
|
|
506
|
+
input: readonly number[],
|
|
507
|
+
output: readonly number[],
|
|
508
|
+
type?: ExtrapolationType
|
|
509
|
+
): number;
|
|
510
|
+
|
|
511
|
+
// reanimated2 animations
|
|
512
|
+
export type AnimationCallback = (
|
|
513
|
+
finished?: boolean,
|
|
514
|
+
current?: PrimitiveValue
|
|
515
|
+
) => void;
|
|
516
|
+
export interface WithTimingConfig {
|
|
517
|
+
duration?: number;
|
|
518
|
+
easing?: EasingFunction;
|
|
519
|
+
}
|
|
520
|
+
export interface WithDecayConfig {
|
|
521
|
+
deceleration?: number;
|
|
522
|
+
velocity?: number;
|
|
523
|
+
clamp?: [number, number];
|
|
524
|
+
velocityFactor?: number;
|
|
525
|
+
}
|
|
526
|
+
export interface WithSpringConfig {
|
|
527
|
+
damping?: number;
|
|
528
|
+
mass?: number;
|
|
529
|
+
stiffness?: number;
|
|
530
|
+
overshootClamping?: boolean;
|
|
531
|
+
restSpeedThreshold?: number;
|
|
532
|
+
restDisplacementThreshold?: number;
|
|
533
|
+
velocity?: number;
|
|
534
|
+
}
|
|
535
|
+
export function withTiming(
|
|
536
|
+
toValue: PrimitiveValue,
|
|
537
|
+
userConfig?: WithTimingConfig,
|
|
538
|
+
callback?: AnimationCallback
|
|
539
|
+
): number;
|
|
540
|
+
export function withSpring(
|
|
541
|
+
toValue: PrimitiveValue,
|
|
542
|
+
userConfig?: WithSpringConfig,
|
|
543
|
+
callback?: AnimationCallback
|
|
544
|
+
): number;
|
|
545
|
+
export function withDecay(
|
|
546
|
+
userConfig: WithDecayConfig,
|
|
547
|
+
callback?: AnimationCallback
|
|
548
|
+
): number;
|
|
549
|
+
export function cancelAnimation<T>(sharedValue: SharedValue<T>): void;
|
|
550
|
+
export function withDelay(delayMS: number, delayedAnimation: number): number;
|
|
551
|
+
export function withRepeat(
|
|
552
|
+
animation: number,
|
|
553
|
+
numberOfReps?: number,
|
|
554
|
+
reverse?: boolean,
|
|
555
|
+
callback?: AnimationCallback
|
|
556
|
+
): number;
|
|
557
|
+
export function withSequence(...animations: [number, ...number[]]): number;
|
|
558
|
+
|
|
559
|
+
// reanimated2 functions
|
|
560
|
+
export function runOnUI<A extends any[], R>(
|
|
561
|
+
fn: (...args: A) => R
|
|
562
|
+
): (...args: Parameters<typeof fn>) => void;
|
|
563
|
+
export function runOnJS<A extends any[], R>(
|
|
564
|
+
fn: (...args: A) => R
|
|
565
|
+
): (...args: Parameters<typeof fn>) => void;
|
|
566
|
+
|
|
567
|
+
type PropsAdapterFunction = (props: Record<string, unknown>) => void;
|
|
568
|
+
export function createAnimatedPropAdapter(
|
|
569
|
+
adapter: PropsAdapterFunction,
|
|
570
|
+
nativeProps?: string[]
|
|
571
|
+
): PropsAdapterFunction;
|
|
572
|
+
|
|
573
|
+
export function processColor(color: number | string): number;
|
|
574
|
+
export function createWorklet<A extends any[], R>(
|
|
575
|
+
fn: (...args: A) => R
|
|
576
|
+
): (...args: Parameters<typeof fn>) => R;
|
|
577
|
+
|
|
578
|
+
export function interpolateColor(
|
|
579
|
+
value: number,
|
|
580
|
+
inputRange: readonly number[],
|
|
581
|
+
outputRange: readonly (string | number)[],
|
|
582
|
+
colorSpace?: 'RGB' | 'HSV'
|
|
583
|
+
): string | number;
|
|
584
|
+
|
|
585
|
+
export function makeMutable<T>(initialValue: T): SharedValue<T>;
|
|
586
|
+
|
|
587
|
+
type DependencyList = ReadonlyArray<any>;
|
|
588
|
+
|
|
589
|
+
// reanimated2 hooks
|
|
590
|
+
export function useSharedValue<T>(initialValue: T): SharedValue<T>;
|
|
591
|
+
|
|
592
|
+
export function useDerivedValue<T>(
|
|
593
|
+
processor: () => T,
|
|
594
|
+
deps?: DependencyList
|
|
595
|
+
): DerivedValue<T>;
|
|
596
|
+
|
|
597
|
+
export function useAnimatedReaction<D>(
|
|
598
|
+
prepare: () => D,
|
|
599
|
+
react: (prepareResult: D, preparePreviousResult: D | null) => void,
|
|
600
|
+
deps?: DependencyList
|
|
601
|
+
): void;
|
|
602
|
+
|
|
603
|
+
export type AnimatedStyleProp<T> =
|
|
604
|
+
| AnimateStyle<T>
|
|
605
|
+
| RegisteredStyle<AnimateStyle<T>>;
|
|
606
|
+
export function useAnimatedStyle<
|
|
607
|
+
T extends AnimatedStyleProp<ViewStyle | ImageStyle | TextStyle>
|
|
608
|
+
>(updater: () => T, deps?: DependencyList | null): T;
|
|
609
|
+
export function useAnimatedProps<T extends {}>(
|
|
610
|
+
updater: () => Partial<T>,
|
|
611
|
+
deps?: DependencyList | null,
|
|
612
|
+
adapters?: PropsAdapterFunction | PropsAdapterFunction[] | null
|
|
613
|
+
): Partial<T>;
|
|
614
|
+
export function useEvent<T extends {}>(
|
|
615
|
+
handler: (e: T) => void,
|
|
616
|
+
eventNames?: string[],
|
|
617
|
+
rebuild?: boolean
|
|
618
|
+
): (e: NativeSyntheticEvent<T>) => void;
|
|
619
|
+
export function useHandler<T, TContext extends Context = {}>(
|
|
620
|
+
handlers: Record<string, Handler<T, TContext>>,
|
|
621
|
+
deps?: DependencyList
|
|
622
|
+
): { context: TContext; doDependenciesDiffer: boolean; useWeb: boolean };
|
|
623
|
+
export function useAnimatedGestureHandler<
|
|
624
|
+
T extends GestureHandlerGestureEvent = PanGestureHandlerGestureEvent,
|
|
625
|
+
TContext extends Context = {}
|
|
626
|
+
>(
|
|
627
|
+
handlers: GestureHandlers<T['nativeEvent'], TContext>,
|
|
628
|
+
deps?: DependencyList
|
|
629
|
+
): OnGestureEvent<T>;
|
|
630
|
+
export function useAnimatedScrollHandler<TContext extends Context = {}>(
|
|
631
|
+
handlers: ScrollHandlers<TContext> | ScrollHandler<TContext>,
|
|
632
|
+
deps?: DependencyList
|
|
633
|
+
): OnScroll;
|
|
634
|
+
export function useWorkletCallback<A extends any[], R>(
|
|
635
|
+
fn: (...args: A) => R,
|
|
636
|
+
deps?: DependencyList
|
|
637
|
+
): (...args: Parameters<typeof fn>) => R;
|
|
638
|
+
|
|
639
|
+
export function useAnimatedRef<T extends Component>(): RefObject<T>;
|
|
640
|
+
export function defineAnimation<T>(starting: any, factory: () => T): number;
|
|
641
|
+
export function measure<T extends Component>(
|
|
642
|
+
ref: RefObject<T>
|
|
643
|
+
): {
|
|
644
|
+
width: number;
|
|
645
|
+
height: number;
|
|
646
|
+
x: number;
|
|
647
|
+
y: number;
|
|
648
|
+
pageX: number;
|
|
649
|
+
pageY: number;
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
export function getRelativeCoords(
|
|
653
|
+
ref: RefObject<Component>,
|
|
654
|
+
x: number,
|
|
655
|
+
y: number
|
|
656
|
+
): {
|
|
657
|
+
x: number;
|
|
658
|
+
y: number;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
export function scrollTo(
|
|
662
|
+
ref: RefObject<ReactNativeScrollView | ScrollView>,
|
|
663
|
+
x: number,
|
|
664
|
+
y: number,
|
|
665
|
+
animated: boolean
|
|
666
|
+
): void;
|
|
667
|
+
|
|
668
|
+
// gesture-handler
|
|
669
|
+
type OnGestureEvent<T extends GestureHandlerGestureEvent> = (
|
|
670
|
+
event: T
|
|
671
|
+
) => void;
|
|
672
|
+
|
|
673
|
+
type Context = Record<string, unknown>;
|
|
674
|
+
|
|
675
|
+
type Handler<T, TContext extends Context> = (
|
|
676
|
+
event: T,
|
|
677
|
+
context: TContext
|
|
678
|
+
) => void;
|
|
679
|
+
|
|
680
|
+
export interface GestureHandlers<T, TContext extends Context> {
|
|
681
|
+
onStart?: Handler<T, TContext>;
|
|
682
|
+
onActive?: Handler<T, TContext>;
|
|
683
|
+
onEnd?: Handler<T, TContext>;
|
|
684
|
+
onFail?: Handler<T, TContext>;
|
|
685
|
+
onCancel?: Handler<T, TContext>;
|
|
686
|
+
onFinish?: (
|
|
600
687
|
event: T,
|
|
601
|
-
context: TContext
|
|
688
|
+
context: TContext,
|
|
689
|
+
isCanceledOrFailed: boolean
|
|
602
690
|
) => void;
|
|
691
|
+
}
|
|
603
692
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
onActive?: Handler<T, TContext>;
|
|
607
|
-
onEnd?: Handler<T, TContext>;
|
|
608
|
-
onFail?: Handler<T, TContext>;
|
|
609
|
-
onCancel?: Handler<T, TContext>;
|
|
610
|
-
onFinish?: (
|
|
611
|
-
event: T,
|
|
612
|
-
context: TContext,
|
|
613
|
-
isCanceledOrFailed: boolean
|
|
614
|
-
) => void;
|
|
615
|
-
}
|
|
693
|
+
// scroll view
|
|
694
|
+
type OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
616
695
|
|
|
617
|
-
|
|
618
|
-
|
|
696
|
+
type ScrollHandler<TContext extends Context> = (
|
|
697
|
+
event: NativeScrollEvent,
|
|
698
|
+
context: TContext
|
|
699
|
+
) => void;
|
|
619
700
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
701
|
+
export interface ScrollHandlers<TContext extends Context> {
|
|
702
|
+
onScroll?: ScrollHandler<TContext>;
|
|
703
|
+
onBeginDrag?: ScrollHandler<TContext>;
|
|
704
|
+
onEndDrag?: ScrollHandler<TContext>;
|
|
705
|
+
onMomentumBegin?: ScrollHandler<TContext>;
|
|
706
|
+
onMomentumEnd?: ScrollHandler<TContext>;
|
|
707
|
+
}
|
|
708
|
+
export interface StyleProps extends ViewStyle, TextStyle {
|
|
709
|
+
originX?: number;
|
|
710
|
+
originY?: number;
|
|
711
|
+
[key: string]: any;
|
|
712
|
+
}
|
|
713
|
+
export type EasingFn = (t: number) => number;
|
|
714
|
+
export interface KeyframeProps extends StyleProps {
|
|
715
|
+
easing?: EasingFn;
|
|
716
|
+
[key: string]: any;
|
|
717
|
+
}
|
|
718
|
+
export class Keyframe {
|
|
719
|
+
constructor(definitions: Record<string, KeyframeProps>);
|
|
720
|
+
duration(durationMs: number): Keyframe;
|
|
721
|
+
delay(delayMs: number): Keyframe;
|
|
722
|
+
withCallback(callback: (finished: boolean) => void): Keyframe;
|
|
723
|
+
}
|
|
724
|
+
export class BaseAnimationBuilder {
|
|
725
|
+
static duration(durationMs: number): BaseAnimationBuilder;
|
|
726
|
+
duration(durationMs: number): BaseAnimationBuilder;
|
|
727
|
+
static delay(durationMs: number): BaseAnimationBuilder;
|
|
728
|
+
delay(durationMs: number): BaseAnimationBuilder;
|
|
729
|
+
static withCallback(
|
|
730
|
+
callback: (finished: boolean) => void
|
|
731
|
+
): BaseAnimationBuilder;
|
|
732
|
+
|
|
733
|
+
withCallback(callback: (finished: boolean) => void): BaseAnimationBuilder;
|
|
734
|
+
static randomDelay(): BaseAnimationBuilder;
|
|
735
|
+
randomDelay(): BaseAnimationBuilder;
|
|
736
|
+
build: () => LayoutAnimationFunction | EntryExitAnimationFunction;
|
|
737
|
+
}
|
|
624
738
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
739
|
+
export class ComplexAnimationBuilder extends BaseAnimationBuilder {
|
|
740
|
+
static duration(durationMs: number): ComplexAnimationBuilder;
|
|
741
|
+
duration(durationMs: number): ComplexAnimationBuilder;
|
|
742
|
+
static delay(durationMs: number): ComplexAnimationBuilder;
|
|
743
|
+
delay(durationMs: number): ComplexAnimationBuilder;
|
|
744
|
+
static withCallback(
|
|
745
|
+
callback: (finished: boolean) => void
|
|
746
|
+
): ComplexAnimationBuilder;
|
|
747
|
+
|
|
748
|
+
withCallback(
|
|
749
|
+
callback: (finished: boolean) => void
|
|
750
|
+
): ComplexAnimationBuilder;
|
|
751
|
+
|
|
752
|
+
static easing(easingFunction: EasingFunction): ComplexAnimationBuilder;
|
|
753
|
+
easing(easingFunction: EasingFunction): ComplexAnimationBuilder;
|
|
754
|
+
static springify(): ComplexAnimationBuilder;
|
|
755
|
+
springify(): ComplexAnimationBuilder;
|
|
756
|
+
static damping(dampingFactor: number): ComplexAnimationBuilder;
|
|
757
|
+
damping(dampingFactor: number): ComplexAnimationBuilder;
|
|
758
|
+
static mass(mass: number): ComplexAnimationBuilder;
|
|
759
|
+
mass(mass: number): ComplexAnimationBuilder;
|
|
760
|
+
static stiffness(stiffnessFactor: number): ComplexAnimationBuilder;
|
|
761
|
+
stiffness(stiffnessFactor: number): ComplexAnimationBuilder;
|
|
762
|
+
static overshootClamping(
|
|
763
|
+
overshootClampingFactor: number
|
|
764
|
+
): ComplexAnimationBuilder;
|
|
765
|
+
|
|
766
|
+
overshootClamping(overshootClampingFactor: number): ComplexAnimationBuilder;
|
|
767
|
+
|
|
768
|
+
static restDisplacementThreshold(
|
|
769
|
+
restDisplacementThresholdFactor: number
|
|
770
|
+
): ComplexAnimationBuilder;
|
|
771
|
+
|
|
772
|
+
restDisplacementThreshold(
|
|
773
|
+
restDisplacementThresholdFactor: number
|
|
774
|
+
): ComplexAnimationBuilder;
|
|
775
|
+
|
|
776
|
+
static restSpeedThreshold(
|
|
777
|
+
restSpeedThresholdFactor: number
|
|
778
|
+
): ComplexAnimationBuilder;
|
|
779
|
+
|
|
780
|
+
restSpeedThreshold(
|
|
781
|
+
restSpeedThresholdFactor: number
|
|
782
|
+
): ComplexAnimationBuilder;
|
|
783
|
+
}
|
|
632
784
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
785
|
+
export class Layout extends ComplexAnimationBuilder {}
|
|
786
|
+
export class FadingTransition extends BaseAnimationBuilder {}
|
|
787
|
+
export class SequencedTransition extends BaseAnimationBuilder {
|
|
788
|
+
static reverse(): SequencedTransition;
|
|
789
|
+
reverse(): SequencedTransition;
|
|
790
|
+
}
|
|
791
|
+
export class JumpingTransition extends BaseAnimationBuilder {}
|
|
792
|
+
export class CurvedTransition extends BaseAnimationBuilder {
|
|
793
|
+
static delay(durationMs: number): CurvedTransition;
|
|
794
|
+
delay(durationMs: number): CurvedTransition;
|
|
795
|
+
static easingX(easing: EasingFn): CurvedTransition;
|
|
638
796
|
|
|
639
|
-
|
|
640
|
-
static duration(durationMs: number): BaseAnimationBuilder;
|
|
641
|
-
duration(durationMs: number): BaseAnimationBuilder;
|
|
642
|
-
static easing(easingFunction: EasingFunction): BaseAnimationBuilder;
|
|
643
|
-
easing(easingFunction: EasingFunction): BaseAnimationBuilder;
|
|
644
|
-
static delay(durationMs: number): BaseAnimationBuilder;
|
|
645
|
-
delay(durationMs: number): BaseAnimationBuilder;
|
|
646
|
-
static springify(): BaseAnimationBuilder;
|
|
647
|
-
springify(): BaseAnimationBuilder;
|
|
648
|
-
static damping(dampingFactor: number): BaseAnimationBuilder;
|
|
649
|
-
damping(dampingFactor: number): BaseAnimationBuilder;
|
|
650
|
-
static mass(mass: number): BaseAnimationBuilder;
|
|
651
|
-
mass(mass: number): BaseAnimationBuilder;
|
|
652
|
-
static stiffness(stiffnessFactor: number): BaseAnimationBuilder;
|
|
653
|
-
stiffness(stiffnessFactor: number): BaseAnimationBuilder;
|
|
654
|
-
static overshootClamping(overshootClampingFactor: number): BaseAnimationBuilder;
|
|
655
|
-
overshootClamping(overshootClampingFactor: number): BaseAnimationBuilder;
|
|
656
|
-
static restDisplacementThreshold(restDisplacementThresholdFactor: number): BaseAnimationBuilder;
|
|
657
|
-
restDisplacementThreshold(restDisplacementThresholdFactor: number): BaseAnimationBuilder;
|
|
658
|
-
static restSpeedThreshold(restSpeedThresholdFactor: number): BaseAnimationBuilder;
|
|
659
|
-
restSpeedThreshold(restSpeedThresholdFactor: number): BaseAnimationBuilder;
|
|
660
|
-
}
|
|
797
|
+
easingX(easing: EasingFn): CurvedTransition;
|
|
661
798
|
|
|
662
|
-
|
|
799
|
+
static easingY(easing: EasingFn): CurvedTransition;
|
|
663
800
|
|
|
664
|
-
|
|
665
|
-
static rotate(degree: number | string): BaseAnimationBuilder;
|
|
666
|
-
rotate(degree: number | string): BaseAnimationBuilder;
|
|
667
|
-
};
|
|
801
|
+
easingY(easing: EasingFn): CurvedTransition;
|
|
668
802
|
|
|
669
|
-
|
|
670
|
-
static duration(durationMs: number): BounceAnimationBuilder;
|
|
671
|
-
duration(durationMs: number): BounceAnimationBuilder;
|
|
672
|
-
static delay(durationMs: number): BounceAnimationBuilder;
|
|
673
|
-
delay(durationMs: number): BounceAnimationBuilder;
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
export interface AnimatedLayout extends React.Component {};
|
|
677
|
-
|
|
678
|
-
export class SlideInRight extends BaseAnimationBuilder {};
|
|
679
|
-
export class SlideInRight extends BaseAnimationBuilder {};
|
|
680
|
-
export class SlideOutRight extends BaseAnimationBuilder {};
|
|
681
|
-
export class SlideInUp extends BaseAnimationBuilder {};
|
|
682
|
-
export class SlideInDown extends BaseAnimationBuilder {};
|
|
683
|
-
export class SlideOutUp extends BaseAnimationBuilder {};
|
|
684
|
-
export class SlideOutDown extends BaseAnimationBuilder {};
|
|
685
|
-
export class FadeIn extends BaseAnimationBuilder {};
|
|
686
|
-
export class FadeInRight extends BaseAnimationBuilder {};
|
|
687
|
-
export class FadeInLeft extends BaseAnimationBuilder {};
|
|
688
|
-
export class FadeInUp extends BaseAnimationBuilder {};
|
|
689
|
-
export class FadeInDown extends BaseAnimationBuilder {};
|
|
690
|
-
export class FadeOut extends BaseAnimationBuilder {};
|
|
691
|
-
export class FadeOutRight extends BaseAnimationBuilder {};
|
|
692
|
-
export class FadeOutLeft extends BaseAnimationBuilder {};
|
|
693
|
-
export class FadeOutUp extends BaseAnimationBuilder {};
|
|
694
|
-
export class FadeOutDown extends BaseAnimationBuilder {};
|
|
695
|
-
export class SlideOutLeft extends BaseAnimationBuilder {};
|
|
696
|
-
export class SlideInLeft extends BaseAnimationBuilder {};
|
|
697
|
-
export class ZoomIn extends BaseAnimationBuilder {};
|
|
698
|
-
export class ZoomInRotate extends ZoomRotateAnimationBuilder {};
|
|
699
|
-
export class ZoomInRight extends BaseAnimationBuilder {};
|
|
700
|
-
export class ZoomInLeft extends BaseAnimationBuilder {};
|
|
701
|
-
export class ZoomInUp extends BaseAnimationBuilder {};
|
|
702
|
-
export class ZoomInDown extends BaseAnimationBuilder {};
|
|
703
|
-
export class ZoomInEasyUp extends BaseAnimationBuilder {};
|
|
704
|
-
export class ZoomInEasyDown extends BaseAnimationBuilder {};
|
|
705
|
-
export class ZoomOut extends BaseAnimationBuilder {};
|
|
706
|
-
export class ZoomOutRotate extends ZoomRotateAnimationBuilder {};
|
|
707
|
-
export class ZoomOutRight extends BaseAnimationBuilder {};
|
|
708
|
-
export class ZoomOutLeft extends BaseAnimationBuilder {};
|
|
709
|
-
export class ZoomOutUp extends BaseAnimationBuilder {};
|
|
710
|
-
export class ZoomOutDown extends BaseAnimationBuilder {};
|
|
711
|
-
export class ZoomOutEasyUp extends BaseAnimationBuilder {};
|
|
712
|
-
export class ZoomOutEasyDown extends BaseAnimationBuilder {};
|
|
713
|
-
export class StretchInX extends BaseAnimationBuilder {};
|
|
714
|
-
export class StretchInY extends BaseAnimationBuilder {};
|
|
715
|
-
export class StretchOutX extends BaseAnimationBuilder {};
|
|
716
|
-
export class StretchOutY extends BaseAnimationBuilder {};
|
|
717
|
-
export class FlipInXUp extends BaseAnimationBuilder {};
|
|
718
|
-
export class FlipInYLeft extends BaseAnimationBuilder {};
|
|
719
|
-
export class FlipInXDown extends BaseAnimationBuilder {};
|
|
720
|
-
export class FlipInYRight extends BaseAnimationBuilder {};
|
|
721
|
-
export class FlipInEasyX extends BaseAnimationBuilder {};
|
|
722
|
-
export class FlipInEasyY extends BaseAnimationBuilder {};
|
|
723
|
-
export class FlipOutXUp extends BaseAnimationBuilder {};
|
|
724
|
-
export class FlipOutYLeft extends BaseAnimationBuilder {};
|
|
725
|
-
export class FlipOutXDown extends BaseAnimationBuilder {};
|
|
726
|
-
export class FlipOutYRight extends BaseAnimationBuilder {};
|
|
727
|
-
export class FlipOutEasyX extends BaseAnimationBuilder {};
|
|
728
|
-
export class FlipOutEasyY extends BaseAnimationBuilder {};
|
|
729
|
-
export class BounceIn extends BounceAnimationBuilder {};
|
|
730
|
-
export class BounceInDown extends BounceAnimationBuilder {};
|
|
731
|
-
export class BounceInUp extends BounceAnimationBuilder {};
|
|
732
|
-
export class BounceInLeft extends BounceAnimationBuilder {};
|
|
733
|
-
export class BounceInRight extends BounceAnimationBuilder {};
|
|
734
|
-
export class BounceOut extends BounceAnimationBuilder {};
|
|
735
|
-
export class BounceOutDown extends BounceAnimationBuilder {};
|
|
736
|
-
export class BounceOutUp extends BounceAnimationBuilder {};
|
|
737
|
-
export class BounceOutLeft extends BounceAnimationBuilder {};
|
|
738
|
-
export class BounceOutRight extends BounceAnimationBuilder {};
|
|
739
|
-
}
|
|
803
|
+
static easingWidth(easing: EasingFn): CurvedTransition;
|
|
740
804
|
|
|
741
|
-
|
|
805
|
+
easingWidth(easing: EasingFn): CurvedTransition;
|
|
742
806
|
|
|
807
|
+
static easingHeight(easing: EasingFn): CurvedTransition;
|
|
808
|
+
|
|
809
|
+
easingHeight(easing: EasingFn): CurvedTransition;
|
|
810
|
+
}
|
|
811
|
+
export class EntryExitTransition extends BaseAnimationBuilder {
|
|
812
|
+
static delay(durationMs: number): EntryExitTransition;
|
|
813
|
+
delay(durationMs: number): EntryExitTransition;
|
|
814
|
+
static entering(
|
|
815
|
+
animation: BaseAnimationBuilder | typeof BaseAnimationBuilder
|
|
816
|
+
): EntryExitTransition;
|
|
817
|
+
|
|
818
|
+
entering(
|
|
819
|
+
animation: BaseAnimationBuilder | typeof BaseAnimationBuilder
|
|
820
|
+
): EntryExitTransition;
|
|
821
|
+
|
|
822
|
+
static exiting(
|
|
823
|
+
animation: BaseAnimationBuilder | typeof BaseAnimationBuilder
|
|
824
|
+
): EntryExitTransition;
|
|
825
|
+
|
|
826
|
+
exiting(
|
|
827
|
+
animation: BaseAnimationBuilder | typeof BaseAnimationBuilder
|
|
828
|
+
): EntryExitTransition;
|
|
829
|
+
}
|
|
830
|
+
export function combineTransition(
|
|
831
|
+
exiting: BaseAnimationBuilder | typeof BaseAnimationBuilder,
|
|
832
|
+
entering: BaseAnimationBuilder | typeof BaseAnimationBuilder
|
|
833
|
+
): EntryExitTransition;
|
|
834
|
+
export class SlideInRight extends ComplexAnimationBuilder {}
|
|
835
|
+
export class SlideOutRight extends ComplexAnimationBuilder {}
|
|
836
|
+
export class SlideInUp extends ComplexAnimationBuilder {}
|
|
837
|
+
export class SlideInDown extends ComplexAnimationBuilder {}
|
|
838
|
+
export class SlideOutUp extends ComplexAnimationBuilder {}
|
|
839
|
+
export class SlideOutDown extends ComplexAnimationBuilder {}
|
|
840
|
+
export class FadeIn extends ComplexAnimationBuilder {}
|
|
841
|
+
export class FadeInRight extends ComplexAnimationBuilder {}
|
|
842
|
+
export class FadeInLeft extends ComplexAnimationBuilder {}
|
|
843
|
+
export class FadeInUp extends ComplexAnimationBuilder {}
|
|
844
|
+
export class FadeInDown extends ComplexAnimationBuilder {}
|
|
845
|
+
export class FadeOut extends ComplexAnimationBuilder {}
|
|
846
|
+
export class FadeOutRight extends ComplexAnimationBuilder {}
|
|
847
|
+
export class FadeOutLeft extends ComplexAnimationBuilder {}
|
|
848
|
+
export class FadeOutUp extends ComplexAnimationBuilder {}
|
|
849
|
+
export class FadeOutDown extends ComplexAnimationBuilder {}
|
|
850
|
+
export class SlideOutLeft extends ComplexAnimationBuilder {}
|
|
851
|
+
export class SlideInLeft extends ComplexAnimationBuilder {}
|
|
852
|
+
export class ZoomIn extends ComplexAnimationBuilder {}
|
|
853
|
+
export class ZoomInRotate extends ComplexAnimationBuilder {}
|
|
854
|
+
export class ZoomInRight extends ComplexAnimationBuilder {}
|
|
855
|
+
export class ZoomInLeft extends ComplexAnimationBuilder {}
|
|
856
|
+
export class ZoomInUp extends ComplexAnimationBuilder {}
|
|
857
|
+
export class ZoomInDown extends ComplexAnimationBuilder {}
|
|
858
|
+
export class ZoomInEasyUp extends ComplexAnimationBuilder {}
|
|
859
|
+
export class ZoomInEasyDown extends ComplexAnimationBuilder {}
|
|
860
|
+
export class ZoomOut extends ComplexAnimationBuilder {}
|
|
861
|
+
export class ZoomOutRotate extends ComplexAnimationBuilder {}
|
|
862
|
+
export class ZoomOutRight extends ComplexAnimationBuilder {}
|
|
863
|
+
export class ZoomOutLeft extends ComplexAnimationBuilder {}
|
|
864
|
+
export class ZoomOutUp extends ComplexAnimationBuilder {}
|
|
865
|
+
export class ZoomOutDown extends ComplexAnimationBuilder {}
|
|
866
|
+
export class ZoomOutEasyUp extends ComplexAnimationBuilder {}
|
|
867
|
+
export class ZoomOutEasyDown extends ComplexAnimationBuilder {}
|
|
868
|
+
export class StretchInX extends ComplexAnimationBuilder {}
|
|
869
|
+
export class StretchInY extends ComplexAnimationBuilder {}
|
|
870
|
+
export class StretchOutX extends ComplexAnimationBuilder {}
|
|
871
|
+
export class StretchOutY extends ComplexAnimationBuilder {}
|
|
872
|
+
export class FlipInXUp extends ComplexAnimationBuilder {}
|
|
873
|
+
export class FlipInYLeft extends ComplexAnimationBuilder {}
|
|
874
|
+
export class FlipInXDown extends ComplexAnimationBuilder {}
|
|
875
|
+
export class FlipInYRight extends ComplexAnimationBuilder {}
|
|
876
|
+
export class FlipInEasyX extends ComplexAnimationBuilder {}
|
|
877
|
+
export class FlipInEasyY extends ComplexAnimationBuilder {}
|
|
878
|
+
export class FlipOutXUp extends ComplexAnimationBuilder {}
|
|
879
|
+
export class FlipOutYLeft extends ComplexAnimationBuilder {}
|
|
880
|
+
export class FlipOutXDown extends ComplexAnimationBuilder {}
|
|
881
|
+
export class FlipOutYRight extends ComplexAnimationBuilder {}
|
|
882
|
+
export class FlipOutEasyX extends ComplexAnimationBuilder {}
|
|
883
|
+
export class FlipOutEasyY extends ComplexAnimationBuilder {}
|
|
884
|
+
export class BounceIn extends BaseAnimationBuilder {}
|
|
885
|
+
export class BounceInDown extends BaseAnimationBuilder {}
|
|
886
|
+
export class BounceInUp extends BaseAnimationBuilder {}
|
|
887
|
+
export class BounceInLeft extends BaseAnimationBuilder {}
|
|
888
|
+
export class BounceInRight extends BaseAnimationBuilder {}
|
|
889
|
+
export class BounceOut extends BaseAnimationBuilder {}
|
|
890
|
+
export class BounceOutDown extends BaseAnimationBuilder {}
|
|
891
|
+
export class BounceOutUp extends BaseAnimationBuilder {}
|
|
892
|
+
export class BounceOutLeft extends BaseAnimationBuilder {}
|
|
893
|
+
export class BounceOutRight extends BaseAnimationBuilder {}
|
|
894
|
+
export class LightSpeedInRight extends ComplexAnimationBuilder {}
|
|
895
|
+
export class LightSpeedInLeft extends ComplexAnimationBuilder {}
|
|
896
|
+
export class LightSpeedOutRight extends ComplexAnimationBuilder {}
|
|
897
|
+
export class LightSpeedOutLeft extends ComplexAnimationBuilder {}
|
|
898
|
+
export class PinwheelIn extends ComplexAnimationBuilder {}
|
|
899
|
+
export class PinwheelOut extends ComplexAnimationBuilder {}
|
|
900
|
+
export class RotateInDownLeft extends ComplexAnimationBuilder {}
|
|
901
|
+
export class RotateInDownRight extends ComplexAnimationBuilder {}
|
|
902
|
+
export class RotateInUpRight extends ComplexAnimationBuilder {}
|
|
903
|
+
export class RotateInUpLeft extends ComplexAnimationBuilder {}
|
|
904
|
+
export class RotateOutDownRight extends ComplexAnimationBuilder {}
|
|
905
|
+
export class RotateOutDownLeft extends ComplexAnimationBuilder {}
|
|
906
|
+
export class RotateOutUpLeft extends ComplexAnimationBuilder {}
|
|
907
|
+
export class RotateOutUpRight extends ComplexAnimationBuilder {}
|
|
908
|
+
export class RollInLeft extends ComplexAnimationBuilder {}
|
|
909
|
+
export class RollInRight extends ComplexAnimationBuilder {}
|
|
910
|
+
export class RollOutLeft extends ComplexAnimationBuilder {}
|
|
911
|
+
export class RollOutRight extends ComplexAnimationBuilder {}
|
|
743
912
|
interface EasingNodeStatic {
|
|
744
913
|
linear: Animated.EasingNodeFunction;
|
|
745
914
|
ease: Animated.EasingNodeFunction;
|
|
@@ -820,7 +989,6 @@ declare module 'react-native-reanimated' {
|
|
|
820
989
|
| 'slide-right'
|
|
821
990
|
| 'slide-left';
|
|
822
991
|
}
|
|
823
|
-
|
|
824
992
|
export class Transition extends Component {
|
|
825
993
|
static In: ComponentClass<TransitionInOutProps>;
|
|
826
994
|
static Out: ComponentClass<TransitionInOutProps>;
|
|
@@ -889,96 +1057,6 @@ declare module 'react-native-reanimated' {
|
|
|
889
1057
|
export const timing: typeof Animated.timing;
|
|
890
1058
|
export const spring: typeof Animated.spring;
|
|
891
1059
|
export const SpringUtils: typeof Animated.SpringUtils;
|
|
892
|
-
export const runOnUI: typeof Animated.runOnUI;
|
|
893
|
-
export const runOnJS: typeof Animated.runOnJS;
|
|
894
|
-
export const createAnimatedPropAdapter: typeof Animated.createAnimatedPropAdapter;
|
|
895
|
-
export const processColor: typeof Animated.processColor;
|
|
896
|
-
export const makeMutable: typeof Animated.makeMutable;
|
|
897
1060
|
export const useValue: typeof Animated.useValue;
|
|
898
|
-
export const useSharedValue: typeof Animated.useSharedValue;
|
|
899
|
-
export const useAnimatedStyle: typeof Animated.useAnimatedStyle;
|
|
900
|
-
export const useAnimatedReaction: typeof Animated.useAnimatedReaction;
|
|
901
|
-
export const useAnimatedProps: typeof Animated.useAnimatedProps;
|
|
902
|
-
export const useDerivedValue: typeof Animated.useDerivedValue;
|
|
903
|
-
export const useWorkletCallback: typeof Animated.useWorkletCallback;
|
|
904
|
-
export const createWorklet: typeof Animated.createWorklet;
|
|
905
|
-
export const interpolateColor: typeof Animated.interpolateColor;
|
|
906
|
-
export const useAnimatedGestureHandler: typeof Animated.useAnimatedGestureHandler;
|
|
907
|
-
export const useAnimatedScrollHandler: typeof Animated.useAnimatedScrollHandler;
|
|
908
|
-
export const useAnimatedRef: typeof Animated.useAnimatedRef;
|
|
909
|
-
export const defineAnimation: typeof Animated.defineAnimation;
|
|
910
|
-
export const measure: typeof Animated.measure;
|
|
911
|
-
export const scrollTo: typeof Animated.scrollTo;
|
|
912
|
-
export const withTiming: typeof Animated.withTiming;
|
|
913
|
-
export const withSpring: typeof Animated.withSpring;
|
|
914
|
-
export const withDecay: typeof Animated.withDecay;
|
|
915
|
-
export const cancelAnimation: typeof Animated.cancelAnimation;
|
|
916
|
-
export const withDelay: typeof Animated.withDelay;
|
|
917
|
-
export const withRepeat: typeof Animated.withRepeat;
|
|
918
|
-
export const withSequence: typeof Animated.withSequence;
|
|
919
|
-
export const interpolate: typeof Animated.interpolate;
|
|
920
|
-
|
|
921
|
-
export const Layout: typeof Animated.Layout;
|
|
922
|
-
export const AnimatedLayout: typeof Animated.AnimatedLayout;
|
|
923
1061
|
export const ReverseAnimation: typeof Animated.ReverseAnimation;
|
|
924
|
-
export const SlideInRight: typeof Animated.SlideInRight;
|
|
925
|
-
export const SlideOutRight: typeof Animated.SlideOutRight;
|
|
926
|
-
export const SlideInUp: typeof Animated.SlideInUp;
|
|
927
|
-
export const SlideInDown: typeof Animated.SlideInDown;
|
|
928
|
-
export const SlideOutUp: typeof Animated.SlideOutUp;
|
|
929
|
-
export const SlideOutDown: typeof Animated.SlideOutDown;
|
|
930
|
-
export const FadeIn: typeof Animated.FadeIn;
|
|
931
|
-
export const FadeInRight: typeof Animated.FadeInRight;
|
|
932
|
-
export const FadeInLeft: typeof Animated.FadeInLeft;
|
|
933
|
-
export const FadeInUp: typeof Animated.FadeInUp;
|
|
934
|
-
export const FadeInDown: typeof Animated.FadeInDown;
|
|
935
|
-
export const FadeOut: typeof Animated.FadeOut;
|
|
936
|
-
export const FadeOutRight: typeof Animated.FadeOutRight;
|
|
937
|
-
export const FadeOutLeft: typeof Animated.FadeOutLeft;
|
|
938
|
-
export const FadeOutUp: typeof Animated.FadeOutUp;
|
|
939
|
-
export const FadeOutDown: typeof Animated.FadeOutDown;
|
|
940
|
-
export const SlideOutLeft: typeof Animated.SlideOutLeft;
|
|
941
|
-
export const SlideInLeft: typeof Animated.SlideInLeft;
|
|
942
|
-
export const ZoomIn: typeof Animated.ZoomIn;
|
|
943
|
-
export const ZoomInRotate: typeof Animated.ZoomInRotate;
|
|
944
|
-
export const ZoomInRight: typeof Animated.ZoomInRight;
|
|
945
|
-
export const ZoomInLeft: typeof Animated.ZoomInLeft;
|
|
946
|
-
export const ZoomInUp: typeof Animated.ZoomInUp;
|
|
947
|
-
export const ZoomInDown: typeof Animated.ZoomInDown;
|
|
948
|
-
export const ZoomInEasyUp: typeof Animated.ZoomInEasyUp;
|
|
949
|
-
export const ZoomInEasyDown: typeof Animated.ZoomInEasyDown;
|
|
950
|
-
export const ZoomOut: typeof Animated.ZoomOut;
|
|
951
|
-
export const ZoomOutRotate: typeof Animated.ZoomOutRotate;
|
|
952
|
-
export const ZoomOutRight: typeof Animated.ZoomOutRight;
|
|
953
|
-
export const ZoomOutLeft: typeof Animated.ZoomOutLeft;
|
|
954
|
-
export const ZoomOutUp: typeof Animated.ZoomOutUp;
|
|
955
|
-
export const ZoomOutDown: typeof Animated.ZoomOutDown;
|
|
956
|
-
export const ZoomOutEasyUp: typeof Animated.ZoomOutEasyUp;
|
|
957
|
-
export const ZoomOutEasyDown: typeof Animated.ZoomOutEasyDown;
|
|
958
|
-
export const StretchInX: typeof Animated.StretchInX;
|
|
959
|
-
export const StretchInY: typeof Animated.StretchInY;
|
|
960
|
-
export const StretchOutX: typeof Animated.StretchOutX;
|
|
961
|
-
export const StretchOutY: typeof Animated.StretchOutY;
|
|
962
|
-
export const FlipInXUp: typeof Animated.FlipInXUp;
|
|
963
|
-
export const FlipInYLeft: typeof Animated.FlipInYLeft;
|
|
964
|
-
export const FlipInXDown: typeof Animated.FlipInXDown;
|
|
965
|
-
export const FlipInYRight: typeof Animated.FlipInYRight;
|
|
966
|
-
export const FlipInEasyX: typeof Animated.FlipInEasyX;
|
|
967
|
-
export const FlipInEasyY: typeof Animated.FlipInEasyY;
|
|
968
|
-
export const FlipOutXUp: typeof Animated.FlipOutXUp;
|
|
969
|
-
export const FlipOutYLeft: typeof Animated.FlipOutYLeft;
|
|
970
|
-
export const FlipOutXDown: typeof Animated.FlipOutXDown;
|
|
971
|
-
export const FlipOutYRight: typeof Animated.FlipOutYRight;
|
|
972
|
-
export const FlipOutEasyX: typeof Animated.FlipOutEasyX;
|
|
973
|
-
export const FlipOutEasyY: typeof Animated.FlipOutEasyY;
|
|
974
|
-
export const BounceIn: typeof Animated.BounceIn;
|
|
975
|
-
export const BounceInDown: typeof Animated.BounceInDown;
|
|
976
|
-
export const BounceInUp: typeof Animated.BounceInUp;
|
|
977
|
-
export const BounceInLeft: typeof Animated.BounceInLeft;
|
|
978
|
-
export const BounceInRight: typeof Animated.BounceInRight;
|
|
979
|
-
export const BounceOut: typeof Animated.BounceOut;
|
|
980
|
-
export const BounceOutDown: typeof Animated.BounceOutDown;
|
|
981
|
-
export const BounceOutUp: typeof Animated.BounceOutUp;
|
|
982
|
-
export const BounceOutLeft: typeof Animated.BounceOutLeft;
|
|
983
|
-
export const BounceOutRight: typeof Animated.BounceOutRight;
|
|
984
1062
|
}
|