react-native-reanimated 2.9.1 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +4 -4
  2. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +38 -0
  3. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +23 -0
  4. package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +8 -0
  5. package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +8 -0
  6. package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +5 -0
  7. package/RNReanimated.podspec +22 -3
  8. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  9. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  10. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  11. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  12. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  16. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  17. package/android/.gradle/checksums/checksums.lock +0 -0
  18. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  19. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  20. package/android/CMakeLists.txt +214 -95
  21. package/android/build.gradle +247 -236
  22. package/android/react-native-reanimated-66-hermes.aar +0 -0
  23. package/android/react-native-reanimated-66-jsc.aar +0 -0
  24. package/android/react-native-reanimated-67-hermes.aar +0 -0
  25. package/android/react-native-reanimated-67-jsc.aar +0 -0
  26. package/android/react-native-reanimated-68-hermes.aar +0 -0
  27. package/android/react-native-reanimated-68-jsc.aar +0 -0
  28. package/android/react-native-reanimated-69-hermes.aar +0 -0
  29. package/android/react-native-reanimated-69-jsc.aar +0 -0
  30. package/android/react-native-reanimated-70-hermes.aar +0 -0
  31. package/android/react-native-reanimated-70-jsc.aar +0 -0
  32. package/{lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts → android/rnVersionPatch/70/.gitkeep} +0 -0
  33. package/android/src/main/cpp/NativeProxy.cpp +54 -20
  34. package/android/src/main/cpp/OnLoad.cpp +1 -0
  35. package/android/src/main/cpp/headers/NativeProxy.h +29 -0
  36. package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +25 -0
  37. package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +3 -1
  38. package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +165 -0
  39. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +19 -16
  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/ios/REANodesManager.m +31 -8
  43. package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
  44. package/ios/keyboardObserver/REAKeyboardEventObserver.m +198 -0
  45. package/ios/native/NativeProxy.mm +20 -1
  46. package/ios/native/REAInitializer.mm +8 -12
  47. package/ios/sensor/ReanimatedSensor.m +26 -17
  48. package/lib/index.js +11 -3
  49. package/lib/index.web.js +4 -0
  50. package/lib/reanimated2/Colors.js +1 -1
  51. package/lib/reanimated2/NativeMethods.js +3 -0
  52. package/lib/reanimated2/NativeReanimated/NativeReanimated.js +6 -0
  53. package/lib/reanimated2/animation/util.js +4 -1
  54. package/lib/reanimated2/commonTypes.js +8 -1
  55. package/lib/reanimated2/component/FlatList.js +5 -5
  56. package/lib/reanimated2/core.js +5 -4
  57. package/lib/reanimated2/frameCallback/FrameCallbackRegistryJS.js +32 -0
  58. package/lib/reanimated2/frameCallback/FrameCallbackRegistryUI.js +47 -0
  59. package/lib/reanimated2/globals.d.ts +3 -0
  60. package/lib/reanimated2/hook/index.js +2 -0
  61. package/lib/reanimated2/hook/useAnimatedKeyboard.js +31 -0
  62. package/lib/reanimated2/hook/useAnimatedSensor.js +3 -3
  63. package/lib/reanimated2/hook/useFrameCallback.js +23 -0
  64. package/lib/reanimated2/jestUtils.js +11 -3
  65. package/lib/reanimated2/js-reanimated/JSReanimated.js +7 -0
  66. package/lib/reanimated2/js-reanimated/global.js +33 -22
  67. package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +1 -1
  68. package/lib/types/{lib/Animated.d.ts → Animated.d.ts} +0 -0
  69. package/lib/types/{lib/ConfigHelper.d.ts → ConfigHelper.d.ts} +0 -0
  70. package/lib/types/{lib/ReanimatedEventEmitter.d.ts → ReanimatedEventEmitter.d.ts} +0 -0
  71. package/lib/types/{lib/ReanimatedModule.d.ts → ReanimatedModule.d.ts} +0 -0
  72. package/lib/types/{lib/ReanimatedModule.macos.d.ts → ReanimatedModule.macos.d.ts} +0 -0
  73. package/lib/types/{lib/ReanimatedModule.native.d.ts → ReanimatedModule.native.d.ts} +0 -0
  74. package/lib/types/{lib/ReanimatedModule.windows.d.ts → ReanimatedModule.windows.d.ts} +0 -0
  75. package/lib/types/{lib/ReanimatedModuleCompat.d.ts → ReanimatedModuleCompat.d.ts} +0 -0
  76. package/lib/types/{lib/createAnimatedComponent.d.ts → createAnimatedComponent.d.ts} +0 -0
  77. package/lib/types/index.d.ts +4 -0
  78. package/lib/types/{lib/index.d.ts → index.web.d.ts} +0 -1
  79. package/lib/types/{lib/reanimated2 → reanimated2}/Bezier.d.ts +0 -0
  80. package/lib/types/{lib/reanimated2 → reanimated2}/Colors.d.ts +0 -0
  81. package/lib/types/{lib/reanimated2 → reanimated2}/Easing.d.ts +0 -0
  82. package/lib/types/{lib/reanimated2 → reanimated2}/NativeMethods.d.ts +0 -0
  83. package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/NativeReanimated.d.ts +3 -1
  84. package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/index.d.ts +0 -0
  85. package/lib/types/{lib/reanimated2 → reanimated2}/PlatformChecker.d.ts +0 -0
  86. package/lib/types/{lib/reanimated2 → reanimated2}/PropAdapters.d.ts +0 -0
  87. package/lib/types/{lib/reanimated2 → reanimated2}/UpdateProps.d.ts +0 -0
  88. package/lib/types/{lib/reanimated2 → reanimated2}/ViewDescriptorsSet.d.ts +0 -0
  89. package/lib/types/{lib/reanimated2 → reanimated2}/WorkletEventHandler.d.ts +0 -0
  90. package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/MutableValue.d.ts +0 -0
  91. package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.d.ts +0 -0
  92. package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.native.d.ts +0 -0
  93. package/lib/types/{lib/reanimated2 → reanimated2}/animation/commonTypes.d.ts +0 -0
  94. package/lib/types/{lib/reanimated2 → reanimated2}/animation/decay.d.ts +0 -0
  95. package/lib/types/{lib/reanimated2 → reanimated2}/animation/delay.d.ts +0 -0
  96. package/lib/types/{lib/reanimated2 → reanimated2}/animation/index.d.ts +0 -0
  97. package/lib/types/{lib/reanimated2 → reanimated2}/animation/repeat.d.ts +0 -0
  98. package/lib/types/{lib/reanimated2 → reanimated2}/animation/sequence.d.ts +0 -0
  99. package/lib/types/{lib/reanimated2 → reanimated2}/animation/spring.d.ts +0 -0
  100. package/lib/types/{lib/reanimated2 → reanimated2}/animation/styleAnimation.d.ts +0 -0
  101. package/lib/types/{lib/reanimated2 → reanimated2}/animation/timing.d.ts +0 -0
  102. package/lib/types/{lib/reanimated2 → reanimated2}/animation/util.d.ts +0 -0
  103. package/lib/types/{lib/reanimated2 → reanimated2}/commonTypes.d.ts +12 -0
  104. package/lib/types/{lib/reanimated2 → reanimated2}/component/FlatList.d.ts +2 -2
  105. package/lib/types/{lib/reanimated2 → reanimated2}/component/Image.d.ts +0 -0
  106. package/lib/types/{lib/reanimated2 → reanimated2}/component/ScrollView.d.ts +0 -0
  107. package/lib/types/{lib/reanimated2 → reanimated2}/component/Text.d.ts +0 -0
  108. package/lib/types/{lib/reanimated2 → reanimated2}/component/View.d.ts +0 -0
  109. package/lib/types/{lib/reanimated2 → reanimated2}/core.d.ts +0 -0
  110. package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryJS.d.ts +7 -0
  111. package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryUI.d.ts +10 -0
  112. package/lib/types/{lib/reanimated2 → reanimated2}/hook/Hooks.d.ts +0 -0
  113. package/lib/types/{lib/reanimated2 → reanimated2}/hook/commonTypes.d.ts +0 -0
  114. package/lib/types/{lib/reanimated2 → reanimated2}/hook/index.d.ts +3 -0
  115. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedGestureHandler.d.ts +0 -0
  116. package/lib/types/reanimated2/hook/useAnimatedKeyboard.d.ts +2 -0
  117. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedReaction.d.ts +0 -0
  118. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedRef.d.ts +0 -0
  119. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedScrollHandler.d.ts +0 -0
  120. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedSensor.d.ts +1 -1
  121. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedStyle.d.ts +0 -0
  122. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useDerivedValue.d.ts +0 -0
  123. package/lib/types/reanimated2/hook/useFrameCallback.d.ts +6 -0
  124. package/lib/types/{lib/reanimated2 → reanimated2}/hook/useSharedValue.d.ts +0 -0
  125. package/lib/types/{lib/reanimated2 → reanimated2}/hook/utils.d.ts +0 -0
  126. package/lib/types/{lib/reanimated2 → reanimated2}/index.d.ts +0 -0
  127. package/lib/types/{lib/reanimated2 → reanimated2}/interpolateColor.d.ts +0 -0
  128. package/lib/types/{lib/reanimated2 → reanimated2}/interpolation.d.ts +0 -0
  129. package/lib/types/{lib/reanimated2 → reanimated2}/jestUtils.d.ts +1 -1
  130. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/JSReanimated.d.ts +3 -1
  131. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/Mapper.d.ts +0 -0
  132. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MapperRegistry.d.ts +0 -0
  133. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MutableValue.d.ts +0 -0
  134. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/commonTypes.d.ts +0 -0
  135. package/lib/types/reanimated2/js-reanimated/global.d.ts +2 -0
  136. package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/index.d.ts +0 -0
  137. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/LayoutAnimationRepository.d.ts +0 -0
  138. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -0
  139. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -0
  140. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -0
  141. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -0
  142. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/index.d.ts +0 -0
  143. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -0
  144. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Default.d.ts +0 -0
  145. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Fade.d.ts +0 -0
  146. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Flip.d.ts +0 -0
  147. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -0
  148. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -0
  149. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Roll.d.ts +0 -0
  150. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -0
  151. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Slide.d.ts +0 -0
  152. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -0
  153. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -0
  154. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/index.d.ts +0 -0
  155. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -0
  156. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -0
  157. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -0
  158. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -0
  159. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -0
  160. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -0
  161. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/index.d.ts +0 -0
  162. package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/index.d.ts +0 -0
  163. package/lib/types/{lib/reanimated2 → reanimated2}/mock.d.ts +0 -0
  164. package/lib/types/{lib/reanimated2 → reanimated2}/platform-specific/RNRenderer.d.ts +0 -0
  165. package/lib/types/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
  166. package/lib/types/{lib/reanimated2 → reanimated2}/utils.d.ts +0 -0
  167. package/lib/types/{lib/setAndForwardRef.d.ts → setAndForwardRef.d.ts} +0 -0
  168. package/mock.js +1 -0
  169. package/package.json +5 -6
  170. package/plugin.js +7 -16
  171. package/react-native-reanimated.d.ts +55 -4
  172. package/src/index.ts +11 -3
  173. package/src/index.web.ts +5 -0
  174. package/src/reanimated2/Colors.ts +1 -1
  175. package/src/reanimated2/NativeMethods.ts +5 -0
  176. package/src/reanimated2/NativeReanimated/NativeReanimated.ts +9 -0
  177. package/src/reanimated2/animation/util.ts +8 -1
  178. package/src/reanimated2/commonTypes.ts +15 -0
  179. package/src/reanimated2/component/FlatList.tsx +29 -19
  180. package/src/reanimated2/core.ts +8 -8
  181. package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +43 -0
  182. package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +64 -0
  183. package/src/reanimated2/globals.d.ts +3 -0
  184. package/src/reanimated2/hook/index.ts +3 -0
  185. package/src/reanimated2/hook/useAnimatedKeyboard.ts +35 -0
  186. package/src/reanimated2/hook/useAnimatedSensor.ts +5 -5
  187. package/src/reanimated2/hook/useFrameCallback.ts +39 -0
  188. package/src/reanimated2/jestUtils.ts +11 -3
  189. package/src/reanimated2/js-reanimated/JSReanimated.ts +16 -1
  190. package/src/reanimated2/js-reanimated/global.ts +41 -29
  191. package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +1 -1
  192. package/android/react-native-reanimated-65-hermes.aar +0 -0
  193. package/android/react-native-reanimated-65-jsc.aar +0 -0
  194. package/lib/types/lib/reanimated2/js-reanimated/global.d.ts +0 -1
  195. package/lib/types/react-native-reanimated-tests.d.ts +0 -1
@@ -7,7 +7,7 @@ import { processColor } from '../Colors';
7
7
  runOnUI(() => {
8
8
  'worklet';
9
9
 
10
- const configs: Record<string, any> = {};
10
+ const configs: Record<string, any> = Object.create(null);
11
11
  const enteringAnimationForTag: Record<string, any> = {};
12
12
 
13
13
  global.LayoutAnimationRepository = {
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};