storefront-layouts 1.0.3 → 1.0.4

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 (509) hide show
  1. package/dist/components/auth/LoginForm.js +2 -2
  2. package/dist/components/auth/LoginSheet.js +2 -2
  3. package/dist/components/auth/login-form-core.js +3 -3
  4. package/dist/components/auth/login-sheet-header.js +3 -3
  5. package/dist/components/auth/login-sheet-registry.js +2 -2
  6. package/dist/components/auth/login-sheet-themes/booking-agenda.theme.js +1 -1
  7. package/dist/components/auth/login-sheet-themes/booking.theme.js +1 -1
  8. package/dist/components/auth/login-sheet-themes/clothing-minimal.theme.js +1 -1
  9. package/dist/components/auth/login-sheet-themes/clothing.theme.js +1 -1
  10. package/dist/components/auth/login-sheet-themes/electronics-grid.theme.js +1 -1
  11. package/dist/components/auth/login-sheet-themes/electronics.theme.js +1 -1
  12. package/dist/components/auth/login-sheet-themes/food-modern.theme.js +1 -1
  13. package/dist/components/auth/login-sheet-themes/food.theme.js +1 -1
  14. package/dist/components/auth/login-sheet-themes/index.js +9 -9
  15. package/dist/components/auth/login-sheet-themes/motivational-speaker.theme.js +1 -1
  16. package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts +2 -2
  17. package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts.map +1 -1
  18. package/dist/components/auth/login-sheet-themes/theme-input-baselines.js +2 -2
  19. package/dist/components/auth/login-sheets/StoreLoginSheetShell.d.ts.map +1 -1
  20. package/dist/components/auth/login-sheets/StoreLoginSheetShell.js +6 -6
  21. package/dist/components/auth/use-login-submit.js +3 -3
  22. package/dist/components/cart/InventoryHoldCountdown.js +2 -2
  23. package/dist/components/categories/category-masonry-grid.js +3 -3
  24. package/dist/components/checkout/CheckoutFeeLines.js +1 -1
  25. package/dist/components/checkout/ShippingOptionsPanel.js +3 -3
  26. package/dist/components/learning/CertificateTemplates.js +2 -2
  27. package/dist/components/learning/CertificateViewer.js +3 -3
  28. package/dist/components/learning/MentorshipProgress.d.ts.map +1 -1
  29. package/dist/components/learning/MentorshipProgress.js +4 -4
  30. package/dist/components/product/ProductVariationSelectors.js +1 -1
  31. package/dist/components/rich-text/CategoryDescription.js +2 -2
  32. package/dist/components/rich-text/ProductDescription.js +2 -2
  33. package/dist/components/rich-text/RichTextExcerpt.js +1 -1
  34. package/dist/components/rich-text/SafeRichHtml.d.ts +8 -11
  35. package/dist/components/rich-text/SafeRichHtml.d.ts.map +1 -1
  36. package/dist/components/rich-text/SafeRichHtml.js +3 -5
  37. package/dist/components/shipping/ProductDeliveryInfoSection.d.ts.map +1 -1
  38. package/dist/components/shipping/ProductDeliveryInfoSection.js +7 -4
  39. package/dist/components/shipping/ShippingQuoteAddressForm.js +3 -3
  40. package/dist/components/ui/alert-modal.js +2 -2
  41. package/dist/components/ui/avatar-image.js +1 -1
  42. package/dist/components/ui/badge.js +1 -1
  43. package/dist/components/ui/breadcrumbs.js +1 -1
  44. package/dist/components/ui/button.d.ts +1 -1
  45. package/dist/components/ui/button.js +1 -1
  46. package/dist/components/ui/card.js +1 -1
  47. package/dist/components/ui/category-tree.js +2 -2
  48. package/dist/components/ui/checkout-button.d.ts.map +1 -1
  49. package/dist/components/ui/checkout-button.js +11 -283
  50. package/dist/components/ui/guest-checkout-modal.js +3 -3
  51. package/dist/components/ui/image-skeleton.js +2 -2
  52. package/dist/components/ui/image-with-fallback.d.ts +3 -1
  53. package/dist/components/ui/image-with-fallback.d.ts.map +1 -1
  54. package/dist/components/ui/image-with-fallback.js +55 -139
  55. package/dist/components/ui/input.js +1 -1
  56. package/dist/components/ui/limited-time-offer-badge.js +2 -2
  57. package/dist/components/ui/loading-skeleton-wrapper.js +1 -1
  58. package/dist/components/ui/modal.js +2 -2
  59. package/dist/components/ui/otp-input.js +1 -1
  60. package/dist/components/ui/out-of-stock-overlay.js +1 -1
  61. package/dist/components/ui/page-animate-wrapper.js +2 -2
  62. package/dist/components/ui/page-content-loader.js +2 -2
  63. package/dist/components/ui/page-loader.js +1 -1
  64. package/dist/components/ui/product-card.d.ts.map +1 -1
  65. package/dist/components/ui/product-card.js +17 -17
  66. package/dist/components/ui/product-rating.js +1 -1
  67. package/dist/components/ui/product-stock-badge.js +2 -2
  68. package/dist/components/ui/review-form.js +2 -2
  69. package/dist/components/ui/route-skeleton-loader.js +6 -6
  70. package/dist/components/ui/sheet.d.ts +2 -1
  71. package/dist/components/ui/sheet.d.ts.map +1 -1
  72. package/dist/components/ui/sheet.js +4 -4
  73. package/dist/components/ui/skeleton.js +1 -1
  74. package/dist/components/ui/skeletons/index.js +5 -5
  75. package/dist/components/ui/skeletons/product-grid-skeleton.js +1 -1
  76. package/dist/components/ui/store-logos.d.ts.map +1 -1
  77. package/dist/components/ui/store-logos.js +4 -4
  78. package/dist/components/ui/toast.js +1 -1
  79. package/dist/components/ui/video-player.js +2 -2
  80. package/dist/editor/alignment-schemas/booking.js +1 -1
  81. package/dist/editor/alignment-schemas/clothing-minimal.js +1 -1
  82. package/dist/editor/alignment-schemas/index.js +20 -20
  83. package/dist/editor/alignment-schemas/lazy-loader.js +1 -1
  84. package/dist/editor/alignment-schemas/metadata.js +1 -1
  85. package/dist/editor/alignment-schemas/resolve-canvas-inspector-leaf.js +3 -3
  86. package/dist/editor/blocks/index.js +3 -3
  87. package/dist/editor/blocks/migrate-clothing-minimal.js +3 -3
  88. package/dist/editor/blocks/nav-outline-utils.js +2 -2
  89. package/dist/editor/blocks/registry.js +1 -1
  90. package/dist/editor/document/adapter.js +4 -4
  91. package/dist/editor/document/block-tree.js +1 -1
  92. package/dist/editor/document/index.js +6 -6
  93. package/dist/editor/document/validate.js +1 -1
  94. package/dist/editor/index.js +12 -12
  95. package/dist/editor/layout-content-loader.js +3 -3
  96. package/dist/editor/payaza-form/ArrayItemManager.js +2 -2
  97. package/dist/editor/payaza-form/EditorCanvasPreview.js +5 -5
  98. package/dist/editor/payaza-form/FieldRenderer.js +17 -17
  99. package/dist/editor/payaza-form/IframePreviewMessageBridge.js +3 -3
  100. package/dist/editor/payaza-form/PayazaFormEditor.js +31 -31
  101. package/dist/editor/payaza-form/PayazaFormEditorFullPage.js +2 -2
  102. package/dist/editor/payaza-form/SliderArrayEditor.js +3 -3
  103. package/dist/editor/payaza-form/components/ArrayField.js +1 -1
  104. package/dist/editor/payaza-form/components/BlockStylesInspector.js +1 -1
  105. package/dist/editor/payaza-form/components/BlocksField.js +9 -9
  106. package/dist/editor/payaza-form/components/ButtonField.js +3 -3
  107. package/dist/editor/payaza-form/components/CanvasGranularInspector.js +11 -11
  108. package/dist/editor/payaza-form/components/IconField.js +2 -2
  109. package/dist/editor/payaza-form/components/ImageField.js +1 -1
  110. package/dist/editor/payaza-form/components/NumberField.js +1 -1
  111. package/dist/editor/payaza-form/components/RichTextField.js +2 -2
  112. package/dist/editor/payaza-form/components/SectionField.js +1 -1
  113. package/dist/editor/payaza-form/components/SectionSchemaInspector.js +3 -3
  114. package/dist/editor/payaza-form/components/StarRatingField.js +2 -2
  115. package/dist/editor/payaza-form/components/TextField.js +1 -1
  116. package/dist/editor/payaza-form/data-merger.js +6 -6
  117. package/dist/editor/payaza-form/data-transformer.js +3 -3
  118. package/dist/editor/payaza-form/engine.js +1 -1
  119. package/dist/editor/payaza-form/examples/custom-widgets.example.js +1 -1
  120. package/dist/editor/payaza-form/index.js +8 -8
  121. package/dist/editor/payaza-form/layout-loader.js +2 -2
  122. package/dist/editor/payaza-form/preview-message-handler.js +3 -3
  123. package/dist/editor/payaza-form/schema-bridge.js +3 -3
  124. package/dist/editor/payaza-form/widget-registry.js +1 -1
  125. package/dist/editor/shared/BlockOutlineTree.js +2 -2
  126. package/dist/editor/shared/EditorHeader.js +2 -2
  127. package/dist/editor/shared/EditorNavigator.js +2 -2
  128. package/dist/editor/shared/IframePreview.js +6 -6
  129. package/dist/editor/shared/InlineCanvasPreview.js +8 -8
  130. package/dist/editor/shared/LayoutRenderer.js +1 -1
  131. package/dist/editor/shared/ResizableSidebar.js +1 -1
  132. package/dist/editor/shared/index.js +7 -7
  133. package/dist/hooks/use-analytics.js +3 -3
  134. package/dist/hooks/use-api.js +1 -1
  135. package/dist/hooks/use-cart-api.d.ts.map +1 -1
  136. package/dist/hooks/use-cart-api.js +8 -3
  137. package/dist/hooks/use-catalog-loader.js +3 -3
  138. package/dist/hooks/use-catalog-price-range.d.ts +2 -5
  139. package/dist/hooks/use-catalog-price-range.d.ts.map +1 -1
  140. package/dist/hooks/use-catalog-price-range.js +20 -5
  141. package/dist/hooks/use-category-products.d.ts +8 -0
  142. package/dist/hooks/use-category-products.d.ts.map +1 -0
  143. package/dist/hooks/use-category-products.js +43 -0
  144. package/dist/hooks/use-checkout-fees.d.ts +3 -4
  145. package/dist/hooks/use-checkout-fees.d.ts.map +1 -1
  146. package/dist/hooks/use-checkout-fees.js +1 -1
  147. package/dist/hooks/use-content-ready.js +1 -1
  148. package/dist/hooks/use-featured-products.d.ts +3 -0
  149. package/dist/hooks/use-featured-products.d.ts.map +1 -0
  150. package/dist/hooks/use-featured-products.js +25 -0
  151. package/dist/hooks/use-multi-store-checkout-fees.d.ts +3 -4
  152. package/dist/hooks/use-multi-store-checkout-fees.d.ts.map +1 -1
  153. package/dist/hooks/use-multi-store-checkout-fees.js +1 -1
  154. package/dist/hooks/use-navigation-loading.js +1 -1
  155. package/dist/hooks/use-payaza-checkout.d.ts +1 -1
  156. package/dist/hooks/use-payaza-checkout.d.ts.map +1 -1
  157. package/dist/hooks/use-payaza-checkout.js +9 -3
  158. package/dist/hooks/use-product-brands.d.ts +5 -0
  159. package/dist/hooks/use-product-brands.d.ts.map +1 -0
  160. package/dist/hooks/use-product-brands.js +25 -0
  161. package/dist/hooks/use-product-by-slug.d.ts +7 -0
  162. package/dist/hooks/use-product-by-slug.d.ts.map +1 -0
  163. package/dist/hooks/use-product-by-slug.js +38 -0
  164. package/dist/hooks/use-product-reviews.d.ts +15 -0
  165. package/dist/hooks/use-product-reviews.d.ts.map +1 -0
  166. package/dist/hooks/use-product-reviews.js +75 -0
  167. package/dist/hooks/use-product-variation-selection.d.ts +2 -8
  168. package/dist/hooks/use-product-variation-selection.d.ts.map +1 -1
  169. package/dist/hooks/use-product-variation-selection.js +1 -1
  170. package/dist/hooks/use-products-api.js +3 -3
  171. package/dist/hooks/use-shipping-quote.js +2 -2
  172. package/dist/hooks/use-store-api.js +4 -4
  173. package/dist/hooks/usePreviewSlideSync.js +1 -1
  174. package/dist/index.d.ts +62 -74
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +141 -153
  177. package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -1
  178. package/dist/layouts/booking/components/BookingHomePage.js +68 -74
  179. package/dist/layouts/booking/components/BookingMultilineHeading.js +1 -1
  180. package/dist/layouts/booking/components/BookingTestimonialCard.js +2 -2
  181. package/dist/layouts/booking/components/BookingTestimonialsEmptyState.js +1 -1
  182. package/dist/layouts/booking/components/booking-footer-defaults.js +2 -2
  183. package/dist/layouts/booking/index.js +8 -8
  184. package/dist/layouts/booking/pages/AboutPage.d.ts +1 -1
  185. package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
  186. package/dist/layouts/booking/pages/AboutPage.js +39 -60
  187. package/dist/layouts/booking/pages/BookPage.d.ts.map +1 -1
  188. package/dist/layouts/booking/pages/BookPage.js +16 -22
  189. package/dist/layouts/booking/pages/CategoriesPage.js +6 -6
  190. package/dist/layouts/booking/pages/CategoryPage.d.ts +1 -1
  191. package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -1
  192. package/dist/layouts/booking/pages/CategoryPage.js +17 -26
  193. package/dist/layouts/booking/pages/ContactPage.d.ts +1 -1
  194. package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -1
  195. package/dist/layouts/booking/pages/ContactPage.js +5 -12
  196. package/dist/layouts/booking/pages/ProductDetailPage.d.ts +1 -1
  197. package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
  198. package/dist/layouts/booking/pages/ProductDetailPage.js +203 -150
  199. package/dist/layouts/booking/pages/ServicesPage.d.ts +1 -1
  200. package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -1
  201. package/dist/layouts/booking/pages/ServicesPage.js +11 -31
  202. package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts.map +1 -1
  203. package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +21 -30
  204. package/dist/layouts/booking-agenda/index.js +8 -8
  205. package/dist/layouts/booking-agenda/pages/AboutPage.d.ts +1 -1
  206. package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
  207. package/dist/layouts/booking-agenda/pages/AboutPage.js +11 -14
  208. package/dist/layouts/booking-agenda/pages/BookPage.d.ts.map +1 -1
  209. package/dist/layouts/booking-agenda/pages/BookPage.js +15 -21
  210. package/dist/layouts/booking-agenda/pages/CategoriesPage.js +5 -5
  211. package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts +1 -1
  212. package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -1
  213. package/dist/layouts/booking-agenda/pages/CategoryPage.js +12 -18
  214. package/dist/layouts/booking-agenda/pages/ContactPage.d.ts +1 -1
  215. package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -1
  216. package/dist/layouts/booking-agenda/pages/ContactPage.js +8 -13
  217. package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts +1 -1
  218. package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
  219. package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +202 -149
  220. package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts +1 -1
  221. package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -1
  222. package/dist/layouts/booking-agenda/pages/ServicesPage.js +8 -23
  223. package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
  224. package/dist/layouts/clothing/components/ClothingHomePage.js +199 -136
  225. package/dist/layouts/clothing/index.js +7 -7
  226. package/dist/layouts/clothing/pages/AboutPage.d.ts +1 -1
  227. package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
  228. package/dist/layouts/clothing/pages/AboutPage.js +19 -33
  229. package/dist/layouts/clothing/pages/CategoriesPage.js +8 -8
  230. package/dist/layouts/clothing/pages/CategoryPage.d.ts +1 -1
  231. package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -1
  232. package/dist/layouts/clothing/pages/CategoryPage.js +15 -41
  233. package/dist/layouts/clothing/pages/ContactPage.d.ts +1 -1
  234. package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -1
  235. package/dist/layouts/clothing/pages/ContactPage.js +5 -8
  236. package/dist/layouts/clothing/pages/ProductDetailPage.d.ts +1 -1
  237. package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
  238. package/dist/layouts/clothing/pages/ProductDetailPage.js +256 -167
  239. package/dist/layouts/clothing/pages/ProductsPage.d.ts +1 -1
  240. package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
  241. package/dist/layouts/clothing/pages/ProductsPage.js +125 -59
  242. package/dist/layouts/clothing/payaza-bindings.js +2 -2
  243. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
  244. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +32 -131
  245. package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +8 -8
  246. package/dist/layouts/clothing-minimal/index.js +7 -7
  247. package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts +1 -1
  248. package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
  249. package/dist/layouts/clothing-minimal/pages/AboutPage.js +37 -61
  250. package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +7 -7
  251. package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +1 -1
  252. package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -1
  253. package/dist/layouts/clothing-minimal/pages/CategoryPage.js +13 -18
  254. package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts +1 -1
  255. package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -1
  256. package/dist/layouts/clothing-minimal/pages/ContactPage.js +5 -8
  257. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts +1 -1
  258. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
  259. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +202 -143
  260. package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts +1 -1
  261. package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -1
  262. package/dist/layouts/clothing-minimal/pages/ProductsPage.js +126 -57
  263. package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +7 -7
  264. package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +10 -10
  265. package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
  266. package/dist/layouts/electronics/components/ElectronicsHomePage.js +29 -31
  267. package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +4 -4
  268. package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -1
  269. package/dist/layouts/electronics/components/ElectronicsProductsPage.js +81 -23
  270. package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +2 -2
  271. package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +6 -6
  272. package/dist/layouts/electronics/index.js +18 -18
  273. package/dist/layouts/electronics/pages/AboutPage.d.ts +1 -1
  274. package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
  275. package/dist/layouts/electronics/pages/AboutPage.js +11 -14
  276. package/dist/layouts/electronics/pages/CategoriesPage.js +1 -1
  277. package/dist/layouts/electronics/pages/CategoryPage.d.ts +1 -1
  278. package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -1
  279. package/dist/layouts/electronics/pages/CategoryPage.js +14 -20
  280. package/dist/layouts/electronics/pages/ContactPage.d.ts +1 -1
  281. package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -1
  282. package/dist/layouts/electronics/pages/ContactPage.js +8 -13
  283. package/dist/layouts/electronics/pages/HelpCenterPage.js +1 -1
  284. package/dist/layouts/electronics/pages/PrivacyPolicyPage.js +1 -1
  285. package/dist/layouts/electronics/pages/ProductDetailPage.d.ts +1 -1
  286. package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
  287. package/dist/layouts/electronics/pages/ProductDetailPage.js +201 -142
  288. package/dist/layouts/electronics/pages/ProductsPage.d.ts +1 -1
  289. package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -1
  290. package/dist/layouts/electronics/pages/ProductsPage.js +119 -49
  291. package/dist/layouts/electronics/pages/TermsPage.js +1 -1
  292. package/dist/layouts/electronics/pages/TrackOrderPage.js +4 -4
  293. package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +10 -10
  294. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
  295. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +75 -33
  296. package/dist/layouts/electronics-grid/index.js +14 -14
  297. package/dist/layouts/electronics-grid/pages/AboutPage.d.ts +1 -1
  298. package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
  299. package/dist/layouts/electronics-grid/pages/AboutPage.js +11 -14
  300. package/dist/layouts/electronics-grid/pages/CategoriesPage.js +1 -1
  301. package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +1 -1
  302. package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -1
  303. package/dist/layouts/electronics-grid/pages/CategoryPage.js +14 -20
  304. package/dist/layouts/electronics-grid/pages/ContactPage.d.ts +1 -1
  305. package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -1
  306. package/dist/layouts/electronics-grid/pages/ContactPage.js +8 -13
  307. package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.js +6 -6
  308. package/dist/layouts/electronics-grid/pages/HelpCenterPage.js +1 -1
  309. package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.js +1 -1
  310. package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts +1 -1
  311. package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
  312. package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +201 -142
  313. package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts +1 -1
  314. package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -1
  315. package/dist/layouts/electronics-grid/pages/ProductsPage.js +121 -52
  316. package/dist/layouts/electronics-grid/pages/TermsPage.js +1 -1
  317. package/dist/layouts/electronics-grid/pages/TrackOrderPage.js +4 -4
  318. package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -1
  319. package/dist/layouts/food/components/FoodHomePage.js +42 -41
  320. package/dist/layouts/food/index.js +8 -8
  321. package/dist/layouts/food/pages/AboutPage.d.ts +1 -1
  322. package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
  323. package/dist/layouts/food/pages/AboutPage.js +44 -45
  324. package/dist/layouts/food/pages/CategoriesPage.js +6 -6
  325. package/dist/layouts/food/pages/CategoryPage.d.ts +1 -1
  326. package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -1
  327. package/dist/layouts/food/pages/CategoryPage.js +23 -21
  328. package/dist/layouts/food/pages/ContactPage.d.ts +1 -1
  329. package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -1
  330. package/dist/layouts/food/pages/ContactPage.js +5 -7
  331. package/dist/layouts/food/pages/MenuPage.d.ts +1 -1
  332. package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -1
  333. package/dist/layouts/food/pages/MenuPage.js +81 -42
  334. package/dist/layouts/food/pages/ProductDetailPage.d.ts +1 -1
  335. package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
  336. package/dist/layouts/food/pages/ProductDetailPage.js +209 -171
  337. package/dist/layouts/food/pages/ProductsPage.d.ts +1 -1
  338. package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -1
  339. package/dist/layouts/food/pages/ProductsPage.js +130 -45
  340. package/dist/layouts/food-modern/components/FoodHomePageModern.js +10 -10
  341. package/dist/layouts/food-modern/index.js +8 -8
  342. package/dist/layouts/food-modern/pages/AboutPage.d.ts +1 -1
  343. package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
  344. package/dist/layouts/food-modern/pages/AboutPage.js +11 -14
  345. package/dist/layouts/food-modern/pages/CategoriesPage.js +5 -5
  346. package/dist/layouts/food-modern/pages/CategoryPage.d.ts +1 -1
  347. package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -1
  348. package/dist/layouts/food-modern/pages/CategoryPage.js +23 -20
  349. package/dist/layouts/food-modern/pages/ContactPage.d.ts +1 -1
  350. package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -1
  351. package/dist/layouts/food-modern/pages/ContactPage.js +5 -7
  352. package/dist/layouts/food-modern/pages/MenuPage.d.ts +1 -1
  353. package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -1
  354. package/dist/layouts/food-modern/pages/MenuPage.js +81 -46
  355. package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts +1 -1
  356. package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
  357. package/dist/layouts/food-modern/pages/ProductDetailPage.js +202 -143
  358. package/dist/layouts/food-modern/pages/ProductsPage.d.ts +1 -1
  359. package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -1
  360. package/dist/layouts/food-modern/pages/ProductsPage.js +117 -33
  361. package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -1
  362. package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +32 -23
  363. package/dist/layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper.js +1 -1
  364. package/dist/layouts/motivational-speaker/index.js +9 -9
  365. package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts +1 -1
  366. package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
  367. package/dist/layouts/motivational-speaker/pages/AboutPage.js +6 -9
  368. package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +1 -1
  369. package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -1
  370. package/dist/layouts/motivational-speaker/pages/CategoryPage.js +18 -22
  371. package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts +1 -1
  372. package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -1
  373. package/dist/layouts/motivational-speaker/pages/ContactPage.js +9 -13
  374. package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts +1 -1
  375. package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -1
  376. package/dist/layouts/motivational-speaker/pages/ProductsPage.js +121 -52
  377. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts +1 -1
  378. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -1
  379. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +15 -24
  380. package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts +1 -1
  381. package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -1
  382. package/dist/layouts/motivational-speaker/pages/ServicesPage.js +8 -23
  383. package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +7 -7
  384. package/dist/layouts/shared/components/BaseStoreLayout.js +9 -9
  385. package/dist/layouts/shared/components/CartLineQuantityControl.js +1 -1
  386. package/dist/layouts/shared/components/GenericPageWrapper.js +3 -3
  387. package/dist/layouts/shared/components/ProductPriceFilterSection.js +4 -4
  388. package/dist/layouts/shared/components/PromoBanner.d.ts +1 -4
  389. package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -1
  390. package/dist/layouts/shared/components/PromoBanner.js +12 -8
  391. package/dist/layouts/shared/components/StoreFooter.js +10 -10
  392. package/dist/layouts/shared/components/StoreHeader.js +7 -7
  393. package/dist/layouts/shared/components/TestimonialCard.d.ts.map +1 -1
  394. package/dist/layouts/shared/components/TestimonialCard.js +2 -2
  395. package/dist/layouts/shared/components/headers/BookingAgendaSidebar.js +2 -2
  396. package/dist/layouts/shared/components/headers/ClothingMinimalHeader.js +11 -11
  397. package/dist/layouts/shared/components/headers/FoodModernHeader.js +7 -7
  398. package/dist/layouts/shared/index.js +22 -22
  399. package/dist/layouts/shared/pages/AccountPage.d.ts.map +1 -1
  400. package/dist/layouts/shared/pages/AccountPage.js +101 -27
  401. package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -1
  402. package/dist/layouts/shared/pages/CartPage.js +39 -90
  403. package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
  404. package/dist/layouts/shared/pages/CheckoutPage.js +349 -868
  405. package/dist/layouts/shared/pages/CookiePolicyPage.js +1 -1
  406. package/dist/layouts/shared/pages/FeatureDisabledPage.js +1 -1
  407. package/dist/layouts/shared/pages/HelpCenterPage.js +1 -1
  408. package/dist/layouts/shared/pages/MaintenancePage.d.ts.map +1 -1
  409. package/dist/layouts/shared/pages/MaintenancePage.js +2 -3
  410. package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -1
  411. package/dist/layouts/shared/pages/PortfolioPage.js +2 -2
  412. package/dist/layouts/shared/pages/PrivacyPolicyPage.js +1 -1
  413. package/dist/layouts/shared/pages/SizeGuidePage.js +1 -1
  414. package/dist/layouts/shared/pages/StyleGuidePage.js +3 -3
  415. package/dist/layouts/shared/pages/TeamPage.d.ts.map +1 -1
  416. package/dist/layouts/shared/pages/TeamPage.js +1 -1
  417. package/dist/layouts/shared/pages/TermsPage.js +1 -1
  418. package/dist/layouts/shared/pages/TrackOrderPage.js +4 -4
  419. package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -1
  420. package/dist/layouts/shared/pages/WishlistPage.js +44 -29
  421. package/dist/layouts/shared/wrappers/BookingAgendaLayout.d.ts.map +1 -1
  422. package/dist/layouts/shared/wrappers/BookingAgendaLayout.js +80 -35
  423. package/dist/layouts/shared/wrappers/ClothingLayout.js +8 -8
  424. package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +7 -7
  425. package/dist/layouts/shared/wrappers/ElectronicsLayout.js +5 -5
  426. package/dist/layouts/shared/wrappers/FoodModernLayout.js +6 -6
  427. package/dist/layouts/shared/wrappers/MotivationalLayout.js +9 -9
  428. package/dist/layouts/shared/wrappers/StandardLayout.js +8 -8
  429. package/dist/lib/api.d.ts +3 -4
  430. package/dist/lib/api.d.ts.map +1 -1
  431. package/dist/lib/api.js +69 -109
  432. package/dist/lib/auth-context.js +2 -2
  433. package/dist/lib/content-selectors.d.ts +1 -1
  434. package/dist/lib/content-selectors.d.ts.map +1 -1
  435. package/dist/lib/content-selectors.js +8 -0
  436. package/dist/lib/layout-config-hydration.js +2 -2
  437. package/dist/lib/loading-context.d.ts.map +1 -1
  438. package/dist/lib/loading-context.js +11 -21
  439. package/dist/lib/payaza-checkout.d.ts.map +1 -1
  440. package/dist/lib/payaza-checkout.js +2 -4
  441. package/dist/lib/payaza-public-key.d.ts +6 -0
  442. package/dist/lib/payaza-public-key.d.ts.map +1 -0
  443. package/dist/lib/payaza-public-key.js +10 -0
  444. package/dist/lib/rich-html.d.ts +31 -26
  445. package/dist/lib/rich-html.d.ts.map +1 -1
  446. package/dist/lib/rich-html.js +1 -0
  447. package/dist/lib/services/analytics.service.js +1 -1
  448. package/dist/lib/services/auth.service.js +1 -1
  449. package/dist/lib/services/booking.service.js +1 -1
  450. package/dist/lib/services/category.service.js +1 -1
  451. package/dist/lib/services/checkout.service.d.ts +3 -0
  452. package/dist/lib/services/checkout.service.d.ts.map +1 -1
  453. package/dist/lib/services/checkout.service.js +1 -1
  454. package/dist/lib/services/contact.service.js +1 -1
  455. package/dist/lib/services/customer.service.js +1 -1
  456. package/dist/lib/services/fees.service.d.ts +17 -63
  457. package/dist/lib/services/fees.service.d.ts.map +1 -1
  458. package/dist/lib/services/fees.service.js +4 -138
  459. package/dist/lib/services/index.js +13 -13
  460. package/dist/lib/services/location.service.js +1 -1
  461. package/dist/lib/services/order.service.js +1 -1
  462. package/dist/lib/services/payment.service.js +1 -1
  463. package/dist/lib/services/product.service.d.ts +7 -2
  464. package/dist/lib/services/product.service.d.ts.map +1 -1
  465. package/dist/lib/services/product.service.js +13 -1
  466. package/dist/lib/services/promo.service.js +1 -1
  467. package/dist/lib/services/review.service.js +1 -1
  468. package/dist/lib/services/service.service.js +1 -1
  469. package/dist/lib/services/shipping.service.js +1 -1
  470. package/dist/lib/services/store.service.js +1 -1
  471. package/dist/lib/store-config-utils.d.ts +1 -10
  472. package/dist/lib/store-config-utils.d.ts.map +1 -1
  473. package/dist/lib/store-config-utils.js +73 -261
  474. package/dist/lib/store-config.js +1 -1
  475. package/dist/lib/store-context.d.ts +1 -23
  476. package/dist/lib/store-context.d.ts.map +1 -1
  477. package/dist/lib/store-context.js +89 -111
  478. package/dist/lib/store-types.d.ts +9 -91
  479. package/dist/lib/store-types.d.ts.map +1 -1
  480. package/dist/lib/utils/asset-helpers.js +1 -1
  481. package/dist/lib/utils/catalog-price-bounds.d.ts +16 -6
  482. package/dist/lib/utils/catalog-price-bounds.d.ts.map +1 -1
  483. package/dist/lib/utils/catalog-price-bounds.js +58 -14
  484. package/dist/lib/utils/category-tree.d.ts +9 -0
  485. package/dist/lib/utils/category-tree.d.ts.map +1 -1
  486. package/dist/lib/utils/category-tree.js +26 -0
  487. package/dist/lib/utils/editor-preview.d.ts +5 -0
  488. package/dist/lib/utils/editor-preview.d.ts.map +1 -1
  489. package/dist/lib/utils/editor-preview.js +17 -3
  490. package/dist/lib/utils/fee-calculations.d.ts +5 -1
  491. package/dist/lib/utils/fee-calculations.d.ts.map +1 -1
  492. package/dist/lib/utils/fee-calculations.js +28 -31
  493. package/dist/lib/utils/index.d.ts +1 -1
  494. package/dist/lib/utils/index.d.ts.map +1 -1
  495. package/dist/lib/utils/index.js +4 -4
  496. package/dist/lib/utils/product-images.js +1 -1
  497. package/dist/lib/utils/product-share.js +1 -1
  498. package/dist/lib/utils/url-helpers.d.ts +6 -0
  499. package/dist/lib/utils/url-helpers.d.ts.map +1 -1
  500. package/dist/lib/utils/url-helpers.js +20 -4
  501. package/dist/preview/LayoutPreview.js +6 -6
  502. package/dist/preview/PreviewRouter.js +4 -4
  503. package/dist/preview/canvas/PreviewCanvasEnhancer.js +8 -8
  504. package/dist/preview/canvas/preview-flush-await.js +1 -1
  505. package/dist/preview/canvas/preview-isolation.js +1 -1
  506. package/dist/preview/canvas/preview-route.js +2 -2
  507. package/dist/preview/index.js +5 -5
  508. package/dist/styles/index.css +190 -149
  509. package/package.json +31 -43
