@primestyleai/tryon 5.10.117 → 5.10.118
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TranslateFn } from "../../i18n";
|
|
2
2
|
import type { ViewState, SizeGuide, SizingResult } from "../types";
|
|
3
3
|
import type { BodyLandmarks } from "../../pose-detect";
|
|
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, }: {
|
|
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, tryOnAvailable, t, }: {
|
|
5
5
|
estimationDone?: boolean;
|
|
6
6
|
sizingLoading: boolean;
|
|
7
7
|
sizingResult: SizingResult | null;
|
|
@@ -70,5 +70,9 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
|
|
|
70
70
|
fit: string;
|
|
71
71
|
}>;
|
|
72
72
|
}) => void;
|
|
73
|
+
/** When false, the size-result view drops every Try-On affordance and
|
|
74
|
+
* shows "Continue Shopping" instead. Set to false when sizing came in
|
|
75
|
+
* via the manual measurements path (no photo collected upstream). */
|
|
76
|
+
tryOnAvailable?: boolean;
|
|
73
77
|
t: TranslateFn;
|
|
74
78
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20730,6 +20730,7 @@ function SizeResultView({
|
|
|
20730
20730
|
userHeightCm,
|
|
20731
20731
|
pendingCustomSizes: pendingCustomSizesProp,
|
|
20732
20732
|
onPendingCustomSizeChange,
|
|
20733
|
+
tryOnAvailable = true,
|
|
20733
20734
|
t: t2
|
|
20734
20735
|
}) {
|
|
20735
20736
|
const resultUnitRaw = (sizingResult?.unit || sizingUnit || "").toString().toLowerCase();
|
|
@@ -21023,7 +21024,7 @@ function SizeResultView({
|
|
|
21023
21024
|
const isMobile = useIsMobile();
|
|
21024
21025
|
const isAccessory = measurementType === "face" || measurementType === "head";
|
|
21025
21026
|
sizingResult?.found === false;
|
|
21026
|
-
const vtoExcluded = measurementType === "foot";
|
|
21027
|
+
const vtoExcluded = measurementType === "foot" || !tryOnAvailable;
|
|
21027
21028
|
const mismatchNotice = sizingResult?.mismatchDetected ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: {
|
|
21028
21029
|
margin: isMobile ? "8px 0 0" : "0.4vw 0 0",
|
|
21029
21030
|
padding: isMobile ? "10px 12px" : "0.6vw 0.85vw",
|
|
@@ -27749,6 +27750,7 @@ function PrimeStyleTryonInner({
|
|
|
27749
27750
|
const [sizingMethod, setSizingMethod] = reactExports.useState(null);
|
|
27750
27751
|
const [sizingResult, setSizingResult] = reactExports.useState(null);
|
|
27751
27752
|
const [sizingLoading, setSizingLoading] = reactExports.useState(false);
|
|
27753
|
+
const [usedAiPhotoSizing, setUsedAiPhotoSizing] = reactExports.useState(false);
|
|
27752
27754
|
reactExports.useEffect(() => {
|
|
27753
27755
|
if (!sizingResult?.recommendedSize) return;
|
|
27754
27756
|
console.log("[ps-sdk:reset] new sizingResult — clearing all section overrides", {
|
|
@@ -28153,6 +28155,7 @@ function PrimeStyleTryonInner({
|
|
|
28153
28155
|
setSizingLoading(false);
|
|
28154
28156
|
setEstimatedValues(null);
|
|
28155
28157
|
setEstimationLoading(false);
|
|
28158
|
+
setUsedAiPhotoSizing(false);
|
|
28156
28159
|
setProfileSaved(false);
|
|
28157
28160
|
formRef.current = {};
|
|
28158
28161
|
setFormGender("male");
|
|
@@ -29357,6 +29360,7 @@ function PrimeStyleTryonInner({
|
|
|
29357
29360
|
formRef.current.gender = data.gender;
|
|
29358
29361
|
if (data.bandSize) formRef.current.bandSize = data.bandSize;
|
|
29359
29362
|
if (data.cupSize) formRef.current.cupSize = data.cupSize;
|
|
29363
|
+
setUsedAiPhotoSizing(!!data.bodyImage);
|
|
29360
29364
|
handleQuickEstimate(
|
|
29361
29365
|
data.height,
|
|
29362
29366
|
data.weight,
|
|
@@ -29371,7 +29375,10 @@ function PrimeStyleTryonInner({
|
|
|
29371
29375
|
data.bodyImage
|
|
29372
29376
|
);
|
|
29373
29377
|
},
|
|
29374
|
-
onSnapSubmit:
|
|
29378
|
+
onSnapSubmit: (data) => {
|
|
29379
|
+
setUsedAiPhotoSizing(true);
|
|
29380
|
+
handleSnapSubmit(data);
|
|
29381
|
+
},
|
|
29375
29382
|
onBack: handleClose,
|
|
29376
29383
|
t: t2
|
|
29377
29384
|
},
|
|
@@ -29425,6 +29432,7 @@ function PrimeStyleTryonInner({
|
|
|
29425
29432
|
handleTryOnSubmit,
|
|
29426
29433
|
tryOnProcessing,
|
|
29427
29434
|
tryOnStartedAt,
|
|
29435
|
+
tryOnAvailable: usedAiPhotoSizing,
|
|
29428
29436
|
bodyLandmarks,
|
|
29429
29437
|
faceLandmarks,
|
|
29430
29438
|
measurementType: detectMeasurementType(productTitle),
|