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
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Cookie, ArrowLeft } from 'lucide-react';
4
4
  import Link from 'next/link';
5
- import { formatDateSafe } from '../../../utils/date.js';
5
+ import { formatDateSafe } from '../../../utils/date';
6
6
  export function CookiePolicyPage({ storeConfig }) {
7
7
  const primaryColor = storeConfig.branding.primaryColor;
8
8
  return (_jsxs("div", { className: "min-h-screen bg-gray-50 pb-20", children: [_jsx("div", { className: "bg-white border-b", children: _jsxs("div", { className: "container mx-auto px-4 py-8", children: [_jsxs(Link, { href: `/${storeConfig.slug}`, className: "inline-flex items-center gap-2 text-gray-500 hover:text-gray-900 transition-colors mb-6", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), "Back to Home"] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center", style: { backgroundColor: `${primaryColor}15` }, children: _jsx(Cookie, { className: "w-6 h-6", style: { color: primaryColor } }) }), _jsx("h1", { className: "text-3xl font-bold text-gray-900", children: "Cookie Policy" })] })] }) }), _jsx("div", { className: "container mx-auto px-4 py-12 max-w-4xl", children: _jsxs("div", { className: "bg-white rounded-2xl p-8 md:p-12 shadow-sm border border-gray-100 prose prose-lg max-w-none", children: [_jsxs("p", { className: "text-gray-500 lead", children: ["Last updated: ", formatDateSafe(new Date(), undefined, { month: 'long', day: 'numeric', year: 'numeric' })] }), _jsx("p", { children: "This Cookie Policy explains what cookies are and how we use them. You should read this policy so you can understand what type of cookies we use, or the information we collect using cookies and how that information is used." }), _jsx("h3", { children: "What are cookies?" }), _jsx("p", { children: "Cookies are small text files that are sent to your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you." }), _jsxs("h3", { children: ["How ", storeConfig.name, " uses cookies"] }), _jsx("p", { children: "When you use and access the Service, we may place a number of cookies files in your web browser. We use cookies for the following purposes:" }), _jsxs("ul", { children: [_jsx("li", { children: "To enable certain functions of the Service" }), _jsx("li", { children: "To provide analytics" }), _jsx("li", { children: "To store your preferences" }), _jsx("li", { children: "To enable advertisements delivery, including behavioral advertising" })] }), _jsx("h3", { children: "Types of cookies we use" }), _jsx("h4", { children: "Essential Cookies" }), _jsx("p", { children: "We use essential cookies to authenticate users and prevent fraudulent use of user accounts." }), _jsx("h4", { children: "Preferences Cookies" }), _jsx("p", { children: "We use preferences cookies to remember information that changes the way the Service behaves or looks, such as the \"remember me\" functionality of a registered user or a user's language preference." }), _jsx("h4", { children: "Analytics Cookies" }), _jsx("p", { children: "We use analytics cookies to track information how the Service is used so that we can make improvements. We may also use analytics cookies to test new advertisements, pages, features or new functionality of the Service to see how our users react to them." }), _jsx("h3", { children: "Third-party cookies" }), _jsx("p", { children: "In addition to our own cookies, we may also use various third-parties cookies to report usage statistics of the Service, deliver advertisements on and through the Service, and so on." }), _jsx("h3", { children: "What are your choices regarding cookies?" }), _jsx("p", { children: "If you'd like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser." }), _jsx("p", { children: "Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features we offer, you may not be able to store your preferences, and some of our pages might not display properly." })] }) })] }));
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Link from 'next/link';
4
- import { Button } from '../../../components/ui/button.js';
4
+ import { Button } from '../../../components/ui/button';
5
5
  import { Home, ArrowLeft, Lock } from 'lucide-react';
6
6
  export function FeatureDisabledPage({ storeConfig, featureName, featureDescription = 'This page is not available for this store.' }) {
7
7
  return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-gradient-to-br from-gray-50 via-white to-gray-50 px-4", children: _jsxs("div", { className: "text-center max-w-2xl w-full", children: [_jsxs("div", { className: "mb-8", children: [_jsx("div", { className: "w-20 h-20 mx-auto mb-6 rounded-full bg-gray-100 flex items-center justify-center", children: _jsx(Lock, { className: "w-10 h-10 text-gray-400" }) }), _jsx("h1", { className: "text-6xl font-black text-transparent bg-clip-text bg-gradient-to-r from-gray-900 via-gray-700 to-gray-900 mb-4 tracking-tight", children: "Page Not Available" }), _jsx("div", { className: "w-24 h-1 bg-gradient-to-r from-transparent via-gray-400 to-transparent mx-auto" })] }), _jsxs("div", { className: "space-y-4 mb-12", children: [_jsxs("h2", { className: "text-2xl md:text-3xl font-bold text-gray-900", children: [featureName, " is not enabled"] }), _jsx("p", { className: "text-lg text-gray-600 max-w-md mx-auto leading-relaxed", children: featureDescription })] }), _jsxs("div", { className: "flex flex-col sm:flex-row items-center justify-center gap-4 mb-12", children: [_jsx(Link, { href: `/${storeConfig.slug}`, children: _jsxs(Button, { size: "lg", className: "w-full sm:w-auto bg-black hover:bg-gray-800 text-white rounded-full px-8 py-6 h-auto font-semibold shadow-lg shadow-black/10 hover:shadow-xl transition-all hover:scale-105 flex items-center gap-2", children: [_jsx(Home, { className: "w-5 h-5" }), "Back to Store"] }) }), _jsx(Link, { href: `/${storeConfig.slug}`, children: _jsxs(Button, { variant: "outline", size: "lg", className: "w-full sm:w-auto border-2 border-gray-200 hover:border-gray-300 rounded-full px-8 py-6 h-auto font-semibold hover:bg-gray-50 transition-all flex items-center gap-2", children: [_jsx(ArrowLeft, { className: "w-5 h-5" }), "Go Back"] }) })] }), _jsxs("div", { className: "absolute inset-0 -z-10 overflow-hidden pointer-events-none", children: [_jsx("div", { className: "absolute top-1/4 left-1/4 w-96 h-96 bg-gray-100 rounded-full blur-3xl opacity-20" }), _jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-gray-100 rounded-full blur-3xl opacity-20" })] })] }) }));
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Search, ChevronDown, ChevronUp, Mail, Phone, MessageCircle } from 'lucide-react';
4
4
  import { useState } from 'react';
