@salla.sa/twilight-theme-engine 1.0.94 → 1.0.96
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-MASXVJOI.js → AddToCartForm-DASRXMY7.js} +3 -3
- package/dist/{AddToCartForm-MASXVJOI.js.map → AddToCartForm-DASRXMY7.js.map} +1 -1
- package/dist/{BlogAuthorPage-KRT7MRTC.js → BlogAuthorPage-WFZGYSUB.js} +26 -24
- package/dist/BlogAuthorPage-WFZGYSUB.js.map +1 -0
- package/dist/{BlogCategoryPage-OP3ETAMT.js → BlogCategoryPage-23PFOVVP.js} +26 -24
- package/dist/BlogCategoryPage-23PFOVVP.js.map +1 -0
- package/dist/{BlogPage-RGAQVUDI.js → BlogPage-4RFI56TW.js} +24 -22
- package/dist/BlogPage-4RFI56TW.js.map +1 -0
- package/dist/{BlogSinglePage-VG4UXBTL.js → BlogSinglePage-KMGBQUG5.js} +24 -22
- package/dist/BlogSinglePage-KMGBQUG5.js.map +1 -0
- package/dist/{BlogTagPage-G4IVHJD5.js → BlogTagPage-ZPQJKPBO.js} +26 -24
- package/dist/BlogTagPage-ZPQJKPBO.js.map +1 -0
- package/dist/{BrandsPage-2JMPPOOU.js → BrandsPage-FIHOZYMB.js} +25 -23
- package/dist/BrandsPage-FIHOZYMB.js.map +1 -0
- package/dist/{Breadcrumb-I3ZOGG2Y.js → Breadcrumb-2IXFQL6L.js} +24 -22
- package/dist/Breadcrumb-2IXFQL6L.js.map +1 -0
- package/dist/{CartItem-YTPYETW6.js → CartItem-GRFH5BED.js} +24 -22
- package/dist/CartItem-GRFH5BED.js.map +1 -0
- package/dist/{CartSummary-DND7BO26.js → CartSummary-IOCZJL26.js} +24 -22
- package/dist/CartSummary-IOCZJL26.js.map +1 -0
- package/dist/{Copyright-RWML3BQV.js → Copyright-MDKYCKML.js} +3 -3
- package/dist/{Copyright-RWML3BQV.js.map → Copyright-MDKYCKML.js.map} +1 -1
- package/dist/{CustomerLayout-HCYVBODI.js → CustomerLayout-4737YCAK.js} +24 -22
- package/dist/CustomerLayout-4737YCAK.js.map +1 -0
- package/dist/{Footer-3GEKWEQD.js → Footer-2F652QDB.js} +4 -4
- package/dist/{Footer-3GEKWEQD.js.map → Footer-2F652QDB.js.map} +1 -1
- package/dist/Header-4OATF4LX.js +22 -0
- package/dist/{Header-QG4UO3MF.js.map → Header-4OATF4LX.js.map} +1 -1
- package/dist/{LoyaltyPage-ZMFYQMQY.js → LoyaltyPage-POFUTIPB.js} +24 -22
- package/dist/LoyaltyPage-POFUTIPB.js.map +1 -0
- package/dist/{LoyaltyPointsPage-5PB6IFLY.js → LoyaltyPointsPage-L4S4NZA2.js} +8 -7
- package/dist/LoyaltyPointsPage-L4S4NZA2.js.map +1 -0
- package/dist/{MainMenu-SAUMNMBF.js → MainMenu-ROGX37TG.js} +7 -6
- package/dist/MainMenu-ROGX37TG.js.map +1 -0
- package/dist/{MasterLayout-TY223YR7.js → MasterLayout-PGL5YU2B.js} +24 -22
- package/dist/{MasterLayout-TY223YR7.js.map → MasterLayout-PGL5YU2B.js.map} +1 -1
- package/dist/{MobileMenu-2WOWOFQB.js → MobileMenu-VGXWJHEF.js} +25 -23
- package/dist/MobileMenu-VGXWJHEF.js.map +1 -0
- package/dist/{NotificationsPage-6FX4SOZU.js → NotificationsPage-PZAEKKJO.js} +24 -22
- package/dist/NotificationsPage-PZAEKKJO.js.map +1 -0
- package/dist/{OrderSinglePage-RUMSJIFD.js → OrderSinglePage-KTKLXTUX.js} +25 -23
- package/dist/OrderSinglePage-KTKLXTUX.js.map +1 -0
- package/dist/{OrdersPage-B4Q4QIEM.js → OrdersPage-BY6LYV5M.js} +24 -22
- package/dist/OrdersPage-BY6LYV5M.js.map +1 -0
- package/dist/{PageSingle-F4TDNKUM.js → PageSingle-CJRT3HJZ.js} +6 -5
- package/dist/PageSingle-CJRT3HJZ.js.map +1 -0
- package/dist/{ProductDetails-BNVVUDBH.js → ProductDetails-O2VJVIZC.js} +7 -6
- package/dist/ProductDetails-O2VJVIZC.js.map +1 -0
- package/dist/{ProfilePage-OJSAXSC2.js → ProfilePage-TB7PBODI.js} +24 -22
- package/dist/ProfilePage-TB7PBODI.js.map +1 -0
- package/dist/{RenderWhenVisible-F44J5MMG.js → RenderWhenVisible-KWAXEJOJ.js} +8 -5
- package/dist/RenderWhenVisible-KWAXEJOJ.js.map +1 -0
- package/dist/{ReviewsPage-3IJKJKTY.js → ReviewsPage-5KGCKLFR.js} +3 -3
- package/dist/{ReviewsPage-3IJKJKTY.js.map → ReviewsPage-5KGCKLFR.js.map} +1 -1
- package/dist/{SeoCartWidget-4PN2DW54.js → SeoCartWidget-6BU7WCTP.js} +24 -22
- package/dist/SeoCartWidget-6BU7WCTP.js.map +1 -0
- package/dist/{SettingsPage-BCRNV4GU.js → SettingsPage-G55AM2KS.js} +24 -22
- package/dist/SettingsPage-G55AM2KS.js.map +1 -0
- package/dist/{StoreClosedNotification-IRUTRLIH.js → StoreClosedNotification-C3BBFGAA.js} +25 -23
- package/dist/{StoreClosedNotification-IRUTRLIH.js.map → StoreClosedNotification-C3BBFGAA.js.map} +1 -1
- package/dist/{TestimonialsPage-YU4PLOLR.js → TestimonialsPage-EA4PSO7E.js} +6 -5
- package/dist/TestimonialsPage-EA4PSO7E.js.map +1 -0
- package/dist/{ThankYouPage-MUDELEIQ.js → ThankYouPage-R2OEK7ZZ.js} +24 -22
- package/dist/ThankYouPage-R2OEK7ZZ.js.map +1 -0
- package/dist/{WalletPage-2I4KTR5E.js → WalletPage-MEWHIHUE.js} +25 -23
- package/dist/WalletPage-MEWHIHUE.js.map +1 -0
- package/dist/{WishlistPage-7AYL3RUD.js → WishlistPage-YFKG7CXU.js} +26 -24
- package/dist/WishlistPage-YFKG7CXU.js.map +1 -0
- package/dist/ambient/virtual-modules.d.ts +43 -1
- package/dist/api/advertisement.js +4 -3
- package/dist/api/apps.js +4 -3
- package/dist/api/blog.js +6 -5
- package/dist/api/brands.js +6 -5
- package/dist/api/cart.js +6 -5
- package/dist/api/category.js +6 -5
- package/dist/api/client.js +3 -2
- package/dist/api/home.js +4 -3
- package/dist/api/loyalty.js +6 -5
- package/dist/api/menu.js +4 -3
- package/dist/api/notification.js +4 -3
- package/dist/api/order.js +6 -5
- package/dist/api/page.js +6 -5
- package/dist/api/product.js +6 -5
- package/dist/api/profile.js +3 -2
- package/dist/api/profile.js.map +1 -1
- package/dist/api/store.js +4 -3
- package/dist/api/translations.js +4 -3
- package/dist/api/user.js +4 -3
- package/dist/api/wallet.js +4 -3
- package/dist/api/wishlist.js +7 -6
- package/dist/{chunk-LA7KZ2XY.js → chunk-2D5TFSVG.js} +8 -8
- package/dist/{chunk-LA7KZ2XY.js.map → chunk-2D5TFSVG.js.map} +1 -1
- package/dist/{chunk-HQAFPDJK.js → chunk-2FDLEB5J.js} +3 -3
- package/dist/{chunk-HQAFPDJK.js.map → chunk-2FDLEB5J.js.map} +1 -1
- package/dist/chunk-2FKZAAV7.js +90 -0
- package/dist/chunk-2FKZAAV7.js.map +1 -0
- package/dist/{chunk-YDFOJBEY.js → chunk-3GW3VFR6.js} +3 -3
- package/dist/{chunk-YDFOJBEY.js.map → chunk-3GW3VFR6.js.map} +1 -1
- package/dist/{chunk-CEYT3JER.js → chunk-56T47K7P.js} +4 -4
- package/dist/{chunk-CEYT3JER.js.map → chunk-56T47K7P.js.map} +1 -1
- package/dist/{chunk-LPQ5FUMJ.js → chunk-5SDCUGYR.js} +4 -4
- package/dist/{chunk-LPQ5FUMJ.js.map → chunk-5SDCUGYR.js.map} +1 -1
- package/dist/{chunk-QGOPTVV5.js → chunk-6EQ7G3SZ.js} +4 -3
- package/dist/chunk-6EQ7G3SZ.js.map +1 -0
- package/dist/{chunk-H7CVJFTK.js → chunk-6RHU4TEF.js} +7 -7
- package/dist/{chunk-H7CVJFTK.js.map → chunk-6RHU4TEF.js.map} +1 -1
- package/dist/{chunk-FZYR4BA2.js → chunk-7WTUA4WY.js} +3 -3
- package/dist/{chunk-FZYR4BA2.js.map → chunk-7WTUA4WY.js.map} +1 -1
- package/dist/{chunk-3PXONLUK.js → chunk-BH7YNCYB.js} +3 -3
- package/dist/{chunk-3PXONLUK.js.map → chunk-BH7YNCYB.js.map} +1 -1
- package/dist/{chunk-DBW7XXNE.js → chunk-BPL5H33B.js} +4 -4
- package/dist/{chunk-DBW7XXNE.js.map → chunk-BPL5H33B.js.map} +1 -1
- package/dist/{chunk-66K5P5ZX.js → chunk-CNUBL24W.js} +3 -3
- package/dist/{chunk-66K5P5ZX.js.map → chunk-CNUBL24W.js.map} +1 -1
- package/dist/chunk-COJH52VR.js +443 -0
- package/dist/chunk-COJH52VR.js.map +1 -0
- package/dist/{chunk-6OOTDFC7.js → chunk-D56TVNOG.js} +3 -3
- package/dist/{chunk-6OOTDFC7.js.map → chunk-D56TVNOG.js.map} +1 -1
- package/dist/{chunk-Y7XVWQXG.js → chunk-DNPQ2JBM.js} +4 -4
- package/dist/{chunk-Y7XVWQXG.js.map → chunk-DNPQ2JBM.js.map} +1 -1
- package/dist/{chunk-JJARU7YP.js → chunk-EWLVLDRP.js} +3 -3
- package/dist/{chunk-JJARU7YP.js.map → chunk-EWLVLDRP.js.map} +1 -1
- package/dist/{chunk-Y357MBJI.js → chunk-FNHZEBA5.js} +9 -8
- package/dist/chunk-FNHZEBA5.js.map +1 -0
- package/dist/{chunk-HSWRYXC7.js → chunk-FO4WVGUQ.js} +3 -88
- package/dist/chunk-FO4WVGUQ.js.map +1 -0
- package/dist/{chunk-BNI6SKFL.js → chunk-G3UTLICK.js} +4 -4
- package/dist/{chunk-BNI6SKFL.js.map → chunk-G3UTLICK.js.map} +1 -1
- package/dist/{chunk-C4RXPVDF.js → chunk-GMXI6V2D.js} +6 -5
- package/dist/chunk-GMXI6V2D.js.map +1 -0
- package/dist/{chunk-RKQH63G2.js → chunk-GXHJXZBG.js} +4 -4
- package/dist/{chunk-RKQH63G2.js.map → chunk-GXHJXZBG.js.map} +1 -1
- package/dist/{chunk-43D2CG4F.js → chunk-IBSQO6LW.js} +4 -4
- package/dist/{chunk-43D2CG4F.js.map → chunk-IBSQO6LW.js.map} +1 -1
- package/dist/{chunk-ZVZGLEZ6.js → chunk-IU4KTCS3.js} +3 -3
- package/dist/{chunk-ZVZGLEZ6.js.map → chunk-IU4KTCS3.js.map} +1 -1
- package/dist/{chunk-ZFNLX3F7.js → chunk-J3G4ZD76.js} +13 -12
- package/dist/chunk-J3G4ZD76.js.map +1 -0
- package/dist/{chunk-ENJ3CM5M.js → chunk-J5X4LXNM.js} +3 -3
- package/dist/{chunk-ENJ3CM5M.js.map → chunk-J5X4LXNM.js.map} +1 -1
- package/dist/{chunk-TJF6YZ5I.js → chunk-JKBLG344.js} +8 -7
- package/dist/chunk-JKBLG344.js.map +1 -0
- package/dist/{chunk-RPDMNNRW.js → chunk-JVIPOD6M.js} +20 -19
- package/dist/chunk-JVIPOD6M.js.map +1 -0
- package/dist/{chunk-4WAUITU2.js → chunk-KNIGLCRV.js} +3 -3
- package/dist/{chunk-4WAUITU2.js.map → chunk-KNIGLCRV.js.map} +1 -1
- package/dist/{chunk-OMKLPCBA.js → chunk-KQW6I5CD.js} +4 -4
- package/dist/{chunk-OMKLPCBA.js.map → chunk-KQW6I5CD.js.map} +1 -1
- package/dist/{chunk-HR3QJ3LW.js → chunk-LXNS6CMT.js} +4 -4
- package/dist/{chunk-HR3QJ3LW.js.map → chunk-LXNS6CMT.js.map} +1 -1
- package/dist/chunk-MGDCJQ5P.js +14 -0
- package/dist/{chunk-KZM7HXJ3.js.map → chunk-MGDCJQ5P.js.map} +1 -1
- package/dist/chunk-N45X7D55.js +63 -0
- package/dist/chunk-N45X7D55.js.map +1 -0
- package/dist/{chunk-OH2L4U2C.js → chunk-NZRJOAA7.js} +3 -3
- package/dist/{chunk-OH2L4U2C.js.map → chunk-NZRJOAA7.js.map} +1 -1
- package/dist/{chunk-TEOVJ6WU.js → chunk-O7B5JL6H.js} +4 -4
- package/dist/{chunk-TEOVJ6WU.js.map → chunk-O7B5JL6H.js.map} +1 -1
- package/dist/{chunk-UURVAJ42.js → chunk-OZP2FID7.js} +4 -4
- package/dist/{chunk-UURVAJ42.js.map → chunk-OZP2FID7.js.map} +1 -1
- package/dist/{chunk-HCA2TE4G.js → chunk-PGUKRWOY.js} +5 -5
- package/dist/{chunk-HCA2TE4G.js.map → chunk-PGUKRWOY.js.map} +1 -1
- package/dist/{chunk-3MIFT4VQ.js → chunk-Q62YEBIA.js} +4 -4
- package/dist/{chunk-3MIFT4VQ.js.map → chunk-Q62YEBIA.js.map} +1 -1
- package/dist/{chunk-6DMNJPLW.js → chunk-QS4EDTEX.js} +3 -3
- package/dist/{chunk-6DMNJPLW.js.map → chunk-QS4EDTEX.js.map} +1 -1
- package/dist/{chunk-SAGXF3MU.js → chunk-QZEQOVA5.js} +3 -3
- package/dist/{chunk-SAGXF3MU.js.map → chunk-QZEQOVA5.js.map} +1 -1
- package/dist/{chunk-JTOVO3ZU.js → chunk-RWBTMHLR.js} +5 -5
- package/dist/{chunk-JTOVO3ZU.js.map → chunk-RWBTMHLR.js.map} +1 -1
- package/dist/{chunk-DV6SJHL5.js → chunk-S34G5DL4.js} +4 -4
- package/dist/{chunk-DV6SJHL5.js.map → chunk-S34G5DL4.js.map} +1 -1
- package/dist/{chunk-MKVCFBVF.js → chunk-TIPR4JUO.js} +4 -4
- package/dist/{chunk-MKVCFBVF.js.map → chunk-TIPR4JUO.js.map} +1 -1
- package/dist/{chunk-WHJZP3QJ.js → chunk-ULMSO2XZ.js} +7 -7
- package/dist/{chunk-WHJZP3QJ.js.map → chunk-ULMSO2XZ.js.map} +1 -1
- package/dist/{chunk-IVBOLREE.js → chunk-VWVCSD3N.js} +3 -3
- package/dist/{chunk-IVBOLREE.js.map → chunk-VWVCSD3N.js.map} +1 -1
- package/dist/{chunk-5G7NYNX6.js → chunk-W2LNKEBF.js} +3 -3
- package/dist/{chunk-5G7NYNX6.js.map → chunk-W2LNKEBF.js.map} +1 -1
- package/dist/{chunk-AV6AAVNU.js → chunk-XGNML7XM.js} +7 -7
- package/dist/{chunk-AV6AAVNU.js.map → chunk-XGNML7XM.js.map} +1 -1
- package/dist/{chunk-46NBPXAI.js → chunk-XT6CLGF5.js} +3 -3
- package/dist/{chunk-46NBPXAI.js.map → chunk-XT6CLGF5.js.map} +1 -1
- package/dist/{chunk-SFZ7IIWL.js → chunk-ZEGNYJOR.js} +4 -4
- package/dist/{chunk-SFZ7IIWL.js.map → chunk-ZEGNYJOR.js.map} +1 -1
- package/dist/{chunk-OM26SAHA.js → chunk-ZPVLBXDY.js} +4 -4
- package/dist/{chunk-OM26SAHA.js.map → chunk-ZPVLBXDY.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/RenderWhenVisible.d.ts +3 -1
- package/dist/components/common/RenderWhenVisible.d.ts.map +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/common/lazy.d.ts +1 -1
- package/dist/components/common/lazy.d.ts.map +1 -1
- package/dist/components/drawer/index.js +22 -20
- package/dist/components/home/HomePageRenderer.d.ts.map +1 -1
- package/dist/components/home/index.js +26 -24
- package/dist/components/layout/index.js +6 -5
- package/dist/components/product/index.js +23 -21
- package/dist/components/store/index.js +24 -22
- package/dist/components/store/index.js.map +1 -1
- package/dist/components/toast/index.js +4 -3
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/tracking/index.js +1 -1
- package/dist/dev/DevSettingsWidget.d.ts +6 -7
- package/dist/dev/DevSettingsWidget.d.ts.map +1 -1
- package/dist/dev/dev-settings-store.d.ts +89 -46
- package/dist/dev/dev-settings-store.d.ts.map +1 -1
- package/dist/dev/editor/AddElementDrawer.d.ts +17 -0
- package/dist/dev/editor/AddElementDrawer.d.ts.map +1 -0
- package/dist/dev/editor/BuilderPanel.d.ts +23 -0
- package/dist/dev/editor/BuilderPanel.d.ts.map +1 -0
- package/dist/dev/editor/SettingsPanel.d.ts +9 -0
- package/dist/dev/editor/SettingsPanel.d.ts.map +1 -0
- package/dist/dev/editor/ThemeEditor.d.ts +20 -0
- package/dist/dev/editor/ThemeEditor.d.ts.map +1 -0
- package/dist/dev/editor/catalog.d.ts +10 -0
- package/dist/dev/editor/catalog.d.ts.map +1 -0
- package/dist/dev/editor/fields.d.ts +18 -0
- package/dist/dev/editor/fields.d.ts.map +1 -0
- package/dist/dev/editor/i18n.d.ts +72 -0
- package/dist/dev/editor/i18n.d.ts.map +1 -0
- package/dist/dev/editor/icons.d.ts +21 -0
- package/dist/dev/editor/icons.d.ts.map +1 -0
- package/dist/dev/editor/index.d.ts +8 -0
- package/dist/dev/editor/index.d.ts.map +1 -0
- package/dist/dev/editor/index.js +2059 -0
- package/dist/dev/editor/index.js.map +1 -0
- package/dist/dev/editor/lookup.d.ts +22 -0
- package/dist/dev/editor/lookup.d.ts.map +1 -0
- package/dist/dev/editor/mount.d.ts +4 -0
- package/dist/dev/editor/mount.d.ts.map +1 -0
- package/dist/dev/editor/paths.d.ts +44 -0
- package/dist/dev/editor/paths.d.ts.map +1 -0
- package/dist/dev/editor/pickers.d.ts +12 -0
- package/dist/dev/editor/pickers.d.ts.map +1 -0
- package/dist/dev/editor/styles.d.ts +8 -0
- package/dist/dev/editor/styles.d.ts.map +1 -0
- package/dist/dev/index.d.ts +1 -1
- package/dist/dev/index.d.ts.map +1 -1
- package/dist/dev/index.js +35 -309
- package/dist/dev/index.js.map +1 -1
- package/dist/dev/schema-types.d.ts +124 -4
- package/dist/dev/schema-types.d.ts.map +1 -1
- package/dist/dev/store-lookup.d.ts +13 -0
- package/dist/dev/store-lookup.d.ts.map +1 -0
- package/dist/document-class-2RROXH4K.js +29 -0
- package/dist/{document-class-AJGI7GKJ.js.map → document-class-2RROXH4K.js.map} +1 -1
- package/dist/hooks/index.js +22 -20
- package/dist/hooks/useComments.js +3 -2
- package/dist/hooks/useGtm.js +22 -20
- package/dist/hooks/useMoney.js +22 -20
- package/dist/hooks/useProduct.js +3 -2
- package/dist/hooks/useStore.js +22 -20
- package/dist/hooks/useUser.js +5 -4
- package/dist/hooks/useWishlist.js +3 -2
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/native-app/index.js +3 -2
- package/dist/{navigation-KTFJWOWI.js → navigation-JB2CJXBF.js} +7 -6
- package/dist/navigation-JB2CJXBF.js.map +1 -0
- package/dist/navigation-KTMLD4VB.js +14 -0
- package/dist/{navigation-BARZWXJZ.js.map → navigation-KTMLD4VB.js.map} +1 -1
- package/dist/{not-found-NK6ZFJ7H.js → not-found-ZM6VIELR.js} +25 -23
- package/dist/not-found-ZM6VIELR.js.map +1 -0
- package/dist/providers/index.js +22 -20
- package/dist/routes/account/orders.js +7 -6
- package/dist/routes/account.js +16 -15
- package/dist/routes/account.js.map +1 -1
- package/dist/routes/blog.js +11 -10
- package/dist/routes/blog.js.map +1 -1
- package/dist/routes/brands.js +7 -6
- package/dist/routes/brands.js.map +1 -1
- package/dist/routes/cart.js +30 -28
- package/dist/routes/cart.js.map +1 -1
- package/dist/routes/home/HomePage.d.ts.map +1 -1
- package/dist/routes/home.js +27 -25
- package/dist/routes/index.js +6 -5
- package/dist/routes/loyalty.js +8 -7
- package/dist/routes/loyalty.js.map +1 -1
- package/dist/routes/page.js +7 -6
- package/dist/routes/page.js.map +1 -1
- package/dist/routes/product-listing/index.d.ts +27 -0
- package/dist/routes/product-listing/index.d.ts.map +1 -1
- package/dist/routes/product-listing.js +52 -27
- package/dist/routes/product-listing.js.map +1 -1
- package/dist/routes/product.js +26 -24
- package/dist/routes/product.js.map +1 -1
- package/dist/routes/seo-redirects.js +6 -5
- package/dist/routes/testimonials.js +2 -2
- package/dist/routes/thank-you.js +7 -6
- package/dist/routes/thank-you.js.map +1 -1
- package/dist/skeleton.js +27 -25
- package/dist/store-lookup-T4TK7CKA.js +114 -0
- package/dist/store-lookup-T4TK7CKA.js.map +1 -0
- package/dist/tanstack.js +17 -16
- package/dist/tanstack.js.map +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/vite/adapters/tanstack.adapter.d.ts.map +1 -1
- package/dist/vite/index.js +424 -47
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/plugins/twilight-schema.d.ts +7 -2
- package/dist/vite/plugins/twilight-schema.d.ts.map +1 -1
- package/dist/vite/plugins/twilight-schema.plugin.d.ts +26 -0
- package/dist/vite/plugins/twilight-schema.plugin.d.ts.map +1 -1
- package/package.json +5 -1
- package/tailwind/components/common/RenderWhenVisible.tsx.txt +9 -2
- package/tailwind/components/home/HomePageRenderer.tsx.txt +2 -0
- package/tailwind/routes/home/HomePage.tsx.txt +7 -6
- package/tailwind/routes/product-listing/index.tsx.txt +42 -0
- package/dist/BlogAuthorPage-KRT7MRTC.js.map +0 -1
- package/dist/BlogCategoryPage-OP3ETAMT.js.map +0 -1
- package/dist/BlogPage-RGAQVUDI.js.map +0 -1
- package/dist/BlogSinglePage-VG4UXBTL.js.map +0 -1
- package/dist/BlogTagPage-G4IVHJD5.js.map +0 -1
- package/dist/BrandsPage-2JMPPOOU.js.map +0 -1
- package/dist/Breadcrumb-I3ZOGG2Y.js.map +0 -1
- package/dist/CartItem-YTPYETW6.js.map +0 -1
- package/dist/CartSummary-DND7BO26.js.map +0 -1
- package/dist/CustomerLayout-HCYVBODI.js.map +0 -1
- package/dist/Header-QG4UO3MF.js +0 -21
- package/dist/LoyaltyPage-ZMFYQMQY.js.map +0 -1
- package/dist/LoyaltyPointsPage-5PB6IFLY.js.map +0 -1
- package/dist/MainMenu-SAUMNMBF.js.map +0 -1
- package/dist/MobileMenu-2WOWOFQB.js.map +0 -1
- package/dist/NotificationsPage-6FX4SOZU.js.map +0 -1
- package/dist/OrderSinglePage-RUMSJIFD.js.map +0 -1
- package/dist/OrdersPage-B4Q4QIEM.js.map +0 -1
- package/dist/PageSingle-F4TDNKUM.js.map +0 -1
- package/dist/ProductDetails-BNVVUDBH.js.map +0 -1
- package/dist/ProfilePage-OJSAXSC2.js.map +0 -1
- package/dist/RenderWhenVisible-F44J5MMG.js.map +0 -1
- package/dist/SeoCartWidget-4PN2DW54.js.map +0 -1
- package/dist/SettingsPage-BCRNV4GU.js.map +0 -1
- package/dist/TestimonialsPage-YU4PLOLR.js.map +0 -1
- package/dist/ThankYouPage-MUDELEIQ.js.map +0 -1
- package/dist/WalletPage-2I4KTR5E.js.map +0 -1
- package/dist/WishlistPage-7AYL3RUD.js.map +0 -1
- package/dist/chunk-2JV6WZ6O.js +0 -136
- package/dist/chunk-2JV6WZ6O.js.map +0 -1
- package/dist/chunk-C4RXPVDF.js.map +0 -1
- package/dist/chunk-HSWRYXC7.js.map +0 -1
- package/dist/chunk-KZM7HXJ3.js +0 -14
- package/dist/chunk-QGOPTVV5.js.map +0 -1
- package/dist/chunk-RPDMNNRW.js.map +0 -1
- package/dist/chunk-TJF6YZ5I.js.map +0 -1
- package/dist/chunk-Y357MBJI.js.map +0 -1
- package/dist/chunk-ZFNLX3F7.js.map +0 -1
- package/dist/document-class-AJGI7GKJ.js +0 -28
- package/dist/navigation-BARZWXJZ.js +0 -13
- package/dist/navigation-KTFJWOWI.js.map +0 -1
- package/dist/not-found-NK6ZFJ7H.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HomeComponentRenderer, ReorderProducts } from './chunk-
|
|
2
|
-
import { home } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { HomeComponentRenderer, ReorderProducts } from './chunk-JKBLG344.js';
|
|
2
|
+
import { home } from './chunk-7WTUA4WY.js';
|
|
3
|
+
import { useDevHomeBlocks } from './chunk-COJH52VR.js';
|
|
4
4
|
import { storePageUrl, buildHreflangAlternates } from './chunk-4SZZPXM2.js';
|
|
5
5
|
import { RouteId } from './chunk-OUW6WESU.js';
|
|
6
6
|
import { HookSlot } from './chunk-5XDPAKF5.js';
|
|
@@ -37,14 +37,15 @@ var HomeSkeleton = memo(function HomeSkeleton2() {
|
|
|
37
37
|
] });
|
|
38
38
|
});
|
|
39
39
|
var HomePage = memo(function HomePage2({ components = [] }) {
|
|
40
|
-
const renderedComponents =
|
|
40
|
+
const renderedComponents = useDevHomeBlocks(components);
|
|
41
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
42
|
/* @__PURE__ */ jsx(HookSlot, { name: "home:start" }),
|
|
43
43
|
/* @__PURE__ */ jsx(HookSlot, { name: "home:content" }),
|
|
44
44
|
renderedComponents.map((data, index) => (
|
|
45
45
|
// `data.key` is the twilight.json catalog id, shared by every placement
|
|
46
|
-
// of that block. Platform blocks send null. Position is unique
|
|
47
|
-
|
|
46
|
+
// of that block. Platform blocks send null. Position is unique; a dev
|
|
47
|
+
// layout block keeps its own id so a reorder doesn't remount the rest.
|
|
48
|
+
/* @__PURE__ */ jsx(HomeComponentRenderer, { data, index }, data.__dev_id ?? index)
|
|
48
49
|
)),
|
|
49
50
|
/* @__PURE__ */ jsx(HookSlot, { name: "home:end" }),
|
|
50
51
|
/* @__PURE__ */ jsx(ReorderProducts, {})
|
|
@@ -86,5 +87,5 @@ function head(ctx) {
|
|
|
86
87
|
var Home = { id: RouteId.INDEX, loader, head, Component: HomePage };
|
|
87
88
|
|
|
88
89
|
export { Home, HomeSkeleton, homeLoader };
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-FNHZEBA5.js.map
|
|
91
|
+
//# sourceMappingURL=chunk-FNHZEBA5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/routes/home/loader.ts","../src/routes/home/HomePage.tsx","../src/routes/home/index.tsx"],"names":["HomeSkeleton","HomePage"],"mappings":";;;;;;;;;;;;AAWA,eAAsB,WAAW,GAAA,EAAoD;AACnF,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,kBAAA,EAAmB;AAC3C,EAAA,MAAM,aAAa,MAAM,WAAA,CAAY,gBAAgB,IAAA,CAAK,OAAA,CAAQ,YAAY,CAAA;AAC9E,EAAA,MAA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WAAA,IAAe,KAAA,CAAM,WAAA;AACrD,EAAA,MAAM,QAAA,GAAW,MAAM,IAAA,EAAM,QAAA;AAE7B,EAAA,MAAM,GAAA,GAAM,aAAa,GAAA,CAAI,QAAA,EAAU,IAAI,QAAA,CAAS,QAAQ,KAAK,KAAA,CAAM,GAAA;AAEvE,EAAA,OAAO;AAAA,IACL,KAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA,EAAW,GAAA;AAAA,IACX,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM,IAAA;AAAA,MACd;AAAA,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,qBAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM;AAAA,KAChB;AAAA,IACA,oBAAoB,uBAAA,CAAwB,GAAA,CAAI,QAAA,EAAU,GAAA,CAAI,SAAS,QAAQ;AAAA,GACjF;AACF;AAEO,IAAM,IAAA,GAAO,EAAE,EAAA,EAAI,OAAA,CAAQ,OAAO,MAAA,EAAQ,IAAA,EAAM,WAAW,QAAA","file":"chunk-FNHZEBA5.js","sourcesContent":["import { getTwilightContext } from '../../twilight/context';\nimport { home } from '../../api/home';\nimport type { HomeComponentData } from '../../types';\nimport { RouteId } from '../../router/route-ids';\n\nexport interface HomeLoaderData {\n locale: string;\n components: HomeComponentData[];\n page: { slug: string };\n}\n\nexport async function homeLoader(ctx?: { locale?: string }): Promise<HomeLoaderData> {\n const { queryClient } = getTwilightContext();\n const components = await queryClient.ensureQueryData(home.queries.components());\n const result = {\n locale: ctx?.locale || 'ar',\n components: components.map((comp) => ({\n ...comp,\n path: comp.path?.replace('home.', '') || comp.path,\n })),\n page: { slug: RouteId.INDEX },\n };\n return result;\n}\n","import { memo } from 'react';\nimport { useDevHomeBlocks } from '../../dev/dev-settings-store';\nimport { HookSlot } from '../../hooks';\nimport { HomeComponentRenderer, ReorderProducts } from '../../components/home';\nimport type { HomePageProps } from './types';\nimport { Pulse } from '@salla.sa/twilight-components-react';\n\nexport const HomeSkeleton = memo(function HomeSkeleton() {\n return (\n <>\n <div className=\"s-block container skeleton-block-hero\">\n <Pulse className=\"h-64 sm:h-80 rounded-md\" />\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n </>\n );\n});\n\nexport const HomePage = memo(function HomePage({ components = [] }: HomePageProps) {\n // Dev-mode only: the dev editor's layout replaces the store's blocks while it\n // is on. No-op passthrough in production builds.\n const renderedComponents = useDevHomeBlocks(components);\n return (\n <>\n <HookSlot name=\"home:start\" />\n <HookSlot name=\"home:content\" />\n {renderedComponents.map((data, index) => (\n // `data.key` is the twilight.json catalog id, shared by every placement\n // of that block. Platform blocks send null. Position is unique; a dev\n // layout block keeps its own id so a reorder doesn't remount the rest.\n <HomeComponentRenderer key={data.__dev_id ?? index} data={data} index={index} />\n ))}\n <HookSlot name=\"home:end\" />\n <ReorderProducts />\n </>\n );\n});\n\nexport { HomePage as default };\n","import type { HeadDescriptor } from '../../utils/head';\nimport { buildHreflangAlternates, storePageUrl } from '../../utils/baseHead';\nimport type { HomeLoaderData } from './loader';\nimport { homeLoader } from './loader';\nimport type { TwilightContext } from '../../twilight/context';\nimport { HomePage } from './HomePage';\nimport { RouteId } from '../../router/route-ids';\n\nexport { HomeSkeleton } from './HomePage';\nexport { registerHomeComponents, DefaultHomeComponents } from '../../components/home/register';\nexport { registerHomeComponentConfig } from '../../components/home';\nexport type { HomePageProps } from './types';\nexport type { HomeLoaderData } from './loader';\nexport type {\n HomeComponentsProps,\n AnyHomeComponent,\n HomeComponentConfig,\n} from '../../components/home';\n\nfunction loader(_ctx?: { locale?: string }): Promise<HomeLoaderData> {\n return homeLoader({ locale: _ctx?.locale });\n}\n\nfunction head(ctx: TwilightContext): HeadDescriptor {\n const store = ctx.settings?.store;\n if (!store) return {};\n\n const title = store.meta?.title ?? store.name;\n const description = store.meta?.description ?? store.description;\n const keywords = store.meta?.keywords;\n // `/ar`, like Twig, where store.url reads `/ar/`.\n const url = storePageUrl(ctx.settings, ctx.location.pathname) ?? store.url;\n\n return {\n title,\n description,\n keywords,\n canonical: url,\n openGraph: {\n type: 'website',\n title,\n description,\n images: store.logo,\n url,\n },\n twitter: {\n card: 'summary_large_image',\n title,\n description,\n images: store.logo,\n },\n alternateLanguages: buildHreflangAlternates(ctx.settings, ctx.location.pathname),\n };\n}\n\nexport const Home = { id: RouteId.INDEX, loader, head, Component: HomePage } as const;\n\nexport { homeLoader };\n"]}
|
|
@@ -312,91 +312,6 @@ function resolveStoreBaseRedirect(username, href) {
|
|
|
312
312
|
return storeBaseRedirectHref({ host, base: resolveStoreBase(), username, href });
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return resolveStoreIdentifier(explicit);
|
|
319
|
-
}
|
|
320
|
-
function getSallaSDK() {
|
|
321
|
-
if (!isBrowser) return void 0;
|
|
322
|
-
return window.salla;
|
|
323
|
-
}
|
|
324
|
-
var SDK_CREATED_EVENT = "salla::created";
|
|
325
|
-
var noop = () => {
|
|
326
|
-
};
|
|
327
|
-
function isLoaded(sdk) {
|
|
328
|
-
return typeof sdk?.init === "function" || typeof sdk?.event?.on === "function";
|
|
329
|
-
}
|
|
330
|
-
function hasEventBus(sdk) {
|
|
331
|
-
return typeof sdk?.event?.on === "function";
|
|
332
|
-
}
|
|
333
|
-
function whenSallaLoaded(callback) {
|
|
334
|
-
return whenSalla(isLoaded, callback);
|
|
335
|
-
}
|
|
336
|
-
function whenSalla(isUsable, callback) {
|
|
337
|
-
if (!isBrowser) return noop;
|
|
338
|
-
if (isUsable(window.salla)) {
|
|
339
|
-
callback(window.salla);
|
|
340
|
-
return noop;
|
|
341
|
-
}
|
|
342
|
-
let settled = false;
|
|
343
|
-
const onCreated = () => {
|
|
344
|
-
const sdk = window.salla;
|
|
345
|
-
if (settled || !isUsable(sdk)) return;
|
|
346
|
-
settled = true;
|
|
347
|
-
window.removeEventListener(SDK_CREATED_EVENT, onCreated);
|
|
348
|
-
callback(sdk);
|
|
349
|
-
};
|
|
350
|
-
window.addEventListener(SDK_CREATED_EVENT, onCreated);
|
|
351
|
-
return () => {
|
|
352
|
-
settled = true;
|
|
353
|
-
window.removeEventListener(SDK_CREATED_EVENT, onCreated);
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
function whenSallaReady(callback) {
|
|
357
|
-
let cancelled = false;
|
|
358
|
-
const cancel = whenSallaLoaded((sdk) => {
|
|
359
|
-
void new Promise((resolve) => resolve(sdk.onReady?.())).catch(noop).then(() => {
|
|
360
|
-
if (!cancelled) callback(sdk);
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
return () => {
|
|
364
|
-
cancelled = true;
|
|
365
|
-
cancel();
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
function onSallaEvent(name, listener) {
|
|
369
|
-
let bus;
|
|
370
|
-
const cancel = whenSalla(hasEventBus, (sdk) => {
|
|
371
|
-
bus = sdk.event;
|
|
372
|
-
bus.on(name, listener);
|
|
373
|
-
});
|
|
374
|
-
return () => {
|
|
375
|
-
cancel();
|
|
376
|
-
bus?.off?.(name, listener);
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
function syncSdkLocale(locale) {
|
|
380
|
-
const sdk = getSallaSDK();
|
|
381
|
-
if (!sdk || !locale) return;
|
|
382
|
-
try {
|
|
383
|
-
sdk.lang?.setLocale?.(locale);
|
|
384
|
-
sdk.api?.setHeader?.("accept-language", locale);
|
|
385
|
-
sdk.config?.set?.("user.language_code", locale);
|
|
386
|
-
} catch {
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
function syncSdkThemeVersion(headers) {
|
|
390
|
-
const sdk = getSallaSDK();
|
|
391
|
-
if (!sdk) return;
|
|
392
|
-
const versionId = headers?.["s-version-id"];
|
|
393
|
-
try {
|
|
394
|
-
if (versionId != null) sdk.api?.setHeader?.("s-version-id", String(versionId));
|
|
395
|
-
else delete sdk.api?.axios?.defaults?.headers?.common?.["s-version-id"];
|
|
396
|
-
} catch {
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export { AUTH_TOKEN_COOKIE_NAME, CURRENCY_COOKIE_NAME, SCOPE_COOKIE_MAX_AGE, SCOPE_COOKIE_NAME, clearAuthTokenCookie, escapeForInlineScript, extractCurrencyFromCookies, extractScopeFromCookies, extractScopeFromUrl, extractTokenFromCookies, getInjectedRuntimeEnv, getSallaSDK, getStoreIdentifier, hasStoreUrlBase, isLoopback, loginRedirectHref, onSallaEvent, prefixStoreBase, readEnv, readSdkScope, rememberDevStoreId, renderRuntimeEnvScript, resolveRequestScope, resolveRequestStore, resolveRequestVersionId, resolveStoreBase, resolveStoreBaseRedirect, resolveStoreIdentifier, sameScope, stripStoreBase, syncScopeCookie, syncSdkLocale, syncSdkThemeVersion, toCurrencyCode, whenSallaLoaded, whenSallaReady, withoutStoreUrlBase };
|
|
401
|
-
//# sourceMappingURL=chunk-HSWRYXC7.js.map
|
|
402
|
-
//# sourceMappingURL=chunk-HSWRYXC7.js.map
|
|
315
|
+
export { AUTH_TOKEN_COOKIE_NAME, CURRENCY_COOKIE_NAME, SCOPE_COOKIE_MAX_AGE, SCOPE_COOKIE_NAME, clearAuthTokenCookie, escapeForInlineScript, extractCurrencyFromCookies, extractScopeFromCookies, extractScopeFromUrl, extractTokenFromCookies, getInjectedRuntimeEnv, hasStoreUrlBase, isLoopback, loginRedirectHref, prefixStoreBase, readEnv, readSdkScope, rememberDevStoreId, renderRuntimeEnvScript, resolveRequestScope, resolveRequestStore, resolveRequestVersionId, resolveStoreBase, resolveStoreBaseRedirect, resolveStoreIdentifier, sameScope, stripStoreBase, syncScopeCookie, toCurrencyCode, withoutStoreUrlBase };
|
|
316
|
+
//# sourceMappingURL=chunk-FO4WVGUQ.js.map
|
|
317
|
+
//# sourceMappingURL=chunk-FO4WVGUQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/cookies.ts","../src/utils/inline-script.ts","../src/utils/runtime-env.ts","../src/utils/store-base.ts","../src/utils/store-identity.ts"],"names":[],"mappings":";;;;AAEO,IAAM,sBAAA,GAAyB;AAC/B,IAAM,iBAAA,GAAoB;AAC1B,IAAM,oBAAA,GAAuB;AAoB7B,IAAM,oBAAA,GAAuB,WAAA;AAG7B,IAAM,cAAA,GAAiB,SAAA;AAsBvB,IAAM,sBAAA,GAAyB,WAAA;AAG/B,IAAM,gBAAA,GAAmB,WAAA;AAchC,SAAS,eAAe,GAAA,EAA+C;AACrE,EAAA,IAAI,CAAC,KAAK,OAAO,IAAA;AACjB,EAAA,OAAO,oBAAA,CAAqB,IAAA,CAAK,GAAG,CAAA,GAAI,GAAA,GAAM,IAAA;AAChD;AAGO,SAAS,aAAa,GAAA,EAA+C;AAC1E,EAAA,OAAO,eAAe,GAAG,CAAA;AAC3B;AAoCO,IAAM,cAAA,GAAoC,CAAC,sBAAsB,CAAA;AAGxE,SAAS,WAAW,IAAA,EAAsB;AACxC,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,IAAA,EAAK,CAAE,WAAA,EAAY;AAExC,EAAA,IAAI,OAAA,CAAQ,UAAA,CAAW,GAAG,CAAA,EAAG,OAAO,OAAA,CAAQ,KAAA,CAAM,CAAA,EAAG,OAAA,CAAQ,OAAA,CAAQ,GAAG,CAAA,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AQ,mBAAmB,CAAA,IAAK,OAAA,CAAQ,cAAc,CAAA,IAAK,EAAA;AACpE;AAkBO,SAAS,gBAAA,GAAkC;AAChD,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,eAAA,EAAgB;AACtC,EAAA,IAAI,WAAW,OAAO,SAAA;AACtB,EAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,IAAA;AAE1C,EAAA,MAAM,YAAY,qBAAA,EAAsB;AACxC,EAAA,IAAI,SAAA,CAAU,SAAA,EAAW,OAAO,SAAA,CAAU,SAAA;AAC1C,EAAA,IAAI,OAAO,IAAA,CAAK,SAAS,CAAA,CAAE,MAAA,GAAS,GAAG,OAAO,IAAA;AAE9C,EAAA,OAAO,wBAAwB,MAAA,CAAO,QAAA,CAAS,IAAA,EAAM,MAAA,CAAO,SAAS,IAAI,CAAA;AAC3E;AAaO,SAAS,wBAAA,CACd,UACA,IAAA,EACe;AACf,EAAA,MAAM,IAAA,GACJ,iBAAgB,CAAE,WAAA,KAAgB,OAAO,MAAA,KAAW,WAAA,GAAc,MAAA,CAAO,QAAA,CAAS,IAAA,GAAO,IAAA,CAAA;AAC3F,EAAA,OAAO,qBAAA,CAAsB,EAAE,IAAA,EAAM,IAAA,EAAM,kBAAiB,EAAG,QAAA,EAAU,MAAM,CAAA;AACjF","file":"chunk-FO4WVGUQ.js","sourcesContent":["import { isLocale } from '../providers/locale-constants';\n\nexport const AUTH_TOKEN_COOKIE_NAME = 'token';\nexport const SCOPE_COOKIE_NAME = 'scope';\nexport const CURRENCY_COOKIE_NAME = 's-curr';\n\n/**\n * Which store this request is for, when the hostname does not say.\n *\n * A live storefront is reached at its own domain, so the hostname identifies it\n * and nothing else is needed. A preview is not: every theme under review is\n * served from the one preview hostname, so the store has to be named some other\n * way — the dispatcher takes it from `?storeId=` and puts it here, the same way\n * it remembers which theme to serve.\n *\n * Written by the dispatcher rather than the theme, and set on the *forwarded\n * request* as well as the response, because the response cookie only arrives in\n * time for the second page load and the first one has to render too.\n *\n * The literal is a contract with `STORE_COOKIE` in store-front-dispacher\n * (`src/dispatch/preview.ts`), and **nothing checks the two agree**. Drift does\n * not fail loudly — it renders somebody else's shop. Grep both repos before\n * changing it.\n */\nexport const STORE_ID_COOKIE_NAME = 'salla_sid';\n\n/** Query parameter naming the store, on a host that serves more than one. */\nexport const STORE_ID_PARAM = 'storeId';\n\n/**\n * Which version of the theme's settings to render.\n *\n * A merchant's theme settings are versioned, and the storefront normally shows\n * whichever version is live — the API answers with it, and names it back as\n * `theme.profile.id`. Two places need a different one: the merchant's own theme\n * editor, which previews a draft version before it is published, and a partner\n * running a theme locally against a store whose settings they are editing. Both\n * open the theme inside an iframe, and the version travels in that URL.\n *\n * Named `versionId` rather than the `version_id` the Dashboard uses internally,\n * because it sits beside `?storeId=` and one URL should not spell two ids two\n * ways. The value is the same one either way: the Optimus-encoded version id,\n * which is exactly what `s-version-id` has always carried.\n *\n * The literal is a contract with `VERSION_COOKIE` in store-front-dispacher\n * (`src/dispatch/preview.ts`), on the same terms as {@link STORE_ID_COOKIE_NAME}:\n * nothing checks the two agree, and drift shows a merchant the wrong version of\n * their own settings rather than failing.\n */\nexport const VERSION_ID_COOKIE_NAME = 'salla_vid';\n\n/** Query parameter naming the theme-settings version, where one may be named. */\nexport const VERSION_ID_PARAM = 'versionId';\n\n/**\n * An id named by a request is an integer, and anything else is not one.\n *\n * Validated rather than passed through because these values end up in an upstream\n * API path and header. Leading zeroes, signs, decimals and whitespace are all\n * rejected: the point is a single canonical form, not the widest set of things\n * that could be coerced into a number.\n *\n * One function for both ids on purpose. They arrive the same way, from the same\n * untrusted place, and are spent the same way; two copies of this rule would be\n * two chances for one of them to be relaxed on its own.\n */\nfunction parseRequestId(raw: string | null | undefined): string | null {\n if (!raw) return null;\n return /^[1-9][0-9]{0,18}$/.test(raw) ? raw : null;\n}\n\n/** A store id in its canonical form, or null when it is not one. */\nexport function parseStoreId(raw: string | null | undefined): string | null {\n return parseRequestId(raw);\n}\n\n/** A theme-settings version id in its canonical form, or null when it is not one. */\nexport function parseVersionId(raw: string | null | undefined): string | null {\n return parseRequestId(raw);\n}\n\n/** The store id the dispatcher left in the cookie, or null when absent or malformed. */\nexport function extractStoreIdFromCookies(cookieHeader: string | null): string | null {\n return parseStoreId(extractTokenFromCookies(cookieHeader, STORE_ID_COOKIE_NAME));\n}\n\n/** The version id the dispatcher left in the cookie, or null when absent or malformed. */\nexport function extractVersionIdFromCookies(cookieHeader: string | null): string | null {\n return parseVersionId(extractTokenFromCookies(cookieHeader, VERSION_ID_COOKIE_NAME));\n}\n\n/**\n * The only hosts on which a request may name its own store.\n *\n * **This is a security boundary, not a convenience.** On a merchant's own domain\n * the hostname *is* the store, and it is the only thing that may decide. A theme\n * that also honoured `?storeId=` there would let anyone open\n * `https://reefperfumes.com/?storeId=<someone else>` and be served a different\n * merchant's shop from the domain its owner controls — their branding, their\n * customers' address bar, somebody else's catalogue — and the cookie would keep\n * serving it for the rest of that browser's session. Salla points SaaS domains\n * at this dispatcher, so those hostnames are real and reachable.\n *\n * The override exists for one situation: a host that serves many stores and so\n * cannot identify one from its name. That is the preview host, where every theme\n * under review answers on the same address, and local development.\n *\n * Adding an entry grants that host the ability to render any store on request.\n * Add nothing that a merchant's traffic reaches.\n */\nexport const STORE_ID_HOSTS: readonly string[] = ['preview.salla.design'];\n\n/** The hostname alone — a port never distinguishes one host's authority from another's. */\nfunction hostnameOf(host: string): string {\n const trimmed = host.trim().toLowerCase();\n // IPv6 literals are bracketed, and the colons inside them are not a port.\n if (trimmed.startsWith('[')) return trimmed.slice(0, trimmed.indexOf(']') + 1) || trimmed;\n const colon = trimmed.indexOf(':');\n return colon === -1 ? trimmed : trimmed.slice(0, colon);\n}\n\nexport function isLoopback(hostname: string): boolean {\n return (\n hostname === 'localhost' ||\n hostname === '127.0.0.1' ||\n hostname === '[::1]' ||\n hostname.endsWith('.localhost')\n );\n}\n\n/**\n * Whether this host is allowed to let the request choose a store.\n *\n * Deliberately an allowlist of exact hostnames plus loopback. No suffix matching:\n * a rule like \"anything ending in salla.design\" is one wildcard DNS record away\n * from admitting a host nobody meant to admit, and the list of hosts that serve\n * more than one store is short and known.\n *\n * It gates {@link resolveRequestVersionId} as well, and the name has been left\n * alone rather than generalised because one predicate that both call is the\n * property worth keeping — a second, subtly different list is how a host ends up\n * permitted to name one thing and not the other. A version is worth gating for\n * the same reason a store is: on a merchant's own domain, honouring\n * `?versionId=` would publish whatever draft settings they are still working on\n * to anyone who guessed the URL.\n */\nexport function allowsRequestStoreId(host: string | null | undefined): boolean {\n if (!host) return false;\n const hostname = hostnameOf(host);\n return STORE_ID_HOSTS.includes(hostname) || isLoopback(hostname);\n}\n\n/**\n * Whether this host *is* a store, so its name can be used as the identifier.\n *\n * The exact inverse of {@link allowsRequestStoreId}, and deliberately written as\n * one so the two can never disagree: a host that may name its store is a host\n * that serves more than one, and a host that serves more than one cannot be the\n * answer to \"which store is this?\". `preview.salla.design` and `localhost:5188`\n * are not shops; asking the API about them earns a 422 and a page that reads as\n * a broken theme.\n */\nexport function hostIdentifiesStore(host: string | null | undefined): boolean {\n return Boolean(host) && !allowsRequestStoreId(host);\n}\n\n/**\n * The store this request names, on a host permitted to name one.\n *\n * The host check is inside the resolution rather than at a call site, because a\n * call site is a thing someone can add without reading this comment. There is no\n * way to ask \"what store did the request name?\" without also asking \"is this a\n * host that may say?\" — get it wrong and the answer is a security bug that looks\n * like a feature.\n *\n * Between the two permitted sources the URL wins, the same precedence the\n * dispatcher uses for the theme and for the same reason: a link is how someone\n * switches, and a cookie they cannot see should never beat the address they\n * just typed.\n */\nexport function resolveRequestStoreId(\n url: string,\n cookieHeader: string | null,\n host: string | null | undefined\n): string | null {\n return resolveRequestId(url, cookieHeader, host, STORE_ID_PARAM, STORE_ID_COOKIE_NAME);\n}\n\n/**\n * A store username as it can appear as the first segment of a path.\n *\n * Starts with a letter or digit, so nothing the platform mounts at the root of a\n * host — `/_serverFn/`, `/.well-known/` — is ever read as a store. Dots are allowed\n * (`zyros.sa`), but a root file (`/favicon.ico`, `/robots.txt`) is not a store.\n * The value is sent upstream as the `store-identifier` header, so the set is kept\n * narrow on purpose: a username outside it cannot be addressed by path, and\n * `?storeId=` still can.\n */\nconst STORE_BASE_SEGMENT = /^[a-z0-9][a-z0-9._-]{0,62}$/i;\nconst ROOT_FILE =\n /\\.(ico|txt|xml|json|webmanifest|html?|js|mjs|css|map|png|jpe?g|gif|svg|webp|avif|woff2?|ttf|otf|eot|pdf|mp4|webm|wasm)$/i;\n\n/**\n * Whether this could be a store's username in the first segment of a path.\n *\n * A supported locale code never is, in any case: `/ar` and `/EN` are languages,\n * so `preview.salla.design/en/cart` is the English cart of the store the cookie\n * names. That makes a store whose username is a locale code (`ar` is one)\n * unreachable by path; `?storeId=` still reaches it.\n *\n * The same predicate decides whether a username may become a path's root\n * (`storeBaseRedirectHref`). That is what stops the redirect from looping: a\n * store called `ar`, sent to `/ar/…`, would find no store there and be sent again.\n */\nexport function isStoreBaseSegment(value: string | null | undefined): value is string {\n return (\n typeof value === 'string' &&\n STORE_BASE_SEGMENT.test(value) &&\n !ROOT_FILE.test(value) &&\n !isLocale(value.toLowerCase())\n );\n}\n\n/**\n * The store the first segment of this request's path names, on a host permitted\n * to name one.\n *\n * On such a host the first segment **is** the store. It is the root of the\n * application there, so `https://preview.salla.design/mtgr-alaatr-2/cart` is the\n * cart of the store whose username is `mtgr-alaatr-2`. This is a rule rather than\n * a guess, and it has to be: `cart`, `offers` and `search` are all real store\n * usernames, so a store cannot be told from a page by looking at the segment.\n * `/cart` on these hosts is the store called `cart`.\n *\n * The one segment that is not a store is a supported locale code (see\n * {@link isStoreBaseSegment}). `/ar/cart` names a language, and the store comes\n * from the cookie or `VITE_STORE_DOMAIN`, as it would at `/`.\n *\n * A URL that carries `storeId` is not read this way at all, whatever its value.\n * That is how `salla theme dev` names a store (`/ar?storeId=…`), on a path that\n * begins with a page; the root loader then redirects to the store's own address.\n * Checking for a *valid* id instead would let a malformed one hand the page's\n * first segment the store's job. (On the preview host the dispatcher removes the\n * parameter and sends a cookie; the editor opens that host at `/`, where there is\n * no segment to read.)\n *\n * Same gate as {@link resolveRequestStoreId}, for the same reason: on a merchant's\n * own domain the hostname is the store and the path is only ever a page.\n */\nexport function resolveRequestStoreBase(\n url: string,\n host: string | null | undefined\n): string | null {\n if (!allowsRequestStoreId(host)) return null;\n\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n return null;\n }\n if (parsed.searchParams.has(STORE_ID_PARAM)) return null;\n\n const first = parsed.pathname.split('/')[1];\n return isStoreBaseSegment(first) ? first : null;\n}\n\n/** Which store a request addressed, and how. At most one of the two is set. */\nexport interface RequestStore {\n /** Named by `?storeId=`, or by the cookie remembering it. */\n storeId: string | null;\n /** Named by the first segment of the path. */\n storeBase: string | null;\n}\n\n/**\n * The store this request addressed: the query, then the path, then the cookie.\n *\n * The path outranks the cookie because it is the address the visitor can see.\n * The cookie is one value for the whole preview host, so with two stores open in\n * two tabs it names whichever was opened last; the path names the one in front\n * of them.\n */\nexport function resolveRequestStore(\n url: string,\n cookieHeader: string | null,\n host: string | null | undefined\n): RequestStore {\n const storeBase = resolveRequestStoreBase(url, host);\n return {\n storeBase,\n storeId: storeBase ? null : resolveRequestStoreId(url, cookieHeader, host),\n };\n}\n\n/**\n * The theme-settings version this request names, on a host permitted to name one.\n *\n * Same shape and the same host gate as {@link resolveRequestStoreId}, deliberately:\n * both answer \"what did this request ask to be shown?\", both are reached only on\n * a host that serves more than one thing, and a version that could be named where\n * a store could not would be a second rule to keep in step with the first.\n *\n * Null is the ordinary answer, and it is not a failure — it means nothing\n * addressed a version, so the store's own live one is what gets rendered.\n */\nexport function resolveRequestVersionId(\n url: string,\n cookieHeader: string | null,\n host: string | null | undefined\n): string | null {\n return resolveRequestId(url, cookieHeader, host, VERSION_ID_PARAM, VERSION_ID_COOKIE_NAME);\n}\n\n/**\n * The id this request names, from the query first and the cookie after.\n *\n * The host check lives here rather than at either call site, for the reason the\n * two wrappers above are wrappers at all: there must be no way to ask what a\n * request named without also asking whether this host may say.\n */\nfunction resolveRequestId(\n url: string,\n cookieHeader: string | null,\n host: string | null | undefined,\n param: string,\n cookieName: string\n): string | null {\n if (!allowsRequestStoreId(host)) return null;\n\n let fromQuery: string | null = null;\n try {\n fromQuery = parseRequestId(new URL(url).searchParams.get(param));\n } catch {\n /* a relative or malformed URL simply names nothing */\n }\n return fromQuery ?? parseRequestId(extractTokenFromCookies(cookieHeader, cookieName));\n}\n\n/**\n * Deletes the auth `token` cookie. This cookie is written client-side by the theme\n * (TwilightProvider), not by the SDK — `salla.cookie.clearAll()` only clears its own\n * allowlist and leaves `token` behind — so logout must clear it here. Client-only.\n */\n/**\n * On a dev server, remembers the store the page is showing, so a later URL that\n * names no store keeps it instead of falling back to `VITE_STORE_DOMAIN`.\n * Loopback only: on the preview host this cookie belongs to the dispatcher. Client-only.\n */\nexport function rememberDevStoreId(id: string | number | null | undefined): void {\n if (typeof document === 'undefined' || !isLoopback(window.location.hostname)) return;\n const storeId = parseStoreId(id == null ? null : String(id));\n if (storeId) document.cookie = `${STORE_ID_COOKIE_NAME}=${storeId}; path=/; SameSite=Lax`;\n}\n\nexport function clearAuthTokenCookie(): void {\n if (typeof document === 'undefined') return;\n document.cookie = `${AUTH_TOKEN_COOKIE_NAME}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;\n}\n\nexport function extractTokenFromCookies(\n cookieHeader: string | null,\n cookieName: string\n): string | null {\n if (!cookieHeader) return null;\n\n const prefix = `${cookieName}=`;\n let start = 0;\n\n while (start < cookieHeader.length) {\n const idx = cookieHeader.indexOf(prefix, start);\n if (idx === -1) return null;\n\n const prevChar = idx > 0 ? cookieHeader[idx - 1] : '';\n if (prevChar === '' || prevChar === ';' || prevChar === ' ') {\n let end = cookieHeader.indexOf(';', idx);\n if (end === -1) end = cookieHeader.length;\n\n const value = cookieHeader.slice(idx + prefix.length, end).trim();\n try {\n return decodeURIComponent(value) || null;\n } catch {\n return value || null;\n }\n }\n\n start = idx + prefix.length;\n }\n\n return null;\n}\n\n/**\n * The scope the Salla SDK persists as `scope`: the market (`id`/`type`) plus, once\n * bullet delivery confirms an address or branch, the allocation. The SDK sends all\n * four as request headers (`s-scope-id`, `s-scope-type`, `s-scope-allocation-type`,\n * `s-scope-allocation-id`) and the API resolves stock per allocation — a scope sent\n * without its allocation is a different question, answered from a different branch.\n */\nexport interface ActiveScope {\n id: string;\n type?: string;\n allocation_type?: string;\n allocation_id?: string;\n}\n\n/** The SDK stores the scope either as its full object or as a bare id. */\nfunction normalizeScope(raw: unknown): ActiveScope | null {\n if (raw == null) return null;\n if (typeof raw !== 'object') return { id: String(raw) };\n const s = raw as Record<string, unknown>;\n if (s.id == null) return null;\n const scope: ActiveScope = { id: String(s.id) };\n if (s.type != null) scope.type = String(s.type);\n if (s.allocation_type != null) scope.allocation_type = String(s.allocation_type);\n if (s.allocation_id != null) scope.allocation_id = String(s.allocation_id);\n return scope;\n}\n\n/**\n * Reads the active scope from the `scope` cookie, which Salla persists as a JSON\n * object (e.g. `{\"id\":123,\"type\":\"scope\",\"allocation_type\":\"branch\",\"allocation_id\":\"9\"}`).\n * Returns null when the cookie is missing or unparseable. Used server-side, where\n * `salla.storage` is absent.\n */\nexport function extractScopeFromCookies(cookieHeader: string | null): ActiveScope | null {\n const raw = extractTokenFromCookies(cookieHeader, SCOPE_COOKIE_NAME);\n if (!raw) return null;\n try {\n return normalizeScope(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\n/** `value` when it is a currency code, else null: the cookie's value goes into a request header. */\nexport function toCurrencyCode(value: string | null | undefined): string | null {\n return value && /^[A-Z]{3}$/.test(value) ? value : null;\n}\n\n/** The currency the visitor chose (`s-curr`, written by the SDK), or null for the store's own. */\nexport function extractCurrencyFromCookies(cookieHeader: string | null): string | null {\n return toCurrencyCode(extractTokenFromCookies(cookieHeader, CURRENCY_COOKIE_NAME));\n}\n\n/** {@link extractScopeFromCookies} reduced to the id. */\nexport function extractScopeIdFromCookies(cookieHeader: string | null): string | null {\n return extractScopeFromCookies(cookieHeader)?.id ?? null;\n}\n\n/**\n * The scope the Salla SDK persisted in its storage (`salla.storage.get('scope')`).\n *\n * Returns `undefined` when the SDK storage API isn't ready yet — deliberately\n * distinct from `null` (\"no branch selected\"), so callers can't mistake a\n * not-yet-hydrated SDK for a cleared selection. Client-only.\n *\n * Storage the SDK has loaded but not yet initialised counts as not ready: it is\n * what the previous visit left, and `init` replaces it with the scope the page\n * was rendered for and the one `?scope=` names. Read before that, it would\n * outvote the `scope` cookie the server wrote for this page.\n */\nexport function readSdkScope(): ActiveScope | null | undefined {\n const sdk = typeof window !== 'undefined' ? window.salla : undefined;\n const storage = sdk?.storage;\n if (typeof storage?.get !== 'function') return undefined;\n const status = (sdk as { status?: unknown } | undefined)?.status;\n if (status !== undefined && status !== 'ready') return undefined;\n return normalizeScope(storage.get(SCOPE_COOKIE_NAME));\n}\n\n/** The type of a multi-market (Country Scopes) store's scopes, which `s-scope-type` must name. */\nconst MARKET_SCOPE_TYPE = 'scope';\n\nconst ALLOCATION_TYPES = ['address', 'branch'];\n\n/** An encoded branch id, or the `msa_` token several branches are packed into. */\nconst ALLOCATION_ID = /^(?:[1-9][0-9]{0,18}|msa_[A-Za-z0-9+/=_-]{1,2048})$/;\n\n/**\n * The scope a page URL names, the way Twig storefronts switch market: the SDK's\n * scopes modal reloads the page with `?scope=<id>`, and a branch picked for it\n * travels as `allocation_type` / `allocation_id`. Null when the URL names none\n * or names it malformed; an allocation is kept only when both halves are valid.\n */\nexport function extractScopeFromUrl(url: string): ActiveScope | null {\n let params: URLSearchParams;\n try {\n params = new URL(url).searchParams;\n } catch {\n return null;\n }\n const id = parseRequestId(params.get('scope'));\n if (!id) return null;\n\n const scope: ActiveScope = { id };\n const allocationType = params.get('allocation_type');\n const allocationId = params.get('allocation_id');\n if (\n allocationType &&\n ALLOCATION_TYPES.includes(allocationType) &&\n allocationId &&\n ALLOCATION_ID.test(allocationId)\n ) {\n scope.allocation_type = allocationType;\n scope.allocation_id = allocationId;\n }\n return scope;\n}\n\n/**\n * The scope a request is for: the one its URL names, else the `scope` cookie.\n *\n * The URL wins because it is the newer choice: it is how a market is switched,\n * and the cookie still holds the one switched from. Merged with that cookie only\n * when both name the same scope; a different scope does not inherit the previous\n * one's branch. The type is store-wide, so it comes from the cookie, or is the\n * multi-market one when there is no cookie yet — the settings answer corrects it\n * for a store that browses by branch or city (see `rootBeforeLoad`).\n */\nexport function resolveRequestScope(url: string, cookieHeader: string | null): ActiveScope | null {\n const fromCookie = extractScopeFromCookies(cookieHeader);\n const fromUrl = extractScopeFromUrl(url);\n if (!fromUrl) return fromCookie;\n if (fromCookie?.id === fromUrl.id) return { ...fromCookie, ...fromUrl };\n return { ...fromUrl, type: fromCookie?.type ?? MARKET_SCOPE_TYPE };\n}\n\n/** {@link readSdkScope} reduced to the id; keeps the not-ready/none distinction. */\nexport function readSdkScopeId(): string | null | undefined {\n const scope = readSdkScope();\n return scope === undefined ? undefined : (scope?.id ?? null);\n}\n\n/** One year — the SDK keeps the selected branch in localStorage indefinitely. */\nexport const SCOPE_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;\n\nexport const sameScope = (a: ActiveScope | null, b: ActiveScope | null): boolean =>\n JSON.stringify(a) === JSON.stringify(b);\n\n/**\n * Mirrors the scope the Salla SDK selected into the `scope` cookie so the SERVER\n * can see it. The SDK persists the selection in localStorage ONLY and writes no\n * cookie, so without this the server computes scope=null for every visitor who\n * picked a branch while the client computes the branch id — the dehydrated settings\n * query key never matches and the client refetches store settings on every page\n * load (SAL-122).\n *\n * Written in the SDK's own JSON shape so {@link extractScopeFromCookies} parses it,\n * allocation included: the bullet-delivery component writes the same cookie with the\n * full object, and rewriting it with the id alone would drop the branch the server\n * needs. Returns true when the cookie was (re)written. Client-only; no-op on the server.\n */\nexport function writeScopeCookie(scope: ActiveScope | null): boolean {\n if (typeof document === 'undefined') return false;\n if (sameScope(extractScopeFromCookies(document.cookie), scope)) return false;\n\n if (scope == null) {\n document.cookie = `${SCOPE_COOKIE_NAME}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;\n return true;\n }\n\n const value = encodeURIComponent(JSON.stringify(scope));\n document.cookie = `${SCOPE_COOKIE_NAME}=${value}; path=/; max-age=${SCOPE_COOKIE_MAX_AGE}; samesite=lax`;\n return true;\n}\n\n/**\n * Keeps the `scope` cookie in step with the SDK's selected branch. Call on every\n * client navigation; it no-ops while the SDK storage API is still hydrating so a\n * late-loading SDK can't wipe a valid cookie.\n */\nexport function syncScopeCookie(): boolean {\n const scope = readSdkScope();\n return scope === undefined ? false : writeScopeCookie(scope);\n}\n","/**\n * Escape a JSON-stringified value for safe embedding inside an inline `<script>` body.\n *\n * The head injects script bodies raw, so a `</script>` inside partner-set data would break out\n * of the tag; U+2028/U+2029 are line terminators in JS but not in JSON, so they must go too.\n */\nexport function escapeForInlineScript(value: string): string {\n return value\n .replace(/</g, '\\\\u003c')\n .replace(/>/g, '\\\\u003e')\n .replace(/&/g, '\\\\u0026')\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029');\n}\n","import { escapeForInlineScript } from './inline-script';\nimport { getRequestStore } from '../twilight/context';\nimport { hostIdentifiesStore } from './cookies';\n\n/** Where `rootHead` publishes the SSR-resolved env for the browser bundle to read. */\nconst RUNTIME_ENV_KEY = '__SALLA_RUNTIME_ENV__';\n\n/** The env values that must agree between the SSR render and the hydrated client. */\nexport interface RuntimeEnv {\n /** Store API base — `VITE_API_URL`. */\n apiBase?: string;\n /** Store identifier — `VITE_STORE_DOMAIN`. */\n storeIdentifier?: string;\n /**\n * The theme-settings version the request named, if any.\n *\n * Published for the same reason `storeIdentifier` is: the dispatcher strips\n * `?versionId=` on the way in, so by the time the browser has the page its own\n * URL no longer says which version it is showing. Without this the hydrated\n * client would ask the API about the store's live version and quietly replace\n * the draft it was handed.\n *\n * Absent — not empty — when nothing named one, so it drops out of the inline\n * script entirely rather than publishing a value that means \"live\".\n */\n versionId?: string;\n /**\n * The store segment at the root of this page's paths, when the store is\n * addressed that way — see `resolveStoreBase`.\n *\n * Published because the browser's address is not always the URL the server\n * read: the dispatcher removes `?storeId=` from the request it forwards but not\n * from the address bar, and a URL carrying it is never read for a segment. The\n * client builds its router from this, and a router that disagreed with the\n * server about the root would hydrate a different page.\n */\n storeBase?: string;\n}\n\n/**\n * A build-time `import.meta.env` var, falling back to the worker's runtime `process.env`\n * (wrangler `vars`, exposed via the `nodejs_compat_populate_process_env` flag).\n */\nexport function readEnv(key: string): string | undefined {\n try {\n const vite = (import.meta as unknown as { env?: Record<string, string | undefined> }).env?.[\n key\n ];\n if (vite) return vite;\n } catch {\n /* import.meta.env not available in all environments */\n }\n return typeof process !== 'undefined' ? process.env?.[key] : undefined;\n}\n\n/**\n * What this runtime resolves from its own env — server-side that includes the worker vars.\n * Prefers what the server already published, so re-rendering the head during hydration yields\n * the same script instead of dropping it.\n */\nexport function resolveRuntimeEnv(): RuntimeEnv {\n const injected = getInjectedRuntimeEnv();\n const { storeId, storeBase, versionId, requestHost } = getRequestStore();\n return {\n apiBase: injected.apiBase || readEnv('VITE_API_URL'),\n // The request outranks the build-time var here for the same reason it does\n // in `resolveStoreIdentifier`, and this is the copy that reaches the\n // browser: publish the store SSR actually rendered, or hydration resolves\n // again from a URL whose `?storeId=` the dispatcher has already stripped and\n // queries a different store than the markup it is hydrating.\n storeIdentifier:\n injected.storeIdentifier ||\n storeId ||\n storeBase ||\n (hostIdentifiesStore(requestHost) ? requestHost : null) ||\n readEnv('VITE_STORE_DOMAIN'),\n // Absent rather than empty when the path named no store, so it drops out of\n // the inline script, like `versionId`.\n storeBase: injected.storeBase || storeBase || undefined,\n // No env fallback on purpose. A store identifier has one because a build can\n // legitimately be pinned to a store; a version is something a request asks\n // for, and a build-time default would make every visitor of every store see\n // whichever draft was current when the theme was compiled.\n versionId: injected.versionId || versionId || undefined,\n };\n}\n\n/**\n * The env the SSR worker resolved, as handed to the browser by `rootHead`. Empty on the server\n * and on a client whose head carried nothing.\n *\n * Worker `vars` are *runtime* env: they live in `process.env` on the server only, while\n * `import.meta.env` is substituted at build time. A bundle built without those vars therefore\n * sees `undefined` in the browser and silently falls back to the production defaults — SSR\n * would render off the configured backend while every post-hydration fetch hits another one.\n */\nexport function getInjectedRuntimeEnv(): RuntimeEnv {\n const holder = globalThis as typeof globalThis & { [RUNTIME_ENV_KEY]?: RuntimeEnv };\n return holder[RUNTIME_ENV_KEY] ?? {};\n}\n\n/**\n * Inline head `<script>` body publishing the server-resolved env, or null when there is nothing\n * to publish (no overrides configured — the defaults already agree on both sides).\n */\nexport function renderRuntimeEnvScript(env: RuntimeEnv = resolveRuntimeEnv()): string | null {\n const set = Object.entries(env).filter(([, value]) => Boolean(value));\n if (!set.length) return null;\n const json = escapeForInlineScript(JSON.stringify(Object.fromEntries(set)));\n return `window.${RUNTIME_ENV_KEY}=${json};`;\n}\n","/**\n * @fileoverview Paths on a host where the store is the root.\n *\n * On `preview.salla.design` and a dev server a store is addressed by the first\n * segment of the path — `/mtgr-alaatr-2/cart` — and that segment is the root of\n * the application. No route knows about it: the router takes it off every URL on\n * the way in and puts it back on every URL on the way out\n * (`tanstack/store-base.ts`), so pages, links and loaders all see `/cart`.\n *\n * Which segment it is, and on which hosts, is decided once, by\n * `resolveRequestStoreBase` in `utils/cookies.ts`. This file only moves it on and\n * off a path. See `docs/store-base-path.md`.\n */\nimport { allowsRequestStoreId, isStoreBaseSegment, STORE_ID_PARAM } from './cookies';\nimport { isLocale } from '../providers/locale-constants';\n\n/**\n * An application pathname, without the store segment in front.\n *\n * Only a whole segment is removed, so `/mtgr-alaatr-2x/cart` is left alone, and a\n * pathname that does not start with the segment comes back unchanged.\n */\nexport function stripStoreBase(pathname: string, base: string): string {\n const prefix = `/${base}`;\n if (pathname === prefix) return '/';\n return pathname.startsWith(`${prefix}/`) ? pathname.slice(prefix.length) : pathname;\n}\n\n/**\n * An application path as the browser addresses it, with the store segment in front.\n *\n * It never checks whether the segment is already there, because that cannot be\n * told apart from a page of the same name: a store called `cart` keeps its cart at\n * `/cart/cart`. Callers pass application paths only.\n */\nexport function prefixStoreBase(path: string, base: string): string {\n const rooted = path.startsWith('/') ? path : `/${path}`;\n // The store's root is `/<base>`, not `/<base>/`, with or without a query or hash.\n const atRoot = rooted === '/' || rooted[1] === '?' || rooted[1] === '#';\n return `/${base}${atRoot ? rooted.slice(1) : rooted}`;\n}\n\n/**\n * A pathname from a link the Salla API handed out, without the store's username in it.\n *\n * A store with no domain of its own is served under its username on a shared host,\n * and every URL the API returns for it carries that segment. Its `store.url` is\n * `/{lang}/{username}/` when the store is multilingual and `/{username}/` when it is\n * not: `https://demostore.salla.sa/ar/dev-vgckq3fssfhjewwi/`, `https://salla.sa/cart/`.\n * The segment there belongs to Salla's host, not to the application. Left in, it\n * lands where a page slug is expected and matches no route.\n *\n * The username is the last segment of `store.url`, but only when it equals the\n * store's username. Neither its position nor its spelling says so on its own: `/ar/`\n * is the locale of `https://3tir.com/ar/`, a store on its own domain whose links carry\n * no username, and it is also the whole address of the store called `ar`,\n * `https://salla.sa/ar/`. Without a username to compare against, a last segment\n * spelled like a locale is taken to be one, which is wrong only for a store whose\n * username is a locale code.\n *\n * The locale stays wherever the link put it.\n */\nexport function withoutStoreUrlBase(\n pathname: string,\n storeUrlPathname: string,\n username?: string | null\n): string {\n const own = storeUrlSegment(storeUrlPathname, username);\n if (!own) return pathname;\n\n const segments = pathname.split('/');\n // Salla puts the locale first (`/ar/dev-x/…`); a store that is not multilingual has\n // none (`/dev-x/…`). Checked in that order, `/ar/ar/…` for a store called `ar` keeps\n // its locale.\n let at = -1;\n if (isLocale(segments[1]) && segments[2] === own) at = 2;\n else if (segments[1] === own) at = 1;\n if (at === -1) return pathname;\n\n segments.splice(at, 1);\n return segments.join('/') || '/';\n}\n\n/**\n * Whether a pathname on the store's host is this store's.\n *\n * On a shared host the origin belongs to every store there, and a link names its store\n * by the username in its path, where {@link withoutStoreUrlBase} looks for it. One\n * without it is another store's page, or the host's own. A store on its own domain has\n * no such segment, and every path on its host is its own.\n */\nexport function hasStoreUrlBase(\n pathname: string,\n storeUrlPathname: string,\n username?: string | null\n): boolean {\n const own = storeUrlSegment(storeUrlPathname, username);\n if (!own) return true;\n\n const segments = pathname.split('/');\n return segments[1] === own || (isLocale(segments[1]) && segments[2] === own);\n}\n\n/** The segment `store.url` serves the store under, or null when it has none. */\nfunction storeUrlSegment(storeUrlPathname: string, username?: string | null): string | null {\n const last = storeUrlPathname.split('/').filter(Boolean).pop();\n if (!last) return null;\n if (username) return last === username ? last : null;\n return isLocale(last) ? null : last;\n}\n\n/**\n * Where to send a page whose store was not named by its own first segment, or null\n * when it already was.\n *\n * On a host where the store is the root, every page has one address,\n * `/<username>/…`. A request that found its store some other way (`?storeId=`, the\n * preview cookie, `VITE_STORE_DOMAIN`, or a first segment that named the store by\n * another spelling, such as its numeric id) is sent there once the store's settings\n * say what its username is.\n *\n * `storeId` is dropped from the query on the way. It has to be: a URL carrying it\n * is never read for a store segment, so keeping it would redirect to an address\n * that redirects again, forever. For the same reason a username that could not be\n * read back out of a path produces no redirect at all.\n *\n * `href` is the application's own href (path, query and hash, already without any\n * store segment), which the router keeps percent-encoded, so the result is safe to\n * put in a `Location` header.\n */\nexport function storeBaseRedirectHref(args: {\n host: string | null | undefined;\n base: string | null;\n username: string | null | undefined;\n href: string;\n}): string | null {\n const { host, base, username, href } = args;\n if (!allowsRequestStoreId(host) || !isStoreBaseSegment(username) || username === base) {\n return null;\n }\n\n const url = new URL(href, 'http://store-base.invalid');\n url.searchParams.delete(STORE_ID_PARAM);\n return `${prefixStoreBase(url.pathname, username)}${url.search}${url.hash}`;\n}\n\n/**\n * Where to send a guest who opened a customer-only page: the locale's home with\n * `intended_to`, which the SDK reads to open the login modal and come back after.\n * Null when already there, so the redirect cannot loop.\n */\nexport function loginRedirectHref(args: {\n pathname: string;\n searchStr: string;\n origin: string;\n base: string | null;\n}): string | null {\n const { pathname, searchStr, origin, base } = args;\n const first = pathname.split('/')[1];\n const home = isLocale(first) ? `/${first}` : '/';\n if ((pathname.replace(/\\/$/, '') || '/') === home) return null;\n\n const browserPath = (path: string) => (base ? prefixStoreBase(path, base) : path);\n const intended = `${origin}${browserPath(pathname)}${searchStr}`;\n return `${browserPath(home)}?intended_to=${encodeURIComponent(intended)}`;\n}\n","/**\n * @fileoverview Which store to ask about — the one answer, in one place.\n *\n * This lived in two places once. `api/store.ts` learned to read the store a\n * request names, and `utils/sdk-helpers.ts` — the copy `api/client.ts` actually\n * sets the `store-identifier` header from — did not. So the resolver that had\n * been taught the answer was consulted for a null check and thrown away, every\n * outgoing request carried an empty identifier, the API answered\n * `422 Store Identifier not found`, and every published theme rendered\n * \"Store Unavailable\" while its tests passed: the client's suite mocked the\n * resolver, and the resolver's suite never went near a request.\n *\n * Hence one module, imported by both. If a third place ever needs a store\n * identifier, it imports this — a second implementation is the bug, not a\n * refactor away from it.\n *\n * See `docs/store-identity.md` for the full picture, including the security\n * boundary on who may name a store.\n */\nimport { getRequestStore } from '../twilight/context';\nimport { hostIdentifiesStore, resolveRequestStoreBase } from './cookies';\nimport { getInjectedRuntimeEnv, readEnv } from './runtime-env';\nimport { storeBaseRedirectHref } from './store-base';\n\n/**\n * Which store to ask about, in the order the answers can be trusted.\n *\n * A deployed theme worker is published with **no vars and no bindings** — the\n * script metadata carries `main_module`, compatibility settings, assets and tags\n * and nothing else — so `VITE_STORE_DOMAIN` exists only where a build baked it\n * in, which is local development. In production this function used to reach the\n * end of that chain and return the empty string, `store.settings` refused to\n * call with no identifier, and the root loader threw \"Store Unavailable\" — a\n * theme that renders its own failure page for every visitor of every store.\n *\n * The order:\n *\n * 1. what the caller passed, which is always deliberate;\n * 2. the store this request names — the `?storeId=` a preview was opened with,\n * then the cookie remembering it — seeded by `twilightMiddleware`, and only\n * on a host permitted to name one;\n * 3. the store the first segment of the path names, on those same hosts — its\n * username, which the API accepts as an identifier as readily as an id (see\n * {@link resolveStoreBase});\n * 4. what SSR already resolved and published, so the hydrated client asks about\n * the same store the server rendered instead of resolving again from a URL\n * that no longer names it;\n * 5. the request's own host, which *is* the identity of a live storefront —\n * but only when that host is a storefront. `preview.salla.design` and\n * `localhost` serve many stores, so their names identify none;\n * 6. `VITE_STORE_DOMAIN`, last, because a build-time constant is a development\n * convenience and must never outrank what the request actually said.\n *\n * Steps 2 and 3 never both answer: a path that names a store takes the place of\n * the cookie, and a URL carrying `?storeId=` is not read for a path segment.\n */\nexport function resolveStoreIdentifier(explicit?: string): string {\n if (explicit) return explicit;\n\n const { storeId, requestHost } = getRequestStore();\n if (storeId) return storeId;\n\n const storeBase = resolveStoreBase();\n if (storeBase) return storeBase;\n\n const injected = getInjectedRuntimeEnv().storeIdentifier;\n if (injected) return injected;\n\n if (hostIdentifiesStore(requestHost)) return requestHost as string;\n\n // The browser's own address, for a client render that reached neither of the\n // above — a live storefront, where the host is the store.\n const browserHost = typeof window !== 'undefined' ? window.location.host : null;\n if (hostIdentifiesStore(browserHost)) return browserHost as string;\n\n return readEnv('VITE_STORE_DOMAIN') || readEnv('STORE_DOMAIN') || '';\n}\n\n/**\n * The store segment at the root of this page's paths, or null when the store is\n * not addressed that way.\n *\n * On the server it is what `twilightMiddleware` read off the request. In the\n * browser it is what SSR published, because the address bar is not always the\n * URL the server rendered: on the preview host the dispatcher removes\n * `?storeId=` from the request it forwards and leaves it in the browser's, and a\n * URL carrying `storeId` is never read for a segment. Re-reading\n * `window.location` would, for `/ar?storeId=…`, route the page under a different\n * store than the one it was rendered for.\n *\n * The address bar is read only when SSR published nothing at all: a page the dev\n * server answered with its client shell instead of a render, where there is no\n * server decision to agree with.\n */\nexport function resolveStoreBase(): string | null {\n const { storeBase } = getRequestStore();\n if (storeBase) return storeBase;\n if (typeof window === 'undefined') return null;\n\n const published = getInjectedRuntimeEnv();\n if (published.storeBase) return published.storeBase;\n if (Object.keys(published).length > 0) return null;\n\n return resolveRequestStoreBase(window.location.href, window.location.host);\n}\n\n/**\n * The address this page should be loaded from instead, when the store is the root\n * of every URL on this host and this request did not use it; null otherwise.\n *\n * @param username - the store's username, from the settings the request loaded\n * @param href - the router's own href for the page, without any store segment\n *\n * See `storeBaseRedirectHref` for the rules. The host is the request's on the\n * server and the browser's own in the browser, so the decision is gated the same\n * way on both sides.\n */\nexport function resolveStoreBaseRedirect(\n username: string | null | undefined,\n href: string\n): string | null {\n const host =\n getRequestStore().requestHost ?? (typeof window !== 'undefined' ? window.location.host : null);\n return storeBaseRedirectHref({ host, base: resolveStoreBase(), username, href });\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getActiveScope, requestedThemeVersionId, api, STORE_IDENTIFIER_HEADER } from './chunk-
|
|
2
|
-
import { resolveStoreIdentifier } from './chunk-
|
|
1
|
+
import { getActiveScope, requestedThemeVersionId, api, STORE_IDENTIFIER_HEADER } from './chunk-6EQ7G3SZ.js';
|
|
2
|
+
import { resolveStoreIdentifier } from './chunk-FO4WVGUQ.js';
|
|
3
3
|
import { getTwilightContext } from './chunk-N2S25NXP.js';
|
|
4
4
|
import { queryOptions } from '@tanstack/react-query';
|
|
5
5
|
|
|
@@ -82,5 +82,5 @@ var store = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export { store };
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
86
|
-
//# sourceMappingURL=chunk-
|
|
85
|
+
//# sourceMappingURL=chunk-G3UTLICK.js.map
|
|
86
|
+
//# sourceMappingURL=chunk-G3UTLICK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/store.ts"],"names":[],"mappings":";;;;;AASA,IAAM,qBAAA,GAAwB;AAAA,EAC5B,OAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,gBAAA;AAAA,EACA,mBAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,iBAAA;AAAA,EACA,QAAA;AAAA,EACA,S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,OAAO;AAAA,QACL,OAAO,IAAA,CAAK,KAAA;AAAA,QACZ,OAAO,IAAA,CAAK,KAAA;AAAA,QACZ,SAAA;AAAA,QACA,YAAY,IAAA,CAAK,UAAA;AAAA,QACjB,mBAAmB,IAAA,CAAK,iBAAA;AAAA,QACxB,SAAS,IAAA,CAAK,OAAA;AAAA,QACd,OAAO,IAAA,CAAK,KAAA;AAAA,QACZ,WAAW,IAAA,CAAK,SAAA;AAAA,QAChB,YAAY,IAAA,CAAK,UAAA;AAAA,QACjB,MAAM,IAAA,CAAK,IAAA;AAAA,QACX,QAAQ,IAAA,CAAK,MAAA;AAAA,QACb,OAAO,IAAA,CAAK,KAAA;AAAA,QACZ,GAAI,KAAA,IAAS,EAAE,gBAAA,EAAkB,MAAM,EAAA;AAAG,OAC5C;AAAA,IACF,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,4BAA4B,KAAK,CAAA;AAC/C,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,QAAA,EAAU,CAAC,eAAA,KACT,YAAA,CAAkC;AAAA,MAChC,QAAA,EAAU;AAAA,QACR,OAAA;AAAA,QACA,UAAA;AAAA,QACA,eAAA;AAAA,QACA,oBAAmB,CAAE,MAAA;AAAA,QACrB,cAAA,EAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQf,uBAAA;AAAwB,OAC1B;AAAA,MACA,OAAA,EAAS,MAAM,KAAA,CAAM,QAAA,CAAS,eAAe;AAAA,KAC9C;AAAA;AAEP","file":"chunk-G3UTLICK.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope, STORE_IDENTIFIER_HEADER } from './client';\nimport type { Store, Theme, Language, JitsuConfig } from '../types';\nimport { getTwilightContext } from '../twilight/context';\nimport { resolveStoreIdentifier } from '../utils/store-identity';\nimport { requestedThemeVersionId } from '../utils/theme-version';\n\nexport { resolveStoreIdentifier };\n\nconst DEFAULT_INCLUDE_ITEMS = [\n 'store',\n 'settings',\n 'theme',\n 'theme_settings',\n 'external_services',\n 'currencies',\n 'languages',\n 'payments',\n 'product_widgets',\n 'rating',\n 'ratings',\n 'user',\n];\n\n/** Twig's `salla.init({ user })` object; the endpoint ignores the token, so always the guest. */\nexport interface SettingsUser {\n type: 'guest' | 'user';\n id?: number | string | null;\n language_code?: string;\n currency_code?: string;\n country_code?: string;\n [key: string]: unknown;\n}\n\n/**\n * Raw API response for settings endpoint.\n * Languages come as object: { \"AR\": { code, name, ... }, \"EN\": {...} }\n */\ninterface SettingsApiResponse {\n store?: Store;\n theme?: Theme;\n languages?: Record<string, Language>;\n currencies?: Record<\n string,\n { code: string; name: string; symbol: string; amount: number; country_code: string }\n >;\n external_services?: Record<string, unknown>;\n headers?: Record<string, unknown>;\n login?: { url: string; turnstile_site_key: string };\n affiliate?: { utm_url: string; cta_enabled: boolean };\n debug?: boolean;\n trace_console?: boolean;\n policy_url?: string;\n user?: SettingsUser;\n swoole?: string[];\n jitsu?: JitsuConfig;\n}\n\n/**\n * Central settings context - single source of truth for all API data.\n * Contains everything from the settings endpoint response after processing.\n */\nexport interface StoreContext {\n store?: Store;\n theme?: Theme;\n /** Languages as array after conversion from API object format */\n languages?: Language[];\n currencies?: Record<\n string,\n { code: string; name: string; symbol: string; amount: number; country_code: string }\n >;\n external_services?: Record<string, unknown>;\n headers?: Record<string, unknown>;\n login?: { url: string; turnstile_site_key: string };\n affiliate?: { utm_url: string; cta_enabled: boolean };\n debug?: boolean;\n trace_console?: boolean; // todo:: remove it\n policy_url?: string;\n user?: SettingsUser;\n /** API paths the SDK sends with `s-store-api-version: swoole` */\n swoole?: string[];\n /** Where the SDK's analytics send events, and which ones; without it the SDK tracks nothing. */\n jitsu?: JitsuConfig;\n /**\n * The scope these settings were requested with; absent when none was. Not from\n * the API: stamped by `store.settings`, so `resolveThemeVersionId` can tell\n * whether the version they name still answers the scope that is active now.\n */\n requestedScopeId?: string;\n}\n\n/**\n * Converts languages object from API to array format.\n * API returns: { \"AR\": { code, name, ... }, \"EN\": { ... } }\n * We need: [{ code, name, ... }, { code, name, ... }]\n * todo:: return the languages as object from the APIs to avoid this\n */\nfunction languagesToArray(languages?: Record<string, Language>): Language[] | undefined {\n if (!languages) return undefined;\n // The SDK's localization modal reads `lang.iso_code` (not `code`) when a language is\n // selected — without it the switch navigates to `/undefined/...`.\n return Object.values(languages).map((lang) => ({ iso_code: lang.code, ...lang }));\n}\n\nexport const store = {\n settings: async (storeIdentifier?: string): Promise<StoreContext | null> => {\n const identifier = storeIdentifier ?? resolveStoreIdentifier();\n\n if (!identifier) {\n console.warn('[store.settings] No store identifier available');\n return null;\n }\n\n const includeParams = DEFAULT_INCLUDE_ITEMS.map((i) => `include[]=${i}`).join('&');\n const scope = getActiveScope();\n const params = scope != null ? `${includeParams}&scope=${scope.id}` : includeParams;\n\n try {\n const json = await api\n // Sent explicitly rather than left to the client's own resolution, so\n // the identifier this function checked is the identifier that travels.\n // They agree today; a caller passing one and being answered about\n // another is the failure this makes impossible rather than unlikely.\n .get(`store/settings?${params}`, {\n timeout: 5000,\n headers: { [STORE_IDENTIFIER_HEADER]: identifier },\n })\n .json<{ data?: SettingsApiResponse }>();\n\n const data = json?.data;\n if (!data) return null;\n\n // Convert languages from object to array\n const languages = languagesToArray(data.languages);\n\n return {\n store: data.store,\n theme: data.theme,\n languages,\n currencies: data.currencies,\n external_services: data.external_services,\n headers: data.headers,\n login: data.login,\n affiliate: data.affiliate,\n policy_url: data.policy_url,\n user: data.user,\n swoole: data.swoole,\n jitsu: data.jitsu,\n ...(scope && { requestedScopeId: scope.id }),\n };\n } catch (error) {\n console.error('[store.settings] Failed:', error);\n return null;\n }\n },\n\n queries: {\n settings: (storeIdentifier?: string) =>\n queryOptions<StoreContext | null>({\n queryKey: [\n 'store',\n 'settings',\n storeIdentifier,\n getTwilightContext().locale,\n getActiveScope(),\n // Two versions of one store's settings are two different answers, and\n // this is the query whose answer decides what every other call is\n // pinned to. `requestedThemeVersionId` rather than the resolved one:\n // the resolved value falls back to what these settings report, so it\n // is not knowable until after this query has run — the key would be\n // one thing on the server and another on the client, and the hydrated\n // page would refetch the settings it was just handed.\n requestedThemeVersionId(),\n ],\n queryFn: () => store.settings(storeIdentifier),\n }),\n },\n};\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { configureNavigation, UnauthorizedError, NavigationProvider, resolveRelativePath } from './chunk-
|
|
1
|
+
import { configureNavigation, UnauthorizedError, NavigationProvider, resolveRelativePath } from './chunk-RWBTMHLR.js';
|
|
2
2
|
import { LinkProvider } from './chunk-BYMOPN2S.js';
|
|
3
|
-
import { useIsNativeApp } from './chunk-
|
|
4
|
-
import {
|
|
3
|
+
import { useIsNativeApp } from './chunk-EWLVLDRP.js';
|
|
4
|
+
import { onSallaEvent } from './chunk-2FKZAAV7.js';
|
|
5
|
+
import { loginRedirectHref, resolveStoreBase, isLoopback, hasStoreUrlBase } from './chunk-FO4WVGUQ.js';
|
|
5
6
|
import { getTwilightContext, getRequestStore } from './chunk-N2S25NXP.js';
|
|
6
7
|
import { isLocale } from './chunk-T72DAX7R.js';
|
|
7
8
|
import { useTwilight } from './chunk-DF6FBKDN.js';
|
|
@@ -181,5 +182,5 @@ function TanStackNavigationProvider({ children }) {
|
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
export { NavigationSetup, TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter, requestHostOf };
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
185
|
-
//# sourceMappingURL=chunk-
|
|
185
|
+
//# sourceMappingURL=chunk-GMXI6V2D.js.map
|
|
186
|
+
//# sourceMappingURL=chunk-GMXI6V2D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tanstack/link.tsx","../src/tanstack/native-app-events.tsx","../src/utils/request-host.ts","../src/tanstack/navigation.tsx"],"names":["TanStackLink","t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KAA2B,QAAA,CAAS,EAAE,EAAA,EAAI,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,CAAA;AAAA,MAEzF,QAAA,kBAAAA,GAAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAS,qBAAsB,QAAA,EAAS;AAAA;AAAA,GACxD;AAEJ","file":"chunk-GMXI6V2D.js","sourcesContent":["import { forwardRef, createElement } from 'react';\nimport { Link as TanStackLink, useParams } from '@tanstack/react-router';\nimport { isLocale } from '../providers/locale-constants';\nimport type { BaseLinkProps } from '../components/common/Link.types';\n\n/**\n * Routes live under an optional `/{-$locale}` param, so a bare `to=\"/brands\"`\n * resolves with the locale omitted and the $locale loader bounces the user to\n * the fallback locale. Prefix the current locale onto internal paths that\n * don't already carry one.\n */\nexport function localizeDestination(destination: string, locale?: string) {\n if (!locale || !destination.startsWith('/') || destination.startsWith('//')) return destination;\n const firstSegment = destination.split('/')[1]?.split(/[?#]/)[0];\n if (isLocale(firstSegment)) return destination;\n return destination === '/' ? `/${locale}` : `/${locale}${destination}`;\n}\n\n/**\n * TanStack Router Link adapter.\n * Translates framework-agnostic props to TanStack Router Link props.\n */\nexport const TanStackLinkAdapter = forwardRef<HTMLAnchorElement, BaseLinkProps>(\n (\n {\n to,\n href,\n children,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload,\n replace,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref\n ) => {\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const destination = localizeDestination(to ?? href ?? '/', locale);\n\n return createElement(\n TanStackLink,\n {\n ref,\n to: destination,\n className,\n style,\n title,\n target,\n rel,\n onClick,\n preload: preload === 'intent' || preload === false ? preload : undefined,\n replace,\n 'aria-label': ariaLabel,\n ...(rest as Record<string, unknown>),\n },\n children\n );\n }\n);\n\nTanStackLinkAdapter.displayName = 'TanStackLinkAdapter';\n\n/**\n * Create a TanStack Router Link adapter component.\n */\nexport function createTanStackLinkAdapter() {\n return TanStackLinkAdapter;\n}\n","import { useEffect } from 'react';\nimport { useRouter } from '@tanstack/react-router';\nimport { resolveRelativePath } from '../providers/NavigationProvider';\nimport { useTwilight } from '../providers/twilight-context';\nimport { isLocale } from '../providers/locale-constants';\nimport { getTwilightContext } from '../twilight/context';\nimport { useIsNativeApp } from '../native-app';\nimport { onSallaEvent } from '../utils/sdk-helpers';\nimport { hasStoreUrlBase } from '../utils/store-base';\nimport { localizeDestination } from './link';\n\nconst UI_UPDATE_EVENT = 'mobile::ui.update';\nconst OPEN_ORDER_EVENT = 'mobile::open.order';\nconst NAVIGATE_TO_EVENT = 'mobile::navigate.to';\n\n/**\n * Events the native app sends into its webview. `NavigationSetup` mounts this once, so a\n * theme adds no listener of its own:\n *\n * - `mobile::ui.update` re-runs the route loaders and refetches what is on screen.\n * - `mobile::open.order` `{ id }` opens that order, with a fresh cart.\n * - `mobile::navigate.to` `{ url }` opens a notification deep link in-app. Only a link to\n * this store is followed (`deepLinkPath`), so `javascript:`, off-site and other stores'\n * URLs are dropped.\n *\n * Nothing is mounted outside the app (`useIsNativeApp()`), so a browser runs none of it.\n */\nexport function NativeAppEvents({ locale }: { locale?: string }) {\n return useIsNativeApp() ? <Listeners locale={locale} /> : null;\n}\n\nfunction Listeners({ locale }: { locale?: string }) {\n useNativeAppEvents(locale);\n return null;\n}\n\n/** The listeners themselves. `NativeAppEvents` mounts them inside the app only. */\nexport function useNativeAppEvents(locale?: string): void {\n const router = useRouter();\n const { store } = useTwilight();\n const storeUrl = store?.url;\n const username = store?.username;\n\n useEffect(() => {\n // `href`, not `to`: the router parses the query and the hash out of it.\n const open = (path: string) =>\n void router.navigate({ href: localizeDestination(path, locale) });\n\n const refresh = () => {\n void Promise.allSettled([\n router.invalidate(),\n getTwilightContext().queryClient?.refetchQueries({ type: 'active' }),\n ]);\n };\n const openOrder = (data?: unknown) => {\n const rawId = (data as { id?: unknown } | undefined)?.id;\n if (typeof rawId !== 'string' && typeof rawId !== 'number') return;\n\n const id = String(rawId).trim();\n if (!id) return;\n\n void getTwilightContext().queryClient?.invalidateQueries({ queryKey: ['cart'] });\n open(`/account/orders/${encodeURIComponent(id)}`);\n };\n const navigateTo = (data?: unknown) => {\n const url = (data as { url?: unknown } | undefined)?.url;\n if (typeof url !== 'string' || !url.trim() || !storeUrl) return;\n\n const path = deepLinkPath(url.trim(), storeUrl, username);\n if (path) void router.navigate({ href: inLocale(path, locale) });\n };\n\n const offs = [\n onSallaEvent(UI_UPDATE_EVENT, refresh),\n onSallaEvent(OPEN_ORDER_EVENT, openOrder),\n onSallaEvent(NAVIGATE_TO_EVENT, navigateTo),\n ];\n return () => offs.forEach((off) => off());\n }, [router, locale, storeUrl, username]);\n}\n\n/** A URL that names its host: `https://…` or `//…`. Anything else is a path of this app. */\nfunction isAbsoluteUrl(url: string): boolean {\n if (url.startsWith('//')) return true;\n try {\n // Without a base, only a URL with its own scheme parses.\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * The application path of a deep link to this store, or null for any other link.\n *\n * It passes the test a tapped link does (`resolveRelativePath`: the store's origin, the\n * username taken off), and one more. On a shared host that origin is every store's, so\n * an absolute link has to carry this store's username: without it, another store's\n * `/ar/offers` would open this store's offers.\n */\nfunction deepLinkPath(url: string, storeUrl: string, username?: string): string | null {\n const path = resolveRelativePath(url, storeUrl, username);\n if (!path || !isAbsoluteUrl(url)) return path;\n\n // Both parse: `resolveRelativePath` returns null when either does not.\n const { pathname } = new URL(url, window.location.href);\n return hasStoreUrlBase(pathname, new URL(storeUrl).pathname, username) ? path : null;\n}\n\n/**\n * A deep link in the locale the visitor is browsing in. A notification is written in one\n * language and opened in whichever is on screen, so the link's own locale gives way.\n *\n * The prefix is written here, not by `localizeDestination`: that one leaves a path alone\n * when it already starts with a locale, and would take the slug of `/ar/en/p456` for one.\n */\nfunction inLocale(path: string, locale?: string): string {\n const first = path.split('/')[1]?.split(/[?#]/)[0];\n const own = isLocale(first) ? path.slice(first.length + 1) : path;\n const rest = own.startsWith('/') ? own : `/${own}`;\n\n if (!locale) return rest;\n return rest === '/' ? `/${locale}` : `/${locale}${rest}`;\n}\n","/**\n * What the request itself is enough to describe: its host.\n *\n * Small, and deliberately its own module rather than a helper inside the\n * middleware. This value decides two things — which store a live storefront is,\n * and whether the request is allowed to name a store at all — so it is worth\n * testing directly instead of only through the wiring that calls it.\n */\nimport { isLoopback } from './cookies';\n\n/** The part of a `Request` this needs, so a test does not have to build a whole one. */\nexport interface HostSource {\n url: string;\n headers: { get(name: string): string | null };\n}\n\n/**\n * The host this request arrived on, with its port when it has one.\n *\n * Taken from the request URL, which in a Worker is the address the platform\n * actually routed on, and from the `Host` header only when that fails.\n *\n * **`X-Forwarded-Host` is deliberately not consulted.** A client can set it, and\n * this value gates `allowsRequestStoreId` — so honouring it would be a way to\n * talk a merchant's own domain into behaving like the preview host, and from\n * there into serving a stranger's shop. The dispatcher strips that header today;\n * a theme must not be one edit to another repository's allowlist away from a\n * spoofable identity.\n */\nexport function requestHostOf(request: HostSource): string | null {\n try {\n const fromUrl = new URL(request.url).host;\n if (fromUrl) return fromUrl;\n } catch {\n /* an unparseable URL falls through to the header */\n }\n\n return request.headers.get('Host')?.trim() || null;\n}\n\n/** The origin a browser reached this host on: `http` for a dev server, `https` otherwise. */\nexport function requestOriginOf(host: string): string {\n return `${isLoopback(host.replace(/:\\d+$/, '')) ? 'http' : 'https'}://${host}`;\n}\n","import {\n useNavigate,\n useParams,\n redirect as tanstackRedirect,\n notFound as tanstackNotFound,\n} from '@tanstack/react-router';\nimport {\n NavigationProvider,\n configureNavigation,\n type NavigateOptions,\n} from '../providers/NavigationProvider';\nimport { LinkProvider } from '../providers/LinkProvider';\nimport { TanStackLinkAdapter, localizeDestination } from './link';\nimport { NativeAppEvents } from './native-app-events';\nimport { useCallback, type ReactNode } from 'react';\nimport { UnauthorizedError, type RedirectOptions } from '../providers/NavigationProvider';\nimport { getRequestStore, getTwilightContext } from '../twilight/context';\nimport { resolveStoreBase } from '../utils/store-identity';\nimport { loginRedirectHref } from '../utils/store-base';\nimport { requestOriginOf } from '../utils/request-host';\n\nfunction currentOrigin(): string | null {\n if (typeof window !== 'undefined') return window.location.origin;\n const host = getRequestStore().requestHost;\n return host ? requestOriginOf(host) : null;\n}\n\nconfigureNavigation({\n notFound: (message?: string) => {\n throw tanstackNotFound({ data: message });\n },\n redirect: (path: string, opts?: RedirectOptions) => {\n throw tanstackRedirect({ to: path, replace: opts?.replace, statusCode: opts?.statusCode });\n },\n unauthorized: (message?: string) => {\n const origin = currentOrigin();\n const { pathname, searchStr } = getTwilightContext().location;\n const href =\n origin && loginRedirectHref({ pathname, searchStr, origin, base: resolveStoreBase() });\n // A full load, because the SDK only reads `intended_to` when a page starts.\n if (href) throw tanstackRedirect({ href, reloadDocument: true, replace: true });\n throw new UnauthorizedError(message);\n },\n});\n\n/**\n * TanStack navigation setup - wraps children with NavigationProvider and LinkProvider.\n * Called by TwilightProvider when client.framework === 'tanstack'.\n */\nexport function NavigationSetup({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n const { locale } = useParams({ strict: false }) as { locale?: string };\n const navigateFn = useCallback(\n (to: string, opts?: NavigateOptions) =>\n navigate({ to: localizeDestination(to, locale), replace: opts?.replace }),\n [navigate, locale]\n );\n\n return (\n <NavigationProvider navigate={navigateFn}>\n <NativeAppEvents locale={locale} />\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n\n/** @deprecated Use NavigationSetup instead */\nexport function TanStackNavigationProvider({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <NavigationProvider\n navigate={(to: string, opts?: NavigateOptions) => navigate({ to, replace: opts?.replace })}\n >\n <LinkProvider adapter={TanStackLinkAdapter}>{children}</LinkProvider>\n </NavigationProvider>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { redirect } from './chunk-
|
|
2
|
-
import { clearAuthTokenCookie } from './chunk-
|
|
1
|
+
import { redirect } from './chunk-RWBTMHLR.js';
|
|
2
|
+
import { clearAuthTokenCookie } from './chunk-FO4WVGUQ.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-GXHJXZBG.js.map
|
|
41
|
+
//# sourceMappingURL=chunk-GXHJXZBG.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,sBAAs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Q,CAAA;AACrB,EAAA,MAAM,IAAA,GAAO,MAAM,QAAA,EAAS;AAC5B,EAAA,MAAM,QAAA,CAAS,CAAA,EAAG,MAAM,CAAA,iBAAA,EAAoB,GAAA,CAAI,MAAM,CAAA,EAAG,IAAA,GAAO,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA,EAAI;AAAA,IACjF,UAAA,EAAY;AAAA,GACb,CAAA;AACH;AAUO,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-GXHJXZBG.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,5 +1,5 @@
|
|
|
1
|
-
import { orThrow } from './chunk-
|
|
2
|
-
import { getActiveScope, api } from './chunk-
|
|
1
|
+
import { orThrow } from './chunk-RWBTMHLR.js';
|
|
2
|
+
import { getActiveScope, api } from './chunk-6EQ7G3SZ.js';
|
|
3
3
|
import { queryOptions } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
5
|
var category = {
|
|
@@ -26,5 +26,5 @@ var category = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export { category };
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-IBSQO6LW.js.map
|
|
30
|
+
//# sourceMappingURL=chunk-IBSQO6LW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/category.ts"],"names":[],"mappings":";;;;AAKO,IAAM,QAAA,GAAW;AAAA,EACtB,IAAA,EAAM,OAAO,EAAA,KAAkC;AAC7C,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CAAI,IAAI,CAAA,WAAA,EAAc,EAAE,CAAA,CAAE,CAAA,CAAE,IAAA,EAAyB;AAC5E,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AAAA,EAEA,aAAa,CAAC,EAAA,KAAkC,QAAQ,QAAA,CAAS,IAAA,CAAK,EAAE,CAAC,CAAA;AAAA,EAEzE,MAAM,YAAiC;AACrC,IAAA,MAAM,EAAE,MAAK,GAAI,MAAM,IAAI,GAAA,CAAI,YAAY,EAAE,IAAA,EAA2B;AACxE,IAAA,OAAO,QAAQ,EAAC;AAAA,EAClB,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,MAAA,EAAQ,CAAC,EAAA,KACP,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,CAAC,YAAA,EAAc,QAAA,EAAU,EAAE,CAAA;AAAA,MACrC,OAAA,EAAS,MAAM,QAAA,CAAS,IAAA,CAAK,EAAE;AAAA,KAChC,CAAA;AAAA,IAE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} from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport type { Category } from '../types';\nimport { orThrow } from '../providers/NavigationProvider';\n\nexport const category = {\n find: async (id: string): Promise<Category> => {\n const { data } = await api.get(`categories/${id}`).json<{ data: Category }>();\n return data;\n },\n\n findOrThrow: (id: string): Promise<Category> => orThrow(category.find(id)),\n\n list: async (): Promise<Category[]> => {\n const { data } = await api.get('categories').json<{ data: Category[] }>();\n return data ?? [];\n },\n\n queries: {\n detail: (id: string) =>\n queryOptions({\n queryKey: ['categories', 'detail', id],\n queryFn: () => category.find(id),\n }),\n\n list: () =>\n queryOptions({\n // Scope (branch) varies the API response — key must include it.\n queryKey: ['categories', 'list', { scope: getActiveScope() }],\n queryFn: () => category.list(),\n }),\n },\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { api } from './chunk-
|
|
1
|
+
import { api } from './chunk-6EQ7G3SZ.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-IU4KTCS3.js.map
|
|
44
|
+
//# sourceMappingURL=chunk-IU4KTCS3.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;AAA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A,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,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;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-IU4KTCS3.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"]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ErrorPage } from './chunk-Z4Y55HWX.js';
|
|
2
2
|
import { tanstackHeadAdapter } from './chunk-N2A72R2I.js';
|
|
3
|
-
import { dispatchRouteChanged, dispatchProductViewed } from './chunk-
|
|
4
|
-
import { store } from './chunk-
|
|
5
|
-
import { translations } from './chunk-
|
|
6
|
-
import { shouldDehydrateQuery } from './chunk-
|
|
7
|
-
import { rootHead } from './chunk-
|
|
8
|
-
import { apps } from './chunk-
|
|
3
|
+
import { dispatchRouteChanged, dispatchProductViewed } from './chunk-TIPR4JUO.js';
|
|
4
|
+
import { store } from './chunk-G3UTLICK.js';
|
|
5
|
+
import { translations } from './chunk-NZRJOAA7.js';
|
|
6
|
+
import { shouldDehydrateQuery } from './chunk-56T47K7P.js';
|
|
7
|
+
import { rootHead } from './chunk-ZEGNYJOR.js';
|
|
8
|
+
import { apps } from './chunk-IU4KTCS3.js';
|
|
9
9
|
import { setHeadAdapter } from './chunk-GD26FI4J.js';
|
|
10
|
-
import { RedirectError, NotFoundError, UnauthorizedError } from './chunk-
|
|
10
|
+
import { RedirectError, NotFoundError, UnauthorizedError } from './chunk-RWBTMHLR.js';
|
|
11
11
|
import { RouteId } from './chunk-OUW6WESU.js';
|
|
12
12
|
import { useDocumentClass } from './chunk-JWXJPJBO.js';
|
|
13
13
|
import { toReactProps, mergeElementAttrs } from './chunk-CW625T2E.js';
|
|
14
|
-
import { advertisement } from './chunk-
|
|
15
|
-
import {
|
|
14
|
+
import { advertisement } from './chunk-VWVCSD3N.js';
|
|
15
|
+
import { syncSdkLocale, syncSdkThemeVersion } from './chunk-2FKZAAV7.js';
|
|
16
|
+
import { AUTH_TOKEN_COOKIE_NAME, SCOPE_COOKIE_NAME, SCOPE_COOKIE_MAX_AGE, extractScopeFromUrl, resolveRequestScope, sameScope, extractScopeFromCookies, resolveStoreBase, syncScopeCookie, resolveStoreBaseRedirect, extractTokenFromCookies, prefixStoreBase, stripStoreBase } from './chunk-FO4WVGUQ.js';
|
|
16
17
|
import { updateTwilightContext, SettingsError, createI18nInstance, getTwilightContext, messagesForLocale } from './chunk-N2S25NXP.js';
|
|
17
18
|
import { FALLBACK_LOCALE, getLanguageInfo } from './chunk-T72DAX7R.js';
|
|
18
19
|
import { createRootRouteWithContext, createRouter as createRouter$1, useRouterState, redirect, defaultStringifySearch } from '@tanstack/react-router';
|
|
@@ -253,7 +254,7 @@ function resolveRouteId(tanstackId) {
|
|
|
253
254
|
return TANSTACK_ROUTE_ID_MAP[tanstackId] ?? tanstackId;
|
|
254
255
|
}
|
|
255
256
|
var LazyNotFoundPage = lazy(
|
|
256
|
-
() => import('./not-found-
|
|
257
|
+
() => import('./not-found-ZM6VIELR.js').then((m) => ({ default: m.NotFoundPage }))
|
|
257
258
|
);
|
|
258
259
|
function StoreUnavailablePage() {
|
|
259
260
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
@@ -612,5 +613,5 @@ function tanstackDocumentAdapter(descriptor) {
|
|
|
612
613
|
}
|
|
613
614
|
|
|
614
615
|
export { RouteDocumentSync, TanStackDocumentSync, createRouter, createTwilightRootRoute, tanstackDocumentAdapter, useTanstackDocumentAttrs };
|
|
615
|
-
//# sourceMappingURL=chunk-
|
|
616
|
-
//# sourceMappingURL=chunk-
|
|
616
|
+
//# sourceMappingURL=chunk-J3G4ZD76.js.map
|
|
617
|
+
//# sourceMappingURL=chunk-J3G4ZD76.js.map
|