@salla.sa/twilight-theme-engine 1.0.132 → 1.0.134
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-LUVIZGH5.js → AddToCartForm-D7AQIX7K.js} +3 -3
- package/dist/{AddToCartForm-LUVIZGH5.js.map → AddToCartForm-D7AQIX7K.js.map} +1 -1
- package/dist/{BlogAuthorPage-UC5JFBRH.js → BlogAuthorPage-P2TVMO5O.js} +29 -29
- package/dist/{BlogAuthorPage-UC5JFBRH.js.map → BlogAuthorPage-P2TVMO5O.js.map} +1 -1
- package/dist/{BlogCategoryPage-YZ6BN4QV.js → BlogCategoryPage-A2BS6T3I.js} +29 -29
- package/dist/{BlogCategoryPage-YZ6BN4QV.js.map → BlogCategoryPage-A2BS6T3I.js.map} +1 -1
- package/dist/{BlogPage-ERPCNHQV.js → BlogPage-ZOIVZQ5W.js} +27 -27
- package/dist/{BlogPage-ERPCNHQV.js.map → BlogPage-ZOIVZQ5W.js.map} +1 -1
- package/dist/{BlogSinglePage-TNVS5VCF.js → BlogSinglePage-X57JXKQ6.js} +27 -27
- package/dist/{BlogSinglePage-TNVS5VCF.js.map → BlogSinglePage-X57JXKQ6.js.map} +1 -1
- package/dist/{BlogTagPage-DKWJM6GQ.js → BlogTagPage-WXLEEA63.js} +29 -29
- package/dist/{BlogTagPage-DKWJM6GQ.js.map → BlogTagPage-WXLEEA63.js.map} +1 -1
- package/dist/{BrandsPage-ALLXOEZ7.js → BrandsPage-6ZMEF4EQ.js} +28 -28
- package/dist/{BrandsPage-ALLXOEZ7.js.map → BrandsPage-6ZMEF4EQ.js.map} +1 -1
- package/dist/{Breadcrumb-2TWWY76F.js → Breadcrumb-FYA3KNAY.js} +27 -27
- package/dist/{Breadcrumb-2TWWY76F.js.map → Breadcrumb-FYA3KNAY.js.map} +1 -1
- package/dist/{CartItem-XNCZZQ4X.js → CartItem-XGDV4EZ4.js} +27 -27
- package/dist/{CartItem-XNCZZQ4X.js.map → CartItem-XGDV4EZ4.js.map} +1 -1
- package/dist/{CartSummary-ROELC4AF.js → CartSummary-BP6BJ7BB.js} +27 -27
- package/dist/{CartSummary-ROELC4AF.js.map → CartSummary-BP6BJ7BB.js.map} +1 -1
- package/dist/{Copyright-UPGI2I5D.js → Copyright-H4CYJQR3.js} +3 -3
- package/dist/{Copyright-UPGI2I5D.js.map → Copyright-H4CYJQR3.js.map} +1 -1
- package/dist/{CustomerLayout-YXTOHATN.js → CustomerLayout-YLMMDLXA.js} +27 -27
- package/dist/{CustomerLayout-YXTOHATN.js.map → CustomerLayout-YLMMDLXA.js.map} +1 -1
- package/dist/{Footer-J4V5UUCF.js → Footer-ADZZF3NE.js} +4 -4
- package/dist/{Footer-J4V5UUCF.js.map → Footer-ADZZF3NE.js.map} +1 -1
- package/dist/Header-OMEW5PF4.js +23 -0
- package/dist/{Header-5ENK5VKP.js.map → Header-OMEW5PF4.js.map} +1 -1
- package/dist/{LoyaltyPage-J6GSLDVZ.js → LoyaltyPage-EGTJAFY3.js} +27 -27
- package/dist/{LoyaltyPage-J6GSLDVZ.js.map → LoyaltyPage-EGTJAFY3.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-XP2RCLZA.js → LoyaltyPointsPage-RSPBAI73.js} +9 -9
- package/dist/{LoyaltyPointsPage-XP2RCLZA.js.map → LoyaltyPointsPage-RSPBAI73.js.map} +1 -1
- package/dist/{MainMenu-RMM6ZJWZ.js → MainMenu-R7RNOTPO.js} +8 -8
- package/dist/{MainMenu-RMM6ZJWZ.js.map → MainMenu-R7RNOTPO.js.map} +1 -1
- package/dist/MaintenancePage-U5P43D52.js +7 -0
- package/dist/{MaintenancePage-A7CNHM7B.js.map → MaintenancePage-U5P43D52.js.map} +1 -1
- package/dist/{MasterLayout-BIAXVZNR.js → MasterLayout-LLKACZ7T.js} +27 -27
- package/dist/{MasterLayout-BIAXVZNR.js.map → MasterLayout-LLKACZ7T.js.map} +1 -1
- package/dist/{MobileMenu-HYKQCDTC.js → MobileMenu-4F4DBTWU.js} +28 -28
- package/dist/{MobileMenu-HYKQCDTC.js.map → MobileMenu-4F4DBTWU.js.map} +1 -1
- package/dist/{NotificationsPage-Q6EDPEQX.js → NotificationsPage-AWKZRH7H.js} +27 -27
- package/dist/{NotificationsPage-Q6EDPEQX.js.map → NotificationsPage-AWKZRH7H.js.map} +1 -1
- package/dist/{OrderSinglePage-HGEECI7Q.js → OrderSinglePage-2RTLHMMO.js} +28 -28
- package/dist/{OrderSinglePage-HGEECI7Q.js.map → OrderSinglePage-2RTLHMMO.js.map} +1 -1
- package/dist/{OrdersPage-CBHLD5XG.js → OrdersPage-57MRSJTB.js} +27 -27
- package/dist/{OrdersPage-CBHLD5XG.js.map → OrdersPage-57MRSJTB.js.map} +1 -1
- package/dist/{PageSingle-S6IRM4Q5.js → PageSingle-YTXFQHHC.js} +7 -7
- package/dist/{PageSingle-S6IRM4Q5.js.map → PageSingle-YTXFQHHC.js.map} +1 -1
- package/dist/{ProductDetails-DHY35UDT.js → ProductDetails-6LWZSW7R.js} +8 -8
- package/dist/{ProductDetails-DHY35UDT.js.map → ProductDetails-6LWZSW7R.js.map} +1 -1
- package/dist/{ProfilePage-3ES62QH7.js → ProfilePage-JKDLNAKB.js} +27 -27
- package/dist/{ProfilePage-3ES62QH7.js.map → ProfilePage-JKDLNAKB.js.map} +1 -1
- package/dist/{ReviewsPage-RFEOWEVU.js → ReviewsPage-OST5SGH5.js} +3 -3
- package/dist/{ReviewsPage-RFEOWEVU.js.map → ReviewsPage-OST5SGH5.js.map} +1 -1
- package/dist/{SeoCartWidget-WJCQ76TI.js → SeoCartWidget-7L2B25DP.js} +27 -27
- package/dist/{SeoCartWidget-WJCQ76TI.js.map → SeoCartWidget-7L2B25DP.js.map} +1 -1
- package/dist/{SettingsPage-BHIVN22T.js → SettingsPage-IFYFZ2SP.js} +27 -27
- package/dist/{SettingsPage-BHIVN22T.js.map → SettingsPage-IFYFZ2SP.js.map} +1 -1
- package/dist/StoreClosedNotification-COURDUGE.js +58 -0
- package/dist/{StoreClosedNotification-IYVXVJJO.js.map → StoreClosedNotification-COURDUGE.js.map} +1 -1
- package/dist/{TestimonialsPage-E7IKEHCT.js → TestimonialsPage-2RWGM5OP.js} +7 -7
- package/dist/{TestimonialsPage-E7IKEHCT.js.map → TestimonialsPage-2RWGM5OP.js.map} +1 -1
- package/dist/{ThankYouPage-DAZOZH6Y.js → ThankYouPage-OJLIJPLR.js} +27 -27
- package/dist/{ThankYouPage-DAZOZH6Y.js.map → ThankYouPage-OJLIJPLR.js.map} +1 -1
- package/dist/{WalletPage-ZBCGMDSP.js → WalletPage-FBOYCP2F.js} +28 -28
- package/dist/{WalletPage-ZBCGMDSP.js.map → WalletPage-FBOYCP2F.js.map} +1 -1
- package/dist/{WishlistPage-HAUJQL2G.js → WishlistPage-YWTH5YAO.js} +29 -29
- package/dist/{WishlistPage-HAUJQL2G.js.map → WishlistPage-YWTH5YAO.js.map} +1 -1
- package/dist/api/advertisement.js +5 -5
- package/dist/api/apps.js +5 -5
- package/dist/api/blog.js +7 -7
- package/dist/api/brands.js +7 -7
- package/dist/api/cart.js +7 -7
- package/dist/api/category.js +7 -7
- package/dist/api/client.js +4 -4
- package/dist/api/home.js +5 -5
- package/dist/api/loyalty.js +7 -7
- package/dist/api/menu.js +5 -5
- package/dist/api/notification.js +5 -5
- package/dist/api/order.js +7 -7
- package/dist/api/page.js +7 -7
- package/dist/api/product.d.ts +3 -0
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +7 -7
- package/dist/api/profile.js +4 -4
- package/dist/api/store.js +6 -6
- package/dist/api/translations.js +5 -5
- package/dist/api/user.js +5 -5
- package/dist/api/wallet.js +5 -5
- package/dist/api/wishlist.js +8 -8
- package/dist/{chunk-5NN4OICC.js → chunk-2EF2HHHL.js} +3 -3
- package/dist/{chunk-5NN4OICC.js.map → chunk-2EF2HHHL.js.map} +1 -1
- package/dist/{chunk-Z4N3WJ6R.js → chunk-2ZJAQBFV.js} +3 -3
- package/dist/{chunk-Z4N3WJ6R.js.map → chunk-2ZJAQBFV.js.map} +1 -1
- package/dist/{chunk-CGAKEPEC.js → chunk-352YYRKV.js} +3 -3
- package/dist/{chunk-CGAKEPEC.js.map → chunk-352YYRKV.js.map} +1 -1
- package/dist/{chunk-2TLIULJZ.js → chunk-3E3ABCPC.js} +3 -3
- package/dist/{chunk-2TLIULJZ.js.map → chunk-3E3ABCPC.js.map} +1 -1
- package/dist/{chunk-7E7CA72E.js → chunk-3OWCF54L.js} +4 -4
- package/dist/{chunk-7E7CA72E.js.map → chunk-3OWCF54L.js.map} +1 -1
- package/dist/{chunk-D5SYOOE2.js → chunk-4EAYVEJO.js} +4 -4
- package/dist/{chunk-D5SYOOE2.js.map → chunk-4EAYVEJO.js.map} +1 -1
- package/dist/{chunk-KLSRARPU.js → chunk-5EDFGGY4.js} +4 -4
- package/dist/{chunk-KLSRARPU.js.map → chunk-5EDFGGY4.js.map} +1 -1
- package/dist/{chunk-F5NB3H5P.js → chunk-5RWIVHYS.js} +6 -6
- package/dist/{chunk-F5NB3H5P.js.map → chunk-5RWIVHYS.js.map} +1 -1
- package/dist/{chunk-EHTLXK5F.js → chunk-5UWRPWK2.js} +5 -5
- package/dist/{chunk-EHTLXK5F.js.map → chunk-5UWRPWK2.js.map} +1 -1
- package/dist/{chunk-7VNVCHID.js → chunk-6K34BCUP.js} +2 -2
- package/dist/{chunk-7VNVCHID.js.map → chunk-6K34BCUP.js.map} +1 -1
- package/dist/{chunk-MPQ5NACW.js → chunk-6PMG5J4Z.js} +4 -4
- package/dist/{chunk-MPQ5NACW.js.map → chunk-6PMG5J4Z.js.map} +1 -1
- package/dist/{chunk-TTZKDTD5.js → chunk-6S43HHJM.js} +3 -3
- package/dist/{chunk-TTZKDTD5.js.map → chunk-6S43HHJM.js.map} +1 -1
- package/dist/{chunk-JB5XMO4D.js → chunk-BQ5SELOL.js} +4 -4
- package/dist/{chunk-JB5XMO4D.js.map → chunk-BQ5SELOL.js.map} +1 -1
- package/dist/{chunk-CKH6WBMA.js → chunk-CZ6VJPCG.js} +3 -3
- package/dist/{chunk-CKH6WBMA.js.map → chunk-CZ6VJPCG.js.map} +1 -1
- package/dist/{chunk-GLDGDTVU.js → chunk-DGK2HVSR.js} +6 -6
- package/dist/{chunk-GLDGDTVU.js.map → chunk-DGK2HVSR.js.map} +1 -1
- package/dist/{chunk-GY6G7S3N.js → chunk-DRDQQNIW.js} +29 -8
- package/dist/chunk-DRDQQNIW.js.map +1 -0
- package/dist/{chunk-PGXRNW3Y.js → chunk-DRX6L472.js} +3 -3
- package/dist/{chunk-PGXRNW3Y.js.map → chunk-DRX6L472.js.map} +1 -1
- package/dist/{chunk-YZDL2P6T.js → chunk-EISZVMJY.js} +4 -4
- package/dist/{chunk-YZDL2P6T.js.map → chunk-EISZVMJY.js.map} +1 -1
- package/dist/{chunk-BAS4BPSB.js → chunk-FOBC4W73.js} +3 -3
- package/dist/{chunk-BAS4BPSB.js.map → chunk-FOBC4W73.js.map} +1 -1
- package/dist/{chunk-FHU2MXZA.js → chunk-FXVII733.js} +18 -8
- package/dist/chunk-FXVII733.js.map +1 -0
- package/dist/{chunk-HHHDPYMO.js → chunk-HIF6PP7C.js} +4 -4
- package/dist/{chunk-HHHDPYMO.js.map → chunk-HIF6PP7C.js.map} +1 -1
- package/dist/{chunk-BK5TBUGG.js → chunk-HOJ5E2PG.js} +3 -3
- package/dist/{chunk-BK5TBUGG.js.map → chunk-HOJ5E2PG.js.map} +1 -1
- package/dist/{chunk-DCPQ4Z7N.js → chunk-IJX2MCPN.js} +4 -4
- package/dist/{chunk-DCPQ4Z7N.js.map → chunk-IJX2MCPN.js.map} +1 -1
- package/dist/{chunk-5RUFKW7T.js → chunk-IYAXNDJI.js} +4 -4
- package/dist/{chunk-5RUFKW7T.js.map → chunk-IYAXNDJI.js.map} +1 -1
- package/dist/{chunk-EANN5L2E.js → chunk-JPG5XSTP.js} +8 -8
- package/dist/{chunk-EANN5L2E.js.map → chunk-JPG5XSTP.js.map} +1 -1
- package/dist/{chunk-YMXOKWNO.js → chunk-KJG4BPY2.js} +4 -4
- package/dist/{chunk-YMXOKWNO.js.map → chunk-KJG4BPY2.js.map} +1 -1
- package/dist/{chunk-TI3Q2B3H.js → chunk-LA7B3TTK.js} +9 -9
- package/dist/{chunk-TI3Q2B3H.js.map → chunk-LA7B3TTK.js.map} +1 -1
- package/dist/{chunk-JGVEGQHJ.js → chunk-LFHYQ6AN.js} +3 -3
- package/dist/{chunk-JGVEGQHJ.js.map → chunk-LFHYQ6AN.js.map} +1 -1
- package/dist/{chunk-BL6DCALA.js → chunk-LVEIDCW2.js} +7 -7
- package/dist/{chunk-BL6DCALA.js.map → chunk-LVEIDCW2.js.map} +1 -1
- package/dist/{chunk-DROQER6S.js → chunk-M75BIUMZ.js} +3 -3
- package/dist/{chunk-DROQER6S.js.map → chunk-M75BIUMZ.js.map} +1 -1
- package/dist/{chunk-V2M5YNZQ.js → chunk-MWYKP7CI.js} +3 -3
- package/dist/{chunk-V2M5YNZQ.js.map → chunk-MWYKP7CI.js.map} +1 -1
- package/dist/{chunk-GYXUYHKO.js → chunk-NHA4SBKG.js} +4 -4
- package/dist/{chunk-GYXUYHKO.js.map → chunk-NHA4SBKG.js.map} +1 -1
- package/dist/{chunk-CQY64PLJ.js → chunk-NVPG5X2H.js} +4 -4
- package/dist/{chunk-CQY64PLJ.js.map → chunk-NVPG5X2H.js.map} +1 -1
- package/dist/{chunk-ZVZPCDEU.js → chunk-OO2JMMCL.js} +4 -4
- package/dist/{chunk-ZVZPCDEU.js.map → chunk-OO2JMMCL.js.map} +1 -1
- package/dist/{chunk-YQELP5ND.js → chunk-PXH5TZGZ.js} +5 -5
- package/dist/{chunk-YQELP5ND.js.map → chunk-PXH5TZGZ.js.map} +1 -1
- package/dist/{chunk-FID76MUV.js → chunk-Q7E4TNN7.js} +10 -6
- package/dist/chunk-Q7E4TNN7.js.map +1 -0
- package/dist/{chunk-CHMWAYVU.js → chunk-QC4XQO6D.js} +4 -4
- package/dist/{chunk-CHMWAYVU.js.map → chunk-QC4XQO6D.js.map} +1 -1
- package/dist/{chunk-TBTQQM45.js → chunk-R7DPH75N.js} +5 -5
- package/dist/{chunk-TBTQQM45.js.map → chunk-R7DPH75N.js.map} +1 -1
- package/dist/{chunk-EJIMEI36.js → chunk-RFDP66ID.js} +7 -7
- package/dist/{chunk-EJIMEI36.js.map → chunk-RFDP66ID.js.map} +1 -1
- package/dist/{chunk-OM2GRPDH.js → chunk-RYGEIQWO.js} +3 -3
- package/dist/{chunk-OM2GRPDH.js.map → chunk-RYGEIQWO.js.map} +1 -1
- package/dist/{chunk-PCEKL6S3.js → chunk-SXI2XBCC.js} +7 -7
- package/dist/{chunk-PCEKL6S3.js.map → chunk-SXI2XBCC.js.map} +1 -1
- package/dist/{chunk-L4TQBWR7.js → chunk-TF6HFXTW.js} +3 -3
- package/dist/{chunk-L4TQBWR7.js.map → chunk-TF6HFXTW.js.map} +1 -1
- package/dist/{chunk-E7YBFA3H.js → chunk-TL2RV5KC.js} +5 -5
- package/dist/{chunk-E7YBFA3H.js.map → chunk-TL2RV5KC.js.map} +1 -1
- package/dist/{chunk-6LMS7IYL.js → chunk-UII3OBWQ.js} +7 -7
- package/dist/{chunk-6LMS7IYL.js.map → chunk-UII3OBWQ.js.map} +1 -1
- package/dist/{chunk-THQDHZ4K.js → chunk-UJIE7IEJ.js} +4 -4
- package/dist/{chunk-THQDHZ4K.js.map → chunk-UJIE7IEJ.js.map} +1 -1
- package/dist/{chunk-5FJFN3IW.js → chunk-WQPG22DY.js} +3 -3
- package/dist/{chunk-5FJFN3IW.js.map → chunk-WQPG22DY.js.map} +1 -1
- package/dist/{chunk-2MUBQOS5.js → chunk-WSPMY4BC.js} +8 -8
- package/dist/{chunk-2MUBQOS5.js.map → chunk-WSPMY4BC.js.map} +1 -1
- package/dist/{chunk-NXJ4KAJQ.js → chunk-WUDGMLUX.js} +4 -4
- package/dist/{chunk-NXJ4KAJQ.js.map → chunk-WUDGMLUX.js.map} +1 -1
- package/dist/{chunk-EJV3NYBP.js → chunk-WVQBEAYO.js} +24 -24
- package/dist/chunk-WVQBEAYO.js.map +1 -0
- package/dist/{chunk-JYV25VNZ.js → chunk-X55R4VVK.js} +3 -3
- package/dist/{chunk-JYV25VNZ.js.map → chunk-X55R4VVK.js.map} +1 -1
- package/dist/chunk-XRULXQBR.js +14 -0
- package/dist/{chunk-DOTKJOVG.js.map → chunk-XRULXQBR.js.map} +1 -1
- package/dist/{chunk-RSKVPOMJ.js → chunk-XUJJIH5C.js} +17 -17
- package/dist/chunk-XUJJIH5C.js.map +1 -0
- package/dist/{chunk-5DOMRYLF.js → chunk-YDXBRST4.js} +7 -7
- package/dist/{chunk-5DOMRYLF.js.map → chunk-YDXBRST4.js.map} +1 -1
- package/dist/{chunk-TOJM4ZIF.js → chunk-ZKHMZF36.js} +7 -7
- package/dist/{chunk-TOJM4ZIF.js.map → chunk-ZKHMZF36.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +25 -25
- package/dist/components/home/index.js +29 -29
- package/dist/components/layout/index.js +7 -7
- package/dist/components/product/index.js +26 -26
- package/dist/components/store/index.js +27 -27
- package/dist/components/toast/index.js +5 -5
- package/dist/dev/editor/index.js +3 -3
- package/dist/dev/index.js +3 -3
- package/dist/document-class-R26LC5C2.js +31 -0
- package/dist/{document-class-G5XELNQN.js.map → document-class-R26LC5C2.js.map} +1 -1
- package/dist/hooks/index.js +25 -25
- package/dist/hooks/useComments.js +4 -4
- package/dist/hooks/useGtm.js +25 -25
- package/dist/hooks/useMoney.js +25 -25
- package/dist/hooks/useProduct.js +4 -4
- package/dist/hooks/useStore.js +25 -25
- package/dist/hooks/useUser.js +6 -6
- package/dist/hooks/useWishlist.js +4 -4
- package/dist/index.js +25 -25
- package/dist/native-app/index.js +4 -4
- package/dist/{navigation-ZPJHUO4Z.js → navigation-2UNFQOOQ.js} +8 -8
- package/dist/{navigation-ZPJHUO4Z.js.map → navigation-2UNFQOOQ.js.map} +1 -1
- package/dist/navigation-5ZAI4SPZ.js +15 -0
- package/dist/{navigation-S6ZL2WSI.js.map → navigation-5ZAI4SPZ.js.map} +1 -1
- package/dist/{not-found-KME662CU.js → not-found-LGTTNZ4Y.js} +28 -28
- package/dist/{not-found-KME662CU.js.map → not-found-LGTTNZ4Y.js.map} +1 -1
- package/dist/providers/index.js +25 -25
- package/dist/providers/twilight-init.d.ts.map +1 -1
- package/dist/routes/account/orders.js +9 -9
- package/dist/routes/account.js +18 -18
- package/dist/routes/blog.js +13 -13
- package/dist/routes/brands.js +9 -9
- package/dist/routes/cart.js +33 -33
- package/dist/routes/home.js +30 -30
- package/dist/routes/index.js +7 -7
- package/dist/routes/loyalty.js +10 -10
- package/dist/routes/page.js +9 -9
- package/dist/routes/product-listing.js +31 -31
- package/dist/routes/product.js +29 -29
- package/dist/routes/root/beforeLoad.d.ts +6 -0
- package/dist/routes/root/beforeLoad.d.ts.map +1 -1
- package/dist/routes/seo-redirects.js +7 -7
- package/dist/routes/testimonials.js +5 -5
- package/dist/routes/thank-you.js +9 -9
- package/dist/skeleton.js +30 -30
- package/dist/{store-lookup-R5KJS7Z3.js → store-lookup-DQECZUBL.js} +12 -12
- package/dist/{store-lookup-R5KJS7Z3.js.map → store-lookup-DQECZUBL.js.map} +1 -1
- package/dist/tanstack.js +22 -22
- package/dist/twilight/context.d.ts +3 -2
- package/dist/twilight/context.d.ts.map +1 -1
- package/dist/utils/baseHead.js +3 -3
- package/dist/utils/cookies.d.ts +15 -1
- package/dist/utils/cookies.d.ts.map +1 -1
- package/dist/utils/index.js +7 -7
- package/dist/utils/maintenance.d.ts +37 -5
- package/dist/utils/maintenance.d.ts.map +1 -1
- package/dist/utils/store-identity.d.ts +10 -0
- package/dist/utils/store-identity.d.ts.map +1 -1
- package/dist/vite/index.js +5 -5
- package/package.json +1 -1
- package/tailwind/routes/root/beforeLoad.ts.txt +8 -1
- package/dist/Header-5ENK5VKP.js +0 -23
- package/dist/MaintenancePage-A7CNHM7B.js +0 -7
- package/dist/StoreClosedNotification-IYVXVJJO.js +0 -58
- package/dist/chunk-DOTKJOVG.js +0 -14
- package/dist/chunk-EJV3NYBP.js.map +0 -1
- package/dist/chunk-FHU2MXZA.js.map +0 -1
- package/dist/chunk-FID76MUV.js.map +0 -1
- package/dist/chunk-GY6G7S3N.js.map +0 -1
- package/dist/chunk-RSKVPOMJ.js.map +0 -1
- package/dist/document-class-G5XELNQN.js +0 -31
- package/dist/navigation-S6ZL2WSI.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/translations-key.ts","../src/api/messages.ts","../src/utils/errors.ts","../src/providers/i18n-factory.ts","../src/twilight/context.ts"],"names":[],"mappings":";;;;;;AAwBO,SAAS,qBAAqB,MAAA,EAAkC;AACrE,EAAA,OAAO,CAAC,gBAAgB,MAAM,CAAA;AAChC;AAkBO,SAAS,yBAAA,CACd,SACA,MAAA,EAC0B;AAC1B,EAAA,OAAO,CAAC,cAAA,EAAgB,MAAA,CAAO,OAAO,GAAG,MAAM,CAAA;AACjD;;;ACrBO,SAAS,cAAc,KAAA,EAAmC;AAC/D,EAAA,OAAO,OAAO,UAAU,QAAA,IAAY,KAAA,KAAU,QAAQ,CAAC,KAAA,CAAM,QAAQ,KAAK,CAAA;AAC5E;AAgBO,SAAS,aAAA,CAAc,MAAgB,SAAA,EAA+B;AAC3E,EAAA,MAAM,MAAA,GAAmB,EAAE,GAAG,IAAA,EAAK;AAEnC,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,EAAG;AACpD,IAAA,MAAM,QAAA,GAAW,OAAO,GAAG,CAAA;AAC3B,IAAA,MAAA,CAAO,GAAG,CAAA,GACR,aAAA,CAAc,QAAQ,CAAA,IAAK,aAAA,CAAc,KAAK,CAAA,GAAI,aAAA,CAAc,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IACA,IAAI,IAAA,GAAO;AACT,MAAA,IAAI,CAAC,KAAK,IAAA,EAAM;AAKd,QAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AAAA,UACV,IAAA,CAAK,MAAA;AAAA,UACL,iBAAA,CAAkB,IAAA,CAAK,WAAA,EAAa,IAAA,CAAK,MAAM;AAAA,SACjD;AAAA,MACF;AACA,MAAA,OAAO,IAAA,CAAK,IAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,GAAA,GAAM;AACR,MAAA,OAAO,eAAA,CAAgB,IAAA,CAAK,MAAM,CAAA,CAAE,GAAA;AAAA,IACtC,CAAA;AAAA,IACA,IAAI,IAAA,GAAO;AACT,MAAA,OAAO,IAAA,CAAK,IAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,YAAA,GAAe;AACjB,MAAA,OAAO,IAAA,CAAK,YAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,YAAA,GAAe;AACjB,MAAA,OAAO,IAAA,CAAK,YAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,WAAA,GAAc;AAChB,MAAA,OAAO,IAAA,CAAK,WAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,aAAA,GAAgB;AAClB,MAAA,OAAO,IAAA,CAAK,aAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,MAAA,GAAS;AACX,MAAA,OAAO,IAAA,CAAK,MAAA;AAAA,IACd;AAAA,GACF;AACF","file":"chunk-7VNVCHID.js","sourcesContent":["/**\n * @fileoverview The translations query key, on its own, importing nothing.\n *\n * Three places read the cached translations — `rootBeforeLoad`, the hydration\n * path in `tanstack/router.tsx`, and the lazy `i18n` accessor in\n * `twilight/context.ts` — and all three have to agree on the key or the\n * hydrated page misses the entry it was just handed and refetches. One\n * definition is the only way to keep that true.\n *\n * It lives here rather than in `api/translations.ts`, where it would naturally\n * sit, because **`twilight/context.ts` cannot afford that module's imports**.\n * `api/translations` pulls in `api/client`, which pulls in `ky`; `context.ts`\n * is imported directly by tests that mock `ky`, and adding that edge made six\n * of them stop being mocked and start issuing real requests to `api.salla.dev`\n * (`tests/routes/rootBeforeLoad.test.ts`, bisected to exactly this import). A\n * leaf module with no imports of its own cannot do that to anyone.\n */\n\n/**\n * @param locale is part of the key because each file on the CDN holds one\n * language. The global file this replaced carried every language and was\n * sliced after the cache, so a key without the locale was correct then and is\n * a wrong-language bug now: `/ar` → `/en` would reuse the Arabic entry.\n */\nexport function translationsQueryKey(locale: string): [string, string] {\n return ['translations', locale];\n}\n\n/**\n * The merchant's own wording for one store and one language.\n *\n * Separate from {@link translationsQueryKey} rather than folded into it,\n * because the two files have different lifetimes and different audiences: the\n * platform's copy is the same object for every store on the CDN, and this one\n * is a single merchant's overrides. Keeping them apart means a store with no\n * overrides never invalidates, refetches or dehydrates anything on its account.\n *\n * @param storeId is `settings.store.id` — the Optimus-encoded numeric id, which\n * is what names the object. It is safe in a key even though the locale-only key\n * deliberately avoids naming a store: that warning is about a store *resolved\n * from the request*, which differs between server and client. This one is read\n * out of the settings payload, so both sides compute it from the same\n * dehydrated data and agree.\n */\nexport function storeTranslationsQueryKey(\n storeId: string | number,\n locale: string\n): [string, string, string] {\n return ['translations', String(storeId), locale];\n}\n","/**\n * @fileoverview Composing one language's messages out of the query cache.\n *\n * **There are three places that build an i18n instance**, and they have to\n * agree on more than the key: `rootBeforeLoad`, the hydration path in\n * `tanstack/router.tsx`, and the lazy `i18n` accessor in `twilight/context.ts`.\n * When the platform's copy was the only source, agreeing on\n * `translationsQueryKey` was enough. It is not any more — a merchant's own\n * wording is a second cache entry, and a reader that knows about one and not\n * the other renders different text from the page beside it.\n *\n * That is exactly what shipped in #366: the server rendered the merchant's\n * words and hydration replaced them with the platform's, because only\n * `rootBeforeLoad` had been taught to merge. Greptile caught it. This module is\n * the single answer to \"what are the messages for this locale\", so the next\n * source cannot be added to one reader and forgotten in two.\n *\n * It lives beside `translations-key.ts` and imports nothing at runtime for the\n * same reason that file does: `twilight/context.ts` cannot afford\n * `api/translations`, which pulls in `api/client` and therefore `ky`, and tests\n * that mock `ky` stop being mocked the moment that edge exists.\n */\nimport type { QueryClient } from '@tanstack/react-query';\nimport { translationsQueryKey } from './translations-key';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\nexport type Messages = Record<string, unknown>;\n\nexport function isPlainObject(value: unknown): value is Messages {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * `overrides` laid over `base`, one leaf at a time.\n *\n * Recursive rather than a spread, because both files are nested by group\n * (`common.errors.500`) and a top-level spread would make a merchant who\n * overrode one string inside `common` lose every other string in it. The\n * merchant's value wins at the leaf, and a group they never touched is left\n * exactly as the platform sent it.\n *\n * A type conflict — one side an object where the other is a string — resolves\n * to the merchant's value. It is the more specific of the two and there is no\n * sensible way to merge a string into a group; the alternative, keeping the\n * platform's, would mean a merchant's edit silently doing nothing.\n */\nexport function mergeMessages(base: Messages, overrides: Messages): Messages {\n const merged: Messages = { ...base };\n\n for (const [key, value] of Object.entries(overrides)) {\n const existing = merged[key];\n merged[key] =\n isPlainObject(existing) && isPlainObject(value) ? mergeMessages(existing, value) : value;\n }\n\n return merged;\n}\n\n/**\n * This store's overrides for `locale`, if any were fetched into the cache.\n *\n * Found by **shape** rather than by asking the settings for a store id, and\n * that is deliberate: the two readers that were missing the merge have a\n * `queryClient` and a locale between them and nothing else, and reaching for\n * `api/store` from `twilight/context.ts` would drag `ky` in through the back\n * door. One document serves one store — a request naming a different one is\n * redirected with `reloadDocument` — so at most one such entry per locale\n * exists, and matching `['translations', <anything>, <locale>]` cannot pick up\n * somebody else's.\n */\nfunction cachedOverrides(queryClient: QueryClient, locale: string): Messages | undefined {\n const entries = queryClient.getQueriesData<Messages>({ queryKey: ['translations'] });\n\n for (const [key, data] of entries) {\n if (key.length === 3 && key[2] === locale && isPlainObject(data)) {\n return data;\n }\n }\n\n return undefined;\n}\n\n/**\n * The messages for `locale`: the platform's copy with this merchant's over it.\n *\n * Reads only — whoever wants the merchant's file in the cache has to have put\n * it there, which `rootBeforeLoad` does and only when the settings say there is\n * one. A reader that runs without it simply gets the platform's copy, which is\n * the same thing it got before any of this existed.\n */\nexport function messagesForLocale(\n queryClient: QueryClient | undefined,\n locale: string\n): TranslationMessages | undefined {\n const common = queryClient?.getQueryData<TranslationMessages>(translationsQueryKey(locale));\n const overrides = queryClient ? cachedOverrides(queryClient, locale) : undefined;\n\n return composeMessages(common, overrides, locale);\n}\n\n/**\n * The same composition from values rather than from the cache.\n *\n * `rootBeforeLoad` has both in hand already — it just awaited them — so it\n * composes directly instead of reading back what it put in.\n */\nexport function composeMessages(\n common: TranslationMessages | null | undefined,\n overrides: Messages | null | undefined,\n locale: string\n): TranslationMessages | undefined {\n if (!overrides || Object.keys(overrides).length === 0) return common ?? undefined;\n\n const base = common?.[`${locale}.trans`];\n\n return {\n [`${locale}.trans`]: mergeMessages(isPlainObject(base) ? base : {}, overrides) as Record<\n string,\n string\n >,\n };\n}\n","/**\n * Why a store's settings did not load:\n * - `no-store`: nothing named a store for this request;\n * - `timeout`: the Salla API did not answer in time;\n * - `not-found`: it answered that no store has that identifier;\n * - `http`: it answered with another error status;\n * - `network`: no answer arrived at all;\n * - `empty`: it answered without settings.\n */\nexport type SettingsErrorReason =\n 'no-store' | 'timeout' | 'not-found' | 'http' | 'network' | 'empty';\n\nexport interface SettingsErrorDetails {\n reason?: SettingsErrorReason;\n /** The API's status, when `reason` is `'http'` or `'not-found'`. */\n status?: number;\n}\n\nexport class SettingsError extends Error {\n /** Absent when nothing said why, e.g. `getTwilightContext().settings` read before they loaded. */\n readonly reason?: SettingsErrorReason;\n readonly status?: number;\n\n constructor(message?: string, details?: SettingsErrorDetails) {\n super(message ?? 'Store settings could not be loaded.');\n this.name = 'SettingsError';\n this.reason = details?.reason;\n this.status = details?.status;\n }\n}\n","import { createInstance, type i18n as I18nInstance } from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nexport type TranslationMessages = Record<string, Record<string, string>>;\n\n/**\n * Creates a new i18next instance for the given locale.\n *\n * @param locale - Active locale code, e.g. `'ar'`\n * @param translations - App translations from the Salla API (store-specific)\n * @param themeTranslations - Bundled theme translations (static defaults)\n */\nexport function createI18nInstance(\n locale: string,\n translations?: TranslationMessages,\n themeTranslations?: TranslationMessages\n): I18nInstance {\n const instance = createInstance();\n const transKey = `${locale}.trans`;\n\n instance.use(initReactI18next).init({\n lng: locale,\n fallbackLng: locale,\n ns: ['app', 'theme'],\n defaultNS: 'app',\n fallbackNS: 'theme',\n resources: {\n [locale]: {\n app: translations?.[transKey] ?? {},\n theme: themeTranslations?.[transKey] ?? {},\n },\n },\n interpolation: { escapeValue: false },\n react: { useSuspense: false },\n keySeparator: '.',\n nsSeparator: false,\n });\n\n return instance;\n}\n\n/**\n * Creates i18n instance for testing\n * @param locale - Locale code (default: 'ar')\n * @param translations - Optional translations\n */\nexport function createTestI18n(locale = 'ar', translations?: TranslationMessages): I18nInstance {\n return createI18nInstance(locale, translations);\n}\n","import type { QueryClient } from '@tanstack/react-query';\nimport type { i18n } from 'i18next';\nimport type { StoreContext } from '../api/store';\nimport type { AppSnippet, AppSettings } from '../api/apps';\nimport { FALLBACK_LOCALE, getLanguageInfo } from '../providers/locale-constants';\nimport { createI18nInstance } from '../providers/i18n-factory';\nimport { messagesForLocale } from '../api/messages';\nimport { SettingsError } from '../utils/errors';\nimport type { ActiveScope } from '../utils/cookies';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface TwilightLocation<TSearch = Record<string, unknown>> {\n href: string;\n pathname: string;\n search: TSearch;\n searchStr: string;\n state: Record<string, unknown>;\n hash: string;\n}\n\nexport interface PageContext {\n slug: string;\n id?: string | number;\n title: string;\n url?: string;\n parent?: { id: string | number; name: string; url: string } | null;\n breadcrumbs?: { name: string; url: string }[];\n}\n\nexport interface TwilightContext {\n queryClient: QueryClient;\n settings: StoreContext;\n locale: string;\n routeId: string;\n location: TwilightLocation;\n authToken: string | null;\n /**\n * The selected market and, once bullet delivery confirmed one, its branch\n * allocation — the full object the SDK sends as `s-scope-*` headers. Seeded from\n * the `scope` cookie on the server; see {@link ActiveScope}.\n */\n scope: ActiveScope | null;\n /** `scope.id`, kept for callers that only need the market. */\n scopeId: string | null;\n /**\n * Which store this request is for, when something other than the hostname says\n * so — the `?storeId=` a preview was opened with, or the cookie remembering it.\n *\n * Null on a live storefront, where the hostname is the answer and there is\n * nothing to carry. See {@link resolveRequestStoreId}.\n */\n storeId: string | null;\n /**\n * Which store the first segment of this request's path named, on a host where\n * the store is the root of every URL: `mtgr-alaatr-2` for\n * `https://preview.salla.design/mtgr-alaatr-2/cart`.\n *\n * Null whenever something else named the store, and on every merchant domain.\n * See {@link resolveRequestStoreBase}.\n */\n storeBase: string | null;\n /**\n * Where {@link storeBase} sits in this request's paths: behind the locale on a\n * Salla shared host (`/ar/dev-x/cart`, named by the dispatcher), in front of it\n * everywhere else. See {@link resolveAddressedStore}.\n */\n storeBaseFollowsLocale: boolean;\n /**\n * Which version of the theme's settings this request asked for — the\n * `?versionId=` an editor preview or a local dev session was opened with, or\n * the cookie remembering it.\n *\n * Null on an ordinary storefront visit, which is the common case: nothing\n * named a version, so the store's live one is what the API answers with. See\n * {@link resolveRequestVersionId}.\n */\n versionId: string | null;\n /**\n * The host this request arrived on, captured server-side.\n *\n * A theme worker is deployed with no vars and no bindings, so the request is\n * the only thing that knows which storefront it is serving. On the client this\n * is `window.location.host`; on the server nothing else has it.\n */\n requestHost: string | null;\n /** The native app's `s-app-*` headers when the request came from its webview; see {@link readNativeAppHeaders}. */\n nativeAppHeaders: Record<string, string> | null;\n i18n: i18n;\n dir: 'ltr' | 'rtl';\n page?: PageContext;\n /** Installed apps' snippets, fetched in rootBeforeLoad so AppsSnippets can render CDN\n * <script> tags during SSR (React Query isn't dehydrated here, so useQuery has no SSR data). */\n appsSnippets?: AppSnippet[];\n /** Per-app public `app.*` buckets, fetched in rootBeforeLoad so rootHead can install the\n * `Salla.appScope` factory inline at parse time — ahead of the snippets' onReady callbacks. */\n appsSettings?: AppSettings;\n /**\n * This visitor sees the maintenance page, not the store. Decided in rootBeforeLoad\n * from `settings.maintenance` and the merchant's owner view; see `utils/maintenance`.\n */\n maintenance: boolean;\n /**\n * The Salla API answered that no store has the identifier this request named. Set by\n * rootBeforeLoad; `twilightMiddleware` answers with Twig's 410 page instead of the render.\n */\n storeNotFound: boolean;\n extras?: Record<string, unknown>;\n}\n\n// ============================================================================\n// Internal Store\n// ============================================================================\n\nconst DEFAULT_LOCATION: TwilightLocation = {\n href: '',\n pathname: '',\n search: {},\n searchStr: '',\n state: {},\n hash: '',\n};\n\ninterface ContextData {\n queryClient: QueryClient;\n settings: StoreContext | null;\n locale: string;\n routeId: string;\n location: TwilightLocation;\n authToken: string | null;\n scope: ActiveScope | null;\n storeId: string | null;\n storeBase: string | null;\n storeBaseFollowsLocale: boolean;\n versionId: string | null;\n requestHost: string | null;\n nativeAppHeaders: Record<string, string> | null;\n i18n?: i18n;\n page?: PageContext;\n appsSnippets?: AppSnippet[];\n appsSettings?: AppSettings;\n maintenance: boolean;\n storeNotFound: boolean;\n extras?: Record<string, unknown>;\n}\n\nconst DEFAULT_DATA: ContextData = {\n queryClient: null as unknown as QueryClient,\n settings: null,\n locale: FALLBACK_LOCALE,\n routeId: '',\n location: { ...DEFAULT_LOCATION },\n authToken: null,\n scope: null,\n storeId: null,\n storeBase: null,\n storeBaseFollowsLocale: false,\n versionId: null,\n requestHost: null,\n nativeAppHeaders: null,\n i18n: undefined,\n page: undefined,\n maintenance: false,\n storeNotFound: false,\n};\n\n// ============================================================================\n// Storage: AsyncLocalStorage (server) or module-level store (client)\n// ============================================================================\n\ntype AsyncLocalStore<T> = { getStore(): T | undefined; run(val: T, fn: () => unknown): unknown };\n\n// Initialize ALS at module load time for SSR — no race condition\ntype AsyncHooks = { AsyncLocalStorage: new <T>() => AsyncLocalStore<T> };\n\n// workerd has no global `require`, so a bundled `require()` throws there; it does have\n// `process.getBuiltinModule` (so does Node >= 20.16), which keeps this out of the browser bundle.\nfunction loadAsyncHooks(): AsyncHooks | null {\n const proc = (globalThis as { process?: { getBuiltinModule?: (id: string) => unknown } }).process;\n try {\n const builtin = proc?.getBuiltinModule?.('node:async_hooks') as AsyncHooks | undefined;\n if (builtin?.AsyncLocalStorage) return builtin;\n } catch {\n /* fall through to require */\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n return require('node:async_hooks') as AsyncHooks;\n } catch {\n return null;\n }\n}\n\nconst isServer = typeof window === 'undefined';\n// One instance per isolate, so a re-evaluated or duplicated copy of this module (dev\n// reloads, src next to dist) reads the scope the request middleware opened.\nconst ALS_KEY = Symbol.for('salla.twilight.context.als');\nlet _als: AsyncLocalStore<ContextData> | null = null;\nif (isServer) {\n const registry = globalThis as { [ALS_KEY]?: AsyncLocalStore<ContextData> };\n const hooks = registry[ALS_KEY] ? null : loadAsyncHooks();\n if (hooks) registry[ALS_KEY] = new hooks.AsyncLocalStorage<ContextData>();\n _als = registry[ALS_KEY] ?? null;\n}\n\n// Without request isolation every request would share `clientStore`: one visitor's\n// auth token and store settings rendered into another's page.\nfunction assertRequestIsolation(): void {\n if (isServer && !_als) {\n throw new Error(\n '[Twilight] AsyncLocalStorage is unavailable; refusing to share request state.'\n );\n }\n}\n\n// The browser's store, shared by every copy of this module on the page like the ALS above,\n// so a loader in one copy reads the location and token the router wrote through another.\nconst CLIENT_KEY = Symbol.for('salla.twilight.context.client');\nconst clientRegistry = globalThis as {\n [CLIENT_KEY]?: { store: ContextData; listeners: Set<() => void> };\n};\nconst clientShared = (clientRegistry[CLIENT_KEY] ??= {\n store: { ...DEFAULT_DATA },\n listeners: new Set<() => void>(),\n});\nconst clientStore: ContextData = clientShared.store;\n\nfunction getTwilightStore(): ContextData {\n assertRequestIsolation();\n if (_als) {\n const store = _als.getStore();\n if (!store)\n throw new Error('[Twilight] No request context. Wrap with runWithTwilightContext().');\n return store;\n }\n return clientStore;\n}\n\nfunction writableStore(): ContextData {\n if (_als) {\n const store = _als.getStore();\n if (store) return store;\n }\n return clientStore;\n}\n\nfunction mergeIntoStore(store: ContextData, partial: Partial<TwilightContext>): void {\n if ('queryClient' in partial && partial.queryClient) store.queryClient = partial.queryClient;\n if ('settings' in partial && partial.settings != null) store.settings = partial.settings;\n if ('locale' in partial && partial.locale != null) store.locale = partial.locale;\n if ('routeId' in partial && partial.routeId != null) store.routeId = partial.routeId;\n if ('location' in partial && partial.location != null)\n store.location = { ...store.location, ...partial.location };\n if ('authToken' in partial && partial.authToken !== undefined)\n store.authToken = partial.authToken ?? null;\n if ('scope' in partial && partial.scope !== undefined) store.scope = partial.scope ?? null;\n else if ('scopeId' in partial && partial.scopeId !== undefined)\n store.scope = partial.scopeId == null ? null : { id: partial.scopeId };\n if ('storeId' in partial && partial.storeId !== undefined)\n store.storeId = partial.storeId ?? null;\n if ('storeBase' in partial && partial.storeBase !== undefined)\n store.storeBase = partial.storeBase ?? null;\n if ('storeBaseFollowsLocale' in partial && partial.storeBaseFollowsLocale !== undefined)\n store.storeBaseFollowsLocale = partial.storeBaseFollowsLocale === true;\n if ('versionId' in partial && partial.versionId !== undefined)\n store.versionId = partial.versionId ?? null;\n if ('requestHost' in partial && partial.requestHost !== undefined)\n store.requestHost = partial.requestHost ?? null;\n if ('nativeAppHeaders' in partial && partial.nativeAppHeaders !== undefined)\n store.nativeAppHeaders = partial.nativeAppHeaders ?? null;\n if ('i18n' in partial && partial.i18n != null) store.i18n = partial.i18n;\n if ('page' in partial) store.page = partial.page;\n if ('appsSnippets' in partial) store.appsSnippets = partial.appsSnippets;\n if ('appsSettings' in partial) store.appsSettings = partial.appsSettings;\n if ('maintenance' in partial) store.maintenance = partial.maintenance === true;\n if ('storeNotFound' in partial) store.storeNotFound = partial.storeNotFound === true;\n if ('extras' in partial) store.extras = partial.extras;\n}\n\n// ============================================================================\n// Public API\n// ============================================================================\n\nexport function runWithTwilightContext<T>(partial: Partial<TwilightContext>, fn: () => T): T {\n assertRequestIsolation();\n if (_als) {\n const data: ContextData = { ...DEFAULT_DATA };\n mergeIntoStore(data, partial);\n return _als.run(data, fn) as T;\n }\n mergeIntoStore(clientStore, partial);\n return fn();\n}\n\n// Client-only subscription so React consumers (useRouteId/useIsHome/…) re-render\n// when navigation mutates the module store. Mirrors hooks/useWishlist.ts.\nconst listeners = clientShared.listeners;\n\nexport function subscribeTwilight(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nexport function updateTwilightContext(partial: Partial<TwilightContext>): void {\n mergeIntoStore(getTwilightStore(), partial);\n // Server uses AsyncLocalStorage and has no React subscribers; notify on client only.\n if (typeof window !== 'undefined') {\n for (const listener of listeners) listener();\n }\n}\n\n/**\n * Whether store settings are available, without throwing.\n *\n * `getTwilightContext().settings` throws a `SettingsError` when the store is\n * empty, which is fatal inside a head function during hydration. Callers that\n * need to *test* availability must use this instead of a try/catch around the\n * getter. Returns false when there is no request context at all (server-side\n * calls outside `runWithTwilightContext`).\n */\nexport function hasTwilightSettings(): boolean {\n try {\n return getTwilightStore().settings != null;\n } catch {\n return false;\n }\n}\n\n/** What a request addressed, as opposed to what it is. */\nexport interface RequestAddressing {\n storeId: string | null;\n storeBase: string | null;\n storeBaseFollowsLocale: boolean;\n versionId: string | null;\n requestHost: string | null;\n}\n\n/**\n * What this request named and the host it arrived on, without throwing.\n *\n * Separate from {@link getTwilightContext} because store identity is read while\n * deciding *what to fetch* — before there is a context worth having — and on the\n * server outside a request the getter throws. A caller asking \"which store?\" has\n * a sane answer for \"none named\"; it has none for an exception.\n *\n * The version rides along rather than getting an accessor of its own: it is read\n * at the same moment, for the same reason, and by the same callers, and a second\n * copy of this try/catch would be a second thing to remember to widen.\n */\nexport function getRequestStore(): RequestAddressing {\n try {\n const data = getTwilightStore();\n return {\n storeId: data.storeId,\n storeBase: data.storeBase,\n storeBaseFollowsLocale: data.storeBaseFollowsLocale,\n versionId: data.versionId,\n requestHost: data.requestHost,\n };\n } catch {\n return {\n storeId: null,\n storeBase: null,\n storeBaseFollowsLocale: false,\n versionId: null,\n requestHost: null,\n };\n }\n}\n\nexport function getTwilightContext(): TwilightContext {\n const data = getTwilightStore();\n return {\n get queryClient() {\n return data.queryClient;\n },\n get settings() {\n if (!data.settings) throw new SettingsError();\n return data.settings;\n },\n get locale() {\n return data.locale;\n },\n get routeId() {\n return data.routeId;\n },\n get location() {\n return data.location;\n },\n get authToken() {\n return data.authToken;\n },\n get scope() {\n return data.scope;\n },\n get scopeId() {\n return data.scope?.id ?? null;\n },\n get storeId() {\n return data.storeId;\n },\n get storeBase() {\n return data.storeBase;\n },\n get storeBaseFollowsLocale() {\n return data.storeBaseFollowsLocale;\n },\n get versionId() {\n return data.versionId;\n },\n get requestHost() {\n return data.requestHost;\n },\n get nativeAppHeaders() {\n return data.nativeAppHeaders;\n },\n get i18n() {\n if (!data.i18n) {\n // Composed the same way as `rootBeforeLoad` and the hydration path —\n // the platform's copy with this merchant's over it. See\n // `api/messages.ts`: this accessor reading one entry while the others\n // read two is precisely the drift that module exists to stop.\n data.i18n = createI18nInstance(\n data.locale,\n messagesForLocale(data.queryClient, data.locale)\n );\n }\n return data.i18n;\n },\n get dir() {\n return getLanguageInfo(data.locale).dir;\n },\n get page() {\n return data.page;\n },\n get appsSnippets() {\n return data.appsSnippets;\n },\n get appsSettings() {\n return data.appsSettings;\n },\n get maintenance() {\n return data.maintenance;\n },\n get storeNotFound() {\n return data.storeNotFound;\n },\n get extras() {\n return data.extras;\n },\n };\n}\n\n/** @internal Reset store for testing */\nexport function resetForTesting(): void {\n Object.assign(writableStore(), { ...DEFAULT_DATA });\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/api/translations-key.ts","../src/api/messages.ts","../src/utils/errors.ts","../src/providers/i18n-factory.ts","../src/twilight/context.ts"],"names":[],"mappings":";;;;;;AAwBO,SAAS,qBAAqB,MAAA,EAAkC;AACrE,EAAA,OAAO,CAAC,gBAAgB,MAAM,CAAA;AAChC;AAkBO,SAAS,yBAAA,CACd,SACA,MAAA,EAC0B;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,IAAI,WAAA,GAAc;AAChB,MAAA,OAAO,IAAA,CAAK,WAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,aAAA,GAAgB;AAClB,MAAA,OAAO,IAAA,CAAK,aAAA;AAAA,IACd,CAAA;AAAA,IACA,IAAI,MAAA,GAAS;AACX,MAAA,OAAO,IAAA,CAAK,MAAA;AAAA,IACd;AAAA,GACF;AACF","file":"chunk-6K34BCUP.js","sourcesContent":["/**\n * @fileoverview The translations query key, on its own, importing nothing.\n *\n * Three places read the cached translations — `rootBeforeLoad`, the hydration\n * path in `tanstack/router.tsx`, and the lazy `i18n` accessor in\n * `twilight/context.ts` — and all three have to agree on the key or the\n * hydrated page misses the entry it was just handed and refetches. One\n * definition is the only way to keep that true.\n *\n * It lives here rather than in `api/translations.ts`, where it would naturally\n * sit, because **`twilight/context.ts` cannot afford that module's imports**.\n * `api/translations` pulls in `api/client`, which pulls in `ky`; `context.ts`\n * is imported directly by tests that mock `ky`, and adding that edge made six\n * of them stop being mocked and start issuing real requests to `api.salla.dev`\n * (`tests/routes/rootBeforeLoad.test.ts`, bisected to exactly this import). A\n * leaf module with no imports of its own cannot do that to anyone.\n */\n\n/**\n * @param locale is part of the key because each file on the CDN holds one\n * language. The global file this replaced carried every language and was\n * sliced after the cache, so a key without the locale was correct then and is\n * a wrong-language bug now: `/ar` → `/en` would reuse the Arabic entry.\n */\nexport function translationsQueryKey(locale: string): [string, string] {\n return ['translations', locale];\n}\n\n/**\n * The merchant's own wording for one store and one language.\n *\n * Separate from {@link translationsQueryKey} rather than folded into it,\n * because the two files have different lifetimes and different audiences: the\n * platform's copy is the same object for every store on the CDN, and this one\n * is a single merchant's overrides. Keeping them apart means a store with no\n * overrides never invalidates, refetches or dehydrates anything on its account.\n *\n * @param storeId is `settings.store.id` — the Optimus-encoded numeric id, which\n * is what names the object. It is safe in a key even though the locale-only key\n * deliberately avoids naming a store: that warning is about a store *resolved\n * from the request*, which differs between server and client. This one is read\n * out of the settings payload, so both sides compute it from the same\n * dehydrated data and agree.\n */\nexport function storeTranslationsQueryKey(\n storeId: string | number,\n locale: string\n): [string, string, string] {\n return ['translations', String(storeId), locale];\n}\n","/**\n * @fileoverview Composing one language's messages out of the query cache.\n *\n * **There are three places that build an i18n instance**, and they have to\n * agree on more than the key: `rootBeforeLoad`, the hydration path in\n * `tanstack/router.tsx`, and the lazy `i18n` accessor in `twilight/context.ts`.\n * When the platform's copy was the only source, agreeing on\n * `translationsQueryKey` was enough. It is not any more — a merchant's own\n * wording is a second cache entry, and a reader that knows about one and not\n * the other renders different text from the page beside it.\n *\n * That is exactly what shipped in #366: the server rendered the merchant's\n * words and hydration replaced them with the platform's, because only\n * `rootBeforeLoad` had been taught to merge. Greptile caught it. This module is\n * the single answer to \"what are the messages for this locale\", so the next\n * source cannot be added to one reader and forgotten in two.\n *\n * It lives beside `translations-key.ts` and imports nothing at runtime for the\n * same reason that file does: `twilight/context.ts` cannot afford\n * `api/translations`, which pulls in `api/client` and therefore `ky`, and tests\n * that mock `ky` stop being mocked the moment that edge exists.\n */\nimport type { QueryClient } from '@tanstack/react-query';\nimport { translationsQueryKey } from './translations-key';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\nexport type Messages = Record<string, unknown>;\n\nexport function isPlainObject(value: unknown): value is Messages {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * `overrides` laid over `base`, one leaf at a time.\n *\n * Recursive rather than a spread, because both files are nested by group\n * (`common.errors.500`) and a top-level spread would make a merchant who\n * overrode one string inside `common` lose every other string in it. The\n * merchant's value wins at the leaf, and a group they never touched is left\n * exactly as the platform sent it.\n *\n * A type conflict — one side an object where the other is a string — resolves\n * to the merchant's value. It is the more specific of the two and there is no\n * sensible way to merge a string into a group; the alternative, keeping the\n * platform's, would mean a merchant's edit silently doing nothing.\n */\nexport function mergeMessages(base: Messages, overrides: Messages): Messages {\n const merged: Messages = { ...base };\n\n for (const [key, value] of Object.entries(overrides)) {\n const existing = merged[key];\n merged[key] =\n isPlainObject(existing) && isPlainObject(value) ? mergeMessages(existing, value) : value;\n }\n\n return merged;\n}\n\n/**\n * This store's overrides for `locale`, if any were fetched into the cache.\n *\n * Found by **shape** rather than by asking the settings for a store id, and\n * that is deliberate: the two readers that were missing the merge have a\n * `queryClient` and a locale between them and nothing else, and reaching for\n * `api/store` from `twilight/context.ts` would drag `ky` in through the back\n * door. One document serves one store — a request naming a different one is\n * redirected with `reloadDocument` — so at most one such entry per locale\n * exists, and matching `['translations', <anything>, <locale>]` cannot pick up\n * somebody else's.\n */\nfunction cachedOverrides(queryClient: QueryClient, locale: string): Messages | undefined {\n const entries = queryClient.getQueriesData<Messages>({ queryKey: ['translations'] });\n\n for (const [key, data] of entries) {\n if (key.length === 3 && key[2] === locale && isPlainObject(data)) {\n return data;\n }\n }\n\n return undefined;\n}\n\n/**\n * The messages for `locale`: the platform's copy with this merchant's over it.\n *\n * Reads only — whoever wants the merchant's file in the cache has to have put\n * it there, which `rootBeforeLoad` does and only when the settings say there is\n * one. A reader that runs without it simply gets the platform's copy, which is\n * the same thing it got before any of this existed.\n */\nexport function messagesForLocale(\n queryClient: QueryClient | undefined,\n locale: string\n): TranslationMessages | undefined {\n const common = queryClient?.getQueryData<TranslationMessages>(translationsQueryKey(locale));\n const overrides = queryClient ? cachedOverrides(queryClient, locale) : undefined;\n\n return composeMessages(common, overrides, locale);\n}\n\n/**\n * The same composition from values rather than from the cache.\n *\n * `rootBeforeLoad` has both in hand already — it just awaited them — so it\n * composes directly instead of reading back what it put in.\n */\nexport function composeMessages(\n common: TranslationMessages | null | undefined,\n overrides: Messages | null | undefined,\n locale: string\n): TranslationMessages | undefined {\n if (!overrides || Object.keys(overrides).length === 0) return common ?? undefined;\n\n const base = common?.[`${locale}.trans`];\n\n return {\n [`${locale}.trans`]: mergeMessages(isPlainObject(base) ? base : {}, overrides) as Record<\n string,\n string\n >,\n };\n}\n","/**\n * Why a store's settings did not load:\n * - `no-store`: nothing named a store for this request;\n * - `timeout`: the Salla API did not answer in time;\n * - `not-found`: it answered that no store has that identifier;\n * - `http`: it answered with another error status;\n * - `network`: no answer arrived at all;\n * - `empty`: it answered without settings.\n */\nexport type SettingsErrorReason =\n 'no-store' | 'timeout' | 'not-found' | 'http' | 'network' | 'empty';\n\nexport interface SettingsErrorDetails {\n reason?: SettingsErrorReason;\n /** The API's status, when `reason` is `'http'` or `'not-found'`. */\n status?: number;\n}\n\nexport class SettingsError extends Error {\n /** Absent when nothing said why, e.g. `getTwilightContext().settings` read before they loaded. */\n readonly reason?: SettingsErrorReason;\n readonly status?: number;\n\n constructor(message?: string, details?: SettingsErrorDetails) {\n super(message ?? 'Store settings could not be loaded.');\n this.name = 'SettingsError';\n this.reason = details?.reason;\n this.status = details?.status;\n }\n}\n","import { createInstance, type i18n as I18nInstance } from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nexport type TranslationMessages = Record<string, Record<string, string>>;\n\n/**\n * Creates a new i18next instance for the given locale.\n *\n * @param locale - Active locale code, e.g. `'ar'`\n * @param translations - App translations from the Salla API (store-specific)\n * @param themeTranslations - Bundled theme translations (static defaults)\n */\nexport function createI18nInstance(\n locale: string,\n translations?: TranslationMessages,\n themeTranslations?: TranslationMessages\n): I18nInstance {\n const instance = createInstance();\n const transKey = `${locale}.trans`;\n\n instance.use(initReactI18next).init({\n lng: locale,\n fallbackLng: locale,\n ns: ['app', 'theme'],\n defaultNS: 'app',\n fallbackNS: 'theme',\n resources: {\n [locale]: {\n app: translations?.[transKey] ?? {},\n theme: themeTranslations?.[transKey] ?? {},\n },\n },\n interpolation: { escapeValue: false },\n react: { useSuspense: false },\n keySeparator: '.',\n nsSeparator: false,\n });\n\n return instance;\n}\n\n/**\n * Creates i18n instance for testing\n * @param locale - Locale code (default: 'ar')\n * @param translations - Optional translations\n */\nexport function createTestI18n(locale = 'ar', translations?: TranslationMessages): I18nInstance {\n return createI18nInstance(locale, translations);\n}\n","import type { QueryClient } from '@tanstack/react-query';\nimport type { i18n } from 'i18next';\nimport type { StoreContext } from '../api/store';\nimport type { AppSnippet, AppSettings } from '../api/apps';\nimport { FALLBACK_LOCALE, getLanguageInfo } from '../providers/locale-constants';\nimport { createI18nInstance } from '../providers/i18n-factory';\nimport { messagesForLocale } from '../api/messages';\nimport { SettingsError } from '../utils/errors';\nimport type { ActiveScope } from '../utils/cookies';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface TwilightLocation<TSearch = Record<string, unknown>> {\n href: string;\n pathname: string;\n search: TSearch;\n searchStr: string;\n state: Record<string, unknown>;\n hash: string;\n}\n\nexport interface PageContext {\n slug: string;\n id?: string | number;\n title: string;\n url?: string;\n parent?: { id: string | number; name: string; url: string } | null;\n breadcrumbs?: { name: string; url: string }[];\n}\n\nexport interface TwilightContext {\n queryClient: QueryClient;\n settings: StoreContext;\n locale: string;\n routeId: string;\n location: TwilightLocation;\n authToken: string | null;\n /**\n * The selected market and, once bullet delivery confirmed one, its branch\n * allocation — the full object the SDK sends as `s-scope-*` headers. Seeded from\n * the `scope` cookie on the server; see {@link ActiveScope}.\n */\n scope: ActiveScope | null;\n /** `scope.id`, kept for callers that only need the market. */\n scopeId: string | null;\n /**\n * Which store this request is for, when something other than the hostname says\n * so — the `?storeId=` a preview was opened with, or the cookie remembering it.\n *\n * Null on a live storefront, where the hostname is the answer and there is\n * nothing to carry. See {@link resolveRequestStoreId}.\n */\n storeId: string | null;\n /**\n * Which store the first segment of this request's path named, on a host where\n * the store is the root of every URL: `mtgr-alaatr-2` for\n * `https://preview.salla.design/mtgr-alaatr-2/cart`.\n *\n * Null whenever something else named the store, and on every merchant domain.\n * See {@link resolveRequestStoreBase}.\n */\n storeBase: string | null;\n /**\n * Where {@link storeBase} sits in this request's paths: behind the locale on a\n * Salla shared host (`/ar/dev-x/cart`, named by the dispatcher), in front of it\n * everywhere else. See {@link resolveAddressedStore}.\n */\n storeBaseFollowsLocale: boolean;\n /**\n * Which version of the theme's settings this request asked for — the\n * `?versionId=` an editor preview or a local dev session was opened with, or\n * the cookie remembering it.\n *\n * Null on an ordinary storefront visit, which is the common case: nothing\n * named a version, so the store's live one is what the API answers with. See\n * {@link resolveRequestVersionId}.\n */\n versionId: string | null;\n /**\n * The host this request arrived on, captured server-side.\n *\n * A theme worker is deployed with no vars and no bindings, so the request is\n * the only thing that knows which storefront it is serving. Null in the browser,\n * where nothing sets it: read {@link currentHost}, which falls back to\n * `window.location.host`, rather than this.\n */\n requestHost: string | null;\n /** The native app's `s-app-*` headers when the request came from its webview; see {@link readNativeAppHeaders}. */\n nativeAppHeaders: Record<string, string> | null;\n i18n: i18n;\n dir: 'ltr' | 'rtl';\n page?: PageContext;\n /** Installed apps' snippets, fetched in rootBeforeLoad so AppsSnippets can render CDN\n * <script> tags during SSR (React Query isn't dehydrated here, so useQuery has no SSR data). */\n appsSnippets?: AppSnippet[];\n /** Per-app public `app.*` buckets, fetched in rootBeforeLoad so rootHead can install the\n * `Salla.appScope` factory inline at parse time — ahead of the snippets' onReady callbacks. */\n appsSettings?: AppSettings;\n /**\n * This visitor sees the maintenance page, not the store. Decided in rootBeforeLoad\n * from `settings.maintenance` and the merchant's owner view; see `utils/maintenance`.\n */\n maintenance: boolean;\n /**\n * The Salla API answered that no store has the identifier this request named. Set by\n * rootBeforeLoad; `twilightMiddleware` answers with Twig's 410 page instead of the render.\n */\n storeNotFound: boolean;\n extras?: Record<string, unknown>;\n}\n\n// ============================================================================\n// Internal Store\n// ============================================================================\n\nconst DEFAULT_LOCATION: TwilightLocation = {\n href: '',\n pathname: '',\n search: {},\n searchStr: '',\n state: {},\n hash: '',\n};\n\ninterface ContextData {\n queryClient: QueryClient;\n settings: StoreContext | null;\n locale: string;\n routeId: string;\n location: TwilightLocation;\n authToken: string | null;\n scope: ActiveScope | null;\n storeId: string | null;\n storeBase: string | null;\n storeBaseFollowsLocale: boolean;\n versionId: string | null;\n requestHost: string | null;\n nativeAppHeaders: Record<string, string> | null;\n i18n?: i18n;\n page?: PageContext;\n appsSnippets?: AppSnippet[];\n appsSettings?: AppSettings;\n maintenance: boolean;\n storeNotFound: boolean;\n extras?: Record<string, unknown>;\n}\n\nconst DEFAULT_DATA: ContextData = {\n queryClient: null as unknown as QueryClient,\n settings: null,\n locale: FALLBACK_LOCALE,\n routeId: '',\n location: { ...DEFAULT_LOCATION },\n authToken: null,\n scope: null,\n storeId: null,\n storeBase: null,\n storeBaseFollowsLocale: false,\n versionId: null,\n requestHost: null,\n nativeAppHeaders: null,\n i18n: undefined,\n page: undefined,\n maintenance: false,\n storeNotFound: false,\n};\n\n// ============================================================================\n// Storage: AsyncLocalStorage (server) or module-level store (client)\n// ============================================================================\n\ntype AsyncLocalStore<T> = { getStore(): T | undefined; run(val: T, fn: () => unknown): unknown };\n\n// Initialize ALS at module load time for SSR — no race condition\ntype AsyncHooks = { AsyncLocalStorage: new <T>() => AsyncLocalStore<T> };\n\n// workerd has no global `require`, so a bundled `require()` throws there; it does have\n// `process.getBuiltinModule` (so does Node >= 20.16), which keeps this out of the browser bundle.\nfunction loadAsyncHooks(): AsyncHooks | null {\n const proc = (globalThis as { process?: { getBuiltinModule?: (id: string) => unknown } }).process;\n try {\n const builtin = proc?.getBuiltinModule?.('node:async_hooks') as AsyncHooks | undefined;\n if (builtin?.AsyncLocalStorage) return builtin;\n } catch {\n /* fall through to require */\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n return require('node:async_hooks') as AsyncHooks;\n } catch {\n return null;\n }\n}\n\nconst isServer = typeof window === 'undefined';\n// One instance per isolate, so a re-evaluated or duplicated copy of this module (dev\n// reloads, src next to dist) reads the scope the request middleware opened.\nconst ALS_KEY = Symbol.for('salla.twilight.context.als');\nlet _als: AsyncLocalStore<ContextData> | null = null;\nif (isServer) {\n const registry = globalThis as { [ALS_KEY]?: AsyncLocalStore<ContextData> };\n const hooks = registry[ALS_KEY] ? null : loadAsyncHooks();\n if (hooks) registry[ALS_KEY] = new hooks.AsyncLocalStorage<ContextData>();\n _als = registry[ALS_KEY] ?? null;\n}\n\n// Without request isolation every request would share `clientStore`: one visitor's\n// auth token and store settings rendered into another's page.\nfunction assertRequestIsolation(): void {\n if (isServer && !_als) {\n throw new Error(\n '[Twilight] AsyncLocalStorage is unavailable; refusing to share request state.'\n );\n }\n}\n\n// The browser's store, shared by every copy of this module on the page like the ALS above,\n// so a loader in one copy reads the location and token the router wrote through another.\nconst CLIENT_KEY = Symbol.for('salla.twilight.context.client');\nconst clientRegistry = globalThis as {\n [CLIENT_KEY]?: { store: ContextData; listeners: Set<() => void> };\n};\nconst clientShared = (clientRegistry[CLIENT_KEY] ??= {\n store: { ...DEFAULT_DATA },\n listeners: new Set<() => void>(),\n});\nconst clientStore: ContextData = clientShared.store;\n\nfunction getTwilightStore(): ContextData {\n assertRequestIsolation();\n if (_als) {\n const store = _als.getStore();\n if (!store)\n throw new Error('[Twilight] No request context. Wrap with runWithTwilightContext().');\n return store;\n }\n return clientStore;\n}\n\nfunction writableStore(): ContextData {\n if (_als) {\n const store = _als.getStore();\n if (store) return store;\n }\n return clientStore;\n}\n\nfunction mergeIntoStore(store: ContextData, partial: Partial<TwilightContext>): void {\n if ('queryClient' in partial && partial.queryClient) store.queryClient = partial.queryClient;\n if ('settings' in partial && partial.settings != null) store.settings = partial.settings;\n if ('locale' in partial && partial.locale != null) store.locale = partial.locale;\n if ('routeId' in partial && partial.routeId != null) store.routeId = partial.routeId;\n if ('location' in partial && partial.location != null)\n store.location = { ...store.location, ...partial.location };\n if ('authToken' in partial && partial.authToken !== undefined)\n store.authToken = partial.authToken ?? null;\n if ('scope' in partial && partial.scope !== undefined) store.scope = partial.scope ?? null;\n else if ('scopeId' in partial && partial.scopeId !== undefined)\n store.scope = partial.scopeId == null ? null : { id: partial.scopeId };\n if ('storeId' in partial && partial.storeId !== undefined)\n store.storeId = partial.storeId ?? null;\n if ('storeBase' in partial && partial.storeBase !== undefined)\n store.storeBase = partial.storeBase ?? null;\n if ('storeBaseFollowsLocale' in partial && partial.storeBaseFollowsLocale !== undefined)\n store.storeBaseFollowsLocale = partial.storeBaseFollowsLocale === true;\n if ('versionId' in partial && partial.versionId !== undefined)\n store.versionId = partial.versionId ?? null;\n if ('requestHost' in partial && partial.requestHost !== undefined)\n store.requestHost = partial.requestHost ?? null;\n if ('nativeAppHeaders' in partial && partial.nativeAppHeaders !== undefined)\n store.nativeAppHeaders = partial.nativeAppHeaders ?? null;\n if ('i18n' in partial && partial.i18n != null) store.i18n = partial.i18n;\n if ('page' in partial) store.page = partial.page;\n if ('appsSnippets' in partial) store.appsSnippets = partial.appsSnippets;\n if ('appsSettings' in partial) store.appsSettings = partial.appsSettings;\n if ('maintenance' in partial) store.maintenance = partial.maintenance === true;\n if ('storeNotFound' in partial) store.storeNotFound = partial.storeNotFound === true;\n if ('extras' in partial) store.extras = partial.extras;\n}\n\n// ============================================================================\n// Public API\n// ============================================================================\n\nexport function runWithTwilightContext<T>(partial: Partial<TwilightContext>, fn: () => T): T {\n assertRequestIsolation();\n if (_als) {\n const data: ContextData = { ...DEFAULT_DATA };\n mergeIntoStore(data, partial);\n return _als.run(data, fn) as T;\n }\n mergeIntoStore(clientStore, partial);\n return fn();\n}\n\n// Client-only subscription so React consumers (useRouteId/useIsHome/…) re-render\n// when navigation mutates the module store. Mirrors hooks/useWishlist.ts.\nconst listeners = clientShared.listeners;\n\nexport function subscribeTwilight(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nexport function updateTwilightContext(partial: Partial<TwilightContext>): void {\n mergeIntoStore(getTwilightStore(), partial);\n // Server uses AsyncLocalStorage and has no React subscribers; notify on client only.\n if (typeof window !== 'undefined') {\n for (const listener of listeners) listener();\n }\n}\n\n/**\n * Whether store settings are available, without throwing.\n *\n * `getTwilightContext().settings` throws a `SettingsError` when the store is\n * empty, which is fatal inside a head function during hydration. Callers that\n * need to *test* availability must use this instead of a try/catch around the\n * getter. Returns false when there is no request context at all (server-side\n * calls outside `runWithTwilightContext`).\n */\nexport function hasTwilightSettings(): boolean {\n try {\n return getTwilightStore().settings != null;\n } catch {\n return false;\n }\n}\n\n/** What a request addressed, as opposed to what it is. */\nexport interface RequestAddressing {\n storeId: string | null;\n storeBase: string | null;\n storeBaseFollowsLocale: boolean;\n versionId: string | null;\n requestHost: string | null;\n}\n\n/**\n * What this request named and the host it arrived on, without throwing.\n *\n * Separate from {@link getTwilightContext} because store identity is read while\n * deciding *what to fetch* — before there is a context worth having — and on the\n * server outside a request the getter throws. A caller asking \"which store?\" has\n * a sane answer for \"none named\"; it has none for an exception.\n *\n * The version rides along rather than getting an accessor of its own: it is read\n * at the same moment, for the same reason, and by the same callers, and a second\n * copy of this try/catch would be a second thing to remember to widen.\n */\nexport function getRequestStore(): RequestAddressing {\n try {\n const data = getTwilightStore();\n return {\n storeId: data.storeId,\n storeBase: data.storeBase,\n storeBaseFollowsLocale: data.storeBaseFollowsLocale,\n versionId: data.versionId,\n requestHost: data.requestHost,\n };\n } catch {\n return {\n storeId: null,\n storeBase: null,\n storeBaseFollowsLocale: false,\n versionId: null,\n requestHost: null,\n };\n }\n}\n\nexport function getTwilightContext(): TwilightContext {\n const data = getTwilightStore();\n return {\n get queryClient() {\n return data.queryClient;\n },\n get settings() {\n if (!data.settings) throw new SettingsError();\n return data.settings;\n },\n get locale() {\n return data.locale;\n },\n get routeId() {\n return data.routeId;\n },\n get location() {\n return data.location;\n },\n get authToken() {\n return data.authToken;\n },\n get scope() {\n return data.scope;\n },\n get scopeId() {\n return data.scope?.id ?? null;\n },\n get storeId() {\n return data.storeId;\n },\n get storeBase() {\n return data.storeBase;\n },\n get storeBaseFollowsLocale() {\n return data.storeBaseFollowsLocale;\n },\n get versionId() {\n return data.versionId;\n },\n get requestHost() {\n return data.requestHost;\n },\n get nativeAppHeaders() {\n return data.nativeAppHeaders;\n },\n get i18n() {\n if (!data.i18n) {\n // Composed the same way as `rootBeforeLoad` and the hydration path —\n // the platform's copy with this merchant's over it. See\n // `api/messages.ts`: this accessor reading one entry while the others\n // read two is precisely the drift that module exists to stop.\n data.i18n = createI18nInstance(\n data.locale,\n messagesForLocale(data.queryClient, data.locale)\n );\n }\n return data.i18n;\n },\n get dir() {\n return getLanguageInfo(data.locale).dir;\n },\n get page() {\n return data.page;\n },\n get appsSnippets() {\n return data.appsSnippets;\n },\n get appsSettings() {\n return data.appsSettings;\n },\n get maintenance() {\n return data.maintenance;\n },\n get storeNotFound() {\n return data.storeNotFound;\n },\n get extras() {\n return data.extras;\n },\n };\n}\n\n/** @internal Reset store for testing */\nexport function resetForTesting(): void {\n Object.assign(writableStore(), { ...DEFAULT_DATA });\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { rememberProductPreview } from './chunk-
|
|
2
|
-
import { getActiveScope, api } from './chunk-
|
|
1
|
+
import { rememberProductPreview } from './chunk-DRDQQNIW.js';
|
|
2
|
+
import { getActiveScope, api } from './chunk-5RWIVHYS.js';
|
|
3
3
|
import { queryOptions } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
5
|
var wishlist = {
|
|
@@ -31,5 +31,5 @@ var wishlist = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export { wishlist };
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-6PMG5J4Z.js.map
|
|
35
|
+
//# sourceMappingURL=chunk-6PMG5J4Z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/wishlist.ts"],"names":[],"mappings":";;;;AAmBO,IAAM,QAAA,GAAW;AAAA,EACtB,IAAA,EAAM,OAAO,MAAA,GAA6B,EAAC,KAAmC;AAC5E,IAAA,MAAM,EAAE,IAAA,GAAO,CAAA,EAAG,UAAU,EAAA,EAAI,UAAA,EAAY,QAAO,GAAI,MAAA;AAEvD,IAAA,MAAM,YAAA,GAAe,IAAI,eAAA,EAAgB;AACzC,IAAA,YAAA,CAAa,GAAA,CAAI,UAAU,UAAU,CAAA;AACrC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AE,MAAA,EAAO,KAAM,QAAA,CAAS,IAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,MAAA,EAAQ;AAAA,KAC7D;AAAA;AAEP","file":"chunk-6PMG5J4Z.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport {\n rememberProductPreview,\n type ProductsListResult,\n type ProductsListResponse,\n} from './product';\n\nexport interface WishlistListParams {\n page?: number;\n perPage?: number;\n filterable?: boolean;\n signal?: AbortSignal;\n}\n\n/**\n * Wishlist API — page-based pagination only.\n * Kept separate from product.list to avoid mixing cursor and page pagination strategies.\n */\nexport const wishlist = {\n list: async (params: WishlistListParams = {}): Promise<ProductsListResult> => {\n const { page = 1, perPage = 15, filterable, signal } = params;\n\n const searchParams = new URLSearchParams();\n searchParams.set('source', 'wishlist');\n searchParams.set('page', String(page));\n searchParams.set('per_page', String(perPage));\n\n if (filterable !== undefined) {\n searchParams.set('filterable', filterable ? '1' : '0');\n }\n\n const options: Record<string, unknown> = {};\n if (signal) options.signal = signal;\n\n const response = await api\n .get(`products?${searchParams.toString()}`, options as any)\n .json<ProductsListResponse>();\n\n const items = response.data ?? [];\n for (const item of items) rememberProductPreview(item);\n\n return {\n items,\n next: response.cursor?.next ?? null,\n };\n },\n\n queries: {\n list: (params: Omit<WishlistListParams, 'signal'>) =>\n queryOptions({\n queryKey: ['wishlist', 'list', params, { scope: getActiveScope() }],\n queryFn: ({ signal }) => wishlist.list({ ...params, signal }),\n }),\n },\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { api } from './chunk-
|
|
1
|
+
import { api } from './chunk-5RWIVHYS.js';
|
|
2
2
|
import { queryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
var user = {
|
|
@@ -19,5 +19,5 @@ var user = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { user };
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-6S43HHJM.js.map
|
|
23
|
+
//# sourceMappingURL=chunk-6S43HHJM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/user.ts"],"names":[],"mappings":";;;AAIO,IAAM,IAAA,GAAO;AAAA,EAClB,KAAK,YAAkC;AACrC,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,GAAA,CACV,GAAA,CAAI,WAAW,CAAA,CACf,MAAmC,CACnC,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,GAAG,CAAA,CAAE,IAAA,EAAM,IAAA,EAAM,QAAgB,CAAE,CAAA;AAAA,IACvD,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,sBAAsB,KAAK,CAAA;AACzC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,OAAA,EAAS,MACP,YAAA,CAA0B;AAAA,MACxB,QAAA,EAAU,CAAC,MAAA,EAAQ,SAAS,CAAA;AAAA,MAC5B,SAAS,IAAA,CAAK;AAAA,KACf;AAAA;AAEP","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/api/user.ts"],"names":[],"mappings":";;;AAIO,IAAM,IAAA,GAAO;AAAA,EAClB,KAAK,YAAkC;AACrC,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,GAAA,CACV,GAAA,CAAI,WAAW,CAAA,CACf,MAAmC,CACnC,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,GAAG,CAAA,CAAE,IAAA,EAAM,IAAA,EAAM,QAAgB,CAAE,CAAA;AAAA,IACvD,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,sBAAsB,KAAK,CAAA;AACzC,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF,CAAA;AAAA,EAEA,OAAA,EAAS;AAAA,IACP,OAAA,EAAS,MACP,YAAA,CAA0B;AAAA,MACxB,QAAA,EAAU,CAAC,MAAA,EAAQ,SAAS,CAAA;AAAA,MAC5B,SAAS,IAAA,CAAK;AAAA,KACf;AAAA;AAEP","file":"chunk-6S43HHJM.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api } from './client';\nimport type { User } from '../types';\n\nexport const user = {\n get: async (): Promise<User | null> => {\n try {\n return await api\n .get('auth/user')\n .json<{ data: Omit<User, 'type'> }>()\n .then((r) => ({ ...r.data, type: 'user' as const }));\n } catch (error) {\n console.debug('[user.get] Failed:', error);\n return null;\n }\n },\n\n queries: {\n current: () =>\n queryOptions<User | null>({\n queryKey: ['user', 'current'],\n queryFn: user.get,\n }),\n },\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDate } from './chunk-
|
|
1
|
+
import { useDate } from './chunk-WVQBEAYO.js';
|
|
2
2
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
3
|
-
import { Image } from './chunk-
|
|
3
|
+
import { Image } from './chunk-DRX6L472.js';
|
|
4
4
|
import { Link } from './chunk-AXW67SY7.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -61,5 +61,5 @@ function BlogListLayout({
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export { BlogArticleCard, BlogListLayout };
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-BQ5SELOL.js.map
|
|
65
|
+
//# sourceMappingURL=chunk-BQ5SELOL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/blog/components.tsx"],"names":[],"mappings":";;;;;;AAMO,SAAS,qBAAA,CAAsB,EAAE,UAAA,EAAW,EAAmC;AACpF,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAE7B,EAAA,IAAI,CAAC,UAAA,CAAW,MAAA,EAAQ,OAA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AAU,oEAAA,EACZ,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,OAAA,CAAQ,GAAA,EAAM,QAAA,EAAA,OAAA,CAAQ,IAAA,EAAK,CAAA,EACvC,CAAA;AAAA,sBACA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,wCAAA,EAA0C,kBAAQ,WAAA,EAAY;AAAA,KAAA,EAC7E;AAAA,GAAA,EACF,CAAA;AAEJ;AAEO,SAAS,cAAA,CAAe;AAAA,EAC7B,UAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uCAAA,EACb,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,yBAAsB,UAAA,EAAwB,CAAA;AAAA,oBAC/C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,4BAAA,EAA8B,QAAA,EAAS;AAAA,GAAA,EACxD,CAAA;AAEJ","file":"chunk-BQ5SELOL.js","sourcesContent":["import type { ReactNode } from 'react';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { useDate } from '../../hooks';\nimport { Image, Link } from '../../components/common';\nimport type { BlogCategory, ArticleSummary } from './types';\n\nexport function BlogCategoriesSidebar({ categories }: { categories: BlogCategory[] }) {\n const { t } = useTranslation();\n\n if (!categories.length) return null;\n\n return (\n <nav aria-label=\"Sidebar\" className=\"hidden lg:block lg:sticky shrink-0 top-24 col-span-2\">\n <h2 className=\"font-bold mb-3\">{t('pages.blog_categories.categories')}</h2>\n <ul>\n {categories.map((category) => (\n <li key={category.id} className={category.is_current ? 'text-primary' : ''}>\n <Link className=\"py-3 block text-sm hover:text-primary\" to={category.url}>\n {category.name}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\nexport function BlogArticleCard({\n article,\n showAuthor = false,\n}: {\n article: ArticleSummary;\n showAuthor?: boolean;\n}) {\n const { format: formatDate } = useDate();\n\n return (\n <div className=\"list-block post-entry relative h-full transition-shadow duration-500 bg-white hover:shadow-default rounded-lg justify-around overflow-hidden flex flex-col\">\n <Link\n to={article.url}\n className=\"post-entry__image relative overflow-hidden hover:opacity-90 w-full h-56 bg-border-color flex items-center justify-center\"\n >\n {article.image && (\n <Image\n className=\"h-full w-full object-cover\"\n src={article.image}\n alt={article.name}\n aspectRatio=\"16/9\"\n />\n )}\n </Link>\n <div className=\"flex-1 px-5 pt-5 pb-7\">\n <div className=\"mb-2.5 text-gray-500 rounded-md inline-flex text-sm rtl:space-x-reverse space-x-5\">\n <div className=\"flex items-center\">\n <i className=\"sicon-calendar-date rtl:ml-1 ltr:mr-1\"></i>\n <span>{formatDate(article.created_at)}</span>\n </div>\n {showAuthor && article.author && (\n <Link to={article.author.url} className=\"flex items-center hover:text-dark\">\n <i className=\"sicon-user rtl:ml-1 ltr:mr-1\"></i>\n <span>{article.author.name}</span>\n </Link>\n )}\n </div>\n <h3 className=\"post-entry__title text-sm font-bold text-gray-800 leading-6 mb-2.5\">\n <Link to={article.url}>{article.name}</Link>\n </h3>\n <p className=\"text-sm text-gray-500 leading-6 mb-2.5\">{article.description}</p>\n </div>\n </div>\n );\n}\n\nexport function BlogListLayout({\n categories,\n children,\n}: {\n categories: BlogCategory[];\n children: ReactNode;\n}) {\n return (\n <div className=\"grid grid-cols-1 lg:grid-cols-8 gap-8\">\n <BlogCategoriesSidebar categories={categories} />\n <div className=\"main-content lg:col-span-6\">{children}</div>\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
2
|
-
import { getTwilightContext } from './chunk-
|
|
2
|
+
import { getTwilightContext } from './chunk-6K34BCUP.js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var THUMB_URL = "https://cdn.assets.salla.network/prod/stores/images/construction-01.png";
|
|
@@ -168,5 +168,5 @@ function MaintenancePage() {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
export { MaintenancePage };
|
|
171
|
-
//# sourceMappingURL=chunk-
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
171
|
+
//# sourceMappingURL=chunk-CZ6VJPCG.js.map
|
|
172
|
+
//# sourceMappingURL=chunk-CZ6VJPCG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/store/MaintenancePage.tsx"],"names":[],"mappings":";;;;AAIA,IAAM,SAAA,GAAY,yEAAA;AAClB,IAAM,mBAAA,GACJ,4EAAA;AAGF,IAAM,YAAA,GAA8C;AAAA,EAClD,CAAC,WAAW,SAAS,CAAA;AAAA,EACrB,CAAC,YAAY,gBAAgB,CAAA;AAAA,EAC7B,CAAC,WAAW,eAAe,CAAA;AAAA,EAC3B,CAAC,UAAU,cAAc,CAAA;AAAA,EACzB,CAAC,YAAY,gBAAgB,CAAA;AAAA,EAC7B,CAAC,aAAa,iBAAiB;AACjC,CAAA;AAGA,SAAS,YAAY,KAAA,EAA0B;AAC7C,EAAA,OAAO,aAAa,OAAA,CAAQ,CAAC,CAAC,GAAA,EAAK,IAAI,CAAA,KAAM;AAC3C,IAAA,MAAM,IAAA,GAAO,KAAA,EAAO,MAAA,GAAS,GAAG,CAAA;AAChC,IAAA,OAAO,IAAA,GAAO,CAAC,EAAE,GAAA,EAAK,MAAM,IAAA,EAAM,IAAI,EAAC;AAAA,EACzC,CAAC,CAAA;AACH;AAUA,IAAM,KAAA,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAiCd,SAAS,QAAA,CAAS,EAAE,KAAA,EAAO,MAAA,EAAO,EAAkD;AAClF,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,E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AC,SAAI,GAAA,EAAK,SAAA,EAAW,GAAA,EAAI,EAAA,EAAG,CAAA,EAC9B;AAAA,KAAA,EACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"chunk-CKH6WBMA.js","sourcesContent":["import { getTwilightContext } from '../../twilight/context';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport type { Store, StoreSocial } from '../../types';\n\nconst THUMB_URL = 'https://cdn.assets.salla.network/prod/stores/images/construction-01.png';\nconst LAUNCHING_THUMB_URL =\n 'https://cdn.assets.salla.network/prod/stores/images/under-construction.png';\n\n/** Social networks the page links to, in the old page's order, with their Salla icon class. */\nconst SOCIAL_ICONS: [keyof StoreSocial, string][] = [\n ['twitter', 'sicon-x'],\n ['snapchat', 'sicon-snapchat'],\n ['youtube', 'sicon-youtube'],\n ['tiktok', 'sicon-tiktok'],\n ['facebook', 'sicon-facebook'],\n ['instagram', 'sicon-instagram'],\n];\n\n/** The store's social links the page shows, each with its icon class. */\nfunction socialLinks(store: Store | undefined) {\n return SOCIAL_ICONS.flatMap(([key, icon]) => {\n const href = store?.social?.[key];\n return href ? [{ key, icon, href }] : [];\n });\n}\n\n// The platform's maintenance page (Store `pages/maintenance.blade.php` + `_maintenance.scss`),\n// trimmed to what it renders: greyscale, logo + title beside the message, contacts under a\n// rule, the illustration alongside; stacked and centred under 1024px.\n//\n// The page is its own scroll container, the viewport tall, because app-shell themes lock\n// `html, body { overflow: hidden }` and scroll only their main element, which this page\n// replaces. Centring is by auto margins, not `justify-content`, so content taller than the\n// viewport starts at the top instead of being clipped at both ends.\nconst STYLE = `\n.s-maintenance{display:flex;flex-direction:column;align-items:center;width:100%;height:100vh;height:100dvh;overflow-y:auto;color:#a3a3a3;background:#fff;filter:grayscale(100%);box-sizing:border-box}\n.s-maintenance *{box-sizing:border-box}\n.s-maintenance .mt-container{width:100%;max-width:1200px;margin:auto 0;padding:0 15px}\n.s-maintenance .mt-panel{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}\n.s-maintenance .mt-message{width:100%;padding-inline-start:80px;animation:revealMtBlock 1.5s forwards}\n.s-maintenance .mt-title{display:flex;align-items:center;margin:0 0 20px}\n.s-maintenance .mt-logo{display:block;flex-shrink:0;width:80px;height:80px;margin-inline-end:20px;border-radius:50%;overflow:hidden;box-shadow:0 0 5px rgb(0 0 0 / 10%)}\n.s-maintenance .mt-logo img{display:block;width:100%;height:100%;object-fit:cover}\n.s-maintenance .mt-title h1{font-size:2.25rem;line-height:1;margin:0;color:#666}\n.s-maintenance .mt-content p{margin:0;white-space:pre-line}\n.s-maintenance .mt-contact-list{display:inline-block;list-style:none;width:100%;max-width:500px;margin:20px 0 0;padding:20px 0 0;border-top:1px solid #eee}\n.s-maintenance .mt-contact-list li{display:inline-block;margin-inline-end:10px}\n.s-maintenance .mt-contact-list a{display:inline-flex;align-items:center;padding:5px;color:rgb(102 102 102 / 80%);text-decoration:none;font-size:1.25rem}\n.s-maintenance .mt-contact-list a:hover{color:#666}\n.s-maintenance .mt-contact--btn{padding:3px 20px 5px;border-radius:20px;color:#fff!important;background:rgb(102 102 102 / 80%);font-size:1rem!important}\n.s-maintenance .mt-contact--btn:hover{background:#666}\n.s-maintenance .mt-contact--btn i{margin-inline-end:10px}\n.s-maintenance .thumb{width:100%;animation:revealMtBlock 1.5s .1s forwards;opacity:0}\n.s-maintenance .thumb img{display:block;width:100%;max-width:450px;margin:0 auto}\n@media (max-width:1024px){\n.s-maintenance{padding:40px 0 10px}\n.s-maintenance .mt-panel{flex-direction:column}\n.s-maintenance .mt-message{order:2;text-align:center;padding:0;margin:50px 0 0}\n.s-maintenance .mt-title{flex-direction:column;margin-bottom:30px}\n.s-maintenance .mt-logo{margin:0 0 10px}\n.s-maintenance .mt-title h1{font-size:1.5rem}\n}\n@media (max-width:640px){.s-maintenance .thumb img{width:80%}}\n@keyframes revealMtBlock{from{opacity:0;transform:translateY(50%)}to{opacity:1;transform:translateY(0)}}\n`;\n\n/** The phone button and social links under the message; nothing when the store lists none. */\nfunction Contacts({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const mobile = store?.contacts?.mobile;\n const socials = socialLinks(store);\n if (!mobile && socials.length === 0) return null;\n\n return (\n <ul className=\"mt-contact-list\">\n {mobile && (\n <li>\n <a href={`tel:${mobile}`} className=\"mt-contact--btn\">\n <i className=\"sicon-phone\" aria-hidden=\"true\" />\n {t('common.elements.contact_us', {\n defaultValue: arabic ? 'تواصل معنا' : 'Contact us',\n })}\n </a>\n </li>\n )}\n {socials.map(({ key, icon, href }) => (\n <li key={key}>\n <a href={href} target=\"_blank\" rel=\"noreferrer\" aria-label={key}>\n <i className={icon} aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n );\n}\n\n// The platform's page for a store that has not launched yet (Store\n// `pages/construction.blade.php` + the `construction` rules of `_maintenance.scss`): in\n// colour, logo over the illustration over the title, centred, contacts in a bar along the\n// bottom. Its own scroll container, as the maintenance page above is.\nconst LAUNCHING_STYLE = `\n.s-launching{display:flex;flex-direction:column;align-items:center;width:100%;height:100vh;height:100dvh;overflow-y:auto;color:#a3a3a3;background:#fff;text-align:center;box-sizing:border-box}\n.s-launching *{box-sizing:border-box}\n.s-launching .ls-panel{display:flex;flex-direction:column;align-items:center;width:100%;max-width:1200px;margin:auto 0;padding:40px 15px 100px;animation:revealMtBlock 1.5s forwards}\n.s-launching .ls-logo{display:block;max-width:70px;margin:0 0 60px}\n.s-launching .ls-thumb{display:block;width:100%;max-width:250px}\n.s-launching h1{font-size:3.125rem;line-height:1;margin:20px 0;color:#000}\n.s-launching .ls-content p{margin:0;white-space:pre-line}\n.s-launching .ls-footer{position:fixed;inset-inline:0;bottom:0;display:flex;align-items:center;justify-content:space-between;padding:0 25px;color:#000;background:#fbfbfb}\n.s-launching .ls-contacts{display:flex;align-items:center}\n.s-launching .ls-contacts h2{margin:1em 0;font-size:1rem;color:#7d7d7d}\n.s-launching .ls-contacts h2::after{content:\"|\";margin:0 10px;font-weight:700;color:#dbdbdb}\n.s-launching .ls-contacts ul{display:flex;list-style:none;margin:0;padding:0}\n.s-launching .ls-contacts li{padding:0 10px}\n.s-launching .ls-contacts a{display:inline-flex;align-items:center;gap:5px;color:#000;text-decoration:none}\n.s-launching .ls-footer-logo{display:block;max-width:30px}\n@media (max-width:1024px){.s-launching h1{font-size:1.5625rem}}\n@media (max-width:767px){.s-launching .ls-contacts a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}\n@keyframes revealMtBlock{from{opacity:0;transform:translateY(50%)}to{opacity:1;transform:translateY(0)}}\n`;\n\n/** The bar along the bottom with the phone and social links; nothing when the store lists none. */\nfunction LaunchingContacts({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const mobile = store?.contacts?.mobile;\n const socials = socialLinks(store);\n if (!mobile && socials.length === 0) return null;\n\n return (\n <footer className=\"ls-footer\">\n <div className=\"ls-contacts\">\n <h2>\n {t('common.elements.contact_us', {\n defaultValue: arabic ? 'تواصل معنا' : 'Contact us',\n })}\n </h2>\n <ul>\n {mobile && (\n <li>\n <a href={`tel:${mobile}`}>\n <i className=\"sicon-phone\" aria-hidden=\"true\" />\n <span dir=\"ltr\">{mobile}</span>\n </a>\n </li>\n )}\n {socials.map(({ key, icon, href }) => (\n <li key={key}>\n <a href={href} target=\"_blank\" rel=\"noreferrer\" aria-label={key}>\n <i className={icon} aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n </div>\n {store?.logo && <img className=\"ls-footer-logo\" src={store.logo} alt=\"\" />}\n </footer>\n );\n}\n\n/**\n * The page a customer sees while the store has not launched yet. Its wording is the\n * platform's own, not `maintenance_details`: for an unlaunched store that holds the\n * merchant's \"finish launching\" notice, addressed to the merchant.\n */\nfunction LaunchingSoon({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const logoAlt =\n store?.name ||\n t('common.elements.store_logo', { defaultValue: arabic ? 'شعار المتجر' : 'Store logo' });\n\n return (\n <div className=\"s-launching\" data-testid=\"store-launching-soon-page\">\n <style>{LAUNCHING_STYLE}</style>\n <section className=\"ls-panel\">\n {store?.logo && <img className=\"ls-logo\" src={store.logo} alt={logoAlt} />}\n <img className=\"ls-thumb\" src={LAUNCHING_THUMB_URL} alt=\"\" />\n <h1>\n {t('pages.launching_soon.title', {\n defaultValue: arabic ? 'ترقَّب إطلاق المتجر' : 'The store is launching soon',\n })}\n </h1>\n <div className=\"ls-content\">\n <p>\n {t('pages.launching_soon.message', {\n defaultValue: arabic\n ? 'نعمل على وضع اللمسات الأخيرة لنقدم لك تجربة تسوق متكاملة، قريبًا!'\n : \"We're putting the finishing touches on a complete shopping experience for you. Coming soon!\",\n })}\n </p>\n </div>\n </section>\n <LaunchingContacts store={store} arabic={arabic} />\n </div>\n );\n}\n\n/**\n * The page a customer sees while the store is closed: the platform's maintenance page,\n * fed by the settings' `maintenance_details` (the merchant's title and message) and the\n * store's contacts; or, while the store has not launched yet (`settings.launched` is\n * `false`), the platform's launching-soon page. Rendered by `TwilightProvider` in place\n * of the layout; see `rootBeforeLoad` for who sees it.\n */\nexport function MaintenancePage() {\n const { settings, locale } = getTwilightContext();\n const { t } = useTranslation();\n const store = settings.store;\n const details = settings.maintenance_details;\n const arabic = locale.startsWith('ar');\n\n if (settings.launched === false) return <LaunchingSoon store={store} arabic={arabic} />;\n\n const title =\n details?.title ||\n t('pages.maintenance.title', {\n defaultValue: arabic ? 'المتجر قيد الصيانة' : 'Store under maintenance',\n });\n\n return (\n <div className=\"s-maintenance\" data-testid=\"store-maintenance-page\">\n <style>{STYLE}</style>\n <div className=\"mt-container\">\n <section className=\"mt-panel\">\n <div className=\"mt-message\">\n <div className=\"mt-title\">\n {store?.logo && (\n <span className=\"mt-logo\">\n <img\n src={store.logo}\n alt={\n store.name ||\n t('common.elements.store_logo', {\n defaultValue: arabic ? 'شعار المتجر' : 'Store logo',\n })\n }\n />\n </span>\n )}\n <h1>{title}</h1>\n </div>\n <div className=\"mt-content\">\n {details?.message ? (\n // The merchant's own wording: a plain string the dashboard caps at 200 characters.\n <p>{details.message}</p>\n ) : (\n <>\n <p>\n {t('pages.maintenance.message', {\n defaultValue: arabic\n ? 'عذرا عزيزي العميل، المتجر حاليا قيد الصيانة و سنعاود العمل خلال فترة وجيزة'\n : 'Sorry, the store is under maintenance and will be back shortly.',\n })}\n </p>\n <p>\n {t('pages.maintenance.thanks', {\n defaultValue: arabic ? 'شكرا لتفهمكم' : 'Thank you for your understanding.',\n })}\n </p>\n </>\n )}\n </div>\n <Contacts store={store} arabic={arabic} />\n </div>\n <div className=\"thumb\">\n <img src={THUMB_URL} alt=\"\" />\n </div>\n </section>\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/store/MaintenancePage.tsx"],"names":[],"mappings":";;;;AAIA,IAAM,SAAA,GAAY,yEAAA;AAClB,IAAM,mBAAA,GACJ,4EAAA;AAGF,IAAM,YAAA,GAA8C;AAAA,EAClD,CAAC,WAAW,SAAS,CAAA;AAAA,EACrB,CAAC,YAAY,gBAAgB,CAAA;AAAA,EAC7B,CAAC,WAAW,eAAe,CAAA;AAAA,EAC3B,CAAC,UAAU,cAAc,CAAA;AAAA,EACzB,CAAC,YAAY,gBAAgB,CAAA;AAAA,EAC7B,CAAC,aAAa,iBAAiB;AACjC,CAAA;AAGA,SAAS,YAAY,KAAA,EAA0B;AAC7C,EAAA,OAAO,aAAa,OAAA,CAAQ,CAAC,CAAC,GAAA,EAAK,IAAI,CAAA,KAAM;AAC3C,IAAA,MAAM,IAAA,GAAO,KAAA,EAAO,MAAA,GAAS,GAAG,CAAA;AAChC,IAAA,OAAO,IAAA,GAAO,CAAC,EAAE,GAAA,EAAK,MAAM,IAAA,EAAM,IAAI,EAAC;AAAA,EACzC,CAAC,CAAA;AACH;AAUA,IAAM,KAAA,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAA,WACzC,CAAA,EACH;AAAA,SAAA,EACF,CAAA,EAEJ,CAAA;AAAA,wBACA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAc,MAAA,EAAgB;AAAA,OAAA,EAC1C,CAAA;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,OAAA,EACb,QAAA,kBAAA,GAAA,CAAC,SAAI,GAAA,EAAK,SAAA,EAAW,GAAA,EAAI,EAAA,EAAG,CAAA,EAC9B;AAAA,KAAA,EACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"chunk-CZ6VJPCG.js","sourcesContent":["import { getTwilightContext } from '../../twilight/context';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport type { Store, StoreSocial } from '../../types';\n\nconst THUMB_URL = 'https://cdn.assets.salla.network/prod/stores/images/construction-01.png';\nconst LAUNCHING_THUMB_URL =\n 'https://cdn.assets.salla.network/prod/stores/images/under-construction.png';\n\n/** Social networks the page links to, in the old page's order, with their Salla icon class. */\nconst SOCIAL_ICONS: [keyof StoreSocial, string][] = [\n ['twitter', 'sicon-x'],\n ['snapchat', 'sicon-snapchat'],\n ['youtube', 'sicon-youtube'],\n ['tiktok', 'sicon-tiktok'],\n ['facebook', 'sicon-facebook'],\n ['instagram', 'sicon-instagram'],\n];\n\n/** The store's social links the page shows, each with its icon class. */\nfunction socialLinks(store: Store | undefined) {\n return SOCIAL_ICONS.flatMap(([key, icon]) => {\n const href = store?.social?.[key];\n return href ? [{ key, icon, href }] : [];\n });\n}\n\n// The platform's maintenance page (Store `pages/maintenance.blade.php` + `_maintenance.scss`),\n// trimmed to what it renders: greyscale, logo + title beside the message, contacts under a\n// rule, the illustration alongside; stacked and centred under 1024px.\n//\n// The page is its own scroll container, the viewport tall, because app-shell themes lock\n// `html, body { overflow: hidden }` and scroll only their main element, which this page\n// replaces. Centring is by auto margins, not `justify-content`, so content taller than the\n// viewport starts at the top instead of being clipped at both ends.\nconst STYLE = `\n.s-maintenance{display:flex;flex-direction:column;align-items:center;width:100%;height:100vh;height:100dvh;overflow-y:auto;color:#a3a3a3;background:#fff;filter:grayscale(100%);box-sizing:border-box}\n.s-maintenance *{box-sizing:border-box}\n.s-maintenance .mt-container{width:100%;max-width:1200px;margin:auto 0;padding:0 15px}\n.s-maintenance .mt-panel{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}\n.s-maintenance .mt-message{width:100%;padding-inline-start:80px;animation:revealMtBlock 1.5s forwards}\n.s-maintenance .mt-title{display:flex;align-items:center;margin:0 0 20px}\n.s-maintenance .mt-logo{display:block;flex-shrink:0;width:80px;height:80px;margin-inline-end:20px;border-radius:50%;overflow:hidden;box-shadow:0 0 5px rgb(0 0 0 / 10%)}\n.s-maintenance .mt-logo img{display:block;width:100%;height:100%;object-fit:cover}\n.s-maintenance .mt-title h1{font-size:2.25rem;line-height:1;margin:0;color:#666}\n.s-maintenance .mt-content p{margin:0;white-space:pre-line}\n.s-maintenance .mt-contact-list{display:inline-block;list-style:none;width:100%;max-width:500px;margin:20px 0 0;padding:20px 0 0;border-top:1px solid #eee}\n.s-maintenance .mt-contact-list li{display:inline-block;margin-inline-end:10px}\n.s-maintenance .mt-contact-list a{display:inline-flex;align-items:center;padding:5px;color:rgb(102 102 102 / 80%);text-decoration:none;font-size:1.25rem}\n.s-maintenance .mt-contact-list a:hover{color:#666}\n.s-maintenance .mt-contact--btn{padding:3px 20px 5px;border-radius:20px;color:#fff!important;background:rgb(102 102 102 / 80%);font-size:1rem!important}\n.s-maintenance .mt-contact--btn:hover{background:#666}\n.s-maintenance .mt-contact--btn i{margin-inline-end:10px}\n.s-maintenance .thumb{width:100%;animation:revealMtBlock 1.5s .1s forwards;opacity:0}\n.s-maintenance .thumb img{display:block;width:100%;max-width:450px;margin:0 auto}\n@media (max-width:1024px){\n.s-maintenance{padding:40px 0 10px}\n.s-maintenance .mt-panel{flex-direction:column}\n.s-maintenance .mt-message{order:2;text-align:center;padding:0;margin:50px 0 0}\n.s-maintenance .mt-title{flex-direction:column;margin-bottom:30px}\n.s-maintenance .mt-logo{margin:0 0 10px}\n.s-maintenance .mt-title h1{font-size:1.5rem}\n}\n@media (max-width:640px){.s-maintenance .thumb img{width:80%}}\n@keyframes revealMtBlock{from{opacity:0;transform:translateY(50%)}to{opacity:1;transform:translateY(0)}}\n`;\n\n/** The phone button and social links under the message; nothing when the store lists none. */\nfunction Contacts({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const mobile = store?.contacts?.mobile;\n const socials = socialLinks(store);\n if (!mobile && socials.length === 0) return null;\n\n return (\n <ul className=\"mt-contact-list\">\n {mobile && (\n <li>\n <a href={`tel:${mobile}`} className=\"mt-contact--btn\">\n <i className=\"sicon-phone\" aria-hidden=\"true\" />\n {t('common.elements.contact_us', {\n defaultValue: arabic ? 'تواصل معنا' : 'Contact us',\n })}\n </a>\n </li>\n )}\n {socials.map(({ key, icon, href }) => (\n <li key={key}>\n <a href={href} target=\"_blank\" rel=\"noreferrer\" aria-label={key}>\n <i className={icon} aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n );\n}\n\n// The platform's page for a store that has not launched yet (Store\n// `pages/construction.blade.php` + the `construction` rules of `_maintenance.scss`): in\n// colour, logo over the illustration over the title, centred, contacts in a bar along the\n// bottom. Its own scroll container, as the maintenance page above is.\nconst LAUNCHING_STYLE = `\n.s-launching{display:flex;flex-direction:column;align-items:center;width:100%;height:100vh;height:100dvh;overflow-y:auto;color:#a3a3a3;background:#fff;text-align:center;box-sizing:border-box}\n.s-launching *{box-sizing:border-box}\n.s-launching .ls-panel{display:flex;flex-direction:column;align-items:center;width:100%;max-width:1200px;margin:auto 0;padding:40px 15px 100px;animation:revealMtBlock 1.5s forwards}\n.s-launching .ls-logo{display:block;max-width:70px;margin:0 0 60px}\n.s-launching .ls-thumb{display:block;width:100%;max-width:250px}\n.s-launching h1{font-size:3.125rem;line-height:1;margin:20px 0;color:#000}\n.s-launching .ls-content p{margin:0;white-space:pre-line}\n.s-launching .ls-footer{position:fixed;inset-inline:0;bottom:0;display:flex;align-items:center;justify-content:space-between;padding:0 25px;color:#000;background:#fbfbfb}\n.s-launching .ls-contacts{display:flex;align-items:center}\n.s-launching .ls-contacts h2{margin:1em 0;font-size:1rem;color:#7d7d7d}\n.s-launching .ls-contacts h2::after{content:\"|\";margin:0 10px;font-weight:700;color:#dbdbdb}\n.s-launching .ls-contacts ul{display:flex;list-style:none;margin:0;padding:0}\n.s-launching .ls-contacts li{padding:0 10px}\n.s-launching .ls-contacts a{display:inline-flex;align-items:center;gap:5px;color:#000;text-decoration:none}\n.s-launching .ls-footer-logo{display:block;max-width:30px}\n@media (max-width:1024px){.s-launching h1{font-size:1.5625rem}}\n@media (max-width:767px){.s-launching .ls-contacts a span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}\n@keyframes revealMtBlock{from{opacity:0;transform:translateY(50%)}to{opacity:1;transform:translateY(0)}}\n`;\n\n/** The bar along the bottom with the phone and social links; nothing when the store lists none. */\nfunction LaunchingContacts({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const mobile = store?.contacts?.mobile;\n const socials = socialLinks(store);\n if (!mobile && socials.length === 0) return null;\n\n return (\n <footer className=\"ls-footer\">\n <div className=\"ls-contacts\">\n <h2>\n {t('common.elements.contact_us', {\n defaultValue: arabic ? 'تواصل معنا' : 'Contact us',\n })}\n </h2>\n <ul>\n {mobile && (\n <li>\n <a href={`tel:${mobile}`}>\n <i className=\"sicon-phone\" aria-hidden=\"true\" />\n <span dir=\"ltr\">{mobile}</span>\n </a>\n </li>\n )}\n {socials.map(({ key, icon, href }) => (\n <li key={key}>\n <a href={href} target=\"_blank\" rel=\"noreferrer\" aria-label={key}>\n <i className={icon} aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n </div>\n {store?.logo && <img className=\"ls-footer-logo\" src={store.logo} alt=\"\" />}\n </footer>\n );\n}\n\n/**\n * The page a customer sees while the store has not launched yet. Its wording is the\n * platform's own, not `maintenance_details`: for an unlaunched store that holds the\n * merchant's \"finish launching\" notice, addressed to the merchant.\n */\nfunction LaunchingSoon({ store, arabic }: { store: Store | undefined; arabic: boolean }) {\n const { t } = useTranslation();\n const logoAlt =\n store?.name ||\n t('common.elements.store_logo', { defaultValue: arabic ? 'شعار المتجر' : 'Store logo' });\n\n return (\n <div className=\"s-launching\" data-testid=\"store-launching-soon-page\">\n <style>{LAUNCHING_STYLE}</style>\n <section className=\"ls-panel\">\n {store?.logo && <img className=\"ls-logo\" src={store.logo} alt={logoAlt} />}\n <img className=\"ls-thumb\" src={LAUNCHING_THUMB_URL} alt=\"\" />\n <h1>\n {t('pages.launching_soon.title', {\n defaultValue: arabic ? 'ترقَّب إطلاق المتجر' : 'The store is launching soon',\n })}\n </h1>\n <div className=\"ls-content\">\n <p>\n {t('pages.launching_soon.message', {\n defaultValue: arabic\n ? 'نعمل على وضع اللمسات الأخيرة لنقدم لك تجربة تسوق متكاملة، قريبًا!'\n : \"We're putting the finishing touches on a complete shopping experience for you. Coming soon!\",\n })}\n </p>\n </div>\n </section>\n <LaunchingContacts store={store} arabic={arabic} />\n </div>\n );\n}\n\n/**\n * The page a customer sees while the store is closed: the platform's maintenance page,\n * fed by the settings' `maintenance_details` (the merchant's title and message) and the\n * store's contacts; or, while the store has not launched yet (`settings.launched` is\n * `false`), the platform's launching-soon page. Rendered by `TwilightProvider` in place\n * of the layout; see `rootBeforeLoad` for who sees it.\n */\nexport function MaintenancePage() {\n const { settings, locale } = getTwilightContext();\n const { t } = useTranslation();\n const store = settings.store;\n const details = settings.maintenance_details;\n const arabic = locale.startsWith('ar');\n\n if (settings.launched === false) return <LaunchingSoon store={store} arabic={arabic} />;\n\n const title =\n details?.title ||\n t('pages.maintenance.title', {\n defaultValue: arabic ? 'المتجر قيد الصيانة' : 'Store under maintenance',\n });\n\n return (\n <div className=\"s-maintenance\" data-testid=\"store-maintenance-page\">\n <style>{STYLE}</style>\n <div className=\"mt-container\">\n <section className=\"mt-panel\">\n <div className=\"mt-message\">\n <div className=\"mt-title\">\n {store?.logo && (\n <span className=\"mt-logo\">\n <img\n src={store.logo}\n alt={\n store.name ||\n t('common.elements.store_logo', {\n defaultValue: arabic ? 'شعار المتجر' : 'Store logo',\n })\n }\n />\n </span>\n )}\n <h1>{title}</h1>\n </div>\n <div className=\"mt-content\">\n {details?.message ? (\n // The merchant's own wording: a plain string the dashboard caps at 200 characters.\n <p>{details.message}</p>\n ) : (\n <>\n <p>\n {t('pages.maintenance.message', {\n defaultValue: arabic\n ? 'عذرا عزيزي العميل، المتجر حاليا قيد الصيانة و سنعاود العمل خلال فترة وجيزة'\n : 'Sorry, the store is under maintenance and will be back shortly.',\n })}\n </p>\n <p>\n {t('pages.maintenance.thanks', {\n defaultValue: arabic ? 'شكرا لتفهمكم' : 'Thank you for your understanding.',\n })}\n </p>\n </>\n )}\n </div>\n <Contacts store={store} arabic={arabic} />\n </div>\n <div className=\"thumb\">\n <img src={THUMB_URL} alt=\"\" />\n </div>\n </section>\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RouteId } from './chunk-OUW6WESU.js';
|
|
2
|
-
import { getActiveScope } from './chunk-
|
|
3
|
-
import { openNativeBrowser } from './chunk-
|
|
4
|
-
import { withoutStoreUrlBase, extractScopeFromUrl } from './chunk-
|
|
5
|
-
import { subscribeTwilight, getTwilightContext } from './chunk-
|
|
2
|
+
import { getActiveScope } from './chunk-5RWIVHYS.js';
|
|
3
|
+
import { openNativeBrowser } from './chunk-3E3ABCPC.js';
|
|
4
|
+
import { withoutStoreUrlBase, extractScopeFromUrl } from './chunk-FXVII733.js';
|
|
5
|
+
import { subscribeTwilight, getTwilightContext } from './chunk-6K34BCUP.js';
|
|
6
6
|
import { SUPPORTED_LOCALES } from './chunk-T72DAX7R.js';
|
|
7
7
|
import { useTwilight } from './chunk-DF6FBKDN.js';
|
|
8
8
|
import { createContext, createElement, useContext, useSyncExternalStore, useRef, useEffect, useCallback } from 'react';
|
|
@@ -330,5 +330,5 @@ function useNavigationInterceptor(navigate, storeUrl, username) {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
export { NavigationInterceptor, NavigationProvider, NotFoundError, RedirectError, UnauthorizedError, configureNavigation, defaultNavigate, isMissingResource, notFound, orThrow, orUnauthorized, redirect, resolveRelativePath, responseStatusOf, unauthorized, useIsBlog, useIsBrands, useIsCart, useIsCustomer, useIsHome, useIsProduct, useIsSearch, useLocation, useNavigate, useRouteId };
|
|
333
|
-
//# sourceMappingURL=chunk-
|
|
334
|
-
//# sourceMappingURL=chunk-
|
|
333
|
+
//# sourceMappingURL=chunk-DGK2HVSR.js.map
|
|
334
|
+
//# sourceMappingURL=chunk-DGK2HVSR.js.map
|