react-native-voice-ts 1.0.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.
Files changed (51) hide show
  1. package/.nvmrc +1 -0
  2. package/.prettierrc +5 -0
  3. package/.releaserc +15 -0
  4. package/CONTRIBUTING.md +293 -0
  5. package/LICENSE +21 -0
  6. package/MIGRATION_SUMMARY.md +510 -0
  7. package/README.md +576 -0
  8. package/android/build.gradle +126 -0
  9. package/android/gradle.properties +5 -0
  10. package/android/src/main/AndroidManifest.xml +8 -0
  11. package/android/src/main/VoiceSpec.kt +55 -0
  12. package/android/src/main/java/com/wenkesj/voice/Voice.kt +343 -0
  13. package/android/src/main/java/com/wenkesj/voice/VoiceModule.kt +63 -0
  14. package/android/src/main/java/com/wenkesj/voice/VoicePackage.kt +35 -0
  15. package/android/src/newarch/VoiceSpec.kt +55 -0
  16. package/android/src/oldarch/VoiceSpec.kt +30 -0
  17. package/app.plugin.js +1 -0
  18. package/dist/NativeVoiceAndroid.d.ts +22 -0
  19. package/dist/NativeVoiceAndroid.d.ts.map +1 -0
  20. package/dist/NativeVoiceAndroid.js +3 -0
  21. package/dist/NativeVoiceAndroid.js.map +1 -0
  22. package/dist/NativeVoiceIOS.d.ts +18 -0
  23. package/dist/NativeVoiceIOS.d.ts.map +1 -0
  24. package/dist/NativeVoiceIOS.js +3 -0
  25. package/dist/NativeVoiceIOS.js.map +1 -0
  26. package/dist/VoiceModuleTypes.d.ts +54 -0
  27. package/dist/VoiceModuleTypes.d.ts.map +1 -0
  28. package/dist/VoiceModuleTypes.js +2 -0
  29. package/dist/VoiceModuleTypes.js.map +1 -0
  30. package/dist/VoiceUtilTypes.d.ts +43 -0
  31. package/dist/VoiceUtilTypes.d.ts.map +1 -0
  32. package/dist/VoiceUtilTypes.js +8 -0
  33. package/dist/VoiceUtilTypes.js.map +1 -0
  34. package/dist/index.d.ts +72 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +395 -0
  37. package/dist/index.js.map +1 -0
  38. package/ios/Voice/Voice.h +14 -0
  39. package/ios/Voice/Voice.mm +672 -0
  40. package/ios/Voice.xcodeproj/project.pbxproj +272 -0
  41. package/ios/Voice.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  42. package/package.json +101 -0
  43. package/plugin/build/withVoice.d.ts +13 -0
  44. package/plugin/build/withVoice.js +47 -0
  45. package/plugin/tsconfig.tsbuildinfo +1 -0
  46. package/react-native-voice.podspec +46 -0
  47. package/src/NativeVoiceAndroid.ts +28 -0
  48. package/src/NativeVoiceIOS.ts +24 -0
  49. package/src/VoiceModuleTypes.ts +64 -0
  50. package/src/VoiceUtilTypes.ts +46 -0
  51. package/src/index.ts +500 -0
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ lts/fermium
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "all"
5
+ }
package/.releaserc ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "plugins": [
3
+ "@semantic-release/commit-analyzer",
4
+ "@semantic-release/release-notes-generator",
5
+ "@semantic-release/npm",
6
+ "@semantic-release/github",
7
+ [
8
+ "@semantic-release/git",
9
+ {
10
+ "assets": "package.json",
11
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
12
+ }
13
+ ]
14
+ ]
15
+ }
@@ -0,0 +1,293 @@
1
+ # Contributing to React Native Voice
2
+
3
+ Thank you for your interest in contributing to React Native Voice! This document provides guidelines and instructions for contributing to the project.
4
+
5
+ ## ๐Ÿค Code of Conduct
6
+
7
+ By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others.
8
+
9
+ ## ๐Ÿ› Reporting Bugs
10
+
11
+ Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include:
12
+
13
+ - **Clear title and description**
14
+ - **Steps to reproduce** the issue
15
+ - **Expected behavior** vs actual behavior
16
+ - **Screenshots** (if applicable)
17
+ - **Environment details**:
18
+ - React Native version
19
+ - Device/Emulator and OS version
20
+ - Package version
21
+ - Any relevant configuration
22
+
23
+ ### Bug Report Template
24
+
25
+ ```markdown
26
+ **Describe the bug**
27
+ A clear description of what the bug is.
28
+
29
+ **To Reproduce**
30
+ Steps to reproduce the behavior:
31
+
32
+ 1. Go to '...'
33
+ 2. Click on '....'
34
+ 3. See error
35
+
36
+ **Expected behavior**
37
+ What you expected to happen.
38
+
39
+ **Screenshots**
40
+ If applicable, add screenshots.
41
+
42
+ **Environment:**
43
+
44
+ - Device: [e.g. iPhone 15, Samsung Galaxy S24]
45
+ - OS: [e.g. iOS 17.2, Android 14]
46
+ - React Native Version: [e.g. 0.76.9]
47
+ - Package Version: [e.g. 3.2.4]
48
+
49
+ **Additional context**
50
+ Any other context about the problem.
51
+ ```
52
+
53
+ ## ๐Ÿ’ก Suggesting Features
54
+
55
+ Feature suggestions are welcome! Before creating a feature request:
56
+
57
+ 1. Check if the feature already exists
58
+ 2. Search existing feature requests
59
+ 3. Provide a clear use case and rationale
60
+ 4. Consider backward compatibility
61
+
62
+ ### Feature Request Template
63
+
64
+ ```markdown
65
+ **Is your feature request related to a problem?**
66
+ A clear description of the problem.
67
+
68
+ **Describe the solution you'd like**
69
+ A clear description of what you want to happen.
70
+
71
+ **Describe alternatives you've considered**
72
+ Alternative solutions or features you've considered.
73
+
74
+ **Additional context**
75
+ Any other context, screenshots, or examples.
76
+ ```
77
+
78
+ ## ๐Ÿ”ง Development Setup
79
+
80
+ ### Prerequisites
81
+
82
+ - Node.js (>= 18.x)
83
+ - Yarn package manager
84
+ - React Native development environment set up
85
+ - Xcode (for iOS development)
86
+ - Android Studio (for Android development)
87
+
88
+ ### Installation
89
+
90
+ 1. Fork the repository
91
+ 2. Clone your fork:
92
+
93
+ ```bash
94
+ git clone https://github.com/YOUR_USERNAME/react-native-voice-ts.git
95
+ cd react-native-voice-ts
96
+ ```
97
+
98
+ 3. Install dependencies:
99
+
100
+ ```bash
101
+ yarn install
102
+ ```
103
+
104
+ 4. Set up the example project:
105
+
106
+ ```bash
107
+ cd example
108
+ yarn install
109
+ cd ios && pod install && cd ..
110
+ ```
111
+
112
+ ### Running the Example
113
+
114
+ **iOS:**
115
+
116
+ ```bash
117
+ cd example
118
+ yarn ios
119
+ ```
120
+
121
+ **Android:**
122
+
123
+ ```bash
124
+ cd example
125
+ yarn android
126
+ ```
127
+
128
+ ## ๐Ÿ“ Pull Request Process
129
+
130
+ 1. **Create a branch** from `main`:
131
+
132
+ ```bash
133
+ git checkout -b feature/your-feature-name
134
+ # or
135
+ git checkout -b fix/your-bug-fix
136
+ ```
137
+
138
+ 2. **Make your changes** following our coding standards
139
+
140
+ 3. **Write or update tests** if applicable
141
+
142
+ 4. **Update documentation** if you changed any public APIs
143
+
144
+ 5. **Run linting and formatting**:
145
+
146
+ ```bash
147
+ yarn lint
148
+ yarn format
149
+ ```
150
+
151
+ 6. **Build the project** to ensure no errors:
152
+
153
+ ```bash
154
+ yarn build
155
+ ```
156
+
157
+ 7. **Test thoroughly** on both iOS and Android
158
+
159
+ 8. **Commit your changes** using conventional commits:
160
+
161
+ ```bash
162
+ git commit -m "feat: add new feature"
163
+ # or
164
+ git commit -m "fix: resolve issue with X"
165
+ ```
166
+
167
+ 9. **Push to your fork**:
168
+
169
+ ```bash
170
+ git push origin feature/your-feature-name
171
+ ```
172
+
173
+ 10. **Create a Pull Request** with:
174
+ - Clear title and description
175
+ - Reference to related issues
176
+ - Screenshots/videos for UI changes
177
+ - Test results on both platforms
178
+
179
+ ### Commit Message Guidelines
180
+
181
+ We follow [Conventional Commits](https://www.conventionalcommits.org/):
182
+
183
+ - `feat:` New feature
184
+ - `fix:` Bug fix
185
+ - `docs:` Documentation changes
186
+ - `style:` Code style changes (formatting, etc.)
187
+ - `refactor:` Code refactoring
188
+ - `perf:` Performance improvements
189
+ - `test:` Adding or updating tests
190
+ - `chore:` Build process or auxiliary tool changes
191
+
192
+ Examples:
193
+
194
+ ```
195
+ feat: add volume monitoring callback
196
+ fix: resolve Android permission crash
197
+ docs: update API reference for new methods
198
+ perf: optimize event listener cleanup
199
+ ```
200
+
201
+ ## ๐ŸŽจ Coding Standards
202
+
203
+ ### TypeScript
204
+
205
+ - Use TypeScript for all new code
206
+ - Properly type all functions and variables
207
+ - Avoid `any` types when possible
208
+ - Export types for public APIs
209
+
210
+ ### Code Style
211
+
212
+ - Use 2 spaces for indentation
213
+ - Use semicolons
214
+ - Use single quotes for strings
215
+ - Follow existing code patterns
216
+ - Keep functions small and focused
217
+
218
+ ### File Structure
219
+
220
+ ```
221
+ src/
222
+ โ”œโ”€โ”€ index.ts # Main export file
223
+ โ”œโ”€โ”€ VoiceModuleTypes.ts # Type definitions
224
+ โ”œโ”€โ”€ NativeVoiceIOS.ts # iOS native module
225
+ โ””โ”€โ”€ NativeVoiceAndroid.ts # Android native module
226
+ ```
227
+
228
+ ## ๐Ÿงช Testing
229
+
230
+ ### Manual Testing
231
+
232
+ Test your changes on:
233
+
234
+ - โœ… iOS (physical device preferred)
235
+ - โœ… Android (physical device preferred)
236
+ - โœ… Different React Native versions (if applicable)
237
+ - โœ… Different OS versions
238
+
239
+ ### Checklist
240
+
241
+ - [ ] Code follows the project's style guidelines
242
+ - [ ] Self-review of code completed
243
+ - [ ] Comments added for complex code
244
+ - [ ] Documentation updated
245
+ - [ ] No new warnings generated
246
+ - [ ] Tested on iOS
247
+ - [ ] Tested on Android
248
+ - [ ] Breaking changes documented
249
+
250
+ ## ๐Ÿ“š Documentation
251
+
252
+ When adding or modifying features:
253
+
254
+ 1. **Update README.md** with API changes
255
+ 2. **Add examples** to EXAMPLES.md
256
+ 3. **Update TypeScript definitions**
257
+ 4. **Document breaking changes** in CHANGELOG.md
258
+
259
+ ## ๐Ÿ” Review Process
260
+
261
+ 1. Maintainers will review your PR
262
+ 2. Address any feedback or requested changes
263
+ 3. Once approved, your PR will be merged
264
+ 4. Your contribution will be included in the next release
265
+
266
+ ## ๐Ÿ“ฆ Release Process
267
+
268
+ Releases are managed by maintainers:
269
+
270
+ 1. Version bump following semantic versioning
271
+ 2. Update CHANGELOG.md
272
+ 3. Create GitHub release
273
+ 4. Publish to npm
274
+
275
+ ## ๐Ÿ™‹ Getting Help
276
+
277
+ - **Questions?** Open a [Discussion](https://github.com/noorjsdivs/react-native-voice-ts/discussions)
278
+ - **Issues?** Create an [Issue](https://github.com/noorjsdivs/react-native-voice-ts/issues)
279
+ - **Security concerns?** Email noor.jsdivs@gmail.com
280
+
281
+ ## ๐Ÿ† Recognition
282
+
283
+ Contributors will be recognized in:
284
+
285
+ - Release notes
286
+ - Contributors section
287
+ - Project documentation
288
+
289
+ Thank you for contributing to React Native Voice! ๐ŸŽ‰
290
+
291
+ ## ๐Ÿ“„ License
292
+
293
+ By contributing, you agree that your contributions will be licensed under the MIT License.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Noor Mohammad
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:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
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.