@saar-ai/web-widget 0.9.0 → 0.11.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 (78) hide show
  1. package/dist/adopt-stylesheet.d.ts +11 -0
  2. package/dist/adopt-stylesheet.d.ts.map +1 -0
  3. package/dist/chunks/{chat-DAgqVvIS.js → chat-CU9VPqVO.js} +112 -16
  4. package/dist/chunks/{host-widget-CTK7C95y.js → host-widget-BZKCb7yR.js} +7752 -989
  5. package/dist/chunks/{schemas-D-uDc-9q.js → schemas-YN3wGSGZ.js} +7 -4
  6. package/dist/chunks/{telemetry-DQUulENJ.js → telemetry-B1xBTk1s.js} +1 -1
  7. package/dist/concierge-shell.css +2 -0
  8. package/dist/concierge-state.d.ts +234 -0
  9. package/dist/concierge-state.d.ts.map +1 -0
  10. package/dist/dock/dock-drag.d.ts +5 -5
  11. package/dist/dock/dock-drag.d.ts.map +1 -1
  12. package/dist/dock/dock-float.d.ts +116 -0
  13. package/dist/dock/dock-float.d.ts.map +1 -0
  14. package/dist/dock/dock-motion.d.ts +61 -6
  15. package/dist/dock/dock-motion.d.ts.map +1 -1
  16. package/dist/dock/dock-pill.d.ts +18 -1
  17. package/dist/dock/dock-pill.d.ts.map +1 -1
  18. package/dist/dock/dock-renderer.d.ts +3 -0
  19. package/dist/dock/dock-renderer.d.ts.map +1 -0
  20. package/dist/dock/dock-row.d.ts +128 -10
  21. package/dist/dock/dock-row.d.ts.map +1 -1
  22. package/dist/dock/dock-sheet.d.ts.map +1 -1
  23. package/dist/dock/dock-state.d.ts +115 -135
  24. package/dist/dock/dock-state.d.ts.map +1 -1
  25. package/dist/dock/dock.d.ts +103 -24
  26. package/dist/dock/dock.d.ts.map +1 -1
  27. package/dist/dock/geometry.d.ts +129 -3
  28. package/dist/dock/geometry.d.ts.map +1 -1
  29. package/dist/generated/concierge-shell-css.d.ts +2 -0
  30. package/dist/generated/concierge-shell-css.d.ts.map +1 -0
  31. package/dist/generated/widget-css.d.ts.map +1 -1
  32. package/dist/host-widget.d.ts +84 -2
  33. package/dist/host-widget.d.ts.map +1 -1
  34. package/dist/index.d.ts +9 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +206 -4024
  37. package/dist/messages.d.ts +88 -1
  38. package/dist/messages.d.ts.map +1 -1
  39. package/dist/mount.d.ts +4 -5
  40. package/dist/mount.d.ts.map +1 -1
  41. package/dist/next/index.js +1 -1
  42. package/dist/renderers.d.ts +3 -0
  43. package/dist/renderers.d.ts.map +1 -0
  44. package/dist/rope-knot.d.ts +67 -0
  45. package/dist/rope-knot.d.ts.map +1 -1
  46. package/dist/styles.d.ts +1 -0
  47. package/dist/styles.d.ts.map +1 -1
  48. package/dist/theme/derive.d.ts +1 -1
  49. package/dist/theme/derive.d.ts.map +1 -1
  50. package/dist/use-chat-session.d.ts +33 -1
  51. package/dist/use-chat-session.d.ts.map +1 -1
  52. package/dist/use-voice-session.d.ts +2 -0
  53. package/dist/use-voice-session.d.ts.map +1 -1
  54. package/dist/voice-widget.d.ts +114 -3
  55. package/dist/voice-widget.d.ts.map +1 -1
  56. package/dist/widget/concierge-launcher.d.ts +53 -0
  57. package/dist/widget/concierge-launcher.d.ts.map +1 -0
  58. package/dist/widget/concierge-shell.d.ts +255 -0
  59. package/dist/widget/concierge-shell.d.ts.map +1 -0
  60. package/dist/widget/position.d.ts +65 -0
  61. package/dist/widget/position.d.ts.map +1 -0
  62. package/dist/widget/shell-renderer.d.ts +3 -0
  63. package/dist/widget/shell-renderer.d.ts.map +1 -0
  64. package/dist/widget/transcript-geometry.d.ts +220 -0
  65. package/dist/widget/transcript-geometry.d.ts.map +1 -0
  66. package/dist/widget/widget-view.d.ts +74 -0
  67. package/dist/widget/widget-view.d.ts.map +1 -0
  68. package/dist/widget-cards.d.ts +21 -1
  69. package/dist/widget-cards.d.ts.map +1 -1
  70. package/dist/widget-cart-summary.d.ts +10 -1
  71. package/dist/widget-cart-summary.d.ts.map +1 -1
  72. package/dist/widget.css +1 -1
  73. package/package.json +7 -3
  74. package/src/styles/concierge-shell-entry.css +42 -0
  75. package/src/styles/concierge.css +528 -65
  76. package/src/styles/dock-surface.css +284 -0
  77. package/src/styles/tokens.css +22 -6
  78. package/src/styles/widget-entry.css +42 -1
