feat(core): add deterministic keyframe ease runtime

This commit is contained in:
Miguel Angel Simon Sierra
2026-07-25 14:12:16 +02:00
parent 1f9a8f0985
commit 5acbf240cb
24 changed files with 938 additions and 30 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ describe("mapEase", () => {
ease: "power2.inOut",
});
expect(mapEase("backOut")).toEqual({ kind: "named", ease: "back.out" });
expect(mapEase("HOLD")).toEqual({ kind: "named", ease: "steps(1)" });
expect(mapEase("HOLD")).toEqual({ kind: "named", ease: "hold" });
});
it("falls back to none for unknown named eases", () => {
expect(mapEase("wobble")).toEqual({ kind: "named", ease: "none" });
+1 -1
View File
@@ -28,7 +28,7 @@ const NAMED_EASE: Record<string, string> = {
elasticinout: "elastic.inOut",
anticipate: "back.in",
spring: "elastic.out",
hold: "steps(1)",
hold: "hold",
};
function isBezier4(ease: unknown[]): ease is [number, number, number, number] {