@instockng/storefront-ui 1.0.86 → 1.0.88

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.
Files changed (272) hide show
  1. package/dist/components/CartUpsellScreen.d.ts +12 -0
  2. package/dist/components/CartUpsellScreen.d.ts.map +1 -0
  3. package/dist/components/QuantitySelector.d.ts +10 -0
  4. package/dist/components/QuantitySelector.d.ts.map +1 -0
  5. package/dist/components/ShoppingCart.d.ts.map +1 -1
  6. package/dist/index.d.ts +6 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.mjs +115 -109
  9. package/dist/index10.mjs +5 -5
  10. package/dist/index101.mjs +1 -1
  11. package/dist/index102.mjs +3 -3
  12. package/dist/index104.mjs +34 -2
  13. package/dist/index105.mjs +43 -2
  14. package/dist/index106.mjs +2 -28
  15. package/dist/index107.mjs +2 -18
  16. package/dist/index108.mjs +26 -213
  17. package/dist/index109.mjs +13 -175
  18. package/dist/index11.mjs +4 -4
  19. package/dist/index110.mjs +210 -17
  20. package/dist/index111.mjs +174 -17
  21. package/dist/index112.mjs +14 -25
  22. package/dist/index113.mjs +17 -150
  23. package/dist/index114.mjs +26 -13
  24. package/dist/index115.mjs +149 -24
  25. package/dist/index116.mjs +13 -77
  26. package/dist/index117.mjs +20 -27
  27. package/dist/index118.mjs +76 -137
  28. package/dist/index119.mjs +33 -50
  29. package/dist/index12.mjs +3 -3
  30. package/dist/index120.mjs +141 -19
  31. package/dist/index121.mjs +50 -22
  32. package/dist/index122.mjs +14 -14
  33. package/dist/index123.mjs +20 -18
  34. package/dist/index124.mjs +16 -14
  35. package/dist/index125.mjs +17 -14
  36. package/dist/index126.mjs +12 -12
  37. package/dist/index127.mjs +15 -58
  38. package/dist/index128.mjs +14 -11
  39. package/dist/index129.mjs +56 -30
  40. package/dist/index13.mjs +1 -1
  41. package/dist/index130.mjs +9 -15
  42. package/dist/index131.mjs +31 -26
  43. package/dist/index132.mjs +13 -16
  44. package/dist/index133.mjs +26 -11
  45. package/dist/index134.mjs +18 -12
  46. package/dist/index135.mjs +12 -40
  47. package/dist/index136.mjs +14 -16
  48. package/dist/index137.mjs +42 -263
  49. package/dist/index138.mjs +15 -62
  50. package/dist/index139.mjs +267 -7
  51. package/dist/index14.mjs +157 -194
  52. package/dist/index140.mjs +70 -2
  53. package/dist/index141.mjs +8 -2
  54. package/dist/index142.mjs +2 -33
  55. package/dist/index143.mjs +2 -2
  56. package/dist/index144.mjs +32 -20
  57. package/dist/index145.mjs +2 -56
  58. package/dist/index146.mjs +18 -26
  59. package/dist/index147.mjs +55 -6
  60. package/dist/index148.mjs +28 -51
  61. package/dist/index149.mjs +7 -6
  62. package/dist/index15.mjs +218 -94
  63. package/dist/index150.mjs +51 -11
  64. package/dist/index151.mjs +5 -6
  65. package/dist/index152.mjs +12 -28
  66. package/dist/index153.mjs +7 -2
  67. package/dist/index154.mjs +27 -69
  68. package/dist/index155.mjs +2 -167
  69. package/dist/index156.mjs +70 -2
  70. package/dist/index157.mjs +167 -2
  71. package/dist/index159.mjs +2 -2
  72. package/dist/index16.mjs +99 -733
  73. package/dist/index160.mjs +2 -18
  74. package/dist/index161.mjs +11 -25
  75. package/dist/index162.mjs +26 -32
  76. package/dist/index163.mjs +32 -12
  77. package/dist/index164.mjs +9 -9
  78. package/dist/index165.mjs +18 -2
  79. package/dist/index166.mjs +2 -20
  80. package/dist/index167.mjs +13 -39
  81. package/dist/index168.mjs +46 -2
  82. package/dist/index169.mjs +2 -30
  83. package/dist/index17.mjs +94 -56
  84. package/dist/index170.mjs +23 -11
  85. package/dist/index171.mjs +18 -2
  86. package/dist/index172.mjs +2 -2
  87. package/dist/index173.mjs +2 -2
  88. package/dist/index174.mjs +2 -2
  89. package/dist/index175.mjs +2 -72
  90. package/dist/index176.mjs +72 -2
  91. package/dist/index177.mjs +2 -53
  92. package/dist/index178.mjs +53 -2
  93. package/dist/index179.mjs +2 -36
  94. package/dist/index18.mjs +749 -62
  95. package/dist/index180.mjs +30 -146
  96. package/dist/index181.mjs +152 -2
  97. package/dist/index182.mjs +2 -2
  98. package/dist/index183.mjs +2 -19
  99. package/dist/index184.mjs +19 -2
  100. package/dist/index185.mjs +2 -2
  101. package/dist/index186.mjs +2 -26
  102. package/dist/index187.mjs +26 -2
  103. package/dist/index188.mjs +2 -2
  104. package/dist/index189.mjs +2 -24
  105. package/dist/index19.mjs +50 -14
  106. package/dist/index190.mjs +17 -16
  107. package/dist/index191.mjs +23 -2
  108. package/dist/index193.mjs +2 -2
  109. package/dist/index194.mjs +2 -23
  110. package/dist/index195.mjs +23 -2
  111. package/dist/index196.mjs +2 -23
  112. package/dist/index197.mjs +23 -2
  113. package/dist/index198.mjs +2 -2
  114. package/dist/index2.mjs +2 -2
  115. package/dist/index20.mjs +62 -109
  116. package/dist/index200.mjs +2 -23
  117. package/dist/index201.mjs +23 -2
  118. package/dist/index202.mjs +2 -23
  119. package/dist/index203.mjs +23 -2
  120. package/dist/index204.mjs +2 -2
  121. package/dist/index205.mjs +2 -2
  122. package/dist/index207.mjs +2 -2
  123. package/dist/index208.mjs +2 -2
  124. package/dist/index209.mjs +2 -2
  125. package/dist/index21.mjs +23 -41
  126. package/dist/index210.mjs +2 -2
  127. package/dist/index211.mjs +2 -127
  128. package/dist/index212.mjs +127 -2
  129. package/dist/index213.mjs +2 -74
  130. package/dist/index214.mjs +60 -60
  131. package/dist/index215.mjs +73 -30
  132. package/dist/index216.mjs +2 -11
  133. package/dist/index217.mjs +30 -3
  134. package/dist/index218.mjs +10 -3
  135. package/dist/index219.mjs +4 -13
  136. package/dist/index22.mjs +109 -42
  137. package/dist/index220.mjs +4 -7
  138. package/dist/index221.mjs +13 -12
  139. package/dist/index222.mjs +7 -5
  140. package/dist/index223.mjs +12 -33
  141. package/dist/index224.mjs +5 -31
  142. package/dist/index225.mjs +32 -27
  143. package/dist/index226.mjs +28 -58
  144. package/dist/index227.mjs +28 -2
  145. package/dist/index228.mjs +61 -2
  146. package/dist/index229.mjs +2 -2
  147. package/dist/index23.mjs +42 -71
  148. package/dist/index230.mjs +2 -2
  149. package/dist/index231.mjs +2 -2
  150. package/dist/index232.mjs +2 -2
  151. package/dist/index233.mjs +2 -108
  152. package/dist/index234.mjs +2 -2
  153. package/dist/index235.mjs +108 -2
  154. package/dist/index236.mjs +2 -2
  155. package/dist/index237.mjs +2 -2
  156. package/dist/index238.mjs +36 -243
  157. package/dist/index24.mjs +41 -31
  158. package/dist/index240.mjs +2 -33
  159. package/dist/index241.mjs +2 -65
  160. package/dist/index242.mjs +2 -25
  161. package/dist/index243.mjs +244 -2
  162. package/dist/index244.mjs +2 -37
  163. package/dist/index245.mjs +33 -2
  164. package/dist/index246.mjs +65 -2
  165. package/dist/index247.mjs +25 -2
  166. package/dist/index25.mjs +86 -6
  167. package/dist/index250.mjs +2 -2
  168. package/dist/index251.mjs +2 -2
  169. package/dist/index252.mjs +2 -2
  170. package/dist/index254.mjs +2 -2
  171. package/dist/index255.mjs +2 -4
  172. package/dist/index256.mjs +2 -2
  173. package/dist/index257.mjs +4 -2
  174. package/dist/index258.mjs +2 -2
  175. package/dist/index259.mjs +2 -2
  176. package/dist/index26.mjs +27 -17
  177. package/dist/index260.mjs +3 -2
  178. package/dist/index261.mjs +2 -18
  179. package/dist/index262.mjs +2 -47
  180. package/dist/index263.mjs +17 -2
  181. package/dist/index264.mjs +13 -2
  182. package/dist/index265.mjs +6 -2
  183. package/dist/index266.mjs +30 -91
  184. package/dist/index267.mjs +2 -3
  185. package/dist/index268.mjs +2 -2
  186. package/dist/index269.mjs +18 -2
  187. package/dist/index27.mjs +6 -34
  188. package/dist/index270.mjs +46 -16
  189. package/dist/index271.mjs +2 -13
  190. package/dist/index272.mjs +2 -6
  191. package/dist/index273.mjs +2 -30
  192. package/dist/index274.mjs +2 -2
  193. package/dist/index275.mjs +91 -2
  194. package/dist/index276.mjs +2 -2
  195. package/dist/index277.mjs +2 -2
  196. package/dist/index278.mjs +5 -0
  197. package/dist/index279.mjs +5 -0
  198. package/dist/index28.mjs +19 -37
  199. package/dist/index29.mjs +36 -114
  200. package/dist/index3.mjs +5 -5
  201. package/dist/index30.mjs +30 -21
  202. package/dist/index31.mjs +113 -9
  203. package/dist/index32.mjs +27 -7
  204. package/dist/index33.mjs +11 -116
  205. package/dist/index34.mjs +11 -25
  206. package/dist/index35.mjs +116 -81
  207. package/dist/index36.mjs +24 -111
  208. package/dist/index37.mjs +81 -11
  209. package/dist/index38.mjs +104 -27
  210. package/dist/index39.mjs +8 -25
  211. package/dist/index4.mjs +1 -1
  212. package/dist/index40.mjs +32 -8
  213. package/dist/index41.mjs +26 -121
  214. package/dist/index42.mjs +9 -387
  215. package/dist/index43.mjs +116 -18
  216. package/dist/index44.mjs +387 -30
  217. package/dist/index45.mjs +24 -6
  218. package/dist/index46.mjs +30 -1431
  219. package/dist/index47.mjs +6 -69
  220. package/dist/index48.mjs +1433 -2
  221. package/dist/index49.mjs +68 -58
  222. package/dist/index5.mjs +1 -1
  223. package/dist/index50.mjs +2 -51
  224. package/dist/index51.mjs +60 -33
  225. package/dist/index52.mjs +49 -13
  226. package/dist/index53.mjs +32 -2262
  227. package/dist/index54.mjs +15 -36
  228. package/dist/index55.mjs +2261 -42
  229. package/dist/index56.mjs +36 -99
  230. package/dist/index57.mjs +43 -80
  231. package/dist/index58.mjs +99 -19
  232. package/dist/index59.mjs +52 -100
  233. package/dist/index6.mjs +1 -1
  234. package/dist/index60.mjs +13 -119
  235. package/dist/index61.mjs +102 -52
  236. package/dist/index62.mjs +86 -74
  237. package/dist/index63.mjs +52 -80
  238. package/dist/index64.mjs +110 -17
  239. package/dist/index65.mjs +79 -67
  240. package/dist/index66.mjs +17 -78
  241. package/dist/index67.mjs +71 -39
  242. package/dist/index68.mjs +65 -46
  243. package/dist/index69.mjs +45 -117
  244. package/dist/index7.mjs +6 -6
  245. package/dist/index70.mjs +60 -22
  246. package/dist/index71.mjs +131 -149
  247. package/dist/index72.mjs +5 -2
  248. package/dist/index73.mjs +21 -20
  249. package/dist/index74.mjs +152 -4
  250. package/dist/index75.mjs +21 -73
  251. package/dist/index76.mjs +2 -15
  252. package/dist/index77.mjs +68 -56
  253. package/dist/index78.mjs +15 -34
  254. package/dist/index79.mjs +58 -38
  255. package/dist/index8.mjs +4 -4
  256. package/dist/index82.mjs +35 -35
  257. package/dist/index83.mjs +1 -1
  258. package/dist/index84.mjs +2 -2
  259. package/dist/index85.mjs +2 -2
  260. package/dist/index89.mjs +5 -5
  261. package/dist/index9.mjs +3 -3
  262. package/dist/index91.mjs +3 -3
  263. package/dist/lib/utils.d.ts +3 -0
  264. package/dist/lib/utils.d.ts.map +1 -1
  265. package/dist/styles.css +1 -1
  266. package/package.json +1 -1
  267. package/src/components/CartUpsellScreen.stories.tsx +166 -0
  268. package/src/components/CartUpsellScreen.tsx +196 -0
  269. package/src/components/QuantitySelector.tsx +245 -0
  270. package/src/components/ShoppingCart.tsx +57 -11
  271. package/src/index.ts +8 -1
  272. package/src/lib/utils.ts +24 -0