@@ -53,6 +53,16 @@ export declare const DESKTOP_BOTTOM = 16;
53
53
  * somewhere that says why there is nothing added to it.
54
54
  */
55
55
  export declare const SHEET_GAP = 0;
56
+ /**
57
+ * How far the visor's floor sits BEHIND the row (§3.3, revised 2026-09-15).
58
+ *
59
+ * Half a row: the row paints over the visor's rim, so the transcript reads as
60
+ * a head-up display sliding out from behind the dock rather than a sheet
61
+ * stacked on top of it, and the row keeps its full pill shape with nothing to
62
+ * square off against. The sheet's `bottom` is `calc(var(--wgt-row-h) / 2)` and
63
+ * its body is padded by the same amount so the last line clears the rim.
64
+ */
65
+ export declare const SHEET_TUCK: number;
56
66
  /** The one breakpoint. Below it the dock is full-width and thumb-anchored. */
57
67
  export declare const DESKTOP_BREAKPOINT = 768;
58
68
  /**
@@ -125,6 +135,25 @@ export declare const DOCK_ALIGN_STORAGE_KEY = "wgt_dock_align";
125
135
  * alignment is written and the press's own click is left to run.
126
136
  */
127
137
  export declare const DRAG_TAP_SLOP_PX = 6;
138
+ /**
139
+ * How long a completed DRAG may suppress a click after it (§9.1).
140
+ *
141
+ * A drag's trailing `click` is dispatched immediately after the `pointerup`
142
+ * that ended it, so any window at all is enough for the suppression it is for
143
+ * — and the window is what stops the suppression outliving its gesture. Some
144
+ * gestures trail no click: `pointercancel` (the browser taking the gesture
145
+ * back for its own scroll, an OS-interrupted touch) fires none, and a mouse
146
+ * released off the button fires it on an ancestor, so the control's own
147
+ * handler never runs and never consumes the flag. Left armed, it ate the next
148
+ * press that arrived with no `pointerdown` in front of it — `Enter` or `Space`
149
+ * on the mark or the pill, which is exactly §11's keyboard route to §5.4's
150
+ * minimise and back.
151
+ *
152
+ * 400 ms: comfortably longer than the gap between a release and its click on
153
+ * any real device, and far shorter than any pause a shopper would read as
154
+ * "the control is broken".
155
+ */
156
+ export declare const DRAG_CLICK_WINDOW_MS = 400;
128
157
  /**
129
158
  * Where a released drag lands (§9.1): the third of the viewport the dock's
130
159
  * CENTRE finished in.
@@ -165,8 +194,57 @@ export declare function writeStored(win: Window, key: string, value: string): vo
165
194
  */
166
195
  export declare function readStoredAlign(win: Window): DesktopAlign | undefined;
167
196
  export declare function persistAlign(win: Window, align: DesktopAlign): void;
