@convai/web-sdk 1.9.1 → 2.0.0-beta.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 (86) hide show
  1. package/README.md +25 -14
  2. package/dist/core/ConvaiClient.js +10 -1
  3. package/dist/core/types.d.ts +13 -3
  4. package/dist/core/websocketUrl.d.ts +11 -0
  5. package/dist/core/websocketUrl.js +17 -0
  6. package/dist/react/hooks/index.d.ts +0 -2
  7. package/dist/react/hooks/index.js +0 -3
  8. package/dist/react/index.d.ts +0 -3
  9. package/dist/react/index.js +3 -10
  10. package/dist/utils/inlineMarkdown.d.ts +7 -5
  11. package/dist/utils/inlineMarkdown.js +7 -5
  12. package/dist/vanilla/WebSocketSession.d.ts +19 -13
  13. package/dist/vanilla/WebSocketSession.js +58 -14
  14. package/dist/vanilla/index.d.ts +6 -18
  15. package/dist/vanilla/index.js +7 -19
  16. package/dist/version.d.ts +1 -1
  17. package/dist/version.js +1 -1
  18. package/package.json +9 -8
  19. package/dist/react/components/ConvaiWidget.d.ts +0 -86
  20. package/dist/react/components/ConvaiWidget.js +0 -610
  21. package/dist/react/components/index.d.ts +0 -1
  22. package/dist/react/components/index.js +0 -2
  23. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +0 -9
  24. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +0 -315
  25. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +0 -35
  26. package/dist/react/components/rtc-widget/components/AudioVisualizer.js +0 -285
  27. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +0 -12
  28. package/dist/react/components/rtc-widget/components/ConviMessage.js +0 -13
  29. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +0 -8
  30. package/dist/react/components/rtc-widget/components/FloatingVideo.js +0 -120
  31. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -31
  32. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +0 -140
  33. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +0 -9
  34. package/dist/react/components/rtc-widget/components/MessageBubble.js +0 -22
  35. package/dist/react/components/rtc-widget/components/MessageList.d.ts +0 -13
  36. package/dist/react/components/rtc-widget/components/MessageList.js +0 -88
  37. package/dist/react/components/rtc-widget/components/SiteCard.d.ts +0 -14
  38. package/dist/react/components/rtc-widget/components/SiteCard.js +0 -34
  39. package/dist/react/components/rtc-widget/components/UserMessage.d.ts +0 -8
  40. package/dist/react/components/rtc-widget/components/UserMessage.js +0 -14
  41. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +0 -5
  42. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +0 -14
  43. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +0 -24
  44. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +0 -170
  45. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -16
  46. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +0 -64
  47. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -11
  48. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +0 -65
  49. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +0 -13
  50. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +0 -298
  51. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +0 -5
  52. package/dist/react/components/rtc-widget/components/conviComponents/index.js +0 -5
  53. package/dist/react/components/rtc-widget/components/index.d.ts +0 -8
  54. package/dist/react/components/rtc-widget/components/index.js +0 -14
  55. package/dist/react/components/rtc-widget/index.d.ts +0 -5
  56. package/dist/react/components/rtc-widget/index.js +0 -8
  57. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +0 -115
  58. package/dist/react/components/rtc-widget/styles/framerConfig.js +0 -72
  59. package/dist/react/components/rtc-widget/styles/icons.d.ts +0 -27
  60. package/dist/react/components/rtc-widget/styles/icons.js +0 -256
  61. package/dist/react/components/rtc-widget/styles/index.d.ts +0 -5
  62. package/dist/react/components/rtc-widget/styles/index.js +0 -8
  63. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +0 -89
  64. package/dist/react/components/rtc-widget/styles/styledComponents.js +0 -662
  65. package/dist/react/components/rtc-widget/styles/theme.d.ts +0 -187
  66. package/dist/react/components/rtc-widget/styles/theme.js +0 -289
  67. package/dist/react/components/rtc-widget/types/index.d.ts +0 -59
  68. package/dist/react/components/rtc-widget/types/index.js +0 -1
  69. package/dist/react/hooks/useCharacterInfo.d.ts +0 -18
  70. package/dist/react/hooks/useCharacterInfo.js +0 -65
  71. package/dist/react/hooks/useLocalCameraTrack.d.ts +0 -21
  72. package/dist/react/hooks/useLocalCameraTrack.js +0 -33
  73. package/dist/react/icons.d.ts +0 -37
  74. package/dist/react/icons.js +0 -53
  75. package/dist/utils/lightbox.d.ts +0 -15
  76. package/dist/utils/lightbox.js +0 -94
  77. package/dist/vanilla/ConvaiWidget.d.ts +0 -46
  78. package/dist/vanilla/ConvaiWidget.js +0 -2866
  79. package/dist/vanilla/WidgetEventSubscriptions.d.ts +0 -14
  80. package/dist/vanilla/WidgetEventSubscriptions.js +0 -36
  81. package/dist/vanilla/icons.d.ts +0 -34
  82. package/dist/vanilla/icons.js +0 -268
  83. package/dist/vanilla/styles.d.ts +0 -168
  84. package/dist/vanilla/styles.js +0 -407
  85. package/dist/vanilla/types.d.ts +0 -170
  86. package/dist/vanilla/types.js +0 -1
