react-native-reanimated 2.3.3 → 2.5.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/AnimatedSensor/AnimatedSensorModule.cpp +72 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +30 -1
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +64 -39
- package/Common/cpp/Tools/RuntimeDecorator.cpp +2 -0
- package/Common/cpp/headers/AnimatedSensor/AnimatedSensorModule.h +41 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +14 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +14 -0
- package/Common/cpp/headers/SharedItems/MutableValue.h +4 -1
- package/Common/cpp/headers/SharedItems/ShareableValue.h +3 -0
- package/Common/cpp/headers/SharedItems/ValueWrapper.h +3 -0
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +11 -0
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +2 -0
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +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/fileChanges/last-build.bin +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/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- 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/.gradle/vcs-1/gc.properties +0 -0
- package/android/CMakeLists.txt +198 -0
- package/android/README.md +15 -0
- package/android/build.gradle +686 -73
- package/android/empty.cpp +1 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +25 -0
- package/android/gradlew +234 -0
- package/android/gradlew.bat +89 -0
- package/android/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/rnVersionPatch/62/layoutReanimation/ReanimatedNativeHierarchyManager.java +412 -0
- package/android/rnVersionPatch/62/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/63/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/64/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/rnVersionPatch/65/.gitkeep +0 -0
- package/android/rnVersionPatch/66/.gitkeep +0 -0
- package/android/rnVersionPatch/67/.gitkeep +0 -0
- package/android/rnVersionPatch/68/.gitkeep +0 -0
- package/android/rnVersionPatch/backup/.gitkeep +0 -0
- package/android/settings.gradle +1 -0
- package/android/spotless.gradle +9 -0
- package/android/src/{AndroidManifest.xml → main/AndroidManifest.xml} +0 -0
- package/android/src/main/cpp/AndroidErrorHandler.cpp +42 -0
- package/android/src/main/cpp/AndroidLogger.cpp +27 -0
- package/android/src/main/cpp/AndroidScheduler.cpp +59 -0
- package/android/src/main/cpp/JNIHelper.cpp +59 -0
- package/android/src/main/cpp/LayoutAnimations.cpp +103 -0
- package/android/src/main/cpp/NativeProxy.cpp +327 -0
- package/android/src/main/cpp/OnLoad.cpp +17 -0
- package/android/src/main/cpp/TurboModule.cpp +44 -0
- package/android/src/main/cpp/headers/AndroidErrorHandler.h +30 -0
- package/android/src/main/cpp/headers/AndroidLogger.h +16 -0
- package/android/src/main/cpp/headers/AndroidScheduler.h +41 -0
- package/android/src/main/cpp/headers/JNIHelper.h +30 -0
- package/android/src/main/cpp/headers/LayoutAnimations.h +42 -0
- package/android/src/main/cpp/headers/NativeProxy.h +170 -0
- package/android/src/main/cpp/headers/TurboModule.h +70 -0
- package/android/src/main/java/com/facebook/react/uimanager/UIManagerReanimatedHelper.java +15 -0
- package/android/src/main/java/com/swmansion/common/GestureHandlerStateManager.java +5 -0
- package/android/src/main/java/com/swmansion/reanimated/AndroidErrorHandler.java +8 -0
- package/android/src/main/java/com/swmansion/reanimated/CopiedEvent.java +43 -0
- package/android/src/main/java/com/swmansion/reanimated/MapUtils.java +26 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +117 -0
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +285 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +682 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedJSIModulePackage.java +29 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +251 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +96 -0
- package/android/src/main/java/com/swmansion/reanimated/Scheduler.java +51 -0
- package/android/src/main/java/com/swmansion/reanimated/UpdateContext.java +11 -0
- package/android/src/main/java/com/swmansion/reanimated/Utils.java +32 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +517 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +56 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/NativeMethodsHolder.java +11 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +410 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java +68 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +292 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/Snapshot.java +121 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ViewHierarchyObserver.java +12 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/AlwaysNode.java +29 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java +87 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java +24 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/CallFuncNode.java +49 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockNode.java +38 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockOpNode.java +73 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java +36 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java +33 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java +83 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/FinalNode.java +5 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java +20 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/Node.java +139 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/NoopNode.java +37 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java +377 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java +71 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java +153 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java +32 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/TransformNode.java +84 -0
- package/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorContainer.java +40 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +31 -0
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +35 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/ChangeTransition.java +84 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/SaneSidePropagation.java +25 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/Scale.java +86 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionModule.java +41 -0
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionUtils.java +161 -0
- package/ios/LayoutReanimation/REAAnimationsManager.h +1 -1
- package/ios/LayoutReanimation/REAAnimationsManager.m +18 -4
- package/ios/REAModule.m +8 -9
- package/ios/REANodesManager.h +4 -1
- package/ios/REANodesManager.m +75 -3
- package/ios/native/NativeMethods.h +1 -1
- package/ios/native/NativeProxy.mm +85 -5
- package/ios/sensor/ReanimatedSensor.h +21 -0
- package/ios/sensor/ReanimatedSensor.m +169 -0
- package/ios/sensor/ReanimatedSensorContainer.h +13 -0
- package/ios/sensor/ReanimatedSensorContainer.m +41 -0
- package/ios/sensor/ReanimatedSensorType.h +7 -0
- package/lib/ConfigHelper.js +2 -2
- package/lib/createAnimatedComponent.js +3 -4
- package/lib/reanimated1/core/AnimatedFunction.js +1 -1
- package/lib/reanimated1/derived/interpolate.js +2 -4
- package/lib/reanimated2/Colors.js +3 -98
- package/lib/reanimated2/Easing.js +5 -0
- package/lib/reanimated2/NativeMethods.js +15 -5
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +25 -12
- package/lib/reanimated2/NativeReanimated/index.js +2 -6
- package/lib/reanimated2/ViewDescriptorsSet.js +2 -2
- package/lib/reanimated2/animation/styleAnimation.js +2 -1
- package/lib/reanimated2/core.js +30 -24
- package/lib/reanimated2/globals.d.ts +6 -0
- package/lib/reanimated2/hook/index.js +1 -0
- package/lib/reanimated2/hook/useAnimatedGestureHandler.js +1 -2
- package/lib/reanimated2/hook/useAnimatedSensor.js +66 -0
- package/lib/reanimated2/hook/useAnimatedStyle.js +31 -14
- package/lib/reanimated2/hook/utils.js +14 -11
- package/lib/reanimated2/index.js +2 -0
- package/lib/reanimated2/interpolateColor.js +98 -0
- package/lib/reanimated2/interpolation.js +1 -1
- package/lib/reanimated2/jestUtils.js +9 -4
- package/lib/reanimated2/js-reanimated/JSReanimated.js +24 -3
- package/lib/reanimated2/js-reanimated/commonTypes.js +1 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +8 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +2 -1
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +32 -42
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +20 -38
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +32 -44
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +8 -16
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +6 -10
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +8 -12
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +20 -36
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +16 -20
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +8 -12
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +32 -48
- package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +22 -18
- package/lib/reanimated2/mock.js +3 -2
- package/mock.js +6 -4
- package/package.json +44 -36
- package/plugin.js +3 -0
- package/react-native-reanimated.d.ts +102 -15
- package/src/ConfigHelper.ts +4 -4
- package/src/createAnimatedComponent.tsx +3 -3
- package/src/reanimated1/core/AnimatedFunction.js +1 -1
- package/src/reanimated1/derived/interpolate.js +2 -4
- package/src/reanimated2/Colors.ts +8 -151
- package/src/reanimated2/Easing.ts +11 -0
- package/src/reanimated2/NativeMethods.ts +19 -6
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +42 -14
- package/src/reanimated2/NativeReanimated/index.ts +2 -8
- package/src/reanimated2/ViewDescriptorsSet.ts +2 -3
- package/src/reanimated2/animation/commonTypes.ts +44 -40
- package/src/reanimated2/animation/decay.ts +1 -1
- package/src/reanimated2/animation/delay.ts +2 -16
- package/src/reanimated2/animation/index.ts +8 -8
- package/src/reanimated2/animation/repeat.ts +2 -12
- package/src/reanimated2/animation/sequence.ts +3 -10
- package/src/reanimated2/animation/spring.ts +1 -1
- package/src/reanimated2/animation/styleAnimation.ts +11 -25
- package/src/reanimated2/animation/timing.ts +4 -2
- package/src/reanimated2/animation/util.ts +22 -20
- package/src/reanimated2/commonTypes.ts +68 -1
- package/src/reanimated2/component/FlatList.tsx +2 -1
- package/src/reanimated2/core.ts +35 -29
- package/src/reanimated2/globals.d.ts +6 -0
- package/src/reanimated2/hook/commonTypes.ts +5 -0
- package/src/reanimated2/hook/index.ts +1 -0
- package/src/reanimated2/hook/useAnimatedGestureHandler.ts +1 -2
- package/src/reanimated2/hook/useAnimatedRef.ts +1 -5
- package/src/reanimated2/hook/useAnimatedSensor.ts +91 -0
- package/src/reanimated2/hook/useAnimatedStyle.ts +35 -16
- package/src/reanimated2/hook/utils.ts +20 -18
- package/src/reanimated2/index.ts +2 -0
- package/src/reanimated2/interpolateColor.ts +178 -0
- package/src/reanimated2/interpolation.ts +2 -6
- package/src/reanimated2/jestUtils.ts +9 -4
- package/src/reanimated2/js-reanimated/JSReanimated.ts +28 -6
- package/src/reanimated2/js-reanimated/Mapper.ts +1 -1
- package/src/reanimated2/js-reanimated/MapperRegistry.ts +1 -1
- package/src/reanimated2/js-reanimated/commonTypes.ts +51 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +13 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +2 -3
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +51 -21
- package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +40 -10
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +48 -12
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +8 -2
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +32 -8
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +32 -10
- package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +16 -4
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +64 -16
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +32 -21
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +2 -1
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +2 -1
- package/src/reanimated2/mock.ts +3 -2
- package/src/reanimated2/utils.ts +1 -1
- package/android/react-native-reanimated-63-hermes.aar +0 -0
- package/android/react-native-reanimated-63-jsc.aar +0 -0
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedProxyPackage.java +0 -15
- package/libSo/fbjni/jni/arm64-v8a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/armeabi-v7a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86_64/libfbjni.so +0 -0
|
@@ -1,35 +1,18 @@
|
|
|
1
1
|
import { defineAnimation } from './util';
|
|
2
2
|
import {
|
|
3
3
|
Timestamp,
|
|
4
|
-
HigherOrderAnimation,
|
|
5
|
-
AnimationCallback,
|
|
6
4
|
AnimatableValue,
|
|
7
5
|
AnimationObject,
|
|
8
6
|
Animation,
|
|
9
|
-
} from './commonTypes';
|
|
10
|
-
import {
|
|
11
7
|
AnimatedStyle,
|
|
12
8
|
NestedObject,
|
|
13
9
|
NestedObjectValues,
|
|
14
|
-
StyleProps,
|
|
15
10
|
} from '../commonTypes';
|
|
11
|
+
import { StyleLayoutAnimation } from './commonTypes';
|
|
16
12
|
import { withTiming } from './timing';
|
|
17
13
|
import { ColorProperties } from '../UpdateProps';
|
|
18
14
|
import { processColor } from '../Colors';
|
|
19
15
|
|
|
20
|
-
export interface StyleLayoutAnimation extends HigherOrderAnimation {
|
|
21
|
-
current: StyleProps;
|
|
22
|
-
styleAnimations: AnimatedStyle;
|
|
23
|
-
onFrame: (animation: StyleLayoutAnimation, timestamp: Timestamp) => boolean;
|
|
24
|
-
onStart: (
|
|
25
|
-
nextAnimation: StyleLayoutAnimation,
|
|
26
|
-
current: AnimatedStyle,
|
|
27
|
-
timestamp: Timestamp,
|
|
28
|
-
previousAnimation: StyleLayoutAnimation
|
|
29
|
-
) => void;
|
|
30
|
-
callback?: AnimationCallback;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
16
|
// resolves path to value for nested objects
|
|
34
17
|
// if path cannot be resolved returns undefined
|
|
35
18
|
export function resolvePath<T>(
|
|
@@ -74,9 +57,8 @@ export function setPath<T>(
|
|
|
74
57
|
currObj = currObj[keys[i]];
|
|
75
58
|
}
|
|
76
59
|
|
|
77
|
-
(currObj as { [key: string]: NestedObjectValues<T> })[
|
|
78
|
-
|
|
79
|
-
] = value;
|
|
60
|
+
(currObj as { [key: string]: NestedObjectValues<T> })[keys[keys.length - 1]] =
|
|
61
|
+
value;
|
|
80
62
|
}
|
|
81
63
|
|
|
82
64
|
interface NestedObjectEntry<T> {
|
|
@@ -100,7 +82,8 @@ export function withStyleAnimation(
|
|
|
100
82
|
{ value: animation.styleAnimations, path: [] },
|
|
101
83
|
];
|
|
102
84
|
while (entriesToCheck.length > 0) {
|
|
103
|
-
const currentEntry: NestedObjectEntry<AnimationObject> =
|
|
85
|
+
const currentEntry: NestedObjectEntry<AnimationObject> =
|
|
86
|
+
entriesToCheck.pop() as NestedObjectEntry<AnimationObject>;
|
|
104
87
|
if (Array.isArray(currentEntry.value)) {
|
|
105
88
|
for (let index = 0; index < currentEntry.value.length; index++) {
|
|
106
89
|
entriesToCheck.push({
|
|
@@ -120,7 +103,8 @@ export function withStyleAnimation(
|
|
|
120
103
|
});
|
|
121
104
|
}
|
|
122
105
|
} else {
|
|
123
|
-
const currentStyleAnimation: AnimationObject =
|
|
106
|
+
const currentStyleAnimation: AnimationObject =
|
|
107
|
+
currentEntry.value as AnimationObject;
|
|
124
108
|
if (currentStyleAnimation.finished) {
|
|
125
109
|
continue;
|
|
126
110
|
}
|
|
@@ -228,7 +212,8 @@ export function withStyleAnimation(
|
|
|
228
212
|
styleAnimations,
|
|
229
213
|
];
|
|
230
214
|
while (animationsToCheck.length > 0) {
|
|
231
|
-
const currentAnimation: NestedObjectValues<AnimationObject> =
|
|
215
|
+
const currentAnimation: NestedObjectValues<AnimationObject> =
|
|
216
|
+
animationsToCheck.pop() as NestedObjectValues<AnimationObject>;
|
|
232
217
|
if (Array.isArray(currentAnimation)) {
|
|
233
218
|
for (const element of currentAnimation) {
|
|
234
219
|
animationsToCheck.push(element);
|
|
@@ -241,7 +226,8 @@ export function withStyleAnimation(
|
|
|
241
226
|
animationsToCheck.push(value);
|
|
242
227
|
}
|
|
243
228
|
} else {
|
|
244
|
-
const currentStyleAnimation: AnimationObject =
|
|
229
|
+
const currentStyleAnimation: AnimationObject =
|
|
230
|
+
currentAnimation as AnimationObject;
|
|
245
231
|
if (
|
|
246
232
|
!currentStyleAnimation.finished &&
|
|
247
233
|
currentStyleAnimation.callback
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
AnimationCallback,
|
|
6
6
|
Timestamp,
|
|
7
7
|
AnimatableValue,
|
|
8
|
-
} from '
|
|
8
|
+
} from '../commonTypes';
|
|
9
9
|
|
|
10
10
|
interface TimingConfig {
|
|
11
11
|
duration?: number;
|
|
@@ -80,7 +80,9 @@ export function withTiming(
|
|
|
80
80
|
// new timing over the old one with the same parameters. If so, we want
|
|
81
81
|
// to copy animation timeline properties
|
|
82
82
|
animation.startTime = (previousAnimation as TimingAnimation).startTime;
|
|
83
|
-
animation.startValue = (
|
|
83
|
+
animation.startValue = (
|
|
84
|
+
previousAnimation as TimingAnimation
|
|
85
|
+
).startValue;
|
|
84
86
|
} else {
|
|
85
87
|
animation.startTime = now;
|
|
86
88
|
animation.startValue = value;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Animation,
|
|
3
|
-
AnimationObject,
|
|
4
2
|
HigherOrderAnimation,
|
|
5
3
|
NextAnimation,
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
DelayAnimation,
|
|
5
|
+
RepeatAnimation,
|
|
6
|
+
SequenceAnimation,
|
|
7
|
+
StyleLayoutAnimation,
|
|
8
8
|
} from './commonTypes';
|
|
9
9
|
/* global _WORKLET */
|
|
10
10
|
import { ParsedColorArray, convertToHSVA, isColor, toRGBA } from '../Colors';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
|
|
12
|
+
import {
|
|
13
|
+
AnimatedStyle,
|
|
14
|
+
SharedValue,
|
|
15
|
+
AnimatableValue,
|
|
16
|
+
Animation,
|
|
17
|
+
AnimationObject,
|
|
18
|
+
Timestamp,
|
|
19
|
+
} from '../commonTypes';
|
|
14
20
|
import NativeReanimatedModule from '../NativeReanimated';
|
|
15
|
-
import { RepeatAnimation } from './repeat';
|
|
16
|
-
import { SequenceAnimation } from './sequence';
|
|
17
|
-
import { StyleLayoutAnimation } from './styleAnimation';
|
|
18
21
|
|
|
19
22
|
let IN_STYLE_UPDATER = false;
|
|
20
23
|
|
|
@@ -225,17 +228,16 @@ function decorateAnimation<T extends AnimationObject | StyleLayoutAnimation>(
|
|
|
225
228
|
};
|
|
226
229
|
}
|
|
227
230
|
|
|
228
|
-
type AnimationToDecoration<
|
|
229
|
-
T extends
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
: AnimatableValue | T;
|
|
231
|
+
type AnimationToDecoration<T extends AnimationObject | StyleLayoutAnimation> =
|
|
232
|
+
T extends StyleLayoutAnimation
|
|
233
|
+
? Record<string, unknown>
|
|
234
|
+
: T extends DelayAnimation
|
|
235
|
+
? NextAnimation<DelayAnimation>
|
|
236
|
+
: T extends RepeatAnimation
|
|
237
|
+
? NextAnimation<RepeatAnimation>
|
|
238
|
+
: T extends SequenceAnimation
|
|
239
|
+
? NextAnimation<SequenceAnimation>
|
|
240
|
+
: AnimatableValue | T;
|
|
239
241
|
|
|
240
242
|
export function defineAnimation<
|
|
241
243
|
T extends AnimationObject | StyleLayoutAnimation
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
ViewStyle,
|
|
16
16
|
TextStyle,
|
|
17
17
|
} from 'react-native';
|
|
18
|
-
import { Animation, AnimationObject } from './animation/commonTypes';
|
|
19
18
|
import { Context } from './hook/commonTypes';
|
|
20
19
|
|
|
21
20
|
export type TransformProperty =
|
|
@@ -59,6 +58,10 @@ export interface BasicWorkletFunction<T> extends WorkletFunction {
|
|
|
59
58
|
(): T;
|
|
60
59
|
}
|
|
61
60
|
|
|
61
|
+
export interface BasicWorkletFunctionOptional<T> extends WorkletFunction {
|
|
62
|
+
(): Partial<T>;
|
|
63
|
+
}
|
|
64
|
+
|
|
62
65
|
export interface NativeEvent<T> {
|
|
63
66
|
nativeEvent: T;
|
|
64
67
|
}
|
|
@@ -79,3 +82,67 @@ export type NestedObjectValues<T> =
|
|
|
79
82
|
export interface AdapterWorkletFunction extends WorkletFunction {
|
|
80
83
|
(value: NestedObject<string | number | AnimationObject>): void;
|
|
81
84
|
}
|
|
85
|
+
|
|
86
|
+
export type AnimatableValue = number | string | Array<number>;
|
|
87
|
+
|
|
88
|
+
export interface AnimationObject {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
callback: AnimationCallback;
|
|
91
|
+
current?: AnimatableValue;
|
|
92
|
+
toValue?: AnimationObject['current'];
|
|
93
|
+
startValue?: AnimationObject['current'];
|
|
94
|
+
finished?: boolean;
|
|
95
|
+
strippedCurrent?: number;
|
|
96
|
+
cancelled?: boolean;
|
|
97
|
+
|
|
98
|
+
__prefix?: string;
|
|
99
|
+
__suffix?: string;
|
|
100
|
+
onFrame: (animation: any, timestamp: Timestamp) => boolean;
|
|
101
|
+
onStart: (
|
|
102
|
+
nextAnimation: any,
|
|
103
|
+
current: any,
|
|
104
|
+
timestamp: Timestamp,
|
|
105
|
+
previousAnimation: any
|
|
106
|
+
) => void;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface Animation<T extends AnimationObject> extends AnimationObject {
|
|
110
|
+
onFrame: (animation: T, timestamp: Timestamp) => boolean;
|
|
111
|
+
onStart: (
|
|
112
|
+
nextAnimation: T,
|
|
113
|
+
current: T extends NumericAnimation ? number : AnimatableValue,
|
|
114
|
+
timestamp: Timestamp,
|
|
115
|
+
previousAnimation: T
|
|
116
|
+
) => void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface NumericAnimation {
|
|
120
|
+
current?: number;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type AnimationCallback = (
|
|
124
|
+
finished?: boolean,
|
|
125
|
+
current?: AnimatableValue
|
|
126
|
+
) => void;
|
|
127
|
+
|
|
128
|
+
export type Timestamp = number;
|
|
129
|
+
|
|
130
|
+
export type Value3D = {
|
|
131
|
+
x: number;
|
|
132
|
+
y: number;
|
|
133
|
+
z: number;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export type SensorValue3D = SharedValue<Value3D>;
|
|
137
|
+
|
|
138
|
+
export type ValueRotation = {
|
|
139
|
+
qw: number;
|
|
140
|
+
qx: number;
|
|
141
|
+
qy: number;
|
|
142
|
+
qz: number;
|
|
143
|
+
yaw: number;
|
|
144
|
+
pitch: number;
|
|
145
|
+
roll: number;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export type SensorValueRotation = SharedValue<ValueRotation>;
|
|
@@ -13,7 +13,8 @@ const createCellRenderer = (itemLayoutAnimation?: ILayoutAnimationBuilder) => {
|
|
|
13
13
|
return (
|
|
14
14
|
<WrappedComponents.View
|
|
15
15
|
layout={itemLayoutAnimation}
|
|
16
|
-
onLayout={props.onLayout}
|
|
16
|
+
onLayout={props.onLayout}
|
|
17
|
+
>
|
|
17
18
|
{props.children}
|
|
18
19
|
</WrappedComponents.View>
|
|
19
20
|
);
|
package/src/reanimated2/core.ts
CHANGED
|
@@ -7,12 +7,10 @@ import {
|
|
|
7
7
|
WorkletFunction,
|
|
8
8
|
ComplexWorkletFunction,
|
|
9
9
|
SharedValue,
|
|
10
|
-
} from './commonTypes';
|
|
11
|
-
import {
|
|
12
10
|
AnimationObject,
|
|
13
11
|
AnimatableValue,
|
|
14
12
|
Timestamp,
|
|
15
|
-
} from './
|
|
13
|
+
} from './commonTypes';
|
|
16
14
|
import { Descriptor } from './hook/commonTypes';
|
|
17
15
|
import JSReanimated from './js-reanimated/JSReanimated';
|
|
18
16
|
|
|
@@ -65,7 +63,7 @@ export const checkPluginState: (throwError: boolean) => boolean = (
|
|
|
65
63
|
export const isConfigured: (throwError?: boolean) => boolean = (
|
|
66
64
|
throwError = false
|
|
67
65
|
) => {
|
|
68
|
-
return checkPluginState(throwError)
|
|
66
|
+
return checkPluginState(throwError);
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
export const isConfiguredCheck: () => void = () => {
|
|
@@ -364,32 +362,30 @@ export function runOnJS<A extends any[], R>(
|
|
|
364
362
|
}
|
|
365
363
|
}
|
|
366
364
|
|
|
367
|
-
|
|
368
|
-
NativeReanimatedModule.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
);
|
|
365
|
+
NativeReanimatedModule.installCoreFunctions(
|
|
366
|
+
NativeReanimatedModule.native
|
|
367
|
+
? (workletValueSetter as <T>(value: T) => void)
|
|
368
|
+
: (workletValueSetterJS as <T>(value: T) => void)
|
|
369
|
+
);
|
|
373
370
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
371
|
+
if (!isWeb() && isConfigured()) {
|
|
372
|
+
const capturableConsole = console;
|
|
373
|
+
runOnUI(() => {
|
|
374
|
+
'worklet';
|
|
375
|
+
const console = {
|
|
376
|
+
debug: runOnJS(capturableConsole.debug),
|
|
377
|
+
log: runOnJS(capturableConsole.log),
|
|
378
|
+
warn: runOnJS(capturableConsole.warn),
|
|
379
|
+
error: runOnJS(capturableConsole.error),
|
|
380
|
+
info: runOnJS(capturableConsole.info),
|
|
381
|
+
};
|
|
382
|
+
_setGlobalConsole(console);
|
|
383
|
+
if (global.performance == null) {
|
|
384
|
+
global.performance = {
|
|
385
|
+
now: global._chronoNow,
|
|
386
|
+
} as any; // due to conflict with lib.dom.d.ts -> Performance
|
|
387
|
+
}
|
|
388
|
+
})();
|
|
393
389
|
}
|
|
394
390
|
|
|
395
391
|
type FeaturesConfig = {
|
|
@@ -420,3 +416,13 @@ export function enableLayoutAnimations(
|
|
|
420
416
|
NativeReanimatedModule.enableLayoutAnimations(flag);
|
|
421
417
|
}
|
|
422
418
|
}
|
|
419
|
+
|
|
420
|
+
export function configureProps(uiProps: string[], nativeProps: string[]): void {
|
|
421
|
+
if (!nativeShouldBeMock()) {
|
|
422
|
+
NativeReanimatedModule.configureProps(uiProps, nativeProps);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export function jestResetJsReanimatedModule() {
|
|
427
|
+
(NativeReanimatedModule as JSReanimated).jestResetModule();
|
|
428
|
+
}
|
|
@@ -27,6 +27,9 @@ declare global {
|
|
|
27
27
|
animated: boolean
|
|
28
28
|
) => void;
|
|
29
29
|
const _chronoNow: () => number;
|
|
30
|
+
const ReanimatedDataMock: {
|
|
31
|
+
now: () => number;
|
|
32
|
+
};
|
|
30
33
|
namespace NodeJS {
|
|
31
34
|
interface Global {
|
|
32
35
|
__reanimatedWorkletInit: (worklet: WorkletFunction) => void;
|
|
@@ -50,6 +53,9 @@ declare global {
|
|
|
50
53
|
yogaValues: unknown
|
|
51
54
|
): void;
|
|
52
55
|
};
|
|
56
|
+
ReanimatedDataMock: {
|
|
57
|
+
now: () => number;
|
|
58
|
+
};
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import { WorkletFunction } from '../commonTypes';
|
|
3
|
-
import { isWeb } from '../PlatformChecker';
|
|
4
3
|
import WorkletEventHandler from '../WorkletEventHandler';
|
|
5
4
|
import { Context, DependencyList } from './commonTypes';
|
|
6
5
|
import { useEvent, useHandler } from './Hooks';
|
|
@@ -98,7 +97,7 @@ export function useAnimatedGestureHandler<
|
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
99
|
|
|
101
|
-
if (
|
|
100
|
+
if (useWeb) {
|
|
102
101
|
return handler;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Component, useRef } from 'react';
|
|
2
2
|
import { getTag } from '../NativeMethods';
|
|
3
3
|
import { useSharedValue } from './useSharedValue';
|
|
4
|
-
|
|
5
|
-
export interface RefObjectFunction<T> {
|
|
6
|
-
current: T | null;
|
|
7
|
-
(component?: T): number;
|
|
8
|
-
}
|
|
4
|
+
import { RefObjectFunction } from './commonTypes';
|
|
9
5
|
|
|
10
6
|
export function useAnimatedRef<T extends Component>(): RefObjectFunction<T> {
|
|
11
7
|
const tag = useSharedValue<number | null>(-1);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { makeMutable } from '../core';
|
|
3
|
+
import NativeReanimated from '../NativeReanimated';
|
|
4
|
+
import { SensorValue3D, SensorValueRotation } from '../commonTypes';
|
|
5
|
+
|
|
6
|
+
export enum SensorType {
|
|
7
|
+
ACCELEROMETER = 1,
|
|
8
|
+
GYROSCOPE = 2,
|
|
9
|
+
GRAVITY = 3,
|
|
10
|
+
MAGNETIC_FIELD = 4,
|
|
11
|
+
ROTATION = 5,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type SensorConfig = {
|
|
15
|
+
interval: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type AnimatedSensor = {
|
|
19
|
+
sensor: SensorValue3D | SensorValueRotation | null;
|
|
20
|
+
unregister: () => void;
|
|
21
|
+
isAvailable: boolean;
|
|
22
|
+
config: {
|
|
23
|
+
interval: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function useAnimatedSensor(
|
|
28
|
+
sensorType: SensorType,
|
|
29
|
+
userConfig?: SensorConfig
|
|
30
|
+
): AnimatedSensor {
|
|
31
|
+
const ref = useRef({
|
|
32
|
+
sensor: null,
|
|
33
|
+
unregister: () => {
|
|
34
|
+
// NOOP
|
|
35
|
+
},
|
|
36
|
+
isAvailable: false,
|
|
37
|
+
config: {
|
|
38
|
+
interval: 0,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
if (ref.current.sensor === null) {
|
|
43
|
+
ref.current.config = { interval: 10, ...userConfig };
|
|
44
|
+
let sensorData;
|
|
45
|
+
if (sensorType === SensorType.ROTATION) {
|
|
46
|
+
sensorData = {
|
|
47
|
+
qw: 0,
|
|
48
|
+
qx: 0,
|
|
49
|
+
qy: 0,
|
|
50
|
+
qz: 0,
|
|
51
|
+
yaw: 0,
|
|
52
|
+
pitch: 0,
|
|
53
|
+
roll: 0,
|
|
54
|
+
};
|
|
55
|
+
} else {
|
|
56
|
+
sensorData = {
|
|
57
|
+
x: 0,
|
|
58
|
+
y: 0,
|
|
59
|
+
z: 0,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
ref.current.sensor = makeMutable(sensorData) as any;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
ref.current.config = { interval: 10, ...userConfig };
|
|
67
|
+
const id = NativeReanimated.registerSensor(
|
|
68
|
+
sensorType,
|
|
69
|
+
ref.current.config.interval,
|
|
70
|
+
ref.current.sensor as any
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
if (id !== -1) {
|
|
74
|
+
// if sensor is available
|
|
75
|
+
ref.current.unregister = () => NativeReanimated.unregisterSensor(id);
|
|
76
|
+
ref.current.isAvailable = true;
|
|
77
|
+
} else {
|
|
78
|
+
// if sensor is unavailable
|
|
79
|
+
ref.current.unregister = () => {
|
|
80
|
+
// NOOP
|
|
81
|
+
};
|
|
82
|
+
ref.current.isAvailable = false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return () => {
|
|
86
|
+
ref.current.unregister();
|
|
87
|
+
};
|
|
88
|
+
}, [sensorType, userConfig]);
|
|
89
|
+
|
|
90
|
+
return ref.current;
|
|
91
|
+
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
makeMutable,
|
|
11
11
|
} from '../core';
|
|
12
12
|
import updateProps, { updatePropsJestWrapper } from '../UpdateProps';
|
|
13
|
-
import { initialUpdaterRun
|
|
13
|
+
import { initialUpdaterRun } from '../animation';
|
|
14
14
|
import NativeReanimatedModule from '../NativeReanimated';
|
|
15
15
|
import { useSharedValue } from './useSharedValue';
|
|
16
16
|
import {
|
|
@@ -31,11 +31,13 @@ import {
|
|
|
31
31
|
ViewRefSet,
|
|
32
32
|
} from '../ViewDescriptorsSet';
|
|
33
33
|
import { isJest, shouldBeUseWeb } from '../PlatformChecker';
|
|
34
|
-
import { AnimationObject } from '../animation/commonTypes';
|
|
35
34
|
import {
|
|
35
|
+
AnimationObject,
|
|
36
|
+
Timestamp,
|
|
36
37
|
AdapterWorkletFunction,
|
|
37
38
|
AnimatedStyle,
|
|
38
39
|
BasicWorkletFunction,
|
|
40
|
+
BasicWorkletFunctionOptional,
|
|
39
41
|
NestedObjectValues,
|
|
40
42
|
SharedValue,
|
|
41
43
|
} from '../commonTypes';
|
|
@@ -259,7 +261,12 @@ function styleUpdater(
|
|
|
259
261
|
} else {
|
|
260
262
|
state.isAnimationCancelled = true;
|
|
261
263
|
state.animations = [];
|
|
262
|
-
|
|
264
|
+
|
|
265
|
+
const diff = styleDiff(oldValues, newValues);
|
|
266
|
+
state.last = Object.assign({}, oldValues, newValues);
|
|
267
|
+
if (diff) {
|
|
268
|
+
updateProps(viewDescriptors, newValues, maybeViewRef);
|
|
269
|
+
}
|
|
263
270
|
}
|
|
264
271
|
}
|
|
265
272
|
|
|
@@ -446,10 +453,10 @@ export function useAnimatedStyle<T extends AnimatedStyle>(
|
|
|
446
453
|
|
|
447
454
|
useEffect(() => {
|
|
448
455
|
let fun;
|
|
449
|
-
let
|
|
456
|
+
let updaterFn = updater as BasicWorkletFunctionOptional<T>;
|
|
450
457
|
let optimalization = updater.__optimalization;
|
|
451
458
|
if (adapters) {
|
|
452
|
-
|
|
459
|
+
updaterFn = () => {
|
|
453
460
|
'worklet';
|
|
454
461
|
const newValues = updater();
|
|
455
462
|
adaptersArray.forEach((adapter) => {
|
|
@@ -459,26 +466,38 @@ export function useAnimatedStyle<T extends AnimatedStyle>(
|
|
|
459
466
|
};
|
|
460
467
|
}
|
|
461
468
|
|
|
462
|
-
if (canApplyOptimalisation(
|
|
463
|
-
if (hasColorProps(
|
|
464
|
-
|
|
469
|
+
if (canApplyOptimalisation(updaterFn) && !shouldBeUseWeb()) {
|
|
470
|
+
if (hasColorProps(updaterFn())) {
|
|
471
|
+
updaterFn = () => {
|
|
472
|
+
'worklet';
|
|
473
|
+
const newValues = updaterFn();
|
|
474
|
+
const oldValues = remoteState.last;
|
|
475
|
+
const diff = styleDiff<T>(oldValues, newValues);
|
|
476
|
+
remoteState.last = Object.assign({}, oldValues, newValues);
|
|
477
|
+
parseColors(diff);
|
|
478
|
+
return diff;
|
|
479
|
+
};
|
|
480
|
+
} else {
|
|
481
|
+
updaterFn = () => {
|
|
465
482
|
'worklet';
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
|
|
483
|
+
const newValues = updaterFn();
|
|
484
|
+
const oldValues = remoteState.last;
|
|
485
|
+
const diff = styleDiff<T>(oldValues, newValues);
|
|
486
|
+
remoteState.last = Object.assign({}, oldValues, newValues);
|
|
487
|
+
return diff;
|
|
469
488
|
};
|
|
470
489
|
}
|
|
471
490
|
} else if (!shouldBeUseWeb()) {
|
|
472
491
|
optimalization = 0;
|
|
473
|
-
|
|
492
|
+
updaterFn = () => {
|
|
474
493
|
'worklet';
|
|
475
|
-
const style =
|
|
494
|
+
const style = updaterFn();
|
|
476
495
|
parseColors(style);
|
|
477
496
|
return style;
|
|
478
497
|
};
|
|
479
498
|
}
|
|
480
499
|
if (typeof updater.__optimalization !== undefined) {
|
|
481
|
-
|
|
500
|
+
updaterFn.__optimalization = optimalization;
|
|
482
501
|
}
|
|
483
502
|
|
|
484
503
|
if (isJest()) {
|
|
@@ -499,7 +518,7 @@ export function useAnimatedStyle<T extends AnimatedStyle>(
|
|
|
499
518
|
'worklet';
|
|
500
519
|
styleUpdater(
|
|
501
520
|
sharableViewDescriptors,
|
|
502
|
-
|
|
521
|
+
updaterFn,
|
|
503
522
|
remoteState,
|
|
504
523
|
maybeViewRef,
|
|
505
524
|
animationsActive
|
|
@@ -510,7 +529,7 @@ export function useAnimatedStyle<T extends AnimatedStyle>(
|
|
|
510
529
|
fun,
|
|
511
530
|
inputs,
|
|
512
531
|
[],
|
|
513
|
-
|
|
532
|
+
updaterFn,
|
|
514
533
|
// TODO fix this
|
|
515
534
|
sharableViewDescriptors
|
|
516
535
|
);
|