@salla.sa/twilight-theme-engine 1.0.156 → 1.0.157

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 (257) hide show
  1. package/dist/{AddToCartForm-ZZ3ZUJGV.js → AddToCartForm-EZBTZ3B7.js} +3 -3
  2. package/dist/{AddToCartForm-ZZ3ZUJGV.js.map → AddToCartForm-EZBTZ3B7.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-UVSSXU6C.js → BlogAuthorPage-MKYARWYL.js} +27 -27
  4. package/dist/{BlogAuthorPage-UVSSXU6C.js.map → BlogAuthorPage-MKYARWYL.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-CNHINM4X.js → BlogCategoryPage-RGW55K6V.js} +27 -27
  6. package/dist/{BlogCategoryPage-CNHINM4X.js.map → BlogCategoryPage-RGW55K6V.js.map} +1 -1
  7. package/dist/{BlogPage-LN3INU2Y.js → BlogPage-3DNO4J33.js} +25 -25
  8. package/dist/{BlogPage-LN3INU2Y.js.map → BlogPage-3DNO4J33.js.map} +1 -1
  9. package/dist/{BlogSinglePage-HTHMYW77.js → BlogSinglePage-6MHVC5DS.js} +25 -25
  10. package/dist/{BlogSinglePage-HTHMYW77.js.map → BlogSinglePage-6MHVC5DS.js.map} +1 -1
  11. package/dist/{BlogTagPage-BRJ5DEJP.js → BlogTagPage-VR7KJYBW.js} +27 -27
  12. package/dist/{BlogTagPage-BRJ5DEJP.js.map → BlogTagPage-VR7KJYBW.js.map} +1 -1
  13. package/dist/{BrandsPage-U7AD2SBD.js → BrandsPage-N4ZLUT25.js} +26 -26
  14. package/dist/{BrandsPage-U7AD2SBD.js.map → BrandsPage-N4ZLUT25.js.map} +1 -1
  15. package/dist/{Breadcrumb-HYDFZOEE.js → Breadcrumb-SKYU5LTC.js} +25 -25
  16. package/dist/{Breadcrumb-HYDFZOEE.js.map → Breadcrumb-SKYU5LTC.js.map} +1 -1
  17. package/dist/{CartItem-FNXY3EYK.js → CartItem-7EYWYL5G.js} +25 -25
  18. package/dist/{CartItem-FNXY3EYK.js.map → CartItem-7EYWYL5G.js.map} +1 -1
  19. package/dist/{CartSummary-34YKGF2J.js → CartSummary-NTIULTCW.js} +25 -25
  20. package/dist/{CartSummary-34YKGF2J.js.map → CartSummary-NTIULTCW.js.map} +1 -1
  21. package/dist/{Copyright-Y7TC3GTZ.js → Copyright-CDKA4EMA.js} +3 -3
  22. package/dist/{Copyright-Y7TC3GTZ.js.map → Copyright-CDKA4EMA.js.map} +1 -1
  23. package/dist/{CustomerLayout-DO37UQR2.js → CustomerLayout-2CR6DTNL.js} +25 -25
  24. package/dist/{CustomerLayout-DO37UQR2.js.map → CustomerLayout-2CR6DTNL.js.map} +1 -1
  25. package/dist/{Footer-ZYMJZ7JY.js → Footer-H5IGQ4XE.js} +4 -4
  26. package/dist/{Footer-ZYMJZ7JY.js.map → Footer-H5IGQ4XE.js.map} +1 -1
  27. package/dist/{Header-RJBZ4QFK.js → Header-SMZTEZE7.js} +11 -11
  28. package/dist/{Header-RJBZ4QFK.js.map → Header-SMZTEZE7.js.map} +1 -1
  29. package/dist/{LatestProducts-2F74EUZJ.js → LatestProducts-5AZGNQD3.js} +27 -27
  30. package/dist/{LatestProducts-2F74EUZJ.js.map → LatestProducts-5AZGNQD3.js.map} +1 -1
  31. package/dist/{LoyaltyPage-KYA6H2MG.js → LoyaltyPage-35IRDKWX.js} +25 -25
  32. package/dist/{LoyaltyPage-KYA6H2MG.js.map → LoyaltyPage-35IRDKWX.js.map} +1 -1
  33. package/dist/{LoyaltyPointsPage-U6YTI23M.js → LoyaltyPointsPage-2NSTTKWX.js} +8 -8
  34. package/dist/{LoyaltyPointsPage-U6YTI23M.js.map → LoyaltyPointsPage-2NSTTKWX.js.map} +1 -1
  35. package/dist/{MainMenu-U32JQ3GC.js → MainMenu-RZ4WI2WH.js} +7 -7
  36. package/dist/{MainMenu-U32JQ3GC.js.map → MainMenu-RZ4WI2WH.js.map} +1 -1
  37. package/dist/{MasterLayout-QY3KNEKC.js → MasterLayout-7HZ2ENBI.js} +25 -25
  38. package/dist/{MasterLayout-QY3KNEKC.js.map → MasterLayout-7HZ2ENBI.js.map} +1 -1
  39. package/dist/{MobileMenu-2ZJW3LAS.js → MobileMenu-QCY7ZS42.js} +26 -26
  40. package/dist/{MobileMenu-2ZJW3LAS.js.map → MobileMenu-QCY7ZS42.js.map} +1 -1
  41. package/dist/{NotificationsPage-24A6MYXR.js → NotificationsPage-ZDJM4WBE.js} +25 -25
  42. package/dist/{NotificationsPage-24A6MYXR.js.map → NotificationsPage-ZDJM4WBE.js.map} +1 -1
  43. package/dist/{OrderSinglePage-5STOD3GD.js → OrderSinglePage-KEME65L6.js} +26 -26
  44. package/dist/{OrderSinglePage-5STOD3GD.js.map → OrderSinglePage-KEME65L6.js.map} +1 -1
  45. package/dist/{OrdersPage-OTAKK5XU.js → OrdersPage-QJ4XAOUS.js} +25 -25
  46. package/dist/{OrdersPage-OTAKK5XU.js.map → OrdersPage-QJ4XAOUS.js.map} +1 -1
  47. package/dist/{PageSingle-26O527KW.js → PageSingle-764IZP2N.js} +6 -6
  48. package/dist/{PageSingle-26O527KW.js.map → PageSingle-764IZP2N.js.map} +1 -1
  49. package/dist/{ProductDetails-KRCEXT73.js → ProductDetails-ISC73QBQ.js} +7 -7
  50. package/dist/{ProductDetails-KRCEXT73.js.map → ProductDetails-ISC73QBQ.js.map} +1 -1
  51. package/dist/{ProfilePage-DMSJGIT6.js → ProfilePage-DZEJZ5K2.js} +25 -25
  52. package/dist/{ProfilePage-DMSJGIT6.js.map → ProfilePage-DZEJZ5K2.js.map} +1 -1
  53. package/dist/{ReviewsPage-U57L2T56.js → ReviewsPage-WRQFDJL6.js} +3 -3
  54. package/dist/{ReviewsPage-U57L2T56.js.map → ReviewsPage-WRQFDJL6.js.map} +1 -1
  55. package/dist/{SeoCartWidget-HCTH66JO.js → SeoCartWidget-AL2MNWF4.js} +25 -25
  56. package/dist/{SeoCartWidget-HCTH66JO.js.map → SeoCartWidget-AL2MNWF4.js.map} +1 -1
  57. package/dist/{SettingsPage-Y5NNZ5CW.js → SettingsPage-MWY4X26Y.js} +25 -25
  58. package/dist/{SettingsPage-Y5NNZ5CW.js.map → SettingsPage-MWY4X26Y.js.map} +1 -1
  59. package/dist/{StoreClosedNotification-2BCJA4RU.js → StoreClosedNotification-ZT7HNX4O.js} +26 -26
  60. package/dist/{StoreClosedNotification-2BCJA4RU.js.map → StoreClosedNotification-ZT7HNX4O.js.map} +1 -1
  61. package/dist/{TestimonialsPage-ZMJBCHLA.js → TestimonialsPage-AYMTOENI.js} +6 -6
  62. package/dist/{TestimonialsPage-ZMJBCHLA.js.map → TestimonialsPage-AYMTOENI.js.map} +1 -1
  63. package/dist/{ThankYouPage-6UMLQYW2.js → ThankYouPage-EEOD7PKW.js} +25 -25
  64. package/dist/{ThankYouPage-6UMLQYW2.js.map → ThankYouPage-EEOD7PKW.js.map} +1 -1
  65. package/dist/{WalletPage-6XQMK5N6.js → WalletPage-ZK7TH2KC.js} +26 -26
  66. package/dist/{WalletPage-6XQMK5N6.js.map → WalletPage-ZK7TH2KC.js.map} +1 -1
  67. package/dist/{WebMcpTools-UHGSRKAS.js → WebMcpTools-IOY5SM5G.js} +9 -9
  68. package/dist/{WebMcpTools-UHGSRKAS.js.map → WebMcpTools-IOY5SM5G.js.map} +1 -1
  69. package/dist/{WishlistPage-5I5PUD6P.js → WishlistPage-PHJQUNFK.js} +27 -27
  70. package/dist/{WishlistPage-5I5PUD6P.js.map → WishlistPage-PHJQUNFK.js.map} +1 -1
  71. package/dist/api/advertisement.js +4 -4
  72. package/dist/api/apps.js +4 -4
  73. package/dist/api/blog.js +6 -6
  74. package/dist/api/brands.js +6 -6
  75. package/dist/api/cart.js +6 -6
  76. package/dist/api/category.js +6 -6
  77. package/dist/api/client.js +3 -3
  78. package/dist/api/home.js +4 -4
  79. package/dist/api/loyalty.js +6 -6
  80. package/dist/api/menu.js +4 -4
  81. package/dist/api/notification.js +4 -4
  82. package/dist/api/order.js +6 -6
  83. package/dist/api/page.js +6 -6
  84. package/dist/api/product.js +6 -6
  85. package/dist/api/profile.js +3 -3
  86. package/dist/api/store.js +5 -5
  87. package/dist/api/translations.js +4 -4
  88. package/dist/api/user.js +4 -4
  89. package/dist/api/wallet.js +4 -4
  90. package/dist/api/wishlist.js +7 -7
  91. package/dist/{chunk-J5OC5Y6R.js → chunk-22MU63B3.js} +4 -4
  92. package/dist/{chunk-J5OC5Y6R.js.map → chunk-22MU63B3.js.map} +1 -1
  93. package/dist/{chunk-XGFCR5JD.js → chunk-2ES4KKNM.js} +4 -4
  94. package/dist/{chunk-XGFCR5JD.js.map → chunk-2ES4KKNM.js.map} +1 -1
  95. package/dist/{chunk-REBJQRQF.js → chunk-3VII4U2I.js} +3 -3
  96. package/dist/{chunk-REBJQRQF.js.map → chunk-3VII4U2I.js.map} +1 -1
  97. package/dist/{chunk-WPDGL5GT.js → chunk-3XWB4KR6.js} +4 -4
  98. package/dist/{chunk-WPDGL5GT.js.map → chunk-3XWB4KR6.js.map} +1 -1
  99. package/dist/{chunk-EEL6OYAQ.js → chunk-3Y6HAX72.js} +3 -3
  100. package/dist/{chunk-EEL6OYAQ.js.map → chunk-3Y6HAX72.js.map} +1 -1
  101. package/dist/{chunk-PPUV27YN.js → chunk-4B75V3OU.js} +3 -3
  102. package/dist/{chunk-PPUV27YN.js.map → chunk-4B75V3OU.js.map} +1 -1
  103. package/dist/{chunk-SW2TZNHK.js → chunk-56MUKMAH.js} +3 -3
  104. package/dist/{chunk-SW2TZNHK.js.map → chunk-56MUKMAH.js.map} +1 -1
  105. package/dist/{chunk-UECXF2HJ.js → chunk-6A6C2AMC.js} +7 -7
  106. package/dist/{chunk-UECXF2HJ.js.map → chunk-6A6C2AMC.js.map} +1 -1
  107. package/dist/{chunk-LFMCUQQ3.js → chunk-AHR2RGKC.js} +3 -3
  108. package/dist/{chunk-LFMCUQQ3.js.map → chunk-AHR2RGKC.js.map} +1 -1
  109. package/dist/{chunk-RH6XA7QJ.js → chunk-B2KFXLA4.js} +5 -5
  110. package/dist/{chunk-RH6XA7QJ.js.map → chunk-B2KFXLA4.js.map} +1 -1
  111. package/dist/{chunk-K2O3RKPW.js → chunk-BGBZXKRA.js} +6 -6
  112. package/dist/{chunk-K2O3RKPW.js.map → chunk-BGBZXKRA.js.map} +1 -1
  113. package/dist/{chunk-CCMZUF7C.js → chunk-BUYOH3KR.js} +4 -4
  114. package/dist/{chunk-CCMZUF7C.js.map → chunk-BUYOH3KR.js.map} +1 -1
  115. package/dist/{chunk-HASB25DK.js → chunk-BYSW626W.js} +5 -5
  116. package/dist/{chunk-HASB25DK.js.map → chunk-BYSW626W.js.map} +1 -1
  117. package/dist/{chunk-VU6BFW6N.js → chunk-C5ZVACBI.js} +6 -6
  118. package/dist/{chunk-VU6BFW6N.js.map → chunk-C5ZVACBI.js.map} +1 -1
  119. package/dist/{chunk-4WQIZ6J4.js → chunk-CLBUKYD5.js} +5 -5
  120. package/dist/{chunk-4WQIZ6J4.js.map → chunk-CLBUKYD5.js.map} +1 -1
  121. package/dist/{chunk-CLGWNUMG.js → chunk-CZUHI5CR.js} +22 -22
  122. package/dist/{chunk-CLGWNUMG.js.map → chunk-CZUHI5CR.js.map} +1 -1
  123. package/dist/{chunk-FG37YJO3.js → chunk-DJFNTWSZ.js} +4 -4
  124. package/dist/{chunk-FG37YJO3.js.map → chunk-DJFNTWSZ.js.map} +1 -1
  125. package/dist/{chunk-5T7SWHJY.js → chunk-DS7RAJK5.js} +3 -3
  126. package/dist/{chunk-5T7SWHJY.js.map → chunk-DS7RAJK5.js.map} +1 -1
  127. package/dist/{chunk-KFZZ2TIT.js → chunk-EZ3I3BFJ.js} +16 -16
  128. package/dist/{chunk-KFZZ2TIT.js.map → chunk-EZ3I3BFJ.js.map} +1 -1
  129. package/dist/{chunk-YOBDGI2N.js → chunk-FGL7ZLGW.js} +8 -8
  130. package/dist/{chunk-YOBDGI2N.js.map → chunk-FGL7ZLGW.js.map} +1 -1
  131. package/dist/{chunk-7L2SHYKI.js → chunk-FUA3JWQN.js} +4 -4
  132. package/dist/{chunk-7L2SHYKI.js.map → chunk-FUA3JWQN.js.map} +1 -1
  133. package/dist/{chunk-ZKZLQ42T.js → chunk-GEL3TAZ6.js} +3 -3
  134. package/dist/{chunk-ZKZLQ42T.js.map → chunk-GEL3TAZ6.js.map} +1 -1
  135. package/dist/{chunk-D6NA737W.js → chunk-GWD4QYN3.js} +3 -3
  136. package/dist/{chunk-D6NA737W.js.map → chunk-GWD4QYN3.js.map} +1 -1
  137. package/dist/{chunk-DGNZMR4J.js → chunk-GXFHRCHN.js} +3 -3
  138. package/dist/{chunk-DGNZMR4J.js.map → chunk-GXFHRCHN.js.map} +1 -1
  139. package/dist/{chunk-VROVJ2DG.js → chunk-JIEQ5XIF.js} +4 -4
  140. package/dist/{chunk-VROVJ2DG.js.map → chunk-JIEQ5XIF.js.map} +1 -1
  141. package/dist/{chunk-RMZTBINB.js → chunk-LIDZ5ONW.js} +3 -3
  142. package/dist/{chunk-RMZTBINB.js.map → chunk-LIDZ5ONW.js.map} +1 -1
  143. package/dist/{chunk-MHOWRKLZ.js → chunk-MGR3VFCX.js} +8 -8
  144. package/dist/{chunk-MHOWRKLZ.js.map → chunk-MGR3VFCX.js.map} +1 -1
  145. package/dist/{chunk-7IVHY4OR.js → chunk-MJHYGAN3.js} +3 -3
  146. package/dist/{chunk-7IVHY4OR.js.map → chunk-MJHYGAN3.js.map} +1 -1
  147. package/dist/{chunk-CIJVNUNZ.js → chunk-MNYVJQAA.js} +3 -3
  148. package/dist/{chunk-CIJVNUNZ.js.map → chunk-MNYVJQAA.js.map} +1 -1
  149. package/dist/{chunk-GGQA6QBB.js → chunk-MSZVSP2O.js} +3 -3
  150. package/dist/{chunk-GGQA6QBB.js.map → chunk-MSZVSP2O.js.map} +1 -1
  151. package/dist/{chunk-FKI4IRB5.js → chunk-MZN3JEIY.js} +3 -3
  152. package/dist/{chunk-FKI4IRB5.js.map → chunk-MZN3JEIY.js.map} +1 -1
  153. package/dist/{chunk-WPL3TJFG.js → chunk-NFUQGLKY.js} +5 -5
  154. package/dist/{chunk-WPL3TJFG.js.map → chunk-NFUQGLKY.js.map} +1 -1
  155. package/dist/{chunk-D3OM6F2C.js → chunk-NZLXLD6E.js} +7 -7
  156. package/dist/{chunk-D3OM6F2C.js.map → chunk-NZLXLD6E.js.map} +1 -1
  157. package/dist/{chunk-E72YUIEZ.js → chunk-OGXW62G2.js} +3 -3
  158. package/dist/{chunk-E72YUIEZ.js.map → chunk-OGXW62G2.js.map} +1 -1
  159. package/dist/{chunk-M2MJKUQF.js → chunk-OL7X4VAI.js} +36 -7
  160. package/dist/chunk-OL7X4VAI.js.map +1 -0
  161. package/dist/{chunk-7I5ESAQV.js → chunk-OPYPTTRI.js} +3 -3
  162. package/dist/{chunk-7I5ESAQV.js.map → chunk-OPYPTTRI.js.map} +1 -1
  163. package/dist/{chunk-GELGNW5G.js → chunk-PBQ2KJHF.js} +6 -6
  164. package/dist/{chunk-GELGNW5G.js.map → chunk-PBQ2KJHF.js.map} +1 -1
  165. package/dist/{chunk-JOK2N7CN.js → chunk-Q2IR5QOJ.js} +4 -4
  166. package/dist/{chunk-JOK2N7CN.js.map → chunk-Q2IR5QOJ.js.map} +1 -1
  167. package/dist/{chunk-GQ5D6I4M.js → chunk-QHGGRMC5.js} +4 -4
  168. package/dist/{chunk-GQ5D6I4M.js.map → chunk-QHGGRMC5.js.map} +1 -1
  169. package/dist/{chunk-4NXUVI5H.js → chunk-R4W4BHEK.js} +5 -5
  170. package/dist/{chunk-4NXUVI5H.js.map → chunk-R4W4BHEK.js.map} +1 -1
  171. package/dist/{chunk-S6QWXFUL.js → chunk-RVRNTDXM.js} +6 -6
  172. package/dist/{chunk-S6QWXFUL.js.map → chunk-RVRNTDXM.js.map} +1 -1
  173. package/dist/{chunk-BWI5VADL.js → chunk-SQJGSORP.js} +3 -3
  174. package/dist/{chunk-BWI5VADL.js.map → chunk-SQJGSORP.js.map} +1 -1
  175. package/dist/{chunk-VDPMCOHX.js → chunk-SY7ESZ44.js} +3 -3
  176. package/dist/{chunk-VDPMCOHX.js.map → chunk-SY7ESZ44.js.map} +1 -1
  177. package/dist/{chunk-BRIRWS2Q.js → chunk-TVSQH6T7.js} +3 -3
  178. package/dist/{chunk-BRIRWS2Q.js.map → chunk-TVSQH6T7.js.map} +1 -1
  179. package/dist/{chunk-RCHFI3G5.js → chunk-UAG25J4R.js} +3 -3
  180. package/dist/{chunk-RCHFI3G5.js.map → chunk-UAG25J4R.js.map} +1 -1
  181. package/dist/{chunk-IURXJAIK.js → chunk-UB22F4FC.js} +3 -3
  182. package/dist/{chunk-IURXJAIK.js.map → chunk-UB22F4FC.js.map} +1 -1
  183. package/dist/{chunk-IBA4YOOJ.js → chunk-VGP7RUO4.js} +4 -4
  184. package/dist/{chunk-IBA4YOOJ.js.map → chunk-VGP7RUO4.js.map} +1 -1
  185. package/dist/{chunk-RHGLDXXL.js → chunk-VGSV76FZ.js} +4 -4
  186. package/dist/{chunk-RHGLDXXL.js.map → chunk-VGSV76FZ.js.map} +1 -1
  187. package/dist/{chunk-U2ZBGC7W.js → chunk-VR4KFSHQ.js} +5 -5
  188. package/dist/{chunk-U2ZBGC7W.js.map → chunk-VR4KFSHQ.js.map} +1 -1
  189. package/dist/{chunk-CFYDPTXI.js → chunk-VR6L6RQ6.js} +4 -4
  190. package/dist/{chunk-CFYDPTXI.js.map → chunk-VR6L6RQ6.js.map} +1 -1
  191. package/dist/{chunk-4LWWIGG3.js → chunk-VVYX3JGV.js} +4 -4
  192. package/dist/{chunk-4LWWIGG3.js.map → chunk-VVYX3JGV.js.map} +1 -1
  193. package/dist/{chunk-RMWDF3J4.js → chunk-W35Z2YSD.js} +4 -4
  194. package/dist/{chunk-RMWDF3J4.js.map → chunk-W35Z2YSD.js.map} +1 -1
  195. package/dist/{chunk-POMXGMWD.js → chunk-W3JEFUIX.js} +5 -5
  196. package/dist/{chunk-POMXGMWD.js.map → chunk-W3JEFUIX.js.map} +1 -1
  197. package/dist/components/cart/index.js +1 -1
  198. package/dist/components/common/index.js +1 -1
  199. package/dist/components/drawer/index.js +23 -23
  200. package/dist/components/home/index.js +28 -28
  201. package/dist/components/layout/index.js +6 -6
  202. package/dist/components/product/index.js +25 -25
  203. package/dist/components/store/index.js +24 -24
  204. package/dist/components/toast/index.js +4 -4
  205. package/dist/dev/editor/index.js +2 -2
  206. package/dist/dev/index.js +2 -2
  207. package/dist/document-class-ZUEILHOS.js +34 -0
  208. package/dist/{document-class-45GDWKCV.js.map → document-class-ZUEILHOS.js.map} +1 -1
  209. package/dist/hooks/index.js +23 -23
  210. package/dist/hooks/useComments.js +3 -3
  211. package/dist/hooks/useGtm.js +23 -23
  212. package/dist/hooks/useMoney.js +23 -23
  213. package/dist/hooks/useProduct.js +3 -3
  214. package/dist/hooks/useStore.js +23 -23
  215. package/dist/hooks/useUser.js +5 -5
  216. package/dist/hooks/useWishlist.js +3 -3
  217. package/dist/index.js +23 -23
  218. package/dist/native-app/index.js +3 -3
  219. package/dist/{navigation-WALW5RJZ.js → navigation-5TZFA37U.js} +8 -8
  220. package/dist/{navigation-WALW5RJZ.js.map → navigation-5TZFA37U.js.map} +1 -1
  221. package/dist/{navigation-GMYW5HYH.js → navigation-NNDRNWCN.js} +7 -7
  222. package/dist/{navigation-GMYW5HYH.js.map → navigation-NNDRNWCN.js.map} +1 -1
  223. package/dist/{not-found-K5UGOEM2.js → not-found-EOFG5E22.js} +26 -26
  224. package/dist/{not-found-K5UGOEM2.js.map → not-found-EOFG5E22.js.map} +1 -1
  225. package/dist/providers/index.js +23 -23
  226. package/dist/routes/account/orders.js +8 -8
  227. package/dist/routes/account.js +17 -17
  228. package/dist/routes/blog.js +12 -12
  229. package/dist/routes/brands.js +8 -8
  230. package/dist/routes/cart.js +32 -32
  231. package/dist/routes/home.js +29 -29
  232. package/dist/routes/index.js +6 -6
  233. package/dist/routes/loyalty.js +9 -9
  234. package/dist/routes/page.js +8 -8
  235. package/dist/routes/product/index.d.ts.map +1 -1
  236. package/dist/routes/product-listing/index.d.ts.map +1 -1
  237. package/dist/routes/product-listing.js +42 -35
  238. package/dist/routes/product-listing.js.map +1 -1
  239. package/dist/routes/product.js +32 -31
  240. package/dist/routes/product.js.map +1 -1
  241. package/dist/routes/seo-redirects.js +6 -6
  242. package/dist/routes/testimonials.js +4 -4
  243. package/dist/routes/thank-you.js +8 -8
  244. package/dist/skeleton.js +29 -29
  245. package/dist/{store-lookup-YMJ3IMB6.js → store-lookup-IFUNRW7U.js} +11 -11
  246. package/dist/{store-lookup-YMJ3IMB6.js.map → store-lookup-IFUNRW7U.js.map} +1 -1
  247. package/dist/tanstack.js +20 -20
  248. package/dist/utils/baseHead.d.ts +12 -0
  249. package/dist/utils/baseHead.d.ts.map +1 -1
  250. package/dist/utils/baseHead.js +2 -2
  251. package/dist/utils/index.js +6 -6
  252. package/dist/vite/index.js +3 -3
  253. package/package.json +1 -1
  254. package/tailwind/routes/product/index.tsx.txt +6 -4
  255. package/tailwind/routes/product-listing/index.tsx.txt +13 -3
  256. package/dist/chunk-M2MJKUQF.js.map +0 -1
  257. package/dist/document-class-45GDWKCV.js +0 -34
