react-native-reanimated 3.0.2 → 3.1.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 (473) hide show
  1. package/Common/cpp/Fabric/FabricUtils.h +1 -1
  2. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +38 -27
  3. package/Common/cpp/SharedItems/Shareables.h +22 -0
  4. package/Common/cpp/Tools/PlatformDepMethodsHolder.h +2 -0
  5. package/Common/cpp/Tools/RuntimeDecorator.cpp +4 -1
  6. package/Common/cpp/Tools/RuntimeDecorator.h +2 -1
  7. package/Common/cpp/Tools/SingleInstanceChecker.h +14 -2
  8. package/RNReanimated.podspec +5 -2
  9. package/android/CMakeLists.txt +4 -0
  10. package/android/build.gradle +18 -10
  11. package/android/src/main/cpp/NativeProxy.cpp +316 -337
  12. package/android/src/main/cpp/NativeProxy.h +53 -11
  13. package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +7 -12
  14. package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +11 -8
  15. package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +21 -14
  16. package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +0 -3
  17. package/ios/Fabric/REAInitializerRCTFabricSurface.mm +1 -0
  18. package/ios/REANodesManager.h +1 -0
  19. package/ios/REANodesManager.mm +30 -4
  20. package/ios/keyboardObserver/REAKeyboardEventObserver.m +51 -130
  21. package/ios/native/NativeMethods.mm +1 -1
  22. package/ios/native/NativeProxy.mm +4 -1
  23. package/ios/native/REAIOSErrorHandler.mm +1 -1
  24. package/ios/native/REAIOSLogger.mm +1 -1
  25. package/ios/native/REAIOSScheduler.mm +1 -1
  26. package/ios/native/REAInitializer.mm +1 -1
  27. package/ios/native/REAMessageThread.mm +2 -2
  28. package/lib/commonjs/Animated.js +0 -8
  29. package/lib/commonjs/Animated.js.map +1 -1
  30. package/lib/commonjs/ConfigHelper.js +8 -19
  31. package/lib/commonjs/ConfigHelper.js.map +1 -1
  32. package/lib/commonjs/createAnimatedComponent.js +20 -158
  33. package/lib/commonjs/createAnimatedComponent.js.map +1 -1
  34. package/lib/commonjs/index.js +0 -9
  35. package/lib/commonjs/index.js.map +1 -1
  36. package/lib/commonjs/index.web.js +0 -7
  37. package/lib/commonjs/index.web.js.map +1 -1
  38. package/lib/commonjs/reanimated2/Bezier.js +14 -34
  39. package/lib/commonjs/reanimated2/Bezier.js.map +1 -1
  40. package/lib/commonjs/reanimated2/Colors.js +60 -132
  41. package/lib/commonjs/reanimated2/Colors.js.map +1 -1
  42. package/lib/commonjs/reanimated2/Easing.js +81 -34
  43. package/lib/commonjs/reanimated2/Easing.js.map +1 -1
  44. package/lib/commonjs/reanimated2/NativeMethods.js +8 -20
  45. package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -1
  46. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +5 -31
  47. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
  48. package/lib/commonjs/reanimated2/NativeReanimated/index.js +0 -7
  49. package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -1
  50. package/lib/commonjs/reanimated2/PlatformChecker.js +0 -6
  51. package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -1
  52. package/lib/commonjs/reanimated2/PropAdapters.js +10 -12
  53. package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -1
  54. package/lib/commonjs/reanimated2/UpdateProps.js +3 -12
  55. package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -1
  56. package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +0 -10
  57. package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -1
  58. package/lib/commonjs/reanimated2/WorkletEventHandler.js +5 -22
  59. package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -1
  60. package/lib/commonjs/reanimated2/animation/decay.js +7 -18
  61. package/lib/commonjs/reanimated2/animation/decay.js.map +1 -1
  62. package/lib/commonjs/reanimated2/animation/delay.js +0 -11
  63. package/lib/commonjs/reanimated2/animation/delay.js.map +1 -1
  64. package/lib/commonjs/reanimated2/animation/index.js +0 -8
  65. package/lib/commonjs/reanimated2/animation/index.js.map +1 -1
  66. package/lib/commonjs/reanimated2/animation/repeat.js +6 -22
  67. package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -1
  68. package/lib/commonjs/reanimated2/animation/sequence.js +3 -20
  69. package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -1
  70. package/lib/commonjs/reanimated2/animation/spring.js +11 -23
  71. package/lib/commonjs/reanimated2/animation/spring.js.map +1 -1
  72. package/lib/commonjs/reanimated2/animation/styleAnimation.js +3 -35
  73. package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -1
  74. package/lib/commonjs/reanimated2/animation/timing.js +0 -11
  75. package/lib/commonjs/reanimated2/animation/timing.js.map +1 -1
  76. package/lib/commonjs/reanimated2/animation/util.js +11 -41
  77. package/lib/commonjs/reanimated2/animation/util.js.map +1 -1
  78. package/lib/commonjs/reanimated2/commonTypes.js +16 -23
  79. package/lib/commonjs/reanimated2/commonTypes.js.map +1 -1
  80. package/lib/commonjs/reanimated2/component/FlatList.js +0 -16
  81. package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -1
  82. package/lib/commonjs/reanimated2/component/Image.js +0 -4
  83. package/lib/commonjs/reanimated2/component/Image.js.map +1 -1
  84. package/lib/commonjs/reanimated2/component/ScrollView.js +0 -4
  85. package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -1
  86. package/lib/commonjs/reanimated2/component/Text.js +0 -4
  87. package/lib/commonjs/reanimated2/component/Text.js.map +1 -1
  88. package/lib/commonjs/reanimated2/component/View.js +0 -4
  89. package/lib/commonjs/reanimated2/component/View.js.map +1 -1
  90. package/lib/commonjs/reanimated2/core.js +6 -48
  91. package/lib/commonjs/reanimated2/core.js.map +1 -1
  92. package/lib/commonjs/reanimated2/errors.js +3 -14
  93. package/lib/commonjs/reanimated2/errors.js.map +1 -1
  94. package/lib/commonjs/reanimated2/fabricUtils.js +3 -5
  95. package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -1
  96. package/lib/commonjs/reanimated2/fabricUtils.web.js +1 -3
  97. package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -1
  98. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -12
  99. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
  100. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -17
  101. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
  102. package/lib/commonjs/reanimated2/globals.d.js.map +1 -1
  103. package/lib/commonjs/reanimated2/hook/Hooks.js +0 -5
  104. package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -1
  105. package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -1
  106. package/lib/commonjs/reanimated2/hook/index.js +0 -12
  107. package/lib/commonjs/reanimated2/hook/index.js.map +1 -1
  108. package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +4 -17
  109. package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
  110. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +2 -9
  111. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
  112. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +1 -11
  113. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -1
  114. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +0 -12
  115. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -1
  116. package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +2 -9
  117. package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
  118. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +8 -23
  119. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -1
  120. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +13 -71
  121. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -1
  122. package/lib/commonjs/reanimated2/hook/useDerivedValue.js +4 -13
  123. package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -1
  124. package/lib/commonjs/reanimated2/hook/useFrameCallback.js +0 -5
  125. package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -1
  126. package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js +0 -7
  127. package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  128. package/lib/commonjs/reanimated2/hook/useSharedValue.js +2 -7
  129. package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -1
  130. package/lib/commonjs/reanimated2/hook/utils.js +8 -39
  131. package/lib/commonjs/reanimated2/hook/utils.js.map +1 -1
  132. package/lib/commonjs/reanimated2/index.js +0 -26
  133. package/lib/commonjs/reanimated2/index.js.map +1 -1
  134. package/lib/commonjs/reanimated2/initializers.js +21 -43
  135. package/lib/commonjs/reanimated2/initializers.js.map +1 -1
  136. package/lib/commonjs/reanimated2/interpolateColor.js +6 -43
  137. package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -1
  138. package/lib/commonjs/reanimated2/interpolation.js +14 -29
  139. package/lib/commonjs/reanimated2/interpolation.js.map +1 -1
  140. package/lib/commonjs/reanimated2/jestUtils.js +11 -44
  141. package/lib/commonjs/reanimated2/jestUtils.js.map +1 -1
  142. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +15 -39
  143. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
  144. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +9 -28
  145. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -1
  146. package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +7 -37
  147. package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
  148. package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +5 -18
  149. package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -1
  150. package/lib/commonjs/reanimated2/js-reanimated/global.js +2 -9
  151. package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -1
  152. package/lib/commonjs/reanimated2/js-reanimated/index.js +3 -14
  153. package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -1
  154. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -26
  155. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
  156. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -49
  157. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
  158. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -43
  159. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
  160. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +4 -5
  161. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
  162. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +0 -4
  163. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
  164. package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js +4 -23
  165. package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
  166. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -74
  167. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
  168. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -53
  169. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
  170. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -63
  171. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
  172. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -26
  173. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
  174. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -13
  175. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
  176. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -23
  177. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  178. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -43
  179. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
  180. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -43
  181. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
  182. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -23
  183. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
  184. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -83
  185. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
  186. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +0 -20
  187. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
  188. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +3 -22
  189. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
  190. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -29
  191. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
  192. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -9
  193. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
  194. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -11
  195. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
  196. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -8
  197. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
  198. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -12
  199. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
  200. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +0 -12
  201. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
  202. package/lib/commonjs/reanimated2/layoutReanimation/index.js +0 -9
  203. package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -1
  204. package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js +3 -17
  205. package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
  206. package/lib/commonjs/reanimated2/mappers.js +26 -32
  207. package/lib/commonjs/reanimated2/mappers.js.map +1 -1
  208. package/lib/commonjs/reanimated2/mock.js +5 -15
  209. package/lib/commonjs/reanimated2/mock.js.map +1 -1
  210. package/lib/commonjs/reanimated2/mutables.js +2 -28
  211. package/lib/commonjs/reanimated2/mutables.js.map +1 -1
  212. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +0 -2
  213. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -1
  214. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
  215. package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js +31 -0
  216. package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
  217. package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js +0 -2
  218. package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
  219. package/lib/commonjs/reanimated2/platform-specific/jsVersion.js +14 -0
  220. package/lib/commonjs/reanimated2/platform-specific/jsVersion.js.map +1 -0
  221. package/lib/commonjs/reanimated2/pluginUtils.js +0 -1
  222. package/lib/commonjs/reanimated2/pluginUtils.js.map +1 -1
  223. package/lib/commonjs/reanimated2/shareables.js +92 -49
  224. package/lib/commonjs/reanimated2/shareables.js.map +1 -1
  225. package/lib/commonjs/reanimated2/threads.js +42 -46
  226. package/lib/commonjs/reanimated2/threads.js.map +1 -1
  227. package/lib/commonjs/reanimated2/utils.js +0 -5
  228. package/lib/commonjs/reanimated2/utils.js.map +1 -1
  229. package/lib/commonjs/reanimated2/valueSetter.js +6 -21
  230. package/lib/commonjs/reanimated2/valueSetter.js.map +1 -1
  231. package/lib/commonjs/setAndForwardRef.js +3 -3
  232. package/lib/commonjs/setAndForwardRef.js.map +1 -1
  233. package/lib/module/Animated.js.map +1 -1
  234. package/lib/module/ConfigHelper.js +9 -15
  235. package/lib/module/ConfigHelper.js.map +1 -1
  236. package/lib/module/createAnimatedComponent.js +20 -139
  237. package/lib/module/createAnimatedComponent.js.map +1 -1
  238. package/lib/module/index.js +0 -2
  239. package/lib/module/index.js.map +1 -1
  240. package/lib/module/index.web.js.map +1 -1
  241. package/lib/module/reanimated2/Bezier.js +14 -33
  242. package/lib/module/reanimated2/Bezier.js.map +1 -1
  243. package/lib/module/reanimated2/Colors.js +59 -109
  244. package/lib/module/reanimated2/Colors.js.map +1 -1
  245. package/lib/module/reanimated2/Easing.js +37 -33
  246. package/lib/module/reanimated2/Easing.js.map +1 -1
  247. package/lib/module/reanimated2/NativeMethods.js +8 -15
  248. package/lib/module/reanimated2/NativeMethods.js.map +1 -1
  249. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +5 -27
  250. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
  251. package/lib/module/reanimated2/NativeReanimated/index.js +0 -2
  252. package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
  253. package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
  254. package/lib/module/reanimated2/PropAdapters.js +12 -10
  255. package/lib/module/reanimated2/PropAdapters.js.map +1 -1
  256. package/lib/module/reanimated2/UpdateProps.js +3 -5
  257. package/lib/module/reanimated2/UpdateProps.js.map +1 -1
  258. package/lib/module/reanimated2/ViewDescriptorsSet.js +0 -6
  259. package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
  260. package/lib/module/reanimated2/WorkletEventHandler.js +5 -18
  261. package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
  262. package/lib/module/reanimated2/animation/decay.js +7 -15
  263. package/lib/module/reanimated2/animation/decay.js.map +1 -1
  264. package/lib/module/reanimated2/animation/delay.js +0 -9
  265. package/lib/module/reanimated2/animation/delay.js.map +1 -1
  266. package/lib/module/reanimated2/animation/index.js.map +1 -1
  267. package/lib/module/reanimated2/animation/repeat.js +6 -20
  268. package/lib/module/reanimated2/animation/repeat.js.map +1 -1
  269. package/lib/module/reanimated2/animation/sequence.js +3 -18
  270. package/lib/module/reanimated2/animation/sequence.js.map +1 -1
  271. package/lib/module/reanimated2/animation/spring.js +11 -21
  272. package/lib/module/reanimated2/animation/spring.js.map +1 -1
  273. package/lib/module/reanimated2/animation/styleAnimation.js +7 -31
  274. package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
  275. package/lib/module/reanimated2/animation/timing.js +0 -8
  276. package/lib/module/reanimated2/animation/timing.js.map +1 -1
  277. package/lib/module/reanimated2/animation/util.js +10 -33
  278. package/lib/module/reanimated2/animation/util.js.map +1 -1
  279. package/lib/module/reanimated2/commonTypes.js +12 -19
  280. package/lib/module/reanimated2/commonTypes.js.map +1 -1
  281. package/lib/module/reanimated2/component/FlatList.js +0 -4
  282. package/lib/module/reanimated2/component/FlatList.js.map +1 -1
  283. package/lib/module/reanimated2/component/Image.js.map +1 -1
  284. package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
  285. package/lib/module/reanimated2/component/Text.js.map +1 -1
  286. package/lib/module/reanimated2/component/View.js.map +1 -1
  287. package/lib/module/reanimated2/core.js +6 -22
  288. package/lib/module/reanimated2/core.js.map +1 -1
  289. package/lib/module/reanimated2/errors.js +3 -13
  290. package/lib/module/reanimated2/errors.js.map +1 -1
  291. package/lib/module/reanimated2/fabricUtils.js +3 -3
  292. package/lib/module/reanimated2/fabricUtils.js.map +1 -1
  293. package/lib/module/reanimated2/fabricUtils.web.js +1 -1
  294. package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
  295. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -8
  296. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
  297. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -15
  298. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
  299. package/lib/module/reanimated2/globals.d.js.map +1 -1
  300. package/lib/module/reanimated2/hook/Hooks.js +3 -2
  301. package/lib/module/reanimated2/hook/Hooks.js.map +1 -1
  302. package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
  303. package/lib/module/reanimated2/hook/index.js.map +1 -1
  304. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +3 -14
  305. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
  306. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +2 -5
  307. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
  308. package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -7
  309. package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
  310. package/lib/module/reanimated2/hook/useAnimatedRef.js +0 -6
  311. package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
  312. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +2 -7
  313. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
  314. package/lib/module/reanimated2/hook/useAnimatedSensor.js +9 -20
  315. package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
  316. package/lib/module/reanimated2/hook/useAnimatedStyle.js +13 -59
  317. package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
  318. package/lib/module/reanimated2/hook/useDerivedValue.js +4 -8
  319. package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
  320. package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
  321. package/lib/module/reanimated2/hook/useScrollViewOffset.js +0 -1
  322. package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  323. package/lib/module/reanimated2/hook/useSharedValue.js +2 -3
  324. package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
  325. package/lib/module/reanimated2/hook/utils.js +8 -21
  326. package/lib/module/reanimated2/hook/utils.js.map +1 -1
  327. package/lib/module/reanimated2/index.js.map +1 -1
  328. package/lib/module/reanimated2/initializers.js +23 -37
  329. package/lib/module/reanimated2/initializers.js.map +1 -1
  330. package/lib/module/reanimated2/interpolateColor.js +5 -34
  331. package/lib/module/reanimated2/interpolateColor.js.map +1 -1
  332. package/lib/module/reanimated2/interpolation.js +13 -28
  333. package/lib/module/reanimated2/interpolation.js.map +1 -1
  334. package/lib/module/reanimated2/jestUtils.js +11 -35
  335. package/lib/module/reanimated2/jestUtils.js.map +1 -1
  336. package/lib/module/reanimated2/js-reanimated/JSReanimated.js +15 -35
  337. package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
  338. package/lib/module/reanimated2/js-reanimated/Mapper.js +9 -23
  339. package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -1
  340. package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +7 -35
  341. package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
  342. package/lib/module/reanimated2/js-reanimated/MutableValue.js +5 -16
  343. package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -1
  344. package/lib/module/reanimated2/js-reanimated/global.js +2 -6
  345. package/lib/module/reanimated2/js-reanimated/global.js.map +1 -1
  346. package/lib/module/reanimated2/js-reanimated/index.js +3 -9
  347. package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
  348. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -23
  349. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
  350. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -45
  351. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
  352. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -39
  353. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
  354. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +3 -3
  355. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
  356. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
  357. package/lib/module/reanimated2/layoutReanimation/animationsManager.js +4 -19
  358. package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
  359. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -52
  360. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
  361. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -32
  362. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
  363. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -38
  364. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
  365. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -16
  366. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
  367. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -8
  368. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
  369. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -14
  370. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  371. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -26
  372. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
  373. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -26
  374. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
  375. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -14
  376. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
  377. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -50
  378. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
  379. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
  380. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +3 -17
  381. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
  382. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -23
  383. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
  384. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -5
  385. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
  386. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -6
  387. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
  388. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -5
  389. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
  390. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -8
  391. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
  392. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
  393. package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
  394. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js +3 -13
  395. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
  396. package/lib/module/reanimated2/mappers.js +26 -25
  397. package/lib/module/reanimated2/mappers.js.map +1 -1
  398. package/lib/module/reanimated2/mock.js +5 -15
  399. package/lib/module/reanimated2/mock.js.map +1 -1
  400. package/lib/module/reanimated2/mutables.js +2 -19
  401. package/lib/module/reanimated2/mutables.js.map +1 -1
  402. package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
  403. package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
  404. package/lib/module/reanimated2/platform-specific/checkCppVersion.js +24 -0
  405. package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
  406. package/lib/module/reanimated2/platform-specific/checkVersion.web.js +0 -1
  407. package/lib/module/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
  408. package/lib/module/reanimated2/platform-specific/jsVersion.js +7 -0
  409. package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -0
  410. package/lib/module/reanimated2/pluginUtils.js.map +1 -1
  411. package/lib/module/reanimated2/shareables.js +96 -44
  412. package/lib/module/reanimated2/shareables.js.map +1 -1
  413. package/lib/module/reanimated2/threads.js +39 -33
  414. package/lib/module/reanimated2/threads.js.map +1 -1
  415. package/lib/module/reanimated2/utils.js +0 -3
  416. package/lib/module/reanimated2/utils.js.map +1 -1
  417. package/lib/module/reanimated2/valueSetter.js +6 -19
  418. package/lib/module/reanimated2/valueSetter.js.map +1 -1
  419. package/lib/module/setAndForwardRef.js +3 -2
  420. package/lib/module/setAndForwardRef.js.map +1 -1
  421. package/package.json +46 -40
  422. package/plugin/.eslintrc.js +7 -0
  423. package/plugin/README.md +241 -0
  424. package/plugin/build/plugin.js +714 -0
  425. package/plugin/build/plugin.js.map +7 -0
  426. package/plugin/index.js +1 -807
  427. package/plugin/package.json +23 -0
  428. package/plugin/src/buildWorkletString.ts +213 -0
  429. package/plugin/src/commonObjects.ts +60 -0
  430. package/plugin/src/injectVersion.ts +37 -0
  431. package/plugin/src/makeWorklet.ts +375 -0
  432. package/plugin/src/plugin.ts +49 -0
  433. package/plugin/src/processForCalleesWorklets.ts +106 -0
  434. package/plugin/src/processIfGestureHandlerEventCallbackFunctionNode.ts +156 -0
  435. package/plugin/src/processIfWorkletFunction.ts +55 -0
  436. package/plugin/src/processIfWorkletNode.ts +44 -0
  437. package/plugin/src/processInlineStylesWarning.ts +129 -0
  438. package/plugin/src/processWorkletObjectMethod.ts +31 -0
  439. package/plugin/src/types.ts +15 -0
  440. package/plugin/src/utils.ts +6 -0
  441. package/plugin/tsconfig.json +15 -0
  442. package/plugin/yarn.lock +2193 -0
  443. package/react-native-reanimated.d.ts +1 -0
  444. package/scripts/reanimated_utils.rb +2 -2
  445. package/src/createAnimatedComponent.tsx +2 -3
  446. package/src/reanimated2/Easing.ts +19 -0
  447. package/src/reanimated2/NativeMethods.ts +9 -4
  448. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +2 -2
  449. package/src/reanimated2/UpdateProps.ts +2 -2
  450. package/src/reanimated2/animation/decay.ts +7 -1
  451. package/src/reanimated2/animation/styleAnimation.ts +5 -1
  452. package/src/reanimated2/core.ts +4 -4
  453. package/src/reanimated2/errors.ts +1 -0
  454. package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +12 -4
  455. package/src/reanimated2/globals.d.ts +71 -112
  456. package/src/reanimated2/hook/commonTypes.ts +1 -1
  457. package/src/reanimated2/hook/useAnimatedReaction.ts +2 -2
  458. package/src/reanimated2/hook/useAnimatedSensor.ts +2 -2
  459. package/src/reanimated2/initializers.ts +11 -8
  460. package/src/reanimated2/jestUtils.ts +0 -1
  461. package/src/reanimated2/js-reanimated/JSReanimated.ts +5 -1
  462. package/src/reanimated2/js-reanimated/index.ts +1 -1
  463. package/src/reanimated2/mappers.ts +26 -4
  464. package/src/reanimated2/mock.ts +1 -0
  465. package/src/reanimated2/platform-specific/checkCppVersion.ts +29 -0
  466. package/src/reanimated2/platform-specific/jsVersion.ts +6 -0
  467. package/src/reanimated2/shareables.ts +107 -8
  468. package/src/reanimated2/threads.ts +36 -17
  469. package/lib/commonjs/reanimated2/platform-specific/checkVersion.js +0 -42
  470. package/lib/commonjs/reanimated2/platform-specific/checkVersion.js.map +0 -1
  471. package/lib/module/reanimated2/platform-specific/checkVersion.js +0 -35
  472. package/lib/module/reanimated2/platform-specific/checkVersion.js.map +0 -1
  473. package/src/reanimated2/platform-specific/checkVersion.ts +0 -39
