@gengage/assistant-fe 0.4.18 → 0.4.20
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/api-paths-CReMDZWg.js +1250 -0
- package/dist/chat/components/ChoicePrompter.d.ts +2 -2
- package/dist/chat/runtime.d.ts +7 -0
- package/dist/chat/types.d.ts +65 -0
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +43 -43
- package/dist/chat.js +1 -1
- package/dist/common/find-similar-payload.d.ts +3 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/overlay.d.ts +4 -2
- package/dist/common/sdk-version.d.ts +3 -0
- package/dist/{common-Bxy1FrAk.js → common-BM2ZsSLI.js} +3 -3
- package/dist/common.js +79 -77
- package/dist/{connection-warning-C7ehvQxx.js → connection-warning-C_4e7ahZ.js} +1 -1
- package/dist/{fastIntent-CINRmM8r.js → fastIntent-DMNzXOSI.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +75 -73
- package/dist/{native-webview-BsRcv49q.js → native-webview-Bbcvvi_5.js} +1 -1
- package/dist/native.iife.js +21 -21
- package/dist/native.js +1 -1
- package/dist/{overlay-CfnBuj7M.js → overlay-O4nlUrzw.js} +1 -1
- package/dist/overlay.js +1 -1
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +22 -22
- package/dist/qna.js +1 -1
- package/dist/{runtime-B0hDHRlN.js → runtime-C51WykbJ.js} +13 -13
- package/dist/{runtime-CAUALvac.js → runtime-DBh8899B.js} +2185 -2091
- package/dist/{runtime-CLcYqzoA.js → runtime-bbMljGVG.js} +17 -17
- package/dist/simbut/index.d.ts +1 -1
- package/dist/simbut/types.d.ts +7 -7
- package/dist/{simbut-3kqLW3SM.js → simbut-CO1rLVM9.js} +19 -22
- package/dist/simbut.iife.js +9 -9
- package/dist/simbut.js +1 -1
- package/dist/simrel/components/GroupTabs.d.ts +1 -1
- package/dist/simrel/types.d.ts +3 -3
- package/dist/simrel-runtime.js +1 -1
- package/dist/{simrel-fQg2EIB8.js → simrel-zCDlCrqG.js} +1 -1
- package/dist/simrel.iife.js +7 -7
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-bdJaGJYi.js → widget-base-Cf9ofZhh.js} +91 -83
- package/package.json +2 -1
- package/dist/api-paths-BX3Lea3A.js +0 -1213
|
@@ -14,8 +14,8 @@ export interface ChoicePrompterOptions {
|
|
|
14
14
|
dismissAriaLabel?: string;
|
|
15
15
|
}
|
|
16
16
|
export declare function createChoicePrompter(options: ChoicePrompterOptions): HTMLElement;
|
|
17
|
-
/**
|
|
17
|
+
/** Called when a new user search starts so the card can be shown again. */
|
|
18
18
|
export declare function clearChoicePrompterDismissState(): void;
|
|
19
19
|
export declare function isChoicePrompterDismissed(threadId: string): boolean;
|
|
20
|
-
/**
|
|
20
|
+
/** Records the same dismiss state as the CTA for external toolbar actions. */
|
|
21
21
|
export declare function recordChoicePrompterDismissedForThread(threadId: string): void;
|
package/dist/chat/runtime.d.ts
CHANGED
|
@@ -115,6 +115,8 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
|
|
|
115
115
|
private static readonly _MAX_PANEL_HISTORY;
|
|
116
116
|
/** Tracks how the current panel content was produced, for history/error-recovery rebuild. */
|
|
117
117
|
private _currentPanelSource;
|
|
118
|
+
/** Latest rendered single-product record shown inline on PDP, reused when the panel has no active PDP detail. */
|
|
119
|
+
private _currentInlineProductSummaryRecord;
|
|
118
120
|
/** IndexedDB session persistence manager. */
|
|
119
121
|
private _session;
|
|
120
122
|
/** LocalStorage-backed chat history manager. */
|
|
@@ -131,6 +133,7 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
|
|
|
131
133
|
private _consecutiveErrorCount;
|
|
132
134
|
/** Last error message text for deduplication. */
|
|
133
135
|
private _lastErrorMessage;
|
|
136
|
+
private _launcherAnchorCleanup;
|
|
134
137
|
private _modeController;
|
|
135
138
|
/** @deprecated Alias for backward compat in tests. Use _modeController.mode. */
|
|
136
139
|
get _assistantMode(): AssistantMode;
|
|
@@ -142,6 +145,9 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
|
|
|
142
145
|
protected onUpdate(context: Partial<PageContext>): void;
|
|
143
146
|
protected onShow(): void;
|
|
144
147
|
protected onHide(): void;
|
|
148
|
+
private _setupLauncherAnchor;
|
|
149
|
+
syncLauncherAnchor(): void;
|
|
150
|
+
private _syncLauncherAnchor;
|
|
145
151
|
protected onDestroy(): void;
|
|
146
152
|
open(options?: {
|
|
147
153
|
state?: 'full' | 'half';
|
|
@@ -259,6 +265,7 @@ export declare class GengageChat extends BaseWidget<ChatWidgetConfig> {
|
|
|
259
265
|
private _panelSourceFromMessage;
|
|
260
266
|
private _getLatestProductDetailsRecord;
|
|
261
267
|
private _getLatestProductGridRecord;
|
|
268
|
+
private _getInlinePdpProductRecord;
|
|
262
269
|
/**
|
|
263
270
|
* Returns the SKU of the product currently rendered in the side panel, if any.
|
|
264
271
|
*
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -82,6 +82,71 @@ export interface ChatWidgetConfig extends BaseWidgetConfig {
|
|
|
82
82
|
hideMobileLauncher?: boolean;
|
|
83
83
|
/** Mobile breakpoint in px (default: 768). */
|
|
84
84
|
mobileBreakpoint?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Dynamically positions the launcher relative to a page element per viewport.
|
|
87
|
+
* ResizeObserver tracks the element and updates the launcher CSS variables on
|
|
88
|
+
* every resize — no static overrides needed. Call `syncLauncherAnchor()` from
|
|
89
|
+
* SPA navigation handlers to re-query anchors after page transitions.
|
|
90
|
+
*
|
|
91
|
+
* Offset semantics:
|
|
92
|
+
* - `0` → launcher edge aligns with the element's same edge (overlap, no gap)
|
|
93
|
+
* - `N>0` → launcher is N px outside the element's far edge
|
|
94
|
+
*
|
|
95
|
+
* `bottomOffset`: 0 = align with el.bottom, N = N px above el.top
|
|
96
|
+
* `rightOffset`: 0 = align with el.right, N = N px left of el.left
|
|
97
|
+
*/
|
|
98
|
+
launcherAnchor?: {
|
|
99
|
+
mobile?: {
|
|
100
|
+
/**
|
|
101
|
+
* Anchor source element selector. If omitted, `bottom` / `right` offsets are
|
|
102
|
+
* applied directly from viewport edges (without element tracking).
|
|
103
|
+
*/
|
|
104
|
+
selector?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Vertical anchor. `offset` is the distance in px; `type` controls the reference:
|
|
107
|
+
* - `'gap'` (default): offset=0 → launcher bottom = element bottom;
|
|
108
|
+
* offset>0 → launcher sits N px above the element's top edge.
|
|
109
|
+
* - `'root'`: offset always measured from the element's bottom edge;
|
|
110
|
+
* offset=0 → launcher bottom = element bottom; N > 0 → N px above element's bottom.
|
|
111
|
+
*/
|
|
112
|
+
bottom?: {
|
|
113
|
+
offset: number;
|
|
114
|
+
type?: 'gap' | 'root';
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Horizontal anchor. `offset` is the distance in px; `type` controls the reference:
|
|
118
|
+
* - `'gap'` (default): offset=0 → launcher right = element right;
|
|
119
|
+
* offset>0 → launcher sits N px to the left of the element's left edge.
|
|
120
|
+
* - `'root'`: offset always measured from the element's right edge;
|
|
121
|
+
* offset=0 → launcher right = element right; N > 0 → N px inward from element's right.
|
|
122
|
+
*/
|
|
123
|
+
right?: {
|
|
124
|
+
offset: number;
|
|
125
|
+
type?: 'gap' | 'root';
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* When true, launcher animates to the anchored position when the element
|
|
129
|
+
* scrolls into view, and returns to default when it scrolls out.
|
|
130
|
+
*/
|
|
131
|
+
dynamicRelocate?: boolean;
|
|
132
|
+
};
|
|
133
|
+
desktop?: {
|
|
134
|
+
/**
|
|
135
|
+
* Anchor source element selector. If omitted, `bottom` / `right` offsets are
|
|
136
|
+
* applied directly from viewport edges (without element tracking).
|
|
137
|
+
*/
|
|
138
|
+
selector?: string;
|
|
139
|
+
bottom?: {
|
|
140
|
+
offset: number;
|
|
141
|
+
type?: 'gap' | 'root';
|
|
142
|
+
};
|
|
143
|
+
right?: {
|
|
144
|
+
offset: number;
|
|
145
|
+
type?: 'gap' | 'root';
|
|
146
|
+
};
|
|
147
|
+
dynamicRelocate?: boolean;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
85
150
|
/**
|
|
86
151
|
* Panel display mode:
|
|
87
152
|
* - 'auto' : Panel appears/hides with content; user can toggle (default)
|
package/dist/chat-runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, d as t, i as r, l as s, n, o as i, r as l, s as C, t as c, u as d } from "./runtime-
|
|
1
|
+
import { c as e, d as t, i as r, l as s, n, o as i, r as l, s as C, t as c, u as d } from "./runtime-DBh8899B.js";
|
|
2
2
|
export {
|
|
3
3
|
s as CHAT_SCROLL_ELEMENT_ID,
|
|
4
4
|
r as ChatPresentationState,
|