@tamagui/animations-css 2.0.0-rc.26 → 2.0.0-rc.26-1773452370596

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-css",
3
- "version": "2.0.0-rc.26",
3
+ "version": "2.0.0-rc.26-1773452370596",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -36,14 +36,14 @@
36
36
  "clean:build": "tamagui-build clean:build"
37
37
  },
38
38
  "dependencies": {
39
- "@tamagui/animation-helpers": "2.0.0-rc.26",
40
- "@tamagui/constants": "2.0.0-rc.26",
41
- "@tamagui/cubic-bezier-animator": "2.0.0-rc.26",
42
- "@tamagui/use-presence": "2.0.0-rc.26",
43
- "@tamagui/web": "2.0.0-rc.26"
39
+ "@tamagui/animation-helpers": "2.0.0-rc.26-1773452370596",
40
+ "@tamagui/constants": "2.0.0-rc.26-1773452370596",
41
+ "@tamagui/cubic-bezier-animator": "2.0.0-rc.26-1773452370596",
42
+ "@tamagui/use-presence": "2.0.0-rc.26-1773452370596",
43
+ "@tamagui/web": "2.0.0-rc.26-1773452370596"
44
44
  },
45
45
  "devDependencies": {
46
- "@tamagui/build": "2.0.0-rc.26",
46
+ "@tamagui/build": "2.0.0-rc.26-1773452370596",
47
47
  "react": ">=19",
48
48
  "react-dom": "*"
49
49
  },
