react-confetti-burst 1.0.4 → 1.0.6

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.
@@ -0,0 +1,111 @@
1
+ # Contributing to react-confetti-burst
2
+
3
+ Thank you for considering contributing to react-confetti-burst! This document outlines the guidelines for contributing to this project.
4
+
5
+ ## Code of Conduct
6
+
7
+ By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
8
+
9
+ ## Getting Started
10
+
11
+ 1. **Fork the repository** and clone it locally
12
+ 2. **Install dependencies:**
13
+ ```bash
14
+ npm install
15
+ ```
16
+ 3. **Run tests:**
17
+ ```bash
18
+ npm test
19
+ ```
20
+ 4. **Build the project:**
21
+ ```bash
22
+ npm run build
23
+ ```
24
+
25
+ ## Development Workflow
26
+
27
+ ### Branch Naming
28
+
29
+ - `feature/` - New features
30
+ - `fix/` - Bug fixes
31
+ - `docs/` - Documentation changes
32
+ - `refactor/` - Code refactoring
33
+ - `test/` - Test additions or modifications
34
+
35
+ ### Commit Messages
36
+
37
+ Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
38
+
39
+ ```
40
+ type(scope): description
41
+
42
+ [optional body]
43
+
44
+ [optional footer]
45
+ ```
46
+
47
+ Types:
48
+ - `feat` - New feature
49
+ - `fix` - Bug fix
50
+ - `docs` - Documentation
51
+ - `style` - Code style (formatting, etc.)
52
+ - `refactor` - Code refactoring
53
+ - `test` - Tests
54
+ - `chore` - Maintenance tasks
55
+
56
+ ### Code Style
57
+
58
+ - **TypeScript:** All code must be written in TypeScript with strict mode enabled
59
+ - **No any:** Avoid using `any` type; use `unknown` or proper typing
60
+ - **Pure Functions:** Prefer pure functions where possible
61
+ - **Immutability:** Use `readonly` for properties that shouldn't be modified
62
+ - **Documentation:** Add JSDoc comments for public APIs
63
+
64
+ ### Testing
65
+
66
+ - Write tests for all new features and bug fixes
67
+ - Maintain >80% code coverage
68
+ - Run `npm test` before submitting a PR
69
+
70
+ ### Pull Request Process
71
+
72
+ 1. Create a new branch from `main`
73
+ 2. Make your changes
74
+ 3. Add/update tests as needed
75
+ 4. Update documentation if applicable
76
+ 5. Run `npm run lint` and fix any issues
77
+ 6. Run `npm test` and ensure all tests pass
78
+ 7. Submit a pull request with a clear description
79
+
80
+ ## Project Structure
81
+
82
+ ```
83
+ react-confetti-burst/
84
+ ├── src/
85
+ │ ├── index.ts # Main exports
86
+ │ ├── types.ts # TypeScript types
87
+ │ ├── constants.ts # Default values
88
+ │ ├── utils.ts # Utility functions
89
+ │ ├── particle.ts # Particle system
90
+ │ ├── confetti-engine.ts # Canvas animation engine
91
+ │ ├── hooks.ts # React hooks
92
+ │ └── components.tsx # React components
93
+ ├── tests/
94
+ │ ├── setup.ts # Test setup
95
+ │ └── *.test.ts(x) # Test files
96
+ ├── examples/
97
+ │ └── *.tsx # Usage examples
98
+ └── package.json
99
+ ```
100
+
101
+ ## Design Principles
102
+
103
+ 1. **Zero Dependencies:** Use native APIs only
104
+ 2. **TypeScript First:** Full type safety
105
+ 3. **Performance:** Canvas-based rendering, no DOM thrashing
106
+ 4. **SSR Safe:** Handle server-side rendering gracefully
107
+ 5. **Small Bundle:** Keep the package size minimal
108
+
109
+ ## Questions?
110
+
111
+ Feel free to open an issue for any questions or concerns.