@salla.sa/twilight-theme-engine 1.0.109 → 1.0.110

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 (306) hide show
  1. package/dist/{AddToCartForm-ZIZKGYJR.js → AddToCartForm-JKGAATX3.js} +3 -3
  2. package/dist/{AddToCartForm-ZIZKGYJR.js.map → AddToCartForm-JKGAATX3.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-GLAYDKIX.js → BlogAuthorPage-GM2T2QPS.js} +27 -26
  4. package/dist/BlogAuthorPage-GM2T2QPS.js.map +1 -0
  5. package/dist/{BlogCategoryPage-KPU6LYHK.js → BlogCategoryPage-KSC5UCJY.js} +27 -26
  6. package/dist/BlogCategoryPage-KSC5UCJY.js.map +1 -0
  7. package/dist/{BlogPage-VDDHOD33.js → BlogPage-5QTDYSZR.js} +25 -24
  8. package/dist/BlogPage-5QTDYSZR.js.map +1 -0
  9. package/dist/{BlogSinglePage-UWP5MFAS.js → BlogSinglePage-JKRNJ3P7.js} +25 -24
  10. package/dist/BlogSinglePage-JKRNJ3P7.js.map +1 -0
  11. package/dist/{BlogTagPage-V3Z4AD4C.js → BlogTagPage-JTOBAXV2.js} +27 -26
  12. package/dist/BlogTagPage-JTOBAXV2.js.map +1 -0
  13. package/dist/{BrandsPage-ARYKHCTB.js → BrandsPage-6IEMAQ3V.js} +26 -25
  14. package/dist/BrandsPage-6IEMAQ3V.js.map +1 -0
  15. package/dist/{Breadcrumb-XT2MP2ZW.js → Breadcrumb-267KWOPY.js} +25 -24
  16. package/dist/Breadcrumb-267KWOPY.js.map +1 -0
  17. package/dist/{CartItem-4VXVOKVF.js → CartItem-BUP3WUZC.js} +25 -24
  18. package/dist/CartItem-BUP3WUZC.js.map +1 -0
  19. package/dist/{CartSummary-K23PGOUL.js → CartSummary-U3MOISSP.js} +25 -24
  20. package/dist/CartSummary-U3MOISSP.js.map +1 -0
  21. package/dist/{Copyright-KBCQVD5Y.js → Copyright-FSNCI3EE.js} +3 -3
  22. package/dist/{Copyright-KBCQVD5Y.js.map → Copyright-FSNCI3EE.js.map} +1 -1
  23. package/dist/{CustomerLayout-B77ZKB4X.js → CustomerLayout-JCOMMGZ7.js} +25 -24
  24. package/dist/CustomerLayout-JCOMMGZ7.js.map +1 -0
  25. package/dist/{Footer-L52M4T24.js → Footer-VP3IBUMQ.js} +5 -4
  26. package/dist/{Footer-L52M4T24.js.map → Footer-VP3IBUMQ.js.map} +1 -1
  27. package/dist/Header-3YOZ7XLJ.js +22 -0
  28. package/dist/{Header-QOAV23HD.js.map → Header-3YOZ7XLJ.js.map} +1 -1
  29. package/dist/{LoyaltyPage-3OIZG2ZJ.js → LoyaltyPage-5X42RIJQ.js} +25 -24
  30. package/dist/LoyaltyPage-5X42RIJQ.js.map +1 -0
  31. package/dist/{LoyaltyPointsPage-I3O3JA7Q.js → LoyaltyPointsPage-67KYJN2Z.js} +9 -8
  32. package/dist/LoyaltyPointsPage-67KYJN2Z.js.map +1 -0
  33. package/dist/{MainMenu-VIDYUQNX.js → MainMenu-FYIK55JU.js} +7 -7
  34. package/dist/{MainMenu-VIDYUQNX.js.map → MainMenu-FYIK55JU.js.map} +1 -1
  35. package/dist/{MasterLayout-FY666JMR.js → MasterLayout-UMZHQTU2.js} +25 -24
  36. package/dist/{MasterLayout-FY666JMR.js.map → MasterLayout-UMZHQTU2.js.map} +1 -1
  37. package/dist/{MobileMenu-3ILQKCHA.js → MobileMenu-FFPJYJ7F.js} +26 -25
  38. package/dist/MobileMenu-FFPJYJ7F.js.map +1 -0
  39. package/dist/{NotificationsPage-EYTBUS36.js → NotificationsPage-HKJN6ME2.js} +25 -24
  40. package/dist/NotificationsPage-HKJN6ME2.js.map +1 -0
  41. package/dist/{OrderSinglePage-YHA5D2ZI.js → OrderSinglePage-ASYL4SMQ.js} +26 -25
  42. package/dist/OrderSinglePage-ASYL4SMQ.js.map +1 -0
  43. package/dist/{OrdersPage-4A2QINDX.js → OrdersPage-IQXHFGLQ.js} +25 -24
  44. package/dist/OrdersPage-IQXHFGLQ.js.map +1 -0
  45. package/dist/{PageSingle-ED24MS2Z.js → PageSingle-B4WQVQVQ.js} +6 -6
  46. package/dist/{PageSingle-ED24MS2Z.js.map → PageSingle-B4WQVQVQ.js.map} +1 -1
  47. package/dist/{ProductDetails-ZA5A66JW.js → ProductDetails-WSEGLJSW.js} +7 -7
  48. package/dist/{ProductDetails-ZA5A66JW.js.map → ProductDetails-WSEGLJSW.js.map} +1 -1
  49. package/dist/{ProfilePage-ZTYHIDGE.js → ProfilePage-6GNEI6OV.js} +25 -24
  50. package/dist/ProfilePage-6GNEI6OV.js.map +1 -0
  51. package/dist/{ReviewsPage-LTEOFKHW.js → ReviewsPage-JP4LZI4A.js} +3 -3
  52. package/dist/{ReviewsPage-LTEOFKHW.js.map → ReviewsPage-JP4LZI4A.js.map} +1 -1
  53. package/dist/{SeoCartWidget-3O35VZZO.js → SeoCartWidget-KCB4E65P.js} +25 -24
  54. package/dist/SeoCartWidget-KCB4E65P.js.map +1 -0
  55. package/dist/{SettingsPage-3VRJ3AYE.js → SettingsPage-UFGVJOI2.js} +25 -24
  56. package/dist/SettingsPage-UFGVJOI2.js.map +1 -0
  57. package/dist/StoreClosedNotification-Q4QPPYEH.js +55 -0
  58. package/dist/{StoreClosedNotification-7KACKGVH.js.map → StoreClosedNotification-Q4QPPYEH.js.map} +1 -1
  59. package/dist/{TestimonialsPage-LYJFX32D.js → TestimonialsPage-K5PHW7WD.js} +6 -6
  60. package/dist/{TestimonialsPage-LYJFX32D.js.map → TestimonialsPage-K5PHW7WD.js.map} +1 -1
  61. package/dist/{ThankYouPage-Z2S7MJ7J.js → ThankYouPage-DSDAYYJN.js} +25 -24
  62. package/dist/ThankYouPage-DSDAYYJN.js.map +1 -0
  63. package/dist/{WalletPage-EZ4RTLGE.js → WalletPage-3LWCFG25.js} +26 -25
  64. package/dist/WalletPage-3LWCFG25.js.map +1 -0
  65. package/dist/{WishlistPage-V7Z6GWQI.js → WishlistPage-LF4A2H3I.js} +27 -26
  66. package/dist/WishlistPage-LF4A2H3I.js.map +1 -0
  67. package/dist/api/advertisement.js +4 -4
  68. package/dist/api/apps.js +4 -4
  69. package/dist/api/blog.js +6 -6
  70. package/dist/api/brands.js +6 -6
  71. package/dist/api/cart.js +6 -6
  72. package/dist/api/category.js +6 -6
  73. package/dist/api/client.js +3 -3
  74. package/dist/api/home.js +4 -4
  75. package/dist/api/loyalty.js +6 -6
  76. package/dist/api/menu.js +4 -4
  77. package/dist/api/notification.js +4 -4
  78. package/dist/api/order.js +6 -6
  79. package/dist/api/page.js +6 -6
  80. package/dist/api/product.js +6 -6
  81. package/dist/api/profile.js +3 -3
  82. package/dist/api/store.js +4 -4
  83. package/dist/api/translations.js +4 -4
  84. package/dist/api/user.js +4 -4
  85. package/dist/api/wallet.js +4 -4
  86. package/dist/api/wishlist.js +7 -7
  87. package/dist/{chunk-C7CJZ5DK.js → chunk-3DNVQVNY.js} +3 -3
  88. package/dist/{chunk-C7CJZ5DK.js.map → chunk-3DNVQVNY.js.map} +1 -1
  89. package/dist/{chunk-UCJNWQF2.js → chunk-4INSECDW.js} +3 -3
  90. package/dist/{chunk-UCJNWQF2.js.map → chunk-4INSECDW.js.map} +1 -1
  91. package/dist/{chunk-3WMGAFWX.js → chunk-56OZRZIZ.js} +4 -4
  92. package/dist/{chunk-3WMGAFWX.js.map → chunk-56OZRZIZ.js.map} +1 -1
  93. package/dist/{chunk-PFMTPKZO.js → chunk-6NV6T24C.js} +3 -3
  94. package/dist/{chunk-PFMTPKZO.js.map → chunk-6NV6T24C.js.map} +1 -1
  95. package/dist/{chunk-SGZ6TCHB.js → chunk-6T7FUHJY.js} +4 -4
  96. package/dist/{chunk-SGZ6TCHB.js.map → chunk-6T7FUHJY.js.map} +1 -1
  97. package/dist/{chunk-GIAXPCHD.js → chunk-6Z6BGS7P.js} +3 -3
  98. package/dist/{chunk-GIAXPCHD.js.map → chunk-6Z6BGS7P.js.map} +1 -1
  99. package/dist/{chunk-IRLKZ3LB.js → chunk-72DGJN4Q.js} +21 -21
  100. package/dist/{chunk-IRLKZ3LB.js.map → chunk-72DGJN4Q.js.map} +1 -1
  101. package/dist/{chunk-CQ6J4FKU.js → chunk-7T5UR3XD.js} +4 -4
  102. package/dist/{chunk-CQ6J4FKU.js.map → chunk-7T5UR3XD.js.map} +1 -1
  103. package/dist/{chunk-P36CIH6E.js → chunk-7ZBSIOVM.js} +7 -7
  104. package/dist/{chunk-P36CIH6E.js.map → chunk-7ZBSIOVM.js.map} +1 -1
  105. package/dist/{chunk-3MTOUUC7.js → chunk-ALAHGZPN.js} +4 -4
  106. package/dist/{chunk-3MTOUUC7.js.map → chunk-ALAHGZPN.js.map} +1 -1
  107. package/dist/{chunk-TTTI4W5F.js → chunk-BFA2U7P3.js} +4 -4
  108. package/dist/{chunk-TTTI4W5F.js.map → chunk-BFA2U7P3.js.map} +1 -1
  109. package/dist/{chunk-HSXQUHZO.js → chunk-CA3QVM6Y.js} +5 -5
  110. package/dist/{chunk-HSXQUHZO.js.map → chunk-CA3QVM6Y.js.map} +1 -1
  111. package/dist/{chunk-WX2UWLMW.js → chunk-CFARTPUQ.js} +3 -3
  112. package/dist/{chunk-WX2UWLMW.js.map → chunk-CFARTPUQ.js.map} +1 -1
  113. package/dist/chunk-D6XIFBYA.js +14 -0
  114. package/dist/{chunk-2RRZZYH4.js.map → chunk-D6XIFBYA.js.map} +1 -1
  115. package/dist/{chunk-3QJCZSLR.js → chunk-E5PEYI5I.js} +5 -5
  116. package/dist/{chunk-3QJCZSLR.js.map → chunk-E5PEYI5I.js.map} +1 -1
  117. package/dist/{chunk-U46RGTYO.js → chunk-E7AO2Q32.js} +3 -3
  118. package/dist/{chunk-U46RGTYO.js.map → chunk-E7AO2Q32.js.map} +1 -1
  119. package/dist/{chunk-RJ5HY6PN.js → chunk-EJLVOWXU.js} +4 -4
  120. package/dist/{chunk-RJ5HY6PN.js.map → chunk-EJLVOWXU.js.map} +1 -1
  121. package/dist/{chunk-LG2UQKSH.js → chunk-FJQD3LTR.js} +4 -4
  122. package/dist/{chunk-LG2UQKSH.js.map → chunk-FJQD3LTR.js.map} +1 -1
  123. package/dist/{chunk-HSKRX3WR.js → chunk-FMSRB2TT.js} +4 -4
  124. package/dist/{chunk-HSKRX3WR.js.map → chunk-FMSRB2TT.js.map} +1 -1
  125. package/dist/{chunk-VM5Y62RM.js → chunk-FNM2OUPD.js} +4 -4
  126. package/dist/{chunk-VM5Y62RM.js.map → chunk-FNM2OUPD.js.map} +1 -1
  127. package/dist/{chunk-KPQEPQ4L.js → chunk-G3VAJVY5.js} +7 -7
  128. package/dist/{chunk-KPQEPQ4L.js.map → chunk-G3VAJVY5.js.map} +1 -1
  129. package/dist/{chunk-WAYZZVNX.js → chunk-GAGTCI3J.js} +4 -4
  130. package/dist/{chunk-WAYZZVNX.js.map → chunk-GAGTCI3J.js.map} +1 -1
  131. package/dist/{chunk-GGATZRAY.js → chunk-I7WSIN27.js} +3 -3
  132. package/dist/{chunk-GGATZRAY.js.map → chunk-I7WSIN27.js.map} +1 -1
  133. package/dist/{chunk-N5WT7UM3.js → chunk-IAHWLUFK.js} +3 -3
  134. package/dist/{chunk-N5WT7UM3.js.map → chunk-IAHWLUFK.js.map} +1 -1
  135. package/dist/{chunk-HGA5D4LJ.js → chunk-K7U46BT2.js} +4 -4
  136. package/dist/{chunk-HGA5D4LJ.js.map → chunk-K7U46BT2.js.map} +1 -1
  137. package/dist/{chunk-NEPWW7KM.js → chunk-LU5DRXS5.js} +3 -3
  138. package/dist/{chunk-NEPWW7KM.js.map → chunk-LU5DRXS5.js.map} +1 -1
  139. package/dist/{chunk-6V4SM23M.js → chunk-MEMJOJO4.js} +3 -3
  140. package/dist/{chunk-6V4SM23M.js.map → chunk-MEMJOJO4.js.map} +1 -1
  141. package/dist/{chunk-ZM4J5A4Z.js → chunk-MJ7TL42D.js} +3 -3
  142. package/dist/{chunk-ZM4J5A4Z.js.map → chunk-MJ7TL42D.js.map} +1 -1
  143. package/dist/{chunk-TOVC6CV7.js → chunk-MVBMVM22.js} +5 -5
  144. package/dist/{chunk-TOVC6CV7.js.map → chunk-MVBMVM22.js.map} +1 -1
  145. package/dist/{chunk-B272JNRU.js → chunk-OMY65JIW.js} +4 -4
  146. package/dist/{chunk-B272JNRU.js.map → chunk-OMY65JIW.js.map} +1 -1
  147. package/dist/chunk-OQIIJRAS.js +30 -0
  148. package/dist/chunk-OQIIJRAS.js.map +1 -0
  149. package/dist/{chunk-QZM4ZACO.js → chunk-OSAFBMRT.js} +3 -3
  150. package/dist/{chunk-QZM4ZACO.js.map → chunk-OSAFBMRT.js.map} +1 -1
  151. package/dist/{chunk-N6B4LPKS.js → chunk-PF2WSBJ7.js} +4 -4
  152. package/dist/{chunk-N6B4LPKS.js.map → chunk-PF2WSBJ7.js.map} +1 -1
  153. package/dist/{chunk-QEPZPPLH.js → chunk-PKJJ6Z7A.js} +3 -3
  154. package/dist/{chunk-QEPZPPLH.js.map → chunk-PKJJ6Z7A.js.map} +1 -1
  155. package/dist/{chunk-YUI6R2PA.js → chunk-POI4G5EA.js} +112 -7
  156. package/dist/chunk-POI4G5EA.js.map +1 -0
  157. package/dist/{chunk-I2ZO57UV.js → chunk-S67SB2O2.js} +6 -6
  158. package/dist/{chunk-I2ZO57UV.js.map → chunk-S67SB2O2.js.map} +1 -1
  159. package/dist/{chunk-TUVDPELG.js → chunk-SCSJROJX.js} +8 -8
  160. package/dist/{chunk-TUVDPELG.js.map → chunk-SCSJROJX.js.map} +1 -1
  161. package/dist/{chunk-VDBDYFAL.js → chunk-TL256OK3.js} +4 -4
  162. package/dist/{chunk-VDBDYFAL.js.map → chunk-TL256OK3.js.map} +1 -1
  163. package/dist/{chunk-4SZZPXM2.js → chunk-TMMK2VYE.js} +50 -17
  164. package/dist/chunk-TMMK2VYE.js.map +1 -0
  165. package/dist/{chunk-UEOXX7N2.js → chunk-VFXAHTB3.js} +6 -6
  166. package/dist/{chunk-UEOXX7N2.js.map → chunk-VFXAHTB3.js.map} +1 -1
  167. package/dist/{chunk-SCL6EXHP.js → chunk-VIR6L7KJ.js} +6 -4
  168. package/dist/chunk-VIR6L7KJ.js.map +1 -0
  169. package/dist/{chunk-IXFBHQ5P.js → chunk-WD576F4S.js} +3 -3
  170. package/dist/{chunk-IXFBHQ5P.js.map → chunk-WD576F4S.js.map} +1 -1
  171. package/dist/{chunk-WEN6FKY6.js → chunk-WN35SBLD.js} +3 -3
  172. package/dist/{chunk-WEN6FKY6.js.map → chunk-WN35SBLD.js.map} +1 -1
  173. package/dist/{chunk-UO4HPAP5.js → chunk-WRYCOIYC.js} +8 -8
  174. package/dist/{chunk-UO4HPAP5.js.map → chunk-WRYCOIYC.js.map} +1 -1
  175. package/dist/{chunk-L6TSHT52.js → chunk-X2JCU7GY.js} +3 -3
  176. package/dist/{chunk-L6TSHT52.js.map → chunk-X2JCU7GY.js.map} +1 -1
  177. package/dist/{chunk-YDKPG3AP.js → chunk-XU33IHQA.js} +7 -7
  178. package/dist/{chunk-YDKPG3AP.js.map → chunk-XU33IHQA.js.map} +1 -1
  179. package/dist/{chunk-NEKHAKA7.js → chunk-YSYA64WS.js} +96 -18
  180. package/dist/chunk-YSYA64WS.js.map +1 -0
  181. package/dist/{chunk-YZDHDHSN.js → chunk-YYMKDBZV.js} +3 -3
  182. package/dist/{chunk-YZDHDHSN.js.map → chunk-YYMKDBZV.js.map} +1 -1
  183. package/dist/{chunk-N6JUOBYJ.js → chunk-Z4UTYKKV.js} +4 -4
  184. package/dist/{chunk-N6JUOBYJ.js.map → chunk-Z4UTYKKV.js.map} +1 -1
  185. package/dist/{chunk-7JAOXOEW.js → chunk-ZDKQL2E4.js} +4 -4
  186. package/dist/{chunk-7JAOXOEW.js.map → chunk-ZDKQL2E4.js.map} +1 -1
  187. package/dist/{chunk-4CCCNO2Q.js → chunk-ZRT6L6TC.js} +3 -3
  188. package/dist/{chunk-4CCCNO2Q.js.map → chunk-ZRT6L6TC.js.map} +1 -1
  189. package/dist/components/cart/index.js +1 -1
  190. package/dist/components/common/index.js +1 -1
  191. package/dist/components/drawer/index.js +23 -22
  192. package/dist/components/home/index.js +27 -26
  193. package/dist/components/layout/Footer.d.ts.map +1 -1
  194. package/dist/components/layout/MadeWithSalla.d.ts +9 -0
  195. package/dist/components/layout/MadeWithSalla.d.ts.map +1 -0
  196. package/dist/components/layout/index.d.ts +2 -0
  197. package/dist/components/layout/index.d.ts.map +1 -1
  198. package/dist/components/layout/index.js +7 -6
  199. package/dist/components/product/index.js +24 -23
  200. package/dist/components/store/index.js +24 -23
  201. package/dist/components/toast/index.js +4 -4
  202. package/dist/dev/editor/index.js +2 -2
  203. package/dist/dev/index.js +2 -2
  204. package/dist/document-class-5BRFPS6J.js +29 -0
  205. package/dist/{document-class-2PMYG45N.js.map → document-class-5BRFPS6J.js.map} +1 -1
  206. package/dist/hooks/index.js +23 -22
  207. package/dist/hooks/useComments.js +3 -3
  208. package/dist/hooks/useGtm.js +23 -22
  209. package/dist/hooks/useMoney.js +23 -22
  210. package/dist/hooks/useProduct.js +3 -3
  211. package/dist/hooks/useStore.js +23 -22
  212. package/dist/hooks/useUser.js +5 -5
  213. package/dist/hooks/useWishlist.js +3 -3
  214. package/dist/index.js +23 -22
  215. package/dist/index.js.map +1 -1
  216. package/dist/native-app/index.js +3 -3
  217. package/dist/{navigation-3HNNCUGK.js → navigation-NM4AO2OX.js} +7 -7
  218. package/dist/{navigation-3HNNCUGK.js.map → navigation-NM4AO2OX.js.map} +1 -1
  219. package/dist/navigation-S5EUYOVI.js +14 -0
  220. package/dist/{navigation-GF4ODD46.js.map → navigation-S5EUYOVI.js.map} +1 -1
  221. package/dist/{not-found-5YCYDSHS.js → not-found-NO54GPIK.js} +26 -25
  222. package/dist/not-found-NO54GPIK.js.map +1 -0
  223. package/dist/providers/index.js +23 -22
  224. package/dist/routes/account/orders.js +8 -8
  225. package/dist/routes/account.js +17 -17
  226. package/dist/routes/blog.js +12 -12
  227. package/dist/routes/brands.js +8 -8
  228. package/dist/routes/cart.js +31 -30
  229. package/dist/routes/cart.js.map +1 -1
  230. package/dist/routes/home.js +28 -27
  231. package/dist/routes/index.js +6 -6
  232. package/dist/routes/loyalty.js +9 -9
  233. package/dist/routes/page.js +8 -8
  234. package/dist/routes/product-listing.js +29 -28
  235. package/dist/routes/product-listing.js.map +1 -1
  236. package/dist/routes/product.js +27 -26
  237. package/dist/routes/product.js.map +1 -1
  238. package/dist/routes/root/beforeLoad.d.ts +6 -0
  239. package/dist/routes/root/beforeLoad.d.ts.map +1 -1
  240. package/dist/routes/seo-redirects.js +6 -6
  241. package/dist/routes/testimonials.js +4 -3
  242. package/dist/routes/testimonials.js.map +1 -1
  243. package/dist/routes/thank-you.js +8 -8
  244. package/dist/skeleton.js +28 -27
  245. package/dist/{store-lookup-TK4QCWNT.js → store-lookup-LVKWUL6Z.js} +11 -11
  246. package/dist/{store-lookup-TK4QCWNT.js.map → store-lookup-LVKWUL6Z.js.map} +1 -1
  247. package/dist/tanstack/middleware/twilight.d.ts.map +1 -1
  248. package/dist/tanstack/store-base.d.ts +10 -2
  249. package/dist/tanstack/store-base.d.ts.map +1 -1
  250. package/dist/tanstack/templates/locale-wrapper.d.ts +2 -1
  251. package/dist/tanstack/templates/locale-wrapper.d.ts.map +1 -1
  252. package/dist/tanstack.js +42 -20
  253. package/dist/tanstack.js.map +1 -1
  254. package/dist/types/index.d.ts +8 -0
  255. package/dist/types/index.d.ts.map +1 -1
  256. package/dist/utils/baseHead.d.ts +6 -1
  257. package/dist/utils/baseHead.d.ts.map +1 -1
  258. package/dist/utils/baseHead.js +3 -1
  259. package/dist/utils/cookies.d.ts +6 -0
  260. package/dist/utils/cookies.d.ts.map +1 -1
  261. package/dist/utils/index.js +6 -6
  262. package/dist/utils/language-cookie.d.ts +10 -0
  263. package/dist/utils/language-cookie.d.ts.map +1 -0
  264. package/dist/utils/shared-host-language.d.ts +72 -0
  265. package/dist/utils/shared-host-language.d.ts.map +1 -0
  266. package/dist/utils/store-base.d.ts +28 -6
  267. package/dist/utils/store-base.d.ts.map +1 -1
  268. package/dist/vite/index.js +41 -5
  269. package/dist/vite/index.js.map +1 -1
  270. package/package.json +1 -1
  271. package/tailwind/components/layout/Footer.tsx.txt +2 -0
  272. package/tailwind/components/layout/MadeWithSalla.tsx.txt +34 -0
  273. package/tailwind/components/layout/index.ts.txt +3 -0
  274. package/tailwind/routes/root/beforeLoad.ts.txt +53 -1
  275. package/dist/BlogAuthorPage-GLAYDKIX.js.map +0 -1
  276. package/dist/BlogCategoryPage-KPU6LYHK.js.map +0 -1
  277. package/dist/BlogPage-VDDHOD33.js.map +0 -1
  278. package/dist/BlogSinglePage-UWP5MFAS.js.map +0 -1
  279. package/dist/BlogTagPage-V3Z4AD4C.js.map +0 -1
  280. package/dist/BrandsPage-ARYKHCTB.js.map +0 -1
  281. package/dist/Breadcrumb-XT2MP2ZW.js.map +0 -1
  282. package/dist/CartItem-4VXVOKVF.js.map +0 -1
  283. package/dist/CartSummary-K23PGOUL.js.map +0 -1
  284. package/dist/CustomerLayout-B77ZKB4X.js.map +0 -1
  285. package/dist/Header-QOAV23HD.js +0 -22
  286. package/dist/LoyaltyPage-3OIZG2ZJ.js.map +0 -1
  287. package/dist/LoyaltyPointsPage-I3O3JA7Q.js.map +0 -1
  288. package/dist/MobileMenu-3ILQKCHA.js.map +0 -1
  289. package/dist/NotificationsPage-EYTBUS36.js.map +0 -1
  290. package/dist/OrderSinglePage-YHA5D2ZI.js.map +0 -1
  291. package/dist/OrdersPage-4A2QINDX.js.map +0 -1
  292. package/dist/ProfilePage-ZTYHIDGE.js.map +0 -1
  293. package/dist/SeoCartWidget-3O35VZZO.js.map +0 -1
  294. package/dist/SettingsPage-3VRJ3AYE.js.map +0 -1
  295. package/dist/StoreClosedNotification-7KACKGVH.js +0 -54
  296. package/dist/ThankYouPage-Z2S7MJ7J.js.map +0 -1
  297. package/dist/WalletPage-EZ4RTLGE.js.map +0 -1
  298. package/dist/WishlistPage-V7Z6GWQI.js.map +0 -1
  299. package/dist/chunk-2RRZZYH4.js +0 -14
  300. package/dist/chunk-4SZZPXM2.js.map +0 -1
  301. package/dist/chunk-NEKHAKA7.js.map +0 -1
  302. package/dist/chunk-SCL6EXHP.js.map +0 -1
  303. package/dist/chunk-YUI6R2PA.js.map +0 -1
  304. package/dist/document-class-2PMYG45N.js +0 -29
  305. package/dist/navigation-GF4ODD46.js +0 -14
  306. package/dist/not-found-5YCYDSHS.js.map +0 -1
