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.
Files changed (220) hide show
  1. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +9 -0
  2. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +13 -0
  3. package/Common/cpp/Tools/FeaturesConfig.cpp +5 -0
  4. package/Common/cpp/Tools/RuntimeDecorator.cpp +38 -2
  5. package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +3 -0
  6. package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +5 -0
  7. package/Common/cpp/headers/Tools/FeaturesConfig.h +19 -0
  8. package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +2 -0
  9. package/Common/cpp/headers/Tools/RuntimeDecorator.h +8 -7
  10. package/README.md +1 -1
  11. package/RNReanimated.podspec +20 -3
  12. package/android/build.gradle +31 -5
  13. package/android/expo/linking.gradle +46 -0
  14. package/android/expo/src/main/java/com/swmansion/reanimated/EXReanimatedAdapter.java +12 -0
  15. package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java +26 -0
  16. package/android/react-native-reanimated-63-hermes.aar +0 -0
  17. package/android/react-native-reanimated-63-jsc.aar +0 -0
  18. package/android/react-native-reanimated-64-hermes.aar +0 -0
  19. package/android/react-native-reanimated-64-jsc.aar +0 -0
  20. package/android/react-native-reanimated-65-hermes.aar +0 -0
  21. package/android/react-native-reanimated-65-jsc.aar +0 -0
  22. package/android/react-native-reanimated-66-hermes.aar +0 -0
  23. package/android/react-native-reanimated-66-jsc.aar +0 -0
  24. package/android/react-native-reanimated-67-hermes.aar +0 -0
  25. package/android/react-native-reanimated-67-jsc.aar +0 -0
  26. package/expo-module.config.json +3 -0
  27. package/ios/LayoutReanimation/REAAnimationsManager.m +64 -19
  28. package/ios/LayoutReanimation/REAUIManager.mm +63 -18
  29. package/ios/Nodes/REAPropsNode.m +1 -1
  30. package/ios/REAEventDispatcher.m +1 -1
  31. package/ios/REAModule.h +0 -2
  32. package/ios/REAModule.m +0 -3
  33. package/ios/REANodesManager.m +1 -0
  34. package/ios/RNGestureHandlerStateManager.h +5 -0
  35. package/ios/native/NativeMethods.h +5 -0
  36. package/ios/native/NativeMethods.mm +8 -1
  37. package/ios/native/NativeProxy.h +1 -0
  38. package/ios/native/NativeProxy.mm +10 -2
  39. package/ios/native/REAInitializer.mm +7 -3
  40. package/lib/src/Animated.js +31 -0
  41. package/lib/{ConfigHelper.js → src/ConfigHelper.js} +0 -0
  42. package/lib/{ReanimatedEventEmitter.js → src/ReanimatedEventEmitter.js} +0 -0
  43. package/lib/{ReanimatedModule.js → src/ReanimatedModule.js} +0 -0
  44. package/lib/{ReanimatedModule.macos.js → src/ReanimatedModule.macos.js} +0 -0
  45. package/lib/{ReanimatedModule.native.js → src/ReanimatedModule.native.js} +0 -0
  46. package/lib/{ReanimatedModule.windows.js → src/ReanimatedModule.windows.js} +0 -0
  47. package/lib/{ReanimatedModuleCompat.js → src/ReanimatedModuleCompat.js} +0 -0
  48. package/lib/{__mocks__ → src/__mocks__}/ReanimatedEventEmitter.js +0 -0
  49. package/lib/{__mocks__ → src/__mocks__}/ReanimatedModule.native.js +0 -0
  50. package/lib/{createAnimatedComponent.js → src/createAnimatedComponent.js} +55 -37
  51. package/lib/src/index.js +31 -0
  52. package/lib/{reanimated1 → src/reanimated1}/Easing.js +0 -0
  53. package/lib/{reanimated1 → src/reanimated1}/SpringConfig.js +0 -0
  54. package/lib/{reanimated1 → src/reanimated1}/Transitioning.js +0 -0
  55. package/lib/{reanimated1 → src/reanimated1}/animations/Animation.js +0 -0
  56. package/lib/{reanimated1 → src/reanimated1}/animations/SpringUtils.js +0 -0
  57. package/lib/{reanimated1 → src/reanimated1}/animations/backwardCompatibleAnimWrapper.js +0 -0
  58. package/lib/{reanimated1 → src/reanimated1}/animations/decay.js +0 -0
  59. package/lib/{reanimated1 → src/reanimated1}/animations/spring.js +0 -0
  60. package/lib/{reanimated1 → src/reanimated1}/animations/timing.js +0 -0
  61. package/lib/{reanimated1 → src/reanimated1}/base.js +0 -0
  62. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedAlways.js +0 -0
  63. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedBezier.js +0 -0
  64. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedBlock.js +0 -0
  65. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCall.js +0 -0
  66. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCallFunc.js +0 -0
  67. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedClock.js +0 -0
  68. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedClockTest.js +0 -0
  69. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCode.js +0 -0
  70. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedConcat.js +0 -0
  71. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedCond.js +0 -0
  72. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedDebug.js +0 -0
  73. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedEvent.js +0 -0
  74. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedFunction.js +0 -0
  75. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedNode.js +0 -0
  76. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedOperator.js +0 -0
  77. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedParam.js +0 -0
  78. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedProps.js +0 -0
  79. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedSet.js +0 -0
  80. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStartClock.js +0 -0
  81. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStopClock.js +0 -0
  82. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedStyle.js +0 -0
  83. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedTransform.js +0 -0
  84. package/lib/{reanimated1 → src/reanimated1}/core/AnimatedValue.js +0 -0
  85. package/lib/{reanimated1 → src/reanimated1}/core/Core.test.js +1 -1
  86. package/lib/{reanimated1 → src/reanimated1}/core/InternalAnimatedValue.js +0 -0
  87. package/lib/{reanimated1 → src/reanimated1}/core/__mocks__/AnimatedProps.js +0 -0
  88. package/lib/{reanimated1 → src/reanimated1}/core/createEventObjectProxyPolyfill.js +0 -0
  89. package/lib/{reanimated1 → src/reanimated1}/derived/__mocks__/evaluateOnce.js +0 -0
  90. package/lib/{reanimated1 → src/reanimated1}/derived/acc.js +0 -0
  91. package/lib/{reanimated1 → src/reanimated1}/derived/color.js +0 -0
  92. package/lib/{reanimated1 → src/reanimated1}/derived/diff.js +0 -0
  93. package/lib/{reanimated1 → src/reanimated1}/derived/diffClamp.js +0 -0
  94. package/lib/{reanimated1 → src/reanimated1}/derived/evaluateOnce.js +0 -0
  95. package/lib/{reanimated1 → src/reanimated1}/derived/index.js +0 -0
  96. package/lib/{reanimated1 → src/reanimated1}/derived/interpolate.js +0 -0
  97. package/lib/{reanimated1 → src/reanimated1}/derived/interpolateColors.js +0 -0
  98. package/lib/{reanimated1 → src/reanimated1}/derived/onChange.js +0 -0
  99. package/lib/{reanimated1 → src/reanimated1}/derived/useCode.js +0 -0
  100. package/lib/{reanimated1 → src/reanimated1}/index.js +0 -0
  101. package/lib/{reanimated1 → src/reanimated1}/operators.js +0 -0
  102. package/lib/{reanimated1 → src/reanimated1}/useValue.js +0 -0
  103. package/lib/{reanimated1 → src/reanimated1}/val.js +0 -0
  104. package/lib/{reanimated2 → src/reanimated2}/Bezier.js +0 -0
  105. package/lib/{reanimated2 → src/reanimated2}/Colors.js +0 -0
  106. package/lib/{reanimated2 → src/reanimated2}/Easing.js +0 -0
  107. package/lib/{reanimated2 → src/reanimated2}/NativeMethods.js +7 -0
  108. package/lib/{reanimated2 → src/reanimated2}/NativeReanimated/NativeReanimated.js +3 -0
  109. package/lib/{reanimated2 → src/reanimated2}/NativeReanimated/index.js +0 -0
  110. package/lib/{reanimated2 → src/reanimated2}/PlatformChecker.js +0 -0
  111. package/lib/{reanimated2 → src/reanimated2}/PropAdapters.js +0 -0
  112. package/lib/{reanimated2 → src/reanimated2}/UpdateProps.js +1 -1
  113. package/lib/{reanimated2 → src/reanimated2}/ViewDescriptorsSet.js +4 -2
  114. package/lib/{reanimated2 → src/reanimated2}/WorkletEventHandler.js +0 -0
  115. package/lib/{reanimated2 → src/reanimated2}/__mocks__/MutableValue.js +0 -0
  116. package/lib/{reanimated2 → src/reanimated2}/__mocks__/NativeReanimated.js +0 -0
  117. package/lib/{reanimated2 → src/reanimated2}/__mocks__/NativeReanimated.native.js +0 -0
  118. package/lib/{reanimated2 → src/reanimated2}/animation/commonTypes.js +0 -0
  119. package/lib/{reanimated2 → src/reanimated2}/animation/decay.js +0 -0
  120. package/lib/{reanimated2 → src/reanimated2}/animation/delay.js +0 -0
  121. package/lib/{reanimated2 → src/reanimated2}/animation/index.js +0 -0
  122. package/lib/{reanimated2 → src/reanimated2}/animation/repeat.js +0 -0
  123. package/lib/{reanimated2 → src/reanimated2}/animation/sequence.js +0 -0
  124. package/lib/{reanimated2 → src/reanimated2}/animation/spring.js +0 -0
  125. package/lib/{reanimated2 → src/reanimated2}/animation/styleAnimation.js +5 -0
  126. package/lib/{reanimated2 → src/reanimated2}/animation/timing.js +0 -0
  127. package/lib/{reanimated2 → src/reanimated2}/animation/util.js +0 -0
  128. package/lib/{reanimated2 → src/reanimated2}/commonTypes.js +0 -0
  129. package/lib/src/reanimated2/component/FlatList.js +30 -0
  130. package/lib/src/reanimated2/component/WrappedComponents.js +9 -0
  131. package/lib/src/reanimated2/component/index.js +4 -0
  132. package/lib/{reanimated2 → src/reanimated2}/core.js +27 -3
  133. package/lib/{reanimated2 → src/reanimated2}/globals.d.ts +5 -0
  134. package/lib/{reanimated2 → src/reanimated2}/hook/Hooks.js +0 -0
  135. package/lib/{reanimated2 → src/reanimated2}/hook/commonTypes.js +0 -0
  136. package/lib/{reanimated2 → src/reanimated2}/hook/index.js +0 -0
  137. package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedGestureHandler.js +0 -0
  138. package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedReaction.js +0 -0
  139. package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedRef.js +0 -0
  140. package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedScrollHandler.js +0 -0
  141. package/lib/{reanimated2 → src/reanimated2}/hook/useAnimatedStyle.js +0 -0
  142. package/lib/{reanimated2 → src/reanimated2}/hook/useDerivedValue.js +0 -0
  143. package/lib/{reanimated2 → src/reanimated2}/hook/useSharedValue.js +0 -0
  144. package/lib/{reanimated2 → src/reanimated2}/hook/utils.js +0 -0
  145. package/lib/{reanimated2 → src/reanimated2}/index.js +0 -0
  146. package/lib/{reanimated2 → src/reanimated2}/interpolation.js +0 -0
  147. package/lib/{reanimated2 → src/reanimated2}/jestUtils.js +0 -0
  148. package/lib/{reanimated2 → src/reanimated2}/js-reanimated/JSReanimated.js +3 -0
  149. package/lib/{reanimated2 → src/reanimated2}/js-reanimated/Mapper.js +4 -1
  150. package/lib/{reanimated2 → src/reanimated2}/js-reanimated/MapperRegistry.js +0 -0
  151. package/lib/{reanimated2 → src/reanimated2}/js-reanimated/MutableValue.js +0 -0
  152. package/lib/{reanimated2 → src/reanimated2}/js-reanimated/index.js +3 -0
  153. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/LayoutAnimationRepository.js +14 -5
  154. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +0 -0
  155. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +0 -0
  156. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/Keyframe.js +0 -0
  157. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/commonTypes.js +0 -0
  158. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/animationBuilder/index.js +0 -0
  159. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Bounce.js +0 -0
  160. package/lib/src/reanimated2/layoutReanimation/defaultAnimations/Default.js +36 -0
  161. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Fade.js +0 -0
  162. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Flip.js +8 -8
  163. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.js +0 -0
  164. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.js +0 -0
  165. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Roll.js +0 -0
  166. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Rotate.js +16 -16
  167. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Slide.js +16 -16
  168. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Stretch.js +0 -0
  169. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/Zoom.js +4 -4
  170. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultAnimations/index.js +0 -0
  171. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.js +20 -8
  172. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.js +3 -3
  173. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.js +8 -8
  174. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.js +10 -10
  175. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.js +8 -8
  176. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.js +8 -8
  177. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/defaultTransitions/index.js +0 -0
  178. package/lib/{reanimated2 → src/reanimated2}/layoutReanimation/index.js +0 -0
  179. package/lib/{reanimated2 → src/reanimated2}/mock.js +0 -0
  180. package/lib/{reanimated2 → src/reanimated2}/platform-specific/RNRenderer.js +0 -0
  181. package/lib/{reanimated2 → src/reanimated2}/platform-specific/RNRenderer.web.js +0 -0
  182. package/lib/{reanimated2 → src/reanimated2}/utils.js +0 -0
  183. package/lib/{setAndForwardRef.js → src/setAndForwardRef.js} +0 -0
  184. package/mock.js +1 -1
  185. package/package.json +4 -3
  186. package/plugin.js +10 -3
  187. package/react-native-reanimated.d.ts +40 -23
  188. package/src/Animated.js +11 -5
  189. package/src/createAnimatedComponent.tsx +86 -43
  190. package/src/reanimated1/core/Core.test.js +1 -1
  191. package/src/reanimated2/NativeMethods.ts +13 -1
  192. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +4 -0
  193. package/src/reanimated2/UpdateProps.ts +1 -1
  194. package/src/reanimated2/ViewDescriptorsSet.ts +6 -2
  195. package/src/reanimated2/animation/styleAnimation.ts +9 -0
  196. package/src/reanimated2/component/FlatList.tsx +44 -0
  197. package/src/reanimated2/component/WrappedComponents.ts +11 -0
  198. package/src/reanimated2/component/index.ts +9 -0
  199. package/src/reanimated2/core.ts +38 -3
  200. package/src/reanimated2/globals.d.ts +5 -0
  201. package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -0
  202. package/src/reanimated2/js-reanimated/Mapper.ts +3 -1
  203. package/src/reanimated2/js-reanimated/index.ts +5 -0
  204. package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +18 -5
  205. package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +39 -20
  206. package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +5 -1
  207. package/src/reanimated2/layoutReanimation/defaultAnimations/Default.ts +21 -15
  208. package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +29 -24
  209. package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +61 -34
  210. package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +49 -34
  211. package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +17 -12
  212. package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +20 -8
  213. package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +9 -9
  214. package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +8 -8
  215. package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +20 -14
  216. package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +14 -8
  217. package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +24 -12
  218. package/lib/Animated.js +0 -25
  219. package/lib/index.js +0 -25
  220. package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +0 -36