@@ -1,662 +0,0 @@
1
- import styled from "styled-components";
2
- import { motion } from "framer-motion";
3
- import { aeroTheme } from "./theme.js";
4
- // Styled Components matching the original webChat exactly
5
- export const ConvaiContainer = styled(motion.div) `
6
- position: fixed !important;
7
- bottom: 2rem !important;
8
- right: 2rem !important;
9
- z-index: 1000 !important;
10
- isolation: isolate;
11
- background: transparent !important;
12
- pointer-events: none !important;
13
-
14
- /* Override any inherited text styles */
15
- * {
16
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
17
- color-scheme: light !important;
18
- font-synthesis: none !important;
19
- text-rendering: optimizeLegibility !important;
20
- -webkit-font-smoothing: antialiased !important;
21
- -moz-osx-font-smoothing: grayscale !important;
22
- -webkit-text-size-adjust: 100% !important;
23
- }
24
- `;
25
- export const MorphingContainer = styled(motion.div) `
26
- position: relative !important;
27
- background: ${(props) => {
28
- const opacity = props.$backgroundOpacity ?? 0.95;
29
- // Slightly tinted for better universal contrast
30
- return `rgba(252, 252, 253, ${opacity})`;
31
- }} !important;
32
- backdrop-filter: blur(20px) saturate(180%) !important;
33
- // Subtle dual-tone border for visibility on any background
34
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
35
- box-shadow:
36
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset, // Inner highlight
37
- 0 8px 32px rgba(0, 0, 0, 0.12), // Main shadow for light backgrounds
38
- 0 2px 8px rgba(0, 0, 0, 0.08) !important; // Subtle depth
39
- display: flex !important;
40
- flex-direction: column !important;
41
- overflow: hidden !important;
42
- isolation: isolate;
43
- pointer-events: auto !important;
44
- `;
45
- export const ButtonContent = styled(motion.div) `
46
- width: 100% !important;
47
- height: 100% !important;
48
- display: flex !important;
49
- align-items: center !important;
50
- justify-content: center !important;
51
- position: absolute !important;
52
- top: 0 !important;
53
- left: 0 !important;
54
- background: transparent !important;
55
- isolation: isolate;
56
- pointer-events: auto !important;
57
- `;
58
- export const Logo = styled(motion.div) `
59
- width: 2rem !important;
60
- height: 2rem !important;
61
- display: flex !important;
62
- align-items: center !important;
63
- justify-content: center !important;
64
- color: ${aeroTheme.colors.primary[500]} !important;
65
- isolation: isolate;
66
- contain: layout style paint;
67
- `;
68
- export const ChatContent = styled(motion.div) `
69
- width: 100% !important;
70
- height: 100% !important;
71
- display: flex !important;
72
- flex-direction: column !important;
73
- position: absolute !important;
74
- top: 0 !important;
75
- left: 0 !important;
76
- overflow: hidden !important;
77
- background: transparent !important;
78
- isolation: isolate;
79
- pointer-events: auto !important;
80
- `;
81
- export const Header = styled(motion.div) `
82
- padding: ${aeroTheme.spacing.md} !important;
83
- border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
84
- display: flex !important;
85
- align-items: center !important;
86
- justify-content: space-between !important;
87
- background: rgba(255, 255, 255, 0.5) !important;
88
- position: relative !important;
89
- z-index: 10 !important;
90
- isolation: isolate;
91
- contain: layout style paint;
92
- `;
93
- export const Title = styled.h3 `
94
- margin: 0 !important;
95
- font-size: ${aeroTheme.typography.fontSize.lg} !important;
96
- font-weight: ${aeroTheme.typography.fontWeight.semibold} !important;
97
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
98
- color: ${aeroTheme.colors.text.primary} !important;
99
- text-align: center !important;
100
- display: flex !important;
101
- align-items: center !important;
102
- justify-content: center !important;
103
- gap: 0.5rem !important;
104
- flex: 1 !important;
105
- font-synthesis: none !important;
106
- text-rendering: optimizeLegibility !important;
107
- -webkit-font-smoothing: antialiased !important;
108
- -moz-osx-font-smoothing: grayscale !important;
109
- -webkit-text-size-adjust: 100% !important;
110
- isolation: isolate;
111
- contain: layout style paint;
112
- `;
113
- export const HeaderLogo = styled.div `
114
- display: flex !important;
115
- align-items: center !important;
116
- justify-content: center !important;
117
- isolation: isolate;
118
- contain: layout style paint;
119
- `;
120
- export const CloseButton = styled(motion.button) `
121
- background: rgba(252, 252, 253, 0.95) !important;
122
- backdrop-filter: blur(20px) saturate(180%);
123
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
124
- border-radius: 50% !important;
125
- width: 2rem;
126
- height: 2rem;
127
- display: flex;
128
- align-items: center;
129
- justify-content: center;
130
- cursor: pointer !important;
131
- color: ${aeroTheme.colors.text.primary} !important;
132
- transition: ${aeroTheme.transitions.normal};
133
- z-index: 1;
134
- box-shadow:
135
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
136
- 0 2px 8px rgba(0, 0, 0, 0.08);
137
- outline: none !important;
138
- padding: 0 !important;
139
- font-size: inherit !important;
140
- font-weight: inherit !important;
141
- font-family: inherit !important;
142
-
143
- &:hover {
144
- background: rgba(255, 255, 255, 1) !important;
145
- color: ${aeroTheme.colors.text.primary} !important;
146
- box-shadow:
147
- 0 0 0 1px rgba(255, 255, 255, 1) inset,
148
- 0 4px 12px rgba(0, 0, 0, 0.12);
149
- border-color: rgba(0, 0, 0, 0.08) !important;
150
- }
151
-
152
- &:focus {
153
- outline: none !important;
154
- }
155
-
156
- &:focus-visible {
157
- outline: none !important;
158
- }
159
- `;
160
- export const SettingsButton = styled(motion.button) `
161
- background: rgba(252, 252, 253, 0.95) !important;
162
- backdrop-filter: blur(20px) saturate(180%);
163
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
164
- border-radius: 50% !important;
165
- width: 2rem;
166
- height: 2rem;
167
- display: flex;
168
- align-items: center;
169
- justify-content: center;
170
- cursor: pointer !important;
171
- color: ${aeroTheme.colors.text.primary} !important;
172
- transition: ${aeroTheme.transitions.normal};
173
- z-index: 1;
174
- box-shadow:
175
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
176
- 0 2px 8px rgba(0, 0, 0, 0.08);
177
- outline: none !important;
178
- padding: 0 !important;
179
- font-size: inherit !important;
180
- font-weight: inherit !important;
181
- font-family: inherit !important;
182
-
183
- &:hover {
184
- background: rgba(255, 255, 255, 1) !important;
185
- color: ${aeroTheme.colors.text.primary} !important;
186
- box-shadow:
187
- 0 0 0 1px rgba(255, 255, 255, 1) inset,
188
- 0 4px 12px rgba(0, 0, 0, 0.12);
189
- border-color: rgba(0, 0, 0, 0.08) !important;
190
- }
191
-
192
- &:focus {
193
- outline: none !important;
194
- }
195
-
196
- &:focus-visible {
197
- outline: none !important;
198
- }
199
- `;
200
- export const SettingsTray = styled(motion.div) `
201
- background: rgba(252, 252, 253, 0.98) !important;
202
- backdrop-filter: blur(20px) saturate(180%) !important;
203
- border: 1px solid rgba(0, 0, 0, 0.08) !important;
204
- border-radius: ${aeroTheme.borderRadius.lg} !important;
205
- box-shadow:
206
- 0 0 0 1px rgba(255, 255, 255, 0.9) inset,
207
- 0 8px 32px rgba(0, 0, 0, 0.15) !important;
208
- padding: 0 !important;
209
- min-width: 0 !important;
210
- isolation: isolate;
211
- contain: layout style paint;
212
- pointer-events: auto !important;
213
- `;
214
- export const SettingsOption = styled(motion.button) `
215
- padding: ${aeroTheme.spacing.sm} ${aeroTheme.spacing.md};
216
- background: transparent;
217
- border: none !important;
218
- border-radius: ${aeroTheme.borderRadius.md} !important;
219
- color: ${aeroTheme.colors.text.primary};
220
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
221
- font-size: ${aeroTheme.typography.sizes.sm} !important;
222
- font-weight: inherit !important;
223
- cursor: pointer !important;
224
- transition: ${aeroTheme.transitions.normal};
225
- display: flex;
226
- align-items: center;
227
- justify-content: center;
228
- gap: ${aeroTheme.spacing.sm};
229
- outline: none !important;
230
- pointer-events: auto !important;
231
- flex: 1;
232
- min-width: 2.5rem;
233
-
234
- &:hover {
235
- background: rgba(0, 0, 0, 0.05);
236
- border-color: transparent !important;
237
- }
238
-
239
- &:active {
240
- background: rgba(0, 0, 0, 0.1);
241
- }
242
-
243
- &:focus {
244
- outline: none !important;
245
- }
246
-
247
- &:focus-visible {
248
- outline: none !important;
249
- }
250
- `;
251
- export const Content = styled(motion.div) `
252
- flex: 1 !important;
253
- padding: ${aeroTheme.spacing.md} !important;
254
- display: flex !important;
255
- flex-direction: column !important;
256
- justify-content: space-between !important;
257
- min-height: 0 !important;
258
- z-index: 1 !important;
259
- overflow: hidden !important;
260
- isolation: isolate;
261
- contain: layout style paint;
262
- `;
263
- export const Footer = styled(motion.div) `
264
- padding: ${aeroTheme.spacing.md} !important;
265
- border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
266
- background: rgba(255, 255, 255, 0.5) !important;
267
- position: relative !important;
268
- isolation: isolate;
269
- contain: layout style paint;
270
- `;
271
- export const InputContainer = styled(motion.div) `
272
- display: flex !important;
273
- align-items: center !important;
274
- gap: ${aeroTheme.spacing.sm} !important;
275
- background: rgba(252, 252, 253, 0.95) !important;
276
- backdrop-filter: blur(20px) saturate(180%) !important;
277
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
278
- border-radius: ${aeroTheme.borderRadius.full} !important;
279
- min-height: 3rem !important;
280
- box-shadow:
281
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
282
- 0 2px 12px rgba(0, 0, 0, 0.08) !important;
283
- isolation: isolate;
284
- contain: layout style paint;
285
- `;
286
- export const Input = styled.input `
287
- flex: 1 !important;
288
- background: transparent !important;
289
- border: none !important;
290
- outline: none !important;
291
- color: ${aeroTheme.colors.text.primary} !important;
292
- font-size: ${aeroTheme.typography.fontSize.sm} !important;
293
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
294
- border-radius: ${aeroTheme.borderRadius.full} !important;
295
- padding: 0.5rem 0.75rem !important;
296
- line-height: 1.5 !important;
297
- min-height: 2.25rem !important;
298
- font-synthesis: none !important;
299
- text-rendering: optimizeLegibility !important;
300
- -webkit-font-smoothing: antialiased !important;
301
- -moz-osx-font-smoothing: grayscale !important;
302
- -webkit-text-size-adjust: 100% !important;
303
- isolation: isolate;
304
- contain: layout style paint;
305
-
306
- &::placeholder {
307
- color: ${aeroTheme.colors.text.tertiary} !important;
308
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
309
- font-size: ${aeroTheme.typography.fontSize.sm} !important;
310
- }
311
-
312
- &:focus {
313
- outline: none !important;
314
- border: none !important;
315
- }
316
- `;
317
- export const ActionButton = styled(motion.button) `
318
- width: 2.25rem !important;
319
- height: 2.25rem !important;
320
- min-width: 2.25rem !important;
321
- min-height: 2.25rem !important;
322
- flex-shrink: 0 !important;
323
- border-radius: 50% !important;
324
- border: none !important;
325
- background: ${(props) => props.$active
326
- ? aeroTheme.colors.convai.light
327
- : aeroTheme.colors.text.primary};
328
- color: ${(props) => props.$active ? aeroTheme.colors.text.inverse : "white"};
329
- display: flex !important;
330
- align-items: center !important;
331
- justify-content: center !important;
332
- cursor: pointer !important;
333
- transition: ${aeroTheme.transitions.normal} !important;
334
- outline: none !important;
335
- padding: 0 !important;
336
- font-size: inherit !important;
337
- font-weight: inherit !important;
338
- font-family: inherit !important;
339
- isolation: isolate;
340
- contain: layout style paint;
341
-
342
- &:hover {
343
- transform: scale(1.05);
344
- background: ${aeroTheme.colors.neutral[800]} !important;
345
- border-color: transparent !important;
346
- }
347
-
348
- &:active {
349
- transform: scale(0.95);
350
- }
351
-
352
- &:focus {
353
- outline: none !important;
354
- }
355
-
356
- &:focus-visible {
357
- outline: none !important;
358
- }
359
- `;
360
- export const MessageList = styled.div `
361
- flex: 1 !important;
362
- overflow-y: auto !important;
363
- padding: ${aeroTheme.spacing.md} !important;
364
- display: flex !important;
365
- flex-direction: column !important;
366
- gap: ${aeroTheme.spacing.sm} !important;
367
- isolation: isolate;
368
- contain: layout style paint;
369
- `;
370
- export const Message = styled.div `
371
- display: flex !important;
372
- flex-direction: ${(props) => props.isUser ? "row-reverse" : "row"} !important;
373
- align-items: flex-start !important;
374
- gap: ${aeroTheme.spacing.sm} !important;
375
- margin-bottom: ${aeroTheme.spacing.sm} !important;
376
- isolation: isolate;
377
- contain: layout style paint;
378
- `;
379
- export const MessageBubble = styled.div `
380
- max-width: 70% !important;
381
- padding: ${aeroTheme.spacing.sm} ${aeroTheme.spacing.md} !important;
382
- background: ${(props) => props.isUser
383
- ? aeroTheme.colors.primary[500]
384
- : "rgba(255, 255, 255, 0.9)"} !important;
385
- color: ${(props) => props.isUser ? "white" : aeroTheme.colors.text.primary} !important;
386
- border-radius: ${aeroTheme.borderRadius.lg} !important;
387
- font-size: ${aeroTheme.typography.fontSize.sm} !important;
388
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
389
- line-height: 1.4 !important;
390
- word-wrap: break-word !important;
391
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
392
- font-synthesis: none !important;
393
- text-rendering: optimizeLegibility !important;
394
- -webkit-font-smoothing: antialiased !important;
395
- -moz-osx-font-smoothing: grayscale !important;
396
- -webkit-text-size-adjust: 100% !important;
397
- isolation: isolate;
398
- contain: layout style paint;
399
- `;
400
- export const MessageTime = styled.div `
401
- font-size: ${aeroTheme.typography.fontSize.xs} !important;
402
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
403
- color: ${aeroTheme.colors.text.secondary} !important;
404
- margin-top: ${aeroTheme.spacing.xs} !important;
405
- text-align: ${(props) => (props.isUser ? "right" : "left")} !important;
406
- font-synthesis: none !important;
407
- text-rendering: optimizeLegibility !important;
408
- -webkit-font-smoothing: antialiased !important;
409
- -moz-osx-font-smoothing: grayscale !important;
410
- -webkit-text-size-adjust: 100% !important;
411
- isolation: isolate;
412
- contain: layout style paint;
413
- `;
414
- export const ButtonContainer = styled(motion.button) `
415
- position: fixed !important;
416
- bottom: 2rem !important;
417
- right: 2rem !important;
418
- width: 4rem !important;
419
- height: 4rem !important;
420
- border: none !important;
421
- border-radius: 50% !important;
422
- background: ${aeroTheme.colors.glass.backdrop} !important;
423
- backdrop-filter: ${aeroTheme.glass.backdrop} !important;
424
- border: ${aeroTheme.glass.border} !important;
425
- box-shadow: ${aeroTheme.shadows.glass} !important;
426
- cursor: pointer !important;
427
- display: flex !important;
428
- align-items: center !important;
429
- justify-content: center !important;
430
- z-index: 1000 !important;
431
- isolation: isolate;
432
- contain: layout style paint;
433
-
434
- &:hover {
435
- transform: scale(1.05) !important;
436
- box-shadow: ${aeroTheme.shadows.xl} !important;
437
- }
438
- `;
439
- export const ButtonLogo = styled(motion.div) `
440
- width: 2rem !important;
441
- height: 2rem !important;
442
- display: flex !important;
443
- align-items: center !important;
444
- justify-content: center !important;
445
- color: ${aeroTheme.colors.primary[500]} !important;
446
- isolation: isolate;
447
- contain: layout style paint;
448
- `;
449
- // Message Components
450
- export const ConviBubble = styled.div `
451
- background: rgba(252, 252, 253, 0.95) !important;
452
- backdrop-filter: blur(20px) saturate(180%) !important;
453
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
454
- border-radius: 12px 12px 12px 4px !important;
455
- padding: 12px !important;
456
- box-shadow:
457
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
458
- 0 2px 8px rgba(0, 0, 0, 0.08) !important;
459
- color: ${aeroTheme.colors.text.primary} !important;
460
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
461
- font-size: 14px !important;
462
- line-height: 1.5 !important;
463
-
464
- /* Markdown styling */
465
- strong {
466
- font-weight: 600 !important;
467
- color: ${aeroTheme.colors.text.primary} !important;
468
- }
469
-
470
- em {
471
- font-style: italic !important;
472
- }
473
- word-wrap: break-word !important;
474
- max-width: 100% !important;
475
- font-synthesis: none !important;
476
- text-rendering: optimizeLegibility !important;
477
- -webkit-font-smoothing: antialiased !important;
478
- -moz-osx-font-smoothing: grayscale !important;
479
- -webkit-text-size-adjust: 100% !important;
480
- isolation: isolate;
481
- contain: layout style paint;
482
- `;
483
- export const ConviMessageContainer = styled.div `
484
- display: flex !important;
485
- flex-direction: column !important;
486
- max-width: 70% !important;
487
- margin-right: auto !important;
488
- width: 100% !important;
489
- isolation: isolate;
490
- contain: layout style paint;
491
- `;
492
- export const MessageHeader = styled.div `
493
- display: flex !important;
494
- align-items: center !important;
495
- gap: ${aeroTheme.spacing.xs} !important;
496
- margin-bottom: ${aeroTheme.spacing.xs} !important;
497
- isolation: isolate;
498
- contain: layout style paint;
499
- `;
500
- export const ConviLabel = styled.span `
501
- font-size: ${aeroTheme.typography.sizes.caption} !important;
502
- color: #10b981 !important;
503
- font-weight: 500 !important;
504
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
505
- isolation: isolate;
506
- contain: layout style paint;
507
- `;
508
- export const LogoWrapper = styled.div `
509
- width: 1rem !important;
510
- height: 1rem !important;
511
- display: flex !important;
512
- align-items: center !important;
513
- justify-content: center !important;
514
- isolation: isolate;
515
- contain: layout style paint;
516
- `;
517
- export const UserBubble = styled.div `
518
- background: rgba(252, 252, 253, 0.95) !important;
519
- backdrop-filter: blur(20px) saturate(180%) !important;
520
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
521
- border-radius: 12px 12px 4px 12px !important;
522
- padding: 12px !important;
523
- box-shadow:
524
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
525
- 0 2px 8px rgba(0, 0, 0, 0.08) !important;
526
- color: ${aeroTheme.colors.text.primary} !important;
527
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
528
- font-size: 14px !important;
529
- line-height: 1.5 !important;
530
-
531
- /* Markdown styling */
532
- strong {
533
- font-weight: 600 !important;
534
- color: ${aeroTheme.colors.text.primary} !important;
535
- }
536
-
537
- em {
538
- font-style: italic !important;
539
- }
540
- word-wrap: break-word !important;
541
- max-width: 100% !important;
542
- font-synthesis: none !important;
543
- text-rendering: optimizeLegibility !important;
544
- -webkit-font-smoothing: antialiased !important;
545
- -moz-osx-font-smoothing: grayscale !important;
546
- -webkit-text-size-adjust: 100% !important;
547
- isolation: isolate;
548
- contain: layout style paint;
549
- `;
550
- export const UserMessageContainer = styled.div `
551
- display: flex !important;
552
- flex-direction: column !important;
553
- max-width: 70% !important;
554
- margin-left: auto !important;
555
- width: 100% !important;
556
- isolation: isolate;
557
- contain: layout style paint;
558
- `;
559
- export const UserLabel = styled.span `
560
- font-size: ${aeroTheme.typography.sizes.caption} !important;
561
- color: ${aeroTheme.colors.convai.dark} !important;
562
- font-weight: 500 !important;
563
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
564
- isolation: isolate;
565
- contain: layout style paint;
566
- `;
567
- export const BubbleContainer = styled(motion.div) `
568
- display: flex !important;
569
- flex-direction: column !important;
570
- max-width: 70% !important;
571
- margin: ${aeroTheme.spacing.sm} 0 !important;
572
- align-self: ${(props) => props.$isUser ? "flex-end" : "flex-start"} !important;
573
- isolation: isolate;
574
- contain: layout style paint;
575
- `;
576
- export const Bubble = styled(motion.div) `
577
- background: ${(props) => props.$isUser
578
- ? "rgba(252, 252, 253, 0.95)"
579
- : "rgba(248, 250, 252, 0.95)"} !important;
580
- backdrop-filter: blur(20px) saturate(180%) !important;
581
- border: 1px solid rgba(0, 0, 0, 0.06) !important;
582
- border-radius: ${(props) => props.$isUser
583
- ? `${aeroTheme.borderRadius.lg} ${aeroTheme.borderRadius.lg} ${aeroTheme.borderRadius.sm} ${aeroTheme.borderRadius.lg}`
584
- : `${aeroTheme.borderRadius.lg} ${aeroTheme.borderRadius.lg} ${aeroTheme.borderRadius.lg} ${aeroTheme.borderRadius.sm}`} !important;
585
- padding: ${aeroTheme.spacing.md} !important;
586
- box-shadow:
587
- 0 0 0 1px rgba(255, 255, 255, 0.8) inset,
588
- 0 2px 8px rgba(0, 0, 0, 0.08) !important;
589
- color: ${aeroTheme.colors.text.primary} !important;
590
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
591
- font-size: ${aeroTheme.typography.sizes.body} !important;
592
- line-height: 1.5 !important;
593
- word-wrap: break-word !important;
594
- position: relative !important;
595
- font-synthesis: none !important;
596
- text-rendering: optimizeLegibility !important;
597
- -webkit-font-smoothing: antialiased !important;
598
- -moz-osx-font-smoothing: grayscale !important;
599
- -webkit-text-size-adjust: 100% !important;
600
- isolation: isolate;
601
- contain: layout style paint;
602
- `;
603
- export const Timestamp = styled.span `
604
- font-size: ${aeroTheme.typography.sizes.caption} !important;
605
- color: ${aeroTheme.colors.text.secondary} !important;
606
- margin-top: ${aeroTheme.spacing.xs} !important;
607
- align-self: ${(props) => props.$isUser ? "flex-end" : "flex-start"} !important;
608
- font-family: ${aeroTheme.typography.fontFamily.body} !important;
609
- isolation: isolate;
610
- contain: layout style paint;
611
- `;
612
- export const MessageListContainer = styled.div `
613
- display: flex !important;
614
- flex-direction: column !important;
615
- overflow-y: auto !important;
616
- flex: 1 !important;
617
- min-height: 0 !important;
618
- width: 100% !important;
619
- scroll-behavior: smooth !important;
620
- isolation: isolate;
621
- contain: layout style paint;
622
-
623
- /* Custom scrollbar */
624
- &::-webkit-scrollbar {
625
- width: 4px !important;
626
- }
627
-
628
- &::-webkit-scrollbar-track {
629
- background: transparent !important;
630
- }
631
-
632
- &::-webkit-scrollbar-thumb {
633
- background: rgba(0, 0, 0, 0.1) !important;
634
- border-radius: 2px !important;
635
- }
636
-
637
- &::-webkit-scrollbar-thumb:hover {
638
- background: rgba(0, 0, 0, 0.2) !important;
639
- }
640
- `;
641
- export const MessageWrapper = styled.div `
642
- margin-bottom: 16px !important;
643
- width: 100% !important;
644
- isolation: isolate;
645
- contain: layout style paint;
646
-
647
- &:last-child {
648
- margin-bottom: 0 !important;
649
- }
650
- `;
651
- export const EmptyState = styled.div `
652
- display: flex;
653
- flex-direction: column;
654
- align-items: center;
655
- justify-content: center;
656
- height: 100%;
657
- color: ${aeroTheme.colors.text.secondary};
658
- font-family: ${aeroTheme.typography.fontFamily.body};
659
- font-size: ${aeroTheme.typography.sizes.body};
660
- text-align: center;
661
- padding: 32px;
662
- `;