@@ -1,234 +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
- createAnimations: () => createAnimations
26
- });
27
- module.exports = __toCommonJS(createAnimations_exports);
28
- 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);
29
- const EXTRACT_MS_REGEX = /(\d+(?:\.\d+)?)\s*ms/, EXTRACT_S_REGEX = /(\d+(?:\.\d+)?)\s*s/;
30
- function extractDuration(animation) {
31
- const msMatch = animation.match(EXTRACT_MS_REGEX);
32
- if (msMatch)
33
- return Number.parseInt(msMatch[1], 10);
34
- const sMatch = animation.match(EXTRACT_S_REGEX);
35
- return sMatch ? Math.round(Number.parseFloat(sMatch[1]) * 1e3) : 300;
36
- }
37
- const MS_DURATION_REGEX = /(\d+(?:\.\d+)?)\s*ms/, S_DURATION_REGEX = /(\d+(?:\.\d+)?)\s*s(?!tiffness)/;
38
- function applyDurationOverride(animation, durationMs) {
39
- const msReplaced = animation.replace(MS_DURATION_REGEX, `${durationMs}ms`);
40
- if (msReplaced !== animation)
41
- return msReplaced;
42
- const sReplaced = animation.replace(S_DURATION_REGEX, `${durationMs}ms`);
43
- return sReplaced !== animation ? sReplaced : `${durationMs}ms ${animation}`;
44
- }
45
- const TRANSFORM_KEYS = [
46
- "x",
47
- "y",
48
- "scale",
49
- "scaleX",
50
- "scaleY",
51
- "rotate",
52
- "rotateX",
53
- "rotateY",
54
- "rotateZ",
55
- "skewX",
56
- "skewY"
57
- ];
58
- function buildTransformString(style) {
59
- if (!style) return "";
60
- const parts = [];
61
- if (style.x !== void 0 || style.y !== void 0) {
62
- const x = style.x ?? 0, y = style.y ?? 0;
63
- parts.push(`translate(${x}px, ${y}px)`);
64
- }
65
- if (style.scale !== void 0 && parts.push(`scale(${style.scale})`), style.scaleX !== void 0 && parts.push(`scaleX(${style.scaleX})`), style.scaleY !== void 0 && parts.push(`scaleY(${style.scaleY})`), style.rotate !== void 0) {
66
- const val = style.rotate, unit = typeof val == "string" && val.includes("deg") ? "" : "deg";
67
- parts.push(`rotate(${val}${unit})`);
68
- }
69
- return style.rotateX !== void 0 && parts.push(`rotateX(${style.rotateX}deg)`), style.rotateY !== void 0 && parts.push(`rotateY(${style.rotateY}deg)`), style.rotateZ !== void 0 && parts.push(`rotateZ(${style.rotateZ}deg)`), style.skewX !== void 0 && parts.push(`skewX(${style.skewX}deg)`), style.skewY !== void 0 && parts.push(`skewY(${style.skewY}deg)`), parts.join(" ");
70
- }
71
- function applyStylesToNode(node, style) {
72
- if (!style) return;
73
- const transformStr = buildTransformString(style);
74
- transformStr && (node.style.transform = transformStr);
75
- for (const [key, value] of Object.entries(style))
76
- TRANSFORM_KEYS.includes(key) || value !== void 0 && (key === "opacity" ? node.style.opacity = String(value) : key === "backgroundColor" ? node.style.backgroundColor = String(value) : key === "color" ? node.style.color = String(value) : node.style[key] = typeof value == "number" ? `${value}px` : String(value));
77
- }
78
- function createAnimations(animations) {
79
- const reactionListeners = /* @__PURE__ */ new WeakMap();
80
- return {
81
- animations,
82
- usePresence: import_use_presence.usePresence,
83
- ResetPresence: import_use_presence.ResetPresence,
84
- inputStyle: "css",
85
- outputStyle: "css",
86
- useAnimatedNumber(initial) {
87
- const [val, setVal] = import_react.default.useState(initial), [onFinish, setOnFinish] = (0, import_react.useState)();
88
- return (0, import_constants.useIsomorphicLayoutEffect)(() => {
89
- onFinish && (onFinish?.(), setOnFinish(void 0));
90
- }, [onFinish]), {
91
- getInstance() {
92
- return setVal;
93
- },
94
- getValue() {
95
- return val;
96
- },
97
- setValue(next, config, onFinish2) {
98
- setVal(next), setOnFinish(onFinish2);
99
- const listeners = reactionListeners.get(setVal);
100
- listeners && listeners.forEach((listener) => listener(next));
101
- },
102
- stop() {
103
- }
104
- };
105
- },
106
- useAnimatedNumberReaction({ value }, onValue) {
107
- import_react.default.useEffect(() => {
108
- const instance = value.getInstance();
109
- let queue = reactionListeners.get(instance);
110
- if (!queue) {
111
- const next = /* @__PURE__ */ new Set();
112
- reactionListeners.set(instance, next), queue = next;
113
- }
114
- return queue.add(onValue), () => {
115
- queue?.delete(onValue);
116
- };
117
- }, []);
118
- },
119
- useAnimatedNumberStyle(val, getStyle) {
120
- return getStyle(val.getValue());
121
- },
122
- // @ts-ignore - styleState is added by createComponent
123
- useAnimations: ({
124
- props,
125
- presence,
126
- style,
127
- componentState,
128
- stateRef,
129
- styleState
130
- }) => {
131
- const isHydrating = componentState.unmounted === !0, isEntering = !!componentState.unmounted, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], wasEnteringRef = import_react.default.useRef(isEntering), justFinishedEntering = wasEnteringRef.current && !isEntering;
132
- import_react.default.useEffect(() => {
133
- wasEnteringRef.current = isEntering;
134
- });
135
- const exitCycleIdRef = import_react.default.useRef(0), exitCompletedRef = import_react.default.useRef(!1), wasExitingRef = import_react.default.useRef(!1), exitInterruptedRef = import_react.default.useRef(!1), justStartedExiting = isExiting && !wasExitingRef.current, justStoppedExiting = !isExiting && wasExitingRef.current;
136
- justStartedExiting && (exitCycleIdRef.current++, exitCompletedRef.current = !1), justStoppedExiting && (exitCycleIdRef.current++, exitInterruptedRef.current = !0), import_react.default.useEffect(() => {
137
- wasExitingRef.current = isExiting;
138
- });
139
- const effectiveTransition = styleState?.effectiveTransition ?? props.transition, normalized = (0, import_animation_helpers.normalizeTransition)(effectiveTransition), effectiveAnimationKey = (0, import_animation_helpers.getEffectiveAnimation)(normalized, isExiting ? "exit" : isEntering || justFinishedEntering ? "enter" : "default"), defaultAnimation = effectiveAnimationKey ? animations[effectiveAnimationKey] : null, animatedProperties = (0, import_animation_helpers.getAnimatedProperties)(normalized), hasDefault = normalized.default !== null || normalized.enter !== null || normalized.exit !== null, hasPerPropertyConfigs = animatedProperties.length > 0;
140
- let keys;
141
- if (props.animateOnly ? keys = props.animateOnly : hasPerPropertyConfigs && !hasDefault ? keys = animatedProperties : hasPerPropertyConfigs && hasDefault ? keys = ["all", ...animatedProperties] : keys = ["all"], (0, import_constants.useIsomorphicLayoutEffect)(() => {
142
- const host = stateRef.current.host;
143
- if (!sendExitComplete || !isExiting || !host) return;
144
- const node = host, cycleId = exitCycleIdRef.current, completeExit = () => {
145
- cycleId === exitCycleIdRef.current && (exitCompletedRef.current || (exitCompletedRef.current = !0, sendExitComplete()));
146
- };
147
- if (keys.length === 0) {
148
- completeExit();
149
- return;
150
- }
151
- let rafId;
152
- const wasInterrupted = exitInterruptedRef.current;
153
- let ignoreCancelEvents = wasInterrupted;
154
- const enterStyle = props.enterStyle, exitStyle = props.exitStyle, delayStr2 = normalized.delay ? ` ${normalized.delay}ms` : "", durationOverride2 = normalized.config?.duration, exitTransitionString = keys.map((key) => {
155
- const propAnimation = normalized.properties[key];
156
- let animationValue = null;
157
- return typeof propAnimation == "string" ? animationValue = animations[propAnimation] : propAnimation && typeof propAnimation == "object" && propAnimation.type ? animationValue = animations[propAnimation.type] : defaultAnimation && (animationValue = defaultAnimation), animationValue && durationOverride2 && (animationValue = applyDurationOverride(animationValue, durationOverride2)), animationValue ? `${key} ${animationValue}${delayStr2}` : null;
158
- }).filter(Boolean).join(", ");
159
- if (wasInterrupted) {
160
- if (exitInterruptedRef.current = !1, node.style.transition = "none", exitStyle) {
161
- const resetStyle = {};
162
- for (const key of Object.keys(exitStyle))
163
- key === "opacity" ? resetStyle[key] = 1 : TRANSFORM_KEYS.includes(key) ? resetStyle[key] = key === "scale" || key === "scaleX" || key === "scaleY" ? 1 : 0 : enterStyle?.[key] !== void 0 && (resetStyle[key] = enterStyle[key]);
164
- applyStylesToNode(node, resetStyle);
165
- } else
166
- node.style.opacity = "1", node.style.transform = "none";
167
- node.offsetHeight;
168
- } else if (exitStyle) {
169
- ignoreCancelEvents = !0, node.style.transition = "none";
170
- const resetStyle = {};
171
- for (const key of Object.keys(exitStyle))
172
- key === "opacity" ? resetStyle[key] = 1 : TRANSFORM_KEYS.includes(key) ? resetStyle[key] = key === "scale" || key === "scaleX" || key === "scaleY" ? 1 : 0 : enterStyle?.[key] !== void 0 && (resetStyle[key] = enterStyle[key]);
173
- applyStylesToNode(node, resetStyle), node.offsetHeight, rafId = requestAnimationFrame(() => {
174
- cycleId === exitCycleIdRef.current && (node.style.transition = exitTransitionString, node.offsetHeight, applyStylesToNode(node, exitStyle), ignoreCancelEvents = !1);
175
- });
176
- }
177
- let maxDuration = defaultAnimation ? extractDuration(defaultAnimation) : 200;
178
- const animationConfigs = (0, import_animation_helpers.getAnimationConfigsForKeys)(
179
- normalized,
180
- animations,
181
- keys,
182
- defaultAnimation
183
- );
184
- for (const animationValue of animationConfigs.values())
185
- if (animationValue) {
186
- const duration = extractDuration(animationValue);
187
- duration > maxDuration && (maxDuration = duration);
188
- }
189
- const delay = normalized.delay ?? 0, fallbackTimeout = maxDuration + delay, timeoutId = setTimeout(() => {
190
- completeExit();
191
- }, fallbackTimeout), transitioningProps = new Set(keys);
192
- let completedCount = 0;
193
- const onFinishAnimation = (event) => {
194
- if (event.target !== node) return;
195
- const eventProp = event.propertyName;
196
- (transitioningProps.has(eventProp) || eventProp === "all") && (completedCount++, completedCount >= transitioningProps.size && (clearTimeout(timeoutId), completeExit()));
197
- }, onCancelAnimation = () => {
198
- ignoreCancelEvents || (clearTimeout(timeoutId), completeExit());
199
- };
200
- return node.addEventListener("transitionend", onFinishAnimation), node.addEventListener("transitioncancel", onCancelAnimation), wasInterrupted && (rafId = requestAnimationFrame(() => {
201
- cycleId === exitCycleIdRef.current && (node.style.transition = exitTransitionString, node.offsetHeight, applyStylesToNode(node, exitStyle), ignoreCancelEvents = !1);
202
- })), () => {
203
- clearTimeout(timeoutId), rafId !== void 0 && cancelAnimationFrame(rafId), node.removeEventListener("transitionend", onFinishAnimation), node.removeEventListener("transitioncancel", onCancelAnimation), node.style.transition = "";
204
- };
205
- }, [
206
- sendExitComplete,
207
- isExiting,
208
- stateRef,
209
- keys,
210
- normalized,
211
- defaultAnimation,
212
- props.enterStyle,
213
- props.exitStyle
214
- ]), isHydrating || !(0, import_animation_helpers.hasAnimation)(normalized))
215
- return null;
216
- Array.isArray(style.transform) && (style.transform = (0, import_web.transformsToString)(style.transform));
217
- const delayStr = normalized.delay ? ` ${normalized.delay}ms` : "", durationOverride = normalized.config?.duration;
218
- return style.transition = keys.map((key) => {
219
- const propAnimation = normalized.properties[key];
220
- let animationValue = null;
221
- return typeof propAnimation == "string" ? animationValue = animations[propAnimation] : propAnimation && typeof propAnimation == "object" && propAnimation.type ? animationValue = animations[propAnimation.type] : defaultAnimation && (animationValue = defaultAnimation), animationValue && durationOverride && (animationValue = applyDurationOverride(animationValue, durationOverride)), animationValue ? `${key} ${animationValue}${delayStr}` : null;
222
- }).filter(Boolean).join(", "), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("CSS animation", {
223
- props,
224
- animations,
225
- normalized,
226
- defaultAnimation,
227
- style,
228
- isEntering,
229
- isExiting
230
- }), { style, className: isEntering ? "t_unmounted" : "" };
231
- }
232
- };
233
- }
234
- //# sourceMappingURL=createAnimations.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;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ACF;",
5
- "names": ["React", "onFinish", "delayStr", "durationOverride", "hasNormalizedAnimation"]
6
- }
@@ -1,220 +0,0 @@
1
- import {
2
- normalizeTransition,
3
- getAnimatedProperties,
4
- hasAnimation as hasNormalizedAnimation,
5
- getEffectiveAnimation,
6
- getAnimationConfigsForKeys
7
- } from "@tamagui/animation-helpers";
8
- import { useIsomorphicLayoutEffect } from "@tamagui/constants";
9
- import { ResetPresence, usePresence } from "@tamagui/use-presence";
10
- import { transformsToString } from "@tamagui/web";
11
- import React, { useState } from "react";
12
- const EXTRACT_MS_REGEX = /(\d+(?:\.\d+)?)\s*ms/, EXTRACT_S_REGEX = /(\d+(?:\.\d+)?)\s*s/;
13
- function extractDuration(animation) {
14
- const msMatch = animation.match(EXTRACT_MS_REGEX);
15
- if (msMatch)
16
- return Number.parseInt(msMatch[1], 10);
17
- const sMatch = animation.match(EXTRACT_S_REGEX);
18
- return sMatch ? Math.round(Number.parseFloat(sMatch[1]) * 1e3) : 300;
19
- }
20
- const MS_DURATION_REGEX = /(\d+(?:\.\d+)?)\s*ms/, S_DURATION_REGEX = /(\d+(?:\.\d+)?)\s*s(?!tiffness)/;
21
- function applyDurationOverride(animation, durationMs) {
22
- const msReplaced = animation.replace(MS_DURATION_REGEX, `${durationMs}ms`);
23
- if (msReplaced !== animation)
24
- return msReplaced;
25
- const sReplaced = animation.replace(S_DURATION_REGEX, `${durationMs}ms`);
26
- return sReplaced !== animation ? sReplaced : `${durationMs}ms ${animation}`;
27
- }
28
- const TRANSFORM_KEYS = [
29
- "x",
30
- "y",
31
- "scale",
32
- "scaleX",
33
- "scaleY",
34
- "rotate",
35
- "rotateX",
36
- "rotateY",
37
- "rotateZ",
38
- "skewX",
39
- "skewY"
40
- ];
41
- function buildTransformString(style) {
42
- if (!style) return "";
43
- const parts = [];
44
- if (style.x !== void 0 || style.y !== void 0) {
45
- const x = style.x ?? 0, y = style.y ?? 0;
46
- parts.push(`translate(${x}px, ${y}px)`);
47
- }
48
- if (style.scale !== void 0 && parts.push(`scale(${style.scale})`), style.scaleX !== void 0 && parts.push(`scaleX(${style.scaleX})`), style.scaleY !== void 0 && parts.push(`scaleY(${style.scaleY})`), style.rotate !== void 0) {
49
- const val = style.rotate, unit = typeof val == "string" && val.includes("deg") ? "" : "deg";
50
- parts.push(`rotate(${val}${unit})`);
51
- }
52
- return style.rotateX !== void 0 && parts.push(`rotateX(${style.rotateX}deg)`), style.rotateY !== void 0 && parts.push(`rotateY(${style.rotateY}deg)`), style.rotateZ !== void 0 && parts.push(`rotateZ(${style.rotateZ}deg)`), style.skewX !== void 0 && parts.push(`skewX(${style.skewX}deg)`), style.skewY !== void 0 && parts.push(`skewY(${style.skewY}deg)`), parts.join(" ");
53
- }
54
- function applyStylesToNode(node, style) {
55
- if (!style) return;
56
- const transformStr = buildTransformString(style);
57
- transformStr && (node.style.transform = transformStr);
58
- for (const [key, value] of Object.entries(style))
59
- TRANSFORM_KEYS.includes(key) || value !== void 0 && (key === "opacity" ? node.style.opacity = String(value) : key === "backgroundColor" ? node.style.backgroundColor = String(value) : key === "color" ? node.style.color = String(value) : node.style[key] = typeof value == "number" ? `${value}px` : String(value));
60
- }
61
- function createAnimations(animations) {
62
- const reactionListeners = /* @__PURE__ */ new WeakMap();
63
- return {
64
- animations,
65
- usePresence,
66
- ResetPresence,
67
- inputStyle: "css",
68
- outputStyle: "css",
69
- useAnimatedNumber(initial) {
70
- const [val, setVal] = React.useState(initial), [onFinish, setOnFinish] = useState();
71
- return useIsomorphicLayoutEffect(() => {
72
- onFinish && (onFinish?.(), setOnFinish(void 0));
73
- }, [onFinish]), {
74
- getInstance() {
75
- return setVal;
76
- },
77
- getValue() {
78
- return val;
79
- },
80
- setValue(next, config, onFinish2) {
81
- setVal(next), setOnFinish(onFinish2);
82
- const listeners = reactionListeners.get(setVal);
83
- listeners && listeners.forEach((listener) => listener(next));
84
- },
85
- stop() {
86
- }
87
- };
88
- },
89
- useAnimatedNumberReaction({ value }, onValue) {
90
- React.useEffect(() => {
91
- const instance = value.getInstance();
92
- let queue = reactionListeners.get(instance);
93
- if (!queue) {
94
- const next = /* @__PURE__ */ new Set();
95
- reactionListeners.set(instance, next), queue = next;
96
- }
97
- return queue.add(onValue), () => {
98
- queue?.delete(onValue);
99
- };
100
- }, []);
101
- },
102
- useAnimatedNumberStyle(val, getStyle) {
103
- return getStyle(val.getValue());
104
- },
105
- // @ts-ignore - styleState is added by createComponent
106
- useAnimations: ({
107
- props,
108
- presence,
109
- style,
110
- componentState,
111
- stateRef,
112
- styleState
113
- }) => {
114
- const isHydrating = componentState.unmounted === !0, isEntering = !!componentState.unmounted, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], wasEnteringRef = React.useRef(isEntering), justFinishedEntering = wasEnteringRef.current && !isEntering;
115
- React.useEffect(() => {
116
- wasEnteringRef.current = isEntering;
117
- });
118
- const exitCycleIdRef = React.useRef(0), exitCompletedRef = React.useRef(!1), wasExitingRef = React.useRef(!1), exitInterruptedRef = React.useRef(!1), justStartedExiting = isExiting && !wasExitingRef.current, justStoppedExiting = !isExiting && wasExitingRef.current;
119
- justStartedExiting && (exitCycleIdRef.current++, exitCompletedRef.current = !1), justStoppedExiting && (exitCycleIdRef.current++, exitInterruptedRef.current = !0), React.useEffect(() => {
120
- wasExitingRef.current = isExiting;
121
- });
122
- const effectiveTransition = styleState?.effectiveTransition ?? props.transition, normalized = normalizeTransition(effectiveTransition), effectiveAnimationKey = getEffectiveAnimation(normalized, isExiting ? "exit" : isEntering || justFinishedEntering ? "enter" : "default"), defaultAnimation = effectiveAnimationKey ? animations[effectiveAnimationKey] : null, animatedProperties = getAnimatedProperties(normalized), hasDefault = normalized.default !== null || normalized.enter !== null || normalized.exit !== null, hasPerPropertyConfigs = animatedProperties.length > 0;
123
- let keys;
124
- if (props.animateOnly ? keys = props.animateOnly : hasPerPropertyConfigs && !hasDefault ? keys = animatedProperties : hasPerPropertyConfigs && hasDefault ? keys = ["all", ...animatedProperties] : keys = ["all"], useIsomorphicLayoutEffect(() => {
125
- const host = stateRef.current.host;
126
- if (!sendExitComplete || !isExiting || !host) return;
127
- const node = host, cycleId = exitCycleIdRef.current, completeExit = () => {
128
- cycleId === exitCycleIdRef.current && (exitCompletedRef.current || (exitCompletedRef.current = !0, sendExitComplete()));
129
- };
130
- if (keys.length === 0) {
131
- completeExit();
132
- return;
133
- }
134
- let rafId;
135
- const wasInterrupted = exitInterruptedRef.current;
136
- let ignoreCancelEvents = wasInterrupted;
137
- const enterStyle = props.enterStyle, exitStyle = props.exitStyle, delayStr2 = normalized.delay ? ` ${normalized.delay}ms` : "", durationOverride2 = normalized.config?.duration, exitTransitionString = keys.map((key) => {
138
- const propAnimation = normalized.properties[key];
139
- let animationValue = null;
140
- return typeof propAnimation == "string" ? animationValue = animations[propAnimation] : propAnimation && typeof propAnimation == "object" && propAnimation.type ? animationValue = animations[propAnimation.type] : defaultAnimation && (animationValue = defaultAnimation), animationValue && durationOverride2 && (animationValue = applyDurationOverride(animationValue, durationOverride2)), animationValue ? `${key} ${animationValue}${delayStr2}` : null;
141
- }).filter(Boolean).join(", ");
142
- if (wasInterrupted) {
143
- if (exitInterruptedRef.current = !1, node.style.transition = "none", exitStyle) {
144
- const resetStyle = {};
145
- for (const key of Object.keys(exitStyle))
146
- key === "opacity" ? resetStyle[key] = 1 : TRANSFORM_KEYS.includes(key) ? resetStyle[key] = key === "scale" || key === "scaleX" || key === "scaleY" ? 1 : 0 : enterStyle?.[key] !== void 0 && (resetStyle[key] = enterStyle[key]);
147
- applyStylesToNode(node, resetStyle);
148
- } else
149
- node.style.opacity = "1", node.style.transform = "none";
150
- node.offsetHeight;
151
- } else if (exitStyle) {
152
- ignoreCancelEvents = !0, node.style.transition = "none";
153
- const resetStyle = {};
154
- for (const key of Object.keys(exitStyle))
155
- key === "opacity" ? resetStyle[key] = 1 : TRANSFORM_KEYS.includes(key) ? resetStyle[key] = key === "scale" || key === "scaleX" || key === "scaleY" ? 1 : 0 : enterStyle?.[key] !== void 0 && (resetStyle[key] = enterStyle[key]);
156
- applyStylesToNode(node, resetStyle), node.offsetHeight, rafId = requestAnimationFrame(() => {
157
- cycleId === exitCycleIdRef.current && (node.style.transition = exitTransitionString, node.offsetHeight, applyStylesToNode(node, exitStyle), ignoreCancelEvents = !1);
158
- });
159
- }
160
- let maxDuration = defaultAnimation ? extractDuration(defaultAnimation) : 200;
161
- const animationConfigs = getAnimationConfigsForKeys(
162
- normalized,
163
- animations,
164
- keys,
165
- defaultAnimation
166
- );
167
- for (const animationValue of animationConfigs.values())
168
- if (animationValue) {
169
- const duration = extractDuration(animationValue);
170
- duration > maxDuration && (maxDuration = duration);
171
- }
172
- const delay = normalized.delay ?? 0, fallbackTimeout = maxDuration + delay, timeoutId = setTimeout(() => {
173
- completeExit();
174
- }, fallbackTimeout), transitioningProps = new Set(keys);
175
- let completedCount = 0;
176
- const onFinishAnimation = (event) => {
177
- if (event.target !== node) return;
178
- const eventProp = event.propertyName;
179
- (transitioningProps.has(eventProp) || eventProp === "all") && (completedCount++, completedCount >= transitioningProps.size && (clearTimeout(timeoutId), completeExit()));
180
- }, onCancelAnimation = () => {
181
- ignoreCancelEvents || (clearTimeout(timeoutId), completeExit());
182
- };
183
- return node.addEventListener("transitionend", onFinishAnimation), node.addEventListener("transitioncancel", onCancelAnimation), wasInterrupted && (rafId = requestAnimationFrame(() => {
184
- cycleId === exitCycleIdRef.current && (node.style.transition = exitTransitionString, node.offsetHeight, applyStylesToNode(node, exitStyle), ignoreCancelEvents = !1);
185
- })), () => {
186
- clearTimeout(timeoutId), rafId !== void 0 && cancelAnimationFrame(rafId), node.removeEventListener("transitionend", onFinishAnimation), node.removeEventListener("transitioncancel", onCancelAnimation), node.style.transition = "";
187
- };
188
- }, [
189
- sendExitComplete,
190
- isExiting,
191
- stateRef,
192
- keys,
193
- normalized,
194
- defaultAnimation,
195
- props.enterStyle,
196
- props.exitStyle
197
- ]), isHydrating || !hasNormalizedAnimation(normalized))
198
- return null;
199
- Array.isArray(style.transform) && (style.transform = transformsToString(style.transform));
200
- const delayStr = normalized.delay ? ` ${normalized.delay}ms` : "", durationOverride = normalized.config?.duration;
201
- return style.transition = keys.map((key) => {
202
- const propAnimation = normalized.properties[key];
203
- let animationValue = null;
204
- return typeof propAnimation == "string" ? animationValue = animations[propAnimation] : propAnimation && typeof propAnimation == "object" && propAnimation.type ? animationValue = animations[propAnimation.type] : defaultAnimation && (animationValue = defaultAnimation), animationValue && durationOverride && (animationValue = applyDurationOverride(animationValue, durationOverride)), animationValue ? `${key} ${animationValue}${delayStr}` : null;
205
- }).filter(Boolean).join(", "), process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info("CSS animation", {
206
- props,
207
- animations,
208
- normalized,
209
- defaultAnimation,
210
- style,
211
- isEntering,
212
- isExiting
213
- }), { style, className: isEntering ? "t_unmounted" : "" };
214
- }
215
- };
216
- }
217
- export {
218
- createAnimations
219
- };
220
- //# sourceMappingURL=createAnimations.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createAnimations.tsx"],
4
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,OACK;AACP,SAAS,iCAAiC;AAC1C,SAAS,eAAe,mBAAmB;AAE3C,SAAS,0BAA0B;AACnC,OAAO,SAAS,gBAAgB;AAEhC,MAAM,mBAAmB,wBACnB,kBAAkB;AAOxB,SAAS,gBAAgB,WAA2B;AAElD,QAAM,UAAU,UAAU,MAAM,gBAAgB;AAChD,MAAI;AACF,WAAO,OAAO,SAAS,QAAQ,CAAC,GAAG,EAAE;AAIvC,QAAM,SAAS,UAAU,MAAM,eAAe;AAC9C,SAAI,SACK,KAAK,MAAM,OAAO,WAAW,OAAO,CAAC,CAAC,IAAI,GAAI,IAIhD;AACT;AAEA,MAAM,oBAAoB,wBACpB,mBAAmB;AAMzB,SAAS,sBAAsB,WAAmB,YAA4B;AAE5E,QAAM,aAAa,UAAU,QAAQ,m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