@mkbabb/keyframes.js 1.2.1 → 2.2.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/LICENSE +1 -1
- package/README.md +10 -1
- package/dist/_redirects +1 -0
- package/dist/engine-DuAFoqZF.js +699 -0
- package/dist/keyframes.d.ts +543 -148
- package/dist/keyframes.js +501 -1530
- package/dist/leaves-Bu89334e.js +39 -0
- package/package.json +101 -93
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
export { r as a, a as i, n, e as o, i as r, o as t };
|
package/package.json
CHANGED
|
@@ -1,96 +1,104 @@
|
|
|
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
|
-
|
|
26
|
-
"files": [
|
|
27
|
-
"dist"
|
|
28
|
-
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"prepare": "vite build --mode production",
|
|
31
|
-
"dev": "vite",
|
|
32
|
-
"dev:playground": "vite --mode playground",
|
|
33
|
-
"build": "vite build --mode production",
|
|
34
|
-
"gh-pages": "vite build --mode gh-pages",
|
|
35
|
-
"test": "vitest",
|
|
36
|
-
"bench": "vitest bench"
|
|
37
|
-
},
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
41
|
-
},
|
|
42
|
-
"author": "",
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": ">=22"
|
|
45
|
-
},
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@mkbabb/parse-that": "^0.8.1",
|
|
52
|
-
"@mkbabb/value.js": "^0.5.1"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@iconify-json/radix-icons": "^1.1.14",
|
|
56
|
-
"@iconify/vue": "^4.1.2",
|
|
57
|
-
"@mkbabb/glass-ui": "file:../glass-ui",
|
|
58
|
-
"@tailwindcss/postcss": "^4.1",
|
|
59
|
-
"@types/node": "^24.1.0",
|
|
60
|
-
"@types/three": "^0.166.0",
|
|
61
|
-
"@unovis/ts": "^1.5.2",
|
|
62
|
-
"@unovis/vue": "^1.5.2",
|
|
63
|
-
"@vee-validate/zod": "^4.13.2",
|
|
64
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
65
|
-
"@vueuse/core": "^14.2.1",
|
|
66
|
-
"class-variance-authority": "^0.7.1",
|
|
67
|
-
"clsx": "^2.1.1",
|
|
68
|
-
"embla-carousel-vue": "^8.6.0",
|
|
69
|
-
"highlight.js": "^11.11.1",
|
|
70
|
-
"html2canvas": "^1.4.1",
|
|
71
|
-
"jsdom": "^26.1.0",
|
|
72
|
-
"lucide-vue-next": "^0.525.0",
|
|
73
|
-
"monaco-editor": "^0.50.0",
|
|
74
|
-
"monaco-themes": "^0.4.4",
|
|
75
|
-
"prettier": "^3.6.2",
|
|
76
|
-
"prettier-plugin-classnames": "^0.7.0",
|
|
77
|
-
"prettier-plugin-merge": "^0.7.0",
|
|
78
|
-
"prettier-plugin-organize-imports": "^4.0.0",
|
|
79
|
-
"prettier-plugin-tailwindcss": "^0.6.5",
|
|
80
|
-
"reka-ui": "^2.0.0",
|
|
81
|
-
"tailwind-merge": "^3.3.1",
|
|
82
|
-
"tailwindcss": "^4.1.11",
|
|
83
|
-
"three": "^0.166.1",
|
|
84
|
-
"tw-animate-css": "^1.2.5",
|
|
85
|
-
"typescript": "^5.8.3",
|
|
86
|
-
"v-calendar": "^3.1.2",
|
|
87
|
-
"vaul-vue": "^0.2.0",
|
|
88
|
-
"vee-validate": "^4.13.2",
|
|
89
|
-
"vite": "^7.0.6",
|
|
90
|
-
"vite-plugin-dts": "^4.5.4",
|
|
91
|
-
"vitest": "^3.2.4",
|
|
92
|
-
"vue": "^3.5.18",
|
|
93
|
-
"vue-sonner": "^1.1.3",
|
|
94
|
-
"zod": "^3.23.8"
|
|
2
|
+
"name": "@mkbabb/keyframes.js",
|
|
3
|
+
"version": "2.2.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"
|
|
95
26
|
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepare": "vite build --mode production",
|
|
33
|
+
"check": "tsc --noEmit",
|
|
34
|
+
"dev": "vite",
|
|
35
|
+
"dev:playground": "vite --mode playground",
|
|
36
|
+
"build": "vite build --mode production",
|
|
37
|
+
"build:watch": "vite build --watch --mode production",
|
|
38
|
+
"gh-pages": "vite build --mode gh-pages",
|
|
39
|
+
"test": "vitest",
|
|
40
|
+
"bench": "vitest bench"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/mkbabb/keyframes.js.git"
|
|
45
|
+
},
|
|
46
|
+
"author": "",
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=22"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"vue": "^3.5.0"
|
|
52
|
+
},
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/mkbabb/keyframes.js/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/mkbabb/keyframes.js#readme",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@mkbabb/parse-that": "^0.8.2",
|
|
59
|
+
"@mkbabb/value.js": "^0.10.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@iconify-json/radix-icons": "^1.2.6",
|
|
63
|
+
"@iconify/vue": "^4.1.2",
|
|
64
|
+
"@lucide/vue": "^1.16.0",
|
|
65
|
+
"@mkbabb/glass-ui": "file:../glass-ui",
|
|
66
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
67
|
+
"@types/node": "^24.12.4",
|
|
68
|
+
"@types/three": "^0.166.0",
|
|
69
|
+
"@unovis/ts": "^1.6.5",
|
|
70
|
+
"@unovis/vue": "^1.6.5",
|
|
71
|
+
"@vee-validate/zod": "^4.15.1",
|
|
72
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
73
|
+
"@vueuse/core": "^14.3.0",
|
|
74
|
+
"class-variance-authority": "^0.7.1",
|
|
75
|
+
"clsx": "^2.1.1",
|
|
76
|
+
"embla-carousel-vue": "^8.6.0",
|
|
77
|
+
"highlight.js": "^11.11.1",
|
|
78
|
+
"html2canvas": "^1.4.1",
|
|
79
|
+
"jsdom": "^26.1.0",
|
|
80
|
+
"monaco-editor": "^0.50.0",
|
|
81
|
+
"monaco-themes": "^0.4.8",
|
|
82
|
+
"prettier": "^3.8.3",
|
|
83
|
+
"prettier-plugin-classnames": "^0.10.1",
|
|
84
|
+
"prettier-plugin-merge": "^0.10.1",
|
|
85
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
86
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
87
|
+
"reka-ui": "^2.9.7",
|
|
88
|
+
"tailwind-merge": "^3.6.0",
|
|
89
|
+
"tailwindcss": "^4.3.0",
|
|
90
|
+
"three": "^0.166.1",
|
|
91
|
+
"tw-animate-css": "^1.4.0",
|
|
92
|
+
"typescript": "^6.0.3",
|
|
93
|
+
"v-calendar": "^3.1.2",
|
|
94
|
+
"vaul-vue": "^0.4.0",
|
|
95
|
+
"vee-validate": "^4.15.1",
|
|
96
|
+
"vite": "^8.0.13",
|
|
97
|
+
"vite-plugin-dts": "^4.5.4",
|
|
98
|
+
"vitest": "^4.1.7",
|
|
99
|
+
"vue": "^3.5.34",
|
|
100
|
+
"vue-router": "^5.0.7",
|
|
101
|
+
"vue-sonner": "^1.1.3",
|
|
102
|
+
"zod": "^3.23.8"
|
|
103
|
+
}
|
|
96
104
|
}
|