@primestyleai/tryon 3.20.0 → 4.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.
@@ -312,6 +312,8 @@ const en = {
312
312
  "Showing fit for size": "Showing fit for size",
313
313
  "Back to": "Back to",
314
314
  "Edit values": "Edit values",
315
+ "Based on your updated measurements, size": "Based on your updated measurements, size",
316
+ "may be a better fit": "may be a better fit",
315
317
  "Fit Analysis": "Fit Analysis",
316
318
  "Show more": "Show more",
317
319
  "Done": "Done",
@@ -1,5 +1,5 @@
1
- import { c as createT, A as ApiClient, S as SseClient, i as isValidImageFile, a as compressImage } from "./index-Dr4MxT8W.js";
2
- import { P, b, T, d, r } from "./index-Dr4MxT8W.js";
1
+ import { c as createT, A as ApiClient, S as SseClient, i as isValidImageFile, a as compressImage } from "./index-aIBOmApE.js";
2
+ import { P, b, T, d, r } from "./index-aIBOmApE.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 { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { useState, useEffect, useMemo, useRef, useCallback } from "react";
4
- import { c as createT, A as ApiClient, S as SseClient, i as isValidImageFile, a as compressImage, P as PrimeStyleError, L as LOCALE_LABELS, b as SUPPORTED_LOCALES } from "../index-Dr4MxT8W.js";
4
+ import { c as createT, A as ApiClient, S as SseClient, i as isValidImageFile, a as compressImage, P as PrimeStyleError, L as LOCALE_LABELS, b as SUPPORTED_LOCALES } from "../index-aIBOmApE.js";
5
5
  const HEADER_ALIASES = {
6
6
  // ── Size label columns (skipped during field derivation) ──
7
7
  size: "__size__",
@@ -1565,12 +1565,30 @@ function PrimeStyleTryonInner({
1565
1565
  return { area: m.measurement, userNum, chartLabel, fit };
1566
1566
  });
1567
1567
  }, [sizingResult, compareSize, editVals, chartRangeFor]);
1568
+ const suggestedSize = useMemo(() => {
1569
+ if (!Object.keys(editVals).length || !sizingResult?.matchDetails?.length || !allSizes.length) return null;
1570
+ let bestSize = "";
1571
+ let bestScore = -1;
1572
+ for (const size of allSizes) {
1573
+ let score = 0;
1574
+ for (const m of sizingResult.matchDetails) {
1575
+ const edited = editVals[m.measurement];
1576
+ const userNum = edited !== void 0 && edited !== "" ? parseFloat(edited) : pNum(m.userValue);
1577
+ const alt = chartRangeFor(m.measurement, size);
1578
+ if (alt && userNum >= alt.min && userNum <= alt.max) score++;
1579
+ }
1580
+ if (score > bestScore) {
1581
+ bestScore = score;
1582
+ bestSize = size;
1583
+ }
1584
+ }
1585
+ return bestSize && bestSize !== recSize ? bestSize : null;
1586
+ }, [editVals, sizingResult, allSizes, recSize, chartRangeFor]);
1568
1587
  const allIntlSizes = useMemo(() => {
1569
1588
  const backendIntl = sizingResult?.internationalSizes || {};
1570
1589
  const upper = recSize.toUpperCase().trim();
1571
1590
  const fromTable = SIZE_CONVERSIONS[upper] || SIZE_CONVERSIONS[recSize] || {};
1572
- const merged = { ...fromTable, ...backendIntl };
1573
- return merged;
1591
+ return { ...fromTable, ...backendIntl };
1574
1592
  }, [sizingResult, recSize]);
1575
1593
  return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr", children: [
1576
1594
  sizingLoading && !sizingResult && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-loading", children: [
@@ -1585,74 +1603,71 @@ function PrimeStyleTryonInner({
1585
1603
  /* @__PURE__ */ jsx("div", { className: `ps-tryon-sr-hero-conf ps-conf-${sizingResult.confidence}`, children: sizingResult.confidence === "high" ? t("High Confidence") : sizingResult.confidence === "medium" ? t("Medium Confidence") : t("Low Confidence") })
1586
1604
  ] })
1587
1605
  ] }),
1606
+ suggestedSize && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-suggestion", children: [
1607
+ /* @__PURE__ */ jsx(SparkleIcon, { size: 14 }),
1608
+ /* @__PURE__ */ jsxs("span", { children: [
1609
+ t("Based on your updated measurements, size"),
1610
+ " ",
1611
+ /* @__PURE__ */ jsx("strong", { children: suggestedSize }),
1612
+ " ",
1613
+ t("may be a better fit")
1614
+ ] })
1615
+ ] }),
1588
1616
  Object.keys(allIntlSizes).length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-intl", children: [
