react-native-reanimated 3.9.0-rc.0 → 3.9.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 (297) hide show
  1. package/Common/cpp/Fabric/ShadowTreeCloner.cpp +2 -1
  2. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +11 -4
  3. package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +5 -3
  4. package/apple/REAModule.mm +14 -29
  5. package/apple/REANodesManager.mm +7 -6
  6. package/lib/module/Animated.js.map +1 -1
  7. package/lib/module/ConfigHelper.js.map +1 -1
  8. package/lib/module/animationBuilder.js.map +1 -1
  9. package/lib/module/createAnimatedComponent/InlinePropManager.js +2 -2
  10. package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
  11. package/lib/module/createAnimatedComponent/JSPropsUpdater.js +4 -4
  12. package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
  13. package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js.map +1 -1
  14. package/lib/module/createAnimatedComponent/PropsFilter.js +5 -5
  15. package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
  16. package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
  17. package/lib/module/createAnimatedComponent/createAnimatedComponent.js +33 -33
  18. package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
  19. package/lib/module/createAnimatedComponent/getViewInfo.js +2 -2
  20. package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
  21. package/lib/module/createAnimatedComponent/index.js.map +1 -1
  22. package/lib/module/createAnimatedComponent/setAndForwardRef.js +4 -5
  23. package/lib/module/createAnimatedComponent/setAndForwardRef.js.map +1 -1
  24. package/lib/module/createAnimatedComponent/utils.js.map +1 -1
  25. package/lib/module/index.js.map +1 -1
  26. package/lib/module/index.web.js +1 -2
  27. package/lib/module/index.web.js.map +1 -1
  28. package/lib/module/mock.js +3 -8
  29. package/lib/module/mock.js.map +1 -1
  30. package/lib/module/propsAllowlists.js.map +1 -1
  31. package/lib/module/reanimated2/Bezier.js.map +1 -1
  32. package/lib/module/reanimated2/Colors.js +4 -11
  33. package/lib/module/reanimated2/Colors.js.map +1 -1
  34. package/lib/module/reanimated2/Easing.js +3 -7
  35. package/lib/module/reanimated2/Easing.js.map +1 -1
  36. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +3 -3
  37. package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
  38. package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
  39. package/lib/module/reanimated2/NativeReanimated/index.web.js.map +1 -1
  40. package/lib/module/reanimated2/PlatformChecker.js +1 -0
  41. package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
  42. package/lib/module/reanimated2/PropAdapters.js +1 -1
  43. package/lib/module/reanimated2/PropAdapters.js.map +1 -1
  44. package/lib/module/reanimated2/PropsRegistry.js.map +1 -1
  45. package/lib/module/reanimated2/Sensor.js +2 -2
  46. package/lib/module/reanimated2/Sensor.js.map +1 -1
  47. package/lib/module/reanimated2/SensorContainer.js +2 -2
  48. package/lib/module/reanimated2/SensorContainer.js.map +1 -1
  49. package/lib/module/reanimated2/UpdateLayoutAnimations.js.map +1 -1
  50. package/lib/module/reanimated2/UpdateProps.js.map +1 -1
  51. package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
  52. package/lib/module/reanimated2/WorkletEventHandler.js +74 -31
  53. package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
  54. package/lib/module/reanimated2/animation/clamp.js.map +1 -1
  55. package/lib/module/reanimated2/animation/commonTypes.js.map +1 -1
  56. package/lib/module/reanimated2/animation/decay/decay.js.map +1 -1
  57. package/lib/module/reanimated2/animation/decay/index.js.map +1 -1
  58. package/lib/module/reanimated2/animation/decay/rigidDecay.js.map +1 -1
  59. package/lib/module/reanimated2/animation/decay/rubberBandDecay.js.map +1 -1
  60. package/lib/module/reanimated2/animation/decay/utils.js.map +1 -1
  61. package/lib/module/reanimated2/animation/delay.js.map +1 -1
  62. package/lib/module/reanimated2/animation/index.js.map +1 -1
  63. package/lib/module/reanimated2/animation/repeat.js +1 -6
  64. package/lib/module/reanimated2/animation/repeat.js.map +1 -1
  65. package/lib/module/reanimated2/animation/sequence.js +1 -5
  66. package/lib/module/reanimated2/animation/sequence.js.map +1 -1
  67. package/lib/module/reanimated2/animation/spring.js.map +1 -1
  68. package/lib/module/reanimated2/animation/springUtils.js +8 -10
  69. package/lib/module/reanimated2/animation/springUtils.js.map +1 -1
  70. package/lib/module/reanimated2/animation/styleAnimation.js +5 -4
  71. package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
  72. package/lib/module/reanimated2/animation/timing.js.map +1 -1
  73. package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js +1 -2
  74. package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js.map +1 -1
  75. package/lib/module/reanimated2/animation/util.js.map +1 -1
  76. package/lib/module/reanimated2/commonTypes.js +2 -0
  77. package/lib/module/reanimated2/commonTypes.js.map +1 -1
  78. package/lib/module/reanimated2/component/FlatList.js +1 -0
  79. package/lib/module/reanimated2/component/FlatList.js.map +1 -1
  80. package/lib/module/reanimated2/component/Image.js +1 -0
  81. package/lib/module/reanimated2/component/Image.js.map +1 -1
  82. package/lib/module/reanimated2/component/LayoutAnimationConfig.js +1 -0
  83. package/lib/module/reanimated2/component/LayoutAnimationConfig.js.map +1 -1
  84. package/lib/module/reanimated2/component/PerformanceMonitor.js +3 -4
  85. package/lib/module/reanimated2/component/PerformanceMonitor.js.map +1 -1
  86. package/lib/module/reanimated2/component/ScrollView.js +1 -0
  87. package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
  88. package/lib/module/reanimated2/component/Text.js +1 -0
  89. package/lib/module/reanimated2/component/Text.js.map +1 -1
  90. package/lib/module/reanimated2/component/View.js +1 -0
  91. package/lib/module/reanimated2/component/View.js.map +1 -1
  92. package/lib/module/reanimated2/core.js +2 -4
  93. package/lib/module/reanimated2/core.js.map +1 -1
  94. package/lib/module/reanimated2/errors.js +7 -8
  95. package/lib/module/reanimated2/errors.js.map +1 -1
  96. package/lib/module/reanimated2/fabricUtils.js +4 -4
  97. package/lib/module/reanimated2/fabricUtils.js.map +1 -1
  98. package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
  99. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +2 -2
  100. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
  101. package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
  102. package/lib/module/reanimated2/frameCallback/index.js.map +1 -1
  103. package/lib/module/reanimated2/globals.d.js.map +1 -1
  104. package/lib/module/reanimated2/helperTypes.js.map +1 -1
  105. package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
  106. package/lib/module/reanimated2/hook/index.js.map +1 -1
  107. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +1 -0
  108. package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
  109. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +3 -4
  110. package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
  111. package/lib/module/reanimated2/hook/useAnimatedProps.js.map +1 -1
  112. package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -0
  113. package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
  114. package/lib/module/reanimated2/hook/useAnimatedRef.js +1 -1
  115. package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
  116. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +3 -1
  117. package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
  118. package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
  119. package/lib/module/reanimated2/hook/useAnimatedStyle.js +3 -6
  120. package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
  121. package/lib/module/reanimated2/hook/useDerivedValue.js +3 -1
  122. package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
  123. package/lib/module/reanimated2/hook/useEvent.js +4 -5
  124. package/lib/module/reanimated2/hook/useEvent.js.map +1 -1
  125. package/lib/module/reanimated2/hook/useFrameCallback.js +1 -2
  126. package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
  127. package/lib/module/reanimated2/hook/useHandler.js +3 -1
  128. package/lib/module/reanimated2/hook/useHandler.js.map +1 -1
  129. package/lib/module/reanimated2/hook/useReducedMotion.js.map +1 -1
  130. package/lib/module/reanimated2/hook/useScrollViewOffset.js +14 -6
  131. package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
  132. package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
  133. package/lib/module/reanimated2/hook/useWorkletCallback.js.map +1 -1
  134. package/lib/module/reanimated2/hook/utils.js.map +1 -1
  135. package/lib/module/reanimated2/index.js.map +1 -1
  136. package/lib/module/reanimated2/initializers.js +1 -5
  137. package/lib/module/reanimated2/initializers.js.map +1 -1
  138. package/lib/module/reanimated2/interpolateColor.js +2 -6
  139. package/lib/module/reanimated2/interpolateColor.js.map +1 -1
  140. package/lib/module/reanimated2/interpolation.js +1 -1
  141. package/lib/module/reanimated2/interpolation.js.map +1 -1
  142. package/lib/module/reanimated2/isSharedValue.js.map +1 -1
  143. package/lib/module/reanimated2/jestUtils.js +3 -6
  144. package/lib/module/reanimated2/jestUtils.js.map +1 -1
  145. package/lib/module/reanimated2/jestUtils.web.js.map +1 -1
  146. package/lib/module/reanimated2/js-reanimated/JSReanimated.js +4 -5
  147. package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
  148. package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -1
  149. package/lib/module/reanimated2/js-reanimated/index.js +2 -2
  150. package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
  151. package/lib/module/reanimated2/js-reanimated/react-native-web.d.js.map +1 -1
  152. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +4 -2
  153. package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
  154. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +8 -11
  155. package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
  156. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +8 -9
  157. package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
  158. package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
  159. package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
  160. package/lib/module/reanimated2/layoutReanimation/animationsManager.js +1 -2
  161. package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
  162. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +22 -22
  163. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
  164. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +22 -22
  165. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
  166. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +26 -26
  167. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
  168. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +10 -10
  169. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
  170. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +6 -6
  171. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
  172. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +10 -10
  173. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
  174. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +18 -18
  175. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
  176. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +18 -18
  177. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
  178. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +10 -10
  179. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
  180. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +34 -34
  181. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
  182. package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
  183. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +4 -4
  184. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
  185. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +4 -4
  186. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
  187. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +4 -4
  188. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
  189. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +4 -4
  190. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
  191. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +4 -4
  192. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
  193. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +4 -4
  194. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
  195. package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
  196. package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
  197. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js +4 -6
  198. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
  199. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js +4 -6
  200. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js.map +1 -1
  201. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.web.js.map +1 -1
  202. package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
  203. package/lib/module/reanimated2/layoutReanimation/web/animation/Bounce.web.js.map +1 -1
  204. package/lib/module/reanimated2/layoutReanimation/web/animation/Fade.web.js.map +1 -1
  205. package/lib/module/reanimated2/layoutReanimation/web/animation/Flip.web.js.map +1 -1
  206. package/lib/module/reanimated2/layoutReanimation/web/animation/Lightspeed.web.js.map +1 -1
  207. package/lib/module/reanimated2/layoutReanimation/web/animation/Pinwheel.web.js.map +1 -1
  208. package/lib/module/reanimated2/layoutReanimation/web/animation/Roll.web.js.map +1 -1
  209. package/lib/module/reanimated2/layoutReanimation/web/animation/Rotate.web.js.map +1 -1
  210. package/lib/module/reanimated2/layoutReanimation/web/animation/Slide.web.js.map +1 -1
  211. package/lib/module/reanimated2/layoutReanimation/web/animation/Stretch.web.js.map +1 -1
  212. package/lib/module/reanimated2/layoutReanimation/web/animation/Zoom.web.js.map +1 -1
  213. package/lib/module/reanimated2/layoutReanimation/web/animationParser.js +0 -2
  214. package/lib/module/reanimated2/layoutReanimation/web/animationParser.js.map +1 -1
  215. package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js +1 -2
  216. package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js.map +1 -1
  217. package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js +3 -1
  218. package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js.map +1 -1
  219. package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js +6 -7
  220. package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js.map +1 -1
  221. package/lib/module/reanimated2/layoutReanimation/web/config.js.map +1 -1
  222. package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js +2 -2
  223. package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js.map +1 -1
  224. package/lib/module/reanimated2/layoutReanimation/web/domUtils.js +4 -4
  225. package/lib/module/reanimated2/layoutReanimation/web/domUtils.js.map +1 -1
  226. package/lib/module/reanimated2/layoutReanimation/web/index.js.map +1 -1
  227. package/lib/module/reanimated2/layoutReanimation/web/transition/Fading.web.js.map +1 -1
  228. package/lib/module/reanimated2/layoutReanimation/web/transition/Linear.web.js.map +1 -1
  229. package/lib/module/reanimated2/layoutReanimation/web/transition/Sequenced.web.js.map +1 -1
  230. package/lib/module/reanimated2/mappers.js +2 -4
  231. package/lib/module/reanimated2/mappers.js.map +1 -1
  232. package/lib/module/reanimated2/mockedRequestAnimationFrame.js.map +1 -1
  233. package/lib/module/reanimated2/mutables.js +2 -4
  234. package/lib/module/reanimated2/mutables.js.map +1 -1
  235. package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
  236. package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
  237. package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -1
  238. package/lib/module/reanimated2/platform-specific/jsVersion.js +1 -1
  239. package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -1
  240. package/lib/module/reanimated2/platformFunctions/dispatchCommand.js +2 -4
  241. package/lib/module/reanimated2/platformFunctions/dispatchCommand.js.map +1 -1
  242. package/lib/module/reanimated2/platformFunctions/dispatchCommand.web.js.map +1 -1
  243. package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js +2 -2
  244. package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js.map +1 -1
  245. package/lib/module/reanimated2/platformFunctions/index.js.map +1 -1
  246. package/lib/module/reanimated2/platformFunctions/measure.js.map +1 -1
  247. package/lib/module/reanimated2/platformFunctions/measure.web.js.map +1 -1
  248. package/lib/module/reanimated2/platformFunctions/scrollTo.js.map +1 -1
  249. package/lib/module/reanimated2/platformFunctions/scrollTo.web.js +1 -1
  250. package/lib/module/reanimated2/platformFunctions/scrollTo.web.js.map +1 -1
  251. package/lib/module/reanimated2/platformFunctions/setGestureState.js.map +1 -1
  252. package/lib/module/reanimated2/platformFunctions/setGestureState.web.js.map +1 -1
  253. package/lib/module/reanimated2/platformFunctions/setNativeProps.js.map +1 -1
  254. package/lib/module/reanimated2/platformFunctions/setNativeProps.web.js.map +1 -1
  255. package/lib/module/reanimated2/pluginUtils.js.map +1 -1
  256. package/lib/module/reanimated2/publicGlobals.js.map +1 -1
  257. package/lib/module/reanimated2/runtimes.js +11 -19
  258. package/lib/module/reanimated2/runtimes.js.map +1 -1
  259. package/lib/module/reanimated2/screenTransition/RNScreensTurboModule.js.map +1 -1
  260. package/lib/module/reanimated2/screenTransition/animationManager.js.map +1 -1
  261. package/lib/module/reanimated2/screenTransition/commonTypes.js.map +1 -1
  262. package/lib/module/reanimated2/screenTransition/index.js.map +1 -1
  263. package/lib/module/reanimated2/screenTransition/presets.js.map +1 -1
  264. package/lib/module/reanimated2/screenTransition/styleUpdater.js.map +1 -1
  265. package/lib/module/reanimated2/screenTransition/swipeSimulator.js +1 -1
  266. package/lib/module/reanimated2/screenTransition/swipeSimulator.js.map +1 -1
  267. package/lib/module/reanimated2/shareableMappingCache.js.map +1 -1
  268. package/lib/module/reanimated2/shareables.js +2 -4
  269. package/lib/module/reanimated2/shareables.js.map +1 -1
  270. package/lib/module/reanimated2/threads.js +9 -34
  271. package/lib/module/reanimated2/threads.js.map +1 -1
  272. package/lib/module/reanimated2/valueSetter.js +1 -2
  273. package/lib/module/reanimated2/valueSetter.js.map +1 -1
  274. package/lib/module/reanimated2/valueUnpacker.js.map +1 -1
  275. package/lib/module/specs/NativeReanimatedModule.js.map +1 -1
  276. package/lib/typescript/reanimated2/WorkletEventHandler.d.ts +16 -9
  277. package/lib/typescript/reanimated2/component/LayoutAnimationConfig.d.ts +1 -1
  278. package/lib/typescript/reanimated2/component/PerformanceMonitor.d.ts +2 -1
  279. package/lib/typescript/reanimated2/hook/commonTypes.d.ts +5 -0
  280. package/lib/typescript/reanimated2/hook/useEvent.d.ts +2 -3
  281. package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
  282. package/package.json +18 -14
  283. package/plugin/build/plugin.js +7 -2
  284. package/src/createAnimatedComponent/PropsFilter.tsx +1 -1
  285. package/src/createAnimatedComponent/createAnimatedComponent.tsx +29 -33
  286. package/src/reanimated2/WorkletEventHandler.ts +98 -39
  287. package/src/reanimated2/animation/styleAnimation.ts +8 -6
  288. package/src/reanimated2/hook/commonTypes.ts +9 -0
  289. package/src/reanimated2/hook/useEvent.ts +4 -4
  290. package/src/reanimated2/hook/useScrollViewOffset.ts +21 -5
  291. package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -3
  292. package/src/reanimated2/layoutReanimation/web/animationsManager.ts +1 -1
  293. package/src/reanimated2/layoutReanimation/web/componentStyle.ts +3 -1
  294. package/src/reanimated2/layoutReanimation/web/componentUtils.ts +1 -1
  295. package/src/reanimated2/layoutReanimation/web/createAnimation.ts +2 -2
  296. package/src/reanimated2/platform-specific/jsVersion.ts +1 -1
  297. package/src/reanimated2/platformFunctions/getRelativeCoords.ts +2 -2
