@saar-ai/web-widget 0.21.0 → 0.23.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 (40) hide show
  1. package/dist/avatar-face.d.ts +4 -1
  2. package/dist/avatar-face.d.ts.map +1 -1
  3. package/dist/chunks/{chat-DrpWeT5w.js → chat-BBmFAzkg.js} +57 -1
  4. package/dist/chunks/{host-widget-D675mXsN.js → host-widget-BARJFMPt.js} +492 -137
  5. package/dist/concierge-shell.css +1 -1
  6. package/dist/dock/dock-renderer.d.ts +1 -1
  7. package/dist/dock/dock-renderer.d.ts.map +1 -1
  8. package/dist/dock/dock.d.ts +5 -0
  9. package/dist/dock/dock.d.ts.map +1 -1
  10. package/dist/generated/concierge-shell-css.d.ts.map +1 -1
  11. package/dist/generated/widget-css.d.ts.map +1 -1
  12. package/dist/host-widget.d.ts.map +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -4
  16. package/dist/messages.d.ts +15 -0
  17. package/dist/messages.d.ts.map +1 -1
  18. package/dist/next/index.js +1 -1
  19. package/dist/use-chat-session.d.ts +15 -3
  20. package/dist/use-chat-session.d.ts.map +1 -1
  21. package/dist/use-voice-session.d.ts +19 -0
  22. package/dist/use-voice-session.d.ts.map +1 -1
  23. package/dist/variant-option-groups.d.ts +44 -0
  24. package/dist/variant-option-groups.d.ts.map +1 -0
  25. package/dist/variant-options.d.ts +34 -0
  26. package/dist/variant-options.d.ts.map +1 -0
  27. package/dist/voice-widget.d.ts +16 -3
  28. package/dist/voice-widget.d.ts.map +1 -1
  29. package/dist/widget/call-view.d.ts +42 -7
  30. package/dist/widget/call-view.d.ts.map +1 -1
  31. package/dist/widget/concierge-shell.d.ts +8 -4
  32. package/dist/widget/concierge-shell.d.ts.map +1 -1
  33. package/dist/widget/shell-renderer.d.ts +1 -1
  34. package/dist/widget/shell-renderer.d.ts.map +1 -1
  35. package/dist/widget.css +1 -1
  36. package/package.json +1 -1
  37. package/src/styles/call-view.css +104 -30
  38. package/src/styles/concierge-shell-entry.css +1 -0
  39. package/src/styles/mark.css +39 -5
  40. package/src/styles/widget-panel.css +29 -26
@@ -1,9 +1,12 @@
1
1
  /*
2
2
  * The widget mark's motion (`src/widget/mark.tsx`). Geometry and colour are
3
3
  * inline styles from `widget/mark-look.ts`, shared with the cold launcher;
4
- * only state lives here. Three keyframes, for the `ui-widget` budget: the
5
- * monogram and the dot carry state through the ring and the arc alone.
6
- * Transform and opacity only; nothing animates under `prefers-reduced-motion`.
4
+ * only state lives here, one look per state (SAA-503): connecting blinks the
5
+ * bars in sequence, listening sways them slowly with a ripple, thinking lays
6
+ * them flat under an orbiting arc, speaking moves them fast and pulses the
7
+ * disc, muted greys the disc with the bars still. The monogram and the dot
8
+ * carry state through the ring, the arc and the disc. Transform and opacity
9
+ * only; nothing animates under `prefers-reduced-motion`.
7
10
  */
8
11
  @keyframes wmk-eq {
9
12
  from {
@@ -23,6 +26,20 @@
23
26
  opacity: 0;
24
27
  }
25
28
  }
