@gengage/assistant-fe 0.4.19 → 0.4.21

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 (155) hide show
  1. package/dist/api-paths-Bg6iwO5w.js +1250 -0
  2. package/dist/chat-runtime.js +1 -1
  3. package/dist/chat.iife.js +17 -17
  4. package/dist/chat.js +1 -1
  5. package/dist/{common-Bpp43wr0.js → common-DDJSeQhg.js} +2 -2
  6. package/dist/common.js +79 -77
  7. package/dist/{connection-warning-C7ehvQxx.js → connection-warning-BeD-B0Ec.js} +1 -1
  8. package/dist/{fastIntent-CINRmM8r.js → fastIntent-BeeDIwd2.js} +1 -1
  9. package/dist/index.js +75 -73
  10. package/dist/native.iife.js +18 -18
  11. package/dist/qna-runtime.js +1 -1
  12. package/dist/qna.iife.js +22 -22
  13. package/dist/qna.js +1 -1
  14. package/dist/{runtime-B0hDHRlN.js → runtime-C8ZBidd2.js} +13 -13
  15. package/dist/{runtime-CLcYqzoA.js → runtime-CRSFPLku.js} +17 -17
  16. package/dist/{runtime-DhdfOJEN.js → runtime-Ct1qOl8V.js} +855 -848
  17. package/dist/{simbut-3kqLW3SM.js → simbut-BrAeZ6SH.js} +19 -22
  18. package/dist/simbut.iife.js +9 -9
  19. package/dist/simbut.js +1 -1
  20. package/dist/{simrel-fQg2EIB8.js → simrel-Cha5de6P.js} +1 -1
  21. package/dist/simrel-runtime.js +1 -1
  22. package/dist/simrel.iife.js +7 -7
  23. package/dist/simrel.js +2 -2
  24. package/dist/{widget-base-bdJaGJYi.js → widget-base-BtBl_PCR.js} +91 -83
  25. package/package.json +9 -5
  26. package/dist/api-paths-BX3Lea3A.js +0 -1213
  27. package/dist/chat/api.d.ts +0 -88
  28. package/dist/chat/assistant-mode.d.ts +0 -19
  29. package/dist/chat/attachment-utils.d.ts +0 -9
  30. package/dist/chat/catalog.d.ts +0 -826
  31. package/dist/chat/chat-presentation-state.d.ts +0 -53
  32. package/dist/chat/components/AIGroupingCards.d.ts +0 -3
  33. package/dist/chat/components/AISuggestedSearchCards.d.ts +0 -3
  34. package/dist/chat/components/AITopPicks.d.ts +0 -3
  35. package/dist/chat/components/BeautyPhotoStep.d.ts +0 -16
  36. package/dist/chat/components/CategoriesContainer.d.ts +0 -3
  37. package/dist/chat/components/ChatDrawer.d.ts +0 -360
  38. package/dist/chat/components/ChoicePrompter.d.ts +0 -21
  39. package/dist/chat/components/ComparisonTable.d.ts +0 -57
  40. package/dist/chat/components/ConsultingStylePicker.d.ts +0 -34
  41. package/dist/chat/components/FloatingComparisonButton.d.ts +0 -2
  42. package/dist/chat/components/FloatingLauncher.d.ts +0 -79
  43. package/dist/chat/components/GroundingReviewCard.d.ts +0 -3
  44. package/dist/chat/components/HandoffNotice.d.ts +0 -4
  45. package/dist/chat/components/KvkkBanner.d.ts +0 -6
  46. package/dist/chat/components/Launcher.d.ts +0 -28
  47. package/dist/chat/components/PanelRestoreCard.d.ts +0 -4
  48. package/dist/chat/components/PanelTopBar.d.ts +0 -32
  49. package/dist/chat/components/PhotoAnalysisCard.d.ts +0 -20
  50. package/dist/chat/components/ProductSummaryCard.d.ts +0 -3
  51. package/dist/chat/components/ProsAndCons.d.ts +0 -8
  52. package/dist/chat/components/ReviewHighlights.d.ts +0 -9
  53. package/dist/chat/components/actionClassifier.d.ts +0 -12
  54. package/dist/chat/components/product-price-layout.d.ts +0 -18
  55. package/dist/chat/components/productMentionLinker.d.ts +0 -25
  56. package/dist/chat/components/renderUISpec.d.ts +0 -11
  57. package/dist/chat/components/typewriter.d.ts +0 -24
  58. package/dist/chat/extendedModeManager.d.ts +0 -32
  59. package/dist/chat/features/beauty-consulting/consulting-grid.d.ts +0 -31
  60. package/dist/chat/features/beauty-consulting/drawer-extensions.d.ts +0 -20
  61. package/dist/chat/features/beauty-consulting/mode-controller.d.ts +0 -53
  62. package/dist/chat/features/beauty-consulting/registry.d.ts +0 -3
  63. package/dist/chat/features/beauty-consulting/stream-handler.d.ts +0 -38
  64. package/dist/chat/history-storage.d.ts +0 -85
  65. package/dist/chat/index.d.ts +0 -5
  66. package/dist/chat/kvkk.d.ts +0 -20
  67. package/dist/chat/locales/en.d.ts +0 -2
  68. package/dist/chat/locales/index.d.ts +0 -5
  69. package/dist/chat/locales/tr.d.ts +0 -2
  70. package/dist/chat/panel-manager.d.ts +0 -126
  71. package/dist/chat/runtime.d.ts +0 -399
  72. package/dist/chat/session-persistence.d.ts +0 -65
  73. package/dist/chat/stream-error-display.d.ts +0 -6
  74. package/dist/chat/types.d.ts +0 -543
  75. package/dist/chat/utils/chat-presentation-debug.d.ts +0 -19
  76. package/dist/chat/utils/get-chat-scroll-element.d.ts +0 -10
  77. package/dist/chat/utils/ui.d.ts +0 -10
  78. package/dist/common/action-router.d.ts +0 -26
  79. package/dist/common/activity-tracker.d.ts +0 -37
  80. package/dist/common/analytics-events.d.ts +0 -91
  81. package/dist/common/analytics.d.ts +0 -61
  82. package/dist/common/api-paths.d.ts +0 -15
  83. package/dist/common/client.d.ts +0 -27
  84. package/dist/common/communication-bridge.d.ts +0 -51
  85. package/dist/common/config-constants.d.ts +0 -1
  86. package/dist/common/config-schema.d.ts +0 -81
  87. package/dist/common/connection-warning.d.ts +0 -8
  88. package/dist/common/consulting-sources.d.ts +0 -9
  89. package/dist/common/context.d.ts +0 -27
  90. package/dist/common/css-escape.d.ts +0 -1
  91. package/dist/common/customization-factories.d.ts +0 -62
  92. package/dist/common/debug.d.ts +0 -13
  93. package/dist/common/events.d.ts +0 -46
  94. package/dist/common/fastIntent.d.ts +0 -1
  95. package/dist/common/ga-datalayer.d.ts +0 -89
  96. package/dist/common/global-error-toast.d.ts +0 -6
  97. package/dist/common/index.d.ts +0 -49
  98. package/dist/common/indexed-db.d.ts +0 -79
  99. package/dist/common/locale.d.ts +0 -1
  100. package/dist/common/native-webview.d.ts +0 -60
  101. package/dist/common/navigation.d.ts +0 -5
  102. package/dist/common/overlay.d.ts +0 -168
  103. package/dist/common/page-detect.d.ts +0 -30
  104. package/dist/common/pill-launcher.d.ts +0 -51
  105. package/dist/common/preflight.d.ts +0 -13
  106. package/dist/common/price-formatter.d.ts +0 -35
  107. package/dist/common/product-utils.d.ts +0 -35
  108. package/dist/common/protocol-adapter.d.ts +0 -105
  109. package/dist/common/renderer/dom.d.ts +0 -3
  110. package/dist/common/renderer/index.d.ts +0 -4
  111. package/dist/common/renderer/overrides.d.ts +0 -23
  112. package/dist/common/renderer/registry.d.ts +0 -2
  113. package/dist/common/renderer/types.d.ts +0 -19
  114. package/dist/common/safe-html.d.ts +0 -22
  115. package/dist/common/skeleton.d.ts +0 -8
  116. package/dist/common/streaming.d.ts +0 -37
  117. package/dist/common/suggested-search-keywords.d.ts +0 -18
  118. package/dist/common/theme-utils.d.ts +0 -15
  119. package/dist/common/tts-player.d.ts +0 -13
  120. package/dist/common/types.d.ts +0 -381
  121. package/dist/common/ui-theme.d.ts +0 -9
  122. package/dist/common/uuidv7.d.ts +0 -7
  123. package/dist/common/voice-input.d.ts +0 -74
  124. package/dist/common/widget-base.d.ts +0 -97
  125. package/dist/index.d.ts +0 -25
  126. package/dist/native/index.d.ts +0 -2
  127. package/dist/overlay.d.ts +0 -4
  128. package/dist/qna/api.d.ts +0 -23
  129. package/dist/qna/catalog.d.ts +0 -73
  130. package/dist/qna/components/ButtonRow.d.ts +0 -15
  131. package/dist/qna/components/TextInput.d.ts +0 -11
  132. package/dist/qna/components/renderUISpec.d.ts +0 -7
  133. package/dist/qna/index.d.ts +0 -3
  134. package/dist/qna/locales/en.d.ts +0 -2
  135. package/dist/qna/locales/index.d.ts +0 -5
  136. package/dist/qna/locales/tr.d.ts +0 -2
  137. package/dist/qna/normalize-ui-specs.d.ts +0 -15
  138. package/dist/qna/runtime.d.ts +0 -62
  139. package/dist/qna/types.d.ts +0 -98
  140. package/dist/simbut/index.d.ts +0 -22
  141. package/dist/simbut/locales.d.ts +0 -3
  142. package/dist/simbut/types.d.ts +0 -43
  143. package/dist/simrel/api.d.ts +0 -25
  144. package/dist/simrel/catalog.d.ts +0 -110
  145. package/dist/simrel/components/GroupTabs.d.ts +0 -24
  146. package/dist/simrel/components/ProductCard.d.ts +0 -19
  147. package/dist/simrel/components/ProductGrid.d.ts +0 -17
  148. package/dist/simrel/components/renderUISpec.d.ts +0 -7
  149. package/dist/simrel/index.d.ts +0 -5
  150. package/dist/simrel/locales/en.d.ts +0 -2
  151. package/dist/simrel/locales/index.d.ts +0 -5
  152. package/dist/simrel/locales/tr.d.ts +0 -2
  153. package/dist/simrel/renderers/default.d.ts +0 -40
  154. package/dist/simrel/runtime.d.ts +0 -59
  155. package/dist/simrel/types.d.ts +0 -141
