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/package.json CHANGED
@@ -1,117 +1,60 @@
1
1
  {
2
2
  "name": "react-animated-waves",
3
- "version": "1.0.3",
4
- "description": "A React component for creating beautiful audio visualizations or UI loading states using animated waves",
5
- "main": "dist/index.min.js",
6
- "module": "dist/index.es.js",
7
- "types": "dist/index.d.ts",
8
- "keywords": [
9
- "reactjs",
10
- "audio-visualization",
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
- "author": "Rohit Agrawal <https://github.com/agrawal-rohit>",
18
- "repository": "https://github.com/agrawal-rohit/react-animated-waves.git",
19
- "homepage": "https://github.com/agrawal-rohit/react-animated-waves.git",
20
- "license": "MIT",
21
- "scripts": {
22
- "cz": "git-cz",
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
- "@rollup/plugin-commonjs": "^25.0.7",
35
- "@rollup/plugin-json": "^6.1.0",
36
- "@rollup/plugin-node-resolve": "^15.2.3",
37
- "@rollup/plugin-typescript": "^11.1.6",
38
- "@semantic-release/changelog": "^6.0.3",
39
- "@semantic-release/git": "^10.0.1",
40
- "@testing-library/jest-dom": "^6.2.0",
41
- "@testing-library/react": "^14.1.2",
42
- "@types/jest": "^29.5.11",
43
- "@types/node": "^20.11.1",
44
- "@types/react": "^18.2.48",
45
- "@types/react-dom": "^18.2.18",
46
- "@typescript-eslint/eslint-plugin": "^6.18.1",
47
- "@typescript-eslint/parser": "^6.18.1",
48
- "commitizen": "^4.3.0",
49
- "cz-conventional-changelog": "^3.3.0",
50
- "eslint": "^8.56.0",
51
- "eslint-config-prettier": "^9.1.0",
52
- "eslint-config-standard": "^17.1.0",
53
- "eslint-plugin-import": "^2.29.1",
54
- "eslint-plugin-n": "^16.6.2",
55
- "eslint-plugin-prettier": "^5.1.3",
56
- "eslint-plugin-promise": "^6.1.1",
57
- "eslint-plugin-react": "^7.33.2",
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
- "config": {
79
- "commitizen": {
80
- "path": "./node_modules/cz-conventional-changelog"
81
- }
82
- },
83
- "eslintIgnore": [
84
- "node_modules/",
85
- "dist/"
86
- ],
87
- "husky": {
88
- "hooks": {
89
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
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