react-native-reanimated 2.3.0-alpha.3 → 2.3.0-beta.4

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 (264) hide show
  1. package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +15 -8
  2. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +176 -154
  3. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +49 -33
  4. package/Common/cpp/Registries/EventHandlerRegistry.cpp +14 -7
  5. package/Common/cpp/Registries/MapperRegistry.cpp +24 -20
  6. package/Common/cpp/Registries/WorkletsCache.cpp +19 -9
  7. package/Common/cpp/SharedItems/FrozenObject.cpp +17 -8
  8. package/Common/cpp/SharedItems/MutableValue.cpp +38 -25
  9. package/Common/cpp/SharedItems/MutableValueSetterProxy.cpp +11 -7
  10. package/Common/cpp/SharedItems/RemoteObject.cpp +9 -5
  11. package/Common/cpp/SharedItems/ShareableValue.cpp +211 -160
  12. package/Common/cpp/Tools/FeaturesConfig.cpp +5 -0
  13. package/Common/cpp/Tools/JSIStoreValueUser.cpp +25 -6
  14. package/Common/cpp/Tools/Mapper.cpp +30 -30
  15. package/Common/cpp/Tools/RuntimeDecorator.cpp +124 -86
  16. package/Common/cpp/Tools/Scheduler.cpp +6 -5
  17. package/Common/cpp/Tools/WorkletEventHandler.cpp +4 -2
  18. package/Common/cpp/headers/LayoutAnimations/LayoutAnimationsProxy.h +12 -11
  19. package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +50 -31
  20. package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +34 -16
  21. package/Common/cpp/headers/Registries/EventHandlerRegistry.h +15 -8
  22. package/Common/cpp/headers/Registries/MapperRegistry.h +5 -4
  23. package/Common/cpp/headers/Registries/WorkletsCache.h +9 -7
  24. package/Common/cpp/headers/SharedItems/FrozenObject.h +19 -11
  25. package/Common/cpp/headers/SharedItems/HostFunctionHandler.h +8 -4
  26. package/Common/cpp/headers/SharedItems/MutableValue.h +23 -12
  27. package/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h +12 -7
  28. package/Common/cpp/headers/SharedItems/RemoteObject.h +19 -8
  29. package/Common/cpp/headers/SharedItems/RuntimeManager.h +26 -25
  30. package/Common/cpp/headers/SharedItems/ShareableValue.h +32 -27
  31. package/Common/cpp/headers/SharedItems/SharedParent.h +10 -7
  32. package/Common/cpp/headers/SharedItems/ValueWrapper.h +95 -72
  33. package/Common/cpp/headers/SpecTools/ErrorHandler.h +18 -19
  34. package/Common/cpp/headers/Tools/FeaturesConfig.h +19 -0
  35. package/Common/cpp/headers/Tools/JSIStoreValueUser.h +13 -16
  36. package/Common/cpp/headers/Tools/Mapper.h +19 -16
  37. package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +17 -7
  38. package/Common/cpp/headers/Tools/ReanimatedHiddenHeaders.h +7 -11
  39. package/Common/cpp/headers/Tools/RuntimeDecorator.h +36 -27
  40. package/Common/cpp/headers/Tools/Scheduler.h +30 -35
  41. package/Common/cpp/headers/Tools/WorkletEventHandler.h +11 -8
  42. package/Common/cpp/hidden_headers/Logger.h +14 -14
  43. package/Common/cpp/hidden_headers/LoggerInterface.h +8 -9
  44. package/Common/cpp/hidden_headers/SpeedChecker.h +7 -8
  45. package/README.md +1 -1
  46. package/RNReanimated.podspec +24 -6
  47. package/android/build.gradle +38 -29
  48. package/android/react-native-reanimated-63-hermes.aar +0 -0
  49. package/android/react-native-reanimated-63-jsc.aar +0 -0
  50. package/android/react-native-reanimated-64-hermes.aar +0 -0
  51. package/android/react-native-reanimated-64-jsc.aar +0 -0
  52. package/android/react-native-reanimated-65-hermes.aar +0 -0
  53. package/android/react-native-reanimated-65-jsc.aar +0 -0
  54. package/android/react-native-reanimated-66-hermes.aar +0 -0
  55. package/android/react-native-reanimated-66-jsc.aar +0 -0
  56. package/android/react-native-reanimated-67-hermes.aar +0 -0
  57. package/android/react-native-reanimated-67-jsc.aar +0 -0
  58. package/ios/LayoutReanimation/REAAnimationsManager.h +10 -8
  59. package/ios/LayoutReanimation/REAAnimationsManager.m +91 -87
  60. package/ios/LayoutReanimation/REASnapshot.h +2 -2
  61. package/ios/LayoutReanimation/REASnapshot.m +8 -7
  62. package/ios/LayoutReanimation/REAUIManager.h +4 -4
  63. package/ios/LayoutReanimation/REAUIManager.mm +116 -70
  64. package/ios/Nodes/REAAlwaysNode.m +14 -15
  65. package/ios/Nodes/REABezierNode.m +8 -7
  66. package/ios/Nodes/REABlockNode.m +1 -1
  67. package/ios/Nodes/REACallFuncNode.h +0 -1
  68. package/ios/Nodes/REACallFuncNode.m +10 -8
  69. package/ios/Nodes/REAClockNodes.m +22 -20
  70. package/ios/Nodes/REAConcatNode.h +0 -1
  71. package/ios/Nodes/REAConcatNode.m +2 -2
  72. package/ios/Nodes/REACondNode.m +7 -5
  73. package/ios/Nodes/READebugNode.m +5 -4
  74. package/ios/Nodes/REAEventNode.m +1 -1
  75. package/ios/Nodes/REAFunctionNode.h +0 -1
  76. package/ios/Nodes/REAFunctionNode.m +2 -2
  77. package/ios/Nodes/REAJSCallNode.m +4 -5
  78. package/ios/Nodes/REANode.h +3 -4
  79. package/ios/Nodes/REANode.m +9 -11
  80. package/ios/Nodes/REAOperatorNode.m +68 -67
  81. package/ios/Nodes/REAParamNode.h +1 -3
  82. package/ios/Nodes/REAParamNode.m +15 -17
  83. package/ios/Nodes/REAPropsNode.h +1 -3
  84. package/ios/Nodes/REAPropsNode.m +19 -22
  85. package/ios/Nodes/REASetNode.h +0 -1
  86. package/ios/Nodes/REASetNode.m +7 -5
  87. package/ios/Nodes/REAStyleNode.h +0 -1
  88. package/ios/Nodes/REAStyleNode.m +2 -4
  89. package/ios/Nodes/REATransformNode.h +0 -1
  90. package/ios/Nodes/REATransformNode.m +3 -5
  91. package/ios/Nodes/REAValueNode.m +5 -7
  92. package/ios/REAEventDispatcher.m +4 -4
  93. package/ios/REAModule.h +0 -2
  94. package/ios/REAModule.m +29 -38
  95. package/ios/REANodesManager.h +11 -19
  96. package/ios/REANodesManager.m +106 -130
  97. package/ios/REAUtils.h +5 -3
  98. package/ios/RNGestureHandlerStateManager.h +5 -0
  99. package/ios/Transitioning/RCTConvert+REATransition.m +45 -29
  100. package/ios/Transitioning/REAAllTransitions.h +2 -2
  101. package/ios/Transitioning/REAAllTransitions.m +14 -25
  102. package/ios/Transitioning/REATransition.h +8 -7
  103. package/ios/Transitioning/REATransition.m +19 -16
  104. package/ios/Transitioning/REATransitionAnimation.h +1 -1
  105. package/ios/Transitioning/REATransitionAnimation.m +2 -3
  106. package/ios/Transitioning/REATransitionManager.m +3 -3
  107. package/ios/native/NativeMethods.h +20 -5
  108. package/ios/native/NativeMethods.mm +14 -6
  109. package/ios/native/NativeProxy.h +4 -2
  110. package/ios/native/NativeProxy.mm +84 -63
  111. package/ios/native/REAIOSErrorHandler.h +13 -10
  112. package/ios/native/REAIOSErrorHandler.mm +19 -15
  113. package/ios/native/REAIOSLogger.h +8 -8
  114. package/ios/native/REAIOSLogger.mm +10 -6
  115. package/ios/native/REAIOSScheduler.h +5 -5
  116. package/ios/native/REAIOSScheduler.mm +17 -10
  117. package/ios/native/REAInitializer.h +5 -7
  118. package/ios/native/REAInitializer.mm +43 -31
  119. package/ios/native/UIResponder+Reanimated.mm +2 -2
  120. package/lib/Animated.js +9 -1
  121. package/lib/ConfigHelper.js +121 -138
  122. package/lib/ReanimatedEventEmitter.js +0 -1
  123. package/lib/ReanimatedModule.js +0 -1
  124. package/lib/ReanimatedModule.macos.js +0 -1
  125. package/lib/ReanimatedModule.native.js +5 -6
  126. package/lib/ReanimatedModule.windows.js +0 -1
  127. package/lib/ReanimatedModuleCompat.js +64 -35
  128. package/lib/createAnimatedComponent.js +468 -487
  129. package/lib/index.js +9 -1
  130. package/lib/reanimated2/NativeMethods.js +7 -12
  131. package/lib/reanimated2/NativeReanimated/NativeReanimated.js +37 -0
  132. package/lib/reanimated2/NativeReanimated/index.js +15 -0
  133. package/lib/reanimated2/PropAdapters.js +0 -1
  134. package/lib/reanimated2/UpdateProps.js +6 -7
  135. package/lib/reanimated2/ViewDescriptorsSet.js +4 -4
  136. package/lib/reanimated2/WorkletEventHandler.js +15 -13
  137. package/lib/reanimated2/animation/delay.js +8 -2
  138. package/lib/reanimated2/animation/spring.js +2 -0
  139. package/lib/reanimated2/animation/styleAnimation.js +7 -3
  140. package/lib/reanimated2/animation/util.js +25 -2
  141. package/lib/reanimated2/core.js +41 -17
  142. package/lib/reanimated2/globals.d.ts +21 -1
  143. package/lib/reanimated2/hook/useAnimatedRef.js +1 -1
  144. package/lib/reanimated2/hook/useAnimatedStyle.js +3 -3
  145. package/lib/reanimated2/index.js +1 -0
  146. package/lib/reanimated2/interpolation.js +95 -87
  147. package/lib/reanimated2/js-reanimated/JSReanimated.js +13 -10
  148. package/lib/reanimated2/js-reanimated/Mapper.js +4 -3
  149. package/lib/reanimated2/js-reanimated/MapperRegistry.js +3 -6
  150. package/lib/reanimated2/js-reanimated/MutableValue.js +0 -2
  151. package/lib/reanimated2/js-reanimated/index.js +10 -8
  152. package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +33 -2
  153. package/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +27 -124
  154. package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +125 -0
  155. package/lib/reanimated2/layoutReanimation/animationBuilder/index.js +1 -2
  156. package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +115 -45
  157. package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +7 -2
  158. package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +21 -21
  159. package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +25 -25
  160. package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +19 -17
  161. package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +5 -5
  162. package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +9 -9
  163. package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +17 -17
  164. package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +19 -19
  165. package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +9 -9
  166. package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +33 -33
  167. package/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +78 -0
  168. package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +128 -0
  169. package/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +37 -0
  170. package/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +41 -0
  171. package/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +34 -0
  172. package/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +46 -0
  173. package/lib/reanimated2/layoutReanimation/defaultTransitions/index.js +6 -0
  174. package/lib/reanimated2/layoutReanimation/index.js +1 -0
  175. package/lib/reanimated2/mock.js +3 -1
  176. package/lib/reanimated2/utils.js +9 -0
  177. package/lib/setAndForwardRef.js +14 -48
  178. package/libSo/fbjni/jni/arm64-v8a/libfbjni.so +0 -0
  179. package/libSo/fbjni/jni/armeabi-v7a/libfbjni.so +0 -0
  180. package/libSo/fbjni/jni/x86/libfbjni.so +0 -0
  181. package/libSo/fbjni/jni/x86_64/libfbjni.so +0 -0
  182. package/mock.js +1 -1
  183. package/package.json +28 -17
  184. package/plugin.js +220 -39
  185. package/react-native-reanimated.d.ts +542 -547
  186. package/src/Animated.js +9 -1
  187. package/src/{ConfigHelper.js → ConfigHelper.ts} +15 -7
  188. package/src/{ReanimatedEventEmitter.js → ReanimatedEventEmitter.ts} +0 -0
  189. package/src/{ReanimatedModule.js → ReanimatedModule.macos.ts} +0 -0
  190. package/src/{ReanimatedModule.native.js → ReanimatedModule.native.ts} +0 -0
  191. package/src/{ReanimatedModule.macos.js → ReanimatedModule.ts} +0 -0
  192. package/src/{ReanimatedModule.windows.js → ReanimatedModule.windows.ts} +0 -0
  193. package/src/ReanimatedModuleCompat.ts +51 -0
  194. package/src/{createAnimatedComponent.js → createAnimatedComponent.tsx} +285 -126
  195. package/src/reanimated2/NativeMethods.ts +34 -13
  196. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +72 -0
  197. package/src/reanimated2/NativeReanimated/index.ts +18 -0
  198. package/src/reanimated2/PropAdapters.ts +0 -1
  199. package/src/reanimated2/UpdateProps.ts +31 -15
  200. package/src/reanimated2/ViewDescriptorsSet.ts +15 -12
  201. package/src/reanimated2/WorkletEventHandler.ts +41 -23
  202. package/src/reanimated2/animation/commonTypes.ts +4 -4
  203. package/src/reanimated2/animation/decay.ts +2 -2
  204. package/src/reanimated2/animation/delay.ts +11 -5
  205. package/src/reanimated2/animation/index.ts +7 -7
  206. package/src/reanimated2/animation/repeat.ts +4 -4
  207. package/src/reanimated2/animation/sequence.ts +2 -2
  208. package/src/reanimated2/animation/spring.ts +6 -5
  209. package/src/reanimated2/animation/styleAnimation.ts +27 -15
  210. package/src/reanimated2/animation/timing.ts +5 -5
  211. package/src/reanimated2/animation/util.ts +47 -8
  212. package/src/reanimated2/commonTypes.ts +3 -0
  213. package/src/reanimated2/core.ts +80 -34
  214. package/src/reanimated2/globals.d.ts +21 -1
  215. package/src/reanimated2/hook/useAnimatedGestureHandler.ts +1 -1
  216. package/src/reanimated2/hook/useAnimatedRef.ts +13 -15
  217. package/src/reanimated2/hook/useAnimatedScrollHandler.ts +3 -3
  218. package/src/reanimated2/hook/useAnimatedStyle.ts +7 -7
  219. package/src/reanimated2/hook/utils.ts +4 -3
  220. package/src/reanimated2/index.ts +1 -0
  221. package/src/reanimated2/interpolation.ts +170 -103
  222. package/src/reanimated2/js-reanimated/JSReanimated.ts +37 -23
  223. package/src/reanimated2/js-reanimated/Mapper.ts +22 -9
  224. package/src/reanimated2/js-reanimated/MapperRegistry.ts +22 -19
  225. package/src/reanimated2/js-reanimated/MutableValue.ts +11 -11
  226. package/src/reanimated2/js-reanimated/index.ts +31 -14
  227. package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +75 -0
  228. package/src/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +29 -159
  229. package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +169 -0
  230. package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +2 -2
  231. package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +3 -9
  232. package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +1 -5
  233. package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +162 -82
  234. package/src/reanimated2/layoutReanimation/defaultAnimations/Default.ts +7 -2
  235. package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +32 -32
  236. package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +38 -38
  237. package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +34 -32
  238. package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +8 -8
  239. package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +14 -14
  240. package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +26 -26
  241. package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +28 -28
  242. package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +14 -14
  243. package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +50 -50
  244. package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +104 -0
  245. package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +213 -0
  246. package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +60 -0
  247. package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +58 -0
  248. package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +41 -0
  249. package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +78 -0
  250. package/src/reanimated2/layoutReanimation/defaultTransitions/index.ts +6 -0
  251. package/src/reanimated2/layoutReanimation/index.ts +1 -0
  252. package/src/reanimated2/mock.ts +3 -1
  253. package/src/reanimated2/utils.ts +21 -0
  254. package/src/{setAndForwardRef.js → setAndForwardRef.ts} +12 -2
  255. package/android/react-native-reanimated-62-hermes.aar +0 -0
  256. package/android/react-native-reanimated-62-jsc.aar +0 -0
  257. package/lib/reanimated2/NativeReanimated.js +0 -48
  258. package/lib/reanimated2/layoutReanimation/animationBuilder/BaseBounceAnimationBuilder.js +0 -55
  259. package/lib/reanimated2/layoutReanimation/animationBuilder/LayoutAnimationBuilder.js +0 -165
  260. package/src/ReanimatedModuleCompat.js +0 -37
  261. package/src/reanimated2/NativeReanimated.ts +0 -70
  262. package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.tsx +0 -41
  263. package/src/reanimated2/layoutReanimation/animationBuilder/BaseBounceAnimationBuilder.ts +0 -82
  264. package/src/reanimated2/layoutReanimation/animationBuilder/LayoutAnimationBuilder.ts +0 -217