1589
- /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-label", children: t("Your size in other countries") }),
1590
- /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-intl-primary", children: Object.entries(allIntlSizes).map(([code, val]) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-intl-card", children: [
1617
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-section-title", children: t("Your size in other countries") }),
1618
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-intl-grid", children: Object.entries(allIntlSizes).map(([code, val]) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-intl-card", children: [
1591
1619
  /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-intl-card-val", children: val }),
1592
1620
  /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-intl-card-code", children: code })
1593
1621
  ] }, code)) })
1594
1622
  ] }),
1595
- allSizes.length > 1 && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-compare", children: [
1596
- /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-label", children: t("Compare with another size") }),
1597
- /* @__PURE__ */ jsx("select", { className: "ps-tryon-sr-compare-select", value: selSize, onChange: (e) => setCompareSize(e.target.value), children: allSizes.map((s) => /* @__PURE__ */ jsxs("option", { value: s, children: [
1598
- s,
1599
- s === recSize ? ` ★ ${t("recommended")}` : ""
1600
- ] }, s)) }),
1601
- compareSize && compareSize !== recSize && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-compare-note", children: [
1602
- t("Showing fit for size"),
1603
- " ",
1604
- /* @__PURE__ */ jsx("strong", { children: compareSize }),
1605
- /* @__PURE__ */ jsxs("button", { className: "ps-tryon-sr-compare-reset", onClick: () => setCompareSize(""), children: [
1606
- t("Back to"),
1607
- " ",
1608
- recSize
1609
- ] })
1610
- ] })
1611
- ] }),
1612
1623
  fitRows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit", children: [
1613
- /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-header-row", children: [
1614
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-label", children: t("Fit Analysis") }),
1624
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-top", children: [
1625
+ /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-section-title", children: t("Fit Analysis") }),
1615
1626
  /* @__PURE__ */ jsxs("button", { className: "ps-tryon-sr-edit-btn", onClick: () => setEditing(!editing), children: [
1616
1627
  /* @__PURE__ */ jsx(SvgIcon, { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", size: 12 }),
1617
1628
  editing ? t("Done") : t("Edit values")
1618
1629
  ] })
1619
1630
  ] }),
1620
- fitRows.map((row, i) => /* @__PURE__ */ jsxs("div", { className: `ps-tryon-sr-fit-card ps-fit-${row.fit}`, children: [
1621
- /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-card-top", children: [
1622
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fit-area", children: row.area }),
1623
- /* @__PURE__ */ jsx("span", { className: `ps-tryon-sr-fit-badge ps-fit-${row.fit}`, children: row.fit === "good" ? `✓ ${t("within range")}` : row.fit === "tight" ? `↑ ${t("may be snug")}` : `↓ ${t("may be loose")}` })
1631
+ allSizes.length > 1 && /* @__PURE__ */ jsx("select", { className: "ps-tryon-sr-compare-select", value: selSize, onChange: (e) => setCompareSize(e.target.value), children: allSizes.map((s) => /* @__PURE__ */ jsxs("option", { value: s, children: [
1632
+ s,
1633
+ s === recSize ? ` ★ ${t("recommended")}` : ""
1634
+ ] }, s)) }),
1635
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-fit-cards", children: fitRows.map((row, i) => /* @__PURE__ */ jsxs("div", { className: `ps-tryon-sr-fc ps-fit-${row.fit}`, children: [
1636
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-head", children: [
1637
+ /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fc-area", children: row.area }),
1638
+ /* @__PURE__ */ jsx("span", { className: `ps-tryon-sr-fc-badge ps-fit-${row.fit}`, children: row.fit === "good" ? `✓ ${t("within range")}` : row.fit === "tight" ? `↑ ${t("may be snug")}` : `↓ ${t("may be loose")}` })
1624
1639
  ] }),
1625
- /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-card-bottom", children: [
1626
- /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-val", children: [
1627
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fit-val-label", children: t("You") }),
1628
- editing ? /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-val-input-wrap", children: [
1640
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-body", children: [
1641
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-col", children: [
1642
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-fc-label", children: t("You") }),
1643
+ editing ? /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-edit", children: [
1629
1644
  /* @__PURE__ */ jsx(
1630
1645
  "input",
1631
1646
  {
1632
1647
  type: "number",
1633
- className: "ps-tryon-sr-fit-input",
1648
+ className: "ps-tryon-sr-fc-input",
1634
1649
  value: editVals[row.area] !== void 0 ? editVals[row.area] : row.userNum,
1635
1650
  onChange: (e) => setEditVals((prev) => ({ ...prev, [row.area]: e.target.value }))
1636
1651
  }
1637
1652
  ),
1638
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fit-unit", children: unitLbl })
1639
- ] }) : /* @__PURE__ */ jsxs("span", { className: "ps-tryon-sr-fit-val-text", children: [
1653
+ /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fc-unit", children: unitLbl })
1654
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-value", children: [
1640
1655
  row.userNum,
1641
1656
  " ",
1642
1657
  unitLbl
1643
1658
  ] })
