react-native-reanimated 2.5.0 → 2.8.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 (221) hide show
  1. package/Common/cpp/SharedItems/ShareableValue.cpp +2 -2
  2. package/Common/cpp/Tools/RuntimeDecorator.cpp +0 -14
  3. package/RNReanimated.podspec +15 -6
  4. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  6. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  8. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  12. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/android/.gradle/checksums/checksums.lock +0 -0
  14. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  15. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  16. package/android/build.gradle +13 -23
  17. package/android/react-native-reanimated-64-hermes.aar +0 -0
  18. package/android/react-native-reanimated-64-jsc.aar +0 -0
  19. package/android/react-native-reanimated-65-hermes.aar +0 -0
  20. package/android/react-native-reanimated-65-jsc.aar +0 -0
  21. package/android/react-native-reanimated-66-hermes.aar +0 -0
  22. package/android/react-native-reanimated-66-jsc.aar +0 -0
  23. package/android/react-native-reanimated-67-hermes.aar +0 -0
  24. package/android/react-native-reanimated-67-jsc.aar +0 -0
  25. package/android/react-native-reanimated-68-hermes.aar +0 -0
  26. package/android/react-native-reanimated-68-jsc.aar +0 -0
  27. package/android/src/main/cpp/NativeProxy.cpp +22 -12
  28. package/android/src/main/cpp/headers/NativeProxy.h +2 -0
  29. package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +11 -8
  30. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +13 -6
  31. package/ios/LayoutReanimation/REAAnimationsManager.h +1 -1
  32. package/ios/LayoutReanimation/REAAnimationsManager.m +2 -2
  33. package/ios/LayoutReanimation/REASnapshot.m +1 -1
  34. package/ios/LayoutReanimation/REAUIManager.h +1 -1
  35. package/ios/LayoutReanimation/REAUIManager.mm +4 -5
  36. package/ios/Nodes/REAAlwaysNode.h +1 -1
  37. package/ios/Nodes/REAAlwaysNode.m +5 -5
  38. package/ios/Nodes/REABezierNode.h +1 -1
  39. package/ios/Nodes/REABezierNode.m +4 -5
  40. package/ios/Nodes/REABlockNode.h +1 -1
  41. package/ios/Nodes/REABlockNode.m +2 -2
  42. package/ios/Nodes/REACallFuncNode.h +1 -1
  43. package/ios/Nodes/REACallFuncNode.m +5 -5
  44. package/ios/Nodes/REAClockNodes.h +1 -1
  45. package/ios/Nodes/REAClockNodes.m +4 -4
  46. package/ios/Nodes/REAConcatNode.h +1 -1
  47. package/ios/Nodes/REAConcatNode.m +3 -3
  48. package/ios/Nodes/REACondNode.h +1 -1
  49. package/ios/Nodes/REACondNode.m +3 -3
  50. package/ios/Nodes/READebugNode.h +1 -1
  51. package/ios/Nodes/READebugNode.m +3 -3
  52. package/ios/Nodes/REAEventNode.h +1 -2
  53. package/ios/Nodes/REAEventNode.m +3 -3
  54. package/ios/Nodes/REAFunctionNode.h +1 -1
  55. package/ios/Nodes/REAFunctionNode.m +3 -3
  56. package/ios/Nodes/REAJSCallNode.h +1 -1
  57. package/ios/Nodes/REAJSCallNode.m +3 -3
  58. package/ios/Nodes/REANode.m +2 -2
  59. package/ios/Nodes/REAOperatorNode.h +1 -1
  60. package/ios/Nodes/REAOperatorNode.m +2 -3
  61. package/ios/Nodes/REAParamNode.h +1 -1
  62. package/ios/Nodes/REAParamNode.m +4 -4
  63. package/ios/Nodes/REAPropsNode.h +1 -1
  64. package/ios/Nodes/REAPropsNode.m +4 -6
  65. package/ios/Nodes/REASetNode.h +1 -1
  66. package/ios/Nodes/REASetNode.m +4 -4
  67. package/ios/Nodes/REAStyleNode.h +1 -1
  68. package/ios/Nodes/REAStyleNode.m +2 -3
  69. package/ios/Nodes/REATransformNode.h +1 -1
  70. package/ios/Nodes/REATransformNode.m +2 -2
  71. package/ios/Nodes/REAValueNode.h +1 -3
  72. package/ios/Nodes/REAValueNode.m +1 -1
  73. package/ios/REAEventDispatcher.m +1 -1
  74. package/ios/REAModule.h +1 -1
  75. package/ios/REAModule.m +4 -5
  76. package/ios/REANodesManager.h +1 -2
  77. package/ios/REANodesManager.m +22 -24
  78. package/ios/Transitioning/RCTConvert+REATransition.h +1 -2
  79. package/ios/Transitioning/RCTConvert+REATransition.m +1 -1
  80. package/ios/Transitioning/REAAllTransitions.h +1 -1
  81. package/ios/Transitioning/REAAllTransitions.m +2 -3
  82. package/ios/Transitioning/REATransition.h +2 -3
  83. package/ios/Transitioning/REATransition.m +3 -4
  84. package/ios/Transitioning/REATransitionAnimation.m +1 -2
  85. package/ios/Transitioning/REATransitionManager.m +2 -4
  86. package/ios/Transitioning/REATransitionValues.m +2 -3
  87. package/ios/native/NativeMethods.h +1 -3
  88. package/ios/native/NativeMethods.mm +1 -1
  89. package/ios/native/NativeProxy.h +2 -2
  90. package/ios/native/NativeProxy.mm +20 -17
  91. package/ios/native/REAIOSErrorHandler.h +2 -4
  92. package/ios/native/REAIOSErrorHandler.mm +1 -1
  93. package/ios/native/REAIOSLogger.h +1 -3
  94. package/ios/native/REAIOSLogger.mm +1 -1
  95. package/ios/native/REAIOSScheduler.h +1 -3
  96. package/ios/native/REAIOSScheduler.mm +2 -2
  97. package/ios/native/REAInitializer.h +0 -7
  98. package/ios/native/REAInitializer.mm +2 -2
  99. package/ios/native/UIResponder+Reanimated.mm +3 -3
  100. package/ios/sensor/ReanimatedSensor.h +5 -1
  101. package/ios/sensor/ReanimatedSensor.m +49 -1
  102. package/ios/sensor/ReanimatedSensorContainer.h +1 -2
  103. package/ios/sensor/ReanimatedSensorContainer.m +2 -3
  104. package/lib/Animated.js +0 -9
  105. package/lib/ConfigHelper.js +0 -1
  106. package/lib/index.js +0 -9
  107. package/lib/reanimated2/Easing.js +9 -3
  108. package/lib/reanimated2/core.js +0 -36
  109. package/lib/reanimated2/globals.d.ts +1 -2
  110. package/lib/reanimated2/interpolateColor.js +11 -11
  111. package/lib/reanimated2/js-reanimated/index.js +3 -3
  112. package/lib/types/lib/ConfigHelper.d.ts +12 -0
  113. package/lib/types/lib/ReanimatedEventEmitter.d.ts +3 -0
  114. package/lib/types/lib/ReanimatedModule.d.ts +2 -0
  115. package/lib/types/lib/ReanimatedModule.macos.d.ts +2 -0
  116. package/lib/types/lib/ReanimatedModule.native.d.ts +2 -0
  117. package/lib/types/lib/ReanimatedModule.windows.d.ts +2 -0
  118. package/lib/types/lib/ReanimatedModuleCompat.d.ts +14 -0
  119. package/lib/types/lib/createAnimatedComponent.d.ts +33 -0
  120. package/lib/types/lib/reanimated2/Bezier.d.ts +6 -0
  121. package/lib/types/lib/reanimated2/Colors.d.ts +31 -0
  122. package/lib/types/lib/reanimated2/Easing.d.ts +172 -0
  123. package/lib/types/lib/reanimated2/NativeMethods.d.ts +14 -0
  124. package/lib/types/lib/reanimated2/NativeReanimated/NativeReanimated.d.ts +20 -0
  125. package/lib/types/lib/reanimated2/NativeReanimated/index.d.ts +3 -0
  126. package/lib/types/lib/reanimated2/PlatformChecker.d.ts +5 -0
  127. package/lib/types/lib/reanimated2/PropAdapters.d.ts +4 -0
  128. package/lib/types/lib/reanimated2/UpdateProps.d.ts +9 -0
  129. package/lib/types/lib/reanimated2/ViewDescriptorsSet.d.ts +20 -0
  130. package/lib/types/lib/reanimated2/WorkletEventHandler.d.ts +13 -0
  131. package/lib/types/lib/reanimated2/__mocks__/MutableValue.d.ts +5 -0
  132. package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.d.ts +13 -0
  133. package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.native.d.ts +13 -0
  134. package/lib/types/lib/reanimated2/animation/commonTypes.d.ts +27 -0
  135. package/lib/types/lib/reanimated2/animation/decay.d.ts +19 -0
  136. package/lib/types/lib/reanimated2/animation/delay.d.ts +7 -0
  137. package/lib/types/lib/reanimated2/animation/index.d.ts +9 -0
  138. package/lib/types/lib/reanimated2/animation/repeat.d.ts +12 -0
  139. package/lib/types/lib/reanimated2/animation/sequence.d.ts +7 -0
  140. package/lib/types/lib/reanimated2/animation/spring.d.ts +22 -0
  141. package/lib/types/lib/reanimated2/animation/styleAnimation.d.ts +7 -0
  142. package/lib/types/lib/reanimated2/animation/timing.d.ts +21 -0
  143. package/lib/types/lib/reanimated2/animation/util.d.ts +9 -0
  144. package/lib/types/lib/reanimated2/commonTypes.d.ts +79 -0
  145. package/lib/types/lib/reanimated2/component/FlatList.d.ts +9 -0
  146. package/lib/types/lib/reanimated2/component/WrappedComponents.d.ts +8 -0
  147. package/lib/types/lib/reanimated2/component/index.d.ts +9 -0
  148. package/lib/types/lib/reanimated2/core.d.ts +24 -0
  149. package/lib/types/lib/reanimated2/hook/Hooks.d.ts +5 -0
  150. package/lib/types/lib/reanimated2/hook/commonTypes.d.ts +14 -0
  151. package/lib/types/lib/reanimated2/hook/index.d.ts +10 -0
  152. package/lib/types/lib/reanimated2/hook/useAnimatedGestureHandler.d.ts +35 -0
  153. package/lib/types/lib/reanimated2/hook/useAnimatedReaction.d.ts +12 -0
  154. package/lib/types/lib/reanimated2/hook/useAnimatedRef.d.ts +3 -0
  155. package/lib/types/lib/reanimated2/hook/useAnimatedScrollHandler.d.ts +21 -0
  156. package/lib/types/lib/reanimated2/hook/useAnimatedSensor.d.ts +18 -0
  157. package/lib/types/lib/reanimated2/hook/useAnimatedStyle.d.ts +11 -0
  158. package/lib/types/lib/reanimated2/hook/useDerivedValue.d.ts +4 -0
  159. package/lib/types/lib/reanimated2/hook/useSharedValue.d.ts +2 -0
  160. package/lib/types/lib/reanimated2/hook/utils.d.ts +28 -0
  161. package/lib/types/lib/reanimated2/index.d.ts +12 -0
  162. package/lib/types/lib/reanimated2/interpolateColor.d.ts +26 -0
  163. package/lib/types/lib/reanimated2/interpolation.d.ts +14 -0
  164. package/lib/types/lib/reanimated2/jestUtils.d.ts +12 -0
  165. package/lib/types/lib/reanimated2/js-reanimated/JSReanimated.d.ts +30 -0
  166. package/lib/types/lib/reanimated2/js-reanimated/Mapper.d.ts +14 -0
  167. package/lib/types/lib/reanimated2/js-reanimated/MapperRegistry.d.ts +14 -0
  168. package/lib/types/lib/reanimated2/js-reanimated/MutableValue.d.ts +14 -0
  169. package/lib/types/lib/reanimated2/js-reanimated/commonTypes.d.ts +44 -0
  170. package/lib/types/lib/reanimated2/js-reanimated/index.d.ts +15 -0
  171. package/lib/types/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.d.ts +1 -0
  172. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +22 -0
  173. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +38 -0
  174. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.d.ts +25 -0
  175. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +77 -0
  176. package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/index.d.ts +4 -0
  177. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.d.ts +62 -0
  178. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Default.d.ts +4 -0
  179. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.d.ts +42 -0
  180. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.d.ts +50 -0
  181. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.d.ts +18 -0
  182. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.d.ts +10 -0
  183. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.d.ts +18 -0
  184. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.d.ts +34 -0
  185. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.d.ts +34 -0
  186. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.d.ts +18 -0
  187. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.d.ts +66 -0
  188. package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/index.d.ts +10 -0
  189. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +19 -0
  190. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +13 -0
  191. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.d.ts +6 -0
  192. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +6 -0
  193. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.d.ts +7 -0
  194. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +9 -0
  195. package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/index.d.ts +6 -0
  196. package/lib/types/lib/reanimated2/layoutReanimation/index.d.ts +4 -0
  197. package/lib/types/lib/reanimated2/mock.d.ts +55 -0
  198. package/lib/types/lib/reanimated2/platform-specific/RNRenderer.d.ts +1 -0
  199. package/lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
  200. package/lib/types/lib/reanimated2/utils.d.ts +7 -0
  201. package/lib/types/lib/setAndForwardRef.d.ts +40 -0
  202. package/lib/types/react-native-reanimated-tests.d.ts +1 -0
  203. package/package.json +7 -9
  204. package/plugin.js +26 -32
  205. package/react-native-reanimated.d.ts +39 -30
  206. package/src/Animated.js +0 -9
  207. package/src/ConfigHelper.ts +0 -1
  208. package/src/createAnimatedComponent.tsx +1 -1
  209. package/src/reanimated2/Easing.ts +9 -3
  210. package/src/reanimated2/commonTypes.ts +0 -1
  211. package/src/reanimated2/component/FlatList.tsx +1 -1
  212. package/src/reanimated2/core.ts +0 -47
  213. package/src/reanimated2/globals.d.ts +1 -2
  214. package/src/reanimated2/hook/useAnimatedSensor.ts +1 -3
  215. package/src/reanimated2/interpolateColor.ts +11 -11
  216. package/src/reanimated2/jestUtils.ts +11 -0
  217. package/src/reanimated2/js-reanimated/index.ts +3 -3
  218. package/android/expo/linking.gradle +0 -46
  219. package/android/expo/src/main/java/com/swmansion/reanimated/EXReanimatedAdapter.java +0 -12
  220. package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java +0 -26
  221. package/expo-module.config.json +0 -3