@@ -1,23 +1,23 @@
1
1
  import { Dimensions } from 'react-native';
2
- import { BaseAnimationBuilder } from '../animationBuilder/BaseAnimationBuilder';
2
+ import { ComplexAnimationBuilder } from '../animationBuilder';
3
3
  import {
4
- EntryExitAnimationBuild,
4
+ EntryExitAnimationFunction,
5
5
  IEntryExitAnimationBuilder,
6
6
  } from '../animationBuilder/commonTypes';
7
7
 
8
8
  const { width } = Dimensions.get('window');
9
9
 
10
10
  export class RollInLeft
11
- extends BaseAnimationBuilder
11
+ extends ComplexAnimationBuilder
12
12
  implements IEntryExitAnimationBuilder {
13
13
  static createInstance(): RollInLeft {
14
14
  return new RollInLeft();
15
15
  }
16
16
 
17
- build: EntryExitAnimationBuild = () => {
17
+ build = (): EntryExitAnimationFunction => {
18
18
  const delayFunction = this.getDelayFunction();
19
19
  const [animation, config] = this.getAnimationAndConfig();
20
- const delay = this.delayV;
20
+ const delay = this.getDelay();
21
21
  const callback = this.callbackV;
22
22
 
23
23
  return () => {
@@ -39,16 +39,16 @@ export class RollInLeft
39
39
  }
40
40
 
41
41
  export class RollInRight
42
- extends BaseAnimationBuilder
42
+ extends ComplexAnimationBuilder
43
43
  implements IEntryExitAnimationBuilder {
44
44
  static createInstance(): RollInRight {
45
45
  return new RollInRight();
46
46
  }
47
47
 
48
- build: EntryExitAnimationBuild = () => {
48
+ build = (): EntryExitAnimationFunction => {
49
49
  const delayFunction = this.getDelayFunction();
50
50
  const [animation, config] = this.getAnimationAndConfig();
51
- const delay = this.delayV;
51
+ const delay = this.getDelay();
52
52
  const callback = this.callbackV;
53
53
 
54
54
  return () => {
@@ -70,16 +70,16 @@ export class RollInRight
70
70
  }
71
71
 
72
72
  export class RollOutLeft
73
- extends BaseAnimationBuilder
73
+ extends ComplexAnimationBuilder
74
74
  implements IEntryExitAnimationBuilder {
75
75
  static createInstance(): RollOutLeft {
76
76
  return new RollOutLeft();
77
77
  }
78
78
 
79
- build: EntryExitAnimationBuild = () => {
79
+ build = (): EntryExitAnimationFunction => {
80
80
  const delayFunction = this.getDelayFunction();
81
81
  const [animation, config] = this.getAnimationAndConfig();
82
- const delay = this.delayV;
82
+ const delay = this.getDelay();
83
83
  const callback = this.callbackV;
84
84
 
85
85
  return () => {
@@ -101,16 +101,16 @@ export class RollOutLeft
101
101
  }
102
102
 
103
103
  export class RollOutRight
104
- extends BaseAnimationBuilder
104
+ extends ComplexAnimationBuilder
105
105
  implements IEntryExitAnimationBuilder {
106
106
  static createInstance(): RollOutRight {
107
107
  return new RollOutRight();
108
108
  }
109
109
 
110
- build: EntryExitAnimationBuild = () => {
110
+ build = (): EntryExitAnimationFunction => {
111
111
  const delayFunction = this.getDelayFunction();
112
112
  const [animation, config] = this.getAnimationAndConfig();
113
- const delay = this.delayV;
113
+ const delay = this.getDelay();
114
114
  const callback = this.callbackV;
115
115
 
116
116
  return () => {
@@ -1,20 +1,20 @@
1
- import { BaseAnimationBuilder } from '../animationBuilder/BaseAnimationBuilder';
1
+ import { ComplexAnimationBuilder } from '../animationBuilder';
2
2
  import {
3
- EntryExitAnimationBuild,
3
+ EntryExitAnimationFunction,
4
4
  IEntryExitAnimationBuilder,
5
5
  } from '../animationBuilder/commonTypes';
6
6
 
7
7
  export class RotateInDownLeft
8
- extends BaseAnimationBuilder
8
+ extends ComplexAnimationBuilder
9
9
  implements IEntryExitAnimationBuilder {
10
10
  static createInstance(): RotateInDownLeft {
11
11
  return new RotateInDownLeft();
12
12
  }
13
13
 
14
- build: EntryExitAnimationBuild = () => {
14
+ build = (): EntryExitAnimationFunction => {
15
15
  const delayFunction = this.getDelayFunction();
16
16
  const [animation, config] = this.getAnimationAndConfig();
17
- const delay = this.delayV;
17
+ const delay = this.getDelay();
18
18
  const callback = this.callbackV;
19
19
 
20
20
  return (values) => {
@@ -43,16 +43,16 @@ export class RotateInDownLeft
43
43
  }
44
44
 
45
45
  export class RotateInDownRight
46
- extends BaseAnimationBuilder
46
+ extends ComplexAnimationBuilder
47
47
  implements IEntryExitAnimationBuilder {
48
48
  static createInstance(): RotateInDownRight {
49
49
  return new RotateInDownRight();
50
50
  }
51
51
 
52
- build: EntryExitAnimationBuild = () => {
52
+ build = (): EntryExitAnimationFunction => {
53
53
  const delayFunction = this.getDelayFunction();
54
54
  const [animation, config] = this.getAnimationAndConfig();
55
- const delay = this.delayV;
55
+ const delay = this.getDelay();
56
56
  const callback = this.callbackV;
57
57
 
58
58
  return (values) => {
@@ -81,16 +81,16 @@ export class RotateInDownRight
81
81
  }
82
82
 
83
83
  export class RotateInUpLeft
84
- extends BaseAnimationBuilder
84
+ extends ComplexAnimationBuilder
85
85
  implements IEntryExitAnimationBuilder {
86
86
  static createInstance(): RotateInUpLeft {
87
87
  return new RotateInUpLeft();
88
88
  }
89
89
 
90
- build: EntryExitAnimationBuild = () => {
90
+ build = (): EntryExitAnimationFunction => {
91
91
  const delayFunction = this.getDelayFunction();
92
92
  const [animation, config] = this.getAnimationAndConfig();
93
- const delay = this.delayV;
93
+ const delay = this.getDelay();
94
94
  const callback = this.callbackV;
95
95
 
96
96
  return (values) => {
@@ -119,16 +119,16 @@ export class RotateInUpLeft
119
119
  }
120
120
 
121
121
  export class RotateInUpRight
122
- extends BaseAnimationBuilder
122
+ extends ComplexAnimationBuilder
123
123
  implements IEntryExitAnimationBuilder {
124
124
  static createInstance(): RotateInUpRight {
125
125
  return new RotateInUpRight();
126
126
  }
127
127
 
128
- build: EntryExitAnimationBuild = () => {
128
+ build = (): EntryExitAnimationFunction => {
129
129
  const delayFunction = this.getDelayFunction();
130
130
  const [animation, config] = this.getAnimationAndConfig();
131
- const delay = this.delayV;
131
+ const delay = this.getDelay();
132
132
  const callback = this.callbackV;
133
133
 
134
134
  return (values) => {
@@ -157,16 +157,16 @@ export class RotateInUpRight
157
157
  }
158
158
 
159
159
  export class RotateOutDownLeft
160
- extends BaseAnimationBuilder
160
+ extends ComplexAnimationBuilder
161
161
  implements IEntryExitAnimationBuilder {
162
162
  static createInstance(): RotateOutDownLeft {
163
163
  return new RotateOutDownLeft();
164
164
  }
165
165
 
166
- build: EntryExitAnimationBuild = () => {
166
+ build = (): EntryExitAnimationFunction => {
167
167
  const delayFunction = this.getDelayFunction();
168
168
  const [animation, config] = this.getAnimationAndConfig();
169
- const delay = this.delayV;
169
+ const delay = this.getDelay();
170
170
  const callback = this.callbackV;
171
171
 
172
172
  return (values) => {
@@ -201,16 +201,16 @@ export class RotateOutDownLeft
201
201
  }
202
202
 
203
203
  export class RotateOutDownRight
204
- extends BaseAnimationBuilder
204
+ extends ComplexAnimationBuilder
205
205
  implements IEntryExitAnimationBuilder {
206
206
  static createInstance(): RotateOutDownRight {
207
207
  return new RotateOutDownRight();
208
208
  }
209
209
 
210
- build: EntryExitAnimationBuild = () => {
210
+ build = (): EntryExitAnimationFunction => {
211
211
  const delayFunction = this.getDelayFunction();
212
212
  const [animation, config] = this.getAnimationAndConfig();
213
- const delay = this.delayV;
213
+ const delay = this.getDelay();
214
214
  const callback = this.callbackV;
215
215
 
216
216
  return (values) => {
@@ -245,16 +245,16 @@ export class RotateOutDownRight
245
245
  }
246
246
 
247
247
  export class RotateOutUpLeft
248
- extends BaseAnimationBuilder
248
+ extends ComplexAnimationBuilder
249
249
  implements IEntryExitAnimationBuilder {
250
250
  static createInstance(): RotateOutUpLeft {
251
251
  return new RotateOutUpLeft();
252
252
  }
253
253
 
254
- build: EntryExitAnimationBuild = () => {
254
+ build = (): EntryExitAnimationFunction => {
255
255
  const delayFunction = this.getDelayFunction();
256
256
  const [animation, config] = this.getAnimationAndConfig();
257
- const delay = this.delayV;
257
+ const delay = this.getDelay();
258
258
  const callback = this.callbackV;
259
259
 
260
260
  return (values) => {
@@ -289,16 +289,16 @@ export class RotateOutUpLeft
289
289
  }
290
290
 
291
291
  export class RotateOutUpRight
292
- extends BaseAnimationBuilder
292
+ extends ComplexAnimationBuilder
293
293
  implements IEntryExitAnimationBuilder {
294
294
  static createInstance(): RotateOutUpRight {
295
295
  return new RotateOutUpRight();
296
296
  }
297
297
 
298
- build: EntryExitAnimationBuild = () => {
298
+ build = (): EntryExitAnimationFunction => {
299
299
  const delayFunction = this.getDelayFunction();
300
300
  const [animation, config] = this.getAnimationAndConfig();
301
- const delay = this.delayV;
301
+ const delay = this.getDelay();
302
302
  const callback = this.callbackV;
303
303
 
304
304
  return (values) => {
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  IEntryExitAnimationBuilder,
3
- EntryExitAnimationBuild,
3
+ EntryExitAnimationFunction,
4
4
  } from '../animationBuilder/commonTypes';
5
- import { BaseAnimationBuilder } from '../animationBuilder/BaseAnimationBuilder';
6
5
  import { Dimensions } from 'react-native';
6
+ import { ComplexAnimationBuilder } from '../animationBuilder';
7
7
 
8
8
  const { width, height } = Dimensions.get('window');
9
9
 
10
10
  export class SlideInRight
11
- extends BaseAnimationBuilder
11
+ extends ComplexAnimationBuilder
12
12
  implements IEntryExitAnimationBuilder {
13
13
  static createInstance(): SlideInRight {
14
14
  return new SlideInRight();
15
15
  }
16
16
 
17
- build: EntryExitAnimationBuild = () => {
17
+ build = (): EntryExitAnimationFunction => {
18
18
  const delayFunction = this.getDelayFunction();
19
19
  const [animation, config] = this.getAnimationAndConfig();
20
- const delay = this.delayV;
20
+ const delay = this.getDelay();
21
21
  const callback = this.callbackV;
22
22
 
23
23
  return (values) => {
@@ -36,16 +36,16 @@ export class SlideInRight
36
36
  }
37
37
 
38
38
  export class SlideInLeft
39
- extends BaseAnimationBuilder
39
+ extends ComplexAnimationBuilder
40
40
  implements IEntryExitAnimationBuilder {
41
41
  static createInstance(): SlideInLeft {
42
42
  return new SlideInLeft();
43
43
  }
44
44
 
45
- build: EntryExitAnimationBuild = () => {
45
+ build = (): EntryExitAnimationFunction => {
46
46
  const delayFunction = this.getDelayFunction();
47
47
  const [animation, config] = this.getAnimationAndConfig();
48
- const delay = this.delayV;
48
+ const delay = this.getDelay();
49
49
  const callback = this.callbackV;
50
50
 
51
51
  return (values) => {
@@ -64,16 +64,16 @@ export class SlideInLeft
64
64
  }
65
65
 
66
66
  export class SlideOutRight
67
- extends BaseAnimationBuilder
67
+ extends ComplexAnimationBuilder
68
68
  implements IEntryExitAnimationBuilder {
69
69
  static createInstance(): SlideOutRight {
70
70
  return new SlideOutRight();
71
71
  }
72
72
 
73
- build: EntryExitAnimationBuild = () => {
73
+ build = (): EntryExitAnimationFunction => {
74
74
  const delayFunction = this.getDelayFunction();
75
75
  const [animation, config] = this.getAnimationAndConfig();
76
- const delay = this.delayV;
76
+ const delay = this.getDelay();
77
77
  const callback = this.callbackV;
78
78
 
79
79
  return (values) => {
@@ -95,16 +95,16 @@ export class SlideOutRight
95
95
  }
96
96
 
97
97
  export class SlideOutLeft
98
- extends BaseAnimationBuilder
98
+ extends ComplexAnimationBuilder
99
99
  implements IEntryExitAnimationBuilder {
100
100
  static createInstance(): SlideOutLeft {
101
101
  return new SlideOutLeft();
102
102
  }
103
103
 
104
- build: EntryExitAnimationBuild = () => {
104
+ build = (): EntryExitAnimationFunction => {
105
105
  const delayFunction = this.getDelayFunction();
106
106
  const [animation, config] = this.getAnimationAndConfig();
107
- const delay = this.delayV;
107
+ const delay = this.getDelay();
108
108
  const callback = this.callbackV;
109
109
 
110
110
  return (values) => {
@@ -126,16 +126,16 @@ export class SlideOutLeft
126
126
  }
127
127
 
128
128
  export class SlideInUp
129
- extends BaseAnimationBuilder
129
+ extends ComplexAnimationBuilder
130
130
  implements IEntryExitAnimationBuilder {
131
131
  static createInstance(): SlideInUp {
132
132
  return new SlideInUp();
133
133
  }
134
134
 
135
- build: EntryExitAnimationBuild = () => {
135
+ build = (): EntryExitAnimationFunction => {
136
136
  const delayFunction = this.getDelayFunction();
137
137
  const [animation, config] = this.getAnimationAndConfig();
138
- const delay = this.delayV;
138
+ const delay = this.getDelay();
139
139
  const callback = this.callbackV;
140
140
 
141
141
  return (values) => {
@@ -145,7 +145,7 @@ export class SlideInUp
145
145
  originY: delayFunction(delay, animation(values.originY, config)),
146
146
  },
147
147
  initialValues: {
148
- originY: height,
148
+ originY: -height,
149
149
  },
150
150
  callback: callback,
151
151
  };
@@ -154,16 +154,16 @@ export class SlideInUp
154
154
  }
155
155
 
156
156
  export class SlideInDown
157
- extends BaseAnimationBuilder
157
+ extends ComplexAnimationBuilder
158
158
  implements IEntryExitAnimationBuilder {
159
159
  static createInstance(): SlideInDown {
160
160
  return new SlideInDown();
161
161
  }
162
162
 
163
- build: EntryExitAnimationBuild = () => {
163
+ build = (): EntryExitAnimationFunction => {
164
164
  const delayFunction = this.getDelayFunction();
165
165
  const [animation, config] = this.getAnimationAndConfig();
166
- const delay = this.delayV;
166
+ const delay = this.getDelay();
167
167
  const callback = this.callbackV;
168
168
 
169
169
  return (values) => {
@@ -173,7 +173,7 @@ export class SlideInDown
173
173
  originY: delayFunction(delay, animation(values.originY, config)),
174
174
  },
175
175
  initialValues: {
176
- originY: values.originY - height,
176
+ originY: values.originY + height,
177
177
  },
178
178
  callback: callback,
179
179
  };
@@ -182,16 +182,16 @@ export class SlideInDown
182
182
  }
183
183
 
184
184
  export class SlideOutUp
185
- extends BaseAnimationBuilder
185
+ extends ComplexAnimationBuilder
186
186
  implements IEntryExitAnimationBuilder {
187
187
  static createInstance(): SlideOutUp {
188
188
  return new SlideOutUp();
189
189
  }
190
190
 
191
- build: EntryExitAnimationBuild = () => {
191
+ build = (): EntryExitAnimationFunction => {
192
192
  const delayFunction = this.getDelayFunction();
193
193
  const [animation, config] = this.getAnimationAndConfig();
194
- const delay = this.delayV;
194
+ const delay = this.getDelay();
195
195
  const callback = this.callbackV;
196
196
 
197
197
  return (values) => {
@@ -211,16 +211,16 @@ export class SlideOutUp
211
211
  }
212
212
 
213
213
  export class SlideOutDown
214
- extends BaseAnimationBuilder
214
+ extends ComplexAnimationBuilder
215
215
  implements IEntryExitAnimationBuilder {
216
216
  static createInstance(): SlideOutDown {
217
217
  return new SlideOutDown();
218
218
  }
219
219
 
220
- build: EntryExitAnimationBuild = () => {
220
+ build = (): EntryExitAnimationFunction => {
221
221
  const delayFunction = this.getDelayFunction();
222
222
  const [animation, config] = this.getAnimationAndConfig();
223
- const delay = this.delayV;
223
+ const delay = this.getDelay();
224
224
  const callback = this.callbackV;
225
225
 
226
226
  return (values) => {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  IEntryExitAnimationBuilder,
3
- EntryExitAnimationBuild,
3
+ EntryExitAnimationFunction,
4
4
  } from '../animationBuilder/commonTypes';
5
- import { BaseAnimationBuilder } from '../animationBuilder/BaseAnimationBuilder';
5
+ import { ComplexAnimationBuilder } from '../animationBuilder';
6
6
 
7
7
  export class StretchInX
8
- extends BaseAnimationBuilder
8
+ extends ComplexAnimationBuilder
9
9
  implements IEntryExitAnimationBuilder {
10
10
  static createInstance(): StretchInX {
11
11
  return new StretchInX();
12
12
  }
13
13
 
14
- build: EntryExitAnimationBuild = () => {
14
+ build = (): EntryExitAnimationFunction => {
15
15
  const delayFunction = this.getDelayFunction();
16
16
  const [animation, config] = this.getAnimationAndConfig();
17
- const delay = this.delayV;
17
+ const delay = this.getDelay();
18
18
  const callback = this.callbackV;
19
19
 
20
20
  return () => {
@@ -33,16 +33,16 @@ export class StretchInX
33
33
  }
34
34
 
35
35
  export class StretchInY
36
- extends BaseAnimationBuilder
36
+ extends ComplexAnimationBuilder
37
37
  implements IEntryExitAnimationBuilder {
38
38
  static createInstance(): StretchInY {
39
39
  return new StretchInY();
40
40
  }
41
41
 
42
- build: EntryExitAnimationBuild = () => {
42
+ build = (): EntryExitAnimationFunction => {
43
43
  const delayFunction = this.getDelayFunction();
44
44
  const [animation, config] = this.getAnimationAndConfig();
45
- const delay = this.delayV;
45
+ const delay = this.getDelay();
46
46
  const callback = this.callbackV;
47
47
 
48
48
  return () => {
@@ -61,16 +61,16 @@ export class StretchInY
61
61
  }
62
62
 
63
63
  export class StretchOutX
64
- extends BaseAnimationBuilder
64
+ extends ComplexAnimationBuilder
65
65
  implements IEntryExitAnimationBuilder {
66
66
  static createInstance(): StretchOutX {
67
67
  return new StretchOutX();
68
68
  }
69
69
 
70
- build: EntryExitAnimationBuild = () => {
70
+ build = (): EntryExitAnimationFunction => {
71
71
  const delayFunction = this.getDelayFunction();
72
72
  const [animation, config] = this.getAnimationAndConfig();
73
- const delay = this.delayV;
73
+ const delay = this.getDelay();
74
74
  const callback = this.callbackV;
75
75
 
76
76
  return () => {
@@ -89,16 +89,16 @@ export class StretchOutX
89
89
  }
90
90
 
91
91
  export class StretchOutY
92
- extends BaseAnimationBuilder
92
+ extends ComplexAnimationBuilder
93
93
  implements IEntryExitAnimationBuilder {
94
94
  static createInstance(): StretchOutY {
95
95
  return new StretchOutY();
96
96
  }
97
97
 
98
- build: EntryExitAnimationBuild = () => {
98
+ build = (): EntryExitAnimationFunction => {
99
99
  const delayFunction = this.getDelayFunction();
100
100
  const [animation, config] = this.getAnimationAndConfig();
101
- const delay = this.delayV;
101
+ const delay = this.getDelay();
102
102
  const callback = this.callbackV;
103
103
 
104
104
  return () => {