@salla.sa/twilight-theme-engine 1.0.73 → 1.0.75

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 (349) hide show
  1. package/dist/{AddToCartForm-G2HK5QB3.js → AddToCartForm-WVHFHEWG.js} +8 -6
  2. package/dist/AddToCartForm-WVHFHEWG.js.map +1 -0
  3. package/dist/{BlogAuthorPage-BU2LVISS.js → BlogAuthorPage-GBT4WZHM.js} +21 -22
  4. package/dist/BlogAuthorPage-GBT4WZHM.js.map +1 -0
  5. package/dist/{BlogCategoryPage-UR4MPDLE.js → BlogCategoryPage-IHXISMB2.js} +21 -22
  6. package/dist/BlogCategoryPage-IHXISMB2.js.map +1 -0
  7. package/dist/{BlogPage-E2XZGFOP.js → BlogPage-NSICXETX.js} +19 -20
  8. package/dist/BlogPage-NSICXETX.js.map +1 -0
  9. package/dist/{BlogSinglePage-ZK2K6WEU.js → BlogSinglePage-7XINXQYI.js} +19 -20
  10. package/dist/BlogSinglePage-7XINXQYI.js.map +1 -0
  11. package/dist/{BlogTagPage-5N4VTPDN.js → BlogTagPage-APMDE5GK.js} +21 -22
  12. package/dist/BlogTagPage-APMDE5GK.js.map +1 -0
  13. package/dist/{BrandsPage-XE7RYGXA.js → BrandsPage-S4DMAHMG.js} +20 -21
  14. package/dist/BrandsPage-S4DMAHMG.js.map +1 -0
  15. package/dist/{Breadcrumb-NX6BUSOA.js → Breadcrumb-6VP2HOUT.js} +19 -20
  16. package/dist/Breadcrumb-6VP2HOUT.js.map +1 -0
  17. package/dist/{CartItem-SO34G6GZ.js → CartItem-WGQIMDM2.js} +19 -20
  18. package/dist/CartItem-WGQIMDM2.js.map +1 -0
  19. package/dist/{CartSummary-SDTY2CR2.js → CartSummary-MI5BNX25.js} +19 -20
  20. package/dist/CartSummary-MI5BNX25.js.map +1 -0
  21. package/dist/{Copyright-C426OB5D.js → Copyright-PNRLMJ4P.js} +3 -3
  22. package/dist/{Copyright-C426OB5D.js.map → Copyright-PNRLMJ4P.js.map} +1 -1
  23. package/dist/{CustomerLayout-UXX5KJWR.js → CustomerLayout-PI2XG5GK.js} +19 -20
  24. package/dist/CustomerLayout-PI2XG5GK.js.map +1 -0
  25. package/dist/{Footer-M5QEXJ4Z.js → Footer-S7WC4G4Z.js} +19 -20
  26. package/dist/{Footer-M5QEXJ4Z.js.map → Footer-S7WC4G4Z.js.map} +1 -1
  27. package/dist/{Header-CUJ4SYDF.js → Header-NYYH3YQ3.js} +8 -7
  28. package/dist/{Header-CUJ4SYDF.js.map → Header-NYYH3YQ3.js.map} +1 -1
  29. package/dist/{LoyaltyPage-UMQ2ZWA6.js → LoyaltyPage-KR526VEL.js} +19 -20
  30. package/dist/LoyaltyPage-KR526VEL.js.map +1 -0
  31. package/dist/{LoyaltyPointsPage-5YHEQSLT.js → LoyaltyPointsPage-TYYB6ZGC.js} +3 -3
  32. package/dist/{LoyaltyPointsPage-5YHEQSLT.js.map → LoyaltyPointsPage-TYYB6ZGC.js.map} +1 -1
  33. package/dist/{MainMenu-OFQDXUGW.js → MainMenu-LBDNR3RQ.js} +6 -7
  34. package/dist/MainMenu-LBDNR3RQ.js.map +1 -0
  35. package/dist/{MasterLayout-TSHKSJ7U.js → MasterLayout-CWNZSOY3.js} +19 -20
  36. package/dist/{MasterLayout-TSHKSJ7U.js.map → MasterLayout-CWNZSOY3.js.map} +1 -1
  37. package/dist/{MobileMenu-7EKUQ4MU.js → MobileMenu-7YCDXYRB.js} +20 -21
  38. package/dist/MobileMenu-7YCDXYRB.js.map +1 -0
  39. package/dist/{NotificationsPage-TBDOI7YB.js → NotificationsPage-ZF5KLMY6.js} +19 -20
  40. package/dist/NotificationsPage-ZF5KLMY6.js.map +1 -0
  41. package/dist/{OrderSinglePage-7A37FKJE.js → OrderSinglePage-2CY447QH.js} +27 -23
  42. package/dist/OrderSinglePage-2CY447QH.js.map +1 -0
  43. package/dist/{OrdersPage-NJ3JH6SG.js → OrdersPage-ZQ574GRT.js} +19 -20
  44. package/dist/OrdersPage-ZQ574GRT.js.map +1 -0
  45. package/dist/{PageSingle-UKA2U3E5.js → PageSingle-UEWTOGK4.js} +5 -6
  46. package/dist/PageSingle-UEWTOGK4.js.map +1 -0
  47. package/dist/{ProductDetails-XDNE62ZZ.js → ProductDetails-VBABSD5L.js} +14 -7
  48. package/dist/ProductDetails-VBABSD5L.js.map +1 -0
  49. package/dist/{ProfilePage-WPJYGKYR.js → ProfilePage-MU4SS3TT.js} +19 -20
  50. package/dist/ProfilePage-MU4SS3TT.js.map +1 -0
  51. package/dist/ReviewsPage-GZVEGFYE.js +18 -0
  52. package/dist/ReviewsPage-GZVEGFYE.js.map +1 -0
  53. package/dist/{SeoCartWidget-G7NAANUN.js → SeoCartWidget-R7AGEQBX.js} +19 -20
  54. package/dist/SeoCartWidget-R7AGEQBX.js.map +1 -0
  55. package/dist/{SettingsPage-X7GPCBJL.js → SettingsPage-D2YWUYH7.js} +19 -20
  56. package/dist/SettingsPage-D2YWUYH7.js.map +1 -0
  57. package/dist/{StoreClosedNotification-NKRYCLKX.js → StoreClosedNotification-GIBLCR4I.js} +20 -21
  58. package/dist/{StoreClosedNotification-NKRYCLKX.js.map → StoreClosedNotification-GIBLCR4I.js.map} +1 -1
  59. package/dist/{TestimonialsPage-JTUWHKPU.js → TestimonialsPage-RTEHCAWG.js} +5 -6
  60. package/dist/TestimonialsPage-RTEHCAWG.js.map +1 -0
  61. package/dist/{ThankYouPage-MCMBGHO2.js → ThankYouPage-OXZGYHCQ.js} +19 -20
  62. package/dist/ThankYouPage-OXZGYHCQ.js.map +1 -0
  63. package/dist/{WalletPage-JJI6WPNT.js → WalletPage-U2IW7IMG.js} +20 -21
  64. package/dist/WalletPage-U2IW7IMG.js.map +1 -0
  65. package/dist/{WishlistPage-HAOYS7NV.js → WishlistPage-W6D7TR2M.js} +21 -22
  66. package/dist/WishlistPage-W6D7TR2M.js.map +1 -0
  67. package/dist/api/apps.js +3 -4
  68. package/dist/api/blog.js +5 -6
  69. package/dist/api/brands.js +5 -6
  70. package/dist/api/cart.d.ts +1 -1
  71. package/dist/api/cart.d.ts.map +1 -1
  72. package/dist/api/cart.js +5 -6
  73. package/dist/api/category.js +5 -6
  74. package/dist/api/client.d.ts +6 -0
  75. package/dist/api/client.d.ts.map +1 -1
  76. package/dist/api/client.js +2 -3
  77. package/dist/api/home.js +3 -4
  78. package/dist/api/loyalty.js +5 -6
  79. package/dist/api/menu.js +3 -4
  80. package/dist/api/notification.js +3 -4
  81. package/dist/api/order.js +5 -6
  82. package/dist/api/page.js +5 -6
  83. package/dist/api/product.d.ts +20 -0
  84. package/dist/api/product.d.ts.map +1 -1
  85. package/dist/api/product.js +5 -6
  86. package/dist/api/profile.js +2 -3
  87. package/dist/api/profile.js.map +1 -1
  88. package/dist/api/store.d.ts +3 -1
  89. package/dist/api/store.d.ts.map +1 -1
  90. package/dist/api/store.js +3 -4
  91. package/dist/api/translations.js +3 -4
  92. package/dist/api/user.js +3 -4
  93. package/dist/api/wallet.js +3 -4
  94. package/dist/api/wishlist.js +6 -7
  95. package/dist/{chunk-U53LIN2F.js → chunk-2AFTZGJY.js} +58 -9
  96. package/dist/chunk-2AFTZGJY.js.map +1 -0
  97. package/dist/chunk-2APQP7KK.js +40 -0
  98. package/dist/chunk-2APQP7KK.js.map +1 -0
  99. package/dist/{chunk-5DPR7GWH.js → chunk-3GZ5OOAK.js} +3 -3
  100. package/dist/{chunk-5DPR7GWH.js.map → chunk-3GZ5OOAK.js.map} +1 -1
  101. package/dist/{chunk-3EE62REP.js → chunk-3UMHUKMJ.js} +3 -3
  102. package/dist/{chunk-3EE62REP.js.map → chunk-3UMHUKMJ.js.map} +1 -1
  103. package/dist/chunk-4A5IAMNL.js +402 -0
  104. package/dist/chunk-4A5IAMNL.js.map +1 -0
  105. package/dist/{chunk-WLDDKFSZ.js → chunk-52JLMGZK.js} +4 -4
  106. package/dist/{chunk-WLDDKFSZ.js.map → chunk-52JLMGZK.js.map} +1 -1
  107. package/dist/{chunk-CMD3ARR2.js → chunk-575U6BIW.js} +58 -28
  108. package/dist/chunk-575U6BIW.js.map +1 -0
  109. package/dist/{chunk-BVSJPBJ6.js → chunk-6WI7R2BD.js} +14 -3
  110. package/dist/chunk-6WI7R2BD.js.map +1 -0
  111. package/dist/{chunk-OGVUFMLX.js → chunk-7FDT2IFI.js} +3 -3
  112. package/dist/{chunk-OGVUFMLX.js.map → chunk-7FDT2IFI.js.map} +1 -1
  113. package/dist/{chunk-2ALN2BPM.js → chunk-7HWX2PEO.js} +3 -3
  114. package/dist/{chunk-2ALN2BPM.js.map → chunk-7HWX2PEO.js.map} +1 -1
  115. package/dist/{chunk-EXBH6RGD.js → chunk-BP6LUZXJ.js} +25 -6
  116. package/dist/chunk-BP6LUZXJ.js.map +1 -0
  117. package/dist/{chunk-3YAR2SXQ.js → chunk-BSXVOHE2.js} +78 -18
  118. package/dist/chunk-BSXVOHE2.js.map +1 -0
  119. package/dist/{chunk-WYW7USLQ.js → chunk-DC7ZWXH4.js} +4 -4
  120. package/dist/{chunk-WYW7USLQ.js.map → chunk-DC7ZWXH4.js.map} +1 -1
  121. package/dist/{chunk-52ETYODY.js → chunk-EUWKQJNI.js} +4 -4
  122. package/dist/{chunk-52ETYODY.js.map → chunk-EUWKQJNI.js.map} +1 -1
  123. package/dist/{chunk-OYP5CGHU.js → chunk-F2YLRVPH.js} +3 -3
  124. package/dist/{chunk-OYP5CGHU.js.map → chunk-F2YLRVPH.js.map} +1 -1
  125. package/dist/{chunk-3IHFA2X5.js → chunk-F4FCETQT.js} +3 -3
  126. package/dist/{chunk-3IHFA2X5.js.map → chunk-F4FCETQT.js.map} +1 -1
  127. package/dist/{chunk-VFYT2VWC.js → chunk-FSCIJ55A.js} +13 -4
  128. package/dist/chunk-FSCIJ55A.js.map +1 -0
  129. package/dist/{chunk-YKFGUVF7.js → chunk-HZYFU3PZ.js} +5 -4
  130. package/dist/chunk-HZYFU3PZ.js.map +1 -0
  131. package/dist/{chunk-KOMV5SEF.js → chunk-IJYJ23SB.js} +7 -6
  132. package/dist/chunk-IJYJ23SB.js.map +1 -0
  133. package/dist/{chunk-RO6KBURF.js → chunk-J2VJGXIX.js} +7 -6
  134. package/dist/chunk-J2VJGXIX.js.map +1 -0
  135. package/dist/{chunk-HBTIZWT2.js → chunk-LCDSHSP7.js} +3 -3
  136. package/dist/{chunk-HBTIZWT2.js.map → chunk-LCDSHSP7.js.map} +1 -1
  137. package/dist/{chunk-B5FDWE4U.js → chunk-LL3X2N7L.js} +4 -4
  138. package/dist/{chunk-B5FDWE4U.js.map → chunk-LL3X2N7L.js.map} +1 -1
  139. package/dist/{chunk-RSVAPXXI.js → chunk-LLQE4JAW.js} +23 -15
  140. package/dist/chunk-LLQE4JAW.js.map +1 -0
  141. package/dist/{chunk-54XX3YPP.js → chunk-LQGSMR3X.js} +8 -8
  142. package/dist/{chunk-54XX3YPP.js.map → chunk-LQGSMR3X.js.map} +1 -1
  143. package/dist/{chunk-L3X2H2RP.js → chunk-MFYX3DFH.js} +7 -7
  144. package/dist/{chunk-L3X2H2RP.js.map → chunk-MFYX3DFH.js.map} +1 -1
  145. package/dist/{chunk-YLSG4MEK.js → chunk-MHVR2OUR.js} +4 -4
  146. package/dist/{chunk-YLSG4MEK.js.map → chunk-MHVR2OUR.js.map} +1 -1
  147. package/dist/{chunk-DIVEHHMD.js → chunk-MOANE2YM.js} +3 -3
  148. package/dist/{chunk-DIVEHHMD.js.map → chunk-MOANE2YM.js.map} +1 -1
  149. package/dist/{chunk-XVNXXF67.js → chunk-MYJL5MGW.js} +3 -3
  150. package/dist/{chunk-XVNXXF67.js.map → chunk-MYJL5MGW.js.map} +1 -1
  151. package/dist/{chunk-IXUY5RMV.js → chunk-NJQC4Z73.js} +3 -3
  152. package/dist/{chunk-IXUY5RMV.js.map → chunk-NJQC4Z73.js.map} +1 -1
  153. package/dist/{chunk-25FWAL3O.js → chunk-NJWKVTQD.js} +4 -4
  154. package/dist/{chunk-25FWAL3O.js.map → chunk-NJWKVTQD.js.map} +1 -1
  155. package/dist/{chunk-UAY6LTWB.js → chunk-O6L3BZBB.js} +4 -4
  156. package/dist/{chunk-UAY6LTWB.js.map → chunk-O6L3BZBB.js.map} +1 -1
  157. package/dist/{chunk-JZ7BOB4G.js → chunk-ODF4CAF4.js} +4 -4
  158. package/dist/{chunk-JZ7BOB4G.js.map → chunk-ODF4CAF4.js.map} +1 -1
  159. package/dist/{chunk-ZGHRSRDO.js → chunk-OUW6WESU.js} +3 -2
  160. package/dist/chunk-OUW6WESU.js.map +1 -0
  161. package/dist/{chunk-R5MZV6KW.js → chunk-RYFIWQ6L.js} +4 -4
  162. package/dist/{chunk-R5MZV6KW.js.map → chunk-RYFIWQ6L.js.map} +1 -1
  163. package/dist/{chunk-5AFTFN72.js → chunk-SLXGP6KF.js} +3 -3
  164. package/dist/{chunk-5AFTFN72.js.map → chunk-SLXGP6KF.js.map} +1 -1
  165. package/dist/chunk-SP2OVEOB.js +14 -0
  166. package/dist/{chunk-4LVBS3VI.js.map → chunk-SP2OVEOB.js.map} +1 -1
  167. package/dist/{chunk-L2QUP6J3.js → chunk-UJKJROMG.js} +6 -6
  168. package/dist/{chunk-L2QUP6J3.js.map → chunk-UJKJROMG.js.map} +1 -1
  169. package/dist/{chunk-MISI3T6V.js → chunk-VPNKJFT7.js} +3 -3
  170. package/dist/{chunk-MISI3T6V.js.map → chunk-VPNKJFT7.js.map} +1 -1
  171. package/dist/{chunk-SDIQHTDG.js → chunk-VPPSRRGK.js} +19 -5
  172. package/dist/chunk-VPPSRRGK.js.map +1 -0
  173. package/dist/{chunk-3CYIB6BL.js → chunk-W3LADQOR.js} +3 -3
  174. package/dist/{chunk-3CYIB6BL.js.map → chunk-W3LADQOR.js.map} +1 -1
  175. package/dist/{chunk-HFISEQPK.js → chunk-WU5DIIHB.js} +8 -8
  176. package/dist/{chunk-HFISEQPK.js.map → chunk-WU5DIIHB.js.map} +1 -1
  177. package/dist/{chunk-WSXRUOI2.js → chunk-WV3B2FOG.js} +4 -4
  178. package/dist/{chunk-WSXRUOI2.js.map → chunk-WV3B2FOG.js.map} +1 -1
  179. package/dist/{chunk-L5K7VBOH.js → chunk-XON5AXAP.js} +3 -3
  180. package/dist/{chunk-L5K7VBOH.js.map → chunk-XON5AXAP.js.map} +1 -1
  181. package/dist/{chunk-J427UFSZ.js → chunk-YJAMQRFS.js} +5 -6
  182. package/dist/chunk-YJAMQRFS.js.map +1 -0
  183. package/dist/components/cart/index.js +1 -1
  184. package/dist/components/common/index.js +1 -1
  185. package/dist/components/drawer/index.js +17 -18
  186. package/dist/components/home/ReorderProducts.d.ts +7 -0
  187. package/dist/components/home/ReorderProducts.d.ts.map +1 -0
  188. package/dist/components/home/SquarePhotos.d.ts +2 -1
  189. package/dist/components/home/SquarePhotos.d.ts.map +1 -1
  190. package/dist/components/home/index.d.ts +2 -0
  191. package/dist/components/home/index.d.ts.map +1 -1
  192. package/dist/components/home/index.js +21 -22
  193. package/dist/components/home/reorder-hooks.d.ts +6 -0
  194. package/dist/components/home/reorder-hooks.d.ts.map +1 -0
  195. package/dist/components/layout/index.js +1 -1
  196. package/dist/components/product/AddToCartForm.d.ts.map +1 -1
  197. package/dist/components/product/ProductDetails.d.ts.map +1 -1
  198. package/dist/components/product/index.js +18 -19
  199. package/dist/components/snippets/AppsSnippets.d.ts +2 -0
  200. package/dist/components/snippets/AppsSnippets.d.ts.map +1 -1
  201. package/dist/components/store/index.js +19 -20
  202. package/dist/components/store/index.js.map +1 -1
  203. package/dist/components/toast/index.js +3 -4
  204. package/dist/components/toast/index.js.map +1 -1
  205. package/dist/document-class-SA4RND4Z.js +24 -0
  206. package/dist/{document-class-DOQDO2DN.js.map → document-class-SA4RND4Z.js.map} +1 -1
  207. package/dist/hooks/index.js +17 -18
  208. package/dist/hooks/useComments.js +2 -3
  209. package/dist/hooks/useCoupon.d.ts +0 -41
  210. package/dist/hooks/useCoupon.d.ts.map +1 -1
  211. package/dist/hooks/useCoupon.js +3 -1
  212. package/dist/hooks/useGtm.js +17 -18
  213. package/dist/hooks/useMoney.js +17 -18
  214. package/dist/hooks/useProduct.js +2 -3
  215. package/dist/hooks/useStore.js +17 -18
  216. package/dist/hooks/useUser.js +4 -5
  217. package/dist/hooks/useWishlist.d.ts.map +1 -1
  218. package/dist/hooks/useWishlist.js +3 -1
  219. package/dist/index.js +17 -18
  220. package/dist/index.js.map +1 -1
  221. package/dist/native-app/index.js +2 -3
  222. package/dist/navigation-KMDVLHXU.js +13 -0
  223. package/dist/{navigation-P3GZOWUU.js.map → navigation-KMDVLHXU.js.map} +1 -1
  224. package/dist/{navigation-TA3I3XEC.js → navigation-WEV6XJJT.js} +6 -5
  225. package/dist/navigation-WEV6XJJT.js.map +1 -0
  226. package/dist/{not-found-6B6QSJYA.js → not-found-LB6HMAJ5.js} +58 -33
  227. package/dist/not-found-LB6HMAJ5.js.map +1 -0
  228. package/dist/providers/NavigationProvider.d.ts +9 -0
  229. package/dist/providers/NavigationProvider.d.ts.map +1 -1
  230. package/dist/providers/index.js +17 -18
  231. package/dist/providers/twilight-init.d.ts.map +1 -1
  232. package/dist/router/route-ids.d.ts +1 -0
  233. package/dist/router/route-ids.d.ts.map +1 -1
  234. package/dist/routes/account/orders/single/OrderHeader.d.ts.map +1 -1
  235. package/dist/routes/account/orders.js +6 -7
  236. package/dist/routes/account.js +15 -16
  237. package/dist/routes/account.js.map +1 -1
  238. package/dist/routes/blog.js +10 -11
  239. package/dist/routes/blog.js.map +1 -1
  240. package/dist/routes/brands.js +6 -7
  241. package/dist/routes/brands.js.map +1 -1
  242. package/dist/routes/cart.js +25 -26
  243. package/dist/routes/cart.js.map +1 -1
  244. package/dist/routes/home/HomePage.d.ts.map +1 -1
  245. package/dist/routes/home.js +22 -23
  246. package/dist/routes/index.d.ts +1 -1
  247. package/dist/routes/index.d.ts.map +1 -1
  248. package/dist/routes/index.js +5 -4
  249. package/dist/routes/loyalty.js +7 -8
  250. package/dist/routes/loyalty.js.map +1 -1
  251. package/dist/routes/page.js +6 -7
  252. package/dist/routes/page.js.map +1 -1
  253. package/dist/routes/product/index.d.ts.map +1 -1
  254. package/dist/routes/product-listing/ProductListPage.d.ts.map +1 -1
  255. package/dist/routes/product-listing/loader.d.ts.map +1 -1
  256. package/dist/routes/product-listing/types.d.ts +1 -1
  257. package/dist/routes/product-listing/types.d.ts.map +1 -1
  258. package/dist/routes/product-listing.js +203 -183
  259. package/dist/routes/product-listing.js.map +1 -1
  260. package/dist/routes/product-short-link.d.ts +9 -5
  261. package/dist/routes/product-short-link.d.ts.map +1 -1
  262. package/dist/routes/product.js +22 -23
  263. package/dist/routes/product.js.map +1 -1
  264. package/dist/routes/root/beforeLoad.d.ts +28 -0
  265. package/dist/routes/root/beforeLoad.d.ts.map +1 -1
  266. package/dist/routes/seo-redirects.js +5 -4
  267. package/dist/routes/testimonials/ReviewsPage.d.ts +3 -0
  268. package/dist/routes/testimonials/ReviewsPage.d.ts.map +1 -0
  269. package/dist/routes/testimonials/index.d.ts +15 -3
  270. package/dist/routes/testimonials/index.d.ts.map +1 -1
  271. package/dist/routes/testimonials/loader.d.ts +3 -1
  272. package/dist/routes/testimonials/loader.d.ts.map +1 -1
  273. package/dist/routes/testimonials/types.d.ts +3 -0
  274. package/dist/routes/testimonials/types.d.ts.map +1 -1
  275. package/dist/routes/testimonials.js +38 -3
  276. package/dist/routes/testimonials.js.map +1 -1
  277. package/dist/routes/thank-you.js +6 -7
  278. package/dist/routes/thank-you.js.map +1 -1
  279. package/dist/skeleton.js +22 -23
  280. package/dist/tanstack/document-class.d.ts.map +1 -1
  281. package/dist/tanstack/middleware/twilight.d.ts.map +1 -1
  282. package/dist/tanstack/router.d.ts.map +1 -1
  283. package/dist/tanstack.js +16 -17
  284. package/dist/tanstack.js.map +1 -1
  285. package/dist/types/index.d.ts +3 -1
  286. package/dist/types/index.d.ts.map +1 -1
  287. package/dist/types/salla-sdk.d.ts +4 -0
  288. package/dist/types/salla-sdk.d.ts.map +1 -1
  289. package/dist/utils/cookies.d.ts +31 -0
  290. package/dist/utils/cookies.d.ts.map +1 -1
  291. package/dist/utils/index.js +4 -4
  292. package/dist/utils/sdk-events.d.ts +6 -0
  293. package/dist/utils/sdk-events.d.ts.map +1 -1
  294. package/dist/utils/theme-version.d.ts +0 -29
  295. package/dist/utils/theme-version.d.ts.map +1 -1
  296. package/dist/vite/adapters/tanstack.adapter.d.ts.map +1 -1
  297. package/dist/vite/index.js +60 -1
  298. package/dist/vite/index.js.map +1 -1
  299. package/package.json +1 -1
  300. package/dist/AddToCartForm-G2HK5QB3.js.map +0 -1
  301. package/dist/BlogAuthorPage-BU2LVISS.js.map +0 -1
  302. package/dist/BlogCategoryPage-UR4MPDLE.js.map +0 -1
  303. package/dist/BlogPage-E2XZGFOP.js.map +0 -1
  304. package/dist/BlogSinglePage-ZK2K6WEU.js.map +0 -1
  305. package/dist/BlogTagPage-5N4VTPDN.js.map +0 -1
  306. package/dist/BrandsPage-XE7RYGXA.js.map +0 -1
  307. package/dist/Breadcrumb-NX6BUSOA.js.map +0 -1
  308. package/dist/CartItem-SO34G6GZ.js.map +0 -1
  309. package/dist/CartSummary-SDTY2CR2.js.map +0 -1
  310. package/dist/CustomerLayout-UXX5KJWR.js.map +0 -1
  311. package/dist/LoyaltyPage-UMQ2ZWA6.js.map +0 -1
  312. package/dist/MainMenu-OFQDXUGW.js.map +0 -1
  313. package/dist/MobileMenu-7EKUQ4MU.js.map +0 -1
  314. package/dist/NotificationsPage-TBDOI7YB.js.map +0 -1
  315. package/dist/OrderSinglePage-7A37FKJE.js.map +0 -1
  316. package/dist/OrdersPage-NJ3JH6SG.js.map +0 -1
  317. package/dist/PageSingle-UKA2U3E5.js.map +0 -1
  318. package/dist/ProductDetails-XDNE62ZZ.js.map +0 -1
  319. package/dist/ProfilePage-WPJYGKYR.js.map +0 -1
  320. package/dist/SeoCartWidget-G7NAANUN.js.map +0 -1
  321. package/dist/SettingsPage-X7GPCBJL.js.map +0 -1
  322. package/dist/TestimonialsPage-JTUWHKPU.js.map +0 -1
  323. package/dist/ThankYouPage-MCMBGHO2.js.map +0 -1
  324. package/dist/WalletPage-JJI6WPNT.js.map +0 -1
  325. package/dist/WishlistPage-HAOYS7NV.js.map +0 -1
  326. package/dist/chunk-3YAR2SXQ.js.map +0 -1
  327. package/dist/chunk-4LVBS3VI.js +0 -14
  328. package/dist/chunk-5ZR2HKZ7.js +0 -14
  329. package/dist/chunk-5ZR2HKZ7.js.map +0 -1
  330. package/dist/chunk-BVSJPBJ6.js.map +0 -1
  331. package/dist/chunk-CMD3ARR2.js.map +0 -1
  332. package/dist/chunk-EXBH6RGD.js.map +0 -1
  333. package/dist/chunk-J427UFSZ.js.map +0 -1
  334. package/dist/chunk-KOMV5SEF.js.map +0 -1
  335. package/dist/chunk-LPQFTXBB.js +0 -203
  336. package/dist/chunk-LPQFTXBB.js.map +0 -1
  337. package/dist/chunk-QVJDYSCT.js +0 -166
  338. package/dist/chunk-QVJDYSCT.js.map +0 -1
  339. package/dist/chunk-RO6KBURF.js.map +0 -1
  340. package/dist/chunk-RSVAPXXI.js.map +0 -1
  341. package/dist/chunk-SDIQHTDG.js.map +0 -1
  342. package/dist/chunk-U53LIN2F.js.map +0 -1
  343. package/dist/chunk-VFYT2VWC.js.map +0 -1
  344. package/dist/chunk-YKFGUVF7.js.map +0 -1
  345. package/dist/chunk-ZGHRSRDO.js.map +0 -1
  346. package/dist/document-class-DOQDO2DN.js +0 -25
  347. package/dist/navigation-P3GZOWUU.js +0 -13
  348. package/dist/navigation-TA3I3XEC.js.map +0 -1
  349. package/dist/not-found-6B6QSJYA.js.map +0 -1
