@gengage/assistant-fe 0.3.25 → 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.
@@ -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, details, and follow-up question.";
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). */
@@ -4,6 +4,7 @@ export type StyleVariation = {
4
4
  style_label?: string;
5
5
  style_mood?: string;
6
6
  image_url?: string;
7
+ status?: string;
7
8
  product_list?: StyleVariationProduct[];
8
9
  recommendation_groups?: Array<{
9
10
  label?: string;
@@ -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
- * Renders a photo analysis card into a chat message bubble.
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;
@@ -192,6 +192,12 @@ export interface ChatI18n {
192
192
  beautyStylesPreparedTitle: string;
193
193
  /** Title shown above watch-expert style cards. Supports {count} placeholder. */
194
194
  watchStylesPreparedTitle: string;
195
+ /** Label for products that were not included in a backend recommendation group. */
196
+ consultingOtherCompatibleProductsLabel: string;
197
+ consultingStyleLoadingDescription: string;
198
+ consultingStyleUnavailableDescription: string;
199
+ consultingStyleLoadingBadge: string;
200
+ consultingStyleUnavailableBadge: string;
195
201
  choicePrompterHeading: string;
196
202
  choicePrompterSuggestion: string;
197
203
  choicePrompterCta: string;
@@ -264,8 +270,6 @@ export interface ChatI18n {
264
270
  photoAnalysisFocusLabel: string;
265
271
  /** Photo analysis section label: celeb style match. */
266
272
  photoAnalysisCelebStyleLabel: string;
267
- /** Photo analysis expander summary text. */
268
- photoAnalysisSeeMoreLabel: string;
269
273
  /** Beauty photo step card: title. */
270
274
  beautyPhotoStepTitle: string;
271
275
  /** Beauty photo step card: description. */
@@ -331,7 +335,7 @@ export interface ChatUISpecRenderContext {
331
335
  onProductSelect?: (product: Record<string, unknown>) => void;
332
336
  pricing?: import('../common/price-formatter.js').PriceFormatConfig | undefined;
333
337
  productPriceUi?: ProductPriceUiConfig | undefined;
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'>;
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'>;
335
339
  productSort?: ProductSortState | undefined;
336
340
  onSortChange?: ((sort: ProductSortState) => void) | undefined;
337
341
  comparisonSelectMode?: boolean | undefined;
@@ -371,14 +375,13 @@ export interface ChatMessage {
371
375
  silent?: boolean;
372
376
  /** Backend render hint for special rendering (e.g. "photo_analysis"). */
373
377
  renderHint?: string;
374
- /** Structured photo analysis data from PhotoAnalysisCard UISpec (preferred over sentence-splitting). */
378
+ /** Structured photo analysis data from PhotoAnalysisCard UISpec. */
375
379
  photoAnalysis?: {
376
380
  summary: string;
377
381
  strengths?: string[];
378
382
  focusPoints?: string[];
379
383
  celebStyle?: string;
380
384
  celebStyleReason?: string;
381
- details: string[];
382
385
  nextQuestion?: string;
383
386
  };
384
387
  timestamp: number;