@@ -1,5 +1,7 @@
1
1
  import { useState, useCallback } from 'react';
2
- import { useStore } from '../lib/store-context.js';
2
+ import { useStore } from '../lib/store-context';
3
+ import { productService } from '../lib/services/product.service';
4
+ import { transformProductToStoreProduct } from '../lib/store-config-utils';
3
5
  /**
4
6
  * Hook to manage cart - uses StoreContext only (localStorage-based)
5
7
  * Note: cartService removed - all cart operations use StoreContext
@@ -29,8 +31,11 @@ export function useCartApi(storeConfig) {
29
31
  try {
30
32
  setLoading(true);
31
33
  setError(null);
32
- // Find product from storeConfig
33
- const product = storeConfig.products?.find(p => p.id === productId);
34
+ // Bootstrap contains only a catalog page; resolve products outside it by ID.
35
+ let product = storeConfig.products?.find(p => p.id === productId);
36
+ if (!product) {
37
+ product = transformProductToStoreProduct(await productService.getProductById(productId));
38
+ }
34
39
  if (!product) {
35
40
  throw new Error('Product not found');
36
41
  }
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
- import { transformCategoryToStoreCategory, transformProductToStoreProduct, transformServiceToStoreService, } from '../lib/store-config-utils.js';
4
- import { syncFoodMenuItemsFromProducts } from '../lib/utils/editor-preview.js';
5
- import { useLoading } from '../lib/loading-context.js';
3
+ import { transformCategoryToStoreCategory, transformProductToStoreProduct, transformServiceToStoreService, } from '../lib/store-config-utils';
4
+ import { syncFoodMenuItemsFromProducts } from '../lib/utils/editor-preview';
5
+ import { useLoading } from '../lib/loading-context';
6
6
  /**
7
7
  * Hydrates catalog arrays from API when storeConfig has empty products/categories/services.
8
8
  * Used on non-home pages for editor preview (before Phase 2 overlay) and live storefront edge cases.
@@ -1,15 +1,12 @@
1
1
  import { type PriceableItem } from '../lib/utils/catalog-price-bounds';
2
2
  export type UseCatalogPriceRangeOptions = {
3
- /** Used when the catalog is empty (e.g. 5000 retail, 100 food). */
3
+ /** Used when the catalog is empty (e.g. food menus). */
4
4
  fallbackMax?: number;