package/dist/index23.mjs CHANGED
@@ -1,74 +1,45 @@
1
1
  'use client';
2
- import { clsx as i } from "./index52.mjs";
3
- import { twMerge as u } from "./index53.mjs";
4
- function l(...t) {
5
- return u(i(t));
6
- }
7
- function f(t) {
8
- return new Intl.NumberFormat("en-NG", {
9
- style: "currency",
10
- currency: "NGN",
11
- minimumFractionDigits: 0,
12
- maximumFractionDigits: 0
13
- }).format(t);
14
- }
15
- function m(t) {
16
- return (typeof t == "string" ? new Date(t) : t).toLocaleDateString("en-US", {
17
- year: "numeric",
18
- month: "long",
19
- day: "numeric"
20
- });
21
- }
22
- function d(t) {
23
- return (typeof t == "string" ? new Date(t) : t).toLocaleString("en-US", {
24
- year: "numeric",
25
- month: "long",
26
- day: "numeric",
27
- hour: "2-digit",
28
- minute: "2-digit"
29
- });
30
- }
31
- function s(t) {
32
- return {
33
- pending: "bg-yellow-100 text-yellow-800",
34
- shipped: "bg-blue-100 text-blue-800",
35
- delivered: "bg-green-100 text-green-800",
36
- cancelled: "bg-red-100 text-red-800",
37
- refunded: "bg-purple-100 text-purple-800",
38
- prospect: "bg-orange-100 text-orange-800"
39
- }[t] || "bg-gray-100 text-gray-800";
40
- }
41
- function r(t) {
42
- var o;
43
- if (typeof document > "u") return;
44
- const n = `; ${document.cookie}`.split(`; ${t}=`);
45
- if (n.length === 2) return (o = n.pop()) == null ? void 0 : o.split(";").shift();
46
- }
47
- function c(t) {
48
- return typeof window > "u" ? void 0 : new URLSearchParams(window.location.search).get(t) || void 0;
49
- }
50
- function p() {
51
- return {
52
- fbc: r("_fbc"),
53
- fbp: r("_fbp")
54
- };
55
- }
56
- function y() {
57
- return {
58
- ttp: r("_ttp"),
59
- ttclid: c("ttclid")
60
- };
61
- }
62
- function b(t, e, n) {
63
- return `${t}_${e}_${n}`;
64
- }
2
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
+ import u from "react";
4
+ import { cn as a } from "./index25.mjs";
5
+ const f = u.forwardRef(
6
+ ({
7
+ label: o,
8
+ error: r,
9
+ icon: t,
10
+ className: c,
11
+ containerClassName: d,
12
+ required: m,
13
+ disabled: s,
14
+ ...n
15
+ }, i) => /* @__PURE__ */ l("div", { className: a("w-full", d), children: [
16
+ o && /* @__PURE__ */ l("label", { className: "mb-1.5 block text-sm font-medium text-gray-700", children: [
17
+ o,
18
+ m && /* @__PURE__ */ e("span", { className: "ml-1 text-red-600", children: "*" })
19
+ ] }),
20
+ /* @__PURE__ */ l("div", { className: "relative", children: [
21
+ t && /* @__PURE__ */ e("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-gray-400", children: t }),
22
+ /* @__PURE__ */ e(
23
+ "input",
24
+ {
25
+ ref: i,
26
+ disabled: s,
27
+ className: a(
28
+ "w-full rounded-lg border px-3 py-2.5 text-sm transition-colors",
29
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50",
30
+ t && "pl-10",
31
+ r ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "border-gray-300 focus:border-blue-500",
32
+ s && "bg-gray-50 text-gray-500 cursor-not-allowed",
33
+ c
34
+ ),
35
+ ...n
36
+ }
37
+ )
38
+ ] }),
39
+ r && /* @__PURE__ */ e("p", { className: "mt-1.5 text-sm text-red-600", role: "alert", children: r })
40
+ ] })
41
+ );
42
+ f.displayName = "FormInput";
65
43
  export {
66
- l as cn,
67
- f as formatCurrency,
68
- m as formatDate,
69
- d as formatDateTime,
70
- b as generateClientEventId,
71
- p as getFbCookies,
72
- s as getStatusColor,
73
- y as getTikTokCookies
44
+ f as FormInput
74
45
  };
