react-native-reanimated 0.0.0-20230509-6d9c5aec5
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/AnimatedSensor/AnimatedSensorModule.cpp +88 -0
- package/Common/cpp/AnimatedSensor/AnimatedSensorModule.h +44 -0
- package/Common/cpp/Fabric/FabricUtils.cpp +29 -0
- package/Common/cpp/Fabric/FabricUtils.h +58 -0
- package/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp +239 -0
- package/Common/cpp/Fabric/ReanimatedUIManagerBinding.h +47 -0
- package/Common/cpp/Fabric/ShadowTreeCloner.cpp +92 -0
- package/Common/cpp/Fabric/ShadowTreeCloner.h +41 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationType.h +8 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.cpp +131 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.h +58 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +688 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.h +208 -0
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +205 -0
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.h +101 -0
- package/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp +142 -0
- package/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.h +134 -0
- package/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp +55 -0
- package/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.h +28 -0
- package/Common/cpp/ReanimatedRuntime/RuntimeInitialization.md +194 -0
- package/Common/cpp/Registries/EventHandlerRegistry.cpp +55 -0
- package/Common/cpp/Registries/EventHandlerRegistry.h +39 -0
- package/Common/cpp/Registries/NewestShadowNodesRegistry.cpp +68 -0
- package/Common/cpp/Registries/NewestShadowNodesRegistry.h +41 -0
- package/Common/cpp/SharedItems/RuntimeManager.h +42 -0
- package/Common/cpp/SharedItems/Shareables.cpp +90 -0
- package/Common/cpp/SharedItems/Shareables.h +497 -0
- package/Common/cpp/SharedItems/SharedParent.h +30 -0
- package/Common/cpp/SpecTools/ErrorHandler.h +37 -0
- package/Common/cpp/Tools/CollectionUtils.h +14 -0
- package/Common/cpp/Tools/FeaturesConfig.cpp +5 -0
- package/Common/cpp/Tools/FeaturesConfig.h +19 -0
- package/Common/cpp/Tools/JsiUtils.cpp +26 -0
- package/Common/cpp/Tools/JsiUtils.h +176 -0
- package/Common/cpp/Tools/PlatformDepMethodsHolder.h +94 -0
- package/Common/cpp/Tools/ReanimatedHiddenHeaders.h +11 -0
- package/Common/cpp/Tools/ReanimatedVersion.cpp +17 -0
- package/Common/cpp/Tools/ReanimatedVersion.h +11 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +154 -0
- package/Common/cpp/Tools/RuntimeDecorator.h +103 -0
- package/Common/cpp/Tools/Scheduler.cpp +51 -0
- package/Common/cpp/Tools/Scheduler.h +89 -0
- package/Common/cpp/Tools/SingleInstanceChecker.h +70 -0
- package/Common/cpp/Tools/WorkletEventHandler.cpp +12 -0
- package/Common/cpp/Tools/WorkletEventHandler.h +38 -0
- package/Common/cpp/hidden_headers/Logger.h +22 -0
- package/Common/cpp/hidden_headers/LoggerInterface.h +14 -0
- package/Common/cpp/hidden_headers/SpeedChecker.h +29 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/RNReanimated.podspec +99 -0
- package/android/CMakeLists.txt +346 -0
- package/android/README.md +15 -0
- package/android/build.gradle +1131 -0
- package/android/empty.cpp +1 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +25 -0
- package/android/gradlew +234 -0
- package/android/gradlew.bat +89 -0
- package/android/proguard-rules.pro +2 -0
- package/android/settings.gradle +1 -0
- package/android/spotless.gradle +9 -0
- package/android/src/fabric/java/com/swmansion/reanimated/NativeProxy.java +96 -0
- package/android/src/fabric/java/com/swmansion/reanimated/ReaCompatibility.java +25 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/cpp/AndroidErrorHandler.cpp +41 -0
- package/android/src/main/cpp/AndroidErrorHandler.h +27 -0
- package/android/src/main/cpp/AndroidLogger.cpp +30 -0
- package/android/src/main/cpp/AndroidLogger.h +16 -0
- package/android/src/main/cpp/AndroidScheduler.cpp +59 -0
- package/android/src/main/cpp/AndroidScheduler.h +41 -0
- package/android/src/main/cpp/JNIHelper.cpp +59 -0
- package/android/src/main/cpp/JNIHelper.h +30 -0
- package/android/src/main/cpp/LayoutAnimations.cpp +115 -0
- package/android/src/main/cpp/LayoutAnimations.h +73 -0
- package/android/src/main/cpp/NativeProxy.cpp +571 -0
- package/android/src/main/cpp/NativeProxy.h +275 -0
- package/android/src/main/cpp/OnLoad.cpp +18 -0
- package/android/src/main/cpp/TurboModule.cpp +44 -0
- package/android/src/main/cpp/TurboModule.h +70 -0
- package/android/src/main/java/com/facebook/react/uimanager/UIManagerReanimatedHelper.java +15 -0
- package/android/src/main/java/com/swmansion/common/GestureHandlerStateManager.java +5 -0
- package/android/src/main/java/com/swmansion/reanimated/CopiedEvent.java +43 -0
- package/android/src/main/java/com/swmansion/reanimated/MapUtils.java +26 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +112 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +455 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedMessageQueueThreadBase.java +72 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +126 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +97 -0
- package/android/src/main/java/com/swmansion/reanimated/Scheduler.java +51 -0
- package/android/src/main/java/com/swmansion/reanimated/Utils.java +38 -0
- package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +173 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +695 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +85 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/NativeMethodsHolder.java +17 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedElement.java +19 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/SharedTransitionManager.java +610 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/Snapshot.java +191 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ViewHierarchyObserver.java +12 -0
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/AnimationFrameCallback.java +19 -0
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/EventHandler.java +35 -0
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/KeyboardEventDataUpdater.java +16 -0
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +213 -0
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/SensorSetter.java +17 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +51 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorContainer.java +39 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +80 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +37 -0
- package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +119 -0
- package/android/src/paper/java/com/swmansion/reanimated/ReaCompatibility.java +17 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/70/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +16 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/70/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +292 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +63 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +271 -0
- package/android/src/reactNativeVersionPatch/UIImplementation/64/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/src/reactNativeVersionPatch/UIImplementation/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/src/reactNativeVersionPatch/messageQueueThread/67/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +12 -0
- package/android/src/reactNativeVersionPatch/messageQueueThread/latest/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +12 -0
- package/android/src/reactNativeVersionPatch/nativeHierarchyManager/62/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +376 -0
- package/android/src/reactNativeVersionPatch/nativeHierarchyManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +420 -0
- package/ios/Fabric/REAInitializerRCTFabricSurface.h +12 -0
- package/ios/Fabric/REAInitializerRCTFabricSurface.mm +74 -0
- package/ios/LayoutReanimation/REAAnimationsManager.h +68 -0
- package/ios/LayoutReanimation/REAAnimationsManager.m +584 -0
- package/ios/LayoutReanimation/REAFrame.h +10 -0
- package/ios/LayoutReanimation/REAFrame.m +15 -0
- package/ios/LayoutReanimation/REAScreensHelper.h +19 -0
- package/ios/LayoutReanimation/REAScreensHelper.m +106 -0
- package/ios/LayoutReanimation/REASharedElement.h +15 -0
- package/ios/LayoutReanimation/REASharedElement.m +16 -0
- package/ios/LayoutReanimation/REASharedTransitionManager.h +17 -0
- package/ios/LayoutReanimation/REASharedTransitionManager.m +632 -0
- package/ios/LayoutReanimation/REASnapshot.h +14 -0
- package/ios/LayoutReanimation/REASnapshot.m +114 -0
- package/ios/LayoutReanimation/REAUIManager.h +16 -0
- package/ios/LayoutReanimation/REAUIManager.mm +387 -0
- package/ios/REAEventDispatcher.h +10 -0
- package/ios/REAEventDispatcher.m +18 -0
- package/ios/REAModule.h +23 -0
- package/ios/REAModule.mm +314 -0
- package/ios/REANodesManager.h +60 -0
- package/ios/REANodesManager.mm +569 -0
- package/ios/REAUtils.h +7 -0
- package/ios/RNGestureHandlerStateManager.h +5 -0
- package/ios/RNReanimated.xcodeproj/project.pbxproj +609 -0
- package/ios/RNReanimated.xcodeproj/xcshareddata/xcschemes/RNReanimated-tvOS.xcscheme +80 -0
- package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +155 -0
- package/ios/native/NativeMethods.h +24 -0
- package/ios/native/NativeMethods.mm +54 -0
- package/ios/native/NativeProxy.h +15 -0
- package/ios/native/NativeProxy.mm +371 -0
- package/ios/native/REAIOSErrorHandler.h +21 -0
- package/ios/native/REAIOSErrorHandler.mm +40 -0
- package/ios/native/REAIOSLogger.h +15 -0
- package/ios/native/REAIOSLogger.mm +29 -0
- package/ios/native/REAIOSScheduler.h +19 -0
- package/ios/native/REAIOSScheduler.mm +48 -0
- package/ios/native/REAInitializer.h +30 -0
- package/ios/native/REAInitializer.mm +77 -0
- package/ios/native/REAJSIUtils.h +124 -0
- package/ios/native/REAMessageThread.h +22 -0
- package/ios/native/REAMessageThread.mm +38 -0
- package/ios/native/UIResponder+Reanimated.h +12 -0
- package/ios/native/UIResponder+Reanimated.mm +35 -0
- package/ios/sensor/ReanimatedSensor.h +29 -0
- package/ios/sensor/ReanimatedSensor.m +262 -0
- package/ios/sensor/ReanimatedSensorContainer.h +15 -0
- package/ios/sensor/ReanimatedSensorContainer.m +46 -0
- package/ios/sensor/ReanimatedSensorType.h +7 -0
- package/lib/commonjs/Animated.js +62 -0
- package/lib/commonjs/Animated.js.map +1 -0
- package/lib/commonjs/ConfigHelper.js +162 -0
- package/lib/commonjs/ConfigHelper.js.map +1 -0
- package/lib/commonjs/createAnimatedComponent.js +545 -0
- package/lib/commonjs/createAnimatedComponent.js.map +1 -0
- package/lib/commonjs/index.js +35 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/index.web.js +25 -0
- package/lib/commonjs/index.web.js.map +1 -0
- package/lib/commonjs/reanimated2/Bezier.js +146 -0
- package/lib/commonjs/reanimated2/Bezier.js.map +1 -0
- package/lib/commonjs/reanimated2/Colors.js +622 -0
- package/lib/commonjs/reanimated2/Colors.js.map +1 -0
- package/lib/commonjs/reanimated2/Easing.js +321 -0
- package/lib/commonjs/reanimated2/Easing.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeMethods.js +124 -0
- package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +86 -0
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeReanimated/index.js +19 -0
- package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated2/PlatformChecker.js +27 -0
- package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -0
- package/lib/commonjs/reanimated2/PropAdapters.js +66 -0
- package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -0
- package/lib/commonjs/reanimated2/Sensor.js +69 -0
- package/lib/commonjs/reanimated2/Sensor.js.map +1 -0
- package/lib/commonjs/reanimated2/SensorContainer.js +53 -0
- package/lib/commonjs/reanimated2/SensorContainer.js.map +1 -0
- package/lib/commonjs/reanimated2/UpdateProps.js +73 -0
- package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -0
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +58 -0
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -0
- package/lib/commonjs/reanimated2/WorkletEventHandler.js +60 -0
- package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/animation/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/decay.js +121 -0
- package/lib/commonjs/reanimated2/animation/decay.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/delay.js +66 -0
- package/lib/commonjs/reanimated2/animation/delay.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/index.js +74 -0
- package/lib/commonjs/reanimated2/animation/index.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/repeat.js +67 -0
- package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/sequence.js +74 -0
- package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/spring.js +109 -0
- package/lib/commonjs/reanimated2/animation/spring.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/styleAnimation.js +178 -0
- package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/timing.js +71 -0
- package/lib/commonjs/reanimated2/animation/timing.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/util.js +230 -0
- package/lib/commonjs/reanimated2/animation/util.js.map +1 -0
- package/lib/commonjs/reanimated2/commonTypes.js +49 -0
- package/lib/commonjs/reanimated2/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/component/FlatList.js +53 -0
- package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -0
- package/lib/commonjs/reanimated2/component/Image.js +13 -0
- package/lib/commonjs/reanimated2/component/Image.js.map +1 -0
- package/lib/commonjs/reanimated2/component/ScrollView.js +13 -0
- package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -0
- package/lib/commonjs/reanimated2/component/Text.js +13 -0
- package/lib/commonjs/reanimated2/component/Text.js.map +1 -0
- package/lib/commonjs/reanimated2/component/View.js +13 -0
- package/lib/commonjs/reanimated2/component/View.js.map +1 -0
- package/lib/commonjs/reanimated2/core.js +186 -0
- package/lib/commonjs/reanimated2/core.js.map +1 -0
- package/lib/commonjs/reanimated2/errors.js +55 -0
- package/lib/commonjs/reanimated2/errors.js.map +1 -0
- package/lib/commonjs/reanimated2/fabricUtils.js +25 -0
- package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -0
- package/lib/commonjs/reanimated2/fabricUtils.web.js +19 -0
- package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +46 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +92 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
- package/lib/commonjs/reanimated2/globals.d.js +6 -0
- package/lib/commonjs/reanimated2/globals.d.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/Hooks.js +30 -0
- package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/index.js +108 -0
- package/lib/commonjs/reanimated2/hook/index.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +53 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +50 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +46 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +41 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +55 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +126 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +380 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js +52 -0
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js +31 -0
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js +26 -0
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useSharedValue.js +26 -0
- package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/utils.js +169 -0
- package/lib/commonjs/reanimated2/hook/utils.js.map +1 -0
- package/lib/commonjs/reanimated2/index.js +149 -0
- package/lib/commonjs/reanimated2/index.js.map +1 -0
- package/lib/commonjs/reanimated2/initializers.js +174 -0
- package/lib/commonjs/reanimated2/initializers.js.map +1 -0
- package/lib/commonjs/reanimated2/interpolateColor.js +194 -0
- package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -0
- package/lib/commonjs/reanimated2/interpolation.js +128 -0
- package/lib/commonjs/reanimated2/interpolation.js.map +1 -0
- package/lib/commonjs/reanimated2/jestUtils.js +189 -0
- package/lib/commonjs/reanimated2/jestUtils.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +137 -0
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +77 -0
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +116 -0
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +44 -0
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/WebSensor.js +2 -0
- package/lib/commonjs/reanimated2/js-reanimated/WebSensor.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/global.js +45 -0
- package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/index.js +50 -0
- package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +81 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +157 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +208 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +16 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +34 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js +81 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +492 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +359 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +499 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +196 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +91 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +163 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +363 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +251 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +147 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +613 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +116 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +101 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +156 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +60 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +58 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +47 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +59 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +72 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/index.js +51 -0
- package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js +80 -0
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -0
- package/lib/commonjs/reanimated2/mappers.js +195 -0
- package/lib/commonjs/reanimated2/mappers.js.map +1 -0
- package/lib/commonjs/reanimated2/mock.js +123 -0
- package/lib/commonjs/reanimated2/mock.js.map +1 -0
- package/lib/commonjs/reanimated2/mutables.js +149 -0
- package/lib/commonjs/reanimated2/mutables.js.map +1 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +14 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js +5 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
- 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 +13 -0
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js.map +1 -0
- 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 +10 -0
- package/lib/commonjs/reanimated2/pluginUtils.js.map +1 -0
- package/lib/commonjs/reanimated2/shareables.js +219 -0
- package/lib/commonjs/reanimated2/shareables.js.map +1 -0
- package/lib/commonjs/reanimated2/threads.js +161 -0
- package/lib/commonjs/reanimated2/threads.js.map +1 -0
- package/lib/commonjs/reanimated2/utils.js +30 -0
- package/lib/commonjs/reanimated2/utils.js.map +1 -0
- package/lib/commonjs/reanimated2/valueSetter.js +64 -0
- package/lib/commonjs/reanimated2/valueSetter.js.map +1 -0
- package/lib/commonjs/setAndForwardRef.js +63 -0
- package/lib/commonjs/setAndForwardRef.js.map +1 -0
- package/lib/module/Animated.js +8 -0
- package/lib/module/Animated.js.map +1 -0
- package/lib/module/ConfigHelper.js +155 -0
- package/lib/module/ConfigHelper.js.map +1 -0
- package/lib/module/createAnimatedComponent.js +538 -0
- package/lib/module/createAnimatedComponent.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.web.js +6 -0
- package/lib/module/index.web.js.map +1 -0
- package/lib/module/reanimated2/Bezier.js +140 -0
- package/lib/module/reanimated2/Bezier.js.map +1 -0
- package/lib/module/reanimated2/Colors.js +598 -0
- package/lib/module/reanimated2/Colors.js.map +1 -0
- package/lib/module/reanimated2/Easing.js +315 -0
- package/lib/module/reanimated2/Easing.js.map +1 -0
- package/lib/module/reanimated2/NativeMethods.js +113 -0
- package/lib/module/reanimated2/NativeMethods.js.map +1 -0
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +79 -0
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
- package/lib/module/reanimated2/NativeReanimated/index.js +11 -0
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -0
- package/lib/module/reanimated2/PlatformChecker.js +17 -0
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -0
- package/lib/module/reanimated2/PropAdapters.js +58 -0
- package/lib/module/reanimated2/PropAdapters.js.map +1 -0
- package/lib/module/reanimated2/Sensor.js +61 -0
- package/lib/module/reanimated2/Sensor.js.map +1 -0
- package/lib/module/reanimated2/SensorContainer.js +45 -0
- package/lib/module/reanimated2/SensorContainer.js.map +1 -0
- package/lib/module/reanimated2/UpdateProps.js +62 -0
- package/lib/module/reanimated2/UpdateProps.js.map +1 -0
- package/lib/module/reanimated2/ViewDescriptorsSet.js +51 -0
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -0
- package/lib/module/reanimated2/WorkletEventHandler.js +52 -0
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -0
- package/lib/module/reanimated2/animation/commonTypes.js +2 -0
- package/lib/module/reanimated2/animation/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/animation/decay.js +115 -0
- package/lib/module/reanimated2/animation/decay.js.map +1 -0
- package/lib/module/reanimated2/animation/delay.js +60 -0
- package/lib/module/reanimated2/animation/delay.js.map +1 -0
- package/lib/module/reanimated2/animation/index.js +9 -0
- package/lib/module/reanimated2/animation/index.js.map +1 -0
- package/lib/module/reanimated2/animation/repeat.js +61 -0
- package/lib/module/reanimated2/animation/repeat.js.map +1 -0
- package/lib/module/reanimated2/animation/sequence.js +68 -0
- package/lib/module/reanimated2/animation/sequence.js.map +1 -0
- package/lib/module/reanimated2/animation/spring.js +103 -0
- package/lib/module/reanimated2/animation/spring.js.map +1 -0
- package/lib/module/reanimated2/animation/styleAnimation.js +171 -0
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -0
- package/lib/module/reanimated2/animation/timing.js +65 -0
- package/lib/module/reanimated2/animation/timing.js.map +1 -0
- package/lib/module/reanimated2/animation/util.js +219 -0
- package/lib/module/reanimated2/animation/util.js.map +1 -0
- package/lib/module/reanimated2/commonTypes.js +39 -0
- package/lib/module/reanimated2/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/component/FlatList.js +43 -0
- package/lib/module/reanimated2/component/FlatList.js.map +1 -0
- package/lib/module/reanimated2/component/Image.js +5 -0
- package/lib/module/reanimated2/component/Image.js.map +1 -0
- package/lib/module/reanimated2/component/ScrollView.js +5 -0
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -0
- package/lib/module/reanimated2/component/Text.js +5 -0
- package/lib/module/reanimated2/component/Text.js.map +1 -0
- package/lib/module/reanimated2/component/View.js +5 -0
- package/lib/module/reanimated2/component/View.js.map +1 -0
- package/lib/module/reanimated2/core.js +141 -0
- package/lib/module/reanimated2/core.js.map +1 -0
- package/lib/module/reanimated2/errors.js +48 -0
- package/lib/module/reanimated2/errors.js.map +1 -0
- package/lib/module/reanimated2/fabricUtils.js +18 -0
- package/lib/module/reanimated2/fabricUtils.js.map +1 -0
- package/lib/module/reanimated2/fabricUtils.web.js +12 -0
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +39 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +85 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
- package/lib/module/reanimated2/globals.d.js +2 -0
- package/lib/module/reanimated2/globals.d.js.map +1 -0
- package/lib/module/reanimated2/hook/Hooks.js +11 -0
- package/lib/module/reanimated2/hook/Hooks.js.map +1 -0
- package/lib/module/reanimated2/hook/commonTypes.js +2 -0
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/hook/index.js +13 -0
- package/lib/module/reanimated2/hook/index.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +45 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +44 -0
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +40 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedRef.js +35 -0
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +49 -0
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedSensor.js +121 -0
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +371 -0
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -0
- package/lib/module/reanimated2/hook/useDerivedValue.js +46 -0
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -0
- package/lib/module/reanimated2/hook/useFrameCallback.js +24 -0
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -0
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +20 -0
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -0
- package/lib/module/reanimated2/hook/useSharedValue.js +20 -0
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -0
- package/lib/module/reanimated2/hook/utils.js +152 -0
- package/lib/module/reanimated2/hook/utils.js.map +1 -0
- package/lib/module/reanimated2/index.js +14 -0
- package/lib/module/reanimated2/index.js.map +1 -0
- package/lib/module/reanimated2/initializers.js +168 -0
- package/lib/module/reanimated2/initializers.js.map +1 -0
- package/lib/module/reanimated2/interpolateColor.js +183 -0
- package/lib/module/reanimated2/interpolateColor.js.map +1 -0
- package/lib/module/reanimated2/interpolation.js +120 -0
- package/lib/module/reanimated2/interpolation.js.map +1 -0
- package/lib/module/reanimated2/jestUtils.js +178 -0
- package/lib/module/reanimated2/jestUtils.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +130 -0
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/Mapper.js +69 -0
- package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +109 -0
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/MutableValue.js +37 -0
- package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/WebSensor.js +2 -0
- package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/commonTypes.js +2 -0
- package/lib/module/reanimated2/js-reanimated/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/global.js +39 -0
- package/lib/module/reanimated2/js-reanimated/global.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/index.js +41 -0
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +74 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +150 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +201 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +10 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js +5 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js +79 -0
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +476 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +343 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +481 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +186 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +83 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +153 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +349 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +237 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +137 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +591 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js +11 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +94 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +148 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +53 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +51 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +39 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +52 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js +7 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/index.js +6 -0
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js +72 -0
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -0
- package/lib/module/reanimated2/mappers.js +187 -0
- package/lib/module/reanimated2/mappers.js.map +1 -0
- package/lib/module/reanimated2/mock.js +121 -0
- package/lib/module/reanimated2/mock.js.map +1 -0
- package/lib/module/reanimated2/mutables.js +134 -0
- package/lib/module/reanimated2/mutables.js.map +1 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.js +4 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js +3 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
- 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 +7 -0
- package/lib/module/reanimated2/platform-specific/checkVersion.web.js.map +1 -0
- 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 +4 -0
- package/lib/module/reanimated2/pluginUtils.js.map +1 -0
- package/lib/module/reanimated2/shareables.js +210 -0
- package/lib/module/reanimated2/shareables.js.map +1 -0
- package/lib/module/reanimated2/threads.js +149 -0
- package/lib/module/reanimated2/threads.js.map +1 -0
- package/lib/module/reanimated2/utils.js +23 -0
- package/lib/module/reanimated2/utils.js.map +1 -0
- package/lib/module/reanimated2/valueSetter.js +52 -0
- package/lib/module/reanimated2/valueSetter.js.map +1 -0
- package/lib/module/setAndForwardRef.js +56 -0
- package/lib/module/setAndForwardRef.js.map +1 -0
- package/mock.js +55 -0
- package/package.json +181 -0
- package/plugin/build/plugin.js +714 -0
- package/plugin/build/plugin.js.map +7 -0
- package/plugin/index.js +1 -0
- package/react-native-reanimated.d.ts +877 -0
- package/scripts/reanimated_utils.rb +91 -0
- package/src/Animated.ts +11 -0
- package/src/ConfigHelper.ts +170 -0
- package/src/createAnimatedComponent.tsx +749 -0
- package/src/index.ts +13 -0
- package/src/index.web.ts +5 -0
- package/src/reanimated2/Bezier.ts +172 -0
- package/src/reanimated2/Colors.ts +679 -0
- package/src/reanimated2/Easing.ts +305 -0
- package/src/reanimated2/NativeMethods.ts +163 -0
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +155 -0
- package/src/reanimated2/NativeReanimated/index.ts +12 -0
- package/src/reanimated2/PlatformChecker.ts +21 -0
- package/src/reanimated2/PropAdapters.ts +68 -0
- package/src/reanimated2/Sensor.ts +81 -0
- package/src/reanimated2/SensorContainer.ts +71 -0
- package/src/reanimated2/UpdateProps.ts +112 -0
- package/src/reanimated2/ViewDescriptorsSet.ts +72 -0
- package/src/reanimated2/WorkletEventHandler.ts +61 -0
- package/src/reanimated2/animation/commonTypes.ts +52 -0
- package/src/reanimated2/animation/decay.ts +196 -0
- package/src/reanimated2/animation/delay.ts +77 -0
- package/src/reanimated2/animation/index.ts +19 -0
- package/src/reanimated2/animation/repeat.ts +93 -0
- package/src/reanimated2/animation/sequence.ts +85 -0
- package/src/reanimated2/animation/spring.ts +166 -0
- package/src/reanimated2/animation/styleAnimation.ts +262 -0
- package/src/reanimated2/animation/timing.ts +111 -0
- package/src/reanimated2/animation/util.ts +348 -0
- package/src/reanimated2/commonTypes.ts +241 -0
- package/src/reanimated2/component/FlatList.tsx +77 -0
- package/src/reanimated2/component/Image.ts +6 -0
- package/src/reanimated2/component/ScrollView.ts +6 -0
- package/src/reanimated2/component/Text.ts +6 -0
- package/src/reanimated2/component/View.ts +6 -0
- package/src/reanimated2/core.ts +253 -0
- package/src/reanimated2/errors.ts +58 -0
- package/src/reanimated2/fabricUtils.ts +27 -0
- package/src/reanimated2/fabricUtils.web.ts +19 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +40 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +123 -0
- package/src/reanimated2/globals.d.ts +104 -0
- package/src/reanimated2/hook/Hooks.ts +16 -0
- package/src/reanimated2/hook/commonTypes.ts +19 -0
- package/src/reanimated2/hook/index.ts +27 -0
- package/src/reanimated2/hook/useAnimatedGestureHandler.ts +109 -0
- package/src/reanimated2/hook/useAnimatedKeyboard.ts +50 -0
- package/src/reanimated2/hook/useAnimatedReaction.ts +56 -0
- package/src/reanimated2/hook/useAnimatedRef.ts +58 -0
- package/src/reanimated2/hook/useAnimatedScrollHandler.ts +85 -0
- package/src/reanimated2/hook/useAnimatedSensor.ts +134 -0
- package/src/reanimated2/hook/useAnimatedStyle.ts +517 -0
- package/src/reanimated2/hook/useDerivedValue.ts +55 -0
- package/src/reanimated2/hook/useFrameCallback.ts +40 -0
- package/src/reanimated2/hook/useScrollViewOffset.ts +37 -0
- package/src/reanimated2/hook/useSharedValue.ts +25 -0
- package/src/reanimated2/hook/utils.ts +206 -0
- package/src/reanimated2/index.ts +13 -0
- package/src/reanimated2/initializers.ts +187 -0
- package/src/reanimated2/interpolateColor.ts +266 -0
- package/src/reanimated2/interpolation.ts +187 -0
- package/src/reanimated2/jestUtils.ts +215 -0
- package/src/reanimated2/js-reanimated/JSReanimated.ts +161 -0
- package/src/reanimated2/js-reanimated/Mapper.ts +94 -0
- package/src/reanimated2/js-reanimated/MapperRegistry.ts +133 -0
- package/src/reanimated2/js-reanimated/MutableValue.ts +38 -0
- package/src/reanimated2/js-reanimated/WebSensor.ts +34 -0
- package/src/reanimated2/js-reanimated/commonTypes.ts +50 -0
- package/src/reanimated2/js-reanimated/global.ts +46 -0
- package/src/reanimated2/js-reanimated/index.ts +60 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +91 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +182 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +262 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +116 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +22 -0
- package/src/reanimated2/layoutReanimation/animationsManager.ts +102 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +528 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +347 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +478 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +194 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +99 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +154 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +384 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +298 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +129 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +580 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/index.ts +10 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +117 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +224 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +61 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +65 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +48 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +91 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/index.ts +6 -0
- package/src/reanimated2/layoutReanimation/index.ts +5 -0
- package/src/reanimated2/layoutReanimation/sharedTransitions/index.ts +87 -0
- package/src/reanimated2/mappers.ts +215 -0
- package/src/reanimated2/mock.ts +209 -0
- package/src/reanimated2/mutables.ts +153 -0
- package/src/reanimated2/platform-specific/RNRenderer.ts +3 -0
- package/src/reanimated2/platform-specific/RNRenderer.web.ts +2 -0
- package/src/reanimated2/platform-specific/checkCppVersion.ts +29 -0
- package/src/reanimated2/platform-specific/checkVersion.web.ts +6 -0
- package/src/reanimated2/platform-specific/jsVersion.ts +6 -0
- package/src/reanimated2/pluginUtils.ts +8 -0
- package/src/reanimated2/shareables.ts +252 -0
- package/src/reanimated2/threads.ts +164 -0
- package/src/reanimated2/utils.ts +34 -0
- package/src/reanimated2/valueSetter.ts +63 -0
- package/src/setAndForwardRef.ts +63 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#include "AnimatedSensorModule.h"
|
|
2
|
+
|
|
3
|
+
#include <memory>
|
|
4
|
+
#include <utility>
|
|
5
|
+
|
|
6
|
+
#include "Shareables.h"
|
|
7
|
+
|
|
8
|
+
namespace reanimated {
|
|
9
|
+
|
|
10
|
+
AnimatedSensorModule::AnimatedSensorModule(
|
|
11
|
+
const PlatformDepMethodsHolder &platformDepMethodsHolder)
|
|
12
|
+
: platformRegisterSensorFunction_(platformDepMethodsHolder.registerSensor),
|
|
13
|
+
platformUnregisterSensorFunction_(
|
|
14
|
+
platformDepMethodsHolder.unregisterSensor) {}
|
|
15
|
+
|
|
16
|
+
AnimatedSensorModule::~AnimatedSensorModule() {
|
|
17
|
+
assert(sensorsIds_.empty());
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
jsi::Value AnimatedSensorModule::registerSensor(
|
|
21
|
+
jsi::Runtime &rt,
|
|
22
|
+
const std::shared_ptr<JSRuntimeHelper> &runtimeHelper,
|
|
23
|
+
const jsi::Value &sensorTypeValue,
|
|
24
|
+
const jsi::Value &interval,
|
|
25
|
+
const jsi::Value &iosReferenceFrame,
|
|
26
|
+
const jsi::Value &sensorDataHandler) {
|
|
27
|
+
SensorType sensorType = static_cast<SensorType>(sensorTypeValue.asNumber());
|
|
28
|
+
|
|
29
|
+
auto shareableHandler = extractShareableOrThrow(rt, sensorDataHandler);
|
|
30
|
+
|
|
31
|
+
int sensorId = platformRegisterSensorFunction_(
|
|
32
|
+
sensorType,
|
|
33
|
+
interval.asNumber(),
|
|
34
|
+
iosReferenceFrame.asNumber(),
|
|
35
|
+
[sensorType,
|
|
36
|
+
shareableHandler,
|
|
37
|
+
weakRuntimeHelper = std::weak_ptr<JSRuntimeHelper>(runtimeHelper)](
|
|
38
|
+
double newValues[], int orientationDegrees) {
|
|
39
|
+
auto runtimeHelper = weakRuntimeHelper.lock();
|
|
40
|
+
if (runtimeHelper == nullptr || runtimeHelper->uiRuntimeDestroyed) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
auto &rt = *runtimeHelper->uiRuntime();
|
|
45
|
+
auto handler = shareableHandler->getJSValue(rt);
|
|
46
|
+
if (sensorType == SensorType::ROTATION_VECTOR) {
|
|
47
|
+
jsi::Object value(rt);
|
|
48
|
+
// TODO: timestamp should be provided by the platform implementation
|
|
49
|
+
// such that the native side has a chance of providing a true event
|
|
50
|
+
// timestamp
|
|
51
|
+
value.setProperty(rt, "qx", newValues[0]);
|
|
52
|
+
value.setProperty(rt, "qy", newValues[1]);
|
|
53
|
+
value.setProperty(rt, "qz", newValues[2]);
|
|
54
|
+
value.setProperty(rt, "qw", newValues[3]);
|
|
55
|
+
value.setProperty(rt, "yaw", newValues[4]);
|
|
56
|
+
value.setProperty(rt, "pitch", newValues[5]);
|
|
57
|
+
value.setProperty(rt, "roll", newValues[6]);
|
|
58
|
+
value.setProperty(rt, "interfaceOrientation", orientationDegrees);
|
|
59
|
+
runtimeHelper->runOnUIGuarded(handler, value);
|
|
60
|
+
} else {
|
|
61
|
+
jsi::Object value(rt);
|
|
62
|
+
value.setProperty(rt, "x", newValues[0]);
|
|
63
|
+
value.setProperty(rt, "y", newValues[1]);
|
|
64
|
+
value.setProperty(rt, "z", newValues[2]);
|
|
65
|
+
value.setProperty(rt, "interfaceOrientation", orientationDegrees);
|
|
66
|
+
runtimeHelper->runOnUIGuarded(handler, value);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
if (sensorId != -1) {
|
|
70
|
+
sensorsIds_.insert(sensorId);
|
|
71
|
+
}
|
|
72
|
+
return jsi::Value(sensorId);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
void AnimatedSensorModule::unregisterSensor(const jsi::Value &sensorId) {
|
|
76
|
+
// It is called during sensor hook unmounting
|
|
77
|
+
sensorsIds_.erase(sensorId.getNumber());
|
|
78
|
+
platformUnregisterSensorFunction_(sensorId.asNumber());
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
void AnimatedSensorModule::unregisterAllSensors() {
|
|
82
|
+
for (auto sensorId : sensorsIds_) {
|
|
83
|
+
platformUnregisterSensorFunction_(sensorId);
|
|
84
|
+
}
|
|
85
|
+
sensorsIds_.clear();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
} // namespace reanimated
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <jsi/jsi.h>
|
|
4
|
+
#include <memory>
|
|
5
|
+
#include <unordered_set>
|
|
6
|
+
|
|
7
|
+
#include "PlatformDepMethodsHolder.h"
|
|
8
|
+
#include "RuntimeManager.h"
|
|
9
|
+
#include "Shareables.h"
|
|
10
|
+
|
|
11
|
+
namespace reanimated {
|
|
12
|
+
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
enum SensorType {
|
|
16
|
+
ACCELEROMETER = 1,
|
|
17
|
+
GYROSCOPE = 2,
|
|
18
|
+
GRAVITY = 3,
|
|
19
|
+
MAGNETIC_FIELD = 4,
|
|
20
|
+
ROTATION_VECTOR = 5,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
class AnimatedSensorModule {
|
|
24
|
+
std::unordered_set<int> sensorsIds_;
|
|
25
|
+
RegisterSensorFunction platformRegisterSensorFunction_;
|
|
26
|
+
UnregisterSensorFunction platformUnregisterSensorFunction_;
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
AnimatedSensorModule(
|
|
30
|
+
const PlatformDepMethodsHolder &platformDepMethodsHolder);
|
|
31
|
+
~AnimatedSensorModule();
|
|
32
|
+
|
|
33
|
+
jsi::Value registerSensor(
|
|
34
|
+
jsi::Runtime &rt,
|
|
35
|
+
const std::shared_ptr<JSRuntimeHelper> &runtimeHelper,
|
|
36
|
+
const jsi::Value &sensorType,
|
|
37
|
+
const jsi::Value &interval,
|
|
38
|
+
const jsi::Value &iosReferenceFrame,
|
|
39
|
+
const jsi::Value &sensorDataContainer);
|
|
40
|
+
void unregisterSensor(const jsi::Value &sensorId);
|
|
41
|
+
void unregisterAllSensors();
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace reanimated
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
+
|
|
3
|
+
#include "FabricUtils.h"
|
|
4
|
+
|
|
5
|
+
#include <react/renderer/debug/SystraceSection.h>
|
|
6
|
+
#include <react/renderer/uimanager/UIManagerBinding.h>
|
|
7
|
+
|
|
8
|
+
using namespace facebook::react;
|
|
9
|
+
|
|
10
|
+
namespace reanimated {
|
|
11
|
+
|
|
12
|
+
#ifdef ANDROID
|
|
13
|
+
RuntimeExecutor getRuntimeExecutorFromBinding(Binding *binding) {
|
|
14
|
+
BindingPublic *bindingPublic = reinterpret_cast<BindingPublic *>(binding);
|
|
15
|
+
SchedulerPublic *schedulerPublic =
|
|
16
|
+
reinterpret_cast<SchedulerPublic *>((bindingPublic->scheduler_).get());
|
|
17
|
+
return schedulerPublic->runtimeExecutor_;
|
|
18
|
+
}
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
std::shared_ptr<const ContextContainer> getContextContainerFromUIManager(
|
|
22
|
+
const UIManager *uiManager) {
|
|
23
|
+
return reinterpret_cast<const UIManagerPublic *>(uiManager)
|
|
24
|
+
->contextContainer_;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
} // namespace reanimated
|
|
28
|
+
|
|
29
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
+
|
|
4
|
+
#ifdef ANDROID
|
|
5
|
+
#include <fbjni/fbjni.h>
|
|
6
|
+
#include <react/fabric/Binding.h>
|
|
7
|
+
#endif
|
|
8
|
+
#include <react/renderer/uimanager/UIManager.h>
|
|
9
|
+
|
|
10
|
+
#include <memory>
|
|
11
|
+
#include <string>
|
|
12
|
+
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
using namespace react;
|
|
15
|
+
|
|
16
|
+
namespace reanimated {
|
|
17
|
+
|
|
18
|
+
struct UIManagerBindingPublic {
|
|
19
|
+
void *vtable;
|
|
20
|
+
std::shared_ptr<UIManager> uiManager_;
|
|
21
|
+
std::unique_ptr<EventHandler const> eventHandler_;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct UIManagerPublic {
|
|
25
|
+
void *vtable;
|
|
26
|
+
SharedComponentDescriptorRegistry componentDescriptorRegistry_;
|
|
27
|
+
UIManagerDelegate *delegate_;
|
|
28
|
+
UIManagerAnimationDelegate *animationDelegate_{nullptr};
|
|
29
|
+
RuntimeExecutor const runtimeExecutor_{};
|
|
30
|
+
ShadowTreeRegistry shadowTreeRegistry_{};
|
|
31
|
+
BackgroundExecutor const backgroundExecutor_{};
|
|
32
|
+
ContextContainer::Shared contextContainer_;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
#ifdef ANDROID
|
|
36
|
+
struct BindingPublic : public jni::HybridClass<Binding>,
|
|
37
|
+
public SchedulerDelegate,
|
|
38
|
+
public LayoutAnimationStatusDelegate {
|
|
39
|
+
std::shared_mutex installMutex_;
|
|
40
|
+
std::shared_ptr<FabricMountingManager> mountingManager_;
|
|
41
|
+
std::shared_ptr<facebook::react::Scheduler> scheduler_;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
struct SchedulerPublic : public UIManagerDelegate {
|
|
45
|
+
SchedulerDelegate *delegate_;
|
|
46
|
+
SharedComponentDescriptorRegistry componentDescriptorRegistry_;
|
|
47
|
+
RuntimeExecutor runtimeExecutor_;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
RuntimeExecutor getRuntimeExecutorFromBinding(Binding *binding);
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
std::shared_ptr<const ContextContainer> getContextContainerFromUIManager(
|
|
54
|
+
const UIManager *uiManager);
|
|
55
|
+
|
|
56
|
+
} // namespace reanimated
|
|
57
|
+
|
|
58
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
+
|
|
3
|
+
#include "ReanimatedUIManagerBinding.h"
|
|
4
|
+
#include "FabricUtils.h"
|
|
5
|
+
#include "NewestShadowNodesRegistry.h"
|
|
6
|
+
|
|
7
|
+
#include <react/renderer/debug/SystraceSection.h>
|
|
8
|
+
|
|
9
|
+
#include <utility>
|
|
10
|
+
|
|
11
|
+
using namespace facebook;
|
|
12
|
+
using namespace react;
|
|
13
|
+
|
|
14
|
+
namespace reanimated {
|
|
15
|
+
|
|
16
|
+
void ReanimatedUIManagerBinding::createAndInstallIfNeeded(
|
|
17
|
+
jsi::Runtime &runtime,
|
|
18
|
+
RuntimeExecutor const &runtimeExecutor,
|
|
19
|
+
std::shared_ptr<UIManager> const &uiManager,
|
|
20
|
+
std::shared_ptr<NewestShadowNodesRegistry> const
|
|
21
|
+
&newestShadowNodesRegistry) {
|
|
22
|
+
// adapted from UIManagerBinding.cpp
|
|
23
|
+
auto uiManagerModuleName = "nativeFabricUIManager";
|
|
24
|
+
|
|
25
|
+
auto eventHandler = [&]() -> std::unique_ptr<EventHandler const> {
|
|
26
|
+
auto uiManagerValue =
|
|
27
|
+
runtime.global().getProperty(runtime, uiManagerModuleName);
|
|
28
|
+
if (uiManagerValue.isUndefined()) {
|
|
29
|
+
return nullptr;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
auto uiManagerBinding =
|
|
33
|
+
uiManagerValue.asObject(runtime).asHostObject<UIManagerBinding>(
|
|
34
|
+
runtime);
|
|
35
|
+
auto uiManagerBindingPublic =
|
|
36
|
+
reinterpret_cast<UIManagerBindingPublic *>(&*uiManagerBinding);
|
|
37
|
+
return std::move(uiManagerBindingPublic->eventHandler_);
|
|
38
|
+
}();
|
|
39
|
+
|
|
40
|
+
auto reanimatedUiManagerBinding =
|
|
41
|
+
std::make_shared<ReanimatedUIManagerBinding>(
|
|
42
|
+
uiManager,
|
|
43
|
+
runtimeExecutor,
|
|
44
|
+
std::move(eventHandler),
|
|
45
|
+
newestShadowNodesRegistry);
|
|
46
|
+
auto object =
|
|
47
|
+
jsi::Object::createFromHostObject(runtime, reanimatedUiManagerBinding);
|
|
48
|
+
runtime.global().setProperty(runtime, uiManagerModuleName, std::move(object));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ReanimatedUIManagerBinding::ReanimatedUIManagerBinding(
|
|
52
|
+
std::shared_ptr<UIManager> uiManager,
|
|
53
|
+
RuntimeExecutor runtimeExecutor,
|
|
54
|
+
std::unique_ptr<EventHandler const> eventHandler,
|
|
55
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry)
|
|
56
|
+
: UIManagerBinding(uiManager),
|
|
57
|
+
uiManager_(std::move(uiManager)),
|
|
58
|
+
newestShadowNodesRegistry_(newestShadowNodesRegistry) {
|
|
59
|
+
if (eventHandler != nullptr) {
|
|
60
|
+
reinterpret_cast<UIManagerBindingPublic *>(this)->eventHandler_ =
|
|
61
|
+
std::move(eventHandler);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ReanimatedUIManagerBinding::~ReanimatedUIManagerBinding() {}
|
|
66
|
+
|
|
67
|
+
static inline ShadowNode::Shared cloneNodeUsingNewest(
|
|
68
|
+
UIManager *uiManager,
|
|
69
|
+
NewestShadowNodesRegistry *newestShadowNodesRegistry,
|
|
70
|
+
ShadowNode const &shadowNode,
|
|
71
|
+
ShadowNode::SharedListOfShared const &children = nullptr,
|
|
72
|
+
RawProps const *rawProps = nullptr) {
|
|
73
|
+
{
|
|
74
|
+
auto lock = newestShadowNodesRegistry->createLock();
|
|
75
|
+
auto newest = newestShadowNodesRegistry->get(shadowNode.getTag());
|
|
76
|
+
if (newest != nullptr) {
|
|
77
|
+
// ShadowNode managed by Reanimated, use newest ShadowNode from registry
|
|
78
|
+
auto clone = uiManager->cloneNode(*newest, children, rawProps);
|
|
79
|
+
newestShadowNodesRegistry->update(clone);
|
|
80
|
+
return clone;
|
|
81
|
+
}
|
|
82
|
+
} // release lock since we don't need registry anymore
|
|
83
|
+
|
|
84
|
+
// ShadowNode not managed by Reanimated (yet?)
|
|
85
|
+
return uiManager->cloneNode(shadowNode, children, rawProps);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static inline void appendChildUsingNewest(
|
|
89
|
+
UIManager *uiManager,
|
|
90
|
+
NewestShadowNodesRegistry *newestShadowNodesRegistry,
|
|
91
|
+
const ShadowNode::Shared &parentShadowNode,
|
|
92
|
+
const ShadowNode::Shared &childShadowNode) {
|
|
93
|
+
{
|
|
94
|
+
auto lock = newestShadowNodesRegistry->createLock();
|
|
95
|
+
auto newestChildShadowNode =
|
|
96
|
+
newestShadowNodesRegistry->get(childShadowNode->getTag());
|
|
97
|
+
if (newestChildShadowNode != nullptr) {
|
|
98
|
+
uiManager->appendChild(parentShadowNode, newestChildShadowNode);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
} // release lock since we don't need registry anymore
|
|
102
|
+
|
|
103
|
+
// child ShadowNode not managed by Reanimated (yet?)
|
|
104
|
+
uiManager->appendChild(parentShadowNode, childShadowNode);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
jsi::Value ReanimatedUIManagerBinding::get(
|
|
108
|
+
jsi::Runtime &runtime,
|
|
109
|
+
jsi::PropNameID const &name) {
|
|
110
|
+
// Currently, we need to overwrite all variants of `cloneNode` as well as
|
|
111
|
+
// `appendChild` to prevent React from overwriting layout props animated using
|
|
112
|
+
// Reanimated. However, this may degrade performance due to using locks.
|
|
113
|
+
// We already have an idea how this can be done better without locks
|
|
114
|
+
// (i.e. by overwriting `completeRoot` and using UIManagerCommitHooks).
|
|
115
|
+
|
|
116
|
+
// based on implementation from UIManagerBinding.cpp
|
|
117
|
+
auto methodName = name.utf8(runtime);
|
|
118
|
+
SystraceSection s("ReanimatedUIManagerBinding::get", "name", methodName);
|
|
119
|
+
UIManager *uiManager = uiManager_.get();
|
|
120
|
+
NewestShadowNodesRegistry *newestShadowNodesRegistry =
|
|
121
|
+
newestShadowNodesRegistry_.get();
|
|
122
|
+
|
|
123
|
+
// Semantic: Clones the node with *same* props and *same* children.
|
|
124
|
+
if (methodName == "cloneNode") {
|
|
125
|
+
return jsi::Function::createFromHostFunction(
|
|
126
|
+
runtime,
|
|
127
|
+
name,
|
|
128
|
+
1,
|
|
129
|
+
[uiManager, newestShadowNodesRegistry](
|
|
130
|
+
jsi::Runtime &runtime,
|
|
131
|
+
jsi::Value const & /*thisValue*/,
|
|
132
|
+
jsi::Value const *arguments,
|
|
133
|
+
size_t /*count*/) noexcept -> jsi::Value {
|
|
134
|
+
return valueFromShadowNode(
|
|
135
|
+
runtime,
|
|
136
|
+
cloneNodeUsingNewest(
|
|
137
|
+
uiManager,
|
|
138
|
+
newestShadowNodesRegistry,
|
|
139
|
+
*shadowNodeFromValue(runtime, arguments[0])));
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Semantic: Clones the node with *same* props and *empty* children.
|
|
144
|
+
if (methodName == "cloneNodeWithNewChildren") {
|
|
145
|
+
return jsi::Function::createFromHostFunction(
|
|
146
|
+
runtime,
|
|
147
|
+
name,
|
|
148
|
+
1,
|
|
149
|
+
[uiManager, newestShadowNodesRegistry](
|
|
150
|
+
jsi::Runtime &runtime,
|
|
151
|
+
jsi::Value const & /*thisValue*/,
|
|
152
|
+
jsi::Value const *arguments,
|
|
153
|
+
size_t /*count*/) noexcept -> jsi::Value {
|
|
154
|
+
return valueFromShadowNode(
|
|
155
|
+
runtime,
|
|
156
|
+
cloneNodeUsingNewest(
|
|
157
|
+
uiManager,
|
|
158
|
+
newestShadowNodesRegistry,
|
|
159
|
+
*shadowNodeFromValue(runtime, arguments[0]),
|
|
160
|
+
ShadowNode::emptySharedShadowNodeSharedList()));
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Semantic: Clones the node with *given* props and *same* children.
|
|
165
|
+
if (methodName == "cloneNodeWithNewProps") {
|
|
166
|
+
return jsi::Function::createFromHostFunction(
|
|
167
|
+
runtime,
|
|
168
|
+
name,
|
|
169
|
+
2,
|
|
170
|
+
[uiManager, newestShadowNodesRegistry](
|
|
171
|
+
jsi::Runtime &runtime,
|
|
172
|
+
jsi::Value const & /*thisValue*/,
|
|
173
|
+
jsi::Value const *arguments,
|
|
174
|
+
size_t /*count*/) noexcept -> jsi::Value {
|
|
175
|
+
auto const &rawProps = RawProps(runtime, arguments[1]);
|
|
176
|
+
return valueFromShadowNode(
|
|
177
|
+
runtime,
|
|
178
|
+
cloneNodeUsingNewest(
|
|
179
|
+
uiManager,
|
|
180
|
+
newestShadowNodesRegistry,
|
|
181
|
+
*shadowNodeFromValue(runtime, arguments[0]),
|
|
182
|
+
nullptr,
|
|
183
|
+
&rawProps));
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Semantic: Clones the node with *given* props and *empty* children.
|
|
188
|
+
if (methodName == "cloneNodeWithNewChildrenAndProps") {
|
|
189
|
+
return jsi::Function::createFromHostFunction(
|
|
190
|
+
runtime,
|
|
191
|
+
name,
|
|
192
|
+
2,
|
|
193
|
+
[uiManager, newestShadowNodesRegistry](
|
|
194
|
+
jsi::Runtime &runtime,
|
|
195
|
+
jsi::Value const & /*thisValue*/,
|
|
196
|
+
jsi::Value const *arguments,
|
|
197
|
+
size_t /*count*/) noexcept -> jsi::Value {
|
|
198
|
+
auto const &rawProps = RawProps(runtime, arguments[1]);
|
|
199
|
+
return valueFromShadowNode(
|
|
200
|
+
runtime,
|
|
201
|
+
cloneNodeUsingNewest(
|
|
202
|
+
uiManager,
|
|
203
|
+
newestShadowNodesRegistry,
|
|
204
|
+
*shadowNodeFromValue(runtime, arguments[0]),
|
|
205
|
+
ShadowNode::emptySharedShadowNodeSharedList(),
|
|
206
|
+
&rawProps));
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (methodName == "appendChild") {
|
|
211
|
+
return jsi::Function::createFromHostFunction(
|
|
212
|
+
runtime,
|
|
213
|
+
name,
|
|
214
|
+
2,
|
|
215
|
+
[uiManager, newestShadowNodesRegistry](
|
|
216
|
+
jsi::Runtime &runtime,
|
|
217
|
+
jsi::Value const & /*thisValue*/,
|
|
218
|
+
jsi::Value const *arguments,
|
|
219
|
+
size_t /*count*/) noexcept -> jsi::Value {
|
|
220
|
+
appendChildUsingNewest(
|
|
221
|
+
uiManager,
|
|
222
|
+
newestShadowNodesRegistry,
|
|
223
|
+
shadowNodeFromValue(runtime, arguments[0]),
|
|
224
|
+
shadowNodeFromValue(runtime, arguments[1]));
|
|
225
|
+
return jsi::Value::undefined();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Methods like "findNodeAtPoint", "getRelativeLayoutMetrics", "measure" etc.
|
|
230
|
+
// use `UIManager::getNewestCloneOfShadowNode` or
|
|
231
|
+
// `ShadowTree::getCurrentRevision` under the hood,
|
|
232
|
+
// so there's no need to overwrite them.
|
|
233
|
+
|
|
234
|
+
return UIManagerBinding::get(runtime, name);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
} // namespace reanimated
|
|
238
|
+
|
|
239
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
+
|
|
4
|
+
#include <ReactCommon/RuntimeExecutor.h>
|
|
5
|
+
#include <jsi/jsi.h>
|
|
6
|
+
#include <react/renderer/uimanager/UIManager.h>
|
|
7
|
+
#include <react/renderer/uimanager/UIManagerBinding.h>
|
|
8
|
+
#include <react/renderer/uimanager/primitives.h>
|
|
9
|
+
|
|
10
|
+
#include <memory>
|
|
11
|
+
|
|
12
|
+
#include "NewestShadowNodesRegistry.h"
|
|
13
|
+
|
|
14
|
+
using namespace facebook;
|
|
15
|
+
using namespace react;
|
|
16
|
+
|
|
17
|
+
namespace reanimated {
|
|
18
|
+
|
|
19
|
+
class ReanimatedUIManagerBinding : public UIManagerBinding {
|
|
20
|
+
public:
|
|
21
|
+
static void createAndInstallIfNeeded(
|
|
22
|
+
jsi::Runtime &runtime,
|
|
23
|
+
RuntimeExecutor const &runtimeExecutor,
|
|
24
|
+
std::shared_ptr<UIManager> const &uiManager,
|
|
25
|
+
std::shared_ptr<NewestShadowNodesRegistry> const
|
|
26
|
+
&newestShadowNodesRegistry);
|
|
27
|
+
|
|
28
|
+
ReanimatedUIManagerBinding(
|
|
29
|
+
std::shared_ptr<UIManager> uiManager,
|
|
30
|
+
RuntimeExecutor runtimeExecutor,
|
|
31
|
+
std::unique_ptr<EventHandler const> eventHandler,
|
|
32
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry);
|
|
33
|
+
|
|
34
|
+
~ReanimatedUIManagerBinding();
|
|
35
|
+
|
|
36
|
+
void invalidate() const;
|
|
37
|
+
|
|
38
|
+
jsi::Value get(jsi::Runtime &runtime, jsi::PropNameID const &name) override;
|
|
39
|
+
|
|
40
|
+
private:
|
|
41
|
+
std::shared_ptr<UIManager> uiManager_;
|
|
42
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry_;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace reanimated
|
|
46
|
+
|
|
47
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
|
+
|
|
3
|
+
#include "ShadowTreeCloner.h"
|
|
4
|
+
#include "FabricUtils.h"
|
|
5
|
+
|
|
6
|
+
namespace reanimated {
|
|
7
|
+
|
|
8
|
+
ShadowTreeCloner::ShadowTreeCloner(
|
|
9
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry,
|
|
10
|
+
std::shared_ptr<UIManager> uiManager,
|
|
11
|
+
SurfaceId surfaceId)
|
|
12
|
+
: newestShadowNodesRegistry_{newestShadowNodesRegistry},
|
|
13
|
+
propsParserContext_{
|
|
14
|
+
surfaceId,
|
|
15
|
+
*getContextContainerFromUIManager(&*uiManager)} {}
|
|
16
|
+
|
|
17
|
+
ShadowTreeCloner::~ShadowTreeCloner() {
|
|
18
|
+
#ifdef DEBUG
|
|
19
|
+
react_native_assert(
|
|
20
|
+
yogaChildrenUpdates_.empty() &&
|
|
21
|
+
"Deallocating `ShadowTreeCloner` without calling `updateYogaChildren`.");
|
|
22
|
+
#endif
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ShadowNode::Unshared ShadowTreeCloner::cloneWithNewProps(
|
|
26
|
+
const ShadowNode::Shared &oldRootNode,
|
|
27
|
+
const ShadowNodeFamily &family,
|
|
28
|
+
RawProps &&rawProps) {
|
|
29
|
+
// adapted from ShadowNode::cloneTree
|
|
30
|
+
|
|
31
|
+
auto ancestors = family.getAncestors(*oldRootNode);
|
|
32
|
+
|
|
33
|
+
if (ancestors.empty()) {
|
|
34
|
+
return ShadowNode::Unshared{nullptr};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
auto &parent = ancestors.back();
|
|
38
|
+
auto &oldShadowNode = parent.first.get().getChildren().at(parent.second);
|
|
39
|
+
|
|
40
|
+
const auto newest = newestShadowNodesRegistry_->get(oldShadowNode->getTag());
|
|
41
|
+
|
|
42
|
+
const auto &source = newest == nullptr ? oldShadowNode : newest;
|
|
43
|
+
|
|
44
|
+
const auto props = source->getComponentDescriptor().cloneProps(
|
|
45
|
+
propsParserContext_, source->getProps(), rawProps);
|
|
46
|
+
|
|
47
|
+
auto newChildNode = source->clone({/* .props = */ props});
|
|
48
|
+
|
|
49
|
+
for (auto it = ancestors.rbegin(); it != ancestors.rend(); ++it) {
|
|
50
|
+
auto &parentNode = it->first.get();
|
|
51
|
+
auto childIndex = it->second;
|
|
52
|
+
|
|
53
|
+
auto children = parentNode.getChildren();
|
|
54
|
+
const auto &oldChildNode = *children.at(childIndex);
|
|
55
|
+
react_native_assert(ShadowNode::sameFamily(oldChildNode, *newChildNode));
|
|
56
|
+
|
|
57
|
+
newestShadowNodesRegistry_->set(newChildNode, parentNode.getTag());
|
|
58
|
+
|
|
59
|
+
if (!parentNode.getSealed()) {
|
|
60
|
+
// Optimization: if a ShadowNode is unsealed, we can directly update its
|
|
61
|
+
// children instead of cloning the whole path to the root node.
|
|
62
|
+
auto &parentNodeNonConst = const_cast<ShadowNode &>(parentNode);
|
|
63
|
+
parentNodeNonConst.replaceChild(oldChildNode, newChildNode, childIndex);
|
|
64
|
+
yogaChildrenUpdates_.insert(&parentNodeNonConst);
|
|
65
|
+
return std::const_pointer_cast<ShadowNode>(oldRootNode);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
children[childIndex] = newChildNode;
|
|
69
|
+
|
|
70
|
+
newChildNode = parentNode.clone({
|
|
71
|
+
ShadowNodeFragment::propsPlaceholder(),
|
|
72
|
+
std::make_shared<ShadowNode::ListOfShared>(children),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return std::const_pointer_cast<ShadowNode>(newChildNode);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void ShadowTreeCloner::updateYogaChildren() {
|
|
80
|
+
// Unfortunately, `replaceChild` does not update Yoga nodes, so we need to
|
|
81
|
+
// update them manually here.
|
|
82
|
+
for (ShadowNode *shadowNode : yogaChildrenUpdates_) {
|
|
83
|
+
static_cast<YogaLayoutableShadowNode *>(shadowNode)->updateYogaChildren();
|
|
84
|
+
}
|
|
85
|
+
#ifdef DEBUG
|
|
86
|
+
yogaChildrenUpdates_.clear();
|
|
87
|
+
#endif
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
} // namespace reanimated
|
|
91
|
+
|
|
92
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
+
|
|
4
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
5
|
+
#include <react/renderer/uimanager/UIManager.h>
|
|
6
|
+
|
|
7
|
+
#include <memory>
|
|
8
|
+
#include <set>
|
|
9
|
+
|
|
10
|
+
#include "NewestShadowNodesRegistry.h"
|
|
11
|
+
|
|
12
|
+
using namespace facebook;
|
|
13
|
+
using namespace react;
|
|
14
|
+
|
|
15
|
+
namespace reanimated {
|
|
16
|
+
|
|
17
|
+
class ShadowTreeCloner {
|
|
18
|
+
public:
|
|
19
|
+
ShadowTreeCloner(
|
|
20
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry,
|
|
21
|
+
std::shared_ptr<UIManager> uiManager,
|
|
22
|
+
SurfaceId surfaceId);
|
|
23
|
+
|
|
24
|
+
~ShadowTreeCloner();
|
|
25
|
+
|
|
26
|
+
ShadowNode::Unshared cloneWithNewProps(
|
|
27
|
+
const ShadowNode::Shared &oldRootNode,
|
|
28
|
+
const ShadowNodeFamily &family,
|
|
29
|
+
RawProps &&rawProps);
|
|
30
|
+
|
|
31
|
+
void updateYogaChildren();
|
|
32
|
+
|
|
33
|
+
private:
|
|
34
|
+
std::shared_ptr<NewestShadowNodesRegistry> newestShadowNodesRegistry_;
|
|
35
|
+
PropsParserContext propsParserContext_;
|
|
36
|
+
std::set<ShadowNode *> yogaChildrenUpdates_;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
} // namespace reanimated
|
|
40
|
+
|
|
41
|
+
#endif // RCT_NEW_ARCH_ENABLED
|