@primestyleai/tryon 5.10.143 → 5.10.169
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-GW10cktY.js → index-B1_VQgps.js} +53 -68
- package/dist/{index-GW10cktY.js.map → index-B1_VQgps.js.map} +1 -1
- package/dist/primestyle-tryon.js +2 -2
- package/dist/react/index.js +4908 -4585
- package/dist/react/index.js.map +1 -1
- package/dist/react/styles.d.ts +1 -1
- package/dist/sizing/fit-compute.d.ts +13 -4
- package/dist/storefront/primestyle-tryon.js +624 -130
- package/package.json +1 -1
|
@@ -2,10 +2,16 @@ import type { FitAreaInfo } from "../types";
|
|
|
2
2
|
import type { MeasurementLines } from "../pose-detect";
|
|
3
3
|
export type GranularFit = "good" | "tight" | "loose" | "a-bit-tight" | "a-bit-loose" | "too-tight" | "too-loose";
|
|
4
4
|
/** Compute granular fit label for a single measurement.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Tolerance buckets (in the chart's unit, half-inch / one-inch / two-inch):
|
|
6
|
+
* - "good" : within the chart range ± a tiny float tolerance
|
|
7
|
+
* - "a-bit-tight" : up to ½" (1.27 cm) past the upper edge
|
|
8
|
+
* - "tight" : ½"–2" past the upper edge
|
|
9
|
+
* - "too-tight" : > 2" past the upper edge
|
|
10
|
+
* Mirror buckets on the loose side. The previous logic let anything
|
|
11
|
+
* within ±1" of the range count as "perfect", so a 1.2" oversize
|
|
12
|
+
* showed as "a bit tight" — under the new thresholds it correctly
|
|
13
|
+
* reads as "tight". This also tightens the match-percent score, since
|
|
14
|
+
* fewer rows now fall in the good/a-bit buckets. */
|
|
9
15
|
export declare function computeFit(userValue: number, chartRange: string, unit?: "in" | "cm" | "mm"): GranularFit;
|
|
10
16
|
/**
|
|
11
17
|
* Build FitAreaInfo[] from matchDetails + optional pose coordinates.
|
|
@@ -29,6 +35,8 @@ export declare function buildFitInfo(matchDetails: Array<{
|
|
|
29
35
|
*/
|
|
30
36
|
export declare function buildSilhouetteContext(sizingResult: {
|
|
31
37
|
recommendedSize?: string;
|
|
38
|
+
recommendedLength?: string | null;
|
|
39
|
+
unit?: string;
|
|
32
40
|
matchDetails?: Array<{
|
|
33
41
|
measurement: string;
|
|
34
42
|
userValue: string;
|
|
@@ -55,6 +63,7 @@ selectedSizeOverride?: string,
|
|
|
55
63
|
* prime directive can include the model's frame. */
|
|
56
64
|
userHeight?: string, userWeight?: string): {
|
|
57
65
|
recommendedSize?: string;
|
|
66
|
+
recommendedSizeMeasurements?: string;
|
|
58
67
|
sizeChartSummary?: string;
|
|
59
68
|
userMeasurementsText?: string;
|
|
60
69
|
userHeight?: string;
|