@@ -1 +1 @@
1
- {"version":3,"names":["Keyframe","constructor","definitions","delay","delayV","delayFunction","getDelayFunction","keyframes","initialValues","parseDefinitions","callback","callbackV","_targetValues","animations","addAnimation","key","keyframePoints","length","animation","withTiming","value","duration","easing","Easing","linear","withSequence","apply","map","keyframePoint","includes","transform","push","split","Object","keys","forEach","transformProp","index","transformPropKey","toString","parsedKeyframes","from","Error","to","styleProp","transformStyle","durationV","animationKeyPoints","Array","getAnimationDuration","currentKeyPoint","maxDuration","currentDuration","reduce","acc","addKeyPoint","filter","parseInt","sort","a","b","keyPoint","keyframe","addKeyPointWith","durationMs","delayMs","withCallback","withDelay","_"],"sources":["Keyframe.ts"],"sourcesContent":["import { Easing, EasingFn } from '../../Easing';\nimport { withDelay, withSequence, withTiming } from '../../animation';\nimport {\n AnimationFunction,\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n KeyframeProps,\n} from './commonTypes';\nimport { TransformProperty, StyleProps } from '../../commonTypes';\nexport interface KeyframePoint {\n duration: number;\n value: number | string;\n easing?: EasingFn;\n}\nexport interface ParsedKeyframesDefinition {\n initialValues: StyleProps;\n keyframes: Record<string, KeyframePoint[]>;\n}\nexport class Keyframe implements IEntryExitAnimationBuilder {\n durationV?: number;\n delayV?: number;\n callbackV?: (finished: boolean) => void;\n definitions: Record<string, KeyframeProps>;\n\n /*\n Keyframe definition should be passed in the constructor as the map\n which keys are between range 0 - 100 (%) and correspond to the point in the animation progress.\n */\n constructor(definitions: Record<string, KeyframeProps>) {\n this.definitions = definitions;\n }\n\n private parseDefinitions(): ParsedKeyframesDefinition {\n /* \n Each style property contain an array with all their key points: \n value, duration of transition to that value, and optional easing function (defaults to Linear)\n */\n const parsedKeyframes: Record<string, KeyframePoint[]> = {};\n /*\n Parsing keyframes 'from' and 'to'.\n */\n if (this.definitions.from) {\n if (this.definitions['0']) {\n throw Error(\n \"You cannot provide both keyframe 0 and 'from' as they both specified initial values\"\n );\n }\n this.definitions['0'] = this.definitions.from;\n delete this.definitions.from;\n }\n if (this.definitions.to) {\n if (this.definitions['100']) {\n throw Error(\n \"You cannot provide both keyframe 100 and 'to' as they both specified values at the end of the animation.\"\n );\n }\n this.definitions['100'] = this.definitions.to;\n delete this.definitions.to;\n }\n /* \n One of the assumptions is that keyframe 0 is required to properly set initial values.\n Every other keyframe should contain properties from the set provided as initial values.\n */\n if (!this.definitions['0']) {\n throw Error(\n \"Please provide 0, or 'from' keyframe with initial state of your object.\"\n );\n }\n const initialValues: StyleProps = this.definitions['0'] as StyleProps;\n /*\n Initialize parsedKeyframes for properties provided in initial keyframe\n */\n Object.keys(initialValues).forEach((styleProp: string) => {\n if (styleProp === 'transform') {\n initialValues[styleProp]?.forEach((transformStyle, index) => {\n Object.keys(transformStyle).forEach((transformProp: string) => {\n parsedKeyframes[index.toString() + '_transform:' + transformProp] =\n [];\n });\n });\n } else {\n parsedKeyframes[styleProp] = [];\n }\n });\n\n const duration: number = this.durationV ? this.durationV : 500;\n const animationKeyPoints: Array<string> = Array.from(\n Object.keys(this.definitions)\n );\n\n const getAnimationDuration = (\n key: string,\n currentKeyPoint: number\n ): number => {\n const maxDuration = (currentKeyPoint / 100) * duration;\n const currentDuration = parsedKeyframes[key].reduce(\n (acc: number, value: KeyframePoint) => acc + value.duration,\n 0\n );\n return maxDuration - currentDuration;\n };\n\n /* \n Other keyframes can't contain properties that were not specified in initial keyframe.\n */\n const addKeyPoint = ({\n key,\n value,\n currentKeyPoint,\n easing,\n }: {\n key: string;\n value: string | number;\n currentKeyPoint: number;\n easing?: EasingFn;\n }): void => {\n if (!(key in parsedKeyframes)) {\n throw Error(\n \"Keyframe can contain only that set of properties that were provide with initial values (keyframe 0 or 'from')\"\n );\n }\n parsedKeyframes[key].push({\n duration: getAnimationDuration(key, currentKeyPoint),\n value: value,\n easing: easing,\n });\n };\n animationKeyPoints\n .filter((value: string) => parseInt(value) !== 0)\n .sort((a: string, b: string) => parseInt(a) - parseInt(b))\n .forEach((keyPoint: string) => {\n if (parseInt(keyPoint) < 0 || parseInt(keyPoint) > 100) {\n throw Error('Keyframe should be in between range 0 - 100.');\n }\n const keyframe: KeyframeProps = this.definitions[keyPoint];\n const easing = keyframe.easing;\n delete keyframe.easing;\n const addKeyPointWith = (key: string, value: string | number) =>\n addKeyPoint({\n key,\n value,\n currentKeyPoint: parseInt(keyPoint),\n easing,\n });\n Object.keys(keyframe).forEach((key: string) => {\n if (key === 'transform') {\n keyframe[key]?.forEach(\n (transformStyle: { [key: string]: any }, index) => {\n Object.keys(transformStyle).forEach((transformProp: string) => {\n addKeyPointWith(\n index.toString() + '_transform:' + transformProp,\n transformStyle[transformProp]\n );\n });\n }\n );\n } else {\n addKeyPointWith(key, keyframe[key]);\n }\n });\n });\n return { initialValues: initialValues, keyframes: parsedKeyframes };\n }\n\n duration(durationMs: number): Keyframe {\n this.durationV = durationMs;\n return this;\n }\n\n delay(delayMs: number): Keyframe {\n this.delayV = delayMs;\n return this;\n }\n\n withCallback(callback: (finsihed: boolean) => void): Keyframe {\n this.callbackV = callback;\n return this;\n }\n\n private getDelayFunction(): AnimationFunction {\n const delay = this.delayV;\n return delay\n ? withDelay\n : (_, animation) => {\n 'worklet';\n return animation;\n };\n }\n\n build = (): EntryExitAnimationFunction => {\n const delay = this.delayV;\n const delayFunction = this.getDelayFunction();\n const { keyframes, initialValues } = this.parseDefinitions();\n const callback = this.callbackV;\n\n return (_targetValues) => {\n 'worklet';\n const animations: StyleProps = {};\n\n /* \n For each style property, an animations sequence is created that corresponds with its key points.\n Transform style properties require special handling because of their nested structure.\n */\n const addAnimation = (key: string) => {\n const keyframePoints = keyframes[key];\n // in case if property was only passed as initial value\n if (keyframePoints.length === 0) return;\n const animation = delayFunction(\n delay,\n keyframePoints.length === 1\n ? withTiming(keyframePoints[0].value, {\n duration: keyframePoints[0].duration,\n easing: keyframePoints[0].easing\n ? keyframePoints[0].easing\n : Easing.linear,\n })\n : withSequence.apply(\n this,\n keyframePoints.map((keyframePoint: KeyframePoint) =>\n withTiming(keyframePoint.value, {\n duration: keyframePoint.duration,\n easing: keyframePoint.easing\n ? keyframePoint.easing\n : Easing.linear,\n })\n )\n )\n );\n if (key.includes('transform')) {\n if (!('transform' in animations)) {\n animations.transform = [];\n }\n animations.transform?.push(<TransformProperty>{\n [key.split(':')[1]]: animation,\n });\n } else {\n animations[key] = animation;\n }\n };\n Object.keys(initialValues).forEach((key: string) => {\n if (key.includes('transform')) {\n initialValues[key].forEach(\n (transformProp: Record<string, number | string>, index: number) => {\n Object.keys(transformProp).forEach((transformPropKey: string) => {\n addAnimation(\n index.toString() + '_transform:' + transformPropKey\n );\n });\n }\n );\n } else {\n addAnimation(key);\n }\n });\n return {\n animations: animations,\n initialValues: initialValues,\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAiBO,MAAMA,QAAN,CAAqD;EAM1D;AACF;AACA;AACA;EACEC,WAA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,MAAnB;IACA,OAAOD,KAAK,GACRgE,oBADQ,GAER,CAACC,CAAD,EAAIlD,SAAJ,KAAkB;MAChB;;MACA,OAAOA,SAAP;IACD,CALL;EAMD;;AAzKyD"}
1
+ {"version":3,"names":["_Easing","require","_animation","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","Keyframe","constructor","definitions","delay","delayV","delayFunction","getDelayFunction","keyframes","initialValues","parseDefinitions","callback","callbackV","_targetValues","animations","addAnimation","keyframePoints","length","animation","withTiming","duration","easing","Easing","linear","withSequence","apply","map","keyframePoint","includes","_animations$transform","transform","push","split","keys","forEach","transformProp","index","transformPropKey","toString","parsedKeyframes","from","Error","to","styleProp","_initialValues$styleP","transformStyle","durationV","animationKeyPoints","Array","getAnimationDuration","currentKeyPoint","maxDuration","currentDuration","reduce","acc","addKeyPoint","_ref","filter","parseInt","sort","a","b","keyPoint","keyframe","addKeyPointWith","_keyframe$key","durationMs","delayMs","withCallback","withDelay","_","exports"],"sources":["Keyframe.ts"],"sourcesContent":["import { Easing, EasingFn } from '../../Easing';\nimport { withDelay, withSequence, withTiming } from '../../animation';\nimport {\n AnimationFunction,\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n KeyframeProps,\n} from './commonTypes';\nimport { TransformProperty, StyleProps } from '../../commonTypes';\nexport interface KeyframePoint {\n duration: number;\n value: number | string;\n easing?: EasingFn;\n}\nexport interface ParsedKeyframesDefinition {\n initialValues: StyleProps;\n keyframes: Record<string, KeyframePoint[]>;\n}\nexport class Keyframe implements IEntryExitAnimationBuilder {\n durationV?: number;\n delayV?: number;\n callbackV?: (finished: boolean) => void;\n definitions: Record<string, KeyframeProps>;\n\n /*\n Keyframe definition should be passed in the constructor as the map\n which keys are between range 0 - 100 (%) and correspond to the point in the animation progress.\n */\n constructor(definitions: Record<string, KeyframeProps>) {\n this.definitions = definitions;\n }\n\n private parseDefinitions(): ParsedKeyframesDefinition {\n /* \n Each style property contain an array with all their key points: \n value, duration of transition to that value, and optional easing function (defaults to Linear)\n */\n const parsedKeyframes: Record<string, KeyframePoint[]> = {};\n /*\n Parsing keyframes 'from' and 'to'.\n */\n if (this.definitions.from) {\n if (this.definitions['0']) {\n throw Error(\n \"You cannot provide both keyframe 0 and 'from' as they both specified initial values\"\n );\n }\n this.definitions['0'] = this.definitions.from;\n delete this.definitions.from;\n }\n if (this.definitions.to) {\n if (this.definitions['100']) {\n throw Error(\n \"You cannot provide both keyframe 100 and 'to' as they both specified values at the end of the animation.\"\n );\n }\n this.definitions['100'] = this.definitions.to;\n delete this.definitions.to;\n }\n /* \n One of the assumptions is that keyframe 0 is required to properly set initial values.\n Every other keyframe should contain properties from the set provided as initial values.\n */\n if (!this.definitions['0']) {\n throw Error(\n \"Please provide 0, or 'from' keyframe with initial state of your object.\"\n );\n }\n const initialValues: StyleProps = this.definitions['0'] as StyleProps;\n /*\n Initialize parsedKeyframes for properties provided in initial keyframe\n */\n Object.keys(initialValues).forEach((styleProp: string) => {\n if (styleProp === 'transform') {\n initialValues[styleProp]?.forEach((transformStyle, index) => {\n Object.keys(transformStyle).forEach((transformProp: string) => {\n parsedKeyframes[index.toString() + '_transform:' + transformProp] =\n [];\n });\n });\n } else {\n parsedKeyframes[styleProp] = [];\n }\n });\n\n const duration: number = this.durationV ? this.durationV : 500;\n const animationKeyPoints: Array<string> = Array.from(\n Object.keys(this.definitions)\n );\n\n const getAnimationDuration = (\n key: string,\n currentKeyPoint: number\n ): number => {\n const maxDuration = (currentKeyPoint / 100) * duration;\n const currentDuration = parsedKeyframes[key].reduce(\n (acc: number, value: KeyframePoint) => acc + value.duration,\n 0\n );\n return maxDuration - currentDuration;\n };\n\n /* \n Other keyframes can't contain properties that were not specified in initial keyframe.\n */\n const addKeyPoint = ({\n key,\n value,\n currentKeyPoint,\n easing,\n }: {\n key: string;\n value: string | number;\n currentKeyPoint: number;\n easing?: EasingFn;\n }): void => {\n if (!(key in parsedKeyframes)) {\n throw Error(\n \"Keyframe can contain only that set of properties that were provide with initial values (keyframe 0 or 'from')\"\n );\n }\n parsedKeyframes[key].push({\n duration: getAnimationDuration(key, currentKeyPoint),\n value: value,\n easing: easing,\n });\n };\n animationKeyPoints\n .filter((value: string) => parseInt(value) !== 0)\n .sort((a: string, b: string) => parseInt(a) - parseInt(b))\n .forEach((keyPoint: string) => {\n if (parseInt(keyPoint) < 0 || parseInt(keyPoint) > 100) {\n throw Error('Keyframe should be in between range 0 - 100.');\n }\n const keyframe: KeyframeProps = this.definitions[keyPoint];\n const easing = keyframe.easing;\n delete keyframe.easing;\n const addKeyPointWith = (key: string, value: string | number) =>\n addKeyPoint({\n key,\n value,\n currentKeyPoint: parseInt(keyPoint),\n easing,\n });\n Object.keys(keyframe).forEach((key: string) => {\n if (key === 'transform') {\n keyframe[key]?.forEach(\n (transformStyle: { [key: string]: any }, index) => {\n Object.keys(transformStyle).forEach((transformProp: string) => {\n addKeyPointWith(\n index.toString() + '_transform:' + transformProp,\n transformStyle[transformProp]\n );\n });\n }\n );\n } else {\n addKeyPointWith(key, keyframe[key]);\n }\n });\n });\n return { initialValues: initialValues, keyframes: parsedKeyframes };\n }\n\n duration(durationMs: number): Keyframe {\n this.durationV = durationMs;\n return this;\n }\n\n delay(delayMs: number): Keyframe {\n this.delayV = delayMs;\n return this;\n }\n\n withCallback(callback: (finsihed: boolean) => void): Keyframe {\n this.callbackV = callback;\n return this;\n }\n\n private getDelayFunction(): AnimationFunction {\n const delay = this.delayV;\n return delay\n ? withDelay\n : (_, animation) => {\n 'worklet';\n return animation;\n };\n }\n\n build = (): EntryExitAnimationFunction => {\n const delay = this.delayV;\n const delayFunction = this.getDelayFunction();\n const { keyframes, initialValues } = this.parseDefinitions();\n const callback = this.callbackV;\n\n return (_targetValues) => {\n 'worklet';\n const animations: StyleProps = {};\n\n /* \n For each style property, an animations sequence is created that corresponds with its key points.\n Transform style properties require special handling because of their nested structure.\n */\n const addAnimation = (key: string) => {\n const keyframePoints = keyframes[key];\n // in case if property was only passed as initial value\n if (keyframePoints.length === 0) return;\n const animation = delayFunction(\n delay,\n keyframePoints.length === 1\n ? withTiming(keyframePoints[0].value, {\n duration: keyframePoints[0].duration,\n easing: keyframePoints[0].easing\n ? keyframePoints[0].easing\n : Easing.linear,\n })\n : withSequence.apply(\n this,\n keyframePoints.map((keyframePoint: KeyframePoint) =>\n withTiming(keyframePoint.value, {\n duration: keyframePoint.duration,\n easing: keyframePoint.easing\n ? keyframePoint.easing\n : Easing.linear,\n })\n )\n )\n );\n if (key.includes('transform')) {\n if (!('transform' in animations)) {\n animations.transform = [];\n }\n animations.transform?.push(<TransformProperty>{\n [key.split(':')[1]]: animation,\n });\n } else {\n animations[key] = animation;\n }\n };\n Object.keys(initialValues).forEach((key: string) => {\n if (key.includes('transform')) {\n initialValues[key].forEach(\n (transformProp: Record<string, number | string>, index: number) => {\n Object.keys(transformProp).forEach((transformPropKey: string) => {\n addAnimation(\n index.toString() + '_transform:' + transformPropKey\n );\n });\n }\n );\n } else {\n addAnimation(key);\n }\n });\n return {\n animations: animations,\n initialValues: initialValues,\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAAsE,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV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Y,cAAc,CAAC,CAACX,OAAO,CAAEC,aAAqB,IAAK;cAC7D6B,eAAe,CACb5B,KAAK,CAACE,QAAQ,EAAE,GAAG,aAAa,GAAGH,aAAa,EAChDU,cAAc,CAACV,aAAa,CAAC,CAC9B;YACH,CAAC,CAAC;UACJ,CAAC,CACF;QACH,CAAC,MAAM;UACL6B,eAAe,CAACpF,GAAG,EAAEmF,QAAQ,CAACnF,GAAG,CAAC,CAAC;QACrC;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;IACJ,OAAO;MAAE6B,aAAa,EAAEA,aAAa;MAAED,SAAS,EAAE+B;IAAgB,CAAC;EACrE;EAEAnB,QAAQA,CAAC8C,UAAkB,EAAY;IACrC,IAAI,CAACpB,SAAS,GAAGoB,UAAU;IAC3B,OAAO,IAAI;EACb;EAEA9D,KAAKA,CAAC+D,OAAe,EAAY;IAC/B,IAAI,CAAC9D,MAAM,GAAG8D,OAAO;IACrB,OAAO,IAAI;EACb;EAEAC,YAAYA,CAACzD,QAAqC,EAAY;IAC5D,IAAI,CAACC,SAAS,GAAGD,QAAQ;IACzB,OAAO,IAAI;EACb;EAEQJ,gBAAgBA,CAAA,EAAsB;IAC5C,MAAMH,KAAK,GAAG,IAAI,CAACC,MAAM;IACzB,OAAOD,KAAK,GACRiE,oBAAS,GACT,CAACC,CAAC,EAAEpD,SAAS,KAAK;MAChB,SAAS;;MACT,OAAOA,SAAS;IAClB,CAAC;EACP;AA0EF;AAACqD,OAAA,CAAAtE,QAAA,GAAAA,QAAA"}
@@ -5,13 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.LayoutAnimationType = void 0;
7
7
  // this is just a temporary mock
8
- let LayoutAnimationType;
9
- exports.LayoutAnimationType = LayoutAnimationType;
10
-
11
- (function (LayoutAnimationType) {
8
+ let LayoutAnimationType = /*#__PURE__*/function (LayoutAnimationType) {
12
9
  LayoutAnimationType[LayoutAnimationType["ENTERING"] = 1] = "ENTERING";
13
10
  LayoutAnimationType[LayoutAnimationType["EXITING"] = 2] = "EXITING";
14
11
  LayoutAnimationType[LayoutAnimationType["LAYOUT"] = 3] = "LAYOUT";
15
12
  LayoutAnimationType[LayoutAnimationType["SHARED_ELEMENT_TRANSITION"] = 4] = "SHARED_ELEMENT_TRANSITION";
16
- })(LayoutAnimationType || (exports.LayoutAnimationType = LayoutAnimationType = {}));
13
+ return LayoutAnimationType;
14
+ }({});
15
+ exports.LayoutAnimationType = LayoutAnimationType;
17
16
  //# sourceMappingURL=commonTypes.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"names":["LayoutAnimationType","exports"],"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;AAAA,IAgDxDA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAAC,OAAA,CAAAD,mBAAA,GAAAA,mBAAA"}
@@ -27,12 +27,8 @@ Object.defineProperty(exports, "LayoutAnimationType", {
27
27
  return _commonTypes.LayoutAnimationType;
28
28
  }
29
29
  });
30
-
31
30
  var _BaseAnimationBuilder = require("./BaseAnimationBuilder");
32
-
33
31
  var _ComplexAnimationBuilder = require("./ComplexAnimationBuilder");
34
-
35
32
  var _Keyframe = require("./Keyframe");
36
-
37
33
  var _commonTypes = require("./commonTypes");
38
34
  //# 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 { 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
+ {"version":3,"names":["_BaseAnimationBuilder","require","_ComplexAnimationBuilder","_Keyframe","_commonTypes"],"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,IAAAA,qBAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA"}
@@ -1,15 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  var _styleAnimation = require("../animation/styleAnimation");
4
-
5
4
  var _mutables = require("../mutables");
6
-
7
5
  var _animationBuilder = require("./animationBuilder");
8
-
9
6
  var _threads = require("../threads");
10
-
11
7
  const TAG_OFFSET = 1e9;
12
-
13
8
  function startObservingProgress(tag, sharedValue, animationType) {
14
9
  'worklet';
15
10
 
@@ -18,15 +13,12 @@ function startObservingProgress(tag, sharedValue, animationType) {
18
13
  _notifyAboutProgress(tag, sharedValue.value, isSharedTransition);
19
14
  });
20
15
  }
