@tamagui/animations-react-native 1.61.2 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/createAnimations.js +106 -214
- package/dist/cjs/createAnimations.js.map +2 -2
- package/dist/cjs/createAnimations.native.js +282 -0
- package/dist/cjs/createAnimations.native.js.map +6 -0
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +21 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/cjs/polyfill.js +1 -4
- package/dist/cjs/polyfill.js.map +1 -1
- package/dist/cjs/polyfill.native.js +3 -0
- package/dist/cjs/polyfill.native.js.map +6 -0
- package/dist/esm/createAnimations.js +100 -201
- package/dist/esm/createAnimations.js.map +2 -2
- package/dist/esm/polyfill.js +1 -3
- package/dist/esm/polyfill.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var createAnimations_exports = {};
|
|
17
|
+
__export(createAnimations_exports, {
|
|
18
|
+
AnimatedText: () => AnimatedText,
|
|
19
|
+
AnimatedView: () => AnimatedView,
|
|
20
|
+
createAnimations: () => createAnimations,
|
|
21
|
+
useAnimatedNumber: () => useAnimatedNumber,
|
|
22
|
+
useAnimatedNumberReaction: () => useAnimatedNumberReaction,
|
|
23
|
+
useAnimatedNumberStyle: () => useAnimatedNumberStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(createAnimations_exports);
|
|
26
|
+
var import_use_presence = require("@tamagui/use-presence"), import_web = require("@tamagui/web"), import_react = require("react"), import_react_native = require("react-native");
|
|
27
|
+
const animatedStyleKey = {
|
|
28
|
+
transform: !0,
|
|
29
|
+
opacity: !0
|
|
30
|
+
}, colorStyleKey = {
|
|
31
|
+
backgroundColor: !0,
|
|
32
|
+
color: !0,
|
|
33
|
+
borderColor: !0,
|
|
34
|
+
borderLeftColor: !0,
|
|
35
|
+
borderRightColor: !0,
|
|
36
|
+
borderTopColor: !0,
|
|
37
|
+
borderBottomColor: !0
|
|
38
|
+
}, costlyToAnimateStyleKey = {
|
|
39
|
+
borderRadius: !0,
|
|
40
|
+
borderTopLeftRadius: !0,
|
|
41
|
+
borderTopRightRadius: !0,
|
|
42
|
+
borderBottomLeftRadius: !0,
|
|
43
|
+
borderBottomRightRadius: !0,
|
|
44
|
+
borderWidth: !0,
|
|
45
|
+
borderLeftWidth: !0,
|
|
46
|
+
borderRightWidth: !0,
|
|
47
|
+
borderTopWidth: !0,
|
|
48
|
+
borderBottomWidth: !0,
|
|
49
|
+
...colorStyleKey
|
|
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;
|
|
52
|
+
function useAnimatedNumber(initial) {
|
|
53
|
+
const state = (0, import_react.useRef)(
|
|
54
|
+
null
|
|
55
|
+
);
|
|
56
|
+
return state.current || (state.current = {
|
|
57
|
+
composite: null,
|
|
58
|
+
val: new import_react_native.Animated.Value(initial),
|
|
59
|
+
strategy: { type: "spring" }
|
|
60
|
+
}), {
|
|
61
|
+
getInstance() {
|
|
62
|
+
return state.current.val;
|
|
63
|
+
},
|
|
64
|
+
getValue() {
|
|
65
|
+
return state.current.val._value;
|
|
66
|
+
},
|
|
67
|
+
stop() {
|
|
68
|
+
state.current.composite?.stop(), state.current.composite = null;
|
|
69
|
+
},
|
|
70
|
+
setValue(next, { type, ...config } = { type: "spring" }, onFinish) {
|
|
71
|
+
const val = state.current.val, handleFinish = onFinish ? ({ finished }) => finished ? onFinish() : null : void 0;
|
|
72
|
+
if (type === "direct")
|
|
73
|
+
val.setValue(next);
|
|
74
|
+
else if (type === "spring") {
|
|
75
|
+
state.current.composite?.stop();
|
|
76
|
+
const composite = import_react_native.Animated.spring(val, {
|
|
77
|
+
...config,
|
|
78
|
+
toValue: next,
|
|
79
|
+
useNativeDriver: !import_web.isWeb
|
|
80
|
+
});
|
|
81
|
+
composite.start(handleFinish), state.current.composite = composite;
|
|
82
|
+
} else {
|
|
83
|
+
state.current.composite?.stop();
|
|
84
|
+
const composite = import_react_native.Animated.timing(val, {
|
|
85
|
+
...config,
|
|
86
|
+
toValue: next,
|
|
87
|
+
useNativeDriver: !import_web.isWeb
|
|
88
|
+
});
|
|
89
|
+
composite.start(handleFinish), state.current.composite = composite;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function useAnimatedNumberReaction({
|
|
95
|
+
value
|
|
96
|
+
}, onValue) {
|
|
97
|
+
const onChange = (0, import_web.useEvent)((current) => {
|
|
98
|
+
onValue(current.value);
|
|
99
|
+
});
|
|
100
|
+
(0, import_react.useEffect)(() => {
|
|
101
|
+
const id = value.getInstance().addListener(onChange);
|
|
102
|
+
return () => {
|
|
103
|
+
value.getInstance().removeListener(id);
|
|
104
|
+
};
|
|
105
|
+
}, [value, onChange]);
|
|
106
|
+
}
|
|
107
|
+
function useAnimatedNumberStyle(value, getStyle) {
|
|
108
|
+
return getStyle(value.getInstance());
|
|
109
|
+
}
|
|
110
|
+
function createAnimations(animations) {
|
|
111
|
+
return AnimatedView.displayName = "AnimatedView", AnimatedText.displayName = "AnimatedText", {
|
|
112
|
+
isReactNative: !0,
|
|
113
|
+
animations,
|
|
114
|
+
View: AnimatedView,
|
|
115
|
+
Text: AnimatedText,
|
|
116
|
+
useAnimatedNumber,
|
|
117
|
+
useAnimatedNumberReaction,
|
|
118
|
+
useAnimatedNumberStyle,
|
|
119
|
+
usePresence: import_use_presence.usePresence,
|
|
120
|
+
useAnimations: ({ props, onDidAnimate, style, componentState, presence }) => {
|
|
121
|
+
const isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], animateStyles = (0, import_react.useRef)({}), animatedTranforms = (0, import_react.useRef)([]), animationsState = (0, import_react.useRef)(
|
|
122
|
+
/* @__PURE__ */ new WeakMap()
|
|
123
|
+
), animateOnly = props.animateOnly || [], hasAnimateOnly = !!props.animateOnly, args = [JSON.stringify(style), componentState, isExiting, !!onDidAnimate], isThereNoNativeStyleKeys = (0, import_react.useMemo)(() => import_web.isWeb ? !0 : Object.keys(style).some((key) => animateOnly.length ? !animatedStyleKey[key] && animateOnly.indexOf(key) === -1 : !animatedStyleKey[key]), args), res = (0, import_react.useMemo)(() => {
|
|
124
|
+
const runners = [], completions = [], nonAnimatedStyle = {};
|
|
125
|
+
for (const key in style) {
|
|
126
|
+
const val = style[key];
|
|
127
|
+
if (animatedStyleKey[key] == null && !costlyToAnimateStyleKey[key]) {
|
|
128
|
+
nonAnimatedStyle[key] = val;
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (hasAnimateOnly && !animateOnly.includes(key)) {
|
|
132
|
+
nonAnimatedStyle[key] = val;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (key !== "transform") {
|
|
136
|
+
animateStyles.current[key] = update(key, animateStyles.current[key], val);
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (val)
|
|
140
|
+
for (const [index, transform] of val.entries()) {
|
|
141
|
+
if (!transform)
|
|
142
|
+
continue;
|
|
143
|
+
const tkey = Object.keys(transform)[0], currentTransform = animatedTranforms.current[index]?.[tkey];
|
|
144
|
+
animatedTranforms.current[index] = {
|
|
145
|
+
[tkey]: update(tkey, currentTransform, transform[tkey])
|
|
146
|
+
}, animatedTranforms.current = [...animatedTranforms.current];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const animatedStyle = {
|
|
150
|
+
...Object.fromEntries(
|
|
151
|
+
Object.entries(animateStyles.current).map(([k, v]) => [
|
|
152
|
+
k,
|
|
153
|
+
animationsState.current.get(v)?.interpolation || v
|
|
154
|
+
])
|
|
155
|
+
),
|
|
156
|
+
transform: animatedTranforms.current.map((r) => {
|
|
157
|
+
const key = Object.keys(r)[0], val = animationsState.current.get(r[key])?.interpolation || r[key];
|
|
158
|
+
return { [key]: val };
|
|
159
|
+
})
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
runners,
|
|
163
|
+
completions,
|
|
164
|
+
style: [nonAnimatedStyle, animatedStyle]
|
|
165
|
+
};
|
|
166
|
+
function update(key, animated, valIn) {
|
|
167
|
+
const isColorStyleKey = colorStyleKey[key], [val, type] = isColorStyleKey ? [0, void 0] : getValue(valIn);
|
|
168
|
+
let animateToValue = val;
|
|
169
|
+
const value = animated || new import_react_native.Animated.Value(val), curInterpolation = animationsState.current.get(value);
|
|
170
|
+
let interpolateArgs;
|
|
171
|
+
if (type && (interpolateArgs = getInterpolated(
|
|
172
|
+
curInterpolation?.current ?? value._value,
|
|
173
|
+
val,
|
|
174
|
+
type
|
|
175
|
+
), animationsState.current.set(value, {
|
|
176
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
177
|
+
current: val
|
|
178
|
+
})), isColorStyleKey && (animateToValue = curInterpolation?.animateToValue ? 0 : 1, interpolateArgs = getColorInterpolated(
|
|
179
|
+
curInterpolation?.current,
|
|
180
|
+
// valIn is the next color
|
|
181
|
+
valIn,
|
|
182
|
+
animateToValue
|
|
183
|
+
), animationsState.current.set(value, {
|
|
184
|
+
current: valIn,
|
|
185
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
186
|
+
animateToValue: curInterpolation?.animateToValue ? 0 : 1
|
|
187
|
+
})), value) {
|
|
188
|
+
const animationConfig = getAnimationConfig(key, animations, props.animation);
|
|
189
|
+
let resolve;
|
|
190
|
+
const promise = new Promise((res2) => {
|
|
191
|
+
resolve = res2;
|
|
192
|
+
});
|
|
193
|
+
completions.push(promise), runners.push(() => {
|
|
194
|
+
value.stopAnimation();
|
|
195
|
+
function getAnimation() {
|
|
196
|
+
return import_react_native.Animated[animationConfig.type || "spring"](value, {
|
|
197
|
+
toValue: animateToValue,
|
|
198
|
+
useNativeDriver: !import_web.isWeb && !isThereNoNativeStyleKeys,
|
|
199
|
+
...animationConfig
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
(animationConfig.delay ? import_react_native.Animated.sequence([
|
|
203
|
+
import_react_native.Animated.delay(animationConfig.delay),
|
|
204
|
+
getAnimation()
|
|
205
|
+
]) : getAnimation()).start(({ finished }) => {
|
|
206
|
+
finished && resolve();
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return process.env.NODE_ENV === "development" && props.debug === "verbose" && console.log(" \u{1F4A0} animate", key, `from (${value._value}) to`, valIn, `(${val})`, "type", type, "interpolate", interpolateArgs), value;
|
|
211
|
+
}
|
|
212
|
+
}, args);
|
|
213
|
+
return (0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
214
|
+
res.runners.forEach((r) => r());
|
|
215
|
+
let cancel = !1;
|
|
216
|
+
return Promise.all(res.completions).then(() => {
|
|
217
|
+
cancel || (onDidAnimate?.(), isExiting && sendExitComplete?.());
|
|
218
|
+
}), () => {
|
|
219
|
+
cancel = !0;
|
|
220
|
+
};
|
|
221
|
+
}, args), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.log("Returning animated", res, "given style", style), res;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function getColorInterpolated(currentColor, nextColor, animateToValue) {
|
|
226
|
+
const inputRange = [0, 1], outputRange = [currentColor || nextColor, nextColor];
|
|
227
|
+
return animateToValue === 0 && outputRange.reverse(), {
|
|
228
|
+
inputRange,
|
|
229
|
+
outputRange
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function getInterpolated(current, next, postfix = "deg") {
|
|
233
|
+
next === current && (current = next - 1e-9);
|
|
234
|
+
const inputRange = [current, next], outputRange = [`${current}${postfix}`, `${next}${postfix}`];
|
|
235
|
+
return next < current && (inputRange.reverse(), outputRange.reverse()), {
|
|
236
|
+
inputRange,
|
|
237
|
+
outputRange
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
function getAnimationConfig(key, animations, animation) {
|
|
241
|
+
if (typeof animation == "string")
|
|
242
|
+
return animations[animation];
|
|
243
|
+
let type = "", extraConf;
|
|
244
|
+
const shortKey = transformShorthands[key];
|
|
245
|
+
if (Array.isArray(animation)) {
|
|
246
|
+
type = animation[0];
|
|
247
|
+
const conf = animation[1]?.[key] ?? animation[1]?.[shortKey];
|
|
248
|
+
conf && (typeof conf == "string" ? type = conf : (type = conf.type || type, extraConf = conf));
|
|
249
|
+
} else {
|
|
250
|
+
const val = animation?.[key] ?? animation?.[shortKey];
|
|
251
|
+
type = val?.type, extraConf = val;
|
|
252
|
+
}
|
|
253
|
+
const found = animations[type];
|
|
254
|
+
if (!found)
|
|
255
|
+
throw new Error(`No animation of type "${type}" for key "${key}"`);
|
|
256
|
+
return {
|
|
257
|
+
...found,
|
|
258
|
+
...extraConf
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const transformShorthands = {
|
|
262
|
+
x: "translateX",
|
|
263
|
+
y: "translateY",
|
|
264
|
+
translateX: "x",
|
|
265
|
+
translateY: "y"
|
|
266
|
+
};
|
|
267
|
+
function getValue(input, isColor = !1) {
|
|
268
|
+
if (typeof input != "string")
|
|
269
|
+
return [input];
|
|
270
|
+
const [_, number, after] = input.match(/([-0-9]+)(deg|%|px)/) ?? [];
|
|
271
|
+
return [+number, after];
|
|
272
|
+
}
|
|
273
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
274
|
+
0 && (module.exports = {
|
|
275
|
+
AnimatedText,
|
|
276
|
+
AnimatedView,
|
|
277
|
+
createAnimations,
|
|
278
|
+
useAnimatedNumber,
|
|
279
|
+
useAnimatedNumberReaction,
|
|
280
|
+
useAnimatedNumberStyle
|
|
281
|
+
});
|
|
282
|
+
//# sourceMappingURL=createAnimations.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/createAnimations.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4B,kCAC5B,aAQO,yBACP,eAA2C,kBAC3C,sBAAyB;AA0BzB,MAAM,mBAAmB;AAAA,EACvB,WAAW;AAAA,EACX,SAAS;AACX,GAEM,gBAAgB;AAAA,EACpB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,mBAAmB;AACrB,GAGM,0BAA0B;AAAA,EAC9B,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,GAAG;AAAA;AAEL,GAEa,eAAe,6BAAS,MACxB,eAAe,6BAAS;AAE9B,SAAS,kBACd,SACyC;AACzC,QAAM,YAAQ;AAAA,IACZ;AAAA,EAKF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AW,oBAAoB,GAAG;AACxC,MAAI,MAAM,QAAQ,SAAS,GAAG;AAC5B,WAAO,UAAU,CAAC;AAClB,UAAM,OAAO,UAAU,CAAC,IAAI,GAAG,KAAK,UAAU,CAAC,IAAI,QAAQ;AAC3D,IAAI,SACE,OAAO,QAAS,WAClB,OAAO,QAEP,OAAQ,KAAa,QAAQ,MAC7B,YAAY;AAAA,EAGlB,OAAO;AACL,UAAM,MAAM,YAAY,GAAG,KAAK,YAAY,QAAQ;AACpD,WAAO,KAAK,MACZ,YAAY;AAAA,EACd;AACA,QAAM,QAAQ,WAAW,IAAI;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,yBAAyB,IAAI,cAAc,GAAG,GAAG;AAEnE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;AAGA,MAAM,sBAAsB;AAAA,EAC1B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY;AAAA,EACZ,YAAY;AACd;AAEA,SAAS,SAAS,OAAwB,UAAU,IAAO;AACzD,MAAI,OAAO,SAAU;AACnB,WAAO,CAAC,KAAK;AAEf,QAAM,CAAC,GAAG,QAAQ,KAAK,IAAI,MAAM,MAAM,qBAAqB,KAAK,CAAC;AAClE,SAAO,CAAC,CAAC,QAAQ,KAAK;AACxB;",
|
|
5
|
+
"names": ["res"]
|
|
6
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
7
|
for (let key of __getOwnPropNames(from))
|
|
9
|
-
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
9
|
return to;
|
|
13
|
-
};
|
|
14
|
-
var
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
12
|
var src_exports = {};
|
|
17
13
|
module.exports = __toCommonJS(src_exports);
|
|
18
14
|
var import_polyfill = require("./polyfill");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var src_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(src_exports);
|
|
15
|
+
var import_polyfill = require("./polyfill");
|
|
16
|
+
__reExport(src_exports, require("./createAnimations"), module.exports);
|
|
17
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
18
|
+
0 && (module.exports = {
|
|
19
|
+
...require("./createAnimations")
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/dist/cjs/polyfill.js
CHANGED
package/dist/cjs/polyfill.js.map
CHANGED