@primestyleai/tryon 5.10.123 → 5.10.124
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/{index-YDYXhM8c.js → index-8CWoLxU3.js} +68 -14
- package/dist/index-8CWoLxU3.js.map +1 -0
- package/dist/primestyle-tryon.js +2 -2
- package/dist/react/index.js +3403 -3367
- package/dist/react/index.js.map +1 -1
- package/dist/storefront/primestyle-tryon.js +129 -89
- package/package.json +1 -1
- package/dist/index-YDYXhM8c.js.map +0 -1
|
@@ -32,7 +32,7 @@ function k() {
|
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function y(o) {
|
|
36
36
|
if (f = o, !!S())
|
|
37
37
|
try {
|
|
38
38
|
window.localStorage.setItem(p, JSON.stringify(o));
|
|
@@ -42,9 +42,9 @@ function c(o) {
|
|
|
42
42
|
function T() {
|
|
43
43
|
const o = Date.now(), e = k();
|
|
44
44
|
if (e && o - e.lastSeenAt < 2592e6)
|
|
45
|
-
return o - e.lastSeenAt > 5 * 60 * 1e3 &&
|
|
45
|
+
return o - e.lastSeenAt > 5 * 60 * 1e3 && y({ ...e, lastSeenAt: o }), e.id;
|
|
46
46
|
const t = { id: E(), issuedAt: o, lastSeenAt: o };
|
|
47
|
-
return
|
|
47
|
+
return y(t), t.id;
|
|
48
48
|
}
|
|
49
49
|
function b() {
|
|
50
50
|
if (typeof navigator > "u") return null;
|
|
@@ -101,10 +101,10 @@ class q {
|
|
|
101
101
|
});
|
|
102
102
|
if (!d.ok) {
|
|
103
103
|
const a = await d.json().catch(() => ({}));
|
|
104
|
-
throw d.status === 402 ? new
|
|
104
|
+
throw d.status === 402 ? new c(
|
|
105
105
|
a.message || "Insufficient try-ons",
|
|
106
106
|
"INSUFFICIENT_BALANCE"
|
|
107
|
-
) : new
|
|
107
|
+
) : new c(
|
|
108
108
|
a.message || "Failed to submit try-on",
|
|
109
109
|
"API_ERROR"
|
|
110
110
|
);
|
|
@@ -117,7 +117,7 @@ class q {
|
|
|
117
117
|
});
|
|
118
118
|
if (!t.ok) {
|
|
119
119
|
const r = await t.json().catch(() => ({}));
|
|
120
|
-
throw new
|
|
120
|
+
throw new c(
|
|
121
121
|
r.message || "Failed to get status",
|
|
122
122
|
"API_ERROR"
|
|
123
123
|
);
|
|
@@ -128,7 +128,7 @@ class q {
|
|
|
128
128
|
return `${this.baseUrl}/api/v1/tryon/stream?key=${encodeURIComponent(this.apiKey)}`;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
class
|
|
131
|
+
class c extends Error {
|
|
132
132
|
constructor(e, t) {
|
|
133
133
|
super(e), this.name = "PrimeStyleError", this.code = t;
|
|
134
134
|
}
|
|
@@ -394,7 +394,61 @@ const te = [
|
|
|
394
394
|
"Your Weight",
|
|
395
395
|
"Drag or scroll to set your height",
|
|
396
396
|
"Drag or scroll to set your weight",
|
|
397
|
-
"Enter height and weight first"
|
|
397
|
+
"Enter height and weight first",
|
|
398
|
+
// ── Field labels (FaceSizeView, HeadSizeView, FootSizeView, accessory) ──
|
|
399
|
+
"Lens Width",
|
|
400
|
+
"Bridge",
|
|
401
|
+
"Arm Length",
|
|
402
|
+
"Head Circumference",
|
|
403
|
+
"Face Width",
|
|
404
|
+
"Temple",
|
|
405
|
+
"Around widest point",
|
|
406
|
+
"Foot Length",
|
|
407
|
+
"Chest",
|
|
408
|
+
"Waist",
|
|
409
|
+
"Hips",
|
|
410
|
+
"Shoulder",
|
|
411
|
+
"Sleeve",
|
|
412
|
+
"Neck",
|
|
413
|
+
"Inseam",
|
|
414
|
+
"Thigh",
|
|
415
|
+
"Hip",
|
|
416
|
+
// ── Units ──
|
|
417
|
+
"Centimeters",
|
|
418
|
+
"Inches",
|
|
419
|
+
"Millimetre",
|
|
420
|
+
"Centimetre",
|
|
421
|
+
"Millimeters",
|
|
422
|
+
// ── Fit descriptors ──
|
|
423
|
+
"Tight",
|
|
424
|
+
"Loose",
|
|
425
|
+
"Short",
|
|
426
|
+
"Long",
|
|
427
|
+
"Perfect",
|
|
428
|
+
"Perfect fit",
|
|
429
|
+
"✓ Fit",
|
|
430
|
+
// Lowercase variants used inline by fitLabelFn / lengthFitLabelFn
|
|
431
|
+
"tight",
|
|
432
|
+
"loose",
|
|
433
|
+
"short",
|
|
434
|
+
"long",
|
|
435
|
+
"perfect fit",
|
|
436
|
+
"too tight",
|
|
437
|
+
"a bit tight",
|
|
438
|
+
"too loose",
|
|
439
|
+
"a bit loose",
|
|
440
|
+
"too short",
|
|
441
|
+
"a bit short",
|
|
442
|
+
"too long",
|
|
443
|
+
"a bit long",
|
|
444
|
+
// ── Misc ──
|
|
445
|
+
"Product",
|
|
446
|
+
"preview",
|
|
447
|
+
"Length",
|
|
448
|
+
"Length Adjustment",
|
|
449
|
+
"Regular",
|
|
450
|
+
"Big",
|
|
451
|
+
"Big & Tall"
|
|
398
452
|
], I = {
|
|
399
453
|
"Virtual Try-On": "バーチャル試着",
|
|
400
454
|
"Find Your Size & See It On You": "あなたのサイズを見つけて試着",
|
|
@@ -1331,7 +1385,7 @@ const te = [
|
|
|
1331
1385
|
"Your Weight": "Seu Peso",
|
|
1332
1386
|
"Drag or scroll to set your height": "Arraste ou role para definir sua altura",
|
|
1333
1387
|
"Drag or scroll to set your weight": "Arraste ou role para definir seu peso"
|
|
1334
|
-
},
|
|
1388
|
+
}, W = {
|
|
1335
1389
|
"Virtual Try-On": "Virtueel Passen",
|
|
1336
1390
|
"Find Your Size & See It On You": "Vind je maat en pas het",
|
|
1337
1391
|
"Get the perfect fit, then try it on virtually": "Vind de perfecte pasvorm en pas het virtueel",
|
|
@@ -1448,7 +1502,7 @@ const te = [
|
|
|
1448
1502
|
"Your Weight": "Je Gewicht",
|
|
1449
1503
|
"Drag or scroll to set your height": "Sleep of scroll om je lengte in te stellen",
|
|
1450
1504
|
"Drag or scroll to set your weight": "Sleep of scroll om je gewicht in te stellen"
|
|
1451
|
-
},
|
|
1505
|
+
}, R = {
|
|
1452
1506
|
"Virtual Try-On": "Виртуальная примерка",
|
|
1453
1507
|
"Find Your Size & See It On You": "Найдите свой размер и примерьте",
|
|
1454
1508
|
"Get the perfect fit, then try it on virtually": "Найдите идеальную посадку и примерьте виртуально",
|
|
@@ -2627,8 +2681,8 @@ const te = [
|
|
|
2627
2681
|
de: H,
|
|
2628
2682
|
it: C,
|
|
2629
2683
|
pt: O,
|
|
2630
|
-
nl:
|
|
2631
|
-
ru:
|
|
2684
|
+
nl: W,
|
|
2685
|
+
ru: R,
|
|
2632
2686
|
ar: Y,
|
|
2633
2687
|
tr: B,
|
|
2634
2688
|
pl: K,
|
|
@@ -2644,7 +2698,7 @@ for (const [o, e] of Object.entries(x))
|
|
|
2644
2698
|
export {
|
|
2645
2699
|
q as A,
|
|
2646
2700
|
oe as L,
|
|
2647
|
-
|
|
2701
|
+
c as P,
|
|
2648
2702
|
_ as S,
|
|
2649
2703
|
ie as T,
|
|
2650
2704
|
M as a,
|
|
@@ -2655,4 +2709,4 @@ export {
|
|
|
2655
2709
|
$ as i,
|
|
2656
2710
|
N as r
|
|
2657
2711
|
};
|
|
2658
|
-
//# sourceMappingURL=index-
|
|
2712
|
+
//# sourceMappingURL=index-8CWoLxU3.js.map
|