react-native-reanimated 3.17.0-rc.0 → 3.17.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/reanimated/Fabric/ReanimatedCommitHook.cpp +23 -13
- package/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +5 -1
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.cpp +3 -0
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.cpp +162 -91
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.h +9 -2
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.cpp +7 -1
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.h +0 -1
- package/Common/cpp/reanimated/NativeModules/{NativeReanimatedModule.cpp → ReanimatedModuleProxy.cpp} +221 -156
- package/Common/cpp/reanimated/NativeModules/{NativeReanimatedModule.h → ReanimatedModuleProxy.h} +24 -28
- package/Common/cpp/reanimated/NativeModules/{NativeReanimatedModuleSpec.cpp → ReanimatedModuleProxySpec.cpp} +53 -63
- package/Common/cpp/reanimated/NativeModules/{NativeReanimatedModuleSpec.h → ReanimatedModuleProxySpec.h} +2 -9
- package/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp +6 -8
- package/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.h +2 -2
- package/Common/cpp/reanimated/Tools/PlatformDepMethodsHolder.h +1 -1
- package/Common/cpp/reanimated/Tools/ReanimatedSystraceSection.h +135 -0
- package/Common/cpp/worklets/NativeModules/WorkletsModuleProxy.cpp +47 -0
- package/Common/cpp/worklets/NativeModules/WorkletsModuleProxy.h +59 -0
- package/Common/cpp/worklets/NativeModules/WorkletsModuleProxySpec.cpp +27 -0
- package/Common/cpp/worklets/NativeModules/WorkletsModuleProxySpec.h +25 -0
- package/Common/cpp/worklets/SharedItems/Shareables.cpp +12 -2
- package/Common/cpp/worklets/Tools/Defs.h +10 -0
- package/Common/cpp/worklets/Tools/JSScheduler.cpp +0 -20
- package/Common/cpp/worklets/Tools/JSScheduler.h +0 -12
- package/Common/cpp/{reanimated → worklets}/Tools/PlatformLogger.h +2 -2
- package/Common/cpp/worklets/Tools/ReanimatedVersion.cpp +1 -1
- package/Common/cpp/{reanimated → worklets}/Tools/SingleInstanceChecker.h +10 -9
- package/Common/cpp/worklets/WorkletRuntime/RNRuntimeWorkletDecorator.cpp +4 -2
- package/Common/cpp/worklets/WorkletRuntime/RNRuntimeWorkletDecorator.h +2 -2
- package/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp +0 -6
- package/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h +2 -13
- package/Common/cpp/worklets/WorkletRuntime/ReanimatedRuntime.cpp +1 -0
- package/Common/cpp/worklets/WorkletRuntime/ReanimatedRuntime.h +0 -8
- package/Common/cpp/worklets/WorkletRuntime/WorkletRuntime.cpp +8 -2
- package/Common/cpp/worklets/WorkletRuntime/WorkletRuntime.h +8 -2
- package/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp +6 -0
- package/README.md +3 -4
- package/RNReanimated.podspec +21 -53
- package/android/CMakeLists.txt +20 -12
- package/android/build.gradle +11 -45
- package/android/src/{reactNativeVersionPatch/NativeProxyFabric/74 → fabric/java}/com/swmansion/reanimated/NativeProxy.java +24 -40
- package/android/src/fabric/java/com/swmansion/reanimated/ReaCompatibility.java +6 -0
- package/android/src/main/cpp/reanimated/CMakeLists.txt +22 -41
- package/android/src/main/cpp/reanimated/android/LayoutAnimations.cpp +4 -0
- package/android/src/main/cpp/reanimated/android/LayoutAnimations.h +2 -0
- package/android/src/main/cpp/reanimated/android/NativeProxy.cpp +70 -120
- package/android/src/main/cpp/reanimated/android/NativeProxy.h +12 -36
- package/android/src/main/cpp/reanimated/android/OnLoad.cpp +0 -2
- package/android/src/main/cpp/worklets/CMakeLists.txt +52 -106
- package/android/src/main/cpp/{reanimated → worklets}/android/AndroidUIScheduler.cpp +15 -5
- package/android/src/main/cpp/{reanimated → worklets}/android/AndroidUIScheduler.h +5 -3
- package/android/src/main/cpp/{reanimated → worklets}/android/PlatformLogger.cpp +4 -4
- package/android/src/main/cpp/worklets/android/WorkletsModule.cpp +39 -11
- package/android/src/main/cpp/worklets/android/WorkletsModule.h +22 -12
- package/android/src/main/cpp/worklets/android/WorkletsOnLoad.cpp +5 -2
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +26 -11
- package/android/src/{reactNativeVersionPatch/ReanimatedUIManager/latest → main/java}/com/swmansion/reanimated/ReanimatedModule.java +11 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +3 -3
- package/android/src/main/java/com/swmansion/reanimated/Utils.java +10 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +4 -2
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/TabNavigatorObserver.java +1 -1
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +3 -11
- package/android/src/main/java/com/swmansion/{reanimated → worklets}/AndroidUIScheduler.java +16 -4
- package/android/src/main/java/com/swmansion/worklets/JSCallInvokerResolver.java +27 -0
- package/android/src/main/java/com/swmansion/{reanimated/ReanimatedMessageQueueThread.java → worklets/WorkletsMessageQueueThread.java} +2 -2
- package/android/src/main/java/com/swmansion/{reanimated/ReanimatedMessageQueueThreadBase.java → worklets/WorkletsMessageQueueThreadBase.java} +3 -3
- package/android/src/main/java/com/swmansion/worklets/WorkletsModule.java +39 -9
- package/android/src/{reactNativeVersionPatch/NativeProxyPaper/latest → paper/java}/com/swmansion/reanimated/NativeProxy.java +13 -7
- package/android/src/paper/java/com/swmansion/reanimated/ReaCompatibility.java +2 -0
- package/apple/reanimated/apple/LayoutReanimation/REASharedTransitionManager.m +16 -0
- package/apple/reanimated/apple/REAModule.h +6 -9
- package/apple/reanimated/apple/REAModule.mm +50 -126
- package/apple/reanimated/apple/REANodesManager.h +0 -1
- package/apple/reanimated/apple/REANodesManager.mm +1 -8
- package/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm +91 -45
- package/apple/reanimated/apple/native/NativeProxy.h +5 -14
- package/apple/reanimated/apple/native/NativeProxy.mm +41 -92
- package/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.h +1 -1
- package/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm +3 -6
- package/apple/{reanimated/apple/native/REAIOSUIScheduler.h → worklets/apple/IOSUIScheduler.h} +3 -3
- package/apple/{reanimated/apple/native/REAIOSUIScheduler.mm → worklets/apple/IOSUIScheduler.mm} +4 -4
- package/apple/{reanimated/apple/native → worklets/apple}/PlatformLogger.mm +3 -3
- package/apple/{reanimated/apple/native/REAMessageThread.h → worklets/apple/WorkletsMessageThread.h} +1 -1
- package/apple/{reanimated/apple/native/REAMessageThread.mm → worklets/apple/WorkletsMessageThread.mm} +7 -7
- package/apple/worklets/apple/WorkletsModule.h +2 -2
- package/apple/worklets/apple/WorkletsModule.mm +31 -6
- package/lib/module/Animated.js +4 -4
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/Colors.js +18 -0
- package/lib/module/Colors.js.map +1 -1
- package/lib/module/ConfigHelper.js +1 -1
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/PropAdapters.js.map +1 -1
- package/lib/module/ReanimatedModule/NativeReanimated.js +2 -5
- package/lib/module/ReanimatedModule/NativeReanimated.js.map +1 -1
- package/lib/module/ReanimatedModule/index.web.js.map +1 -1
- package/lib/module/ReanimatedModule/js-reanimated/JSReanimated.js +3 -6
- package/lib/module/ReanimatedModule/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/ReanimatedModule/js-reanimated/index.js +11 -4
- package/lib/module/ReanimatedModule/js-reanimated/index.js.map +1 -1
- package/lib/module/ReanimatedModule/reanimatedModuleInstance.js +1 -1
- package/lib/module/ReanimatedModule/reanimatedModuleInstance.js.map +1 -1
- package/lib/module/ReducedMotion.js +1 -1
- package/lib/module/ReducedMotion.js.map +1 -1
- package/lib/module/Sensor.js +1 -1
- package/lib/module/Sensor.js.map +1 -1
- package/lib/module/UpdateLayoutAnimations.js +1 -1
- package/lib/module/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/UpdateProps.js +2 -2
- package/lib/module/UpdateProps.js.map +1 -1
- package/lib/module/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/WorkletEventHandler.js.map +1 -1
- package/lib/module/animation/clamp.js +1 -1
- package/lib/module/animation/clamp.js.map +1 -1
- package/lib/module/animation/decay/decay.js +10 -4
- package/lib/module/animation/decay/decay.js.map +1 -1
- package/lib/module/animation/decay/rigidDecay.js.map +1 -1
- package/lib/module/animation/delay.js.map +1 -1
- package/lib/module/animation/index.js +4 -4
- package/lib/module/animation/index.js.map +1 -1
- package/lib/module/animation/repeat.js.map +1 -1
- package/lib/module/animation/sequence.js +1 -1
- package/lib/module/animation/sequence.js.map +1 -1
- package/lib/module/animation/spring.js +1 -1
- package/lib/module/animation/spring.js.map +1 -1
- package/lib/module/animation/styleAnimation.js +2 -2
- package/lib/module/animation/styleAnimation.js.map +1 -1
- package/lib/module/animation/timing.js.map +1 -1
- package/lib/module/animation/util.js +12 -6
- package/lib/module/animation/util.js.map +1 -1
- package/lib/module/commonTypes.js.map +1 -1
- package/lib/module/component/FlatList.js +12 -14
- package/lib/module/component/FlatList.js.map +1 -1
- package/lib/module/component/Image.js.map +1 -1
- package/lib/module/component/LayoutAnimationConfig.js +9 -13
- package/lib/module/component/LayoutAnimationConfig.js.map +1 -1
- package/lib/module/component/PerformanceMonitor.js +25 -28
- package/lib/module/component/PerformanceMonitor.js.map +1 -1
- package/lib/module/component/ReducedMotionConfig.js +1 -1
- package/lib/module/component/ReducedMotionConfig.js.map +1 -1
- package/lib/module/component/ScrollView.js +5 -5
- package/lib/module/component/ScrollView.js.map +1 -1
- package/lib/module/component/Text.js.map +1 -1
- package/lib/module/component/View.js.map +1 -1
- package/lib/module/core.js +16 -10
- package/lib/module/core.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +4 -4
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +5 -6
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/NativeEventsManager.js +37 -10
- package/lib/module/createAnimatedComponent/NativeEventsManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/PropsFilter.js +3 -3
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +112 -84
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/culori/Colors.js +2 -0
- package/lib/module/culori/Colors.js.map +1 -0
- package/lib/module/culori/index.js +11 -0
- package/lib/module/culori/index.js.map +1 -0
- package/lib/module/culori/lrgb.js +65 -0
- package/lib/module/culori/lrgb.js.map +1 -0
- package/lib/module/culori/oklab.js +83 -0
- package/lib/module/culori/oklab.js.map +1 -0
- package/lib/module/fabricUtils.js +4 -11
- package/lib/module/fabricUtils.js.map +1 -1
- package/lib/module/hook/index.js +10 -10
- package/lib/module/hook/index.js.map +1 -1
- package/lib/module/hook/useAnimatedGestureHandler.js +1 -1
- package/lib/module/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/hook/useAnimatedKeyboard.js +3 -3
- package/lib/module/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/hook/useAnimatedProps.js +1 -1
- package/lib/module/hook/useAnimatedProps.js.map +1 -1
- package/lib/module/hook/useAnimatedReaction.js +1 -1
- package/lib/module/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/hook/useAnimatedRef.js +5 -5
- package/lib/module/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/hook/useAnimatedScrollHandler.js +1 -1
- package/lib/module/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/hook/useAnimatedSensor.js +1 -1
- package/lib/module/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/hook/useAnimatedStyle.js +40 -10
- package/lib/module/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/hook/useComposedEventHandler.js +1 -1
- package/lib/module/hook/useComposedEventHandler.js.map +1 -1
- package/lib/module/hook/useDerivedValue.js.map +1 -1
- package/lib/module/hook/useEvent.js.map +1 -1
- package/lib/module/hook/useFrameCallback.js.map +1 -1
- package/lib/module/hook/useHandler.js +2 -2
- package/lib/module/hook/useHandler.js.map +1 -1
- package/lib/module/hook/useScrollViewOffset.js +2 -2
- package/lib/module/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/hook/useSharedValue.js.map +1 -1
- package/lib/module/hook/useWorkletCallback.js.map +1 -1
- package/lib/module/index.js +36 -36
- package/lib/module/index.js.map +1 -1
- package/lib/module/initializers.js +11 -4
- package/lib/module/initializers.js.map +1 -1
- package/lib/module/interpolateColor.js +108 -39
- package/lib/module/interpolateColor.js.map +1 -1
- package/lib/module/jestUtils.js +2 -2
- package/lib/module/jestUtils.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +1 -1
- package/lib/module/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +2 -2
- package/lib/module/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/Keyframe.js +7 -3
- package/lib/module/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/layoutReanimation/defaultAnimations/index.js +6 -6
- package/lib/module/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/module/layoutReanimation/defaultTransitions/CurvedTransition.js +2 -2
- package/lib/module/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/layoutReanimation/defaultTransitions/EntryExitTransition.js +2 -2
- package/lib/module/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/layoutReanimation/defaultTransitions/index.js +4 -4
- package/lib/module/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/module/layoutReanimation/index.js.map +1 -1
- package/lib/module/layoutReanimation/sharedTransitions/ProgressTransitionManager.js +3 -3
- package/lib/module/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
- package/lib/module/layoutReanimation/sharedTransitions/SharedTransition.js +3 -3
- package/lib/module/layoutReanimation/sharedTransitions/SharedTransition.js.map +1 -1
- package/lib/module/layoutReanimation/sharedTransitions/index.js +1 -1
- package/lib/module/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/layoutReanimation/web/animationParser.js.map +1 -1
- package/lib/module/layoutReanimation/web/animationsManager.js +10 -8
- package/lib/module/layoutReanimation/web/animationsManager.js.map +1 -1
- package/lib/module/layoutReanimation/web/componentStyle.js.map +1 -1
- package/lib/module/layoutReanimation/web/componentUtils.js +8 -8
- package/lib/module/layoutReanimation/web/componentUtils.js.map +1 -1
- package/lib/module/layoutReanimation/web/config.js.map +1 -1
- package/lib/module/layoutReanimation/web/createAnimation.js +6 -6
- package/lib/module/layoutReanimation/web/createAnimation.js.map +1 -1
- package/lib/module/layoutReanimation/web/domUtils.js +2 -2
- package/lib/module/layoutReanimation/web/domUtils.js.map +1 -1
- package/lib/module/layoutReanimation/web/index.js.map +1 -1
- package/lib/module/layoutReanimation/web/transition/Curved.web.js.map +1 -1
- package/lib/module/layoutReanimation/web/transition/Jumping.web.js.map +1 -1
- package/lib/module/logger/index.js +1 -1
- package/lib/module/logger/logger.js +3 -3
- package/lib/module/logger/logger.js.map +1 -1
- package/lib/module/mappers.js +1 -1
- package/lib/module/mappers.js.map +1 -1
- package/lib/module/mock.js +40 -8
- package/lib/module/mock.js.map +1 -1
- package/lib/module/mutables.js +3 -3
- package/lib/module/mutables.js.map +1 -1
- package/lib/module/platform-specific/checkCppVersion.js +2 -2
- package/lib/module/platform-specific/checkCppVersion.js.map +1 -1
- package/lib/module/platform-specific/findHostInstance.js +58 -0
- package/lib/module/platform-specific/findHostInstance.js.map +1 -0
- package/lib/module/platform-specific/findHostInstance.web.js +4 -0
- package/lib/module/platform-specific/findHostInstance.web.js.map +1 -0
- package/lib/module/platform-specific/jsVersion.js +1 -1
- package/lib/module/platform-specific/jsVersion.js.map +1 -1
- package/lib/module/platformFunctions/dispatchCommand.js +1 -1
- package/lib/module/platformFunctions/dispatchCommand.js.map +1 -1
- package/lib/module/platformFunctions/getRelativeCoords.js.map +1 -1
- package/lib/module/platformFunctions/index.js +1 -1
- package/lib/module/platformFunctions/index.js.map +1 -1
- package/lib/module/platformFunctions/measure.js +1 -1
- package/lib/module/platformFunctions/measure.js.map +1 -1
- package/lib/module/platformFunctions/measure.web.js.map +1 -1
- package/lib/module/platformFunctions/scrollTo.js +1 -1
- package/lib/module/platformFunctions/scrollTo.js.map +1 -1
- package/lib/module/platformFunctions/scrollTo.web.js.map +1 -1
- package/lib/module/platformFunctions/setGestureState.js +1 -1
- package/lib/module/platformFunctions/setGestureState.js.map +1 -1
- package/lib/module/platformFunctions/setNativeProps.js +1 -1
- package/lib/module/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/platformFunctions/setNativeProps.web.js.map +1 -1
- package/lib/module/processBoxShadow.js +150 -0
- package/lib/module/processBoxShadow.js.map +1 -0
- package/lib/module/propsAllowlists.js +1 -0
- package/lib/module/propsAllowlists.js.map +1 -1
- package/lib/module/runtimes.js +1 -1
- package/lib/module/runtimes.js.map +1 -1
- package/lib/module/screenTransition/RNScreensTurboModule.js.map +1 -1
- package/lib/module/screenTransition/animationManager.js.map +1 -1
- package/lib/module/screenTransition/index.js +1 -1
- package/lib/module/screenTransition/index.js.map +1 -1
- package/lib/module/screenTransition/styleUpdater.js.map +1 -1
- package/lib/module/screenTransition/swipeSimulator.js +1 -1
- package/lib/module/screenTransition/swipeSimulator.js.map +1 -1
- package/lib/module/shareableMappingCache.js.map +1 -1
- package/lib/module/shareables.js +217 -143
- package/lib/module/shareables.js.map +1 -1
- package/lib/module/specs/index.js +2 -2
- package/lib/module/specs/index.js.map +1 -1
- package/lib/module/threads.js +2 -2
- package/lib/module/threads.js.map +1 -1
- package/lib/module/worklets/WorkletsModule/JSWorklets.js +6 -1
- package/lib/module/worklets/WorkletsModule/JSWorklets.js.map +1 -1
- package/lib/module/worklets/WorkletsModule/NativeWorklets.js +5 -2
- package/lib/module/worklets/WorkletsModule/NativeWorklets.js.map +1 -1
- package/lib/module/worklets/WorkletsModule/workletsModuleInstance.js +1 -1
- package/lib/module/worklets/WorkletsModule/workletsModuleInstance.js.map +1 -1
- package/lib/module/worklets/WorkletsModule/workletsModuleProxy.js +1 -1
- package/lib/module/worklets/WorkletsModule/workletsModuleProxy.js.map +1 -1
- package/lib/module/worklets/index.js.map +1 -1
- package/lib/module/worklets/valueUnpacker.js +1 -1
- package/lib/module/worklets/valueUnpacker.js.map +1 -1
- package/lib/typescript/Animated.d.ts +9 -9
- package/lib/typescript/Animated.d.ts.map +1 -1
- package/lib/typescript/Colors.d.ts +1 -0
- package/lib/typescript/Colors.d.ts.map +1 -1
- package/lib/typescript/ConfigHelper.d.ts.map +1 -1
- package/lib/typescript/PropAdapters.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/NativeReanimated.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/index.web.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/js-reanimated/JSReanimated.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/js-reanimated/index.d.ts +1 -1
- package/lib/typescript/ReanimatedModule/js-reanimated/index.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/reanimatedModuleProxy.d.ts +2 -3
- package/lib/typescript/ReanimatedModule/reanimatedModuleProxy.d.ts.map +1 -1
- package/lib/typescript/Sensor.d.ts +1 -1
- package/lib/typescript/Sensor.d.ts.map +1 -1
- package/lib/typescript/SensorContainer.d.ts +1 -1
- package/lib/typescript/SensorContainer.d.ts.map +1 -1
- package/lib/typescript/UpdateLayoutAnimations.d.ts +1 -1
- package/lib/typescript/UpdateLayoutAnimations.d.ts.map +1 -1
- package/lib/typescript/UpdateProps.d.ts +1 -1
- package/lib/typescript/UpdateProps.d.ts.map +1 -1
- package/lib/typescript/ViewDescriptorsSet.d.ts.map +1 -1
- package/lib/typescript/WorkletEventHandler.d.ts +1 -1
- package/lib/typescript/WorkletEventHandler.d.ts.map +1 -1
- package/lib/typescript/animation/commonTypes.d.ts +1 -1
- package/lib/typescript/animation/commonTypes.d.ts.map +1 -1
- package/lib/typescript/animation/decay/decay.d.ts.map +1 -1
- package/lib/typescript/animation/decay/rigidDecay.d.ts.map +1 -1
- package/lib/typescript/animation/decay/rubberBandDecay.d.ts +1 -1
- package/lib/typescript/animation/decay/rubberBandDecay.d.ts.map +1 -1
- package/lib/typescript/animation/decay/utils.d.ts +2 -2
- package/lib/typescript/animation/decay/utils.d.ts.map +1 -1
- package/lib/typescript/animation/delay.d.ts.map +1 -1
- package/lib/typescript/animation/index.d.ts +8 -8
- package/lib/typescript/animation/index.d.ts.map +1 -1
- package/lib/typescript/animation/repeat.d.ts +1 -1
- package/lib/typescript/animation/repeat.d.ts.map +1 -1
- package/lib/typescript/animation/sequence.d.ts.map +1 -1
- package/lib/typescript/animation/spring.d.ts +1 -1
- package/lib/typescript/animation/spring.d.ts.map +1 -1
- package/lib/typescript/animation/springUtils.d.ts +1 -1
- package/lib/typescript/animation/springUtils.d.ts.map +1 -1
- package/lib/typescript/animation/styleAnimation.d.ts.map +1 -1
- package/lib/typescript/animation/timing.d.ts +1 -1
- package/lib/typescript/animation/timing.d.ts.map +1 -1
- package/lib/typescript/animation/util.d.ts +2 -2
- package/lib/typescript/animation/util.d.ts.map +1 -1
- package/lib/typescript/commonTypes.d.ts +9 -21
- package/lib/typescript/commonTypes.d.ts.map +1 -1
- package/lib/typescript/component/FlatList.d.ts.map +1 -1
- package/lib/typescript/component/Image.d.ts.map +1 -1
- package/lib/typescript/component/LayoutAnimationConfig.d.ts +2 -2
- package/lib/typescript/component/LayoutAnimationConfig.d.ts.map +1 -1
- package/lib/typescript/component/ReducedMotionConfig.d.ts.map +1 -1
- package/lib/typescript/component/ScrollView.d.ts.map +1 -1
- package/lib/typescript/component/Text.d.ts.map +1 -1
- package/lib/typescript/component/View.d.ts.map +1 -1
- package/lib/typescript/core.d.ts +3 -3
- package/lib/typescript/core.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/InlinePropManager.d.ts +1 -1
- package/lib/typescript/createAnimatedComponent/InlinePropManager.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/JSPropsUpdater.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/NativeEventsManager.d.ts +1 -1
- package/lib/typescript/createAnimatedComponent/NativeEventsManager.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/PropsFilter.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +13 -10
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/createAnimatedComponent.d.ts +2 -2
- package/lib/typescript/createAnimatedComponent/createAnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/culori/Colors.d.ts +13 -0
- package/lib/typescript/culori/Colors.d.ts.map +1 -0
- package/lib/typescript/culori/index.d.ts +10 -0
- package/lib/typescript/culori/index.d.ts.map +1 -0
- package/lib/typescript/culori/lrgb.d.ts +14 -0
- package/lib/typescript/culori/lrgb.d.ts.map +1 -0
- package/lib/typescript/culori/oklab.d.ts +11 -0
- package/lib/typescript/culori/oklab.d.ts.map +1 -0
- package/lib/typescript/fabricUtils.d.ts +2 -1
- package/lib/typescript/fabricUtils.d.ts.map +1 -1
- package/lib/typescript/helperTypes.d.ts.map +1 -1
- package/lib/typescript/hook/commonTypes.d.ts +3 -3
- package/lib/typescript/hook/commonTypes.d.ts.map +1 -1
- package/lib/typescript/hook/index.d.ts +16 -16
- package/lib/typescript/hook/index.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedKeyboard.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedProps.d.ts +1 -1
- package/lib/typescript/hook/useAnimatedProps.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedReaction.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedRef.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedScrollHandler.d.ts +1 -1
- package/lib/typescript/hook/useAnimatedScrollHandler.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedSensor.d.ts +1 -1
- package/lib/typescript/hook/useAnimatedSensor.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedStyle.d.ts.map +1 -1
- package/lib/typescript/hook/useComposedEventHandler.d.ts.map +1 -1
- package/lib/typescript/hook/useDerivedValue.d.ts.map +1 -1
- package/lib/typescript/hook/useEvent.d.ts.map +1 -1
- package/lib/typescript/hook/useFrameCallback.d.ts.map +1 -1
- package/lib/typescript/hook/useHandler.d.ts.map +1 -1
- package/lib/typescript/hook/useScrollViewOffset.d.ts.map +1 -1
- package/lib/typescript/hook/useSharedValue.d.ts.map +1 -1
- package/lib/typescript/hook/useWorkletCallback.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +30 -30
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/initializers.d.ts +2 -1
- package/lib/typescript/initializers.d.ts.map +1 -1
- package/lib/typescript/interpolateColor.d.ts +11 -4
- package/lib/typescript/interpolateColor.d.ts.map +1 -1
- package/lib/typescript/jestUtils.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/Keyframe.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationsManager.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Bounce.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Bounce.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Fade.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Flip.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Flip.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Lightspeed.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Lightspeed.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Pinwheel.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Roll.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Roll.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Rotate.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Rotate.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Slide.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Slide.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Stretch.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Zoom.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/Zoom.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultAnimations/index.d.ts +6 -6
- package/lib/typescript/layoutReanimation/defaultAnimations/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultTransitions/CurvedTransition.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +1 -1
- package/lib/typescript/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/defaultTransitions/index.d.ts +4 -4
- package/lib/typescript/layoutReanimation/defaultTransitions/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/sharedTransitions/ProgressTransitionManager.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/sharedTransitions/SharedTransition.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/sharedTransitions/index.d.ts +1 -1
- package/lib/typescript/layoutReanimation/sharedTransitions/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/animationsManager.d.ts +2 -2
- package/lib/typescript/layoutReanimation/web/animationsManager.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/componentUtils.d.ts +2 -2
- package/lib/typescript/layoutReanimation/web/componentUtils.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/config.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/createAnimation.d.ts +2 -2
- package/lib/typescript/layoutReanimation/web/createAnimation.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/transition/Curved.web.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/transition/Jumping.web.d.ts.map +1 -1
- package/lib/typescript/logger/index.d.ts +1 -1
- package/lib/typescript/logger/logger.d.ts.map +1 -1
- package/lib/typescript/mappers.d.ts +1 -1
- package/lib/typescript/mappers.d.ts.map +1 -1
- package/lib/typescript/mutables.d.ts.map +1 -1
- package/lib/typescript/platform-specific/findHostInstance.d.ts +15 -0
- package/lib/typescript/platform-specific/findHostInstance.d.ts.map +1 -0
- package/lib/typescript/platform-specific/findHostInstance.web.d.ts +2 -0
- package/lib/typescript/platform-specific/findHostInstance.web.d.ts.map +1 -0
- package/lib/typescript/platform-specific/jsVersion.d.ts +1 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/dispatchCommand.d.ts +1 -1
- package/lib/typescript/platformFunctions/dispatchCommand.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/getRelativeCoords.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/index.d.ts +2 -2
- package/lib/typescript/platformFunctions/index.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/measure.d.ts +1 -1
- package/lib/typescript/platformFunctions/measure.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/measure.web.d.ts +1 -1
- package/lib/typescript/platformFunctions/measure.web.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/scrollTo.d.ts +1 -1
- package/lib/typescript/platformFunctions/scrollTo.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/scrollTo.web.d.ts +1 -1
- package/lib/typescript/platformFunctions/scrollTo.web.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/setNativeProps.d.ts +1 -1
- package/lib/typescript/platformFunctions/setNativeProps.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/setNativeProps.web.d.ts +1 -1
- package/lib/typescript/platformFunctions/setNativeProps.web.d.ts.map +1 -1
- package/lib/typescript/processBoxShadow.d.ts +13 -0
- package/lib/typescript/processBoxShadow.d.ts.map +1 -0
- package/lib/typescript/propsAllowlists.d.ts.map +1 -1
- package/lib/typescript/runtimes.d.ts.map +1 -1
- package/lib/typescript/screenTransition/RNScreensTurboModule.d.ts.map +1 -1
- package/lib/typescript/screenTransition/animationManager.d.ts.map +1 -1
- package/lib/typescript/screenTransition/index.d.ts +2 -2
- package/lib/typescript/screenTransition/index.d.ts.map +1 -1
- package/lib/typescript/screenTransition/swipeSimulator.d.ts +1 -1
- package/lib/typescript/screenTransition/swipeSimulator.d.ts.map +1 -1
- package/lib/typescript/shareableMappingCache.d.ts.map +1 -1
- package/lib/typescript/shareables.d.ts +5 -2
- package/lib/typescript/shareables.d.ts.map +1 -1
- package/lib/typescript/specs/index.d.ts +2 -2
- package/lib/typescript/specs/index.d.ts.map +1 -1
- package/lib/typescript/threads.d.ts.map +1 -1
- package/lib/typescript/worklets/WorkletsModule/JSWorklets.d.ts.map +1 -1
- package/lib/typescript/worklets/WorkletsModule/NativeWorklets.d.ts.map +1 -1
- package/lib/typescript/worklets/WorkletsModule/workletsModuleProxy.d.ts +2 -0
- package/lib/typescript/worklets/WorkletsModule/workletsModuleProxy.d.ts.map +1 -1
- package/lib/typescript/worklets/index.d.ts +1 -1
- package/lib/typescript/worklets/index.d.ts.map +1 -1
- package/package.json +23 -17
- package/plugin/index.js +2 -2
- package/scripts/reanimated_utils.rb +1 -1
- package/src/Animated.ts +11 -12
- package/src/Colors.ts +24 -0
- package/src/ConfigHelper.ts +2 -2
- package/src/PropAdapters.ts +1 -1
- package/src/ReanimatedModule/NativeReanimated.ts +11 -21
- package/src/ReanimatedModule/index.web.ts +1 -0
- package/src/ReanimatedModule/js-reanimated/JSReanimated.ts +12 -17
- package/src/ReanimatedModule/js-reanimated/index.ts +13 -6
- package/src/ReanimatedModule/reanimatedModuleInstance.ts +1 -1
- package/src/ReanimatedModule/reanimatedModuleProxy.ts +4 -9
- package/src/ReducedMotion.ts +1 -1
- package/src/Sensor.ts +4 -3
- package/src/SensorContainer.ts +3 -3
- package/src/UpdateLayoutAnimations.ts +3 -3
- package/src/UpdateProps.ts +5 -4
- package/src/ViewDescriptorsSet.ts +1 -1
- package/src/WorkletEventHandler.ts +2 -1
- package/src/animation/clamp.ts +8 -8
- package/src/animation/commonTypes.ts +4 -4
- package/src/animation/decay/decay.ts +13 -7
- package/src/animation/decay/rigidDecay.ts +1 -1
- package/src/animation/decay/rubberBandDecay.ts +1 -1
- package/src/animation/decay/utils.ts +3 -3
- package/src/animation/delay.ts +3 -3
- package/src/animation/index.ts +8 -8
- package/src/animation/repeat.ts +3 -3
- package/src/animation/sequence.ts +3 -3
- package/src/animation/spring.ts +8 -8
- package/src/animation/springUtils.ts +2 -2
- package/src/animation/styleAnimation.ts +6 -6
- package/src/animation/timing.ts +8 -8
- package/src/animation/util.ts +25 -19
- package/src/commonTypes.ts +20 -62
- package/src/component/FlatList.tsx +4 -3
- package/src/component/Image.ts +1 -0
- package/src/component/LayoutAnimationConfig.tsx +2 -1
- package/src/component/PerformanceMonitor.tsx +5 -4
- package/src/component/ReducedMotionConfig.tsx +3 -2
- package/src/component/ScrollView.tsx +3 -2
- package/src/component/Text.ts +1 -0
- package/src/component/View.ts +1 -0
- package/src/core.ts +33 -15
- package/src/createAnimatedComponent/InlinePropManager.ts +7 -7
- package/src/createAnimatedComponent/JSPropsUpdater.ts +8 -8
- package/src/createAnimatedComponent/NativeEventsManager.ts +49 -18
- package/src/createAnimatedComponent/PropsFilter.tsx +5 -4
- package/src/createAnimatedComponent/commonTypes.ts +15 -10
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +144 -107
- package/src/culori/Colors.ts +15 -0
- package/src/culori/index.ts +12 -0
- package/src/culori/lrgb.ts +57 -0
- package/src/culori/oklab.ts +109 -0
- package/src/fabricUtils.ts +9 -15
- package/src/helperTypes.ts +1 -0
- package/src/hook/commonTypes.ts +10 -9
- package/src/hook/index.ts +19 -19
- package/src/hook/useAnimatedGestureHandler.ts +1 -1
- package/src/hook/useAnimatedKeyboard.ts +8 -7
- package/src/hook/useAnimatedProps.ts +3 -3
- package/src/hook/useAnimatedReaction.ts +2 -1
- package/src/hook/useAnimatedRef.ts +8 -7
- package/src/hook/useAnimatedScrollHandler.ts +2 -2
- package/src/hook/useAnimatedSensor.ts +5 -4
- package/src/hook/useAnimatedStyle.ts +65 -28
- package/src/hook/useComposedEventHandler.ts +4 -4
- package/src/hook/useDerivedValue.ts +2 -1
- package/src/hook/useEvent.ts +1 -0
- package/src/hook/useFrameCallback.ts +1 -0
- package/src/hook/useHandler.ts +3 -2
- package/src/hook/useScrollViewOffset.ts +7 -6
- package/src/hook/useSharedValue.ts +1 -0
- package/src/hook/useWorkletCallback.ts +1 -0
- package/src/index.ts +217 -216
- package/src/initializers.ts +25 -10
- package/src/interpolateColor.ts +148 -48
- package/src/jestUtils.ts +6 -4
- package/src/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +2 -3
- package/src/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +5 -5
- package/src/layoutReanimation/animationBuilder/Keyframe.ts +15 -9
- package/src/layoutReanimation/animationsManager.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Bounce.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Fade.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Flip.ts +3 -3
- package/src/layoutReanimation/defaultAnimations/Lightspeed.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Pinwheel.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Roll.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Rotate.ts +2 -2
- package/src/layoutReanimation/defaultAnimations/Slide.ts +2 -2
- package/src/layoutReanimation/defaultAnimations/Stretch.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Zoom.ts +4 -4
- package/src/layoutReanimation/defaultAnimations/index.ts +6 -6
- package/src/layoutReanimation/defaultTransitions/CurvedTransition.ts +3 -3
- package/src/layoutReanimation/defaultTransitions/EntryExitTransition.ts +2 -2
- package/src/layoutReanimation/defaultTransitions/index.ts +4 -4
- package/src/layoutReanimation/index.ts +1 -0
- package/src/layoutReanimation/sharedTransitions/ProgressTransitionManager.ts +5 -4
- package/src/layoutReanimation/sharedTransitions/SharedTransition.ts +3 -3
- package/src/layoutReanimation/sharedTransitions/index.ts +1 -1
- package/src/layoutReanimation/web/animationParser.ts +1 -1
- package/src/layoutReanimation/web/animationsManager.ts +22 -20
- package/src/layoutReanimation/web/componentStyle.ts +1 -1
- package/src/layoutReanimation/web/componentUtils.ts +13 -13
- package/src/layoutReanimation/web/config.ts +0 -1
- package/src/layoutReanimation/web/createAnimation.ts +10 -9
- package/src/layoutReanimation/web/domUtils.ts +4 -4
- package/src/layoutReanimation/web/index.ts +0 -2
- package/src/layoutReanimation/web/transition/Curved.web.ts +3 -3
- package/src/layoutReanimation/web/transition/Jumping.web.ts +1 -1
- package/src/logger/index.ts +1 -1
- package/src/logger/logger.ts +4 -4
- package/src/mappers.ts +2 -2
- package/src/mock.ts +54 -19
- package/src/mutables.ts +3 -3
- package/src/platform-specific/checkCppVersion.ts +2 -2
- package/src/platform-specific/findHostInstance.ts +93 -0
- package/src/platform-specific/findHostInstance.web.ts +3 -0
- package/src/platform-specific/jsVersion.ts +1 -1
- package/src/platformFunctions/dispatchCommand.ts +8 -7
- package/src/platformFunctions/getRelativeCoords.ts +2 -1
- package/src/platformFunctions/index.ts +2 -2
- package/src/platformFunctions/measure.ts +8 -7
- package/src/platformFunctions/measure.web.ts +2 -1
- package/src/platformFunctions/scrollTo.ts +8 -7
- package/src/platformFunctions/scrollTo.web.ts +2 -1
- package/src/platformFunctions/setGestureState.ts +1 -1
- package/src/platformFunctions/setNativeProps.ts +9 -8
- package/src/platformFunctions/setNativeProps.web.ts +3 -2
- package/src/privateGlobals.d.ts +11 -11
- package/src/processBoxShadow.ts +195 -0
- package/src/propsAllowlists.ts +1 -0
- package/src/runtimes.ts +2 -2
- package/src/screenTransition/RNScreensTurboModule.ts +1 -2
- package/src/screenTransition/animationManager.ts +1 -1
- package/src/screenTransition/index.ts +2 -2
- package/src/screenTransition/styleUpdater.ts +2 -2
- package/src/screenTransition/swipeSimulator.ts +2 -2
- package/src/shareableMappingCache.ts +1 -1
- package/src/shareables.ts +319 -168
- package/src/specs/index.ts +2 -2
- package/src/threads.ts +4 -4
- package/src/worklets/WorkletsModule/JSWorklets.ts +9 -2
- package/src/worklets/WorkletsModule/NativeWorklets.ts +15 -3
- package/src/worklets/WorkletsModule/workletsModuleInstance.ts +1 -1
- package/src/worklets/WorkletsModule/workletsModuleProxy.ts +9 -1
- package/src/worklets/index.ts +1 -1
- package/src/worklets/valueUnpacker.ts +2 -2
- package/Common/cpp/reanimated/RuntimeDecorators/ReanimatedWorkletRuntimeDecorator.cpp +0 -19
- package/Common/cpp/reanimated/RuntimeDecorators/ReanimatedWorkletRuntimeDecorator.h +0 -14
- package/Common/cpp/worklets/NativeModules/NativeWorkletsModule.cpp +0 -25
- package/Common/cpp/worklets/NativeModules/NativeWorkletsModule.h +0 -23
- package/Common/cpp/worklets/NativeModules/NativeWorkletsModuleSpec.cpp +0 -9
- package/Common/cpp/worklets/NativeModules/NativeWorkletsModuleSpec.h +0 -18
- package/android/src/reactNativeVersionPatch/BorderRadiiDrawableUtils/74/com/swmansion/reanimated/BorderRadiiDrawableUtils.java +0 -22
- package/android/src/reactNativeVersionPatch/NativeProxyFabric/latest/com/swmansion/reanimated/NativeProxy.java +0 -149
- package/android/src/reactNativeVersionPatch/NativeProxyPaper/74/com/swmansion/reanimated/NativeProxy.java +0 -153
- package/android/src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/74/com/swmansion/reanimated/ReactFeatureFlagsWrapper.java +0 -10
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/74/com/swmansion/reanimated/ReanimatedModule.java +0 -180
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/74/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +0 -245
- package/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.h +0 -12
- package/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.mm +0 -73
- package/lib/module/platform-specific/RNRenderer.js +0 -6
- package/lib/module/platform-specific/RNRenderer.js.map +0 -1
- package/lib/module/platform-specific/RNRenderer.web.js +0 -6
- package/lib/module/platform-specific/RNRenderer.web.js.map +0 -1
- package/lib/typescript/platform-specific/RNRenderer.d.ts +0 -2
- package/lib/typescript/platform-specific/RNRenderer.d.ts.map +0 -1
- package/lib/typescript/platform-specific/RNRenderer.web.d.ts +0 -3
- package/lib/typescript/platform-specific/RNRenderer.web.d.ts.map +0 -1
- package/src/platform-specific/RNRenderer.ts +0 -4
- package/src/platform-specific/RNRenderer.web.ts +0 -4
- /package/android/src/{reactNativeVersionPatch/ReactFeatureFlagsWrapper/latest → fabric/java}/com/swmansion/reanimated/ReactFeatureFlagsWrapper.java +0 -0
- /package/android/src/{reactNativeVersionPatch/ReanimatedUIManager/latest → main/java}/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +0 -0
|
@@ -27,23 +27,33 @@ ReanimatedCommitHook::~ReanimatedCommitHook() noexcept {
|
|
|
27
27
|
uiManager_->unregisterCommitHook(*this);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
void ReanimatedCommitHook::maybeInitializeLayoutAnimations(
|
|
31
|
+
SurfaceId surfaceId) {
|
|
32
|
+
auto lock = std::unique_lock<std::mutex>(mutex_);
|
|
33
|
+
if (surfaceId > currentMaxSurfaceId_) {
|
|
34
|
+
// when a new surfaceId is observed we call setMountingOverrideDelegate
|
|
35
|
+
// for all yet unseen surfaces
|
|
36
|
+
uiManager_->getShadowTreeRegistry().enumerate(
|
|
37
|
+
[strongThis = shared_from_this()](
|
|
38
|
+
const ShadowTree &shadowTree, bool &stop) {
|
|
39
|
+
// Executed synchronously.
|
|
40
|
+
if (shadowTree.getSurfaceId() <= strongThis->currentMaxSurfaceId_) {
|
|
41
|
+
// the set function actually adds our delegate to a list, so we
|
|
42
|
+
// shouldn't invoke it twice for the same surface
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
shadowTree.getMountingCoordinator()->setMountingOverrideDelegate(
|
|
46
|
+
strongThis->layoutAnimationsProxy_);
|
|
47
|
+
});
|
|
48
|
+
currentMaxSurfaceId_ = surfaceId;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
30
52
|
RootShadowNode::Unshared ReanimatedCommitHook::shadowTreeWillCommit(
|
|
31
53
|
ShadowTree const &,
|
|
32
54
|
RootShadowNode::Shared const &,
|
|
33
55
|
RootShadowNode::Unshared const &newRootShadowNode) noexcept {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
auto lock = std::unique_lock<std::mutex>(mutex_);
|
|
38
|
-
if (surfaceId > currentMaxSurfaceId_) {
|
|
39
|
-
uiManager_->getShadowTreeRegistry().enumerate(
|
|
40
|
-
[this](const ShadowTree &shadowTree, bool &stop) {
|
|
41
|
-
shadowTree.getMountingCoordinator()->setMountingOverrideDelegate(
|
|
42
|
-
layoutAnimationsProxy_);
|
|
43
|
-
});
|
|
44
|
-
currentMaxSurfaceId_ = surfaceId;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
56
|
+
maybeInitializeLayoutAnimations(newRootShadowNode->getSurfaceId());
|
|
47
57
|
|
|
48
58
|
auto reaShadowNode =
|
|
49
59
|
std::reinterpret_pointer_cast<ReanimatedCommitShadowNode>(
|
|
@@ -12,7 +12,9 @@ using namespace facebook::react;
|
|
|
12
12
|
|
|
13
13
|
namespace reanimated {
|
|
14
14
|
|
|
15
|
-
class ReanimatedCommitHook
|
|
15
|
+
class ReanimatedCommitHook
|
|
16
|
+
: public UIManagerCommitHook,
|
|
17
|
+
public std::enable_shared_from_this<ReanimatedCommitHook> {
|
|
16
18
|
public:
|
|
17
19
|
ReanimatedCommitHook(
|
|
18
20
|
const std::shared_ptr<PropsRegistry> &propsRegistry,
|
|
@@ -25,6 +27,8 @@ class ReanimatedCommitHook : public UIManagerCommitHook {
|
|
|
25
27
|
|
|
26
28
|
void commitHookWasUnregistered(UIManager const &) noexcept override {}
|
|
27
29
|
|
|
30
|
+
void maybeInitializeLayoutAnimations(SurfaceId surfaceId);
|
|
31
|
+
|
|
28
32
|
RootShadowNode::Unshared shadowTreeWillCommit(
|
|
29
33
|
ShadowTree const &shadowTree,
|
|
30
34
|
RootShadowNode::Shared const &oldRootShadowNode,
|
|
@@ -116,6 +116,9 @@ void LayoutAnimationsManager::startLayoutAnimation(
|
|
|
116
116
|
std::shared_ptr<Shareable> config, viewShareable;
|
|
117
117
|
{
|
|
118
118
|
auto lock = std::unique_lock<std::recursive_mutex>(animationsMutex_);
|
|
119
|
+
if (!collection::contains(getConfigsForType(type), tag)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
119
122
|
config = getConfigsForType(type)[tag];
|
|
120
123
|
}
|
|
121
124
|
// TODO: cache the following!!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
2
|
|
|
3
3
|
#include <reanimated/LayoutAnimations/LayoutAnimationsProxy.h>
|
|
4
|
-
#include <reanimated/NativeModules/
|
|
4
|
+
#include <reanimated/NativeModules/ReanimatedModuleProxy.h>
|
|
5
5
|
|
|
6
6
|
#include <react/renderer/animations/utils.h>
|
|
7
7
|
#include <react/renderer/mounting/ShadowViewMutation.h>
|
|
@@ -153,7 +153,11 @@ void LayoutAnimationsProxy::parseRemoveMutations(
|
|
|
153
153
|
if (mutation.type == ShadowViewMutation::Remove) {
|
|
154
154
|
updateIndexForMutation(mutation);
|
|
155
155
|
auto tag = mutation.oldChildShadowView.tag;
|
|
156
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
157
|
+
auto parentTag = mutation.parentTag;
|
|
158
|
+
#else
|
|
156
159
|
auto parentTag = mutation.parentShadowView.tag;
|
|
160
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
157
161
|
auto unflattenedParentTag = parentTag; // temporary
|
|
158
162
|
|
|
159
163
|
std::shared_ptr<MutationNode> mutationNode;
|
|
@@ -287,9 +291,16 @@ void LayoutAnimationsProxy::handleUpdatesAndEnterings(
|
|
|
287
291
|
}
|
|
288
292
|
case ShadowViewMutation::Type::Insert: {
|
|
289
293
|
updateIndexForMutation(mutation);
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
294
|
+
|
|
295
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
296
|
+
const auto parentTag = mutation.parentTag;
|
|
297
|
+
const auto mutationParent = parentTag;
|
|
298
|
+
#else
|
|
299
|
+
const auto parentTag = mutation.parentShadowView.tag;
|
|
300
|
+
const auto mutationParent = mutation.parentShadowView;
|
|
301
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
302
|
+
if (nodeForTag_.contains(parentTag)) {
|
|
303
|
+
nodeForTag_[parentTag]->applyMutationToIndices(mutation);
|
|
293
304
|
}
|
|
294
305
|
|
|
295
306
|
if (movedViews.contains(tag)) {
|
|
@@ -297,7 +308,7 @@ void LayoutAnimationsProxy::handleUpdatesAndEnterings(
|
|
|
297
308
|
if (layoutAnimationIt == layoutAnimations_.end()) {
|
|
298
309
|
if (oldShadowViewsForReparentings.contains(tag)) {
|
|
299
310
|
filteredMutations.push_back(ShadowViewMutation::InsertMutation(
|
|
300
|
-
|
|
311
|
+
mutationParent,
|
|
301
312
|
oldShadowViewsForReparentings[tag],
|
|
302
313
|
mutation.index));
|
|
303
314
|
} else {
|
|
@@ -308,7 +319,7 @@ void LayoutAnimationsProxy::handleUpdatesAndEnterings(
|
|
|
308
319
|
|
|
309
320
|
auto oldView = *layoutAnimationIt->second.currentView;
|
|
310
321
|
filteredMutations.push_back(ShadowViewMutation::InsertMutation(
|
|
311
|
-
|
|
322
|
+
mutationParent, oldView, mutation.index));
|
|
312
323
|
continue;
|
|
313
324
|
}
|
|
314
325
|
|
|
@@ -328,7 +339,7 @@ void LayoutAnimationsProxy::handleUpdatesAndEnterings(
|
|
|
328
339
|
cloneViewWithoutOpacity(mutation, propsParserContext);
|
|
329
340
|
|
|
330
341
|
filteredMutations.push_back(ShadowViewMutation::UpdateMutation(
|
|
331
|
-
mutation.newChildShadowView, *newView,
|
|
342
|
+
mutation.newChildShadowView, *newView, mutationParent));
|
|
332
343
|
break;
|
|
333
344
|
}
|
|
334
345
|
|
|
@@ -386,7 +397,14 @@ void LayoutAnimationsProxy::addOngoingAnimations(
|
|
|
386
397
|
updateLayoutMetrics(newView->layoutMetrics, updateValues.frame);
|
|
387
398
|
|
|
388
399
|
mutations.push_back(ShadowViewMutation::UpdateMutation(
|
|
389
|
-
*layoutAnimation.currentView,
|
|
400
|
+
*layoutAnimation.currentView,
|
|
401
|
+
*newView,
|
|
402
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
403
|
+
layoutAnimation.parentTag
|
|
404
|
+
#else
|
|
405
|
+
*layoutAnimation.parentView
|
|
406
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
407
|
+
));
|
|
390
408
|
layoutAnimation.currentView = newView;
|
|
391
409
|
}
|
|
392
410
|
updateMap.clear();
|
|
@@ -426,9 +444,8 @@ void LayoutAnimationsProxy::maybeDropAncestors(
|
|
|
426
444
|
}
|
|
427
445
|
|
|
428
446
|
auto node = std::static_pointer_cast<MutationNode>(parent);
|
|
429
|
-
node->animatedChildren.erase(child->tag);
|
|
430
447
|
|
|
431
|
-
if (node->
|
|
448
|
+
if (node->children.size() == 0 && node->state != ANIMATING) {
|
|
432
449
|
nodeForTag_.erase(node->tag);
|
|
433
450
|
cleanupMutations.push_back(node->mutation);
|
|
434
451
|
maybeCancelAnimation(node->tag);
|
|
@@ -482,7 +499,6 @@ bool LayoutAnimationsProxy::startAnimationsRecursively(
|
|
|
482
499
|
#endif
|
|
483
500
|
if (subNode->state != UNDEFINED && subNode->state != MOVED) {
|
|
484
501
|
if (shouldAnimate && subNode->state != DEAD) {
|
|
485
|
-
node->animatedChildren.insert(subNode->tag);
|
|
486
502
|
hasAnimatedChildren = true;
|
|
487
503
|
} else {
|
|
488
504
|
endAnimationsRecursively(subNode, mutations);
|
|
@@ -498,7 +514,6 @@ bool LayoutAnimationsProxy::startAnimationsRecursively(
|
|
|
498
514
|
LOG(INFO) << "child " << subNode->tag
|
|
499
515
|
<< " start animations returned true " << std::endl;
|
|
500
516
|
#endif
|
|
501
|
-
node->animatedChildren.insert(subNode->tag);
|
|
502
517
|
hasAnimatedChildren = true;
|
|
503
518
|
} else if (subNode->state == MOVED) {
|
|
504
519
|
mutations.push_back(subNode->mutation);
|
|
@@ -544,11 +559,7 @@ bool LayoutAnimationsProxy::startAnimationsRecursively(
|
|
|
544
559
|
layoutAnimationsManager_->clearLayoutAnimationConfig(node->tag);
|
|
545
560
|
}
|
|
546
561
|
|
|
547
|
-
|
|
548
|
-
return false;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
return true;
|
|
562
|
+
return wantAnimateExit;
|
|
552
563
|
}
|
|
553
564
|
|
|
554
565
|
void LayoutAnimationsProxy::updateIndexForMutation(
|
|
@@ -556,12 +567,18 @@ void LayoutAnimationsProxy::updateIndexForMutation(
|
|
|
556
567
|
if (mutation.index == -1) {
|
|
557
568
|
return;
|
|
558
569
|
}
|
|
559
|
-
|
|
570
|
+
|
|
571
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
572
|
+
const auto parentTag = mutation.parentTag;
|
|
573
|
+
#else
|
|
574
|
+
const auto parentTag = mutation.parentShadowView.tag;
|
|
575
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
576
|
+
|
|
577
|
+
if (!nodeForTag_.contains(parentTag)) {
|
|
560
578
|
return;
|
|
561
579
|
}
|
|
562
580
|
|
|
563
|
-
auto parent = nodeForTag_[
|
|
564
|
-
|
|
581
|
+
auto parent = nodeForTag_[parentTag];
|
|
565
582
|
int size = 0, prevIndex = -1, offset = 0;
|
|
566
583
|
|
|
567
584
|
for (auto &subNode : parent->children) {
|
|
@@ -576,9 +593,8 @@ void LayoutAnimationsProxy::updateIndexForMutation(
|
|
|
576
593
|
int tag = mutation.type == ShadowViewMutation::Insert
|
|
577
594
|
? mutation.newChildShadowView.tag
|
|
578
595
|
: mutation.oldChildShadowView.tag;
|
|
579
|
-
LOG(INFO) << "update index for " << tag << " in "
|
|
580
|
-
<< mutation.
|
|
581
|
-
<< mutation.index + offset << std::endl;
|
|
596
|
+
LOG(INFO) << "update index for " << tag << " in " << parentTag << ": "
|
|
597
|
+
<< mutation.index << " -> " << mutation.index + offset << std::endl;
|
|
582
598
|
#endif
|
|
583
599
|
mutation.index += offset;
|
|
584
600
|
}
|
|
@@ -606,9 +622,16 @@ void LayoutAnimationsProxy::createLayoutAnimation(
|
|
|
606
622
|
? mutation.oldChildShadowView
|
|
607
623
|
: mutation.newChildShadowView);
|
|
608
624
|
auto currentView = std::make_shared<ShadowView>(oldView);
|
|
625
|
+
|
|
626
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
627
|
+
layoutAnimations_.insert_or_assign(
|
|
628
|
+
tag,
|
|
629
|
+
LayoutAnimation{finalView, currentView, mutation.parentTag, {}, count});
|
|
630
|
+
#else
|
|
609
631
|
auto parentView = std::make_shared<ShadowView>(mutation.parentShadowView);
|
|
610
632
|
layoutAnimations_.insert_or_assign(
|
|
611
633
|
tag, LayoutAnimation{finalView, currentView, parentView, {}, count});
|
|
634
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
612
635
|
}
|
|
613
636
|
|
|
614
637
|
void LayoutAnimationsProxy::startEnteringAnimation(
|
|
@@ -619,36 +642,60 @@ void LayoutAnimationsProxy::startEnteringAnimation(
|
|
|
619
642
|
#endif
|
|
620
643
|
auto finalView = std::make_shared<ShadowView>(mutation.newChildShadowView);
|
|
621
644
|
auto current = std::make_shared<ShadowView>(mutation.newChildShadowView);
|
|
645
|
+
#if REACT_NATIVE_MINOR_VERSION < 78
|
|
622
646
|
auto parent = std::make_shared<ShadowView>(mutation.parentShadowView);
|
|
647
|
+
#endif
|
|
623
648
|
|
|
624
649
|
auto &viewProps =
|
|
625
650
|
static_cast<const ViewProps &>(*mutation.newChildShadowView.props);
|
|
626
651
|
auto opacity = viewProps.opacity;
|
|
627
652
|
|
|
628
|
-
uiScheduler_->scheduleOnUI(
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
653
|
+
uiScheduler_->scheduleOnUI([weakThis = weak_from_this(),
|
|
654
|
+
finalView,
|
|
655
|
+
current,
|
|
656
|
+
#if REACT_NATIVE_MINOR_VERSION < 78
|
|
657
|
+
parent,
|
|
658
|
+
#endif // RE
|
|
659
|
+
mutation,
|
|
660
|
+
opacity,
|
|
661
|
+
tag]() {
|
|
662
|
+
auto strongThis = weakThis.lock();
|
|
663
|
+
if (!strongThis) {
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
638
666
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
667
|
+
Rect window{};
|
|
668
|
+
{
|
|
669
|
+
auto &mutex = strongThis->mutex;
|
|
670
|
+
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
671
|
+
strongThis->layoutAnimations_.insert_or_assign(
|
|
672
|
+
tag, LayoutAnimation {
|
|
673
|
+
finalView, current,
|
|
674
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
675
|
+
mutation.parentTag,
|
|
676
|
+
#else
|
|
677
|
+
parent,
|
|
678
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
679
|
+
opacity
|
|
680
|
+
});
|
|
681
|
+
window = strongThis->surfaceManager.getWindow(
|
|
682
|
+
mutation.newChildShadowView.surfaceId);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
Snapshot values(mutation.newChildShadowView, window);
|
|
686
|
+
auto &uiRuntime = strongThis->uiRuntime_;
|
|
687
|
+
jsi::Object yogaValues(uiRuntime);
|
|
688
|
+
yogaValues.setProperty(uiRuntime, "targetOriginX", values.x);
|
|
689
|
+
yogaValues.setProperty(uiRuntime, "targetGlobalOriginX", values.x);
|
|
690
|
+
yogaValues.setProperty(uiRuntime, "targetOriginY", values.y);
|
|
691
|
+
yogaValues.setProperty(uiRuntime, "targetGlobalOriginY", values.y);
|
|
692
|
+
yogaValues.setProperty(uiRuntime, "targetWidth", values.width);
|
|
693
|
+
yogaValues.setProperty(uiRuntime, "targetHeight", values.height);
|
|
694
|
+
yogaValues.setProperty(uiRuntime, "windowWidth", values.windowWidth);
|
|
695
|
+
yogaValues.setProperty(uiRuntime, "windowHeight", values.windowHeight);
|
|
696
|
+
strongThis->layoutAnimationsManager_->startLayoutAnimation(
|
|
697
|
+
uiRuntime, tag, LayoutAnimationType::ENTERING, yogaValues);
|
|
698
|
+
});
|
|
652
699
|
}
|
|
653
700
|
|
|
654
701
|
void LayoutAnimationsProxy::startExitingAnimation(
|
|
@@ -659,30 +706,38 @@ void LayoutAnimationsProxy::startExitingAnimation(
|
|
|
659
706
|
#endif
|
|
660
707
|
auto surfaceId = mutation.oldChildShadowView.surfaceId;
|
|
661
708
|
|
|
662
|
-
uiScheduler_->scheduleOnUI(
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
window = surfaceManager.getWindow(surfaceId);
|
|
669
|
-
}
|
|
709
|
+
uiScheduler_->scheduleOnUI(
|
|
710
|
+
[weakThis = weak_from_this(), tag, mutation, surfaceId]() {
|
|
711
|
+
auto strongThis = weakThis.lock();
|
|
712
|
+
if (!strongThis) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
670
715
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
716
|
+
auto oldView = mutation.oldChildShadowView;
|
|
717
|
+
Rect window{};
|
|
718
|
+
{
|
|
719
|
+
auto &mutex = strongThis->mutex;
|
|
720
|
+
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
721
|
+
strongThis->createLayoutAnimation(mutation, oldView, surfaceId, tag);
|
|
722
|
+
window = strongThis->surfaceManager.getWindow(surfaceId);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
Snapshot values(oldView, window);
|
|
726
|
+
|
|
727
|
+
auto &uiRuntime = strongThis->uiRuntime_;
|
|
728
|
+
jsi::Object yogaValues(uiRuntime);
|
|
729
|
+
yogaValues.setProperty(uiRuntime, "currentOriginX", values.x);
|
|
730
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginX", values.x);
|
|
731
|
+
yogaValues.setProperty(uiRuntime, "currentOriginY", values.y);
|
|
732
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginY", values.y);
|
|
733
|
+
yogaValues.setProperty(uiRuntime, "currentWidth", values.width);
|
|
734
|
+
yogaValues.setProperty(uiRuntime, "currentHeight", values.height);
|
|
735
|
+
yogaValues.setProperty(uiRuntime, "windowWidth", values.windowWidth);
|
|
736
|
+
yogaValues.setProperty(uiRuntime, "windowHeight", values.windowHeight);
|
|
737
|
+
strongThis->layoutAnimationsManager_->startLayoutAnimation(
|
|
738
|
+
uiRuntime, tag, LayoutAnimationType::EXITING, yogaValues);
|
|
739
|
+
strongThis->layoutAnimationsManager_->clearLayoutAnimationConfig(tag);
|
|
740
|
+
});
|
|
686
741
|
}
|
|
687
742
|
|
|
688
743
|
void LayoutAnimationsProxy::startLayoutAnimation(
|
|
@@ -693,36 +748,46 @@ void LayoutAnimationsProxy::startLayoutAnimation(
|
|
|
693
748
|
#endif
|
|
694
749
|
auto surfaceId = mutation.oldChildShadowView.surfaceId;
|
|
695
750
|
|
|
696
|
-
uiScheduler_->scheduleOnUI([
|
|
751
|
+
uiScheduler_->scheduleOnUI([weakThis = weak_from_this(),
|
|
752
|
+
mutation,
|
|
753
|
+
surfaceId,
|
|
754
|
+
tag]() {
|
|
755
|
+
auto strongThis = weakThis.lock();
|
|
756
|
+
if (!strongThis) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
|
|
697
760
|
auto oldView = mutation.oldChildShadowView;
|
|
698
761
|
Rect window{};
|
|
699
762
|
{
|
|
763
|
+
auto &mutex = strongThis->mutex;
|
|
700
764
|
auto lock = std::unique_lock<std::recursive_mutex>(mutex);
|
|
701
|
-
createLayoutAnimation(mutation, oldView, surfaceId, tag);
|
|
702
|
-
window = surfaceManager.getWindow(surfaceId);
|
|
765
|
+
strongThis->createLayoutAnimation(mutation, oldView, surfaceId, tag);
|
|
766
|
+
window = strongThis->surfaceManager.getWindow(surfaceId);
|
|
703
767
|
}
|
|
704
768
|
|
|
705
769
|
Snapshot currentValues(oldView, window);
|
|
706
770
|
Snapshot targetValues(mutation.newChildShadowView, window);
|
|
707
771
|
|
|
708
|
-
|
|
709
|
-
yogaValues
|
|
710
|
-
yogaValues.setProperty(
|
|
711
|
-
yogaValues.setProperty(
|
|
712
|
-
yogaValues.setProperty(
|
|
713
|
-
yogaValues.setProperty(
|
|
714
|
-
yogaValues.setProperty(
|
|
715
|
-
yogaValues.setProperty(
|
|
716
|
-
yogaValues.setProperty(
|
|
717
|
-
yogaValues.setProperty(
|
|
718
|
-
yogaValues.setProperty(
|
|
719
|
-
yogaValues.setProperty(
|
|
720
|
-
yogaValues.setProperty(
|
|
721
|
-
yogaValues.setProperty(
|
|
772
|
+
auto &uiRuntime = strongThis->uiRuntime_;
|
|
773
|
+
jsi::Object yogaValues(uiRuntime);
|
|
774
|
+
yogaValues.setProperty(uiRuntime, "currentOriginX", currentValues.x);
|
|
775
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginX", currentValues.x);
|
|
776
|
+
yogaValues.setProperty(uiRuntime, "currentOriginY", currentValues.y);
|
|
777
|
+
yogaValues.setProperty(uiRuntime, "currentGlobalOriginY", currentValues.y);
|
|
778
|
+
yogaValues.setProperty(uiRuntime, "currentWidth", currentValues.width);
|
|
779
|
+
yogaValues.setProperty(uiRuntime, "currentHeight", currentValues.height);
|
|
780
|
+
yogaValues.setProperty(uiRuntime, "targetOriginX", targetValues.x);
|
|
781
|
+
yogaValues.setProperty(uiRuntime, "targetGlobalOriginX", targetValues.x);
|
|
782
|
+
yogaValues.setProperty(uiRuntime, "targetOriginY", targetValues.y);
|
|
783
|
+
yogaValues.setProperty(uiRuntime, "targetGlobalOriginY", targetValues.y);
|
|
784
|
+
yogaValues.setProperty(uiRuntime, "targetWidth", targetValues.width);
|
|
785
|
+
yogaValues.setProperty(uiRuntime, "targetHeight", targetValues.height);
|
|
786
|
+
yogaValues.setProperty(uiRuntime, "windowWidth", targetValues.windowWidth);
|
|
722
787
|
yogaValues.setProperty(
|
|
723
|
-
|
|
724
|
-
layoutAnimationsManager_->startLayoutAnimation(
|
|
725
|
-
|
|
788
|
+
uiRuntime, "windowHeight", targetValues.windowHeight);
|
|
789
|
+
strongThis->layoutAnimationsManager_->startLayoutAnimation(
|
|
790
|
+
uiRuntime, tag, LayoutAnimationType::LAYOUT, yogaValues);
|
|
726
791
|
});
|
|
727
792
|
}
|
|
728
793
|
|
|
@@ -738,8 +803,14 @@ void LayoutAnimationsProxy::maybeCancelAnimation(const int tag) const {
|
|
|
738
803
|
return;
|
|
739
804
|
}
|
|
740
805
|
layoutAnimations_.erase(tag);
|
|
741
|
-
uiScheduler_->scheduleOnUI([
|
|
742
|
-
|
|
806
|
+
uiScheduler_->scheduleOnUI([weakThis = weak_from_this(), tag]() {
|
|
807
|
+
auto strongThis = weakThis.lock();
|
|
808
|
+
if (!strongThis) {
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
auto &uiRuntime = strongThis->uiRuntime_;
|
|
813
|
+
strongThis->layoutAnimationsManager_->cancelLayoutAnimation(uiRuntime, tag);
|
|
743
814
|
});
|
|
744
815
|
}
|
|
745
816
|
|
|
@@ -19,18 +19,25 @@
|
|
|
19
19
|
|
|
20
20
|
namespace reanimated {
|
|
21
21
|
|
|
22
|
-
class
|
|
22
|
+
class ReanimatedModuleProxy;
|
|
23
23
|
|
|
24
24
|
using namespace facebook;
|
|
25
25
|
|
|
26
26
|
struct LayoutAnimation {
|
|
27
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
28
|
+
std::shared_ptr<ShadowView> finalView, currentView;
|
|
29
|
+
Tag parentTag;
|
|
30
|
+
#else
|
|
27
31
|
std::shared_ptr<ShadowView> finalView, currentView, parentView;
|
|
32
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
28
33
|
std::optional<double> opacity;
|
|
29
34
|
int count = 1;
|
|
30
35
|
LayoutAnimation &operator=(const LayoutAnimation &other) = default;
|
|
31
36
|
};
|
|
32
37
|
|
|
33
|
-
struct LayoutAnimationsProxy
|
|
38
|
+
struct LayoutAnimationsProxy
|
|
39
|
+
: public MountingOverrideDelegate,
|
|
40
|
+
public std::enable_shared_from_this<LayoutAnimationsProxy> {
|
|
34
41
|
mutable std::unordered_map<Tag, std::shared_ptr<Node>> nodeForTag_;
|
|
35
42
|
mutable std::unordered_map<Tag, LayoutAnimation> layoutAnimations_;
|
|
36
43
|
mutable std::recursive_mutex mutex;
|
|
@@ -31,7 +31,13 @@ Rect SurfaceManager::getWindow(SurfaceId surfaceId) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
void Node::applyMutationToIndices(ShadowViewMutation mutation) {
|
|
34
|
-
|
|
34
|
+
#if REACT_NATIVE_MINOR_VERSION >= 78
|
|
35
|
+
const auto parentTag = mutation.parentTag;
|
|
36
|
+
#else
|
|
37
|
+
const auto parentTag = mutation.parentShadowView.tag;
|
|
38
|
+
#endif // REACT_NATIVE_MINOR_VERSION >= 78
|
|
39
|
+
|
|
40
|
+
if (tag != parentTag) {
|
|
35
41
|
return;
|
|
36
42
|
}
|
|
37
43
|
|
|
@@ -96,7 +96,6 @@ struct Node {
|
|
|
96
96
|
*/
|
|
97
97
|
struct MutationNode : public Node {
|
|
98
98
|
ShadowViewMutation mutation;
|
|
99
|
-
std::unordered_set<Tag> animatedChildren;
|
|
100
99
|
ExitingState state = UNDEFINED;
|
|
101
100
|
explicit MutationNode(ShadowViewMutation &mutation)
|
|
102
101
|
: Node(mutation.oldChildShadowView.tag), mutation(mutation) {}
|