@instockng/storefront-ui 1.0.18 → 1.0.19
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/components/OrderConfirmation.d.ts +1 -1
- package/dist/components/OrderConfirmation.d.ts.map +1 -1
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/contexts/CartContext.d.ts +2 -2
- package/dist/contexts/CartContext.d.ts.map +1 -1
- package/dist/fetchers.d.ts +19 -0
- package/dist/fetchers.d.ts.map +1 -0
- package/dist/hooks/usePageTracking.d.ts +40 -0
- package/dist/hooks/usePageTracking.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +101 -92
- package/dist/index10.mjs +149 -624
- package/dist/index100.mjs +22 -33
- package/dist/index101.mjs +22 -30
- package/dist/index102.mjs +32 -27
- package/dist/index103.mjs +152 -57
- package/dist/index104.mjs +20 -3
- package/dist/index105.mjs +31 -2
- package/dist/index106.mjs +84 -2
- package/dist/index107.mjs +37 -16
- package/dist/index108.mjs +144 -12
- package/dist/index109.mjs +55 -6
- package/dist/index11.mjs +94 -56
- package/dist/index110.mjs +23 -30
- package/dist/index111.mjs +30 -0
- package/dist/index112.mjs +26 -0
- package/dist/index113.mjs +28 -0
- package/dist/index114.mjs +24 -0
- package/dist/index115.mjs +25 -0
- package/dist/index116.mjs +24 -0
- package/dist/index117.mjs +68 -0
- package/dist/index118.mjs +21 -0
- package/dist/index119.mjs +42 -0
- package/dist/index12.mjs +645 -62
- package/dist/index120.mjs +27 -0
- package/dist/index121.mjs +37 -0
- package/dist/index122.mjs +30 -0
- package/dist/index123.mjs +22 -0
- package/dist/index124.mjs +24 -0
- package/dist/index125.mjs +50 -0
- package/dist/index126.mjs +26 -0
- package/dist/index127.mjs +271 -0
- package/dist/index128.mjs +73 -0
- package/dist/index129.mjs +11 -0
- package/dist/index13.mjs +50 -14
- package/dist/index130.mjs +5 -0
- package/dist/index131.mjs +5 -0
- package/dist/index132.mjs +36 -0
- package/dist/index133.mjs +5 -0
- package/dist/index134.mjs +24 -0
- package/dist/index135.mjs +59 -0
- package/dist/index136.mjs +32 -0
- package/dist/index137.mjs +10 -0
- package/dist/index138.mjs +55 -0
- package/dist/index139.mjs +9 -0
- package/dist/index14.mjs +62 -115
- package/dist/index140.mjs +15 -0
- package/dist/index141.mjs +10 -0
- package/dist/index142.mjs +31 -0
- package/dist/index143.mjs +5 -0
- package/dist/index144.mjs +73 -0
- package/dist/index145.mjs +170 -0
- package/dist/index146.mjs +5 -0
- package/dist/index147.mjs +5 -0
- package/dist/index148.mjs +5 -0
- package/dist/index149.mjs +21 -0
- package/dist/index15.mjs +23 -41
- package/dist/index150.mjs +35 -0
- package/dist/index151.mjs +41 -0
- package/dist/index152.mjs +21 -0
- package/dist/index153.mjs +21 -0
- package/dist/index154.mjs +5 -0
- package/dist/index155.mjs +23 -0
- package/dist/index156.mjs +49 -0
- package/dist/index157.mjs +5 -0
- package/dist/index158.mjs +33 -0
- package/dist/index159.mjs +21 -0
- package/dist/index16.mjs +115 -42
- package/dist/index160.mjs +5 -0
- package/dist/index161.mjs +5 -0
- package/dist/index162.mjs +5 -0
- package/dist/index163.mjs +5 -0
- package/dist/index164.mjs +75 -0
- package/dist/index165.mjs +5 -0
- package/dist/index166.mjs +56 -0
- package/dist/index167.mjs +5 -0
- package/dist/index168.mjs +39 -0
- package/dist/index169.mjs +155 -0
- package/dist/index17.mjs +42 -42
- package/dist/index170.mjs +5 -0
- package/dist/index171.mjs +5 -0
- package/dist/index172.mjs +22 -0
- package/dist/index173.mjs +5 -0
- package/dist/index174.mjs +5 -0
- package/dist/index175.mjs +29 -0
- package/dist/index176.mjs +5 -0
- package/dist/index177.mjs +5 -0
- package/dist/index178.mjs +27 -0
- package/dist/index179.mjs +26 -0
- package/dist/index18.mjs +41 -31
- package/dist/index180.mjs +5 -0
- package/dist/index181.mjs +5 -0
- package/dist/index182.mjs +5 -0
- package/dist/index183.mjs +26 -0
- package/dist/index184.mjs +5 -0
- package/dist/index185.mjs +26 -0
- package/dist/index186.mjs +5 -0
- package/dist/index187.mjs +5 -0
- package/dist/index188.mjs +5 -0
- package/dist/index189.mjs +26 -0
- package/dist/index19.mjs +40 -7
- package/dist/index190.mjs +5 -0
- package/dist/index191.mjs +26 -0
- package/dist/index192.mjs +5 -0
- package/dist/index193.mjs +5 -0
- package/dist/index194.mjs +5 -0
- package/dist/index195.mjs +5 -0
- package/dist/index196.mjs +5 -0
- package/dist/index197.mjs +5 -0
- package/dist/index198.mjs +5 -0
- package/dist/index199.mjs +5 -0
- package/dist/index2.mjs +31 -12
- package/dist/index20.mjs +27 -17
- package/dist/index200.mjs +130 -0
- package/dist/index201.mjs +5 -0
- package/dist/index202.mjs +77 -0
- package/dist/index203.mjs +77 -0
- package/dist/index204.mjs +5 -0
- package/dist/index205.mjs +5 -0
- package/dist/index206.mjs +111 -0
- package/dist/index207.mjs +5 -0
- package/dist/index208.mjs +5 -0
- package/dist/index209.mjs +5 -0
- package/dist/index21.mjs +6 -29
- package/dist/index210.mjs +5 -0
- package/dist/index211.mjs +5 -0
- package/dist/index212.mjs +5 -0
- package/dist/index213.mjs +5 -0
- package/dist/index214.mjs +5 -0
- package/dist/index215.mjs +5 -0
- package/dist/index216.mjs +40 -0
- package/dist/index217.mjs +5 -0
- package/dist/index218.mjs +5 -0
- package/dist/index219.mjs +5 -0
- package/dist/index22.mjs +20 -18
- package/dist/index220.mjs +247 -0
- package/dist/index221.mjs +5 -0
- package/dist/index222.mjs +36 -0
- package/dist/index223.mjs +68 -0
- package/dist/index224.mjs +28 -0
- package/dist/index225.mjs +5 -0
- package/dist/index226.mjs +5 -0
- package/dist/index227.mjs +5 -0
- package/dist/index228.mjs +5 -0
- package/dist/index229.mjs +5 -0
- package/dist/index23.mjs +32 -87
- package/dist/index230.mjs +5 -0
- package/dist/index231.mjs +5 -0
- package/dist/index232.mjs +5 -0
- package/dist/index233.mjs +7 -0
- package/dist/index234.mjs +5 -0
- package/dist/index235.mjs +5 -0
- package/dist/index236.mjs +34 -0
- package/dist/index237.mjs +14 -0
- package/dist/index238.mjs +7 -0
- package/dist/index239.mjs +7 -0
- package/dist/index24.mjs +12 -12
- package/dist/index240.mjs +16 -0
- package/dist/index241.mjs +10 -0
- package/dist/index242.mjs +15 -0
- package/dist/index243.mjs +8 -0
- package/dist/index244.mjs +36 -0
- package/dist/index245.mjs +34 -0
- package/dist/index246.mjs +31 -0
- package/dist/index247.mjs +64 -0
- package/dist/index248.mjs +5 -0
- package/dist/index249.mjs +5 -0
- package/dist/index25.mjs +85 -8
- package/dist/index250.mjs +21 -0
- package/dist/index251.mjs +50 -0
- package/dist/index252.mjs +5 -0
- package/dist/index253.mjs +5 -0
- package/dist/index254.mjs +5 -0
- package/dist/index255.mjs +5 -0
- package/dist/index256.mjs +94 -0
- package/dist/index257.mjs +5 -0
- package/dist/index258.mjs +6 -0
- package/dist/index259.mjs +5 -0
- package/dist/index26.mjs +20 -97
- package/dist/index260.mjs +5 -0
- package/dist/index261.mjs +20 -0
- package/dist/index262.mjs +16 -0
- package/dist/index263.mjs +9 -0
- package/dist/index264.mjs +33 -0
- package/dist/index265.mjs +5 -0
- package/dist/index266.mjs +5 -0
- package/dist/index267.mjs +5 -0
- package/dist/index27.mjs +11 -18
- package/dist/index28.mjs +11 -65
- package/dist/index29.mjs +94 -89
- package/dist/index3.mjs +117 -97
- package/dist/index30.mjs +20 -19
- package/dist/index31.mjs +65 -19
- package/dist/index32.mjs +93 -8
- package/dist/index33.mjs +18 -1432
- package/dist/index34.mjs +19 -2
- package/dist/index35.mjs +10 -56
- package/dist/index36.mjs +9 -49
- package/dist/index37.mjs +103 -33
- package/dist/index38.mjs +24 -14
- package/dist/index39.mjs +1411 -2241
- package/dist/index4.mjs +82 -197
- package/dist/index40.mjs +2 -36
- package/dist/index41.mjs +56 -43
- package/dist/index42.mjs +50 -98
- package/dist/index43.mjs +33 -97
- package/dist/index44.mjs +13 -79
- package/dist/index45.mjs +2255 -69
- package/dist/index46.mjs +36 -95
- package/dist/index47.mjs +43 -80
- package/dist/index48.mjs +99 -79
- package/dist/index49.mjs +93 -15
- package/dist/index5.mjs +15 -108
- package/dist/index50.mjs +77 -14
- package/dist/index51.mjs +58 -44
- package/dist/index52.mjs +63 -93
- package/dist/index53.mjs +51 -99
- package/dist/index54.mjs +78 -4
- package/dist/index55.mjs +18 -22
- package/dist/index56.mjs +17 -74
- package/dist/index57.mjs +63 -15
- package/dist/index58.mjs +121 -59
- package/dist/index59.mjs +129 -34
- package/dist/index6.mjs +190 -73
- package/dist/index60.mjs +22 -41
- package/dist/index61.mjs +148 -230
- package/dist/index62.mjs +2 -6
- package/dist/index63.mjs +21 -132
- package/dist/index64.mjs +73 -66
- package/dist/index65.mjs +14 -86
- package/dist/index66.mjs +59 -25
- package/dist/index67.mjs +4 -8
- package/dist/index68.mjs +2 -75
- package/dist/index69.mjs +5 -3
- package/dist/index7.mjs +97 -85
- package/dist/index70.mjs +1134 -2
- package/dist/index71.mjs +19 -82
- package/dist/index72.mjs +54 -53
- package/dist/index73.mjs +32 -5
- package/dist/index74.mjs +2 -5
- package/dist/index75.mjs +2 -179
- package/dist/index76.mjs +230 -48
- package/dist/index77.mjs +6 -69
- package/dist/index78.mjs +133 -3
- package/dist/index79.mjs +68 -2
- package/dist/index8.mjs +78 -162
- package/dist/index80.mjs +85 -19
- package/dist/index81.mjs +26 -53
- package/dist/index82.mjs +8 -28
- package/dist/index83.mjs +74 -6
- package/dist/index84.mjs +3 -51
- package/dist/index85.mjs +2 -6
- package/dist/index86.mjs +81 -10
- package/dist/index87.mjs +53 -6
- package/dist/index88.mjs +5 -27
- package/dist/index89.mjs +5 -2
- package/dist/index9.mjs +90 -90
- package/dist/index90.mjs +175 -66
- package/dist/index91.mjs +49 -163
- package/dist/index92.mjs +68 -30
- package/dist/index93.mjs +34 -11
- package/dist/index94.mjs +42 -3
- package/dist/index95.mjs +2 -4
- package/dist/index96.mjs +28 -13
- package/dist/index97.mjs +18 -7
- package/dist/index98.mjs +214 -11
- package/dist/index99.mjs +179 -4
- package/dist/providers/MetaPixelProvider.d.ts +98 -0
- package/dist/providers/MetaPixelProvider.d.ts.map +1 -0
- package/dist/providers/StorefrontProvider.d.ts +1 -0
- package/dist/providers/StorefrontProvider.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -4
- package/src/components/OrderConfirmation.tsx +0 -2
- package/src/components/ShoppingCart.tsx +12 -1
- package/src/contexts/CartContext.tsx +30 -5
- package/src/fetchers.ts +33 -0
- package/src/hooks/usePageTracking.ts +72 -0
- package/src/index.ts +5 -0
- package/src/providers/MetaPixelProvider.tsx +236 -0
- package/src/providers/StorefrontProvider.tsx +29 -3
package/dist/index8.mjs
CHANGED
|
@@ -1,167 +1,83 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
continueShoppingButtonClassName: L,
|
|
22
|
-
disableCheckout: z = !1,
|
|
23
|
-
emptyMessage: I = "Your cart is empty"
|
|
2
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import "./index20.mjs";
|
|
4
|
+
import "@tanstack/react-query";
|
|
5
|
+
import { useGetProducts as C } from "./index34.mjs";
|
|
6
|
+
import { ProductCard as k } from "./index7.mjs";
|
|
7
|
+
import { Loader2 as j, Package as d } from "lucide-react";
|
|
8
|
+
import { cn as P } from "./index19.mjs";
|
|
9
|
+
function q({
|
|
10
|
+
brandId: o,
|
|
11
|
+
onAddToCart: l,
|
|
12
|
+
onProductClick: t,
|
|
13
|
+
columns: n = 3,
|
|
14
|
+
showStock: m = !0,
|
|
15
|
+
className: g,
|
|
16
|
+
cardClassName: p,
|
|
17
|
+
showLoading: u = !0,
|
|
18
|
+
emptyMessage: x = "No products available at the moment.",
|
|
19
|
+
errorMessage: h = "Failed to load products. Please try again later.",
|
|
20
|
+
loadingVariantId: f
|
|
24
21
|
}) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
] }) }),
|
|
84
|
-
!i && !m && (!t || !t.items || t.items.length === 0) && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
85
|
-
/* @__PURE__ */ e(f, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
86
|
-
/* @__PURE__ */ e("p", { className: "text-gray-600", children: I })
|
|
87
|
-
] }) }),
|
|
88
|
-
!i && !m && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(N, { children: [
|
|
89
|
-
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: [
|
|
90
|
-
/* @__PURE__ */ e("div", { className: "space-y-4", children: t.items.map((r, h) => /* @__PURE__ */ a("div", { children: [
|
|
91
|
-
/* @__PURE__ */ e(
|
|
92
|
-
B,
|
|
93
|
-
{
|
|
94
|
-
item: r
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
h < t.items.length - 1 && /* @__PURE__ */ e("hr", { className: "border-gray-200 mt-2" })
|
|
98
|
-
] }, r.id)) }),
|
|
99
|
-
j && /* @__PURE__ */ e("div", { className: "mt-6", children: /* @__PURE__ */ e(T, {}) })
|
|
100
|
-
] }),
|
|
101
|
-
/* @__PURE__ */ a("div", { className: "border-t border-gray-300 bg-white", children: [
|
|
102
|
-
/* @__PURE__ */ a("div", { className: " text-base", children: [
|
|
103
|
-
/* @__PURE__ */ a("div", { className: "p-4 space-y-2", children: [
|
|
104
|
-
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
105
|
-
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
106
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: n(D) })
|
|
107
|
-
] }),
|
|
108
|
-
p > 0 && /* @__PURE__ */ a("div", { className: "flex justify-between text-green-600", children: [
|
|
109
|
-
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
110
|
-
/* @__PURE__ */ a("span", { className: "font-semibold", children: [
|
|
111
|
-
"-",
|
|
112
|
-
n(p)
|
|
113
|
-
] })
|
|
114
|
-
] }),
|
|
115
|
-
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
116
|
-
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Shipping" }),
|
|
117
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: t.pricing && t.deliveryZone ? n(t.pricing.deliveryCharge) : "-" })
|
|
118
|
-
] })
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ a("div", { className: "flex justify-between p-4 border-t border-gray-300 text-lg", children: [
|
|
121
|
-
/* @__PURE__ */ e("span", { className: "font-bold", children: "Total" }),
|
|
122
|
-
/* @__PURE__ */ e("span", { className: "font-bold", children: n(t.pricing.total) })
|
|
123
|
-
] })
|
|
124
|
-
] }),
|
|
125
|
-
/* @__PURE__ */ a("div", { className: "p-4 space-y-2", children: [
|
|
126
|
-
/* @__PURE__ */ a(
|
|
127
|
-
v,
|
|
128
|
-
{
|
|
129
|
-
onClick: F,
|
|
130
|
-
disabled: z || t.items.length === 0,
|
|
131
|
-
className: c("w-full bg-accent-500 text-white hover:bg-accent-600", E),
|
|
132
|
-
size: "lg",
|
|
133
|
-
children: [
|
|
134
|
-
/* @__PURE__ */ e(f, { className: "h-5 w-5" }),
|
|
135
|
-
k
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
v,
|
|
141
|
-
{
|
|
142
|
-
onClick: P,
|
|
143
|
-
variant: "outline",
|
|
144
|
-
className: c("w-full border-gray-300 text-gray-600 hover:bg-gray-100", L),
|
|
145
|
-
size: "lg",
|
|
146
|
-
children: C
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
] })
|
|
150
|
-
] })
|
|
151
|
-
] })
|
|
152
|
-
] })
|
|
153
|
-
}
|
|
154
|
-
),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
-
X,
|
|
157
|
-
{
|
|
158
|
-
isOpen: S,
|
|
159
|
-
onSuccess: () => l(),
|
|
160
|
-
onClose: () => u(!1)
|
|
161
|
-
}
|
|
162
|
-
)
|
|
163
|
-
] });
|
|
22
|
+
const { data: N, isLoading: v, error: y } = C(o);
|
|
23
|
+
if (v && u)
|
|
24
|
+
return /* @__PURE__ */ e("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
25
|
+
/* @__PURE__ */ e(j, { className: "mx-auto mb-4 h-12 w-12 animate-spin text-blue-600" }),
|
|
26
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: "Loading products..." })
|
|
27
|
+
] }) });
|
|
28
|
+
if (y)
|
|
29
|
+
return /* @__PURE__ */ e("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
30
|
+
/* @__PURE__ */ e(d, { className: "mx-auto mb-4 h-12 w-12 text-red-600" }),
|
|
31
|
+
/* @__PURE__ */ e("p", { className: "text-red-600", children: h })
|
|
32
|
+
] }) });
|
|
33
|
+
const a = N || [];
|
|
34
|
+
return a.length === 0 ? /* @__PURE__ */ e("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ s("div", { className: "text-center", children: [
|
|
35
|
+
/* @__PURE__ */ e(d, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
36
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: x })
|
|
37
|
+
] }) }) : /* @__PURE__ */ e(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: P(
|
|
41
|
+
"grid gap-6",
|
|
42
|
+
{
|
|
43
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
44
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
45
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
|
|
46
|
+
}[n],
|
|
47
|
+
g
|
|
48
|
+
),
|
|
49
|
+
children: a.map((i) => {
|
|
50
|
+
const c = {
|
|
51
|
+
id: i.id,
|
|
52
|
+
name: i.name,
|
|
53
|
+
description: i.description || void 0,
|
|
54
|
+
imageUrl: i.thumbnailUrl || void 0,
|
|
55
|
+
brand: void 0,
|
|
56
|
+
// Brand info not included in product response
|
|
57
|
+
variants: i.variants.map((r) => ({
|
|
58
|
+
id: r.id,
|
|
59
|
+
name: r.name || r.sku,
|
|
60
|
+
price: typeof r.price == "string" ? parseFloat(r.price) : r.price,
|
|
61
|
+
sku: r.sku,
|
|
62
|
+
stock: r.stock || void 0
|
|
63
|
+
}))
|
|
64
|
+
}, b = i.variants.some((r) => r.id === f);
|
|
65
|
+
return /* @__PURE__ */ e(
|
|
66
|
+
k,
|
|
67
|
+
{
|
|
68
|
+
product: c,
|
|
69
|
+
onAddToCart: l,
|
|
70
|
+
onClick: t ? () => t(c) : void 0,
|
|
71
|
+
showStock: m,
|
|
72
|
+
className: p,
|
|
73
|
+
isAddingToCart: b
|
|
74
|
+
},
|
|
75
|
+
i.id
|
|
76
|
+
);
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
);
|
|
164
80
|
}
|
|
165
81
|
export {
|
|
166
|
-
|
|
82
|
+
q as ProductGrid
|
|
167
83
|
};
|
package/dist/index80.mjs
CHANGED
|
@@ -1,24 +1,90 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import t from "./index76.mjs";
|
|
3
|
+
import c from "./index87.mjs";
|
|
4
|
+
import u from "./index139.mjs";
|
|
5
|
+
import S from "./index86.mjs";
|
|
6
|
+
import h from "./index140.mjs";
|
|
7
|
+
import a from "./index141.mjs";
|
|
8
|
+
import O from "./index81.mjs";
|
|
9
|
+
function y(i, r, e) {
|
|
10
|
+
if (t.isString(i))
|
|
11
|
+
try {
|
|
12
|
+
return (r || JSON.parse)(i), t.trim(i);
|
|
13
|
+
} catch (n) {
|
|
14
|
+
if (n.name !== "SyntaxError")
|
|
15
|
+
throw n;
|
|
16
|
+
}
|
|
17
|
+
return (e || JSON.stringify)(i);
|
|
6
18
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const l = {
|
|
20
|
+
transitional: u,
|
|
21
|
+
adapter: ["xhr", "http", "fetch"],
|
|
22
|
+
transformRequest: [function(r, e) {
|
|
23
|
+
const n = e.getContentType() || "", s = n.indexOf("application/json") > -1, f = t.isObject(r);
|
|
24
|
+
if (f && t.isHTMLForm(r) && (r = new FormData(r)), t.isFormData(r))
|
|
25
|
+
return s ? JSON.stringify(O(r)) : r;
|
|
26
|
+
if (t.isArrayBuffer(r) || t.isBuffer(r) || t.isStream(r) || t.isFile(r) || t.isBlob(r) || t.isReadableStream(r))
|
|
27
|
+
return r;
|
|
28
|
+
if (t.isArrayBufferView(r))
|
|
29
|
+
return r.buffer;
|
|
30
|
+
if (t.isURLSearchParams(r))
|
|
31
|
+
return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), r.toString();
|
|
32
|
+
let o;
|
|
33
|
+
if (f) {
|
|
34
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
35
|
+
return h(r, this.formSerializer).toString();
|
|
36
|
+
if ((o = t.isFileList(r)) || n.indexOf("multipart/form-data") > -1) {
|
|
37
|
+
const p = this.env && this.env.FormData;
|
|
38
|
+
return S(
|
|
39
|
+
o ? { "files[]": r } : r,
|
|
40
|
+
p && new p(),
|
|
41
|
+
this.formSerializer
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return f || s ? (e.setContentType("application/json", !1), y(r)) : r;
|
|
46
|
+
}],
|
|
47
|
+
transformResponse: [function(r) {
|
|
48
|
+
const e = this.transitional || l.transitional, n = e && e.forcedJSONParsing, s = this.responseType === "json";
|
|
49
|
+
if (t.isResponse(r) || t.isReadableStream(r))
|
|
50
|
+
return r;
|
|
51
|
+
if (r && t.isString(r) && (n && !this.responseType || s)) {
|
|
52
|
+
const m = !(e && e.silentJSONParsing) && s;
|
|
53
|
+
try {
|
|
54
|
+
return JSON.parse(r, this.parseReviver);
|
|
55
|
+
} catch (o) {
|
|
56
|
+
if (m)
|
|
57
|
+
throw o.name === "SyntaxError" ? c.from(o, c.ERR_BAD_RESPONSE, this, null, this.response) : o;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return r;
|
|
61
|
+
}],
|
|
62
|
+
/**
|
|
63
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
64
|
+
* timeout is not created.
|
|
65
|
+
*/
|
|
66
|
+
timeout: 0,
|
|
67
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
68
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
69
|
+
maxContentLength: -1,
|
|
70
|
+
maxBodyLength: -1,
|
|
71
|
+
env: {
|
|
72
|
+
FormData: a.classes.FormData,
|
|
73
|
+
Blob: a.classes.Blob
|
|
74
|
+
},
|
|
75
|
+
validateStatus: function(r) {
|
|
76
|
+
return r >= 200 && r < 300;
|
|
77
|
+
},
|
|
78
|
+
headers: {
|
|
79
|
+
common: {
|
|
80
|
+
Accept: "application/json, text/plain, */*",
|
|
81
|
+
"Content-Type": void 0
|
|
82
|
+
}
|
|
19
83
|
}
|
|
20
|
-
|
|
21
|
-
|
|
84
|
+
};
|
|
85
|
+
t.forEach(["delete", "get", "head", "post", "put", "patch"], (i) => {
|
|
86
|
+
l.headers[i] = {};
|
|
87
|
+
});
|
|
22
88
|
export {
|
|
23
|
-
|
|
89
|
+
l as default
|
|
24
90
|
};
|
package/dist/index81.mjs
CHANGED
|
@@ -1,59 +1,32 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}), this.handlers.length - 1;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Remove an interceptor from the stack
|
|
25
|
-
*
|
|
26
|
-
* @param {Number} id The ID that was returned by `use`
|
|
27
|
-
*
|
|
28
|
-
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
29
|
-
*/
|
|
30
|
-
eject(s) {
|
|
31
|
-
this.handlers[s] && (this.handlers[s] = null);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Clear all interceptors from the stack
|
|
35
|
-
*
|
|
36
|
-
* @returns {void}
|
|
37
|
-
*/
|
|
38
|
-
clear() {
|
|
39
|
-
this.handlers && (this.handlers = []);
|
|
2
|
+
import u from "./index76.mjs";
|
|
3
|
+
function f(e) {
|
|
4
|
+
return u.matchAll(/\w+|\[(\w*)]/g, e).map((o) => o[0] === "[]" ? "" : o[1] || o[0]);
|
|
5
|
+
}
|
|
6
|
+
function y(e) {
|
|
7
|
+
const o = {}, r = Object.keys(e);
|
|
8
|
+
let i;
|
|
9
|
+
const n = r.length;
|
|
10
|
+
let c;
|
|
11
|
+
for (i = 0; i < n; i++)
|
|
12
|
+
c = r[i], o[c] = e[c];
|
|
13
|
+
return o;
|
|
14
|
+
}
|
|
15
|
+
function m(e) {
|
|
16
|
+
function o(r, i, n, c) {
|
|
17
|
+
let s = r[c++];
|
|
18
|
+
if (s === "__proto__") return !0;
|
|
19
|
+
const t = Number.isFinite(+s), l = c >= r.length;
|
|
20
|
+
return s = !s && u.isArray(n) ? n.length : s, l ? (u.hasOwnProp(n, s) ? n[s] = [n[s], i] : n[s] = i, !t) : ((!n[s] || !u.isObject(n[s])) && (n[s] = []), o(r, i, n[s], c) && u.isArray(n[s]) && (n[s] = y(n[s])), !t);
|
|
40
21
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
* @param {Function} fn The function to call for each interceptor
|
|
48
|
-
*
|
|
49
|
-
* @returns {void}
|
|
50
|
-
*/
|
|
51
|
-
forEach(s) {
|
|
52
|
-
n.forEach(this.handlers, function(r) {
|
|
53
|
-
r !== null && s(r);
|
|
54
|
-
});
|
|
22
|
+
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
23
|
+
const r = {};
|
|
24
|
+
return u.forEachEntry(e, (i, n) => {
|
|
25
|
+
o(f(i), n, r, 0);
|
|
26
|
+
}), r;
|
|
55
27
|
}
|
|
28
|
+
return null;
|
|
56
29
|
}
|
|
57
30
|
export {
|
|
58
|
-
|
|
31
|
+
m as default
|
|
59
32
|
};
|
package/dist/index82.mjs
CHANGED
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import r from "./
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import a from "./index75.mjs";
|
|
7
|
-
import o from "./index76.mjs";
|
|
8
|
-
function d(e) {
|
|
9
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
10
|
-
throw new m(null, e);
|
|
11
|
-
}
|
|
12
|
-
function q(e) {
|
|
13
|
-
return d(e), e.headers = a.from(e.headers), e.data = r.call(
|
|
14
|
-
e,
|
|
15
|
-
e.transformRequest
|
|
16
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), o.getAdapter(e.adapter || l.adapter, e)(e).then(function(t) {
|
|
17
|
-
return d(e), t.data = r.call(
|
|
18
|
-
e,
|
|
19
|
-
e.transformResponse,
|
|
20
|
-
t
|
|
21
|
-
), t.headers = a.from(t.headers), t;
|
|
22
|
-
}, function(t) {
|
|
23
|
-
return p(t) || (d(e), t && t.response && (t.response.data = r.call(
|
|
24
|
-
e,
|
|
25
|
-
e.transformResponse,
|
|
26
|
-
t.response
|
|
27
|
-
), t.response.headers = a.from(t.response.headers))), Promise.reject(t);
|
|
28
|
-
});
|
|
2
|
+
import r from "./index87.mjs";
|
|
3
|
+
import i from "./index76.mjs";
|
|
4
|
+
function l(o, t, e) {
|
|
5
|
+
r.call(this, o ?? "canceled", r.ERR_CANCELED, t, e), this.name = "CanceledError";
|
|
29
6
|
}
|
|
7
|
+
i.inherits(l, r, {
|
|
8
|
+
__CANCEL__: !0
|
|
9
|
+
});
|
|
30
10
|
export {
|
|
31
|
-
|
|
11
|
+
l as default
|
|
32
12
|
};
|
package/dist/index83.mjs
CHANGED
|
@@ -1,10 +1,78 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import u from "./index82.mjs";
|
|
3
|
+
class c {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
if (typeof e != "function")
|
|
6
|
+
throw new TypeError("executor must be a function.");
|
|
7
|
+
let t;
|
|
8
|
+
this.promise = new Promise(function(r) {
|
|
9
|
+
t = r;
|
|
10
|
+
});
|
|
11
|
+
const s = this;
|
|
12
|
+
this.promise.then((n) => {
|
|
13
|
+
if (!s._listeners) return;
|
|
14
|
+
let r = s._listeners.length;
|
|
15
|
+
for (; r-- > 0; )
|
|
16
|
+
s._listeners[r](n);
|
|
17
|
+
s._listeners = null;
|
|
18
|
+
}), this.promise.then = (n) => {
|
|
19
|
+
let r;
|
|
20
|
+
const o = new Promise((i) => {
|
|
21
|
+
s.subscribe(i), r = i;
|
|
22
|
+
}).then(n);
|
|
23
|
+
return o.cancel = function() {
|
|
24
|
+
s.unsubscribe(r);
|
|
25
|
+
}, o;
|
|
26
|
+
}, e(function(r, o, i) {
|
|
27
|
+
s.reason || (s.reason = new u(r, o, i), t(s.reason));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
32
|
+
*/
|
|
33
|
+
throwIfRequested() {
|
|
34
|
+
if (this.reason)
|
|
35
|
+
throw this.reason;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Subscribe to the cancel signal
|
|
39
|
+
*/
|
|
40
|
+
subscribe(e) {
|
|
41
|
+
if (this.reason) {
|
|
42
|
+
e(this.reason);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Unsubscribe from the cancel signal
|
|
49
|
+
*/
|
|
50
|
+
unsubscribe(e) {
|
|
51
|
+
if (!this._listeners)
|
|
52
|
+
return;
|
|
53
|
+
const t = this._listeners.indexOf(e);
|
|
54
|
+
t !== -1 && this._listeners.splice(t, 1);
|
|
55
|
+
}
|
|
56
|
+
toAbortSignal() {
|
|
57
|
+
const e = new AbortController(), t = (s) => {
|
|
58
|
+
e.abort(s);
|
|
59
|
+
};
|
|
60
|
+
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
64
|
+
* cancels the `CancelToken`.
|
|
65
|
+
*/
|
|
66
|
+
static source() {
|
|
67
|
+
let e;
|
|
68
|
+
return {
|
|
69
|
+
token: new c(function(n) {
|
|
70
|
+
e = n;
|
|
71
|
+
}),
|
|
72
|
+
cancel: e
|
|
73
|
+
};
|
|
74
|
+
}
|
|
7
75
|
}
|
|
8
76
|
export {
|
|
9
|
-
|
|
77
|
+
c as default
|
|
10
78
|
};
|
package/dist/index84.mjs
CHANGED
|
@@ -1,55 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const l = {};
|
|
5
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
|
|
6
|
-
l[n] = function(o) {
|
|
7
|
-
return typeof o === n || "a" + (t < 1 ? "n " : " ") + n;
|
|
8
|
-
};
|
|
9
|
-
});
|
|
10
|
-
const f = {};
|
|
11
|
-
l.transitional = function(t, i, o) {
|
|
12
|
-
function a(r, e) {
|
|
13
|
-
return "[Axios v" + w + "] Transitional option '" + r + "'" + e + (o ? ". " + o : "");
|
|
14
|
-
}
|
|
15
|
-
return (r, e, u) => {
|
|
16
|
-
if (t === !1)
|
|
17
|
-
throw new s(
|
|
18
|
-
a(e, " has been removed" + (i ? " in " + i : "")),
|
|
19
|
-
s.ERR_DEPRECATED
|
|
20
|
-
);
|
|
21
|
-
return i && !f[e] && (f[e] = !0, console.warn(
|
|
22
|
-
a(
|
|
23
|
-
e,
|
|
24
|
-
" has been deprecated since v" + i + " and will be removed in the near future"
|
|
25
|
-
)
|
|
26
|
-
)), t ? t(r, e, u) : !0;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
l.spelling = function(t) {
|
|
30
|
-
return (i, o) => (console.warn(`${o} is likely a misspelling of ${t}`), !0);
|
|
31
|
-
};
|
|
32
|
-
function b(n, t, i) {
|
|
33
|
-
if (typeof n != "object")
|
|
34
|
-
throw new s("options must be an object", s.ERR_BAD_OPTION_VALUE);
|
|
35
|
-
const o = Object.keys(n);
|
|
36
|
-
let a = o.length;
|
|
37
|
-
for (; a-- > 0; ) {
|
|
38
|
-
const r = o[a], e = t[r];
|
|
39
|
-
if (e) {
|
|
40
|
-
const u = n[r], c = u === void 0 || e(u, r, n);
|
|
41
|
-
if (c !== !0)
|
|
42
|
-
throw new s("option " + r + " must be " + c, s.ERR_BAD_OPTION_VALUE);
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (i !== !0)
|
|
46
|
-
throw new s("Unknown option " + r, s.ERR_BAD_OPTION);
|
|
47
|
-
}
|
|
2
|
+
function t(n) {
|
|
3
|
+
return !!(n && n.__CANCEL__);
|
|
48
4
|
}
|
|
49
|
-
const m = {
|
|
50
|
-
assertOptions: b,
|
|
51
|
-
validators: l
|
|
52
|
-
};
|
|
53
5
|
export {
|
|
54
|
-
|
|
6
|
+
t as default
|
|
55
7
|
};
|