@primestyleai/tryon 5.8.37 → 5.8.38

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.
@@ -39,7 +39,22 @@ interface CreateProfileWizardProps {
39
39
  /** Called when a photo is selected (passes base64) or removed (passes null).
40
40
  * Host can use this to mirror the photo in the product-image left panel. */
41
41
  onPhotoPreview?: (base64: string | null) => void;
42
+ /** Called during image path to estimate body measurements from photo + height/weight.
43
+ * Returns estimates that get saved to the profile. Wizard shows a calculating
44
+ * animation while this runs. */
45
+ onEstimate?: (data: {
46
+ photoBase64: string;
47
+ height: number;
48
+ weight: number;
49
+ heightUnit: "cm" | "in";
50
+ weightUnit: "kg" | "lbs";
51
+ gender: "male" | "female";
52
+ age?: number;
53
+ }) => Promise<{
54
+ estimates: Record<string, number>;
55
+ unit: string;
56
+ } | null>;
42
57
  t: TranslateFn;
43
58
  }
44
- export declare function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, t }: CreateProfileWizardProps): import("react/jsx-runtime").JSX.Element;
59
+ export declare function CreateProfileWizard({ onSave, onCancel, onPhotoPreview, onEstimate, t }: CreateProfileWizardProps): import("react/jsx-runtime").JSX.Element;
45
60
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { TranslateFn } from "../../i18n";
2
- import type { ViewState } from "../types";
2
+ import type { ViewState, SizeGuide } from "../types";
3
3
  export declare function FaceSizeView(props: {
4
4
  productImage: string;
5
5
  productTitle: string;
@@ -21,5 +21,6 @@ export declare function FaceSizeView(props: {
21
21
  age?: number;
22
22
  }) => void;
23
23
  onBack: () => void;
24
+ sizeGuide?: SizeGuide | null;
24
25
  t: TranslateFn;
25
26
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { TranslateFn } from "../../i18n";
2
- import type { ViewState } from "../types";
2
+ import type { ViewState, SizeGuide } from "../types";
3
3
  export declare function FootSizeView(props: {
4
4
  productImage: string;
5
5
  productTitle: string;
@@ -21,5 +21,6 @@ export declare function FootSizeView(props: {
21
21
  age?: number;
22
22
  }) => void;
23
23
  onBack: () => void;
24
+ sizeGuide?: SizeGuide | null;
24
25
  t: TranslateFn;
25
26
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { TranslateFn } from "../../i18n";
2
- import type { ViewState } from "../types";
2
+ import type { ViewState, SizeGuide } from "../types";
3
3
  export declare function HeadSizeView(props: {
4
4
  productImage: string;
5
5
  productTitle: string;
@@ -21,5 +21,6 @@ export declare function HeadSizeView(props: {
21
21
  age?: number;
22
22
  }) => void;
23
23
  onBack: () => void;
24
+ sizeGuide?: SizeGuide | null;
24
25
  t: TranslateFn;
25
26
  }): import("react/jsx-runtime").JSX.Element;
@@ -14,6 +14,22 @@ interface MySizingProfilesViewProps {
14
14
  onClose: () => void;
15
15
  /** Forwarded to CreateProfileWizard — called when a photo is selected or removed */
16
16
  onPhotoPreview?: (base64: string | null) => void;
17
+ /** Forwarded to CreateProfileWizard — called during image path to estimate measurements */
18
+ onEstimateFromPhoto?: (data: {
19
+ photoBase64: string;
20
+ height: number;
21
+ weight: number;
22
+ heightUnit: "cm" | "in";
23
+ weightUnit: "kg" | "lbs";
24
+ gender: "male" | "female";
25
+ age?: number;
26
+ }) => Promise<{
27
+ estimates: Record<string, number>;
28
+ unit: string;
29
+ } | null>;
30
+ /** Set of profile IDs currently running background estimation — drives the
31
+ * "calculating..." spinner in the profile detail view. */
32
+ estimatingProfileIds?: Set<string>;
17
33
  t: TranslateFn;
18
34
  /** Called by PrimeStyleTryonInner's back button handler to check if there's
19
35
  an internal sub-step to go back to before closing the profiles view. */
@@ -25,5 +41,5 @@ export declare function DeleteConfirmModal({ onConfirm, onCancel, t, }: {
25
41
  onCancel: () => void;
26
42
  t: TranslateFn;
27
43
  }): import("react/jsx-runtime").JSX.Element;
28
- export declare function MySizingProfilesView({ profiles, activeProfileId, onSelectProfile, onEditProfile, onSaveNewProfile, onSaveProfileMeasurements, onSaveBraSize, onRequestDelete, onClose, onPhotoPreview, t, onRegisterBackInterceptor, }: MySizingProfilesViewProps): import("react/jsx-runtime").JSX.Element;
44
+ export declare function MySizingProfilesView({ profiles, activeProfileId, onSelectProfile, onEditProfile, onSaveNewProfile, onSaveProfileMeasurements, onSaveBraSize, onRequestDelete, onClose, onPhotoPreview, onEstimateFromPhoto, estimatingProfileIds, t, onRegisterBackInterceptor, }: MySizingProfilesViewProps): import("react/jsx-runtime").JSX.Element;
29
45
  export {};
@@ -9,7 +9,10 @@ interface ProfileMeasurementsViewProps {
9
9
  onBack: () => void;
10
10
  onSave: () => void;
11
11
  onSaveBraSize?: (bandSize: string, cupSize: string) => void;
12
+ /** True while background estimation is computing measurements —
13
+ * renders a spinner for empty fields instead of the "—" placeholder. */
14
+ isEstimating?: boolean;
12
15
  t: TranslateFn;
13
16
  }
14
- export declare function ProfileMeasurementsView({ profile, isActive, onSelect, onSaveMeasurements, onDelete, onBack, onSave, onSaveBraSize, t, }: ProfileMeasurementsViewProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ProfileMeasurementsView({ profile, isActive, onSelect, onSaveMeasurements, onDelete, onBack, onSave, onSaveBraSize, isEstimating, t, }: ProfileMeasurementsViewProps): import("react/jsx-runtime").JSX.Element;
15
18
  export {};