5
- import { Button } from '../../../components/ui/button.js';
5
+ import { Button } from '../../../components/ui/button';
6
6
  export function HelpCenterPage({ storeConfig }) {
7
7
  const primaryColor = storeConfig.branding.primaryColor;
8
8
  const faqConfig = storeConfig.layoutConfig?.pages?.faq;
@@ -1 +1 @@
1
- {"version":3,"file":"MaintenancePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/MaintenancePage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKhD,UAAU,oBAAoB;IAC5B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,EAAE,oBAAoB,2CA2EpE"}
1
+ {"version":3,"file":"MaintenancePage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/MaintenancePage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,UAAU,oBAAoB;IAC5B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,EAAE,oBAAoB,2CAkEpE"}
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { formatStoreDisplayName } from '../../../lib/utils/index.js';
4
- import { getCurrentYear } from '../../../utils/date.js';
3
+ import { formatStoreDisplayName } from '../../../lib/utils';
5
4
  import { RefreshCw, Store } from 'lucide-react';
6
5
  export function MaintenancePage({ storeConfig }) {
7
6
  const primaryColor = storeConfig.branding.primaryColor || '#1b0029';
8
7
  const storeDisplayName = formatStoreDisplayName(storeConfig.name);
9
- return (_jsxs("div", { className: "relative flex min-h-[100dvh] min-h-screen items-center justify-center overflow-hidden bg-[#f7f5f0] px-4 py-6 pb-[max(1.5rem,env(safe-area-inset-bottom))] pt-[max(1.5rem,env(safe-area-inset-top))] selection:bg-[#f7f5f0] selection:text-[#1b0029] sm:px-6 sm:py-10", style: { backgroundColor: '#f7f5f0' }, children: [_jsxs("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", children: [_jsx("div", { className: "absolute right-[-20%] top-[-15%] h-[280px] w-[280px] rounded-full bg-[#f7f5f0] opacity-90 blur-[80px] sm:h-[480px] sm:w-[480px] sm:blur-[100px]" }), _jsx("div", { className: "absolute bottom-0 left-[-10%] h-[240px] w-[320px] bg-gradient-to-t from-[#d16253]/12 to-transparent sm:h-[480px] sm:w-[640px]" }), _jsx("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_20%_20%,rgba(68,0,102,0.05),transparent_40%),radial-gradient(circle_at_80%_70%,rgba(209,98,83,0.08),transparent_45%)]" })] }), _jsxs("div", { className: "relative z-10 w-full max-w-md text-center sm:max-w-2xl lg:max-w-3xl", children: [_jsxs("div", { className: "mb-5 flex flex-col items-center gap-3 sm:mb-7 sm:gap-4", children: [_jsx("span", { className: "inline-flex items-center rounded-full border border-[#1b0029]/10 bg-white px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[#1b0029] shadow-sm sm:text-xs sm:tracking-wide", children: "Coming Soon" }), _jsxs("div", { className: "relative flex h-20 w-20 items-center justify-center sm:h-24 sm:w-24 md:h-28 md:w-28", children: [_jsx("div", { className: "absolute inset-0 rounded-full opacity-20 blur-lg animate-pulse-slow sm:blur-xl", style: { backgroundColor: primaryColor } }), _jsx("div", { className: "relative flex h-full w-full rotate-2 transform items-center justify-center rounded-2xl border border-[#1b0029]/10 bg-white p-3 shadow-xl transition-transform duration-500 hover:rotate-0 sm:rounded-[28px] sm:p-3.5 md:rounded-[32px]", children: storeConfig.branding?.logo ? (_jsx("img", { src: storeConfig.branding.logo, alt: storeDisplayName, className: "max-h-full max-w-full object-contain" })) : (_jsx(Store, { className: "h-9 w-9 text-[#1b0029] sm:h-11 sm:w-11 md:h-12 md:w-12" })) })] })] }), _jsxs("div", { className: "animate-fade-in-up space-y-3 sm:space-y-4", children: [_jsxs("h1", { className: "text-[1.65rem] font-semibold leading-tight tracking-tight text-[#1b0029] sm:text-3xl md:text-4xl lg:text-5xl", children: ["Something good is", ' ', _jsx("span", { className: "font-normal italic text-[#d16253]", children: "on the way" }), "."] }), _jsxs("div", { className: "mx-auto max-w-lg space-y-2 sm:space-y-2.5", children: [_jsxs("p", { className: "text-sm font-medium leading-snug text-[#1b0029] sm:text-base md:text-lg", children: [storeDisplayName, " isn't open for shopping right now."] }), _jsx("p", { className: "text-xs leading-relaxed text-[#5c4d68] sm:text-sm md:text-base", children: "Check back soon \u2014 we're putting the finishing touches on this storefront." })] })] }), _jsx("div", { className: "mt-5 flex animate-fade-in-up justify-center sm:mt-7", style: { animationDelay: '0.1s' }, children: _jsxs("button", { type: "button", onClick: () => window.location.reload(), className: "group flex h-11 w-full max-w-xs items-center justify-center rounded-full bg-[#1b0029] px-5 text-sm font-semibold text-white shadow-md transition-all hover:bg-[#220033] hover:shadow-lg sm:h-12 sm:max-w-none sm:min-w-[180px] sm:px-7 sm:text-base", children: [_jsx(RefreshCw, { className: "mr-1.5 h-4 w-4 transition-transform group-hover:rotate-180 sm:mr-2 sm:h-5 sm:w-5" }), "Try Again"] }) }), _jsxs("p", { className: "mt-5 text-[10px] font-medium text-[#7b6d88] sm:mt-7 sm:text-xs", children: ["\u00A9 ", getCurrentYear(), " Storefront Inc."] })] })] }));
8
+ return (_jsxs("div", { className: "relative flex min-h-[100dvh] min-h-screen items-center justify-center overflow-hidden bg-[#f7f5f0] px-4 py-6 pb-[max(1.5rem,env(safe-area-inset-bottom))] pt-[max(1.5rem,env(safe-area-inset-top))] selection:bg-[#f7f5f0] selection:text-[#1b0029] sm:px-6 sm:py-10", style: { backgroundColor: '#f7f5f0' }, children: [_jsxs("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", children: [_jsx("div", { className: "absolute right-[-20%] top-[-15%] h-[280px] w-[280px] rounded-full bg-[#f7f5f0] opacity-90 blur-[80px] sm:h-[480px] sm:w-[480px] sm:blur-[100px]" }), _jsx("div", { className: "absolute bottom-0 left-[-10%] h-[240px] w-[320px] bg-gradient-to-t from-[#d16253]/12 to-transparent sm:h-[480px] sm:w-[640px]" }), _jsx("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_20%_20%,rgba(68,0,102,0.05),transparent_40%),radial-gradient(circle_at_80%_70%,rgba(209,98,83,0.08),transparent_45%)]" })] }), _jsxs("div", { className: "relative z-10 w-full max-w-md text-center sm:max-w-2xl lg:max-w-3xl", children: [_jsxs("div", { className: "mb-5 flex flex-col items-center gap-3 sm:mb-7 sm:gap-4", children: [_jsx("span", { className: "inline-flex items-center rounded-full border border-[#1b0029]/10 bg-white px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[#1b0029] shadow-sm sm:text-xs sm:tracking-wide", children: "Coming Soon" }), _jsxs("div", { className: "relative flex h-20 w-20 items-center justify-center sm:h-24 sm:w-24 md:h-28 md:w-28", children: [_jsx("div", { className: "absolute inset-0 rounded-full opacity-20 blur-lg animate-pulse-slow sm:blur-xl", style: { backgroundColor: primaryColor } }), _jsx("div", { className: "relative flex h-full w-full rotate-2 transform items-center justify-center rounded-2xl border border-[#1b0029]/10 bg-white p-3 shadow-xl transition-transform duration-500 hover:rotate-0 sm:rounded-[28px] sm:p-3.5 md:rounded-[32px]", children: storeConfig.branding?.logo ? (_jsx("img", { src: storeConfig.branding.logo, alt: storeDisplayName, className: "max-h-full max-w-full object-contain" })) : (_jsx(Store, { className: "h-9 w-9 text-[#1b0029] sm:h-11 sm:w-11 md:h-12 md:w-12" })) })] })] }), _jsxs("div", { className: "animate-fade-in-up space-y-3 sm:space-y-4", children: [_jsxs("h1", { className: "text-[1.65rem] font-semibold leading-tight tracking-tight text-[#1b0029] sm:text-3xl md:text-4xl lg:text-5xl", children: ["Something good is", ' ', _jsx("span", { className: "font-normal italic text-[#d16253]", children: "on the way" }), "."] }), _jsxs("p", { className: "mx-auto max-w-lg text-sm font-medium leading-snug text-[#1b0029] sm:text-base md:text-lg", children: [storeDisplayName, " isn't open for shopping right now."] })] }), _jsx("div", { className: "mt-5 flex animate-fade-in-up justify-center sm:mt-7", style: { animationDelay: '0.1s' }, children: _jsxs("button", { type: "button", onClick: () => window.location.reload(), className: "group inline-flex h-9 items-center justify-center rounded-full bg-[#1b0029] px-4 text-xs font-semibold text-white shadow-md transition-all hover:bg-[#220033] hover:shadow-lg sm:h-10 sm:px-5 sm:text-sm", children: [_jsx(RefreshCw, { className: "mr-1.5 h-3.5 w-3.5 transition-transform group-hover:rotate-180 sm:h-4 sm:w-4" }), "Try Again"] }) })] })] }));
10
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PortfolioPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/PortfolioPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,2CAwThE"}
1
+ {"version":3,"file":"PortfolioPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/PortfolioPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,2CAsThE"}
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Calendar, X, ChevronLeft, ChevronRight } from 'lucide-react';
4
4
  import Link from 'next/link';