@@ -1,42 +1,42 @@
1
1
  import { sortOptions } from '../chunk-6Z4MOC4S.js';
2
- import { category } from '../chunk-YLSG4MEK.js';
3
- import { brand } from '../chunk-WSXRUOI2.js';
2
+ import { category } from '../chunk-MHVR2OUR.js';
3
+ import { brand } from '../chunk-WV3B2FOG.js';
4
4
  import { buildHreflangAlternates } from '../chunk-TZ3E5BN4.js';
5
- import { LazyTestimonials } from '../chunk-U53LIN2F.js';
6
- import '../chunk-3CYIB6BL.js';
7
- import { product } from '../chunk-VFYT2VWC.js';
5
+ import { useReorderButtons, LazyTestimonials } from '../chunk-2AFTZGJY.js';
6
+ import '../chunk-W3LADQOR.js';
7
+ import { product } from '../chunk-FSCIJ55A.js';
8
8
  import { Drawer } from '../chunk-6TKIUG5C.js';
9
- import { ProductCard } from '../chunk-54XX3YPP.js';
9
+ import { ProductCard } from '../chunk-LQGSMR3X.js';
10
10
  import '../chunk-342EPVXN.js';
11
- import { useStore } from '../chunk-CMD3ARR2.js';
12
- import '../chunk-L2QUP6J3.js';
11
+ import { useStore } from '../chunk-575U6BIW.js';
12
+ import '../chunk-UJKJROMG.js';
13
13
  import '../chunk-JKIRRMBU.js';
