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
@@ -1,6 +1,17 @@
1
1
  import React, { useState, useEffect, useContext, useRef } from 'react';
2
- import { Text, StyleSheet, View, TextInput, TouchableOpacity, Platform, KeyboardAvoidingView,
3
- Keyboard, Animated, Linking, Button } from 'react-native';
2
+ import {
3
+ Text,
4
+ StyleSheet,
5
+ View,
6
+ TextInput,
7
+ TouchableOpacity,
8
+ Platform,
9
+ KeyboardAvoidingView,
10
+ Keyboard,
11
+ Animated,
12
+ Linking,
13
+ Button,
14
+ } from 'react-native';
4
15
  import { Header } from '../components/header';
5
16
  import { AppContext } from '../contexts/AppContext';
6
17
  import Ionicons from 'react-native-vector-icons/Ionicons';
@@ -8,21 +19,33 @@ import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view
8
19
  import { Testing } from '../components/testing';
9
20
  import { ChatInput } from '../components/input';
10
21
  import { useWebSocketMessage } from '../hooks/Stream';
11
- import { ProductCard } from '../components/productCard'
22
+ import { ProductCard } from '../components/productCard';
12
23
  import Markdown from 'react-native-markdown-display';
13
24
  import { Feedback } from '../components/feedback';
14
25
  import { ProgressCircle } from '../components/progressCircle';
15
26
 
16
27
  export const ChatWindow = ({ panHandlers }) => {
17
- const { handleSend, messages, input, setInput, ghostMessage, handleButtonClick,
18
- onProductCardClick, onAddToCartClick, uiConfig, ghostCard, typingIndicator, feedbackOpen, setFeedbackOpen, theme
19
- } = useContext(AppContext);
28
+ const {
29
+ handleSend,
30
+ messages,
31
+ input,
32
+ setInput,
33
+ ghostMessage,
34
+ handleButtonClick,
35
+ onProductCardClick,
36
+ onAddToCartClick,
37
+ uiConfig,
38
+ ghostCard,
39
+ typingIndicator,
40
+ feedbackOpen,
41
+ setFeedbackOpen,
42
+ theme,
43
+ } = useContext(AppContext);
20
44
 
21
45
  const scrollViewRef = useRef(null);
22
46
  const fadeAnim = useRef(new Animated.Value(0.6)).current;
23
47
  const [messageCount, setMessageCount] = useState(messages.length);
24
48
 
25
-
26
49
  useEffect(() => {
27
50
  if (scrollViewRef.current) {
28
51
  const timeoutId = setTimeout(() => {
@@ -33,22 +56,46 @@ export const ChatWindow = ({ panHandlers }) => {
33
56
 
34
57
  return () => clearTimeout(timeoutId);
35
58
  }
36
- }, []);
59
+ }, []);
37
60
 
38
61
  useEffect(() => {
39
62
  if (ghostMessage) {
40
63
  Animated.loop(
41
64
  Animated.sequence([
42
- Animated.timing(fadeAnim, { toValue: 1, duration: 500, useNativeDriver: false }),
43
- Animated.timing(fadeAnim, { toValue: 0.6, duration: 500, useNativeDriver: false }),
44
- ])
65
+ Animated.timing(fadeAnim, {
66
+ toValue: 1,
67
+ duration: 500,
68
+ useNativeDriver: false,
69
+ }),
70
+ Animated.timing(fadeAnim, {
71
+ toValue: 0.6,
72
+ duration: 500,
73
+ useNativeDriver: false,
74
+ }),
75
+ ]),
45
76
  ).start();
46
77
  }
47
78
  }, [ghostMessage]);
79
+ // useEffect(() => {
80
+ // if (messages.length === 0) {
81
+ // return;
82
+ // }
83
+ // console.log('=== CHATWINDOW DEBUG ===');
84
+ // console.log('Total messages:', messages.length);
85
+ // messages.forEach((msg, idx) => {
86
+ // if (msg.products && msg.products.length > 0) {
87
+ // console.log(' ✅ PRODUCTS FOUND IN MESSAGE', idx);
88
+ // console.log(' Products:', msg.products.length, 'items');
89
+ // msg.products.forEach((prod, pIdx) => {
90
+ // console.log(` Product ${pIdx}:`, prod);
91
+ // });
92
+ // }
93
+ // });
94
+ // }, [messages]);
48
95
 
49
- useWebSocketMessage()
96
+ useWebSocketMessage();
50
97
 