5
5
  import { useState, useEffect, useCallback } from 'react';
6
- import { cn } from '../../../lib/utils/index.js';
6
+ import { cn } from '../../../lib/utils';
7
7
  import Image from 'next/image';
8
8
  export function PortfolioPage({ storeConfig }) {
9
9
  const primaryColor = storeConfig.branding.primaryColor;
@@ -126,5 +126,5 @@ export function PortfolioPage({ storeConfig }) {
126
126
  ? "bg-gray-900 text-white shadow-sm"
127
127
  : "text-gray-500 hover:text-gray-900 hover:bg-gray-50"), children: "All" }), categories.map((category) => (_jsx("button", { onClick: () => setActiveCategory(category), className: cn("px-6 py-2.5 rounded-full text-sm font-bold whitespace-nowrap flex-shrink-0 transition-all", activeCategory === category
128
128
  ? "text-white shadow-sm"
129
- : "text-gray-500 hover:text-gray-900 hover:bg-gray-50"), style: activeCategory === category ? { backgroundColor: primaryColor } : {}, children: category }, category)))] }) }) }), _jsx("div", { className: "container mx-auto px-4 max-w-7xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: filteredItems.map((item, index) => (_jsxs("div", { onClick: () => setSelectedIndex(index), className: "group relative overflow-hidden rounded-2xl bg-gray-100 aspect-[4/5] cursor-pointer", children: [_jsx(Image, { src: item.image, alt: item.title, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110", unoptimized: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-end p-6", children: _jsxs("div", { className: "text-white", children: [_jsxs("div", { className: "flex items-center gap-2 mb-2", children: [_jsx("span", { className: "text-xs font-bold uppercase tracking-wider opacity-80", children: item.category }), item.featured && (_jsx("span", { className: "text-xs px-2 py-0.5 rounded-full bg-white/20 backdrop-blur", children: "Featured" }))] }), _jsx("h3", { className: "text-xl font-bold mb-2", children: item.title }), _jsx("p", { className: "text-sm text-white/80 mb-4 line-clamp-2", children: item.description }), _jsx("div", { className: "flex items-center gap-4 text-xs text-white/60", children: _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Calendar, { className: "w-3.5 h-3.5" }), item.date] }) })] }) }), item.featured && (_jsx("div", { className: "absolute top-4 right-4 bg-white/95 backdrop-blur px-3 py-1 rounded-full text-xs font-bold shadow-sm", children: "Featured" }))] }, item.id))) }) }), selectedIndex !== null && (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/95 backdrop-blur-md animate-in fade-in duration-200", onClick: handleClose, children: [_jsx("button", { onClick: handleClose, className: "absolute top-6 right-6 p-2 text-white/70 hover:text-white transition-colors hover:bg-white/10 rounded-full z-50", children: _jsx(X, { className: "w-8 h-8" }) }), _jsx("button", { onClick: handlePrev, className: "absolute left-4 md:left-8 top-1/2 -translate-y-1/2 p-3 text-white/70 hover:text-white transition-all hover:bg-white/10 rounded-full z-50 hover:scale-110", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-8 h-8 md:w-10 md:h-10" }) }), _jsx("button", { onClick: handleNext, className: "absolute right-4 md:right-8 top-1/2 -translate-y-1/2 p-3 text-white/70 hover:text-white transition-all hover:bg-white/10 rounded-full z-50 hover:scale-110", "aria-label": "Next image", children: _jsx(ChevronRight, { className: "w-8 h-8 md:w-10 md:h-10" }) }), _jsxs("div", { className: "relative w-full h-full max-w-7xl mx-auto p-4 md:p-12 flex flex-col items-center justify-center", onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "relative w-full h-full flex items-center justify-center", children: _jsx(Image, { src: filteredItems[selectedIndex].image, alt: filteredItems[selectedIndex].title, fill: true, className: "max-w-full max-h-[85vh] object-contain shadow-2xl rounded-sm", unoptimized: true }) }), _jsx("div", { className: "absolute bottom-0 left-0 right-0 z-20 p-8 pb-10 flex flex-col items-center justify-end bg-gradient-to-t from-black/90 via-black/60 to-transparent pt-32 pointer-events-none", children: _jsxs("div", { className: "text-center max-w-3xl mx-auto pointer-events-auto", children: [_jsx("h3", { className: "text-2xl md:text-3xl font-bold text-white mb-3 drop-shadow-lg", children: filteredItems[selectedIndex].title }), _jsx("p", { className: "text-white/90 text-base md:text-lg drop-shadow-md leading-relaxed max-w-2xl mx-auto", children: filteredItems[selectedIndex].description }), _jsxs("div", { className: "mt-4 flex items-center justify-center gap-3", children: [_jsx("span", { className: "bg-white/20 backdrop-blur-md px-3 py-1 rounded-full text-white text-xs font-bold uppercase tracking-wider border border-white/10 shadow-sm", children: filteredItems[selectedIndex].category }), _jsxs("span", { className: "text-white/70 text-sm font-medium drop-shadow-md", children: [selectedIndex + 1, " / ", filteredItems.length] })] })] }) })] })] })), _jsx("div", { className: "bg-gray-50 py-24 px-4", children: _jsxs("div", { className: "container mx-auto max-w-2xl text-center", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-6 text-gray-900", children: "Ready to Create Your Look?" }), _jsx("p", { className: "text-gray-500 text-lg mb-10", children: "Book a consultation and let us bring your vision to life." }), _jsx(Link, { href: `/${storeConfig.slug}/book`, children: _jsx("button", { className: "h-14 px-10 rounded-full text-lg font-bold shadow-xl hover:shadow-2xl transition-all hover:-translate-y-1", style: { backgroundColor: primaryColor, color: 'white' }, children: "Book Appointment" }) })] }) })] }));
129
+ : "text-gray-500 hover:text-gray-900 hover:bg-gray-50"), style: activeCategory === category ? { backgroundColor: primaryColor } : {}, children: category }, category)))] }) }) }), _jsx("div", { className: "container mx-auto px-4 max-w-7xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: filteredItems.map((item, index) => (_jsxs("div", { onClick: () => setSelectedIndex(index), className: "group relative overflow-hidden rounded-2xl bg-gray-100 aspect-[4/5] cursor-pointer", children: [_jsx(Image, { src: item.image, alt: item.title, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-end p-6", children: _jsxs("div", { className: "text-white", children: [_jsxs("div", { className: "flex items-center gap-2 mb-2", children: [_jsx("span", { className: "text-xs font-bold uppercase tracking-wider opacity-80", children: item.category }), item.featured && (_jsx("span", { className: "text-xs px-2 py-0.5 rounded-full bg-white/20 backdrop-blur", children: "Featured" }))] }), _jsx("h3", { className: "text-xl font-bold mb-2", children: item.title }), _jsx("p", { className: "text-sm text-white/80 mb-4 line-clamp-2", children: item.description }), _jsx("div", { className: "flex items-center gap-4 text-xs text-white/60", children: _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Calendar, { className: "w-3.5 h-3.5" }), item.date] }) })] }) }), item.featured && (_jsx("div", { className: "absolute top-4 right-4 bg-white/95 backdrop-blur px-3 py-1 rounded-full text-xs font-bold shadow-sm", children: "Featured" }))] }, item.id))) }) }), selectedIndex !== null && (_jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/95 backdrop-blur-md animate-in fade-in duration-200", onClick: handleClose, children: [_jsx("button", { onClick: handleClose, className: "absolute top-6 right-6 p-2 text-white/70 hover:text-white transition-colors hover:bg-white/10 rounded-full z-50", children: _jsx(X, { className: "w-8 h-8" }) }), _jsx("button", { onClick: handlePrev, className: "absolute left-4 md:left-8 top-1/2 -translate-y-1/2 p-3 text-white/70 hover:text-white transition-all hover:bg-white/10 rounded-full z-50 hover:scale-110", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-8 h-8 md:w-10 md:h-10" }) }), _jsx("button", { onClick: handleNext, className: "absolute right-4 md:right-8 top-1/2 -translate-y-1/2 p-3 text-white/70 hover:text-white transition-all hover:bg-white/10 rounded-full z-50 hover:scale-110", "aria-label": "Next image", children: _jsx(ChevronRight, { className: "w-8 h-8 md:w-10 md:h-10" }) }), _jsxs("div", { className: "relative w-full h-full max-w-7xl mx-auto p-4 md:p-12 flex flex-col items-center justify-center", onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "relative w-full h-full flex items-center justify-center", children: _jsx(Image, { src: filteredItems[selectedIndex].image, alt: filteredItems[selectedIndex].title, fill: true, className: "max-w-full max-h-[85vh] object-contain shadow-2xl rounded-sm" }) }), _jsx("div", { className: "absolute bottom-0 left-0 right-0 z-20 p-8 pb-10 flex flex-col items-center justify-end bg-gradient-to-t from-black/90 via-black/60 to-transparent pt-32 pointer-events-none", children: _jsxs("div", { className: "text-center max-w-3xl mx-auto pointer-events-auto", children: [_jsx("h3", { className: "text-2xl md:text-3xl font-bold text-white mb-3 drop-shadow-lg", children: filteredItems[selectedIndex].title }), _jsx("p", { className: "text-white/90 text-base md:text-lg drop-shadow-md leading-relaxed max-w-2xl mx-auto", children: filteredItems[selectedIndex].description }), _jsxs("div", { className: "mt-4 flex items-center justify-center gap-3", children: [_jsx("span", { className: "bg-white/20 backdrop-blur-md px-3 py-1 rounded-full text-white text-xs font-bold uppercase tracking-wider border border-white/10 shadow-sm", children: filteredItems[selectedIndex].category }), _jsxs("span", { className: "text-white/70 text-sm font-medium drop-shadow-md", children: [selectedIndex + 1, " / ", filteredItems.length] })] })] }) })] })] })), _jsx("div", { className: "bg-gray-50 py-24 px-4", children: _jsxs("div", { className: "container mx-auto max-w-2xl text-center", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold mb-6 text-gray-900", children: "Ready to Create Your Look?" }), _jsx("p", { className: "text-gray-500 text-lg mb-10", children: "Book a consultation and let us bring your vision to life." }), _jsx(Link, { href: `/${storeConfig.slug}/book`, children: _jsx("button", { className: "h-14 px-10 rounded-full text-lg font-bold shadow-xl hover:shadow-2xl transition-all hover:-translate-y-1", style: { backgroundColor: primaryColor, color: 'white' }, children: "Book Appointment" }) })] }) })] }));
130
130
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ShieldCheck, ArrowLeft } from 'lucide-react';
4
4
  import Link from 'next/link';
5
- import { formatDateSafe } from '../../../utils/date.js';
5
+ import { formatDateSafe } from '../../../utils/date';
6
6
  export function PrivacyPolicyPage({ storeConfig }) {
7
7
  const primaryColor = storeConfig.branding.primaryColor;
8
8
  return (_jsxs("div", { className: "min-h-screen bg-gray-50 pb-20", children: [_jsx("div", { className: "bg-white border-b", children: _jsxs("div", { className: "container mx-auto px-4 py-8", children: [_jsxs(Link, { href: `/${storeConfig.slug}`, className: "inline-flex items-center gap-2 text-gray-500 hover:text-gray-900 transition-colors mb-6", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), "Back to Home"] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center", style: { backgroundColor: `${primaryColor}15` }, children: _jsx(ShieldCheck, { className: "w-6 h-6", style: { color: primaryColor } }) }), _jsx("h1", { className: "text-3xl font-bold text-gray-900", children: "Privacy Policy" })] })] }) }), _jsx("div", { className: "container mx-auto px-4 py-12 max-w-4xl", children: _jsxs("div", { className: "bg-white rounded-2xl p-8 md:p-12 shadow-sm border border-gray-100 prose prose-lg max-w-none", children: [_jsxs("p", { className: "text-gray-500 lead", children: ["Last updated: ", formatDateSafe(new Date(), undefined, { month: 'long', day: 'numeric', year: 'numeric' })] }), _jsxs("p", { children: ["At ", storeConfig.name, ", accessible from ", typeof window !== 'undefined' ? window.location.origin : 'our website', ", one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by ", storeConfig.name, " and how we use it."] }), _jsx("p", { children: "If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us." }), _jsx("h3", { children: "Log Files" }), _jsxs("p", { children: [storeConfig.name, " follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information."] }), _jsx("h3", { children: "Cookies and Web Beacons" }), _jsxs("p", { children: ["Like any other website, ", storeConfig.name, " uses \"cookies\". These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information."] }), _jsx("h3", { children: "Privacy Policies" }), _jsxs("p", { children: ["You may consult this list to find the Privacy Policy for each of the advertising partners of ", storeConfig.name, "."] }), _jsxs("p", { children: ["Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on ", storeConfig.name, ", which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit."] }), _jsxs("p", { children: ["Note that ", storeConfig.name, " has no access to or control over these cookies that are used by third-party advertisers."] }), _jsx("h3", { children: "Third Party Privacy Policies" }), _jsxs("p", { children: [storeConfig.name, "'s Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options."] }), _jsx("p", { children: "You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites." }), _jsx("h3", { children: "Children's Information" }), _jsx("p", { children: "Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity." }), _jsxs("p", { children: [storeConfig.name, " does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records."] }), _jsx("h3", { children: "Online Privacy Policy Only" }), _jsxs("p", { children: ["This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in ", storeConfig.name, ". This policy is not applicable to any information collected offline or via channels other than this website."] }), _jsx("h3", { children: "Consent" }), _jsx("p", { children: "By using our website, you hereby consent to our Privacy Policy and agree to its Terms and Conditions." })] }) })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Breadcrumbs } from '../../../components/ui/breadcrumbs.js';
2
+ import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
3
3
  export function SizeGuidePage({ storeConfig }) {
4
4
  // Breadcrumbs
5
5
  const breadcrumbItems = [
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
- import { Button } from '../../../components/ui/button.js';
5
- import { Card, CardContent } from '../../../components/ui/card.js';
4
+ import { Button } from '../../../components/ui/button';
5
+ import { Card, CardContent } from '../../../components/ui/card';
6
6
  import { Ruler, Info, CheckCircle2 } from 'lucide-react';
7
- import { cn } from '../../../lib/utils/index.js';
7
+ import { cn } from '../../../lib/utils';
8
8
  const MEASUREMENT_GUIDE = [
9
9
  {
10
10
  title: 'Bust / Chest',
@@ -1 +1 @@
1
- {"version":3,"file":"TeamPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/TeamPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,UAAU,aAAa;IACrB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,aAAa,2CA2FtD"}
1
+ {"version":3,"file":"TeamPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/TeamPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,UAAU,aAAa;IACrB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,aAAa,2CA0FtD"}
@@ -35,5 +35,5 @@ export function TeamPage({ storeConfig }) {
35
35
  location: 'Main Branch'
36
36
  }
37
37
  ];
38
- return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsxs("div", { className: "bg-white pt-32 pb-20 px-4 text-center border-b border-gray-100", children: [_jsx("h1", { className: "text-4xl md:text-5xl font-light mb-6 tracking-tight text-gray-900", children: teamConfig?.title || "Meet Our Team" }), _jsx("p", { className: "text-gray-500 max-w-2xl mx-auto text-lg font-light leading-relaxed", children: teamConfig?.description || `The talented professionals behind ${storeConfig.name}.` })] }), _jsx("div", { className: "container mx-auto px-4 max-w-6xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: providers.map((provider, idx) => (_jsxs("div", { className: "bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100 flex flex-col", children: [_jsxs("div", { className: "aspect-[4/5] overflow-hidden bg-gray-100 relative group", children: [_jsx(Image, { src: provider.photo, alt: provider.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105", unoptimized: true }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), _jsxs("div", { className: "p-8 flex-1 flex flex-col", children: [_jsxs("div", { className: "mb-4", children: [_jsx("h3", { className: "text-xl font-bold text-gray-900 mb-1", children: provider.name }), _jsx("p", { className: "text-sm font-medium uppercase tracking-wide opacity-80", style: { color: primaryColor }, children: provider.role })] }), _jsx("p", { className: "text-gray-500 text-sm mb-8 leading-relaxed flex-1", children: provider.bio }), _jsxs("div", { className: "pt-6 border-t border-gray-50 flex items-center justify-between text-xs font-medium text-gray-400", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Award, { className: "w-4 h-4" }), provider.experience || 'Expert'] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(MapPin, { className: "w-4 h-4" }), provider.location || 'Available'] })] })] })] }, idx))) }) })] }));
38
+ return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsxs("div", { className: "bg-white pt-32 pb-20 px-4 text-center border-b border-gray-100", children: [_jsx("h1", { className: "text-4xl md:text-5xl font-light mb-6 tracking-tight text-gray-900", children: teamConfig?.title || "Meet Our Team" }), _jsx("p", { className: "text-gray-500 max-w-2xl mx-auto text-lg font-light leading-relaxed", children: teamConfig?.description || `The talented professionals behind ${storeConfig.name}.` })] }), _jsx("div", { className: "container mx-auto px-4 max-w-6xl py-16", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8", children: providers.map((provider, idx) => (_jsxs("div", { className: "bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100 flex flex-col", children: [_jsxs("div", { className: "aspect-[4/5] overflow-hidden bg-gray-100 relative group", children: [_jsx(Image, { src: provider.photo, alt: provider.name, fill: true, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), _jsxs("div", { className: "p-8 flex-1 flex flex-col", children: [_jsxs("div", { className: "mb-4", children: [_jsx("h3", { className: "text-xl font-bold text-gray-900 mb-1", children: provider.name }), _jsx("p", { className: "text-sm font-medium uppercase tracking-wide opacity-80", style: { color: primaryColor }, children: provider.role })] }), _jsx("p", { className: "text-gray-500 text-sm mb-8 leading-relaxed flex-1", children: provider.bio }), _jsxs("div", { className: "pt-6 border-t border-gray-50 flex items-center justify-between text-xs font-medium text-gray-400", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Award, { className: "w-4 h-4" }), provider.experience || 'Expert'] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(MapPin, { className: "w-4 h-4" }), provider.location || 'Available'] })] })] })] }, idx))) }) })] }));
39
39
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ScrollText, ArrowLeft } from 'lucide-react';
4
4
  import Link from 'next/link';
5
- import { formatDateSafe } from '../../../utils/date.js';
5
+ import { formatDateSafe } from '../../../utils/date';
6
6
  export function TermsPage({ storeConfig }) {
7
7
  const primaryColor = storeConfig.branding.primaryColor;
8
8
  return (_jsxs("div", { className: "min-h-screen bg-gray-50 pb-20", children: [_jsx("div", { className: "bg-white border-b", children: _jsxs("div", { className: "container mx-auto px-4 py-8", children: [_jsxs(Link, { href: `/${storeConfig.slug}`, className: "inline-flex items-center gap-2 text-gray-500 hover:text-gray-900 transition-colors mb-6", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), "Back to Home"] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: "w-12 h-12 rounded-xl flex items-center justify-center", style: { backgroundColor: `${primaryColor}15` }, children: _jsx(ScrollText, { className: "w-6 h-6", style: { color: primaryColor } }) }), _jsx("h1", { className: "text-3xl font-bold text-gray-900", children: "Terms of Service" })] })] }) }), _jsx("div", { className: "container mx-auto px-4 py-12 max-w-4xl", children: _jsxs("div", { className: "bg-white rounded-2xl p-8 md:p-12 shadow-sm border border-gray-100 prose prose-lg max-w-none", children: [_jsxs("p", { className: "text-gray-500 lead", children: ["Last updated: ", formatDateSafe(new Date(), undefined, { month: 'long', day: 'numeric', year: 'numeric' })] }), _jsxs("p", { children: ["Please read these Terms of Service (\"Terms\", \"Terms of Service\") carefully before using the ", storeConfig.name, "website (the \"Service\") operated by ", storeConfig.name, " (\"us\", \"we\", or \"our\")."] }), _jsx("h3", { children: "1. Conditions of Use" }), _jsxs("p", { children: ["By using this website, you certify that you have read and reviewed this Agreement and that you agree to comply with its terms. If you do not want to be bound by the terms of this Agreement, you are advised to leave the website accordingly. ", storeConfig.name, "only grants use and access of this website, its products, and its services to those who have accepted its terms."] }), _jsx("h3", { children: "2. Privacy Policy" }), _jsx("p", { children: "Before you continue using our website, we advise you to read our privacy policy regarding our user data collection. It will help you better understand our practices." }), _jsx("h3", { children: "3. Age Restriction" }), _jsxs("p", { children: ["You must be at least 18 (eighteen) years of age before you can use this website. By using this website, you warrant that you are at least 18 years of age and you may legally adhere to this Agreement. ", storeConfig.name, " assumes no responsibility for liabilities related to age misrepresentation."] }), _jsx("h3", { children: "4. Intellectual Property" }), _jsxs("p", { children: ["You agree that all materials, products, and services provided on this website are the property of ", storeConfig.name, ", its affiliates, directors, officers, employees, agents, suppliers, or licensors including all copyrights, trade secrets, trademarks, patents, and other intellectual property. You also agree that you will not reproduce or redistribute the ", storeConfig.name, "'s intellectual property in any way, including electronic, digital, or new trademark registrations."] }), _jsx("h3", { children: "5. User Accounts" }), _jsx("p", { children: "As a user of this website, you may be asked to register with us and provide private information. You are responsible for ensuring the accuracy of this information, and you are responsible for maintaining the safety and security of your identifying information. You are also responsible for all activities that occur under your account or password." }), _jsx("h3", { children: "6. Applicable Law" }), _jsxs("p", { children: ["By visiting this website, you agree that the laws of the location where ", storeConfig.name, " is based, without regard to principles of conflict laws, will govern these terms and conditions, or any dispute of any sort that might come between ", storeConfig.name, " and you, or its business partners and associates."] }), _jsx("h3", { children: "7. Disputes" }), _jsx("p", { children: "Any dispute related in any way to your visit to this website or to products you purchase from us shall be arbitrated by state or federal court and you consent to exclusive jurisdiction and venue of such courts." }), _jsx("h3", { children: "8. Indemnification" }), _jsxs("p", { children: ["You agree to indemnify ", storeConfig.name, " and its affiliates and hold ", storeConfig.name, " harmless against legal claims and demands that may arise from your use or misuse of our services. We reserve the right to select our own legal counsel."] }), _jsx("h3", { children: "9. Limitation on Liability" }), _jsxs("p", { children: [storeConfig.name, " is not liable for any damages that may occur to you as a result of your misuse of our website."] }), _jsxs("p", { children: [storeConfig.name, " reserves the right to edit, modify, and change this Agreement any time. We shall let our users know of these changes through electronic mail. This Agreement is an understanding between ", storeConfig.name, " and the user, and this supersedes and replaces all prior agreements regarding the use of this website."] })] }) })] }));
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Search, Package, Truck, CheckCircle, Clock, AlertCircle, Loader2, XCircle, RotateCcw } from 'lucide-react';
4
4
  import { useState, useEffect, useRef } from 'react';
