@react-native-ohos/react-native-reanimated 4.0.2-beta.1 → 4.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +1070 -0
  2. package/LICENSE +21 -0
  3. package/README.md +842 -0
  4. package/compatibility.json +20 -26
  5. package/harmony/reanimated/BuildProfile.ets +1 -1
  6. package/harmony/reanimated/index.ets +4 -2
  7. package/harmony/reanimated/oh-package-lock.json5 +1 -1
  8. package/harmony/reanimated/oh-package.json5 +1 -1
  9. package/harmony/reanimated/src/main/cpp/CMakeLists.txt +23 -9
  10. package/harmony/reanimated/src/main/cpp/Common/NativeView/CMakeLists.txt +56 -0
  11. package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/ComponentDescriptors.h +19 -0
  12. package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryComponentDescriptor.h +30 -0
  13. package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.cpp +15 -0
  14. package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.h +41 -0
  15. package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryState.h +30 -0
  16. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.cpp +8 -9
  17. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h +3 -6
  18. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/InterpolatorRegistry.cpp +203 -150
  19. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/InterpolatorRegistry.h +1 -6
  20. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/definitions.h +2 -7
  21. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSAngle.cpp +0 -1
  22. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSColor.cpp +2 -18
  23. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.cpp +11 -11
  24. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.h +2 -6
  25. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSLength.cpp +4 -1
  26. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSNumber.cpp +5 -0
  27. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSNumber.h +8 -0
  28. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValue.h +27 -46
  29. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp +20 -20
  30. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.h +2 -2
  31. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/complex/CSSDropShadow.h +3 -3
  32. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSAnimationConfig.cpp +10 -2
  33. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSAnimationConfig.h +5 -3
  34. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSKeyframesConfig.cpp +20 -17
  35. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSKeyframesConfig.h +5 -8
  36. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSTransitionConfig.cpp +33 -66
  37. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSTransitionConfig.h +29 -22
  38. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/common.cpp +14 -2
  39. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/common.h +8 -2
  40. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimation.cpp +50 -91
  41. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimation.h +43 -18
  42. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimationsGroup.cpp +63 -0
  43. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimationsGroup.h +37 -0
  44. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSLoopAnimation.cpp +100 -0
  45. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSLoopAnimation.h +49 -0
  46. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSPlatformAnimation.h +13 -0
  47. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSPlatformAnimationFactory.h +32 -0
  48. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSLoopTransition.cpp +156 -0
  49. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSLoopTransition.h +71 -0
  50. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSPlatformTransitionProxy.cpp +141 -0
  51. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSPlatformTransitionProxy.h +104 -0
  52. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSTransition.cpp +97 -0
  53. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSTransition.h +69 -0
  54. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/easing/EasingConfigs.cpp +89 -0
  55. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/easing/EasingConfigs.h +36 -0
  56. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/InterpolatorFactory.cpp +12 -0
  57. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/InterpolatorFactory.h +11 -2
  58. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp +2 -3
  59. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.h +3 -5
  60. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/filters/FilterOperation.cpp +3 -3
  61. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/filters/FilterOperation.h +1 -1
  62. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/ArrayPropertiesInterpolator.cpp +38 -37
  63. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/ArrayPropertiesInterpolator.h +3 -6
  64. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/RecordPropertiesInterpolator.cpp +54 -32
  65. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/RecordPropertiesInterpolator.h +5 -7
  66. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/OperationsStyleInterpolator.cpp +46 -46
  67. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/OperationsStyleInterpolator.h +8 -7
  68. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/StyleOperation.h +4 -57
  69. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolator.cpp +23 -0
  70. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolator.h +10 -8
  71. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolatorFactory.cpp +77 -0
  72. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolatorFactory.h +38 -0
  73. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/TransitionStyleInterpolator.cpp +47 -68
  74. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/TransitionStyleInterpolator.h +21 -9
  75. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperation.cpp +4 -1
  76. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.cpp +35 -78
  77. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.h +44 -13
  78. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/operations/matrix.cpp +13 -11
  79. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ResolvableValueInterpolator.cpp +4 -0
  80. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/SimpleValueInterpolator.cpp +7 -3
  81. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ValueInterpolator.cpp +20 -27
  82. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ValueInterpolator.h +12 -9
  83. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.cpp +63 -36
  84. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.h +6 -8
  85. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.cpp +55 -46
  86. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.h +8 -5
  87. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/RawProgressProvider.cpp +1 -2
  88. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/RawProgressProvider.h +3 -2
  89. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/TransitionProgressProvider.cpp +76 -71
  90. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/TransitionProgressProvider.h +17 -14
  91. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSAnimationsRegistry.cpp +145 -273
  92. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSAnimationsRegistry.h +43 -44
  93. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSKeyframesRegistry.cpp +19 -19
  94. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSKeyframesRegistry.h +16 -12
  95. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSTransitionsRegistry.cpp +95 -114
  96. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSTransitionsRegistry.h +38 -25
  97. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.cpp +9 -34
  98. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.h +0 -10
  99. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthArray.cpp +47 -0
  100. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthArray.h +24 -0
  101. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthVector.cpp +87 -0
  102. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthVector.h +28 -0
  103. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGPath.cpp +326 -0
  104. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGPath.h +65 -0
  105. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStops.cpp +164 -0
  106. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStops.h +51 -0
  107. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.cpp +14 -66
  108. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.h +7 -18
  109. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/platform.cpp +284 -0
  110. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/platform.h +31 -0
  111. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/props.cpp +13 -132
  112. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/props.h +3 -21
  113. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/reversingShortening.h +43 -0
  114. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Compat/WorkletsApi.h +13 -0
  115. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandler.cpp +33 -0
  116. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandler.h +39 -0
  117. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandlerRegistry.cpp +95 -0
  118. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h +40 -0
  119. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp +20 -23
  120. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +2 -6
  121. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +26 -18
  122. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +4 -8
  123. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp +16 -28
  124. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h +3 -4
  125. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp +72 -24
  126. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h +17 -7
  127. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/OperationsLoop.cpp +152 -0
  128. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/OperationsLoop.h +86 -0
  129. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/PropsLayoutFilter.h +98 -0
  130. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp +162 -28
  131. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.h +69 -11
  132. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.cpp +41 -17
  133. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.h +14 -3
  134. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/propNameFromString.h +130 -0
  135. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.cpp +1 -0
  136. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h +5 -7
  137. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.cpp +7 -4
  138. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +52 -9
  139. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp +174 -62
  140. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h +12 -11
  141. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp +251 -128
  142. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h +23 -19
  143. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.h +34 -6
  144. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp +71 -64
  145. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +938 -700
  146. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +123 -76
  147. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/SynchronousPropsBufferSerializer.cpp +313 -0
  148. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/SynchronousPropsBufferSerializer.h +18 -0
  149. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoSelector.h +41 -0
  150. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoStylesRegistry.cpp +113 -0
  151. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoStylesRegistry.h +73 -0
  152. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp +4 -4
  153. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.cpp +23 -48
  154. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.h +13 -14
  155. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/PlatformDepMethodsHolder.h +20 -3
  156. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReaJSIUtils.h +227 -0
  157. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReanimatedVersion.cpp +51 -14
  158. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReanimatedVersion.h +2 -5
  159. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/SingleInstanceChecker.h +76 -0
  160. package/harmony/reanimated/src/main/cpp/OHOSCSSPlatformTransitions.cpp +353 -0
  161. package/harmony/reanimated/src/main/cpp/OHOSCSSPlatformTransitions.h +95 -0
  162. package/harmony/reanimated/src/main/cpp/PseudoSelectorManager.cpp +140 -0
  163. package/harmony/reanimated/src/main/cpp/PseudoSelectorManager.h +52 -0
  164. package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryComponentInstance.cpp +45 -0
  165. package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryComponentInstance.h +33 -0
  166. package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryJSIBinder.h +20 -0
  167. package/harmony/reanimated/src/main/cpp/ReanimatedModule.cpp +112 -19
  168. package/harmony/reanimated/src/main/cpp/ReanimatedModule.h +4 -2
  169. package/harmony/reanimated/src/main/cpp/ReanimatedNodesManager.cpp +1 -1
  170. package/harmony/reanimated/src/main/cpp/ReanimatedNodesManager.h +1 -1
  171. package/harmony/reanimated/src/main/cpp/ReanimatedPackage.cpp +24 -1
  172. package/harmony/reanimated/src/main/cpp/ReanimatedPackage.h +7 -2
  173. package/harmony/reanimated/src/main/cpp/ReanimatedSensor.cpp +88 -57
  174. package/harmony/reanimated/src/main/cpp/ReanimatedSensor.h +4 -2
  175. package/harmony/reanimated/src/main/cpp/ReanimatedSensorContainer.cpp +1 -1
  176. package/harmony/reanimated/src/main/cpp/ReanimatedSensorContainer.h +1 -1
  177. package/harmony/reanimated/src/main/cpp/ReanimatedUIScheduler.cpp +9 -7
  178. package/harmony/reanimated/src/main/cpp/ReanimatedUIScheduler.h +6 -5
  179. package/harmony/reanimated/src/main/cpp/TransformParser.h +1 -1
  180. package/harmony/reanimated/src/main/cpp/codegen/react/renderer/components/rnreanimated/EventEmitters.h +19 -0
  181. package/harmony/reanimated/src/main/cpp/codegen/react/renderer/components/rnreanimated/Props.h +31 -0
  182. package/harmony/reanimated/src/main/ets/KeyboardState.ts +11 -0
  183. package/harmony/reanimated/src/main/ets/ReanimatedModule.ts +119 -19
  184. package/harmony/reanimated/src/main/ets/{ReanimatedPackage.ts → ReanimatedPackage.ets} +4 -3
  185. package/harmony/reanimated.har +0 -0
  186. package/package.json +52 -24
  187. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSTransition.cpp +0 -145
  188. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSTransition.h +0 -47
  189. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGLength.cpp +0 -93
  190. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGLength.h +0 -36
  191. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/DelayedItemsManager.cpp +0 -75
  192. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/DelayedItemsManager.h +0 -45
  193. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.cpp +0 -183
  194. package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.h +0 -93
  195. package/harmony/reanimated/src/main/ets/AnimationManager.ts +0 -61
  196. /package/harmony/reanimated/{ts.ts → ts.ets} +0 -0