@@ -1,42 +1,48 @@
1
1
  import {
2
2
  LayoutAnimationFunction,
3
- EntryExitAnimationFunction,
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.originX,
11
- originY: values.originY,
12
- width: values.width,
13
- height: values.height,
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: EntryExitAnimationFunction = (targetValues) => {
21
+ export const DefaultEntering: AnimationConfigFunction<EntryAnimationsValues> = (
22
+ values
23
+ ) => {
20
24
  'worklet';
21
25
  return {
22
26
  initialValues: {
23
- originX: targetValues.originX,
24
- originY: targetValues.originY,
25
- width: targetValues.width,
26
- height: targetValues.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: EntryExitAnimationFunction = (startValues) => {
36
+ export const DefaultExiting: AnimationConfigFunction<ExitAnimationsValues> = (
37
+ values
38
+ ) => {
33
39
  'worklet';
34
40
  return {
35
41
  initialValues: {
36
- originX: startValues.originX,
37
- originY: startValues.originY,
38
- width: startValues.width,
39
- height: startValues.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 IEntryExitAnimationBuilder {
14
+ implements IEntryAnimationBuilder {
10
15
  static createInstance(): FlipInXUp {
11
16
  return new FlipInXUp();
12
17
  }
13
18
 
14
- build = (): EntryExitAnimationFunction => {
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.height },
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 IEntryExitAnimationBuilder {
50
+ implements IEntryAnimationBuilder {
46
51
  static createInstance(): FlipInYLeft {
47
52
  return new FlipInYLeft();
48
53
  }
49
54
 
50
- build = (): EntryExitAnimationFunction => {
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.width },
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 IEntryExitAnimationBuilder {
86
+ implements IEntryAnimationBuilder {
82
87
  static createInstance(): FlipInXDown {
83
88
  return new FlipInXDown();
84
89
  }
85
90
 
86
- build = (): EntryExitAnimationFunction => {
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.height },
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 IEntryExitAnimationBuilder {
122
+ implements IEntryAnimationBuilder {
118
123
  static createInstance(): FlipInYRight {
119
124
  return new FlipInYRight();
120
125
  }
121
126
 
122
- build = (): EntryExitAnimationFunction => {
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.width },
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 IEntryExitAnimationBuilder {
220
+ implements IExitAnimationBuilder {
216
221
  static createInstance(): FlipOutXUp {
217
222
  return new FlipOutXUp();
218
223
  }
219
224
 
220
- build = (): EntryExitAnimationFunction => {
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.height, config)
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 IEntryExitAnimationBuilder {
261
+ implements IExitAnimationBuilder {
257
262
  static createInstance(): FlipOutYLeft {
258
263
  return new FlipOutYLeft();
259
264
  }
260
265
 
261
- build = (): EntryExitAnimationFunction => {
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.width, config)
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 IEntryExitAnimationBuilder {
302
+ implements IExitAnimationBuilder {
298
303
  static createInstance(): FlipOutXDown {
299
304
  return new FlipOutXDown();
300
305
  }
301
306
 
302
- build = (): EntryExitAnimationFunction => {
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.height, config)
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 IEntryExitAnimationBuilder {
343
+ implements IExitAnimationBuilder {
339
344
  static createInstance(): FlipOutYRight {
340
345
  return new FlipOutYRight();
341
346
  }
342
347
 
343
- build = (): EntryExitAnimationFunction => {
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.width, config)
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
- EntryExitAnimationFunction,
4
- IEntryExitAnimationBuilder,
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 IEntryExitAnimationBuilder {
12
+ implements IEntryAnimationBuilder {
10
13
  static createInstance(): RotateInDownLeft {
11
14
  return new RotateInDownLeft();
12
15
  }
13
16
 
14
- build = (): EntryExitAnimationFunction => {
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.width / 2 - values.height / 2 },
36
- { translateY: -(values.width / 2 - values.height / 2) },
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 IEntryExitAnimationBuilder {
50
+ implements IEntryAnimationBuilder {
48
51
  static createInstance(): RotateInDownRight {
49
52
  return new RotateInDownRight();
50
53
  }
51
54
 
52
- build = (): EntryExitAnimationFunction => {
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.width / 2 - values.height / 2) },
74
- { translateY: -(values.width / 2 - values.height / 2) },
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 IEntryExitAnimationBuilder {
88
+ implements IEntryAnimationBuilder {
86
89
  static createInstance(): RotateInUpLeft {
87
90
  return new RotateInUpLeft();
88
91
  }
89
92
 
90
- build = (): EntryExitAnimationFunction => {
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.width / 2 - values.height / 2 },
112
- { translateY: values.width / 2 - values.height / 2 },
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 IEntryExitAnimationBuilder {
126
+ implements IEntryAnimationBuilder {
124
127
  static createInstance(): RotateInUpRight {
125
128
  return new RotateInUpRight();
126
129
  }
127
130
 
128
- build = (): EntryExitAnimationFunction => {
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.width / 2 - values.height / 2) },
150
- { translateY: values.width / 2 - values.height / 2 },
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 IEntryExitAnimationBuilder {
164
+ implements IExitAnimationBuilder {
162
165
  static createInstance(): RotateOutDownLeft {
163
166
  return new RotateOutDownLeft();
164
167
  }
165
168
 
166
- build = (): EntryExitAnimationFunction => {
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(values.width / 2 - values.height / 2, config)
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(values.width / 2 - values.height / 2, config)
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 IEntryExitAnimationBuilder {
214
+ implements IExitAnimationBuilder {
206
215
  static createInstance(): RotateOutDownRight {
207
216
  return new RotateOutDownRight();
208
217
  }
209
218
 
210
- build = (): EntryExitAnimationFunction => {
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(-(values.width / 2 - values.height / 2), config)
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(values.width / 2 - values.height / 2, config)
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 IEntryExitAnimationBuilder {
264
+ implements IExitAnimationBuilder {
250
265
  static createInstance(): RotateOutUpLeft {
251
266
  return new RotateOutUpLeft();
252
267
  }
253
268
 
254
- build = (): EntryExitAnimationFunction => {
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(values.width / 2 - values.height / 2, config)
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(-(values.width / 2 - values.height / 2), config)
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 IEntryExitAnimationBuilder {
314
+ implements IExitAnimationBuilder {
294
315
  static createInstance(): RotateOutUpRight {
295
316
  return new RotateOutUpRight();
296
317
  }
297
318
 
298
- build = (): EntryExitAnimationFunction => {
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(-(values.width / 2 - values.height / 2), config)
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(-(values.width / 2 - values.height / 2), config)
344
+ animation(
345
+ -(values.currentWidth / 2 - values.currentHeight / 2),
346
+ config
347
+ )
321
348
  ),
322
349
  },
323
350
  ],