51
- const openLink = (url) => {
98
+ const openLink = url => {
52
99
  Linking.openURL(url);
53
100
  };
54
101
 
@@ -72,27 +119,23 @@ export const ChatWindow = ({ panHandlers }) => {
72
119
  extraScrollHeight={200}
73
120
  onContentSizeChange={(contentWidth, contentHeight) => {
74
121
  const currentLength = messages.length;
75
-
122
+
76
123
  if (currentLength > messageCount) {
77
124
  scrollViewRef.current?.scrollToEnd({ animated: true });
78
-
79
125
  setMessageCount(currentLength);
80
126
  } else if (currentLength == messageCount) {
81
- // Check if *any* value in the feedbackOpen object is true
82
- const isAnyFeedbackOpen = Object.values(feedbackOpen).some(isOpen => isOpen === true);
127
+ const isAnyFeedbackOpen = Object.values(feedbackOpen).some(
128
+ isOpen => isOpen === true,
129
+ );
83
130
 
84
131
  if (isAnyFeedbackOpen) {
85
- // console.log("A feedback input is open, not scrolling to end.");
86
132
  // Do nothing, prevent scrolling
87
133
  } else {
88
- // console.log("No feedback open, scrolling to end.");
89
134
  if (typingIndicator) {
90
135
  scrollViewRef.current?.scrollToEnd({ animated: true });
91
136
  }
92
137
  }
93
- // You might still want to update messageCount regardless
94
- setMessageCount(currentLength); // Decide if this should be inside the else or outside the if/else
95
-
138
+ setMessageCount(currentLength);
96
139
  } else if (currentLength < messageCount) {
97
140
  setMessageCount(currentLength);
98
141
  }
@@ -100,102 +143,196 @@ export const ChatWindow = ({ panHandlers }) => {
100
143
  keyboardDismissMode="none"
101
144
  bounces={false}
102
145
  enableResetScrollToCoords={false}
103
- keyboardOpeningTime={0}
104
- >
105
- {messages.map((msg, i) => (
106
-
107
- <View key={msg.id || msg.message_id || i} style={styles.messageWrapper}>
108
- {msg.type !== "middle" && (
109
- <View style={[ styles.messageBubble, msg.type === "user" ? [styles.userMessage, { backgroundColor: theme.userMessage }] : styles.aiMessage,]}>
110
-
111
- <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22, includeFontPadding: false, textAlignVertical: 'center' }}}>
112
- {typeof msg.text === 'string' ? msg.text : String(msg.text || '')}
146
+ keyboardOpeningTime={0}>
147
+ {messages.map((msg, i) => {
148
+ // Add inline debug logging during render
149
+ const hasProducts = msg.products && msg.products.length > 0;
113
150
 
151
+ return (
152
+ <View
153
+ key={msg.id || msg.message_id || i}
154
+ style={styles.messageWrapper}>
155
+ {msg.type !== 'middle' && msg.text && (
156
+ <View
157
+ style={[
158
+ styles.messageBubble,
159
+ msg.type === 'user'
160
+ ? [
161
+ styles.userMessage,
162
+ { backgroundColor: theme.userMessage },
163
+ ]
164
+ : styles.aiMessage,
165
+ ]}>
166
+ <Markdown
167
+ style={{
168
+ body: {
169
+ color: msg.type === 'user' ? '#ffffff' : '#161616',
170
+ fontSize: 16,
171
+ lineHeight: 22,
172
+ includeFontPadding: false,
173
+ textAlignVertical: 'center',
174
+ },
175
+ }}>
176
+ {typeof msg.text === 'string'
177
+ ? msg.text
178
+ : String(msg.text || '')}
114
179
  </Markdown>
115
- {(msg.type == 'ai' && i != 0 && msg.message_id ) &&
116
- <Feedback message={msg} messageId={msg.message_id}/>
117
- }
180
+ {msg.type == 'ai' && i != 0 && msg.message_id && (
181
+ <Feedback message={msg} messageId={msg.message_id} />
182
+ )}
118
183
  </View>
119
- )}
120
-
121
- {msg.type == "middle" && (
122
- <View style={[styles.middleMessageBubble, styles.middleMessage]}>
123
- <Text style={{marginRight: 10, marginTop: 10}} allowFontScaling={false}>
124
- <Ionicons name="sparkles-outline" size={16} color="#161616"/>
125
- </Text>
126
- <View style={styles.middleMessageText}>
184
+ )}
127
185
 
128
- <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22, includeFontPadding: false, textAlignVertical: 'center' }}}>
129
- {typeof msg.text === 'string' ? msg.text : String(msg.text || '')}
130
-
131
- </Markdown>
186
+ {msg.type == 'middle' && (
187
+ <View
188
+ style={[styles.middleMessageBubble, styles.middleMessage]}>
189
+ <Text
190
+ style={{ marginRight: 10, marginTop: 10 }}
191
+ allowFontScaling={false}>
192
+ <Ionicons
193
+ name="sparkles-outline"
194
+ size={16}
195
+ color="#161616"
196
+ />
197
+ </Text>
198
+ <View style={styles.middleMessageText}>
199
+ <Markdown
200
+ style={{
201
+ body: {
202
+ color: msg.type === 'user' ? '#ffffff' : '#161616',
203
+ fontSize: 16,
204
+ lineHeight: 22,
205
+ includeFontPadding: false,
206
+ textAlignVertical: 'center',
207
+ },
208
+ }}>
209
+ {typeof msg.text === 'string'
210
+ ? msg.text
211
+ : String(msg.text || '')}
212
+ </Markdown>
213
+ </View>
132
214
  </View>
133
- </View>
134
- )}
215
+ )}
135
216
 
136
- {msg.products && msg.products.length > 0 &&
137
- msg.products.map((prod, index) => (
138
- <View key={index} style={styles.productCardWrapper}>
139
- <ProductCard prod={prod} messageId={msg.message_id} />
217
+ {hasProducts && (
218
+ <View>
219
+ {msg.products.map((prod, index) => {
220
+ return (
221
+ <View key={index} style={styles.productCardWrapper}>
222
+ <ProductCard prod={prod} messageId={msg.message_id} />
223
+ </View>
224
+ );
225
+ })}
140
226
  </View>
141
- ))}
142
-
143
- {msg.resource && msg.resource.length > 0 && msg.resource_type == "video" &&
144
- <TouchableOpacity style={styles.resourceButton} onPress={() => openLink(msg.resource)}>
145
- <Text style={styles.resourceText}>Watch Video</Text>
146
- <Ionicons name="link" size={20} color="white" style={styles.icon} />
147
- </TouchableOpacity>
148
- }
227
+ )}
149
228
 
150
- {msg.suggested_questions && Array.isArray(msg.questions) && msg.questions.length > 0 &&
151
- msg.questions.map((question, index) => (
152
- <TouchableOpacity
153
- key={index}
154
- style={[styles.suggestedQuestionButton, { borderColor: theme.primaryColor }]}
155
- onPress={() => handleButtonClick(question)}
156
- >
157
- <Text style={[styles.suggestedQuestionText, { color: theme.primaryColor }]}>{question}</Text>
158
- </TouchableOpacity>
159
- ))}
229
+ {msg.resource &&
230
+ msg.resource.length > 0 &&
231
+ msg.resource_type == 'video' && (
232
+ <TouchableOpacity
233
+ style={styles.resourceButton}
234
+ onPress={() => openLink(msg.resource)}>
235
+ <Text style={styles.resourceText}>Watch Video</Text>
236
+ <Ionicons
237
+ name="link"
238
+ size={20}
239
+ color="white"
240
+ style={styles.icon}
241
+ />
242
+ </TouchableOpacity>
243
+ )}
160
244
 
161
- {ghostMessage && i === messages.length - 1 && (
162
- <View style={styles.ghostMessageContainer}>
163
- <Animated.View style={[styles.ghostBar, styles.ghostBarShort, { opacity: fadeAnim }]} />
164
- <Animated.View style={[styles.ghostBar, styles.ghostBarLong, { opacity: fadeAnim }]} />
165
- <Animated.View style={[styles.ghostBar, styles.ghostBarMedium, { opacity: fadeAnim }]} />
166
- </View>
167
- )}
245
+ {msg.suggested_questions &&
246
+ Array.isArray(msg.questions) &&
247
+ msg.questions.length > 0 &&
248
+ msg.questions.map((question, index) => (
249
+ <TouchableOpacity
250
+ key={index}
251
+ style={[
252
+ styles.suggestedQuestionButton,
253
+ { borderColor: theme.primaryColor },
254
+ ]}
255
+ onPress={() => handleButtonClick(question)}>
256
+ <Text
257
+ style={[
258
+ styles.suggestedQuestionText,
259
+ { color: theme.primaryColor },
260
+ ]}>
261
+ {question}
262
+ </Text>
263
+ </TouchableOpacity>
264
+ ))}
168
265
 
169
- {ghostCard && i === messages.length - 1 && (
170
- <View style={styles.ghostCardContainer}>
171
- <View style={styles.ghostSquare} />
172
- <View style={styles.ghostBarsContainer}>
173
- <Animated.View style={[styles.ghostBar, styles.ghostBarShort, { opacity: fadeAnim }]} />
174
- <Animated.View style={[styles.ghostBar, styles.ghostBarLong, { opacity: fadeAnim }]} />
175
- <Animated.View style={[styles.ghostBar, styles.ghostBarMedium, { opacity: fadeAnim }]} />
266
+ {ghostMessage && i === messages.length - 1 && (
267
+ <View style={styles.ghostMessageContainer}>
268
+ <Animated.View
269
+ style={[
270
+ styles.ghostBar,
271
+ styles.ghostBarShort,
272
+ { opacity: fadeAnim },
273
+ ]}
274
+ />
275
+ <Animated.View
276
+ style={[
277
+ styles.ghostBar,
278
+ styles.ghostBarLong,
279
+ { opacity: fadeAnim },
280
+ ]}
281
+ />
282
+ <Animated.View
283
+ style={[
284
+ styles.ghostBar,
285
+ styles.ghostBarMedium,
286
+ { opacity: fadeAnim },
287
+ ]}
288
+ />
176
289
  </View>
177
- </View>
178
- )}
290
+ )}
179
291
 
180
- </View>
181
- ))}
292
+ {ghostCard && i === messages.length - 1 && (
293
+ <View style={styles.ghostCardContainer}>
294
+ <View style={styles.ghostSquare} />
295
+ <View style={styles.ghostBarsContainer}>
296
+ <Animated.View
297
+ style={[
298
+ styles.ghostBar,
299
+ styles.ghostBarShort,
300
+ { opacity: fadeAnim },
301
+ ]}
302
+ />
303
+ <Animated.View
304
+ style={[
305
+ styles.ghostBar,
306
+ styles.ghostBarLong,
307
+ { opacity: fadeAnim },
308
+ ]}
309
+ />
310
+ <Animated.View
311
+ style={[
312
+ styles.ghostBar,
313
+ styles.ghostBarMedium,
314
+ { opacity: fadeAnim },
315
+ ]}
316
+ />
317
+ </View>
318
+ </View>
319
+ )}
320
+ </View>
321
+ );
322
+ })}
182
323
  </KeyboardAwareScrollView>