14
14
  import '../chunk-2JV6WZ6O.js';
15
- import '../chunk-OYP5CGHU.js';
15
+ import '../chunk-F2YLRVPH.js';
16
16
  import '../chunk-VVZNW5CB.js';
17
- import '../chunk-HBTIZWT2.js';
18
- import { notFound, useNavigate, useLocation } from '../chunk-SDIQHTDG.js';
19
- import { RouteId } from '../chunk-ZGHRSRDO.js';
20
- import '../chunk-DIVEHHMD.js';
17
+ import '../chunk-LCDSHSP7.js';
18
+ import { unauthorized, notFound, orThrow, useNavigate, useLocation } from '../chunk-VPPSRRGK.js';
19
+ import { RouteId } from '../chunk-OUW6WESU.js';
20
+ import '../chunk-MOANE2YM.js';
21
21
  import '../chunk-HI5V5X3S.js';
22
- import '../chunk-3EE62REP.js';
23
- import '../chunk-L5K7VBOH.js';
24
- import '../chunk-EXBH6RGD.js';
22
+ import '../chunk-3UMHUKMJ.js';
23
+ import '../chunk-XON5AXAP.js';
24
+ import { getAuthToken } from '../chunk-BP6LUZXJ.js';
25
25
  import '../chunk-MVT5AF2A.js';
