@saar-ai/web-widget 0.18.0 → 0.20.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 (42) hide show
  1. package/dist/chunks/{chat-DHMjOVms.js → chat-Bm4MPdY9.js} +25 -1
  2. package/dist/chunks/{form-fill-dom-D4ZMwxX1.js → form-fill-dom-Dxt-z0H0.js} +4 -0
  3. package/dist/chunks/{host-widget-BhtqtvaY.js → host-widget-kHzdanwT.js} +265 -72
  4. package/dist/concierge-shell.css +1 -1
  5. package/dist/dock/dock-sheet.d.ts.map +1 -1
  6. package/dist/form-fill/form-fill-dom.d.ts +5 -11
  7. package/dist/form-fill/form-fill-dom.d.ts.map +1 -1
  8. package/dist/generated/concierge-shell-css.d.ts.map +1 -1
  9. package/dist/generated/widget-css.d.ts.map +1 -1
  10. package/dist/host-widget.d.ts.map +1 -1
  11. package/dist/index.js +14 -14
  12. package/dist/messages.d.ts +13 -0
  13. package/dist/messages.d.ts.map +1 -1
  14. package/dist/next/index.js +1 -1
  15. package/dist/scroll-row.d.ts +29 -0
  16. package/dist/scroll-row.d.ts.map +1 -0
  17. package/dist/spoken-transcript.d.ts +2 -0
  18. package/dist/spoken-transcript.d.ts.map +1 -1
  19. package/dist/turn-order.d.ts +2 -1
  20. package/dist/turn-order.d.ts.map +1 -1
  21. package/dist/use-voice-session.d.ts.map +1 -1
  22. package/dist/widget/call-view.d.ts +32 -2
  23. package/dist/widget/call-view.d.ts.map +1 -1
  24. package/dist/widget/concierge-launcher.d.ts +6 -1
  25. package/dist/widget/concierge-launcher.d.ts.map +1 -1
  26. package/dist/widget/concierge-shell.d.ts +2 -0
  27. package/dist/widget/concierge-shell.d.ts.map +1 -1
  28. package/dist/widget/launcher-look.d.ts.map +1 -1
  29. package/dist/widget/mic-button.d.ts +4 -0
  30. package/dist/widget/mic-button.d.ts.map +1 -1
  31. package/dist/widget/shell-renderer.d.ts +1 -1
  32. package/dist/widget/shell-renderer.d.ts.map +1 -1
  33. package/dist/widget-cards.d.ts.map +1 -1
  34. package/dist/widget-cart-summary.d.ts.map +1 -1
  35. package/dist/widget.css +1 -1
  36. package/package.json +11 -7
  37. package/src/styles/call-view.css +13 -3
  38. package/src/styles/concierge-shell-entry.css +1 -0
  39. package/src/styles/concierge.css +3 -0
  40. package/src/styles/scroll-row.css +62 -0
  41. package/src/styles/tokens.css +1 -1
  42. package/src/styles/widget-entry.css +1 -0
@@ -309,6 +309,29 @@ var WidgetChatFillFormEventSchema = object({
309
309
  fields: array(WidgetFillFormFieldSchema).min(1).max(30),
310
310
  submit: boolean()
311
311
  }).strict();
312
+ /**
313
+ * The widget reporting how a fill went, so the concierge can say "filled,
314
+ * press Send" or "the form is not on this page" (SAA-497). Enums and a count
315
+ * only: never a value, a selector or a control name. Client-asserted like
316
+ * every report; the enquiry was recorded before the fill was asked for.
317
+ */
318
+ var WidgetFormFillReportSchema = object({
319
+ kind: literal("form_fill"),
320
+ outcome: _enum([
321
+ "submitted",
322
+ "needs-visitor",
323
+ "not-found",
324
+ "refused"
325
+ ]),
326
+ filled: number().int().min(0).max(30),
327
+ botProtection: _enum([
328
+ "recaptcha",
329
+ "hcaptcha",
330
+ "turnstile",
331
+ "friendly-captcha",
332
+ "sitekey"
333
+ ]).nullable()
334
+ }).strict();
312
335
  //#endregion
313
336
  //#region ../widget-protocol/dist/chat.js
314
337
  /**
@@ -849,7 +872,8 @@ var WidgetChatReportSchema = discriminatedUnion("kind", [
849
872
  WidgetSpotlightFailedReportSchema,
850
873
  WidgetNavigateFailedReportSchema,
851
874
  WidgetVariantChoiceRequestReportSchema,
852
- WidgetCaptureCardReportSchema
875
+ WidgetCaptureCardReportSchema,
876
+ WidgetFormFillReportSchema
853
877
  ]);
854
878
  /**
855
879
  * Parse a request body's `report` field. Never throws — the caller decides
@@ -135,6 +135,7 @@ function handBack(form) {
135
135
  */
136
136
  function fillHostForm(doc, request) {
137
137
  const none = (outcome) => ({
138
+ kind: "form_fill",
138
139
  outcome,
139
140
  filled: 0,
140
141
  botProtection: null
@@ -163,6 +164,7 @@ function fillHostForm(doc, request) {
163
164
  if (botProtection !== null || !request.submit || filled < wanted || typeof form.requestSubmit !== "function") {
164
165
  handBack(form);
165
166
  return {
167
+ kind: "form_fill",
166
168
  outcome: "needs-visitor",
167
169
  filled,
168
170
  botProtection
@@ -172,6 +174,7 @@ function fillHostForm(doc, request) {
172
174
  form.reportValidity();
173
175
  handBack(form);
174
176
  return {
177
+ kind: "form_fill",
175
178
  outcome: "needs-visitor",
176
179
  filled,
177
180
  botProtection: null
@@ -179,6 +182,7 @@ function fillHostForm(doc, request) {
179
182
  }
180
183
  form.requestSubmit();
181
184
  return {
185
+ kind: "form_fill",
182
186
  outcome: "submitted",
183
187
  filled,
184
188
  botProtection: null