@primestyleai/tryon 5.10.101 → 5.10.103

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.
@@ -139,6 +139,10 @@ export type ViewState = "idle" | "welcome" | "body-profile" | "estimation-review
139
139
  export type DrawerType = "profiles" | "history" | null;
140
140
  export interface PrimeStyleTryonProps {
141
141
  productImage: string;
142
+ /** Optional gallery of product photos for the active color/variant. Shown
143
+ * as an auto-cycling carousel on the single-garment SizeResultView while
144
+ * the try-on image is being generated, to keep the user entertained. */
145
+ productImages?: string[];
142
146
  productTitle?: string;
143
147
  /** Stable product identifier — used to cache size recommendations per (profile, product) */
144
148
  productId?: string;
@@ -0,0 +1,12 @@
1
+ import type { TranslateFn } from "../../i18n";
2
+ /**
3
+ * Photo strip — shows PER_SLIDE images per row with even spacing, advances
4
+ * to the next group every CYCLE_MS, dot indicators below. Lives at the
5
+ * bottom of the single-garment right panel to entertain users while the
6
+ * try-on is generating.
7
+ */
8
+ export declare function ProductPhotoCarouselCard({ photos, productTitle, t, }: {
9
+ photos: string[];
10
+ productTitle?: string;
11
+ t: TranslateFn;
12
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,14 +1,17 @@
1
1
  import type { TranslateFn } from "../../i18n";
2
- import type { FitAreaInfo } from "../../types";
3
2
  import type { ViewState, SizeGuide, SizingResult } from "../types";
4
3
  import type { BodyLandmarks } from "../../pose-detect";
5
- export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productTitle, productMaterial, productDescription, sizingUnit, setView, handleDownload, onRetryWithFit, retryLoading, retryStartedAt, selectedFile, previewUrl, handleFileSelect, handleRemovePreview, handleTryOnSubmit, tryOnProcessing, tryOnStartedAt, bodyLandmarks, faceLandmarks, measurementType, estimationDone, activeSection, setActiveSection, onResetTryOn, onClose, userHeightCm, pendingCustomSizes: pendingCustomSizesProp, onPendingCustomSizeChange, onRegenerateTryOn, t, }: {
4
+ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productImages, 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, t, }: {
6
5
  estimationDone?: boolean;
7
6
  sizingLoading: boolean;
8
7
  sizingResult: SizingResult | null;
9
8
  sizeGuide: SizeGuide | null;
10
9
  resultImageUrl: string | null;
11
10
  productImage: string;
11
+ /** Optional gallery of photos for the active color/variant — drives the
12
+ * auto-cycling carousel card on the single-garment desktop layout while
13
+ * try-on is processing. */
14
+ productImages?: string[];
12
15
  productTitle: string;
13
16
  /** Garment material/fabric — feeds the "Garment Spotlight" card on
14
17
  * the engaging try-on processing UI. */
@@ -19,10 +22,6 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
19
22
  sizingUnit: string;
20
23
  setView: (v: ViewState) => void;
21
24
  handleDownload: () => void;
22
- onRetryWithFit: (fitInfo: FitAreaInfo[], selectedSizeOverride?: string) => void;
23
- retryLoading: boolean;
24
- /** Wall-clock ms when the in-flight retry started — drives elapsed counter. */
25
- retryStartedAt?: number | null;
26
25
  selectedFile: File | null;
27
26
  previewUrl: string | null;
28
27
  handleFileSelect: (file: File) => void;
@@ -71,18 +70,5 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
71
70
  fit: string;
72
71
  }>;
73
72
  }) => void;
74
- /** Forwarded down to SectionDetailView — enables post-try-on regen mode. */
75
- onRegenerateTryOn?: (override: {
76
- sectionName: string;
77
- selectedSize: string;
78
- selectedLength?: string;
79
- displayLabel: string;
80
- matchDetails?: Array<{
81
- measurement: string;
82
- userValue: string;
83
- chartRange: string;
84
- fit: string;
85
- }>;
86
- }) => void;
87
73
  t: TranslateFn;
88
74
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { TranslateFn } from "../../i18n";
2
+ export declare function TryOnGenerationBadge({ tryOnStartedAt, t, }: {
3
+ tryOnStartedAt: number | null;
4
+ t: TranslateFn;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,12 @@
1
1
  import type { FitAreaInfo } from "../types";
2
2
  import type { MeasurementLines } from "../pose-detect";
3
3
  export type GranularFit = "good" | "tight" | "loose" | "a-bit-tight" | "a-bit-loose" | "too-tight" | "too-loose";
4
- /** Compute granular fit label for a single measurement */
5
- export declare function computeFit(userValue: number, chartRange: string): GranularFit;
4
+ /** Compute granular fit label for a single measurement.
5
+ * Anything within < 1 unit-inch (1 in / 2.54 cm / 25.4 mm) of the chart
6
+ * range counts as "perfect fit" — a 0.2 in delta on the inseam is below
7
+ * visual perception and should not pop a "render visibly tight" prompt
8
+ * directive on the try-on render. */
9
+ export declare function computeFit(userValue: number, chartRange: string, unit?: "in" | "cm" | "mm"): GranularFit;
6
10
  /**
7
11
  * Build FitAreaInfo[] from matchDetails + optional pose coordinates.
8
12
  * This is what gets sent to the backend so Gemini knows how to render each body region.
@@ -12,7 +16,8 @@ export declare function buildFitInfo(matchDetails: Array<{
12
16
  userValue: string;
13
17
  chartRange: string;
14
18
  fit: string;
15
- }>, poseLines?: MeasurementLines | null): FitAreaInfo[];
19
+ section?: string;
20
+ }>, poseLines?: MeasurementLines | null, unit?: "in" | "cm" | "mm"): FitAreaInfo[];
16
21
  /**
17
22
  * Build silhouette-prompt context forwarded to the backend try-on Gemini
18
23
  * call. Returns the three text-form inputs that the doc example fed to