@primestyleai/tryon 1.3.1 → 1.4.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.
@@ -132,8 +132,8 @@ class SseClient {
132
132
  this.reconnectAttempts = 0;
133
133
  }
134
134
  }
135
- const MAX_DIMENSION = 1024;
136
- const JPEG_QUALITY = 0.85;
135
+ const MAX_DIMENSION = 768;
136
+ const JPEG_QUALITY = 0.7;
137
137
  function compressImage(file) {
138
138
  return new Promise((resolve, reject) => {
139
139
  const reader = new FileReader();
@@ -1,5 +1,5 @@
1
- import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage } from "./image-utils-DtJVYQIA.js";
2
- import { P } from "./image-utils-DtJVYQIA.js";
1
+ import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage } from "./image-utils-BnXx8V47.js";
2
+ import { P } from "./image-utils-BnXx8V47.js";
3
3
  function detectProductImage() {
4
4
  const ogImage = document.querySelector(
5
5
  'meta[property="og:image"]'
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import { useState, useRef, useEffect, useCallback } from "react";
4
- import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage, P as PrimeStyleError } from "../image-utils-DtJVYQIA.js";
4
+ import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage, P as PrimeStyleError } from "../image-utils-BnXx8V47.js";
5
5
  function cx(base, override) {
6
6
  return override ? `${base} ${override}` : base;
7
7
  }
@@ -141,7 +141,7 @@ function PrimeStyleTryon({
141
141
  }, [apiUrl]);
142
142
  useEffect(() => {
143
143
  if (view === "processing") {
144
- setCountdown(20);
144
+ setCountdown(25);
145
145
  const interval = setInterval(() => {
146
146
  setCountdown((prev) => {
147
147
  if (prev <= 1) {
@@ -505,7 +505,7 @@ function PrimeStyleTryon({
505
505
  cy: "60",
506
506
  r: "52",
507
507
  style: {
508
- strokeDashoffset: `${countdown / 20 * 326.73}`
508
+ strokeDashoffset: `${countdown / 25 * 326.73}`
509
509
  }
510
510
  }
511
511
  )
@@ -529,7 +529,7 @@ function PrimeStyleTryon({
529
529
  "ps-tryon-processing-sub",
530
530
  cn.processingSubText
531
531
  ),
532
- children: countdown > 0 ? "This usually takes 15-20 seconds" : "Finishing up your look"
532
+ children: countdown > 0 ? "This usually takes 15-25 seconds" : "Finishing up your look"
533
533
  }
534
534
  )
535
535
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",