@instockng/storefront-ui 1.0.14 → 1.0.16
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/CartItem.d.ts +1 -1
- package/dist/components/CartItem.d.ts.map +1 -1
- package/dist/components/OrderConfirmation.d.ts.map +1 -1
- package/dist/contexts/CartContext.d.ts +2 -2
- package/dist/contexts/CartContext.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index10.mjs +3 -3
- package/dist/index100.mjs +33 -5
- package/dist/index101.mjs +31 -33
- package/dist/index102.mjs +26 -29
- package/dist/index103.mjs +59 -26
- package/dist/index104.mjs +3 -61
- package/dist/index105.mjs +2 -3
- package/dist/index106.mjs +2 -2
- package/dist/index107.mjs +17 -2
- package/dist/index108.mjs +11 -15
- package/dist/index109.mjs +6 -13
- package/dist/index11.mjs +2 -2
- package/dist/index110.mjs +30 -6
- package/dist/index13.mjs +1 -1
- package/dist/index17.mjs +2 -2
- package/dist/index29.mjs +1 -1
- package/dist/index30.mjs +1 -1
- package/dist/index31.mjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index33.mjs +1433 -4
- package/dist/index34.mjs +2 -1433
- package/dist/index35.mjs +57 -2
- package/dist/index36.mjs +48 -54
- package/dist/index37.mjs +33 -51
- package/dist/index38.mjs +15 -33
- package/dist/index39.mjs +2260 -12
- package/dist/index4.mjs +37 -37
- package/dist/index40.mjs +19 -2259
- package/dist/index42.mjs +17 -17
- package/dist/index43.mjs +2 -2
- package/dist/index44.mjs +1 -1
- package/dist/index45.mjs +1 -1
- package/dist/index46.mjs +1 -1
- package/dist/index47.mjs +1 -1
- package/dist/index48.mjs +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.mjs +73 -21
- package/dist/index56.mjs +14 -74
- package/dist/index57.mjs +62 -14
- package/dist/index58.mjs +4 -62
- package/dist/index59.mjs +3 -4
- package/dist/index60.mjs +2 -4
- package/dist/index61.mjs +34 -2
- package/dist/index62.mjs +40 -31
- package/dist/index63.mjs +230 -38
- package/dist/index64.mjs +4 -233
- package/dist/index65.mjs +133 -5
- package/dist/index66.mjs +63 -129
- package/dist/index67.mjs +86 -67
- package/dist/index68.mjs +27 -85
- package/dist/index69.mjs +8 -28
- package/dist/index70.mjs +74 -8
- package/dist/index71.mjs +3 -74
- package/dist/index72.mjs +2 -4
- package/dist/index73.mjs +83 -2
- package/dist/index74.mjs +52 -81
- package/dist/index75.mjs +5 -53
- package/dist/index76.mjs +4 -5
- package/dist/index77.mjs +178 -4
- package/dist/index78.mjs +48 -174
- package/dist/index79.mjs +67 -51
- package/dist/index80.mjs +21 -69
- package/dist/index81.mjs +54 -19
- package/dist/index82.mjs +28 -55
- package/dist/index83.mjs +6 -28
- package/dist/index84.mjs +51 -6
- package/dist/index85.mjs +5 -51
- package/dist/index86.mjs +12 -6
- package/dist/index87.mjs +7 -12
- package/dist/index88.mjs +27 -6
- package/dist/index89.mjs +2 -28
- package/dist/index90.mjs +70 -2
- package/dist/index91.mjs +164 -67
- package/dist/index92.mjs +28 -164
- package/dist/index93.mjs +11 -13
- package/dist/index94.mjs +4 -7
- package/dist/index95.mjs +3 -30
- package/dist/index96.mjs +13 -11
- package/dist/index97.mjs +7 -4
- package/dist/index98.mjs +11 -3
- package/dist/index99.mjs +4 -11
- package/dist/test-utils/MockCartProvider.d.ts +1 -1
- package/dist/test-utils/MockCartProvider.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/components/CartItem.stories.tsx +1 -1
- package/src/components/CartItem.tsx +1 -1
- package/src/components/Checkout.stories.tsx +1 -1
- package/src/components/Checkout.tsx +2 -2
- package/src/components/OrderConfirmation.tsx +7 -2
- package/src/components/ProductGrid.tsx +1 -1
- package/src/components/ShoppingCart.stories.tsx +1 -1
- package/src/contexts/CartContext.tsx +2 -2
- package/src/index.ts +3 -2
- package/src/providers/StorefrontProvider.tsx +1 -1
- package/src/test-utils/MockCartProvider.tsx +1 -1
- package/dist/index111.mjs +0 -33
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Displays a single item in the shopping cart with quantity controls and remove button.
|
|
5
5
|
*/
|
|
6
|
-
import type { CartItem as CartItemType } from '@
|
|
6
|
+
import type { CartItem as CartItemType } from '@instockng/api-client';
|
|
7
7
|
export interface CartItemProps {
|
|
8
8
|
item: CartItemType;
|
|
9
9
|
/** Custom class name */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../src/components/CartItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CartItem.d.ts","sourceRoot":"","sources":["../../src/components/CartItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAItE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,QAAgB,GACjB,EAAE,aAAa,2CAoHf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderConfirmation.d.ts","sourceRoot":"","sources":["../../src/components/OrderConfirmation.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"OrderConfirmation.d.ts","sourceRoot":"","sources":["../../src/components/OrderConfirmation.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IAEd,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oCAAoC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,KAAK,EACL,SAAS,EACT,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAqC,EACrC,kBAAmD,EACnD,QAAgB,EAChB,MAAgB,GACjB,EAAE,sBAAsB,2CAuPxB"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Cart Context Provider
|
|
3
3
|
*
|
|
4
4
|
* Manages cart state with localStorage persistence and auto-creation.
|
|
5
|
-
* Uses @
|
|
5
|
+
* Uses @instockng/api-client hooks for all cart operations.
|
|
6
6
|
* Includes built-in ShoppingCart modal that can be opened/closed from anywhere.
|
|
7
7
|
*/
|
|
8
8
|
import { ReactNode } from 'react';
|
|
9
|
-
import { useUpdateCart, useCheckoutCart, type Cart } from '@
|
|
9
|
+
import { useUpdateCart, useCheckoutCart, type Cart } from '@instockng/api-client';
|
|
10
10
|
interface CartContextValue {
|
|
11
11
|
/** Current cart data */
|
|
12
12
|
cart: Cart | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartContext.d.ts","sourceRoot":"","sources":["../../src/contexts/Cart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MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,kDAAkD;IAClD,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,wBAAwB;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,kDAA+C,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,4BAA4B,EAAE,iBAAiB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;CACxG;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,2CAoPxG;AAED;;GAEG;AACH,wBAAgB,OAAO,qBAMtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export type { FormInputProps } from './components/ui/form-input';
|
|
|
30
30
|
export { FormSelect } from './components/ui/form-select';
|
|
31
31
|
export type { FormSelectProps } from './components/ui/form-select';
|
|
32
32
|
export { cn, formatCurrency, formatDate, formatDateTime, getStatusColor } from './lib/utils';
|
|
33
|
-
export * from '@
|
|
33
|
+
export * from '@instockng/api-client';
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;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E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7F,cAAc,uBAAuB,CAAC"}
|
package/dist/index10.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as a, jsx as e, Fragment as pe } from "react/jsx-runtime";
|
|
3
3
|
import { useState as N, useEffect as q, useMemo as re, useCallback as ve } from "react";
|
|
4
|
-
import { object as $, string as y, ValidationError as Ne } from "./
|
|
4
|
+
import { object as $, string as y, ValidationError as Ne } from "./index33.mjs";
|
|
5
5
|
import "./index18.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import { useGetDeliveryZones as ge } from "./index32.mjs";
|
|
@@ -12,8 +12,8 @@ import { FormSelect as se } from "./index16.mjs";
|
|
|
12
12
|
import { Button as L } from "./index11.mjs";
|
|
13
13
|
import { Loader2 as R, ChevronLeft as xe, ChevronRight as we, CheckCircle as Ce, Package as Pe, Mail as ke, Phone as Me, Zap as qe, Banknote as Ie, ChevronDown as Ze } from "lucide-react";
|
|
14
14
|
import { formatCurrency as k, cn as w } from "./index17.mjs";
|
|
15
|
-
import je from "./
|
|
16
|
-
import { usePaystackPayment as Se } from "./
|
|
15
|
+
import je from "./index34.mjs";
|
|
16
|
+
import { usePaystackPayment as Se } from "./index35.mjs";
|
|
17
17
|
const ze = (d) => d.replace(/\D/g, ""), Fe = $({
|
|
18
18
|
firstName: y().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
|
|
19
19
|
lastName: y().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
|
package/dist/index100.mjs
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import i from "./index107.mjs";
|
|
3
|
+
import m from "./index108.mjs";
|
|
4
|
+
import f from "./index63.mjs";
|
|
5
|
+
const h = (t, o, a = 3) => {
|
|
6
|
+
let r = 0;
|
|
7
|
+
const c = i(50, 250);
|
|
8
|
+
return m((s) => {
|
|
9
|
+
const n = s.loaded, e = s.lengthComputable ? s.total : void 0, l = n - r, d = c(l), p = n <= e;
|
|
10
|
+
r = n;
|
|
11
|
+
const u = {
|
|
12
|
+
loaded: n,
|
|
13
|
+
total: e,
|
|
14
|
+
progress: e ? n / e : void 0,
|
|
15
|
+
bytes: l,
|
|
16
|
+
rate: d || void 0,
|
|
17
|
+
estimated: d && e && p ? (e - n) / d : void 0,
|
|
18
|
+
event: s,
|
|
19
|
+
lengthComputable: e != null,
|
|
20
|
+
[o ? "download" : "upload"]: !0
|
|
21
|
+
};
|
|
22
|
+
t(u);
|
|
23
|
+
}, a);
|
|
24
|
+
}, v = (t, o) => {
|
|
25
|
+
const a = t != null;
|
|
26
|
+
return [(r) => o[0]({
|
|
27
|
+
lengthComputable: a,
|
|
28
|
+
total: t,
|
|
29
|
+
loaded: r
|
|
30
|
+
}), o[1]];
|
|
31
|
+
}, C = (t) => (...o) => f.asap(() => t(...o));
|
|
6
32
|
export {
|
|
7
|
-
|
|
33
|
+
C as asyncDecorator,
|
|
34
|
+
v as progressEventDecorator,
|
|
35
|
+
h as progressEventReducer
|
|
8
36
|
};
|
package/dist/index101.mjs
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
import m from "./
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
2
|
+
import n from "./index87.mjs";
|
|
3
|
+
import m from "./index63.mjs";
|
|
4
|
+
import c from "./index109.mjs";
|
|
5
|
+
import h from "./index110.mjs";
|
|
6
|
+
import w from "./index83.mjs";
|
|
7
|
+
import b from "./index66.mjs";
|
|
8
|
+
import C from "./index77.mjs";
|
|
9
|
+
import g from "./index80.mjs";
|
|
10
|
+
const E = (a) => {
|
|
11
|
+
const e = b({}, a);
|
|
12
|
+
let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
|
|
13
|
+
if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
|
|
14
|
+
"Authorization",
|
|
15
|
+
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
|
|
16
|
+
), m.isFormData(i)) {
|
|
17
|
+
if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
|
|
18
|
+
o.setContentType(void 0);
|
|
19
|
+
else if (m.isFunction(i.getHeaders)) {
|
|
20
|
+
const t = i.getHeaders(), u = ["content-type", "content-length"];
|
|
21
|
+
Object.entries(t).forEach(([l, p]) => {
|
|
22
|
+
u.includes(l.toLowerCase()) && o.set(l, p);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
|
|
27
|
+
const t = f && d && h.read(d);
|
|
28
|
+
t && o.set(f, t);
|
|
29
|
+
}
|
|
30
|
+
return e;
|
|
31
|
+
};
|
|
32
32
|
export {
|
|
33
|
-
|
|
34
|
-
v as progressEventDecorator,
|
|
35
|
-
h as progressEventReducer
|
|
33
|
+
E as default
|
|
36
34
|
};
|
package/dist/index102.mjs
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
import a from "./index69.mjs";
|
|
3
|
+
import s from "./index74.mjs";
|
|
4
|
+
import m from "./index63.mjs";
|
|
5
|
+
const h = (e, t) => {
|
|
6
|
+
const { length: l } = e = e ? e.filter(Boolean) : [];
|
|
7
|
+
if (t || l) {
|
|
8
|
+
let u = new AbortController(), f;
|
|
9
|
+
const n = function(r) {
|
|
10
|
+
if (!f) {
|
|
11
|
+
f = !0, i();
|
|
12
|
+
const o = r instanceof Error ? r : this.reason;
|
|
13
|
+
u.abort(o instanceof s ? o : new a(o instanceof Error ? o.message : o));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
let c = t && setTimeout(() => {
|
|
17
|
+
c = null, n(new s(`timeout ${t} of ms exceeded`, s.ETIMEDOUT));
|
|
18
|
+
}, t);
|
|
19
|
+
const i = () => {
|
|
20
|
+
e && (c && clearTimeout(c), c = null, e.forEach((r) => {
|
|
21
|
+
r.unsubscribe ? r.unsubscribe(n) : r.removeEventListener("abort", n);
|
|
22
|
+
}), e = null);
|
|
23
|
+
};
|
|
24
|
+
e.forEach((r) => r.addEventListener("abort", n));
|
|
25
|
+
const { signal: b } = u;
|
|
26
|
+
return b.unsubscribe = () => m.asap(i), b;
|
|
25
27
|
}
|
|
26
|
-
if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
|
|
27
|
-
const t = f && d && h.read(d);
|
|
28
|
-
t && o.set(f, t);
|
|
29
|
-
}
|
|
30
|
-
return e;
|
|
31
28
|
};
|
|
32
29
|
export {
|
|
33
|
-
|
|
30
|
+
h as default
|
|
34
31
|
};
|
package/dist/index103.mjs
CHANGED
|
@@ -1,31 +1,64 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, t);
|
|
19
|
-
const i = () => {
|
|
20
|
-
e && (c && clearTimeout(c), c = null, e.forEach((r) => {
|
|
21
|
-
r.unsubscribe ? r.unsubscribe(n) : r.removeEventListener("abort", n);
|
|
22
|
-
}), e = null);
|
|
23
|
-
};
|
|
24
|
-
e.forEach((r) => r.addEventListener("abort", n));
|
|
25
|
-
const { signal: b } = u;
|
|
26
|
-
return b.unsubscribe = () => m.asap(i), b;
|
|
2
|
+
const f = function* (e, t) {
|
|
3
|
+
let n = e.byteLength;
|
|
4
|
+
if (n < t) {
|
|
5
|
+
yield e;
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
let a = 0, r;
|
|
9
|
+
for (; a < n; )
|
|
10
|
+
r = a + t, yield e.slice(a, r), a = r;
|
|
11
|
+
}, w = async function* (e, t) {
|
|
12
|
+
for await (const n of b(e))
|
|
13
|
+
yield* f(n, t);
|
|
14
|
+
}, b = async function* (e) {
|
|
15
|
+
if (e[Symbol.asyncIterator]) {
|
|
16
|
+
yield* e;
|
|
17
|
+
return;
|
|
27
18
|
}
|
|
19
|
+
const t = e.getReader();
|
|
20
|
+
try {
|
|
21
|
+
for (; ; ) {
|
|
22
|
+
const { done: n, value: a } = await t.read();
|
|
23
|
+
if (n)
|
|
24
|
+
break;
|
|
25
|
+
yield a;
|
|
26
|
+
}
|
|
27
|
+
} finally {
|
|
28
|
+
await t.cancel();
|
|
29
|
+
}
|
|
30
|
+
}, h = (e, t, n, a) => {
|
|
31
|
+
const r = w(e, t);
|
|
32
|
+
let d = 0, o, c = (l) => {
|
|
33
|
+
o || (o = !0, a && a(l));
|
|
34
|
+
};
|
|
35
|
+
return new ReadableStream({
|
|
36
|
+
async pull(l) {
|
|
37
|
+
try {
|
|
38
|
+
const { done: i, value: y } = await r.next();
|
|
39
|
+
if (i) {
|
|
40
|
+
c(), l.close();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
let s = y.byteLength;
|
|
44
|
+
if (n) {
|
|
45
|
+
let u = d += s;
|
|
46
|
+
n(u);
|
|
47
|
+
}
|
|
48
|
+
l.enqueue(new Uint8Array(y));
|
|
49
|
+
} catch (i) {
|
|
50
|
+
throw c(i), i;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
cancel(l) {
|
|
54
|
+
return c(l), r.return();
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
highWaterMark: 2
|
|
58
|
+
});
|
|
28
59
|
};
|
|
29
60
|
export {
|
|
30
|
-
|
|
61
|
+
w as readBytes,
|
|
62
|
+
f as streamChunk,
|
|
63
|
+
h as trackStream
|
|
31
64
|
};
|
package/dist/index104.mjs
CHANGED
|
@@ -1,64 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (n < t) {
|
|
5
|
-
yield e;
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
let a = 0, r;
|
|
9
|
-
for (; a < n; )
|
|
10
|
-
r = a + t, yield e.slice(a, r), a = r;
|
|
11
|
-
}, w = async function* (e, t) {
|
|
12
|
-
for await (const n of b(e))
|
|
13
|
-
yield* f(n, t);
|
|
14
|
-
}, b = async function* (e) {
|
|
15
|
-
if (e[Symbol.asyncIterator]) {
|
|
16
|
-
yield* e;
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const t = e.getReader();
|
|
20
|
-
try {
|
|
21
|
-
for (; ; ) {
|
|
22
|
-
const { done: n, value: a } = await t.read();
|
|
23
|
-
if (n)
|
|
24
|
-
break;
|
|
25
|
-
yield a;
|
|
26
|
-
}
|
|
27
|
-
} finally {
|
|
28
|
-
await t.cancel();
|
|
29
|
-
}
|
|
30
|
-
}, h = (e, t, n, a) => {
|
|
31
|
-
const r = w(e, t);
|
|
32
|
-
let d = 0, o, c = (l) => {
|
|
33
|
-
o || (o = !0, a && a(l));
|
|
34
|
-
};
|
|
35
|
-
return new ReadableStream({
|
|
36
|
-
async pull(l) {
|
|
37
|
-
try {
|
|
38
|
-
const { done: i, value: y } = await r.next();
|
|
39
|
-
if (i) {
|
|
40
|
-
c(), l.close();
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
let s = y.byteLength;
|
|
44
|
-
if (n) {
|
|
45
|
-
let u = d += s;
|
|
46
|
-
n(u);
|
|
47
|
-
}
|
|
48
|
-
l.enqueue(new Uint8Array(y));
|
|
49
|
-
} catch (i) {
|
|
50
|
-
throw c(i), i;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
cancel(l) {
|
|
54
|
-
return c(l), r.return();
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
highWaterMark: 2
|
|
58
|
-
});
|
|
59
|
-
};
|
|
2
|
+
import a from "./index92.mjs";
|
|
3
|
+
const e = typeof URLSearchParams < "u" ? URLSearchParams : a;
|
|
60
4
|
export {
|
|
61
|
-
|
|
62
|
-
f as streamChunk,
|
|
63
|
-
h as trackStream
|
|
5
|
+
e as default
|
|
64
6
|
};
|
package/dist/index105.mjs
CHANGED
package/dist/index106.mjs
CHANGED
package/dist/index107.mjs
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
function y(t, n) {
|
|
3
|
+
t = t || 10;
|
|
4
|
+
const c = new Array(t), o = new Array(t);
|
|
5
|
+
let e = 0, r = 0, i;
|
|
6
|
+
return n = n !== void 0 ? n : 1e3, function(h) {
|
|
7
|
+
const d = Date.now(), a = o[r];
|
|
8
|
+
i || (i = d), c[e] = h, o[e] = d;
|
|
9
|
+
let f = r, u = 0;
|
|
10
|
+
for (; f !== e; )
|
|
11
|
+
u += c[f++], f = f % t;
|
|
12
|
+
if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
|
|
13
|
+
return;
|
|
14
|
+
const w = a && d - a;
|
|
15
|
+
return w ? Math.round(u * 1e3 / w) : void 0;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
3
18
|
export {
|
|
4
|
-
|
|
19
|
+
y as default
|
|
5
20
|
};
|
package/dist/index108.mjs
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
return n = n !== void 0 ? n : 1e3, function(h) {
|
|
7
|
-
const d = Date.now(), a = o[r];
|
|
8
|
-
i || (i = d), c[e] = h, o[e] = d;
|
|
9
|
-
let f = r, u = 0;
|
|
10
|
-
for (; f !== e; )
|
|
11
|
-
u += c[f++], f = f % t;
|
|
12
|
-
if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
|
|
13
|
-
return;
|
|
14
|
-
const w = a && d - a;
|
|
15
|
-
return w ? Math.round(u * 1e3 / w) : void 0;
|
|
2
|
+
function h(r, a) {
|
|
3
|
+
let s = 0, u = 1e3 / a, e, t;
|
|
4
|
+
const n = (l, o = Date.now()) => {
|
|
5
|
+
s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
|
|
16
6
|
};
|
|
7
|
+
return [(...l) => {
|
|
8
|
+
const o = Date.now(), i = o - s;
|
|
9
|
+
i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
|
|
10
|
+
t = null, n(e);
|
|
11
|
+
}, u - i)));
|
|
12
|
+
}, () => e && n(e)];
|
|
17
13
|
}
|
|
18
14
|
export {
|
|
19
|
-
|
|
15
|
+
h as default
|
|
20
16
|
};
|
package/dist/index109.mjs
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return [(...l) => {
|
|
8
|
-
const o = Date.now(), i = o - s;
|
|
9
|
-
i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
|
|
10
|
-
t = null, n(e);
|
|
11
|
-
}, u - i)));
|
|
12
|
-
}, () => e && n(e)];
|
|
13
|
-
}
|
|
2
|
+
import o from "./index87.mjs";
|
|
3
|
+
const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
|
|
4
|
+
new URL(o.origin),
|
|
5
|
+
o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
|
|
6
|
+
) : () => !0;
|
|
14
7
|
export {
|
|
15
|
-
|
|
8
|
+
n as default
|
|
16
9
|
};
|
package/dist/index11.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as c, jsx as u } from "react/jsx-runtime";
|
|
3
|
-
import { Root as v } from "./
|
|
4
|
-
import { cva as g } from "./
|
|
3
|
+
import { Root as v } from "./index36.mjs";
|
|
4
|
+
import { cva as g } from "./index37.mjs";
|
|
5
5
|
import { Loader2 as l } from "lucide-react";
|
|
6
6
|
import { cn as p } from "./index17.mjs";
|
|
7
7
|
const b = g(
|
package/dist/index110.mjs
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import r from "./index63.mjs";
|
|
3
|
+
import c from "./index87.mjs";
|
|
4
|
+
const p = c.hasStandardBrowserEnv ? (
|
|
5
|
+
// Standard browser envs support document.cookie
|
|
6
|
+
{
|
|
7
|
+
write(e, t, n, i, s, u) {
|
|
8
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
9
|
+
r.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), r.isString(i) && o.push("path=" + i), r.isString(s) && o.push("domain=" + s), u === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
10
|
+
},
|
|
11
|
+
read(e) {
|
|
12
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
13
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
14
|
+
},
|
|
15
|
+
remove(e) {
|
|
16
|
+
this.write(e, "", Date.now() - 864e5);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
) : (
|
|
20
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
21
|
+
{
|
|
22
|
+
write() {
|
|
23
|
+
},
|
|
24
|
+
read() {
|
|
25
|
+
return null;
|
|
26
|
+
},
|
|
27
|
+
remove() {
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
7
31
|
export {
|
|
8
|
-
|
|
32
|
+
p as default
|
|
9
33
|
};
|
package/dist/index13.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { cva as n } from "./
|
|
3
|
+
import { cva as n } from "./index37.mjs";
|
|
4
4
|
import { cn as a } from "./index17.mjs";
|
|
5
5
|
const i = n(
|
|
6
6
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
package/dist/index17.mjs
CHANGED
package/dist/index29.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useQueryClient as s, useMutation as i } from "@tanstack/react-query";
|
|
3
|
-
import { useQueryUnwrapped as o } from "./
|
|
3
|
+
import { useQueryUnwrapped as o } from "./index58.mjs";
|
|
4
4
|
import { queryKeys as r } from "./index26.mjs";
|
|
5
5
|
import { updateCart as c, createCart as l, applyDiscount as y, removeDiscount as m, addCartItem as C, updateCartItem as p, removeCartItem as q, checkoutCart as d, fetchCart as f } from "./index23.mjs";
|
|
6
6
|
function b(e, t) {
|
package/dist/index30.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMutation as t } from "@tanstack/react-query";
|
|
3
|
-
import { useQueryUnwrapped as u } from "./
|
|
3
|
+
import { useQueryUnwrapped as u } from "./index58.mjs";
|
|
4
4
|
import { queryKeys as n } from "./index26.mjs";
|
|
5
5
|
import { confirmOrder as i, fetchOrder as m } from "./index24.mjs";
|
|
6
6
|
function y(e, r, o) {
|
package/dist/index31.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useQueryUnwrapped as u } from "./
|
|
2
|
+
import { useQueryUnwrapped as u } from "./index58.mjs";
|
|
3
3
|
import { queryKeys as t } from "./index26.mjs";
|
|
4
4
|
import { fetchProductsByBrand as o, fetchProductBySlug as c } from "./index22.mjs";
|
|
5
5
|
function n(r, e) {
|
package/dist/index32.mjs
CHANGED