diff --git a/apps/macos-example/package.json b/apps/macos-example/package.json index fa614da8169..c45e8179303 100644 --- a/apps/macos-example/package.json +++ b/apps/macos-example/package.json @@ -43,6 +43,7 @@ "eslint": "^8.57.0", "jest": "^29.6.3", "prettier": "^3.3.3", + "react-native-macos-init": "^2.1.3", "react-test-renderer": "18.2.0", "typescript": "~5.3.0" }, diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h b/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h index ca0708c6544..c6c70fe943a 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +++ b/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h @@ -21,7 +21,6 @@ class ReanimatedCommitHook : public UIManagerCommitHook { ~ReanimatedCommitHook() noexcept override; -#if REACT_NATIVE_MINOR_VERSION >= 73 void commitHookWasRegistered(UIManager const &) noexcept override {} void commitHookWasUnregistered(UIManager const &) noexcept override {} @@ -30,17 +29,6 @@ class ReanimatedCommitHook : public UIManagerCommitHook { ShadowTree const &shadowTree, RootShadowNode::Shared const &oldRootShadowNode, RootShadowNode::Unshared const &newRootShadowNode) noexcept override; -#else - void commitHookWasRegistered(UIManager const &) const noexcept override {} - - void commitHookWasUnregistered(UIManager const &) const noexcept override {} - - RootShadowNode::Unshared shadowTreeWillCommit( - ShadowTree const &shadowTree, - RootShadowNode::Shared const &oldRootShadowNode, - RootShadowNode::Unshared const &newRootShadowNode) - const noexcept override; -#endif private: std::shared_ptr propsRegistry_; diff --git a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp index 475ec7a7788..3997bb8771a 100644 --- a/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp +++ b/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp @@ -22,9 +22,7 @@ #include #include #include -#if REACT_NATIVE_MINOR_VERSION >= 73 #include -#endif // REACT_NATIVE_MINOR_VERSION #endif // RCT_NEW_ARCH_ENABLED #include @@ -48,10 +46,10 @@ using namespace facebook; -#if REACT_NATIVE_MINOR_VERSION == 73 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED // Android can't find the definition of this static field bool CoreFeatures::useNativeState; -#endif +#endif // RCT_NEW_ARCH_ENABLED namespace reanimated { @@ -617,13 +615,8 @@ bool NativeReanimatedModule::handleRawEvent( eventType = "on" + eventType.substr(3); } jsi::Runtime &rt = uiWorkletRuntime_->getJSIRuntime(); -#if REACT_NATIVE_MINOR_VERSION >= 73 const auto &eventPayload = rawEvent.eventPayload; jsi::Value payload = eventPayload->asJSIValue(rt); -#else - const auto &payloadFactory = rawEvent.payloadFactory; - jsi::Value payload = payloadFactory(rt); -#endif auto res = handleEvent(eventType, tag, std::move(payload), currentTime); // TODO: we should call performOperations conditionally if event is handled diff --git a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.h b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.h index 8c2f903bcf1..62312d77330 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.h +++ b/packages/react-native-reanimated/Common/cpp/worklets/SharedItems/Shareables.h @@ -179,26 +179,16 @@ class ShareableObject : public Shareable { public: ShareableObject(jsi::Runtime &rt, const jsi::Object &object); -#if defined(USE_HERMES) || REACT_NATIVE_MINOR_VERSION >= 74 -#define SUPPORTS_NATIVE_STATE 1 -#else -#define SUPPORTS_NATIVE_STATE 0 -#endif - -#if SUPPORTS_NATIVE_STATE ShareableObject( jsi::Runtime &rt, const jsi::Object &object, const jsi::Value &nativeStateSource); -#endif // SUPPORTS_NATIVE_STATE jsi::Value toJSValue(jsi::Runtime &rt) override; protected: std::vector>> data_; -#if SUPPORTS_NATIVE_STATE std::shared_ptr nativeState_; -#endif // SUPPORTS_NATIVE_STATE }; class ShareableHostObject : public Shareable { @@ -234,19 +224,11 @@ class ShareableHostFunction : public Shareable { class ShareableArrayBuffer : public Shareable { public: - ShareableArrayBuffer( - jsi::Runtime &rt, -#if REACT_NATIVE_MINOR_VERSION >= 72 - const jsi::ArrayBuffer &arrayBuffer -#else - jsi::ArrayBuffer arrayBuffer -#endif - ) + ShareableArrayBuffer(jsi::Runtime &rt, const jsi::ArrayBuffer &arrayBuffer) : Shareable(ArrayBufferType), data_( arrayBuffer.data(rt), - arrayBuffer.data(rt) + arrayBuffer.size(rt)) { - } + arrayBuffer.data(rt) + arrayBuffer.size(rt)) {} jsi::Value toJSValue(jsi::Runtime &rt) override; diff --git a/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.cpp b/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.cpp index e2403628cc3..0699e0cebaa 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.cpp @@ -17,7 +17,7 @@ JSScheduler::JSScheduler( rnRuntime_(rnRuntime), jsCallInvoker_(jsCallInvoker) {} -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED // With `runtimeExecutor`. JSScheduler::JSScheduler( jsi::Runtime &rnRuntime, @@ -28,7 +28,7 @@ JSScheduler::JSScheduler( }), rnRuntime_(rnRuntime), runtimeExecutor_(runtimeExecutor) {} -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED +#endif // RCT_NEW_ARCH_ENABLED const std::shared_ptr JSScheduler::getJSCallInvoker() const { assert( diff --git a/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.h b/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.h index 217dbfddf1f..84eaa512d81 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.h +++ b/packages/react-native-reanimated/Common/cpp/worklets/Tools/JSScheduler.h @@ -20,21 +20,21 @@ class JSScheduler { jsi::Runtime &rnRuntime, const std::shared_ptr &jsCallInvoker); -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED // With `runtimeExecutor`. explicit JSScheduler( jsi::Runtime &rnRuntime, RuntimeExecutor runtimeExecutor); -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED +#endif // RCT_NEW_ARCH_ENABLED const std::function scheduleOnJS = nullptr; const std::shared_ptr getJSCallInvoker() const; protected: jsi::Runtime &rnRuntime_; -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED RuntimeExecutor runtimeExecutor_ = nullptr; -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED +#endif // RCT_NEW_ARCH_ENABLED const std::shared_ptr jsCallInvoker_ = nullptr; }; diff --git a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp index f7b7b412785..89341a9b0f1 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp @@ -23,11 +23,7 @@ namespace worklets { using namespace facebook; using namespace react; #if HERMES_ENABLE_DEBUGGER -#if REACT_NATIVE_MINOR_VERSION >= 73 using namespace facebook::hermes::inspector_modern; -#else -using namespace facebook::hermes::inspector; -#endif #endif // HERMES_ENABLE_DEBUGGER #if HERMES_ENABLE_DEBUGGER diff --git a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h index 8d3e9f443d3..beb1859a6f0 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h +++ b/packages/react-native-reanimated/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h @@ -28,12 +28,7 @@ #endif #if HERMES_ENABLE_DEBUGGER -#if REACT_NATIVE_MINOR_VERSION >= 73 #include -#else -#include -#include -#endif #endif // HERMES_ENABLE_DEBUGGER namespace worklets { @@ -41,11 +36,7 @@ namespace worklets { using namespace facebook; using namespace react; #if HERMES_ENABLE_DEBUGGER -#if REACT_NATIVE_MINOR_VERSION >= 73 using namespace facebook::hermes::inspector_modern; -#else -using namespace facebook::hermes::inspector; -#endif #endif // HERMES_ENABLE_DEBUGGER // ReentrancyCheck is copied from React Native diff --git a/packages/react-native-reanimated/__typetests__/72plus/index.tsx b/packages/react-native-reanimated/__typetests__/72plus/index.tsx deleted file mode 100644 index 0d00ea0c7e2..00000000000 --- a/packages/react-native-reanimated/__typetests__/72plus/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import React from 'react'; -import Animated, { - useSharedValue, - useAnimatedStyle, - // TODO: FIX ME - // eslint-disable-next-line import/no-unresolved -} from '../../lib/typescript'; - -/* -This file is needed because our code depends on types of React Native -and there are some tests that check the newer types - these tests do not work -on older versions of React Native. Currently I just moved relevant tests here -without changing their names to point out what are their respective counterparts. -In the future this might change. -*/ - -function UseAnimatedStyleTest() { - function UseAnimatedStyleTest2() { - const sv = useSharedValue('0'); - // @ts-expect-error properly detects illegal type - const animatedStyle = useAnimatedStyle(() => { - return { - width: sv.value, - }; - }); - return ; - } - - function UseAnimatedStyleTest4() { - const sv = useSharedValue({ width: '0' }); - // @ts-expect-error properly detects illegal type - const animatedStyle = useAnimatedStyle(() => { - return sv.value; - }); - return ; - } -} - -function InlineStylesTest() { - function InlineStylesTest4() { - const sv = useSharedValue('0'); - // @ts-expect-error properly detects illegal type - return ; - } - - function InlineStylesTest6() { - const sv = useSharedValue({ width: '0' }); - // @ts-expect-error properly detects illegal type - return ; - } -} diff --git a/packages/react-native-reanimated/__typetests__/common/inlineStylesTest.tsx b/packages/react-native-reanimated/__typetests__/common/inlineStylesTest.tsx index 15b229f8384..987989fe6ed 100644 --- a/packages/react-native-reanimated/__typetests__/common/inlineStylesTest.tsx +++ b/packages/react-native-reanimated/__typetests__/common/inlineStylesTest.tsx @@ -44,7 +44,7 @@ function InlineStylesTest() { } function InlineStylesTest4() { - const sv = useSharedValue(true); + const sv = useSharedValue('0'); // @ts-expect-error properly detects illegal type return ; } @@ -55,7 +55,7 @@ function InlineStylesTest() { } function InlineStylesTest6() { - const sv = useSharedValue({ width: true }); + const sv = useSharedValue({ width: '0' }); // @ts-expect-error properly detects illegal type return ; } diff --git a/packages/react-native-reanimated/__typetests__/common/useAnimatedStyleTest.tsx b/packages/react-native-reanimated/__typetests__/common/useAnimatedStyleTest.tsx index f6f7f5045ed..4864cc9274e 100644 --- a/packages/react-native-reanimated/__typetests__/common/useAnimatedStyleTest.tsx +++ b/packages/react-native-reanimated/__typetests__/common/useAnimatedStyleTest.tsx @@ -17,7 +17,7 @@ function UseAnimatedStyleTest() { } function UseAnimatedStyleTest2() { - const sv = useSharedValue(true); + const sv = useSharedValue('0'); // @ts-expect-error properly detects illegal type const animatedStyle = useAnimatedStyle(() => { return { @@ -36,7 +36,7 @@ function UseAnimatedStyleTest() { } function UseAnimatedStyleTest4() { - const sv = useSharedValue({ width: true }); + const sv = useSharedValue({ width: '0' }); // @ts-expect-error properly detects illegal type const animatedStyle = useAnimatedStyle(() => { return sv.value; diff --git a/packages/react-native-reanimated/__typetests__/legacy/legacy.tsx b/packages/react-native-reanimated/__typetests__/legacy/legacy.tsx deleted file mode 100644 index 2e93c8a1cf9..00000000000 --- a/packages/react-native-reanimated/__typetests__/legacy/legacy.tsx +++ /dev/null @@ -1,354 +0,0 @@ -/* eslint-disable no-unused-expressions */ -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import React from 'react'; -import { StyleSheet } from 'react-native'; -import type { - PanGestureHandlerGestureEvent, - PinchGestureHandlerGestureEvent, -} from 'react-native-gesture-handler'; -import { - PanGestureHandler, - PinchGestureHandler, -} from 'react-native-gesture-handler'; -import Animated, { - useSharedValue, - useAnimatedStyle, - useAnimatedGestureHandler, - withTiming, - withSpring, - cancelAnimation, - withDelay, - withRepeat, - withSequence, - withDecay, - useWorkletCallback, - runOnUI, -} from '../..'; - -function WithDecayComponentTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler({ - onStart: (_, ctx: { startX: number }) => { - ctx.startX = x.value; - }, - onActive: (event, ctx: { startX: number }) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (evt) => { - x.value = withDecay({ - velocity: evt.velocityX, - clamp: [0, 200], - }); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 100, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function CancelAnimationTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler({ - onStart: (_, ctx: { startX: number }) => { - cancelAnimation(x); - }, - onActive: (event, ctx: { startX: number }) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = 0; - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 100, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function WithSpringTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler({ - onStart: (_, ctx: { startX: number }) => { - ctx.startX = x.value; - }, - onActive: (event, ctx: { startX: number }) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = withSpring(0, {}, (finished) => {}); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 100, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function AnimatedPinchGestureHandlerTest() { - const x = useSharedValue(0); - const gestureHandler = - useAnimatedGestureHandler({ - onActive: (event) => { - x.value = event.scale; - }, - onEnd: () => { - x.value = withTiming(1); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - scale: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 100, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function AnimatedGestureHandlerTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler< - PanGestureHandlerGestureEvent, - { startX: number } - >({ - onStart: (_, ctx) => { - ctx.startX = x.value; - }, - onActive: (event, ctx) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = 0; - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 100, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function UseSharedValueTest() { - const translate = useSharedValue(0); - const translate2 = useSharedValue(0); - const translate3 = useSharedValue(0); - - const sharedBool = useSharedValue(false); - if (sharedBool.value) { - sharedBool.value = false; - } - - const styles = StyleSheet.create({ - container: { - flex: 1, - }, - }); - - return ; -} - -function WithSequenceTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler< - PanGestureHandlerGestureEvent, - { startX: number } - >({ - onStart: (_, _ctx) => { - cancelAnimation(x); - }, - onActive: (event, ctx) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = withSequence(withTiming(70), withTiming(70)); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 50, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function WithRepeatTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler< - PanGestureHandlerGestureEvent, - { startX: number } - >({ - onStart: (_, _ctx) => { - cancelAnimation(x); - }, - onActive: (event, ctx) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = withRepeat(withTiming(70), 1, true, (finished) => {}); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 50, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function WithDelayTest() { - const x = useSharedValue(0); - const gestureHandler = useAnimatedGestureHandler< - PanGestureHandlerGestureEvent, - { startX: number } - >({ - onStart: (_, _ctx) => { - cancelAnimation(x); - }, - onActive: (event, ctx) => { - x.value = ctx.startX + event.translationX; - }, - onEnd: (_) => { - x.value = withDelay(1000, withTiming(70)); - }, - }); - const animatedStyle = useAnimatedStyle(() => { - return { - transform: [ - { - translateX: x.value, - }, - ], - }; - }); - const styles = StyleSheet.create({ - box: { - height: 50, - backgroundColor: 'blue', - }, - }); - return ( - - - - ); -} - -function UseWorkletCallbackTest() { - const workletCallback = useWorkletCallback((a: number, b: number) => { - return a + b; - }, []); - - runOnUI(() => { - const res = workletCallback(1, 1); - - console.log(res); - })(); - - return ; -} diff --git a/packages/react-native-reanimated/android/CMakeLists.txt b/packages/react-native-reanimated/android/CMakeLists.txt index 6807a01e8b9..2fcb8790d61 100644 --- a/packages/react-native-reanimated/android/CMakeLists.txt +++ b/packages/react-native-reanimated/android/CMakeLists.txt @@ -4,11 +4,7 @@ cmake_minimum_required(VERSION 3.8) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") -if(${REACT_NATIVE_MINOR_VERSION} GREATER_EQUAL 73) - set(CMAKE_CXX_STANDARD 20) -else() - set(CMAKE_CXX_STANDARD 17) -endif() +set(CMAKE_CXX_STANDARD 20) # default CMAKE_CXX_FLAGS: "-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-protector-all" include("${REACT_NATIVE_DIR}/ReactAndroid/cmake-utils/folly-flags.cmake") diff --git a/packages/react-native-reanimated/android/build.gradle b/packages/react-native-reanimated/android/build.gradle index fbb956285fb..e0cf7528321 100644 --- a/packages/react-native-reanimated/android/build.gradle +++ b/packages/react-native-reanimated/android/build.gradle @@ -346,37 +346,17 @@ android { srcDirs += "src/paper/java" } - // messageQueueThread - if (REANIMATED_MAJOR_VERSION > 2) { - if (REACT_NATIVE_MINOR_VERSION <= 72) { - srcDirs += "src/reactNativeVersionPatch/messageQueueThread/72" - } else { - srcDirs += "src/reactNativeVersionPatch/messageQueueThread/latest" - } - } - // ReanimatedUIManager & ReanimatedUIImplementation - if (REACT_NATIVE_MINOR_VERSION <= 73) { - srcDirs += "src/reactNativeVersionPatch/ReanimatedUIManager/73" - } else if (REACT_NATIVE_MINOR_VERSION <= 74) { - srcDirs += "src/reactNativeVersionPatch/ReanimatedUIManager/74" + if (REACT_NATIVE_MINOR_VERSION <= 74 ) { + srcDirs += "src/reactNativeVersionPatch/ReanimatedUIManager/" } else { srcDirs += "src/reactNativeVersionPatch/ReanimatedUIManager/latest" } - // ReactHost - if (REACT_NATIVE_MINOR_VERSION <= 72) { - srcDirs += "src/reactNativeVersionPatch/ReactHost/72" - } else { - srcDirs += "src/reactNativeVersionPatch/ReactHost/latest" - } - // ReactFeatureFlags if (IS_NEW_ARCHITECTURE_ENABLED) { - if (REACT_NATIVE_MINOR_VERSION <= 72) { - srcDirs += "src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/72" - } else if (REACT_NATIVE_MINOR_VERSION <= 74) { - srcDirs += "src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/74" + if (REACT_NATIVE_MINOR_VERSION <= 74) { + srcDirs += "src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/" } else { srcDirs += "src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/latest" } @@ -384,17 +364,15 @@ android { if (IS_NEW_ARCHITECTURE_ENABLED) { // RuntimeExecutor and CallInvokerHolder - if (REACT_NATIVE_MINOR_VERSION <= 73) { - srcDirs += "src/reactNativeVersionPatch/NativeProxyFabric/73" - } else if (REACT_NATIVE_MINOR_VERSION <= 74) { - srcDirs += "src/reactNativeVersionPatch/NativeProxyFabric/74" + if (REACT_NATIVE_MINOR_VERSION <= 74) { + srcDirs += "src/reactNativeVersionPatch/NativeProxyFabric/" } else { srcDirs += "src/reactNativeVersionPatch/NativeProxyFabric/latest" } } else { // CallInvokerHolder if (REACT_NATIVE_MINOR_VERSION <= 74) { - srcDirs += "src/reactNativeVersionPatch/NativeProxyPaper/74" + srcDirs += "src/reactNativeVersionPatch/NativeProxyPaper/" } else { srcDirs += "src/reactNativeVersionPatch/NativeProxyPaper/latest" } @@ -402,7 +380,7 @@ android { // BorderRadiiDrawableUtils if (REACT_NATIVE_MINOR_VERSION <= 74) { - srcDirs += "src/reactNativeVersionPatch/BorderRadiiDrawableUtils/74" + srcDirs += "src/reactNativeVersionPatch/BorderRadiiDrawableUtils/" } else if (REACT_NATIVE_MINOR_VERSION <= 75) { srcDirs += "src/reactNativeVersionPatch/BorderRadiiDrawableUtils/75" } else { diff --git a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp index be8e30c2a19..e8573872bcc 100644 --- a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp +++ b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.cpp @@ -56,7 +56,7 @@ NativeProxy::NativeProxy( #endif // RCT_NEW_ARCH_ENABLED } -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED NativeProxy::NativeProxy( jni::alias_ref jThis, jsi::Runtime *rnRuntime, @@ -81,9 +81,7 @@ NativeProxy::NativeProxy( layoutAnimations_(std::move(layoutAnimations)) { commonInit(fabricUIManager); } -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED -#ifdef RCT_NEW_ARCH_ENABLED void NativeProxy::commonInit( jni::alias_ref &fabricUIManager) { @@ -140,7 +138,7 @@ jni::local_ref NativeProxy::initHybrid( valueUnpackerCode); } -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED jni::local_ref NativeProxy::initHybridBridgeless( jni::alias_ref jThis, jlong jsContext, @@ -163,7 +161,7 @@ jni::local_ref NativeProxy::initHybridBridgeless( fabricUIManager, valueUnpackerCode); } -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED +#endif // RCT_NEW_ARCH_ENABLED #ifndef NDEBUG void NativeProxy::checkJavaVersion(jsi::Runtime &rnRuntime) { @@ -236,18 +234,17 @@ bool NativeProxy::getIsReducedMotion() { } void NativeProxy::registerNatives() { - registerHybrid({ - makeNativeMethod("initHybrid", NativeProxy::initHybrid), -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) - makeNativeMethod( - "initHybridBridgeless", NativeProxy::initHybridBridgeless), -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) - makeNativeMethod("installJSIBindings", NativeProxy::installJSIBindings), - makeNativeMethod( - "isAnyHandlerWaitingForEvent", - NativeProxy::isAnyHandlerWaitingForEvent), - makeNativeMethod("performOperations", NativeProxy::performOperations) - }); + registerHybrid( + {makeNativeMethod("initHybrid", NativeProxy::initHybrid), +#ifdef RCT_NEW_ARCH_ENABLED + makeNativeMethod( + "initHybridBridgeless", NativeProxy::initHybridBridgeless), +#endif // RCT_NEW_ARCH_ENABLED + makeNativeMethod("installJSIBindings", NativeProxy::installJSIBindings), + makeNativeMethod( + "isAnyHandlerWaitingForEvent", + NativeProxy::isAnyHandlerWaitingForEvent), + makeNativeMethod("performOperations", NativeProxy::performOperations)}); } void NativeProxy::requestRender( @@ -459,12 +456,7 @@ void NativeProxy::handleEvent( // for details. return; } -#if REACT_NATIVE_MINOR_VERSION >= 72 std::string eventJSON = eventAsString; -#else - // remove "{ NativeMap: " and " }" - std::string eventJSON = eventAsString.substr(13, eventAsString.length() - 15); -#endif if (eventJSON == "null") { return; } diff --git a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h index 462eecb4978..3f5e46a6bc8 100644 --- a/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h +++ b/packages/react-native-reanimated/android/src/main/cpp/reanimated/android/NativeProxy.h @@ -17,10 +17,8 @@ #ifdef RCT_NEW_ARCH_ENABLED #include -#include -#if REACT_NATIVE_MINOR_VERSION >= 74 #include -#endif // REACT_NATIVE_MINOR_VERSION >= 74 +#include #endif // RCT_NEW_ARCH_ENABLED #include @@ -163,7 +161,7 @@ class NativeProxy : public jni::HybridClass { #endif const std::string &valueUnpackerCode); -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED static jni::local_ref initHybridBridgeless( jni::alias_ref jThis, jlong jsContext, @@ -174,7 +172,7 @@ class NativeProxy : public jni::HybridClass { jni::alias_ref fabricUIManager, const std::string &valueUnpackerCode); -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED +#endif // RCT_NEW_ARCH_ENABLED static void registerNatives(); ~NativeProxy(); @@ -288,7 +286,7 @@ class NativeProxy : public jni::HybridClass { #endif const std::string &valueUnpackerCode); -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED explicit NativeProxy( jni::alias_ref jThis, jsi::Runtime *rnRuntime, @@ -299,9 +297,7 @@ class NativeProxy : public jni::HybridClass { jni::alias_ref fabricUIManager, const std::string &valueUnpackerCode); -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED -#ifdef RCT_NEW_ARCH_ENABLED void commonInit(jni::alias_ref &fabricUIManager); #endif // RCT_NEW_ARCH_ENABLED diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/latest/com/swmansion/reanimated/DevMenuUtils.java b/packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/DevMenuUtils.java similarity index 100% rename from packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/latest/com/swmansion/reanimated/DevMenuUtils.java rename to packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/DevMenuUtils.java diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/messageQueueThread/latest/com/swmansion/reanimated/ReanimatedMessageQueueThread.java b/packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/ReanimatedMessageQueueThread.java similarity index 100% rename from packages/react-native-reanimated/android/src/reactNativeVersionPatch/messageQueueThread/latest/com/swmansion/reanimated/ReanimatedMessageQueueThread.java rename to packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/ReanimatedMessageQueueThread.java diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/NativeProxyFabric/73/com/swmansion/reanimated/NativeProxy.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/NativeProxyFabric/73/com/swmansion/reanimated/NativeProxy.java deleted file mode 100644 index 85a6483d5a9..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/NativeProxyFabric/73/com/swmansion/reanimated/NativeProxy.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.swmansion.reanimated; - -import com.facebook.jni.HybridData; -import com.facebook.proguard.annotations.DoNotStrip; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.queue.MessageQueueThread; -import com.facebook.react.fabric.FabricUIManager; -import com.facebook.react.turbomodule.core.CallInvokerHolderImpl; -import com.facebook.react.uimanager.UIManagerHelper; -import com.facebook.react.uimanager.common.UIManagerType; -import com.swmansion.reanimated.layoutReanimation.LayoutAnimations; -import com.swmansion.reanimated.layoutReanimation.NativeMethodsHolder; -import com.swmansion.reanimated.nativeProxy.NativeProxyCommon; -import java.util.HashMap; - -public class NativeProxy extends NativeProxyCommon { - @DoNotStrip - @SuppressWarnings("unused") - private final HybridData mHybridData; - - public NativeProxy(ReactApplicationContext context, String valueUnpackerCode) { - super(context); - ReactFeatureFlagsWrapper.enableMountHooks(); - CallInvokerHolderImpl callInvokerHolder = - (CallInvokerHolderImpl) context.getCatalystInstance().getJSCallInvokerHolder(); - - FabricUIManager fabricUIManager = - (FabricUIManager) UIManagerHelper.getUIManager(context, UIManagerType.FABRIC); - - LayoutAnimations LayoutAnimations = new LayoutAnimations(context); - - ReanimatedMessageQueueThread messageQueueThread = new ReanimatedMessageQueueThread(); - - mHybridData = - initHybrid( - context.getJavaScriptContextHolder().get(), - holder, - mAndroidUIScheduler, - LayoutAnimations, - messageQueueThread, - fabricUIManager, - valueUnpackerCode); - prepareLayoutAnimations(LayoutAnimations); - installJSIBindings(); - if (BuildConfig.DEBUG) { - checkCppVersion(); - } - } - - private native HybridData initHybrid( - long jsContext, - CallInvokerHolderImpl jsCallInvokerHolder, - AndroidUIScheduler androidUIScheduler, - LayoutAnimations LayoutAnimations, - MessageQueueThread messageQueueThread, - FabricUIManager fabricUIManager, - String valueUnpackerCode); - - public native boolean isAnyHandlerWaitingForEvent(String eventName, int emitterReactTag); - - public native void performOperations(); - - @Override - protected HybridData getHybridData() { - return mHybridData; - } - - public static NativeMethodsHolder createNativeMethodsHolder(LayoutAnimations layoutAnimations) { - return new NativeMethodsHolder() { - @Override - public void startAnimation(int tag, int type, HashMap values) { - // NOT IMPLEMENTED - } - - @Override - public boolean isLayoutAnimationEnabled() { - // NOT IMPLEMENTED - return false; - } - - @Override - public int findPrecedingViewTagForTransition(int tag) { - // NOT IMPLEMENTED - return -1; - } - - @Override - public boolean shouldAnimateExiting(int tag, boolean shouldAnimate) { - // NOT IMPLEMENTED - return false; - } - - @Override - public boolean hasAnimation(int tag, int type) { - // NOT IMPLEMENTED - return false; - } - - @Override - public void clearAnimationConfig(int tag) { - // NOT IMPLEMENTED - } - - @Override - public void cancelAnimation(int tag) { - // NOT IMPLEMENTED - } - - @Override - public void checkDuplicateSharedTag(int viewTag, int screenTag) { - // NOT IMPLEMENTED - } - - @Override - public int[] getSharedGroup(int viewTag) { - // NOT IMPLEMENTED - return new int[] {}; - } - }; - } -} diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/72/com/swmansion/reanimated/ReactFeatureFlagsWrapper.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/72/com/swmansion/reanimated/ReactFeatureFlagsWrapper.java deleted file mode 100644 index d8c6d3c550a..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactFeatureFlagsWrapper/72/com/swmansion/reanimated/ReactFeatureFlagsWrapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.swmansion.reanimated; - -public class ReactFeatureFlagsWrapper { - - public static void enableMountHooks() { - // no-op - } -} diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/DevMenuUtils.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/DevMenuUtils.java deleted file mode 100644 index 79afed95a4e..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReactHost/72/com/swmansion/reanimated/DevMenuUtils.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.swmansion.reanimated; - -import com.facebook.react.ReactApplication; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.devsupport.interfaces.DevOptionHandler; -import com.facebook.react.devsupport.interfaces.DevSupportManager; - -public class DevMenuUtils { - - public static void addDevMenuOption(ReactApplicationContext context, DevOptionHandler handler) { - // In Expo, `ApplicationContext` is not an instance of `ReactApplication` - if (context.getApplicationContext() instanceof ReactApplication) { - final DevSupportManager devSupportManager = - ((ReactApplication) context.getApplicationContext()) - .getReactNativeHost() - .getReactInstanceManager() - .getDevSupportManager(); - - devSupportManager.addCustomDevOption("Toggle slow animations (Reanimated)", handler); - } - } -} diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/ReanimatedModule.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/ReanimatedModule.java deleted file mode 100644 index 20d80f5c040..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/ReanimatedModule.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.swmansion.reanimated; - -import android.util.Log; -import com.facebook.react.bridge.LifecycleEventListener; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.module.annotations.ReactModule; -import com.facebook.react.uimanager.NativeViewHierarchyManager; -import com.facebook.react.uimanager.UIBlock; -import com.facebook.react.uimanager.UIManagerModule; -import com.facebook.react.uimanager.UIManagerModuleListener; -import java.util.ArrayList; -import javax.annotation.Nullable; - -@ReactModule(name = ReanimatedModule.NAME) -public class ReanimatedModule extends NativeReanimatedModuleSpec - implements LifecycleEventListener, UIManagerModuleListener { - - public static final String NAME = "ReanimatedModule"; - - private interface UIThreadOperation { - void execute(NodesManager nodesManager); - } - - private ArrayList mOperations = new ArrayList<>(); - private @Nullable NodesManager mNodesManager; - - public ReanimatedModule(ReactApplicationContext reactContext) { - super(reactContext); - } - - @Override - public void initialize() { - ReactApplicationContext reactCtx = getReactApplicationContext(); - UIManagerModule uiManager = reactCtx.getNativeModule(UIManagerModule.class); - reactCtx.addLifecycleEventListener(this); - uiManager.addUIManagerListener(this); - } - - @Override - public void onHostPause() { - if (mNodesManager != null) { - mNodesManager.onHostPause(); - } - } - - @Override - public void onHostResume() { - if (mNodesManager != null) { - mNodesManager.onHostResume(); - } - } - - @Override - public void onHostDestroy() { - // do nothing - } - - @Override - public void willDispatchViewUpdates(final UIManagerModule uiManager) { - if (mOperations.isEmpty()) { - return; - } - final ArrayList operations = mOperations; - mOperations = new ArrayList<>(); - uiManager.addUIBlock( - new UIBlock() { - @Override - public void execute(NativeViewHierarchyManager nativeViewHierarchyManager) { - NodesManager nodesManager = getNodesManager(); - for (UIThreadOperation operation : operations) { - operation.execute(nodesManager); - } - } - }); - } - - @Override - public String getName() { - return NAME; - } - - /*package*/ - public NodesManager getNodesManager() { - if (mNodesManager == null) { - mNodesManager = new NodesManager(getReactApplicationContext()); - } - - return mNodesManager; - } - - @ReactMethod(isBlockingSynchronousMethod = true) - public boolean installTurboModule(String valueUnpackerCode) { - // When debugging in chrome the JS context is not available. - // https://github.com/facebook/react-native/blob/v0.67.0-rc.6/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobCollector.java#L25 - Utils.isChromeDebugger = getReactApplicationContext().getJavaScriptContextHolder().get() == 0; - - if (!Utils.isChromeDebugger) { - this.getNodesManager().initWithContext(getReactApplicationContext(), valueUnpackerCode); - return true; - } else { - Log.w( - "[REANIMATED]", - "Unable to create Reanimated Native Module. You can ignore this message if you are using Chrome Debugger now."); - return false; - } - } - - @ReactMethod - public void addListener(String eventName) { - // Keep: Required for RN built in Event Emitter Calls. - } - - @ReactMethod - public void removeListeners(Integer count) { - // Keep: Required for RN built in Event Emitter Calls. - } - - @Override - public void invalidate() { - super.invalidate(); - - if (mNodesManager != null) { - mNodesManager.invalidate(); - } - } -} diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java deleted file mode 100644 index 2c6cb188b10..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/73/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +++ /dev/null @@ -1,271 +0,0 @@ -package com.facebook.react.uimanager; - -import androidx.annotation.Nullable; -import com.facebook.react.bridge.Callback; -import com.facebook.react.bridge.Dynamic; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.bridge.WritableMap; -import com.facebook.react.module.annotations.ReactModule; -import java.util.List; - -@ReactModule(name = UIManagerModule.NAME) -public class ReanimatedUIManager extends UIManagerModule { - - public ReanimatedUIManager( - ReactApplicationContext reactContext, - List viewManagersList, - int minTimeLeftInFrameForNonBatchedOperationMs) { - super(reactContext, viewManagersList, minTimeLeftInFrameForNonBatchedOperationMs); - } - - public void onBatchComplete() { - super.onBatchComplete(); - } - - @Override - public boolean canOverrideExistingModule() { - return true; - } - - @ReactMethod(isBlockingSynchronousMethod = true) - public @Nullable WritableMap getConstantsForViewManager(@Nullable String viewManagerName) { - return super.getConstantsForViewManager(viewManagerName); - } - - @ReactMethod(isBlockingSynchronousMethod = true) - public WritableMap getDefaultEventTypes() { - return super.getDefaultEventTypes(); - } - - /** Unregisters a new root view. */ - @ReactMethod - public void removeRootView(int rootViewTag) { - super.removeRootView(rootViewTag); - } - - @ReactMethod - public void createView(int tag, String className, int rootViewTag, ReadableMap props) { - super.createView(tag, className, rootViewTag, props); - } - - @ReactMethod - public void updateView(final int tag, final String className, final ReadableMap props) { - super.updateView(tag, className, props); - } - - /** - * Interface for adding/removing/moving views within a parent view from JS. - * - * @param viewTag the view tag of the parent view - * @param moveFrom a list of indices in the parent view to move views from - * @param moveTo parallel to moveFrom, a list of indices in the parent view to move views to - * @param addChildTags a list of tags of views to add to the parent - * @param addAtIndices parallel to addChildTags, a list of indices to insert those children at - * @param removeFrom a list of indices of views to permanently remove. The memory for the - * corresponding views and data structures should be reclaimed. - */ - @ReactMethod - public void manageChildren( - int viewTag, - @Nullable ReadableArray moveFrom, - @Nullable ReadableArray moveTo, - @Nullable ReadableArray addChildTags, - @Nullable ReadableArray addAtIndices, - @Nullable ReadableArray removeFrom) { - super.manageChildren(viewTag, moveFrom, moveTo, addChildTags, addAtIndices, removeFrom); - } - - /** - * Interface for fast tracking the initial adding of views. Children view tags are assumed to be - * in order - * - * @param viewTag the view tag of the parent view - * @param childrenTags An array of tags to add to the parent in order - */ - @ReactMethod - public void setChildren(int viewTag, ReadableArray childrenTags) { - super.setChildren(viewTag, childrenTags); - } - - /** - * Replaces the View specified by oldTag with the View specified by newTag within oldTag's parent. - * This resolves to a simple {@link #manageChildren} call, but React doesn't have enough info in - * JS to formulate it itself. - * - * @deprecated This method will not be available in Fabric UIManager class. - */ - @ReactMethod - @Deprecated - public void replaceExistingNonRootView(int oldTag, int newTag) { - super.replaceExistingNonRootView(oldTag, newTag); - } - - /** - * Method which takes a container tag and then releases all subviews for that container upon - * receipt. - * - * @param containerTag the tag of the container for which the subviews must be removed - * @deprecated This method will not be available in Fabric UIManager class. - */ - @ReactMethod - @Deprecated - public void removeSubviewsFromContainerWithID(int containerTag) { - super.removeSubviewsFromContainerWithID(containerTag); - } - - /** - * Determines the location on screen, width, and height of the given view and returns the values - * via an async callback. - */ - @ReactMethod - public void measure(int reactTag, Callback callback) { - super.measure(reactTag, callback); - } - - /** - * Determines the location on screen, width, and height of the given view relative to the device - * screen and returns the values via an async callback. This is the absolute position including - * things like the status bar - */ - @ReactMethod - public void measureInWindow(int reactTag, Callback callback) { - super.measureInWindow(reactTag, callback); - } - - /** - * Measures the view specified by tag relative to the given ancestorTag. This means that the - * returned x, y are relative to the origin x, y of the ancestor view. Results are stored in the - * given outputBuffer. We allow ancestor view and measured view to be the same, in which case the - * position always will be (0, 0) and method will only measure the view dimensions. - * - *

NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible - * window which can cause unexpected results when measuring relative to things like ScrollViews - * that can have offset content on the screen. - */ - @ReactMethod - public void measureLayout( - int tag, int ancestorTag, Callback errorCallback, Callback successCallback) { - super.measureLayout(tag, ancestorTag, errorCallback, successCallback); - } - - /** - * Like {@link #measure} and {@link #measureLayout} but measures relative to the immediate parent. - * - *

NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible - * window which can cause unexpected results when measuring relative to things like ScrollViews - * that can have offset content on the screen. - * - * @deprecated this method will not be available in FabricUIManager class. - */ - @ReactMethod - @Deprecated - public void measureLayoutRelativeToParent( - int tag, Callback errorCallback, Callback successCallback) { - super.measureLayoutRelativeToParent(tag, errorCallback, successCallback); - } - - /** - * Find the touch target child native view in the supplied root view hierarchy, given a react - * target location. - * - *

This method is currently used only by Element Inspector DevTool. - * - * @param reactTag the tag of the root view to traverse - * @param point an array containing both X and Y target location - * @param callback will be called if with the identified child view react ID, and measurement - * info. If no view was found, callback will be invoked with no data. - */ - @ReactMethod - public void findSubviewIn( - final int reactTag, final ReadableArray point, final Callback callback) { - super.findSubviewIn(reactTag, point, callback); - } - - /** - * Check if the first shadow node is the descendant of the second shadow node - * - * @deprecated this method will not be available in FabricUIManager class. - */ - @ReactMethod - @Deprecated - public void viewIsDescendantOf( - final int reactTag, final int ancestorReactTag, final Callback callback) { - super.viewIsDescendantOf(reactTag, ancestorReactTag, callback); - } - - @ReactMethod - public void setJSResponder(int reactTag, boolean blockNativeResponder) { - super.setJSResponder(reactTag, blockNativeResponder); - } - - @ReactMethod - public void clearJSResponder() { - super.clearJSResponder(); - } - - @ReactMethod - public void dispatchViewManagerCommand( - int reactTag, Dynamic commandId, @Nullable ReadableArray commandArgs) { - super.dispatchViewManagerCommand(reactTag, commandId, commandArgs); - } - - /** - * Show a PopupMenu. - * - * @param reactTag the tag of the anchor view (the PopupMenu is displayed next to this view); this - * needs to be the tag of a native view (shadow views can not be anchors) - * @param items the menu items as an array of strings - * @param error will be called if there is an error displaying the menu - * @param success will be called with the position of the selected item as the first argument, or - * no arguments if the menu is dismissed - */ - @ReactMethod - public void showPopupMenu(int reactTag, ReadableArray items, Callback error, Callback success) { - super.showPopupMenu(reactTag, items, error, success); - } - - @ReactMethod - public void dismissPopupMenu() { - super.dismissPopupMenu(); - } - - /** - * LayoutAnimation API on Android is currently experimental. Therefore, it needs to be enabled - * explicitly in order to avoid regression in existing application written for iOS using this API. - * - *

Warning : This method will be removed in future version of React Native, and layout - * animation will be enabled by default, so always check for its existence before invoking it. - * - *

TODO(9139831) : remove this method once layout animation is fully stable. - * - * @param enabled whether layout animation is enabled or not - */ - @ReactMethod - public void setLayoutAnimationEnabledExperimental(boolean enabled) { - super.setLayoutAnimationEnabledExperimental(enabled); - } - - /** - * Configure an animation to be used for the native layout changes, and native views creation. The - * animation will only apply during the current batch operations. - * - *

TODO(7728153) : animating view deletion is currently not supported. - * - * @param config the configuration of the animation for view addition/removal/update. - * @param success will be called when the animation completes, or when the animation get - * interrupted. In this case, callback parameter will be false. - * @param error will be called if there was an error processing the animation - */ - @ReactMethod - public void configureNextLayoutAnimation(ReadableMap config, Callback success, Callback error) { - super.configureNextLayoutAnimation(config, success, error); - } - - @ReactMethod - public void sendAccessibilityEvent(int tag, int eventType) { - super.sendAccessibilityEvent(tag, eventType); - } -} diff --git a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/messageQueueThread/72/com/swmansion/reanimated/ReanimatedMessageQueueThread.java b/packages/react-native-reanimated/android/src/reactNativeVersionPatch/messageQueueThread/72/com/swmansion/reanimated/ReanimatedMessageQueueThread.java deleted file mode 100644 index cc57c5b6db8..00000000000 --- a/packages/react-native-reanimated/android/src/reactNativeVersionPatch/messageQueueThread/72/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.swmansion.reanimated; - -import com.facebook.proguard.annotations.DoNotStrip; - -@DoNotStrip -public class ReanimatedMessageQueueThread extends ReanimatedMessageQueueThreadBase { - @Override - public boolean runOnQueue(Runnable runnable) { - return messageQueueThread.runOnQueue(runnable); - } -} diff --git a/packages/react-native-reanimated/apple/reanimated/apple/LayoutReanimation/REASwizzledUIManager.mm b/packages/react-native-reanimated/apple/reanimated/apple/LayoutReanimation/REASwizzledUIManager.mm index ff359efe2f1..3e989dc801c 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/LayoutReanimation/REASwizzledUIManager.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/LayoutReanimation/REASwizzledUIManager.mm @@ -159,11 +159,7 @@ - (RCTViewManagerUIBlock)reanimated_uiBlockWithLayoutUpdateForRootView:(RCTRootS } RCTUIManager *originalSelf = (RCTUIManager *)self; -#if REACT_NATIVE_MINOR_VERSION >= 73 NSPointerArray *affectedShadowViews = [NSPointerArray weakObjectsPointerArray]; -#else - NSHashTable *affectedShadowViews = [NSHashTable weakObjectsHashTable]; -#endif [rootShadowView layoutWithAffectedShadowViews:affectedShadowViews]; if (!affectedShadowViews.count) { diff --git a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.h b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.h index c796f7d5ddf..57545544927 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.h +++ b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.h @@ -1,9 +1,7 @@ #ifdef RCT_NEW_ARCH_ENABLED #import -#if REACT_NATIVE_MINOR_VERSION >= 74 #import #import -#endif // REACT_NATIVE_MINOR_VERSION >= 74 #import #else // RCT_NEW_ARCH_ENABLED #import @@ -21,11 +19,7 @@ #ifdef RCT_NEW_ARCH_ENABLED = 74 RCTRuntimeExecutorModule, -#endif // REACT_NATIVE_MINOR_VERSION >= 74 -#else - diff --git a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm index aa09b5ca3af..cf94b0c75c6 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm @@ -7,9 +7,6 @@ #import #import #import -#if REACT_NATIVE_MINOR_VERSION < 73 -#import -#endif // REACT_NATIVE_MINOR_VERSION < 73 #endif // RCT_NEW_ARCH_ENABLED #ifdef RCT_NEW_ARCH_ENABLED @@ -64,9 +61,9 @@ @implementation REAModule { } @synthesize moduleRegistry = _moduleRegistry; -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED @synthesize runtimeExecutor = _runtimeExecutor; -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED RCT_EXPORT_MODULE(ReanimatedModule); @@ -281,7 +278,7 @@ - (void)sendEventWithName:(NSString *)eventName body:(id)body RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule : (nonnull NSString *)valueUnpackerCode) { if (_isBridgeless) { -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; auto &rnRuntime = *(jsi::Runtime *)cxxBridge.runtime; auto executorFunction = ([executor = _runtimeExecutor](std::function &&callback) { @@ -296,9 +293,9 @@ - (void)sendEventWithName:(NSString *)eventName body:(id)body _moduleRegistry, rnRuntime, std::string([valueUnpackerCode UTF8String]), executorFunction); [self attachReactEventListener]; [self commonInit:nativeReanimatedModule withRnRuntime:rnRuntime]; -#else // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#else // RCT_NEW_ARCH_ENABLED [NSException raise:@"Missing bridge" format:@"[Reanimated] Failed to obtain the bridge."]; -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED } else { facebook::jsi::Runtime *jsiRuntime = [self.bridge respondsToSelector:@selector(runtime)] ? reinterpret_cast(self.bridge.runtime) diff --git a/packages/react-native-reanimated/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm b/packages/react-native-reanimated/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm index 1b556f674cb..dda71ed6ff8 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm @@ -138,7 +138,7 @@ - (CGFloat)estimateClosingKeyboardHeight Curve parameters come from estimation: https://www.desmos.com/calculator/vhrhdaopyq Animation takes 31 frames, which is 0.496 seconds at 60 fps. */ - float progress = [self estimateProgressForDuration:0.496 a1:1 a2:5.65 b1:2.74 b2:8.38 c1:0.93 c2:3.29]; + float progress = [self estimateProgressForDuration:0.496 a1:1 a2:5.65 b1:2. b2:8.38 c1:0.93 c2:3.29]; float currentKeyboardHeight = _initialKeyboardHeight * (1 - progress); return currentKeyboardHeight; } diff --git a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h index 7ee381f10ab..4101aa6157a 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h +++ b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.h @@ -19,14 +19,14 @@ std::shared_ptr createReanimatedModule( const std::shared_ptr &jsInvoker, const std::string &valueUnpackerCode); -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED std::shared_ptr createReanimatedModuleBridgeless( RCTModuleRegistry *moduleRegistry, jsi::Runtime &runtime, const std::string &valueUnpackerCode, RuntimeExecutor runtimeExecutor); -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED void commonInit( REAModule *reaModule, diff --git a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.mm b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.mm index a1ace4f6ef6..b43cf359566 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/native/NativeProxy.mm @@ -98,7 +98,7 @@ static inline bool getIsReducedMotion() return nativeReanimatedModule; } -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED std::shared_ptr createReanimatedModuleBridgeless( RCTModuleRegistry *moduleRegistry, jsi::Runtime &runtime, @@ -134,7 +134,7 @@ static inline bool getIsReducedMotion() return nativeReanimatedModule; } -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED void commonInit(REAModule *reaModule, std::shared_ptr nativeReanimatedModule) { diff --git a/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.h b/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.h index dd31c2f7a55..be566d82d4d 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.h +++ b/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.h @@ -16,16 +16,14 @@ PlatformDepMethodsHolder makePlatformDepMethodsHolder( REANodesManager *nodesManager, REAModule *reaModule); -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED PlatformDepMethodsHolder makePlatformDepMethodsHolderBridgeless( RCTModuleRegistry *moduleRegistry, REANodesManager *nodesManager, REAModule *reaModule); SetGestureStateFunction makeSetGestureStateFunctionBridgeless( RCTModuleRegistry *moduleRegistry); -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) -#ifdef RCT_NEW_ARCH_ENABLED SynchronouslyUpdateUIPropsFunction makeSynchronouslyUpdateUIPropsFunction( REANodesManager *nodesManager); #else // RCT_NEW_ARCH_ENABLED diff --git a/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm b/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm index c1daff7a419..c1a6789aaab 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm @@ -70,7 +70,7 @@ SetGestureStateFunction makeSetGestureStateFunction(RCTBridge *bridge) return setGestureStateFunction; } -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED SetGestureStateFunction makeSetGestureStateFunctionBridgeless(RCTModuleRegistry *moduleRegistry) { id gestureHandlerStateManager = nil; @@ -82,7 +82,7 @@ SetGestureStateFunction makeSetGestureStateFunctionBridgeless(RCTModuleRegistry }; return setGestureStateFunction; } -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED RequestRenderFunction makeRequestRender(REANodesManager *nodesManager) { @@ -379,7 +379,7 @@ KeyboardEventUnsubscribeFunction makeUnsubscribeFromKeyboardEventsFunction(REAKe return platformDepMethodsHolder; } -#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#ifdef RCT_NEW_ARCH_ENABLED PlatformDepMethodsHolder makePlatformDepMethodsHolderBridgeless( RCTModuleRegistry *moduleRegistry, REANodesManager *nodesManager, @@ -426,6 +426,6 @@ PlatformDepMethodsHolder makePlatformDepMethodsHolderBridgeless( }; return platformDepMethodsHolder; } -#endif // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED) +#endif // RCT_NEW_ARCH_ENABLED } // namespace reanimated diff --git a/packages/react-native-reanimated/package.json b/packages/react-native-reanimated/package.json index dbf2688e8cc..e5ef4202800 100644 --- a/packages/react-native-reanimated/package.json +++ b/packages/react-native-reanimated/package.json @@ -18,13 +18,11 @@ "format:android:cpp": "find android/src -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i", "format:common": "find Common -iname \"*.h\" -o -iname \"*.cpp\" | xargs clang-format -i", "find-unused-code:js": "yarn ts-prune --ignore \"index|.web.\" --error", - "type:check": "yarn type:check:src && yarn type:check:plugin && ./scripts/test-ts.sh ../../apps/common-app/src/App.tsx __typetests__/common __typetests__/72plus __typetests__/legacy", + "type:check": "yarn type:check:src && yarn type:check:plugin && ./scripts/test-ts.sh ../../apps/common-app/src/App.tsx __typetests__/common", "type:check:src": "yarn tsc --noEmit", "type:check:plugin": "cd plugin && yarn type:check:src", "type:check:app": "./scripts/test-ts.sh ../../apps/common-app/src/App.tsx", "type:check:tests:common": "./scripts/test-ts.sh __typetests__/common", - "type:check:tests:0.72+": "./scripts/test-ts.sh __typetests__/72plus", - "type:check:tests:legacy": "./scripts/test-ts.sh __typetests__/legacy", "build": "yarn build:plugin && bob build", "build:plugin": "cd plugin && yarn build", "circular-dependency-check": "yarn madge --extensions js,ts,tsx --circular src lib", diff --git a/packages/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts b/packages/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts index e97fb977094..6b15ae482a6 100644 --- a/packages/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts +++ b/packages/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts @@ -1,6 +1,7 @@ 'use strict'; /* eslint-disable @typescript-eslint/no-explicit-any */ +// TODO: Leave only 0.74 logic here (be careful) // This is a makeshift solution to handle both 0.73 and 0.74 versions of React Native. export let getViewInfo = (element: any) => { diff --git a/packages/react-native-reanimated/src/fabricUtils.ts b/packages/react-native-reanimated/src/fabricUtils.ts index adb2ffcc2d5..a872b9a2167 100644 --- a/packages/react-native-reanimated/src/fabricUtils.ts +++ b/packages/react-native-reanimated/src/fabricUtils.ts @@ -33,6 +33,7 @@ export function getShadowNodeWrapperFromRef( } } + // TODO: Clean this up since 0.74 is the minimum supported version now. // taken from https://github.com/facebook/react-native/commit/803bb16531697233686efd475f004c1643e03617#diff-d8172256c6d63b5d32db10e54d7b10f37a26b337d5280d89f5bfd7bcea778292R196 // @ts-ignore some weird stuff on RN 0.74 - see examples with scrollView const scrollViewRef = ref?.getScrollResponder?.()?.getNativeScrollRef?.(); diff --git a/yarn.lock b/yarn.lock index d62ba14f112..b0bd5f66c1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6615,6 +6615,13 @@ __metadata: languageName: node linkType: hard +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 + languageName: node + linkType: hard + "@ts-morph/common@npm:~0.12.3": version: 0.12.3 resolution: "@ts-morph/common@npm:0.12.3" @@ -7463,7 +7470,7 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:6": +"agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" dependencies: @@ -7481,6 +7488,15 @@ __metadata: languageName: node linkType: hard +"agentkeepalive@npm:^4.2.1": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: "npm:^1.2.1" + checksum: 10/dd210ba2a2e2482028f027b1156789744aadbfd773a6c9dd8e4e8001930d5af82382abe19a69240307b1d8003222ce6b0542935038313434b900e351914fc15f + languageName: node + linkType: hard + "aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" @@ -8596,6 +8612,26 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^17.0.0": + version: 17.1.4 + resolution: "cacache@npm:17.1.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^7.7.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^1.0.2" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/6e26c788bc6a18ff42f4d4f97db30d5c60a5dfac8e7c10a03b0307a92cf1b647570547cf3cd96463976c051eb9c7258629863f156e224c82018862c1a8ad0e70 + languageName: node + linkType: hard + "cacache@npm:^18.0.0, cacache@npm:^18.0.2": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -8746,6 +8782,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^3": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/37f90b31fd655fb49c2bd8e2a68aebefddd64522655d001ef417e6f955def0ed9110a867ffc878a533f2dafea5f2032433a37c8a7614969baa7f8a1cd424ddfc + languageName: node + linkType: hard + "chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -12885,6 +12931,15 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^6.0.0": + version: 6.1.1 + resolution: "hosted-git-info@npm:6.1.1" + dependencies: + lru-cache: "npm:^7.5.1" + checksum: 10/2e48e3fac799b52d82277ff5693916bfa33441a2c06d1f11f9e82886bd235514783c2bdffb3abde67b7aeb6af457a48df38e6894740c7fc2e1bb78f5bcfac61e + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -12912,6 +12967,17 @@ __metadata: languageName: node linkType: hard +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" + dependencies: + "@tootallnate/once": "npm:2" + agent-base: "npm:6" + debug: "npm:4" + checksum: 10/5ee19423bc3e0fd5f23ce991b0755699ad2a46a440ce9cec99e8126bb98448ad3479d2c0ea54be5519db5b19a4ffaa69616bac01540db18506dd4dac3dc418f0 + languageName: node + linkType: hard + "http-proxy-agent@npm:^7.0.0": version: 7.0.2 resolution: "http-proxy-agent@npm:7.0.2" @@ -12933,7 +12999,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^5.0.1": +"https-proxy-agent@npm:^5.0.0, https-proxy-agent@npm:^5.0.1": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -12974,6 +13040,15 @@ __metadata: languageName: node linkType: hard +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: "npm:^2.0.0" + checksum: 10/9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 + languageName: node + linkType: hard + "husky@npm:^9.0.11": version: 9.1.6 resolution: "husky@npm:9.1.6" @@ -14715,6 +14790,13 @@ __metadata: languageName: node linkType: hard +"jsonparse@npm:^1.3.1": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 10/24531e956f0f19d79e22c157cebd81b37af3486ae22f9bc1028f8c2a4d1b70df48b168ff86f8568d9c2248182de9b6da9f50f685d5e4b9d1d2d339d2a29d15bc + languageName: node + linkType: hard + "jsprim@npm:^2.0.2": version: 2.0.2 resolution: "jsprim@npm:2.0.2" @@ -15141,6 +15223,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: 10/6029ca5aba3aacb554e919d7ef804fffd4adfc4c83db00fac8248c7c78811fb6d4b6f70f7fd9d55032b3823446546a007edaa66ad1f2377ae833bd983fac5d98 + languageName: node + linkType: hard + "macos-example@workspace:apps/macos-example": version: 0.0.0-use.local resolution: "macos-example@workspace:apps/macos-example" @@ -15171,6 +15260,7 @@ __metadata: react-native: "npm:0.75.4" react-native-gesture-handler: "npm:2.20.2" react-native-macos: "npm:^0.75.13" + react-native-macos-init: "npm:^2.1.3" react-native-pager-view: "npm:^6.4.1" react-native-reanimated: "workspace:*" react-native-safe-area-context: "npm:^4.13.1" @@ -15239,6 +15329,29 @@ __metadata: languageName: node linkType: hard +"make-fetch-happen@npm:^11.0.0": + version: 11.1.1 + resolution: "make-fetch-happen@npm:11.1.1" + dependencies: + agentkeepalive: "npm:^4.2.1" + cacache: "npm:^17.0.0" + http-cache-semantics: "npm:^4.1.1" + http-proxy-agent: "npm:^5.0.0" + https-proxy-agent: "npm:^5.0.0" + is-lambda: "npm:^1.0.1" + lru-cache: "npm:^7.7.1" + minipass: "npm:^5.0.0" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + promise-retry: "npm:^2.0.1" + socks-proxy-agent: "npm:^7.0.0" + ssri: "npm:^10.0.0" + checksum: 10/b4b442cfaaec81db159f752a5f2e3ee3d7aa682782868fa399200824ec6298502e01bdc456e443dc219bcd5546c8e4471644d54109c8599841dc961d17a805fa + languageName: node + linkType: hard + "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -16354,6 +16467,16 @@ __metadata: languageName: node linkType: hard +"minipass-json-stream@npm:^1.0.1": + version: 1.0.2 + resolution: "minipass-json-stream@npm:1.0.2" + dependencies: + jsonparse: "npm:^1.3.1" + minipass: "npm:^3.0.0" + checksum: 10/e9df9d28bcbd87f8c134facd8c51a528ec4614a47d50a8f122ac6b666b45f4d35efa5109ccfc180c8911672bf1e146e6b20b4a459b0ea906a5ce887617b51942 + languageName: node + linkType: hard + "minipass-pipeline@npm:^1.2.2, minipass-pipeline@npm:^1.2.4": version: 1.2.4 resolution: "minipass-pipeline@npm:1.2.4" @@ -16482,7 +16605,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.3": +"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -16769,6 +16892,18 @@ __metadata: languageName: node linkType: hard +"npm-package-arg@npm:^10.0.0": + version: 10.1.0 + resolution: "npm-package-arg@npm:10.1.0" + dependencies: + hosted-git-info: "npm:^6.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/3bbb5f081099f73e852b4d3a3a10f78d495bdf21e050ca5c78dc134921c99ec856d1555ff6ba9c1c15b7475ad976ce803ef53fdda34abec622fe8f5d76421319 + languageName: node + linkType: hard + "npm-package-arg@npm:^7.0.0": version: 7.0.0 resolution: "npm-package-arg@npm:7.0.0" @@ -16781,6 +16916,21 @@ __metadata: languageName: node linkType: hard +"npm-registry-fetch@npm:^14.0.0": + version: 14.0.5 + resolution: "npm-registry-fetch@npm:14.0.5" + dependencies: + make-fetch-happen: "npm:^11.0.0" + minipass: "npm:^5.0.0" + minipass-fetch: "npm:^3.0.0" + minipass-json-stream: "npm:^1.0.1" + minizlib: "npm:^2.1.2" + npm-package-arg: "npm:^10.0.0" + proc-log: "npm:^3.0.0" + checksum: 10/63026b22d6a6afe5cb3a02dca96db783b88d3acc68be94f3485f25a5e4932800fdeff08145a77b35b8f61987033346462d4b3e710c0729a9735357ff97596062 + languageName: node + linkType: hard + "npm-run-path@npm:^2.0.0": version: 2.0.2 resolution: "npm-run-path@npm:2.0.2" @@ -17695,6 +17845,13 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": version: 4.2.0 resolution: "proc-log@npm:4.2.0" @@ -17758,7 +17915,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.3.2, prompts@npm:^2.4.2": +"prompts@npm:^2.0.1, prompts@npm:^2.3.0, prompts@npm:^2.3.2, prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -18059,6 +18216,23 @@ __metadata: languageName: node linkType: hard +"react-native-macos-init@npm:^2.1.3": + version: 2.1.3 + resolution: "react-native-macos-init@npm:2.1.3" + dependencies: + chalk: "npm:^3" + find-up: "npm:^4.1.0" + npm-registry-fetch: "npm:^14.0.0" + prompts: "npm:^2.3.0" + semver: "npm:^7.5.2" + valid-url: "npm:^1.0.9" + yargs: "npm:^15.1.0" + bin: + react-native-macos-init: bin.js + checksum: 10/f6a9aab74ca610997b8c0734de1a1018e066e132b7de0c163d7bd02edbc4e26654ab2d7668829a396d16a9e3fa975e6f38b5e693191c5f7e52dbb8c034c1f91f + languageName: node + linkType: hard + "react-native-macos@npm:^0.75.13": version: 0.75.13 resolution: "react-native-macos@npm:0.75.13" @@ -19603,6 +19777,17 @@ __metadata: languageName: node linkType: hard +"socks-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "socks-proxy-agent@npm:7.0.0" + dependencies: + agent-base: "npm:^6.0.2" + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 10/26c75d9c62a9ed3fd494df60e65e88da442f78e0d4bc19bfd85ac37bd2c67470d6d4bba5202e804561cda6674db52864c9e2a2266775f879bc8d89c1445a5f4c + languageName: node + linkType: hard + "socks-proxy-agent@npm:^8.0.3": version: 8.0.4 resolution: "socks-proxy-agent@npm:8.0.4" @@ -19614,7 +19799,7 @@ __metadata: languageName: node linkType: hard -"socks@npm:^2.8.3": +"socks@npm:^2.6.2, socks@npm:^2.8.3": version: 2.8.3 resolution: "socks@npm:2.8.3" dependencies: @@ -21221,7 +21406,7 @@ __metadata: languageName: node linkType: hard -"valid-url@npm:~1.0.9": +"valid-url@npm:^1.0.9, valid-url@npm:~1.0.9": version: 1.0.9 resolution: "valid-url@npm:1.0.9" checksum: 10/343dfaf85eb3691dc8eb93f7bc007be1ee6091e6c6d1a68bf633cb85e4bf2930e34ca9214fb2c3330de5b652510b257a8ee1ff0a0a37df0925e9dabf93ee512d @@ -21237,6 +21422,13 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 10/0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 + languageName: node + linkType: hard + "vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2"