react-native-reanimated 3.0.0-rc.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +30 -12
  2. package/Common/cpp/AnimatedSensor/AnimatedSensorModule.h +2 -0
  3. package/Common/cpp/Fabric/FabricUtils.cpp +3 -107
  4. package/Common/cpp/Fabric/FabricUtils.h +3 -24
  5. package/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp +54 -37
  6. package/Common/cpp/LayoutAnimations/LayoutAnimationType.h +8 -0
  7. package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.cpp +81 -26
  8. package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.h +20 -3
  9. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +122 -121
  10. package/Common/cpp/NativeModules/NativeReanimatedModule.h +21 -14
  11. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +15 -7
  12. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.h +8 -4
  13. package/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp +50 -1
  14. package/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.h +10 -1
  15. package/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp +5 -1
  16. package/Common/cpp/Registries/EventHandlerRegistry.cpp +8 -34
  17. package/Common/cpp/Registries/EventHandlerRegistry.h +7 -13
  18. package/Common/cpp/SharedItems/Shareables.cpp +11 -63
  19. package/Common/cpp/SharedItems/Shareables.h +113 -93
  20. package/Common/cpp/Tools/CollectionUtils.h +14 -0
  21. package/Common/cpp/Tools/JsiUtils.cpp +26 -0
  22. package/Common/cpp/Tools/JsiUtils.h +176 -0
  23. package/Common/cpp/Tools/PlatformDepMethodsHolder.h +5 -5
  24. package/Common/cpp/Tools/ReanimatedVersion.cpp +17 -0
  25. package/Common/cpp/Tools/ReanimatedVersion.h +11 -0
  26. package/Common/cpp/Tools/RuntimeDecorator.cpp +67 -247
  27. package/Common/cpp/Tools/RuntimeDecorator.h +2 -3
  28. package/Common/cpp/Tools/WorkletEventHandler.cpp +3 -2
  29. package/Common/cpp/Tools/WorkletEventHandler.h +14 -6
  30. package/RNReanimated.podspec +2 -1
  31. package/android/CMakeLists.txt +188 -181
  32. package/android/build.gradle +362 -311
  33. package/android/proguard-rules.pro +2 -0
  34. package/android/src/fabric/java/com/swmansion/reanimated/NativeProxy.java +63 -295
  35. package/android/src/main/cpp/LayoutAnimations.cpp +35 -5
  36. package/android/src/main/cpp/LayoutAnimations.h +23 -6
  37. package/android/src/main/cpp/NativeProxy.cpp +143 -98
  38. package/android/src/main/cpp/NativeProxy.h +22 -28
  39. package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +5 -4
  40. package/android/src/main/java/com/swmansion/reanimated/Utils.java +7 -1
  41. package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +10 -3
  42. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +218 -35
  43. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +43 -17
  44. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/NativeMethodsHolder.java +6 -2
  45. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedElement.java +19 -0
  46. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedTransitionManager.java +610 -0
  47. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/Snapshot.java +93 -23
  48. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/AnimationFrameCallback.java +19 -0
  49. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/EventHandler.java +35 -0
  50. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/KeyboardEventDataUpdater.java +16 -0
  51. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +206 -0
  52. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/SensorSetter.java +17 -0
  53. package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +9 -3
  54. package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorContainer.java +3 -4
  55. package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +31 -7
  56. package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +90 -307
  57. package/android/src/reactNativeVersionPatch/ReanimatedUIManager/70/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +16 -0
  58. package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +63 -0
  59. package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +271 -0
  60. package/android/src/reactNativeVersionPatch/nativeHierarchyManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +76 -20
  61. package/ios/LayoutReanimation/REAAnimationsManager.h +31 -5
  62. package/ios/LayoutReanimation/REAAnimationsManager.m +265 -77
  63. package/ios/LayoutReanimation/REAFrame.h +10 -0
  64. package/ios/LayoutReanimation/REAFrame.m +15 -0
  65. package/ios/LayoutReanimation/REAScreensHelper.h +19 -0
  66. package/ios/LayoutReanimation/REAScreensHelper.m +106 -0
  67. package/ios/LayoutReanimation/REASharedElement.h +15 -0
  68. package/ios/LayoutReanimation/REASharedElement.m +16 -0
  69. package/ios/LayoutReanimation/REASharedTransitionManager.h +17 -0
  70. package/ios/LayoutReanimation/REASharedTransitionManager.m +632 -0
  71. package/ios/LayoutReanimation/REASnapshot.h +1 -0
  72. package/ios/LayoutReanimation/REASnapshot.m +96 -11
  73. package/ios/LayoutReanimation/REAUIManager.mm +67 -60
  74. package/ios/REAModule.mm +2 -7
  75. package/ios/REANodesManager.mm +1 -21
  76. package/ios/keyboardObserver/REAKeyboardEventObserver.m +72 -36
  77. package/ios/native/NativeProxy.mm +75 -114
  78. package/ios/native/REAInitializer.mm +2 -7
  79. package/ios/native/REAJSIUtils.h +60 -2
  80. package/ios/sensor/ReanimatedSensor.h +6 -2
  81. package/ios/sensor/ReanimatedSensor.m +43 -7
  82. package/ios/sensor/ReanimatedSensorContainer.h +4 -1
  83. package/ios/sensor/ReanimatedSensorContainer.m +8 -2
  84. package/lib/commonjs/createAnimatedComponent.js +232 -28
  85. package/lib/commonjs/createAnimatedComponent.js.map +1 -1
  86. package/lib/commonjs/reanimated2/Colors.js +43 -22
  87. package/lib/commonjs/reanimated2/Colors.js.map +1 -1
  88. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +18 -35
  89. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
  90. package/lib/commonjs/reanimated2/animation/styleAnimation.js +5 -1
  91. package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -1
  92. package/lib/commonjs/reanimated2/animation/util.js +17 -15
  93. package/lib/commonjs/reanimated2/animation/util.js.map +1 -1
  94. package/lib/commonjs/reanimated2/commonTypes.js +33 -1
  95. package/lib/commonjs/reanimated2/commonTypes.js.map +1 -1
  96. package/lib/commonjs/reanimated2/component/FlatList.js +19 -3
  97. package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -1
  98. package/lib/commonjs/reanimated2/core.js +34 -83
  99. package/lib/commonjs/reanimated2/core.js.map +1 -1
  100. package/lib/commonjs/reanimated2/errors.js +66 -0
  101. package/lib/commonjs/reanimated2/errors.js.map +1 -0
  102. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +2 -2
  103. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
  104. package/lib/commonjs/reanimated2/globals.d.js.map +1 -1
  105. package/lib/commonjs/reanimated2/hook/index.js +0 -6
  106. package/lib/commonjs/reanimated2/hook/index.js.map +1 -1
  107. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +5 -2
  108. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
  109. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +13 -1
  110. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -1
  111. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +1 -1
  112. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -1
  113. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +89 -16
  114. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -1
  115. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +43 -50
  116. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -1
  117. package/lib/commonjs/reanimated2/hook/useDerivedValue.js +13 -1
  118. package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -1
  119. package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js +2 -2
  120. package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  121. package/lib/commonjs/reanimated2/hook/utils.js +18 -65
  122. package/lib/commonjs/reanimated2/hook/utils.js.map +1 -1
  123. package/lib/commonjs/reanimated2/index.js +13 -0
  124. package/lib/commonjs/reanimated2/index.js.map +1 -1
  125. package/lib/commonjs/reanimated2/initializers.js +196 -0
  126. package/lib/commonjs/reanimated2/initializers.js.map +1 -0
  127. package/lib/commonjs/reanimated2/interpolateColor.js +96 -19
  128. package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -1
  129. package/lib/commonjs/reanimated2/jestUtils.js +1 -1
  130. package/lib/commonjs/reanimated2/jestUtils.js.map +1 -1
  131. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +101 -16
  132. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
  133. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +22 -0
  134. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -1
  135. package/lib/commonjs/reanimated2/js-reanimated/WebSensor.js +2 -0
  136. package/lib/commonjs/reanimated2/js-reanimated/WebSensor.js.map +1 -0
  137. package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js.map +1 -1
  138. package/lib/commonjs/reanimated2/js-reanimated/global.js +4 -9
  139. package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -1
  140. package/lib/commonjs/reanimated2/js-reanimated/index.js +0 -1
  141. package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -1
  142. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +11 -0
  143. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
  144. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +8 -0
  145. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
  146. package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js +16 -12
  147. package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
  148. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +16 -23
  149. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
  150. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +8 -14
  151. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
  152. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +8 -14
  153. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  154. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +8 -15
  155. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
  156. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +16 -23
  157. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
  158. package/lib/commonjs/reanimated2/layoutReanimation/index.js +13 -0
  159. package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -1
  160. package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js +94 -0
  161. package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -0
  162. package/lib/commonjs/reanimated2/mappers.js +18 -6
  163. package/lib/commonjs/reanimated2/mappers.js.map +1 -1
  164. package/lib/commonjs/reanimated2/mock.js +45 -0
  165. package/lib/commonjs/reanimated2/mock.js.map +1 -1
  166. package/lib/commonjs/reanimated2/mutables.js +4 -2
  167. package/lib/commonjs/reanimated2/mutables.js.map +1 -1
  168. package/lib/commonjs/reanimated2/platform-specific/checkVersion.js +42 -0
  169. package/lib/commonjs/reanimated2/platform-specific/checkVersion.js.map +1 -0
  170. package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js +15 -0
  171. package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js.map +1 -0
  172. package/lib/commonjs/reanimated2/pluginUtils.js +11 -0
  173. package/lib/commonjs/reanimated2/pluginUtils.js.map +1 -0
  174. package/lib/commonjs/reanimated2/shareables.js +38 -11
  175. package/lib/commonjs/reanimated2/shareables.js.map +1 -1
  176. package/lib/commonjs/reanimated2/threads.js +114 -4
  177. package/lib/commonjs/reanimated2/threads.js.map +1 -1
  178. package/lib/commonjs/reanimated2/utils.js +7 -0
  179. package/lib/commonjs/reanimated2/utils.js.map +1 -1
  180. package/lib/commonjs/reanimated2/valueSetter.js +1 -3
  181. package/lib/commonjs/reanimated2/valueSetter.js.map +1 -1
  182. package/lib/module/createAnimatedComponent.js +229 -29
  183. package/lib/module/createAnimatedComponent.js.map +1 -1
  184. package/lib/module/reanimated2/Colors.js +35 -19
  185. package/lib/module/reanimated2/Colors.js.map +1 -1
  186. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +18 -34
  187. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
  188. package/lib/module/reanimated2/animation/styleAnimation.js +5 -1
  189. package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
  190. package/lib/module/reanimated2/animation/util.js +17 -16
  191. package/lib/module/reanimated2/animation/util.js.map +1 -1
  192. package/lib/module/reanimated2/commonTypes.js +29 -0
  193. package/lib/module/reanimated2/commonTypes.js.map +1 -1
  194. package/lib/module/reanimated2/component/FlatList.js +18 -4
  195. package/lib/module/reanimated2/component/FlatList.js.map +1 -1
  196. package/lib/module/reanimated2/core.js +30 -76
  197. package/lib/module/reanimated2/core.js.map +1 -1
  198. package/lib/module/reanimated2/errors.js +58 -0
  199. package/lib/module/reanimated2/errors.js.map +1 -0
  200. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +2 -2
  201. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
  202. package/lib/module/reanimated2/globals.d.js.map +1 -1
  203. package/lib/module/reanimated2/hook/index.js +1 -1
  204. package/lib/module/reanimated2/hook/index.js.map +1 -1
  205. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +5 -2
  206. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
  207. package/lib/module/reanimated2/hook/useAnimatedReaction.js +12 -1
  208. package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
  209. package/lib/module/reanimated2/hook/useAnimatedRef.js +2 -2
  210. package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
  211. package/lib/module/reanimated2/hook/useAnimatedSensor.js +88 -13
  212. package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
  213. package/lib/module/reanimated2/hook/useAnimatedStyle.js +45 -52
  214. package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
  215. package/lib/module/reanimated2/hook/useDerivedValue.js +12 -1
  216. package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
  217. package/lib/module/reanimated2/hook/useScrollViewOffset.js +2 -2
  218. package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  219. package/lib/module/reanimated2/hook/utils.js +17 -60
  220. package/lib/module/reanimated2/hook/utils.js.map +1 -1
  221. package/lib/module/reanimated2/index.js +1 -0
  222. package/lib/module/reanimated2/index.js.map +1 -1
  223. package/lib/module/reanimated2/initializers.js +182 -0
  224. package/lib/module/reanimated2/initializers.js.map +1 -0
  225. package/lib/module/reanimated2/interpolateColor.js +96 -19
  226. package/lib/module/reanimated2/interpolateColor.js.map +1 -1
  227. package/lib/module/reanimated2/jestUtils.js +1 -1
  228. package/lib/module/reanimated2/jestUtils.js.map +1 -1
  229. package/lib/module/reanimated2/js-reanimated/JSReanimated.js +101 -16
  230. package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
  231. package/lib/module/reanimated2/js-reanimated/Mapper.js +21 -0
  232. package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -1
  233. package/lib/module/reanimated2/js-reanimated/WebSensor.js +2 -0
  234. package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -0
  235. package/lib/module/reanimated2/js-reanimated/commonTypes.js.map +1 -1
  236. package/lib/module/reanimated2/js-reanimated/global.js +4 -9
  237. package/lib/module/reanimated2/js-reanimated/global.js.map +1 -1
  238. package/lib/module/reanimated2/js-reanimated/index.js +0 -1
  239. package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
  240. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +9 -1
  241. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
  242. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js +1 -0
  243. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
  244. package/lib/module/reanimated2/layoutReanimation/animationsManager.js +15 -10
  245. package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
  246. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +16 -21
  247. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
  248. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +8 -12
  249. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
  250. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +8 -12
  251. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  252. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +8 -13
  253. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
  254. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +16 -21
  255. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
  256. package/lib/module/reanimated2/layoutReanimation/index.js +1 -0
  257. package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
  258. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js +82 -0
  259. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -0
  260. package/lib/module/reanimated2/mappers.js +16 -6
  261. package/lib/module/reanimated2/mappers.js.map +1 -1
  262. package/lib/module/reanimated2/mock.js +45 -0
  263. package/lib/module/reanimated2/mock.js.map +1 -1
  264. package/lib/module/reanimated2/mutables.js +4 -2
  265. package/lib/module/reanimated2/mutables.js.map +1 -1
  266. package/lib/module/reanimated2/platform-specific/checkVersion.js +35 -0
  267. package/lib/module/reanimated2/platform-specific/checkVersion.js.map +1 -0
  268. package/lib/module/reanimated2/platform-specific/checkVersion.web.js +8 -0
  269. package/lib/module/reanimated2/platform-specific/checkVersion.web.js.map +1 -0
  270. package/lib/module/reanimated2/pluginUtils.js +4 -0
  271. package/lib/module/reanimated2/pluginUtils.js.map +1 -0
  272. package/lib/module/reanimated2/shareables.js +38 -9
  273. package/lib/module/reanimated2/shareables.js.map +1 -1
  274. package/lib/module/reanimated2/threads.js +105 -4
  275. package/lib/module/reanimated2/threads.js.map +1 -1
  276. package/lib/module/reanimated2/utils.js +5 -0
  277. package/lib/module/reanimated2/utils.js.map +1 -1
  278. package/lib/module/reanimated2/valueSetter.js +1 -2
  279. package/lib/module/reanimated2/valueSetter.js.map +1 -1
  280. package/package.json +9 -8
  281. package/{plugin.js → plugin/index.js} +173 -228
  282. package/react-native-reanimated.d.ts +57 -10
  283. package/scripts/reanimated_utils.rb +15 -2
  284. package/src/createAnimatedComponent.tsx +238 -28
  285. package/src/reanimated2/Colors.ts +38 -11
  286. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +63 -41
  287. package/src/reanimated2/animation/styleAnimation.ts +8 -1
  288. package/src/reanimated2/animation/util.ts +29 -16
  289. package/src/reanimated2/commonTypes.ts +28 -1
  290. package/src/reanimated2/component/FlatList.tsx +30 -5
  291. package/src/reanimated2/core.ts +45 -75
  292. package/src/reanimated2/errors.ts +57 -0
  293. package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +2 -2
  294. package/src/reanimated2/globals.d.ts +34 -18
  295. package/src/reanimated2/hook/index.ts +1 -1
  296. package/src/reanimated2/hook/useAnimatedKeyboard.ts +10 -4
  297. package/src/reanimated2/hook/useAnimatedReaction.ts +12 -5
  298. package/src/reanimated2/hook/useAnimatedRef.ts +1 -4
  299. package/src/reanimated2/hook/useAnimatedSensor.ts +88 -11
  300. package/src/reanimated2/hook/useAnimatedStyle.ts +43 -45
  301. package/src/reanimated2/hook/useDerivedValue.ts +8 -1
  302. package/src/reanimated2/hook/useScrollViewOffset.ts +2 -2
  303. package/src/reanimated2/hook/utils.ts +15 -61
  304. package/src/reanimated2/index.ts +1 -0
  305. package/src/reanimated2/initializers.ts +184 -0
  306. package/src/reanimated2/interpolateColor.ts +104 -20
  307. package/src/reanimated2/jestUtils.ts +1 -1
  308. package/src/reanimated2/js-reanimated/JSReanimated.ts +105 -18
  309. package/src/reanimated2/js-reanimated/Mapper.ts +32 -0
  310. package/src/reanimated2/js-reanimated/WebSensor.ts +34 -0
  311. package/src/reanimated2/js-reanimated/commonTypes.ts +0 -1
  312. package/src/reanimated2/js-reanimated/global.ts +4 -8
  313. package/src/reanimated2/js-reanimated/index.ts +0 -1
  314. package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +13 -1
  315. package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +1 -0
  316. package/src/reanimated2/layoutReanimation/animationsManager.ts +17 -12
  317. package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +16 -19
  318. package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +14 -11
  319. package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +21 -11
  320. package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +32 -11
  321. package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +36 -19
  322. package/src/reanimated2/layoutReanimation/index.ts +1 -0
  323. package/src/reanimated2/layoutReanimation/sharedTransitions/index.ts +87 -0
  324. package/src/reanimated2/mappers.ts +17 -6
  325. package/src/reanimated2/mock.ts +128 -0
  326. package/src/reanimated2/mutables.ts +2 -0
  327. package/src/reanimated2/platform-specific/checkVersion.ts +39 -0
  328. package/src/reanimated2/platform-specific/checkVersion.web.ts +6 -0
  329. package/src/reanimated2/pluginUtils.ts +8 -0
  330. package/src/reanimated2/shareables.ts +47 -11
  331. package/src/reanimated2/threads.ts +103 -1
  332. package/src/reanimated2/utils.ts +6 -0
  333. package/src/reanimated2/valueSetter.ts +1 -2
  334. package/lib/commonjs/reanimated2/time.js +0 -55
  335. package/lib/commonjs/reanimated2/time.js.map +0 -1
  336. package/lib/module/reanimated2/time.js +0 -37
  337. package/lib/module/reanimated2/time.js.map +0 -1
  338. package/src/reanimated2/time.ts +0 -30
  339. /package/android/src/{main/java → reactNativeVersionPatch/ReanimatedUIManager/70}/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +0 -0
