react-native-reanimated 2.9.0 → 3.0.0-rc.1

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 (890) hide show
  1. package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +4 -4
  2. package/Common/cpp/Fabric/FabricUtils.cpp +133 -0
  3. package/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp +220 -0
  4. package/Common/cpp/Fabric/ShadowTreeCloner.cpp +92 -0
  5. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +336 -6
  6. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +23 -0
  7. package/Common/cpp/Registries/EventHandlerRegistry.cpp +14 -1
  8. package/Common/cpp/Registries/NewestShadowNodesRegistry.cpp +68 -0
  9. package/Common/cpp/SharedItems/ShareableValue.cpp +18 -0
  10. package/Common/cpp/Tools/Mapper.cpp +23 -4
  11. package/Common/cpp/Tools/RuntimeDecorator.cpp +92 -32
  12. package/Common/cpp/Tools/Scheduler.cpp +4 -0
  13. package/Common/cpp/headers/Fabric/FabricUtils.h +79 -0
  14. package/Common/cpp/headers/Fabric/ReanimatedUIManagerBinding.h +47 -0
  15. package/Common/cpp/headers/Fabric/ShadowTreeCloner.h +41 -0
  16. package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +81 -2
  17. package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +8 -0
  18. package/Common/cpp/headers/Registries/EventHandlerRegistry.h +8 -0
  19. package/Common/cpp/headers/Registries/NewestShadowNodesRegistry.h +41 -0
  20. package/Common/cpp/headers/SharedItems/SharedParent.h +3 -0
  21. package/Common/cpp/headers/SharedItems/ValueWrapper.h +25 -0
  22. package/Common/cpp/headers/SpecTools/ErrorHandler.h +5 -0
  23. package/Common/cpp/headers/Tools/Mapper.h +1 -1
  24. package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +48 -8
  25. package/Common/cpp/headers/Tools/RuntimeDecorator.h +8 -3
  26. package/README.md +4 -0
  27. package/RNReanimated.podspec +48 -15
  28. package/android/CMakeLists.txt +207 -86
  29. package/android/build.gradle +243 -236
  30. package/android/src/fabric/java/com/swmansion/reanimated/NativeProxy.java +335 -0
  31. package/android/src/fabric/java/com/swmansion/reanimated/ReaCompatibility.java +25 -0
  32. package/android/src/main/cpp/NativeProxy.cpp +220 -51
  33. package/android/src/main/cpp/OnLoad.cpp +1 -0
  34. package/android/src/main/cpp/headers/NativeProxy.h +72 -7
  35. package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +16 -246
  36. package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +0 -125
  37. package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +165 -0
  38. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +19 -16
  39. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +2 -1
  40. package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +5 -1
  41. package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +1 -1
  42. package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +326 -0
  43. package/android/src/paper/java/com/swmansion/reanimated/ReaCompatibility.java +17 -0
  44. package/ios/Fabric/REAInitializerRCTFabricSurface.h +12 -0
  45. package/ios/Fabric/REAInitializerRCTFabricSurface.mm +73 -0
  46. package/ios/REAEventDispatcher.m +0 -1
  47. package/ios/REAModule.h +10 -1
  48. package/ios/REAModule.mm +284 -0
  49. package/ios/REANodesManager.h +27 -51
  50. package/ios/REANodesManager.mm +517 -0
  51. package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
  52. package/ios/keyboardObserver/REAKeyboardEventObserver.m +198 -0
  53. package/ios/native/NativeProxy.mm +95 -17
  54. package/ios/native/REAInitializer.mm +10 -12
  55. package/ios/native/REAJSIUtils.h +66 -0
  56. package/ios/native/UIResponder+Reanimated.h +3 -1
  57. package/ios/native/UIResponder+Reanimated.mm +3 -1
  58. package/ios/sensor/ReanimatedSensor.m +26 -17
  59. package/lib/commonjs/Animated.js +70 -0
  60. package/lib/commonjs/Animated.js.map +1 -0
  61. package/lib/commonjs/ConfigHelper.js +173 -0
  62. package/lib/commonjs/ConfigHelper.js.map +1 -0
  63. package/lib/commonjs/createAnimatedComponent.js +474 -0
  64. package/lib/commonjs/createAnimatedComponent.js.map +1 -0
  65. package/lib/commonjs/index.js +44 -0
  66. package/lib/commonjs/index.js.map +1 -0
  67. package/lib/commonjs/index.web.js +32 -0
  68. package/lib/commonjs/index.web.js.map +1 -0
  69. package/lib/commonjs/reanimated2/Bezier.js +166 -0
  70. package/lib/commonjs/reanimated2/Bezier.js.map +1 -0
  71. package/lib/commonjs/reanimated2/Colors.js +673 -0
  72. package/lib/commonjs/reanimated2/Colors.js.map +1 -0
  73. package/lib/commonjs/reanimated2/Easing.js +274 -0
  74. package/lib/commonjs/reanimated2/Easing.js.map +1 -0
  75. package/lib/commonjs/reanimated2/NativeMethods.js +100 -0
  76. package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -0
  77. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +99 -0
  78. package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
  79. package/lib/commonjs/reanimated2/NativeReanimated/index.js +26 -0
  80. package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -0
  81. package/lib/commonjs/reanimated2/PlatformChecker.js +33 -0
  82. package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -0
  83. package/lib/commonjs/reanimated2/PropAdapters.js +68 -0
  84. package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -0
  85. package/lib/commonjs/reanimated2/UpdateProps.js +82 -0
  86. package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -0
  87. package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +96 -0
  88. package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -0
  89. package/lib/commonjs/reanimated2/WorkletEventHandler.js +75 -0
  90. package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -0
  91. package/lib/commonjs/reanimated2/animation/commonTypes.js +6 -0
  92. package/lib/commonjs/reanimated2/animation/commonTypes.js.map +1 -0
  93. package/lib/commonjs/reanimated2/animation/decay.js +132 -0
  94. package/lib/commonjs/reanimated2/animation/decay.js.map +1 -0
  95. package/lib/commonjs/reanimated2/animation/delay.js +89 -0
  96. package/lib/commonjs/reanimated2/animation/delay.js.map +1 -0
  97. package/lib/commonjs/reanimated2/animation/index.js +82 -0
  98. package/lib/commonjs/reanimated2/animation/index.js.map +1 -0
  99. package/lib/commonjs/reanimated2/animation/repeat.js +107 -0
  100. package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -0
  101. package/lib/commonjs/reanimated2/animation/sequence.js +103 -0
  102. package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -0
  103. package/lib/commonjs/reanimated2/animation/spring.js +121 -0
  104. package/lib/commonjs/reanimated2/animation/spring.js.map +1 -0
  105. package/lib/commonjs/reanimated2/animation/styleAnimation.js +206 -0
  106. package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -0
  107. package/lib/commonjs/reanimated2/animation/timing.js +82 -0
  108. package/lib/commonjs/reanimated2/animation/timing.js.map +1 -0
  109. package/lib/commonjs/reanimated2/animation/util.js +233 -0
  110. package/lib/commonjs/reanimated2/animation/util.js.map +1 -0
  111. package/lib/commonjs/reanimated2/commonTypes.js +17 -0
  112. package/lib/commonjs/reanimated2/commonTypes.js.map +1 -0
  113. package/lib/commonjs/reanimated2/component/FlatList.js +53 -0
  114. package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -0
  115. package/lib/commonjs/reanimated2/component/Image.js +17 -0
  116. package/lib/commonjs/reanimated2/component/Image.js.map +1 -0
  117. package/lib/commonjs/reanimated2/component/ScrollView.js +17 -0
  118. package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -0
  119. package/lib/commonjs/reanimated2/component/Text.js +17 -0
  120. package/lib/commonjs/reanimated2/component/Text.js.map +1 -0
  121. package/lib/commonjs/reanimated2/component/View.js +17 -0
  122. package/lib/commonjs/reanimated2/component/View.js.map +1 -0
  123. package/lib/commonjs/reanimated2/core.js +360 -0
  124. package/lib/commonjs/reanimated2/core.js.map +1 -0
  125. package/lib/commonjs/reanimated2/fabricUtils.js +27 -0
  126. package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -0
  127. package/lib/commonjs/reanimated2/fabricUtils.web.js +21 -0
  128. package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -0
  129. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +55 -0
  130. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
  131. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +64 -0
  132. package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
  133. package/lib/commonjs/reanimated2/globals.d.js +6 -0
  134. package/lib/commonjs/reanimated2/globals.d.js.map +1 -0
  135. package/lib/commonjs/reanimated2/hook/Hooks.js +35 -0
  136. package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -0
  137. package/lib/commonjs/reanimated2/hook/commonTypes.js +6 -0
  138. package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -0
  139. package/lib/commonjs/reanimated2/hook/index.js +118 -0
  140. package/lib/commonjs/reanimated2/hook/index.js.map +1 -0
  141. package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +66 -0
  142. package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
  143. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +48 -0
  144. package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
  145. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +44 -0
  146. package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -0
  147. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +43 -0
  148. package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -0
  149. package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +62 -0
  150. package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
  151. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +94 -0
  152. package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -0
  153. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +471 -0
  154. package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -0
  155. package/lib/commonjs/reanimated2/hook/useDerivedValue.js +49 -0
  156. package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -0
  157. package/lib/commonjs/reanimated2/hook/useFrameCallback.js +36 -0
  158. package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -0
  159. package/lib/commonjs/reanimated2/hook/useSharedValue.js +30 -0
  160. package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -0
  161. package/lib/commonjs/reanimated2/hook/utils.js +247 -0
  162. package/lib/commonjs/reanimated2/hook/utils.js.map +1 -0
  163. package/lib/commonjs/reanimated2/index.js +162 -0
  164. package/lib/commonjs/reanimated2/index.js.map +1 -0
  165. package/lib/commonjs/reanimated2/interpolateColor.js +154 -0
  166. package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -0
  167. package/lib/commonjs/reanimated2/interpolation.js +143 -0
  168. package/lib/commonjs/reanimated2/interpolation.js.map +1 -0
  169. package/lib/commonjs/reanimated2/jestUtils.js +239 -0
  170. package/lib/commonjs/reanimated2/jestUtils.js.map +1 -0
  171. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +160 -0
  172. package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
  173. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +74 -0
  174. package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -0
  175. package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +146 -0
  176. package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
  177. package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +57 -0
  178. package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -0
  179. package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js +6 -0
  180. package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js.map +1 -0
  181. package/lib/commonjs/reanimated2/js-reanimated/global.js +57 -0
  182. package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -0
  183. package/lib/commonjs/reanimated2/js-reanimated/index.js +57 -0
  184. package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -0
  185. package/lib/commonjs/reanimated2/layoutReanimation/LayoutAnimationRepository.js +97 -0
  186. package/lib/commonjs/reanimated2/layoutReanimation/LayoutAnimationRepository.js.map +1 -0
  187. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +100 -0
  188. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
  189. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +203 -0
  190. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
  191. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +244 -0
  192. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
  193. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +6 -0
  194. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
  195. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +30 -0
  196. package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
  197. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +570 -0
  198. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
  199. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Default.js +55 -0
  200. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Default.js.map +1 -0
  201. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +409 -0
  202. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
  203. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +559 -0
  204. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
  205. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +221 -0
  206. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
  207. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +101 -0
  208. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
  209. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +189 -0
  210. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
  211. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +403 -0
  212. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
  213. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +298 -0
  214. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
  215. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +167 -0
  216. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
  217. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +700 -0
  218. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
  219. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +136 -0
  220. package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
  221. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +120 -0
  222. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
  223. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +180 -0
  224. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
  225. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +66 -0
  226. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
  227. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +64 -0
  228. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
  229. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +52 -0
  230. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
  231. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +68 -0
  232. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
  233. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +84 -0
  234. package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
  235. package/lib/commonjs/reanimated2/layoutReanimation/index.js +47 -0
  236. package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -0
  237. package/lib/commonjs/reanimated2/mock.js +88 -0
  238. package/lib/commonjs/reanimated2/mock.js.map +1 -0
  239. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +16 -0
  240. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -0
  241. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js +5 -0
  242. package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
  243. package/lib/commonjs/reanimated2/utils.js +19 -0
  244. package/lib/commonjs/reanimated2/utils.js.map +1 -0
  245. package/lib/commonjs/setAndForwardRef.js +63 -0
  246. package/lib/commonjs/setAndForwardRef.js.map +1 -0
  247. package/lib/module/Animated.js +8 -0
  248. package/lib/module/Animated.js.map +1 -0
  249. package/lib/module/ConfigHelper.js +161 -0
  250. package/lib/module/ConfigHelper.js.map +1 -0
  251. package/lib/module/createAnimatedComponent.js +452 -0
  252. package/lib/module/createAnimatedComponent.js.map +1 -0
  253. package/lib/module/index.js +15 -0
  254. package/lib/module/index.js.map +1 -0
  255. package/lib/module/index.web.js +6 -0
  256. package/lib/module/index.web.js.map +1 -0
  257. package/lib/module/reanimated2/Bezier.js +159 -0
  258. package/lib/module/reanimated2/Bezier.js.map +1 -0
  259. package/lib/module/reanimated2/Colors.js +632 -0
  260. package/lib/module/reanimated2/Colors.js.map +1 -0
  261. package/lib/module/reanimated2/Easing.js +311 -0
  262. package/lib/module/reanimated2/Easing.js.map +1 -0
  263. package/lib/module/reanimated2/NativeMethods.js +82 -0
  264. package/lib/module/reanimated2/NativeMethods.js.map +1 -0
  265. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +89 -0
  266. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
  267. package/lib/module/reanimated2/NativeReanimated/index.js +13 -0
  268. package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -0
  269. package/lib/module/reanimated2/PlatformChecker.js +17 -0
  270. package/lib/module/reanimated2/PlatformChecker.js.map +1 -0
  271. package/lib/module/reanimated2/PropAdapters.js +56 -0
  272. package/lib/module/reanimated2/PropAdapters.js.map +1 -0
  273. package/lib/module/reanimated2/UpdateProps.js +64 -0
  274. package/lib/module/reanimated2/UpdateProps.js.map +1 -0
  275. package/lib/module/reanimated2/ViewDescriptorsSet.js +83 -0
  276. package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -0
  277. package/lib/module/reanimated2/WorkletEventHandler.js +64 -0
  278. package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -0
  279. package/lib/module/reanimated2/animation/commonTypes.js +2 -0
  280. package/lib/module/reanimated2/animation/commonTypes.js.map +1 -0
  281. package/lib/module/reanimated2/animation/decay.js +123 -0
  282. package/lib/module/reanimated2/animation/decay.js.map +1 -0
  283. package/lib/module/reanimated2/animation/delay.js +79 -0
  284. package/lib/module/reanimated2/animation/delay.js.map +1 -0
  285. package/lib/module/reanimated2/animation/index.js +9 -0
  286. package/lib/module/reanimated2/animation/index.js.map +1 -0
  287. package/lib/module/reanimated2/animation/repeat.js +95 -0
  288. package/lib/module/reanimated2/animation/repeat.js.map +1 -0
  289. package/lib/module/reanimated2/animation/sequence.js +93 -0
  290. package/lib/module/reanimated2/animation/sequence.js.map +1 -0
  291. package/lib/module/reanimated2/animation/spring.js +113 -0
  292. package/lib/module/reanimated2/animation/spring.js.map +1 -0
  293. package/lib/module/reanimated2/animation/styleAnimation.js +191 -0
  294. package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -0
  295. package/lib/module/reanimated2/animation/timing.js +73 -0
  296. package/lib/module/reanimated2/animation/timing.js.map +1 -0
  297. package/lib/module/reanimated2/animation/util.js +216 -0
  298. package/lib/module/reanimated2/animation/util.js.map +1 -0
  299. package/lib/module/reanimated2/commonTypes.js +10 -0
  300. package/lib/module/reanimated2/commonTypes.js.map +1 -0
  301. package/lib/module/reanimated2/component/FlatList.js +33 -0
  302. package/lib/module/reanimated2/component/FlatList.js.map +1 -0
  303. package/lib/module/reanimated2/component/Image.js +5 -0
  304. package/lib/module/reanimated2/component/Image.js.map +1 -0
  305. package/lib/module/reanimated2/component/ScrollView.js +5 -0
  306. package/lib/module/reanimated2/component/ScrollView.js.map +1 -0
  307. package/lib/module/reanimated2/component/Text.js +5 -0
  308. package/lib/module/reanimated2/component/Text.js.map +1 -0
  309. package/lib/module/reanimated2/component/View.js +5 -0
  310. package/lib/module/reanimated2/component/View.js.map +1 -0
  311. package/lib/module/reanimated2/core.js +314 -0
  312. package/lib/module/reanimated2/core.js.map +1 -0
  313. package/lib/module/reanimated2/fabricUtils.js +18 -0
  314. package/lib/module/reanimated2/fabricUtils.js.map +1 -0
  315. package/lib/module/reanimated2/fabricUtils.web.js +12 -0
  316. package/lib/module/reanimated2/fabricUtils.web.js.map +1 -0
  317. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +44 -0
  318. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
  319. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +55 -0
  320. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
  321. package/lib/module/reanimated2/globals.d.js +2 -0
  322. package/lib/module/reanimated2/globals.d.js.map +1 -0
  323. package/lib/module/reanimated2/hook/Hooks.js +10 -0
  324. package/lib/module/reanimated2/hook/Hooks.js.map +1 -0
  325. package/lib/module/reanimated2/hook/commonTypes.js +2 -0
  326. package/lib/module/reanimated2/hook/commonTypes.js.map +1 -0
  327. package/lib/module/reanimated2/hook/index.js +12 -0
  328. package/lib/module/reanimated2/hook/index.js.map +1 -0
  329. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +56 -0
  330. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
  331. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +34 -0
  332. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
  333. package/lib/module/reanimated2/hook/useAnimatedReaction.js +35 -0
  334. package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -0
  335. package/lib/module/reanimated2/hook/useAnimatedRef.js +32 -0
  336. package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -0
  337. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +54 -0
  338. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
  339. package/lib/module/reanimated2/hook/useAnimatedSensor.js +79 -0
  340. package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -0
  341. package/lib/module/reanimated2/hook/useAnimatedStyle.js +450 -0
  342. package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -0
  343. package/lib/module/reanimated2/hook/useDerivedValue.js +39 -0
  344. package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -0
  345. package/lib/module/reanimated2/hook/useFrameCallback.js +24 -0
  346. package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -0
  347. package/lib/module/reanimated2/hook/useSharedValue.js +20 -0
  348. package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -0
  349. package/lib/module/reanimated2/hook/utils.js +208 -0
  350. package/lib/module/reanimated2/hook/utils.js.map +1 -0
  351. package/lib/module/reanimated2/index.js +13 -0
  352. package/lib/module/reanimated2/index.js.map +1 -0
  353. package/lib/module/reanimated2/interpolateColor.js +135 -0
  354. package/lib/module/reanimated2/interpolateColor.js.map +1 -0
  355. package/lib/module/reanimated2/interpolation.js +135 -0
  356. package/lib/module/reanimated2/interpolation.js.map +1 -0
  357. package/lib/module/reanimated2/jestUtils.js +217 -0
  358. package/lib/module/reanimated2/jestUtils.js.map +1 -0
  359. package/lib/module/reanimated2/js-reanimated/JSReanimated.js +144 -0
  360. package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
  361. package/lib/module/reanimated2/js-reanimated/Mapper.js +62 -0
  362. package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -0
  363. package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +137 -0
  364. package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
  365. package/lib/module/reanimated2/js-reanimated/MutableValue.js +48 -0
  366. package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -0
  367. package/lib/module/reanimated2/js-reanimated/commonTypes.js +2 -0
  368. package/lib/module/reanimated2/js-reanimated/commonTypes.js.map +1 -0
  369. package/lib/module/reanimated2/js-reanimated/global.js +48 -0
  370. package/lib/module/reanimated2/js-reanimated/global.js.map +1 -0
  371. package/lib/module/reanimated2/js-reanimated/index.js +43 -0
  372. package/lib/module/reanimated2/js-reanimated/index.js.map +1 -0
  373. package/lib/module/reanimated2/layoutReanimation/LayoutAnimationRepository.js +91 -0
  374. package/lib/module/reanimated2/layoutReanimation/LayoutAnimationRepository.js.map +1 -0
  375. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +90 -0
  376. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
  377. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +192 -0
  378. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
  379. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +233 -0
  380. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
  381. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +2 -0
  382. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
  383. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js +4 -0
  384. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
  385. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +530 -0
  386. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
  387. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Default.js +40 -0
  388. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Default.js.map +1 -0
  389. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +372 -0
  390. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
  391. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +516 -0
  392. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
  393. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +199 -0
  394. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
  395. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +88 -0
  396. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
  397. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +168 -0
  398. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
  399. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +372 -0
  400. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
  401. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +265 -0
  402. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
  403. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +148 -0
  404. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
  405. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +643 -0
  406. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
  407. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js +11 -0
  408. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
  409. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +108 -0
  410. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
  411. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +166 -0
  412. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
  413. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +55 -0
  414. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
  415. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +52 -0
  416. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
  417. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +41 -0
  418. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
  419. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +57 -0
  420. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
  421. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js +7 -0
  422. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
  423. package/lib/module/reanimated2/layoutReanimation/index.js +5 -0
  424. package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -0
  425. package/lib/module/reanimated2/mock.js +86 -0
  426. package/lib/module/reanimated2/mock.js.map +1 -0
  427. package/lib/module/reanimated2/platform-specific/RNRenderer.js +4 -0
  428. package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -0
  429. package/lib/module/reanimated2/platform-specific/RNRenderer.web.js +3 -0
  430. package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
  431. package/lib/module/reanimated2/utils.js +11 -0
  432. package/lib/module/reanimated2/utils.js.map +1 -0
  433. package/lib/module/setAndForwardRef.js +55 -0
  434. package/lib/module/setAndForwardRef.js.map +1 -0
  435. package/mock.js +1 -0
  436. package/package.json +28 -25
  437. package/plugin.js +11 -17
  438. package/src/Animated.ts +0 -2
  439. package/src/createAnimatedComponent.tsx +37 -197
  440. package/src/index.ts +11 -5
  441. package/src/index.web.ts +5 -0
  442. package/src/reanimated2/Colors.ts +1 -1
  443. package/src/reanimated2/Easing.ts +0 -53
  444. package/src/reanimated2/NativeMethods.ts +44 -7
  445. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +9 -0
  446. package/src/reanimated2/UpdateProps.ts +38 -19
  447. package/src/reanimated2/animation/decay.ts +79 -30
  448. package/src/reanimated2/animation/index.ts +7 -4
  449. package/src/reanimated2/animation/util.ts +8 -1
  450. package/src/reanimated2/commonTypes.ts +17 -1
  451. package/src/reanimated2/component/FlatList.tsx +29 -19
  452. package/src/reanimated2/core.ts +15 -9
  453. package/src/reanimated2/fabricUtils.ts +27 -0
  454. package/src/reanimated2/fabricUtils.web.ts +19 -0
  455. package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +43 -0
  456. package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +64 -0
  457. package/src/reanimated2/globals.d.ts +20 -1
  458. package/src/reanimated2/hook/commonTypes.ts +4 -2
  459. package/src/reanimated2/hook/index.ts +14 -14
  460. package/src/reanimated2/hook/useAnimatedGestureHandler.ts +2 -2
  461. package/src/reanimated2/hook/useAnimatedKeyboard.ts +35 -0
  462. package/src/reanimated2/hook/useAnimatedRef.ts +8 -3
  463. package/src/reanimated2/hook/useAnimatedScrollHandler.ts +2 -2
  464. package/src/reanimated2/hook/useAnimatedSensor.ts +5 -5
  465. package/src/reanimated2/hook/useFrameCallback.ts +39 -0
  466. package/src/reanimated2/hook/utils.ts +2 -5
  467. package/src/reanimated2/interpolateColor.ts +6 -2
  468. package/src/reanimated2/interpolation.ts +1 -26
  469. package/src/reanimated2/jestUtils.ts +11 -3
  470. package/src/reanimated2/js-reanimated/JSReanimated.ts +16 -1
  471. package/src/reanimated2/js-reanimated/global.ts +46 -29
  472. package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +1 -1
  473. package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +1 -1
  474. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  475. package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
  476. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  477. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  478. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  479. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  480. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  481. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  482. package/android/.gradle/7.2/gc.properties +0 -0
  483. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  484. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  485. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  486. package/android/.gradle/checksums/checksums.lock +0 -0
  487. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  488. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  489. package/android/.gradle/vcs-1/gc.properties +0 -0
  490. package/android/react-native-reanimated-65-hermes.aar +0 -0
  491. package/android/react-native-reanimated-65-jsc.aar +0 -0
  492. package/android/react-native-reanimated-66-hermes.aar +0 -0
  493. package/android/react-native-reanimated-66-jsc.aar +0 -0
  494. package/android/react-native-reanimated-67-hermes.aar +0 -0
  495. package/android/react-native-reanimated-67-jsc.aar +0 -0
  496. package/android/react-native-reanimated-68-hermes.aar +0 -0
  497. package/android/react-native-reanimated-68-jsc.aar +0 -0
  498. package/android/react-native-reanimated-69-hermes.aar +0 -0
  499. package/android/react-native-reanimated-69-jsc.aar +0 -0
  500. package/android/rnVersionPatch/69/.gitkeep +0 -0
  501. package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +0 -288
  502. package/android/src/main/java/com/swmansion/reanimated/UpdateContext.java +0 -11
  503. package/android/src/main/java/com/swmansion/reanimated/nodes/AlwaysNode.java +0 -29
  504. package/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java +0 -87
  505. package/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java +0 -24
  506. package/android/src/main/java/com/swmansion/reanimated/nodes/CallFuncNode.java +0 -49
  507. package/android/src/main/java/com/swmansion/reanimated/nodes/ClockNode.java +0 -38
  508. package/android/src/main/java/com/swmansion/reanimated/nodes/ClockOpNode.java +0 -73
  509. package/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java +0 -36
  510. package/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java +0 -41
  511. package/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java +0 -33
  512. package/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java +0 -83
  513. package/android/src/main/java/com/swmansion/reanimated/nodes/FinalNode.java +0 -5
  514. package/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java +0 -20
  515. package/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java +0 -41
  516. package/android/src/main/java/com/swmansion/reanimated/nodes/Node.java +0 -139
  517. package/android/src/main/java/com/swmansion/reanimated/nodes/NoopNode.java +0 -37
  518. package/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java +0 -377
  519. package/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java +0 -71
  520. package/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java +0 -153
  521. package/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java +0 -32
  522. package/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java +0 -40
  523. package/android/src/main/java/com/swmansion/reanimated/nodes/TransformNode.java +0 -84
  524. package/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java +0 -40
  525. package/android/src/main/java/com/swmansion/reanimated/transitions/ChangeTransition.java +0 -84
  526. package/android/src/main/java/com/swmansion/reanimated/transitions/SaneSidePropagation.java +0 -25
  527. package/android/src/main/java/com/swmansion/reanimated/transitions/Scale.java +0 -86
  528. package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionModule.java +0 -41
  529. package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionUtils.java +0 -161
  530. package/ios/Nodes/REAAlwaysNode.h +0 -4
  531. package/ios/Nodes/REAAlwaysNode.m +0 -35
  532. package/ios/Nodes/REABezierNode.h +0 -5
  533. package/ios/Nodes/REABezierNode.m +0 -103
  534. package/ios/Nodes/REABlockNode.h +0 -5
  535. package/ios/Nodes/REABlockNode.m +0 -25
  536. package/ios/Nodes/REACallFuncNode.h +0 -6
  537. package/ios/Nodes/REACallFuncNode.m +0 -69
  538. package/ios/Nodes/REAClockNodes.h +0 -19
  539. package/ios/Nodes/REAClockNodes.m +0 -118
  540. package/ios/Nodes/REAConcatNode.h +0 -5
  541. package/ios/Nodes/REAConcatNode.m +0 -32
  542. package/ios/Nodes/REACondNode.h +0 -5
  543. package/ios/Nodes/REACondNode.m +0 -36
  544. package/ios/Nodes/READebugNode.h +0 -5
  545. package/ios/Nodes/READebugNode.m +0 -30
  546. package/ios/Nodes/REAEventNode.h +0 -8
  547. package/ios/Nodes/REAEventNode.m +0 -35
  548. package/ios/Nodes/REAFunctionNode.h +0 -6
  549. package/ios/Nodes/REAFunctionNode.m +0 -24
  550. package/ios/Nodes/REAJSCallNode.h +0 -5
  551. package/ios/Nodes/REAJSCallNode.m +0 -30
  552. package/ios/Nodes/REANode.h +0 -40
  553. package/ios/Nodes/REANode.m +0 -155
  554. package/ios/Nodes/REAOperatorNode.h +0 -5
  555. package/ios/Nodes/REAOperatorNode.m +0 -114
  556. package/ios/Nodes/REAParamNode.h +0 -10
  557. package/ios/Nodes/REAParamNode.m +0 -79
  558. package/ios/Nodes/REAPropsNode.h +0 -9
  559. package/ios/Nodes/REAPropsNode.m +0 -96
  560. package/ios/Nodes/REASetNode.h +0 -5
  561. package/ios/Nodes/REASetNode.m +0 -34
  562. package/ios/Nodes/REAStyleNode.h +0 -5
  563. package/ios/Nodes/REAStyleNode.m +0 -27
  564. package/ios/Nodes/REATransformNode.h +0 -5
  565. package/ios/Nodes/REATransformNode.m +0 -36
  566. package/ios/Nodes/REAValueNode.h +0 -9
  567. package/ios/Nodes/REAValueNode.m +0 -26
  568. package/ios/REAModule.m +0 -184
  569. package/ios/REANodesManager.m +0 -626
  570. package/ios/Transitioning/RCTConvert+REATransition.h +0 -11
  571. package/ios/Transitioning/RCTConvert+REATransition.m +0 -53
  572. package/ios/Transitioning/REAAllTransitions.h +0 -26
  573. package/ios/Transitioning/REAAllTransitions.m +0 -296
  574. package/ios/Transitioning/REATransition.h +0 -64
  575. package/ios/Transitioning/REATransition.m +0 -210
  576. package/ios/Transitioning/REATransitionAnimation.h +0 -17
  577. package/ios/Transitioning/REATransitionAnimation.m +0 -79
  578. package/ios/Transitioning/REATransitionManager.h +0 -9
  579. package/ios/Transitioning/REATransitionManager.m +0 -60
  580. package/ios/Transitioning/REATransitionValues.h +0 -15
  581. package/ios/Transitioning/REATransitionValues.m +0 -25
  582. package/lib/Animated.js +0 -9
  583. package/lib/ConfigHelper.js +0 -145
  584. package/lib/ReanimatedEventEmitter.js +0 -3
  585. package/lib/ReanimatedModule.js +0 -2
  586. package/lib/ReanimatedModule.macos.js +0 -2
  587. package/lib/ReanimatedModule.native.js +0 -12
  588. package/lib/ReanimatedModule.windows.js +0 -2
  589. package/lib/ReanimatedModuleCompat.js +0 -66
  590. package/lib/__mocks__/ReanimatedEventEmitter.js +0 -8
  591. package/lib/__mocks__/ReanimatedModule.native.js +0 -11
  592. package/lib/createAnimatedComponent.js +0 -514
  593. package/lib/index.js +0 -6
  594. package/lib/reanimated1/Easing.js +0 -231
  595. package/lib/reanimated1/SpringConfig.js +0 -79
  596. package/lib/reanimated1/Transitioning.js +0 -158
  597. package/lib/reanimated1/animations/Animation.js +0 -32
  598. package/lib/reanimated1/animations/SpringUtils.js +0 -199
  599. package/lib/reanimated1/animations/backwardCompatibleAnimWrapper.js +0 -117
  600. package/lib/reanimated1/animations/decay.js +0 -54
  601. package/lib/reanimated1/animations/spring.js +0 -198
  602. package/lib/reanimated1/animations/timing.js +0 -74
  603. package/lib/reanimated1/base.js +0 -13
  604. package/lib/reanimated1/core/AnimatedAlways.js +0 -33
  605. package/lib/reanimated1/core/AnimatedBezier.js +0 -150
  606. package/lib/reanimated1/core/AnimatedBlock.js +0 -52
  607. package/lib/reanimated1/core/AnimatedCall.js +0 -55
  608. package/lib/reanimated1/core/AnimatedCallFunc.js +0 -72
  609. package/lib/reanimated1/core/AnimatedClock.js +0 -90
  610. package/lib/reanimated1/core/AnimatedClockTest.js +0 -22
  611. package/lib/reanimated1/core/AnimatedCode.js +0 -32
  612. package/lib/reanimated1/core/AnimatedConcat.js +0 -32
  613. package/lib/reanimated1/core/AnimatedCond.js +0 -57
  614. package/lib/reanimated1/core/AnimatedDebug.js +0 -62
  615. package/lib/reanimated1/core/AnimatedEvent.js +0 -126
  616. package/lib/reanimated1/core/AnimatedFunction.js +0 -55
  617. package/lib/reanimated1/core/AnimatedNode.js +0 -223
  618. package/lib/reanimated1/core/AnimatedOperator.js +0 -103
  619. package/lib/reanimated1/core/AnimatedParam.js +0 -88
  620. package/lib/reanimated1/core/AnimatedProps.js +0 -108
  621. package/lib/reanimated1/core/AnimatedSet.js +0 -38
  622. package/lib/reanimated1/core/AnimatedStartClock.js +0 -30
  623. package/lib/reanimated1/core/AnimatedStopClock.js +0 -30
  624. package/lib/reanimated1/core/AnimatedStyle.js +0 -78
  625. package/lib/reanimated1/core/AnimatedTransform.js +0 -78
  626. package/lib/reanimated1/core/AnimatedValue.js +0 -38
  627. package/lib/reanimated1/core/Core.test.js +0 -30
  628. package/lib/reanimated1/core/InternalAnimatedValue.js +0 -87
  629. package/lib/reanimated1/core/__mocks__/AnimatedProps.js +0 -86
  630. package/lib/reanimated1/core/createEventObjectProxyPolyfill.js +0 -44
  631. package/lib/reanimated1/derived/__mocks__/evaluateOnce.js +0 -14
  632. package/lib/reanimated1/derived/acc.js +0 -11
  633. package/lib/reanimated1/derived/color.js +0 -47
  634. package/lib/reanimated1/derived/diff.js +0 -16
  635. package/lib/reanimated1/derived/diffClamp.js +0 -11
  636. package/lib/reanimated1/derived/evaluateOnce.js +0 -35
  637. package/lib/reanimated1/derived/index.js +0 -8
  638. package/lib/reanimated1/derived/interpolate.js +0 -152
  639. package/lib/reanimated1/derived/interpolateColors.js +0 -62
  640. package/lib/reanimated1/derived/onChange.js +0 -14
  641. package/lib/reanimated1/derived/useCode.js +0 -41
  642. package/lib/reanimated1/index.js +0 -53
  643. package/lib/reanimated1/operators.js +0 -35
  644. package/lib/reanimated1/useValue.js +0 -10
  645. package/lib/reanimated1/val.js +0 -3
  646. package/lib/reanimated2/Bezier.js +0 -126
  647. package/lib/reanimated2/Colors.js +0 -522
  648. package/lib/reanimated2/Easing.js +0 -248
  649. package/lib/reanimated2/NativeMethods.js +0 -42
  650. package/lib/reanimated2/NativeReanimated/NativeReanimated.js +0 -50
  651. package/lib/reanimated2/NativeReanimated/index.js +0 -11
  652. package/lib/reanimated2/PlatformChecker.js +0 -16
  653. package/lib/reanimated2/PropAdapters.js +0 -55
  654. package/lib/reanimated2/UpdateProps.js +0 -55
  655. package/lib/reanimated2/ViewDescriptorsSet.js +0 -75
  656. package/lib/reanimated2/WorkletEventHandler.js +0 -37
  657. package/lib/reanimated2/__mocks__/MutableValue.js +0 -13
  658. package/lib/reanimated2/__mocks__/NativeReanimated.js +0 -20
  659. package/lib/reanimated2/__mocks__/NativeReanimated.native.js +0 -20
  660. package/lib/reanimated2/animation/commonTypes.js +0 -1
  661. package/lib/reanimated2/animation/decay.js +0 -71
  662. package/lib/reanimated2/animation/delay.js +0 -64
  663. package/lib/reanimated2/animation/index.js +0 -8
  664. package/lib/reanimated2/animation/repeat.js +0 -69
  665. package/lib/reanimated2/animation/sequence.js +0 -69
  666. package/lib/reanimated2/animation/spring.js +0 -103
  667. package/lib/reanimated2/animation/styleAnimation.js +0 -171
  668. package/lib/reanimated2/animation/timing.js +0 -64
  669. package/lib/reanimated2/animation/util.js +0 -180
  670. package/lib/reanimated2/commonTypes.js +0 -1
  671. package/lib/reanimated2/component/FlatList.js +0 -30
  672. package/lib/reanimated2/component/Image.js +0 -4
  673. package/lib/reanimated2/component/ScrollView.js +0 -4
  674. package/lib/reanimated2/component/Text.js +0 -4
  675. package/lib/reanimated2/component/View.js +0 -4
  676. package/lib/reanimated2/core.js +0 -268
  677. package/lib/reanimated2/globals.d.ts +0 -60
  678. package/lib/reanimated2/hook/Hooks.js +0 -9
  679. package/lib/reanimated2/hook/commonTypes.js +0 -1
  680. package/lib/reanimated2/hook/index.js +0 -9
  681. package/lib/reanimated2/hook/useAnimatedGestureHandler.js +0 -49
  682. package/lib/reanimated2/hook/useAnimatedReaction.js +0 -37
  683. package/lib/reanimated2/hook/useAnimatedRef.js +0 -25
  684. package/lib/reanimated2/hook/useAnimatedScrollHandler.js +0 -41
  685. package/lib/reanimated2/hook/useAnimatedSensor.js +0 -66
  686. package/lib/reanimated2/hook/useAnimatedStyle.js +0 -393
  687. package/lib/reanimated2/hook/useDerivedValue.js +0 -36
  688. package/lib/reanimated2/hook/useSharedValue.js +0 -17
  689. package/lib/reanimated2/hook/utils.js +0 -173
  690. package/lib/reanimated2/index.js +0 -12
  691. package/lib/reanimated2/interpolateColor.js +0 -98
  692. package/lib/reanimated2/interpolation.js +0 -127
  693. package/lib/reanimated2/jestUtils.js +0 -160
  694. package/lib/reanimated2/js-reanimated/JSReanimated.js +0 -99
  695. package/lib/reanimated2/js-reanimated/Mapper.js +0 -43
  696. package/lib/reanimated2/js-reanimated/MapperRegistry.js +0 -101
  697. package/lib/reanimated2/js-reanimated/MutableValue.js +0 -29
  698. package/lib/reanimated2/js-reanimated/commonTypes.js +0 -1
  699. package/lib/reanimated2/js-reanimated/global.js +0 -25
  700. package/lib/reanimated2/js-reanimated/index.js +0 -35
  701. package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +0 -67
  702. package/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +0 -69
  703. package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +0 -133
  704. package/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +0 -194
  705. package/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +0 -1
  706. package/lib/reanimated2/layoutReanimation/animationBuilder/index.js +0 -3
  707. package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +0 -376
  708. package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +0 -36
  709. package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +0 -275
  710. package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +0 -385
  711. package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +0 -138
  712. package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +0 -81
  713. package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +0 -115
  714. package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +0 -273
  715. package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +0 -203
  716. package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +0 -101
  717. package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +0 -451
  718. package/lib/reanimated2/layoutReanimation/defaultAnimations/index.js +0 -10
  719. package/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +0 -90
  720. package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +0 -132
  721. package/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +0 -37
  722. package/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +0 -41
  723. package/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +0 -34
  724. package/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +0 -46
  725. package/lib/reanimated2/layoutReanimation/defaultTransitions/index.js +0 -6
  726. package/lib/reanimated2/layoutReanimation/index.js +0 -4
  727. package/lib/reanimated2/mock.js +0 -75
  728. package/lib/reanimated2/platform-specific/RNRenderer.js +0 -3
  729. package/lib/reanimated2/platform-specific/RNRenderer.web.js +0 -3
  730. package/lib/reanimated2/utils.js +0 -9
  731. package/lib/setAndForwardRef.js +0 -19
  732. package/lib/types/lib/Animated.d.ts +0 -8
  733. package/lib/types/lib/ConfigHelper.d.ts +0 -12
  734. package/lib/types/lib/ReanimatedEventEmitter.d.ts +0 -3
  735. package/lib/types/lib/ReanimatedModule.d.ts +0 -2
  736. package/lib/types/lib/ReanimatedModule.macos.d.ts +0 -2
  737. package/lib/types/lib/ReanimatedModule.native.d.ts +0 -2
  738. package/lib/types/lib/ReanimatedModule.windows.d.ts +0 -2
  739. package/lib/types/lib/ReanimatedModuleCompat.d.ts +0 -14
  740. package/lib/types/lib/createAnimatedComponent.d.ts +0 -33
  741. package/lib/types/lib/index.d.ts +0 -4
  742. package/lib/types/lib/reanimated2/Bezier.d.ts +0 -6
  743. package/lib/types/lib/reanimated2/Colors.d.ts +0 -31
  744. package/lib/types/lib/reanimated2/Easing.d.ts +0 -172
  745. package/lib/types/lib/reanimated2/NativeMethods.d.ts +0 -14
  746. package/lib/types/lib/reanimated2/NativeReanimated/NativeReanimated.d.ts +0 -20
  747. package/lib/types/lib/reanimated2/NativeReanimated/index.d.ts +0 -3
  748. package/lib/types/lib/reanimated2/PlatformChecker.d.ts +0 -5
  749. package/lib/types/lib/reanimated2/PropAdapters.d.ts +0 -4
  750. package/lib/types/lib/reanimated2/UpdateProps.d.ts +0 -9
  751. package/lib/types/lib/reanimated2/ViewDescriptorsSet.d.ts +0 -20
  752. package/lib/types/lib/reanimated2/WorkletEventHandler.d.ts +0 -13
  753. package/lib/types/lib/reanimated2/__mocks__/MutableValue.d.ts +0 -5
  754. package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.d.ts +0 -13
  755. package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.native.d.ts +0 -13
  756. package/lib/types/lib/reanimated2/animation/commonTypes.d.ts +0 -27
  757. package/lib/types/lib/reanimated2/animation/decay.d.ts +0 -19
  758. package/lib/types/lib/reanimated2/animation/delay.d.ts +0 -7
  759. package/lib/types/lib/reanimated2/animation/index.d.ts +0 -9
  760. package/lib/types/lib/reanimated2/animation/repeat.d.ts +0 -12
  761. package/lib/types/lib/reanimated2/animation/sequence.d.ts +0 -7
  762. package/lib/types/lib/reanimated2/animation/spring.d.ts +0 -22
  763. package/lib/types/lib/reanimated2/animation/styleAnimation.d.ts +0 -7
  764. package/lib/types/lib/reanimated2/animation/timing.d.ts +0 -21
  765. package/lib/types/lib/reanimated2/animation/util.d.ts +0 -9
  766. package/lib/types/lib/reanimated2/commonTypes.d.ts +0 -79
  767. package/lib/types/lib/reanimated2/component/FlatList.d.ts +0 -9
  768. package/lib/types/lib/reanimated2/component/Image.d.ts +0 -3
  769. package/lib/types/lib/reanimated2/component/ScrollView.d.ts +0 -3
  770. package/lib/types/lib/reanimated2/component/Text.d.ts +0 -3
  771. package/lib/types/lib/reanimated2/component/View.d.ts +0 -3
  772. package/lib/types/lib/reanimated2/core.d.ts +0 -24
  773. package/lib/types/lib/reanimated2/hook/Hooks.d.ts +0 -5
  774. package/lib/types/lib/reanimated2/hook/commonTypes.d.ts +0 -14
  775. package/lib/types/lib/reanimated2/hook/index.d.ts +0 -10
  776. package/lib/types/lib/reanimated2/hook/useAnimatedGestureHandler.d.ts +0 -35
  777. package/lib/types/lib/reanimated2/hook/useAnimatedReaction.d.ts +0 -12
  778. package/lib/types/lib/reanimated2/hook/useAnimatedRef.d.ts +0 -3
  779. package/lib/types/lib/reanimated2/hook/useAnimatedScrollHandler.d.ts +0 -21
  780. package/lib/types/lib/reanimated2/hook/useAnimatedSensor.d.ts +0 -18
  781. package/lib/types/lib/reanimated2/hook/useAnimatedStyle.d.ts +0 -11
  782. package/lib/types/lib/reanimated2/hook/useDerivedValue.d.ts +0 -4
  783. package/lib/types/lib/reanimated2/hook/useSharedValue.d.ts +0 -2
  784. package/lib/types/lib/reanimated2/hook/utils.d.ts +0 -28
  785. package/lib/types/lib/reanimated2/index.d.ts +0 -12
  786. package/lib/types/lib/reanimated2/interpolateColor.d.ts +0 -26
  787. package/lib/types/lib/reanimated2/interpolation.d.ts +0 -14
  788. package/lib/types/lib/reanimated2/jestUtils.d.ts +0 -12
  789. package/lib/types/lib/reanimated2/js-reanimated/JSReanimated.d.ts +0 -30
  790. package/lib/types/lib/reanimated2/js-reanimated/Mapper.d.ts +0 -14
  791. package/lib/types/lib/reanimated2/js-reanimated/MapperRegistry.d.ts +0 -14
  792. package/lib/types/lib/reanimated2/js-reanimated/MutableValue.d.ts +0 -14
  793. package/lib/types/lib/reanimated2/js-reanimated/commonTypes.d.ts +0 -44
  794. package/lib/types/lib/reanimated2/js-reanimated/global.d.ts +0 -1
  795. package/lib/types/lib/reanimated2/js-reanimated/index.d.ts +0 -15
  796. package/lib/types/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.d.ts +0 -1
  797. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -22
  798. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -38
  799. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -25
  800. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -77
  801. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/index.d.ts +0 -4
  802. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -62
  803. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Default.d.ts +0 -4
  804. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.d.ts +0 -42
  805. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.d.ts +0 -50
  806. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -18
  807. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -10
  808. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.d.ts +0 -18
  809. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -34
  810. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.d.ts +0 -34
  811. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -18
  812. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -66
  813. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/index.d.ts +0 -10
  814. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -19
  815. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -13
  816. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -6
  817. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -6
  818. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -7
  819. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -9
  820. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/index.d.ts +0 -6
  821. package/lib/types/lib/reanimated2/layoutReanimation/index.d.ts +0 -4
  822. package/lib/types/lib/reanimated2/mock.d.ts +0 -61
  823. package/lib/types/lib/reanimated2/platform-specific/RNRenderer.d.ts +0 -1
  824. package/lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
  825. package/lib/types/lib/reanimated2/utils.d.ts +0 -7
  826. package/lib/types/lib/setAndForwardRef.d.ts +0 -40
  827. package/lib/types/react-native-reanimated-tests.d.ts +0 -1
  828. package/react-native-reanimated.d.ts +0 -1184
  829. package/src/ReanimatedEventEmitter.ts +0 -4
  830. package/src/ReanimatedModule.macos.ts +0 -3
  831. package/src/ReanimatedModule.native.ts +0 -13
  832. package/src/ReanimatedModule.ts +0 -3
  833. package/src/ReanimatedModule.windows.ts +0 -3
  834. package/src/ReanimatedModuleCompat.ts +0 -51
  835. package/src/__mocks__/ReanimatedEventEmitter.js +0 -8
  836. package/src/__mocks__/ReanimatedModule.native.js +0 -11
  837. package/src/reanimated1/Easing.js +0 -231
  838. package/src/reanimated1/SpringConfig.js +0 -79
  839. package/src/reanimated1/Transitioning.js +0 -158
  840. package/src/reanimated1/animations/Animation.js +0 -32
  841. package/src/reanimated1/animations/SpringUtils.js +0 -199
  842. package/src/reanimated1/animations/backwardCompatibleAnimWrapper.js +0 -117
  843. package/src/reanimated1/animations/decay.js +0 -54
  844. package/src/reanimated1/animations/spring.js +0 -198
  845. package/src/reanimated1/animations/timing.js +0 -74
  846. package/src/reanimated1/base.js +0 -13
  847. package/src/reanimated1/core/AnimatedAlways.js +0 -33
  848. package/src/reanimated1/core/AnimatedBezier.js +0 -150
  849. package/src/reanimated1/core/AnimatedBlock.js +0 -52
  850. package/src/reanimated1/core/AnimatedCall.js +0 -55
  851. package/src/reanimated1/core/AnimatedCallFunc.js +0 -72
  852. package/src/reanimated1/core/AnimatedClock.js +0 -90
  853. package/src/reanimated1/core/AnimatedClockTest.js +0 -22
  854. package/src/reanimated1/core/AnimatedCode.js +0 -32
  855. package/src/reanimated1/core/AnimatedConcat.js +0 -32
  856. package/src/reanimated1/core/AnimatedCond.js +0 -57
  857. package/src/reanimated1/core/AnimatedDebug.js +0 -62
  858. package/src/reanimated1/core/AnimatedEvent.js +0 -126
  859. package/src/reanimated1/core/AnimatedFunction.js +0 -55
  860. package/src/reanimated1/core/AnimatedNode.js +0 -223
  861. package/src/reanimated1/core/AnimatedOperator.js +0 -103
  862. package/src/reanimated1/core/AnimatedParam.js +0 -88
  863. package/src/reanimated1/core/AnimatedProps.js +0 -108
  864. package/src/reanimated1/core/AnimatedSet.js +0 -38
  865. package/src/reanimated1/core/AnimatedStartClock.js +0 -30
  866. package/src/reanimated1/core/AnimatedStopClock.js +0 -30
  867. package/src/reanimated1/core/AnimatedStyle.js +0 -78
  868. package/src/reanimated1/core/AnimatedTransform.js +0 -78
  869. package/src/reanimated1/core/AnimatedValue.js +0 -38
  870. package/src/reanimated1/core/Core.test.js +0 -30
  871. package/src/reanimated1/core/InternalAnimatedValue.js +0 -87
  872. package/src/reanimated1/core/__mocks__/AnimatedProps.js +0 -86
  873. package/src/reanimated1/core/createEventObjectProxyPolyfill.js +0 -44
  874. package/src/reanimated1/derived/__mocks__/evaluateOnce.js +0 -14
  875. package/src/reanimated1/derived/acc.js +0 -11
  876. package/src/reanimated1/derived/color.js +0 -47
  877. package/src/reanimated1/derived/diff.js +0 -16
  878. package/src/reanimated1/derived/diffClamp.js +0 -11
  879. package/src/reanimated1/derived/evaluateOnce.js +0 -35
  880. package/src/reanimated1/derived/index.js +0 -8
  881. package/src/reanimated1/derived/interpolate.js +0 -152
  882. package/src/reanimated1/derived/interpolateColors.js +0 -62
  883. package/src/reanimated1/derived/onChange.js +0 -14
  884. package/src/reanimated1/derived/useCode.js +0 -41
  885. package/src/reanimated1/index.js +0 -53
  886. package/src/reanimated1/operators.js +0 -35
  887. package/src/reanimated1/useValue.js +0 -10
  888. package/src/reanimated1/val.js +0 -3
  889. package/src/reanimated2/__mocks__/MutableValue.ts +0 -15
  890. package/src/reanimated2/__mocks__/NativeReanimated.ts +0 -23
