@primestyleai/tryon 4.7.9 → 4.8.0

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.
@@ -5502,7 +5502,7 @@ function BodyProfileView({
5502
5502
  setPhotoProcessing(false);
5503
5503
  }
5504
5504
  }, [t]);
5505
- useCallback(() => {
5505
+ const handleRemovePhoto = useCallback(() => {
5506
5506
  if (photoPreview) URL.revokeObjectURL(photoPreview);
5507
5507
  setPhotoFile(null);
5508
5508
  setPhotoPreview(null);
@@ -5655,7 +5655,84 @@ function BodyProfileView({
5655
5655
  const isLastStep = step === steps[steps.length - 1];
5656
5656
  if (step === "photo") {
5657
5657
  return /* @__PURE__ */ jsxs("div", { className: "ps-bp-wrapper", children: [
5658
- /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%", minHeight: "20vw" }, children: /* @__PURE__ */ jsx("span", { style: { fontSize: "1.2vw", fontWeight: 600, color: "var(--ps-text-primary)" }, children: "hello" }) }),
5658
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "1.2vw", padding: "1.5vw", width: "100%", height: "100%", minHeight: "20vw", alignItems: "stretch" }, children: [
5659
+ /* @__PURE__ */ jsx(
5660
+ "div",
5661
+ {
5662
+ onClick: () => !photoPreview && fileInputRef.current?.click(),
5663
+ style: {
5664
+ flex: 1,
5665
+ display: "flex",
5666
+ flexDirection: "column",
5667
+ alignItems: "center",
5668
+ justifyContent: "center",
5669
+ border: photoPreview ? "2px solid var(--ps-accent)" : "2px dashed var(--ps-border-color)",
5670
+ borderRadius: "0.5vw",
5671
+ cursor: photoPreview ? "default" : "pointer",
5672
+ position: "relative",
5673
+ background: "var(--ps-bg-secondary)",
5674
+ transition: "border-color 0.2s",
5675
+ overflow: "hidden"
5676
+ },
5677
+ children: photoPreview ? /* @__PURE__ */ jsxs(Fragment, { children: [
5678
+ /* @__PURE__ */ jsx("img", { src: photoPreview, alt: "preview", style: { width: "100%", height: "100%", objectFit: "contain" } }),
5679
+ /* @__PURE__ */ jsx("button", { onClick: (e) => {
5680
+ e.stopPropagation();
5681
+ handleRemovePhoto();
5682
+ }, style: { position: "absolute", top: "0.5vw", right: "0.5vw", width: "1.4vw", height: "1.4vw", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "none", color: "#fff", fontSize: "0.7vw", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" }, children: "×" })
5683
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5684
+ /* @__PURE__ */ jsx(UploadIcon, { size: 32 }),
5685
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.85vw", fontWeight: 600, color: "var(--ps-text-primary)", marginTop: "0.5vw" }, children: t("Upload your photo") }),
5686
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.6vw", color: "var(--ps-text-muted)", marginTop: "0.2vw" }, children: t("Click or drag a full-body photo") }),
5687
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.5vw", color: "var(--ps-text-dim)", marginTop: "0.4vw" }, children: "JPEG, PNG (max 10MB)" })
5688
+ ] })
5689
+ }
5690
+ ),
5691
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "0.6vw", justifyContent: "center" }, children: [
5692
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "0.85vw", fontWeight: 700, color: "var(--ps-text-primary)", marginBottom: "0.3vw" }, children: t("How to take the best photo") }),
5693
+ /* @__PURE__ */ jsxs("div", { style: { background: "#ddfbe7", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
5694
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.3vw" }, children: [
5695
+ /* @__PURE__ */ jsx("span", { style: { color: "#1c9d4c", fontSize: "0.75vw", fontWeight: 700 }, children: "✓" }),
5696
+ /* @__PURE__ */ jsx("span", { style: { color: "#1c9d4c", fontSize: "0.65vw", fontWeight: 600 }, children: t("Do") })
5697
+ ] }),
5698
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.8 }, children: [
5699
+ t("Stand facing the camera with your full body in frame"),
5700
+ /* @__PURE__ */ jsx("br", {}),
5701
+ t("Use natural or even lighting (e.g. near a window)"),
5702
+ /* @__PURE__ */ jsx("br", {}),
5703
+ t("Wear fitted, simple clothing (e.g. neutral colors)"),
5704
+ /* @__PURE__ */ jsx("br", {}),
5705
+ t("Choose a plain background (a light wall is ideal)"),
5706
+ /* @__PURE__ */ jsx("br", {}),
5707
+ t("Stand straight and still, arms relaxed by your sides")
5708
+ ] })
5709
+ ] }),
5710
+ /* @__PURE__ */ jsxs("div", { style: { background: "#ffe2e2", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
5711
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.3vw" }, children: [
5712
+ /* @__PURE__ */ jsx("span", { style: { color: "#e7000b", fontSize: "0.75vw", fontWeight: 700 }, children: "✗" }),
5713
+ /* @__PURE__ */ jsx("span", { style: { color: "#e7000b", fontSize: "0.65vw", fontWeight: 600 }, children: t("Don't") })
5714
+ ] }),
5715
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.8 }, children: [
5716
+ t("Don't wear loose, baggy, or layered clothing"),
5717
+ /* @__PURE__ */ jsx("br", {}),
5718
+ t("Don't sit, pose, or bend your body"),
5719
+ /* @__PURE__ */ jsx("br", {}),
5720
+ t("Don't use strong backlighting"),
5721
+ /* @__PURE__ */ jsx("br", {}),
5722
+ t("Don't take mirror photos or selfies"),
5723
+ /* @__PURE__ */ jsx("br", {}),
5724
+ t("Don't apply filters, effects, or edits")
5725
+ ] })
5726
+ ] }),
5727
+ /* @__PURE__ */ jsxs("div", { style: { background: "#c6e1f7", borderRadius: "0.5vw", padding: "0.6vw 0.8vw" }, children: [
5728
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.3vw", marginBottom: "0.2vw" }, children: [
5729
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.7vw" }, children: "💡" }),
5730
+ /* @__PURE__ */ jsx("span", { style: { color: "#3267c3", fontSize: "0.65vw", fontWeight: 600 }, children: t("Quick Tip") })
5731
+ ] }),
5732
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "0.58vw", color: "var(--ps-text-primary)", lineHeight: 1.6 }, children: t("The simpler your photo is, the more accurate your virtual try-on results will be.") })
5733
+ ] })
5734
+ ] })
5735
+ ] }),
5659
5736
  /* @__PURE__ */ jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handlePhotoSelect, style: { display: "none" } })
5660
5737
  ] });
5661
5738
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "4.7.9",
3
+ "version": "4.8.0",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",