@@ -1,16 +1,28 @@
1
1
  {
2
2
  "fabric": {
3
3
  "nightly": {
4
- "react-native": ["0.80", "0.81", "0.82", "0.83"],
4
+ "react-native": ["0.83", "0.84", "0.85", "0.86"],
5
5
  "react-native-worklets": ["nightly"]
6
6
  },
7
+ "4.5.x": {
8
+ "react-native": ["0.83", "0.84", "0.85", "0.86"],
9
+ "react-native-worklets": ["0.10.x", "0.11.x"]
10
+ },
11
+ "4.4.x": {
12
+ "react-native": ["0.83", "0.84", "0.85", "0.86"],
13
+ "react-native-worklets": ["0.9.x", "0.10.x"]
14
+ },
15
+ "4.3.x": {
16
+ "react-native": ["0.81", "0.82", "0.83", "0.84", "0.85"],
17
+ "react-native-worklets": ["0.8.x"]
18
+ },
7
19
  "4.2.x": {
8
- "react-native": ["0.80", "0.81", "0.82", "0.83"],
9
- "react-native-worklets": ["0.7.x"]
20
+ "react-native": ["0.80", "0.81", "0.82", "0.83", "0.84"],
21
+ "react-native-worklets": ["0.7.x", "0.8.x"]
10
22
  },
11
23
  "4.1.x": {
12
24
  "react-native": ["0.78", "0.79", "0.80", "0.81", "0.82"],
13
- "react-native-worklets": ["0.5.x", "0.6.x"]
25
+ "react-native-worklets": ["0.5.x", "0.6.x", "0.7.x", "0.8.x"]
14
26
  },
15
27
  "4.0.x": {
16
28
  "react-native": ["0.78", "0.79", "0.80", "0.81"],
@@ -22,21 +34,12 @@
22
34
  "3.18.x": {
23
35
  "react-native": ["0.75", "0.76", "0.77", "0.78", "0.79", "0.80"]
24
36
  },
25
- "3.17.4 - 3.17.5": {
37
+ "3.17.x": {
26
38
  "react-native": ["0.75", "0.76", "0.77", "0.78", "0.79"]
27
39
  },
28
- "3.17.1 - 3.17.3": {
29
- "react-native": ["0.75", "0.76", "0.77", "0.78"]
30
- },
31
- "3.17.0": {
32
- "react-native": ["0.75", "0.76", "0.77"]
33
- },
34
- "3.16.7": {
40
+ "3.16.x": {
35
41
  "react-native": ["0.74", "0.75", "0.76", "0.77"]
36
42
  },
37
- "3.16.0 - 3.16.6": {
38
- "react-native": ["0.74", "0.75", "0.76"]
39
- },
40
43
  "3.15.x": {
41
44
  "react-native": ["0.74", "0.75"]
42
45
  },
@@ -60,21 +63,12 @@
60
63
  "3.18.x": {
61
64
  "react-native": ["0.75", "0.76", "0.77", "0.78", "0.79", "0.80"]
62
65
  },
63
- "3.17.4 - 3.17.5": {
66
+ "3.17.x": {
64
67
  "react-native": ["0.75", "0.76", "0.77", "0.78", "0.79"]
65
68
  },
66
- "3.17.1 - 3.17.3": {
67
- "react-native": ["0.75", "0.76", "0.77", "0.78"]
68
- },
69
- "3.17.0": {
70
- "react-native": ["0.75", "0.76", "0.77"]
71
- },
72
- "3.16.7": {
69
+ "3.16.x": {
73
70
  "react-native": ["0.74", "0.75", "0.76", "0.77"]
74
71
  },
75
- "3.16.0 - 3.16.6": {
76
- "react-native": ["0.74", "0.75", "0.76"]
77
- },
78
72
  "3.15.x": {
79
73
  "react-native": ["0.72", "0.73", "0.74", "0.75"]
80
74
  },
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
3
  */
4
- export const HAR_VERSION = '4.0.2-beta.1';
4
+ export const HAR_VERSION = '4.1.0-beta.1';
5
5
  export const BUILD_MODE_NAME = 'debug';
6
6
  export const DEBUG = true;
7
7
  export const TARGET_NAME = 'default';
@@ -1,5 +1,7 @@
1
- // Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
2
  // Use of this source code is governed by a MIT license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- export * from './ts'
5
+ import { ReanimatedPackage } from './src/main/ets/ReanimatedPackage'
6
+ export * from './ts'
7
+ export default ReanimatedPackage
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "@react-native-ohos/react-native-worklets@../../../../example/node_modules/@react-native-ohos/react-native-worklets/harmony/worklets.har": {
21
21
  "name": "@react-native-ohos/react-native-worklets",
22
- "version": "1.0.1-rc.2",
22
+ "version": "1.1.0-beta.1",
23
23
  "resolved": "../../../../example/node_modules/@react-native-ohos/react-native-worklets/harmony/worklets.har",
24
24
  "registryType": "local",
25
25
  "dependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  name: '@react-native-ohos/react-native-reanimated',
3
- version: '4.0.2-beta.1',
3
+ version: '4.1.0-beta.1',
4
4
  description: "",
5
5
  type: 'module',
6
6
  main: 'index.ets',
@@ -1,16 +1,18 @@
1
1
  cmake_minimum_required(VERSION 3.4.1)
2
2
  set(CMAKE_VERBOSE_MAKEFILE on)
3
3
 
4
- add_compile_definitions(REANIMATED_VERSION=4.2.1)
5
- #add_compile_definitions(WORKLETS_VERSION=0.7.1)
6
- #add_compile_definitions(JS_RUNTIME_HERMES=1)
4
+ add_compile_definitions(REANIMATED_VERSION=4.5.3)
7
5
  add_compile_definitions(RCT_NEW_ARCH_ENABLED=1)
8
- add_compile_definitions(REACT_NATIVE_MINOR_VERSION=82)
9
- if(CMAKE_BUILD_TYPE STREQUAL "Debug")
10
- add_compile_definitions(HERMES_ENABLE_DEBUGGER=1)
11
- else()
12
- add_compile_definitions(HERMES_ENABLE_DEBUGGER=0)
6
+ set(CMAKE_CXX_STANDARD 20)
7
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
8
+
9
+ add_compile_definitions(_LIBCPP_ENABLE_EXPERIMENTAL)
10
+
11
+ if(NOT DEFINED REANIMATED_FEATURE_FLAGS)
12
+ set(REANIMATED_FEATURE_FLAGS "[RUNTIME_TEST_FLAG:false][DISABLE_COMMIT_PAUSING_MECHANISM:false][ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS:false][IOS_SYNCHRONOUSLY_UPDATE_UI_PROPS:false][EXPERIMENTAL_CSS_ANIMATIONS_FOR_SVG_COMPONENTS:false][IOS_CSS_CORE_ANIMATION:false][USE_SYNCHRONIZABLE_FOR_MUTABLES:false][USE_COMMIT_HOOK_ONLY_FOR_REACT_COMMITS:false][ENABLE_SHARED_ELEMENT_TRANSITIONS:false][FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS:false][USE_ANIMATION_BACKEND:false]")
13
13
  endif()
14
+ add_compile_definitions("REANIMATED_FEATURE_FLAGS=${REANIMATED_FEATURE_FLAGS}")
15
+
14
16
  set(REANIMATED_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Common")
15
17
 
16
18
  file(GLOB rnoh_reanimated_SRC CONFIGURE_DEPENDS *.cpp)
@@ -24,11 +26,18 @@ add_library(rnoh_reanimated SHARED ${rnoh_reanimated_SRC})
24
26
  target_include_directories(
25
27
  rnoh_reanimated
26
28
  PRIVATE
29
+ # hand-written replacement for the codegen-generated
30
+ # react/renderer/components/rnreanimated headers (see
31
+ # codegen/react/renderer/components/rnreanimated/Props.h)
32
+ "${CMAKE_CURRENT_SOURCE_DIR}/codegen"
27
33
  "${REANIMATED_SRC_DIR}/cpp/reanimated/AnimatedSensor"
28
34
  "${REANIMATED_SRC_DIR}/cpp/reanimated/CSS"
35
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/Compat"
36
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/Events"
29
37
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric"
30
38
  "${REANIMATED_SRC_DIR}/cpp/reanimated/LayoutAnimations"
31
39
  "${REANIMATED_SRC_DIR}/cpp/reanimated/NativeModules"
40
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/PseudoStyles"
32
41
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Tools"
33
42
  "${REANIMATED_SRC_DIR}/cpp/reanimated/RuntimeDecorators"
34
43
  "${REANIMATED_SRC_DIR}/cpp"
@@ -37,7 +46,10 @@ target_sources(rnoh_reanimated
37
46
  PRIVATE
38
47
  "${REANIMATED_SRC_DIR}/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.cpp"
39
48
  "${REANIMATED_SRC_DIR}/cpp/reanimated/CSS/InterpolatorRegistry.cpp"
49
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/Events/UIEventHandler.cpp"
50
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/Events/UIEventHandlerRegistry.cpp"
40
51
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp"
52
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric/updates/OperationsLoop.cpp"
41
53
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp"
42
54
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.cpp"
43
55
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp"
@@ -52,11 +64,13 @@ target_sources(rnoh_reanimated
52
64
  "${REANIMATED_SRC_DIR}/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp"
53
65
  "${REANIMATED_SRC_DIR}/cpp/reanimated/NativeModules/PropValueProcessor.cpp"
54
66
  "${REANIMATED_SRC_DIR}/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp"
55
- "${REANIMATED_SRC_DIR}/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.cpp"
67
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/NativeModules/SynchronousPropsBufferSerializer.cpp"
68
+ "${REANIMATED_SRC_DIR}/cpp/reanimated/PseudoStyles/PseudoStylesRegistry.cpp"
56
69
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Tools/FeatureFlags.cpp"
57
70
  "${REANIMATED_SRC_DIR}/cpp/reanimated/Tools/ReanimatedVersion.cpp"
58
71
  "${REANIMATED_SRC_DIR}/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.cpp"
59
72
  "${REANIMATED_SRC_DIR}/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp"
73
+ "${REANIMATED_SRC_DIR}/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.cpp"
60
74
  )
61
75
 
62
76
  target_include_directories(rnoh_reanimated PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@@ -0,0 +1,56 @@
1
+ cmake_minimum_required(VERSION 3.13)
2
+ set(CMAKE_VERBOSE_MAKEFILE on)
3
+
4
+ #set(ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../android)
5
+ #set(CODEGEN_JNI_DIR ${ANDROID_DIR}/build/generated/source/codegen/jni)
6
+ #set(CODEGEN_COMPONENTS_DIR ${CODEGEN_JNI_DIR}/react/renderer/components/rnreanimated)
7
+ file(
8
+ GLOB CODEGEN_ORIGINAL_SRCS CONFIGURE_DEPENDS
9
+ # ${CODEGEN_JNI_DIR}/*.cpp
10
+ ${CODEGEN_COMPONENTS_DIR}/*.cpp
11
+ )
12
+
13
+ set(CODEGEN_OVERWRITTEN_JNI_DIR .)
14
+ set(CODEGEN_OVERWRITTEN_COMPONENTS_DIR ${CODEGEN_OVERWRITTEN_JNI_DIR}/react/renderer/components/rnreanimated)
15
+ file(
16
+ GLOB CODEGEN_OVERWRITTEN_SRCS CONFIGURE_DEPENDS
17
+ ${CODEGEN_OVERWRITTEN_JNI_DIR}/*.cpp
18
+ ${CODEGEN_OVERWRITTEN_COMPONENTS_DIR}/*.cpp
19
+ )
20
+
21
+ add_library(
22
+ react_codegen_rnreanimated
23
+ OBJECT
24
+ ${CODEGEN_OVERWRITTEN_SRCS}
25
+ ${CODEGEN_ORIGINAL_SRCS}
26
+ )
27
+
28
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
29
+ target_compile_reactnative_options(react_codegen_rnreanimated PRIVATE)
30
+ endif()
31
+
32
+ target_include_directories(
33
+ react_codegen_rnreanimated
34
+ PUBLIC
35
+ ${CODEGEN_OVERWRITTEN_JNI_DIR}
36
+ ${CODEGEN_OVERWRITTEN_COMPONENTS_DIR}
37
+ # ${CODEGEN_JNI_DIR}
38
+ ${CODEGEN_COMPONENTS_DIR}
39
+ )
40
+
41
+ target_link_libraries(
42
+ react_codegen_rnreanimated
43
+ fbjni
44
+ jsi
45
+ reactnative
46
+ )
47
+
48
+ target_compile_options(
49
+ react_codegen_rnreanimated
50
+ PRIVATE
51
+ -DLOG_TAG=\"ReactNative\"
52
+ -fexceptions
53
+ -frtti
54
+ -std=c++20
55
+ -Wall
56
+ )
@@ -0,0 +1,19 @@
1
+
2
+ /**
3
+ * This code was generated by
4
+ * [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
5
+ *
6
+ * Do not edit this file as changes may cause incorrect behavior and will be
7
+ * lost once the code is regenerated.
8
+ *
9
+ * @generated by codegen project: GenerateComponentDescriptorsH.js
10
+ */
11
+
12
+ #pragma once
13
+
14
+ #include <react/renderer/components/rnreanimated/ShadowNodes.h>
15
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
16
+
17
+ #include "REASharedTransitionBoundaryComponentDescriptor.h"
18
+
19
+ namespace facebook::react {} // namespace facebook::react
@@ -0,0 +1,30 @@
1
+
2
+ /**
3
+ * This code was generated by
4
+ * [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
5
+ *
6
+ * Do not edit this file as changes may cause incorrect behavior and will be
7
+ * lost once the code is regenerated.
8
+ *
9
+ * @generated by codegen project: GenerateComponentDescriptorH.js
10
+ */
11
+
12
+ #pragma once
13
+
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+
16
+ #include "REASharedTransitionBoundaryShadowNode.h"
17
+
18
+ namespace facebook::react {
19
+
20
+ class REASharedTransitionBoundaryComponentDescriptor final
21
+ : public ConcreteComponentDescriptor<REASharedTransitionBoundaryShadowNode> {
22
+ using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
23
+ void adopt(ShadowNode &shadowNode) const override {
24
+ react_native_assert(dynamic_cast<REASharedTransitionBoundaryShadowNode *>(&shadowNode));
25
+
26
+ ConcreteComponentDescriptor::adopt(shadowNode);
27
+ }
28
+ };
29
+
30
+ } // namespace facebook::react
@@ -0,0 +1,15 @@
1
+ #include "REASharedTransitionBoundaryShadowNode.h"
2
+
3
+ namespace facebook::react {
4
+
5
+ extern const char REASharedTransitionBoundaryComponentName[] = "REASharedTransitionBoundary";
6
+
7
+ void REASharedTransitionBoundaryShadowNode::initialize() {
8
+ // The boundary uses `display: contents` so it doesn't affect layout,
9
+ // but React would flatten such a view away. Unsetting this trait keeps
10
+ // the view in the native tree, so it shows up in mutations and can be
11
+ // tracked in the light tree.
12
+ traits_.unset(ShadowNodeTraits::ForceFlattenView);
13
+ }
14
+
15
+ } // namespace facebook::react
@@ -0,0 +1,41 @@
1
+ #pragma once
2
+
3
+ #include <jsi/jsi.h>
4
+ #include <react/renderer/components/rnreanimated/EventEmitters.h>
5
+ #include <react/renderer/components/rnreanimated/Props.h>
6
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
7
+ #include <react/renderer/core/LayoutContext.h>
8
+
9
+ #include "REASharedTransitionBoundaryState.h"
10
+
11
+ namespace facebook::react {
12
+
13
+ JSI_EXPORT extern const char REASharedTransitionBoundaryComponentName[];
14
+
15
+ /*
16
+ * `ShadowNode` for <REASharedTransitionBoundary> component.
17
+ */
18
+ class REASharedTransitionBoundaryShadowNode final : public ConcreteViewShadowNode<
19
+ REASharedTransitionBoundaryComponentName,
20
+ REASharedTransitionBoundaryProps,
21
+ REASharedTransitionBoundaryEventEmitter,
22
+ REASharedTransitionBoundaryState> {
23
+ public:
24
+ REASharedTransitionBoundaryShadowNode(
25
+ const ShadowNodeFragment &fragment,
26
+ const ShadowNodeFamily::Shared &family,
27
+ ShadowNodeTraits traits)
28
+ : ConcreteViewShadowNode(fragment, family, traits) {
29
+ initialize();
30
+ }
31
+
32
+ REASharedTransitionBoundaryShadowNode(const ShadowNode &sourceShadowNode, const ShadowNodeFragment &fragment)
33
+ : ConcreteViewShadowNode(sourceShadowNode, fragment) {
34
+ initialize();
35
+ }
36
+
37
+ private:
38
+ void initialize();
39
+ };
40
+
41
+ } // namespace facebook::react
@@ -0,0 +1,30 @@
1
+ /**
2
+ * This code was generated by
3
+ * [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be
6
+ * lost once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateStateH.js
9
+ */
10
+ #pragma once
11
+
12
+ #ifdef ANDROID
13
+ #include <folly/dynamic.h>
14
+ #endif
15
+
16
+ namespace facebook::react {
17
+
18
+ class REASharedTransitionBoundaryState {
19
+ public:
20
+ REASharedTransitionBoundaryState() = default;
21
+
22
+ #ifdef ANDROID
23
+ REASharedTransitionBoundaryState(REASharedTransitionBoundaryState const &previousState, folly::dynamic const &data) {}
24
+ folly::dynamic getDynamic() const {
25
+ return {};
26
+ }
27
+ #endif
28
+ };
29
+
30
+ } // namespace facebook::react
@@ -10,12 +10,8 @@ AnimatedSensorModule::AnimatedSensorModule(const PlatformDepMethodsHolder &platf
10
10
  : platformRegisterSensorFunction_(platformDepMethodsHolder.registerSensor),
11
11
  platformUnregisterSensorFunction_(platformDepMethodsHolder.unregisterSensor) {}
12
12
 
13
- AnimatedSensorModule::~AnimatedSensorModule() {
14
- react_native_assert(sensorsIds_.empty() && "Tried to deallocate AnimatedSensorModule with registered sensors");
15
- }
16
-
17
13
  jsi::Value AnimatedSensorModule::registerSensor(
18
- jsi::Runtime &rt,
14
+ jsi::Runtime &rnRuntime,
19
15
  const std::shared_ptr<WorkletRuntime> &uiWorkletRuntime,
20
16
  const jsi::Value &sensorTypeValue,
21
17
  const jsi::Value &interval,
@@ -23,8 +19,11 @@ jsi::Value AnimatedSensorModule::registerSensor(
23
19
  const jsi::Value &sensorDataHandler) {
24
20
  SensorType sensorType = static_cast<SensorType>(sensorTypeValue.asNumber());
25
21
 
26
- auto serializableHandler = extractSerializableOrThrow<SerializableWorklet>(
27
- rt, sensorDataHandler, "[Reanimated] Sensor event handler must be a worklet.");
22
+ auto serializableHandler = extractSerializable(
23
+ rnRuntime,
24
+ sensorDataHandler,
25
+ "[Reanimated] Sensor event handler must be a worklet.",
26
+ Serializable::ValueType::WorkletType);
28
27
 
29
28
  int sensorId = platformRegisterSensorFunction_(
30
29
  static_cast<int>(sensorType),
@@ -37,7 +36,7 @@ jsi::Value AnimatedSensorModule::registerSensor(
37
36
  return;
38
37
  }
39
38
 
40
- jsi::Runtime &uiRuntime = uiWorkletRuntime->getJSIRuntime();
39
+ jsi::Runtime &uiRuntime = getJSIRuntimeFromWorkletRuntime(uiWorkletRuntime);
41
40
  jsi::Object value(uiRuntime);
42
41
  if (sensorType == SensorType::ROTATION_VECTOR) {
43
42
  // TODO: timestamp should be provided by the platform implementation
@@ -57,7 +56,7 @@ jsi::Value AnimatedSensorModule::registerSensor(
57
56
  }
58
57
  value.setProperty(uiRuntime, "interfaceOrientation", orientationDegrees);
59
58
 
60
- uiWorkletRuntime->runSync(serializableHandler, value);
59
+ runSyncOnRuntime(uiWorkletRuntime, serializableHandler, jsi::Value(uiRuntime, value));
61
60
  });
62
61
  if (sensorId != -1) {
63
62
  sensorsIds_.insert(sensorId);
@@ -1,10 +1,8 @@
1
1
  #pragma once
2
2
 
3
+ #include <reanimated/Compat/WorkletsApi.h>
3
4
  #include <reanimated/Tools/PlatformDepMethodsHolder.h>
4
5
 
5
- #include <worklets/SharedItems/Serializable.h>
6
- #include <worklets/WorkletRuntime/WorkletRuntime.h>
7
-
8
6
  #include <jsi/jsi.h>
9
7
 
10
8
  #include <memory>
@@ -30,11 +28,10 @@ class AnimatedSensorModule {
30
28
 
31
29
  public:
32
30
  explicit AnimatedSensorModule(const PlatformDepMethodsHolder &platformDepMethodsHolder);
33
- ~AnimatedSensorModule();
34
31
 
35
32
  jsi::Value registerSensor(
36
- jsi::Runtime &rt,
37
- const std::shared_ptr<WorkletRuntime> &uiWorkletRuntime,
33
+ jsi::Runtime &rnRuntime,
34
+ const std::shared_ptr<WorkletRuntime> &uiRuntime,
38
35
  const jsi::Value &sensorType,
39
36
  const jsi::Value &interval,
40
37
  const jsi::Value &iosReferenceFrame,