@@ -1,6 +1,12 @@
1
1
  export declare const AUTH_TOKEN_COOKIE_NAME = "token";
2
2
  export declare const SCOPE_COOKIE_NAME = "scope";
3
3
  export declare const CURRENCY_COOKIE_NAME = "s-curr";
4
+ /** The language the SDK's localization modal remembers; host-wide, so shared by every store on a shared host. */
5
+ export declare const LANGUAGE_COOKIE_NAME = "s-lang";
6
+ /** Query parameter the localization modal navigates with to ask for a language. */
7
+ export declare const LANGUAGE_PARAM = "lang";
8
+ /** How long a language choice is remembered: one year, like the `scope` cookie. */
9
+ export declare const LANGUAGE_COOKIE_MAX_AGE: number;
4
10
  /**
5
11
  * Which store this request is for, when the hostname does not say.
6
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../src/utils/cookies.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAC9C,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,6EAA6E;AAC7E,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAElD,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAmB5C,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG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I,GAAG,MAAM,GAAG,IAAI,CAEpF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS,CAO7D;AAUD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAuBnE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAMhG;AAED,oFAAoF;AACpF,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAG1D;AAED,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,QAAqB,CAAC;AAEvD,eAAO,MAAM,SAAS,GAAI,GAAG,WAAW,GAAG,IAAI,EAAE,GAAG,WAAW,GAAG,IAAI,KAAG,OAChC,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAYnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAGzC"}
@@ -1,16 +1,16 @@
1
1
  export { stripUnsafeHtml } from '../chunk-RUHSV4Z6.js';
2
2
  export { formatSallaPlural } from '../chunk-BT6HEEAP.js';
3
- export { dispatchRouteChanged } from '../chunk-RJ5HY6PN.js';
3
+ export { dispatchRouteChanged } from '../chunk-EJLVOWXU.js';
4
4
  export { sortOptions } from '../chunk-3LZJXKVO.js';
5
5
  export { color } from '../chunk-VVZNW5CB.js';
6
- export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-GGATZRAY.js';
6
+ export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-I7WSIN27.js';
7
7
  export { mergeHead, resolveHead, setHeadAdapter } from '../chunk-GD26FI4J.js';
8
- export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-4SZZPXM2.js';
8
+ export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-TMMK2VYE.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-TTTI4W5F.js';
12
- export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-L6TSHT52.js';
13
- export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-YUI6R2PA.js';
11
+ import '../chunk-BFA2U7P3.js';
12
+ export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-X2JCU7GY.js';
13
+ export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-POI4G5EA.js';
14
14
  import '../chunk-QRHXAKJ3.js';
15
15
  import '../chunk-T72DAX7R.js';
16
16
  import '../chunk-DGUM43GV.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The query string of the page being rendered (`?lang=en`, or `''`): the request's on the
3
+ * server, the address bar's in the browser, so both sides read the same one.
4
+ */
5
+ export declare function readPageSearch(): string;
6
+ /** The `Cookie` header of the request being handled, or `document.cookie` in the browser. */
7
+ export declare function readCookieHeader(): string | null;
8
+ /** Remembers `code` as the visitor's language for every store on this host. */
9
+ export declare function persistLanguageCookie(code: string): void;
10
+ //# sourceMappingURL=language-cookie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-cookie.d.ts","sourceRoot":"","sources":["../../src/utils/language-cookie.ts"],"names":[],"mappings":"AA+CA;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKxD"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @fileoverview The language of a page on a Salla shared host, where the URL does not carry it.
3
+ *
4
+ * On `demostore.salla.sa` and `salla.sa` a store is addressed `/dev-x/cart`. The route tree
5
+ * still has a `/{-$locale}` segment, so the router puts a *virtual* locale in front of the
6
+ * path on the way in and takes it off on the way out (`tanstack/store-base.ts`). This file
7
+ * decides which one, and what to do when the choice is not one the store offers. See
8
+ * `docs/store-base-path.md`.
9
+ *
10
+ * Pure: no request, no cookies written. The callers read and write those.
11
+ */
12
+ import type { StoreContext } from '../api/store';
13
+ /** Whether a query string (with or without the `?`) carries `lang`, whatever its value. */
14
+ export declare function hasLanguageParam(search: string): boolean;
15
+ /** The language the `s-lang` cookie remembers, if it is a known one. */
16
+ export declare function languageFromCookies(cookieHeader: string | null): string | null;
17
+ /**
18
+ * The language a request on a shared host is for, before the store's settings are known:
19
+ * `?lang=`, then the `s-lang` cookie, then {@link FALLBACK_LOCALE}. Each must be a language
20
+ * the engine knows; whether the store offers it is {@link decideSharedHostLanguage}'s
21
+ * question.
22
+ */
23
+ export declare function virtualLocale(search: string, cookieHeader: string | null): string;
24
+ /**
25
+ * Whether the store has more than one language to choose between.
26
+ *
27
+ * Both signals count: the merchant's `is_multilingual` switch, and the number of languages
28
+ * the settings list. Either one saying "single" makes the store single-language. The count
29
+ * is only used when the settings carry the list at all.
30
+ */
31
+ export declare function isMultilingualStore(settings: StoreContext | null | undefined): boolean;
32
+ /** The store's default language: the one marked, else the engine's fallback, else the first listed. */
33
+ export declare function defaultLanguage(settings: StoreContext): string | null;
34
+ /**
35
+ * The languages this store can be shown in, or null when its settings did not list any
36
+ * (nothing to check against). A store that is not multilingual shows its default only.
37
+ */
38
+ export declare function offeredLanguages(settings: StoreContext): string[] | null;
39
+ /** `search` (a query string, with or without `?`) without `lang`, and then `lang=<code>` if given. */
40
+ export declare function withLanguageParam(search: string, code?: string): string;
41
+ export interface SharedHostLanguage {
42
+ /** A language to remember in the `s-lang` cookie, or null to leave the cookie alone. */
43
+ cookie: string | null;
44
+ /** Where to send the visitor (path, query and hash, in the address the browser uses), or null to render. */
45
+ redirectTo: string | null;
46
+ }
47
+ /**
48
+ * What to do with the language of a page on a shared host, once the store's settings are in.
49
+ *
50
+ * - `?lang=` asking for a language the store offers is remembered in the cookie. It is taken
51
+ * off the URL with a redirect when that cannot change what the next request renders: the
52
+ * cookie already says it, or it is the fallback a cookieless request gets anyway. Otherwise
53
+ * it stays, so a visitor whose browser drops the cookie is not sent round in circles.
54
+ * - `?lang=` asking for one the store does not offer is dropped, and nothing is remembered.
55
+ * - No `?lang=`, and the language the request resolved to is not offered (a stale cookie
56
+ * from another store on this host, or the fallback of a store that does not offer it):
57
+ * sent to `?lang=<the store's default>`.
58
+ *
59
+ * Every redirect either removes `?lang=` or adds one for an offered language, so none
60
+ * returns the request to itself.
61
+ *
62
+ * @param href - the browser's address for this page: path (with the store segment, without
63
+ * a language), query and hash.
64
+ * @param locale - the language the request resolved to ({@link virtualLocale}).
65
+ */
66
+ export declare function decideSharedHostLanguage(args: {
67
+ settings: StoreContext;
68
+ locale: string;
69
+ href: string;
70
+ cookieHeader: string | null;
71
+ }): SharedHostLanguage;
72
+ //# sourceMappingURL=shared-host-language.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-host-language.d.ts","sourceRoot":"","sources":["../../src/utils/shared-host-language.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA2BjD,2FAA2F;AAC3F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAEjF;AAUD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGtF;AAED,uGAAuG;AACvG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAOrE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,EAAE,GAAG,IAAI,CAMxE;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAOvE;AAED,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4GAA4G;IAC5G,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GAAG,kBAAkB,CAyBrB"}
@@ -5,11 +5,19 @@
5
5
  * pathname that does not start with the segment comes back unchanged.