183
324
 
184
325
  <KeyboardAvoidingView
185
326
  behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
186
327
  keyboardVerticalOffset={Platform.OS === 'ios' ? 10 : 0}
187
- style={{ width: '100%' }}
188
- >
189
- {uiConfig.testButtons &&
190
- <Testing
191
- onProductCardClick={onProductCardClick}
192
- onAddToCartClick={onAddToCartClick}
328
+ style={{ width: '100%' }}>
329
+ {uiConfig.testButtons && (
330
+ <Testing
331
+ onProductCardClick={onProductCardClick}
332
+ onAddToCartClick={onAddToCartClick}
193
333
  />
194
- }
195
- {!typingIndicator ?
196
- <ChatInput/> :
197
- <ProgressCircle />
198
- }
334
+ )}
335
+ {!typingIndicator ? <ChatInput /> : <ProgressCircle />}
199
336
  </KeyboardAvoidingView>
200
337
  </View>
201
338
  );
@@ -217,12 +354,12 @@ const styles = StyleSheet.create({
217
354
  padding: 6,
218
355
  paddingHorizontal: 16,
219
356
  borderRadius: 12,
220
- marginBottom: 5
357
+ marginBottom: 5,
221
358
  },
222
359
  userMessage: {
223
360
  alignSelf: 'flex-end',
224
- backgroundColor: "#437D3D",
225
- color: "#ffffff",
361
+ backgroundColor: '#437D3D',
362
+ color: '#ffffff',
226
363
  borderTopRightRadius: 0,
227
364
  },
228
365
  aiMessage: {
@@ -234,26 +371,26 @@ const styles = StyleSheet.create({
234
371
  marginTop: 5,
235
372
  },
236
373
  suggestedQuestionButton: {
237
- backgroundColor: "white",
374
+ backgroundColor: 'white',
238
375
  borderWidth: 1,
239
- borderColor: "#437D3D",
376
+ borderColor: '#437D3D',
240
377
  borderRadius: 18,
241
378
  paddingVertical: 10,
242
379
  paddingHorizontal: 16,
243
380
  marginBottom: 7,
244
- alignSelf: "flex-start",
381
+ alignSelf: 'flex-start',
245
382
  },
246
383
  suggestedQuestionText: {
247
- color: "#437D3D",
384
+ color: '#437D3D',
248
385
  fontSize: 13,
249
- textAlign: "left",
386
+ textAlign: 'left',
250
387
  includeFontPadding: false,
251
- textAlignVertical: "center",
388
+ textAlignVertical: 'center',
252
389
  },
253
390
  ghostMessageContainer: {
254
391
  alignSelf: 'flex-start',
255
392
  width: '100%',
256
- backgroundColor: "#FFFFFF",
393
+ backgroundColor: '#FFFFFF',
257
394
  borderRadius: 10,
258
395
  borderTopLeftRadius: 0,
259
396
  padding: 14,
@@ -262,76 +399,78 @@ const styles = StyleSheet.create({
262
399
  ghostBar: {
263
400
  height: 20,
264
401
  borderRadius: 10,
265
- backgroundColor: "#ebebeb",
402
+ backgroundColor: '#ebebeb',
266
403
  marginVertical: 3,
267
404
  },
268
405
  ghostBarShort: {
269
- width: "50%",
406
+ width: '50%',
270
407
  },
271
408
  ghostBarMedium: {
272
- width: "75%",
409
+ width: '75%',
273
410
  },
274
411
  ghostBarLong: {
275
- width: "100%",
412
+ width: '100%',
276
413
  },
277
414
  ghostCardContainer: {
278
- flexDirection: "row", // Arrange elements in a row
279
- alignItems: "center", // Vertically align items
280
- width: "100%",
281
- backgroundColor: "#FFFFFF",
415
+ flexDirection: 'row', // Arrange elements in a row
416
+ alignItems: 'center', // Vertically align items
417
+ width: '100%',
418
+ backgroundColor: '#FFFFFF',
282
419
  borderRadius: 10,
283
420
  borderTopLeftRadius: 0,
284
421
  padding: 14,
285
422
  marginVertical: 5,
286
423
  },
287
424
  ghostSquare: {
288
- width: "25%", // Takes up 25% of the container
425
+ width: '25%', // Takes up 25% of the container
289
426
  aspectRatio: 1, // Makes it a square
290
- backgroundColor: "#ebebeb", // Adjust color if needed
427
+ backgroundColor: '#ebebeb', // Adjust color if needed
291
428
  borderRadius: 8,
292
429
  },
293
430
  ghostBarsContainer: {
294
- width: "75%", // Takes up 75% of the container
431
+ width: '75%', // Takes up 75% of the container
295
432
  paddingLeft: 10, // Adds some spacing from the square
296
433
  },
297
434
  resourceButton: {
298
- flexDirection: 'row',
299
- alignItems: 'center',
300
- backgroundColor: '#367CB6',
435
+ flexDirection: 'row',
436
+ alignItems: 'center',
437
+ backgroundColor: '#367CB6',
301
438
  paddingVertical: 10,
302
439
  paddingHorizontal: 15,
303
440
  marginBottom: 5,
304
441
  borderRadius: 5,
305
- alignSelf: 'flex-start',
442
+ alignSelf: 'flex-start',
306
443
  },
307
444
  resourceText: {
308
- color: 'white',
309
- fontSize: 16,
310
- marginRight: 8,
311
- includeFontPadding: false,
312
- textAlignVertical: "center",
445
+ color: 'white',
446
+ fontSize: 16,
447
+ marginRight: 8,
448
+ includeFontPadding: false,
449
+ textAlignVertical: 'center',
313
450
  },
314
- middleMessageBubble:{
451
+ middleMessageBubble: {
315
452
  padding: 6,
316
453
  paddingHorizontal: 16,
317
454
  borderRadius: 12,
318
455
  marginBottom: 5,
319
456
  flexDirection: 'row',
320
- alignItems: 'flex-start'
457
+ alignItems: 'flex-start',
321
458
  },
322
- middleMessage:{
323
- color: '#161616',
459
+ middleMessage: {
460
+ color: '#161616',
324
461
  alignSelf: 'flex-start',
325
462
  backgroundColor: '#e7decd', //'#e0f4fc',
326
463
  width: '100%',
327
464
  },
328
465
  middleMessageText: {
329
466
  flex: 1,
330
- flexShrink: 1
331
- }
467
+ flexShrink: 1,
468
+ },
332
469
  });
333
470
 
334
- {/* <Testing
335
- onProductCardClick={onProductCardClick}
336
- onAddToCartClick={onAddToCartClick}
337
- /> */}
471
+ {
472
+ /* <Testing
473
+ onProductCardClick={onProductCardClick}
474
+ onAddToCartClick={onAddToCartClick}
475
+ /> */
476
+ }