@salla.sa/twilight-theme-engine 1.0.150 → 1.0.151
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.
- package/dist/{AddToCartForm-P5Q4P763.js → AddToCartForm-O6TPONV2.js} +3 -3
- package/dist/{AddToCartForm-P5Q4P763.js.map → AddToCartForm-O6TPONV2.js.map} +1 -1
- package/dist/{BlogAuthorPage-Z3R6AETN.js → BlogAuthorPage-H6LRQ5YW.js} +27 -27
- package/dist/{BlogAuthorPage-Z3R6AETN.js.map → BlogAuthorPage-H6LRQ5YW.js.map} +1 -1
- package/dist/{BlogCategoryPage-7VROFBGI.js → BlogCategoryPage-NORT43JE.js} +27 -27
- package/dist/{BlogCategoryPage-7VROFBGI.js.map → BlogCategoryPage-NORT43JE.js.map} +1 -1
- package/dist/{BlogPage-Q2NN4WTB.js → BlogPage-ZGTRTQT6.js} +25 -25
- package/dist/{BlogPage-Q2NN4WTB.js.map → BlogPage-ZGTRTQT6.js.map} +1 -1
- package/dist/{BlogSinglePage-ZPCSNBIX.js → BlogSinglePage-G7TUMA4L.js} +25 -25
- package/dist/{BlogSinglePage-ZPCSNBIX.js.map → BlogSinglePage-G7TUMA4L.js.map} +1 -1
- package/dist/{BlogTagPage-IGG2VEMR.js → BlogTagPage-3LFUVXP3.js} +27 -27
- package/dist/{BlogTagPage-IGG2VEMR.js.map → BlogTagPage-3LFUVXP3.js.map} +1 -1
- package/dist/{BrandsPage-ZAJT6RGM.js → BrandsPage-NA5BVFVS.js} +26 -26
- package/dist/{BrandsPage-ZAJT6RGM.js.map → BrandsPage-NA5BVFVS.js.map} +1 -1
- package/dist/{Breadcrumb-KE4EWH7L.js → Breadcrumb-MNSFVYUT.js} +25 -25
- package/dist/{Breadcrumb-KE4EWH7L.js.map → Breadcrumb-MNSFVYUT.js.map} +1 -1
- package/dist/{CartItem-RMCXCGHT.js → CartItem-N6OPII7B.js} +25 -25
- package/dist/{CartItem-RMCXCGHT.js.map → CartItem-N6OPII7B.js.map} +1 -1
- package/dist/{CartSummary-NLEAHKWF.js → CartSummary-LGYAIG7C.js} +25 -25
- package/dist/{CartSummary-NLEAHKWF.js.map → CartSummary-LGYAIG7C.js.map} +1 -1
- package/dist/{Copyright-EIBPTE3B.js → Copyright-YXWJNV5Q.js} +3 -3
- package/dist/{Copyright-EIBPTE3B.js.map → Copyright-YXWJNV5Q.js.map} +1 -1
- package/dist/{CustomerLayout-POGWFN6R.js → CustomerLayout-YU7TKV2Q.js} +25 -25
- package/dist/{CustomerLayout-POGWFN6R.js.map → CustomerLayout-YU7TKV2Q.js.map} +1 -1
- package/dist/{Footer-LGIUINGS.js → Footer-4QV4H67O.js} +4 -4
- package/dist/{Footer-LGIUINGS.js.map → Footer-4QV4H67O.js.map} +1 -1
- package/dist/{Header-4TGYO6E4.js → Header-DEUDDAWD.js} +11 -11
- package/dist/{Header-4TGYO6E4.js.map → Header-DEUDDAWD.js.map} +1 -1
- package/dist/{LatestProducts-YYKQNL5N.js → LatestProducts-KA54KWOQ.js} +27 -27
- package/dist/{LatestProducts-YYKQNL5N.js.map → LatestProducts-KA54KWOQ.js.map} +1 -1
- package/dist/{LoyaltyPage-MROFMZXV.js → LoyaltyPage-7FJROQFU.js} +25 -25
- package/dist/{LoyaltyPage-MROFMZXV.js.map → LoyaltyPage-7FJROQFU.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-DVHJOAKP.js → LoyaltyPointsPage-JXT65P5U.js} +8 -8
- package/dist/{LoyaltyPointsPage-DVHJOAKP.js.map → LoyaltyPointsPage-JXT65P5U.js.map} +1 -1
- package/dist/{MainMenu-GQO5KOTU.js → MainMenu-UOAPVNJH.js} +7 -7
- package/dist/{MainMenu-GQO5KOTU.js.map → MainMenu-UOAPVNJH.js.map} +1 -1
- package/dist/{MasterLayout-ZJBJ7EHM.js → MasterLayout-Z45QJW3M.js} +25 -25
- package/dist/{MasterLayout-ZJBJ7EHM.js.map → MasterLayout-Z45QJW3M.js.map} +1 -1
- package/dist/{MobileMenu-TZSFYHPW.js → MobileMenu-A4QIBBYN.js} +26 -26
- package/dist/{MobileMenu-TZSFYHPW.js.map → MobileMenu-A4QIBBYN.js.map} +1 -1
- package/dist/{NotificationsPage-BX6OSIDY.js → NotificationsPage-XU5IBNPR.js} +25 -25
- package/dist/{NotificationsPage-BX6OSIDY.js.map → NotificationsPage-XU5IBNPR.js.map} +1 -1
- package/dist/{OrderSinglePage-3RQ5TJDB.js → OrderSinglePage-5ANTMCBP.js} +26 -26
- package/dist/{OrderSinglePage-3RQ5TJDB.js.map → OrderSinglePage-5ANTMCBP.js.map} +1 -1
- package/dist/{OrdersPage-S4ECYNGI.js → OrdersPage-LZLPSDZR.js} +25 -25
- package/dist/{OrdersPage-S4ECYNGI.js.map → OrdersPage-LZLPSDZR.js.map} +1 -1
- package/dist/{PageSingle-BZGDC4VE.js → PageSingle-PMLCSRMC.js} +6 -6
- package/dist/{PageSingle-BZGDC4VE.js.map → PageSingle-PMLCSRMC.js.map} +1 -1
- package/dist/{ProductDetails-ZPRWPSVK.js → ProductDetails-ECPCGZLO.js} +7 -7
- package/dist/{ProductDetails-ZPRWPSVK.js.map → ProductDetails-ECPCGZLO.js.map} +1 -1
- package/dist/{ProfilePage-SKAS6LFQ.js → ProfilePage-XVWB4ZOO.js} +25 -25
- package/dist/{ProfilePage-SKAS6LFQ.js.map → ProfilePage-XVWB4ZOO.js.map} +1 -1
- package/dist/{ReviewsPage-NAZWXVXT.js → ReviewsPage-6EOSOIU4.js} +3 -3
- package/dist/{ReviewsPage-NAZWXVXT.js.map → ReviewsPage-6EOSOIU4.js.map} +1 -1
- package/dist/{SeoCartWidget-6NB6LT2Z.js → SeoCartWidget-TYNXS4UD.js} +25 -25
- package/dist/{SeoCartWidget-6NB6LT2Z.js.map → SeoCartWidget-TYNXS4UD.js.map} +1 -1
- package/dist/{SettingsPage-GZ2NJIUR.js → SettingsPage-BHW3CJC6.js} +25 -25
- package/dist/{SettingsPage-GZ2NJIUR.js.map → SettingsPage-BHW3CJC6.js.map} +1 -1
- package/dist/{StoreClosedNotification-V72F7HE5.js → StoreClosedNotification-7YHL4XTT.js} +26 -26
- package/dist/{StoreClosedNotification-V72F7HE5.js.map → StoreClosedNotification-7YHL4XTT.js.map} +1 -1
- package/dist/{TestimonialsPage-L6VBZFLT.js → TestimonialsPage-ZY2U4QDN.js} +6 -6
- package/dist/{TestimonialsPage-L6VBZFLT.js.map → TestimonialsPage-ZY2U4QDN.js.map} +1 -1
- package/dist/{ThankYouPage-O5U3V6J4.js → ThankYouPage-MINROTEH.js} +25 -25
- package/dist/{ThankYouPage-O5U3V6J4.js.map → ThankYouPage-MINROTEH.js.map} +1 -1
- package/dist/{WalletPage-NJBBZIMM.js → WalletPage-4VFAGWIE.js} +26 -26
- package/dist/{WalletPage-NJBBZIMM.js.map → WalletPage-4VFAGWIE.js.map} +1 -1
- package/dist/{WebMcpTools-VAZH3S5G.js → WebMcpTools-F42SFWVP.js} +9 -9
- package/dist/{WebMcpTools-VAZH3S5G.js.map → WebMcpTools-F42SFWVP.js.map} +1 -1
- package/dist/{WishlistPage-UKOGNFKB.js → WishlistPage-VMM4YDMX.js} +27 -27
- package/dist/{WishlistPage-UKOGNFKB.js.map → WishlistPage-VMM4YDMX.js.map} +1 -1
- package/dist/api/advertisement.js +4 -4
- package/dist/api/apps.js +4 -4
- package/dist/api/blog.js +6 -6
- package/dist/api/brands.js +6 -6
- package/dist/api/cart.js +6 -6
- package/dist/api/category.js +6 -6
- package/dist/api/client.js +3 -3
- package/dist/api/home.js +4 -4
- package/dist/api/loyalty.js +6 -6
- package/dist/api/menu.js +4 -4
- package/dist/api/notification.js +4 -4
- package/dist/api/order.js +6 -6
- package/dist/api/page.js +6 -6
- package/dist/api/product.js +6 -6
- package/dist/api/profile.js +3 -3
- package/dist/api/store.js +5 -5
- package/dist/api/translations.js +4 -4
- package/dist/api/user.js +4 -4
- package/dist/api/wallet.js +4 -4
- package/dist/api/wishlist.js +7 -7
- package/dist/{chunk-VJA4DVVT.js → chunk-3JJQCRXD.js} +4 -4
- package/dist/{chunk-VJA4DVVT.js.map → chunk-3JJQCRXD.js.map} +1 -1
- package/dist/{chunk-LWAJNEIM.js → chunk-3ULBL56H.js} +4 -4
- package/dist/{chunk-LWAJNEIM.js.map → chunk-3ULBL56H.js.map} +1 -1
- package/dist/{chunk-2HCODIC6.js → chunk-5CXBBDJB.js} +4 -4
- package/dist/{chunk-2HCODIC6.js.map → chunk-5CXBBDJB.js.map} +1 -1
- package/dist/{chunk-5RBXCPG6.js → chunk-6R2AUQMP.js} +3 -3
- package/dist/{chunk-5RBXCPG6.js.map → chunk-6R2AUQMP.js.map} +1 -1
- package/dist/{chunk-FCCGJ4DI.js → chunk-77SZTUQE.js} +7 -7
- package/dist/{chunk-FCCGJ4DI.js.map → chunk-77SZTUQE.js.map} +1 -1
- package/dist/{chunk-7XAGU6CT.js → chunk-7IVHY4OR.js} +3 -3
- package/dist/{chunk-7XAGU6CT.js.map → chunk-7IVHY4OR.js.map} +1 -1
- package/dist/{chunk-O63WBEAC.js → chunk-A7E6XFZC.js} +22 -22
- package/dist/{chunk-O63WBEAC.js.map → chunk-A7E6XFZC.js.map} +1 -1
- package/dist/{chunk-6YEE3VHL.js → chunk-BRIRWS2Q.js} +3 -3
- package/dist/{chunk-6YEE3VHL.js.map → chunk-BRIRWS2Q.js.map} +1 -1
- package/dist/{chunk-IEKP3HYS.js → chunk-CATEET2N.js} +4 -4
- package/dist/{chunk-IEKP3HYS.js.map → chunk-CATEET2N.js.map} +1 -1
- package/dist/{chunk-ZUVBDALM.js → chunk-CEIXIUJ7.js} +4 -4
- package/dist/{chunk-ZUVBDALM.js.map → chunk-CEIXIUJ7.js.map} +1 -1
- package/dist/{chunk-5T4MJAUN.js → chunk-CH6BNMS6.js} +3 -3
- package/dist/{chunk-5T4MJAUN.js.map → chunk-CH6BNMS6.js.map} +1 -1
- package/dist/{chunk-TEAYGNHT.js → chunk-CIJVNUNZ.js} +3 -3
- package/dist/{chunk-TEAYGNHT.js.map → chunk-CIJVNUNZ.js.map} +1 -1
- package/dist/{chunk-PVOJJ2BV.js → chunk-DGPSZUI3.js} +5 -5
- package/dist/{chunk-PVOJJ2BV.js.map → chunk-DGPSZUI3.js.map} +1 -1
- package/dist/{chunk-5LI536P6.js → chunk-DKIU6ZOP.js} +5 -5
- package/dist/{chunk-5LI536P6.js.map → chunk-DKIU6ZOP.js.map} +1 -1
- package/dist/{chunk-GLSRVHYJ.js → chunk-DKPM4T4C.js} +4 -4
- package/dist/{chunk-GLSRVHYJ.js.map → chunk-DKPM4T4C.js.map} +1 -1
- package/dist/{chunk-EMAAVDEK.js → chunk-DXQUURZX.js} +7 -7
- package/dist/{chunk-EMAAVDEK.js.map → chunk-DXQUURZX.js.map} +1 -1
- package/dist/{chunk-4E6FD5W7.js → chunk-EEL6OYAQ.js} +7 -3
- package/dist/chunk-EEL6OYAQ.js.map +1 -0
- package/dist/{chunk-5NUCGUTE.js → chunk-F6MYOPZB.js} +4 -4
- package/dist/{chunk-5NUCGUTE.js.map → chunk-F6MYOPZB.js.map} +1 -1
- package/dist/{chunk-B57KIBQL.js → chunk-GGQA6QBB.js} +3 -3
- package/dist/{chunk-B57KIBQL.js.map → chunk-GGQA6QBB.js.map} +1 -1
- package/dist/{chunk-WAKCWE6P.js → chunk-GMXNVBCD.js} +5 -5
- package/dist/{chunk-WAKCWE6P.js.map → chunk-GMXNVBCD.js.map} +1 -1
- package/dist/{chunk-AOQZHLZZ.js → chunk-GYJJX4EI.js} +5 -5
- package/dist/{chunk-AOQZHLZZ.js.map → chunk-GYJJX4EI.js.map} +1 -1
- package/dist/{chunk-RY6VPXG6.js → chunk-GZUBV5S3.js} +3 -3
- package/dist/{chunk-RY6VPXG6.js.map → chunk-GZUBV5S3.js.map} +1 -1
- package/dist/{chunk-O3XMYDNC.js → chunk-H7A7LOQJ.js} +5 -5
- package/dist/{chunk-O3XMYDNC.js.map → chunk-H7A7LOQJ.js.map} +1 -1
- package/dist/{chunk-ULF4LPVA.js → chunk-IURXJAIK.js} +3 -3
- package/dist/{chunk-ULF4LPVA.js.map → chunk-IURXJAIK.js.map} +1 -1
- package/dist/{chunk-Q7Z76F7N.js → chunk-K577255O.js} +8 -8
- package/dist/{chunk-Q7Z76F7N.js.map → chunk-K577255O.js.map} +1 -1
- package/dist/{chunk-QKKEBQ57.js → chunk-KBWIXAHN.js} +6 -6
- package/dist/{chunk-QKKEBQ57.js.map → chunk-KBWIXAHN.js.map} +1 -1
- package/dist/{chunk-BYGVKW3M.js → chunk-LDXVGQA2.js} +4 -4
- package/dist/{chunk-BYGVKW3M.js.map → chunk-LDXVGQA2.js.map} +1 -1
- package/dist/{chunk-5EAISVPV.js → chunk-LFMCUQQ3.js} +3 -3
- package/dist/{chunk-5EAISVPV.js.map → chunk-LFMCUQQ3.js.map} +1 -1
- package/dist/{chunk-UUHLRFXB.js → chunk-LRQ75MWP.js} +8 -8
- package/dist/{chunk-UUHLRFXB.js.map → chunk-LRQ75MWP.js.map} +1 -1
- package/dist/{chunk-P2PPBXHD.js → chunk-M2MJKUQF.js} +3 -3
- package/dist/{chunk-P2PPBXHD.js.map → chunk-M2MJKUQF.js.map} +1 -1
- package/dist/{chunk-PHPOMWQ4.js → chunk-MQU6G2ZE.js} +4 -4
- package/dist/{chunk-PHPOMWQ4.js.map → chunk-MQU6G2ZE.js.map} +1 -1
- package/dist/{chunk-2CILV5ME.js → chunk-MVSOSNNB.js} +5 -5
- package/dist/{chunk-2CILV5ME.js.map → chunk-MVSOSNNB.js.map} +1 -1
- package/dist/{chunk-JSAWLWUN.js → chunk-N2Y5VSHM.js} +4 -4
- package/dist/{chunk-JSAWLWUN.js.map → chunk-N2Y5VSHM.js.map} +1 -1
- package/dist/{chunk-6QIF6WJH.js → chunk-O7PJBTH3.js} +3 -3
- package/dist/{chunk-6QIF6WJH.js.map → chunk-O7PJBTH3.js.map} +1 -1
- package/dist/{chunk-6H6BVZBV.js → chunk-OGEG4QHV.js} +3 -3
- package/dist/{chunk-6H6BVZBV.js.map → chunk-OGEG4QHV.js.map} +1 -1
- package/dist/{chunk-5M2AK5KE.js → chunk-OJ4PJK27.js} +4 -4
- package/dist/{chunk-5M2AK5KE.js.map → chunk-OJ4PJK27.js.map} +1 -1
- package/dist/{chunk-W7CYFPGY.js → chunk-PHWFTUTE.js} +6 -6
- package/dist/{chunk-W7CYFPGY.js.map → chunk-PHWFTUTE.js.map} +1 -1
- package/dist/{chunk-JK45RUVV.js → chunk-PPUV27YN.js} +3 -3
- package/dist/{chunk-JK45RUVV.js.map → chunk-PPUV27YN.js.map} +1 -1
- package/dist/{chunk-OOZQVX7C.js → chunk-Q76O67KK.js} +6 -6
- package/dist/{chunk-OOZQVX7C.js.map → chunk-Q76O67KK.js.map} +1 -1
- package/dist/{chunk-34L65JGK.js → chunk-QNGA2NAC.js} +4 -4
- package/dist/{chunk-34L65JGK.js.map → chunk-QNGA2NAC.js.map} +1 -1
- package/dist/{chunk-TXYLHBUH.js → chunk-R4QBCQ4K.js} +3 -3
- package/dist/{chunk-TXYLHBUH.js.map → chunk-R4QBCQ4K.js.map} +1 -1
- package/dist/{chunk-PYXAPLNB.js → chunk-R6Z6JQIB.js} +3 -3
- package/dist/{chunk-PYXAPLNB.js.map → chunk-R6Z6JQIB.js.map} +1 -1
- package/dist/{chunk-R7QCNL62.js → chunk-REBJQRQF.js} +3 -3
- package/dist/{chunk-R7QCNL62.js.map → chunk-REBJQRQF.js.map} +1 -1
- package/dist/{chunk-2ZC5YGMI.js → chunk-RRDKYXHU.js} +3 -3
- package/dist/{chunk-2ZC5YGMI.js.map → chunk-RRDKYXHU.js.map} +1 -1
- package/dist/{chunk-KJ7NG3ZH.js → chunk-SBZWX6II.js} +3 -3
- package/dist/{chunk-KJ7NG3ZH.js.map → chunk-SBZWX6II.js.map} +1 -1
- package/dist/{chunk-LBZNLTBM.js → chunk-SF2POPJW.js} +3 -3
- package/dist/{chunk-LBZNLTBM.js.map → chunk-SF2POPJW.js.map} +1 -1
- package/dist/{chunk-I2LK4IC2.js → chunk-T7H5KE5Y.js} +4 -4
- package/dist/{chunk-I2LK4IC2.js.map → chunk-T7H5KE5Y.js.map} +1 -1
- package/dist/{chunk-PZP3372I.js → chunk-ULGRYCUV.js} +4 -4
- package/dist/{chunk-PZP3372I.js.map → chunk-ULGRYCUV.js.map} +1 -1
- package/dist/{chunk-DPQIVZ4T.js → chunk-VDPMCOHX.js} +3 -3
- package/dist/{chunk-DPQIVZ4T.js.map → chunk-VDPMCOHX.js.map} +1 -1
- package/dist/{chunk-CAULDK3N.js → chunk-WJCDY35D.js} +6 -6
- package/dist/{chunk-CAULDK3N.js.map → chunk-WJCDY35D.js.map} +1 -1
- package/dist/{chunk-FL3OK7AQ.js → chunk-WZAJS44F.js} +16 -16
- package/dist/{chunk-FL3OK7AQ.js.map → chunk-WZAJS44F.js.map} +1 -1
- package/dist/{chunk-RB7RHMKJ.js → chunk-YQ365K65.js} +5 -5
- package/dist/{chunk-RB7RHMKJ.js.map → chunk-YQ365K65.js.map} +1 -1
- package/dist/{chunk-PPFD456V.js → chunk-Z4BOATCC.js} +3 -3
- package/dist/{chunk-PPFD456V.js.map → chunk-Z4BOATCC.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +23 -23
- package/dist/components/home/index.js +28 -28
- package/dist/components/layout/index.js +6 -6
- package/dist/components/product/index.js +25 -25
- package/dist/components/store/index.js +24 -24
- package/dist/components/toast/index.js +4 -4
- package/dist/dev/editor/index.js +2 -2
- package/dist/dev/index.js +2 -2
- package/dist/document-class-QZXX5ZEE.js +33 -0
- package/dist/{document-class-N7WF3WXG.js.map → document-class-QZXX5ZEE.js.map} +1 -1
- package/dist/hooks/index.js +23 -23
- package/dist/hooks/useComments.js +3 -3
- package/dist/hooks/useGtm.js +23 -23
- package/dist/hooks/useMoney.js +23 -23
- package/dist/hooks/useProduct.js +3 -3
- package/dist/hooks/useStore.js +23 -23
- package/dist/hooks/useUser.js +5 -5
- package/dist/hooks/useWishlist.js +3 -3
- package/dist/index.js +23 -23
- package/dist/native-app/index.js +3 -3
- package/dist/{navigation-5DPDZQUU.js → navigation-DF4JEVKE.js} +8 -8
- package/dist/{navigation-5DPDZQUU.js.map → navigation-DF4JEVKE.js.map} +1 -1
- package/dist/{navigation-FRKMKNLK.js → navigation-FKU75TCE.js} +7 -7
- package/dist/{navigation-FRKMKNLK.js.map → navigation-FKU75TCE.js.map} +1 -1
- package/dist/{not-found-4U2TRCLF.js → not-found-E72Z34CJ.js} +26 -26
- package/dist/{not-found-4U2TRCLF.js.map → not-found-E72Z34CJ.js.map} +1 -1
- package/dist/providers/index.js +23 -23
- package/dist/routes/account/orders.js +8 -8
- package/dist/routes/account.js +17 -17
- package/dist/routes/blog.js +12 -12
- package/dist/routes/brands.js +8 -8
- package/dist/routes/cart.js +32 -32
- package/dist/routes/home.js +29 -29
- package/dist/routes/index.js +6 -6
- package/dist/routes/loyalty.js +9 -9
- package/dist/routes/page.js +8 -8
- package/dist/routes/product-listing.js +33 -33
- package/dist/routes/product.js +28 -28
- package/dist/routes/seo-redirects.js +6 -6
- package/dist/routes/testimonials.js +4 -4
- package/dist/routes/thank-you.js +8 -8
- package/dist/skeleton.js +29 -29
- package/dist/{store-lookup-S6JUSKNH.js → store-lookup-LPXG5JSB.js} +11 -11
- package/dist/{store-lookup-S6JUSKNH.js.map → store-lookup-LPXG5JSB.js.map} +1 -1
- package/dist/tanstack.js +20 -20
- package/dist/utils/baseHead.js +2 -2
- package/dist/utils/cookies.d.ts +6 -0
- package/dist/utils/cookies.d.ts.map +1 -1
- package/dist/utils/index.js +6 -6
- package/dist/vite/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-4E6FD5W7.js.map +0 -1
- package/dist/document-class-N7WF3WXG.js +0 -33
package/dist/api/menu.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { menu } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { menu } from '../chunk-GZUBV5S3.js';
|
|
2
|
+
import '../chunk-YQ365K65.js';
|
|
3
3
|
import '../chunk-Z5M4YYWT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-7IVHY4OR.js';
|
|
5
|
+
import '../chunk-EEL6OYAQ.js';
|
|
6
6
|
import '../chunk-6K34BCUP.js';
|
|
7
7
|
import '../chunk-T72DAX7R.js';
|
|
8
8
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/notification.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { notification } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { notification } from '../chunk-OGEG4QHV.js';
|
|
2
|
+
import '../chunk-YQ365K65.js';
|
|
3
3
|
import '../chunk-Z5M4YYWT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-7IVHY4OR.js';
|
|
5
|
+
import '../chunk-EEL6OYAQ.js';
|
|
6
6
|
import '../chunk-6K34BCUP.js';
|
|
7
7
|
import '../chunk-T72DAX7R.js';
|
|
8
8
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/order.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { order } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { order } from '../chunk-3JJQCRXD.js';
|
|
2
|
+
import '../chunk-H7A7LOQJ.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-YQ365K65.js';
|
|
5
5
|
import '../chunk-Z5M4YYWT.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-IURXJAIK.js';
|
|
7
|
+
import '../chunk-7IVHY4OR.js';
|
|
8
|
+
import '../chunk-EEL6OYAQ.js';
|
|
9
9
|
import '../chunk-6K34BCUP.js';
|
|
10
10
|
import '../chunk-T72DAX7R.js';
|
|
11
11
|
import '../chunk-DF6FBKDN.js';
|
package/dist/api/page.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { page } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { page } from '../chunk-DKPM4T4C.js';
|
|
2
|
+
import '../chunk-H7A7LOQJ.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-YQ365K65.js';
|
|
5
5
|
import '../chunk-Z5M4YYWT.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-IURXJAIK.js';
|
|
7
|
+
import '../chunk-7IVHY4OR.js';
|
|
8
|
+
import '../chunk-EEL6OYAQ.js';
|
|
9
9
|
import '../chunk-6K34BCUP.js';
|
|
10
10
|
import '../chunk-T72DAX7R.js';
|
|
11
11
|
import '../chunk-DF6FBKDN.js';
|
package/dist/api/product.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { getProductPreview, isProductPreviewQuery, parseNextPageToken, product, productDetailQueryKey, productPreviewQueryKey, rememberProductPreview, shouldDehydrateQuery } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { getProductPreview, isProductPreviewQuery, parseNextPageToken, product, productDetailQueryKey, productPreviewQueryKey, rememberProductPreview, shouldDehydrateQuery } from '../chunk-CEIXIUJ7.js';
|
|
2
|
+
import '../chunk-H7A7LOQJ.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-YQ365K65.js';
|
|
5
5
|
import '../chunk-Z5M4YYWT.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-IURXJAIK.js';
|
|
7
|
+
import '../chunk-7IVHY4OR.js';
|
|
8
|
+
import '../chunk-EEL6OYAQ.js';
|
|
9
9
|
import '../chunk-6K34BCUP.js';
|
|
10
10
|
import '../chunk-T72DAX7R.js';
|
|
11
11
|
import '../chunk-DF6FBKDN.js';
|
package/dist/api/profile.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { api } from '../chunk-
|
|
1
|
+
import { api } from '../chunk-YQ365K65.js';
|
|
2
2
|
import '../chunk-Z5M4YYWT.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-7IVHY4OR.js';
|
|
4
|
+
import '../chunk-EEL6OYAQ.js';
|
|
5
5
|
import '../chunk-6K34BCUP.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
|
7
7
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/store.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { store } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { store } from '../chunk-Q76O67KK.js';
|
|
2
|
+
import '../chunk-BRIRWS2Q.js';
|
|
3
|
+
import '../chunk-YQ365K65.js';
|
|
4
4
|
import '../chunk-Z5M4YYWT.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
export { resolveStoreIdentifier } from '../chunk-
|
|
5
|
+
import '../chunk-7IVHY4OR.js';
|
|
6
|
+
export { resolveStoreIdentifier } from '../chunk-EEL6OYAQ.js';
|
|
7
7
|
import '../chunk-6K34BCUP.js';
|
|
8
8
|
import '../chunk-T72DAX7R.js';
|
|
9
9
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/translations.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { commonTranslationsPath, storeTranslationsPath, translations } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { commonTranslationsPath, storeTranslationsPath, translations } from '../chunk-SBZWX6II.js';
|
|
2
|
+
import '../chunk-YQ365K65.js';
|
|
3
3
|
import '../chunk-Z5M4YYWT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-7IVHY4OR.js';
|
|
5
|
+
import '../chunk-EEL6OYAQ.js';
|
|
6
6
|
import '../chunk-6K34BCUP.js';
|
|
7
7
|
import '../chunk-T72DAX7R.js';
|
|
8
8
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/user.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { user } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { user } from '../chunk-R6Z6JQIB.js';
|
|
2
|
+
import '../chunk-YQ365K65.js';
|
|
3
3
|
import '../chunk-Z5M4YYWT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-7IVHY4OR.js';
|
|
5
|
+
import '../chunk-EEL6OYAQ.js';
|
|
6
6
|
import '../chunk-6K34BCUP.js';
|
|
7
7
|
import '../chunk-T72DAX7R.js';
|
|
8
8
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/wallet.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { wallet } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { wallet } from '../chunk-O7PJBTH3.js';
|
|
2
|
+
import '../chunk-YQ365K65.js';
|
|
3
3
|
import '../chunk-Z5M4YYWT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-7IVHY4OR.js';
|
|
5
|
+
import '../chunk-EEL6OYAQ.js';
|
|
6
6
|
import '../chunk-6K34BCUP.js';
|
|
7
7
|
import '../chunk-T72DAX7R.js';
|
|
8
8
|
import '../chunk-DGUM43GV.js';
|
package/dist/api/wishlist.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { wishlist } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { wishlist } from '../chunk-OJ4PJK27.js';
|
|
2
|
+
import '../chunk-CEIXIUJ7.js';
|
|
3
|
+
import '../chunk-H7A7LOQJ.js';
|
|
4
4
|
import '../chunk-OUW6WESU.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-YQ365K65.js';
|
|
6
6
|
import '../chunk-Z5M4YYWT.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-IURXJAIK.js';
|
|
8
|
+
import '../chunk-7IVHY4OR.js';
|
|
9
|
+
import '../chunk-EEL6OYAQ.js';
|
|
10
10
|
import '../chunk-6K34BCUP.js';
|
|
11
11
|
import '../chunk-T72DAX7R.js';
|
|
12
12
|
import '../chunk-DF6FBKDN.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { orThrow, orUnauthorized } from './chunk-
|
|
2
|
-
import { api } from './chunk-
|
|
1
|
+
import { orThrow, orUnauthorized } from './chunk-H7A7LOQJ.js';
|
|
2
|
+
import { api } from './chunk-YQ365K65.js';
|
|
3
3
|
import { queryOptions } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
5
|
var order = {
|
|
@@ -78,5 +78,5 @@ var order = {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export { order };
|
|
81
|
-
//# sourceMappingURL=chunk-
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-3JJQCRXD.js.map
|
|
82
|
+
//# sourceMappingURL=chunk-3JJQCRXD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/order.ts"],"names":[],"mappings":";;;;AAoDO,IAAM,KAAA,GAAQ;AAAA,EACnB,IAAA,EAAM,OAAO,MAAA,KAA2D;AACtE,IAAA,MAAM;AAAA,MACJ,IAAA;AAAA,MACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,eAAA,EAAiB,c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EAAS,CAAC,EAAE,MAAA,EAAO,KAAM,KAAA,CAAM,IAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,MAAA,EAAQ;AAAA,KAC1D,CAAA;AAAA,IACH,IAAA,EAAM,CAAC,EAAA,KACL,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,QAAA,EAAU,QAAA,EAAU,EAAE,CAAA;AAAA,MACjC,OAAA,EAAS,MAAM,KAAA,CAAM,IAAA,CAAK,EAAE;AAAA,KAC7B,CAAA;AAAA,IACH,SAAA,EAAW,CAAC,OAAA,KACV,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,QAAA,EAAU,WAAA,EAAa,OAAO,CAAA;AAAA,MACzC,OAAA,EAAS,MAAM,KAAA,CAAM,SAAA,CAAU,OAAO;AAAA,KACvC,CAAA;AAAA,IACH,OAAA,EAAS,CAAC,OAAA,KACR,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,QAAA,EAAU,SAAA,EAAW,OAAO,CAAA;AAAA,MACvC,OAAA,EAAS,MAAM,KAAA,CAAM,OAAA,CAAQ,OAAO;AAAA,KACrC,CAAA;AAAA,IACH,QAAA,EAAU,CAAC,OAAA,KACT,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,QAAA,EAAU,UAAA,EAAY,OAAO,CAAA;AAAA,MACxC,OAAA,EAAS,MAAM,KAAA,CAAM,QAAA,CAAS,OAAO;AAAA,KACtC;AAAA;AAEP","file":"chunk-3JJQCRXD.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api } from './client';\nimport type {\n Order,\n OrderListItem,\n OrderShipmentItem,\n OrderRatingItem,\n} from '../routes/account/types';\nimport type { Pagination } from './types';\nimport { orThrow, orUnauthorized } from '../providers/NavigationProvider';\n\nexport interface OrderDetailResponse {\n order: Order;\n}\n\n/**\n * The order in the shape the Twilight web components read (`salla-order-details`,\n * `salla-order-totals-card`) and the Twig themes render: the API answers `orders/{id}` this\n * way when the request does not say it comes from a React theme (`s-theme-type`).\n */\nexport interface TwilightOrder {\n items: Array<{\n name: string;\n quantity: number;\n product?: { id: number; url?: string; type?: string; image?: { url?: string } };\n options?: unknown[];\n }>;\n [key: string]: unknown;\n}\n\nexport interface CheckoutThankYouData {\n thank_you_title?: string;\n messages?: string[];\n share_message?: string;\n short_share_message?: string;\n}\n\nexport interface OrdersListResponse {\n data: OrderListItem[];\n cursor?: Pagination;\n}\n\nexport interface OrdersListParams {\n page?: number;\n cursor?: string | null;\n status?: string;\n feedback_status?: string;\n /** When set, the list payload includes each order's `items[]` (`with_items=1`). */\n with_items?: boolean | number;\n signal?: AbortSignal;\n}\n\nexport const order = {\n list: async (params?: OrdersListParams): Promise<OrdersListResponse> => {\n const {\n page,\n cursor,\n status,\n feedback_status: feedbackStatus,\n with_items: withItems,\n signal,\n } = params ?? {};\n\n const searchParams = new URLSearchParams();\n if (page !== undefined) searchParams.set('page', String(page));\n if (cursor) searchParams.set('cursor', cursor);\n if (status) searchParams.set('status', status);\n if (feedbackStatus) searchParams.set('feedback_status', feedbackStatus);\n if (withItems) searchParams.set('with_items', '1');\n\n const options: Record<string, unknown> = {};\n if (signal) options.signal = signal;\n\n const response = await api\n .get(`orders?${searchParams.toString()}`, options as any)\n .json<{ data: OrderListItem[] | null; cursor?: Pagination }>();\n\n return {\n data: response.data ?? [],\n cursor: response.cursor,\n };\n },\n\n find: async (id: string): Promise<OrderDetailResponse> => {\n const response = await api.get(`orders/${id}`).json<{ data: Order }>();\n\n return { order: response.data };\n },\n\n findForComponents: async (id: string): Promise<TwilightOrder> => {\n const response = await api\n .get(`orders/${id}`, {\n hooks: {\n // Runs after the client's own hook, which marks every request as from a React theme.\n beforeRequest: [({ request }) => request.headers.delete('s-theme-type')],\n },\n })\n .json<{ data: TwilightOrder }>();\n return response.data;\n },\n\n shipments: async (orderId: string): Promise<OrderShipmentItem[]> => {\n const response = await api\n .get(`orders/${orderId}/shipments`)\n .json<{ data: OrderShipmentItem[] }>();\n return response.data ?? [];\n },\n\n ratings: async (orderId: string): Promise<OrderRatingItem[]> => {\n const response = await api.get(`orders/${orderId}/ratings`).json<{ data: OrderRatingItem[] }>();\n return response.data ?? [];\n },\n\n findOrThrow: (id: string): Promise<OrderDetailResponse> =>\n orThrow(orUnauthorized(order.find(id))),\n\n thankYou: async (orderId: string): Promise<CheckoutThankYouData> => {\n const { data } = await api\n .get(`checkout/thank-you/${orderId}`)\n .json<{ data: CheckoutThankYouData }>();\n return data;\n },\n\n thankYouOrThrow: (orderId: string): Promise<CheckoutThankYouData> =>\n orThrow(order.thankYou(orderId)),\n\n queries: {\n list: (params?: Omit<OrdersListParams, 'signal'>) =>\n queryOptions({\n queryKey: ['orders', 'list', params],\n queryFn: ({ signal }) => order.list({ ...params, signal }),\n }),\n find: (id: string) =>\n queryOptions({\n queryKey: ['orders', 'detail', id],\n queryFn: () => order.find(id),\n }),\n shipments: (orderId: string) =>\n queryOptions({\n queryKey: ['orders', 'shipments', orderId],\n queryFn: () => order.shipments(orderId),\n }),\n ratings: (orderId: string) =>\n queryOptions({\n queryKey: ['orders', 'ratings', orderId],\n queryFn: () => order.ratings(orderId),\n }),\n thankYou: (orderId: string) =>\n queryOptions({\n queryKey: ['orders', 'thankYou', orderId],\n queryFn: () => order.thankYou(orderId),\n }),\n },\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { redirect } from './chunk-
|
|
2
|
-
import { clearAuthTokenCookie } from './chunk-
|
|
1
|
+
import { redirect } from './chunk-H7A7LOQJ.js';
|
|
2
|
+
import { clearAuthTokenCookie } from './chunk-EEL6OYAQ.js';
|
|
3
3
|
import { FALLBACK_LOCALE } from './chunk-T72DAX7R.js';
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
|
|
@@ -37,5 +37,5 @@ function LogoutRedirect() {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export { LogoutRedirect, accountRedirectLoader, pendingOrdersRedirectLoader, productsSourceRedirectLoader, ratingRedirectLoader, slugBrandRedirectLoader };
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-3ULBL56H.js.map
|
|
41
|
+
//# sourceMappingURL=chunk-3ULBL56H.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/seo-redirects.ts"],"names":[],"mappings":";;;;;AAcA,eAAsB,wBAAwB,GAAA,EAAkD;AAC9F,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,SAAS,CAAA,CAAA,EAAI,MAAM,WAAW,GAAA,CAAI,MAAA,CAAO,EAAE,CAAA,CAAE,CAAA;AACrD;AAOA,eAAsB,4BACpB,GAAA,GAA+C,EAAE,MAAA,EAAQ,IAAG,EAC5C;AAChB,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,QAAA,CAAS,CAAA,CAAA,EAAI,MAAM,CAAA,8BAAA,CAAgC,CAAA;AAC3D;AAGA,eAAsB,qBACpB,GAAA,GAA+C,EAAE,MAAA,EAAQ,IAAG,EAC5C;AAChB,EAAA,MAAM,MAAA,GAAS,GAAA,CAAI,MAAA,CAAO,MAAA,IAAU,eAAA;AACpC,EAAA,MAAM,QAAA,CAAS,CAAA,CAAA,EAAI,MAAM,CAAA,eAAA,CAAiB,CAAA;AAC5C;AAGA,eAAsB,sBAAsB,GAAA,EAKzB;AAEjB,EAAA,MAAM,MAAA,GAAS,IAAI,MAAA,CAAO,MAAA,GAAS,IAAI,GAAA,CAAI,MAAA,CAAO,MAAM,CAAA,CAAA,GAAK,EAAA;AAC7D,EAAA,MAAM,QAAA,CAAS,CAAA,EAAG,MAAM,CAAA,SAAA,EAAY,IAAI,IAAI,CAAA,EAAG,GAAA,CAAI,MAAA,IAAU,EAAE,CAAA,CAAA,EAAI,EAAE,U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UO,SAAS,cAAA,GAAuB;AACrC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,oBAAA,EAAqB;AAErB,IAAA,MAAA,CAAO,QAAA,CAAS,QAAQ,MAAA,CAAO,QAAA,CAAS,KAAK,OAAA,CAAQ,8BAAA,EAAgC,EAAE,CAAC,CAAA;AAAA,EAC1F,CAAA,EAAG,EAAE,CAAA;AACL,EAAA,OAAO,IAAA;AACT","file":"chunk-3ULBL56H.js","sourcesContent":["import { useEffect } from 'react';\nimport { redirect } from '../providers/NavigationProvider';\nimport { FALLBACK_LOCALE } from '../providers/locale-constants';\nimport { clearAuthTokenCookie } from '../utils/cookies';\n\nexport interface SlugBrandParams {\n /** SEO slug segment (ignored — only here to match the route pattern). */\n slug: string;\n /** Brand numeric ID to redirect to. */\n id: string;\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function slugBrandRedirectLoader(ctx: { params: SlugBrandParams }): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/brands/${ctx.params.id}`);\n}\n\nexport interface PendingOrdersRedirectParams {\n /** Active locale from the `/$locale` parent layout (e.g. `'ar'`, `'en'`). */\n locale?: string;\n}\n\nexport async function pendingOrdersRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders?status=pending`);\n}\n\n/** `/account/rating`: the loyalty \"rate your orders\" link. Twig Raed has no rating page and sends it to the orders list. */\nexport async function ratingRedirectLoader(\n ctx: { params: PendingOrdersRedirectParams } = { params: {} }\n): Promise<never> {\n const locale = ctx.params.locale || FALLBACK_LOCALE;\n throw redirect(`/${locale}/account/orders`);\n}\n\n/** A Twig customer URL (`/profile`, `/orders`, …) kept working as its `/account/…` page. */\nexport async function accountRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n page: string;\n /** The incoming query string (`?status=pending`), kept on the account page. */\n search?: string;\n}): Promise<never> {\n // No locale in the URL stays without one: the locale layout adds it only where the store has several.\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n throw redirect(`${prefix}/account/${ctx.page}${ctx.search ?? ''}`, { statusCode: 301 });\n}\n\n/** `/latest-products`, `/most-sales-products` and `/offers` now live at `/products?source=`. */\nexport async function productsSourceRedirectLoader(ctx: {\n params: PendingOrdersRedirectParams;\n source: 'latest' | 'sales' | 'offers';\n search?: string;\n}): Promise<never> {\n const prefix = ctx.params.locale ? `/${ctx.params.locale}` : '';\n const query = new URLSearchParams(ctx.search);\n query.delete('source');\n const rest = query.toString();\n throw redirect(`${prefix}/products?source=${ctx.source}${rest ? `&${rest}` : ''}`, {\n statusCode: 301,\n });\n}\n\n/**\n * `/logout` — where the SDK sends the browser once `salla.auth.logout()` has run\n * (`salla.url.get('logout?from=…')`). The Twig storefront serves that URL server-side. Here\n * it renders nothing and, in the browser, removes the theme's own `token` cookie (the SDK's\n * `cookie.clearAll()` leaves it) and then does a full navigation home. It has to be a\n * component, not a loader redirect: a loader runs during server rendering, where the cookie\n * can't be cleared, so the redirect would leave the visitor signed in on the next request.\n */\nexport function LogoutRedirect(): null {\n useEffect(() => {\n clearAuthTokenCookie();\n // `/{store base}/{locale}/logout?from=…` → `/{store base}/{locale}`\n window.location.replace(window.location.href.replace(/\\/logout\\/?(\\?[^#]*)?(#.*)?$/, ''));\n }, []);\n return null;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDate } from './chunk-
|
|
1
|
+
import { useDate } from './chunk-A7E6XFZC.js';
|
|
2
2
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
3
|
-
import { Image } from './chunk-
|
|
3
|
+
import { Image } from './chunk-SF2POPJW.js';
|
|
4
4
|
import { Link } from './chunk-AXW67SY7.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -61,5 +61,5 @@ function BlogListLayout({
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export { BlogArticleCard, BlogListLayout };
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-5CXBBDJB.js.map
|
|
65
|
+
//# sourceMappingURL=chunk-5CXBBDJB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/blog/components.tsx"],"names":[],"mappings":";;;;;;AAMO,SAAS,qBAAA,CAAsB,EAAE,UAAA,EAAW,EAAmC;AACpF,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAE7B,EAAA,IAAI,CAAC,UAAA,CAAW,MAAA,EAAQ,OAAO,IAAA;AAE/B,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,YAAA,EAAW,SAAA,EAAU,WAAU,sDAAA,EAClC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,gBAAA,EAAkB,QAAA,EAAA,CAAA,CAAE,kCAAkC,CAAA,EAAE,CAAA;AAAA,oBACtE,GAAA,CAAC,IAAA,EAAA,EACE,QAAA,EAAA,UAAA,CAAW,GAAA,CAAI,CAAC,QAAA,qBACf,GAAA,CAAC,IAAA,EAAA,EAAqB,SAAA,EAAW,QAAA,CAAS,UAAA,GAAa,cAAA,GAAiB,EAAA,EACtE,8BAAC,IAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAwC,EAAA,EAAI,QAAA,CAAS,GAAA,EAClE,QAAA,EAAA,QAAA,CAAS,IAAA,EACZ,CAAA,EAAA,EAHO,QAAA,CAAS,EAIlB,CACD,CAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ;AAEO,SAAS,eAAA,CAAgB;AAAA,EAC9B,OAAA;AAAA,EACA,UAAA,GAAa;AACf,CAAA,EAGG;AACD,EAAA,MAAM,EAAE,MAAA,EAAQ,UAAA,EAA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OAAA,CAAQ,UAAU,CAAA,EAAE;AAAA,SAAA,EACxC,CAAA;AAAA,QACC,UAAA,IAAc,OAAA,CAAQ,MAAA,oBACrB,IAAA,CAAC,IAAA,EAAA,EAAK,IAAI,OAAA,CAAQ,MAAA,CAAO,GAAA,EAAK,SAAA,EAAU,mCAAA,EACtC,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,GAAA,EAAA,EAAE,WAAU,8BAAA,EAA+B,CAAA;AAAA,0BAC5C,GAAA,CAAC,MAAA,EAAA,EAAM,QAAA,EAAA,OAAA,CAAQ,MAAA,CAAO,IAAA,EAAK;AAAA,SAAA,EAC7B;AAAA,OAAA,EAEJ,CAAA;AAAA,sBACA,GAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,oEAAA,EACZ,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,OAAA,CAAQ,GAAA,EAAM,QAAA,EAAA,OAAA,CAAQ,IAAA,EAAK,CAAA,EACvC,CAAA;AAAA,sBACA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,wCAAA,EAA0C,kBAAQ,WAAA,EAAY;AAAA,KAAA,EAC7E;AAAA,GAAA,EACF,CAAA;AAEJ;AAEO,SAAS,cAAA,CAAe;AAAA,EAC7B,UAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uCAAA,EACb,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,yBAAsB,UAAA,EAAwB,CAAA;AAAA,oBAC/C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,4BAAA,EAA8B,QAAA,EAAS;AAAA,GAAA,EACxD,CAAA;AAEJ","file":"chunk-5CXBBDJB.js","sourcesContent":["import type { ReactNode } from 'react';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { useDate } from '../../hooks';\nimport { Image, Link } from '../../components/common';\nimport type { BlogCategory, ArticleSummary } from './types';\n\nexport function BlogCategoriesSidebar({ categories }: { categories: BlogCategory[] }) {\n const { t } = useTranslation();\n\n if (!categories.length) return null;\n\n return (\n <nav aria-label=\"Sidebar\" className=\"hidden lg:block lg:sticky shrink-0 top-24 col-span-2\">\n <h2 className=\"font-bold mb-3\">{t('pages.blog_categories.categories')}</h2>\n <ul>\n {categories.map((category) => (\n <li key={category.id} className={category.is_current ? 'text-primary' : ''}>\n <Link className=\"py-3 block text-sm hover:text-primary\" to={category.url}>\n {category.name}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\nexport function BlogArticleCard({\n article,\n showAuthor = false,\n}: {\n article: ArticleSummary;\n showAuthor?: boolean;\n}) {\n const { format: formatDate } = useDate();\n\n return (\n <div className=\"list-block post-entry relative h-full transition-shadow duration-500 bg-white hover:shadow-default rounded-lg justify-around overflow-hidden flex flex-col\">\n <Link\n to={article.url}\n className=\"post-entry__image relative overflow-hidden hover:opacity-90 w-full h-56 bg-border-color flex items-center justify-center\"\n >\n {article.image && (\n <Image\n className=\"h-full w-full object-cover\"\n src={article.image}\n alt={article.name}\n aspectRatio=\"16/9\"\n />\n )}\n </Link>\n <div className=\"flex-1 px-5 pt-5 pb-7\">\n <div className=\"mb-2.5 text-gray-500 rounded-md inline-flex text-sm rtl:space-x-reverse space-x-5\">\n <div className=\"flex items-center\">\n <i className=\"sicon-calendar-date rtl:ml-1 ltr:mr-1\"></i>\n <span>{formatDate(article.created_at)}</span>\n </div>\n {showAuthor && article.author && (\n <Link to={article.author.url} className=\"flex items-center hover:text-dark\">\n <i className=\"sicon-user rtl:ml-1 ltr:mr-1\"></i>\n <span>{article.author.name}</span>\n </Link>\n )}\n </div>\n <h3 className=\"post-entry__title text-sm font-bold text-gray-800 leading-6 mb-2.5\">\n <Link to={article.url}>{article.name}</Link>\n </h3>\n <p className=\"text-sm text-gray-500 leading-6 mb-2.5\">{article.description}</p>\n </div>\n </div>\n );\n}\n\nexport function BlogListLayout({\n categories,\n children,\n}: {\n categories: BlogCategory[];\n children: ReactNode;\n}) {\n return (\n <div className=\"grid grid-cols-1 lg:grid-cols-8 gap-8\">\n <BlogCategoriesSidebar categories={categories} />\n <div className=\"main-content lg:col-span-6\">{children}</div>\n </div>\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { api } from './chunk-
|
|
1
|
+
import { api } from './chunk-YQ365K65.js';
|
|
2
2
|
import { queryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
var apps = {
|
|
@@ -40,5 +40,5 @@ var apps = {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export { apps };
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-6R2AUQMP.js.map
|
|
44
|
+
//# sourceMappingURL=chunk-6R2AUQMP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/apps.ts"],"names":[],"mappings":";;;AAmCO,IAAM,IAAA,GAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKlB,UAAU,YAAmC;AAC3C,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CACpB,GAAA,CAAI,eAAA,EAAiB,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA,CACtC,IAAA,EAA8B;AACjC,IAAA,OAAO,QAAQ,EAAC;AAAA,EAClB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,UAAU,YAAkC;AAC1C,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CACpB,GAAA,CAAI,wBAAA,EAA0B,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA,CAC/C,IAAA,EAAsC;AACzC,IAAA,OAAO,EAAE,IAAA,EAAM,IAAA,EAAM,IAAA,IAAQ,EAAC,EAAE;AAAA,EAClC,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,QAAA,EAAU,MACR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AAA,EAAS;AAAA;AAAA,MAE7B,SAAA,EAAW,QAAA;AAAA;AAAA;AAAA;AAAA,MAIX,KAAA,EAAO;AAAA,KACR,CAAA;AAAA,IAEH,QAAA,EAAU,MACR,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,MAAA,EAAQ,UAAU,CAAA;AAAA,MAC7B,OAAA,EAAS,MAAM,IAAA,CAAK,QAAA,EAAS;AAAA;AAAA,MAE7B,SAAA,EAAW,QAAA;AAAA,MACX,KAAA,EAAO;AAAA,KACR;AAAA;AAEP","file":"chunk-6R2AUQMP.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api } from './client';\n\nexport interface AppSnippetRow {\n place: string;\n content: string;\n url?: string | null;\n /**\n * Raw snippet id, emitted as `data-snippet-id`. Present only on CDN rows — the\n * inline branch of the backend's snippet parser omits the key entirely.\n */\n id?: number;\n /** `{{customer.x}}` placeholders in `content` to substitute from SDK config `user.*` keys. */\n customer_parameters?: string[];\n}\n\nexport interface AppSnippet {\n service: string;\n app_id: string;\n /** Encoded app id (`getRouteKey()`): the scope id its snippets bind to via `data-scope-id`,\n * and its settings-bucket key. Absent on payloads predating the settings API. */\n id?: string;\n app_slug: string;\n status: string;\n snippets: AppSnippetRow[];\n}\n\n/**\n * Per-app public `app.*` buckets for CDN snippets, keyed by encoded app id (== `AppSnippet.id`,\n * the `Salla.appScope` scope id). One isolated bucket per app; reads within a scope are bare `app.*`.\n */\nexport interface AppSettings {\n apps: Record<string, Record<string, unknown>>;\n}\n\nexport const apps = {\n /**\n * Installed apps' snippets (scripts/HTML to inject). Timeout-bounded because it's awaited in\n * rootBeforeLoad (SSR/TTFB): a slow response degrades to no CDN tags, never stalls the page.\n */\n snippets: async (): Promise<AppSnippet[]> => {\n const { data } = await api\n .get('apps/snippets', { timeout: 2500 })\n .json<{ data?: AppSnippet[] }>();\n return data ?? [];\n },\n\n /**\n * Per-app public `app.*` buckets, keyed by encoded app id. Timeout-bounded (SSR-awaited):\n * a slow response degrades to empty buckets (fail-open), never strands injection.\n */\n settings: async (): Promise<AppSettings> => {\n const { data } = await api\n .get('apps/snippets/settings', { timeout: 2500 })\n .json<{ data?: Partial<AppSettings> }>();\n return { apps: data?.apps ?? {} };\n },\n\n queries: {\n snippets: () =>\n queryOptions({\n queryKey: ['apps', 'snippets'],\n queryFn: () => apps.snippets(),\n // Snippets are static per session; one fetch per page load is enough.\n staleTime: Infinity,\n // No retry: this is awaited in rootBeforeLoad, so the router's default `retry: 1` would\n // make the SSR wait 2 x the 2500ms timeout (plus backoff) before failing open. The\n // 2500ms timeout must be the whole budget; the client fallback query does the retrying.\n retry: 0,\n }),\n\n settings: () =>\n queryOptions({\n queryKey: ['apps', 'settings'],\n queryFn: () => apps.settings(),\n // Encoded app ids and their buckets are stable per page; one fetch is enough.\n staleTime: Infinity,\n retry: 0,\n }),\n },\n};\n"]}
|
|
@@ -2,24 +2,24 @@ import { lazyComponent } from './chunk-VYGA5AT5.js';
|
|
|
2
2
|
|
|
3
3
|
// src/components/layout/lazy.ts
|
|
4
4
|
var LazyHeader = lazyComponent(
|
|
5
|
-
() => import('./Header-
|
|
5
|
+
() => import('./Header-DEUDDAWD.js').then((m) => ({ default: m.Header }))
|
|
6
6
|
);
|
|
7
7
|
var LazyFooter = lazyComponent(
|
|
8
|
-
() => import('./Footer-
|
|
8
|
+
() => import('./Footer-4QV4H67O.js').then((m) => ({ default: m.Footer }))
|
|
9
9
|
);
|
|
10
10
|
var LazyCopyright = lazyComponent(
|
|
11
|
-
() => import('./Copyright-
|
|
11
|
+
() => import('./Copyright-YXWJNV5Q.js').then((m) => ({ default: m.Copyright }))
|
|
12
12
|
);
|
|
13
13
|
var LazyMasterLayout = lazyComponent(
|
|
14
|
-
() => import('./MasterLayout-
|
|
14
|
+
() => import('./MasterLayout-Z45QJW3M.js').then((m) => ({ default: m.MasterLayout }))
|
|
15
15
|
);
|
|
16
16
|
var LazyWidgetHead = lazyComponent(
|
|
17
17
|
() => import('./WidgetHead-BCRIXIJQ.js').then((m) => ({ default: m.WidgetHead }))
|
|
18
18
|
);
|
|
19
19
|
var LazyCustomerLayout = lazyComponent(
|
|
20
|
-
() => import('./CustomerLayout-
|
|
20
|
+
() => import('./CustomerLayout-YU7TKV2Q.js').then((m) => ({ default: m.CustomerLayout }))
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
export { LazyCopyright, LazyCustomerLayout, LazyFooter, LazyHeader, LazyMasterLayout, LazyWidgetHead };
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-77SZTUQE.js.map
|
|
25
|
+
//# sourceMappingURL=chunk-77SZTUQE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/lazy.ts"],"names":[],"mappings":";;;AAMO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,UAAA,GAAa,aAAA;AAAA,EAAc,MACtC,OAAO,sBAAU,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,MAAA,EAAO,CAAE;AACxD;AAEO,IAAM,aAAA,GAAgB,aAAA;AAAA,EAAc,MACzC,OAAO,yBAAa,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,SAAA,EAAU,CAAE;AAC9D;AAEO,IAAM,gBAAA,GAAmB,aAAA;AAAA,EAAc,MAC5C,OAAO,4BAAgB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,YAAA,EAAa,CAAE;AACpE;AAEO,IAAM,cAAA,GAAiB,aAAA;AAAA,EAAc,MAC1C,OAAO,0BAAc,C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,EAAE,OAAA,EAAS,CAAA,CAAE,cAAA,EAAe,CAAE;AACxE","file":"chunk-77SZTUQE.js","sourcesContent":["import { lazyComponent } from '../../utils/lazy-component';\n\n/**\n * Lazy-loaded layout components\n * Use these for code-splitting layout sections\n */\nexport const LazyHeader = lazyComponent(() =>\n import('./Header').then((m) => ({ default: m.Header }))\n);\n\nexport const LazyFooter = lazyComponent(() =>\n import('./Footer').then((m) => ({ default: m.Footer }))\n);\n\nexport const LazyCopyright = lazyComponent(() =>\n import('./Copyright').then((m) => ({ default: m.Copyright }))\n);\n\nexport const LazyMasterLayout = lazyComponent(() =>\n import('./MasterLayout').then((m) => ({ default: m.MasterLayout }))\n);\n\nexport const LazyWidgetHead = lazyComponent(() =>\n import('./WidgetHead').then((m) => ({ default: m.WidgetHead }))\n);\n\nexport const LazyCustomerLayout = lazyComponent(() =>\n import('./CustomerLayout').then((m) => ({ default: m.CustomerLayout }))\n);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getInjectedRuntimeEnv, resolveStoreIdentifier } from './chunk-
|
|
1
|
+
import { getInjectedRuntimeEnv, resolveStoreIdentifier } from './chunk-EEL6OYAQ.js';
|
|
2
2
|
import { getRequestStore, getTwilightContext } from './chunk-6K34BCUP.js';
|
|
3
3
|
|
|
4
4
|
// src/utils/theme-version.ts
|
|
@@ -121,5 +121,5 @@ function syncSdkThemeVersion(headers) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export { getSallaSDK, getStoreIdentifier, onSallaEvent, requestedThemeVersionId, resolveThemeVersionId, syncSdkLocale, syncSdkThemeVersion, whenSallaLoaded, whenSallaReady, withSdkThemeVersion };
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-7IVHY4OR.js.map
|
|
125
|
+
//# sourceMappingURL=chunk-7IVHY4OR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"s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Q;AAAA,EAER;AACF;AAaA,SAAS,kBAAkB,OAAA,EAAiD;AAC1E,EAAA,MAAM,SAAA,GAAY,uBAAA,EAAwB,IAAK,OAAA,GAAU,cAAc,CAAA;AACvE,EAAA,OAAO,SAAA,IAAa,IAAA,GAAO,MAAA,CAAO,SAAS,CAAA,GAAI,IAAA;AACjD;AAWO,SAAS,oBAA6D,QAAA,EAAgB;AAC3F,EAAA,MAAM,YAAY,uBAAA,EAAwB;AAC1C,EAAA,IAAI,CAAC,WAAW,OAAO,QAAA;AACvB,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,OAAA,EAAS,EAAE,GAAG,QAAA,CAAS,OAAA,EAAS,cAAA,EAAgB,SAAA,EAAU,EAAE;AACpF;AAcO,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,MAAM,WAAA,EAAY;AACxB,EAAA,IAAI,CAAC,GAAA,EAAK;AACV,EAAA,MAAM,SAAA,GAAY,kBAAkB,OAAO,CAAA;AAC3C,EAAA,IAAI;AACF,IAAA,IAAI,aAAa,IAAA,EAAM,GAAA,CAAI,GAAA,EAAK,SAAA,GAAY,gBAAgB,SAAS,CAAA;AAAA,gBACzD,GAAA,CAAI,GAAA,EAAK,OAAO,QAAA,EAAU,OAAA,EAAS,SAAS,cAAc,CAAA;AAAA,EACxE,CAAA,CAAA,MAAQ;AAAA,EAER;AACF","file":"chunk-7XAGU6CT.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 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 { 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.\n *\n * `init` spreads `headers` over its axios defaults, and on a first load nothing\n * re-asserts the version 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 */\nexport function withSdkThemeVersion<T extends Pick<StoreContext, 'headers'>>(settings: T): T {\n const versionId = requestedThemeVersionId();\n if (!versionId) return settings;\n return { ...settings, headers: { ...settings.headers, 's-version-id': versionId } };\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. No-op on the server and until the SDK exposes its api.\n */\nexport function syncSdkThemeVersion(headers: StoreContext['headers']): void {\n const sdk = getSallaSDK();\n if (!sdk) return;\n const versionId = sdkThemeVersionId(headers);\n try {\n if (versionId != null) sdk.api?.setHeader?.('s-version-id', versionId);\n else delete sdk.api?.axios?.defaults?.headers?.common?.['s-version-id'];\n } catch {\n // SDK partially loaded — the header is re-asserted on the next navigation.\n }\n}\n"]}
|
|
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;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;AAEtB,EAAA,IAAI;AACF,IAAA,MAAM,QAAA,GAAW,oBAAmB,CAAE,QAAA;AACtC,IAAA,IAAI,CAAC,YAAA,CAAa,QAAA,EAAU,aAAa,GAAG,OAAO,IAAA;AAEnD,IAAA,MAAM,SAAA,GAAY,QAAA,EAAU,KAAA,EAAO,OAAA,EAAS,EAAA;AAC5C,IAAA,OAAO,SAAA,IAAa,IAAA,GAAO,MAAA,CAAO,SAAS,CAAA,GAAI,IAAA;AAAA,EACjD,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;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I,GAAA,EAAK,SAAA,GAAY,iBAAA,EAAmB,MAAM,CAAA;AAG9C,IAAA,GAAA,CAAI,MAAA,EAAQ,GAAA,GAAM,oBAAA,EAAsB,MAAM,CAAA;AAAA,EAChD,CAAA,CAAA,MAAQ;AAAA,EAER;AACF;AAaA,SAAS,kBAAkB,OAAA,EAAiD;AAC1E,EAAA,MAAM,SAAA,GAAY,uBAAA,EAAwB,IAAK,OAAA,GAAU,cAAc,CAAA;AACvE,EAAA,OAAO,SAAA,IAAa,IAAA,GAAO,MAAA,CAAO,SAAS,CAAA,GAAI,IAAA;AACjD;AAWO,SAAS,oBAA6D,QAAA,EAAgB;AAC3F,EAAA,MAAM,YAAY,uBAAA,EAAwB;AAC1C,EAAA,IAAI,CAAC,WAAW,OAAO,QAAA;AACvB,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,OAAA,EAAS,EAAE,GAAG,QAAA,CAAS,OAAA,EAAS,cAAA,EAAgB,SAAA,EAAU,EAAE;AACpF;AAcO,SAAS,oBAAoB,OAAA,EAAwC;AAC1E,EAAA,MAAM,MAAM,WAAA,EAAY;AACxB,EAAA,IAAI,CAAC,GAAA,EAAK;AACV,EAAA,MAAM,SAAA,GAAY,kBAAkB,OAAO,CAAA;AAC3C,EAAA,IAAI;AACF,IAAA,IAAI,aAAa,IAAA,EAAM,GAAA,CAAI,GAAA,EAAK,SAAA,GAAY,gBAAgB,SAAS,CAAA;AAAA,gBACzD,GAAA,CAAI,GAAA,EAAK,OAAO,QAAA,EAAU,OAAA,EAAS,SAAS,cAAc,CAAA;AAAA,EACxE,CAAA,CAAA,MAAQ;AAAA,EAER;AACF","file":"chunk-7IVHY4OR.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 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 { 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.\n *\n * `init` spreads `headers` over its axios defaults, and on a first load nothing\n * re-asserts the version 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 */\nexport function withSdkThemeVersion<T extends Pick<StoreContext, 'headers'>>(settings: T): T {\n const versionId = requestedThemeVersionId();\n if (!versionId) return settings;\n return { ...settings, headers: { ...settings.headers, 's-version-id': versionId } };\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. No-op on the server and until the SDK exposes its api.\n */\nexport function syncSdkThemeVersion(headers: StoreContext['headers']): void {\n const sdk = getSallaSDK();\n if (!sdk) return;\n const versionId = sdkThemeVersionId(headers);\n try {\n if (versionId != null) sdk.api?.setHeader?.('s-version-id', versionId);\n else delete sdk.api?.axios?.defaults?.headers?.common?.['s-version-id'];\n } catch {\n // SDK partially loaded — the header is re-asserted on the next navigation.\n }\n}\n"]}
|