@primestyleai/tryon 3.2.2 → 3.3.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.
- package/dist/react/index.js +19 -10
- package/package.json +57 -57
package/dist/react/index.js
CHANGED
|
@@ -806,7 +806,8 @@ function PrimeStyleTryonInner({
|
|
|
806
806
|
const sgChecked = !sizeGuideFetching && sizeGuide !== null;
|
|
807
807
|
if (sizeGuideFetching) {
|
|
808
808
|
return /* @__PURE__ */ jsx("div", { className: "ps-tryon-sizing-choice", children: /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sg-checking", children: [
|
|
809
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sg-checking-
|
|
809
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sg-checking-icon", children: /* @__PURE__ */ jsx(RulerIcon, { size: 32 }) }),
|
|
810
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sg-checking-bar-wrap", children: /* @__PURE__ */ jsx("div", { className: "ps-tryon-sg-checking-bar" }) }),
|
|
810
811
|
/* @__PURE__ */ jsx("h3", { className: "ps-tryon-section-title", children: "Checking size guide..." }),
|
|
811
812
|
/* @__PURE__ */ jsx("p", { className: "ps-tryon-sg-checking-sub", children: "Looking for size chart data for this product" })
|
|
812
813
|
] }) });
|
|
@@ -857,7 +858,11 @@ function PrimeStyleTryonInner({
|
|
|
857
858
|
const isFemale = formGender === "female";
|
|
858
859
|
const isCm = sizingUnit === "cm";
|
|
859
860
|
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sizing-form", children: [
|
|
860
|
-
|
|
861
|
+
/* @__PURE__ */ jsxs("button", { className: "ps-tryon-back", onClick: () => setView("sizing-choice"), children: [
|
|
862
|
+
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
863
|
+
" Back"
|
|
864
|
+
] }),
|
|
865
|
+
sizingMethod === "exact" && profiles.length > 0 && /* @__PURE__ */ jsx("div", { className: "ps-tryon-profile-bar", children: /* @__PURE__ */ jsxs("select", { className: "ps-tryon-profile-select", value: activeProfileId || "", onChange: (e) => {
|
|
861
866
|
if (e.target.value) applyProfile(e.target.value);
|
|
862
867
|
}, children: [
|
|
863
868
|
/* @__PURE__ */ jsx("option", { value: "", children: "Auto-fill from saved profile..." }),
|
|
@@ -1357,17 +1362,21 @@ const STYLES = `
|
|
|
1357
1362
|
display: flex; align-items: center; justify-content: center; gap: 6px;
|
|
1358
1363
|
}
|
|
1359
1364
|
.ps-tryon-sg-found svg { stroke: #4ade80; }
|
|
1360
|
-
.ps-tryon-sg-checking {
|
|
1361
|
-
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
}
|
|
1365
|
+
.ps-tryon-sg-checking { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; text-align: center; }
|
|
1366
|
+
.ps-tryon-sg-checking-icon { color: #bb945c; margin-bottom: 16px; animation: ps-pulse-ruler 1.5s ease-in-out infinite; }
|
|
1367
|
+
.ps-tryon-sg-checking-icon svg { stroke: currentColor; fill: none; }
|
|
1368
|
+
@keyframes ps-pulse-ruler { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }
|
|
1369
|
+
.ps-tryon-sg-checking-bar-wrap { width: 180px; height: 4px; background: #333; border-radius: 2px; overflow: hidden; margin-bottom: 20px; }
|
|
1370
|
+
.ps-tryon-sg-checking-bar { height: 100%; width: 40%; background: linear-gradient(90deg, #bb945c, #d6ba7d); border-radius: 2px; animation: ps-sg-bar 1.5s ease-in-out infinite; }
|
|
1371
|
+
@keyframes ps-sg-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
|
|
1368
1372
|
.ps-tryon-sg-checking .ps-tryon-section-title { margin-bottom: 6px; }
|
|
1369
1373
|
.ps-tryon-sg-checking-sub { font-size: 13px; color: #999; margin: 0; }
|
|
1370
1374
|
|
|
1375
|
+
/* Back button */
|
|
1376
|
+
.ps-tryon-back { display: flex; align-items: center; gap: 6px; background: none; border: none; color: #999; font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 12px; font-family: inherit; transition: color 0.2s; }
|
|
1377
|
+
.ps-tryon-back:hover { color: #fff; }
|
|
1378
|
+
.ps-tryon-back svg { stroke: currentColor; fill: none; }
|
|
1379
|
+
|
|
1371
1380
|
/* Sizing form */
|
|
1372
1381
|
.ps-tryon-sizing-form { display: flex; flex-direction: column; gap: 12px; }
|
|
1373
1382
|
.ps-tryon-input-row { display: flex; align-items: center; gap: 10px; }
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@primestyleai/tryon",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/primestyle-tryon.js",
|
|
7
|
-
"module": "dist/primestyle-tryon.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/primestyle-tryon.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./react": {
|
|
15
|
-
"import": "./dist/react/index.js",
|
|
16
|
-
"types": "./dist/react/index.d.ts"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist",
|
|
21
|
-
"logo.svg",
|
|
22
|
-
"README.md"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "vite build --watch",
|
|
26
|
-
"build": "vite build && tsc --emitDeclarationOnly",
|
|
27
|
-
"prepublishOnly": "npm run build"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"virtual-try-on",
|
|
31
|
-
"react",
|
|
32
|
-
"web-component",
|
|
33
|
-
"fashion",
|
|
34
|
-
"ai",
|
|
35
|
-
"primestyle"
|
|
36
|
-
],
|
|
37
|
-
"author": "PrimeStyle AI",
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"peerDependencies": {
|
|
40
|
-
"react": ">=18.0.0",
|
|
41
|
-
"react-dom": ">=18.0.0"
|
|
42
|
-
},
|
|
43
|
-
"peerDependenciesMeta": {
|
|
44
|
-
"react": {
|
|
45
|
-
"optional": true
|
|
46
|
-
},
|
|
47
|
-
"react-dom": {
|
|
48
|
-
"optional": true
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@types/react": "^18.3.28",
|
|
53
|
-
"terser": "^5.31.0",
|
|
54
|
-
"typescript": "^5.5.0",
|
|
55
|
-
"vite": "^5.4.0"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@primestyleai/tryon",
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "PrimeStyle Virtual Try-On SDK — React component & Web Component",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/primestyle-tryon.js",
|
|
7
|
+
"module": "dist/primestyle-tryon.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/primestyle-tryon.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./react": {
|
|
15
|
+
"import": "./dist/react/index.js",
|
|
16
|
+
"types": "./dist/react/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"logo.svg",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite build --watch",
|
|
26
|
+
"build": "vite build && tsc --emitDeclarationOnly",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"virtual-try-on",
|
|
31
|
+
"react",
|
|
32
|
+
"web-component",
|
|
33
|
+
"fashion",
|
|
34
|
+
"ai",
|
|
35
|
+
"primestyle"
|
|
36
|
+
],
|
|
37
|
+
"author": "PrimeStyle AI",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": ">=18.0.0",
|
|
41
|
+
"react-dom": ">=18.0.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"react": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"react-dom": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/react": "^18.3.28",
|
|
53
|
+
"terser": "^5.31.0",
|
|
54
|
+
"typescript": "^5.5.0",
|
|
55
|
+
"vite": "^5.4.0"
|
|
56
|
+
}
|
|
57
|
+
}
|