@tamagui/animations-css 1.61.3 → 1.62.1

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,37 +1,30 @@
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 __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var createAnimations_exports = {};
20
16
  __export(createAnimations_exports, {
21
17
  createAnimations: () => createAnimations
22
18
  });
23
19
  module.exports = __toCommonJS(createAnimations_exports);
24
- var import_core = require("@tamagui/core");
25
- var import_cubic_bezier_animator = require("@tamagui/cubic-bezier-animator");
26
- var import_use_presence = require("@tamagui/use-presence");
27
- var import_react = require("react");
20
+ var import_core = require("@tamagui/core"), import_cubic_bezier_animator = require("@tamagui/cubic-bezier-animator"), import_use_presence = require("@tamagui/use-presence"), import_react = require("react");
28
21
  function createAnimations(animations) {
29
22
  return {
30
23
  View: import_core.Stack,
31
24
  Text: import_core.Text,
32
25
  animations,
33
26
  usePresence: import_use_presence.usePresence,
34
- supportsCSSVars: true,
27
+ supportsCSSVars: !0,
35
28
  useAnimatedNumber(initial) {
36
29
  const [val, setVal] = (0, import_react.useState)(initial);
37
30
  return {
@@ -54,15 +47,9 @@ function createAnimations(animations) {
54
47
  return;
55
48
  const onTransitionEvent = (e) => {
56
49
  onValue(value.getValue());
57
- };
58
- const node = hostRef.current;
59
- node.addEventListener("transitionstart", onTransitionEvent);
60
- node.addEventListener("transitioncancel", onTransitionEvent);
61
- node.addEventListener("transitionend", onTransitionEvent);
62
- return () => {
63
- node.removeEventListener("transitionstart", onTransitionEvent);
64
- node.removeEventListener("transitioncancel", onTransitionEvent);
65
- node.removeEventListener("transitionend", onTransitionEvent);
50
+ }, node = hostRef.current;
51
+ return node.addEventListener("transitionstart", onTransitionEvent), node.addEventListener("transitioncancel", onTransitionEvent), node.addEventListener("transitionend", onTransitionEvent), () => {
52
+ node.removeEventListener("transitionstart", onTransitionEvent), node.removeEventListener("transitioncancel", onTransitionEvent), node.removeEventListener("transitionend", onTransitionEvent);
66
53
  };
67
54
  }, [hostRef, onValue]);
68
55
  },
@@ -70,33 +57,20 @@ function createAnimations(animations) {
70
57
  return getStyle(val.getValue());
71
58
  },
72
59
  useAnimations: ({ props, presence, style, componentState, hostRef }) => {
73
- const isEntering = !!componentState.unmounted;
74
- const isExiting = (presence == null ? void 0 : presence[0]) === false;
75
- const sendExitComplete = presence == null ? void 0 : presence[1];
76
- const initialPositionRef = (0, import_react.useRef)(null);
77
- const animationKey = Array.isArray(props.animation) ? props.animation[0] : props.animation;
78
- const animation = animations[animationKey];
79
- const keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
80
- (0, import_core.useIsomorphicLayoutEffect)(() => {
60
+ const isEntering = !!componentState.unmounted, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], initialPositionRef = (0, import_react.useRef)(null), animationKey = Array.isArray(props.animation) ? props.animation[0] : props.animation, animation = animations[animationKey], keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
61
+ return (0, import_core.useIsomorphicLayoutEffect)(() => {
81
62
  if (!sendExitComplete || !isExiting || !hostRef.current)
82
63
  return;
83
- const node = hostRef.current;
84
- const onFinishAnimation = () => {
85
- sendExitComplete == null ? void 0 : sendExitComplete();
64
+ const node = hostRef.current, onFinishAnimation = () => {
65
+ sendExitComplete?.();
86
66
  };
87
- node.addEventListener("transitionend", onFinishAnimation);
88
- node.addEventListener("transitioncancel", onFinishAnimation);
89
- return () => {
90
- node.removeEventListener("transitionend", onFinishAnimation);
91
- node.removeEventListener("transitioncancel", onFinishAnimation);
67
+ return node.addEventListener("transitionend", onFinishAnimation), node.addEventListener("transitioncancel", onFinishAnimation), () => {
68
+ node.removeEventListener("transitionend", onFinishAnimation), node.removeEventListener("transitioncancel", onFinishAnimation);
92
69
  };
93
- }, [sendExitComplete, isExiting]);
94
- (0, import_core.useIsomorphicLayoutEffect)(() => {
95
- var _a;
96
- if (!hostRef.current || !props.layout) {
70
+ }, [sendExitComplete, isExiting]), (0, import_core.useIsomorphicLayoutEffect)(() => {
71
+ if (!hostRef.current || !props.layout)
97
72
  return;
98
- }
99
- const boundingBox = (_a = hostRef.current) == null ? void 0 : _a.getBoundingClientRect();
73
+ const boundingBox = hostRef.current?.getBoundingClientRect();
100
74
  if (isChanged(initialPositionRef.current, boundingBox)) {
101
75
  const transform = invert(
102
76
  hostRef.current,
@@ -115,34 +89,18 @@ function createAnimations(animations) {
115
89
  });
116
90
  }
117
91
  initialPositionRef.current = boundingBox;
118
- });
119
- if (!animation) {
120
- return null;
121
- }
122
- style.transition = `${keys} ${animation}${props.layout ? ",width 0s, height 0s, margin 0s, padding 0s, transform" : ""}`;
123
- if (process.env.NODE_ENV === "development" && props["debug"]) {
124
- console.log("CSS animation", style, { isEntering, isExiting });
125
- }
126
- return { style };
92
+ }), animation ? (style.transition = `${keys} ${animation}${props.layout ? ",width 0s, height 0s, margin 0s, padding 0s, transform" : ""}`, process.env.NODE_ENV === "development" && props.debug && console.log("CSS animation", style, { isEntering, isExiting }), { style }) : null;
127
93
  }
128
94
  };
129
95
  }
130
- const isChanged = (initialBox, finalBox) => {
131
- if (!initialBox || !finalBox)
132
- return false;
133
- return JSON.stringify(initialBox) !== JSON.stringify(finalBox);
134
- };
135
- const invert = (el, from, to) => {
136
- const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from;
137
- const { x, y, width, height } = to;
138
- const transform = {
96
+ const isChanged = (initialBox, finalBox) => !initialBox || !finalBox ? !1 : JSON.stringify(initialBox) !== JSON.stringify(finalBox), invert = (el, from, to) => {
97
+ const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from, { x, y, width, height } = to, transform = {
139
98
  x: x - fromX - (fromWidth - width) / 2,
140
99
  y: y - fromY - (fromHeight - height) / 2,
141
100
  scaleX: width / fromWidth,
142
101
  scaleY: height / fromHeight
143
102
  };
144
- el.style.transform = `translate(${transform.x}px, ${transform.y}px) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`;
145
- return transform;
103
+ return el.style.transform = `translate(${transform.x}px, ${transform.y}px) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`, transform;
146
104
  };
147
105
  // Annotate the CommonJS export names for ESM import in node:
148
106
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO;AACP,mCAAwB;AACxB,0BAA4B;AAC5B,mBAAiC;AAE1B,SAAS,iBAAmC,YAAmC;AACpF,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IAEjB,kBAAkB,SAA0C;AAC1D,YAAM,CAAC,KAAK,MAAM,QAAI,uBAAS,OAAO;AAEtC,aAAO;A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A,IACvC,QAAQ,QAAQ;AAAA,IAChB,QAAQ,SAAS;AAAA,EACnB;AAEA,YAAG,MAAM,YAAY,aAAa,UAAU,CAAC,OAAO,UAAU,CAAC,cAAc,UAAU,MAAM,YAAY,UAAU,MAAM,KAElH;AACT;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,110 @@
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
+ createAnimations: () => createAnimations
19
+ });
20
+ module.exports = __toCommonJS(createAnimations_exports);
21
+ var import_core = require("@tamagui/core"), import_cubic_bezier_animator = require("@tamagui/cubic-bezier-animator"), import_use_presence = require("@tamagui/use-presence"), import_react = require("react");
22
+ function createAnimations(animations) {
23
+ return {
24
+ View: import_core.Stack,
25
+ Text: import_core.Text,
26
+ animations,
27
+ usePresence: import_use_presence.usePresence,
28
+ supportsCSSVars: !0,
29
+ useAnimatedNumber(initial) {
30
+ const [val, setVal] = (0, import_react.useState)(initial);
31
+ return {
32
+ getInstance() {
33
+ return val;
34
+ },
35
+ getValue() {
36
+ return val;
37
+ },
38
+ setValue(next) {
39
+ setVal(next);
40
+ },
41
+ stop() {
42
+ }
43
+ };
44
+ },
45
+ useAnimatedNumberReaction({ hostRef, value }, onValue) {
46
+ (0, import_core.useIsomorphicLayoutEffect)(() => {
47
+ if (!hostRef.current)
48
+ return;
49
+ const onTransitionEvent = (e) => {
50
+ onValue(value.getValue());
51
+ }, node = hostRef.current;
52
+ return node.addEventListener("transitionstart", onTransitionEvent), node.addEventListener("transitioncancel", onTransitionEvent), node.addEventListener("transitionend", onTransitionEvent), () => {
53
+ node.removeEventListener("transitionstart", onTransitionEvent), node.removeEventListener("transitioncancel", onTransitionEvent), node.removeEventListener("transitionend", onTransitionEvent);
54
+ };
55
+ }, [hostRef, onValue]);
56
+ },
57
+ useAnimatedNumberStyle(val, getStyle) {
58
+ return getStyle(val.getValue());
59
+ },
60
+ useAnimations: ({ props, presence, style, componentState, hostRef }) => {
61
+ const isEntering = !!componentState.unmounted, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], initialPositionRef = (0, import_react.useRef)(null), animationKey = Array.isArray(props.animation) ? props.animation[0] : props.animation, animation = animations[animationKey], keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
62
+ return (0, import_core.useIsomorphicLayoutEffect)(() => {
63
+ if (!sendExitComplete || !isExiting || !hostRef.current)
64
+ return;
65
+ const node = hostRef.current, onFinishAnimation = () => {
66
+ sendExitComplete?.();
67
+ };
68
+ return node.addEventListener("transitionend", onFinishAnimation), node.addEventListener("transitioncancel", onFinishAnimation), () => {
69
+ node.removeEventListener("transitionend", onFinishAnimation), node.removeEventListener("transitioncancel", onFinishAnimation);
70
+ };
71
+ }, [sendExitComplete, isExiting]), (0, import_core.useIsomorphicLayoutEffect)(() => {
72
+ if (!hostRef.current || !props.layout)
73
+ return;
74
+ const boundingBox = hostRef.current?.getBoundingClientRect();
75
+ if (isChanged(initialPositionRef.current, boundingBox)) {
76
+ const transform = invert(
77
+ hostRef.current,
78
+ boundingBox,
79
+ initialPositionRef.current
80
+ );
81
+ (0, import_cubic_bezier_animator.animate)({
82
+ from: transform,
83
+ to: { x: 0, y: 0, scaleX: 1, scaleY: 1 },
84
+ duration: 1e3,
85
+ onUpdate: ({ x, y, scaleX, scaleY }) => {
86
+ hostRef.current.style.transform = `translate(${x}px, ${y}px) scaleX(${scaleX}) scaleY(${scaleY})`;
87
+ },
88
+ // TODO: extract ease-in from string and convert/map it to a cubicBezier array
89
+ cubicBezier: [0, 1.38, 1, -0.41]
90
+ });
91
+ }
92
+ initialPositionRef.current = boundingBox;
93
+ }), animation ? (style.transition = `${keys} ${animation}${props.layout ? ",width 0s, height 0s, margin 0s, padding 0s, transform" : ""}`, process.env.NODE_ENV === "development" && props.debug && console.log("CSS animation", style, { isEntering, isExiting }), { style }) : null;
94
+ }
95
+ };
96
+ }
97
+ const isChanged = (initialBox, finalBox) => !initialBox || !finalBox ? !1 : JSON.stringify(initialBox) !== JSON.stringify(finalBox), invert = (el, from, to) => {
98
+ const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from, { x, y, width, height } = to, transform = {
99
+ x: x - fromX - (fromWidth - width) / 2,
100
+ y: y - fromY - (fromHeight - height) / 2,
101
+ scaleX: width / fromWidth,
102
+ scaleY: height / fromHeight
103
+ };
104
+ return el.style.transform = `translate(${transform.x}px, ${transform.y}px) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`, transform;
105
+ };
106
+ // Annotate the CommonJS export names for ESM import in node:
107
+ 0 && (module.exports = {
108
+ createAnimations
109
+ });
110
+ //# 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,kBAMO,0BACP,+BAAwB,2CACxB,sBAA4B,kCAC5B,eAAiC;AAE1B,SAAS,iBAAmC,YAAmC;AACpF,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IAEjB,kBAAkB,SAA0C;AAC1D,YAAM,CAAC,KAAK,MAAM,QAA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B,KAG9B,KAAK,UAAU,UAAU,MAAM,KAAK,UAAU,QAAQ,GAGzD,SAAS,CAAC,IAAI,MAAM,OAAO;AAC/B,QAAM,EAAE,GAAG,OAAO,GAAG,OAAO,OAAO,WAAW,QAAQ,WAAW,IAAI,MAC/D,EAAE,GAAG,GAAG,OAAO,OAAO,IAAI,IAE1B,YAAY;AAAA,IAChB,GAAG,IAAI,SAAS,YAAY,SAAS;AAAA,IACrC,GAAG,IAAI,SAAS,aAAa,UAAU;AAAA,IACvC,QAAQ,QAAQ;AAAA,IAChB,QAAQ,SAAS;AAAA,EACnB;AAEA,YAAG,MAAM,YAAY,aAAa,UAAU,CAAC,OAAO,UAAU,CAAC,cAAc,UAAU,MAAM,YAAY,UAAU,MAAM,KAElH;AACT;",
5
+ "names": []
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 === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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
  __reExport(src_exports, require("./createAnimations"), module.exports);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,+BAAd;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,+BAAd;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,20 @@
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
+ __reExport(src_exports, require("./createAnimations"), module.exports);
16
+ // Annotate the CommonJS export names for ESM import in node:
17
+ 0 && (module.exports = {
18
+ ...require("./createAnimations")
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,+BAAd;",
5
+ "names": []
6
+ }
@@ -12,7 +12,7 @@ function createAnimations(animations) {
12
12
  Text,
13
13
  animations,
14
14
  usePresence,
15
- supportsCSSVars: true,
15
+ supportsCSSVars: !0,
16
16
  useAnimatedNumber(initial) {
17
17
  const [val, setVal] = useState(initial);
18
18
  return {
@@ -35,15 +35,9 @@ function createAnimations(animations) {
35
35
  return;
36
36
  const onTransitionEvent = (e) => {
37
37
  onValue(value.getValue());
38
- };
39
- const node = hostRef.current;
40
- node.addEventListener("transitionstart", onTransitionEvent);
41
- node.addEventListener("transitioncancel", onTransitionEvent);
42
- node.addEventListener("transitionend", onTransitionEvent);
43
- return () => {
44
- node.removeEventListener("transitionstart", onTransitionEvent);
45
- node.removeEventListener("transitioncancel", onTransitionEvent);
46
- node.removeEventListener("transitionend", onTransitionEvent);
38
+ }, node = hostRef.current;
39
+ return node.addEventListener("transitionstart", onTransitionEvent), node.addEventListener("transitioncancel", onTransitionEvent), node.addEventListener("transitionend", onTransitionEvent), () => {
40
+ node.removeEventListener("transitionstart", onTransitionEvent), node.removeEventListener("transitioncancel", onTransitionEvent), node.removeEventListener("transitionend", onTransitionEvent);
47
41
  };
48
42
  }, [hostRef, onValue]);
49
43
  },
@@ -51,33 +45,20 @@ function createAnimations(animations) {
51
45
  return getStyle(val.getValue());
52
46
  },
53
47
  useAnimations: ({ props, presence, style, componentState, hostRef }) => {
54
- const isEntering = !!componentState.unmounted;
55
- const isExiting = (presence == null ? void 0 : presence[0]) === false;
56
- const sendExitComplete = presence == null ? void 0 : presence[1];
57
- const initialPositionRef = useRef(null);
58
- const animationKey = Array.isArray(props.animation) ? props.animation[0] : props.animation;
59
- const animation = animations[animationKey];
60
- const keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
61
- useIsomorphicLayoutEffect(() => {
48
+ const isEntering = !!componentState.unmounted, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], initialPositionRef = useRef(null), animationKey = Array.isArray(props.animation) ? props.animation[0] : props.animation, animation = animations[animationKey], keys = props.animateOnly ? props.animateOnly.join(" ") : "all";
49
+ return useIsomorphicLayoutEffect(() => {
62
50
  if (!sendExitComplete || !isExiting || !hostRef.current)
63
51
  return;
64
- const node = hostRef.current;
65
- const onFinishAnimation = () => {
66
- sendExitComplete == null ? void 0 : sendExitComplete();
52
+ const node = hostRef.current, onFinishAnimation = () => {
53
+ sendExitComplete?.();
67
54
  };
68
- node.addEventListener("transitionend", onFinishAnimation);
69
- node.addEventListener("transitioncancel", onFinishAnimation);
70
- return () => {
71
- node.removeEventListener("transitionend", onFinishAnimation);
72
- node.removeEventListener("transitioncancel", onFinishAnimation);
55
+ return node.addEventListener("transitionend", onFinishAnimation), node.addEventListener("transitioncancel", onFinishAnimation), () => {
56
+ node.removeEventListener("transitionend", onFinishAnimation), node.removeEventListener("transitioncancel", onFinishAnimation);
73
57
  };
74
- }, [sendExitComplete, isExiting]);
75
- useIsomorphicLayoutEffect(() => {
76
- var _a;
77
- if (!hostRef.current || !props.layout) {
58
+ }, [sendExitComplete, isExiting]), useIsomorphicLayoutEffect(() => {
59
+ if (!hostRef.current || !props.layout)
78
60
  return;
79
- }
80
- const boundingBox = (_a = hostRef.current) == null ? void 0 : _a.getBoundingClientRect();
61
+ const boundingBox = hostRef.current?.getBoundingClientRect();
81
62
  if (isChanged(initialPositionRef.current, boundingBox)) {
82
63
  const transform = invert(
83
64
  hostRef.current,
@@ -96,34 +77,18 @@ function createAnimations(animations) {
96
77
  });
97
78
  }
98
79
  initialPositionRef.current = boundingBox;
99
- });
100
- if (!animation) {
101
- return null;
102
- }
103
- style.transition = `${keys} ${animation}${props.layout ? ",width 0s, height 0s, margin 0s, padding 0s, transform" : ""}`;
104
- if (process.env.NODE_ENV === "development" && props["debug"]) {
105
- console.log("CSS animation", style, { isEntering, isExiting });
106
- }
107
- return { style };
80
+ }), animation ? (style.transition = `${keys} ${animation}${props.layout ? ",width 0s, height 0s, margin 0s, padding 0s, transform" : ""}`, process.env.NODE_ENV === "development" && props.debug && console.log("CSS animation", style, { isEntering, isExiting }), { style }) : null;
108
81
  }
109
82
  };
110
83
  }
111
- const isChanged = (initialBox, finalBox) => {
112
- if (!initialBox || !finalBox)
113
- return false;
114
- return JSON.stringify(initialBox) !== JSON.stringify(finalBox);
115
- };
116
- const invert = (el, from, to) => {
117
- const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from;
118
- const { x, y, width, height } = to;
119
- const transform = {
84
+ const isChanged = (initialBox, finalBox) => !initialBox || !finalBox ? !1 : JSON.stringify(initialBox) !== JSON.stringify(finalBox), invert = (el, from, to) => {
85
+ const { x: fromX, y: fromY, width: fromWidth, height: fromHeight } = from, { x, y, width, height } = to, transform = {
120
86
  x: x - fromX - (fromWidth - width) / 2,
121
87
  y: y - fromY - (fromHeight - height) / 2,
122
88
  scaleX: width / fromWidth,
123
89
  scaleY: height / fromHeight
124
90
  };
125
- el.style.transform = `translate(${transform.x}px, ${transform.y}px) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`;
126
- return transform;
91
+ return el.style.transform = `translate(${transform.x}px, ${transform.y}px) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`, transform;
127
92
  };
128
93
  export {
129
94
  createAnimations
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,QAAQ,gBAAgB;AAE1B,SAAS,iBAAmC,YAAmC;AACpF,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IAEjB,kBAAkB,SAA0C;AAC1D,YAAM,CAAC,KAAK,MAAM,IAAI,SAAS,OAAO;AAEtC,aAAO;AAAA,QACL,cAAc;AACZ,iBAAO;AAAA,QACT;AAAA,QACA,WAAW;AACT,iBAAO;AAAA,QACT;AAAA,QACA,SAAS,MAAM;AACb,iBAAO,IAAI;AAAA,QACb;AAAA,QACA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AAY,UAAU,MAAM,KAElH;AACT;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/animations-css",
3
- "version": "1.61.3",
3
+ "version": "1.62.1",
4
4
  "source": "src/index.ts",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -13,12 +13,12 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@tamagui/cubic-bezier-animator": "1.61.3",
17
- "@tamagui/use-presence": "1.61.3",
18
- "@tamagui/web": "1.61.3"
16
+ "@tamagui/cubic-bezier-animator": "1.62.1",
17
+ "@tamagui/use-presence": "1.62.1",
18
+ "@tamagui/web": "1.62.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "1.61.3"
21
+ "@tamagui/build": "1.62.1"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tamagui-build",