@tamagui/animations-react-native 2.0.0-rc.26 → 2.0.0-rc.26-1773683384816

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/animations-react-native",
3
- "version": "2.0.0-rc.26",
3
+ "version": "2.0.0-rc.26-1773683384816",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -38,13 +38,13 @@
38
38
  "clean:build": "tamagui-build clean:build"
39
39
  },
40
40
  "dependencies": {
41
- "@tamagui/animation-helpers": "2.0.0-rc.26",
42
- "@tamagui/constants": "2.0.0-rc.26",
43
- "@tamagui/use-presence": "2.0.0-rc.26",
44
- "@tamagui/web": "2.0.0-rc.26"
41
+ "@tamagui/animation-helpers": "2.0.0-rc.26-1773683384816",
42
+ "@tamagui/constants": "2.0.0-rc.26-1773683384816",
43
+ "@tamagui/use-presence": "2.0.0-rc.26-1773683384816",
44
+ "@tamagui/web": "2.0.0-rc.26-1773683384816"
45
45
  },
46
46
  "devDependencies": {
47
- "@tamagui/build": "2.0.0-rc.26",
47
+ "@tamagui/build": "2.0.0-rc.26-1773683384816",
48
48
  "react": ">=19",
49
49
  "react-native": "0.81.5"
50
50
  },
