@gengage/assistant-fe 0.6.36 → 0.6.37

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 (36) hide show
  1. package/dist/chat/catalog.d.ts +13 -0
  2. package/dist/chat/components/InlineQuestionButtons.d.ts +3 -0
  3. package/dist/chat/runtime.d.ts +2 -0
  4. package/dist/chat/types.d.ts +14 -0
  5. package/dist/{chat-CIfQyuBl.js → chat-CJzuUZxy.js} +42 -38
  6. package/dist/chat-runtime.js +1 -1
  7. package/dist/chat.iife.js +21 -21
  8. package/dist/chat.js +2 -2
  9. package/dist/common/overlay.d.ts +2 -0
  10. package/dist/common/transport.d.ts +1 -0
  11. package/dist/{common-ByXFSuDh.js → common-CvcP5qMC.js} +2 -2
  12. package/dist/common.js +7 -7
  13. package/dist/{connection-warning-ChSjBT_4.js → connection-warning-DuejADTP.js} +1 -1
  14. package/dist/{fastIntent-B9AE8K30.js → fastIntent-DpWJneEN.js} +1 -1
  15. package/dist/index.js +12 -12
  16. package/dist/{native-webview-BcwGKkDe.js → native-webview-Ch9lsx7E.js} +1 -1
  17. package/dist/native.iife.js +18 -18
  18. package/dist/native.js +1 -1
  19. package/dist/{overlay-cF2SjxYU.js → overlay-CPLLn1eK.js} +7 -7
  20. package/dist/overlay.js +1 -1
  21. package/dist/qna-runtime.js +1 -1
  22. package/dist/qna.iife.js +8 -8
  23. package/dist/qna.js +1 -1
  24. package/dist/{request-response-cache-D6O2m-O-.js → request-response-cache-Cv8CiBwQ.js} +240 -214
  25. package/dist/{runtime-YKSfwMAr.js → runtime-BVd67coj.js} +1053 -1013
  26. package/dist/{runtime-CCQGaWOq.js → runtime-Bq0nExwG.js} +3 -3
  27. package/dist/{runtime-aR-A6Jh2.js → runtime-i_FHHBlZ.js} +3 -3
  28. package/dist/{simbut-BCKrXmkh.js → simbut-BzrDBfBk.js} +1 -1
  29. package/dist/simbut.iife.js +1 -1
  30. package/dist/simbut.js +1 -1
  31. package/dist/{simrel-CSlprSEe.js → simrel-DUVViZ9p.js} +1 -1
  32. package/dist/simrel-runtime.js +1 -1
  33. package/dist/simrel.iife.js +9 -9
  34. package/dist/simrel.js +2 -2
  35. package/dist/{widget-base-CmxCHKJi.js → widget-base-EWFE_HAI.js} +1 -1
  36. package/package.json +1 -1
@@ -56,6 +56,19 @@ export declare const chatCatalog: {
56
56
  }, z.core.$strip>;
57
57
  readonly description: "A horizontal row of quick-reply action buttons.";
58
58
  };