6
6
  *
7
7
  * With `followsLocale` the segment is also taken from behind a leading locale,
8
- * where Salla's shared hosts put it (`/ar/dev-x/cart` → `/ar/cart`). It is looked
9
- * for there first, then at the root, which is where a store that is not
10
- * multilingual has it (`/dev-x/cart`).
8
+ * where Salla's shared hosts used to put it (`/ar/dev-x/cart` → `/ar/cart`). It is
9
+ * looked for there first, then at the root, which is where it is now
10
+ * (`/dev-x/cart`).
11
11
  */
12
12
  export declare function stripStoreBase(pathname: string, base: string, followsLocale?: boolean): string;
13
+ /**
14
+ * A rooted path split into its first segment and what follows it (a path, a query, a hash, or
15
+ * nothing). The segment ends at the first `/`, `?` or `#`. Plain string work, no pattern.
16
+ */
17
+ export declare function splitLeadingSegment(rooted: string): {
18
+ first: string;
19
+ rest: string;
20
+ };
13
21
  /**
14
22
  * An application path as the browser addresses it, with the store segment in front.
15
23
  *
@@ -17,11 +25,25 @@ export declare function stripStoreBase(pathname: string, base: string, followsLo
17
25
  * told apart from a page of the same name: a store called `cart` keeps its cart at
18
26
  * `/cart/cart`. Callers pass application paths only.
19
27
  *
20
- * With `followsLocale` the segment goes behind a leading locale instead, which is
21
- * the address Salla gives a store on a shared host (`/ar/cart` → `/ar/dev-x/cart`,
22
- * the same shape as its `store.url`). A path with no locale still gets it in front.
28
+ * With `followsLocale` (a Salla shared host) the address has no language in it at
29
+ * all: a leading locale is dropped (`/ar/cart` → `/dev-x/cart`). The language comes
30
+ * back from `?lang=` or the `s-lang` cookie on the way in (`tanstack/store-base.ts`).
23
31
  */
