@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
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
#include <glog/logging.h>
|
|
2
|
-
#include <react/renderer/animations/utils.h>
|
|
3
|
-
#include <react/renderer/core/ConcreteState.h>
|
|
4
1
|
#include <react/renderer/mounting/ShadowViewMutation.h>
|
|
5
2
|
#include <reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.h>
|
|
6
3
|
#include <reanimated/LayoutAnimations/PropsDiffer.h>
|
|
7
|
-
#include <reanimated/NativeModules/ReanimatedModuleProxy.h>
|
|
8
4
|
#include <reanimated/Tools/ReanimatedSystraceSection.h>
|
|
9
5
|
|
|
10
6
|
#include <algorithm>
|
|
@@ -32,17 +28,17 @@ std::optional<MountingTransaction> LayoutAnimationsProxy_Experimental::pullTrans
|
|
|
32
28
|
ShadowViewMutationList filteredMutations;
|
|
33
29
|
auto rootChildCount = static_cast<int>(lightNodes_[surfaceId]->children.size());
|
|
34
30
|
const std::vector<std::shared_ptr<MutationNode>> roots;
|
|
35
|
-
const bool isInTransition = transitionState_;
|
|
31
|
+
const bool isInTransition = static_cast<bool>(transitionState_);
|
|
36
32
|
|
|
37
33
|
if (isInTransition) {
|
|
38
34
|
updateLightTree(propsParserContext, mutations, filteredMutations);
|
|
39
35
|
handleProgressTransition(filteredMutations, mutations, propsParserContext, surfaceId);
|
|
40
36
|
} else if (!synchronized_) {
|
|
41
|
-
auto actualTop = topScreen[surfaceId];
|
|
42
37
|
updateLightTree(propsParserContext, mutations, filteredMutations);
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
if (!lightNodes_.contains(closingScreenTag_)) {
|
|
39
|
+
topScreen[surfaceId] = findActiveBoundary(lightNodes_[surfaceId]);
|
|
45
40
|
synchronized_ = true;
|
|
41
|
+
closingScreenTag_ = -1;
|
|
46
42
|
}
|
|
47
43
|
} else if (!mutations.empty()) {
|
|
48
44
|
auto root = lightNodes_[surfaceId];
|
|
@@ -55,13 +51,19 @@ std::optional<MountingTransaction> LayoutAnimationsProxy_Experimental::pullTrans
|
|
|
55
51
|
|
|
56
52
|
updateLightTree(propsParserContext, mutations, filteredMutations);
|
|
57
53
|
|
|
58
|
-
auto afterTopScreen =
|
|
54
|
+
auto afterTopScreen = findActiveBoundary(root);
|
|
59
55
|
topScreen[surfaceId] = afterTopScreen;
|
|
60
56
|
if (afterTopScreen) {
|
|
61
57
|
ReanimatedSystraceSection s("find after elements");
|
|
62
58
|
findSharedElementsOnScreen(afterTopScreen, AFTER, propsParserContext);
|
|
63
59
|
#ifdef __APPLE__
|
|
64
|
-
|
|
60
|
+
// TODO (future): this is a temporary workaround for RNScreens on iOS,
|
|
61
|
+
// which takes the snapshot of the popped screen before we hide the
|
|
62
|
+
// shared element, the issue should be gone with the new stack
|
|
63
|
+
// implementation
|
|
64
|
+
if (auto screen = findParentRNSScreen(afterTopScreen)) {
|
|
65
|
+
forceScreenSnapshot_(screen->current.tag);
|
|
66
|
+
}
|
|
65
67
|
#endif
|
|
66
68
|
}
|
|
67
69
|
const bool hasScreenChanged = beforeTopScreen && afterTopScreen && beforeTopScreen != afterTopScreen;
|
|
@@ -151,7 +153,8 @@ void LayoutAnimationsProxy_Experimental::updateLightTree(
|
|
|
151
153
|
react_native_assert(node && "LightNode not found");
|
|
152
154
|
node->previous = mutation.oldChildShadowView;
|
|
153
155
|
#ifdef ANDROID
|
|
154
|
-
// TODO (future): We don't merge the root view as the currently stored version might not be accurate, because of
|
|
156
|
+
// TODO (future): We don't merge the root view as the currently stored version might not be accurate, because of
|
|
157
|
+
// the inconsequential initialization order of proxy and the surface
|
|
155
158
|
if (!isRoot(node) && node->current.props) {
|
|
156
159
|
// On android rawProps are used to store the diffed props so we need to merge them
|
|
157
160
|
// This should soon be replaced in RN with Props 2.0 (the diffing will be done at the end of the pipeline)
|
|
@@ -201,6 +204,30 @@ void LayoutAnimationsProxy_Experimental::updateLightTree(
|
|
|
201
204
|
} else if (layoutAnimationsManager_->hasLayoutAnimation(tag, ENTERING)) {
|
|
202
205
|
entering_.push_back(node);
|
|
203
206
|
filteredMutations.push_back(mutation);
|
|
207
|
+
// [OHOS patch] Mirror LayoutAnimationsProxy_Legacy: hide the entering
|
|
208
|
+
// view in the same transaction (Insert + Update with opacity 0).
|
|
209
|
+
// Experimental otherwise passes the Insert through with final props
|
|
210
|
+
// and only hides the view once the animation's first frame arrives
|
|
211
|
+
// via the async pipeline (scheduleOnUI -> startLayoutAnimation ->
|
|
212
|
+
// progressLayoutAnimation), which on OHOS can span a vsync — the
|
|
213
|
+
// view flashes at its final state before the animation starts.
|
|
214
|
+
// maybeRestoreOpacity in progressLayoutAnimation restores the
|
|
215
|
+
// original opacity for entering animations that don't animate it
|
|
216
|
+
// (the original opacity is stored in startEnteringAnimation).
|
|
217
|
+
filteredMutations.push_back(ShadowViewMutation::UpdateMutation(
|
|
218
|
+
mutation.newChildShadowView,
|
|
219
|
+
cloneViewWithoutOpacity(mutation.newChildShadowView, propsParserContext),
|
|
220
|
+
mutation.parentTag));
|
|
221
|
+
} else if (sharedTransitionManager_->tagToName_.contains(tag)) {
|
|
222
|
+
const bool insideInactiveBoundary = isInsideInactiveBoundary(node);
|
|
223
|
+
if (insideInactiveBoundary) {
|
|
224
|
+
filteredMutations.push_back(mutation);
|
|
225
|
+
auto hiddenView = cloneViewWithoutOpacity(mutation.newChildShadowView, propsParserContext);
|
|
226
|
+
filteredMutations.push_back(
|
|
227
|
+
ShadowViewMutation::UpdateMutation(mutation.newChildShadowView, hiddenView, mutation.parentTag));
|
|
228
|
+
} else {
|
|
229
|
+
filteredMutations.push_back(mutation);
|
|
230
|
+
}
|
|
204
231
|
} else {
|
|
205
232
|
filteredMutations.push_back(mutation);
|
|
206
233
|
}
|
|
@@ -279,11 +306,10 @@ std::optional<SurfaceId> LayoutAnimationsProxy_Experimental::endLayoutAnimation(
|
|
|
279
306
|
// one after the other, so we need to keep count of how many
|
|
280
307
|
// were actually triggered, so that we don't cleanup necessary
|
|
281
308
|
// structures too early
|
|
282
|
-
if (layoutAnimation.count >
|
|
283
|
-
layoutAnimation.count--;
|
|
309
|
+
if (--layoutAnimation.count > 0) {
|
|
284
310
|
return {};
|
|
285
311
|
}
|
|
286
|
-
|
|
312
|
+
maybeSettledAnimationTags_.insert(tag);
|
|
287
313
|
auto surfaceId = layoutAnimation.finalView.surfaceId;
|
|
288
314
|
|
|
289
315
|
if (sharedTransitionManager_->tagToName_.contains(tag)) {
|
|
@@ -328,9 +354,10 @@ void LayoutAnimationsProxy_Experimental::handleRemovals(
|
|
|
328
354
|
react_native_assert(parent && "Parent node is nullptr");
|
|
329
355
|
// TODO (future): figure out a better way to handle this
|
|
330
356
|
// Currently we remove each view, and then if we want to animate it, reinsert it at the end.
|
|
331
|
-
// This is nice, but introduces extra mutations (which could have some side effects, like making a snapshot in
|
|
332
|
-
// and it changes the zIndex of animated views, which is different from what've had.
|
|
333
|
-
//
|
|
357
|
+
// This is nice, but introduces extra mutations (which could have some side effects, like making a snapshot in
|
|
358
|
+
// RNScreens), and it changes the zIndex of animated views, which is different from what've had. The biggest
|
|
359
|
+
// convenience of this approach is that it is much easier to maintain indices of animated views, and handle
|
|
360
|
+
// reparentings.
|
|
334
361
|
|
|
335
362
|
auto current = node->current;
|
|
336
363
|
if (layoutAnimations_.contains(node->current.tag)) {
|
|
@@ -399,7 +426,7 @@ void LayoutAnimationsProxy_Experimental::addOngoingAnimations(SurfaceId surfaceI
|
|
|
399
426
|
|
|
400
427
|
const auto layoutAnimationIt = layoutAnimations_.find(tag);
|
|
401
428
|
|
|
402
|
-
if (layoutAnimationIt == layoutAnimations_.end()) {
|
|
429
|
+
if (layoutAnimationIt == layoutAnimations_.end() || layoutAnimationIt->second.isSettled()) {
|
|
403
430
|
continue;
|
|
404
431
|
}
|
|
405
432
|
|
|
@@ -518,11 +545,10 @@ bool LayoutAnimationsProxy_Experimental::startAnimationsRecursively(
|
|
|
518
545
|
|
|
519
546
|
if (hasExitAnimation) {
|
|
520
547
|
node->state = ANIMATING;
|
|
521
|
-
startExitingAnimation(node);
|
|
522
548
|
lightNodes_[node->current.tag] = node;
|
|
549
|
+
startExitingAnimation(node);
|
|
523
550
|
} else {
|
|
524
|
-
|
|
525
|
-
// layoutAnimationsManager_->clearLayoutAnimationConfig(node->tag);
|
|
551
|
+
layoutAnimationsManager_->clearLayoutAnimationConfig(node->current.tag);
|
|
526
552
|
}
|
|
527
553
|
|
|
528
554
|
return wantAnimateExit;
|
|
@@ -534,11 +560,23 @@ void LayoutAnimationsProxy_Experimental::updateOngoingAnimationTarget(const int
|
|
|
534
560
|
}
|
|
535
561
|
|
|
536
562
|
void LayoutAnimationsProxy_Experimental::maybeCancelAnimation(const int tag) const {
|
|
537
|
-
|
|
563
|
+
#ifdef ANDROID
|
|
564
|
+
// also invalidate animation starts that are scheduled but haven't run yet,
|
|
565
|
+
// so they don't re-create the animation after this cancellation
|
|
566
|
+
if (const auto it = pendingStarts_.find(tag); it != pendingStarts_.end()) {
|
|
567
|
+
it->second.handle++;
|
|
568
|
+
}
|
|
569
|
+
#endif
|
|
570
|
+
const auto layoutAnimationIt = layoutAnimations_.find(tag);
|
|
571
|
+
if (layoutAnimationIt == layoutAnimations_.end()) {
|
|
538
572
|
return;
|
|
539
573
|
}
|
|
540
|
-
|
|
541
|
-
|
|
574
|
+
if (layoutAnimationIt->second.isSettled()) {
|
|
575
|
+
// Already settled - cleanupAnimations will erase it together with its updateMap entry.
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
layoutAnimations_.erase(layoutAnimationIt);
|
|
579
|
+
scheduleOnUI(uiScheduler_, [weakThis = weak_from_this(), tag]() {
|
|
542
580
|
auto strongThis = weakThis.lock();
|
|
543
581
|
if (!strongThis) {
|
|
544
582
|
return;
|
|
@@ -576,6 +614,8 @@ ShadowView LayoutAnimationsProxy_Experimental::cloneViewWithoutOpacity(
|
|
|
576
614
|
const folly::dynamic opacity = folly::dynamic::object("opacity", 0);
|
|
577
615
|
auto newProps =
|
|
578
616
|
getComponentDescriptorForShadowView(newView).cloneProps(propsParserContext, newView.props, RawProps(opacity));
|
|
617
|
+
auto viewProps = std::const_pointer_cast<ViewProps>(std::static_pointer_cast<const ViewProps>(newProps));
|
|
618
|
+
viewProps->opacity = 0;
|
|
579
619
|
newView.props = newProps;
|
|
580
620
|
return newView;
|
|
581
621
|
}
|
|
@@ -627,12 +667,17 @@ void LayoutAnimationsProxy_Experimental::cleanupAnimations(
|
|
|
627
667
|
#ifdef ANDROID
|
|
628
668
|
restoreOpacityInCaseOfFlakyEnteringAnimation(surfaceId);
|
|
629
669
|
#endif // ANDROID
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
670
|
+
auto &updateMap = surfaceManager.getUpdateMap(surfaceId);
|
|
671
|
+
for (const auto tag : maybeSettledAnimationTags_) {
|
|
672
|
+
// Skip tags re-animated since they settled (count back above 0).
|
|
673
|
+
const auto layoutAnimationIt = layoutAnimations_.find(tag);
|
|
674
|
+
if (layoutAnimationIt == layoutAnimations_.end() || !layoutAnimationIt->second.isSettled()) {
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
layoutAnimations_.erase(layoutAnimationIt);
|
|
633
678
|
updateMap.erase(tag);
|
|
634
679
|
}
|
|
635
|
-
|
|
680
|
+
maybeSettledAnimationTags_.clear();
|
|
636
681
|
}
|
|
637
682
|
|
|
638
683
|
// MARK: Start Animation
|
|
@@ -678,9 +723,24 @@ void LayoutAnimationsProxy_Experimental::startEnteringAnimation(const std::share
|
|
|
678
723
|
const auto &parent = node->parent.lock();
|
|
679
724
|
react_native_assert(parent && "Parent node is nullptr");
|
|
680
725
|
const auto parentTag = parent->current.tag;
|
|
726
|
+
#ifdef ANDROID
|
|
727
|
+
const auto handle = pendingStarts_[newChildShadowView.tag].handle;
|
|
728
|
+
pendingStarts_[newChildShadowView.tag].count++;
|
|
729
|
+
#endif
|
|
681
730
|
|
|
682
|
-
|
|
683
|
-
|
|
731
|
+
scheduleOnUI(
|
|
732
|
+
uiScheduler_,
|
|
733
|
+
[weakThis = weak_from_this(),
|
|
734
|
+
finalView,
|
|
735
|
+
currentView,
|
|
736
|
+
newChildShadowView,
|
|
737
|
+
parentTag,
|
|
738
|
+
opacity
|
|
739
|
+
#ifdef ANDROID
|
|
740
|
+
,
|
|
741
|
+
handle
|
|
742
|
+
#endif
|
|
743
|
+
]() {
|
|
684
744
|
auto strongThis = weakThis.lock();
|
|
685
745
|
if (!strongThis) {
|
|
686
746
|
return;
|
|
@@ -690,6 +750,12 @@ void LayoutAnimationsProxy_Experimental::startEnteringAnimation(const std::share
|
|
|
690
750
|
const auto tag = newChildShadowView.tag;
|
|
691
751
|
{
|
|
692
752
|
auto lock = std::unique_lock<std::recursive_mutex>(strongThis->mutex);
|
|
753
|
+
#ifdef ANDROID
|
|
754
|
+
if (consumeIsCancelled(strongThis->pendingStarts_, tag, handle)) {
|
|
755
|
+
// the view was removed before this start could run
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
#endif
|
|
693
759
|
strongThis->layoutAnimations_[tag] = {
|
|
694
760
|
.finalView = newChildShadowView,
|
|
695
761
|
.currentView = newChildShadowView,
|
|
@@ -723,38 +789,63 @@ void LayoutAnimationsProxy_Experimental::startExitingAnimation(const std::shared
|
|
|
723
789
|
const auto &parent = node->parent.lock();
|
|
724
790
|
react_native_assert(parent && "Parent node is nullptr");
|
|
725
791
|
const auto parentTag = parent->current.tag;
|
|
792
|
+
#ifdef ANDROID
|
|
793
|
+
const auto handle = pendingStarts_[tag].handle;
|
|
794
|
+
pendingStarts_[tag].count++;
|
|
795
|
+
#endif
|
|
726
796
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
797
|
+
scheduleOnUI(
|
|
798
|
+
uiScheduler_,
|
|
799
|
+
[weakThis = weak_from_this(),
|
|
800
|
+
tag,
|
|
801
|
+
parentTag,
|
|
802
|
+
oldChildShadowView,
|
|
803
|
+
surfaceId
|
|
804
|
+
#ifdef ANDROID
|
|
805
|
+
,
|
|
806
|
+
handle
|
|
807
|
+
#endif
|
|
808
|
+
]() {
|
|
809
|
+
auto strongThis = weakThis.lock();
|
|
810
|
+
if (!strongThis) {
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
732
813
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
814
|
+
auto oldView = oldChildShadowView;
|
|
815
|
+
Rect window{};
|
|
816
|
+
{
|
|
817
|
+
auto &mutex = strongThis->mutex;
|
|
818
|
+
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
819
|
+
#ifdef ANDROID
|
|
820
|
+
if (consumeIsCancelled(strongThis->pendingStarts_, tag, handle)) {
|
|
821
|
+
// the view was removed (e.g. its subtree was force-ended by a screen
|
|
822
|
+
// pop) before this start could run — its Remove+Delete are already on
|
|
823
|
+
// their way to the mounting layer, so starting the animation now
|
|
824
|
+
// would emit updates for a view that's about to be deleted
|
|
825
|
+
strongThis->layoutAnimationsManager_->clearLayoutAnimationConfig(tag);
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
#endif
|
|
829
|
+
oldView = strongThis->maybeCreateLayoutAnimation(oldView, oldView, parentTag);
|
|
830
|
+
window = strongThis->surfaceManager.getWindow(surfaceId);
|
|
831
|
+
}
|
|
741
832
|
|
|
742
|
-
|
|
833
|
+
const Snapshot values(oldView, window);
|
|
743
834
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
835
|
+
auto &uiRuntime = strongThis->uiRuntime_;
|
|
836
|
+
const jsi::Object yogaValues(uiRuntime);
|
|
837
|
+
yogaValues.setProperty(uiRuntime, "currentOriginX", values.x);
|
|
838
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginX", values.x);
|
|
839
|
+
yogaValues.setProperty(uiRuntime, "currentOriginY", values.y);
|
|
840
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginY", values.y);
|
|
841
|
+
yogaValues.setProperty(uiRuntime, "currentWidth", values.width);
|
|
842
|
+
yogaValues.setProperty(uiRuntime, "currentHeight", values.height);
|
|
843
|
+
yogaValues.setProperty(uiRuntime, "windowWidth", values.windowWidth);
|
|
844
|
+
yogaValues.setProperty(uiRuntime, "windowHeight", values.windowHeight);
|
|
845
|
+
strongThis->layoutAnimationsManager_->startLayoutAnimation(
|
|
846
|
+
uiRuntime, tag, LayoutAnimationType::EXITING, yogaValues);
|
|
847
|
+
strongThis->layoutAnimationsManager_->clearLayoutAnimationConfig(tag);
|
|
848
|
+
});
|
|
758
849
|
}
|
|
759
850
|
|
|
760
851
|
void LayoutAnimationsProxy_Experimental::startLayoutAnimation(const std::shared_ptr<LightNode> &node) const {
|
|
@@ -765,9 +856,24 @@ void LayoutAnimationsProxy_Experimental::startLayoutAnimation(const std::shared_
|
|
|
765
856
|
const auto &parent = node->parent.lock();
|
|
766
857
|
react_native_assert(parent && "Parent node is nullptr");
|
|
767
858
|
const auto parentTag = parent->current.tag;
|
|
859
|
+
#ifdef ANDROID
|
|
860
|
+
const auto handle = pendingStarts_[tag].handle;
|
|
861
|
+
pendingStarts_[tag].count++;
|
|
862
|
+
#endif
|
|
768
863
|
|
|
769
|
-
|
|
770
|
-
|
|
864
|
+
scheduleOnUI(
|
|
865
|
+
uiScheduler_,
|
|
866
|
+
[weakThis = weak_from_this(),
|
|
867
|
+
surfaceId,
|
|
868
|
+
oldChildShadowView,
|
|
869
|
+
newChildShadowView,
|
|
870
|
+
parentTag,
|
|
871
|
+
tag
|
|
872
|
+
#ifdef ANDROID
|
|
873
|
+
,
|
|
874
|
+
handle
|
|
875
|
+
#endif
|
|
876
|
+
]() {
|
|
771
877
|
auto strongThis = weakThis.lock();
|
|
772
878
|
if (!strongThis) {
|
|
773
879
|
return;
|
|
@@ -778,6 +884,12 @@ void LayoutAnimationsProxy_Experimental::startLayoutAnimation(const std::shared_
|
|
|
778
884
|
{
|
|
779
885
|
auto &mutex = strongThis->mutex;
|
|
780
886
|
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
887
|
+
#ifdef ANDROID
|
|
888
|
+
if (consumeIsCancelled(strongThis->pendingStarts_, tag, handle)) {
|
|
889
|
+
// the view was removed before this start could run
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
#endif
|
|
781
893
|
oldView = strongThis->maybeCreateLayoutAnimation(oldView, newChildShadowView, parentTag);
|
|
782
894
|
window = strongThis->surfaceManager.getWindow(surfaceId);
|
|
783
895
|
}
|
|
@@ -811,7 +923,7 @@ void LayoutAnimationsProxy_Experimental::startSharedTransition(
|
|
|
811
923
|
const ShadowView &before,
|
|
812
924
|
const ShadowView &after,
|
|
813
925
|
SurfaceId surfaceId) const {
|
|
814
|
-
|
|
926
|
+
scheduleOnUI(uiScheduler_, [weakThis = weak_from_this(), before, after, surfaceId, tag]() {
|
|
815
927
|
auto strongThis = weakThis.lock();
|
|
816
928
|
if (!strongThis) {
|
|
817
929
|
return;
|
|
@@ -844,7 +956,7 @@ void LayoutAnimationsProxy_Experimental::startProgressTransition(
|
|
|
844
956
|
const ShadowView &before,
|
|
845
957
|
const ShadowView &after,
|
|
846
958
|
SurfaceId surfaceId) const {
|
|
847
|
-
|
|
959
|
+
scheduleOnUI(uiScheduler_, [weakThis = weak_from_this(), before, after, surfaceId]() {
|
|
848
960
|
auto strongThis = weakThis.lock();
|
|
849
961
|
if (!strongThis) {
|
|
850
962
|
return;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
+
#include <reanimated/Compat/WorkletsApi.h>
|
|
3
4
|
#include <reanimated/LayoutAnimations/LayoutAnimationsManager.h>
|
|
4
5
|
#include <reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h>
|
|
5
6
|
#include <reanimated/LayoutAnimations/LayoutAnimationsUtils.h>
|
|
6
7
|
#include <reanimated/Tools/PlatformDepMethodsHolder.h>
|
|
7
8
|
|
|
8
|
-
#include <worklets/Tools/UIScheduler.h>
|
|
9
|
-
|
|
10
9
|
#include <react/renderer/componentregistry/ComponentDescriptorFactory.h>
|
|
11
10
|
#include <react/renderer/graphics/Transform.h>
|
|
12
11
|
#include <react/renderer/mounting/MountingOverrideDelegate.h>
|
|
@@ -44,7 +43,7 @@ struct LayoutAnimationsProxy_Experimental : public LayoutAnimationsProxyCommon,
|
|
|
44
43
|
mutable Tag transitionTag_;
|
|
45
44
|
mutable double transitionProgress_;
|
|
46
45
|
mutable bool transitionUpdated_;
|
|
47
|
-
mutable TransitionState transitionState_ = NONE;
|
|
46
|
+
mutable TransitionState transitionState_ = TransitionState::NONE;
|
|
48
47
|
mutable SurfaceId transitioningSurfaceId_ = -1;
|
|
49
48
|
mutable std::unordered_map<SurfaceId, std::shared_ptr<LightNode>> topScreen;
|
|
50
49
|
mutable int containerTag_ = 10000002;
|
|
@@ -54,6 +53,7 @@ struct LayoutAnimationsProxy_Experimental : public LayoutAnimationsProxyCommon,
|
|
|
54
53
|
mutable TransitionMap transitionMap_;
|
|
55
54
|
mutable Transitions transitions_;
|
|
56
55
|
mutable bool synchronized_ = true;
|
|
56
|
+
mutable Tag closingScreenTag_ = -1;
|
|
57
57
|
mutable std::vector<std::shared_ptr<LightNode>> entering_, layout_, exiting_;
|
|
58
58
|
std::shared_ptr<SharedTransitionManager> sharedTransitionManager_;
|
|
59
59
|
mutable std::unordered_map<Tag, std::shared_ptr<LightNode>> lightNodes_;
|
|
@@ -63,16 +63,16 @@ struct LayoutAnimationsProxy_Experimental : public LayoutAnimationsProxyCommon,
|
|
|
63
63
|
mutable ForceScreenSnapshotFunction forceScreenSnapshot_;
|
|
64
64
|
|
|
65
65
|
LayoutAnimationsProxy_Experimental(
|
|
66
|
-
std::shared_ptr<LayoutAnimationsManager> layoutAnimationsManager,
|
|
67
|
-
SharedComponentDescriptorRegistry componentDescriptorRegistry,
|
|
68
|
-
std::shared_ptr<const ContextContainer> contextContainer,
|
|
66
|
+
const std::shared_ptr<LayoutAnimationsManager> &layoutAnimationsManager,
|
|
67
|
+
const SharedComponentDescriptorRegistry &componentDescriptorRegistry,
|
|
68
|
+
const std::shared_ptr<const ContextContainer> &contextContainer,
|
|
69
69
|
jsi::Runtime &uiRuntime,
|
|
70
|
-
const std::shared_ptr<UIScheduler> uiScheduler
|
|
70
|
+
const std::shared_ptr<UIScheduler> &uiScheduler
|
|
71
71
|
#ifdef ANDROID
|
|
72
72
|
,
|
|
73
|
-
PreserveMountedTagsFunction filterUnmountedTagsFunction,
|
|
74
|
-
std::shared_ptr<UIManager> uiManager,
|
|
75
|
-
std::shared_ptr<CallInvoker> jsInvoker
|
|
73
|
+
const PreserveMountedTagsFunction &filterUnmountedTagsFunction,
|
|
74
|
+
const std::shared_ptr<UIManager> &uiManager,
|
|
75
|
+
const std::shared_ptr<CallInvoker> &jsInvoker
|
|
76
76
|
#endif
|
|
77
77
|
)
|
|
78
78
|
: LayoutAnimationsProxyCommon(
|
|
@@ -146,7 +146,8 @@ struct LayoutAnimationsProxy_Experimental : public LayoutAnimationsProxyCommon,
|
|
|
146
146
|
|
|
147
147
|
void maybeCancelAnimation(const int tag) const;
|
|
148
148
|
|
|
149
|
-
std::shared_ptr<LightNode>
|
|
149
|
+
std::shared_ptr<LightNode> findActiveBoundary(const std::shared_ptr<LightNode> &node) const;
|
|
150
|
+
std::shared_ptr<LightNode> findBoundaryGuess(const std::shared_ptr<LightNode> &node) const;
|
|
150
151
|
|
|
151
152
|
void findSharedElementsOnScreen(
|
|
152
153
|
const std::shared_ptr<LightNode> &node,
|