@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.
- package/CHANGELOG.md +1070 -0
- package/LICENSE +21 -0
- package/README.md +842 -0
- package/compatibility.json +20 -26
- package/harmony/reanimated/BuildProfile.ets +1 -1
- package/harmony/reanimated/index.ets +4 -2
- package/harmony/reanimated/oh-package-lock.json5 +1 -1
- package/harmony/reanimated/oh-package.json5 +1 -1
- package/harmony/reanimated/src/main/cpp/CMakeLists.txt +23 -9
- package/harmony/reanimated/src/main/cpp/Common/NativeView/CMakeLists.txt +56 -0
- package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/ComponentDescriptors.h +19 -0
- package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryComponentDescriptor.h +30 -0
- package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.cpp +15 -0
- package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryShadowNode.h +41 -0
- package/harmony/reanimated/src/main/cpp/Common/NativeView/react/renderer/components/rnreanimated/REASharedTransitionBoundaryState.h +30 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.cpp +8 -9
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h +3 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/InterpolatorRegistry.cpp +203 -150
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/InterpolatorRegistry.h +1 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/definitions.h +2 -7
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSAngle.cpp +0 -1
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSColor.cpp +2 -18
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.cpp +11 -11
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.h +2 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSLength.cpp +4 -1
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSNumber.cpp +5 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSNumber.h +8 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValue.h +27 -46
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.cpp +20 -20
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSValueVariant.h +2 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/complex/CSSDropShadow.h +3 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSAnimationConfig.cpp +10 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSAnimationConfig.h +5 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSKeyframesConfig.cpp +20 -17
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSKeyframesConfig.h +5 -8
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSTransitionConfig.cpp +33 -66
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/CSSTransitionConfig.h +29 -22
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/common.cpp +14 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/configs/common.h +8 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimation.cpp +50 -91
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimation.h +43 -18
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimationsGroup.cpp +63 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSAnimationsGroup.h +37 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSLoopAnimation.cpp +100 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSLoopAnimation.h +49 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSPlatformAnimation.h +13 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSPlatformAnimationFactory.h +32 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSLoopTransition.cpp +156 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSLoopTransition.h +71 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSPlatformTransitionProxy.cpp +141 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSPlatformTransitionProxy.h +104 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSTransition.cpp +97 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/transition/CSSTransition.h +69 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/easing/EasingConfigs.cpp +89 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/easing/EasingConfigs.h +36 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/InterpolatorFactory.cpp +12 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/InterpolatorFactory.h +11 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp +2 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.h +3 -5
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/filters/FilterOperation.cpp +3 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/filters/FilterOperation.h +1 -1
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/ArrayPropertiesInterpolator.cpp +38 -37
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/ArrayPropertiesInterpolator.h +3 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/RecordPropertiesInterpolator.cpp +54 -32
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/groups/RecordPropertiesInterpolator.h +5 -7
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/OperationsStyleInterpolator.cpp +46 -46
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/OperationsStyleInterpolator.h +8 -7
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/operations/StyleOperation.h +4 -57
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolator.cpp +23 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolator.h +10 -8
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolatorFactory.cpp +77 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/AnimationStyleInterpolatorFactory.h +38 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/TransitionStyleInterpolator.cpp +47 -68
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/styles/TransitionStyleInterpolator.h +21 -9
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperation.cpp +4 -1
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.cpp +35 -78
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.h +44 -13
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/transforms/operations/matrix.cpp +13 -11
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ResolvableValueInterpolator.cpp +4 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/SimpleValueInterpolator.cpp +7 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ValueInterpolator.cpp +20 -27
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/interpolation/values/ValueInterpolator.h +12 -9
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.cpp +63 -36
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.h +6 -8
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.cpp +55 -46
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.h +8 -5
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/RawProgressProvider.cpp +1 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/RawProgressProvider.h +3 -2
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/TransitionProgressProvider.cpp +76 -71
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/progress/TransitionProgressProvider.h +17 -14
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSAnimationsRegistry.cpp +145 -273
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSAnimationsRegistry.h +43 -44
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSKeyframesRegistry.cpp +19 -19
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSKeyframesRegistry.h +16 -12
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSTransitionsRegistry.cpp +95 -114
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/CSSTransitionsRegistry.h +38 -25
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.cpp +9 -34
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.h +0 -10
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthArray.cpp +47 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthArray.h +24 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthVector.cpp +87 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/CSSLengthVector.h +28 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGPath.cpp +326 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGPath.h +65 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStops.cpp +164 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStops.h +51 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.cpp +14 -66
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.h +7 -18
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/platform.cpp +284 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/platform.h +31 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/props.cpp +13 -132
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/props.h +3 -21
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/reversingShortening.h +43 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Compat/WorkletsApi.h +13 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandler.cpp +33 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandler.h +39 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandlerRegistry.cpp +95 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Events/UIEventHandlerRegistry.h +40 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp +20 -23
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +2 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +26 -18
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +4 -8
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp +16 -28
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h +3 -4
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp +72 -24
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.h +17 -7
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/OperationsLoop.cpp +152 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/OperationsLoop.h +86 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/PropsLayoutFilter.h +98 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp +162 -28
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.h +69 -11
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.cpp +41 -17
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.h +14 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/updates/propNameFromString.h +130 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.cpp +1 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h +5 -7
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.cpp +7 -4
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +52 -9
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp +174 -62
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h +12 -11
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp +251 -128
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.h +23 -19
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.h +34 -6
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp +71 -64
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +938 -700
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +123 -76
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/SynchronousPropsBufferSerializer.cpp +313 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/SynchronousPropsBufferSerializer.h +18 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoSelector.h +41 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoStylesRegistry.cpp +113 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/PseudoStyles/PseudoStylesRegistry.h +73 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp +4 -4
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.cpp +23 -48
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.h +13 -14
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/PlatformDepMethodsHolder.h +20 -3
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReaJSIUtils.h +227 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReanimatedVersion.cpp +51 -14
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReanimatedVersion.h +2 -5
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/SingleInstanceChecker.h +76 -0
- package/harmony/reanimated/src/main/cpp/OHOSCSSPlatformTransitions.cpp +353 -0
- package/harmony/reanimated/src/main/cpp/OHOSCSSPlatformTransitions.h +95 -0
- package/harmony/reanimated/src/main/cpp/PseudoSelectorManager.cpp +140 -0
- package/harmony/reanimated/src/main/cpp/PseudoSelectorManager.h +52 -0
- package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryComponentInstance.cpp +45 -0
- package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryComponentInstance.h +33 -0
- package/harmony/reanimated/src/main/cpp/REASharedTransitionBoundaryJSIBinder.h +20 -0
- package/harmony/reanimated/src/main/cpp/ReanimatedModule.cpp +112 -19
- package/harmony/reanimated/src/main/cpp/ReanimatedModule.h +4 -2
- package/harmony/reanimated/src/main/cpp/ReanimatedNodesManager.cpp +1 -1
- package/harmony/reanimated/src/main/cpp/ReanimatedNodesManager.h +1 -1
- package/harmony/reanimated/src/main/cpp/ReanimatedPackage.cpp +24 -1
- package/harmony/reanimated/src/main/cpp/ReanimatedPackage.h +7 -2
- package/harmony/reanimated/src/main/cpp/ReanimatedSensor.cpp +88 -57
- package/harmony/reanimated/src/main/cpp/ReanimatedSensor.h +4 -2
- package/harmony/reanimated/src/main/cpp/ReanimatedSensorContainer.cpp +1 -1
- package/harmony/reanimated/src/main/cpp/ReanimatedSensorContainer.h +1 -1
- package/harmony/reanimated/src/main/cpp/ReanimatedUIScheduler.cpp +9 -7
- package/harmony/reanimated/src/main/cpp/ReanimatedUIScheduler.h +6 -5
- package/harmony/reanimated/src/main/cpp/TransformParser.h +1 -1
- package/harmony/reanimated/src/main/cpp/codegen/react/renderer/components/rnreanimated/EventEmitters.h +19 -0
- package/harmony/reanimated/src/main/cpp/codegen/react/renderer/components/rnreanimated/Props.h +31 -0
- package/harmony/reanimated/src/main/ets/KeyboardState.ts +11 -0
- package/harmony/reanimated/src/main/ets/ReanimatedModule.ts +119 -19
- package/harmony/reanimated/src/main/ets/{ReanimatedPackage.ts → ReanimatedPackage.ets} +4 -3
- package/harmony/reanimated.har +0 -0
- package/package.json +52 -24
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSTransition.cpp +0 -145
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/core/CSSTransition.h +0 -47
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGLength.cpp +0 -93
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGLength.h +0 -36
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/DelayedItemsManager.cpp +0 -75
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/utils/DelayedItemsManager.h +0 -45
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.cpp +0 -183
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.h +0 -93
- package/harmony/reanimated/src/main/ets/AnimationManager.ts +0 -61
- /package/harmony/reanimated/{ts.ts → ts.ets} +0 -0
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
#include <react/renderer/scheduler/Scheduler.h>
|
|
6
6
|
#include <react/renderer/uimanager/UIManagerAnimationDelegate.h>
|
|
7
7
|
#include <react/renderer/uimanager/UIManagerBinding.h>
|
|
8
|
+
#include <reanimated/Compat/WorkletsApi.h>
|
|
8
9
|
#include <reanimated/LayoutAnimations/LayoutAnimationsManager.h>
|
|
9
10
|
#include <reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h>
|
|
10
11
|
#include <reanimated/LayoutAnimations/LayoutAnimationsUtils.h>
|
|
11
12
|
#include <reanimated/Tools/PlatformDepMethodsHolder.h>
|
|
12
|
-
#include <worklets/Tools/UIScheduler.h>
|
|
13
13
|
|
|
14
14
|
#include <memory>
|
|
15
15
|
#include <string>
|
|
@@ -24,7 +24,7 @@ class ReanimatedModuleProxy;
|
|
|
24
24
|
|
|
25
25
|
using namespace facebook;
|
|
26
26
|
|
|
27
|
-
typedef enum ExitingState_Legacy {
|
|
27
|
+
typedef enum class ExitingState_Legacy : std::uint8_t {
|
|
28
28
|
UNDEFINED = 1,
|
|
29
29
|
WAITING = 2,
|
|
30
30
|
ANIMATING = 4,
|
|
@@ -43,13 +43,13 @@ struct Node {
|
|
|
43
43
|
std::vector<std::shared_ptr<MutationNode>> children, unflattenedChildren;
|
|
44
44
|
std::shared_ptr<Node> parent, unflattenedParent;
|
|
45
45
|
Tag tag;
|
|
46
|
-
void removeChildFromUnflattenedTree(std::shared_ptr<MutationNode> child);
|
|
47
|
-
void applyMutationToIndices(ShadowViewMutation mutation);
|
|
46
|
+
void removeChildFromUnflattenedTree(const std::shared_ptr<MutationNode> &child);
|
|
47
|
+
void applyMutationToIndices(const ShadowViewMutation &mutation);
|
|
48
48
|
void insertChildren(std::vector<std::shared_ptr<MutationNode>> &newChildren);
|
|
49
49
|
void insertUnflattenedChildren(std::vector<std::shared_ptr<MutationNode>> &newChildren);
|
|
50
50
|
virtual bool isMutationNode();
|
|
51
51
|
explicit Node(const Tag tag) : tag(tag) {}
|
|
52
|
-
Node(Node &&node)
|
|
52
|
+
Node(Node &&node) noexcept
|
|
53
53
|
: children(std::move(node.children)), unflattenedChildren(std::move(node.unflattenedChildren)), tag(node.tag) {}
|
|
54
54
|
Node(Node &node) : children(node.children), unflattenedChildren(node.unflattenedChildren), tag(node.tag) {}
|
|
55
55
|
virtual ~Node() = default;
|
|
@@ -60,13 +60,13 @@ struct Node {
|
|
|
60
60
|
*/
|
|
61
61
|
struct MutationNode : public Node {
|
|
62
62
|
ShadowViewMutation mutation;
|
|
63
|
-
ExitingState_Legacy state = UNDEFINED;
|
|
63
|
+
ExitingState_Legacy state = ExitingState_Legacy::UNDEFINED;
|
|
64
64
|
explicit MutationNode(ShadowViewMutation &mutation) : Node(mutation.oldChildShadowView.tag), mutation(mutation) {}
|
|
65
65
|
MutationNode(ShadowViewMutation &mutation, Node &&node) : Node(std::move(node)), mutation(mutation) {}
|
|
66
66
|
bool isMutationNode() override;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
static inline bool isRNSScreen(std::shared_ptr<MutationNode> node) {
|
|
69
|
+
static inline bool isRNSScreen(const std::shared_ptr<MutationNode> &node) {
|
|
70
70
|
const auto &componentName = node->mutation.oldChildShadowView.componentName;
|
|
71
71
|
return !std::strcmp(componentName, "RNSScreenStack") || !std::strcmp(componentName, "RNSScreen") ||
|
|
72
72
|
!std::strcmp(componentName, "RNSModalScreen");
|
|
@@ -112,29 +112,29 @@ struct LayoutAnimationsProxy_Legacy : public LayoutAnimationsProxyCommon,
|
|
|
112
112
|
mutable std::unordered_set<SurfaceId> surfacesToRemove_;
|
|
113
113
|
|
|
114
114
|
LayoutAnimationsProxy_Legacy(
|
|
115
|
-
std::shared_ptr<LayoutAnimationsManager> layoutAnimationsManager,
|
|
116
|
-
SharedComponentDescriptorRegistry componentDescriptorRegistry,
|
|
117
|
-
std::shared_ptr<const ContextContainer> contextContainer,
|
|
115
|
+
const std::shared_ptr<LayoutAnimationsManager> &layoutAnimationsManager,
|
|
116
|
+
const SharedComponentDescriptorRegistry &componentDescriptorRegistry,
|
|
117
|
+
const std::shared_ptr<const ContextContainer> &contextContainer,
|
|
118
118
|
jsi::Runtime &uiRuntime,
|
|
119
119
|
const std::shared_ptr<UIScheduler> &uiScheduler
|
|
120
120
|
#ifdef ANDROID
|
|
121
121
|
,
|
|
122
|
-
PreserveMountedTagsFunction filterUnmountedTagsFunction,
|
|
123
|
-
std::shared_ptr<UIManager> uiManager,
|
|
124
|
-
std::shared_ptr<CallInvoker> jsInvoker
|
|
122
|
+
const PreserveMountedTagsFunction &filterUnmountedTagsFunction,
|
|
123
|
+
const std::shared_ptr<UIManager> &uiManager,
|
|
124
|
+
const std::shared_ptr<CallInvoker> &jsInvoker
|
|
125
125
|
#endif
|
|
126
126
|
)
|
|
127
127
|
: LayoutAnimationsProxyCommon(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
layoutAnimationsManager,
|
|
129
|
+
componentDescriptorRegistry,
|
|
130
|
+
contextContainer,
|
|
131
131
|
uiRuntime,
|
|
132
132
|
uiScheduler
|
|
133
133
|
#ifdef ANDROID
|
|
134
134
|
,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
filterUnmountedTagsFunction,
|
|
136
|
+
uiManager,
|
|
137
|
+
jsInvoker
|
|
138
138
|
#endif
|
|
139
139
|
) {
|
|
140
140
|
}
|
|
@@ -148,6 +148,10 @@ struct LayoutAnimationsProxy_Legacy : public LayoutAnimationsProxyCommon,
|
|
|
148
148
|
std::optional<SurfaceId> endLayoutAnimation(int tag, bool shouldRemove) override;
|
|
149
149
|
void maybeCancelAnimation(const int tag) const;
|
|
150
150
|
|
|
151
|
+
void reconcileContradictedRemovals(
|
|
152
|
+
ShadowViewMutationList &mutations,
|
|
153
|
+
ShadowViewMutationList &filteredMutations,
|
|
154
|
+
SurfaceId surfaceId) const;
|
|
151
155
|
void parseRemoveMutations(
|
|
152
156
|
std::unordered_map<Tag, Tag> &movedViews,
|
|
153
157
|
ShadowViewMutationList &mutations,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <
|
|
4
|
-
|
|
3
|
+
#include <react/renderer/components/rnreanimated/Props.h>
|
|
5
4
|
#include <react/renderer/mounting/MountingOverrideDelegate.h>
|
|
6
5
|
#include <react/renderer/mounting/ShadowView.h>
|
|
6
|
+
#include <reanimated/LayoutAnimations/LayoutAnimationsManager.h>
|
|
7
7
|
|
|
8
8
|
#include <memory>
|
|
9
9
|
#include <unordered_map>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
namespace reanimated {
|
|
15
15
|
|
|
16
|
-
enum BeforeOrAfter { BEFORE = 0, AFTER = 1 };
|
|
16
|
+
enum BeforeOrAfter : std::uint8_t { BEFORE = 0, AFTER = 1 }; // NOLINT
|
|
17
17
|
|
|
18
18
|
struct Rect {
|
|
19
19
|
double width, height;
|
|
@@ -66,7 +66,7 @@ typedef enum class ExitingState : std::uint8_t {
|
|
|
66
66
|
|
|
67
67
|
struct MutationNode;
|
|
68
68
|
|
|
69
|
-
enum TransitionState {
|
|
69
|
+
enum class TransitionState : std::uint8_t {
|
|
70
70
|
NONE = 0,
|
|
71
71
|
START = 1,
|
|
72
72
|
ACTIVE = 2,
|
|
@@ -74,7 +74,7 @@ enum TransitionState {
|
|
|
74
74
|
CANCELLED = 4,
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
enum Intent {
|
|
77
|
+
enum class Intent : std::uint8_t {
|
|
78
78
|
NO_INTENT = 0,
|
|
79
79
|
TO_MOVE = 1,
|
|
80
80
|
TO_DELETE = 2,
|
|
@@ -86,7 +86,7 @@ struct LightNode {
|
|
|
86
86
|
ExitingState state = ExitingState::UNDEFINED;
|
|
87
87
|
std::weak_ptr<LightNode> parent;
|
|
88
88
|
std::vector<std::shared_ptr<LightNode>> children;
|
|
89
|
-
int removeChild(std::shared_ptr<LightNode> child) {
|
|
89
|
+
int removeChild(const std::shared_ptr<LightNode> &child) {
|
|
90
90
|
for (int i = children.size() - 1; i >= 0; i--) {
|
|
91
91
|
if (children[i]->current.tag == child->current.tag) {
|
|
92
92
|
children.erase(children.begin() + i);
|
|
@@ -135,6 +135,34 @@ static inline bool isRNSScreen(const std::shared_ptr<LightNode> &node) {
|
|
|
135
135
|
return !std::strcmp(componentName, "RNSScreen") || !std::strcmp(componentName, "RNSModalScreen");
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
static inline std::shared_ptr<LightNode> findParentRNSScreen(const std::shared_ptr<LightNode> &node) {
|
|
139
|
+
auto current = node->parent.lock();
|
|
140
|
+
while (current && !isRNSScreen(current)) {
|
|
141
|
+
current = current->parent.lock();
|
|
142
|
+
}
|
|
143
|
+
return current;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static inline bool isSETBoundary(const std::shared_ptr<LightNode> &node) {
|
|
147
|
+
return !std::strcmp(node->current.componentName, "REASharedTransitionBoundary");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
static inline bool isBoundaryActive(const std::shared_ptr<LightNode> &node) {
|
|
151
|
+
auto boundaryProps = std::static_pointer_cast<const REASharedTransitionBoundaryProps>(node->current.props);
|
|
152
|
+
return boundaryProps->isActive;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static inline bool isInsideInactiveBoundary(const std::shared_ptr<LightNode> &node) {
|
|
156
|
+
auto current = node->parent.lock();
|
|
157
|
+
while (current) {
|
|
158
|
+
if (isSETBoundary(current)) {
|
|
159
|
+
return !isBoundaryActive(current);
|
|
160
|
+
}
|
|
161
|
+
current = current->parent.lock();
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
|
|
138
166
|
static inline bool isRoot(const std::shared_ptr<LightNode> &node) {
|
|
139
167
|
return node->current.tag % 10 == 1;
|
|
140
168
|
}
|
package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/SharedTransitions.cpp
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
+
#include <folly/dynamic.h>
|
|
2
|
+
#include <react/renderer/components/rnreanimated/Props.h>
|
|
1
3
|
#include <react/renderer/components/scrollview/ScrollViewState.h>
|
|
2
4
|
#include <reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h>
|
|
5
|
+
#include <reanimated/LayoutAnimations/LayoutAnimationsUtils.h>
|
|
3
6
|
#include <reanimated/Tools/ReanimatedSystraceSection.h>
|
|
4
|
-
#ifndef ANDROID
|
|
5
|
-
#if __has_include(<react/renderer/components/rnscreens/Props.h>)
|
|
6
|
-
#define HAS_SCREENS_PROPS
|
|
7
|
-
#include <react/renderer/components/rnscreens/Props.h>
|
|
8
|
-
#endif
|
|
9
|
-
#endif // !ANDROID
|
|
10
|
-
|
|
11
|
-
#include <folly/dynamic.h>
|
|
12
|
-
|
|
13
7
|
#include <ranges>
|
|
14
8
|
|
|
15
9
|
namespace reanimated {
|
|
16
10
|
|
|
17
11
|
// MARK: Shared Element Transitions
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
// A boundary is active when its `isActive` prop (controlled from JS,
|
|
14
|
+
// e.g. with `useIsFocused`) is true and it's not currently exiting.
|
|
15
|
+
std::shared_ptr<LightNode> LayoutAnimationsProxy_Experimental::findActiveBoundary(
|
|
20
16
|
const std::shared_ptr<LightNode> &node) const {
|
|
21
17
|
std::shared_ptr<LightNode> result = nullptr;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// 0).asDouble(); isActive = f == 2.0f;
|
|
31
|
-
isActive = true;
|
|
32
|
-
#elif defined(HAS_SCREENS_PROPS)
|
|
33
|
-
isActive = std::static_pointer_cast<const RNSScreenProps>(node->current.props)->activityState == 2.0f;
|
|
34
|
-
#endif
|
|
35
|
-
if (isActive) {
|
|
36
|
-
result = node;
|
|
18
|
+
|
|
19
|
+
if (isSETBoundary(node) && isBoundaryActive(node) && node->state == ExitingState::UNDEFINED) {
|
|
20
|
+
return node;
|
|
21
|
+
}
|
|
22
|
+
for (const auto &child : std::views::reverse(node->children)) {
|
|
23
|
+
auto top = findActiveBoundary(child);
|
|
24
|
+
if (top) {
|
|
25
|
+
return top;
|
|
37
26
|
}
|
|
38
27
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
std::shared_ptr<LightNode> LayoutAnimationsProxy_Experimental::findBoundaryGuess(
|
|
33
|
+
const std::shared_ptr<LightNode> &node) const {
|
|
34
|
+
std::shared_ptr<LightNode> result = nullptr;
|
|
35
|
+
|
|
36
|
+
if (isSETBoundary(node)) {
|
|
37
|
+
result = node;
|
|
38
|
+
}
|
|
39
|
+
for (const auto &child : std::views::reverse(node->children)) {
|
|
40
|
+
auto top = findBoundaryGuess(child);
|
|
41
|
+
if (top) {
|
|
42
|
+
return top;
|
|
45
43
|
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
46
|
return result;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -62,9 +62,11 @@ void LayoutAnimationsProxy_Experimental::findSharedElementsOnScreen(
|
|
|
62
62
|
auto newTransform = parseParentTransforms(node, absolutePositions);
|
|
63
63
|
const auto &parent = node->parent.lock();
|
|
64
64
|
react_native_assert(parent && "Parent node is nullptr");
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
|
|
66
|
+
int indexNum = static_cast<int>(index);
|
|
67
|
+
transform[indexNum] = std::move(newTransform);
|
|
68
|
+
snapshot[indexNum] = copy;
|
|
69
|
+
parentTag[indexNum] = parent->current.tag;
|
|
68
70
|
|
|
69
71
|
if (parentTag[BEFORE] && parentTag[AFTER]) {
|
|
70
72
|
transitions_.emplace_back(sharedTag, transition);
|
|
@@ -88,14 +90,14 @@ void LayoutAnimationsProxy_Experimental::handleProgressTransition(
|
|
|
88
90
|
}
|
|
89
91
|
transitionUpdated_ = false;
|
|
90
92
|
|
|
91
|
-
if (!mutations.empty() || !transitionState_) {
|
|
93
|
+
if (!mutations.empty() || !static_cast<bool>(transitionState_)) {
|
|
92
94
|
return;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
if (transitionState_ == START) {
|
|
97
|
+
if (transitionState_ == TransitionState::START) {
|
|
96
98
|
auto root = lightNodes_[surfaceId];
|
|
97
99
|
auto beforeTopScreen = topScreen[surfaceId];
|
|
98
|
-
auto afterTopScreen = lightNodes_[transitionTag_];
|
|
100
|
+
auto afterTopScreen = findBoundaryGuess(lightNodes_[transitionTag_]);
|
|
99
101
|
if (beforeTopScreen && afterTopScreen && beforeTopScreen != afterTopScreen) {
|
|
100
102
|
findSharedElementsOnScreen(beforeTopScreen, BEFORE, propsParserContext);
|
|
101
103
|
findSharedElementsOnScreen(afterTopScreen, AFTER, propsParserContext);
|
|
@@ -119,7 +121,7 @@ void LayoutAnimationsProxy_Experimental::handleProgressTransition(
|
|
|
119
121
|
startProgressTransition(containerTag, before, after, surfaceId);
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
|
-
} else if (transitionState_ == ACTIVE) {
|
|
124
|
+
} else if (transitionState_ == TransitionState::ACTIVE) {
|
|
123
125
|
for (auto tag : activeTransitions_) {
|
|
124
126
|
auto layoutAnimation = layoutAnimations_[tag];
|
|
125
127
|
auto &updateMap = surfaceManager.getUpdateMap(layoutAnimation.finalView.surfaceId);
|
|
@@ -153,23 +155,22 @@ void LayoutAnimationsProxy_Experimental::handleProgressTransition(
|
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
if (transitionState_ == START) {
|
|
157
|
-
transitionState_ = ACTIVE;
|
|
158
|
-
} else if (transitionState_ == END || transitionState_ == CANCELLED) {
|
|
158
|
+
if (transitionState_ == TransitionState::START) {
|
|
159
|
+
transitionState_ = TransitionState::ACTIVE;
|
|
160
|
+
} else if (transitionState_ == TransitionState::END || transitionState_ == TransitionState::CANCELLED) {
|
|
159
161
|
for (auto tag : activeTransitions_) {
|
|
160
162
|
sharedContainersToRemove_.push_back(tag);
|
|
161
163
|
tagsToRestore_.push_back(restoreMap_[tag][AFTER]);
|
|
162
|
-
if (transitionState_ == CANCELLED) {
|
|
164
|
+
if (transitionState_ == TransitionState::CANCELLED) {
|
|
163
165
|
tagsToRestore_.push_back(restoreMap_[tag][BEFORE]);
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
|
-
if (transitionState_ == END) {
|
|
167
|
-
topScreen[surfaceId] = lightNodes_[transitionTag_];
|
|
168
|
+
if (transitionState_ == TransitionState::END) {
|
|
168
169
|
synchronized_ = false;
|
|
169
170
|
}
|
|
170
171
|
sharedTransitionManager_->containerTags_.clear();
|
|
171
172
|
activeTransitions_.clear();
|
|
172
|
-
transitionState_ = NONE;
|
|
173
|
+
transitionState_ = TransitionState::NONE;
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
|
|
@@ -206,7 +207,11 @@ Tag LayoutAnimationsProxy_Experimental::getOrCreateContainer(
|
|
|
206
207
|
ShadowViewMutationList &filteredMutations,
|
|
207
208
|
SurfaceId surfaceId) const {
|
|
208
209
|
auto containerTag = sharedTransitionManager_->containerTags_[sharedTag];
|
|
209
|
-
auto shouldCreateContainer =
|
|
210
|
+
auto shouldCreateContainer = true;
|
|
211
|
+
if (containerTag != -1) {
|
|
212
|
+
const auto layoutAnimationIt = layoutAnimations_.find(containerTag);
|
|
213
|
+
shouldCreateContainer = layoutAnimationIt == layoutAnimations_.end() || layoutAnimationIt->second.isSettled();
|
|
214
|
+
}
|
|
210
215
|
|
|
211
216
|
if (shouldCreateContainer) {
|
|
212
217
|
containerTag = containerTag_;
|
|
@@ -260,11 +265,12 @@ void LayoutAnimationsProxy_Experimental::handleSharedTransitionsStart(
|
|
|
260
265
|
auto &[_, after] = transition.snapshot;
|
|
261
266
|
|
|
262
267
|
auto containerTag = sharedTransitionManager_->containerTags_[sharedTag];
|
|
263
|
-
|
|
268
|
+
const auto layoutAnimationIt = layoutAnimations_.find(containerTag);
|
|
269
|
+
if (layoutAnimationIt == layoutAnimations_.end() || layoutAnimationIt->second.isSettled()) {
|
|
264
270
|
continue;
|
|
265
271
|
}
|
|
266
272
|
after.tag = containerTag;
|
|
267
|
-
const auto &la =
|
|
273
|
+
const auto &la = layoutAnimationIt->second;
|
|
268
274
|
if (la.finalView.layoutMetrics != after.layoutMetrics) {
|
|
269
275
|
overrideTransform(after, transition.transform[AFTER], propsParserContext);
|
|
270
276
|
startSharedTransition(containerTag, la.currentView, after, surfaceId);
|
|
@@ -278,8 +284,9 @@ void LayoutAnimationsProxy_Experimental::hideTransitioningViews(
|
|
|
278
284
|
ShadowViewMutationList &filteredMutations,
|
|
279
285
|
const PropsParserContext &propsParserContext) const {
|
|
280
286
|
for (auto &[sharedTag, transition] : transitions_) {
|
|
281
|
-
|
|
282
|
-
const auto &
|
|
287
|
+
int indexNum = static_cast<int>(index);
|
|
288
|
+
const auto &shadowView = transition.snapshot[indexNum];
|
|
289
|
+
const auto &parentTag = transition.parentTag[indexNum];
|
|
283
290
|
auto m = ShadowViewMutation::UpdateMutation(
|
|
284
291
|
shadowView, cloneViewWithoutOpacity(shadowView, propsParserContext), parentTag);
|
|
285
292
|
filteredMutations.push_back(m);
|
|
@@ -301,13 +308,16 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Experimental::onTransitionProgres
|
|
|
301
308
|
#endif
|
|
302
309
|
// TODO (future): this new approach causes all back transitions to be progress
|
|
303
310
|
// transitions (maybe that's ok?)
|
|
311
|
+
if (isClosing && !isGoingForward && !isAndroid) {
|
|
312
|
+
closingScreenTag_ = tag;
|
|
313
|
+
}
|
|
304
314
|
if (!isClosing && !isGoingForward && !isAndroid) {
|
|
305
315
|
transitionProgress_ = progress;
|
|
306
|
-
if (transitionState_ == NONE && progress < 1) {
|
|
307
|
-
transitionState_ = START;
|
|
316
|
+
if (transitionState_ == TransitionState::NONE && progress < 1) {
|
|
317
|
+
transitionState_ = TransitionState::START;
|
|
308
318
|
transitionTag_ = tag;
|
|
309
|
-
} else if (transitionState_ == ACTIVE && progress == 1) {
|
|
310
|
-
transitionState_ = END;
|
|
319
|
+
} else if (transitionState_ == TransitionState::ACTIVE && progress == 1) {
|
|
320
|
+
transitionState_ = TransitionState::END;
|
|
311
321
|
}
|
|
312
322
|
const auto &node = lightNodes_[tag];
|
|
313
323
|
react_native_assert(node && "LightNode is nullptr");
|
|
@@ -320,8 +330,8 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Experimental::onTransitionProgres
|
|
|
320
330
|
|
|
321
331
|
std::optional<SurfaceId> LayoutAnimationsProxy_Experimental::onGestureCancel() {
|
|
322
332
|
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
323
|
-
if (transitionState_) {
|
|
324
|
-
transitionState_ = CANCELLED;
|
|
333
|
+
if (static_cast<bool>(transitionState_)) {
|
|
334
|
+
transitionState_ = TransitionState::CANCELLED;
|
|
325
335
|
transitionUpdated_ = true;
|
|
326
336
|
react_native_assert(transitioningSurfaceId_ != -1 && "Cancelling non-observed transition");
|
|
327
337
|
|
|
@@ -467,15 +477,12 @@ std::optional<Transform> LayoutAnimationsProxy_Experimental::parseParentTransfor
|
|
|
467
477
|
combinedMatrix.operations.clear();
|
|
468
478
|
}
|
|
469
479
|
if (parentHasTransform) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
{}
|
|
475
|
-
};
|
|
476
|
-
|
|
480
|
+
// OHOS patch: brace-initialize the TransformOperation aggregate —
|
|
481
|
+
// clang 15 doesn't apply parenthesized aggregate initialization (P0960)
|
|
482
|
+
// in functional-style casts, so TransformOperation(...) fails with
|
|
483
|
+
// "no matching conversion". Braces are equivalent here.
|
|
477
484
|
return Transform::FromTransformOperation(
|
|
478
|
-
|
|
485
|
+
react::TransformOperation{TransformOperationType::Arbitrary}, {}, combinedMatrix);
|
|
479
486
|
}
|
|
480
487
|
|
|
481
488
|
return {};
|