21
-
22
16
  function stopObservingProgress(tag, sharedValue, cancelled, removeView) {
23
17
  'worklet';
24
18
 
25
19
  sharedValue.removeListener(tag + TAG_OFFSET);
26
-
27
20
  _notifyAboutEnd(tag, cancelled, removeView);
28
21
  }
29
-
30
22
  function createLayoutAnimationManager() {
31
23
  'worklet';
32
24
 
@@ -36,34 +28,30 @@ function createLayoutAnimationManager() {
36
28
  start(tag, type, yogaValues, config) {
37
29
  const style = config(yogaValues);
38
30
  let currentAnimation = style.animations;
39
-
40
31
  if (type === _animationBuilder.LayoutAnimationType.ENTERING) {
41
32
  enteringAnimationForTag.set(tag, currentAnimation);
42
33
  } else if (type === _animationBuilder.LayoutAnimationType.LAYOUT) {
43
34
  // When layout animation is requested, but entering is still running, we merge
44
35
  // new layout animation targets into the ongoing animation
45
36
  const enteringAnimation = enteringAnimationForTag.get(tag);
46
-
47
37
  if (enteringAnimation) {
48
- currentAnimation = { ...enteringAnimation,
38
+ currentAnimation = {
39
+ ...enteringAnimation,
49
40
  ...style.animations
50
41
  };
51
42
  }
52
43
  }
53
-
54
44
  let value = mutableValuesForTag.get(tag);
55
-
56
45
  if (value === undefined) {
57
46
  value = (0, _mutables.makeUIMutable)(style.initialValues);
58
47
  mutableValuesForTag.set(tag, value);
59
48
  } else {
60
49
  stopObservingProgress(tag, value, false, false);
61
50
  value._value = style.initialValues;
62
- } // @ts-ignore The line below started failing because I added types to the method – don't have time to fix it right now
63
-
51
+ }
64
52
 
53
+ // @ts-ignore The line below started failing because I added types to the method – don't have time to fix it right now
65
54
  const animation = (0, _styleAnimation.withStyleAnimation)(currentAnimation);
66
-
67
55
  animation.callback = finished => {
68
56
  if (finished) {
69
57
  enteringAnimationForTag.delete(tag);
@@ -71,27 +59,20 @@ function createLayoutAnimationManager() {
71
59
  const shouldRemoveView = type === _animationBuilder.LayoutAnimationType.EXITING;
72
60
  stopObservingProgress(tag, value, finished, shouldRemoveView);
73
61
  }
74
-
75
62
  style.callback && style.callback(finished === undefined ? false : finished);
76
63
  };
77
-
78
64
  startObservingProgress(tag, value, type);
79
65
  value.value = animation;
80
66
  },
81
-
82
67
  stop(tag) {
83
68
  const value = mutableValuesForTag.get(tag);
84
-
85
69
  if (!value) {
86
70
  return;
87
71
  }
88
-
89
72
  stopObservingProgress(tag, value, true, true);
90
73
  }
91
-
92
74
  };
93
75
  }
94
-
95
76
  (0, _threads.runOnUIImmediately)(() => {
96
77
  'worklet';
97
78
 
@@ -1 +1 @@
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 if (!value) {\n return;\n }\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,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ACT,GAAD,EAAMQ,KAAN,EAAa,KAAb,EAAoB,KAApB,CAArB;QACAA,KAAK,CAACyB,MAAN,GAAeX,KAAK,CAACU,aAArB;MACD,CAtBD,CAwBA;;;MACA,MAAME,SAAS,GAAG,IAAAC,kCAAA,EAAmBZ,gBAAnB,CAAlB;;MAEAW,SAAS,CAACE,QAAV,GAAsBC,QAAD,IAAwB;QAC3C,IAAIA,QAAJ,EAAc;UACZtB,uBAAuB,CAACuB,MAAxB,CAA+BtC,GAA/B;UACAiB,mBAAmB,CAACqB,MAApB,CAA2BtC,GAA3B;UACA,MAAMuC,gBAAgB,GAAGpB,IAAI,KAAKf,qCAAA,CAAoBoC,OAAtD;UACA/B,qBAAqB,CAACT,GAAD,EAAMQ,KAAN,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;;MACA,IAAI,CAACQ,KAAL,EAAY;QACV;MACD;;MACDC,qBAAqB,CAACT,GAAD,EAAMQ,KAAN,EAAa,IAAb,EAAmB,IAAnB,CAArB;IACD;;EArDI,CAAP;AAuDD;;AAED,IAAAkC,2BAAA,EAAmB,MAAM;EACvB;;EACAC,MAAM,CAACC,uBAAP,GAAiC9B,4BAA4B,EAA7D;AACD,CAHD"}
1
+ {"version":3,"names":["_styleAnimation","require","_mutables","_animationBuilder","_threads","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 if (!value) {\n return;\n }\n stopObservingProgress(tag, value, true, true);\n },\n };\n}\n\nrunOnUIImmediately(() => {\n 'worklet';\n global.LayoutAnimationsManager = createLayoutAnimationManager();\n})();\n"],"mappings":";;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAEA,MAAMI,UAAU,GAAG,GAAG;AAEtB,SAASC,sBAAsBA,CAC7BC,GAAW,EACXC,WAAgC,EAChCC,aAAkC,EAC5B;EACN,SAAS;;EACT,MAAMC,kBAAkB,GACtBD,aAAa,KAAKE,qCAAmB,CAACC,yBAAyB;EACjEJ,WAAW,CAACK,WAAW,CAACN,GAAG,GAAGF,UAAU,EAAE,MAAM;IAC9CS,oBAAoB,CAACP,GAAG,EAAEC,WAAW,CAACO,KAAK,EAAEL,kBAAkB,CAAC;EAClE,CAAC,CAAC;AACJ;AAEA,SAASM,qBAAqBA,CAC5BT,GAAW,EACXC,WAAgC,EAChCS,SAAkB,EAClBC,UAAmB,EACb;EACN,SAAS;;EACTV,WAAW,C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SAAS,GAAG,IAAAC,kCAAkB,EAACZ,gBAAgB,CAAC;MAEtDW,SAAS,CAACE,QAAQ,GAAIC,QAAkB,IAAK;QAC3C,IAAIA,QAAQ,EAAE;UACZtB,uBAAuB,CAACuB,MAAM,CAACtC,GAAG,CAAC;UACnCiB,mBAAmB,CAACqB,MAAM,CAACtC,GAAG,CAAC;UAC/B,MAAMuC,gBAAgB,GAAGpB,IAAI,KAAKf,qCAAmB,CAACoC,OAAO;UAC7D/B,qBAAqB,CAACT,GAAG,EAAEQ,KAAK,EAAE6B,QAAQ,EAAEE,gBAAgB,CAAC;QAC/D;QACAjB,KAAK,CAACc,QAAQ,IACZd,KAAK,CAACc,QAAQ,CAACC,QAAQ,KAAKP,SAAS,GAAG,KAAK,GAAGO,QAAQ,CAAC;MAC7D,CAAC;MAEDtC,sBAAsB,CAACC,GAAG,EAAEQ,KAAK,EAAEW,IAAI,CAAC;MACxCX,KAAK,CAACA,KAAK,GAAG0B,SAAS;IACzB,CAAC;IACDO,IAAIA,CAACzC,GAAW,EAAE;MAChB,MAAMQ,KAAK,GAAGS,mBAAmB,CAACY,GAAG,CAAC7B,GAAG,CAAC;MAC1C,IAAI,CAACQ,KAAK,EAAE;QACV;MACF;MACAC,qBAAqB,CAACT,GAAG,EAAEQ,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;IAC/C;EACF,CAAC;AACH;AAEA,IAAAkC,2BAAkB,EAAC,MAAM;EACvB,SAAS;;EACTC,MAAM,CAACC,uBAAuB,GAAG9B,4BAA4B,EAAE;AACjE,CAAC,CAAC,EAAE"}
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.BounceOutUp = exports.BounceOutRight = exports.BounceOutLeft = exports.BounceOutDown = exports.BounceOut = exports.BounceInUp = exports.BounceInRight = exports.BounceInLeft = exports.BounceInDown = exports.BounceIn = void 0;
7
-
8
7
  var _animation = require("../../animation");
9
-
10
8
  var _ComplexAnimationBuilder = require("../animationBuilder/ComplexAnimationBuilder");
11
-
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; }
13
-
9
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
12
  class BounceIn extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
15
13
  constructor() {
16
14
  super(...arguments);
17
-
18
15
  _defineProperty(this, "build", () => {
19
16
  const delayFunction = this.getDelayFunction();
20
17
  const delay = this.getDelay();
@@ -49,27 +46,20 @@ class BounceIn extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
49
46
  };
50
47
  });
51
48
  }
52
-
53
49
  static createInstance() {
54
50
  return new BounceIn();
55
51
  }
56
-
57
52
  static getDuration() {
58
53
  return 600;
59
54
  }
60
-
61
55
  getDuration() {
62
56
  return this.durationV ?? 600;
63
57
  }
64
-
65
58
  }
