@instockng/storefront-ui 1.0.22 → 1.0.24

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 (105) hide show
  1. package/dist/components/Checkout.d.ts.map +1 -1
  2. package/dist/components/ShoppingCart.d.ts.map +1 -1
  3. package/dist/contexts/CartContext.d.ts.map +1 -1
  4. package/dist/index10.mjs +68 -64
  5. package/dist/index12.mjs +477 -456
  6. package/dist/index132.mjs +1 -1
  7. package/dist/index134.mjs +2 -21
  8. package/dist/index135.mjs +19 -54
  9. package/dist/index136.mjs +55 -28
  10. package/dist/index137.mjs +28 -6
  11. package/dist/index138.mjs +6 -51
  12. package/dist/index139.mjs +51 -5
  13. package/dist/index140.mjs +6 -12
  14. package/dist/index141.mjs +12 -7
  15. package/dist/index142.mjs +6 -27
  16. package/dist/index143.mjs +28 -2
  17. package/dist/index144.mjs +2 -70
  18. package/dist/index145.mjs +67 -164
  19. package/dist/index146.mjs +167 -2
  20. package/dist/index150.mjs +1 -1
  21. package/dist/index151.mjs +1 -1
  22. package/dist/index153.mjs +1 -1
  23. package/dist/index154.mjs +1 -1
  24. package/dist/index156.mjs +1 -1
  25. package/dist/index157.mjs +1 -1
  26. package/dist/index159.mjs +2 -2
  27. package/dist/index160.mjs +1 -1
  28. package/dist/index165.mjs +2 -2
  29. package/dist/index167.mjs +1 -1
  30. package/dist/index169.mjs +2 -2
  31. package/dist/index170.mjs +5 -5
  32. package/dist/index173.mjs +1 -1
  33. package/dist/index184.mjs +1 -1
  34. package/dist/index186.mjs +1 -1
  35. package/dist/index190.mjs +1 -1
  36. package/dist/index192.mjs +1 -1
  37. package/dist/index2.mjs +10 -10
  38. package/dist/index20.mjs +2 -2
  39. package/dist/index205.mjs +2 -2
  40. package/dist/index206.mjs +2 -2
  41. package/dist/index208.mjs +2 -2
  42. package/dist/index209.mjs +2 -2
  43. package/dist/index21.mjs +2 -2
  44. package/dist/index210.mjs +2 -2
  45. package/dist/index211.mjs +108 -2
  46. package/dist/index212.mjs +2 -2
  47. package/dist/index213.mjs +2 -108
  48. package/dist/index214.mjs +244 -2
  49. package/dist/index216.mjs +28 -32
  50. package/dist/index217.mjs +65 -2
  51. package/dist/index218.mjs +24 -243
  52. package/dist/index220.mjs +2 -33
  53. package/dist/index221.mjs +2 -65
  54. package/dist/index222.mjs +2 -25
  55. package/dist/index223.mjs +37 -2
  56. package/dist/index224.mjs +2 -2
  57. package/dist/index230.mjs +2 -2
  58. package/dist/index231.mjs +2 -2
  59. package/dist/index245.mjs +3 -3
  60. package/dist/index248.mjs +2 -2
  61. package/dist/index249.mjs +2 -18
  62. package/dist/index25.mjs +5 -0
  63. package/dist/index250.mjs +2 -47
  64. package/dist/index251.mjs +2 -2
  65. package/dist/index252.mjs +91 -2
  66. package/dist/index253.mjs +2 -2
  67. package/dist/index254.mjs +2 -2
  68. package/dist/index255.mjs +16 -89
  69. package/dist/index256.mjs +47 -2
  70. package/dist/index263.mjs +1 -1
  71. package/dist/index264.mjs +1 -1
  72. package/dist/index265.mjs +2 -2
  73. package/dist/index267.mjs +2 -2
  74. package/dist/index3.mjs +82 -82
  75. package/dist/index38.mjs +1 -1
  76. package/dist/index42.mjs +1 -1
  77. package/dist/index49.mjs +59 -59
  78. package/dist/index50.mjs +50 -50
  79. package/dist/index51.mjs +48 -48
  80. package/dist/index52.mjs +56 -56
  81. package/dist/index53.mjs +39 -39
  82. package/dist/index54.mjs +55 -55
  83. package/dist/index55.mjs +15 -15
  84. package/dist/index56.mjs +10 -10
  85. package/dist/index57.mjs +23 -23
  86. package/dist/index58.mjs +64 -64
  87. package/dist/index59.mjs +73 -73
  88. package/dist/index62.mjs +149 -19
  89. package/dist/index63.mjs +19 -149
  90. package/dist/index73.mjs +1 -1
  91. package/dist/index78.mjs +5 -5
  92. package/dist/index80.mjs +3 -3
  93. package/dist/index90.mjs +1 -1
  94. package/dist/index91.mjs +3 -3
  95. package/dist/providers/StorefrontProvider.d.ts.map +1 -1
  96. package/dist/styles.css +1 -1
  97. package/package.json +12 -11
  98. package/src/components/CartItem.stories.tsx +5 -5
  99. package/src/components/Checkout.stories.tsx +16 -15
  100. package/src/components/Checkout.tsx +93 -50
  101. package/src/components/ShoppingCart.stories.tsx +17 -16
  102. package/src/components/ShoppingCart.tsx +14 -12
  103. package/src/contexts/CartContext.tsx +2 -1
  104. package/src/providers/StorefrontProvider.tsx +4 -1
  105. package/src/test-utils/MockCartProvider.tsx +31 -25
