@primestyleai/tryon 5.6.14 → 5.6.16

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.
@@ -25,8 +25,13 @@ interface BasicsStepMobileProps {
25
25
  /** Optional override label for the Next button (e.g. "Find My Best Fit"
26
26
  * when an active profile is selected and we're skipping the wizard) */
27
27
  fastPathLabel?: string;
28
+ /** Display name of the loaded profile — when set, shows a "Profile X loaded"
29
+ * banner with a "Start fresh AI sizing" link. */
30
+ activeProfileName?: string | null;
31
+ /** Deselect the active profile so the user can run a fresh AI sizing flow. */
32
+ onStartFresh?: () => void;
28
33
  error: string;
29
34
  t: TranslateFn;
30
35
  }
31
- export declare function BasicsStepMobile({ hUnit, wUnit, isImperialMode, height, setHeight, heightFeet, setHeightFeet, heightInches, setHeightInches, weight, setWeight, age, setAge, switchToMetric, switchToImperial, onUploadPhoto, onSwitchToScan, onNext, canProceed, fastPathLabel, error, t, }: BasicsStepMobileProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function BasicsStepMobile({ hUnit, wUnit, isImperialMode, height, setHeight, heightFeet, setHeightFeet, heightInches, setHeightInches, weight, setWeight, age, setAge, switchToMetric, switchToImperial, onUploadPhoto, onSwitchToScan, onNext, canProceed, fastPathLabel, activeProfileName, onStartFresh, error, t, }: BasicsStepMobileProps): import("react/jsx-runtime").JSX.Element;
32
37
  export {};
@@ -42,8 +42,14 @@ interface BodyProfileViewProps {
42
42
  /** Fast-path callback: skip the rest of the wizard and run /sizing/recommend
43
43
  * with the active profile's stored measurements directly. */
44
44
  onUseActiveProfile?: () => void;
45
+ /** Display name of the currently active profile (for the "Profile X loaded"
46
+ * banner shown on the basics step). */
47
+ activeProfileName?: string | null;
48
+ /** Deselect the active profile so the user can run a fresh AI sizing flow
49
+ * with full body-shape questions. */
50
+ onStartFresh?: () => void;
45
51
  onBack: () => void;
46
52
  t: TranslateFn;
47
53
  }
48
- export declare function BodyProfileView({ productImage, productTitle, isWomen, formRef, sizingCountry, heightUnit, setHeightUnit, weightUnit, setWeightUnit, sizingUnit, setSizingUnit, onComplete, onSnapSubmit, hasActiveProfileWithMeasurements, onUseActiveProfile, onBack, t, }: BodyProfileViewProps): import("react/jsx-runtime").JSX.Element;
54
+ export declare function BodyProfileView({ productImage, productTitle, isWomen, formRef, sizingCountry, heightUnit, setHeightUnit, weightUnit, setWeightUnit, sizingUnit, setSizingUnit, onComplete, onSnapSubmit, hasActiveProfileWithMeasurements, onUseActiveProfile, activeProfileName, onStartFresh, onBack, t, }: BodyProfileViewProps): import("react/jsx-runtime").JSX.Element;
49
55
  export {};
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from "react";
1
2
  import type { TranslateFn } from "../../i18n";
2
3
  import type { SizingResult, SizeGuide } from "../types";
3
4
  export interface MultiSectionMobileProps {
@@ -14,6 +15,24 @@ export interface MultiSectionMobileProps {
14
15
  onSelectSection: (name: string) => void;
15
16
  onTryOn: () => void;
16
17
  tryOnProcessing?: boolean;
18
+ /** When set, the image area shows the try-on result instead of productImage. */
19
+ resultImageUrl?: string | null;
20
+ /** Try-on has finished and result is ready. Switches the bottom CTA into
21
+ * "Try Again" + "Continue Shopping" mode. */
22
+ tryOnDone?: boolean;
23
+ /** Reset try-on state and reopen the photo guide for another attempt. */
24
+ onTryAgain?: () => void;
25
+ /** Close the SDK / continue shopping. */
26
+ onClose?: () => void;
27
+ /** Optional measurement-line overlay to render on top of the result image
28
+ * (mediapipe toggle). Only displayed when `showLines` is true. */
29
+ overlayNode?: ReactNode;
30
+ /** Whether the mediapipe lines toggle is currently on. */
31
+ showLines?: boolean;
32
+ /** Toggle the mediapipe lines overlay. */
33
+ onToggleLines?: () => void;
34
+ /** Bubble image natural dimensions up to the parent (for the overlay sizing). */
35
+ onImageLoad?: (e: React.SyntheticEvent<HTMLImageElement>) => void;
17
36
  t: TranslateFn;
18
37
  }
19
- export declare function MultiSectionMobile({ productImage, productTitle, sizingResult, sizeGuide, sectionEntries, onSelectSection, onTryOn, tryOnProcessing, t, }: MultiSectionMobileProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function MultiSectionMobile({ productImage, productTitle, sizingResult, sizeGuide, sectionEntries, onSelectSection, onTryOn, tryOnProcessing, resultImageUrl, tryOnDone, onTryAgain, onClose, overlayNode, showLines, onToggleLines, onImageLoad, t, }: MultiSectionMobileProps): import("react/jsx-runtime").JSX.Element;
@@ -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, selectedFile, previewUrl, handleFileSelect, handleRemovePreview, handleTryOnSubmit, tryOnProcessing, bodyLandmarks, estimationDone, activeSection, setActiveSection, t, }: {
5
+ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide, resultImageUrl, productImage, productTitle, sizingUnit, setView, handleDownload, onRetryWithFit, retryLoading, selectedFile, previewUrl, handleFileSelect, handleRemovePreview, handleTryOnSubmit, tryOnProcessing, bodyLandmarks, estimationDone, activeSection, setActiveSection, onResetTryOn, onClose, t, }: {
6
6
  estimationDone?: boolean;
7
7
  sizingLoading: boolean;
8
8
  sizingResult: SizingResult | null;
@@ -24,5 +24,9 @@ export declare function SizeResultView({ sizingLoading, sizingResult, sizeGuide,
24
24
  bodyLandmarks?: BodyLandmarks | null;
25
25
  activeSection: string | null;
26
26
  setActiveSection: (s: string | null) => void;
27
+ /** Clear try-on result + uploaded photo so the user can retry from the photo guide. */
28
+ onResetTryOn?: () => void;
29
+ /** Close the SDK modal entirely (Continue Shopping action). */
30
+ onClose?: () => void;
27
31
  t: TranslateFn;
28
32
  }): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.6.14",
3
+ "version": "5.6.16",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",