@tamagui/animations-reanimated 2.7.7 → 3.0.0-beta.643.1
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/dist/cjs/createAnimations.cjs +940 -897
- package/dist/cjs/createAnimations.native.cjs +1196 -0
- package/dist/cjs/createAnimations.native.js +1138 -1115
- package/dist/cjs/createAnimations.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/createAnimations.mjs +926 -873
- package/dist/esm/createAnimations.mjs.map +1 -1
- package/dist/esm/createAnimations.native.js +1125 -1093
- package/dist/esm/createAnimations.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/package.json +8 -8
- package/src/createAnimations.tsx +264 -89
- package/types/createAnimations.d.ts.map +2 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
|
@@ -1,1136 +1,1168 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getEffectiveAnimation, normalizeTransition } from "@tamagui/animation-helpers";
|
|
3
|
-
import { getSplitStyles, hooks, isWeb,
|
|
3
|
+
import { Text, View, createRefComponent, getSplitStyles, hooks, isWeb, useComposedRefs, useEvent, useIsomorphicLayoutEffect, useThemeWithState } from "@tamagui/core";
|
|
4
4
|
import { ResetPresence, usePresence } from "@tamagui/use-presence";
|
|
5
5
|
import normalizeColor from "@react-native/normalize-colors";
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { useMemo, useRef } from "react";
|
|
7
7
|
import Animated_, { cancelAnimation, runOnJS, runOnUI, useAnimatedReaction, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withSpring, withTiming } from "react-native-reanimated";
|
|
8
|
-
function _type_of(obj) {
|
|
9
|
-
"@swc/helpers - typeof";
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
function _type_of(obj) {
|
|
10
|
+
"@swc/helpers - typeof";
|
|
11
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
12
12
|
}
|
|
13
|
-
var getDefaultExport = function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
var getDefaultExport = function(module) {
|
|
14
|
+
var mod = module;
|
|
15
|
+
if (mod.__esModule || mod[Symbol.toStringTag] === "Module") {
|
|
16
|
+
return mod.default || mod;
|
|
17
|
+
}
|
|
18
|
+
return mod;
|
|
19
19
|
};
|
|
20
20
|
var Animated = getDefaultExport(Animated_);
|
|
21
|
-
var silenceAnimatedComponentDevCheck = function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
var silenceAnimatedComponentDevCheck = function(style) {
|
|
22
|
+
if (process.env.NODE_ENV !== "development" || isWeb || !style || (typeof style === "undefined" ? "undefined" : _type_of(style)) !== "object") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(style, "_requiresAnimatedComponent", {
|
|
26
|
+
configurable: true,
|
|
27
|
+
enumerable: false,
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
30
|
};
|
|
31
|
-
var resolveDynamicValue = function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
var resolveDynamicValue = function(value, isDark) {
|
|
32
|
+
if (value !== null && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "dynamic" in value && _type_of(value.dynamic) === "object") {
|
|
33
|
+
var dynamic = value.dynamic;
|
|
34
|
+
return isDark ? dynamic.dark : dynamic.light;
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
37
|
};
|
|
38
|
-
var updateMapperState = isWeb ? function
|
|
39
|
-
|
|
40
|
-
} : function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, false);
|
|
38
|
+
var updateMapperState = isWeb ? function(state, emitted) {
|
|
39
|
+
state.value.emitted = emitted;
|
|
40
|
+
} : function(state, emitted) {
|
|
41
|
+
"worklet";
|
|
42
|
+
if (!globalThis._WORKLET) return;
|
|
43
|
+
state.modify(function(current) {
|
|
44
|
+
current.emitted = emitted;
|
|
45
|
+
return current;
|
|
46
|
+
}, false);
|
|
48
47
|
};
|
|
49
|
-
var cloneAnimationValue = function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
var cloneAnimationValue = function(value) {
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
return value.map(cloneAnimationValue);
|
|
51
|
+
}
|
|
52
|
+
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") {
|
|
53
|
+
var next = {};
|
|
54
|
+
for (var key in value) {
|
|
55
|
+
next[key] = cloneAnimationValue(value[key]);
|
|
56
|
+
}
|
|
57
|
+
return next;
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
61
60
|
};
|
|
62
|
-
var cloneStyleRecord = function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
var cloneStyleRecord = function(style) {
|
|
62
|
+
var next = {};
|
|
63
|
+
for (var key in style) {
|
|
64
|
+
next[key] = cloneAnimationValue(style[key]);
|
|
65
|
+
}
|
|
66
|
+
return next;
|
|
68
67
|
};
|
|
69
|
-
var cloneTransitionConfig = function
|
|
70
|
-
|
|
68
|
+
var cloneTransitionConfig = function(config) {
|
|
69
|
+
return cloneAnimationValue(config);
|
|
71
70
|
};
|
|
72
|
-
var getAnimatedTransforms = function
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
var getAnimatedTransforms = function(value) {
|
|
72
|
+
if (!Array.isArray(value)) return [];
|
|
73
|
+
return value.filter(function(item) {
|
|
74
|
+
return item !== null && (typeof item === "undefined" ? "undefined" : _type_of(item)) === "object" && !Array.isArray(item);
|
|
75
|
+
});
|
|
77
76
|
};
|
|
78
|
-
var getRemovedAnimatedKeys = function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
return removedKeys;
|
|
77
|
+
var getRemovedAnimatedKeys = function(current, previous) {
|
|
78
|
+
var removedKeys = {};
|
|
79
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
80
|
+
try {
|
|
81
|
+
for (var _iterator = previous[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
82
|
+
var key = _step.value;
|
|
83
|
+
if (!current.has(key)) removedKeys[key] = true;
|
|
84
|
+
}
|
|
85
|
+
} catch (err) {
|
|
86
|
+
_didIteratorError = true;
|
|
87
|
+
_iteratorError = err;
|
|
88
|
+
} finally {
|
|
89
|
+
try {
|
|
90
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
91
|
+
_iterator.return();
|
|
92
|
+
}
|
|
93
|
+
} finally {
|
|
94
|
+
if (_didIteratorError) {
|
|
95
|
+
throw _iteratorError;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return removedKeys;
|
|
103
100
|
};
|
|
104
|
-
var getImplicitDefault = function
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return suffixIndex > 0 ? `${value}${targetValue.slice(suffixIndex)}` : value;
|
|
101
|
+
var getImplicitDefault = function(key, targetValue) {
|
|
102
|
+
"worklet";
|
|
103
|
+
var value = key === "opacity" || key === "scale" || key === "scaleX" || key === "scaleY" ? 1 : 0;
|
|
104
|
+
if (typeof targetValue !== "string") return value;
|
|
105
|
+
var suffixIndex = 0;
|
|
106
|
+
while (suffixIndex < targetValue.length) {
|
|
107
|
+
var character = targetValue[suffixIndex];
|
|
108
|
+
var code = character.charCodeAt(0);
|
|
109
|
+
if (code >= 48 && code <= 57 || character === "." || character === "-" || character === "+") {
|
|
110
|
+
suffixIndex++;
|
|
111
|
+
} else {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return suffixIndex > 0 ? `${value}${targetValue.slice(suffixIndex)}` : value;
|
|
120
116
|
};
|
|
121
117
|
var COLOR_STYLE_KEYS = {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
backgroundColor: true,
|
|
119
|
+
borderColor: true,
|
|
120
|
+
borderLeftColor: true,
|
|
121
|
+
borderRightColor: true,
|
|
122
|
+
borderTopColor: true,
|
|
123
|
+
borderBottomColor: true,
|
|
124
|
+
color: true
|
|
129
125
|
};
|
|
130
|
-
var toReanimatedColor = function
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return trimmed;
|
|
126
|
+
var toReanimatedColor = function(value) {
|
|
127
|
+
"worklet";
|
|
128
|
+
if (typeof value === "number") {
|
|
129
|
+
var color = value >>> 0;
|
|
130
|
+
var alpha = (color >>> 24 & 255) / 255;
|
|
131
|
+
var red = color >>> 16 & 255;
|
|
132
|
+
var green = color >>> 8 & 255;
|
|
133
|
+
var blue = color & 255;
|
|
134
|
+
return `rgba(${red}, ${green}, ${blue}, ${alpha})`;
|
|
135
|
+
}
|
|
136
|
+
if (typeof value !== "string") return value;
|
|
137
|
+
var trimmed = value.trim();
|
|
138
|
+
if (trimmed === "transparent") return "rgba(0, 0, 0, 0)";
|
|
139
|
+
return trimmed;
|
|
145
140
|
};
|
|
146
|
-
var isReanimatedColorHistory = function
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return typeof normalized === "string" && normalized.startsWith("rgba(");
|
|
141
|
+
var isReanimatedColorHistory = function(value) {
|
|
142
|
+
"worklet";
|
|
143
|
+
var normalized = toReanimatedColor(value);
|
|
144
|
+
return typeof normalized === "string" && normalized.startsWith("rgba(");
|
|
151
145
|
};
|
|
152
|
-
var normalizeAnimationColor = function
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
146
|
+
var normalizeAnimationColor = function(value) {
|
|
147
|
+
if (typeof value === "number") {
|
|
148
|
+
return toReanimatedColor(value);
|
|
149
|
+
}
|
|
150
|
+
if (typeof value !== "string") return;
|
|
151
|
+
var color = normalizeColor(value);
|
|
152
|
+
if (color == null) return;
|
|
153
|
+
var red = Math.round((color & 4278190080) >>> 24);
|
|
154
|
+
var green = Math.round((color & 16711680) >>> 16);
|
|
155
|
+
var blue = Math.round((color & 65280) >>> 8);
|
|
156
|
+
var alpha = (color & 255) / 255;
|
|
157
|
+
return `rgba(${red}, ${green}, ${blue}, ${alpha})`;
|
|
164
158
|
};
|
|
165
|
-
var buildSnapshot = function
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
seeds,
|
|
327
|
-
removedKeys,
|
|
328
|
-
removeTransform: Object.keys(removedKeys).some(function (key7) {
|
|
329
|
-
return key7.startsWith("transform:");
|
|
330
|
-
}),
|
|
331
|
-
clearValue: isWeb ? "" : null
|
|
332
|
-
},
|
|
333
|
-
painted,
|
|
334
|
-
keys
|
|
335
|
-
};
|
|
159
|
+
var buildSnapshot = function(animated, statics, transforms, previousKeys, lastPainted) {
|
|
160
|
+
var snapshotAnimated = {};
|
|
161
|
+
var snapshotStatics = cloneStyleRecord(statics);
|
|
162
|
+
for (var key in snapshotStatics) {
|
|
163
|
+
if (!COLOR_STYLE_KEYS[key]) continue;
|
|
164
|
+
var normalized = normalizeAnimationColor(snapshotStatics[key]);
|
|
165
|
+
if (normalized !== void 0) snapshotStatics[key] = normalized;
|
|
166
|
+
}
|
|
167
|
+
for (var key1 in animated) {
|
|
168
|
+
if (key1 === "transform") continue;
|
|
169
|
+
var value = animated[key1];
|
|
170
|
+
if (COLOR_STYLE_KEYS[key1]) {
|
|
171
|
+
var normalized1 = normalizeAnimationColor(value);
|
|
172
|
+
if (normalized1 === void 0) {
|
|
173
|
+
snapshotStatics[key1] = cloneAnimationValue(value);
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
snapshotAnimated[key1] = normalized1;
|
|
177
|
+
} else {
|
|
178
|
+
snapshotAnimated[key1] = cloneAnimationValue(value);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
var snapshotTransforms = transforms.map(cloneStyleRecord);
|
|
182
|
+
var keys = new Set(Object.keys(snapshotAnimated));
|
|
183
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
184
|
+
try {
|
|
185
|
+
for (var _iterator = snapshotTransforms[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
186
|
+
var transform = _step.value;
|
|
187
|
+
var key2 = Object.keys(transform)[0];
|
|
188
|
+
var value1 = key2 ? transform[key2] : void 0;
|
|
189
|
+
if (key2 && (typeof value1 === "number" || typeof value1 === "string")) {
|
|
190
|
+
keys.add(`transform:${key2}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} catch (err) {
|
|
194
|
+
_didIteratorError = true;
|
|
195
|
+
_iteratorError = err;
|
|
196
|
+
} finally {
|
|
197
|
+
try {
|
|
198
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
199
|
+
_iterator.return();
|
|
200
|
+
}
|
|
201
|
+
} finally {
|
|
202
|
+
if (_didIteratorError) {
|
|
203
|
+
throw _iteratorError;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
var seeds = {};
|
|
208
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
209
|
+
try {
|
|
210
|
+
for (var _iterator1 = keys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
211
|
+
var key3 = _step1.value;
|
|
212
|
+
var value2 = lastPainted[key3];
|
|
213
|
+
if (typeof value2 !== "number" && typeof value2 !== "string") continue;
|
|
214
|
+
if (value2 === "auto" || typeof value2 === "string" && value2.startsWith("calc")) {
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
if (COLOR_STYLE_KEYS[key3]) value2 = normalizeAnimationColor(value2);
|
|
218
|
+
if (value2 !== void 0) seeds[key3] = value2;
|
|
219
|
+
}
|
|
220
|
+
} catch (err) {
|
|
221
|
+
_didIteratorError1 = true;
|
|
222
|
+
_iteratorError1 = err;
|
|
223
|
+
} finally {
|
|
224
|
+
try {
|
|
225
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
226
|
+
_iterator1.return();
|
|
227
|
+
}
|
|
228
|
+
} finally {
|
|
229
|
+
if (_didIteratorError1) {
|
|
230
|
+
throw _iteratorError1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
var gatedKeys = {};
|
|
235
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
236
|
+
try {
|
|
237
|
+
for (var _iterator2 = keys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
238
|
+
var key4 = _step2.value;
|
|
239
|
+
gatedKeys[key4] = true;
|
|
240
|
+
}
|
|
241
|
+
} catch (err) {
|
|
242
|
+
_didIteratorError2 = true;
|
|
243
|
+
_iteratorError2 = err;
|
|
244
|
+
} finally {
|
|
245
|
+
try {
|
|
246
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
247
|
+
_iterator2.return();
|
|
248
|
+
}
|
|
249
|
+
} finally {
|
|
250
|
+
if (_didIteratorError2) {
|
|
251
|
+
throw _iteratorError2;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
var removedKeys = getRemovedAnimatedKeys(keys, previousKeys);
|
|
256
|
+
var painted = {
|
|
257
|
+
...snapshotStatics,
|
|
258
|
+
...snapshotAnimated
|
|
259
|
+
};
|
|
260
|
+
var staticTransforms = getAnimatedTransforms(snapshotStatics.transform);
|
|
261
|
+
delete painted.transform;
|
|
262
|
+
var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;
|
|
263
|
+
try {
|
|
264
|
+
for (var _iterator3 = staticTransforms[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
265
|
+
var transform1 = _step3.value;
|
|
266
|
+
var key5 = Object.keys(transform1)[0];
|
|
267
|
+
if (key5) painted[`transform:${key5}`] = transform1[key5];
|
|
268
|
+
}
|
|
269
|
+
} catch (err) {
|
|
270
|
+
_didIteratorError3 = true;
|
|
271
|
+
_iteratorError3 = err;
|
|
272
|
+
} finally {
|
|
273
|
+
try {
|
|
274
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
275
|
+
_iterator3.return();
|
|
276
|
+
}
|
|
277
|
+
} finally {
|
|
278
|
+
if (_didIteratorError3) {
|
|
279
|
+
throw _iteratorError3;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;
|
|
284
|
+
try {
|
|
285
|
+
for (var _iterator4 = snapshotTransforms[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
|
|
286
|
+
var transform2 = _step4.value;
|
|
287
|
+
var key6 = Object.keys(transform2)[0];
|
|
288
|
+
if (key6) painted[`transform:${key6}`] = transform2[key6];
|
|
289
|
+
}
|
|
290
|
+
} catch (err) {
|
|
291
|
+
_didIteratorError4 = true;
|
|
292
|
+
_iteratorError4 = err;
|
|
293
|
+
} finally {
|
|
294
|
+
try {
|
|
295
|
+
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
|
296
|
+
_iterator4.return();
|
|
297
|
+
}
|
|
298
|
+
} finally {
|
|
299
|
+
if (_didIteratorError4) {
|
|
300
|
+
throw _iteratorError4;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
value: {
|
|
306
|
+
animated: snapshotAnimated,
|
|
307
|
+
statics: snapshotStatics,
|
|
308
|
+
transforms: snapshotTransforms,
|
|
309
|
+
gatedKeys,
|
|
310
|
+
seeds,
|
|
311
|
+
removedKeys,
|
|
312
|
+
removeTransform: Object.keys(removedKeys).some(function(key7) {
|
|
313
|
+
return key7.startsWith("transform:");
|
|
314
|
+
}),
|
|
315
|
+
clearValue: isWeb ? "" : null
|
|
316
|
+
},
|
|
317
|
+
painted,
|
|
318
|
+
keys
|
|
319
|
+
};
|
|
336
320
|
};
|
|
337
|
-
var getGatedKeys = function
|
|
338
|
-
|
|
321
|
+
var getGatedKeys = function(snapshot) {
|
|
322
|
+
return Object.keys(snapshot.gatedKeys);
|
|
339
323
|
};
|
|
340
|
-
var createReanimatedConfig = function
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return next;
|
|
324
|
+
var createReanimatedConfig = function(config) {
|
|
325
|
+
"worklet";
|
|
326
|
+
var next = {};
|
|
327
|
+
var source = config;
|
|
328
|
+
for (var key in source) {
|
|
329
|
+
if (key === "type" || key === "delay") continue;
|
|
330
|
+
var value = source[key];
|
|
331
|
+
if (value !== void 0) {
|
|
332
|
+
next[key] = value;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return next;
|
|
353
336
|
};
|
|
354
|
-
var applyAnimation = function
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
337
|
+
var applyAnimation = function(targetValue, config, callback, seedValue) {
|
|
338
|
+
"worklet";
|
|
339
|
+
var validateStartAsColor = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
340
|
+
var delay = config.delay;
|
|
341
|
+
var reanimatedConfig = createReanimatedConfig(config);
|
|
342
|
+
var animatedValue;
|
|
343
|
+
if (config.type === "timing") {
|
|
344
|
+
animatedValue = withTiming(targetValue, reanimatedConfig, callback);
|
|
345
|
+
} else {
|
|
346
|
+
animatedValue = withSpring(targetValue, reanimatedConfig, callback);
|
|
347
|
+
var innerOnFrame = animatedValue.onFrame;
|
|
348
|
+
animatedValue.onFrame = function(animation, now) {
|
|
349
|
+
"worklet";
|
|
350
|
+
return innerOnFrame(animation, now < animation.lastTimestamp ? animation.lastTimestamp : now);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
if (seedValue !== void 0 || validateStartAsColor) {
|
|
354
|
+
var innerOnStart = animatedValue.onStart;
|
|
355
|
+
animatedValue.onStart = function(animation, value, timestamp, previousAnimation) {
|
|
356
|
+
"worklet";
|
|
357
|
+
var startValue = validateStartAsColor ? isReanimatedColorHistory(value) ? toReanimatedColor(value) : seedValue !== null && seedValue !== void 0 ? seedValue : targetValue : seedValue;
|
|
358
|
+
innerOnStart(animation, startValue, timestamp, previousAnimation);
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
if (delay && delay > 0) {
|
|
362
|
+
animatedValue = withDelay(delay, animatedValue);
|
|
363
|
+
}
|
|
364
|
+
return animatedValue;
|
|
379
365
|
};
|
|
380
|
-
var animateSnapshotValue = function
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
366
|
+
var animateSnapshotValue = function(key, implicitKey, targetValue, config, previouslyEmitted, seedValue, gated, currentlyExiting, exitCycleId, currentlyCompletingEnter, enterCycleId, currentlyCompletingUpdate, updateCycleId, markExitKeyDone, markEnterKeyDone, markUpdateKeyDone) {
|
|
367
|
+
"worklet";
|
|
368
|
+
var validateStartAsColor = arguments.length > 16 && arguments[16] !== void 0 ? arguments[16] : false;
|
|
369
|
+
var cycleGated = gated && (currentlyExiting || currentlyCompletingEnter || currentlyCompletingUpdate);
|
|
370
|
+
if (!previouslyEmitted && seedValue === void 0 && !cycleGated) {
|
|
371
|
+
return targetValue;
|
|
372
|
+
}
|
|
373
|
+
var callback;
|
|
374
|
+
if (gated && currentlyExiting) {
|
|
375
|
+
callback = function(finished) {
|
|
376
|
+
"worklet";
|
|
377
|
+
runOnJS(markExitKeyDone)(key, exitCycleId, finished !== null && finished !== void 0 ? finished : false);
|
|
378
|
+
};
|
|
379
|
+
} else if (gated && currentlyCompletingEnter) {
|
|
380
|
+
callback = function() {
|
|
381
|
+
"worklet";
|
|
382
|
+
runOnJS(markEnterKeyDone)(key, enterCycleId);
|
|
383
|
+
};
|
|
384
|
+
} else if (gated && currentlyCompletingUpdate) {
|
|
385
|
+
callback = function(finished) {
|
|
386
|
+
"worklet";
|
|
387
|
+
runOnJS(markUpdateKeyDone)(key, updateCycleId, finished !== null && finished !== void 0 ? finished : false);
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return applyAnimation(targetValue, config, callback, previouslyEmitted ? void 0 : seedValue !== null && seedValue !== void 0 ? seedValue : getImplicitDefault(implicitKey, targetValue), validateStartAsColor);
|
|
403
391
|
};
|
|
404
392
|
var ANIMATABLE_PROPERTIES = {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
paddingBottom: true,
|
|
459
|
-
paddingLeft: true,
|
|
460
|
-
paddingRight: true,
|
|
461
|
-
paddingHorizontal: true,
|
|
462
|
-
paddingVertical: true,
|
|
463
|
-
// Flex/Gap
|
|
464
|
-
gap: true,
|
|
465
|
-
rowGap: true,
|
|
466
|
-
columnGap: true,
|
|
467
|
-
flex: true,
|
|
468
|
-
flexGrow: true,
|
|
469
|
-
flexShrink: true
|
|
393
|
+
transform: true,
|
|
394
|
+
opacity: true,
|
|
395
|
+
height: true,
|
|
396
|
+
width: true,
|
|
397
|
+
minWidth: true,
|
|
398
|
+
minHeight: true,
|
|
399
|
+
maxWidth: true,
|
|
400
|
+
maxHeight: true,
|
|
401
|
+
backgroundColor: true,
|
|
402
|
+
borderColor: true,
|
|
403
|
+
borderLeftColor: true,
|
|
404
|
+
borderRightColor: true,
|
|
405
|
+
borderTopColor: true,
|
|
406
|
+
borderBottomColor: true,
|
|
407
|
+
borderRadius: true,
|
|
408
|
+
borderTopLeftRadius: true,
|
|
409
|
+
borderTopRightRadius: true,
|
|
410
|
+
borderBottomLeftRadius: true,
|
|
411
|
+
borderBottomRightRadius: true,
|
|
412
|
+
borderWidth: true,
|
|
413
|
+
borderLeftWidth: true,
|
|
414
|
+
borderRightWidth: true,
|
|
415
|
+
borderTopWidth: true,
|
|
416
|
+
borderBottomWidth: true,
|
|
417
|
+
color: true,
|
|
418
|
+
fontSize: true,
|
|
419
|
+
fontWeight: true,
|
|
420
|
+
lineHeight: true,
|
|
421
|
+
letterSpacing: true,
|
|
422
|
+
left: true,
|
|
423
|
+
right: true,
|
|
424
|
+
top: true,
|
|
425
|
+
bottom: true,
|
|
426
|
+
margin: true,
|
|
427
|
+
marginTop: true,
|
|
428
|
+
marginBottom: true,
|
|
429
|
+
marginLeft: true,
|
|
430
|
+
marginRight: true,
|
|
431
|
+
marginHorizontal: true,
|
|
432
|
+
marginVertical: true,
|
|
433
|
+
padding: true,
|
|
434
|
+
paddingTop: true,
|
|
435
|
+
paddingBottom: true,
|
|
436
|
+
paddingLeft: true,
|
|
437
|
+
paddingRight: true,
|
|
438
|
+
paddingHorizontal: true,
|
|
439
|
+
paddingVertical: true,
|
|
440
|
+
gap: true,
|
|
441
|
+
rowGap: true,
|
|
442
|
+
columnGap: true,
|
|
443
|
+
flex: true,
|
|
444
|
+
flexGrow: true,
|
|
445
|
+
flexShrink: true
|
|
470
446
|
};
|
|
471
|
-
var canAnimateProperty = function
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
447
|
+
var canAnimateProperty = function(key, value, animateOnly) {
|
|
448
|
+
if (!ANIMATABLE_PROPERTIES[key]) return false;
|
|
449
|
+
if (value === "auto") return false;
|
|
450
|
+
if (typeof value === "string" && value.startsWith("calc")) return false;
|
|
451
|
+
if (animateOnly && !animateOnly.includes(key)) return false;
|
|
452
|
+
return true;
|
|
477
453
|
};
|
|
478
|
-
var splitAnimationStyles = function
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
454
|
+
var splitAnimationStyles = function(style, isDark, disableAnimation, animateOnly) {
|
|
455
|
+
var animated = {};
|
|
456
|
+
var statics = {};
|
|
457
|
+
for (var key in style) {
|
|
458
|
+
var value = resolveDynamicValue(style[key], isDark);
|
|
459
|
+
if (value === void 0) continue;
|
|
460
|
+
if (!disableAnimation && canAnimateProperty(key, value, animateOnly)) {
|
|
461
|
+
animated[key] = cloneAnimationValue(value);
|
|
462
|
+
} else {
|
|
463
|
+
statics[key] = cloneAnimationValue(value);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
animated,
|
|
468
|
+
statics
|
|
469
|
+
};
|
|
494
470
|
};
|
|
495
471
|
function createWebAnimatedComponent(defaultTag) {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
return /* @__PURE__ */_jsx(Element, {
|
|
524
|
-
...transformedProps,
|
|
525
|
-
ref: composedRefs
|
|
526
|
-
});
|
|
527
|
-
}));
|
|
528
|
-
Component.acceptRenderProp = true;
|
|
529
|
-
return Component;
|
|
472
|
+
var isText = defaultTag === "span";
|
|
473
|
+
var Component = Animated.createAnimatedComponent(createRefComponent(function(propsIn, ref) {
|
|
474
|
+
var _hooks_usePropsTransform;
|
|
475
|
+
var { forwardedRef, render = defaultTag, ...rest } = propsIn;
|
|
476
|
+
var hostRef = useRef(null);
|
|
477
|
+
var composedRefs = useComposedRefs(forwardedRef, ref, hostRef);
|
|
478
|
+
var stateRef = useRef({ get host() {
|
|
479
|
+
return hostRef.current;
|
|
480
|
+
} });
|
|
481
|
+
var [, themeState] = useThemeWithState({});
|
|
482
|
+
var _themeState_theme, _themeState_name;
|
|
483
|
+
var result = getSplitStyles(rest, isText ? Text.staticConfig : View.staticConfig, (_themeState_theme = themeState === null || themeState === void 0 ? void 0 : themeState.theme) !== null && _themeState_theme !== void 0 ? _themeState_theme : {}, (_themeState_name = themeState === null || themeState === void 0 ? void 0 : themeState.name) !== null && _themeState_name !== void 0 ? _themeState_name : "", { unmounted: false }, {
|
|
484
|
+
isAnimated: false,
|
|
485
|
+
noClass: true
|
|
486
|
+
});
|
|
487
|
+
var _result_viewProps;
|
|
488
|
+
var viewProps = (_result_viewProps = result === null || result === void 0 ? void 0 : result.viewProps) !== null && _result_viewProps !== void 0 ? _result_viewProps : {};
|
|
489
|
+
var Element = render;
|
|
490
|
+
var transformedProps = (_hooks_usePropsTransform = hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(hooks, render, viewProps, stateRef, false);
|
|
491
|
+
var { nativeID, ...webProps } = transformedProps !== null && transformedProps !== void 0 ? transformedProps : viewProps;
|
|
492
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
493
|
+
...webProps,
|
|
494
|
+
ref: composedRefs
|
|
495
|
+
});
|
|
496
|
+
}));
|
|
497
|
+
Component.acceptRenderProp = true;
|
|
498
|
+
return Component;
|
|
530
499
|
}
|
|
531
500
|
var AnimatedView = createWebAnimatedComponent("div");
|
|
532
501
|
var AnimatedText = createWebAnimatedComponent("span");
|
|
533
502
|
function buildTransitionConfig(transition, animations, animationState, styleKeys) {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
return {
|
|
598
|
-
baseConfig: base,
|
|
599
|
-
propertyConfigs
|
|
600
|
-
};
|
|
503
|
+
var normalized = normalizeTransition(transition);
|
|
504
|
+
var effectiveKey = getEffectiveAnimation(normalized, animationState);
|
|
505
|
+
var _animations_effectiveKey;
|
|
506
|
+
var base = cloneTransitionConfig(effectiveKey ? (_animations_effectiveKey = animations[effectiveKey]) !== null && _animations_effectiveKey !== void 0 ? _animations_effectiveKey : { type: "spring" } : { type: "spring" });
|
|
507
|
+
if (normalized.delay) {
|
|
508
|
+
base = cloneTransitionConfig({
|
|
509
|
+
...base,
|
|
510
|
+
delay: normalized.delay
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
if (normalized.config) {
|
|
514
|
+
base = cloneTransitionConfig({
|
|
515
|
+
...base,
|
|
516
|
+
...normalized.config
|
|
517
|
+
});
|
|
518
|
+
if (base.type !== "timing" && normalized.config.duration !== void 0 && normalized.config.damping === void 0 && normalized.config.stiffness === void 0 && normalized.config.mass === void 0) {
|
|
519
|
+
base = cloneTransitionConfig({
|
|
520
|
+
...base,
|
|
521
|
+
type: "timing"
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
var propertyConfigs = {};
|
|
526
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
527
|
+
try {
|
|
528
|
+
for (var _iterator = styleKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
529
|
+
var key = _step.value;
|
|
530
|
+
var propAnimation = normalized.properties[key];
|
|
531
|
+
if (typeof propAnimation === "string") {
|
|
532
|
+
var _animations_propAnimation;
|
|
533
|
+
propertyConfigs[key] = cloneTransitionConfig((_animations_propAnimation = animations[propAnimation]) !== null && _animations_propAnimation !== void 0 ? _animations_propAnimation : base);
|
|
534
|
+
} else if (propAnimation && (typeof propAnimation === "undefined" ? "undefined" : _type_of(propAnimation)) === "object") {
|
|
535
|
+
var configType = propAnimation.type;
|
|
536
|
+
var _animations_configType;
|
|
537
|
+
var baseForProp = configType ? (_animations_configType = animations[configType]) !== null && _animations_configType !== void 0 ? _animations_configType : base : base;
|
|
538
|
+
propertyConfigs[key] = cloneTransitionConfig({
|
|
539
|
+
...baseForProp,
|
|
540
|
+
...propAnimation
|
|
541
|
+
});
|
|
542
|
+
} else {
|
|
543
|
+
propertyConfigs[key] = cloneTransitionConfig(base);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
} catch (err) {
|
|
547
|
+
_didIteratorError = true;
|
|
548
|
+
_iteratorError = err;
|
|
549
|
+
} finally {
|
|
550
|
+
try {
|
|
551
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
552
|
+
_iterator.return();
|
|
553
|
+
}
|
|
554
|
+
} finally {
|
|
555
|
+
if (_didIteratorError) {
|
|
556
|
+
throw _iteratorError;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return {
|
|
561
|
+
baseConfig: base,
|
|
562
|
+
propertyConfigs
|
|
563
|
+
};
|
|
601
564
|
}
|
|
602
565
|
function getStyleKeys(style) {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
return keys;
|
|
566
|
+
var keys = new Set(Object.keys(style));
|
|
567
|
+
if (style.transform && Array.isArray(style.transform)) {
|
|
568
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
569
|
+
try {
|
|
570
|
+
for (var _iterator = style.transform[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
571
|
+
var t = _step.value;
|
|
572
|
+
if (t && (typeof t === "undefined" ? "undefined" : _type_of(t)) === "object") {
|
|
573
|
+
keys.add(Object.keys(t)[0]);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
} catch (err) {
|
|
577
|
+
_didIteratorError = true;
|
|
578
|
+
_iteratorError = err;
|
|
579
|
+
} finally {
|
|
580
|
+
try {
|
|
581
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
582
|
+
_iterator.return();
|
|
583
|
+
}
|
|
584
|
+
} finally {
|
|
585
|
+
if (_didIteratorError) {
|
|
586
|
+
throw _iteratorError;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
return keys;
|
|
631
592
|
}
|
|
632
593
|
function createAnimations(animationsConfig) {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
594
|
+
var animations = {};
|
|
595
|
+
for (var key in animationsConfig) {
|
|
596
|
+
animations[key] = cloneTransitionConfig({
|
|
597
|
+
type: "spring",
|
|
598
|
+
...animationsConfig[key]
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
return {
|
|
602
|
+
needsCustomComponent: true,
|
|
603
|
+
View: isWeb ? AnimatedView : Animated.View,
|
|
604
|
+
Text: isWeb ? AnimatedText : Animated.Text,
|
|
605
|
+
isReactNative: true,
|
|
606
|
+
inputStyle: "value",
|
|
607
|
+
outputStyle: "inline",
|
|
608
|
+
avoidReRenders: true,
|
|
609
|
+
animations,
|
|
610
|
+
usePresence,
|
|
611
|
+
ResetPresence,
|
|
612
|
+
useAnimatedNumber(initial) {
|
|
613
|
+
var sharedValue = useSharedValue(initial);
|
|
614
|
+
return useMemo(function() {
|
|
615
|
+
return {
|
|
616
|
+
getInstance() {
|
|
617
|
+
"worklet";
|
|
618
|
+
return sharedValue;
|
|
619
|
+
},
|
|
620
|
+
getValue() {
|
|
621
|
+
"worklet";
|
|
622
|
+
return sharedValue.value;
|
|
623
|
+
},
|
|
624
|
+
setValue(next) {
|
|
625
|
+
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { type: "spring" }, onFinish = arguments.length > 2 ? arguments[2] : void 0;
|
|
626
|
+
if (config.type === "direct") {
|
|
627
|
+
sharedValue.value = next;
|
|
628
|
+
onFinish === null || onFinish === void 0 ? void 0 : onFinish();
|
|
629
|
+
} else {
|
|
630
|
+
var cb = onFinish ? function(finished) {
|
|
631
|
+
"worklet";
|
|
632
|
+
if (finished !== false) {
|
|
633
|
+
runOnJS(onFinish)();
|
|
634
|
+
}
|
|
635
|
+
} : void 0;
|
|
636
|
+
var animationConfig = cloneTransitionConfig(config);
|
|
637
|
+
if (isWeb) {
|
|
638
|
+
sharedValue.value = applyAnimation(next, animationConfig, cb);
|
|
639
|
+
} else {
|
|
640
|
+
runOnUI(function(targetValue, animationConfig2) {
|
|
641
|
+
"worklet";
|
|
642
|
+
sharedValue.value = applyAnimation(targetValue, animationConfig2, cb);
|
|
643
|
+
})(next, animationConfig);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
stop() {
|
|
648
|
+
cancelAnimation(sharedValue);
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
}, [sharedValue]);
|
|
652
|
+
},
|
|
653
|
+
useAnimatedNumberReaction(param, onValue) {
|
|
654
|
+
var { value } = param;
|
|
655
|
+
var instance = value.getInstance();
|
|
656
|
+
return useAnimatedReaction(function() {
|
|
657
|
+
return instance.value;
|
|
658
|
+
}, function(next, prev) {
|
|
659
|
+
if (prev !== next) {
|
|
660
|
+
runOnJS(onValue)(next);
|
|
661
|
+
}
|
|
662
|
+
}, [onValue, instance]);
|
|
663
|
+
},
|
|
664
|
+
useAnimatedNumberStyle(val, getStyle) {
|
|
665
|
+
var instance = val.getInstance();
|
|
666
|
+
if (isWeb) {
|
|
667
|
+
return useAnimatedStyle(function() {
|
|
668
|
+
"worklet";
|
|
669
|
+
return getStyle(instance.value);
|
|
670
|
+
}, [instance, getStyle]);
|
|
671
|
+
}
|
|
672
|
+
var styleVal = useDerivedValue(function() {
|
|
673
|
+
"worklet";
|
|
674
|
+
return getStyle(instance.value);
|
|
675
|
+
});
|
|
676
|
+
var animatedStyle = useAnimatedStyle(function() {
|
|
677
|
+
"worklet";
|
|
678
|
+
return styleVal.value;
|
|
679
|
+
});
|
|
680
|
+
silenceAnimatedComponentDevCheck(animatedStyle);
|
|
681
|
+
return animatedStyle;
|
|
682
|
+
},
|
|
683
|
+
useAnimatedNumbersStyle(vals, getStyle) {
|
|
684
|
+
var instances = vals.map(function(v) {
|
|
685
|
+
return v.getInstance();
|
|
686
|
+
});
|
|
687
|
+
var animatedStyle = useAnimatedStyle(function() {
|
|
688
|
+
"worklet";
|
|
689
|
+
var currentValues = instances.map(function(inst) {
|
|
690
|
+
return inst.value;
|
|
691
|
+
});
|
|
692
|
+
return getStyle(...currentValues);
|
|
693
|
+
}, isWeb ? [getStyle, ...instances] : void 0);
|
|
694
|
+
silenceAnimatedComponentDevCheck(animatedStyle);
|
|
695
|
+
return animatedStyle;
|
|
696
|
+
},
|
|
697
|
+
useAnimations(animationProps) {
|
|
698
|
+
var { props, presence, style, componentState, useStyleEmitter, themeName, stateRef, styleState, onTransition } = animationProps;
|
|
699
|
+
var isHydrating = componentState.unmounted === true;
|
|
700
|
+
var isMounting = componentState.unmounted === "should-enter";
|
|
701
|
+
var isEntering = !!componentState.unmounted;
|
|
702
|
+
var isExiting = (presence === null || presence === void 0 ? void 0 : presence[0]) === false;
|
|
703
|
+
var wasEnteringRef = useRef(isEntering);
|
|
704
|
+
var justFinishedEntering = wasEnteringRef.current && !isEntering;
|
|
705
|
+
React.useEffect(function() {
|
|
706
|
+
wasEnteringRef.current = isEntering;
|
|
707
|
+
});
|
|
708
|
+
var _styleState_effectiveTransition;
|
|
709
|
+
var effectiveTransition = (_styleState_effectiveTransition = styleState === null || styleState === void 0 ? void 0 : styleState.effectiveTransition) !== null && _styleState_effectiveTransition !== void 0 ? _styleState_effectiveTransition : props.transition;
|
|
710
|
+
var normalized = normalizeTransition(effectiveTransition);
|
|
711
|
+
var animationState = isExiting ? "exit" : isMounting || justFinishedEntering ? "enter" : "default";
|
|
712
|
+
var animationKey = getEffectiveAnimation(normalized, animationState);
|
|
713
|
+
var disableAnimation = isHydrating || !animationKey;
|
|
714
|
+
var isDark = (themeName === null || themeName === void 0 ? void 0 : themeName.startsWith("dark")) || false;
|
|
715
|
+
var sendExitComplete = presence === null || presence === void 0 ? void 0 : presence[1];
|
|
716
|
+
var onTransitionRef = useRef(onTransition);
|
|
717
|
+
onTransitionRef.current = onTransition;
|
|
718
|
+
var emit = function(phase, cause, finished) {
|
|
719
|
+
var _onTransitionRef_current;
|
|
720
|
+
(_onTransitionRef_current = onTransitionRef.current) === null || _onTransitionRef_current === void 0 ? void 0 : _onTransitionRef_current.call(onTransitionRef, phase === "end" ? {
|
|
721
|
+
phase,
|
|
722
|
+
cause,
|
|
723
|
+
finished
|
|
724
|
+
} : {
|
|
725
|
+
phase,
|
|
726
|
+
cause
|
|
727
|
+
});
|
|
728
|
+
};
|
|
729
|
+
var enterStartedRef = useRef(false);
|
|
730
|
+
var exitStartedRef = useRef(false);
|
|
731
|
+
var updateStartedRef = useRef(false);
|
|
732
|
+
var isExitingJSRef = useRef(false);
|
|
733
|
+
isExitingJSRef.current = isExiting;
|
|
734
|
+
var updateCycleIdRef = useRef(0);
|
|
735
|
+
var pendingUpdateKeysRef = useRef(/* @__PURE__ */ new Set());
|
|
736
|
+
var updateCompletedRef = useRef(false);
|
|
737
|
+
var isCompletingUpdateRef = useSharedValue(false);
|
|
738
|
+
var updateCycleIdShared = useSharedValue(0);
|
|
739
|
+
var markUpdateKeyDone = useEvent(function(key2, cycleId, finished) {
|
|
740
|
+
if (!finished || cycleId !== updateCycleIdRef.current) return;
|
|
741
|
+
if (updateCompletedRef.current) return;
|
|
742
|
+
pendingUpdateKeysRef.current.delete(key2);
|
|
743
|
+
if (pendingUpdateKeysRef.current.size === 0) {
|
|
744
|
+
updateCompletedRef.current = true;
|
|
745
|
+
isCompletingUpdateRef.value = false;
|
|
746
|
+
if (updateStartedRef.current) {
|
|
747
|
+
updateStartedRef.current = false;
|
|
748
|
+
emit("end", "update", true);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
var exitCycleIdRef = useRef(0);
|
|
753
|
+
var pendingExitKeysRef = useRef(/* @__PURE__ */ new Set());
|
|
754
|
+
var exitCompletedRef = useRef(false);
|
|
755
|
+
var wasExitingRef = useRef(false);
|
|
756
|
+
var justStartedExiting = isExiting && !wasExitingRef.current;
|
|
757
|
+
var justStoppedExiting = !isExiting && wasExitingRef.current;
|
|
758
|
+
var markExitKeyDone = useEvent(function(key2, cycleId, finished) {
|
|
759
|
+
if (cycleId !== exitCycleIdRef.current) return;
|
|
760
|
+
if (exitCompletedRef.current) return;
|
|
761
|
+
pendingExitKeysRef.current.delete(key2);
|
|
762
|
+
if (pendingExitKeysRef.current.size === 0) {
|
|
763
|
+
exitCompletedRef.current = true;
|
|
764
|
+
if (exitStartedRef.current) {
|
|
765
|
+
exitStartedRef.current = false;
|
|
766
|
+
emit("end", "exit", true);
|
|
767
|
+
}
|
|
768
|
+
sendExitComplete === null || sendExitComplete === void 0 ? void 0 : sendExitComplete();
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
var enterCycleIdRef = useRef(0);
|
|
772
|
+
var pendingEnterKeysRef = useRef(/* @__PURE__ */ new Set());
|
|
773
|
+
var enterCompletedRef = useRef(false);
|
|
774
|
+
var markEnterKeyDone = useEvent(function(key2, cycleId) {
|
|
775
|
+
if (cycleId !== enterCycleIdRef.current) return;
|
|
776
|
+
if (enterCompletedRef.current) return;
|
|
777
|
+
if (isExitingJSRef.current) return;
|
|
778
|
+
pendingEnterKeysRef.current.delete(key2);
|
|
779
|
+
if (pendingEnterKeysRef.current.size === 0) {
|
|
780
|
+
enterCompletedRef.current = true;
|
|
781
|
+
if (enterStartedRef.current) {
|
|
782
|
+
enterStartedRef.current = false;
|
|
783
|
+
emit("end", "enter", true);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
var isExitingRef = useSharedValue(isExiting);
|
|
788
|
+
var exitCycleIdShared = useSharedValue(exitCycleIdRef.current);
|
|
789
|
+
var isCompletingEnterRef = useSharedValue(false);
|
|
790
|
+
var enterCycleIdShared = useSharedValue(enterCycleIdRef.current);
|
|
791
|
+
if (justStartedExiting) {
|
|
792
|
+
exitCycleIdRef.current++;
|
|
793
|
+
exitCompletedRef.current = false;
|
|
794
|
+
pendingExitKeysRef.current.clear();
|
|
795
|
+
enterCycleIdRef.current++;
|
|
796
|
+
pendingEnterKeysRef.current.clear();
|
|
797
|
+
updateCycleIdRef.current++;
|
|
798
|
+
pendingUpdateKeysRef.current.clear();
|
|
799
|
+
updateCompletedRef.current = true;
|
|
800
|
+
}
|
|
801
|
+
if (justStoppedExiting) {
|
|
802
|
+
exitCycleIdRef.current++;
|
|
803
|
+
pendingExitKeysRef.current.clear();
|
|
804
|
+
}
|
|
805
|
+
useIsomorphicLayoutEffect(function() {
|
|
806
|
+
isExitingRef.value = isExiting;
|
|
807
|
+
exitCycleIdShared.value = exitCycleIdRef.current;
|
|
808
|
+
isCompletingEnterRef.value = !isExiting && justFinishedEntering && Boolean(onTransitionRef.current);
|
|
809
|
+
enterCycleIdShared.value = enterCycleIdRef.current;
|
|
810
|
+
if (justStartedExiting) {
|
|
811
|
+
isCompletingUpdateRef.value = false;
|
|
812
|
+
updateCycleIdShared.value = updateCycleIdRef.current;
|
|
813
|
+
}
|
|
814
|
+
}, [
|
|
815
|
+
isExiting,
|
|
816
|
+
justFinishedEntering,
|
|
817
|
+
exitCycleIdRef.current,
|
|
818
|
+
enterCycleIdRef.current,
|
|
819
|
+
justStartedExiting
|
|
820
|
+
]);
|
|
821
|
+
useIsomorphicLayoutEffect(function() {
|
|
822
|
+
if (justStoppedExiting && exitStartedRef.current && !exitCompletedRef.current) {
|
|
823
|
+
exitStartedRef.current = false;
|
|
824
|
+
emit("end", "exit", false);
|
|
825
|
+
}
|
|
826
|
+
}, [justStoppedExiting]);
|
|
827
|
+
React.useEffect(function() {
|
|
828
|
+
wasExitingRef.current = isExiting;
|
|
829
|
+
});
|
|
830
|
+
var committedRenderKeysRef = useRef(/* @__PURE__ */ new Set());
|
|
831
|
+
var lastPaintedRef = useRef({});
|
|
832
|
+
var carryRef = useRef({});
|
|
833
|
+
var { animatedStyles, staticStyles, nextCarry } = useMemo(function() {
|
|
834
|
+
var animateOnly = props.animateOnly;
|
|
835
|
+
var { animated, statics } = splitAnimationStyles(style, isDark, disableAnimation, animateOnly);
|
|
836
|
+
var nextCarry2 = cloneStyleRecord(carryRef.current);
|
|
837
|
+
for (var key2 in nextCarry2) {
|
|
838
|
+
if (!(key2 in animated)) delete nextCarry2[key2];
|
|
839
|
+
}
|
|
840
|
+
for (var key1 in animated) {
|
|
841
|
+
if (!(key1 in nextCarry2)) {
|
|
842
|
+
nextCarry2[key1] = cloneAnimationValue(animated[key1]);
|
|
843
|
+
}
|
|
844
|
+
statics[key1] = nextCarry2[key1];
|
|
845
|
+
}
|
|
846
|
+
return {
|
|
847
|
+
animatedStyles: animated,
|
|
848
|
+
staticStyles: statics,
|
|
849
|
+
nextCarry: nextCarry2
|
|
850
|
+
};
|
|
851
|
+
}, [
|
|
852
|
+
disableAnimation,
|
|
853
|
+
style,
|
|
854
|
+
isDark,
|
|
855
|
+
props.animateOnly
|
|
856
|
+
]);
|
|
857
|
+
var renderSnapshot = useMemo(function() {
|
|
858
|
+
return buildSnapshot(animatedStyles, staticStyles, getAnimatedTransforms(animatedStyles.transform), committedRenderKeysRef.current, lastPaintedRef.current);
|
|
859
|
+
}, [animatedStyles, staticStyles]);
|
|
860
|
+
var renderSnapshotRef = useSharedValue({
|
|
861
|
+
animated: {},
|
|
862
|
+
statics: {},
|
|
863
|
+
transforms: [],
|
|
864
|
+
gatedKeys: {},
|
|
865
|
+
seeds: {},
|
|
866
|
+
removedKeys: {},
|
|
867
|
+
removeTransform: false,
|
|
868
|
+
clearValue: isWeb ? "" : null
|
|
869
|
+
});
|
|
870
|
+
var emitterSnapshotRef = useSharedValue(null);
|
|
871
|
+
var emitterKeysRef = useRef(null);
|
|
872
|
+
useIsomorphicLayoutEffect(function() {
|
|
873
|
+
carryRef.current = nextCarry;
|
|
874
|
+
committedRenderKeysRef.current = renderSnapshot.keys;
|
|
875
|
+
lastPaintedRef.current = renderSnapshot.painted;
|
|
876
|
+
}, [nextCarry, renderSnapshot]);
|
|
877
|
+
var pseudoActiveRef = useRef(false);
|
|
878
|
+
var publishedSnapshotRef = useRef(null);
|
|
879
|
+
useIsomorphicLayoutEffect(function() {
|
|
880
|
+
var renderChanged = publishedSnapshotRef.current !== renderSnapshot.value;
|
|
881
|
+
var droppingLatch = (isExiting || !pseudoActiveRef.current && publishedSnapshotRef.current !== null && renderChanged) && emitterSnapshotRef.value !== null;
|
|
882
|
+
var emitterKeys = droppingLatch ? emitterKeysRef.current : null;
|
|
883
|
+
if (droppingLatch || renderChanged) {
|
|
884
|
+
var removedKeys = emitterKeys ? {
|
|
885
|
+
...renderSnapshot.value.removedKeys,
|
|
886
|
+
...getRemovedAnimatedKeys(renderSnapshot.keys, emitterKeys)
|
|
887
|
+
} : renderSnapshot.value.removedKeys;
|
|
888
|
+
renderSnapshotRef.value = {
|
|
889
|
+
...renderSnapshot.value,
|
|
890
|
+
removedKeys,
|
|
891
|
+
removeTransform: Object.keys(removedKeys).some(function(key2) {
|
|
892
|
+
return key2.startsWith("transform:");
|
|
893
|
+
})
|
|
894
|
+
};
|
|
895
|
+
publishedSnapshotRef.current = renderSnapshot.value;
|
|
896
|
+
}
|
|
897
|
+
if (droppingLatch) {
|
|
898
|
+
emitterSnapshotRef.value = null;
|
|
899
|
+
emitterKeysRef.current = null;
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
var { baseConfig, propertyConfigs } = useMemo(function() {
|
|
903
|
+
if (isHydrating) {
|
|
904
|
+
return {
|
|
905
|
+
baseConfig: {
|
|
906
|
+
type: "timing",
|
|
907
|
+
duration: 0
|
|
908
|
+
},
|
|
909
|
+
propertyConfigs: {}
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
return buildTransitionConfig(effectiveTransition, animations, animationState, getStyleKeys(animatedStyles));
|
|
913
|
+
}, [
|
|
914
|
+
isHydrating,
|
|
915
|
+
effectiveTransition,
|
|
916
|
+
animatedStyles,
|
|
917
|
+
animationState
|
|
918
|
+
]);
|
|
919
|
+
var configRef = useSharedValue({
|
|
920
|
+
baseConfig,
|
|
921
|
+
propertyConfigs,
|
|
922
|
+
disableAnimation,
|
|
923
|
+
isHydrating
|
|
924
|
+
});
|
|
925
|
+
useIsomorphicLayoutEffect(function() {
|
|
926
|
+
configRef.value = {
|
|
927
|
+
baseConfig,
|
|
928
|
+
propertyConfigs,
|
|
929
|
+
disableAnimation,
|
|
930
|
+
isHydrating
|
|
931
|
+
};
|
|
932
|
+
}, [
|
|
933
|
+
baseConfig,
|
|
934
|
+
propertyConfigs,
|
|
935
|
+
disableAnimation,
|
|
936
|
+
isHydrating
|
|
937
|
+
]);
|
|
938
|
+
useStyleEmitter === null || useStyleEmitter === void 0 ? void 0 : useStyleEmitter(function(nextStyle, effectiveTransition2, pseudoActive) {
|
|
939
|
+
if (isExitingJSRef.current) return;
|
|
940
|
+
pseudoActiveRef.current = pseudoActive === true;
|
|
941
|
+
var animateOnly = props.animateOnly;
|
|
942
|
+
var transitionToUse = effectiveTransition2 !== null && effectiveTransition2 !== void 0 ? effectiveTransition2 : props.transition;
|
|
943
|
+
var { baseConfig: newBase, propertyConfigs: newPropertyConfigs } = buildTransitionConfig(transitionToUse, animations, animationState, getStyleKeys(nextStyle));
|
|
944
|
+
configRef.value = {
|
|
945
|
+
baseConfig: newBase,
|
|
946
|
+
propertyConfigs: newPropertyConfigs,
|
|
947
|
+
disableAnimation: configRef.value.disableAnimation,
|
|
948
|
+
isHydrating: configRef.value.isHydrating
|
|
949
|
+
};
|
|
950
|
+
var _emitterKeysRef_current;
|
|
951
|
+
var previousKeys = (_emitterKeysRef_current = emitterKeysRef.current) !== null && _emitterKeysRef_current !== void 0 ? _emitterKeysRef_current : committedRenderKeysRef.current;
|
|
952
|
+
var { animated, statics } = splitAnimationStyles(nextStyle, isDark, configRef.value.disableAnimation, animateOnly);
|
|
953
|
+
var snapshot = buildSnapshot(animated, statics, getAnimatedTransforms(animated.transform), previousKeys, lastPaintedRef.current);
|
|
954
|
+
emitterSnapshotRef.value = snapshot.value;
|
|
955
|
+
emitterKeysRef.current = snapshot.keys;
|
|
956
|
+
lastPaintedRef.current = snapshot.painted;
|
|
957
|
+
if (process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile") {
|
|
958
|
+
console.info("[animations-reanimated] useStyleEmitter update", {
|
|
959
|
+
animated,
|
|
960
|
+
statics,
|
|
961
|
+
transforms: snapshot.value.transforms
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
var exitKeysRegistered = useRef(false);
|
|
966
|
+
var enterKeysRegistered = useRef(false);
|
|
967
|
+
if (!isExiting && justFinishedEntering && onTransition) {
|
|
968
|
+
var enterKeys = getGatedKeys(renderSnapshot.value);
|
|
969
|
+
enterCycleIdRef.current++;
|
|
970
|
+
enterCompletedRef.current = false;
|
|
971
|
+
pendingEnterKeysRef.current = new Set(enterKeys);
|
|
972
|
+
enterKeysRegistered.current = enterKeys.length > 0;
|
|
973
|
+
}
|
|
974
|
+
if (justStartedExiting && sendExitComplete) {
|
|
975
|
+
var exitKeys = getGatedKeys(renderSnapshot.value);
|
|
976
|
+
pendingExitKeysRef.current = new Set(exitKeys);
|
|
977
|
+
exitKeysRegistered.current = exitKeys.length > 0;
|
|
978
|
+
}
|
|
979
|
+
var previousUpdateStyleRef = useRef(null);
|
|
980
|
+
var updateStyle = onTransition ? JSON.stringify(style) : null;
|
|
981
|
+
var previousUpdateStyle = previousUpdateStyleRef.current;
|
|
982
|
+
var shouldRegisterUpdate = updateStyle !== null && previousUpdateStyle !== null && previousUpdateStyle !== updateStyle && !isExiting && !isEntering && !justFinishedEntering;
|
|
983
|
+
var updateKeys = shouldRegisterUpdate ? getGatedKeys(renderSnapshot.value) : [];
|
|
984
|
+
useIsomorphicLayoutEffect(function() {
|
|
985
|
+
if (updateStyle === null) {
|
|
986
|
+
previousUpdateStyleRef.current = null;
|
|
987
|
+
isCompletingUpdateRef.value = false;
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
var previousStyleStillCurrent = previousUpdateStyleRef.current === previousUpdateStyle;
|
|
991
|
+
previousUpdateStyleRef.current = updateStyle;
|
|
992
|
+
if (!shouldRegisterUpdate || !previousStyleStillCurrent) return;
|
|
993
|
+
var cycleId = ++updateCycleIdRef.current;
|
|
994
|
+
pendingUpdateKeysRef.current = new Set(updateKeys);
|
|
995
|
+
updateCompletedRef.current = updateKeys.length === 0;
|
|
996
|
+
isCompletingUpdateRef.value = updateKeys.length > 0;
|
|
997
|
+
updateCycleIdShared.value = cycleId;
|
|
998
|
+
if (updateStartedRef.current) {
|
|
999
|
+
emit("end", "update", false);
|
|
1000
|
+
}
|
|
1001
|
+
updateStartedRef.current = true;
|
|
1002
|
+
emit("start", "update");
|
|
1003
|
+
if (updateKeys.length === 0) {
|
|
1004
|
+
updateStartedRef.current = false;
|
|
1005
|
+
emit("end", "update", true);
|
|
1006
|
+
}
|
|
1007
|
+
}, [updateStyle, shouldRegisterUpdate]);
|
|
1008
|
+
React.useEffect(function() {
|
|
1009
|
+
if (!justStartedExiting || !sendExitComplete) return;
|
|
1010
|
+
if (enterStartedRef.current) {
|
|
1011
|
+
enterStartedRef.current = false;
|
|
1012
|
+
emit("end", "enter", false);
|
|
1013
|
+
}
|
|
1014
|
+
if (updateStartedRef.current) {
|
|
1015
|
+
updateStartedRef.current = false;
|
|
1016
|
+
emit("end", "update", false);
|
|
1017
|
+
}
|
|
1018
|
+
if (onTransitionRef.current && !exitStartedRef.current) {
|
|
1019
|
+
exitStartedRef.current = true;
|
|
1020
|
+
emit("start", "exit");
|
|
1021
|
+
}
|
|
1022
|
+
if (!exitKeysRegistered.current && pendingExitKeysRef.current.size === 0) {
|
|
1023
|
+
if (!exitCompletedRef.current) {
|
|
1024
|
+
exitCompletedRef.current = true;
|
|
1025
|
+
if (exitStartedRef.current) {
|
|
1026
|
+
exitStartedRef.current = false;
|
|
1027
|
+
emit("end", "exit", true);
|
|
1028
|
+
}
|
|
1029
|
+
sendExitComplete();
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}, [justStartedExiting, sendExitComplete]);
|
|
1033
|
+
React.useEffect(function() {
|
|
1034
|
+
if (isExiting || !justFinishedEntering || !onTransition) return;
|
|
1035
|
+
if (!enterStartedRef.current) {
|
|
1036
|
+
enterStartedRef.current = true;
|
|
1037
|
+
emit("start", "enter");
|
|
1038
|
+
}
|
|
1039
|
+
if (!enterKeysRegistered.current && pendingEnterKeysRef.current.size === 0) {
|
|
1040
|
+
if (!enterCompletedRef.current) {
|
|
1041
|
+
enterCompletedRef.current = true;
|
|
1042
|
+
if (enterStartedRef.current) {
|
|
1043
|
+
enterStartedRef.current = false;
|
|
1044
|
+
emit("end", "enter", true);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}, [
|
|
1049
|
+
isExiting,
|
|
1050
|
+
justFinishedEntering,
|
|
1051
|
+
onTransition
|
|
1052
|
+
]);
|
|
1053
|
+
var mapperStateRef = useSharedValue({ emitted: {} });
|
|
1054
|
+
var animatedStyle = useAnimatedStyle(function() {
|
|
1055
|
+
"worklet";
|
|
1056
|
+
var mapperState = mapperStateRef.value;
|
|
1057
|
+
var config = configRef.value;
|
|
1058
|
+
if (config.disableAnimation || config.isHydrating) {
|
|
1059
|
+
updateMapperState(mapperStateRef, {});
|
|
1060
|
+
return {};
|
|
1061
|
+
}
|
|
1062
|
+
var previouslyEmitted = mapperState.emitted;
|
|
1063
|
+
var emitted = {};
|
|
1064
|
+
var result = {};
|
|
1065
|
+
var emitterSnapshot = emitterSnapshotRef.value;
|
|
1066
|
+
var snapshot = emitterSnapshot !== null && emitterSnapshot !== void 0 ? emitterSnapshot : renderSnapshotRef.value;
|
|
1067
|
+
var animatedValues = snapshot.animated;
|
|
1068
|
+
var staticValues = snapshot.statics;
|
|
1069
|
+
var currentlyExiting = isExitingRef.value;
|
|
1070
|
+
var currentCycleId = exitCycleIdShared.value;
|
|
1071
|
+
var currentlyCompletingEnter = isCompletingEnterRef.value;
|
|
1072
|
+
var currentEnterCycleId = enterCycleIdShared.value;
|
|
1073
|
+
var currentlyCompletingUpdate = isCompletingUpdateRef.value;
|
|
1074
|
+
var currentUpdateCycleId = updateCycleIdShared.value;
|
|
1075
|
+
for (var key2 in staticValues) {
|
|
1076
|
+
result[key2] = staticValues[key2];
|
|
1077
|
+
}
|
|
1078
|
+
for (var key1 in snapshot.removedKeys) {
|
|
1079
|
+
if (!key1.startsWith("transform:") && !(key1 in staticValues)) {
|
|
1080
|
+
result[key1] = snapshot.clearValue;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
for (var key22 in animatedValues) {
|
|
1084
|
+
if (key22 === "transform") continue;
|
|
1085
|
+
var targetValue = animatedValues[key22];
|
|
1086
|
+
emitted[key22] = true;
|
|
1087
|
+
if (typeof targetValue !== "number" && typeof targetValue !== "string") {
|
|
1088
|
+
result[key22] = targetValue;
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1091
|
+
var _config_propertyConfigs_key;
|
|
1092
|
+
result[key22] = animateSnapshotValue(key22, key22, targetValue, (_config_propertyConfigs_key = config.propertyConfigs[key22]) !== null && _config_propertyConfigs_key !== void 0 ? _config_propertyConfigs_key : config.baseConfig, !!previouslyEmitted[key22], snapshot.seeds[key22], !!snapshot.gatedKeys[key22], currentlyExiting, currentCycleId, currentlyCompletingEnter, currentEnterCycleId, currentlyCompletingUpdate, currentUpdateCycleId, markExitKeyDone, markEnterKeyDone, markUpdateKeyDone, !!COLOR_STYLE_KEYS[key22]);
|
|
1093
|
+
}
|
|
1094
|
+
var transforms = snapshot.transforms;
|
|
1095
|
+
if (transforms.length > 0 || snapshot.removeTransform) {
|
|
1096
|
+
var validTransforms = [];
|
|
1097
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1098
|
+
try {
|
|
1099
|
+
for (var _iterator = transforms[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1100
|
+
var t = _step.value;
|
|
1101
|
+
if (!t) continue;
|
|
1102
|
+
var keys = Object.keys(t);
|
|
1103
|
+
if (keys.length === 0) continue;
|
|
1104
|
+
var transformKey = keys[0];
|
|
1105
|
+
var value = t[transformKey];
|
|
1106
|
+
if (typeof value === "number" || typeof value === "string") {
|
|
1107
|
+
var _config_propertyConfigs_transformKey;
|
|
1108
|
+
var propConfig = (_config_propertyConfigs_transformKey = config.propertyConfigs[transformKey]) !== null && _config_propertyConfigs_transformKey !== void 0 ? _config_propertyConfigs_transformKey : config.baseConfig;
|
|
1109
|
+
var subKey = `transform:${transformKey}`;
|
|
1110
|
+
emitted[subKey] = true;
|
|
1111
|
+
validTransforms.push({ [transformKey]: animateSnapshotValue(subKey, transformKey, value, propConfig, !!previouslyEmitted[subKey], snapshot.seeds[subKey], !!snapshot.gatedKeys[subKey], currentlyExiting, currentCycleId, currentlyCompletingEnter, currentEnterCycleId, currentlyCompletingUpdate, currentUpdateCycleId, markExitKeyDone, markEnterKeyDone, markUpdateKeyDone) });
|
|
1112
|
+
} else {
|
|
1113
|
+
validTransforms.push(t);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
} catch (err) {
|
|
1117
|
+
_didIteratorError = true;
|
|
1118
|
+
_iteratorError = err;
|
|
1119
|
+
} finally {
|
|
1120
|
+
try {
|
|
1121
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1122
|
+
_iterator.return();
|
|
1123
|
+
}
|
|
1124
|
+
} finally {
|
|
1125
|
+
if (_didIteratorError) {
|
|
1126
|
+
throw _iteratorError;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
if (validTransforms.length > 0 || !("transform" in staticValues)) {
|
|
1131
|
+
result.transform = validTransforms;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
updateMapperState(mapperStateRef, emitted);
|
|
1135
|
+
return result;
|
|
1136
|
+
}, isWeb ? [
|
|
1137
|
+
renderSnapshotRef,
|
|
1138
|
+
emitterSnapshotRef,
|
|
1139
|
+
configRef,
|
|
1140
|
+
isExitingRef,
|
|
1141
|
+
exitCycleIdShared,
|
|
1142
|
+
markExitKeyDone,
|
|
1143
|
+
isCompletingEnterRef,
|
|
1144
|
+
enterCycleIdShared,
|
|
1145
|
+
markEnterKeyDone,
|
|
1146
|
+
isCompletingUpdateRef,
|
|
1147
|
+
updateCycleIdShared,
|
|
1148
|
+
markUpdateKeyDone
|
|
1149
|
+
] : void 0);
|
|
1150
|
+
silenceAnimatedComponentDevCheck(animatedStyle);
|
|
1151
|
+
if (process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile") {
|
|
1152
|
+
console.info("[animations-reanimated] useAnimations", {
|
|
1153
|
+
animationKey,
|
|
1154
|
+
componentState,
|
|
1155
|
+
isExiting,
|
|
1156
|
+
animatedStyles,
|
|
1157
|
+
staticStyles,
|
|
1158
|
+
baseConfig,
|
|
1159
|
+
propertyConfigs
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
return { style: [staticStyles, animatedStyle] };
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1134
1165
|
}
|
|
1166
|
+
|
|
1135
1167
|
export { createAnimations };
|
|
1136
1168
|
//# sourceMappingURL=createAnimations.native.js.map
|