197
+ /**
198
+ * §5.4's minimise preference — the matched pair for
199
+ * {@link DOCK_MINIMISED_STORAGE_KEY}, beside the alignment's.
200
+ *
201
+ * `true` = the shopper chose the pill, `false` = they chose the row,
202
+ * `undefined` = they never chose, which is "the tenant's config default
203
+ * stands". Private mode, blocked storage and a value we did not write all land
204
+ * on `undefined` for the same reason {@link readStoredAlign} does: the key is
205
+ * on the MERCHANT's origin.
206
+ *
207
+ * Here rather than in either renderer because BOTH write it and the ENCODING
208
+ * is the contract: `cdn/dock-dom.ts` reads it before first paint and `dock.tsx`
209
+ * writes it from the mark, and `dock.tsx` used to re-encode `'1'`/`'0'` in a
210
+ * try/catch of its own. Two hand-written encoders of the same two characters
211
+ * is how a shopper's collapse survives one renderer and not the other.
212
+ */
213
+ export declare function readStoredMinimised(win: Window): boolean | undefined;
214
+ export declare function persistMinimised(win: Window, minimised: boolean): void;
168
215
  /** §5.6 — how long a proactive nudge holds the row open before it recedes. */
169
216
  export declare const PROACTIVE_NUDGE_MS = 8000;
217
+ /**
218
+ * §3.6 — how long a text session sits untouched before the row recedes to
219
+ * glass: no turn, no draft, the field unfocused, nobody composing.
220
+ *
221
+ * Long on purpose. The glass is for a shopper who has turned to the page, and
222
+ * twenty seconds is past a pause to read a reply and short of a shopper who
223
+ * has actually gone back to browsing; anything shorter flickers the surface
224
+ * between a shopper's own sentences.
225
+ */
226
+ export declare const GLASS_IDLE_MS = 20000;
227
+ /**
228
+ * §3.5 — how long the float survives a DUCK before it takes itself away.
229
+ *
230
+ * This is the only clock the float has left. It used to have a `FLOAT_HIDE_MS`
231
+ * of 8 s counted from the end of every turn, and that constant is gone
232
+ * (2026-09-16): a shopper reading an answer lost it mid-sentence, which is the
233
+ * one thing a surface whose entire job is "what was just said" must not do.
234
+ *
235
+ * A DUCK is different from a timer, and that is why this one survived. §5.1's
236
+ * `ducked` is not the dock guessing from a clock that attention has moved on
237
+ * — it is the shopper scrolling the merchant's page while the concierge was
238
+ * mid-reply, which the dock already treats as a barge-in. Four seconds is long
239
+ * enough that a glance back finds the line still there, and short enough that
240
+ * a shopper who has genuinely gone back to shopping is not read at.
241
+ *
242
+ * Leaving the duck does NOT bring the turn back; only the next turn does. See
243
+ * `dock-float.tsx`.
244
+ */
245
+ export declare const FLOAT_DUCK_DISMISS_MS = 4000;
246
+ /** §3.5 — the gap between the float's floor and the row's top edge. */
247
+ export declare const FLOAT_GAP = 8;
170
248
  export type DesktopWidth = keyof typeof DESKTOP_WIDTHS;
171
249
  export type DesktopAlign = 'left' | 'center' | 'right';
172
250
  export type Direction = 'ltr' | 'rtl';
@@ -215,19 +293,67 @@ export declare function sheetMaxHeightLen(isDesktop: boolean): string;
215
293
  * the handover does not move anything.
216
294
  */
217
295
  export declare function geometryVars(isDesktop: boolean, layout: DockLayout): Record<DockGeometryVar, string>;
