@salla.sa/twilight-theme-engine 1.0.133 → 1.0.135
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-2BD3R4BH.js → AddToCartForm-ODVZPTKN.js} +3 -3
- package/dist/{AddToCartForm-2BD3R4BH.js.map → AddToCartForm-ODVZPTKN.js.map} +1 -1
- package/dist/{BlogAuthorPage-BF5XVPHV.js → BlogAuthorPage-BU23SINI.js} +29 -29
- package/dist/{BlogAuthorPage-BF5XVPHV.js.map → BlogAuthorPage-BU23SINI.js.map} +1 -1
- package/dist/{BlogCategoryPage-BZTNFEM7.js → BlogCategoryPage-ZVITUHP4.js} +29 -29
- package/dist/{BlogCategoryPage-BZTNFEM7.js.map → BlogCategoryPage-ZVITUHP4.js.map} +1 -1
- package/dist/{BlogPage-7HOCNIL5.js → BlogPage-IN3V7FYK.js} +27 -27
- package/dist/{BlogPage-7HOCNIL5.js.map → BlogPage-IN3V7FYK.js.map} +1 -1
- package/dist/{BlogSinglePage-SF575W74.js → BlogSinglePage-UJG7YPYZ.js} +27 -27
- package/dist/{BlogSinglePage-SF575W74.js.map → BlogSinglePage-UJG7YPYZ.js.map} +1 -1
- package/dist/{BlogTagPage-TALXABAF.js → BlogTagPage-XDETNKGR.js} +29 -29
- package/dist/{BlogTagPage-TALXABAF.js.map → BlogTagPage-XDETNKGR.js.map} +1 -1
- package/dist/{BrandsPage-UNHLTVUG.js → BrandsPage-CBU7JFSX.js} +28 -28
- package/dist/{BrandsPage-UNHLTVUG.js.map → BrandsPage-CBU7JFSX.js.map} +1 -1
- package/dist/{Breadcrumb-VFMPAWSR.js → Breadcrumb-EA2XETAM.js} +27 -27
- package/dist/{Breadcrumb-VFMPAWSR.js.map → Breadcrumb-EA2XETAM.js.map} +1 -1
- package/dist/{CartItem-CI2XOVRH.js → CartItem-2TW36QTW.js} +27 -27
- package/dist/{CartItem-CI2XOVRH.js.map → CartItem-2TW36QTW.js.map} +1 -1
- package/dist/{CartSummary-EQOBVLXK.js → CartSummary-TW2CAX57.js} +27 -27
- package/dist/{CartSummary-EQOBVLXK.js.map → CartSummary-TW2CAX57.js.map} +1 -1
- package/dist/{Copyright-3JGEXCQZ.js → Copyright-57XPE75X.js} +3 -3
- package/dist/{Copyright-3JGEXCQZ.js.map → Copyright-57XPE75X.js.map} +1 -1
- package/dist/{CustomerLayout-V5T4OPRY.js → CustomerLayout-A2M7IY34.js} +27 -27
- package/dist/{CustomerLayout-V5T4OPRY.js.map → CustomerLayout-A2M7IY34.js.map} +1 -1
- package/dist/{Footer-QX4EO5Y4.js → Footer-L5BIYCZ2.js} +4 -4
- package/dist/{Footer-QX4EO5Y4.js.map → Footer-L5BIYCZ2.js.map} +1 -1
- package/dist/Header-NLBDW4MR.js +23 -0
- package/dist/{Header-ORMIZKUL.js.map → Header-NLBDW4MR.js.map} +1 -1
- package/dist/{LoyaltyPage-HCLFYNTM.js → LoyaltyPage-BVTDPSP3.js} +27 -27
- package/dist/{LoyaltyPage-HCLFYNTM.js.map → LoyaltyPage-BVTDPSP3.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-V5OWHGR5.js → LoyaltyPointsPage-HZYPCO7C.js} +9 -9
- package/dist/{LoyaltyPointsPage-V5OWHGR5.js.map → LoyaltyPointsPage-HZYPCO7C.js.map} +1 -1
- package/dist/{MainMenu-RX7PU77H.js → MainMenu-3HP3YJDH.js} +8 -8
- package/dist/{MainMenu-RX7PU77H.js.map → MainMenu-3HP3YJDH.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-CTVC6FPX.js → MasterLayout-KD3GLYYX.js} +27 -27
- package/dist/{MasterLayout-CTVC6FPX.js.map → MasterLayout-KD3GLYYX.js.map} +1 -1
- package/dist/{MobileMenu-EQFL7JGB.js → MobileMenu-3UEQTURY.js} +28 -28
- package/dist/{MobileMenu-EQFL7JGB.js.map → MobileMenu-3UEQTURY.js.map} +1 -1
- package/dist/{NotificationsPage-ZBZNPTZS.js → NotificationsPage-C6LNYZTB.js} +27 -27
- package/dist/{NotificationsPage-ZBZNPTZS.js.map → NotificationsPage-C6LNYZTB.js.map} +1 -1
- package/dist/{OrderSinglePage-LMWLOLW2.js → OrderSinglePage-LXKINOXP.js} +28 -28
- package/dist/{OrderSinglePage-LMWLOLW2.js.map → OrderSinglePage-LXKINOXP.js.map} +1 -1
- package/dist/{OrdersPage-6G7BES7J.js → OrdersPage-VBF3P3JH.js} +27 -27
- package/dist/{OrdersPage-6G7BES7J.js.map → OrdersPage-VBF3P3JH.js.map} +1 -1
- package/dist/{PageSingle-5TPYMYII.js → PageSingle-E7DTNIY7.js} +7 -7
- package/dist/{PageSingle-5TPYMYII.js.map → PageSingle-E7DTNIY7.js.map} +1 -1
- package/dist/{ProductDetails-JHZ2ZJAA.js → ProductDetails-ZQLQWU7S.js} +8 -8
- package/dist/{ProductDetails-JHZ2ZJAA.js.map → ProductDetails-ZQLQWU7S.js.map} +1 -1
- package/dist/{ProfilePage-6JITWBAJ.js → ProfilePage-7LAIDEHS.js} +27 -27
- package/dist/{ProfilePage-6JITWBAJ.js.map → ProfilePage-7LAIDEHS.js.map} +1 -1
- package/dist/{ReviewsPage-PFMEZ27R.js → ReviewsPage-FA3V745S.js} +3 -3
- package/dist/{ReviewsPage-PFMEZ27R.js.map → ReviewsPage-FA3V745S.js.map} +1 -1
- package/dist/{SeoCartWidget-ZU3ZZRQB.js → SeoCartWidget-4456ASOT.js} +27 -27
- package/dist/{SeoCartWidget-ZU3ZZRQB.js.map → SeoCartWidget-4456ASOT.js.map} +1 -1
- package/dist/{SettingsPage-J5AF6ECW.js → SettingsPage-IVOHCXVY.js} +27 -27
- package/dist/{SettingsPage-J5AF6ECW.js.map → SettingsPage-IVOHCXVY.js.map} +1 -1
- package/dist/StoreClosedNotification-DIF6SKBX.js +58 -0
- package/dist/{StoreClosedNotification-3FYHHAIP.js.map → StoreClosedNotification-DIF6SKBX.js.map} +1 -1
- package/dist/{TestimonialsPage-4Y55RF5P.js → TestimonialsPage-JY7MF5NW.js} +7 -7
- package/dist/{TestimonialsPage-4Y55RF5P.js.map → TestimonialsPage-JY7MF5NW.js.map} +1 -1
- package/dist/{ThankYouPage-WETHDHC2.js → ThankYouPage-KNHHBFPZ.js} +27 -27
- package/dist/{ThankYouPage-WETHDHC2.js.map → ThankYouPage-KNHHBFPZ.js.map} +1 -1
- package/dist/{WalletPage-PSTUYDCC.js → WalletPage-HH72DHOC.js} +28 -28
- package/dist/{WalletPage-PSTUYDCC.js.map → WalletPage-HH72DHOC.js.map} +1 -1
- package/dist/{WishlistPage-AROQHMZ2.js → WishlistPage-5BR63SMU.js} +29 -29
- package/dist/{WishlistPage-AROQHMZ2.js.map → WishlistPage-5BR63SMU.js.map} +1 -1
- package/dist/ambient/salla-components.d.ts +5 -0
- 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.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-WBPOWM74.js → chunk-25UDBM27.js} +4 -4
- package/dist/{chunk-WBPOWM74.js.map → chunk-25UDBM27.js.map} +1 -1
- package/dist/{chunk-XQLAAPWR.js → chunk-2GSYVPQS.js} +7 -7
- package/dist/{chunk-XQLAAPWR.js.map → chunk-2GSYVPQS.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-HTV4KO7G.js → chunk-4CM6JIQF.js} +3 -3
- package/dist/{chunk-HTV4KO7G.js.map → chunk-4CM6JIQF.js.map} +1 -1
- package/dist/{chunk-U2I3W3KW.js → chunk-4NZKBANW.js} +4 -4
- package/dist/{chunk-U2I3W3KW.js.map → chunk-4NZKBANW.js.map} +1 -1
- package/dist/{chunk-OOLS535M.js → chunk-4SCGS2CM.js} +7 -7
- package/dist/{chunk-OOLS535M.js.map → chunk-4SCGS2CM.js.map} +1 -1
- package/dist/{chunk-XN77EK3X.js → chunk-5A37NING.js} +4 -4
- package/dist/{chunk-XN77EK3X.js.map → chunk-5A37NING.js.map} +1 -1
- package/dist/{chunk-ETQFCKGR.js → chunk-5AOW2SQW.js} +3 -3
- package/dist/{chunk-ETQFCKGR.js.map → chunk-5AOW2SQW.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-QIJJTWW6.js → chunk-6VYW7CVL.js} +4 -4
- package/dist/{chunk-QIJJTWW6.js.map → chunk-6VYW7CVL.js.map} +1 -1
- package/dist/{chunk-JUFJV4AK.js → chunk-7U5OLKOS.js} +3 -3
- package/dist/{chunk-JUFJV4AK.js.map → chunk-7U5OLKOS.js.map} +1 -1
- package/dist/{chunk-B3DGM7TM.js → chunk-A5AU64GV.js} +4 -4
- package/dist/{chunk-B3DGM7TM.js.map → chunk-A5AU64GV.js.map} +1 -1
- package/dist/{chunk-GG5DAIGJ.js → chunk-AXWX5SJC.js} +5 -5
- package/dist/{chunk-GG5DAIGJ.js.map → chunk-AXWX5SJC.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-F5BU7T6H.js → chunk-D53M5ASN.js} +7 -7
- package/dist/{chunk-F5BU7T6H.js.map → chunk-D53M5ASN.js.map} +1 -1
- package/dist/{chunk-RQG44QD7.js → chunk-E5DP3MHE.js} +6 -6
- package/dist/{chunk-RQG44QD7.js.map → chunk-E5DP3MHE.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-VSEMOZZY.js → chunk-HDSY5DWF.js} +3 -3
- package/dist/{chunk-VSEMOZZY.js.map → chunk-HDSY5DWF.js.map} +1 -1
- package/dist/{chunk-Z6E7MMXW.js → chunk-HIOYW3CS.js} +4 -4
- package/dist/{chunk-Z6E7MMXW.js.map → chunk-HIOYW3CS.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-G3UTLR3D.js → chunk-IOLNWPRO.js} +4 -4
- package/dist/{chunk-G3UTLR3D.js.map → chunk-IOLNWPRO.js.map} +1 -1
- package/dist/{chunk-33UM6VQJ.js → chunk-KWJUCI7M.js} +4 -4
- package/dist/{chunk-33UM6VQJ.js.map → chunk-KWJUCI7M.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-BYLNAYIZ.js → chunk-LUPDYN4T.js} +5 -5
- package/dist/{chunk-BYLNAYIZ.js.map → chunk-LUPDYN4T.js.map} +1 -1
- package/dist/{chunk-NVL6M25Q.js → chunk-MWG734P7.js} +3 -3
- package/dist/{chunk-NVL6M25Q.js.map → chunk-MWG734P7.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-37O7OVPL.js → chunk-OJKTKMWS.js} +4 -4
- package/dist/{chunk-37O7OVPL.js.map → chunk-OJKTKMWS.js.map} +1 -1
- package/dist/chunk-OKKS2RA4.js +14 -0
- package/dist/{chunk-JYEUOEEI.js.map → chunk-OKKS2RA4.js.map} +1 -1
- package/dist/{chunk-QGKARX6O.js → chunk-P3D67RVR.js} +8 -8
- package/dist/{chunk-QGKARX6O.js.map → chunk-P3D67RVR.js.map} +1 -1
- package/dist/{chunk-MBSWV56J.js → chunk-P6TJCCM3.js} +4 -4
- package/dist/{chunk-MBSWV56J.js.map → chunk-P6TJCCM3.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-LDQGZ4R2.js → chunk-RBXGVURD.js} +4 -4
- package/dist/{chunk-LDQGZ4R2.js.map → chunk-RBXGVURD.js.map} +1 -1
- package/dist/{chunk-4UEXSD7E.js → chunk-RLJLG4EN.js} +6 -6
- package/dist/{chunk-4UEXSD7E.js.map → chunk-RLJLG4EN.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-7ED3XSYN.js → chunk-SGB7HCXF.js} +4 -4
- package/dist/{chunk-7ED3XSYN.js.map → chunk-SGB7HCXF.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-VSP3INDK.js → chunk-TTLRRVM2.js} +7 -7
- package/dist/{chunk-VSP3INDK.js.map → chunk-TTLRRVM2.js.map} +1 -1
- package/dist/{chunk-P2WO5CNH.js → chunk-UHGDQIIF.js} +5 -5
- package/dist/{chunk-P2WO5CNH.js.map → chunk-UHGDQIIF.js.map} +1 -1
- package/dist/{chunk-L55G7FJZ.js → chunk-VNDUKDZG.js} +38 -10
- package/dist/chunk-VNDUKDZG.js.map +1 -0
- package/dist/{chunk-HIGI3M7E.js → chunk-VZPEPWDF.js} +9 -9
- package/dist/{chunk-HIGI3M7E.js.map → chunk-VZPEPWDF.js.map} +1 -1
- package/dist/{chunk-KLJTNLZ5.js → chunk-WEKO2DAN.js} +5 -5
- package/dist/{chunk-KLJTNLZ5.js.map → chunk-WEKO2DAN.js.map} +1 -1
- package/dist/{chunk-RSRGLHVQ.js → chunk-WHFKJ3AS.js} +4 -4
- package/dist/{chunk-RSRGLHVQ.js.map → chunk-WHFKJ3AS.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-Z2K2O3DI.js → chunk-WVSGVFMM.js} +4 -4
- package/dist/{chunk-Z2K2O3DI.js.map → chunk-WVSGVFMM.js.map} +1 -1
- 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-IPICQKIF.js → chunk-X5QZBD5V.js} +7 -7
- package/dist/{chunk-IPICQKIF.js.map → chunk-X5QZBD5V.js.map} +1 -1
- package/dist/{chunk-TLOA4BJF.js → chunk-XHWBJYJL.js} +3 -3
- package/dist/{chunk-TLOA4BJF.js.map → chunk-XHWBJYJL.js.map} +1 -1
- package/dist/{chunk-PAMMBDFM.js → chunk-YBIL64R7.js} +3 -3
- package/dist/{chunk-PAMMBDFM.js.map → chunk-YBIL64R7.js.map} +1 -1
- package/dist/{chunk-4SM6UKLE.js → chunk-YJWJPS25.js} +17 -17
- package/dist/chunk-YJWJPS25.js.map +1 -0
- package/dist/{chunk-N4YBKFJM.js → chunk-YKNDXZAD.js} +24 -24
- package/dist/chunk-YKNDXZAD.js.map +1 -0
- package/dist/{chunk-SQBLVCES.js → chunk-ZRJXN766.js} +4 -4
- package/dist/{chunk-SQBLVCES.js.map → chunk-ZRJXN766.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/BundleComponent.d.ts +3 -0
- package/dist/components/home/BundleComponent.d.ts.map +1 -1
- 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-3GOSUA4H.js +31 -0
- package/dist/{document-class-4DT4LTK5.js.map → document-class-3GOSUA4H.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-FTU3OC4V.js → navigation-SN2ZTS4V.js} +8 -8
- package/dist/{navigation-FTU3OC4V.js.map → navigation-SN2ZTS4V.js.map} +1 -1
- package/dist/navigation-ZV4TGIAA.js +15 -0
- package/dist/{navigation-DT6HXCUG.js.map → navigation-ZV4TGIAA.js.map} +1 -1
- package/dist/{not-found-BVJSPRMZ.js → not-found-J3UJVHNJ.js} +28 -28
- package/dist/{not-found-BVJSPRMZ.js.map → not-found-J3UJVHNJ.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-OWYYSCDT.js → store-lookup-U6TJNLZM.js} +12 -12
- package/dist/{store-lookup-OWYYSCDT.js.map → store-lookup-U6TJNLZM.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/components/home/BundleComponent.tsx.txt +46 -3
- package/tailwind/routes/root/beforeLoad.ts.txt +8 -1
- package/dist/Header-ORMIZKUL.js +0 -23
- package/dist/MaintenancePage-A7CNHM7B.js +0 -7
- package/dist/StoreClosedNotification-3FYHHAIP.js +0 -58
- package/dist/chunk-4SM6UKLE.js.map +0 -1
- package/dist/chunk-FHU2MXZA.js.map +0 -1
- package/dist/chunk-FID76MUV.js.map +0 -1
- package/dist/chunk-JYEUOEEI.js +0 -14
- package/dist/chunk-L55G7FJZ.js.map +0 -1
- package/dist/chunk-N4YBKFJM.js.map +0 -1
- package/dist/document-class-4DT4LTK5.js +0 -31
- package/dist/navigation-DT6HXCUG.js +0 -15
package/dist/routes/thank-you.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { order } from '../chunk-
|
|
2
|
-
import { buildHreflangAlternates } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { order } from '../chunk-WHFKJ3AS.js';
|
|
2
|
+
import { buildHreflangAlternates } from '../chunk-RYGEIQWO.js';
|
|
3
|
+
import '../chunk-RLJLG4EN.js';
|
|
4
4
|
import { RouteId } from '../chunk-OUW6WESU.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-E5DP3MHE.js';
|
|
6
6
|
import '../chunk-Z5M4YYWT.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
10
|
-
import { getTwilightContext } from '../chunk-
|
|
7
|
+
import '../chunk-3E3ABCPC.js';
|
|
8
|
+
import '../chunk-NHA4SBKG.js';
|
|
9
|
+
import '../chunk-FXVII733.js';
|
|
10
|
+
import { getTwilightContext } from '../chunk-6K34BCUP.js';
|
|
11
11
|
import '../chunk-T72DAX7R.js';
|
|
12
12
|
import '../chunk-DF6FBKDN.js';
|
|
13
13
|
import '../chunk-DGUM43GV.js';
|
|
@@ -41,7 +41,7 @@ async function thankYouLoader({
|
|
|
41
41
|
|
|
42
42
|
// src/routes/thank-you/index.tsx
|
|
43
43
|
var LazyThankYouPage = lazy(
|
|
44
|
-
() => import('../ThankYouPage-
|
|
44
|
+
() => import('../ThankYouPage-KNHHBFPZ.js').then((m) => ({ default: m.ThankYouPage }))
|
|
45
45
|
);
|
|
46
46
|
var ThankYouPage = LazyThankYouPage;
|
|
47
47
|
async function loader(ctx, extend) {
|
package/dist/skeleton.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
export { BlogSkeleton, BreadcrumbSkeleton, CartSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from './chunk-N7CCSGZF.js';
|
|
2
|
-
export { HomeSkeleton } from './chunk-
|
|
2
|
+
export { HomeSkeleton } from './chunk-TTLRRVM2.js';
|
|
3
3
|
import './chunk-IXHM24Z4.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
4
|
+
import './chunk-VNDUKDZG.js';
|
|
5
|
+
import './chunk-YBIL64R7.js';
|
|
6
|
+
import './chunk-LUPDYN4T.js';
|
|
7
|
+
import './chunk-P3D67RVR.js';
|
|
8
8
|
import './chunk-Y32RHCOH.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-YKNDXZAD.js';
|
|
10
10
|
import './chunk-H2QBHOF2.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
11
|
+
import './chunk-X5QZBD5V.js';
|
|
12
|
+
import './chunk-4CM6JIQF.js';
|
|
13
|
+
import './chunk-SXI2XBCC.js';
|
|
14
|
+
import './chunk-X55R4VVK.js';
|
|
15
|
+
import './chunk-25UDBM27.js';
|
|
16
16
|
import './chunk-OXMUPNMH.js';
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-7U5OLKOS.js';
|
|
18
18
|
import './chunk-VVZNW5CB.js';
|
|
19
|
-
import './chunk-
|
|
19
|
+
import './chunk-WQPG22DY.js';
|
|
20
20
|
import './chunk-GD26FI4J.js';
|
|
21
|
-
import './chunk-
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
21
|
+
import './chunk-Q7E4TNN7.js';
|
|
22
|
+
import './chunk-RYGEIQWO.js';
|
|
23
|
+
import './chunk-RLJLG4EN.js';
|
|
24
24
|
import './chunk-OUW6WESU.js';
|
|
25
|
-
import './chunk-
|
|
25
|
+
import './chunk-HOJ5E2PG.js';
|
|
26
26
|
import './chunk-HI5V5X3S.js';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-
|
|
27
|
+
import './chunk-WVSGVFMM.js';
|
|
28
|
+
import './chunk-XHWBJYJL.js';
|
|
29
29
|
import './chunk-MVT5AF2A.js';
|
|
30
30
|
import './chunk-Z653O7MX.js';
|
|
31
31
|
import './chunk-ZCH7W7DZ.js';
|
|
32
|
-
import './chunk-
|
|
32
|
+
import './chunk-TF6HFXTW.js';
|
|
33
33
|
import './chunk-JWXJPJBO.js';
|
|
34
34
|
import './chunk-CW625T2E.js';
|
|
35
35
|
import './chunk-7V36I5GT.js';
|
|
36
36
|
import './chunk-6WI7R2BD.js';
|
|
37
|
-
import './chunk-
|
|
37
|
+
import './chunk-LFHYQ6AN.js';
|
|
38
38
|
import './chunk-OAMIDZKW.js';
|
|
39
|
-
import './chunk-
|
|
39
|
+
import './chunk-WEKO2DAN.js';
|
|
40
40
|
import './chunk-OQIIJRAS.js';
|
|
41
41
|
import './chunk-V2ZDTY6H.js';
|
|
42
|
-
import './chunk-
|
|
42
|
+
import './chunk-5A37NING.js';
|
|
43
43
|
import './chunk-5XDPAKF5.js';
|
|
44
44
|
import './chunk-GCPEMNSU.js';
|
|
45
|
-
import './chunk-
|
|
45
|
+
import './chunk-E5DP3MHE.js';
|
|
46
46
|
import './chunk-Z5M4YYWT.js';
|
|
47
47
|
import './chunk-TYNZ5B2B.js';
|
|
48
|
-
import './chunk-
|
|
48
|
+
import './chunk-MWG734P7.js';
|
|
49
49
|
import './chunk-AXW67SY7.js';
|
|
50
50
|
import './chunk-BYMOPN2S.js';
|
|
51
51
|
import './chunk-SKLEJJ6M.js';
|
|
@@ -53,11 +53,11 @@ import './chunk-6BZ5TKEV.js';
|
|
|
53
53
|
import './chunk-FZKRSGLP.js';
|
|
54
54
|
import './chunk-7V5HOZW4.js';
|
|
55
55
|
import './chunk-YA6ABQB7.js';
|
|
56
|
-
import './chunk-
|
|
57
|
-
import './chunk-
|
|
58
|
-
import './chunk-
|
|
59
|
-
import './chunk-
|
|
60
|
-
import './chunk-
|
|
56
|
+
import './chunk-MWYKP7CI.js';
|
|
57
|
+
import './chunk-3E3ABCPC.js';
|
|
58
|
+
import './chunk-NHA4SBKG.js';
|
|
59
|
+
import './chunk-FXVII733.js';
|
|
60
|
+
import './chunk-6K34BCUP.js';
|
|
61
61
|
import './chunk-T72DAX7R.js';
|
|
62
62
|
import './chunk-DF6FBKDN.js';
|
|
63
63
|
import './chunk-DGUM43GV.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { category } from './chunk-
|
|
2
|
-
import { blog } from './chunk-
|
|
3
|
-
import { brand } from './chunk-
|
|
4
|
-
import { product } from './chunk-
|
|
1
|
+
import { category } from './chunk-P6TJCCM3.js';
|
|
2
|
+
import { blog } from './chunk-A5AU64GV.js';
|
|
3
|
+
import { brand } from './chunk-IOLNWPRO.js';
|
|
4
|
+
import { product } from './chunk-LUPDYN4T.js';
|
|
5
5
|
import { DEV_LOOKUP_BUDGET_MS } from './chunk-OXMUPNMH.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-RLJLG4EN.js';
|
|
7
7
|
import './chunk-OUW6WESU.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-E5DP3MHE.js';
|
|
9
9
|
import './chunk-Z5M4YYWT.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
10
|
+
import './chunk-3E3ABCPC.js';
|
|
11
|
+
import './chunk-NHA4SBKG.js';
|
|
12
|
+
import './chunk-FXVII733.js';
|
|
13
|
+
import './chunk-6K34BCUP.js';
|
|
14
14
|
import './chunk-T72DAX7R.js';
|
|
15
15
|
import './chunk-DF6FBKDN.js';
|
|
16
16
|
import './chunk-DGUM43GV.js';
|
|
@@ -111,5 +111,5 @@ function lookupInStore(source, query) {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
export { lookupInStore };
|
|
114
|
-
//# sourceMappingURL=store-lookup-
|
|
115
|
-
//# sourceMappingURL=store-lookup-
|
|
114
|
+
//# sourceMappingURL=store-lookup-U6TJNLZM.js.map
|
|
115
|
+
//# sourceMappingURL=store-lookup-U6TJNLZM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dev/store-lookup.ts"],"names":["categories"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,IAAM,QAAA,GAAW,EAAA;AAEjB,IAAM,SAAA,GAAY,EAAA;AAalB,eAAe,OAAA,CACb,WACA,IAAA,EACc;AACd,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,GAAA,EAAI,GAAI,oBAAA;AAC9B,EAAA,MAAM,QAAa,EAAC;AACpB,EAAA,IAAI,MAAA,GAAwB,IAAA;AAC5B,EAAA,KAAA,IAAS,IAAA,GAAO,CAAA,EAAG,IAAA,IAAQ,SAAA,EAAW,QAAQ,CAAA,EAAG;AAC/C,IAAA,MAAM,EAAE,KAAA,EAAO,IAAA,KAAS,MAAM,SAAA,CAAU,MAAM,MAAM,CAAA;AACpD,IAAA,KAAA,CAAM,IAAA,CAAK,GAAG,KAAA,CAAM,MAAA,CAAO,IAAI,CAAC,CAAA;AAChC,IAAA,IAAI,KAAA,CAAM,UAAU,QAAA,IAAY,CAAC,QAAQ,IAAA,CAAK,GAAA,MAAS,QAAA,EAAU;AACjE,IAA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CAAE,GAAA;AAAI,GAC7C,CAAE,CAAA;AACN;AAEA,IAAM,OAAA,GAAgF;AAAA,EACpF,QAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA,EAAe,YAAA;AAAA,EACf,eAAA,EAAiB;AACnB,CAAA;AAEO,SAAS,aAAA,CAAc,QAAyB,KAAA,EAAyC;AAC9F,EAAA,MAAM,MAAA,GAAS,QAAQ,MAAM,CAAA;AAC7B,EAAA,IAAI,CAAC,MAAA,EAAQ,OAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,CAAA,cAAA,EAAiB,MAAM,CAAA,CAAE,CAAC,CAAA;AACvE,EAAA,OAAO,MAAA,CAAO,KAAA,CAAM,IAAA,EAAM,CAAA;AAC5B","file":"store-lookup-U6TJNLZM.js","sourcesContent":["/**\n * Runs in the editor's frame (the storefront), which has the engine's API\n * client set up for the dev store: answers the editor's pickers with the real\n * store's products, categories, brands and blog. Loaded with `import()` on the\n * first lookup, so a storefront never carries it.\n *\n * Each item's `data` is what a block receives for it, in the API's shape: a\n * product block reads only the ids and fetches the rest, while categories and\n * brands are drawn from what is saved.\n */\n\nimport { product } from '../api/product';\nimport { category } from '../api/category';\nimport { brand } from '../api/brands';\nimport { blog } from '../api/blog';\nimport type { Category } from '../types';\nimport { DEV_LOOKUP_BUDGET_MS, type DevLookupItem, type DevLookupSource } from './schema-types';\n\n/** Enough to choose from; a search narrows it further. */\nconst PER_PAGE = 20;\n/** How far a paged list is searched before giving up, so a big store can't stall the picker. */\nconst MAX_PAGES = 10;\n\ninterface Page<T> {\n items: T[];\n next: string | null;\n}\n\n/**\n * The matching items of a paged list, read page after page until there are\n * enough, the pages run out, or the time budget is spent: a brand or article on\n * page three is still found, and what was found so far always reaches the\n * editor before it stops waiting (`DEV_LOOKUP_BUDGET_MS` < its timeout).\n */\nasync function collect<T>(\n fetchPage: (page: number, cursor: string | null) => Promise<Page<T>>,\n keep: (item: T) => boolean\n): Promise<T[]> {\n const deadline = Date.now() + DEV_LOOKUP_BUDGET_MS;\n const found: T[] = [];\n let cursor: string | null = null;\n for (let page = 1; page <= MAX_PAGES; page += 1) {\n const { items, next } = await fetchPage(page, cursor);\n found.push(...items.filter(keep));\n if (found.length >= PER_PAGE || !next || Date.now() >= deadline) break;\n cursor = next;\n }\n return found.slice(0, PER_PAGE);\n}\n\nfunction matches(name: string, query: string): boolean {\n return !query || name.toLowerCase().includes(query.toLowerCase());\n}\n\n/** Categories with their subcategories, flattened, parents first. */\nfunction flatten(categories: Category[]): Category[] {\n return categories.flatMap((c) => [c, ...flatten(c.sub_categories ?? [])]);\n}\n\nasync function products(query: string): Promise<DevLookupItem[]> {\n const { items } = await product.list({\n source: query ? 'search' : 'latest',\n ...(query ? { keyword: query } : {}),\n perPage: PER_PAGE,\n });\n // List responses send the id as a numeric string; the block reads a number. Use it for both.\n return items.map((p) => ({\n id: Number(p.id),\n name: p.name,\n image: p.image?.url,\n url: p.url,\n data: { id: Number(p.id), name: p.name, url: p.url, image: p.image?.url ?? null },\n }));\n}\n\nasync function categories(query: string): Promise<DevLookupItem[]> {\n return flatten(await category.list())\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n image: c.image ?? undefined,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url, image: c.image ?? null, icon: c.icon ?? null },\n }));\n}\n\nasync function brands(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n (page) => brand.list(page),\n (b) => matches(b.name, query)\n );\n return found.map((b) => ({\n id: b.id,\n name: b.name,\n image: b.logo,\n url: b.url,\n data: { id: b.id, name: b.name, url: b.url, logo: b.logo, banner: b.banner ?? null },\n }));\n}\n\nasync function blogArticles(query: string): Promise<DevLookupItem[]> {\n const found = await collect(\n async (_page, cursor) => {\n const { data, cursor: pages } = await blog.articles.list(cursor ? { cursor } : undefined);\n return { items: data, next: pages?.next ?? null };\n },\n (a) => matches(a.name, query)\n );\n return found.map((a) => ({\n id: a.id,\n name: a.name,\n image: a.image,\n url: a.url,\n data: { id: a.id, name: a.name, url: a.url },\n }));\n}\n\nasync function blogCategories(query: string): Promise<DevLookupItem[]> {\n const { categories: list } = await blog.get();\n return list\n .filter((c) => matches(c.name, query))\n .slice(0, PER_PAGE)\n .map((c) => ({\n id: c.id,\n name: c.name,\n url: c.url,\n data: { id: c.id, name: c.name, url: c.url },\n }));\n}\n\nconst LOOKUPS: Record<DevLookupSource, (query: string) => Promise<DevLookupItem[]>> = {\n products,\n categories,\n brands,\n blog_articles: blogArticles,\n blog_categories: blogCategories,\n};\n\nexport function lookupInStore(source: DevLookupSource, query: string): Promise<DevLookupItem[]> {\n const lookup = LOOKUPS[source];\n if (!lookup) return Promise.reject(new Error(`no lookup for ${source}`));\n return lookup(query.trim());\n}\n"]}
|
package/dist/tanstack.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-
|
|
2
|
-
import { requestHostOf } from './chunk-
|
|
3
|
-
export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-
|
|
1
|
+
export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-YJWJPS25.js';
|
|
2
|
+
import { requestHostOf } from './chunk-4SCGS2CM.js';
|
|
3
|
+
export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-4SCGS2CM.js';
|
|
4
4
|
import './chunk-Z4Y55HWX.js';
|
|
5
|
-
export { tanstackHeadAdapter as head, withHead } from './chunk-
|
|
5
|
+
export { tanstackHeadAdapter as head, withHead } from './chunk-5UWRPWK2.js';
|
|
6
6
|
import { CRITICAL_STYLE_HREF } from './chunk-4FJGZQD3.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import { readNativeAppHeaders } from './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import { rootHead } from './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
7
|
+
import './chunk-AXWX5SJC.js';
|
|
8
|
+
import { readNativeAppHeaders } from './chunk-D53M5ASN.js';
|
|
9
|
+
import './chunk-KWJUCI7M.js';
|
|
10
|
+
import './chunk-LUPDYN4T.js';
|
|
11
|
+
import { rootHead } from './chunk-SXI2XBCC.js';
|
|
12
|
+
import './chunk-X55R4VVK.js';
|
|
13
|
+
import './chunk-7U5OLKOS.js';
|
|
14
|
+
import './chunk-WQPG22DY.js';
|
|
15
15
|
import './chunk-GD26FI4J.js';
|
|
16
|
-
import { maintenanceEvidence, MAINTENANCE_EVIDENCE_HEADER, maintenanceEvidenceHeader } from './chunk-
|
|
17
|
-
import './chunk-
|
|
18
|
-
import './chunk-
|
|
16
|
+
import { maintenanceEvidence, MAINTENANCE_EVIDENCE_HEADER, maintenanceEvidenceHeader } from './chunk-Q7E4TNN7.js';
|
|
17
|
+
import './chunk-RYGEIQWO.js';
|
|
18
|
+
import './chunk-RLJLG4EN.js';
|
|
19
19
|
import './chunk-OUW6WESU.js';
|
|
20
20
|
import './chunk-JWXJPJBO.js';
|
|
21
21
|
export { mergeDocumentDescriptors as mergeAttrs } from './chunk-CW625T2E.js';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
22
|
+
import './chunk-5A37NING.js';
|
|
23
|
+
import './chunk-E5DP3MHE.js';
|
|
24
24
|
import './chunk-Z5M4YYWT.js';
|
|
25
25
|
import './chunk-TYNZ5B2B.js';
|
|
26
26
|
import './chunk-BYMOPN2S.js';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-
|
|
29
|
-
import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId, legacyLocaleRedirectHref } from './chunk-
|
|
30
|
-
import { runWithTwilightContext, getTwilightContext } from './chunk-
|
|
31
|
-
export { getTwilightContext, runWithTwilightContext, updateTwilightContext } from './chunk-
|
|
27
|
+
import './chunk-3E3ABCPC.js';
|
|
28
|
+
import './chunk-NHA4SBKG.js';
|
|
29
|
+
import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId, legacyLocaleRedirectHref } from './chunk-FXVII733.js';
|
|
30
|
+
import { runWithTwilightContext, getTwilightContext } from './chunk-6K34BCUP.js';
|
|
31
|
+
export { getTwilightContext, runWithTwilightContext, updateTwilightContext } from './chunk-6K34BCUP.js';
|
|
32
32
|
import './chunk-T72DAX7R.js';
|
|
33
33
|
import './chunk-DF6FBKDN.js';
|
|
34
34
|
import './chunk-DGUM43GV.js';
|
|
@@ -78,8 +78,9 @@ export interface TwilightContext {
|
|
|
78
78
|
* The host this request arrived on, captured server-side.
|
|
79
79
|
*
|
|
80
80
|
* A theme worker is deployed with no vars and no bindings, so the request is
|
|
81
|
-
* the only thing that knows which storefront it is serving.
|
|
82
|
-
*
|
|
81
|
+
* the only thing that knows which storefront it is serving. Null in the browser,
|
|
82
|
+
* where nothing sets it: read {@link currentHost}, which falls back to
|
|
83
|
+
* `window.location.host`, rather than this.
|
|
83
84
|
*/
|
|
84
85
|
requestHost: string | null;
|
|
85
86
|
/** The native app's `s-app-*` headers when the request came from its webview; see {@link readNativeAppHeaders}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/twilight/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,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,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKlE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAM7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAM7C;AAED,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,sBAAsB,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,iBAAiB,CAmBnD;AAED,wBAAgB,kBAAkB,IAAI,eAAe,CAiFpD;AAED,wCAAwC;AACxC,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
package/dist/utils/baseHead.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { buildBaseHead, buildHreflangAlternates, localeToOgLocale, storePageUrl } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { buildBaseHead, buildHreflangAlternates, localeToOgLocale, storePageUrl } from '../chunk-RYGEIQWO.js';
|
|
2
|
+
import '../chunk-FXVII733.js';
|
|
3
|
+
import '../chunk-6K34BCUP.js';
|
|
4
4
|
import '../chunk-T72DAX7R.js';
|
|
5
5
|
import '../chunk-DGUM43GV.js';
|
|
6
6
|
//# sourceMappingURL=baseHead.js.map
|
package/dist/utils/cookies.d.ts
CHANGED
|
@@ -75,11 +75,25 @@ export declare function extractVersionIdFromCookies(cookieHeader: string | null)
|
|
|
75
75
|
* cannot identify one from its name. That is the preview host, where every theme
|
|
76
76
|
* under review answers on the same address, and local development.
|
|
77
77
|
*
|
|
78
|
-
* Adding an entry grants that host the ability to render any store on request
|
|
78
|
+
* Adding an entry grants that host the ability to render any store on request,
|
|
79
|
+
* **and** stops that host showing a closed or not-yet-launched store's maintenance
|
|
80
|
+
* page to anyone (see {@link isPreviewHost}): the preview host is where the theme
|
|
81
|
+
* editor frames a theme, and it has to render whatever it is customising. A host
|
|
82
|
+
* that serves many stores is not enough reason to add one here. If a merchant's
|
|
83
|
+
* customers can reach it, a closed store would stop showing them the page.
|
|
79
84
|
* Add nothing that a merchant's traffic reaches.
|
|
80
85
|
*/
|
|
81
86
|
export declare const STORE_ID_HOSTS: readonly string[];
|
|
82
87
|
export declare function isLoopback(hostname: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Whether this host is the hosted preview host: the one address the dashboard's
|
|
90
|
+
* theme editor and every theme under review answer on. Loopback is not it.
|
|
91
|
+
*
|
|
92
|
+
* Reads {@link STORE_ID_HOSTS} rather than keeping a second list, for the reason
|
|
93
|
+
* {@link allowsRequestStoreId} gives: two lists of "the preview host" is how they
|
|
94
|
+
* come to disagree. Exact hostnames only, so no suffix can admit another host.
|
|
95
|
+
*/
|
|
96
|
+
export declare function isPreviewHost(host: string | null | undefined): boolean;
|
|
83
97
|
/**
|
|
84
98
|
* Whether this host is allowed to let the request choose a store.
|
|
85
99
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../src/utils/cookies.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAC9C,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,iHAAiH;AACjH,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,mFAAmF;AACnF,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,QAAqB,CAAC;AAE1D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,6EAA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G,WAAW,GAAG,IAAI,KAAG,OAChC,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAYnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAGzC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export { stripUnsafeHtml } from '../chunk-RUHSV4Z6.js';
|
|
2
2
|
export { formatSallaPlural } from '../chunk-BT6HEEAP.js';
|
|
3
|
-
export { dispatchRouteChanged } from '../chunk-
|
|
3
|
+
export { dispatchRouteChanged } from '../chunk-AXWX5SJC.js';
|
|
4
4
|
export { sortOptions } from '../chunk-3LZJXKVO.js';
|
|
5
5
|
export { color } from '../chunk-VVZNW5CB.js';
|
|
6
|
-
export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-
|
|
6
|
+
export { applyAppScopeMocks, registerThemeHookSlots } from '../chunk-WQPG22DY.js';
|
|
7
7
|
export { mergeHead, resolveHead, setHeadAdapter } from '../chunk-GD26FI4J.js';
|
|
8
|
-
export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-
|
|
8
|
+
export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-RYGEIQWO.js';
|
|
9
9
|
export { asset, cdn, isPlaceholder } from '../chunk-ZCH7W7DZ.js';
|
|
10
10
|
export { mergeDocumentDescriptors, mergeElementAttrs, normalizeClasses, syncAttrsToElement, toReactProps } from '../chunk-CW625T2E.js';
|
|
11
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-E5DP3MHE.js';
|
|
12
12
|
import '../chunk-Z5M4YYWT.js';
|
|
13
|
-
export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-
|
|
14
|
-
export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-
|
|
15
|
-
import '../chunk-
|
|
13
|
+
export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-NHA4SBKG.js';
|
|
14
|
+
export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-FXVII733.js';
|
|
15
|
+
import '../chunk-6K34BCUP.js';
|
|
16
16
|
import '../chunk-T72DAX7R.js';
|
|
17
17
|
import '../chunk-DGUM43GV.js';
|
|
18
18
|
|
|
@@ -25,10 +25,40 @@ export declare function ownerCookieMatches(cookieHeader: string | null, settings
|
|
|
25
25
|
* Whether this visitor gets the maintenance page instead of the store.
|
|
26
26
|
*
|
|
27
27
|
* True only when the settings say the store is closed and nothing lets the visitor
|
|
28
|
-
* through: neither an owner view (the link or the cookie) nor
|
|
29
|
-
* preview
|
|
28
|
+
* through: neither an owner view (the link or the cookie), nor a session the
|
|
29
|
+
* backend marks `theme.mode === 'preview'`, nor the hosted preview host.
|
|
30
|
+
*
|
|
31
|
+
* The host is what lets the dashboard's theme editor through. The editor frames
|
|
32
|
+
* this storefront on the preview host, and that request has none of the other
|
|
33
|
+
* three: its URL carries no owner link, the owner cookie is `SameSite=Lax` and a
|
|
34
|
+
* cross-site frame neither stores nor sends it, and `theme.mode` is only ever
|
|
35
|
+
* `preview` from a PHP session, which the worker's sessionless API call has not got.
|
|
36
|
+
* The Twig storefront exempts its preview hosts the same way (`CheckStoreStatus`
|
|
37
|
+
* skips `hasCustomDomain()`), and for the same reasons: a merchant customising a
|
|
38
|
+
* store that is closed, or not launched yet, still has to see what they are
|
|
39
|
+
* customising. A merchant's own domain is never a preview host, so a customer of a
|
|
40
|
+
* closed store still gets the page.
|
|
41
|
+
*
|
|
42
|
+
* Loopback is not exempt: on a dev server a closed store shows the maintenance page
|
|
43
|
+
* on purpose, so a theme author can see and test it (see `MaintenanceDevBar`).
|
|
44
|
+
*
|
|
45
|
+
* @param host - the host the request arrived on; see {@link isPreviewHost}. Required
|
|
46
|
+
* rather than optional: a caller that forgot it would quietly bring the editor bug back.
|
|
47
|
+
*/
|
|
48
|
+
export declare function showsMaintenancePage(settings: StoreContext | null | undefined, viewAsOwner: boolean, host: string | null | undefined): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The settings the Salla SDK is initialised with, told the store is open when the
|
|
51
|
+
* page is on the preview host.
|
|
52
|
+
*
|
|
53
|
+
* {@link showsMaintenancePage} lets the preview host render a closed store, but the
|
|
54
|
+
* settings still say `maintenance: true`, and the SDK reads that to draw its
|
|
55
|
+
* merchant maintenance bar. In the theme editor that bar would sit over the very
|
|
56
|
+
* page being customised, offering a "turn off maintenance" button to everyone who
|
|
57
|
+
* looks at the preview, a reviewer included. Twig's editor shows no bar either:
|
|
58
|
+
* `CheckStoreStatus` returns before it adds one. The bar is all the SDK uses the flag
|
|
59
|
+
* for, and the maintenance page is decided elsewhere, so nothing else changes.
|
|
30
60
|
*/
|
|
31
|
-
export declare function
|
|
61
|
+
export declare function withoutMaintenanceOnPreviewHost<T extends Pick<StoreContext, 'maintenance'>>(settings: T, host: string | null | undefined): T;
|
|
32
62
|
/**
|
|
33
63
|
* The response header a maintenance 503 carries saying which settings decided it.
|
|
34
64
|
*
|
|
@@ -65,8 +95,10 @@ export declare function isNotLaunchedNotice(details: MaintenanceDetails | null |
|
|
|
65
95
|
* fields only inside Twig's owner session, which the engine's settings request has
|
|
66
96
|
* none of, so the SDK, handed the settings as they are, draws an empty button. The
|
|
67
97
|
* SDK renders only in the store view, so `maintenance: true` there means the owner
|
|
68
|
-
* (or
|
|
69
|
-
*
|
|
98
|
+
* (or a session the backend marks `theme.mode === 'preview'`, where the SDK mounts
|
|
99
|
+
* no bar; the preview host never gets here, see {@link withoutMaintenanceOnPreviewHost}):
|
|
100
|
+
* the three fields get what Twig's owner branch gives them. The merchant's own title
|
|
101
|
+
* and message stay as they are.
|
|
70
102
|
*/
|
|
71
103
|
export declare function withOwnerMaintenanceButton<T extends Pick<StoreContext, 'maintenance' | 'maintenance_details'>>(settings: T, buttonTitle: string): T;
|
|
72
104
|
//# sourceMappingURL=maintenance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../src/utils/maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAUzD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWjG;AAED,gEAAgE;AAChE,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GACxC,OAAO,CAGT;AAED
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../src/utils/maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAUzD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAWjG;AAED,gEAAgE;AAChE,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GACxC,OAAO,CAGT;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,OAAO,CAOT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,EACzF,QAAQ,EAAE,CAAC,EACX,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,CAAC,CAGH;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB;AAaD,sFAAsF;AACtF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAIlF;AAOD,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,kEAAgE,CAAC;AAEtG;;;;;;;;;;GAUG;AAEH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,qBAAqB,CAAC,EACnE,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAYrC"}
|
|
@@ -57,6 +57,16 @@ export declare function resolveStoreBase(): string | null;
|
|
|
57
57
|
* request on the server, what SSR published in the browser.
|
|
58
58
|
*/
|
|
59
59
|
export declare function resolveStoreBaseFollowsLocale(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The host this page was asked for: the request's on the server, the browser's own in
|
|
62
|
+
* the browser.
|
|
63
|
+
*
|
|
64
|
+
* The middleware captures `requestHost` from the request and nothing sets it in the
|
|
65
|
+
* browser, so the browser reads `window.location.host`. Both sides then name the same
|
|
66
|
+
* host for the same page, which is what keeps a decision made from it (the store base,
|
|
67
|
+
* the maintenance page) from flipping between the server render and hydration.
|
|
68
|
+
*/
|
|
69
|
+
export declare function currentHost(): string | null;
|
|
60
70
|
/**
|
|
61
71
|
* The address this page should be loaded from instead, when the store is the root
|
|
62
72
|
* of every URL on this host and this request did not use it; null otherwise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-identity.d.ts","sourceRoot":"","sources":["../../src/utils/store-identity.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAoBhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAUhD;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAOvD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"store-identity.d.ts","sourceRoot":"","sources":["../../src/utils/store-identity.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAoBhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAUhD;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAOvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,IAAI,CAI3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAOf"}
|
package/dist/vite/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { validateTwilightManifest } from '../chunk-X5NK4TZH.js';
|
|
2
2
|
export { REACT_THEME_TYPE, describeThemeTypeIssue, getThemeType, isReactThemeManifest, validateTwilightManifest } from '../chunk-X5NK4TZH.js';
|
|
3
|
-
import { tanstackHeadAdapter } from '../chunk-
|
|
3
|
+
import { tanstackHeadAdapter } from '../chunk-5UWRPWK2.js';
|
|
4
4
|
import { nextjsHeadAdapter } from '../chunk-HOSHJBPS.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-X55R4VVK.js';
|
|
6
6
|
import { EMPTY_DEV_SCHEMA, DEV_PREVIEW_GLOBAL, DEV_PREVIEW_ENDPOINT, normalizePreviewState, DEV_PREVIEW_EVENT, DEV_EDITOR_PATH, DEV_PREVIEW_IMAGE_ENDPOINT, DEV_PREVIEW_IMAGE_MAX_BYTES } from '../chunk-OXMUPNMH.js';
|
|
7
7
|
import { setHeadAdapter } from '../chunk-GD26FI4J.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-RYGEIQWO.js';
|
|
9
9
|
import { RouteId } from '../chunk-OUW6WESU.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-FXVII733.js';
|
|
11
|
+
import '../chunk-6K34BCUP.js';
|
|
12
12
|
import '../chunk-T72DAX7R.js';
|
|
13
13
|
import '../chunk-DGUM43GV.js';
|
|
14
14
|
import { readFile, readdir, writeFile, mkdir } from 'fs/promises';
|
package/package.json
CHANGED
|
@@ -1,13 +1,47 @@
|
|
|
1
|
-
import { memo, useState, useEffect } from 'react';
|
|
1
|
+
import { memo, useState, useEffect, type CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
// Placeholder hints a bundle declares per component under `props` in its
|
|
4
|
+
// twilight-bundle.json; the store API passes them as `component_props`. Each maps 1:1 to an
|
|
5
|
+
// attribute on <salla-custom-component>, which reserves the component's space until the
|
|
6
|
+
// bundle renders.
|
|
7
|
+
// @see https://github.com/SallaApp/twilight-bundles/blob/master/packages/starter-kit/README.md#component-skeleton--placeholder
|
|
8
|
+
const SIZE_PROPS = ['min-height', 'height', 'width', 'aspect-ratio'] as const;
|
|
9
|
+
const SKELETON_PROPS: readonly string[] = [...SIZE_PROPS, 'skeleton-style'];
|
|
10
|
+
|
|
11
|
+
type SkeletonProps = Record<string, string>;
|
|
2
12
|
|
|
3
13
|
export interface BundleComponentProps {
|
|
4
14
|
data: {
|
|
5
15
|
component_name: string;
|
|
6
16
|
bundle_id: string;
|
|
17
|
+
component_props?: SkeletonProps;
|
|
7
18
|
[key: string]: unknown;
|
|
8
19
|
};
|
|
9
20
|
}
|
|
10
21
|
|
|
22
|
+
function pickSkeletonProps(props: unknown): SkeletonProps {
|
|
23
|
+
if (!props || typeof props !== 'object') return {};
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
Object.entries(props).filter(
|
|
26
|
+
([name, value]) =>
|
|
27
|
+
SKELETON_PROPS.includes(name) && typeof value === 'string' && value.trim() !== ''
|
|
28
|
+
)
|
|
29
|
+
) as SkeletonProps;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Until mount there is no <salla-custom-component>, so hold the same footprint with a plain
|
|
33
|
+
// block — otherwise the server HTML has nothing here and the page shifts once it mounts.
|
|
34
|
+
function reservedSizeStyle(props: SkeletonProps): CSSProperties | undefined {
|
|
35
|
+
const sizes = SIZE_PROPS.filter((name) => props[name]);
|
|
36
|
+
if (!sizes.length) return undefined;
|
|
37
|
+
return Object.fromEntries(
|
|
38
|
+
sizes.map((name) => [
|
|
39
|
+
name.replace(/-([a-z])/g, (_, char: string) => char.toUpperCase()),
|
|
40
|
+
props[name],
|
|
41
|
+
])
|
|
42
|
+
) as CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
|
|
11
45
|
export const BundleComponent = memo(function BundleComponent(props: BundleComponentProps) {
|
|
12
46
|
const [mounted, setMounted] = useState(false);
|
|
13
47
|
|
|
@@ -15,11 +49,19 @@ export const BundleComponent = memo(function BundleComponent(props: BundleCompon
|
|
|
15
49
|
setMounted(true);
|
|
16
50
|
}, []);
|
|
17
51
|
|
|
52
|
+
const {
|
|
53
|
+
component_name: componentName,
|
|
54
|
+
bundle_id: bundleId,
|
|
55
|
+
component_props: componentProps,
|
|
56
|
+
...rest
|
|
57
|
+
} = props.data;
|
|
58
|
+
const skeletonProps = pickSkeletonProps(componentProps);
|
|
59
|
+
|
|
18
60
|
if (!mounted) {
|
|
19
|
-
|
|
61
|
+
const style = reservedSizeStyle(skeletonProps);
|
|
62
|
+
return style ? <div aria-hidden="true" style={style} /> : null;
|
|
20
63
|
}
|
|
21
64
|
|
|
22
|
-
const { component_name: componentName, bundle_id: bundleId, ...rest } = props.data;
|
|
23
65
|
const config = JSON.stringify(rest);
|
|
24
66
|
|
|
25
67
|
return (
|
|
@@ -28,6 +70,7 @@ export const BundleComponent = memo(function BundleComponent(props: BundleCompon
|
|
|
28
70
|
component-name={componentName}
|
|
29
71
|
bundle-id={bundleId}
|
|
30
72
|
config={config}
|
|
73
|
+
{...skeletonProps}
|
|
31
74
|
suppressHydrationWarning
|
|
32
75
|
/>
|
|
33
76
|
</>
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
import { syncSdkLocale, syncSdkThemeVersion } from '../../utils/sdk-helpers';
|
|
32
32
|
import { SettingsError } from '../../utils/errors';
|
|
33
33
|
import {
|
|
34
|
+
currentHost,
|
|
34
35
|
resolveStoreBase,
|
|
35
36
|
resolveStoreBaseFollowsLocale,
|
|
36
37
|
resolveStoreBaseRedirect,
|
|
@@ -174,13 +175,19 @@ const rememberOwnerView = createIsomorphicFn()
|
|
|
174
175
|
* session. Here the link grants a session cookie, and the cookie or the link is the
|
|
175
176
|
* owner view. A customer gets the maintenance page, and `twilightMiddleware` turns the
|
|
176
177
|
* render into a 503 (see `withMaintenanceStatus`).
|
|
178
|
+
*
|
|
179
|
+
* The preview host is let through whoever is looking, so the dashboard's theme editor
|
|
180
|
+
* renders a closed or not-yet-launched store; see {@link showsMaintenancePage}. The host
|
|
181
|
+
* is the request's on the server and the browser's own in the browser, so a navigation
|
|
182
|
+
* inside the editor's frame, which carries no owner link, is decided the same way as the
|
|
183
|
+
* first load.
|
|
177
184
|
*/
|
|
178
185
|
export function resolveMaintenance(href: string, settings: StoreContext): boolean {
|
|
179
186
|
const fromLink = ownerLinkMatches(href, settings);
|
|
180
187
|
const storeId = settings.store?.id;
|
|
181
188
|
if (fromLink && storeId != null) rememberOwnerView(String(storeId));
|
|
182
189
|
const viewAsOwner = fromLink || ownerCookieMatches(requestCookies(), settings);
|
|
183
|
-
return showsMaintenancePage(settings, viewAsOwner);
|
|
190
|
+
return showsMaintenancePage(settings, viewAsOwner, currentHost());
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
/** On the server, once the settings are in: {@link alignRequestScopeType}, then {@link persistRequestScope}. */
|