react-animated-waves 1.0.2 → 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 CHANGED
@@ -1,21 +1,18 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 - PRESENT Rohit Agrawal
3
+ Copyright (c) 2025 Rohit Agrawal
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
11
10
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
14
13
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,49 +1,42 @@
1
1
  <div align="center">
2
- <h2>React Animated Waves</h2>
3
- <p align="center" style="width: 80%; margin: auto">
4
- <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/agrawal-rohit/react-animated-waves/Publish.yml">
5
- <img alt="Codacy coverage" src="https://img.shields.io/codacy/coverage/09220ab3d193472ba76d1ad50f11ee51">
6
- <img alt="npm" src="https://img.shields.io/npm/dw/react-animated-waves">
7
- <img alt="Licence" src="https://img.shields.io/github/license/agrawal-rohit/react-animated-waves">
8
- </p>
9
- <sup align="center" style="width: 80%; margin: auto; font-size: 0.1rem !important;">
10
- (Planning to create your own NPM library? Check out my <a href="https://github.com/agrawal-rohit/npm-library-template">NPM library template</a> to kickstart your library development with best practices)
11
- </sup>
2
+ <h2>React Animated Waves</h2>
12
3
  </div>
13
4
 
14
- <br /><br />
5
+ <div align="center">
6
+ <p align="center" style="width: 80%; margin: auto">
7
+ <a href="https://github.com/agrawal-rohit/grimoire"><img alt="Made with Grimoire" src="https://img.shields.io/badge/made_with-grimoire-7452A3"></a>
8
+ <img alt="Status" src="https://img.shields.io/github/actions/workflow/status/agrawal-rohit/react-animated-waves/ci.yml">
9
+ <img alt="Sonar Coverage" src="https://img.shields.io/sonar/coverage/agrawal-rohit_react-animated-waves?server=https%3A%2F%2Fsonarcloud.io">
10
+ <img alt="Downloads" src="https://img.shields.io/npm/dt/react-animated-waves">
11
+ <img alt="NPM bundle size" src="https://img.shields.io/bundlephobia/min/react-animated-waves">
12
+ <img alt="License" src="https://img.shields.io/github/license/agrawal-rohit/react-animated-waves" />
13
+ </p>
15
14
 
16
- ![Aug-24-2024 22-55-33](https://github.com/user-attachments/assets/348b84bf-d2f8-406b-a162-e0a480c9e273)
15
+ [Installation](#installation) • [Demo](#demo) • [Usage](#usage) • [Contributing](#contributing) • [License](#license)
17
16
 
18
- A lightweight and customizable React component that creates stunning animated wave effects. Perfect for enhancing audio visualizations, adding dynamic loading states, or creating eye-catching UI elements in your React apps.
17
+ <img src="https://cdn.rohit.build/oss/react-animated-waves/github-readme-preview.gif" alt="Preview" style="width: 80%; margin: auto" />
19
18
 
20
- ## Table of Contents
19
+ </div>
21
20
 
22
- 1. [Installation](#installation)
23
- 2. [Usage](#usage)
24
- 3. [Props](#props)
25
- 4. [Contributing](#contributing)
26
- 5. [License](#license)
21
+ <br />
27
22
 
28
- ## Installation
23
+ `react-animated-waves` is an opinionated canvas-based React component for displaying wave animations. The colors and strength of the wave animations can be customized to support dynamic UIs such as audio visualizations, voice UIs, progress loaders, etc.
29
24
 
30
- **React Animated Waves** can be installed using either npm or yarn:
25
+ ## Installation
31
26
 
32
- **Using npm:**
27
+ `react-animated-waves` can be installed using [npm](https://www.npmjs.com/) (or your favorite package manager):
33
28
 
34
29
  ```bash
35
- npm install --save react-animated-waves
30
+ $ npm install react-animated-waves
36
31
  ```
37
32
 
38
- **Using yarn:**
33
+ ## Demo
39
34
 
40
- ```bash
41
- yarn add react-animated-waves
42
- ```
35
+ Check out an interactive demo [here](https://codesandbox.io/p/sandbox/react-animated-waves-example-6z9hlh).
43
36
 
44
37
  ## Usage
45
38
 
46
- Import the `Waves` component from the library and use it in your React app. Check out an interactive demo [here](https://codesandbox.io/p/sandbox/react-animated-waves-example-6z9hlh).
39
+ Import the `Waves` component from `react-animated-waves` and use it in your React app as follows:
47
40
 
48
41
  ```jsx
49
42
  import Waves from "react-animated-waves";
@@ -51,19 +44,19 @@ import Waves from "react-animated-waves";
51
44
  <Waves amplitude={20} colors={["#FF6AC6", "#436EDB", "#FF6AC6"]} />;
52
45
  ```
53
46
 
54
- ## Props
47
+ ### Props
55
48
 
56
49
  The `Waves` component accepts the following props:
57
50
 
58
51
  | Prop | Description | Default |
59
52
  | ----------- | --------------------------------------------------------------------------- | ------------- |
60
- | `amplitude` | Defines the height of the waveform. Higher values result in taller waves. | `20` |
61
- | `colors` | An array of colors used to create a linear gradient effect on the waveform. | `['#436EDB']` |
53
+ | `amplitude` | Defines the strength of the waveform. Higher values result in taller waves. | `20` |
54
+ | `colors` | An array of hex colors used to create a linear gradient effect on the waveform. | `['#436EDB']` |
62
55
 
63
56
  ## Contributing
64
57
 
65
- All contributions from the community are welcome. Please read the [contributing guide](CONTRIBUTING.md) for more information.
58
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to report issues, propose changes, and submit pull requests.
66
59
 
67
60
  ## License
68
61
 
69
- [MIT License](LICENSE).
62
+ [MIT](LICENSE) © [Rohit Agrawal](https://github.com/agrawal-rohit)
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
- import React from "react";
1
+ import * as react0 from "react";
2
+
3
+ //#region src/waves.d.ts
2
4
  type WavesProps = React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement> & {
3
- /** The colors for the waveform */
4
- colors?: string[];
5
- /** The amplitude of the waveform */
6
- amplitude?: number;
5
+ /** The colors for the waveform */
6
+ colors?: string[];
7
+ /** The amplitude of the waveform */
8
+ amplitude?: number;
7
9
  };
8
- declare const _default: React.NamedExoticComponent<WavesProps>;
9
- export default _default;
10
- //# sourceMappingURL=index.d.ts.map
10
+ declare const Waves: react0.NamedExoticComponent<WavesProps>;
11
+ //#endregion
12
+ export { Waves };