@saar-ai/web-widget 0.2.0 → 0.3.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.
- package/dist/avatar-face.d.ts +33 -0
- package/dist/avatar-face.d.ts.map +1 -0
- package/dist/avatar.d.ts +17 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/bot-face.d.ts +17 -0
- package/dist/bot-face.d.ts.map +1 -1
- package/dist/chunks/{host-widget-iy3qC-1p.js → host-widget-BlihQKm5.js} +1362 -402
- package/dist/concierge-launcher.d.ts +4 -1
- package/dist/concierge-launcher.d.ts.map +1 -1
- package/dist/concierge-shell.d.ts +55 -6
- package/dist/concierge-shell.d.ts.map +1 -1
- package/dist/generated/widget-css.d.ts.map +1 -1
- package/dist/host-widget.d.ts +20 -1
- package/dist/host-widget.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/messages.d.ts +55 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/next/index.js +1 -1
- package/dist/rope-knot.d.ts +13 -0
- package/dist/rope-knot.d.ts.map +1 -0
- package/dist/session-log.d.ts +1 -1
- package/dist/session-log.d.ts.map +1 -1
- package/dist/use-chat-session.d.ts +65 -1
- package/dist/use-chat-session.d.ts.map +1 -1
- package/dist/voice-widget.d.ts +33 -4
- package/dist/voice-widget.d.ts.map +1 -1
- package/dist/widget-cards.d.ts +5 -2
- package/dist/widget-cards.d.ts.map +1 -1
- package/dist/widget.css +1 -1
- package/package.json +3 -2
- package/src/styles/concierge.css +377 -0
package/dist/messages.d.ts
CHANGED
|
@@ -45,7 +45,43 @@ export interface WidgetMessages {
|
|
|
45
45
|
readonly send: string;
|
|
46
46
|
readonly move: string;
|
|
47
47
|
readonly call_end: string;
|
|
48
|
+
/**
|
|
49
|
+
* The handoff MARKER — the quiet inline divider in the transcript at the
|
|
50
|
+
* point the conversation was handed to a person. Past tense on purpose: it
|
|
51
|
+
* records something that happened, so it is still true an hour later, which
|
|
52
|
+
* is what lets it stay in the thread forever.
|
|
53
|
+
*
|
|
54
|
+
* OPTIONAL, like every key added to this interface after 0.2.0, and this is
|
|
55
|
+
* a compatibility contract rather than a style choice: `WidgetMessages` is
|
|
56
|
+
* published, and a host that builds a COMPLETE catalogue of its own (rather
|
|
57
|
+
* than going through `resolveWidgetMessages`, which merges over the
|
|
58
|
+
* defaults) stops compiling the moment a required member appears. A missing
|
|
59
|
+
* key falls back to `defaultWidgetMessages` at the point of use, so an
|
|
60
|
+
* older catalogue renders shipped English for the new string instead of an
|
|
61
|
+
* empty divider.
|
|
62
|
+
*/
|
|
63
|
+
readonly handoff_event?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The PENDING line under that marker, shown only while nobody has replied
|
|
66
|
+
* yet — a promise, and the only part of the handoff that can go stale.
|
|
67
|
+
*
|
|
68
|
+
* The key keeps its original `escalated_banner` name even though it no
|
|
69
|
+
* longer names a banner: `WidgetMessages` is this package's published
|
|
70
|
+
* surface, so renaming it would break every consumer's override catalogue
|
|
71
|
+
* to relabel a string whose TEXT is unchanged.
|
|
72
|
+
*/
|
|
48
73
|
readonly escalated_banner: string;
|
|
74
|
+
/**
|
|
75
|
+
* The shopper's own send state, as an accessible name on the tick beside
|
|
76
|
+
* their bubble. Two states only — see `ChatTurnDelivery` for why the
|
|
77
|
+
* widget cannot honestly offer "delivered" or "read" on a shopper's OWN
|
|
78
|
+
* message, and does not invent them.
|
|
79
|
+
*
|
|
80
|
+
* Optional for the same published-interface reason as `handoff_event`
|
|
81
|
+
* above.
|
|
82
|
+
*/
|
|
83
|
+
readonly status_sending?: string;
|
|
84
|
+
readonly status_sent?: string;
|
|
49
85
|
readonly typing: string;
|
|
50
86
|
readonly suggestions_label: string;
|
|
51
87
|
readonly suggestion_1: string;
|
|
@@ -65,6 +101,17 @@ export interface WidgetMessages {
|
|
|
65
101
|
readonly cart_summary_total: string;
|
|
66
102
|
readonly checkout_now: string;
|
|
67
103
|
readonly checkout_failed: string;
|
|
104
|
+
/**
|
|
105
|
+
* The one-word voice-state pill under the orb, shown only while a call is
|
|
106
|
+
* active — see `ConciergeShellVoice.labels`'s matching four keys and the
|
|
107
|
+
* pill's own doc comment in `concierge-shell.tsx`. Optional, like every key
|
|
108
|
+
* added after 0.2.0 (see `handoff_event` above for the compatibility
|
|
109
|
+
* contract this follows).
|
|
110
|
+
*/
|
|
111
|
+
readonly voice_state_connecting?: string;
|
|
112
|
+
readonly voice_state_listening?: string;
|
|
113
|
+
readonly voice_state_thinking?: string;
|
|
114
|
+
readonly voice_state_speaking?: string;
|
|
68
115
|
}
|
|
69
116
|
/**
|
|
70
117
|
* Message keys that carry a `{product}` placeholder — the avatar's
|
|
@@ -72,7 +119,14 @@ export interface WidgetMessages {
|
|
|
72
119
|
* render time, never a brand name baked into this file (see the module doc
|
|
73
120
|
* comment).
|
|
74
121
|
*/
|
|
75
|
-
|
|
122
|
+
/**
|
|
123
|
+
* `Required<...>`, not `WidgetMessages`: keys added after 0.2.0 are optional
|
|
124
|
+
* on the INTERFACE so a host's own complete catalogue keeps compiling, but
|
|
125
|
+
* this object is the fallback every one of them resolves against, so it must
|
|
126
|
+
* define all of them. The type is what makes a forgotten default a compile
|
|
127
|
+
* error rather than an empty string on somebody's storefront.
|
|
128
|
+
*/
|
|
129
|
+
export declare const defaultWidgetMessages: Required<WidgetMessages>;
|
|
76
130
|
/**
|
|
77
131
|
* Interpolates `{token}` placeholders in a message template. Deliberately the
|
|
78
132
|
* same `{token}` syntax `next-intl`'s ICU messages use for a plain variable,
|
package/dist/messages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ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B,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAM9F;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAOzF;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC,CAGhG"}
|
package/dist/next/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as detectPage, t as ConciergeWidget } from "../chunks/host-widget-
|
|
1
|
+
import { s as detectPage, t as ConciergeWidget } from "../chunks/host-widget-BlihQKm5.js";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
3
3
|
import { usePathname, useRouter } from "next/navigation";
|
|
4
4
|
//#region src/next/use-next-bridge.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BotState } from './bot-state.js';
|
|
2
|
+
type Size = 'sm' | 'lg';
|
|
3
|
+
export interface RopeKnotProps {
|
|
4
|
+
state?: BotState;
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** Accessible name. Omitted ⇒ decorative; see `bot-face.tsx`'s `labelProps`. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Increment to replay the "cinch tight" click feedback (`rk-tighten` + `rk-tap`). */
|
|
9
|
+
tightenKey?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function RopeKnot({ state, size, label, tightenKey }: RopeKnotProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=rope-knot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rope-knot.d.ts","sourceRoot":"","sources":["../src/rope-knot.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAkG/C,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExB,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAc,EAAE,IAAW,EAAE,KAAK,EAAE,UAAc,EAAE,EAAE,aAAa,+BA2B7F"}
|
package/dist/session-log.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare const SESSION_EVENTS: readonly ['token_requested', 'token_receive
|
|
|
33
33
|
/** A tool rendered something on screen — product cards, a checkout control. */
|
|
34
34
|
'widget_event',
|
|
35
35
|
/** One arrived that the widget's own schema refuses. Dropped, never rendered. */
|
|
36
|
-
'widget_event_invalid', 'disconnected', 'stopped', 'error'];
|
|
36
|
+
'widget_event_invalid', 'disconnected', 'stopped', 'error', 'messages_read', 'messages_delivered'];
|
|
37
37
|
export type SessionEventKind = (typeof SESSION_EVENTS)[number];
|
|
38
38
|
export interface SessionLogEntry {
|
|
39
39
|
readonly kind: SessionEventKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-log.d.ts","sourceRoot":"","sources":["../src/session-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,yDAAyD;AACzD,eAAO,MAAM,cAAc,YACzB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,YAAY;AACZ,0DAA0D;AAC1D,cAAc;AACd,2EAA2E;AAC3E,gBAAgB;AAChB,sDAAsD;AACtD,WAAW;AACX,0EAA0E;AAC1E,cAAc;AACd,+EAA+E;AAC/E,cAAc;AACd,iFAAiF;AACjF,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,OAAO,
|
|
1
|
+
{"version":3,"file":"session-log.d.ts","sourceRoot":"","sources":["../src/session-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,yDAAyD;AACzD,eAAO,MAAM,cAAc,YACzB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,YAAY;AACZ,0DAA0D;AAC1D,cAAc;AACd,2EAA2E;AAC3E,gBAAgB;AAChB,sDAAsD;AACtD,WAAW;AACX,0EAA0E;AAC1E,cAAc;AACd,+EAA+E;AAC/E,cAAc;AACd,iFAAiF;AACjF,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,OAAO,EAQP,eAAe,EAKf,oBAAoB,CACZ,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B,YAAY,OAAO,EAAE,iBAAiB,EAGrC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAa/D;IAED,oBAAoB;IACpB,IAAI,IAAI,SAAS,eAAe,EAAE,CAEjC;IAED,yEAAyE;IACzE,KAAK,IAAI,IAAI,CAEZ;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,IAAI,EAAE,gBAAgB,EACtB,EAAE,EAAE,gBAAgB,GACnB,MAAM,GAAG,IAAI,CAKf;AAED,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAG3C"}
|
|
@@ -155,12 +155,46 @@ export interface ChatAttachment {
|
|
|
155
155
|
readonly url: string;
|
|
156
156
|
readonly expiresAt: string;
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* What the shopper's own bubble can honestly claim, and nothing more.
|
|
160
|
+
*
|
|
161
|
+
* `'sending'` — appended optimistically, nothing has accepted it yet.
|
|
162
|
+
* `'sent'` — `POST /widget/chat` (or the attachment confirm) returned ok, so
|
|
163
|
+
* the server has the message.
|
|
164
|
+
*
|
|
165
|
+
* There is deliberately no `'delivered'` or `'read'` here, and adding one
|
|
166
|
+
* would be a lie this client cannot back. "Delivered" for an OUTBOUND turn
|
|
167
|
+
* means it reached the shopper's browser, which the widget observes directly
|
|
168
|
+
* (see the receipt reporter below) — but for the shopper's own INBOUND
|
|
169
|
+
* message it would mean it reached the operator or the model, and nothing in
|
|
170
|
+
* this transport reports that. An agent reply arriving is evidence about the
|
|
171
|
+
* reply, not a receipt for the message that prompted it, and the operator's
|
|
172
|
+
* inbox read state (`desk-overview.service.ts`'s `markRead`) is a fact about
|
|
173
|
+
* an OPERATOR's screen that the widget is not told and should not guess at.
|
|
174
|
+
* Absent, not fabricated — same discipline `Turn.readAt` states api-side.
|
|
175
|
+
*/
|
|
176
|
+
export type ChatTurnDelivery = 'sending' | 'sent';
|
|
177
|
+
/** The transcript EVENTS this widget can render — things that HAPPENED, not things anybody said. */
|
|
178
|
+
export type ChatTurnEvent = 'handoff';
|
|
158
179
|
export interface ChatTurn {
|
|
159
180
|
readonly id: string;
|
|
160
|
-
|
|
181
|
+
/**
|
|
182
|
+
* `'event'` is not a participant: it marks a transcript row that records
|
|
183
|
+
* something that happened AT this point in the conversation (today, only
|
|
184
|
+
* the handoff to a human). It rides in `turns` rather than beside them so
|
|
185
|
+
* it holds a position in the thread and scrolls with it — a bar pinned
|
|
186
|
+
* under the transcript can say neither WHEN the handoff happened nor stop
|
|
187
|
+
* being true once a human has answered, which is exactly how the previous
|
|
188
|
+
* escalation banner went stale in production.
|
|
189
|
+
*/
|
|
190
|
+
readonly speaker: 'caller' | 'agent' | 'event';
|
|
161
191
|
readonly text: string;
|
|
162
192
|
/** `false` while an agent turn is still streaming in. */
|
|
163
193
|
readonly final: boolean;
|
|
194
|
+
/** Which event this row records. Present iff `speaker === 'event'`. */
|
|
195
|
+
readonly event?: ChatTurnEvent;
|
|
196
|
+
/** The shopper's own send state. Caller turns only — see {@link ChatTurnDelivery}. */
|
|
197
|
+
readonly delivery?: ChatTurnDelivery;
|
|
164
198
|
/** Product cards the agent attached to THIS turn, if any. */
|
|
165
199
|
readonly cards?: ChatCards;
|
|
166
200
|
/** Files carried on THIS turn, either direction. Empty/absent for a turn with none. */
|
|
@@ -216,6 +250,36 @@ export interface UseChatSessionOptions {
|
|
|
216
250
|
* this option is purely additive.
|
|
217
251
|
*/
|
|
218
252
|
readonly collector?: VisitorEventCollector;
|
|
253
|
+
/**
|
|
254
|
+
* Overridable for tests; defaults to `Date.now`.
|
|
255
|
+
*
|
|
256
|
+
* ## Why NOT `performance.now`, unlike `session-log.ts`'s identical seam
|
|
257
|
+
*
|
|
258
|
+
* This used to be `performance.now`, borrowing that file's monotonic-clock
|
|
259
|
+
* reasoning. The two seams measure different things and the reasoning does
|
|
260
|
+
* not transfer. `SessionLog` measures gaps BETWEEN events on one screen,
|
|
261
|
+
* where a monotonic clock is exactly right and a suspended machine is not
|
|
262
|
+
* time anybody cares about. The receipt reporter measures elapsed
|
|
263
|
+
* REAL-WORLD time, because the server turns it back into a wall-clock
|
|
264
|
+
* instant (`occurredAt = conversation_sessions.started_at + sinceStartMs`)
|
|
265
|
+
* and compares it against a turn's wall-clock `completedAt`.
|
|
266
|
+
*
|
|
267
|
+
* `performance.now` does not advance while the machine is suspended. A tab
|
|
268
|
+
* left open across a lid-close therefore under-counts elapsed time by the
|
|
269
|
+
* whole sleep, and every later receipt lands that far in the server's past
|
|
270
|
+
* — reintroducing, by a second route, the exact defect the boot anchor
|
|
271
|
+
* fixed (see `sessionOriginRef`).
|
|
272
|
+
*
|
|
273
|
+
* The wall clock's own hazard is a STEP, not skew: this hook only ever
|
|
274
|
+
* takes a DIFFERENCE of two readings from the same clock, so a device
|
|
275
|
+
* whose clock is simply set wrong cancels out entirely (which is the skew
|
|
276
|
+
* the ingest contract's relative-offset shape exists to defeat, and it
|
|
277
|
+
* still does). A backwards step under-counts and fails closed — a missing
|
|
278
|
+
* tick, never a false one. A forwards step over-counts, and the server
|
|
279
|
+
* clamps that: `WidgetChatService.recordClientIngestBatch` refuses to write
|
|
280
|
+
* any event later than the moment the batch arrived.
|
|
281
|
+
*/
|
|
282
|
+
readonly now?: () => number;
|
|
219
283
|
}
|
|
220
284
|
export interface WidgetEventInput {
|
|
221
285
|
readonly kind: 'page.viewed' | 'product.viewed' | 'cart.viewed' | 'cart.changed' | 'checkout.handoff';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-chat-session.d.ts","sourceRoot":"","sources":["../src/use-chat-session.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAEtE;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,CAAC;AAEvF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qKAAqK;IACrK,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM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,CAo5BnF"}
|
package/dist/voice-widget.d.ts
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type WidgetMessages } from './messages.js';
|
|
3
|
-
import { type ConciergeCallPhase } from './concierge-shell.js';
|
|
3
|
+
import { type ConciergeCallPhase, type WidgetAttribution } from './concierge-shell.js';
|
|
4
4
|
import type { ConciergePosition } from './position.js';
|
|
5
5
|
import type { BotState } from './bot-state.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { WidgetAvatar } from './avatar.js';
|
|
7
|
+
import type { ChatAttachment, ChatCardItem, ChatCards, ChatTurnDelivery, ChatTurnEvent } from './use-chat-session.js';
|
|
7
8
|
import { type WidgetNavigate } from './widget-cards.js';
|
|
8
9
|
import { type WidgetCartLine } from './widget-cart-summary.js';
|
|
9
10
|
export interface WidgetTurn {
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `'event'` is not a participant — it marks a transcript row recording
|
|
13
|
+
* something that HAPPENED at this point in the thread (today: the handoff
|
|
14
|
+
* to a human). See `ChatTurn.speaker` for why this rides in the turn list
|
|
15
|
+
* rather than as chrome beside it.
|
|
16
|
+
*/
|
|
17
|
+
readonly speaker: 'caller' | 'agent' | 'event';
|
|
18
|
+
/** Which event this row records. Present iff `speaker === 'event'`. */
|
|
19
|
+
readonly event?: ChatTurnEvent;
|
|
20
|
+
/**
|
|
21
|
+
* The shopper's own send state, drawn as a small status beside their
|
|
22
|
+
* bubble. Absent ⇒ nothing is drawn, which is the right answer for an
|
|
23
|
+
* agent turn and for a SPOKEN caller line (a voice transcript line has no
|
|
24
|
+
* send to have succeeded or failed).
|
|
25
|
+
*/
|
|
26
|
+
readonly delivery?: ChatTurnDelivery;
|
|
11
27
|
readonly text: string;
|
|
12
28
|
/** The locale THIS line was spoken in, which need not be the page's. */
|
|
13
29
|
readonly locale: string;
|
|
@@ -119,6 +135,19 @@ export interface VoiceWidgetProps {
|
|
|
119
135
|
* `ConciergeShell`'s own `skinStyle` prop. See that prop's doc comment.
|
|
120
136
|
*/
|
|
121
137
|
readonly skinStyle?: CSSProperties;
|
|
138
|
+
/**
|
|
139
|
+
* Which face renders — forwarded straight through to `ConciergeShell`'s
|
|
140
|
+
* own `avatar` prop, computed by `host-widget.tsx` from the tenant's
|
|
141
|
+
* published `appearance.avatar` the same way `skinStyle` is computed from
|
|
142
|
+
* the brand colours. Defaults to `'orb'`; see `avatar.ts`.
|
|
143
|
+
*/
|
|
144
|
+
readonly avatar?: WidgetAvatar;
|
|
145
|
+
/**
|
|
146
|
+
* Forwarded straight through to `ConciergeShell`'s own `attribution` prop —
|
|
147
|
+
* see that prop's doc comment for why this package never resolves it
|
|
148
|
+
* itself. Absent ⇒ no attribution link renders.
|
|
149
|
+
*/
|
|
150
|
+
readonly attribution?: WidgetAttribution;
|
|
122
151
|
}
|
|
123
152
|
/**
|
|
124
153
|
* Does this line read as "I want to pay now"?
|
|
@@ -163,5 +192,5 @@ export declare function readsAsCheckoutIntent(text: string): boolean;
|
|
|
163
192
|
* `dir`, resolved from that line's locale rather than inherited from the page —
|
|
164
193
|
* inheriting is what renders Arabic punctuation on the wrong end of a sentence.
|
|
165
194
|
*/
|
|
166
|
-
export declare function VoiceWidget({ state, turns, onToggleMic, onEndCall, callPhase, onSendText, micOpen, open, onOpenChange, status, mode, escalated, onAddToCart, curationHref, productHref, onAttachFile, launcherLabel, position, onPositionChange, cart, messages, navigate, locale, skinStyle, }: VoiceWidgetProps): import("react").JSX.Element;
|
|
195
|
+
export declare function VoiceWidget({ state, turns, onToggleMic, onEndCall, callPhase, onSendText, micOpen, open, onOpenChange, status, mode, escalated, onAddToCart, curationHref, productHref, onAttachFile, launcherLabel, position, onPositionChange, cart, messages, navigate, locale, skinStyle, avatar, attribution, }: VoiceWidgetProps): import("react").JSX.Element;
|
|
167
196
|
//# sourceMappingURL=voice-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-widget.d.ts","sourceRoot":"","sources":["../src/voice-widget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,
|
|
1
|
+
{"version":3,"file":"voice-widget.d.ts","sourceRoot":"","sources":["../src/voice-widget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4IlF,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/C,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CA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C1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAa3D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,SAAkB,EAClB,UAAU,EACV,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,IAAc,EACd,SAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,IAAI,EACJ,QAAgC,EAChC,QAAQ,EACR,MAAa,EACb,SAAS,EACT,MAAM,EACN,WAAW,GACZ,EAAE,gBAAgB,+BA8clB"}
|
package/dist/widget-cards.d.ts
CHANGED
|
@@ -12,8 +12,11 @@ export interface WidgetCardListProps {
|
|
|
12
12
|
readonly cards: ChatCards;
|
|
13
13
|
/**
|
|
14
14
|
* `true` when the widget is in its expanded (80% viewport) size, which is
|
|
15
|
-
* wide enough to stand the cards side by side instead of
|
|
16
|
-
*
|
|
15
|
+
* wide enough to stand the cards side by side in a grid instead of the
|
|
16
|
+
* panel's own horizontally-scrolling snap carousel (`false`, the default).
|
|
17
|
+
* Also switches `CardBody`'s own layout — the grid keeps the image beside
|
|
18
|
+
* the text (there is width to spare); the carousel's narrower card puts it
|
|
19
|
+
* above instead.
|
|
17
20
|
*/
|
|
18
21
|
readonly roomy?: boolean;
|
|
19
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-cards.d.ts","sourceRoot":"","sources":["../src/widget-cards.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAu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