@primestyleai/tryon 5.10.48 → 5.10.50

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.
@@ -18964,12 +18964,24 @@ function SectionDetailView({
18964
18964
  "button",
18965
18965
  {
18966
18966
  type: "button",
18967
- onClick: () => onRegenerateTryOn({
18968
- selectedSize: effSize,
18969
- selectedLength: hasLengthPick ? effLength : void 0,
18970
- displayLabel: label,
18971
- matchDetails: buildOverrideMatchDetails()
18972
- }),
18967
+ onClick: (e) => {
18968
+ console.log("[ps-sdk:regen-btn] CLICKED", {
18969
+ effSize,
18970
+ effLength,
18971
+ hasLengthPick,
18972
+ label,
18973
+ bubbles: e.bubbles,
18974
+ defaultPrevented: e.defaultPrevented
18975
+ });
18976
+ const payload = {
18977
+ selectedSize: effSize,
18978
+ selectedLength: hasLengthPick ? effLength : void 0,
18979
+ displayLabel: label,
18980
+ matchDetails: buildOverrideMatchDetails()
18981
+ };
18982
+ console.log("[ps-sdk:regen-btn] calling onRegenerateTryOn with", payload);
18983
+ onRegenerateTryOn(payload);
18984
+ },
18973
18985
  style: {
18974
18986
  width: "100%",
18975
18987
  padding: "0.55vw 0.8vw",
@@ -25628,6 +25640,7 @@ function PrimeStyleTryonInner({
25628
25640
  });
25629
25641
  return;
25630
25642
  }
25643
+ console.log("[ps-sdk:retry] starting", { fitInfoCount: fitInfo.length, selectedSizeOverride, fitInfo });
25631
25644
  setRetryLoading(true);
25632
25645
  const vtoCategory = measurementTypeToVtoCategory(detectMeasurementType(productTitle));
25633
25646
  const isApparel = vtoCategory === "apparel";
@@ -25735,12 +25748,17 @@ function PrimeStyleTryonInner({
25735
25748
  }
25736
25749
  }, [selectedFile, productImage, productTitle]);
25737
25750
  const handleRegenerateTryOn = reactExports.useCallback((override) => {
25751
+ console.log("[ps-sdk:regen] fired", { override, hasFile: !!selectedFile, hasRefFile: !!selectedFileRef.current });
25738
25752
  setPendingCustomSize(override);
25739
25753
  const md2 = override.matchDetails || [];
25740
- if (!md2.length) return;
25754
+ if (!md2.length) {
25755
+ console.warn("[ps-sdk:regen] no matchDetails in override — cannot rebuild fitInfo");
25756
+ return;
25757
+ }
25741
25758
  const fitInfo = buildFitInfo(md2, modelPoseRef.current);
25759
+ console.log("[ps-sdk:regen] fitInfo built", { fitInfo, label: override.displayLabel });
25742
25760
  handleRetryWithFit(fitInfo, override.displayLabel);
25743
- }, [handleRetryWithFit]);
25761
+ }, [handleRetryWithFit, selectedFile]);
25744
25762
  const handleDownload = reactExports.useCallback(() => {
25745
25763
  if (!resultImageUrl) return;
25746
25764
  if (resultImageUrl.startsWith("data:")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "5.10.48",
3
+ "version": "5.10.50",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",