react-native-reanimated 3.0.2 → 3.1.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/FabricUtils.h +1 -1
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +38 -27
- package/Common/cpp/SharedItems/Shareables.h +22 -0
- package/Common/cpp/Tools/PlatformDepMethodsHolder.h +2 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +4 -1
- package/Common/cpp/Tools/RuntimeDecorator.h +2 -1
- package/Common/cpp/Tools/SingleInstanceChecker.h +14 -2
- package/RNReanimated.podspec +5 -2
- package/android/CMakeLists.txt +4 -0
- package/android/build.gradle +18 -10
- package/android/src/main/cpp/NativeProxy.cpp +316 -337
- package/android/src/main/cpp/NativeProxy.h +53 -11
- package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +7 -12
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +11 -8
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +21 -14
- package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +0 -3
- package/ios/Fabric/REAInitializerRCTFabricSurface.mm +1 -0
- package/ios/REANodesManager.h +1 -0
- package/ios/REANodesManager.mm +30 -4
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +51 -130
- package/ios/native/NativeMethods.mm +1 -1
- package/ios/native/NativeProxy.mm +4 -1
- package/ios/native/REAIOSErrorHandler.mm +1 -1
- package/ios/native/REAIOSLogger.mm +1 -1
- package/ios/native/REAIOSScheduler.mm +1 -1
- package/ios/native/REAInitializer.mm +1 -1
- package/ios/native/REAMessageThread.mm +2 -2
- package/lib/commonjs/Animated.js +0 -8
- package/lib/commonjs/Animated.js.map +1 -1
- package/lib/commonjs/ConfigHelper.js +8 -19
- package/lib/commonjs/ConfigHelper.js.map +1 -1
- package/lib/commonjs/createAnimatedComponent.js +20 -158
- package/lib/commonjs/createAnimatedComponent.js.map +1 -1
- package/lib/commonjs/index.js +0 -9
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +0 -7
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/reanimated2/Bezier.js +14 -34
- package/lib/commonjs/reanimated2/Bezier.js.map +1 -1
- package/lib/commonjs/reanimated2/Colors.js +60 -132
- package/lib/commonjs/reanimated2/Colors.js.map +1 -1
- package/lib/commonjs/reanimated2/Easing.js +81 -34
- package/lib/commonjs/reanimated2/Easing.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeMethods.js +8 -20
- package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +5 -31
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeReanimated/index.js +0 -7
- package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated2/PlatformChecker.js +0 -6
- package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/commonjs/reanimated2/PropAdapters.js +10 -12
- package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -1
- package/lib/commonjs/reanimated2/UpdateProps.js +3 -12
- package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -1
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +0 -10
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/commonjs/reanimated2/WorkletEventHandler.js +5 -22
- package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/decay.js +7 -18
- package/lib/commonjs/reanimated2/animation/decay.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/delay.js +0 -11
- package/lib/commonjs/reanimated2/animation/delay.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/index.js +0 -8
- package/lib/commonjs/reanimated2/animation/index.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/repeat.js +6 -22
- package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/sequence.js +3 -20
- package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/spring.js +11 -23
- package/lib/commonjs/reanimated2/animation/spring.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/styleAnimation.js +3 -35
- package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/timing.js +0 -11
- package/lib/commonjs/reanimated2/animation/timing.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/util.js +11 -41
- package/lib/commonjs/reanimated2/animation/util.js.map +1 -1
- package/lib/commonjs/reanimated2/commonTypes.js +16 -23
- package/lib/commonjs/reanimated2/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/component/FlatList.js +0 -16
- package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -1
- package/lib/commonjs/reanimated2/component/Image.js +0 -4
- package/lib/commonjs/reanimated2/component/Image.js.map +1 -1
- package/lib/commonjs/reanimated2/component/ScrollView.js +0 -4
- package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/commonjs/reanimated2/component/Text.js +0 -4
- package/lib/commonjs/reanimated2/component/Text.js.map +1 -1
- package/lib/commonjs/reanimated2/component/View.js +0 -4
- package/lib/commonjs/reanimated2/component/View.js.map +1 -1
- package/lib/commonjs/reanimated2/core.js +6 -48
- package/lib/commonjs/reanimated2/core.js.map +1 -1
- package/lib/commonjs/reanimated2/errors.js +3 -14
- package/lib/commonjs/reanimated2/errors.js.map +1 -1
- package/lib/commonjs/reanimated2/fabricUtils.js +3 -5
- package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/fabricUtils.web.js +1 -3
- package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -12
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -17
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/commonjs/reanimated2/globals.d.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/Hooks.js +0 -5
- package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/index.js +0 -12
- package/lib/commonjs/reanimated2/hook/index.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +4 -17
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +2 -9
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +1 -11
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +0 -12
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +2 -9
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +8 -23
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +13 -71
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js +4 -13
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js +0 -5
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js +0 -7
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useSharedValue.js +2 -7
- package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/utils.js +8 -39
- package/lib/commonjs/reanimated2/hook/utils.js.map +1 -1
- package/lib/commonjs/reanimated2/index.js +0 -26
- package/lib/commonjs/reanimated2/index.js.map +1 -1
- package/lib/commonjs/reanimated2/initializers.js +21 -43
- package/lib/commonjs/reanimated2/initializers.js.map +1 -1
- package/lib/commonjs/reanimated2/interpolateColor.js +6 -43
- package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -1
- package/lib/commonjs/reanimated2/interpolation.js +14 -29
- package/lib/commonjs/reanimated2/interpolation.js.map +1 -1
- package/lib/commonjs/reanimated2/jestUtils.js +11 -44
- package/lib/commonjs/reanimated2/jestUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +15 -39
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +9 -28
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +7 -37
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +5 -18
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/global.js +2 -9
- package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/index.js +3 -14
- package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -26
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -49
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -43
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +4 -5
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +0 -4
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js +4 -23
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -74
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -53
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -63
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -26
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -13
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -23
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -43
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -43
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -23
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -83
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +0 -20
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +3 -22
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -29
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -9
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -11
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -8
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -12
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +0 -12
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/index.js +0 -9
- package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js +3 -17
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/commonjs/reanimated2/mappers.js +26 -32
- package/lib/commonjs/reanimated2/mappers.js.map +1 -1
- package/lib/commonjs/reanimated2/mock.js +5 -15
- package/lib/commonjs/reanimated2/mock.js.map +1 -1
- package/lib/commonjs/reanimated2/mutables.js +2 -28
- package/lib/commonjs/reanimated2/mutables.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +0 -2
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js +31 -0
- package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js +0 -2
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/jsVersion.js +14 -0
- package/lib/commonjs/reanimated2/platform-specific/jsVersion.js.map +1 -0
- package/lib/commonjs/reanimated2/pluginUtils.js +0 -1
- package/lib/commonjs/reanimated2/pluginUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/shareables.js +92 -49
- package/lib/commonjs/reanimated2/shareables.js.map +1 -1
- package/lib/commonjs/reanimated2/threads.js +42 -46
- package/lib/commonjs/reanimated2/threads.js.map +1 -1
- package/lib/commonjs/reanimated2/utils.js +0 -5
- package/lib/commonjs/reanimated2/utils.js.map +1 -1
- package/lib/commonjs/reanimated2/valueSetter.js +6 -21
- package/lib/commonjs/reanimated2/valueSetter.js.map +1 -1
- package/lib/commonjs/setAndForwardRef.js +3 -3
- package/lib/commonjs/setAndForwardRef.js.map +1 -1
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js +9 -15
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/createAnimatedComponent.js +20 -139
- package/lib/module/createAnimatedComponent.js.map +1 -1
- package/lib/module/index.js +0 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/reanimated2/Bezier.js +14 -33
- package/lib/module/reanimated2/Bezier.js.map +1 -1
- package/lib/module/reanimated2/Colors.js +59 -109
- package/lib/module/reanimated2/Colors.js.map +1 -1
- package/lib/module/reanimated2/Easing.js +37 -33
- package/lib/module/reanimated2/Easing.js.map +1 -1
- package/lib/module/reanimated2/NativeMethods.js +8 -15
- package/lib/module/reanimated2/NativeMethods.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +5 -27
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.js +0 -2
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/module/reanimated2/PropAdapters.js +12 -10
- package/lib/module/reanimated2/PropAdapters.js.map +1 -1
- package/lib/module/reanimated2/UpdateProps.js +3 -5
- package/lib/module/reanimated2/UpdateProps.js.map +1 -1
- package/lib/module/reanimated2/ViewDescriptorsSet.js +0 -6
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/reanimated2/WorkletEventHandler.js +5 -18
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/module/reanimated2/animation/decay.js +7 -15
- package/lib/module/reanimated2/animation/decay.js.map +1 -1
- package/lib/module/reanimated2/animation/delay.js +0 -9
- 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 +6 -20
- package/lib/module/reanimated2/animation/repeat.js.map +1 -1
- package/lib/module/reanimated2/animation/sequence.js +3 -18
- package/lib/module/reanimated2/animation/sequence.js.map +1 -1
- package/lib/module/reanimated2/animation/spring.js +11 -21
- package/lib/module/reanimated2/animation/spring.js.map +1 -1
- package/lib/module/reanimated2/animation/styleAnimation.js +7 -31
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/module/reanimated2/animation/timing.js +0 -8
- package/lib/module/reanimated2/animation/timing.js.map +1 -1
- package/lib/module/reanimated2/animation/util.js +10 -33
- package/lib/module/reanimated2/animation/util.js.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +12 -19
- package/lib/module/reanimated2/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/component/FlatList.js +0 -4
- package/lib/module/reanimated2/component/FlatList.js.map +1 -1
- package/lib/module/reanimated2/component/Image.js.map +1 -1
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/module/reanimated2/component/Text.js.map +1 -1
- package/lib/module/reanimated2/component/View.js.map +1 -1
- package/lib/module/reanimated2/core.js +6 -22
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +3 -13
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +3 -3
- package/lib/module/reanimated2/fabricUtils.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -8
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -15
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/module/reanimated2/globals.d.js.map +1 -1
- package/lib/module/reanimated2/hook/Hooks.js +3 -2
- package/lib/module/reanimated2/hook/Hooks.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 +3 -14
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +2 -5
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -7
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js +0 -6
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +2 -7
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedSensor.js +9 -20
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +13 -59
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js +4 -8
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +0 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/reanimated2/hook/useSharedValue.js +2 -3
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/utils.js +8 -21
- 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 +23 -37
- package/lib/module/reanimated2/initializers.js.map +1 -1
- package/lib/module/reanimated2/interpolateColor.js +5 -34
- package/lib/module/reanimated2/interpolateColor.js.map +1 -1
- package/lib/module/reanimated2/interpolation.js +13 -28
- package/lib/module/reanimated2/interpolation.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.js +11 -35
- package/lib/module/reanimated2/jestUtils.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +15 -35
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/Mapper.js +9 -23
- package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +7 -35
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/MutableValue.js +5 -16
- package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/global.js +2 -6
- package/lib/module/reanimated2/js-reanimated/global.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/index.js +3 -9
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -23
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -45
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -39
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +3 -3
- 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 +4 -19
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -52
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -32
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -38
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -16
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -8
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -14
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -14
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -50
- 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 +3 -17
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -23
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -5
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -6
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -5
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -8
- 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/index.js +3 -13
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/mappers.js +26 -25
- package/lib/module/reanimated2/mappers.js.map +1 -1
- package/lib/module/reanimated2/mock.js +5 -15
- package/lib/module/reanimated2/mock.js.map +1 -1
- package/lib/module/reanimated2/mutables.js +2 -19
- 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 +24 -0
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
- package/lib/module/reanimated2/platform-specific/checkVersion.web.js +0 -1
- package/lib/module/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js +7 -0
- package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -0
- package/lib/module/reanimated2/pluginUtils.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +96 -44
- package/lib/module/reanimated2/shareables.js.map +1 -1
- package/lib/module/reanimated2/threads.js +39 -33
- package/lib/module/reanimated2/threads.js.map +1 -1
- package/lib/module/reanimated2/utils.js +0 -3
- package/lib/module/reanimated2/utils.js.map +1 -1
- package/lib/module/reanimated2/valueSetter.js +6 -19
- package/lib/module/reanimated2/valueSetter.js.map +1 -1
- package/lib/module/setAndForwardRef.js +3 -2
- package/lib/module/setAndForwardRef.js.map +1 -1
- package/package.json +46 -40
- package/plugin/.eslintrc.js +7 -0
- package/plugin/README.md +241 -0
- package/plugin/build/plugin.js +714 -0
- package/plugin/build/plugin.js.map +7 -0
- package/plugin/index.js +1 -807
- package/plugin/package.json +23 -0
- package/plugin/src/buildWorkletString.ts +213 -0
- package/plugin/src/commonObjects.ts +60 -0
- package/plugin/src/injectVersion.ts +37 -0
- package/plugin/src/makeWorklet.ts +375 -0
- package/plugin/src/plugin.ts +49 -0
- package/plugin/src/processForCalleesWorklets.ts +106 -0
- package/plugin/src/processIfGestureHandlerEventCallbackFunctionNode.ts +156 -0
- package/plugin/src/processIfWorkletFunction.ts +55 -0
- package/plugin/src/processIfWorkletNode.ts +44 -0
- package/plugin/src/processInlineStylesWarning.ts +129 -0
- package/plugin/src/processWorkletObjectMethod.ts +31 -0
- package/plugin/src/types.ts +15 -0
- package/plugin/src/utils.ts +6 -0
- package/plugin/tsconfig.json +15 -0
- package/plugin/yarn.lock +2193 -0
- package/react-native-reanimated.d.ts +1 -0
- package/scripts/reanimated_utils.rb +2 -2
- package/src/createAnimatedComponent.tsx +2 -3
- package/src/reanimated2/Easing.ts +19 -0
- package/src/reanimated2/NativeMethods.ts +9 -4
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +2 -2
- package/src/reanimated2/UpdateProps.ts +2 -2
- package/src/reanimated2/animation/decay.ts +7 -1
- package/src/reanimated2/animation/styleAnimation.ts +5 -1
- package/src/reanimated2/core.ts +4 -4
- package/src/reanimated2/errors.ts +1 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +12 -4
- package/src/reanimated2/globals.d.ts +71 -112
- package/src/reanimated2/hook/commonTypes.ts +1 -1
- package/src/reanimated2/hook/useAnimatedReaction.ts +2 -2
- package/src/reanimated2/hook/useAnimatedSensor.ts +2 -2
- package/src/reanimated2/initializers.ts +11 -8
- package/src/reanimated2/jestUtils.ts +0 -1
- package/src/reanimated2/js-reanimated/JSReanimated.ts +5 -1
- package/src/reanimated2/js-reanimated/index.ts +1 -1
- package/src/reanimated2/mappers.ts +26 -4
- package/src/reanimated2/mock.ts +1 -0
- package/src/reanimated2/platform-specific/checkCppVersion.ts +29 -0
- package/src/reanimated2/platform-specific/jsVersion.ts +6 -0
- package/src/reanimated2/shareables.ts +107 -8
- package/src/reanimated2/threads.ts +36 -17
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.js +0 -42
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.js.map +0 -1
- package/lib/module/reanimated2/platform-specific/checkVersion.js +0 -35
- package/lib/module/reanimated2/platform-specific/checkVersion.js.map +0 -1
- package/src/reanimated2/platform-specific/checkVersion.ts +0 -39
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getTag","view","findNodeHandle","isNative","shouldBeUseWeb","measure","isWeb","animatedRef","element","viewportOffset","getBoundingClientRect","width","offsetWidth","height","offsetHeight","x","offsetLeft","y","offsetTop","pageX","left","pageY","top","isChromeDebugger","_animatedRef","console","warn","_WORKLET","viewTag","measured","_measure","isNaN","dispatchCommand","commandName","args","shadowNodeWrapper","_dispatchCommand","scrollTo","animated","global","_IS_FABRIC","_scrollTo","_x","_y","setGestureState","handlerTag","newState","_setGestureState"],"sources":["NativeMethods.ts"],"sourcesContent":["/* global _WORKLET _measure _scrollTo _dispatchCommand _setGestureState */\nimport { Component } from 'react';\nimport { findNodeHandle } from 'react-native';\nimport { MeasuredDimensions } from './commonTypes';\nimport { RefObjectFunction } from './hook/commonTypes';\nimport { isChromeDebugger, isWeb, shouldBeUseWeb } from './PlatformChecker';\n\nexport function getTag(\n view: null | number | React.Component<any, any> | React.ComponentClass<any>\n): null | number {\n return findNodeHandle(view);\n}\n\nconst isNative = !shouldBeUseWeb();\n\nexport let measure: (\n animatedRef: RefObjectFunction<Component>\n) => MeasuredDimensions | null;\n\nif (isWeb()) {\n measure = (animatedRef: RefObjectFunction<Component>) => {\n const element = animatedRef() as unknown as HTMLElement; // TODO: fix typing of animated refs on web\n const viewportOffset = element.getBoundingClientRect();\n return {\n width: element.offsetWidth,\n height: element.offsetHeight,\n x: element.offsetLeft,\n y: element.offsetTop,\n pageX: viewportOffset.left,\n pageY: viewportOffset.top,\n };\n };\n} else if (isChromeDebugger()) {\n measure = (_animatedRef: RefObjectFunction<Component>) => {\n console.warn('[Reanimated] measure() cannot be used with Chrome Debugger.');\n return null;\n };\n} else {\n measure = (animatedRef: RefObjectFunction<Component>) => {\n 'worklet';\n if (!_WORKLET) {\n console.warn(\n '[Reanimated] measure() was called from the main JS context. Measure is ' +\n 'only available in the UI runtime. This may also happen if measure() ' +\n 'was called by a worklet in the useAnimatedStyle hook, because useAnimatedStyle ' +\n 'calls the given worklet on the JS runtime during render. If you want to ' +\n 'prevent this warning then wrap the call with `if (_WORKLET)`. Then it will ' +\n 'only be called on the UI runtime after the render has been completed.'\n );\n return null;\n }\n\n const viewTag = animatedRef();\n if (viewTag === -1) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} is not a valid argument for measure(). This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n }\n\n const measured = _measure(viewTag);\n if (measured === null) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} has some undefined, not-yet-computed or meaningless value of \\`LayoutMetrics\\` type. This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n } else if (measured.x === -1234567) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} returned an invalid measurement response.`\n );\n return null;\n } else if (isNaN(measured.x)) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} gets view-flattened on Android. To disable view-flattening, set \\`collapsable={false}\\` on this component.`\n );\n return null;\n } else {\n return measured;\n }\n };\n}\n\nexport function dispatchCommand(\n animatedRef: RefObjectFunction<Component>,\n commandName: string,\n args: Array<unknown>\n): void {\n 'worklet';\n if (!_WORKLET || !isNative) {\n return;\n }\n const shadowNodeWrapper = animatedRef();\n _dispatchCommand(shadowNodeWrapper, commandName, args);\n}\n\nexport let scrollTo: (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n) => void;\n\nif (isWeb()) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n const element = animatedRef() as unknown as HTMLElement;\n // @ts-ignore same call as in react-native-web\n element.scrollTo({ x, y, animated });\n };\n} else if (isNative && global._IS_FABRIC) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n dispatchCommand(animatedRef, 'scrollTo', [x, y, animated]);\n };\n} else if (isNative) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n if (!_WORKLET) {\n return;\n }\n const viewTag = animatedRef();\n _scrollTo(viewTag, x, y, animated);\n };\n} else {\n scrollTo = (\n _animatedRef: RefObjectFunction<Component>,\n _x: number,\n _y: number\n ) => {\n // no-op\n };\n}\n\nexport function setGestureState(handlerTag: number, newState: number): void {\n 'worklet';\n if (!_WORKLET || !isNative) {\n console.warn(\n '[Reanimated] You can not use setGestureState in non-worklet function.'\n );\n return;\n }\n _setGestureState(handlerTag, newState);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_PlatformChecker","getTag","view","findNodeHandle","isNative","shouldBeUseWeb","measure","exports","isWeb","animatedRef","element","viewportOffset","getBoundingClientRect","width","offsetWidth","height","offsetHeight","x","offsetLeft","y","offsetTop","pageX","left","pageY","top","isChromeDebugger","_animatedRef","console","warn","_WORKLET","viewTag","measured","_measure","isNaN","dispatchCommand","commandName","args","shadowNodeWrapper","_dispatchCommand","scrollTo","animated","global","_IS_FABRIC","_scrollTo","_x","_y","setGestureState","handlerTag","newState","_setGestureState"],"sources":["NativeMethods.ts"],"sourcesContent":["/* global _WORKLET _measure _scrollTo _dispatchCommand _setGestureState */\nimport { Component } from 'react';\nimport { findNodeHandle } from 'react-native';\nimport { MeasuredDimensions, ShadowNodeWrapper } from './commonTypes';\nimport { RefObjectFunction } from './hook/commonTypes';\nimport { isChromeDebugger, isWeb, shouldBeUseWeb } from './PlatformChecker';\n\nexport function getTag(\n view: null | number | React.Component<any, any> | React.ComponentClass<any>\n): null | number {\n return findNodeHandle(view);\n}\n\nconst isNative = !shouldBeUseWeb();\n\nexport let measure: (\n animatedRef: RefObjectFunction<Component>\n) => MeasuredDimensions | null;\n\nif (isWeb()) {\n measure = (animatedRef: RefObjectFunction<Component>) => {\n const element = animatedRef() as unknown as HTMLElement; // TODO: fix typing of animated refs on web\n const viewportOffset = element.getBoundingClientRect();\n return {\n width: element.offsetWidth,\n height: element.offsetHeight,\n x: element.offsetLeft,\n y: element.offsetTop,\n pageX: viewportOffset.left,\n pageY: viewportOffset.top,\n };\n };\n} else if (isChromeDebugger()) {\n measure = (_animatedRef: RefObjectFunction<Component>) => {\n console.warn('[Reanimated] measure() cannot be used with Chrome Debugger.');\n return null;\n };\n} else {\n measure = (animatedRef: RefObjectFunction<Component>) => {\n 'worklet';\n if (!_WORKLET) {\n console.warn(\n '[Reanimated] measure() was called from the main JS context. Measure is ' +\n 'only available in the UI runtime. This may also happen if measure() ' +\n 'was called by a worklet in the useAnimatedStyle hook, because useAnimatedStyle ' +\n 'calls the given worklet on the JS runtime during render. If you want to ' +\n 'prevent this warning then wrap the call with `if (_WORKLET)`. Then it will ' +\n 'only be called on the UI runtime after the render has been completed.'\n );\n return null;\n }\n\n const viewTag = animatedRef();\n if (viewTag === -1) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} is not a valid argument for measure(). This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n }\n\n const measured = _measure(viewTag);\n if (measured === null) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} has some undefined, not-yet-computed or meaningless value of \\`LayoutMetrics\\` type. This may be because the view is not currently rendered, which may not be a bug (e.g. an off-screen FlatList item).`\n );\n return null;\n } else if (measured.x === -1234567) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} returned an invalid measurement response.`\n );\n return null;\n } else if (isNaN(measured.x)) {\n console.warn(\n `[Reanimated] The view with tag ${viewTag} gets view-flattened on Android. To disable view-flattening, set \\`collapsable={false}\\` on this component.`\n );\n return null;\n } else {\n return measured;\n }\n };\n}\n\nexport function dispatchCommand(\n animatedRef: RefObjectFunction<Component>,\n commandName: string,\n args: Array<unknown>\n): void {\n 'worklet';\n if (!_WORKLET || !isNative) {\n return;\n }\n\n // dispatchCommand works only on Fabric where animatedRef returns\n // an object (ShadowNodeWrapper) and not a number\n const shadowNodeWrapper = animatedRef() as ShadowNodeWrapper;\n _dispatchCommand!(shadowNodeWrapper, commandName, args);\n}\n\nexport let scrollTo: (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n) => void;\n\nif (isWeb()) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n const element = animatedRef() as unknown as HTMLElement;\n // @ts-ignore same call as in react-native-web\n element.scrollTo({ x, y, animated });\n };\n} else if (isNative && global._IS_FABRIC) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n dispatchCommand(animatedRef, 'scrollTo', [x, y, animated]);\n };\n} else if (isNative) {\n scrollTo = (\n animatedRef: RefObjectFunction<Component>,\n x: number,\n y: number,\n animated: boolean\n ) => {\n 'worklet';\n if (!_WORKLET) {\n return;\n }\n\n // Calling animatedRef on Paper returns a number (nativeTag)\n const viewTag = animatedRef() as number;\n _scrollTo(viewTag, x, y, animated);\n };\n} else {\n scrollTo = (\n _animatedRef: RefObjectFunction<Component>,\n _x: number,\n _y: number\n ) => {\n // no-op\n };\n}\n\nexport function setGestureState(handlerTag: number, newState: number): void {\n 'worklet';\n if (!_WORKLET || !isNative) {\n console.warn(\n '[Reanimated] You can not use setGestureState in non-worklet function.'\n );\n return;\n }\n _setGestureState(handlerTag, newState);\n}\n"],"mappings":";;;;;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAD,OAAA;AALA;;AAOO,SAASE,MAAMA,CACpBC,IAA2E,EAC5D;EACf,OAAO,IAAAC,2BAAc,EAACD,IAAI,CAAC;AAC7B;AAEA,MAAME,QAAQ,GAAG,CAAC,IAAAC,+BAAc,GAAE;AAE3B,IAAIC,OAEmB;AAACC,OAAA,CAAAD,OAAA,GAAAA,OAAA;AAE/B,IAAI,IAAAE,sBAAK,GAAE,EAAE;EACXD,OAAA,CAAAD,OAAA,GAAAA,OAAO,GAAIG,WAAyC,IAAK;IACvD,MAAMC,OAAO,GAAGD,WAAW,EAA4B,CAAC,CAAC;IACzD,MAAME,cAAc,GAAGD,OAAO,CAACE,qBAAqB,EAAE;IACtD,OAAO;MACLC,KAAK,EAAEH,OAAO,CAACI,WAAW;MAC1BC,MAAM,EAAEL,OAAO,CAACM,YAAY;MAC5BC,CAAC,EAAEP,OAAO,CAACQ,UAAU;MACrBC,CAAC,EAAET,OAAO,CAACU,SAAS;MACpBC,KAAK,EAAEV,cAAc,CAACW,IAAI;MAC1BC,KAAK,EAAEZ,cAAc,CAACa;IACxB,CAAC;EACH,CAAC;AACH,CAAC,MAAM,IAAI,IAAAC,iCAAgB,GAAE,EAAE;EAC7BlB,OAAA,CAAAD,OAAA,GAAAA,O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C,eAAeA,CAACC,UAAkB,EAAEC,QAAgB,EAAQ;EAC1E,SAAS;;EACT,IAAI,CAACnB,QAAQ,IAAI,CAACzB,QAAQ,EAAE;IAC1BuB,OAAO,CAACC,IAAI,CACV,uEAAuE,CACxE;IACD;EACF;EACAqB,gBAAgB,CAACF,UAAU,EAAEC,QAAQ,CAAC;AACxC"}
|
|
@@ -4,31 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NativeReanimated = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
8
|
+
var _checkCppVersion = require("../platform-specific/checkCppVersion");
|
|
9
|
+
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; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
12
|
class NativeReanimated {
|
|
15
13
|
constructor() {
|
|
16
14
|
let native = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
17
|
-
|
|
18
15
|
_defineProperty(this, "native", void 0);
|
|
19
|
-
|
|
20
16
|
_defineProperty(this, "InnerNativeModule", void 0);
|
|
21
|
-
|
|
22
17
|
if (global.__reanimatedModuleProxy === undefined && native) {
|
|
23
18
|
const {
|
|
24
19
|
ReanimatedModule
|
|
25
20
|
} = _reactNative.NativeModules;
|
|
26
21
|
ReanimatedModule === null || ReanimatedModule === void 0 ? void 0 : ReanimatedModule.installTurboModule();
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
this.InnerNativeModule = global.__reanimatedModuleProxy;
|
|
30
24
|
this.native = native;
|
|
31
|
-
|
|
32
25
|
if (native) {
|
|
33
26
|
if (this.InnerNativeModule === undefined) {
|
|
34
27
|
console.error(`[Reanimated] The native part of Reanimated doesn't seem to be initialized. This could be caused by\n\
|
|
@@ -37,76 +30,57 @@ class NativeReanimated {
|
|
|
37
30
|
- running in a brownfield app without manually initializing the native library`);
|
|
38
31
|
return;
|
|
39
32
|
}
|
|
40
|
-
|
|
41
|
-
(0, _checkVersion.checkVersion)();
|
|
33
|
+
(0, _checkCppVersion.checkCppVersion)();
|
|
42
34
|
}
|
|
43
35
|
}
|
|
44
|
-
|
|
45
36
|
installCoreFunctions(callGuard, valueUnpacker) {
|
|
46
37
|
return this.InnerNativeModule.installCoreFunctions(callGuard, valueUnpacker);
|
|
47
38
|
}
|
|
48
|
-
|
|
49
39
|
makeShareableClone(value, shouldPersistRemote) {
|
|
50
40
|
return this.InnerNativeModule.makeShareableClone(value, shouldPersistRemote);
|
|
51
41
|
}
|
|
52
|
-
|
|
53
42
|
makeSynchronizedDataHolder(valueRef) {
|
|
54
43
|
return this.InnerNativeModule.makeSynchronizedDataHolder(valueRef);
|
|
55
44
|
}
|
|
56
|
-
|
|
57
45
|
getDataSynchronously(ref) {
|
|
58
46
|
return this.InnerNativeModule.getDataSynchronously(ref);
|
|
59
47
|
}
|
|
60
|
-
|
|
61
48
|
updateDataSynchronously(ref, value) {
|
|
62
49
|
this.InnerNativeModule.updateDataSynchronously(ref, value);
|
|
63
50
|
}
|
|
64
|
-
|
|
65
51
|
scheduleOnUI(shareable) {
|
|
66
52
|
return this.InnerNativeModule.scheduleOnUI(shareable);
|
|
67
53
|
}
|
|
68
|
-
|
|
69
54
|
registerSensor(sensorType, interval, iosReferenceFrame, handler) {
|
|
70
55
|
return this.InnerNativeModule.registerSensor(sensorType, interval, iosReferenceFrame, handler);
|
|
71
56
|
}
|
|
72
|
-
|
|
73
57
|
unregisterSensor(sensorId) {
|
|
74
58
|
return this.InnerNativeModule.unregisterSensor(sensorId);
|
|
75
59
|
}
|
|
76
|
-
|
|
77
60
|
registerEventHandler(eventHash, eventHandler) {
|
|
78
61
|
return this.InnerNativeModule.registerEventHandler(eventHash, eventHandler);
|
|
79
62
|
}
|
|
80
|
-
|
|
81
63
|
unregisterEventHandler(id) {
|
|
82
64
|
return this.InnerNativeModule.unregisterEventHandler(id);
|
|
83
65
|
}
|
|
84
|
-
|
|
85
66
|
getViewProp(viewTag, propName, callback) {
|
|
86
67
|
return this.InnerNativeModule.getViewProp(viewTag, propName, callback);
|
|
87
68
|
}
|
|
88
|
-
|
|
89
69
|
configureLayoutAnimation(viewTag, type, sharedTransitionTag, config) {
|
|
90
70
|
this.InnerNativeModule.configureLayoutAnimation(viewTag, type, sharedTransitionTag, config);
|
|
91
71
|
}
|
|
92
|
-
|
|
93
72
|
enableLayoutAnimations(flag) {
|
|
94
73
|
this.InnerNativeModule.enableLayoutAnimations(flag);
|
|
95
74
|
}
|
|
96
|
-
|
|
97
75
|
configureProps(uiProps, nativeProps) {
|
|
98
76
|
this.InnerNativeModule.configureProps(uiProps, nativeProps);
|
|
99
77
|
}
|
|
100
|
-
|
|
101
78
|
subscribeForKeyboardEvents(handler, isStatusBarTranslucent) {
|
|
102
79
|
return this.InnerNativeModule.subscribeForKeyboardEvents(handler, isStatusBarTranslucent);
|
|
103
80
|
}
|
|
104
|
-
|
|
105
81
|
unsubscribeFromKeyboardEvents(listenerId) {
|
|
106
82
|
this.InnerNativeModule.unsubscribeFromKeyboardEvents(listenerId);
|
|
107
83
|
}
|
|
108
|
-
|
|
109
84
|
}
|
|
110
|
-
|
|
111
85
|
exports.NativeReanimated = NativeReanimated;
|
|
112
86
|
//# sourceMappingURL=NativeReanimated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeReanimated","constructor","native","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_checkCppVersion","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","NativeReanimated","constructor","native","arguments","length","global","__reanimatedModuleProxy","ReanimatedModule","NativeModules","installTurboModule","InnerNativeModule","console","error","checkCppVersion","installCoreFunctions","callGuard","valueUnpacker","makeShareableClone","shouldPersistRemote","makeSynchronizedDataHolder","valueRef","getDataSynchronously","ref","updateDataSynchronously","scheduleOnUI","shareable","registerSensor","sensorType","interval","iosReferenceFrame","handler","unregisterSensor","sensorId","registerEventHandler","eventHash","eventHandler","unregisterEventHandler","id","getViewProp","viewTag","propName","callback","configureLayoutAnimation","type","sharedTransitionTag","config","enableLayoutAnimations","flag","configureProps","uiProps","nativeProps","subscribeForKeyboardEvents","isStatusBarTranslucent","unsubscribeFromKeyboardEvents","listenerId","exports"],"sources":["NativeReanimated.ts"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport {\n ShareableRef,\n ShareableSyncDataHolderRef,\n Value3D,\n ValueRotation,\n} from '../commonTypes';\nimport {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from '../layoutReanimation';\nimport { checkCppVersion } from '../platform-specific/checkCppVersion';\n\nexport class NativeReanimated {\n native: boolean;\n private InnerNativeModule: any;\n\n constructor(native = true) {\n if (global.__reanimatedModuleProxy === undefined && native) {\n const { ReanimatedModule } = NativeModules;\n ReanimatedModule?.installTurboModule();\n }\n this.InnerNativeModule = global.__reanimatedModuleProxy;\n this.native = native;\n if (native) {\n if (this.InnerNativeModule === undefined) {\n console.error(\n `[Reanimated] The native part of Reanimated doesn't seem to be initialized. This could be caused by\\n\\\n - not rebuilding the app after installing or upgrading Reanimated\\n\\\n - trying to run Reanimated on an unsupported platform\\n\\\n - running in a brownfield app without manually initializing the native library`\n );\n return;\n }\n checkCppVersion();\n }\n }\n\n installCoreFunctions(\n callGuard: <T extends Array<any>, U>(\n fn: (...args: T) => U,\n ...args: T\n ) => void,\n valueUnpacker: <T>(value: T) => T\n ): void {\n return this.InnerNativeModule.installCoreFunctions(\n callGuard,\n valueUnpacker\n );\n }\n\n makeShareableClone<T>(\n value: T,\n shouldPersistRemote: boolean\n ): ShareableRef<T> {\n return this.InnerNativeModule.makeShareableClone(\n value,\n shouldPersistRemote\n );\n }\n\n makeSynchronizedDataHolder<T>(\n valueRef: ShareableRef<T>\n ): ShareableSyncDataHolderRef<T> {\n return this.InnerNativeModule.makeSynchronizedDataHolder(valueRef);\n }\n\n getDataSynchronously<T>(ref: ShareableSyncDataHolderRef<T>): T {\n return this.InnerNativeModule.getDataSynchronously(ref);\n }\n\n updateDataSynchronously<T>(\n ref: ShareableSyncDataHolderRef<T>,\n value: T\n ): void {\n this.InnerNativeModule.updateDataSynchronously(ref, value);\n }\n\n scheduleOnUI<T>(shareable: ShareableRef<T>) {\n return this.InnerNativeModule.scheduleOnUI(shareable);\n }\n\n registerSensor<T>(\n sensorType: number,\n interval: number,\n iosReferenceFrame: number,\n handler: ShareableRef<T> | ((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 eventHash: string,\n eventHandler: ShareableRef<T>\n ): string {\n return this.InnerNativeModule.registerEventHandler(eventHash, eventHandler);\n }\n\n unregisterEventHandler(id: string): void {\n return this.InnerNativeModule.unregisterEventHandler(id);\n }\n\n getViewProp<T>(\n viewTag: string,\n propName: string,\n callback?: (result: T) => void\n ): Promise<T> {\n return this.InnerNativeModule.getViewProp(viewTag, propName, callback);\n }\n\n configureLayoutAnimation(\n viewTag: number,\n type: LayoutAnimationType,\n sharedTransitionTag: string,\n config: ShareableRef<Keyframe | LayoutAnimationFunction>\n ) {\n this.InnerNativeModule.configureLayoutAnimation(\n viewTag,\n type,\n sharedTransitionTag,\n config\n );\n }\n\n enableLayoutAnimations(flag: boolean): void {\n this.InnerNativeModule.enableLayoutAnimations(flag);\n }\n\n configureProps(uiProps: string[], nativeProps: string[]): void {\n this.InnerNativeModule.configureProps(uiProps, nativeProps);\n }\n\n subscribeForKeyboardEvents(\n handler: ShareableRef<number>,\n isStatusBarTranslucent: boolean\n ): number {\n return this.InnerNativeModule.subscribeForKeyboardEvents(\n handler,\n isStatusBarTranslucent\n );\n }\n\n unsubscribeFromKeyboardEvents(listenerId: number): void {\n this.InnerNativeModule.unsubscribeFromKeyboardEvents(listenerId);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAWA,IAAAC,gBAAA,GAAAD,OAAA;AAAuE,SAAAE,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,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAEhE,MAAMU,gBAAgB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ACC,OAAO,EAAEC,WAAW,CAAC;EAC7D;EAEAC,0BAA0BA,CACxBrB,OAA6B,EAC7BsB,sBAA+B,EACvB;IACR,OAAO,IAAI,CAAC1C,iBAAiB,CAACyC,0BAA0B,CACtDrB,OAAO,EACPsB,sBAAsB,CACvB;EACH;EAEAC,6BAA6BA,CAACC,UAAkB,EAAQ;IACtD,IAAI,CAAC5C,iBAAiB,CAAC2C,6BAA6B,CAACC,UAAU,CAAC;EAClE;AACF;AAACC,OAAA,CAAAvD,gBAAA,GAAAA,gBAAA"}
|
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _jsReanimated = _interopRequireDefault(require("../js-reanimated"));
|
|
9
|
-
|
|
10
8
|
var _PlatformChecker = require("../PlatformChecker");
|
|
11
|
-
|
|
12
9
|
var _NativeReanimated = require("./NativeReanimated");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
let exportedModule;
|
|
17
|
-
|
|
18
12
|
if ((0, _PlatformChecker.shouldBeUseWeb)()) {
|
|
19
13
|
exportedModule = _jsReanimated.default;
|
|
20
14
|
} else {
|
|
21
15
|
exportedModule = new _NativeReanimated.NativeReanimated();
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
var _default = exportedModule;
|
|
25
18
|
exports.default = _default;
|
|
26
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["exportedModule","shouldBeUseWeb","reanimatedJS","NativeReanimated"],"sources":["index.ts"],"sourcesContent":["import reanimatedJS from '../js-reanimated';\nimport { shouldBeUseWeb } from '../PlatformChecker';\nimport { NativeReanimated } from './NativeReanimated';\n\nlet exportedModule;\nif (shouldBeUseWeb()) {\n exportedModule = reanimatedJS;\n} else {\n exportedModule = new NativeReanimated();\n}\n\nexport default exportedModule as NativeReanimated;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_jsReanimated","_interopRequireDefault","require","_PlatformChecker","_NativeReanimated","obj","__esModule","default","exportedModule","shouldBeUseWeb","reanimatedJS","NativeReanimated","_default","exports"],"sources":["index.ts"],"sourcesContent":["import reanimatedJS from '../js-reanimated';\nimport { shouldBeUseWeb } from '../PlatformChecker';\nimport { NativeReanimated } from './NativeReanimated';\n\nlet exportedModule;\nif (shouldBeUseWeb()) {\n exportedModule = reanimatedJS;\n} else {\n exportedModule = new NativeReanimated();\n}\n\nexport default exportedModule as NativeReanimated;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAAsD,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEtD,IAAIG,cAAc;AAClB,IAAI,IAAAC,+BAAc,GAAE,EAAE;EACpBD,cAAc,GAAGE,qBAAY;AAC/B,CAAC,MAAM;EACLF,cAAc,GAAG,IAAIG,kCAAgB,EAAE;AACzC;AAAC,IAAAC,QAAA,GAEcJ,cAAc;AAAAK,OAAA,CAAAN,OAAA,GAAAK,QAAA"}
|
|
@@ -8,25 +8,19 @@ exports.isJest = isJest;
|
|
|
8
8
|
exports.isWeb = isWeb;
|
|
9
9
|
exports.nativeShouldBeMock = nativeShouldBeMock;
|
|
10
10
|
exports.shouldBeUseWeb = shouldBeUseWeb;
|
|
11
|
-
|
|
12
11
|
var _reactNative = require("react-native");
|
|
13
|
-
|
|
14
12
|
function isJest() {
|
|
15
13
|
return !!process.env.JEST_WORKER_ID;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
function isChromeDebugger() {
|
|
19
16
|
return !global.nativeCallSyncHook || global.__REMOTEDEV__;
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
function isWeb() {
|
|
23
19
|
return _reactNative.Platform.OS === 'web';
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
function shouldBeUseWeb() {
|
|
27
22
|
return isJest() || isChromeDebugger() || isWeb();
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
function nativeShouldBeMock() {
|
|
31
25
|
return isJest() || isChromeDebugger();
|
|
32
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","isWeb","Platform","OS","shouldBeUseWeb","nativeShouldBeMock"],"sources":["PlatformChecker.ts"],"sourcesContent":["import { Platform } from 'react-native';\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\nexport function isChromeDebugger(): boolean {\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb();\n}\n\nexport function nativeShouldBeMock() {\n return isJest() || isChromeDebugger();\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","isJest","process","env","JEST_WORKER_ID","isChromeDebugger","global","nativeCallSyncHook","__REMOTEDEV__","isWeb","Platform","OS","shouldBeUseWeb","nativeShouldBeMock"],"sources":["PlatformChecker.ts"],"sourcesContent":["import { Platform } from 'react-native';\n\nexport function isJest(): boolean {\n return !!process.env.JEST_WORKER_ID;\n}\n\nexport function isChromeDebugger(): boolean {\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n\nexport function isWeb(): boolean {\n return Platform.OS === 'web';\n}\n\nexport function shouldBeUseWeb() {\n return isJest() || isChromeDebugger() || isWeb();\n}\n\nexport function nativeShouldBeMock() {\n return isJest() || isChromeDebugger();\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,SAASC,MAAMA,CAAA,EAAY;EAChC,OAAO,CAAC,CAACC,OAAO,CAACC,GAAG,CAACC,cAAc;AACrC;AAEO,SAASC,gBAAgBA,CAAA,EAAY;EAC1C,OAAO,CAAEC,MAAM,CAASC,kBAAkB,IAAKD,MAAM,CAASE,aAAa;AAC7E;AAEO,SAASC,KAAKA,CAAA,EAAY;EAC/B,OAAOC,qBAAQ,CAACC,EAAE,KAAK,KAAK;AAC9B;AAEO,SAASC,cAAcA,CAAA,EAAG;EAC/B,OAAOX,MAAM,EAAE,IAAII,gBAAgB,EAAE,IAAII,KAAK,EAAE;AAClD;AAEO,SAASI,kBAAkBA,CAAA,EAAG;EACnC,OAAOZ,MAAM,EAAE,IAAII,gBAAgB,EAAE;AACvC"}
|
|
@@ -5,32 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.TextInputAdapter = exports.SVGAdapter = void 0;
|
|
7
7
|
exports.createAnimatedPropAdapter = createAnimatedPropAdapter;
|
|
8
|
-
|
|
9
8
|
var _ConfigHelper = require("../ConfigHelper");
|
|
10
|
-
|
|
11
9
|
function createAnimatedPropAdapter(adapter, nativeProps) {
|
|
12
|
-
const nativePropsToAdd = {};
|
|
13
|
-
|
|
10
|
+
const nativePropsToAdd = {};
|
|
11
|
+
// eslint-disable-next-line no-unused-expressions
|
|
14
12
|
nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.forEach(prop => {
|
|
15
13
|
nativePropsToAdd[prop] = true;
|
|
16
14
|
});
|
|
17
15
|
(0, _ConfigHelper.addWhitelistedNativeProps)(nativePropsToAdd);
|
|
18
16
|
return adapter;
|
|
19
|
-
}
|
|
17
|
+
}
|
|
20
18
|
|
|
19
|
+
// ADAPTERS
|
|
21
20
|
|
|
22
21
|
const SVGAdapter = createAnimatedPropAdapter(props => {
|
|
23
22
|
'worklet';
|
|
24
23
|
|
|
25
|
-
const keys = Object.keys(props);
|
|
26
|
-
|
|
24
|
+
const keys = Object.keys(props);
|
|
25
|
+
// transform
|
|
27
26
|
if (keys.includes('transform')) {
|
|
28
27
|
if (Array.isArray(props.transform)) {
|
|
29
28
|
// case of array with 6 values => https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/elements/Shape.tsx#L200
|
|
30
29
|
if (props.transform.length !== 6) {
|
|
31
30
|
throw new Error(`invalid transform length of ${props.transform.length}, should be 6`);
|
|
32
31
|
}
|
|
33
|
-
|
|
34
32
|
const transform = props.transform;
|
|
35
33
|
const x = props.x ?? 0;
|
|
36
34
|
const y = props.y ?? 0;
|
|
@@ -50,15 +48,15 @@ const SVGAdapter = createAnimatedPropAdapter(props => {
|
|
|
50
48
|
translateY: parseFloat(arr[1])
|
|
51
49
|
}];
|
|
52
50
|
}
|
|
53
|
-
}
|
|
54
|
-
|
|
51
|
+
}
|
|
52
|
+
// todo: other props
|
|
55
53
|
});
|
|
56
54
|
exports.SVGAdapter = SVGAdapter;
|
|
57
55
|
const TextInputAdapter = createAnimatedPropAdapter(props => {
|
|
58
56
|
'worklet';
|
|
59
57
|
|
|
60
|
-
const keys = Object.keys(props);
|
|
61
|
-
|
|
58
|
+
const keys = Object.keys(props);
|
|
59
|
+
// convert text to value like RN does here: https://github.com/facebook/react-native/blob/f2c6279ca497b34d5a2bfbb6f2d33dc7a7bea02a/Libraries/Components/TextInput/TextInput.js#L878
|
|
62
60
|
if (keys.includes('value')) {
|
|
63
61
|
props.text = props.value;
|
|
64
62
|
delete props.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createAnimatedPropAdapter","adapter","nativeProps","nativePropsToAdd","forEach","prop","addWhitelistedNativeProps","SVGAdapter","props","keys","Object","includes","Array","isArray","transform","length","Error","x","y","translateX","translateY","arr","replace","split","parseFloat","TextInputAdapter","text","value"],"sources":["PropAdapters.ts"],"sourcesContent":["import { addWhitelistedNativeProps } from '../ConfigHelper';\nimport { AdapterWorkletFunction } from './commonTypes';\n\nexport function createAnimatedPropAdapter(\n adapter: AdapterWorkletFunction,\n nativeProps?: string[]\n): AdapterWorkletFunction {\n const nativePropsToAdd: { [key: string]: boolean } = {};\n // eslint-disable-next-line no-unused-expressions\n nativeProps?.forEach((prop) => {\n nativePropsToAdd[prop] = true;\n });\n addWhitelistedNativeProps(nativePropsToAdd);\n return adapter;\n}\n\n// ADAPTERS\n\nexport const SVGAdapter: AdapterWorkletFunction = createAnimatedPropAdapter(\n (props) => {\n 'worklet';\n const keys = Object.keys(props);\n // transform\n if (keys.includes('transform')) {\n if (Array.isArray(props.transform)) {\n // case of array with 6 values => https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/elements/Shape.tsx#L200\n if (props.transform.length !== 6) {\n throw new Error(\n `invalid transform length of ${props.transform.length}, should be 6`\n );\n }\n const transform: number[] = props.transform as number[];\n const x: number = (props.x as number) ?? 0;\n const y: number = (props.y as number) ?? 0;\n props.transform = [\n { translateX: transform[0] * x + transform[2] * y + transform[4] },\n { translateY: transform[1] * x + transform[3] * y + transform[5] },\n ];\n } else if (typeof props.transform === 'string') {\n // case of string 'translate(translateX translateY)'\n // todo: handle other cases of transform string like here https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/lib/extract/extractTransform.ts#L184\n const transform: string = props.transform as string;\n const arr = transform\n .replace('translate(', '')\n .replace(')', '')\n .split(' ');\n props.transform = [\n { translateX: parseFloat(arr[0]) },\n { translateY: parseFloat(arr[1]) },\n ];\n }\n }\n // todo: other props\n }\n);\n\nexport const TextInputAdapter = createAnimatedPropAdapter(\n (props) => {\n 'worklet';\n const keys = Object.keys(props);\n // convert text to value like RN does here: https://github.com/facebook/react-native/blob/f2c6279ca497b34d5a2bfbb6f2d33dc7a7bea02a/Libraries/Components/TextInput/TextInput.js#L878\n if (keys.includes('value')) {\n props.text = props.value;\n delete props.value;\n }\n },\n ['text']\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_ConfigHelper","require","createAnimatedPropAdapter","adapter","nativeProps","nativePropsToAdd","forEach","prop","addWhitelistedNativeProps","SVGAdapter","props","keys","Object","includes","Array","isArray","transform","length","Error","x","y","translateX","translateY","arr","replace","split","parseFloat","exports","TextInputAdapter","text","value"],"sources":["PropAdapters.ts"],"sourcesContent":["import { addWhitelistedNativeProps } from '../ConfigHelper';\nimport { AdapterWorkletFunction } from './commonTypes';\n\nexport function createAnimatedPropAdapter(\n adapter: AdapterWorkletFunction,\n nativeProps?: string[]\n): AdapterWorkletFunction {\n const nativePropsToAdd: { [key: string]: boolean } = {};\n // eslint-disable-next-line no-unused-expressions\n nativeProps?.forEach((prop) => {\n nativePropsToAdd[prop] = true;\n });\n addWhitelistedNativeProps(nativePropsToAdd);\n return adapter;\n}\n\n// ADAPTERS\n\nexport const SVGAdapter: AdapterWorkletFunction = createAnimatedPropAdapter(\n (props) => {\n 'worklet';\n const keys = Object.keys(props);\n // transform\n if (keys.includes('transform')) {\n if (Array.isArray(props.transform)) {\n // case of array with 6 values => https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/elements/Shape.tsx#L200\n if (props.transform.length !== 6) {\n throw new Error(\n `invalid transform length of ${props.transform.length}, should be 6`\n );\n }\n const transform: number[] = props.transform as number[];\n const x: number = (props.x as number) ?? 0;\n const y: number = (props.y as number) ?? 0;\n props.transform = [\n { translateX: transform[0] * x + transform[2] * y + transform[4] },\n { translateY: transform[1] * x + transform[3] * y + transform[5] },\n ];\n } else if (typeof props.transform === 'string') {\n // case of string 'translate(translateX translateY)'\n // todo: handle other cases of transform string like here https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/lib/extract/extractTransform.ts#L184\n const transform: string = props.transform as string;\n const arr = transform\n .replace('translate(', '')\n .replace(')', '')\n .split(' ');\n props.transform = [\n { translateX: parseFloat(arr[0]) },\n { translateY: parseFloat(arr[1]) },\n ];\n }\n }\n // todo: other props\n }\n);\n\nexport const TextInputAdapter = createAnimatedPropAdapter(\n (props) => {\n 'worklet';\n const keys = Object.keys(props);\n // convert text to value like RN does here: https://github.com/facebook/react-native/blob/f2c6279ca497b34d5a2bfbb6f2d33dc7a7bea02a/Libraries/Components/TextInput/TextInput.js#L878\n if (keys.includes('value')) {\n props.text = props.value;\n delete props.value;\n }\n },\n ['text']\n);\n"],"mappings":";;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAGO,SAASC,yBAAyBA,CACvCC,OAA+B,EAC/BC,WAAsB,EACE;EACxB,MAAMC,gBAA4C,GAAG,CAAC,CAAC;EACvD;EACAD,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEE,OAAO,CAAEC,IAAI,IAAK;IAC7BF,gBAAgB,CAACE,IAAI,CAAC,GAAG,IAAI;EAC/B,CAAC,CAAC;EACF,IAAAC,uCAAyB,EAACH,gBAAgB,CAAC;EAC3C,OAAOF,OAAO;AAChB;;AAEA;;AAEO,MAAMM,UAAkC,GAAGP,yBAAyB,CACxEQ,KAAK,IAAK;EACT,SAAS;;EACT,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,KAAK,CAAC;EAC/B;EACA,IAAIC,IAAI,CAACE,QAAQ,CAAC,WAAW,CAAC,EAAE;IAC9B,IAAIC,KAAK,CAACC,OAAO,CAACL,KAAK,CAACM,SAAS,CAAC,EAAE;MAClC;MACA,IAAIN,KAAK,CAACM,SAAS,CAACC,MAAM,KAAK,CAAC,EAAE;QAChC,MAAM,IAAIC,KAAK,CACZ,+BAA8BR,KAAK,CAACM,SAAS,CAACC,MAAO,eAAc,CACrE;MACH;MACA,MAAMD,SAAmB,GAAGN,KAAK,CAACM,SAAqB;MACvD,MAAMG,CAAS,GAAIT,KAAK,CAACS,CAAC,IAAe,CAAC;MAC1C,MAAMC,CAAS,GAAIV,KAAK,CAACU,CAAC,IAAe,CAAC;MAC1C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
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.updatePropsJestWrapper = exports.updateProps = exports.default = exports.colorProps = exports.ColorProperties = void 0;
|
|
7
|
-
|
|
8
7
|
var _Colors = require("./Colors");
|
|
9
|
-
|
|
10
8
|
var _core = require("./core");
|
|
11
|
-
|
|
12
9
|
var _jsReanimated = require("./js-reanimated");
|
|
13
|
-
|
|
14
10
|
var _PlatformChecker = require("./PlatformChecker");
|
|
15
|
-
|
|
16
11
|
/* global _updatePropsPaper _updatePropsFabric */
|
|
12
|
+
|
|
17
13
|
// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes
|
|
18
14
|
const colorProps = ['backgroundColor', 'borderBottomColor', 'borderColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'borderStartColor', 'borderEndColor', 'color', 'shadowColor', 'textDecorationColor', 'tintColor', 'textShadowColor', 'overlayColor'];
|
|
19
15
|
exports.colorProps = colorProps;
|
|
20
16
|
const ColorProperties = !(0, _core.isConfigured)() ? [] : (0, _core.makeShareable)(colorProps);
|
|
21
17
|
exports.ColorProperties = ColorProperties;
|
|
22
18
|
let updatePropsByPlatform;
|
|
23
|
-
|
|
24
19
|
if ((0, _PlatformChecker.shouldBeUseWeb)()) {
|
|
25
20
|
updatePropsByPlatform = (_, updates, maybeViewRef) => {
|
|
26
21
|
'worklet';
|
|
@@ -41,7 +36,6 @@ if ((0, _PlatformChecker.shouldBeUseWeb)()) {
|
|
|
41
36
|
updates[key] = (0, _Colors.processColor)(updates[key]);
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
|
-
|
|
45
39
|
viewDescriptors.value.forEach(viewDescriptor => {
|
|
46
40
|
_updatePropsFabric(viewDescriptor.shadowNodeWrapper, updates);
|
|
47
41
|
});
|
|
@@ -55,27 +49,24 @@ if ((0, _PlatformChecker.shouldBeUseWeb)()) {
|
|
|
55
49
|
updates[key] = (0, _Colors.processColor)(updates[key]);
|
|
56
50
|
}
|
|
57
51
|
}
|
|
58
|
-
|
|
59
52
|
viewDescriptors.value.forEach(viewDescriptor => {
|
|
60
53
|
_updatePropsPaper(viewDescriptor.tag, viewDescriptor.name || 'RCTView', updates);
|
|
61
54
|
});
|
|
62
55
|
};
|
|
63
56
|
}
|
|
64
57
|
}
|
|
65
|
-
|
|
66
58
|
const updateProps = updatePropsByPlatform;
|
|
67
59
|
exports.updateProps = updateProps;
|
|
68
|
-
|
|
69
60
|
const updatePropsJestWrapper = (viewDescriptors, updates, maybeViewRef, animatedStyle, adapters) => {
|
|
70
61
|
adapters.forEach(adapter => {
|
|
71
62
|
adapter(updates);
|
|
72
63
|
});
|
|
73
|
-
animatedStyle.current.value = {
|
|
64
|
+
animatedStyle.current.value = {
|
|
65
|
+
...animatedStyle.current.value,
|
|
74
66
|
...updates
|
|
75
67
|
};
|
|
76
68
|
updateProps(viewDescriptors, updates, maybeViewRef);
|
|
77
69
|
};
|
|
78
|
-
|
|
79
70
|
exports.updatePropsJestWrapper = updatePropsJestWrapper;
|
|
80
71
|
var _default = updateProps;
|
|
81
72
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["colorProps","ColorProperties","isConfigured","makeShareable","updatePropsByPlatform","shouldBeUseWeb","_","updates","maybeViewRef","items","forEach","item","_updatePropsJS","global","_IS_FABRIC","viewDescriptors","key","indexOf","processColor","value","viewDescriptor","_updatePropsFabric","shadowNodeWrapper","_updatePropsPaper","tag","name","updateProps","updatePropsJestWrapper","animatedStyle","adapters","adapter","current"],"sources":["UpdateProps.ts"],"sourcesContent":["/* global _updatePropsPaper _updatePropsFabric */\nimport { MutableRefObject } from 'react';\nimport { processColor } from './Colors';\nimport { AnimatedStyle, SharedValue, StyleProps } from './commonTypes';\nimport { makeShareable, isConfigured } from './core';\nimport { Descriptor } from './hook/commonTypes';\nimport { _updatePropsJS } from './js-reanimated';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport { ViewRefSet } from './ViewDescriptorsSet';\n\n// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes\nexport const colorProps = [\n 'backgroundColor',\n 'borderBottomColor',\n 'borderColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderTopColor',\n 'borderStartColor',\n 'borderEndColor',\n 'color',\n 'shadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'textShadowColor',\n 'overlayColor',\n];\n\nexport const ColorProperties = !isConfigured() ? [] : makeShareable(colorProps);\n\nlet updatePropsByPlatform;\nif (shouldBeUseWeb()) {\n updatePropsByPlatform = (\n _: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n if (maybeViewRef) {\n maybeViewRef.items.forEach((item, _) => {\n _updatePropsJS(updates, item);\n });\n }\n };\n} else {\n if (global._IS_FABRIC) {\n updatePropsByPlatform = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n _: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n\n for (const key in updates) {\n if (ColorProperties.indexOf(key) !== -1) {\n updates[key] = processColor(updates[key]);\n }\n }\n\n viewDescriptors.value.forEach((viewDescriptor) => {\n _updatePropsFabric(viewDescriptor.shadowNodeWrapper, updates);\n });\n };\n } else {\n updatePropsByPlatform = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n _: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n\n for (const key in updates) {\n if (ColorProperties.indexOf(key) !== -1) {\n updates[key] = processColor(updates[key]);\n }\n }\n viewDescriptors.value.forEach((viewDescriptor) => {\n _updatePropsPaper(\n viewDescriptor.tag,\n viewDescriptor.name || 'RCTView',\n updates\n );\n });\n };\n }\n}\n\nexport const updateProps: (\n viewDescriptor: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined\n) => void = updatePropsByPlatform;\n\nexport const updatePropsJestWrapper = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined,\n animatedStyle: MutableRefObject<AnimatedStyle>,\n adapters: ((updates: AnimatedStyle) => 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"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Colors","require","_core","_jsReanimated","_PlatformChecker","colorProps","exports","ColorProperties","isConfigured","makeShareable","updatePropsByPlatform","shouldBeUseWeb","_","updates","maybeViewRef","items","forEach","item","_updatePropsJS","global","_IS_FABRIC","viewDescriptors","key","indexOf","processColor","value","viewDescriptor","_updatePropsFabric","shadowNodeWrapper","_updatePropsPaper","tag","name","updateProps","updatePropsJestWrapper","animatedStyle","adapters","adapter","current","_default","default"],"sources":["UpdateProps.ts"],"sourcesContent":["/* global _updatePropsPaper _updatePropsFabric */\nimport { MutableRefObject } from 'react';\nimport { processColor } from './Colors';\nimport { AnimatedStyle, SharedValue, StyleProps } from './commonTypes';\nimport { makeShareable, isConfigured } from './core';\nimport { Descriptor } from './hook/commonTypes';\nimport { _updatePropsJS } from './js-reanimated';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport { ViewRefSet } from './ViewDescriptorsSet';\n\n// copied from react-native/Libraries/Components/View/ReactNativeStyleAttributes\nexport const colorProps = [\n 'backgroundColor',\n 'borderBottomColor',\n 'borderColor',\n 'borderLeftColor',\n 'borderRightColor',\n 'borderTopColor',\n 'borderStartColor',\n 'borderEndColor',\n 'color',\n 'shadowColor',\n 'textDecorationColor',\n 'tintColor',\n 'textShadowColor',\n 'overlayColor',\n];\n\nexport const ColorProperties = !isConfigured() ? [] : makeShareable(colorProps);\n\nlet updatePropsByPlatform;\nif (shouldBeUseWeb()) {\n updatePropsByPlatform = (\n _: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n if (maybeViewRef) {\n maybeViewRef.items.forEach((item, _) => {\n _updatePropsJS(updates, item);\n });\n }\n };\n} else {\n if (global._IS_FABRIC) {\n updatePropsByPlatform = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n _: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n\n for (const key in updates) {\n if (ColorProperties.indexOf(key) !== -1) {\n updates[key] = processColor(updates[key]);\n }\n }\n\n viewDescriptors.value.forEach((viewDescriptor) => {\n _updatePropsFabric!(viewDescriptor.shadowNodeWrapper, updates);\n });\n };\n } else {\n updatePropsByPlatform = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n _: ViewRefSet<any> | undefined\n ): void => {\n 'worklet';\n\n for (const key in updates) {\n if (ColorProperties.indexOf(key) !== -1) {\n updates[key] = processColor(updates[key]);\n }\n }\n viewDescriptors.value.forEach((viewDescriptor) => {\n _updatePropsPaper!(\n viewDescriptor.tag,\n viewDescriptor.name || 'RCTView',\n updates\n );\n });\n };\n }\n}\n\nexport const updateProps: (\n viewDescriptor: SharedValue<Descriptor[]>,\n updates: StyleProps | AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined\n) => void = updatePropsByPlatform;\n\nexport const updatePropsJestWrapper = (\n viewDescriptors: SharedValue<Descriptor[]>,\n updates: AnimatedStyle,\n maybeViewRef: ViewRefSet<any> | undefined,\n animatedStyle: MutableRefObject<AnimatedStyle>,\n adapters: ((updates: AnimatedStyle) => 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"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;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,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.makeViewDescriptorsSet = makeViewDescriptorsSet;
|
|
7
7
|
exports.makeViewsRefSet = makeViewsRefSet;
|
|
8
|
-
|
|
9
8
|
var _react = require("react");
|
|
10
|
-
|
|
11
9
|
var _core = require("./core");
|
|
12
|
-
|
|
13
10
|
function makeViewDescriptorsSet() {
|
|
14
11
|
const sharableViewDescriptors = (0, _core.makeMutable)([]);
|
|
15
12
|
const data = {
|
|
@@ -19,13 +16,11 @@ function makeViewDescriptorsSet() {
|
|
|
19
16
|
'worklet';
|
|
20
17
|
|
|
21
18
|
const index = descriptors.findIndex(descriptor => descriptor.tag === item.tag);
|
|
22
|
-
|
|
23
19
|
if (index !== -1) {
|
|
24
20
|
descriptors[index] = item;
|
|
25
21
|
} else {
|
|
26
22
|
descriptors.push(item);
|
|
27
23
|
}
|
|
28
|
-
|
|
29
24
|
return descriptors;
|
|
30
25
|
});
|
|
31
26
|
},
|
|
@@ -34,21 +29,17 @@ function makeViewDescriptorsSet() {
|
|
|
34
29
|
'worklet';
|
|
35
30
|
|
|
36
31
|
const index = descriptors.findIndex(descriptor => descriptor.tag === viewTag);
|
|
37
|
-
|
|
38
32
|
if (index !== -1) {
|
|
39
33
|
descriptors.splice(index, 1);
|
|
40
34
|
}
|
|
41
|
-
|
|
42
35
|
return descriptors;
|
|
43
36
|
});
|
|
44
37
|
}
|
|
45
38
|
};
|
|
46
39
|
return data;
|
|
47
40
|
}
|
|
48
|
-
|
|
49
41
|
function makeViewsRefSet() {
|
|
50
42
|
const ref = (0, _react.useRef)(null);
|
|
51
|
-
|
|
52
43
|
if (ref.current === null) {
|
|
53
44
|
const data = {
|
|
54
45
|
items: new Set(),
|
|
@@ -62,7 +53,6 @@ function makeViewsRefSet() {
|
|
|
62
53
|
};
|
|
63
54
|
ref.current = data;
|
|
64
55
|
}
|
|
65
|
-
|
|
66
56
|
return ref.current;
|
|
67
57
|
}
|
|
68
58
|
//# sourceMappingURL=ViewDescriptorsSet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["makeViewDescriptorsSet","sharableViewDescriptors","makeMutable","data","add","item","modify","descriptors","index","findIndex","descriptor","tag","push","remove","viewTag","splice","makeViewsRefSet","ref","useRef","current","items","Set","has","delete"],"sources":["ViewDescriptorsSet.ts"],"sourcesContent":["import { useRef } from 'react';\nimport { makeMutable } from './core';\nimport { SharedValue } from './commonTypes';\nimport { Descriptor } from './hook/commonTypes';\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 sharableViewDescriptors: SharedValue<Descriptor[]>;\n add: (item: Descriptor) => void;\n remove: (viewTag: number) => void;\n}\n\nexport function makeViewDescriptorsSet(): ViewDescriptorsSet {\n const sharableViewDescriptors = makeMutable<Descriptor[]>([]);\n const data: ViewDescriptorsSet = {\n sharableViewDescriptors,\n add: (item: Descriptor) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\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 });\n },\n\n remove: (viewTag: number) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\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 });\n },\n };\n return data;\n}\n\nexport function makeViewsRefSet<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":"
|
|
1
|
+
{"version":3,"names":["_react","require","_core","makeViewDescriptorsSet","sharableViewDescriptors","makeMutable","data","add","item","modify","descriptors","index","findIndex","descriptor","tag","push","remove","viewTag","splice","makeViewsRefSet","ref","useRef","current","items","Set","has","delete"],"sources":["ViewDescriptorsSet.ts"],"sourcesContent":["import { useRef } from 'react';\nimport { makeMutable } from './core';\nimport { SharedValue } from './commonTypes';\nimport { Descriptor } from './hook/commonTypes';\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 sharableViewDescriptors: SharedValue<Descriptor[]>;\n add: (item: Descriptor) => void;\n remove: (viewTag: number) => void;\n}\n\nexport function makeViewDescriptorsSet(): ViewDescriptorsSet {\n const sharableViewDescriptors = makeMutable<Descriptor[]>([]);\n const data: ViewDescriptorsSet = {\n sharableViewDescriptors,\n add: (item: Descriptor) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\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 });\n },\n\n remove: (viewTag: number) => {\n sharableViewDescriptors.modify((descriptors: Descriptor[]) => {\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 });\n },\n };\n return data;\n}\n\nexport function makeViewsRefSet<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,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAgBO,SAASE,sBAAsBA,CA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