package/dist/qna.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, i as r, n as t, r as n, t as o } from "./runtime-B0hDHRlN.js";
1
+ import { a, i as r, n as t, r as n, t as o } from "./runtime-C8ZBidd2.js";
2
2
  import { t as p } from "./qna-BNvttR6s.js";
3
3
  export {
4
4
  o as GengageQNA,
@@ -1,10 +1,10 @@
1
- import { f as Q, m as N, r as H, t as O, u as U } from "./api-paths-BX3Lea3A.js";
2
- import { S as j, b as M, i as D, t as F, w as W, x as z } from "./widget-base-bdJaGJYi.js";
1
+ import { d as Q, h as N, p as H, r as O, t as U } from "./api-paths-Bg6iwO5w.js";
2
+ import { C as j, E as M, S as D, o as F, t as W, w as z } from "./widget-base-BtBl_PCR.js";
3
3
  import { A as $, D as G, E as J, a as E, v as V } from "./context-DGz5F81j.js";
4
4
  import { t as T } from "./locale-CfqNifrU.js";
5
- import { n as Y } from "./connection-warning-C7ehvQxx.js";
5
+ import { n as Y } from "./connection-warning-BeD-B0Ec.js";
6
6
  async function Z(e, t, n) {
7
- const o = O("launcher_action", t), i = {
7
+ const o = U("launcher_action", t), i = {
8
8
  uiSpecs: [],
9
9
  actions: []
10
10
  }, a = {
@@ -16,7 +16,7 @@ async function Z(e, t, n) {
16
16
  const l = await fetch(o, a);
17
17
  if (!l.ok) throw new Error(`HTTP ${l.status}: ${l.statusText}`);
18
18
  const r = { onEvent: (c) => {
19
- const s = H(c);
19
+ const s = O(c);
20
20
  if (s && (s.type === "ui_spec" && i.uiSpecs.push(s.spec), s.type === "ui_spec" && s.spec.elements)) {
21
21
  for (const d of Object.values(s.spec.elements)) if (d.type === "ActionButton" && d.props?.action) {
22
22
  const b = d.props.action;
@@ -24,7 +24,7 @@ async function Z(e, t, n) {
24
24
  }
25
25
  }
26
26
  } };
27
- return n !== void 0 && (r.signal = n), await U(l, r), i;
27
+ return n !== void 0 && (r.signal = n), await Q(l, r), i;
28
28
  }
29
29
  function C(e) {
30
30
  const t = document.createElement("div");
@@ -387,7 +387,7 @@ function ct(e) {
387
387
  function dt(e) {
388
388
  return ct(e) === "en" ? lt : R;
389
389
  }
390
- var ut = class extends F {
390
+ var ut = class extends W {
391
391
  constructor(...e) {
392
392
  super(...e), this._abortController = null, this._debounceTimer = null, this._contentEl = null, this._i18n = R, this._actionHandler = this._handleAction.bind(this), this._openChatHandler = this._handleOpenChat.bind(this);
393
393
  }
@@ -440,7 +440,7 @@ var ut = class extends F {
440
440
  source: "qna",
441
441
  locale: this.config.locale
442
442
  });
443
- this.track(j(this.analyticsContext(), {
443
+ this.track(z(this.analyticsContext(), {
444
444
  endpoint: "launcher_action",
445
445
  request_id: o,
446
446
  widget: "qna"
@@ -457,12 +457,12 @@ var ut = class extends F {
457
457
  const c = this.config.pageContext?.pageType;
458
458
  c !== void 0 && (r.page_type = c);
459
459
  const s = await Z(r, n, this._abortController.signal);
460
- if (this.track(M(this.analyticsContext(), {
460
+ if (this.track(D(this.analyticsContext(), {
461
461
  request_id: o,
462
462
  latency_ms: Date.now() - i,
463
463
  chunk_count: s.actions.length,
464
464
  widget: "qna"
465
- })), this.track(W(this.analyticsContext(), {
465
+ })), this.track(M(this.analyticsContext(), {
466
466
  message_count: s.actions.length,
467
467
  history_ref: o,
468
468
  redaction_level: "none",
@@ -499,8 +499,8 @@ var ut = class extends F {
499
499
  if (E("gengage:global:error", {
500
500
  source: "qna",
501
501
  code: "FETCH_ERROR",
502
- message: D(this.config.locale, l)
503
- }), this.track(z(this.analyticsContext(), {
502
+ message: F(this.config.locale, l)
503
+ }), this.track(j(this.analyticsContext(), {
504
504
  request_id: o,
505
505
  error_code: "FETCH_ERROR",
506
506
  error_message: l instanceof Error ? l.message : String(l),
@@ -562,7 +562,7 @@ var ut = class extends F {
562
562
  return r.children.length === 0 ? null : r;
563
563
  }
564
564
  _resolveUISpecRegistry() {
565
- return Q(X(), this.config.renderer?.registry);
565
+ return H(X(), this.config.renderer?.registry);
566
566
  }
567
567
  _renderUISpec(e, t) {
568
568
  const n = this._resolveUISpecRegistry(), o = this.config.renderer?.unknownRenderer ?? P, i = (l, r) => tt(l, r, n, o), a = this.config.renderer?.renderUISpec;
@@ -1,9 +1,9 @@
1
- import { a as D, f as j, i as F, m as H, r as N, t as R, u as U } from "./api-paths-BX3Lea3A.js";
2
- import { S as z, b as T, f as $, i as W, t as J, w, x as Q } from "./widget-base-bdJaGJYi.js";
1
+ import { a as D, d as N, h as j, i as F, p as H, r as R, t as U } from "./api-paths-Bg6iwO5w.js";
2
+ import { C as z, E as T, S as w, m as $, o as W, t as J, w as Q } from "./widget-base-BtBl_PCR.js";
3
3
  import { A as Y, E as A, N as V, a as S, l as K, v as X } from "./context-DGz5F81j.js";
4
4
  import { t as Z } from "./locale-CfqNifrU.js";
5
5
  import { a as ee, n as te, r as re, t as P } from "./price-formatter-xI3g9Cd4.js";
6
- import { n as ne } from "./connection-warning-C7ehvQxx.js";
6
+ import { n as ne } from "./connection-warning-BeD-B0Ec.js";
7
7
  function M(e) {
8
8
  const t = [];
9
9
  for (const r of Object.values(e)) if (r.type === "ProductCard" && r.props) {
@@ -18,13 +18,13 @@ function G(e) {
18
18
  }
19
19
  async function ie(e, t) {
20
20
  const r = [], n = { onEvent: (i) => {
21
- const s = N(i);
21
+ const s = R(i);
22
22
  !s || s.type !== "ui_spec" || r.push(...M(s.spec.elements));
23
23
  } };
24
- return t !== void 0 && (n.signal = t), await U(e, n), r;
24
+ return t !== void 0 && (n.signal = t), await N(e, n), r;
25
25
  }
26
26
  async function se(e, t, r) {
27
- const n = R("similar_products", t), i = {
27
+ const n = U("similar_products", t), i = {
28
28
  method: "POST",
29
29
  headers: { "Content-Type": "application/json" },
30
30
  body: JSON.stringify(e)
@@ -45,7 +45,7 @@ async function oe(e, t) {
45
45
  const r = [];
46
46
  let n = null;
47
47
  const i = { onEvent: (s) => {
48
- const c = N(s);
48
+ const c = R(s);
49
49
  if (c) {
50
50
  if (c.type === "metadata" && c.meta) {
51
51
  const d = c.meta.group_name;
@@ -61,10 +61,10 @@ async function oe(e, t) {
61
61
  c.type === "ui_spec" && n && n.products.push(...M(c.spec.elements));
62
62
  }
63
63
  } };
64
- return t !== void 0 && (i.signal = t), await U(e, i), r;
64
+ return t !== void 0 && (i.signal = t), await N(e, i), r;
65
65
  }
66
66
  async function ae(e, t, r) {
67
- const n = R("product_groupings", t), i = {
67
+ const n = U("product_groupings", t), i = {
68
68
  method: "POST",
69
69
  headers: { "Content-Type": "application/json" },
70
70
  body: JSON.stringify(e)
@@ -384,7 +384,7 @@ function ge() {
384
384
  return { ...O };
385
385
  }
386
386
  function ue(e, t, r = O, n = B) {
387
- return H({
387
+ return j({
388
388
  spec: e,
389
389
  context: t,
390
390
  registry: r,
@@ -515,7 +515,7 @@ var Ce = class extends J {
515
515
  source: "simrel",
516
516
  locale: this.config.locale
517
517
  });
518
- this.track(z(this.analyticsContext(), {
518
+ this.track(Q(this.analyticsContext(), {
519
519
  endpoint: "similar_products",
520
520
  request_id: g,
521
521
  widget: "simrel"
@@ -545,12 +545,12 @@ var Ce = class extends J {
545
545
  })).filter((a) => a.products.length > 0);
546
546
  if (o.length > 0 && this._contentEl) {
547
547
  const a = this._buildGroupsSpec(o), u = this._renderUISpec(a);
548
- this._contentEl.appendChild(u), A("simrel"), this.track(T(this.analyticsContext(), {
548
+ this._contentEl.appendChild(u), A("simrel"), this.track(w(this.analyticsContext(), {
549
549
  request_id: g,
550
550
  latency_ms: Date.now() - l,
551
551
  chunk_count: o.reduce((_, E) => _ + E.products.length, 0),
552
552
  widget: "simrel"
553
- })), this.track(w(this.analyticsContext(), {
553
+ })), this.track(T(this.analyticsContext(), {
554
554
  message_count: o.reduce((_, E) => _ + E.products.length, 0),
555
555
  history_ref: g,
556
556
  redaction_level: "none",
@@ -565,12 +565,12 @@ var Ce = class extends J {
565
565
  const y = this._buildProductsSpec(p), b = this._renderUISpec(y);
566
566
  this._contentEl.appendChild(b);
567
567
  }
568
- p.length > 0 && A("simrel"), this.track(T(this.analyticsContext(), {
568
+ p.length > 0 && A("simrel"), this.track(w(this.analyticsContext(), {
569
569
  request_id: g,
570
570
  latency_ms: Date.now() - l,
571
571
  chunk_count: p.length,
572
572
  widget: "simrel"
573
- })), this.track(w(this.analyticsContext(), {
573
+ })), this.track(T(this.analyticsContext(), {
574
574
  message_count: p.length,
575
575
  history_ref: g,
576
576
  redaction_level: "none",
@@ -584,7 +584,7 @@ var Ce = class extends J {
584
584
  source: "simrel",
585
585
  code: y,
586
586
  message: W(this.config.locale, m)
587
- }), this.track(Q(this.analyticsContext(), {
587
+ }), this.track(z(this.analyticsContext(), {
588
588
  request_id: g,
589
589
  error_code: y,
590
590
  error_message: b,
@@ -615,7 +615,7 @@ var Ce = class extends J {
615
615
  };
616
616
  }
617
617
  _resolveUISpecRegistry() {
618
- return j(ge(), this.config.renderer?.registry);
618
+ return H(ge(), this.config.renderer?.registry);
619
619
  }
620
620
  _buildRenderContext() {
621
621
  const e = this.config.renderCard, t = {