@revrag-ai/embed-react-native 1.0.5 → 1.0.7

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 (94) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -382
  3. package/android/CMakeLists.txt +15 -0
  4. package/android/build.gradle +77 -25
  5. package/android/cpp-adapter.cpp +8 -0
  6. package/android/generated/java/com/revragai/embedreactnative/NativeEmbedReactNativeSpec.java +37 -0
  7. package/android/generated/jni/CMakeLists.txt +49 -0
  8. package/android/generated/jni/RNEmbedReactNativeSpec-generated.cpp +32 -0
  9. package/android/generated/jni/RNEmbedReactNativeSpec.h +31 -0
  10. package/android/generated/jni/react/renderer/components/RNEmbedReactNativeSpec/RNEmbedReactNativeSpecJSI-generated.cpp +28 -0
  11. package/android/generated/jni/react/renderer/components/RNEmbedReactNativeSpec/RNEmbedReactNativeSpecJSI.h +67 -0
  12. package/android/gradle.properties +5 -5
  13. package/cpp/revrag-ai-embed-react-native.cpp +7 -0
  14. package/cpp/revrag-ai-embed-react-native.h +8 -0
  15. package/ios/EmbedReactNative.h +9 -0
  16. package/ios/{Onwid.mm → EmbedReactNative.mm} +4 -4
  17. package/ios/generated/RNEmbedReactNativeSpec/RNEmbedReactNativeSpec-generated.mm +29 -0
  18. package/ios/generated/RNEmbedReactNativeSpec/RNEmbedReactNativeSpec.h +50 -0
  19. package/ios/generated/RNEmbedReactNativeSpecJSI-generated.cpp +28 -0
  20. package/ios/generated/RNEmbedReactNativeSpecJSI.h +67 -0
  21. package/lib/commonjs/NativeEmbedReactNative.js +9 -0
  22. package/lib/commonjs/api/api.js +256 -0
  23. package/lib/commonjs/api/types/embed.api.types.js +2 -0
  24. package/lib/commonjs/components/Embed/EmbedAudioWave.js +157 -0
  25. package/lib/commonjs/components/Embed/EmbedButton.js +511 -0
  26. package/lib/commonjs/components/Embed/EmbedVoice.js +131 -0
  27. package/lib/commonjs/components/styles/EmbedButton.style.js +248 -0
  28. package/lib/commonjs/events/embed.event.js +74 -0
  29. package/lib/commonjs/hooks/initialize.js +102 -0
  30. package/lib/commonjs/hooks/initialize.livekit.js +20 -0
  31. package/lib/commonjs/hooks/types/initialize.types.js +2 -0
  32. package/lib/commonjs/hooks/types/voiceAgent.types.js +6 -0
  33. package/lib/commonjs/hooks/voiceagent.js +358 -0
  34. package/lib/commonjs/index.js +34 -0
  35. package/lib/commonjs/index.types.js +22 -0
  36. package/lib/commonjs/store/store.key.js +46 -0
  37. package/lib/commonjs/utils/reanimated.helper.js +100 -0
  38. package/lib/module/NativeEmbedReactNative.js +5 -0
  39. package/lib/module/api/api.js +248 -0
  40. package/lib/module/api/types/embed.api.types.js +2 -0
  41. package/lib/module/components/Embed/EmbedAudioWave.js +152 -0
  42. package/lib/module/components/Embed/EmbedButton.js +506 -0
  43. package/lib/module/components/Embed/EmbedVoice.js +127 -0
  44. package/lib/module/components/styles/EmbedButton.style.js +243 -0
  45. package/lib/module/events/embed.event.js +70 -0
  46. package/lib/module/hooks/initialize.js +79 -75
  47. package/lib/module/hooks/{initializelivekit.js → initialize.livekit.js} +7 -4
  48. package/lib/module/hooks/types/initialize.types.js +2 -0
  49. package/lib/module/hooks/types/voiceAgent.types.js +4 -0
  50. package/lib/module/hooks/voiceagent.js +353 -0
  51. package/lib/module/index.js +6 -60
  52. package/lib/module/index.types.js +23 -0
  53. package/lib/module/store/store.key.js +38 -0
  54. package/lib/module/utils/reanimated.helper.js +94 -0
  55. package/lib/typescript/commonjs/package.json +1 -0
  56. package/lib/typescript/module/package.json +1 -0
  57. package/package.json +69 -27
  58. package/react-native.config.js +8 -14
  59. package/revrag-ai-embed-react-native.podspec +41 -0
  60. package/Onwid.podspec +0 -20
  61. package/ios/Onwid.h +0 -5
  62. package/lib/index.d.ts +0 -77
  63. package/lib/module/Event/onwid.js +0 -74
  64. package/lib/module/NativeOnwid.js +0 -4
  65. package/lib/module/component/OnwidButton.js +0 -366
  66. package/lib/module/component/audiowave.js +0 -137
  67. package/lib/module/component/voice.js +0 -103
  68. package/lib/module/hooks/initialize.types.js +0 -2
  69. package/lib/module/hooks/voiceAgent.js +0 -334
  70. package/lib/module/hooks/voiceAgent.types.js +0 -2
  71. package/lib/module/onwidApi/api.js +0 -184
  72. package/lib/module/onwidApi/api.types.js +0 -2
  73. package/lib/module/store.key.js +0 -47
  74. package/lib/module/style/onwidButton.style.js +0 -230
  75. package/lib/module/utils/reanimatedHelpers.js +0 -87
  76. package/lib/module/utils/utils.js +0 -1
  77. package/lib/typescript/Event/onwid.d.ts +0 -13
  78. package/lib/typescript/NativeOnwid.d.ts +0 -6
  79. package/lib/typescript/component/OnwidButton.d.ts +0 -28
  80. package/lib/typescript/component/audiowave.d.ts +0 -6
  81. package/lib/typescript/component/voice.d.ts +0 -15
  82. package/lib/typescript/hooks/initialize.d.ts +0 -2
  83. package/lib/typescript/hooks/initialize.types.d.ts +0 -5
  84. package/lib/typescript/hooks/initializelivekit.d.ts +0 -3
  85. package/lib/typescript/hooks/voiceAgent.d.ts +0 -2
  86. package/lib/typescript/hooks/voiceAgent.types.d.ts +0 -16
  87. package/lib/typescript/index.d.ts +0 -27
  88. package/lib/typescript/onwidApi/api.d.ts +0 -53
  89. package/lib/typescript/onwidApi/api.types.d.ts +0 -21
  90. package/lib/typescript/store.key.d.ts +0 -3
  91. package/lib/typescript/style/onwidButton.style.d.ts +0 -98
  92. package/lib/typescript/utils/reanimatedHelpers.d.ts +0 -29
  93. package/lib/typescript/utils/utils.d.ts +0 -0
  94. package/scripts/verify-setup.js +0 -90
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Onwid Setup Verification Script
5
- * Run this script to verify that all dependencies are properly installed and configured.
6
- */
7
-
8
- const fs = require('fs');
9
- const path = require('path');
10
-
11
- console.log('🔍 Verifying Onwid setup...\n');
12
-
13
- let hasErrors = false;
14
-
15
- // Check if react-native-reanimated is installed
16
- try {
17
- const packageJson = require(path.join(process.cwd(), 'package.json'));
18
- const dependencies = { ...packageJson.dependencies, ...packageJson.devDependencies };
19
-
20
- if (dependencies['react-native-reanimated']) {
21
- console.log('✅ react-native-reanimated is installed:', dependencies['react-native-reanimated']);
22
- } else {
23
- console.log('❌ react-native-reanimated is not installed');
24
- console.log(' Fix: npm install react-native-reanimated');
25
- hasErrors = true;
26
- }
27
- } catch (error) {
28
- console.log('❌ Cannot read package.json');
29
- hasErrors = true;
30
- }
31
-
32
- // Check babel.config.js
33
- const babelConfigPath = path.join(process.cwd(), 'babel.config.js');
34
- if (fs.existsSync(babelConfigPath)) {
35
- try {
36
- const babelConfig = fs.readFileSync(babelConfigPath, 'utf8');
37
- if (babelConfig.includes('react-native-reanimated/plugin')) {
38
- console.log('✅ babel.config.js includes react-native-reanimated plugin');
39
- } else {
40
- console.log('❌ babel.config.js missing react-native-reanimated plugin');
41
- console.log(' Fix: Add "react-native-reanimated/plugin" to your plugins array');
42
- hasErrors = true;
43
- }
44
- } catch (error) {
45
- console.log('❌ Cannot read babel.config.js');
46
- hasErrors = true;
47
- }
48
- } else {
49
- console.log('❌ babel.config.js not found');
50
- hasErrors = true;
51
- }
52
-
53
- // Check other required dependencies
54
- const requiredDeps = [
55
- '@livekit/react-native',
56
- '@livekit/react-native-webrtc',
57
- '@react-native-async-storage/async-storage',
58
- 'lottie-react-native',
59
- 'react-native-gesture-handler',
60
- 'react-native-linear-gradient',
61
- 'react-native-safe-area-context'
62
- ];
63
-
64
- console.log('\n📦 Checking other required dependencies:');
65
- try {
66
- const packageJson = require(path.join(process.cwd(), 'package.json'));
67
- const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies, ...packageJson.peerDependencies };
68
-
69
- requiredDeps.forEach(dep => {
70
- if (allDeps[dep]) {
71
- console.log(`✅ ${dep}: ${allDeps[dep]}`);
72
- } else {
73
- console.log(`⚠️ ${dep}: Not found (should be installed as peer dependency)`);
74
- }
75
- });
76
- } catch (error) {
77
- console.log('❌ Cannot check dependencies');
78
- }
79
-
80
- // Final result
81
- console.log('\n' + '='.repeat(50));
82
- if (hasErrors) {
83
- console.log('❌ Setup has issues. Please fix the errors above.');
84
- console.log('\n📚 For detailed setup instructions, visit:');
85
- console.log(' https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started');
86
- process.exit(1);
87
- } else {
88
- console.log('✅ Setup verification passed!');
89
- console.log('🚀 You should be able to use @revrag-ai/embed-react-native without issues.');
90
- }