@gengage/assistant-fe 0.4.5 → 0.4.7
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/README.md +22 -2
- package/dist/api-paths-DR5bPNhi.js +1213 -0
- package/dist/assistant-fe.css +1 -1
- package/dist/chat/index.d.ts +1 -374
- package/dist/chat/runtime.d.ts +374 -0
- package/dist/chat-BRKK63lt.js +303 -0
- package/dist/chat-runtime.js +13 -0
- package/dist/chat.iife.js +8 -8
- package/dist/chat.js +11 -10
- package/dist/common/config-constants.d.ts +1 -0
- package/dist/common/config-schema.d.ts +0 -1
- package/dist/common/overlay.d.ts +8 -4
- package/dist/common/protocol-adapter.d.ts +1 -1
- package/dist/common/safe-html.d.ts +1 -1
- package/dist/common-c-awF96O.js +491 -0
- package/dist/common.js +78 -76
- package/dist/{connection-warning-n88bjkqL.js → connection-warning-ecZqpczd.js} +1 -1
- package/dist/context-DGz5F81j.js +532 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +73 -68
- package/dist/locale-CfqNifrU.js +7 -0
- package/dist/native-webview-C_PmKnzm.js +273 -0
- package/dist/native.iife.js +28 -91
- package/dist/native.js +1 -1
- package/dist/overlay-DJ1ZRMfI.js +212 -0
- package/dist/overlay.d.ts +4 -0
- package/dist/overlay.js +10 -0
- package/dist/pill-launcher-DSEeJT9h.js +364 -0
- package/dist/qna/index.d.ts +1 -61
- package/dist/qna/runtime.d.ts +62 -0
- package/dist/qna/types.d.ts +14 -0
- package/dist/qna-BNvttR6s.js +40 -0
- package/dist/qna-runtime.js +8 -0
- package/dist/qna.css +1 -1
- package/dist/qna.iife.js +21 -21
- package/dist/qna.js +6 -5
- package/dist/{simrel-K2TGFi1r.js → runtime-BsZZ8zTg.js} +245 -293
- package/dist/{chat-B1lLKIxj.js → runtime-DNbjpTCh.js} +1643 -2297
- package/dist/runtime-SKDvc0Xc.js +660 -0
- package/dist/schemas-CLo8wCjs.js +3207 -0
- package/dist/simbut/index.d.ts +3 -1
- package/dist/simbut/types.d.ts +11 -0
- package/dist/simbut-Bw3vBFtW.js +109 -0
- package/dist/simbut.css +1 -1
- package/dist/simbut.iife.js +10 -10
- package/dist/simbut.js +1 -1
- package/dist/simrel/index.d.ts +3 -59
- package/dist/simrel/renderers/default.d.ts +40 -0
- package/dist/simrel/runtime.d.ts +59 -0
- package/dist/simrel-DJZ983BF.js +513 -0
- package/dist/simrel-runtime.js +8 -0
- package/dist/simrel.css +3 -0
- package/dist/simrel.iife.js +38 -38
- package/dist/simrel.js +8 -6
- package/dist/widget-base-2-B1Ch5I.js +578 -0
- package/package.json +22 -1
- package/dist/common-C5e2gLuG.js +0 -387
- package/dist/locale-MM0U5eeR.js +0 -1109
- package/dist/native-webview-niMtkiHX.js +0 -586
- package/dist/qna-C5Ok3wd0.js +0 -663
- package/dist/schemas-JpRGzRQT.js +0 -4419
- package/dist/simbut-Cb5RfaAp.js +0 -79
- /package/dist/{price-formatter-CR6VT5z4.js → price-formatter-xI3g9Cd4.js} +0 -0
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ await chat.init({
|
|
|
47
47
|
|
|
48
48
|
```html
|
|
49
49
|
<script type="module">
|
|
50
|
-
import { initOverlayWidgets } from 'https://cdn.jsdelivr.net/npm/@gengage/assistant-fe/dist/
|
|
50
|
+
import { initOverlayWidgets } from 'https://cdn.jsdelivr.net/npm/@gengage/assistant-fe/dist/overlay.js';
|
|
51
51
|
|
|
52
52
|
await initOverlayWidgets({
|
|
53
53
|
accountId: 'YOUR_ACCOUNT_ID',
|
|
@@ -87,7 +87,7 @@ See [docs/native-mobile-sdk.md](docs/native-mobile-sdk.md) for iOS WKWebView, An
|
|
|
87
87
|
|--------|--------|-------------|
|
|
88
88
|
| **Chat** | `@gengage/assistant-fe/chat` | Floating AI drawer with streaming responses, product cards, comparison tables |
|
|
89
89
|
| **QNA** | `@gengage/assistant-fe/qna` | Contextual action buttons for product pages |
|
|
90
|
-
| **SimRel** | `@gengage/assistant-fe/simrel` | AI-powered similar/related product grid |
|
|
90
|
+
| **SimRel** | `@gengage/assistant-fe/simrel` | AI-powered similar/related product grid plus reusable product-card renderer configured by labels, field mappings, media, and CSS variables |
|
|
91
91
|
| **SimBut** | `@gengage/assistant-fe/simbut` | PDP image-overlay pill that opens a `findSimilar` flow for the current product |
|
|
92
92
|
| **Native** | `@gengage/assistant-fe/native` | Android/iOS WebView bridge + overlay bootstrap |
|
|
93
93
|
|
|
@@ -106,6 +106,26 @@ chat.init({
|
|
|
106
106
|
|
|
107
107
|
**Component overrides** — swap any UI component via the json-render registry.
|
|
108
108
|
|
|
109
|
+
**SimRel product cards** — use `createSimRelRenderer` for richer product cards without account-specific SDK code:
|
|
110
|
+
```ts
|
|
111
|
+
import { initOverlayWidgets } from '@gengage/assistant-fe/overlay';
|
|
112
|
+
import { createSimRelRenderer } from '@gengage/assistant-fe/simrel';
|
|
113
|
+
|
|
114
|
+
await initOverlayWidgets({
|
|
115
|
+
// ...
|
|
116
|
+
simrel: {
|
|
117
|
+
mountTarget: '#similar-products',
|
|
118
|
+
renderer: createSimRelRenderer({
|
|
119
|
+
labels: { cta: 'View' },
|
|
120
|
+
fields: {
|
|
121
|
+
subtitle: ['categoryNames', 'extras.category_names'],
|
|
122
|
+
},
|
|
123
|
+
media: { promotionIconUrl: '/assets/promo.svg' },
|
|
124
|
+
}),
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
109
129
|
**SimBut customization** — use theme tokens, `i18n.findSimilarLabel`, and `onFindSimilar` for the PDP image-overlay pill.
|
|
110
130
|
|
|
111
131
|
**Full fork** — replace `src/chat/components/` entirely; keep `catalog.ts` + `index.ts`.
|