26
26
  import '../chunk-Z653O7MX.js';
27
27
  import '../chunk-ZCH7W7DZ.js';
28
- import '../chunk-OGVUFMLX.js';
28
+ import '../chunk-7FDT2IFI.js';
29
29
  import '../chunk-JWXJPJBO.js';
30
30
  import '../chunk-CW625T2E.js';
31
31
  import '../chunk-7V36I5GT.js';
32
- import '../chunk-BVSJPBJ6.js';
33
- import '../chunk-RSVAPXXI.js';
32
+ import '../chunk-6WI7R2BD.js';
33
+ import '../chunk-LLQE4JAW.js';
34
34
  import '../chunk-OAMIDZKW.js';
35
35
  import { useTranslation } from '../chunk-TYNZ5B2B.js';
36
36
  import '../chunk-V2ZDTY6H.js';
37
37
  import { HookSlot } from '../chunk-5XDPAKF5.js';
38
38
  import '../chunk-GCPEMNSU.js';
39
- import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-IXUY5RMV.js';
39
+ import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-NJQC4Z73.js';
40
40
  import '../chunk-AXW67SY7.js';
41
41
  import '../chunk-SKLEJJ6M.js';
42
42
  import '../chunk-BYMOPN2S.js';
@@ -44,10 +44,9 @@ import '../chunk-6BZ5TKEV.js';
44
44
  import '../chunk-FZKRSGLP.js';