@@ -0,0 +1,217 @@
1
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
+ // @ts-nocheck
3
+ import { jestResetJsReanimatedModule } from './core';
4
+ let config = {
5
+ fps: 60
6
+ };
7
+
8
+ const isAnimatedStyle = style => {
9
+ return !!style.animatedStyle;
10
+ };
11
+
12
+ const getAnimatedStyleFromObject = style => {
13
+ return style.animatedStyle.current.value;
14
+ };
15
+
16
+ const getCurrentStyle = received => {
17
+ const styleObject = received.props.style;
18
+ let currentStyle = {};
19
+
20
+ if (Array.isArray(styleObject)) {
21
+ received.props.style.forEach(style => {
22
+ if (isAnimatedStyle(style)) {
23
+ currentStyle = { ...currentStyle,
24
+ ...getAnimatedStyleFromObject(style)
25
+ };
26
+ } else {
27
+ currentStyle = { ...currentStyle,
28
+ ...style
29
+ };
30
+ }
31
+ });
32
+ } else {
33
+ if (isAnimatedStyle(styleObject)) {
34
+ currentStyle = getAnimatedStyleFromObject(styleObject);
35
+ } else {
36
+ currentStyle = { ...styleObject,
37
+ ...received.props.animatedStyle.value
38
+ };
39
+ }
40
+ }
41
+
42
+ return currentStyle;
43
+ };
44
+
45
+ const checkEqual = (currentStyle, expectStyle) => {
46
+ if (Array.isArray(expectStyle)) {
47
+ if (expectStyle.length !== currentStyle.length) return false;
48
+
49
+ for (let i = 0; i < currentStyle.length; i++) {
50
+ if (!checkEqual(currentStyle[i], expectStyle[i])) {
51
+ return false;
52
+ }
53
+ }
54
+ } else if (typeof currentStyle === 'object' && currentStyle) {
55
+ for (const property in expectStyle) {
56
+ if (!checkEqual(currentStyle[property], expectStyle[property])) {
57
+ return false;
58
+ }
59
+ }
60
+ } else {
61
+ return currentStyle === expectStyle;
62
+ }
63
+
64
+ return true;
65
+ };
66
+
67
+ const findStyleDiff = (current, expect, requireAllMatch) => {
68
+ const diffs = [];
69
+ let isEqual = true;
70
+
71
+ for (const property in expect) {
72
+ if (!checkEqual(current[property], expect[property])) {
73
+ isEqual = false;
74
+ diffs.push({
75
+ property: property,
76
+ current: current[property],
77
+ expect: expect[property]
78
+ });
79
+ }
80
+ }
81
+
82
+ if (requireAllMatch && Object.keys(current).length !== Object.keys(expect).length) {
83
+ isEqual = false;
84
+
85
+ for (const property in current) {
86
+ if (expect[property] === undefined) {
87
+ diffs.push({
88
+ property: property,
89
+ current: current[property],
90
+ expect: expect[property]
91
+ });
92
+ }
93
+ }
94
+ }
95
+
96
+ return {
97
+ isEqual,
98
+ diffs
99
+ };
100
+ };
101
+
102
+ const compareStyle = (received, expectedStyle, config) => {
103
+ if (!received.props.style) {
104
+ return {
105
+ message: () => message,
106
+ pass: false
107
+ };
108
+ }
109
+
110
+ const {
111
+ exact
112
+ } = config;
113
+ const currentStyle = getCurrentStyle(received);
114
+ const {
115
+ isEqual,
116
+ diffs
117
+ } = findStyleDiff(currentStyle, expectedStyle, exact);
118
+
119
+ if (isEqual) {
120
+ return {
121
+ message: () => 'ok',
122
+ pass: true
123
+ };
124
+ }
125
+
126
+ const currentStyleStr = JSON.stringify(currentStyle);
127
+ const expectedStyleStr = JSON.stringify(expectedStyle);
128
+ const differences = diffs.map(diff => `- '${diff.property}' should be ${JSON.stringify(diff.expect)}, but is ${JSON.stringify(diff.current)}`).join('\n');
129
+ return {
130
+ message: () => `Expected: ${expectedStyleStr}\nReceived: ${currentStyleStr}\n\nDifferences:\n${differences}`,
131
+ pass: false
132
+ };
133
+ };
134
+
135
+ let frameTime = 1000 / config.fps;
136
+ let requestAnimationFrameCopy;
137
+ let currentTimestamp = 0;
138
+
139
+ const requestAnimationFrame = callback => {
140
+ setTimeout(callback, frameTime);
141
+ };
142
+
143
+ const beforeTest = () => {
144
+ jestResetJsReanimatedModule();
145
+ requestAnimationFrameCopy = global.requestAnimationFrame;
146
+ global.requestAnimationFrame = requestAnimationFrame;
147
+ global.ReanimatedDataMock = {
148
+ now: () => currentTimestamp
149
+ };
150
+ currentTimestamp = 0;
151
+ jest.useFakeTimers();
152
+ };
153
+
154
+ const afterTest = () => {
155
+ jest.useRealTimers();
156
+ global.requestAnimationFrame = requestAnimationFrameCopy;
157
+ };
158
+
159
+ const tickTravel = () => {
160
+ currentTimestamp += frameTime;
161
+ jest.advanceTimersByTime(frameTime);
162
+ };
163
+
164
+ export const withReanimatedTimer = animationTest => {
165
+ beforeTest();
166
+ animationTest();
167
+ afterTest();
168
+ };
169
+ export const advanceAnimationByTime = function () {
170
+ let time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : frameTime;
171
+
172
+ for (let i = 0; i <= Math.ceil(time / frameTime); i++) {
173
+ tickTravel();
174
+ }
175
+
176
+ jest.advanceTimersByTime(frameTime);
177
+ };
178
+ export const advanceAnimationByFrame = count => {
179
+ for (let i = 0; i <= count; i++) {
180
+ tickTravel();
181
+ }
182
+
183
+ jest.advanceTimersByTime(frameTime);
184
+ };
185
+ export const setUpTests = function () {
186
+ let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
187
+ let expect;
188
+
189
+ try {
190
+ expect = require('expect');
191
+ } catch (_) {
192
+ // for Jest in version 28+
193
+ const {
194
+ expect: expectModule
195
+ } = require('@jest/globals');
196
+
197
+ expect = expectModule;
198
+ }
199
+
200
+ require('setimmediate');
201
+
202
+ frameTime = Math.round(1000 / config.fps);
203
+ config = { ...config,
204
+ ...userConfig
205
+ };
206
+ expect.extend({
207
+ toHaveAnimatedStyle(received, expectedStyle) {
208
+ let config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
209
+ return compareStyle(received, expectedStyle, config);
210
+ }
211
+
212
+ });
213
+ };
214
+ export const getAnimatedStyle = received => {
215
+ return getCurrentStyle(received);
216
+ };
217
+ //# sourceMappingURL=jestUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jestResetJsReanimatedModule","config","fps","isAnimatedStyle","style","animatedStyle","getAnimatedStyleFromObject","current","value","getCurrentStyle","received","styleObject","props","currentStyle","Array","isArray","forEach","checkEqual","expectStyle","length","i","property","findStyleDiff","expect","requireAllMatch","diffs","isEqual","push","Object","keys","undefined","compareStyle","expectedStyle","message","pass","exact","currentStyleStr","JSON","stringify","expectedStyleStr","differences","map","diff","join","frameTime","requestAnimationFrameCopy","currentTimestamp","requestAnimationFrame","callback","setTimeout","beforeTest","global","ReanimatedDataMock","now","jest","useFakeTimers","afterTest","useRealTimers","tickTravel","advanceTimersByTime","withReanimatedTimer","animationTest","advanceAnimationByTime","time","Math","ceil","advanceAnimationByFrame","count","setUpTests","userConfig","require","_","expectModule","round","extend","toHaveAnimatedStyle","getAnimatedStyle"],"sources":["jestUtils.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { jestResetJsReanimatedModule } from './core';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace jest {\n interface Matchers<R> {\n toHaveAnimatedStyle(\n style: Record<string, unknown>[] | Record<string, unknown>\n ): R;\n }\n }\n}\n\nlet config = {\n fps: 60,\n};\n\nconst isAnimatedStyle = (style) => {\n return !!style.animatedStyle;\n};\n\nconst getAnimatedStyleFromObject = (style) => {\n return style.animatedStyle.current.value;\n};\n\nconst getCurrentStyle = (received) => {\n const styleObject = received.props.style;\n let currentStyle = {};\n if (Array.isArray(styleObject)) {\n received.props.style.forEach((style) => {\n if (isAnimatedStyle(style)) {\n currentStyle = {\n ...currentStyle,\n ...getAnimatedStyleFromObject(style),\n };\n } else {\n currentStyle = {\n ...currentStyle,\n ...style,\n };\n }\n });\n } else {\n if (isAnimatedStyle(styleObject)) {\n currentStyle = getAnimatedStyleFromObject(styleObject);\n } else {\n currentStyle = {\n ...styleObject,\n ...received.props.animatedStyle.value,\n };\n }\n }\n return currentStyle;\n};\n\nconst checkEqual = (currentStyle, expectStyle) => {\n if (Array.isArray(expectStyle)) {\n if (expectStyle.length !== currentStyle.length) return false;\n for (let i = 0; i < currentStyle.length; i++) {\n if (!checkEqual(currentStyle[i], expectStyle[i])) {\n return false;\n }\n }\n } else if (typeof currentStyle === 'object' && currentStyle) {\n for (const property in expectStyle) {\n if (!checkEqual(currentStyle[property], expectStyle[property])) {\n return false;\n }\n }\n } else {\n return currentStyle === expectStyle;\n }\n return true;\n};\n\nconst findStyleDiff = (current, expect, requireAllMatch) => {\n const diffs = [];\n let isEqual = true;\n for (const property in expect) {\n if (!checkEqual(current[property], expect[property])) {\n isEqual = false;\n diffs.push({\n property: property,\n current: current[property],\n expect: expect[property],\n });\n }\n }\n\n if (\n requireAllMatch &&\n Object.keys(current).length !== Object.keys(expect).length\n ) {\n isEqual = false;\n for (const property in current) {\n if (expect[property] === undefined) {\n diffs.push({\n property: property,\n current: current[property],\n expect: expect[property],\n });\n }\n }\n }\n\n return { isEqual, diffs };\n};\n\nconst compareStyle = (received, expectedStyle, config) => {\n if (!received.props.style) {\n return { message: () => message, pass: false };\n }\n const { exact } = config;\n const currentStyle = getCurrentStyle(received);\n const { isEqual, diffs } = findStyleDiff(currentStyle, expectedStyle, exact);\n\n if (isEqual) {\n return { message: () => 'ok', pass: true };\n }\n\n const currentStyleStr = JSON.stringify(currentStyle);\n const expectedStyleStr = JSON.stringify(expectedStyle);\n const differences = diffs\n .map(\n (diff) =>\n `- '${diff.property}' should be ${JSON.stringify(\n diff.expect\n )}, but is ${JSON.stringify(diff.current)}`\n )\n .join('\\n');\n\n return {\n message: () =>\n `Expected: ${expectedStyleStr}\\nReceived: ${currentStyleStr}\\n\\nDifferences:\\n${differences}`,\n pass: false,\n };\n};\n\nlet frameTime = 1000 / config.fps;\nlet requestAnimationFrameCopy;\nlet currentTimestamp = 0;\n\nconst requestAnimationFrame = (callback) => {\n setTimeout(callback, frameTime);\n};\n\nconst beforeTest = () => {\n jestResetJsReanimatedModule();\n requestAnimationFrameCopy = global.requestAnimationFrame;\n global.requestAnimationFrame = requestAnimationFrame;\n global.ReanimatedDataMock = {\n now: () => currentTimestamp,\n };\n currentTimestamp = 0;\n jest.useFakeTimers();\n};\n\nconst afterTest = () => {\n jest.useRealTimers();\n global.requestAnimationFrame = requestAnimationFrameCopy;\n};\n\nconst tickTravel = () => {\n currentTimestamp += frameTime;\n jest.advanceTimersByTime(frameTime);\n};\n\nexport const withReanimatedTimer = (animationTest) => {\n beforeTest();\n animationTest();\n afterTest();\n};\n\nexport const advanceAnimationByTime = (time = frameTime) => {\n for (let i = 0; i <= Math.ceil(time / frameTime); i++) {\n tickTravel();\n }\n jest.advanceTimersByTime(frameTime);\n};\n\nexport const advanceAnimationByFrame = (count) => {\n for (let i = 0; i <= count; i++) {\n tickTravel();\n }\n jest.advanceTimersByTime(frameTime);\n};\n\nexport const setUpTests = (userConfig = {}) => {\n let expect;\n try {\n expect = require('expect');\n } catch (_) {\n // for Jest in version 28+\n const { expect: expectModule } = require('@jest/globals');\n expect = expectModule;\n }\n\n require('setimmediate');\n frameTime = Math.round(1000 / config.fps);\n\n config = {\n ...config,\n ...userConfig,\n };\n\n expect.extend({\n toHaveAnimatedStyle(received, expectedStyle, config = {}) {\n return compareStyle(received, expectedStyle, config);\n },\n });\n};\n\nexport const getAnimatedStyle = (received) => {\n return getCurrentStyle(received);\n};\n"],"mappings":"AAAA;AACA;AACA,SAASA,2BAAT,QAA4C,QAA5C;AAaA,IAAIC,MAAM,GAAG;EACXC,GAAG,EAAE;AADM,CAAb;;AAIA,MAAMC,eAAe,GAAIC,KAAD,IAAW;EACjC,OAAO,CAAC,CAACA,KAAK,CAACC,aAAf;AACD,CAFD;;AAIA,MAAMC,0BAA0B,GAAIF,KAAD,IAAW;EAC5C,OAAOA,KAAK,CAACC,aAAN,CAAoBE,OAApB,CAA4BC,KAAnC;AACD,CAFD;;AAIA,MAAMC,eAAe,GAAIC,QAAD,IAAc;EACpC,MAAMC,WAAW,GAAGD,QAAQ,CAACE,KAAT,CAAeR,KAAnC;EACA,IAAIS,YAAY,GAAG,EAAnB;;EACA,IAAIC,KAAK,CAACC,OAAN,CAAcJ,WAAd,CAAJ,EAAgC;IAC9BD,QAAQ,CAACE,KAAT,CAAeR,KAAf,CAAqBY,OAArB,CAA8BZ,KAAD,IAAW;MACtC,IAAID,eAAe,CAACC,KAAD,CAAnB,EAA4B;QAC1BS,YAAY,GAAG,EACb,GAAGA,YADU;UAEb,GAAGP,0BAA0B,CAACF,KAAD;QAFhB,CAAf;MAID,CALD,MAKO;QACLS,YAAY,GAAG,EACb,GAAGA,YADU;UAEb,GAAGT;QAFU,CAAf;MAID;IACF,CAZD;EAaD,CAdD,MAcO;IACL,IAAID,eAAe,CAACQ,WAAD,CAAnB,EAAkC;MAChCE,YAAY,GAAGP,0BAA0B,CAACK,WAAD,CAAzC;IACD,CAFD,MAEO;MACLE,YAAY,GAAG,EACb,GAAGF,WADU;QAEb,GAAGD,QAAQ,CAACE,KAAT,CAAeP,aAAf,CAA6BG;MAFnB,CAAf;IAID;EACF;;EACD,OAAOK,YAAP;AACD,CA5BD;;AA8BA,MAAMI,UAAU,GAAG,CAACJ,YAAD,EAAeK,WAAf,KAA+B;EAChD,IAAIJ,KAAK,CAACC,OAAN,CAA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AAkDxB,CAAC,EAAnD,EAAuD;IACrDsC,UAAU;EACX;;EACDJ,IAAI,CAACK,mBAAL,CAAyBf,SAAzB;AACD,CALM;AAOP,OAAO,MAAMsB,uBAAuB,GAAIC,KAAD,IAAW;EAChD,KAAK,IAAI/C,CAAC,GAAG,CAAb,EAAgBA,CAAC,IAAI+C,KAArB,EAA4B/C,CAAC,EAA7B,EAAiC;IAC/BsC,UAAU;EACX;;EACDJ,IAAI,CAACK,mBAAL,CAAyBf,SAAzB;AACD,CALM;AAOP,OAAO,MAAMwB,UAAU,GAAG,YAAqB;EAAA,IAApBC,UAAoB,uEAAP,EAAO;EAC7C,IAAI9C,MAAJ;;EACA,IAAI;IACFA,MAAM,GAAG+C,OAAO,CAAC,QAAD,CAAhB;EACD,CAFD,CAEE,OAAOC,CAAP,EAAU;IACV;IACA,MAAM;MAAEhD,MAAM,EAAEiD;IAAV,IAA2BF,OAAO,CAAC,eAAD,CAAxC;;IACA/C,MAAM,GAAGiD,YAAT;EACD;;EAEDF,OAAO,CAAC,cAAD,CAAP;;EACA1B,SAAS,GAAGoB,IAAI,CAACS,KAAL,CAAW,OAAOxE,MAAM,CAACC,GAAzB,CAAZ;EAEAD,MAAM,GAAG,EACP,GAAGA,MADI;IAEP,GAAGoE;EAFI,CAAT;EAKA9C,MAAM,CAACmD,MAAP,CAAc;IACZC,mBAAmB,CAACjE,QAAD,EAAWsB,aAAX,EAAuC;MAAA,IAAb/B,MAAa,uEAAJ,EAAI;MACxD,OAAO8B,YAAY,CAACrB,QAAD,EAAWsB,aAAX,EAA0B/B,MAA1B,CAAnB;IACD;;EAHW,CAAd;AAKD,CAvBM;AAyBP,OAAO,MAAM2E,gBAAgB,GAAIlE,QAAD,IAAc;EAC5C,OAAOD,eAAe,CAACC,QAAD,CAAtB;AACD,CAFM"}
@@ -0,0 +1,144 @@
1
+ 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; }
2
+
3
+ import MapperRegistry from './MapperRegistry';
4
+ import Mapper from './Mapper';
5
+ import MutableValue from './MutableValue';
6
+ import { NativeReanimated } from '../NativeReanimated/NativeReanimated';
7
+ import { isJest } from '../PlatformChecker';
8
+ export default class JSReanimated extends NativeReanimated {
9
+ constructor() {
10
+ super(false);
11
+
12
+ _defineProperty(this, "_valueSetter", undefined);
13
+
14
+ _defineProperty(this, "_renderRequested", false);
15
+
16
+ _defineProperty(this, "_mapperRegistry", new MapperRegistry(this));
17
+
18
+ _defineProperty(this, "_frames", []);
19
+
20
+ _defineProperty(this, "timeProvider", void 0);
21
+
22
+ if (isJest()) {
23
+ this.timeProvider = {
24
+ now: () => global.ReanimatedDataMock.now()
25
+ };
26
+ } else {
27
+ this.timeProvider = {
28
+ now: () => window.performance.now()
29
+ };
30
+ }
31
+ }
32
+
33
+ pushFrame(frame) {
34
+ this._frames.push(frame);
35
+
36
+ this.maybeRequestRender();
37
+ }
38
+
39
+ getTimestamp() {
40
+ return this.timeProvider.now();
41
+ }
42
+
43
+ maybeRequestRender() {
44
+ if (!this._renderRequested) {
45
+ this._renderRequested = true;
46
+ requestAnimationFrame(_timestampMs => {
47
+ this._renderRequested = false;
48
+
49
+ this._onRender(this.getTimestamp());
50
+ });
51
+ }
52
+ }
53
+
54
+ _onRender(timestampMs) {
55
+ this._mapperRegistry.execute();
56
+
57
+ const frames = [...this._frames];
58
+ this._frames = [];
59
+
60
+ for (let i = 0, len = frames.length; i < len; ++i) {
61
+ frames[i](timestampMs);
62
+ }
63
+
64
+ if (this._mapperRegistry.needRunOnRender) {
65
+ this._mapperRegistry.execute();
66
+ }
67
+ }
68
+
69
+ installCoreFunctions(valueSetter) {
70
+ this._valueSetter = valueSetter;
71
+ }
72
+
73
+ makeShareable(value) {
74
+ return value;
75
+ }
76
+
77
+ makeMutable(value) {
78
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
79
+ return new MutableValue(value, this._valueSetter);
80
+ }
81
+
82
+ makeRemote() {
83
+ let object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
84
+ return object;
85
+ }
86
+
87
+ startMapper(mapper) {
88
+ let inputs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
89
+ let outputs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
90
+ const instance = new Mapper(this, mapper, inputs, outputs);
91
+
92
+ const mapperId = this._mapperRegistry.startMapper(instance);
93
+
94
+ this.maybeRequestRender();
95
+ return mapperId;
96
+ }
97
+
98
+ stopMapper(mapperId) {
99
+ this._mapperRegistry.stopMapper(mapperId);
100
+ }
101
+
102
+ registerEventHandler(_, __) {
103
+ // noop
104
+ return '';
105
+ }
106
+
107
+ unregisterEventHandler(_) {// noop
108
+ }
109
+
110
+ enableLayoutAnimations() {
111
+ console.warn('[Reanimated] enableLayoutAnimations is not available for WEB yet');
112
+ }
113
+
114
+ registerSensor() {
115
+ console.warn('[Reanimated] useAnimatedSensor is not available on web yet.');
116
+ return -1;
117
+ }
118
+
119
+ unregisterSensor() {// noop
120
+ }
121
+
122
+ jestResetModule() {
123
+ if (isJest()) {
124
+ /**
125
+ * If someone used timers to stop animation before the end,
126
+ * then _renderRequested was set as true
127
+ * and any new update from another test wasn't applied.
128
+ */
129
+ this._renderRequested = false;
130
+ } else {
131
+ throw Error('This method can be only use in Jest testing.');
132
+ }
133
+ }
134
+
135
+ subscribeForKeyboardEvents(_) {
136
+ console.warn('[Reanimated] useAnimatedKeyboard is not available on web yet.');
137
+ return -1;
138
+ }
139
+
140
+ unsubscribeFromKeyboardEvents(_) {// noop
141
+ }
142
+
143
+ }
144
+ //# sourceMappingURL=JSReanimated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MapperRegistry","Mapper","MutableValue","NativeReanimated","isJest","JSReanimated","constructor","undefined","timeProvider","now","global","ReanimatedDataMock","window","performance","pushFrame","frame","_frames","push","maybeRequestRender","getTimestamp","_renderRequested","requestAnimationFrame","_timestampMs","_onRender","timestampMs","_mapperRegistry","execute","frames","i","len","length","needRunOnRender","installCoreFunctions","valueSetter","_valueSetter","makeShareable","value","makeMutable","makeRemote","object","startMapper","mapper","inputs","outputs","instance","mapperId","stopMapper","registerEventHandler","_","__","unregisterEventHandler","enableLayoutAnimations","console","warn","registerSensor","unregisterSensor","jestResetModule","Error","subscribeForKeyboardEvents","unsubscribeFromKeyboardEvents"],"sources":["JSReanimated.ts"],"sourcesContent":["import MapperRegistry from './MapperRegistry';\nimport Mapper from './Mapper';\nimport MutableValue from './MutableValue';\nimport { NativeReanimated } from '../NativeReanimated/NativeReanimated';\nimport {\n Timestamp,\n NestedObjectValues,\n AnimatedKeyboardInfo,\n} from '../commonTypes';\nimport { isJest } from '../PlatformChecker';\n\nexport default class JSReanimated extends NativeReanimated {\n _valueSetter?: <T>(value: T) => void = undefined;\n\n _renderRequested = false;\n _mapperRegistry: MapperRegistry<any> = new MapperRegistry(this);\n _frames: ((timestamp: Timestamp) => void)[] = [];\n timeProvider: { now: () => number };\n\n constructor() {\n super(false);\n if (isJest()) {\n this.timeProvider = { now: () => global.ReanimatedDataMock.now() };\n } else {\n this.timeProvider = { now: () => window.performance.now() };\n }\n }\n\n pushFrame(frame: (timestamp: Timestamp) => void): void {\n this._frames.push(frame);\n this.maybeRequestRender();\n }\n\n getTimestamp(): number {\n return this.timeProvider.now();\n }\n\n maybeRequestRender(): void {\n if (!this._renderRequested) {\n this._renderRequested = true;\n\n requestAnimationFrame((_timestampMs) => {\n this._renderRequested = false;\n\n this._onRender(this.getTimestamp());\n });\n }\n }\n\n _onRender(timestampMs: number): void {\n this._mapperRegistry.execute();\n\n const frames = [...this._frames];\n this._frames = [];\n\n for (let i = 0, len = frames.length; i < len; ++i) {\n frames[i](timestampMs);\n }\n\n if (this._mapperRegistry.needRunOnRender) {\n this._mapperRegistry.execute();\n }\n }\n\n installCoreFunctions(valueSetter: <T>(value: T) => void): void {\n this._valueSetter = valueSetter;\n }\n\n makeShareable<T>(value: T): T {\n return value;\n }\n\n makeMutable<T>(value: T): MutableValue<T> {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return new MutableValue(value, this._valueSetter!);\n }\n\n makeRemote<T>(object = {}): T {\n return object as T;\n }\n\n startMapper(\n mapper: () => void,\n inputs: NestedObjectValues<MutableValue<unknown>>[] = [],\n outputs: NestedObjectValues<MutableValue<unknown>>[] = []\n ): number {\n const instance = new Mapper(this, mapper, inputs, outputs);\n const mapperId = this._mapperRegistry.startMapper(instance);\n this.maybeRequestRender();\n return mapperId;\n }\n\n stopMapper(mapperId: number): void {\n this._mapperRegistry.stopMapper(mapperId);\n }\n\n registerEventHandler<T>(_: string, __: (event: T) => void): string {\n // noop\n return '';\n }\n\n unregisterEventHandler(_: string): void {\n // noop\n }\n\n enableLayoutAnimations() {\n console.warn(\n '[Reanimated] enableLayoutAnimations is not available for WEB yet'\n );\n }\n\n registerSensor(): number {\n console.warn('[Reanimated] useAnimatedSensor is not available on web yet.');\n return -1;\n }\n\n unregisterSensor(): void {\n // noop\n }\n\n jestResetModule() {\n if (isJest()) {\n /**\n * If someone used timers to stop animation before the end,\n * then _renderRequested was set as true\n * and any new update from another test wasn't applied.\n */\n this._renderRequested = false;\n } else {\n throw Error('This method can be only use in Jest testing.');\n }\n }\n\n subscribeForKeyboardEvents(_: AnimatedKeyboardInfo): number {\n console.warn(\n '[Reanimated] useAnimatedKeyboard is not available on web yet.'\n );\n return -1;\n }\n\n unsubscribeFromKeyboardEvents(_: number): void {\n // noop\n }\n}\n"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,kBAA3B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,SAASC,gBAAT,QAAiC,sCAAjC;AAMA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,eAAe,MAAMC,YAAN,SAA2BF,gBAA3B,CAA4C;EAQzDG,WAAW,GAAG;IACZ,MAAM,KAAN;;IADY,sCAPyBC,SAOzB;;IAAA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0BAA0B,CAACV,CAAD,EAAkC;IAC1DI,OAAO,CAACC,IAAR,CACE,+DADF;IAGA,OAAO,CAAC,CAAR;EACD;;EAEDM,6BAA6B,CAACX,CAAD,EAAkB,CAC7C;EACD;;AAnIwD"}
@@ -0,0 +1,62 @@
1
+ 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; }
2
+
3
+ import MutableValue from './MutableValue';
4
+ export default class Mapper {
5
+ constructor(module, mapper) {
6
+ let inputs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
7
+ let outputs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
8
+
9
+ _defineProperty(this, "id", void 0);
10
+
11
+ _defineProperty(this, "inputs", void 0);
12
+
13
+ _defineProperty(this, "outputs", void 0);
14
+
15
+ _defineProperty(this, "mapper", void 0);
16
+
17
+ _defineProperty(this, "dirty", true);
18
+
19
+ this.id = Mapper.MAPPER_ID++;
20
+ this.inputs = this.extractMutablesFromArray(inputs);
21
+ this.outputs = this.extractMutablesFromArray(outputs);
22
+ this.mapper = mapper;
23
+
24
+ const markDirty = () => {
25
+ this.dirty = true;
26
+ module.maybeRequestRender();
27
+ };
28
+
29
+ this.inputs.forEach(input => {
30
+ input.addListener(markDirty);
31
+ });
32
+ }
33
+
34
+ execute() {
35
+ this.dirty = false;
36
+ this.mapper();
37
+ }
38
+
39
+ extractMutablesFromArray(array) {
40
+ const res = [];
41
+
42
+ function extractMutables(value) {
43
+ if (value == null) {// return;
44
+ } else if (value instanceof MutableValue) {
45
+ res.push(value);
46
+ } else if (Array.isArray(value)) {
47
+ value.forEach(v => extractMutables(v));
48
+ } else if (typeof value === 'object') {
49
+ Object.keys(value).forEach(key => {
50
+ extractMutables(value[key]);
51
+ });
52
+ }
53
+ }
54
+
55
+ extractMutables(array);
56
+ return res;
57
+ }
58
+
59
+ }
60
+
61
+ _defineProperty(Mapper, "MAPPER_ID", 1);
62
+ //# sourceMappingURL=Mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MutableValue","Mapper","constructor","module","mapper","inputs","outputs","id","MAPPER_ID","extractMutablesFromArray","markDirty","dirty","maybeRequestRender","forEach","input","addListener","execute","array","res","extractMutables","value","push","Array","isArray","v","Object","keys","key"],"sources":["Mapper.ts"],"sourcesContent":["import { NestedObjectValues } from '../commonTypes';\nimport { JSReanimated } from './commonTypes';\nimport MutableValue from './MutableValue';\n\nexport default class Mapper<T> {\n static MAPPER_ID = 1;\n id: number;\n inputs: MutableValue<T>[];\n outputs: MutableValue<T>[];\n mapper: () => void;\n\n dirty = true;\n\n constructor(\n module: JSReanimated,\n mapper: () => void,\n inputs: NestedObjectValues<MutableValue<T>>[] = [],\n outputs: NestedObjectValues<MutableValue<T>>[] = []\n ) {\n this.id = Mapper.MAPPER_ID++;\n this.inputs = this.extractMutablesFromArray(inputs);\n this.outputs = this.extractMutablesFromArray(outputs);\n this.mapper = mapper;\n\n const markDirty = () => {\n this.dirty = true;\n module.maybeRequestRender();\n };\n\n this.inputs.forEach((input) => {\n input.addListener(markDirty);\n });\n }\n\n execute(): void {\n this.dirty = false;\n this.mapper();\n }\n\n extractMutablesFromArray<T>(\n array: NestedObjectValues<MutableValue<T>>\n ): MutableValue<T>[] {\n const res: MutableValue<T>[] = [];\n\n function extractMutables(value: NestedObjectValues<MutableValue<T>>) {\n if (value == null) {\n // return;\n } else if (value instanceof MutableValue) {\n res.push(value);\n } else if (Array.isArray(value)) {\n value.forEach((v) => extractMutables(v));\n } else if (typeof value === 'object') {\n Object.keys(value).forEach((key) => {\n extractMutables(value[key]);\n });\n }\n }\n\n extractMutables(array);\n return res;\n }\n}\n"],"mappings":";;AAEA,OAAOA,YAAP,MAAyB,gBAAzB;AAEA,eAAe,MAAMC,MAAN,CAAgB;EAS7BC,WAAW,CACTC,MADS,EAETC,MAFS,EAKT;IAAA,IAFAC,MAEA,uEAFgD,EAEhD;IAAA,IADAC,O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ACA,C"}
@@ -0,0 +1,137 @@
1
+ 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; }
2
+
3
+ export default class MapperRegistry {
4
+ constructor(module) {
5
+ _defineProperty(this, "sortedMappers", []);
6
+
7
+ _defineProperty(this, "mappers", new Map());
8
+
9
+ _defineProperty(this, "_module", void 0);
10
+
11
+ _defineProperty(this, "updatedSinceLastExecute", false);
12
+
13
+ this._module = module;
14
+ }
15
+
16
+ startMapper(mapper) {
17
+ this.mappers.set(mapper.id, mapper);
18
+ this.updatedSinceLastExecute = true;
19
+ return mapper.id;
20
+ }
21
+
22
+ stopMapper(id) {
23
+ this.mappers.delete(id);
24
+ this.updatedSinceLastExecute = true;
25
+ }
26
+
27
+ execute() {
28
+ if (this.updatedSinceLastExecute) {
29
+ this.updateOrder();
30
+ this.updatedSinceLastExecute = false;
31
+ }
32
+
33
+ for (let i = 0, len = this.sortedMappers.length; i < len; ++i) {
34
+ const mapper = this.sortedMappers[i];
35
+
36
+ if (mapper.dirty) {
37
+ mapper.execute();
38
+ }
39
+ }
40
+ }
41
+
42
+ updateOrder() {
43
+ const nodes = [...this.mappers.values()].map(mapper => new Node(mapper));
44
+ const mappersById = {};
45
+ this.mappers.forEach(mapper => {
46
+ mappersById[mapper.id] = mapper;
47
+ }); // create a graph from array of nodes
48
+
49
+ for (let i = 0, nodesLen = nodes.length; i < nodesLen; ++i) {
50
+ const node = nodes[i];
51
+
52
+ if (node.mapper.outputs.length === 0) {
53
+ continue;
54
+ }
55
+
56
+ for (let j = 0; j < nodesLen; ++j) {
57
+ const restNode = nodes[j];
58
+
59
+ if (i === j || restNode.mapper.inputs.length === 0) {
60
+ continue;
61
+ }
62
+
63
+ for (let outi = 0, outputsLen = node.mapper.outputs.length; outi < outputsLen; ++outi) {
64
+ for (let resti = 0, restLen = restNode.mapper.inputs.length; resti < restLen; ++resti) {
65
+ if (node.mapper.outputs[outi]._id === restNode.mapper.inputs[resti]._id) {
66
+ node.children.push(restNode);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ const post = {};
74
+ let postCounter = 1;
75
+
76
+ const dfs = node => {
77
+ const index = nodes.indexOf(node);
78
+
79
+ if (index === -1) {
80
+ // this node has already been handled
81
+ return;
82
+ }
83
+
84
+ ++postCounter;
85
+ nodes.splice(index, 1);
86
+
87
+ if (node.children.length === 0 && nodes.length > 0) {
88
+ post[node.mapper.id] = postCounter++;
89
+ dfs(nodes[0]);
90
+ return;
91
+ }
92
+
93
+ for (let i = 0, len = node.children.length; i < len; ++i) {
94
+ dfs(node.children[i]);
95
+ }
96
+
97
+ post[node.mapper.id] = postCounter++;
98
+ };
99
+
100
+ while (nodes.length) dfs(nodes[0]);
101
+
102
+ const postArray = Object.keys(post).map(key => {
103
+ const num = parseInt(key);
104
+ return [num, post[num]];
105
+ });
106
+ postArray.sort((a, b) => {
107
+ return b[1] - a[1];
108
+ }); // clear sorted mappers
109
+
110
+ this.sortedMappers = [];
111
+
112
+ for (let i = 0, len = postArray.length; i < len; ++i) {
113
+ const [id] = postArray[i];
114
+ this.sortedMappers.push(mappersById[id]);
115
+ }
116
+ }
117
+
118
+ get needRunOnRender() {
119
+ return this.updatedSinceLastExecute;
120
+ }
121
+
122
+ }
123
+
124
+ class Node {
125
+ constructor(mapper) {
126
+ let children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
127
+
128
+ _defineProperty(this, "mapper", void 0);
129
+
130
+ _defineProperty(this, "children", void 0);
131
+
132
+ this.mapper = mapper;
133
+ this.children = children;
134
+ }
135
+
136
+ }
137
+ //# sourceMappingURL=MapperRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MapperRegistry","constructor","module","Map","_module","startMapper","mapper","mappers","set","id","updatedSinceLastExecute","stopMapper","delete","execute","updateOrder","i","len","sortedMappers","length","dirty","nodes","values","map","Node","mappersById","forEach","nodesLen","node","outputs","j","restNode","inputs","outi","outputsLen","resti","restLen","_id","children","push","post","postCounter","dfs","index","indexOf","splice","postArray","Object","keys","key","num","parseInt","sort","a","b","needRunOnRender"],"sources":["MapperRegistry.ts"],"sourcesContent":["import { JSReanimated } from './commonTypes';\nimport Mapper from './Mapper';\n\nexport default class MapperRegistry<T> {\n sortedMappers: Mapper<T>[] = [];\n mappers: Map<number, Mapper<T>> = new Map();\n _module: JSReanimated;\n\n updatedSinceLastExecute = false;\n\n constructor(module: JSReanimated) {\n this._module = module;\n }\n\n startMapper(mapper: Mapper<T>): number {\n this.mappers.set(mapper.id, mapper);\n this.updatedSinceLastExecute = true;\n return mapper.id;\n }\n\n stopMapper(id: number): void {\n this.mappers.delete(id);\n this.updatedSinceLastExecute = true;\n }\n\n execute(): void {\n if (this.updatedSinceLastExecute) {\n this.updateOrder();\n this.updatedSinceLastExecute = false;\n }\n\n for (let i = 0, len = this.sortedMappers.length; i < len; ++i) {\n const mapper = this.sortedMappers[i];\n if (mapper.dirty) {\n mapper.execute();\n }\n }\n }\n\n updateOrder(): void {\n const nodes = [...this.mappers.values()].map((mapper) => new Node(mapper));\n\n const mappersById: Record<number, Mapper<T>> = {};\n this.mappers.forEach((mapper) => {\n mappersById[mapper.id] = mapper;\n });\n\n // create a graph from array of nodes\n for (let i = 0, nodesLen = nodes.length; i < nodesLen; ++i) {\n const node = nodes[i];\n if (node.mapper.outputs.length === 0) {\n continue;\n }\n for (let j = 0; j < nodesLen; ++j) {\n const restNode = nodes[j];\n if (i === j || restNode.mapper.inputs.length === 0) {\n continue;\n }\n for (\n let outi = 0, outputsLen = node.mapper.outputs.length;\n outi < outputsLen;\n ++outi\n ) {\n for (\n let resti = 0, restLen = restNode.mapper.inputs.length;\n resti < restLen;\n ++resti\n ) {\n if (\n node.mapper.outputs[outi]._id ===\n restNode.mapper.inputs[resti]._id\n ) {\n node.children.push(restNode);\n }\n }\n }\n }\n }\n\n const post: Record<number, number> = {};\n let postCounter = 1;\n const dfs = (node: Node<T>) => {\n const index = nodes.indexOf(node);\n if (index === -1) {\n // this node has already been handled\n return;\n }\n ++postCounter;\n nodes.splice(index, 1);\n if (node.children.length === 0 && nodes.length > 0) {\n post[node.mapper.id] = postCounter++;\n dfs(nodes[0]);\n return;\n }\n for (let i = 0, len = node.children.length; i < len; ++i) {\n dfs(node.children[i]);\n }\n post[node.mapper.id] = postCounter++;\n };\n\n while (nodes.length) dfs(nodes[0]);\n\n const postArray = Object.keys(post).map((key) => {\n const num = parseInt(key);\n return [num, post[num]];\n });\n postArray.sort((a, b) => {\n return b[1] - a[1];\n });\n\n // clear sorted mappers\n this.sortedMappers = [];\n\n for (let i = 0, len = postArray.length; i < len; ++i) {\n const [id] = postArray[i];\n this.sortedMappers.push(mappersById[id]);\n }\n }\n\n get needRunOnRender(): boolean {\n return this.updatedSinceLastExecute;\n }\n}\n\nclass Node<T> {\n mapper: Mapper<T>;\n children: Node<T>[];\n\n constructor(mapper: Mapper<T>, children = []) {\n this.mapper = mapper;\n this.children = children;\n }\n}\n"],"mappings":";;AAGA,eAAe,MAAMA,cAAN,CAAwB;EAOrCC,WAAW,CAACC,MAAD,EAAuB;IAAA,uCANL,EAMK;;IAAA,iCALA,IAAIC,GAAJ,EAKA;;IAAA;;IAAA,iDAFR,KAEQ;;IAChC,KAAKC,OAAL,GAAeF,MAAf;EACD;;EAEDG,WAAW,CAACC,MAAD,EAA4B;IACrC,KAAKC,OAAL,CAAaC,GAAb,CAAiBF,MAAM,CAACG,EAAxB,EAA4BH,MAA5B;IACA,KAAKI,uBAAL,GAA+B,IAA/B;IACA,OAAOJ,MAAM,CAACG,EAAd;EACD;;EAEDE,UAAU,CAACF,EAAD,EAAmB;IAC3B,KAAKF,OAAL,CAAaK,MAAb,CAAoBH,EAApB;IACA,KAAKC,uBAAL,GAA+B,IAA/B;EACD;;EAEDG,OAAO,GAAS;IACd,IAAI,KAAKH,uBAAT,EAAkC;MAChC,KAAKI,WAAL;MACA,KAAKJ,uBAAL,GAA+B,KAA/B;IACD;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(key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ export default class MutableValue {
4
+ constructor(value, setter) {
5
+ _defineProperty(this, "_id", void 0);
6
+
7
+ _defineProperty(this, "_value", void 0);
8
+
9
+ _defineProperty(this, "_setter", void 0);
10
+
11
+ _defineProperty(this, "_animation", null);
12
+
13
+ _defineProperty(this, "_listeners", []);
14
+
15
+ this._id = MutableValue.MUTABLE_ID++;
16
+ this._value = value;
17
+ this._setter = setter;
18
+ }
19
+
20
+ get value() {
21
+ return this._value;
22
+ }
23
+
24
+ set value(nextValue) {
25
+ this._setter(nextValue);
26
+ } // this changes the value finally and is supposed to be called from this._setter
27
+
28
+
29
+ _setValue(newValue) {
30
+ this._value = newValue;
31
+
32
+ this._triggerListener();
33
+ }
34
+
35
+ addListener(listener) {
36
+ this._listeners.push(listener);
37
+ }
38
+
39
+ _triggerListener() {
40
+ for (let i = 0, len = this._listeners.length; i < len; ++i) {
41
+ this._listeners[i]();
42
+ }
43
+ }
44
+
45
+ }
46
+
47
+ _defineProperty(MutableValue, "MUTABLE_ID", 1);
48
+ //# sourceMappingURL=MutableValue.js.map