5
5
  import { useSearchParams } from 'next/navigation';
6
- import { Button } from '../../../components/ui/button.js';
7
- import { formatDateSafe } from '../../../utils/date.js';
6
+ import { Button } from '../../../components/ui/button';
7
+ import { formatDateSafe } from '../../../utils/date';
8
8
  // Note: orderService removed - this page is shared and not editable in the editor
9
9
  // Order tracking functionality not available in preview mode
10
- import { useToast } from '../../../components/ui/toast.js';
11
- import { useLoading } from '../../../lib/loading-context.js';
10
+ import { useToast } from '../../../components/ui/toast';
11
+ import { useLoading } from '../../../lib/loading-context';
12
12
  export function TrackOrderPage({ storeConfig }) {
13
13
  const primaryColor = storeConfig.branding.primaryColor;
14
14
  const searchParams = useSearchParams();
@@ -1 +1 @@
1
- {"version":3,"file":"WishlistPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/WishlistPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AA6B9D,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAuO9D"}
1
+ {"version":3,"file":"WishlistPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/pages/WishlistPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAuB9D,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CA4P9D"}
@@ -1,32 +1,22 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Button } from '../../../components/ui/button.js';
4
- import { ArrowRight, Heart, ArrowLeft } from 'lucide-react';
3
+ import { Button } from '../../../components/ui/button';
4
+ import { Heart, ArrowLeft, ShoppingCart } from 'lucide-react';
5
5
  import Link from 'next/link';