45
45
  import '../chunk-7V5HOZW4.js';
46
46
  import '../chunk-YA6ABQB7.js';
47
- import '../chunk-MISI3T6V.js';
48
- import '../chunk-3IHFA2X5.js';
49
- import { onSallaEvent } from '../chunk-QVJDYSCT.js';
50
- import '../chunk-LPQFTXBB.js';
47
+ import '../chunk-VPNKJFT7.js';
48
+ import '../chunk-F4FCETQT.js';
49
+ import { onSallaEvent } from '../chunk-4A5IAMNL.js';
51
50
  import { getTwilightContext } from '../chunk-N2S25NXP.js';
52
51
  import '../chunk-T72DAX7R.js';
53
52
  import { useTwilight } from '../chunk-DF6FBKDN.js';
@@ -66,17 +65,20 @@ var SOURCE_TO_API = {
66
65
  offers: "offers",
67
66
  search: "search",
68
67
  tags: "tags",
69
- brands: "brands"
68
+ brands: "brands",
69
+ reorder: "reorder"
70
70
  };
71
71
  var SOURCE_TITLE_KEY = {
72
72
  latest: "blocks.home.latest_products",
73
73
  sales: "common.titles.most_sales",
74
- offers: "common.titles.discounts"
74
+ offers: "common.titles.discounts",
75
+ reorder: "pages.orders.repurchase"
75
76
  };