66
-
67
59
  exports.BounceIn = BounceIn;
68
-
69
60
  class BounceInDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
70
61
  constructor() {
71
62
  super(...arguments);
72
-
73
63
  _defineProperty(this, "build", () => {
74
64
  const delayFunction = this.getDelayFunction();
75
65
  const delay = this.getDelay();
@@ -104,27 +94,20 @@ class BounceInDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
104
94
  };
105
95
  });
106
96
  }
107
-
108
97
  static createInstance() {
109
98
  return new BounceInDown();
110
99
  }
111
-
112
100
  static getDuration() {
113
101
  return 600;
114
102
  }
115
-
116
103
  getDuration() {
117
104
  return this.durationV ?? 600;
118
105
  }
119
-
120
106
  }
121
-
122
107
  exports.BounceInDown = BounceInDown;
123
-
124
108
  class BounceInUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
125
109
  constructor() {
126
110
  super(...arguments);
127
-
128
111
  _defineProperty(this, "build", () => {
129
112
  const delayFunction = this.getDelayFunction();
130
113
  const delay = this.getDelay();
@@ -159,27 +142,20 @@ class BounceInUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
159
142
  };
160
143
  });
161
144
  }
162
-
163
145
  static createInstance() {
164
146
  return new BounceInUp();
165
147
  }
