react-animated-waves 1.0.3 → 1.0.4
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 +13 -16
- package/README.md +28 -21
- package/dist/index.d.ts +10 -8
- package/dist/index.js +1493 -164
- package/package.json +52 -109
- package/dist/index.es.js +0 -2
- package/dist/index.min.js +0 -2
package/package.json
CHANGED
|
@@ -1,117 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-animated-waves",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"loader-animation",
|
|
12
|
-
"animated-wave"
|
|
13
|
-
],
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/agrawal-rohit/react-animated-waves#readme",
|
|
8
|
+
"bugs": "https://github.com/agrawal-rohit/react-animated-waves/issues",
|
|
9
|
+
"repository": "https://github.com/agrawal-rohit/react-animated-waves",
|
|
10
|
+
"author": "Rohit Agrawal <29514438+agrawal-rohit@users.noreply.github.com>",
|
|
14
11
|
"files": [
|
|
15
12
|
"dist"
|
|
16
13
|
],
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"test": "jest --coverage",
|
|
24
|
-
"start": "rollup -c rollup.config.js -w",
|
|
25
|
-
"build": "tsc && rollup -c rollup.config.js",
|
|
26
|
-
"test:watch": "jest --coverage --watch",
|
|
27
|
-
"semantic-release": "semantic-release"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"react": ">=18",
|
|
31
|
-
"react-dom": ">=18"
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
19
|
+
"tailwindcss": "^4.1.17"
|
|
32
20
|
},
|
|
33
21
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@testing-library/
|
|
42
|
-
"@
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"@types/react": "^
|
|
45
|
-
"@types/react-dom": "^
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
59
|
-
"eslint-plugin-standard": "^5.0.0",
|
|
60
|
-
"husky": "^8.0.3",
|
|
61
|
-
"identity-obj-proxy": "^3.0.0",
|
|
62
|
-
"jest": "^29.7.0",
|
|
63
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
64
|
-
"postcss": "^8.4.33",
|
|
65
|
-
"prettier": "^3.2.2",
|
|
66
|
-
"react": "^18.2.0",
|
|
67
|
-
"react-dom": "^18.2.0",
|
|
68
|
-
"rollup": "^4.9.5",
|
|
69
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
70
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
71
|
-
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
72
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
73
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
74
|
-
"semantic-release": "^23.0.0",
|
|
75
|
-
"ts-jest": "^29.1.1",
|
|
76
|
-
"typescript": "^5.3.3"
|
|
22
|
+
"@biomejs/biome": "2.2.3",
|
|
23
|
+
"@fontsource/geist-sans": "^5.2.5",
|
|
24
|
+
"@stryker-mutator/core": "^9.4.0",
|
|
25
|
+
"@stryker-mutator/typescript-checker": "^9.4.0",
|
|
26
|
+
"@stryker-mutator/vitest-runner": "^9.4.0",
|
|
27
|
+
"@commitlint/cli": "^19.8.1",
|
|
28
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
29
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
30
|
+
"@testing-library/react": "^16.3.0",
|
|
31
|
+
"@types/node": "^24.3.1",
|
|
32
|
+
"@types/react": "^19.1.3",
|
|
33
|
+
"@types/react-dom": "^19.1.4",
|
|
34
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
35
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
36
|
+
"git-cliff": "^2.10.1",
|
|
37
|
+
"happy-dom": "^17.4.6",
|
|
38
|
+
"husky": "^9.1.7",
|
|
39
|
+
"lint-staged": "^16.1.6",
|
|
40
|
+
"react": "^19.1.0",
|
|
41
|
+
"react-dom": "^19.1.0",
|
|
42
|
+
"tsdown": "^0.11.9",
|
|
43
|
+
"typescript": "^5.9.2",
|
|
44
|
+
"vite": "npm:rolldown-vite@latest",
|
|
45
|
+
"vitest": "^3.2.4"
|
|
77
46
|
},
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"release": {
|
|
93
|
-
"branches": [
|
|
94
|
-
"main",
|
|
95
|
-
{
|
|
96
|
-
"name": "beta",
|
|
97
|
-
"prerelease": true
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
"prepare": [
|
|
101
|
-
"@semantic-release/changelog",
|
|
102
|
-
"@semantic-release/npm",
|
|
103
|
-
{
|
|
104
|
-
"path": "@semantic-release/git",
|
|
105
|
-
"assets": [
|
|
106
|
-
"dist/**/*.{js,ts}",
|
|
107
|
-
"package.json",
|
|
108
|
-
"package-lock.json",
|
|
109
|
-
"yarn.lock",
|
|
110
|
-
"CHANGELOG.md"
|
|
111
|
-
],
|
|
112
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538"
|
|
117
|
-
}
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsdown",
|
|
49
|
+
"dev": "tsdown --watch",
|
|
50
|
+
"test": "vitest",
|
|
51
|
+
"test-mutations": "stryker run",
|
|
52
|
+
"playground": "vite --config playground/vite.config.ts",
|
|
53
|
+
"cov": "vitest run --coverage --passWithNoTests",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"lint": "pnpm exec biome lint --write",
|
|
56
|
+
"format": "pnpm exec biome format --write",
|
|
57
|
+
"check": "pnpm run typecheck && pnpm exec biome check --write",
|
|
58
|
+
"check:ci": "pnpm run typecheck && pnpm exec biome check"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/dist/index.es.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{memo as t,useRef as r,useEffect as n,useCallback as a}from"react";var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var i=function(e,t){void 0===t&&(t=1),"#"===e[0]&&(e=e.slice(1));var r=parseInt(e,16),n=r>>8&255,a=255&r;return"rgba(".concat(r>>16&255,", ").concat(n,", ").concat(a,", ").concat(t,")")},c=t((function(t){var c=t.amplitude,u=void 0===c?20:c,l=t.colors,p=void 0===l?["#436EDB"]:l,h=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(t,["amplitude","colors"]),f=r(u),d=r(null),s=r(u);n((function(){s.current=u}),[u]);var v=a((function(e,t,r,n,a){void 0===a&&(a=0),e.strokeStyle=n,e.beginPath();for(var o=0;o<e.canvas.width;o++){var i=Math.sin(Math.PI*(o/e.canvas.width)),c=Math.pow(i,6),u=t*Math.sin(r*o+a)*c;e.lineTo(o,e.canvas.height/2+u)}e.stroke()}),[]);return n((function(){var e,t=d.current,r=t.getContext("2d"),n=t.parentElement;n&&(t.width=n.clientWidth);var a=function(){var n,o,c=.0015*Date.now();f.current=(n=f.current,o=s.current,n+.1*(o-n));var u=f.current*(1+.05*Math.sin(c));r.clearRect(0,0,t.width,t.height);for(var l=function(e){var n=r.createLinearGradient(0,0,t.width,t.height),a=p.length>1?1/(p.length-1):0;p.forEach((function(t,r){n.addColorStop(a*r,i(t,e.alpha))})),v(r,e.amplitude,e.frequency,n,Date.now()*e.speed);for(var o=function(n){var a=e.amplitude-.1*n,o=e.frequency+25e-5*n,c=.6*e.alpha-.01*n,u=r.createLinearGradient(0,0,t.width,t.height),l=p.length>1?1/(p.length-1):0;p.forEach((function(e,t){u.addColorStop(l*t,i(e,c))})),v(r,a,o,u,Date.now()*e.speed+.015*n)},c=0;c<30;c++)o(c)},h=0,d=[{amplitude:u,frequency:.02,alpha:.6,speed:.001},{amplitude:.6*u,frequency:.03,alpha:.4,speed:.004},{amplitude:.3*u,frequency:.04,alpha:.2,speed:.007}];h<d.length;h++){l(d[h])}e=requestAnimationFrame(a)};return a(),function(){cancelAnimationFrame(e)}}),[p,v]),e.createElement("canvas",o({ref:d,width:"100%",height:"auto"},h))}));export{c as default};
|
|
2
|
-
//# sourceMappingURL=index.es.js.map
|
package/dist/index.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var r=function(e,t){void 0===t&&(t=1),"#"===e[0]&&(e=e.slice(1));var r=parseInt(e,16),n=r>>8&255,a=255&r;return"rgba(".concat(r>>16&255,", ").concat(n,", ").concat(a,", ").concat(t,")")},n=e.memo((function(n){var a=n.amplitude,o=void 0===a?20:a,c=n.colors,i=void 0===c?["#436EDB"]:c,u=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(n,["amplitude","colors"]),l=e.useRef(o),f=e.useRef(null),p=e.useRef(o);e.useEffect((function(){p.current=o}),[o]);var h=e.useCallback((function(e,t,r,n,a){void 0===a&&(a=0),e.strokeStyle=n,e.beginPath();for(var o=0;o<e.canvas.width;o++){var c=Math.sin(Math.PI*(o/e.canvas.width)),i=Math.pow(c,6),u=t*Math.sin(r*o+a)*i;e.lineTo(o,e.canvas.height/2+u)}e.stroke()}),[]);return e.useEffect((function(){var e,t=f.current,n=t.getContext("2d"),a=t.parentElement;a&&(t.width=a.clientWidth);var o=function(){var a,c,u=.0015*Date.now();l.current=(a=l.current,c=p.current,a+.1*(c-a));var f=l.current*(1+.05*Math.sin(u));n.clearRect(0,0,t.width,t.height);for(var s=function(e){var a=n.createLinearGradient(0,0,t.width,t.height),o=i.length>1?1/(i.length-1):0;i.forEach((function(t,n){a.addColorStop(o*n,r(t,e.alpha))})),h(n,e.amplitude,e.frequency,a,Date.now()*e.speed);for(var c=function(a){var o=e.amplitude-.1*a,c=e.frequency+25e-5*a,u=.6*e.alpha-.01*a,l=n.createLinearGradient(0,0,t.width,t.height),f=i.length>1?1/(i.length-1):0;i.forEach((function(e,t){l.addColorStop(f*t,r(e,u))})),h(n,o,c,l,Date.now()*e.speed+.015*a)},u=0;u<30;u++)c(u)},d=0,v=[{amplitude:f,frequency:.02,alpha:.6,speed:.001},{amplitude:.6*f,frequency:.03,alpha:.4,speed:.004},{amplitude:.3*f,frequency:.04,alpha:.2,speed:.007}];d<v.length;d++){s(v[d])}e=requestAnimationFrame(o)};return o(),function(){cancelAnimationFrame(e)}}),[i,h]),e.createElement("canvas",t({ref:f,width:"100%",height:"auto"},u))}));module.exports=n;
|
|
2
|
-
//# sourceMappingURL=index.min.js.map
|