react-native-reanimated 2.13.0 → 2.14.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/Tools/ReanimatedVersion.cpp +17 -0
- package/Common/cpp/Tools/ReanimatedVersion.h +11 -0
- package/RNReanimated.podspec +2 -1
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5.1/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/file-system.probe +0 -0
- package/android/CMakeLists.txt +191 -188
- package/android/build.gradle +386 -316
- 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/react-native-reanimated-69-hermes.aar +0 -0
- package/android/react-native-reanimated-69-jsc.aar +0 -0
- package/android/react-native-reanimated-70-hermes.aar +0 -0
- package/android/react-native-reanimated-70-jsc.aar +0 -0
- package/android/react-native-reanimated-71-hermes.aar +0 -0
- package/android/react-native-reanimated-71-jsc.aar +0 -0
- package/android/src/main/cpp/NativeProxy.cpp +8 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +5 -4
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorContainer.java +1 -1
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/70/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +16 -0
- package/android/src/{main/java → reactNativeVersionPatch/ReanimatedUIManager/70}/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +0 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/ReanimatedUIManagerFactory.java +63 -0
- package/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +271 -0
- package/android/src/reactNativeVersionPatch/nativeHierarchyManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +3 -30
- package/ios/REAModule.mm +2 -0
- package/ios/native/REAInitializer.mm +4 -0
- package/lib/createAnimatedComponent.js +5 -0
- package/lib/reanimated2/Colors.js +27 -11
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +4 -0
- package/lib/reanimated2/animation/util.js +15 -15
- package/lib/reanimated2/globals.d.ts +2 -0
- package/lib/reanimated2/interpolateColor.js +79 -20
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +16 -18
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +8 -10
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +15 -10
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +8 -10
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +24 -18
- package/lib/reanimated2/platform-specific/checkVersion.js +24 -0
- package/lib/reanimated2/platform-specific/checkVersion.web.js +6 -0
- package/lib/types/{Animated.d.ts → lib/Animated.d.ts} +0 -0
- package/lib/types/{ConfigHelper.d.ts → lib/ConfigHelper.d.ts} +0 -0
- package/lib/types/{ReanimatedEventEmitter.d.ts → lib/ReanimatedEventEmitter.d.ts} +0 -0
- package/lib/types/{ReanimatedModule.d.ts → lib/ReanimatedModule.d.ts} +0 -0
- package/lib/types/{ReanimatedModule.macos.d.ts → lib/ReanimatedModule.macos.d.ts} +0 -0
- package/lib/types/{ReanimatedModule.native.d.ts → lib/ReanimatedModule.native.d.ts} +0 -0
- package/lib/types/{ReanimatedModule.windows.d.ts → lib/ReanimatedModule.windows.d.ts} +0 -0
- package/lib/types/{ReanimatedModuleCompat.d.ts → lib/ReanimatedModuleCompat.d.ts} +0 -0
- package/lib/types/{createAnimatedComponent.d.ts → lib/createAnimatedComponent.d.ts} +0 -0
- package/lib/types/{index.d.ts → lib/index.d.ts} +0 -0
- package/lib/types/{index.web.d.ts → lib/index.web.d.ts} +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/Bezier.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/Colors.d.ts +5 -3
- package/lib/types/{reanimated2 → lib/reanimated2}/Easing.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/NativeMethods.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/NativeReanimated/NativeReanimated.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/NativeReanimated/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/PlatformChecker.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/PropAdapters.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/UpdateProps.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/ViewDescriptorsSet.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/WorkletEventHandler.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/__mocks__/MutableValue.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/__mocks__/NativeReanimated.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/commonTypes.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/decay.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/delay.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/repeat.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/sequence.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/spring.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/styleAnimation.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/timing.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/animation/util.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/commonTypes.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/component/FlatList.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/component/Image.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/component/ScrollView.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/component/Text.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/component/View.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/core.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/frameCallback/FrameCallbackRegistryJS.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/frameCallback/FrameCallbackRegistryUI.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/Hooks.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/commonTypes.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedGestureHandler.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedKeyboard.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedReaction.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedRef.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedScrollHandler.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedSensor.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useAnimatedStyle.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useDerivedValue.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useFrameCallback.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useScrollViewOffset.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/useSharedValue.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/hook/utils.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/interpolateColor.d.ts +8 -2
- package/lib/types/{reanimated2 → lib/reanimated2}/interpolation.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/jestUtils.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/JSReanimated.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/Mapper.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/MapperRegistry.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/MutableValue.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/commonTypes.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/global.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/js-reanimated/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/LayoutAnimationRepository.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/animationBuilder/commonTypes.d.ts +4 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/animationBuilder/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Default.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Fade.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Flip.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Roll.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Slide.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultAnimations/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/defaultTransitions/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/layoutReanimation/index.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/mock.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/platform-specific/RNRenderer.d.ts +0 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/lib/reanimated2/platform-specific/checkVersion.d.ts +4 -0
- package/lib/types/lib/reanimated2/platform-specific/checkVersion.web.d.ts +5 -0
- package/lib/types/{reanimated2 → lib/reanimated2}/utils.d.ts +0 -0
- package/lib/types/{setAndForwardRef.d.ts → lib/setAndForwardRef.d.ts} +0 -0
- package/package.json +6 -6
- package/plugin.js +7 -3
- package/react-native-reanimated.d.ts +11 -2
- package/scripts/reanimated_utils.rb +7 -3
- package/src/createAnimatedComponent.tsx +7 -0
- package/src/reanimated2/Colors.ts +38 -11
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +4 -0
- package/src/reanimated2/animation/util.ts +26 -15
- package/src/reanimated2/globals.d.ts +2 -0
- package/src/reanimated2/interpolateColor.ts +105 -21
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +4 -0
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +16 -19
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +14 -11
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +21 -11
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +32 -11
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +36 -19
- package/src/reanimated2/platform-specific/checkVersion.ts +28 -0
- package/src/reanimated2/platform-specific/checkVersion.web.ts +6 -0
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Dimensions } from 'react-native';
|
|
2
1
|
import { withSequence, withTiming } from '../../animation';
|
|
3
2
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
4
3
|
import {
|
|
@@ -6,8 +5,6 @@ import {
|
|
|
6
5
|
IEntryExitAnimationBuilder,
|
|
7
6
|
} from '../animationBuilder/commonTypes';
|
|
8
7
|
|
|
9
|
-
const { width } = Dimensions.get('window');
|
|
10
|
-
|
|
11
8
|
export class LightSpeedInRight
|
|
12
9
|
extends ComplexAnimationBuilder
|
|
13
10
|
implements IEntryExitAnimationBuilder
|
|
@@ -24,7 +21,7 @@ export class LightSpeedInRight
|
|
|
24
21
|
const callback = this.callbackV;
|
|
25
22
|
const initialValues = this.initialValues;
|
|
26
23
|
|
|
27
|
-
return () => {
|
|
24
|
+
return (values) => {
|
|
28
25
|
'worklet';
|
|
29
26
|
return {
|
|
30
27
|
animations: {
|
|
@@ -50,7 +47,7 @@ export class LightSpeedInRight
|
|
|
50
47
|
},
|
|
51
48
|
initialValues: {
|
|
52
49
|
opacity: 0,
|
|
53
|
-
transform: [{ translateX:
|
|
50
|
+
transform: [{ translateX: values.windowWidth }, { skewX: '-45deg' }],
|
|
54
51
|
...initialValues,
|
|
55
52
|
},
|
|
56
53
|
callback: callback,
|
|
@@ -75,7 +72,7 @@ export class LightSpeedInLeft
|
|
|
75
72
|
const callback = this.callbackV;
|
|
76
73
|
const initialValues = this.initialValues;
|
|
77
74
|
|
|
78
|
-
return () => {
|
|
75
|
+
return (values) => {
|
|
79
76
|
'worklet';
|
|
80
77
|
return {
|
|
81
78
|
animations: {
|
|
@@ -101,7 +98,7 @@ export class LightSpeedInLeft
|
|
|
101
98
|
},
|
|
102
99
|
initialValues: {
|
|
103
100
|
opacity: 0,
|
|
104
|
-
transform: [{ translateX: -
|
|
101
|
+
transform: [{ translateX: -values.windowWidth }, { skewX: '45deg' }],
|
|
105
102
|
...initialValues,
|
|
106
103
|
},
|
|
107
104
|
callback: callback,
|
|
@@ -125,14 +122,17 @@ export class LightSpeedOutRight
|
|
|
125
122
|
const callback = this.callbackV;
|
|
126
123
|
const initialValues = this.initialValues;
|
|
127
124
|
|
|
128
|
-
return () => {
|
|
125
|
+
return (values) => {
|
|
129
126
|
'worklet';
|
|
130
127
|
return {
|
|
131
128
|
animations: {
|
|
132
129
|
opacity: delayFunction(delay, animation(0, config)),
|
|
133
130
|
transform: [
|
|
134
131
|
{
|
|
135
|
-
translateX: delayFunction(
|
|
132
|
+
translateX: delayFunction(
|
|
133
|
+
delay,
|
|
134
|
+
animation(values.windowWidth, config)
|
|
135
|
+
),
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
skewX: delayFunction(delay, animation('-45deg', config)),
|
|
@@ -165,14 +165,17 @@ export class LightSpeedOutLeft
|
|
|
165
165
|
const callback = this.callbackV;
|
|
166
166
|
const initialValues = this.initialValues;
|
|
167
167
|
|
|
168
|
-
return () => {
|
|
168
|
+
return (values) => {
|
|
169
169
|
'worklet';
|
|
170
170
|
return {
|
|
171
171
|
animations: {
|
|
172
172
|
opacity: delayFunction(delay, animation(0, config)),
|
|
173
173
|
transform: [
|
|
174
174
|
{
|
|
175
|
-
translateX: delayFunction(
|
|
175
|
+
translateX: delayFunction(
|
|
176
|
+
delay,
|
|
177
|
+
animation(-values.windowWidth, config)
|
|
178
|
+
),
|
|
176
179
|
},
|
|
177
180
|
{
|
|
178
181
|
skewX: delayFunction(delay, animation('45deg', config)),
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { Dimensions } from 'react-native';
|
|
2
1
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
3
2
|
import {
|
|
4
3
|
EntryExitAnimationFunction,
|
|
5
4
|
IEntryExitAnimationBuilder,
|
|
6
5
|
} from '../animationBuilder/commonTypes';
|
|
7
6
|
|
|
8
|
-
const { width } = Dimensions.get('window');
|
|
9
|
-
|
|
10
7
|
export class RollInLeft
|
|
11
8
|
extends ComplexAnimationBuilder
|
|
12
9
|
implements IEntryExitAnimationBuilder
|
|
@@ -22,7 +19,7 @@ export class RollInLeft
|
|
|
22
19
|
const callback = this.callbackV;
|
|
23
20
|
const initialValues = this.initialValues;
|
|
24
21
|
|
|
25
|
-
return () => {
|
|
22
|
+
return (values) => {
|
|
26
23
|
'worklet';
|
|
27
24
|
return {
|
|
28
25
|
animations: {
|
|
@@ -32,7 +29,10 @@ export class RollInLeft
|
|
|
32
29
|
],
|
|
33
30
|
},
|
|
34
31
|
initialValues: {
|
|
35
|
-
transform: [
|
|
32
|
+
transform: [
|
|
33
|
+
{ translateX: -values.windowWidth },
|
|
34
|
+
{ rotate: '-180deg' },
|
|
35
|
+
],
|
|
36
36
|
...initialValues,
|
|
37
37
|
},
|
|
38
38
|
callback: callback,
|
|
@@ -56,7 +56,7 @@ export class RollInRight
|
|
|
56
56
|
const callback = this.callbackV;
|
|
57
57
|
const initialValues = this.initialValues;
|
|
58
58
|
|
|
59
|
-
return () => {
|
|
59
|
+
return (values) => {
|
|
60
60
|
'worklet';
|
|
61
61
|
return {
|
|
62
62
|
animations: {
|
|
@@ -66,7 +66,7 @@ export class RollInRight
|
|
|
66
66
|
],
|
|
67
67
|
},
|
|
68
68
|
initialValues: {
|
|
69
|
-
transform: [{ translateX:
|
|
69
|
+
transform: [{ translateX: values.windowWidth }, { rotate: '180deg' }],
|
|
70
70
|
...initialValues,
|
|
71
71
|
},
|
|
72
72
|
callback: callback,
|
|
@@ -90,12 +90,17 @@ export class RollOutLeft
|
|
|
90
90
|
const callback = this.callbackV;
|
|
91
91
|
const initialValues = this.initialValues;
|
|
92
92
|
|
|
93
|
-
return () => {
|
|
93
|
+
return (values) => {
|
|
94
94
|
'worklet';
|
|
95
95
|
return {
|
|
96
96
|
animations: {
|
|
97
97
|
transform: [
|
|
98
|
-
{
|
|
98
|
+
{
|
|
99
|
+
translateX: delayFunction(
|
|
100
|
+
delay,
|
|
101
|
+
animation(-values.windowWidth, config)
|
|
102
|
+
),
|
|
103
|
+
},
|
|
99
104
|
{ rotate: delayFunction(delay, animation('-180deg', config)) },
|
|
100
105
|
],
|
|
101
106
|
},
|
|
@@ -124,12 +129,17 @@ export class RollOutRight
|
|
|
124
129
|
const callback = this.callbackV;
|
|
125
130
|
const initialValues = this.initialValues;
|
|
126
131
|
|
|
127
|
-
return () => {
|
|
132
|
+
return (values) => {
|
|
128
133
|
'worklet';
|
|
129
134
|
return {
|
|
130
135
|
animations: {
|
|
131
136
|
transform: [
|
|
132
|
-
{
|
|
137
|
+
{
|
|
138
|
+
translateX: delayFunction(
|
|
139
|
+
delay,
|
|
140
|
+
animation(values.windowWidth, config)
|
|
141
|
+
),
|
|
142
|
+
},
|
|
133
143
|
{ rotate: delayFunction(delay, animation('180deg', config)) },
|
|
134
144
|
],
|
|
135
145
|
},
|
|
@@ -5,11 +5,8 @@ import {
|
|
|
5
5
|
IEntryAnimationBuilder,
|
|
6
6
|
IExitAnimationBuilder,
|
|
7
7
|
} from '../animationBuilder/commonTypes';
|
|
8
|
-
import { Dimensions } from 'react-native';
|
|
9
8
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
10
9
|
|
|
11
|
-
const { width, height } = Dimensions.get('window');
|
|
12
|
-
|
|
13
10
|
export class SlideInRight
|
|
14
11
|
extends ComplexAnimationBuilder
|
|
15
12
|
implements IEntryAnimationBuilder
|
|
@@ -35,7 +32,7 @@ export class SlideInRight
|
|
|
35
32
|
),
|
|
36
33
|
},
|
|
37
34
|
initialValues: {
|
|
38
|
-
originX: values.targetOriginX +
|
|
35
|
+
originX: values.targetOriginX + values.windowWidth,
|
|
39
36
|
...initialValues,
|
|
40
37
|
},
|
|
41
38
|
callback: callback,
|
|
@@ -69,7 +66,7 @@ export class SlideInLeft
|
|
|
69
66
|
),
|
|
70
67
|
},
|
|
71
68
|
initialValues: {
|
|
72
|
-
originX: values.targetOriginX -
|
|
69
|
+
originX: values.targetOriginX - values.windowWidth,
|
|
73
70
|
...initialValues,
|
|
74
71
|
},
|
|
75
72
|
callback: callback,
|
|
@@ -99,7 +96,13 @@ export class SlideOutRight
|
|
|
99
96
|
animations: {
|
|
100
97
|
originX: delayFunction(
|
|
101
98
|
delay,
|
|
102
|
-
animation(
|
|
99
|
+
animation(
|
|
100
|
+
Math.max(
|
|
101
|
+
values.currentOriginX + values.windowWidth,
|
|
102
|
+
values.windowWidth
|
|
103
|
+
),
|
|
104
|
+
config
|
|
105
|
+
)
|
|
103
106
|
),
|
|
104
107
|
},
|
|
105
108
|
initialValues: {
|
|
@@ -133,7 +136,13 @@ export class SlideOutLeft
|
|
|
133
136
|
animations: {
|
|
134
137
|
originX: delayFunction(
|
|
135
138
|
delay,
|
|
136
|
-
animation(
|
|
139
|
+
animation(
|
|
140
|
+
Math.min(
|
|
141
|
+
values.currentOriginX - values.windowWidth,
|
|
142
|
+
-values.windowWidth
|
|
143
|
+
),
|
|
144
|
+
config
|
|
145
|
+
)
|
|
137
146
|
),
|
|
138
147
|
},
|
|
139
148
|
initialValues: {
|
|
@@ -171,7 +180,7 @@ export class SlideInUp
|
|
|
171
180
|
),
|
|
172
181
|
},
|
|
173
182
|
initialValues: {
|
|
174
|
-
originY: -
|
|
183
|
+
originY: -values.windowHeight,
|
|
175
184
|
...initialValues,
|
|
176
185
|
},
|
|
177
186
|
callback: callback,
|
|
@@ -205,7 +214,7 @@ export class SlideInDown
|
|
|
205
214
|
),
|
|
206
215
|
},
|
|
207
216
|
initialValues: {
|
|
208
|
-
originY: values.targetOriginY +
|
|
217
|
+
originY: values.targetOriginY + values.windowHeight,
|
|
209
218
|
...initialValues,
|
|
210
219
|
},
|
|
211
220
|
callback: callback,
|
|
@@ -235,7 +244,13 @@ export class SlideOutUp
|
|
|
235
244
|
animations: {
|
|
236
245
|
originY: delayFunction(
|
|
237
246
|
delay,
|
|
238
|
-
animation(
|
|
247
|
+
animation(
|
|
248
|
+
Math.min(
|
|
249
|
+
values.currentOriginY - values.windowHeight,
|
|
250
|
+
-values.windowHeight
|
|
251
|
+
),
|
|
252
|
+
config
|
|
253
|
+
)
|
|
239
254
|
),
|
|
240
255
|
},
|
|
241
256
|
initialValues: { originY: values.currentOriginY, ...initialValues },
|
|
@@ -266,7 +281,13 @@ export class SlideOutDown
|
|
|
266
281
|
animations: {
|
|
267
282
|
originY: delayFunction(
|
|
268
283
|
delay,
|
|
269
|
-
animation(
|
|
284
|
+
animation(
|
|
285
|
+
Math.max(
|
|
286
|
+
values.currentOriginY + values.windowHeight,
|
|
287
|
+
values.windowHeight
|
|
288
|
+
),
|
|
289
|
+
config
|
|
290
|
+
)
|
|
270
291
|
),
|
|
271
292
|
},
|
|
272
293
|
initialValues: { originY: values.currentOriginY, ...initialValues },
|
|
@@ -7,11 +7,8 @@ import {
|
|
|
7
7
|
IEntryAnimationBuilder,
|
|
8
8
|
IExitAnimationBuilder,
|
|
9
9
|
} from '../animationBuilder/commonTypes';
|
|
10
|
-
import { Dimensions } from 'react-native';
|
|
11
10
|
import { ComplexAnimationBuilder } from '../animationBuilder';
|
|
12
11
|
|
|
13
|
-
const { width, height } = Dimensions.get('window');
|
|
14
|
-
|
|
15
12
|
export class ZoomIn
|
|
16
13
|
extends ComplexAnimationBuilder
|
|
17
14
|
implements IEntryExitAnimationBuilder
|
|
@@ -93,7 +90,7 @@ export class ZoomInLeft
|
|
|
93
90
|
const callback = this.callbackV;
|
|
94
91
|
const initialValues = this.initialValues;
|
|
95
92
|
|
|
96
|
-
return () => {
|
|
93
|
+
return (values) => {
|
|
97
94
|
'worklet';
|
|
98
95
|
return {
|
|
99
96
|
animations: {
|
|
@@ -103,7 +100,7 @@ export class ZoomInLeft
|
|
|
103
100
|
],
|
|
104
101
|
},
|
|
105
102
|
initialValues: {
|
|
106
|
-
transform: [{ translateX: -
|
|
103
|
+
transform: [{ translateX: -values.windowWidth }, { scale: 0 }],
|
|
107
104
|
...initialValues,
|
|
108
105
|
},
|
|
109
106
|
callback: callback,
|
|
@@ -127,7 +124,7 @@ export class ZoomInRight
|
|
|
127
124
|
const callback = this.callbackV;
|
|
128
125
|
const initialValues = this.initialValues;
|
|
129
126
|
|
|
130
|
-
return () => {
|
|
127
|
+
return (values) => {
|
|
131
128
|
'worklet';
|
|
132
129
|
return {
|
|
133
130
|
animations: {
|
|
@@ -137,7 +134,7 @@ export class ZoomInRight
|
|
|
137
134
|
],
|
|
138
135
|
},
|
|
139
136
|
initialValues: {
|
|
140
|
-
transform: [{ translateX:
|
|
137
|
+
transform: [{ translateX: values.windowWidth }, { scale: 0 }],
|
|
141
138
|
...initialValues,
|
|
142
139
|
},
|
|
143
140
|
callback: callback,
|
|
@@ -161,7 +158,7 @@ export class ZoomInUp
|
|
|
161
158
|
const callback = this.callbackV;
|
|
162
159
|
const initialValues = this.initialValues;
|
|
163
160
|
|
|
164
|
-
return () => {
|
|
161
|
+
return (values) => {
|
|
165
162
|
'worklet';
|
|
166
163
|
return {
|
|
167
164
|
animations: {
|
|
@@ -171,7 +168,7 @@ export class ZoomInUp
|
|
|
171
168
|
],
|
|
172
169
|
},
|
|
173
170
|
initialValues: {
|
|
174
|
-
transform: [{ translateY: -
|
|
171
|
+
transform: [{ translateY: -values.windowHeight }, { scale: 0 }],
|
|
175
172
|
...initialValues,
|
|
176
173
|
},
|
|
177
174
|
callback: callback,
|
|
@@ -195,7 +192,7 @@ export class ZoomInDown
|
|
|
195
192
|
const callback = this.callbackV;
|
|
196
193
|
const initialValues = this.initialValues;
|
|
197
194
|
|
|
198
|
-
return () => {
|
|
195
|
+
return (values) => {
|
|
199
196
|
'worklet';
|
|
200
197
|
return {
|
|
201
198
|
animations: {
|
|
@@ -205,7 +202,7 @@ export class ZoomInDown
|
|
|
205
202
|
],
|
|
206
203
|
},
|
|
207
204
|
initialValues: {
|
|
208
|
-
transform: [{ translateY:
|
|
205
|
+
transform: [{ translateY: values.windowHeight }, { scale: 0 }],
|
|
209
206
|
...initialValues,
|
|
210
207
|
},
|
|
211
208
|
callback: callback,
|
|
@@ -363,12 +360,17 @@ export class ZoomOutLeft
|
|
|
363
360
|
const callback = this.callbackV;
|
|
364
361
|
const initialValues = this.initialValues;
|
|
365
362
|
|
|
366
|
-
return () => {
|
|
363
|
+
return (values) => {
|
|
367
364
|
'worklet';
|
|
368
365
|
return {
|
|
369
366
|
animations: {
|
|
370
367
|
transform: [
|
|
371
|
-
{
|
|
368
|
+
{
|
|
369
|
+
translateX: delayFunction(
|
|
370
|
+
delay,
|
|
371
|
+
animation(-values.windowWidth, config)
|
|
372
|
+
),
|
|
373
|
+
},
|
|
372
374
|
{ scale: delayFunction(delay, animation(0, config)) },
|
|
373
375
|
],
|
|
374
376
|
},
|
|
@@ -397,12 +399,17 @@ export class ZoomOutRight
|
|
|
397
399
|
const callback = this.callbackV;
|
|
398
400
|
const initialValues = this.initialValues;
|
|
399
401
|
|
|
400
|
-
return () => {
|
|
402
|
+
return (values) => {
|
|
401
403
|
'worklet';
|
|
402
404
|
return {
|
|
403
405
|
animations: {
|
|
404
406
|
transform: [
|
|
405
|
-
{
|
|
407
|
+
{
|
|
408
|
+
translateX: delayFunction(
|
|
409
|
+
delay,
|
|
410
|
+
animation(values.windowWidth, config)
|
|
411
|
+
),
|
|
412
|
+
},
|
|
406
413
|
{ scale: delayFunction(delay, animation(0, config)) },
|
|
407
414
|
],
|
|
408
415
|
},
|
|
@@ -431,12 +438,17 @@ export class ZoomOutUp
|
|
|
431
438
|
const callback = this.callbackV;
|
|
432
439
|
const initialValues = this.initialValues;
|
|
433
440
|
|
|
434
|
-
return () => {
|
|
441
|
+
return (values) => {
|
|
435
442
|
'worklet';
|
|
436
443
|
return {
|
|
437
444
|
animations: {
|
|
438
445
|
transform: [
|
|
439
|
-
{
|
|
446
|
+
{
|
|
447
|
+
translateY: delayFunction(
|
|
448
|
+
delay,
|
|
449
|
+
animation(-values.windowHeight, config)
|
|
450
|
+
),
|
|
451
|
+
},
|
|
440
452
|
{ scale: delayFunction(delay, animation(0, config)) },
|
|
441
453
|
],
|
|
442
454
|
},
|
|
@@ -465,12 +477,17 @@ export class ZoomOutDown
|
|
|
465
477
|
const callback = this.callbackV;
|
|
466
478
|
const initialValues = this.initialValues;
|
|
467
479
|
|
|
468
|
-
return () => {
|
|
480
|
+
return (values) => {
|
|
469
481
|
'worklet';
|
|
470
482
|
return {
|
|
471
483
|
animations: {
|
|
472
484
|
transform: [
|
|
473
|
-
{
|
|
485
|
+
{
|
|
486
|
+
translateY: delayFunction(
|
|
487
|
+
delay,
|
|
488
|
+
animation(values.windowHeight, config)
|
|
489
|
+
),
|
|
490
|
+
},
|
|
474
491
|
{ scale: delayFunction(delay, animation(0, config)) },
|
|
475
492
|
],
|
|
476
493
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { version as jsVersion } from '../../../package.json';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Checks that native and js versions of reanimated match.
|
|
5
|
+
*/
|
|
6
|
+
export function checkVersion(): void {
|
|
7
|
+
const cppVersion = global._REANIMATED_VERSION_CPP;
|
|
8
|
+
const ok = (() => {
|
|
9
|
+
if (
|
|
10
|
+
jsVersion.match(/^\d+\.\d+\.\d+$/) &&
|
|
11
|
+
cppVersion.match(/^\d+\.\d+\.\d+$/)
|
|
12
|
+
) {
|
|
13
|
+
// x.y.z, compare only major and minor, skip patch
|
|
14
|
+
const [jsMajor, jsMinor] = jsVersion.split('.');
|
|
15
|
+
const [cppMajor, cppMinor] = cppVersion.split('.');
|
|
16
|
+
return jsMajor === cppMajor && jsMinor === cppMinor;
|
|
17
|
+
} else {
|
|
18
|
+
// alpha, beta or rc, compare everything
|
|
19
|
+
return jsVersion === cppVersion;
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
if (!ok) {
|
|
23
|
+
console.error(
|
|
24
|
+
`[Reanimated] Mismatch between JavaScript part and native part of Reanimated (${jsVersion} vs. ${cppVersion}). Did you forget to re-build the app after upgrading react-native-reanimated? If you use Expo Go, you must downgrade to ${cppVersion} which is bundled into Expo SDK.`
|
|
25
|
+
);
|
|
26
|
+
// TODO: detect Expo managed workflow
|
|
27
|
+
}
|
|
28
|
+
}
|
|
Binary file
|
|
Binary file
|