react-native-reanimated 3.9.0-rc.0 → 3.9.0
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 +2 -1
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +11 -4
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +5 -3
- package/apple/REAModule.mm +14 -29
- package/apple/REANodesManager.mm +7 -6
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/animationBuilder.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +2 -2
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +4 -4
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js.map +1 -1
- package/lib/module/createAnimatedComponent/PropsFilter.js +5 -5
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +33 -33
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js +2 -2
- package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
- 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 +3 -3
- 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 +1 -0
- 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.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.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.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.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +2 -0
- 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 +3 -4
- package/lib/module/reanimated2/component/PerformanceMonitor.js.map +1 -1
- 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 +2 -4
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +7 -8
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +4 -4
- 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 +1 -1
- 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 +14 -6
- 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.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 +4 -5
- 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 +8 -11
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +8 -9
- 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 +1 -2
- 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 +4 -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 +4 -6
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js +4 -6
- 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.map +1 -1
- package/lib/module/reanimated2/screenTransition/animationManager.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/index.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/presets.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/styleUpdater.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js.map +1 -1
- package/lib/module/reanimated2/shareableMappingCache.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +2 -4
- 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.map +1 -1
- package/lib/module/specs/NativeReanimatedModule.js.map +1 -1
- package/lib/typescript/reanimated2/WorkletEventHandler.d.ts +16 -9
- package/lib/typescript/reanimated2/component/LayoutAnimationConfig.d.ts +1 -1
- package/lib/typescript/reanimated2/component/PerformanceMonitor.d.ts +2 -1
- package/lib/typescript/reanimated2/hook/commonTypes.d.ts +5 -0
- package/lib/typescript/reanimated2/hook/useEvent.d.ts +2 -3
- package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
- package/package.json +18 -14
- package/plugin/build/plugin.js +7 -2
- package/src/createAnimatedComponent/PropsFilter.tsx +1 -1
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +29 -33
- package/src/reanimated2/WorkletEventHandler.ts +98 -39
- package/src/reanimated2/animation/styleAnimation.ts +8 -6
- package/src/reanimated2/hook/commonTypes.ts +9 -0
- package/src/reanimated2/hook/useEvent.ts +4 -4
- package/src/reanimated2/hook/useScrollViewOffset.ts +21 -5
- package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -3
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","checkCppVersion","jsVersion","getValueUnpackerCode","isFabric","getShadowNodeWrapperFromRef","ReanimatedModule","assertSingleReanimatedInstance","global","_REANIMATED_VERSION_JS","Error","NativeReanimated","constructor","__DEV__","__reanimatedModuleProxy","valueUnpackerCode","installTurboModule","InnerNativeModule","makeShareableClone","shouldPersistRemote","nativeStateSource","scheduleOnUI","shareable","executeOnUIRuntimeSync","createWorkletRuntime","name","initializer","scheduleOnRuntime","workletRuntime","shareableWorklet","registerSensor","sensorType","interval","iosReferenceFrame","handler","unregisterSensor","sensorId","registerEventHandler","eventHandler","eventName","emitterReactTag","unregisterEventHandler","id","getViewProp","viewTag","propName","component","callback","shadowNodeWrapper","configureLayoutAnimationBatch","layoutAnimationsBatch","setShouldAnimateExitingForTag","shouldAnimate","enableLayoutAnimations","flag","configureProps","uiProps","nativeProps","subscribeForKeyboardEvents","isStatusBarTranslucent","unsubscribeFromKeyboardEvents","listenerId"],"sources":["NativeReanimated.ts"],"sourcesContent":["'use strict';\nimport type {\n ShadowNodeWrapper,\n Value3D,\n ValueRotation,\n ShareableRef,\n} from '../commonTypes';\nimport { checkCppVersion } from '../platform-specific/checkCppVersion';\nimport { jsVersion } from '../platform-specific/jsVersion';\nimport type { WorkletRuntime } from '../runtimes';\nimport { getValueUnpackerCode } from '../valueUnpacker';\nimport { isFabric } from '../PlatformChecker';\nimport type React from 'react';\nimport { getShadowNodeWrapperFromRef } from '../fabricUtils';\nimport type { LayoutAnimationBatchItem } from '../layoutReanimation/animationBuilder/commonTypes';\nimport ReanimatedModule from '../../specs/NativeReanimatedModule';\n\n// this is the type of `__reanimatedModuleProxy` which is injected using JSI\nexport interface NativeReanimatedModule {\n makeShareableClone<T>(\n value: T,\n shouldPersistRemote: boolean,\n nativeStateSource?: object\n ): ShareableRef<T>;\n scheduleOnUI<T>(shareable: ShareableRef<T>): void;\n executeOnUIRuntimeSync<T, R>(shareable: ShareableRef<T>): R;\n createWorkletRuntime(\n name: string,\n initializer: ShareableRef<() => void>\n ): WorkletRuntime;\n scheduleOnRuntime<T>(\n workletRuntime: WorkletRuntime,\n worklet: ShareableRef<T>\n ): void;\n registerEventHandler<T>(\n eventHandler: ShareableRef<T>,\n eventName: string,\n emitterReactTag: number\n ): number;\n unregisterEventHandler(id: number): void;\n getViewProp<T>(\n viewTagOrShadowNodeWrapper: number | ShadowNodeWrapper,\n propName: string,\n callback?: (result: T) => void\n ): Promise<T>;\n enableLayoutAnimations(flag: boolean): void;\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ): number;\n unregisterSensor(sensorId: number): void;\n configureProps(uiProps: string[], nativeProps: string[]): void;\n subscribeForKeyboardEvents(\n handler: ShareableRef<number>,\n isStatusBarTranslucent: boolean\n ): number;\n unsubscribeFromKeyboardEvents(listenerId: number): void;\n configureLayoutAnimationBatch(\n layoutAnimationsBatch: LayoutAnimationBatchItem[]\n ): void;\n setShouldAnimateExitingForTag(viewTag: number, shouldAnimate: boolean): void;\n}\n\nfunction assertSingleReanimatedInstance() {\n if (\n global._REANIMATED_VERSION_JS !== undefined &&\n global._REANIMATED_VERSION_JS !== jsVersion\n ) {\n throw new Error(\n `[Reanimated] Another instance of Reanimated was detected.\nSee \\`https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#another-instance-of-reanimated-was-detected\\` for more details. Previous: ${global._REANIMATED_VERSION_JS}, current: ${jsVersion}.`\n );\n }\n}\n\nexport class NativeReanimated {\n private InnerNativeModule: NativeReanimatedModule;\n\n constructor() {\n // These checks have to split since version checking depend on the execution order\n if (__DEV__) {\n assertSingleReanimatedInstance();\n }\n global._REANIMATED_VERSION_JS = jsVersion;\n if (global.__reanimatedModuleProxy === undefined) {\n const valueUnpackerCode = getValueUnpackerCode();\n ReanimatedModule?.installTurboModule(valueUnpackerCode);\n }\n if (global.__reanimatedModuleProxy === undefined) {\n throw new Error(\n `[Reanimated] Native part of Reanimated doesn't seem to be initialized.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#native-part-of-reanimated-doesnt-seem-to-be-initialized for more details.`\n );\n }\n if (__DEV__) {\n checkCppVersion();\n }\n this.InnerNativeModule = global.__reanimatedModuleProxy;\n }\n\n makeShareableClone<T>(\n value: T,\n shouldPersistRemote: boolean,\n nativeStateSource?: object\n ) {\n return this.InnerNativeModule.makeShareableClone(\n value,\n shouldPersistRemote,\n nativeStateSource\n );\n }\n\n scheduleOnUI<T>(shareable: ShareableRef<T>) {\n return this.InnerNativeModule.scheduleOnUI(shareable);\n }\n\n executeOnUIRuntimeSync<T, R>(shareable: ShareableRef<T>): R {\n return this.InnerNativeModule.executeOnUIRuntimeSync(shareable);\n }\n\n createWorkletRuntime(name: string, initializer: ShareableRef<() => void>) {\n return this.InnerNativeModule.createWorkletRuntime(name, initializer);\n }\n\n scheduleOnRuntime<T>(\n workletRuntime: WorkletRuntime,\n shareableWorklet: ShareableRef<T>\n ) {\n return this.InnerNativeModule.scheduleOnRuntime(\n workletRuntime,\n shareableWorklet\n );\n }\n\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ) {\n return this.InnerNativeModule.registerSensor(\n sensorType,\n interval,\n iosReferenceFrame,\n handler\n );\n }\n\n unregisterSensor(sensorId: number) {\n return this.InnerNativeModule.unregisterSensor(sensorId);\n }\n\n registerEventHandler<T>(\n eventHandler: ShareableRef<T>,\n eventName: string,\n emitterReactTag: number\n ) {\n return this.InnerNativeModule.registerEventHandler(\n eventHandler,\n eventName,\n emitterReactTag\n );\n }\n\n unregisterEventHandler(id: number) {\n return this.InnerNativeModule.unregisterEventHandler(id);\n }\n\n getViewProp<T>(\n viewTag: number,\n propName: string,\n component: React.Component | undefined, // required on Fabric\n callback?: (result: T) => void\n ) {\n let shadowNodeWrapper;\n if (isFabric()) {\n shadowNodeWrapper = getShadowNodeWrapperFromRef(\n component as React.Component\n );\n return this.InnerNativeModule.getViewProp(\n shadowNodeWrapper,\n propName,\n callback\n );\n }\n\n return this.InnerNativeModule.getViewProp(viewTag, propName, callback);\n }\n\n configureLayoutAnimationBatch(\n layoutAnimationsBatch: LayoutAnimationBatchItem[]\n ) {\n this.InnerNativeModule.configureLayoutAnimationBatch(layoutAnimationsBatch);\n }\n\n setShouldAnimateExitingForTag(viewTag: number, shouldAnimate: boolean) {\n this.InnerNativeModule.setShouldAnimateExitingForTag(\n viewTag,\n shouldAnimate\n );\n }\n\n enableLayoutAnimations(flag: boolean) {\n this.InnerNativeModule.enableLayoutAnimations(flag);\n }\n\n configureProps(uiProps: string[], nativeProps: string[]) {\n this.InnerNativeModule.configureProps(uiProps, nativeProps);\n }\n\n subscribeForKeyboardEvents(\n handler: ShareableRef<number>,\n isStatusBarTranslucent: boolean\n ) {\n return this.InnerNativeModule.subscribeForKeyboardEvents(\n handler,\n isStatusBarTranslucent\n );\n }\n\n unsubscribeFromKeyboardEvents(listenerId: number) {\n this.InnerNativeModule.unsubscribeFromKeyboardEvents(listenerId);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AA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,OAAO,EACPyB,sBAAsB,CACvB;EACH;EAEAC,6BAA6BA,CAACC,UAAkB,EAAE;IAChD,IAAI,CAAC5C,iBAAiB,CAAC2C,6BAA6B,CAACC,UAAU,CAAC;EAClE;AACF"}
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","checkCppVersion","jsVersion","getValueUnpackerCode","isFabric","getShadowNodeWrapperFromRef","ReanimatedModule","assertSingleReanimatedInstance","global","_REANIMATED_VERSION_JS","undefined","Error","NativeReanimated","constructor","__DEV__","__reanimatedModuleProxy","valueUnpackerCode","installTurboModule","InnerNativeModule","makeShareableClone","shouldPersistRemote","nativeStateSource","scheduleOnUI","shareable","executeOnUIRuntimeSync","createWorkletRuntime","name","initializer","scheduleOnRuntime","workletRuntime","shareableWorklet","registerSensor","sensorType","interval","iosReferenceFrame","handler","unregisterSensor","sensorId","registerEventHandler","eventHandler","eventName","emitterReactTag","unregisterEventHandler","id","getViewProp","viewTag","propName","component","callback","shadowNodeWrapper","configureLayoutAnimationBatch","layoutAnimationsBatch","setShouldAnimateExitingForTag","shouldAnimate","enableLayoutAnimations","flag","configureProps","uiProps","nativeProps","subscribeForKeyboardEvents","isStatusBarTranslucent","unsubscribeFromKeyboardEvents","listenerId"],"sources":["NativeReanimated.ts"],"sourcesContent":["'use strict';\nimport type {\n ShadowNodeWrapper,\n Value3D,\n ValueRotation,\n ShareableRef,\n} from '../commonTypes';\nimport { checkCppVersion } from '../platform-specific/checkCppVersion';\nimport { jsVersion } from '../platform-specific/jsVersion';\nimport type { WorkletRuntime } from '../runtimes';\nimport { getValueUnpackerCode } from '../valueUnpacker';\nimport { isFabric } from '../PlatformChecker';\nimport type React from 'react';\nimport { getShadowNodeWrapperFromRef } from '../fabricUtils';\nimport type { LayoutAnimationBatchItem } from '../layoutReanimation/animationBuilder/commonTypes';\nimport ReanimatedModule from '../../specs/NativeReanimatedModule';\n\n// this is the type of `__reanimatedModuleProxy` which is injected using JSI\nexport interface NativeReanimatedModule {\n makeShareableClone<T>(\n value: T,\n shouldPersistRemote: boolean,\n nativeStateSource?: object\n ): ShareableRef<T>;\n scheduleOnUI<T>(shareable: ShareableRef<T>): void;\n executeOnUIRuntimeSync<T, R>(shareable: ShareableRef<T>): R;\n createWorkletRuntime(\n name: string,\n initializer: ShareableRef<() => void>\n ): WorkletRuntime;\n scheduleOnRuntime<T>(\n workletRuntime: WorkletRuntime,\n worklet: ShareableRef<T>\n ): void;\n registerEventHandler<T>(\n eventHandler: ShareableRef<T>,\n eventName: string,\n emitterReactTag: number\n ): number;\n unregisterEventHandler(id: number): void;\n getViewProp<T>(\n viewTagOrShadowNodeWrapper: number | ShadowNodeWrapper,\n propName: string,\n callback?: (result: T) => void\n ): Promise<T>;\n enableLayoutAnimations(flag: boolean): void;\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ): number;\n unregisterSensor(sensorId: number): void;\n configureProps(uiProps: string[], nativeProps: string[]): void;\n subscribeForKeyboardEvents(\n handler: ShareableRef<number>,\n isStatusBarTranslucent: boolean\n ): number;\n unsubscribeFromKeyboardEvents(listenerId: number): void;\n configureLayoutAnimationBatch(\n layoutAnimationsBatch: LayoutAnimationBatchItem[]\n ): void;\n setShouldAnimateExitingForTag(viewTag: number, shouldAnimate: boolean): void;\n}\n\nfunction assertSingleReanimatedInstance() {\n if (\n global._REANIMATED_VERSION_JS !== undefined &&\n global._REANIMATED_VERSION_JS !== jsVersion\n ) {\n throw new Error(\n `[Reanimated] Another instance of Reanimated was detected.\nSee \\`https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#another-instance-of-reanimated-was-detected\\` for more details. Previous: ${global._REANIMATED_VERSION_JS}, current: ${jsVersion}.`\n );\n }\n}\n\nexport class NativeReanimated {\n private InnerNativeModule: NativeReanimatedModule;\n\n constructor() {\n // These checks have to split since version checking depend on the execution order\n if (__DEV__) {\n assertSingleReanimatedInstance();\n }\n global._REANIMATED_VERSION_JS = jsVersion;\n if (global.__reanimatedModuleProxy === undefined) {\n const valueUnpackerCode = getValueUnpackerCode();\n ReanimatedModule?.installTurboModule(valueUnpackerCode);\n }\n if (global.__reanimatedModuleProxy === undefined) {\n throw new Error(\n `[Reanimated] Native part of Reanimated doesn't seem to be initialized.\nSee https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#native-part-of-reanimated-doesnt-seem-to-be-initialized for more details.`\n );\n }\n if (__DEV__) {\n checkCppVersion();\n }\n this.InnerNativeModule = global.__reanimatedModuleProxy;\n }\n\n makeShareableClone<T>(\n value: T,\n shouldPersistRemote: boolean,\n nativeStateSource?: object\n ) {\n return this.InnerNativeModule.makeShareableClone(\n value,\n shouldPersistRemote,\n nativeStateSource\n );\n }\n\n scheduleOnUI<T>(shareable: ShareableRef<T>) {\n return this.InnerNativeModule.scheduleOnUI(shareable);\n }\n\n executeOnUIRuntimeSync<T, R>(shareable: ShareableRef<T>): R {\n return this.InnerNativeModule.executeOnUIRuntimeSync(shareable);\n }\n\n createWorkletRuntime(name: string, initializer: ShareableRef<() => void>) {\n return this.InnerNativeModule.createWorkletRuntime(name, initializer);\n }\n\n scheduleOnRuntime<T>(\n workletRuntime: WorkletRuntime,\n shareableWorklet: ShareableRef<T>\n ) {\n return this.InnerNativeModule.scheduleOnRuntime(\n workletRuntime,\n shareableWorklet\n );\n }\n\n registerSensor(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ) {\n return this.InnerNativeModule.registerSensor(\n sensorType,\n interval,\n iosReferenceFrame,\n handler\n );\n }\n\n unregisterSensor(sensorId: number) {\n return this.InnerNativeModule.unregisterSensor(sensorId);\n }\n\n registerEventHandler<T>(\n eventHandler: ShareableRef<T>,\n eventName: string,\n emitterReactTag: number\n ) {\n return this.InnerNativeModule.registerEventHandler(\n eventHandler,\n eventName,\n emitterReactTag\n );\n }\n\n unregisterEventHandler(id: number) {\n return this.InnerNativeModule.unregisterEventHandler(id);\n }\n\n getViewProp<T>(\n viewTag: number,\n propName: string,\n component: React.Component | undefined, // required on Fabric\n callback?: (result: T) => void\n ) {\n let shadowNodeWrapper;\n if (isFabric()) {\n shadowNodeWrapper = getShadowNodeWrapperFromRef(\n component as React.Component\n );\n return this.InnerNativeModule.getViewProp(\n shadowNodeWrapper,\n propName,\n callback\n );\n }\n\n return this.InnerNativeModule.getViewProp(viewTag, propName, callback);\n }\n\n configureLayoutAnimationBatch(\n layoutAnimationsBatch: LayoutAnimationBatchItem[]\n ) {\n this.InnerNativeModule.configureLayoutAnimationBatch(layoutAnimationsBatch);\n }\n\n setShouldAnimateExitingForTag(viewTag: number, shouldAnimate: boolean) {\n this.InnerNativeModule.setShouldAnimateExitingForTag(\n viewTag,\n shouldAnimate\n );\n }\n\n enableLayoutAnimations(flag: boolean) {\n this.InnerNativeModule.enableLayoutAnimations(flag);\n }\n\n configureProps(uiProps: string[], nativeProps: string[]) {\n this.InnerNativeModule.configureProps(uiProps, nativeProps);\n }\n\n subscribeForKeyboardEvents(\n handler: ShareableRef<number>,\n isStatusBarTranslucent: boolean\n ) {\n return this.InnerNativeModule.subscribeForKeyboardEvents(\n handler,\n isStatusBarTranslucent\n );\n }\n\n unsubscribeFromKeyboardEvents(listenerId: number) {\n this.InnerNativeModule.unsubscribeFromKeyboardEvents(listenerId);\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAA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,EACPyB,sBACF,CAAC;EACH;EAEAC,6BAA6BA,CAACC,UAAkB,EAAE;IAChD,IAAI,CAAC5C,iBAAiB,CAAC2C,6BAA6B,CAACC,UAAU,CAAC;EAClE;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["reanimatedJS","shouldBeUseWeb","NativeReanimated"],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport reanimatedJS from '../js-reanimated';\nimport { shouldBeUseWeb } from '../PlatformChecker';\nimport { NativeReanimated } from './NativeReanimated';\n\nexport default shouldBeUseWeb() ? reanimatedJS : new NativeReanimated();\n"],"mappings":"AAAA,YAAY;;AACZ,OAAOA,YAAY,MAAM,kBAAkB;AAC3C,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,eAAeD,cAAc,
|
|
1
|
+
{"version":3,"names":["reanimatedJS","shouldBeUseWeb","NativeReanimated"],"sources":["index.ts"],"sourcesContent":["'use strict';\nimport reanimatedJS from '../js-reanimated';\nimport { shouldBeUseWeb } from '../PlatformChecker';\nimport { NativeReanimated } from './NativeReanimated';\n\nexport default shouldBeUseWeb() ? reanimatedJS : new NativeReanimated();\n"],"mappings":"AAAA,YAAY;;AACZ,OAAOA,YAAY,MAAM,kBAAkB;AAC3C,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,eAAeD,cAAc,CAAC,CAAC,GAAGD,YAAY,GAAG,IAAIE,gBAAgB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.web.ts"],"sourcesContent":["'use strict';\n// this file was created to prevent NativeReanimated from being included in the web bundle\nexport { default } from '../js-reanimated';\n"],"mappings":"AAAA,YAAY;;AACZ;AACA,SAASA,OAAO,QAAQ,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.web.ts"],"sourcesContent":["'use strict';\n// this file was created to prevent NativeReanimated from being included in the web bundle\nexport { default } from '../js-reanimated';\n"],"mappings":"AAAA,YAAY;;AACZ;AACA,SAASA,OAAO,QAAQ,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","RN$Bridgeless","isWeb","OS","isAndroid","isWindows","shouldBeUseWeb","isFabric","_IS_FABRIC","isWindowAvailable","window","isReducedMotion","matchMedia","matches","_REANIMATED_IS_REDUCED_MOTION"],"sources":["PlatformChecker.ts"],"sourcesContent":["'use strict';\nimport { Platform } from 'react-native';\n\n// This type is necessary since some libraries tend to do a lib check\n// and this file causes type errors on `global` access.\ntype localGlobal = typeof global & Record<string, unknown>;\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\n// `isChromeDebugger` also returns true in Jest environment, so `isJest()` check should always be performed first\nexport function isChromeDebugger(): boolean {\n return (\n (!(global as localGlobal).nativeCallSyncHook ||\n !!(global as localGlobal).__REMOTEDEV__) &&\n !(global as localGlobal).RN$Bridgeless\n );\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function isAndroid(): boolean {\n return Platform.OS === 'android';\n}\n\nfunction isWindows(): boolean {\n return Platform.OS === 'windows';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb() || isWindows();\n}\n\nexport function isFabric() {\n return !!(global as localGlobal)._IS_FABRIC;\n}\n\nexport function isWindowAvailable() {\n // the window object is unavailable when building the server portion of a site that uses SSG\n // this function shouldn't be used to conditionally render components\n // https://www.joshwcomeau.com/react/the-perils-of-rehydration/\n // @ts-ignore Fallback if `window` is undefined.\n return typeof window !== 'undefined';\n}\n\nexport function isReducedMotion() {\n return isWeb()\n ? isWindowAvailable()\n ? // @ts-ignore Fallback if `window` is undefined.\n !window.matchMedia('(prefers-reduced-motion: no-preference)').matches\n : false\n : !!(global as localGlobal)._REANIMATED_IS_REDUCED_MOTION;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA
|
|
1
|
+
{"version":3,"names":["Platform","isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","RN$Bridgeless","isWeb","OS","isAndroid","isWindows","shouldBeUseWeb","isFabric","_IS_FABRIC","isWindowAvailable","window","isReducedMotion","matchMedia","matches","_REANIMATED_IS_REDUCED_MOTION"],"sources":["PlatformChecker.ts"],"sourcesContent":["'use strict';\nimport { Platform } from 'react-native';\n\n// This type is necessary since some libraries tend to do a lib check\n// and this file causes type errors on `global` access.\ntype localGlobal = typeof global & Record<string, unknown>;\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\n// `isChromeDebugger` also returns true in Jest environment, so `isJest()` check should always be performed first\nexport function isChromeDebugger(): boolean {\n return (\n (!(global as localGlobal).nativeCallSyncHook ||\n !!(global as localGlobal).__REMOTEDEV__) &&\n !(global as localGlobal).RN$Bridgeless\n );\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function isAndroid(): boolean {\n return Platform.OS === 'android';\n}\n\nfunction isWindows(): boolean {\n return Platform.OS === 'windows';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb() || isWindows();\n}\n\nexport function isFabric() {\n return !!(global as localGlobal)._IS_FABRIC;\n}\n\nexport function isWindowAvailable() {\n // the window object is unavailable when building the server portion of a site that uses SSG\n // this function shouldn't be used to conditionally render components\n // https://www.joshwcomeau.com/react/the-perils-of-rehydration/\n // @ts-ignore Fallback if `window` is undefined.\n return typeof window !== 'undefined';\n}\n\nexport function isReducedMotion() {\n return isWeb()\n ? isWindowAvailable()\n ? // @ts-ignore Fallback if `window` is undefined.\n !window.matchMedia('(prefers-reduced-motion: no-preference)').matches\n : false\n : !!(global as localGlobal)._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 @@ import { addWhitelistedNativeProps } from '../ConfigHelper';
|
|
|
6
6
|
|
|
7
7
|
export function createAnimatedPropAdapter(adapter, nativeProps) {
|
|
8
8
|
const nativePropsToAdd = {};
|
|
9
|
-
nativeProps === null || nativeProps === void 0
|
|
9
|
+
nativeProps === null || nativeProps === void 0 || nativeProps.forEach(prop => {
|
|
10
10
|
nativePropsToAdd[prop] = true;
|
|
11
11
|
});
|
|
12
12
|
addWhitelistedNativeProps(nativePropsToAdd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addWhitelistedNativeProps","createAnimatedPropAdapter","adapter","nativeProps","nativePropsToAdd","forEach","prop"],"sources":["PropAdapters.ts"],"sourcesContent":["'use strict';\nimport { addWhitelistedNativeProps } from '../ConfigHelper';\nimport type {\n AnimatedPropsAdapterFunction,\n AnimatedPropsAdapterWorklet,\n} from './commonTypes';\n\n// @ts-expect-error This overload is required by our API.\nexport function createAnimatedPropAdapter(\n adapter: AnimatedPropsAdapterFunction,\n nativeProps?: string[]\n): AnimatedPropsAdapterFunction;\n\nexport function createAnimatedPropAdapter(\n adapter: AnimatedPropsAdapterWorklet,\n nativeProps?: string[]\n): AnimatedPropsAdapterWorklet {\n const nativePropsToAdd: { [key: string]: boolean } = {};\n nativeProps?.forEach((prop) => {\n nativePropsToAdd[prop] = true;\n });\n addWhitelistedNativeProps(nativePropsToAdd);\n return adapter;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,yBAAyB,QAAQ,iBAAiB;;AAM3D;;AAMA,OAAO,SAASC,yBAAyBA,CACvCC,OAAoC,EACpCC,WAAsB,EACO;EAC7B,MAAMC,gBAA4C,GAAG,CAAC,CAAC;EACvDD,WAAW,aAAXA,WAAW,
|
|
1
|
+
{"version":3,"names":["addWhitelistedNativeProps","createAnimatedPropAdapter","adapter","nativeProps","nativePropsToAdd","forEach","prop"],"sources":["PropAdapters.ts"],"sourcesContent":["'use strict';\nimport { addWhitelistedNativeProps } from '../ConfigHelper';\nimport type {\n AnimatedPropsAdapterFunction,\n AnimatedPropsAdapterWorklet,\n} from './commonTypes';\n\n// @ts-expect-error This overload is required by our API.\nexport function createAnimatedPropAdapter(\n adapter: AnimatedPropsAdapterFunction,\n nativeProps?: string[]\n): AnimatedPropsAdapterFunction;\n\nexport function createAnimatedPropAdapter(\n adapter: AnimatedPropsAdapterWorklet,\n nativeProps?: string[]\n): AnimatedPropsAdapterWorklet {\n const nativePropsToAdd: { [key: string]: boolean } = {};\n nativeProps?.forEach((prop) => {\n nativePropsToAdd[prop] = true;\n });\n addWhitelistedNativeProps(nativePropsToAdd);\n return adapter;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,yBAAyB,QAAQ,iBAAiB;;AAM3D;;AAMA,OAAO,SAASC,yBAAyBA,CACvCC,OAAoC,EACpCC,WAAsB,EACO;EAC7B,MAAMC,gBAA4C,GAAG,CAAC,CAAC;EACvDD,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEE,OAAO,CAAEC,IAAI,IAAK;IAC7BF,gBAAgB,CAACE,IAAI,CAAC,GAAG,IAAI;EAC/B,CAAC,CAAC;EACFN,yBAAyB,CAACI,gBAAgB,CAAC;EAC3C,OAAOF,OAAO;AAChB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isFabric","runOnUI","VIEW_TAGS","removeFromPropsRegistry","viewTag","push","length","queueMicrotask","flush","__DEV__","Error","removeFromPropsRegistryOnUI","viewTags","global","_removeFromPropsRegistry"],"sources":["PropsRegistry.ts"],"sourcesContent":["'use strict';\nimport { isFabric } from './PlatformChecker';\nimport { runOnUI } from './threads';\n\nlet VIEW_TAGS: number[] = [];\n\nexport function removeFromPropsRegistry(viewTag: number) {\n VIEW_TAGS.push(viewTag);\n if (VIEW_TAGS.length === 1) {\n queueMicrotask(flush);\n }\n}\n\nfunction flush() {\n if (__DEV__ && !isFabric()) {\n throw new Error('[Reanimated] PropsRegistry is only available on Fabric.');\n }\n runOnUI(removeFromPropsRegistryOnUI)(VIEW_TAGS);\n VIEW_TAGS = [];\n}\n\nfunction removeFromPropsRegistryOnUI(viewTags: number[]) {\n 'worklet';\n global._removeFromPropsRegistry(viewTags);\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,QAAQ,WAAW;AAEnC,IAAIC,SAAmB,GAAG,EAAE;AAE5B,OAAO,SAASC,uBAAuBA,CAACC,OAAe,EAAE;EACvDF,SAAS,CAACG,IAAI,CAACD,OAAO,CAAC;EACvB,IAAIF,SAAS,CAACI,MAAM,KAAK,CAAC,EAAE;IAC1BC,cAAc,CAACC,KAAK,CAAC;EACvB;AACF;AAEA,SAASA,KAAKA,CAAA,EAAG;EACf,IAAIC,OAAO,IAAI,CAACT,QAAQ,
|
|
1
|
+
{"version":3,"names":["isFabric","runOnUI","VIEW_TAGS","removeFromPropsRegistry","viewTag","push","length","queueMicrotask","flush","__DEV__","Error","removeFromPropsRegistryOnUI","viewTags","global","_removeFromPropsRegistry"],"sources":["PropsRegistry.ts"],"sourcesContent":["'use strict';\nimport { isFabric } from './PlatformChecker';\nimport { runOnUI } from './threads';\n\nlet VIEW_TAGS: number[] = [];\n\nexport function removeFromPropsRegistry(viewTag: number) {\n VIEW_TAGS.push(viewTag);\n if (VIEW_TAGS.length === 1) {\n queueMicrotask(flush);\n }\n}\n\nfunction flush() {\n if (__DEV__ && !isFabric()) {\n throw new Error('[Reanimated] PropsRegistry is only available on Fabric.');\n }\n runOnUI(removeFromPropsRegistryOnUI)(VIEW_TAGS);\n VIEW_TAGS = [];\n}\n\nfunction removeFromPropsRegistryOnUI(viewTags: number[]) {\n 'worklet';\n global._removeFromPropsRegistry(viewTags);\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,QAAQ,WAAW;AAEnC,IAAIC,SAAmB,GAAG,EAAE;AAE5B,OAAO,SAASC,uBAAuBA,CAACC,OAAe,EAAE;EACvDF,SAAS,CAACG,IAAI,CAACD,OAAO,CAAC;EACvB,IAAIF,SAAS,CAACI,MAAM,KAAK,CAAC,EAAE;IAC1BC,cAAc,CAACC,KAAK,CAAC;EACvB;AACF;AAEA,SAASA,KAAKA,CAAA,EAAG;EACf,IAAIC,OAAO,IAAI,CAACT,QAAQ,CAAC,CAAC,EAAE;IAC1B,MAAM,IAAIU,KAAK,CAAC,yDAAyD,CAAC;EAC5E;EACAT,OAAO,CAACU,2BAA2B,CAAC,CAACT,SAAS,CAAC;EAC/CA,SAAS,GAAG,EAAE;AAChB;AAEA,SAASS,2BAA2BA,CAACC,QAAkB,EAAE;EACvD,SAAS;;EACTC,MAAM,CAACC,wBAAwB,CAACF,QAAQ,CAAC;AAC3C","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import NativeReanimatedModule from './NativeReanimated';
|
|
7
7
|
import { SensorType } from './commonTypes';
|
|
8
8
|
import { makeMutable } from './mutables';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","NativeReanimatedModule","SensorType","makeMutable","initSensorData","sensorType","ROTATION","qw","qx","qy","qz","yaw","pitch","roll","interfaceOrientation","x","y","z","Sensor","constructor","config","data","register","eventHandler","sensorId","registerSensor","interval","iosReferenceFrame","isRunning","isAvailable","getSharedValue","unregister","unregisterSensor"],"sources":["Sensor.ts"],"sourcesContent":["'use strict';\nimport NativeReanimatedModule from './NativeReanimated';\nimport type {\n SensorConfig,\n SharedValue,\n Value3D,\n ValueRotation,\n ShareableRef,\n} from './commonTypes';\nimport { SensorType } from './commonTypes';\nimport { makeMutable } from './mutables';\n\nfunction initSensorData(\n sensorType: SensorType\n): SharedValue<Value3D | ValueRotation> {\n if (sensorType === SensorType.ROTATION) {\n return makeMutable<Value3D | ValueRotation>({\n qw: 0,\n qx: 0,\n qy: 0,\n qz: 0,\n yaw: 0,\n pitch: 0,\n roll: 0,\n interfaceOrientation: 0,\n });\n } else {\n return makeMutable<Value3D | ValueRotation>({\n x: 0,\n y: 0,\n z: 0,\n interfaceOrientation: 0,\n });\n }\n}\n\nexport default class Sensor {\n public listenersNumber = 0;\n private sensorId: number | null = null;\n private sensorType: SensorType;\n private data: SharedValue<Value3D | ValueRotation>;\n private config: SensorConfig;\n\n constructor(sensorType: SensorType, config: SensorConfig) {\n this.sensorType = sensorType;\n this.config = config;\n this.data = initSensorData(sensorType);\n }\n\n register(\n eventHandler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ) {\n const config = this.config;\n const sensorType = this.sensorType;\n this.sensorId = NativeReanimatedModule.registerSensor(\n sensorType,\n config.interval === 'auto' ? -1 : config.interval,\n config.iosReferenceFrame,\n eventHandler\n );\n return this.sensorId !== -1;\n }\n\n isRunning() {\n return this.sensorId !== -1 && this.sensorId !== null;\n }\n\n isAvailable() {\n return this.sensorId !== -1;\n }\n\n getSharedValue() {\n return this.data;\n }\n\n unregister() {\n if (this.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K,CAAC,CAAC,EAAE;MAClDvB,sBAAsB,CAAC+B,gBAAgB,CAAC,IAAI,CAACR,QAAQ,CAAC;IACxD;IACA,IAAI,CAACA,QAAQ,GAAG,IAAI;EACtB;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import Sensor from './Sensor';
|
|
7
7
|
export class SensorContainer {
|
|
8
8
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","Sensor","SensorContainer","constructor","Map","getSensorId","sensorType","config","iosReferenceFrame","adjustToInterfaceOrientation","initializeSensor","sensorId","nativeSensors","has","newSensor","set","sensor","get","getSharedValue","registerSensor","handler","isAvailable","isRunning","register","listenersNumber","unregisterSensor","unregister"],"sources":["SensorContainer.ts"],"sourcesContent":["'use strict';\nimport type {\n SensorType,\n SensorConfig,\n Value3D,\n ValueRotation,\n ShareableRef,\n SharedValue,\n} from './commonTypes';\nimport Sensor from './Sensor';\n\nexport class SensorContainer {\n private nativeSensors: Map<number, Sensor> = new Map();\n\n getSensorId(sensorType: SensorType, config: SensorConfig) {\n return (\n sensorType * 100 +\n config.iosReferenceFrame * 10 +\n Number(config.adjustToInterfaceOrientation)\n );\n }\n\n initializeSensor(\n sensorType: SensorType,\n config: SensorConfig\n ): SharedValue<Value3D | ValueRotation> {\n const sensorId = this.getSensorId(sensorType, config);\n\n if (!this.nativeSensors.has(sensorId)) {\n const newSensor = new Sensor(sensorType, config);\n this.nativeSensors.set(sensorId, newSensor);\n }\n\n const sensor = this.nativeSensors.get(sensorId);\n return sensor!.getSharedValue();\n }\n\n registerSensor(\n sensorType: SensorType,\n config: SensorConfig,\n handler: ShareableRef<(data: Value3D | ValueRotation) => void>\n ): number {\n const sensorId = this.getSensorId(sensorType, config);\n\n if (!this.nativeSensors.has(sensorId)) {\n return -1;\n }\n\n const sensor = this.nativeSensors.get(sensorId);\n if (\n sensor &&\n sensor.isAvailable() &&\n (sensor.isRunning() || sensor.register(handler))\n ) {\n sensor.listenersNumber++;\n return sensorId;\n }\n return -1;\n }\n\n unregisterSensor(sensorId: number) {\n if (this.nativeSensors.has(sensorId)) {\n const sensor = this.nativeSensors.get(sensorId);\n if (sensor && sensor.isRunning()) {\n sensor.listenersNumber--;\n if (sensor.listenersNumber === 0) {\n sensor.unregister();\n }\n }\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,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AAU,EAAEC,MAAM,CAAC;IAErD,IAAI,CAAC,IAAI,CAACK,aAAa,CAACC,GAAG,CAACF,QAAQ,CAAC,EAAE;MACrC,OAAO,CAAC,CAAC;IACX;IAEA,MAAMK,MAAM,GAAG,IAAI,CAACJ,aAAa,CAACK,GAAG,CAACN,QAAQ,CAAC;IAC/C,IACEK,MAAM,IACNA,MAAM,CAACK,WAAW,CAAC,CAAC,KACnBL,MAAM,CAACM,SAAS,CAAC,CAAC,IAAIN,MAAM,CAACO,QAAQ,CAACH,OAAO,CAAC,CAAC,EAChD;MACAJ,MAAM,CAACQ,eAAe,EAAE;MACxB,OAAOb,QAAQ;IACjB;IACA,OAAO,CAAC,CAAC;EACX;EAEAc,gBAAgBA,CAACd,QAAgB,EAAE;IACjC,IAAI,IAAI,CAACC,aAAa,CAACC,GAAG,CAACF,QAAQ,CAAC,EAAE;MACpC,MAAMK,MAAM,GAAG,IAAI,CAACJ,aAAa,CAACK,GAAG,CAACN,QAAQ,CAAC;MAC/C,IAAIK,MAAM,IAAIA,MAAM,CAACM,SAAS,CAAC,CAAC,EAAE;QAChCN,MAAM,CAACQ,eAAe,EAAE;QACxB,IAAIR,MAAM,CAACQ,eAAe,KAAK,CAAC,EAAE;UAChCR,MAAM,CAACU,UAAU,CAAC,CAAC;QACrB;MACF;IACF;EACF;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["shouldBeUseWeb","configureLayoutAnimationBatch","makeShareableCloneRecursive","createUpdateManager","animations","deferredAnimations","update","batchItem","isUnmounting","push","length","setImmediate","flush","concat","updateLayoutAnimations","updateLayoutAnimationsManager","viewTag","type","config","sharedTransitionTag","undefined"],"sources":["UpdateLayoutAnimations.ts"],"sourcesContent":["'use strict';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport {\n configureLayoutAnimationBatch,\n makeShareableCloneRecursive,\n} from './core';\nimport type {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from './layoutReanimation';\nimport type {\n LayoutAnimationBatchItem,\n ProgressAnimationCallback,\n SharedTransitionAnimationsFunction,\n} from './layoutReanimation/animationBuilder/commonTypes';\n\nfunction createUpdateManager() {\n const animations: LayoutAnimationBatchItem[] = [];\n // When a stack is rerendered we reconfigure all the shared elements.\n // To do that we want them to appear in our batch in the correct order,\n // so we defer some of the updates to appear at the end of the batch.\n const deferredAnimations: LayoutAnimationBatchItem[] = [];\n\n return {\n update(batchItem: LayoutAnimationBatchItem, isUnmounting?: boolean) {\n if (isUnmounting) {\n deferredAnimations.push(batchItem);\n } else {\n animations.push(batchItem);\n }\n if (animations.length + deferredAnimations.length === 1) {\n setImmediate(this.flush);\n }\n },\n flush(this: void) {\n configureLayoutAnimationBatch(animations.concat(deferredAnimations));\n animations.length = 0;\n deferredAnimations.length = 0;\n },\n };\n}\n\n/**\n * Lets you update the current configuration of the layout animation or shared element transition for a given component.\n * Configurations are batched and applied at the end of the current execution block, right before sending the response back to native.\n *\n * @param viewTag - The tag of the component you'd like to configure.\n * @param type - The type of the animation you'd like to configure - {@link LayoutAnimationType}.\n * @param config - The animation configuration - {@link LayoutAnimationFunction}, {@link SharedTransitionAnimationsFunction}, {@link ProgressAnimationCallback} or {@link Keyframe}. Passing `undefined` will remove the animation.\n * @param sharedTransitionTag - The tag of the shared element transition you'd like to configure. Passing `undefined` will remove the transition.\n * @param isUnmounting - Determines whether the configuration should be included at the end of the batch, after all the non-deferred configurations (even those that were updated later). This is used to retain the correct ordering of shared elements. Defaults to `false`.\n */\nexport let updateLayoutAnimations: (\n viewTag: number,\n type: LayoutAnimationType,\n config?:\n | Keyframe\n | LayoutAnimationFunction\n | SharedTransitionAnimationsFunction\n | ProgressAnimationCallback,\n sharedTransitionTag?: string,\n isUnmounting?: boolean\n) => void;\n\nif (shouldBeUseWeb()) {\n updateLayoutAnimations = () => {\n // no-op\n };\n} else {\n const updateLayoutAnimationsManager = createUpdateManager();\n updateLayoutAnimations = (\n viewTag,\n type,\n config,\n sharedTransitionTag,\n isUnmounting\n ) =>\n updateLayoutAnimationsManager.update(\n {\n viewTag,\n type,\n config: config ? makeShareableCloneRecursive(config) : undefined,\n sharedTransitionTag,\n },\n isUnmounting\n );\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,cAAc,QAAQ,mBAAmB;AAClD,SACEC,6BAA6B,EAC7BC,2BAA2B,QACtB,QAAQ;AAWf,SAASC,mBAAmBA,CAAA,EAAG;EAC7B,MAAMC,UAAsC,GAAG,EAAE;EACjD;EACA;EACA;EACA,MAAMC,kBAA8C,GAAG,EAAE;EAEzD,OAAO;IACLC,MAAMA,CAACC,SAAmC,EAAEC,YAAsB,EAAE;MAClE,IAAIA,YAAY,EAAE;QAChBH,kBAAkB,CAACI,IAAI,CAACF,SAAS,CAAC;MACpC,CAAC,MAAM;QACLH,UAAU,CAACK,IAAI,CAACF,SAAS,CAAC;MAC5B;MACA,IAAIH,UAAU,CAACM,MAAM,GAAGL,kBAAkB,CAACK,MAAM,KAAK,CAAC,EAAE;QACvDC,YAAY,CAAC,IAAI,CAACC,KAAK,CAAC;MAC1B;IACF,CAAC;IACDA,KAAKA,CAAA,EAAa;MAChBX,6BAA6B,CAACG,UAAU,CAACS,MAAM,CAACR,kBAAkB,CAAC,CAAC;MACpED,UAAU,CAACM,MAAM,GAAG,CAAC;MACrBL,kBAAkB,CAACK,MAAM,GAAG,CAAC;IAC/B;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAII,sBAUF;AAET,IAAId,cAAc,
|
|
1
|
+
{"version":3,"names":["shouldBeUseWeb","configureLayoutAnimationBatch","makeShareableCloneRecursive","createUpdateManager","animations","deferredAnimations","update","batchItem","isUnmounting","push","length","setImmediate","flush","concat","updateLayoutAnimations","updateLayoutAnimationsManager","viewTag","type","config","sharedTransitionTag","undefined"],"sources":["UpdateLayoutAnimations.ts"],"sourcesContent":["'use strict';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport {\n configureLayoutAnimationBatch,\n makeShareableCloneRecursive,\n} from './core';\nimport type {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from './layoutReanimation';\nimport type {\n LayoutAnimationBatchItem,\n ProgressAnimationCallback,\n SharedTransitionAnimationsFunction,\n} from './layoutReanimation/animationBuilder/commonTypes';\n\nfunction createUpdateManager() {\n const animations: LayoutAnimationBatchItem[] = [];\n // When a stack is rerendered we reconfigure all the shared elements.\n // To do that we want them to appear in our batch in the correct order,\n // so we defer some of the updates to appear at the end of the batch.\n const deferredAnimations: LayoutAnimationBatchItem[] = [];\n\n return {\n update(batchItem: LayoutAnimationBatchItem, isUnmounting?: boolean) {\n if (isUnmounting) {\n deferredAnimations.push(batchItem);\n } else {\n animations.push(batchItem);\n }\n if (animations.length + deferredAnimations.length === 1) {\n setImmediate(this.flush);\n }\n },\n flush(this: void) {\n configureLayoutAnimationBatch(animations.concat(deferredAnimations));\n animations.length = 0;\n deferredAnimations.length = 0;\n },\n };\n}\n\n/**\n * Lets you update the current configuration of the layout animation or shared element transition for a given component.\n * Configurations are batched and applied at the end of the current execution block, right before sending the response back to native.\n *\n * @param viewTag - The tag of the component you'd like to configure.\n * @param type - The type of the animation you'd like to configure - {@link LayoutAnimationType}.\n * @param config - The animation configuration - {@link LayoutAnimationFunction}, {@link SharedTransitionAnimationsFunction}, {@link ProgressAnimationCallback} or {@link Keyframe}. Passing `undefined` will remove the animation.\n * @param sharedTransitionTag - The tag of the shared element transition you'd like to configure. Passing `undefined` will remove the transition.\n * @param isUnmounting - Determines whether the configuration should be included at the end of the batch, after all the non-deferred configurations (even those that were updated later). This is used to retain the correct ordering of shared elements. Defaults to `false`.\n */\nexport let updateLayoutAnimations: (\n viewTag: number,\n type: LayoutAnimationType,\n config?:\n | Keyframe\n | LayoutAnimationFunction\n | SharedTransitionAnimationsFunction\n | ProgressAnimationCallback,\n sharedTransitionTag?: string,\n isUnmounting?: boolean\n) => void;\n\nif (shouldBeUseWeb()) {\n updateLayoutAnimations = () => {\n // no-op\n };\n} else {\n const updateLayoutAnimationsManager = createUpdateManager();\n updateLayoutAnimations = (\n viewTag,\n type,\n config,\n sharedTransitionTag,\n isUnmounting\n ) =>\n updateLayoutAnimationsManager.update(\n {\n viewTag,\n type,\n config: config ? makeShareableCloneRecursive(config) : undefined,\n sharedTransitionTag,\n },\n isUnmounting\n );\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,cAAc,QAAQ,mBAAmB;AAClD,SACEC,6BAA6B,EAC7BC,2BAA2B,QACtB,QAAQ;AAWf,SAASC,mBAAmBA,CAAA,EAAG;EAC7B,MAAMC,UAAsC,GAAG,EAAE;EACjD;EACA;EACA;EACA,MAAMC,kBAA8C,GAAG,EAAE;EAEzD,OAAO;IACLC,MAAMA,CAACC,SAAmC,EAAEC,YAAsB,EAAE;MAClE,IAAIA,YAAY,EAAE;QAChBH,kBAAkB,CAACI,IAAI,CAACF,SAAS,CAAC;MACpC,CAAC,MAAM;QACLH,UAAU,CAACK,IAAI,CAACF,SAAS,CAAC;MAC5B;MACA,IAAIH,UAAU,CAACM,MAAM,GAAGL,kBAAkB,CAACK,MAAM,KAAK,CAAC,EAAE;QACvDC,YAAY,CAAC,IAAI,CAACC,KAAK,CAAC;MAC1B;IACF,CAAC;IACDA,KAAKA,CAAA,EAAa;MAChBX,6BAA6B,CAACG,UAAU,CAACS,MAAM,CAACR,kBAAkB,CAAC,CAAC;MACpED,UAAU,CAACM,MAAM,GAAG,CAAC;MACrBL,kBAAkB,CAACK,MAAM,GAAG,CAAC;IAC/B;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAII,sBAUF;AAET,IAAId,cAAc,CAAC,CAAC,EAAE;EACpBc,sBAAsB,GAAGA,CAAA,KAAM;IAC7B;EAAA,CACD;AACH,CAAC,MAAM;EACL,MAAMC,6BAA6B,GAAGZ,mBAAmB,CAAC,CAAC;EAC3DW,sBAAsB,GAAGA,CACvBE,OAAO,EACPC,IAAI,EACJC,MAAM,EACNC,mBAAmB,EACnBX,YAAY,KAEZO,6BAA6B,CAACT,MAAM,CAClC;IACEU,OAAO;IACPC,IAAI;IACJC,MAAM,EAAEA,MAAM,GAAGhB,2BAA2B,CAACgB,MAAM,CAAC,GAAGE,SAAS;IAChED;EACF,CAAC,EACDX,YACF,CAAC;AACL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["processColorsInProps","_updatePropsJS","isFabric","isJest","shouldBeUseWeb","runOnUIImmediately","updateProps","_","updates","maybeViewRef","isAnimatedProps","items","forEach","item","_index","viewDescriptors","global","UpdatePropsManager","update","updatePropsJestWrapper","animatedStyle","adapters","adapter","current","value","createUpdatePropsManager","operations","viewDescriptor","push","shadowNodeWrapper","length","queueMicrotask","flush","_updatePropsFabric","tag","name","_updatePropsPaper","maybeThrowError","Error","Proxy","get","set"],"sources":["UpdateProps.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n'use strict';\nimport type { MutableRefObject } from 'react';\nimport { processColorsInProps } from './Colors';\nimport type { ShadowNodeWrapper, SharedValue, StyleProps } from './commonTypes';\nimport type { AnimatedStyle } from './helperTypes';\nimport type { Descriptor } from './hook/commonTypes';\nimport { _updatePropsJS } from './js-reanimated';\nimport { isFabric, isJest, shouldBeUseWeb } from './PlatformChecker';\nimport type { ViewRefSet } from './ViewDescriptorsSet';\nimport { runOnUIImmediately } from './threads';\n\nlet updateProps: (\n viewDescriptor: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>,\n maybeViewRef: ViewRefSet<any> | undefined,\n isAnimatedProps?: boolean\n) => void;\n\nif (shouldBeUseWeb()) {\n updateProps = (_, updates, maybeViewRef, isAnimatedProps) => {\n 'worklet';\n if (maybeViewRef) {\n maybeViewRef.items.forEach((item, _index) => {\n _updatePropsJS(updates, item, isAnimatedProps);\n });\n }\n };\n} else {\n updateProps = (viewDescriptors, updates) => {\n 'worklet';\n processColorsInProps(updates);\n global.UpdatePropsManager.update(viewDescriptors, updates);\n };\n}\n\nexport const updatePropsJestWrapper = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: AnimatedStyle<any>,\n maybeViewRef: ViewRefSet<any> | undefined,\n animatedStyle: MutableRefObject<AnimatedStyle<any>>,\n adapters: ((updates: AnimatedStyle<any>) => void)[]\n): void => {\n adapters.forEach((adapter) => {\n adapter(updates);\n });\n animatedStyle.current.value = {\n ...animatedStyle.current.value,\n ...updates,\n };\n\n updateProps(viewDescriptors, updates, maybeViewRef);\n};\n\nexport default updateProps;\n\nconst createUpdatePropsManager = isFabric()\n ? () => {\n 'worklet';\n // Fabric\n const operations: {\n shadowNodeWrapper: ShadowNodeWrapper;\n updates: StyleProps | AnimatedStyle<any>;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n shadowNodeWrapper: viewDescriptor.shadowNodeWrapper,\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush(this: void) {\n global._updatePropsFabric!(operations);\n operations.length = 0;\n },\n };\n }\n : () => {\n 'worklet';\n // Paper\n const operations: {\n tag: number;\n name: string;\n updates: StyleProps | AnimatedStyle<any>;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n tag: viewDescriptor.tag,\n name: viewDescriptor.name || 'RCTView',\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush(this: void) {\n global._updatePropsPaper!(operations);\n operations.length = 0;\n },\n };\n };\n\nif (shouldBeUseWeb()) {\n const maybeThrowError = () => {\n // Jest attempts to access a property of this object to check if it is a Jest mock\n // so we can't throw an error in the getter.\n if (!isJest()) {\n throw new Error(\n '[Reanimated] `UpdatePropsManager` is not available on non-native platform.'\n );\n }\n };\n global.UpdatePropsManager = new Proxy({} as UpdatePropsManager, {\n get: maybeThrowError,\n set: () => {\n maybeThrowError();\n return false;\n },\n });\n} else {\n runOnUIImmediately(() => {\n 'worklet';\n global.UpdatePropsManager = createUpdatePropsManager();\n })();\n}\n\nexport interface UpdatePropsManager {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ): void;\n flush(): void;\n}\n"],"mappings":"AAAA;AACA,YAAY;;AAEZ,SAASA,oBAAoB,QAAQ,UAAU;AAI/C,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,cAAc,QAAQ,mBAAmB;AAEpE,SAASC,kBAAkB,QAAQ,WAAW;AAE9C,IAAIC,WAKK;AAET,IAAIF,cAAc,
|
|
1
|
+
{"version":3,"names":["processColorsInProps","_updatePropsJS","isFabric","isJest","shouldBeUseWeb","runOnUIImmediately","updateProps","_","updates","maybeViewRef","isAnimatedProps","items","forEach","item","_index","viewDescriptors","global","UpdatePropsManager","update","updatePropsJestWrapper","animatedStyle","adapters","adapter","current","value","createUpdatePropsManager","operations","viewDescriptor","push","shadowNodeWrapper","length","queueMicrotask","flush","_updatePropsFabric","tag","name","_updatePropsPaper","maybeThrowError","Error","Proxy","get","set"],"sources":["UpdateProps.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n'use strict';\nimport type { MutableRefObject } from 'react';\nimport { processColorsInProps } from './Colors';\nimport type { ShadowNodeWrapper, SharedValue, StyleProps } from './commonTypes';\nimport type { AnimatedStyle } from './helperTypes';\nimport type { Descriptor } from './hook/commonTypes';\nimport { _updatePropsJS } from './js-reanimated';\nimport { isFabric, isJest, shouldBeUseWeb } from './PlatformChecker';\nimport type { ViewRefSet } from './ViewDescriptorsSet';\nimport { runOnUIImmediately } from './threads';\n\nlet updateProps: (\n viewDescriptor: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>,\n maybeViewRef: ViewRefSet<any> | undefined,\n isAnimatedProps?: boolean\n) => void;\n\nif (shouldBeUseWeb()) {\n updateProps = (_, updates, maybeViewRef, isAnimatedProps) => {\n 'worklet';\n if (maybeViewRef) {\n maybeViewRef.items.forEach((item, _index) => {\n _updatePropsJS(updates, item, isAnimatedProps);\n });\n }\n };\n} else {\n updateProps = (viewDescriptors, updates) => {\n 'worklet';\n processColorsInProps(updates);\n global.UpdatePropsManager.update(viewDescriptors, updates);\n };\n}\n\nexport const updatePropsJestWrapper = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: AnimatedStyle<any>,\n maybeViewRef: ViewRefSet<any> | undefined,\n animatedStyle: MutableRefObject<AnimatedStyle<any>>,\n adapters: ((updates: AnimatedStyle<any>) => void)[]\n): void => {\n adapters.forEach((adapter) => {\n adapter(updates);\n });\n animatedStyle.current.value = {\n ...animatedStyle.current.value,\n ...updates,\n };\n\n updateProps(viewDescriptors, updates, maybeViewRef);\n};\n\nexport default updateProps;\n\nconst createUpdatePropsManager = isFabric()\n ? () => {\n 'worklet';\n // Fabric\n const operations: {\n shadowNodeWrapper: ShadowNodeWrapper;\n updates: StyleProps | AnimatedStyle<any>;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n shadowNodeWrapper: viewDescriptor.shadowNodeWrapper,\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush(this: void) {\n global._updatePropsFabric!(operations);\n operations.length = 0;\n },\n };\n }\n : () => {\n 'worklet';\n // Paper\n const operations: {\n tag: number;\n name: string;\n updates: StyleProps | AnimatedStyle<any>;\n }[] = [];\n return {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ) {\n viewDescriptors.value.forEach((viewDescriptor) => {\n operations.push({\n tag: viewDescriptor.tag,\n name: viewDescriptor.name || 'RCTView',\n updates,\n });\n if (operations.length === 1) {\n queueMicrotask(this.flush);\n }\n });\n },\n flush(this: void) {\n global._updatePropsPaper!(operations);\n operations.length = 0;\n },\n };\n };\n\nif (shouldBeUseWeb()) {\n const maybeThrowError = () => {\n // Jest attempts to access a property of this object to check if it is a Jest mock\n // so we can't throw an error in the getter.\n if (!isJest()) {\n throw new Error(\n '[Reanimated] `UpdatePropsManager` is not available on non-native platform.'\n );\n }\n };\n global.UpdatePropsManager = new Proxy({} as UpdatePropsManager, {\n get: maybeThrowError,\n set: () => {\n maybeThrowError();\n return false;\n },\n });\n} else {\n runOnUIImmediately(() => {\n 'worklet';\n global.UpdatePropsManager = createUpdatePropsManager();\n })();\n}\n\nexport interface UpdatePropsManager {\n update(\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle<any>\n ): void;\n flush(): void;\n}\n"],"mappings":"AAAA;AACA,YAAY;;AAEZ,SAASA,oBAAoB,QAAQ,UAAU;AAI/C,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,cAAc,QAAQ,mBAAmB;AAEpE,SAASC,kBAAkB,QAAQ,WAAW;AAE9C,IAAIC,WAKK;AAET,IAAIF,cAAc,CAAC,CAAC,EAAE;EACpBE,WAAW,GAAGA,CAACC,CAAC,EAAEC,OAAO,EAAEC,YAAY,EAAEC,eAAe,KAAK;IAC3D,SAAS;;IACT,IAAID,YAAY,EAAE;MAChBA,YAAY,CAACE,KAAK,CAACC,OAAO,CAAC,CAACC,IAAI,EAAEC,MAAM,KAAK;QAC3Cb,cAAc,CAACO,OAAO,EAAEK,IAAI,EAAEH,eAAe,CAAC;MAChD,CAAC,CAAC;IACJ;EACF,CAAC;AACH,CAAC,MAAM;EACLJ,WAAW,GAAGA,CAACS,eAAe,EAAEP,OAAO,KAAK;IAC1C,SAAS;;IACTR,oBAAo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AAwC,EACxC;MACAO,eAAe,CAACS,KAAK,CAACZ,OAAO,CAAEe,cAAc,IAAK;QAChDD,UAAU,CAACE,IAAI,CAAC;UACdM,GAAG,EAAEP,cAAc,CAACO,GAAG;UACvBC,IAAI,EAAER,cAAc,CAACQ,IAAI,IAAI,SAAS;UACtC3B;QACF,CAAC,CAAC;QACF,IAAIkB,UAAU,CAACI,MAAM,KAAK,CAAC,EAAE;UAC3BC,cAAc,CAAC,IAAI,CAACC,KAAK,CAAC;QAC5B;MACF,CAAC,CAAC;IACJ,CAAC;IACDA,KAAKA,CAAA,EAAa;MAChBhB,MAAM,CAACoB,iBAAiB,CAAEV,UAAU,CAAC;MACrCA,UAAU,CAACI,MAAM,GAAG,CAAC;IACvB;EACF,CAAC;AACH,CAAC;AAEL,IAAI1B,cAAc,CAAC,CAAC,EAAE;EACpB,MAAMiC,eAAe,GAAGA,CAAA,KAAM;IAC5B;IACA;IACA,IAAI,CAAClC,MAAM,CAAC,CAAC,EAAE;MACb,MAAM,IAAImC,KAAK,CACb,4EACF,CAAC;IACH;EACF,CAAC;EACDtB,MAAM,CAACC,kBAAkB,GAAG,IAAIsB,KAAK,CAAC,CAAC,CAAC,EAAwB;IAC9DC,GAAG,EAAEH,eAAe;IACpBI,GAAG,EAAEA,CAAA,KAAM;MACTJ,eAAe,CAAC,CAAC;MACjB,OAAO,KAAK;IACd;EACF,CAAC,CAAC;AACJ,CAAC,MAAM;EACLhC,kBAAkB,CAAC,MAAM;IACvB,SAAS;;IACTW,MAAM,CAACC,kBAAkB,GAAGQ,wBAAwB,CAAC,CAAC;EACxD,CAAC,CAAC,CAAC,CAAC;AACN","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","makeMutable","shouldBeUseWeb","makeViewDescriptorsSet","shareableViewDescriptors","data","add","item","modify","descriptors","index","findIndex","descriptor","tag","push","remove","viewTag","splice","SHOULD_BE_USE_WEB","useViewRefSet","useViewRefSetJS","useViewRefSetNative","undefined","ref","current","items","Set","has","delete"],"sources":["ViewDescriptorsSet.ts"],"sourcesContent":["'use strict';\nimport { useRef } from 'react';\nimport { makeMutable } from './core';\nimport type { SharedValue } from './commonTypes';\nimport type { Descriptor } from './hook/commonTypes';\nimport { shouldBeUseWeb } from './PlatformChecker';\n\nexport interface ViewRefSet<T> {\n items: Set<T>;\n add: (item: T) => void;\n remove: (item: T) => void;\n}\n\nexport interface ViewDescriptorsSet {\n shareableViewDescriptors: SharedValue<Descriptor[]>;\n add: (item: Descriptor) => void;\n remove: (viewTag: number) => void;\n}\n\nexport function makeViewDescriptorsSet(): ViewDescriptorsSet {\n const shareableViewDescriptors = makeMutable<Descriptor[]>([]);\n const data: ViewDescriptorsSet = {\n shareableViewDescriptors,\n add: (item: Descriptor) => {\n shareableViewDescriptors.modify((descriptors) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === item.tag\n );\n if (index !== -1) {\n descriptors[index] = item;\n } else {\n descriptors.push(item);\n }\n return descriptors;\n }, false);\n },\n\n remove: (viewTag: number) => {\n shareableViewDescriptors.modify((descriptors) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === viewTag\n );\n if (index !== -1) {\n descriptors.splice(index, 1);\n }\n return descriptors;\n }, false);\n },\n };\n return data;\n}\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\nexport const useViewRefSet = SHOULD_BE_USE_WEB\n ? useViewRefSetJS\n : useViewRefSetNative;\n\nfunction useViewRefSetNative() {\n // Stub native implementation.\n return undefined;\n}\n\nfunction useViewRefSetJS<T>(): ViewRefSet<T> {\n const ref = useRef<ViewRefSet<T> | null>(null);\n if (ref.current === null) {\n const data: ViewRefSet<T> = {\n items: new Set(),\n\n add: (item: T) => {\n if (data.items.has(item)) return;\n data.items.add(item);\n },\n\n remove: (item: T) => {\n data.items.delete(item);\n },\n };\n ref.current = data;\n }\n\n return ref.current;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,WAAW,QAAQ,QAAQ;AAGpC,SAASC,cAAc,QAAQ,mBAAmB;AAclD,OAAO,SAASC,sBAAsBA,CAAA,EAAuB;EAC3D,MAAMC,wBAAwB,GAAGH,WAAW,CAAe,EAAE,CAAC;EAC9D,MAAMI,IAAwB,GAAG;IAC/BD,wBAAwB;IACxBE,GAAG,EAAGC,IAAgB,IAAK;MACzBH,wBAAwB,CAACI,MAAM,CAAEC,WAAW,IAAK;QAC/C,SAAS;;QACT,MAAMC,KAAK,GAAGD,WAAW,CAACE,SAAS,CAChCC,UAAU,IAAKA,UAAU,CAACC,GAAG,KAAKN,IAAI,CAACM,
|
|
1
|
+
{"version":3,"names":["useRef","makeMutable","shouldBeUseWeb","makeViewDescriptorsSet","shareableViewDescriptors","data","add","item","modify","descriptors","index","findIndex","descriptor","tag","push","remove","viewTag","splice","SHOULD_BE_USE_WEB","useViewRefSet","useViewRefSetJS","useViewRefSetNative","undefined","ref","current","items","Set","has","delete"],"sources":["ViewDescriptorsSet.ts"],"sourcesContent":["'use strict';\nimport { useRef } from 'react';\nimport { makeMutable } from './core';\nimport type { SharedValue } from './commonTypes';\nimport type { Descriptor } from './hook/commonTypes';\nimport { shouldBeUseWeb } from './PlatformChecker';\n\nexport interface ViewRefSet<T> {\n items: Set<T>;\n add: (item: T) => void;\n remove: (item: T) => void;\n}\n\nexport interface ViewDescriptorsSet {\n shareableViewDescriptors: SharedValue<Descriptor[]>;\n add: (item: Descriptor) => void;\n remove: (viewTag: number) => void;\n}\n\nexport function makeViewDescriptorsSet(): ViewDescriptorsSet {\n const shareableViewDescriptors = makeMutable<Descriptor[]>([]);\n const data: ViewDescriptorsSet = {\n shareableViewDescriptors,\n add: (item: Descriptor) => {\n shareableViewDescriptors.modify((descriptors) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === item.tag\n );\n if (index !== -1) {\n descriptors[index] = item;\n } else {\n descriptors.push(item);\n }\n return descriptors;\n }, false);\n },\n\n remove: (viewTag: number) => {\n shareableViewDescriptors.modify((descriptors) => {\n 'worklet';\n const index = descriptors.findIndex(\n (descriptor) => descriptor.tag === viewTag\n );\n if (index !== -1) {\n descriptors.splice(index, 1);\n }\n return descriptors;\n }, false);\n },\n };\n return data;\n}\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\nexport const useViewRefSet = SHOULD_BE_USE_WEB\n ? useViewRefSetJS\n : useViewRefSetNative;\n\nfunction useViewRefSetNative() {\n // Stub native implementation.\n return undefined;\n}\n\nfunction useViewRefSetJS<T>(): ViewRefSet<T> {\n const ref = useRef<ViewRefSet<T> | null>(null);\n if (ref.current === null) {\n const data: ViewRefSet<T> = {\n items: new Set(),\n\n add: (item: T) => {\n if (data.items.has(item)) return;\n data.items.add(item);\n },\n\n remove: (item: T) => {\n data.items.delete(item);\n },\n };\n ref.current = data;\n }\n\n return ref.current;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,WAAW,QAAQ,QAAQ;AAGpC,SAASC,cAAc,QAAQ,mBAAmB;AAclD,OAAO,SAASC,sBAAsBA,CAAA,EAAuB;EAC3D,MAAMC,wBAAwB,GAAGH,WAAW,CAAe,EAAE,CAAC;EAC9D,MAAMI,IAAwB,GAAG;IAC/BD,wBAAwB;IACxBE,GAAG,EAAGC,IAAgB,IAAK;MACzBH,wBAAwB,CAACI,MAAM,CAAEC,WAAW,IAAK;QAC/C,SAAS;;QACT,MAAMC,KAAK,GAAGD,WAAW,CAACE,SAAS,CAChCC,UAAU,IAAKA,UAAU,CAACC,GAAG,KAAKN,IAAI,CAACM,GAC1C,CAAC;QACD,IAAIH,KAAK,KAAK,CAAC,CAAC,EAAE;UAChBD,WAAW,CAACC,KAAK,CAAC,GAAGH,IAAI;QAC3B,CAAC,MAAM;UACLE,WAAW,CAACK,IAAI,CAACP,IAAI,CAAC;QACxB;QACA,OAAOE,WAAW;MACpB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
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
|
4
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
3
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
9
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
10
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
6
11
|
import { registerEventHandler, unregisterEventHandler } from './core';
|
|
7
12
|
import { shouldBeUseWeb } from './PlatformChecker';
|
|
8
13
|
const SHOULD_BE_USE_WEB = shouldBeUseWeb();
|
|
@@ -17,45 +22,83 @@ function jsListener(eventName, handler) {
|
|
|
17
22
|
});
|
|
18
23
|
};
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
var _viewTags = /*#__PURE__*/new WeakMap();
|
|
26
|
+
var _registrations = /*#__PURE__*/new WeakMap();
|
|
27
|
+
class WorkletEventHandlerNative {
|
|
28
|
+
// keys are viewTags, values are arrays of registration ID's for each viewTag
|
|
29
|
+
constructor(worklet, eventNames) {
|
|
24
30
|
_defineProperty(this, "eventNames", void 0);
|
|
25
|
-
_defineProperty(this, "
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "registrations", void 0);
|
|
31
|
+
_defineProperty(this, "worklet", void 0);
|
|
32
|
+
_classPrivateFieldInitSpec(this, _viewTags, void 0);
|
|
33
|
+
_classPrivateFieldInitSpec(this, _registrations, void 0);
|
|
29
34
|
this.worklet = worklet;
|
|
30
35
|
this.eventNames = eventNames;
|
|
31
|
-
this
|
|
32
|
-
this
|
|
33
|
-
this.viewTag = undefined;
|
|
34
|
-
this.registrations = [];
|
|
35
|
-
if (SHOULD_BE_USE_WEB) {
|
|
36
|
-
this.listeners = eventNames.reduce((acc, eventName) => {
|
|
37
|
-
acc[eventName] = jsListener(eventName, worklet);
|
|
38
|
-
return acc;
|
|
39
|
-
}, {});
|
|
40
|
-
}
|
|
36
|
+
_classPrivateFieldSet(_viewTags, this, new Set());
|
|
37
|
+
_classPrivateFieldSet(_registrations, this, new Map());
|
|
41
38
|
}
|
|
42
|
-
|
|
39
|
+
updateEventHandler(newWorklet, newEvents) {
|
|
40
|
+
// Update worklet and event names
|
|
43
41
|
this.worklet = newWorklet;
|
|
44
|
-
this.
|
|
42
|
+
this.eventNames = newEvents;
|
|
43
|
+
|
|
44
|
+
// Detach all events
|
|
45
|
+
_classPrivateFieldGet(_registrations, this).forEach(registrationIDs => {
|
|
46
|
+
registrationIDs.forEach(id => unregisterEventHandler(id));
|
|
47
|
+
// No need to remove registrationIDs from map, since it gets overwritten when attaching
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Attach new events with new worklet
|
|
51
|
+
Array.from(_classPrivateFieldGet(_viewTags, this)).forEach(tag => {
|
|
52
|
+
const newRegistrations = this.eventNames.map(eventName => registerEventHandler(this.worklet, eventName, tag));
|
|
53
|
+
_classPrivateFieldGet(_registrations, this).set(tag, newRegistrations);
|
|
54
|
+
});
|
|
45
55
|
}
|
|
46
56
|
registerForEvents(viewTag, fallbackEventName) {
|
|
47
|
-
this.viewTag
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
_classPrivateFieldGet(_viewTags, this).add(viewTag);
|
|
58
|
+
const newRegistrations = this.eventNames.map(eventName => registerEventHandler(this.worklet, eventName, viewTag));
|
|
59
|
+
_classPrivateFieldGet(_registrations, this).set(viewTag, newRegistrations);
|
|
60
|
+
if (this.eventNames.length === 0 && fallbackEventName) {
|
|
61
|
+
const newRegistration = registerEventHandler(this.worklet, fallbackEventName, viewTag);
|
|
62
|
+
_classPrivateFieldGet(_registrations, this).set(viewTag, [newRegistration]);
|
|
51
63
|
}
|
|
52
64
|
}
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
unregisterFromEvents(viewTag) {
|
|
66
|
+
var _classPrivateFieldGet2;
|
|
67
|
+
_classPrivateFieldGet(_viewTags, this).delete(viewTag);
|
|
68
|
+
(_classPrivateFieldGet2 = _classPrivateFieldGet(_registrations, this).get(viewTag)) === null || _classPrivateFieldGet2 === void 0 || _classPrivateFieldGet2.forEach(id => {
|
|
69
|
+
unregisterEventHandler(id);
|
|
70
|
+
});
|
|
71
|
+
_classPrivateFieldGet(_registrations, this).delete(viewTag);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class WorkletEventHandlerWeb {
|
|
75
|
+
constructor(worklet, eventNames = []) {
|
|
76
|
+
_defineProperty(this, "eventNames", void 0);
|
|
77
|
+
_defineProperty(this, "listeners", void 0);
|
|
78
|
+
_defineProperty(this, "worklet", void 0);
|
|
79
|
+
this.worklet = worklet;
|
|
80
|
+
this.eventNames = eventNames;
|
|
81
|
+
this.listeners = {};
|
|
82
|
+
this.setupWebListeners();
|
|
83
|
+
}
|
|
84
|
+
setupWebListeners() {
|
|
85
|
+
this.listeners = {};
|
|
86
|
+
this.eventNames.forEach(eventName => {
|
|
87
|
+
this.listeners[eventName] = jsListener(eventName, this.worklet);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
updateEventHandler(newWorklet, newEvents) {
|
|
91
|
+
// Update worklet and event names
|
|
92
|
+
this.worklet = newWorklet;
|
|
93
|
+
this.eventNames = newEvents;
|
|
94
|
+
this.setupWebListeners();
|
|
95
|
+
}
|
|
96
|
+
registerForEvents(_viewTag, _fallbackEventName) {
|
|
97
|
+
// noop
|
|
55
98
|
}
|
|
56
|
-
unregisterFromEvents() {
|
|
57
|
-
|
|
58
|
-
this.registrations = [];
|
|
99
|
+
unregisterFromEvents(_viewTag) {
|
|
100
|
+
// noop
|
|
59
101
|
}
|
|
60
102
|
}
|
|
103
|
+
export const WorkletEventHandler = SHOULD_BE_USE_WEB ? WorkletEventHandlerWeb : WorkletEventHandlerNative;
|
|
61
104
|
//# sourceMappingURL=WorkletEventHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_classPrivateFieldInitSpec","obj","privateMap","value","_checkPrivateRedeclaration","set","privateCollection","has","TypeError","_defineProperty","key","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","String","Number","_classPrivateFieldGet","s","a","get","_assertClassBrand","_classPrivateFieldSet","n","arguments","length","registerEventHandler","unregisterEventHandler","shouldBeUseWeb","SHOULD_BE_USE_WEB","jsListener","eventName","handler","evt","nativeEvent","_viewTags","WeakMap","_registrations","WorkletEventHandlerNative","constructor","worklet","eventNames","Set","Map","updateEventHandler","newWorklet","newEvents","forEach","registrationIDs","id","Array","from","tag","newRegistrations","map","registerForEvents","viewTag","fallbackEventName","add","newRegistration","unregisterFromEvents","_classPrivateFieldGet2","delete","WorkletEventHandlerWeb","listeners","setupWebListeners","_viewTag","_fallbackEventName","WorkletEventHandler"],"sources":["WorkletEventHandler.ts"],"sourcesContent":["'use strict';\nimport type { NativeSyntheticEvent } from 'react-native';\nimport { registerEventHandler, unregisterEventHandler } from './core';\nimport type {\n EventPayload,\n ReanimatedEvent,\n IWorkletEventHandler,\n} from './hook/commonTypes';\nimport { shouldBeUseWeb } from './PlatformChecker';\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\ntype JSEvent<Event extends object> = NativeSyntheticEvent<EventPayload<Event>>;\n\n// In JS implementation (e.g. for web) we don't use Reanimated's\n// event emitter, therefore we have to handle here\n// the event that came from React Native and convert it.\nfunction jsListener<Event extends object>(\n eventName: string,\n handler: (event: ReanimatedEvent<Event>) => void\n) {\n return (evt: JSEvent<Event>) => {\n handler({ ...evt.nativeEvent, eventName } as ReanimatedEvent<Event>);\n };\n}\n\nclass WorkletEventHandlerNative<Event extends object>\n implements IWorkletEventHandler<Event>\n{\n eventNames: string[];\n worklet: (event: ReanimatedEvent<Event>) => void;\n #viewTags: Set<number>;\n #registrations: Map<number, number[]>; // keys are viewTags, values are arrays of registration ID's for each viewTag\n constructor(\n worklet: (event: ReanimatedEvent<Event>) => void,\n eventNames: string[]\n ) {\n this.worklet = worklet;\n this.eventNames = eventNames;\n this.#viewTags = new Set<number>();\n this.#registrations = new Map<number, number[]>();\n }\n\n updateEventHandler(\n newWorklet: (event: ReanimatedEvent<Event>) => void,\n newEvents: string[]\n ): void {\n // Update worklet and event names\n this.worklet = newWorklet;\n this.eventNames = newEvents;\n\n // Detach all events\n this.#registrations.forEach((registrationIDs) => {\n registrationIDs.forEach((id) => unregisterEventHandler(id));\n // No need to remove registrationIDs from map, since it gets overwritten when attaching\n });\n\n // Attach new events with new worklet\n Array.from(this.#viewTags).forEach((tag) => {\n const newRegistrations = this.eventNames.map((eventName) =>\n registerEventHandler(this.worklet, eventName, tag)\n );\n this.#registrations.set(tag, newRegistrations);\n });\n }\n\n registerForEvents(viewTag: number, fallbackEventName?: string): void {\n this.#viewTags.add(viewTag);\n\n const newRegistrations = this.eventNames.map((eventName) =>\n registerEventHandler(this.worklet, eventName, viewTag)\n );\n this.#registrations.set(viewTag, newRegistrations);\n\n if (this.eventNames.length === 0 && fallbackEventName) {\n const newRegistration = registerEventHandler(\n this.worklet,\n fallbackEventName,\n viewTag\n );\n this.#registrations.set(viewTag, [newRegistration]);\n }\n }\n\n unregisterFromEvents(viewTag: number): void {\n this.#viewTags.delete(viewTag);\n this.#registrations.get(viewTag)?.forEach((id) => {\n unregisterEventHandler(id);\n });\n this.#registrations.delete(viewTag);\n }\n}\n\nclass WorkletEventHandlerWeb<Event extends object>\n implements IWorkletEventHandler<Event>\n{\n eventNames: string[];\n listeners:\n | Record<string, (event: ReanimatedEvent<ReanimatedEvent<Event>>) => void>\n | Record<string, (event: JSEvent<Event>) => void>;\n\n worklet: (event: ReanimatedEvent<Event>) => void;\n\n constructor(\n worklet: (event: ReanimatedEvent<Event>) => void,\n eventNames: string[] = []\n ) {\n this.worklet = worklet;\n this.eventNames = eventNames;\n this.listeners = {};\n this.setupWebListeners();\n }\n\n setupWebListeners() {\n this.listeners = {};\n this.eventNames.forEach((eventName) => {\n this.listeners[eventName] = jsListener(eventName, this.worklet);\n });\n }\n\n updateEventHandler(\n newWorklet: (event: ReanimatedEvent<Event>) => void,\n newEvents: string[]\n ): void {\n // Update worklet and event names\n this.worklet = newWorklet;\n this.eventNames = newEvents;\n this.setupWebListeners();\n }\n\n registerForEvents(_viewTag: number, _fallbackEventName?: string): void {\n // noop\n }\n\n unregisterFromEvents(_viewTag: number): void {\n // noop\n }\n}\n\nexport const WorkletEventHandler = SHOULD_BE_USE_WEB\n ? WorkletEventHandlerWeb\n : WorkletEventHandlerNative;\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,2BAAAC,GAAA,EAAAC,UAAA,EAAAC,KAAA,IAAAC,0BAAA,CAAAH,GAAA,EAAAC,UAAA,GAAAA,UAAA,CAAAG,GAAA,CAAAJ,GAAA,EAAAE,KAAA;AAAA,SAAAC,2BAAAH,GAAA,EAAAK,iBAAA,QAAAA,iBAAA,CAAAC,GAAA,CAA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AAM,CAACN,OAAO,CAAC;EACrC;AACF;AAEA,MAAMO,sBAAsB,CAE5B;EAQExB,WAAWA,CACTC,OAAgD,EAChDC,UAAoB,GAAG,EAAE,EACzB;IAAA1C,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACyC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACuB,SAAS,GAAG,CAAC,CAAC;IACnB,IAAI,CAACC,iBAAiB,CAAC,CAAC;EAC1B;EAEAA,iBAAiBA,CAAA,EAAG;IAClB,IAAI,CAACD,SAAS,GAAG,CAAC,CAAC;IACnB,IAAI,CAACvB,UAAU,CAACM,OAAO,CAAEhB,SAAS,IAAK;MACrC,IAAI,CAACiC,SAAS,CAACjC,SAAS,CAAC,GAAGD,UAAU,CAACC,SAAS,EAAE,IAAI,CAACS,OAAO,CAAC;IACjE,CAAC,CAAC;EACJ;EAEAI,kBAAkBA,CAChBC,UAAmD,EACnDC,SAAmB,EACb;IACN;IACA,IAAI,CAACN,OAAO,GAAGK,UAAU;IACzB,IAAI,CAACJ,UAAU,GAAGK,SAAS;IAC3B,IAAI,CAACmB,iBAAiB,CAAC,CAAC;EAC1B;EAEAV,iBAAiBA,CAACW,QAAgB,EAAEC,kBAA2B,EAAQ;IACrE;EAAA;EAGFP,oBAAoBA,CAACM,QAAgB,EAAQ;IAC3C;EAAA;AAEJ;AAEA,OAAO,MAAME,mBAAmB,GAAGvC,iBAAiB,GAChDkC,sBAAsB,GACtBzB,yBAAyB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defineAnimation","getReduceMotionForAnimation","recognizePrefixSuffix","withClamp","config","_animationToClamp","animationToClamp","strippedMin","min","undefined","strippedValue","strippedMax","max","clampOnFrame","animation","now","finished","onFrame","current","console","warn","prefix","suffix","newValue","onStart","value","previousAnimation","animationBeforeClamped","callback","isHigherOrder","reduceMotion"],"sources":["clamp.ts"],"sourcesContent":["'use strict';\nimport {\n defineAnimation,\n getReduceMotionForAnimation,\n recognizePrefixSuffix,\n} from './util';\nimport type {\n Animation,\n Timestamp,\n AnimatableValue,\n AnimationObject,\n ReduceMotion,\n} from '../commonTypes';\nimport type { ClampAnimation } from './commonTypes';\n\ntype withClampType = <T extends number | string>(\n config: {\n min?: T;\n max?: T;\n },\n clampedAnimation: T\n) => T;\n\nexport const withClamp = function <T extends number | string>(\n config: { min?: T; max?: T; reduceMotion?: ReduceMotion },\n _animationToClamp: AnimationObject<T> | (() => AnimationObject<T>)\n): Animation<ClampAnimation> {\n 'worklet';\n return defineAnimation<ClampAnimation, AnimationObject<T>>(\n _animationToClamp,\n (): ClampAnimation => {\n 'worklet';\n const animationToClamp =\n typeof _animationToClamp === 'function'\n ? _animationToClamp()\n : _animationToClamp;\n\n const strippedMin =\n config.min === undefined\n ? undefined\n : recognizePrefixSuffix(config.min).strippedValue;\n\n const strippedMax =\n config.max === undefined\n ? undefined\n : recognizePrefixSuffix(config.max).strippedValue;\n\n function clampOnFrame(\n animation: ClampAnimation,\n now: Timestamp\n ): boolean {\n const finished = animationToClamp.onFrame(animationToClamp, now);\n\n if (animationToClamp.current === undefined) {\n console.warn(\n \"[Reanimated] Error inside 'withClamp' animation, the inner animation has invalid current value\"\n );\n return true;\n } else {\n const { prefix, strippedValue, suffix } = recognizePrefixSuffix(\n animationToClamp.current\n );\n\n let newValue;\n\n if (strippedMax !== undefined && strippedMax < strippedValue) {\n newValue = strippedMax;\n } else if (strippedMin !== undefined && strippedMin > strippedValue) {\n newValue = strippedMin;\n } else {\n newValue = strippedValue;\n }\n\n animation.current =\n typeof animationToClamp.current === 'number'\n ? newValue\n : `${prefix === undefined ? '' : prefix}${newValue}${\n suffix === undefined ? '' : suffix\n }`;\n }\n\n return finished;\n }\n\n function onStart(\n animation: Animation<any>,\n value: AnimatableValue,\n now: Timestamp,\n previousAnimation: Animation<any> | null\n ): void {\n animation.current = value;\n animation.previousAnimation = animationToClamp;\n const animationBeforeClamped = previousAnimation?.previousAnimation;\n if (\n config.max !== undefined &&\n config.min !== undefined &&\n config.max < config.min\n ) {\n console.warn(\n '[Reanimated] Wrong config was provided to withClamp. Min value is bigger than max'\n );\n }\n\n animationToClamp.onStart(\n animationToClamp,\n /** provide the current value of the previous animation of the clamped animation \n so we can animate from the original \"un-truncated\" value\n */\n animationBeforeClamped?.current || value,\n now,\n animationBeforeClamped\n );\n }\n\n const callback = (finished?: boolean): void => {\n if (animationToClamp.callback) {\n animationToClamp.callback(finished);\n }\n };\n\n return {\n isHigherOrder: true,\n onFrame: clampOnFrame,\n onStart,\n current: animationToClamp.current!,\n callback,\n previousAnimation: null,\n reduceMotion: getReduceMotionForAnimation(config.reduceMotion),\n };\n }\n );\n} as withClampType;\n"],"mappings":"AAAA,YAAY;;AACZ,SACEA,eAAe,EACfC,2BAA2B,EAC3BC,qBAAqB,QAChB,QAAQ;AAkBf,OAAO,MAAMC,SAAS,GAAG,SAAAA,CACvBC,MAAyD,EACzDC,iBAAkE,EACvC;EAC3B,SAAS;;EACT,OAAOL,eAAe,CACpBK,iBAAiB,EACjB,MAAsB;IACpB,SAAS;;IACT,MAAMC,gBAAgB,GACpB,OAAOD,iBAAiB,KAAK,UAAU,GACnCA,iBAAiB,
|
|
1
|
+
{"version":3,"names":["defineAnimation","getReduceMotionForAnimation","recognizePrefixSuffix","withClamp","config","_animationToClamp","animationToClamp","strippedMin","min","undefined","strippedValue","strippedMax","max","clampOnFrame","animation","now","finished","onFrame","current","console","warn","prefix","suffix","newValue","onStart","value","previousAnimation","animationBeforeClamped","callback","isHigherOrder","reduceMotion"],"sources":["clamp.ts"],"sourcesContent":["'use strict';\nimport {\n defineAnimation,\n getReduceMotionForAnimation,\n recognizePrefixSuffix,\n} from './util';\nimport type {\n Animation,\n Timestamp,\n AnimatableValue,\n AnimationObject,\n ReduceMotion,\n} from '../commonTypes';\nimport type { ClampAnimation } from './commonTypes';\n\ntype withClampType = <T extends number | string>(\n config: {\n min?: T;\n max?: T;\n },\n clampedAnimation: T\n) => T;\n\nexport const withClamp = function <T extends number | string>(\n config: { min?: T; max?: T; reduceMotion?: ReduceMotion },\n _animationToClamp: AnimationObject<T> | (() => AnimationObject<T>)\n): Animation<ClampAnimation> {\n 'worklet';\n return defineAnimation<ClampAnimation, AnimationObject<T>>(\n _animationToClamp,\n (): ClampAnimation => {\n 'worklet';\n const animationToClamp =\n typeof _animationToClamp === 'function'\n ? _animationToClamp()\n : _animationToClamp;\n\n const strippedMin =\n config.min === undefined\n ? undefined\n : recognizePrefixSuffix(config.min).strippedValue;\n\n const strippedMax =\n config.max === undefined\n ? undefined\n : recognizePrefixSuffix(config.max).strippedValue;\n\n function clampOnFrame(\n animation: ClampAnimation,\n now: Timestamp\n ): boolean {\n const finished = animationToClamp.onFrame(animationToClamp, now);\n\n if (animationToClamp.current === undefined) {\n console.warn(\n \"[Reanimated] Error inside 'withClamp' animation, the inner animation has invalid current value\"\n );\n return true;\n } else {\n const { prefix, strippedValue, suffix } = recognizePrefixSuffix(\n animationToClamp.current\n );\n\n let newValue;\n\n if (strippedMax !== undefined && strippedMax < strippedValue) {\n newValue = strippedMax;\n } else if (strippedMin !== undefined && strippedMin > strippedValue) {\n newValue = strippedMin;\n } else {\n newValue = strippedValue;\n }\n\n animation.current =\n typeof animationToClamp.current === 'number'\n ? newValue\n : `${prefix === undefined ? '' : prefix}${newValue}${\n suffix === undefined ? '' : suffix\n }`;\n }\n\n return finished;\n }\n\n function onStart(\n animation: Animation<any>,\n value: AnimatableValue,\n now: Timestamp,\n previousAnimation: Animation<any> | null\n ): void {\n animation.current = value;\n animation.previousAnimation = animationToClamp;\n const animationBeforeClamped = previousAnimation?.previousAnimation;\n if (\n config.max !== undefined &&\n config.min !== undefined &&\n config.max < config.min\n ) {\n console.warn(\n '[Reanimated] Wrong config was provided to withClamp. Min value is bigger than max'\n );\n }\n\n animationToClamp.onStart(\n animationToClamp,\n /** provide the current value of the previous animation of the clamped animation \n so we can animate from the original \"un-truncated\" value\n */\n animationBeforeClamped?.current || value,\n now,\n animationBeforeClamped\n );\n }\n\n const callback = (finished?: boolean): void => {\n if (animationToClamp.callback) {\n animationToClamp.callback(finished);\n }\n };\n\n return {\n isHigherOrder: true,\n onFrame: clampOnFrame,\n onStart,\n current: animationToClamp.current!,\n callback,\n previousAnimation: null,\n reduceMotion: getReduceMotionForAnimation(config.reduceMotion),\n };\n }\n );\n} as withClampType;\n"],"mappings":"AAAA,YAAY;;AACZ,SACEA,eAAe,EACfC,2BAA2B,EAC3BC,qBAAqB,QAChB,QAAQ;AAkBf,OAAO,MAAMC,SAAS,GAAG,SAAAA,CACvBC,MAAyD,EACzDC,iBAAkE,EACvC;EAC3B,SAAS;;EACT,OAAOL,eAAe,CACpBK,iBAAiB,EACjB,MAAsB;IACpB,SAAS;;IACT,MAAMC,gBAAgB,GACpB,OAAOD,iBAAiB,KAAK,UAAU,GACnCA,iBAAiB,CAAC,CAAC,GACnBA,iBAAiB;IAEvB,MAAME,WAAW,GACfH,MAAM,CAACI,GAAG,KAAKC,SAAS,GACpBA,SAAS,GACTP,qBAAqB,CAACE,MAAM,CAACI,GAAG,CAAC,CAACE,aAAa;IAErD,MAAMC,WAAW,GACfP,MAAM,CAACQ,GAAG,KAAKH,SAAS,GACpBA,SAAS,GACTP,qBAAqB,CAACE,MAAM,CAACQ,GAAG,CAAC,CAACF,aAAa;IAErD,SAASG,YAAYA,CACnBC,SAAyB,EACzBC,GAAc,EACL;MACT,MAAMC,QAAQ,GAAGV,gBAAgB,CAACW,OAAO,CAACX,gBAAgB,EAAES,GAAG,CAAC;MAEhE,IAAIT,gBAAgB,CAACY,OAAO,KAAKT,SAAS,EAAE;QAC1CU,OAAO,CAACC,IAAI,CACV,gGACF,CAAC;QACD,OAAO,IAAI;MACb,CAAC,MAAM;QACL,MAAM;UAAEC,MAAM;UAAEX,aAAa;UAAEY;QAAO,CAAC,GAAGpB,qBAAqB,CAC7DI,gBAAgB,CAACY,OACnB,CAAC;Q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AC7BtB,gBAAgB,CAACsB,QAAQ,CAACZ,QAAQ,CAAC;MACrC;IACF,CAAC;IAED,OAAO;MACLa,aAAa,EAAE,IAAI;MACnBZ,OAAO,EAAEJ,YAAY;MACrBW,OAAO;MACPN,OAAO,EAAEZ,gBAAgB,CAACY,OAAQ;MAClCU,QAAQ;MACRF,iBAAiB,EAAE,IAAI;MACvBI,YAAY,EAAE7B,2BAA2B,CAACG,MAAM,CAAC0B,YAAY;IAC/D,CAAC;EACH,CACF,CAAC;AACH,CAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["commonTypes.ts"],"sourcesContent":["'use strict';\nimport type {\n StyleProps,\n AnimatableValue,\n AnimationObject,\n Animation,\n Timestamp,\n AnimationCallback,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\n\nexport interface HigherOrderAnimation {\n isHigherOrder?: boolean;\n}\n\nexport type NextAnimation<T extends AnimationObject> = T | (() => T);\n\nexport interface ClampAnimation\n extends Animation<ClampAnimation>,\n HigherOrderAnimation {\n current: AnimatableValue;\n}\n\nexport interface DelayAnimation\n extends Animation<DelayAnimation>,\n HigherOrderAnimation {\n startTime: Timestamp;\n started: boolean;\n previousAnimation: DelayAnimation | null;\n current: AnimatableValue;\n}\n\nexport interface RepeatAnimation\n extends Animation<RepeatAnimation>,\n HigherOrderAnimation {\n reps: number;\n startValue: AnimatableValue;\n toValue?: AnimatableValue;\n previousAnimation?: RepeatAnimation;\n}\n\nexport interface SequenceAnimation\n extends Animation<SequenceAnimation>,\n HigherOrderAnimation {\n animationIndex: number;\n}\n\nexport interface StyleLayoutAnimation extends HigherOrderAnimation {\n current: StyleProps;\n styleAnimations: AnimatedStyle<any>;\n onFrame: (animation: StyleLayoutAnimation, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: StyleLayoutAnimation,\n current: AnimatedStyle<any>,\n timestamp: Timestamp,\n previousAnimation: StyleLayoutAnimation\n ) => void;\n callback?: AnimationCallback;\n}\n"],"mappings":"AAAA,YAAY;;AAAC"}
|
|
1
|
+
{"version":3,"names":[],"sources":["commonTypes.ts"],"sourcesContent":["'use strict';\nimport type {\n StyleProps,\n AnimatableValue,\n AnimationObject,\n Animation,\n Timestamp,\n AnimationCallback,\n} from '../commonTypes';\nimport type { AnimatedStyle } from '../helperTypes';\n\nexport interface HigherOrderAnimation {\n isHigherOrder?: boolean;\n}\n\nexport type NextAnimation<T extends AnimationObject> = T | (() => T);\n\nexport interface ClampAnimation\n extends Animation<ClampAnimation>,\n HigherOrderAnimation {\n current: AnimatableValue;\n}\n\nexport interface DelayAnimation\n extends Animation<DelayAnimation>,\n HigherOrderAnimation {\n startTime: Timestamp;\n started: boolean;\n previousAnimation: DelayAnimation | null;\n current: AnimatableValue;\n}\n\nexport interface RepeatAnimation\n extends Animation<RepeatAnimation>,\n HigherOrderAnimation {\n reps: number;\n startValue: AnimatableValue;\n toValue?: AnimatableValue;\n previousAnimation?: RepeatAnimation;\n}\n\nexport interface SequenceAnimation\n extends Animation<SequenceAnimation>,\n HigherOrderAnimation {\n animationIndex: number;\n}\n\nexport interface StyleLayoutAnimation extends HigherOrderAnimation {\n current: StyleProps;\n styleAnimations: AnimatedStyle<any>;\n onFrame: (animation: StyleLayoutAnimation, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: StyleLayoutAnimation,\n current: AnimatedStyle<any>,\n timestamp: Timestamp,\n previousAnimation: StyleLayoutAnimation\n ) => void;\n callback?: AnimationCallback;\n}\n"],"mappings":"AAAA,YAAY;;AAAC","ignoreList":[]}
|