166
-
167
148
  static getDuration() {
168
149
  return 600;
169
150
  }
170
-
171
151
  getDuration() {
172
152
  return this.durationV ?? 600;
173
153
  }
174
-
175
154
  }
176
-
177
155
  exports.BounceInUp = BounceInUp;
178
-
179
156
  class BounceInLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
180
157
  constructor() {
181
158
  super(...arguments);
182
-
183
159
  _defineProperty(this, "build", () => {
184
160
  const delayFunction = this.getDelayFunction();
185
161
  const delay = this.getDelay();
@@ -214,27 +190,20 @@ class BounceInLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
214
190
  };
215
191
  });
216
192
  }
217
-
218
193
  static createInstance() {
219
194
  return new BounceInLeft();
220
195
  }
221
-
222
196
  static getDuration() {
223
197
  return 600;
224
198
  }
225
-
226
199
  getDuration() {
227
200
  return this.durationV ?? 600;
228
201
  }
229
-
230
202
  }
231
-
232
203
  exports.BounceInLeft = BounceInLeft;
233
-
234
204
  class BounceInRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
235
205
  constructor() {
236
206
  super(...arguments);
237
-
238
207
  _defineProperty(this, "build", () => {
239
208
  const delayFunction = this.getDelayFunction();
240
209
  const delay = this.getDelay();
@@ -269,27 +238,20 @@ class BounceInRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
269
238
  };
270
239
  });