6
6
  import { useEffect, useState } from 'react';
7
- import { useStore } from '../../../lib/store-context.js';
8
- import { ImageWithFallback } from '../../../components/ui/image-with-fallback.js';
9
- import { useToast } from '../../../components/ui/toast.js';
10
- import { ProductGridSkeleton } from '../../../components/ui/skeletons/index.js';
11
- import { formatCurrency } from '../../../lib/utils/index.js';
12
- import { richFieldPlainTextForDisplay } from '../../../lib/rich-html.js';
13
- import { extractImageUrls } from '../../../lib/store-config-utils.js';
14
- import { getProductPagePath } from '../../../lib/utils/product-share.js';
15
- import { useAuth } from '../../../lib/auth-context.js';
16
- import { shouldUseAPI } from '../../../lib/utils/demo-detection.js';
17
- import { useLoading } from '../../../lib/loading-context.js';
18
- function resolveProductImages(item) {
19
- if (Array.isArray(item.images) && item.images.length > 0) {
20
- const firstItem = item.images[0];
21
- if (typeof firstItem === 'string') {
22
- return item.images.filter((img) => typeof img === 'string' && img.trim().length > 0);
23
- }
24
- }
25
- return extractImageUrls(item.images ?? item.image);
26
- }
7
+ import { useStore } from '../../../lib/store-context';
8
+ import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
9
+ import { useToast } from '../../../components/ui/toast';
10
+ import { ProductGridSkeleton } from '../../../components/ui/skeletons';
11
+ import { formatCurrency } from '../../../lib/utils';
12
+ import { transformProductToStoreProduct } from '../../../lib/store-config-utils';
13
+ import { useAuth } from '../../../lib/auth-context';
14
+ import { shouldUseAPI } from '../../../lib/utils/demo-detection';
15
+ import { useLoading } from '../../../lib/loading-context';
16
+ import { productService } from '../../../lib/services/product.service';
27
17
  export function WishlistPage({ storeConfig }) {
28
18
  const primaryColor = storeConfig.branding.primaryColor;
29
- const { wishlist, toggleWishlist, isWishlistLoading } = useStore();
19
+ const { wishlist, toggleWishlist, addToCart, isWishlistLoading } = useStore();
30
20
  const [isClient, setIsClient] = useState(false);
31
21
  const [wishlistItems, setWishlistItems] = useState([]);
32
22
  const [isLoadingItems, setIsLoadingItems] = useState(true);
@@ -48,6 +38,16 @@ export function WishlistPage({ storeConfig }) {
48
38
  startBackendLoading();
49
39
  }
50
40
  try {
41
+ // Bootstrap intentionally includes only one catalog page. Resolve the
42
+ // saved product IDs directly so guest wishlists work for any product.
43
+ if (useAPI && wishlist.length > 0) {
44
+ const results = await Promise.allSettled(wishlist.map((productId) => productService.getProductById(productId)));
45
+ const products = results
46
+ .filter((result) => result.status === 'fulfilled')
47
+ .map((result) => transformProductToStoreProduct(result.value));
48
+ setWishlistItems(products);
49
+ return;
50
+ }
51
51
  // Note: wishlistService removed - using StoreContext wishlist (localStorage-based)
52
52
  // Use products from storeConfig filtered by wishlist product IDs
53
53
  if (storeConfig.products) {
@@ -125,20 +125,35 @@ export function WishlistPage({ storeConfig }) {
125
125
  if (wishlistItems.length === 0 && !isLoadingItems) {
126
126
  return (_jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col items-center justify-center p-4", children: [_jsx("div", { className: "w-24 h-24 bg-white rounded-full shadow-lg flex items-center justify-center mb-6 animate-fade-in-up", children: _jsx(Heart, { className: "w-10 h-10 text-gray-300" }) }), _jsx("h1", { className: "text-3xl font-bold text-gray-900 mb-3 animate-fade-in-up", style: { animationDelay: '100ms' }, children: "Your wishlist is empty" }), _jsx("p", { className: "text-gray-500 mb-8 max-w-md text-center animate-fade-in-up", style: { animationDelay: '200ms' }, children: "Save items you love to your wishlist and revisit them later." }), _jsx(Link, { href: `/${storeConfig.slug}`, className: "animate-fade-in-up", style: { animationDelay: '300ms' }, children: _jsx(Button, { size: "lg", className: "rounded-full px-8 h-12 text-base font-bold shadow-lg transition-transform hover:scale-105", style: { backgroundColor: primaryColor }, children: "Start Shopping" }) })] }));
127
127
  }
128
- const { startPageLoading } = useLoading();
128
+ const handleMoveToCart = (item) => {
129
+ // Create a product object compatible with addToCart
130
+ const product = {
131
+ ...item,
132
+ slug: item.slug || item.id,
133
+ images: item.images || (item.image ? [item.image] : []),
134
+ variants: item.variants || [],
135
+ specifications: item.specifications || {},
136
+ rating: item.rating || 0,
137
+ reviewCount: item.reviewCount || 0
138
+ };
139
+ addToCart(product);
140
+ toggleWishlist(item.id); // Remove from wishlist after adding to cart
141
+ addToast(`${item.name} moved to cart`, 'success');
142
+ };
129
143
  return (_jsx("div", { className: "min-h-screen bg-gray-50/50 py-12 px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsx("div", { className: "mb-10 flex flex-col md:flex-row md:items-center justify-between gap-4", children: _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Link, { href: `/${storeConfig.slug}`, className: "p-2 -ml-2 hover:bg-white rounded-full transition-colors text-gray-500 hover:text-black", children: _jsx(ArrowLeft, { className: "w-5 h-5" }) }), _jsxs("div", { children: [_jsx("h1", { className: "text-3xl font-black text-gray-900 tracking-tight", children: "My Wishlist" }), _jsxs("p", { className: "text-gray-500 text-sm mt-1", children: [wishlistItems.length, " items saved"] })] })] }) }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: wishlistItems.map((item) => {
130
- const productImages = resolveProductImages(item);
131
- const imageUrl = productImages[0];
132
- const productPath = getProductPagePath(storeConfig.slug, item.slug || item.id);
133
- return (_jsxs("div", { className: "bg-white rounded-3xl border border-gray-100 shadow-sm overflow-hidden group transition-all hover:shadow-md hover:border-gray-200 flex flex-col", children: [_jsxs("div", { className: "relative aspect-[4/5] overflow-hidden bg-gray-100", children: [_jsx(Link, { href: productPath, onClick: () => startPageLoading(productPath), className: "block w-full h-full", children: _jsx(ImageWithFallback, { src: imageUrl, alt: item.name, className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500", skeletonAspectRatio: "4/5" }) }), _jsx("button", { type: "button", onClick: async () => {
144
+ const imageSrc = ('images' in item && item.images && item.images[0]) || ('image' in item ? item.image : '') || '';
145
+ const imageUrl = imageSrc && typeof imageSrc === 'string' && imageSrc.length > 0 ? imageSrc : undefined;
146
+ return (_jsxs("div", { className: "bg-white rounded-3xl border border-gray-100 shadow-sm overflow-hidden group transition-all hover:shadow-md hover:border-gray-200 flex flex-col", children: [_jsxs("div", { className: "aspect-[4/5] relative overflow-hidden bg-gray-100", children: [_jsx(ImageWithFallback, { src: imageUrl, alt: item.name, className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-500", skeletonAspectRatio: "4/5" }), _jsx("button", { onClick: async () => {
134
147
  try {
135
148
  await toggleWishlist(item.id);
149
+ // The useEffect will automatically refresh the wishlist items
150
+ // No need to manually refresh here to avoid duplicates
136
151
  addToast('Removed from wishlist', 'success');
137
152
  }
138
153
  catch (error) {
139
154
  console.error('Failed to remove from wishlist:', error);
140
155
  addToast('Failed to remove from wishlist', 'error');
141
156
  }
142
- }, className: "absolute top-3 right-3 p-2 bg-white/90 backdrop-blur-sm rounded-full shadow-sm hover:bg-white text-red-500 transition-colors z-10", title: "Remove from wishlist", children: _jsx(Heart, { className: "w-5 h-5 fill-current" }) })] }), _jsxs("div", { className: "p-5 flex-1 flex flex-col", children: [_jsx("h3", { className: "font-bold text-gray-900 text-lg leading-tight mb-1 line-clamp-1", children: item.name }), _jsx("p", { className: "text-gray-500 text-sm line-clamp-2 mb-4 flex-1", children: richFieldPlainTextForDisplay(item.description) }), _jsxs("div", { className: "flex items-center justify-between gap-3 mt-auto pt-4 border-t border-gray-50", children: [_jsx("span", { className: "font-black text-lg text-gray-900", children: formatCurrency(item.price, item.currency || 'USD') }), _jsx(Link, { href: productPath, onClick: () => startPageLoading(productPath), children: _jsxs(Button, { size: "sm", className: "rounded-full px-4 font-bold transition-transform hover:scale-105", style: { backgroundColor: primaryColor }, children: ["View Product", _jsx(ArrowRight, { className: "w-4 h-4 ml-2" })] }) })] })] })] }, item.id));
157
+ }, className: "absolute top-3 right-3 p-2 bg-white/90 backdrop-blur-sm rounded-full shadow-sm hover:bg-white text-red-500 transition-colors", title: "Remove from wishlist", children: _jsx(Heart, { className: "w-5 h-5 fill-current" }) })] }), _jsxs("div", { className: "p-5 flex-1 flex flex-col", children: [_jsx("h3", { className: "font-bold text-gray-900 text-lg leading-tight mb-1 line-clamp-1", children: item.name }), _jsx("p", { className: "text-gray-500 text-sm line-clamp-2 mb-4 flex-1", children: item.description }), _jsxs("div", { className: "flex items-center justify-between mt-auto pt-4 border-t border-gray-50", children: [_jsx("span", { className: "font-black text-lg text-gray-900", children: formatCurrency(item.price, item.currency || 'USD') }), _jsxs(Button, { onClick: () => handleMoveToCart(item), size: "sm", className: "rounded-full px-4 font-bold transition-transform hover:scale-105", style: { backgroundColor: primaryColor }, children: [_jsx(ShoppingCart, { className: "w-4 h-4 mr-2" }), "Add to Cart"] })] })] })] }, item.id));
143
158
  }) })] }) }));
