@ensembleapp/client-sdk 0.0.39 → 0.0.40
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.
- package/dist/index.d.ts +195 -67
- package/dist/index.js +965 -219
- package/dist/index.js.map +1 -1
- package/dist/widget/widget.global.js +54 -52
- package/dist/widget/widget.global.js.map +1 -1
- package/lib/chat/ChatWidget.css +57 -19
- package/package.json +1 -1
package/lib/chat/ChatWidget.css
CHANGED
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
:root[data-chat-widget],
|
|
2
2
|
[data-chat-widget] {
|
|
3
|
+
/* Primary colors */
|
|
3
4
|
--chat-primary: #3b82f6;
|
|
4
5
|
--chat-primary-text: #ffffff;
|
|
5
6
|
--chat-primary-hover: #2563eb;
|
|
7
|
+
--chat-primary-subtle: rgba(59, 130, 246, 0.1);
|
|
8
|
+
|
|
9
|
+
/* Backgrounds */
|
|
6
10
|
--chat-background: #ffffff;
|
|
11
|
+
--chat-background-secondary: #f9fafb;
|
|
12
|
+
--chat-background-tertiary: #f3f4f6;
|
|
13
|
+
|
|
14
|
+
/* Borders */
|
|
7
15
|
--chat-border: #e5e7eb;
|
|
16
|
+
--chat-border-light: #f3f4f6;
|
|
17
|
+
|
|
18
|
+
/* Text colors */
|
|
19
|
+
--chat-text: #111827;
|
|
20
|
+
--chat-text-secondary: #4b5563;
|
|
21
|
+
--chat-text-muted: #6b7280;
|
|
22
|
+
--chat-text-disabled: #9ca3af;
|
|
23
|
+
|
|
24
|
+
/* Semantic colors */
|
|
25
|
+
--chat-success: #22c55e;
|
|
26
|
+
--chat-success-bg: rgba(34, 197, 94, 0.1);
|
|
27
|
+
--chat-error: #ef4444;
|
|
28
|
+
--chat-error-bg: rgba(239, 68, 68, 0.1);
|
|
29
|
+
|
|
30
|
+
/* Component-specific (mapped from above) */
|
|
8
31
|
--chat-header-text: #ffffff;
|
|
9
32
|
--chat-user-text: #ffffff;
|
|
10
33
|
--chat-assistant-bg: transparent;
|
|
11
|
-
--chat-assistant-text:
|
|
34
|
+
--chat-assistant-text: var(--chat-text);
|
|
35
|
+
--chat-input-bg: var(--chat-background);
|
|
36
|
+
--chat-input-text: var(--chat-text);
|
|
37
|
+
--chat-input-placeholder: var(--chat-text-muted);
|
|
38
|
+
--chat-thought-border: var(--chat-border);
|
|
39
|
+
|
|
40
|
+
/* Typography */
|
|
12
41
|
--chat-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
13
42
|
--chat-radius: 0.75rem;
|
|
14
|
-
--chat-input-bg: #ffffff;
|
|
15
|
-
--chat-input-text: #111827;
|
|
16
|
-
--chat-input-placeholder: #6b7280;
|
|
17
|
-
--chat-thought-border: #d1d5db;
|
|
18
|
-
|
|
19
|
-
/* font */
|
|
20
43
|
--chat-font-size: 0.925rem;
|
|
21
44
|
--chat-thought-font-size: 0.75rem;
|
|
45
|
+
|
|
46
|
+
/* Shadows (use semi-transparent for both light/dark) */
|
|
47
|
+
--chat-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
|
|
48
|
+
--chat-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
49
|
+
--chat-overlay-bg: rgba(0, 0, 0, 0.3);
|
|
22
50
|
}
|
|
23
51
|
|
|
24
52
|
.chat-widget {
|
|
53
|
+
position: relative;
|
|
25
54
|
display: flex;
|
|
26
55
|
flex-direction: column;
|
|
27
56
|
width: 100%;
|
|
@@ -30,7 +59,7 @@
|
|
|
30
59
|
background: var(--chat-background);
|
|
31
60
|
border: 1px solid var(--chat-border);
|
|
32
61
|
border-radius: var(--chat-radius);
|
|
33
|
-
box-shadow:
|
|
62
|
+
box-shadow: var(--chat-shadow);
|
|
34
63
|
overflow: hidden;
|
|
35
64
|
font-family: var(--chat-font-family);
|
|
36
65
|
color: var(--chat-assistant-text);
|
|
@@ -141,7 +170,7 @@
|
|
|
141
170
|
color: var(--chat-primary-text);
|
|
142
171
|
border: none;
|
|
143
172
|
border-radius: 999px;
|
|
144
|
-
box-shadow:
|
|
173
|
+
box-shadow: var(--chat-shadow);
|
|
145
174
|
cursor: pointer;
|
|
146
175
|
font-weight: 600;
|
|
147
176
|
z-index: 99999;
|
|
@@ -178,11 +207,20 @@
|
|
|
178
207
|
max-width: calc(100vw - 40px);
|
|
179
208
|
height: 500px;
|
|
180
209
|
max-height: calc(100vh - 140px);
|
|
181
|
-
box-shadow:
|
|
210
|
+
box-shadow: var(--chat-shadow);
|
|
182
211
|
border-radius: 12px;
|
|
183
212
|
overflow: hidden;
|
|
184
213
|
}
|
|
185
214
|
|
|
215
|
+
.chat-widget__markdown a {
|
|
216
|
+
color: var(--chat-primary);
|
|
217
|
+
text-decoration: underline;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.chat-widget__markdown a:hover {
|
|
221
|
+
color: var(--chat-primary-hover);
|
|
222
|
+
}
|
|
223
|
+
|
|
186
224
|
.chat-widget__markdown table {
|
|
187
225
|
width: 100%;
|
|
188
226
|
border-collapse: collapse;
|
|
@@ -220,7 +258,7 @@
|
|
|
220
258
|
align-items: center;
|
|
221
259
|
gap: 0.35rem;
|
|
222
260
|
cursor: pointer;
|
|
223
|
-
color:
|
|
261
|
+
color: var(--chat-text-muted);
|
|
224
262
|
font-size: 0.8125rem;
|
|
225
263
|
}
|
|
226
264
|
|
|
@@ -230,7 +268,7 @@
|
|
|
230
268
|
|
|
231
269
|
.chat-widget__thoughts-icon-container {
|
|
232
270
|
display: flex;
|
|
233
|
-
border: 1px solid
|
|
271
|
+
border: 1px solid var(--chat-border);
|
|
234
272
|
border-radius: 999px;
|
|
235
273
|
align-items: center;
|
|
236
274
|
justify-content: center;
|
|
@@ -263,7 +301,7 @@
|
|
|
263
301
|
.chat-widget__thoughts-text {
|
|
264
302
|
margin: 0;
|
|
265
303
|
line-height: 1.5;
|
|
266
|
-
color:
|
|
304
|
+
color: var(--chat-text-secondary);
|
|
267
305
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
268
306
|
white-space: pre-wrap;
|
|
269
307
|
word-break: break-word;
|
|
@@ -293,7 +331,7 @@
|
|
|
293
331
|
width: 0.5rem;
|
|
294
332
|
height: 0.5rem;
|
|
295
333
|
border-radius: 999px;
|
|
296
|
-
background:
|
|
334
|
+
background: var(--chat-text-disabled);
|
|
297
335
|
animation: chat-widget-bounce 1s infinite ease-in-out;
|
|
298
336
|
}
|
|
299
337
|
|
|
@@ -377,7 +415,7 @@
|
|
|
377
415
|
}
|
|
378
416
|
|
|
379
417
|
.chat-widget__submit:disabled {
|
|
380
|
-
color:
|
|
418
|
+
color: var(--chat-text-disabled);
|
|
381
419
|
cursor: not-allowed;
|
|
382
420
|
}
|
|
383
421
|
|
|
@@ -404,13 +442,13 @@
|
|
|
404
442
|
}
|
|
405
443
|
|
|
406
444
|
.chat-widget__mic-button:disabled {
|
|
407
|
-
color:
|
|
445
|
+
color: var(--chat-text-disabled);
|
|
408
446
|
cursor: not-allowed;
|
|
409
447
|
}
|
|
410
448
|
|
|
411
449
|
.chat-widget__mic-button--active {
|
|
412
450
|
color: var(--chat-primary-hover);
|
|
413
|
-
background:
|
|
451
|
+
background: var(--chat-primary-subtle);
|
|
414
452
|
}
|
|
415
453
|
|
|
416
454
|
.chat-widget__mic-icon {
|
|
@@ -425,7 +463,7 @@
|
|
|
425
463
|
width: 16px;
|
|
426
464
|
height: 2px;
|
|
427
465
|
border-radius: 999px;
|
|
428
|
-
background:
|
|
466
|
+
background: var(--chat-border);
|
|
429
467
|
overflow: hidden;
|
|
430
468
|
display: block;
|
|
431
469
|
transform: translateX(-50%);
|
|
@@ -460,7 +498,7 @@
|
|
|
460
498
|
}
|
|
461
499
|
|
|
462
500
|
.chat-widget__voice-button:disabled {
|
|
463
|
-
color:
|
|
501
|
+
color: var(--chat-text-disabled);
|
|
464
502
|
cursor: not-allowed;
|
|
465
503
|
}
|
|
466
504
|
|