@instockng/storefront-ui 1.0.55 → 1.0.56

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 (229) hide show
  1. package/dist/components/ProductAddOns.d.ts +22 -0
  2. package/dist/components/ProductAddOns.d.ts.map +1 -0
  3. package/dist/components/ui/switch.d.ts +8 -0
  4. package/dist/components/ui/switch.d.ts.map +1 -0
  5. package/dist/index.mjs +58 -56
  6. package/dist/index101.mjs +1 -1
  7. package/dist/index102.mjs +1 -1
  8. package/dist/index103.mjs +6 -6
  9. package/dist/index104.mjs +4 -4
  10. package/dist/index105.mjs +3 -3
  11. package/dist/index106.mjs +1 -1
  12. package/dist/index107.mjs +1 -1
  13. package/dist/index108.mjs +1 -1
  14. package/dist/index109.mjs +2 -2
  15. package/dist/index110.mjs +2 -2
  16. package/dist/index111.mjs +3 -3
  17. package/dist/index112.mjs +1 -1
  18. package/dist/index113.mjs +3 -3
  19. package/dist/index114.mjs +2 -2
  20. package/dist/index115.mjs +2 -2
  21. package/dist/index116.mjs +1 -1
  22. package/dist/index117.mjs +3 -3
  23. package/dist/index118.mjs +1 -1
  24. package/dist/index119.mjs +1 -1
  25. package/dist/index120.mjs +3 -3
  26. package/dist/index121.mjs +2 -2
  27. package/dist/index122.mjs +4 -4
  28. package/dist/index123.mjs +1 -1
  29. package/dist/index124.mjs +3 -3
  30. package/dist/index125.mjs +4 -4
  31. package/dist/index126.mjs +1 -1
  32. package/dist/index127.mjs +1 -1
  33. package/dist/index128.mjs +1 -1
  34. package/dist/index129.mjs +1 -1
  35. package/dist/index130.mjs +1 -1
  36. package/dist/index131.mjs +1 -1
  37. package/dist/index132.mjs +1 -1
  38. package/dist/index133.mjs +2 -2
  39. package/dist/index134.mjs +3 -3
  40. package/dist/index137.mjs +1 -1
  41. package/dist/index139.mjs +21 -2
  42. package/dist/index140.mjs +56 -2
  43. package/dist/index141.mjs +29 -2
  44. package/dist/index142.mjs +7 -2
  45. package/dist/index143.mjs +50 -16
  46. package/dist/index144.mjs +6 -32
  47. package/dist/index145.mjs +11 -37
  48. package/dist/index146.mjs +7 -18
  49. package/dist/index147.mjs +28 -18
  50. package/dist/index148.mjs +2 -2
  51. package/dist/index149.mjs +70 -20
  52. package/dist/index150.mjs +163 -42
  53. package/dist/index151.mjs +2 -2
  54. package/dist/index152.mjs +2 -30
  55. package/dist/index153.mjs +2 -18
  56. package/dist/index154.mjs +18 -2
  57. package/dist/index155.mjs +32 -2
  58. package/dist/index156.mjs +38 -2
  59. package/dist/index157.mjs +18 -2
  60. package/dist/index158.mjs +13 -67
  61. package/dist/index159.mjs +2 -2
  62. package/dist/index160.mjs +15 -48
  63. package/dist/index161.mjs +46 -2
  64. package/dist/index162.mjs +2 -36
  65. package/dist/index163.mjs +20 -142
  66. package/dist/index164.mjs +18 -2
  67. package/dist/index165.mjs +2 -2
  68. package/dist/index166.mjs +2 -19
  69. package/dist/index168.mjs +2 -2
  70. package/dist/index169.mjs +64 -18
  71. package/dist/index170.mjs +2 -2
  72. package/dist/index171.mjs +53 -2
  73. package/dist/index172.mjs +2 -24
  74. package/dist/index173.mjs +28 -15
  75. package/dist/index174.mjs +152 -2
  76. package/dist/index175.mjs +2 -2
  77. package/dist/index176.mjs +2 -2
  78. package/dist/index177.mjs +10 -14
  79. package/dist/index178.mjs +2 -2
  80. package/dist/index179.mjs +2 -23
  81. package/dist/index180.mjs +26 -2
  82. package/dist/index181.mjs +2 -2
  83. package/dist/index182.mjs +2 -2
  84. package/dist/index183.mjs +17 -16
  85. package/dist/index184.mjs +23 -2
  86. package/dist/index185.mjs +2 -23
  87. package/dist/index186.mjs +2 -2
  88. package/dist/index187.mjs +2 -2
  89. package/dist/index188.mjs +23 -2
  90. package/dist/index189.mjs +2 -2
  91. package/dist/index190.mjs +23 -2
  92. package/dist/index191.mjs +2 -2
  93. package/dist/index192.mjs +2 -2
  94. package/dist/index193.mjs +2 -2
  95. package/dist/index194.mjs +20 -124
  96. package/dist/index195.mjs +2 -2
  97. package/dist/index196.mjs +20 -71
  98. package/dist/index197.mjs +2 -74
  99. package/dist/index198.mjs +2 -21
  100. package/dist/index199.mjs +2 -56
  101. package/dist/index20.mjs +24 -22
  102. package/dist/index200.mjs +2 -29
  103. package/dist/index201.mjs +2 -7
  104. package/dist/index202.mjs +2 -52
  105. package/dist/index203.mjs +2 -6
  106. package/dist/index204.mjs +2 -12
  107. package/dist/index205.mjs +127 -7
  108. package/dist/index206.mjs +2 -28
  109. package/dist/index207.mjs +74 -2
  110. package/dist/index208.mjs +73 -69
  111. package/dist/index209.mjs +2 -167
  112. package/dist/index210.mjs +31 -2
  113. package/dist/index211.mjs +11 -2
  114. package/dist/index212.mjs +4 -2
  115. package/dist/index213.mjs +4 -2
  116. package/dist/index214.mjs +13 -2
  117. package/dist/index215.mjs +7 -2
  118. package/dist/index216.mjs +11 -107
  119. package/dist/index217.mjs +5 -2
  120. package/dist/index218.mjs +33 -2
  121. package/dist/index219.mjs +29 -35
  122. package/dist/index220.mjs +28 -2
  123. package/dist/index221.mjs +58 -241
  124. package/dist/index222.mjs +2 -2
  125. package/dist/index223.mjs +103 -28
  126. package/dist/index224.mjs +2 -65
  127. package/dist/index225.mjs +2 -25
  128. package/dist/index226.mjs +2 -2
  129. package/dist/index227.mjs +2 -2
  130. package/dist/index228.mjs +2 -2
  131. package/dist/index229.mjs +2 -2
  132. package/dist/index230.mjs +2 -2
  133. package/dist/index232.mjs +2 -2
  134. package/dist/index233.mjs +37 -2
  135. package/dist/index235.mjs +244 -2
  136. package/dist/index236.mjs +2 -2
  137. package/dist/index237.mjs +33 -2
  138. package/dist/index238.mjs +65 -4
  139. package/dist/index239.mjs +25 -2
  140. package/dist/index24.mjs +28 -26
  141. package/dist/index240.mjs +2 -2
  142. package/dist/index241.mjs +2 -31
  143. package/dist/index242.mjs +2 -11
  144. package/dist/index243.mjs +2 -4
  145. package/dist/index244.mjs +2 -4
  146. package/dist/index245.mjs +2 -13
  147. package/dist/index246.mjs +2 -7
  148. package/dist/index247.mjs +2 -12
  149. package/dist/index248.mjs +2 -5
  150. package/dist/index249.mjs +2 -33
  151. package/dist/index25.mjs +18 -8
  152. package/dist/index250.mjs +4 -31
  153. package/dist/index251.mjs +2 -28
  154. package/dist/index252.mjs +2 -61
  155. package/dist/index253.mjs +3 -2
  156. package/dist/index254.mjs +2 -2
  157. package/dist/index255.mjs +2 -18
  158. package/dist/index256.mjs +16 -46
  159. package/dist/index257.mjs +13 -2
  160. package/dist/index258.mjs +6 -2
  161. package/dist/index259.mjs +30 -2
  162. package/dist/index261.mjs +2 -91
  163. package/dist/index262.mjs +2 -2
  164. package/dist/index263.mjs +2 -3
  165. package/dist/index264.mjs +2 -2
  166. package/dist/index265.mjs +91 -2
  167. package/dist/index266.mjs +2 -17
  168. package/dist/index267.mjs +17 -12
  169. package/dist/index268.mjs +47 -6
  170. package/dist/index269.mjs +2 -30
  171. package/dist/index30.mjs +6 -4
  172. package/dist/index31.mjs +13 -12
  173. package/dist/index32.mjs +56 -54
  174. package/dist/index33.mjs +1 -1
  175. package/dist/index34.mjs +1 -1
  176. package/dist/index35.mjs +20 -12
  177. package/dist/index36.mjs +1 -1
  178. package/dist/index37.mjs +1 -1
  179. package/dist/index40.mjs +1 -1
  180. package/dist/index43.mjs +3 -3
  181. package/dist/index52.mjs +17 -17
  182. package/dist/index53.mjs +2 -2
  183. package/dist/index54.mjs +1 -1
  184. package/dist/index55.mjs +1 -1
  185. package/dist/index56.mjs +68 -38
  186. package/dist/index57.mjs +1 -1
  187. package/dist/index58.mjs +1 -1
  188. package/dist/index59.mjs +1 -1
  189. package/dist/index60.mjs +1 -1
  190. package/dist/index61.mjs +1 -1
  191. package/dist/index62.mjs +1 -1
  192. package/dist/index63.mjs +1 -1
  193. package/dist/index64.mjs +1 -1
  194. package/dist/index67.mjs +4 -152
  195. package/dist/index69.mjs +149 -71
  196. package/dist/index70.mjs +74 -14
  197. package/dist/index71.mjs +14 -62
  198. package/dist/index72.mjs +62 -4
  199. package/dist/index78.mjs +1 -1
  200. package/dist/index80.mjs +235 -2
  201. package/dist/index81.mjs +6 -34
  202. package/dist/index82.mjs +130 -39
  203. package/dist/index83.mjs +62 -229
  204. package/dist/index84.mjs +86 -5
  205. package/dist/index85.mjs +26 -131
  206. package/dist/index86.mjs +8 -67
  207. package/dist/index87.mjs +71 -83
  208. package/dist/index88.mjs +3 -28
  209. package/dist/index89.mjs +2 -9
  210. package/dist/index90.mjs +78 -70
  211. package/dist/index91.mjs +53 -3
  212. package/dist/index92.mjs +6 -2
  213. package/dist/index93.mjs +4 -82
  214. package/dist/index94.mjs +176 -51
  215. package/dist/index95.mjs +53 -6
  216. package/dist/index96.mjs +69 -5
  217. package/dist/index97.mjs +34 -179
  218. package/dist/index98.mjs +41 -51
  219. package/dist/index99.mjs +2 -69
  220. package/dist/lib/utils.d.ts.map +1 -1
  221. package/dist/styles.css +1 -1
  222. package/package.json +2 -2
  223. package/src/components/Checkout.stories.tsx +9 -4
  224. package/src/components/ProductAddOns.stories.tsx +109 -0
  225. package/src/components/ProductAddOns.tsx +242 -0
  226. package/src/components/ShoppingCart.stories.tsx +4 -1
  227. package/src/components/ui/switch.tsx +37 -0
  228. package/src/lib/utils.ts +3 -1
  229. package/src/test-utils/MockCartProvider.tsx +14 -7
