react-native-reanimated 3.8.0 → 3.9.0-layout-animation-experimental
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/Common/cpp/Fabric/ShadowTreeCloner.cpp +5 -2
- package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.cpp +42 -32
- package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.h +5 -7
- package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +565 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.h +74 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsUtils.h +140 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +216 -58
- package/Common/cpp/NativeModules/NativeReanimatedModule.h +32 -11
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +2 -17
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.h +6 -8
- package/Common/cpp/ReanimatedRuntime/RNRuntimeDecorator.cpp +3 -0
- package/Common/cpp/ReanimatedRuntime/WorkletRuntime.cpp +3 -4
- package/Common/cpp/ReanimatedRuntime/WorkletRuntimeDecorator.cpp +8 -3
- package/Common/cpp/SharedItems/Shareables.cpp +31 -5
- package/Common/cpp/SharedItems/Shareables.h +18 -2
- package/Common/cpp/Tools/JSScheduler.cpp +29 -5
- package/Common/cpp/Tools/JSScheduler.h +21 -4
- package/Common/cpp/Tools/PlatformDepMethodsHolder.h +6 -2
- package/Common/cpp/Tools/UIRuntimeDecorator.cpp +6 -0
- package/Common/cpp/Tools/UIRuntimeDecorator.h +1 -0
- package/android/CMakeLists.txt +3 -0
- package/android/build.gradle +17 -5
- package/android/src/main/cpp/NativeProxy.cpp +77 -12
- package/android/src/main/cpp/NativeProxy.h +35 -1
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +58 -19
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +7 -2
- package/android/src/{reactNativeVersionPatch/ReanimatedUIManager/latest → main/java}/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +5 -5
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +10 -6
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +18 -1
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedTransitionManager.java +105 -17
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +2 -1
- package/android/src/paper/java/com/swmansion/reanimated/NativeReanimatedModuleSpec.java +37 -0
- package/android/src/{main/java/com/swmansion/reanimated → reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion}/ReanimatedModule.java +4 -3
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/{70 → 73}/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +1 -22
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/ReanimatedModule.java +176 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +0 -26
- package/android/src/{fabric/java → reactNativeVersionPatch/RuntimeExecutor/73}/com/swmansion/reanimated/NativeProxy.java +16 -4
- package/android/src/reactNativeVersionPatch/RuntimeExecutor/latest/com/swmansion/reanimated/NativeProxy.java +143 -0
- package/apple/LayoutReanimation/REAAnimationsManager.h +3 -0
- package/apple/LayoutReanimation/REAAnimationsManager.m +11 -0
- package/apple/LayoutReanimation/REASharedTransitionManager.m +99 -23
- package/apple/LayoutReanimation/REASnapshot.h +1 -0
- package/apple/LayoutReanimation/REASnapshot.m +78 -37
- package/apple/REAModule.h +22 -2
- package/apple/REAModule.mm +97 -46
- package/apple/REANodesManager.h +3 -3
- package/apple/REANodesManager.mm +46 -22
- package/apple/native/NativeProxy.h +28 -2
- package/apple/native/NativeProxy.mm +65 -195
- package/apple/native/PlatformDepMethodsHolderImpl.h +59 -0
- package/apple/native/PlatformDepMethodsHolderImpl.mm +429 -0
- package/apple/sensor/ReanimatedSensor.m +5 -5
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js +1 -1
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/animationBuilder.js +1 -0
- package/lib/module/animationBuilder.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +4 -4
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +9 -6
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js +11 -0
- package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js.map +1 -0
- package/lib/module/createAnimatedComponent/PropsFilter.js +25 -9
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +83 -52
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js +37 -0
- package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -0
- package/lib/module/createAnimatedComponent/index.js.map +1 -1
- package/lib/module/createAnimatedComponent/setAndForwardRef.js +4 -5
- package/lib/module/createAnimatedComponent/setAndForwardRef.js.map +1 -1
- package/lib/module/createAnimatedComponent/utils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/mock.js +12 -12
- package/lib/module/mock.js.map +1 -1
- package/lib/module/propsAllowlists.js.map +1 -1
- package/lib/module/reanimated2/Bezier.js.map +1 -1
- package/lib/module/reanimated2/Colors.js +4 -11
- package/lib/module/reanimated2/Colors.js.map +1 -1
- package/lib/module/reanimated2/Easing.js +3 -7
- package/lib/module/reanimated2/Easing.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +16 -13
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.web.js.map +1 -1
- package/lib/module/reanimated2/PlatformChecker.js +2 -1
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/module/reanimated2/PropAdapters.js +1 -1
- package/lib/module/reanimated2/PropAdapters.js.map +1 -1
- package/lib/module/reanimated2/PropsRegistry.js +1 -2
- package/lib/module/reanimated2/PropsRegistry.js.map +1 -1
- package/lib/module/reanimated2/Sensor.js +2 -2
- package/lib/module/reanimated2/Sensor.js.map +1 -1
- package/lib/module/reanimated2/SensorContainer.js +2 -2
- package/lib/module/reanimated2/SensorContainer.js.map +1 -1
- package/lib/module/reanimated2/UpdateLayoutAnimations.js +30 -8
- package/lib/module/reanimated2/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/reanimated2/UpdateProps.js.map +1 -1
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/reanimated2/WorkletEventHandler.js +74 -31
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/module/reanimated2/animation/clamp.js.map +1 -1
- package/lib/module/reanimated2/animation/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/decay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/index.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rigidDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rubberBandDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/utils.js.map +1 -1
- package/lib/module/reanimated2/animation/delay.js.map +1 -1
- package/lib/module/reanimated2/animation/index.js.map +1 -1
- package/lib/module/reanimated2/animation/repeat.js +1 -6
- package/lib/module/reanimated2/animation/repeat.js.map +1 -1
- package/lib/module/reanimated2/animation/sequence.js +1 -5
- package/lib/module/reanimated2/animation/sequence.js.map +1 -1
- package/lib/module/reanimated2/animation/spring.js.map +1 -1
- package/lib/module/reanimated2/animation/springUtils.js +8 -10
- package/lib/module/reanimated2/animation/springUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/styleAnimation.js +5 -4
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/module/reanimated2/animation/timing.js +4 -1
- package/lib/module/reanimated2/animation/timing.js.map +1 -1
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js +1 -2
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/util.js +22 -2
- package/lib/module/reanimated2/animation/util.js.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +3 -1
- package/lib/module/reanimated2/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/component/FlatList.js +1 -0
- package/lib/module/reanimated2/component/FlatList.js.map +1 -1
- package/lib/module/reanimated2/component/Image.js +1 -0
- package/lib/module/reanimated2/component/Image.js.map +1 -1
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js +1 -0
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js.map +1 -1
- package/lib/module/reanimated2/component/PerformanceMonitor.js +169 -0
- package/lib/module/reanimated2/component/PerformanceMonitor.js.map +1 -0
- package/lib/module/reanimated2/component/ScrollView.js +1 -0
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/module/reanimated2/component/Text.js +1 -0
- package/lib/module/reanimated2/component/Text.js.map +1 -1
- package/lib/module/reanimated2/component/View.js +1 -0
- package/lib/module/reanimated2/component/View.js.map +1 -1
- package/lib/module/reanimated2/core.js +6 -15
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +8 -8
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +33 -8
- package/lib/module/reanimated2/fabricUtils.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +2 -2
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/index.js.map +1 -1
- package/lib/module/reanimated2/globals.d.js.map +1 -1
- package/lib/module/reanimated2/helperTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/index.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +3 -4
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedProps.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js +12 -7
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +3 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +3 -6
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js +3 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useEvent.js +4 -5
- package/lib/module/reanimated2/hook/useEvent.js.map +1 -1
- package/lib/module/reanimated2/hook/useFrameCallback.js +1 -2
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/useHandler.js +3 -1
- package/lib/module/reanimated2/hook/useHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useReducedMotion.js.map +1 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +60 -16
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useWorkletCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/utils.js.map +1 -1
- package/lib/module/reanimated2/index.js +2 -0
- package/lib/module/reanimated2/index.js.map +1 -1
- package/lib/module/reanimated2/initializers.js +1 -5
- package/lib/module/reanimated2/initializers.js.map +1 -1
- package/lib/module/reanimated2/interpolateColor.js +2 -6
- package/lib/module/reanimated2/interpolateColor.js.map +1 -1
- package/lib/module/reanimated2/interpolation.js +1 -1
- package/lib/module/reanimated2/interpolation.js.map +1 -1
- package/lib/module/reanimated2/isSharedValue.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.js +3 -6
- package/lib/module/reanimated2/jestUtils.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.web.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +5 -9
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/index.js +2 -2
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/react-native-web.d.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +4 -2
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +12 -11
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +12 -10
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js +11 -4
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +26 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +6 -6
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +34 -34
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +17 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js +16 -12
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js +13 -7
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Bounce.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Fade.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Flip.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Lightspeed.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Pinwheel.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Roll.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Rotate.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Slide.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Stretch.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Zoom.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js +0 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js +1 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js +3 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js +6 -7
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/config.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js +2 -2
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Fading.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Linear.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Sequenced.web.js.map +1 -1
- package/lib/module/reanimated2/mappers.js +2 -4
- package/lib/module/reanimated2/mappers.js.map +1 -1
- package/lib/module/reanimated2/mockedRequestAnimationFrame.js.map +1 -1
- package/lib/module/reanimated2/mutables.js +2 -4
- package/lib/module/reanimated2/mutables.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js +2 -4
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js +2 -2
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/index.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.web.js.map +1 -1
- package/lib/module/reanimated2/pluginUtils.js.map +1 -1
- package/lib/module/reanimated2/publicGlobals.js.map +1 -1
- package/lib/module/reanimated2/runtimes.js +11 -19
- package/lib/module/reanimated2/runtimes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/RNScreensTurboModule.js +20 -0
- package/lib/module/reanimated2/screenTransition/RNScreensTurboModule.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/animationManager.js +41 -0
- package/lib/module/reanimated2/screenTransition/animationManager.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/commonTypes.js +4 -0
- package/lib/module/reanimated2/screenTransition/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/index.js +5 -0
- package/lib/module/reanimated2/screenTransition/index.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/presets.js +157 -0
- package/lib/module/reanimated2/screenTransition/presets.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/styleUpdater.js +62 -0
- package/lib/module/reanimated2/screenTransition/styleUpdater.js.map +1 -0
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js +190 -0
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js.map +1 -0
- package/lib/module/reanimated2/shareableMappingCache.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +27 -10
- package/lib/module/reanimated2/shareables.js.map +1 -1
- package/lib/module/reanimated2/threads.js +9 -34
- package/lib/module/reanimated2/threads.js.map +1 -1
- package/lib/module/reanimated2/valueSetter.js +1 -2
- package/lib/module/reanimated2/valueSetter.js.map +1 -1
- package/lib/module/reanimated2/valueUnpacker.js +4 -3
- package/lib/module/reanimated2/valueUnpacker.js.map +1 -1
- package/lib/module/specs/NativeReanimatedModule.js +5 -0
- package/lib/module/specs/NativeReanimatedModule.js.map +1 -0
- package/lib/typescript/ConfigHelper.d.ts +1 -0
- package/lib/typescript/createAnimatedComponent/InlinePropManager.d.ts +1 -1
- package/lib/typescript/createAnimatedComponent/JSPropsUpdater.web.d.ts +6 -0
- package/lib/typescript/createAnimatedComponent/PropsFilter.d.ts +3 -0
- package/lib/typescript/createAnimatedComponent/getViewInfo.d.ts +9 -0
- package/lib/typescript/reanimated2/NativeReanimated/NativeReanimated.d.ts +8 -13
- package/lib/typescript/reanimated2/UpdateLayoutAnimations.d.ts +12 -1
- package/lib/typescript/reanimated2/WorkletEventHandler.d.ts +16 -9
- package/lib/typescript/reanimated2/animation/util.d.ts +2 -0
- package/lib/typescript/reanimated2/component/LayoutAnimationConfig.d.ts +1 -1
- package/lib/typescript/reanimated2/component/PerformanceMonitor.d.ts +2 -0
- package/lib/typescript/reanimated2/core.d.ts +3 -4
- package/lib/typescript/reanimated2/hook/commonTypes.d.ts +6 -0
- package/lib/typescript/reanimated2/hook/useEvent.d.ts +2 -3
- package/lib/typescript/reanimated2/hook/useScrollViewOffset.d.ts +3 -1
- package/lib/typescript/reanimated2/index.d.ts +3 -0
- package/lib/typescript/reanimated2/js-reanimated/JSReanimated.d.ts +2 -2
- package/lib/typescript/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +2 -1
- package/lib/typescript/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.d.ts +2 -2
- package/lib/typescript/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.d.ts +2 -2
- package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
- package/lib/typescript/reanimated2/screenTransition/RNScreensTurboModule.d.ts +2 -0
- package/lib/typescript/reanimated2/screenTransition/animationManager.d.ts +3 -0
- package/lib/typescript/reanimated2/screenTransition/commonTypes.d.ts +38 -0
- package/lib/typescript/reanimated2/screenTransition/index.d.ts +3 -0
- package/lib/typescript/reanimated2/screenTransition/presets.d.ts +11 -0
- package/lib/typescript/reanimated2/screenTransition/styleUpdater.d.ts +3 -0
- package/lib/typescript/reanimated2/screenTransition/swipeSimulator.d.ts +2 -0
- package/lib/typescript/specs/NativeReanimatedModule.d.ts +6 -0
- package/package.json +29 -17
- package/plugin/build/plugin.js +7 -2
- package/src/ConfigHelper.ts +1 -1
- package/src/animationBuilder.tsx +2 -0
- package/src/createAnimatedComponent/InlinePropManager.ts +2 -2
- package/src/createAnimatedComponent/JSPropsUpdater.ts +7 -6
- package/src/createAnimatedComponent/JSPropsUpdater.web.ts +26 -0
- package/src/createAnimatedComponent/PropsFilter.tsx +31 -6
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +108 -60
- package/src/createAnimatedComponent/getViewInfo.ts +39 -0
- package/src/mock.ts +13 -1
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +33 -35
- package/src/reanimated2/PlatformChecker.ts +3 -2
- package/src/reanimated2/PropsRegistry.ts +1 -3
- package/src/reanimated2/UpdateLayoutAnimations.ts +53 -13
- package/src/reanimated2/WorkletEventHandler.ts +98 -39
- package/src/reanimated2/animation/styleAnimation.ts +8 -6
- package/src/reanimated2/animation/timing.ts +9 -1
- package/src/reanimated2/animation/util.ts +28 -3
- package/src/reanimated2/commonTypes.ts +4 -1
- package/src/reanimated2/component/PerformanceMonitor.tsx +216 -0
- package/src/reanimated2/core.ts +9 -31
- package/src/reanimated2/errors.ts +1 -0
- package/src/reanimated2/fabricUtils.ts +43 -18
- package/src/reanimated2/globals.d.ts +11 -1
- package/src/reanimated2/hook/commonTypes.ts +10 -0
- package/src/reanimated2/hook/useAnimatedRef.ts +20 -11
- package/src/reanimated2/hook/useEvent.ts +4 -4
- package/src/reanimated2/hook/useScrollViewOffset.ts +94 -23
- package/src/reanimated2/index.ts +11 -0
- package/src/reanimated2/js-reanimated/JSReanimated.ts +7 -7
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +4 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +9 -1
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +9 -1
- package/src/reanimated2/layoutReanimation/animationsManager.ts +10 -2
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +13 -0
- package/src/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.ts +17 -8
- package/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts +26 -7
- package/src/reanimated2/layoutReanimation/web/animationsManager.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/componentStyle.ts +3 -1
- package/src/reanimated2/layoutReanimation/web/componentUtils.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/createAnimation.ts +2 -2
- package/src/reanimated2/platform-specific/jsVersion.ts +1 -1
- package/src/reanimated2/platformFunctions/getRelativeCoords.ts +2 -2
- package/src/reanimated2/screenTransition/RNScreensTurboModule.ts +29 -0
- package/src/reanimated2/screenTransition/animationManager.ts +45 -0
- package/src/reanimated2/screenTransition/commonTypes.ts +63 -0
- package/src/reanimated2/screenTransition/index.ts +12 -0
- package/src/reanimated2/screenTransition/presets.ts +137 -0
- package/src/reanimated2/screenTransition/styleUpdater.ts +73 -0
- package/src/reanimated2/screenTransition/swipeSimulator.ts +238 -0
- package/src/reanimated2/shareables.ts +29 -6
- package/src/reanimated2/valueUnpacker.ts +10 -3
- package/src/specs/NativeReanimatedModule.ts +9 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/70/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +0 -16
- package/android/src/reactNativeVersionPatch/messageQueueThread/67/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +0 -12
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { BaseAnimationBuilder } from '../animationBuilder';
|
|
7
7
|
import { Easing } from '../../Easing';
|
|
8
8
|
import { withTiming } from '../../animation';
|
|
9
|
+
import { assertEasingIsWorklet } from '../../animation/util';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Layout transitions with a curved animation. You can modify the behavior by chaining methods like `.duration(500)` or `.delay(500)`.
|
|
@@ -15,8 +16,8 @@ import { withTiming } from '../../animation';
|
|
|
15
16
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#fading-transition
|
|
16
17
|
*/
|
|
17
18
|
export class CurvedTransition extends BaseAnimationBuilder {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...
|
|
19
|
+
constructor(...args) {
|
|
20
|
+
super(...args);
|
|
20
21
|
_defineProperty(this, "easingXV", Easing.in(Easing.ease));
|
|
21
22
|
_defineProperty(this, "easingYV", Easing.out(Easing.ease));
|
|
22
23
|
_defineProperty(this, "easingWidthV", Easing.in(Easing.exp));
|
|
@@ -73,6 +74,9 @@ export class CurvedTransition extends BaseAnimationBuilder {
|
|
|
73
74
|
return instance.easingX(easing);
|
|
74
75
|
}
|
|
75
76
|
easingX(easing) {
|
|
77
|
+
if (__DEV__) {
|
|
78
|
+
assertEasingIsWorklet(easing);
|
|
79
|
+
}
|
|
76
80
|
this.easingXV = easing;
|
|
77
81
|
return this;
|
|
78
82
|
}
|
|
@@ -81,6 +85,9 @@ export class CurvedTransition extends BaseAnimationBuilder {
|
|
|
81
85
|
return instance.easingY(easing);
|
|
82
86
|
}
|
|
83
87
|
easingY(easing) {
|
|
88
|
+
if (__DEV__) {
|
|
89
|
+
assertEasingIsWorklet(easing);
|
|
90
|
+
}
|
|
84
91
|
this.easingYV = easing;
|
|
85
92
|
return this;
|
|
86
93
|
}
|
|
@@ -89,6 +96,9 @@ export class CurvedTransition extends BaseAnimationBuilder {
|
|
|
89
96
|
return instance.easingWidth(easing);
|
|
90
97
|
}
|
|
91
98
|
easingWidth(easing) {
|
|
99
|
+
if (__DEV__) {
|
|
100
|
+
assertEasingIsWorklet(easing);
|
|
101
|
+
}
|
|
92
102
|
this.easingWidthV = easing;
|
|
93
103
|
return this;
|
|
94
104
|
}
|
|
@@ -97,6 +107,9 @@ export class CurvedTransition extends BaseAnimationBuilder {
|
|
|
97
107
|
return instance.easingHeight(easing);
|
|
98
108
|
}
|
|
99
109
|
easingHeight(easing) {
|
|
110
|
+
if (__DEV__) {
|
|
111
|
+
assertEasingIsWorklet(easing);
|
|
112
|
+
}
|
|
100
113
|
this.easingHeightV = easing;
|
|
101
114
|
return this;
|
|
102
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","BaseAnimationBuilder","Easing","withTiming","assertEasingIsWorklet","CurvedTransition","constructor","args","in","ease","out","exp","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","easing","easingX","easingXV","easingY","easingYV","easingWidth","easingWidthV","easingHeight","easingHeightV","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance","__DEV__"],"sources":["CurvedTransition.ts"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport type { EasingFunction } from '../../Easing';\nimport { Easing } from '../../Easing';\nimport { withTiming } from '../../animation';\nimport { assertEasingIsWorklet } from '../../animation/util';\n\n/**\n * Layout transitions with a curved animation. You can modify the behavior by chaining methods like `.duration(500)` or `.delay(500)`.\n *\n * You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#fading-transition\n */\nexport class CurvedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n easingXV: EasingFunction = Easing.in(Easing.ease);\n easingYV: EasingFunction = Easing.out(Easing.ease);\n easingWidthV: EasingFunction = Easing.in(Easing.exp);\n easingHeightV: EasingFunction = Easing.out(Easing.exp);\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new CurvedTransition() as InstanceType<T>;\n }\n\n static easingX(easing: EasingFunction): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingX(easing);\n }\n\n easingX(easing: EasingFunction): CurvedTransition {\n if (__DEV__) {\n assertEasingIsWorklet(easing);\n }\n this.easingXV = easing;\n return this;\n }\n\n static easingY(easing: EasingFunction): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingY(easing);\n }\n\n easingY(easing: EasingFunction): CurvedTransition {\n if (__DEV__) {\n assertEasingIsWorklet(easing);\n }\n this.easingYV = easing;\n return this;\n }\n\n static easingWidth(easing: EasingFunction): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingWidth(easing);\n }\n\n easingWidth(easing: EasingFunction): CurvedTransition {\n if (__DEV__) {\n assertEasingIsWorklet(easing);\n }\n this.easingWidthV = easing;\n return this;\n }\n\n static easingHeight(easing: EasingFunction): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingHeight(easing);\n }\n\n easingHeight(easing: EasingFunction): CurvedTransition {\n if (__DEV__) {\n assertEasingIsWorklet(easing);\n }\n this.easingHeightV = easing;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 300;\n const easing = {\n easingX: this.easingXV,\n easingY: this.easingYV,\n easingWidth: this.easingWidthV,\n easingHeight: this.easingHeightV,\n };\n\n return (values) => {\n 'worklet';\n\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, {\n duration,\n easing: easing.easingX,\n })\n ),\n originY: delayFunction(\n delay,\n withTiming(values.targetOriginY, {\n duration,\n easing: easing.easingY,\n })\n ),\n width: delayFunction(\n delay,\n withTiming(values.targetWidth, {\n duration,\n easing: easing.easingWidth,\n })\n ),\n height: delayFunction(\n delay,\n withTiming(values.targetHeight, {\n duration,\n easing: easing.easingHeight,\n })\n ),\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAKb,SAASW,oBAAoB,QAAQ,qBAAqB;AAE1D,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,qBAAqB,QAAQ,sBAAsB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,SACnBJ,oBAAoB,CAE9B;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA3B,eAAA,mBAC6BsB,MAAM,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WAAW,CAACL,MAAM,CAAC;EACrC;EAEAK,WAAWA,CAACL,MAAsB,EAAoB;IACpD,IAAI0B,OAAO,EAAE;MACX1C,qBAAqB,CAACgB,MAAM,CAAC;IAC/B;IACA,IAAI,CAACM,YAAY,GAAGN,MAAM;IAC1B,OAAO,IAAI;EACb;EAEA,OAAOO,YAAYA,CAACP,MAAsB,EAAoB;IAC5D,MAAMyB,QAAQ,GAAG,IAAI,CAACD,cAAc,CAAC,CAAC;IACtC,OAAOC,QAAQ,CAAClB,YAAY,CAACP,MAAM,CAAC;EACtC;EAEAO,YAAYA,CAACP,MAAsB,EAAoB;IACrD,IAAI0B,OAAO,EAAE;MACX1C,qBAAqB,CAACgB,MAAM,CAAC;IAC/B;IACA,IAAI,CAACQ,aAAa,GAAGR,MAAM;IAC3B,OAAO,IAAI;EACb;AA0DF","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { BaseAnimationBuilder } from '../animationBuilder';
|
|
7
7
|
import { withSequence, withTiming } from '../../animation';
|
|
8
8
|
import { FadeIn, FadeOut } from '../defaultAnimations/Fade';
|
|
9
9
|
export class EntryExitTransition extends BaseAnimationBuilder {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...
|
|
10
|
+
constructor(...args) {
|
|
11
|
+
super(...args);
|
|
12
12
|
_defineProperty(this, "enteringV", FadeIn);
|
|
13
13
|
_defineProperty(this, "exitingV", FadeOut);
|
|
14
14
|
_defineProperty(this, "build", () => {
|
package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","BaseAnimationBuilder","withSequence","withTiming","FadeIn","FadeOut","EntryExitTransition","constructor","arguments","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","enteringAnimation","enteringV","build","exitingAnimation","exitingV","exitingDuration","getDuration","values","enteringValues","exitingValues","animations","transform","prop","keys","Array","isArray","forEach","index","transformProp","push","initialValues","duration","sequence","includes","mergedTransform","concat","map","objectKeys","length","console","error","current","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","entering","animation","instance","exiting","combineTransition"],"sources":["EntryExitTransition.ts"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n StylePropsWithArrayTransform,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { withSequence, withTiming } from '../../animation';\nimport { FadeIn, FadeOut } from '../defaultAnimations/Fade';\nimport type { AnimatableValue, AnimationObject } from '../../commonTypes';\nimport type { TransformArrayItem } from '../../helperTypes';\n\nexport class EntryExitTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n enteringV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeIn;\n\n exitingV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeOut;\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new EntryExitTransition() as InstanceType<T>;\n }\n\n static entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.entering(animation);\n }\n\n entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.enteringV = animation;\n return this;\n }\n\n static exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.exiting(animation);\n }\n\n exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.exitingV = animation;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n // @ts-ignore Calling `.build()` both static and instance methods works fine here, but `this` types are incompatible. They are not used though, so it's fine.\n const enteringAnimation = this.enteringV.build();\n // @ts-ignore Calling `.build()` both static and instance methods works fine here, but `this` types are incompatible. They are not used though, so it's fine.\n const exitingAnimation = this.exitingV.build();\n const exitingDuration = this.exitingV.getDuration();\n\n return (values) => {\n 'worklet';\n const enteringValues = enteringAnimation(values);\n const exitingValues = exitingAnimation(values);\n const animations: StylePropsWithArrayTransform = {\n transform: [],\n };\n\n for (const prop of Object.keys(exitingValues.animations)) {\n if (prop === 'transform') {\n if (!Array.isArray(exitingValues.animations.transform)) {\n continue;\n }\n exitingValues.animations.transform.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform!.push({\n [transformProp]: delayFunction(\n delay,\n withSequence(\n value[transformProp as keyof TransformArrayItem],\n withTiming(\n exitingValues.initialValues.transform\n ? // TODO TYPESCRIPT\n // @ts-ignore This line of code fails tragically\n // in newer versions of React Native, where they have\n // narrowed down the type of `transform` even further.\n // Since this piece of code improperly typed anyway\n // (e.g. it assumes types from RN Animated here) I'd rather\n // fix it in the future when types for animations\n // are properly defined.\n exitingValues.initialValues.transform[index][\n transformProp\n ]\n : 0,\n { duration: 0 }\n )\n )\n ),\n } as TransformArrayItem);\n }\n });\n } else {\n const sequence =\n enteringValues.animations[prop] !== undefined\n ? [\n exitingValues.animations[prop],\n withTiming(enteringValues.initialValues[prop], {\n duration: 0,\n }),\n enteringValues.animations[prop],\n ]\n : [\n exitingValues.animations[prop],\n withTiming(\n Object.keys(values).includes(prop)\n ? values[prop as keyof LayoutAnimationsValues]\n : exitingValues.initialValues[prop],\n { duration: 0 }\n ),\n ];\n\n animations[prop] = delayFunction(delay, withSequence(...sequence));\n }\n }\n for (const prop of Object.keys(enteringValues.animations)) {\n if (prop === 'transform') {\n if (!Array.isArray(enteringValues.animations.transform)) {\n continue;\n }\n enteringValues.animations.transform.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform!.push({\n [transformProp]: delayFunction(\n delay + exitingDuration,\n withSequence(\n withTiming(\n enteringValues.initialValues.transform\n ? ((\n enteringValues.initialValues\n .transform as TransformArrayItem[]\n )[index][\n transformProp as keyof TransformArrayItem\n ] as AnimatableValue)\n : 0,\n { duration: exitingDuration }\n ),\n value[\n transformProp as keyof TransformArrayItem\n ] as AnimatableValue\n )\n ),\n } as TransformArrayItem);\n }\n });\n } else if (animations[prop] !== undefined) {\n // it was already added in the previous loop\n continue;\n } else {\n animations[prop] = delayFunction(\n delay,\n withSequence(\n withTiming(enteringValues.initialValues[prop], { duration: 0 }),\n enteringValues.animations[prop]\n )\n );\n }\n }\n\n const mergedTransform = (\n Array.isArray(exitingValues.initialValues.transform)\n ? exitingValues.initialValues.transform\n : []\n ).concat(\n (Array.isArray(enteringValues.animations.transform)\n ? enteringValues.animations.transform\n : []\n ).map((value) => {\n const objectKeys = Object.keys(value);\n if (objectKeys?.length < 1) {\n console.error(\n `[Reanimated]: \\${value} is not a valid Transform object`\n );\n return value;\n }\n\n const transformProp = objectKeys[0];\n const current =\n // TODO TYPESCRIPT\n // @ts-ignore Read similar comment above.\n (value[transformProp] as AnimationObject).current;\n if (typeof current === 'string') {\n if (current.includes('deg')) {\n return {\n [transformProp]: '0deg',\n } as unknown as TransformArrayItem;\n } else {\n return {\n [transformProp]: '0',\n } as unknown as TransformArrayItem;\n }\n } else if (transformProp.includes('translate')) {\n return { [transformProp]: 0 } as unknown as TransformArrayItem;\n } else {\n return { [transformProp]: 1 } as unknown as TransformArrayItem;\n }\n })\n );\n\n return {\n initialValues: {\n ...exitingValues.initialValues,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n transform: mergedTransform,\n },\n animations: {\n originX: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginX, { duration: exitingDuration })\n ),\n originY: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginY, { duration: exitingDuration })\n ),\n width: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetWidth, { duration: exitingDuration })\n ),\n height: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetHeight, { duration: exitingDuration })\n ),\n ...animations,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Lets you combine two layout animations into a layout transition. You can modify the behavior by chaining methods like `.delay(500)`.\n *\n * @param exiting - Layout animation used when components are removed from layout (eg. `FadeOut`).\n * @param entering - Layout animation used when components are added to layout (eg. `FadeIn`).\n * @returns A custom layout transition. You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#combine-transition\n */\nexport function combineTransition(\n exiting: BaseAnimationBuilder | typeof BaseAnimationBuilder,\n entering: BaseAnimationBuilder | typeof BaseAnimationBuilder\n): EntryExitTransition {\n return EntryExitTransition.entering(entering).exiting(exiting);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,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,mBAAmB,EAAE;EAClC;EAEA,OAAOsD,QAAQA,CACbC,SAA6D,EACxC;IACrB,MAAMC,QAAQ,GAAG,IAAI,CAACH,cAAc,EAAE;IACtC,OAAOG,QAAQ,CAACF,QAAQ,CAACC,SAAS,CAAC;EACrC;EAEAD,QAAQA,CACNC,SAA6D,EACxC;IACrB,IAAI,CAAC7C,SAAS,GAAG6C,SAAS;IAC1B,OAAO,IAAI;EACb;EAEA,OAAOE,OAAOA,CACZF,SAA6D,EACxC;IACrB,MAAMC,QAAQ,GAAG,IAAI,CAACH,cAAc,EAAE;IACtC,OAAOG,QAAQ,CAACC,OAAO,CAACF,SAAS,CAAC;EACpC;EAEAE,OAAOA,CACLF,SAA6D,EACxC;IACrB,IAAI,CAAC1C,QAAQ,GAAG0C,SAAS;IACzB,OAAO,IAAI;EACb;AAgMF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,iBAAiBA,CAC/BD,OAA2D,EAC3DH,QAA4D,EACvC;EACrB,OAAOtD,mBAAmB,CAACsD,QAAQ,CAACA,QAAQ,CAAC,CAACG,OAAO,CAACA,OAAO,CAAC;AAChE"}
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","BaseAnimationBuilder","withSequence","withTiming","FadeIn","FadeOut","EntryExitTransition","constructor","args","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","enteringAnimation","enteringV","build","exitingAnimation","exitingV","exitingDuration","getDuration","values","enteringValues","exitingValues","animations","transform","prop","keys","Array","isArray","forEach","index","transformProp","push","initialValues","duration","sequence","undefined","includes","mergedTransform","concat","map","objectKeys","length","console","error","current","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","entering","animation","instance","exiting","combineTransition"],"sources":["EntryExitTransition.ts"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n StylePropsWithArrayTransform,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { withSequence, withTiming } from '../../animation';\nimport { FadeIn, FadeOut } from '../defaultAnimations/Fade';\nimport type { AnimatableValue, AnimationObject } from '../../commonTypes';\nimport type { TransformArrayItem } from '../../helperTypes';\n\nexport class EntryExitTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n enteringV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeIn;\n\n exitingV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeOut;\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new EntryExitTransition() as InstanceType<T>;\n }\n\n static entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.entering(animation);\n }\n\n entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.enteringV = animation;\n return this;\n }\n\n static exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.exiting(animation);\n }\n\n exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.exitingV = animation;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n // @ts-ignore Calling `.build()` both static and instance methods works fine here, but `this` types are incompatible. They are not used though, so it's fine.\n const enteringAnimation = this.enteringV.build();\n // @ts-ignore Calling `.build()` both static and instance methods works fine here, but `this` types are incompatible. They are not used though, so it's fine.\n const exitingAnimation = this.exitingV.build();\n const exitingDuration = this.exitingV.getDuration();\n\n return (values) => {\n 'worklet';\n const enteringValues = enteringAnimation(values);\n const exitingValues = exitingAnimation(values);\n const animations: StylePropsWithArrayTransform = {\n transform: [],\n };\n\n for (const prop of Object.keys(exitingValues.animations)) {\n if (prop === 'transform') {\n if (!Array.isArray(exitingValues.animations.transform)) {\n continue;\n }\n exitingValues.animations.transform.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform!.push({\n [transformProp]: delayFunction(\n delay,\n withSequence(\n value[transformProp as keyof TransformArrayItem],\n withTiming(\n exitingValues.initialValues.transform\n ? // TODO TYPESCRIPT\n // @ts-ignore This line of code fails tragically\n // in newer versions of React Native, where they have\n // narrowed down the type of `transform` even further.\n // Since this piece of code improperly typed anyway\n // (e.g. it assumes types from RN Animated here) I'd rather\n // fix it in the future when types for animations\n // are properly defined.\n exitingValues.initialValues.transform[index][\n transformProp\n ]\n : 0,\n { duration: 0 }\n )\n )\n ),\n } as TransformArrayItem);\n }\n });\n } else {\n const sequence =\n enteringValues.animations[prop] !== undefined\n ? [\n exitingValues.animations[prop],\n withTiming(enteringValues.initialValues[prop], {\n duration: 0,\n }),\n enteringValues.animations[prop],\n ]\n : [\n exitingValues.animations[prop],\n withTiming(\n Object.keys(values).includes(prop)\n ? values[prop as keyof LayoutAnimationsValues]\n : exitingValues.initialValues[prop],\n { duration: 0 }\n ),\n ];\n\n animations[prop] = delayFunction(delay, withSequence(...sequence));\n }\n }\n for (const prop of Object.keys(enteringValues.animations)) {\n if (prop === 'transform') {\n if (!Array.isArray(enteringValues.animations.transform)) {\n continue;\n }\n enteringValues.animations.transform.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform!.push({\n [transformProp]: delayFunction(\n delay + exitingDuration,\n withSequence(\n withTiming(\n enteringValues.initialValues.transform\n ? ((\n enteringValues.initialValues\n .transform as TransformArrayItem[]\n )[index][\n transformProp as keyof TransformArrayItem\n ] as AnimatableValue)\n : 0,\n { duration: exitingDuration }\n ),\n value[\n transformProp as keyof TransformArrayItem\n ] as AnimatableValue\n )\n ),\n } as TransformArrayItem);\n }\n });\n } else if (animations[prop] !== undefined) {\n // it was already added in the previous loop\n continue;\n } else {\n animations[prop] = delayFunction(\n delay,\n withSequence(\n withTiming(enteringValues.initialValues[prop], { duration: 0 }),\n enteringValues.animations[prop]\n )\n );\n }\n }\n\n const mergedTransform = (\n Array.isArray(exitingValues.initialValues.transform)\n ? exitingValues.initialValues.transform\n : []\n ).concat(\n (Array.isArray(enteringValues.animations.transform)\n ? enteringValues.animations.transform\n : []\n ).map((value) => {\n const objectKeys = Object.keys(value);\n if (objectKeys?.length < 1) {\n console.error(\n `[Reanimated]: \\${value} is not a valid Transform object`\n );\n return value;\n }\n\n const transformProp = objectKeys[0];\n const current =\n // TODO TYPESCRIPT\n // @ts-ignore Read similar comment above.\n (value[transformProp] as AnimationObject).current;\n if (typeof current === 'string') {\n if (current.includes('deg')) {\n return {\n [transformProp]: '0deg',\n } as unknown as TransformArrayItem;\n } else {\n return {\n [transformProp]: '0',\n } as unknown as TransformArrayItem;\n }\n } else if (transformProp.includes('translate')) {\n return { [transformProp]: 0 } as unknown as TransformArrayItem;\n } else {\n return { [transformProp]: 1 } as unknown as TransformArrayItem;\n }\n })\n );\n\n return {\n initialValues: {\n ...exitingValues.initialValues,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n transform: mergedTransform,\n },\n animations: {\n originX: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginX, { duration: exitingDuration })\n ),\n originY: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginY, { duration: exitingDuration })\n ),\n width: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetWidth, { duration: exitingDuration })\n ),\n height: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetHeight, { duration: exitingDuration })\n ),\n ...animations,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Lets you combine two layout animations into a layout transition. You can modify the behavior by chaining methods like `.delay(500)`.\n *\n * @param exiting - Layout animation used when components are removed from layout (eg. `FadeOut`).\n * @param entering - Layout animation used when components are added to layout (eg. `FadeIn`).\n * @returns A custom layout transition. You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#combine-transition\n */\nexport function combineTransition(\n exiting: BaseAnimationBuilder | typeof BaseAnimationBuilder,\n entering: BaseAnimationBuilder | typeof BaseAnimationBuilder\n): EntryExitTransition {\n return EntryExitTransition.entering(entering).exiting(exiting);\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAOb,SAASW,oBAAoB,QAAQ,qBAAqB;AAC1D,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,EAAEC,OAAO,QAAQ,2BAA2B;AAI3D,OAAO,MAAMC,mBAAmB,SACtBL,oBAAoB,C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AC;AAChE","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { withSequence, withTiming } from '../../animation';
|
|
7
7
|
import { BaseAnimationBuilder } from '../animationBuilder';
|
|
8
8
|
|
|
@@ -14,8 +14,8 @@ import { BaseAnimationBuilder } from '../animationBuilder';
|
|
|
14
14
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#fading-transition
|
|
15
15
|
*/
|
|
16
16
|
export class FadingTransition extends BaseAnimationBuilder {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...
|
|
17
|
+
constructor(...args) {
|
|
18
|
+
super(...args);
|
|
19
19
|
_defineProperty(this, "build", () => {
|
|
20
20
|
const delayFunction = this.getDelayFunction();
|
|
21
21
|
const callback = this.callbackV;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","withSequence","withTiming","BaseAnimationBuilder","FadingTransition","constructor","args","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","values","initialValues","opacity","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance"],"sources":["FadingTransition.ts"],"sourcesContent":["'use strict';\nimport { withSequence, withTiming } from '../../animation';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\n/**\n * Fades out components from one position and shows them in another. You can modify the behavior by chaining methods like `.duration(500)` or `.delay(500)`.\n *\n * You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#fading-transition\n */\nexport class FadingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new FadingTransition() as InstanceType<T>;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 500;\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n opacity: 1,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n opacity: delayFunction(\n delay,\n withSequence(\n withTiming(0, { duration }),\n withTiming(1, { duration })\n )\n ),\n originX: delayFunction(\n delay + duration,\n withTiming(values.targetOriginX, { duration: 50 })\n ),\n originY: delayFunction(\n delay + duration,\n withTiming(values.targetOriginY, { duration: 50 })\n ),\n width: delayFunction(\n delay + duration,\n withTiming(values.targetWidth, { duration: 50 })\n ),\n height: delayFunction(\n delay + duration,\n withTiming(values.targetHeight, { duration: 50 })\n ),\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EA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AAO,EAAEH,MAAM,CAACI,cAAc;YAC9BC,OAAO,EAAEL,MAAM,CAACM,cAAc;YAC9BC,KAAK,EAAEP,MAAM,CAACQ,YAAY;YAC1BC,MAAM,EAAET,MAAM,CAACU;UACjB,CAAC;UACDC,UAAU,EAAE;YACVT,OAAO,EAAEV,aAAa,CACpBI,KAAK,EACLV,YAAY,CACVC,UAAU,CAAC,CAAC,EAAE;cAAEW;YAAS,CAAC,CAAC,EAC3BX,UAAU,CAAC,CAAC,EAAE;cAAEW;YAAS,CAAC,CAC5B,CACF,CAAC;YACDK,OAAO,EAAEX,aAAa,CACpBI,KAAK,GAAGE,QAAQ,EAChBX,UAAU,CAACa,MAAM,CAACY,aAAa,EAAE;cAAEd,QAAQ,EAAE;YAAG,CAAC,CACnD,CAAC;YACDO,OAAO,EAAEb,aAAa,CACpBI,KAAK,GAAGE,QAAQ,EAChBX,UAAU,CAACa,MAAM,CAACa,aAAa,EAAE;cAAEf,QAAQ,EAAE;YAAG,CAAC,CACnD,CAAC;YACDS,KAAK,EAAEf,aAAa,CAClBI,KAAK,GAAGE,QAAQ,EAChBX,UAAU,CAACa,MAAM,CAACc,WAAW,EAAE;cAAEhB,QAAQ,EAAE;YAAG,CAAC,CACjD,CAAC;YACDW,MAAM,EAAEjB,aAAa,CACnBI,KAAK,GAAGE,QAAQ,EAChBX,UAAU,CAACa,MAAM,CAACe,YAAY,EAAE;cAAEjB,QAAQ,EAAE;YAAG,CAAC,CAClD;UACF,CAAC;UACDJ;QACF,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EAlDD,OAAOsB,cAAcA,CAAA,EAEF;IACjB,OAAO,IAAI3B,gBAAgB,CAAC,CAAC;EAC/B;AA+CF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { withSequence, withTiming } from '../../animation';
|
|
7
7
|
import { Easing } from '../../Easing';
|
|
8
8
|
import { BaseAnimationBuilder } from '../animationBuilder';
|
|
@@ -15,8 +15,8 @@ import { BaseAnimationBuilder } from '../animationBuilder';
|
|
|
15
15
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#jumping-transition
|
|
16
16
|
*/
|
|
17
17
|
export class JumpingTransition extends BaseAnimationBuilder {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...
|
|
18
|
+
constructor(...args) {
|
|
19
|
+
super(...args);
|
|
20
20
|
_defineProperty(this, "build", () => {
|
|
21
21
|
const delayFunction = this.getDelayFunction();
|
|
22
22
|
const callback = this.callbackV;
|
package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","withSequence","withTiming","Easing","BaseAnimationBuilder","JumpingTransition","constructor","args","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","config","values","d","Math","max","abs","targetOriginX","currentOriginX","targetOriginY","currentOriginY","initialValues","originX","originY","width","currentWidth","height","currentHeight","animations","min","easing","out","exp","bounce","targetWidth","targetHeight","createInstance"],"sources":["JumpingTransition.ts"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { withSequence, withTiming } from '../../animation';\nimport { Easing } from '../../Easing';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\n/**\n * Layout jumps - quite literally - from one position to another. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#jumping-transition\n */\nexport class JumpingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new JumpingTransition() as InstanceType<T>;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = (this.durationV ?? 300) / 2;\n const config = { duration: duration * 2 };\n\n return (values) => {\n 'worklet';\n const d = Math.max(\n Math.abs(values.targetOriginX - values.currentOriginX),\n Math.abs(values.targetOriginY - values.currentOriginY)\n );\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n Math.min(values.targetOriginY, values.currentOriginY) - d,\n {\n duration,\n easing: Easing.out(Easing.exp),\n }\n ),\n withTiming(values.targetOriginY, {\n ...config,\n duration,\n easing: Easing.bounce,\n })\n )\n ),\n width: delayFunction(delay, withTiming(values.targetWidth, config)),\n height: delayFunction(delay, withTiming(values.targetHeight, config)),\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC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AC;UACtE,CAAC;UACDN;QACF,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EAtDD,OAAO+B,cAAcA,CAAA,EAEF;IACjB,OAAO,IAAIpC,iBAAiB,CAAC,CAAC;EAChC;AAmDF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
7
7
|
/**
|
|
8
8
|
* Linearly transforms the layout from one position to another. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.
|
|
@@ -12,8 +12,8 @@ import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
|
12
12
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#linear-transition
|
|
13
13
|
*/
|
|
14
14
|
export class LinearTransition extends ComplexAnimationBuilder {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...
|
|
15
|
+
constructor(...args) {
|
|
16
|
+
super(...args);
|
|
17
17
|
_defineProperty(this, "build", () => {
|
|
18
18
|
const delayFunction = this.getDelayFunction();
|
|
19
19
|
const [animation, config] = this.getAnimationAndConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ComplexAnimationBuilder","LinearTransition","constructor","args","delayFunction","getDelayFunction","animation","config","getAnimationAndConfig","callback","callbackV","delay","getDelay","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","Layout"],"sources":["LinearTransition.ts"],"sourcesContent":["'use strict';\nimport type { BaseAnimationBuilder } from '../animationBuilder';\nimport { ComplexAnimationBuilder } from '../animationBuilder';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\n\n/**\n * Linearly transforms the layout from one position to another. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#linear-transition\n */\nexport class LinearTransition\n extends ComplexAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new LinearTransition() as InstanceType<T>;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const callback = this.callbackV;\n const delay = this.getDelay();\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n animation(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n animation(values.targetOriginY, config)\n ),\n width: delayFunction(delay, animation(values.targetWidth, config)),\n height: delayFunction(delay, animation(values.targetHeight, config)),\n },\n callback,\n };\n };\n };\n}\n\n/**\n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,OAAQC,MAAM,IAAK;QACjB,SAAS;;QACT,OAAO;UACLC,aAAa,EAAE;YACbC,OAAO,EAAEF,MAAM,CAACG,cAAc;YAC9BC,OAAO,EAAEJ,MAAM,CAACK,cAAc;YAC9BC,KAAK,EAAEN,MAAM,CAACO,YAAY;YAC1BC,MAAM,EAAER,MAAM,CAACS;UACjB,CAAC;UACDC,UAAU,EAAE;YACVR,OAAO,EAAEX,aAAa,CACpBO,KAAK,EACLL,SAAS,CAACO,MAAM,CAACW,aAAa,EAAEjB,MAAM,CACxC,CAAC;YACDU,OAAO,EAAEb,aAAa,CACpBO,KAAK,EACLL,SAAS,CAACO,MAAM,CAACY,aAAa,EAAElB,MAAM,CACxC,CAAC;YACDY,KAAK,EAAEf,aAAa,CAACO,KAAK,EAAEL,SAAS,CAACO,MAAM,CAACa,WAAW,EAAEnB,MAAM,CAAC,CAAC;YAClEc,MAAM,EAAEjB,aAAa,CAACO,KAAK,EAAEL,SAAS,CAACO,MAAM,CAACc,YAAY,EAAEpB,MAAM,CAAC;UACrE,CAAC;UACDE;QACF,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EApCD,OAAOmB,cAAcA,CAAA,EAEF;IACjB,OAAO,IAAI3B,gBAAgB,CAAC,CAAC;EAC/B;AAiCF;;AAEA;AACA;AACA;AACA,OAAO,MAAM4B,MAAM,GAAG5B,gBAAgB","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { withSequence, withTiming } from '../../animation';
|
|
7
7
|
import { BaseAnimationBuilder } from '../animationBuilder';
|
|
8
8
|
|
|
@@ -14,8 +14,8 @@ import { BaseAnimationBuilder } from '../animationBuilder';
|
|
|
14
14
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#sequenced-transition
|
|
15
15
|
*/
|
|
16
16
|
export class SequencedTransition extends BaseAnimationBuilder {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...
|
|
17
|
+
constructor(...args) {
|
|
18
|
+
super(...args);
|
|
19
19
|
_defineProperty(this, "reversed", false);
|
|
20
20
|
_defineProperty(this, "build", () => {
|
|
21
21
|
const delayFunction = this.getDelayFunction();
|
package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","withSequence","withTiming","BaseAnimationBuilder","SequencedTransition","constructor","args","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","sequenceDuration","durationV","config","duration","reverse","reversed","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance"],"sources":["SequencedTransition.ts"],"sourcesContent":["'use strict';\nimport { withSequence, withTiming } from '../../animation';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\n/**\n * Transforms layout starting from the X-axis and width first, followed by the Y-axis and height. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `layout` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/layout-transitions#sequenced-transition\n */\nexport class SequencedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n reversed = false;\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new SequencedTransition() as InstanceType<T>;\n }\n\n static reverse(): SequencedTransition {\n const instance = SequencedTransition.createInstance();\n return instance.reverse();\n }\n\n reverse(): SequencedTransition {\n this.reversed = !this.reversed;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const sequenceDuration = (this.durationV ?? 500) / 2;\n const config = { duration: sequenceDuration };\n const reverse = this.reversed;\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.currentOriginX : values.targetOriginX,\n config\n ),\n withTiming(values.targetOriginX, config)\n )\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetOriginY : values.currentOriginY,\n config\n ),\n withTiming(values.targetOriginY, config)\n )\n ),\n width: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.currentWidth : values.targetWidth,\n config\n ),\n withTiming(values.targetWidth, config)\n )\n ),\n height: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetHeight : values.currentHeight,\n config\n ),\n withTiming(values.targetHeight, config)\n )\n ),\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA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OAAO,IAAI9B,mBAAmB,CAAC,CAAC;EAClC;EAEA,OAAOa,OAAOA,CAAA,EAAwB;IACpC,MAAMkB,QAAQ,GAAG/B,mBAAmB,CAAC8B,cAAc,CAAC,CAAC;IACrD,OAAOC,QAAQ,CAAClB,OAAO,CAAC,CAAC;EAC3B;EAEAA,OAAOA,CAAA,EAAwB;IAC7B,IAAI,CAACC,QAAQ,GAAG,CAAC,IAAI,CAACA,QAAQ;IAC9B,OAAO,IAAI;EACb;AAiEF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport * from './LinearTransition';\nexport * from './FadingTransition';\nexport * from './SequencedTransition';\nexport * from './JumpingTransition';\nexport * from './CurvedTransition';\nexport * from './EntryExitTransition';\n"],"mappings":"AAAA,YAAY;;AACZ,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["'use strict';\nexport * from './LinearTransition';\nexport * from './FadingTransition';\nexport * from './SequencedTransition';\nexport * from './JumpingTransition';\nexport * from './CurvedTransition';\nexport * from './EntryExitTransition';\n"],"mappings":"AAAA,YAAY;;AACZ,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport './animationsManager';\nexport * from './animationBuilder';\nexport * from './defaultAnimations';\nexport * from './defaultTransitions';\nexport * from './sharedTransitions';\nexport type { KeyframeProps } from './animationBuilder/commonTypes';\n"],"mappings":"AAAA,YAAY;;AACZ,OAAO,qBAAqB;AAC5B,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,qBAAqB"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport './animationsManager';\nexport * from './animationBuilder';\nexport * from './defaultAnimations';\nexport * from './defaultTransitions';\nexport * from './sharedTransitions';\nexport type { KeyframeProps } from './animationBuilder/commonTypes';\n"],"mappings":"AAAA,YAAY;;AACZ,OAAO,qBAAqB;AAC5B,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,qBAAqB","ignoreList":[]}
|
package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { runOnUIImmediately } from '../../threads';
|
|
7
7
|
import { registerEventHandler, unregisterEventHandler } from '../../core';
|
|
8
8
|
import { Platform } from 'react-native';
|
|
@@ -27,12 +27,12 @@ export class ProgressTransitionManager {
|
|
|
27
27
|
})();
|
|
28
28
|
this.registerEventHandlers();
|
|
29
29
|
}
|
|
30
|
-
removeProgressAnimation(viewTag) {
|
|
30
|
+
removeProgressAnimation(viewTag, isUnmounting = true) {
|
|
31
31
|
this.unregisterEventHandlers();
|
|
32
32
|
runOnUIImmediately(() => {
|
|
33
33
|
'worklet';
|
|
34
34
|
|
|
35
|
-
global.ProgressTransitionRegister.removeProgressAnimation(viewTag);
|
|
35
|
+
global.ProgressTransitionRegister.removeProgressAnimation(viewTag, isUnmounting);
|
|
36
36
|
})();
|
|
37
37
|
}
|
|
38
38
|
registerEventHandlers() {
|
|
@@ -118,19 +118,24 @@ function createProgressTransitionRegister() {
|
|
|
118
118
|
let isTransitionRestart = false;
|
|
119
119
|
const progressTransitionManager = {
|
|
120
120
|
addProgressAnimation: (viewTag, progressAnimation) => {
|
|
121
|
-
if (currentTransitions.size > 0) {
|
|
121
|
+
if (currentTransitions.size > 0 && !progressAnimations.has(viewTag)) {
|
|
122
122
|
// there is no need to prevent cleaning on android
|
|
123
123
|
isTransitionRestart = !IS_ANDROID;
|
|
124
124
|
}
|
|
125
125
|
progressAnimations.set(viewTag, progressAnimation);
|
|
126
126
|
},
|
|
127
|
-
removeProgressAnimation: viewTag => {
|
|
127
|
+
removeProgressAnimation: (viewTag, isUnmounting) => {
|
|
128
128
|
if (currentTransitions.size > 0) {
|
|
129
129
|
// there is no need to prevent cleaning on android
|
|
130
130
|
isTransitionRestart = !IS_ANDROID;
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
if (isUnmounting) {
|
|
133
|
+
// Remove the animation config after the transition is finished
|
|
134
|
+
toRemove.add(viewTag);
|
|
135
|
+
} else {
|
|
136
|
+
// if the animation is removed, without ever being started, it can be removed immediately
|
|
137
|
+
progressAnimations.delete(viewTag);
|
|
138
|
+
}
|
|
134
139
|
},
|
|
135
140
|
onTransitionStart: (viewTag, snapshot) => {
|
|
136
141
|
skipCleaning = isTransitionRestart;
|
|
@@ -155,8 +160,7 @@ function createProgressTransitionRegister() {
|
|
|
155
160
|
progressTransitionManager.onTransitionEnd();
|
|
156
161
|
}
|
|
157
162
|
},
|
|
158
|
-
onTransitionEnd:
|
|
159
|
-
let removeViews = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
163
|
+
onTransitionEnd: (removeViews = false) => {
|
|
160
164
|
if (currentTransitions.size === 0) {
|
|
161
165
|
toRemove.clear();
|
|
162
166
|
return;
|
|
@@ -167,7 +171,7 @@ function createProgressTransitionRegister() {
|
|
|
167
171
|
return;
|
|
168
172
|
}
|
|
169
173
|
for (const viewTag of currentTransitions) {
|
|
170
|
-
global._notifyAboutEnd(viewTag, removeViews);
|
|
174
|
+
// global._notifyAboutEnd(viewTag, removeViews);
|
|
171
175
|
}
|
|
172
176
|
currentTransitions.clear();
|
|
173
177
|
if (isTransitionRestart) {
|
|
@@ -179,7 +183,7 @@ function createProgressTransitionRegister() {
|
|
|
179
183
|
if (toRemove.size > 0) {
|
|
180
184
|
for (const viewTag of toRemove) {
|
|
181
185
|
progressAnimations.delete(viewTag);
|
|
182
|
-
global._notifyAboutEnd(viewTag, removeViews);
|
|
186
|
+
// global._notifyAboutEnd(viewTag, removeViews);
|
|
183
187
|
}
|
|
184
188
|
toRemove.clear();
|
|
185
189
|
}
|