react-native-srschat 0.1.81 → 0.1.85

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 (59) hide show
  1. package/lib/commonjs/components/email.js +4 -8
  2. package/lib/commonjs/components/email.js.map +1 -1
  3. package/lib/commonjs/components/productCard.js +91 -86
  4. package/lib/commonjs/components/productCard.js.map +1 -1
  5. package/lib/commonjs/components/welcomeButton.js +4 -4
  6. package/lib/commonjs/components/welcomeButton.js.map +1 -1
  7. package/lib/commonjs/contexts/AppContext.js +46 -45
  8. package/lib/commonjs/contexts/AppContext.js.map +1 -1
  9. package/lib/commonjs/hooks/Stream.js +399 -74
  10. package/lib/commonjs/hooks/Stream.js.map +1 -1
  11. package/lib/commonjs/layout/disclaimer.js +36 -32
  12. package/lib/commonjs/layout/disclaimer.js.map +1 -1
  13. package/lib/commonjs/layout/welcome.js +8 -7
  14. package/lib/commonjs/layout/welcome.js.map +1 -1
  15. package/lib/commonjs/layout/window.js +152 -131
  16. package/lib/commonjs/layout/window.js.map +1 -1
  17. package/lib/commonjs/utils/audioRecorder.js.map +1 -1
  18. package/lib/commonjs/utils/storage.js +1 -1
  19. package/lib/module/components/email.js +4 -8
  20. package/lib/module/components/email.js.map +1 -1
  21. package/lib/module/components/productCard.js +94 -89
  22. package/lib/module/components/productCard.js.map +1 -1
  23. package/lib/module/components/welcomeButton.js +4 -4
  24. package/lib/module/components/welcomeButton.js.map +1 -1
  25. package/lib/module/contexts/AppContext.js +47 -46
  26. package/lib/module/contexts/AppContext.js.map +1 -1
  27. package/lib/module/hooks/Stream.js +400 -75
  28. package/lib/module/hooks/Stream.js.map +1 -1
  29. package/lib/module/layout/disclaimer.js +41 -37
  30. package/lib/module/layout/disclaimer.js.map +1 -1
  31. package/lib/module/layout/welcome.js +8 -7
  32. package/lib/module/layout/welcome.js.map +1 -1
  33. package/lib/module/layout/window.js +152 -131
  34. package/lib/module/layout/window.js.map +1 -1
  35. package/lib/module/utils/audioRecorder.js.map +1 -1
  36. package/lib/module/utils/storage.js +1 -1
  37. package/lib/typescript/components/email.d.ts.map +1 -1
  38. package/lib/typescript/components/productCard.d.ts +1 -1
  39. package/lib/typescript/components/productCard.d.ts.map +1 -1
  40. package/lib/typescript/components/welcomeButton.d.ts.map +1 -1
  41. package/lib/typescript/contexts/AppContext.d.ts +2 -2
  42. package/lib/typescript/contexts/AppContext.d.ts.map +1 -1
  43. package/lib/typescript/hooks/Stream.d.ts.map +1 -1
  44. package/lib/typescript/layout/disclaimer.d.ts +1 -1
  45. package/lib/typescript/layout/disclaimer.d.ts.map +1 -1
  46. package/lib/typescript/layout/welcome.d.ts.map +1 -1
  47. package/lib/typescript/layout/window.d.ts.map +1 -1
  48. package/lib/typescript/utils/audioRecorder.d.ts.map +1 -1
  49. package/package.json +2 -1
  50. package/src/components/email.js +3 -15
  51. package/src/components/productCard.js +279 -203
  52. package/src/components/welcomeButton.js +10 -10
  53. package/src/contexts/AppContext.js +185 -106
  54. package/src/hooks/Stream.js +607 -237
  55. package/src/layout/disclaimer.js +125 -78
  56. package/src/layout/welcome.js +58 -20
  57. package/src/layout/window.js +279 -140
  58. package/src/utils/audioRecorder.js +40 -34
  59. package/src/utils/storage.ts +2 -2
@@ -215,9 +215,8 @@ export const EmailForm = ({ panHandlers }) => {
215
215
  return;
216
216
  }
217
217
 
218
- const emailValidationError = validateEmail(userEmail);
219
- if (emailValidationError) {
220
- setError(emailValidationError);
218
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(userEmail)) {
219
+ setError("Please enter a valid email address");
221
220
  return;
222
221
  }
223
222
 
@@ -371,15 +370,7 @@ export const EmailForm = ({ panHandlers }) => {
371
370
  {error ? <Text style={styles.errorText}>{error}</Text> : null}
372
371
  {success ? <Text style={styles.successText}>Email sent successfully!</Text> : null}
373
372
 
374
- <TouchableOpacity
375
- style={[
376
- styles.sendButton,
377
- { backgroundColor: theme.primaryColor },
378
- (isLoading || error || !userEmail.trim() || !subject.trim() || !message.trim()) && styles.disabledButton
379
- ]}
380
- onPress={handleSubmit}
381
- disabled={isLoading || error || !userEmail.trim() || !subject.trim() || !message.trim()}
382
- >
373
+ <TouchableOpacity style={[styles.sendButton, { backgroundColor: theme.primaryColor }]} onPress={handleSubmit} disabled={isLoading}>
383
374
  {isLoading ? <ActivityIndicator size="small" color="#FFFFFF" /> : <Text style={styles.buttonText}>Send Email</Text>}
384
375
  </TouchableOpacity>
385
376
  </KeyboardAwareScrollView>
@@ -471,9 +462,6 @@ const styles = StyleSheet.create({
471
462
  textAlign: "center",
472
463
  marginTop: 10,
473
464
  },
474
- disabledButton: {
475
- opacity: 0.5,
476
- },
477
465
  });
478
466
 
479
467
  export default EmailForm;