@primestyleai/tryon 5.10.177 → 5.10.179

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.
@@ -115,6 +115,8 @@ export interface HistoryEntry {
115
115
  id: string;
116
116
  productId?: string;
117
117
  productTitle?: string;
118
+ productUrl?: string;
119
+ jobId?: string;
118
120
  productImage?: string;
119
121
  productImages?: string[];
120
122
  productCarouselItems?: Array<{
@@ -198,6 +200,8 @@ export interface PrimeStyleTryonProps {
198
200
  * (or to `productImage`) when omitted. */
199
201
  garmentReferenceImage?: string;
200
202
  productTitle?: string;
203
+ /** Absolute product page URL, used by restored history results to continue shopping. */
204
+ productUrl?: string;
201
205
  /** Stable product identifier — used to cache size recommendations per (profile, product) */
202
206
  productId?: string;
203
207
  /** Optional product category metadata used to select the correct sizing flow. */
@@ -224,6 +228,8 @@ export interface PrimeStyleTryonProps {
224
228
  * the fabric correctly without guessing from the image alone. */
225
229
  productMaterial?: string;
226
230
  buttonText?: string;
231
+ /** When true, a completed try-on for this product turns the storefront button into a saved fit result. */
232
+ limitOneColorTryOnPerProduct?: boolean;
227
233
  apiUrl?: string;
228
234
  showPoweredBy?: boolean;
229
235
  /** Show the default camera icon in the button. Defaults to true. Set to false to hide it. */
@@ -47,9 +47,13 @@ export interface MultiSectionMobileProps {
47
47
  onOpenImage?: () => void;
48
48
  /** Download the generated try-on image. */
49
49
  onDownload?: () => void;
50
+ /** Action row rendered above the result image (show fit/full size/download). */
51
+ imageActionBar?: ReactNode;
52
+ /** Rating widget rendered over the lower-left of the result image. */
53
+ feedbackSlot?: ReactNode;
50
54
  /** Bubble image natural dimensions up to the parent (for the overlay sizing). */
51
55
  onImageLoad?: (e: React.SyntheticEvent<HTMLImageElement>) => void;
52
56
  profileCompletionCta?: ReactNode;
53
57
  t: TranslateFn;
54
58
  }
55
- export declare function MultiSectionMobile({ productImage, productTitle, sizingResult, sizeGuide, sectionEntries, pendingCustomSizes, onSelectSection, onTryOn, tryOnProcessing, tryOnStartedAt, resultImageUrl, tryOnDone, onTryAgain, onClose, overlayNode, showLines, onToggleLines, onOpenImage, onDownload, onImageLoad, profileCompletionCta, t, }: MultiSectionMobileProps): import("react/jsx-runtime").JSX.Element;
59
+ export declare function MultiSectionMobile({ productImage, productTitle, sizingResult, sizeGuide, sectionEntries, pendingCustomSizes, onSelectSection, onTryOn, tryOnProcessing, tryOnStartedAt, resultImageUrl, tryOnDone, onTryAgain, onClose, overlayNode, showLines, onToggleLines, onOpenImage, onDownload, imageActionBar, feedbackSlot, onImageLoad, profileCompletionCta, t, }: MultiSectionMobileProps): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import type { TranslateFn } from "../../i18n";
2
2
  import type { ViewState, SizeGuide, SizingResult } from "../types";
3
3
  import type { BodyLandmarks } from "../../pose-detect";
4
4
  import { type ProductPhotoCarouselItem } from "./ProductPhotoCarouselCard";
5
- export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productImages, productCarouselItems, productTitle, productMaterial, productDescription, sizingUnit, setView, handleDownload, selectedFile, previewUrl, handleFileSelect, handleRemovePreview, handleTryOnSubmit, tryOnProcessing, tryOnStartedAt, bodyLandmarks, faceLandmarks, measurementType, estimationDone, activeSection, setActiveSection, onResetTryOn, onClose, userHeightCm, pendingCustomSizes: pendingCustomSizesProp, onPendingCustomSizeChange, tryOnAvailable, showProfileCompletionCta, onProfileCompletionCta, portalContainer, t, }: {
5
+ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productImages, productCarouselItems, productTitle, productUrl, productMaterial, productDescription, sizingUnit, setView, handleDownload, onContinueShopping, onTryOnFeedbackSubmit, selectedFile, previewUrl, handleFileSelect, handleRemovePreview, handleTryOnSubmit, tryOnProcessing, tryOnStartedAt, bodyLandmarks, faceLandmarks, measurementType, estimationDone, activeSection, setActiveSection, onResetTryOn, onClose, userHeightCm, pendingCustomSizes: pendingCustomSizesProp, onPendingCustomSizeChange, tryOnAvailable, showProfileCompletionCta, onProfileCompletionCta, portalContainer, t, }: {
6
6
  estimationDone?: boolean;
7
7
  sizingLoading: boolean;
8
8
  sizingResult: SizingResult | null;
@@ -16,6 +16,7 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
16
16
  /** Preferred carousel items, typically complete-the-look products. */
17
17
  productCarouselItems?: ProductPhotoCarouselItem[];
18
18
  productTitle: string;
19
+ productUrl?: string;
19
20
  /** Garment material/fabric — feeds the "Garment Spotlight" card on
20
21
  * the engaging try-on processing UI. */
21
22
  productMaterial?: string;
@@ -25,6 +26,11 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
25
26
  sizingUnit: string;
26
27
  setView: (v: ViewState) => void;
27
28
  handleDownload: () => void;
29
+ onContinueShopping?: () => void;
30
+ onTryOnFeedbackSubmit?: (input: {
31
+ rating?: number;
32
+ note?: string;
33
+ }) => Promise<void>;
28
34
  selectedFile: File | null;
29
35
  previewUrl: string | null;
30
36
  handleFileSelect: (file: File) => void;
@@ -24,9 +24,9 @@ export declare function buildFitInfo(matchDetails: Array<{
24
24
  }>, poseLines?: MeasurementLines | null, unit?: "in" | "cm" | "mm"): FitAreaInfo[];
25
25
  /**
26
26
  * Build silhouette-prompt context forwarded to the backend try-on Gemini
27
- * call. Returns the three text-form inputs that the doc example fed to
28
- * Gemini (user raw measurements, recommended size, chart summary) so the
29
- * try-on prompt can reason about absolute values and the chart's grading.
27
+ * call. Returns only the selected fit context Gemini needs: user raw
28
+ * measurements, recommended size, and the chosen size's measurement row.
29
+ * The full product size guide is intentionally not forwarded to try-on.
30
30
  *
31
31
  * All fields optional — returns `undefined` when there's nothing useful
32
32
  * to add (e.g. accessory flow, no sizingResult).
@@ -70,7 +70,6 @@ selectedSizeOverride?: string,
70
70
  userHeight?: string, userWeight?: string): {
71
71
  recommendedSize?: string;
72
72
  recommendedSizeMeasurements?: string;
73
- sizeChartSummary?: string;
74
73
  userMeasurementsText?: string;
75
74
  userHeight?: string;
76
75
  userWeight?: string;
@@ -21,3 +21,17 @@ export declare function logSizeShown(input: {
21
21
  recommendedSize?: string;
22
22
  fromCache?: boolean;
23
23
  }): void;
24
+ export declare function logTryOnFeedback(input: {
25
+ jobId?: string;
26
+ historyEntryId?: string;
27
+ rating?: number;
28
+ note?: string;
29
+ productId?: string;
30
+ productTitle?: string;
31
+ productUrl?: string;
32
+ recommendedSize?: string;
33
+ profileLoggedIn?: boolean;
34
+ profileId?: string;
35
+ profileName?: string;
36
+ profileAccessToken?: string;
37
+ }): void;