144
159
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BookingAgendaLayout.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/wrappers/BookingAgendaLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAiBvD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAID,wBAAgB,UAAU,uBAMzB;AAED,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CA4TtF"}
1
+ {"version":3,"file":"BookingAgendaLayout.d.ts","sourceRoot":"","sources":["../../../../src/layouts/shared/wrappers/BookingAgendaLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiE,MAAM,OAAO,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAqBvD,UAAU,kBAAkB;IAC1B,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAID,wBAAgB,UAAU,uBAMzB;AAED,UAAU,wBAAwB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CAuWtF"}
@@ -1,20 +1,24 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { createContext, useContext, useState, useEffect } from 'react';
4
- import { BookingAgendaSidebar } from '../components/headers/BookingAgendaSidebar.js';
5
- import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper.js';
6
- import { PageContentLoader } from '../../../components/ui/page-content-loader.js';
7
- import { useLoading } from '../../../lib/loading-context.js';
8
- import { getThemeColor, getLayoutText } from '../../../lib/utils/asset-helpers.js';
9
- import { AlertModalProvider } from '../../../components/ui/alert-modal.js';
10
- import { Modal } from '../../../components/ui/modal.js';
11
- import { Button } from '../../../components/ui/button.js';
12
- import { usePayazaCheckout } from '../../../hooks/use-payaza-checkout.js';
13
- import { useToast } from '../../../components/ui/toast.js';
14
- import { useAuth } from '../../../lib/auth-context.js';
15
- import { filterActiveServices, formatCurrency } from '../../../lib/utils/index.js';
3
+ import { createContext, useContext, useState, useEffect, useRef } from 'react';
4
+ import { BookingAgendaSidebar } from '../components/headers/BookingAgendaSidebar';
5
+ import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper';
6
+ import { PageContentLoader } from '../../../components/ui/page-content-loader';
7
+ import { useLoading } from '../../../lib/loading-context';
8
+ import { getThemeColor, getLayoutText } from '../../../lib/utils/asset-helpers';
9
+ import { AlertModalProvider } from '../../../components/ui/alert-modal';
10
+ import { Modal } from '../../../components/ui/modal';
11
+ import { Button } from '../../../components/ui/button';
12
+ import { usePayazaCheckout } from '../../../hooks/use-payaza-checkout';
13
+ import { checkoutService } from '../../../lib/services/checkout.service';
14
+ import { requireCheckoutPayazaPublicKey } from '../../../lib/payaza-public-key';
15
+ import { getOrCreateIdempotencyKey } from '../../../lib/utils/idempotency-key';
16
+ import { CHECKOUT_UNAVAILABLE_MESSAGE } from '../../../lib/checkout-availability';
17
+ import { useToast } from '../../../components/ui/toast';
18
+ import { useAuth } from '../../../lib/auth-context';
19
+ import { filterActiveServices, formatCurrency } from '../../../lib/utils';
16
20
  import { CheckCircle, Sparkles, Lock } from 'lucide-react';
17
- import { formatDateSafe } from '../../../utils/date.js';
21
+ import { formatDateSafe } from '../../../utils/date';
18
22
  const BookingContext = createContext(undefined);
19
23
  export function useBooking() {
20
24
  const context = useContext(BookingContext);
@@ -56,10 +60,9 @@ export function BookingAgendaLayout({ children, storeConfig }) {
56
60
  }));
