@instockng/storefront-ui 1.0.76 → 1.0.78

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 (159) hide show
  1. package/dist/contexts/CartContext.d.ts.map +1 -1
  2. package/dist/index100.mjs +1 -1
  3. package/dist/index101.mjs +2 -2
  4. package/dist/index102.mjs +2 -2
  5. package/dist/index105.mjs +2 -21
  6. package/dist/index106.mjs +25 -53
  7. package/dist/index107.mjs +17 -28
  8. package/dist/index108.mjs +214 -6
  9. package/dist/index109.mjs +177 -49
  10. package/dist/index110.mjs +22 -6
  11. package/dist/index111.mjs +22 -11
  12. package/dist/index112.mjs +33 -7
  13. package/dist/index113.mjs +156 -28
  14. package/dist/index114.mjs +20 -2
  15. package/dist/index115.mjs +29 -68
  16. package/dist/index116.mjs +78 -161
  17. package/dist/index117.mjs +38 -2
  18. package/dist/index118.mjs +143 -26
  19. package/dist/index119.mjs +50 -13
  20. package/dist/index120.mjs +19 -211
  21. package/dist/index121.mjs +22 -175
  22. package/dist/index122.mjs +16 -15
  23. package/dist/index123.mjs +18 -16
  24. package/dist/index124.mjs +14 -26
  25. package/dist/index125.mjs +16 -150
  26. package/dist/index126.mjs +14 -13
  27. package/dist/index127.mjs +58 -24
  28. package/dist/index128.mjs +11 -77
  29. package/dist/index129.mjs +30 -29
  30. package/dist/index130.mjs +19 -140
  31. package/dist/index131.mjs +29 -50
  32. package/dist/index132.mjs +21 -17
  33. package/dist/index133.mjs +11 -19
  34. package/dist/index134.mjs +15 -17
  35. package/dist/index135.mjs +40 -18
  36. package/dist/index136.mjs +16 -14
  37. package/dist/index137.mjs +263 -17
  38. package/dist/index138.mjs +63 -14
  39. package/dist/index139.mjs +7 -64
  40. package/dist/index140.mjs +2 -18
  41. package/dist/index141.mjs +2 -39
  42. package/dist/index142.mjs +27 -18
  43. package/dist/index143.mjs +2 -34
  44. package/dist/index144.mjs +20 -26
  45. package/dist/index145.mjs +54 -17
  46. package/dist/index146.mjs +28 -20
  47. package/dist/index147.mjs +6 -46
  48. package/dist/index148.mjs +50 -21
  49. package/dist/index149.mjs +6 -268
  50. package/dist/index150.mjs +11 -69
  51. package/dist/index151.mjs +7 -8
  52. package/dist/index152.mjs +28 -2
  53. package/dist/index153.mjs +2 -2
  54. package/dist/index154.mjs +67 -30
  55. package/dist/index155.mjs +167 -2
  56. package/dist/index159.mjs +1 -1
  57. package/dist/index160.mjs +1 -1
  58. package/dist/index162.mjs +1 -1
  59. package/dist/index163.mjs +1 -1
  60. package/dist/index165.mjs +1 -1
  61. package/dist/index166.mjs +1 -1
  62. package/dist/index168.mjs +3 -3
  63. package/dist/index169.mjs +1 -1
  64. package/dist/index174.mjs +2 -2
  65. package/dist/index176.mjs +1 -1
  66. package/dist/index178.mjs +2 -2
  67. package/dist/index179.mjs +5 -5
  68. package/dist/index182.mjs +1 -1
  69. package/dist/index185.mjs +1 -1
  70. package/dist/index188.mjs +2 -2
  71. package/dist/index193.mjs +1 -1
  72. package/dist/index195.mjs +1 -1
  73. package/dist/index199.mjs +1 -1
  74. package/dist/index201.mjs +2 -2
  75. package/dist/index210.mjs +2 -2
  76. package/dist/index212.mjs +1 -1
  77. package/dist/index213.mjs +1 -1
  78. package/dist/index214.mjs +2 -31
  79. package/dist/index215.mjs +30 -10
  80. package/dist/index216.mjs +10 -3
  81. package/dist/index217.mjs +3 -3
  82. package/dist/index218.mjs +4 -13
  83. package/dist/index219.mjs +13 -7
  84. package/dist/index220.mjs +7 -12
  85. package/dist/index221.mjs +11 -4
  86. package/dist/index222.mjs +5 -33
  87. package/dist/index223.mjs +33 -31
  88. package/dist/index224.mjs +28 -25
  89. package/dist/index225.mjs +26 -59
  90. package/dist/index226.mjs +61 -2
  91. package/dist/index227.mjs +2 -2
  92. package/dist/index228.mjs +2 -2
  93. package/dist/index230.mjs +2 -2
  94. package/dist/index231.mjs +108 -2
  95. package/dist/index232.mjs +2 -2
  96. package/dist/index233.mjs +2 -37
  97. package/dist/index234.mjs +2 -2
  98. package/dist/index236.mjs +2 -2
  99. package/dist/index237.mjs +2 -244
  100. package/dist/index238.mjs +244 -2
  101. package/dist/index239.mjs +2 -33
  102. package/dist/index240.mjs +28 -60
  103. package/dist/index241.mjs +60 -20
  104. package/dist/index242.mjs +25 -2
  105. package/dist/index243.mjs +2 -2
  106. package/dist/index244.mjs +25 -96
  107. package/dist/index245.mjs +2 -2
  108. package/dist/index246.mjs +2 -2
  109. package/dist/index247.mjs +2 -2
  110. package/dist/index252.mjs +2 -2
  111. package/dist/index253.mjs +2 -2
  112. package/dist/index254.mjs +2 -2
  113. package/dist/index255.mjs +4 -2
  114. package/dist/index256.mjs +2 -2
  115. package/dist/index257.mjs +2 -4
  116. package/dist/index258.mjs +1 -1
  117. package/dist/index263.mjs +1 -1
  118. package/dist/index264.mjs +1 -1
  119. package/dist/index265.mjs +2 -2
  120. package/dist/index269.mjs +2 -2
  121. package/dist/index270.mjs +2 -2
  122. package/dist/index271.mjs +2 -2
  123. package/dist/index272.mjs +2 -91
  124. package/dist/index273.mjs +91 -2
  125. package/dist/index3.mjs +99 -99
  126. package/dist/index36.mjs +1 -1
  127. package/dist/index37.mjs +1 -1
  128. package/dist/index38.mjs +1 -1
  129. package/dist/index39.mjs +1 -1
  130. package/dist/index40.mjs +1 -1
  131. package/dist/index41.mjs +2 -2
  132. package/dist/index43.mjs +2 -2
  133. package/dist/index50.mjs +1 -1
  134. package/dist/index57.mjs +1 -1
  135. package/dist/index58.mjs +1 -1
  136. package/dist/index59.mjs +1 -1
  137. package/dist/index60.mjs +1 -1
  138. package/dist/index61.mjs +1 -1
  139. package/dist/index62.mjs +1 -1
  140. package/dist/index63.mjs +1 -1
  141. package/dist/index64.mjs +1 -1
  142. package/dist/index65.mjs +1 -1
  143. package/dist/index66.mjs +1 -1
  144. package/dist/index67.mjs +1 -1
  145. package/dist/index68.mjs +1 -1
  146. package/dist/index69.mjs +1 -1
  147. package/dist/index70.mjs +4 -23
  148. package/dist/index71.mjs +23 -2
  149. package/dist/index72.mjs +23 -4
  150. package/dist/index73.mjs +149 -19
  151. package/dist/index74.mjs +2 -153
  152. package/dist/index77.mjs +1 -1
  153. package/dist/index80.mjs +5 -5
  154. package/dist/index82.mjs +3 -3
  155. package/dist/index92.mjs +1 -1
  156. package/dist/index93.mjs +3 -3
  157. package/dist/index99.mjs +35 -35
  158. package/package.json +1 -1
  159. package/src/contexts/CartContext.tsx +13 -6