1644
1659
  ] }),
1645
- /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fit-val", children: [
1646
- /* @__PURE__ */ jsxs("span", { className: "ps-tryon-sr-fit-val-label", children: [
1660
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-col", children: [
1661
+ /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-fc-label", children: [
1647
1662
  t("Chart"),
1648
1663
  " (",
1649
1664
  selSize,
1650
1665
  ")"
1651
1666
  ] }),
1652
- /* @__PURE__ */ jsx("span", { className: "ps-tryon-sr-fit-val-text", children: row.chartLabel })
1667
+ /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-fc-value", children: row.chartLabel })
1653
1668
  ] })
1654
1669
  ] })
1655
- ] }, i))
1670
+ ] }, i)) })
1656
1671
  ] }),
1657
1672
  fitRows.length === 0 && sizingResult.reasoning && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sr-reasoning", children: /* @__PURE__ */ jsx("p", { children: sizingResult.reasoning }) }),
1658
1673
  /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sr-ctas", children: [
@@ -2324,62 +2339,59 @@ const STYLES = `
2324
2339
  .ps-tryon-btn-retry:hover { background: rgba(255,255,255,0.12); }
2325
2340
 
2326
2341
  /* ── Size Result (redesigned) ── */
2327
- .ps-tryon-sr { display: flex; flex-direction: column; gap: 1.1vw; }
2328
- .ps-tryon-sr-loading { text-align: center; padding: 2vw 0; }
2329
- .ps-tryon-sr-loading p { font-size: 0.83vw; color: #999; margin-top: 0.5vw; }
2342
+ .ps-tryon-sr { display: flex; flex-direction: column; gap: 1.25vw; }
2343
+ .ps-tryon-sr-loading { text-align: center; padding: 3vw 0; }
2344
+ .ps-tryon-sr-loading p { font-size: 0.83vw; color: #666; margin-top: 0.6vw; }
2330
2345
  .ps-tryon-size-loading-spinner {
2331
- width: 2vw; height: 2vw; border: 3px solid #333;
2346
+ width: 1.8vw; height: 1.8vw; border: 2px solid #282828;
2332
2347
  border-top-color: #bb945c; border-radius: 50%;
2333
- animation: ps-spin 0.8s linear infinite; margin: 0 auto;
2348
+ animation: ps-spin 0.7s linear infinite; margin: 0 auto;
2334
2349
  }
2335
2350
  @keyframes ps-spin { to { transform: rotate(360deg); } }
2336
2351
 
2337
2352
  /* Hero */
2338
2353
  .ps-tryon-sr-hero {
2339
- display: flex; align-items: center; gap: 1vw; padding: 1vw 1.2vw;
2340
- background: linear-gradient(135deg, rgba(187,148,92,0.08), rgba(187,148,92,0.02));
2341
- border: 1.5px solid rgba(187,148,92,0.25); border-radius: 0.83vw;
2354
+ display: flex; align-items: center; gap: 1vw; padding: 1.1vw 1.3vw;
2355
+ background: linear-gradient(135deg, rgba(187,148,92,0.06), rgba(187,148,92,0.01));
2356
+ border: 1px solid rgba(187,148,92,0.2); border-radius: 0.83vw;
2342
2357
  }
2343
2358
  .ps-tryon-sr-hero-badge {
2344
- min-width: 3.5vw; height: 3.5vw; display: flex; align-items: center; justify-content: center;
2359
+ min-width: 3.2vw; height: 3.2vw; display: flex; align-items: center; justify-content: center;
2345
2360
  background: linear-gradient(135deg, #bb945c, #d6ba7d); color: #111;
2346
- font-size: 1.5vw; font-weight: 800; border-radius: 0.73vw; letter-spacing: -0.02em;
2347
- padding: 0 0.8vw; box-shadow: 0 0.4vw 1.2vw rgba(187,148,92,0.25);
2361
+ font-size: 1.35vw; font-weight: 800; border-radius: 0.63vw; letter-spacing: -0.02em;
2362
+ padding: 0 0.73vw; box-shadow: 0 0.3vw 1vw rgba(187,148,92,0.3);
2348
2363
  }
2349
2364
  .ps-tryon-sr-hero-info { flex: 1; }
2350
- .ps-tryon-sr-hero-title { font-size: 1.04vw; font-weight: 700; color: #fff; margin-bottom: 0.15vw; }
2351
- .ps-tryon-sr-hero-conf { font-size: 0.78vw; font-weight: 600; }
2365
+ .ps-tryon-sr-hero-title { font-size: 1vw; font-weight: 700; color: #fff; margin-bottom: 0.1vw; }
2366
+ .ps-tryon-sr-hero-conf { font-size: 0.73vw; font-weight: 600; }
2352
2367
  .ps-conf-high { color: #4ade80; } .ps-conf-medium { color: #bb945c; } .ps-conf-low { color: #ef4444; }
2353
2368
 
2369
+ /* Suggestion banner */
2370
+ .ps-tryon-sr-suggestion {
2371
+ display: flex; align-items: center; gap: 0.52vw;
2372
+ padding: 0.63vw 0.83vw; border-radius: 0.52vw;
2373
+ background: rgba(187,148,92,0.08); border: 1px solid rgba(187,148,92,0.2);
2374
+ font-size: 0.73vw; color: #d6ba7d; animation: ps-fade-up 0.3s ease both;
2375
+ }
2376
+ .ps-tryon-sr-suggestion svg { stroke: #bb945c; flex-shrink: 0; }
2377
+ .ps-tryon-sr-suggestion strong { color: #fff; }
2378
+
2379
+ /* Section titles */
2380
+ .ps-tryon-sr-section-title { font-size: 0.73vw; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.52vw; }
2381
+
2354
2382
  /* International sizes */
2355
2383
  .ps-tryon-sr-intl { }
2356
- .ps-tryon-sr-label { font-size: 0.78vw; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.52vw; }
2357
- .ps-tryon-sr-label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: #666; font-style: italic; }
2358
- .ps-tryon-sr-intl-primary { display: flex; flex-wrap: wrap; gap: 0.42vw; margin-bottom: 0.52vw; }
2384
+ .ps-tryon-sr-intl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.8vw, 1fr)); gap: 0.42vw; }
2359
2385
  .ps-tryon-sr-intl-card {
2360
- flex: 1; min-width: 3.5vw; display: flex; flex-direction: column; align-items: center;
2361
- padding: 0.57vw 0.42vw; border: 1.5px solid #333; border-radius: 0.63vw;
2362
- background: #1a1b1a; transition: border-color 0.2s;
2386
+ display: flex; flex-direction: column; align-items: center;
2387
+ padding: 0.62vw 0.36vw; border: 1px solid #282828; border-radius: 0.52vw;
2388
+ background: #161616; transition: all 0.2s;
2363
2389
  }
2364
- .ps-tryon-sr-intl-card:hover { border-color: #555; }
2365
- .ps-tryon-sr-intl-card-val { font-size: 1.04vw; font-weight: 800; color: #fff; line-height: 1.2; }
2366
- .ps-tryon-sr-intl-card-code { font-size: 0.57vw; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.1vw; }
2367
-
2368
- .ps-tryon-sr-intl-more { }
2369
- .ps-tryon-sr-intl-more-btn {
2370
- font-size: 0.73vw; color: #bb945c; font-weight: 600; cursor: pointer;
2371
- list-style: none; margin-bottom: 0.42vw; font-family: inherit;
2372
- }
2373
- .ps-tryon-sr-intl-more-btn::-webkit-details-marker { display: none; }
2374
- .ps-tryon-sr-intl-more-btn::before { content: "▸ "; }
2375
- .ps-tryon-sr-intl-more[open] .ps-tryon-sr-intl-more-btn::before { content: "▾ "; }
2390
+ .ps-tryon-sr-intl-card:hover { border-color: #444; background: #1c1c1c; }
2391
+ .ps-tryon-sr-intl-card-val { font-size: 1.1vw; font-weight: 800; color: #fff; line-height: 1.15; }
2392
+ .ps-tryon-sr-intl-card-code { font-size: 0.52vw; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.15vw; }
2376
2393
 
2377
- .ps-tryon-sr-intl-grid { display: flex; flex-wrap: wrap; gap: 0.42vw; }
2378
- .ps-tryon-sr-intl-item {
2379
- display: flex; align-items: center; border: 1.5px solid #333; border-radius: 0.52vw; overflow: hidden;
2380
- }
2381
- .ps-tryon-sr-intl-code { padding: 0.42vw 0.57vw; font-size: 0.68vw; color: #999; font-weight: 700; background: rgba(255,255,255,0.03); letter-spacing: 0.04em; }
2382
- .ps-tryon-sr-intl-val { padding: 0.42vw 0.68vw; font-size: 0.83vw; color: #fff; font-weight: 700; }
2394
+ /* (intl grid uses .ps-tryon-sr-intl-grid defined above) */
2383
2395
 
2384
2396
  /* Size selector */
2385
2397
  .ps-tryon-sr-sizes { }
@@ -2405,55 +2417,61 @@ const STYLES = `
2405
2417
  .ps-tryon-sr-comparing { font-size: 0.73vw; color: #bb945c; margin-top: 0.42vw; }
2406
2418
  .ps-tryon-sr-comparing strong { color: #d6ba7d; }
2407
2419
 
2408
- /* Fit analysis cards */
2409
- .ps-tryon-sr-fit { display: flex; flex-direction: column; gap: 0.52vw; }
2410
- .ps-tryon-sr-fit-header-row {
2411
- display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.1vw;
2420
+ /* Fit analysis */
2421
+ .ps-tryon-sr-fit { }
2422
+ .ps-tryon-sr-fit-top {
2423
+ display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.52vw;
2412
2424
  }
2413
2425
  .ps-tryon-sr-edit-btn {
2414
2426
  display: inline-flex; align-items: center; gap: 0.31vw;
2415
- padding: 0.26vw 0.63vw; border: 1.5px solid #bb945c; border-radius: 0.36vw;
2416
- background: transparent; color: #bb945c; font-size: 0.63vw; font-weight: 600;
2427
+ padding: 0.31vw 0.73vw; border: 1px solid rgba(187,148,92,0.4); border-radius: 0.42vw;
2428
+ background: rgba(187,148,92,0.06); color: #bb945c; font-size: 0.68vw; font-weight: 600;
2417
2429
  cursor: pointer; font-family: inherit; transition: all 0.2s;
2418
2430
  }
2419
- .ps-tryon-sr-edit-btn:hover { background: rgba(187,148,92,0.1); }
2431
+ .ps-tryon-sr-edit-btn:hover { background: rgba(187,148,92,0.12); border-color: #bb945c; }
2420
2432
  .ps-tryon-sr-edit-btn svg { stroke: currentColor; }
2421
- .ps-tryon-sr-fit-card {
2422
- border: 1.5px solid #333; border-radius: 0.63vw; overflow: hidden; transition: border-color 0.2s;
2433
+
2434
+ .ps-tryon-sr-fit-cards { display: flex; flex-direction: column; gap: 0.42vw; }
2435
+
2436
+ .ps-tryon-sr-fc {
2437
+ border: 1px solid #282828; border-radius: 0.63vw; overflow: hidden;
2438
+ transition: border-color 0.2s;
2423
2439
  }
2424
- .ps-tryon-sr-fit-card.ps-fit-good { border-left: 3px solid #4ade80; }
2425
- .ps-tryon-sr-fit-card.ps-fit-tight { border-left: 3px solid #f59e0b; }
2426
- .ps-tryon-sr-fit-card.ps-fit-loose { border-left: 3px solid #60a5fa; }
2427
- .ps-tryon-sr-fit-card-top {
2440
+ .ps-tryon-sr-fc.ps-fit-good { border-left: 3px solid #4ade80; }
2441
+ .ps-tryon-sr-fc.ps-fit-tight { border-left: 3px solid #f59e0b; }
2442
+ .ps-tryon-sr-fc.ps-fit-loose { border-left: 3px solid #60a5fa; }
2443
+
2444
+ .ps-tryon-sr-fc-head {
2428
2445
  display: flex; align-items: center; justify-content: space-between;
2429
- padding: 0.52vw 0.83vw; background: #1a1b1a;
2430
- }
2431
- .ps-tryon-sr-fit-area { font-size: 0.83vw; font-weight: 600; color: #fff; }
2432
- .ps-tryon-sr-fit-card-bottom {
2433
- display: flex; gap: 1vw; padding: 0.52vw 0.83vw;
2446
+ padding: 0.57vw 0.83vw; background: #161616;
2434
2447
  }
2435
- .ps-tryon-sr-fit-val { flex: 1; }
2436
- .ps-tryon-sr-fit-val-label { font-size: 0.57vw; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.21vw; display: block; }
2437
- .ps-tryon-sr-fit-val-input-wrap { display: flex; align-items: center; gap: 0.26vw; }
2438
- .ps-tryon-sr-fit-val-text { font-size: 0.83vw; font-weight: 600; color: #ccc; }
2448
+ .ps-tryon-sr-fc-area { font-size: 0.83vw; font-weight: 700; color: #fff; }
2439
2449
 
2440
- .ps-tryon-sr-fit-input {
2441
- width: 4vw; padding: 0.31vw 0.42vw; border: 1.5px solid #444; border-radius: 0.36vw;
2442
- background: #0c0c0d; color: #fff; font-size: 0.83vw; font-weight: 600; font-family: inherit;
2443
- outline: none; text-align: center; -moz-appearance: textfield;
2450
+ .ps-tryon-sr-fc-badge {
2451
+ display: inline-flex; align-items: center; gap: 0.21vw; padding: 0.21vw 0.52vw;
2452
+ border-radius: 0.31vw; font-size: 0.63vw; font-weight: 700; white-space: nowrap;
2444
2453
  }
2445
- .ps-tryon-sr-fit-input::-webkit-outer-spin-button,
2446
- .ps-tryon-sr-fit-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
2447
- .ps-tryon-sr-fit-input:focus { border-color: #bb945c; background: #1a1b1a; }
2448
- .ps-tryon-sr-fit-unit { font-size: 0.68vw; color: #666; }
2454
+ .ps-tryon-sr-fc-badge.ps-fit-good { background: rgba(74,222,128,0.08); color: #4ade80; }
2455
+ .ps-tryon-sr-fc-badge.ps-fit-tight { background: rgba(245,158,11,0.08); color: #f59e0b; }
2456
+ .ps-tryon-sr-fc-badge.ps-fit-loose { background: rgba(96,165,250,0.08); color: #60a5fa; }
2449
2457
 
2450
- .ps-tryon-sr-fit-badge {
2451
- display: inline-flex; align-items: center; gap: 0.26vw; padding: 0.26vw 0.57vw;
2452
- border-radius: 0.36vw; font-size: 0.68vw; font-weight: 700; white-space: nowrap;
2458
+ .ps-tryon-sr-fc-body {
2459
+ display: flex; gap: 1.5vw; padding: 0.52vw 0.83vw 0.62vw;
2460
+ }
2461
+ .ps-tryon-sr-fc-col { flex: 1; }
2462
+ .ps-tryon-sr-fc-label { font-size: 0.52vw; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.15vw; }
2463
+ .ps-tryon-sr-fc-value { font-size: 0.88vw; font-weight: 600; color: #ccc; }
2464
+ .ps-tryon-sr-fc-edit { display: flex; align-items: center; gap: 0.26vw; }
2465
+ .ps-tryon-sr-fc-input {
2466
+ width: 4.2vw; padding: 0.26vw 0.42vw; border: 1.5px solid #444; border-radius: 0.36vw;
2467
+ background: #0c0c0d; color: #fff; font-size: 0.88vw; font-weight: 600; font-family: inherit;
2468
+ outline: none; text-align: center; -moz-appearance: textfield;
2469
+ transition: border-color 0.2s, background 0.2s;
2453
2470
  }
2454
- .ps-tryon-sr-fit-badge.ps-fit-good { background: rgba(74,222,128,0.1); color: #4ade80; }
2455
- .ps-tryon-sr-fit-badge.ps-fit-tight { background: rgba(245,158,11,0.1); color: #f59e0b; }
2456
- .ps-tryon-sr-fit-badge.ps-fit-loose { background: rgba(96,165,250,0.1); color: #60a5fa; }
2471
+ .ps-tryon-sr-fc-input::-webkit-outer-spin-button,
2472
+ .ps-tryon-sr-fc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
2473
+ .ps-tryon-sr-fc-input:focus { border-color: #bb945c; background: #1a1a1a; }
2474
+ .ps-tryon-sr-fc-unit { font-size: 0.63vw; color: #555; }
2457
2475
 
2458
2476
  /* Compare dropdown */
2459
2477
  .ps-tryon-sr-compare { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primestyleai/tryon",
3
- "version": "3.20.0",
3
+ "version": "4.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",