package/dist/index267.mjs CHANGED
@@ -1,16 +1,21 @@
1
1
  'use client';
2
- function h(r, a) {
3
- let s = 0, u = 1e3 / a, e, t;
4
- const n = (l, o = Date.now()) => {
5
- s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
6
- };
7
- return [(...l) => {
8
- const o = Date.now(), i = o - s;
9
- i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
10
- t = null, n(e);
11
- }, u - i)));
12
- }, () => e && n(e)];
2
+ import { __exports as r } from "./index270.mjs";
3
+ var u;
4
+ function s() {
5
+ return u ? r : (u = 1, function(n) {
6
+ Object.defineProperty(n, "__esModule", {
7
+ value: !0
8
+ }), Object.defineProperty(n, "ensureLeadingSlash", {
9
+ enumerable: !0,
10
+ get: function() {
11
+ return t;
12
+ }
13
+ });
14
+ function t(e) {
15
+ return e.startsWith("/") ? e : "/" + e;
16
+ }
17
+ }(r), r);
13
18
  }
14
19
  export {
15
- h as default
20
+ s as __require
16
21
  };
package/dist/index268.mjs CHANGED
@@ -1,9 +1,50 @@
1
1
  'use client';
2
- import o from "./index205.mjs";
3
- const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
4
- new URL(o.origin),
5
- o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
6
- ) : () => !0;
2
+ import { __exports as u } from "./index271.mjs";
3
+ var _;
4
+ function g() {
5
+ return _ ? u : (_ = 1, function(i) {
6
+ Object.defineProperty(i, "__esModule", {
7
+ value: !0
8
+ });
9
+ function a(e, n) {
10
+ for (var t in n) Object.defineProperty(e, t, {
11
+ enumerable: !0,
12
+ get: n[t]
13
+ });
14
+ }
15
+ a(i, {
16
+ DEFAULT_SEGMENT_KEY: function() {
17
+ return E;
18
+ },
19
+ PAGE_SEGMENT_KEY: function() {
20
+ return r;
21
+ },
22
+ addSearchParamsIfPageSegment: function() {
23
+ return s;
24
+ },
25
+ isGroupSegment: function() {
26
+ return c;
27
+ },
28
+ isParallelRouteSegment: function() {
29
+ return f;
30
+ }
31
+ });
32
+ function c(e) {
33
+ return e[0] === "(" && e.endsWith(")");
34
+ }
35
+ function f(e) {
36
+ return e.startsWith("@") && e !== "@children";
37
+ }
38
+ function s(e, n) {
39
+ if (e.includes(r)) {
40
+ const o = JSON.stringify(n);
41
+ return o !== "{}" ? r + "?" + o : r;
42
+ }
43
+ return e;
44
+ }
45
+ const r = "__PAGE__", E = "__DEFAULT__";
46
+ }(u), u);
47
+ }
7
48
  export {
8
- n as default
49
+ g as __require
9
50
  };
