react-native-reanimated 2.4.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +72 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +30 -1
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +64 -39
- package/Common/cpp/Tools/RuntimeDecorator.cpp +2 -0
- package/Common/cpp/headers/AnimatedSensor/AnimatedSensorModule.h +41 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +14 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +14 -0
- package/Common/cpp/headers/SharedItems/MutableValue.h +4 -1
- package/Common/cpp/headers/SharedItems/ShareableValue.h +3 -0
- package/Common/cpp/headers/SharedItems/ValueWrapper.h +3 -0
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +11 -0
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +2 -0
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/RNReanimated.podspec +15 -6
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/CMakeLists.txt +198 -0
- package/android/README.md +15 -0
- package/android/build.gradle +676 -73
- package/android/empty.cpp +1 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +25 -0
- package/android/gradlew +234 -0
- package/android/gradlew.bat +89 -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/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/android/react-native-reanimated-68-hermes.aar +0 -0
- package/android/react-native-reanimated-68-jsc.aar +0 -0
- package/android/rnVersionPatch/62/layoutReanimation/ReanimatedNativeHierarchyManager.java +412 -0
- package/android/rnVersionPatch/62/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/63/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/64/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/65/.gitkeep +0 -0
- package/android/rnVersionPatch/66/.gitkeep +0 -0
- package/android/rnVersionPatch/67/.gitkeep +0 -0
- package/android/rnVersionPatch/68/.gitkeep +0 -0
- package/android/rnVersionPatch/backup/.gitkeep +0 -0
- package/android/settings.gradle +1 -0
- package/android/spotless.gradle +9 -0
- package/android/src/{AndroidManifest.xml → main/AndroidManifest.xml} +0 -0
- package/android/src/main/cpp/AndroidErrorHandler.cpp +42 -0
- package/android/src/main/cpp/AndroidLogger.cpp +27 -0
- package/android/src/main/cpp/AndroidScheduler.cpp +59 -0
- package/android/src/main/cpp/JNIHelper.cpp +59 -0
- package/android/src/main/cpp/LayoutAnimations.cpp +103 -0
- package/android/src/main/cpp/NativeProxy.cpp +327 -0
- package/android/src/main/cpp/OnLoad.cpp +17 -0
- package/android/src/main/cpp/TurboModule.cpp +44 -0
- package/android/src/main/cpp/headers/AndroidErrorHandler.h +30 -0
- package/android/src/main/cpp/headers/AndroidLogger.h +16 -0
- package/android/src/main/cpp/headers/AndroidScheduler.h +41 -0
- package/android/src/main/cpp/headers/JNIHelper.h +30 -0
- package/android/src/main/cpp/headers/LayoutAnimations.h +42 -0
- package/android/src/main/cpp/headers/NativeProxy.h +170 -0
- package/android/src/main/cpp/headers/TurboModule.h +70 -0
- package/android/src/main/java/com/facebook/react/uimanager/UIManagerReanimatedHelper.java +15 -0
- package/android/src/main/java/com/swmansion/common/GestureHandlerStateManager.java +5 -0
- package/android/src/main/java/com/swmansion/reanimated/AndroidErrorHandler.java +8 -0
- package/android/src/main/java/com/swmansion/reanimated/CopiedEvent.java +43 -0
- package/android/src/main/java/com/swmansion/reanimated/MapUtils.java +26 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +117 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +285 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +682 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedJSIModulePackage.java +29 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +251 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +96 -0
- package/android/src/main/java/com/swmansion/reanimated/Scheduler.java +51 -0
- package/android/src/main/java/com/swmansion/reanimated/UpdateContext.java +11 -0
- package/android/src/main/java/com/swmansion/reanimated/Utils.java +32 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +517 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +56 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/NativeMethodsHolder.java +11 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +410 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +292 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/Snapshot.java +121 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ViewHierarchyObserver.java +12 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/AlwaysNode.java +29 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java +87 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java +24 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/CallFuncNode.java +49 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockNode.java +38 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockOpNode.java +73 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java +36 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java +33 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java +83 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/FinalNode.java +5 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java +20 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/Node.java +139 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/NoopNode.java +37 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java +377 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java +71 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java +153 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java +32 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/TransformNode.java +84 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorContainer.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +31 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +35 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/ChangeTransition.java +84 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/SaneSidePropagation.java +25 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/Scale.java +86 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionModule.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionUtils.java +161 -0
- package/ios/LayoutReanimation/REAAnimationsManager.m +14 -4
- package/ios/REAModule.m +8 -9
- package/ios/REANodesManager.h +4 -1
- package/ios/REANodesManager.m +76 -4
- package/ios/native/NativeProxy.mm +76 -4
- package/ios/sensor/ReanimatedSensor.h +25 -0
- package/ios/sensor/ReanimatedSensor.m +217 -0
- package/ios/sensor/ReanimatedSensorContainer.h +12 -0
- package/ios/sensor/ReanimatedSensorContainer.m +40 -0
- package/ios/sensor/ReanimatedSensorType.h +7 -0
- package/lib/{src/Animated.js → Animated.js} +0 -0
- package/lib/{src/ConfigHelper.js → ConfigHelper.js} +2 -2
- package/lib/{src/ReanimatedEventEmitter.js → ReanimatedEventEmitter.js} +0 -0
- package/lib/{src/ReanimatedModule.js → ReanimatedModule.js} +0 -0
- package/lib/{src/ReanimatedModule.macos.js → ReanimatedModule.macos.js} +0 -0
- package/lib/{src/ReanimatedModule.native.js → ReanimatedModule.native.js} +0 -0
- package/lib/{src/ReanimatedModule.windows.js → ReanimatedModule.windows.js} +0 -0
- package/lib/{src/ReanimatedModuleCompat.js → ReanimatedModuleCompat.js} +0 -0
- package/lib/{src/__mocks__ → __mocks__}/ReanimatedEventEmitter.js +0 -0
- package/lib/{src/__mocks__ → __mocks__}/ReanimatedModule.native.js +0 -0
- package/lib/{src/createAnimatedComponent.js → createAnimatedComponent.js} +3 -4
- package/lib/{src/index.js → index.js} +0 -0
- package/lib/{src/reanimated1 → reanimated1}/Easing.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/SpringConfig.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/Transitioning.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/Animation.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/SpringUtils.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/backwardCompatibleAnimWrapper.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/decay.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/spring.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/animations/timing.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/base.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedAlways.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedBezier.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedBlock.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedCall.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedCallFunc.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedClock.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedClockTest.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedCode.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedConcat.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedCond.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedDebug.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedEvent.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedFunction.js +1 -1
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedNode.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedOperator.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedParam.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedProps.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedSet.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedStartClock.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedStopClock.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedStyle.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedTransform.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/AnimatedValue.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/Core.test.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/InternalAnimatedValue.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/__mocks__/AnimatedProps.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/core/createEventObjectProxyPolyfill.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/__mocks__/evaluateOnce.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/acc.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/color.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/diff.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/diffClamp.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/evaluateOnce.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/index.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/interpolate.js +2 -4
- package/lib/{src/reanimated1 → reanimated1}/derived/interpolateColors.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/onChange.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/derived/useCode.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/index.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/operators.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/useValue.js +0 -0
- package/lib/{src/reanimated1 → reanimated1}/val.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/Bezier.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/Colors.js +2 -1
- package/lib/{src/reanimated2 → reanimated2}/Easing.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/NativeMethods.js +0 -0
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +50 -0
- package/lib/{src/reanimated2 → reanimated2}/NativeReanimated/index.js +0 -4
- package/lib/{src/reanimated2 → reanimated2}/PlatformChecker.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/PropAdapters.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/UpdateProps.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/ViewDescriptorsSet.js +2 -2
- package/lib/{src/reanimated2 → reanimated2}/WorkletEventHandler.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/__mocks__/MutableValue.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/__mocks__/NativeReanimated.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/__mocks__/NativeReanimated.native.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/commonTypes.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/decay.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/delay.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/repeat.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/sequence.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/spring.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/styleAnimation.js +2 -1
- package/lib/{src/reanimated2 → reanimated2}/animation/timing.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/animation/util.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/commonTypes.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/component/FlatList.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/component/WrappedComponents.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/component/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/core.js +30 -24
- package/lib/{src/reanimated2 → reanimated2}/globals.d.ts +6 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/Hooks.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/commonTypes.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/index.js +1 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useAnimatedGestureHandler.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useAnimatedReaction.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useAnimatedRef.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useAnimatedScrollHandler.js +0 -0
- package/lib/reanimated2/hook/useAnimatedSensor.js +66 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useAnimatedStyle.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useDerivedValue.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/useSharedValue.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/hook/utils.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/interpolateColor.js +11 -11
- package/lib/{src/reanimated2 → reanimated2}/interpolation.js +1 -1
- package/lib/{src/reanimated2 → reanimated2}/jestUtils.js +9 -4
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/JSReanimated.js +23 -2
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/Mapper.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/MapperRegistry.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/MutableValue.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/commonTypes.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/js-reanimated/index.js +3 -3
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/LayoutAnimationRepository.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +8 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/Keyframe.js +2 -1
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Bounce.js +32 -42
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Default.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Fade.js +20 -38
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Flip.js +32 -44
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.js +8 -16
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.js +6 -10
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Roll.js +8 -12
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Rotate.js +20 -36
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Slide.js +16 -20
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Stretch.js +8 -12
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Zoom.js +32 -48
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.js +22 -18
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/index.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/mock.js +3 -2
- package/lib/{src/reanimated2 → reanimated2}/platform-specific/RNRenderer.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/platform-specific/RNRenderer.web.js +0 -0
- package/lib/{src/reanimated2 → reanimated2}/utils.js +0 -0
- package/lib/{src/setAndForwardRef.js → setAndForwardRef.js} +0 -0
- package/lib/types/lib/ConfigHelper.d.ts +12 -0
- package/lib/types/lib/ReanimatedEventEmitter.d.ts +3 -0
- package/lib/types/lib/ReanimatedModule.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.macos.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.native.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.windows.d.ts +2 -0
- package/lib/types/lib/ReanimatedModuleCompat.d.ts +14 -0
- package/lib/types/lib/createAnimatedComponent.d.ts +33 -0
- package/lib/types/lib/reanimated2/Bezier.d.ts +6 -0
- package/lib/types/lib/reanimated2/Colors.d.ts +31 -0
- package/lib/types/lib/reanimated2/Easing.d.ts +172 -0
- package/lib/types/lib/reanimated2/NativeMethods.d.ts +14 -0
- package/lib/types/lib/reanimated2/NativeReanimated/NativeReanimated.d.ts +20 -0
- package/lib/types/lib/reanimated2/NativeReanimated/index.d.ts +3 -0
- package/lib/types/lib/reanimated2/PlatformChecker.d.ts +5 -0
- package/lib/types/lib/reanimated2/PropAdapters.d.ts +4 -0
- package/lib/types/lib/reanimated2/UpdateProps.d.ts +9 -0
- package/lib/types/lib/reanimated2/ViewDescriptorsSet.d.ts +20 -0
- package/lib/types/lib/reanimated2/WorkletEventHandler.d.ts +13 -0
- package/lib/types/lib/reanimated2/__mocks__/MutableValue.d.ts +5 -0
- package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.d.ts +13 -0
- package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.native.d.ts +13 -0
- package/lib/types/lib/reanimated2/animation/commonTypes.d.ts +27 -0
- package/lib/types/lib/reanimated2/animation/decay.d.ts +19 -0
- package/lib/types/lib/reanimated2/animation/delay.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/index.d.ts +9 -0
- package/lib/types/lib/reanimated2/animation/repeat.d.ts +12 -0
- package/lib/types/lib/reanimated2/animation/sequence.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/spring.d.ts +22 -0
- package/lib/types/lib/reanimated2/animation/styleAnimation.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/timing.d.ts +21 -0
- package/lib/types/lib/reanimated2/animation/util.d.ts +9 -0
- package/lib/types/lib/reanimated2/commonTypes.d.ts +80 -0
- package/lib/types/lib/reanimated2/component/FlatList.d.ts +9 -0
- package/lib/types/lib/reanimated2/component/WrappedComponents.d.ts +8 -0
- package/lib/types/lib/reanimated2/component/index.d.ts +9 -0
- package/lib/types/lib/reanimated2/core.d.ts +24 -0
- package/lib/types/lib/reanimated2/hook/Hooks.d.ts +5 -0
- package/lib/types/lib/reanimated2/hook/commonTypes.d.ts +14 -0
- package/lib/types/lib/reanimated2/hook/index.d.ts +10 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedGestureHandler.d.ts +35 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedReaction.d.ts +12 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedRef.d.ts +3 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedScrollHandler.d.ts +21 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedSensor.d.ts +20 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedStyle.d.ts +11 -0
- package/lib/types/lib/reanimated2/hook/useDerivedValue.d.ts +4 -0
- package/lib/types/lib/reanimated2/hook/useSharedValue.d.ts +2 -0
- package/lib/types/lib/reanimated2/hook/utils.d.ts +28 -0
- package/lib/types/lib/reanimated2/index.d.ts +12 -0
- package/lib/types/lib/reanimated2/interpolateColor.d.ts +26 -0
- package/lib/types/lib/reanimated2/interpolation.d.ts +14 -0
- package/lib/types/lib/reanimated2/jestUtils.d.ts +12 -0
- package/lib/types/lib/reanimated2/js-reanimated/JSReanimated.d.ts +30 -0
- package/lib/types/lib/reanimated2/js-reanimated/Mapper.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/MapperRegistry.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/MutableValue.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/commonTypes.d.ts +44 -0
- package/lib/types/lib/reanimated2/js-reanimated/index.d.ts +15 -0
- package/lib/types/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.d.ts +1 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +22 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +38 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.d.ts +25 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +77 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/index.d.ts +4 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.d.ts +62 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Default.d.ts +4 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.d.ts +42 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.d.ts +50 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.d.ts +10 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.d.ts +34 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.d.ts +34 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.d.ts +66 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/index.d.ts +10 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +19 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +13 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.d.ts +7 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +9 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/index.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/index.d.ts +4 -0
- package/lib/types/lib/reanimated2/mock.d.ts +55 -0
- package/lib/types/lib/reanimated2/platform-specific/RNRenderer.d.ts +1 -0
- package/lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/lib/reanimated2/utils.d.ts +7 -0
- package/lib/types/lib/setAndForwardRef.d.ts +40 -0
- package/lib/types/react-native-reanimated-tests.d.ts +1 -0
- package/mock.js +5 -4
- package/package.json +44 -38
- package/plugin.js +3 -0
- package/react-native-reanimated.d.ts +64 -34
- package/src/ConfigHelper.ts +4 -4
- package/src/createAnimatedComponent.tsx +4 -4
- package/src/reanimated1/core/AnimatedFunction.js +1 -1
- package/src/reanimated1/derived/interpolate.js +2 -4
- package/src/reanimated2/Colors.ts +2 -1
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +42 -15
- package/src/reanimated2/NativeReanimated/index.ts +0 -6
- package/src/reanimated2/ViewDescriptorsSet.ts +2 -3
- package/src/reanimated2/animation/index.ts +1 -0
- package/src/reanimated2/animation/styleAnimation.ts +10 -7
- package/src/reanimated2/animation/timing.ts +3 -1
- package/src/reanimated2/animation/util.ts +10 -11
- package/src/reanimated2/commonTypes.ts +20 -0
- package/src/reanimated2/component/FlatList.tsx +3 -2
- package/src/reanimated2/core.ts +34 -26
- package/src/reanimated2/globals.d.ts +6 -0
- package/src/reanimated2/hook/index.ts +1 -0
- package/src/reanimated2/hook/useAnimatedSensor.ts +91 -0
- package/src/reanimated2/hook/utils.ts +2 -1
- package/src/reanimated2/interpolateColor.ts +11 -11
- package/src/reanimated2/interpolation.ts +2 -6
- package/src/reanimated2/jestUtils.ts +20 -4
- package/src/reanimated2/js-reanimated/JSReanimated.ts +25 -2
- package/src/reanimated2/js-reanimated/index.ts +3 -3
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +13 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +2 -3
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +51 -21
- package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +40 -10
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +48 -12
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +8 -2
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +32 -8
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +32 -10
- package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +64 -16
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +26 -19
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +2 -1
- package/src/reanimated2/mock.ts +3 -2
- package/android/expo/linking.gradle +0 -46
- package/android/expo/src/main/java/com/swmansion/reanimated/EXReanimatedAdapter.java +0 -12
- package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java +0 -26
- package/android/react-native-reanimated-63-hermes.aar +0 -0
- package/android/react-native-reanimated-63-jsc.aar +0 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedProxyPackage.java +0 -15
- package/expo-module.config.json +0 -3
- package/lib/src/reanimated2/NativeReanimated/NativeReanimated.js +0 -37
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
2
|
// @ts-nocheck
|
|
3
|
-
|
|
3
|
+
import { jestResetJsReanimatedModule } from './core';
|
|
4
4
|
let config = {
|
|
5
5
|
fps: 60,
|
|
6
6
|
};
|
|
@@ -105,22 +105,26 @@ const compareStyle = (received, expectedStyle, config) => {
|
|
|
105
105
|
};
|
|
106
106
|
let frameTime = 1000 / config.fps;
|
|
107
107
|
let requestAnimationFrameCopy;
|
|
108
|
+
let currentTimestamp = 0;
|
|
108
109
|
const requestAnimationFrame = (callback) => {
|
|
109
110
|
setTimeout(callback, frameTime);
|
|
110
111
|
};
|
|
111
112
|
const beforeTest = () => {
|
|
113
|
+
jestResetJsReanimatedModule();
|
|
112
114
|
requestAnimationFrameCopy = global.requestAnimationFrame;
|
|
113
115
|
global.requestAnimationFrame = requestAnimationFrame;
|
|
114
|
-
|
|
116
|
+
global.ReanimatedDataMock = {
|
|
117
|
+
now: () => currentTimestamp,
|
|
118
|
+
};
|
|
119
|
+
currentTimestamp = 0;
|
|
115
120
|
jest.useFakeTimers();
|
|
116
121
|
};
|
|
117
122
|
const afterTest = () => {
|
|
118
|
-
MockDate.reset();
|
|
119
123
|
jest.useRealTimers();
|
|
120
124
|
global.requestAnimationFrame = requestAnimationFrameCopy;
|
|
121
125
|
};
|
|
122
126
|
const tickTravel = () => {
|
|
123
|
-
|
|
127
|
+
currentTimestamp += frameTime;
|
|
124
128
|
jest.advanceTimersByTime(frameTime);
|
|
125
129
|
};
|
|
126
130
|
export const withReanimatedTimer = (animatonTest) => {
|
|
@@ -142,6 +146,7 @@ export const advanceAnimationByFrame = (count) => {
|
|
|
142
146
|
};
|
|
143
147
|
export const setUpTests = (userConfig = {}) => {
|
|
144
148
|
const expect = require('expect');
|
|
149
|
+
require('setimmediate');
|
|
145
150
|
frameTime = Math.round(1000 / config.fps);
|
|
146
151
|
config = Object.assign(Object.assign({}, config), userConfig);
|
|
147
152
|
expect.extend({
|
|
@@ -2,6 +2,7 @@ import MapperRegistry from './MapperRegistry';
|
|
|
2
2
|
import Mapper from './Mapper';
|
|
3
3
|
import MutableValue from './MutableValue';
|
|
4
4
|
import { NativeReanimated } from '../NativeReanimated/NativeReanimated';
|
|
5
|
+
import { isJest } from '../PlatformChecker';
|
|
5
6
|
export default class JSReanimated extends NativeReanimated {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(false);
|
|
@@ -9,8 +10,8 @@ export default class JSReanimated extends NativeReanimated {
|
|
|
9
10
|
this._renderRequested = false;
|
|
10
11
|
this._mapperRegistry = new MapperRegistry(this);
|
|
11
12
|
this._frames = [];
|
|
12
|
-
if (
|
|
13
|
-
this.timeProvider = { now: () =>
|
|
13
|
+
if (isJest()) {
|
|
14
|
+
this.timeProvider = { now: () => global.ReanimatedDataMock.now() };
|
|
14
15
|
}
|
|
15
16
|
else {
|
|
16
17
|
this.timeProvider = { now: () => window.performance.now() };
|
|
@@ -75,4 +76,24 @@ export default class JSReanimated extends NativeReanimated {
|
|
|
75
76
|
enableLayoutAnimations() {
|
|
76
77
|
console.warn('[Reanimated] enableLayoutAnimations is not available for WEB yet');
|
|
77
78
|
}
|
|
79
|
+
registerSensor() {
|
|
80
|
+
console.warn('[Reanimated] useAnimatedSensor is not available on web yet.');
|
|
81
|
+
return -1;
|
|
82
|
+
}
|
|
83
|
+
unregisterSensor() {
|
|
84
|
+
// noop
|
|
85
|
+
}
|
|
86
|
+
jestResetModule() {
|
|
87
|
+
if (isJest()) {
|
|
88
|
+
/**
|
|
89
|
+
* If someone used timers to stop animation before the end,
|
|
90
|
+
* then _renderRequested was set as true
|
|
91
|
+
* and any new update from another test wasn't applied.
|
|
92
|
+
*/
|
|
93
|
+
this._renderRequested = false;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
throw Error('This method can be only use in Jest testing.');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
78
99
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,7 @@ if (shouldBeUseWeb()) {
|
|
|
7
7
|
// noop
|
|
8
8
|
};
|
|
9
9
|
global._measure = () => {
|
|
10
|
-
console.warn("[Reanimated] You can't use
|
|
10
|
+
console.warn("[Reanimated] You can't use `measure` with Chrome Debugger or with web version");
|
|
11
11
|
return {
|
|
12
12
|
x: 0,
|
|
13
13
|
y: 0,
|
|
@@ -18,10 +18,10 @@ if (shouldBeUseWeb()) {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
global._scrollTo = () => {
|
|
21
|
-
console.warn("[Reanimated] You can't use
|
|
21
|
+
console.warn("[Reanimated] You can't use `scrollTo` with Chrome Debugger or with web version");
|
|
22
22
|
};
|
|
23
23
|
global._setGestureState = () => {
|
|
24
|
-
console.warn("[Reanimated] You can't use
|
|
24
|
+
console.warn("[Reanimated] You can't use `setGestureState` with Chrome Debugger or with web version");
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export const _updatePropsJS = (updates, viewRef) => {
|
|
File without changes
|
|
File without changes
|
|
@@ -73,6 +73,14 @@ export class ComplexAnimationBuilder extends BaseAnimationBuilder {
|
|
|
73
73
|
this.restSpeedThresholdV = restSpeedThreshold;
|
|
74
74
|
return this;
|
|
75
75
|
}
|
|
76
|
+
static withInitialValues(values) {
|
|
77
|
+
const instance = this.createInstance();
|
|
78
|
+
return instance.withInitialValues(values);
|
|
79
|
+
}
|
|
80
|
+
withInitialValues(values) {
|
|
81
|
+
this.initialValues = values;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
76
84
|
getAnimationAndConfig() {
|
|
77
85
|
const duration = this.durationV;
|
|
78
86
|
const easing = this.easingV;
|
|
@@ -109,7 +109,8 @@ export class Keyframe {
|
|
|
109
109
|
if (styleProp === 'transform') {
|
|
110
110
|
(_a = initialValues[styleProp]) === null || _a === void 0 ? void 0 : _a.forEach((transformStyle, index) => {
|
|
111
111
|
Object.keys(transformStyle).forEach((transformProp) => {
|
|
112
|
-
parsedKeyframes[index.toString() + '_transform:' + transformProp] =
|
|
112
|
+
parsedKeyframes[index.toString() + '_transform:' + transformProp] =
|
|
113
|
+
[];
|
|
113
114
|
});
|
|
114
115
|
});
|
|
115
116
|
}
|
package/lib/{src/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.js
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withSequence, withTiming } from '../../animation';
|
|
2
2
|
import { Dimensions } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { ComplexAnimationBuilder } from '../animationBuilder/ComplexAnimationBuilder';
|
|
4
4
|
const { width, height } = Dimensions.get('window');
|
|
5
|
-
export class BounceIn extends
|
|
5
|
+
export class BounceIn extends ComplexAnimationBuilder {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.build = () => {
|
|
@@ -10,6 +10,7 @@ export class BounceIn extends BaseAnimationBuilder {
|
|
|
10
10
|
const delay = this.getDelay();
|
|
11
11
|
const duration = this.getDuration();
|
|
12
12
|
const callback = this.callbackV;
|
|
13
|
+
const initialValues = this.initialValues;
|
|
13
14
|
return () => {
|
|
14
15
|
'worklet';
|
|
15
16
|
return {
|
|
@@ -20,9 +21,7 @@ export class BounceIn extends BaseAnimationBuilder {
|
|
|
20
21
|
},
|
|
21
22
|
],
|
|
22
23
|
},
|
|
23
|
-
initialValues: {
|
|
24
|
-
transform: [{ scale: 0 }],
|
|
25
|
-
},
|
|
24
|
+
initialValues: Object.assign({ transform: [{ scale: 0 }] }, initialValues),
|
|
26
25
|
callback: callback,
|
|
27
26
|
};
|
|
28
27
|
};
|
|
@@ -39,7 +38,7 @@ export class BounceIn extends BaseAnimationBuilder {
|
|
|
39
38
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
export class BounceInDown extends
|
|
41
|
+
export class BounceInDown extends ComplexAnimationBuilder {
|
|
43
42
|
constructor() {
|
|
44
43
|
super(...arguments);
|
|
45
44
|
this.build = () => {
|
|
@@ -47,6 +46,7 @@ export class BounceInDown extends BaseAnimationBuilder {
|
|
|
47
46
|
const delay = this.getDelay();
|
|
48
47
|
const duration = this.getDuration();
|
|
49
48
|
const callback = this.callbackV;
|
|
49
|
+
const initialValues = this.initialValues;
|
|
50
50
|
return () => {
|
|
51
51
|
'worklet';
|
|
52
52
|
return {
|
|
@@ -57,13 +57,11 @@ export class BounceInDown extends BaseAnimationBuilder {
|
|
|
57
57
|
},
|
|
58
58
|
],
|
|
59
59
|
},
|
|
60
|
-
initialValues: {
|
|
61
|
-
transform: [
|
|
60
|
+
initialValues: Object.assign({ transform: [
|
|
62
61
|
{
|
|
63
62
|
translateY: height,
|
|
64
63
|
},
|
|
65
|
-
],
|
|
66
|
-
},
|
|
64
|
+
] }, initialValues),
|
|
67
65
|
callback: callback,
|
|
68
66
|
};
|
|
69
67
|
};
|
|
@@ -80,7 +78,7 @@ export class BounceInDown extends BaseAnimationBuilder {
|
|
|
80
78
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
81
79
|
}
|
|
82
80
|
}
|
|
83
|
-
export class BounceInUp extends
|
|
81
|
+
export class BounceInUp extends ComplexAnimationBuilder {
|
|
84
82
|
constructor() {
|
|
85
83
|
super(...arguments);
|
|
86
84
|
this.build = () => {
|
|
@@ -88,6 +86,7 @@ export class BounceInUp extends BaseAnimationBuilder {
|
|
|
88
86
|
const delay = this.getDelay();
|
|
89
87
|
const duration = this.getDuration();
|
|
90
88
|
const callback = this.callbackV;
|
|
89
|
+
const initialValues = this.initialValues;
|
|
91
90
|
return () => {
|
|
92
91
|
'worklet';
|
|
93
92
|
return {
|
|
@@ -98,9 +97,7 @@ export class BounceInUp extends BaseAnimationBuilder {
|
|
|
98
97
|
},
|
|
99
98
|
],
|
|
100
99
|
},
|
|
101
|
-
initialValues: {
|
|
102
|
-
transform: [{ translateY: -height }],
|
|
103
|
-
},
|
|
100
|
+
initialValues: Object.assign({ transform: [{ translateY: -height }] }, initialValues),
|
|
104
101
|
callback: callback,
|
|
105
102
|
};
|
|
106
103
|
};
|
|
@@ -117,7 +114,7 @@ export class BounceInUp extends BaseAnimationBuilder {
|
|
|
117
114
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
118
115
|
}
|
|
119
116
|
}
|
|
120
|
-
export class BounceInLeft extends
|
|
117
|
+
export class BounceInLeft extends ComplexAnimationBuilder {
|
|
121
118
|
constructor() {
|
|
122
119
|
super(...arguments);
|
|
123
120
|
this.build = () => {
|
|
@@ -125,6 +122,7 @@ export class BounceInLeft extends BaseAnimationBuilder {
|
|
|
125
122
|
const delay = this.getDelay();
|
|
126
123
|
const duration = this.getDuration();
|
|
127
124
|
const callback = this.callbackV;
|
|
125
|
+
const initialValues = this.initialValues;
|
|
128
126
|
return () => {
|
|
129
127
|
'worklet';
|
|
130
128
|
return {
|
|
@@ -135,9 +133,7 @@ export class BounceInLeft extends BaseAnimationBuilder {
|
|
|
135
133
|
},
|
|
136
134
|
],
|
|
137
135
|
},
|
|
138
|
-
initialValues: {
|
|
139
|
-
transform: [{ translateX: -width }],
|
|
140
|
-
},
|
|
136
|
+
initialValues: Object.assign({ transform: [{ translateX: -width }] }, initialValues),
|
|
141
137
|
callback: callback,
|
|
142
138
|
};
|
|
143
139
|
};
|
|
@@ -154,7 +150,7 @@ export class BounceInLeft extends BaseAnimationBuilder {
|
|
|
154
150
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
155
151
|
}
|
|
156
152
|
}
|
|
157
|
-
export class BounceInRight extends
|
|
153
|
+
export class BounceInRight extends ComplexAnimationBuilder {
|
|
158
154
|
constructor() {
|
|
159
155
|
super(...arguments);
|
|
160
156
|
this.build = () => {
|
|
@@ -162,6 +158,7 @@ export class BounceInRight extends BaseAnimationBuilder {
|
|
|
162
158
|
const delay = this.getDelay();
|
|
163
159
|
const duration = this.getDuration();
|
|
164
160
|
const callback = this.callbackV;
|
|
161
|
+
const initialValues = this.initialValues;
|
|
165
162
|
return () => {
|
|
166
163
|
'worklet';
|
|
167
164
|
return {
|
|
@@ -172,9 +169,7 @@ export class BounceInRight extends BaseAnimationBuilder {
|
|
|
172
169
|
},
|
|
173
170
|
],
|
|
174
171
|
},
|
|
175
|
-
initialValues: {
|
|
176
|
-
transform: [{ translateX: width }],
|
|
177
|
-
},
|
|
172
|
+
initialValues: Object.assign({ transform: [{ translateX: width }] }, initialValues),
|
|
178
173
|
callback: callback,
|
|
179
174
|
};
|
|
180
175
|
};
|
|
@@ -191,7 +186,7 @@ export class BounceInRight extends BaseAnimationBuilder {
|
|
|
191
186
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
192
187
|
}
|
|
193
188
|
}
|
|
194
|
-
export class BounceOut extends
|
|
189
|
+
export class BounceOut extends ComplexAnimationBuilder {
|
|
195
190
|
constructor() {
|
|
196
191
|
super(...arguments);
|
|
197
192
|
this.build = () => {
|
|
@@ -199,6 +194,7 @@ export class BounceOut extends BaseAnimationBuilder {
|
|
|
199
194
|
const delay = this.getDelay();
|
|
200
195
|
const duration = this.getDuration();
|
|
201
196
|
const callback = this.callbackV;
|
|
197
|
+
const initialValues = this.initialValues;
|
|
202
198
|
return () => {
|
|
203
199
|
'worklet';
|
|
204
200
|
return {
|
|
@@ -209,9 +205,7 @@ export class BounceOut extends BaseAnimationBuilder {
|
|
|
209
205
|
},
|
|
210
206
|
],
|
|
211
207
|
},
|
|
212
|
-
initialValues: {
|
|
213
|
-
transform: [{ scale: 1 }],
|
|
214
|
-
},
|
|
208
|
+
initialValues: Object.assign({ transform: [{ scale: 1 }] }, initialValues),
|
|
215
209
|
callback: callback,
|
|
216
210
|
};
|
|
217
211
|
};
|
|
@@ -228,7 +222,7 @@ export class BounceOut extends BaseAnimationBuilder {
|
|
|
228
222
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
|
-
export class BounceOutDown extends
|
|
225
|
+
export class BounceOutDown extends ComplexAnimationBuilder {
|
|
232
226
|
constructor() {
|
|
233
227
|
super(...arguments);
|
|
234
228
|
this.build = () => {
|
|
@@ -236,6 +230,7 @@ export class BounceOutDown extends BaseAnimationBuilder {
|
|
|
236
230
|
const delay = this.getDelay();
|
|
237
231
|
const duration = this.getDuration();
|
|
238
232
|
const callback = this.callbackV;
|
|
233
|
+
const initialValues = this.initialValues;
|
|
239
234
|
return () => {
|
|
240
235
|
'worklet';
|
|
241
236
|
return {
|
|
@@ -248,9 +243,7 @@ export class BounceOutDown extends BaseAnimationBuilder {
|
|
|
248
243
|
},
|
|
249
244
|
],
|
|
250
245
|
},
|
|
251
|
-
initialValues: {
|
|
252
|
-
transform: [{ translateY: 0 }],
|
|
253
|
-
},
|
|
246
|
+
initialValues: Object.assign({ transform: [{ translateY: 0 }] }, initialValues),
|
|
254
247
|
callback: callback,
|
|
255
248
|
};
|
|
256
249
|
};
|
|
@@ -267,7 +260,7 @@ export class BounceOutDown extends BaseAnimationBuilder {
|
|
|
267
260
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
268
261
|
}
|
|
269
262
|
}
|
|
270
|
-
export class BounceOutUp extends
|
|
263
|
+
export class BounceOutUp extends ComplexAnimationBuilder {
|
|
271
264
|
constructor() {
|
|
272
265
|
super(...arguments);
|
|
273
266
|
this.build = () => {
|
|
@@ -275,6 +268,7 @@ export class BounceOutUp extends BaseAnimationBuilder {
|
|
|
275
268
|
const delay = this.getDelay();
|
|
276
269
|
const duration = this.getDuration();
|
|
277
270
|
const callback = this.callbackV;
|
|
271
|
+
const initialValues = this.initialValues;
|
|
278
272
|
return () => {
|
|
279
273
|
'worklet';
|
|
280
274
|
return {
|
|
@@ -287,9 +281,7 @@ export class BounceOutUp extends BaseAnimationBuilder {
|
|
|
287
281
|
},
|
|
288
282
|
],
|
|
289
283
|
},
|
|
290
|
-
initialValues: {
|
|
291
|
-
transform: [{ translateY: 0 }],
|
|
292
|
-
},
|
|
284
|
+
initialValues: Object.assign({ transform: [{ translateY: 0 }] }, initialValues),
|
|
293
285
|
callback: callback,
|
|
294
286
|
};
|
|
295
287
|
};
|
|
@@ -306,7 +298,7 @@ export class BounceOutUp extends BaseAnimationBuilder {
|
|
|
306
298
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
307
299
|
}
|
|
308
300
|
}
|
|
309
|
-
export class BounceOutLeft extends
|
|
301
|
+
export class BounceOutLeft extends ComplexAnimationBuilder {
|
|
310
302
|
constructor() {
|
|
311
303
|
super(...arguments);
|
|
312
304
|
this.build = () => {
|
|
@@ -314,6 +306,7 @@ export class BounceOutLeft extends BaseAnimationBuilder {
|
|
|
314
306
|
const delay = this.getDelay();
|
|
315
307
|
const duration = this.getDuration();
|
|
316
308
|
const callback = this.callbackV;
|
|
309
|
+
const initialValues = this.initialValues;
|
|
317
310
|
return () => {
|
|
318
311
|
'worklet';
|
|
319
312
|
return {
|
|
@@ -326,9 +319,7 @@ export class BounceOutLeft extends BaseAnimationBuilder {
|
|
|
326
319
|
},
|
|
327
320
|
],
|
|
328
321
|
},
|
|
329
|
-
initialValues: {
|
|
330
|
-
transform: [{ translateX: 0 }],
|
|
331
|
-
},
|
|
322
|
+
initialValues: Object.assign({ transform: [{ translateX: 0 }] }, initialValues),
|
|
332
323
|
callback: callback,
|
|
333
324
|
};
|
|
334
325
|
};
|
|
@@ -345,7 +336,7 @@ export class BounceOutLeft extends BaseAnimationBuilder {
|
|
|
345
336
|
return (_a = this.durationV) !== null && _a !== void 0 ? _a : 600;
|
|
346
337
|
}
|
|
347
338
|
}
|
|
348
|
-
export class BounceOutRight extends
|
|
339
|
+
export class BounceOutRight extends ComplexAnimationBuilder {
|
|
349
340
|
constructor() {
|
|
350
341
|
super(...arguments);
|
|
351
342
|
this.build = () => {
|
|
@@ -353,6 +344,7 @@ export class BounceOutRight extends BaseAnimationBuilder {
|
|
|
353
344
|
const delay = this.getDelay();
|
|
354
345
|
const duration = this.getDuration();
|
|
355
346
|
const callback = this.callbackV;
|
|
347
|
+
const initialValues = this.initialValues;
|
|
356
348
|
return () => {
|
|
357
349
|
'worklet';
|
|
358
350
|
return {
|
|
@@ -365,9 +357,7 @@ export class BounceOutRight extends BaseAnimationBuilder {
|
|
|
365
357
|
},
|
|
366
358
|
],
|
|
367
359
|
},
|
|
368
|
-
initialValues: {
|
|
369
|
-
transform: [{ translateX: 0 }],
|
|
370
|
-
},
|
|
360
|
+
initialValues: Object.assign({ transform: [{ translateX: 0 }] }, initialValues),
|
|
371
361
|
callback: callback,
|
|
372
362
|
};
|
|
373
363
|
};
|
|
File without changes
|
|
@@ -6,6 +6,7 @@ export class FadeIn extends ComplexAnimationBuilder {
|
|
|
6
6
|
const delayFunction = this.getDelayFunction();
|
|
7
7
|
const [animation, config] = this.getAnimationAndConfig();
|
|
8
8
|
const callback = this.callbackV;
|
|
9
|
+
const initialValues = this.initialValues;
|
|
9
10
|
const delay = this.getDelay();
|
|
10
11
|
return (_) => {
|
|
11
12
|
'worklet';
|
|
@@ -13,9 +14,7 @@ export class FadeIn extends ComplexAnimationBuilder {
|
|
|
13
14
|
animations: {
|
|
14
15
|
opacity: delayFunction(delay, animation(1, config)),
|
|
15
16
|
},
|
|
16
|
-
initialValues: {
|
|
17
|
-
opacity: 0,
|
|
18
|
-
},
|
|
17
|
+
initialValues: Object.assign({ opacity: 0 }, initialValues),
|
|
19
18
|
callback: callback,
|
|
20
19
|
};
|
|
21
20
|
};
|
|
@@ -32,6 +31,7 @@ export class FadeInRight extends ComplexAnimationBuilder {
|
|
|
32
31
|
const delayFunction = this.getDelayFunction();
|
|
33
32
|
const [animation, config] = this.getAnimationAndConfig();
|
|
34
33
|
const callback = this.callbackV;
|
|
34
|
+
const initialValues = this.initialValues;
|
|
35
35
|
const delay = this.getDelay();
|
|
36
36
|
return () => {
|
|
37
37
|
'worklet';
|
|
@@ -42,10 +42,7 @@ export class FadeInRight extends ComplexAnimationBuilder {
|
|
|
42
42
|
{ translateX: delayFunction(delay, animation(0, config)) },
|
|
43
43
|
],
|
|
44
44
|
},
|
|
45
|
-
initialValues: {
|
|
46
|
-
opacity: 0,
|
|
47
|
-
transform: [{ translateX: 25 }],
|
|
48
|
-
},
|
|
45
|
+
initialValues: Object.assign({ opacity: 0, transform: [{ translateX: 25 }] }, initialValues),
|
|
49
46
|
callback: callback,
|
|
50
47
|
};
|
|
51
48
|
};
|
|
@@ -62,6 +59,7 @@ export class FadeInLeft extends ComplexAnimationBuilder {
|
|
|
62
59
|
const delayFunction = this.getDelayFunction();
|
|
63
60
|
const [animation, config] = this.getAnimationAndConfig();
|
|
64
61
|
const callback = this.callbackV;
|
|
62
|
+
const initialValues = this.initialValues;
|
|
65
63
|
const delay = this.getDelay();
|
|
66
64
|
return () => {
|
|
67
65
|
'worklet';
|
|
@@ -72,10 +70,7 @@ export class FadeInLeft extends ComplexAnimationBuilder {
|
|
|
72
70
|
{ translateX: delayFunction(delay, animation(0, config)) },
|
|
73
71
|
],
|
|
74
72
|
},
|
|
75
|
-
initialValues: {
|
|
76
|
-
opacity: 0,
|
|
77
|
-
transform: [{ translateX: -25 }],
|
|
78
|
-
},
|
|
73
|
+
initialValues: Object.assign({ opacity: 0, transform: [{ translateX: -25 }] }, initialValues),
|
|
79
74
|
callback: callback,
|
|
80
75
|
};
|
|
81
76
|
};
|
|
@@ -92,6 +87,7 @@ export class FadeInUp extends ComplexAnimationBuilder {
|
|
|
92
87
|
const delayFunction = this.getDelayFunction();
|
|
93
88
|
const [animation, config] = this.getAnimationAndConfig();
|
|
94
89
|
const callback = this.callbackV;
|
|
90
|
+
const initialValues = this.initialValues;
|
|
95
91
|
const delay = this.getDelay();
|
|
96
92
|
return () => {
|
|
97
93
|
'worklet';
|
|
@@ -102,10 +98,7 @@ export class FadeInUp extends ComplexAnimationBuilder {
|
|
|
102
98
|
{ translateY: delayFunction(delay, animation(0, config)) },
|
|
103
99
|
],
|
|
104
100
|
},
|
|
105
|
-
initialValues: {
|
|
106
|
-
opacity: 0,
|
|
107
|
-
transform: [{ translateY: -25 }],
|
|
108
|
-
},
|
|
101
|
+
initialValues: Object.assign({ opacity: 0, transform: [{ translateY: -25 }] }, initialValues),
|
|
109
102
|
callback: callback,
|
|
110
103
|
};
|
|
111
104
|
};
|
|
@@ -122,6 +115,7 @@ export class FadeInDown extends ComplexAnimationBuilder {
|
|
|
122
115
|
const delayFunction = this.getDelayFunction();
|
|
123
116
|
const [animation, config] = this.getAnimationAndConfig();
|
|
124
117
|
const callback = this.callbackV;
|
|
118
|
+
const initialValues = this.initialValues;
|
|
125
119
|
const delay = this.getDelay();
|
|
126
120
|
return () => {
|
|
127
121
|
'worklet';
|
|
@@ -132,10 +126,7 @@ export class FadeInDown extends ComplexAnimationBuilder {
|
|
|
132
126
|
{ translateY: delayFunction(delay, animation(0, config)) },
|
|
133
127
|
],
|
|
134
128
|
},
|
|
135
|
-
initialValues: {
|
|
136
|
-
opacity: 0,
|
|
137
|
-
transform: [{ translateY: 25 }],
|
|
138
|
-
},
|
|
129
|
+
initialValues: Object.assign({ opacity: 0, transform: [{ translateY: 25 }] }, initialValues),
|
|
139
130
|
callback: callback,
|
|
140
131
|
};
|
|
141
132
|
};
|
|
@@ -152,6 +143,7 @@ export class FadeOut extends ComplexAnimationBuilder {
|
|
|
152
143
|
const delayFunction = this.getDelayFunction();
|
|
153
144
|
const [animation, config] = this.getAnimationAndConfig();
|
|
154
145
|
const callback = this.callbackV;
|
|
146
|
+
const initialValues = this.initialValues;
|
|
155
147
|
const delay = this.getDelay();
|
|
156
148
|
return (_) => {
|
|
157
149
|
'worklet';
|
|
@@ -159,9 +151,7 @@ export class FadeOut extends ComplexAnimationBuilder {
|
|
|
159
151
|
animations: {
|
|
160
152
|
opacity: delayFunction(delay, animation(0, config)),
|
|
161
153
|
},
|
|
162
|
-
initialValues: {
|
|
163
|
-
opacity: 1,
|
|
164
|
-
},
|
|
154
|
+
initialValues: Object.assign({ opacity: 1 }, initialValues),
|
|
165
155
|
callback: callback,
|
|
166
156
|
};
|
|
167
157
|
};
|
|
@@ -178,6 +168,7 @@ export class FadeOutRight extends ComplexAnimationBuilder {
|
|
|
178
168
|
const delayFunction = this.getDelayFunction();
|
|
179
169
|
const [animation, config] = this.getAnimationAndConfig();
|
|
180
170
|
const callback = this.callbackV;
|
|
171
|
+
const initialValues = this.initialValues;
|
|
181
172
|
const delay = this.getDelay();
|
|
182
173
|
return () => {
|
|
183
174
|
'worklet';
|
|
@@ -188,10 +179,7 @@ export class FadeOutRight extends ComplexAnimationBuilder {
|
|
|
188
179
|
{ translateX: delayFunction(delay, animation(25, config)) },
|
|
189
180
|
],
|
|
190
181
|
},
|
|
191
|
-
initialValues: {
|
|
192
|
-
opacity: 1,
|
|
193
|
-
transform: [{ translateX: 0 }],
|
|
194
|
-
},
|
|
182
|
+
initialValues: Object.assign({ opacity: 1, transform: [{ translateX: 0 }] }, initialValues),
|
|
195
183
|
callback: callback,
|
|
196
184
|
};
|
|
197
185
|
};
|
|
@@ -208,6 +196,7 @@ export class FadeOutLeft extends ComplexAnimationBuilder {
|
|
|
208
196
|
const delayFunction = this.getDelayFunction();
|
|
209
197
|
const [animation, config] = this.getAnimationAndConfig();
|
|
210
198
|
const callback = this.callbackV;
|
|
199
|
+
const initialValues = this.initialValues;
|
|
211
200
|
const delay = this.getDelay();
|
|
212
201
|
return () => {
|
|
213
202
|
'worklet';
|
|
@@ -218,10 +207,7 @@ export class FadeOutLeft extends ComplexAnimationBuilder {
|
|
|
218
207
|
{ translateX: delayFunction(delay, animation(-25, config)) },
|
|
219
208
|
],
|
|
220
209
|
},
|
|
221
|
-
initialValues: {
|
|
222
|
-
opacity: 1,
|
|
223
|
-
transform: [{ translateX: 0 }],
|
|
224
|
-
},
|
|
210
|
+
initialValues: Object.assign({ opacity: 1, transform: [{ translateX: 0 }] }, initialValues),
|
|
225
211
|
callback: callback,
|
|
226
212
|
};
|
|
227
213
|
};
|
|
@@ -238,6 +224,7 @@ export class FadeOutUp extends ComplexAnimationBuilder {
|
|
|
238
224
|
const delayFunction = this.getDelayFunction();
|
|
239
225
|
const [animation, config] = this.getAnimationAndConfig();
|
|
240
226
|
const callback = this.callbackV;
|
|
227
|
+
const initialValues = this.initialValues;
|
|
241
228
|
const delay = this.getDelay();
|
|
242
229
|
return () => {
|
|
243
230
|
'worklet';
|
|
@@ -248,10 +235,7 @@ export class FadeOutUp extends ComplexAnimationBuilder {
|
|
|
248
235
|
{ translateY: delayFunction(delay, animation(-25, config)) },
|
|
249
236
|
],
|
|
250
237
|
},
|
|
251
|
-
initialValues: {
|
|
252
|
-
opacity: 1,
|
|
253
|
-
transform: [{ translateY: 0 }],
|
|
254
|
-
},
|
|
238
|
+
initialValues: Object.assign({ opacity: 1, transform: [{ translateY: 0 }] }, initialValues),
|
|
255
239
|
callback: callback,
|
|
256
240
|
};
|
|
257
241
|
};
|
|
@@ -268,6 +252,7 @@ export class FadeOutDown extends ComplexAnimationBuilder {
|
|
|
268
252
|
const delayFunction = this.getDelayFunction();
|
|
269
253
|
const [animation, config] = this.getAnimationAndConfig();
|
|
270
254
|
const callback = this.callbackV;
|
|
255
|
+
const initialValues = this.initialValues;
|
|
271
256
|
const delay = this.getDelay();
|
|
272
257
|
return () => {
|
|
273
258
|
'worklet';
|
|
@@ -278,10 +263,7 @@ export class FadeOutDown extends ComplexAnimationBuilder {
|
|
|
278
263
|
{ translateY: delayFunction(delay, animation(25, config)) },
|
|
279
264
|
],
|
|
280
265
|
},
|
|
281
|
-
initialValues: {
|
|
282
|
-
opacity: 1,
|
|
283
|
-
transform: [{ translateY: 0 }],
|
|
284
|
-
},
|
|
266
|
+
initialValues: Object.assign({ opacity: 1, transform: [{ translateY: 0 }] }, initialValues),
|
|
285
267
|
callback: callback,
|
|
286
268
|
};
|
|
287
269
|
};
|