@primestyleai/tryon 5.6.13 → 5.6.15

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,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.13",
3
+ "version": "5.6.15",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",