296
+ /**
297
+ * WHERE THE FIXED CONTAINER SITS — the four declarations that anchor the dock
298
+ * to the viewport (§3.1, §9.1).
299
+ *
300
+ * It is here, in the module §4.2's handover is judged against, because it was
301
+ * written out by hand TWICE: once in `dock.tsx`'s `rootStyle` and once in
302
+ * `cdn/dock-dom.ts`'s `containerCss`. The copies had already drifted — React
303
+ * hardcoded `10px` where core used {@link BOTTOM_FLOOR}, and React does not
304
+ * import that constant at all, so changing the floor moved one container and
305
+ * not the other with nothing failing. Two renderers, one anchor.
306
+ *
307
+ * ## Why `bottom` is not {@link bottomLen}
308
+ *
309
+ * Deliberately, and this is the one place the two expressions may differ.
310
+ * `--wgt-bottom` includes the `--wgt-kb` keyboard term; the CONTAINER must
311
+ * not, because `bottom` is a layout property and a value that changes every
312
+ * frame inside it costs the merchant's document a layout on every frame while
313
+ * the shopper types. The keyboard rides on the container's `translateY`
314
+ * instead (§7.2, §8.2). Both still carry `--wgt-host-offset`.
315
+ *
316
+ * ## Why the width is a `var()`
317
+ *
318
+ * `--wgt-row-w` is emitted by {@link geometryVars} on this same element and
319
+ * was read by nobody, while both renderers wrote the row's width out again as
320
+ * a literal beside it. Reading the token is what makes "the container is as
321
+ * wide as the row" a fact rather than a coincidence — and the centred `left`
322
+ * subtracts half the same token, so a centred dock cannot half-follow a width
323
+ * change.
324
+ *
325
+ * ## Why centring is one `left` and not `left: 50%` plus a negative margin
326
+ *
327
+ * The two are arithmetically identical for a fixed element — both percentages
328
+ * resolve against the initial containing block — and `calc(50% - W / 2)` is
329
+ * the one that keeps EVERY key of this object a valid CSS property name.
330
+ * React spreads it into a style object; `cdn/dock-dom.ts` builds its `style`
331
+ * attribute as TEXT and joins the same entries, and neither needs a
332
+ * camel-to-kebab step it would have to pay for in an artefact every visitor
333
+ * to every merchant page downloads (§4).
334
+ */
335
+ export interface ContainerAnchor {
336
+ readonly bottom: string;
337
+ readonly left?: string;
338
+ readonly right?: string;
339
+ readonly width?: string;
340
+ }
341
+ export declare function containerAnchor(isDesktop: boolean, align: DesktopAlign): ContainerAnchor;
218
342
  /**
219
343
  * Which edge the pill hangs off, and how far in (§3.2).
220
344
  *
221
345
  * On mobile this is the THUMB edge, so it mirrors with the reading direction
222
346
  * (§8.9). On desktop it follows `layout.desktopAlign`, which is a physical
223
347
  * choice the tenant made about their own page and is therefore NOT mirrored;
224
- * `center` resolves to the right edge, since a centred pill has no edge to
225
- * hang off.
348
+ * `center` centres the pill under the row — both insets 0, with the auto
349
+ * inline margins `.wgt-pill` carries doing the centring. It used to resolve to
350
+ * the right END of the centred row, which put the pill ~200 px right of the
351
+ * page's centre on a `medium` dock.
226
352
  *
227
353
  * @throws {TypeError} on an unknown alignment.
228
354
  */
229
355
  export declare function pillAnchor(dir: Direction, isDesktop: boolean, desktopAlign: DesktopAlign): {
230
- side: 'left' | 'right';
356
+ side: 'left' | 'right' | 'center';
231
357
  inset: number;
232
358
  };
233
359
  //# sourceMappingURL=geometry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/dock/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,mDAAmD;AACnD,eAAO,MAAM,KAAK,KAAK,CAAC;AACxB,yDAAyD;AACzD,eAAO,MAAM,MAAM,KAAK,CAAC;AACzB,8CAA8C;AAC9C,eAAO,MAAM,IAAI,KAAK,CAAC;AACvB,4CAA4C;AAC5C,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,2EAA2E;AAC3E,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,iEAAiE;AACjE,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,iEAAiE;AACjE,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,yEAAyE;AACzE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,iEAAiE;AACjE,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,mCAAmC;AACnC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,aAAa,CAAC;AAClC,+EAA+E;AAC/E,eAAO,MAAM,cAAc;aACzB,MAAM,EAAE,GAAG;aACX,MAAM,EAAE,GAAG;aACX,IAAI,EAAE,GAAG;aACT,IAAI;CACI,CAAC;AACX,6EAA6E;AAC7E,eAAO,MAAM,KAAK;aAAK,MAAM,EAAE,CAAC;aAAE,IAAI,EAAE,EAAE;aAAE,KAAK,EAAE,EAAE;aAAE,IAAI,EAAE,IAAI;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,2 @@
