@tamagui/animations-react-native 1.0.1-rc.8 → 1.0.1-rc.9

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.
@@ -1,228 +1,154 @@
1
- import {
2
- isWeb,
3
- useEvent,
4
- useIsomorphicLayoutEffect,
5
- useSafeRef
6
- } from "@tamagui/core";
7
- import { usePresence } from "@tamagui/use-presence";
8
- import { useEffect, useMemo } from "react";
1
+ import { PresenceContext, usePresence } from "@tamagui/animate-presence";
2
+ import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/core";
3
+ import { useContext, useMemo, useRef } from "react";
9
4
  import { Animated } from "react-native";
10
5
  const animatedStyleKey = {
11
6
  transform: true,
12
7
  opacity: true
13
8
  };
14
- const AnimatedView = Animated.View;
15
- const AnimatedText = Animated.Text;
16
- function useAnimatedNumber(initial) {
17
- const state = useSafeRef(
18
- null
19
- );
20
- if (!state.current) {
21
- state.current = {
22
- composite: null,
23
- val: new Animated.Value(initial),
24
- strategy: { type: "spring" }
25
- };
26
- }
27
- return {
28
- getInstance() {
29
- return state.current.val;
30
- },
31
- getValue() {
32
- return state.current.val["_value"];
33
- },
34
- stop() {
35
- state.current.composite?.stop();
36
- state.current.composite = null;
37
- },
38
- setValue(next, { type, ...config } = { type: "spring" }) {
39
- const val = state.current.val;
40
- if (type === "direct") {
41
- val.setValue(next);
42
- } else if (type === "spring") {
43
- state.current.composite?.stop();
44
- const composite = Animated.spring(val, {
45
- ...config,
46
- toValue: next,
47
- useNativeDriver: !isWeb
48
- });
49
- composite.start();
50
- state.current.composite = composite;
51
- } else {
52
- state.current.composite?.stop();
53
- const composite = Animated.timing(val, {
54
- ...config,
55
- toValue: next,
56
- useNativeDriver: !isWeb
57
- });
58
- composite.start();
59
- state.current.composite = composite;
60
- }
61
- }
62
- };
63
- }
64
- function useAnimatedNumberReaction(value, cb) {
65
- const onChange = useEvent((current) => {
66
- cb(current.value);
67
- });
68
- useEffect(() => {
69
- const id = value.getInstance().addListener(onChange);
70
- return () => {
71
- value.getInstance().removeListener(id);
72
- };
73
- }, [value, onChange]);
74
- }
75
- function useAnimatedNumberStyle(value, getStyle) {
76
- return getStyle(value.getInstance());
77
- }
78
9
  function createAnimations(animations) {
10
+ const AnimatedView = Animated.View;
11
+ const AnimatedText = Animated.Text;
79
12
  AnimatedView["displayName"] = "AnimatedView";
80
13
  AnimatedText["displayName"] = "AnimatedText";
81
14
  return {
82
- isReactNative: true,
15
+ avoidClasses: true,
83
16
  animations,
84
17
  View: AnimatedView,
85
18
  Text: AnimatedText,
86
- useAnimatedNumber,
87
- useAnimatedNumberReaction,
88
- useAnimatedNumberStyle,
89
- usePresence,
90
- useAnimations: ({ props, onDidAnimate, style, state, presence }) => {
91
- const isExiting = presence?.[0] === false;
92
- const sendExitComplete = presence?.[1];
93
- const mergedStyles = style;
94
- const animateStyles = useSafeRef({});
95
- const animatedTranforms = useSafeRef([]);
96
- const animationsState = useSafeRef(null);
97
- if (!animationsState.current) {
98
- animationsState.current = /* @__PURE__ */ new WeakMap();
99
- }
19
+ useAnimations: (props, helpers) => {
20
+ var _a;
21
+ const { onDidAnimate, delay, getStyle, state } = helpers;
22
+ const [isPresent, sendExitComplete] = usePresence();
23
+ const presence = useContext(PresenceContext);
24
+ const isExiting = isPresent === false;
25
+ const isEntering = !state.mounted;
26
+ const all = getStyle({
27
+ isExiting,
28
+ isEntering,
29
+ exitVariant: presence == null ? void 0 : presence.exitVariant,
30
+ enterVariant: presence == null ? void 0 : presence.enterVariant
31
+ });
32
+ const animateStyles = useRef({});
33
+ const animatedTranforms = useRef([]);
34
+ const interpolations = useRef(/* @__PURE__ */ new WeakMap());
100
35
  const runners = [];
101
36
  const completions = [];
102
- const args = [JSON.stringify(mergedStyles), JSON.stringify(state), isExiting, !!onDidAnimate];
103
- const res = useMemo(() => {
104
- const nonAnimatedStyle = {};
105
- for (const key in mergedStyles) {
106
- const val = mergedStyles[key];
107
- if (!animatedStyleKey[key]) {
108
- nonAnimatedStyle[key] = val;
109
- continue;
110
- }
111
- if (key !== "transform") {
112
- animateStyles.current[key] = update(key, animateStyles.current[key], val);
113
- continue;
114
- }
115
- if (!val)
116
- continue;
117
- for (const [index, transform] of val.entries()) {
118
- if (!transform)
119
- continue;
120
- const tkey = Object.keys(transform)[0];
121
- const currentTransform = animatedTranforms.current[index]?.[tkey];
122
- animatedTranforms.current[index] = {
123
- [tkey]: update(tkey, currentTransform, transform[tkey])
124
- };
125
- animatedTranforms.current = [...animatedTranforms.current];
126
- }
37
+ function update(key, animated, valIn) {
38
+ const [val, type] = getValue(valIn);
39
+ const value = animated || new Animated.Value(val);
40
+ if (type) {
41
+ interpolations.current.set(value, getInterpolated(value, type, val));
127
42
  }
128
- const animatedStyle = {
129
- ...Object.fromEntries(
130
- Object.entries({
131
- ...animateStyles.current
132
- }).map(([k, v]) => [k, animationsState.current.get(v)?.interopolation || v])
133
- ),
134
- transform: animatedTranforms.current.map((r) => {
135
- const key = Object.keys(r)[0];
136
- const val = animationsState.current.get(r[key])?.interopolation || r[key];
137
- return { [key]: val };
138
- })
139
- };
140
- return {
141
- style: [nonAnimatedStyle, animatedStyle]
142
- };
143
- function update(key, animated, valIn) {
144
- const [val, type] = getValue(valIn);
145
- const value = animated || new Animated.Value(val);
146
- let interpolateArgs;
147
- if (type) {
148
- const curInterpolation = animationsState.current.get(value);
149
- interpolateArgs = getInterpolated(
150
- curInterpolation?.current ?? value["_value"],
151
- val,
152
- type
153
- );
154
- animationsState.current.set(value, {
155
- interopolation: value.interpolate(interpolateArgs),
156
- current: val
157
- });
158
- }
159
- if (value) {
160
- const animationConfig = getAnimationConfig(key, animations, props.animation);
161
- let resolve;
162
- const promise = new Promise((res2) => {
163
- resolve = res2;
164
- });
165
- completions.push(promise);
166
- runners.push(() => {
167
- value.stopAnimation();
168
- Animated.spring(value, {
169
- toValue: val,
170
- useNativeDriver: !isWeb,
171
- ...animationConfig
172
- }).start(({ finished }) => {
173
- if (finished) {
174
- resolve();
175
- }
176
- });
43
+ if (animated) {
44
+ const animationConfig = getAnimationConfig(key, animations, props.animation);
45
+ let resolve;
46
+ const promise = new Promise((res) => {
47
+ resolve = res;
48
+ });
49
+ completions.push(promise);
50
+ runners.push(() => {
51
+ Animated.spring(animated, {
52
+ toValue: val,
53
+ useNativeDriver: !isWeb,
54
+ ...animationConfig
55
+ }).start(({ finished }) => {
56
+ if (finished) {
57
+ resolve();
58
+ }
177
59
  });
178
- }
179
- if (process.env.NODE_ENV === "development") {
180
- if (props["debug"]) {
181
- console.log(" \u{1F4A0} animate", key, `from ${value["_value"]} to`, valIn, `(${val})`, "type", type, "interpolate", interpolateArgs);
60
+ });
61
+ }
62
+ return value;
63
+ }
64
+ function getValue(input) {
65
+ var _a2;
66
+ if (typeof input !== "string") {
67
+ return [input];
68
+ }
69
+ const neg = input[0] === "-";
70
+ if (neg)
71
+ input = input.slice(1);
72
+ const [_, number, after] = (_a2 = input.match(/([-0-9]+)(deg|%)/)) != null ? _a2 : [];
73
+ return [+number * (neg ? -1 : 1), after];
74
+ }
75
+ function getInterpolated(val, postfix, next) {
76
+ const cur = val["_value"];
77
+ const inputRange = [cur, next];
78
+ const outputRange = [`${cur}deg`, `${next}deg`];
79
+ if (next < cur) {
80
+ inputRange.reverse();
81
+ outputRange.reverse();
82
+ }
83
+ return val.interpolate({
84
+ inputRange,
85
+ outputRange
86
+ });
87
+ }
88
+ const nonAnimatedStyle = {};
89
+ for (const key of Object.keys(all)) {
90
+ const val = all[key];
91
+ if (animatedStyleKey[key]) {
92
+ if (key === "transform") {
93
+ if (val) {
94
+ for (const [index, transform] of val.entries()) {
95
+ if (!transform)
96
+ continue;
97
+ const tkey = Object.keys(transform)[0];
98
+ animatedTranforms.current[index] = {
99
+ [tkey]: update(tkey, (_a = animatedTranforms.current[index]) == null ? void 0 : _a[tkey], transform[tkey])
100
+ };
101
+ }
182
102
  }
103
+ } else {
104
+ animateStyles.current[key] = update(key, animateStyles.current[key], val);
183
105
  }
184
- return value;
106
+ } else {
107
+ nonAnimatedStyle[key] = val;
185
108
  }
186
- }, args);
109
+ }
110
+ const animatedStyle = {
111
+ ...Object.fromEntries(Object.entries({
112
+ ...animateStyles.current
113
+ }).map(([k, v]) => [k, interpolations.current.get(v) || v])),
114
+ transform: animatedTranforms.current.map((r) => {
115
+ const key = Object.keys(r)[0];
116
+ const val = interpolations.current.get(r[key]) || r[key];
117
+ return { [key]: val };
118
+ })
119
+ };
120
+ const args = [
121
+ JSON.stringify(all),
122
+ state.mounted,
123
+ state.hover,
124
+ state.press,
125
+ state.pressIn,
126
+ state.focus,
127
+ delay,
128
+ isPresent,
129
+ onDidAnimate,
130
+ presence == null ? void 0 : presence.exitVariant,
131
+ presence == null ? void 0 : presence.enterVariant
132
+ ];
187
133
  useIsomorphicLayoutEffect(() => {
188
- runners.forEach((r) => r());
189
- let cancel = false;
134
+ for (const runner of runners) {
135
+ runner();
136
+ }
190
137
  Promise.all(completions).then(() => {
191
- if (cancel)
192
- return;
193
- onDidAnimate?.();
138
+ onDidAnimate == null ? void 0 : onDidAnimate();
194
139
  if (isExiting) {
195
- sendExitComplete?.();
140
+ sendExitComplete == null ? void 0 : sendExitComplete();
196
141
  }
197
142
  });
198
- return () => {
199
- cancel = true;
143
+ }, args);
144
+ return useMemo(() => {
145
+ return {
146
+ style: [nonAnimatedStyle, animatedStyle]
200
147
  };
201
148
  }, args);
202
- if (process.env.NODE_ENV === "development") {
203
- if (props["debug"]) {
204
- console.log(`Returning animated`, res);
205
- }
206
- }
207
- return res;
208
149
  }
209
150
  };
210
151
  }
211
- function getInterpolated(current, next, postfix = "deg") {
212
- if (next === current) {
213
- current = next - 1e-9;
214
- }
215
- const inputRange = [current, next];
216
- const outputRange = [`${current}${postfix}`, `${next}${postfix}`];
217
- if (next < current) {
218
- inputRange.reverse();
219
- outputRange.reverse();
220
- }
221
- return {
222
- inputRange,
223
- outputRange
224
- };
225
- }
226
152
  function getAnimationConfig(key, animations, animation) {
227
153
  if (typeof animation === "string") {
228
154
  return animations[animation];
@@ -241,8 +167,8 @@ function getAnimationConfig(key, animations, animation) {
241
167
  }
242
168
  }
243
169
  } else {
244
- const val = animation?.[key];
245
- type = val?.type;
170
+ const val = animation == null ? void 0 : animation[key];
171
+ type = val == null ? void 0 : val.type;
246
172
  extraConf = val;
247
173
  }
248
174
  const found = animations[type];
@@ -254,19 +180,7 @@ function getAnimationConfig(key, animations, animation) {
254
180
  ...extraConf
255
181
  };
256
182
  }
257
- function getValue(input) {
258
- if (typeof input !== "string") {
259
- return [input];
260
- }
261
- const [_, number, after] = input.match(/([-0-9]+)(deg|%|px)/) ?? [];
262
- return [+number, after];
263
- }
264
183
  export {
265
- AnimatedText,
266
- AnimatedView,
267
- createAnimations,
268
- useAnimatedNumber,
269
- useAnimatedNumberReaction,
270
- useAnimatedNumberStyle
184
+ createAnimations
271
185
  };
272
186
  //# sourceMappingURL=createAnimations.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createAnimations.tsx"],
4
- "sourcesContent": ["import {\n AnimatedNumberStrategy,\n AnimationDriver,\n AnimationProp,\n UniversalAnimatedNumber,\n isWeb,\n useEvent,\n useIsomorphicLayoutEffect,\n useSafeRef,\n} from '@tamagui/core'\nimport { usePresence } from '@tamagui/use-presence'\nimport { useEffect, useMemo } from 'react'\nimport { Animated } from 'react-native'\n\ntype AnimationsConfig<A extends Object = any> = {\n [Key in keyof A]: AnimationConfig\n}\n\ntype AnimationConfig = Partial<\n Pick<\n Animated.SpringAnimationConfig,\n | 'delay'\n | 'bounciness'\n | 'damping'\n | 'friction'\n | 'mass'\n | 'overshootClamping'\n | 'speed'\n | 'stiffness'\n | 'tension'\n | 'velocity'\n >\n>\n\nconst animatedStyleKey = {\n transform: true,\n opacity: true,\n}\n\nexport const AnimatedView = Animated.View\nexport const AnimatedText = Animated.Text\n\nexport function useAnimatedNumber(initial: number): UniversalAnimatedNumber<Animated.Value> {\n const state = useSafeRef(\n null as any as {\n val: Animated.Value\n composite: Animated.CompositeAnimation | null\n strategy: AnimatedNumberStrategy\n }\n )\n if (!state.current) {\n state.current = {\n composite: null,\n val: new Animated.Value(initial),\n strategy: { type: 'spring' },\n }\n }\n\n return {\n getInstance() {\n return state.current.val\n },\n getValue() {\n return state.current.val['_value']\n },\n stop() {\n state.current.composite?.stop()\n state.current.composite = null\n },\n setValue(next: number, { type, ...config } = { type: 'spring' }) {\n const val = state.current.val\n if (type === 'direct') {\n val.setValue(next)\n } else if (type === 'spring') {\n state.current.composite?.stop()\n const composite = Animated.spring(val, {\n ...config,\n toValue: next,\n useNativeDriver: !isWeb,\n })\n composite.start()\n state.current.composite = composite\n } else {\n state.current.composite?.stop()\n const composite = Animated.timing(val, {\n ...config,\n toValue: next,\n useNativeDriver: !isWeb,\n })\n composite.start()\n state.current.composite = composite\n }\n },\n }\n}\n\nexport function useAnimatedNumberReaction(\n value: UniversalAnimatedNumber<Animated.Value>,\n cb: (current: number) => void\n) {\n const onChange = useEvent((current) => {\n cb(current.value)\n })\n\n useEffect(() => {\n const id = value.getInstance().addListener(onChange)\n return () => {\n value.getInstance().removeListener(id)\n }\n }, [value, onChange])\n}\n\nexport function useAnimatedNumberStyle<V extends UniversalAnimatedNumber<Animated.Value>>(\n value: V,\n getStyle: (value: any) => any\n) {\n return getStyle(value.getInstance())\n}\n\nexport function createAnimations<A extends AnimationsConfig>(animations: A): AnimationDriver<A> {\n AnimatedView['displayName'] = 'AnimatedView'\n AnimatedText['displayName'] = 'AnimatedText'\n\n return {\n isReactNative: true,\n animations,\n View: AnimatedView,\n Text: AnimatedText,\n useAnimatedNumber,\n useAnimatedNumberReaction,\n useAnimatedNumberStyle,\n usePresence,\n useAnimations: ({ props, onDidAnimate, style, state, presence }) => {\n const isExiting = presence?.[0] === false\n const sendExitComplete = presence?.[1]\n const mergedStyles = style\n const animateStyles = useSafeRef<Record<string, Animated.Value>>({})\n const animatedTranforms = useSafeRef<{ [key: string]: Animated.Value }[]>([])\n const animationsState = useSafeRef<\n WeakMap<\n Animated.Value,\n {\n interopolation: Animated.AnimatedInterpolation\n current?: number | undefined\n }\n >\n >(null as any)\n if (!animationsState.current) {\n animationsState.current = new WeakMap()\n }\n\n const runners: Function[] = []\n const completions: Promise<void>[] = []\n\n // const args = [JSON.stringify(mergedStyles)]\n const args = [JSON.stringify(mergedStyles), JSON.stringify(state), isExiting, !!onDidAnimate]\n\n const res = useMemo(() => {\n const nonAnimatedStyle = {}\n for (const key in mergedStyles) {\n const val = mergedStyles[key]\n if (!animatedStyleKey[key]) {\n nonAnimatedStyle[key] = val\n continue\n }\n if (key !== 'transform') {\n animateStyles.current[key] = update(key, animateStyles.current[key], val)\n continue\n }\n // key: 'transform'\n // for now just support one transform key\n if (!val) continue\n for (const [index, transform] of val.entries()) {\n if (!transform) continue\n const tkey = Object.keys(transform)[0]\n const currentTransform = animatedTranforms.current[index]?.[tkey]\n animatedTranforms.current[index] = {\n [tkey]: update(tkey, currentTransform, transform[tkey]),\n }\n animatedTranforms.current = [...animatedTranforms.current]\n }\n }\n\n const animatedStyle = {\n ...Object.fromEntries(\n Object.entries({\n ...animateStyles.current,\n }).map(([k, v]) => [k, animationsState.current!.get(v)?.interopolation || v])\n ),\n transform: animatedTranforms.current.map((r) => {\n const key = Object.keys(r)[0]\n const val = animationsState.current!.get(r[key])?.interopolation || r[key]\n return { [key]: val }\n }),\n }\n\n return {\n style: [nonAnimatedStyle, animatedStyle],\n }\n\n function update(key: string, animated: Animated.Value | undefined, valIn: string | number) {\n const [val, type] = getValue(valIn)\n const value = animated || new Animated.Value(val)\n let interpolateArgs: any\n if (type) {\n const curInterpolation = animationsState.current.get(value)\n interpolateArgs = getInterpolated(\n curInterpolation?.current ?? value['_value'],\n val,\n type\n )\n animationsState.current!.set(value, {\n interopolation: value.interpolate(interpolateArgs),\n current: val,\n })\n }\n if (value) {\n const animationConfig = getAnimationConfig(key, animations, props.animation)\n\n let resolve\n const promise = new Promise<void>((res) => {\n resolve = res\n })\n completions.push(promise)\n\n runners.push(() => {\n value.stopAnimation()\n Animated.spring(value, {\n toValue: val,\n useNativeDriver: !isWeb,\n ...animationConfig,\n }).start(({ finished }) => {\n if (finished) {\n resolve()\n }\n })\n })\n }\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n // prettier-ignore\n // eslint-disable-next-line no-console\n console.log(' \uD83D\uDCA0 animate', key, `from ${value['_value']} to`, valIn, `(${val})`, 'type', type, 'interpolate', interpolateArgs)\n }\n }\n return value\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, args)\n\n useIsomorphicLayoutEffect(() => {\n runners.forEach((r) => r())\n let cancel = false\n Promise.all(completions).then(() => {\n if (cancel) return\n onDidAnimate?.()\n if (isExiting) {\n sendExitComplete?.()\n }\n })\n return () => {\n cancel = true\n }\n }, args)\n\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n // eslint-disable-next-line no-console\n console.log(`Returning animated`, res)\n }\n }\n\n return res\n },\n }\n}\n\nfunction getInterpolated(current: number, next: number, postfix = 'deg') {\n if (next === current) {\n current = next - 0.000000001\n }\n const inputRange = [current, next]\n const outputRange = [`${current}${postfix}`, `${next}${postfix}`]\n if (next < current) {\n inputRange.reverse()\n outputRange.reverse()\n }\n return {\n inputRange,\n outputRange,\n }\n}\n\nfunction getAnimationConfig(key: string, animations: AnimationsConfig, animation?: AnimationProp) {\n if (typeof animation === 'string') {\n return animations[animation]\n }\n let type = ''\n let extraConf: any\n if (Array.isArray(animation)) {\n type = animation[0] as string\n const conf = animation[1] && animation[1][key]\n if (conf) {\n if (typeof conf === 'string') {\n type = conf\n } else {\n type = (conf as any).type || type\n extraConf = conf\n }\n }\n } else {\n const val = animation?.[key]\n type = val?.type\n extraConf = val\n }\n const found = animations[type]\n if (!found) {\n throw new Error(`No animation of type \"${type}\" for key \"${key}\"`)\n }\n return {\n ...found,\n ...extraConf,\n }\n}\n\nfunction getValue(input: number | string) {\n if (typeof input !== 'string') {\n return [input] as const\n }\n const [_, number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f;AACA,QAAM,CAAC,GAAG,QAAQ,KAAK,IAAI,MAAM,MAAM,qBAAqB,KAAK,CAAC;AAClE,SAAO,CAAC,CAAC,QAAQ,KAAK;AACxB;",
6
- "names": ["res"]
4
+ "sourcesContent": ["import { PresenceContext, usePresence } from '@tamagui/animate-presence'\nimport { AnimationDriver, AnimationProp, isWeb, useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { useContext, useMemo, useRef } from 'react'\nimport { Animated } from 'react-native'\n\ntype AnimationsConfig<A extends Object = any> = {\n [Key in keyof A]: AnimationConfig\n}\n\ntype AnimationConfig = Partial<\n Pick<\n Animated.SpringAnimationConfig,\n | 'delay'\n | 'bounciness'\n | 'damping'\n | 'friction'\n | 'mass'\n | 'overshootClamping'\n | 'speed'\n | 'stiffness'\n | 'tension'\n | 'velocity'\n >\n>\n\nconst animatedStyleKey = {\n transform: true,\n opacity: true,\n}\n\nexport function createAnimations<A extends AnimationsConfig>(animations: A): AnimationDriver<A> {\n const AnimatedView = Animated.View\n const AnimatedText = Animated.Text\n\n AnimatedView['displayName'] = 'AnimatedView'\n AnimatedText['displayName'] = 'AnimatedText'\n\n return {\n avoidClasses: true,\n animations,\n View: AnimatedView,\n Text: AnimatedText,\n useAnimations: (props, helpers) => {\n const { onDidAnimate, delay, getStyle, state } = helpers\n const [isPresent, sendExitComplete] = usePresence()\n const presence = useContext(PresenceContext)\n\n // const exitStyle = presence?.exitVariant\n // ? staticConfig.variantsParsed?.[presence.exitVariant]?.true || pseudos.exitStyle\n // : pseudos.exitStyle\n\n const isExiting = isPresent === false\n const isEntering = !state.mounted\n\n const all = getStyle({\n isExiting,\n isEntering,\n exitVariant: presence?.exitVariant,\n enterVariant: presence?.enterVariant,\n })\n\n const animateStyles = useRef<Record<string, Animated.Value>>({})\n const animatedTranforms = useRef<{ [key: string]: Animated.Value }[]>([])\n const interpolations = useRef(new WeakMap<Animated.Value, Animated.AnimatedInterpolation>())\n\n // TODO loop and create values, run them if they change\n\n const runners: Function[] = []\n const completions: Promise<void>[] = []\n\n function update(key: string, animated: Animated.Value | undefined, valIn: string | number) {\n const [val, type] = getValue(valIn)\n const value = animated || new Animated.Value(val)\n if (type) {\n interpolations.current.set(value, getInterpolated(value, type, val))\n }\n if (animated) {\n const animationConfig = getAnimationConfig(key, animations, props.animation)\n\n let resolve\n const promise = new Promise<void>((res) => {\n resolve = res\n })\n completions.push(promise)\n\n runners.push(() => {\n Animated.spring(animated, {\n toValue: val,\n useNativeDriver: !isWeb,\n ...animationConfig,\n }).start(({ finished }) => {\n if (finished) {\n resolve()\n }\n })\n })\n }\n return value\n }\n\n function getValue(input: number | string) {\n if (typeof input !== 'string') {\n return [input] as const\n }\n const neg = input[0] === '-'\n if (neg) input = input.slice(1)\n const [_, number, after] = input.match(/([-0-9]+)(deg|%)/) ?? []\n return [+number * (neg ? -1 : 1), after] as const\n }\n\n function getInterpolated(val: Animated.Value, postfix: string, next: number) {\n const cur = val['_value'] as number\n const inputRange = [cur, next]\n const outputRange = [`${cur}deg`, `${next}deg`]\n if (next < cur) {\n inputRange.reverse()\n outputRange.reverse()\n }\n return val.interpolate({\n inputRange,\n outputRange,\n })\n }\n\n const nonAnimatedStyle = {}\n for (const key of Object.keys(all)) {\n const val = all[key]\n if (animatedStyleKey[key]) {\n if (key === 'transform') {\n // for now just support one transform key\n if (val) {\n for (const [index, transform] of val.entries()) {\n if (!transform) continue\n const tkey = Object.keys(transform)[0]\n animatedTranforms.current[index] = {\n [tkey]: update(tkey, animatedTranforms.current[index]?.[tkey], transform[tkey]),\n }\n }\n }\n } else {\n animateStyles.current[key] = update(key, animateStyles.current[key], val)\n }\n } else {\n nonAnimatedStyle[key] = val\n }\n }\n\n const animatedStyle = {\n ...Object.fromEntries(\n Object.entries({\n ...animateStyles.current,\n }).map(([k, v]) => [k, interpolations.current.get(v) || v])\n ),\n transform: animatedTranforms.current.map((r) => {\n const key = Object.keys(r)[0]\n const val = interpolations.current.get(r[key]) || r[key]\n return { [key]: val }\n }),\n }\n\n const args = [\n JSON.stringify(all),\n state.mounted,\n state.hover,\n state.press,\n state.pressIn,\n state.focus,\n delay,\n isPresent,\n onDidAnimate,\n presence?.exitVariant,\n presence?.enterVariant,\n ]\n\n useIsomorphicLayoutEffect(() => {\n //\n for (const runner of runners) {\n runner()\n }\n Promise.all(completions).then(() => {\n onDidAnimate?.()\n if (isExiting) {\n sendExitComplete?.()\n }\n })\n }, args)\n\n return useMemo(() => {\n return {\n style: [nonAnimatedStyle, animatedStyle],\n }\n }, args)\n },\n }\n}\n\nfunction getAnimationConfig(key: string, animations: AnimationsConfig, animation?: AnimationProp) {\n if (typeof animation === 'string') {\n return animations[animation]\n }\n let type = ''\n let extraConf: any\n if (Array.isArray(animation)) {\n type = animation[0] as string\n const conf = animation[1] && animation[1][key]\n if (conf) {\n if (typeof conf === 'string') {\n type = conf\n } else {\n type = (conf as any).type || type\n extraConf = conf\n }\n }\n } else {\n const val = animation?.[key]\n type = val?.type\n extraConf = val\n }\n const found = animations[type]\n if (!found) {\n throw new Error(`No animation of type \"${type}\" for key \"${key}\"`)\n }\n return {\n ...found,\n ...extraConf,\n }\n}\n"],
5
+ "mappings": "AAAA;AACA;AACA;AACA;AAsBA,MAAM,mBAAmB;AAAA,EACvB,WAAW;AAAA,EACX,SAAS;AACX;AAEO,0BAAsD,YAAmC;AAC9F,QAAM,eAAe,SAAS;AAC9B,QAAM,eAAe,SAAS;AAE9B,eAAa,iBAAiB;AAC9B,eAAa,iBAAiB;AAE9B,SAAO;AAAA,IACL,cAAc;AAAA,IACd;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,eAAe,CAAC,OAAO,YAAY;AA1CvC;AA2CM,YAAM,EAAE,cAAc,OAAO,UAAU,UAAU;AACjD,YAAM,CAAC,WAAW,oBAAoB,YAAY;AAClD,YAAM,WAAW,WAAW,eAAe;AAM3C,YAAM,YAAY,cAAc;AAChC,YAAM,aAAa,CAAC,MAAM;AAE1B,YAAM,MAAM,SAAS;AAAA,Q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A,IACH,GAAG;AAAA,EACL;AACF;",
6
+ "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["import './polyfill'\n\nexport * from './createAnimations'\n"],
5
- "mappings": "AAAA,OAAO;AAEP,cAAc;",
5
+ "mappings": "AAAA;AAEA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/animations-react-native",
3
- "version": "1.0.1-rc.8",
3
+ "version": "1.0.1-rc.9",
4
4
  "source": "src/index.ts",
5
5
  "sideEffects": [
6
6
  "./polyfill.js"
@@ -15,11 +15,11 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@tamagui/core": "^1.0.1-rc.8",
19
- "@tamagui/use-presence": "^1.0.1-rc.8"
18
+ "@tamagui/core": "^1.0.1-rc.9",
19
+ "@tamagui/use-presence": "^1.0.1-rc.9"
20
20
  },
21
21
  "devDependencies": {
22
- "@tamagui/build": "^1.0.1-rc.8",
22
+ "@tamagui/build": "^1.0.1-rc.9",
23
23
  "react": "^18.2.0",
24
24
  "react-dom": "^18.2.0",
25
25
  "react-native": "*"