@mkbabb/keyframes.js 5.2.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- import { t as e } from "./easing-registry-DHV2-5gA.js";
2
- export { e as getTimingFunction };
@@ -1,21 +0,0 @@
1
- import { y as e } from "./sequence-s0bL7Uul.js";
2
- import { camelCaseToHyphen as t, timingFunctions as n } from "@mkbabb/value.js";
3
- //#region src/animation/compile/backward/easing-serialize.ts
4
- var r = /^(linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/, i = (e) => Math.round(e * 1e5) / 1e5;
5
- function a(e, t = 32) {
6
- let n = [];
7
- for (let r = 0; r <= t; r++) {
8
- let a = r / t;
9
- n.push(`${i(e(a))} ${i(a * 100)}%`);
10
- }
11
- return `linear(${n.join(", ")})`;
12
- }
13
- function o(i) {
14
- if (i.css !== void 0) return i.css;
15
- let o = Object.entries(n).find(([e, t]) => t === i.fn)?.[0];
16
- if (o === void 0) throw new e("timingFunction", i.fn, "a custom TimingFunction has no CSS animation-timing-function representation — attach a faithful Easing.css twin, or use a registry name / cubic-bezier() / linear() literal");
17
- let s = t(o);
18
- return r.test(s) ? s : a(i.fn);
19
- }
20
- //#endregion
21
- export { o as t };