@@ -1,313 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var createAnimations_exports = {};
24
- __export(createAnimations_exports, {
25
- AnimatedText: () => AnimatedText,
26
- AnimatedView: () => AnimatedView,
27
- createAnimations: () => createAnimations,
28
- useAnimatedNumber: () => useAnimatedNumber,
29
- useAnimatedNumberReaction: () => useAnimatedNumberReaction,
30
- useAnimatedNumberStyle: () => useAnimatedNumberStyle
31
- });
32
- module.exports = __toCommonJS(createAnimations_exports);
33
- var import_animation_helpers = require("@tamagui/animation-helpers"), import_constants = require("@tamagui/constants"), import_use_presence = require("@tamagui/use-presence"), import_web = require("@tamagui/web"), import_react = __toESM(require("react"), 1), import_react_native = require("react-native-web");
34
- const resolveDynamicValue = (value, isDark) => value && typeof value == "object" && "dynamic" in value ? isDark ? value.dynamic.dark : value.dynamic.light : value, animatedStyleKey = {
35
- transform: !0,
36
- opacity: !0
37
- }, colorStyleKey = {
38
- backgroundColor: !0,
39
- color: !0,
40
- borderColor: !0,
41
- borderLeftColor: !0,
42
- borderRightColor: !0,
43
- borderTopColor: !0,
44
- borderBottomColor: !0
45
- }, costlyToAnimateStyleKey = {
46
- borderRadius: !0,
47
- borderTopLeftRadius: !0,
48
- borderTopRightRadius: !0,
49
- borderBottomLeftRadius: !0,
50
- borderBottomRightRadius: !0,
51
- borderWidth: !0,
52
- borderLeftWidth: !0,
53
- borderRightWidth: !0,
54
- borderTopWidth: !0,
55
- borderBottomWidth: !0,
56
- ...colorStyleKey
57
- // TODO for other keys like height or width, it's better to not add them here till layout animations are ready
58
- }, AnimatedView = import_react_native.Animated.View, AnimatedText = import_react_native.Animated.Text;
59
- function useAnimatedNumber(initial) {
60
- const state = import_react.default.useRef(
61
- null
62
- );
63
- return state.current || (state.current = {
64
- composite: null,
65
- val: new import_react_native.Animated.Value(initial),
66
- strategy: { type: "spring" }
67
- }), {
68
- getInstance() {
69
- return state.current.val;
70
- },
71
- getValue() {
72
- return state.current.val._value;
73
- },
74
- stop() {
75
- state.current.composite?.stop(), state.current.composite = null;
76
- },
77
- setValue(next, { type, ...config } = { type: "spring" }, onFinish) {
78
- const val = state.current.val, handleFinish = onFinish ? ({ finished }) => finished ? onFinish() : null : void 0;
79
- if (type === "direct")
80
- val.setValue(next);
81
- else if (type === "spring") {
82
- state.current.composite?.stop();
83
- const composite = import_react_native.Animated.spring(val, {
84
- ...config,
85
- toValue: next,
86
- useNativeDriver: !import_constants.isWeb
87
- });
88
- composite.start(handleFinish), state.current.composite = composite;
89
- } else {
90
- state.current.composite?.stop();
91
- const composite = import_react_native.Animated.timing(val, {
92
- ...config,
93
- toValue: next,
94
- useNativeDriver: !import_constants.isWeb
95
- });
96
- composite.start(handleFinish), state.current.composite = composite;
97
- }
98
- }
99
- };
100
- }
101
- const useAnimatedNumberReaction = ({ value }, onValue) => {
102
- const onChange = (0, import_web.useEvent)((current) => {
103
- onValue(current.value);
104
- });
105
- import_react.default.useEffect(() => {
106
- const id = value.getInstance().addListener(onChange);
107
- return () => {
108
- value.getInstance().removeListener(id);
109
- };
110
- }, [value, onChange]);
111
- }, useAnimatedNumberStyle = (value, getStyle) => getStyle(value.getInstance());
112
- function createAnimations(animations) {
113
- return {
114
- isReactNative: !0,
115
- inputStyle: "value",
116
- outputStyle: "inline",
117
- animations,
118
- needsCustomComponent: !0,
119
- View: AnimatedView,
120
- Text: AnimatedText,
121
- useAnimatedNumber,
122
- useAnimatedNumberReaction,
123
- useAnimatedNumberStyle,
124
- usePresence: import_use_presence.usePresence,
125
- ResetPresence: import_use_presence.ResetPresence,
126
- useAnimations: ({ props, onDidAnimate, style, componentState, presence }) => {
127
- const isDisabled = import_constants.isWeb && componentState.unmounted === !0, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], [, themeState] = (0, import_web.useThemeWithState)({}), isDark = themeState?.scheme === "dark" || themeState?.name?.startsWith("dark"), animateStyles = import_react.default.useRef({}), animatedTranforms = import_react.default.useRef([]), animationsState = import_react.default.useRef(
128
- /* @__PURE__ */ new WeakMap()
129
- ), exitCycleIdRef = import_react.default.useRef(0), exitCompletedRef = import_react.default.useRef(!1), wasExitingRef = import_react.default.useRef(!1), justStartedExiting = isExiting && !wasExitingRef.current, justStoppedExiting = !isExiting && wasExitingRef.current;
130
- justStartedExiting && (exitCycleIdRef.current++, exitCompletedRef.current = !1), justStoppedExiting && exitCycleIdRef.current++;
131
- const animateOnly = props.animateOnly || [], hasTransitionOnly = !!props.animateOnly, isEntering = !!componentState.unmounted, wasEnteringRef = import_react.default.useRef(isEntering), justFinishedEntering = wasEnteringRef.current && !isEntering;
132
- import_react.default.useEffect(() => {
133
- wasEnteringRef.current = isEntering;
134
- });
135
- const args = [
136
- JSON.stringify(style),
137
- componentState,
138
- isExiting,
139
- !!onDidAnimate,
140
- isDark,
141
- justFinishedEntering,
142
- hasTransitionOnly
143
- ], isThereNoNativeStyleKeys = import_react.default.useMemo(() => import_constants.isWeb ? !0 : Object.keys(style).some((key) => animateOnly ? !animatedStyleKey[key] && animateOnly.indexOf(key) === -1 : !animatedStyleKey[key]), args), res = import_react.default.useMemo(() => {
144
- const runners = [], completions = [], animationState = isExiting ? "exit" : isEntering || justFinishedEntering ? "enter" : "default", nonAnimatedStyle = {};
145
- for (const key in style) {
146
- const rawVal = style[key], val = resolveDynamicValue(rawVal, isDark);
147
- if (val !== void 0 && !isDisabled) {
148
- if (animatedStyleKey[key] == null && !costlyToAnimateStyleKey[key]) {
149
- nonAnimatedStyle[key] = val;
150
- continue;
151
- }
152
- if (hasTransitionOnly && !animateOnly.includes(key)) {
153
- nonAnimatedStyle[key] = val;
154
- continue;
155
- }
156
- if (key !== "transform") {
157
- animateStyles.current[key] = update(key, animateStyles.current[key], val);
158
- continue;
159
- }
160
- if (val) {
161
- if (typeof val == "string") {
162
- console.warn("Warning: Tamagui can't animate string transforms yet!");
163
- continue;
164
- }
165
- for (const [index, transform] of val.entries()) {
166
- if (!transform) continue;
167
- const tkey = Object.keys(transform)[0], currentTransform = animatedTranforms.current[index]?.[tkey];
168
- animatedTranforms.current[index] = {
169
- [tkey]: update(tkey, currentTransform, transform[tkey])
170
- }, animatedTranforms.current = [...animatedTranforms.current];
171
- }
172
- }
173
- }
174
- }
175
- const animatedTransformStyle = animatedTranforms.current.length > 0 ? {
176
- transform: animatedTranforms.current.map((r) => {
177
- const key = Object.keys(r)[0], val = animationsState.current.get(r[key])?.interpolation || r[key];
178
- return { [key]: val };
179
- })
180
- } : {}, animatedStyle = {
181
- ...Object.fromEntries(
182
- Object.entries(animateStyles.current).map(([k, v]) => [
183
- k,
184
- animationsState.current.get(v)?.interpolation || v
185
- ])
186
- ),
187
- ...animatedTransformStyle
188
- };
189
- return {
190
- runners,
191
- completions,
192
- style: [nonAnimatedStyle, animatedStyle]
193
- };
194
- function update(key, animated, valIn) {
195
- const isColorStyleKey = colorStyleKey[key], [val, type] = isColorStyleKey ? [0, void 0] : getValue(valIn);
196
- let animateToValue = val;
197
- const value = animated || new import_react_native.Animated.Value(val), curInterpolation = animationsState.current.get(value);
198
- let interpolateArgs;
199
- if (type && (interpolateArgs = getInterpolated(
200
- curInterpolation?.current ?? value._value,
201
- val,
202
- type
203
- ), animationsState.current.set(value, {
204
- interpolation: value.interpolate(interpolateArgs),
205
- current: val
206
- })), isColorStyleKey && (animateToValue = curInterpolation?.animateToValue ? 0 : 1, interpolateArgs = getColorInterpolated(
207
- curInterpolation?.current,
208
- // valIn is the next color
209
- valIn,
210
- animateToValue
211
- ), animationsState.current.set(value, {
212
- current: valIn,
213
- interpolation: value.interpolate(interpolateArgs),
214
- animateToValue: curInterpolation?.animateToValue ? 0 : 1
215
- })), value) {
216
- const animationConfig = getAnimationConfig(
217
- key,
218
- animations,
219
- props.transition,
220
- animationState
221
- );
222
- let resolve;
223
- const promise = new Promise((res2) => {
224
- resolve = res2;
225
- });
226
- completions.push(promise), runners.push(() => {
227
- value.stopAnimation();
228
- function getAnimation() {
229
- return import_react_native.Animated[animationConfig.type || "spring"](value, {
230
- toValue: animateToValue,
231
- useNativeDriver: !import_constants.isWeb && !isThereNoNativeStyleKeys,
232
- ...animationConfig
233
- });
234
- }
235
- (animationConfig.delay ? import_react_native.Animated.sequence([
236
- import_react_native.Animated.delay(animationConfig.delay),
237
- getAnimation()
238
- ]) : getAnimation()).start(({ finished }) => {
239
- (finished || isExiting) && resolve();
240
- });
241
- });
242
- }
243
- return process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(
244
- " \u{1F4A0} animate",
245
- key,
246
- `from (${value._value}) to`,
247
- valIn,
248
- `(${val})`,
249
- "type",
250
- type,
251
- "interpolate",
252
- interpolateArgs
253
- ), value;
254
- }
255
- }, args);
256
- return import_react.default.useEffect(() => {
257
- wasExitingRef.current = isExiting;
258
- }), (0, import_constants.useIsomorphicLayoutEffect)(() => {
259
- res.runners.forEach((r) => r());
260
- const cycleId = exitCycleIdRef.current;
261
- if (res.completions.length === 0) {
262
- onDidAnimate?.(), isExiting && !exitCompletedRef.current && (exitCompletedRef.current = !0, sendExitComplete?.());
263
- return;
264
- }
265
- let cancel = !1;
266
- return Promise.all(res.completions).then(() => {
267
- cancel || isExiting && cycleId !== exitCycleIdRef.current || isExiting && exitCompletedRef.current || (onDidAnimate?.(), isExiting && (exitCompletedRef.current = !0, sendExitComplete?.()));
268
- }), () => {
269
- cancel = !0;
270
- };
271
- }, args), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("Animated", { response: res, inputStyle: style, isExiting }), res;
272
- }
273
- };
274
- }
275
- function getColorInterpolated(currentColor, nextColor, animateToValue) {
276
- const inputRange = [0, 1], outputRange = [currentColor || nextColor, nextColor];
277
- return animateToValue === 0 && outputRange.reverse(), {
278
- inputRange,
279
- outputRange
280
- };
281
- }
282
- function getInterpolated(current, next, postfix = "deg") {
283
- next === current && (current = next - 1e-9);
284
- const inputRange = [current, next], outputRange = [`${current}${postfix}`, `${next}${postfix}`];
285
- return next < current && (inputRange.reverse(), outputRange.reverse()), {
286
- inputRange,
287
- outputRange
288
- };
289
- }
290
- function getAnimationConfig(key, animations, transition, animationState = "default") {
291
- const normalized = (0, import_animation_helpers.normalizeTransition)(transition), shortKey = transformShorthands[key], propAnimation = normalized.properties[key] ?? normalized.properties[shortKey];
292
- let animationType = null, extraConf = {};
293
- return typeof propAnimation == "string" ? animationType = propAnimation : propAnimation && typeof propAnimation == "object" ? (animationType = propAnimation.type || (0, import_animation_helpers.getEffectiveAnimation)(normalized, animationState), extraConf = propAnimation) : animationType = (0, import_animation_helpers.getEffectiveAnimation)(normalized, animationState), normalized.delay && !extraConf.delay && (extraConf = { ...extraConf, delay: normalized.delay }), {
294
- ...animationType ? animations[animationType] : {},
295
- // Apply global spring config overrides (from transition={['bouncy', { stiffness: 1000 }]})
296
- ...normalized.config,
297
- // Property-specific config takes highest precedence
298
- ...extraConf
299
- };
300
- }
301
- const transformShorthands = {
302
- x: "translateX",
303
- y: "translateY",
304
- translateX: "x",
305
- translateY: "y"
306
- };
307
- function getValue(input, isColor = !1) {
308
- if (typeof input != "string")
309
- return [input];
310
- const [_, number, after] = input.match(/([-0-9]+)(deg|%|px)/) ?? [];
311
- return [+number, after];
312
- }
313
- //# sourceMappingURL=createAnimations.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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,SAAS,CAAC,UAAU,UACjC,YAAY,EAAE,GAAG,WAAW,OAAO,WAAW,MAAM,IAI/C;AAAA,IACL,GAFY,gBAAgB,WAAW,aAAa,IAAI,CAAC;AAAA;AAAA,IAIzD,GAAG,WAAW;AAAA;AAAA,IAEd,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": ["React", "res"]
6
- }
@@ -1,2 +0,0 @@
1
- typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = typeof setImmediate > "u" ? setTimeout : setImmediate);
2
- //# sourceMappingURL=polyfill.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/polyfill.ts"],
4
- "mappings": "AACI,OAAO,wBAA0B,QACnC,WAAW,wBACT,OAAO,eAAiB,MAAc,aAAa;",
5
- "names": []
6
- }
@@ -1,294 +0,0 @@
1
- import { normalizeTransition, getEffectiveAnimation } from "@tamagui/animation-helpers";
2
- import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
3
- import { ResetPresence, usePresence } from "@tamagui/use-presence";
4
- import { useEvent, useThemeWithState } from "@tamagui/web";
5
- import React from "react";
6
- import { Animated } from "react-native-web";
7
- const resolveDynamicValue = (value, isDark) => value && typeof value == "object" && "dynamic" in value ? isDark ? value.dynamic.dark : value.dynamic.light : value, animatedStyleKey = {
8
- transform: !0,
9
- opacity: !0
10
- }, colorStyleKey = {
11
- backgroundColor: !0,
12
- color: !0,
13
- borderColor: !0,
14
- borderLeftColor: !0,
15
- borderRightColor: !0,
16
- borderTopColor: !0,
17
- borderBottomColor: !0
18
- }, costlyToAnimateStyleKey = {
19
- borderRadius: !0,
20
- borderTopLeftRadius: !0,
21
- borderTopRightRadius: !0,
22
- borderBottomLeftRadius: !0,
23
- borderBottomRightRadius: !0,
24
- borderWidth: !0,
25
- borderLeftWidth: !0,
26
- borderRightWidth: !0,
27
- borderTopWidth: !0,
28
- borderBottomWidth: !0,
29
- ...colorStyleKey
30
- // TODO for other keys like height or width, it's better to not add them here till layout animations are ready
31
- }, AnimatedView = Animated.View, AnimatedText = Animated.Text;
32
- function useAnimatedNumber(initial) {
33
- const state = React.useRef(
34
- null
35
- );
36
- return state.current || (state.current = {
37
- composite: null,
38
- val: new Animated.Value(initial),
39
- strategy: { type: "spring" }
40
- }), {
41
- getInstance() {
42
- return state.current.val;
43
- },
44
- getValue() {
45
- return state.current.val._value;
46
- },
47
- stop() {
48
- state.current.composite?.stop(), state.current.composite = null;
49
- },
50
- setValue(next, { type, ...config } = { type: "spring" }, onFinish) {
51
- const val = state.current.val, handleFinish = onFinish ? ({ finished }) => finished ? onFinish() : null : void 0;
52
- if (type === "direct")
53
- val.setValue(next);
54
- else if (type === "spring") {
55
- state.current.composite?.stop();
56
- const composite = Animated.spring(val, {
57
- ...config,
58
- toValue: next,
59
- useNativeDriver: !isWeb
60
- });
61
- composite.start(handleFinish), state.current.composite = composite;
62
- } else {
63
- state.current.composite?.stop();
64
- const composite = Animated.timing(val, {
65
- ...config,
66
- toValue: next,
67
- useNativeDriver: !isWeb
68
- });
69
- composite.start(handleFinish), state.current.composite = composite;
70
- }
71
- }
72
- };
73
- }
74
- const useAnimatedNumberReaction = ({ value }, onValue) => {
75
- const onChange = useEvent((current) => {
76
- onValue(current.value);
77
- });
78
- React.useEffect(() => {
79
- const id = value.getInstance().addListener(onChange);
80
- return () => {
81
- value.getInstance().removeListener(id);
82
- };
83
- }, [value, onChange]);
84
- }, useAnimatedNumberStyle = (value, getStyle) => getStyle(value.getInstance());
85
- function createAnimations(animations) {
86
- return {
87
- isReactNative: !0,
88
- inputStyle: "value",
89
- outputStyle: "inline",
90
- animations,
91
- needsCustomComponent: !0,
92
- View: AnimatedView,
93
- Text: AnimatedText,
94
- useAnimatedNumber,
95
- useAnimatedNumberReaction,
96
- useAnimatedNumberStyle,
97
- usePresence,
98
- ResetPresence,
99
- useAnimations: ({ props, onDidAnimate, style, componentState, presence }) => {
100
- const isDisabled = isWeb && componentState.unmounted === !0, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], [, themeState] = useThemeWithState({}), isDark = themeState?.scheme === "dark" || themeState?.name?.startsWith("dark"), animateStyles = React.useRef({}), animatedTranforms = React.useRef([]), animationsState = React.useRef(
101
- /* @__PURE__ */ new WeakMap()
102
- ), exitCycleIdRef = React.useRef(0), exitCompletedRef = React.useRef(!1), wasExitingRef = React.useRef(!1), justStartedExiting = isExiting && !wasExitingRef.current, justStoppedExiting = !isExiting && wasExitingRef.current;
103
- justStartedExiting && (exitCycleIdRef.current++, exitCompletedRef.current = !1), justStoppedExiting && exitCycleIdRef.current++;
104
- const animateOnly = props.animateOnly || [], hasTransitionOnly = !!props.animateOnly, isEntering = !!componentState.unmounted, wasEnteringRef = React.useRef(isEntering), justFinishedEntering = wasEnteringRef.current && !isEntering;
105
- React.useEffect(() => {
106
- wasEnteringRef.current = isEntering;
107
- });
108
- const args = [
109
- JSON.stringify(style),
110
- componentState,
111
- isExiting,
112
- !!onDidAnimate,
113
- isDark,
114
- justFinishedEntering,
115
- hasTransitionOnly
116
- ], isThereNoNativeStyleKeys = React.useMemo(() => isWeb ? !0 : Object.keys(style).some((key) => animateOnly ? !animatedStyleKey[key] && animateOnly.indexOf(key) === -1 : !animatedStyleKey[key]), args), res = React.useMemo(() => {
117
- const runners = [], completions = [], animationState = isExiting ? "exit" : isEntering || justFinishedEntering ? "enter" : "default", nonAnimatedStyle = {};
118
- for (const key in style) {
119
- const rawVal = style[key], val = resolveDynamicValue(rawVal, isDark);
120
- if (val !== void 0 && !isDisabled) {
121
- if (animatedStyleKey[key] == null && !costlyToAnimateStyleKey[key]) {
122
- nonAnimatedStyle[key] = val;
123
- continue;
124
- }
125
- if (hasTransitionOnly && !animateOnly.includes(key)) {
126
- nonAnimatedStyle[key] = val;
127
- continue;
128
- }
129
- if (key !== "transform") {
130
- animateStyles.current[key] = update(key, animateStyles.current[key], val);
131
- continue;
132
- }
133
- if (val) {
134
- if (typeof val == "string") {
135
- console.warn("Warning: Tamagui can't animate string transforms yet!");
136
- continue;
137
- }
138
- for (const [index, transform] of val.entries()) {
139
- if (!transform) continue;
140
- const tkey = Object.keys(transform)[0], currentTransform = animatedTranforms.current[index]?.[tkey];
141
- animatedTranforms.current[index] = {
142
- [tkey]: update(tkey, currentTransform, transform[tkey])
143
- }, animatedTranforms.current = [...animatedTranforms.current];
144
- }
145
- }
146
- }
147
- }
148
- const animatedTransformStyle = animatedTranforms.current.length > 0 ? {
149
- transform: animatedTranforms.current.map((r) => {
150
- const key = Object.keys(r)[0], val = animationsState.current.get(r[key])?.interpolation || r[key];
151
- return { [key]: val };
152
- })
153
- } : {}, animatedStyle = {
154
- ...Object.fromEntries(
155
- Object.entries(animateStyles.current).map(([k, v]) => [
156
- k,
157
- animationsState.current.get(v)?.interpolation || v
158
- ])
159
- ),
160
- ...animatedTransformStyle
161
- };
162
- return {
163
- runners,
164
- completions,
165
- style: [nonAnimatedStyle, animatedStyle]
166
- };
167
- function update(key, animated, valIn) {
168
- const isColorStyleKey = colorStyleKey[key], [val, type] = isColorStyleKey ? [0, void 0] : getValue(valIn);
169
- let animateToValue = val;
170
- const value = animated || new Animated.Value(val), curInterpolation = animationsState.current.get(value);
171
- let interpolateArgs;
172
- if (type && (interpolateArgs = getInterpolated(
173
- curInterpolation?.current ?? value._value,
174
- val,
175
- type
176
- ), animationsState.current.set(value, {
177
- interpolation: value.interpolate(interpolateArgs),
178
- current: val
179
- })), isColorStyleKey && (animateToValue = curInterpolation?.animateToValue ? 0 : 1, interpolateArgs = getColorInterpolated(
180
- curInterpolation?.current,
181
- // valIn is the next color
182
- valIn,
183
- animateToValue
184
- ), animationsState.current.set(value, {
185
- current: valIn,
186
- interpolation: value.interpolate(interpolateArgs),
187
- animateToValue: curInterpolation?.animateToValue ? 0 : 1
188
- })), value) {
189
- const animationConfig = getAnimationConfig(
190
- key,
191
- animations,
192
- props.transition,
193
- animationState
194
- );
195
- let resolve;
196
- const promise = new Promise((res2) => {
197
- resolve = res2;
198
- });
199
- completions.push(promise), runners.push(() => {
200
- value.stopAnimation();
201
- function getAnimation() {
202
- return Animated[animationConfig.type || "spring"](value, {
203
- toValue: animateToValue,
204
- useNativeDriver: !isWeb && !isThereNoNativeStyleKeys,
205
- ...animationConfig
206
- });
207
- }
208
- (animationConfig.delay ? Animated.sequence([
209
- Animated.delay(animationConfig.delay),
210
- getAnimation()
211
- ]) : getAnimation()).start(({ finished }) => {
212
- (finished || isExiting) && resolve();
213
- });
214
- });
215
- }
216
- return process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(
217
- " \u{1F4A0} animate",
218
- key,
219
- `from (${value._value}) to`,
220
- valIn,
221
- `(${val})`,
222
- "type",
223
- type,
224
- "interpolate",
225
- interpolateArgs
226
- ), value;
227
- }
228
- }, args);
229
- return React.useEffect(() => {
230
- wasExitingRef.current = isExiting;
231
- }), useIsomorphicLayoutEffect(() => {
232
- res.runners.forEach((r) => r());
233
- const cycleId = exitCycleIdRef.current;
234
- if (res.completions.length === 0) {
235
- onDidAnimate?.(), isExiting && !exitCompletedRef.current && (exitCompletedRef.current = !0, sendExitComplete?.());
236
- return;
237
- }
238
- let cancel = !1;
239
- return Promise.all(res.completions).then(() => {
240
- cancel || isExiting && cycleId !== exitCycleIdRef.current || isExiting && exitCompletedRef.current || (onDidAnimate?.(), isExiting && (exitCompletedRef.current = !0, sendExitComplete?.()));
241
- }), () => {
242
- cancel = !0;
243
- };
244
- }, args), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("Animated", { response: res, inputStyle: style, isExiting }), res;
245
- }
246
- };
247
- }
248
- function getColorInterpolated(currentColor, nextColor, animateToValue) {
249
- const inputRange = [0, 1], outputRange = [currentColor || nextColor, nextColor];
250
- return animateToValue === 0 && outputRange.reverse(), {
251
- inputRange,
252
- outputRange
253
- };
254
- }
255
- function getInterpolated(current, next, postfix = "deg") {
256
- next === current && (current = next - 1e-9);
257
- const inputRange = [current, next], outputRange = [`${current}${postfix}`, `${next}${postfix}`];
258
- return next < current && (inputRange.reverse(), outputRange.reverse()), {
259
- inputRange,
260
- outputRange
261
- };
262
- }
263
- function getAnimationConfig(key, animations, transition, animationState = "default") {
264
- const normalized = normalizeTransition(transition), shortKey = transformShorthands[key], propAnimation = normalized.properties[key] ?? normalized.properties[shortKey];
265
- let animationType = null, extraConf = {};
266
- return typeof propAnimation == "string" ? animationType = propAnimation : propAnimation && typeof propAnimation == "object" ? (animationType = propAnimation.type || getEffectiveAnimation(normalized, animationState), extraConf = propAnimation) : animationType = getEffectiveAnimation(normalized, animationState), normalized.delay && !extraConf.delay && (extraConf = { ...extraConf, delay: normalized.delay }), {
267
- ...animationType ? animations[animationType] : {},
268
- // Apply global spring config overrides (from transition={['bouncy', { stiffness: 1000 }]})
269
- ...normalized.config,
270
- // Property-specific config takes highest precedence
271
- ...extraConf
272
- };
273
- }
274
- const transformShorthands = {
275
- x: "translateX",
276
- y: "translateY",
277
- translateX: "x",
278
- translateY: "y"
279
- };
280
- function getValue(input, isColor = !1) {
281
- if (typeof input != "string")
282
- return [input];
283
- const [_, number, after] = input.match(/([-0-9]+)(deg|%|px)/) ?? [];
284
- return [+number, after];
285
- }
286
- export {
287
- AnimatedText,
288
- AnimatedView,
289
- createAnimations,
290
- useAnimatedNumber,
291
- useAnimatedNumberReaction,
292
- useAnimatedNumberStyle
293
- };
294
- //# sourceMappingURL=createAnimations.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": "AAAA,SAAS,qBAAqB,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AA,IACL,GAFY,gBAAgB,WAAW,aAAa,IAAI,CAAC;AAAA;AAAA,IAIzD,GAAG,WAAW;AAAA;AAAA,IAEd,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
- }
@@ -1,2 +0,0 @@
1
- typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = typeof setImmediate > "u" ? setTimeout : setImmediate);
2
- //# sourceMappingURL=polyfill.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/polyfill.ts"],
4
- "mappings": "AACI,OAAO,wBAA0B,QACnC,WAAW,wBACT,OAAO,eAAiB,MAAc,aAAa;",
5
- "names": []
6
- }