271
240
  }
272
-
273
241
  static createInstance() {
274
242
  return new BounceInRight();
275
243
  }
276
-
277
244
  static getDuration() {
278
245
  return 600;
279
246
  }
280
-
281
247
  getDuration() {
282
248
  return this.durationV ?? 600;
283
249
  }
284
-
285
250
  }
286
-
287
251
  exports.BounceInRight = BounceInRight;
288
-
289
252
  class BounceOut extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
290
253
  constructor() {
291
254
  super(...arguments);
292
-
293
255
  _defineProperty(this, "build", () => {
294
256
  const delayFunction = this.getDelayFunction();
295
257
  const delay = this.getDelay();
@@ -324,27 +286,20 @@ class BounceOut extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
324
286
  };
325
287
  });
326
288
  }
327
-
328
289
  static createInstance() {
329
290
  return new BounceOut();
330
291
  }
331
-
332
292
  static getDuration() {
333
293
  return 600;
334
294
  }
335
-
336
295
  getDuration() {
337
296
  return this.durationV ?? 600;
338
297
  }
339
-
340
298
  }
341
-
342
299
  exports.BounceOut = BounceOut;
343
-
344
300
  class BounceOutDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
345
301
  constructor() {
346
302
  super(...arguments);
347
-
348
303
  _defineProperty(this, "build", () => {
349
304
  const delayFunction = this.getDelayFunction();
350
305
  const delay = this.getDelay();
@@ -379,27 +334,20 @@ class BounceOutDown extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
379
334
  };
380
335
  });
