@tamagui/animations-react-native 1.89.26 → 1.89.27-1708112217600
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.native.js +290 -145
- package/dist/cjs/createAnimations.native.js.map +3 -3
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/cjs/polyfill.native.js.map +3 -3
- package/dist/esm/createAnimations.native.js +290 -145
- package/dist/esm/createAnimations.native.js.map +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/polyfill.native.js.map +3 -3
- package/package.json +6 -6
|
@@ -24,7 +24,121 @@ __export(createAnimations_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(createAnimations_exports);
|
|
26
26
|
var import_use_presence = require("@tamagui/use-presence"), import_constants = require("@tamagui/constants"), import_web = require("@tamagui/web"), import_react = require("react"), import_react_native = require("react-native");
|
|
27
|
-
|
|
27
|
+
function _array_like_to_array(arr, len) {
|
|
28
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
29
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
30
|
+
arr2[i] = arr[i];
|
|
31
|
+
return arr2;
|
|
32
|
+
}
|
|
33
|
+
function _array_with_holes(arr) {
|
|
34
|
+
if (Array.isArray(arr))
|
|
35
|
+
return arr;
|
|
36
|
+
}
|
|
37
|
+
function _array_without_holes(arr) {
|
|
38
|
+
if (Array.isArray(arr))
|
|
39
|
+
return _array_like_to_array(arr);
|
|
40
|
+
}
|
|
41
|
+
function _define_property(obj, key, value) {
|
|
42
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
43
|
+
value,
|
|
44
|
+
enumerable: !0,
|
|
45
|
+
configurable: !0,
|
|
46
|
+
writable: !0
|
|
47
|
+
}) : obj[key] = value, obj;
|
|
48
|
+
}
|
|
49
|
+
function _iterable_to_array(iter) {
|
|
50
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
51
|
+
return Array.from(iter);
|
|
52
|
+
}
|
|
53
|
+
function _iterable_to_array_limit(arr, i) {
|
|
54
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
55
|
+
if (_i != null) {
|
|
56
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
57
|
+
try {
|
|
58
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
59
|
+
;
|
|
60
|
+
} catch (err) {
|
|
61
|
+
_d = !0, _e = err;
|
|
62
|
+
} finally {
|
|
63
|
+
try {
|
|
64
|
+
!_n && _i.return != null && _i.return();
|
|
65
|
+
} finally {
|
|
66
|
+
if (_d)
|
|
67
|
+
throw _e;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return _arr;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function _non_iterable_rest() {
|
|
74
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
75
|
+
}
|
|
76
|
+
function _non_iterable_spread() {
|
|
77
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
78
|
+
}
|
|
79
|
+
function _object_spread(target) {
|
|
80
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
81
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
82
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
83
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
84
|
+
}))), ownKeys2.forEach(function(key) {
|
|
85
|
+
_define_property(target, key, source[key]);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return target;
|
|
89
|
+
}
|
|
90
|
+
function ownKeys(object, enumerableOnly) {
|
|
91
|
+
var keys = Object.keys(object);
|
|
92
|
+
if (Object.getOwnPropertySymbols) {
|
|
93
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
94
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
95
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
96
|
+
})), keys.push.apply(keys, symbols);
|
|
97
|
+
}
|
|
98
|
+
return keys;
|
|
99
|
+
}
|
|
100
|
+
function _object_spread_props(target, source) {
|
|
101
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
102
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
103
|
+
}), target;
|
|
104
|
+
}
|
|
105
|
+
function _object_without_properties(source, excluded) {
|
|
106
|
+
if (source == null)
|
|
107
|
+
return {};
|
|
108
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
109
|
+
if (Object.getOwnPropertySymbols) {
|
|
110
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
111
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
112
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
113
|
+
}
|
|
114
|
+
return target;
|
|
115
|
+
}
|
|
116
|
+
function _object_without_properties_loose(source, excluded) {
|
|
117
|
+
if (source == null)
|
|
118
|
+
return {};
|
|
119
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
120
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
121
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
122
|
+
return target;
|
|
123
|
+
}
|
|
124
|
+
function _sliced_to_array(arr, i) {
|
|
125
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
126
|
+
}
|
|
127
|
+
function _to_consumable_array(arr) {
|
|
128
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
129
|
+
}
|
|
130
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
131
|
+
if (o) {
|
|
132
|
+
if (typeof o == "string")
|
|
133
|
+
return _array_like_to_array(o, minLen);
|
|
134
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
135
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
136
|
+
return Array.from(n);
|
|
137
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
138
|
+
return _array_like_to_array(o, minLen);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
var animatedStyleKey = {
|
|
28
142
|
transform: !0,
|
|
29
143
|
opacity: !0
|
|
30
144
|
}, colorStyleKey = {
|
|
@@ -35,7 +149,7 @@ const animatedStyleKey = {
|
|
|
35
149
|
borderRightColor: !0,
|
|
36
150
|
borderTopColor: !0,
|
|
37
151
|
borderBottomColor: !0
|
|
38
|
-
}, costlyToAnimateStyleKey = {
|
|
152
|
+
}, costlyToAnimateStyleKey = _object_spread({
|
|
39
153
|
borderRadius: !0,
|
|
40
154
|
borderTopLeftRadius: !0,
|
|
41
155
|
borderTopRightRadius: !0,
|
|
@@ -45,66 +159,71 @@ const animatedStyleKey = {
|
|
|
45
159
|
borderLeftWidth: !0,
|
|
46
160
|
borderRightWidth: !0,
|
|
47
161
|
borderTopWidth: !0,
|
|
48
|
-
borderBottomWidth: !0
|
|
49
|
-
|
|
50
|
-
// TODO for other keys like height or width, it's better to not add them here till layout animations are ready
|
|
51
|
-
}, AnimatedView = import_react_native.Animated.View, AnimatedText = import_react_native.Animated.Text;
|
|
162
|
+
borderBottomWidth: !0
|
|
163
|
+
}, colorStyleKey), AnimatedView = import_react_native.Animated.View, AnimatedText = import_react_native.Animated.Text;
|
|
52
164
|
function useAnimatedNumber(initial) {
|
|
53
|
-
|
|
54
|
-
null
|
|
55
|
-
);
|
|
165
|
+
var state = (0, import_react.useRef)(null);
|
|
56
166
|
return state.current || (state.current = {
|
|
57
167
|
composite: null,
|
|
58
168
|
val: new import_react_native.Animated.Value(initial),
|
|
59
|
-
strategy: {
|
|
169
|
+
strategy: {
|
|
170
|
+
type: "spring"
|
|
171
|
+
}
|
|
60
172
|
}), {
|
|
61
|
-
getInstance() {
|
|
173
|
+
getInstance: function() {
|
|
62
174
|
return state.current.val;
|
|
63
175
|
},
|
|
64
|
-
getValue() {
|
|
176
|
+
getValue: function() {
|
|
65
177
|
return state.current.val._value;
|
|
66
178
|
},
|
|
67
|
-
stop() {
|
|
68
|
-
var
|
|
69
|
-
(
|
|
179
|
+
stop: function() {
|
|
180
|
+
var _state_current_composite;
|
|
181
|
+
(_state_current_composite = state.current.composite) === null || _state_current_composite === void 0 || _state_current_composite.stop(), state.current.composite = null;
|
|
70
182
|
},
|
|
71
|
-
setValue(next
|
|
72
|
-
var
|
|
73
|
-
|
|
183
|
+
setValue: function(next) {
|
|
184
|
+
var _param = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
185
|
+
type: "spring"
|
|
186
|
+
}, onFinish = arguments.length > 2 ? arguments[2] : void 0, type = _param.type, config = _object_without_properties(_param, [
|
|
187
|
+
"type"
|
|
188
|
+
]), val = state.current.val, handleFinish = onFinish ? function(param) {
|
|
189
|
+
var finished = param.finished;
|
|
190
|
+
return finished ? onFinish() : null;
|
|
191
|
+
} : void 0;
|
|
74
192
|
if (type === "direct")
|
|
75
193
|
val.setValue(next);
|
|
76
194
|
else if (type === "spring") {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
195
|
+
var _state_current_composite;
|
|
196
|
+
(_state_current_composite = state.current.composite) === null || _state_current_composite === void 0 || _state_current_composite.stop();
|
|
197
|
+
var composite = import_react_native.Animated.spring(val, _object_spread_props(_object_spread({}, config), {
|
|
80
198
|
toValue: next,
|
|
81
199
|
useNativeDriver: !import_constants.isWeb
|
|
82
|
-
});
|
|
200
|
+
}));
|
|
83
201
|
composite.start(handleFinish), state.current.composite = composite;
|
|
84
202
|
} else {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
203
|
+
var _state_current_composite1;
|
|
204
|
+
(_state_current_composite1 = state.current.composite) === null || _state_current_composite1 === void 0 || _state_current_composite1.stop();
|
|
205
|
+
var composite1 = import_react_native.Animated.timing(val, _object_spread_props(_object_spread({}, config), {
|
|
88
206
|
toValue: next,
|
|
89
207
|
useNativeDriver: !import_constants.isWeb
|
|
90
|
-
});
|
|
91
|
-
|
|
208
|
+
}));
|
|
209
|
+
composite1.start(handleFinish), state.current.composite = composite1;
|
|
92
210
|
}
|
|
93
211
|
}
|
|
94
212
|
};
|
|
95
213
|
}
|
|
96
|
-
function useAnimatedNumberReaction({
|
|
97
|
-
value
|
|
98
|
-
}, onValue) {
|
|
99
|
-
const onChange = (0, import_web.useEvent)((current) => {
|
|
214
|
+
function useAnimatedNumberReaction(param, onValue) {
|
|
215
|
+
var value = param.value, onChange = (0, import_web.useEvent)(function(current) {
|
|
100
216
|
onValue(current.value);
|
|
101
217
|
});
|
|
102
|
-
(0, import_react.useEffect)(()
|
|
103
|
-
|
|
104
|
-
return ()
|
|
218
|
+
(0, import_react.useEffect)(function() {
|
|
219
|
+
var id = value.getInstance().addListener(onChange);
|
|
220
|
+
return function() {
|
|
105
221
|
value.getInstance().removeListener(id);
|
|
106
222
|
};
|
|
107
|
-
}, [
|
|
223
|
+
}, [
|
|
224
|
+
value,
|
|
225
|
+
onChange
|
|
226
|
+
]);
|
|
108
227
|
}
|
|
109
228
|
function useAnimatedNumberStyle(value, getStyle) {
|
|
110
229
|
return getStyle(value.getInstance());
|
|
@@ -120,14 +239,64 @@ function createAnimations(animations) {
|
|
|
120
239
|
useAnimatedNumberStyle,
|
|
121
240
|
usePresence: import_use_presence.usePresence,
|
|
122
241
|
ResetPresence: import_use_presence.ResetPresence,
|
|
123
|
-
useAnimations: (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
242
|
+
useAnimations: function(param) {
|
|
243
|
+
var props = param.props, onDidAnimate = param.onDidAnimate, style = param.style, componentState = param.componentState, presence = param.presence, isExiting = (presence == null ? void 0 : presence[0]) === !1, sendExitComplete = presence == null ? void 0 : presence[1], animateStyles = (0, import_react.useRef)({}), animatedTranforms = (0, import_react.useRef)([]), animationsState = (0, import_react.useRef)(/* @__PURE__ */ new WeakMap()), animateOnly = props.animateOnly || [], hasAnimateOnly = !!props.animateOnly, args = [
|
|
244
|
+
JSON.stringify(style),
|
|
245
|
+
componentState,
|
|
246
|
+
isExiting,
|
|
247
|
+
!!onDidAnimate
|
|
248
|
+
], isThereNoNativeStyleKeys = (0, import_react.useMemo)(function() {
|
|
249
|
+
return import_constants.isWeb ? !0 : Object.keys(style).some(function(key) {
|
|
250
|
+
return animateOnly.length ? !animatedStyleKey[key] && animateOnly.indexOf(key) === -1 : !animatedStyleKey[key];
|
|
251
|
+
});
|
|
252
|
+
}, args), res = (0, import_react.useMemo)(function() {
|
|
253
|
+
var update = function(key2, animated, valIn) {
|
|
254
|
+
var isColorStyleKey = colorStyleKey[key2], _ref = _sliced_to_array(isColorStyleKey ? [
|
|
255
|
+
0,
|
|
256
|
+
void 0
|
|
257
|
+
] : getValue(valIn), 2), val2 = _ref[0], type = _ref[1], animateToValue = val2, value = animated || new import_react_native.Animated.Value(val2), curInterpolation = animationsState.current.get(value), interpolateArgs;
|
|
258
|
+
if (type) {
|
|
259
|
+
var _curInterpolation_current;
|
|
260
|
+
interpolateArgs = getInterpolated((_curInterpolation_current = curInterpolation == null ? void 0 : curInterpolation.current) !== null && _curInterpolation_current !== void 0 ? _curInterpolation_current : value._value, val2, type), animationsState.current.set(value, {
|
|
261
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
262
|
+
current: val2
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
if (isColorStyleKey && (animateToValue = curInterpolation != null && curInterpolation.animateToValue ? 0 : 1, interpolateArgs = getColorInterpolated(
|
|
266
|
+
curInterpolation == null ? void 0 : curInterpolation.current,
|
|
267
|
+
// valIn is the next color
|
|
268
|
+
valIn,
|
|
269
|
+
animateToValue
|
|
270
|
+
), animationsState.current.set(value, {
|
|
271
|
+
current: valIn,
|
|
272
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
273
|
+
animateToValue: curInterpolation != null && curInterpolation.animateToValue ? 0 : 1
|
|
274
|
+
})), value) {
|
|
275
|
+
var animationConfig = getAnimationConfig(key2, animations, props.animation), resolve, promise = new Promise(function(res2) {
|
|
276
|
+
resolve = res2;
|
|
277
|
+
});
|
|
278
|
+
completions.push(promise), runners.push(function() {
|
|
279
|
+
var getAnimation = function() {
|
|
280
|
+
return import_react_native.Animated[animationConfig.type || "spring"](value, _object_spread({
|
|
281
|
+
toValue: animateToValue,
|
|
282
|
+
useNativeDriver: !import_constants.isWeb && !isThereNoNativeStyleKeys
|
|
283
|
+
}, animationConfig));
|
|
284
|
+
};
|
|
285
|
+
value.stopAnimation();
|
|
286
|
+
var animation = animationConfig.delay ? import_react_native.Animated.sequence([
|
|
287
|
+
import_react_native.Animated.delay(animationConfig.delay),
|
|
288
|
+
getAnimation()
|
|
289
|
+
]) : getAnimation();
|
|
290
|
+
animation.start(function(param2) {
|
|
291
|
+
var finished = param2.finished;
|
|
292
|
+
finished && resolve();
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
return process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F4A0} animate", key2, "from (".concat(value._value, ") to"), valIn, "(".concat(val2, ")"), "type", type, "interpolate", interpolateArgs), value;
|
|
297
|
+
}, runners = [], completions = [], nonAnimatedStyle = {};
|
|
298
|
+
for (var key in style) {
|
|
299
|
+
var val = style[key];
|
|
131
300
|
if (animatedStyleKey[key] == null && !costlyToAnimateStyleKey[key]) {
|
|
132
301
|
nonAnimatedStyle[key] = val;
|
|
133
302
|
continue;
|
|
@@ -145,151 +314,127 @@ function createAnimations(animations) {
|
|
|
145
314
|
console.warn("Warning: Tamagui can't animate string transforms yet!");
|
|
146
315
|
continue;
|
|
147
316
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
317
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
318
|
+
try {
|
|
319
|
+
for (var _iterator = val.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
320
|
+
var _step_value = _sliced_to_array(_step.value, 2), index = _step_value[0], transform = _step_value[1], _animatedTranforms_current_index;
|
|
321
|
+
if (transform) {
|
|
322
|
+
var tkey = Object.keys(transform)[0], currentTransform = (_animatedTranforms_current_index = animatedTranforms.current[index]) === null || _animatedTranforms_current_index === void 0 ? void 0 : _animatedTranforms_current_index[tkey];
|
|
323
|
+
animatedTranforms.current[index] = _define_property({}, tkey, update(tkey, currentTransform, transform[tkey])), animatedTranforms.current = _to_consumable_array(animatedTranforms.current);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
} catch (err) {
|
|
327
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
328
|
+
} finally {
|
|
329
|
+
try {
|
|
330
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
331
|
+
} finally {
|
|
332
|
+
if (_didIteratorError)
|
|
333
|
+
throw _iteratorError;
|
|
334
|
+
}
|
|
155
335
|
}
|
|
156
336
|
}
|
|
157
337
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
transform: animatedTranforms.current.map((r) => {
|
|
169
|
-
var _a2;
|
|
170
|
-
const key = Object.keys(r)[0], val = ((_a2 = animationsState.current.get(r[key])) == null ? void 0 : _a2.interpolation) || r[key];
|
|
171
|
-
return { [key]: val };
|
|
338
|
+
var animatedStyle = _object_spread_props(_object_spread({}, Object.fromEntries(Object.entries(animateStyles.current).map(function(param2) {
|
|
339
|
+
var _param = _sliced_to_array(param2, 2), k = _param[0], v = _param[1], _animationsState_current_get;
|
|
340
|
+
return [
|
|
341
|
+
k,
|
|
342
|
+
((_animationsState_current_get = animationsState.current.get(v)) === null || _animationsState_current_get === void 0 ? void 0 : _animationsState_current_get.interpolation) || v
|
|
343
|
+
];
|
|
344
|
+
}))), {
|
|
345
|
+
transform: animatedTranforms.current.map(function(r) {
|
|
346
|
+
var _animationsState_current_get, key2 = Object.keys(r)[0], val2 = ((_animationsState_current_get = animationsState.current.get(r[key2])) === null || _animationsState_current_get === void 0 ? void 0 : _animationsState_current_get.interpolation) || r[key2];
|
|
347
|
+
return _define_property({}, key2, val2);
|
|
172
348
|
})
|
|
173
|
-
};
|
|
349
|
+
});
|
|
174
350
|
return {
|
|
175
351
|
runners,
|
|
176
352
|
completions,
|
|
177
|
-
style: [
|
|
353
|
+
style: [
|
|
354
|
+
nonAnimatedStyle,
|
|
355
|
+
animatedStyle
|
|
356
|
+
]
|
|
178
357
|
};
|
|
179
|
-
function update(key, animated, valIn) {
|
|
180
|
-
const isColorStyleKey = colorStyleKey[key], [val, type] = isColorStyleKey ? [0, void 0] : getValue(valIn);
|
|
181
|
-
let animateToValue = val;
|
|
182
|
-
const value = animated || new import_react_native.Animated.Value(val), curInterpolation = animationsState.current.get(value);
|
|
183
|
-
let interpolateArgs;
|
|
184
|
-
if (type && (interpolateArgs = getInterpolated(
|
|
185
|
-
(curInterpolation == null ? void 0 : curInterpolation.current) ?? value._value,
|
|
186
|
-
val,
|
|
187
|
-
type
|
|
188
|
-
), animationsState.current.set(value, {
|
|
189
|
-
interpolation: value.interpolate(interpolateArgs),
|
|
190
|
-
current: val
|
|
191
|
-
})), isColorStyleKey && (animateToValue = curInterpolation != null && curInterpolation.animateToValue ? 0 : 1, interpolateArgs = getColorInterpolated(
|
|
192
|
-
curInterpolation == null ? void 0 : curInterpolation.current,
|
|
193
|
-
// valIn is the next color
|
|
194
|
-
valIn,
|
|
195
|
-
animateToValue
|
|
196
|
-
), animationsState.current.set(value, {
|
|
197
|
-
current: valIn,
|
|
198
|
-
interpolation: value.interpolate(interpolateArgs),
|
|
199
|
-
animateToValue: curInterpolation != null && curInterpolation.animateToValue ? 0 : 1
|
|
200
|
-
})), value) {
|
|
201
|
-
const animationConfig = getAnimationConfig(key, animations, props.animation);
|
|
202
|
-
let resolve;
|
|
203
|
-
const promise = new Promise((res2) => {
|
|
204
|
-
resolve = res2;
|
|
205
|
-
});
|
|
206
|
-
completions.push(promise), runners.push(() => {
|
|
207
|
-
value.stopAnimation();
|
|
208
|
-
function getAnimation() {
|
|
209
|
-
return import_react_native.Animated[animationConfig.type || "spring"](value, {
|
|
210
|
-
toValue: animateToValue,
|
|
211
|
-
useNativeDriver: !import_constants.isWeb && !isThereNoNativeStyleKeys,
|
|
212
|
-
...animationConfig
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
(animationConfig.delay ? import_react_native.Animated.sequence([
|
|
216
|
-
import_react_native.Animated.delay(animationConfig.delay),
|
|
217
|
-
getAnimation()
|
|
218
|
-
]) : getAnimation()).start(({ finished }) => {
|
|
219
|
-
finished && resolve();
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
return process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(
|
|
224
|
-
" \u{1F4A0} animate",
|
|
225
|
-
key,
|
|
226
|
-
`from (${value._value}) to`,
|
|
227
|
-
valIn,
|
|
228
|
-
`(${val})`,
|
|
229
|
-
"type",
|
|
230
|
-
type,
|
|
231
|
-
"interpolate",
|
|
232
|
-
interpolateArgs
|
|
233
|
-
), value;
|
|
234
|
-
}
|
|
235
358
|
}, args);
|
|
236
|
-
return (0, import_constants.useIsomorphicLayoutEffect)(()
|
|
237
|
-
res.runners.forEach((r)
|
|
238
|
-
|
|
239
|
-
|
|
359
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
360
|
+
res.runners.forEach(function(r) {
|
|
361
|
+
return r();
|
|
362
|
+
});
|
|
363
|
+
var cancel = !1;
|
|
364
|
+
return Promise.all(res.completions).then(function() {
|
|
240
365
|
cancel || (onDidAnimate == null || onDidAnimate(), isExiting && (sendExitComplete == null || sendExitComplete()));
|
|
241
|
-
}), ()
|
|
366
|
+
}), function() {
|
|
242
367
|
cancel = !0;
|
|
243
368
|
};
|
|
244
|
-
}, args), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("Animated", {
|
|
369
|
+
}, args), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("Animated", {
|
|
370
|
+
response: res,
|
|
371
|
+
inputStyle: style,
|
|
372
|
+
isExiting
|
|
373
|
+
}), res;
|
|
245
374
|
}
|
|
246
375
|
};
|
|
247
376
|
}
|
|
248
377
|
function getColorInterpolated(currentColor, nextColor, animateToValue) {
|
|
249
|
-
|
|
378
|
+
var inputRange = [
|
|
379
|
+
0,
|
|
380
|
+
1
|
|
381
|
+
], outputRange = [
|
|
382
|
+
currentColor || nextColor,
|
|
383
|
+
nextColor
|
|
384
|
+
];
|
|
250
385
|
return animateToValue === 0 && outputRange.reverse(), {
|
|
251
386
|
inputRange,
|
|
252
387
|
outputRange
|
|
253
388
|
};
|
|
254
389
|
}
|
|
255
|
-
function getInterpolated(current, next
|
|
390
|
+
function getInterpolated(current, next) {
|
|
391
|
+
var postfix = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "deg";
|
|
256
392
|
next === current && (current = next - 1e-9);
|
|
257
|
-
|
|
393
|
+
var inputRange = [
|
|
394
|
+
current,
|
|
395
|
+
next
|
|
396
|
+
], outputRange = [
|
|
397
|
+
"".concat(current).concat(postfix),
|
|
398
|
+
"".concat(next).concat(postfix)
|
|
399
|
+
];
|
|
258
400
|
return next < current && (inputRange.reverse(), outputRange.reverse()), {
|
|
259
401
|
inputRange,
|
|
260
402
|
outputRange
|
|
261
403
|
};
|
|
262
404
|
}
|
|
263
405
|
function getAnimationConfig(key, animations, animation) {
|
|
264
|
-
var _a, _b;
|
|
265
406
|
if (typeof animation == "string")
|
|
266
407
|
return animations[animation];
|
|
267
|
-
|
|
268
|
-
const shortKey = transformShorthands[key];
|
|
408
|
+
var type = "", extraConf, shortKey = transformShorthands[key];
|
|
269
409
|
if (Array.isArray(animation)) {
|
|
410
|
+
var _animation_, _animation_1;
|
|
270
411
|
type = animation[0];
|
|
271
|
-
|
|
412
|
+
var _animation__key, conf = (_animation__key = (_animation_ = animation[1]) === null || _animation_ === void 0 ? void 0 : _animation_[key]) !== null && _animation__key !== void 0 ? _animation__key : (_animation_1 = animation[1]) === null || _animation_1 === void 0 ? void 0 : _animation_1[shortKey];
|
|
272
413
|
conf && (typeof conf == "string" ? type = conf : (type = conf.type || type, extraConf = conf));
|
|
273
414
|
} else {
|
|
274
|
-
|
|
415
|
+
var _animation_key, val = (_animation_key = animation == null ? void 0 : animation[key]) !== null && _animation_key !== void 0 ? _animation_key : animation == null ? void 0 : animation[shortKey];
|
|
275
416
|
type = val == null ? void 0 : val.type, extraConf = val;
|
|
276
417
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
...extraConf
|
|
280
|
-
};
|
|
418
|
+
var found = animations[type];
|
|
419
|
+
return _object_spread({}, found, extraConf);
|
|
281
420
|
}
|
|
282
|
-
|
|
421
|
+
var transformShorthands = {
|
|
283
422
|
x: "translateX",
|
|
284
423
|
y: "translateY",
|
|
285
424
|
translateX: "x",
|
|
286
425
|
translateY: "y"
|
|
287
426
|
};
|
|
288
|
-
function getValue(input
|
|
427
|
+
function getValue(input) {
|
|
428
|
+
var isColor = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
289
429
|
if (typeof input != "string")
|
|
290
|
-
return [
|
|
291
|
-
|
|
292
|
-
|
|
430
|
+
return [
|
|
431
|
+
input
|
|
432
|
+
];
|
|
433
|
+
var _input_match, _ref = _sliced_to_array((_input_match = input.match(/([-0-9]+)(deg|%|px)/)) !== null && _input_match !== void 0 ? _input_match : [], 3), _ = _ref[0], number = _ref[1], after = _ref[2];
|
|
434
|
+
return [
|
|
435
|
+
+number,
|
|
436
|
+
after
|
|
437
|
+
];
|
|
293
438
|
}
|
|
294
439
|
// Annotate the CommonJS export names for ESM import in node:
|
|
295
440
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/createAnimations.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/animations-react-native/src/createAnimations.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA2C,kCAC3C,mBAAiD,+BAOjD,aAAyB,yBACzB,eAA2C,kBAC3C,sBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BzB,IAAMA,mBAAmB;EACvBC,WAAW;EACXC,SAAS;AACX,GAEMC,gBAAgB;EACpBC,iBAAiB;EACjBC,OAAO;EACPC,aAAa;EACbC,iBAAiB;EACjBC,kBAAkB;EAClBC,gBAAgB;EAChBC,mBAAmB;AACrB,GAGMC,0BAA0B,eAAA;EAC9BC,cAAc;EACdC,qBAAqB;EACrBC,sBAAsB;EACtBC,wBAAwB;EACxBC,yBAAyB;EACzBC,aAAa;EACbC,iBAAiB;EACjBC,kBAAk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8H,QAAQ9F,WAAW7B,IAAAA;AACzB,SAAO,eAAA,CAAA,GACF2H,OACAN,SAAAA;AAEP;AAGA,IAAME,sBAAsB;EAC1BK,GAAG;EACHC,GAAG;EACHC,YAAY;EACZC,YAAY;AACd;AAEA,SAAS7H,SAAS8H,OAAsB;MAAEC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAU;AAClD,MAAI,OAAOD,SAAU;AACnB,WAAO;MAACA;;MAEiBA,cAAAA,OAAAA,kBAAAA,eAAAA,MAAME,MAAM,qBAAA,OAAA,QAAZF,iBAAAA,SAAAA,eAAsC,CAAA,GAAE,CAAA,GAA5DG,IAAoBH,KAAAA,CAAAA,GAAjBI,SAAiBJ,KAAAA,CAAAA,GAATK,QAASL,KAAAA,CAAAA;AAC3B,SAAO;IAAC,CAACI;IAAQC;;AACnB;",
|
|
5
|
+
"names": ["animatedStyleKey", "transform", "opacity", "colorStyleKey", "backgroundColor", "color", "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor", "costlyToAnimateStyleKey", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth", "AnimatedView", "Animated", "View", "AnimatedText", "Text", "useAnimatedNumber", "initial", "state", "useRef", "current", "composite", "val", "Value", "strategy", "type", "getInstance", "getValue", "stop", "setValue", "next", "onFinish", "config", "handleFinish", "finished", "undefined", "spring", "toValue", "useNativeDriver", "isWeb", "start", "timing", "useAnimatedNumberReaction", "onValue", "value", "onChange", "useEvent", "useEffect", "id", "addListener", "removeListener", "useAnimatedNumberStyle", "getStyle", "createAnimations", "animations", "isReactNative", "usePresence", "ResetPresence", "useAnimations", "props", "onDidAnimate", "style", "componentState", "presence", "isExiting", "sendExitComplete", "animateStyles", "animatedTranforms", "animationsState", "WeakMap", "animateOnly", "hasAnimateOnly", "args", "JSON", "stringify", "isThereNoNativeStyleKeys", "useMemo", "Object", "keys", "some", "key", "length", "indexOf", "res", "update", "animated", "valIn", "isColorStyleKey", "animateToValue", "curInterpolation", "get", "interpolateArgs", "getInterpolated", "set", "interpolation", "interpolate", "getColorInterpolated", "animationConfig", "getAnimationConfig", "animation", "resolve", "promise", "Promise", "completions", "push", "runners", "getAnimation", "stopAnimation", "delay", "sequence", "param", "process", "env", "NODE_ENV", "console", "info", "nonAnimatedStyle", "includes", "warn", "entries", "index", "tkey", "currentTransform", "animatedStyle", "fromEntries", "map", "k", "v", "r", "useIsomorphicLayoutEffect", "forEach", "cancel", "all", "then", "response", "inputStyle", "currentColor", "nextColor", "inputRange", "outputRange", "reverse", "postfix", "extraConf", "shortKey", "transformShorthands", "Array", "isArray", "conf", "found", "x", "y", "translateX", "translateY", "input", "isColor", "match", "_", "number", "after"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/animations-react-native/src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;AAAA;;sBAAO;AAEP,wBAAc,+BAFd;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|