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
@@ -3,10 +3,15 @@ import {
3
3
  EntryExitAnimationFunction,
4
4
  } from '../animationBuilder/commonTypes';
5
5
 
6
- export const DefaultLayout: LayoutAnimationFunction = (_) => {
6
+ export const DefaultLayout: LayoutAnimationFunction = (values) => {
7
7
  'worklet';
8
8
  return {
9
- initialValues: {},
9
+ initialValues: {
10
+ originX: values.originX,
11
+ originY: values.originY,
12
+ width: values.width,
13
+ height: values.height,
14
+ },
10
15
  animations: {},
11
16
  };
12
17
  };
@@ -1,21 +1,21 @@
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 FadeIn
8
- extends BaseAnimationBuilder
8
+ extends ComplexAnimationBuilder
9
9
  implements IEntryExitAnimationBuilder {
10
10
  static createInstance(): FadeIn {
11
11
  return new FadeIn();
12
12
  }
13
13
 
14
- build: EntryExitAnimationBuild = () => {
14
+ build = (): EntryExitAnimationFunction => {
15
15
  const delayFunction = this.getDelayFunction();
16
16
  const [animation, config] = this.getAnimationAndConfig();
17
17
  const callback = this.callbackV;
18
- const delay = this.delayV;
18
+ const delay = this.getDelay();
19
19
 
20
20
  return (_) => {
21
21
  'worklet';
@@ -33,17 +33,17 @@ export class FadeIn
33
33
  }
34
34
 
35
35
  export class FadeInRight
36
- extends BaseAnimationBuilder
36
+ extends ComplexAnimationBuilder
37
37
  implements IEntryExitAnimationBuilder {
38
38
  static createInstance(): FadeInRight {
39
39
  return new FadeInRight();
40
40
  }
41
41
 
42
- build: EntryExitAnimationBuild = () => {
42
+ build = (): EntryExitAnimationFunction => {
43
43
  const delayFunction = this.getDelayFunction();
44
44
  const [animation, config] = this.getAnimationAndConfig();
45
45
  const callback = this.callbackV;
46
- const delay = this.delayV;
46
+ const delay = this.getDelay();
47
47
 
48
48
  return () => {
49
49
  'worklet';
@@ -65,17 +65,17 @@ export class FadeInRight
65
65
  }
66
66
 
67
67
  export class FadeInLeft
68
- extends BaseAnimationBuilder
68
+ extends ComplexAnimationBuilder
69
69
  implements IEntryExitAnimationBuilder {
70
70
  static createInstance(): FadeInLeft {
71
71
  return new FadeInLeft();
72
72
  }
73
73
 
74
- build: EntryExitAnimationBuild = () => {
74
+ build = (): EntryExitAnimationFunction => {
75
75
  const delayFunction = this.getDelayFunction();
76
76
  const [animation, config] = this.getAnimationAndConfig();
77
77
  const callback = this.callbackV;
78
- const delay = this.delayV;
78
+ const delay = this.getDelay();
79
79
 
80
80
  return () => {
81
81
  'worklet';
@@ -97,17 +97,17 @@ export class FadeInLeft
97
97
  }
98
98
 
99
99
  export class FadeInUp
100
- extends BaseAnimationBuilder
100
+ extends ComplexAnimationBuilder
101
101
  implements IEntryExitAnimationBuilder {
102
102
  static createInstance(): FadeInUp {
103
103
  return new FadeInUp();
104
104
  }
105
105
 
106
- build: EntryExitAnimationBuild = () => {
106
+ build = (): EntryExitAnimationFunction => {
107
107
  const delayFunction = this.getDelayFunction();
108
108
  const [animation, config] = this.getAnimationAndConfig();
109
109
  const callback = this.callbackV;
110
- const delay = this.delayV;
110
+ const delay = this.getDelay();
111
111
 
112
112
  return () => {
113
113
  'worklet';
@@ -129,17 +129,17 @@ export class FadeInUp
129
129
  }
130
130
 
131
131
  export class FadeInDown
132
- extends BaseAnimationBuilder
132
+ extends ComplexAnimationBuilder
133
133
  implements IEntryExitAnimationBuilder {
134
134
  static createInstance(): FadeInDown {
135
135
  return new FadeInDown();
136
136
  }
137
137
 
138
- build: EntryExitAnimationBuild = () => {
138
+ build = (): EntryExitAnimationFunction => {
139
139
  const delayFunction = this.getDelayFunction();
140
140
  const [animation, config] = this.getAnimationAndConfig();
141
141
  const callback = this.callbackV;
142
- const delay = this.delayV;
142
+ const delay = this.getDelay();
143
143
 
144
144
  return () => {
145
145
  'worklet';
@@ -161,17 +161,17 @@ export class FadeInDown
161
161
  }
162
162
 
163
163
  export class FadeOut
164
- extends BaseAnimationBuilder
164
+ extends ComplexAnimationBuilder
165
165
  implements IEntryExitAnimationBuilder {
166
166
  static createInstance(): FadeOut {
167
167
  return new FadeOut();
168
168
  }
169
169
 
170
- build: EntryExitAnimationBuild = () => {
170
+ build = (): EntryExitAnimationFunction => {
171
171
  const delayFunction = this.getDelayFunction();
172
172
  const [animation, config] = this.getAnimationAndConfig();
173
173
  const callback = this.callbackV;
174
- const delay = this.delayV;
174
+ const delay = this.getDelay();
175
175
 
176
176
  return (_) => {
177
177
  'worklet';
@@ -189,17 +189,17 @@ export class FadeOut
189
189
  }
190
190
 
191
191
  export class FadeOutRight
192
- extends BaseAnimationBuilder
192
+ extends ComplexAnimationBuilder
193
193
  implements IEntryExitAnimationBuilder {
194
194
  static createInstance(): FadeOutRight {
195
195
  return new FadeOutRight();
196
196
  }
197
197
 
198
- build: EntryExitAnimationBuild = () => {
198
+ build = (): EntryExitAnimationFunction => {
199
199
  const delayFunction = this.getDelayFunction();
200
200
  const [animation, config] = this.getAnimationAndConfig();
201
201
  const callback = this.callbackV;
202
- const delay = this.delayV;
202
+ const delay = this.getDelay();
203
203
 
204
204
  return () => {
205
205
  'worklet';
@@ -221,17 +221,17 @@ export class FadeOutRight
221
221
  }
222
222
 
223
223
  export class FadeOutLeft
224
- extends BaseAnimationBuilder
224
+ extends ComplexAnimationBuilder
225
225
  implements IEntryExitAnimationBuilder {
226
226
  static createInstance(): FadeOutLeft {
227
227
  return new FadeOutLeft();
228
228
  }
229
229
 
230
- build: EntryExitAnimationBuild = () => {
230
+ build = (): EntryExitAnimationFunction => {
231
231
  const delayFunction = this.getDelayFunction();
232
232
  const [animation, config] = this.getAnimationAndConfig();
233
233
  const callback = this.callbackV;
234
- const delay = this.delayV;
234
+ const delay = this.getDelay();
235
235
 
236
236
  return () => {
237
237
  'worklet';
@@ -253,17 +253,17 @@ export class FadeOutLeft
253
253
  }
254
254
 
255
255
  export class FadeOutUp
256
- extends BaseAnimationBuilder
256
+ extends ComplexAnimationBuilder
257
257
  implements IEntryExitAnimationBuilder {
258
258
  static createInstance(): FadeOutUp {
259
259
  return new FadeOutUp();
260
260
  }
261
261
 
262
- build: EntryExitAnimationBuild = () => {
262
+ build = (): EntryExitAnimationFunction => {
263
263
  const delayFunction = this.getDelayFunction();
264
264
  const [animation, config] = this.getAnimationAndConfig();
265
265
  const callback = this.callbackV;
266
- const delay = this.delayV;
266
+ const delay = this.getDelay();
267
267
 
268
268
  return () => {
269
269
  'worklet';
@@ -285,17 +285,17 @@ export class FadeOutUp
285
285
  }
286
286
 
287
287
  export class FadeOutDown
288
- extends BaseAnimationBuilder
288
+ extends ComplexAnimationBuilder
289
289
  implements IEntryExitAnimationBuilder {
290
290
  static createInstance(): FadeOutDown {
291
291
  return new FadeOutDown();
292
292
  }
293
293
 
294
- build: EntryExitAnimationBuild = () => {
294
+ build = (): EntryExitAnimationFunction => {
295
295
  const delayFunction = this.getDelayFunction();
296
296
  const [animation, config] = this.getAnimationAndConfig();
297
297
  const callback = this.callbackV;
298
- const delay = this.delayV;
298
+ const delay = this.getDelay();
299
299
 
300
300
  return () => {
301
301
  'worklet';
@@ -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 FlipInXUp
8
- extends BaseAnimationBuilder
8
+ extends ComplexAnimationBuilder
9
9
  implements IEntryExitAnimationBuilder {
10
10
  static createInstance(): FlipInXUp {
11
11
  return new FlipInXUp();
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 (targetValues) => {
@@ -41,16 +41,16 @@ export class FlipInXUp
41
41
  }
42
42
 
43
43
  export class FlipInYLeft
44
- extends BaseAnimationBuilder
44
+ extends ComplexAnimationBuilder
45
45
  implements IEntryExitAnimationBuilder {
46
46
  static createInstance(): FlipInYLeft {
47
47
  return new FlipInYLeft();
48
48
  }
49
49
 
50
- build: EntryExitAnimationBuild = () => {
50
+ build = (): EntryExitAnimationFunction => {
51
51
  const delayFunction = this.getDelayFunction();
52
52
  const [animation, config] = this.getAnimationAndConfig();
53
- const delay = this.delayV;
53
+ const delay = this.getDelay();
54
54
  const callback = this.callbackV;
55
55
 
56
56
  return (targetValues) => {
@@ -77,16 +77,16 @@ export class FlipInYLeft
77
77
  }
78
78
 
79
79
  export class FlipInXDown
80
- extends BaseAnimationBuilder
80
+ extends ComplexAnimationBuilder
81
81
  implements IEntryExitAnimationBuilder {
82
82
  static createInstance(): FlipInXDown {
83
83
  return new FlipInXDown();
84
84
  }
85
85
 
86
- build: EntryExitAnimationBuild = () => {
86
+ build = (): EntryExitAnimationFunction => {
87
87
  const delayFunction = this.getDelayFunction();
88
88
  const [animation, config] = this.getAnimationAndConfig();
89
- const delay = this.delayV;
89
+ const delay = this.getDelay();
90
90
  const callback = this.callbackV;
91
91
 
92
92
  return (targetValues) => {
@@ -113,16 +113,16 @@ export class FlipInXDown
113
113
  }
114
114
 
115
115
  export class FlipInYRight
116
- extends BaseAnimationBuilder
116
+ extends ComplexAnimationBuilder
117
117
  implements IEntryExitAnimationBuilder {
118
118
  static createInstance(): FlipInYRight {
119
119
  return new FlipInYRight();
120
120
  }
121
121
 
122
- build: EntryExitAnimationBuild = () => {
122
+ build = (): EntryExitAnimationFunction => {
123
123
  const delayFunction = this.getDelayFunction();
124
124
  const [animation, config] = this.getAnimationAndConfig();
125
- const delay = this.delayV;
125
+ const delay = this.getDelay();
126
126
  const callback = this.callbackV;
127
127
 
128
128
  return (targetValues) => {
@@ -149,16 +149,16 @@ export class FlipInYRight
149
149
  }
150
150
 
151
151
  export class FlipInEasyX
152
- extends BaseAnimationBuilder
152
+ extends ComplexAnimationBuilder
153
153
  implements IEntryExitAnimationBuilder {
154
154
  static createInstance(): FlipInEasyX {
155
155
  return new FlipInEasyX();
156
156
  }
157
157
 
158
- build: EntryExitAnimationBuild = () => {
158
+ build = (): EntryExitAnimationFunction => {
159
159
  const delayFunction = this.getDelayFunction();
160
160
  const [animation, config] = this.getAnimationAndConfig();
161
- const delay = this.delayV;
161
+ const delay = this.getDelay();
162
162
  const callback = this.callbackV;
163
163
 
164
164
  return () => {
@@ -180,16 +180,16 @@ export class FlipInEasyX
180
180
  }
181
181
 
182
182
  export class FlipInEasyY
183
- extends BaseAnimationBuilder
183
+ extends ComplexAnimationBuilder
184
184
  implements IEntryExitAnimationBuilder {
185
185
  static createInstance(): FlipInEasyY {
186
186
  return new FlipInEasyY();
187
187
  }
188
188
 
189
- build: EntryExitAnimationBuild = () => {
189
+ build = (): EntryExitAnimationFunction => {
190
190
  const delayFunction = this.getDelayFunction();
191
191
  const [animation, config] = this.getAnimationAndConfig();
192
- const delay = this.delayV;
192
+ const delay = this.getDelay();
193
193
  const callback = this.callbackV;
194
194
 
195
195
  return () => {
@@ -211,16 +211,16 @@ export class FlipInEasyY
211
211
  }
212
212
 
213
213
  export class FlipOutXUp
214
- extends BaseAnimationBuilder
214
+ extends ComplexAnimationBuilder
215
215
  implements IEntryExitAnimationBuilder {
216
216
  static createInstance(): FlipOutXUp {
217
217
  return new FlipOutXUp();
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 (targetValues) => {
@@ -252,16 +252,16 @@ export class FlipOutXUp
252
252
  }
253
253
 
254
254
  export class FlipOutYLeft
255
- extends BaseAnimationBuilder
255
+ extends ComplexAnimationBuilder
256
256
  implements IEntryExitAnimationBuilder {
257
257
  static createInstance(): FlipOutYLeft {
258
258
  return new FlipOutYLeft();
259
259
  }
260
260
 
261
- build: EntryExitAnimationBuild = () => {
261
+ build = (): EntryExitAnimationFunction => {
262
262
  const delayFunction = this.getDelayFunction();
263
263
  const [animation, config] = this.getAnimationAndConfig();
264
- const delay = this.delayV;
264
+ const delay = this.getDelay();
265
265
  const callback = this.callbackV;
266
266
 
267
267
  return (targetValues) => {
@@ -293,16 +293,16 @@ export class FlipOutYLeft
293
293
  }
294
294
 
295
295
  export class FlipOutXDown
296
- extends BaseAnimationBuilder
296
+ extends ComplexAnimationBuilder
297
297
  implements IEntryExitAnimationBuilder {
298
298
  static createInstance(): FlipOutXDown {
299
299
  return new FlipOutXDown();
300
300
  }
301
301
 
302
- build: EntryExitAnimationBuild = () => {
302
+ build = (): EntryExitAnimationFunction => {
303
303
  const delayFunction = this.getDelayFunction();
304
304
  const [animation, config] = this.getAnimationAndConfig();
305
- const delay = this.delayV;
305
+ const delay = this.getDelay();
306
306
  const callback = this.callbackV;
307
307
 
308
308
  return (targetValues) => {
@@ -334,16 +334,16 @@ export class FlipOutXDown
334
334
  }
335
335
 
336
336
  export class FlipOutYRight
337
- extends BaseAnimationBuilder
337
+ extends ComplexAnimationBuilder
338
338
  implements IEntryExitAnimationBuilder {
339
339
  static createInstance(): FlipOutYRight {
340
340
  return new FlipOutYRight();
341
341
  }
342
342
 
343
- build: EntryExitAnimationBuild = () => {
343
+ build = (): EntryExitAnimationFunction => {
344
344
  const delayFunction = this.getDelayFunction();
345
345
  const [animation, config] = this.getAnimationAndConfig();
346
- const delay = this.delayV;
346
+ const delay = this.getDelay();
347
347
  const callback = this.callbackV;
348
348
 
349
349
  return (targetValues) => {
@@ -375,16 +375,16 @@ export class FlipOutYRight
375
375
  }
376
376
 
377
377
  export class FlipOutEasyX
378
- extends BaseAnimationBuilder
378
+ extends ComplexAnimationBuilder
379
379
  implements IEntryExitAnimationBuilder {
380
380
  static createInstance(): FlipOutEasyX {
381
381
  return new FlipOutEasyX();
382
382
  }
383
383
 
384
- build: EntryExitAnimationBuild = () => {
384
+ build = (): EntryExitAnimationFunction => {
385
385
  const delayFunction = this.getDelayFunction();
386
386
  const [animation, config] = this.getAnimationAndConfig();
387
- const delay = this.delayV;
387
+ const delay = this.getDelay();
388
388
  const callback = this.callbackV;
389
389
 
390
390
  return () => {
@@ -406,16 +406,16 @@ export class FlipOutEasyX
406
406
  }
407
407
 
408
408
  export class FlipOutEasyY
409
- extends BaseAnimationBuilder
409
+ extends ComplexAnimationBuilder
410
410
  implements IEntryExitAnimationBuilder {
411
411
  static createInstance(): FlipOutEasyY {
412
412
  return new FlipOutEasyY();
413
413
  }
414
414
 
415
- build: EntryExitAnimationBuild = () => {
415
+ build = (): EntryExitAnimationFunction => {
416
416
  const delayFunction = this.getDelayFunction();
417
417
  const [animation, config] = this.getAnimationAndConfig();
418
- const delay = this.delayV;
418
+ const delay = this.getDelay();
419
419
  const callback = this.callbackV;
420
420
 
421
421
  return () => {
@@ -1,44 +1,46 @@
1
1
  import { Dimensions } from 'react-native';
2
2
  import { withSequence, withTiming } from '../../animation';
3
- import { BaseAnimationBuilder } from '../animationBuilder/BaseAnimationBuilder';
3
+ import { ComplexAnimationBuilder } from '../animationBuilder';
4
4
  import {
5
- EntryExitAnimationBuild,
5
+ EntryExitAnimationFunction,
6
6
  IEntryExitAnimationBuilder,
7
7
  } from '../animationBuilder/commonTypes';
8
8
 
9
9
  const { width } = Dimensions.get('window');
10
10
 
11
11
  export class LightSpeedInRight
12
- extends BaseAnimationBuilder
12
+ extends ComplexAnimationBuilder
13
13
  implements IEntryExitAnimationBuilder {
14
14
  static createInstance(): LightSpeedInRight {
15
15
  return new LightSpeedInRight();
16
16
  }
17
17
 
18
- build: EntryExitAnimationBuild = () => {
18
+ build = (): EntryExitAnimationFunction => {
19
19
  const delayFunction = this.getDelayFunction();
20
20
  const [animation, config] = this.getAnimationAndConfig();
21
- const delay = this.delayV;
22
- const duration = this.durationV ? this.durationV : 250;
21
+ const delay = this.getDelay();
22
+ const duration = this.getDuration();
23
23
  const callback = this.callbackV;
24
24
 
25
25
  return () => {
26
26
  'worklet';
27
27
  return {
28
28
  animations: {
29
- opacity: delayFunction(
30
- delay,
31
- withTiming(1, { duration: duration * 1.5 })
32
- ),
29
+ opacity: delayFunction(delay, withTiming(1, { duration: duration })),
33
30
  transform: [
34
- { translateX: delayFunction(delay, animation(0, config)) },
31
+ {
32
+ translateX: delayFunction(
33
+ delay,
34
+ animation(0, { ...config, duration: duration * 0.7 })
35
+ ),
36
+ },
35
37
  {
36
38
  skewX: delayFunction(
37
39
  delay,
38
40
  withSequence(
39
- withTiming('10deg', { duration: duration }),
40
- withTiming('-5deg', { duration: duration / 5 }),
41
- withTiming('0deg', { duration: duration / 5 })
41
+ withTiming('10deg', { duration: duration * 0.7 }),
42
+ withTiming('-5deg', { duration: duration * 0.15 }),
43
+ withTiming('0deg', { duration: duration * 0.15 })
42
44
  )
43
45
  ),
44
46
  },
@@ -55,38 +57,38 @@ export class LightSpeedInRight
55
57
  }
56
58
 
57
59
  export class LightSpeedInLeft
58
- extends BaseAnimationBuilder
60
+ extends ComplexAnimationBuilder
59
61
  implements IEntryExitAnimationBuilder {
60
62
  static createInstance(): LightSpeedInLeft {
61
63
  return new LightSpeedInLeft();
62
64
  }
63
65
 
64
- build: EntryExitAnimationBuild = () => {
66
+ build = (): EntryExitAnimationFunction => {
65
67
  const delayFunction = this.getDelayFunction();
66
68
  const [animation, config] = this.getAnimationAndConfig();
67
- const delay = this.delayV;
68
- const duration = this.durationV ? this.durationV : 250;
69
+ const delay = this.getDelay();
70
+ const duration = this.getDuration();
69
71
  const callback = this.callbackV;
70
72
 
71
73
  return () => {
72
74
  'worklet';
73
75
  return {
74
76
  animations: {
75
- opacity: delayFunction(
76
- delay,
77
- withTiming(1, { duration: duration * 1.5 })
78
- ),
77
+ opacity: delayFunction(delay, withTiming(1, { duration: duration })),
79
78
  transform: [
80
79
  {
81
- translateX: delayFunction(delay, animation(0, config)),
80
+ translateX: delayFunction(
81
+ delay,
82
+ animation(0, { ...config, duration: duration * 0.7 })
83
+ ),
82
84
  },
83
85
  {
84
86
  skewX: delayFunction(
85
87
  delay,
86
88
  withSequence(
87
- withTiming('-10deg', { duration: duration }),
88
- withTiming('5deg', { duration: duration / 5 }),
89
- withTiming('0deg', { duration: duration / 5 })
89
+ withTiming('-10deg', { duration: duration * 0.7 }),
90
+ withTiming('5deg', { duration: duration * 0.15 }),
91
+ withTiming('0deg', { duration: duration * 0.15 })
90
92
  )
91
93
  ),
92
94
  },
@@ -103,16 +105,16 @@ export class LightSpeedInLeft
103
105
  }
104
106
 
105
107
  export class LightSpeedOutRight
106
- extends BaseAnimationBuilder
108
+ extends ComplexAnimationBuilder
107
109
  implements IEntryExitAnimationBuilder {
108
110
  static createInstance(): LightSpeedOutRight {
109
111
  return new LightSpeedOutRight();
110
112
  }
111
113
 
112
- build: EntryExitAnimationBuild = () => {
114
+ build = (): EntryExitAnimationFunction => {
113
115
  const delayFunction = this.getDelayFunction();
114
116
  const [animation, config] = this.getAnimationAndConfig();
115
- const delay = this.delayV;
117
+ const delay = this.getDelay();
116
118
  const callback = this.callbackV;
117
119
 
118
120
  return () => {
@@ -140,16 +142,16 @@ export class LightSpeedOutRight
140
142
  }
141
143
 
142
144
  export class LightSpeedOutLeft
143
- extends BaseAnimationBuilder
145
+ extends ComplexAnimationBuilder
144
146
  implements IEntryExitAnimationBuilder {
145
147
  static createInstance(): LightSpeedOutLeft {
146
148
  return new LightSpeedOutLeft();
147
149
  }
148
150
 
149
- build: EntryExitAnimationBuild = () => {
151
+ build = (): EntryExitAnimationFunction => {
150
152
  const delayFunction = this.getDelayFunction();
151
153
  const [animation, config] = this.getAnimationAndConfig();
152
- const delay = this.delayV;
154
+ const delay = this.getDelay();
153
155
  const callback = this.callbackV;
154
156
 
155
157
  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 PinwheelIn
8
- extends BaseAnimationBuilder
8
+ extends ComplexAnimationBuilder
9
9
  implements IEntryExitAnimationBuilder {
10
10
  static createInstance(): PinwheelIn {
11
11
  return new PinwheelIn();
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) => {
@@ -49,16 +49,16 @@ export class PinwheelIn
49
49
  }
50
50
 
51
51
  export class PinwheelOut
52
- extends BaseAnimationBuilder
52
+ extends ComplexAnimationBuilder
53
53
  implements IEntryExitAnimationBuilder {
54
54
  static createInstance(): PinwheelOut {
55
55
  return new PinwheelOut();
56
56
  }
57
57
 
58
- build: EntryExitAnimationBuild = () => {
58
+ build = (): EntryExitAnimationFunction => {
59
59
  const delayFunction = this.getDelayFunction();
60
60
  const [animation, config] = this.getAnimationAndConfig();
61
- const delay = this.delayV;
61
+ const delay = this.getDelay();
62
62
  const callback = this.callbackV;
63
63
 
64
64
  return (_values) => {