storefront-layouts 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (509) hide show
  1. package/dist/components/auth/LoginForm.js +2 -2
  2. package/dist/components/auth/LoginSheet.js +2 -2
  3. package/dist/components/auth/login-form-core.js +3 -3
  4. package/dist/components/auth/login-sheet-header.js +3 -3
  5. package/dist/components/auth/login-sheet-registry.js +2 -2
  6. package/dist/components/auth/login-sheet-themes/booking-agenda.theme.js +1 -1
  7. package/dist/components/auth/login-sheet-themes/booking.theme.js +1 -1
  8. package/dist/components/auth/login-sheet-themes/clothing-minimal.theme.js +1 -1
  9. package/dist/components/auth/login-sheet-themes/clothing.theme.js +1 -1
  10. package/dist/components/auth/login-sheet-themes/electronics-grid.theme.js +1 -1
  11. package/dist/components/auth/login-sheet-themes/electronics.theme.js +1 -1
  12. package/dist/components/auth/login-sheet-themes/food-modern.theme.js +1 -1
  13. package/dist/components/auth/login-sheet-themes/food.theme.js +1 -1
  14. package/dist/components/auth/login-sheet-themes/index.js +9 -9
  15. package/dist/components/auth/login-sheet-themes/motivational-speaker.theme.js +1 -1
  16. package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts +2 -2
  17. package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts.map +1 -1
  18. package/dist/components/auth/login-sheet-themes/theme-input-baselines.js +2 -2
  19. package/dist/components/auth/login-sheets/StoreLoginSheetShell.d.ts.map +1 -1
  20. package/dist/components/auth/login-sheets/StoreLoginSheetShell.js +6 -6
  21. package/dist/components/auth/use-login-submit.js +3 -3
  22. package/dist/components/cart/InventoryHoldCountdown.js +2 -2
  23. package/dist/components/categories/category-masonry-grid.js +3 -3
  24. package/dist/components/checkout/CheckoutFeeLines.js +1 -1
  25. package/dist/components/checkout/ShippingOptionsPanel.js +3 -3
  26. package/dist/components/learning/CertificateTemplates.js +2 -2
  27. package/dist/components/learning/CertificateViewer.js +3 -3
  28. package/dist/components/learning/MentorshipProgress.d.ts.map +1 -1
  29. package/dist/components/learning/MentorshipProgress.js +4 -4
  30. package/dist/components/product/ProductVariationSelectors.js +1 -1
  31. package/dist/components/rich-text/CategoryDescription.js +2 -2
  32. package/dist/components/rich-text/ProductDescription.js +2 -2
  33. package/dist/components/rich-text/RichTextExcerpt.js +1 -1
  34. package/dist/components/rich-text/SafeRichHtml.d.ts +8 -11
  35. package/dist/components/rich-text/SafeRichHtml.d.ts.map +1 -1
  36. package/dist/components/rich-text/SafeRichHtml.js +3 -5
  37. package/dist/components/shipping/ProductDeliveryInfoSection.d.ts.map +1 -1
  38. package/dist/components/shipping/ProductDeliveryInfoSection.js +7 -4
  39. package/dist/components/shipping/ShippingQuoteAddressForm.js +3 -3
  40. package/dist/components/ui/alert-modal.js +2 -2
  41. package/dist/components/ui/avatar-image.js +1 -1
  42. package/dist/components/ui/badge.js +1 -1
  43. package/dist/components/ui/breadcrumbs.js +1 -1
  44. package/dist/components/ui/button.d.ts +1 -1
  45. package/dist/components/ui/button.js +1 -1
  46. package/dist/components/ui/card.js +1 -1
  47. package/dist/components/ui/category-tree.js +2 -2
  48. package/dist/components/ui/checkout-button.d.ts.map +1 -1
  49. package/dist/components/ui/checkout-button.js +11 -283
  50. package/dist/components/ui/guest-checkout-modal.js +3 -3
  51. package/dist/components/ui/image-skeleton.js +2 -2
  52. package/dist/components/ui/image-with-fallback.d.ts +3 -1
  53. package/dist/components/ui/image-with-fallback.d.ts.map +1 -1
  54. package/dist/components/ui/image-with-fallback.js +55 -139
  55. package/dist/components/ui/input.js +1 -1
  56. package/dist/components/ui/limited-time-offer-badge.js +2 -2
  57. package/dist/components/ui/loading-skeleton-wrapper.js +1 -1
  58. package/dist/components/ui/modal.js +2 -2
  59. package/dist/components/ui/otp-input.js +1 -1
  60. package/dist/components/ui/out-of-stock-overlay.js +1 -1
  61. package/dist/components/ui/page-animate-wrapper.js +2 -2
  62. package/dist/components/ui/page-content-loader.js +2 -2
  63. package/dist/components/ui/page-loader.js +1 -1
  64. package/dist/components/ui/product-card.d.ts.map +1 -1
  65. package/dist/components/ui/product-card.js +17 -17
  66. package/dist/components/ui/product-rating.js +1 -1
  67. package/dist/components/ui/product-stock-badge.js +2 -2
  68. package/dist/components/ui/review-form.js +2 -2
  69. package/dist/components/ui/route-skeleton-loader.js +6 -6
  70. package/dist/components/ui/sheet.d.ts +2 -1
  71. package/dist/components/ui/sheet.d.ts.map +1 -1
  72. package/dist/components/ui/sheet.js +4 -4
  73. package/dist/components/ui/skeleton.js +1 -1
  74. package/dist/components/ui/skeletons/index.js +5 -5
  75. package/dist/components/ui/skeletons/product-grid-skeleton.js +1 -1
  76. package/dist/components/ui/store-logos.d.ts.map +1 -1
  77. package/dist/components/ui/store-logos.js +4 -4
  78. package/dist/components/ui/toast.js +1 -1
  79. package/dist/components/ui/video-player.js +2 -2
  80. package/dist/editor/alignment-schemas/booking.js +1 -1
  81. package/dist/editor/alignment-schemas/clothing-minimal.js +1 -1
  82. package/dist/editor/alignment-schemas/index.js +20 -20
  83. package/dist/editor/alignment-schemas/lazy-loader.js +1 -1
  84. package/dist/editor/alignment-schemas/metadata.js +1 -1
  85. package/dist/editor/alignment-schemas/resolve-canvas-inspector-leaf.js +3 -3
  86. package/dist/editor/blocks/index.js +3 -3
  87. package/dist/editor/blocks/migrate-clothing-minimal.js +3 -3
  88. package/dist/editor/blocks/nav-outline-utils.js +2 -2
  89. package/dist/editor/blocks/registry.js +1 -1
  90. package/dist/editor/document/adapter.js +4 -4
  91. package/dist/editor/document/block-tree.js +1 -1
  92. package/dist/editor/document/index.js +6 -6
  93. package/dist/editor/document/validate.js +1 -1
  94. package/dist/editor/index.js +12 -12
  95. package/dist/editor/layout-content-loader.js +3 -3
  96. package/dist/editor/payaza-form/ArrayItemManager.js +2 -2
  97. package/dist/editor/payaza-form/EditorCanvasPreview.js +5 -5
  98. package/dist/editor/payaza-form/FieldRenderer.js +17 -17
  99. package/dist/editor/payaza-form/IframePreviewMessageBridge.js +3 -3
  100. package/dist/editor/payaza-form/PayazaFormEditor.js +31 -31
  101. package/dist/editor/payaza-form/PayazaFormEditorFullPage.js +2 -2
  102. package/dist/editor/payaza-form/SliderArrayEditor.js +3 -3
  103. package/dist/editor/payaza-form/components/ArrayField.js +1 -1
  104. package/dist/editor/payaza-form/components/BlockStylesInspector.js +1 -1
  105. package/dist/editor/payaza-form/components/BlocksField.js +9 -9
  106. package/dist/editor/payaza-form/components/ButtonField.js +3 -3
  107. package/dist/editor/payaza-form/components/CanvasGranularInspector.js +11 -11
  108. package/dist/editor/payaza-form/components/IconField.js +2 -2
  109. package/dist/editor/payaza-form/components/ImageField.js +1 -1
  110. package/dist/editor/payaza-form/components/NumberField.js +1 -1
  111. package/dist/editor/payaza-form/components/RichTextField.js +2 -2
  112. package/dist/editor/payaza-form/components/SectionField.js +1 -1
  113. package/dist/editor/payaza-form/components/SectionSchemaInspector.js +3 -3
  114. package/dist/editor/payaza-form/components/StarRatingField.js +2 -2
  115. package/dist/editor/payaza-form/components/TextField.js +1 -1
  116. package/dist/editor/payaza-form/data-merger.js +6 -6
  117. package/dist/editor/payaza-form/data-transformer.js +3 -3
  118. package/dist/editor/payaza-form/engine.js +1 -1
  119. package/dist/editor/payaza-form/examples/custom-widgets.example.js +1 -1
  120. package/dist/editor/payaza-form/index.js +8 -8
  121. package/dist/editor/payaza-form/layout-loader.js +2 -2
  122. package/dist/editor/payaza-form/preview-message-handler.js +3 -3
  123. package/dist/editor/payaza-form/schema-bridge.js +3 -3
  124. package/dist/editor/payaza-form/widget-registry.js +1 -1
  125. package/dist/editor/shared/BlockOutlineTree.js +2 -2
  126. package/dist/editor/shared/EditorHeader.js +2 -2
  127. package/dist/editor/shared/EditorNavigator.js +2 -2
  128. package/dist/editor/shared/IframePreview.js +6 -6
  129. package/dist/editor/shared/InlineCanvasPreview.js +8 -8
  130. package/dist/editor/shared/LayoutRenderer.js +1 -1
  131. package/dist/editor/shared/ResizableSidebar.js +1 -1
  132. package/dist/editor/shared/index.js +7 -7
  133. package/dist/hooks/use-analytics.js +3 -3
  134. package/dist/hooks/use-api.js +1 -1
  135. package/dist/hooks/use-cart-api.d.ts.map +1 -1
  136. package/dist/hooks/use-cart-api.js +8 -3
  137. package/dist/hooks/use-catalog-loader.js +3 -3
  138. package/dist/hooks/use-catalog-price-range.d.ts +2 -5
  139. package/dist/hooks/use-catalog-price-range.d.ts.map +1 -1
  140. package/dist/hooks/use-catalog-price-range.js +20 -5
  141. package/dist/hooks/use-category-products.d.ts +8 -0
  142. package/dist/hooks/use-category-products.d.ts.map +1 -0
  143. package/dist/hooks/use-category-products.js +43 -0
  144. package/dist/hooks/use-checkout-fees.d.ts +3 -4
  145. package/dist/hooks/use-checkout-fees.d.ts.map +1 -1
  146. package/dist/hooks/use-checkout-fees.js +1 -1
  147. package/dist/hooks/use-content-ready.js +1 -1
  148. package/dist/hooks/use-featured-products.d.ts +3 -0
  149. package/dist/hooks/use-featured-products.d.ts.map +1 -0
  150. package/dist/hooks/use-featured-products.js +25 -0
  151. package/dist/hooks/use-multi-store-checkout-fees.d.ts +3 -4
  152. package/dist/hooks/use-multi-store-checkout-fees.d.ts.map +1 -1
  153. package/dist/hooks/use-multi-store-checkout-fees.js +1 -1
  154. package/dist/hooks/use-navigation-loading.js +1 -1
  155. package/dist/hooks/use-payaza-checkout.d.ts +1 -1
  156. package/dist/hooks/use-payaza-checkout.d.ts.map +1 -1
  157. package/dist/hooks/use-payaza-checkout.js +9 -3
  158. package/dist/hooks/use-product-brands.d.ts +5 -0
  159. package/dist/hooks/use-product-brands.d.ts.map +1 -0
  160. package/dist/hooks/use-product-brands.js +25 -0
  161. package/dist/hooks/use-product-by-slug.d.ts +7 -0
  162. package/dist/hooks/use-product-by-slug.d.ts.map +1 -0
  163. package/dist/hooks/use-product-by-slug.js +38 -0
  164. package/dist/hooks/use-product-reviews.d.ts +15 -0
  165. package/dist/hooks/use-product-reviews.d.ts.map +1 -0
  166. package/dist/hooks/use-product-reviews.js +75 -0
  167. package/dist/hooks/use-product-variation-selection.d.ts +2 -8
  168. package/dist/hooks/use-product-variation-selection.d.ts.map +1 -1
  169. package/dist/hooks/use-product-variation-selection.js +1 -1
  170. package/dist/hooks/use-products-api.js +3 -3
  171. package/dist/hooks/use-shipping-quote.js +2 -2
  172. package/dist/hooks/use-store-api.js +4 -4
  173. package/dist/hooks/usePreviewSlideSync.js +1 -1
  174. package/dist/index.d.ts +62 -74
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +141 -153
  177. package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -1
  178. package/dist/layouts/booking/components/BookingHomePage.js +68 -74
  179. package/dist/layouts/booking/components/BookingMultilineHeading.js +1 -1
  180. package/dist/layouts/booking/components/BookingTestimonialCard.js +2 -2
  181. package/dist/layouts/booking/components/BookingTestimonialsEmptyState.js +1 -1
  182. package/dist/layouts/booking/components/booking-footer-defaults.js +2 -2
  183. package/dist/layouts/booking/index.js +8 -8
  184. package/dist/layouts/booking/pages/AboutPage.d.ts +1 -1
  185. package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
  186. package/dist/layouts/booking/pages/AboutPage.js +39 -60
  187. package/dist/layouts/booking/pages/BookPage.d.ts.map +1 -1
  188. package/dist/layouts/booking/pages/BookPage.js +16 -22
  189. package/dist/layouts/booking/pages/CategoriesPage.js +6 -6
  190. package/dist/layouts/booking/pages/CategoryPage.d.ts +1 -1
  191. package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -1
  192. package/dist/layouts/booking/pages/CategoryPage.js +17 -26
  193. package/dist/layouts/booking/pages/ContactPage.d.ts +1 -1
  194. package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -1
  195. package/dist/layouts/booking/pages/ContactPage.js +5 -12
  196. package/dist/layouts/booking/pages/ProductDetailPage.d.ts +1 -1
  197. package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
  198. package/dist/layouts/booking/pages/ProductDetailPage.js +203 -150
  199. package/dist/layouts/booking/pages/ServicesPage.d.ts +1 -1
  200. package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -1
  201. package/dist/layouts/booking/pages/ServicesPage.js +11 -31
  202. package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts.map +1 -1
  203. package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +21 -30
  204. package/dist/layouts/booking-agenda/index.js +8 -8
  205. package/dist/layouts/booking-agenda/pages/AboutPage.d.ts +1 -1
  206. package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
  207. package/dist/layouts/booking-agenda/pages/AboutPage.js +11 -14
  208. package/dist/layouts/booking-agenda/pages/BookPage.d.ts.map +1 -1
  209. package/dist/layouts/booking-agenda/pages/BookPage.js +15 -21
  210. package/dist/layouts/booking-agenda/pages/CategoriesPage.js +5 -5
  211. package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts +1 -1
  212. package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -1
  213. package/dist/layouts/booking-agenda/pages/CategoryPage.js +12 -18
  214. package/dist/layouts/booking-agenda/pages/ContactPage.d.ts +1 -1
  215. package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -1
  216. package/dist/layouts/booking-agenda/pages/ContactPage.js +8 -13
  217. package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts +1 -1
  218. package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
  219. package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +202 -149
  220. package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts +1 -1
  221. package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -1
  222. package/dist/layouts/booking-agenda/pages/ServicesPage.js +8 -23
  223. package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
  224. package/dist/layouts/clothing/components/ClothingHomePage.js +199 -136
  225. package/dist/layouts/clothing/index.js +7 -7
  226. package/dist/layouts/clothing/pages/AboutPage.d.ts +1 -1
  227. package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
  228. package/dist/layouts/clothing/pages/AboutPage.js +19 -33
  229. package/dist/layouts/clothing/pages/CategoriesPage.js +8 -8
  230. package/dist/layouts/clothing/pages/CategoryPage.d.ts +1 -1
  231. package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -1
  232. package/dist/layouts/clothing/pages/CategoryPage.js +15 -41
  233. package/dist/layouts/clothing/pages/ContactPage.d.ts +1 -1
  234. package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -1
  235. package/dist/layouts/clothing/pages/ContactPage.js +5 -8
  236. package/dist/layouts/clothing/pages/ProductDetailPage.d.ts +1 -1
  237. package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
  238. package/dist/layouts/clothing/pages/ProductDetailPage.js +256 -167
  239. package/dist/layouts/clothing/pages/ProductsPage.d.ts +1 -1
  240. package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
  241. package/dist/layouts/clothing/pages/ProductsPage.js +125 -59
  242. package/dist/layouts/clothing/payaza-bindings.js +2 -2
  243. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
  244. package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +32 -131
  245. package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +8 -8
  246. package/dist/layouts/clothing-minimal/index.js +7 -7
  247. package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts +1 -1
  248. package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
  249. package/dist/layouts/clothing-minimal/pages/AboutPage.js +37 -61
  250. package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +7 -7
  251. package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +1 -1
  252. package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -1
  253. package/dist/layouts/clothing-minimal/pages/CategoryPage.js +13 -18
  254. package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts +1 -1
  255. package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -1
  256. package/dist/layouts/clothing-minimal/pages/ContactPage.js +5 -8
  257. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts +1 -1
  258. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
  259. package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +202 -143
  260. package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts +1 -1
  261. package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -1
  262. package/dist/layouts/clothing-minimal/pages/ProductsPage.js +126 -57
  263. package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +7 -7
  264. package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +10 -10
  265. package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
  266. package/dist/layouts/electronics/components/ElectronicsHomePage.js +29 -31
  267. package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +4 -4
  268. package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -1
  269. package/dist/layouts/electronics/components/ElectronicsProductsPage.js +81 -23
  270. package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +2 -2
  271. package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +6 -6
  272. package/dist/layouts/electronics/index.js +18 -18
  273. package/dist/layouts/electronics/pages/AboutPage.d.ts +1 -1
  274. package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
  275. package/dist/layouts/electronics/pages/AboutPage.js +11 -14
  276. package/dist/layouts/electronics/pages/CategoriesPage.js +1 -1
  277. package/dist/layouts/electronics/pages/CategoryPage.d.ts +1 -1
  278. package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -1
  279. package/dist/layouts/electronics/pages/CategoryPage.js +14 -20
  280. package/dist/layouts/electronics/pages/ContactPage.d.ts +1 -1
  281. package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -1
  282. package/dist/layouts/electronics/pages/ContactPage.js +8 -13
  283. package/dist/layouts/electronics/pages/HelpCenterPage.js +1 -1
  284. package/dist/layouts/electronics/pages/PrivacyPolicyPage.js +1 -1
  285. package/dist/layouts/electronics/pages/ProductDetailPage.d.ts +1 -1
  286. package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
  287. package/dist/layouts/electronics/pages/ProductDetailPage.js +201 -142
  288. package/dist/layouts/electronics/pages/ProductsPage.d.ts +1 -1
  289. package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -1
  290. package/dist/layouts/electronics/pages/ProductsPage.js +119 -49
  291. package/dist/layouts/electronics/pages/TermsPage.js +1 -1
  292. package/dist/layouts/electronics/pages/TrackOrderPage.js +4 -4
  293. package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +10 -10
  294. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
  295. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +75 -33
  296. package/dist/layouts/electronics-grid/index.js +14 -14
  297. package/dist/layouts/electronics-grid/pages/AboutPage.d.ts +1 -1
  298. package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
  299. package/dist/layouts/electronics-grid/pages/AboutPage.js +11 -14
  300. package/dist/layouts/electronics-grid/pages/CategoriesPage.js +1 -1
  301. package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +1 -1
  302. package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -1
  303. package/dist/layouts/electronics-grid/pages/CategoryPage.js +14 -20
  304. package/dist/layouts/electronics-grid/pages/ContactPage.d.ts +1 -1
  305. package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -1
  306. package/dist/layouts/electronics-grid/pages/ContactPage.js +8 -13
  307. package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.js +6 -6
  308. package/dist/layouts/electronics-grid/pages/HelpCenterPage.js +1 -1
  309. package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.js +1 -1
  310. package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts +1 -1
  311. package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
  312. package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +201 -142
  313. package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts +1 -1
  314. package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -1
  315. package/dist/layouts/electronics-grid/pages/ProductsPage.js +121 -52
  316. package/dist/layouts/electronics-grid/pages/TermsPage.js +1 -1
  317. package/dist/layouts/electronics-grid/pages/TrackOrderPage.js +4 -4
  318. package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -1
  319. package/dist/layouts/food/components/FoodHomePage.js +42 -41
  320. package/dist/layouts/food/index.js +8 -8
  321. package/dist/layouts/food/pages/AboutPage.d.ts +1 -1
  322. package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
  323. package/dist/layouts/food/pages/AboutPage.js +44 -45
  324. package/dist/layouts/food/pages/CategoriesPage.js +6 -6
  325. package/dist/layouts/food/pages/CategoryPage.d.ts +1 -1
  326. package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -1
  327. package/dist/layouts/food/pages/CategoryPage.js +23 -21
  328. package/dist/layouts/food/pages/ContactPage.d.ts +1 -1
  329. package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -1
  330. package/dist/layouts/food/pages/ContactPage.js +5 -7
  331. package/dist/layouts/food/pages/MenuPage.d.ts +1 -1
  332. package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -1
  333. package/dist/layouts/food/pages/MenuPage.js +81 -42
  334. package/dist/layouts/food/pages/ProductDetailPage.d.ts +1 -1
  335. package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
  336. package/dist/layouts/food/pages/ProductDetailPage.js +209 -171
  337. package/dist/layouts/food/pages/ProductsPage.d.ts +1 -1
  338. package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -1
  339. package/dist/layouts/food/pages/ProductsPage.js +130 -45
  340. package/dist/layouts/food-modern/components/FoodHomePageModern.js +10 -10
  341. package/dist/layouts/food-modern/index.js +8 -8
  342. package/dist/layouts/food-modern/pages/AboutPage.d.ts +1 -1
  343. package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
  344. package/dist/layouts/food-modern/pages/AboutPage.js +11 -14
  345. package/dist/layouts/food-modern/pages/CategoriesPage.js +5 -5
  346. package/dist/layouts/food-modern/pages/CategoryPage.d.ts +1 -1
  347. package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -1
  348. package/dist/layouts/food-modern/pages/CategoryPage.js +23 -20
  349. package/dist/layouts/food-modern/pages/ContactPage.d.ts +1 -1
  350. package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -1
  351. package/dist/layouts/food-modern/pages/ContactPage.js +5 -7
  352. package/dist/layouts/food-modern/pages/MenuPage.d.ts +1 -1
  353. package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -1
  354. package/dist/layouts/food-modern/pages/MenuPage.js +81 -46
  355. package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts +1 -1
  356. package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
  357. package/dist/layouts/food-modern/pages/ProductDetailPage.js +202 -143
  358. package/dist/layouts/food-modern/pages/ProductsPage.d.ts +1 -1
  359. package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -1
  360. package/dist/layouts/food-modern/pages/ProductsPage.js +117 -33
  361. package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -1
  362. package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +32 -23
  363. package/dist/layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper.js +1 -1
  364. package/dist/layouts/motivational-speaker/index.js +9 -9
  365. package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts +1 -1
  366. package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
  367. package/dist/layouts/motivational-speaker/pages/AboutPage.js +6 -9
  368. package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +1 -1
  369. package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -1
  370. package/dist/layouts/motivational-speaker/pages/CategoryPage.js +18 -22
  371. package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts +1 -1
  372. package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -1
  373. package/dist/layouts/motivational-speaker/pages/ContactPage.js +9 -13
  374. package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts +1 -1
  375. package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -1
  376. package/dist/layouts/motivational-speaker/pages/ProductsPage.js +121 -52
  377. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts +1 -1
  378. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -1
  379. package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +15 -24
  380. package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts +1 -1
  381. package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -1
  382. package/dist/layouts/motivational-speaker/pages/ServicesPage.js +8 -23
  383. package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +7 -7
  384. package/dist/layouts/shared/components/BaseStoreLayout.js +9 -9
  385. package/dist/layouts/shared/components/CartLineQuantityControl.js +1 -1
  386. package/dist/layouts/shared/components/GenericPageWrapper.js +3 -3
  387. package/dist/layouts/shared/components/ProductPriceFilterSection.js +4 -4
  388. package/dist/layouts/shared/components/PromoBanner.d.ts +1 -4
  389. package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -1
  390. package/dist/layouts/shared/components/PromoBanner.js +12 -8
  391. package/dist/layouts/shared/components/StoreFooter.js +10 -10
  392. package/dist/layouts/shared/components/StoreHeader.js +7 -7
  393. package/dist/layouts/shared/components/TestimonialCard.d.ts.map +1 -1
  394. package/dist/layouts/shared/components/TestimonialCard.js +2 -2
  395. package/dist/layouts/shared/components/headers/BookingAgendaSidebar.js +2 -2
  396. package/dist/layouts/shared/components/headers/ClothingMinimalHeader.js +11 -11
  397. package/dist/layouts/shared/components/headers/FoodModernHeader.js +7 -7
  398. package/dist/layouts/shared/index.js +22 -22
  399. package/dist/layouts/shared/pages/AccountPage.d.ts.map +1 -1
  400. package/dist/layouts/shared/pages/AccountPage.js +101 -27
  401. package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -1
  402. package/dist/layouts/shared/pages/CartPage.js +39 -90
  403. package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
  404. package/dist/layouts/shared/pages/CheckoutPage.js +349 -868
  405. package/dist/layouts/shared/pages/CookiePolicyPage.js +1 -1
  406. package/dist/layouts/shared/pages/FeatureDisabledPage.js +1 -1
  407. package/dist/layouts/shared/pages/HelpCenterPage.js +1 -1
  408. package/dist/layouts/shared/pages/MaintenancePage.d.ts.map +1 -1
  409. package/dist/layouts/shared/pages/MaintenancePage.js +2 -3
  410. package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -1
  411. package/dist/layouts/shared/pages/PortfolioPage.js +2 -2
  412. package/dist/layouts/shared/pages/PrivacyPolicyPage.js +1 -1
  413. package/dist/layouts/shared/pages/SizeGuidePage.js +1 -1
  414. package/dist/layouts/shared/pages/StyleGuidePage.js +3 -3
  415. package/dist/layouts/shared/pages/TeamPage.d.ts.map +1 -1
  416. package/dist/layouts/shared/pages/TeamPage.js +1 -1
  417. package/dist/layouts/shared/pages/TermsPage.js +1 -1
  418. package/dist/layouts/shared/pages/TrackOrderPage.js +4 -4
  419. package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -1
  420. package/dist/layouts/shared/pages/WishlistPage.js +44 -29
  421. package/dist/layouts/shared/wrappers/BookingAgendaLayout.d.ts.map +1 -1
  422. package/dist/layouts/shared/wrappers/BookingAgendaLayout.js +80 -35
  423. package/dist/layouts/shared/wrappers/ClothingLayout.js +8 -8
  424. package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +7 -7
  425. package/dist/layouts/shared/wrappers/ElectronicsLayout.js +5 -5
  426. package/dist/layouts/shared/wrappers/FoodModernLayout.js +6 -6
  427. package/dist/layouts/shared/wrappers/MotivationalLayout.js +9 -9
  428. package/dist/layouts/shared/wrappers/StandardLayout.js +8 -8
  429. package/dist/lib/api.d.ts +3 -4
  430. package/dist/lib/api.d.ts.map +1 -1
  431. package/dist/lib/api.js +69 -109
  432. package/dist/lib/auth-context.js +2 -2
  433. package/dist/lib/content-selectors.d.ts +1 -1
  434. package/dist/lib/content-selectors.d.ts.map +1 -1
  435. package/dist/lib/content-selectors.js +8 -0
  436. package/dist/lib/layout-config-hydration.js +2 -2
  437. package/dist/lib/loading-context.d.ts.map +1 -1
  438. package/dist/lib/loading-context.js +11 -21
  439. package/dist/lib/payaza-checkout.d.ts.map +1 -1
  440. package/dist/lib/payaza-checkout.js +2 -4
  441. package/dist/lib/payaza-public-key.d.ts +6 -0
  442. package/dist/lib/payaza-public-key.d.ts.map +1 -0
  443. package/dist/lib/payaza-public-key.js +10 -0
  444. package/dist/lib/rich-html.d.ts +31 -26
  445. package/dist/lib/rich-html.d.ts.map +1 -1
  446. package/dist/lib/rich-html.js +1 -0
  447. package/dist/lib/services/analytics.service.js +1 -1
  448. package/dist/lib/services/auth.service.js +1 -1
  449. package/dist/lib/services/booking.service.js +1 -1
  450. package/dist/lib/services/category.service.js +1 -1
  451. package/dist/lib/services/checkout.service.d.ts +3 -0
  452. package/dist/lib/services/checkout.service.d.ts.map +1 -1
  453. package/dist/lib/services/checkout.service.js +1 -1
  454. package/dist/lib/services/contact.service.js +1 -1
  455. package/dist/lib/services/customer.service.js +1 -1
  456. package/dist/lib/services/fees.service.d.ts +17 -63
  457. package/dist/lib/services/fees.service.d.ts.map +1 -1
  458. package/dist/lib/services/fees.service.js +4 -138
  459. package/dist/lib/services/index.js +13 -13
  460. package/dist/lib/services/location.service.js +1 -1
  461. package/dist/lib/services/order.service.js +1 -1
  462. package/dist/lib/services/payment.service.js +1 -1
  463. package/dist/lib/services/product.service.d.ts +7 -2
  464. package/dist/lib/services/product.service.d.ts.map +1 -1
  465. package/dist/lib/services/product.service.js +13 -1
  466. package/dist/lib/services/promo.service.js +1 -1
  467. package/dist/lib/services/review.service.js +1 -1
  468. package/dist/lib/services/service.service.js +1 -1
  469. package/dist/lib/services/shipping.service.js +1 -1
  470. package/dist/lib/services/store.service.js +1 -1
  471. package/dist/lib/store-config-utils.d.ts +1 -10
  472. package/dist/lib/store-config-utils.d.ts.map +1 -1
  473. package/dist/lib/store-config-utils.js +73 -261
  474. package/dist/lib/store-config.js +1 -1
  475. package/dist/lib/store-context.d.ts +1 -23
  476. package/dist/lib/store-context.d.ts.map +1 -1
  477. package/dist/lib/store-context.js +89 -111
  478. package/dist/lib/store-types.d.ts +9 -91
  479. package/dist/lib/store-types.d.ts.map +1 -1
  480. package/dist/lib/utils/asset-helpers.js +1 -1
  481. package/dist/lib/utils/catalog-price-bounds.d.ts +16 -6
  482. package/dist/lib/utils/catalog-price-bounds.d.ts.map +1 -1
  483. package/dist/lib/utils/catalog-price-bounds.js +58 -14
  484. package/dist/lib/utils/category-tree.d.ts +9 -0
  485. package/dist/lib/utils/category-tree.d.ts.map +1 -1
  486. package/dist/lib/utils/category-tree.js +26 -0
  487. package/dist/lib/utils/editor-preview.d.ts +5 -0
  488. package/dist/lib/utils/editor-preview.d.ts.map +1 -1
  489. package/dist/lib/utils/editor-preview.js +17 -3
  490. package/dist/lib/utils/fee-calculations.d.ts +5 -1
  491. package/dist/lib/utils/fee-calculations.d.ts.map +1 -1
  492. package/dist/lib/utils/fee-calculations.js +28 -31
  493. package/dist/lib/utils/index.d.ts +1 -1
  494. package/dist/lib/utils/index.d.ts.map +1 -1
  495. package/dist/lib/utils/index.js +4 -4
  496. package/dist/lib/utils/product-images.js +1 -1
  497. package/dist/lib/utils/product-share.js +1 -1
  498. package/dist/lib/utils/url-helpers.d.ts +6 -0
  499. package/dist/lib/utils/url-helpers.d.ts.map +1 -1
  500. package/dist/lib/utils/url-helpers.js +20 -4
  501. package/dist/preview/LayoutPreview.js +6 -6
  502. package/dist/preview/PreviewRouter.js +4 -4
  503. package/dist/preview/canvas/PreviewCanvasEnhancer.js +8 -8
  504. package/dist/preview/canvas/preview-flush-await.js +1 -1
  505. package/dist/preview/canvas/preview-isolation.js +1 -1
  506. package/dist/preview/canvas/preview-route.js +2 -2
  507. package/dist/preview/index.js +5 -5
  508. package/dist/styles/index.css +190 -149
  509. package/package.json +31 -43
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { FoodModernHeader } from '../components/headers/FoodModernHeader.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 { FoodModernHeader } from '../components/headers/FoodModernHeader';
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 { AlertModalProvider } from '../../../components/ui/alert-modal.js';
8
+ import { useLoading } from '../../../lib/loading-context';
9
+ import { AlertModalProvider } from '../../../components/ui/alert-modal';
10
10
  export function FoodModernLayout({ children, storeConfig }) {
11
11
  const pathname = usePathname();
12
12
  const { isBackendLoading } = useLoading();
@@ -1,15 +1,15 @@
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 { usePathname } from 'next/navigation';
12
- import { cn } from '../../../lib/utils/index.js';
12
+ import { cn } from '../../../lib/utils';
13
13
  export function MotivationalLayout({ children, storeConfig }) {
14
14
  const { cartCount } = useStore();
15
15
  const { isBackendLoading } = useLoading();
@@ -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
  export function StandardLayout({ children, storeConfig }) {
12
12
  const { cartCount } = useStore();
13
13
  const { isBackendLoading } = useLoading();
package/dist/lib/api.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- export declare function setAccessToken(token: string | null): void;
2
- export declare function getAccessToken(): string | null;
3
1
  export declare class ApiError extends Error {
4
2
  message: string;
5
3
  status?: number;
6
4
  data?: any;
7
- code?: string;
8
- constructor(message: string, status?: number, data?: any, code?: string);
5
+ constructor(message: string, status?: number, data?: any);
9
6
  }
7
+ export declare function setAccessToken(token: string | null): void;
8
+ export declare function getAccessToken(): string | null;
10
9
  export declare const api: import("axios").AxiosInstance;
11
10
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAaA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEzD;AAED,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C;AAOD,qBAAa,QAAS,SAAQ,KAAK;IAIxB,OAAO,EAAE,MAAM;IACf,MAAM,CAAC,EAAE,MAAM;IACf,IAAI,CAAC,EAAE,GAAG;IALnB,IAAI,CAAC,EAAE,MAAM,CAAC;gBAGL,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,GAAG,EACjB,IAAI,CAAC,EAAE,MAAM;CAMhB;AAED,eAAO,MAAM,GAAG,+BAQd,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAS,SAAQ,KAAK;IAExB,OAAO,EAAE,MAAM;IACf,MAAM,CAAC,EAAE,MAAM;IACf,IAAI,CAAC,EAAE,GAAG;gBAFV,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,GAAG;CAKpB;AAID,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAMzD;AAED,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C;AA4BD,eAAO,MAAM,GAAG,+BAQd,CAAC"}
package/dist/lib/api.js CHANGED
@@ -1,167 +1,127 @@
1
1
  import axios from 'axios';
2
- // Customer storefront APIs (checkout, shipping, cart) live on the app backend (4002).
3
- // Merchant dashboard APIs use NEXT_PUBLIC_API_URL (admin backend, 4004).
4
- const API_URL = process.env.NEXT_PUBLIC_APP_BACKEND_URL ||
5
- process.env.NEXT_PUBLIC_API_URL ||
6
- 'http://localhost:4002';
7
- // In-memory access token — storefront-app stores tokens here (not localStorage).
8
- // Legacy flows may still use localStorage 'token'.
9
- let _accessToken = null;
10
- export function setAccessToken(token) {
11
- _accessToken = token;
12
- }
13
- export function getAccessToken() {
14
- return _accessToken;
15
- }
16
- function resolveAuthToken() {
17
- if (typeof window === 'undefined')
18
- return _accessToken;
19
- return _accessToken || localStorage.getItem('token');
20
- }
21
2
  export class ApiError extends Error {
22
- constructor(message, status, data, code) {
3
+ constructor(message, status, data) {
23
4
  super(message);
24
5
  this.message = message;
25
6
  this.status = status;
26
7
  this.data = data;
27
8
  this.name = 'ApiError';
28
- this.code = code;
29
9
  }
30
10
  }
11
+ let refreshInFlight = null;
12
+ export function setAccessToken(token) {
13
+ if (typeof window === 'undefined')
14
+ return;
15
+ // Clear any legacy plaintext token leftovers; access JWT is BFF HttpOnly only.
16
+ localStorage.removeItem('token');
17
+ localStorage.removeItem('refreshToken');
18
+ if (!token)
19
+ return;
20
+ }
21
+ export function getAccessToken() {
22
+ return null;
23
+ }
24
+ async function refreshViaHostBff() {
25
+ if (typeof window === 'undefined')
26
+ return false;
27
+ if (refreshInFlight)
28
+ return refreshInFlight;
29
+ refreshInFlight = (async () => {
30
+ try {
31
+ const res = await fetch('/api/auth/refresh', {
32
+ method: 'POST',
33
+ credentials: 'same-origin',
34
+ });
35
+ if (res.status === 401 || res.status === 403)
36
+ return false;
37
+ if (!res.ok)
38
+ throw new Error('refresh_unavailable');
39
+ return true;
40
+ }
41
+ finally {
42
+ refreshInFlight = null;
43
+ }
44
+ })();
45
+ return refreshInFlight;
46
+ }
47
+ function resolveBrowserBaseUrl() {
48
+ if (typeof window !== 'undefined')
49
+ return '/api/backend';
50
+ return `${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:4002'}/api`;
51
+ }
31
52
  export const api = axios.create({
32
- baseURL: `${API_URL}/api`,
53
+ baseURL: resolveBrowserBaseUrl(),
54
+ withCredentials: true,
33
55
  headers: {
34
56
  'Content-Type': 'application/json',
35
- // Add test mode header if in test environment
36
57
  ...(typeof window !== 'undefined' && window.__TEST_MODE__ ? { 'x-test-mode': 'true' } : {}),
37
58
  },
38
- timeout: 30000, // 30 seconds
59
+ timeout: 30000,
39
60
  });
40
- // Request interceptor for auth token and session ID
41
61
  api.interceptors.request.use((config) => {
42
62
  if (typeof window !== 'undefined') {
43
- const token = resolveAuthToken();
44
- if (token) {
45
- config.headers.Authorization = `Bearer ${token}`;
46
- }
47
- // Guest cart only: pass session via `_sid` query param. Do NOT send a
48
- // custom x-session-id header — custom headers force a CORS preflight that
49
- // proxies in front of the backend (e.g. nginx with a hardcoded
50
- // Access-Control-Allow-Headers list) reject, breaking checkout.
63
+ config.baseURL = '/api/backend';
64
+ delete config.headers.Authorization;
51
65
  let sessionId = sessionStorage.getItem('sessionId');
52
66
  if (!sessionId) {
53
67
  sessionId = `session-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
54
68
  sessionStorage.setItem('sessionId', sessionId);
55
69
  }
56
- const urlPath = (config.url || '').split('?')[0];
57
- const isCartApi = urlPath === '/cart' ||
58
- urlPath.startsWith('/cart/') ||
59
- urlPath === 'cart' ||
60
- urlPath.startsWith('cart/');
61
- if (isCartApi) {
62
- config.params = { _sid: sessionId, ...config.params };
63
- }
64
- // Add test mode header if in test environment
70
+ config.headers['x-session-id'] = sessionId;
65
71
  if (window.__TEST_MODE__) {
66
72
  config.headers['x-test-mode'] = 'true';
67
73
  }
68
- // For FormData requests, remove Content-Type header to let axios set it with boundary
69
74
  if (config.data instanceof FormData) {
70
75
  delete config.headers['Content-Type'];
71
76
  }
72
77
  }
73
78
  return config;
74
- }, (error) => {
75
- return Promise.reject(error);
76
- });
77
- // Response interceptor for error handling and token refresh
78
- api.interceptors.response.use((response) => {
79
- return response;
80
- }, async (error) => {
79
+ }, (error) => Promise.reject(error));
80
+ api.interceptors.response.use((response) => response, async (error) => {
81
81
  const originalRequest = error.config;
82
- // Handle 429 Too Many Requests - retry with exponential backoff
83
82
  if (error.response?.status === 429 && originalRequest) {
84
83
  const retryCount = originalRequest._retryCount || 0;
85
84
  const maxRetries = 3;
86
- const baseDelay = 1000; // 1 second
85
+ const baseDelay = 1000;
87
86
  if (retryCount < maxRetries) {
88
87
  originalRequest._retryCount = retryCount + 1;
89
- originalRequest._retryDelay = baseDelay * Math.pow(2, retryCount); // Exponential backoff: 1s, 2s, 4s
90
- // Wait before retrying
91
- await new Promise(resolve => setTimeout(resolve, originalRequest._retryDelay));
92
- console.log(`[API] Retrying request after rate limit (attempt ${retryCount + 1}/${maxRetries}, delay: ${originalRequest._retryDelay}ms)`);
88
+ originalRequest._retryDelay = baseDelay * Math.pow(2, retryCount);
89
+ await new Promise((resolve) => setTimeout(resolve, originalRequest._retryDelay));
93
90
  return api(originalRequest);
94
91
  }
95
- else {
96
- console.warn('[API] Max retries reached for rate-limited request');
97
- }
98
92
  }
99
- // Handle 401 Unauthorized - try to refresh token
100
93
  if (error.response?.status === 401 && !originalRequest._retry) {
101
- // Check if we're in preview mode - skip ALL auth operations to prevent session invalidation
102
94
  const isPreview = typeof window !== 'undefined' && window.__IS_PREVIEW__;
103
95
  if (isPreview) {
104
- // In preview mode, never attempt token refresh, clear tokens, or redirect
105
- // This prevents interfering with the parent window's session (storefront-admin)
106
- console.warn('[API] 401 Unauthorized in preview mode - skipping all auth operations (refresh, clear, redirect)');
107
96
  return Promise.reject(error);
108
97
  }
109
98
  originalRequest._retry = true;
110
99
  try {
111
- let newToken = null;
112
- // Prefer storefront-app BFF refresh (HttpOnly cookie) when no legacy refresh token.
113
- const refreshToken = localStorage.getItem('refreshToken');
114
- if (!refreshToken && typeof window !== 'undefined') {
115
- const refreshRes = await fetch('/api/auth/refresh', {
116
- method: 'POST',
117
- credentials: 'same-origin',
118
- });
119
- if (refreshRes.ok) {
120
- const refreshData = await refreshRes.json();
121
- newToken = refreshData.data?.token ?? null;
122
- }
123
- }
124
- else if (refreshToken) {
125
- const response = await axios.post(`${API_URL}/api/auth/refresh`, { refreshToken });
126
- if (response.data.status === 'success' && response.data.data) {
127
- newToken = response.data.data.token;
128
- const newRefreshToken = response.data.data.refreshToken;
129
- localStorage.setItem('token', newToken);
130
- if (newRefreshToken) {
131
- localStorage.setItem('refreshToken', newRefreshToken);
132
- }
133
- }
134
- }
135
- if (newToken) {
136
- setAccessToken(newToken);
137
- localStorage.setItem('token', newToken);
138
- if (originalRequest.headers) {
139
- originalRequest.headers.Authorization = `Bearer ${newToken}`;
140
- }
100
+ const ok = await refreshViaHostBff();
101
+ if (ok) {
141
102
  return api(originalRequest);
142
103
  }
104
+ localStorage.removeItem('storefront_user');
105
+ localStorage.removeItem('token');
106
+ localStorage.removeItem('refreshToken');
107
+ if (typeof window !== 'undefined') {
108
+ window.dispatchEvent(new CustomEvent('customer-session-ended'));
109
+ }
110
+ return Promise.reject(error);
143
111
  }
144
112
  catch (refreshError) {
145
- // Refresh failed, clear tokens and redirect to login
146
- // But only if NOT in preview mode (double check for safety)
147
- const isPreviewCheck = typeof window !== 'undefined' && window.__IS_PREVIEW__;
148
- if (!isPreviewCheck) {
149
- setAccessToken(null);
150
- localStorage.removeItem('token');
151
- localStorage.removeItem('refreshToken');
152
- localStorage.removeItem('storefront_user');
153
- if (typeof window !== 'undefined') {
154
- window.location.href = '/auth/login';
155
- }
113
+ if (refreshError?.message === 'refresh_unavailable') {
114
+ return Promise.reject(new ApiError('Unable to refresh your session right now. Please try again.', 503));
115
+ }
116
+ localStorage.removeItem('storefront_user');
117
+ if (typeof window !== 'undefined') {
118
+ window.dispatchEvent(new CustomEvent('customer-session-ended'));
156
119
  }
157
120
  return Promise.reject(refreshError);
158
121
  }
159
122
  }
160
- // Handle other errors
161
123
  const errorMessage = error.response?.data?.message ||
162
124
  error.message ||
163
125
  'An error occurred';
164
- // Create custom ApiError with status and data
165
- const apiError = new ApiError(errorMessage, error.response?.status, error.response?.data?.data || error.response?.data, error.code);
166
- return Promise.reject(apiError);
126
+ return Promise.reject(new ApiError(errorMessage, error.response?.status, error.response?.data?.data || error.response?.data));
167
127
  });
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { createContext, useContext, useState, useEffect, useCallback, useMemo, useRef } from 'react';
4
4
  import { useRouter } from 'next/navigation';
5
- import { authService } from './services/auth.service.js';
6
- import { customerService } from './services/customer.service.js';
5
+ import { authService } from './services/auth.service';
6
+ import { customerService } from './services/customer.service';
7
7
  export const AuthContext = createContext({
8
8
  user: null,
9
9
  isAuthenticated: false,
@@ -2,7 +2,7 @@
2
2
  * Content selectors for different route types
3
3
  * Used to detect when page content is ready for display
4
4
  */
5
- export type RouteType = 'product-detail' | 'products' | 'categories' | 'category-detail' | 'generic';
5
+ export type RouteType = 'product-detail' | 'products' | 'categories' | 'category-detail' | 'checkout' | 'generic';
6
6
  export interface ContentSelectorConfig {
7
7
  selectors: string[];
8
8
  minElements?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"content-selectors.d.ts","sourceRoot":"","sources":["../../src/lib/content-selectors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAErG,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,qBAAqB,CAyCtE,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,qBAAqB,CAE/E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAyB3D"}
1
+ {"version":3,"file":"content-selectors.d.ts","sourceRoot":"","sources":["../../src/lib/content-selectors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GACjB,gBAAgB,GAChB,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,qBAAqB,CA8CtE,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,qBAAqB,CAE/E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CA6B3D"}
@@ -32,6 +32,11 @@ export const CONTENT_SELECTORS = {
32
32
  minElements: 2, // At least 2 product cards must be visible
33
33
  minPercentage: 50,
34
34
  },
35
+ checkout: {
36
+ selectors: ['[data-checkout-ready]'],
37
+ requiredSelectors: ['[data-checkout-ready]'],
38
+ minElements: 1,
39
+ },
35
40
  'generic': {
36
41
  selectors: [
37
42
  '[data-content-ready]',
@@ -70,6 +75,9 @@ export function detectRouteType(pathname) {
70
75
  if (firstSegment === 'categories' && !secondSegment) {
71
76
  return 'categories';
72
77
  }
78
+ if (firstSegment === 'checkout' && !secondSegment) {
79
+ return 'checkout';
80
+ }
73
81
  }
74
82
  return 'generic';
75
83
  }
@@ -2,8 +2,8 @@
2
2
  * Server-safe hydration of published layout config from DB/API payloads.
3
3
  * Merges compiledLegacyConfigJson, editorDocument section entries, and layoutConfig.sections.
4
4
  */
5
- import { validateEditorEnvelope } from '../editor/document/validate.js';
6
- import { envelopeToStoreConfig } from '../editor/document/adapter.js';
5
+ import { validateEditorEnvelope } from '../editor/document/validate';
6
+ import { envelopeToStoreConfig } from '../editor/document/adapter';
7
7
  function isPlainObject(value) {
8
8
  return value !== null && typeof value === 'object' && !Array.isArray(value);
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"loading-context.d.ts","sourceRoot":"","sources":["../../src/lib/loading-context.tsx"],"names":[],"mappings":"AAKA,OAAO,yBAAyB,CAAC;AAiBjC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,gBAAgB,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,6CAA2D,CAAC;AAEvF,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAoN1E;AAED,wBAAgB,UAAU,uBAMzB"}
1
+ {"version":3,"file":"loading-context.d.ts","sourceRoot":"","sources":["../../src/lib/loading-context.tsx"],"names":[],"mappings":"AAKA,OAAO,yBAAyB,CAAC;AAiBjC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,gBAAgB,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,6CAA2D,CAAC;AAEvF,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CA0M1E;AAED,wBAAgB,UAAU,uBAMzB"}
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createContext, useContext, useState, useCallback, useEffect, useRef } from 'react';
4
- import { usePathname, useSearchParams } from 'next/navigation';
4
+ import { usePathname } from 'next/navigation';
5
5
  import NProgress from 'nprogress';
6
6
  import 'nprogress/nprogress.css';
7
- import { PageLoader } from '../components/ui/page-loader.js';
8
- import { RouteSkeletonLoader } from '../components/ui/route-skeleton-loader.js';
9
- import { useContentReady } from '../hooks/use-content-ready.js';
10
- import { scrollToTop } from '../lib/utils/scroll-to-top.util.js';
7
+ import { PageLoader } from '../components/ui/page-loader';
8
+ import { RouteSkeletonLoader } from '../components/ui/route-skeleton-loader';
9
+ import { useContentReady } from '../hooks/use-content-ready';
10
+ import { scrollToTop } from '../lib/utils/scroll-to-top.util';
11
11
  // Configure NProgress
12
12
  if (typeof window !== 'undefined') {
13
13
  NProgress.configure({
@@ -26,15 +26,6 @@ export function LoadingProvider({ children }) {
26
26
  const [targetPathname, setTargetPathname] = useState(null);
27
27
  const [backendLoadingCount, setBackendLoadingCount] = useState(0);
28
28
  const pathname = usePathname();
29
- // Safely get searchParams - may not be available during static generation
30
- let searchParams = null;
31
- try {
32
- searchParams = useSearchParams();
33
- }
34
- catch {
35
- // useSearchParams not available (e.g., during static generation)
36
- searchParams = null;
37
- }
38
29
  const loadingTimeoutRef = useRef(null);
39
30
  const previousPathnameRef = useRef(null);
40
31
  const skeletonTimeoutRef = useRef(null);
@@ -93,7 +84,7 @@ export function LoadingProvider({ children }) {
93
84
  clearTimeout(nprogressTimeoutRef.current);
94
85
  }
95
86
  };
96
- }, [pathname, searchParams?.toString()]);
87
+ }, [pathname]);
97
88
  const setLoading = useCallback((loading) => {
98
89
  setIsLoading(loading);
99
90
  if (typeof window !== 'undefined') {
@@ -159,23 +150,22 @@ export function LoadingProvider({ children }) {
159
150
  setBackendLoadingCount(prev => Math.max(0, prev - 1));
160
151
  }, []);
161
152
  const isBackendLoading = backendLoadingCount > 0;
162
- // Hide skeleton when content is ready AND backend loading is complete
163
- // This ensures spinner and blurred background close together
153
+ // Hide skeleton when page content is ready. Do not wait for unrelated background
154
+ // requests (cart sync, analytics, etc.) or checkout can appear stuck on the skeleton.
164
155
  useEffect(() => {
165
- if (isPageTransitioning && isContentReady && !isBackendLoading) {
156
+ if (isPageTransitioning && isContentReady) {
166
157
  scrollToTop();
167
- // Content is ready AND backend loading is complete, hide skeleton and loader together
168
158
  if (skeletonTimeoutRef.current) {
169
159
  clearTimeout(skeletonTimeoutRef.current);
170
160
  }
171
161
  setIsPageTransitioning(false);
172
- setIsLoading(false); // Also reset isLoading
162
+ setIsLoading(false);
173
163
  setTargetPathname(null);
174
164
  if (typeof window !== 'undefined') {
175
165
  NProgress.done();
176
166
  }
177
167
  }
178
- }, [isPageTransitioning, isContentReady, isBackendLoading]);
168
+ }, [isPageTransitioning, isContentReady]);
179
169
  // Additional safety: Hide loader if page transition completes but content detection didn't trigger
180
170
  useEffect(() => {
181
171
  if (!isPageTransitioning && isLoading) {
@@ -1 +1 @@
1
- {"version":3,"file":"payaza-checkout.d.ts","sourceRoot":"","sources":["../../src/lib/payaza-checkout.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD,8FAA8F;AAC9F,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,oBAAoB,CAGnF;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,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f,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,KACA,oBA2GF,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * Method: setup(config).showPopup()
7
7
  */
8
8
  import PayazaCheckout from 'payaza-web-sdk/lib';
9
- import { normalizePhoneForPayaza } from '../lib/utils/phone-format.js';
9
+ import { normalizePhoneForPayaza } from '../lib/utils/phone-format';
10
10
  /** Map backend payazaConnectionMode (or legacy environment values) to SDK connection mode. */
11
11
  export function normalizeConnectionMode(value) {
12
12
  if (value === 'Test' || value === 'test')
@@ -179,9 +179,7 @@ export const initiatePayazaCheckout = async (config) => {
179
179
  if (!config.publicKey) {
180
180
  throw new Error('Payment gateway not configured. Please contact support.');
181
181
  }
182
- const connectionMode = config.connectionMode
183
- ? normalizeConnectionMode(config.connectionMode)
184
- : PayazaCheckout.LIVE_CONNECTION_MODE;
182
+ const connectionMode = normalizeConnectionMode(config.connectionMode);
185
183
  console.log('[Payaza] Connection mode:', connectionMode, config.connectionMode ? '(from backend config)' : '(default Live)');
186
184
  // Build comprehensive additional_details metadata
187
185
  // This data will be available in Payaza webhooks and transaction responses
@@ -0,0 +1,6 @@
1
+ import type { CheckoutResponse } from '../lib/services/checkout.service';
2
+ declare const CHECKOUT_KEY_MISSING_MESSAGE = "Payment gateway not configured for this currency. Please contact support.";
3
+ /** Payaza public key from processCheckout — never use env/storeConfig fallback for live checkout. */
4
+ export declare function requireCheckoutPayazaPublicKey(checkoutResponse: Pick<CheckoutResponse, 'payazaPublicKey'>): string;
5
+ export { CHECKOUT_KEY_MISSING_MESSAGE };
6
+ //# sourceMappingURL=payaza-public-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payaza-public-key.d.ts","sourceRoot":"","sources":["../../src/lib/payaza-public-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,QAAA,MAAM,4BAA4B,8EAC2C,CAAC;AAE9E,qGAAqG;AACrG,wBAAgB,8BAA8B,CAC5C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,GAC1D,MAAM,CAMR;AAED,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ const CHECKOUT_KEY_MISSING_MESSAGE = 'Payment gateway not configured for this currency. Please contact support.';
2
+ /** Payaza public key from processCheckout — never use env/storeConfig fallback for live checkout. */
3
+ export function requireCheckoutPayazaPublicKey(checkoutResponse) {
4
+ const key = checkoutResponse.payazaPublicKey?.trim();
5
+ if (!key) {
6
+ throw new Error(CHECKOUT_KEY_MISSING_MESSAGE);
7
+ }
8
+ return key;
9
+ }
10
+ export { CHECKOUT_KEY_MISSING_MESSAGE };
@@ -1,38 +1,43 @@
1
1
  export declare const PAYAZA_RICH_HTML_POLICY_VERSION = "1";
2
- export type PayazaRichTextStored = {
3
- sanitizedHtml: string;
4
- policyVersion: string;
5
- plainText?: string;
6
- rawHtml?: string;
7
- updatedAt?: string;
8
- };
9
2
  /** Normalize a typed URL before `execCommand(createLink)`. */
10
- export declare function coercePayazaRichLinkHref(raw: string): string;
3
+ export declare function coercePayazaRichLinkHref(raw: any): any;
11
4
  /** Allowlisted semantic markup only — no scripts, handlers, SVG, iframe, style. */
12
- export declare function sanitizePayazaRichHtml(unsafe: string): string;
5
+ export declare function sanitizePayazaRichHtml(unsafe: any): string;
13
6
  /** Plain text excerpt (spaces normalized). Safe for OG/search UI. */
14
- export declare function plainTextFromSanitizedHtml(html: string): string;
15
- export declare function wrapPlainTextAsParagraph(plain: string): string;
7
+ export declare function plainTextFromSanitizedHtml(html: any): string;
8
+ export declare function wrapPlainTextAsParagraph(plain: any): any;
16
9
  /** Legacy string → rich object without dropping characters. */
17
- export declare function migrateLegacyRichStringValue(raw: string): PayazaRichTextStored;
18
- export declare function normalizeStoredRichValue(val: unknown): PayazaRichTextStored | null;
10
+ export declare function migrateLegacyRichStringValue(raw: any): {
11
+ sanitizedHtml: any;
12
+ policyVersion: string;
13
+ plainText: string;
14
+ };
15
+ export declare function normalizeStoredRichValue(val: any): any;
19
16
  /** HTML string for storefront / preview (defense in depth). */
20
- export declare function richFieldHtmlForRender(val: unknown, fallbackPlain: string): string;
17
+ export declare function richFieldHtmlForRender(val: any, fallbackPlain: any): any;
21
18
  /** Commit from contenteditable innerHTML in preview (before persist). */
22
- export declare function buildPayazaRichCommitFromEditorHtml(innerHtml: string, options?: {
23
- keepRaw?: boolean;
24
- }): PayazaRichTextStored;
19
+ export declare function buildPayazaRichCommitFromEditorHtml(innerHtml: any, options: any): {
20
+ updatedAt: string;
21
+ rawHtml?: any;
22
+ sanitizedHtml: string;
23
+ policyVersion: string;
24
+ plainText: string;
25
+ };
25
26
  /** Sidebar / textarea: user typed HTML — sanitize on blur. */
26
- export declare function buildPayazaRichCommitFromSidebarInput(input: string, options?: {
27
- keepRaw?: boolean;
28
- }): PayazaRichTextStored;
27
+ export declare function buildPayazaRichCommitFromSidebarInput(input: any, options: any): {
28
+ updatedAt: string;
29
+ rawHtml?: any;
30
+ sanitizedHtml: string;
31
+ policyVersion: string;
32
+ plainText: string;
33
+ };
29
34
  /** Sidebar textarea seed: sanitized HTML fragment or legacy string. */
30
- export declare function coerceRichSidebarEditorString(val: unknown): string;
31
- export declare function isPayazaRichTextPayload(v: unknown): v is PayazaRichTextStored;
32
- export declare function richFieldHasContent(val: unknown): boolean;
33
- export declare function richFieldPlainTextForDisplay(val: unknown, fallbackPlain?: string): string;
35
+ export declare function coerceRichSidebarEditorString(val: any): any;
36
+ export declare function isPayazaRichTextPayload(v: any): boolean;
37
+ export declare function richFieldHasContent(val: any): boolean;
38
+ export declare function richFieldPlainTextForDisplay(val: any, fallbackPlain?: string): any;
34
39
  /** Coerce API / legacy description values for storefront rendering. */
35
- export declare function coerceRichFieldForStorefront(val: unknown): string | PayazaRichTextStored;
40
+ export declare function coerceRichFieldForStorefront(val: any): any;
36
41
  /** Strip rawHtml for customer-facing API responses (optional helper). */
37
- export declare function toPublicRichFieldSnapshot(v: PayazaRichTextStored): Omit<PayazaRichTextStored, 'rawHtml'>;
42
+ export declare function toPublicRichFieldSnapshot(v: any): any;
38
43
  //# sourceMappingURL=rich-html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-html.d.ts","sourceRoot":"","sources":["../../src/lib/rich-html.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,8DAA8D;AAC9D,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiB5D;AAsBD,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAkC7D;AAED,qEAAqE;AACrE,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa/D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED,+DAA+D;AAC/D,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAgB9E;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,oBAAoB,GAAG,IAAI,CAiBlF;AAED,+DAA+D;AAC/D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAIlF;AAED,yEAAyE;AACzE,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG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xD;AACD,yEAAyE;AACzE,wBAAgB,mCAAmC,CAAC,SAAS,KAAA,EAAE,OAAO,KAAA;;;;;;EAUrE;AACD,8DAA8D;AAC9D,wBAAgB,qCAAqC,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;;;;;;EAEnE;AACD,uEAAuE;AACvE,wBAAgB,6BAA6B,CAAC,GAAG,KAAA,OAOhD;AACD,wBAAgB,uBAAuB,CAAC,CAAC,KAAA,WAKxC;AAmDD,wBAAgB,mBAAmB,CAAC,GAAG,KAAA,WAGtC;AACD,wBAAgB,4BAA4B,CAAC,GAAG,KAAA,EAAE,aAAa,SAAK,OAMnE;AACD,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,GAAG,KAAA,OAO/C;AACD,yEAAyE;AACzE,wBAAgB,yBAAyB,CAAC,CAAC,KAAA,OAG1C"}
@@ -2,6 +2,7 @@
2
2
  * Canonical rich-text sanitization & persistence helpers (admin + storefront).
3
3
  * Policy changes must bump PAYAZA_RICH_HTML_POLICY_VERSION for re-processing stored rows.
4
4
  */
5
+ // @ts-nocheck
5
6
  import DOMPurify from 'isomorphic-dompurify';
6
7
  export const PAYAZA_RICH_HTML_POLICY_VERSION = '1';
7
8
  function escapeHtmlPlain(s) {