24
32
  export declare function prefixStoreBase(path: string, base: string, followsLocale?: boolean): string;
33
+ /**
34
+ * Where to send a request that still uses the old shared-host address, or null when it
35
+ * does not.
36
+ *
37
+ * Shared hosts used to put the language in front of the store (`/ar/dev-x/cart`) and now
38
+ * leave it out (`/dev-x/cart`). A link in the old shape is sent once to the new one,
39
+ * carrying its language as `?lang=` so the visitor keeps it; the page then remembers it
40
+ * and the language stays out of the address (`rootBeforeLoad`).
41
+ *
42
+ * Only a path that *starts* with a locale and then names this store as a whole segment
43
+ * matches, so a page whose slug is a locale code, or that is spelled like the store, is
44
+ * never redirected. The result is a relative path: it cannot leave the host.
45
+ */
46
+ export declare function legacyLocaleRedirectHref(url: string, base: string): string | null;
25
47
  /**
26
48
  * A pathname from a link the Salla API handed out, without the store's username in it.
27
49
  *
@@ -1 +1 @@
1
- {"version":3,"file":"store-base.d.ts","sourceRoot":"","sources":["../../src/utils/store-base.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC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,GAAG,IAAI,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,MAAM,GAAG,IAAI,CAUhB"}
@@ -1,12 +1,13 @@
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-UCJNWQF2.js';
3
+ import { tanstackHeadAdapter } from '../chunk-4INSECDW.js';
4
4
  import { nextjsHeadAdapter } from '../chunk-HOSHJBPS.js';
5
5
  import '../chunk-LZZ6EESI.js';
6
6
  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';
7
7
  import { setHeadAdapter } from '../chunk-GD26FI4J.js';
8
- import '../chunk-4SZZPXM2.js';
8
+ import '../chunk-TMMK2VYE.js';
9
9
  import { RouteId } from '../chunk-OUW6WESU.js';
10
+ import '../chunk-POI4G5EA.js';
10
11
  import '../chunk-QRHXAKJ3.js';
11
12
  import '../chunk-T72DAX7R.js';
12
13
  import '../chunk-DGUM43GV.js';
@@ -1871,12 +1872,47 @@ export const Route = createFileRoute('/{-$locale}')({
1871
1872
  }
1872
1873
  },
1873
1874
  loader: async ({ params, context, location }) => {
1875
+ // On a Salla shared host the address never carries a language: the router adds a virtual
1876
+ // one on the way in and strips it on the way out, and \`rootBeforeLoad\` settles which
1877
+ // language the store shows (\`?lang=\`, the \`s-lang\` cookie, the store's default). A redirect
1878
+ // here between locale-less and locale-bearing paths would come back as the same URL.
1879
+ if (context.storeBaseFollowsLocale) return;
1880
+
1874
1881
  const settings = await context.queryClient.ensureQueryData(store.queries.settings());
1875
- const isMultilingual = settings?.store?.settings?.is_multilingual ?? true;
1882
+ // Single-language when the merchant says so, or when the store lists fewer than two
1883
+ // languages. A page with no locale is read as FALLBACK_LOCALE (\`rootBeforeLoad\`), so a
1884
+ // single-language store in another language keeps its segment instead: it is what the
1885
+ // page is addressed and read by. Without it an English-only store would render in Arabic.
1886
+ const listed = settings?.languages;
1887
+ const soleEntry = listed?.length === 1 ? listed[0] : undefined;
1888
+ const soleLang = soleEntry ? (soleEntry.iso_code ?? soleEntry.code)?.toLowerCase() : undefined;
1889
+ const single =
1890
+ settings?.store?.settings?.is_multilingual === false || (listed != null && listed.length < 2);
1891
+ const segment = single && isLocale(soleLang) && soleLang !== FALLBACK_LOCALE ? soleLang : null;
1892
+ const isMultilingual = !single;
1893
+ const pathWithoutLocale = params.locale
1894
+ ? location.pathname.slice(params.locale.length + 1) || '/'
1895
+ : location.pathname;
1876
1896
 
1877
- if (!isMultilingual && params.locale) {
1897
+ if (!isMultilingual && !segment && params.locale) {
1898
+ throw redirect({
1899
+ to: pathWithoutLocale,
1900
+ search: location.search,
1901
+ replace: true,
1902
+ });
1903
+ }
1904
+ if (!isMultilingual && segment && params.locale !== segment) {
1905
+ // The store's one language, wherever the path pointed: the right page, and the one
1906
+ // every other rule sends this visitor to.
1907
+ throw redirect({
1908
+ to: \`/\${segment}\${pathWithoutLocale === '/' ? '' : pathWithoutLocale}\`,
1909
+ search: location.search,
1910
+ replace: true,
1911
+ });
1912
+ }
1913
+ if (!isMultilingual && segment && !params.locale) {
1878
1914
  throw redirect({
1879
- to: location.pathname.slice(\`/\${params.locale}\`.length) || '/',
1915
+ to: \`/\${segment}\${location.pathname === '/' ? '' : location.pathname}\`,
1880
1916
  search: location.search,
1881
1917
  replace: true,
1882
1918
  });