@hanzogui/animations-react-native 2.0.0-rc.41-hanzoai.5

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.
@@ -0,0 +1,572 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
36
+ var createAnimations_exports = {};
37
+ __export(createAnimations_exports, {
38
+ AnimatedText: () => AnimatedText,
39
+ AnimatedView: () => AnimatedView,
40
+ createAnimations: () => createAnimations,
41
+ useAnimatedNumber: () => useAnimatedNumber,
42
+ useAnimatedNumberReaction: () => useAnimatedNumberReaction,
43
+ useAnimatedNumberStyle: () => useAnimatedNumberStyle,
44
+ useAnimatedNumbersStyle: () => useAnimatedNumbersStyle
45
+ });
46
+ module.exports = __toCommonJS(createAnimations_exports);
47
+ var import_animation_helpers = require("@hanzogui/animation-helpers");
48
+ var import_constants = require("@hanzogui/constants");
49
+ var import_use_presence = require("@hanzogui/use-presence");
50
+ var import_web = require("@hanzogui/web");
51
+ var import_react = __toESM(require("react"), 1);
52
+ var import_react_native = require("react-native");
53
+ function _type_of(obj) {
54
+ "@swc/helpers - typeof";
55
+
56
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
57
+ }
58
+ var isFabric = !import_constants.isWeb && typeof global !== "undefined" && !!global.__nativeFabricUIManager;
59
+ var resolveDynamicValue = function (value, isDark) {
60
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "dynamic" in value) {
61
+ var dynamicValue = isDark ? value.dynamic.dark : value.dynamic.light;
62
+ return dynamicValue;
63
+ }
64
+ return value;
65
+ };
66
+ var animatedStyleKey = {
67
+ transform: true,
68
+ opacity: true
69
+ };
70
+ var colorStyleKey = {
71
+ backgroundColor: true,
72
+ color: true,
73
+ borderColor: true,
74
+ borderLeftColor: true,
75
+ borderRightColor: true,
76
+ borderTopColor: true,
77
+ borderBottomColor: true
78
+ };
79
+ var costlyToAnimateStyleKey = {
80
+ borderRadius: true,
81
+ borderTopLeftRadius: true,
82
+ borderTopRightRadius: true,
83
+ borderBottomLeftRadius: true,
84
+ borderBottomRightRadius: true,
85
+ borderWidth: true,
86
+ borderLeftWidth: true,
87
+ borderRightWidth: true,
88
+ borderTopWidth: true,
89
+ borderBottomWidth: true,
90
+ ...colorStyleKey
91
+ };
92
+ var AnimatedView = import_react_native.Animated.View;
93
+ var AnimatedText = import_react_native.Animated.Text;
94
+ function useAnimatedNumber(initial) {
95
+ var state = import_react.default.useRef(null);
96
+ if (!state.current) {
97
+ state.current = {
98
+ composite: null,
99
+ val: new import_react_native.Animated.Value(initial),
100
+ strategy: {
101
+ type: "spring"
102
+ }
103
+ };
104
+ }
105
+ return {
106
+ getInstance() {
107
+ return state.current.val;
108
+ },
109
+ getValue() {
110
+ return state.current.val["_value"];
111
+ },
112
+ stop() {
113
+ var _state_current_composite;
114
+ (_state_current_composite = state.current.composite) === null || _state_current_composite === void 0 ? void 0 : _state_current_composite.stop();
115
+ state.current.composite = null;
116
+ },
117
+ setValue(next) {
118
+ var {
119
+ type,
120
+ ...config
121
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
122
+ type: "spring"
123
+ },
124
+ onFinish = arguments.length > 2 ? arguments[2] : void 0;
125
+ var val = state.current.val;
126
+ var handleFinish = onFinish ? function (param) {
127
+ var {
128
+ finished
129
+ } = param;
130
+ return finished ? onFinish() : null;
131
+ } : void 0;
132
+ if (type === "direct") {
133
+ val.setValue(next);
134
+ } else if (type === "spring") {
135
+ var _state_current_composite;
136
+ (_state_current_composite = state.current.composite) === null || _state_current_composite === void 0 ? void 0 : _state_current_composite.stop();
137
+ var composite = import_react_native.Animated.spring(val, {
138
+ ...config,
139
+ toValue: next,
140
+ useNativeDriver: isFabric
141
+ });
142
+ composite.start(handleFinish);
143
+ state.current.composite = composite;
144
+ } else {
145
+ var _state_current_composite1;
146
+ (_state_current_composite1 = state.current.composite) === null || _state_current_composite1 === void 0 ? void 0 : _state_current_composite1.stop();
147
+ var composite1 = import_react_native.Animated.timing(val, {
148
+ ...config,
149
+ toValue: next,
150
+ useNativeDriver: isFabric
151
+ });
152
+ composite1.start(handleFinish);
153
+ state.current.composite = composite1;
154
+ }
155
+ }
156
+ };
157
+ }
158
+ var useAnimatedNumberReaction = function (param, onValue) {
159
+ var {
160
+ value
161
+ } = param;
162
+ var onChange = (0, import_web.useEvent)(function (current) {
163
+ onValue(current.value);
164
+ });
165
+ import_react.default.useEffect(function () {
166
+ var id = value.getInstance().addListener(onChange);
167
+ return function () {
168
+ value.getInstance().removeListener(id);
169
+ };
170
+ }, [value, onChange]);
171
+ };
172
+ var useAnimatedNumberStyle = function (value, getStyle) {
173
+ return getStyle(value.getInstance());
174
+ };
175
+ var useAnimatedNumbersStyle = function (vals, getStyle) {
176
+ return getStyle(...vals.map(function (v) {
177
+ return v.getInstance();
178
+ }));
179
+ };
180
+ function createAnimations(animations, options) {
181
+ var _options_useNativeDriver;
182
+ var nativeDriver = (_options_useNativeDriver = options === null || options === void 0 ? void 0 : options.useNativeDriver) !== null && _options_useNativeDriver !== void 0 ? _options_useNativeDriver : isFabric;
183
+ return {
184
+ isReactNative: true,
185
+ inputStyle: "value",
186
+ outputStyle: "inline",
187
+ avoidReRenders: true,
188
+ animations,
189
+ needsCustomComponent: true,
190
+ View: AnimatedView,
191
+ Text: AnimatedText,
192
+ useAnimatedNumber,
193
+ useAnimatedNumberReaction,
194
+ useAnimatedNumberStyle,
195
+ useAnimatedNumbersStyle,
196
+ usePresence: import_use_presence.usePresence,
197
+ ResetPresence: import_use_presence.ResetPresence,
198
+ useAnimations: function (param) {
199
+ var {
200
+ props,
201
+ onDidAnimate,
202
+ style,
203
+ componentState,
204
+ presence,
205
+ useStyleEmitter
206
+ } = param;
207
+ var _themeState_name;
208
+ var isDisabled = import_constants.isWeb && componentState.unmounted === true;
209
+ var isExiting = (presence === null || presence === void 0 ? void 0 : presence[0]) === false;
210
+ var sendExitComplete = presence === null || presence === void 0 ? void 0 : presence[1];
211
+ var [, themeState] = (0, import_web.useThemeWithState)({});
212
+ var isDark = (themeState === null || themeState === void 0 ? void 0 : themeState.scheme) === "dark" || (themeState === null || themeState === void 0 ? void 0 : (_themeState_name = themeState.name) === null || _themeState_name === void 0 ? void 0 : _themeState_name.startsWith("dark"));
213
+ var animateStyles = import_react.default.useRef({});
214
+ var animatedTranforms = import_react.default.useRef([]);
215
+ var animationsState = import_react.default.useRef(/* @__PURE__ */new WeakMap());
216
+ var exitCycleIdRef = import_react.default.useRef(0);
217
+ var exitCompletedRef = import_react.default.useRef(false);
218
+ var wasExitingRef = import_react.default.useRef(false);
219
+ var justStartedExiting = isExiting && !wasExitingRef.current;
220
+ var justStoppedExiting = !isExiting && wasExitingRef.current;
221
+ if (justStartedExiting) {
222
+ exitCycleIdRef.current++;
223
+ exitCompletedRef.current = false;
224
+ }
225
+ if (justStoppedExiting) {
226
+ exitCycleIdRef.current++;
227
+ }
228
+ var animateOnly = props.animateOnly || [];
229
+ var hasTransitionOnly = !!props.animateOnly;
230
+ var isEntering = !!componentState.unmounted;
231
+ var wasEnteringRef = import_react.default.useRef(isEntering);
232
+ var justFinishedEntering = wasEnteringRef.current && !isEntering;
233
+ import_react.default.useEffect(function () {
234
+ wasEnteringRef.current = isEntering;
235
+ });
236
+ var args = [JSON.stringify(style), componentState, isExiting, !!onDidAnimate, isDark, justFinishedEntering, hasTransitionOnly];
237
+ var res = import_react.default.useMemo(function () {
238
+ var runners = [];
239
+ var completions = [];
240
+ var animationState = isExiting ? "exit" : isEntering || justFinishedEntering ? "enter" : "default";
241
+ var nonAnimatedStyle = {};
242
+ for (var key in style) {
243
+ var rawVal = style[key];
244
+ var val = resolveDynamicValue(rawVal, isDark);
245
+ if (val === void 0) continue;
246
+ if (isDisabled) {
247
+ continue;
248
+ }
249
+ if (animatedStyleKey[key] == null && !costlyToAnimateStyleKey[key]) {
250
+ nonAnimatedStyle[key] = val;
251
+ continue;
252
+ }
253
+ if (hasTransitionOnly && !animateOnly.includes(key)) {
254
+ nonAnimatedStyle[key] = val;
255
+ continue;
256
+ }
257
+ if (key !== "transform") {
258
+ animateStyles.current[key] = update(key, animateStyles.current[key], val);
259
+ continue;
260
+ }
261
+ if (!val) continue;
262
+ if (typeof val === "string") {
263
+ console.warn(`Warning: Hanzogui can't animate string transforms yet!`);
264
+ continue;
265
+ }
266
+ var _iteratorNormalCompletion = true,
267
+ _didIteratorError = false,
268
+ _iteratorError = void 0;
269
+ try {
270
+ for (var _iterator = val.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
271
+ var [index, transform] = _step.value;
272
+ var _animatedTranforms_current_index;
273
+ if (!transform) continue;
274
+ var tkey = Object.keys(transform)[0];
275
+ var currentTransform = (_animatedTranforms_current_index = animatedTranforms.current[index]) === null || _animatedTranforms_current_index === void 0 ? void 0 : _animatedTranforms_current_index[tkey];
276
+ animatedTranforms.current[index] = {
277
+ [tkey]: update(tkey, currentTransform, transform[tkey])
278
+ };
279
+ animatedTranforms.current = [...animatedTranforms.current];
280
+ }
281
+ } catch (err) {
282
+ _didIteratorError = true;
283
+ _iteratorError = err;
284
+ } finally {
285
+ try {
286
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
287
+ _iterator.return();
288
+ }
289
+ } finally {
290
+ if (_didIteratorError) {
291
+ throw _iteratorError;
292
+ }
293
+ }
294
+ }
295
+ }
296
+ var animatedTransformStyle = animatedTranforms.current.length > 0 ? {
297
+ transform: animatedTranforms.current.map(function (r) {
298
+ var _animationsState_current_get;
299
+ var key2 = Object.keys(r)[0];
300
+ var val2 = ((_animationsState_current_get = animationsState.current.get(r[key2])) === null || _animationsState_current_get === void 0 ? void 0 : _animationsState_current_get.interpolation) || r[key2];
301
+ return {
302
+ [key2]: val2
303
+ };
304
+ })
305
+ } : {};
306
+ var animatedStyle = {
307
+ ...Object.fromEntries(Object.entries(animateStyles.current).map(function (param2) {
308
+ var [k, v] = param2;
309
+ var _animationsState_current_get;
310
+ return [k, ((_animationsState_current_get = animationsState.current.get(v)) === null || _animationsState_current_get === void 0 ? void 0 : _animationsState_current_get.interpolation) || v];
311
+ })),
312
+ ...animatedTransformStyle
313
+ };
314
+ return {
315
+ runners,
316
+ completions,
317
+ style: [nonAnimatedStyle, animatedStyle]
318
+ };
319
+ function update(key2, animated, valIn) {
320
+ var isColorStyleKey = colorStyleKey[key2];
321
+ var [val2, type] = isColorStyleKey ? [0, void 0] : getValue(valIn);
322
+ var animateToValue = val2;
323
+ var value = animated || new import_react_native.Animated.Value(val2);
324
+ var curInterpolation = animationsState.current.get(value);
325
+ var interpolateArgs;
326
+ if (type) {
327
+ var _curInterpolation_current;
328
+ interpolateArgs = getInterpolated((_curInterpolation_current = curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.current) !== null && _curInterpolation_current !== void 0 ? _curInterpolation_current : value["_value"], val2, type);
329
+ animationsState.current.set(value, {
330
+ interpolation: value.interpolate(interpolateArgs),
331
+ current: val2
332
+ });
333
+ }
334
+ if (isColorStyleKey) {
335
+ animateToValue = (curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.animateToValue) ? 0 : 1;
336
+ interpolateArgs = getColorInterpolated(curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.current,
337
+ // valIn is the next color
338
+ valIn, animateToValue);
339
+ animationsState.current.set(value, {
340
+ current: valIn,
341
+ interpolation: value.interpolate(interpolateArgs),
342
+ animateToValue: (curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.animateToValue) ? 0 : 1
343
+ });
344
+ }
345
+ if (value) {
346
+ var animationConfig = getAnimationConfig(key2, animations, props.transition, animationState);
347
+ var resolve;
348
+ var promise = new Promise(function (res2) {
349
+ resolve = res2;
350
+ });
351
+ completions.push(promise);
352
+ runners.push(function () {
353
+ value.stopAnimation();
354
+ function getAnimation() {
355
+ return import_react_native.Animated[animationConfig.type || "spring"](value, {
356
+ toValue: animateToValue,
357
+ useNativeDriver: nativeDriver,
358
+ ...animationConfig
359
+ });
360
+ }
361
+ var animation = animationConfig.delay ? import_react_native.Animated.sequence([import_react_native.Animated.delay(animationConfig.delay), getAnimation()]) : getAnimation();
362
+ animation.start(function (param2) {
363
+ var {
364
+ finished
365
+ } = param2;
366
+ if (finished || isExiting) {
367
+ resolve();
368
+ }
369
+ });
370
+ });
371
+ }
372
+ if (process.env.NODE_ENV === "development") {
373
+ if (props["debug"] === "verbose") {
374
+ console.info(" \u{1F4A0} animate", key2, `from (${value["_value"]}) to`, valIn, `(${val2})`, "type", type, "interpolate", interpolateArgs);
375
+ }
376
+ }
377
+ return value;
378
+ }
379
+ }, args);
380
+ import_react.default.useEffect(function () {
381
+ wasExitingRef.current = isExiting;
382
+ });
383
+ (0, import_constants.useIsomorphicLayoutEffect)(function () {
384
+ res.runners.forEach(function (r) {
385
+ return r();
386
+ });
387
+ var cycleId = exitCycleIdRef.current;
388
+ if (res.completions.length === 0) {
389
+ onDidAnimate === null || onDidAnimate === void 0 ? void 0 : onDidAnimate();
390
+ if (isExiting && !exitCompletedRef.current) {
391
+ exitCompletedRef.current = true;
392
+ sendExitComplete === null || sendExitComplete === void 0 ? void 0 : sendExitComplete();
393
+ }
394
+ return;
395
+ }
396
+ var cancel = false;
397
+ Promise.all(res.completions).then(function () {
398
+ if (cancel) return;
399
+ if (isExiting && cycleId !== exitCycleIdRef.current) return;
400
+ if (isExiting && exitCompletedRef.current) return;
401
+ onDidAnimate === null || onDidAnimate === void 0 ? void 0 : onDidAnimate();
402
+ if (isExiting) {
403
+ exitCompletedRef.current = true;
404
+ sendExitComplete === null || sendExitComplete === void 0 ? void 0 : sendExitComplete();
405
+ }
406
+ });
407
+ return function () {
408
+ cancel = true;
409
+ };
410
+ }, args);
411
+ useStyleEmitter === null || useStyleEmitter === void 0 ? void 0 : useStyleEmitter(function (nextStyle) {
412
+ for (var key in nextStyle) {
413
+ var rawVal = nextStyle[key];
414
+ var val = resolveDynamicValue(rawVal, isDark);
415
+ if (val === void 0) continue;
416
+ if (key === "transform" && Array.isArray(val)) {
417
+ var _iteratorNormalCompletion = true,
418
+ _didIteratorError = false,
419
+ _iteratorError = void 0;
420
+ try {
421
+ for (var _iterator = val.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
422
+ var [index, transform] = _step.value;
423
+ var _animatedTranforms_current_index;
424
+ if (!transform) continue;
425
+ var tkey = Object.keys(transform)[0];
426
+ var currentTransform = (_animatedTranforms_current_index = animatedTranforms.current[index]) === null || _animatedTranforms_current_index === void 0 ? void 0 : _animatedTranforms_current_index[tkey];
427
+ animatedTranforms.current[index] = {
428
+ [tkey]: update(tkey, currentTransform, transform[tkey])
429
+ };
430
+ }
431
+ } catch (err) {
432
+ _didIteratorError = true;
433
+ _iteratorError = err;
434
+ } finally {
435
+ try {
436
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
437
+ _iterator.return();
438
+ }
439
+ } finally {
440
+ if (_didIteratorError) {
441
+ throw _iteratorError;
442
+ }
443
+ }
444
+ }
445
+ } else if (animatedStyleKey[key] != null || costlyToAnimateStyleKey[key]) {
446
+ animateStyles.current[key] = update(key, animateStyles.current[key], val);
447
+ }
448
+ }
449
+ res.runners.forEach(function (r) {
450
+ return r();
451
+ });
452
+ function update(key2, animated, valIn) {
453
+ var isColor = colorStyleKey[key2];
454
+ var [numVal, type] = isColor ? [0, void 0] : getValue(valIn);
455
+ var animateToValue = numVal;
456
+ var value = animated || new import_react_native.Animated.Value(numVal);
457
+ var curInterpolation = animationsState.current.get(value);
458
+ if (type) {
459
+ var _curInterpolation_current;
460
+ animationsState.current.set(value, {
461
+ interpolation: value.interpolate(getInterpolated((_curInterpolation_current = curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.current) !== null && _curInterpolation_current !== void 0 ? _curInterpolation_current : value["_value"], numVal, type)),
462
+ current: numVal
463
+ });
464
+ }
465
+ if (isColor) {
466
+ animateToValue = (curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.animateToValue) ? 0 : 1;
467
+ animationsState.current.set(value, {
468
+ current: valIn,
469
+ interpolation: value.interpolate(getColorInterpolated(curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.current, valIn, animateToValue)),
470
+ animateToValue: (curInterpolation === null || curInterpolation === void 0 ? void 0 : curInterpolation.animateToValue) ? 0 : 1
471
+ });
472
+ }
473
+ var animationConfig = getAnimationConfig(key2, animations, props.transition, "default");
474
+ res.runners.push(function () {
475
+ value.stopAnimation();
476
+ var anim = import_react_native.Animated[animationConfig.type || "spring"](value, {
477
+ toValue: animateToValue,
478
+ useNativeDriver: nativeDriver,
479
+ ...animationConfig
480
+ });
481
+ (animationConfig.delay ? import_react_native.Animated.sequence([import_react_native.Animated.delay(animationConfig.delay), anim]) : anim).start();
482
+ });
483
+ return value;
484
+ }
485
+ });
486
+ if (process.env.NODE_ENV === "development") {
487
+ if (props["debug"] === "verbose") {
488
+ console.info(`Animated`, {
489
+ response: res,
490
+ inputStyle: style,
491
+ isExiting
492
+ });
493
+ }
494
+ }
495
+ return res;
496
+ }
497
+ };
498
+ }
499
+ function getColorInterpolated(currentColor, nextColor, animateToValue) {
500
+ var inputRange = [0, 1];
501
+ var outputRange = [currentColor ? currentColor : nextColor, nextColor];
502
+ if (animateToValue === 0) {
503
+ outputRange.reverse();
504
+ }
505
+ return {
506
+ inputRange,
507
+ outputRange
508
+ };
509
+ }
510
+ function getInterpolated(current, next) {
511
+ var postfix = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "deg";
512
+ if (next === current) {
513
+ current = next - 1e-9;
514
+ }
515
+ var inputRange = [current, next];
516
+ var outputRange = [`${current}${postfix}`, `${next}${postfix}`];
517
+ if (next < current) {
518
+ inputRange.reverse();
519
+ outputRange.reverse();
520
+ }
521
+ return {
522
+ inputRange,
523
+ outputRange
524
+ };
525
+ }
526
+ function getAnimationConfig(key, animations, transition) {
527
+ var animationState = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "default";
528
+ var normalized = (0, import_animation_helpers.normalizeTransition)(transition);
529
+ var shortKey = transformShorthands[key];
530
+ var _normalized_properties_key;
531
+ var propAnimation = (_normalized_properties_key = normalized.properties[key]) !== null && _normalized_properties_key !== void 0 ? _normalized_properties_key : normalized.properties[shortKey];
532
+ var animationType = null;
533
+ var extraConf = {};
534
+ if (typeof propAnimation === "string") {
535
+ animationType = propAnimation;
536
+ } else if (propAnimation && (typeof propAnimation === "undefined" ? "undefined" : _type_of(propAnimation)) === "object") {
537
+ animationType = propAnimation.type || (0, import_animation_helpers.getEffectiveAnimation)(normalized, animationState);
538
+ extraConf = propAnimation;
539
+ } else {
540
+ animationType = (0, import_animation_helpers.getEffectiveAnimation)(normalized, animationState);
541
+ }
542
+ if (normalized.delay && !extraConf.delay) {
543
+ extraConf = {
544
+ ...extraConf,
545
+ delay: normalized.delay
546
+ };
547
+ }
548
+ var found = animationType ? animations[animationType] : {};
549
+ return {
550
+ ...found,
551
+ // Apply global spring config overrides (from transition={['bouncy', { stiffness: 1000 }]})
552
+ ...normalized.config,
553
+ // Property-specific config takes highest precedence
554
+ ...extraConf
555
+ };
556
+ }
557
+ var transformShorthands = {
558
+ x: "translateX",
559
+ y: "translateY",
560
+ translateX: "x",
561
+ translateY: "y"
562
+ };
563
+ function getValue(input) {
564
+ var isColor = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
565
+ if (typeof input !== "string") {
566
+ return [input];
567
+ }
568
+ var _input_match;
569
+ var [_, number, after] = (_input_match = input.match(/([-0-9]+)(deg|%|px)/)) !== null && _input_match !== void 0 ? _input_match : [];
570
+ return [+number, after];
571
+ }
572
+ //# sourceMappingURL=createAnimations.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createAnimations_exports","__export","AnimatedText","AnimatedView","createAnimations","useAnimatedNumber","useAnimatedNumberReaction","useAnimatedNumberStyle","useAnimatedNumbersStyle","module","exports","import_animation_helpers","require","import_constants","import_use_presence","import_web","import_react","__toESM","import_react_native","_type_of","obj","Symbol","constructor","isFabric","isWeb","global","__nativeFabricUIManager","resolveDynamicValue","isDark","dynamicValue","dynamic","dark","light","animatedStyleKey","transform","opacity","colorStyleKey","backgroundColor","color","borderColor","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","costlyToAnimateStyleKey","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderWidth","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","Animated","View","Text","initial","state","default","useRef","current","composite","val","Value","strategy","type","getInstance","getValue","stop","_state_current_composite","setValue","next","config","arguments","length","onFinish","handleFinish","param","finished","spring","toValue","useNativeDriver","start","_state_current_composite1","composite1","timing","onValue","onChange","useEvent","useEffect","id","addListener","removeListener","getStyle","vals","map","v","animations","options","_options_useNativeDriver","nativeDriver","isReactNative","inputStyle","outputStyle","avoidReRenders","needsCustomComponent","usePresence","ResetPresence","useAnimations","props","onDidAnimate","style","componentState","presence","useStyleEmitter","_themeState_name","isDisabled","unmounted","isExiting","sendExitComplete","themeState","useThemeWithState","scheme","name","startsWith","animateStyles","animatedTranforms","animationsState","WeakMap","exitCycleIdRef","exitCompletedRef","wasExitingRef","justStartedExiting","justStoppedExiting","animateOnly","hasTransitionOnly","isEntering","wasEnteringRef","justFinishedEntering","args","JSON","stringify","res","useMemo","runners","completions","animationState","nonAnimatedStyle","key","rawVal","includes","update","console","warn","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","entries","iterator","_step","done","index","_animatedTranforms_current_index","tkey","Object","keys","currentTransform","err","return","animatedTransformStyle","r","_animationsState_current_get","key2","val2","get","interpolation","animatedStyle","fromEntries","param2","k","animated","valIn","isColorStyleKey","animateToValue","curInterpolation","interpolateArgs","_curInterpolation_current","getInterpolated","set","interpolate","getColorInterpolated","animationConfig","getAnimationConfig","transition","resolve","promise","Promise","res2","push","stopAnimation","getAnimation","animation","delay","sequence","process","env","NODE_ENV","info","useIsomorphicLayoutEffect","forEach","cycleId","cancel","all","then","nextStyle","Array","isArray","isColor","numVal","anim","response","currentColor","nextColor","inputRange","outputRange","reverse","postfix"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,YAAA,EA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F;EACF;AAEA;AACA,SAAOiD,qBAAA+B,YAAA,EAAAC,SAAA,EAAAvC,cAAA;EAAA,IACLwC,UAAG,OAEH,EAAc;EAAA,IAEdC,WAAG,IACLH,YAAA,GAAAA,YAAA,GAAAC,SAAA,EACFA,SAAA,CAGA;EACE,IAAGvC,cAAA;IACHyC,WAAG,CAAAC,OAAA;EACH;EACA;IACFF,UAAA;IAEAC;EACE;AACE;AAAa,SACfrC,gBAAAhI,OAAA,EAAAW,IAAA;EACA,IAAA4J,OAAU,GAAA1J,SAAa,CAAAC,MAAI,GAAM,KAAAD,SAAM,aAAqB,IAAAA,SAAM;EAClE,IAAAF,IAAQ,KAACX,OAAQ,EAAK;IACxBA,OAAA,GAAAW,IAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: true
17
+ }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ var import_polyfill = require("./polyfill.cjs");
21
+ __reExport(index_exports, require("./createAnimations.cjs"), module.exports);
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
+ value: true
19
+ }), mod);
20
+ var index_exports = {};
21
+ module.exports = __toCommonJS(index_exports);
22
+ var import_polyfill = require("./polyfill.native.js");
23
+ __reExport(index_exports, require("./createAnimations.native.js"), module.exports);
24
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","import_polyfill","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAO,CAAAK,aAAA;AAEP,IAAAG,eAAA,GAAAC,OAAc","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ if (typeof requestAnimationFrame === "undefined") {
2
+ globalThis["requestAnimationFrame"] = typeof setImmediate === "undefined" ? setTimeout : setImmediate;
3
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ if (typeof requestAnimationFrame === "undefined") {
4
+ globalThis["requestAnimationFrame"] = typeof setImmediate === "undefined" ? setTimeout : setImmediate;
5
+ }
6
+ //# sourceMappingURL=polyfill.native.js.map