29
+ @keyframes wmk-blink {
30
+ 0%,
31
+ 100% {
32
+ opacity: 0.35;
33
+ }
34
+ 50% {
35
+ opacity: 1;
36
+ }
37
+ }
38
+ @keyframes wmk-pulse {
39
+ to {
40
+ transform: scale(1.06);
41
+ }
42
+ }
26
43
  @keyframes wmk-spin {
27
44
  to {
28
45
  transform: rotate(360deg);
@@ -46,10 +63,27 @@
46
63
  .wmk[data-mark-state='speaking'] .wmk-i {
47
64
  animation: wmk-eq 0.42s ease-in-out infinite alternate;
48
65
  }
66
+ .wmk[data-mark-state='speaking'] {
67
+ animation: wmk-pulse 0.84s ease-in-out infinite alternate;
68
+ }
49
69
  .wmk[data-mark-state='connecting'] .wmk-i {
50
- animation: wmk-eq 1.1s ease-in-out infinite alternate;
70
+ transform: scaleY(0.2) !important;
71
+ animation: wmk-blink 1.1s ease-in-out infinite;
72
+ }
73
+ .wmk[data-mark-state='connecting'] .wmk-i:nth-child(1) {
74
+ animation-delay: -1.1s !important;
75
+ }
76
+ .wmk[data-mark-state='connecting'] .wmk-i:nth-child(2) {
77
+ animation-delay: -0.95s !important;
78
+ }
79
+ .wmk[data-mark-state='connecting'] .wmk-i:nth-child(3) {
80
+ animation-delay: -0.8s !important;
81
+ }
82
+ .wmk[data-mark-state='connecting'] .wmk-i:nth-child(4) {
83
+ animation-delay: -0.65s !important;
51
84
  }
52
- .wmk[data-mark-state='thinking'] .wmk-i {
85
+ .wmk[data-mark-state='thinking'] .wmk-i,
86
+ .wmk[data-mark-state='muted'] .wmk-i {
53
87
  transform: scaleY(0.2) !important;
54
88
  }
55
89
  .wmk-r {
@@ -34,6 +34,7 @@
34
34
  --wgp-bd: var(--wgt-border, rgb(28 22 24 / 0.12));
35
35
  --wgp-ring: var(--wgt-ring, #111827);
36
36
  --wgp-ink: var(--wgt-accent-ink, #111827);
37
+ --wgp-fade-t: 24px;
37
38
  }
38
39
 
39
40
  .wgp {
@@ -98,7 +99,6 @@
98
99
  .wgp-hd {
99
100
  position: relative;
100
101
  z-index: 2;
101
- border-block-end: 1px solid var(--wgp-bd);
102
102
  }
103
103
 
104
104
  /* The orb and the knot are drawn at 64px and shown at 34; the mark is drawn at 34. */
@@ -141,28 +141,7 @@
141
141
  line-height: 1.35;
142
142
  }
143
143
 
144
- .wgp-pill {
145
- display: inline-flex;
146
- align-items: center;
147
- gap: 6px;
148
- font-variant-numeric: tabular-nums;
149
- transition: opacity 0.3s ease;
150
- }
151
-
152
- .wgp-pill:empty {
153
- display: none;
154
- }
155
-
156
- .wgp-pill > [aria-hidden] {
157
- flex: none;
158
- width: 7px;
159
- height: 7px;
160
- border-radius: 50%;
161
- background: var(--wgp-mu);
162
- }
163
-
164
144
  /* The fallback is `LIVE_COLOR` (`widget/launcher-look.ts`). */
165
- .wgp-pill > [data-live],
166
145
  .wgc-tm > i {
167
146
  background: var(--wgt-live, #e5484d);
168
147
  }
@@ -210,25 +189,25 @@
210
189
  }
211
190
 
212
191
  .wgp-ib[data-end],
213
- .wgc-ctl > button[data-end] {
192
+ .wgc-cw > button[data-end] {
214
193
  background: #d92d20;
215
194
  color: #fff;
216
195
  }
217
196
 
218
- /* The scrolling log's edge fade; the call view sets its own depths. */
197
+ /* The scrolling log's edge fade, one for both: turns fade under the header, no divider. */
219
198
  .wgp-msgs,
220
199
  .wgc-log {
221
200
  -webkit-mask-image: linear-gradient(
222
201
  180deg,
223
202
  transparent,
224
- #000 var(--wgp-fade-t, 14px),
203
+ #000 var(--wgp-fade-t),
225
204
  #000 calc(100% - var(--wgp-fade-b, 14px)),
226
205
  transparent
227
206
  );
228
207
  mask-image: linear-gradient(
229
208
  180deg,
230
209
  transparent,
231
- #000 var(--wgp-fade-t, 14px),
210
+ #000 var(--wgp-fade-t),
232
211
  #000 calc(100% - var(--wgp-fade-b, 14px)),
233
212
  transparent
234
213
  );
@@ -297,6 +276,25 @@
297
276
  animation-iteration-count: infinite;
298
277
  }
299
278
 
279
+ /* The pending agent turn says what it is, in the stream (SAA-503). */
280
+ .wgp [data-testid='widget-typing'] > .sr-only,
281
+ .wgp-typing > .sr-only {
282
+ position: static;
283
+ width: auto;
284
+ height: auto;
285
+ margin: 0;
286
+ margin-inline-end: 4px;
287
+ overflow: visible;
288
+ clip: auto;
289
+ clip-path: none;
290
+ color: var(--wgp-mu);
291
+ font-size: 13.5px;
292
+ white-space: nowrap;
293
+ }
294
+ .wgp [data-testid='widget-typing'] > .sr-only::after,
295
+ .wgp-typing > .sr-only::after {
296
+ content: '…';
297
+ }
300
298
  .wgp-typing {
301
299
  display: flex;
302
300
  align-items: center;
@@ -551,6 +549,11 @@
551
549
  background: var(--wgp-p);
552
550
  color: var(--wgp-op);
553
551
  }
552
+ .wgp .wgp-send:disabled {
553
+ background: var(--wgp-s3);
554
+ color: var(--wgp-mu);
555
+ opacity: 1;
556
+ }
554
557
 
555
558
  .wgp-count {
556
559
  position: absolute;