@primestyleai/tryon 5.10.188 → 5.10.189
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/api-client.d.ts +4 -0
- package/dist/{index-BduSFARG.js → index-BlzviBfP.js} +57 -75
- package/dist/index-BlzviBfP.js.map +1 -0
- package/dist/primestyle-tryon.js +2 -2
- package/dist/react/PrimeStyleTryonInner.d.ts +1 -1
- package/dist/react/icons.d.ts +6 -0
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +6613 -6024
- package/dist/react/index.js.map +1 -1
- package/dist/react/styles.d.ts +1 -1
- package/dist/react/types.d.ts +23 -0
- package/dist/react/usePrimeStyleSize.d.ts +2 -0
- package/dist/react/views/BodyProfileView.d.ts +3 -1
- package/dist/react/views/MultiSectionMobile.d.ts +3 -1
- package/dist/react/views/PhotoStepMobile.d.ts +2 -1
- package/dist/react/views/SizeResultView.d.ts +7 -1
- package/dist/storefront/primestyle-tryon.js +1003 -353
- package/package.json +1 -1
- package/dist/index-BduSFARG.js.map +0 -1
package/dist/react/types.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ export interface ProfileCompletionDraft {
|
|
|
111
111
|
braSizeRegion?: string;
|
|
112
112
|
photoBase64?: string;
|
|
113
113
|
photoUrl?: string;
|
|
114
|
+
measurements?: ProfileMeasurements;
|
|
115
|
+
measurementsUnit?: "cm" | "in";
|
|
114
116
|
customMeasurements?: Record<string, number>;
|
|
115
117
|
}
|
|
116
118
|
export interface HistoryEntry {
|
|
@@ -145,6 +147,8 @@ export interface HistoryEntry {
|
|
|
145
147
|
sections?: Record<string, NormalizedSection>;
|
|
146
148
|
sectionImages?: Record<string, string>;
|
|
147
149
|
} | null;
|
|
150
|
+
/** Snapshot of the inputs/estimates needed to complete a fit profile from a restored result. */
|
|
151
|
+
profileCompletionDraft?: ProfileCompletionDraft;
|
|
148
152
|
/** True when the user's model photo for this entry is stored as a Blob in
|
|
149
153
|
* IndexedDB (key = entry.id). Restored as a File on history click so the
|
|
150
154
|
* user does not need to re-upload before clicking Try On. Photos live in
|
|
@@ -165,6 +169,16 @@ export interface HistoryEntry {
|
|
|
165
169
|
isOverride: boolean;
|
|
166
170
|
}>;
|
|
167
171
|
}
|
|
172
|
+
export interface PrimeStyleAddToBagPayload {
|
|
173
|
+
productId?: string;
|
|
174
|
+
productTitle?: string;
|
|
175
|
+
productUrl?: string;
|
|
176
|
+
recommendedSize?: string;
|
|
177
|
+
sizingResult?: SizingResultType | null;
|
|
178
|
+
resultImageUrl?: string | null;
|
|
179
|
+
historyEntryId?: string;
|
|
180
|
+
selectedSizes?: HistoryEntry["selectedSizes"];
|
|
181
|
+
}
|
|
168
182
|
export interface SizeGuide {
|
|
169
183
|
found: boolean;
|
|
170
184
|
title?: string;
|
|
@@ -201,6 +215,9 @@ export interface PrimeStyleTryonProps {
|
|
|
201
215
|
* SDK skips the MediaPipe-based auto-pick. Falls through to auto-pick
|
|
202
216
|
* (or to `productImage`) when omitted. */
|
|
203
217
|
garmentReferenceImage?: string;
|
|
218
|
+
/** Optional clean product/detail image. When omitted, the backend picker
|
|
219
|
+
* selects one from productImages and sends it as Gemini's extra design reference. */
|
|
220
|
+
garmentDetailImage?: string;
|
|
204
221
|
productTitle?: string;
|
|
205
222
|
/** Absolute product page URL, used by restored history results to continue shopping. */
|
|
206
223
|
productUrl?: string;
|
|
@@ -259,6 +276,12 @@ export interface PrimeStyleTryonProps {
|
|
|
259
276
|
message: string;
|
|
260
277
|
code?: string;
|
|
261
278
|
}) => void;
|
|
279
|
+
/** Called when the shopper clicks Add to Bag on the SDK result screen. */
|
|
280
|
+
onAddToBag?: (payload: PrimeStyleAddToBagPayload) => void | Promise<void>;
|
|
281
|
+
/** Optional result-screen CTA label overrides. */
|
|
282
|
+
addToBagLabel?: string;
|
|
283
|
+
continueShoppingLabel?: string;
|
|
284
|
+
backToProductPageLabel?: string;
|
|
262
285
|
/** Size guide data — pass as-is, any format (JSON object, array, HTML). Structured formats are parsed instantly client-side; unrecognised formats fall back to AI. */
|
|
263
286
|
sizeGuideData?: unknown;
|
|
264
287
|
}
|
|
@@ -8,6 +8,8 @@ export interface UsePrimeStyleSizeState {
|
|
|
8
8
|
loading: boolean;
|
|
9
9
|
/** True if the user has no profile yet — host should show its existing "Find Your Size" CTA */
|
|
10
10
|
noProfile: boolean;
|
|
11
|
+
/** True when the recommendation is tied to a signed-in PrimeStyle profile */
|
|
12
|
+
authenticatedProfile: boolean;
|
|
11
13
|
/** The full result if you need confidence/sections/etc. */
|
|
12
14
|
result: RecommendForProductResult | null;
|
|
13
15
|
/** Manually re-run the recommendation (e.g. after the user edits their profile) */
|
|
@@ -9,6 +9,8 @@ interface BodyProfileViewProps {
|
|
|
9
9
|
initialStep?: "photo" | "basics";
|
|
10
10
|
/** Use the default upload screen with only height/weight questions. */
|
|
11
11
|
simplePhotoOnly?: boolean;
|
|
12
|
+
/** Compact desktop treatment for accessory flows that only need height/weight. */
|
|
13
|
+
simpleAccessoryLayout?: boolean;
|
|
12
14
|
simpleQuestionMode?: "heightWeight" | "shoeReference";
|
|
13
15
|
formRef: React.MutableRefObject<Record<string, string>>;
|
|
14
16
|
sizingCountry: string;
|
|
@@ -76,5 +78,5 @@ interface BodyProfileViewProps {
|
|
|
76
78
|
onBack: () => void;
|
|
77
79
|
t: TranslateFn;
|
|
78
80
|
}
|
|
79
|
-
export declare function BodyProfileView({ productImage, productTitle, isWomen, basicOnly, initialStep, simplePhotoOnly, simpleQuestionMode, formRef, sizingCountry, heightUnit, setHeightUnit, weightUnit, setWeightUnit, sizingUnit, setSizingUnit, apiUrl, apiKey, onComplete, onSnapSubmit, hasActiveProfileWithMeasurements, onUseActiveProfile, activeProfileName, onStartFresh, activeProfile, onBack, t, }: BodyProfileViewProps): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare function BodyProfileView({ productImage, productTitle, isWomen, basicOnly, initialStep, simplePhotoOnly, simpleAccessoryLayout, simpleQuestionMode, formRef, sizingCountry, heightUnit, setHeightUnit, weightUnit, setWeightUnit, sizingUnit, setSizingUnit, apiUrl, apiKey, onComplete, onSnapSubmit, hasActiveProfileWithMeasurements, onUseActiveProfile, activeProfileName, onStartFresh, activeProfile, onBack, t, }: BodyProfileViewProps): import("react/jsx-runtime").JSX.Element;
|
|
80
82
|
export {};
|
|
@@ -36,6 +36,8 @@ export interface MultiSectionMobileProps {
|
|
|
36
36
|
onTryAgain?: () => void;
|
|
37
37
|
/** Close the SDK / continue shopping. */
|
|
38
38
|
onClose?: () => void;
|
|
39
|
+
/** Optional bottom CTA group for history/current product commerce actions. */
|
|
40
|
+
resultActionNode?: ReactNode;
|
|
39
41
|
/** Optional measurement-line overlay to render on top of the result image
|
|
40
42
|
* (mediapipe toggle). Only displayed when `showLines` is true. */
|
|
41
43
|
overlayNode?: ReactNode;
|
|
@@ -56,4 +58,4 @@ export interface MultiSectionMobileProps {
|
|
|
56
58
|
profileCompletionCta?: ReactNode;
|
|
57
59
|
t: TranslateFn;
|
|
58
60
|
}
|
|
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;
|
|
61
|
+
export declare function MultiSectionMobile({ productImage, productTitle, sizingResult, sizeGuide, sectionEntries, pendingCustomSizes, onSelectSection, onTryOn, tryOnProcessing, tryOnStartedAt, resultImageUrl, tryOnDone, onTryAgain, onClose, resultActionNode, overlayNode, showLines, onToggleLines, onOpenImage, onDownload, imageActionBar, feedbackSlot, onImageLoad, profileCompletionCta, t, }: MultiSectionMobileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,9 +17,10 @@ interface PhotoStepMobileProps {
|
|
|
17
17
|
photoStatus?: string;
|
|
18
18
|
photoRejection?: string | null;
|
|
19
19
|
onClearRejection?: () => void;
|
|
20
|
+
photoHelpSlot?: React.ReactNode;
|
|
20
21
|
bodyContextSlot?: React.ReactNode;
|
|
21
22
|
hideTabs?: boolean;
|
|
22
23
|
t: TranslateFn;
|
|
23
24
|
}
|
|
24
|
-
export declare function PhotoStepMobile({ photoPreview, handlePhotoSelect, handleRemovePhoto, onAnalyze, onSwitchToManual, error, photoVariant, photoStepHeight, onPhotoStepHeightChange, ageConfirmed, onAgeConfirmedChange, primaryLabel, compactAgeGate, photoProcessing, photoStatus, photoRejection, onClearRejection, bodyContextSlot, hideTabs, t, }: PhotoStepMobileProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function PhotoStepMobile({ photoPreview, handlePhotoSelect, handleRemovePhoto, onAnalyze, onSwitchToManual, error, photoVariant, photoStepHeight, onPhotoStepHeightChange, ageConfirmed, onAgeConfirmedChange, primaryLabel, compactAgeGate, photoProcessing, photoStatus, photoRejection, onClearRejection, photoHelpSlot, bodyContextSlot, hideTabs, t, }: PhotoStepMobileProps): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -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, 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, }: {
|
|
5
|
+
export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productImages, productCarouselItems, productTitle, productUrl, productMaterial, productDescription, sizingUnit, setView, handleDownload, onContinueShopping, isHistoryResult, onBackToProductPage, onAddToBag, addToBagLabel, continueShoppingLabel, backToProductPageLabel, 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;
|
|
@@ -27,6 +27,12 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
|
|
|
27
27
|
setView: (v: ViewState) => void;
|
|
28
28
|
handleDownload: () => void;
|
|
29
29
|
onContinueShopping?: () => void;
|
|
30
|
+
isHistoryResult?: boolean;
|
|
31
|
+
onBackToProductPage?: () => void;
|
|
32
|
+
onAddToBag?: () => void | Promise<void>;
|
|
33
|
+
addToBagLabel?: string;
|
|
34
|
+
continueShoppingLabel?: string;
|
|
35
|
+
backToProductPageLabel?: string;
|
|
30
36
|
onTryOnFeedbackSubmit?: (input: {
|
|
31
37
|
rating?: number;
|
|
32
38
|
note?: string;
|