package/dist/index269.mjs CHANGED
@@ -1,33 +1,5 @@
1
1
  'use client';
2
- import r from "./index83.mjs";
3
- import c from "./index205.mjs";
4
- const p = c.hasStandardBrowserEnv ? (
5
- // Standard browser envs support document.cookie
6
- {
7
- write(e, t, n, i, s, u) {
8
- const o = [e + "=" + encodeURIComponent(t)];
9
- r.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), r.isString(i) && o.push("path=" + i), r.isString(s) && o.push("domain=" + s), u === !0 && o.push("secure"), document.cookie = o.join("; ");
10
- },
11
- read(e) {
12
- const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
13
- return t ? decodeURIComponent(t[3]) : null;
14
- },
15
- remove(e) {
16
- this.write(e, "", Date.now() - 864e5);
17
- }
18
- }
19
- ) : (
20
- // Non-standard browser env (web workers, react-native) lack needed support.
21
- {
22
- write() {
23
- },
24
- read() {
25
- return null;
26
- },
27
- remove() {
28
- }
29
- }
30
- );
2
+ const e = {};
31
3
  export {
32
- p as default
4
+ e as default
33
5
  };
package/dist/index30.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- const n = {
2
+ const d = {
3
3
  // Public API keys (RPC is now the default)
4
4
  public: {
5
5
  all: ["public"],
@@ -16,7 +16,8 @@ const n = {
16
16
  products: {
17
17
  all: ["public", "products"],
18
18
  list: (a) => ["public", "products", a],
19
- detail: (a) => ["public", "products", a]
19
+ detail: (a) => ["public", "products", a],
20
+ addons: (a, s) => ["public", "products", a, "addons", s]
20
21
  },
21
22
  deliveryZones: {
22
23
  all: ["public", "delivery-zones"],
@@ -43,7 +44,8 @@ const n = {
43
44
  products: {
44
45
  all: ["admin", "products"],
45
46
  list: (a) => ["admin", "products", "list", a],
46
- detail: (a) => ["admin", "products", a]
47
+ detail: (a) => ["admin", "products", a],
48
+ addons: (a) => ["admin", "products", a, "addons"]
47
49
  },
48
50
  variants: {
49
51
  all: ["admin", "variants"],
@@ -102,5 +104,5 @@ const n = {
102
104
  }
103
105
  };
104
106
  export {
105
- n as queryKeys
107
+ d as queryKeys
106
108
  };
package/dist/index31.mjs CHANGED
@@ -1,24 +1,25 @@
1
1
  'use client';
2
- import { useAddCartItem as r, useApplyDiscount as o, useCheckoutCart as s, useCreateCart as u, useGetCart as m, useGetCartRecommendations as a, useRemoveCartItem as d, useRemoveDiscount as C, useUpdateCart as n, useUpdateCartItem as p } from "./index33.mjs";
2
+ import { useAddCartItem as r, useApplyDiscount as s, useCheckoutCart as o, useCreateCart as u, useGetCart as d, useGetCartRecommendations as m, useRemoveCartItem as a, useRemoveDiscount as C, useUpdateCart as n, useUpdateCartItem as p } from "./index33.mjs";
3
3
  import { useConfirmOrder as c, useGetOrder as f, useGetOrderRecommendations as i } from "./index34.mjs";
4
- import { useGetProduct as R, useGetProducts as v } from "./index35.mjs";
5
- import { useGetDeliveryZones as I } from "./index36.mjs";
6
- import { useGetBrand as l } from "./index37.mjs";
4
+ import { useGetProduct as O, useGetProductAddOns as R, useGetProducts as v } from "./index35.mjs";
5
+ import { useGetDeliveryZones as D } from "./index36.mjs";
6
+ import { useGetBrand as P } from "./index37.mjs";
7
7
  export {
8
8
  r as useAddCartItem,
9
- o as useApplyDiscount,
10
- s as useCheckoutCart,
9
+ s as useApplyDiscount,
10
+ o as useCheckoutCart,
11
11
  c as useConfirmOrder,
12
12
  u as useCreateCart,
13
- l as useGetBrand,
14
- m as useGetCart,
15
- a as useGetCartRecommendations,
16
- I as useGetDeliveryZones,
13
+ P as useGetBrand,
14
+ d as useGetCart,
15
+ m as useGetCartRecommendations,
16
+ D as useGetDeliveryZones,
17
17
  f as useGetOrder,
18
18
  i as useGetOrderRecommendations,
19
- R as useGetProduct,
19
+ O as useGetProduct,
20
+ R as useGetProductAddOns,
20
21
  v as useGetProducts,
21
- d as useRemoveCartItem,
22
+ a as useRemoveCartItem,
22
23
  C as useRemoveDiscount,
23
24
  n as useUpdateCart,
24
25
  p as useUpdateCartItem
package/dist/index32.mjs CHANGED
@@ -1,69 +1,71 @@
1
1
  'use client';
2
- import { useAddOrderNote as s, useCreateOrder as r, useDeleteOrder as u, useGetOrder as o, useListOrders as a, useUpdateOrder as n, useUpdateOrderStatus as d } from "./index54.mjs";
3
- import { useCreateBrand as p, useDeleteBrand as C, useGetBrand as D, useListBrands as c, useUpdateBrand as l } from "./index55.mjs";
4
- import { useCreateProduct as f, useDeleteProduct as m, useGetProduct as v, useListProducts as x, useUpdateProduct as y } from "./index56.mjs";
5
- import { useCreateVariant as S, useDeleteVariant as U, useGetVariantInventory as O, useListProductVariants as V, useSearchVariants as h, useUpdateVariant as A } from "./index57.mjs";
6
- import { useCreateWarehouse as I, useDeleteWarehouse as P, useGetWarehouseInventory as W, useListWarehouses as Z, useUpdateWarehouse as b } from "./index58.mjs";
7
- import { useAdjustInventory as w, useGetInventoryTransactions as T, useGetLowStockVariants as j, useListInventory as E, useTransferInventory as H } from "./index59.mjs";
8
- import { useGetCustomerHistory as g } from "./index60.mjs";
9
- import { useGetStats as z } from "./index61.mjs";
10
- import { useCleanupExpiredCarts as J, useGetAbandonedCart as K, useGetAbandonedCartStats as M, useListAbandonedCarts as Q } from "./index62.mjs";
11
- import { useBulkGenerateDiscountCodes as X, useCreateDiscountCode as Y, useDeleteDiscountCode as _, useGetDiscountCode as $, useGetDiscountCodeAnalytics as ee, useGetDiscountCodeOverviewStats as te, useListDiscountCodes as se, useUpdateDiscountCode as re } from "./index63.mjs";
12
- import { useCreateDeliveryZone as oe, useCreateState as ae, useDeleteDeliveryZone as ne, useDeleteState as de, useListDeliveryZones as ie, useListStates as pe, useUpdateDeliveryZone as Ce, useUpdateState as De } from "./index64.mjs";
2
+ import { useAddOrderNote as s, useCreateOrder as r, useDeleteOrder as u, useGetOrder as o, useListOrders as a, useUpdateOrder as d, useUpdateOrderStatus as n } from "./index54.mjs";
3
+ import { useCreateBrand as p, useDeleteBrand as C, useGetBrand as c, useListBrands as D, useUpdateBrand as G } from "./index55.mjs";
4
+ import { useCreateProduct as f, useDeleteProduct as m, useGetProduct as v, useGetProductAddOns as x, useListProducts as y, useUpdateProduct as L, useUpdateProductAddOns as O } from "./index56.mjs";
5
+ import { useCreateVariant as U, useDeleteVariant as A, useGetVariantInventory as P, useListProductVariants as V, useSearchVariants as h, useUpdateVariant as B } from "./index57.mjs";
6
+ import { useCreateWarehouse as W, useDeleteWarehouse as Z, useGetWarehouseInventory as b, useListWarehouses as k, useUpdateWarehouse as w } from "./index58.mjs";
7
+ import { useAdjustInventory as j, useGetInventoryTransactions as E, useGetLowStockVariants as H, useListInventory as N, useTransferInventory as g } from "./index59.mjs";
8
+ import { useGetCustomerHistory as z } from "./index60.mjs";
9
+ import { useGetStats as J } from "./index61.mjs";
10
+ import { useCleanupExpiredCarts as M, useGetAbandonedCart as Q, useGetAbandonedCartStats as R, useListAbandonedCarts as X } from "./index62.mjs";
11
+ import { useBulkGenerateDiscountCodes as _, useCreateDiscountCode as $, useDeleteDiscountCode as ee, useGetDiscountCode as te, useGetDiscountCodeAnalytics as se, useGetDiscountCodeOverviewStats as re, useListDiscountCodes as ue, useUpdateDiscountCode as oe } from "./index63.mjs";
12
+ import { useCreateDeliveryZone as de, useCreateState as ne, useDeleteDeliveryZone as ie, useDeleteState as pe, useListDeliveryZones as Ce, useListStates as ce, useUpdateDeliveryZone as De, useUpdateState as Ge } from "./index64.mjs";
13
13
  export {
14
14
  s as useAddOrderNote,
15
- w as useAdjustInventory,
16
- X as useBulkGenerateDiscountCodes,
17
- J as useCleanupExpiredCarts,
15
+ j as useAdjustInventory,
16
+ _ as useBulkGenerateDiscountCodes,
17
+ M as useCleanupExpiredCarts,
18
18
  p as useCreateBrand,
19
- oe as useCreateDeliveryZone,
20
- Y as useCreateDiscountCode,
19
+ de as useCreateDeliveryZone,
20
+ $ as useCreateDiscountCode,
21
21
  r as useCreateOrder,
22
22
  f as useCreateProduct,
23
- ae as useCreateState,
24
- S as useCreateVariant,
25
- I as useCreateWarehouse,
23
+ ne as useCreateState,
24
+ U as useCreateVariant,
25
+ W as useCreateWarehouse,
26
26
  C as useDeleteBrand,
27
- ne as useDeleteDeliveryZone,
28
- _ as useDeleteDiscountCode,
27
+ ie as useDeleteDeliveryZone,
28
+ ee as useDeleteDiscountCode,
29
29
  u as useDeleteOrder,
30
30
  m as useDeleteProduct,
31
- de as useDeleteState,
32
- U as useDeleteVariant,
33
- P as useDeleteWarehouse,
34
- K as useGetAbandonedCart,
35
- M as useGetAbandonedCartStats,
36
- D as useGetBrand,
37
- g as useGetCustomerHistory,
38
- $ as useGetDiscountCode,
39
- ee as useGetDiscountCodeAnalytics,
40
- te as useGetDiscountCodeOverviewStats,
41
- T as useGetInventoryTransactions,
42
- j as useGetLowStockVariants,
31
+ pe as useDeleteState,
32
+ A as useDeleteVariant,
33
+ Z as useDeleteWarehouse,
34
+ Q as useGetAbandonedCart,
35
+ R as useGetAbandonedCartStats,
36
+ c as useGetBrand,
37
+ z as useGetCustomerHistory,
38
+ te as useGetDiscountCode,
39
+ se as useGetDiscountCodeAnalytics,
40
+ re as useGetDiscountCodeOverviewStats,
41
+ E as useGetInventoryTransactions,
42
+ H as useGetLowStockVariants,
43
43
  o as useGetOrder,
44
44
  v as useGetProduct,
45
- z as useGetStats,
46
- O as useGetVariantInventory,
47
- W as useGetWarehouseInventory,
48
- Q as useListAbandonedCarts,
49
- c as useListBrands,
50
- ie as useListDeliveryZones,
51
- se as useListDiscountCodes,
52
- E as useListInventory,
45
+ x as useGetProductAddOns,
46
+ J as useGetStats,
47
+ P as useGetVariantInventory,
48
+ b as useGetWarehouseInventory,
49
+ X as useListAbandonedCarts,
50
+ D as useListBrands,
51
+ Ce as useListDeliveryZones,
52
+ ue as useListDiscountCodes,
53
+ N as useListInventory,
53
54
  a as useListOrders,
54
55
  V as useListProductVariants,
55
- x as useListProducts,
56
- pe as useListStates,
57
- Z as useListWarehouses,
56
+ y as useListProducts,
57
+ ce as useListStates,
58
+ k as useListWarehouses,
58
59
  h as useSearchVariants,
59
- H as useTransferInventory,
60
- l as useUpdateBrand,
61
- Ce as useUpdateDeliveryZone,
62
- re as useUpdateDiscountCode,
63
- n as useUpdateOrder,
64
- d as useUpdateOrderStatus,
65
- y as useUpdateProduct,
66
- De as useUpdateState,
67
- A as useUpdateVariant,
68
- b as useUpdateWarehouse
60
+ g as useTransferInventory,
61
+ G as useUpdateBrand,
62
+ De as useUpdateDeliveryZone,
63
+ oe as useUpdateDiscountCode,
64
+ d as useUpdateOrder,
65
+ n as useUpdateOrderStatus,
66
+ L as useUpdateProduct,
67
+ O as useUpdateProductAddOns,
68
+ Ge as useUpdateState,
69
+ B as useUpdateVariant,
70
+ w as useUpdateWarehouse
69
71
  };
package/dist/index33.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useQueryClient as s, useMutation as r } from "@tanstack/react-query";
3
- import { useQueryUnwrapped as c } from "./index72.mjs";
3
+ import { useQueryUnwrapped as c } from "./index67.mjs";
4
4
  import { queryKeys as i } from "./index30.mjs";
5
5
  import { updateCart as a, createCart as l, applyDiscount as m, removeDiscount as y, addCartItem as p, updateCartItem as C, removeCartItem as q, checkoutCart as f, fetchCart as d, fetchCartRecommendations as b } from "./index26.mjs";
6
6
  function S(e, t) {
package/dist/index34.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useMutation as m } from "@tanstack/react-query";
3
- import { useQueryUnwrapped as u } from "./index72.mjs";
3
+ import { useQueryUnwrapped as u } from "./index67.mjs";
4
4
  import { queryKeys as o } from "./index30.mjs";
5
5
  import { confirmOrder as i, fetchOrder as c, fetchOrderRecommendations as f } from "./index27.mjs";
6
6
  function a(e, r, n) {
package/dist/index35.mjs CHANGED
@@ -1,22 +1,30 @@
1
1
  'use client';
2
- import { useQueryUnwrapped as u } from "./index72.mjs";
2
+ import { useQueryUnwrapped as e } from "./index67.mjs";
3
3
  import { queryKeys as t } from "./index30.mjs";
4
- import { fetchProductsByBrand as o, fetchProductBySlug as c } from "./index25.mjs";
5
- function n(r, e) {
6
- return u({
4
+ import { fetchProductsByBrand as c, fetchProductBySlug as d, fetchProductAddons as n } from "./index25.mjs";
5
+ function f(r, u) {
6
+ return e({
7
7
  queryKey: t.public.products.list(r),
8
- queryFn: () => o(r),
9
- ...e
8
+ queryFn: () => c(r),
9
+ ...u
10
10
  });
11
11
  }
12
- function s(r, e) {
13
- return u({
12
+ function i(r, u) {
13
+ return e({
14
14
  queryKey: t.public.products.detail(r),
15
- queryFn: () => c(r),
16
- ...e
15
+ queryFn: () => d(r),
16
+ ...u
17
+ });
18
+ }
19
+ function q(r, u, o) {
20
+ return e({
21
+ queryKey: t.public.products.addons(r, u),
22
+ queryFn: () => n(r, u),
23
+ ...o
17
24
  });
18
25
  }
19
26
  export {
20
- s as useGetProduct,
21
- n as useGetProducts
27
+ i as useGetProduct,
28
+ q as useGetProductAddOns,
29
+ f as useGetProducts
22
30
  };
package/dist/index36.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { useQueryUnwrapped as o } from "./index72.mjs";
2
+ import { useQueryUnwrapped as o } from "./index67.mjs";
3
3
  import { queryKeys as i } from "./index30.mjs";
4
4
  import { fetchDeliveryZones as t } from "./index28.mjs";
5
5
  function p(e, r) {
package/dist/index37.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { useQueryUnwrapped as t } from "./index72.mjs";
2
+ import { useQueryUnwrapped as t } from "./index67.mjs";
3
3
  import { queryKeys as u } from "./index30.mjs";
4
4
  import { fetchBrandBySlug as n } from "./index29.mjs";
5
5
  function i(r, e) {
package/dist/index40.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { getDefaultExportFromCjs as n } from "./index65.mjs";
3
- import { __require as i } from "./index67.mjs";
3
+ import { __require as i } from "./index69.mjs";
4
4
  function s(t, a) {
5
5
  for (var o = 0; o < a.length; o++) {
6
6
  const e = a[o];
package/dist/index43.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { p as S } from "./index69.mjs";
3
- import { t as U } from "./index70.mjs";
4
- import he from "./index71.mjs";
2
+ import { p as S } from "./index70.mjs";
3
+ import { t as U } from "./index71.mjs";
4
+ import he from "./index72.mjs";
5
5
  const fe = Object.prototype.toString, de = Error.prototype.toString, pe = RegExp.prototype.toString, me = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", ye = /^Symbol\((.*)\)(.*)$/;
6
6
  function ge(n) {
7
7
  return n != +n ? "NaN" : n === 0 && 1 / n < 0 ? "-0" : "" + n;
package/dist/index52.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  'use client';
2
- import a from "./index83.mjs";
3
- import p from "./index84.mjs";
4
- import m from "./index85.mjs";
5
- import i from "./index86.mjs";
6
- import f from "./index87.mjs";
7
- import l from "./index88.mjs";
8
- import c from "./index89.mjs";
9
- import d from "./index90.mjs";
10
- import u from "./index91.mjs";
11
- import { VERSION as x } from "./index92.mjs";
12
- import C from "./index93.mjs";
13
- import A from "./index94.mjs";
14
- import E from "./index95.mjs";
15
- import O from "./index96.mjs";
16
- import S from "./index97.mjs";
17
- import H from "./index98.mjs";
18
- import T from "./index99.mjs";
2
+ import a from "./index80.mjs";
3
+ import p from "./index81.mjs";
4
+ import m from "./index82.mjs";
5
+ import i from "./index83.mjs";
6
+ import f from "./index84.mjs";
7
+ import l from "./index85.mjs";
8
+ import c from "./index86.mjs";
9
+ import d from "./index87.mjs";
10
+ import u from "./index88.mjs";
11
+ import { VERSION as x } from "./index89.mjs";
12
+ import C from "./index90.mjs";
13
+ import A from "./index91.mjs";
14
+ import E from "./index92.mjs";
15
+ import O from "./index93.mjs";
16
+ import S from "./index94.mjs";
17
+ import H from "./index95.mjs";
18
+ import T from "./index96.mjs";
19
19
  function n(o) {
20
20
  const t = new m(o), e = p(m.prototype.request, t);
21
21
  return a.extend(e, m.prototype, t, { allOwnKeys: !0 }), a.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(s) {
package/dist/index53.mjs CHANGED
@@ -2,8 +2,8 @@
2
2
  var p = Object.defineProperty;
3
3
  var k = (r, e, i) => e in r ? p(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i;
4
4
  var h = (r, e, i) => k(r, typeof e != "symbol" ? e + "" : e, i);
5
- import { serialize as j } from "./index81.mjs";
6
- import { mergePath as U, replaceUrlParam as P, buildSearchParams as S, removeIndexString as w, replaceUrlProtocol as x, deepMerge as C } from "./index82.mjs";
5
+ import { serialize as j } from "./index97.mjs";
6
+ import { mergePath as U, replaceUrlParam as P, buildSearchParams as S, removeIndexString as w, replaceUrlProtocol as x, deepMerge as C } from "./index98.mjs";
7
7
  var v = (r, e) => new Proxy(() => {
8
8
  }, {
9
9
  get(t, s) {
package/dist/index54.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useQueryClient as m, useMutation as w } from "@tanstack/react-query";
3
- import { useQueryUnwrapped as f } from "./index72.mjs";
3
+ import { useQueryUnwrapped as f } from "./index67.mjs";
4
4
  import { createAdminRpcClients as d, authHeaders as l } from "./index24.mjs";
5
5
  import { queryKeys as c } from "./index30.mjs";
6
6
  import { useApiConfig as y } from "./index22.mjs";
package/dist/index55.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useQueryClient as m, useMutation as w } from "@tanstack/react-query";
3
- import { useQueryUnwrapped as b } from "./index72.mjs";
3
+ import { useQueryUnwrapped as b } from "./index67.mjs";
4
4
  import { createAdminRpcClients as c, authHeaders as d } from "./index24.mjs";
5
5
  import { queryKeys as u } from "./index30.mjs";
6
6
  import { useApiConfig as l } from "./index22.mjs";
package/dist/index56.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  'use client';
2
- import { useQueryClient as y, useMutation as m } from "@tanstack/react-query";
3
- import { useQueryUnwrapped as w } from "./index72.mjs";
4
- import { createAdminRpcClients as c, authHeaders as d } from "./index24.mjs";
5
- import { queryKeys as a } from "./index30.mjs";
6
- import { useApiConfig as l } from "./index22.mjs";
2
+ import { useQueryClient as y, useMutation as w } from "@tanstack/react-query";
3
+ import { useQueryUnwrapped as m } from "./index67.mjs";
4
+ import { createAdminRpcClients as d, authHeaders as l } from "./index24.mjs";
5
+ import { queryKeys as i } from "./index30.mjs";
6
+ import { useApiConfig as p } from "./index22.mjs";
7
7
  function T(t, o) {
8
- const { baseURL: s, getAuthToken: r } = l();
9
- return w({
10
- queryKey: a.admin.products.list(t),
8
+ const { baseURL: s, getAuthToken: r } = p();
9
+ return m({
10
+ queryKey: i.admin.products.list(t),
11
11
  queryFn: async () => {
12
- const n = await r(), e = await c(s).products.index.$get(t ? { query: { brandId: t } } : {}, d(n));
12
+ const n = await r(), e = await d(s).products.index.$get(t ? { query: { brandId: t } } : {}, l(n));
13
13
  if (!e.ok)
14
14
  throw new Error(`Failed to fetch products: ${e.statusText}`);
15
15
  return e.json();
@@ -18,11 +18,11 @@ function T(t, o) {
18
18
  });
19
19
  }
20
20
  function $(t, o) {
21
- const { baseURL: s, getAuthToken: r } = l();
22
- return w({
23
- queryKey: a.admin.products.detail(t),
21
+ const { baseURL: s, getAuthToken: r } = p();
22
+ return m({
23
+ queryKey: i.admin.products.detail(t),
24
24
  queryFn: async () => {
25
- const n = await r(), e = await c(s).products[":id"].$get({ param: { id: t } }, d(n));
25
+ const n = await r(), e = await d(s).products[":id"].$get({ param: { id: t } }, l(n));
26
26
  if (!e.ok)
27
27
  throw new Error(`Failed to fetch product: ${e.statusText}`);
28
28
  return e.json();
@@ -30,51 +30,81 @@ function $(t, o) {
30
30
  ...o
31
31
  });
32
32
  }
33
- function g(t) {
34
- const { baseURL: o, getAuthToken: s } = l(), r = y();
35
- return m({
33
+ function A(t) {
34
+ const { baseURL: o, getAuthToken: s } = p(), r = y();
35
+ return w({
36
36
  mutationFn: async (n) => {
37
- const u = await s(), i = await c(o).products.index.$post({ json: n }, d(u));
38
- if (!i.ok)
39
- throw new Error(`Failed to create product: ${i.statusText}`);
40
- return i.json();
37
+ const u = await s(), a = await d(o).products.index.$post({ json: n }, l(u));
38
+ if (!a.ok)
39
+ throw new Error(`Failed to create product: ${a.statusText}`);
40
+ return a.json();
41
41
  },
42
- onSuccess: () => r.invalidateQueries({ queryKey: a.admin.products.all }),
42
+ onSuccess: () => r.invalidateQueries({ queryKey: i.admin.products.all }),
43
43
  ...t
44
44
  });
45
45
  }
46
- function x(t, o) {
47
- const { baseURL: s, getAuthToken: r } = l(), n = y();
48
- return m({
46
+ function g(t, o) {
47
+ const { baseURL: s, getAuthToken: r } = p(), n = y();
48
+ return w({
49
49
  mutationFn: async (u) => {
50
- const e = await r(), p = await c(s).products[":id"].$patch({ param: { id: t }, json: u }, d(e));
51
- if (!p.ok)
52
- throw new Error(`Failed to update product: ${p.statusText}`);
53
- return p.json();
50
+ const e = await r(), c = await d(s).products[":id"].$patch({ param: { id: t }, json: u }, l(e));
51
+ if (!c.ok)
52
+ throw new Error(`Failed to update product: ${c.statusText}`);
53
+ return c.json();
54
54
  },
55
55
  onSuccess: () => {
56
- n.invalidateQueries({ queryKey: a.admin.products.detail(t) }), n.invalidateQueries({ queryKey: a.admin.products.all });
56
+ n.invalidateQueries({ queryKey: i.admin.products.detail(t) }), n.invalidateQueries({ queryKey: i.admin.products.all });
57
57
  },
58
58
  ...o
59
59
  });
60
60
  }
61
61
  function j(t, o) {
62
- const { baseURL: s, getAuthToken: r } = l(), n = y();
63
- return m({
62
+ const { baseURL: s, getAuthToken: r } = p(), n = y();
63
+ return w({
64
64
  mutationFn: async () => {
65
- const u = await r(), i = await c(s).products[":id"].$delete({ param: { id: t } }, d(u));
66
- if (!i.ok)
67
- throw new Error(`Failed to delete product: ${i.statusText}`);
68
- return i.json();
65
+ const u = await r(), a = await d(s).products[":id"].$delete({ param: { id: t } }, l(u));
66
+ if (!a.ok)
67
+ throw new Error(`Failed to delete product: ${a.statusText}`);
68
+ return a.json();
69
+ },
70
+ onSuccess: () => n.invalidateQueries({ queryKey: i.admin.products.all }),
71
+ ...o
72
+ });
73
+ }
74
+ function x(t, o) {
75
+ const { baseURL: s, getAuthToken: r } = p();
76
+ return m({
77
+ queryKey: i.admin.products.addons(t),
78
+ queryFn: async () => {
79
+ const n = await r(), e = await d(s).productAddons[":id"].$get({ param: { id: t } }, l(n));
80
+ if (!e.ok)
81
+ throw new Error(`Failed to fetch product add-ons: ${e.statusText}`);
82
+ return e.json();
83
+ },
84
+ ...o
85
+ });
86
+ }
87
+ function U(t, o) {
88
+ const { baseURL: s, getAuthToken: r } = p(), n = y();
89
+ return w({
90
+ mutationFn: async (u) => {
91
+ const e = await r(), c = await d(s).productAddons[":id"].$put({ param: { id: t }, json: u }, l(e));
92
+ if (!c.ok)
93
+ throw new Error(`Failed to update product add-ons: ${c.statusText}`);
94
+ return c.json();
95
+ },
96
+ onSuccess: () => {
97
+ n.invalidateQueries({ queryKey: i.admin.products.addons(t) });
69
98
  },
70
- onSuccess: () => n.invalidateQueries({ queryKey: a.admin.products.all }),
71
99
  ...o
72
100
  });
73
101
  }
74
102
  export {
75
- g as useCreateProduct,
103
+ A as useCreateProduct,
76
104
  j as useDeleteProduct,
77
105
  $ as useGetProduct,
106
+ x as useGetProductAddOns,
78
107
  T as useListProducts,
79
- x as useUpdateProduct
108
+ g as useUpdateProduct,
109
+ U as useUpdateProductAddOns
80
110
  };