@salla.sa/twilight-theme-engine 1.0.211 → 1.0.213

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 (269) hide show
  1. package/dist/{AddToCartForm-2S3HIEYO.js → AddToCartForm-N4MMD6VL.js} +3 -3
  2. package/dist/{AddToCartForm-2S3HIEYO.js.map → AddToCartForm-N4MMD6VL.js.map} +1 -1
  3. package/dist/{BlogAuthorPage-UIPJCWVQ.js → BlogAuthorPage-S2GUI5PU.js} +25 -25
  4. package/dist/{BlogAuthorPage-UIPJCWVQ.js.map → BlogAuthorPage-S2GUI5PU.js.map} +1 -1
  5. package/dist/{BlogCategoryPage-AFSGP5WT.js → BlogCategoryPage-HOKJ3QWU.js} +25 -25
  6. package/dist/{BlogCategoryPage-AFSGP5WT.js.map → BlogCategoryPage-HOKJ3QWU.js.map} +1 -1
  7. package/dist/{BlogPage-7NKZSUKO.js → BlogPage-UPC3QW3M.js} +23 -23
  8. package/dist/{BlogPage-7NKZSUKO.js.map → BlogPage-UPC3QW3M.js.map} +1 -1
  9. package/dist/{BlogSinglePage-UMHYPYNX.js → BlogSinglePage-TD33OMSO.js} +23 -23
  10. package/dist/{BlogSinglePage-UMHYPYNX.js.map → BlogSinglePage-TD33OMSO.js.map} +1 -1
  11. package/dist/{BlogTagPage-SQN4SXMC.js → BlogTagPage-LOBT2JFV.js} +25 -25
  12. package/dist/{BlogTagPage-SQN4SXMC.js.map → BlogTagPage-LOBT2JFV.js.map} +1 -1
  13. package/dist/{BrandsPage-TU2FQ3UB.js → BrandsPage-BC2AMBDU.js} +24 -24
  14. package/dist/{BrandsPage-TU2FQ3UB.js.map → BrandsPage-BC2AMBDU.js.map} +1 -1
  15. package/dist/{Breadcrumb-RNHCZA4F.js → Breadcrumb-S76SNC44.js} +23 -23
  16. package/dist/{Breadcrumb-RNHCZA4F.js.map → Breadcrumb-S76SNC44.js.map} +1 -1
  17. package/dist/{CanvasOverlay-236ZRVHI.js → CanvasOverlay-HIE2LF6E.js} +3 -3
  18. package/dist/{CanvasOverlay-236ZRVHI.js.map → CanvasOverlay-HIE2LF6E.js.map} +1 -1
  19. package/dist/{CartItem-GQH2YB75.js → CartItem-YH4EVIL5.js} +23 -23
  20. package/dist/{CartItem-GQH2YB75.js.map → CartItem-YH4EVIL5.js.map} +1 -1
  21. package/dist/{CartSummary-5HIIURD2.js → CartSummary-BXOBMFSP.js} +23 -23
  22. package/dist/{CartSummary-5HIIURD2.js.map → CartSummary-BXOBMFSP.js.map} +1 -1
  23. package/dist/{Copyright-N6FO47JO.js → Copyright-CDOSBXU2.js} +3 -3
  24. package/dist/{Copyright-N6FO47JO.js.map → Copyright-CDOSBXU2.js.map} +1 -1
  25. package/dist/{CustomerLayout-R6GLA6IE.js → CustomerLayout-H2EWMBZB.js} +23 -23
  26. package/dist/{CustomerLayout-R6GLA6IE.js.map → CustomerLayout-H2EWMBZB.js.map} +1 -1
  27. package/dist/{Footer-QIAQM4Q5.js → Footer-WJ7GSEUS.js} +3 -3
  28. package/dist/{Footer-QIAQM4Q5.js.map → Footer-WJ7GSEUS.js.map} +1 -1
  29. package/dist/GoogleTag-KZV3WKSO.js +15 -0
  30. package/dist/{GoogleTag-DFXQET34.js.map → GoogleTag-KZV3WKSO.js.map} +1 -1
  31. package/dist/{Header-TUR3EHNU.js → Header-5UZ6TNSC.js} +10 -10
  32. package/dist/{Header-TUR3EHNU.js.map → Header-5UZ6TNSC.js.map} +1 -1
  33. package/dist/{LatestProducts-2RB53H7S.js → LatestProducts-LQPDHIKA.js} +25 -25
  34. package/dist/{LatestProducts-2RB53H7S.js.map → LatestProducts-LQPDHIKA.js.map} +1 -1
  35. package/dist/{LoyaltyPage-UNF6NHZA.js → LoyaltyPage-LNIMYHR3.js} +23 -23
  36. package/dist/{LoyaltyPage-UNF6NHZA.js.map → LoyaltyPage-LNIMYHR3.js.map} +1 -1
  37. package/dist/{LoyaltyPointsPage-X45XSXB7.js → LoyaltyPointsPage-PHA3JHM2.js} +7 -7
  38. package/dist/{LoyaltyPointsPage-X45XSXB7.js.map → LoyaltyPointsPage-PHA3JHM2.js.map} +1 -1
  39. package/dist/{MainMenu-OUTLZSZK.js → MainMenu-PSN2ME5V.js} +6 -6
  40. package/dist/{MainMenu-OUTLZSZK.js.map → MainMenu-PSN2ME5V.js.map} +1 -1
  41. package/dist/{MasterLayout-32ZBX5TD.js → MasterLayout-LMG4AOWH.js} +23 -23
  42. package/dist/{MasterLayout-32ZBX5TD.js.map → MasterLayout-LMG4AOWH.js.map} +1 -1
  43. package/dist/{MobileMenu-DQYV7EGL.js → MobileMenu-TA4JGR2O.js} +24 -24
  44. package/dist/{MobileMenu-DQYV7EGL.js.map → MobileMenu-TA4JGR2O.js.map} +1 -1
  45. package/dist/{NotificationsPage-WVUGAYAG.js → NotificationsPage-XFCTNVP2.js} +23 -23
  46. package/dist/{NotificationsPage-WVUGAYAG.js.map → NotificationsPage-XFCTNVP2.js.map} +1 -1
  47. package/dist/{OrderSinglePage-KMA7PFNH.js → OrderSinglePage-HRS2SC4M.js} +26 -26
  48. package/dist/{OrderSinglePage-KMA7PFNH.js.map → OrderSinglePage-HRS2SC4M.js.map} +1 -1
  49. package/dist/{OrdersPage-DXTAFTYU.js → OrdersPage-I3OUPPDV.js} +23 -23
  50. package/dist/{OrdersPage-DXTAFTYU.js.map → OrdersPage-I3OUPPDV.js.map} +1 -1
  51. package/dist/{PageSingle-LXA5BRXS.js → PageSingle-3BSOPVBZ.js} +5 -5
  52. package/dist/{PageSingle-LXA5BRXS.js.map → PageSingle-3BSOPVBZ.js.map} +1 -1
  53. package/dist/{ProductDetails-S7TPPY3W.js → ProductDetails-F35CZZCU.js} +7 -7
  54. package/dist/{ProductDetails-S7TPPY3W.js.map → ProductDetails-F35CZZCU.js.map} +1 -1
  55. package/dist/{ProfilePage-KNPPEKY3.js → ProfilePage-BMCTP3CH.js} +23 -23
  56. package/dist/{ProfilePage-KNPPEKY3.js.map → ProfilePage-BMCTP3CH.js.map} +1 -1
  57. package/dist/{ReviewsPage-E2UMSJFS.js → ReviewsPage-R6HB3MH2.js} +3 -3
  58. package/dist/{ReviewsPage-E2UMSJFS.js.map → ReviewsPage-R6HB3MH2.js.map} +1 -1
  59. package/dist/{SeoCartWidget-PWVFEAEZ.js → SeoCartWidget-5ZDKLKMJ.js} +23 -23
  60. package/dist/{SeoCartWidget-PWVFEAEZ.js.map → SeoCartWidget-5ZDKLKMJ.js.map} +1 -1
  61. package/dist/{SettingsPage-5W2S64TK.js → SettingsPage-UYPJ6QO5.js} +23 -23
  62. package/dist/{SettingsPage-5W2S64TK.js.map → SettingsPage-UYPJ6QO5.js.map} +1 -1
  63. package/dist/{StoreClosedNotification-7PFADAJU.js → StoreClosedNotification-4CARFVOG.js} +24 -24
  64. package/dist/{StoreClosedNotification-7PFADAJU.js.map → StoreClosedNotification-4CARFVOG.js.map} +1 -1
  65. package/dist/{TestimonialsPage-K5UTZ2SS.js → TestimonialsPage-6PEBTBYZ.js} +5 -5
  66. package/dist/{TestimonialsPage-K5UTZ2SS.js.map → TestimonialsPage-6PEBTBYZ.js.map} +1 -1
  67. package/dist/{ThankYouPage-OUWYUEUD.js → ThankYouPage-OBYA7FZW.js} +23 -23
  68. package/dist/{ThankYouPage-OUWYUEUD.js.map → ThankYouPage-OBYA7FZW.js.map} +1 -1
  69. package/dist/{WalletPage-MM6VKKIZ.js → WalletPage-OQUQDIW3.js} +24 -24
  70. package/dist/{WalletPage-MM6VKKIZ.js.map → WalletPage-OQUQDIW3.js.map} +1 -1
  71. package/dist/{WebMcpTools-VLZH7CTG.js → WebMcpTools-PT36R4Z2.js} +7 -7
  72. package/dist/{WebMcpTools-VLZH7CTG.js.map → WebMcpTools-PT36R4Z2.js.map} +1 -1
  73. package/dist/{WishlistPage-MPCJXTRI.js → WishlistPage-VP3EUOJF.js} +25 -25
  74. package/dist/{WishlistPage-MPCJXTRI.js.map → WishlistPage-VP3EUOJF.js.map} +1 -1
  75. package/dist/api/advertisement.js +3 -3
  76. package/dist/api/apps.js +3 -3
  77. package/dist/api/blog.js +5 -5
  78. package/dist/api/brands.js +5 -5
  79. package/dist/api/cart.js +5 -5
  80. package/dist/api/category.js +5 -5
  81. package/dist/api/client.js +2 -2
  82. package/dist/api/custom-url.js +3 -3
  83. package/dist/api/home.js +3 -3
  84. package/dist/api/loyalty.js +5 -5
  85. package/dist/api/menu.js +3 -3
  86. package/dist/api/notification.js +3 -3
  87. package/dist/api/order.js +5 -5
  88. package/dist/api/page.js +5 -5
  89. package/dist/api/product.js +5 -5
  90. package/dist/api/profile.js +2 -2
  91. package/dist/api/store.js +3 -3
  92. package/dist/api/translations.js +3 -3
  93. package/dist/api/user.js +3 -3
  94. package/dist/api/wallet.js +3 -3
  95. package/dist/api/wishlist.js +6 -6
  96. package/dist/{chunk-IU43EVAG.js → chunk-22Z2HPHZ.js} +5 -5
  97. package/dist/{chunk-IU43EVAG.js.map → chunk-22Z2HPHZ.js.map} +1 -1
  98. package/dist/{chunk-DM427NHC.js → chunk-3OWXPBB3.js} +2 -2
  99. package/dist/{chunk-DM427NHC.js.map → chunk-3OWXPBB3.js.map} +1 -1
  100. package/dist/{chunk-SVNHENYH.js → chunk-5HOEY55Q.js} +3 -3
  101. package/dist/{chunk-SVNHENYH.js.map → chunk-5HOEY55Q.js.map} +1 -1
  102. package/dist/{chunk-BLXKFLIR.js → chunk-5KJBDPHE.js} +6 -6
  103. package/dist/{chunk-BLXKFLIR.js.map → chunk-5KJBDPHE.js.map} +1 -1
  104. package/dist/{chunk-UWHRIBOH.js → chunk-5UMVEBO5.js} +5 -5
  105. package/dist/{chunk-UWHRIBOH.js.map → chunk-5UMVEBO5.js.map} +1 -1
  106. package/dist/{chunk-CGLX3SHB.js → chunk-5ZT225WZ.js} +5 -5
  107. package/dist/{chunk-CGLX3SHB.js.map → chunk-5ZT225WZ.js.map} +1 -1
  108. package/dist/{chunk-LJJM2P6G.js → chunk-6VZTX5U3.js} +3 -3
  109. package/dist/{chunk-LJJM2P6G.js.map → chunk-6VZTX5U3.js.map} +1 -1
  110. package/dist/{chunk-ONP7ZHEA.js → chunk-74HPO4GY.js} +3 -3
  111. package/dist/{chunk-ONP7ZHEA.js.map → chunk-74HPO4GY.js.map} +1 -1
  112. package/dist/{chunk-JV7ZGSR6.js → chunk-AACB4TUN.js} +4 -4
  113. package/dist/{chunk-JV7ZGSR6.js.map → chunk-AACB4TUN.js.map} +1 -1
  114. package/dist/{chunk-DIGHZ2TF.js → chunk-AHMG3IFV.js} +5 -5
  115. package/dist/{chunk-DIGHZ2TF.js.map → chunk-AHMG3IFV.js.map} +1 -1
  116. package/dist/{chunk-VHP7NL3V.js → chunk-BIIQ4FZA.js} +3 -3
  117. package/dist/{chunk-VHP7NL3V.js.map → chunk-BIIQ4FZA.js.map} +1 -1
  118. package/dist/{chunk-BZ2QSBXM.js → chunk-BO4WTPCA.js} +3 -3
  119. package/dist/{chunk-BZ2QSBXM.js.map → chunk-BO4WTPCA.js.map} +1 -1
  120. package/dist/{chunk-X4VUTZ6G.js → chunk-BSFTK6UF.js} +5 -5
  121. package/dist/{chunk-X4VUTZ6G.js.map → chunk-BSFTK6UF.js.map} +1 -1
  122. package/dist/{chunk-S7X6KZWV.js → chunk-C53BH5CR.js} +4 -4
  123. package/dist/{chunk-S7X6KZWV.js.map → chunk-C53BH5CR.js.map} +1 -1
  124. package/dist/{chunk-TYR2U33O.js → chunk-CTRBXAY7.js} +4 -4
  125. package/dist/{chunk-TYR2U33O.js.map → chunk-CTRBXAY7.js.map} +1 -1
  126. package/dist/{chunk-NAAVZ2XI.js → chunk-DHGZXSNJ.js} +3 -3
  127. package/dist/{chunk-NAAVZ2XI.js.map → chunk-DHGZXSNJ.js.map} +1 -1
  128. package/dist/{chunk-LJD5ZGUC.js → chunk-DM2A2E43.js} +4 -4
  129. package/dist/{chunk-LJD5ZGUC.js.map → chunk-DM2A2E43.js.map} +1 -1
  130. package/dist/{chunk-DVJGKIFQ.js → chunk-DRSS7TJ3.js} +3 -3
  131. package/dist/{chunk-DVJGKIFQ.js.map → chunk-DRSS7TJ3.js.map} +1 -1
  132. package/dist/{chunk-3A3FYCFR.js → chunk-EDSZX3QE.js} +4 -4
  133. package/dist/{chunk-3A3FYCFR.js.map → chunk-EDSZX3QE.js.map} +1 -1
  134. package/dist/{chunk-MZPX4EPS.js → chunk-EX4VX4GK.js} +36 -3
  135. package/dist/chunk-EX4VX4GK.js.map +1 -0
  136. package/dist/{chunk-AA5B2KC3.js → chunk-F4D4PJ3T.js} +4 -4
  137. package/dist/{chunk-AA5B2KC3.js.map → chunk-F4D4PJ3T.js.map} +1 -1
  138. package/dist/{chunk-3BLXVAQR.js → chunk-F63K3HAG.js} +3 -3
  139. package/dist/{chunk-3BLXVAQR.js.map → chunk-F63K3HAG.js.map} +1 -1
  140. package/dist/{chunk-UY4VIWNH.js → chunk-FFHLTFHB.js} +3 -3
  141. package/dist/{chunk-UY4VIWNH.js.map → chunk-FFHLTFHB.js.map} +1 -1
  142. package/dist/{chunk-4TI4LBOQ.js → chunk-GNLXRPBC.js} +3 -3
  143. package/dist/{chunk-4TI4LBOQ.js.map → chunk-GNLXRPBC.js.map} +1 -1
  144. package/dist/{chunk-RXJL73PN.js → chunk-HCU5GODZ.js} +4 -4
  145. package/dist/{chunk-RXJL73PN.js.map → chunk-HCU5GODZ.js.map} +1 -1
  146. package/dist/{chunk-6LF7Z22K.js → chunk-HI7SDG3R.js} +4 -4
  147. package/dist/{chunk-6LF7Z22K.js.map → chunk-HI7SDG3R.js.map} +1 -1
  148. package/dist/{chunk-2OKUBHTT.js → chunk-IAGMA4A4.js} +5 -5
  149. package/dist/{chunk-2OKUBHTT.js.map → chunk-IAGMA4A4.js.map} +1 -1
  150. package/dist/{chunk-LLUE7YSQ.js → chunk-INQ7RGEJ.js} +3 -3
  151. package/dist/{chunk-LLUE7YSQ.js.map → chunk-INQ7RGEJ.js.map} +1 -1
  152. package/dist/{chunk-PSJP2HG3.js → chunk-IQMKVT2C.js} +5 -5
  153. package/dist/{chunk-PSJP2HG3.js.map → chunk-IQMKVT2C.js.map} +1 -1
  154. package/dist/{chunk-2QDPVKV3.js → chunk-ISEQMLS3.js} +3 -3
  155. package/dist/{chunk-2QDPVKV3.js.map → chunk-ISEQMLS3.js.map} +1 -1
  156. package/dist/{chunk-FICBW5IV.js → chunk-JMPVEH7U.js} +3 -3
  157. package/dist/{chunk-FICBW5IV.js.map → chunk-JMPVEH7U.js.map} +1 -1
  158. package/dist/{chunk-MNEYCPJK.js → chunk-KEB4BTPE.js} +4 -4
  159. package/dist/{chunk-MNEYCPJK.js.map → chunk-KEB4BTPE.js.map} +1 -1
  160. package/dist/{chunk-MVERA3YU.js → chunk-KQSI3TTP.js} +3 -3
  161. package/dist/{chunk-MVERA3YU.js.map → chunk-KQSI3TTP.js.map} +1 -1
  162. package/dist/{chunk-CA2UMD6A.js → chunk-L7UJ77YE.js} +5 -5
  163. package/dist/{chunk-CA2UMD6A.js.map → chunk-L7UJ77YE.js.map} +1 -1
  164. package/dist/{chunk-BG7NQSGI.js → chunk-LD7EYT7B.js} +3 -3
  165. package/dist/{chunk-BG7NQSGI.js.map → chunk-LD7EYT7B.js.map} +1 -1
  166. package/dist/{chunk-6DXMOGBI.js → chunk-LG3CUJ4V.js} +23 -22
  167. package/dist/chunk-LG3CUJ4V.js.map +1 -0
  168. package/dist/{chunk-QPZRI4JS.js → chunk-LM7Y7MG4.js} +6 -6
  169. package/dist/{chunk-QPZRI4JS.js.map → chunk-LM7Y7MG4.js.map} +1 -1
  170. package/dist/{chunk-GSAU34IP.js → chunk-MZU5ZEGL.js} +3 -3
  171. package/dist/{chunk-GSAU34IP.js.map → chunk-MZU5ZEGL.js.map} +1 -1
  172. package/dist/{chunk-NDOU3IPV.js → chunk-NFXCRFON.js} +5 -5
  173. package/dist/{chunk-NDOU3IPV.js.map → chunk-NFXCRFON.js.map} +1 -1
  174. package/dist/{chunk-43NJZKVP.js → chunk-ODBQRDUU.js} +4 -4
  175. package/dist/{chunk-43NJZKVP.js.map → chunk-ODBQRDUU.js.map} +1 -1
  176. package/dist/{chunk-AHYZEVQM.js → chunk-ORC5ETTR.js} +5 -24
  177. package/dist/chunk-ORC5ETTR.js.map +1 -0
  178. package/dist/{chunk-YWZPC3LE.js → chunk-PXVA4CFK.js} +7 -7
  179. package/dist/{chunk-YWZPC3LE.js.map → chunk-PXVA4CFK.js.map} +1 -1
  180. package/dist/{chunk-R3FQW5X3.js → chunk-RG6VTJ3F.js} +3 -3
  181. package/dist/{chunk-R3FQW5X3.js.map → chunk-RG6VTJ3F.js.map} +1 -1
  182. package/dist/{chunk-CU5VDU34.js → chunk-RWGRWXIQ.js} +3 -3
  183. package/dist/{chunk-CU5VDU34.js.map → chunk-RWGRWXIQ.js.map} +1 -1
  184. package/dist/{chunk-YVPYFGPQ.js → chunk-SV364K3U.js} +4 -4
  185. package/dist/{chunk-YVPYFGPQ.js.map → chunk-SV364K3U.js.map} +1 -1
  186. package/dist/{chunk-2KMILFUS.js → chunk-UGIPX4L3.js} +15 -15
  187. package/dist/{chunk-2KMILFUS.js.map → chunk-UGIPX4L3.js.map} +1 -1
  188. package/dist/{chunk-IIUBZEDA.js → chunk-UYOVE4ST.js} +4 -4
  189. package/dist/{chunk-IIUBZEDA.js.map → chunk-UYOVE4ST.js.map} +1 -1
  190. package/dist/{chunk-JEYIRTTV.js → chunk-VF4DW6KQ.js} +4 -4
  191. package/dist/{chunk-JEYIRTTV.js.map → chunk-VF4DW6KQ.js.map} +1 -1
  192. package/dist/{chunk-XGGV2M36.js → chunk-VNOMGCMO.js} +4 -4
  193. package/dist/{chunk-XGGV2M36.js.map → chunk-VNOMGCMO.js.map} +1 -1
  194. package/dist/{chunk-3FOYOKKX.js → chunk-W3EYJOD3.js} +4 -4
  195. package/dist/{chunk-3FOYOKKX.js.map → chunk-W3EYJOD3.js.map} +1 -1
  196. package/dist/{chunk-VJ4KJT5M.js → chunk-X7E2KD2F.js} +7 -7
  197. package/dist/{chunk-VJ4KJT5M.js.map → chunk-X7E2KD2F.js.map} +1 -1
  198. package/dist/{chunk-HU5YZCVR.js → chunk-YB356GAD.js} +8 -8
  199. package/dist/{chunk-HU5YZCVR.js.map → chunk-YB356GAD.js.map} +1 -1
  200. package/dist/{chunk-QHPB4RM4.js → chunk-YND257SH.js} +4 -4
  201. package/dist/{chunk-QHPB4RM4.js.map → chunk-YND257SH.js.map} +1 -1
  202. package/dist/{chunk-VNYDOP22.js → chunk-ZLSHNQSO.js} +3 -3
  203. package/dist/{chunk-VNYDOP22.js.map → chunk-ZLSHNQSO.js.map} +1 -1
  204. package/dist/{chunk-OH6NOZSB.js → chunk-ZOEW4C2C.js} +3 -3
  205. package/dist/{chunk-OH6NOZSB.js.map → chunk-ZOEW4C2C.js.map} +1 -1
  206. package/dist/{chunk-43RZLTNM.js → chunk-ZWPGS2V7.js} +4 -4
  207. package/dist/{chunk-43RZLTNM.js.map → chunk-ZWPGS2V7.js.map} +1 -1
  208. package/dist/components/cart/index.js +1 -1
  209. package/dist/components/common/index.js +1 -1
  210. package/dist/components/drawer/index.js +21 -21
  211. package/dist/components/home/index.js +26 -26
  212. package/dist/components/layout/index.js +5 -5
  213. package/dist/components/product/index.js +23 -23
  214. package/dist/components/store/index.js +22 -22
  215. package/dist/components/toast/index.js +3 -3
  216. package/dist/components/tracking/index.js +8 -8
  217. package/dist/{custom-urls-AOYDTTF4.js → custom-urls-7JFXAHVF.js} +9 -9
  218. package/dist/{custom-urls-AOYDTTF4.js.map → custom-urls-7JFXAHVF.js.map} +1 -1
  219. package/dist/dev/editor/index.js +1 -1
  220. package/dist/dev/index.js +1 -1
  221. package/dist/{document-class-WZISVNHG.js → document-class-DLQ7ZHXB.js} +19 -19
  222. package/dist/{document-class-WZISVNHG.js.map → document-class-DLQ7ZHXB.js.map} +1 -1
  223. package/dist/hooks/index.js +21 -21
  224. package/dist/hooks/useComments.js +2 -2
  225. package/dist/hooks/useGtm.js +21 -21
  226. package/dist/hooks/useMoney.js +21 -21
  227. package/dist/hooks/useProduct.js +2 -2
  228. package/dist/hooks/useStore.js +21 -21
  229. package/dist/hooks/useUser.js +4 -4
  230. package/dist/hooks/useWishlist.js +2 -2
  231. package/dist/index.js +21 -21
  232. package/dist/native-app/index.js +2 -2
  233. package/dist/{navigation-G6UMVNCJ.js → navigation-ILRUCZ3G.js} +7 -7
  234. package/dist/{navigation-G6UMVNCJ.js.map → navigation-ILRUCZ3G.js.map} +1 -1
  235. package/dist/{navigation-UG7TWUIO.js → navigation-ZZQKRNBG.js} +6 -6
  236. package/dist/{navigation-UG7TWUIO.js.map → navigation-ZZQKRNBG.js.map} +1 -1
  237. package/dist/{not-found-TMNGF4K6.js → not-found-47B2WAO5.js} +24 -24
  238. package/dist/{not-found-TMNGF4K6.js.map → not-found-47B2WAO5.js.map} +1 -1
  239. package/dist/providers/index.js +21 -21
  240. package/dist/providers/twilight-init.d.ts.map +1 -1
  241. package/dist/routes/account/orders.js +6 -6
  242. package/dist/routes/account.js +15 -15
  243. package/dist/routes/blog.js +10 -10
  244. package/dist/routes/brands.js +6 -6
  245. package/dist/routes/cart.js +31 -31
  246. package/dist/routes/home.js +27 -27
  247. package/dist/routes/index.js +10 -10
  248. package/dist/routes/loyalty.js +7 -7
  249. package/dist/routes/page.js +6 -6
  250. package/dist/routes/product-listing.js +31 -31
  251. package/dist/routes/product.js +30 -30
  252. package/dist/routes/seo-redirects.js +10 -10
  253. package/dist/routes/testimonials.js +2 -2
  254. package/dist/routes/thank-you.js +6 -6
  255. package/dist/skeleton.js +29 -29
  256. package/dist/{store-lookup-6B6PLTTG.js → store-lookup-5ULOU7TP.js} +10 -10
  257. package/dist/{store-lookup-6B6PLTTG.js.map → store-lookup-5ULOU7TP.js.map} +1 -1
  258. package/dist/tanstack.js +19 -19
  259. package/dist/types/salla-sdk.d.ts +11 -0
  260. package/dist/types/salla-sdk.d.ts.map +1 -1
  261. package/dist/utils/index.js +3 -3
  262. package/dist/utils/sdk-helpers.d.ts +10 -0
  263. package/dist/utils/sdk-helpers.d.ts.map +1 -1
  264. package/package.json +1 -1
  265. package/tailwind/routes/account/orders/single/OrderItemRow.tsx.txt +2 -2
  266. package/dist/GoogleTag-DFXQET34.js +0 -15
  267. package/dist/chunk-6DXMOGBI.js.map +0 -1
  268. package/dist/chunk-AHYZEVQM.js.map +0 -1
  269. package/dist/chunk-MZPX4EPS.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/theme-version.ts","../src/utils/sdk-helpers.ts"],"names":[],"mappings":";;;;AAqCO,SAAS,uBAAA,GAAyC;AACvD,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,eAAA,EAAgB;AACtC,EAAA,IAAI,WAAW,OAAO,SAAA;AAEtB,EAAA,OAAO,qBAAA,GAAwB,SAAA,IAAa,IAAA;AAC9C;AAMA,IAAM,uBAAA,GAA0B,QAAA;AAwBzB,SAAS,uBAAA,GAAyC;AACvD,EAAA,MAAM,UAAU,eAAA,EAAgB,CAAE,OAAA,IAAW,qBAAA,GAAwB,OAAA,IAAW,IAAA;AAChF,EAAA,OAAO,OAAA,GAAU,CAAA,EAAG,uBAAuB,CAAA,EAAG,OAAO,CAAA,CAAA,GAAK,IAAA;AAC5D;AAmCA,SAAS,YAAA,CAAa,UAA2C,aAAA,EAA8B;AAC7F,EAAA,MAAM,gBAAA,GAAmB,UAAU,gBAAA,IAAoB,IAAA;AACvD,EAAA,IAAI,aAAA,IAAiB,IAAA,EAAM,OAAO,gBAAA,IAAoB,IAAA;AACtD,EAAA,MAAM,eAAA,GAAkB,QAAA,EAAU,KAAA,EAAO,KAAA,EAAO,EAAA;AAChD,EAAA,OAAA,CAAQ,eAAA,IAAmB,IAAA,GAAO,MAAA,CAAO,eAAe,IAAI,gBAAA,MAAsB,aAAA;AACpF;AAEO,SAAS,qBAAA,CAAsB,gBAA+B,IAAA,EAAqB;AACxF,EAAA,MAAM,YAAY,uBAAA,EAAwB;AAC1C,EAAA,IAAI,WAAW,OAAO,SAAA;AAE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A,EAAY;AACxB,EAAA,IAAI,CAAC,GAAA,EAAK;AACV,EAAA,IAAI;AACF,IAAA,aAAA,CAAc,GAAA,EAAK,cAAA,EAAgB,iBAAA,CAAkB,OAAO,CAAC,CAAA;AAC7D,IAAA,aAAA,CAAc,GAAA,EAAK,cAAA,EAAgB,uBAAA,EAAyB,CAAA;AAAA,EAC9D,CAAA,CAAA,MAAQ;AAAA,EAER;AACF;AAMA,SAAS,aAAA,CACP,GAAA,EACA,IAAA,EACA,KAAA,EACM;AACN,EAAA,IAAI,KAAA,EAAO,GAAA,CAAI,GAAA,EAAK,SAAA,GAAY,MAAM,KAAK,CAAA;AAAA,cAC/B,GAAA,CAAI,GAAA,EAAK,OAAO,QAAA,EAAU,OAAA,EAAS,SAAS,IAAI,CAAA;AAC9D","file":"chunk-MZPX4EPS.js","sourcesContent":["/**\n * @fileoverview Which version of the theme's settings to render — the one answer,\n * in one place.\n *\n * A merchant's theme settings are versioned. An ordinary storefront visit names\n * no version and gets the live one; the API decides, and reports it back as\n * `theme.profile.id`. Two surfaces need a different one, and both address it in\n * the URL of an iframe:\n *\n * - the merchant's theme editor at `s.salla.sa/themes/editor/…`, which shows a\n * draft version beside the controls that are editing it;\n * - a partner running the theme locally, whose dev server is the iframe.\n *\n * Written as a module of its own rather than inline at the one call site,\n * because `store-identity.ts` exists for exactly this reason: the identifier a\n * request resolved and the identifier it sent were two different values for\n * days, in two files, and every test passed. A second implementation of this is\n * the bug, not a refactor away from one.\n */\nimport { getRequestStore, getTwilightContext } from '../twilight/context';\nimport type { StoreContext } from '../api/store';\nimport { getInjectedRuntimeEnv } from './runtime-env';\n\n/**\n * The version this request asked for, or null when it asked for none.\n *\n * Deliberately excludes the version the *settings* name. This is the answer to\n * \"what did the caller address?\", and it has to be available before any settings\n * exist — React Query keys are built from it, and a key that means one thing\n * during SSR and another after hydration is how a page refetches everything it\n * was just handed.\n *\n * 1. what the request named, seeded by `twilightMiddleware` on a host permitted\n * to name one;\n * 2. what SSR resolved and published into the head, which is all the browser has\n * once the dispatcher has stripped `?versionId=` from the URL.\n */\nexport function requestedThemeVersionId(): string | null {\n const { versionId } = getRequestStore();\n if (versionId) return versionId;\n\n return getInjectedRuntimeEnv().versionId || null;\n}\n\n/**\n * The prefix the Store names a draft theme by: core's `getDraftNameForId()` is\n * `draft-` followed by the Optimus-encoded draft id.\n */\nconst DRAFT_THEME_NAME_PREFIX = 'draft-';\n\n/**\n * The draft theme this request previews, as the name the Store knows it by —\n * what goes in `s-theme-name` — or null when it previews none.\n *\n * The version alone is not enough on a draft's preview. The theme editor shows a\n * draft against the store's one draft version, and that row names no theme\n * (`theme = '0'`), so the Store answered every call about it as the store's own\n * installed theme. It renders the draft's settings, but checks each component\n * against that other theme: a React draft's components are declared by the draft\n * alone, so `component/list` dropped every one and answered `[]` (TD-17779).\n *\n * `draft-<id>` is not a format invented here. It is the Store's own name for a\n * draft (`storeTheme()->getDraftNameForId()` in core), and the value a twig\n * draft's preview already puts on every API call through `api::setHeaders`. The\n * Store reads it only for its draft version, and only for a draft that allows\n * the store being asked about.\n *\n * Same two sources, in the same order and for the same reasons, as\n * {@link requestedThemeVersionId}, and no third: there are no settings that could\n * name a draft, and a build is never pinned to one. Both API clients — the\n * engine's own and the SDK's — ask this one function.\n */\nexport function requestedDraftThemeName(): string | null {\n const draftId = getRequestStore().draftId || getInjectedRuntimeEnv().draftId || null;\n return draftId ? `${DRAFT_THEME_NAME_PREFIX}${draftId}` : null;\n}\n\n/**\n * The version every Salla API call is answered with — what goes in `s-version-id`.\n *\n * The requested version outranks the settings, because a request that named one\n * is the only reason this is ever anything but the live version: falling back to\n * the settings there would let the first answer overwrite the question.\n *\n * The settings' own `theme.profile.id` stays as the fallback, unchanged. It is\n * what this header has always carried, and on an ordinary storefront it still\n * is — it keeps the rest of a page's calls pinned to the version the settings\n * call resolved, rather than letting a version go live mid-render.\n *\n * That pin is only good for the scope the settings were requested with. Each\n * market (scope) has its own version, and the API lets a named version outrank\n * the market's: once the shopper switches market, the loaded settings still\n * describe the previous one, and replaying their version — on the settings call\n * for the new market first of all — gets the previous market's theme back, for\n * good. So the version is replayed only while the active scope is the one the\n * settings were answered for (`store.scope`), which is not always the one they\n * were requested for (`requestedScopeId`): the API falls back to another scope\n * when it does not accept the requested one, and that scope's version must not\n * ride along on the next request for the requested one. With no active scope it\n * is replayed only for settings requested without one. Otherwise nothing is\n * sent and the API picks the version of the scope on the request.\n *\n * `activeScopeId` is passed in by the caller that already resolved the scope for\n * its `s-scope-*` headers.\n *\n * Reading the settings is guarded because `getTwilightContext().settings` throws\n * a `SettingsError` when they have not loaded — which is the normal state on the\n * very first call, the settings call itself.\n */\n/** Whether `settings` were answered for `activeScopeId` (see {@link resolveThemeVersionId}). */\nfunction answersScope(settings: StoreContext | null | undefined, activeScopeId: string | null) {\n const requestedScopeId = settings?.requestedScopeId ?? null;\n if (activeScopeId == null) return requestedScopeId == null;\n const answeredScopeId = settings?.store?.scope?.id;\n return (answeredScopeId != null ? String(answeredScopeId) : requestedScopeId) === activeScopeId;\n}\n\nexport function resolveThemeVersionId(activeScopeId: string | null = null): string | null {\n const requested = requestedThemeVersionId();\n if (requested) return requested;\n\n try {\n const settings = getTwilightContext().settings;\n if (!answersScope(settings, activeScopeId)) return null;\n\n const profileId = settings?.theme?.profile?.id;\n return profileId != null ? String(profileId) : null;\n } catch {\n return null;\n }\n}\n","export type { StoreContext } from '../api/store';\nimport type { StoreContext } from '../api/store';\nimport type { SallaSDK } from '../types/salla-sdk';\nimport { resolveStoreIdentifier } from './store-identity';\nimport { requestedDraftThemeName, requestedThemeVersionId } from './theme-version';\n\nconst isBrowser = typeof window !== 'undefined';\n\n/**\n * Which store to ask the API about — see {@link resolveStoreIdentifier}.\n *\n * A delegation, not a second implementation. This name is the one on the wire\n * (`api/client.ts` sets the `store-identifier` header from it) and the one\n * themes import from `@salla.sa/twilight-theme-engine/utils`, so it stays; what\n * it must never do again is answer differently from the resolver everything\n * else asks. It had its own copy of the order once, missing the store the\n * request names and preferring the build-time `VITE_STORE_DOMAIN` that a\n * deployed worker does not have — so every published theme sent an empty\n * identifier and rendered \"Store Unavailable\".\n */\nexport function getStoreIdentifier(explicit?: string): string {\n return resolveStoreIdentifier(explicit);\n}\n\n/**\n * Get Salla SDK instance if available\n */\nexport function getSallaSDK(): typeof window.salla | undefined {\n if (!isBrowser) return undefined;\n return window.salla;\n}\n\n/** Dispatched on `window` by the SDK as the last step of loading (twilight `src/index.js`). */\nconst SDK_CREATED_EVENT = 'salla::created';\n\nconst noop = () => {};\n\n/**\n * Whether `window.salla` is the SDK, rather than the stub that stands in for it.\n *\n * ⚠️ `window.salla` exists from the first bytes of the page. The `twilight-init`\n * head script defines it with an `onReady`, so app snippets can queue work, and\n * the SDK — a deferred module — fills it in later. React can hydrate and run\n * effects in between, and there `window.salla?.event.on(…)` passes its `?.` and\n * throws `Cannot read properties of undefined (reading 'on')`.\n *\n * The SDK defines `init` and `event` in one synchronous module evaluation and the\n * stub has neither, so either one means it has loaded.\n */\nfunction isLoaded(sdk: typeof window.salla): sdk is SallaSDK {\n return typeof sdk?.init === 'function' || typeof sdk?.event?.on === 'function';\n}\n\n/** An SDK whose event bus can take a listener — what {@link onSallaEvent} needs. */\nfunction hasEventBus(sdk: typeof window.salla): sdk is SallaSDK {\n return typeof sdk?.event?.on === 'function';\n}\n\n/**\n * Run `callback` with the SDK as soon as it has loaded: now if it has, otherwise\n * when it announces itself.\n *\n * Returns a cancel for an effect's cleanup, so a component that unmounts first\n * never has the callback run. An effect that returned early when the SDK was not\n * there yet never ran again — on a cold load, where hydration beats the SDK, the\n * engine never initialised it at all.\n */\nexport function whenSallaLoaded(callback: (sdk: SallaSDK) => void): () => void {\n return whenSalla(isLoaded, callback);\n}\n\nfunction whenSalla(\n isUsable: (sdk: typeof window.salla) => sdk is SallaSDK,\n callback: (sdk: SallaSDK) => void\n): () => void {\n if (!isBrowser) return noop;\n\n if (isUsable(window.salla)) {\n callback(window.salla);\n return noop;\n }\n\n let settled = false;\n const onCreated = () => {\n const sdk = window.salla;\n if (settled || !isUsable(sdk)) return;\n settled = true;\n window.removeEventListener(SDK_CREATED_EVENT, onCreated);\n callback(sdk);\n };\n window.addEventListener(SDK_CREATED_EVENT, onCreated);\n\n return () => {\n settled = true;\n window.removeEventListener(SDK_CREATED_EVENT, onCreated);\n };\n}\n\n/**\n * Run `callback` once the SDK has loaded **and been initialised** — for work that\n * talks to the API, which needs the store config `init` sets.\n *\n * Loaded is not enough for that: `init` finishes asynchronously, so a cart lookup\n * made the moment the SDK announces itself goes out without a store identifier\n * and is answered `Store Identifier not found`. Returns a cancel, as\n * {@link whenSallaLoaded} does.\n *\n * A rejected `onReady` still runs `callback`, as `useTwilightInit` carries on past\n * one: it means a partial initialisation, and waiting on it would leave the caller\n * waiting for good.\n */\nexport function whenSallaReady(callback: (sdk: SallaSDK) => void): () => void {\n let cancelled = false;\n const cancel = whenSallaLoaded((sdk) => {\n void new Promise((resolve) => resolve(sdk.onReady?.())).catch(noop).then(() => {\n if (!cancelled) callback(sdk);\n });\n });\n return () => {\n cancelled = true;\n cancel();\n };\n}\n\n/**\n * `salla.event.on(name, listener)` once the SDK has loaded. Returns the matching\n * unsubscribe, which also cancels a subscription still waiting for the SDK.\n *\n * Removed from the emitter it was added to, not from whatever `window.salla` is\n * by the time the component unmounts.\n *\n * Waits for an event bus specifically, not for \"loaded\": an SDK is recognised by\n * `init` alone, and subscribing on one without a bus would throw.\n */\nexport function onSallaEvent(name: string, listener: (...args: unknown[]) => void): () => void {\n let bus: SallaSDK['event'] | undefined;\n const cancel = whenSalla(hasEventBus, (sdk) => {\n bus = sdk.event;\n bus.on(name, listener);\n });\n return () => {\n cancel();\n bus?.off?.(name, listener);\n };\n}\n\n/**\n * Push the active route locale onto the Salla SDK.\n *\n * Why this is needed (and why it must run on every navigation):\n * - The SDK seeds its locale from `navigator.language` — the theme sets no `s-lang`\n * cookie or `window.locale` — so an English browser starts the SDK in `en` even on\n * an `/ar` store.\n * - The SDK fixes its axios `accept-language` header ONCE, at init. `salla.lang.setLocale`\n * only swaps UI translations (it never touches the header), and `salla.init()` is a\n * no-op after `Salla.status === 'ready'`, so the header never refreshes on its own.\n * - `profile::info.fetched` (login / profile refresh on navigation) overrides the header\n * to the *account's* language.\n *\n * Net result without this: `salla.api.*` calls (cart/product details) return data in the\n * wrong locale — e.g. English cart item names on `/ar/cart` — intermittently, depending on\n * load order and whether a profile fetch ran. Re-asserting the URL locale here keeps the\n * header correct. No-op on the server and until the SDK exposes the methods.\n */\nexport function syncSdkLocale(locale: string): void {\n const sdk = getSallaSDK();\n if (!sdk || !locale) return;\n try {\n sdk.lang?.setLocale?.(locale);\n sdk.api?.setHeader?.('accept-language', locale);\n // The localization modal swaps `/${user.language_code}/` in the URL on submit;\n // the SDK never sets this locally, so without it the switch reloads the same page.\n sdk.config?.set?.('user.language_code', locale);\n } catch {\n // SDK partially loaded — the header is re-asserted on the next navigation.\n }\n}\n\n/**\n * The `s-version-id` the SDK sends: the version the request named, else the one\n * the settings report.\n *\n * The request outranks the settings here for the reason it does in\n * `resolveThemeVersionId`. `headers['s-version-id']` is the version the API\n * *answered with*, and for a version it cannot reach it reports the live one\n * while rendering defaults. Read alone, a preview's `salla.api.*` calls asked\n * about the live version while the engine's own asked about the previewed one,\n * so one page showed two versions.\n */\nfunction sdkThemeVersionId(headers: StoreContext['headers']): string | null {\n const versionId = requestedThemeVersionId() ?? headers?.['s-version-id'];\n return versionId != null ? String(versionId) : null;\n}\n\n/**\n * Settings as the SDK's `init` should copy them: with `headers` naming the\n * version {@link sdkThemeVersionId} picks, and the draft theme a preview renders.\n *\n * `init` spreads `headers` over its axios defaults, and on a first load nothing\n * re-asserts either afterwards: TanStack restores the root match's context\n * instead of re-running `rootBeforeLoad` in the browser, so\n * {@link syncSdkThemeVersion} first runs on a client navigation.\n *\n * The draft goes on as `s-theme-name`, the same header and value the engine's own\n * client sends (see `requestedDraftThemeName`). Without it every `salla.api.*`\n * call on a draft's preview would be answered as the store's own theme.\n */\nexport function withSdkThemeVersion<T extends Pick<StoreContext, 'headers'>>(settings: T): T {\n const versionId = requestedThemeVersionId();\n const draftThemeName = requestedDraftThemeName();\n if (!versionId && !draftThemeName) return settings;\n return {\n ...settings,\n headers: {\n ...settings.headers,\n ...(versionId ? { 's-version-id': versionId } : {}),\n ...(draftThemeName ? { 's-theme-name': draftThemeName } : {}),\n },\n };\n}\n\n/**\n * Push the theme version onto the Salla SDK: the requested one, else the one the\n * current settings name (see {@link sdkThemeVersionId}).\n *\n * The SDK copies `settings.headers` into its axios defaults ONCE, at init, and\n * `s-version-id` is one of them. Settings refetched on the client — the shopper\n * switched market, and each market has its own version — name a different one,\n * and without this every `salla.api.*` call keeps asking for the previous\n * market's version until a full page load. Settings that name no version take\n * the header off instead, so the SDK asks for the live one like the engine's own\n * client does. The draft a preview renders is re-asserted beside it, and taken\n * off the same way when nothing names one. No-op on the server and until the SDK\n * exposes its api.\n */\nexport function syncSdkThemeVersion(headers: StoreContext['headers']): void {\n const sdk = getSallaSDK();\n if (!sdk) return;\n try {\n syncSdkHeader(sdk, 's-version-id', sdkThemeVersionId(headers));\n syncSdkHeader(sdk, 's-theme-name', requestedDraftThemeName());\n } catch {\n // SDK partially loaded — the header is re-asserted on the next navigation.\n }\n}\n\n/**\n * Set one of the SDK's default headers, or take it off when nothing names a value — so a\n * header left over from the previous page cannot answer for this one.\n */\nfunction syncSdkHeader(\n sdk: NonNullable<ReturnType<typeof getSallaSDK>>,\n name: string,\n value: string | null | undefined\n): void {\n if (value) sdk.api?.setHeader?.(name, value);\n else delete sdk.api?.axios?.defaults?.headers?.common?.[name];\n}\n"]}