5
5
  };
6
6
  export declare function useCatalogPriceRange(items: PriceableItem[], options?: UseCatalogPriceRangeOptions): {
7
7
  priceRange: [number, number];
8
8
  setPriceRange: import("react").Dispatch<import("react").SetStateAction<[number, number]>>;
9
- catalogBounds: {
10
- min: number;
11
- max: number;
12
- };
9
+ catalogBounds: import("../lib/utils/catalog-price-bounds").CatalogPriceBounds;
13
10
  sliderMax: number;
14
11
  resetPriceRange: () => void;
15
12
  hasActivePriceFilter: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-catalog-price-range.d.ts","sourceRoot":"","sources":["../../src/hooks/use-catalog-price-range.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,2BAA2B,GAAG;IACxC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EAAE,EACtB,OAAO,GAAE,2BAAgC;;;;;;;;;;EAiC1C"}
1
+ {"version":3,"file":"use-catalog-price-range.d.ts","sourceRoot":"","sources":["../../src/hooks/use-catalog-price-range.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,2BAA2B,GAAG;IACxC,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAYF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EAAE,EACtB,OAAO,GAAE,2BAAgC;;;;;;;EA6C1C"}
@@ -1,20 +1,35 @@
1
1
  'use client';
2
2
  import { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { getCatalogPriceBounds, } from '../lib/utils/catalog-price-bounds.js';
3
+ import { getCatalogPriceBounds, isLegacyDefaultPriceRange, isPriceFilterActive, } from '../lib/utils/catalog-price-bounds';
4
+ function clampPriceRange(range, bounds) {
5
+ return [
6
+ Math.max(bounds.min, Math.min(range[0], bounds.max)),
7
+ Math.min(bounds.max, Math.max(range[1], bounds.min)),
8
+ ];
9
+ }
4
10
  export function useCatalogPriceRange(items, options = {}) {
5
- const fallbackMax = options.fallbackMax ?? 5000;
6
- const catalogBounds = useMemo(() => getCatalogPriceBounds(items, fallbackMax), [items, fallbackMax]);
11
+ const fallbackMax = options.fallbackMax;
12
+ const catalogBounds = useMemo(() => fallbackMax != null
13
+ ? getCatalogPriceBounds(items, fallbackMax)
14
+ : getCatalogPriceBounds(items), [items, fallbackMax]);
7
15
  const [priceRange, setPriceRange] = useState(() => [
8
16
  catalogBounds.min,
9
17
  catalogBounds.max,
10
18
  ]);
11
19
  useEffect(() => {
12
- setPriceRange([catalogBounds.min, catalogBounds.max]);
20
+ setPriceRange((prev) => {
21
+ const wasLegacyDefault = isLegacyDefaultPriceRange(prev);
22
+ const wasFullCatalogRange = prev[0] <= catalogBounds.min && prev[1] >= catalogBounds.max;
23
+ if (wasLegacyDefault || wasFullCatalogRange) {
24
+ return [catalogBounds.min, catalogBounds.max];
25
+ }
26
+ return clampPriceRange(prev, catalogBounds);
27
+ });
13
28
  }, [catalogBounds.min, catalogBounds.max]);
14
29
  const resetPriceRange = useCallback(() => {
15
30
  setPriceRange([catalogBounds.min, catalogBounds.max]);
16
31
  }, [catalogBounds.min, catalogBounds.max]);
17
- const hasActivePriceFilter = priceRange[0] > catalogBounds.min || priceRange[1] < catalogBounds.max;
32
+ const hasActivePriceFilter = isPriceFilterActive(priceRange, catalogBounds);
18
33
  return {
19
34
  priceRange,
20
35
  setPriceRange,
@@ -0,0 +1,8 @@
1
+ import type { StoreProduct } from '../lib/store-types';
2
+ export declare function useCategoryProducts(storeId: string, categoryId?: string): {
3
+ products: StoreProduct[];
4
+ isLoading: boolean;
5
+ hasMore: boolean;
6
+ loadMore: () => Promise<void>;
7
+ };
8
+ //# sourceMappingURL=use-category-products.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-category-products.d.ts","sourceRoot":"","sources":["../../src/hooks/use-category-products.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;;;;;EAqCvE"}
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { productService } from '../lib/services/product.service';
4
+ import { transformProductToStoreProduct } from '../lib/store-config-utils';
5
+ const PAGE_SIZE = 12;
6
+ export function useCategoryProducts(storeId, categoryId) {
7
+ const [products, setProducts] = useState([]);
8
+ const [page, setPage] = useState(1);
9
+ const [total, setTotal] = useState(0);
10
+ const [isLoading, setIsLoading] = useState(Boolean(categoryId));
11
+ const fetchPage = useCallback(async (requestedPage, append = false) => {
12
+ if (!categoryId)
13
+ return;
14
+ setIsLoading(true);
15
+ try {
16
+ const response = await productService.getProducts({
17
+ storeId,
18
+ categoryId,
19
+ page: requestedPage,
20
+ limit: PAGE_SIZE,
21
+ });
22
+ const nextProducts = response.data.map(transformProductToStoreProduct);
23
+ setProducts((current) => append ? [...current, ...nextProducts] : nextProducts);
24
+ setPage(requestedPage);
25
+ setTotal(response.meta.total);
26
+ }
27
+ catch (error) {
28
+ console.error('Failed to fetch category products:', error);
29
+ }
30
+ finally {
31
+ setIsLoading(false);
32
+ }
33
+ }, [categoryId, storeId]);
34
+ useEffect(() => {
35
+ fetchPage(1);
36
+ }, [fetchPage]);
37
+ return {
38
+ products,
39
+ isLoading,
40
+ hasMore: page * PAGE_SIZE < total,
41
+ loadMore: () => fetchPage(page + 1, true),
42
+ };
43
+ }
@@ -1,4 +1,3 @@
1
- import { type CheckoutFeeBreakdown } from '../lib/services/fees.service';
2
1
  export interface UseCheckoutFeesOptions {
3
2
  storeId?: string;
4
3
  subtotal: number;
@@ -8,9 +7,9 @@ export interface UseCheckoutFeesOptions {
8
7
  onError?: (message: string) => void;
9
8
  }
10
9
  export declare function useCheckoutFees({ storeId, subtotal, currency, shippingCost, debounceMs, onError, }: UseCheckoutFeesOptions): {
11
- feeBreakdown: CheckoutFeeBreakdown;
10
+ feeBreakdown: any;
12
11
  loading: boolean;
13
- totalPayable: number;
14
- displayLines: import("../lib/services/fees.service").CheckoutFeeLine[];
12
+ totalPayable: any;
13
+ displayLines: any;
15
14
  };
16
15
  //# sourceMappingURL=use-checkout-fees.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-checkout-fees.d.ts","sourceRoot":"","sources":["../../src/hooks/use-checkout-fees.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AAiCrC,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAgB,EAChB,UAAgB,EAChB,OAAO,GACR,EAAE,sBAAsB;;;;;EAqFxB"}
1
+ {"version":3,"file":"use-checkout-fees.d.ts","sourceRoot":"","sources":["../../src/hooks/use-checkout-fees.ts"],"names":[],"mappings":"AAyCA,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAgB,EAChB,UAAgB,EAChB,OAAO,GACR,EAAE,sBAAsB;;;;;EAqFxB"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
- import { EMPTY_CHECKOUT_FEE_BREAKDOWN, feesService, normalizeCheckoutFeeBreakdown, } from '../lib/services/fees.service.js';
3
+ import { EMPTY_CHECKOUT_FEE_BREAKDOWN, feesService, normalizeCheckoutFeeBreakdown, } from '../lib/services/fees.service';
4
4
  const STORAGE_PREFIX = 'checkoutFees:';
5
5
  function readStoredBreakdown(storeId) {
6
6
  if (typeof window === 'undefined')
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useState, useEffect, useRef, useCallback } from 'react';
3
- import { getContentSelectors, detectRouteType } from '../lib/content-selectors.js';
3
+ import { getContentSelectors, detectRouteType } from '../lib/content-selectors';
4
4
  /**
5
5
  * Hook to detect when page content is ready for display
6
6
  * Uses DOM observation to verify key content elements are present
@@ -0,0 +1,3 @@
1
+ import type { StoreProduct } from '../lib/store-types';
2
+ export declare function useFeaturedProducts(storeId: string, initialProducts: StoreProduct[], enabled?: boolean): StoreProduct[];
3
+ //# sourceMappingURL=use-featured-products.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-featured-products.d.ts","sourceRoot":"","sources":["../../src/hooks/use-featured-products.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,YAAY,EAAE,EAC/B,OAAO,UAAO,kBAwBf"}
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ import { productService } from '../lib/services/product.service';
4
+ import { transformProductToStoreProduct } from '../lib/store-config-utils';
5
+ export function useFeaturedProducts(storeId, initialProducts, enabled = true) {
6
+ const [products, setProducts] = useState(initialProducts);
7
+ const hasInitialProducts = initialProducts.length > 0;
8
+ useEffect(() => {
9
+ if (!enabled || hasInitialProducts)
10
+ return;
11
+ let cancelled = false;
12
+ productService
13
+ .getFeaturedProducts(storeId, 12)
14
+ .then((apiProducts) => {
15
+ if (!cancelled && apiProducts.length > 0) {
16
+ setProducts(apiProducts.map(transformProductToStoreProduct));
17
+ }
18
+ })
19
+ .catch((error) => console.error('Failed to load featured products:', error));
20
+ return () => {
21
+ cancelled = true;
22
+ };
23
+ }, [enabled, hasInitialProducts, storeId]);
24
+ return products;
25
+ }
@@ -1,4 +1,3 @@
1
- import { type CheckoutFeeBreakdown, type CheckoutFeeLine } from '../lib/services/fees.service';
2
1
  export interface MultiStoreSubtotal {
3
2
  storeId: string;
4
3
  subtotal: number;
@@ -17,9 +16,9 @@ export interface UseMultiStoreCheckoutFeesOptions {
17
16
  * backend computes fees per-store during process-marketplace.
18
17
  */
19
18
  export declare function useMultiStoreCheckoutFees({ stores, currency, debounceMs, onError, }: UseMultiStoreCheckoutFeesOptions): {
20
- feeBreakdown: CheckoutFeeBreakdown;
19
+ feeBreakdown: any;
21
20
  loading: boolean;
22
- totalPayable: number;
23
- displayLines: CheckoutFeeLine[];
21
+ totalPayable: any;
22
+ displayLines: any;
24
23
  };
25
24
  //# sourceMappingURL=use-multi-store-checkout-fees.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-multi-store-checkout-fees.d.ts","sourceRoot":"","sources":["../../src/hooks/use-multi-store-checkout-fees.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAqDD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,UAAgB,EAChB,OAAO,GACR,EAAE,gCAAgC;;;;;EAwElC"}
1
+ {"version":3,"file":"use-multi-store-checkout-fees.d.ts","sourceRoot":"","sources":["../../src/hooks/use-multi-store-checkout-fees.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAqDD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,QAAQ,EACR,UAAgB,EAChB,OAAO,GACR,EAAE,gCAAgC;;;;;EAwElC"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
- import { EMPTY_CHECKOUT_FEE_BREAKDOWN, feesService, } from '../lib/services/fees.service.js';
3
+ import { EMPTY_CHECKOUT_FEE_BREAKDOWN, feesService, } from '../lib/services/fees.service';
4
4
  function sumFeeBreakdowns(breakdowns) {
5
5
  if (breakdowns.length === 0)
6
6
  return EMPTY_CHECKOUT_FEE_BREAKDOWN;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useCallback } from 'react';
3
3
  import { useRouter } from 'next/navigation';
4
- import { useLoading } from '../lib/loading-context.js';
4
+ import { useLoading } from '../lib/loading-context';
5
5
  export function useNavigationLoading() {
6
6
  const router = useRouter();
7
7
  const { startPageLoading, stopPageLoading } = useLoading();
@@ -1,6 +1,6 @@
1
1
  import { PayazaCheckoutConfig, PayazaCheckoutResponse } from '../lib/payaza-checkout';
2
2
  interface UsePayazaCheckoutOptions {
3
- /** Fallback only — prefer `publicKey` on each checkout config (backend currency-resolved key). */
3
+ /** Deprecated — pass `publicKey` on each checkout call (backend currency-resolved key). */
4
4
  publicKey?: string;
5
5
  onSuccess?: (response: PayazaCheckoutResponse) => void;
6
6
  onError?: (error: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"use-payaza-checkout.d.ts","sourceRoot":"","sources":["../../src/hooks/use-payaza-checkout.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,oBAAoB,EAAE,sBAAsB,EAA6B,MAAM,uBAAuB,CAAC;AAGxI,UAAU,wBAAwB;IAChC,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAc,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,wBAAwB;uBAiBzE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;;;EA8GhG"}
1
+ {"version":3,"file":"use-payaza-checkout.d.ts","sourceRoot":"","sources":["../../src/hooks/use-payaza-checkout.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,oBAAoB,EAAE,sBAAsB,EAA6B,MAAM,uBAAuB,CAAC;AAGxI,UAAU,wBAAwB;IAChC,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAc,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,wBAAwB;uBAiBzE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;;;EAoHhG"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useState, useRef, useEffect } from 'react';
3
- import { initiatePayazaCheckout, teardownPayazaCheckoutDom } from '../lib/payaza-checkout.js';
4
- import { orderService } from '../lib/services/order.service.js';
3
+ import { initiatePayazaCheckout, teardownPayazaCheckoutDom } from '../lib/payaza-checkout';
4
+ import { orderService } from '../lib/services/order.service';
5
5
  export function usePayazaCheckout({ publicKey = '', onSuccess, onError, onClose }) {
6
6
  const [isLoading, setIsLoading] = useState(false);
7
7
  const [error, setError] = useState(null);
@@ -18,7 +18,13 @@ export function usePayazaCheckout({ publicKey = '', onSuccess, onError, onClose
18
18
  };
19
19
  }, []);
20
20
  const checkout = async (config) => {
21
- const resolvedPublicKey = config.publicKey || publicKey;
21
+ const resolvedPublicKey = (config.publicKey || publicKey)?.trim();
22
+ if (!resolvedPublicKey) {
23
+ const message = 'Payment gateway not configured for this currency. Please contact support.';
24
+ setError(message);
25
+ onError?.(message);
26
+ return;
27
+ }
22
28
  setIsLoading(true);
23
29
  setError(null);
24
30
  let callbackFired = false;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Full-catalog brand list for filter sidebars (not derived from the current page only).
3
+ */
4
+ export declare function useProductBrands(storeId: string, fallback?: string[]): string[];
5
+ //# sourceMappingURL=use-product-brands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-product-brands.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-brands.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,EAAO,YAkBxE"}
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ import { productService } from '../lib/services/product.service';
4
+ /**
5
+ * Full-catalog brand list for filter sidebars (not derived from the current page only).
6
+ */
7
+ export function useProductBrands(storeId, fallback = []) {
8
+ const [brands, setBrands] = useState(fallback);
9
+ useEffect(() => {
10
+ if (!storeId)
11
+ return;
12
+ let cancelled = false;
13
+ productService
14
+ .getProductBrands(storeId)
15
+ .then((next) => {
16
+ if (!cancelled && next.length > 0)
17
+ setBrands(next);
18
+ })
19
+ .catch((error) => console.error('Failed to load product brands:', error));
20
+ return () => {
21
+ cancelled = true;
22
+ };
23
+ }, [storeId]);
24
+ return brands;
25
+ }
@@ -0,0 +1,7 @@
1
+ import type { StoreProduct } from '../lib/store-types';
2
+ export declare function useProductBySlug(storeId: string, slug: string, initialProduct?: StoreProduct): {
3
+ product: StoreProduct;
4
+ relatedProducts: StoreProduct[];
5
+ isLoading: boolean;
6
+ };
7
+ //# sourceMappingURL=use-product-by-slug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-product-by-slug.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-by-slug.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,YAAY;;;;EAoC9B"}
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ import { productService } from '../lib/services/product.service';
4
+ import { transformProductToStoreProduct } from '../lib/store-config-utils';
5
+ export function useProductBySlug(storeId, slug, initialProduct) {
6
+ const [product, setProduct] = useState(initialProduct);
7
+ const [relatedProducts, setRelatedProducts] = useState([]);
8
+ const [isLoading, setIsLoading] = useState(!initialProduct);
9
+ useEffect(() => {
10
+ if (initialProduct) {
11
+ setProduct(initialProduct);
12
+ setIsLoading(false);
13
+ return;
14
+ }
15
+ let cancelled = false;
16
+ setIsLoading(true);
17
+ productService
18
+ .getProductBySlug(slug, storeId)
19
+ .then(({ product: apiProduct, relatedProducts: apiRelatedProducts }) => {
20
+ if (cancelled)
21
+ return;
22
+ setProduct(transformProductToStoreProduct(apiProduct));
23
+ setRelatedProducts(apiRelatedProducts.map(transformProductToStoreProduct));
24
+ })
25
+ .catch((error) => {
26
+ if (!cancelled)
27
+ console.error('Failed to load product:', error);
28
+ })
29
+ .finally(() => {
30
+ if (!cancelled)
31
+ setIsLoading(false);
32
+ });
33
+ return () => {
34
+ cancelled = true;
35
+ };
36
+ }, [initialProduct, slug, storeId]);
37
+ return { product, relatedProducts, isLoading };
38
+ }
@@ -0,0 +1,15 @@
1
+ import type { ProductReview } from '../lib/store-types';
2
+ import { type Review } from '../lib/services/review.service';
3
+ export declare function mapApiReviewToProductReview(review: Review): ProductReview;
4
+ export declare function useProductReviews(productId?: string | null): {
5
+ reviews: ProductReview[];
6
+ isLoading: boolean;
7
+ isSubmitting: boolean;
8
+ refresh: () => Promise<void>;
9
+ submitReview: (input: {
10
+ rating: number;
11
+ title?: string;
12
+ comment?: string;
13
+ }) => Promise<void>;
14
+ };
15
+ //# sourceMappingURL=use-product-reviews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-product-reviews.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-reviews.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAc5E,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAezE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;;;;;0BA0BzC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;EAkBrE"}
@@ -0,0 +1,75 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { reviewService } from '../lib/services/review.service';
4
+ function customerDisplayName(customer) {
5
+ if (!customer || typeof customer !== 'object')
6
+ return 'Customer';
7
+ const first = typeof customer.firstName === 'string' ? customer.firstName.trim() : '';
8
+ const last = typeof customer.lastName === 'string' ? customer.lastName.trim() : '';
9
+ if (first && last)
10
+ return `${first} ${last.charAt(0)}.`;
11
+ if (first)
12
+ return first;
13
+ if (typeof customer.email === 'string' && customer.email.includes('@')) {
14
+ return customer.email.split('@')[0] || 'Customer';
15
+ }
16
+ return 'Customer';
17
+ }
18
+ export function mapApiReviewToProductReview(review) {
19
+ const rawComment = typeof review.comment === 'string' ? review.comment.trim() : '';
20
+ const [maybeTitle, ...rest] = rawComment.split(/\n\n+/);
21
+ const hasSplitTitle = rest.length > 0 && maybeTitle.length > 0 && maybeTitle.length <= 120;
22
+ return {
23
+ id: review.id,
24
+ userId: review.customerId,
25
+ userName: customerDisplayName(review.customer),
26
+ userAvatar: typeof review.customer?.avatar === 'string' ? review.customer.avatar : undefined,
27
+ rating: Number(review.rating) || 0,
28
+ title: hasSplitTitle ? maybeTitle : undefined,
29
+ comment: hasSplitTitle ? rest.join('\n\n') : rawComment,
30
+ date: review.createdAt,
31
+ verified: Boolean(review.isVerified),
32
+ };
33
+ }
34
+ export function useProductReviews(productId) {
35
+ const [reviews, setReviews] = useState([]);
36
+ const [isLoading, setIsLoading] = useState(false);
37
+ const [isSubmitting, setIsSubmitting] = useState(false);
38
+ const refresh = useCallback(async () => {
39
+ if (!productId) {
40
+ setReviews([]);
41
+ return;
42
+ }
43
+ setIsLoading(true);
44
+ try {
45
+ const page = await reviewService.getProductReviews(productId, 1, 50);
46
+ setReviews((page.data || []).map(mapApiReviewToProductReview));
47
+ }
48
+ catch {
49
+ setReviews([]);
50
+ }
51
+ finally {
52
+ setIsLoading(false);
53
+ }
54
+ }, [productId]);
55
+ useEffect(() => {
56
+ void refresh();
57
+ }, [refresh]);
58
+ const submitReview = useCallback(async (input) => {
59
+ if (!productId)
60
+ throw new Error('Product is required');
61
+ setIsSubmitting(true);
62
+ try {
63
+ await reviewService.createReview(productId, {
64
+ rating: Math.round(input.rating),
65
+ title: input.title,
66
+ comment: input.comment,
67
+ });
68
+ await refresh();
69
+ }
70
+ finally {
71
+ setIsSubmitting(false);
72
+ }
73
+ }, [productId, refresh]);
74
+ return { reviews, isLoading, isSubmitting, refresh, submitReview };
75
+ }
@@ -9,16 +9,10 @@ export declare function useProductVariationSelection(variants?: StoreProductVari
9
9
  setSelectedSize: (value: string) => void;
10
10
  matchingVariation: {
11
11
  id: string;
12
- name?: string;
13
- value?: string;
14
- attributes?: Record<string, string>;
12
+ name: string;
13
+ value: string;
15
14
  price?: number;
16
- compareAtPrice?: number;
17
15
  sku?: string;
18
- stock?: number;
19
- inStock?: boolean;
20
- isActive?: boolean;
21
- images?: string[];
22
16
  };
23
17
  hasVariations: boolean;
24
18
  /** True when the shopper picked at least one option; empty → use main product. */
@@ -1 +1 @@
1
- {"version":3,"file":"use-product-variation-selection.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-variation-selection.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE;;;wBAYpC,MAAM,SAAS,MAAM;;;8BA8ChC,MAAM;6BACP,MAAM;;;;;;;;;;;;;;;IAG/B,kFAAkF;;;EAIrF"}
1
+ {"version":3,"file":"use-product-variation-selection.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-variation-selection.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE;;;wBAYpC,MAAM,SAAS,MAAM;;;8BA8ChC,MAAM;6BACP,MAAM;;;;;;;;;IAG/B,kFAAkF;;;EAIrF"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { getVariationOptionGroups, } from '../lib/product-variation-utils.js';
3
+ import { getVariationOptionGroups, } from '../lib/product-variation-utils';
4
4
  export function useProductVariationSelection(variants) {
5
5
  const optionGroups = useMemo(() => getVariationOptionGroups(variants), [variants]);
6
6
  const [selectedAttributes, setSelectedAttributes] = useState({});
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect, useCallback } from 'react';
2
- import { productService } from '../lib/services/product.service.js';
3
- import { shouldUseAPI } from '../lib/utils/demo-detection.js';
4
- import { useLoading } from '../lib/loading-context.js';
2
+ import { productService } from '../lib/services/product.service';
3
+ import { shouldUseAPI } from '../lib/utils/demo-detection';
4
+ import { useLoading } from '../lib/loading-context';
5
5
  /**
6
6
  * Hook to fetch products from API or use mock data for demo stores
7
7
  */
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
- import { shippingService } from '../lib/services/shipping.service.js';
4
- import { EMPTY_SHIPPING_QUOTE_ADDRESS, canRequestShippingQuote, buildShippingCalculatePayload, } from '../lib/shipping-address.util.js';
3
+ import { shippingService } from '../lib/services/shipping.service';
4
+ import { EMPTY_SHIPPING_QUOTE_ADDRESS, canRequestShippingQuote, buildShippingCalculatePayload, } from '../lib/shipping-address.util';
5
5
  export function useShippingQuote({ storeId, productId, productPrice, currency, quantity, enabled = true, customerInfo, initialAddress, }) {
6
6
  const [address, setAddress] = useState({
7
7
  ...EMPTY_SHIPPING_QUOTE_ADDRESS,
@@ -1,8 +1,8 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { storeService } from '../lib/services/store.service.js';
3
- import { shouldUseAPI, getBaseStoreSlug } from '../lib/utils/demo-detection.js';
4
- import { getStoreConfig } from '../lib/store-config.js';
5
- import { useLoading } from '../lib/loading-context.js';
2
+ import { storeService } from '../lib/services/store.service';
3
+ import { shouldUseAPI, getBaseStoreSlug } from '../lib/utils/demo-detection';
4
+ import { getStoreConfig } from '../lib/store-config';
5
+ import { useLoading } from '../lib/loading-context';
6
6
  /**
7
7
  * Hook to fetch store data from API or use mock data for demo stores
8
8
  */
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useEffect } from 'react';
3
- import { PREVIEW_MSG } from '../preview/canvas/preview-messages.js';
3
+ import { PREVIEW_MSG } from '../preview/canvas/preview-messages';
4
4
  /**
5
5
  * Syncs hero carousel index when the template editor selects a slide in the inspector.
6
6
  */