@mkbabb/keyframes.js 3.0.0 → 4.1.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 +8 -3
- package/dist/animate-12YQKwyY.js +21 -0
- package/dist/animations-CcAWdZlW.js +224 -0
- package/dist/draw-svg-DwAa5cbU.js +41 -0
- package/dist/engine-Cj0T6OIH.js +1051 -0
- package/dist/keyframes.d.ts +1793 -184
- package/dist/keyframes.js +347 -391
- package/dist/motion-path-683GcEZK.js +31 -0
- package/dist/springTimingFunction-cMJnhbug.js +178 -0
- package/dist/timeline-BHz0o8dZ.js +281 -0
- package/package.json +146 -106
- package/dist/css-easing-DoPNckiS.js +0 -55
- package/dist/engine-B7JGZTdU.js +0 -742
package/package.json
CHANGED
|
@@ -1,109 +1,149 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"name": "@mkbabb/keyframes.js",
|
|
3
|
+
"version": "4.1.0",
|
|
4
|
+
"description": "Create keyframe animations for anything in JavaScript; specify your keyframes in standards-complaint CSS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"keyframes",
|
|
8
|
+
"keyframes-library",
|
|
9
|
+
"animation",
|
|
10
|
+
"css",
|
|
11
|
+
"css-animations",
|
|
12
|
+
"typescript",
|
|
13
|
+
"web",
|
|
14
|
+
"browser",
|
|
15
|
+
"parsing"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist/keyframes.js",
|
|
20
|
+
"types": "./dist/keyframes.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/keyframes.d.ts",
|
|
24
|
+
"import": "./dist/keyframes.js",
|
|
25
|
+
"default": "./dist/keyframes.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepare": "npm run build:lib",
|
|
33
|
+
"check": "tsc --noEmit",
|
|
34
|
+
"check:lib": "tsc --noEmit -p tsconfig.lib.json",
|
|
35
|
+
"dev": "vite",
|
|
36
|
+
"dev:playground": "vite --mode playground",
|
|
37
|
+
"build": "npm run build:lib",
|
|
38
|
+
"build:lib": "vite build --mode production",
|
|
39
|
+
"build:watch": "vite build --watch --mode production",
|
|
40
|
+
"gh-pages": "vite build --mode gh-pages",
|
|
41
|
+
"proof:boundary": "node scripts/proof-boundary.mjs",
|
|
42
|
+
"proof:repin-safe": "node scripts/proof-repin-safe.mjs",
|
|
43
|
+
"proof:deps-current": "node scripts/proof-deps-current.mjs",
|
|
44
|
+
"proof:repin-witness": "node scripts/proof-repin-witness.mjs",
|
|
45
|
+
"proof:dogfood": "node scripts/proof-dogfood.mjs",
|
|
46
|
+
"proof:engine": "node scripts/proof-engine.mjs",
|
|
47
|
+
"proof:decomposition": "node scripts/proof-decomposition.mjs",
|
|
48
|
+
"proof:idioms": "node scripts/proof-idioms.mjs",
|
|
49
|
+
"proof:brittleness": "node scripts/proof-brittleness.mjs",
|
|
50
|
+
"proof:modern-web": "node scripts/proof-modern-web.mjs",
|
|
51
|
+
"proof:lighthouse-mobile": "node scripts/proof-lighthouse-mobile.mjs",
|
|
52
|
+
"proof:demo-elevate": "node scripts/proof-demo-elevate.mjs",
|
|
53
|
+
"proof:platform-adopt": "node scripts/proof-platform-adopt.mjs && vitest run test/platform-adopt.test.ts",
|
|
54
|
+
"proof:zero-alloc": "vitest run test/zero-alloc.test.ts test/snap-symmetry.test.ts test/frame-compiler.test.ts",
|
|
55
|
+
"proof:engine-correctness": "vitest run test/engine-correctness.test.ts",
|
|
56
|
+
"proof:standalone-zero-alloc": "vitest run test/standalone-zero-alloc.test.ts",
|
|
57
|
+
"proof:compile-deterministic": "vitest run test/compile-deterministic.test.ts",
|
|
58
|
+
"proof:bench-runs": "node scripts/proof-bench-runs.mjs",
|
|
59
|
+
"proof:orchestration": "node scripts/proof-orchestration.mjs",
|
|
60
|
+
"proof:interp-fastprops": "node --allow-natives-syntax scripts/proof-interp-fastprops.mjs && vitest run test/interp-fastprops.test.ts",
|
|
61
|
+
"proof:sync-step": "vitest run test/sync-step.test.ts",
|
|
62
|
+
"proof:roundtrip-easing": "vitest run test/roundtrip-easing.test.ts",
|
|
63
|
+
"proof:adapter-capture": "vitest run test/adapter-capture.test.ts",
|
|
64
|
+
"proof:motion-path": "node scripts/proof-motion-path.mjs && vitest run test/motion-path.test.ts",
|
|
65
|
+
"proof:blend": "node scripts/proof-blend.mjs && vitest run test/blend.test.ts",
|
|
66
|
+
"proof:drawsvg": "node scripts/proof-drawsvg.mjs && vitest run test/draw-svg.test.ts",
|
|
67
|
+
"proof:finished": "node scripts/proof-finished.mjs && vitest run test/finished.test.ts",
|
|
68
|
+
"proof:adopt-compiled": "node scripts/proof-adopt-compiled.mjs && vitest run test/adopt-compiled.test.ts",
|
|
69
|
+
"proof:interpolate-anything": "node scripts/proof-interpolate-anything.mjs && vitest run test/interpolate-anything.test.ts",
|
|
70
|
+
"proof:roundtrip-fidelity": "node scripts/proof-roundtrip-fidelity.mjs && vitest run test/roundtrip-fidelity.test.ts",
|
|
71
|
+
"proof:orbital-rotate3d": "node scripts/proof-orbital-rotate3d.mjs && vitest run test/orbital-rotate3d.test.ts",
|
|
72
|
+
"proof:asset-store-singleton": "vitest run test/asset-store-singleton.test.ts",
|
|
73
|
+
"proof:scene-raf-leak": "vitest run test/scene-raf-leak.test.ts",
|
|
74
|
+
"proof:resize-tracks": "vitest run test/resize-tracks.test.ts",
|
|
75
|
+
"proof:computed-real-dom": "node scripts/proof-computed-real-dom.mjs",
|
|
76
|
+
"proof:demo-usability": "node scripts/proof-demo-usability.mjs",
|
|
77
|
+
"proof:cohesion": "vitest run test/boundary-cohesion.test.ts",
|
|
78
|
+
"proof:ci-coverage": "node scripts/proof-ci-coverage.mjs",
|
|
79
|
+
"proof:all": "npm run proof:deps-current && npm run proof:repin-witness && npm run proof:boundary && npm run proof:dogfood && npm run proof:engine && npm run proof:decomposition && npm run proof:idioms && npm run proof:brittleness && npm run proof:demo-elevate && npm run proof:modern-web && npm run proof:zero-alloc && npm run proof:engine-correctness && npm run proof:standalone-zero-alloc && npm run proof:compile-deterministic && npm run proof:platform-adopt && npm run proof:orchestration && npm run proof:interp-fastprops && npm run proof:sync-step && npm run proof:roundtrip-easing && npm run proof:adapter-capture && npm run proof:motion-path && npm run proof:blend && npm run proof:drawsvg && npm run proof:finished && npm run proof:adopt-compiled && npm run proof:interpolate-anything && npm run proof:roundtrip-fidelity && npm run proof:orbital-rotate3d && npm run proof:asset-store-singleton && npm run proof:scene-raf-leak && npm run proof:resize-tracks && npm run proof:cohesion && npm run proof:bench-runs && npm run proof:ci-coverage && vitest run",
|
|
80
|
+
"test": "vitest",
|
|
81
|
+
"bench": "vitest bench"
|
|
82
|
+
},
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
86
|
+
},
|
|
87
|
+
"author": "",
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=22"
|
|
90
|
+
},
|
|
91
|
+
"peerDependencies": {
|
|
92
|
+
"vue": "^3.5.0"
|
|
93
|
+
},
|
|
94
|
+
"bugs": {
|
|
95
|
+
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
96
|
+
},
|
|
97
|
+
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@mkbabb/parse-that": "^0.9.0",
|
|
100
|
+
"@mkbabb/value.js": "^0.11.1"
|
|
101
|
+
},
|
|
102
|
+
"optionalDependencies": {
|
|
103
|
+
"@mkbabb/glass-ui": "^3.3.0"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@iconify-json/radix-icons": "^1.2.6",
|
|
107
|
+
"@iconify/vue": "^5.0.1",
|
|
108
|
+
"@lucide/vue": "^1.17.0",
|
|
109
|
+
"@microsoft/api-extractor": "^7.58.7",
|
|
110
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
111
|
+
"@types/node": "^25.9.1",
|
|
112
|
+
"@types/three": "^0.184.1",
|
|
113
|
+
"@unovis/ts": "^1.6.5",
|
|
114
|
+
"@unovis/vue": "^1.6.5",
|
|
115
|
+
"@vee-validate/zod": "^4.15.1",
|
|
116
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
117
|
+
"@vueuse/core": "^14.3.0",
|
|
118
|
+
"class-variance-authority": "^0.7.1",
|
|
119
|
+
"clsx": "^2.1.1",
|
|
120
|
+
"embla-carousel-vue": "^8.6.0",
|
|
121
|
+
"highlight.js": "^11.11.1",
|
|
122
|
+
"html2canvas": "^1.4.1",
|
|
123
|
+
"jsdom": "^29.1.1",
|
|
124
|
+
"monaco-editor": "^0.55.1",
|
|
125
|
+
"monaco-themes": "^0.4.8",
|
|
126
|
+
"prettier": "^3.8.3",
|
|
127
|
+
"prettier-plugin-classnames": "^0.10.2",
|
|
128
|
+
"prettier-plugin-merge": "^0.10.1",
|
|
129
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
130
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
131
|
+
"reka-ui": "^2.9.9",
|
|
132
|
+
"rolldown": "^1.0.0",
|
|
133
|
+
"tailwind-merge": "^3.6.0",
|
|
134
|
+
"tailwindcss": "^4.3.0",
|
|
135
|
+
"three": "^0.184.0",
|
|
136
|
+
"tw-animate-css": "^1.4.0",
|
|
137
|
+
"typescript": "^6.0.3",
|
|
138
|
+
"v-calendar": "^3.1.2",
|
|
139
|
+
"vaul-vue": "^0.4.1",
|
|
140
|
+
"vee-validate": "^4.15.1",
|
|
141
|
+
"vite": "^8.0.16",
|
|
142
|
+
"vite-plugin-dts": "^5.0.2",
|
|
143
|
+
"vitest": "^4.1.8",
|
|
144
|
+
"vue": "^3.5.35",
|
|
145
|
+
"vue-router": "^5.1.0",
|
|
146
|
+
"vue-sonner": "^2.0.9",
|
|
147
|
+
"zod": "^3.25.76"
|
|
26
148
|
}
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist"
|
|
30
|
-
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"prepare": "npm run build:lib",
|
|
33
|
-
"check": "tsc --noEmit",
|
|
34
|
-
"check:lib": "tsc --noEmit -p tsconfig.lib.json",
|
|
35
|
-
"dev": "vite",
|
|
36
|
-
"dev:playground": "vite --mode playground",
|
|
37
|
-
"build": "npm run build:lib",
|
|
38
|
-
"build:lib": "vite build --mode production",
|
|
39
|
-
"build:watch": "vite build --watch --mode production",
|
|
40
|
-
"gh-pages": "vite build --mode gh-pages",
|
|
41
|
-
"proof:boundary": "node scripts/proof-boundary.mjs",
|
|
42
|
-
"test": "vitest",
|
|
43
|
-
"bench": "vitest bench"
|
|
44
|
-
},
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
48
|
-
},
|
|
49
|
-
"author": "",
|
|
50
|
-
"engines": {
|
|
51
|
-
"node": ">=22"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"vue": "^3.5.0"
|
|
55
|
-
},
|
|
56
|
-
"bugs": {
|
|
57
|
-
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
58
|
-
},
|
|
59
|
-
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"@mkbabb/parse-that": "^0.8.2",
|
|
62
|
-
"@mkbabb/value.js": "^0.10.0"
|
|
63
|
-
},
|
|
64
|
-
"optionalDependencies": {
|
|
65
|
-
"@mkbabb/glass-ui": "file:../glass-ui"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"@iconify-json/radix-icons": "^1.2.6",
|
|
69
|
-
"@iconify/vue": "^4.1.2",
|
|
70
|
-
"@lucide/vue": "^1.16.0",
|
|
71
|
-
"@tailwindcss/postcss": "^4.3.0",
|
|
72
|
-
"@types/node": "^24.12.4",
|
|
73
|
-
"@types/three": "^0.166.0",
|
|
74
|
-
"@unovis/ts": "^1.6.5",
|
|
75
|
-
"@unovis/vue": "^1.6.5",
|
|
76
|
-
"@vee-validate/zod": "^4.15.1",
|
|
77
|
-
"@vitejs/plugin-vue": "^6.0.7",
|
|
78
|
-
"@vueuse/core": "^14.3.0",
|
|
79
|
-
"class-variance-authority": "^0.7.1",
|
|
80
|
-
"clsx": "^2.1.1",
|
|
81
|
-
"embla-carousel-vue": "^8.6.0",
|
|
82
|
-
"highlight.js": "^11.11.1",
|
|
83
|
-
"html2canvas": "^1.4.1",
|
|
84
|
-
"jsdom": "^26.1.0",
|
|
85
|
-
"monaco-editor": "^0.50.0",
|
|
86
|
-
"monaco-themes": "^0.4.8",
|
|
87
|
-
"prettier": "^3.8.3",
|
|
88
|
-
"prettier-plugin-classnames": "^0.10.1",
|
|
89
|
-
"prettier-plugin-merge": "^0.10.1",
|
|
90
|
-
"prettier-plugin-organize-imports": "^4.3.0",
|
|
91
|
-
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
92
|
-
"reka-ui": "^2.9.7",
|
|
93
|
-
"tailwind-merge": "^3.6.0",
|
|
94
|
-
"tailwindcss": "^4.3.0",
|
|
95
|
-
"three": "^0.166.1",
|
|
96
|
-
"tw-animate-css": "^1.4.0",
|
|
97
|
-
"typescript": "^6.0.3",
|
|
98
|
-
"v-calendar": "^3.1.2",
|
|
99
|
-
"vaul-vue": "^0.4.0",
|
|
100
|
-
"vee-validate": "^4.15.1",
|
|
101
|
-
"vite": "^8.0.13",
|
|
102
|
-
"vite-plugin-dts": "^4.5.4",
|
|
103
|
-
"vitest": "^4.1.7",
|
|
104
|
-
"vue": "^3.5.34",
|
|
105
|
-
"vue-router": "^5.0.7",
|
|
106
|
-
"vue-sonner": "^1.1.3",
|
|
107
|
-
"zod": "^3.23.8"
|
|
108
|
-
}
|
|
109
149
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
//#region src/animation/internal/binarySearch.ts
|
|
2
|
-
function e(e, t, n, r) {
|
|
3
|
-
let i = 0, a = e.length - 1;
|
|
4
|
-
for (; i <= a;) {
|
|
5
|
-
let o = i + a >> 1, s = e[o];
|
|
6
|
-
if (t < n(s)) a = o - 1;
|
|
7
|
-
else if (t > r(s)) i = o + 1;
|
|
8
|
-
else return o;
|
|
9
|
-
}
|
|
10
|
-
return -1;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/animation/internal/leaves.ts
|
|
14
|
-
var t = 1e3 / 60;
|
|
15
|
-
function n(e, t, n) {
|
|
16
|
-
return Math.min(Math.max(e, t), n);
|
|
17
|
-
}
|
|
18
|
-
function r(e, t, n, r = 0, i = 1) {
|
|
19
|
-
if (n === t) throw Error("fromMax and fromMin cannot be equal");
|
|
20
|
-
let a = (i - r) / (n - t);
|
|
21
|
-
return (e - t) * a + r;
|
|
22
|
-
}
|
|
23
|
-
function i(e, t, n) {
|
|
24
|
-
return (1 - n) * e + n * t;
|
|
25
|
-
}
|
|
26
|
-
function a(e) {
|
|
27
|
-
if (typeof window < "u" && window.requestAnimationFrame) return window.requestAnimationFrame(e);
|
|
28
|
-
let n = t, r = Date.now();
|
|
29
|
-
return setTimeout(() => {
|
|
30
|
-
let i = Date.now(), a = i - r;
|
|
31
|
-
r = i, n = Math.max(0, t - a), e(i);
|
|
32
|
-
}, n);
|
|
33
|
-
}
|
|
34
|
-
function o(e) {
|
|
35
|
-
if (typeof window < "u" && window.cancelAnimationFrame) return window.cancelAnimationFrame(e);
|
|
36
|
-
clearTimeout(e);
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/animation/internal/reduced-motion.ts
|
|
40
|
-
function s() {
|
|
41
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/animation/internal/css-easing.ts
|
|
45
|
-
var c = Symbol.for("keyframes.cssEasing");
|
|
46
|
-
function l(e, t) {
|
|
47
|
-
return e[c] = t, e;
|
|
48
|
-
}
|
|
49
|
-
function u(e) {
|
|
50
|
-
if (typeof e != "function") return;
|
|
51
|
-
let t = e[c];
|
|
52
|
-
return typeof t == "string" ? t : void 0;
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { n as a, r as c, o as i, e as l, l as n, i as o, s as r, a as s, u as t };
|