1
+ export declare const CONCIERGE_SHELL_CSS: string;
2
+ //# sourceMappingURL=concierge-shell-css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concierge-shell-css.d.ts","sourceRoot":"","sources":["../../src/generated/concierge-shell-css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,EAAE,MAAs3/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"widget-css.d.ts","sourceRoot":"","sources":["../../src/generated/widget-css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAE,MAAkt9D,CAAC"}
1
+ {"version":3,"file":"widget-css.d.ts","sourceRoot":"","sources":["../../src/generated/widget-css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAE,MAAkvmE,CAAC"}
@@ -4,6 +4,7 @@ import type { WidgetChatCart } from '@saar-ai/widget-protocol/chat';
4
4
  import { type HostRouteResolvers } from './host-routes.js';
5
5
  import { type ChatCardItem, type ChatCheckoutHandoff } from './use-chat-session.js';
6
6
  import { type VoiceSession } from './use-voice-session.js';
7
+ import { type ConciergeRenderer } from './voice-widget.js';
7
8
  import type { WidgetCartLine } from './widget-cart-summary.js';
8
9
  import type { ConciergeCallPhase, WidgetAttribution } from './voice-widget.js';
9
10
  import type { DockAvatarKind } from './dock/dock-row.js';
@@ -11,6 +12,35 @@ import type { DockCopyView, DockLayoutView } from './dock/dock.js';
11
12
  import type { WidgetColorConfig, WidgetTypeConfig } from './theme/derive.js';
12
13
  import { type WidgetMessages } from './messages.js';
13
14
  import type { WidgetAvatar } from './avatar.js';
15
+ /** What a "Choose options" press does, given the state at the moment of the press. */
16
+ export type ChooseOptionsAction = 'send' | 'hold' | 'product-page' | 'ignore';
17
+ /**
18
+ * SAA-175 — the decision behind a "Choose options" press, as a pure function
19
+ * so every branch is testable. Two of them (`streaming`, `inFlight`) cannot be
20
+ * reached through a click, because the button's `aria-disabled` reads the same
21
+ * state; they exist for the moment state changes between render and handler.
22
+ *
23
+ * In order:
24
+ *
25
+ * 1. **Already in flight** → `ignore`. A double press.
26
+ * 2. **No session** → `product-page`. Nobody to ask.
27
+ * 3. **A live call** → `hold`. A typed turn mid-call is answered out loud over
28
+ * the caller, and a page change mid-call takes the audio with it; the
29
+ * report waits for the call to end.
30
+ * 4. **Escalated** → `product-page`. A person holds the conversation and the
31
+ * concierge does not answer, so a report would leave the shopper with
32
+ * nothing and the operator with a label and no product link.
33
+ * 5. **A reply streaming** → `ignore`. The session would refuse the send, and
34
+ * "not now" is not a failure.
35
+ * 6. Otherwise → `send`.
36
+ */
37
+ export declare function chooseOptionsAction(state: {
38
+ readonly hasSession: boolean;
39
+ readonly escalated: boolean;
40
+ readonly inCall: boolean;
41
+ readonly streaming: boolean;
42
+ readonly inFlight: boolean;
43
+ }): ChooseOptionsAction;
14
44
  /**
15
45
  * Resolves the widget's "add to cart" handler from the bridge's OWN degraded
16
46
  * path — docs/WIDGET_EMBED_PLAN.md §3, rule 1 ("every optional method is
@@ -78,6 +108,13 @@ onAdded?: (item: ChatCardItem) => void): ((item: ChatCardItem) => Promise<void>)
78
108
  */
79
109
  export interface AddedCartLine extends WidgetCartLine {
80
110
  readonly variantId?: string;
111
+ /**
112
+ * The storefront platform's variant id, when known. Never used for
113
+ * checkout (see above) — it rides to the server on the chat cart so the
114
+ * server can join the line to its catalogue for a price-drift log
115
+ * (SAA-174). A host line may carry either id; a card add carries both.
116
+ */
117
+ readonly platformVariantId?: string;
81
118
  }
82
119
  /**
83
120
  * Folds one successful add into the widget's own basket, merging a repeat add
@@ -115,6 +152,14 @@ export declare function cartLinesFromSnapshot(snapshot: CartSnapshot | null, cur
115
152
  * discipline). The two are pinned together by a test.
116
153
  */
117
154
  export declare const MAX_REPORTED_CART_LINES = 50;
155
+ /**
156
+ * The shapes `WidgetChatCartLineSchema` enforces on a line's ids —
157
+ * `CART_LINE_VARIANT_ID_PATTERN` / `CART_LINE_PLATFORM_VARIANT_ID_PATTERN`
158
+ * (`@saar-ai/widget-protocol`), duplicated for the same no-zod-in-the-bundle
159
+ * reason as {@link MAX_REPORTED_CART_LINES} and pinned to them by a test.
160
+ */
161
+ export declare const CART_LINE_VARIANT_ID_SHAPE: RegExp;
162
+ export declare const CART_LINE_PLATFORM_VARIANT_ID_SHAPE: RegExp;
118
163
  /**
119
164
  * Build the cart snapshot the widget sends with every chat turn, from the
120
165
  * basket it is already rendering.
@@ -162,10 +207,17 @@ export declare const MAX_REPORTED_CART_LINES = 50;
162
207
  * and may be stated plainly.
163
208
  */
164
209
  export declare function toChatCart(input: {
165
- readonly lines: readonly WidgetCartLine[];
210
+ readonly lines: readonly AddedCartLine[];
166
211
  readonly currency: string;
167
212
  readonly hostReported: boolean;
168
213
  readonly hostSubtotalMinor?: number | undefined;
214
+ /**
215
+ * Send line variant ids (SAA-174) — ONLY when the api advertised
216
+ * `capabilities.cartLineIds`. An older api's strict line schema 400s them,
217
+ * and the widget CDN and the api deploy separately, so the default is the
218
+ * shape every api accepts: no ids.
219
+ */
220
+ readonly includeLineIds?: boolean;
169
221
  }): WidgetChatCart | null;
170
222
  /**
171
223
  * Where "Checkout" sends the shopper, and the order the two answers are
@@ -347,8 +399,28 @@ export interface ConciergeWidgetProps {
347
399
  readonly bottomOffset?: 'auto' | number;
348
400
  /** §9.1 `cards.showPrice`. */
349
401
  readonly showPrice?: boolean;
402
+ /**
403
+ * The API advertised `capabilities.cartLineIds` on `GET /widget/config`
404
+ * (SAA-174). Only then does the cart sent with each turn carry line variant
405
+ * ids — an api from before that change 400s them. Absent ⇒ no ids, which
406
+ * every api accepts. The CDN core passes it; an npm host passes it only if
407
+ * it knows its api has it.
408
+ */
409
+ readonly cartLineIds?: boolean;
350
410
  /** §9.1 `cards.imageAspect` — the fixed box every card thumbnail is drawn in. */
351
411
  readonly cardImageAspect?: 'square' | 'portrait' | 'landscape';
412
+ /**
413
+ * §9.1 `ui.generation` — which renderer draws the session
414
+ * (docs/CONCIERGE_GENERATIONS.md). Phase 2 carries it to the stage; phase 3
415
+ * acts on it at `voice-widget.tsx`'s one render site. Absent ⇒ widget.
416
+ */
417
+ readonly generation?: 'widget' | 'dock';
418
+ /**
419
+ * The chrome, decided by the caller. `ConciergeWidget` resolves an absent
420
+ * one from `generation` through `rendererFor`; `ConciergeHost` requires it,
421
+ * which is how a CDN entry ships one renderer and not both.
422
+ */
423
+ readonly renderer?: ConciergeRenderer;
352
424
  /**
353
425
  * §8.4 — voice is available in THIS browser, as the core stage judged it.
354
426
  *
@@ -464,5 +536,15 @@ export interface ConciergeWidgetProps {
464
536
  * about offering voice here costs a byte until a caller actually presses
465
537
  * the microphone.
466
538
  */
467
- export declare function ConciergeWidget({ embedKey, apiBase, socketUrl, socketPath, bridge, siteProfile, collector, messages, locale, productHref, hostRoutes, curationHref, brandPrimary, brandSecondary, brandAccent, avatar, attribution, color, type, identity, layout, copy, bottomOffset, showPrice, cardImageAspect, voiceAvailable, direction, proactive, initialDraft, initialSelection, initialFocus, initialMinimised, insets, hold, audio, onReady, }: ConciergeWidgetProps): import("react").JSX.Element;
539
+ /** `ConciergeWidgetProps` with the renderer decided — what the CDN entries mount. */
540
+ export type ConciergeHostProps = ConciergeWidgetProps & {
541
+ readonly renderer: ConciergeRenderer;
542
+ };
543
+ /**
544
+ * The public component. Everything below it — the session, the bridge, the
545
+ * voice and cart plumbing — is `ConciergeHost`; this only picks the chrome
546
+ * when the caller did not. See `renderers.ts` for why they are two functions.
547
+ */
548
+ export declare function ConciergeWidget({ renderer, ...props }: ConciergeWidgetProps): import("react").JSX.Element;
549
+ export declare function ConciergeHost({ renderer, embedKey, apiBase, socketUrl, socketPath, bridge, siteProfile, collector, messages, locale, productHref, hostRoutes, curationHref, brandPrimary, brandSecondary, brandAccent, avatar, attribution, color, type, identity, layout, copy, bottomOffset, showPrice, cardImageAspect, voiceAvailable, direction, proactive, initialDraft, initialSelection, initialFocus, initialMinimised, insets, hold, audio, onReady, cartLineIds, }: ConciergeHostProps): import("react").JSX.Element;
468
550
  //# sourceM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KAAE,CAAC;IACxD,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qFAAqF;AACrF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAEjG;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAE3E;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAgC,EAChC,MAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,MAAM,EACN,WAAW,EACX,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,cAAc,EACd,SAAS,EACT,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,WAAW,GACZ,EAAE,kBAAkB,+BAukEpB"}
package/dist/index.d.ts CHANGED
@@ -4,10 +4,11 @@ export * from './avatar.js';
4
4
  export * from './morphing-loader.js';
5
5
  export { cn } from './cn.js';
6
6
  export { Dock } from './dock/dock.js';
7
- export type { DockProps, DockVoiceProps, DockLayoutView, DockCopyView, WidgetAttribution, } from './dock/dock.js';
7
+ export type { DockProps, DockVoiceProps, DockLayoutView, DockCopyView, DockTurn, WidgetAttribution, } from './dock/dock.js';
8
8
  export type { DockIdentityView, DockAvatarKind, DockMicSource } from './dock/dock-row.js';
9
9
  export type { DockSheetSnap } from './dock/dock-sheet.js';
10
10
  export * from './dock/dock-state.js';
11
+ export * from './concierge-state.js';
11
12
  export * from './messages.js';
12
13
  export * from './bot-state.js';
13
14
  export * from './bot-avatar.js';
@@ -15,6 +16,13 @@ export * from './session-log.js';
15
16
  export * from './sse-parser.js';
16
17
  export * from './voice-session-state.js';
17
18
  export * from './session-panel.js';
19
+ export * from './widget/concierge-launcher.js';
20
+ export * from './widget/concierge-shell.js';
21
+ export * from './widget/position.js';
22
+ export * from './widget/widget-view.js';
23
+ export { ShellRenderer } from './widget/shell-renderer.js';
24
+ export { DockRenderer } from './dock/dock-renderer.js';
25
+ export { rendererFor } from './renderers.js';
18
26
  export * from './widget-markdown.js';
19
27
  export * from './widget-cards.js';
20
28
  export * from './widget-cart-summary.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAc7B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,YAAY,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC1F,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,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