76
77
  var SOURCE_SLUG = {
77
78
  latest: "latest-products",
78
79
  sales: "most-sales-products",
79
- offers: "offers"
80
+ offers: "offers",
81
+ reorder: "products?source=reorder"
80
82
  };
81
83
  async function productListLoader(ctx) {
82
84
  const { params, search } = ctx;
@@ -100,7 +102,8 @@ async function productListLoader(ctx) {
100
102
  if (sourceType === "brands" && params.id) {
101
103
  return loadBrandProducts(params.id, cursor, sort);
102
104
  }
103
- if (sourceType === "latest" || sourceType === "sales" || sourceType === "offers") {
105
+ if (sourceType === "reorder" && !getAuthToken()) throw unauthorized();
106
+ if (sourceType in SOURCE_TITLE_KEY) {
104
107
  return loadStaticProducts(
105
108
  sourceType,
106
109
  params.title ?? "",
@@ -198,17 +201,20 @@ async function loadSearchProducts(keyword, cursor, sort) {
198
201
  }
199
202
  async function loadTagProducts(id, cursor, sort) {
200
203
  const { queryClient, i18n } = getTwilightContext();
201
- const productsResult = await queryClient.fetchQuery(
202
- product.queries.list({
203
- source: "tags",
204
- sourceValue: id,
205
- cursor,
206
- sort
207
- })
208
- );
209
- const tagFromProduct = productsResult.items[0]?.tags?.find((t) => String(t.id) === id);
210
- if (!tagFromProduct) throw notFound();
211
- const tag = { id: Number(tagFromProduct.id), name: tagFromProduct.name, url: tagFromProduct.url };
204
+ const [tagData, productsResult] = await Promise.all([
205
+ orThrow(queryClient.fetchQuery(product.queries.tag(id))),
206
+ queryClient.fetchQuery(
207
+ product.queries.list({
208
+ source: "tags",
209
+ sourceValue: id,
210
+ cursor,
211
+ sort
212
+ })
213
+ )
214
+ ]);
215
+ if (!tagData) throw notFound();
216
+ const tagUrl = productsResult.items[0]?.tags?.find((t) => String(t.id) === id)?.url ?? "";
217
+ const tag = { id: Number(tagData.id), name: tagData.name, url: tagUrl };
212
218
  return {
213
219
  page: {
214
220
  slug: RouteId.PRODUCT_INDEX_TAG,
@@ -216,7 +222,8 @@ async function loadTagProducts(id, cursor, sort) {
216
222
  title: tag.name,
217
223
  breadcrumbs: [
218
224
  { name: i18n.t("common.titles.home"), url: "/" },
219
- { name: tag.name, url: tag.url }
225
+ // Laravel's own `tags/{id}` route, for when the listed tags carry no URL.
226
+ { name: tag.name, url: tag.url || `/tags/${id}` }
220
227
  ]
221
228
  },
222
229
  source: { type: "tags", value: id, entity: tag },
@@ -268,19 +275,22 @@ async function loadBrandProducts(id, cursor, sort) {
268
275
  var SOURCE_ROUTE_ID = {
269
276
  latest: RouteId.PRODUCT_INDEX_LATEST,
270
277
  sales: RouteId.PRODUCT_INDEX_SALES,
271
- offers: RouteId.PRODUCT_INDEX_OFFERS
278
+ offers: RouteId.PRODUCT_INDEX_OFFERS,
279
+ reorder: RouteId.PRODUCT_INDEX
272
280
  };
273
281
  async function loadStaticProducts(source, title, slug, cursor, sort) {
274
282
  const { queryClient, i18n } = getTwilightContext();
275
283
  const resolvedTitle = title || i18n.t(SOURCE_TITLE_KEY[source]);
276
284
  const resolvedSlug = slug || SOURCE_SLUG[source];
277
- const productsResult = await queryClient.fetchQuery(
278
- product.queries.list({
285
+ const productsResult = await queryClient.fetchQuery({
286
+ ...product.queries.list({
279
287
  source: SOURCE_TO_API[source],
280
288
  cursor,
281
289
  sort
282
- })
283
- );
290
+ }),
291
+ // The reorder key names no customer, so a cached list could be another session's.
292
+ ...source === "reorder" && { staleTime: 0 }
293
+ });
284
294
  return {
285
295
  page: {
286
296
  slug: SOURCE_ROUTE_ID[source],
@@ -379,6 +389,8 @@ function ProductListPage({
379
389
  const showFilters = query.filters && store?.settings?.product?.filters;
380
390
  const isBrand = source.type === "brands";
381
391
  const brand2 = isBrand ? source.entity : null;
392
+ const isReorder = source.type === "reorder";
393
+ useReorderButtons(isReorder);
382
394
  const sortOptionsWithTrans = useMemo(() => sortOptions(selectedSort, t), [selectedSort, t]);
383
395
  const location = useLocation();
384
396
  const {
@@ -425,160 +437,168 @@ function ProductListPage({
425
437
  nextCursorRef.current = result.next;
426
438
  return result;
427
439
  }, [source.type, source.value, selectedSort, appliedFilters]);
428
- return /* @__PURE__ */ jsxs("div", { className: "container px-2.5 ms:px-5 mb-10", children: [
429
- theme?.settings?.product_index_show_breadcrumbs !== false && /* @__PURE__ */ jsx(LazyBreadcrumb, { page }),
430
- isBrand && brand2 && /* @__PURE__ */ jsxs(Fragment, { children: [
431
- /* @__PURE__ */ jsx(
432
- Image,
433
- {
434
- width: 1200,
435
- height: 300,
436
- className: "w-full max-h-[300px] object-cover rounded-md bg-gray-100",
437
- src: brand2.banner || void 0,
438
- alt: brand2.name,
439
- priority: true
440
- }
441
- ),
442
- /* @__PURE__ */ jsxs("header", { className: "flex flex-col md:flex-row items-center md:items-start text-center rtl:md:text-right ltr:md:text-left mt-2 mb-8", children: [
443
- /* @__PURE__ */ jsx(
444
- Image,
445
- {
446
- className: "rounded-md w-40 h-24 object-contain shadow-md p-4 bg-white shrink-0",
447
- src: brand2.logo || void 0,
448
- alt: brand2.name,
449
- aspectRatio: "5/3"
450
- }
451
- ),
452
- /* @__PURE__ */ jsxs("div", { className: "px-5 pt-3 rtl:text-right", children: [
453
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-1", children: brand2.name }),
454
- brand2.description && /* @__PURE__ */ jsx(
455
- "p",
440
+ return /* @__PURE__ */ jsxs(
441
+ "div",
442
+ {
443
+ className: "container px-2.5 ms:px-5 mb-10",
444
+ "data-source": isReorder ? "reorder" : void 0,
445
+ children: [
446
+ theme?.settings?.product_index_show_breadcrumbs !== false && /* @__PURE__ */ jsx(LazyBreadcrumb, { page }),
447
+ isBrand && brand2 && /* @__PURE__ */ jsxs(Fragment, { children: [
448
+ /* @__PURE__ */ jsx(
449
+ Image,
456
450
  {
457
- className: "text-base text-gray-500 font-medium",
458
- dangerouslySetInnerHTML: { __html: brand2.description }
451
+ width: 1200,
452
+ height: 300,
453
+ className: "w-full max-h-[300px] object-cover rounded-md bg-gray-100",
454
+ src: brand2.banner || void 0,
455
+ alt: brand2.name,
456
+ priority: true
459
457
  }
460
- )
461
- ] })
462
- ] })
463
- ] }),
464
- /* @__PURE__ */ jsx(HookSlot, { name: "product:list.start" }),
465
- /* @__PURE__ */ jsxs("div", { className: showFilters ? "md:grid md:grid-cols-[288px_1fr] gap-8" : "", children: [
466
- showFilters && /* @__PURE__ */ jsx(
467
- SallaFilters,
468
- {
469
- id: "filters-menu",
470
- className: "hidden md:block lg:sticky lg:top-20",
471
- filters
472
- }
473
- ),
474
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
475
- /* @__PURE__ */ jsxs("div", { className: "mb-4 sm:mb-6 flex justify-between items-center", children: [
476
- /* @__PURE__ */ jsx("h1", { className: "font-bold text-xl rtl:pl-3 ltr:pr-3", id: "page-main-title", children: isBrand ? t("common.titles.products") : page.title }),
477
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 rtl:space-x-reverse", children: [
478
- showFilters && /* @__PURE__ */ jsx(
479
- "button",
458
+ ),
459
+ /* @__PURE__ */ jsxs("header", { className: "flex flex-col md:flex-row items-center md:items-start text-center rtl:md:text-right ltr:md:text-left mt-2 mb-8", children: [
460
+ /* @__PURE__ */ jsx(
461
+ Image,
480
462
  {
481
- type: "button",
482
- onClick: () => setFiltersOpen(true),
483
- className: "filters-trigger bg-border-color text-primary lg:hidden p-2 rounded",
484
- children: /* @__PURE__ */ jsx("i", { className: "sicon-filter text-gray-text text-2xl" })
463
+ className: "rounded-md w-40 h-24 object-contain shadow-md p-4 bg-white shrink-0",
464
+ src: brand2.logo || void 0,
465
+ alt: brand2.name,
466
+ aspectRatio: "5/3"
485
467
  }
486
468
  ),
487
- sortOptionsWithTrans.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
488
- /* @__PURE__ */ jsx(
489
- "label",
490
- {
491
- className: "hidden sm:block rtl:ml-3 ltr:mr-3 whitespace-nowrap",
492
- htmlFor: "product-sort",
493
- children: t("pages.categories.sorting", "Sort By")
494
- }
495
- ),
496
- /* @__PURE__ */ jsx(
497
- "select",
469
+ /* @__PURE__ */ jsxs("div", { className: "px-5 pt-3 rtl:text-right", children: [
470
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-1", children: brand2.name }),
471
+ brand2.description && /* @__PURE__ */ jsx(
472
+ "p",
498
473
  {
499
- id: "product-sort",
500
- className: "form-input pt-0 pb-1 rtl:md:pl-10 ltr:md:pr-10",
501
- value: selectedSort,
502
- onChange: handleSortChange,
503
- children: sortOptionsWithTrans.map((option) => /* @__PURE__ */ jsx("option", { value: option.id, children: option.name }, option.id))
474
+ className: "text-base text-gray-500 font-medium",
475
+ dangerouslySetInnerHTML: { __html: brand2.description }
504
476
  }
505
477
  )
506
478
  ] })
507
479
  ] })
508
480
  ] }),
509
- /* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.start" }),
510
- /* @__PURE__ */ jsx(
511
- "div",
512
- {
513
- className: `flex min-h-screen${filterStatus === "loading" ? " opacity-60" : ""}`,
514
- "aria-busy": filterStatus === "loading",
515
- children: filterStatus === "error" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 flex flex-col items-center", children: [
516
- /* @__PURE__ */ jsx(
517
- LazyNoContent,
518
- {
519
- icon: "sicon-shopping-bag",
520
- message: t("common.errors.error_occurred", "Something went wrong")
521
- }
522
- ),
523
- /* @__PURE__ */ jsx("button", { type: "button", className: "link--primary mt-4", onClick: retryFilters, children: t("common.elements.try_again", "Try again") })
524
- ] }) : /* @__PURE__ */ jsx(
525
- ItemsList,
526
- {
527
- resetKey: `${listKey}-${selectedSort}${filteredKey}`,
528
- items: shownProducts,
529
- loader,
530
- mode: shownNext ? "infinite" : "static",
531
- pageUrl: location.pathname + location.searchStr,
532
- className: "s-products-list flex-1 min-w-0",
533
- itemsClassName: `s-products-list-wrapper s-products-list-vertical-cards${showFilters ? " s-products-list-with-filters" : ""}`,
534
- skeleton: /* @__PURE__ */ jsx(ProductCardSkeleton, {}),
535
- skeletonType: "item",
536
- skeletonCount: 12,
537
- empty: /* @__PURE__ */ jsx(
538
- LazyNoContent,
481
+ /* @__PURE__ */ jsx(HookSlot, { name: "product:list.start" }),
482
+ /* @__PURE__ */ jsxs("div", { className: showFilters ? "md:grid md:grid-cols-[288px_1fr] gap-8" : "", children: [
483
+ showFilters && /* @__PURE__ */ jsx(
484
+ SallaFilters,
485
+ {
486
+ id: "filters-menu",
487
+ className: "hidden md:block lg:sticky lg:top-20",
488
+ filters
489
+ }
490
+ ),
491
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
492
+ /* @__PURE__ */ jsxs("div", { className: "mb-4 sm:mb-6 flex justify-between items-center", children: [
493
+ /* @__PURE__ */ jsx("h1", { className: "font-bold text-xl rtl:pl-3 ltr:pr-3", id: "page-main-title", children: isBrand ? t("common.titles.products") : page.title }),
494
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 rtl:space-x-reverse", children: [
495
+ showFilters && /* @__PURE__ */ jsx(
496
+ "button",
539
497
  {
540
- icon: "sicon-shopping-bag",
541
- message: t(
542
- "pages.categories.no_products",
543
- "No products found in this category"
544
- )
498
+ type: "button",
499
+ onClick: () => setFiltersOpen(true),
500
+ className: "filters-trigger bg-border-color text-primary lg:hidden p-2 rounded",
501
+ children: /* @__PURE__ */ jsx("i", { className: "sicon-filter text-gray-text text-2xl" })
545
502
  }
546
503
  ),
547
- t: (key, fallback) => t(key, fallback || key),
548
- children: (items) => items.map((prod, idx) => /* @__PURE__ */ jsx(
549
- ProductCard,
504
+ sortOptionsWithTrans.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
505
+ /* @__PURE__ */ jsx(
506
+ "label",
507
+ {
508
+ className: "hidden sm:block rtl:ml-3 ltr:mr-3 whitespace-nowrap",
509
+ htmlFor: "product-sort",
510
+ children: t("pages.categories.sorting", "Sort By")
511
+ }
512
+ ),
513
+ /* @__PURE__ */ jsx(
514
+ "select",
515
+ {
516
+ id: "product-sort",
517
+ className: "form-input pt-0 pb-1 rtl:md:pl-10 ltr:md:pr-10",
518
+ value: selectedSort,
519
+ onChange: handleSortChange,
520
+ children: sortOptionsWithTrans.map((option) => /* @__PURE__ */ jsx("option", { value: option.id, children: option.name }, option.id))
521
+ }
522
+ )
523
+ ] })
524
+ ] })
525
+ ] }),
526
+ /* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.start" }),
527
+ /* @__PURE__ */ jsx(
528
+ "div",
529
+ {
530
+ className: `flex min-h-screen${filterStatus === "loading" ? " opacity-60" : ""}`,
531
+ "aria-busy": filterStatus === "loading",
532
+ children: filterStatus === "error" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 flex flex-col items-center", children: [
533
+ /* @__PURE__ */ jsx(
534
+ LazyNoContent,
535
+ {
536
+ icon: "sicon-shopping-bag",
537
+ message: t("common.errors.error_occurred", "Something went wrong")
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsx("button", { type: "button", className: "link--primary mt-4", onClick: retryFilters, children: t("common.elements.try_again", "Try again") })
541
+ ] }) : /* @__PURE__ */ jsx(
542
+ ItemsList,
550
543
  {
551
- product: prod,
552
- index: idx,
553
- sizes: showFilters ? FILTERED_PRODUCT_IMAGE_SIZES : void 0
544
+ resetKey: `${listKey}-${selectedSort}${filteredKey}`,
545
+ items: shownProducts,
546
+ loader,
547
+ mode: shownNext ? "infinite" : "static",
548
+ pageUrl: location.pathname + location.searchStr,
549
+ className: "s-products-list flex-1 min-w-0",
550
+ itemsClassName: `s-products-list-wrapper s-products-list-vertical-cards${showFilters ? " s-products-list-with-filters" : ""}`,
551
+ skeleton: /* @__PURE__ */ jsx(ProductCardSkeleton, {}),
552
+ skeletonType: "item",
553
+ skeletonCount: 12,
554
+ empty: /* @__PURE__ */ jsx(
555
+ LazyNoContent,
556
+ {
557
+ icon: "sicon-shopping-bag",
558
+ message: t(
559
+ "pages.categories.no_products",
560
+ "No products found in this category"
561
+ )
562
+ }
563
+ ),
564
+ t: (key, fallback) => t(key, fallback || key),
565
+ children: (items) => items.map((prod, idx) => /* @__PURE__ */ jsx(
566
+ ProductCard,
567
+ {
568
+ product: prod,
569
+ index: idx,
570
+ sizes: showFilters ? FILTERED_PRODUCT_IMAGE_SIZES : void 0
571
+ },
572
+ prod.id
573
+ ))
554
574
  },
555
- prod.id
556
- ))
557
- },
558
- `${listKey}-${selectedSort}${filteredKey}`
575
+ `${listKey}-${selectedSort}${filteredKey}`
576
+ )
577
+ }
578
+ ),
579
+ /* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.end" })
580
+ ] })
581
+ ] }),
582
+ showFilters && /* @__PURE__ */ jsx(Drawer, { isOpen: filtersOpen, onClose: () => setFiltersOpen(false), size: "md", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
583
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-4", children: [
584
+ /* @__PURE__ */ jsx("h3", { className: "font-bold text-lg", children: t("pages.categories.filters", "Filters") }),
585
+ /* @__PURE__ */ jsx(
586
+ "button",
587
+ {
588
+ type: "button",
589
+ onClick: () => setFiltersOpen(false),
590
+ className: "btn--close-sm sicon-cancel text-gray-500"
591
+ }
559
592
  )
560
- }
561
- ),
562
- /* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.end" })
563
- ] })
564
- ] }),
565
- showFilters && /* @__PURE__ */ jsx(Drawer, { isOpen: filtersOpen, onClose: () => setFiltersOpen(false), size: "md", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
566
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-4", children: [
567
- /* @__PURE__ */ jsx("h3", { className: "font-bold text-lg", children: t("pages.categories.filters", "Filters") }),
568
- /* @__PURE__ */ jsx(
569
- "button",
570
- {
571
- type: "button",
572
- onClick: () => setFiltersOpen(false),
573
- className: "btn--close-sm sicon-cancel text-gray-500"
574
- }
575
- )
576
- ] }),
577
- /* @__PURE__ */ jsx(SallaFilters, { id: "filters-menu-mobile", filters })
578
- ] }) }),
579
- source.type === "categories" && store?.settings?.category?.testimonial_enabled && /* @__PURE__ */ jsx(LazyRenderWhenVisible, { placeholder: /* @__PURE__ */ jsx(ReviewItemSkeleton, {}), children: /* @__PURE__ */ jsx(LazyTestimonials, { data: {} }) }),
580
- /* @__PURE__ */ jsx(HookSlot, { name: "product:list.end" })
581
- ] }, listKey);
593
+ ] }),
594
+ /* @__PURE__ */ jsx(SallaFilters, { id: "filters-menu-mobile", filters })
595
+ ] }) }),
596
+ source.type === "categories" && store?.settings?.category?.testimonial_enabled && /* @__PURE__ */ jsx(LazyRenderWhenVisible, { placeholder: /* @__PURE__ */ jsx(ReviewItemSkeleton, {}), children: /* @__PURE__ */ jsx(LazyTestimonials, { data: {} }) }),
597
+ /* @__PURE__ */ jsx(HookSlot, { name: "product:list.end" })
598
+ ]
599
+ },
600
+ listKey
601
+ );
582
602
  }
583
603
 
584
604
  // src/routes/product-listing/index.tsx
@@ -586,7 +606,7 @@ function head(ctx, data) {
586
606
  const entity = data.source.entity;
587
607
  const category2 = data.source.type === "categories" ? entity : void 0;
588
608
  const tag = data.source.type === "tags" ? entity : void 0;
589
- const canonical = category2?.url ?? tag?.url;
609
+ const canonical = category2?.url ?? (tag?.url || void 0);
590
610
  const title = category2?.name ?? tag?.name ?? data.page.title;
591
611
  const image = category2?.image ?? void 0;
592
612
  const storeName = ctx.settings?.store?.name;