@gengage/assistant-fe 0.3.26 → 0.3.27
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 +1 -3
- package/dist/chat/components/ChatDrawer.d.ts +0 -1
- package/dist/chat/components/ConsultingStylePicker.d.ts +1 -0
- package/dist/chat/components/PhotoAnalysisCard.d.ts +2 -10
- package/dist/chat/types.d.ts +6 -5
- package/dist/{chat-DkO7BwYQ.js → chat-CWnNdto9.js} +2260 -2268
- package/dist/chat.iife.js +30 -30
- package/dist/chat.js +1 -1
- package/dist/{common-B8mn_Ggf.js → common-DKSCFuWo.js} +2 -2
- package/dist/common.js +4 -4
- package/dist/index.js +6 -6
- package/dist/{native-webview-Rd6AS50I.js → native-webview-CaasrbNn.js} +4 -4
- package/dist/native.iife.js +22 -22
- package/dist/native.js +1 -1
- package/dist/{qna-DXCQtwLq.js → qna-D33BNaWd.js} +1 -1
- package/dist/qna.iife.js +7 -7
- package/dist/qna.js +1 -1
- package/dist/{schemas-CTbgsvNJ.js → schemas-DJ1qbfi8.js} +64 -61
- package/dist/{simrel-DP2EMyua.js → simrel-DstZ5m2H.js} +1 -1
- package/dist/simrel.iife.js +7 -7
- package/dist/simrel.js +1 -1
- package/package.json +1 -1
package/dist/chat/catalog.d.ts
CHANGED
|
@@ -365,7 +365,6 @@ export declare const PhotoAnalysisCardSchema: z.ZodObject<{
|
|
|
365
365
|
focus_points: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
366
366
|
celeb_style: z.ZodOptional<z.ZodString>;
|
|
367
367
|
celeb_style_reason: z.ZodOptional<z.ZodString>;
|
|
368
|
-
details: z.ZodArray<z.ZodString>;
|
|
369
368
|
next_question: z.ZodOptional<z.ZodString>;
|
|
370
369
|
style_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
371
370
|
}, z.core.$strip>;
|
|
@@ -765,11 +764,10 @@ export declare const chatCatalog: {
|
|
|
765
764
|
focus_points: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
766
765
|
celeb_style: z.ZodOptional<z.ZodString>;
|
|
767
766
|
celeb_style_reason: z.ZodOptional<z.ZodString>;
|
|
768
|
-
details: z.ZodArray<z.ZodString>;
|
|
769
767
|
next_question: z.ZodOptional<z.ZodString>;
|
|
770
768
|
style_images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
771
769
|
}, z.core.$strip>;
|
|
772
|
-
readonly description: "Structured photo analysis card with strengths, focus points, celeb vibe,
|
|
770
|
+
readonly description: "Structured photo analysis card with strengths, focus points, celeb vibe, and follow-up question.";
|
|
773
771
|
};
|
|
774
772
|
readonly BeautyPhotoStep: {
|
|
775
773
|
readonly schema: z.ZodObject<{
|
|
@@ -306,7 +306,6 @@ export declare class ChatDrawer {
|
|
|
306
306
|
focusPoints?: string[];
|
|
307
307
|
celebStyle?: string;
|
|
308
308
|
celebStyleReason?: string;
|
|
309
|
-
details: string[];
|
|
310
309
|
nextQuestion?: string;
|
|
311
310
|
}): void;
|
|
312
311
|
/** Mark a message as the first bot message in its thread (for special styling). */
|
|
@@ -6,23 +6,15 @@ export interface PhotoAnalysisData {
|
|
|
6
6
|
focusPoints?: string[];
|
|
7
7
|
celebStyle?: string;
|
|
8
8
|
celebStyleReason?: string;
|
|
9
|
-
details: string[];
|
|
10
9
|
nextQuestion?: string;
|
|
11
10
|
}
|
|
12
11
|
/** Extract structured photo-analysis data from a UISpec element's props. */
|
|
13
12
|
export declare function parsePhotoAnalysisProps(props: Record<string, unknown>): PhotoAnalysisData | null;
|
|
14
13
|
export declare function renderPhotoAnalysisCard(element: UIElement, ctx: ChatUISpecRenderContext): HTMLElement;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* When structured data is available (from a PhotoAnalysisCard UISpec), it renders
|
|
19
|
-
* the summary, sections, and follow-up question directly. Otherwise, falls back
|
|
20
|
-
* to a sentence-splitting heuristic for old backends that don't send the UISpec.
|
|
21
|
-
*/
|
|
22
|
-
export declare function renderPhotoAnalysisBubble(container: HTMLElement, content: string, labels: {
|
|
14
|
+
/** Renders the structured PhotoAnalysisCard data captured from the UISpec. */
|
|
15
|
+
export declare function renderPhotoAnalysisBubble(container: HTMLElement, labels: {
|
|
23
16
|
badge: string;
|
|
24
17
|
strengths: string;
|
|
25
18
|
focus: string;
|
|
26
19
|
celebStyle: string;
|
|
27
|
-
seeMore: string;
|
|
28
20
|
}, structured?: PhotoAnalysisData): void;
|
package/dist/chat/types.d.ts
CHANGED
|
@@ -194,6 +194,10 @@ export interface ChatI18n {
|
|
|
194
194
|
watchStylesPreparedTitle: string;
|
|
195
195
|
/** Label for products that were not included in a backend recommendation group. */
|
|
196
196
|
consultingOtherCompatibleProductsLabel: string;
|
|
197
|
+
consultingStyleLoadingDescription: string;
|
|
198
|
+
consultingStyleUnavailableDescription: string;
|
|
199
|
+
consultingStyleLoadingBadge: string;
|
|
200
|
+
consultingStyleUnavailableBadge: string;
|
|
197
201
|
choicePrompterHeading: string;
|
|
198
202
|
choicePrompterSuggestion: string;
|
|
199
203
|
choicePrompterCta: string;
|
|
@@ -266,8 +270,6 @@ export interface ChatI18n {
|
|
|
266
270
|
photoAnalysisFocusLabel: string;
|
|
267
271
|
/** Photo analysis section label: celeb style match. */
|
|
268
272
|
photoAnalysisCelebStyleLabel: string;
|
|
269
|
-
/** Photo analysis expander summary text. */
|
|
270
|
-
photoAnalysisSeeMoreLabel: string;
|
|
271
273
|
/** Beauty photo step card: title. */
|
|
272
274
|
beautyPhotoStepTitle: string;
|
|
273
275
|
/** Beauty photo step card: description. */
|
|
@@ -333,7 +335,7 @@ export interface ChatUISpecRenderContext {
|
|
|
333
335
|
onProductSelect?: (product: Record<string, unknown>) => void;
|
|
334
336
|
pricing?: import('../common/price-formatter.js').PriceFormatConfig | undefined;
|
|
335
337
|
productPriceUi?: ProductPriceUiConfig | undefined;
|
|
336
|
-
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' | 'consultingOtherCompatibleProductsLabel' | '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' | '
|
|
338
|
+
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' | 'consultingOtherCompatibleProductsLabel' | 'consultingStyleLoadingDescription' | 'consultingStyleUnavailableDescription' | 'consultingStyleLoadingBadge' | 'consultingStyleUnavailableBadge' | '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' | 'beautyPhotoStepTitle' | 'beautyPhotoStepDescription' | 'beautyPhotoStepUpload' | 'beautyPhotoStepProcessing' | 'beautyPhotoStepSkip'>;
|
|
337
339
|
productSort?: ProductSortState | undefined;
|
|
338
340
|
onSortChange?: ((sort: ProductSortState) => void) | undefined;
|
|
339
341
|
comparisonSelectMode?: boolean | undefined;
|
|
@@ -373,14 +375,13 @@ export interface ChatMessage {
|
|
|
373
375
|
silent?: boolean;
|
|
374
376
|
/** Backend render hint for special rendering (e.g. "photo_analysis"). */
|
|
375
377
|
renderHint?: string;
|
|
376
|
-
/** Structured photo analysis data from PhotoAnalysisCard UISpec
|
|
378
|
+
/** Structured photo analysis data from PhotoAnalysisCard UISpec. */
|
|
377
379
|
photoAnalysis?: {
|
|
378
380
|
summary: string;
|
|
379
381
|
strengths?: string[];
|
|
380
382
|
focusPoints?: string[];
|
|
381
383
|
celebStyle?: string;
|
|
382
384
|
celebStyleReason?: string;
|
|
383
|
-
details: string[];
|
|
384
385
|
nextQuestion?: string;
|
|
385
386
|
};
|
|
386
387
|
timestamp: number;
|