@@ -1,6 +1,6 @@
1
- import { buildHreflangAlternates } from '../chunk-M2MJKUQF.js';
1
+ import { buildHreflangAlternates } from '../chunk-OL7X4VAI.js';
2
2
  import { RouteId } from '../chunk-OUW6WESU.js';
3
- import '../chunk-EEL6OYAQ.js';
3
+ import '../chunk-3Y6HAX72.js';
4
4
  import { getTwilightContext } from '../chunk-6K34BCUP.js';
5
5
  import '../chunk-T72DAX7R.js';
6
6
  import { lazyComponent } from '../chunk-VYGA5AT5.js';
@@ -33,10 +33,10 @@ async function reviewsLoader() {
33
33
 
34
34
  // src/routes/testimonials/index.tsx
35
35
  var LazyTestimonialsPage = lazyComponent(
36
- () => import('../TestimonialsPage-ZMJBCHLA.js').then((m) => ({ default: m.TestimonialsPage }))
36
+ () => import('../TestimonialsPage-AYMTOENI.js').then((m) => ({ default: m.TestimonialsPage }))
37
37
  );
38
38
  var LazyReviewsPage = lazyComponent(
39
- () => import('../ReviewsPage-U57L2T56.js').then((m) => ({ default: m.ReviewsPage }))
39
+ () => import('../ReviewsPage-WRQFDJL6.js').then((m) => ({ default: m.ReviewsPage }))
40
40
  );
41
41
  var TestimonialsPage = LazyTestimonialsPage;
42
42
  var ReviewsPage = LazyReviewsPage;
@@ -1,12 +1,12 @@
1
- import { order } from '../chunk-VROVJ2DG.js';
2
- import { buildHreflangAlternates, storePageUrl } from '../chunk-M2MJKUQF.js';
3
- import '../chunk-4NXUVI5H.js';
1
+ import { order } from '../chunk-JIEQ5XIF.js';
2
+ import { buildHreflangAlternates, storePageUrl } from '../chunk-OL7X4VAI.js';
3
+ import '../chunk-R4W4BHEK.js';
4
4
  import { RouteId } from '../chunk-OUW6WESU.js';
5
- import { getAuthToken, api } from '../chunk-HASB25DK.js';
5
+ import { getAuthToken, api } from '../chunk-BYSW626W.js';
6
6
  import '../chunk-Z5M4YYWT.js';
7
- import '../chunk-IURXJAIK.js';
8
- import '../chunk-7IVHY4OR.js';
9
- import '../chunk-EEL6OYAQ.js';
7
+ import '../chunk-UB22F4FC.js';
8
+ import '../chunk-MJHYGAN3.js';
9
+ import '../chunk-3Y6HAX72.js';
10
10
  import { getTwilightContext } from '../chunk-6K34BCUP.js';
11
11
  import '../chunk-T72DAX7R.js';
12
12
  import '../chunk-DF6FBKDN.js';
@@ -105,7 +105,7 @@ async function thankYouLoader({
105
105
 
106
106
  // src/routes/thank-you/index.tsx
107
107
  var LazyThankYouPage = lazyComponent(
108
- () => import('../ThankYouPage-6UMLQYW2.js').then((m) => ({ default: m.ThankYouPage }))
108
+ () => import('../ThankYouPage-EEOD7PKW.js').then((m) => ({ default: m.ThankYouPage }))
109
109
  );
110
110
  var ThankYouPage = LazyThankYouPage;
111
111
  async function loader(ctx, extend) {
package/dist/skeleton.js CHANGED
@@ -1,53 +1,53 @@
1
1
  export { BlogSkeleton, BreadcrumbSkeleton, CartSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from './chunk-N7CCSGZF.js';
2
- export { HomeSkeleton } from './chunk-VU6BFW6N.js';
2
+ export { HomeSkeleton } from './chunk-C5ZVACBI.js';
3
3
  import './chunk-IXHM24Z4.js';
4
- import './chunk-MHOWRKLZ.js';
5
- import './chunk-BWI5VADL.js';
6
- import './chunk-WPDGL5GT.js';
7
- import './chunk-S6QWXFUL.js';
8
- import './chunk-4WQIZ6J4.js';
4
+ import './chunk-MGR3VFCX.js';
5
+ import './chunk-SQJGSORP.js';
6
+ import './chunk-3XWB4KR6.js';
7
+ import './chunk-RVRNTDXM.js';
8
+ import './chunk-CLBUKYD5.js';
9
9
  import './chunk-Y32RHCOH.js';
10
- import './chunk-CLGWNUMG.js';
10
+ import './chunk-CZUHI5CR.js';
11
11
  import './chunk-Q77J3D2W.js';
12
- import './chunk-UECXF2HJ.js';
13
- import './chunk-7I5ESAQV.js';
14
- import './chunk-RH6XA7QJ.js';
12
+ import './chunk-6A6C2AMC.js';
13
+ import './chunk-OPYPTTRI.js';
14
+ import './chunk-B2KFXLA4.js';
15
15
  import './chunk-X55R4VVK.js';
16
16
  import './chunk-YL6X3ZMG.js';
17
- import './chunk-7L2SHYKI.js';
17
+ import './chunk-FUA3JWQN.js';
18
18
  import './chunk-OXMUPNMH.js';
19
- import './chunk-DGNZMR4J.js';
19
+ import './chunk-GXFHRCHN.js';
20
20
  import './chunk-VVZNW5CB.js';
21
- import './chunk-VDPMCOHX.js';
21
+ import './chunk-SY7ESZ44.js';
22
22
  import './chunk-GD26FI4J.js';
23
- import './chunk-BRIRWS2Q.js';
24
- import './chunk-M2MJKUQF.js';
25
- import './chunk-4NXUVI5H.js';
23
+ import './chunk-TVSQH6T7.js';
24
+ import './chunk-OL7X4VAI.js';
25
+ import './chunk-R4W4BHEK.js';
26
26
  import './chunk-OUW6WESU.js';
27
- import './chunk-PPUV27YN.js';
27
+ import './chunk-4B75V3OU.js';
28
28
  import './chunk-HI5V5X3S.js';
29
- import './chunk-ZKZLQ42T.js';
30
- import './chunk-D6NA737W.js';
29
+ import './chunk-GEL3TAZ6.js';
30
+ import './chunk-GWD4QYN3.js';
31
31
  import './chunk-6T55LXJL.js';
32
32
  import './chunk-Z653O7MX.js';
33
33
  import './chunk-ZCH7W7DZ.js';
34
- import './chunk-GGQA6QBB.js';
34
+ import './chunk-MSZVSP2O.js';
35
35
  import './chunk-JWXJPJBO.js';
36
36
  import './chunk-CW625T2E.js';
37
37
  import './chunk-7V36I5GT.js';
38
38
  import './chunk-6WI7R2BD.js';
39
- import './chunk-LFMCUQQ3.js';
39
+ import './chunk-AHR2RGKC.js';
40
40
  import './chunk-OAMIDZKW.js';
41
- import './chunk-CFYDPTXI.js';
41
+ import './chunk-VR6L6RQ6.js';
42
42
  import './chunk-OQIIJRAS.js';
43
43
  import './chunk-V2ZDTY6H.js';
44
- import './chunk-5T7SWHJY.js';
44
+ import './chunk-DS7RAJK5.js';
45
45
  import './chunk-5XDPAKF5.js';
46
46
  import './chunk-GCPEMNSU.js';
47
- import './chunk-HASB25DK.js';
47
+ import './chunk-BYSW626W.js';
48
48
  import './chunk-Z5M4YYWT.js';
49
49
  import './chunk-TYNZ5B2B.js';
50
- import './chunk-FKI4IRB5.js';
50
+ import './chunk-MZN3JEIY.js';
51
51
  import './chunk-AXW67SY7.js';
52
52
  import './chunk-BYMOPN2S.js';
53
53
  import './chunk-SKLEJJ6M.js';
@@ -55,10 +55,10 @@ import './chunk-6BZ5TKEV.js';
55
55
  import './chunk-FZKRSGLP.js';
56
56
  import './chunk-KYMWEUN2.js';
57
57
  import './chunk-YA6ABQB7.js';
58
- import './chunk-REBJQRQF.js';
59
- import './chunk-IURXJAIK.js';
60
- import './chunk-7IVHY4OR.js';
61
- import './chunk-EEL6OYAQ.js';
58
+ import './chunk-3VII4U2I.js';
59
+ import './chunk-UB22F4FC.js';
60
+ import './chunk-MJHYGAN3.js';
61
+ import './chunk-3Y6HAX72.js';
62
62
  import './chunk-6K34BCUP.js';
63
63
  import './chunk-T72DAX7R.js';
64
64
  import './chunk-DF6FBKDN.js';
@@ -1,15 +1,15 @@
1
- import { category } from './chunk-J5OC5Y6R.js';
2
- import { blog } from './chunk-CCMZUF7C.js';
3
- import { brand } from './chunk-RMWDF3J4.js';
4
- import { product } from './chunk-WPDGL5GT.js';
1
+ import { category } from './chunk-22MU63B3.js';
2
+ import { blog } from './chunk-BUYOH3KR.js';
3
+ import { brand } from './chunk-W35Z2YSD.js';
4
+ import { product } from './chunk-3XWB4KR6.js';
5
5
  import { DEV_LOOKUP_BUDGET_MS } from './chunk-OXMUPNMH.js';
6
- import './chunk-4NXUVI5H.js';
6
+ import './chunk-R4W4BHEK.js';
7
7
  import './chunk-OUW6WESU.js';
8
- import './chunk-HASB25DK.js';
8
+ import './chunk-BYSW626W.js';
9
9
  import './chunk-Z5M4YYWT.js';
10
- import './chunk-IURXJAIK.js';
11
- import './chunk-7IVHY4OR.js';
12
- import './chunk-EEL6OYAQ.js';
10
+ import './chunk-UB22F4FC.js';
11
+ import './chunk-MJHYGAN3.js';
12
+ import './chunk-3Y6HAX72.js';
13
13
  import './chunk-6K34BCUP.js';
14
14
  import './chunk-T72DAX7R.js';
15
15
  import './chunk-DF6FBKDN.js';
@@ -111,5 +111,5 @@ function lookupInStore(source, query) {
111
111
  }
112
112
 
113
113
  export { lookupInStore };
114
- //# sourceMappingURL=store-lookup-YMJ3IMB6.js.map
115
- //# sourceMappingURL=store-lookup-YMJ3IMB6.js.map
114
+ //# sourceMappingURL=store-lookup-IFUNRW7U.js.map
115
+ //# sourceMappingURL=store-lookup-IFUNRW7U.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dev/store-lookup.ts"],"names":["categories"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAM,QAAA,GAAW,EAAA;AAEjB,IAA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AA,CAAE,IAAA,EAAM,GAAA,EAAK,CAAA,CAAE,GAAA;AAAI,GAC7C,CAAE,CAAA;AACJ;AAEA,eAAe,eAAe,KAAA,EAAyC;AACrE,EAAA,MAAM,EAAE,UAAA,EAAY,IAAA,EAAK,GAAI,MAAM,KAAK,GAAA,EAAI;AAC5C,EAAA,OAAO,KACJ,MAAA,CAAO,CAAC,CAAA,KAAM,OAAA,CAAQ,EAAE,IAAA,EAAM,KAAK,CAAC,CAAA,CACpC,MAAM,CAAA,EAAG,QAAQ,CAAA,CACjB,GAAA,CAAI,CAAC,CAAA,MAAO;AAAA,IACX,IAAI,CAAA,CAAE,EAAA;AAAA,IACN,MAAM,CAAA,CAAE,IAAA;AAAA,IACR,KAAK,CAAA,CAAE,GAAA;AAAA,IACP,IAAA,EAAM,EAAE,EAAA,EAAI,CAAA,CAAE,EAAA,EAAI,MAAM,CAAA,CAAE,IAAA,EAAM,GAAA,EAAK,CAAA,CAAE,GAAA;AAAI,GAC7C,CAAE,CAAA;AACN;AAEA,IAAM,OAAA,GAAgF;AAAA,EACpF,QAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA,EAAe,YAAA;AAAA,EACf,eAAA,EAAiB;AACnB,CAAA;AAEO,SAAS,aAAA,CAAc,QAAyB,KAAA,EAAyC;AAC9F,EAAA,MAAM,MAAA,GAAS,QAAQ,MAAM,CAAA;AAC7B,EAAA,IAAI,CAAC,MAAA,EAAQ,OAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,CAAA,cAAA,EAAiB,MAAM,CAAA,CAAE,CAAC,CAAA;AACvE,EAAA,OAAO,MAAA,CAAO,KAAA,CAAM,IAAA,EAAM,CAAA;AAC5B","file":"store-lookup-YMJ3IMB6.js","sourcesContent":["/**\n * Runs in the editor's frame (the storefront), which has the engine's API\n * client set up for the dev store: answers the editor's pickers with the real\n * store's products, categories, brands and blog. Loaded with `import()` on the\n * first lookup, so a storefront never carries it.\n *\n * Each item's `data` is what a block receives for it, in the API's shape: a\n * product block reads only the ids and fetches the rest, while categories and\n * brands are drawn from what is saved.\n */\n\nimport { product } from '../api/product';\nimport { category } from '../api/category';\nimport { brand } from '../api/brands';\nimport { blog } from '../api/blog';\nimport type { Category } from '../types';\nimport { DEV_LOOKUP_BUDGET_MS, type DevLookupItem, type DevLookupSource } from './schema-types';\n\n/** Enough to choose from; a search narrows it further. */\nconst PER_PAGE = 20;\n/** How far a paged list is searched before giving up, so a big store can't stall the picker. */\nconst MAX_PAGES = 10;\n\ninterface Page<T> {\n items: T[];\n next: string | null;\n}\n\n/**\n * The matching items of a paged list, read page after page until there are\n * enough, the pages run out, or the time budget is spent: a brand or article on\n * page three is still found, and what was found so far always reaches the\n * editor before it stops waiting (`DEV_LOOKUP_BUDGET_MS` < its timeout).\n */\nasync function collect<T>(\n fetchPage: (page: number, cursor: string | null) => Promise<Page<T>>,\n keep: (item: T) => boolean\n): Promise<T[]> {\n const deadline = Date.now() + DEV_LOOKUP_BUDGET_MS;\n const found: T[] = [];\n let cursor: string | null = null;\n for (let page = 1; page <= MAX_PAGES; page += 1) {\n const { items, next } = await fetchPage(page, cursor);\n found.push(...items.filter(keep));\n if (found.length >= PER_PAGE || !next || Date.now() >= deadline) break;\n cursor = next;\n }\n return found.slice(0, PER_PAGE);\n}\n\nfunction matches(name: string, query: string): boolean {\n return !query || name.toLowerCase().includes(query.toLowerCase());\n}\n\n/** Categories with their subcategories, flattened, parents first. */\nfunction flatten(categories: Category[]): Category[] {\n return categories.flatMap((c) => [c, ...flatten(c.sub_categories ?? [])]);\n}\n\nasync function products(query: string): Promise<DevLookupItem[]> {\n const { items } = await product.list({\n source: query ? 'search' : 'latest',\n ...(query ? { keyword: query } : {}),\n perPage: PER_PAGE,\n });\n // List responses send the id as a numeric string; the block reads a number. Use it for both.\n return items.map((p) => ({\n id: Number(p.id),\n name: p.name,\n image: p.image?.url,\n url: p.url,\n data: { id: Number(p.id), name: p.name, url: p.url, image: p.image?.url ?? null },\n }));\n}\n\nasync function categories(query: string): Promise<DevLookupItem[]> {\n return flatten(await category.list())\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n image: c.image ?? undefined,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url, image: c.image ?? null, icon: c.icon ?? null },\n }));\n}\n\nasync function brands(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n (page) => brand.list(page),\n (b) => matches(b.name, query)\n );\n return found.map((b) => ({\n id: b.id,\n name: b.name,\n image: b.logo,\n url: b.url,\n data: { id: b.id, name: b.name, url: b.url, logo: b.logo, banner: b.banner ?? null },\n }));\n}\n\nasync function blogArticles(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n async (_page, cursor) => {\n const { data, cursor: pages } = await blog.articles.list(cursor ? { cursor } : undefined);\n return { items: data, next: pages?.next ?? null };\n },\n (a) => matches(a.name, query)\n );\n return found.map((a) => ({\n id: a.id,\n name: a.name,\n image: a.image,\n url: a.url,\n data: { id: a.id, name: a.name, url: a.url },\n }));\n}\n\nasync function blogCategories(query: string): Promise<DevLookupItem[]> {\n const { categories: list } = await blog.get();\n return list\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url },\n }));\n}\n\nconst LOOKUPS: Record<DevLookupSource, (query: string) => Promise<DevLookupItem[]>> = {\n products,\n categories,\n brands,\n blog_articles: blogArticles,\n blog_categories: blogCategories,\n};\n\nexport function lookupInStore(source: DevLookupSource, query: string): Promise<DevLookupItem[]> {\n const lookup = LOOKUPS[source];\n if (!lookup) return Promise.reject(new Error(`no lookup for ${source}`));\n return lookup(query.trim());\n}\n"]}
1
+ {"version":3,"sources":["../src/dev/store-lookup.ts"],"names":["categories"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAM,QAAA,GAAW,EAAA;AAEjB,IAAM,SAAA,GAAY,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,EAAM,GAAA,EAAK,CAAA,CAAE,GAAA;AAAI,GAC7C,CAAE,CAAA;AACJ;AAEA,eAAe,eAAe,KAAA,EAAyC;AACrE,EAAA,MAAM,EAAE,UAAA,EAAY,IAAA,EAAK,GAAI,MAAM,KAAK,GAAA,EAAI;AAC5C,EAAA,OAAO,KACJ,MAAA,CAAO,CAAC,CAAA,KAAM,OAAA,CAAQ,EAAE,IAAA,EAAM,KAAK,CAAC,CAAA,CACpC,MAAM,CAAA,EAAG,QAAQ,CAAA,CACjB,GAAA,CAAI,CAAC,CAAA,MAAO;AAAA,IACX,IAAI,CAAA,CAAE,EAAA;AAAA,IACN,MAAM,CAAA,CAAE,IAAA;AAAA,IACR,KAAK,CAAA,CAAE,GAAA;AAAA,IACP,IAAA,EAAM,EAAE,EAAA,EAAI,CAAA,CAAE,EAAA,EAAI,MAAM,CAAA,CAAE,IAAA,EAAM,GAAA,EAAK,CAAA,CAAE,GAAA;AAAI,GAC7C,CAAE,CAAA;AACN;AAEA,IAAM,OAAA,GAAgF;AAAA,EACpF,QAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA,EAAe,YAAA;AAAA,EACf,eAAA,EAAiB;AACnB,CAAA;AAEO,SAAS,aAAA,CAAc,QAAyB,KAAA,EAAyC;AAC9F,EAAA,MAAM,MAAA,GAAS,QAAQ,MAAM,CAAA;AAC7B,EAAA,IAAI,CAAC,MAAA,EAAQ,OAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,CAAA,cAAA,EAAiB,MAAM,CAAA,CAAE,CAAC,CAAA;AACvE,EAAA,OAAO,MAAA,CAAO,KAAA,CAAM,IAAA,EAAM,CAAA;AAC5B","file":"store-lookup-IFUNRW7U.js","sourcesContent":["/**\n * Runs in the editor's frame (the storefront), which has the engine's API\n * client set up for the dev store: answers the editor's pickers with the real\n * store's products, categories, brands and blog. Loaded with `import()` on the\n * first lookup, so a storefront never carries it.\n *\n * Each item's `data` is what a block receives for it, in the API's shape: a\n * product block reads only the ids and fetches the rest, while categories and\n * brands are drawn from what is saved.\n */\n\nimport { product } from '../api/product';\nimport { category } from '../api/category';\nimport { brand } from '../api/brands';\nimport { blog } from '../api/blog';\nimport type { Category } from '../types';\nimport { DEV_LOOKUP_BUDGET_MS, type DevLookupItem, type DevLookupSource } from './schema-types';\n\n/** Enough to choose from; a search narrows it further. */\nconst PER_PAGE = 20;\n/** How far a paged list is searched before giving up, so a big store can't stall the picker. */\nconst MAX_PAGES = 10;\n\ninterface Page<T> {\n items: T[];\n next: string | null;\n}\n\n/**\n * The matching items of a paged list, read page after page until there are\n * enough, the pages run out, or the time budget is spent: a brand or article on\n * page three is still found, and what was found so far always reaches the\n * editor before it stops waiting (`DEV_LOOKUP_BUDGET_MS` < its timeout).\n */\nasync function collect<T>(\n fetchPage: (page: number, cursor: string | null) => Promise<Page<T>>,\n keep: (item: T) => boolean\n): Promise<T[]> {\n const deadline = Date.now() + DEV_LOOKUP_BUDGET_MS;\n const found: T[] = [];\n let cursor: string | null = null;\n for (let page = 1; page <= MAX_PAGES; page += 1) {\n const { items, next } = await fetchPage(page, cursor);\n found.push(...items.filter(keep));\n if (found.length >= PER_PAGE || !next || Date.now() >= deadline) break;\n cursor = next;\n }\n return found.slice(0, PER_PAGE);\n}\n\nfunction matches(name: string, query: string): boolean {\n return !query || name.toLowerCase().includes(query.toLowerCase());\n}\n\n/** Categories with their subcategories, flattened, parents first. */\nfunction flatten(categories: Category[]): Category[] {\n return categories.flatMap((c) => [c, ...flatten(c.sub_categories ?? [])]);\n}\n\nasync function products(query: string): Promise<DevLookupItem[]> {\n const { items } = await product.list({\n source: query ? 'search' : 'latest',\n ...(query ? { keyword: query } : {}),\n perPage: PER_PAGE,\n });\n // List responses send the id as a numeric string; the block reads a number. Use it for both.\n return items.map((p) => ({\n id: Number(p.id),\n name: p.name,\n image: p.image?.url,\n url: p.url,\n data: { id: Number(p.id), name: p.name, url: p.url, image: p.image?.url ?? null },\n }));\n}\n\nasync function categories(query: string): Promise<DevLookupItem[]> {\n return flatten(await category.list())\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n image: c.image ?? undefined,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url, image: c.image ?? null, icon: c.icon ?? null },\n }));\n}\n\nasync function brands(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n (page) => brand.list(page),\n (b) => matches(b.name, query)\n );\n return found.map((b) => ({\n id: b.id,\n name: b.name,\n image: b.logo,\n url: b.url,\n data: { id: b.id, name: b.name, url: b.url, logo: b.logo, banner: b.banner ?? null },\n }));\n}\n\nasync function blogArticles(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n async (_page, cursor) => {\n const { data, cursor: pages } = await blog.articles.list(cursor ? { cursor } : undefined);\n return { items: data, next: pages?.next ?? null };\n },\n (a) => matches(a.name, query)\n );\n return found.map((a) => ({\n id: a.id,\n name: a.name,\n image: a.image,\n url: a.url,\n data: { id: a.id, name: a.name, url: a.url },\n }));\n}\n\nasync function blogCategories(query: string): Promise<DevLookupItem[]> {\n const { categories: list } = await blog.get();\n return list\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url },\n }));\n}\n\nconst LOOKUPS: Record<DevLookupSource, (query: string) => Promise<DevLookupItem[]>> = {\n products,\n categories,\n brands,\n blog_articles: blogArticles,\n blog_categories: blogCategories,\n};\n\nexport function lookupInStore(source: DevLookupSource, query: string): Promise<DevLookupItem[]> {\n const lookup = LOOKUPS[source];\n if (!lookup) return Promise.reject(new Error(`no lookup for ${source}`));\n return lookup(query.trim());\n}\n"]}
package/dist/tanstack.js CHANGED
@@ -1,34 +1,34 @@
1
- export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-KFZZ2TIT.js';
2
- import { requestHostOf } from './chunk-K2O3RKPW.js';
3
- export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-K2O3RKPW.js';
1
+ export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-EZ3I3BFJ.js';
2
+ import { requestHostOf } from './chunk-BGBZXKRA.js';
3
+ export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-BGBZXKRA.js';
4
4
  import './chunk-Z4Y55HWX.js';
5
- export { tanstackHeadAdapter as head, withHead } from './chunk-CIJVNUNZ.js';
5
+ export { tanstackHeadAdapter as head, withHead } from './chunk-MNYVJQAA.js';
6
6
  import { CRITICAL_STYLE_HREF } from './chunk-4FJGZQD3.js';
7
- import { readNativeAppHeaders } from './chunk-GELGNW5G.js';
8
- import './chunk-RCHFI3G5.js';
9
- import './chunk-POMXGMWD.js';
10
- import './chunk-JOK2N7CN.js';
7
+ import { readNativeAppHeaders } from './chunk-PBQ2KJHF.js';
8
+ import './chunk-UAG25J4R.js';
9
+ import './chunk-W3JEFUIX.js';
10
+ import './chunk-Q2IR5QOJ.js';
11
11
  import './chunk-NV4PF3O3.js';
12
- import './chunk-WPDGL5GT.js';
13
- import { rootHead } from './chunk-RH6XA7QJ.js';
12
+ import './chunk-3XWB4KR6.js';
13
+ import { rootHead } from './chunk-B2KFXLA4.js';
14
14
  import './chunk-X55R4VVK.js';
15
- import './chunk-DGNZMR4J.js';
16
- import './chunk-VDPMCOHX.js';
15
+ import './chunk-GXFHRCHN.js';
16
+ import './chunk-SY7ESZ44.js';
17
17
  import './chunk-GD26FI4J.js';
18
- import { maintenanceEvidence, MAINTENANCE_EVIDENCE_HEADER, maintenanceEvidenceHeader } from './chunk-BRIRWS2Q.js';
19
- import './chunk-M2MJKUQF.js';
20
- import './chunk-4NXUVI5H.js';
18
+ import { maintenanceEvidence, MAINTENANCE_EVIDENCE_HEADER, maintenanceEvidenceHeader } from './chunk-TVSQH6T7.js';
19
+ import './chunk-OL7X4VAI.js';
20
+ import './chunk-R4W4BHEK.js';
21
21
  import './chunk-OUW6WESU.js';
22
22
  import './chunk-JWXJPJBO.js';
23
23
  export { mergeDocumentDescriptors as mergeAttrs } from './chunk-CW625T2E.js';
24
- import './chunk-5T7SWHJY.js';
25
- import './chunk-HASB25DK.js';
24
+ import './chunk-DS7RAJK5.js';
25
+ import './chunk-BYSW626W.js';
26
26
  import './chunk-Z5M4YYWT.js';
27
27
  import './chunk-TYNZ5B2B.js';
28
28
  import './chunk-BYMOPN2S.js';
29
- import './chunk-IURXJAIK.js';
30
- import './chunk-7IVHY4OR.js';
31
- import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId, legacyLocaleRedirectHref } from './chunk-EEL6OYAQ.js';
29
+ import './chunk-UB22F4FC.js';
30
+ import './chunk-MJHYGAN3.js';
31
+ import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId, legacyLocaleRedirectHref } from './chunk-3Y6HAX72.js';
32
32
  import { runWithTwilightContext, getTwilightContext } from './chunk-6K34BCUP.js';
33
33
  export { getTwilightContext, runWithTwilightContext, updateTwilightContext } from './chunk-6K34BCUP.js';
34
34
  import './chunk-T72DAX7R.js';
@@ -11,6 +11,18 @@ export declare function localeToOgLocale(locale: string): string;
11
11
  * and the page's address is `/<username>/brands?lang=ar`.
12
12
  */
13
13
  export declare function storePageUrl(settings: StoreContext | null | undefined, path: string): string | undefined;
14
+ /**
15
+ * The canonical URL of a product (`p`) or category (`c`) page: `/{slug}/{kind}{id}` under the
16
+ * store root, in the language of the page's address (`routerPath`), with the slug the API's
17
+ * `url` carries, or `-` when it carries none.
18
+ *
19
+ * It is built, not taken from the API, because the API's `url` is not always an address the
20
+ * engine serves. A store on hash URLs gets `/{code}` and `/category/{code}`, and a store on "new
21
+ * links" gets `/p{id}-{name}` or `/{sku}-{name}`. The engine redirects those to `/-/{kind}{id}`,
22
+ * so a canonical naming one told search engines the page lived at an address that redirected
23
+ * back to it. On a store with SEO URLs the result is the API's own `url`.
24
+ */
25
+ export declare function slugPageCanonical(settings: StoreContext | null | undefined, kind: 'p' | 'c', id: string | number, apiUrl: string | undefined, routerPath: string): string | undefined;
14
26
  /**
15
27
  * Builds hreflang alternate links for multilingual SEO.
16
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"baseHead.d.ts","sourceRoot":"","sources":["../../src/utils/baseHead.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAejD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD;AAkGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAcpB;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAAC,oBAAoB,CAAC,CAuBtC;AAMD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,MAAM,GAAE,MAAwB,EAChC,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAsDhB"}
1
+ {"version":3,"file":"baseHead.d.ts","sourceRoot":"","sources":["../../src/utils/baseHead.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAgBjD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD;AAoGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAcpB;AAkBD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,EAAE,GAAG,GAAG,GAAG,EACf,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAKpB;AAiBD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAAC,oBAAoB,CAAC,CAmCtC;AAMD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,MAAM,GAAE,MAAwB,EAChC,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CAsDhB"}
@@ -1,5 +1,5 @@
1
- export { buildBaseHead, buildHreflangAlternates, localeToOgLocale, storePageUrl } from '../chunk-M2MJKUQF.js';
2
- import '../chunk-EEL6OYAQ.js';
1
+ export { buildBaseHead, buildHreflangAlternates, localeToOgLocale, slugPageCanonical, storePageUrl } from '../chunk-OL7X4VAI.js';
2
+ import '../chunk-3Y6HAX72.js';
3
3
  import '../chunk-6K34BCUP.js';
4
4
  import '../chunk-T72DAX7R.js';
5
5
  import '../chunk-DGUM43GV.js';
@@ -1,17 +1,17 @@
1
1
  export { stripUnsafeHtml } from '../chunk-RUHSV4Z6.js';
2
2
  export { formatSallaPlural } from '../chunk-BT6HEEAP.js';
3
- export { dispatchRouteChanged } from '../chunk-JOK2N7CN.js';
3
+ export { dispatchRouteChanged } from '../chunk-Q2IR5QOJ.js';
4
4
  export { sortOptions } from '../chunk-3LZJXKVO.js';
5
5
  export { color } from '../chunk-VVZNW5CB.js';
6
- export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-VDPMCOHX.js';
6
+ export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-SY7ESZ44.js';
7
7
  export { mergeHead, resolveHead, setHeadAdapter } from '../chunk-GD26FI4J.js';
8
- export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-M2MJKUQF.js';
8
+ export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-OL7X4VAI.js';
9
9
  export { asset, cdn, isPlaceholder } from '../chunk-ZCH7W7DZ.js';
10
10
  export { mergeDocumentDescriptors, mergeElementAttrs, normalizeClasses, syncAttrsToElement, toReactProps } from '../chunk-CW625T2E.js';
11
- import '../chunk-HASB25DK.js';
11
+ import '../chunk-BYSW626W.js';
12
12
  import '../chunk-Z5M4YYWT.js';
13
- export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-7IVHY4OR.js';
14
- export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-EEL6OYAQ.js';
13
+ export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-MJHYGAN3.js';
14
+ export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-3Y6HAX72.js';
15
15
  import '../chunk-6K34BCUP.js';
16
16
  import '../chunk-T72DAX7R.js';
17
17
  import '../chunk-DGUM43GV.js';
@@ -1,14 +1,14 @@
1
1
  import { validateTwilightManifest } from '../chunk-X5NK4TZH.js';
2
2
  export { REACT_THEME_TYPE, describeThemeTypeIssue, getThemeType, isReactThemeManifest, validateTwilightManifest } from '../chunk-X5NK4TZH.js';
3
- import { tanstackHeadAdapter } from '../chunk-CIJVNUNZ.js';
3
+ import { tanstackHeadAdapter } from '../chunk-MNYVJQAA.js';
4
4
  import { nextjsHeadAdapter } from '../chunk-HOSHJBPS.js';
5
5
  import { CATEGORY_SLUG_PATH, PRODUCT_SLUG_PATH } from '../chunk-NV4PF3O3.js';
6
6
  import '../chunk-X55R4VVK.js';
7
7
  import { EMPTY_DEV_SCHEMA, DEV_PREVIEW_GLOBAL, DEV_PREVIEW_ENDPOINT, normalizePreviewState, DEV_PREVIEW_EVENT, DEV_EDITOR_PATH, DEV_PREVIEW_IMAGE_ENDPOINT, DEV_PREVIEW_IMAGE_MAX_BYTES } from '../chunk-OXMUPNMH.js';
8
8
  import { setHeadAdapter } from '../chunk-GD26FI4J.js';
9
- import '../chunk-M2MJKUQF.js';
9
+ import '../chunk-OL7X4VAI.js';
10
10
  import { RouteId } from '../chunk-OUW6WESU.js';
11
- import '../chunk-EEL6OYAQ.js';
11
+ import '../chunk-3Y6HAX72.js';
12
12
  import '../chunk-6K34BCUP.js';
13
13
  import '../chunk-T72DAX7R.js';
14
14
  import '../chunk-DGUM43GV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-theme-engine",
3
- "version": "1.0.156",
3
+ "version": "1.0.157",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,5 +1,5 @@
1
1
  import type { HeadDescriptor } from '../../utils/head';
2
- import { buildHreflangAlternates } from '../../utils/baseHead';
2
+ import { buildHreflangAlternates, slugPageCanonical } from '../../utils/baseHead';
3
3
  import type { ProductPageProps } from './types';
4
4
  import type { IdParams } from '../types';
5
5
  import type { TwilightContext } from '../../twilight/context';
@@ -36,6 +36,8 @@ function head(ctx: TwilightContext, data: ProductPageProps): HeadDescriptor {
36
36
  }
37
37
  const product = data.product;
38
38
  const storeName = ctx.settings?.store?.name ?? '';
39
+ // An address the engine serves: a hash-URL store's API names the product `/{code}`.
40
+ const url = slugPageCanonical(ctx.settings, 'p', product.id, product.url, ctx.location.pathname);
39
41
 
40
42
  // Strip HTML and limit description to 160 chars
41
43
  const description = product.description?.replace(/<[^>]*>/g, '').slice(0, 160) ?? '';
@@ -60,7 +62,7 @@ function head(ctx: TwilightContext, data: ProductPageProps): HeadDescriptor {
60
62
  image: images.length > 0 ? images : undefined,
61
63
  offers: {
62
64
  '@type': 'Offer',
63
- url: product.url,
65
+ url,
64
66
  availability: product.is_available
65
67
  ? 'https://schema.org/InStock'
66
68
  : 'https://schema.org/OutOfStock',
@@ -124,13 +126,13 @@ function head(ctx: TwilightContext, data: ProductPageProps): HeadDescriptor {
124
126
  title,
125
127
  appendStoreTitle: false,
126
128
  description,
127
- canonical: product.url,
129
+ canonical: url,
128
130
  openGraph: {
129
131
  type: 'product',
130
132
  title,
131
133
  description,
132
134
  images: product.image?.url,
133
- url: product.url,
135
+ url,
134
136
  },
135
137
  twitter: {
136
138
  card: 'summary_large_image',
@@ -1,6 +1,6 @@
1
1
  import { PageSkeleton } from '@salla.sa/twilight-components-react/skeletons';
2
2
  import type { HeadDescriptor } from '../../utils/head';
3
- import { buildHreflangAlternates, storePageUrl } from '../../utils/baseHead';
3
+ import { buildHreflangAlternates, slugPageCanonical, storePageUrl } from '../../utils/baseHead';
4
4
  import { productListLoader } from './loader';
5
5
  import type { ProductListLoaderData, ProductListTag, Category } from './types';
6
6
  import type { TwilightContext } from '../../twilight/context';
@@ -18,13 +18,23 @@ export function head(ctx: TwilightContext, data: ProductListLoaderData): HeadDes
18
18
  ? `/products?source=${data.source.type}`
19
19
  : undefined;
20
20
 
21
+ // An address the engine serves: a hash-URL store's API names the category `/category/{code}`.
22
+ const categoryUrl =
23
+ category &&
24
+ slugPageCanonical(
25
+ ctx.settings,
26
+ 'c',
27
+ category.id_ ?? category.id,
28
+ category.url,
29
+ ctx.location.pathname
30
+ );
21
31
  const alternateLanguages = buildHreflangAlternates(
22
32
  ctx.settings,
23
- category?.url ?? (tag?.url || productsPath || ctx.location.pathname)
33
+ categoryUrl ?? (tag?.url || productsPath || ctx.location.pathname)
24
34
  );
25
35
  // The sources share one path, so their canonical keeps `source` (Twig gave each its own path).
26
36
  const canonical =
27
- category?.url ??
37
+ categoryUrl ??
28
38
  (tag?.url ||
29
39
  (productsPath
30
40
  ? storePageUrl(ctx.settings, `${ctx.location.pathname}?source=${data.source.type}`)
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/baseHead.ts"],"names":[],"mappings":";;;;AAWA,IAAM,aAAA,GAAwC;AAAA,EAC5C,EAAA,EAAI,OAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AAKO,SAAS,iBAAiB,MAAA,EAAwB;AACvD,EAAA,IAAI,CAAC,MAAA,EAAQ,OAAO,aAAA,CAAc,eAAe,CAAA,IAAK,OAAA;AACtD,EAAA,MAAM,OAAO,MAAA,CAAO,KAAA,CAAM,MAAM,CAAA,CAAE,CAAC,EAAE,WAAA,EAAY;AACjD,EAAA,OAAO,aAAA,CAAc,IAAI,CAAA,IAAK,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,IAAA,CAAK,aAAa,CAAA,CAAA;AAC7D;AAQA,SAAS,iBAAA,CAAkB,UAAkB,SAAA,EAA6B;AACxE,EAAA,MAAM,QAAQ,QAAA,CAAS,KAAA,CAAM,GAAG,CAAA,CAAE,OAAO,OAAO,CAAA;AAChD,EAAA,MAAM,QAAQ,SAAA,CAAU,KAAA,CAAM,GAAG,CAAA,CAAE,OAAO,OAAO,CAAA;AACjD,EAAA,MAAM,OAAA,GAAU,CAAC,KAAA,KACf,KAAA,CAAM,SAAS,CAAA,IAAK,KAAA,CAAM,KAAA,CAAM,CAAC,SAAS,CAAA,KAAM,KAAA,CAAM,KAAA,GAAQ,CAAC,MAAM,OAAO,CAAA;AAC9E,EAAA,MAAM,WAAW,CAAC,KAAA,KAAkB,KAAA,CAAM,KAAK,GAAG,MAAA,KAAW,CAAA;AAE7D,EAAA,IAAI,OAAA,CAAQ,CAAC,CAA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A,MAC9B,MAAA,EAAQ,iBAAiB,MAAM,CAAA;AAAA,MAC/B,GAAI,MAAM,IAAA,GAAO,EAAE,QAAQ,KAAA,CAAM,IAAA,KAAS;AAAC,KAC7C;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,qBAAA;AAAA,MACN,KAAA;AAAA,MACA,GAAI,WAAA,GAAc,EAAE,WAAA,KAAgB,EAAC;AAAA,MACrC,GAAI,WAAA,GAAc,EAAE,IAAA,EAAM,WAAA,KAAgB,EAAC;AAAA,MAC3C,GAAI,MAAM,IAAA,GAAO,EAAE,QAAQ,KAAA,CAAM,IAAA,KAAS;AAAC,KAC7C;AAAA,IACA,GAAI,OAAO,EAAE,kBAAA,EAAoB,wBAAwB,QAAA,EAAU,IAAI,CAAA,EAAE,GAAI;AAAC,GAChF;AACF","file":"chunk-M2MJKUQF.js","sourcesContent":["import type { HeadDescriptor } from './head';\nimport type { StoreContext } from '../api/store';\nimport { FALLBACK_LOCALE, isLocale } from '../providers/locale-constants';\nimport { resolveStoreBase, resolveStoreBaseFollowsLocale } from './store-identity';\nimport { splitLeadingSegment } from './store-base';\n\n// ============================================================================\n// Locale helpers\n// ============================================================================\n\n/** Maps ISO-639-1 locale codes to the og:locale format (language_TERRITORY). */\nconst LOCALE_OG_MAP: Record<string, string> = {\n ar: 'ar_AR',\n en: 'en_US',\n};\n\n/**\n * Converts an ISO-639-1 locale string to the og:locale format (e.g. `ar` → `ar_AR`).\n */\nexport function localeToOgLocale(locale: string): string {\n if (!locale) return LOCALE_OG_MAP[FALLBACK_LOCALE] ?? 'ar_AR';\n const base = locale.split(/[-_]/)[0].toLowerCase();\n return LOCALE_OG_MAP[base] ?? `${base}_${base.toUpperCase()}`;\n}\n\n/**\n * The page's own segments of an absolute URL's path: without the store's path (`storePath`, the\n * `/<username>` of a store without a domain) and without a locale beside it. The locale may sit\n * on either side: after the store in a store root (`/<username>/ar/shoes`), and in front of it in\n * the URLs the API hands out for a shared-host store (`/ar/<username>/shoes`).\n */\nfunction pageSegmentsOfUrl(pathname: string, storePath: string): string[] {\n const parts = pathname.split('/').filter(Boolean);\n const store = storePath.split('/').filter(Boolean);\n const storeAt = (index: number) =>\n store.length > 0 && store.every((segment, i) => parts[index + i] === segment);\n const localeAt = (index: number) => parts[index]?.length === 2;\n\n if (storeAt(0)) return parts.slice(store.length + (localeAt(store.length) ? 1 : 0));\n if (localeAt(0) && storeAt(1)) return parts.slice(1 + store.length);\n return parts.slice(localeAt(0) ? 1 : 0);\n}\n\n/**\n * Extracts the path portion from a URL or path string, removing any locale prefix and, from an\n * absolute URL, the store's own path (`storePath`, the `/<username>` of a store without a domain).\n */\nfunction extractPath(urlOrPath: string | undefined, storePath = ''): string {\n if (!urlOrPath) return '/';\n\n try {\n const parsed = new URL(urlOrPath);\n return '/' + pageSegmentsOfUrl(parsed.pathname, storePath).join('/');\n } catch {\n const pathParts = urlOrPath.split('/').filter(Boolean);\n if (pathParts.length > 0 && pathParts[0].length === 2) {\n pathParts.shift();\n }\n return '/' + pathParts.join('/');\n }\n}\n\n/**\n * The store's root URL from its store URL: the domain, plus the `/<username>` a store without\n * its own domain lives under, without a trailing locale.\n * \"https://saudiseamless.com/ar/\" → \"https://saudiseamless.com\"\n * \"https://salla.sa/my-store/ar/\" → \"https://salla.sa/my-store\"\n */\nfunction extractBaseUrl(storeUrl: string): string {\n try {\n const parsed = new URL(storeUrl);\n const segments = parsed.pathname.split('/').filter(Boolean);\n if (isLocale(segments[segments.length - 1])) segments.pop();\n return parsed.origin + segments.map((segment) => `/${segment}`).join('');\n } catch {\n return storeUrl.replace(/\\/[a-z]{2}\\/?$/i, '').replace(/\\/$/, '');\n }\n}\n\n/**\n * The store's root URL as pages are addressed now. On a Salla shared host that is\n * `https://demostore.salla.sa/<username>`: the API's `store.url` still carries the old\n * language segment (`/ar/<username>/`), which redirects, so it is not used there.\n */\nfunction storeRootUrl(storeUrl: string): string {\n const base = resolveStoreBase();\n if (base && resolveStoreBaseFollowsLocale()) {\n try {\n return `${new URL(storeUrl).origin}/${base}`;\n } catch {\n // Not an absolute URL: fall through to the generic rule.\n }\n }\n return extractBaseUrl(storeUrl);\n}\n\n/** Whether pages are addressed without a language segment (a Salla shared host). */\nfunction languageInQuery(): boolean {\n return Boolean(resolveStoreBase() && resolveStoreBaseFollowsLocale());\n}\n\n/**\n * A router path (`/ar/brands`) as a shared host addresses it: the leading locale comes off the\n * path and becomes `?lang=`, since the address carries no language. A path with no leading\n * locale takes `fallbackLocale` for its `?lang=`, or none when that is not given. `path` is\n * `''` for the store root.\n */\nfunction sharedHostPage(\n routerPath: string,\n fallbackLocale?: string\n): { path: string; search: string } {\n const { first, rest } = splitLeadingSegment(routerPath);\n const leading = isLocale(first);\n const remainder = leading ? rest : routerPath;\n const locale = leading ? first : fallbackLocale;\n return {\n path: remainder === '/' ? '' : remainder,\n search: locale ? `?lang=${encodeURIComponent(locale)}` : '',\n };\n}\n\n/**\n * `path` under the store's root URL, the way canonical URLs name a page.\n *\n * On a shared host `path` is the router's, with its virtual locale in front (`/ar/brands`),\n * and the page's address is `/<username>/brands?lang=ar`.\n */\nexport function storePageUrl(\n settings: StoreContext | null | undefined,\n path: string\n): string | undefined {\n const storeUrl = settings?.store?.url;\n if (!storeUrl) return undefined;\n const base = storeRootUrl(storeUrl);\n const page = languageInQuery()\n ? sharedHostPage(path)\n : { path: path === '/' ? '' : path, search: '' };\n if (!page.path && !page.search) return base;\n try {\n // Percent-encodes the decoded path the router hands over, and keeps escapes it left in.\n return new URL(`${base}${page.path}${page.search}`).href;\n } catch {\n return `${base}${page.path}${page.search}`;\n }\n}\n\n// ============================================================================\n// Hreflang alternates builder\n// ============================================================================\n\n/**\n * Builds hreflang alternate links for multilingual SEO.\n *\n * @param settings - StoreContext containing store and languages\n * @param path - Current route path from router (e.g., '/ar/products/123')\n */\nexport function buildHreflangAlternates(\n settings: StoreContext | null | undefined,\n path?: string\n): HeadDescriptor['alternateLanguages'] {\n const languages = settings?.languages;\n if (!languages?.length) {\n return undefined;\n }\n\n const baseUrl = settings?.store?.url ? storeRootUrl(settings.store.url) : '';\n const extractedPath = extractPath(path, baseUrl.replace(/^https?:\\/\\/[^/]+/, ''));\n const defaultLang = languages.find((l) => l.code === FALLBACK_LOCALE) ?? languages[0];\n const inQuery = languageInQuery();\n\n const buildUrl = (langCode: string) => {\n const pagePath = extractedPath === '/' ? '' : extractedPath;\n // On a shared host the language is not in the address; `?lang=` is how a link asks for one.\n return inQuery\n ? `${baseUrl}${pagePath}?lang=${encodeURIComponent(langCode)}`\n : `${baseUrl}/${langCode}${pagePath}`;\n };\n\n return [\n { hreflang: 'x-default', href: buildUrl(defaultLang.code) },\n ...languages.map((lang) => ({ hreflang: lang.code, href: buildUrl(lang.code) })),\n ];\n}\n\n// ============================================================================\n// Base head builder (for __root.tsx)\n// ============================================================================\n\n/**\n * Builds a base {@link HeadDescriptor} with store-wide OG and Twitter defaults.\n * Used in __root.tsx to set base metadata that can be overridden by child routes.\n *\n * Note: hreflang alternates, the canonical and og:url are only generated when\n * path is provided, since we need the current route path. Child routes call\n * buildHreflangAlternates directly with ctx.path.\n */\nexport function buildBaseHead(\n settings: StoreContext | null | undefined,\n locale: string = FALLBACK_LOCALE,\n path?: string\n): HeadDescriptor {\n const store = settings?.store;\n if (!store) return {};\n\n const title = store.meta?.title || store.name;\n const description = store.meta?.description || store.description || undefined;\n const keywords = store.meta?.keywords || undefined;\n const baseUrl = store.url ? storeRootUrl(store.url) : undefined;\n // A child route cannot replace a <link>, so a store-wide canonical would stick to every page.\n // On a shared host `path` is the router's, with the virtual locale in front: the address has\n // none, so it comes off and goes into `?lang=`, which keeps each language's page its own.\n const page = path && languageInQuery() ? sharedHostPage(path, locale) : null;\n const canonicalUrl =\n path && baseUrl\n ? page\n ? `${baseUrl}${page.path}${page.search}`\n : `${baseUrl}${path}`\n : undefined;\n const pagePath = path === '/' ? '' : path;\n const ogUrl =\n path && baseUrl ? (page ? canonicalUrl : `${baseUrl}/${locale}${pagePath}`) : undefined;\n\n // The store saves either a handle or a profile URL (https://x.com/<handle>).\n const twitterHandle = store.social?.twitter\n ?.split('?')[0]\n .replace(/\\/+$/, '')\n .split('/')\n .pop()\n ?.replace(/^@/, '');\n const twitterSite = twitterHandle ? `@${twitterHandle}` : undefined;\n\n return {\n title,\n ...(description ? { description } : {}),\n ...(keywords ? { keywords } : {}),\n ...(canonicalUrl ? { canonical: canonicalUrl } : {}),\n openGraph: {\n type: 'website',\n siteName: store.name,\n title,\n ...(description ? { description } : {}),\n ...(ogUrl ? { url: ogUrl } : {}),\n locale: localeToOgLocale(locale),\n ...(store.logo ? { images: store.logo } : {}),\n },\n twitter: {\n card: 'summary_large_image',\n title,\n ...(description ? { description } : {}),\n ...(twitterSite ? { site: twitterSite } : {}),\n ...(store.logo ? { images: store.logo } : {}),\n },\n ...(path ? { alternateLanguages: buildHreflangAlternates(settings, path) } : {}),\n };\n}\n"]}
@@ -1,34 +0,0 @@
1
- export { RouteDocumentSync, TanStackDocumentSync, tanstackDocumentAdapter, useTanstackDocumentAttrs } from './chunk-KFZZ2TIT.js';
2
- import './chunk-Z4Y55HWX.js';
3
- import './chunk-CIJVNUNZ.js';
4
- import './chunk-GELGNW5G.js';
5
- import './chunk-RCHFI3G5.js';
6
- import './chunk-POMXGMWD.js';
7
- import './chunk-JOK2N7CN.js';
8
- import './chunk-NV4PF3O3.js';
9
- import './chunk-WPDGL5GT.js';
10
- import './chunk-RH6XA7QJ.js';
11
- import './chunk-X55R4VVK.js';
12
- import './chunk-DGNZMR4J.js';
13
- import './chunk-VDPMCOHX.js';
14
- import './chunk-GD26FI4J.js';
15
- import './chunk-BRIRWS2Q.js';
16
- import './chunk-M2MJKUQF.js';
17
- import './chunk-4NXUVI5H.js';
18
- import './chunk-OUW6WESU.js';
19
- import './chunk-JWXJPJBO.js';
20
- import './chunk-CW625T2E.js';
21
- import './chunk-5T7SWHJY.js';
22
- import './chunk-HASB25DK.js';
23
- import './chunk-Z5M4YYWT.js';
24
- import './chunk-TYNZ5B2B.js';
25
- import './chunk-IURXJAIK.js';
26
- import './chunk-7IVHY4OR.js';
27
- import './chunk-EEL6OYAQ.js';
28
- import './chunk-6K34BCUP.js';
29
- import './chunk-T72DAX7R.js';
30
- import './chunk-DF6FBKDN.js';
31
- import './chunk-VYGA5AT5.js';
32
- import './chunk-DGUM43GV.js';
33
- //# sourceMappingURL=document-class-45GDWKCV.js.map
34
- //# sourceMappingURL=document-class-45GDWKCV.js.map