@primestyleai/tryon 5.10.91 → 5.10.98
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/react/index.js +4437 -4428
- package/dist/react/index.js.map +1 -1
- package/dist/react/styles.d.ts +1 -1
- package/dist/react/views/EngagingTryOnView.d.ts +28 -0
- package/dist/react/views/MobileScanningView.d.ts +10 -3
- package/dist/react/views/NoChartView.d.ts +4 -2
- package/dist/react/views/SizeResultView.d.ts +7 -1
- package/dist/storefront/primestyle-tryon.js +252 -244
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TranslateFn } from "../../i18n";
|
|
2
|
+
/**
|
|
3
|
+
* Engaging try-on processing UI — replaces the cycling REFINING DETAILS /
|
|
4
|
+
* Fine-tuning fit stages with a richer panel: title, big progress ring,
|
|
5
|
+
* separator, and three rotating "WHILE YOU WAIT" cards (Style Tip /
|
|
6
|
+
* Garment Spotlight / AI Fact).
|
|
7
|
+
*
|
|
8
|
+
* Distracts the user from the ~22s Gemini render with branded micro-content
|
|
9
|
+
* tied to their actual purchase context. Reuses the .ps-tryon-processing-v2-*
|
|
10
|
+
* classes already defined in styles.ts (responsive — desktop side-by-side,
|
|
11
|
+
* mobile stacked).
|
|
12
|
+
*
|
|
13
|
+
* Self-contained progress driver — does NOT use the parent's external
|
|
14
|
+
* progressRef ticker. Counts up from mount, plateaus at 95% so the bar
|
|
15
|
+
* doesn't lie about completion.
|
|
16
|
+
*/
|
|
17
|
+
export declare function EngagingTryOnView({ previewUrl, productMaterial, productDescription, onCancel, variant, t, }: {
|
|
18
|
+
previewUrl?: string | null;
|
|
19
|
+
productMaterial?: string;
|
|
20
|
+
productDescription?: string;
|
|
21
|
+
onCancel?: () => void;
|
|
22
|
+
/** "split" (default) renders the 65/35 layout — desktop shows photo +
|
|
23
|
+
* panel side-by-side, mobile stacks them via the responsive override.
|
|
24
|
+
* "panel-only" omits the photo column for callers that already render
|
|
25
|
+
* their own image (e.g. desktop single-section flow). */
|
|
26
|
+
variant?: "split" | "panel-only";
|
|
27
|
+
t: TranslateFn;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,11 +9,18 @@ interface MobileScanningViewProps {
|
|
|
9
9
|
productImage?: string;
|
|
10
10
|
bodyLandmarks: BodyLandmarks | null | undefined;
|
|
11
11
|
sizingDone: boolean;
|
|
12
|
-
/** True while VTO is running — swaps to try-on
|
|
13
|
-
*
|
|
12
|
+
/** True while VTO is running — swaps to the engaging try-on UI
|
|
13
|
+
* (progress ring + WHILE YOU WAIT cards) instead of the cycling
|
|
14
|
+
* sizing stages. */
|
|
14
15
|
tryOnProcessing?: boolean;
|
|
16
|
+
/** Garment material — drives the "Garment Spotlight" card during try-on. */
|
|
17
|
+
productMaterial?: string;
|
|
18
|
+
/** Garment description — fallback for "Garment Spotlight" when material is empty. */
|
|
19
|
+
productDescription?: string;
|
|
20
|
+
/** Optional cancel handler shown as a text link under the cards. */
|
|
21
|
+
onCancelTryOn?: () => void;
|
|
15
22
|
onSwitchToManual: () => void;
|
|
16
23
|
t: TranslateFn;
|
|
17
24
|
}
|
|
18
|
-
export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, tryOnProcessing, onSwitchToManual, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function MobileScanningView({ previewUrl, productImage, bodyLandmarks, sizingDone, tryOnProcessing, productMaterial, productDescription, onCancelTryOn, onSwitchToManual, t, }: MobileScanningViewProps): import("react/jsx-runtime").JSX.Element;
|
|
19
26
|
export {};
|
|
@@ -5,8 +5,10 @@ import type { TranslateFn } from "../../i18n";
|
|
|
5
5
|
* still gets a polite path forward — skip sizing entirely and try the
|
|
6
6
|
* product on visually.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Reuses the same .ps-tryon-sr-split / .ps-tryon-sr-img-col /
|
|
9
|
+
* .ps-tryon-sr-right-col structure as SizeResultView, so the modal stays
|
|
10
|
+
* at its normal width/height — only the right-column content swaps to
|
|
11
|
+
* the no-chart message + CTAs.
|
|
10
12
|
*/
|
|
11
13
|
export declare function NoChartView({ productImage, productTitle, onTryOn, onClose, t, }: {
|
|
12
14
|
productImage?: string;
|
|
@@ -2,7 +2,7 @@ import type { TranslateFn } from "../../i18n";
|
|
|
2
2
|
import type { FitAreaInfo } from "../../types";
|
|
3
3
|
import type { ViewState, SizeGuide, SizingResult } from "../types";
|
|
4
4
|
import type { BodyLandmarks } from "../../pose-detect";
|
|
5
|
-
export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productTitle, 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, }: {
|
|
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, }: {
|
|
6
6
|
estimationDone?: boolean;
|
|
7
7
|
sizingLoading: boolean;
|
|
8
8
|
sizingResult: SizingResult | null;
|
|
@@ -10,6 +10,12 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
|
|
|
10
10
|
resultImageUrl: string | null;
|
|
11
11
|
productImage: string;
|
|
12
12
|
productTitle: string;
|
|
13
|
+
/** Garment material/fabric — feeds the "Garment Spotlight" card on
|
|
14
|
+
* the engaging try-on processing UI. */
|
|
15
|
+
productMaterial?: string;
|
|
16
|
+
/** Garment description — fallback for "Garment Spotlight" when material
|
|
17
|
+
* is empty. */
|
|
18
|
+
productDescription?: string;
|
|
13
19
|
sizingUnit: string;
|
|
14
20
|
setView: (v: ViewState) => void;
|
|
15
21
|
handleDownload: () => void;
|