@primestyleai/tryon 4.7.6 → 4.7.7

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
- const handleRemovePhoto = useCallback(() => {
5505
+ useCallback(() => {
5506
5506
  if (photoPreview) URL.revokeObjectURL(photoPreview);
5507
5507
  setPhotoFile(null);
5508
5508
  setPhotoPreview(null);
@@ -5654,75 +5654,7 @@ function BodyProfileView({
5654
5654
  const canProceed = step === "basics" ? true : step === "chest" ? !!chestProfile : step === "midsection" ? !!midsectionProfile : step === "seat" ? !!seatProfile : step === "hips" ? !!hipProfile : step === "bra" ? !!(bandSize && cupSize) : step === "photo" ? true : false;
5655
5655
  const isLastStep = step === steps[steps.length - 1];
5656
5656
  return /* @__PURE__ */ jsx("div", { className: "ps-bp-wrapper", children: /* @__PURE__ */ jsxs("div", { className: "ps-bp-layout", children: [
5657
- step === "photo" ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-v2-bg", style: { background: "var(--ps-bg-secondary)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", width: "92%", gap: "0.8vw", alignItems: "stretch" }, children: [
5658
- /* @__PURE__ */ jsx(
5659
- "div",
5660
- {
5661
- className: `ps-tryon-guide-drop-v2${photoPreview ? " ps-has" : ""}`,
5662
- onClick: () => !photoPreview && fileInputRef.current?.click(),
5663
- style: { flex: "1", minHeight: "18vw" },
5664
- children: photoPreview ? /* @__PURE__ */ jsxs(Fragment, { children: [
5665
- /* @__PURE__ */ jsx("img", { src: photoPreview, alt: "preview", className: "ps-tryon-guide-drop-v2-img" }),
5666
- /* @__PURE__ */ jsx("button", { className: "ps-tryon-guide-drop-v2-remove", onClick: (e) => {
5667
- e.stopPropagation();
5668
- handleRemovePhoto();
5669
- }, children: "×" })
5670
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5671
- /* @__PURE__ */ jsx(UploadIcon, { size: 28 }),
5672
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-guide-drop-v2-text", children: t("Upload your photo") }),
5673
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-guide-drop-v2-hint", children: t("Full body, front facing") })
5674
- ] })
5675
- }
5676
- ),
5677
- /* @__PURE__ */ jsxs("div", { style: { flex: "1", display: "flex", flexDirection: "column", gap: "0.6vw", fontSize: "0.65vw", color: "var(--ps-text-secondary)" }, children: [
5678
- /* @__PURE__ */ jsx("div", { style: { fontWeight: 600, fontSize: "0.75vw", color: "var(--ps-text-primary)", marginBottom: "0.2vw" }, children: t("Photo Guidelines") }),
5679
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.4vw" }, children: [
5680
- /* @__PURE__ */ jsxs("div", { style: { fontWeight: 600, color: "#16a34a", fontSize: "0.7vw" }, children: [
5681
- "✓ ",
5682
- t("Do")
5683
- ] }),
5684
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5685
- /* @__PURE__ */ jsx("span", { style: { color: "#16a34a" }, children: "•" }),
5686
- /* @__PURE__ */ jsx("span", { children: t("Stand straight, arms at sides") })
5687
- ] }),
5688
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5689
- /* @__PURE__ */ jsx("span", { style: { color: "#16a34a" }, children: "•" }),
5690
- /* @__PURE__ */ jsx("span", { children: t("Full body visible, head to toe") })
5691
- ] }),
5692
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5693
- /* @__PURE__ */ jsx("span", { style: { color: "#16a34a" }, children: "•" }),
5694
- /* @__PURE__ */ jsx("span", { children: t("Well-lit, plain background") })
5695
- ] }),
5696
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5697
- /* @__PURE__ */ jsx("span", { style: { color: "#16a34a" }, children: "•" }),
5698
- /* @__PURE__ */ jsx("span", { children: t("Wear fitted clothing") })
5699
- ] })
5700
- ] }),
5701
- /* @__PURE__ */ jsx("div", { style: { width: "100%", height: "1px", background: "var(--ps-border-color)", margin: "0.2vw 0" } }),
5702
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.4vw" }, children: [
5703
- /* @__PURE__ */ jsxs("div", { style: { fontWeight: 600, color: "#dc2626", fontSize: "0.7vw" }, children: [
5704
- "✗ ",
5705
- t("Don't")
5706
- ] }),
5707
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5708
- /* @__PURE__ */ jsx("span", { style: { color: "#dc2626" }, children: "•" }),
5709
- /* @__PURE__ */ jsx("span", { children: t("No sitting or crouching poses") })
5710
- ] }),
5711
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5712
- /* @__PURE__ */ jsx("span", { style: { color: "#dc2626" }, children: "•" }),
5713
- /* @__PURE__ */ jsx("span", { children: t("No group photos") })
5714
- ] }),
5715
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5716
- /* @__PURE__ */ jsx("span", { style: { color: "#dc2626" }, children: "•" }),
5717
- /* @__PURE__ */ jsx("span", { children: t("No heavy filters or edits") })
5718
- ] }),
5719
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "0.3vw" }, children: [
5720
- /* @__PURE__ */ jsx("span", { style: { color: "#dc2626" }, children: "•" }),
5721
- /* @__PURE__ */ jsx("span", { children: t("No loose or baggy clothing") })
5722
- ] })
5723
- ] })
5724
- ] })
5725
- ] }) }) : /* @__PURE__ */ jsx("div", { className: "ps-bp-image", children: /* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" }) }),
5657
+ step === "photo" ? /* @__PURE__ */ jsx("div", { className: "ps-tryon-v2-bg", style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx("span", { style: { fontSize: "1.2vw", fontWeight: 600, color: "var(--ps-text-primary)" }, children: t("Snap Mode") }) }) : /* @__PURE__ */ jsx("div", { className: "ps-bp-image", children: /* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-bp-image-img" }) }),
5726
5658
  /* @__PURE__ */ jsx(
5727
5659
  "input",
5728
5660
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "4.7.6",
3
+ "version": "4.7.7",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",