@mkbabb/keyframes.js 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,166 +0,0 @@
1
- import { n as e } from "./presets-BG2Fczzq.js";
2
- import { t } from "./engine-DEVgCTUy.js";
3
- //#region src/animation/ingest/cssom.ts
4
- var n = (e, t, n, r = {}) => {
5
- e.push({
6
- code: t,
7
- message: n,
8
- ...r
9
- });
10
- }, r = (e) => {
11
- if (typeof CSSKeyframesRule < "u" && e instanceof CSSKeyframesRule) return !0;
12
- let t = e;
13
- return t.type === 7 && typeof t.name == "string" && typeof t.cssText == "string";
14
- }, i = 32, a = (e) => e.cssRules !== void 0 && !r(e), o = (e, t, n, c = 0) => {
15
- let l = [];
16
- for (let t = 0; t < e.length; t++) {
17
- let n = e[t];
18
- if (n == null) continue;
19
- let r = n;
20
- r.type === 1 && typeof r.cssText == "string" && l.push(r.cssText);
21
- }
22
- for (let i = 0; i < e.length; i++) {
23
- let a = e[i];
24
- if (a == null || !r(a)) continue;
25
- let o = a.name;
26
- if (n.animationName != null && o !== n.animationName) continue;
27
- let c = RegExp(`\\banimation(?:-name)?\\s*:[^;}]*\\b${o}\\b`), u = l.find((e) => c.test(e)), d = [], f = s(a.cssText, u, n.options, d);
28
- f != null && t.set(o, {
29
- name: o,
30
- animation: f,
31
- diagnostics: d
32
- });
33
- }
34
- if (c < i) for (let r = 0; r < e.length; r++) {
35
- let i = e[r];
36
- i == null || !a(i) || o(i.cssRules, t, n, c + 1);
37
- }
38
- }, s = (e, r, i, a) => {
39
- try {
40
- let n = new t(i ?? {}), o = r ? `${r}\n${e}` : e;
41
- n.fromString(o);
42
- for (let e of n.diagnostics) a.push(e);
43
- return n;
44
- } catch (t) {
45
- n(a, "PARSE_ERROR", `@keyframes rule could not be reconstructed: ${t instanceof Error ? t.message : String(t)} — the source CSS could not be parsed faithfully (refused, not approximated)`, { input: e });
46
- return;
47
- }
48
- }, c = (e, t = {}) => {
49
- let r = /* @__PURE__ */ new Map(), i = [], a;
50
- if (e == null) {
51
- if (typeof document > "u") return n(i, "CORS_SKIP", "no document in scope — resolveLiveKeyframes() needs a Document, a ShadowRoot, a CSSStyleSheet[], or a CSSStyleSheet (SSR has no live CSSOM)"), {
52
- animations: r,
53
- diagnostics: i
54
- };
55
- a = Array.from(document.styleSheets);
56
- } else a = Array.isArray(e) ? e : typeof Document < "u" && e instanceof Document ? Array.from(e.styleSheets) : typeof ShadowRoot < "u" && e instanceof ShadowRoot ? [...e.styleSheets == null ? [] : Array.from(e.styleSheets), ...e.adoptedStyleSheets ?? []] : [e];
57
- for (let e of a) {
58
- let a = null;
59
- try {
60
- a = e.cssRules;
61
- } catch (t) {
62
- let r = e.href ?? "(inline)";
63
- n(i, "CORS_SKIP", `cross-origin stylesheet skipped: ${r} — its cssRules threw ${t instanceof Error ? t.name : "an error"} (no Access-Control-Allow-Origin + crossorigin). The sheet is REPORTED, not silently dropped.`, { input: r });
64
- continue;
65
- }
66
- a != null && o(a, r, t);
67
- }
68
- return {
69
- animations: r,
70
- diagnostics: i
71
- };
72
- }, l = (e, t = {}) => c(e, t), u = (e, t = {}) => {
73
- let r = /* @__PURE__ */ new Map(), i = [], a = e ?? (typeof document < "u" ? document : void 0);
74
- if (a == null || typeof a.getAnimations != "function") return n(i, "CORS_SKIP", "no getAnimations() in scope — fromLiveAnimations() needs a Document or Element with the Web Animations API (SSR has none)"), {
75
- animations: r,
76
- diagnostics: i
77
- };
78
- let o = /* @__PURE__ */ new Set();
79
- for (let e of a.getAnimations()) {
80
- let t = e.animationName;
81
- typeof t == "string" && t.length > 0 && o.add(t);
82
- }
83
- let s = (a instanceof Document ? a : a.ownerDocument ?? (typeof document < "u" ? document : void 0)) ?? void 0;
84
- for (let e of o) {
85
- let n = c(s, {
86
- ...t,
87
- animationName: e
88
- });
89
- for (let [e, t] of n.animations) r.set(e, t);
90
- for (let e of n.diagnostics) i.push(e);
91
- }
92
- return {
93
- animations: r,
94
- diagnostics: i
95
- };
96
- }, d = (e) => {
97
- if (typeof e != "object" || !e) return !1;
98
- let t = e;
99
- return typeof t.value == "number" && typeof t.unit == "string";
100
- }, f = async (e, t) => {
101
- let n = [], { animationName: r, commit: i = !0 } = t;
102
- if (typeof e.getAnimations != "function") return n.push({
103
- code: "WAAPI_INELIGIBLE",
104
- message: "the element has no getAnimations() — adoptRunning() needs the Web Animations API to read the running animation's playhead"
105
- }), {
106
- animation: null,
107
- currentTime: 0,
108
- diagnostics: n
109
- };
110
- let a = e.getAnimations().find((e) => e.animationName === r);
111
- if (a == null) return n.push({
112
- code: "ADOPT_REFUSE",
113
- message: `no running CSS animation named "${r}" on the element — adoptRunning() refuses (the takeover names exactly one running animation; nothing was silently adopted)`
114
- }), {
115
- animation: null,
116
- currentTime: 0,
117
- diagnostics: n
118
- };
119
- let o = a.currentTime, s = null, l = 0;
120
- if (typeof o == "number" && Number.isFinite(o)) l = o;
121
- else if (d(o)) if (o.unit === "percent" && Number.isFinite(o.value)) s = o.value / 100;
122
- else return n.push({
123
- code: "ADOPT_REFUSE",
124
- message: `the running animation "${r}" reports a currentTime in an unsupported unit "${String(o.unit)}" — adoptRunning() refuses (only a numeric ms playhead or a scroll-driven "percent" CSSUnitValue can seed the takeover faithfully)`
125
- }), {
126
- animation: null,
127
- currentTime: 0,
128
- diagnostics: n
129
- };
130
- let u = c(e.ownerDocument ?? (typeof document < "u" ? document : void 0) ?? void 0, {
131
- ...t,
132
- animationName: r
133
- });
134
- for (let e of u.diagnostics) n.push(e);
135
- let f = u.animations.get(r);
136
- if (f == null) return n.push({
137
- code: "ADOPT_REFUSE",
138
- message: `the @keyframes rule for "${r}" could not be found or reconstructed from the CSSOM — adoptRunning() refuses rather than reconstruct from the lossy computed keyframe list`
139
- }), {
140
- animation: null,
141
- currentTime: l,
142
- diagnostics: n
143
- };
144
- let m = f.animation;
145
- for (let e of f.diagnostics) n.push(e);
146
- m.setTargets(e);
147
- let h = s == null ? l : s * m.options.duration;
148
- i && m.interpFrames(h, !0);
149
- try {
150
- a.cancel();
151
- } catch {}
152
- return p(m, h), {
153
- animation: m,
154
- currentTime: h,
155
- diagnostics: n
156
- };
157
- }, p = (e, t) => {
158
- e.setUseWAAPI(!1), e.setDelay(0), e.onStart(), e.started = !0, e.startTime = (typeof performance < "u" && performance.now ? performance.now() : Date.now()) - t, e.t = t, e.play();
159
- }, m = /* @__PURE__ */ e({
160
- adoptRunning: () => f,
161
- fromLiveAnimations: () => u,
162
- fromStyleSheets: () => l,
163
- resolveLiveKeyframes: () => c
164
- });
165
- //#endregion
166
- export { c as a, l as i, f as n, u as r, m as t };
@@ -1,89 +0,0 @@
1
- import { n as e } from "./presets-BG2Fczzq.js";
2
- import { y as t } from "./sequence-C_DCiOIQ.js";
3
- import { t as n } from "./engine-DEVgCTUy.js";
4
- import { PathGeometry as r } from "@mkbabb/value.js";
5
- //#region src/animation/svg/morph-svg.ts
6
- var i = /* @__PURE__ */ e({
7
- MorphSVG: () => m,
8
- fromMorphSVG: () => p
9
- }), a = 64, o = (e) => `--morph-${e}-x`, s = (e) => `--morph-${e}-y`, c = (e) => `--morph-${e}-angle`, l = (e, t, n) => {
10
- let r = Array(t + 1);
11
- for (let i = 0; i <= t; i++) if (n) {
12
- let n = e.sampleAtLength(e.totalLength * (i / t));
13
- r[i] = {
14
- x: n.x,
15
- y: n.y,
16
- angle: n.angle
17
- };
18
- } else r[i] = e.getPointAtT(i / t);
19
- return r;
20
- }, u = (e) => Number.isInteger(e) ? `${e}` : e.toFixed(3), d = (e) => {
21
- if (e.length === 0) return "";
22
- let t = `M ${u(e[0].x)} ${u(e[0].y)}`;
23
- for (let n = 1; n < e.length; n++) t += ` L ${u(e[n].x)} ${u(e[n].y)}`;
24
- return t;
25
- }, f = (e, t) => {
26
- let n = Array(t + 1);
27
- for (let e = 0; e <= t; e++) n[e] = {
28
- x: 0,
29
- y: 0
30
- };
31
- return (r) => {
32
- let i = r;
33
- for (let e = 0; e <= t; e++) {
34
- let t = n[e], r = i[o(e)]?.[0]?.value, a = i[s(e)]?.[0]?.value;
35
- if (r === void 0 || a === void 0) throw Error(`morph render: point ${e} lost its coordinate leaf (engine invariant violated — xKey/yKey seeded at construction)`);
36
- t.x = r, t.y = a;
37
- }
38
- let a = d(n);
39
- e.style.setProperty("--morph-d", a), e.style.setProperty("d", `path("${a}")`);
40
- };
41
- };
42
- function p(e, i, u = {}) {
43
- let { samples: d = a, target: p, orient: m = !1, autoPlay: h = !0, ...g } = u;
44
- if (typeof e != "string" || e.length === 0) throw new t("from", e, "fromMorphSVG(): `from` must be a non-empty SVG path `d` string.");
45
- if (typeof i != "string" || i.length === 0) throw new t("to", i, "fromMorphSVG(): `to` must be a non-empty SVG path `d` string.");
46
- if (!Number.isInteger(d) || d < 2) throw new t("samples", d, "fromMorphSVG(): `samples` must be an integer >= 2 (a 1-sample morph is just the two endpoints, with no body to interpolate).");
47
- let _ = new r(e), v = new r(i);
48
- if (_.totalLength === 0) throw new t("from", e, "fromMorphSVG(): the `from` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
49
- if (v.totalLength === 0) throw new t("to", i, "fromMorphSVG(): the `to` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
50
- let y = l(_, d, m), b = l(v, d, m), x = {}, S = {};
51
- for (let e = 0; e <= d; e++) x[o(e)] = y[e].x, x[s(e)] = y[e].y, S[o(e)] = b[e].x, S[s(e)] = b[e].y, m && (x[c(e)] = y[e].angle ?? 0, S[c(e)] = b[e].angle ?? 0);
52
- let C = {
53
- "0%": x,
54
- "100%": S
55
- }, w = p == null ? void 0 : f(p, d), T = new n(g).fromKeyframes(C, w);
56
- return h && T.play(), T;
57
- }
58
- var m = class {
59
- animation;
60
- samples;
61
- constructor(e, t, n = {}) {
62
- this.animation = p(e, t, n), this.samples = n.samples ?? a;
63
- }
64
- sampleD(e) {
65
- let t = (e < 0 ? 0 : e > 1 ? 1 : e) * this.animation.options.duration, n = this.animation.interpFrames(t, !1), r = Array(this.samples + 1);
66
- for (let e = 0; e <= this.samples; e++) {
67
- let t = n[o(e)]?.[0]?.value, i = n[s(e)]?.[0]?.value;
68
- r[e] = {
69
- x: t ?? 0,
70
- y: i ?? 0
71
- };
72
- }
73
- return d(r);
74
- }
75
- play() {
76
- return this.animation.play();
77
- }
78
- pause() {
79
- return this.animation.pause(), this;
80
- }
81
- stop() {
82
- return this.animation.stop(), this;
83
- }
84
- get finished() {
85
- return this.animation.finished;
86
- }
87
- };
88
- //#endregion
89
- export { p as n, i as r, m as t };
@@ -1,35 +0,0 @@
1
- import { n as e } from "./presets-BG2Fczzq.js";
2
- import { t } from "./engine-DEVgCTUy.js";
3
- //#region src/animation/svg/motion-path.ts
4
- var n = /* @__PURE__ */ e({
5
- MotionPath: () => a,
6
- fromMotionPath: () => i
7
- }), r = (e) => typeof e == "number" ? `${e}%` : e;
8
- function i(e, n) {
9
- let { path: i, from: a = "0%", to: o = "100%", rotate: s, autoPlay: c = !0, ...l } = n;
10
- if (typeof i != "string" || i.length === 0) throw Error("fromMotionPath(): `path` is required — pass an offset-path value (a path()/ray()/url(#id) string).");
11
- let u = Array.isArray(e) ? e : [e];
12
- for (let e of u) e.style.offsetPath = i, s !== void 0 && (e.style.offsetRotate = s);
13
- let d = {
14
- "0%": { "offset-distance": r(a) },
15
- "100%": { "offset-distance": r(o) }
16
- }, f = new t(l).fromKeyframes(d);
17
- return f.setTargets(...u), c && f.play(), f;
18
- }
19
- var a = class {
20
- animation;
21
- constructor(e, t) {
22
- this.animation = i(e, t);
23
- }
24
- play() {
25
- return this.animation.play();
26
- }
27
- pause() {
28
- return this.animation.pause(), this;
29
- }
30
- stop() {
31
- return this.animation.stop(), this;
32
- }
33
- };
34
- //#endregion
35
- export { i as n, n as r, a as t };
@@ -1,2 +0,0 @@
1
- import { n as e, r as t, t as n } from "./parse-flatten-ZZUSEQEL.js";
2
- export { n as createInterpVarValue, e as parseAndFlattenObject, t as transformTargetsStyle };
@@ -1,63 +0,0 @@
1
- import { FunctionValue as e, ValueArray as t, ValueUnit as n, flattenObject as r, functionIdentityValue as i, memoize as a, normalizeValueUnits as o, parseCSSSubValue as s, prepareInterpVar as c, unflattenObjectToString as l } from "@mkbabb/value.js";
2
- //#region src/animation/compile/parse-flatten.ts
3
- var u = (e) => e.fnName, d = (r, i) => {
4
- if (r instanceof n) {
5
- let e = r.clone();
6
- return i !== void 0 && (e.fnName = i), [e];
7
- }
8
- if (r instanceof e) return r.values.flatMap((e) => d(e, r.name));
9
- if (r instanceof t) return r.flatMap((e) => d(e, i));
10
- throw TypeError(`Expected ValueUnit/FunctionValue/ValueArray, got ${typeof r}`);
11
- }, f = (e) => {
12
- let t = e.split(".").pop(), n = e.split(".").shift();
13
- if (!t || !n) throw Error(`Invalid flattened key: ${e}`);
14
- return {
15
- mainKey: n,
16
- childKey: t
17
- };
18
- }, p = (e, t, n) => (e.setProperty(t), n !== t && e.setSubProperty(n), e), m = a((e, t) => d(s(t, { subProperty: e })), {
19
- maxCacheSize: 2048,
20
- keyFn: (e, t) => `${e}:${t}`
21
- });
22
- function h(i) {
23
- let a = r(i), o = (r, i) => {
24
- let { childKey: a, mainKey: s } = f(r);
25
- return i instanceof n ? p(new t(...d(i)), s, a) : i instanceof e ? p(new t(...i.values.flatMap((e) => d(o(r, e), i.name))), s, a) : i instanceof t ? p(new t(...i.flatMap((e) => d(o(r, e)))), s, a) : p(new t(...m(a, String(i)).map((e) => e.clone())), s, a);
26
- };
27
- return Object.entries(a).reduce((e, [t, n]) => (e[t] = o(t, n), e), {});
28
- }
29
- var g = (e, t, r, a, s = "oklab", l) => {
30
- let d = a[t], f = a[r];
31
- if (!d || !f) throw Error(`Invalid interpolation frame bounds (${t} -> ${r}).`);
32
- let p = d[e], m = f[e];
33
- if (!p || !m) throw Error(`Missing variable "${e}" in interpolation bounds.`);
34
- let h = Math.max(p.length, m.length), g = (t, r) => {
35
- let a = t.map((t) => {
36
- if (!(t instanceof n)) throw TypeError(`Interpolation for "${e}" requires ValueUnit leaves.`);
37
- return t;
38
- });
39
- for (; a.length < h;) {
40
- let e = r[a.length], t = e instanceof n ? u(e) : void 0, o = t ? i(t) : void 0;
41
- a.push(o ?? new n(0));
42
- }
43
- return a;
44
- }, _ = g(p, m), v = g(m, p);
45
- return _.map((t, r) => {
46
- let i = v[r];
47
- if (!i) throw Error(`Missing right-hand interpolation value at index ${r}.`);
48
- if (!(t instanceof n) || !(i instanceof n)) throw TypeError(`Interpolation for "${e}" requires ValueUnit leaves.`);
49
- let a = { colorSpace: s };
50
- return l !== void 0 && (a.hueMethod = l), c(o(t, i, a));
51
- });
52
- }, _ = {};
53
- function v(e, t, n = !0) {
54
- e = n ? e : r(e);
55
- let i = l(e, _);
56
- t.forEach((e) => {
57
- Object.entries(i).forEach(([t, n]) => {
58
- e.style.setProperty(t, n);
59
- });
60
- });
61
- }
62
- //#endregion
63
- export { h as n, v as r, g as t };
@@ -1,275 +0,0 @@
1
- import { a as e } from "./sequence-C_DCiOIQ.js";
2
- import { t } from "./engine-DEVgCTUy.js";
3
- import { CSSCubicBezier as n, steppedEase as r } from "@mkbabb/value.js";
4
- //#region \0rolldown/runtime.js
5
- var i = Object.defineProperty, a = (e, t) => {
6
- let n = {};
7
- for (var r in e) i(n, r, {
8
- get: e[r],
9
- enumerable: !0
10
- });
11
- return t || i(n, Symbol.toStringTag, { value: "Module" }), n;
12
- }, ee = "\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n", o = (e) => new t({
13
- duration: 700,
14
- timingFunction: "ease-in-out",
15
- ...e ?? {}
16
- }).fromString(ee), te = "\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n", s = (e) => new t({
17
- duration: 700,
18
- timingFunction: "ease-in-out",
19
- ...e ?? {}
20
- }).fromString(te), ne = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n", c = (e) => new t({
21
- duration: 1e3,
22
- timingFunction: "ease-in-out",
23
- iterationCount: Infinity,
24
- ...e ?? {}
25
- }).fromString(ne), re = "\n8%,\n41% {\n transform: translateX(-10px);\n}\n25%,\n58% {\n transform: translateX(10px);\n}\n75% {\n transform: translateX(-5px);\n}\n92% {\n transform: translateX(5px);\n}\n0%,\n100% {\n transform: translateX(0);\n}\n", l = (e) => new t({
26
- duration: 820,
27
- timingFunction: "ease-in-out",
28
- ...e ?? {}
29
- }).fromString(re), u = "\n 0%, 20%, 50%, 80%, 100% {\n transform: translateY(0);\n }\n 40% {\n transform: translateY(-30px);\n }\n 60% {\n transform: translateY(-15px);\n }\n", d = (e) => new t({
30
- duration: 1e3,
31
- timingFunction: n(.28, .84, .42, 1),
32
- ...e ?? {}
33
- }).fromString(u), ie = "\n 0% {\n transform: perspective(400px) rotateY(0);\n animation-timing-function: ease-out;\n }\n 40% {\n transform: perspective(400px) translateZ(150px) rotateY(170deg);\n animation-timing-function: ease-out;\n }\n 50% {\n transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);\n animation-timing-function: ease-in;\n }\n 80% {\n transform: perspective(400px) rotateY(360deg) scale(.95);\n animation-timing-function: ease-in;\n }\n 100% {\n transform: perspective(400px) scale(1);\n animation-timing-function: ease-in;\n }\n", f = (e) => new t({
34
- duration: 1e3,
35
- timingFunction: "ease-in-out",
36
- ...e ?? {}
37
- }).fromString(ie), ae = "\n 0% {\n transform-origin: center;\n transform: rotate3d(0, 0, 1, -200deg);\n opacity: 0;\n }\n 100% {\n transform-origin: center;\n transform: none;\n opacity: 1;\n }\n", p = (e) => new t({
38
- duration: 1e3,
39
- timingFunction: n(.25, .46, .45, .94),
40
- ...e ?? {}
41
- }).fromString(ae), oe = "\n 0% {\n transform: translateY(1000px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", m = (e) => new t({
42
- duration: 1e3,
43
- timingFunction: n(.25, .46, .45, .94),
44
- ...e ?? {}
45
- }).fromString(oe), h = "\n 0% {\n transform: scale(1);\n }\n 14% {\n transform: scale(1.3);\n }\n 28% {\n transform: scale(1);\n }\n 42% {\n transform: scale(1.3);\n }\n 70% {\n transform: scale(1);\n }\n", g = (e) => new t({
46
- duration: 1500,
47
- timingFunction: "ease-in-out",
48
- iterationCount: Infinity,
49
- ...e ?? {}
50
- }).fromString(h), se = "\n 0%, 100% {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n }\n 50% {\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);\n }\n", _ = (e) => new t({
51
- duration: 2e3,
52
- timingFunction: "ease-in-out",
53
- iterationCount: Infinity,
54
- ...e ?? {}
55
- }).fromString(se), ce = "\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n", le = (e) => new t({
56
- duration: 3e3,
57
- timingFunction: r(40, "jump-end"),
58
- fillMode: "forwards",
59
- ...e ?? {}
60
- }).fromString(ce), ue = "\n 0% {\n color: red;\n }\n 15% {\n color: orange;\n }\n 30% {\n color: yellow;\n }\n 45% {\n color: green;\n }\n 60% {\n color: blue;\n }\n 75% {\n color: indigo;\n }\n 90% {\n color: violet;\n }\n 100% {\n color: red;\n }\n", v = (e) => new t({
61
- duration: 5e3,
62
- timingFunction: "linear",
63
- iterationCount: Infinity,
64
- ...e ?? {}
65
- }).fromString(ue), de = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(25%) rotate(10deg);\n opacity: 0.5;\n }\n 75% {\n transform: translateX(0%) rotate(0deg);\n opacity: 0.25;\n }\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n}", y = (e) => new t({
66
- duration: 700,
67
- timingFunction: "bounce-in-ease",
68
- ...e ?? {}
69
- }).fromString(de), fe = "@keyframes keyframeDelete {\n 0% {\n transform: translateX(0%) rotate(0deg);\n opacity: 1;\n }\n 25% {\n transform: translateX(0%) rotate(-5deg);\n opacity: 1;\n }\n 50% {\n transform: translateX(-25%) rotate(-10deg);\n opacity: 0.5;\n }\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n}", b = (e) => new t({
70
- duration: 700,
71
- timingFunction: "bounce-in-ease",
72
- ...e ?? {}
73
- }).fromString(fe), pe = "\n0% {\n filter: blur(10px);\n opacity: 0;\n}\n100% {\n filter: blur(0px);\n opacity: 1;\n}\n", x = (e) => new t({
74
- duration: 2e3,
75
- timingFunction: "ease-in-out",
76
- ...e ?? {}
77
- }).fromString(pe), me = "\n0% {\n filter: blur(0px);\n opacity: 1;\n}\n100% {\n filter: blur(10px);\n opacity: 0;\n}\n", S = (e) => new t({
78
- duration: 2e3,
79
- timingFunction: "ease-in-out",
80
- ...e ?? {}
81
- }).fromString(me), he = "\n0% {\n filter: blur(0px);\n}\n50% {\n filter: blur(10px);\n}\n100% {\n filter: blur(0px);\n}\n", ge = (e) => new t({
82
- duration: 2e3,
83
- timingFunction: "ease-in-out",
84
- ...e ?? {}
85
- }).fromString(he), _e = "\n0% {\n width: 0%;\n background-color: #ff9999;\n}\n25% {\n width: 25%;\n background-color: #ffcc99;\n}\n50% {\n width: 50%;\n background-color: #ffff99;\n}\n75% {\n width: 75%;\n background-color: #99ff99;\n}\n100% {\n width: 100%;\n background-color: #99ccff;\n}\n", ve = (e) => new t({
86
- duration: 3e3,
87
- timingFunction: "linear",
88
- fillMode: "forwards",
89
- ...e ?? {}
90
- }).fromString(_e), ye = "\n0% {\n background-position: -200% 0;\n}\n100% {\n background-position: 200% 0;\n}\n", C = (e) => new t({
91
- duration: 1500,
92
- timingFunction: "linear",
93
- iterationCount: Infinity,
94
- ...e ?? {}
95
- }).fromString(ye), be = "\n0%, 100% {\n filter: blur(0px);\n opacity: 1;\n}\n50% {\n filter: blur(4px);\n opacity: 0.5;\n}\n", w = (e) => new t({
96
- duration: 2e3,
97
- timingFunction: "ease-in-out",
98
- ...e ?? {}
99
- }).fromString(be), T = "\n0% {\n background-position: 0% 50%;\n}\n50% {\n background-position: 100% 50%;\n}\n100% {\n background-position: 0% 50%;\n}\n", E = (e) => new t({
100
- duration: 5e3,
101
- timingFunction: "ease-in-out",
102
- iterationCount: Infinity,
103
- ...e ?? {}
104
- }).fromString(T), D = "\n0% {\n transform: rotate(0deg) scale(1);\n}\n25% {\n transform: rotate(90deg) scale(1.1);\n}\n50% {\n transform: rotate(180deg) scale(1);\n}\n75% {\n transform: rotate(270deg) scale(0.9);\n}\n100% {\n transform: rotate(360deg) scale(1);\n}\n", O = (e) => new t({
105
- duration: 2500,
106
- timingFunction: n(.68, -.55, .265, 1.55),
107
- ...e ?? {}
108
- }).fromString(D), k = "\n0%, 100% {\n border-right-color: transparent;\n}\n50% {\n border-right-color: black;\n}\n", A = (e) => new t({
109
- duration: 800,
110
- timingFunction: r(2, "jump-start"),
111
- iterationCount: Infinity,
112
- ...e ?? {}
113
- }).fromString(k), j = "\n0% {\n max-height: 0;\n opacity: 0;\n}\n100% {\n max-height: 1000px;\n opacity: 1;\n}\n", M = (e) => new t({
114
- duration: 500,
115
- timingFunction: n(.25, .46, .45, .94),
116
- fillMode: "forwards",
117
- ...e ?? {}
118
- }).fromString(j), N = "\n0%, 100% {\n transform: translateY(0);\n}\n25% {\n transform: translateY(-10px);\n}\n50% {\n transform: translateY(0);\n}\n75% {\n transform: translateY(-5px);\n}\n", P = (e) => new t({
119
- duration: 1e3,
120
- timingFunction: n(.28, .84, .42, 1),
121
- ...e ?? {}
122
- }).fromString(N), xe = "\n0% {\n transform: rotate(0deg);\n border-radius: 50%;\n}\n25% {\n transform: rotate(90deg);\n border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;\n}\n50% {\n transform: rotate(180deg);\n border-radius: 50%;\n}\n75% {\n transform: rotate(270deg);\n border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%;\n}\n100% {\n transform: rotate(360deg);\n border-radius: 50%;\n}\n", F = (e) => new t({
123
- duration: 2e3,
124
- timingFunction: "linear",
125
- iterationCount: Infinity,
126
- ...e ?? {}
127
- }).fromString(xe), Se = "\n0% {\n background-position: 50% 0%;\n}\n100% {\n background-position: 50% 100%;\n}\n", I = (e) => new t({
128
- duration: 1e4,
129
- timingFunction: "linear",
130
- iterationCount: Infinity,
131
- ...e ?? {}
132
- }).fromString(Se), Ce = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", L = (e) => new t({
133
- duration: 1e3,
134
- timingFunction: n(.25, .46, .45, .94),
135
- ...e ?? {}
136
- }).fromString(Ce), we = "\n0% {\n transform: translateX(0);\n opacity: 1;\n}\n100% {\n transform: translateX(-100%);\n opacity: 0;\n}\n", R = (e) => new t({
137
- duration: 1e3,
138
- timingFunction: n(.25, .46, .45, .94),
139
- ...e ?? {}
140
- }).fromString(we), Te = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", z = (e) => new t({
141
- duration: 1e3,
142
- timingFunction: n(.25, .46, .45, .94),
143
- ...e ?? {}
144
- }).fromString(Te), Ee = "\n0% {\n transform: translateX(0%);\n opacity: 1;\n\n}\n100% {\n transform: translateX(100%);\n opacity: 0;\n}\n", B = (e) => new t({
145
- duration: 1e3,
146
- timingFunction: n(.25, .46, .45, .94),
147
- ...e ?? {}
148
- }).fromString(Ee), De = "\n0% {\n transform: translateY(0px);\n}\n50% {\n transform: translateY(5px);\n}\n100% {\n transform: translateY(0px);\n}\n", V = (e) => new t({
149
- duration: 3e3,
150
- timingFunction: "ease-in-out",
151
- iterationCount: Infinity,
152
- fillMode: "none",
153
- direction: "alternate",
154
- ...e ?? {}
155
- }).fromString(De), Oe = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(-50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(-100%);\n opacity: 1;\n}\n}", H = (e) => new t({
156
- duration: 700,
157
- timingFunction: "bounce-in-ease",
158
- ...e ?? {}
159
- }).fromString(Oe), ke = "@keyframes keyframeShift {\n0% {\n transform: translateY(0%);\n opacity: 1;\n}\n\n50% {\n transform: translateY(50%);\n opacity: 0.75;\n}\n\n100% {\n transform: translateY(100%);\n opacity: 1;\n}\n}", U = (e) => new t({
160
- duration: 700,
161
- timingFunction: "bounce-in-ease",
162
- ...e ?? {}
163
- }).fromString(ke), Ae = {
164
- response: .35,
165
- dampingFraction: .78
166
- }, W = {
167
- response: .5,
168
- dampingFraction: .5
169
- }, je = {
170
- response: .7,
171
- dampingFraction: .95
172
- }, Me = "\n 0% {\n transform: scale(0.6);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n", G = (n) => new t({
173
- duration: 600,
174
- timingFunction: e(W),
175
- ...n ?? {}
176
- }).fromString(Me), Ne = "\n 0% {\n transform: translateY(40px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", K = (n) => new t({
177
- duration: 600,
178
- timingFunction: e(Ae),
179
- ...n ?? {}
180
- }).fromString(Ne), q = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.15);\n }\n", J = (n) => new t({
181
- duration: 700,
182
- timingFunction: e(W),
183
- ...n ?? {}
184
- }).fromString(q), Pe = "\n 0%, 100% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(8deg);\n }\n", Y = (n) => new t({
185
- duration: 800,
186
- timingFunction: e(je),
187
- ...n ?? {}
188
- }).fromString(Pe), X = {
189
- fadeIn: o,
190
- slideIn: m,
191
- slideInLeft: L,
192
- slideInRight: z,
193
- rotateIn: p,
194
- blurIn: x,
195
- springScaleIn: G,
196
- springSlideIn: K,
197
- jumpUp: H
198
- }, Z = {
199
- fadeOut: s,
200
- slideOutLeft: R,
201
- slideOutRight: B,
202
- blurOut: S,
203
- warpLeft: y,
204
- warpRight: b,
205
- jumpDown: U
206
- }, Q = {
207
- pulse: c,
208
- shake: l,
209
- bounce: d,
210
- flip: f,
211
- notificationBounce: P,
212
- springPop: J,
213
- springWobble: Y
214
- }, $ = {
215
- heartbeat: g,
216
- glow: _,
217
- spinner: F,
218
- rainbowText: v,
219
- skeletonLoading: C,
220
- gradientBackground: E,
221
- parallaxScroll: I,
222
- hover: V,
223
- typingCursor: A
224
- }, Fe = {
225
- enter: X,
226
- exit: Z,
227
- attention: Q,
228
- loop: $
229
- }, Ie = /* @__PURE__ */ a({
230
- accordionExpand: () => M,
231
- attentionPresets: () => Q,
232
- blurIn: () => x,
233
- blurInOut: () => ge,
234
- blurOut: () => S,
235
- bounce: () => d,
236
- enterPresets: () => X,
237
- exitPresets: () => Z,
238
- fadeIn: () => o,
239
- fadeOut: () => s,
240
- flipPreset: () => f,
241
- glow: () => _,
242
- gradientBackground: () => E,
243
- heartbeat: () => g,
244
- hover: () => V,
245
- jumpDown: () => U,
246
- jumpUp: () => H,
247
- loopPresets: () => $,
248
- notificationBounce: () => P,
249
- parallaxScroll: () => I,
250
- presetTaxonomy: () => Fe,
251
- progressBar: () => ve,
252
- pulse: () => c,
253
- rainbowText: () => v,
254
- rotateIn: () => p,
255
- rotateScale: () => O,
256
- shake: () => l,
257
- skeletonLoading: () => C,
258
- slideIn: () => m,
259
- slideInLeft: () => L,
260
- slideInRight: () => z,
261
- slideOutLeft: () => R,
262
- slideOutRight: () => B,
263
- spinner: () => F,
264
- springPop: () => J,
265
- springScaleIn: () => G,
266
- springSlideIn: () => K,
267
- springWobble: () => Y,
268
- textFocusBlur: () => w,
269
- typewriter: () => le,
270
- typingCursor: () => A,
271
- warpLeft: () => y,
272
- warpRight: () => b
273
- });
274
- //#endregion
275
- export { a as n, Ie as t };
@@ -1,14 +0,0 @@
1
- import { n as e } from "./presets-BG2Fczzq.js";
2
- //#region src/animation/internal/scheduler.ts
3
- var t = /* @__PURE__ */ e({ yieldToMain: () => i }), n = null, r = () => typeof MessageChannel == "function" ? () => new Promise((e) => {
4
- let t = new MessageChannel();
5
- t.port1.onmessage = () => {
6
- t.port1.close(), e();
7
- }, t.port2.postMessage(void 0);
8
- }) : () => new Promise((e) => setTimeout(e, 0));
9
- function i() {
10
- let e = globalThis.scheduler;
11
- return e && typeof e.yield == "function" ? e.yield() : (n ??= r(), n());
12
- }
13
- //#endregion
14
- export { i as n, t };