59
+ readonly InlineQuestionButtons: {
60
+ readonly schema: z.ZodObject<{
61
+ buttons: z.ZodArray<z.ZodObject<{
62
+ label: z.ZodString;
63
+ action: z.ZodObject<{
64
+ title: z.ZodString;
65
+ type: z.ZodString;
66
+ payload: z.ZodOptional<z.ZodUnknown>;
67
+ }, z.core.$strip>;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>;
70
+ readonly description: "Inline quick-question chips rendered inside the message flow.";
71
+ };
59
72
  readonly TypingIndicator: {
60
73
  readonly schema: z.ZodObject<{}, z.core.$strip>;
61
74
  readonly description: "An animated indicator shown while the assistant is typing.";
@@ -0,0 +1,3 @@
1
+ import type { UIElement } from '../../common/types.js';
2
+ import type { ChatUISpecRenderContext } from '../types.js';
3
+ export declare function renderInlineQuestionButtons(element: UIElement, ctx: ChatUISpecRenderContext): HTMLElement;
@@ -227,6 +227,8 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
227
227
  private _resolveContextualOpeningAction;
228
228
  private _readContextStringField;
229
229
  private _readContextStringListField;
230
+ private _usesGenericNonPdpLaunch;
231
+ private _markCurrentContextLaunchHandled;
230
232
  private _buildEntryOpeningPageDetails;
231
233
  /** True when the current page type has a dedicated silent auto-launch that provides its own greeting. */
232
234
  private _hasDedicatedContextLaunch;
@@ -181,6 +181,13 @@ export interface ChatWidgetConfig extends BaseWidgetConfig {
181
181
  openingMessagesByContext?: ChatContextualCopyByContext;
182
182
  /** Context-specific steering notes forwarded to the backend entry-opening flow. */
183
183
  openingGuidanceByContext?: ChatContextualCopyByContext;
184
+ /**
185
+ * When true, every non-PDP page uses the homepage-style launch/reset flow.
186
+ * Entry-question starter actions can opt out of inheriting host-page listing
187
+ * context such as visible SKUs, while direct typed turns keep the normal
188
+ * host-page context flow.
189
+ */
190
+ genericNonPdpLaunch?: boolean;
184
191
  /**
185
192
  * Whether this is a demo website. When combined with `productDetailsExtended: true`,
186
193
  * `productDetails` content triggers the extended panel (host PDP maximize).
@@ -545,6 +552,13 @@ export interface ChatUIComponents {
545
552
  action: ActionPayload;
546
553
  }>;
547
554
  };
555
+ /** Inline quick-question chips rendered inside the chat transcript. */
556
+ InlineQuestionButtons: {
557
+ buttons: Array<{
558
+ label: string;
559
+ action: ActionPayload;
560
+ }>;
561
+ };
548
562
  /** A "typing..." indicator. */
549
563
  TypingIndicator: Record<string, never>;
550
564
  /** A divider with an optional label (e.g. "New conversation"). */
@@ -1,9 +1,9 @@
1
1
  import { a as i, c as o, l as s, n as t, o as a, r as n, s as l, t as r, u as e } from "./schemas-BnYUhYSy.js";
2
- var u = a({
2
+ var h = a({
3
3
  role: r(["user", "assistant"]),
4
4
  content: o(),
5
5
  timestamp: i().optional()
6
- }), h = a({
6
+ }), m = a({
7
7
  sku: o(),
8
8
  name: o(),
9
9
  imageUrl: o().url().optional(),
@@ -11,14 +11,14 @@ var u = a({
11
11
  originalPrice: o().optional(),
12
12
  url: o().url(),
13
13
  ctaLabel: o().optional()
14
- }), m = a({ buttons: t(a({
14
+ }), d = a({ buttons: t(a({
15
15
  label: o(),
16
16
  action: a({
17
17
  title: o(),
18
18
  type: o(),
19
19
  payload: e().optional()
20
20
  })
21
- })) }), g = a({}), v = a({ label: o().optional() }), c = a({
21
+ })) }), g = d, v = a({}), w = a({ label: o().optional() }), c = a({
22
22
  sku: o(),
23
23
  name: o(),
24
24
  price: o(),
@@ -26,7 +26,7 @@ var u = a({
26
26
  imageUrl: o().optional(),
27
27
  rating: i().optional(),
28
28
  reviewCount: i().optional()
29
- }), w = a({
29
+ }), b = a({
30
30
  recommended: c,
31
31
  products: t(c),
32
32
  attributes: t(a({
@@ -45,18 +45,18 @@ var u = a({
45
45
  type: o(),
46
46
  payload: e().optional()
47
47
  })).optional()
48
- }), b = a({
48
+ }), y = a({
49
49
  label: o(),
50
50
  sentiment: r([
51
51
  "positive",
52
52
  "negative",
53
53
  "neutral"
54
54
  ]).optional()
55
- }), y = a({
55
+ }), S = a({
56
56
  product: l(o(), e()),
57
57
  role: o().optional(),
58
58
  reason: o().optional(),
59
- labels: t(b).optional(),
59
+ labels: t(y).optional(),
60
60
  expertQualityScore: i().optional(),
61
61
  reviewHighlight: o().optional(),
62
62
  action: a({
@@ -64,7 +64,7 @@ var u = a({
64
64
  type: o(),
65
65
  payload: e().optional()
66
66
  }).optional()
67
- }), S = a({ suggestions: t(y) }), _ = a({
67
+ }), _ = a({ suggestions: t(S) }), f = a({
68
68
  title: o().optional(),
69
69
  text: o().optional(),
70
70
  reviewCount: o().optional(),
@@ -82,7 +82,7 @@ var u = a({
82
82
  type: o(),
83
83
  payload: e().optional()
84
84
  })
85
- })) }), f = a({ entries: t(a({
85
+ })) }), A = a({ entries: t(a({
86
86
  shortName: o(),
87
87
  detailedMessage: o().optional(),
88
88
  whyDifferent: o().optional(),
@@ -92,7 +92,7 @@ var u = a({
92
92
  type: o(),
93
93
  payload: e().optional()
94
94
  })
95
- })) }), d = a({
95
+ })) }), u = a({
96
96
  title: o(),
97
97
  type: o(),
98
98
  payload: e().optional()
@@ -120,7 +120,7 @@ var u = a({
120
120
  swatchColor: o().optional(),
121
121
  in_stock: n().optional(),
122
122
  inStock: n().optional()
123
- }), A = a({
123
+ }), P = a({
124
124
  product: a({
125
125
  sku: o().optional(),
126
126
  name: o().optional(),
@@ -167,8 +167,8 @@ var u = a({
167
167
  value: o()
168
168
  }))]).optional()
169
169
  }).optional(),
170
- action: d.optional()
171
- }), P = a({
170
+ action: u.optional()
171
+ }), k = a({
172
172
  layout: r(["grid", "grouped"]).optional(),
173
173
  productSections: t(a({
174
174
  title: o().optional(),
@@ -177,16 +177,16 @@ var u = a({
177
177
  endOfList: n().optional(),
178
178
  rankingState: r(["pending", "final"]).optional(),
179
179
  sequenceId: o().optional()
180
- }), k = a({
180
+ }), I = a({
181
181
  review_class: o().optional(),
182
182
  review_text: o().optional(),
183
183
  review_rating: s([o(), i()]).optional(),
184
184
  review_tag: o().optional()
185
- }), I = a({ reviews: t(k).optional() }), T = a({
185
+ }), T = a({ reviews: t(I).optional() }), R = a({
186
186
  productName: o().optional(),
187
187
  pros: t(o()).optional(),
188
188
  cons: t(o()).optional()
189
- }), R = a({
189
+ }), x = a({
190
190
  groups: t(a({
191
191
  groupName: o(),
192
192
  image: o().optional(),
@@ -197,9 +197,9 @@ var u = a({
197
197
  })).optional(),
198
198
  filterTags: t(a({
199
199
  title: o(),
200
- action: d.optional()
200
+ action: u.optional()
201
201
  })).optional()
202
- }), x = a({
202
+ }), B = a({
203
203
  summary: o().optional(),
204
204
  products_discussed: t(o()).optional(),
205
205
  user_sentiment: o().optional()
@@ -215,7 +215,7 @@ var u = a({
215
215
  imageUrl: o().url().optional(),
216
216
  name: o().optional()
217
217
  })).optional()
218
- }), B = a({
218
+ }), q = a({
219
219
  summary: o(),
220
220
  strengths: t(o()).optional(),
221
221
  focus_points: t(o()).optional(),
@@ -229,37 +229,41 @@ var u = a({
229
229
  description: o().optional(),
230
230
  upload_label: o().optional(),
231
231
  skip_label: o().optional()
232
- }), D = { components: {
232
+ }), M = { components: {
233
233
  MessageBubble: {
234
- schema: u,
234
+ schema: h,
235
235
  description: "A single chat message bubble for user or assistant turns."
236
236
  },
237
237
  ProductCard: {
238
- schema: h,
238
+ schema: m,
239
239
  description: "A product card rendered inline in the chat stream."
240
240
  },
241
241
  ActionButtons: {
242
- schema: m,
242
+ schema: d,
243
243
  description: "A horizontal row of quick-reply action buttons."
244
244
  },
245
- TypingIndicator: {
245
+ InlineQuestionButtons: {
246
246
  schema: g,
247
+ description: "Inline quick-question chips rendered inside the message flow."
248
+ },
249
+ TypingIndicator: {
250
+ schema: v,
247
251
  description: "An animated indicator shown while the assistant is typing."
248
252
  },
249
253
  Divider: {
250
- schema: v,
254
+ schema: w,
251
255
  description: "A horizontal rule with an optional label."
252
256
  },
253
257
  ComparisonTable: {
254
- schema: w,
258
+ schema: b,
255
259
  description: "A product comparison table with recommended pick, attribute rows, and highlights."
256
260
  },
257
261
  AITopPicks: {
258
- schema: S,
262
+ schema: _,
259
263
  description: "Rich AI-curated product suggestion cards with roles, sentiment labels, scores, and review quotes."
260
264
  },
261
265
  GroundingReviewCard: {
262
- schema: _,
266
+ schema: f,
263
267
  description: "A card showing review grounding data with review count and CTA."
264
268
  },
265
269
  AIGroupingCards: {
@@ -267,31 +271,31 @@ var u = a({
267
271
  description: "Category grouping cards with images and labels for product discovery."
268
272
  },
269
273
  AISuggestedSearchCards: {
270
- schema: f,
274
+ schema: A,
271
275
  description: "Suggested search cards with images, descriptions, and differentiation."
272
276
  },
273
277
  ProductDetailsPanel: {
274
- schema: A,
278
+ schema: P,
275
279
  description: "Full product detail view with images, specs, variants, and purchase actions."
276
280
  },
277
281
  ProductGrid: {
278
- schema: P,
282
+ schema: k,
279
283
  description: 'A scrollable grid of ProductCard children with optional "more" pagination.'
280
284
  },
281
285
  ReviewHighlights: {
282
- schema: I,
286
+ schema: T,
283
287
  description: "A list of highlighted customer reviews with sentiment and ratings."
284
288
  },
285
289
  ProsAndCons: {
286
- schema: T,
290
+ schema: R,
287
291
  description: "A pros and cons list for a product."
288
292
  },
289
293
  CategoriesContainer: {
290
- schema: R,
294
+ schema: x,
291
295
  description: "Tabbed product groups with optional filter tag buttons."
292
296
  },
293
297
  HandoffNotice: {
294
- schema: x,
298
+ schema: B,
295
299
  description: "A notice shown when the conversation is escalated to a human agent."
296
300
  },
297
301
  PanelRestoreCard: {
@@ -299,7 +303,7 @@ var u = a({
299
303
  description: "A frontend-owned transcript card that reopens a related panel snapshot."
300
304
  },
301
305
  PhotoAnalysisCard: {
302
- schema: B,
306
+ schema: q,
303
307
  description: "Structured photo analysis card with strengths, focus points, celeb vibe, and follow-up question."
304
308
  },
305
309
  BeautyPhotoStep: {
@@ -308,5 +312,5 @@ var u = a({
308
312
  }
309
313
  } };
310
314
  export {
311
- D as t
315
+ M as t
312
316
  };
@@ -1,4 +1,4 @@
1
- import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-YKSfwMAr.js";
1
+ import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-BVd67coj.js";
2
2
  export {
3
3
  d as CHAT_SCROLL_ELEMENT_ID,
4
4
  s as ChatPresentationState,