react-native-reanimated 2.3.0-beta.3 → 2.3.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/NativeModules/NativeReanimatedModule.cpp +9 -0
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +13 -0
- package/Common/cpp/Tools/FeaturesConfig.cpp +5 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +38 -2
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +3 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +5 -0
- package/Common/cpp/headers/Tools/FeaturesConfig.h +19 -0
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +2 -0
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +8 -7
- package/README.md +1 -1
- package/RNReanimated.podspec +20 -3
- package/android/build.gradle +31 -5
- package/android/expo/linking.gradle +46 -0
- package/android/expo/src/main/java/com/swmansion/reanimated/EXReanimatedAdapter.java +12 -0
- package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java +26 -0
- 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/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/expo-module.config.json +3 -0
- package/ios/LayoutReanimation/REAAnimationsManager.m +64 -19
- package/ios/LayoutReanimation/REAUIManager.mm +63 -18
- package/ios/Nodes/REAPropsNode.m +1 -1
- package/ios/REAEventDispatcher.m +1 -1
- package/ios/REAModule.h +0 -2
- package/ios/REAModule.m +0 -3
- package/ios/REANodesManager.m +1 -0
- package/ios/RNGestureHandlerStateManager.h +5 -0
- package/ios/native/NativeMethods.h +5 -0
- package/ios/native/NativeMethods.mm +8 -1
- package/ios/native/NativeProxy.h +1 -0
- package/ios/native/NativeProxy.mm +10 -2
- package/ios/native/REAInitializer.mm +7 -3
- package/lib/src/Animated.js +31 -0
- package/lib/{ConfigHelper.js → src/ConfigHelper.js} +0 -0
- package/lib/{ReanimatedEventEmitter.js → src/ReanimatedEventEmitter.js} +0 -0
- package/lib/{ReanimatedModule.js → src/ReanimatedModule.js} +0 -0
- package/lib/{ReanimatedModule.macos.js → src/ReanimatedModule.macos.js} +0 -0
- package/lib/{ReanimatedModule.native.js → src/ReanimatedModule.native.js} +0 -0
- package/lib/{ReanimatedModule.windows.js → src/ReanimatedModule.windows.js} +0 -0
- package/lib/{ReanimatedModuleCompat.js → src/ReanimatedModuleCompat.js} +0 -0
- package/lib/{__mocks__ → src/__mocks__}/ReanimatedEventEmitter.js +0 -0
- package/lib/{__mocks__ → src/__mocks__}/ReanimatedModule.native.js +0 -0
- package/lib/{createAnimatedComponent.js → src/createAnimatedComponent.js} +55 -37
- package/lib/src/index.js +31 -0
- package/lib/{reanimated1 → src/reanimated1}/Easing.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/SpringConfig.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/Transitioning.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/Animation.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/SpringUtils.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/backwardCompatibleAnimWrapper.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/decay.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/spring.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/animations/timing.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/base.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedAlways.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedBezier.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedBlock.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCall.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCallFunc.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedClock.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedClockTest.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCode.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedConcat.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCond.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedDebug.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedEvent.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedFunction.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedNode.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedOperator.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedParam.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedProps.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedSet.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStartClock.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStopClock.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStyle.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedTransform.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/AnimatedValue.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/Core.test.js +1 -1
- package/lib/{reanimated1 → src/reanimated1}/core/InternalAnimatedValue.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/__mocks__/AnimatedProps.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/core/createEventObjectProxyPolyfill.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/__mocks__/evaluateOnce.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/acc.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/color.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/diff.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/diffClamp.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/evaluateOnce.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/index.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/interpolate.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/interpolateColors.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/onChange.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/derived/useCode.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/index.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/operators.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/useValue.js +0 -0
- package/lib/{reanimated1 → src/reanimated1}/val.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/Bezier.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/Colors.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/Easing.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/NativeMethods.js +7 -0
- package/lib/{reanimated2 → src/reanimated2}/NativeReanimated/NativeReanimated.js +3 -0
- package/lib/{reanimated2 → src/reanimated2}/NativeReanimated/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/PlatformChecker.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/PropAdapters.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/UpdateProps.js +1 -1
- package/lib/{reanimated2 → src/reanimated2}/ViewDescriptorsSet.js +4 -2
- package/lib/{reanimated2 → src/reanimated2}/WorkletEventHandler.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/__mocks__/MutableValue.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/__mocks__/NativeReanimated.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/__mocks__/NativeReanimated.native.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/commonTypes.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/decay.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/delay.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/repeat.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/sequence.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/spring.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/styleAnimation.js +5 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/timing.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/animation/util.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/commonTypes.js +0 -0
- package/lib/src/reanimated2/component/FlatList.js +30 -0
- package/lib/src/reanimated2/component/WrappedComponents.js +9 -0
- package/lib/src/reanimated2/component/index.js +4 -0
- package/lib/{reanimated2 → src/reanimated2}/core.js +27 -3
- package/lib/{reanimated2 → src/reanimated2}/globals.d.ts +5 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/Hooks.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/commonTypes.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedGestureHandler.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedReaction.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedRef.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedScrollHandler.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedStyle.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useDerivedValue.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/useSharedValue.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/hook/utils.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/interpolation.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/jestUtils.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/js-reanimated/JSReanimated.js +3 -0
- package/lib/{reanimated2 → src/reanimated2}/js-reanimated/Mapper.js +4 -1
- package/lib/{reanimated2 → src/reanimated2}/js-reanimated/MapperRegistry.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/js-reanimated/MutableValue.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/js-reanimated/index.js +3 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/LayoutAnimationRepository.js +14 -5
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/Keyframe.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/commonTypes.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Bounce.js +0 -0
- package/lib/src/reanimated2/layoutReanimation/defaultAnimations/Default.js +36 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Fade.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Flip.js +8 -8
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Roll.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Rotate.js +16 -16
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Slide.js +16 -16
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Stretch.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Zoom.js +4 -4
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.js +20 -8
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.js +3 -3
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.js +8 -8
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.js +10 -10
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.js +8 -8
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.js +8 -8
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/index.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/mock.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/platform-specific/RNRenderer.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/platform-specific/RNRenderer.web.js +0 -0
- package/lib/{reanimated2 → src/reanimated2}/utils.js +0 -0
- package/lib/{setAndForwardRef.js → src/setAndForwardRef.js} +0 -0
- package/mock.js +1 -1
- package/package.json +4 -3
- package/plugin.js +10 -3
- package/react-native-reanimated.d.ts +40 -23
- package/src/Animated.js +11 -5
- package/src/createAnimatedComponent.tsx +86 -43
- package/src/reanimated1/core/Core.test.js +1 -1
- package/src/reanimated2/NativeMethods.ts +13 -1
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +4 -0
- package/src/reanimated2/UpdateProps.ts +1 -1
- package/src/reanimated2/ViewDescriptorsSet.ts +6 -2
- package/src/reanimated2/animation/styleAnimation.ts +9 -0
- package/src/reanimated2/component/FlatList.tsx +44 -0
- package/src/reanimated2/component/WrappedComponents.ts +11 -0
- package/src/reanimated2/component/index.ts +9 -0
- package/src/reanimated2/core.ts +38 -3
- package/src/reanimated2/globals.d.ts +5 -0
- package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -0
- package/src/reanimated2/js-reanimated/Mapper.ts +3 -1
- package/src/reanimated2/js-reanimated/index.ts +5 -0
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +18 -5
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +39 -20
- package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +5 -1
- package/src/reanimated2/layoutReanimation/defaultAnimations/Default.ts +21 -15
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +29 -24
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +61 -34
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +49 -34
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +17 -12
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +20 -8
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +9 -9
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +8 -8
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +20 -14
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +14 -8
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +24 -12
- package/lib/Animated.js +0 -25
- package/lib/index.js +0 -25
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +0 -36
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LayoutAnimationFunction,
|
|
3
|
-
|
|
3
|
+
EntryAnimationsValues,
|
|
4
|
+
ExitAnimationsValues,
|
|
5
|
+
AnimationConfigFunction,
|
|
4
6
|
} from '../animationBuilder/commonTypes';
|
|
5
7
|
|
|
6
8
|
export const DefaultLayout: LayoutAnimationFunction = (values) => {
|
|
7
9
|
'worklet';
|
|
8
10
|
return {
|
|
9
11
|
initialValues: {
|
|
10
|
-
originX: values.
|
|
11
|
-
originY: values.
|
|
12
|
-
width: values.
|
|
13
|
-
height: values.
|
|
12
|
+
originX: values.targetOriginX,
|
|
13
|
+
originY: values.targetOriginY,
|
|
14
|
+
width: values.targetWidth,
|
|
15
|
+
height: values.targetHeight,
|
|
14
16
|
},
|
|
15
17
|
animations: {},
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
|
|
19
|
-
export const DefaultEntering:
|
|
21
|
+
export const DefaultEntering: AnimationConfigFunction<EntryAnimationsValues> = (
|
|
22
|
+
values
|
|
23
|
+
) => {
|
|
20
24
|
'worklet';
|
|
21
25
|
return {
|
|
22
26
|
initialValues: {
|
|
23
|
-
originX:
|
|
24
|
-
originY:
|
|
25
|
-
width:
|
|
26
|
-
height:
|
|
27
|
+
originX: values.targetOriginX,
|
|
28
|
+
originY: values.targetOriginY,
|
|
29
|
+
width: values.targetWidth,
|
|
30
|
+
height: values.targetHeight,
|
|
27
31
|
},
|
|
28
32
|
animations: {},
|
|
29
33
|
};
|
|
30
34
|
};
|
|
31
35
|
|
|
32
|
-
export const DefaultExiting:
|
|
36
|
+
export const DefaultExiting: AnimationConfigFunction<ExitAnimationsValues> = (
|
|
37
|
+
values
|
|
38
|
+
) => {
|
|
33
39
|
'worklet';
|
|
34
40
|
return {
|
|
35
41
|
initialValues: {
|
|
36
|
-
originX:
|
|
37
|
-
originY:
|
|
38
|
-
width:
|
|
39
|
-
height:
|
|
42
|
+
originX: values.currentOriginX,
|
|
43
|
+
originY: values.currentOriginY,
|
|
44
|
+
width: values.currentWidth,
|
|
45
|
+
height: values.currentHeight,
|
|
40
46
|
},
|
|
41
47
|
animations: {},
|
|
42
48
|
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IEntryExitAnimationBuilder,
|
|
3
3
|
EntryExitAnimationFunction,
|
|
4
|
+
EntryAnimationsValues,
|
|
5
|
+
ExitAnimationsValues,
|
|
6
|
+
AnimationConfigFunction,
|
|
7
|
+
IEntryAnimationBuilder,
|
|
8
|
+
IExitAnimationBuilder,
|
|
4
9
|
} from '../animationBuilder/commonTypes';
|
|
5
10
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
6
11
|
|
|
7
12
|
export class FlipInXUp
|
|
8
13
|
extends ComplexAnimationBuilder
|
|
9
|
-
implements
|
|
14
|
+
implements IEntryAnimationBuilder {
|
|
10
15
|
static createInstance(): FlipInXUp {
|
|
11
16
|
return new FlipInXUp();
|
|
12
17
|
}
|
|
13
18
|
|
|
14
|
-
build = ():
|
|
19
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
15
20
|
const delayFunction = this.getDelayFunction();
|
|
16
21
|
const [animation, config] = this.getAnimationAndConfig();
|
|
17
22
|
const delay = this.getDelay();
|
|
@@ -24,7 +29,7 @@ export class FlipInXUp
|
|
|
24
29
|
transform: [
|
|
25
30
|
{ perspective: 500 },
|
|
26
31
|
{ rotateX: '90deg' },
|
|
27
|
-
{ translateY: -targetValues.
|
|
32
|
+
{ translateY: -targetValues.targetHeight },
|
|
28
33
|
],
|
|
29
34
|
},
|
|
30
35
|
animations: {
|
|
@@ -42,12 +47,12 @@ export class FlipInXUp
|
|
|
42
47
|
|
|
43
48
|
export class FlipInYLeft
|
|
44
49
|
extends ComplexAnimationBuilder
|
|
45
|
-
implements
|
|
50
|
+
implements IEntryAnimationBuilder {
|
|
46
51
|
static createInstance(): FlipInYLeft {
|
|
47
52
|
return new FlipInYLeft();
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
build = ():
|
|
55
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
51
56
|
const delayFunction = this.getDelayFunction();
|
|
52
57
|
const [animation, config] = this.getAnimationAndConfig();
|
|
53
58
|
const delay = this.getDelay();
|
|
@@ -60,7 +65,7 @@ export class FlipInYLeft
|
|
|
60
65
|
transform: [
|
|
61
66
|
{ perspective: 500 },
|
|
62
67
|
{ rotateY: '-90deg' },
|
|
63
|
-
{ translateX: -targetValues.
|
|
68
|
+
{ translateX: -targetValues.targetWidth },
|
|
64
69
|
],
|
|
65
70
|
},
|
|
66
71
|
animations: {
|
|
@@ -78,12 +83,12 @@ export class FlipInYLeft
|
|
|
78
83
|
|
|
79
84
|
export class FlipInXDown
|
|
80
85
|
extends ComplexAnimationBuilder
|
|
81
|
-
implements
|
|
86
|
+
implements IEntryAnimationBuilder {
|
|
82
87
|
static createInstance(): FlipInXDown {
|
|
83
88
|
return new FlipInXDown();
|
|
84
89
|
}
|
|
85
90
|
|
|
86
|
-
build = ():
|
|
91
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
87
92
|
const delayFunction = this.getDelayFunction();
|
|
88
93
|
const [animation, config] = this.getAnimationAndConfig();
|
|
89
94
|
const delay = this.getDelay();
|
|
@@ -96,7 +101,7 @@ export class FlipInXDown
|
|
|
96
101
|
transform: [
|
|
97
102
|
{ perspective: 500 },
|
|
98
103
|
{ rotateX: '-90deg' },
|
|
99
|
-
{ translateY: targetValues.
|
|
104
|
+
{ translateY: targetValues.targetHeight },
|
|
100
105
|
],
|
|
101
106
|
},
|
|
102
107
|
animations: {
|
|
@@ -114,12 +119,12 @@ export class FlipInXDown
|
|
|
114
119
|
|
|
115
120
|
export class FlipInYRight
|
|
116
121
|
extends ComplexAnimationBuilder
|
|
117
|
-
implements
|
|
122
|
+
implements IEntryAnimationBuilder {
|
|
118
123
|
static createInstance(): FlipInYRight {
|
|
119
124
|
return new FlipInYRight();
|
|
120
125
|
}
|
|
121
126
|
|
|
122
|
-
build = ():
|
|
127
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
123
128
|
const delayFunction = this.getDelayFunction();
|
|
124
129
|
const [animation, config] = this.getAnimationAndConfig();
|
|
125
130
|
const delay = this.getDelay();
|
|
@@ -132,7 +137,7 @@ export class FlipInYRight
|
|
|
132
137
|
transform: [
|
|
133
138
|
{ perspective: 500 },
|
|
134
139
|
{ rotateY: '90deg' },
|
|
135
|
-
{ translateX: targetValues.
|
|
140
|
+
{ translateX: targetValues.targetWidth },
|
|
136
141
|
],
|
|
137
142
|
},
|
|
138
143
|
animations: {
|
|
@@ -212,12 +217,12 @@ export class FlipInEasyY
|
|
|
212
217
|
|
|
213
218
|
export class FlipOutXUp
|
|
214
219
|
extends ComplexAnimationBuilder
|
|
215
|
-
implements
|
|
220
|
+
implements IExitAnimationBuilder {
|
|
216
221
|
static createInstance(): FlipOutXUp {
|
|
217
222
|
return new FlipOutXUp();
|
|
218
223
|
}
|
|
219
224
|
|
|
220
|
-
build = ():
|
|
225
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
221
226
|
const delayFunction = this.getDelayFunction();
|
|
222
227
|
const [animation, config] = this.getAnimationAndConfig();
|
|
223
228
|
const delay = this.getDelay();
|
|
@@ -240,7 +245,7 @@ export class FlipOutXUp
|
|
|
240
245
|
{
|
|
241
246
|
translateY: delayFunction(
|
|
242
247
|
delay,
|
|
243
|
-
animation(-targetValues.
|
|
248
|
+
animation(-targetValues.currentHeight, config)
|
|
244
249
|
),
|
|
245
250
|
},
|
|
246
251
|
],
|
|
@@ -253,12 +258,12 @@ export class FlipOutXUp
|
|
|
253
258
|
|
|
254
259
|
export class FlipOutYLeft
|
|
255
260
|
extends ComplexAnimationBuilder
|
|
256
|
-
implements
|
|
261
|
+
implements IExitAnimationBuilder {
|
|
257
262
|
static createInstance(): FlipOutYLeft {
|
|
258
263
|
return new FlipOutYLeft();
|
|
259
264
|
}
|
|
260
265
|
|
|
261
|
-
build = ():
|
|
266
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
262
267
|
const delayFunction = this.getDelayFunction();
|
|
263
268
|
const [animation, config] = this.getAnimationAndConfig();
|
|
264
269
|
const delay = this.getDelay();
|
|
@@ -281,7 +286,7 @@ export class FlipOutYLeft
|
|
|
281
286
|
{
|
|
282
287
|
translateX: delayFunction(
|
|
283
288
|
delay,
|
|
284
|
-
animation(-targetValues.
|
|
289
|
+
animation(-targetValues.currentWidth, config)
|
|
285
290
|
),
|
|
286
291
|
},
|
|
287
292
|
],
|
|
@@ -294,12 +299,12 @@ export class FlipOutYLeft
|
|
|
294
299
|
|
|
295
300
|
export class FlipOutXDown
|
|
296
301
|
extends ComplexAnimationBuilder
|
|
297
|
-
implements
|
|
302
|
+
implements IExitAnimationBuilder {
|
|
298
303
|
static createInstance(): FlipOutXDown {
|
|
299
304
|
return new FlipOutXDown();
|
|
300
305
|
}
|
|
301
306
|
|
|
302
|
-
build = ():
|
|
307
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
303
308
|
const delayFunction = this.getDelayFunction();
|
|
304
309
|
const [animation, config] = this.getAnimationAndConfig();
|
|
305
310
|
const delay = this.getDelay();
|
|
@@ -322,7 +327,7 @@ export class FlipOutXDown
|
|
|
322
327
|
{
|
|
323
328
|
translateY: delayFunction(
|
|
324
329
|
delay,
|
|
325
|
-
animation(targetValues.
|
|
330
|
+
animation(targetValues.currentHeight, config)
|
|
326
331
|
),
|
|
327
332
|
},
|
|
328
333
|
],
|
|
@@ -335,12 +340,12 @@ export class FlipOutXDown
|
|
|
335
340
|
|
|
336
341
|
export class FlipOutYRight
|
|
337
342
|
extends ComplexAnimationBuilder
|
|
338
|
-
implements
|
|
343
|
+
implements IExitAnimationBuilder {
|
|
339
344
|
static createInstance(): FlipOutYRight {
|
|
340
345
|
return new FlipOutYRight();
|
|
341
346
|
}
|
|
342
347
|
|
|
343
|
-
build = ():
|
|
348
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
344
349
|
const delayFunction = this.getDelayFunction();
|
|
345
350
|
const [animation, config] = this.getAnimationAndConfig();
|
|
346
351
|
const delay = this.getDelay();
|
|
@@ -363,7 +368,7 @@ export class FlipOutYRight
|
|
|
363
368
|
{
|
|
364
369
|
translateX: delayFunction(
|
|
365
370
|
delay,
|
|
366
|
-
animation(targetValues.
|
|
371
|
+
animation(targetValues.currentWidth, config)
|
|
367
372
|
),
|
|
368
373
|
},
|
|
369
374
|
],
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
EntryAnimationsValues,
|
|
4
|
+
ExitAnimationsValues,
|
|
5
|
+
AnimationConfigFunction,
|
|
6
|
+
IEntryAnimationBuilder,
|
|
7
|
+
IExitAnimationBuilder,
|
|
5
8
|
} from '../animationBuilder/commonTypes';
|
|
6
9
|
|
|
7
10
|
export class RotateInDownLeft
|
|
8
11
|
extends ComplexAnimationBuilder
|
|
9
|
-
implements
|
|
12
|
+
implements IEntryAnimationBuilder {
|
|
10
13
|
static createInstance(): RotateInDownLeft {
|
|
11
14
|
return new RotateInDownLeft();
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
build = ():
|
|
17
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
15
18
|
const delayFunction = this.getDelayFunction();
|
|
16
19
|
const [animation, config] = this.getAnimationAndConfig();
|
|
17
20
|
const delay = this.getDelay();
|
|
@@ -32,8 +35,8 @@ export class RotateInDownLeft
|
|
|
32
35
|
opacity: 0,
|
|
33
36
|
transform: [
|
|
34
37
|
{ rotate: '-90deg' },
|
|
35
|
-
{ translateX: values.
|
|
36
|
-
{ translateY: -(values.
|
|
38
|
+
{ translateX: values.targetWidth / 2 - values.targetHeight / 2 },
|
|
39
|
+
{ translateY: -(values.targetWidth / 2 - values.targetHeight / 2) },
|
|
37
40
|
],
|
|
38
41
|
},
|
|
39
42
|
callback: callback,
|
|
@@ -44,12 +47,12 @@ export class RotateInDownLeft
|
|
|
44
47
|
|
|
45
48
|
export class RotateInDownRight
|
|
46
49
|
extends ComplexAnimationBuilder
|
|
47
|
-
implements
|
|
50
|
+
implements IEntryAnimationBuilder {
|
|
48
51
|
static createInstance(): RotateInDownRight {
|
|
49
52
|
return new RotateInDownRight();
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
build = ():
|
|
55
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
53
56
|
const delayFunction = this.getDelayFunction();
|
|
54
57
|
const [animation, config] = this.getAnimationAndConfig();
|
|
55
58
|
const delay = this.getDelay();
|
|
@@ -70,8 +73,8 @@ export class RotateInDownRight
|
|
|
70
73
|
opacity: 0,
|
|
71
74
|
transform: [
|
|
72
75
|
{ rotate: '90deg' },
|
|
73
|
-
{ translateX: -(values.
|
|
74
|
-
{ translateY: -(values.
|
|
76
|
+
{ translateX: -(values.targetWidth / 2 - values.targetHeight / 2) },
|
|
77
|
+
{ translateY: -(values.targetWidth / 2 - values.targetHeight / 2) },
|
|
75
78
|
],
|
|
76
79
|
},
|
|
77
80
|
callback: callback,
|
|
@@ -82,12 +85,12 @@ export class RotateInDownRight
|
|
|
82
85
|
|
|
83
86
|
export class RotateInUpLeft
|
|
84
87
|
extends ComplexAnimationBuilder
|
|
85
|
-
implements
|
|
88
|
+
implements IEntryAnimationBuilder {
|
|
86
89
|
static createInstance(): RotateInUpLeft {
|
|
87
90
|
return new RotateInUpLeft();
|
|
88
91
|
}
|
|
89
92
|
|
|
90
|
-
build = ():
|
|
93
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
91
94
|
const delayFunction = this.getDelayFunction();
|
|
92
95
|
const [animation, config] = this.getAnimationAndConfig();
|
|
93
96
|
const delay = this.getDelay();
|
|
@@ -108,8 +111,8 @@ export class RotateInUpLeft
|
|
|
108
111
|
opacity: 0,
|
|
109
112
|
transform: [
|
|
110
113
|
{ rotate: '90deg' },
|
|
111
|
-
{ translateX: values.
|
|
112
|
-
{ translateY: values.
|
|
114
|
+
{ translateX: values.targetWidth / 2 - values.targetHeight / 2 },
|
|
115
|
+
{ translateY: values.targetWidth / 2 - values.targetHeight / 2 },
|
|
113
116
|
],
|
|
114
117
|
},
|
|
115
118
|
callback: callback,
|
|
@@ -120,12 +123,12 @@ export class RotateInUpLeft
|
|
|
120
123
|
|
|
121
124
|
export class RotateInUpRight
|
|
122
125
|
extends ComplexAnimationBuilder
|
|
123
|
-
implements
|
|
126
|
+
implements IEntryAnimationBuilder {
|
|
124
127
|
static createInstance(): RotateInUpRight {
|
|
125
128
|
return new RotateInUpRight();
|
|
126
129
|
}
|
|
127
130
|
|
|
128
|
-
build = ():
|
|
131
|
+
build = (): AnimationConfigFunction<EntryAnimationsValues> => {
|
|
129
132
|
const delayFunction = this.getDelayFunction();
|
|
130
133
|
const [animation, config] = this.getAnimationAndConfig();
|
|
131
134
|
const delay = this.getDelay();
|
|
@@ -146,8 +149,8 @@ export class RotateInUpRight
|
|
|
146
149
|
opacity: 0,
|
|
147
150
|
transform: [
|
|
148
151
|
{ rotate: '-90deg' },
|
|
149
|
-
{ translateX: -(values.
|
|
150
|
-
{ translateY: values.
|
|
152
|
+
{ translateX: -(values.targetWidth / 2 - values.targetHeight / 2) },
|
|
153
|
+
{ translateY: values.targetWidth / 2 - values.targetHeight / 2 },
|
|
151
154
|
],
|
|
152
155
|
},
|
|
153
156
|
callback: callback,
|
|
@@ -158,12 +161,12 @@ export class RotateInUpRight
|
|
|
158
161
|
|
|
159
162
|
export class RotateOutDownLeft
|
|
160
163
|
extends ComplexAnimationBuilder
|
|
161
|
-
implements
|
|
164
|
+
implements IExitAnimationBuilder {
|
|
162
165
|
static createInstance(): RotateOutDownLeft {
|
|
163
166
|
return new RotateOutDownLeft();
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
build = ():
|
|
169
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
167
170
|
const delayFunction = this.getDelayFunction();
|
|
168
171
|
const [animation, config] = this.getAnimationAndConfig();
|
|
169
172
|
const delay = this.getDelay();
|
|
@@ -179,13 +182,19 @@ export class RotateOutDownLeft
|
|
|
179
182
|
{
|
|
180
183
|
translateX: delayFunction(
|
|
181
184
|
delay,
|
|
182
|
-
animation(
|
|
185
|
+
animation(
|
|
186
|
+
values.currentWidth / 2 - values.currentHeight / 2,
|
|
187
|
+
config
|
|
188
|
+
)
|
|
183
189
|
),
|
|
184
190
|
},
|
|
185
191
|
{
|
|
186
192
|
translateY: delayFunction(
|
|
187
193
|
delay,
|
|
188
|
-
animation(
|
|
194
|
+
animation(
|
|
195
|
+
values.currentWidth / 2 - values.currentHeight / 2,
|
|
196
|
+
config
|
|
197
|
+
)
|
|
189
198
|
),
|
|
190
199
|
},
|
|
191
200
|
],
|
|
@@ -202,12 +211,12 @@ export class RotateOutDownLeft
|
|
|
202
211
|
|
|
203
212
|
export class RotateOutDownRight
|
|
204
213
|
extends ComplexAnimationBuilder
|
|
205
|
-
implements
|
|
214
|
+
implements IExitAnimationBuilder {
|
|
206
215
|
static createInstance(): RotateOutDownRight {
|
|
207
216
|
return new RotateOutDownRight();
|
|
208
217
|
}
|
|
209
218
|
|
|
210
|
-
build = ():
|
|
219
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
211
220
|
const delayFunction = this.getDelayFunction();
|
|
212
221
|
const [animation, config] = this.getAnimationAndConfig();
|
|
213
222
|
const delay = this.getDelay();
|
|
@@ -223,13 +232,19 @@ export class RotateOutDownRight
|
|
|
223
232
|
{
|
|
224
233
|
translateX: delayFunction(
|
|
225
234
|
delay,
|
|
226
|
-
animation(
|
|
235
|
+
animation(
|
|
236
|
+
-(values.currentWidth / 2 - values.currentHeight / 2),
|
|
237
|
+
config
|
|
238
|
+
)
|
|
227
239
|
),
|
|
228
240
|
},
|
|
229
241
|
{
|
|
230
242
|
translateY: delayFunction(
|
|
231
243
|
delay,
|
|
232
|
-
animation(
|
|
244
|
+
animation(
|
|
245
|
+
values.currentWidth / 2 - values.currentHeight / 2,
|
|
246
|
+
config
|
|
247
|
+
)
|
|
233
248
|
),
|
|
234
249
|
},
|
|
235
250
|
],
|
|
@@ -246,12 +261,12 @@ export class RotateOutDownRight
|
|
|
246
261
|
|
|
247
262
|
export class RotateOutUpLeft
|
|
248
263
|
extends ComplexAnimationBuilder
|
|
249
|
-
implements
|
|
264
|
+
implements IExitAnimationBuilder {
|
|
250
265
|
static createInstance(): RotateOutUpLeft {
|
|
251
266
|
return new RotateOutUpLeft();
|
|
252
267
|
}
|
|
253
268
|
|
|
254
|
-
build = ():
|
|
269
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
255
270
|
const delayFunction = this.getDelayFunction();
|
|
256
271
|
const [animation, config] = this.getAnimationAndConfig();
|
|
257
272
|
const delay = this.getDelay();
|
|
@@ -267,13 +282,19 @@ export class RotateOutUpLeft
|
|
|
267
282
|
{
|
|
268
283
|
translateX: delayFunction(
|
|
269
284
|
delay,
|
|
270
|
-
animation(
|
|
285
|
+
animation(
|
|
286
|
+
values.currentWidth / 2 - values.currentHeight / 2,
|
|
287
|
+
config
|
|
288
|
+
)
|
|
271
289
|
),
|
|
272
290
|
},
|
|
273
291
|
{
|
|
274
292
|
translateY: delayFunction(
|
|
275
293
|
delay,
|
|
276
|
-
animation(
|
|
294
|
+
animation(
|
|
295
|
+
-(values.currentWidth / 2 - values.currentHeight / 2),
|
|
296
|
+
config
|
|
297
|
+
)
|
|
277
298
|
),
|
|
278
299
|
},
|
|
279
300
|
],
|
|
@@ -290,12 +311,12 @@ export class RotateOutUpLeft
|
|
|
290
311
|
|
|
291
312
|
export class RotateOutUpRight
|
|
292
313
|
extends ComplexAnimationBuilder
|
|
293
|
-
implements
|
|
314
|
+
implements IExitAnimationBuilder {
|
|
294
315
|
static createInstance(): RotateOutUpRight {
|
|
295
316
|
return new RotateOutUpRight();
|
|
296
317
|
}
|
|
297
318
|
|
|
298
|
-
build = ():
|
|
319
|
+
build = (): AnimationConfigFunction<ExitAnimationsValues> => {
|
|
299
320
|
const delayFunction = this.getDelayFunction();
|
|
300
321
|
const [animation, config] = this.getAnimationAndConfig();
|
|
301
322
|
const delay = this.getDelay();
|
|
@@ -311,13 +332,19 @@ export class RotateOutUpRight
|
|
|
311
332
|
{
|
|
312
333
|
translateX: delayFunction(
|
|
313
334
|
delay,
|
|
314
|
-
animation(
|
|
335
|
+
animation(
|
|
336
|
+
-(values.currentWidth / 2 - values.currentHeight / 2),
|
|
337
|
+
config
|
|
338
|
+
)
|
|
315
339
|
),
|
|
316
340
|
},
|
|
317
341
|
{
|
|
318
342
|
translateY: delayFunction(
|
|
319
343
|
delay,
|
|
320
|
-
animation(
|
|
344
|
+
animation(
|
|
345
|
+
-(values.currentWidth / 2 - values.currentHeight / 2),
|
|
346
|
+
config
|
|
347
|
+
)
|
|
321
348
|
),
|
|
322
349
|
},
|
|
323
350
|
],
|