@@ -1,8 +1,7 @@
1
+ #import <RNReanimated/REANodesManager.h>
2
+ #import <RNReanimated/REAOperatorNode.h>
1
3
  #include <tgmath.h>
2
4
 
3
- #import "REANodesManager.h"
4
- #import "REAOperatorNode.h"
5
-
6
5
  typedef id (^REAOperatorBlock)(NSArray<REANode *> *inputNodes);
7
6
 
8
7
  #define REA_REDUCE(OP) \
@@ -1,4 +1,4 @@
1
- #import "REAValueNode.h"
1
+ #import <RNReanimated/REAValueNode.h>
2
2
 
3
3
  @interface REAParamNode : REAValueNode
4
4
 
@@ -1,7 +1,7 @@
1
- #import "REAParamNode.h"
2
- #import "REAClockNodes.h"
3
- #import "REANodesManager.h"
4
- #import "REAValueNode.h"
1
+ #import <RNReanimated/REAClockNodes.h>
2
+ #import <RNReanimated/REANodesManager.h>
3
+ #import <RNReanimated/REAParamNode.h>
4
+ #import <RNReanimated/REAValueNode.h>
5
5
 
6
6
  @implementation REAParamNode {
7
7
  NSMutableArray<REANodeID> *_argstack;
@@ -1,4 +1,4 @@
1
- #import "REANode.h"
1
+ #import <RNReanimated/REANode.h>
2
2
 
3
3
  @interface REAPropsNode : REANode <REAFinalNode>
4
4
 
@@ -1,9 +1,7 @@
1
- #import "REAPropsNode.h"
2
-
3
- #import "REAModule.h"
4
- #import "REANodesManager.h"
5
- #import "REAStyleNode.h"
6
-
1
+ #import <RNReanimated/REAModule.h>
2
+ #import <RNReanimated/REANodesManager.h>
3
+ #import <RNReanimated/REAPropsNode.h>
4
+ #import <RNReanimated/REAStyleNode.h>
7
5
  #import <React/RCTComponentData.h>
8
6
  #import <React/RCTLog.h>
9
7
  #import <React/RCTUIManager.h>
@@ -1,4 +1,4 @@
1
- #import "REANode.h"
1
+ #import <RNReanimated/REANode.h>
2
2
 
3
3
  @interface REASetNode : REANode
4
4
 
@@ -1,9 +1,9 @@
1
- #import "REASetNode.h"
1
+ #import <RNReanimated/REANodesManager.h>
2
+ #import <RNReanimated/REASetNode.h>
3
+ #import <RNReanimated/REAUtils.h>
4
+ #import <RNReanimated/REAValueNode.h>
2
5
  #import <React/RCTConvert.h>
3
6
  #import <React/RCTLog.h>
4
- #import "REANodesManager.h"
5
- #import "REAUtils.h"
6
- #import "REAValueNode.h"
7
7
 
8
8
  @implementation REASetNode {
9
9
  NSNumber *_whatNodeID;
@@ -1,4 +1,4 @@
1
- #import "REANode.h"
1
+ #import <RNReanimated/REANode.h>
2
2
 
3
3
  @interface REAStyleNode : REANode
4
4
 
@@ -1,6 +1,5 @@
1
- #import "REAStyleNode.h"
2
-
3
- #import "REANodesManager.h"
1
+ #import <RNReanimated/REANodesManager.h>
2
+ #import <RNReanimated/REAStyleNode.h>
4
3
 
5
4
  @implementation REAStyleNode {
6
5
  NSMutableDictionary<NSString *, REANodeID> *_styleConfig;
@@ -1,4 +1,4 @@
1
- #import "REANode.h"
1
+ #import <RNReanimated/REANode.h>
2
2
 
3
3
  @interface REATransformNode : REANode
4
4
 
@@ -1,6 +1,6 @@
1
- #import "REATransformNode.h"
1
+ #import <RNReanimated/REANodesManager.h>
2
+ #import <RNReanimated/REATransformNode.h>
2
3
  #import <React/RCTConvert.h>
3
- #import "REANodesManager.h"
4
4
 
5
5
  @implementation REATransformNode {
6
6
  NSArray<id> *_transformConfigs;
@@ -1,6 +1,4 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- #import "REANode.h"
1
+ #import <RNReanimated/REANode.h>
4
2
 
5
3
  @class REAValueNode;
6
4
 
@@ -1,4 +1,4 @@
1
- #import "REAValueNode.h"
1
+ #import <RNReanimated/REAValueNode.h>
2
2
 
3
3
  @implementation REAValueNode {
4
4
  NSNumber *_value;
@@ -1,4 +1,4 @@
1
- #import "REAEventDispatcher.h"
1
+ #import <RNReanimated/REAEventDispatcher.h>
2
2
  #import <RNReanimated/REAModule.h>
3
3
  #import <React/RCTBridge+Private.h>
4
4
  #import <React/RCTDefines.h>
package/ios/REAModule.h CHANGED
@@ -5,7 +5,7 @@
5
5
  #import <React/RCTUIManagerObserverCoordinator.h>
6
6
  #import <React/RCTUIManagerUtils.h>
7
7
 
8
- #import "REAValueNode.h"
8
+ #import <RNReanimated/REAValueNode.h>
9
9
 
10
10
  @interface REAModule : RCTEventEmitter <RCTBridgeModule, RCTEventDispatcherObserver, RCTUIManagerObserver>
11
11
 
package/ios/REAModule.m CHANGED
@@ -1,8 +1,7 @@
1
- #import "REAModule.h"
2
-
3
- #import "REANodesManager.h"
4
- #import "Transitioning/REATransitionManager.h"
5
- #import "native/NativeProxy.h"
1
+ #import <RNReanimated/NativeProxy.h>
2
+ #import <RNReanimated/REAModule.h>
3
+ #import <RNReanimated/REANodesManager.h>
4
+ #import <RNReanimated/REATransitionManager.h>
6
5
 
7
6
  typedef void (^AnimatedOperation)(REANodesManager *nodesManager);
8
7
 
@@ -1,8 +1,7 @@
1
1
  #import <Foundation/Foundation.h>
2
-
2
+ #import <RNReanimated/REANode.h>
3
3
  #import <React/RCTBridgeModule.h>
4
4
  #import <React/RCTUIManager.h>
5
- #import "REANode.h"
6
5
 
7
6
  @class REAModule;
8
7
 
@@ -1,29 +1,27 @@
1
- #import "REANodesManager.h"
2
-
1
+ #import <RNReanimated/REAAlwaysNode.h>
2
+ #import <RNReanimated/REABezierNode.h>
3
+ #import <RNReanimated/REABlockNode.h>
4
+ #import <RNReanimated/REACallFuncNode.h>
5
+ #import <RNReanimated/REAClockNodes.h>
6
+ #import <RNReanimated/REAConcatNode.h>
7
+ #import <RNReanimated/REACondNode.h>
8
+ #import <RNReanimated/READebugNode.h>
9
+ #import <RNReanimated/REAEventNode.h>
10
+ #import <RNReanimated/REAFunctionNode.h>
11
+ #import <RNReanimated/REAJSCallNode.h>
12
+ #import <RNReanimated/REAModule.h>
13
+ #import <RNReanimated/REANode.h>
14
+ #import <RNReanimated/REANodesManager.h>
15
+ #import <RNReanimated/REAOperatorNode.h>
16
+ #import <RNReanimated/REAParamNode.h>
17
+ #import <RNReanimated/REAPropsNode.h>
18
+ #import <RNReanimated/REASetNode.h>
19
+ #import <RNReanimated/REAStyleNode.h>
20
+ #import <RNReanimated/REATransformNode.h>
21
+ #import <RNReanimated/REAValueNode.h>
3
22
  #import <React/RCTConvert.h>
4
-
5
23
  #import <React/RCTShadowView.h>
6
24
  #import <stdatomic.h>
7
- #import "Nodes/REAAlwaysNode.h"
8
- #import "Nodes/REABezierNode.h"
9
- #import "Nodes/REABlockNode.h"
10
- #import "Nodes/REACallFuncNode.h"
11
- #import "Nodes/REAClockNodes.h"
12
- #import "Nodes/REAConcatNode.h"
13
- #import "Nodes/REACondNode.h"
14
- #import "Nodes/READebugNode.h"
15
- #import "Nodes/REAEventNode.h"
16
- #import "Nodes/REAFunctionNode.h"
17
- #import "Nodes/REAJSCallNode.h"
18
- #import "Nodes/REANode.h"
19
- #import "Nodes/REAOperatorNode.h"
20
- #import "Nodes/REAParamNode.h"
21
- #import "Nodes/REAPropsNode.h"
22
- #import "Nodes/REASetNode.h"
23
- #import "Nodes/REAStyleNode.h"
24
- #import "Nodes/REATransformNode.h"
25
- #import "Nodes/REAValueNode.h"
26
- #import "REAModule.h"
27
25
 
28
26
  // Interface below has been added in order to use private methods of RCTUIManager,
29
27
  // RCTUIManager#UpdateView is a React Method which is exported to JS but in
@@ -143,7 +141,7 @@
143
141
  - (void)invalidate
144
142
  {
145
143
  _eventHandler = nil;
146
- [self stopUpdatingOnAnimationFrame];
144
+ [_displayLink invalidate];
147
145
  }
148
146
 
149
147
  - (void)operationsBatchDidComplete
@@ -1,7 +1,6 @@
1
+ #import <RNReanimated/REATransition.h>
1
2
  #import <React/RCTConvert.h>
2
3
 
3
- #import "REATransition.h"
4
-
5
4
  @interface RCTConvert (REATransition)
6
5
 
7
6
  + (REATransitionType)REATransitionType:(id)json;
@@ -1,4 +1,4 @@
1
- #import "RCTConvert+REATransition.h"
1
+ #import <RNReanimated/RCTConvert+REATransition.h>
2
2
 
3
3
  @implementation RCTConvert (REATransition)
4
4
 
@@ -1,4 +1,4 @@
1
- #import "REATransition.h"
1
+ #import <RNReanimated/REATransition.h>
2
2
 
3
3
  @interface REATransitionGroup : REATransition
4
4
  @property (nonatomic) BOOL sequence;
@@ -1,8 +1,7 @@
1
+ #import <RNReanimated/RCTConvert+REATransition.h>
2
+ #import <RNReanimated/REAAllTransitions.h>
1
3
  #import <React/RCTViewManager.h>
2
4
 
3
- #import "RCTConvert+REATransition.h"
4
- #import "REAAllTransitions.h"
5
-
6
5
  @interface REASnapshotRemover : NSObject <CAAnimationDelegate>
7
6
  @end
8
7
 
@@ -1,10 +1,9 @@
1
1
  #import <QuartzCore/QuartzCore.h>
2
+ #import <RNReanimated/REATransitionAnimation.h>
3
+ #import <RNReanimated/REATransitionValues.h>
2
4
  #import <React/RCTView.h>
3
5
  #import <UIKit/UIKit.h>
4
6
 
5
- #import "REATransitionAnimation.h"
6
- #import "REATransitionValues.h"
7
-
8
7
  // TODO: fix below implementation
9
8
  #define IS_LAYOUT_ONLY(view) ([view isKindOfClass:[RCTView class]] && view.backgroundColor == nil)
10
9
 
@@ -1,12 +1,11 @@
1
1
  #import <QuartzCore/QuartzCore.h>
2
+ #import <RNReanimated/RCTConvert+REATransition.h>
3
+ #import <RNReanimated/REATransition.h>
4
+ #import <RNReanimated/REATransitionValues.h>
2
5
  #import <React/RCTConvert.h>
3
6
  #import <React/RCTViewManager.h>
4
7
  #import <UIKit/UIKit.h>
5
8
 
6
- #import "RCTConvert+REATransition.h"
7
- #import "REATransition.h"
8
- #import "REATransitionValues.h"
9
-
10
9
  #define DEFAULT_PROPAGATION_SPEED 3
11
10
 
12
11
  @interface REATransitionGroup : REATransition
@@ -1,7 +1,6 @@
1
+ #import <RNReanimated/REATransitionAnimation.h>
1
2
  #import <UIKit/UIKit.h>
2
3
 
3
- #import "REATransitionAnimation.h"
4
-
5
4
  #define DEFAULT_DURATION 0.25
6
5
 
7
6
  #if TARGET_IPHONE_SIMULATOR
@@ -1,10 +1,8 @@
1
- #import "REATransitionManager.h"
2
-
1
+ #import <RNReanimated/REATransition.h>
2
+ #import <RNReanimated/REATransitionManager.h>
3
3
  #import <React/RCTUIManager.h>
4
4
  #import <React/RCTUIManagerObserverCoordinator.h>
5
5
 
6
- #import "REATransition.h"
7
-
8
6
  @interface REATransitionManager () <RCTUIManagerObserver>
9
7
  @end
10
8
 
@@ -1,9 +1,8 @@
1
+ #import <RNReanimated/REATransition.h>
2
+ #import <RNReanimated/REATransitionValues.h>
1
3
  #import <React/RCTView.h>
2
4
  #import <React/RCTViewManager.h>
3
5
 
4
- #import "REATransition.h"
5
- #import "REATransitionValues.h"
6
-
7
6
  @implementation REATransitionValues
8
7
 
9
8
  - (instancetype)initWithView:(UIView *)view forRoot:(UIView *)root
@@ -1,11 +1,9 @@
1
1
  #import <Foundation/Foundation.h>
2
- #import <RNGestureHandlerStateManager.h>
2
+ #import <RNReanimated/RNGestureHandlerStateManager.h>
3
3
  #import <React/RCTUIManager.h>
4
4
  #include <string>
5
- #import <string>
6
5
  #include <utility>
7
6
  #include <vector>
8
- #import <vector>
9
7
 
10
8
  namespace reanimated {
11
9
 
@@ -1,4 +1,4 @@
1
- #import "NativeMethods.h"
1
+ #import <RNReanimated/NativeMethods.h>
2
2
  #import <React/RCTEventDispatcher.h>
3
3
  #import <React/RCTScrollView.h>
4
4
 
@@ -1,7 +1,7 @@
1
- #import <React/RCTEventDispatcher.h>
2
-
3
1
  #if __cplusplus
2
+
4
3
  #import <RNReanimated/NativeReanimatedModule.h>
4
+ #import <React/RCTEventDispatcher.h>
5
5
  #include <memory>
6
6
 
7
7
  namespace reanimated {
@@ -1,22 +1,21 @@
1
- #if TARGET_IPHONE_SIMULATOR
2
- #import <dlfcn.h>
3
- #endif
4
-
1
+ #import <RNReanimated/LayoutAnimationsProxy.h>
2
+ #import <RNReanimated/NativeMethods.h>
3
+ #import <RNReanimated/NativeProxy.h>
4
+ #import <RNReanimated/REAAnimationsManager.h>
5
+ #import <RNReanimated/REAIOSErrorHandler.h>
6
+ #import <RNReanimated/REAIOSScheduler.h>
7
+ #import <RNReanimated/REAModule.h>
8
+ #import <RNReanimated/REANodesManager.h>
9
+ #import <RNReanimated/REAUIManager.h>
10
+ #import <RNReanimated/RNGestureHandlerStateManager.h>
11
+ #import <RNReanimated/ReanimatedSensorContainer.h>
5
12
  #import <React/RCTFollyConvert.h>
6
13
  #import <React/RCTUIManager.h>
7
14
  #import <folly/json.h>
8
15
 
9
- #import <RNGestureHandlerStateManager.h>
10
- #import "LayoutAnimationsProxy.h"
11
- #import "NativeMethods.h"
12
- #import "NativeProxy.h"
13
- #import "REAAnimationsManager.h"
14
- #import "REAIOSErrorHandler.h"
15
- #import "REAIOSScheduler.h"
16
- #import "REAModule.h"
17
- #import "REANodesManager.h"
18
- #import "REAUIManager.h"
19
- #import "ReanimatedSensorContainer.h"
16
+ #if TARGET_IPHONE_SIMULATOR
17
+ #import <dlfcn.h>
18
+ #endif
20
19
 
21
20
  #if __has_include(<reacthermes/HermesExecutorFactory.h>)
22
21
  #import <reacthermes/HermesExecutorFactory.h>
@@ -163,8 +162,12 @@ std::shared_ptr<NativeReanimatedModule> createReanimatedModule(
163
162
  scrollTo(viewTag, uiManager, x, y, animated);
164
163
  };
165
164
 
166
- id<RNGestureHandlerStateManager> gestureHandlerStateManager = [bridge moduleForName:@"RNGestureHandlerModule"];
167
- auto setGestureStateFunction = [gestureHandlerStateManager](int handlerTag, int newState) {
165
+ id<RNGestureHandlerStateManager> gestureHandlerStateManager = nil;
166
+ auto setGestureStateFunction = [gestureHandlerStateManager, bridge](int handlerTag, int newState) mutable {
167
+ if (gestureHandlerStateManager == nil) {
168
+ gestureHandlerStateManager = [bridge moduleForName:@"RNGestureHandlerModule"];
169
+ }
170
+
168
171
  setGestureState(gestureHandlerStateManager, handlerTag, newState);
169
172
  };
170
173
 
@@ -1,9 +1,7 @@
1
- #pragma once
2
-
1
+ #import <RNReanimated/ErrorHandler.h>
2
+ #import <RNReanimated/Scheduler.h>
3
3
  #include <memory>
4
4
  #include <string>
5
- #include "ErrorHandler.h"
6
- #include "Scheduler.h"
7
5
 
8
6
  namespace reanimated {
9
7
 
@@ -1,5 +1,5 @@
1
- #include "REAIOSErrorHandler.h"
2
1
  #import <Foundation/Foundation.h>
2
+ #import <RNReanimated/REAIOSErrorHandler.h>
3
3
  #import <React/RCTLog.h>
4
4
 
5
5
  namespace reanimated {
@@ -1,7 +1,5 @@
1
- #pragma once
2
-
1
+ #import <RNReanimated/ReanimatedHiddenHeaders.h>
3
2
  #include <stdio.h>
4
- #include "ReanimatedHiddenHeaders.h"
5
3
 
6
4
  namespace reanimated {
7
5
 
@@ -1,5 +1,5 @@
1
- #include "REAIOSLogger.h"
2
1
  #import <Foundation/Foundation.h>
2
+ #import <RNReanimated/REAIOSLogger.h>
3
3
 
4
4
  namespace reanimated {
5
5
 
@@ -1,10 +1,8 @@
1
- #pragma once
2
-
1
+ #import <RNReanimated/Scheduler.h>
3
2
  #import <React/RCTUIManager.h>
4
3
  #import <ReactCommon/CallInvoker.h>
5
4
  #include <stdio.h>
6
5
  #include <memory>
7
- #include "Scheduler.h"
8
6
 
9
7
  namespace reanimated {
10
8
 
@@ -1,5 +1,5 @@
1
- #include "REAIOSScheduler.h"
2
- #include "RuntimeManager.h"
1
+ #import <RNReanimated/REAIOSScheduler.h>
2
+ #import <RNReanimated/RuntimeManager.h>
3
3
 
4
4
  namespace reanimated {
5
5
 
@@ -1,10 +1,3 @@
1
- //
2
- // REAInitializer.h
3
- // RNReanimated
4
- //
5
- // Created by Szymon Kapala on 27/07/2021.
6
- //
7
-
8
1
  #import <Foundation/Foundation.h>
9
2
  #import <RNReanimated/NativeProxy.h>
10
3
  #import <RNReanimated/REAEventDispatcher.h>
@@ -1,5 +1,5 @@
1
- #import "REAInitializer.h"
2
- #import "REAUIManager.h"
1
+ #import <RNReanimated/REAInitializer.h>
2
+ #import <RNReanimated/REAUIManager.h>
3
3
 
4
4
  @interface RCTEventDispatcher (Reanimated)
5
5
 
@@ -1,6 +1,6 @@
1
- #import "REAInitializer.h"
2
- #import "REAUIManager.h"
3
- #import "UIResponder+Reanimated.h"
1
+ #import <RNReanimated/REAInitializer.h>
2
+ #import <RNReanimated/REAUIManager.h>
3
+ #import <RNReanimated/UIResponder+Reanimated.h>
4
4
 
5
5
  #if __has_include(<reacthermes/HermesExecutorFactory.h>)
6
6
  #import <reacthermes/HermesExecutorFactory.h>
@@ -1,11 +1,15 @@
1
+ #if __has_include(<CoreMotion/CoreMotion.h>)
1
2
  #import <CoreMotion/CoreMotion.h>
2
- #import "ReanimatedSensorType.h"
3
+ #endif
4
+ #import <RNReanimated/ReanimatedSensorType.h>
3
5
 
4
6
  @interface ReanimatedSensor : NSObject {
5
7
  ReanimatedSensorType _sensorType;
6
8
  double _interval;
7
9
  double _lastTimestamp;
10
+ #if !TARGET_OS_TV
8
11
  CMMotionManager *_motionManager;
12
+ #endif
9
13
  void (^_setter)(double[]);
10
14
  }
11
15
 
@@ -1,5 +1,6 @@
1
- #import "ReanimatedSensor.h"
1
+ #import <RNReanimated/ReanimatedSensor.h>
2
2
 
3
+ #if __has_include(<CoreMotion/CoreMotion.h>)
3
4
  @implementation ReanimatedSensor
4
5
 
5
6
  - (instancetype)init:(ReanimatedSensorType)sensorType interval:(int)interval setter:(void (^)(double[]))setter
@@ -167,3 +168,50 @@
167
168
  }
168
169
 
169
170
  @end
171
+
172
+ #else
173
+
174
+ @implementation ReanimatedSensor
175
+
176
+ - (instancetype)init:(ReanimatedSensorType)sensorType interval:(int)interval setter:(void (^)(double[]))setter
177
+ {
178
+ self = [super init];
179
+ return self;
180
+ }
181
+
182
+ - (bool)initialize
183
+ {
184
+ return false;
185
+ }
186
+
187
+ - (bool)initializeGyroscope
188
+ {
189
+ return false;
190
+ }
191
+
192
+ - (bool)initializeAccelerometer
193
+ {
194
+ return false;
195
+ }
196
+
197
+ - (bool)initializeGravity
198
+ {
199
+ return false;
200
+ }
201
+
202
+ - (bool)initializeMagnetometer
203
+ {
204
+ return false;
205
+ }
206
+
207
+ - (bool)initializeOrientation
208
+ {
209
+ return false;
210
+ }
211
+
212
+ - (void)cancel
213
+ {
214
+ }
215
+
216
+ @end
217
+ #endif
@@ -1,5 +1,4 @@
1
- #import <CoreMotion/CoreMotion.h>
2
- #import "ReanimatedSensorType.h"
1
+ #import <RNReanimated/ReanimatedSensorType.h>
3
2
 
4
3
  @interface ReanimatedSensorContainer : NSObject {
5
4
  NSNumber *_nextSensorId;
@@ -1,7 +1,6 @@
1
- #import "ReanimatedSensorContainer.h"
2
- #import <CoreMotion/CoreMotion.h>
3
1
  #import <Foundation/Foundation.h>
4
- #import "ReanimatedSensor.h"
2
+ #import <RNReanimated/ReanimatedSensor.h>
3
+ #import <RNReanimated/ReanimatedSensorContainer.h>
5
4
 
6
5
  static NSNumber *_nextSensorId = nil;
7
6
 
package/lib/Animated.js CHANGED
@@ -1,4 +1,3 @@
1
- import { LogBox } from 'react-native';
2
1
  import createAnimatedComponent from './createAnimatedComponent';
3
2
  import {
4
3
  addWhitelistedNativeProps,
@@ -21,11 +20,3 @@ const Animated = {
21
20
  export * from './reanimated2';
22
21
  export * from './reanimated1';
23
22
  export default Animated;
24
-
25
- // I think we can ignore this message as long as Gesture Handler doesn't
26
- // try to load the Reanimated module. I figured it should be here instead of
27
- // RNGH because this prevents the message from being displayed for all
28
- // versions of RNGH.
29
- LogBox.ignoreLogs([
30
- 'RCTBridge required dispatch_sync to load RNGestureHandlerModule. This may lead to deadlocks',
31
- ]);
@@ -76,7 +76,6 @@ let NATIVE_THREAD_PROPS_WHITELIST = {
76
76
  borderTopLeftRadius: true,
77
77
  borderTopRightRadius: true,
78
78
  borderTopStartRadius: true,
79
- opacity: true,
80
79
  elevation: true,
81
80
  fontSize: true,
82
81
  lineHeight: true,
package/lib/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import { LogBox } from 'react-native';
2
1
  import createAnimatedComponent from './createAnimatedComponent';
3
2
  import {
4
3
  addWhitelistedNativeProps,
@@ -21,11 +20,3 @@ const Animated = {
21
20
  export * from './reanimated2';
22
21
  export * from './reanimated1';
23
22
  export default Animated;
24
-
25
- // I think we can ignore this message as long as Gesture Handler doesn't
26
- // try to load the Reanimated module. I figured it should be here instead of
27
- // RNGH because this prevents the message from being displayed for all
28
- // versions of RNGH.
29
- LogBox.ignoreLogs([
30
- 'RCTBridge required dispatch_sync to load RNGestureHandlerModule. This may lead to deadlocks',
31
- ]);