react-native-reanimated 3.8.1 → 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.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 +3 -8
- 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/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/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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","makeShareable","startMapper","stopMapper","updateProps","updatePropsJestWrapper","initialUpdaterRun","useSharedValue","buildWorkletsHash","isAnimated","shallowEqual","validateAnimatedStyles","makeViewDescriptorsSet","useViewRefSet","isJest","shouldBeUseWeb","isWorkletFunction","SHOULD_BE_USE_WEB","prepareAnimation","frameTimestamp","animatedProp","lastAnimation","lastValue","Array","isArray","forEach","prop","index","onFrame","animation","value","current","undefined","callStart","timestamp","onStart","Object","keys","key","runAnimations","result","animationsActive","allFinished","entry","finished","callback","k","styleUpdater","viewDescriptors","updater","state","maybeViewRef","isAnimatedProps","arguments","length","animations","newValues","oldValues","last","nonAnimatedNewValues","hasAnimations","hasNonAnimatedValues","global","__frameTimestamp","_getAnimationTimestamp","frame","isAnimationCancelled","isAnimationRunning","updates","propName","requestAnimationFrame","jestStyleUpdater","animatedStyle","adapters","checkSharedValueUsage","currentKey","element","Error","useAnimatedStyle","dependencies","viewsRef","animatedUpdaterData","inputs","values","__closure","_dependencies","__DEV__","adaptersArray","adaptersHash","areAnimationsActive","jestAnimatedStyle","__workletHash","push","initialStyle","initial","remoteState","shareableViewDescriptors","fun","updaterFn","adapter","mapperId","animatedStyleHandle"],"sources":["useAnimatedStyle.ts"],"sourcesContent":["'use strict';\nimport type { MutableRefObject } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport { makeShareable, startMapper, stopMapper } from '../core';\nimport updateProps, { updatePropsJestWrapper } from '../UpdateProps';\nimport { initialUpdaterRun } from '../animation';\nimport { useSharedValue } from './useSharedValue';\nimport {\n buildWorkletsHash,\n isAnimated,\n shallowEqual,\n validateAnimatedStyles,\n} from './utils';\nimport type {\n AnimatedStyleHandle,\n DefaultStyle,\n DependencyList,\n Descriptor,\n JestAnimatedStyleHandle,\n} from './commonTypes';\nimport type { ViewDescriptorsSet, ViewRefSet } from '../ViewDescriptorsSet';\nimport { makeViewDescriptorsSet, useViewRefSet } from '../ViewDescriptorsSet';\nimport { isJest, shouldBeUseWeb } from '../PlatformChecker';\nimport type {\n AnimationObject,\n Timestamp,\n NestedObjectValues,\n SharedValue,\n StyleProps,\n WorkletFunction,\n AnimatedPropsAdapterFunction,\n AnimatedPropsAdapterWorklet,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\nimport { isWorkletFunction } from '../commonTypes';\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\ninterface AnimatedState {\n last: AnimatedStyle<any>;\n animations: AnimatedStyle<any>;\n isAnimationRunning: boolean;\n isAnimationCancelled: boolean;\n}\n\ninterface AnimatedUpdaterData {\n initial: {\n value: AnimatedStyle<any>;\n updater: () => AnimatedStyle<any>;\n };\n remoteState: AnimatedState;\n viewDescriptors: ViewDescriptorsSet;\n}\n\nfunction prepareAnimation(\n frameTimestamp: number,\n animatedProp: AnimatedStyle<any>,\n lastAnimation: AnimatedStyle<any>,\n lastValue: AnimatedStyle<any>\n): void {\n 'worklet';\n if (Array.isArray(animatedProp)) {\n animatedProp.forEach((prop, index) => {\n prepareAnimation(\n frameTimestamp,\n prop,\n lastAnimation && lastAnimation[index],\n lastValue && lastValue[index]\n );\n });\n // return animatedProp;\n }\n if (typeof animatedProp === 'object' && animatedProp.onFrame) {\n const animation = animatedProp;\n\n let value = animation.current;\n if (lastValue !== undefined && lastValue !== null) {\n if (typeof lastValue === 'object') {\n if (lastValue.value !== undefined) {\n // previously it was a shared value\n value = lastValue.value;\n } else if (lastValue.onFrame !== undefined) {\n if (lastAnimation?.current !== undefined) {\n // it was an animation before, copy its state\n value = lastAnimation.current;\n } else if (lastValue?.current !== undefined) {\n // it was initialized\n value = lastValue.current;\n }\n }\n } else {\n // previously it was a plain value, just set it as starting point\n value = lastValue;\n }\n }\n\n animation.callStart = (timestamp: Timestamp) => {\n animation.onStart(animation, value, timestamp, lastAnimation);\n };\n animation.callStart(frameTimestamp);\n animation.callStart = null;\n } else if (typeof animatedProp === 'object') {\n // it is an object\n Object.keys(animatedProp).forEach((key) =>\n prepareAnimation(\n frameTimestamp,\n animatedProp[key],\n lastAnimation && lastAnimation[key],\n lastValue && lastValue[key]\n )\n );\n }\n}\n\nfunction runAnimations(\n animation: AnimatedStyle<any>,\n timestamp: Timestamp,\n key: number | string,\n result: AnimatedStyle<any>,\n animationsActive: SharedValue<boolean>\n): boolean {\n 'worklet';\n if (!animationsActive.value) {\n return true;\n }\n if (Array.isArray(animation)) {\n result[key] = [];\n let allFinished = true;\n animation.forEach((entry, index) => {\n if (\n !runAnimations(entry, timestamp, index, result[key], animationsActive)\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else if (typeof animation === 'object' && animation.onFrame) {\n let finished = true;\n if (!animation.finished) {\n if (animation.callStart) {\n animation.callStart(timestamp);\n animation.callStart = null;\n }\n finished = animation.onFrame(animation, timestamp);\n animation.timestamp = timestamp;\n if (finished) {\n animation.finished = true;\n animation.callback && animation.callback(true /* finished */);\n }\n }\n result[key] = animation.current;\n return finished;\n } else if (typeof animation === 'object') {\n result[key] = {};\n let allFinished = true;\n Object.keys(animation).forEach((k) => {\n if (\n !runAnimations(\n animation[k],\n timestamp,\n k,\n result[key],\n animationsActive\n )\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else {\n result[key] = animation;\n return true;\n }\n}\n\nfunction styleUpdater(\n viewDescriptors: SharedValue<Descriptor[]>,\n updater: WorkletFunction<[], AnimatedStyle<any>> | (() => AnimatedStyle<any>),\n state: AnimatedState,\n maybeViewRef: ViewRefSet<any> | undefined,\n animationsActive: SharedValue<boolean>,\n isAnimatedProps = false\n): void {\n 'worklet';\n const animations = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n const nonAnimatedNewValues: StyleProps = {};\n\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n let hasNonAnimatedValues = false;\n for (const key in newValues) {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp =\n global.__frameTimestamp || global._getAnimationTimestamp();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n } else {\n hasNonAnimatedValues = true;\n nonAnimatedNewValues[key] = value;\n delete animations[key];\n }\n }\n\n if (hasAnimations) {\n const frame = (timestamp: Timestamp) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle<any> = {};\n let allFinished = true;\n for (const propName in animations) {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n }\n\n if (updates) {\n updateProps(viewDescriptors, updates, maybeViewRef);\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n };\n\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n\n if (hasNonAnimatedValues) {\n updateProps(viewDescriptors, nonAnimatedNewValues, maybeViewRef);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n\n if (!shallowEqual(oldValues, newValues)) {\n updateProps(viewDescriptors, newValues, maybeViewRef, isAnimatedProps);\n }\n }\n state.last = newValues;\n}\n\nfunction jestStyleUpdater(\n viewDescriptors: SharedValue<Descriptor[]>,\n updater: WorkletFunction<[], AnimatedStyle<any>> | (() => AnimatedStyle<any>),\n state: AnimatedState,\n maybeViewRef: ViewRefSet<any> | undefined,\n animationsActive: SharedValue<boolean>,\n animatedStyle: MutableRefObject<AnimatedStyle<any>>,\n adapters: AnimatedPropsAdapterFunction[]\n): void {\n 'worklet';\n const animations: AnimatedStyle<any> = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n\n // extract animated props\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n Object.keys(animations).forEach((key) => {\n const value = newValues[key];\n if (!isAnimated(value)) {\n delete animations[key];\n }\n });\n Object.keys(newValues).forEach((key) => {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp =\n global.__frameTimestamp || global._getAnimationTimestamp();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n }\n });\n\n function frame(timestamp: Timestamp) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle<any> = {};\n let allFinished = true;\n Object.keys(animations).forEach((propName) => {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n });\n\n if (Object.keys(updates).length) {\n updatePropsJestWrapper(\n viewDescriptors,\n updates,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n }\n\n if (hasAnimations) {\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n }\n\n // calculate diff\n state.last = newValues;\n\n if (!shallowEqual(oldValues, newValues)) {\n updatePropsJestWrapper(\n viewDescriptors,\n newValues,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n}\n\n// check for invalid usage of shared values in returned object\nfunction checkSharedValueUsage(\n prop: NestedObjectValues<AnimationObject>,\n currentKey?: string\n): void {\n if (Array.isArray(prop)) {\n // if it's an array (i.ex. transform) validate all its elements\n for (const element of prop) {\n checkSharedValueUsage(element, currentKey);\n }\n } else if (\n typeof prop === 'object' &&\n prop !== null &&\n prop.value === undefined\n ) {\n // if it's a nested object, run validation for all its props\n for (const key of Object.keys(prop)) {\n checkSharedValueUsage(prop[key], key);\n }\n } else if (\n currentKey !== undefined &&\n typeof prop === 'object' &&\n prop !== null &&\n prop.value !== undefined\n ) {\n // if shared value is passed insted of its value, throw an error\n throw new Error(\n `[Reanimated] Invalid value passed to \\`${currentKey}\\`, maybe you forgot to use \\`.value\\`?`\n );\n }\n}\n\n/**\n * Lets you create a styles object, similar to StyleSheet styles, which can be animated using shared values.\n *\n * @param updater - A function returning an object with style properties you want to animate.\n * @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.\n * @returns An animated style object which has to be passed to the `style` property of an Animated component you want to animate.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedStyle\n */\n// You cannot pass Shared Values to `useAnimatedStyle` directly.\n// @ts-expect-error This overload is required by our API.\nexport function useAnimatedStyle<Style extends DefaultStyle>(\n updater: () => Style,\n dependencies?: DependencyList | null\n): Style;\n\nexport function useAnimatedStyle<Style extends DefaultStyle>(\n updater:\n | WorkletFunction<[], Style>\n | ((() => Style) & Record<string, unknown>),\n dependencies?: DependencyList | null,\n adapters?: AnimatedPropsAdapterWorklet | AnimatedPropsAdapterWorklet[] | null,\n isAnimatedProps = false\n): AnimatedStyleHandle<Style> | JestAnimatedStyleHandle<Style> {\n const viewsRef: ViewRefSet<unknown> | undefined = useViewRefSet();\n const animatedUpdaterData = useRef<AnimatedUpdaterData>();\n let inputs = Object.values(updater.__closure ?? {});\n if (SHOULD_BE_USE_WEB) {\n if (!inputs.length && dependencies?.length) {\n // let web work without a Babel plugin\n inputs = dependencies;\n }\n if (\n __DEV__ &&\n !inputs.length &&\n !dependencies &&\n !isWorkletFunction(updater)\n ) {\n throw new Error(\n `[Reanimated] \\`useAnimatedStyle\\` was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel plugin.\nFor more, see the docs: \\`https://docs.swmansion.com/react-native-reanimated/docs/guides/web-support#web-without-the-babel-plugin\\`.`\n );\n }\n }\n const adaptersArray = adapters\n ? Array.isArray(adapters)\n ? adapters\n : [adapters]\n : [];\n const adaptersHash = adapters ? buildWorkletsHash(adaptersArray) : null;\n const areAnimationsActive = useSharedValue<boolean>(true);\n const jestAnimatedStyle = useRef<Style>({} as Style);\n\n // build dependencies\n if (!dependencies) {\n dependencies = [...inputs, updater.__workletHash];\n } else {\n dependencies.push(updater.__workletHash);\n }\n adaptersHash && dependencies.push(adaptersHash);\n\n if (!animatedUpdaterData.current) {\n const initialStyle = initialUpdaterRun(updater);\n if (__DEV__) {\n validateAnimatedStyles(initialStyle);\n }\n animatedUpdaterData.current = {\n initial: {\n value: initialStyle,\n updater,\n },\n remoteState: makeShareable({\n last: initialStyle,\n animations: {},\n isAnimationCancelled: false,\n isAnimationRunning: false,\n }),\n viewDescriptors: makeViewDescriptorsSet(),\n };\n }\n\n const { initial, remoteState, viewDescriptors } = animatedUpdaterData.current;\n const shareableViewDescriptors = viewDescriptors.shareableViewDescriptors;\n\n dependencies.push(shareableViewDescriptors);\n\n useEffect(() => {\n let fun;\n let updaterFn = updater;\n if (adapters) {\n updaterFn = (() => {\n 'worklet';\n const newValues = updater();\n adaptersArray.forEach((adapter) => {\n adapter(newValues as Record<string, unknown>);\n });\n return newValues;\n }) as WorkletFunction<[], Style>;\n }\n\n if (isJest()) {\n fun = () => {\n 'worklet';\n jestStyleUpdater(\n shareableViewDescriptors,\n updater,\n remoteState,\n viewsRef,\n areAnimationsActive,\n jestAnimatedStyle,\n adaptersArray\n );\n };\n } else {\n fun = () => {\n 'worklet';\n styleUpdater(\n shareableViewDescriptors,\n updaterFn,\n remoteState,\n viewsRef,\n areAnimationsActive,\n isAnimatedProps\n );\n };\n }\n const mapperId = startMapper(fun, inputs);\n return () => {\n stopMapper(mapperId);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n\n useEffect(() => {\n areAnimationsActive.value = true;\n return () => {\n areAnimationsActive.value = false;\n };\n }, [areAnimationsActive]);\n\n checkSharedValueUsage(initial.value);\n\n const animatedStyleHandle = useRef<\n AnimatedStyleHandle<Style> | JestAnimatedStyleHandle<Style> | null\n >(null);\n\n if (!animatedStyleHandle.current) {\n animatedStyleHandle.current = isJest()\n ? { viewDescriptors, initial, viewsRef, jestAnimatedStyle }\n : { initial, viewsRef, viewDescriptors };\n }\n\n return animatedStyleHandle.current;\n}\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,SAAS;AAChE,OAAOC,WAAW,IAAIC,sBAAsB,QAAQ,gBAAgB;AACpE,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SACEC,iBAAiB,EACjBC,UAAU,EACVC,YAAY,EACZC,sBAAsB,QACjB,SAAS;AAShB,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,MAAM,EAAEC,cAAc,QAAQ,oBAAoB;AAY3D,SAASC,iBAAiB,QAAQ,gBAAgB;AAElD,MAAMC,iBAAiB,GAAGF,cAAc,EAAE;AAkB1C,SAASG,gBAAgBA,CACvBC,cAAsB,EACtBC,YAAgC,EAChCC,aAAiC,EACj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AAC,CAAC;EAEzBf,qBAAqB,CAACoB,OAAO,CAAChE,KAAK,CAAC;EAEpC,MAAMuE,mBAAmB,GAAGrG,MAAM,CAEhC,IAAI,CAAC;EAEP,IAAI,CAACqG,mBAAmB,CAACtE,OAAO,EAAE;IAChCsE,mBAAmB,CAACtE,OAAO,GAAGjB,MAAM,EAAE,GAClC;MAAEkC,eAAe;MAAE8C,OAAO;MAAEd,QAAQ;MAAEU;IAAkB,CAAC,GACzD;MAAEI,OAAO;MAAEd,QAAQ;MAAEhC;IAAgB,CAAC;EAC5C;EAEA,OAAOqD,mBAAmB,CAACtE,OAAO;AACpC"}
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","makeShareable","startMapper","stopMapper","updateProps","updatePropsJestWrapper","initialUpdaterRun","useSharedValue","buildWorkletsHash","isAnimated","shallowEqual","validateAnimatedStyles","makeViewDescriptorsSet","useViewRefSet","isJest","shouldBeUseWeb","isWorkletFunction","SHOULD_BE_USE_WEB","prepareAnimation","frameTimestamp","animatedProp","lastAnimation","lastValue","Array","isArray","forEach","prop","index","onFrame","animation","value","current","undefined","callStart","timestamp","onStart","Object","keys","key","runAnimations","result","animationsActive","allFinished","entry","finished","callback","k","styleUpdater","viewDescriptors","updater","state","maybeViewRef","isAnimatedProps","animations","newValues","oldValues","last","nonAnimatedNewValues","hasAnimations","hasNonAnimatedValues","global","__frameTimestamp","_getAnimationTimestamp","frame","isAnimationCancelled","isAnimationRunning","updates","propName","requestAnimationFrame","jestStyleUpdater","animatedStyle","adapters","length","checkSharedValueUsage","currentKey","element","Error","useAnimatedStyle","dependencies","viewsRef","animatedUpdaterData","inputs","values","__closure","_dependencies","__DEV__","adaptersArray","adaptersHash","areAnimationsActive","jestAnimatedStyle","__workletHash","push","initialStyle","initial","remoteState","shareableViewDescriptors","fun","updaterFn","adapter","mapperId","animatedStyleHandle"],"sources":["useAnimatedStyle.ts"],"sourcesContent":["'use strict';\nimport type { MutableRefObject } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport { makeShareable, startMapper, stopMapper } from '../core';\nimport updateProps, { updatePropsJestWrapper } from '../UpdateProps';\nimport { initialUpdaterRun } from '../animation';\nimport { useSharedValue } from './useSharedValue';\nimport {\n buildWorkletsHash,\n isAnimated,\n shallowEqual,\n validateAnimatedStyles,\n} from './utils';\nimport type {\n AnimatedStyleHandle,\n DefaultStyle,\n DependencyList,\n Descriptor,\n JestAnimatedStyleHandle,\n} from './commonTypes';\nimport type { ViewDescriptorsSet, ViewRefSet } from '../ViewDescriptorsSet';\nimport { makeViewDescriptorsSet, useViewRefSet } from '../ViewDescriptorsSet';\nimport { isJest, shouldBeUseWeb } from '../PlatformChecker';\nimport type {\n AnimationObject,\n Timestamp,\n NestedObjectValues,\n SharedValue,\n StyleProps,\n WorkletFunction,\n AnimatedPropsAdapterFunction,\n AnimatedPropsAdapterWorklet,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\nimport { isWorkletFunction } from '../commonTypes';\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\ninterface AnimatedState {\n last: AnimatedStyle<any>;\n animations: AnimatedStyle<any>;\n isAnimationRunning: boolean;\n isAnimationCancelled: boolean;\n}\n\ninterface AnimatedUpdaterData {\n initial: {\n value: AnimatedStyle<any>;\n updater: () => AnimatedStyle<any>;\n };\n remoteState: AnimatedState;\n viewDescriptors: ViewDescriptorsSet;\n}\n\nfunction prepareAnimation(\n frameTimestamp: number,\n animatedProp: AnimatedStyle<any>,\n lastAnimation: AnimatedStyle<any>,\n lastValue: AnimatedStyle<any>\n): void {\n 'worklet';\n if (Array.isArray(animatedProp)) {\n animatedProp.forEach((prop, index) => {\n prepareAnimation(\n frameTimestamp,\n prop,\n lastAnimation && lastAnimation[index],\n lastValue && lastValue[index]\n );\n });\n // return animatedProp;\n }\n if (typeof animatedProp === 'object' && animatedProp.onFrame) {\n const animation = animatedProp;\n\n let value = animation.current;\n if (lastValue !== undefined && lastValue !== null) {\n if (typeof lastValue === 'object') {\n if (lastValue.value !== undefined) {\n // previously it was a shared value\n value = lastValue.value;\n } else if (lastValue.onFrame !== undefined) {\n if (lastAnimation?.current !== undefined) {\n // it was an animation before, copy its state\n value = lastAnimation.current;\n } else if (lastValue?.current !== undefined) {\n // it was initialized\n value = lastValue.current;\n }\n }\n } else {\n // previously it was a plain value, just set it as starting point\n value = lastValue;\n }\n }\n\n animation.callStart = (timestamp: Timestamp) => {\n animation.onStart(animation, value, timestamp, lastAnimation);\n };\n animation.callStart(frameTimestamp);\n animation.callStart = null;\n } else if (typeof animatedProp === 'object') {\n // it is an object\n Object.keys(animatedProp).forEach((key) =>\n prepareAnimation(\n frameTimestamp,\n animatedProp[key],\n lastAnimation && lastAnimation[key],\n lastValue && lastValue[key]\n )\n );\n }\n}\n\nfunction runAnimations(\n animation: AnimatedStyle<any>,\n timestamp: Timestamp,\n key: number | string,\n result: AnimatedStyle<any>,\n animationsActive: SharedValue<boolean>\n): boolean {\n 'worklet';\n if (!animationsActive.value) {\n return true;\n }\n if (Array.isArray(animation)) {\n result[key] = [];\n let allFinished = true;\n animation.forEach((entry, index) => {\n if (\n !runAnimations(entry, timestamp, index, result[key], animationsActive)\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else if (typeof animation === 'object' && animation.onFrame) {\n let finished = true;\n if (!animation.finished) {\n if (animation.callStart) {\n animation.callStart(timestamp);\n animation.callStart = null;\n }\n finished = animation.onFrame(animation, timestamp);\n animation.timestamp = timestamp;\n if (finished) {\n animation.finished = true;\n animation.callback && animation.callback(true /* finished */);\n }\n }\n result[key] = animation.current;\n return finished;\n } else if (typeof animation === 'object') {\n result[key] = {};\n let allFinished = true;\n Object.keys(animation).forEach((k) => {\n if (\n !runAnimations(\n animation[k],\n timestamp,\n k,\n result[key],\n animationsActive\n )\n ) {\n allFinished = false;\n }\n });\n return allFinished;\n } else {\n result[key] = animation;\n return true;\n }\n}\n\nfunction styleUpdater(\n viewDescriptors: SharedValue<Descriptor[]>,\n updater: WorkletFunction<[], AnimatedStyle<any>> | (() => AnimatedStyle<any>),\n state: AnimatedState,\n maybeViewRef: ViewRefSet<any> | undefined,\n animationsActive: SharedValue<boolean>,\n isAnimatedProps = false\n): void {\n 'worklet';\n const animations = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n const nonAnimatedNewValues: StyleProps = {};\n\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n let hasNonAnimatedValues = false;\n for (const key in newValues) {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp =\n global.__frameTimestamp || global._getAnimationTimestamp();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n } else {\n hasNonAnimatedValues = true;\n nonAnimatedNewValues[key] = value;\n delete animations[key];\n }\n }\n\n if (hasAnimations) {\n const frame = (timestamp: Timestamp) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle<any> = {};\n let allFinished = true;\n for (const propName in animations) {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n }\n\n if (updates) {\n updateProps(viewDescriptors, updates, maybeViewRef);\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n };\n\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n\n if (hasNonAnimatedValues) {\n updateProps(viewDescriptors, nonAnimatedNewValues, maybeViewRef);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n\n if (!shallowEqual(oldValues, newValues)) {\n updateProps(viewDescriptors, newValues, maybeViewRef, isAnimatedProps);\n }\n }\n state.last = newValues;\n}\n\nfunction jestStyleUpdater(\n viewDescriptors: SharedValue<Descriptor[]>,\n updater: WorkletFunction<[], AnimatedStyle<any>> | (() => AnimatedStyle<any>),\n state: AnimatedState,\n maybeViewRef: ViewRefSet<any> | undefined,\n animationsActive: SharedValue<boolean>,\n animatedStyle: MutableRefObject<AnimatedStyle<any>>,\n adapters: AnimatedPropsAdapterFunction[]\n): void {\n 'worklet';\n const animations: AnimatedStyle<any> = state.animations ?? {};\n const newValues = updater() ?? {};\n const oldValues = state.last;\n\n // extract animated props\n let hasAnimations = false;\n let frameTimestamp: number | undefined;\n Object.keys(animations).forEach((key) => {\n const value = newValues[key];\n if (!isAnimated(value)) {\n delete animations[key];\n }\n });\n Object.keys(newValues).forEach((key) => {\n const value = newValues[key];\n if (isAnimated(value)) {\n frameTimestamp =\n global.__frameTimestamp || global._getAnimationTimestamp();\n prepareAnimation(frameTimestamp, value, animations[key], oldValues[key]);\n animations[key] = value;\n hasAnimations = true;\n }\n });\n\n function frame(timestamp: Timestamp) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { animations, last, isAnimationCancelled } = state;\n if (isAnimationCancelled) {\n state.isAnimationRunning = false;\n return;\n }\n\n const updates: AnimatedStyle<any> = {};\n let allFinished = true;\n Object.keys(animations).forEach((propName) => {\n const finished = runAnimations(\n animations[propName],\n timestamp,\n propName,\n updates,\n animationsActive\n );\n if (finished) {\n last[propName] = updates[propName];\n delete animations[propName];\n } else {\n allFinished = false;\n }\n });\n\n if (Object.keys(updates).length) {\n updatePropsJestWrapper(\n viewDescriptors,\n updates,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n\n if (!allFinished) {\n requestAnimationFrame(frame);\n } else {\n state.isAnimationRunning = false;\n }\n }\n\n if (hasAnimations) {\n state.animations = animations;\n if (!state.isAnimationRunning) {\n state.isAnimationCancelled = false;\n state.isAnimationRunning = true;\n frame(frameTimestamp!);\n }\n } else {\n state.isAnimationCancelled = true;\n state.animations = [];\n }\n\n // calculate diff\n state.last = newValues;\n\n if (!shallowEqual(oldValues, newValues)) {\n updatePropsJestWrapper(\n viewDescriptors,\n newValues,\n maybeViewRef,\n animatedStyle,\n adapters\n );\n }\n}\n\n// check for invalid usage of shared values in returned object\nfunction checkSharedValueUsage(\n prop: NestedObjectValues<AnimationObject>,\n currentKey?: string\n): void {\n if (Array.isArray(prop)) {\n // if it's an array (i.ex. transform) validate all its elements\n for (const element of prop) {\n checkSharedValueUsage(element, currentKey);\n }\n } else if (\n typeof prop === 'object' &&\n prop !== null &&\n prop.value === undefined\n ) {\n // if it's a nested object, run validation for all its props\n for (const key of Object.keys(prop)) {\n checkSharedValueUsage(prop[key], key);\n }\n } else if (\n currentKey !== undefined &&\n typeof prop === 'object' &&\n prop !== null &&\n prop.value !== undefined\n ) {\n // if shared value is passed insted of its value, throw an error\n throw new Error(\n `[Reanimated] Invalid value passed to \\`${currentKey}\\`, maybe you forgot to use \\`.value\\`?`\n );\n }\n}\n\n/**\n * Lets you create a styles object, similar to StyleSheet styles, which can be animated using shared values.\n *\n * @param updater - A function returning an object with style properties you want to animate.\n * @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.\n * @returns An animated style object which has to be passed to the `style` property of an Animated component you want to animate.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedStyle\n */\n// You cannot pass Shared Values to `useAnimatedStyle` directly.\n// @ts-expect-error This overload is required by our API.\nexport function useAnimatedStyle<Style extends DefaultStyle>(\n updater: () => Style,\n dependencies?: DependencyList | null\n): Style;\n\nexport function useAnimatedStyle<Style extends DefaultStyle>(\n updater:\n | WorkletFunction<[], Style>\n | ((() => Style) & Record<string, unknown>),\n dependencies?: DependencyList | null,\n adapters?: AnimatedPropsAdapterWorklet | AnimatedPropsAdapterWorklet[] | null,\n isAnimatedProps = false\n): AnimatedStyleHandle<Style> | JestAnimatedStyleHandle<Style> {\n const viewsRef: ViewRefSet<unknown> | undefined = useViewRefSet();\n const animatedUpdaterData = useRef<AnimatedUpdaterData>();\n let inputs = Object.values(updater.__closure ?? {});\n if (SHOULD_BE_USE_WEB) {\n if (!inputs.length && dependencies?.length) {\n // let web work without a Babel plugin\n inputs = dependencies;\n }\n if (\n __DEV__ &&\n !inputs.length &&\n !dependencies &&\n !isWorkletFunction(updater)\n ) {\n throw new Error(\n `[Reanimated] \\`useAnimatedStyle\\` was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel plugin.\nFor more, see the docs: \\`https://docs.swmansion.com/react-native-reanimated/docs/guides/web-support#web-without-the-babel-plugin\\`.`\n );\n }\n }\n const adaptersArray = adapters\n ? Array.isArray(adapters)\n ? adapters\n : [adapters]\n : [];\n const adaptersHash = adapters ? buildWorkletsHash(adaptersArray) : null;\n const areAnimationsActive = useSharedValue<boolean>(true);\n const jestAnimatedStyle = useRef<Style>({} as Style);\n\n // build dependencies\n if (!dependencies) {\n dependencies = [...inputs, updater.__workletHash];\n } else {\n dependencies.push(updater.__workletHash);\n }\n adaptersHash && dependencies.push(adaptersHash);\n\n if (!animatedUpdaterData.current) {\n const initialStyle = initialUpdaterRun(updater);\n if (__DEV__) {\n validateAnimatedStyles(initialStyle);\n }\n animatedUpdaterData.current = {\n initial: {\n value: initialStyle,\n updater,\n },\n remoteState: makeShareable({\n last: initialStyle,\n animations: {},\n isAnimationCancelled: false,\n isAnimationRunning: false,\n }),\n viewDescriptors: makeViewDescriptorsSet(),\n };\n }\n\n const { initial, remoteState, viewDescriptors } = animatedUpdaterData.current;\n const shareableViewDescriptors = viewDescriptors.shareableViewDescriptors;\n\n dependencies.push(shareableViewDescriptors);\n\n useEffect(() => {\n let fun;\n let updaterFn = updater;\n if (adapters) {\n updaterFn = (() => {\n 'worklet';\n const newValues = updater();\n adaptersArray.forEach((adapter) => {\n adapter(newValues as Record<string, unknown>);\n });\n return newValues;\n }) as WorkletFunction<[], Style>;\n }\n\n if (isJest()) {\n fun = () => {\n 'worklet';\n jestStyleUpdater(\n shareableViewDescriptors,\n updater,\n remoteState,\n viewsRef,\n areAnimationsActive,\n jestAnimatedStyle,\n adaptersArray\n );\n };\n } else {\n fun = () => {\n 'worklet';\n styleUpdater(\n shareableViewDescriptors,\n updaterFn,\n remoteState,\n viewsRef,\n areAnimationsActive,\n isAnimatedProps\n );\n };\n }\n const mapperId = startMapper(fun, inputs);\n return () => {\n stopMapper(mapperId);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n\n useEffect(() => {\n areAnimationsActive.value = true;\n return () => {\n areAnimationsActive.value = false;\n };\n }, [areAnimationsActive]);\n\n checkSharedValueUsage(initial.value);\n\n const animatedStyleHandle = useRef<\n AnimatedStyleHandle<Style> | JestAnimatedStyleHandle<Style> | null\n >(null);\n\n if (!animatedStyleHandle.current) {\n animatedStyleHandle.current = isJest()\n ? { viewDescriptors, initial, viewsRef, jestAnimatedStyle }\n : { initial, viewsRef, viewDescriptors };\n }\n\n return animatedStyleHandle.current;\n}\n"],"mappings":"AAAA,YAAY;;AAEZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,SAAS;AAChE,OAAOC,WAAW,IAAIC,sBAAsB,QAAQ,gBAAgB;AACpE,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SACEC,iBAAiB,EACjBC,UAAU,EACVC,YAAY,EACZC,sBAAsB,QACjB,SAAS;AAShB,SAASC,sBAAsB,EAAEC,aAAa,QAAQ,uBAAuB;AAC7E,SAASC,MAAM,EAAEC,cAAc,QAAQ,oBAAoB;AAY3D,SAASC,iBAAiB,QAAQ,gBAAgB;AAElD,MAAMC,iBAAiB,GAAGF,cAAc,CAAC,CAAC;AAkB1C,SAASG,gBAAgBA,CACvBC,cAAsB,EACtBC,YAAgC,EAChCC,aAAiC,EACjCC,SAA6B,EACvB;EACN,SAAS;;EACT,IAAIC,KAAK,CAACC,OAAO,CAACJ,YAAY,CAAC,EAAE;IAC/BA,YAAY,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O;MAAEd,QAAQ;MAAEU;IAAkB,CAAC,GACzD;MAAEI,OAAO;MAAEd,QAAQ;MAAE/B;IAAgB,CAAC;EAC5C;EAEA,OAAOoD,mBAAmB,CAACrE,OAAO;AACpC","ignoreList":[]}
|
|
@@ -12,7 +12,9 @@ import { shouldBeUseWeb } from '../PlatformChecker';
|
|
|
12
12
|
* @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.
|
|
13
13
|
* @returns A new readonly shared value based on a value returned from the updater function
|
|
14
14
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/core/useDerivedValue
|
|
15
|
-
*/
|
|
15
|
+
*/
|
|
16
|
+
// @ts-expect-error This overload is required by our API.
|
|
17
|
+
|
|
16
18
|
export function useDerivedValue(updater, dependencies) {
|
|
17
19
|
const initRef = useRef(null);
|
|
18
20
|
let inputs = Object.values(updater.__closure ?? {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","initialUpdaterRun","makeMutable","startMapper","stopMapper","shouldBeUseWeb","useDerivedValue","updater","dependencies","initRef","inputs","Object","values","__closure","_dependencies","length","undefined","__workletHash","push","current","sharedValue","fun","value","mapperId"],"sources":["useDerivedValue.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef } from 'react';\nimport { initialUpdaterRun } from '../animation';\nimport type { SharedValue, WorkletFunction } from '../commonTypes';\nimport { makeMutable, startMapper, stopMapper } from '../core';\nimport type { DependencyList } from './commonTypes';\nimport { shouldBeUseWeb } from '../PlatformChecker';\n\nexport type DerivedValue<Value> = Readonly<SharedValue<Value>>;\n\n/**\n * Lets you create new shared values based on existing ones while keeping them reactive.\n *\n * @param updater - A function called whenever at least one of the shared values or state used in the function body changes.\n * @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.\n * @returns A new readonly shared value based on a value returned from the updater function\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useDerivedValue\n */\n// @ts-expect-error This overload is required by our API.\nexport function useDerivedValue<Value>(\n updater: () => Value,\n dependencies?: DependencyList\n): DerivedValue<Value>;\n\nexport function useDerivedValue<Value>(\n updater: WorkletFunction<[], Value>,\n dependencies?: DependencyList\n): DerivedValue<Value> {\n const initRef = useRef<SharedValue<Value> | null>(null);\n let inputs = Object.values(updater.__closure ?? {});\n if (shouldBeUseWeb()) {\n if (!inputs.length && dependencies?.length) {\n // let web work without a Babel/SWC plugin\n inputs = dependencies;\n }\n }\n\n // build dependencies\n if (dependencies === undefined) {\n dependencies = [...inputs, updater.__workletHash];\n } else {\n dependencies.push(updater.__workletHash);\n }\n\n if (initRef.current === null) {\n initRef.current = makeMutable(initialUpdaterRun(updater));\n }\n\n const sharedValue: SharedValue<Value> = initRef.current;\n\n useEffect(() => {\n const fun = () => {\n 'worklet';\n sharedValue.value = updater();\n };\n const mapperId = startMapper(fun, inputs, [sharedValue]);\n return () => {\n stopMapper(mapperId);\n };\n }, dependencies);\n\n useEffect(() => {\n return () => {\n initRef.current = null;\n };\n }, []);\n\n return sharedValue;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,iBAAiB,QAAQ,cAAc;AAEhD,SAASC,WAAW,EAAEC,WAAW,EAAEC,UAAU,QAAQ,SAAS;AAE9D,SAASC,cAAc,QAAQ,oBAAoB;;AAInD;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","initialUpdaterRun","makeMutable","startMapper","stopMapper","shouldBeUseWeb","useDerivedValue","updater","dependencies","initRef","inputs","Object","values","__closure","_dependencies","length","undefined","__workletHash","push","current","sharedValue","fun","value","mapperId"],"sources":["useDerivedValue.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef } from 'react';\nimport { initialUpdaterRun } from '../animation';\nimport type { SharedValue, WorkletFunction } from '../commonTypes';\nimport { makeMutable, startMapper, stopMapper } from '../core';\nimport type { DependencyList } from './commonTypes';\nimport { shouldBeUseWeb } from '../PlatformChecker';\n\nexport type DerivedValue<Value> = Readonly<SharedValue<Value>>;\n\n/**\n * Lets you create new shared values based on existing ones while keeping them reactive.\n *\n * @param updater - A function called whenever at least one of the shared values or state used in the function body changes.\n * @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.\n * @returns A new readonly shared value based on a value returned from the updater function\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useDerivedValue\n */\n// @ts-expect-error This overload is required by our API.\nexport function useDerivedValue<Value>(\n updater: () => Value,\n dependencies?: DependencyList\n): DerivedValue<Value>;\n\nexport function useDerivedValue<Value>(\n updater: WorkletFunction<[], Value>,\n dependencies?: DependencyList\n): DerivedValue<Value> {\n const initRef = useRef<SharedValue<Value> | null>(null);\n let inputs = Object.values(updater.__closure ?? {});\n if (shouldBeUseWeb()) {\n if (!inputs.length && dependencies?.length) {\n // let web work without a Babel/SWC plugin\n inputs = dependencies;\n }\n }\n\n // build dependencies\n if (dependencies === undefined) {\n dependencies = [...inputs, updater.__workletHash];\n } else {\n dependencies.push(updater.__workletHash);\n }\n\n if (initRef.current === null) {\n initRef.current = makeMutable(initialUpdaterRun(updater));\n }\n\n const sharedValue: SharedValue<Value> = initRef.current;\n\n useEffect(() => {\n const fun = () => {\n 'worklet';\n sharedValue.value = updater();\n };\n const mapperId = startMapper(fun, inputs, [sharedValue]);\n return () => {\n stopMapper(mapperId);\n };\n }, dependencies);\n\n useEffect(() => {\n return () => {\n initRef.current = null;\n };\n }, []);\n\n return sharedValue;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,iBAAiB,QAAQ,cAAc;AAEhD,SAASC,WAAW,EAAEC,WAAW,EAAEC,UAAU,QAAQ,SAAS;AAE9D,SAASC,cAAc,QAAQ,oBAAoB;;AAInD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAO,SAASC,eAAeA,CAC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pB","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import { useRef } from 'react';
|
|
4
|
-
import WorkletEventHandler from '../WorkletEventHandler';
|
|
4
|
+
import { WorkletEventHandler } from '../WorkletEventHandler';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Worklet to provide as an argument to `useEvent` hook.
|
|
@@ -21,9 +21,8 @@ import WorkletEventHandler from '../WorkletEventHandler';
|
|
|
21
21
|
// an AnimatedComponent are event handlers and we don't want to force the user to define it.
|
|
22
22
|
// Therefore we disguise `useEvent` return type as a simple function and we handle
|
|
23
23
|
// it being a React Ref in `createAnimatedComponent`.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let rebuild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
24
|
+
|
|
25
|
+
export function useEvent(handler, eventNames = [], rebuild = false) {
|
|
27
26
|
const initRef = useRef(null);
|
|
28
27
|
if (initRef.current === null) {
|
|
29
28
|
const workletEventHandler = new WorkletEventHandler(handler, eventNames);
|
|
@@ -32,7 +31,7 @@ export function useEvent(handler) {
|
|
|
32
31
|
};
|
|
33
32
|
} else if (rebuild) {
|
|
34
33
|
const workletEventHandler = initRef.current.workletEventHandler;
|
|
35
|
-
workletEventHandler.
|
|
34
|
+
workletEventHandler.updateEventHandler(handler, eventNames);
|
|
36
35
|
initRef.current = {
|
|
37
36
|
workletEventHandler
|
|
38
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","WorkletEventHandler","useEvent","handler","eventNames","
|
|
1
|
+
{"version":3,"names":["useRef","WorkletEventHandler","useEvent","handler","eventNames","rebuild","initRef","current","workletEventHandler","updateEventHandler"],"sources":["useEvent.ts"],"sourcesContent":["'use strict';\nimport { useRef } from 'react';\nimport { WorkletEventHandler } from '../WorkletEventHandler';\nimport type { IWorkletEventHandler, ReanimatedEvent } from './commonTypes';\n\n/**\n * Worklet to provide as an argument to `useEvent` hook.\n */\nexport type EventHandler<\n Event extends object,\n Context extends Record<string, unknown> = never\n> = (event: ReanimatedEvent<Event>, context?: Context) => void;\n\nexport type EventHandlerProcessed<\n Event extends object,\n Context extends Record<string, unknown> = never\n> = (event: Event, context?: Context) => void;\n\nexport type EventHandlerInternal<Event extends object> = {\n workletEventHandler: IWorkletEventHandler<Event>;\n};\n\n/**\n * Lets you run a function whenever a specified native event occurs.\n *\n * @param handler - A function that receives an event object with event data - {@link EventHandler}.\n * @param eventNames - An array of event names the `handler` callback will react to.\n * @param rebuild - Whether the event handler should be rebuilt. Defaults to `false`.\n * @returns A function that will be called when the event occurs - {@link EventHandlerProcessed}.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent\n */\n// @ts-expect-error This overload is required by our API.\n// We don't know which properites of a component that is made into\n// an AnimatedComponent are event handlers and we don't want to force the user to define it.\n// Therefore we disguise `useEvent` return type as a simple function and we handle\n// it being a React Ref in `createAnimatedComponent`.\nexport function useEvent<\n Event extends object,\n Context extends Record<string, unknown> = never\n>(\n handler: EventHandler<Event, Context>,\n eventNames?: string[],\n rebuild?: boolean\n): EventHandlerProcessed<Event, Context>;\n\nexport function useEvent<Event extends object, Context = never>(\n handler: (event: ReanimatedEvent<Event>, context?: Context) => void,\n eventNames: string[] = [],\n rebuild = false\n): EventHandlerInternal<Event> {\n const initRef = useRef<EventHandlerInternal<Event>>(null!);\n if (initRef.current === null) {\n const workletEventHandler = new WorkletEventHandler<Event>(\n handler,\n eventNames\n );\n initRef.current = { workletEventHandler };\n } else if (rebuild) {\n const workletEventHandler = initRef.current.workletEventHandler;\n workletEventHandler.updateEventHandler(handler, eventNames);\n initRef.current = { workletEventHandler };\n }\n\n return initRef.current;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,wBAAwB;;AAG5D;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,SAASC,QAAQA,CACtBC,OAAmE,EACnEC,UAAoB,GAAG,EAAE,EACzBC,OAAO,GAAG,KAAK,EACc;EAC7B,MAAMC,OAAO,GAAGN,MAAM,CAA8B,IAAK,CAAC;EAC1D,IAAIM,OAAO,CAACC,OAAO,KAAK,IAAI,EAAE;IAC5B,MAAMC,mBAAmB,GAAG,IAAIP,mBAAmB,CACjDE,OAAO,EACPC,UACF,CAAC;IACDE,OAAO,CAACC,OAAO,GAAG;MAAEC;IAAoB,CAAC;EAC3C,CAAC,MAAM,IAAIH,OAAO,EAAE;IAClB,MAAMG,mBAAmB,GAAGF,OAAO,CAACC,OAAO,CAACC,mBAAmB;IAC/DA,mBAAmB,CAACC,kBAAkB,CAACN,OAAO,EAAEC,UAAU,CAAC;IAC3DE,OAAO,CAACC,OAAO,GAAG;MAAEC;IAAoB,CAAC;EAC3C;EAEA,OAAOF,OAAO,CAACC,OAAO;AACxB","ignoreList":[]}
|
|
@@ -20,8 +20,7 @@ const frameCallbackRegistry = new FrameCallbackRegistryJS();
|
|
|
20
20
|
* @returns A frame callback object - {@link FrameCallback}.
|
|
21
21
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useFrameCallback
|
|
22
22
|
*/
|
|
23
|
-
export function useFrameCallback(callback) {
|
|
24
|
-
let autostart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
23
|
+
export function useFrameCallback(callback, autostart = true) {
|
|
25
24
|
const ref = useRef({
|
|
26
25
|
setActive: isActive => {
|
|
27
26
|
frameCallbackRegistry.manageStateFrameCallback(ref.current.callbackId, isActive);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","FrameCallbackRegistryJS","frameCallbackRegistry","useFrameCallback","callback","autostart","
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","FrameCallbackRegistryJS","frameCallbackRegistry","useFrameCallback","callback","autostart","ref","setActive","isActive","manageStateFrameCallback","current","callbackId","registerFrameCallback","unregisterFrameCallback"],"sources":["useFrameCallback.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef } from 'react';\nimport FrameCallbackRegistryJS from '../frameCallback/FrameCallbackRegistryJS';\nimport type { FrameInfo } from '../frameCallback/FrameCallbackRegistryUI';\n\n/**\n * @param setActive - A function that lets you start the frame callback or stop it from running.\n * @param isActive - A boolean indicating whether a callback is running.\n * @param callbackId - A number indicating a unique identifier of the frame callback.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useFrameCallback#returns\n */\nexport type FrameCallback = {\n setActive: (isActive: boolean) => void;\n isActive: boolean;\n callbackId: number;\n};\nconst frameCallbackRegistry = new FrameCallbackRegistryJS();\n\n/**\n * Lets you run a function on every frame update.\n *\n * @param callback - A function executed on every frame update.\n * @param autostart - Whether the callback should start automatically. Defaults to `true`.\n * @returns A frame callback object - {@link FrameCallback}.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useFrameCallback\n */\nexport function useFrameCallback(\n callback: (frameInfo: FrameInfo) => void,\n autostart = true\n): FrameCallback {\n const ref = useRef<FrameCallback>({\n setActive: (isActive: boolean) => {\n frameCallbackRegistry.manageStateFrameCallback(\n ref.current.callbackId,\n isActive\n );\n ref.current.isActive = isActive;\n },\n isActive: autostart,\n callbackId: -1,\n });\n\n useEffect(() => {\n ref.current.callbackId =\n frameCallbackRegistry.registerFrameCallback(callback);\n ref.current.setActive(ref.current.isActive);\n\n return () => {\n frameCallbackRegistry.unregisterFrameCallback(ref.current.callbackId);\n ref.current.callbackId = -1;\n };\n }, [callback, autostart]);\n\n return ref.current;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,OAAOC,uBAAuB,MAAM,0CAA0C;;AAG9E;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMC,qBAAqB,GAAG,IAAID,uBAAuB,CAAC,CAAC;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,gBAAgBA,CAC9BC,QAAwC,EACxCC,SAAS,GAAG,IAAI,EACD;EACf,MAAMC,GAAG,GAAGN,MAAM,CAAgB;IAChCO,SAAS,EAAGC,QAAiB,IAAK;MAChCN,qBAAqB,CAACO,wBAAwB,CAC5CH,GAAG,CAACI,OAAO,CAACC,UAAU,EACtBH,QACF,CAAC;MACDF,GAAG,CAACI,OAAO,CAACF,QAAQ,GAAGA,QAAQ;IACjC,CAAC;IACDA,QAAQ,EAAEH,SAAS;IACnBM,UAAU,EAAE,CAAC;EACf,CAAC,CAAC;EAEFZ,SAAS,CAAC,MAAM;IACdO,GAAG,CAACI,OAAO,CAACC,UAAU,GACpBT,qBAAqB,CAACU,qBAAqB,CAACR,QAAQ,CAAC;IACvDE,GAAG,CAACI,OAAO,CAACH,SAAS,CAACD,GAAG,CAACI,OAAO,CAACF,QAAQ,CAAC;IAE3C,OAAO,MAAM;MACXN,qBAAqB,CAACW,uBAAuB,CAACP,GAAG,CAACI,OAAO,CAACC,UAAU,CAAC;MACrEL,GAAG,CAACI,OAAO,CAACC,UAAU,GAAG,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACP,QAAQ,EAAEC,SAAS,CAAC,CAAC;EAEzB,OAAOC,GAAG,CAACI,OAAO;AACpB","ignoreList":[]}
|
|
@@ -12,7 +12,9 @@ import { makeShareable } from '../shareables';
|
|
|
12
12
|
* @param dependencies - An optional array of dependencies.
|
|
13
13
|
* @returns An object containing a boolean indicating whether the dependencies have changed, and a boolean indicating whether the code is running on the web.
|
|
14
14
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useHandler
|
|
15
|
-
*/
|
|
15
|
+
*/
|
|
16
|
+
// @ts-expect-error This overload is required by our API.
|
|
17
|
+
|
|
16
18
|
export function useHandler(handlers, dependencies) {
|
|
17
19
|
const initRef = useRef(null);
|
|
18
20
|
if (initRef.current === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","isWeb","isJest","areDependenciesEqual","buildDependencies","makeShareable","useHandler","handlers","dependencies","initRef","current","context","savedDependencies","doDependenciesDiffer","useWeb"],"sources":["useHandler.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef } from 'react';\nimport type { WorkletFunction } from '../commonTypes';\nimport { isWeb, isJest } from '../PlatformChecker';\nimport type { DependencyList, ReanimatedEvent } from './commonTypes';\nimport { areDependenciesEqual, buildDependencies } from './utils';\nimport { makeShareable } from '../shareables';\n\ninterface GeneralHandler<\n Event extends object,\n Context extends Record<string, unknown>\n> {\n (event: ReanimatedEvent<Event>, context: Context): void;\n}\n\ntype GeneralWorkletHandler<\n Event extends object,\n Context extends Record<string, unknown>\n> = WorkletFunction<[event: ReanimatedEvent<Event>, context: Context]>;\n\ntype GeneralHandlers<\n Event extends object,\n Context extends Record<string, unknown>\n> = Record<string, GeneralHandler<Event, Context> | undefined>;\n\ntype GeneralWorkletHandlers<\n Event extends object,\n Context extends Record<string, unknown>\n> = Record<string, GeneralWorkletHandler<Event, Context> | undefined>;\n\ninterface ContextWithDependencies<Context extends Record<string, unknown>> {\n context: Context;\n savedDependencies: DependencyList;\n}\n\nexport interface UseHandlerContext<Context extends Record<string, unknown>> {\n context: Context;\n doDependenciesDiffer: boolean;\n useWeb: boolean;\n}\n\n/**\n * Lets you find out whether the event handler dependencies have changed.\n *\n * @param handlers - An object of event handlers.\n * @param dependencies - An optional array of dependencies.\n * @returns An object containing a boolean indicating whether the dependencies have changed, and a boolean indicating whether the code is running on the web.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useHandler\n */\n// @ts-expect-error This overload is required by our API.\nexport function useHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(\n handlers: GeneralHandlers<Event, Context>,\n dependencies?: DependencyList\n): UseHandlerContext<Context>;\n\nexport function useHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(\n handlers: GeneralWorkletHandlers<Event, Context>,\n dependencies?: DependencyList\n): UseHandlerContext<Context> {\n const initRef = useRef<ContextWithDependencies<Context> | null>(null);\n if (initRef.current === null) {\n const context = makeShareable({} as Context);\n initRef.current = {\n context,\n savedDependencies: [],\n };\n }\n\n useEffect(() => {\n return () => {\n initRef.current = null;\n };\n }, []);\n\n const { context, savedDependencies } = initRef.current;\n\n dependencies = buildDependencies(\n dependencies,\n handlers as Record<string, WorkletFunction | undefined>\n );\n\n const doDependenciesDiffer = !areDependenciesEqual(\n dependencies,\n savedDependencies\n );\n initRef.current.savedDependencies = dependencies;\n const useWeb = isWeb() || isJest();\n\n return { context, doDependenciesDiffer, useWeb };\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,KAAK,EAAEC,MAAM,QAAQ,oBAAoB;AAElD,SAASC,oBAAoB,EAAEC,iBAAiB,QAAQ,SAAS;AACjE,SAASC,aAAa,QAAQ,eAAe;;AAmC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","isWeb","isJest","areDependenciesEqual","buildDependencies","makeShareable","useHandler","handlers","dependencies","initRef","current","context","savedDependencies","doDependenciesDiffer","useWeb"],"sources":["useHandler.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef } from 'react';\nimport type { WorkletFunction } from '../commonTypes';\nimport { isWeb, isJest } from '../PlatformChecker';\nimport type { DependencyList, ReanimatedEvent } from './commonTypes';\nimport { areDependenciesEqual, buildDependencies } from './utils';\nimport { makeShareable } from '../shareables';\n\ninterface GeneralHandler<\n Event extends object,\n Context extends Record<string, unknown>\n> {\n (event: ReanimatedEvent<Event>, context: Context): void;\n}\n\ntype GeneralWorkletHandler<\n Event extends object,\n Context extends Record<string, unknown>\n> = WorkletFunction<[event: ReanimatedEvent<Event>, context: Context]>;\n\ntype GeneralHandlers<\n Event extends object,\n Context extends Record<string, unknown>\n> = Record<string, GeneralHandler<Event, Context> | undefined>;\n\ntype GeneralWorkletHandlers<\n Event extends object,\n Context extends Record<string, unknown>\n> = Record<string, GeneralWorkletHandler<Event, Context> | undefined>;\n\ninterface ContextWithDependencies<Context extends Record<string, unknown>> {\n context: Context;\n savedDependencies: DependencyList;\n}\n\nexport interface UseHandlerContext<Context extends Record<string, unknown>> {\n context: Context;\n doDependenciesDiffer: boolean;\n useWeb: boolean;\n}\n\n/**\n * Lets you find out whether the event handler dependencies have changed.\n *\n * @param handlers - An object of event handlers.\n * @param dependencies - An optional array of dependencies.\n * @returns An object containing a boolean indicating whether the dependencies have changed, and a boolean indicating whether the code is running on the web.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/useHandler\n */\n// @ts-expect-error This overload is required by our API.\nexport function useHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(\n handlers: GeneralHandlers<Event, Context>,\n dependencies?: DependencyList\n): UseHandlerContext<Context>;\n\nexport function useHandler<\n Event extends object,\n Context extends Record<string, unknown>\n>(\n handlers: GeneralWorkletHandlers<Event, Context>,\n dependencies?: DependencyList\n): UseHandlerContext<Context> {\n const initRef = useRef<ContextWithDependencies<Context> | null>(null);\n if (initRef.current === null) {\n const context = makeShareable({} as Context);\n initRef.current = {\n context,\n savedDependencies: [],\n };\n }\n\n useEffect(() => {\n return () => {\n initRef.current = null;\n };\n }, []);\n\n const { context, savedDependencies } = initRef.current;\n\n dependencies = buildDependencies(\n dependencies,\n handlers as Record<string, WorkletFunction | undefined>\n );\n\n const doDependenciesDiffer = !areDependenciesEqual(\n dependencies,\n savedDependencies\n );\n initRef.current.savedDependencies = dependencies;\n const useWeb = isWeb() || isJest();\n\n return { context, doDependenciesDiffer, useWeb };\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,KAAK,EAAEC,MAAM,QAAQ,oBAAoB;AAElD,SAASC,oBAAoB,EAAEC,iBAAiB,QAAQ,SAAS;AACjE,SAASC,aAAa,QAAQ,eAAe;;AAmC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASC,UAAUA,CAIxBC,QAAgD,EAChDC,YAA6B,EACD;EAC5B,MAAMC,OAAO,GAAGT,MAAM,CAA0C,IAAI,CAAC;EACrE,IAAIS,OAAO,CAACC,OAAO,KAAK,IAAI,EAAE;IAC5B,MAAMC,OAAO,GAAGN,aAAa,CAAC,CAAC,CAAY,CAAC;IAC5CI,OAAO,CAACC,OAAO,GAAG;MAChBC,OAAO;MACPC,iBAAiB,EAAE;IACrB,CAAC;EACH;EAEAb,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXU,OAAO,CAACC,OAAO,GAAG,IAAI;IACxB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,MAAM;IAAEC,OAAO;IAAEC;EAAkB,CAAC,GAAGH,OAAO,CAACC,OAAO;EAEtDF,YAAY,GAAGJ,iBAAiB,CAC9BI,YAAY,EACZD,QACF,CAAC;EAED,MAAMM,oBAAoB,GAAG,CAACV,oBAAoB,CAChDK,YAAY,EACZI,iBACF,CAAC;EACDH,OAAO,CAACC,OAAO,CAACE,iBAAiB,GAAGJ,YAAY;EAChD,MAAMM,MAAM,GAAGb,KAAK,CAAC,CAAC,IAAIC,MAAM,CAAC,CAAC;EAElC,OAAO;IAAES,OAAO;IAAEE,oBAAoB;IAAEC;EAAO,CAAC;AAClD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isReducedMotion","IS_REDUCED_MOTION","useReducedMotion"],"sources":["useReducedMotion.ts"],"sourcesContent":["'use strict';\nimport { isReducedMotion } from '../PlatformChecker';\n\nconst IS_REDUCED_MOTION = isReducedMotion();\n\n/**\n * Lets you query the reduced motion system setting.\n *\n * Changing the reduced motion system setting doesn't cause your components to rerender.\n *\n * @returns A boolean indicating whether the reduced motion setting was enabled when the app started.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/device/useReducedMotion\n */\nexport function useReducedMotion() {\n return IS_REDUCED_MOTION;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,MAAMC,iBAAiB,GAAGD,eAAe,
|
|
1
|
+
{"version":3,"names":["isReducedMotion","IS_REDUCED_MOTION","useReducedMotion"],"sources":["useReducedMotion.ts"],"sourcesContent":["'use strict';\nimport { isReducedMotion } from '../PlatformChecker';\n\nconst IS_REDUCED_MOTION = isReducedMotion();\n\n/**\n * Lets you query the reduced motion system setting.\n *\n * Changing the reduced motion system setting doesn't cause your components to rerender.\n *\n * @returns A boolean indicating whether the reduced motion setting was enabled when the app started.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/device/useReducedMotion\n */\nexport function useReducedMotion() {\n return IS_REDUCED_MOTION;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,MAAMC,iBAAiB,GAAGD,eAAe,CAAC,CAAC;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,gBAAgBA,CAAA,EAAG;EACjC,OAAOD,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { useEffect, useRef } from 'react';
|
|
4
|
-
import { findNodeHandle } from 'react-native';
|
|
3
|
+
import { useEffect, useRef, useCallback } from 'react';
|
|
5
4
|
import { useEvent } from './useEvent';
|
|
6
5
|
import { useSharedValue } from './useSharedValue';
|
|
7
6
|
import { isWeb } from '../PlatformChecker';
|
|
8
7
|
const IS_WEB = isWeb();
|
|
9
|
-
const scrollEventNames = ['onScroll', 'onScrollBeginDrag', 'onScrollEndDrag', 'onMomentumScrollBegin', 'onMomentumScrollEnd'];
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* Lets you synchronously get the current offset of a `ScrollView`.
|
|
@@ -15,32 +13,78 @@ const scrollEventNames = ['onScroll', 'onScrollBeginDrag', 'onScrollEndDrag', 'o
|
|
|
15
13
|
* @returns A shared value which holds the current offset of the `ScrollView`.
|
|
16
14
|
* @see https://docs.swmansion.com/react-native-reanimated/docs/scroll/useScrollViewOffset
|
|
17
15
|
*/
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
export const useScrollViewOffset = IS_WEB ? useScrollViewOffsetWeb : useScrollViewOffsetNative;
|
|
17
|
+
function useScrollViewOffsetWeb(animatedRef, providedOffset) {
|
|
18
|
+
const internalOffset = useSharedValue(0);
|
|
19
|
+
const offset = useRef(providedOffset ?? internalOffset).current;
|
|
20
|
+
const scrollRef = useRef(null);
|
|
21
|
+
const eventHandler = useCallback(() => {
|
|
22
|
+
'worklet';
|
|
23
|
+
|
|
24
|
+
const element = getWebScrollableElement(animatedRef.current);
|
|
25
|
+
// scrollLeft is the X axis scrolled offset, works properly also with RTL layout
|
|
26
|
+
offset.value = element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;
|
|
27
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
+
}, [animatedRef, animatedRef.current]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
// We need to make sure that listener for old animatedRef value is removed
|
|
31
|
+
if (scrollRef.current !== null) {
|
|
32
|
+
getWebScrollableElement(scrollRef.current).removeEventListener('scroll', eventHandler);
|
|
33
|
+
}
|
|
34
|
+
scrollRef.current = animatedRef.current;
|
|
35
|
+
const element = getWebScrollableElement(animatedRef.current);
|
|
36
|
+
element.addEventListener('scroll', eventHandler);
|
|
37
|
+
return () => {
|
|
38
|
+
element.removeEventListener('scroll', eventHandler);
|
|
39
|
+
};
|
|
40
|
+
// React here has a problem with `animatedRef.current` since a Ref .current
|
|
41
|
+
// field shouldn't be used as a dependency. However, in this case we have
|
|
42
|
+
// to do it this way.
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
}, [animatedRef, animatedRef.current, eventHandler]);
|
|
45
|
+
return offset;
|
|
46
|
+
}
|
|
47
|
+
function useScrollViewOffsetNative(animatedRef, providedOffset) {
|
|
48
|
+
const internalOffset = useSharedValue(0);
|
|
49
|
+
const offset = useRef(providedOffset ?? internalOffset).current;
|
|
50
|
+
const scrollRef = useRef(null);
|
|
51
|
+
const scrollRefTag = useRef(null);
|
|
22
52
|
const eventHandler = useEvent(event => {
|
|
23
53
|
'worklet';
|
|
24
54
|
|
|
25
|
-
|
|
26
|
-
},
|
|
55
|
+
offset.value = event.contentOffset.x === 0 ? event.contentOffset.y : event.contentOffset.x;
|
|
56
|
+
}, scrollNativeEventNames
|
|
27
57
|
// Read https://github.com/software-mansion/react-native-reanimated/pull/5056
|
|
28
58
|
// for more information about this cast.
|
|
29
59
|
);
|
|
30
|
-
|
|
31
60
|
useEffect(() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
61
|
+
// We need to make sure that listener for old animatedRef value is removed
|
|
62
|
+
if (scrollRef.current !== null && scrollRefTag.current !== null) {
|
|
63
|
+
eventHandler.workletEventHandler.unregisterFromEvents(scrollRefTag.current);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Store the ref and viewTag for future cleanup
|
|
67
|
+
scrollRef.current = animatedRef.current;
|
|
68
|
+
scrollRefTag.current = animatedRef.getTag();
|
|
69
|
+
if (scrollRefTag === null) {
|
|
70
|
+
console.warn('[Reanimated] ScrollViewOffset failed to resolve the view tag from animated ref. Did you forget to attach the ref to a component?');
|
|
71
|
+
} else {
|
|
72
|
+
eventHandler.workletEventHandler.registerForEvents(scrollRefTag.current);
|
|
73
|
+
}
|
|
35
74
|
return () => {
|
|
36
|
-
|
|
37
|
-
|
|
75
|
+
if (scrollRefTag.current !== null) {
|
|
76
|
+
eventHandler.workletEventHandler.unregisterFromEvents(scrollRefTag.current);
|
|
77
|
+
}
|
|
38
78
|
};
|
|
39
79
|
// React here has a problem with `animatedRef.current` since a Ref .current
|
|
40
80
|
// field shouldn't be used as a dependency. However, in this case we have
|
|
41
81
|
// to do it this way.
|
|
42
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
83
|
}, [animatedRef, animatedRef.current, eventHandler]);
|
|
44
|
-
return
|
|
84
|
+
return offset;
|
|
85
|
+
}
|
|
86
|
+
function getWebScrollableElement(scrollComponent) {
|
|
87
|
+
return (scrollComponent === null || scrollComponent === void 0 ? void 0 : scrollComponent.getScrollableNode()) ?? scrollComponent;
|
|
45
88
|
}
|
|
89
|
+
const scrollNativeEventNames = ['onScroll', 'onScrollBeginDrag', 'onScrollEndDrag', 'onMomentumScrollBegin', 'onMomentumScrollEnd'];
|
|
46
90
|
//# sourceMappingURL=useScrollViewOffset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useCallback","useEvent","useSharedValue","isWeb","IS_WEB","useScrollViewOffset","useScrollViewOffsetWeb","useScrollViewOffsetNative","animatedRef","providedOffset","internalOffset","offset","current","scrollRef","eventHandler","element","getWebScrollableElement","value","scrollLeft","scrollTop","removeEventListener","addEventListener","scrollRefTag","event","contentOffset","x","y","scrollNativeEventNames","workletEventHandler","unregisterFromEvents","getTag","console","warn","registerForEvents","scrollComponent","getScrollableNode"],"sources":["useScrollViewOffset.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useRef, useCallback } from 'react';\nimport type { SharedValue } from '../commonTypes';\nimport type { EventHandlerInternal } from './useEvent';\nimport { useEvent } from './useEvent';\nimport { useSharedValue } from './useSharedValue';\nimport type { AnimatedScrollView } from '../component/ScrollView';\nimport type {\n AnimatedRef,\n RNNativeScrollEvent,\n ReanimatedScrollEvent,\n} from './commonTypes';\nimport { isWeb } from '../PlatformChecker';\n\nconst IS_WEB = isWeb();\n\n/**\n * Lets you synchronously get the current offset of a `ScrollView`.\n *\n * @param animatedRef - An [animated ref](https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedRef) attached to an Animated.ScrollView component.\n * @returns A shared value which holds the current offset of the `ScrollView`.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/scroll/useScrollViewOffset\n */\nexport const useScrollViewOffset = IS_WEB\n ? useScrollViewOffsetWeb\n : useScrollViewOffsetNative;\n\nfunction useScrollViewOffsetWeb(\n animatedRef: AnimatedRef<AnimatedScrollView>,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n const scrollRef = useRef<AnimatedScrollView | null>(null);\n\n const eventHandler = useCallback(() => {\n 'worklet';\n const element = getWebScrollableElement(animatedRef.current);\n // scrollLeft is the X axis scrolled offset, works properly also with RTL layout\n offset.value =\n element.scrollLeft === 0 ? element.scrollTop : element.scrollLeft;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current]);\n\n useEffect(() => {\n // We need to make sure that listener for old animatedRef value is removed\n if (scrollRef.current !== null) {\n getWebScrollableElement(scrollRef.current).removeEventListener(\n 'scroll',\n eventHandler\n );\n }\n scrollRef.current = animatedRef.current;\n\n const element = getWebScrollableElement(animatedRef.current);\n element.addEventListener('scroll', eventHandler);\n return () => {\n element.removeEventListener('scroll', eventHandler);\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current, eventHandler]);\n\n return offset;\n}\n\nfunction useScrollViewOffsetNative(\n animatedRef: AnimatedRef<AnimatedScrollView>,\n providedOffset?: SharedValue<number>\n): SharedValue<number> {\n const internalOffset = useSharedValue(0);\n const offset = useRef(providedOffset ?? internalOffset).current;\n const scrollRef = useRef<AnimatedScrollView | null>(null);\n const scrollRefTag = useRef<number | null>(null);\n\n const eventHandler = useEvent<RNNativeScrollEvent>(\n (event: ReanimatedScrollEvent) => {\n 'worklet';\n offset.value =\n event.contentOffset.x === 0\n ? event.contentOffset.y\n : event.contentOffset.x;\n },\n scrollNativeEventNames\n // Read https://github.com/software-mansion/react-native-reanimated/pull/5056\n // for more information about this cast.\n ) as unknown as EventHandlerInternal<ReanimatedScrollEvent>;\n\n useEffect(() => {\n // We need to make sure that listener for old animatedRef value is removed\n if (scrollRef.current !== null && scrollRefTag.current !== null) {\n eventHandler.workletEventHandler.unregisterFromEvents(\n scrollRefTag.current\n );\n }\n\n // Store the ref and viewTag for future cleanup\n scrollRef.current = animatedRef.current;\n scrollRefTag.current = animatedRef.getTag();\n\n if (scrollRefTag === null) {\n console.warn(\n '[Reanimated] ScrollViewOffset failed to resolve the view tag from animated ref. Did you forget to attach the ref to a component?'\n );\n } else {\n eventHandler.workletEventHandler.registerForEvents(scrollRefTag.current);\n }\n\n return () => {\n if (scrollRefTag.current !== null) {\n eventHandler.workletEventHandler.unregisterFromEvents(\n scrollRefTag.current\n );\n }\n };\n // React here has a problem with `animatedRef.current` since a Ref .current\n // field shouldn't be used as a dependency. However, in this case we have\n // to do it this way.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animatedRef, animatedRef.current, eventHandler]);\n\n return offset;\n}\n\nfunction getWebScrollableElement(\n scrollComponent: AnimatedScrollView | null\n): HTMLElement {\n return (\n (scrollComponent?.getScrollableNode() as unknown as HTMLElement) ??\n scrollComponent\n );\n}\n\nconst scrollNativeEventNames = [\n 'onScroll',\n 'onScrollBeginDrag',\n 'onScrollEndDrag',\n 'onMomentumScrollBegin',\n 'onMomentumScrollEnd',\n];\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,MAAM,EAAEC,WAAW,QAAQ,OAAO;AAGtD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,cAAc,QAAQ,kBAAkB;AAOjD,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,MAAMC,MAAM,GAAGD,KAAK,CAAC,CAAC;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,GAAGD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AEpD,OAAOH,MAAM;AACf;AAEA,SAASK,uBAAuBA,CAC9BkB,eAA0C,EAC7B;EACb,OACE,CAACA,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAEC,iBAAiB,CAAC,CAAC,KACrCD,eAAe;AAEnB;AAEA,MAAMP,sBAAsB,GAAG,CAC7B,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,CACtB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","cancelAnimation","makeMutable","useSharedValue","initialValue","mutable"],"sources":["useSharedValue.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useState } from 'react';\nimport { cancelAnimation } from '../animation';\nimport type { SharedValue } from '../commonTypes';\nimport { makeMutable } from '../core';\n\n/**\n * Lets you define [shared values](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#shared-value) in your components.\n *\n * @param initialValue - The value you want to be initially stored to a `.value` property.\n * @returns A shared value with a single `.value` property initially set to the `initialValue` - {@link SharedValue}.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useSharedValue\n */\nexport function useSharedValue<Value>(initialValue: Value): SharedValue<Value> {\n const [mutable] = useState(() => makeMutable(initialValue));\n useEffect(() => {\n return () => {\n cancelAnimation(mutable);\n };\n }, [mutable]);\n return mutable;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,eAAe,QAAQ,cAAc;AAE9C,SAASC,WAAW,QAAQ,SAAS;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAQC,YAAmB,EAAsB;EAC7E,MAAM,CAACC,OAAO,CAAC,GAAGL,QAAQ,CAAC,MAAME,WAAW,CAACE,YAAY,CAAC,CAAC;EAC3DL,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXE,eAAe,CAACI,OAAO,CAAC;IAC1B,CAAC;EACH,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EACb,OAAOA,OAAO;AAChB"}
|
|
1
|
+
{"version":3,"names":["useEffect","useState","cancelAnimation","makeMutable","useSharedValue","initialValue","mutable"],"sources":["useSharedValue.ts"],"sourcesContent":["'use strict';\nimport { useEffect, useState } from 'react';\nimport { cancelAnimation } from '../animation';\nimport type { SharedValue } from '../commonTypes';\nimport { makeMutable } from '../core';\n\n/**\n * Lets you define [shared values](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#shared-value) in your components.\n *\n * @param initialValue - The value you want to be initially stored to a `.value` property.\n * @returns A shared value with a single `.value` property initially set to the `initialValue` - {@link SharedValue}.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useSharedValue\n */\nexport function useSharedValue<Value>(initialValue: Value): SharedValue<Value> {\n const [mutable] = useState(() => makeMutable(initialValue));\n useEffect(() => {\n return () => {\n cancelAnimation(mutable);\n };\n }, [mutable]);\n return mutable;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,eAAe,QAAQ,cAAc;AAE9C,SAASC,WAAW,QAAQ,SAAS;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAQC,YAAmB,EAAsB;EAC7E,MAAM,CAACC,OAAO,CAAC,GAAGL,QAAQ,CAAC,MAAME,WAAW,CAACE,YAAY,CAAC,CAAC;EAC3DL,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXE,eAAe,CAACI,OAAO,CAAC;IAC1B,CAAC;EACH,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EACb,OAAOA,OAAO;AAChB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWorkletCallback","worklet","deps"],"sources":["useWorkletCallback.ts"],"sourcesContent":["'use strict';\nimport { useCallback } from 'react';\nimport type { DependencyList } from './commonTypes';\n\n/**\n * @deprecated don't use\n */\nexport function useWorkletCallback<Args extends unknown[], ReturnValue>(\n worklet: (...args: Args) => ReturnValue,\n deps?: DependencyList\n) {\n return useCallback(worklet, deps ?? []);\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,WAAW,QAAQ,OAAO;AAGnC;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,OAAuC,EACvCC,IAAqB,EACrB;EACA,OAAOH,WAAW,CAACE,OAAO,EAAEC,IAAI,IAAI,EAAE,CAAC;AACzC"}
|
|
1
|
+
{"version":3,"names":["useCallback","useWorkletCallback","worklet","deps"],"sources":["useWorkletCallback.ts"],"sourcesContent":["'use strict';\nimport { useCallback } from 'react';\nimport type { DependencyList } from './commonTypes';\n\n/**\n * @deprecated don't use\n */\nexport function useWorkletCallback<Args extends unknown[], ReturnValue>(\n worklet: (...args: Args) => ReturnValue,\n deps?: DependencyList\n) {\n return useCallback(worklet, deps ?? []);\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,WAAW,QAAQ,OAAO;AAGnC;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,OAAuC,EACvCC,IAAqB,EACrB;EACA,OAAOH,WAAW,CAACE,OAAO,EAAEC,IAAI,IAAI,EAAE,CAAC;AACzC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["buildWorkletsHash","worklets","Object","values","reduce","acc","worklet","__workletHash","toString","buildDependencies","dependencies","handlers","handlersList","filter","handler","undefined","map","workletHash","closure","__closure","push","areDependenciesEqual","nextDependencies","prevDependencies","is","x","y","Number","isNaN","objectIs","areHookInputsEqual","nextDeps","prevDeps","length","i","isAnimated","prop","Array","isArray","some","onFrame","shallowEqual","a","b","aKeys","keys","bKeys","validateAnimatedStyles","styles","Error"],"sources":["utils.ts"],"sourcesContent":["'use strict';\nimport type { WorkletFunction } from '../commonTypes';\nimport type { DependencyList } from './commonTypes';\n\n// Builds one big hash from multiple worklets' hashes.\nexport function buildWorkletsHash<Args extends unknown[], ReturnValue>(\n worklets:\n | Record<string, WorkletFunction<Args, ReturnValue>>\n | WorkletFunction<Args, ReturnValue>[]\n) {\n // For arrays `Object.values` returns the array itself.\n return Object.values(worklets).reduce(\n (acc, worklet: WorkletFunction<Args, ReturnValue>) =>\n acc + worklet.__workletHash.toString(),\n ''\n );\n}\n\n// Builds dependencies array for useEvent handlers.\nexport function buildDependencies(\n dependencies: DependencyList,\n handlers: Record<string, WorkletFunction | undefined>\n) {\n type Handler = (typeof handlers)[keyof typeof handlers];\n const handlersList = Object.values(handlers).filter(\n (handler) => handler !== undefined\n ) as NonNullable<Handler>[];\n if (!dependencies) {\n dependencies = handlersList.map((handler) => {\n return {\n workletHash: handler.__workletHash,\n closure: handler.__closure,\n };\n });\n } else {\n dependencies.push(buildWorkletsHash(handlersList));\n }\n\n return dependencies;\n}\n\n// This is supposed to work as useEffect comparison.\nexport function areDependenciesEqual(\n nextDependencies: DependencyList,\n prevDependencies: DependencyList\n) {\n function is(x: number, y: number) {\n return (\n (x === y && (x !== 0 || 1 / x === 1 / y)) ||\n (Number.isNaN(x) && Number.isNaN(y))\n );\n }\n const objectIs: (nextDeps: unknown, prevDeps: unknown) => boolean =\n typeof Object.is === 'function' ? Object.is : is;\n\n function areHookInputsEqual(\n nextDeps: DependencyList,\n prevDeps: DependencyList\n ) {\n if (!nextDeps || !prevDeps || prevDeps.length !== nextDeps.length) {\n return false;\n }\n for (let i = 0; i < prevDeps.length; ++i) {\n if (!objectIs(nextDeps[i], prevDeps[i])) {\n return false;\n }\n }\n return true;\n }\n\n return areHookInputsEqual(nextDependencies, prevDependencies);\n}\n\nexport function isAnimated(prop: unknown) {\n 'worklet';\n if (Array.isArray(prop)) {\n return prop.some(isAnimated);\n } else if (typeof prop === 'object' && prop !== null) {\n if ((prop as Record<string, unknown>).onFrame !== undefined) {\n return true;\n } else {\n return Object.values(prop).some(isAnimated);\n }\n }\n return false;\n}\n\n// This function works because `Object.keys`\n// return empty array of primitives and on arrays\n// it returns array of its indices.\nexport function shallowEqual<\n T extends Record<string | number | symbol, unknown>\n>(a: T, b: T) {\n 'worklet';\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n for (let i = 0; i < aKeys.length; i++) {\n if (a[aKeys[i]] !== b[aKeys[i]]) {\n return false;\n }\n }\n return true;\n}\n\nexport function validateAnimatedStyles(styles: unknown[] | object) {\n 'worklet';\n if (typeof styles !== 'object') {\n throw new Error(\n `[Reanimated] \\`useAnimatedStyle\\` has to return an object, found ${typeof styles} instead.`\n );\n } else if (Array.isArray(styles)) {\n throw new Error(\n '[Reanimated] `useAnimatedStyle` has to return an object and cannot return static styles combined with dynamic ones. Please do merging where a component receives props.'\n );\n }\n}\n"],"mappings":"AAAA,YAAY;;AAIZ;AACA,OAAO,SAASA,iBAAiBA,CAC/BC,QAEwC,EACxC;EACA;EACA,OAAOC,MAAM,CAACC,MAAM,CAACF,QAAQ,CAAC,CAACG,MAAM,CACnC,CAACC,GAAG,EAAEC,OAA2C,KAC/CD,GAAG,GAAGC,OAAO,CAACC,aAAa,CAACC,QAAQ,
|
|
1
|
+
{"version":3,"names":["buildWorkletsHash","worklets","Object","values","reduce","acc","worklet","__workletHash","toString","buildDependencies","dependencies","handlers","handlersList","filter","handler","undefined","map","workletHash","closure","__closure","push","areDependenciesEqual","nextDependencies","prevDependencies","is","x","y","Number","isNaN","objectIs","areHookInputsEqual","nextDeps","prevDeps","length","i","isAnimated","prop","Array","isArray","some","onFrame","shallowEqual","a","b","aKeys","keys","bKeys","validateAnimatedStyles","styles","Error"],"sources":["utils.ts"],"sourcesContent":["'use strict';\nimport type { WorkletFunction } from '../commonTypes';\nimport type { DependencyList } from './commonTypes';\n\n// Builds one big hash from multiple worklets' hashes.\nexport function buildWorkletsHash<Args extends unknown[], ReturnValue>(\n worklets:\n | Record<string, WorkletFunction<Args, ReturnValue>>\n | WorkletFunction<Args, ReturnValue>[]\n) {\n // For arrays `Object.values` returns the array itself.\n return Object.values(worklets).reduce(\n (acc, worklet: WorkletFunction<Args, ReturnValue>) =>\n acc + worklet.__workletHash.toString(),\n ''\n );\n}\n\n// Builds dependencies array for useEvent handlers.\nexport function buildDependencies(\n dependencies: DependencyList,\n handlers: Record<string, WorkletFunction | undefined>\n) {\n type Handler = (typeof handlers)[keyof typeof handlers];\n const handlersList = Object.values(handlers).filter(\n (handler) => handler !== undefined\n ) as NonNullable<Handler>[];\n if (!dependencies) {\n dependencies = handlersList.map((handler) => {\n return {\n workletHash: handler.__workletHash,\n closure: handler.__closure,\n };\n });\n } else {\n dependencies.push(buildWorkletsHash(handlersList));\n }\n\n return dependencies;\n}\n\n// This is supposed to work as useEffect comparison.\nexport function areDependenciesEqual(\n nextDependencies: DependencyList,\n prevDependencies: DependencyList\n) {\n function is(x: number, y: number) {\n return (\n (x === y && (x !== 0 || 1 / x === 1 / y)) ||\n (Number.isNaN(x) && Number.isNaN(y))\n );\n }\n const objectIs: (nextDeps: unknown, prevDeps: unknown) => boolean =\n typeof Object.is === 'function' ? Object.is : is;\n\n function areHookInputsEqual(\n nextDeps: DependencyList,\n prevDeps: DependencyList\n ) {\n if (!nextDeps || !prevDeps || prevDeps.length !== nextDeps.length) {\n return false;\n }\n for (let i = 0; i < prevDeps.length; ++i) {\n if (!objectIs(nextDeps[i], prevDeps[i])) {\n return false;\n }\n }\n return true;\n }\n\n return areHookInputsEqual(nextDependencies, prevDependencies);\n}\n\nexport function isAnimated(prop: unknown) {\n 'worklet';\n if (Array.isArray(prop)) {\n return prop.some(isAnimated);\n } else if (typeof prop === 'object' && prop !== null) {\n if ((prop as Record<string, unknown>).onFrame !== undefined) {\n return true;\n } else {\n return Object.values(prop).some(isAnimated);\n }\n }\n return false;\n}\n\n// This function works because `Object.keys`\n// return empty array of primitives and on arrays\n// it returns array of its indices.\nexport function shallowEqual<\n T extends Record<string | number | symbol, unknown>\n>(a: T, b: T) {\n 'worklet';\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n for (let i = 0; i < aKeys.length; i++) {\n if (a[aKeys[i]] !== b[aKeys[i]]) {\n return false;\n }\n }\n return true;\n}\n\nexport function validateAnimatedStyles(styles: unknown[] | object) {\n 'worklet';\n if (typeof styles !== 'object') {\n throw new Error(\n `[Reanimated] \\`useAnimatedStyle\\` has to return an object, found ${typeof styles} instead.`\n );\n } else if (Array.isArray(styles)) {\n throw new Error(\n '[Reanimated] `useAnimatedStyle` has to return an object and cannot return static styles combined with dynamic ones. Please do merging where a component receives props.'\n );\n }\n}\n"],"mappings":"AAAA,YAAY;;AAIZ;AACA,OAAO,SAASA,iBAAiBA,CAC/BC,QAEwC,EACxC;EACA;EACA,OAAOC,MAAM,CAACC,MAAM,CAACF,QAAQ,CAAC,CAACG,MAAM,CACnC,CAACC,GAAG,EAAEC,OAA2C,KAC/CD,GAAG,GAAGC,OAAO,CAACC,aAAa,CAACC,QAAQ,CAAC,CAAC,EACxC,EACF,CAAC;AACH;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAC/BC,YAA4B,EAC5BC,QAAqD,EACrD;EAEA,MAAMC,YAAY,GAAGV,MAAM,CAACC,MAAM,CAACQ,QAAQ,CAAC,CAACE,MAAM,CAChDC,OAAO,IAAKA,OAAO,KAAKC,SAC3B,CAA2B;EAC3B,IAAI,CAACL,YAAY,EAAE;IACjBA,YAAY,GAAGE,YAAY,CAACI,GAAG,CAAEF,OAAO,IAAK;MAC3C,OAAO;QACLG,WAAW,EAAEH,OAAO,CAACP,aAAa;QAClCW,OAAO,EAAEJ,OAAO,CAACK;MACnB,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,MAAM;IACLT,YAAY,CAACU,IAAI,CAACpB,iBAAiB,CAACY,YAAY,CAAC,CAAC;EACpD;EAEA,OAAOF,YAAY;AACrB;;AAEA;AACA,OAAO,SAASW,oBAAoBA,CAClCC,gBAAgC,EAChCC,gBAAgC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,CAACiC,IAAI,CAAC,CAACG,IAAI,CAACJ,UAAU,CAAC;IAC7C;EACF;EACA,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA,OAAO,SAASM,YAAYA,CAE1BC,CAAI,EAAEC,CAAI,EAAE;EACZ,SAAS;;EACT,MAAMC,KAAK,GAAG1C,MAAM,CAAC2C,IAAI,CAACH,CAAC,CAAC;EAC5B,MAAMI,KAAK,GAAG5C,MAAM,CAAC2C,IAAI,CAACF,CAAC,CAAC;EAC5B,IAAIC,KAAK,CAACX,MAAM,KAAKa,KAAK,CAACb,MAAM,EAAE;IACjC,OAAO,KAAK;EACd;EACA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGU,KAAK,CAACX,MAAM,EAAEC,CAAC,EAAE,EAAE;IACrC,IAAIQ,CAAC,CAACE,KAAK,CAACV,CAAC,CAAC,CAAC,KAAKS,CAAC,CAACC,KAAK,CAACV,CAAC,CAAC,CAAC,EAAE;MAC/B,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb;AAEA,OAAO,SAASa,sBAAsBA,CAACC,MAA0B,EAAE;EACjE,SAAS;;EACT,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,MAAM,IAAIC,KAAK,CACZ,oEAAmE,OAAOD,MAAO,WACpF,CAAC;EACH,CAAC,MAAM,IAAIX,KAAK,CAACC,OAAO,CAACU,MAAM,CAAC,EAAE;IAChC,MAAM,IAAIC,KAAK,CACb,yKACF,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -44,5 +44,7 @@ export { SensorType, IOSReferenceFrame, InterfaceOrientation, KeyboardState, Red
|
|
|
44
44
|
export { getUseOfValueInStyleWarning } from './pluginUtils';
|
|
45
45
|
export { withReanimatedTimer, advanceAnimationByTime, advanceAnimationByFrame, setUpTests, getAnimatedStyle } from './jestUtils';
|
|
46
46
|
export { LayoutAnimationConfig } from './component/LayoutAnimationConfig';
|
|
47
|
+
export { PerformanceMonitor } from './component/PerformanceMonitor';
|
|
47
48
|
export { startMapper, stopMapper } from './mappers';
|
|
49
|
+
export { startScreenTransition, finishScreenTransition, ScreenTransition } from './screenTransition';
|
|
48
50
|
//# sourceMappingURL=index.js.map
|