57
61
  }
58
62
  }, [isAuthenticated, user]);
59
- // Payment Hook
60
- const payazaPublicKey = storeConfig.payment?.payazaPublicKey || process.env.NEXT_PUBLIC_PAYAZA_PUBLIC_KEY || '';
63
+ const checkoutIdempotencyKeyRef = useRef(null);
64
+ const checkoutDisabled = storeConfig.checkoutEnabled === false;
61
65
  const { checkout, isLoading: isPaymentLoading } = usePayazaCheckout({
62
- publicKey: payazaPublicKey,
63
66
  onSuccess: () => {
64
67
  setBookingStep(4); // Success
65
68
  addToast('Payment successful & Booking confirmed!', 'success');
@@ -83,15 +86,17 @@ export function BookingAgendaLayout({ children, storeConfig }) {
83
86
  };
84
87
  // Payment Handling
85
88
  const handlePaymentSubmit = async () => {
89
+ if (checkoutDisabled) {
90
+ addToast(CHECKOUT_UNAVAILABLE_MESSAGE, 'error');
91
+ return;
92
+ }
86
93
  if (!selectedService)
87
94
  return;
88
95
  const service = services.find(s => s.id === selectedService);
89
- // If service not found (e.g. mock data in preview), we can't proceed with real payment easily.
90
- // But for layout wrapper, we assume valid data.
91
96
  if (!service && services.length > 0)
92
97
  return;
93
- // Fallback for mock services if needed (simulated)
94
- const price = service ? service.price : 0;
98
+ if (!service)
99
+ return;
95
100
  setBookingStep(3); // Loading
96
101
  // DEMO MODE BYPASS
97
102
  if (storeConfig.slug.startsWith('demo/')) {
@@ -101,24 +106,64 @@ export function BookingAgendaLayout({ children, storeConfig }) {
101
106
  }, 1500);
102
107
  return;
103
108
  }
104
- if (!payazaPublicKey) {
105
- addToast('Payment gateway not configured', 'error');
106
- setBookingStep(2);
107
- return;
108
- }
109
109
  const customerEmail = isAuthenticated && user ? user.email : guestInfo.email;
110
110
  const customerFirstName = isAuthenticated && user ? user.firstName : guestInfo.firstName;
111
111
  const customerLastName = isAuthenticated && user ? user.lastName : guestInfo.lastName;
112
112
  const customerPhone = isAuthenticated && user ? (user.phone || '') : guestInfo.phone;
113
- await checkout({
114
- amount: price,
115
- email: customerEmail,
116
- firstName: customerFirstName,
117
- lastName: customerLastName,
118
- phone: customerPhone,
119
- reference: `BK-${Date.now()}`,
120
- currency: storeConfig.settings.currency || 'USD',
121
- });
113
+ try {
114
+ const bookingDate = days[selectedDate]?.date;
115
+ const checkoutResponse = await checkoutService.processCheckout({
116
+ storeId: storeConfig.id,
117
+ items: [{
118
+ serviceId: service.id,
119
+ quantity: 1,
120
+ price: service.price,
121
+ options: {
122
+ bookingDate: bookingDate ? bookingDate.toISOString().split('T')[0] : undefined,
123
+ startTime: selectedTime || undefined,
124
+ },
125
+ }],
126
+ customerInfo: {
127
+ email: customerEmail,
128
+ firstName: customerFirstName,
129
+ lastName: customerLastName,
130
+ phone: customerPhone,
131
+ },
132
+ shippingAddress: {
133
+ firstName: customerFirstName,
134
+ lastName: customerLastName,
135
+ address1: 'Address to be provided',
136
+ city: 'City',
137
+ state: 'State',
138
+ zipCode: '00000',
139
+ country: 'Country',
140
+ phone: customerPhone,
141
+ },
142
+ paymentMethod: 'payaza',
143
+ customerId: isAuthenticated && user ? user.id : undefined,
144
+ }, {
145
+ idempotencyKey: getOrCreateIdempotencyKey(checkoutIdempotencyKeyRef),
146
+ });
147
+ await checkout({
148
+ publicKey: requireCheckoutPayazaPublicKey(checkoutResponse),
149
+ connectionMode: checkoutResponse.payazaConnectionMode,
150
+ amount: checkoutResponse.totalAmount ?? service.price,
151
+ email: customerEmail,
152
+ firstName: customerFirstName,
153
+ lastName: customerLastName,
154
+ phone: customerPhone,
155
+ reference: checkoutResponse.transactionReference || `BK-${Date.now()}`,
156
+ currency: checkoutResponse.currency || storeConfig.settings?.currency || 'USD',
157
+ });
158
+ }
159
+ catch (error) {
160
+ const err = error;
161
+ const isCollectionsDisabled = err?.response?.status === 403 ||
162
+ err?.code === 'COLLECTIONS_DISABLED' ||
163
+ String(err?.message || '').toLowerCase().includes('not accepting payments');
164
+ addToast(isCollectionsDisabled ? CHECKOUT_UNAVAILABLE_MESSAGE : (err?.message || 'Failed to create booking. Please try again.'), 'error');
165
+ setBookingStep(2);
166
+ }
122
167
  };
123
168
  // Generate next 7 days
124
169
  const days = Array.from({ length: 7 }, (_, i) => {
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { StoreHeader } from '../components/StoreHeader.js';
4
- import { StoreFooter } from '../components/StoreFooter.js';
5
- import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper.js';
6
- import { PageContentLoader } from '../../../components/ui/page-content-loader.js';
7
- import { useStore } from '../../../lib/store-context.js';
8
- import { useLoading } from '../../../lib/loading-context.js';
9
- import { getThemeColor } from '../../../lib/utils/asset-helpers.js';
10
- import { AlertModalProvider } from '../../../components/ui/alert-modal.js';
3
+ import { StoreHeader } from '../components/StoreHeader';
4
+ import { StoreFooter } from '../components/StoreFooter';
5
+ import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper';
6
+ import { PageContentLoader } from '../../../components/ui/page-content-loader';
7
+ import { useStore } from '../../../lib/store-context';
8
+ import { useLoading } from '../../../lib/loading-context';
9
+ import { getThemeColor } from '../../../lib/utils/asset-helpers';
10
+ import { AlertModalProvider } from '../../../components/ui/alert-modal';
11
11
  import '../../clothing/styles/clothing.css';
12
12
  /** Fashion Hub shell — scoped CSS + theme tokens under data-layout="clothing". */
13
13
  export function ClothingLayout({ children, storeConfig }) {
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ClothingMinimalHeader } from '../components/headers/ClothingMinimalHeader.js';
4
- import { StoreFooter } from '../components/StoreFooter.js';
5
- import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper.js';
6
- import { PageContentLoader } from '../../../components/ui/page-content-loader.js';
3
+ import { ClothingMinimalHeader } from '../components/headers/ClothingMinimalHeader';
4
+ import { StoreFooter } from '../components/StoreFooter';
5
+ import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper';
6
+ import { PageContentLoader } from '../../../components/ui/page-content-loader';
7
7
  import { usePathname } from 'next/navigation';
8
- import { useLoading } from '../../../lib/loading-context.js';
9
- import { getThemeColor } from '../../../lib/utils/asset-helpers.js';
10
- import { AlertModalProvider } from '../../../components/ui/alert-modal.js';
8
+ import { useLoading } from '../../../lib/loading-context';
9
+ import { getThemeColor } from '../../../lib/utils/asset-helpers';
10
+ import { AlertModalProvider } from '../../../components/ui/alert-modal';
11
11
  export function ClothingMinimalLayout({ children, storeConfig }) {
12
12
  const pathname = usePathname();
13
13
  const { isBackendLoading } = useLoading();
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper.js';
4
- import { PageContentLoader } from '../../../components/ui/page-content-loader.js';
5
- import { useLoading } from '../../../lib/loading-context.js';
6
- import { getThemeColor } from '../../../lib/utils/asset-helpers.js';
7
- import { AlertModalProvider } from '../../../components/ui/alert-modal.js';
3
+ import { PageAnimateWrapper } from '../../../components/ui/page-animate-wrapper';
4
+ import { PageContentLoader } from '../../../components/ui/page-content-loader';
5
+ import { useLoading } from '../../../lib/loading-context';
6
+ import { getThemeColor } from '../../../lib/utils/asset-helpers';
7
+ import { AlertModalProvider } from '../../../components/ui/alert-modal';
8
8
  export function ElectronicsLayout({ children, storeConfig }) {
9
9
  const { isBackendLoading } = useLoading();
10
10
  // Get theme colors with fallbacks