@salla.sa/twilight-theme-engine 1.0.186 → 1.0.188
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-5A4JIBLL.js → AddToCartForm-3STDRYGB.js} +3 -3
- package/dist/{AddToCartForm-5A4JIBLL.js.map → AddToCartForm-3STDRYGB.js.map} +1 -1
- package/dist/{BlogAuthorPage-BMVQU52G.js → BlogAuthorPage-Q7FTVCGB.js} +20 -20
- package/dist/{BlogAuthorPage-BMVQU52G.js.map → BlogAuthorPage-Q7FTVCGB.js.map} +1 -1
- package/dist/{BlogCategoryPage-VQB2GPQJ.js → BlogCategoryPage-IWZPMWUP.js} +20 -20
- package/dist/{BlogCategoryPage-VQB2GPQJ.js.map → BlogCategoryPage-IWZPMWUP.js.map} +1 -1
- package/dist/{BlogPage-2PVU76RY.js → BlogPage-XZ47JZLY.js} +18 -18
- package/dist/{BlogPage-2PVU76RY.js.map → BlogPage-XZ47JZLY.js.map} +1 -1
- package/dist/{BlogSinglePage-TUP6H6LR.js → BlogSinglePage-HMJDK2RC.js} +18 -18
- package/dist/{BlogSinglePage-TUP6H6LR.js.map → BlogSinglePage-HMJDK2RC.js.map} +1 -1
- package/dist/{BlogTagPage-3LVZOCXD.js → BlogTagPage-ZZ23AZOY.js} +20 -20
- package/dist/{BlogTagPage-3LVZOCXD.js.map → BlogTagPage-ZZ23AZOY.js.map} +1 -1
- package/dist/{BrandsPage-IKXVPS6D.js → BrandsPage-U7M56AKW.js} +19 -19
- package/dist/{BrandsPage-IKXVPS6D.js.map → BrandsPage-U7M56AKW.js.map} +1 -1
- package/dist/{Breadcrumb-RDJZ2ZLB.js → Breadcrumb-XA7NJB3I.js} +18 -18
- package/dist/{Breadcrumb-RDJZ2ZLB.js.map → Breadcrumb-XA7NJB3I.js.map} +1 -1
- package/dist/{CanvasOverlay-OFJN4QZX.js → CanvasOverlay-FLWFB5TF.js} +4 -4
- package/dist/{CanvasOverlay-OFJN4QZX.js.map → CanvasOverlay-FLWFB5TF.js.map} +1 -1
- package/dist/{CartItem-I5CXXNRD.js → CartItem-MJZICIQM.js} +18 -18
- package/dist/{CartItem-I5CXXNRD.js.map → CartItem-MJZICIQM.js.map} +1 -1
- package/dist/{CartSummary-5TDULSFS.js → CartSummary-APN6RTOS.js} +18 -18
- package/dist/{CartSummary-5TDULSFS.js.map → CartSummary-APN6RTOS.js.map} +1 -1
- package/dist/{Copyright-4IBWI43E.js → Copyright-U6U5KPNW.js} +3 -3
- package/dist/{Copyright-4IBWI43E.js.map → Copyright-U6U5KPNW.js.map} +1 -1
- package/dist/{CustomerLayout-32UTZ4U5.js → CustomerLayout-CH5D5TNX.js} +18 -18
- package/dist/{CustomerLayout-32UTZ4U5.js.map → CustomerLayout-CH5D5TNX.js.map} +1 -1
- package/dist/{Footer-WG66WSI4.js → Footer-T3RCIAQT.js} +3 -3
- package/dist/{Footer-WG66WSI4.js.map → Footer-T3RCIAQT.js.map} +1 -1
- package/dist/GoogleTag-VD4JMT3L.js +15 -0
- package/dist/{GoogleTag-V7FHUIZW.js.map → GoogleTag-VD4JMT3L.js.map} +1 -1
- package/dist/{Header-C6QOJTFF.js → Header-7L6OXYSP.js} +8 -8
- package/dist/{Header-C6QOJTFF.js.map → Header-7L6OXYSP.js.map} +1 -1
- package/dist/{LatestProducts-63LGH5AD.js → LatestProducts-XE7IRB5G.js} +20 -20
- package/dist/{LatestProducts-63LGH5AD.js.map → LatestProducts-XE7IRB5G.js.map} +1 -1
- package/dist/{LiveEditorBar-3AL2IGTL.js → LiveEditorBar-4C7Z7K3M.js} +3 -3
- package/dist/{LiveEditorBar-3AL2IGTL.js.map → LiveEditorBar-4C7Z7K3M.js.map} +1 -1
- package/dist/{LoyaltyPage-BNHK5VHM.js → LoyaltyPage-P7CY3NDD.js} +18 -18
- package/dist/{LoyaltyPage-BNHK5VHM.js.map → LoyaltyPage-P7CY3NDD.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-5V263ISD.js → LoyaltyPointsPage-ONKOWZG3.js} +6 -6
- package/dist/{LoyaltyPointsPage-5V263ISD.js.map → LoyaltyPointsPage-ONKOWZG3.js.map} +1 -1
- package/dist/{MainMenu-SJL4B3EZ.js → MainMenu-TDEMIAVE.js} +5 -5
- package/dist/{MainMenu-SJL4B3EZ.js.map → MainMenu-TDEMIAVE.js.map} +1 -1
- package/dist/{MasterLayout-PZ3P54GT.js → MasterLayout-HTDOBN3V.js} +18 -18
- package/dist/{MasterLayout-PZ3P54GT.js.map → MasterLayout-HTDOBN3V.js.map} +1 -1
- package/dist/{MobileMenu-YP3VAP5X.js → MobileMenu-E2Q4NACS.js} +19 -19
- package/dist/{MobileMenu-YP3VAP5X.js.map → MobileMenu-E2Q4NACS.js.map} +1 -1
- package/dist/{NotificationsPage-CNZNP5MT.js → NotificationsPage-7PCULMIT.js} +18 -18
- package/dist/{NotificationsPage-CNZNP5MT.js.map → NotificationsPage-7PCULMIT.js.map} +1 -1
- package/dist/{OrderSinglePage-SPRSVZAA.js → OrderSinglePage-Z26AYA2A.js} +19 -19
- package/dist/{OrderSinglePage-SPRSVZAA.js.map → OrderSinglePage-Z26AYA2A.js.map} +1 -1
- package/dist/{OrdersPage-24NCQYJ5.js → OrdersPage-KVFEL4GF.js} +18 -18
- package/dist/{OrdersPage-24NCQYJ5.js.map → OrdersPage-KVFEL4GF.js.map} +1 -1
- package/dist/{PageSingle-L5EAMR3X.js → PageSingle-4BOTNKBG.js} +3 -3
- package/dist/{PageSingle-L5EAMR3X.js.map → PageSingle-4BOTNKBG.js.map} +1 -1
- package/dist/ProductDetails-U3JJQ3QA.js +24 -0
- package/dist/ProductDetails-U3JJQ3QA.js.map +1 -0
- package/dist/{ProfilePage-E44G3WVG.js → ProfilePage-PVV5HUN7.js} +18 -18
- package/dist/{ProfilePage-E44G3WVG.js.map → ProfilePage-PVV5HUN7.js.map} +1 -1
- package/dist/{ReviewsPage-OIUFR3EP.js → ReviewsPage-P7C2DYNY.js} +3 -3
- package/dist/{ReviewsPage-OIUFR3EP.js.map → ReviewsPage-P7C2DYNY.js.map} +1 -1
- package/dist/{SeoCartWidget-JK52NGON.js → SeoCartWidget-CH6ZDLJF.js} +18 -18
- package/dist/{SeoCartWidget-JK52NGON.js.map → SeoCartWidget-CH6ZDLJF.js.map} +1 -1
- package/dist/{SettingsPage-6S3MY3PF.js → SettingsPage-J3CFXCXM.js} +18 -18
- package/dist/{SettingsPage-6S3MY3PF.js.map → SettingsPage-J3CFXCXM.js.map} +1 -1
- package/dist/{StoreClosedNotification-XKNI3VAT.js → StoreClosedNotification-JD52A2L7.js} +19 -19
- package/dist/{StoreClosedNotification-XKNI3VAT.js.map → StoreClosedNotification-JD52A2L7.js.map} +1 -1
- package/dist/{TestimonialsPage-PZX5FRHU.js → TestimonialsPage-YVNTJCVN.js} +3 -3
- package/dist/{TestimonialsPage-PZX5FRHU.js.map → TestimonialsPage-YVNTJCVN.js.map} +1 -1
- package/dist/{ThankYouPage-SNRSPL5U.js → ThankYouPage-L3VVD4L4.js} +18 -18
- package/dist/{ThankYouPage-SNRSPL5U.js.map → ThankYouPage-L3VVD4L4.js.map} +1 -1
- package/dist/{WalletPage-563XMOW5.js → WalletPage-VQRX53I7.js} +19 -19
- package/dist/{WalletPage-563XMOW5.js.map → WalletPage-VQRX53I7.js.map} +1 -1
- package/dist/{WebMcpTools-PYYSHW26.js → WebMcpTools-5ZOYZK6M.js} +5 -5
- package/dist/{WebMcpTools-PYYSHW26.js.map → WebMcpTools-5ZOYZK6M.js.map} +1 -1
- package/dist/{WishlistPage-BAFIG6RB.js → WishlistPage-INPQNNN6.js} +20 -20
- package/dist/{WishlistPage-BAFIG6RB.js.map → WishlistPage-INPQNNN6.js.map} +1 -1
- package/dist/api/advertisement.js +2 -2
- package/dist/api/apps.js +2 -2
- package/dist/api/blog.js +3 -3
- package/dist/api/brands.js +3 -3
- package/dist/api/cart.js +3 -3
- package/dist/api/category.js +3 -3
- package/dist/api/client.js +1 -1
- package/dist/api/custom-url.js +2 -2
- package/dist/api/home.js +2 -2
- package/dist/api/loyalty.js +3 -3
- package/dist/api/menu.js +2 -2
- package/dist/api/notification.js +2 -2
- package/dist/api/order.js +3 -3
- package/dist/api/page.js +3 -3
- package/dist/api/product.js +3 -3
- package/dist/api/profile.js +1 -1
- package/dist/api/store.js +2 -2
- package/dist/api/translations.js +2 -2
- package/dist/api/user.js +2 -2
- package/dist/api/wallet.js +2 -2
- package/dist/api/wishlist.js +4 -4
- package/dist/{chunk-XVTXIVFM.js → chunk-2H74264G.js} +5 -5
- package/dist/{chunk-XVTXIVFM.js.map → chunk-2H74264G.js.map} +1 -1
- package/dist/{chunk-KZEXDR6O.js → chunk-2KDWKQTC.js} +3 -3
- package/dist/{chunk-KZEXDR6O.js.map → chunk-2KDWKQTC.js.map} +1 -1
- package/dist/{chunk-R5T5XOT6.js → chunk-2TRSXLGJ.js} +5 -5
- package/dist/{chunk-R5T5XOT6.js.map → chunk-2TRSXLGJ.js.map} +1 -1
- package/dist/{chunk-C5HAMBR3.js → chunk-36DUIP2H.js} +4 -4
- package/dist/{chunk-C5HAMBR3.js.map → chunk-36DUIP2H.js.map} +1 -1
- package/dist/{chunk-OB7HFA7T.js → chunk-3UZXUVVO.js} +4 -4
- package/dist/{chunk-OB7HFA7T.js.map → chunk-3UZXUVVO.js.map} +1 -1
- package/dist/{chunk-GWT6MHWC.js → chunk-4CEURRWI.js} +4 -4
- package/dist/{chunk-GWT6MHWC.js.map → chunk-4CEURRWI.js.map} +1 -1
- package/dist/{chunk-ZUUGJHI3.js → chunk-4DEJOPG6.js} +3 -3
- package/dist/{chunk-ZUUGJHI3.js.map → chunk-4DEJOPG6.js.map} +1 -1
- package/dist/{chunk-X25XUDFI.js → chunk-54DG7FCT.js} +7 -7
- package/dist/{chunk-X25XUDFI.js.map → chunk-54DG7FCT.js.map} +1 -1
- package/dist/{chunk-BRQOHQB3.js → chunk-5PEBHTHI.js} +7 -7
- package/dist/{chunk-BRQOHQB3.js.map → chunk-5PEBHTHI.js.map} +1 -1
- package/dist/{chunk-VLLKXG5J.js → chunk-6SD5P2T5.js} +5 -5
- package/dist/{chunk-VLLKXG5J.js.map → chunk-6SD5P2T5.js.map} +1 -1
- package/dist/{chunk-VQZU5VT3.js → chunk-7BSJCVUD.js} +28 -15
- package/dist/chunk-7BSJCVUD.js.map +1 -0
- package/dist/{chunk-XETJVOYZ.js → chunk-7J52H4P2.js} +7 -7
- package/dist/{chunk-XETJVOYZ.js.map → chunk-7J52H4P2.js.map} +1 -1
- package/dist/{chunk-7U3JGTMX.js → chunk-A563ZHY5.js} +3 -3
- package/dist/{chunk-7U3JGTMX.js.map → chunk-A563ZHY5.js.map} +1 -1
- package/dist/{chunk-AXVPFA2U.js → chunk-BGB557LQ.js} +14 -14
- package/dist/{chunk-AXVPFA2U.js.map → chunk-BGB557LQ.js.map} +1 -1
- package/dist/{chunk-SG5PJAKP.js → chunk-BHPDI7AZ.js} +4 -4
- package/dist/{chunk-SG5PJAKP.js.map → chunk-BHPDI7AZ.js.map} +1 -1
- package/dist/{chunk-XPT4ZX7U.js → chunk-BWL3QXOS.js} +4 -4
- package/dist/{chunk-XPT4ZX7U.js.map → chunk-BWL3QXOS.js.map} +1 -1
- package/dist/{chunk-YCQK4JRW.js → chunk-C42YDY5K.js} +3 -3
- package/dist/{chunk-YCQK4JRW.js.map → chunk-C42YDY5K.js.map} +1 -1
- package/dist/{ProductDetails-PED2NZEJ.js → chunk-CNN757MD.js} +5 -18
- package/dist/chunk-CNN757MD.js.map +1 -0
- package/dist/{chunk-7B3HAC7N.js → chunk-E2HCPUBR.js} +3 -3
- package/dist/{chunk-7B3HAC7N.js.map → chunk-E2HCPUBR.js.map} +1 -1
- package/dist/{chunk-IQOKWDKP.js → chunk-GEB5BQHO.js} +4 -4
- package/dist/{chunk-IQOKWDKP.js.map → chunk-GEB5BQHO.js.map} +1 -1
- package/dist/{chunk-5MANTOZ5.js → chunk-GSS3JLFP.js} +4 -4
- package/dist/{chunk-5MANTOZ5.js.map → chunk-GSS3JLFP.js.map} +1 -1
- package/dist/{chunk-4XWOLTPZ.js → chunk-I6EEFDD2.js} +20 -20
- package/dist/{chunk-4XWOLTPZ.js.map → chunk-I6EEFDD2.js.map} +1 -1
- package/dist/{chunk-UPKX5CSP.js → chunk-JPMQPU72.js} +3 -3
- package/dist/{chunk-UPKX5CSP.js.map → chunk-JPMQPU72.js.map} +1 -1
- package/dist/{chunk-6MWADUFG.js → chunk-JPZTLP7F.js} +3 -3
- package/dist/{chunk-6MWADUFG.js.map → chunk-JPZTLP7F.js.map} +1 -1
- package/dist/{chunk-IJVAVBIM.js → chunk-KF7UMG3F.js} +3 -3
- package/dist/{chunk-IJVAVBIM.js.map → chunk-KF7UMG3F.js.map} +1 -1
- package/dist/{chunk-XKAL233L.js → chunk-M5TB3ZJ4.js} +4 -4
- package/dist/{chunk-XKAL233L.js.map → chunk-M5TB3ZJ4.js.map} +1 -1
- package/dist/{chunk-N7YB3OG4.js → chunk-MBXI7567.js} +3 -3
- package/dist/{chunk-N7YB3OG4.js.map → chunk-MBXI7567.js.map} +1 -1
- package/dist/{chunk-FICNVVC2.js → chunk-NEMLRRIS.js} +3 -3
- package/dist/{chunk-FICNVVC2.js.map → chunk-NEMLRRIS.js.map} +1 -1
- package/dist/{chunk-YWPVPERZ.js → chunk-NWMTGBCN.js} +3 -3
- package/dist/{chunk-YWPVPERZ.js.map → chunk-NWMTGBCN.js.map} +1 -1
- package/dist/{chunk-ZOH4AEIE.js → chunk-NWT2ZWNM.js} +3 -3
- package/dist/{chunk-ZOH4AEIE.js.map → chunk-NWT2ZWNM.js.map} +1 -1
- package/dist/{chunk-R2VVSCFJ.js → chunk-PJJQV3GW.js} +6 -6
- package/dist/{chunk-R2VVSCFJ.js.map → chunk-PJJQV3GW.js.map} +1 -1
- package/dist/{chunk-5TVOTTHS.js → chunk-PLDWDVOP.js} +3 -3
- package/dist/{chunk-5TVOTTHS.js.map → chunk-PLDWDVOP.js.map} +1 -1
- package/dist/{chunk-Z6ZZRFM4.js → chunk-PLJ4L2KC.js} +4 -4
- package/dist/{chunk-Z6ZZRFM4.js.map → chunk-PLJ4L2KC.js.map} +1 -1
- package/dist/{chunk-BICEPRPK.js → chunk-QDE37XJB.js} +4 -4
- package/dist/{chunk-BICEPRPK.js.map → chunk-QDE37XJB.js.map} +1 -1
- package/dist/{chunk-7KRZ5LXJ.js → chunk-RBGCTWGJ.js} +4 -4
- package/dist/{chunk-7KRZ5LXJ.js.map → chunk-RBGCTWGJ.js.map} +1 -1
- package/dist/{chunk-SUW3BMDE.js → chunk-SFXQMG3D.js} +4 -4
- package/dist/{chunk-SUW3BMDE.js.map → chunk-SFXQMG3D.js.map} +1 -1
- package/dist/chunk-SNTUACTC.js +53 -0
- package/dist/chunk-SNTUACTC.js.map +1 -0
- package/dist/{chunk-ANTDJTQR.js → chunk-SR4YSJAF.js} +3 -3
- package/dist/{chunk-ANTDJTQR.js.map → chunk-SR4YSJAF.js.map} +1 -1
- package/dist/{chunk-JXUASMA7.js → chunk-T4PRV2MJ.js} +3 -3
- package/dist/{chunk-JXUASMA7.js.map → chunk-T4PRV2MJ.js.map} +1 -1
- package/dist/{chunk-BAVTAOPI.js → chunk-TJK4DVQM.js} +3 -2
- package/dist/chunk-TJK4DVQM.js.map +1 -0
- package/dist/{chunk-6HEK3NUM.js → chunk-UKLMGZZ2.js} +3 -3
- package/dist/{chunk-6HEK3NUM.js.map → chunk-UKLMGZZ2.js.map} +1 -1
- package/dist/{chunk-7RKZXLBL.js → chunk-V2OR5VQ2.js} +3 -3
- package/dist/{chunk-7RKZXLBL.js.map → chunk-V2OR5VQ2.js.map} +1 -1
- package/dist/{chunk-WL5KWZL2.js → chunk-V5AMXA5A.js} +4 -4
- package/dist/{chunk-WL5KWZL2.js.map → chunk-V5AMXA5A.js.map} +1 -1
- package/dist/{chunk-SFK7LAHZ.js → chunk-VBZIFYQ7.js} +3 -3
- package/dist/{chunk-SFK7LAHZ.js.map → chunk-VBZIFYQ7.js.map} +1 -1
- package/dist/{chunk-H6FRRUIU.js → chunk-VGJMO6QS.js} +4 -4
- package/dist/{chunk-H6FRRUIU.js.map → chunk-VGJMO6QS.js.map} +1 -1
- package/dist/{chunk-ONHZXJAS.js → chunk-VPGGPNSL.js} +3 -3
- package/dist/{chunk-ONHZXJAS.js.map → chunk-VPGGPNSL.js.map} +1 -1
- package/dist/{chunk-FDFL6QKB.js → chunk-X2SIGWUY.js} +3 -3
- package/dist/{chunk-FDFL6QKB.js.map → chunk-X2SIGWUY.js.map} +1 -1
- package/dist/{chunk-INLVNPJ6.js → chunk-X3GAERFK.js} +3 -3
- package/dist/{chunk-INLVNPJ6.js.map → chunk-X3GAERFK.js.map} +1 -1
- package/dist/{chunk-VI7RQJS7.js → chunk-YJROW2HU.js} +4 -4
- package/dist/{chunk-VI7RQJS7.js.map → chunk-YJROW2HU.js.map} +1 -1
- package/dist/{chunk-6RJFC2TQ.js → chunk-YMNCGXFV.js} +3 -3
- package/dist/{chunk-6RJFC2TQ.js.map → chunk-YMNCGXFV.js.map} +1 -1
- package/dist/{chunk-AGKNWEG6.js → chunk-Z4D5KQK5.js} +3 -3
- package/dist/{chunk-AGKNWEG6.js.map → chunk-Z4D5KQK5.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 +16 -16
- package/dist/components/home/index.js +21 -21
- package/dist/components/layout/index.js +4 -4
- package/dist/components/live-editor/moves.d.ts +2 -2
- package/dist/components/live-editor/moves.d.ts.map +1 -1
- package/dist/components/product/ProductDetails.d.ts +3 -0
- package/dist/components/product/ProductDetails.d.ts.map +1 -1
- package/dist/components/product/index.js +18 -18
- package/dist/components/store/index.js +17 -17
- package/dist/components/tracking/index.js +6 -6
- package/dist/{custom-urls-2CS3REHI.js → custom-urls-2P3OJVMY.js} +7 -7
- package/dist/{custom-urls-2CS3REHI.js.map → custom-urls-2P3OJVMY.js.map} +1 -1
- package/dist/dev/editor/index.js +1 -1
- package/dist/dev/index.js +1 -1
- package/dist/{document-class-LDIJOBHB.js → document-class-ERIBJEGK.js} +17 -17
- package/dist/{document-class-LDIJOBHB.js.map → document-class-ERIBJEGK.js.map} +1 -1
- package/dist/hooks/index.js +16 -16
- package/dist/hooks/useGtm.js +16 -16
- package/dist/hooks/useMoney.js +16 -16
- package/dist/hooks/useStore.js +16 -16
- package/dist/hooks/useUser.js +3 -3
- package/dist/index.js +16 -16
- package/dist/{navigation-UOOAMJLY.js → navigation-HP5LIBNV.js} +5 -5
- package/dist/{navigation-UOOAMJLY.js.map → navigation-HP5LIBNV.js.map} +1 -1
- package/dist/{navigation-RLL752ZZ.js → navigation-O6I4V3JY.js} +4 -4
- package/dist/{navigation-RLL752ZZ.js.map → navigation-O6I4V3JY.js.map} +1 -1
- package/dist/{not-found-QYWU3B4R.js → not-found-EVMN6AEW.js} +19 -19
- package/dist/{not-found-QYWU3B4R.js.map → not-found-EVMN6AEW.js.map} +1 -1
- package/dist/providers/index.js +16 -16
- package/dist/routes/account/orders.js +4 -4
- package/dist/routes/account.js +13 -13
- package/dist/routes/blog.js +8 -8
- package/dist/routes/brands.js +4 -4
- package/dist/routes/cart.js +27 -25
- package/dist/routes/cart.js.map +1 -1
- package/dist/routes/home/HomePage.d.ts +1 -1
- package/dist/routes/home/HomePage.d.ts.map +1 -1
- package/dist/routes/home/blockList.d.ts +4 -0
- package/dist/routes/home/blockList.d.ts.map +1 -0
- package/dist/routes/home/index.d.ts +1 -1
- package/dist/routes/home/loader.d.ts +5 -0
- package/dist/routes/home/loader.d.ts.map +1 -1
- package/dist/routes/home/types.d.ts +2 -0
- package/dist/routes/home/types.d.ts.map +1 -1
- package/dist/routes/home.js +22 -22
- package/dist/routes/index.js +8 -8
- package/dist/routes/lazy.d.ts +1 -1
- package/dist/routes/lazy.d.ts.map +1 -1
- package/dist/routes/loyalty.js +5 -5
- package/dist/routes/page.js +4 -4
- package/dist/routes/product/ProductPendingPreview.d.ts +19 -0
- package/dist/routes/product/ProductPendingPreview.d.ts.map +1 -0
- package/dist/routes/product-listing.js +26 -26
- package/dist/routes/product.js +25 -25
- package/dist/routes/seo-redirects.js +8 -8
- package/dist/routes/testimonials.js +2 -2
- package/dist/routes/thank-you.js +4 -4
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +25 -23
- package/dist/{store-lookup-OO2FPCFW.js → store-lookup-RAKQFOTD.js} +8 -8
- package/dist/{store-lookup-OO2FPCFW.js.map → store-lookup-RAKQFOTD.js.map} +1 -1
- package/dist/tanstack.js +17 -17
- package/dist/utils/index.js +3 -3
- package/dist/vite/index.js +1 -1
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/tailwind/components/live-editor/moves.ts.txt +3 -2
- package/tailwind/components/product/ProductDetails.tsx.txt +1 -1
- package/tailwind/routes/home/HomePage.tsx.txt +11 -2
- package/tailwind/routes/home/blockList.ts.txt +6 -0
- package/tailwind/routes/home/loader.ts.txt +13 -6
- package/tailwind/routes/home/types.ts.txt +2 -0
- package/tailwind/routes/product/ProductPendingPreview.tsx.txt +85 -0
- package/dist/GoogleTag-V7FHUIZW.js +0 -15
- package/dist/ProductDetails-PED2NZEJ.js.map +0 -1
- package/dist/chunk-BAVTAOPI.js.map +0 -1
- package/dist/chunk-N7CCSGZF.js +0 -3
- package/dist/chunk-N7CCSGZF.js.map +0 -1
- package/dist/chunk-VQZU5VT3.js.map +0 -1
package/package.json
CHANGED
|
@@ -43,9 +43,10 @@ type Drawer = (blocks: HomeComponentData[]) => void;
|
|
|
43
43
|
/** The home page on screen, if any, to draw a fresh list of blocks in place. */
|
|
44
44
|
let drawer: Drawer | null = null;
|
|
45
45
|
|
|
46
|
-
/** Lets the design studio draw the page's blocks again, as it saved them, while the page is mounted. */
|
|
47
|
-
export function useLiveBlockList(onList: Drawer): void {
|
|
46
|
+
/** Lets the design studio draw the page's blocks again, as it saved them, while the page is mounted; `null` refuses. */
|
|
47
|
+
export function useLiveBlockList(onList: Drawer | null): void {
|
|
48
48
|
useEffect(() => {
|
|
49
|
+
if (!onList) return;
|
|
49
50
|
drawer = onList;
|
|
50
51
|
return () => {
|
|
51
52
|
if (drawer === onList) drawer = null;
|
|
@@ -164,7 +164,7 @@ export function ProductDetails({ product, showTags = true }: ProductDetailsProps
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
function ProductPrice({ product }: { product: Product }) {
|
|
167
|
+
export function ProductPrice({ product }: { product: Product }) {
|
|
168
168
|
const { t } = useTranslation();
|
|
169
169
|
// The API converts the amounts but still labels them in the store's own currency.
|
|
170
170
|
const priceCurrency = getActiveCurrency(product.currency);
|
|
@@ -4,6 +4,7 @@ import { HookSlot } from '../../hooks';
|
|
|
4
4
|
import { HomeComponentRenderer, ReorderProducts } from '../../components/home';
|
|
5
5
|
import { reorder, useLiveBlockList, useLiveBlockMoves } from '../../components/live-editor/moves';
|
|
6
6
|
import type { HomePageProps } from './types';
|
|
7
|
+
import { blockList } from './blockList';
|
|
7
8
|
import type { HomeComponentData } from '../../types';
|
|
8
9
|
import { Pulse } from '@salla.sa/twilight-components-react';
|
|
9
10
|
|
|
@@ -54,7 +55,10 @@ function blockKeys(blocks: ReadonlyArray<DevHomeBlock<HomeComponentData>>): stri
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
export const HomePage = memo(function HomePage({
|
|
58
|
+
export const HomePage = memo(function HomePage({
|
|
59
|
+
components = NO_BLOCKS,
|
|
60
|
+
storeBlocks,
|
|
61
|
+
}: HomePageProps) {
|
|
58
62
|
// The design studio draws the blocks again after a save, in place of the loaded
|
|
59
63
|
// ones, until the page loads its blocks anew.
|
|
60
64
|
const [drawn, setDrawn] = useState<{
|
|
@@ -65,7 +69,12 @@ export const HomePage = memo(function HomePage({ components = NO_BLOCKS }: HomeP
|
|
|
65
69
|
(blocks: HomeComponentData[]) => setDrawn({ source: components, blocks }),
|
|
66
70
|
[components]
|
|
67
71
|
);
|
|
68
|
-
|
|
72
|
+
// A list the theme's own loader built (Tania's home) is not the store's: the studio reloads it instead.
|
|
73
|
+
const storeList = useMemo(
|
|
74
|
+
() => storeBlocks === undefined || storeBlocks === blockList(components),
|
|
75
|
+
[storeBlocks, components]
|
|
76
|
+
);
|
|
77
|
+
useLiveBlockList(storeList ? onList : null);
|
|
69
78
|
const current = drawn?.source === components ? drawn.blocks : components;
|
|
70
79
|
// Dev-mode only: the dev editor's layout replaces the store's blocks while it
|
|
71
80
|
// is on. No-op passthrough in production builds.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HomeComponentData } from '../../types';
|
|
2
|
+
|
|
3
|
+
/** Paths and keys of `blocks` in order: enough to tell the store's list from one a theme built. */
|
|
4
|
+
export function blockList(blocks: readonly HomeComponentData[]): string {
|
|
5
|
+
return JSON.stringify(blocks.map((block) => [block.path, block.key ?? null]));
|
|
6
|
+
}
|
|
@@ -2,23 +2,30 @@ import { getTwilightContext } from '../../twilight/context';
|
|
|
2
2
|
import { home } from '../../api/home';
|
|
3
3
|
import type { HomeComponentData } from '../../types';
|
|
4
4
|
import { RouteId } from '../../router/route-ids';
|
|
5
|
+
import { blockList } from './blockList';
|
|
5
6
|
|
|
6
7
|
export interface HomeLoaderData {
|
|
7
8
|
locale: string;
|
|
8
9
|
components: HomeComponentData[];
|
|
9
10
|
page: { slug: string };
|
|
11
|
+
/**
|
|
12
|
+
* The store's blocks as this loader lists them (`blockList`). A theme whose own loader
|
|
13
|
+
* reshapes `components` keeps this, so the page can tell its list is no longer the store's.
|
|
14
|
+
*/
|
|
15
|
+
storeBlocks?: string;
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
export async function homeLoader(ctx?: { locale?: string }): Promise<HomeLoaderData> {
|
|
13
19
|
const { queryClient } = getTwilightContext();
|
|
14
20
|
const components = await queryClient.ensureQueryData(home.queries.components());
|
|
15
|
-
const
|
|
21
|
+
const blocks = components.map((comp) => ({
|
|
22
|
+
...comp,
|
|
23
|
+
path: comp.path?.replace('home.', '') || comp.path,
|
|
24
|
+
}));
|
|
25
|
+
return {
|
|
16
26
|
locale: ctx?.locale || 'ar',
|
|
17
|
-
components:
|
|
18
|
-
...comp,
|
|
19
|
-
path: comp.path?.replace('home.', '') || comp.path,
|
|
20
|
-
})),
|
|
27
|
+
components: blocks,
|
|
21
28
|
page: { slug: RouteId.INDEX },
|
|
29
|
+
storeBlocks: blockList(blocks),
|
|
22
30
|
};
|
|
23
|
-
return result;
|
|
24
31
|
}
|
|
@@ -8,4 +8,6 @@ import type { HomeComponentData } from '../../types';
|
|
|
8
8
|
export interface HomePageProps {
|
|
9
9
|
locale?: string;
|
|
10
10
|
components?: HomeComponentData[];
|
|
11
|
+
/** From the home loader: the store's block list, to tell it from one the theme's loader built. */
|
|
12
|
+
storeBlocks?: string;
|
|
11
13
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useParams } from '@tanstack/react-router';
|
|
3
|
+
import {
|
|
4
|
+
BreadcrumbSkeleton,
|
|
5
|
+
ProductDetailSkeleton,
|
|
6
|
+
SkeletonPulse,
|
|
7
|
+
} from '@salla.sa/twilight-components-react/skeletons';
|
|
8
|
+
import { getProductPreview } from '../../api/product';
|
|
9
|
+
import { Image } from '../../components/common/Image';
|
|
10
|
+
import { ProductPrice } from '../../components/product/ProductDetails';
|
|
11
|
+
import type { Product } from '../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Product route `pendingComponent`. When the shopper opens a product from a card, the
|
|
15
|
+
* list already gave us its name, price and image (`rememberProductPreview`), so paint
|
|
16
|
+
* those in the product page's layout while details load, not a blank skeleton.
|
|
17
|
+
* Without a remembered card (deep link, SKU link) it is `ProductDetailSkeleton`.
|
|
18
|
+
* `id` defaults to the route's `id` param.
|
|
19
|
+
*
|
|
20
|
+
* Only plain markup: no gallery slider, form, hook slots or `salla-*` widgets, which
|
|
21
|
+
* would start (and fetch) for the stand-in and again when the real page mounts.
|
|
22
|
+
*/
|
|
23
|
+
export function ProductPendingPreview({ id: idProp }: { id?: string } = {}) {
|
|
24
|
+
const params = useParams({ strict: false }) as { id?: string };
|
|
25
|
+
const id = idProp ?? params.id;
|
|
26
|
+
const product = useMemo(() => (id ? getProductPreview(id) : undefined), [id]);
|
|
27
|
+
|
|
28
|
+
if (!product?.name) return <ProductDetailSkeleton />;
|
|
29
|
+
return <ProductDetailPreview product={product} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** `ProductDetailSkeleton`'s boxes, with the card's image, name and price filled in. */
|
|
33
|
+
export function ProductDetailPreview({ product }: { product: Product }) {
|
|
34
|
+
const image = product.image?.url ? product.image : product.images?.[0];
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div data-product-preview={product.id}>
|
|
38
|
+
<div className="s-skeleton-detail-container">
|
|
39
|
+
<BreadcrumbSkeleton />
|
|
40
|
+
<div className="s-skeleton-detail-layout">
|
|
41
|
+
<div className="s-skeleton-detail-images">
|
|
42
|
+
{image?.url ? (
|
|
43
|
+
<div className="s-skeleton-card-image overflow-hidden bg-gray-100">
|
|
44
|
+
<Image
|
|
45
|
+
src={image.url}
|
|
46
|
+
alt={image.alt || product.name}
|
|
47
|
+
className="h-full w-full object-cover"
|
|
48
|
+
aspectRatio="1/1"
|
|
49
|
+
priority
|
|
50
|
+
noWrapper
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
) : (
|
|
54
|
+
<SkeletonPulse className="s-skeleton-card-image" />
|
|
55
|
+
)}
|
|
56
|
+
<div className="s-skeleton-slider-thumbs">
|
|
57
|
+
{Array.from({ length: 3 }, (_, i) => (
|
|
58
|
+
<SkeletonPulse key={i} className="s-skeleton-slider-thumb" />
|
|
59
|
+
))}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div className="s-skeleton-detail-content">
|
|
63
|
+
<h1 className="text-xl md:text-2xl leading-10 font-bold text-gray-800">
|
|
64
|
+
{product.name}
|
|
65
|
+
</h1>
|
|
66
|
+
{product.subtitle && (
|
|
67
|
+
<h2 className="product-entry__sub-title text-sm text-gray-500 leading-6">
|
|
68
|
+
{product.subtitle}
|
|
69
|
+
</h2>
|
|
70
|
+
)}
|
|
71
|
+
<ProductPrice product={product} />
|
|
72
|
+
<div className="s-skeleton-detail-description">
|
|
73
|
+
<SkeletonPulse className="s-skeleton-text-line-full" />
|
|
74
|
+
<SkeletonPulse className="s-skeleton-text-line-lg" />
|
|
75
|
+
<SkeletonPulse className="s-skeleton-text-line-sm" />
|
|
76
|
+
</div>
|
|
77
|
+
<div className="s-skeleton-detail-actions">
|
|
78
|
+
<SkeletonPulse className="s-skeleton-detail-add-btn" />
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { GTM_LOAD_DELAY_MS, GoogleTagBody } from './chunk-GWT6MHWC.js';
|
|
2
|
-
import './chunk-SUW3BMDE.js';
|
|
3
|
-
import './chunk-ONHZXJAS.js';
|
|
4
|
-
import './chunk-OUW6WESU.js';
|
|
5
|
-
import './chunk-7RKZXLBL.js';
|
|
6
|
-
import './chunk-YWPVPERZ.js';
|
|
7
|
-
import './chunk-Z5M4YYWT.js';
|
|
8
|
-
import './chunk-BZ2QSBXM.js';
|
|
9
|
-
import './chunk-MZPX4EPS.js';
|
|
10
|
-
import './chunk-4OZIBANF.js';
|
|
11
|
-
import './chunk-MWUAHDQL.js';
|
|
12
|
-
import './chunk-T72DAX7R.js';
|
|
13
|
-
import './chunk-DGUM43GV.js';
|
|
14
|
-
//# sourceMappingURL=GoogleTag-V7FHUIZW.js.map
|
|
15
|
-
//# sourceMappingURL=GoogleTag-V7FHUIZW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["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A,EAAI,WAAU,oBAAA,EACb,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,WAAU,kCAAA,EAAmC,CAAA;AAAA,MAAI,GAAA;AAAA,MAAE,CAAA,CAAE,uBAAuB,MAAM,CAAA;AAAA,MAAG,GAAA;AAAA,sBAExF,GAAA,CAAC,UAAM,QAAA,EAAA,iBAAA,CAAkB,CAAA,CAAE,2BAA2B,CAAA,EAAG,OAAA,CAAQ,aAAc,CAAA,EAAE;AAAA,KAAA,EACnF,CAAA;AAAA,IAED,OAAA,CAAQ,0BAAA,oBACP,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,+DAAA,EACb,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,WAAU,uDAAA,EAAwD,CAAA;AAAA,MACpE,CAAA,CAAE,2BAA2B,UAAU,CAAA;AAAA,MAAE,IAAA;AAAA,MAAG,OAAA,CAAQ;AAAA,KAAA,EACvD;AAAA,GAAA,EAEJ,CAAA;AAEJ","file":"ProductDetails-PED2NZEJ.js","sourcesContent":["import { Fragment, useState } from 'react';\nimport { HookSlot } from '../../hooks/HookSlot';\nimport { HookName } from '../../types/hooks';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { getActiveCurrency } from '../../api/client';\nimport { useWishlist } from '../../hooks/useWishlist';\nimport { CurrencySymbol, Link, Image } from '../common';\nimport { SallaRatingStars } from '@salla.sa/twilight-components-react/rating-stars';\nimport { SallaSocialShare } from '@salla.sa/twilight-components-react/social-share';\nimport { SallaButton } from '@salla.sa/twilight-components-react/button';\nimport { SallaInstallment } from '@salla.sa/twilight-components-react/installment';\nimport { SallaMetadata } from '@salla.sa/twilight-components-react/metadata';\nimport { formatSallaPlural } from '../../utils/salla-plural';\nimport type { Product } from '../../types';\n\ninterface ProductDetailsProps {\n product: Product;\n showTags?: boolean;\n}\n\nexport function ProductDetails({ product, showTags = true }: ProductDetailsProps) {\n const { t } = useTranslation();\n const wishlist = useWishlist();\n\n // Context for all product hooks - contains product data\n const productHookContext = { product };\n\n return (\n <>\n <HookSlot name={HookName.PRODUCT_DESCRIPTION_START} context={productHookContext} />\n\n {product.brand?.name && (\n <div className=\"product-brand mb-5 w-12\">\n <Link className=\"brand-logo\" to={product.brand.url || '#'} title={product.brand.name}>\n <Image\n className=\"max-h-full object-contain\"\n src={product.brand.logo}\n title={product.brand.name}\n alt={product.brand.name}\n aspectRatio=\"1/1\"\n />\n </Link>\n </div>\n )}\n\n <h1 className=\"text-xl md:text-2xl leading-10 font-bold mb-6 text-gray-800\">\n {product.name}\n </h1>\n\n {product.subtitle && (\n <h2 className=\"product-entry__sub-title text-sm text-gray-500 leading-6 mb-2.5\">\n {product.subtitle}\n </h2>\n )}\n\n {product.rating && (\n <SallaRatingStars value={product.rating.stars} reviews={product.rating.count} />\n )}\n\n {product.is_taxable && (\n <small className=\"color-grey\">{t('pages.products.tax_included', 'VAT Inclusive')}</small>\n )}\n\n <ProductPrice product={product} />\n\n <ProductDescription product={product} />\n\n {!!product.tags?.length && showTags && (\n <div className=\"mb-3\">\n {product.tags.map((tag, index) => (\n <Fragment key={tag.name}>\n <Link\n to={tag.url}\n className=\"rtl:ml-2 ltr:mr-2 inline-flex text-gray-500 hover:text-primary underline text-sm mb-1\"\n >\n {tag.name}\n </Link>\n {index < product.tags!.length - 1 && ','}\n </Fragment>\n ))}\n </div>\n )}\n\n <div className=\"flex rtl:space-x-reverse space-x-3\">\n <SallaSocialShare className=\"inline-flex mb-5\" aria-label=\"social share\" />\n\n <SallaButton\n className={`btn--wishlist animated hidden sm:inline-flex ${wishlist.has(Number(product.id)) ? 'is-added' : 'not-added'}`}\n data-id={product.id}\n onClick={() => window.salla?.wishlist.toggle(product.id)}\n shape=\"icon\"\n fill=\"outline\"\n color=\"light\"\n ariaLabel=\"add to wishlist\"\n >\n <i className=\"sicon-heart\"></i>\n </SallaButton>\n </div>\n\n <ProductQuantityInfo product={product} />\n\n {product.sku && (\n <div className=\"mb-4 flex justify-between sm:grid sm:grid-cols-3 bg-white rounded-md px-4 py-2\">\n <div className=\"flex items-center\">\n <i className=\"sicon-barcode mx-1\"></i>\n {t('pages.products.sku', 'SKU')}\n </div>\n <div className=\"text-unicode\">{product.sku}</div>\n </div>\n )}\n\n {product.barcode && (\n <div className=\"mb-4 flex justify-between sm:grid sm:grid-cols-3 bg-white rounded-md px-4 py-2\">\n <div className=\"flex items-center\">\n <i className=\"sicon-barcode mx-1\"></i>\n {t('pages.products.barcode')}\n </div>\n <div className=\"text-unicode\">{product.barcode}</div>\n </div>\n )}\n\n {product.show_availability && (\n <section className=\"bg-white p-5 rounded-md mb-5 last:mb-0\">\n <div className=\"center-between\">\n <label className=\"flex items-center text-base\">\n <span className=\"sicon-location rtl:ml-1 ltr:mr-1\"></span>\n <span className=\"inline-block\">\n {t('pages.products.availability', 'Availability')}\n </span>\n </label>\n <div className=\"mt-1 sm:mt-0 sm:col-span-2 text-end\">\n <div className=\"flex rtl:space-x-reverse space-x-3\">\n <a\n href=\"#!\"\n onClick={() =>\n window.salla?.event?.dispatch('scopes::open', {\n mode: 'availability',\n product_id: String(product.id),\n })\n }\n className=\"group text-primary flex items-center justify-center\"\n >\n <span>{t('pages.products.select_branch', 'Select Branch')}</span>\n <span className=\"sicon-keyboard_arrow_left mr-2 transition-all group-hover:-translate-x-1\"></span>\n </a>\n </div>\n </div>\n </div>\n </section>\n )}\n\n <HookSlot name={HookName.PRODUCT_DESCRIPTION} context={productHookContext} />\n\n <SallaInstallment\n price={String(\n typeof product.base_currency_price === 'object'\n ? product.base_currency_price.amount\n : product.base_currency_price\n )}\n />\n\n {product.has_metadata && <SallaMetadata />}\n </>\n );\n}\n\nfunction ProductPrice({ product }: { product: Product }) {\n const { t } = useTranslation();\n // The API converts the amounts but still labels them in the store's own currency.\n const priceCurrency = getActiveCurrency(product.currency);\n\n return (\n <div className=\"flex whitespace-nowrap gap-4 items-center\">\n <div\n className={`${product.is_on_sale ? '' : 'hidden'} space-x-2 rtl:space-x-reverse whitespace-nowrap`}\n >\n <p className=\"text-red-800 font-bold text-xl inline-block\">\n {product.sale_price} <CurrencySymbol currency={priceCurrency} />\n </p>\n <span className=\"text-gray-500 line-through\">\n {product.regular_price} <CurrencySymbol currency={priceCurrency} />\n </span>\n </div>\n <div className={`gap-4 ${product.is_on_sale ? 'hidden' : 'flex'}`}>\n {product.starting_price && (\n <span>{t('pages.products.starting_price', 'Starting from')}</span>\n )}\n <p className=\"font-bold text-xl inline-block\">\n {product.starting_price ?? product.price} <CurrencySymbol currency={priceCurrency} />\n </p>\n </div>\n </div>\n );\n}\n\n/** An `<iframe>` start tag; quoted values may hold `>`. */\nconst IFRAME_TAG = /<iframe\\b(?:[^>\"']|\"[^\"]*\"|'[^']*')*>/gi;\n\n/** Embedded players (YouTube, Vimeo, maps) load only when scrolled near, unless the merchant set `loading`. */\nfunction lazyIframes(html: string): string {\n return html.replace(IFRAME_TAG, (tag) =>\n /\\sloading\\s*=/i.test(tag.replace(/\"[^\"]*\"|'[^']*'/g, '\"\"'))\n ? tag\n : tag.replace(/^<iframe/i, '<iframe loading=\"lazy\"')\n );\n}\n\nfunction ProductDescription({ product }: { product: Product }) {\n const { t } = useTranslation();\n const [isExpanded, setIsExpanded] = useState(false);\n\n if (!product.description) return null;\n\n const description = lazyIframes(product.description.replace(/ /g, '\\n'));\n\n if (product.has_read_more) {\n return (\n <div className=\"product__description p-2 px-5 sm:p-1 leading-7 mb-3\">\n <article\n className=\"article article--main relative leading-8 overflow-hidden transition-all duration-300 py-4\"\n id=\"more-content\"\n style={{ maxHeight: isExpanded ? 'none' : '5.25rem' }}\n dangerouslySetInnerHTML={{ __html: description }}\n />\n <button\n type=\"button\"\n id=\"btn-show-more\"\n className={`link--primary inline-block mt-2 cursor-pointer bg-transparent border-0 p-0 ${isExpanded ? 'is-expanded' : ''}`}\n onClick={() => setIsExpanded(true)}\n >\n {t('pages.products.read_more', 'Read more')}\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"product__description p-2 px-5 sm:p-1 leading-7 mb-3\">\n <article className=\"article--main pb-1\" dangerouslySetInnerHTML={{ __html: description }} />\n </div>\n );\n}\n\nfunction ProductQuantityInfo({ product }: { product: Product }) {\n const { t } = useTranslation();\n if (product.sold_quantity == null && !product.can_show_remained_quantity) {\n return null;\n }\n\n return (\n <div className=\"bg-white py-2.5 mb-5 rounded-md inline-flex text-sm\">\n {(product.sold_quantity ?? 0) > 0 && (\n <div className=\"px-4 !text-red-800\">\n <i className=\"sicon-fire rtl:ml-1.5 ltr:mr-1.5\"></i> {t('pages.products.sold', 'Sold')}{' '}\n {/* Salla ships `sold_times` in Laravel plural format; resolve it for the count. */}\n <span>{formatSallaPlural(t('pages.products.sold_times'), product.sold_quantity!)}</span>\n </div>\n )}\n {product.can_show_remained_quantity && (\n <div className=\"px-4 rtl:even:border-r ltr:even:border-l even:border-gray-200\">\n <i className=\"!text-red-800 sicon-box-bankers rtl:ml-1.5 ltr:mr-1.5\"></i>\n {t('pages.products.remained', 'Remained')}: {product.quantity}\n </div>\n )}\n </div>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/live-editor/moves.ts"],"names":[],"mappings":";;;AAYA,IAAI,KAAA,GAAsB,IAAA;AAGnB,SAAS,kBAAkB,MAAA,EAAqB;AACrD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,KAAA,GAAQ,MAAA;AACR,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,KAAA,KAAU,QAAQ,KAAA,GAAQ,IAAA;AAAA,IAChC,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AACb;AAGO,SAAS,aAAA,CAAc,MAAc,EAAA,EAAqB;AAC/D,EAAA,IAAI,CAAC,OAAO,OAAO,KAAA;AACnB,EAAA,KAAA,CAAM,MAAM,EAAE,CAAA;AACd,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,OAAA,CAAQ,KAAA,EAA0B,IAAA,EAAc,EAAA,EAAsB;AACpF,EAAA,MAAM,IAAA,GAAO,CAAC,GAAG,KAAK,CAAA;AACtB,EAAA,IAAI,IAAA,KAAS,EAAA,IAAM,IAAA,GAAO,CAAA,IAAK,EAAA,GAAK,CAAA,IAAK,IAAA,IAAQ,IAAA,CAAK,MAAA,IAAU,EAAA,IAAM,IAAA,CAAK,MAAA,EAAQ,OAAO,IAAA;AAC1F,EAAA,MAAM,CAAC,KAAK,CAAA,GAAI,IAAA,CAAK,MAAA,CAAO,MAAM,CAAC,CAAA;AACnC,EAAA,IAAA,CAAK,MAAA,CAAO,EAAA,EAAI,CAAA,EAAG,KAAK,CAAA;AACxB,EAAA,OAAO,IAAA;AACT;AAKA,IAAI,MAAA,GAAwB,IAAA;AAGrB,SAAS,iBAAiB,MAAA,EAAsB;AACrD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAA,GAAS,MAAA;AACT,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,MAAA,KAAW,QAAQ,MAAA,GAAS,IAAA;AAAA,IAClC,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AACb;AAGO,SAAS,eAAe,MAAA,EAAsC;AACnE,EAAA,IAAI,CAAC,QAAQ,OAAO,KAAA;AACpB,EAAA,MAAA,CAAO,MAAM,CAAA;AACb,EAAA,OAAO,IAAA;AACT","file":"chunk-BAVTAOPI.js","sourcesContent":["/**\n * Moving a home block in the theme editor's preview without reloading it: the\n * editor saves the new order, and the home page shows it right away, the way\n * the twig themes' `live-themes-editor.js` moves a section on the page.\n */\n\nimport { useEffect } from 'react';\nimport type { HomeComponentData } from '../../types';\n\ntype Mover = (from: number, to: number) => void;\n\n/** The home page on screen, if any; it alone knows the order its blocks render in. */\nlet mover: Mover | null = null;\n\n/** Lets the bar move the page's blocks while the page is mounted. */\nexport function useLiveBlockMoves(onMove: Mover): void {\n useEffect(() => {\n mover = onMove;\n return () => {\n if (mover === onMove) mover = null;\n };\n }, [onMove]);\n}\n\n/** Moves the block rendered at `from` to `to`; `false` when no home page is on screen. */\nexport function moveLiveBlock(from: number, to: number): boolean {\n if (!mover) return false;\n mover(from, to);\n return true;\n}\n\n/** `order` with the entry at `from` moved to `to`; as it is when either is out of range. */\nexport function reorder(order: readonly number[], from: number, to: number): number[] {\n const next = [...order];\n if (from === to || from < 0 || to < 0 || from >= next.length || to >= next.length) return next;\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n return next;\n}\n\ntype Drawer = (blocks: HomeComponentData[]) => void;\n\n/** The home page on screen, if any, to draw a fresh list of blocks in place. */\nlet drawer: Drawer | null = null;\n\n/** Lets the design studio draw the page's blocks again, as it saved them, while the page is mounted. */\nexport function useLiveBlockList(onList: Drawer): void {\n useEffect(() => {\n drawer = onList;\n return () => {\n if (drawer === onList) drawer = null;\n };\n }, [onList]);\n}\n\n/** Draws `blocks` on the home page in place of the ones it loaded; `false` when no home page is on screen. */\nexport function drawLiveBlocks(blocks: HomeComponentData[]): boolean {\n if (!drawer) return false;\n drawer(blocks);\n return true;\n}\n"]}
|
package/dist/chunk-N7CCSGZF.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { BlogSkeleton, BreadcrumbSkeleton, CartSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from '@salla.sa/twilight-components-react';
|
|
2
|
-
//# sourceMappingURL=chunk-N7CCSGZF.js.map
|
|
3
|
-
//# sourceMappingURL=chunk-N7CCSGZF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-N7CCSGZF.js","sourcesContent":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/home/loader.ts","../src/routes/home/HomePage.tsx","../src/routes/home/index.tsx"],"names":["HomeSkeleton","HomePage"],"mappings":";;;;;;;;;;;;;AAWA,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A,QAAA;AAAA,IACA,SAAA,EAAW,GAAA;AAAA,IACX,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM,IAAA;AAAA,MACd;AAAA,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,qBAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM;AAAA,KAChB;AAAA,IACA,oBAAoB,uBAAA,CAAwB,GAAA,CAAI,QAAA,EAAU,GAAA,CAAI,SAAS,QAAQ;AAAA,GACjF;AACF;AAEO,IAAM,IAAA,GAAO,EAAE,EAAA,EAAI,OAAA,CAAQ,OAAO,MAAA,EAAQ,IAAA,EAAM,WAAW,QAAA","file":"chunk-VQZU5VT3.js","sourcesContent":["import { getTwilightContext } from '../../twilight/context';\nimport { home } from '../../api/home';\nimport type { HomeComponentData } from '../../types';\nimport { RouteId } from '../../router/route-ids';\n\nexport interface HomeLoaderData {\n locale: string;\n components: HomeComponentData[];\n page: { slug: string };\n}\n\nexport async function homeLoader(ctx?: { locale?: string }): Promise<HomeLoaderData> {\n const { queryClient } = getTwilightContext();\n const components = await queryClient.ensureQueryData(home.queries.components());\n const result = {\n locale: ctx?.locale || 'ar',\n components: components.map((comp) => ({\n ...comp,\n path: comp.path?.replace('home.', '') || comp.path,\n })),\n page: { slug: RouteId.INDEX },\n };\n return result;\n}\n","import { memo, useCallback, useMemo, useState } from 'react';\nimport { useDevHomeBlocks, type DevHomeBlock } from '../../dev/dev-settings-store';\nimport { HookSlot } from '../../hooks';\nimport { HomeComponentRenderer, ReorderProducts } from '../../components/home';\nimport { reorder, useLiveBlockList, useLiveBlockMoves } from '../../components/live-editor/moves';\nimport type { HomePageProps } from './types';\nimport type { HomeComponentData } from '../../types';\nimport { Pulse } from '@salla.sa/twilight-components-react';\n\nexport const HomeSkeleton = memo(function HomeSkeleton() {\n return (\n <>\n <div className=\"s-block container skeleton-block-hero\">\n <Pulse className=\"h-64 sm:h-80 rounded-md\" />\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n </>\n );\n});\n\n/** As on Twig, a home page with no blocks lists the store's latest products instead. */\nconst LATEST_PRODUCTS: HomeComponentData = { path: 'latest-products' };\n\n/** The blocks' places in the store's order: 0, 1, 2… */\nconst storeOrder = (blocks: readonly unknown[]) => Array.from(blocks, (_, at) => at);\n\n// Stable, so a redraw of a page loaded without blocks is kept.\nconst NO_BLOCKS: HomeComponentData[] = [];\n\n// Catalog id (or path) plus copy number: a block drawn in or out leaves the others' state alone.\nfunction blockKeys(blocks: ReadonlyArray<DevHomeBlock<HomeComponentData>>): string[] {\n const copies = new Map<string, number>();\n return blocks.map((block) => {\n if (block.__dev_id) return block.__dev_id;\n const name = String(block.key ?? block.path);\n const copy = copies.get(name) ?? 0;\n copies.set(name, copy + 1);\n return `${name}~${copy}`;\n });\n}\n\nexport const HomePage = memo(function HomePage({ components = NO_BLOCKS }: HomePageProps) {\n // The design studio draws the blocks again after a save, in place of the loaded\n // ones, until the page loads its blocks anew.\n const [drawn, setDrawn] = useState<{\n source: HomeComponentData[];\n blocks: HomeComponentData[];\n } | null>(null);\n const onList = useCallback(\n (blocks: HomeComponentData[]) => setDrawn({ source: components, blocks }),\n [components]\n );\n useLiveBlockList(onList);\n const current = drawn?.source === components ? drawn.blocks : components;\n // Dev-mode only: the dev editor's layout replaces the store's blocks while it\n // is on. No-op passthrough in production builds.\n const renderedComponents = useDevHomeBlocks(current);\n // The theme editor's preview moves blocks in place while the editor saves the\n // order; blocks from the server (a new page, a reload) start over from theirs.\n const [moved, setMoved] = useState<{ source: HomeComponentData[]; order: number[] } | null>(null);\n const order = moved?.source === renderedComponents ? moved.order : null;\n const onMove = useCallback(\n (from: number, to: number) =>\n setMoved((prev) => ({\n source: renderedComponents,\n order: reorder(\n prev?.source === renderedComponents ? prev.order : storeOrder(renderedComponents),\n from,\n to\n ),\n })),\n [renderedComponents]\n );\n useLiveBlockMoves(onMove);\n const placed = order ?? storeOrder(renderedComponents);\n const keys = useMemo(() => blockKeys(renderedComponents), [renderedComponents]);\n\n return (\n <>\n <HookSlot name=\"home:start\" />\n <HookSlot name=\"home:content\" />\n {placed.map((at, index) => {\n // A block's key stays with it when the preview moves it, so a move keeps its state.\n return <HomeComponentRenderer key={keys[at]} data={renderedComponents[at]} index={index} />;\n })}\n {!renderedComponents.length && (\n <HomeComponentRenderer data={LATEST_PRODUCTS} index={0} editable={false} />\n )}\n <HookSlot name=\"home:end\" />\n <ReorderProducts />\n </>\n );\n});\n\nexport { HomePage as default };\n","import type { HeadDescriptor } from '../../utils/head';\nimport { buildHreflangAlternates, storePageUrl } from '../../utils/baseHead';\nimport type { HomeLoaderData } from './loader';\nimport { homeLoader } from './loader';\nimport type { TwilightContext } from '../../twilight/context';\nimport { HomePage } from './HomePage';\nimport { RouteId } from '../../router/route-ids';\n\nexport { HomeSkeleton } from './HomePage';\nexport { registerHomeComponents, DefaultHomeComponents } from '../../components/home/register';\nexport { registerHomeComponentConfig } from '../../components/home';\nexport type { HomePageProps } from './types';\nexport type { HomeLoaderData } from './loader';\nexport type {\n HomeComponentsProps,\n AnyHomeComponent,\n HomeComponentConfig,\n} from '../../components/home';\n\nfunction loader(_ctx?: { locale?: string }): Promise<HomeLoaderData> {\n return homeLoader({ locale: _ctx?.locale });\n}\n\nfunction head(ctx: TwilightContext): HeadDescriptor {\n const store = ctx.settings?.store;\n if (!store) return {};\n\n const title = store.meta?.title ?? store.name;\n const description = store.meta?.description ?? store.description;\n const keywords = store.meta?.keywords;\n // `/ar`, like Twig, where store.url reads `/ar/`.\n const url = storePageUrl(ctx.settings, ctx.location.pathname) ?? store.url;\n\n return {\n title,\n description,\n keywords,\n canonical: url,\n openGraph: {\n type: 'website',\n title,\n description,\n images: store.logo,\n url,\n },\n twitter: {\n card: 'summary_large_image',\n title,\n description,\n images: store.logo,\n },\n alternateLanguages: buildHreflangAlternates(ctx.settings, ctx.location.pathname),\n };\n}\n\nexport const Home = { id: RouteId.INDEX, loader, head, Component: HomePage } as const;\n\nexport { homeLoader };\n"]}
|