381
336
  }
382
-
383
337
  static createInstance() {
384
338
  return new BounceOutDown();
385
339
  }
386
-
387
340
  static getDuration() {
388
341
  return 600;
389
342
  }
390
-
391
343
  getDuration() {
392
344
  return this.durationV ?? 600;
393
345
  }
394
-
395
346
  }
396
-
397
347
  exports.BounceOutDown = BounceOutDown;
398
-
399
348
  class BounceOutUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
400
349
  constructor() {
401
350
  super(...arguments);
402
-
403
351
  _defineProperty(this, "build", () => {
404
352
  const delayFunction = this.getDelayFunction();
405
353
  const delay = this.getDelay();
@@ -434,27 +382,20 @@ class BounceOutUp extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
434
382
  };
435
383
  });
436
384
  }
437
-
438
385
  static createInstance() {
439
386
  return new BounceOutUp();
440
387
  }
441
-
442
388
  static getDuration() {
443
389
  return 600;
444
390
  }
445
-
446
391
  getDuration() {
447
392
  return this.durationV ?? 600;
448
393
  }
449
-
450
394
  }
451
-
452
395
  exports.BounceOutUp = BounceOutUp;
453
-
454
396
  class BounceOutLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
455
397
  constructor() {
456
398
  super(...arguments);
457
-
458
399
  _defineProperty(this, "build", () => {
459
400
  const delayFunction = this.getDelayFunction();
460
401
  const delay = this.getDelay();
@@ -489,27 +430,20 @@ class BounceOutLeft extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
489
430
  };
490
431
  });
491
432
  }
492
-
493
433
  static createInstance() {
494
434
  return new BounceOutLeft();
495
435
  }
496
-
497
436
  static getDuration() {
498
437
  return 600;
499
438
  }
500
-
501
439
  getDuration() {
502
440
  return this.durationV ?? 600;
503
441
  }
504
-
505
442
  }
506
-
507
443
  exports.BounceOutLeft = BounceOutLeft;
508
-
509
444
  class BounceOutRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
510
445
  constructor() {
511
446
  super(...arguments);
512
-
513
447
  _defineProperty(this, "build", () => {
514
448
  const delayFunction = this.getDelayFunction();
515
449
  const delay = this.getDelay();
@@ -544,20 +478,15 @@ class BounceOutRight extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
544
478
  };
545
479
  });
546
480
  }
547
-
548
481
  static createInstance() {
549
482
  return new BounceOutRight();
550
483
  }
551
-
552
484
  static getDuration() {
553
485
  return 600;
554
486
  }
555
-
556
487
  getDuration() {
557
488
  return this.durationV ?? 600;
558
489
  }
559
-
560
490
  }
561
-
562
491
  exports.BounceOutRight = BounceOutRight;
563
492
  //# sourceMappingURL=Bounce.js.map