package/dist/index59.mjs CHANGED
@@ -1,132 +1,132 @@
1
1
  'use client';
2
- import { useQueryClient as y, useMutation as v } from "@tanstack/react-query";
2
+ import { useQueryClient as v, useMutation as w } from "@tanstack/react-query";
3
3
  import { useQueryUnwrapped as m } from "./index67.mjs";
4
- import { createAdminRpcClients as u, authHeaders as l } from "./index23.mjs";
5
- import { queryKeys as o } from "./index29.mjs";
6
- import { useApiConfig as c } from "./index21.mjs";
7
- function p(t) {
8
- const { baseURL: s, authToken: i } = c();
4
+ import { createAdminRpcClients as l, authHeaders as c } from "./index23.mjs";
5
+ import { queryKeys as a } from "./index29.mjs";
6
+ import { useApiConfig as d } from "./index21.mjs";
7
+ function p(e) {
8
+ const { baseURL: i, getAuthToken: r } = d();
9
9
  return m({
10
- queryKey: o.admin.deliveryZones.states.list(),
10
+ queryKey: a.admin.deliveryZones.states.list(),
11
11
  queryFn: async () => {
12
- const e = await u(s).deliveryZones.states.$get({}, l(i));
13
- if (!e.ok)
14
- throw new Error(`Failed to fetch states: ${e.statusText}`);
15
- return e.json();
12
+ const s = await r(), o = await l(i).deliveryZones.states.$get({}, c(s));
13
+ if (!o.ok)
14
+ throw new Error(`Failed to fetch states: ${o.statusText}`);
15
+ return o.json();
16
16
  },
17
- ...t
17
+ ...e
18
18
  });
19
19
  }
20
- function k(t) {
21
- const { baseURL: s, authToken: i } = c(), r = y();
22
- return v({
23
- mutationFn: async (e) => {
24
- const n = await u(s).deliveryZones.states.$post({ json: e }, l(i));
20
+ function F(e) {
21
+ const { baseURL: i, getAuthToken: r } = d(), s = v();
22
+ return w({
23
+ mutationFn: async (t) => {
24
+ const o = await r(), n = await l(i).deliveryZones.states.$post({ json: t }, c(o));
25
25
  if (!n.ok)
26
26
  throw new Error(`Failed to create state: ${n.statusText}`);
27
27
  return n.json();
28
28
  },
29
29
  onSuccess: () => {
30
- r.invalidateQueries({ queryKey: o.admin.deliveryZones.states.all });
30
+ s.invalidateQueries({ queryKey: a.admin.deliveryZones.states.all });
31
31
  },
32
- ...t
32
+ ...e
33
33
  });
34
34
  }
35
- function F(t, s) {
36
- const { baseURL: i, authToken: r } = c(), e = y();
37
- return v({
38
- mutationFn: async (a) => {
39
- const d = await u(i).deliveryZones.states[":id"].$patch({ json: a, param: { id: t } }, l(r));
40
- if (!d.ok)
41
- throw new Error(`Failed to update state: ${d.statusText}`);
42
- return d.json();
35
+ function T(e, i) {
36
+ const { baseURL: r, getAuthToken: s } = d(), t = v();
37
+ return w({
38
+ mutationFn: async (o) => {
39
+ const u = await s(), y = await l(r).deliveryZones.states[":id"].$patch({ json: o, param: { id: e } }, c(u));
40
+ if (!y.ok)
41
+ throw new Error(`Failed to update state: ${y.statusText}`);
42
+ return y.json();
43
43
  },
44
44
  onSuccess: () => {
45
- e.invalidateQueries({ queryKey: o.admin.deliveryZones.states.detail(t) }), e.invalidateQueries({ queryKey: o.admin.deliveryZones.states.all });
45
+ t.invalidateQueries({ queryKey: a.admin.deliveryZones.states.detail(e) }), t.invalidateQueries({ queryKey: a.admin.deliveryZones.states.all });
46
46
  },
47
- ...s
47
+ ...i
48
48
  });
49
49
  }
50
- function T(t, s) {
51
- const { baseURL: i, authToken: r } = c(), e = y();
52
- return v({
50
+ function $(e, i) {
51
+ const { baseURL: r, getAuthToken: s } = d(), t = v();
52
+ return w({
53
53
  mutationFn: async () => {
54
- const n = await u(i).deliveryZones.states[":id"].$delete({ param: { id: t } }, l(r));
54
+ const o = await s(), n = await l(r).deliveryZones.states[":id"].$delete({ param: { id: e } }, c(o));
55
55
  if (!n.ok)
56
56
  throw new Error(`Failed to delete state: ${n.statusText}`);
57
57
  return n.json();
58
58
  },
59
59
  onSuccess: () => {
60
- e.invalidateQueries({ queryKey: o.admin.deliveryZones.states.all }), e.invalidateQueries({ queryKey: o.admin.deliveryZones.zones.all });
60
+ t.invalidateQueries({ queryKey: a.admin.deliveryZones.states.all }), t.invalidateQueries({ queryKey: a.admin.deliveryZones.zones.all });
61
61
  },
62
- ...s
62
+ ...i
63
63
  });
64
64
  }
65
- function $(t, s) {
66
- const { baseURL: i, authToken: r } = c();
65
+ function z(e, i) {
66
+ const { baseURL: r, getAuthToken: s } = d();
67
67
  return m({
68
- queryKey: o.admin.deliveryZones.zones.list(t),
68
+ queryKey: a.admin.deliveryZones.zones.list(e),
69
69
  queryFn: async () => {
70
- const a = await u(i).deliveryZones.zones.$get({ query: t }, l(r));
71
- if (!a.ok)
72
- throw new Error(`Failed to fetch delivery zones: ${a.statusText}`);
73
- return a.json();
70
+ const t = await s(), u = await l(r).deliveryZones.zones.$get({ query: e }, c(t));
71
+ if (!u.ok)
72
+ throw new Error(`Failed to fetch delivery zones: ${u.statusText}`);
73
+ return u.json();
74
74
  },
75
- ...s
75
+ ...i
76
76
  });
77
77
  }
78
- function z(t) {
79
- const { baseURL: s, authToken: i } = c(), r = y();
80
- return v({
81
- mutationFn: async (e) => {
82
- const n = await u(s).deliveryZones.zones.$post({ json: e }, l(i));
78
+ function K(e) {
79
+ const { baseURL: i, getAuthToken: r } = d(), s = v();
80
+ return w({
81
+ mutationFn: async (t) => {
82
+ const o = await r(), n = await l(i).deliveryZones.zones.$post({ json: t }, c(o));
83
83
  if (!n.ok)
84
84
  throw new Error(`Failed to create delivery zone: ${n.statusText}`);
85
85
  return n.json();
86
86
  },
87
87
  onSuccess: () => {
88
- r.invalidateQueries({ queryKey: o.admin.deliveryZones.zones.all }), r.invalidateQueries({ queryKey: o.admin.deliveryZones.states.all });
88
+ s.invalidateQueries({ queryKey: a.admin.deliveryZones.zones.all }), s.invalidateQueries({ queryKey: a.admin.deliveryZones.states.all });
89
89
  },
90
- ...t
90
+ ...e
91
91
  });
92
92
  }
93
- function K(t, s) {
94
- const { baseURL: i, authToken: r } = c(), e = y();
95
- return v({
96
- mutationFn: async (a) => {
97
- const d = await u(i).deliveryZones.zones[":id"].$patch({ json: a, param: { id: t } }, l(r));
98
- if (!d.ok)
99
- throw new Error(`Failed to update delivery zone: ${d.statusText}`);
100
- return d.json();
93
+ function j(e, i) {
94
+ const { baseURL: r, getAuthToken: s } = d(), t = v();
95
+ return w({
96
+ mutationFn: async (o) => {
97
+ const u = await s(), y = await l(r).deliveryZones.zones[":id"].$patch({ json: o, param: { id: e } }, c(u));
98
+ if (!y.ok)
99
+ throw new Error(`Failed to update delivery zone: ${y.statusText}`);
100
+ return y.json();
101
101
  },
102
102
  onSuccess: () => {
103
- e.invalidateQueries({ queryKey: o.admin.deliveryZones.zones.detail(t) }), e.invalidateQueries({ queryKey: o.admin.deliveryZones.zones.all });
103
+ t.invalidateQueries({ queryKey: a.admin.deliveryZones.zones.detail(e) }), t.invalidateQueries({ queryKey: a.admin.deliveryZones.zones.all });
104
104
  },
105
- ...s
105
+ ...i
106
106
  });
107
107
  }
108
- function j(t, s) {
109
- const { baseURL: i, authToken: r } = c(), e = y();
110
- return v({
108
+ function Q(e, i) {
109
+ const { baseURL: r, getAuthToken: s } = d(), t = v();
110
+ return w({
111
111
  mutationFn: async () => {
112
- const n = await u(i).deliveryZones.zones[":id"].$delete({ param: { id: t } }, l(r));
112
+ const o = await s(), n = await l(r).deliveryZones.zones[":id"].$delete({ param: { id: e } }, c(o));
113
113
  if (!n.ok)
114
114
  throw new Error(`Failed to delete delivery zone: ${n.statusText}`);
115
115
  return n.json();
116
116
  },
117
117
  onSuccess: () => {
118
- e.invalidateQueries({ queryKey: o.admin.deliveryZones.zones.all });
118
+ t.invalidateQueries({ queryKey: a.admin.deliveryZones.zones.all });
119
119
  },
120
- ...s
120
+ ...i
121
121
  });
122
122
  }
123
123
  export {
124
- z as useCreateDeliveryZone,
125
- k as useCreateState,
126
- j as useDeleteDeliveryZone,
127
- T as useDeleteState,
128
- $ as useListDeliveryZones,
124
+ K as useCreateDeliveryZone,
125
+ F as useCreateState,
126
+ Q as useDeleteDeliveryZone,
127
+ $ as useDeleteState,
128
+ z as useListDeliveryZones,
129
129
  p as useListStates,
130
- K as useUpdateDeliveryZone,
131
- F as useUpdateState
130
+ j as useUpdateDeliveryZone,
131
+ T as useUpdateState
132
132
  };
package/dist/index62.mjs CHANGED
@@ -1,26 +1,156 @@
1
1
  'use client';
2
- import "react";
3
- function i(n, o) {
4
- if (typeof n == "function")
5
- return n(o);
6
- n != null && (n.current = o);
7
- }
8
- function f(...n) {
9
- return (o) => {
10
- let u = !1;
11
- const c = n.map((t) => {
12
- const e = i(t, o);
13
- return !u && typeof e == "function" && (u = !0), e;
2
+ import { __module as l } from "./index68.mjs";
3
+ import "./index69.mjs";
4
+ import j from "react";
5
+ import { __require as A } from "./index70.mjs";
6
+ import { __require as O } from "./index71.mjs";
7
+ import { __require as x } from "./index72.mjs";
8
+ import { __require as F } from "./index73.mjs";
9
+ import { __exports as M } from "./index74.mjs";
10
+ var p;
11
+ function W() {
12
+ return p ? l.exports : (p = 1, function(g, u) {
13
+ Object.defineProperty(u, "__esModule", {
14
+ value: !0
15
+ });
16
+ function _(e, o) {
17
+ for (var t in o) Object.defineProperty(e, t, {
18
+ enumerable: !0,
19
+ get: o[t]
20
+ });
21
+ }
22
+ _(u, {
23
+ Router: function() {
24
+ return i.default;
25
+ },
26
+ createRouter: function() {
27
+ return P;
28
+ },
29
+ // Export the singletonRouter and this is the public API.
30
+ default: function() {
31
+ return v;
32
+ },
33
+ makePublicRouterInstance: function() {
34
+ return E;
35
+ },
36
+ useRouter: function() {
37
+ return q;
38
+ },
39
+ withRouter: function() {
40
+ return w.default;
41
+ }
42
+ });
43
+ const f = M, R = /* @__PURE__ */ f._(j), i = /* @__PURE__ */ f._(A()), b = O(), y = /* @__PURE__ */ f._(x()), w = /* @__PURE__ */ f._(F()), n = {
44
+ router: null,
45
+ readyCallbacks: [],
46
+ ready(e) {
47
+ if (this.router) return e();
48
+ typeof window < "u" && this.readyCallbacks.push(e);
49
+ }
50
+ }, d = [
51
+ "pathname",
52
+ "route",
53
+ "query",
54
+ "asPath",
55
+ "components",
56
+ "isFallback",
57
+ "basePath",
58
+ "locale",
59
+ "locales",
60
+ "defaultLocale",
61
+ "isReady",
62
+ "isPreview",
63
+ "isLocaleDomain",
64
+ "domainLocales"
65
+ ], C = [
66
+ "routeChangeStart",
67
+ "beforeHistoryChange",
68
+ "routeChangeComplete",
69
+ "routeChangeError",
70
+ "hashChangeStart",
71
+ "hashChangeComplete"
72
+ ], h = [
73
+ "push",
74
+ "replace",
75
+ "reload",
76
+ "back",
77
+ "prefetch",
78
+ "beforePopState"
79
+ ];
80
+ Object.defineProperty(n, "events", {
81
+ get() {
82
+ return i.default.events;
83
+ }
14
84
  });
15
- if (u)
16
- return () => {
17
- for (let t = 0; t < c.length; t++) {
18
- const e = c[t];
19
- typeof e == "function" ? e() : i(n[t], null);
85
+ function m() {
86
+ if (!n.router) {
87
+ const e = `No router instance found.
88
+ You should only use "next/router" on the client side of your app.
89
+ `;
90
+ throw new Error(e);
91
+ }
92
+ return n.router;
93
+ }
94
+ d.forEach((e) => {
95
+ Object.defineProperty(n, e, {
96
+ get() {
97
+ return m()[e];
20
98
  }
99
+ });
100
+ }), h.forEach((e) => {
101
+ n[e] = function() {
102
+ for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
103
+ t[r] = arguments[r];
104
+ return m()[e](...t);
21
105
  };
22
- };
106
+ }), C.forEach((e) => {
107
+ n.ready(() => {
108
+ i.default.events.on(e, function() {
109
+ for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
110
+ t[r] = arguments[r];
111
+ const s = "on" + e.charAt(0).toUpperCase() + e.substring(1), c = n;
112
+ if (c[s])
113
+ try {
114
+ c[s](...t);
115
+ } catch (a) {
116
+ console.error("Error when running the Router event: " + s), console.error((0, y.default)(a) ? a.message + `
117
+ ` + a.stack : a + "");
118
+ }
119
+ });
120
+ });
121
+ });
122
+ const v = n;
123
+ function q() {
124
+ const e = R.default.useContext(b.RouterContext);
125
+ if (!e)
126
+ throw new Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");
127
+ return e;
128
+ }
129
+ function P() {
130
+ for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
131
+ o[t] = arguments[t];
132
+ return n.router = new i.default(...o), n.readyCallbacks.forEach((r) => r()), n.readyCallbacks = [], n.router;
133
+ }
134
+ function E(e) {
135
+ const o = e, t = {};
136
+ for (const r of d) {
137
+ if (typeof o[r] == "object") {
138
+ t[r] = Object.assign(Array.isArray(o[r]) ? [] : {}, o[r]);
139
+ continue;
140
+ }
141
+ t[r] = o[r];
142
+ }
143
+ return t.events = i.default.events, h.forEach((r) => {
144
+ t[r] = function() {
145
+ for (var s = arguments.length, c = new Array(s), a = 0; a < s; a++)
146
+ c[a] = arguments[a];
147
+ return o[r](...c);
148
+ };
149
+ }), t;
150
+ }
151
+ (typeof u.default == "function" || typeof u.default == "object" && u.default !== null) && typeof u.default.__esModule > "u" && (Object.defineProperty(u.default, "__esModule", { value: !0 }), Object.assign(u.default, u), g.exports = u.default);
152
+ }(l, l.exports), l.exports);
23
153
  }
24
154
  export {
25
- f as composeRefs
155
+ W as __require
26
156
  };
package/dist/index63.mjs CHANGED
@@ -1,156 +1,26 @@
1
1
  'use client';
2
- import { __module as l } from "./index68.mjs";
3
- import "./index69.mjs";
4
- import j from "react";
5
- import { __require as A } from "./index70.mjs";
6
- import { __require as O } from "./index71.mjs";
7
- import { __require as x } from "./index72.mjs";
8
- import { __require as F } from "./index73.mjs";
9
- import { __exports as M } from "./index74.mjs";
10
- var p;
11
- function W() {
12
- return p ? l.exports : (p = 1, function(g, u) {
13
- Object.defineProperty(u, "__esModule", {
14
- value: !0
15
- });
16
- function _(e, o) {
17
- for (var t in o) Object.defineProperty(e, t, {
18
- enumerable: !0,
19
- get: o[t]
20
- });
21
- }
22
- _(u, {
23
- Router: function() {
24
- return i.default;
25
- },
26
- createRouter: function() {
27
- return P;
28
- },
29
- // Export the singletonRouter and this is the public API.
30
- default: function() {
31
- return v;
32
- },
33
- makePublicRouterInstance: function() {
34
- return E;
35
- },
36
- useRouter: function() {
37
- return q;
38
- },
39
- withRouter: function() {
40
- return w.default;
41
- }
42
- });
43
- const f = M, R = /* @__PURE__ */ f._(j), i = /* @__PURE__ */ f._(A()), b = O(), y = /* @__PURE__ */ f._(x()), w = /* @__PURE__ */ f._(F()), n = {
44
- router: null,
45
- readyCallbacks: [],
46
- ready(e) {
47
- if (this.router) return e();
48
- typeof window < "u" && this.readyCallbacks.push(e);
49
- }
50
- }, d = [
51
- "pathname",
52
- "route",
53
- "query",
54
- "asPath",
55
- "components",
56
- "isFallback",
57
- "basePath",
58
- "locale",
59
- "locales",
60
- "defaultLocale",
61
- "isReady",
62
- "isPreview",
63
- "isLocaleDomain",
64
- "domainLocales"
65
- ], C = [
66
- "routeChangeStart",
67
- "beforeHistoryChange",
68
- "routeChangeComplete",
69
- "routeChangeError",
70
- "hashChangeStart",
71
- "hashChangeComplete"
72
- ], h = [
73
- "push",
74
- "replace",
75
- "reload",
76
- "back",
77
- "prefetch",
78
- "beforePopState"
79
- ];
80
- Object.defineProperty(n, "events", {
81
- get() {
82
- return i.default.events;
83
- }
2
+ import "react";
3
+ function i(n, o) {
4
+ if (typeof n == "function")
5
+ return n(o);
6
+ n != null && (n.current = o);
7
+ }
8
+ function f(...n) {
9
+ return (o) => {
10
+ let u = !1;
11
+ const c = n.map((t) => {
12
+ const e = i(t, o);
13
+ return !u && typeof e == "function" && (u = !0), e;
84
14
  });
85
- function m() {
86
- if (!n.router) {
87
- const e = `No router instance found.
88
- You should only use "next/router" on the client side of your app.
89
- `;
90
- throw new Error(e);
91
- }
92
- return n.router;
93
- }
94
- d.forEach((e) => {
95
- Object.defineProperty(n, e, {
96
- get() {
97
- return m()[e];
15
+ if (u)
16
+ return () => {
17
+ for (let t = 0; t < c.length; t++) {
18
+ const e = c[t];
19
+ typeof e == "function" ? e() : i(n[t], null);
98
20
  }
99
- });
100
- }), h.forEach((e) => {
101
- n[e] = function() {
102
- for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
103
- t[r] = arguments[r];
104
- return m()[e](...t);
105
21
  };
106
- }), C.forEach((e) => {
107
- n.ready(() => {
108
- i.default.events.on(e, function() {
109
- for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
110
- t[r] = arguments[r];
111
- const s = "on" + e.charAt(0).toUpperCase() + e.substring(1), c = n;
112
- if (c[s])
113
- try {
114
- c[s](...t);
115
- } catch (a) {
116
- console.error("Error when running the Router event: " + s), console.error((0, y.default)(a) ? a.message + `
117
- ` + a.stack : a + "");
118
- }
119
- });
120
- });
121
- });
122
- const v = n;
123
- function q() {
124
- const e = R.default.useContext(b.RouterContext);
125
- if (!e)
126
- throw new Error("NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted");
127
- return e;
128
- }
129
- function P() {
130
- for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
131
- o[t] = arguments[t];
132
- return n.router = new i.default(...o), n.readyCallbacks.forEach((r) => r()), n.readyCallbacks = [], n.router;
133
- }
134
- function E(e) {
135
- const o = e, t = {};
136
- for (const r of d) {
137
- if (typeof o[r] == "object") {
138
- t[r] = Object.assign(Array.isArray(o[r]) ? [] : {}, o[r]);
139
- continue;
140
- }
141
- t[r] = o[r];
142
- }
143
- return t.events = i.default.events, h.forEach((r) => {
144
- t[r] = function() {
145
- for (var s = arguments.length, c = new Array(s), a = 0; a < s; a++)
146
- c[a] = arguments[a];
147
- return o[r](...c);
148
- };
149
- }), t;
150
- }
151
- (typeof u.default == "function" || typeof u.default == "object" && u.default !== null) && typeof u.default.__esModule > "u" && (Object.defineProperty(u.default, "__esModule", { value: !0 }), Object.assign(u.default, u), g.exports = u.default);
152
- }(l, l.exports), l.exports);
22
+ };
153
23
  }
154
24
  export {
155
- W as __require
25
+ f as composeRefs
156
26
  };
package/dist/index73.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { __module as u } from "./index133.mjs";
3
3
  import d from "react/jsx-runtime";
4
4
  import "react";
5
- import { __require as c } from "./index63.mjs";
5
+ import { __require as c } from "./index62.mjs";
6
6
  var n;
7
7
  function y() {
8
8
  return n ? u.exports : (n = 1, function(a, e) {
package/dist/index78.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import d from "./index76.mjs";
3
- import U from "./index134.mjs";
4
- import q from "./index135.mjs";
5
- import R from "./index136.mjs";
3
+ import U from "./index135.mjs";
4
+ import q from "./index136.mjs";
5
+ import R from "./index137.mjs";
6
6
  import w from "./index79.mjs";
7
- import A from "./index137.mjs";
8
- import m from "./index138.mjs";
7
+ import A from "./index138.mjs";
8
+ import m from "./index139.mjs";
9
9
  import T from "./index90.mjs";
10
10
  const i = m.validators;
11
11
  class k {
package/dist/index80.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import t from "./index76.mjs";
3
3
  import c from "./index87.mjs";
4
- import u from "./index139.mjs";
4
+ import u from "./index140.mjs";
5
5
  import S from "./index86.mjs";
6
- import h from "./index140.mjs";
7
- import a from "./index141.mjs";
6
+ import h from "./index141.mjs";
7
+ import a from "./index142.mjs";
8
8
  import O from "./index81.mjs";
9
9
  function y(i, r, e) {
10
10
  if (t.isString(i))
package/dist/index90.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import i from "./index76.mjs";
3
- import S from "./index142.mjs";
3
+ import S from "./index143.mjs";
4
4
  const h = Symbol("internals");
5
5
  function y(r) {
6
6
  return r && String(r).trim().toLowerCase();
package/dist/index91.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import s from "./index76.mjs";
3
- import m from "./index143.mjs";
4
- import u from "./index144.mjs";
5
- import { getFetch as b } from "./index145.mjs";
3
+ import m from "./index144.mjs";
4
+ import u from "./index145.mjs";
5
+ import { getFetch as b } from "./index146.mjs";
6
6
  import d from "./index87.mjs";
7
7
  const p = {
8
8
  http: m,
@@ -1 +1 @@
1
- {"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../../src/providers/StorefrontProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG1E,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CAC5D;AA0BD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,aAAa,EACb,iBAAiB,GAClB,EAAE,uBAAuB,2CAYzB"}
1
+ {"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../../src/providers/StorefrontProvider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG1E,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CAC5D;AA0BD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,aAAa,EACb,iBAAiB,GAClB,EAAE,uBAAuB,2CAezB"}