package/dist/index230.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = {};
2
+ var e = { exports: {} };
3
3
  export {
4
- e as __exports
4
+ e as __module
5
5
  };
package/dist/index231.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var e = {};
2
+ var e = { exports: {} };
3
3
  export {
4
- e as __exports
4
+ e as __module
5
5
  };
package/dist/index232.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = {};
2
+ var e = {};
3
3
  export {
4
- r as __exports
4
+ e as __exports
5
5
  };
package/dist/index233.mjs CHANGED
@@ -1,111 +1,5 @@
1
1
  'use client';
2
- import { __exports as m } from "./index258.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
- }
2
+ var e = {};
109
3
  export {
110
- S as __require
4
+ e as __exports
111
5
  };
package/dist/index234.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var a = {};
2
+ var r = {};
3
3
  export {
4
- a as __exports
4
+ r as __exports
5
5
  };
package/dist/index235.mjs CHANGED
@@ -1,5 +1,111 @@
1
1
  'use client';
2
- var e = {};
2
+ import { __exports as m } from "./index267.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
- e as __exports
110
+ S as __require
5
111
  };
package/dist/index236.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = { exports: {} };
2
+ var a = {};
3
3
  export {
4
- r as __module
4
+ a as __exports
5
5
  };
package/dist/index237.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var a = {};
2
+ var e = {};
3
3
  export {
4
- a as __exports
4
+ e as __exports
5
5
  };