@@ -10,11 +10,6 @@ var _PlatformChecker = require("../PlatformChecker");
10
10
  // In order to keep bundle size down, we treat this file as a polyfill for Web.
11
11
  const initializeGlobalsForWeb = () => {
12
12
  if ((0, _PlatformChecker.shouldBeUseWeb)()) {
13
- global._frameTimestamp = null;
14
-
15
- global._setGlobalConsole = _val => {// noop
16
- };
17
-
18
13
  global._measure = () => {
19
14
  console.warn("[Reanimated] You can't use `measure` with Chrome Debugger or with web version");
20
15
  return {
@@ -43,10 +38,10 @@ const initializeGlobalsForWeb = () => {
43
38
  return true;
44
39
  };
45
40
  /*
46
- If a file doesn't export anything, tree shaking doesn't pack
47
- it into the JS bundle. In effect, the code inside of this file
48
- will never execute. That is why we wrapped initialization code
49
- into a function, and we call this one during creating
41
+ If a file doesn't export anything, tree shaking doesn't pack
42
+ it into the JS bundle. In effect, the code inside of this file
43
+ will never execute. That is why we wrapped initialization code
44
+ into a function, and we call this one during creating
50
45
  the module export object.
51
46
  */
52
47
 
@@ -1 +1 @@
1
- {"version":3,"names":["initializeGlobalsForWeb","shouldBeUseWeb","global","_frameTimestamp","_setGlobalConsole","_val","_measure","console","warn","x","y","width","height","pageX","pageY","_scrollTo","_dispatchCommand","_setGestureState"],"sources":["global.ts"],"sourcesContent":["// In order to keep bundle size down, we treat this file as a polyfill for Web.\n\nimport { shouldBeUseWeb } from '../PlatformChecker';\nconst initializeGlobalsForWeb = () => {\n if (shouldBeUseWeb()) {\n global._frameTimestamp = null;\n global._setGlobalConsole = (_val) => {\n // noop\n };\n global._measure = () => {\n console.warn(\n \"[Reanimated] You can't use `measure` with Chrome Debugger or with web version\"\n );\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n pageX: 0,\n pageY: 0,\n };\n };\n global._scrollTo = () => {\n console.warn(\n \"[Reanimated] You can't use `scrollTo` with Chrome Debugger or with web version\"\n );\n };\n global._dispatchCommand = () => {\n console.warn(\n \"[Reanimated] You can't use `scrollTo` or `dispatchCommand` methods with Chrome Debugger or with web version\"\n );\n };\n global._setGestureState = () => {\n console.warn(\n \"[Reanimated] You can't use `setGestureState` with Chrome Debugger or with web version\"\n );\n };\n }\n return true;\n};\n\n/*\n If a file doesn't export anything, tree shaking doesn't pack \n it into the JS bundle. In effect, the code inside of this file \n will never execute. That is why we wrapped initialization code \n into a function, and we call this one during creating \n the module export object.\n*/\n\nexport default initializeGlobalsForWeb();\n"],"mappings":";;;;;;;AAEA;;AAFA;AAGA,MAAMA,uBAAuB,GAAG,MAAM;EACpC,IAAI,IAAAC,+BAAA,GAAJ,EAAsB;IACpBC,MAAM,CAACC,eAAP,GAAyB,IAAzB;;IACAD,MAAM,CAACE,iBAAP,GAA4BC,IAAD,IAAU,CACnC;IACD,CAFD;;IAGAH,MAAM,CAACI,QAAP,GAAkB,MAAM;MACtBC,OAAO,CAACC,IAAR,CACE,+EADF;MAGA,OAAO;QACLC,CAAC,EAAE,CADE;QAELC,CAAC,EAAE,CAFE;QAGLC,KAAK,EAAE,CAHF;QAILC,MAAM,EAAE,CAJH;QAKLC,KAAK,EAAE,CALF;QAMLC,KAAK,EAAE;MANF,CAAP;IAQD,CAZD;;IAaAZ,MAAM,CAACa,SAAP,GAAmB,MAAM;MACvBR,OAAO,CAACC,IAAR,CACE,gFADF;IAGD,CAJD;;IAKAN,MAAM,CAACc,gBAAP,GAA0B,MAAM;MAC9BT,OAAO,CAACC,IAAR,CACE,6GADF;IAGD,CAJD;;IAKAN,MAAM,CAACe,gBAAP,GAA0B,MAAM;MAC9BV,OAAO,CAACC,IAAR,CACE,uFADF;IAGD,CAJD;EAKD;;EACD,OAAO,IAAP;AACD,CApCD;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;;;eAEeR,uBAAuB,E"}
1
+ {"version":3,"names":["initializeGlobalsForWeb","shouldBeUseWeb","global","_measure","console","warn","x","y","width","height","pageX","pageY","_scrollTo","_dispatchCommand","_setGestureState"],"sources":["global.ts"],"sourcesContent":["// In order to keep bundle size down, we treat this file as a polyfill for Web.\n\nimport { shouldBeUseWeb } from '../PlatformChecker';\nconst initializeGlobalsForWeb = () => {\n if (shouldBeUseWeb()) {\n global._measure = () => {\n console.warn(\n \"[Reanimated] You can't use `measure` with Chrome Debugger or with web version\"\n );\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n pageX: 0,\n pageY: 0,\n };\n };\n global._scrollTo = () => {\n console.warn(\n \"[Reanimated] You can't use `scrollTo` with Chrome Debugger or with web version\"\n );\n };\n global._dispatchCommand = () => {\n console.warn(\n \"[Reanimated] You can't use `scrollTo` or `dispatchCommand` methods with Chrome Debugger or with web version\"\n );\n };\n global._setGestureState = () => {\n console.warn(\n \"[Reanimated] You can't use `setGestureState` with Chrome Debugger or with web version\"\n );\n };\n }\n return true;\n};\n\n/*\n If a file doesn't export anything, tree shaking doesn't pack\n it into the JS bundle. In effect, the code inside of this file\n will never execute. That is why we wrapped initialization code\n into a function, and we call this one during creating\n the module export object.\n*/\n\nexport default initializeGlobalsForWeb();\n"],"mappings":";;;;;;;AAEA;;AAFA;AAGA,MAAMA,uBAAuB,GAAG,MAAM;EACpC,IAAI,IAAAC,+BAAA,GAAJ,EAAsB;IACpBC,MAAM,CAACC,QAAP,GAAkB,MAAM;MACtBC,OAAO,CAACC,IAAR,CACE,+EADF;MAGA,OAAO;QACLC,CAAC,EAAE,CADE;QAELC,CAAC,EAAE,CAFE;QAGLC,KAAK,EAAE,CAHF;QAILC,MAAM,EAAE,CAJH;QAKLC,KAAK,EAAE,CALF;QAMLC,KAAK,EAAE;MANF,CAAP;IAQD,CAZD;;IAaAT,MAAM,CAACU,SAAP,GAAmB,MAAM;MACvBR,OAAO,CAACC,IAAR,CACE,gFADF;IAGD,CAJD;;IAKAH,MAAM,CAACW,gBAAP,GAA0B,MAAM;MAC9BT,OAAO,CAACC,IAAR,CACE,6GADF;IAGD,CAJD;;IAKAH,MAAM,CAACY,gBAAP,GAA0B,MAAM;MAC9BV,OAAO,CAACC,IAAR,CACE,uFADF;IAGD,CAJD;EAKD;;EACD,OAAO,IAAP;AACD,CAhCD;AAkCA;AACA;AACA;AACA;AACA;AACA;AACA;;;eAEeL,uBAAuB,E"}
@@ -14,7 +14,6 @@ const reanimatedJS = new _JSReanimated.default();
14
14
  global._makeShareableClone = c => c;
15
15
 
16
16
  global._scheduleOnJS = setImmediate;
17
- global._getTimestamp = reanimatedJS.getTimestamp.bind(reanimatedJS);
18
17
 
19
18
  const _updatePropsJS = (updates, viewRef) => {
20
19
  if (viewRef._component) {
@@ -1 +1 @@
1
- {"version":3,"names":["reanimatedJS","JSReanimated","global","_makeShareableClone","c","_scheduleOnJS","setImmediate","_getTimestamp","getTimestamp","bind","_updatePropsJS","updates","viewRef","_component","component","rawStyles","Object","keys","reduce","acc","key","value","index","setNativeProps","props","length","forEach","dashedKey","replace","m","toLowerCase","_touchableNode","setAttribute","console","warn","style","previousStyle","currentStyle"],"sources":["index.ts"],"sourcesContent":["import JSReanimated from './JSReanimated';\nimport { AnimatedStyle, StyleProps } from '../commonTypes';\n\nconst reanimatedJS = new JSReanimated();\n\nglobal._makeShareableClone = (c) => c;\nglobal._scheduleOnJS = setImmediate;\nglobal._getTimestamp = reanimatedJS.getTimestamp.bind(reanimatedJS);\n\ninterface JSReanimatedComponent {\n previousStyle: StyleProps;\n setNativeProps: (style: StyleProps) => void;\n props: Record<string, string | number>;\n _touchableNode: {\n setAttribute: (key: string, props: unknown) => void;\n };\n}\n\nexport const _updatePropsJS = (\n updates: StyleProps | AnimatedStyle,\n viewRef: { _component?: JSReanimatedComponent }\n): void => {\n if (viewRef._component) {\n const component = viewRef._component;\n const [rawStyles] = Object.keys(updates).reduce(\n (acc: [StyleProps, AnimatedStyle], key) => {\n const value = updates[key];\n const index = typeof value === 'function' ? 1 : 0;\n acc[index][key] = value;\n return acc;\n },\n [{}, {}]\n );\n\n if (typeof component.setNativeProps === 'function') {\n setNativeProps(component, rawStyles);\n } else if (Object.keys(component.props).length > 0) {\n Object.keys(component.props).forEach((key) => {\n if (!rawStyles[key]) {\n return;\n }\n const dashedKey = key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());\n component._touchableNode.setAttribute(dashedKey, rawStyles[key]);\n });\n } else {\n console.warn('It is not possible to manipulate component');\n }\n }\n};\n\nconst setNativeProps = (\n component: JSReanimatedComponent,\n style: StyleProps\n): void => {\n const previousStyle = component.previousStyle ? component.previousStyle : {};\n const currentStyle = { ...previousStyle, ...style };\n component.previousStyle = currentStyle;\n component.setNativeProps({ style: currentStyle });\n};\n\nexport default reanimatedJS;\n"],"mappings":";;;;;;;AAAA;;;;AAGA,MAAMA,YAAY,GAAG,IAAIC,qBAAJ,EAArB;;AAEAC,MAAM,CAACC,mBAAP,GAA8BC,CAAD,IAAOA,CAApC;;AACAF,MAAM,CAACG,aAAP,GAAuBC,YAAvB;AACAJ,MAAM,CAACK,aAAP,GAAuBP,YAAY,CAACQ,YAAb,CAA0BC,IAA1B,CAA+BT,YAA/B,CAAvB;;AAWO,MAAMU,cAAc,GAAG,CAC5BC,OAD4B,EAE5BC,OAF4B,KAGnB;EACT,IAAIA,OAAO,CAACC,UAAZ,EAAwB;IACtB,MAAMC,SAAS,GAAGF,OAAO,CAACC,UAA1B;IACA,MAAM,CAACE,SAAD,IAAcC,MAAM,CAACC,IAAP,CAAYN,OAAZ,EAAqBO,MAArB,CAClB,CAACC,GAAD,EAAmCC,GAAnC,KAA2C;MACzC,MAAMC,KAAK,GAAGV,OAAO,CAACS,GAAD,CAArB;MACA,MAAME,KAAK,GAAG,OAAOD,KAAP,KAAiB,UAAjB,GAA8B,CAA9B,GAAkC,CAAhD;MACAF,GAAG,CAACG,KAAD,CAAH,CAAWF,GAAX,IAAkBC,KAAlB;MACA,OAAOF,GAAP;IACD,CANiB,EAOlB,CAAC,EAAD,EAAK,EAAL,CAPkB,CAApB;;IAUA,IAAI,OAAOL,SAAS,CAACS,cAAjB,KAAoC,UAAxC,EAAoD;MAClDA,cAAc,CAACT,SAAD,EAAYC,SAAZ,CAAd;IACD,CAFD,MAEO,IAAIC,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACU,KAAtB,EAA6BC,MAA7B,GAAsC,CAA1C,EAA6C;MAClDT,MAAM,CAACC,IAAP,CAAYH,SAAS,CAACU,KAAtB,EAA6BE,OAA7B,CAAsCN,GAAD,IAAS;QAC5C,IAAI,CAACL,SAAS,CAACK,GAAD,CAAd,EAAqB;UACnB;QACD;;QACD,MAAMO,SAAS,GAAGP,GAAG,CAACQ,OAAJ,CAAY,QAAZ,EAAuBC,CAAD,IAAO,MAAMA,CAAC,CAACC,WAAF,EAAnC,CAAlB;;QACAhB,SAAS,CAACiB,cAAV,CAAyBC,YAAzB,CAAsCL,SAAtC,EAAiDZ,SAAS,CAACK,GAAD,CAA1D;MACD,CAND;IAOD,CARM,MAQA;MACLa,OAAO,CAACC,IAAR,CAAa,4CAAb;IACD;EACF;AACF,CA9BM;;;;AAgCP,MAAMX,cAAc,GAAG,CACrBT,SADqB,EAErBqB,KAFqB,KAGZ;EACT,MAAMC,aAAa,GAAGtB,SAAS,CAACsB,aAAV,GAA0BtB,SAAS,CAACsB,aAApC,GAAoD,EAA1E;EACA,MAAMC,YAAY,GAAG,EAAE,GAAGD,aAAL;IAAoB,GAAGD;EAAvB,CAArB;EACArB,SAAS,CAACsB,aAAV,GAA0BC,YAA1B;EACAvB,SAAS,CAACS,cAAV,CAAyB;IAAEY,KAAK,EAAEE;EAAT,CAAzB;AACD,CARD;;eAUerC,Y"}
1
+ {"version":3,"names":["reanimatedJS","JSReanimated","global","_makeShareableClone","c","_scheduleOnJS","setImmediate","_updatePropsJS","updates","viewRef","_component","component","rawStyles","Object","keys","reduce","acc","key","value","index","setNativeProps","props","length","forEach","dashedKey","replace","m","toLowerCase","_touchableNode","setAttribute","console","warn","style","previousStyle","currentStyle"],"sources":["index.ts"],"sourcesContent":["import JSReanimated from './JSReanimated';\nimport { AnimatedStyle, StyleProps } from '../commonTypes';\n\nconst reanimatedJS = new JSReanimated();\n\nglobal._makeShareableClone = (c) => c;\nglobal._scheduleOnJS = setImmediate;\n\ninterface JSReanimatedComponent {\n previousStyle: StyleProps;\n setNativeProps: (style: StyleProps) => void;\n props: Record<string, string | number>;\n _touchableNode: {\n setAttribute: (key: string, props: unknown) => void;\n };\n}\n\nexport const _updatePropsJS = (\n updates: StyleProps | AnimatedStyle,\n viewRef: { _component?: JSReanimatedComponent }\n): void => {\n if (viewRef._component) {\n const component = viewRef._component;\n const [rawStyles] = Object.keys(updates).reduce(\n (acc: [StyleProps, AnimatedStyle], key) => {\n const value = updates[key];\n const index = typeof value === 'function' ? 1 : 0;\n acc[index][key] = value;\n return acc;\n },\n [{}, {}]\n );\n\n if (typeof component.setNativeProps === 'function') {\n setNativeProps(component, rawStyles);\n } else if (Object.keys(component.props).length > 0) {\n Object.keys(component.props).forEach((key) => {\n if (!rawStyles[key]) {\n return;\n }\n const dashedKey = key.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());\n component._touchableNode.setAttribute(dashedKey, rawStyles[key]);\n });\n } else {\n console.warn('It is not possible to manipulate component');\n }\n }\n};\n\nconst setNativeProps = (\n component: JSReanimatedComponent,\n style: StyleProps\n): void => {\n const previousStyle = component.previousStyle ? component.previousStyle : {};\n const currentStyle = { ...previousStyle, ...style };\n component.previousStyle = currentStyle;\n component.setNativeProps({ style: currentStyle });\n};\n\nexport default reanimatedJS;\n"],"mappings":";;;;;;;AAAA;;;;AAGA,MAAMA,YAAY,GAAG,IAAIC,qBAAJ,EAArB;;AAEAC,MAAM,CAACC,mBAAP,GAA8BC,CAAD,IAAOA,CAApC;;AACAF,MAAM,CAACG,aAAP,GAAuBC,YAAvB;;AAWO,MAAMC,cAAc,GAAG,CAC5BC,OAD4B,EAE5BC,OAF4B,KAGnB;EACT,IAAIA,OAAO,CAACC,UAAZ,EAAwB;IACtB,MAAMC,SAAS,GAAGF,OAAO,CAACC,UAA1B;IACA,MAAM,CAACE,SAAD,IAAcC,MAAM,CAACC,IAAP,CAAYN,OAAZ,EAAqBO,MAArB,CAClB,CAACC,GAAD,EAAmCC,GAAnC,KAA2C;MACzC,MAAMC,KAAK,GAAGV,OAAO,CAACS,GAAD,CAArB;MACA,MAAME,KAAK,GAAG,OAAOD,KAAP,KAAiB,UAAjB,GAA8B,CAA9B,GAAk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+ exports.LayoutAnimationType = void 0;
7
+ // this is just a temporary mock
8
+ let LayoutAnimationType;
9
+ exports.LayoutAnimationType = LayoutAnimationType;
10
+
11
+ (function (LayoutAnimationType) {
12
+ LayoutAnimationType[LayoutAnimationType["ENTERING"] = 1] = "ENTERING";
13
+ LayoutAnimationType[LayoutAnimationType["EXITING"] = 2] = "EXITING";
14
+ LayoutAnimationType[LayoutAnimationType["LAYOUT"] = 3] = "LAYOUT";
15
+ LayoutAnimationType[LayoutAnimationType["SHARED_ELEMENT_TRANSITION"] = 4] = "SHARED_ELEMENT_TRANSITION";
16
+ })(LayoutAnimationType || (exports.LayoutAnimationType = LayoutAnimationType = {}));
6
17
  //# sourceMappingURL=commonTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["commonTypes.ts"],"sourcesContent":["import { EasingFn } from '../../Easing';\nimport { StyleProps } from '../../commonTypes';\n\nexport interface KeyframeProps extends StyleProps {\n easing?: EasingFn;\n [key: string]: any;\n}\n\nexport type LayoutAnimation = {\n initialValues: StyleProps;\n animations: StyleProps;\n callback?: (finished: boolean) => void;\n};\n\nexport type AnimationFunction = (a?: any, b?: any, c?: any) => any; // this is just a temporary mock\n\nexport interface EntryAnimationsValues {\n targetOriginX: number;\n targetOriginY: number;\n targetWidth: number;\n targetHeight: number;\n targetGlobalOriginX: number;\n targetGlobalOriginY: number;\n}\n\nexport interface ExitAnimationsValues {\n currentOriginX: number;\n currentOriginY: number;\n currentWidth: number;\n currentHeight: number;\n currentGlobalOriginX: number;\n currentGlobalOriginY: number;\n}\n\nexport type EntryExitAnimationFunction = (\n targetValues: EntryAnimationsValues | ExitAnimationsValues\n) => LayoutAnimation;\n\nexport type AnimationConfigFunction<T> = (targetValues: T) => LayoutAnimation;\n\nexport interface LayoutAnimationsValues {\n currentOriginX: number;\n currentOriginY: number;\n currentWidth: number;\n currentHeight: number;\n currentGlobalOriginX: number;\n currentGlobalOriginY: number;\n targetOriginX: number;\n targetOriginY: number;\n targetWidth: number;\n targetHeight: number;\n targetGlobalOriginX: number;\n targetGlobalOriginY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport type LayoutAnimationFunction = (\n targetValues: LayoutAnimationsValues\n) => LayoutAnimation;\n\nexport type LayoutAnimationStartFunction = (\n tag: number,\n type: string,\n yogaValues: LayoutAnimationsValues,\n config: LayoutAnimationFunction\n) => void;\n\nexport interface ILayoutAnimationBuilder {\n build: () => LayoutAnimationFunction;\n}\n\nexport interface BaseLayoutAnimationConfig {\n duration?: number;\n easing?: EasingFn;\n type?: AnimationFunction;\n damping?: number;\n mass?: number;\n stiffness?: number;\n overshootClamping?: number;\n restDisplacementThreshold?: number;\n restSpeedThreshold?: number;\n}\n\nexport interface BaseBuilderAnimationConfig extends BaseLayoutAnimationConfig {\n rotate?: number | string;\n}\n\nexport type LayoutAnimationAndConfig = [\n AnimationFunction,\n BaseBuilderAnimationConfig\n];\n\nexport interface IEntryExitAnimationBuilder {\n build: () => EntryExitAnimationFunction;\n}\n\nexport interface IEntryAnimationBuilder {\n build: () => AnimationConfigFunction<EntryAnimationsValues>;\n}\n\nexport interface IExitAnimationBuilder {\n build: () => AnimationConfigFunction<ExitAnimationsValues>;\n}\n"],"mappings":""}
1
+ {"version":3,"names":["LayoutAnimationType"],"sources":["commonTypes.ts"],"sourcesContent":["import { EasingFn } from '../../Easing';\nimport { StyleProps } from '../../commonTypes';\n\nexport interface KeyframeProps extends StyleProps {\n easing?: EasingFn;\n [key: string]: any;\n}\n\nexport type LayoutAnimation = {\n initialValues: StyleProps;\n animations: StyleProps;\n callback?: (finished: boolean) => void;\n};\n\nexport type AnimationFunction = (a?: any, b?: any, c?: any) => any; // this is just a temporary mock\n\nexport interface EntryAnimationsValues {\n targetOriginX: number;\n targetOriginY: number;\n targetWidth: number;\n targetHeight: number;\n targetGlobalOriginX: number;\n targetGlobalOriginY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport interface ExitAnimationsValues {\n currentOriginX: number;\n currentOriginY: number;\n currentWidth: number;\n currentHeight: number;\n currentGlobalOriginX: number;\n currentGlobalOriginY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport type EntryExitAnimationFunction = (\n targetValues: EntryAnimationsValues | ExitAnimationsValues\n) => LayoutAnimation;\n\nexport type AnimationConfigFunction<T> = (targetValues: T) => LayoutAnimation;\n\nexport interface LayoutAnimationsValues {\n [key: string]: number;\n currentOriginX: number;\n currentOriginY: number;\n currentWidth: number;\n currentHeight: number;\n currentGlobalOriginX: number;\n currentGlobalOriginY: number;\n targetOriginX: number;\n targetOriginY: number;\n targetWidth: number;\n targetHeight: number;\n targetGlobalOriginX: number;\n targetGlobalOriginY: number;\n windowWidth: number;\n windowHeight: number;\n}\n\nexport enum LayoutAnimationType {\n ENTERING = 1,\n EXITING = 2,\n LAYOUT = 3,\n SHARED_ELEMENT_TRANSITION = 4,\n}\n\nexport type LayoutAnimationFunction = (\n targetValues: LayoutAnimationsValues\n) => LayoutAnimation;\n\nexport type LayoutAnimationStartFunction = (\n tag: number,\n type: LayoutAnimationType,\n yogaValues: LayoutAnimationsValues,\n config: LayoutAnimationFunction\n) => void;\n\nexport interface ILayoutAnimationBuilder {\n build: () => LayoutAnimationFunction;\n}\n\nexport interface BaseLayoutAnimationConfig {\n duration?: number;\n easing?: EasingFn;\n type?: AnimationFunction;\n damping?: number;\n mass?: number;\n stiffness?: number;\n overshootClamping?: number;\n restDisplacementThreshold?: number;\n restSpeedThreshold?: number;\n}\n\nexport interface BaseBuilderAnimationConfig extends BaseLayoutAnimationConfig {\n rotate?: number | string;\n}\n\nexport type LayoutAnimationAndConfig = [\n AnimationFunction,\n BaseBuilderAnimationConfig\n];\n\nexport interface IEntryExitAnimationBuilder {\n build: () => EntryExitAnimationFunction;\n}\n\nexport interface IEntryAnimationBuilder {\n build: () => AnimationConfigFunction<EntryAnimationsValues>;\n}\n\nexport interface IExitAnimationBuilder {\n build: () => AnimationConfigFunction<ExitAnimationsValues>;\n}\n"],"mappings":";;;;;;AAcoE;IAgDxDA,mB;;;WAAAA,mB;EAAAA,mB,CAAAA,mB;EAAAA,mB,CAAAA,mB;EAAAA,mB,CAAAA,mB;EAAAA,mB,CAAAA,mB;GAAAA,mB,mCAAAA,mB"}
@@ -21,10 +21,18 @@ Object.defineProperty(exports, "Keyframe", {
21
21
  return _Keyframe.Keyframe;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "LayoutAnimationType", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _commonTypes.LayoutAnimationType;
28
+ }
29
+ });
24
30
 
25
31
  var _BaseAnimationBuilder = require("./BaseAnimationBuilder");
26
32
 
27
33
  var _ComplexAnimationBuilder = require("./ComplexAnimationBuilder");
28
34
 
29
35
  var _Keyframe = require("./Keyframe");
36
+
37
+ var _commonTypes = require("./commonTypes");
30
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { BaseAnimationBuilder } from './BaseAnimationBuilder';\nexport { ComplexAnimationBuilder } from './ComplexAnimationBuilder';\nexport { Keyframe } from './Keyframe';\nexport type {\n LayoutAnimation,\n AnimationFunction,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n AnimationConfigFunction,\n IEntryAnimationBuilder,\n IExitAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n LayoutAnimationStartFunction,\n ILayoutAnimationBuilder,\n BaseLayoutAnimationConfig,\n BaseBuilderAnimationConfig,\n LayoutAnimationAndConfig,\n IEntryExitAnimationBuilder,\n} from './commonTypes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { BaseAnimationBuilder } from './BaseAnimationBuilder';\nexport { ComplexAnimationBuilder } from './ComplexAnimationBuilder';\nexport { Keyframe } from './Keyframe';\nexport { LayoutAnimationType } from './commonTypes';\nexport type {\n LayoutAnimation,\n AnimationFunction,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n AnimationConfigFunction,\n IEntryAnimationBuilder,\n IExitAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n LayoutAnimationStartFunction,\n ILayoutAnimationBuilder,\n BaseLayoutAnimationConfig,\n BaseBuilderAnimationConfig,\n LayoutAnimationAndConfig,\n IEntryExitAnimationBuilder,\n} from './commonTypes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA"}
@@ -1,22 +1,21 @@
1
1
  "use strict";
2
2
 
3
- var _core = require("../core");
4
-
5
3
  var _styleAnimation = require("../animation/styleAnimation");
6
4
 
7
- var _reactNative = require("react-native");
8
-
9
5
  var _mutables = require("../mutables");
10
6
 
11
- _reactNative.LogBox.ignoreLogs(['Overriding previous layout animation with']);
7
+ var _animationBuilder = require("./animationBuilder");
8
+
9
+ var _threads = require("../threads");
12
10
 
13
11
  const TAG_OFFSET = 1e9;
14
12
 
15
- function startObservingProgress(tag, sharedValue) {
13
+ function startObservingProgress(tag, sharedValue, animationType) {
16
14
  'worklet';
17
15
 
16
+ const isSharedTransition = animationType === _animationBuilder.LayoutAnimationType.SHARED_ELEMENT_TRANSITION;
18
17
  sharedValue.addListener(tag + TAG_OFFSET, () => {
19
- _notifyAboutProgress(tag, sharedValue.value);
18
+ _notifyAboutProgress(tag, sharedValue.value, isSharedTransition);
20
19
  });
21
20
  }
22
21
 
@@ -38,9 +37,9 @@ function createLayoutAnimationManager() {
38
37
  const style = config(yogaValues);
39
38
  let currentAnimation = style.animations;
40
39
 
41
- if (type === 'entering') {
40
+ if (type === _animationBuilder.LayoutAnimationType.ENTERING) {
42
41
  enteringAnimationForTag.set(tag, currentAnimation);
43
- } else if (type === 'layout') {
42
+ } else if (type === _animationBuilder.LayoutAnimationType.LAYOUT) {
44
43
  // When layout animation is requested, but entering is still running, we merge
45
44
  // new layout animation targets into the ongoing animation
46
45
  const enteringAnimation = enteringAnimationForTag.get(tag);
@@ -69,21 +68,26 @@ function createLayoutAnimationManager() {
69
68
  if (finished) {
70
69
  enteringAnimationForTag.delete(tag);
71
70
  mutableValuesForTag.delete(tag);
72
- const shouldRemoveView = type === 'exiting';
71
+ const shouldRemoveView = type === _animationBuilder.LayoutAnimationType.EXITING;
73
72
  stopObservingProgress(tag, value, finished, shouldRemoveView);
74
73
  }
75
74
 
76
75
  style.callback && style.callback(finished === undefined ? false : finished);
77
76
  };
78
77
 
79
- startObservingProgress(tag, value);
78
+ startObservingProgress(tag, value, type);
80
79
  value.value = animation;
80
+ },
81
+
82
+ stop(tag) {
83
+ const value = mutableValuesForTag.get(tag);
84
+ stopObservingProgress(tag, value, true, true);
81
85
  }
82
86
 
83
87
  };
84
88
  }
85
89
 
86
- (0, _core.runOnUI)(() => {
90
+ (0, _threads.runOnUIImmediately)(() => {
87
91
  'worklet';
88
92
 
89
93
  global.LayoutAnimationsManager = createLayoutAnimationManager();
@@ -1 +1 @@
1
- {"version":3,"names":["LogBox","ignoreLogs","TAG_OFFSET","startObservingProgress","tag","sharedValue","addListener","_notifyAboutProgress","value","stopObservingProgress","cancelled","removeView","removeListener","_notifyAboutEnd","createLayoutAnimationManager","enteringAnimationForTag","Map","mutableValuesForTag","start","type","yogaValues","config","style","currentAnimation","animations","set","enteringAnimation","get","undefined","makeUIMutable","initialValues","_value","animation","withStyleAnimation","callback","finished","delete","shouldRemoveView","runOnUI","global","LayoutAnimationsManager"],"sources":["animationsManager.ts"],"sourcesContent":["import { runOnUI } from '../core';\nimport { withStyleAnimation } from '../animation/styleAnimation';\nimport { LogBox } from 'react-native';\nimport { SharedValue } from '../commonTypes';\nimport { makeUIMutable } from '../mutables';\nimport {\n LayoutAnimationFunction,\n LayoutAnimationsValues,\n} from './animationBuilder';\n\nLogBox.ignoreLogs(['Overriding previous layout animation with']);\n\nconst TAG_OFFSET = 1e9;\n\nfunction startObservingProgress(\n tag: number,\n sharedValue: SharedValue<number>\n): void {\n 'worklet';\n sharedValue.addListener(tag + TAG_OFFSET, () => {\n _notifyAboutProgress(tag, sharedValue.value);\n });\n}\n\nfunction stopObservingProgress(\n tag: number,\n sharedValue: SharedValue<number>,\n cancelled: boolean,\n removeView: boolean\n): void {\n 'worklet';\n sharedValue.removeListener(tag + TAG_OFFSET);\n _notifyAboutEnd(tag, cancelled, removeView);\n}\n\nfunction createLayoutAnimationManager() {\n 'worklet';\n const enteringAnimationForTag = new Map();\n const mutableValuesForTag = new Map();\n\n return {\n start(\n tag: number,\n type: string,\n yogaValues: LayoutAnimationsValues,\n config: LayoutAnimationFunction\n ) {\n const style = config(yogaValues);\n let currentAnimation = style.animations;\n\n if (type === 'entering') {\n enteringAnimationForTag.set(tag, currentAnimation);\n } else if (type === 'layout') {\n // When layout animation is requested, but entering is still running, we merge\n // new layout animation targets into the ongoing animation\n const enteringAnimation = enteringAnimationForTag.get(tag);\n if (enteringAnimation) {\n currentAnimation = { ...enteringAnimation, ...style.animations };\n }\n }\n\n let value = mutableValuesForTag.get(tag);\n if (value === undefined) {\n value = makeUIMutable(style.initialValues);\n mutableValuesForTag.set(tag, value);\n } else {\n stopObservingProgress(tag, value, false, false);\n value._value = style.initialValues;\n }\n\n // @ts-ignore The line below started failing because I added types to the method – don't have time to fix it right now\n const animation = withStyleAnimation(currentAnimation);\n\n animation.callback = (finished?: boolean) => {\n if (finished) {\n enteringAnimationForTag.delete(tag);\n mutableValuesForTag.delete(tag);\n const shouldRemoveView = type === 'exiting';\n stopObservingProgress(tag, value, finished, shouldRemoveView);\n }\n style.callback &&\n style.callback(finished === undefined ? false : finished);\n };\n\n startObservingProgress(tag, value);\n value.value = animation;\n },\n };\n}\n\nrunOnUI(() => {\n 'worklet';\n global.LayoutAnimationsManager = createLayoutAnimationManager();\n})();\n"],"mappings":";;AAAA;;AACA;;AACA;;AAEA;;AAMAA,mBAAA,CAAOC,UAAP,CAAkB,CAAC,2CAAD,CAAlB;;AAEA,MAAMC,UAAU,GAAG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EAAcP,KAAK,CAACQ,aAApB,CAAR;QACAb,mBAAmB,CAACQ,GAApB,CAAwBrB,GAAxB,EAA6BI,KAA7B;MACD,CAHD,MAGO;QACLC,qBAAqB,CAACL,GAAD,EAAMI,KAAN,EAAa,KAAb,EAAoB,KAApB,CAArB;QACAA,KAAK,CAACuB,MAAN,GAAeT,KAAK,CAACQ,aAArB;MACD,CAtBD,CAwBA;;;MACA,MAAME,SAAS,GAAG,IAAAC,kCAAA,EAAmBV,gBAAnB,CAAlB;;MAEAS,SAAS,CAACE,QAAV,GAAsBC,QAAD,IAAwB;QAC3C,IAAIA,QAAJ,EAAc;UACZpB,uBAAuB,CAACqB,MAAxB,CAA+BhC,GAA/B;UACAa,mBAAmB,CAACmB,MAApB,CAA2BhC,GAA3B;UACA,MAAMiC,gBAAgB,GAAGlB,IAAI,KAAK,SAAlC;UACAV,qBAAqB,CAACL,GAAD,EAAMI,KAAN,EAAa2B,QAAb,EAAuBE,gBAAvB,CAArB;QACD;;QACDf,KAAK,CAACY,QAAN,IACEZ,KAAK,CAACY,QAAN,CAAeC,QAAQ,KAAKP,SAAb,GAAyB,KAAzB,GAAiCO,QAAhD,CADF;MAED,CATD;;MAWAhC,sBAAsB,CAACC,GAAD,EAAMI,KAAN,CAAtB;MACAA,KAAK,CAACA,KAAN,GAAcwB,SAAd;IACD;;EA9CI,CAAP;AAgDD;;AAED,IAAAM,aAAA,EAAQ,MAAM;EACZ;;EACAC,MAAM,CAACC,uBAAP,GAAiC1B,4BAA4B,EAA7D;AACD,CAHD"}
1
+ {"version":3,"names":["TAG_OFFSET","startObservingProgress","tag","sharedValue","animationType","isSharedTransition","LayoutAnimationType","SHARED_ELEMENT_TRANSITION","addListener","_notifyAboutProgress","value","stopObservingProgress","cancelled","removeView","removeListener","_notifyAboutEnd","createLayoutAnimationManager","enteringAnimationForTag","Map","mutableValuesForTag","start","type","yogaValues","config","style","currentAnimation","animations","ENTERING","set","LAYOUT","enteringAnimation","get","undefined","makeUIMutable","initialValues","_value","animation","withStyleAnimation","callback","finished","delete","shouldRemoveView","EXITING","stop","runOnUIImmediately","global","LayoutAnimationsManager"],"sources":["animationsManager.ts"],"sourcesContent":["import { withStyleAnimation } from '../animation/styleAnimation';\nimport { SharedValue } from '../commonTypes';\nimport { makeUIMutable } from '../mutables';\nimport {\n LayoutAnimationFunction,\n LayoutAnimationType,\n LayoutAnimationsValues,\n} from './animationBuilder';\nimport { runOnUIImmediately } from '../threads';\n\nconst TAG_OFFSET = 1e9;\n\nfunction startObservingProgress(\n tag: number,\n sharedValue: SharedValue<number>,\n animationType: LayoutAnimationType\n): void {\n 'worklet';\n const isSharedTransition =\n animationType === LayoutAnimationType.SHARED_ELEMENT_TRANSITION;\n sharedValue.addListener(tag + TAG_OFFSET, () => {\n _notifyAboutProgress(tag, sharedValue.value, isSharedTransition);\n });\n}\n\nfunction stopObservingProgress(\n tag: number,\n sharedValue: SharedValue<number>,\n cancelled: boolean,\n removeView: boolean\n): void {\n 'worklet';\n sharedValue.removeListener(tag + TAG_OFFSET);\n _notifyAboutEnd(tag, cancelled, removeView);\n}\n\nfunction createLayoutAnimationManager() {\n 'worklet';\n const enteringAnimationForTag = new Map();\n const mutableValuesForTag = new Map();\n\n return {\n start(\n tag: number,\n type: LayoutAnimationType,\n yogaValues: LayoutAnimationsValues,\n config: LayoutAnimationFunction\n ) {\n const style = config(yogaValues);\n let currentAnimation = style.animations;\n\n if (type === LayoutAnimationType.ENTERING) {\n enteringAnimationForTag.set(tag, currentAnimation);\n } else if (type === LayoutAnimationType.LAYOUT) {\n // When layout animation is requested, but entering is still running, we merge\n // new layout animation targets into the ongoing animation\n const enteringAnimation = enteringAnimationForTag.get(tag);\n if (enteringAnimation) {\n currentAnimation = { ...enteringAnimation, ...style.animations };\n }\n }\n\n let value = mutableValuesForTag.get(tag);\n if (value === undefined) {\n value = makeUIMutable(style.initialValues);\n mutableValuesForTag.set(tag, value);\n } else {\n stopObservingProgress(tag, value, false, false);\n value._value = style.initialValues;\n }\n\n // @ts-ignore The line below started failing because I added types to the method – don't have time to fix it right now\n const animation = withStyleAnimation(currentAnimation);\n\n animation.callback = (finished?: boolean) => {\n if (finished) {\n enteringAnimationForTag.delete(tag);\n mutableValuesForTag.delete(tag);\n const shouldRemoveView = type === LayoutAnimationType.EXITING;\n stopObservingProgress(tag, value, finished, shouldRemoveView);\n }\n style.callback &&\n style.callback(finished === undefined ? false : finished);\n };\n\n startObservingProgress(tag, value, type);\n value.value = animation;\n },\n stop(tag: number) {\n const value = mutableValuesForTag.get(tag);\n stopObservingProgress(tag, value, true, true);\n },\n };\n}\n\nrunOnUIImmediately(() => {\n 'worklet';\n global.LayoutAnimationsManager = createLayoutAnimationManager();\n})();\n"],"mappings":";;AAAA;;AAEA;;AACA;;AAKA;;AAEA,MAAMA,UAAU,GAAG,GAAnB;;AAEA,SAASC,sBAAT,CACEC,GADF,EAEEC,WAFF,EAGEC,aAHF,EAIQ;EACN;;EACA,MAAMC,kBAAkB,GACtBD,aAAa,KAAKE,qCAAA,CAAoBC,yBADxC;EAEAJ,WAAW,CAACK,WAAZ,CAAwBN,GAAG,GAAGF,UAA9B,EAA0C,MAAM;IAC9CS,oBAAoB,CAACP,GAAD,EAAMC,WAAW,CAACO,KAAlB,EAAyBL,kBAAzB,CAApB;EACD,CAFD;AAGD;;AAED,SAASM,qBAAT,CACET,GADF,EAEEC,WAFF,EAGES,SAHF,EAIEC,UAJF,EAKQ;EACN;;EACAV,WAAW,CAACW,cAAZ,CAA2BZ,GAAG,GAAGF,UAAjC;;EACAe,eAAe,CAACb,GAAD,EAAMU,SAAN,EAAiBC,UAAjB,CAAf;AACD;;AAED,SAASG,4BAAT,GAAwC;EACtC;;EACA,MAAMC,uBAAuB,GAAG,IAAIC,GAAJ,EAAhC;EACA,MAAMC,mBAAmB,GAAG,IAAID,GAAJ,EAA5B;EAEA,OAAO;IACLE,KAAK,CACHlB,GADG,EAEHmB,IAFG,EAGHC,UAHG,EAIHC,MAJG,EAKH;MACA,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AN,EAAa6B,QAAb,EAAuBE,gBAAvB,CAArB;QACD;;QACDjB,KAAK,CAACc,QAAN,IACEd,KAAK,CAACc,QAAN,CAAeC,QAAQ,KAAKP,SAAb,GAAyB,KAAzB,GAAiCO,QAAhD,CADF;MAED,CATD;;MAWAtC,sBAAsB,CAACC,GAAD,EAAMQ,KAAN,EAAaW,IAAb,CAAtB;MACAX,KAAK,CAACA,KAAN,GAAc0B,SAAd;IACD,CA9CI;;IA+CLO,IAAI,CAACzC,GAAD,EAAc;MAChB,MAAMQ,KAAK,GAAGS,mBAAmB,CAACY,GAApB,CAAwB7B,GAAxB,CAAd;MACAS,qBAAqB,CAACT,GAAD,EAAMQ,KAAN,EAAa,IAAb,EAAmB,IAAnB,CAArB;IACD;;EAlDI,CAAP;AAoDD;;AAED,IAAAkC,2BAAA,EAAmB,MAAM;EACvB;;EACAC,MAAM,CAACC,uBAAP,GAAiC9B,4BAA4B,EAA7D;AACD,CAHD"}
@@ -7,17 +7,10 @@ exports.BounceOutUp = exports.BounceOutRight = exports.BounceOutLeft = exports.B
7
7
 
8
8
  var _animation = require("../../animation");
9
9
 
10
- var _reactNative = require("react-native");
11
-
12
10
  var _ComplexAnimationBuilder = require("../animationBuilder/ComplexAnimationBuilder");
13
11
 
14
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
13
 
16
- const {
17
- width,
18
- height
19
- } = _reactNative.Dimensions.get('window');
20
-
21
14
  class BounceIn extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
22
15
  constructor() {
23
16
  super(...arguments);
@@ -83,7 +76,7 @@ class BounceInDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
83
76
  const duration = this.getDuration();
84
77
  const callback = this.callbackV;
85
78
  const initialValues = this.initialValues;
86
- return () => {
79
+ return values => {
87
80
  'worklet';
88
81
 
89
82
  return {
@@ -102,7 +95,7 @@ class BounceInDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
102
95
  },
103
96
  initialValues: {
104
97
  transform: [{
105
- translateY: height
98
+ translateY: values.windowHeight
106
99
  }],
107
100
  ...initialValues
108
101
  },
@@ -138,7 +131,7 @@ class BounceInUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
138
131
  const duration = this.getDuration();
139
132
  const callback = this.callbackV;
140
133
  const initialValues = this.initialValues;
141
- return () => {
134
+ return values => {
142
135
  'worklet';
143
136
 
144
137
  return {
@@ -157,7 +150,7 @@ class BounceInUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
157
150
  },
158
151
  initialValues: {
159
152
  transform: [{
160
- translateY: -height
153
+ translateY: -values.windowHeight
161
154
  }],
162
155
  ...initialValues
163
156
  },
@@ -193,7 +186,7 @@ class BounceInLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
193
186
  const duration = this.getDuration();
194
187
  const callback = this.callbackV;
195
188
  const initialValues = this.initialValues;
196
- return () => {
189
+ return values => {
197
190
  'worklet';
198
191
 
199
192
  return {
@@ -212,7 +205,7 @@ class BounceInLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
212
205
  },
213
206
  initialValues: {
214
207
  transform: [{
215
- translateX: -width
208
+ translateX: -values.windowWidth
216
209
  }],
217
210
  ...initialValues
218
211
  },
@@ -248,7 +241,7 @@ class BounceInRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
248
241
  const duration = this.getDuration();
249
242
  const callback = this.callbackV;
250
243
  const initialValues = this.initialValues;
251
- return () => {
244
+ return values => {
252
245
  'worklet';
253
246
 
254
247
  return {
@@ -267,7 +260,7 @@ class BounceInRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
267
260
  },
268
261
  initialValues: {
269
262
  transform: [{
270
- translateX: width
263
+ translateX: values.windowWidth
271
264
  }],
272
265
  ...initialValues
273
266
  },
@@ -358,7 +351,7 @@ class BounceOutDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
358
351
  const duration = this.getDuration();
359
352
  const callback = this.callbackV;
360
353
  const initialValues = this.initialValues;
361
- return () => {
354
+ return values => {
362
355
  'worklet';
363
356
 
364
357
  return {
@@ -370,7 +363,7 @@ class BounceOutDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
370
363
  duration: duration * 0.15
371
364
  }), (0, _animation.withTiming)(-20, {
372
365
  duration: duration * 0.15
373
- }), (0, _animation.withTiming)(height, {
366
+ }), (0, _animation.withTiming)(values.windowHeight, {
374
367
  duration: duration * 0.55
375
368
  })))
376
369
  }]
@@ -413,7 +406,7 @@ class BounceOutUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
413
406
  const duration = this.getDuration();
414
407
  const callback = this.callbackV;
415
408
  const initialValues = this.initialValues;
416
- return () => {
409
+ return values => {
417
410
  'worklet';
418
411
 
419
412
  return {
@@ -425,7 +418,7 @@ class BounceOutUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
425
418
  duration: duration * 0.15
426
419
  }), (0, _animation.withTiming)(20, {
427
420
  duration: duration * 0.15
428
- }), (0, _animation.withTiming)(-height, {
421
+ }), (0, _animation.withTiming)(-values.windowHeight, {
429
422
  duration: duration * 0.55
430
423
  })))
431
424
  }]
@@ -468,7 +461,7 @@ class BounceOutLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
468
461
  const duration = this.getDuration();
469
462
  const callback = this.callbackV;
470
463
  const initialValues = this.initialValues;
471
- return () => {
464
+ return values => {
472
465
  'worklet';
473
466
 
474
467
  return {
@@ -480,7 +473,7 @@ class BounceOutLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
480
473
  duration: duration * 0.15
481
474
  }), (0, _animation.withTiming)(20, {
482
475
  duration: duration * 0.15
483
- }), (0, _animation.withTiming)(-width, {
476
+ }), (0, _animation.withTiming)(-values.windowWidth, {
484
477
  duration: duration * 0.55
485
478
  })))
486
479
  }]
@@ -523,7 +516,7 @@ class BounceOutRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
523
516
  const duration = this.getDuration();
524
517
  const callback = this.callbackV;
525
518
  const initialValues = this.initialValues;
526
- return () => {
519
+ return values => {
527
520
  'worklet';
528
521
 
529
522
  return {
@@ -535,7 +528,7 @@ class BounceOutRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
535
528
  duration: duration * 0.15
536
529
  }), (0, _animation.withTiming)(-20, {
537
530
  duration: duration * 0.15
538
- }), (0, _animation.withTiming)(width, {
531
+ }), (0, _animation.withTiming)(values.windowWidth, {
539
532
  duration: duration * 0.55
540
533
  })))
541
534
  }]
@@ -1 +1 @@
1
- {"version":3,"names":["width","height","Dimensions","get","BounceIn","ComplexAnimationBuilder","delayFunction","getDelayFunction","delay","getDelay","duration","getDuration","callback","callbackV","initialValues","animations","transform","scale","withSequence","withTiming","createInstance","durationV","BounceInDown","translateY","BounceInUp","BounceInLeft","translateX","BounceInRight","BounceOut","BounceOutDown","BounceOutUp","BounceOutLeft","BounceOutRight"],"sources":["Bounce.ts"],"sourcesContent":["import {\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n} from '../animationBuilder/commonTypes';\nimport { withSequence, withTiming } from '../../animation';\nimport { Dimensions } from 'react-native';\nimport { ComplexAnimationBuilder } from '../animationBuilder/ComplexAnimationBuilder';\n\nconst { width, height } = Dimensions.get('window');\n\nexport class BounceIn\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceIn {\n return new BounceIn();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n scale: delayFunction(\n delay,\n withSequence(\n withTiming(1.2, { duration: duration * 0.55 }),\n withTiming(0.9, { duration: duration * 0.15 }),\n withTiming(1.1, { duration: duration * 0.15 }),\n withTiming(1, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ scale: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInDown\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInDown {\n return new BounceInDown();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(-20, { duration: duration * 0.55 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [\n {\n translateY: height,\n },\n ],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInUp\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInUp {\n return new BounceInUp();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(20, { duration: duration * 0.55 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: -height }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInLeft {\n return new BounceInLeft();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(20, { duration: duration * 0.55 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: -width }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInRight {\n return new BounceInRight();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(-20, { duration: duration * 0.55 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: width }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOut\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOut {\n return new BounceOut();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n scale: delayFunction(\n delay,\n withSequence(\n withTiming(1.1, { duration: duration * 0.15 }),\n withTiming(0.9, { duration: duration * 0.15 }),\n withTiming(1.2, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.55 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ scale: 1 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutDown\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutDown {\n return new BounceOutDown();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-20, { duration: duration * 0.15 }),\n withTiming(height, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutUp\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutUp {\n return new BounceOutUp();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(20, { duration: duration * 0.15 }),\n withTiming(-height, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutRight {\n return new BounceOutLeft();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(20, { duration: duration * 0.15 }),\n withTiming(-width, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutRight {\n return new BounceOutRight();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-20, { duration: duration * 0.15 }),\n withTiming(width, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;;AAIA;;AACA;;AACA;;;;AAEA,MAAM;EAAEA,KAAF;EAASC;AAAT,IAAoBC,uBAAA,CAAWC,GAAX,CAAe,QAAf,CAA1B;;AAEO,MAAMC,QAAN,SACGC,gDADH,CAGP;EAAA;IAAA;;IAAA,+BAaU,MAAkC;MACxC,MAAMC,aAAa,GAAG,KAAKC,gBAAL,EAAtB;MACA,MAAMC,KAAK,GAAG,KAAKC,QAAL,EAAd;MACA,MAAMC,QAAQ,GAAG,KAAKC,WAAL,EAAjB;MACA,MAAMC,QAAQ,GAAG,KAAKC,SAAtB;MACA,MAAMC,aAAa,GAAG,KAAKA,aAA3B;MAEA,OAAO,MAAM;QACX;;QACA,OAAO;UACLC,UAAU,EAAE;YACVC,SAAS,EAAE,CACT;cACEC,KAAK,EAAEX,aAAa,CAClBE,KADkB,EAElB,IAAAU,uBAAA,EACE,IAAAC,qBAAA,EAAW,GAAX,EAAgB;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAhB,CADF,EAEE,IAAAS,qBAAA,EAAW,GAAX,EAAgB;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAhB,CAFF,EAGE,IAAAS,qBAAA,EAAW,GAAX,EAAgB;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAhB,CAHF,EAIE,IAAAS,qBAAA,EAAW,CAAX,EAAc;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAd,CAJF,CAFkB;YADtB,CADS;UADD,CADP;UAgBLI,aAAa,EAAE;YACbE,SAAS,EAAE,CAAC;cAAEC,KAAK,EAAE;YAAT,CAAD,CADE;YAEb,GAAGH;UAFU,CAhBV;UAoBLF,QAAQ,EAAEA;QApBL,CAAP;MAsBD,CAx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SAAL,IAAkB,GAAzB;EACD;;AAXH"}
1
+ {"version":3,"names":["BounceIn","ComplexAnimationBuilder","delayFunction","getDelayFunction","delay","getDelay","duration","getDuration","callback","callbackV","initialValues","animations","transform","scale","withSequence","withTiming","createInstance","durationV","BounceInDown","values","translateY","windowHeight","BounceInUp","BounceInLeft","translateX","windowWidth","BounceInRight","BounceOut","BounceOutDown","BounceOutUp","BounceOutLeft","BounceOutRight"],"sources":["Bounce.ts"],"sourcesContent":["import {\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n} from '../animationBuilder/commonTypes';\nimport { withSequence, withTiming } from '../../animation';\nimport { ComplexAnimationBuilder } from '../animationBuilder/ComplexAnimationBuilder';\n\nexport class BounceIn\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceIn {\n return new BounceIn();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n scale: delayFunction(\n delay,\n withSequence(\n withTiming(1.2, { duration: duration * 0.55 }),\n withTiming(0.9, { duration: duration * 0.15 }),\n withTiming(1.1, { duration: duration * 0.15 }),\n withTiming(1, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ scale: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInDown\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInDown {\n return new BounceInDown();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(-20, { duration: duration * 0.55 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [\n {\n translateY: values.windowHeight,\n },\n ],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInUp\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInUp {\n return new BounceInUp();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(20, { duration: duration * 0.55 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: -values.windowHeight }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInLeft {\n return new BounceInLeft();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(20, { duration: duration * 0.55 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: -values.windowWidth }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceInRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceInRight {\n return new BounceInRight();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(-20, { duration: duration * 0.55 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: values.windowWidth }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOut\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOut {\n return new BounceOut();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n scale: delayFunction(\n delay,\n withSequence(\n withTiming(1.1, { duration: duration * 0.15 }),\n withTiming(0.9, { duration: duration * 0.15 }),\n withTiming(1.2, { duration: duration * 0.15 }),\n withTiming(0, { duration: duration * 0.55 })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ scale: 1 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutDown\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutDown {\n return new BounceOutDown();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-20, { duration: duration * 0.15 }),\n withTiming(values.windowHeight, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutUp\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutUp {\n return new BounceOutUp();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateY: delayFunction(\n delay,\n withSequence(\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(20, { duration: duration * 0.15 }),\n withTiming(-values.windowHeight, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateY: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutRight {\n return new BounceOutLeft();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(20, { duration: duration * 0.15 }),\n withTiming(-values.windowWidth, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport class BounceOutRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static createInstance(): BounceOutRight {\n return new BounceOutRight();\n }\n\n static getDuration(): number {\n return 600;\n }\n\n getDuration(): number {\n return this.durationV ?? 600;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values) => {\n 'worklet';\n return {\n animations: {\n transform: [\n {\n translateX: delayFunction(\n delay,\n withSequence(\n withTiming(-10, { duration: duration * 0.15 }),\n withTiming(10, { duration: duration * 0.15 }),\n withTiming(-20, { duration: duration * 0.15 }),\n withTiming(values.windowWidth, {\n duration: duration * 0.55,\n })\n )\n ),\n },\n ],\n },\n initialValues: {\n transform: [{ translateX: 0 }],\n ...initialValues,\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;;AAIA;;AACA;;;;AAEO,MAAMA,QAAN,SACGC,gDADH,CAGP;EAAA;IAAA;;IAAA,+BAaU,MAAkC;MACxC,MAAMC,aAAa,GAAG,KAAKC,gBAAL,EAAtB;MACA,MAAMC,KAAK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,WAAL,EAAjB;MACA,MAAMC,QAAQ,GAAG,KAAKC,SAAtB;MACA,MAAMC,aAAa,GAAG,KAAKA,aAA3B;MAEA,OAAQS,MAAD,IAAY;QACjB;;QACA,OAAO;UACLR,UAAU,EAAE;YACVC,SAAS,EAAE,CACT;cACEY,UAAU,EAAEtB,aAAa,CACvBE,KADuB,EAEvB,IAAAU,uBAAA,EACE,IAAAC,qBAAA,EAAW,CAAC,EAAZ,EAAgB;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAhB,CADF,EAEE,IAAAS,qBAAA,EAAW,EAAX,EAAe;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAf,CAFF,EAGE,IAAAS,qBAAA,EAAW,CAAC,EAAZ,EAAgB;gBAAET,QAAQ,EAAEA,QAAQ,GAAG;cAAvB,CAAhB,CAHF,EAIE,IAAAS,qBAAA,EAAWI,MAAM,CAACM,WAAlB,EAA+B;gBAC7BnB,QAAQ,EAAEA,QAAQ,GAAG;cADQ,CAA/B,CAJF,CAFuB;YAD3B,CADS;UADD,CADP;UAkBLI,aAAa,EAAE;YACbE,SAAS,EAAE,CAAC;cAAEY,UAAU,EAAE;YAAd,CAAD,CADE;YAEb,GAAGd;UAFU,CAlBV;UAsBLF,QAAQ,EAAEA;QAtBL,CAAP;MAwBD,CA1BD;IA2BD,CA/CH;EAAA;;EACuB,OAAdQ,cAAc,GAAmB;IACtC,OAAO,IAAIe,cAAJ,EAAP;EACD;;EAEiB,OAAXxB,WAAW,GAAW;IAC3B,OAAO,GAAP;EACD;;EAEDA,WAAW,GAAW;IACpB,OAAO,KAAKU,SAAL,IAAkB,GAAzB;EACD;;AAXH"}
@@ -5,18 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.LightSpeedOutRight = exports.LightSpeedOutLeft = exports.LightSpeedInRight = exports.LightSpeedInLeft = void 0;
7
7
 
8
- var _reactNative = require("react-native");
9
-
10
8
  var _animation = require("../../animation");
11
9
 
12
10
  var _animationBuilder = require("../animationBuilder");
13
11
 
14
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
13
 
16
- const {
17
- width
18
- } = _reactNative.Dimensions.get('window');
19
-
20
14
  class LightSpeedInRight extends _animationBuilder.ComplexAnimationBuilder {
21
15
  constructor() {
22
16
  super(...arguments);
@@ -28,7 +22,7 @@ class LightSpeedInRight extends _animationBuilder.ComplexAnimationBuilder {
28
22
  const duration = this.getDuration();
29
23
  const callback = this.callbackV;
30
24
  const initialValues = this.initialValues;
31
- return () => {
25
+ return values => {
32
26
  'worklet';
33
27
 
34
28
  return {
@@ -53,7 +47,7 @@ class LightSpeedInRight extends _animationBuilder.ComplexAnimationBuilder {
53
47
  initialValues: {
54
48
  opacity: 0,
55
49
  transform: [{
56
- translateX: width
50
+ translateX: values.windowWidth
57
51
  }, {
58
52
  skewX: '-45deg'
59
53
  }],
@@ -84,7 +78,7 @@ class LightSpeedInLeft extends _animationBuilder.ComplexAnimationBuilder {
84
78
  const duration = this.getDuration();
85
79
  const callback = this.callbackV;
86
80
  const initialValues = this.initialValues;
87
- return () => {
81
+ return values => {
88
82
  'worklet';
89
83
 
90
84
  return {
@@ -109,7 +103,7 @@ class LightSpeedInLeft extends _animationBuilder.ComplexAnimationBuilder {
109
103
  initialValues: {
110
104
  opacity: 0,
111
105
  transform: [{
112
- translateX: -width
106
+ translateX: -values.windowWidth
113
107
  }, {
114
108
  skewX: '45deg'
115
109
  }],
@@ -139,14 +133,14 @@ class LightSpeedOutRight extends _animationBuilder.ComplexAnimationBuilder {
139
133
  const delay = this.getDelay();
140
134
  const callback = this.callbackV;
141
135
  const initialValues = this.initialValues;
142
- return () => {
136
+ return values => {
143
137
  'worklet';
144
138
 
145
139
  return {
146
140
  animations: {
147
141
  opacity: delayFunction(delay, animation(0, config)),
148
142
  transform: [{
149
- translateX: delayFunction(delay, animation(width, config))
143
+ translateX: delayFunction(delay, animation(values.windowWidth, config))
150
144
  }, {
151
145
  skewX: delayFunction(delay, animation('-45deg', config))
152
146
  }]
@@ -184,14 +178,14 @@ class LightSpeedOutLeft extends _animationBuilder.ComplexAnimationBuilder {
184
178
  const delay = this.getDelay();
185
179
  const callback = this.callbackV;
186
180
  const initialValues = this.initialValues;
187
- return () => {
181
+ return values => {
188
182
  'worklet';
189
183
 
190
184
  return {
191
185
  animations: {
192
186
  opacity: delayFunction(delay, animation(0, config)),
193
187
  transform: [{
194
- translateX: delayFunction(delay, animation(-width, config))
188
+ translateX: delayFunction(delay, animation(-values.windowWidth, config))
195
189
  }, {
196
190
  skewX: delayFunction(delay, animation('45deg', config))
197
191
  }]