@mkbabb/keyframes.js 5.2.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.
- package/README.md +15 -5
- package/dist/easing-registry-BAgudUsG.js +2 -0
- package/dist/{easing-registry-DHV2-5gA.js → easing-registry-BlbS88NR.js} +2 -2
- package/dist/engine/index.d.ts +155 -174
- package/dist/engine/index.js +3710 -16
- package/dist/keyframes.d.ts +370 -305
- package/dist/keyframes.js +91 -142
- package/dist/{sequence-s0bL7Uul.js → sequence-CES7o7hs.js} +218 -170
- package/package.json +16 -42
- package/dist/backward-color-BtbRcnna.js +0 -108
- package/dist/compile-BHCTPerD.js +0 -30
- package/dist/delegation-BQYCrP2p.js +0 -259
- package/dist/draw-svg-CK9Qrly8.js +0 -33
- package/dist/easing-registry-y1p9McFy.js +0 -2
- package/dist/easing-serialize-D4LZCB6i.js +0 -21
- package/dist/engine-CPK_udUQ.js +0 -1172
- package/dist/engine-DlpimZtM.js +0 -3
- package/dist/entry-D82NKUhP.js +0 -148
- package/dist/format-BdIvdLzG.js +0 -114
- package/dist/group-HM7N4uOE.js +0 -390
- package/dist/handle-D4xrf_ya.js +0 -21
- package/dist/ingest-_g6tfk2e.js +0 -166
- package/dist/morph-svg-KUrH9KnK.js +0 -79
- package/dist/motion-path-wM5tPfrY.js +0 -26
- package/dist/parse-flatten-DRMHFytp.js +0 -2
- package/dist/parse-flatten-ZZUSEQEL.js +0 -63
- package/dist/presets-DeDJYL4G.js +0 -275
- package/dist/scheduler-CfGIC3GX.js +0 -14
- package/dist/scroll-BEyCx0b_.js +0 -287
- package/dist/validate-xFZ_Ld1k.js +0 -39
- package/dist/view-transition-BPJQxUTC.js +0 -305
package/dist/ingest-_g6tfk2e.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./presets-DeDJYL4G.js";
|
|
2
|
-
import { t } from "./engine-CPK_udUQ.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,79 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./presets-DeDJYL4G.js";
|
|
2
|
-
import { y as t } from "./sequence-s0bL7Uul.js";
|
|
3
|
-
import { t as n } from "./engine-CPK_udUQ.js";
|
|
4
|
-
import { t as r } from "./handle-D4xrf_ya.js";
|
|
5
|
-
import { PathGeometry as i } from "@mkbabb/value.js";
|
|
6
|
-
//#region src/animation/svg/morph-geometry.ts
|
|
7
|
-
var a = (e) => `--morph-${e}-x`, o = (e) => `--morph-${e}-y`, s = (e) => `--morph-${e}-angle`, c = (e, t, n) => {
|
|
8
|
-
let r = Array(t + 1);
|
|
9
|
-
for (let i = 0; i <= t; i++) if (n) {
|
|
10
|
-
let n = e.sampleAtLength(e.totalLength * (i / t));
|
|
11
|
-
r[i] = {
|
|
12
|
-
x: n.x,
|
|
13
|
-
y: n.y,
|
|
14
|
-
angle: n.angle
|
|
15
|
-
};
|
|
16
|
-
} else r[i] = e.getPointAtT(i / t);
|
|
17
|
-
return r;
|
|
18
|
-
}, l = (e) => Number.isInteger(e) ? `${e}` : e.toFixed(3), u = (e) => {
|
|
19
|
-
if (e.length === 0) return "";
|
|
20
|
-
let t = `M ${l(e[0].x)} ${l(e[0].y)}`;
|
|
21
|
-
for (let n = 1; n < e.length; n++) t += ` L ${l(e[n].x)} ${l(e[n].y)}`;
|
|
22
|
-
return t;
|
|
23
|
-
}, d = (e, t) => {
|
|
24
|
-
let n = Array(t + 1);
|
|
25
|
-
for (let e = 0; e <= t; e++) n[e] = {
|
|
26
|
-
x: 0,
|
|
27
|
-
y: 0
|
|
28
|
-
};
|
|
29
|
-
return (r) => {
|
|
30
|
-
let i = r;
|
|
31
|
-
for (let e = 0; e <= t; e++) {
|
|
32
|
-
let t = n[e], r = i[a(e)], s = i[o(e)];
|
|
33
|
-
if (typeof r != "number" || typeof s != "number") throw Error(`morph render: point ${e} lost its coordinate leaf (engine invariant violated — xKey/yKey seeded at construction)`);
|
|
34
|
-
t.x = r, t.y = s;
|
|
35
|
-
}
|
|
36
|
-
let s = u(n);
|
|
37
|
-
e.style.setProperty("--morph-d", s), e.style.setProperty("d", `path("${s}")`);
|
|
38
|
-
};
|
|
39
|
-
}, f = /* @__PURE__ */ e({
|
|
40
|
-
MorphSVG: () => m,
|
|
41
|
-
fromMorphSVG: () => p
|
|
42
|
-
});
|
|
43
|
-
function p(e, r, l = {}) {
|
|
44
|
-
let { samples: u = 64, target: f, orient: p = !1, autoPlay: m = !0, ...h } = l;
|
|
45
|
-
if (typeof e != "string" || e.length === 0) throw new t("from", e, "fromMorphSVG(): `from` must be a non-empty SVG path `d` string.");
|
|
46
|
-
if (typeof r != "string" || r.length === 0) throw new t("to", r, "fromMorphSVG(): `to` must be a non-empty SVG path `d` string.");
|
|
47
|
-
if (!Number.isInteger(u) || u < 2) throw new t("samples", u, "fromMorphSVG(): `samples` must be an integer >= 2 (a 1-sample morph is just the two endpoints, with no body to interpolate).");
|
|
48
|
-
let g = new i(e), _ = new i(r);
|
|
49
|
-
if (g.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.");
|
|
50
|
-
if (_.totalLength === 0) throw new t("to", r, "fromMorphSVG(): the `to` path has zero arc-length — a morph between a zero-length path and anything is malformed input, not an identity animation.");
|
|
51
|
-
let v = c(g, u, p), y = c(_, u, p), b = {}, x = {};
|
|
52
|
-
for (let e = 0; e <= u; e++) b[a(e)] = v[e].x, b[o(e)] = v[e].y, x[a(e)] = y[e].x, x[o(e)] = y[e].y, p && (b[s(e)] = v[e].angle ?? 0, x[s(e)] = y[e].angle ?? 0);
|
|
53
|
-
let S = {
|
|
54
|
-
"0%": b,
|
|
55
|
-
"100%": x
|
|
56
|
-
}, C = f == null ? void 0 : d(f, u), w = f;
|
|
57
|
-
f != null && typeof w.setAttribute == "function" && w.setAttribute("d", e);
|
|
58
|
-
let T = new n(h).fromKeyframes(S, C);
|
|
59
|
-
return m && T.play(), T;
|
|
60
|
-
}
|
|
61
|
-
var m = class extends r {
|
|
62
|
-
samples;
|
|
63
|
-
constructor(e, t, n = {}) {
|
|
64
|
-
super(p(e, t, n)), this.samples = n.samples ?? 64;
|
|
65
|
-
}
|
|
66
|
-
sampleD(e) {
|
|
67
|
-
let t = (e < 0 ? 0 : e > 1 ? 1 : e) * this.animation.options.duration, n = this.animation.interpFrames(t, !1), r = Array(this.samples + 1);
|
|
68
|
-
for (let e = 0; e <= this.samples; e++) {
|
|
69
|
-
let t = n[a(e)]?.[0]?.value, i = n[o(e)]?.[0]?.value;
|
|
70
|
-
r[e] = {
|
|
71
|
-
x: t ?? 0,
|
|
72
|
-
y: i ?? 0
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
return u(r);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
//#endregion
|
|
79
|
-
export { p as n, f as r, m as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./presets-DeDJYL4G.js";
|
|
2
|
-
import { t } from "./engine-CPK_udUQ.js";
|
|
3
|
-
import { t as n } from "./handle-D4xrf_ya.js";
|
|
4
|
-
//#region src/animation/svg/motion-path.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({
|
|
6
|
-
MotionPath: () => o,
|
|
7
|
-
fromMotionPath: () => a
|
|
8
|
-
}), i = (e) => typeof e == "number" ? `${e}%` : e;
|
|
9
|
-
function a(e, n) {
|
|
10
|
-
let { path: r, from: a = "0%", to: o = "100%", rotate: s, autoPlay: c = !0, ...l } = n;
|
|
11
|
-
if (typeof r != "string" || r.length === 0) throw Error("fromMotionPath(): `path` is required — pass an offset-path value (a path()/ray()/url(#id) string).");
|
|
12
|
-
let u = Array.isArray(e) ? e : [e];
|
|
13
|
-
for (let e of u) e.style.offsetPath = r, s !== void 0 && (e.style.offsetRotate = s);
|
|
14
|
-
let d = {
|
|
15
|
-
"0%": { "offset-distance": i(a) },
|
|
16
|
-
"100%": { "offset-distance": i(o) }
|
|
17
|
-
}, f = new t(l).fromKeyframes(d);
|
|
18
|
-
return f.setTargets(...u), c && f.play(), f;
|
|
19
|
-
}
|
|
20
|
-
var o = class extends n {
|
|
21
|
-
constructor(e, t) {
|
|
22
|
-
super(a(e, t));
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { a as n, r, o as t };
|
|
@@ -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 };
|
package/dist/presets-DeDJYL4G.js
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { a as e } from "./sequence-s0bL7Uul.js";
|
|
2
|
-
import { t } from "./engine-CPK_udUQ.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", te = "\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n", ne = "\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.05);\n }\n", 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", ie = "\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", ae = "\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", o = "\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", s = "\n 0% {\n transform: translateY(1000px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", c = "\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", l = "\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", u = "\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n", d = "\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", f = "@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}", p = "@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}", m = "\n0% {\n filter: blur(10px);\n opacity: 0;\n}\n100% {\n filter: blur(0px);\n opacity: 1;\n}\n", oe = "\n0% {\n filter: blur(0px);\n opacity: 1;\n}\n100% {\n filter: blur(10px);\n opacity: 0;\n}\n", se = "\n0% {\n filter: blur(0px);\n}\n50% {\n filter: blur(10px);\n}\n100% {\n filter: blur(0px);\n}\n", ce = "\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", le = "\n0% {\n background-position: -200% 0;\n}\n100% {\n background-position: 200% 0;\n}\n", ue = "\n0%, 100% {\n filter: blur(0px);\n opacity: 1;\n}\n50% {\n filter: blur(4px);\n opacity: 0.5;\n}\n", de = "\n0% {\n background-position: 0% 50%;\n}\n50% {\n background-position: 100% 50%;\n}\n100% {\n background-position: 0% 50%;\n}\n", fe = "\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", h = "\n0%, 100% {\n border-right-color: transparent;\n}\n50% {\n border-right-color: black;\n}\n", pe = "\n0% {\n max-height: 0;\n opacity: 0;\n}\n100% {\n max-height: 1000px;\n opacity: 1;\n}\n", me = "\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", he = "\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", ge = "\n0% {\n background-position: 50% 0%;\n}\n100% {\n background-position: 50% 100%;\n}\n", _e = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", ve = "\n0% {\n transform: translateX(0);\n opacity: 1;\n}\n100% {\n transform: translateX(-100%);\n opacity: 0;\n}\n", ye = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n", be = "\n0% {\n transform: translateX(0%);\n opacity: 1;\n\n}\n100% {\n transform: translateX(100%);\n opacity: 0;\n}\n", xe = "\n0% {\n transform: translateY(0px);\n}\n50% {\n transform: translateY(5px);\n}\n100% {\n transform: translateY(0px);\n}\n", Se = "@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}", Ce = "@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}", g = (e) => new t({
|
|
13
|
-
duration: 700,
|
|
14
|
-
timingFunction: "ease-in-out",
|
|
15
|
-
...e ?? {}
|
|
16
|
-
}).fromString(ee), _ = (e) => new t({
|
|
17
|
-
duration: 700,
|
|
18
|
-
timingFunction: "ease-in-out",
|
|
19
|
-
...e ?? {}
|
|
20
|
-
}).fromString(te), v = (e) => new t({
|
|
21
|
-
duration: 1e3,
|
|
22
|
-
timingFunction: "ease-in-out",
|
|
23
|
-
iterationCount: Infinity,
|
|
24
|
-
...e ?? {}
|
|
25
|
-
}).fromString(ne), y = (e) => new t({
|
|
26
|
-
duration: 820,
|
|
27
|
-
timingFunction: "ease-in-out",
|
|
28
|
-
...e ?? {}
|
|
29
|
-
}).fromString(re), b = (e) => new t({
|
|
30
|
-
duration: 1e3,
|
|
31
|
-
timingFunction: n(.28, .84, .42, 1),
|
|
32
|
-
...e ?? {}
|
|
33
|
-
}).fromString(ie), x = (e) => new t({
|
|
34
|
-
duration: 1e3,
|
|
35
|
-
timingFunction: "ease-in-out",
|
|
36
|
-
...e ?? {}
|
|
37
|
-
}).fromString(ae), S = (e) => new t({
|
|
38
|
-
duration: 1e3,
|
|
39
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
40
|
-
...e ?? {}
|
|
41
|
-
}).fromString(o), C = (e) => new t({
|
|
42
|
-
duration: 1e3,
|
|
43
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
44
|
-
...e ?? {}
|
|
45
|
-
}).fromString(s), w = (e) => new t({
|
|
46
|
-
duration: 1500,
|
|
47
|
-
timingFunction: "ease-in-out",
|
|
48
|
-
iterationCount: Infinity,
|
|
49
|
-
...e ?? {}
|
|
50
|
-
}).fromString(c), T = (e) => new t({
|
|
51
|
-
duration: 2e3,
|
|
52
|
-
timingFunction: "ease-in-out",
|
|
53
|
-
iterationCount: Infinity,
|
|
54
|
-
...e ?? {}
|
|
55
|
-
}).fromString(l), E = (e) => new t({
|
|
56
|
-
duration: 3e3,
|
|
57
|
-
timingFunction: r(40, "jump-end"),
|
|
58
|
-
fillMode: "forwards",
|
|
59
|
-
...e ?? {}
|
|
60
|
-
}).fromString(u), D = (e) => new t({
|
|
61
|
-
duration: 5e3,
|
|
62
|
-
timingFunction: "linear",
|
|
63
|
-
iterationCount: Infinity,
|
|
64
|
-
...e ?? {}
|
|
65
|
-
}).fromString(d), O = (e) => new t({
|
|
66
|
-
duration: 700,
|
|
67
|
-
timingFunction: "bounce-in-ease",
|
|
68
|
-
...e ?? {}
|
|
69
|
-
}).fromString(f), k = (e) => new t({
|
|
70
|
-
duration: 700,
|
|
71
|
-
timingFunction: "bounce-in-ease",
|
|
72
|
-
...e ?? {}
|
|
73
|
-
}).fromString(p), A = (e) => new t({
|
|
74
|
-
duration: 2e3,
|
|
75
|
-
timingFunction: "ease-in-out",
|
|
76
|
-
...e ?? {}
|
|
77
|
-
}).fromString(m), j = (e) => new t({
|
|
78
|
-
duration: 2e3,
|
|
79
|
-
timingFunction: "ease-in-out",
|
|
80
|
-
...e ?? {}
|
|
81
|
-
}).fromString(oe), we = (e) => new t({
|
|
82
|
-
duration: 2e3,
|
|
83
|
-
timingFunction: "ease-in-out",
|
|
84
|
-
...e ?? {}
|
|
85
|
-
}).fromString(se), Te = (e) => new t({
|
|
86
|
-
duration: 3e3,
|
|
87
|
-
timingFunction: "linear",
|
|
88
|
-
fillMode: "forwards",
|
|
89
|
-
...e ?? {}
|
|
90
|
-
}).fromString(ce), M = (e) => new t({
|
|
91
|
-
duration: 1500,
|
|
92
|
-
timingFunction: "linear",
|
|
93
|
-
iterationCount: Infinity,
|
|
94
|
-
...e ?? {}
|
|
95
|
-
}).fromString(le), Ee = (e) => new t({
|
|
96
|
-
duration: 2e3,
|
|
97
|
-
timingFunction: "ease-in-out",
|
|
98
|
-
...e ?? {}
|
|
99
|
-
}).fromString(ue), N = (e) => new t({
|
|
100
|
-
duration: 5e3,
|
|
101
|
-
timingFunction: "ease-in-out",
|
|
102
|
-
iterationCount: Infinity,
|
|
103
|
-
...e ?? {}
|
|
104
|
-
}).fromString(de), De = (e) => new t({
|
|
105
|
-
duration: 2500,
|
|
106
|
-
timingFunction: n(.68, -.55, .265, 1.55),
|
|
107
|
-
...e ?? {}
|
|
108
|
-
}).fromString(fe), P = (e) => new t({
|
|
109
|
-
duration: 800,
|
|
110
|
-
timingFunction: r(2, "jump-start"),
|
|
111
|
-
iterationCount: Infinity,
|
|
112
|
-
...e ?? {}
|
|
113
|
-
}).fromString(h), Oe = (e) => new t({
|
|
114
|
-
duration: 500,
|
|
115
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
116
|
-
fillMode: "forwards",
|
|
117
|
-
...e ?? {}
|
|
118
|
-
}).fromString(pe), F = (e) => new t({
|
|
119
|
-
duration: 1e3,
|
|
120
|
-
timingFunction: n(.28, .84, .42, 1),
|
|
121
|
-
...e ?? {}
|
|
122
|
-
}).fromString(me), I = (e) => new t({
|
|
123
|
-
duration: 2e3,
|
|
124
|
-
timingFunction: "linear",
|
|
125
|
-
iterationCount: Infinity,
|
|
126
|
-
...e ?? {}
|
|
127
|
-
}).fromString(he), L = (e) => new t({
|
|
128
|
-
duration: 1e4,
|
|
129
|
-
timingFunction: "linear",
|
|
130
|
-
iterationCount: Infinity,
|
|
131
|
-
...e ?? {}
|
|
132
|
-
}).fromString(ge), R = (e) => new t({
|
|
133
|
-
duration: 1e3,
|
|
134
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
135
|
-
...e ?? {}
|
|
136
|
-
}).fromString(_e), z = (e) => new t({
|
|
137
|
-
duration: 1e3,
|
|
138
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
139
|
-
...e ?? {}
|
|
140
|
-
}).fromString(ve), B = (e) => new t({
|
|
141
|
-
duration: 1e3,
|
|
142
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
143
|
-
...e ?? {}
|
|
144
|
-
}).fromString(ye), V = (e) => new t({
|
|
145
|
-
duration: 1e3,
|
|
146
|
-
timingFunction: n(.25, .46, .45, .94),
|
|
147
|
-
...e ?? {}
|
|
148
|
-
}).fromString(be), H = (e) => new t({
|
|
149
|
-
duration: 3e3,
|
|
150
|
-
timingFunction: "ease-in-out",
|
|
151
|
-
iterationCount: Infinity,
|
|
152
|
-
fillMode: "none",
|
|
153
|
-
direction: "alternate",
|
|
154
|
-
...e ?? {}
|
|
155
|
-
}).fromString(xe), U = (e) => new t({
|
|
156
|
-
duration: 700,
|
|
157
|
-
timingFunction: "bounce-in-ease",
|
|
158
|
-
...e ?? {}
|
|
159
|
-
}).fromString(Se), W = (e) => new t({
|
|
160
|
-
duration: 700,
|
|
161
|
-
timingFunction: "bounce-in-ease",
|
|
162
|
-
...e ?? {}
|
|
163
|
-
}).fromString(Ce), ke = {
|
|
164
|
-
response: .35,
|
|
165
|
-
dampingFraction: .78
|
|
166
|
-
}, G = {
|
|
167
|
-
response: .5,
|
|
168
|
-
dampingFraction: .5
|
|
169
|
-
}, Ae = {
|
|
170
|
-
response: .7,
|
|
171
|
-
dampingFraction: .95
|
|
172
|
-
}, je = "\n 0% {\n transform: scale(0.6);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n", K = (n) => new t({
|
|
173
|
-
duration: 600,
|
|
174
|
-
timingFunction: e(G),
|
|
175
|
-
...n ?? {}
|
|
176
|
-
}).fromString(je), Me = "\n 0% {\n transform: translateY(40px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n", q = (n) => new t({
|
|
177
|
-
duration: 600,
|
|
178
|
-
timingFunction: e(ke),
|
|
179
|
-
...n ?? {}
|
|
180
|
-
}).fromString(Me), Ne = "\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(G),
|
|
183
|
-
...n ?? {}
|
|
184
|
-
}).fromString(Ne), 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(Ae),
|
|
187
|
-
...n ?? {}
|
|
188
|
-
}).fromString(Pe), X = {
|
|
189
|
-
fadeIn: g,
|
|
190
|
-
slideIn: C,
|
|
191
|
-
slideInLeft: R,
|
|
192
|
-
slideInRight: B,
|
|
193
|
-
rotateIn: S,
|
|
194
|
-
blurIn: A,
|
|
195
|
-
springScaleIn: K,
|
|
196
|
-
springSlideIn: q,
|
|
197
|
-
jumpUp: U
|
|
198
|
-
}, Z = {
|
|
199
|
-
fadeOut: _,
|
|
200
|
-
slideOutLeft: z,
|
|
201
|
-
slideOutRight: V,
|
|
202
|
-
blurOut: j,
|
|
203
|
-
warpLeft: O,
|
|
204
|
-
warpRight: k,
|
|
205
|
-
jumpDown: W
|
|
206
|
-
}, Q = {
|
|
207
|
-
pulse: v,
|
|
208
|
-
shake: y,
|
|
209
|
-
bounce: b,
|
|
210
|
-
flip: x,
|
|
211
|
-
notificationBounce: F,
|
|
212
|
-
springPop: J,
|
|
213
|
-
springWobble: Y
|
|
214
|
-
}, $ = {
|
|
215
|
-
heartbeat: w,
|
|
216
|
-
glow: T,
|
|
217
|
-
spinner: I,
|
|
218
|
-
rainbowText: D,
|
|
219
|
-
skeletonLoading: M,
|
|
220
|
-
gradientBackground: N,
|
|
221
|
-
parallaxScroll: L,
|
|
222
|
-
hover: H,
|
|
223
|
-
typingCursor: P
|
|
224
|
-
}, Fe = {
|
|
225
|
-
enter: X,
|
|
226
|
-
exit: Z,
|
|
227
|
-
attention: Q,
|
|
228
|
-
loop: $
|
|
229
|
-
}, Ie = /* @__PURE__ */ a({
|
|
230
|
-
accordionExpand: () => Oe,
|
|
231
|
-
attentionPresets: () => Q,
|
|
232
|
-
blurIn: () => A,
|
|
233
|
-
blurInOut: () => we,
|
|
234
|
-
blurOut: () => j,
|
|
235
|
-
bounce: () => b,
|
|
236
|
-
enterPresets: () => X,
|
|
237
|
-
exitPresets: () => Z,
|
|
238
|
-
fadeIn: () => g,
|
|
239
|
-
fadeOut: () => _,
|
|
240
|
-
flipPreset: () => x,
|
|
241
|
-
glow: () => T,
|
|
242
|
-
gradientBackground: () => N,
|
|
243
|
-
heartbeat: () => w,
|
|
244
|
-
hover: () => H,
|
|
245
|
-
jumpDown: () => W,
|
|
246
|
-
jumpUp: () => U,
|
|
247
|
-
loopPresets: () => $,
|
|
248
|
-
notificationBounce: () => F,
|
|
249
|
-
parallaxScroll: () => L,
|
|
250
|
-
presetTaxonomy: () => Fe,
|
|
251
|
-
progressBar: () => Te,
|
|
252
|
-
pulse: () => v,
|
|
253
|
-
rainbowText: () => D,
|
|
254
|
-
rotateIn: () => S,
|
|
255
|
-
rotateScale: () => De,
|
|
256
|
-
shake: () => y,
|
|
257
|
-
skeletonLoading: () => M,
|
|
258
|
-
slideIn: () => C,
|
|
259
|
-
slideInLeft: () => R,
|
|
260
|
-
slideInRight: () => B,
|
|
261
|
-
slideOutLeft: () => z,
|
|
262
|
-
slideOutRight: () => V,
|
|
263
|
-
spinner: () => I,
|
|
264
|
-
springPop: () => J,
|
|
265
|
-
springScaleIn: () => K,
|
|
266
|
-
springSlideIn: () => q,
|
|
267
|
-
springWobble: () => Y,
|
|
268
|
-
textFocusBlur: () => Ee,
|
|
269
|
-
typewriter: () => E,
|
|
270
|
-
typingCursor: () => P,
|
|
271
|
-
warpLeft: () => O,
|
|
272
|
-
warpRight: () => k
|
|
273
|
-
});
|
|
274
|
-
//#endregion
|
|
275
|
-
export { a as n, Ie as t };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./presets-DeDJYL4G.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 };
|