@gengage/assistant-fe 0.3.22 → 0.3.23
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/chat/catalog.d.ts +11 -1
- package/dist/chat/components/ChatDrawer.d.ts +5 -0
- package/dist/chat/components/PhotoAnalysisCard.d.ts +14 -7
- package/dist/chat/types.d.ts +14 -1
- package/dist/chat-BOkLnT1i.cjs +93 -0
- package/dist/{chat-CHAi6Xej.js → chat-DBJ8ZWch.js} +1509 -1435
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +20 -20
- package/dist/chat.js +1 -1
- package/dist/{common-DXdLT4e0.cjs → common-0GWnpStO.cjs} +1 -1
- package/dist/{common-Ct6r0F2s.js → common-BJZB1LIH.js} +1 -1
- package/dist/common.cjs +1 -1
- package/dist/common.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/{native-webview-Cf5WtlIH.js → native-webview-111Or6o1.js} +1 -1
- package/dist/{native-webview-BaW1H_nZ.cjs → native-webview-BePZBK3U.cjs} +1 -1
- package/dist/native.cjs +1 -1
- package/dist/native.iife.js +10 -10
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chat-BF5pt6iX.cjs +0 -93
package/dist/chat/catalog.d.ts
CHANGED
|
@@ -362,6 +362,11 @@ export declare const HandoffNoticeSchema: z.ZodObject<{
|
|
|
362
362
|
export declare const PhotoAnalysisCardSchema: z.ZodObject<{
|
|
363
363
|
summary: z.ZodString;
|
|
364
364
|
clues: z.ZodArray<z.ZodString>;
|
|
365
|
+
strengths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
366
|
+
focus_points: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
367
|
+
celeb_style: z.ZodOptional<z.ZodString>;
|
|
368
|
+
celeb_style_reason: z.ZodOptional<z.ZodString>;
|
|
369
|
+
details: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
365
370
|
next_question: z.ZodOptional<z.ZodString>;
|
|
366
371
|
style_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
367
372
|
}, z.core.$strip>;
|
|
@@ -758,10 +763,15 @@ export declare const chatCatalog: {
|
|
|
758
763
|
readonly schema: z.ZodObject<{
|
|
759
764
|
summary: z.ZodString;
|
|
760
765
|
clues: z.ZodArray<z.ZodString>;
|
|
766
|
+
strengths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
767
|
+
focus_points: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
768
|
+
celeb_style: z.ZodOptional<z.ZodString>;
|
|
769
|
+
celeb_style_reason: z.ZodOptional<z.ZodString>;
|
|
770
|
+
details: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
761
771
|
next_question: z.ZodOptional<z.ZodString>;
|
|
762
772
|
style_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
763
773
|
}, z.core.$strip>;
|
|
764
|
-
readonly description: "Structured photo analysis card with
|
|
774
|
+
readonly description: "Structured photo analysis card with strengths, focus points, celeb vibe, details, and follow-up question.";
|
|
765
775
|
};
|
|
766
776
|
readonly BeautyPhotoStep: {
|
|
767
777
|
readonly schema: z.ZodObject<{
|
|
@@ -303,6 +303,11 @@ export declare class ChatDrawer {
|
|
|
303
303
|
updateBotMessage(messageId: string, html: string, renderHint?: string, photoAnalysis?: {
|
|
304
304
|
summary: string;
|
|
305
305
|
clues: string[];
|
|
306
|
+
strengths?: string[];
|
|
307
|
+
focusPoints?: string[];
|
|
308
|
+
celebStyle?: string;
|
|
309
|
+
celebStyleReason?: string;
|
|
310
|
+
details?: string[];
|
|
306
311
|
nextQuestion?: string;
|
|
307
312
|
}): void;
|
|
308
313
|
/** Mark a message as the first bot message in its thread (for special styling). */
|
|
@@ -3,6 +3,11 @@ import { ChatUISpecRenderContext } from '../types.js';
|
|
|
3
3
|
export interface PhotoAnalysisData {
|
|
4
4
|
summary: string;
|
|
5
5
|
clues: string[];
|
|
6
|
+
strengths?: string[];
|
|
7
|
+
focusPoints?: string[];
|
|
8
|
+
celebStyle?: string;
|
|
9
|
+
celebStyleReason?: string;
|
|
10
|
+
details?: string[];
|
|
6
11
|
nextQuestion?: string;
|
|
7
12
|
}
|
|
8
13
|
/** Extract structured photo-analysis data from a UISpec element's props. */
|
|
@@ -12,11 +17,13 @@ export declare function renderPhotoAnalysisCard(element: UIElement, ctx: ChatUIS
|
|
|
12
17
|
* Renders a photo analysis card into a chat message bubble.
|
|
13
18
|
*
|
|
14
19
|
* When structured data is available (from a PhotoAnalysisCard UISpec), it renders
|
|
15
|
-
* the summary,
|
|
16
|
-
* sentence-splitting heuristic for old backends that don't send the UISpec.
|
|
20
|
+
* the summary, sections, and follow-up question directly. Otherwise, falls back
|
|
21
|
+
* to a sentence-splitting heuristic for old backends that don't send the UISpec.
|
|
17
22
|
*/
|
|
18
|
-
export declare function renderPhotoAnalysisBubble(container: HTMLElement, content: string,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
export declare function renderPhotoAnalysisBubble(container: HTMLElement, content: string, labels: {
|
|
24
|
+
badge: string;
|
|
25
|
+
strengths: string;
|
|
26
|
+
focus: string;
|
|
27
|
+
celebStyle: string;
|
|
28
|
+
seeMore: string;
|
|
29
|
+
}, structured?: PhotoAnalysisData): void;
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -258,6 +258,14 @@ export interface ChatI18n {
|
|
|
258
258
|
aiBrowseCategoriesTitle: string;
|
|
259
259
|
/** Badge text on photo analysis message cards. */
|
|
260
260
|
photoAnalysisBadge: string;
|
|
261
|
+
/** Photo analysis section label: strengths. */
|
|
262
|
+
photoAnalysisStrengthsLabel: string;
|
|
263
|
+
/** Photo analysis section label: focus points. */
|
|
264
|
+
photoAnalysisFocusLabel: string;
|
|
265
|
+
/** Photo analysis section label: celeb style match. */
|
|
266
|
+
photoAnalysisCelebStyleLabel: string;
|
|
267
|
+
/** Photo analysis expander summary text. */
|
|
268
|
+
photoAnalysisSeeMoreLabel: string;
|
|
261
269
|
/** Beauty photo step card: title. */
|
|
262
270
|
beautyPhotoStepTitle: string;
|
|
263
271
|
/** Beauty photo step card: description. */
|
|
@@ -323,7 +331,7 @@ export interface ChatUISpecRenderContext {
|
|
|
323
331
|
onProductSelect?: (product: Record<string, unknown>) => void;
|
|
324
332
|
pricing?: import('../common/price-formatter.js').PriceFormatConfig | undefined;
|
|
325
333
|
productPriceUi?: ProductPriceUiConfig | undefined;
|
|
326
|
-
i18n?: Pick<ChatI18n, 'productCtaLabel' | 'viewOnSiteLabel' | 'aiTopPicksTitle' | 'roleWinner' | 'roleBestValue' | 'roleBestAlternative' | 'viewDetails' | 'groundingReviewCta' | 'groundingReviewSubtitle' | 'variantsLabel' | 'sortRelated' | 'sortPriceAsc' | 'sortPriceDesc' | 'sortToolbarAriaLabel' | 'compareSelected' | 'compareMinHint' | 'comparisonSelectLabel' | 'comparisonSelectedLabel' | 'comparisonSelectCardHint' | 'panelTitleProductDetails' | 'panelTitleSimilarProducts' | 'panelTitleComparisonResults' | 'panelTitleCategories' | 'panelTitleSearchResults' | 'inStockLabel' | 'outOfStockLabel' | 'findSimilarLabel' | 'galleryPrevAriaLabel' | 'galleryNextAriaLabel' | 'beautyStylesPreparedTitle' | 'watchStylesPreparedTitle' | 'viewMoreLabel' | 'similarProductsLabel' | 'addToCartButton' | 'shareButton' | 'productInfoTab' | 'specificationsTab' | 'recommendedChoiceLabel' | 'highlightsLabel' | 'keyDifferencesLabel' | 'specialCasesLabel' | 'emptyReviewsMessage' | 'closeAriaLabel' | 'dismissAriaLabel' | 'startChatLabel' | 'handoffHeading' | 'customerReviewsTitle' | 'addToFavoritesLabel' | 'reviewFilterPositive' | 'reviewFilterNegative' | 'decreaseLabel' | 'increaseLabel' | 'reviewCustomersMentionSingular' | 'reviewCustomersMentionPlural' | 'reviewSubjectsHeading' | 'aiBrowseCategoriesTitle' | 'photoAnalysisBadge' | 'beautyPhotoStepTitle' | 'beautyPhotoStepDescription' | 'beautyPhotoStepUpload' | 'beautyPhotoStepProcessing' | 'beautyPhotoStepSkip'>;
|
|
334
|
+
i18n?: Pick<ChatI18n, 'productCtaLabel' | 'viewOnSiteLabel' | 'aiTopPicksTitle' | 'roleWinner' | 'roleBestValue' | 'roleBestAlternative' | 'viewDetails' | 'groundingReviewCta' | 'groundingReviewSubtitle' | 'variantsLabel' | 'sortRelated' | 'sortPriceAsc' | 'sortPriceDesc' | 'sortToolbarAriaLabel' | 'compareSelected' | 'compareMinHint' | 'comparisonSelectLabel' | 'comparisonSelectedLabel' | 'comparisonSelectCardHint' | 'panelTitleProductDetails' | 'panelTitleSimilarProducts' | 'panelTitleComparisonResults' | 'panelTitleCategories' | 'panelTitleSearchResults' | 'inStockLabel' | 'outOfStockLabel' | 'findSimilarLabel' | 'galleryPrevAriaLabel' | 'galleryNextAriaLabel' | 'beautyStylesPreparedTitle' | 'watchStylesPreparedTitle' | 'viewMoreLabel' | 'similarProductsLabel' | 'addToCartButton' | 'shareButton' | 'productInfoTab' | 'specificationsTab' | 'recommendedChoiceLabel' | 'highlightsLabel' | 'keyDifferencesLabel' | 'specialCasesLabel' | 'emptyReviewsMessage' | 'closeAriaLabel' | 'dismissAriaLabel' | 'startChatLabel' | 'handoffHeading' | 'customerReviewsTitle' | 'addToFavoritesLabel' | 'reviewFilterPositive' | 'reviewFilterNegative' | 'decreaseLabel' | 'increaseLabel' | 'reviewCustomersMentionSingular' | 'reviewCustomersMentionPlural' | 'reviewSubjectsHeading' | 'aiBrowseCategoriesTitle' | 'photoAnalysisBadge' | 'photoAnalysisStrengthsLabel' | 'photoAnalysisFocusLabel' | 'photoAnalysisCelebStyleLabel' | 'photoAnalysisSeeMoreLabel' | 'beautyPhotoStepTitle' | 'beautyPhotoStepDescription' | 'beautyPhotoStepUpload' | 'beautyPhotoStepProcessing' | 'beautyPhotoStepSkip'>;
|
|
327
335
|
productSort?: ProductSortState | undefined;
|
|
328
336
|
onSortChange?: ((sort: ProductSortState) => void) | undefined;
|
|
329
337
|
comparisonSelectMode?: boolean | undefined;
|
|
@@ -367,6 +375,11 @@ export interface ChatMessage {
|
|
|
367
375
|
photoAnalysis?: {
|
|
368
376
|
summary: string;
|
|
369
377
|
clues: string[];
|
|
378
|
+
strengths?: string[];
|
|
379
|
+
focusPoints?: string[];
|
|
380
|
+
celebStyle?: string;
|
|
381
|
+
celebStyleReason?: string;
|
|
382
|
+
details?: string[];
|
|
370
383
|
nextQuestion?: string;
|
|
371
384
|
};
|
|
372
385
|
timestamp: number;
|