@primestyleai/tryon 1.5.0 → 2.0.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.
@@ -20,8 +20,8 @@ class ApiClient {
20
20
  const data = await res.json().catch(() => ({}));
21
21
  if (res.status === 402) {
22
22
  throw new PrimeStyleError(
23
- data.message || "Insufficient tokens",
24
- "INSUFFICIENT_TOKENS"
23
+ data.message || "Insufficient try-ons",
24
+ "INSUFFICIENT_BALANCE"
25
25
  );
26
26
  }
27
27
  throw new PrimeStyleError(
@@ -1,5 +1,5 @@
1
- import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage } from "./image-utils-BfFYHwlw.js";
2
- import { P } from "./image-utils-BfFYHwlw.js";
1
+ import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage } from "./image-utils-C9bJ1zKO.js";
2
+ import { P } from "./image-utils-C9bJ1zKO.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-BfFYHwlw.js";
4
+ import { A as ApiClient, S as SseClient, i as isValidImageFile, c as compressImage, P as PrimeStyleError } from "../image-utils-C9bJ1zKO.js";
5
5
  function cx(base, override) {
6
6
  return override ? `${base} ${override}` : base;
7
7
  }
package/dist/types.d.ts CHANGED
@@ -57,7 +57,7 @@ export interface ModalStyles {
57
57
  export interface TryOnResponse {
58
58
  jobId: string;
59
59
  status: string;
60
- tokensDeducted: number;
60
+ tryOnsUsed: number;
61
61
  newBalance: number;
62
62
  }
63
63
  /** VTO status update from SSE */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "1.5.0",
3
+ "version": "2.0.0",
4
4
  "description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
5
5
  "type": "module",
6
6
  "main": "dist/primestyle-tryon.js",