package/dist/index73.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 "./index97.mjs";
3
+ import "./index98.mjs";
4
+ import j from "react";
5
+ import { __require as A } from "./index99.mjs";
6
+ import { __require as O } from "./index100.mjs";
7
+ import { __require as x } from "./index101.mjs";
8
+ import { __require as F } from "./index102.mjs";
9
+ import { __exports as M } from "./index103.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/index74.mjs CHANGED
@@ -1,156 +1,5 @@
1
1
  'use client';
2
- import { __module as l } from "./index97.mjs";
3
- import "./index98.mjs";
4
- import j from "react";
5
- import { __require as A } from "./index99.mjs";
6
- import { __require as O } from "./index100.mjs";
7
- import { __require as x } from "./index101.mjs";
8
- import { __require as F } from "./index102.mjs";
9
- import { __exports as M } from "./index103.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
- }
84
- });
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];
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);
105
- };
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);
153
- }
2
+ var e = { exports: {} };
154
3
  export {
155
- W as __require
4
+ e as __module
156
5
  };
package/dist/index77.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { getDefaultExportFromCjs as d } from "./index70.mjs";
2
+ import { getDefaultExportFromCjs as d } from "./index72.mjs";
3
3
  import { __module as v } from "./index104.mjs";
4
4
  v.exports = function(n) {
5
5
  return g(m(n), n);
package/dist/index80.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import d from "./index78.mjs";
3
- import U from "./index105.mjs";
4
- import q from "./index106.mjs";
5
- import R from "./index107.mjs";
3
+ import U from "./index144.mjs";
4
+ import q from "./index145.mjs";
5
+ import R from "./index146.mjs";
6
6
  import w from "./index81.mjs";
7
- import A from "./index108.mjs";
8
- import m from "./index109.mjs";
7
+ import A from "./index147.mjs";
8
+ import m from "./index148.mjs";
9
9
  import T from "./index92.mjs";
10
10
  const i = m.validators;
11
11
  class k {
package/dist/index82.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import t from "./index78.mjs";
3
3
  import c from "./index89.mjs";
4
- import u from "./index110.mjs";
4
+ import u from "./index149.mjs";
5
5
  import S from "./index88.mjs";
6
- import h from "./index111.mjs";
7
- import a from "./index112.mjs";
6
+ import h from "./index150.mjs";
7
+ import a from "./index151.mjs";
8
8
  import O from "./index83.mjs";
9
9
  function y(i, r, e) {
10
10
  if (t.isString(i))
package/dist/index92.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import i from "./index78.mjs";
3
- import S from "./index113.mjs";
3
+ import S from "./index152.mjs";
4
4
  const h = Symbol("internals");
5
5
  function y(r) {
6
6
  return r && String(r).trim().toLowerCase();
package/dist/index93.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import s from "./index78.mjs";
3
- import m from "./index114.mjs";
4
- import u from "./index115.mjs";
5
- import { getFetch as b } from "./index116.mjs";
3
+ import m from "./index153.mjs";
4
+ import u from "./index154.mjs";
5
+ import { getFetch as b } from "./index155.mjs";
6
6
  import d from "./index89.mjs";
7
7
  const p = {
8
8
  http: m,
package/dist/index99.mjs CHANGED
@@ -1,41 +1,41 @@
1
1
  'use client';
2
- import { __exports as ge } from "./index117.mjs";
2
+ import { __exports as ge } from "./index105.mjs";
3
3
  import "./index98.mjs";
4
- import { __require as $e } from "./index118.mjs";
5
- import { __require as Ze } from "./index119.mjs";
6
- import { __require as et } from "./index120.mjs";
7
- import { __require as tt } from "./index121.mjs";
4
+ import { __require as $e } from "./index106.mjs";
5
+ import { __require as Ze } from "./index107.mjs";
6
+ import { __require as et } from "./index108.mjs";
7
+ import { __require as tt } from "./index109.mjs";
8
8
  import { __require as rt } from "./index101.mjs";
9
- import { __require as at } from "./index122.mjs";
10
- import { __require as st } from "./index123.mjs";
11
- import { __require as it } from "./index124.mjs";
12
- import { __require as ot } from "./index125.mjs";
13
- import { __require as nt } from "./index126.mjs";
14
- import { __require as lt } from "./index127.mjs";
15
- import { __require as ct } from "./index128.mjs";
16
- import { __require as ht } from "./index129.mjs";
17
- import { __require as ut } from "./index130.mjs";
18
- import { __require as dt } from "./index131.mjs";
19
- import { __require as ft } from "./index132.mjs";
20
- import { __require as pt } from "./index133.mjs";
21
- import { __require as mt } from "./index134.mjs";
22
- import { __require as _t } from "./index135.mjs";
23
- import { __require as gt } from "./index136.mjs";
24
- import { __require as vt } from "./index137.mjs";
25
- import { __require as wt } from "./index138.mjs";
26
- import { __require as Pt } from "./index139.mjs";
27
- import { __require as Rt } from "./index140.mjs";
28
- import { __require as St } from "./index141.mjs";
29
- import { __require as Et } from "./index142.mjs";
30
- import { __require as yt } from "./index143.mjs";
31
- import { __require as Nt } from "./index144.mjs";
32
- import { __require as Lt } from "./index145.mjs";
33
- import { __require as Tt } from "./index146.mjs";
34
- import { __require as At } from "./index147.mjs";
35
- import { __require as qt } from "./index148.mjs";
36
- import { __require as Ct } from "./index149.mjs";
37
- import { __require as It } from "./index150.mjs";
38
- import { __require as Dt } from "./index151.mjs";
9
+ import { __require as at } from "./index110.mjs";
10
+ import { __require as st } from "./index111.mjs";
11
+ import { __require as it } from "./index112.mjs";
12
+ import { __require as ot } from "./index113.mjs";
13
+ import { __require as nt } from "./index114.mjs";
14
+ import { __require as lt } from "./index115.mjs";
15
+ import { __require as ct } from "./index116.mjs";
16
+ import { __require as ht } from "./index117.mjs";
17
+ import { __require as ut } from "./index118.mjs";
18
+ import { __require as dt } from "./index119.mjs";
19
+ import { __require as ft } from "./index120.mjs";
20
+ import { __require as pt } from "./index121.mjs";
21
+ import { __require as mt } from "./index122.mjs";
22
+ import { __require as _t } from "./index123.mjs";
23
+ import { __require as gt } from "./index124.mjs";
24
+ import { __require as vt } from "./index125.mjs";
25
+ import { __require as wt } from "./index126.mjs";
26
+ import { __require as Pt } from "./index127.mjs";
27
+ import { __require as Rt } from "./index128.mjs";
28
+ import { __require as St } from "./index129.mjs";
29
+ import { __require as Et } from "./index130.mjs";
30
+ import { __require as yt } from "./index131.mjs";
31
+ import { __require as Nt } from "./index132.mjs";
32
+ import { __require as Lt } from "./index133.mjs";
33
+ import { __require as Tt } from "./index134.mjs";
34
+ import { __require as At } from "./index135.mjs";
35
+ import { __require as qt } from "./index136.mjs";
36
+ import { __require as Ct } from "./index137.mjs";
37
+ import { __require as It } from "./index138.mjs";
38
+ import { __require as Dt } from "./index139.mjs";
39
39
  import { __exports as bt } from "./index103.mjs";
40
40
  var Ue;
41
41
  function wr() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instockng/storefront-ui",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "Pre-built UI components for OMS e-commerce sites",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -264,6 +264,7 @@ export function CartProvider({ children, brandSlug, initialCartId, shoppingCartP
264
264
 
265
265
  // Add item to cart via API
266
266
  // Refresh recommendations only if cart is not visible
267
+ const shouldRefreshRecommendations = !isOpen;
267
268
  const updatedCart = await addItemMutation.mutateAsync({
268
269
  sku,
269
270
  quantity,
@@ -271,9 +272,15 @@ export function CartProvider({ children, brandSlug, initialCartId, shoppingCartP
271
272
  fbp,
272
273
  ttp,
273
274
  ttclid,
274
- refreshRecommendations: !isOpen
275
+ refreshRecommendations: shouldRefreshRecommendations
275
276
  });
276
277
 
278
+ // Invalidate recommendations cache only if cart was closed when adding
279
+ // (to avoid refreshing while user is viewing the cart)
280
+ if (shouldRefreshRecommendations && cartId) {
281
+ queryClient.invalidateQueries({ queryKey: queryKeys.public.carts.recommendations(cartId) });
282
+ }
283
+
277
284
  // Skip tracking if error response
278
285
  if ('error' in updatedCart) return;
279
286
 
@@ -287,14 +294,14 @@ export function CartProvider({ children, brandSlug, initialCartId, shoppingCartP
287
294
  // Generate event ID matching backend format: cart_{cartId}_item_{itemId}
288
295
  const eventID = `cart_${cartId}_item_${addedItem.id}`;
289
296
 
290
- // Track AddToCart event with Meta Pixel and matching event ID
291
- trackMetaAddToCart(sku, productName, price, quantity, eventID);
297
+ // Track AddToCart event with Meta Pixel using product slug to match catalog
298
+ trackMetaAddToCart(productSlug, productName, price, quantity, eventID);
292
299
 
293
300
  // Track AddToCart event with TikTok Pixel and matching event ID
294
301
  trackTikTokAddToCart(productSlug, productName, price, quantity, eventID);
295
302
  } else {
296
303
  // Fallback without event ID if item not found
297
- trackMetaAddToCart(sku, productName, price, quantity);
304
+ trackMetaAddToCart(productSlug, productName, price, quantity);
298
305
  trackTikTokAddToCart(productSlug, productName, price, quantity);
299
306
  }
300
307
  },
@@ -366,9 +373,9 @@ export function CartProvider({ children, brandSlug, initialCartId, shoppingCartP
366
373
  const cartTotal = cart.pricing.total;
367
374
  const itemCount = cart.items.reduce((sum, item) => sum + item.quantity, 0);
368
375
 
369
- // Prepare rich data for Pixel and CAPI
376
+ // Prepare rich data for Pixel and CAPI - use product slug to match catalog
370
377
  const contents = cart.items.map(item => ({
371
- id: item.variant.sku,
378
+ id: item.variant.product.slug,
372
379
  quantity: item.quantity,
373
380
  item_price: Number(item.variant.price),
374
381
  }));