@@ -2,11 +2,11 @@
2
2
 
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import React from 'react';
8
8
  import { findNodeHandle, Platform } from 'react-native';
9
- import WorkletEventHandler from '../reanimated2/WorkletEventHandler';
9
+ import { WorkletEventHandler } from '../reanimated2/WorkletEventHandler';
10
10
  import '../reanimated2/layoutReanimation/animationsManager';
11
11
  import invariant from 'invariant';
12
12
  import { adaptViewConfig } from '../ConfigHelper';
@@ -42,11 +42,15 @@ function onlyAnimatedStyles(styles) {
42
42
  * @param component - The component you want to make animatable.
43
43
  * @returns A component that Reanimated is capable of animating.
44
44
  * @see https://docs.swmansion.com/react-native-reanimated/docs/core/createAnimatedComponent
45
- */ // Don't change the order of overloads, since such a change breaks current behavior
45
+ */
46
+
47
+ // Don't change the order of overloads, since such a change breaks current behavior
48
+
46
49
  /**
47
50
  * @deprecated Please use `Animated.FlatList` component instead of calling `Animated.createAnimatedComponent(FlatList)` manually.
48
51
  */
49
52
  // @ts-ignore This is required to create this overload, since type of createAnimatedComponent is incorrect and doesn't include typeof FlatList
53
+
50
54
  export function createAnimatedComponent(Component, options) {
51
55
  invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, `Looks like you're passing a function component \`${Component.name}\` to \`createAnimatedComponent\` function which supports only class components. Please wrap your function component with \`React.forwardRef()\` or use a class component instead.`);
52
56
  class AnimatedComponent extends React.Component {
@@ -105,6 +109,7 @@ export function createAnimatedComponent(Component, options) {
105
109
  }
106
110
  }
107
111
  componentDidMount() {
112
+ this._viewTag = this._getViewInfo().viewTag;
108
113
  this._attachNativeEvents();
109
114
  this._jsPropsUpdater.addOnJSPropsChangeListener(this);
110
115
  this._attachAnimatedStyles();
@@ -134,9 +139,9 @@ export function createAnimatedComponent(Component, options) {
134
139
  if (this.props.sharedTransitionTag) {
135
140
  this._configureSharedTransition(true);
136
141
  }
137
- (_this$_sharedElementT = this._sharedElementTransition) === null || _this$_sharedElementT === void 0 ? void 0 : _this$_sharedElementT.unregisterTransition(this._viewTag, true);
142
+ (_this$_sharedElementT = this._sharedElementTransition) === null || _this$_sharedElementT === void 0 || _this$_sharedElementT.unregisterTransition(this._viewTag, true);
138
143
  const exiting = this.props.exiting;
139
- if (IS_WEB && this.props.exiting && !getReducedMotionFromConfig(this.props.exiting)) {
144
+ if (IS_WEB && this._component && this.props.exiting && !getReducedMotionFromConfig(this.props.exiting)) {
140
145
  addHTMLMutationObserver();
141
146
  startWebLayoutAnimation(this.props, this._component, LayoutAnimationType.EXITING);
142
147
  } else if (exiting) {
@@ -154,16 +159,10 @@ export function createAnimatedComponent(Component, options) {
154
159
  return (_this$_component = this._component) !== null && _this$_component !== void 0 && _this$_component.getScrollableNode ? (_getScrollableNode = (_ref = this._component).getScrollableNode) === null || _getScrollableNode === void 0 ? void 0 : _getScrollableNode.call(_ref) : this._component;
155
160
  }
156
161
  _attachNativeEvents() {
157
- const node = this._getEventViewRef();
158
- let viewTag = null; // We set it only if needed
159
-
160
162
  for (const key in this.props) {
161
163
  const prop = this.props[key];
162
164
  if (has('workletEventHandler', prop) && prop.workletEventHandler instanceof WorkletEventHandler) {
163
- if (viewTag === null) {
164
- viewTag = IS_WEB ? this._component : findNodeHandle(options !== null && options !== void 0 && options.setNativeProps ? this : node);
165
- }
166
- prop.workletEventHandler.registerForEvents(viewTag, key);
165
+ prop.workletEventHandler.registerForEvents(this._viewTag, key);
167
166
  }
168
167
  }
169
168
  }
@@ -171,7 +170,7 @@ export function createAnimatedComponent(Component, options) {
171
170
  for (const key in this.props) {
172
171
  const prop = this.props[key];
173
172
  if (has('workletEventHandler', prop) && prop.workletEventHandler instanceof WorkletEventHandler) {
174
- prop.workletEventHandler.unregisterFromEvents();
173
+ prop.workletEventHandler.unregisterFromEvents(this._viewTag);
175
174
  }
176
175
  }
177
176
  }
@@ -193,23 +192,26 @@ export function createAnimatedComponent(Component, options) {
193
192
  }
194
193
  }
195
194
  }
196
- _reattachNativeEvents(prevProps) {
195
+ _updateNativeEvents(prevProps) {
197
196
  for (const key in prevProps) {
198
- const prop = this.props[key];
199
- if (has('workletEventHandler', prop) && prop.workletEventHandler instanceof WorkletEventHandler && prop.workletEventHandler.reattachNeeded) {
200
- prop.workletEventHandler.unregisterFromEvents();
197
+ const prevProp = prevProps[key];
198
+ if (has('workletEventHandler', prevProp) && prevProp.workletEventHandler instanceof WorkletEventHandler) {
199
+ const newProp = this.props[key];
200
+ if (!newProp) {
201
+ // Prop got deleted
202
+ prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);
203
+ } else if (has('workletEventHandler', newProp) && newProp.workletEventHandler instanceof WorkletEventHandler && newProp.workletEventHandler !== prevProp.workletEventHandler) {
204
+ // Prop got changed
205
+ prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);
206
+ newProp.workletEventHandler.registerForEvents(this._viewTag);
207
+ }
201
208
  }
202
209
  }
203
- let viewTag = null;
204
210
  for (const key in this.props) {
205
- const prop = this.props[key];
206
- if (has('workletEventHandler', prop) && prop.workletEventHandler instanceof WorkletEventHandler && prop.workletEventHandler.reattachNeeded) {
207
- if (viewTag === null) {
208
- const node = this._getEventViewRef();
209
- viewTag = IS_WEB ? this._component : findNodeHandle(options !== null && options !== void 0 && options.setNativeProps ? this : node);
210
- }
211
- prop.workletEventHandler.registerForEvents(viewTag, key);
212
- prop.workletEventHandler.reattachNeeded = false;
211
+ const newProp = this.props[key];
212
+ if (has('workletEventHandler', newProp) && newProp.workletEventHandler instanceof WorkletEventHandler && !prevProps[key]) {
213
+ // Prop got added
214
+ newProp.workletEventHandler.registerForEvents(this._viewTag);
213
215
  }
214
216
  }
215
217
  }
@@ -218,7 +220,7 @@ export function createAnimatedComponent(Component, options) {
218
220
  options.setNativeProps(this._component, props);
219
221
  } else {
220
222
  var _this$_component2, _this$_component2$set;
221
- (_this$_component2 = this._component) === null || _this$_component2 === void 0 ? void 0 : (_this$_component2$set = _this$_component2.setNativeProps) === null || _this$_component2$set === void 0 ? void 0 : _this$_component2$set.call(_this$_component2, props);
223
+ (_this$_component2 = this._component) === null || _this$_component2 === void 0 || (_this$_component2$set = _this$_component2.setNativeProps) === null || _this$_component2$set === void 0 || _this$_component2$set.call(_this$_component2, props);
222
224
  }
223
225
  }
224
226
  _getViewInfo() {
@@ -342,7 +344,7 @@ export function createAnimatedComponent(Component, options) {
342
344
  if (this.props.sharedTransitionTag !== undefined || prevProps.sharedTransitionTag !== undefined) {
343
345
  this._configureSharedTransition();
344
346
  }
345
- this._reattachNativeEvents(prevProps);
347
+ this._updateNativeEvents(prevProps);
346
348
  this._attachAnimatedStyles();
347
349
  this._InlinePropManager.attachInlineProps(this, this._getViewInfo());
348
350
  if (IS_WEB && this.props.exiting) {
@@ -358,8 +360,7 @@ export function createAnimatedComponent(Component, options) {
358
360
  const layout = this.props.layout ? maybeBuild(this.props.layout, undefined /* We don't have to warn user if style has common properties with animation for LAYOUT */, AnimatedComponent.displayName) : undefined;
359
361
  updateLayoutAnimations(this._viewTag, LayoutAnimationType.LAYOUT, layout);
360
362
  }
361
- _configureSharedTransition() {
362
- let isUnmounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
363
+ _configureSharedTransition(isUnmounting = false) {
363
364
  if (IS_WEB) {
364
365
  return;
365
366
  }
@@ -368,7 +369,7 @@ export function createAnimatedComponent(Component, options) {
368
369
  } = this.props;
369
370
  if (!sharedTransitionTag) {
370
371
  var _this$_sharedElementT2;
371
- (_this$_sharedElementT2 = this._sharedElementTransition) === null || _this$_sharedElementT2 === void 0 ? void 0 : _this$_sharedElementT2.unregisterTransition(this._viewTag, isUnmounting);
372
+ (_this$_sharedElementT2 = this._sharedElementTransition) === null || _this$_sharedElementT2 === void 0 || _this$_sharedElementT2.unregisterTransition(this._viewTag, isUnmounting);
372
373
  this._sharedElementTransition = null;
373
374
  return;
374
375
  }
@@ -402,7 +403,6 @@ export function createAnimatedComponent(Component, options) {
402
403
  visibility: 'hidden' // Hide component until `componentDidMount` triggers
403
404
  };
404
405
  }
405
-
406
406
  const platformProps = Platform.select({
407
407
  web: {},
408
408
  default: {
@@ -1 +1 @@
1
- {"version":3,"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","obj","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","React","findNodeHandle","Platform","WorkletEventHandler","invariant","adaptViewConfig","RNRenderer","enableLayoutAnimations","SharedTransition","LayoutAnimationType","getShadowNodeWrapperFromRef","removeFromPropsRegistry","getReduceMotionFromConfig","maybeBuild","SkipEnteringContext","JSPropsUpdater","has","flattenArray","setAndForwardRef","isFabric","isJest","isWeb","shouldBeUseWeb","InlinePropManager","PropsFilter","startWebLayoutAnimation","tryActivateLayoutTransition","configureWebLayoutAnimations","getReducedMotionFromConfig","saveSnapshot","updateLayoutAnimations","addHTMLMutationObserver","getViewInfo","IS_WEB","onlyAnimatedStyles","styles","filter","style","viewDescriptors","createAnimatedComponent","Component","options","isReactComponent","name","AnimatedComponent","constructor","props","getForwardedRef","forwardedRef","setLocalRef","ref","tag","_viewTag","layout","entering","exiting","sharedTransitionTag","_this$context","_configureSharedTransition","skipEntering","context","current","_this$props","ENTERING","displayName","_component","jestAnimatedStyle","componentDidMount","_attachNativeEvents","_jsPropsUpdater","addOnJSPropsChangeListener","_attachAnimatedStyles","_InlinePropManager","attachInlineProps","_getViewInfo","_configureLayoutTransition","_isFirstRender","componentWillUnmount","_this$_sharedElementT","_detachNativeEvents","removeOnJSPropsChangeListener","_detachStyles","detachInlineProps","_sharedElementTransition","unregisterTransition","EXITING","reduceMotionInExiting","getReduceMotion","_this$props2","_getEventViewRef","_this$_component","_getScrollableNode","_ref","getScrollableNode","node","viewTag","prop","workletEventHandler","setNativeProps","registerForEvents","unregisterFromEvents","_styles","viewsRef","remove","_this$props$animatedP","animatedProps","_reattachNativeEvents","prevProps","reattachNeeded","_updateFromNative","_this$_component2","_this$_component2$set","_this$_component3","_getAnimatableRef","_ref2","_viewInfo","viewName","shadowNodeWrapper","viewConfig","component","getAnimatableRef","hostInstance","findHostInstance_DEPRECATED","Error","viewInfo","_this$props$animatedP2","_this$props$animatedP3","prevStyles","prevAnimatedProps","_animatedProps","hasReanimated2Props","hasOneSameStyle","prevStyle","isPresent","some","forEach","add","initial","componentDidUpdate","_prevState","snapshot","oldLayout","LAYOUT","isUnmounting","_this$_sharedElementT2","sharedElementTransition","sharedTransitionStyle","registerTransition","getSnapshotBeforeUpdate","_this$_component4","getBoundingClientRect","render","filteredProps","_PropsFilter","filterNonAnimatedProps","visibility","platformProps","select","web","default","collapsable","createElement","_setComponentRef","forwardRef"],"sources":["createAnimatedComponent.tsx"],"sourcesContent":["'use strict';\nimport type {\n Component,\n ComponentClass,\n ComponentType,\n FunctionComponent,\n MutableRefObject,\n} from 'react';\nimport React from 'react';\nimport { findNodeHandle, Platform } from 'react-native';\nimport WorkletEventHandler from '../reanimated2/WorkletEventHandler';\nimport '../reanimated2/layoutReanimation/animationsManager';\nimport invariant from 'invariant';\nimport { adaptViewConfig } from '../ConfigHelper';\nimport { RNRenderer } from '../reanimated2/platform-specific/RNRenderer';\nimport { enableLayoutAnimations } from '../reanimated2/core';\nimport {\n SharedTransition,\n LayoutAnimationType,\n} from '../reanimated2/layoutReanimation';\nimport type { StyleProps, ShadowNodeWrapper } from '../reanimated2/commonTypes';\nimport { getShadowNodeWrapperFromRef } from '../reanimated2/fabricUtils';\nimport { removeFromPropsRegistry } from '../reanimated2/PropsRegistry';\nimport { getReduceMotionFromConfig } from '../reanimated2/animation/util';\nimport { maybeBuild } from '../animationBuilder';\nimport { SkipEnteringContext } from '../reanimated2/component/LayoutAnimationConfig';\nimport type { AnimateProps } from '../reanimated2';\nimport JSPropsUpdater from './JSPropsUpdater';\nimport type {\n AnimatedComponentProps,\n AnimatedProps,\n InitialComponentProps,\n AnimatedComponentRef,\n IAnimatedComponentInternal,\n ViewInfo,\n} from './commonTypes';\nimport { has, flattenArray } from './utils';\nimport setAndForwardRef from './setAndForwardRef';\nimport {\n isFabric,\n isJest,\n isWeb,\n shouldBeUseWeb,\n} from '../reanimated2/PlatformChecker';\nimport { InlinePropManager } from './InlinePropManager';\nimport { PropsFilter } from './PropsFilter';\nimport {\n startWebLayoutAnimation,\n tryActivateLayoutTransition,\n configureWebLayoutAnimations,\n getReducedMotionFromConfig,\n saveSnapshot,\n} from '../reanimated2/layoutReanimation/web';\nimport { updateLayoutAnimations } from '../reanimated2/UpdateLayoutAnimations';\nimport type { CustomConfig } from '../reanimated2/layoutReanimation/web/config';\nimport type { FlatList, FlatListProps } from 'react-native';\nimport { addHTMLMutationObserver } from '../reanimated2/layoutReanimation/web/domUtils';\nimport { getViewInfo } from './getViewInfo';\n\nconst IS_WEB = isWeb();\n\nif (IS_WEB) {\n configureWebLayoutAnimations();\n}\n\nfunction onlyAnimatedStyles(styles: StyleProps[]): StyleProps[] {\n return styles.filter((style) => style?.viewDescriptors);\n}\n\ntype Options<P> = {\n setNativeProps: (ref: AnimatedComponentRef, props: P) => void;\n};\n\n/**\n * Lets you create an Animated version of any React Native component.\n *\n * @param component - The component you want to make animatable.\n * @returns A component that Reanimated is capable of animating.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/createAnimatedComponent\n */\n\n// Don't change the order of overloads, since such a change breaks current behavior\nexport function createAnimatedComponent<P extends object>(\n component: FunctionComponent<P>,\n options?: Options<P>\n): FunctionComponent<AnimateProps<P>>;\n\nexport function createAnimatedComponent<P extends object>(\n component: ComponentClass<P>,\n options?: Options<P>\n): ComponentClass<AnimateProps<P>>;\n\nexport function createAnimatedComponent<P extends object>(\n // Actually ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P> but we need this overload too\n // since some external components (like FastImage) are typed just as ComponentType\n component: ComponentType<P>,\n options?: Options<P>\n): FunctionComponent<AnimateProps<P>> | ComponentClass<AnimateProps<P>>;\n\n/**\n * @deprecated Please use `Animated.FlatList` component instead of calling `Animated.createAnimatedComponent(FlatList)` manually.\n */\n// @ts-ignore This is required to create this overload, since type of createAnimatedComponent is incorrect and doesn't include typeof FlatList\nexport function createAnimatedComponent(\n component: typeof FlatList<unknown>,\n options?: Options<any>\n): ComponentClass<AnimateProps<FlatListProps<unknown>>>;\n\nexport function createAnimatedComponent(\n Component: ComponentType<InitialComponentProps>,\n options?: Options<InitialComponentProps>\n): any {\n invariant(\n typeof Component !== 'function' ||\n (Component.prototype && Component.prototype.isReactComponent),\n `Looks like you're passing a function component \\`${Component.name}\\` to \\`createAnimatedComponent\\` function which supports only class components. Please wrap your function component with \\`React.forwardRef()\\` or use a class component instead.`\n );\n\n class AnimatedComponent\n extends React.Component<AnimatedComponentProps<InitialComponentProps>>\n implements IAnimatedComponentInternal\n {\n _styles: StyleProps[] | null = null;\n _animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n _viewTag = -1;\n _isFirstRender = true;\n jestAnimatedStyle: { value: StyleProps } = { value: {} };\n _component: AnimatedComponentRef | HTMLElement | null = null;\n _sharedElementTransition: SharedTransition | null = null;\n _jsPropsUpdater = new JSPropsUpdater();\n _InlinePropManager = new InlinePropManager();\n _PropsFilter = new PropsFilter();\n _viewInfo?: ViewInfo;\n static displayName: string;\n static contextType = SkipEnteringContext;\n context!: React.ContextType<typeof SkipEnteringContext>;\n\n constructor(props: AnimatedComponentProps<InitialComponentProps>) {\n super(props);\n if (isJest()) {\n this.jestAnimatedStyle = { value: {} };\n }\n }\n\n componentDidMount() {\n this._attachNativeEvents();\n this._jsPropsUpdater.addOnJSPropsChangeListener(this);\n this._attachAnimatedStyles();\n this._InlinePropManager.attachInlineProps(this, this._getViewInfo());\n\n const layout = this.props.layout;\n if (layout) {\n this._configureLayoutTransition();\n }\n\n if (IS_WEB) {\n if (this.props.exiting) {\n saveSnapshot(this._component as HTMLElement);\n }\n\n if (\n !this.props.entering ||\n getReducedMotionFromConfig(this.props.entering as CustomConfig)\n ) {\n this._isFirstRender = false;\n return;\n }\n\n startWebLayoutAnimation(\n this.props,\n this._component as HTMLElement,\n LayoutAnimationType.ENTERING\n );\n }\n\n this._isFirstRender = false;\n }\n\n componentWillUnmount() {\n this._detachNativeEvents();\n this._jsPropsUpdater.removeOnJSPropsChangeListener(this);\n this._detachStyles();\n this._InlinePropManager.detachInlineProps();\n if (this.props.sharedTransitionTag) {\n this._configureSharedTransition(true);\n }\n this._sharedElementTransition?.unregisterTransition(this._viewTag, true);\n\n const exiting = this.props.exiting;\n if (\n IS_WEB &&\n this.props.exiting &&\n !getReducedMotionFromConfig(this.props.exiting as CustomConfig)\n ) {\n addHTMLMutationObserver();\n\n startWebLayoutAnimation(\n this.props,\n this._component as HTMLElement,\n LayoutAnimationType.EXITING\n );\n } else if (exiting) {\n const reduceMotionInExiting =\n 'getReduceMotion' in exiting &&\n typeof exiting.getReduceMotion === 'function'\n ? getReduceMotionFromConfig(exiting.getReduceMotion())\n : getReduceMotionFromConfig();\n if (!reduceMotionInExiting) {\n updateLayoutAnimations(\n this._viewTag,\n LayoutAnimationType.EXITING,\n maybeBuild(\n exiting,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n }\n }\n\n _getEventViewRef() {\n // Make sure to get the scrollable node for components that implement\n // `ScrollResponder.Mixin`.\n return (this._component as AnimatedComponentRef)?.getScrollableNode\n ? (this._component as AnimatedComponentRef).getScrollableNode?.()\n : this._component;\n }\n\n _attachNativeEvents() {\n const node = this._getEventViewRef() as AnimatedComponentRef;\n let viewTag = null; // We set it only if needed\n\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler\n ) {\n if (viewTag === null) {\n viewTag = IS_WEB\n ? this._component\n : findNodeHandle(options?.setNativeProps ? this : node);\n }\n prop.workletEventHandler.registerForEvents(viewTag as number, key);\n }\n }\n }\n\n _detachNativeEvents() {\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler\n ) {\n prop.workletEventHandler.unregisterFromEvents();\n }\n }\n }\n\n _detachStyles() {\n if (IS_WEB && this._styles !== null) {\n for (const style of this._styles) {\n style.viewsRef.remove(this);\n }\n } else if (this._viewTag !== -1 && this._styles !== null) {\n for (const style of this._styles) {\n style.viewDescriptors.remove(this._viewTag);\n }\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.remove(this._viewTag);\n }\n if (isFabric()) {\n removeFromPropsRegistry(this._viewTag);\n }\n }\n }\n\n _reattachNativeEvents(\n prevProps: AnimatedComponentProps<InitialComponentProps>\n ) {\n for (const key in prevProps) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler &&\n prop.workletEventHandler.reattachNeeded\n ) {\n prop.workletEventHandler.unregisterFromEvents();\n }\n }\n\n let viewTag = null;\n\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler &&\n prop.workletEventHandler.reattachNeeded\n ) {\n if (viewTag === null) {\n const node = this._getEventViewRef() as AnimatedComponentRef;\n\n viewTag = IS_WEB\n ? this._component\n : findNodeHandle(options?.setNativeProps ? this : node);\n }\n prop.workletEventHandler.registerForEvents(viewTag as number, key);\n prop.workletEventHandler.reattachNeeded = false;\n }\n }\n }\n\n _updateFromNative(props: StyleProps) {\n if (options?.setNativeProps) {\n options.setNativeProps(this._component as AnimatedComponentRef, props);\n } else {\n (this._component as AnimatedComponentRef)?.setNativeProps?.(props);\n }\n }\n\n _getViewInfo(): ViewInfo {\n if (this._viewInfo !== undefined) {\n return this._viewInfo;\n }\n\n let viewTag: number | HTMLElement | null;\n let viewName: string | null;\n let shadowNodeWrapper: ShadowNodeWrapper | null = null;\n let viewConfig;\n // Component can specify ref which should be animated when animated version of the component is created.\n // Otherwise, we animate the component itself.\n const component = (this._component as AnimatedComponentRef)\n ?.getAnimatableRef\n ? (this._component as AnimatedComponentRef).getAnimatableRef?.()\n : this;\n\n if (IS_WEB) {\n // At this point I assume that `_setComponentRef` was already called and `_component` is set.\n // `this._component` on web represents HTMLElement of our component, that's why we use casting\n viewTag = this._component as HTMLElement;\n viewName = null;\n shadowNodeWrapper = null;\n viewConfig = null;\n } else {\n // hostInstance can be null for a component that doesn't render anything (render function returns null). Example: svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx\n const hostInstance = RNRenderer.findHostInstance_DEPRECATED(component);\n if (!hostInstance) {\n throw new Error(\n '[Reanimated] Cannot find host instance for this component. Maybe it renders nothing?'\n );\n }\n\n const viewInfo = getViewInfo(hostInstance);\n viewTag = viewInfo.viewTag;\n viewName = viewInfo.viewName;\n viewConfig = viewInfo.viewConfig;\n shadowNodeWrapper = isFabric()\n ? getShadowNodeWrapperFromRef(this)\n : null;\n }\n this._viewInfo = { viewTag, viewName, shadowNodeWrapper, viewConfig };\n return this._viewInfo;\n }\n\n _attachAnimatedStyles() {\n const styles = this.props.style\n ? onlyAnimatedStyles(flattenArray<StyleProps>(this.props.style))\n : [];\n const prevStyles = this._styles;\n this._styles = styles;\n\n const prevAnimatedProps = this._animatedProps;\n this._animatedProps = this.props.animatedProps;\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } =\n this._getViewInfo();\n\n // update UI props whitelist for this view\n const hasReanimated2Props =\n this.props.animatedProps?.viewDescriptors || styles.length;\n if (hasReanimated2Props && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._viewTag = viewTag as number;\n\n // remove old styles\n if (prevStyles) {\n // in most of the cases, views have only a single animated style and it remains unchanged\n const hasOneSameStyle =\n styles.length === 1 &&\n prevStyles.length === 1 &&\n styles[0] === prevStyles[0];\n\n if (!hasOneSameStyle) {\n // otherwise, remove each style that is not present in new styles\n for (const prevStyle of prevStyles) {\n const isPresent = styles.some((style) => style === prevStyle);\n if (!isPresent) {\n prevStyle.viewDescriptors.remove(viewTag);\n }\n }\n }\n }\n\n styles.forEach((style) => {\n style.viewDescriptors.add({\n tag: viewTag,\n name: viewName,\n shadowNodeWrapper,\n });\n if (isJest()) {\n /**\n * We need to connect Jest's TestObject instance whose contains just props object\n * with the updateProps() function where we update the properties of the component.\n * We can't update props object directly because TestObject contains a copy of props - look at render function:\n * const props = this._filterNonAnimatedProps(this.props);\n */\n this.jestAnimatedStyle.value = {\n ...this.jestAnimatedStyle.value,\n ...style.initial.value,\n };\n style.jestAnimatedStyle.current = this.jestAnimatedStyle;\n }\n });\n\n // detach old animatedProps\n if (prevAnimatedProps && prevAnimatedProps !== this.props.animatedProps) {\n prevAnimatedProps.viewDescriptors!.remove(viewTag as number);\n }\n\n // attach animatedProps property\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.add({\n tag: viewTag as number,\n name: viewName!,\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n }\n\n componentDidUpdate(\n prevProps: AnimatedComponentProps<InitialComponentProps>,\n _prevState: Readonly<unknown>,\n // This type comes straight from React\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n snapshot: DOMRect | null\n ) {\n const layout = this.props.layout;\n const oldLayout = prevProps.layout;\n if (layout !== oldLayout) {\n this._configureLayoutTransition();\n }\n if (\n this.props.sharedTransitionTag !== undefined ||\n prevProps.sharedTransitionTag !== undefined\n ) {\n this._configureSharedTransition();\n }\n this._reattachNativeEvents(prevProps);\n this._attachAnimatedStyles();\n this._InlinePropManager.attachInlineProps(this, this._getViewInfo());\n\n if (IS_WEB && this.props.exiting) {\n saveSnapshot(this._component as HTMLElement);\n }\n\n // Snapshot won't be undefined because it comes from getSnapshotBeforeUpdate method\n if (\n IS_WEB &&\n snapshot !== null &&\n this.props.layout &&\n !getReducedMotionFromConfig(this.props.layout as CustomConfig)\n ) {\n tryActivateLayoutTransition(\n this.props,\n this._component as HTMLElement,\n snapshot\n );\n }\n }\n\n _configureLayoutTransition() {\n const layout = this.props.layout\n ? maybeBuild(\n this.props.layout,\n undefined /* We don't have to warn user if style has common properties with animation for LAYOUT */,\n AnimatedComponent.displayName\n )\n : undefined;\n updateLayoutAnimations(this._viewTag, LayoutAnimationType.LAYOUT, layout);\n }\n\n _configureSharedTransition(isUnmounting = false) {\n if (IS_WEB) {\n return;\n }\n const { sharedTransitionTag } = this.props;\n if (!sharedTransitionTag) {\n this._sharedElementTransition?.unregisterTransition(\n this._viewTag,\n isUnmounting\n );\n this._sharedElementTransition = null;\n return;\n }\n const sharedElementTransition =\n this.props.sharedTransitionStyle ??\n this._sharedElementTransition ??\n new SharedTransition();\n sharedElementTransition.registerTransition(\n this._viewTag,\n sharedTransitionTag,\n isUnmounting\n );\n this._sharedElementTransition = sharedElementTransition;\n }\n\n _setComponentRef = setAndForwardRef<Component | HTMLElement>({\n getForwardedRef: () =>\n this.props.forwardedRef as MutableRefObject<\n Component<Record<string, unknown>, Record<string, unknown>, unknown>\n >,\n setLocalRef: (ref) => {\n // TODO update config\n\n const tag = IS_WEB\n ? (ref as HTMLElement)\n : findNodeHandle(ref as Component);\n\n this._viewTag = tag as number;\n\n const { layout, entering, exiting, sharedTransitionTag } = this.props;\n if (\n (layout || entering || exiting || sharedTransitionTag) &&\n tag != null\n ) {\n if (!shouldBeUseWeb()) {\n enableLayoutAnimations(true, false);\n }\n\n if (sharedTransitionTag) {\n this._configureSharedTransition();\n }\n\n const skipEntering = this.context?.current;\n if (entering && !skipEntering) {\n updateLayoutAnimations(\n tag as number,\n LayoutAnimationType.ENTERING,\n maybeBuild(\n entering,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n }\n\n if (ref !== this._component) {\n this._component = ref;\n }\n },\n });\n\n // This is a component lifecycle method from React, therefore we are not calling it directly.\n // It is called before the component gets rerendered. This way we can access components' position before it changed\n // and later on, in componentDidUpdate, calculate translation for layout transition.\n getSnapshotBeforeUpdate() {\n if (\n IS_WEB &&\n (this._component as HTMLElement)?.getBoundingClientRect !== undefined\n ) {\n return (this._component as HTMLElement).getBoundingClientRect();\n }\n\n return null;\n }\n\n render() {\n const filteredProps = this._PropsFilter.filterNonAnimatedProps(this);\n\n if (isJest()) {\n filteredProps.jestAnimatedStyle = this.jestAnimatedStyle;\n }\n\n // Layout animations on web are set inside `componentDidMount` method, which is called after first render.\n // Because of that we can encounter a situation in which component is visible for a short amount of time, and later on animation triggers.\n // I've tested that on various browsers and devices and it did not happen to me. To be sure that it won't happen to someone else,\n // I've decided to hide component at first render. Its visibility is reset in `componentDidMount`.\n if (\n this._isFirstRender &&\n IS_WEB &&\n filteredProps.entering &&\n !getReducedMotionFromConfig(filteredProps.entering as CustomConfig)\n ) {\n filteredProps.style = {\n ...(filteredProps.style ?? {}),\n visibility: 'hidden', // Hide component until `componentDidMount` triggers\n };\n }\n\n const platformProps = Platform.select({\n web: {},\n default: { collapsable: false },\n });\n\n return (\n <Component\n {...filteredProps}\n // Casting is used here, because ref can be null - in that case it cannot be assigned to HTMLElement.\n // After spending some time trying to figure out what to do with this problem, we decided to leave it this way\n ref={this._setComponentRef as (ref: Component) => void}\n {...platformProps}\n />\n );\n }\n }\n\n AnimatedComponent.displayName = `AnimatedComponent(${\n Component.displayName || Component.name || 'Component'\n })`;\n\n return React.forwardRef<Component>((props, ref) => {\n return (\n <AnimatedComponent\n {...props}\n {...(ref === null ? null : { forwardedRef: ref })}\n />\n );\n });\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC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iBAAiB;MAC1D;;MAEA;MACA;MACA;MACA;MACA,IACE,IAAI,CAACU,cAAc,IACnB3C,MAAM,IACNuH,aAAa,CAAClG,QAAQ,IACtB,CAAC1B,0BAA0B,CAAC4H,aAAa,CAAClG,QAAQ,CAAiB,EACnE;QACAkG,aAAa,CAACnH,KAAK,GAAG;UACpB,IAAImH,aAAa,CAACnH,KAAK,IAAI,CAAC,CAAC,CAAC;UAC9BsH,UAAU,EAAE,QAAQ,CAAE;QACxB,CAAC;MACH;;MAEA,MAAMC,aAAa,GAAG1J,QAAQ,CAAC2J,MAAM,CAAC;QACpCC,GAAG,EAAE,CAAC,CAAC;QACPC,OAAO,EAAE;UAAEC,WAAW,EAAE;QAAM;MAChC,CAAC,CAAC;MAEF,oBACEhK,KAAA,CAAAiK,aAAA,CAACzH,SAAS,EAAA1E,QAAA,KACJ0L,aAAa;QACjB;QACA;QACAtG,GAAG,EAAE,IAAI,CAACgH;MAA6C,GACnDN,aAAa,EACjB;IAEN;EACF;EAAChL,eAAA,CAtfKgE,iBAAiB;EAAAhE,eAAA,CAAjBgE,iBAAiB,iBAgBA9B,mBAAmB;EAwe1C8B,iBAAiB,CAACoB,WAAW,GAAI,qBAC/BxB,SAAS,CAACwB,WAAW,IAAIxB,SAAS,CAACG,IAAI,IAAI,WAC5C,GAAE;EAEH,oBAAO3C,KAAK,CAACmK,UAAU,CAAY,CAACrH,KAAK,EAAEI,GAAG,KAAK;IACjD,oBACElD,KAAA,CAAAiK,aAAA,CAACrH,iBAAiB,EAAA9E,QAAA,KACZgF,KAAK,EACJI,GAAG,KAAK,IAAI,GAAG,IAAI,GAAG;MAAEF,YAAY,EAAEE;IAAI,CAAC,EAChD;EAEN,CAAC,CAAC;AACJ"}
1
+ {"version":3,"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","obj","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","t","_toPrimitive","r","e","Symbol","toPrimitive","TypeError","String","Number","React","findNodeHandle","Platform","WorkletEventHandler","invariant","adaptViewConfig","RNRenderer","enableLayoutAnimations","SharedTransition","LayoutAnimationType","getShadowNodeWrapperFromRef","removeFromPropsRegistry","getReduceMotionFromConfig","maybeBuild","SkipEnteringContext","JSPropsUpdater","has","flattenArray","setAndForwardRef","isFabric","isJest","isWeb","shouldBeUseWeb","InlinePropManager","PropsFilter","startWebLayoutAnimation","tryActivateLayoutTransition","configureWebLayoutAnimations","getReducedMotionFromConfig","saveSnapshot","updateLayoutAnimations","addHTMLMutationObserver","getViewInfo","IS_WEB","onlyAnimatedStyles","styles","filter","style","viewDescriptors","createAnimatedComponent","Component","options","isReactComponent","name","AnimatedComponent","constructor","props","getForwardedRef","forwardedRef","setLocalRef","ref","tag","_viewTag","layout","entering","exiting","sharedTransitionTag","_this$context","_configureSharedTransition","skipEntering","context","current","_this$props","ENTERING","displayName","_component","jestAnimatedStyle","componentDidMount","_getViewInfo","viewTag","_attachNativeEvents","_jsPropsUpdater","addOnJSPropsChangeListener","_attachAnimatedStyles","_InlinePropManager","attachInlineProps","_configureLayoutTransition","_isFirstRender","componentWillUnmount","_this$_sharedElementT","_detachNativeEvents","removeOnJSPropsChangeListener","_detachStyles","detachInlineProps","_sharedElementTransition","unregisterTransition","EXITING","reduceMotionInExiting","getReduceMotion","_this$props2","_getEventViewRef","_this$_component","_getScrollableNode","_ref","getScrollableNode","prop","workletEventHandler","registerForEvents","unregisterFromEvents","_styles","viewsRef","remove","_this$props$animatedP","animatedProps","_updateNativeEvents","prevProps","prevProp","newProp","_updateFromNative","setNativeProps","_this$_component2","_this$_component2$set","_this$_component3","_getAnimatableRef","_ref2","_viewInfo","undefined","viewName","shadowNodeWrapper","viewConfig","component","getAnimatableRef","hostInstance","findHostInstance_DEPRECATED","Error","viewInfo","_this$props$animatedP2","_this$props$animatedP3","prevStyles","prevAnimatedProps","_animatedProps","hasReanimated2Props","hasOneSameStyle","prevStyle","isPresent","some","forEach","add","initial","componentDidUpdate","_prevState","snapshot","oldLayout","LAYOUT","isUnmounting","_this$_sharedElementT2","sharedElementTransition","sharedTransitionStyle","registerTransition","getSnapshotBeforeUpdate","_this$_component4","getBoundingClientRect","render","filteredProps","_PropsFilter","filterNonAnimatedProps","visibility","platformProps","select","web","default","collapsable","createElement","_setComponentRef","forwardRef"],"sources":["createAnimatedComponent.tsx"],"sourcesContent":["'use strict';\nimport type {\n Component,\n ComponentClass,\n ComponentType,\n FunctionComponent,\n MutableRefObject,\n} from 'react';\nimport React from 'react';\nimport { findNodeHandle, Platform } from 'react-native';\nimport { WorkletEventHandler } from '../reanimated2/WorkletEventHandler';\nimport '../reanimated2/layoutReanimation/animationsManager';\nimport invariant from 'invariant';\nimport { adaptViewConfig } from '../ConfigHelper';\nimport { RNRenderer } from '../reanimated2/platform-specific/RNRenderer';\nimport { enableLayoutAnimations } from '../reanimated2/core';\nimport {\n SharedTransition,\n LayoutAnimationType,\n} from '../reanimated2/layoutReanimation';\nimport type { StyleProps, ShadowNodeWrapper } from '../reanimated2/commonTypes';\nimport { getShadowNodeWrapperFromRef } from '../reanimated2/fabricUtils';\nimport { removeFromPropsRegistry } from '../reanimated2/PropsRegistry';\nimport { getReduceMotionFromConfig } from '../reanimated2/animation/util';\nimport { maybeBuild } from '../animationBuilder';\nimport { SkipEnteringContext } from '../reanimated2/component/LayoutAnimationConfig';\nimport type { AnimateProps } from '../reanimated2';\nimport JSPropsUpdater from './JSPropsUpdater';\nimport type {\n AnimatedComponentProps,\n AnimatedProps,\n InitialComponentProps,\n AnimatedComponentRef,\n IAnimatedComponentInternal,\n ViewInfo,\n} from './commonTypes';\nimport { has, flattenArray } from './utils';\nimport setAndForwardRef from './setAndForwardRef';\nimport {\n isFabric,\n isJest,\n isWeb,\n shouldBeUseWeb,\n} from '../reanimated2/PlatformChecker';\nimport { InlinePropManager } from './InlinePropManager';\nimport { PropsFilter } from './PropsFilter';\nimport {\n startWebLayoutAnimation,\n tryActivateLayoutTransition,\n configureWebLayoutAnimations,\n getReducedMotionFromConfig,\n saveSnapshot,\n} from '../reanimated2/layoutReanimation/web';\nimport { updateLayoutAnimations } from '../reanimated2/UpdateLayoutAnimations';\nimport type { CustomConfig } from '../reanimated2/layoutReanimation/web/config';\nimport type { FlatList, FlatListProps } from 'react-native';\nimport { addHTMLMutationObserver } from '../reanimated2/layoutReanimation/web/domUtils';\nimport { getViewInfo } from './getViewInfo';\n\nconst IS_WEB = isWeb();\n\nif (IS_WEB) {\n configureWebLayoutAnimations();\n}\n\nfunction onlyAnimatedStyles(styles: StyleProps[]): StyleProps[] {\n return styles.filter((style) => style?.viewDescriptors);\n}\n\ntype Options<P> = {\n setNativeProps: (ref: AnimatedComponentRef, props: P) => void;\n};\n\n/**\n * Lets you create an Animated version of any React Native component.\n *\n * @param component - The component you want to make animatable.\n * @returns A component that Reanimated is capable of animating.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/createAnimatedComponent\n */\n\n// Don't change the order of overloads, since such a change breaks current behavior\nexport function createAnimatedComponent<P extends object>(\n component: FunctionComponent<P>,\n options?: Options<P>\n): FunctionComponent<AnimateProps<P>>;\n\nexport function createAnimatedComponent<P extends object>(\n component: ComponentClass<P>,\n options?: Options<P>\n): ComponentClass<AnimateProps<P>>;\n\nexport function createAnimatedComponent<P extends object>(\n // Actually ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P> but we need this overload too\n // since some external components (like FastImage) are typed just as ComponentType\n component: ComponentType<P>,\n options?: Options<P>\n): FunctionComponent<AnimateProps<P>> | ComponentClass<AnimateProps<P>>;\n\n/**\n * @deprecated Please use `Animated.FlatList` component instead of calling `Animated.createAnimatedComponent(FlatList)` manually.\n */\n// @ts-ignore This is required to create this overload, since type of createAnimatedComponent is incorrect and doesn't include typeof FlatList\nexport function createAnimatedComponent(\n component: typeof FlatList<unknown>,\n options?: Options<any>\n): ComponentClass<AnimateProps<FlatListProps<unknown>>>;\n\nexport function createAnimatedComponent(\n Component: ComponentType<InitialComponentProps>,\n options?: Options<InitialComponentProps>\n): any {\n invariant(\n typeof Component !== 'function' ||\n (Component.prototype && Component.prototype.isReactComponent),\n `Looks like you're passing a function component \\`${Component.name}\\` to \\`createAnimatedComponent\\` function which supports only class components. Please wrap your function component with \\`React.forwardRef()\\` or use a class component instead.`\n );\n\n class AnimatedComponent\n extends React.Component<AnimatedComponentProps<InitialComponentProps>>\n implements IAnimatedComponentInternal\n {\n _styles: StyleProps[] | null = null;\n _animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n _viewTag = -1;\n _isFirstRender = true;\n jestAnimatedStyle: { value: StyleProps } = { value: {} };\n _component: AnimatedComponentRef | HTMLElement | null = null;\n _sharedElementTransition: SharedTransition | null = null;\n _jsPropsUpdater = new JSPropsUpdater();\n _InlinePropManager = new InlinePropManager();\n _PropsFilter = new PropsFilter();\n _viewInfo?: ViewInfo;\n static displayName: string;\n static contextType = SkipEnteringContext;\n context!: React.ContextType<typeof SkipEnteringContext>;\n\n constructor(props: AnimatedComponentProps<InitialComponentProps>) {\n super(props);\n if (isJest()) {\n this.jestAnimatedStyle = { value: {} };\n }\n }\n\n componentDidMount() {\n this._viewTag = this._getViewInfo().viewTag as number;\n this._attachNativeEvents();\n this._jsPropsUpdater.addOnJSPropsChangeListener(this);\n this._attachAnimatedStyles();\n this._InlinePropManager.attachInlineProps(this, this._getViewInfo());\n\n const layout = this.props.layout;\n if (layout) {\n this._configureLayoutTransition();\n }\n\n if (IS_WEB) {\n if (this.props.exiting) {\n saveSnapshot(this._component as HTMLElement);\n }\n\n if (\n !this.props.entering ||\n getReducedMotionFromConfig(this.props.entering as CustomConfig)\n ) {\n this._isFirstRender = false;\n return;\n }\n\n startWebLayoutAnimation(\n this.props,\n this._component as HTMLElement,\n LayoutAnimationType.ENTERING\n );\n }\n\n this._isFirstRender = false;\n }\n\n componentWillUnmount() {\n this._detachNativeEvents();\n this._jsPropsUpdater.removeOnJSPropsChangeListener(this);\n this._detachStyles();\n this._InlinePropManager.detachInlineProps();\n if (this.props.sharedTransitionTag) {\n this._configureSharedTransition(true);\n }\n this._sharedElementTransition?.unregisterTransition(this._viewTag, true);\n\n const exiting = this.props.exiting;\n if (\n IS_WEB &&\n this._component &&\n this.props.exiting &&\n !getReducedMotionFromConfig(this.props.exiting as CustomConfig)\n ) {\n addHTMLMutationObserver();\n\n startWebLayoutAnimation(\n this.props,\n this._component as HTMLElement,\n LayoutAnimationType.EXITING\n );\n } else if (exiting) {\n const reduceMotionInExiting =\n 'getReduceMotion' in exiting &&\n typeof exiting.getReduceMotion === 'function'\n ? getReduceMotionFromConfig(exiting.getReduceMotion())\n : getReduceMotionFromConfig();\n if (!reduceMotionInExiting) {\n updateLayoutAnimations(\n this._viewTag,\n LayoutAnimationType.EXITING,\n maybeBuild(\n exiting,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n }\n }\n\n _getEventViewRef() {\n // Make sure to get the scrollable node for components that implement\n // `ScrollResponder.Mixin`.\n return (this._component as AnimatedComponentRef)?.getScrollableNode\n ? (this._component as AnimatedComponentRef).getScrollableNode?.()\n : this._component;\n }\n\n _attachNativeEvents() {\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler\n ) {\n prop.workletEventHandler.registerForEvents(this._viewTag, key);\n }\n }\n }\n\n _detachNativeEvents() {\n for (const key in this.props) {\n const prop = this.props[key];\n if (\n has('workletEventHandler', prop) &&\n prop.workletEventHandler instanceof WorkletEventHandler\n ) {\n prop.workletEventHandler.unregisterFromEvents(this._viewTag);\n }\n }\n }\n\n _detachStyles() {\n if (IS_WEB && this._styles !== null) {\n for (const style of this._styles) {\n style.viewsRef.remove(this);\n }\n } else if (this._viewTag !== -1 && this._styles !== null) {\n for (const style of this._styles) {\n style.viewDescriptors.remove(this._viewTag);\n }\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.remove(this._viewTag);\n }\n if (isFabric()) {\n removeFromPropsRegistry(this._viewTag);\n }\n }\n }\n\n _updateNativeEvents(\n prevProps: AnimatedComponentProps<InitialComponentProps>\n ) {\n for (const key in prevProps) {\n const prevProp = prevProps[key];\n if (\n has('workletEventHandler', prevProp) &&\n prevProp.workletEventHandler instanceof WorkletEventHandler\n ) {\n const newProp = this.props[key];\n if (!newProp) {\n // Prop got deleted\n prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);\n } else if (\n has('workletEventHandler', newProp) &&\n newProp.workletEventHandler instanceof WorkletEventHandler &&\n newProp.workletEventHandler !== prevProp.workletEventHandler\n ) {\n // Prop got changed\n prevProp.workletEventHandler.unregisterFromEvents(this._viewTag);\n newProp.workletEventHandler.registerForEvents(this._viewTag);\n }\n }\n }\n\n for (const key in this.props) {\n const newProp = this.props[key];\n if (\n has('workletEventHandler', newProp) &&\n newProp.workletEventHandler instanceof WorkletEventHandler &&\n !prevProps[key]\n ) {\n // Prop got added\n newProp.workletEventHandler.registerForEvents(this._viewTag);\n }\n }\n }\n\n _updateFromNative(props: StyleProps) {\n if (options?.setNativeProps) {\n options.setNativeProps(this._component as AnimatedComponentRef, props);\n } else {\n (this._component as AnimatedComponentRef)?.setNativeProps?.(props);\n }\n }\n\n _getViewInfo(): ViewInfo {\n if (this._viewInfo !== undefined) {\n return this._viewInfo;\n }\n\n let viewTag: number | HTMLElement | null;\n let viewName: string | null;\n let shadowNodeWrapper: ShadowNodeWrapper | null = null;\n let viewConfig;\n // Component can specify ref which should be animated when animated version of the component is created.\n // Otherwise, we animate the component itself.\n const component = (this._component as AnimatedComponentRef)\n ?.getAnimatableRef\n ? (this._component as AnimatedComponentRef).getAnimatableRef?.()\n : this;\n\n if (IS_WEB) {\n // At this point I assume that `_setComponentRef` was already called and `_component` is set.\n // `this._component` on web represents HTMLElement of our component, that's why we use casting\n viewTag = this._component as HTMLElement;\n viewName = null;\n shadowNodeWrapper = null;\n viewConfig = null;\n } else {\n // hostInstance can be null for a component that doesn't render anything (render function returns null). Example: svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx\n const hostInstance = RNRenderer.findHostInstance_DEPRECATED(component);\n if (!hostInstance) {\n throw new Error(\n '[Reanimated] Cannot find host instance for this component. Maybe it renders nothing?'\n );\n }\n\n const viewInfo = getViewInfo(hostInstance);\n viewTag = viewInfo.viewTag;\n viewName = viewInfo.viewName;\n viewConfig = viewInfo.viewConfig;\n shadowNodeWrapper = isFabric()\n ? getShadowNodeWrapperFromRef(this)\n : null;\n }\n this._viewInfo = { viewTag, viewName, shadowNodeWrapper, viewConfig };\n return this._viewInfo;\n }\n\n _attachAnimatedStyles() {\n const styles = this.props.style\n ? onlyAnimatedStyles(flattenArray<StyleProps>(this.props.style))\n : [];\n const prevStyles = this._styles;\n this._styles = styles;\n\n const prevAnimatedProps = this._animatedProps;\n this._animatedProps = this.props.animatedProps;\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } =\n this._getViewInfo();\n\n // update UI props whitelist for this view\n const hasReanimated2Props =\n this.props.animatedProps?.viewDescriptors || styles.length;\n if (hasReanimated2Props && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._viewTag = viewTag as number;\n\n // remove old styles\n if (prevStyles) {\n // in most of the cases, views have only a single animated style and it remains unchanged\n const hasOneSameStyle =\n styles.length === 1 &&\n prevStyles.length === 1 &&\n styles[0] === prevStyles[0];\n\n if (!hasOneSameStyle) {\n // otherwise, remove each style that is not present in new styles\n for (const prevStyle of prevStyles) {\n const isPresent = styles.some((style) => style === prevStyle);\n if (!isPresent) {\n prevStyle.viewDescriptors.remove(viewTag);\n }\n }\n }\n }\n\n styles.forEach((style) => {\n style.viewDescriptors.add({\n tag: viewTag,\n name: viewName,\n shadowNodeWrapper,\n });\n if (isJest()) {\n /**\n * We need to connect Jest's TestObject instance whose contains just props object\n * with the updateProps() function where we update the properties of the component.\n * We can't update props object directly because TestObject contains a copy of props - look at render function:\n * const props = this._filterNonAnimatedProps(this.props);\n */\n this.jestAnimatedStyle.value = {\n ...this.jestAnimatedStyle.value,\n ...style.initial.value,\n };\n style.jestAnimatedStyle.current = this.jestAnimatedStyle;\n }\n });\n\n // detach old animatedProps\n if (prevAnimatedProps && prevAnimatedProps !== this.props.animatedProps) {\n prevAnimatedProps.viewDescriptors!.remove(viewTag as number);\n }\n\n // attach animatedProps property\n if (this.props.animatedProps?.viewDescriptors) {\n this.props.animatedProps.viewDescriptors.add({\n tag: viewTag as number,\n name: viewName!,\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n }\n\n componentDidUpdate(\n prevProps: AnimatedComponentProps<InitialComponentProps>,\n _prevState: Readonly<unknown>,\n // This type comes straight from React\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n snapshot: DOMRect | null\n ) {\n const layout = this.props.layout;\n const oldLayout = prevProps.layout;\n if (layout !== oldLayout) {\n this._configureLayoutTransition();\n }\n if (\n this.props.sharedTransitionTag !== undefined ||\n prevProps.sharedTransitionTag !== undefined\n ) {\n this._configureSharedTransition();\n }\n this._updateNativeEvents(prevProps);\n this._attachAnimatedStyles();\n this._InlinePropManager.attachInlineProps(this, this._getViewInfo());\n\n if (IS_WEB && this.props.exiting) {\n saveSnapshot(this._component as HTMLElement);\n }\n\n // Snapshot won't be undefined because it comes from getSnapshotBeforeUpdate method\n if (\n IS_WEB &&\n snapshot !== null &&\n this.props.layout &&\n !getReducedMotionFromConfig(this.props.layout as CustomConfig)\n ) {\n tryActivateLayoutTransition(\n this.props,\n this._component as HTMLElement,\n snapshot\n );\n }\n }\n\n _configureLayoutTransition() {\n const layout = this.props.layout\n ? maybeBuild(\n this.props.layout,\n undefined /* We don't have to warn user if style has common properties with animation for LAYOUT */,\n AnimatedComponent.displayName\n )\n : undefined;\n updateLayoutAnimations(this._viewTag, LayoutAnimationType.LAYOUT, layout);\n }\n\n _configureSharedTransition(isUnmounting = false) {\n if (IS_WEB) {\n return;\n }\n const { sharedTransitionTag } = this.props;\n if (!sharedTransitionTag) {\n this._sharedElementTransition?.unregisterTransition(\n this._viewTag,\n isUnmounting\n );\n this._sharedElementTransition = null;\n return;\n }\n const sharedElementTransition =\n this.props.sharedTransitionStyle ??\n this._sharedElementTransition ??\n new SharedTransition();\n sharedElementTransition.registerTransition(\n this._viewTag,\n sharedTransitionTag,\n isUnmounting\n );\n this._sharedElementTransition = sharedElementTransition;\n }\n\n _setComponentRef = setAndForwardRef<Component | HTMLElement>({\n getForwardedRef: () =>\n this.props.forwardedRef as MutableRefObject<\n Component<Record<string, unknown>, Record<string, unknown>, unknown>\n >,\n setLocalRef: (ref) => {\n // TODO update config\n\n const tag = IS_WEB\n ? (ref as HTMLElement)\n : findNodeHandle(ref as Component);\n\n this._viewTag = tag as number;\n\n const { layout, entering, exiting, sharedTransitionTag } = this.props;\n if (\n (layout || entering || exiting || sharedTransitionTag) &&\n tag != null\n ) {\n if (!shouldBeUseWeb()) {\n enableLayoutAnimations(true, false);\n }\n\n if (sharedTransitionTag) {\n this._configureSharedTransition();\n }\n\n const skipEntering = this.context?.current;\n if (entering && !skipEntering) {\n updateLayoutAnimations(\n tag as number,\n LayoutAnimationType.ENTERING,\n maybeBuild(\n entering,\n this.props?.style,\n AnimatedComponent.displayName\n )\n );\n }\n }\n\n if (ref !== this._component) {\n this._component = ref;\n }\n },\n });\n\n // This is a component lifecycle method from React, therefore we are not calling it directly.\n // It is called before the component gets rerendered. This way we can access components' position before it changed\n // and later on, in componentDidUpdate, calculate translation for layout transition.\n getSnapshotBeforeUpdate() {\n if (\n IS_WEB &&\n (this._component as HTMLElement)?.getBoundingClientRect !== undefined\n ) {\n return (this._component as HTMLElement).getBoundingClientRect();\n }\n\n return null;\n }\n\n render() {\n const filteredProps = this._PropsFilter.filterNonAnimatedProps(this);\n\n if (isJest()) {\n filteredProps.jestAnimatedStyle = this.jestAnimatedStyle;\n }\n\n // Layout animations on web are set inside `componentDidMount` method, which is called after first render.\n // Because of that we can encounter a situation in which component is visible for a short amount of time, and later on animation triggers.\n // I've tested that on various browsers and devices and it did not happen to me. To be sure that it won't happen to someone else,\n // I've decided to hide component at first render. Its visibility is reset in `componentDidMount`.\n if (\n this._isFirstRender &&\n IS_WEB &&\n filteredProps.entering &&\n !getReducedMotionFromConfig(filteredProps.entering as CustomConfig)\n ) {\n filteredProps.style = {\n ...(filteredProps.style ?? {}),\n visibility: 'hidden', // Hide component until `componentDidMount` triggers\n };\n }\n\n const platformProps = Platform.select({\n web: {},\n default: { collapsable: false },\n });\n\n return (\n <Component\n {...filteredProps}\n // Casting is used here, because ref can be null - in that case it cannot be assigned to HTMLElement.\n // After spending some time trying to figure out what to do with this problem, we decided to leave it this way\n ref={this._setComponentRef as (ref: Component) => void}\n {...platformProps}\n />\n );\n }\n }\n\n AnimatedComponent.displayName = `AnimatedComponent(${\n Component.displayName || Component.name || 'Component'\n })`;\n\n return React.forwardRef<Component>((props, ref) => {\n return (\n <AnimatedComponent\n {...props}\n {...(ref === null ? null : { forwardedRef: ref })}\n />\n );\n });\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAAA,SAAAQ,gBAAAC,GAAA,EAAAN,GAAA,EAAAO,KAAA,IAAAP,GAAA,GAAAQ,cAAA,CAAAR,GAAA,OAAAA,GAAA,IAAAM,GAAA,IAAAd,MAAA,CAAAiB,cAAA,CAAAH,GAAA,EAAAN,GAAA,IAAAO,KAAA,EA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;QACAvG,GAAG,EAAE,IAAI,CAACiH;MAA6C,GACnDN,aAAa,CAClB,CAAC;IAEN;EACF;EAAC9K,eAAA,CAlfK6D,iBAAiB;EAAA7D,eAAA,CAAjB6D,iBAAiB,iBAgBA9B,mBAAmB;EAoe1C8B,iBAAiB,CAACoB,WAAW,GAAI,qBAC/BxB,SAAS,CAACwB,WAAW,IAAIxB,SAAS,CAACG,IAAI,IAAI,WAC5C,GAAE;EAEH,oBAAO3C,KAAK,CAACoK,UAAU,CAAY,CAACtH,KAAK,EAAEI,GAAG,KAAK;IACjD,oBACElD,KAAA,CAAAkK,aAAA,CAACtH,iBAAiB,EAAA3E,QAAA,KACZ6E,KAAK,EACJI,GAAG,KAAK,IAAI,GAAG,IAAI,GAAG;MAAEF,YAAY,EAAEE;IAAI,CAAC,CACjD,CAAC;EAEN,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -17,7 +17,7 @@ function getViewInfo73(element) {
17
17
  var _element$viewConfig;
18
18
  return {
19
19
  // we can access view tag in the same way it's accessed here https://github.com/facebook/react/blob/e3f4eb7272d4ca0ee49f27577156b57eeb07cf73/packages/react-native-renderer/src/ReactFabric.js#L146
20
- viewName: element === null || element === void 0 ? void 0 : (_element$viewConfig = element.viewConfig) === null || _element$viewConfig === void 0 ? void 0 : _element$viewConfig.uiViewClassName,
20
+ viewName: element === null || element === void 0 || (_element$viewConfig = element.viewConfig) === null || _element$viewConfig === void 0 ? void 0 : _element$viewConfig.uiViewClassName,
21
21
  /**
22
22
  * RN uses viewConfig for components for storing different properties of the component(example: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js#L24).
23
23
  * The name we're looking for is in the field named uiViewClassName.
@@ -29,7 +29,7 @@ function getViewInfo73(element) {
29
29
  function getViewInfoLatest(element) {
30
30
  var _element$_viewConfig;
31
31
  return {
32
- viewName: element === null || element === void 0 ? void 0 : (_element$_viewConfig = element._viewConfig) === null || _element$_viewConfig === void 0 ? void 0 : _element$_viewConfig.uiViewClassName,
32
+ viewName: element === null || element === void 0 || (_element$_viewConfig = element._viewConfig) === null || _element$_viewConfig === void 0 ? void 0 : _element$_viewConfig.uiViewClassName,
33
33
  viewTag: element === null || element === void 0 ? void 0 : element.__nativeTag,
34
34
  viewConfig: element === null || element === void 0 ? void 0 : element._viewConfig
35
35
  };
@@ -1 +1 @@
1
- {"version":3,"names":["getViewInfo","element","_nativeTag","undefined","__nativeTag","getViewInfo73","getViewInfoLatest","_element$viewConfig","viewName","viewConfig","uiViewClassName","viewTag","_element$_viewConfig","_viewConfig"],"sources":["getViewInfo.ts"],"sourcesContent":["'use strict';\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// This is a makeshift solution to handle both 0.73 and 0.74 versions of React Native.\n\nexport let getViewInfo = (element: any) => {\n if (element._nativeTag !== undefined && element.__nativeTag !== null) {\n getViewInfo = getViewInfo73;\n return getViewInfo73(element);\n } else if (\n element.__nativeTag !== undefined &&\n element.__nativeTag !== null\n ) {\n getViewInfo = getViewInfoLatest;\n return getViewInfoLatest(element);\n }\n return getViewInfo73(element);\n};\n\nfunction getViewInfo73(element: any) {\n return {\n // we can access view tag in the same way it's accessed here https://github.com/facebook/react/blob/e3f4eb7272d4ca0ee49f27577156b57eeb07cf73/packages/react-native-renderer/src/ReactFabric.js#L146\n viewName: element?.viewConfig?.uiViewClassName,\n /**\n * RN uses viewConfig for components for storing different properties of the component(example: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js#L24).\n * The name we're looking for is in the field named uiViewClassName.\n */\n viewTag: element?._nativeTag,\n viewConfig: element?.viewConfig,\n };\n}\n\nfunction getViewInfoLatest(element: any) {\n return {\n viewName: element?._viewConfig?.uiViewClassName,\n viewTag: element?.__nativeTag,\n viewConfig: element?._viewConfig,\n };\n}\n"],"mappings":"AAAA,YAAY;;AACZ;;AAEA;AAEA,OAAO,IAAIA,WAAW,GAAIC,OAAY,IAAK;EACzC,IAAIA,OAAO,CAACC,UAAU,KAAKC,SAAS,IAAIF,OAAO,CAACG,WAAW,KAAK,IAAI,EAAE;IACpEJ,WAAW,GAAGK,aAAa;IAC3B,OAAOA,aAAa,CAACJ,OAAO,CAAC;EAC/B,CAAC,MAAM,IACLA,OAAO,CAACG,WAAW,KAAKD,SAAS,IACjCF,OAAO,CAACG,WAAW,KAAK,IAAI,EAC5B;IACAJ,WAAW,GAAGM,iBAAiB;IAC/B,OAAOA,iBAAiB,CAACL,OAAO,CAAC;EACnC;EACA,OAAOI,aAAa,CAACJ,OAAO,CAAC;AAC/B,CAAC;AAED,SAASI,aAAaA,CAACJ,OAAY,EAAE;EAAA,IAAAM,mBAAA;EACnC,OAAO;IACL;IACAC,QAAQ,EAAEP,OAAO,aAAPA,OAAO,wBAAAM,mBAAA,GAAPN,OAAO,CAAEQ,UAAU,cAAAF,mBAAA,uBAAnBA,mBAAA,CAAqBG,eAAe;IAC9C;AACJ;AACA;AACA;IACIC,OAAO,EAAEV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;IAC5BO,UAAU,EAAER,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ;EACvB,CAAC;AACH;AAEA,SAASH,iBAAiBA,CAACL,OAAY,EAAE;EAAA,IAAAW,oBAAA;EACvC,OAAO;IACLJ,QAAQ,EAAEP,OAAO,aAAPA,OAAO,wBAAAW,oBAAA,GAAPX,OAAO,CAAEY,WAAW,cAAAD,oBAAA,uBAApBA,oBAAA,CAAsBF,eAAe;IAC/CC,OAAO,EAAEV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,WAAW;IAC7BK,UAAU,EAAER,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY;EACvB,CAAC;AACH"}
1
+ {"version":3,"names":["getViewInfo","element","_nativeTag","undefined","__nativeTag","getViewInfo73","getViewInfoLatest","_element$viewConfig","viewName","viewConfig","uiViewClassName","viewTag","_element$_viewConfig","_viewConfig"],"sources":["getViewInfo.ts"],"sourcesContent":["'use strict';\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// This is a makeshift solution to handle both 0.73 and 0.74 versions of React Native.\n\nexport let getViewInfo = (element: any) => {\n if (element._nativeTag !== undefined && element.__nativeTag !== null) {\n getViewInfo = getViewInfo73;\n return getViewInfo73(element);\n } else if (\n element.__nativeTag !== undefined &&\n element.__nativeTag !== null\n ) {\n getViewInfo = getViewInfoLatest;\n return getViewInfoLatest(element);\n }\n return getViewInfo73(element);\n};\n\nfunction getViewInfo73(element: any) {\n return {\n // we can access view tag in the same way it's accessed here https://github.com/facebook/react/blob/e3f4eb7272d4ca0ee49f27577156b57eeb07cf73/packages/react-native-renderer/src/ReactFabric.js#L146\n viewName: element?.viewConfig?.uiViewClassName,\n /**\n * RN uses viewConfig for components for storing different properties of the component(example: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js#L24).\n * The name we're looking for is in the field named uiViewClassName.\n */\n viewTag: element?._nativeTag,\n viewConfig: element?.viewConfig,\n };\n}\n\nfunction getViewInfoLatest(element: any) {\n return {\n viewName: element?._viewConfig?.uiViewClassName,\n viewTag: element?.__nativeTag,\n viewConfig: element?._viewConfig,\n };\n}\n"],"mappings":"AAAA,YAAY;;AACZ;;AAEA;AAEA,OAAO,IAAIA,WAAW,GAAIC,OAAY,IAAK;EACzC,IAAIA,OAAO,CAACC,UAAU,KAAKC,SAAS,IAAIF,OAAO,CAACG,WAAW,KAAK,IAAI,EAAE;IACpEJ,WAAW,GAAGK,aAAa;IAC3B,OAAOA,aAAa,CAACJ,OAAO,CAAC;EAC/B,CAAC,MAAM,IACLA,OAAO,CAACG,WAAW,KAAKD,SAAS,IACjCF,OAAO,CAACG,WAAW,KAAK,IAAI,EAC5B;IACAJ,WAAW,GAAGM,iBAAiB;IAC/B,OAAOA,iBAAiB,CAACL,OAAO,CAAC;EACnC;EACA,OAAOI,aAAa,CAACJ,OAAO,CAAC;AAC/B,CAAC;AAED,SAASI,aAAaA,CAACJ,OAAY,EAAE;EAAA,IAAAM,mBAAA;EACnC,OAAO;IACL;IACAC,QAAQ,EAAEP,OAAO,aAAPA,OAAO,gBAAAM,mBAAA,GAAPN,OAAO,CAAEQ,UAAU,cAAAF,mBAAA,uBAAnBA,mBAAA,CAAqBG,eAAe;IAC9C;AACJ;AACA;AACA;IACIC,OAAO,EAAEV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,UAAU;IAC5BO,UAAU,EAAER,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ;EACvB,CAAC;AACH;AAEA,SAASH,iBAAiBA,CAACL,OAAY,EAAE;EAAA,IAAAW,oBAAA;EACvC,OAAO;IACLJ,QAAQ,EAAEP,OAAO,aAAPA,OAAO,gBAAAW,oBAAA,GAAPX,OAAO,CAAEY,WAAW,cAAAD,oBAAA,uBAApBA,oBAAA,CAAsBF,eAAe;IAC/CC,OAAO,EAAEV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEG,WAAW;IAC7BK,UAAU,EAAER,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEY;EACvB,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createAnimatedComponent"],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport { createAnimatedComponent } from './createAnimatedComponent';\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,uBAAuB,QAAQ,2BAA2B"}
1
+ {"version":3,"names":["createAnimatedComponent"],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport { createAnimatedComponent } from './createAnimatedComponent';\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,uBAAuB,QAAQ,2BAA2B","ignoreList":[]}
@@ -35,11 +35,10 @@
35
35
  * module.exports = MyViewWithRef;
36
36
  */
37
37
  /* eslint-enable */
38
- function setAndForwardRef(_ref) {
39
- let {
40
- getForwardedRef,
41
- setLocalRef
42
- } = _ref;
38
+ function setAndForwardRef({
39
+ getForwardedRef,
40
+ setLocalRef
41
+ }) {
43
42
  return function forwardRef(ref) {
44
43
  const forwardedRef = getForwardedRef();
45
44
  setLocalRef(ref);
@@ -1 +1 @@
1
- {"version":3,"names":["setAndForwardRef","_ref","getForwardedRef","setLocalRef","forwardRef","ref","forwardedRef","current"],"sources":["setAndForwardRef.ts"],"sourcesContent":["'use strict';\n/**\n * imported from react-native\n */\n\nimport type { MutableRefObject } from 'react';\n\n/* eslint-disable */\n/**\n * This is a helper function for when a component needs to be able to forward a ref\n * to a child component, but still needs to have access to that component as part of\n * its implementation.\n *\n * Its main use case is in wrappers for native components.\n *\n * Usage:\n *\n * class MyView extends React.Component {\n * _nativeRef = null;\n *\n * _setNativeRef = setAndForwardRef({\n * getForwardedRef: () => this.props.forwardedRef,\n * setLocalRef: ref => {\n * this._nativeRef = ref;\n * },\n * });\n *\n * render() {\n * return <View ref={this._setNativeRef} />;\n * }\n * }\n *\n * const MyViewWithRef = React.forwardRef((props, ref) => (\n * <MyView {...props} forwardedRef={ref} />\n * ));\n *\n * module.exports = MyViewWithRef;\n */\n/* eslint-enable */\n\ntype ForwardedRef<T> = () => MutableRefObject<T> | ((ref: T) => void);\n\nfunction setAndForwardRef<T>({\n getForwardedRef,\n setLocalRef,\n}: {\n getForwardedRef: ForwardedRef<T>;\n setLocalRef: (ref: T) => void;\n}): (ref: T) => void {\n return function forwardRef(ref: T) {\n const forwardedRef = getForwardedRef();\n\n setLocalRef(ref);\n\n // Forward to user ref prop (if one has been specified)\n if (typeof forwardedRef === 'function') {\n // Handle function-based refs. String-based refs are handled as functions.\n forwardedRef(ref);\n } else if (typeof forwardedRef === 'object' && forwardedRef != null) {\n // Handle createRef-based refs\n forwardedRef.current = ref;\n }\n };\n}\n\nexport default setAndForwardRef;\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,gBAAgBA,CAAAC,IAAA,EAMJ;EAAA,IANQ;IAC3BC,eAAe;IACfC;EAIF,CAAC,GAAAF,IAAA;EACC,OAAO,SAASG,UAAUA,CAACC,GAAM,EAAE;IACjC,MAAMC,YAAY,GAAGJ,eAAe,EAAE;IAEtCC,WAAW,CAACE,GAAG,CAAC;;IAEhB;IACA,IAAI,OAAOC,YAAY,KAAK,UAAU,EAAE;MACtC;MACAA,YAAY,CAACD,GAAG,CAAC;IACnB,CAAC,MAAM,IAAI,OAAOC,YAAY,KAAK,QAAQ,IAAIA,YAAY,IAAI,IAAI,EAAE;MACnE;MACAA,YAAY,CAACC,OAAO,GAAGF,GAAG;IAC5B;EACF,CAAC;AACH;AAEA,eAAeL,gBAAgB"}
1
+ {"version":3,"names":["setAndForwardRef","getForwardedRef","setLocalRef","forwardRef","ref","forwardedRef","current"],"sources":["setAndForwardRef.ts"],"sourcesContent":["'use strict';\n/**\n * imported from react-native\n */\n\nimport type { MutableRefObject } from 'react';\n\n/* eslint-disable */\n/**\n * This is a helper function for when a component needs to be able to forward a ref\n * to a child component, but still needs to have access to that component as part of\n * its implementation.\n *\n * Its main use case is in wrappers for native components.\n *\n * Usage:\n *\n * class MyView extends React.Component {\n * _nativeRef = null;\n *\n * _setNativeRef = setAndForwardRef({\n * getForwardedRef: () => this.props.forwardedRef,\n * setLocalRef: ref => {\n * this._nativeRef = ref;\n * },\n * });\n *\n * render() {\n * return <View ref={this._setNativeRef} />;\n * }\n * }\n *\n * const MyViewWithRef = React.forwardRef((props, ref) => (\n * <MyView {...props} forwardedRef={ref} />\n * ));\n *\n * module.exports = MyViewWithRef;\n */\n/* eslint-enable */\n\ntype ForwardedRef<T> = () => MutableRefObject<T> | ((ref: T) => void);\n\nfunction setAndForwardRef<T>({\n getForwardedRef,\n setLocalRef,\n}: {\n getForwardedRef: ForwardedRef<T>;\n setLocalRef: (ref: T) => void;\n}): (ref: T) => void {\n return function forwardRef(ref: T) {\n const forwardedRef = getForwardedRef();\n\n setLocalRef(ref);\n\n // Forward to user ref prop (if one has been specified)\n if (typeof forwardedRef === 'function') {\n // Handle function-based refs. String-based refs are handled as functions.\n forwardedRef(ref);\n } else if (typeof forwardedRef === 'object' && forwardedRef != null) {\n // Handle createRef-based refs\n forwardedRef.current = ref;\n }\n };\n}\n\nexport default setAndForwardRef;\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,gBAAgBA,CAAI;EAC3BC,eAAe;EACfC;AAIF,CAAC,EAAoB;EACnB,OAAO,SAASC,UAAUA,CAACC,GAAM,EAAE;IACjC,MAAMC,YAAY,GAAGJ,eAAe,CAAC,CAAC;IAEtCC,WAAW,CAACE,GAAG,CAAC;;IAEhB;IACA,IAAI,OAAOC,YAAY,KAAK,UAAU,EAAE;MACtC;MACAA,YAAY,CAACD,GAAG,CAAC;IACnB,CAAC,MAAM,IAAI,OAAOC,YAAY,KAAK,QAAQ,IAAIA,YAAY,IAAI,IAAI,EAAE;MACnE;MACAA,YAAY,CAACC,OAAO,GAAGF,GAAG;IAC5B;EACF,CAAC;AACH;AAEA,eAAeJ,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["flattenArray","array","Array","isArray","resultArr","_flattenArray","arr","forEach","item","push","has","key","x","undefined"],"sources":["utils.ts"],"sourcesContent":["'use strict';\nimport type { NestedArray } from './commonTypes';\n\nexport function flattenArray<T>(array: NestedArray<T>): T[] {\n if (!Array.isArray(array)) {\n return [array];\n }\n const resultArr: T[] = [];\n\n const _flattenArray = (arr: NestedArray<T>[]): void => {\n arr.forEach((item) => {\n if (Array.isArray(item)) {\n _flattenArray(item);\n } else {\n resultArr.push(item);\n }\n });\n };\n _flattenArray(array);\n return resultArr;\n}\n\nexport const has = <K extends string>(\n key: K,\n x: unknown\n): x is { [key in K]: unknown } => {\n if (typeof x === 'function' || typeof x === 'object') {\n if (x === null || x === undefined) {\n return false;\n } else {\n return key in x;\n }\n }\n return false;\n};\n"],"mappings":"AAAA,YAAY;;AAGZ,OAAO,SAASA,YAAYA,CAAIC,KAAqB,EAAO;EAC1D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACzB,OAAO,CAACA,KAAK,CAAC;EAChB;EACA,MAAMG,SAAc,GAAG,EAAE;EAEzB,MAAMC,aAAa,GAAIC,GAAqB,IAAW;IACrDA,GAAG,CAACC,OAAO,CAAEC,IAAI,IAAK;MACpB,IAAIN,KAAK,CAACC,OAAO,CAACK,IAAI,CAAC,EAAE;QACvBH,aAAa,CAACG,IAAI,CAAC;MACrB,CAAC,MAAM;QACLJ,SAAS,CAACK,IAAI,CAACD,IAAI,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC;EACDH,aAAa,CAACJ,KAAK,CAAC;EACpB,OAAOG,SAAS;AAClB;AAEA,OAAO,MAAMM,GAAG,GAAGA,CACjBC,GAAM,EACNC,CAAU,KACuB;EACjC,IAAI,OAAOA,CAAC,KAAK,UAAU,IAAI,OAAOA,CAAC,KAAK,QAAQ,EAAE;IACpD,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;MACjC,OAAO,KAAK;IACd,CAAC,MAAM;MACL,OAAOF,GAAG,IAAIC,CAAC;IACjB;EACF;EACA,OAAO,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["flattenArray","array","Array","isArray","resultArr","_flattenArray","arr","forEach","item","push","has","key","x","undefined"],"sources":["utils.ts"],"sourcesContent":["'use strict';\nimport type { NestedArray } from './commonTypes';\n\nexport function flattenArray<T>(array: NestedArray<T>): T[] {\n if (!Array.isArray(array)) {\n return [array];\n }\n const resultArr: T[] = [];\n\n const _flattenArray = (arr: NestedArray<T>[]): void => {\n arr.forEach((item) => {\n if (Array.isArray(item)) {\n _flattenArray(item);\n } else {\n resultArr.push(item);\n }\n });\n };\n _flattenArray(array);\n return resultArr;\n}\n\nexport const has = <K extends string>(\n key: K,\n x: unknown\n): x is { [key in K]: unknown } => {\n if (typeof x === 'function' || typeof x === 'object') {\n if (x === null || x === undefined) {\n return false;\n } else {\n return key in x;\n }\n }\n return false;\n};\n"],"mappings":"AAAA,YAAY;;AAGZ,OAAO,SAASA,YAAYA,CAAIC,KAAqB,EAAO;EAC1D,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACzB,OAAO,CAACA,KAAK,CAAC;EAChB;EACA,MAAMG,SAAc,GAAG,EAAE;EAEzB,MAAMC,aAAa,GAAIC,GAAqB,IAAW;IACrDA,GAAG,CAACC,OAAO,CAAEC,IAAI,IAAK;MACpB,IAAIN,KAAK,CAACC,OAAO,CAACK,IAAI,CAAC,EAAE;QACvBH,aAAa,CAACG,IAAI,CAAC;MACrB,CAAC,MAAM;QACLJ,SAAS,CAACK,IAAI,CAACD,IAAI,CAAC;MACtB;IACF,CAAC,CAAC;EACJ,CAAC;EACDH,aAAa,CAACJ,KAAK,CAAC;EACpB,OAAOG,SAAS;AAClB;AAEA,OAAO,MAAMM,GAAG,GAAGA,CACjBC,GAAM,EACNC,CAAU,KACuB;EACjC,IAAI,OAAOA,CAAC,KAAK,UAAU,IAAI,OAAOA,CAAC,KAAK,QAAQ,EAAE;IACpD,IAAIA,CAAC,KAAK,IAAI,IAAIA,CAAC,KAAKC,SAAS,EAAE;MACjC,OAAO,KAAK;IACd,CAAC,MAAM;MACL,OAAOF,GAAG,IAAIC,CAAC;IACjB;EACF;EACA,OAAO,KAAK;AACd,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Animated"],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport * as Animated from './Animated';\n\nexport * from './reanimated2';\nexport default Animated;\n"],"mappings":"AAAA,YAAY;;AACZ,OAAO,KAAKA,QAAQ,MAAM,YAAY;AAEtC,cAAc,eAAe;AAC7B,eAAeA,QAAQ"}
1
+ {"version":3,"names":["Animated"],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport * as Animated from './Animated';\n\nexport * from './reanimated2';\nexport default Animated;\n"],"mappings":"AAAA,YAAY;;AACZ,OAAO,KAAKA,QAAQ,MAAM,YAAY;AAEtC,cAAc,eAAe;AAC7B,eAAeA,QAAQ","ignoreList":[]}
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
3
  export * from './reanimated2';
4
- import * as _default from './Animated';
5
- export { _default as default }; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#installation 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache
4
+ export * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#installation 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache
6
5
  //# sourceMappingURL=index.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_default","default"],"sources":["index.web.ts"],"sourcesContent":["'use strict';\nexport * from './reanimated2';\nexport * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#installation 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache\n"],"mappings":"AAAA,YAAY;;AACZ,cAAc,eAAe;AAAC,YAAAA,QAAA,MACL,YAAY;AAAA,SAAAA,QAAA,IAAzBC,OAAO,IAAoB"}
1
+ {"version":3,"names":["default"],"sources":["index.web.ts"],"sourcesContent":["'use strict';\nexport * from './reanimated2';\nexport * as default from './Animated'; // If this line fails, you probably forgot some installation steps. Check out the installation guide here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started#installation 1) Make sure reanimated's babel plugin is installed in your babel.config.js (you should have 'react-native-reanimated/plugin' listed there - also see the above link for details) 2) Make sure you reset build cache after updating the config, run: yarn start --reset-cache\n"],"mappings":"AAAA,YAAY;;AACZ,cAAc,eAAe;AAC7B,OAAO,KAAKA,OAAO,MAAM,YAAY,CAAC,CAAC","ignoreList":[]}
@@ -57,13 +57,12 @@ const hook = {
57
57
  })
58
58
  // useScrollViewOffset: ADD ME IF NEEDED
59
59
  };
60
-
61
60
  const animation = {
62
61
  cancelAnimation: NOOP,
63
62
  // defineAnimation: ADD ME IF NEEDED
64
63
  // withClamp: ADD ME IF NEEDED
65
64
  withDecay: (_userConfig, callback) => {
66
- callback === null || callback === void 0 ? void 0 : callback(true);
65
+ callback === null || callback === void 0 || callback(true);
67
66
  return 0;
68
67
  },
69
68
  withDelay: (_delayMs, nextAnimation) => {
@@ -72,11 +71,11 @@ const animation = {
72
71
  withRepeat: ID,
73
72
  withSequence: () => 0,
74
73
  withSpring: (toValue, _userConfig, callback) => {
75
- callback === null || callback === void 0 ? void 0 : callback(true);
74
+ callback === null || callback === void 0 || callback(true);
76
75
  return toValue;
77
76
  },
78
77
  withTiming: (toValue, _userConfig, callback) => {
79
- callback === null || callback === void 0 ? void 0 : callback(true);
78
+ callback === null || callback === void 0 || callback(true);
80
79
  return toValue;
81
80
  }
82
81
  };
@@ -92,7 +91,6 @@ const interpolateColor = {
92
91
  interpolateColor: NOOP
93
92
  // useInterpolateConfig: ADD ME IF NEEDED
94
93
  };
95
-
96
94
  const Easing = {
97
95
  Easing: {
98
96
  linear: ID,
@@ -131,13 +129,11 @@ const platformFunctions = {
131
129
  // setNativeProps: ADD ME IF NEEDED
132
130
  // getRelativeCoords: ADD ME IF NEEDED
133
131
  };
134
-
135
132
  const Colors = {
136
133
  // isColor: ADD ME IF NEEDED
137
134
  processColor: processColorRN
138
135
  // convertToRGBA: ADD ME IF NEEDED
139
136
  };
140
-
141
137
  const PropAdapters = {
142
138
  // createAnimatedPropAdapter: ADD ME IF NEEDED
143
139
  };
@@ -224,7 +220,6 @@ const core = {
224
220
  enableLayoutAnimations: NOOP
225
221
  // getViewProp: ADD ME IF NEEDED
226
222
  };
227
-
228
223
  const layoutReanimation = {
229
224
  BaseAnimationBuilder: new BaseAnimationMock(),
230
225
  ComplexAnimationBuilder: new BaseAnimationMock(),