@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
@@ -0,0 +1,140 @@
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a MIT license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #include "PseudoSelectorManager.h"
6
+
7
+ namespace rnoh {
8
+
9
+ using reanimated::PseudoSelector;
10
+
11
+ PseudoSelectorManager::PseudoSelectorManager(AncestryProvider ancestryProvider)
12
+ : m_ancestryProvider(std::move(ancestryProvider)) {}
13
+
14
+ void PseudoSelectorManager::attach(facebook::react::Tag tag, PseudoSelector selector,
15
+ SelectorStateCallback callback) {
16
+ std::lock_guard<std::mutex> lock(m_mutex);
17
+ m_entries[tag][selector] = Entry{std::move(callback), false};
18
+ }
19
+
20
+ void PseudoSelectorManager::detach(facebook::react::Tag tag, PseudoSelector selector) {
21
+ std::lock_guard<std::mutex> lock(m_mutex);
22
+ auto it = m_entries.find(tag);
23
+ if (it == m_entries.end()) {
24
+ return;
25
+ }
26
+ it->second.erase(selector);
27
+ if (it->second.empty()) {
28
+ m_entries.erase(it);
29
+ }
30
+ }
31
+
32
+ void PseudoSelectorManager::handleRawEvent(facebook::react::RawEvent const &rawEvent) {
33
+ const auto &type = rawEvent.type;
34
+ const bool isPointerEvent = type == "topPointerEnter" || type == "topPointerLeave";
35
+ const bool isTouchEvent = type == "topTouchStart" || type == "topTouchEnd" || type == "topTouchCancel";
36
+ const bool isFocusEvent = type == "topFocus" || type == "topBlur";
37
+ if (!isPointerEvent && !isTouchEvent && !isFocusEvent) {
38
+ return;
39
+ }
40
+
41
+ if (rawEvent.eventTarget == nullptr) {
42
+ return;
43
+ }
44
+ const auto tag = rawEvent.eventTarget->getTag();
45
+
46
+ if (type == "topPointerEnter") {
47
+ m_hoveredTags.insert(tag);
48
+ } else if (type == "topPointerLeave") {
49
+ m_hoveredTags.erase(tag);
50
+ } else if (type == "topTouchStart") {
51
+ if (m_pressedTouchCounts[tag]++ == 0) {
52
+ m_pressedChains[tag] = m_ancestryProvider ? m_ancestryProvider(tag)
53
+ : std::vector<facebook::react::Tag>{tag};
54
+ }
55
+ } else if (type == "topTouchEnd" || type == "topTouchCancel") {
56
+ auto it = m_pressedTouchCounts.find(tag);
57
+ if (it != m_pressedTouchCounts.end() && --it->second == 0) {
58
+ m_pressedTouchCounts.erase(it);
59
+ m_pressedChains.erase(tag);
60
+ }
61
+ } else if (type == "topFocus") {
62
+ m_focusedTag = tag;
63
+ m_focusedChain.clear();
64
+ if (m_ancestryProvider) {
65
+ for (auto ancestor : m_ancestryProvider(tag)) {
66
+ m_focusedChain.insert(ancestor);
67
+ }
68
+ } else {
69
+ m_focusedChain.insert(tag);
70
+ }
71
+ } else { // topBlur
72
+ if (m_focusedTag.has_value() && *m_focusedTag == tag) {
73
+ m_focusedTag.reset();
74
+ m_focusedChain.clear();
75
+ }
76
+ }
77
+
78
+ recomputeAndNotify();
79
+ }
80
+
81
+ void PseudoSelectorManager::recomputeAndNotify() {
82
+ std::vector<std::pair<SelectorStateCallback, bool>> notifications;
83
+ {
84
+ std::lock_guard<std::mutex> lock(m_mutex);
85
+ if (m_entries.empty()) {
86
+ return;
87
+ }
88
+
89
+ std::unordered_set<facebook::react::Tag> pressedTags;
90
+ std::unordered_set<facebook::react::Tag> deepestActiveTags;
91
+ for (const auto &entry : m_pressedChains) {
92
+ bool deepestFound = false;
93
+ for (auto chainTag : entry.second) {
94
+ pressedTags.insert(chainTag);
95
+ if (!deepestFound) {
96
+ auto tagIt = m_entries.find(chainTag);
97
+ if (tagIt != m_entries.end() && tagIt->second.count(PseudoSelector::ActiveDeepest) > 0) {
98
+ deepestActiveTags.insert(chainTag);
99
+ deepestFound = true;
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ for (auto &tagEntry : m_entries) {
106
+ const auto tag = tagEntry.first;
107
+ for (auto &selectorEntry : tagEntry.second) {
108
+ const auto selector = selectorEntry.first;
109
+ auto &entry = selectorEntry.second;
110
+ bool active = false;
111
+ switch (selector) {
112
+ case PseudoSelector::Hover:
113
+ active = m_hoveredTags.count(tag) > 0;
114
+ break;
115
+ case PseudoSelector::Active:
116
+ active = pressedTags.count(tag) > 0;
117
+ break;
118
+ case PseudoSelector::ActiveDeepest:
119
+ active = deepestActiveTags.count(tag) > 0;
120
+ break;
121
+ case PseudoSelector::Focus:
122
+ active = m_focusedTag.has_value() && *m_focusedTag == tag;
123
+ break;
124
+ case PseudoSelector::FocusWithin:
125
+ active = m_focusedChain.count(tag) > 0;
126
+ break;
127
+ }
128
+ if (active != entry.lastReported) {
129
+ entry.lastReported = active;
130
+ notifications.emplace_back(entry.callback, active);
131
+ }
132
+ }
133
+ }
134
+ }
135
+ for (auto &notification : notifications) {
136
+ notification.first(notification.second);
137
+ }
138
+ }
139
+
140
+ } // namespace rnoh
@@ -0,0 +1,52 @@
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a MIT license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #pragma once
6
+
7
+ #include <react/renderer/core/ReactPrimitives.h>
8
+ #include <react/renderer/core/RawEvent.h>
9
+ #include <reanimated/PseudoStyles/PseudoSelector.h>
10
+
11
+ #include <functional>
12
+ #include <map>
13
+ #include <mutex>
14
+ #include <optional>
15
+ #include <unordered_map>
16
+ #include <unordered_set>
17
+ #include <vector>
18
+
19
+ namespace rnoh {
20
+
21
+ class PseudoSelectorManager {
22
+ public:
23
+ using SelectorStateCallback = std::function<void(bool)>;
24
+ using AncestryProvider = std::function<std::vector<facebook::react::Tag>(facebook::react::Tag)>;
25
+
26
+ explicit PseudoSelectorManager(AncestryProvider ancestryProvider);
27
+
28
+ void attach(facebook::react::Tag tag, reanimated::PseudoSelector selector, SelectorStateCallback callback);
29
+ void detach(facebook::react::Tag tag, reanimated::PseudoSelector selector);
30
+ void handleRawEvent(facebook::react::RawEvent const &rawEvent);
31
+
32
+ private:
33
+ struct Entry {
34
+ SelectorStateCallback callback;
35
+ bool lastReported = false;
36
+ };
37
+
38
+ void recomputeAndNotify();
39
+
40
+ AncestryProvider m_ancestryProvider;
41
+
42
+ std::mutex m_mutex;
43
+ std::unordered_map<facebook::react::Tag, std::map<reanimated::PseudoSelector, Entry>> m_entries;
44
+
45
+ std::unordered_set<facebook::react::Tag> m_hoveredTags;
46
+ std::unordered_map<facebook::react::Tag, size_t> m_pressedTouchCounts;
47
+ std::unordered_map<facebook::react::Tag, std::vector<facebook::react::Tag>> m_pressedChains;
48
+ std::optional<facebook::react::Tag> m_focusedTag;
49
+ std::unordered_set<facebook::react::Tag> m_focusedChain;
50
+ };
51
+
52
+ } // namespace rnoh
@@ -0,0 +1,45 @@
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a MIT license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #include "REASharedTransitionBoundaryComponentInstance.h"
6
+
7
+ namespace rnoh {
8
+
9
+ REASharedTransitionBoundaryComponentInstance::REASharedTransitionBoundaryComponentInstance(
10
+ Context context)
11
+ : CppComponentInstance(std::move(context)), m_customNode(m_arkUINodeCtx) {}
12
+
13
+ void REASharedTransitionBoundaryComponentInstance::onChildInserted(
14
+ ComponentInstance::Shared const& childComponentInstance,
15
+ std::size_t index) {
16
+ CppComponentInstance::onChildInserted(childComponentInstance, index);
17
+ m_customNode.insertChild(childComponentInstance->getLocalRootArkUINode(), index);
18
+ }
19
+
20
+ void REASharedTransitionBoundaryComponentInstance::onChildRemoved(
21
+ ComponentInstance::Shared const& childComponentInstance) {
22
+ CppComponentInstance::onChildRemoved(childComponentInstance);
23
+ m_customNode.removeChild(childComponentInstance->getLocalRootArkUINode());
24
+ }
25
+
26
+ CustomNode& REASharedTransitionBoundaryComponentInstance::getLocalRootArkUINode() {
27
+ return m_customNode;
28
+ }
29
+
30
+ void REASharedTransitionBoundaryComponentInstance::onLayoutChanged(
31
+ facebook::react::LayoutMetrics const& layoutMetrics) {
32
+ auto adjusted = layoutMetrics;
33
+ const auto scaleFactor =
34
+ layoutMetrics.pointScaleFactor > 0 ? layoutMetrics.pointScaleFactor : 1.f;
35
+ const auto minSize = 1.f / scaleFactor; // rounds to >= 1px in setLayoutRect
36
+ if (adjusted.frame.size.width < minSize) {
37
+ adjusted.frame.size.width = minSize;
38
+ }
39
+ if (adjusted.frame.size.height < minSize) {
40
+ adjusted.frame.size.height = minSize;
41
+ }
42
+ CppComponentInstance::onLayoutChanged(adjusted);
43
+ }
44
+
45
+ } // namespace rnoh
@@ -0,0 +1,33 @@
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a MIT license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #pragma once
6
+
7
+ #include "Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.h"
8
+ #include "RNOH/CppComponentInstance.h"
9
+ #include "RNOH/arkui/CustomNode.h"
10
+
11
+ namespace rnoh {
12
+
13
+ class REASharedTransitionBoundaryComponentInstance
14
+ : public CppComponentInstance<facebook::react::REASharedTransitionBoundaryShadowNode> {
15
+ private:
16
+ CustomNode m_customNode;
17
+
18
+ public:
19
+ explicit REASharedTransitionBoundaryComponentInstance(Context context);
20
+
21
+ void onChildInserted(
22
+ ComponentInstance::Shared const& childComponentInstance,
23
+ std::size_t index) override;
24
+
25
+ void onChildRemoved(
26
+ ComponentInstance::Shared const& childComponentInstance) override;
27
+
28
+ CustomNode& getLocalRootArkUINode() override;
29
+
30
+ void onLayoutChanged(facebook::react::LayoutMetrics const& layoutMetrics) override;
31
+ };
32
+
33
+ } // namespace rnoh
@@ -0,0 +1,20 @@
1
+ // Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved
2
+ // Use of this source code is governed by a MIT license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #pragma once
6
+
7
+ #include "RNOHCorePackage/ComponentBinders/ViewComponentJSIBinder.h"
8
+
9
+ namespace rnoh {
10
+
11
+ class REASharedTransitionBoundaryJSIBinder : public ViewComponentJSIBinder {
12
+ protected:
13
+ facebook::jsi::Object createNativeProps(facebook::jsi::Runtime& rt) override {
14
+ auto nativeProps = ViewComponentJSIBinder::createNativeProps(rt);
15
+ nativeProps.setProperty(rt, "isActive", true);
16
+ return nativeProps;
17
+ }
18
+ };
19
+
20
+ } // namespace rnoh
@@ -1,19 +1,20 @@
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
5
  #include "RNOH/ArkTSTurboModule.h"
6
6
  #include "RNOH/RNInstance.h"
7
7
  #include "ReanimatedModule.h"
8
+ #include "PseudoSelectorManager.h"
8
9
  #include "ReanimatedSensorContainer.h"
9
- #include "ReanimatedUIScheduler.h"
10
10
  #include "PlatformDepMethodsHolder.h"
11
11
  #include "WorkletRuntimeCollector.h"
12
12
  #include "RNRuntimeDecorator.h"
13
13
  #include "TransformParser.h"
14
14
  #include "RNOH/RNInstanceCAPI.h"
15
15
  #include "WorkletsModule.h"
16
-
16
+ #include "ReanimatedNodesManager.h"
17
+ #include "OHOSCSSPlatformTransitions.h"
17
18
  using namespace facebook;
18
19
  using namespace reanimated;
19
20
  using namespace worklets;
@@ -37,7 +38,7 @@ ReanimatedModule::ReanimatedModule(const ArkTSTurboModule::Context ctx, const st
37
38
  }
38
39
 
39
40
  ReanimatedModule::~ReanimatedModule() {
40
- LOG(INFO) << "ReanimatedModule::~ReanimatedModule";
41
+ DLOG(INFO) << "ReanimatedModule::~ReanimatedModule";
41
42
  if (eventListener) {
42
43
  m_ctx.scheduler->removeEventListener(eventListener);
43
44
  }
@@ -45,16 +46,15 @@ ReanimatedModule::~ReanimatedModule() {
45
46
  keyboardEventDataUpdater_ = nullptr;
46
47
  }
47
48
  if (auto nativeReanimatedModule = weakNativeReanimatedModule_.lock()) {
48
- nativeReanimatedModule->invalidate();
49
+ nativeReanimatedModule->cleanupSensors();
49
50
  }
50
51
  }
51
52
 
52
53
  void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
53
54
  if (!m_ctx.taskExecutor->isOnTaskThread(rnoh::TaskThread::JS)) {
54
- DLOG(ERROR) << "react_worklets reanimated installTurboModule failed,because of current thread is not js;";
55
+ DLOG(ERROR) << "[reanimated] reanimated installTurboModule failed,because of current thread is not js;";
55
56
  return;
56
57
  }
57
-
58
58
  auto runMainThreadFuc = [weakExecutor = std::weak_ptr(m_ctx.taskExecutor)](TaskExecutor::Task &&task) {
59
59
  if (auto taskExecutor = weakExecutor.lock()) {
60
60
  taskExecutor->runTask(TaskThread::MAIN, std::move(task));
@@ -115,11 +115,13 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
115
115
  self->keyboardEventDataUpdater_ = std::move(keyboardEventDataUpdater);
116
116
  auto weakExecutor = std::weak_ptr(self->m_ctx.taskExecutor);
117
117
  if (auto taskExecutor = weakExecutor.lock()) {
118
- taskExecutor->runTask(TaskThread::MAIN, [ctx = self->m_ctx, isStatusBarTranslucent]() {
118
+ taskExecutor->runTask(TaskThread::MAIN, [ctx = self->m_ctx, isStatusBarTranslucent, isNavigationBarTranslucent]() {
119
119
  ArkJS arkJs(ctx.env);
120
- // arkJs.createBoolean(isStatusBarTranslucent);
121
120
  auto napiTurboModuleObject = arkJs.getObject(ctx.arkTSTurboModuleInstanceRef);
122
- napiTurboModuleObject.call("subscribeKeyBordListeners", {});
121
+ napiTurboModuleObject.call("subscribeKeyBordListeners", {
122
+ arkJs.createBoolean(isStatusBarTranslucent),
123
+ arkJs.createBoolean(isNavigationBarTranslucent),
124
+ });
123
125
  });
124
126
  }
125
127
  return 0;
@@ -151,6 +153,65 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
151
153
  napiTurboModuleObject.call("setGestureHandlerState", {napiTag, napiState});
152
154
  };
153
155
 
156
+ auto pseudoSelectorManager = std::make_shared<PseudoSelectorManager>(
157
+ [weakInstance = std::weak_ptr(m_ctx.instance)](facebook::react::Tag tag) {
158
+ std::vector<facebook::react::Tag> chain;
159
+ auto instance = weakInstance.lock();
160
+ auto instanceCapi = std::dynamic_pointer_cast<RNInstanceCAPI>(instance);
161
+ if (!instanceCapi) {
162
+ chain.push_back(tag);
163
+ return chain;
164
+ }
165
+ auto componentInstance = instanceCapi->findComponentInstanceByTag(tag);
166
+ while (componentInstance != nullptr && chain.size() < 512) {
167
+ chain.push_back(componentInstance->getTag());
168
+ componentInstance = componentInstance->getParent().lock();
169
+ }
170
+ if (chain.empty()) {
171
+ chain.push_back(tag);
172
+ }
173
+ return chain;
174
+ });
175
+ pseudoSelectorManager_ = pseudoSelectorManager;
176
+ auto attachPseudoSelector = [pseudoSelectorManager](Tag tag, PseudoSelector pseudoSelector,
177
+ std::function<void(bool)> callback) {
178
+ pseudoSelectorManager->attach(tag, pseudoSelector, std::move(callback));
179
+ };
180
+ auto detachPseudoSelector = [pseudoSelectorManager](Tag tag, PseudoSelector pseudoSelector) {
181
+ pseudoSelectorManager->detach(tag, pseudoSelector);
182
+ };
183
+
184
+ // CSS transition routing backend (IOS_CSS_CORE_ANIMATION flag)
185
+ auto cssPlatformTransitions = std::make_shared<css::OHOSCSSPlatformTransitions>(
186
+ m_ctx.instance, std::weak_ptr(m_ctx.taskExecutor));
187
+ auto cssCanRouteProperty = [](const std::string &propertyName, const css::EasingConfig &easing) {
188
+ return css::canRouteCSSProperty(propertyName, easing);
189
+ };
190
+ auto cssApplyTransitionJSI = [cssPlatformTransitions](
191
+ jsi::Runtime &rt,
192
+ Tag viewTag,
193
+ const std::string &propertyName,
194
+ const jsi::Value &fromValue,
195
+ const jsi::Value &toValue,
196
+ const css::CSSTransitionPropertySettings &settings,
197
+ double timestamp) {
198
+ return cssPlatformTransitions->applyTransitionForTag(
199
+ rt, viewTag, propertyName, fromValue, toValue, settings, timestamp);
200
+ };
201
+ auto cssApplyTransitionDynamic = [cssPlatformTransitions](
202
+ Tag viewTag,
203
+ const std::string &propertyName,
204
+ const folly::dynamic &fromValue,
205
+ const folly::dynamic &toValue,
206
+ double timestamp) {
207
+ return cssPlatformTransitions->applyDynamicTransitionForTag(
208
+ viewTag, propertyName, fromValue, toValue, timestamp);
209
+ };
210
+ auto cssRemoveTransition = [cssPlatformTransitions](
211
+ Tag viewTag, const std::string &propertyName) {
212
+ cssPlatformTransitions->removeTransitionForTag(viewTag, propertyName);
213
+ };
214
+
154
215
  PlatformDepMethodsHolder platformDepMethodsHolder = {
155
216
  requestRender,
156
217
  synchronouslyUpdateUIPropsFunction,
@@ -161,8 +222,27 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
161
222
  subscribeForKeyboardEventsFunction,
162
223
  unsubscribeFromKeyboardEventsFunction,
163
224
  maybeFlushUIUpdatesQueueFunction,
225
+ attachPseudoSelector,
226
+ detachPseudoSelector,
227
+ cssCanRouteProperty,
228
+ cssApplyTransitionJSI,
229
+ cssApplyTransitionDynamic,
230
+ cssRemoveTransition,
164
231
  };
165
- auto isReducedMotion = false; // ANIMATOR_DURATION_SCALE
232
+ bool isReducedMotion = false; // ANIMATOR_DURATION_SCALE
233
+ m_ctx.taskExecutor->runSyncTask(TaskThread::MAIN,
234
+ [ctx = m_ctx, &isReducedMotion]() {
235
+ if (!ctx.arkTSTurboModuleInstanceRef) {
236
+ return;
237
+ }
238
+ ArkJS arkJs(ctx.env);
239
+ auto napiTurboModuleObject =
240
+ arkJs.getObject(ctx.arkTSTurboModuleInstanceRef);
241
+ auto napiResult =
242
+ napiTurboModuleObject.call("isReducedMotionEnabled", {});
243
+ isReducedMotion = arkJs.getBoolean(napiResult);
244
+ });
245
+
166
246
  auto workletsModule = [weakSelf = weak_from_this()]() -> std::shared_ptr<WorkletsModule> {
167
247
  auto self = weakSelf.lock();
168
248
  if (!self) {
@@ -174,28 +254,43 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
174
254
  }
175
255
  return instance->getTurboModule<WorkletsModule>("WorkletsModule");
176
256
  };
257
+ auto workletsModuleInstance = workletsModule();
258
+ if (workletsModuleInstance == nullptr) {
259
+ DLOG(ERROR) << "[reanimated] WorkletsModule not found; install worklets before reanimated";
260
+ return;
261
+ }
262
+ auto workletsProxy = workletsModuleInstance->getWorkletsModuleProxy();
263
+ if (workletsProxy == nullptr) {
264
+ DLOG(ERROR) << "[reanimated] WorkletsModuleProxy not initialized yet "
265
+ "(installTurboModule must run first)";
266
+ return;
267
+ }
268
+
177
269
  auto reanimatedModuleProxy = std::make_shared<ReanimatedModuleProxy>(
178
- workletsModule()->getWorkletsModuleProxy(), rt, jsInvoker_, platformDepMethodsHolder, isReducedMotion);
270
+ workletsProxy->getUIWorkletRuntime(), workletsProxy->getUIScheduler(), rt, jsInvoker_,
271
+ platformDepMethodsHolder, isReducedMotion);
179
272
  reanimatedModuleProxy->init(platformDepMethodsHolder);
273
+ nativeReanimatedModule_ = reanimatedModuleProxy;
180
274
  weakNativeReanimatedModule_ = reanimatedModuleProxy;
181
275
 
182
276
  ReanimatedPerformOperations reanimatedPerformOperations = [weakNativeReanimatedModule =
183
277
  weakNativeReanimatedModule_]() {
184
278
  if (auto nativeReanimatedModule = weakNativeReanimatedModule.lock()) {
185
- nativeReanimatedModule->performOperations(false);
279
+ nativeReanimatedModule->performOperations();
186
280
  }
187
281
  };
188
282
  nodesManager->registerPerformOperations(reanimatedPerformOperations);
189
283
 
190
284
  WorkletRuntimeCollector::install(rt);
191
- auto &uiRuntime = workletsModule()->getWorkletsModuleProxy()->getUIWorkletRuntime()->getJSIRuntime();
285
+ auto &uiRuntime = workletsProxy->getUIWorkletRuntime()->getJSIRuntime();
192
286
 
193
287
  RNRuntimeDecorator::decorate(rt, uiRuntime, reanimatedModuleProxy);
194
288
  injectDependencies(rt);
195
289
 
196
290
  eventListener = std::make_shared<facebook::react::EventListener>(
197
291
  [weakNativeReanimatedModule = weakNativeReanimatedModule_,
198
- weakTaskExecutor = std::weak_ptr{m_ctx.taskExecutor}](facebook::react::RawEvent const &rawEvent) {
292
+ weakTaskExecutor = std::weak_ptr{m_ctx.taskExecutor},
293
+ pseudoSelectorManager](facebook::react::RawEvent const &rawEvent) {
199
294
  auto taskExecutor = weakTaskExecutor.lock();
200
295
  auto nativeReanimatedModule = weakNativeReanimatedModule.lock();
201
296
  if (!nativeReanimatedModule || !taskExecutor || !taskExecutor->isOnTaskThread(TaskThread::MAIN)) {
@@ -204,10 +299,8 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
204
299
 
205
300
  auto eventType = rawEvent.type;
206
301
  auto frameTime = getMillisSinceEpoch();
207
-
208
- // React Native prefixes event names with "top". If the event name starts with "on", the result is that the
209
- // event on the native side is prefixed with "topOn", while the JS side expects the event name to be without
210
- // the "on" prefix.
302
+
303
+ pseudoSelectorManager->handleRawEvent(rawEvent);
211
304
  if (eventType.rfind("topOn", 0) == 0) {
212
305
  auto eventCopy = rawEvent;
213
306
  eventCopy.type = "on" + eventType.substr(5);
@@ -1,12 +1,12 @@
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
5
  #pragma once
6
6
 
7
7
  #include "RNOH/ArkTSTurboModule.h"
8
+ #include "PseudoSelectorManager.h"
8
9
  #include "ReanimatedModuleProxy.h"
9
- #include "ReanimatedNodesManager.h"
10
10
 
11
11
  namespace rnoh {
12
12
  class JSI_EXPORT ReanimatedModule : public std::enable_shared_from_this<ReanimatedModule>, public ArkTSTurboModule {
@@ -16,9 +16,11 @@ public:
16
16
  void installTurboModule(facebook::jsi::Runtime &rt);
17
17
  void callKeyBord(double height, int status);
18
18
  private:
19
+ std::shared_ptr<reanimated::ReanimatedModuleProxy> nativeReanimatedModule_;
19
20
  std::weak_ptr<reanimated::ReanimatedModuleProxy> weakNativeReanimatedModule_;
20
21
  void injectDependencies(facebook::jsi::Runtime &rt);
21
22
  std::shared_ptr<facebook::react::EventListener> eventListener;
22
23
  std::function<void(int keyboardState, int height)> keyboardEventDataUpdater_;
24
+ std::shared_ptr<PseudoSelectorManager> pseudoSelectorManager_;
23
25
  };
24
26
  } // namespace rnoh
@@ -1,4 +1,4 @@
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
 
@@ -1,4 +1,4 @@
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
 
@@ -1,9 +1,13 @@
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
5
  #include "ReanimatedPackage.h"
6
6
  #include "ReanimatedModule.h"
7
+ #include "REASharedTransitionBoundaryComponentInstance.h"
8
+
9
+ #include "REASharedTransitionBoundaryJSIBinder.h"
10
+ #include "Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryComponentDescriptor.h"
7
11
 
8
12
  using namespace rnoh;
9
13
  using namespace facebook;
@@ -42,3 +46,22 @@ std::vector<ArkTSMessageHandler::Shared> ReanimatedPackage::createArkTSMessageHa
42
46
  {
43
47
  return { std::make_shared<ReanimatedArkTsMessage>() };
44
48
  }
49
+
50
+ std::vector<react::ComponentDescriptorProvider> ReanimatedPackage::createComponentDescriptorProviders()
51
+ {
52
+ return { react::concreteComponentDescriptorProvider<
53
+ react::REASharedTransitionBoundaryComponentDescriptor>() };
54
+ }
55
+
56
+ ComponentInstance::Shared ReanimatedPackage::createComponentInstance(const ComponentInstance::Context& ctx)
57
+ {
58
+ if (ctx.componentName == "REASharedTransitionBoundary") {
59
+ return std::make_shared<REASharedTransitionBoundaryComponentInstance>(ctx);
60
+ }
61
+ return Package::createComponentInstance(ctx);
62
+ }
63
+
64
+ ComponentJSIBinderByString ReanimatedPackage::createComponentJSIBinderByName()
65
+ {
66
+ return { { "REASharedTransitionBoundary", std::make_shared<REASharedTransitionBoundaryJSIBinder>() } };
67
+ }
@@ -1,7 +1,6 @@
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
-
5
4
  #include "RNOH/Package.h"
6
5
 
7
6
  namespace rnoh {
@@ -12,5 +11,11 @@ public:
12
11
  std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override;
13
12
 
14
13
  std::vector<ArkTSMessageHandler::Shared> createArkTSMessageHandlers() override;
14
+
15
+ std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override;
16
+
17
+ ComponentInstance::Shared createComponentInstance(const ComponentInstance::Context& ctx) override;
18
+
19
+ ComponentJSIBinderByString createComponentJSIBinderByName() override;
15
20
  };
16
21
  } // namespace rnoh