@instockng/storefront-ui 1.0.82 → 1.0.83
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/ShoppingCart.d.ts.map +1 -1
- package/dist/index14.mjs +67 -67
- package/dist/index166.mjs +1 -1
- package/dist/index167.mjs +1 -1
- package/dist/index169.mjs +2 -2
- package/dist/index170.mjs +1 -1
- package/dist/index175.mjs +2 -2
- package/dist/index177.mjs +1 -1
- package/dist/index179.mjs +2 -2
- package/dist/index180.mjs +5 -5
- package/dist/index183.mjs +1 -1
- package/dist/index186.mjs +1 -1
- package/dist/index189.mjs +1 -1
- package/dist/index190.mjs +1 -1
- package/dist/index194.mjs +1 -1
- package/dist/index196.mjs +1 -1
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +2 -108
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +108 -2
- package/dist/index236.mjs +2 -2
- package/dist/index237.mjs +2 -2
- package/dist/index238.mjs +243 -36
- package/dist/index239.mjs +2 -2
- package/dist/index240.mjs +32 -243
- package/dist/index241.mjs +65 -2
- package/dist/index242.mjs +16 -24
- package/dist/index243.mjs +2 -65
- package/dist/index244.mjs +2 -25
- package/dist/index245.mjs +37 -2
- package/dist/index247.mjs +2 -2
- package/dist/index248.mjs +2 -2
- package/dist/index249.mjs +2 -2
- package/dist/index255.mjs +1 -1
- package/dist/index266.mjs +2 -2
- package/dist/index267.mjs +2 -18
- package/dist/index268.mjs +2 -47
- package/dist/index269.mjs +2 -2
- package/dist/index270.mjs +91 -2
- package/dist/index271.mjs +2 -2
- package/dist/index272.mjs +18 -2
- package/dist/index273.mjs +43 -87
- package/dist/index275.mjs +2 -2
- package/dist/index277.mjs +2 -2
- package/dist/index41.mjs +2 -2
- package/dist/index43.mjs +2 -2
- package/dist/index50.mjs +1 -1
- package/dist/index71.mjs +21 -20
- package/dist/index72.mjs +150 -21
- package/dist/index73.mjs +23 -2
- package/dist/index74.mjs +2 -153
- package/dist/index77.mjs +1 -1
- package/dist/index83.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ShoppingCart.tsx +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAWnD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAWnD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CA8PnB"}
|
package/dist/index14.mjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as a, Fragment as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useCart as
|
|
5
|
-
import { CartItem as
|
|
6
|
-
import { DiscountCodeInput as
|
|
7
|
-
import { Checkout as
|
|
8
|
-
import { RecommendedProducts as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { X as
|
|
2
|
+
import { jsxs as a, Fragment as j, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as $, useEffect as A } from "react";
|
|
4
|
+
import { useCart as G } from "./index3.mjs";
|
|
5
|
+
import { CartItem as J } from "./index13.mjs";
|
|
6
|
+
import { DiscountCodeInput as K } from "./index15.mjs";
|
|
7
|
+
import { Checkout as O } from "./index16.mjs";
|
|
8
|
+
import { RecommendedProducts as Q } from "./index11.mjs";
|
|
9
|
+
import { Button as E } from "./index17.mjs";
|
|
10
|
+
import { X as S, Loader2 as U, Package as p } from "lucide-react";
|
|
11
11
|
import { cn as c, formatCurrency as d } from "./index23.mjs";
|
|
12
|
-
import { useHideBodyOverflow as
|
|
13
|
-
function
|
|
14
|
-
isOpen:
|
|
15
|
-
onClose:
|
|
12
|
+
import { useHideBodyOverflow as V } from "./index45.mjs";
|
|
13
|
+
function de({
|
|
14
|
+
isOpen: i,
|
|
15
|
+
onClose: s,
|
|
16
16
|
onCheckout: m,
|
|
17
17
|
onContinueShopping: h,
|
|
18
18
|
onPurchaseSuccess: f,
|
|
19
|
-
className:
|
|
20
|
-
showDiscountCode:
|
|
21
|
-
showContinueShopping:
|
|
22
|
-
checkoutButtonText:
|
|
23
|
-
continueShoppingText:
|
|
24
|
-
checkoutButtonClassName:
|
|
25
|
-
continueShoppingButtonClassName:
|
|
26
|
-
disableCheckout:
|
|
27
|
-
emptyMessage:
|
|
19
|
+
className: F,
|
|
20
|
+
showDiscountCode: R = !0,
|
|
21
|
+
showContinueShopping: I = !0,
|
|
22
|
+
checkoutButtonText: L = "Complete Purchase",
|
|
23
|
+
continueShoppingText: z = "Continue Shopping",
|
|
24
|
+
checkoutButtonClassName: Y,
|
|
25
|
+
continueShoppingButtonClassName: B,
|
|
26
|
+
disableCheckout: D = !1,
|
|
27
|
+
emptyMessage: M = "Your cart is empty"
|
|
28
28
|
}) {
|
|
29
|
-
var x, y, b;
|
|
30
|
-
const { cart: t, isLoading: l, error: o, trackCheckoutInitiated:
|
|
31
|
-
|
|
29
|
+
var x, y, N, b, v;
|
|
30
|
+
const { cart: t, isLoading: l, error: o, trackCheckoutInitiated: q } = G(), [H, u] = $(!1);
|
|
31
|
+
V(i), A(() => {
|
|
32
32
|
const r = (n) => {
|
|
33
|
-
n.key === "Escape" &&
|
|
33
|
+
n.key === "Escape" && i && s();
|
|
34
34
|
};
|
|
35
35
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
h == null || h(),
|
|
36
|
+
}, [i, s]);
|
|
37
|
+
const P = ((x = t == null ? void 0 : t.pricing) == null ? void 0 : x.subtotal) || 0, g = ((y = t == null ? void 0 : t.pricing.discount) == null ? void 0 : y.amount) || 0, T = () => {
|
|
38
|
+
q(), u(!0), m == null || m();
|
|
39
|
+
}, X = () => {
|
|
40
|
+
h == null || h(), s();
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */ a(
|
|
42
|
+
return /* @__PURE__ */ a(j, { children: [
|
|
43
43
|
/* @__PURE__ */ e(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
className: c(
|
|
47
47
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
48
|
-
|
|
48
|
+
i ? "opacity-100" : "pointer-events-none opacity-0"
|
|
49
49
|
),
|
|
50
|
-
onClick:
|
|
50
|
+
onClick: s,
|
|
51
51
|
"aria-hidden": "true"
|
|
52
52
|
}
|
|
53
53
|
),
|
|
@@ -56,32 +56,32 @@ function ne({
|
|
|
56
56
|
{
|
|
57
57
|
className: c(
|
|
58
58
|
"fixed right-0 top-0 z-50 h-full w-full bg-white shadow-2xl transition-transform duration-300 ease-in-out sm:w-[480px]",
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
i ? "translate-x-0" : "translate-x-full",
|
|
60
|
+
F
|
|
61
61
|
),
|
|
62
62
|
children: /* @__PURE__ */ a("div", { className: "flex h-full flex-col", children: [
|
|
63
63
|
/* @__PURE__ */ e("div", { className: "border-b border-gray-300 px-4 py-2", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
64
64
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
65
|
-
/* @__PURE__ */ e("div", { className: "bg-accent-500 text-white px-2 py-1 rounded-full text-sm aspect-square flex items-center justify-center w-8 h-8", children: (
|
|
65
|
+
/* @__PURE__ */ e("div", { className: "bg-accent-500 text-white px-2 py-1 rounded-full text-sm aspect-square flex items-center justify-center w-8 h-8", children: (N = t == null ? void 0 : t.items) == null ? void 0 : N.length }),
|
|
66
66
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Your Cart" })
|
|
67
67
|
] }),
|
|
68
68
|
/* @__PURE__ */ e(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: s,
|
|
72
72
|
className: "rounded-full p-2 transition-colors hover:bg-gray-100",
|
|
73
73
|
"aria-label": "Close cart",
|
|
74
|
-
children: /* @__PURE__ */ e(
|
|
74
|
+
children: /* @__PURE__ */ e(S, { className: "h-6 w-6" })
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] }) }),
|
|
78
78
|
!l && !o && t && t.items && t.items.length > 0 && /* @__PURE__ */ e("div", { className: "bg-gray-50 px-4 py-3 border-b border-gray-200", children: (() => {
|
|
79
|
-
var
|
|
80
|
-
const n = ((
|
|
79
|
+
var C;
|
|
80
|
+
const n = ((C = t.pricing) == null ? void 0 : C.subtotal) || 0, w = Math.max(0, 2e4 - n), Z = Math.min(100, n / 2e4 * 100), k = w <= 0;
|
|
81
81
|
return /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
82
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-bold text-center", children:
|
|
82
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-bold text-center", children: k ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "You've unlocked FREE delivery! 🎉" }) : /* @__PURE__ */ a("span", { children: [
|
|
83
83
|
"You're ",
|
|
84
|
-
/* @__PURE__ */ e("span", { className: "text-red-500", children: d(
|
|
84
|
+
/* @__PURE__ */ e("span", { className: "text-red-500", children: d(w) }),
|
|
85
85
|
" away from FREE delivery"
|
|
86
86
|
] }) }),
|
|
87
87
|
/* @__PURE__ */ e("div", { className: "h-2 w-full bg-gray-200 rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
@@ -89,15 +89,15 @@ function ne({
|
|
|
89
89
|
{
|
|
90
90
|
className: c(
|
|
91
91
|
"h-full transition-all duration-500 ease-out",
|
|
92
|
-
|
|
92
|
+
k ? "bg-green-500" : "bg-red-500"
|
|
93
93
|
),
|
|
94
|
-
style: { width: `${
|
|
94
|
+
style: { width: `${Z}%` }
|
|
95
95
|
}
|
|
96
96
|
) })
|
|
97
97
|
] });
|
|
98
98
|
})() }),
|
|
99
99
|
l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
100
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(U, { className: "mx-auto mb-4 h-12 w-12 animate-spin text-accent-500" }),
|
|
101
101
|
/* @__PURE__ */ e("p", { className: "text-gray-600", children: "Loading cart..." })
|
|
102
102
|
] }) }),
|
|
103
103
|
o && !l && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center", children: [
|
|
@@ -106,28 +106,28 @@ function ne({
|
|
|
106
106
|
] }) }),
|
|
107
107
|
!l && !o && (!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: [
|
|
108
108
|
/* @__PURE__ */ e(p, { className: "mx-auto mb-4 h-12 w-12 text-gray-400" }),
|
|
109
|
-
/* @__PURE__ */ e("p", { className: "text-gray-600", children:
|
|
109
|
+
/* @__PURE__ */ e("p", { className: "text-gray-600", children: M })
|
|
110
110
|
] }) }),
|
|
111
|
-
!l && !o && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(
|
|
111
|
+
!l && !o && t && t.items && t.items.length > 0 && /* @__PURE__ */ a(j, { children: [
|
|
112
112
|
/* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", children: [
|
|
113
113
|
/* @__PURE__ */ e("div", { className: "space-y-4 p-4", children: t.items.map((r, n) => /* @__PURE__ */ a("div", { children: [
|
|
114
114
|
/* @__PURE__ */ e(
|
|
115
|
-
|
|
115
|
+
J,
|
|
116
116
|
{
|
|
117
117
|
item: r
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
120
|
/* @__PURE__ */ e("hr", { className: "border-gray-200 mt-2" })
|
|
121
121
|
] }, r.id)) }),
|
|
122
|
-
|
|
122
|
+
R && /* @__PURE__ */ e("div", { className: "px-4 pb-4", children: /* @__PURE__ */ e(K, {}) })
|
|
123
123
|
] }),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(Q, { limit: 6, className: "border-t border-gray-200" }),
|
|
125
125
|
/* @__PURE__ */ a("div", { className: "border-t border-gray-300 bg-white", children: [
|
|
126
126
|
/* @__PURE__ */ a("div", { className: " text-base", children: [
|
|
127
127
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2", children: [
|
|
128
128
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
129
129
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
130
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: d(
|
|
130
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: d(P) })
|
|
131
131
|
] }),
|
|
132
132
|
g > 0 && /* @__PURE__ */ a("div", { className: "flex justify-between text-green-600", children: [
|
|
133
133
|
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
@@ -138,7 +138,7 @@ function ne({
|
|
|
138
138
|
] }),
|
|
139
139
|
/* @__PURE__ */ a("div", { className: "flex justify-between", children: [
|
|
140
140
|
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Shipping" }),
|
|
141
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: t.
|
|
141
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: t.deliveryZone ? ((b = t.pricing) == null ? void 0 : b.deliveryCharge) === 0 ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" }) : d(((v = t.pricing) == null ? void 0 : v.deliveryCharge) ?? 0) : /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs font-normal", children: "Calculated at checkout" }) })
|
|
142
142
|
] })
|
|
143
143
|
] }),
|
|
144
144
|
/* @__PURE__ */ a("div", { className: "flex justify-between p-4 border-t border-gray-300 text-lg", children: [
|
|
@@ -148,26 +148,26 @@ function ne({
|
|
|
148
148
|
] }),
|
|
149
149
|
/* @__PURE__ */ a("div", { className: "px-4 py-2 space-y-2 pt-0", children: [
|
|
150
150
|
/* @__PURE__ */ a(
|
|
151
|
-
|
|
151
|
+
E,
|
|
152
152
|
{
|
|
153
|
-
onClick:
|
|
154
|
-
disabled:
|
|
155
|
-
className: c("w-full bg-accent-500 text-white hover:bg-accent-600",
|
|
153
|
+
onClick: T,
|
|
154
|
+
disabled: D || t.items.length === 0,
|
|
155
|
+
className: c("w-full bg-accent-500 text-white hover:bg-accent-600", Y),
|
|
156
156
|
size: "lg",
|
|
157
157
|
children: [
|
|
158
158
|
/* @__PURE__ */ e(p, { className: "h-5 w-5" }),
|
|
159
|
-
|
|
159
|
+
L
|
|
160
160
|
]
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
I && /* @__PURE__ */ e(
|
|
164
|
+
E,
|
|
165
165
|
{
|
|
166
|
-
onClick:
|
|
166
|
+
onClick: X,
|
|
167
167
|
variant: "outline",
|
|
168
|
-
className: c("w-full border-gray-300 text-gray-600 hover:bg-gray-100",
|
|
168
|
+
className: c("w-full border-gray-300 text-gray-600 hover:bg-gray-100", B),
|
|
169
169
|
size: "lg",
|
|
170
|
-
children:
|
|
170
|
+
children: z
|
|
171
171
|
}
|
|
172
172
|
)
|
|
173
173
|
] })
|
|
@@ -177,11 +177,11 @@ function ne({
|
|
|
177
177
|
}
|
|
178
178
|
),
|
|
179
179
|
/* @__PURE__ */ e(
|
|
180
|
-
|
|
180
|
+
O,
|
|
181
181
|
{
|
|
182
|
-
isOpen:
|
|
182
|
+
isOpen: H,
|
|
183
183
|
onSuccess: (r) => {
|
|
184
|
-
f == null || f(r),
|
|
184
|
+
f == null || f(r), s();
|
|
185
185
|
},
|
|
186
186
|
onClose: () => u(!1),
|
|
187
187
|
refundPolicy: {
|
|
@@ -199,5 +199,5 @@ function ne({
|
|
|
199
199
|
] });
|
|
200
200
|
}
|
|
201
201
|
export {
|
|
202
|
-
|
|
202
|
+
de as ShoppingCart
|
|
203
203
|
};
|
package/dist/index166.mjs
CHANGED
package/dist/index167.mjs
CHANGED
package/dist/index169.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as e } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
2
|
+
import { __exports as e } from "./index234.mjs";
|
|
3
|
+
import { __require as f } from "./index235.mjs";
|
|
4
4
|
import { __require as _ } from "./index114.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function R() {
|
package/dist/index170.mjs
CHANGED
package/dist/index175.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as u } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as u } from "./index244.mjs";
|
|
3
|
+
import { __require as d } from "./index245.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function h() {
|
|
6
6
|
return a ? u : (a = 1, function(c) {
|
package/dist/index177.mjs
CHANGED
package/dist/index179.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as n } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as n } from "./index237.mjs";
|
|
3
|
+
import { __require as d } from "./index238.mjs";
|
|
4
4
|
var o;
|
|
5
5
|
function p() {
|
|
6
6
|
return o ? n : (o = 1, function(i) {
|
package/dist/index180.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as A } from "./
|
|
3
|
-
import { __require as T } from "./
|
|
2
|
+
import { __exports as A } from "./index239.mjs";
|
|
3
|
+
import { __require as T } from "./index238.mjs";
|
|
4
4
|
import { __require as L } from "./index183.mjs";
|
|
5
|
-
import { __require as N } from "./
|
|
5
|
+
import { __require as N } from "./index240.mjs";
|
|
6
6
|
import { __require as U } from "./index175.mjs";
|
|
7
|
-
import { __require as j } from "./
|
|
8
|
-
import { __require as v } from "./
|
|
7
|
+
import { __require as j } from "./index241.mjs";
|
|
8
|
+
import { __require as v } from "./index242.mjs";
|
|
9
9
|
var S;
|
|
10
10
|
function W() {
|
|
11
11
|
return S ? A : (S = 1, function(R) {
|
package/dist/index183.mjs
CHANGED
package/dist/index186.mjs
CHANGED
package/dist/index189.mjs
CHANGED
package/dist/index190.mjs
CHANGED
package/dist/index194.mjs
CHANGED
package/dist/index196.mjs
CHANGED
package/dist/index232.mjs
CHANGED
package/dist/index233.mjs
CHANGED
|
@@ -1,111 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
var p;
|
|
4
|
-
function S() {
|
|
5
|
-
return p ? m : (p = 1, function(d) {
|
|
6
|
-
Object.defineProperty(d, "__esModule", {
|
|
7
|
-
value: !0
|
|
8
|
-
});
|
|
9
|
-
function g(o, e) {
|
|
10
|
-
for (var r in e) Object.defineProperty(o, r, {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
get: e[r]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
g(d, {
|
|
16
|
-
getSortedRouteObjects: function() {
|
|
17
|
-
return w;
|
|
18
|
-
},
|
|
19
|
-
getSortedRoutes: function() {
|
|
20
|
-
return f;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
class h {
|
|
24
|
-
insert(e) {
|
|
25
|
-
this._insert(e.split("/").filter(Boolean), [], !1);
|
|
26
|
-
}
|
|
27
|
-
smoosh() {
|
|
28
|
-
return this._smoosh();
|
|
29
|
-
}
|
|
30
|
-
_smoosh(e) {
|
|
31
|
-
e === void 0 && (e = "/");
|
|
32
|
-
const r = [
|
|
33
|
-
...this.children.keys()
|
|
34
|
-
].sort();
|
|
35
|
-
this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
|
|
36
|
-
const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
|
|
37
|
-
...s,
|
|
38
|
-
...t
|
|
39
|
-
], []);
|
|
40
|
-
if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
|
|
41
|
-
const s = e === "/" ? "/" : e.slice(0, -1);
|
|
42
|
-
if (this.optionalRestSlugName != null)
|
|
43
|
-
throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
|
|
44
|
-
n.unshift(s);
|
|
45
|
-
}
|
|
46
|
-
return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
|
|
47
|
-
}
|
|
48
|
-
_insert(e, r, n) {
|
|
49
|
-
if (e.length === 0) {
|
|
50
|
-
this.placeholder = !1;
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (n)
|
|
54
|
-
throw new Error("Catch-all must be the last part of the URL.");
|
|
55
|
-
let s = e[0];
|
|
56
|
-
if (s.startsWith("[") && s.endsWith("]")) {
|
|
57
|
-
let l = function(u, a) {
|
|
58
|
-
if (u !== null && u !== a)
|
|
59
|
-
throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
|
|
60
|
-
r.forEach((c) => {
|
|
61
|
-
if (c === a)
|
|
62
|
-
throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
|
|
63
|
-
if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
|
|
64
|
-
throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
|
|
65
|
-
}), r.push(a);
|
|
66
|
-
}, t = s.slice(1, -1), i = !1;
|
|
67
|
-
if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
|
|
68
|
-
throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
|
|
69
|
-
if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
|
|
70
|
-
throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
|
|
71
|
-
if (t.startsWith("."))
|
|
72
|
-
throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
|
|
73
|
-
if (n)
|
|
74
|
-
if (i) {
|
|
75
|
-
if (this.restSlugName != null)
|
|
76
|
-
throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
|
|
77
|
-
l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
|
|
78
|
-
} else {
|
|
79
|
-
if (this.optionalRestSlugName != null)
|
|
80
|
-
throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
|
|
81
|
-
l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
if (i)
|
|
85
|
-
throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
|
|
86
|
-
l(this.slugName, t), this.slugName = t, s = "[]";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
|
|
90
|
-
}
|
|
91
|
-
constructor() {
|
|
92
|
-
this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function f(o) {
|
|
96
|
-
const e = new h();
|
|
97
|
-
return o.forEach((r) => e.insert(r)), e.smoosh();
|
|
98
|
-
}
|
|
99
|
-
function w(o, e) {
|
|
100
|
-
const r = {}, n = [];
|
|
101
|
-
for (let t = 0; t < o.length; t++) {
|
|
102
|
-
const i = e(o[t]);
|
|
103
|
-
r[i] = t, n[t] = i;
|
|
104
|
-
}
|
|
105
|
-
return f(n).map((t) => o[r[t]]);
|
|
106
|
-
}
|
|
107
|
-
}(m), m);
|
|
108
|
-
}
|
|
2
|
+
var r = { exports: {} };
|
|
109
3
|
export {
|
|
110
|
-
|
|
4
|
+
r as __module
|
|
111
5
|
};
|
package/dist/index234.mjs
CHANGED
package/dist/index235.mjs
CHANGED
|
@@ -1,5 +1,111 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import { __exports as m } from "./index265.mjs";
|
|
3
|
+
var p;
|
|
4
|
+
function S() {
|
|
5
|
+
return p ? m : (p = 1, function(d) {
|
|
6
|
+
Object.defineProperty(d, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
function g(o, e) {
|
|
10
|
+
for (var r in e) Object.defineProperty(o, r, {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: e[r]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
g(d, {
|
|
16
|
+
getSortedRouteObjects: function() {
|
|
17
|
+
return w;
|
|
18
|
+
},
|
|
19
|
+
getSortedRoutes: function() {
|
|
20
|
+
return f;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
class h {
|
|
24
|
+
insert(e) {
|
|
25
|
+
this._insert(e.split("/").filter(Boolean), [], !1);
|
|
26
|
+
}
|
|
27
|
+
smoosh() {
|
|
28
|
+
return this._smoosh();
|
|
29
|
+
}
|
|
30
|
+
_smoosh(e) {
|
|
31
|
+
e === void 0 && (e = "/");
|
|
32
|
+
const r = [
|
|
33
|
+
...this.children.keys()
|
|
34
|
+
].sort();
|
|
35
|
+
this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
|
|
36
|
+
const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
|
|
37
|
+
...s,
|
|
38
|
+
...t
|
|
39
|
+
], []);
|
|
40
|
+
if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
|
|
41
|
+
const s = e === "/" ? "/" : e.slice(0, -1);
|
|
42
|
+
if (this.optionalRestSlugName != null)
|
|
43
|
+
throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
|
|
44
|
+
n.unshift(s);
|
|
45
|
+
}
|
|
46
|
+
return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
|
|
47
|
+
}
|
|
48
|
+
_insert(e, r, n) {
|
|
49
|
+
if (e.length === 0) {
|
|
50
|
+
this.placeholder = !1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (n)
|
|
54
|
+
throw new Error("Catch-all must be the last part of the URL.");
|
|
55
|
+
let s = e[0];
|
|
56
|
+
if (s.startsWith("[") && s.endsWith("]")) {
|
|
57
|
+
let l = function(u, a) {
|
|
58
|
+
if (u !== null && u !== a)
|
|
59
|
+
throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
|
|
60
|
+
r.forEach((c) => {
|
|
61
|
+
if (c === a)
|
|
62
|
+
throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
|
|
63
|
+
if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
|
|
64
|
+
throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
|
|
65
|
+
}), r.push(a);
|
|
66
|
+
}, t = s.slice(1, -1), i = !1;
|
|
67
|
+
if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
|
|
68
|
+
throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
|
|
69
|
+
if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
|
|
70
|
+
throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
|
|
71
|
+
if (t.startsWith("."))
|
|
72
|
+
throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
|
|
73
|
+
if (n)
|
|
74
|
+
if (i) {
|
|
75
|
+
if (this.restSlugName != null)
|
|
76
|
+
throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
|
|
77
|
+
l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
|
|
78
|
+
} else {
|
|
79
|
+
if (this.optionalRestSlugName != null)
|
|
80
|
+
throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
|
|
81
|
+
l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (i)
|
|
85
|
+
throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
|
|
86
|
+
l(this.slugName, t), this.slugName = t, s = "[]";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
|
|
90
|
+
}
|
|
91
|
+
constructor() {
|
|
92
|
+
this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function f(o) {
|
|
96
|
+
const e = new h();
|
|
97
|
+
return o.forEach((r) => e.insert(r)), e.smoosh();
|
|
98
|
+
}
|
|
99
|
+
function w(o, e) {
|
|
100
|
+
const r = {}, n = [];
|
|
101
|
+
for (let t = 0; t < o.length; t++) {
|
|
102
|
+
const i = e(o[t]);
|
|
103
|
+
r[i] = t, n[t] = i;
|
|
104
|
+
}
|
|
105
|
+
return f(n).map((t) => o[r[t]]);
|
|
106
|
+
}
|
|
107
|
+
}(m), m);
|
|
108
|
+
}
|
|
3
109
|
export {
|
|
4
|
-
|
|
110
|
+
S as __require
|
|
5
111
|
};
|