@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
@@ -0,0 +1,12 @@
1
+ export interface CartUpsellScreenProps {
2
+ /** Callback when user skips upsell to continue to checkout */
3
+ onSkip: () => void;
4
+ /** Number of recommendations to fetch */
5
+ limit?: number;
6
+ /** Custom class name */
7
+ className?: string;
8
+ /** Custom class for the checkout button */
9
+ checkoutButtonClassName?: string;
10
+ }
11
+ export declare function CartUpsellScreen({ onSkip, limit, className, checkoutButtonClassName, }: CartUpsellScreenProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=CartUpsellScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartUpsellScreen.d.ts","sourceRoot":"","sources":["../../src/components/CartUpsellScreen.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAW,EACX,SAAS,EACT,uBAAuB,GACxB,EAAE,qBAAqB,2CAiKvB"}
@@ -0,0 +1,10 @@
1
+ import type { QuantityDiscountMap } from '../lib/utils';
2
+ export interface QuantitySelectorProps {
3
+ selectedVariant: any;
4
+ quantity: number;
5
+ onQuantityChange: (quantity: number) => void;
6
+ effectivePrice: number;
7
+ quantityDiscounts: QuantityDiscountMap;
8
+ }
9
+ export declare function QuantitySelector({ selectedVariant, quantity, onQuantityChange, effectivePrice, quantityDiscounts, }: QuantitySelectorProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=QuantitySelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantitySelector.d.ts","sourceRoot":"","sources":["../../src/components/QuantitySelector.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,eAAe,EAAE,GAAG,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,mBAAmB,CAAC;CACxC;AA4LD,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GAClB,EAAE,qBAAqB,2CAqCvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShoppingCart.d.ts","sourceRoot":"","sources":["../../src/components/ShoppingCart.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAWnD,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;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,IAAI,CAAC;IACpB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,gDAAgD;IAChD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,gBAAuB,EACvB,oBAA2B,EAC3B,kBAAwC,EACxC,oBAA0C,EAC1C,uBAAuB,EACvB,+BAA+B,EAC/B,eAAuB,EACvB,YAAmC,GACpC,EAAE,iBAAiB,2CA0SnB"}
package/dist/index.d.ts CHANGED
@@ -24,8 +24,12 @@ export { VariantPickerModal } from './components/VariantPickerModal';
24
24
  export type { VariantPickerModalProps, VariantPickerProduct, Variant } from './components/VariantPickerModal';
25
25
  export { CartItem } from './components/CartItem';
26
26
  export type { CartItemProps } from './components/CartItem';
27
+ export { QuantitySelector } from './components/QuantitySelector';
28
+ export type { QuantitySelectorProps } from './components/QuantitySelector';
27
29
  export { ShoppingCart } from './components/ShoppingCart';
28
30
  export type { ShoppingCartProps } from './components/ShoppingCart';
31
+ export { CartUpsellScreen } from './components/CartUpsellScreen';
32
+ export type { CartUpsellScreenProps } from './components/CartUpsellScreen';
29
33
  export { DiscountCodeInput } from './components/DiscountCodeInput';
30
34
  export type { DiscountCodeInputProps } from './components/DiscountCodeInput';
31
35
  export { Checkout } from './components/Checkout';
@@ -39,6 +43,7 @@ export { FormInput } from './components/ui/form-input';
39
43
  export type { FormInputProps } from './components/ui/form-input';
40
44
  export { FormSelect } from './components/ui/form-select';
41
45
  export type { FormSelectProps } from './components/ui/form-select';
42
- export { cn, formatCurrency, formatDate, formatDateTime, getStatusColor } from './lib/utils';
46
+ export { cn, formatCurrency, formatDate, formatDateTime, getStatusColor, getDiscountPercent, calculateDiscountedPrice } from './lib/utils';
47
+ export type { QuantityDiscountMap } from './lib/utils';
43
48
  export * from '@instockng/api-client';
44
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG1F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,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K,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC3I,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIvD,cAAc,uBAAuB,CAAC"}
package/dist/index.mjs CHANGED
@@ -2,127 +2,133 @@
2
2
  import { StorefrontProvider as m } from "./index2.mjs";
3
3
  import { CartProvider as i, useCart as d } from "./index3.mjs";
4
4
  import { MetaPixelProvider as u, useMetaPixel as n } from "./index4.mjs";
5
- import { TikTokPixelProvider as s, useTikTokPixel as c } from "./index5.mjs";
6
- import { usePageTracking as x } from "./index6.mjs";
5
+ import { TikTokPixelProvider as f, useTikTokPixel as s } from "./index5.mjs";
6
+ import { usePageTracking as C } from "./index6.mjs";
7
7
  import { OrderConfirmation as P } from "./index7.mjs";
8
8
  import { ProductCard as A } from "./index8.mjs";
9
- import { ProductGrid as v } from "./index9.mjs";
10
- import { ProductAddOns as R } from "./index10.mjs";
11
- import { RecommendedProducts as D } from "./index11.mjs";
12
- import { VariantPickerModal as g } from "./index12.mjs";
9
+ import { ProductGrid as k } from "./index9.mjs";
10
+ import { ProductAddOns as y } from "./index10.mjs";
11
+ import { RecommendedProducts as R } from "./index11.mjs";
12
+ import { VariantPickerModal as I } from "./index12.mjs";
13
13
  import { CartItem as B } from "./index13.mjs";
14
- import { ShoppingCart as S } from "./index14.mjs";
15
- import { DiscountCodeInput as F } from "./index15.mjs";
16
- import { Checkout as U } from "./index16.mjs";
17
- import { Button as b } from "./index17.mjs";
18
- import { Card as z, CardContent as K, CardDescription as V, CardFooter as $, CardHeader as j, CardTitle as w } from "./index18.mjs";
19
- import { Badge as J } from "./index19.mjs";
20
- import { Modal as N } from "./index20.mjs";
21
- import { FormInput as W } from "./index21.mjs";
22
- import { FormSelect as Y } from "./index22.mjs";
23
- import { cn as ee, formatCurrency as re, formatDate as te, formatDateTime as oe, getStatusColor as me } from "./index23.mjs";
24
- import { ApiClientProvider as ie, useApiClientContext as de } from "./index24.mjs";
25
- import { useApiConfig as ue } from "./index25.mjs";
26
- import { getApiClient as fe, initializeApiClient as se, resetApiClient as ce } from "./index26.mjs";
27
- import { authHeaders as xe, createAdminRpcClients as le, createRpcClients as Pe } from "./index27.mjs";
28
- import { fetchProductAddons as Ae, fetchProductBySlug as ke, fetchProductRecommendations as ve, fetchProductsByBrand as Ge } from "./index28.mjs";
29
- import { addCartItem as ye, applyDiscount as De, checkoutCart as Ie, createCart as ge, fetchCart as Oe, fetchCartRecommendations as Be, initiateCheckout as Te, removeCartItem as Se, removeDiscount as Me, updateCart as Fe, updateCartItem as He } from "./index29.mjs";
30
- import { confirmOrder as Ze, fetchOrder as be, fetchOrderRecommendations as qe } from "./index30.mjs";
31
- import { fetchDeliveryZones as Ke } from "./index31.mjs";
32
- import { fetchBrandBySlug as $e } from "./index32.mjs";
33
- import { queryKeys as we } from "./index33.mjs";
34
- import * as e from "./index34.mjs";
35
- import * as r from "./index35.mjs";
36
- import { useAddCartItem as Je, useApplyDiscount as Le, useCheckoutCart as Ne, useCreateCart as Qe, useGetCart as We, useGetCartRecommendations as Xe, useInitiateCheckout as Ye, useRemoveCartItem as _e, useRemoveDiscount as er, useUpdateCart as rr, useUpdateCartItem as tr } from "./index36.mjs";
37
- import { useGetBrand as mr } from "./index37.mjs";
38
- import { useGetProduct as ir, useGetProductAddOns as dr, useGetProductRecommendations as pr, useGetProducts as ur } from "./index38.mjs";
39
- import { useConfirmOrder as fr, useGetOrder as sr, useGetOrderRecommendations as cr } from "./index39.mjs";
40
- import { useGetDeliveryZones as xr } from "./index40.mjs";
14
+ import { QuantitySelector as T } from "./index14.mjs";
15
+ import { ShoppingCart as F } from "./index15.mjs";
16
+ import { CartUpsellScreen as H } from "./index16.mjs";
17
+ import { DiscountCodeInput as b } from "./index17.mjs";
18
+ import { Checkout as z } from "./index18.mjs";
19
+ import { Button as Q } from "./index19.mjs";
20
+ import { Card as $, CardContent as j, CardDescription as w, CardFooter as E, CardHeader as J, CardTitle as L } from "./index20.mjs";
21
+ import { Badge as W } from "./index21.mjs";
22
+ import { Modal as Y } from "./index22.mjs";
23
+ import { FormInput as ee } from "./index23.mjs";
24
+ import { FormSelect as te } from "./index24.mjs";
25
+ import { calculateDiscountedPrice as me, cn as ae, formatCurrency as ie, formatDate as de, formatDateTime as pe, getDiscountPercent as ue, getStatusColor as ne } from "./index25.mjs";
26
+ import { ApiClientProvider as fe, useApiClientContext as se } from "./index26.mjs";
27
+ import { useApiConfig as Ce } from "./index27.mjs";
28
+ import { getApiClient as Pe, initializeApiClient as he, resetApiClient as Ae } from "./index28.mjs";
29
+ import { authHeaders as ke, createAdminRpcClients as ve, createRpcClients as ye } from "./index29.mjs";
30
+ import { fetchProductAddons as Re, fetchProductBySlug as ge, fetchProductRecommendations as Ie, fetchProductsByBrand as Oe } from "./index30.mjs";
31
+ import { addCartItem as Se, applyDiscount as Te, checkoutCart as Me, createCart as Fe, fetchCart as Ue, fetchCartRecommendations as He, initiateCheckout as Ze, removeCartItem as be, removeDiscount as qe, updateCart as ze, updateCartItem as Ke } from "./index31.mjs";
32
+ import { confirmOrder as Ve, fetchOrder as $e, fetchOrderRecommendations as je } from "./index32.mjs";
33
+ import { fetchDeliveryZones as Ee } from "./index33.mjs";
34
+ import { fetchBrandBySlug as Le } from "./index34.mjs";
35
+ import { queryKeys as We } from "./index35.mjs";
36
+ import * as e from "./index36.mjs";
37
+ import * as r from "./index37.mjs";
38
+ import { useAddCartItem as Ye, useApplyDiscount as _e, useCheckoutCart as er, useCreateCart as rr, useGetCart as tr, useGetCartRecommendations as or, useInitiateCheckout as mr, useRemoveCartItem as ar, useRemoveDiscount as ir, useUpdateCart as dr, useUpdateCartItem as pr } from "./index38.mjs";
39
+ import { useGetBrand as nr } from "./index39.mjs";
40
+ import { useGetProduct as fr, useGetProductAddOns as sr, useGetProductRecommendations as xr, useGetProducts as Cr } from "./index40.mjs";
41
+ import { useConfirmOrder as Pr, useGetOrder as hr, useGetOrderRecommendations as Ar } from "./index41.mjs";
42
+ import { useGetDeliveryZones as kr } from "./index42.mjs";
41
43
  export {
42
- ie as ApiClientProvider,
43
- J as Badge,
44
- b as Button,
45
- z as Card,
46
- K as CardContent,
47
- V as CardDescription,
48
- $ as CardFooter,
49
- j as CardHeader,
50
- w as CardTitle,
44
+ fe as ApiClientProvider,
45
+ W as Badge,
46
+ Q as Button,
47
+ $ as Card,
48
+ j as CardContent,
49
+ w as CardDescription,
50
+ E as CardFooter,
51
+ J as CardHeader,
52
+ L as CardTitle,
51
53
  B as CartItem,
52
54
  i as CartProvider,
53
- U as Checkout,
54
- F as DiscountCodeInput,
55
- W as FormInput,
56
- Y as FormSelect,
55
+ H as CartUpsellScreen,
56
+ z as Checkout,
57
+ b as DiscountCodeInput,
58
+ ee as FormInput,
59
+ te as FormSelect,
57
60
  u as MetaPixelProvider,
58
- N as Modal,
61
+ Y as Modal,
59
62
  P as OrderConfirmation,
60
- R as ProductAddOns,
63
+ y as ProductAddOns,
61
64
  A as ProductCard,
62
- v as ProductGrid,
63
- D as RecommendedProducts,
64
- S as ShoppingCart,
65
+ k as ProductGrid,
66
+ T as QuantitySelector,
67
+ R as RecommendedProducts,
68
+ F as ShoppingCart,
65
69
  m as StorefrontProvider,
66
- s as TikTokPixelProvider,
67
- g as VariantPickerModal,
68
- ye as addCartItem,
70
+ f as TikTokPixelProvider,
71
+ I as VariantPickerModal,
72
+ Se as addCartItem,
69
73
  r as adminApi,
70
- De as applyDiscount,
71
- xe as authHeaders,
72
- Ie as checkoutCart,
73
- ee as cn,
74
- Ze as confirmOrder,
75
- le as createAdminRpcClients,
76
- ge as createCart,
77
- Pe as createRpcClients,
78
- $e as fetchBrandBySlug,
79
- Oe as fetchCart,
80
- Be as fetchCartRecommendations,
81
- Ke as fetchDeliveryZones,
82
- be as fetchOrder,
83
- qe as fetchOrderRecommendations,
84
- Ae as fetchProductAddons,
85
- ke as fetchProductBySlug,
86
- ve as fetchProductRecommendations,
87
- Ge as fetchProductsByBrand,
88
- re as formatCurrency,
89
- te as formatDate,
90
- oe as formatDateTime,
91
- fe as getApiClient,
92
- me as getStatusColor,
93
- se as initializeApiClient,
94
- Te as initiateCheckout,
74
+ Te as applyDiscount,
75
+ ke as authHeaders,
76
+ me as calculateDiscountedPrice,
77
+ Me as checkoutCart,
78
+ ae as cn,
79
+ Ve as confirmOrder,
80
+ ve as createAdminRpcClients,
81
+ Fe as createCart,
82
+ ye as createRpcClients,
83
+ Le as fetchBrandBySlug,
84
+ Ue as fetchCart,
85
+ He as fetchCartRecommendations,
86
+ Ee as fetchDeliveryZones,
87
+ $e as fetchOrder,
88
+ je as fetchOrderRecommendations,
89
+ Re as fetchProductAddons,
90
+ ge as fetchProductBySlug,
91
+ Ie as fetchProductRecommendations,
92
+ Oe as fetchProductsByBrand,
93
+ ie as formatCurrency,
94
+ de as formatDate,
95
+ pe as formatDateTime,
96
+ Pe as getApiClient,
97
+ ue as getDiscountPercent,
98
+ ne as getStatusColor,
99
+ he as initializeApiClient,
100
+ Ze as initiateCheckout,
95
101
  e as publicApi,
96
- we as queryKeys,
97
- Se as removeCartItem,
98
- Me as removeDiscount,
99
- ce as resetApiClient,
100
- Fe as updateCart,
101
- He as updateCartItem,
102
- Je as useAddCartItem,
103
- de as useApiClientContext,
104
- ue as useApiConfig,
105
- Le as useApplyDiscount,
102
+ We as queryKeys,
103
+ be as removeCartItem,
104
+ qe as removeDiscount,
105
+ Ae as resetApiClient,
106
+ ze as updateCart,
107
+ Ke as updateCartItem,
108
+ Ye as useAddCartItem,
109
+ se as useApiClientContext,
110
+ Ce as useApiConfig,
111
+ _e as useApplyDiscount,
106
112
  d as useCart,
107
- Ne as useCheckoutCart,
108
- fr as useConfirmOrder,
109
- Qe as useCreateCart,
110
- mr as useGetBrand,
111
- We as useGetCart,
112
- Xe as useGetCartRecommendations,
113
- xr as useGetDeliveryZones,
114
- sr as useGetOrder,
115
- cr as useGetOrderRecommendations,
116
- ir as useGetProduct,
117
- dr as useGetProductAddOns,
118
- pr as useGetProductRecommendations,
119
- ur as useGetProducts,
120
- Ye as useInitiateCheckout,
113
+ er as useCheckoutCart,
114
+ Pr as useConfirmOrder,
115
+ rr as useCreateCart,
116
+ nr as useGetBrand,
117
+ tr as useGetCart,
118
+ or as useGetCartRecommendations,
119
+ kr as useGetDeliveryZones,
120
+ hr as useGetOrder,
121
+ Ar as useGetOrderRecommendations,
122
+ fr as useGetProduct,
123
+ sr as useGetProductAddOns,
124
+ xr as useGetProductRecommendations,
125
+ Cr as useGetProducts,
126
+ mr as useInitiateCheckout,
121
127
  n as useMetaPixel,
122
- x as usePageTracking,
123
- _e as useRemoveCartItem,
124
- er as useRemoveDiscount,
125
- c as useTikTokPixel,
126
- rr as useUpdateCart,
127
- tr as useUpdateCartItem
128
+ C as usePageTracking,
129
+ ar as useRemoveCartItem,
130
+ ir as useRemoveDiscount,
131
+ s as useTikTokPixel,
132
+ dr as useUpdateCart,
133
+ pr as useUpdateCartItem
128
134
  };
package/dist/index10.mjs CHANGED
@@ -2,13 +2,13 @@
2
2
  import { jsxs as a, jsx as t, Fragment as C } from "react/jsx-runtime";
3
3
  import { useState as f, useRef as V } from "react";
4
4
  import { ChevronLeft as U, ChevronRight as z } from "lucide-react";
5
- import { Switch as G } from "./index44.mjs";
6
- import { Badge as T } from "./index19.mjs";
7
- import { cn as P, formatCurrency as k } from "./index23.mjs";
5
+ import { Switch as G } from "./index46.mjs";
6
+ import { Badge as T } from "./index21.mjs";
7
+ import { cn as P, formatCurrency as k } from "./index25.mjs";
8
8
  import { VariantPickerModal as _ } from "./index12.mjs";
9
- import "./index24.mjs";
9
+ import "./index26.mjs";
10
10
  import "@tanstack/react-query";
11
- import { useGetProductAddOns as $ } from "./index38.mjs";
11
+ import { useGetProductAddOns as $ } from "./index40.mjs";
12
12
  import { useCart as q } from "./index3.mjs";
13
13
  function le({
14
14
  slug: g,
package/dist/index101.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import i from "./index87.mjs";
3
- import S from "./index152.mjs";
3
+ import S from "./index154.mjs";
4
4
  const h = Symbol("internals");
5
5
  function y(r) {
6
6
  return r && String(r).trim().toLowerCase();
package/dist/index102.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import s from "./index87.mjs";
3
- import m from "./index153.mjs";
4
- import u from "./index154.mjs";
5
- import { getFetch as b } from "./index155.mjs";
3
+ import m from "./index155.mjs";
4
+ import u from "./index156.mjs";
5
+ import { getFetch as b } from "./index157.mjs";
6
6
  import d from "./index98.mjs";
7
7
  const p = {
8
8
  http: m,
package/dist/index104.mjs CHANGED
@@ -1,5 +1,37 @@
1
1
  'use client';
2
- var o = { exports: {} };
2
+ var a = (i, t, e = {}) => {
3
+ let r = `${i}=${t}`;
4
+ if (i.startsWith("__Secure-") && !e.secure)
5
+ throw new Error("__Secure- Cookie must have Secure attributes");
6
+ if (i.startsWith("__Host-")) {
7
+ if (!e.secure)
8
+ throw new Error("__Host- Cookie must have Secure attributes");
9
+ if (e.path !== "/")
10
+ throw new Error('__Host- Cookie must have Path attributes with "/"');
11
+ if (e.domain)
12
+ throw new Error("__Host- Cookie must not have Domain attributes");
13
+ }
14
+ if (e && typeof e.maxAge == "number" && e.maxAge >= 0) {
15
+ if (e.maxAge > 3456e4)
16
+ throw new Error(
17
+ "Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration."
18
+ );
19
+ r += `; Max-Age=${e.maxAge | 0}`;
20
+ }
21
+ if (e.domain && e.prefix !== "host" && (r += `; Domain=${e.domain}`), e.path && (r += `; Path=${e.path}`), e.expires) {
22
+ if (e.expires.getTime() - Date.now() > 3456e7)
23
+ throw new Error(
24
+ "Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future."
25
+ );
26
+ r += `; Expires=${e.expires.toUTCString()}`;
27
+ }
28
+ if (e.httpOnly && (r += "; HttpOnly"), e.secure && (r += "; Secure"), e.sameSite && (r += `; SameSite=${e.sameSite.charAt(0).toUpperCase() + e.sameSite.slice(1)}`), e.priority && (r += `; Priority=${e.priority.charAt(0).toUpperCase() + e.priority.slice(1)}`), e.partitioned) {
29
+ if (!e.secure)
30
+ throw new Error("Partitioned Cookie must have Secure attributes");
31
+ r += "; Partitioned";
32
+ }
33
+ return r;
34
+ }, s = (i, t, e) => (t = encodeURIComponent(t), a(i, t, e));
3
35
  export {
4
- o as __module
36
+ s as serialize
5
37
  };
package/dist/index105.mjs CHANGED
@@ -1,5 +1,46 @@
1
1
  'use client';
2
- var r = {};
2
+ var s = (e, r) => (e = e.replace(/\/+$/, ""), e = e + "/", r = r.replace(/^\/+/, ""), e + r), p = (e, r) => {
3
+ for (const [n, t] of Object.entries(r)) {
4
+ const c = new RegExp("/:" + n + "(?:{[^/]+})?\\??");
5
+ e = e.replace(c, t ? `/${t}` : "");
6
+ }
7
+ return e;
8
+ }, f = (e) => {
9
+ const r = new URLSearchParams();
10
+ for (const [n, t] of Object.entries(e))
11
+ if (t !== void 0)
12
+ if (Array.isArray(t))
13
+ for (const c of t)
14
+ r.append(n, c);
15
+ else
16
+ r.set(n, t);
17
+ return r;
18
+ }, i = (e, r) => {
19
+ switch (r) {
20
+ case "ws":
21
+ return e.replace(/^http/, "ws");
22
+ case "http":
23
+ return e.replace(/^ws/, "http");
24
+ }
25
+ }, l = (e) => /^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e) ? e.replace(/\/index(?=\?|$)/, "/") : e.replace(/\/index(?=\?|$)/, "");
26
+ function a(e) {
27
+ return typeof e == "object" && e !== null && !Array.isArray(e);
28
+ }
29
+ function o(e, r) {
30
+ if (!a(e) && !a(r))
31
+ return r;
32
+ const n = { ...e };
33
+ for (const t in r) {
34
+ const c = r[t];
35
+ a(n[t]) && a(c) ? n[t] = o(n[t], c) : n[t] = c;
36
+ }
37
+ return n;
38
+ }
3
39
  export {
4
- r as __exports
40
+ f as buildSearchParams,
41
+ o as deepMerge,
42
+ s as mergePath,
43
+ l as removeIndexString,
44
+ p as replaceUrlParam,
45
+ i as replaceUrlProtocol
5
46
  };
package/dist/index106.mjs CHANGED
@@ -1,31 +1,5 @@
1
1
  'use client';
2
- import { __exports as u } from "./index157.mjs";
3
- var c;
4
- function o() {
5
- if (c) return u;
6
- c = 1;
7
- function p(r) {
8
- if (typeof WeakMap != "function") return null;
9
- var n = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap();
10
- return (p = function(t) {
11
- return t ? e : n;
12
- })(r);
13
- }
14
- function f(r, n) {
15
- if (!n && r && r.__esModule) return r;
16
- if (r === null || typeof r != "object" && typeof r != "function") return { default: r };
17
- var e = p(n);
18
- if (e && e.has(r)) return e.get(r);
19
- var t = { __proto__: null }, _ = Object.defineProperty && Object.getOwnPropertyDescriptor;
20
- for (var i in r)
21
- if (i !== "default" && Object.prototype.hasOwnProperty.call(r, i)) {
22
- var a = _ ? Object.getOwnPropertyDescriptor(r, i) : null;
23
- a && (a.get || a.set) ? Object.defineProperty(t, i, a) : t[i] = r[i];
24
- }
25
- return t.default = r, e && e.set(r, t), t;
26
- }
27
- return u._ = f, u;
28
- }
2
+ var o = { exports: {} };
29
3
  export {
30
- o as __require
4
+ o as __module
31
5
  };
package/dist/index107.mjs CHANGED
@@ -1,21 +1,5 @@
1
1
  'use client';
2
- import { __exports as e } from "./index158.mjs";
3
- var i;
4
- function u() {
5
- return i ? e : (i = 1, function(r) {
6
- Object.defineProperty(r, "__esModule", {
7
- value: !0
8
- }), Object.defineProperty(r, "removeTrailingSlash", {
9
- enumerable: !0,
10
- get: function() {
11
- return n;
12
- }
13
- });
14
- function n(a) {
15
- return a.replace(/\/$/, "") || "/";
16
- }
17
- }(e), e);
18
- }
2
+ var r = {};
19
3
  export {
20
- u as __require
4
+ r as __exports
21
5
  };