react-native-reanimated 2.14.2 → 2.14.3
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/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/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/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/ios/native/NativeProxy.mm +5 -1
- package/lib/reanimated2/hook/useAnimatedStyle.js +3 -3
- package/lib/reanimated2/hook/utils.js +7 -15
- package/package.json +1 -1
- package/src/reanimated2/hook/useAnimatedStyle.ts +3 -3
- package/src/reanimated2/hook/utils.ts +6 -16
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Thu Jan 19 15:25:25 UTC 2023
|
|
2
2
|
gradle.version=7.5.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
#elif __has_include(<hermes/hermes.h>)
|
|
24
24
|
#import <hermes/hermes.h>
|
|
25
25
|
#else
|
|
26
|
-
#
|
|
26
|
+
#if REACT_NATIVE_MINOR_VERSION >= 71
|
|
27
|
+
#include <jsc/JSCRuntime.h>
|
|
28
|
+
#else
|
|
29
|
+
#include <jsi/JSCRuntime.h>
|
|
30
|
+
#endif // REACT_NATIVE_MINOR_VERSION
|
|
27
31
|
#endif
|
|
28
32
|
|
|
29
33
|
namespace reanimated {
|
|
@@ -155,7 +155,7 @@ function styleUpdater(viewDescriptors, updater, state, maybeViewRef, animationsA
|
|
|
155
155
|
requestFrame(frame);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
state.last = Object.assign(
|
|
158
|
+
state.last = Object.assign(oldValues, newValues);
|
|
159
159
|
const style = getStyleWithoutAnimations(state.last);
|
|
160
160
|
if (style) {
|
|
161
161
|
updateProps(viewDescriptors, style, maybeViewRef);
|
|
@@ -165,7 +165,7 @@ function styleUpdater(viewDescriptors, updater, state, maybeViewRef, animationsA
|
|
|
165
165
|
state.isAnimationCancelled = true;
|
|
166
166
|
state.animations = [];
|
|
167
167
|
const diff = styleDiff(oldValues, newValues);
|
|
168
|
-
state.last = Object.assign(
|
|
168
|
+
state.last = Object.assign(oldValues, diff);
|
|
169
169
|
if (diff) {
|
|
170
170
|
updateProps(viewDescriptors, newValues, maybeViewRef);
|
|
171
171
|
}
|
|
@@ -240,7 +240,7 @@ function jestStyleUpdater(viewDescriptors, updater, state, maybeViewRef, animati
|
|
|
240
240
|
}
|
|
241
241
|
// calculate diff
|
|
242
242
|
const diff = styleDiff(oldValues, newValues);
|
|
243
|
-
state.last = Object.assign(
|
|
243
|
+
state.last = Object.assign(oldValues, diff);
|
|
244
244
|
if (Object.keys(diff).length !== 0) {
|
|
245
245
|
updatePropsJestWrapper(viewDescriptors, diff, maybeViewRef, animatedStyle, adapters);
|
|
246
246
|
}
|
|
@@ -108,25 +108,17 @@ export function canApplyOptimalisation(upadterFn) {
|
|
|
108
108
|
}
|
|
109
109
|
export function isAnimated(prop) {
|
|
110
110
|
'worklet';
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
propsToCheck.push(item);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
else if ((currentProp === null || currentProp === void 0 ? void 0 : currentProp.onFrame) !== undefined) {
|
|
111
|
+
if (Array.isArray(prop)) {
|
|
112
|
+
return prop.some(isAnimated);
|
|
113
|
+
}
|
|
114
|
+
else if (typeof prop === 'object') {
|
|
115
|
+
if (prop.onFrame !== undefined) {
|
|
120
116
|
return true;
|
|
121
117
|
}
|
|
122
|
-
else
|
|
123
|
-
|
|
124
|
-
propsToCheck.push(item);
|
|
125
|
-
}
|
|
118
|
+
else {
|
|
119
|
+
return Object.values(prop).some(isAnimated);
|
|
126
120
|
}
|
|
127
|
-
// if none of the above, it's not the animated prop, check next one
|
|
128
121
|
}
|
|
129
|
-
// when none of the props were animated return false
|
|
130
122
|
return false;
|
|
131
123
|
}
|
|
132
124
|
export function styleDiff(oldStyle, newStyle) {
|
package/package.json
CHANGED
|
@@ -253,7 +253,7 @@ function styleUpdater(
|
|
|
253
253
|
requestFrame(frame);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
state.last = Object.assign(
|
|
256
|
+
state.last = Object.assign(oldValues, newValues);
|
|
257
257
|
const style = getStyleWithoutAnimations(state.last);
|
|
258
258
|
if (style) {
|
|
259
259
|
updateProps(viewDescriptors, style, maybeViewRef);
|
|
@@ -263,7 +263,7 @@ function styleUpdater(
|
|
|
263
263
|
state.animations = [];
|
|
264
264
|
|
|
265
265
|
const diff = styleDiff(oldValues, newValues);
|
|
266
|
-
state.last = Object.assign(
|
|
266
|
+
state.last = Object.assign(oldValues, diff);
|
|
267
267
|
if (diff) {
|
|
268
268
|
updateProps(viewDescriptors, newValues, maybeViewRef);
|
|
269
269
|
}
|
|
@@ -361,7 +361,7 @@ function jestStyleUpdater(
|
|
|
361
361
|
|
|
362
362
|
// calculate diff
|
|
363
363
|
const diff = styleDiff(oldValues, newValues);
|
|
364
|
-
state.last = Object.assign(
|
|
364
|
+
state.last = Object.assign(oldValues, diff);
|
|
365
365
|
|
|
366
366
|
if (Object.keys(diff).length !== 0) {
|
|
367
367
|
updatePropsJestWrapper(
|
|
@@ -179,25 +179,15 @@ export function canApplyOptimalisation(upadterFn: WorkletFunction): number {
|
|
|
179
179
|
|
|
180
180
|
export function isAnimated(prop: NestedObjectValues<AnimationObject>): boolean {
|
|
181
181
|
'worklet';
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (Array.isArray(currentProp)) {
|
|
187
|
-
for (const item of currentProp) {
|
|
188
|
-
propsToCheck.push(item);
|
|
189
|
-
}
|
|
190
|
-
} else if (currentProp?.onFrame !== undefined) {
|
|
182
|
+
if (Array.isArray(prop)) {
|
|
183
|
+
return prop.some(isAnimated);
|
|
184
|
+
} else if (typeof prop === 'object') {
|
|
185
|
+
if (prop.onFrame !== undefined) {
|
|
191
186
|
return true;
|
|
192
|
-
} else
|
|
193
|
-
|
|
194
|
-
propsToCheck.push(item);
|
|
195
|
-
}
|
|
187
|
+
} else {
|
|
188
|
+
return Object.values(prop).some(isAnimated);
|
|
196
189
|
}
|
|
197
|
-
// if none of the above, it's not the animated prop, check next one
|
|
198
190
|
}
|
|
199
|
-
|
|
200
|
-
// when none of the props were animated return false
|
|
201
191
|
return false;
|
|
202
192
|
}
|
|
203
193
|
|