react-native-reanimated 2.5.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/SharedItems/ShareableValue.cpp +2 -2
- package/Common/cpp/Tools/RuntimeDecorator.cpp +0 -14
- package/RNReanimated.podspec +15 -6
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/build.gradle +13 -23
- package/android/react-native-reanimated-64-hermes.aar +0 -0
- package/android/react-native-reanimated-64-jsc.aar +0 -0
- package/android/react-native-reanimated-65-hermes.aar +0 -0
- package/android/react-native-reanimated-65-jsc.aar +0 -0
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
- package/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/android/react-native-reanimated-68-hermes.aar +0 -0
- package/android/react-native-reanimated-68-jsc.aar +0 -0
- package/android/src/main/cpp/NativeProxy.cpp +22 -12
- package/android/src/main/cpp/headers/NativeProxy.h +2 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +11 -8
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +13 -6
- package/ios/LayoutReanimation/REAAnimationsManager.h +1 -1
- package/ios/LayoutReanimation/REAAnimationsManager.m +2 -2
- package/ios/LayoutReanimation/REASnapshot.m +1 -1
- package/ios/LayoutReanimation/REAUIManager.h +1 -1
- package/ios/LayoutReanimation/REAUIManager.mm +4 -5
- package/ios/Nodes/REAAlwaysNode.h +1 -1
- package/ios/Nodes/REAAlwaysNode.m +5 -5
- package/ios/Nodes/REABezierNode.h +1 -1
- package/ios/Nodes/REABezierNode.m +4 -5
- package/ios/Nodes/REABlockNode.h +1 -1
- package/ios/Nodes/REABlockNode.m +2 -2
- package/ios/Nodes/REACallFuncNode.h +1 -1
- package/ios/Nodes/REACallFuncNode.m +5 -5
- package/ios/Nodes/REAClockNodes.h +1 -1
- package/ios/Nodes/REAClockNodes.m +4 -4
- package/ios/Nodes/REAConcatNode.h +1 -1
- package/ios/Nodes/REAConcatNode.m +3 -3
- package/ios/Nodes/REACondNode.h +1 -1
- package/ios/Nodes/REACondNode.m +3 -3
- package/ios/Nodes/READebugNode.h +1 -1
- package/ios/Nodes/READebugNode.m +3 -3
- package/ios/Nodes/REAEventNode.h +1 -2
- package/ios/Nodes/REAEventNode.m +3 -3
- package/ios/Nodes/REAFunctionNode.h +1 -1
- package/ios/Nodes/REAFunctionNode.m +3 -3
- package/ios/Nodes/REAJSCallNode.h +1 -1
- package/ios/Nodes/REAJSCallNode.m +3 -3
- package/ios/Nodes/REANode.m +2 -2
- package/ios/Nodes/REAOperatorNode.h +1 -1
- package/ios/Nodes/REAOperatorNode.m +2 -3
- package/ios/Nodes/REAParamNode.h +1 -1
- package/ios/Nodes/REAParamNode.m +4 -4
- package/ios/Nodes/REAPropsNode.h +1 -1
- package/ios/Nodes/REAPropsNode.m +4 -6
- package/ios/Nodes/REASetNode.h +1 -1
- package/ios/Nodes/REASetNode.m +4 -4
- package/ios/Nodes/REAStyleNode.h +1 -1
- package/ios/Nodes/REAStyleNode.m +2 -3
- package/ios/Nodes/REATransformNode.h +1 -1
- package/ios/Nodes/REATransformNode.m +2 -2
- package/ios/Nodes/REAValueNode.h +1 -3
- package/ios/Nodes/REAValueNode.m +1 -1
- package/ios/REAEventDispatcher.m +1 -1
- package/ios/REAModule.h +1 -1
- package/ios/REAModule.m +4 -5
- package/ios/REANodesManager.h +1 -2
- package/ios/REANodesManager.m +22 -24
- package/ios/Transitioning/RCTConvert+REATransition.h +1 -2
- package/ios/Transitioning/RCTConvert+REATransition.m +1 -1
- package/ios/Transitioning/REAAllTransitions.h +1 -1
- package/ios/Transitioning/REAAllTransitions.m +2 -3
- package/ios/Transitioning/REATransition.h +2 -3
- package/ios/Transitioning/REATransition.m +3 -4
- package/ios/Transitioning/REATransitionAnimation.m +1 -2
- package/ios/Transitioning/REATransitionManager.m +2 -4
- package/ios/Transitioning/REATransitionValues.m +2 -3
- package/ios/native/NativeMethods.h +1 -3
- package/ios/native/NativeMethods.mm +1 -1
- package/ios/native/NativeProxy.h +2 -2
- package/ios/native/NativeProxy.mm +20 -17
- package/ios/native/REAIOSErrorHandler.h +2 -4
- package/ios/native/REAIOSErrorHandler.mm +1 -1
- package/ios/native/REAIOSLogger.h +1 -3
- package/ios/native/REAIOSLogger.mm +1 -1
- package/ios/native/REAIOSScheduler.h +1 -3
- package/ios/native/REAIOSScheduler.mm +2 -2
- package/ios/native/REAInitializer.h +0 -7
- package/ios/native/REAInitializer.mm +2 -2
- package/ios/native/UIResponder+Reanimated.mm +3 -3
- package/ios/sensor/ReanimatedSensor.h +5 -1
- package/ios/sensor/ReanimatedSensor.m +49 -1
- package/ios/sensor/ReanimatedSensorContainer.h +1 -2
- package/ios/sensor/ReanimatedSensorContainer.m +2 -3
- package/lib/Animated.js +0 -9
- package/lib/ConfigHelper.js +0 -1
- package/lib/index.js +0 -9
- package/lib/reanimated2/Easing.js +9 -3
- package/lib/reanimated2/core.js +0 -36
- package/lib/reanimated2/globals.d.ts +1 -2
- package/lib/reanimated2/interpolateColor.js +11 -11
- package/lib/reanimated2/js-reanimated/index.js +3 -3
- package/lib/types/lib/ConfigHelper.d.ts +12 -0
- package/lib/types/lib/ReanimatedEventEmitter.d.ts +3 -0
- package/lib/types/lib/ReanimatedModule.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.macos.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.native.d.ts +2 -0
- package/lib/types/lib/ReanimatedModule.windows.d.ts +2 -0
- package/lib/types/lib/ReanimatedModuleCompat.d.ts +14 -0
- package/lib/types/lib/createAnimatedComponent.d.ts +33 -0
- package/lib/types/lib/reanimated2/Bezier.d.ts +6 -0
- package/lib/types/lib/reanimated2/Colors.d.ts +31 -0
- package/lib/types/lib/reanimated2/Easing.d.ts +172 -0
- package/lib/types/lib/reanimated2/NativeMethods.d.ts +14 -0
- package/lib/types/lib/reanimated2/NativeReanimated/NativeReanimated.d.ts +20 -0
- package/lib/types/lib/reanimated2/NativeReanimated/index.d.ts +3 -0
- package/lib/types/lib/reanimated2/PlatformChecker.d.ts +5 -0
- package/lib/types/lib/reanimated2/PropAdapters.d.ts +4 -0
- package/lib/types/lib/reanimated2/UpdateProps.d.ts +9 -0
- package/lib/types/lib/reanimated2/ViewDescriptorsSet.d.ts +20 -0
- package/lib/types/lib/reanimated2/WorkletEventHandler.d.ts +13 -0
- package/lib/types/lib/reanimated2/__mocks__/MutableValue.d.ts +5 -0
- package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.d.ts +13 -0
- package/lib/types/lib/reanimated2/__mocks__/NativeReanimated.native.d.ts +13 -0
- package/lib/types/lib/reanimated2/animation/commonTypes.d.ts +27 -0
- package/lib/types/lib/reanimated2/animation/decay.d.ts +19 -0
- package/lib/types/lib/reanimated2/animation/delay.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/index.d.ts +9 -0
- package/lib/types/lib/reanimated2/animation/repeat.d.ts +12 -0
- package/lib/types/lib/reanimated2/animation/sequence.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/spring.d.ts +22 -0
- package/lib/types/lib/reanimated2/animation/styleAnimation.d.ts +7 -0
- package/lib/types/lib/reanimated2/animation/timing.d.ts +21 -0
- package/lib/types/lib/reanimated2/animation/util.d.ts +9 -0
- package/lib/types/lib/reanimated2/commonTypes.d.ts +79 -0
- package/lib/types/lib/reanimated2/component/FlatList.d.ts +9 -0
- package/lib/types/lib/reanimated2/component/WrappedComponents.d.ts +8 -0
- package/lib/types/lib/reanimated2/component/index.d.ts +9 -0
- package/lib/types/lib/reanimated2/core.d.ts +24 -0
- package/lib/types/lib/reanimated2/hook/Hooks.d.ts +5 -0
- package/lib/types/lib/reanimated2/hook/commonTypes.d.ts +14 -0
- package/lib/types/lib/reanimated2/hook/index.d.ts +10 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedGestureHandler.d.ts +35 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedReaction.d.ts +12 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedRef.d.ts +3 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedScrollHandler.d.ts +21 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedSensor.d.ts +18 -0
- package/lib/types/lib/reanimated2/hook/useAnimatedStyle.d.ts +11 -0
- package/lib/types/lib/reanimated2/hook/useDerivedValue.d.ts +4 -0
- package/lib/types/lib/reanimated2/hook/useSharedValue.d.ts +2 -0
- package/lib/types/lib/reanimated2/hook/utils.d.ts +28 -0
- package/lib/types/lib/reanimated2/index.d.ts +12 -0
- package/lib/types/lib/reanimated2/interpolateColor.d.ts +26 -0
- package/lib/types/lib/reanimated2/interpolation.d.ts +14 -0
- package/lib/types/lib/reanimated2/jestUtils.d.ts +12 -0
- package/lib/types/lib/reanimated2/js-reanimated/JSReanimated.d.ts +30 -0
- package/lib/types/lib/reanimated2/js-reanimated/Mapper.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/MapperRegistry.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/MutableValue.d.ts +14 -0
- package/lib/types/lib/reanimated2/js-reanimated/commonTypes.d.ts +44 -0
- package/lib/types/lib/reanimated2/js-reanimated/index.d.ts +15 -0
- package/lib/types/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.d.ts +1 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +22 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +38 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.d.ts +25 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +77 -0
- package/lib/types/lib/reanimated2/layoutReanimation/animationBuilder/index.d.ts +4 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.d.ts +62 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Default.d.ts +4 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.d.ts +42 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.d.ts +50 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.d.ts +10 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.d.ts +34 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.d.ts +34 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.d.ts +18 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.d.ts +66 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultAnimations/index.d.ts +10 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +19 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +13 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.d.ts +7 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +9 -0
- package/lib/types/lib/reanimated2/layoutReanimation/defaultTransitions/index.d.ts +6 -0
- package/lib/types/lib/reanimated2/layoutReanimation/index.d.ts +4 -0
- package/lib/types/lib/reanimated2/mock.d.ts +55 -0
- package/lib/types/lib/reanimated2/platform-specific/RNRenderer.d.ts +1 -0
- package/lib/types/lib/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/lib/reanimated2/utils.d.ts +7 -0
- package/lib/types/lib/setAndForwardRef.d.ts +40 -0
- package/lib/types/react-native-reanimated-tests.d.ts +1 -0
- package/package.json +7 -9
- package/plugin.js +26 -32
- package/react-native-reanimated.d.ts +39 -30
- package/src/Animated.js +0 -9
- package/src/ConfigHelper.ts +0 -1
- package/src/createAnimatedComponent.tsx +1 -1
- package/src/reanimated2/Easing.ts +9 -3
- package/src/reanimated2/commonTypes.ts +0 -1
- package/src/reanimated2/component/FlatList.tsx +1 -1
- package/src/reanimated2/core.ts +0 -47
- package/src/reanimated2/globals.d.ts +1 -2
- package/src/reanimated2/hook/useAnimatedSensor.ts +1 -3
- package/src/reanimated2/interpolateColor.ts +11 -11
- package/src/reanimated2/jestUtils.ts +11 -0
- package/src/reanimated2/js-reanimated/index.ts +3 -3
- package/android/expo/linking.gradle +0 -46
- package/android/expo/src/main/java/com/swmansion/reanimated/EXReanimatedAdapter.java +0 -12
- package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java +0 -26
- package/expo-module.config.json +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatedStyle, StyleProps
|
|
1
|
+
import { AnimatedStyle, StyleProps } from './commonTypes';
|
|
2
2
|
import { ReanimatedConsole } from './core';
|
|
3
3
|
import { MeasuredDimensions } from './NativeMethods';
|
|
4
4
|
import { NativeReanimated } from './NativeReanimated/NativeReanimated';
|
|
@@ -32,7 +32,6 @@ declare global {
|
|
|
32
32
|
};
|
|
33
33
|
namespace NodeJS {
|
|
34
34
|
interface Global {
|
|
35
|
-
__reanimatedWorkletInit: (worklet: WorkletFunction) => void;
|
|
36
35
|
_setGlobalConsole: (console?: ReanimatedConsole) => void;
|
|
37
36
|
_log: (s: string) => void;
|
|
38
37
|
_setGestureState: () => void;
|
|
@@ -58,13 +58,13 @@ const getInterpolateRGB = (
|
|
|
58
58
|
const a = [];
|
|
59
59
|
for (let i = 0; i < colors.length; ++i) {
|
|
60
60
|
const color = colors[i];
|
|
61
|
-
const
|
|
61
|
+
const processedColor = processColor(color);
|
|
62
62
|
// explicit check in case if processedColor is 0
|
|
63
|
-
if (
|
|
64
|
-
r.push(red(
|
|
65
|
-
g.push(green(
|
|
66
|
-
b.push(blue(
|
|
67
|
-
a.push(opacity(
|
|
63
|
+
if (processedColor !== null && processedColor !== undefined) {
|
|
64
|
+
r.push(red(processedColor));
|
|
65
|
+
g.push(green(processedColor));
|
|
66
|
+
b.push(blue(processedColor));
|
|
67
|
+
a.push(opacity(processedColor));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return { r, g, b, a };
|
|
@@ -85,11 +85,11 @@ const getInterpolateHSV = (
|
|
|
85
85
|
const v = [];
|
|
86
86
|
for (let i = 0; i < colors.length; ++i) {
|
|
87
87
|
const color = colors[i];
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
h.push(
|
|
91
|
-
s.push(
|
|
92
|
-
v.push(
|
|
88
|
+
const processedColor = RGBtoHSV(processColor(color) as any);
|
|
89
|
+
if (processedColor) {
|
|
90
|
+
h.push(processedColor.h);
|
|
91
|
+
s.push(processedColor.s);
|
|
92
|
+
v.push(processedColor.v);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
return { h, s, v };
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import { jestResetJsReanimatedModule } from './core';
|
|
4
4
|
|
|
5
|
+
declare global {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
7
|
+
namespace jest {
|
|
8
|
+
interface Matchers<R> {
|
|
9
|
+
toHaveAnimatedStyle(
|
|
10
|
+
style: Record<string, unknown>[] | Record<string, unknown>
|
|
11
|
+
): R;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
let config = {
|
|
6
17
|
fps: 60,
|
|
7
18
|
};
|
|
@@ -20,7 +20,7 @@ if (shouldBeUseWeb()) {
|
|
|
20
20
|
};
|
|
21
21
|
global._measure = () => {
|
|
22
22
|
console.warn(
|
|
23
|
-
"[Reanimated] You can't use
|
|
23
|
+
"[Reanimated] You can't use `measure` with Chrome Debugger or with web version"
|
|
24
24
|
);
|
|
25
25
|
return {
|
|
26
26
|
x: 0,
|
|
@@ -33,12 +33,12 @@ if (shouldBeUseWeb()) {
|
|
|
33
33
|
};
|
|
34
34
|
global._scrollTo = () => {
|
|
35
35
|
console.warn(
|
|
36
|
-
"[Reanimated] You can't use
|
|
36
|
+
"[Reanimated] You can't use `scrollTo` with Chrome Debugger or with web version"
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
39
|
global._setGestureState = () => {
|
|
40
40
|
console.warn(
|
|
41
|
-
"[Reanimated] You can't use
|
|
41
|
+
"[Reanimated] You can't use `setGestureState` with Chrome Debugger or with web version"
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
def isExpoLinked = false
|
|
2
|
-
rootProject.getSubprojects().forEach({ project ->
|
|
3
|
-
if (project.plugins.hasPlugin("com.android.application")) {
|
|
4
|
-
if (project.configurations.implementation.getDependencies().find { dep -> dep.name == "expo" }) {
|
|
5
|
-
isExpoLinked = true
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
def safeExtGet(prop, fallback) {
|
|
11
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (isExpoLinked) {
|
|
15
|
-
apply plugin: 'com.android.library'
|
|
16
|
-
|
|
17
|
-
android {
|
|
18
|
-
// Disable aar bundling to fix the error when running `gradle assembleRelease` over `gradle :app:assembleRelease`
|
|
19
|
-
// which will throw `Direct local .aar file dependencies are not supported when building an AAR.`
|
|
20
|
-
tasks.whenTaskAdded { task ->
|
|
21
|
-
if (['bundleDebugAar', 'bundleReleaseAar'].contains(task.name)) {
|
|
22
|
-
task.enabled = false
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
compileSdkVersion safeExtGet('compileSdkVersion', 30)
|
|
27
|
-
|
|
28
|
-
sourceSets {
|
|
29
|
-
main.manifest.srcFile 'src/AndroidManifest.xml'
|
|
30
|
-
main.java.srcDirs = [ 'expo/src/main/java' ]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
libraryVariants.all {
|
|
34
|
-
generateBuildConfigProvider?.get()?.enabled = false
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
dependencies {
|
|
39
|
-
implementation 'com.facebook.react:react-native:+'
|
|
40
|
-
implementation project(':expo-modules-core')
|
|
41
|
-
|
|
42
|
-
project.configurations.default.artifacts.each { artifact ->
|
|
43
|
-
api files(artifact.file)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
package com.swmansion.reanimated;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.bridge.JavaScriptContextHolder;
|
|
4
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
5
|
-
|
|
6
|
-
public class EXReanimatedAdapter {
|
|
7
|
-
public static void registerJSIModules(ReactApplicationContext reactApplicationContext, JavaScriptContextHolder jsContext) {
|
|
8
|
-
NodesManager nodesManager =
|
|
9
|
-
reactApplicationContext.getNativeModule(ReanimatedModule.class).getNodesManager();
|
|
10
|
-
nodesManager.initWithContext(reactApplicationContext);
|
|
11
|
-
}
|
|
12
|
-
}
|
package/android/expo/src/main/java/expo/modules/adapters/reanimated/EXReanimatedPackage.java
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
package expo.modules.adapters.reanimated;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.bridge.JavaScriptContextHolder;
|
|
6
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
-
import com.swmansion.reanimated.EXReanimatedAdapter;
|
|
8
|
-
|
|
9
|
-
import java.util.Collections;
|
|
10
|
-
import java.util.List;
|
|
11
|
-
|
|
12
|
-
import expo.modules.core.interfaces.Package;
|
|
13
|
-
import expo.modules.core.interfaces.ReactNativeHostHandler;
|
|
14
|
-
|
|
15
|
-
public class EXReanimatedPackage implements Package {
|
|
16
|
-
@Override
|
|
17
|
-
public List<? extends ReactNativeHostHandler> createReactNativeHostHandlers(Context context) {
|
|
18
|
-
final ReactNativeHostHandler handler = new ReactNativeHostHandler() {
|
|
19
|
-
@Override
|
|
20
|
-
public void onRegisterJSIModules(ReactApplicationContext reactApplicationContext, JavaScriptContextHolder jsContext, boolean useDeveloperSupport) {
|
|
21
|
-
EXReanimatedAdapter.registerJSIModules(reactApplicationContext, jsContext);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return Collections.singletonList(handler);
|
|
25
|
-
}
|
|
26
|
-
}
|
package/expo-module.config.json
DELETED