@salla.sa/twilight-theme-engine 1.0.107 → 1.0.109
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-ROYGCSVX.js → AddToCartForm-ZIZKGYJR.js} +3 -3
- package/dist/{AddToCartForm-ROYGCSVX.js.map → AddToCartForm-ZIZKGYJR.js.map} +1 -1
- package/dist/{BlogAuthorPage-V4QPVVWU.js → BlogAuthorPage-GLAYDKIX.js} +27 -27
- package/dist/{BlogAuthorPage-V4QPVVWU.js.map → BlogAuthorPage-GLAYDKIX.js.map} +1 -1
- package/dist/{BlogCategoryPage-BSM63G5Q.js → BlogCategoryPage-KPU6LYHK.js} +27 -27
- package/dist/{BlogCategoryPage-BSM63G5Q.js.map → BlogCategoryPage-KPU6LYHK.js.map} +1 -1
- package/dist/{BlogPage-4QXLITAA.js → BlogPage-VDDHOD33.js} +25 -25
- package/dist/{BlogPage-4QXLITAA.js.map → BlogPage-VDDHOD33.js.map} +1 -1
- package/dist/{BlogSinglePage-TRYJUPCB.js → BlogSinglePage-UWP5MFAS.js} +25 -25
- package/dist/{BlogSinglePage-TRYJUPCB.js.map → BlogSinglePage-UWP5MFAS.js.map} +1 -1
- package/dist/{BlogTagPage-2JKCTBIU.js → BlogTagPage-V3Z4AD4C.js} +27 -27
- package/dist/{BlogTagPage-2JKCTBIU.js.map → BlogTagPage-V3Z4AD4C.js.map} +1 -1
- package/dist/{BrandsPage-PGCDHGOI.js → BrandsPage-ARYKHCTB.js} +26 -26
- package/dist/{BrandsPage-PGCDHGOI.js.map → BrandsPage-ARYKHCTB.js.map} +1 -1
- package/dist/{Breadcrumb-ACO63JUO.js → Breadcrumb-XT2MP2ZW.js} +25 -25
- package/dist/{Breadcrumb-ACO63JUO.js.map → Breadcrumb-XT2MP2ZW.js.map} +1 -1
- package/dist/{CartItem-TYWGDMRV.js → CartItem-4VXVOKVF.js} +25 -25
- package/dist/{CartItem-TYWGDMRV.js.map → CartItem-4VXVOKVF.js.map} +1 -1
- package/dist/{CartSummary-AKDPJ4OY.js → CartSummary-K23PGOUL.js} +25 -25
- package/dist/{CartSummary-AKDPJ4OY.js.map → CartSummary-K23PGOUL.js.map} +1 -1
- package/dist/{Copyright-TOKRGLFM.js → Copyright-KBCQVD5Y.js} +3 -3
- package/dist/{Copyright-TOKRGLFM.js.map → Copyright-KBCQVD5Y.js.map} +1 -1
- package/dist/{CustomerLayout-WTD5QAR7.js → CustomerLayout-B77ZKB4X.js} +25 -25
- package/dist/{CustomerLayout-WTD5QAR7.js.map → CustomerLayout-B77ZKB4X.js.map} +1 -1
- package/dist/{Footer-SSNPHJ2G.js → Footer-L52M4T24.js} +4 -4
- package/dist/{Footer-SSNPHJ2G.js.map → Footer-L52M4T24.js.map} +1 -1
- package/dist/Header-QOAV23HD.js +22 -0
- package/dist/{Header-W6XMMZIA.js.map → Header-QOAV23HD.js.map} +1 -1
- package/dist/{LoyaltyPage-QJIAYRU4.js → LoyaltyPage-3OIZG2ZJ.js} +25 -25
- package/dist/{LoyaltyPage-QJIAYRU4.js.map → LoyaltyPage-3OIZG2ZJ.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-A4QHYJXF.js → LoyaltyPointsPage-I3O3JA7Q.js} +9 -9
- package/dist/{LoyaltyPointsPage-A4QHYJXF.js.map → LoyaltyPointsPage-I3O3JA7Q.js.map} +1 -1
- package/dist/{MainMenu-HBN4SWXP.js → MainMenu-VIDYUQNX.js} +8 -8
- package/dist/{MainMenu-HBN4SWXP.js.map → MainMenu-VIDYUQNX.js.map} +1 -1
- package/dist/MaintenancePage-UBJ5Q3L5.js +7 -0
- package/dist/{MaintenancePage-Z34IQCUV.js.map → MaintenancePage-UBJ5Q3L5.js.map} +1 -1
- package/dist/{MasterLayout-DTLAOTWI.js → MasterLayout-FY666JMR.js} +25 -25
- package/dist/{MasterLayout-DTLAOTWI.js.map → MasterLayout-FY666JMR.js.map} +1 -1
- package/dist/{MobileMenu-ZC5D4KGJ.js → MobileMenu-3ILQKCHA.js} +26 -26
- package/dist/{MobileMenu-ZC5D4KGJ.js.map → MobileMenu-3ILQKCHA.js.map} +1 -1
- package/dist/{NotificationsPage-TKJLPSGS.js → NotificationsPage-EYTBUS36.js} +25 -25
- package/dist/{NotificationsPage-TKJLPSGS.js.map → NotificationsPage-EYTBUS36.js.map} +1 -1
- package/dist/{OrderSinglePage-GT2E2CZN.js → OrderSinglePage-YHA5D2ZI.js} +26 -26
- package/dist/{OrderSinglePage-GT2E2CZN.js.map → OrderSinglePage-YHA5D2ZI.js.map} +1 -1
- package/dist/{OrdersPage-CBXEYWBH.js → OrdersPage-4A2QINDX.js} +25 -25
- package/dist/{OrdersPage-CBXEYWBH.js.map → OrdersPage-4A2QINDX.js.map} +1 -1
- package/dist/{PageSingle-K4W6RVAT.js → PageSingle-ED24MS2Z.js} +7 -7
- package/dist/{PageSingle-K4W6RVAT.js.map → PageSingle-ED24MS2Z.js.map} +1 -1
- package/dist/{ProductDetails-X2UNOW2P.js → ProductDetails-ZA5A66JW.js} +8 -8
- package/dist/{ProductDetails-X2UNOW2P.js.map → ProductDetails-ZA5A66JW.js.map} +1 -1
- package/dist/{ProfilePage-3AHOU5XQ.js → ProfilePage-ZTYHIDGE.js} +25 -25
- package/dist/{ProfilePage-3AHOU5XQ.js.map → ProfilePage-ZTYHIDGE.js.map} +1 -1
- package/dist/{ReviewsPage-R6DODVH6.js → ReviewsPage-LTEOFKHW.js} +3 -3
- package/dist/{ReviewsPage-R6DODVH6.js.map → ReviewsPage-LTEOFKHW.js.map} +1 -1
- package/dist/{SeoCartWidget-NJK3YIPC.js → SeoCartWidget-3O35VZZO.js} +25 -25
- package/dist/{SeoCartWidget-NJK3YIPC.js.map → SeoCartWidget-3O35VZZO.js.map} +1 -1
- package/dist/{SettingsPage-6STAABBW.js → SettingsPage-3VRJ3AYE.js} +25 -25
- package/dist/{SettingsPage-6STAABBW.js.map → SettingsPage-3VRJ3AYE.js.map} +1 -1
- package/dist/StoreClosedNotification-7KACKGVH.js +54 -0
- package/dist/{StoreClosedNotification-LLXVKVC7.js.map → StoreClosedNotification-7KACKGVH.js.map} +1 -1
- package/dist/{TestimonialsPage-SUBZSLPR.js → TestimonialsPage-LYJFX32D.js} +7 -7
- package/dist/{TestimonialsPage-SUBZSLPR.js.map → TestimonialsPage-LYJFX32D.js.map} +1 -1
- package/dist/{ThankYouPage-UA7EIVQ2.js → ThankYouPage-Z2S7MJ7J.js} +25 -25
- package/dist/{ThankYouPage-UA7EIVQ2.js.map → ThankYouPage-Z2S7MJ7J.js.map} +1 -1
- package/dist/{WalletPage-WSM62ZDH.js → WalletPage-EZ4RTLGE.js} +26 -26
- package/dist/{WalletPage-WSM62ZDH.js.map → WalletPage-EZ4RTLGE.js.map} +1 -1
- package/dist/{WishlistPage-XG3S4T5U.js → WishlistPage-V7Z6GWQI.js} +27 -27
- package/dist/{WishlistPage-XG3S4T5U.js.map → WishlistPage-V7Z6GWQI.js.map} +1 -1
- package/dist/api/advertisement.js +5 -5
- package/dist/api/apps.js +5 -5
- package/dist/api/blog.js +7 -7
- package/dist/api/brands.js +7 -7
- package/dist/api/cart.js +7 -7
- package/dist/api/category.js +7 -7
- package/dist/api/client.js +4 -4
- package/dist/api/home.js +5 -5
- package/dist/api/loyalty.js +7 -7
- package/dist/api/menu.js +5 -5
- package/dist/api/notification.js +5 -5
- package/dist/api/order.js +7 -7
- package/dist/api/page.js +7 -7
- package/dist/api/product.js +7 -7
- package/dist/api/profile.js +4 -4
- package/dist/api/store.d.ts.map +1 -1
- package/dist/api/store.js +5 -5
- 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-XL42DUCQ.js → chunk-2MHMQOMJ.js} +3 -3
- package/dist/{chunk-XL42DUCQ.js.map → chunk-2MHMQOMJ.js.map} +1 -1
- package/dist/chunk-2RRZZYH4.js +14 -0
- package/dist/{chunk-BHGZ622P.js.map → chunk-2RRZZYH4.js.map} +1 -1
- package/dist/{chunk-2B74CKXM.js → chunk-3MTOUUC7.js} +4 -4
- package/dist/{chunk-2B74CKXM.js.map → chunk-3MTOUUC7.js.map} +1 -1
- package/dist/{chunk-UWDUMPL7.js → chunk-3QJCZSLR.js} +6 -6
- package/dist/{chunk-UWDUMPL7.js.map → chunk-3QJCZSLR.js.map} +1 -1
- package/dist/{chunk-VUWBGAET.js → chunk-3WMGAFWX.js} +4 -4
- package/dist/{chunk-VUWBGAET.js.map → chunk-3WMGAFWX.js.map} +1 -1
- package/dist/{chunk-BEMWHR4T.js → chunk-4CCCNO2Q.js} +3 -3
- package/dist/{chunk-BEMWHR4T.js.map → chunk-4CCCNO2Q.js.map} +1 -1
- package/dist/{chunk-HNSR4KLL.js → chunk-6V4SM23M.js} +3 -3
- package/dist/{chunk-HNSR4KLL.js.map → chunk-6V4SM23M.js.map} +1 -1
- package/dist/{chunk-UKLYL5LM.js → chunk-7JAOXOEW.js} +4 -4
- package/dist/{chunk-UKLYL5LM.js.map → chunk-7JAOXOEW.js.map} +1 -1
- package/dist/{chunk-ENC6POPF.js → chunk-B272JNRU.js} +4 -4
- package/dist/{chunk-ENC6POPF.js.map → chunk-B272JNRU.js.map} +1 -1
- package/dist/{chunk-KSS7OA3Q.js → chunk-C7CJZ5DK.js} +3 -3
- package/dist/{chunk-KSS7OA3Q.js.map → chunk-C7CJZ5DK.js.map} +1 -1
- package/dist/{chunk-NZBBYJID.js → chunk-CQ6J4FKU.js} +4 -4
- package/dist/{chunk-NZBBYJID.js.map → chunk-CQ6J4FKU.js.map} +1 -1
- package/dist/{chunk-U6KJ7XBO.js → chunk-GGATZRAY.js} +3 -3
- package/dist/{chunk-U6KJ7XBO.js.map → chunk-GGATZRAY.js.map} +1 -1
- package/dist/{chunk-UZGP2KFA.js → chunk-GIAXPCHD.js} +3 -3
- package/dist/{chunk-UZGP2KFA.js.map → chunk-GIAXPCHD.js.map} +1 -1
- package/dist/{chunk-QA4FBMFJ.js → chunk-HGA5D4LJ.js} +4 -4
- package/dist/{chunk-QA4FBMFJ.js.map → chunk-HGA5D4LJ.js.map} +1 -1
- package/dist/{chunk-BR56OEPZ.js → chunk-HSKRX3WR.js} +4 -4
- package/dist/{chunk-BR56OEPZ.js.map → chunk-HSKRX3WR.js.map} +1 -1
- package/dist/{chunk-F6XPGONG.js → chunk-HSXQUHZO.js} +5 -5
- package/dist/{chunk-F6XPGONG.js.map → chunk-HSXQUHZO.js.map} +1 -1
- package/dist/{chunk-KLYTTMXN.js → chunk-I2ZO57UV.js} +6 -6
- package/dist/{chunk-KLYTTMXN.js.map → chunk-I2ZO57UV.js.map} +1 -1
- package/dist/{chunk-6YI5J5ZN.js → chunk-IRLKZ3LB.js} +23 -23
- package/dist/{chunk-6YI5J5ZN.js.map → chunk-IRLKZ3LB.js.map} +1 -1
- package/dist/{chunk-OSSOU36J.js → chunk-IXFBHQ5P.js} +3 -3
- package/dist/{chunk-OSSOU36J.js.map → chunk-IXFBHQ5P.js.map} +1 -1
- package/dist/{chunk-SZ65XCSZ.js → chunk-KPQEPQ4L.js} +7 -7
- package/dist/{chunk-SZ65XCSZ.js.map → chunk-KPQEPQ4L.js.map} +1 -1
- package/dist/{chunk-3NFVZJNI.js → chunk-L6TSHT52.js} +3 -3
- package/dist/{chunk-3NFVZJNI.js.map → chunk-L6TSHT52.js.map} +1 -1
- package/dist/{chunk-T5VU67NQ.js → chunk-LG2UQKSH.js} +4 -4
- package/dist/{chunk-T5VU67NQ.js.map → chunk-LG2UQKSH.js.map} +1 -1
- package/dist/{chunk-EHX45KZG.js → chunk-LZZ6EESI.js} +3 -3
- package/dist/{chunk-EHX45KZG.js.map → chunk-LZZ6EESI.js.map} +1 -1
- package/dist/{chunk-2CL6AEO4.js → chunk-N5WT7UM3.js} +3 -3
- package/dist/{chunk-2CL6AEO4.js.map → chunk-N5WT7UM3.js.map} +1 -1
- package/dist/{chunk-OHUTM224.js → chunk-N6B4LPKS.js} +4 -4
- package/dist/{chunk-OHUTM224.js.map → chunk-N6B4LPKS.js.map} +1 -1
- package/dist/{chunk-RA6ZTHN6.js → chunk-N6JUOBYJ.js} +4 -4
- package/dist/{chunk-RA6ZTHN6.js.map → chunk-N6JUOBYJ.js.map} +1 -1
- package/dist/{chunk-QBIPTWOR.js → chunk-NEKHAKA7.js} +21 -17
- package/dist/chunk-NEKHAKA7.js.map +1 -0
- package/dist/{chunk-4PT5MXGR.js → chunk-NEPWW7KM.js} +4 -4
- package/dist/{chunk-4PT5MXGR.js.map → chunk-NEPWW7KM.js.map} +1 -1
- package/dist/{chunk-VCSFCUFT.js → chunk-P36CIH6E.js} +7 -7
- package/dist/{chunk-VCSFCUFT.js.map → chunk-P36CIH6E.js.map} +1 -1
- package/dist/{chunk-D7XWUD6T.js → chunk-PFMTPKZO.js} +4 -4
- package/dist/{chunk-D7XWUD6T.js.map → chunk-PFMTPKZO.js.map} +1 -1
- package/dist/{chunk-L4JI2AAL.js → chunk-QEPZPPLH.js} +4 -4
- package/dist/{chunk-L4JI2AAL.js.map → chunk-QEPZPPLH.js.map} +1 -1
- package/dist/{chunk-JNAJTCJD.js → chunk-QRHXAKJ3.js} +5 -3
- package/dist/chunk-QRHXAKJ3.js.map +1 -0
- package/dist/{chunk-L26XGP65.js → chunk-QZM4ZACO.js} +3 -3
- package/dist/{chunk-L26XGP65.js.map → chunk-QZM4ZACO.js.map} +1 -1
- package/dist/{chunk-Y464WYUT.js → chunk-RJ5HY6PN.js} +5 -5
- package/dist/{chunk-Y464WYUT.js.map → chunk-RJ5HY6PN.js.map} +1 -1
- package/dist/{chunk-ZI5XWXWG.js → chunk-SCL6EXHP.js} +3 -3
- package/dist/{chunk-ZI5XWXWG.js.map → chunk-SCL6EXHP.js.map} +1 -1
- package/dist/{chunk-SQXUWX4B.js → chunk-SGZ6TCHB.js} +5 -5
- package/dist/{chunk-SQXUWX4B.js.map → chunk-SGZ6TCHB.js.map} +1 -1
- package/dist/{chunk-W354TTIE.js → chunk-TOVC6CV7.js} +6 -6
- package/dist/{chunk-W354TTIE.js.map → chunk-TOVC6CV7.js.map} +1 -1
- package/dist/{chunk-YDSWLCOY.js → chunk-TTTI4W5F.js} +5 -5
- package/dist/{chunk-YDSWLCOY.js.map → chunk-TTTI4W5F.js.map} +1 -1
- package/dist/{chunk-TO6CJI2H.js → chunk-TUVDPELG.js} +8 -8
- package/dist/{chunk-TO6CJI2H.js.map → chunk-TUVDPELG.js.map} +1 -1
- package/dist/{chunk-TWUOIBO7.js → chunk-U46RGTYO.js} +3 -3
- package/dist/{chunk-TWUOIBO7.js.map → chunk-U46RGTYO.js.map} +1 -1
- package/dist/{chunk-2IW3JRWL.js → chunk-UCJNWQF2.js} +4 -4
- package/dist/{chunk-2IW3JRWL.js.map → chunk-UCJNWQF2.js.map} +1 -1
- package/dist/{chunk-LUFLN7WL.js → chunk-UEOXX7N2.js} +7 -7
- package/dist/{chunk-LUFLN7WL.js.map → chunk-UEOXX7N2.js.map} +1 -1
- package/dist/{chunk-YCHSWHTJ.js → chunk-UO4HPAP5.js} +8 -8
- package/dist/{chunk-YCHSWHTJ.js.map → chunk-UO4HPAP5.js.map} +1 -1
- package/dist/{chunk-SCRNQWZT.js → chunk-VDBDYFAL.js} +4 -4
- package/dist/{chunk-SCRNQWZT.js.map → chunk-VDBDYFAL.js.map} +1 -1
- package/dist/chunk-VM5Y62RM.js +182 -0
- package/dist/chunk-VM5Y62RM.js.map +1 -0
- package/dist/{chunk-ZVYJK6XQ.js → chunk-WAYZZVNX.js} +5 -5
- package/dist/{chunk-ZVYJK6XQ.js.map → chunk-WAYZZVNX.js.map} +1 -1
- package/dist/{chunk-BQ2MNEN7.js → chunk-WEN6FKY6.js} +3 -3
- package/dist/{chunk-BQ2MNEN7.js.map → chunk-WEN6FKY6.js.map} +1 -1
- package/dist/{chunk-24UCMWQB.js → chunk-WX2UWLMW.js} +3 -3
- package/dist/{chunk-24UCMWQB.js.map → chunk-WX2UWLMW.js.map} +1 -1
- package/dist/{chunk-IQA2UPXP.js → chunk-YDKPG3AP.js} +23 -13
- package/dist/chunk-YDKPG3AP.js.map +1 -0
- package/dist/{chunk-GXZW6BJY.js → chunk-YUI6R2PA.js} +3 -3
- package/dist/{chunk-GXZW6BJY.js.map → chunk-YUI6R2PA.js.map} +1 -1
- package/dist/{chunk-A4NN6C5B.js → chunk-YZDHDHSN.js} +3 -3
- package/dist/{chunk-A4NN6C5B.js.map → chunk-YZDHDHSN.js.map} +1 -1
- package/dist/{chunk-RBFLDI2Z.js → chunk-ZM4J5A4Z.js} +4 -4
- package/dist/{chunk-RBFLDI2Z.js.map → chunk-ZM4J5A4Z.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +23 -23
- package/dist/components/home/FeaturedProductsStyle2.d.ts.map +1 -1
- package/dist/components/home/FixedProducts.d.ts.map +1 -1
- package/dist/components/home/index.js +27 -27
- package/dist/components/layout/index.js +7 -7
- package/dist/components/product/index.js +24 -24
- package/dist/components/store/index.js +25 -25
- 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-2PMYG45N.js +29 -0
- package/dist/{document-class-O2LUUQTZ.js.map → document-class-2PMYG45N.js.map} +1 -1
- package/dist/hooks/index.js +23 -23
- package/dist/hooks/useComments.js +4 -4
- package/dist/hooks/useGtm.js +23 -23
- package/dist/hooks/useMoney.js +23 -23
- package/dist/hooks/useProduct.js +4 -4
- package/dist/hooks/useStore.js +23 -23
- package/dist/hooks/useUser.js +6 -6
- package/dist/hooks/useWishlist.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -23
- package/dist/native-app/index.js +4 -4
- package/dist/{navigation-LSRNHKGJ.js → navigation-3HNNCUGK.js} +8 -8
- package/dist/{navigation-LSRNHKGJ.js.map → navigation-3HNNCUGK.js.map} +1 -1
- package/dist/navigation-GF4ODD46.js +14 -0
- package/dist/{navigation-WASYQTFC.js.map → navigation-GF4ODD46.js.map} +1 -1
- package/dist/{not-found-WFK6JU2O.js → not-found-5YCYDSHS.js} +26 -26
- package/dist/{not-found-WFK6JU2O.js.map → not-found-5YCYDSHS.js.map} +1 -1
- package/dist/providers/index.js +23 -23
- package/dist/routes/account/orders.js +8 -8
- package/dist/routes/account.js +17 -17
- package/dist/routes/blog.js +12 -12
- package/dist/routes/brands.js +8 -8
- package/dist/routes/cart.js +31 -31
- package/dist/routes/home.js +28 -28
- package/dist/routes/index.js +7 -7
- package/dist/routes/loyalty.js +9 -9
- package/dist/routes/page.js +8 -8
- package/dist/routes/product-listing.js +29 -29
- package/dist/routes/product.js +27 -27
- package/dist/routes/root/beforeLoad.d.ts.map +1 -1
- package/dist/routes/seo-redirects.js +7 -7
- package/dist/routes/testimonials.js +3 -3
- package/dist/routes/thank-you.js +8 -8
- package/dist/skeleton.js +28 -28
- package/dist/{store-lookup-EW6ALPQF.js → store-lookup-TK4QCWNT.js} +12 -12
- package/dist/{store-lookup-EW6ALPQF.js.map → store-lookup-TK4QCWNT.js.map} +1 -1
- package/dist/tanstack.js +20 -20
- package/dist/utils/errors.d.ts +18 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/index.js +6 -6
- package/dist/vite/index.js +3 -3
- package/package.json +1 -1
- package/tailwind/components/home/FeaturedProductsStyle2.tsx.txt +8 -2
- package/tailwind/components/home/FixedProducts.tsx.txt +9 -2
- package/tailwind/routes/root/beforeLoad.ts.txt +8 -2
- package/dist/Header-W6XMMZIA.js +0 -22
- package/dist/MaintenancePage-Z34IQCUV.js +0 -7
- package/dist/StoreClosedNotification-LLXVKVC7.js +0 -54
- package/dist/chunk-BHGZ622P.js +0 -14
- package/dist/chunk-D42M66E4.js +0 -127
- package/dist/chunk-D42M66E4.js.map +0 -1
- package/dist/chunk-IQA2UPXP.js.map +0 -1
- package/dist/chunk-JNAJTCJD.js.map +0 -1
- package/dist/chunk-QBIPTWOR.js.map +0 -1
- package/dist/document-class-O2LUUQTZ.js +0 -29
- package/dist/navigation-WASYQTFC.js +0 -14
package/dist/tanstack.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
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-NEKHAKA7.js';
|
|
2
|
+
import { requestHostOf } from './chunk-UEOXX7N2.js';
|
|
3
|
+
export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-UEOXX7N2.js';
|
|
4
4
|
import './chunk-Z4Y55HWX.js';
|
|
5
|
-
export { tanstackHeadAdapter as head, withHead } from './chunk-
|
|
5
|
+
export { tanstackHeadAdapter as head, withHead } from './chunk-UCJNWQF2.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-RJ5HY6PN.js';
|
|
8
|
+
import { readNativeAppHeaders } from './chunk-VM5Y62RM.js';
|
|
9
|
+
import './chunk-PFMTPKZO.js';
|
|
10
|
+
import './chunk-SGZ6TCHB.js';
|
|
11
|
+
import { rootHead } from './chunk-TOVC6CV7.js';
|
|
12
|
+
import './chunk-LZZ6EESI.js';
|
|
13
|
+
import './chunk-GIAXPCHD.js';
|
|
14
|
+
import './chunk-GGATZRAY.js';
|
|
15
15
|
import './chunk-GD26FI4J.js';
|
|
16
16
|
import './chunk-4SZZPXM2.js';
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-3QJCZSLR.js';
|
|
18
18
|
import './chunk-OUW6WESU.js';
|
|
19
19
|
import './chunk-JWXJPJBO.js';
|
|
20
20
|
export { mergeDocumentDescriptors as mergeAttrs } from './chunk-CW625T2E.js';
|
|
21
|
-
import './chunk-
|
|
22
|
-
import './chunk-
|
|
21
|
+
import './chunk-NEPWW7KM.js';
|
|
22
|
+
import './chunk-TTTI4W5F.js';
|
|
23
23
|
import './chunk-TYNZ5B2B.js';
|
|
24
24
|
import './chunk-BYMOPN2S.js';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
27
|
-
import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId } from './chunk-
|
|
28
|
-
import { runWithTwilightContext, getTwilightContext } from './chunk-
|
|
29
|
-
export { getTwilightContext, runWithTwilightContext, updateTwilightContext } from './chunk-
|
|
25
|
+
import './chunk-YZDHDHSN.js';
|
|
26
|
+
import './chunk-L6TSHT52.js';
|
|
27
|
+
import { AUTH_TOKEN_COOKIE_NAME, extractTokenFromCookies, resolveRequestScope, resolveAddressedStore, STORE_BASE_HEADER, resolveRequestVersionId } from './chunk-YUI6R2PA.js';
|
|
28
|
+
import { runWithTwilightContext, getTwilightContext } from './chunk-QRHXAKJ3.js';
|
|
29
|
+
export { getTwilightContext, runWithTwilightContext, updateTwilightContext } from './chunk-QRHXAKJ3.js';
|
|
30
30
|
import './chunk-T72DAX7R.js';
|
|
31
31
|
import './chunk-DF6FBKDN.js';
|
|
32
32
|
import './chunk-DGUM43GV.js';
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a store's settings did not load:
|
|
3
|
+
* - `no-store`: nothing named a store for this request;
|
|
4
|
+
* - `timeout`: the Salla API did not answer in time;
|
|
5
|
+
* - `http`: it answered with an error status;
|
|
6
|
+
* - `network`: no answer arrived at all;
|
|
7
|
+
* - `empty`: it answered without settings.
|
|
8
|
+
*/
|
|
9
|
+
export type SettingsErrorReason = 'no-store' | 'timeout' | 'http' | 'network' | 'empty';
|
|
10
|
+
export interface SettingsErrorDetails {
|
|
11
|
+
reason?: SettingsErrorReason;
|
|
12
|
+
/** The API's status, when `reason` is `'http'`. */
|
|
13
|
+
status?: number;
|
|
14
|
+
}
|
|
1
15
|
export declare class SettingsError extends Error {
|
|
2
|
-
|
|
16
|
+
/** Absent when nothing said why, e.g. `getTwilightContext().settings` read before they loaded. */
|
|
17
|
+
readonly reason?: SettingsErrorReason;
|
|
18
|
+
readonly status?: number;
|
|
19
|
+
constructor(message?: string, details?: SettingsErrorDetails);
|
|
3
20
|
}
|
|
4
21
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAExF,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;gBAEb,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB;CAM7D"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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-RJ5HY6PN.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-GGATZRAY.js';
|
|
7
7
|
export { mergeHead, resolveHead, setHeadAdapter } from '../chunk-GD26FI4J.js';
|
|
8
8
|
export { buildBaseHead, buildHreflangAlternates, localeToOgLocale } from '../chunk-4SZZPXM2.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-
|
|
12
|
-
export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-
|
|
13
|
-
export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-
|
|
14
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-TTTI4W5F.js';
|
|
12
|
+
export { getSallaSDK, getStoreIdentifier, onSallaEvent, whenSallaLoaded, whenSallaReady } from '../chunk-L6TSHT52.js';
|
|
13
|
+
export { AUTH_TOKEN_COOKIE_NAME, clearAuthTokenCookie, extractTokenFromCookies } from '../chunk-YUI6R2PA.js';
|
|
14
|
+
import '../chunk-QRHXAKJ3.js';
|
|
15
15
|
import '../chunk-T72DAX7R.js';
|
|
16
16
|
import '../chunk-DGUM43GV.js';
|
|
17
17
|
|
package/dist/vite/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-UCJNWQF2.js';
|
|
4
4
|
import { nextjsHeadAdapter } from '../chunk-HOSHJBPS.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-LZZ6EESI.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
8
|
import '../chunk-4SZZPXM2.js';
|
|
9
9
|
import { RouteId } from '../chunk-OUW6WESU.js';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-QRHXAKJ3.js';
|
|
11
11
|
import '../chunk-T72DAX7R.js';
|
|
12
12
|
import '../chunk-DGUM43GV.js';
|
|
13
13
|
import { readFile, readdir, writeFile, mkdir } from 'fs/promises';
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { SallaProductsList } from '@salla.sa/twilight-components-react';
|
|
|
4
4
|
import { SallaProductsSlider } from '@salla.sa/twilight-components-react';
|
|
5
5
|
import { product, ProductsListSource } from '../../api/product';
|
|
6
6
|
import { ProductCard } from '../../components/product';
|
|
7
|
+
import { useTwilight } from '../../providers/TwilightProvider';
|
|
7
8
|
|
|
8
9
|
interface ProductSource {
|
|
9
10
|
source: ProductsListSource;
|
|
@@ -29,11 +30,14 @@ export interface FeaturedProductsStyle2Props {
|
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
// Like Twig Raed, the grid honors `vertical_fixed_products`; the slider never does.
|
|
32
34
|
export const FeaturedProductsStyle2 = memo(function FeaturedProductsStyle2({
|
|
33
35
|
data,
|
|
34
36
|
}: FeaturedProductsStyle2Props) {
|
|
37
|
+
const { theme } = useTwilight();
|
|
35
38
|
const items = data.items || [];
|
|
36
39
|
const isSlider = data.is_slider ?? true;
|
|
40
|
+
const cardLayout = (theme.settings.vertical_fixed_products ?? true) ? 'vertical' : 'horizontal';
|
|
37
41
|
|
|
38
42
|
const [activeTab, setActiveTab] = useState<string>(items[0]?.id || '');
|
|
39
43
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
@@ -110,10 +114,12 @@ export const FeaturedProductsStyle2 = memo(function FeaturedProductsStyle2({
|
|
|
110
114
|
section.products?.source_value,
|
|
111
115
|
section.products?.limit
|
|
112
116
|
)}
|
|
113
|
-
itemsClassName=
|
|
117
|
+
itemsClassName={`s-products-list-${cardLayout}-cards`}
|
|
114
118
|
>
|
|
115
119
|
{(products) =>
|
|
116
|
-
products.map((product) =>
|
|
120
|
+
products.map((product) => (
|
|
121
|
+
<ProductCard key={product.id} product={product} layout={cardLayout} />
|
|
122
|
+
))
|
|
117
123
|
}
|
|
118
124
|
</SallaProductsList>
|
|
119
125
|
)}
|
|
@@ -5,6 +5,7 @@ import { Link } from '../common';
|
|
|
5
5
|
import { product, ProductsListSource } from '../../api/product';
|
|
6
6
|
import { ProductCard } from '../../components/product';
|
|
7
7
|
import { useTranslation } from '../../providers/I18nProvider';
|
|
8
|
+
import { useTwilight } from '../../providers/TwilightProvider';
|
|
8
9
|
|
|
9
10
|
export interface FixedProductsProps {
|
|
10
11
|
data: {
|
|
@@ -21,13 +22,15 @@ export interface FixedProductsProps {
|
|
|
21
22
|
|
|
22
23
|
export function FixedProducts({ data }: FixedProductsProps) {
|
|
23
24
|
const { t } = useTranslation();
|
|
25
|
+
const { theme } = useTwilight();
|
|
24
26
|
|
|
25
27
|
const title = data.title;
|
|
26
28
|
// The merchant's product count: a number, or the same as a string. Anything that
|
|
27
29
|
// isn't a positive whole number falls back to what the API returns.
|
|
28
30
|
const parsedLimit = Number(data.limit);
|
|
29
31
|
const limit = Number.isInteger(parsedLimit) && parsedLimit > 0 ? parsedLimit : undefined;
|
|
30
|
-
|
|
32
|
+
// Matches Twig Raed: `theme.settings.get('vertical_fixed_products', true)`.
|
|
33
|
+
const isVertical = data.isVertical ?? theme.settings.vertical_fixed_products ?? true;
|
|
31
34
|
|
|
32
35
|
const { data: result, isLoading } = useQuery(
|
|
33
36
|
product.queries.list({
|
|
@@ -67,7 +70,11 @@ export function FixedProducts({ data }: FixedProductsProps) {
|
|
|
67
70
|
}
|
|
68
71
|
>
|
|
69
72
|
{products.slice(0, limit).map((product) => (
|
|
70
|
-
<ProductCard
|
|
73
|
+
<ProductCard
|
|
74
|
+
key={product.id}
|
|
75
|
+
product={product}
|
|
76
|
+
layout={isVertical ? 'vertical' : 'horizontal'}
|
|
77
|
+
/>
|
|
71
78
|
))}
|
|
72
79
|
</div>
|
|
73
80
|
</Suspense>
|
|
@@ -277,9 +277,15 @@ export async function rootBeforeLoad(ctx: {
|
|
|
277
277
|
// client. No-op on the server and while the SDK storage API is still hydrating.
|
|
278
278
|
syncScopeCookie();
|
|
279
279
|
|
|
280
|
+
// Kept until the rest have settled, as a missing answer always was, then thrown:
|
|
281
|
+
// it says why the store did not load.
|
|
282
|
+
let settingsFailure: unknown;
|
|
280
283
|
const [settingsResult, translationsResult, snippetsResult, appSettingsResult] = await Promise.all(
|
|
281
284
|
[
|
|
282
|
-
ctx.context.queryClient.ensureQueryData(storeApi.queries.settings())
|
|
285
|
+
ctx.context.queryClient.ensureQueryData(storeApi.queries.settings()).catch((error): null => {
|
|
286
|
+
settingsFailure = error;
|
|
287
|
+
return null;
|
|
288
|
+
}),
|
|
283
289
|
ctx.context.queryClient.ensureQueryData(translations.queries.byLocale(locale)),
|
|
284
290
|
// Snippets → SSR CDN <script> tags (AppsSnippets.ssrCdnScripts). Non-fatal + logged:
|
|
285
291
|
// on failure AppsSnippets falls back to its own client-side query for the same data,
|
|
@@ -310,7 +316,7 @@ export async function rootBeforeLoad(ctx: {
|
|
|
310
316
|
);
|
|
311
317
|
|
|
312
318
|
if (!settingsResult) {
|
|
313
|
-
throw
|
|
319
|
+
throw settingsFailure instanceof SettingsError ? settingsFailure : new SettingsError();
|
|
314
320
|
}
|
|
315
321
|
|
|
316
322
|
// Settings answered for another market name another theme version; the SDK only
|
package/dist/Header-W6XMMZIA.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { Header } from './chunk-SZ65XCSZ.js';
|
|
2
|
-
import './chunk-UWDUMPL7.js';
|
|
3
|
-
import './chunk-OUW6WESU.js';
|
|
4
|
-
import './chunk-ZVYJK6XQ.js';
|
|
5
|
-
import './chunk-4PT5MXGR.js';
|
|
6
|
-
import './chunk-5XDPAKF5.js';
|
|
7
|
-
import './chunk-GCPEMNSU.js';
|
|
8
|
-
import './chunk-YDSWLCOY.js';
|
|
9
|
-
import './chunk-TYNZ5B2B.js';
|
|
10
|
-
import './chunk-L26XGP65.js';
|
|
11
|
-
import './chunk-AXW67SY7.js';
|
|
12
|
-
import './chunk-BYMOPN2S.js';
|
|
13
|
-
import './chunk-SKLEJJ6M.js';
|
|
14
|
-
import './chunk-A4NN6C5B.js';
|
|
15
|
-
import './chunk-3NFVZJNI.js';
|
|
16
|
-
import './chunk-GXZW6BJY.js';
|
|
17
|
-
import './chunk-JNAJTCJD.js';
|
|
18
|
-
import './chunk-T72DAX7R.js';
|
|
19
|
-
import './chunk-DF6FBKDN.js';
|
|
20
|
-
import './chunk-DGUM43GV.js';
|
|
21
|
-
//# sourceMappingURL=Header-W6XMMZIA.js.map
|
|
22
|
-
//# sourceMappingURL=Header-W6XMMZIA.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { MaintenancePage } from './chunk-XL42DUCQ.js';
|
|
2
|
-
import './chunk-TYNZ5B2B.js';
|
|
3
|
-
import './chunk-JNAJTCJD.js';
|
|
4
|
-
import './chunk-T72DAX7R.js';
|
|
5
|
-
import './chunk-DGUM43GV.js';
|
|
6
|
-
//# sourceMappingURL=MaintenancePage-Z34IQCUV.js.map
|
|
7
|
-
//# sourceMappingURL=MaintenancePage-Z34IQCUV.js.map
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export { StoreClosedNotification } from './chunk-2B74CKXM.js';
|
|
2
|
-
import './chunk-6YI5J5ZN.js';
|
|
3
|
-
import './chunk-SZ65XCSZ.js';
|
|
4
|
-
import './chunk-ZI5XWXWG.js';
|
|
5
|
-
import './chunk-W354TTIE.js';
|
|
6
|
-
import './chunk-EHX45KZG.js';
|
|
7
|
-
import './chunk-BR56OEPZ.js';
|
|
8
|
-
import './chunk-OXMUPNMH.js';
|
|
9
|
-
import './chunk-UZGP2KFA.js';
|
|
10
|
-
import './chunk-VVZNW5CB.js';
|
|
11
|
-
import './chunk-U6KJ7XBO.js';
|
|
12
|
-
import './chunk-GD26FI4J.js';
|
|
13
|
-
import './chunk-4SZZPXM2.js';
|
|
14
|
-
import './chunk-UWDUMPL7.js';
|
|
15
|
-
import './chunk-OUW6WESU.js';
|
|
16
|
-
import './chunk-KSS7OA3Q.js';
|
|
17
|
-
import './chunk-HI5V5X3S.js';
|
|
18
|
-
import './chunk-RBFLDI2Z.js';
|
|
19
|
-
import './chunk-24UCMWQB.js';
|
|
20
|
-
import './chunk-MVT5AF2A.js';
|
|
21
|
-
import './chunk-Z653O7MX.js';
|
|
22
|
-
import './chunk-ZCH7W7DZ.js';
|
|
23
|
-
import './chunk-BEMWHR4T.js';
|
|
24
|
-
import './chunk-JWXJPJBO.js';
|
|
25
|
-
import './chunk-CW625T2E.js';
|
|
26
|
-
import './chunk-7V36I5GT.js';
|
|
27
|
-
import './chunk-6WI7R2BD.js';
|
|
28
|
-
import './chunk-HNSR4KLL.js';
|
|
29
|
-
import './chunk-OAMIDZKW.js';
|
|
30
|
-
import './chunk-ZVYJK6XQ.js';
|
|
31
|
-
import './chunk-V2ZDTY6H.js';
|
|
32
|
-
import './chunk-4PT5MXGR.js';
|
|
33
|
-
import './chunk-5XDPAKF5.js';
|
|
34
|
-
import './chunk-GCPEMNSU.js';
|
|
35
|
-
import './chunk-YDSWLCOY.js';
|
|
36
|
-
import './chunk-TYNZ5B2B.js';
|
|
37
|
-
import './chunk-L26XGP65.js';
|
|
38
|
-
import './chunk-AXW67SY7.js';
|
|
39
|
-
import './chunk-BYMOPN2S.js';
|
|
40
|
-
import './chunk-SKLEJJ6M.js';
|
|
41
|
-
import './chunk-6BZ5TKEV.js';
|
|
42
|
-
import './chunk-FZKRSGLP.js';
|
|
43
|
-
import './chunk-7V5HOZW4.js';
|
|
44
|
-
import './chunk-YA6ABQB7.js';
|
|
45
|
-
import './chunk-OSSOU36J.js';
|
|
46
|
-
import './chunk-A4NN6C5B.js';
|
|
47
|
-
import './chunk-3NFVZJNI.js';
|
|
48
|
-
import './chunk-GXZW6BJY.js';
|
|
49
|
-
import './chunk-JNAJTCJD.js';
|
|
50
|
-
import './chunk-T72DAX7R.js';
|
|
51
|
-
import './chunk-DF6FBKDN.js';
|
|
52
|
-
import './chunk-DGUM43GV.js';
|
|
53
|
-
//# sourceMappingURL=StoreClosedNotification-LLXVKVC7.js.map
|
|
54
|
-
//# sourceMappingURL=StoreClosedNotification-LLXVKVC7.js.map
|
package/dist/chunk-BHGZ622P.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
|
|
3
|
-
// src/components/cart/lazy.ts
|
|
4
|
-
var LazyCartItem = lazy(() => import('./CartItem-TYWGDMRV.js').then((m) => ({ default: m.CartItem })));
|
|
5
|
-
var LazyCartSummary = lazy(
|
|
6
|
-
() => import('./CartSummary-AKDPJ4OY.js').then((m) => ({ default: m.CartSummary }))
|
|
7
|
-
);
|
|
8
|
-
var LazySeoCartWidget = lazy(
|
|
9
|
-
() => import('./SeoCartWidget-NJK3YIPC.js').then((m) => ({ default: m.SeoCartWidget }))
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
export { LazyCartItem, LazyCartSummary, LazySeoCartWidget };
|
|
13
|
-
//# sourceMappingURL=chunk-BHGZ622P.js.map
|
|
14
|
-
//# sourceMappingURL=chunk-BHGZ622P.js.map
|
package/dist/chunk-D42M66E4.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { getActiveScope, requestedThemeVersionId, api, STORE_IDENTIFIER_HEADER } from './chunk-YDSWLCOY.js';
|
|
2
|
-
import { resolveStoreIdentifier } from './chunk-GXZW6BJY.js';
|
|
3
|
-
import { getTwilightContext } from './chunk-JNAJTCJD.js';
|
|
4
|
-
import { queryOptions } from '@tanstack/react-query';
|
|
5
|
-
|
|
6
|
-
// src/utils/native-app-headers.ts
|
|
7
|
-
var NATIVE_APP_HEADERS = [
|
|
8
|
-
"s-app-os",
|
|
9
|
-
"s-app-version",
|
|
10
|
-
"s-app-full-version",
|
|
11
|
-
"s-app-os-version"
|
|
12
|
-
];
|
|
13
|
-
function readNativeAppHeaders(headers) {
|
|
14
|
-
const os = headers.get("s-app-os")?.toLowerCase();
|
|
15
|
-
if (os !== "ios" && os !== "android") return null;
|
|
16
|
-
const found = {};
|
|
17
|
-
for (const name of NATIVE_APP_HEADERS) {
|
|
18
|
-
const value = headers.get(name);
|
|
19
|
-
if (value) found[name] = value;
|
|
20
|
-
}
|
|
21
|
-
return found;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// src/api/store.ts
|
|
25
|
-
var DEFAULT_INCLUDE_ITEMS = [
|
|
26
|
-
"store",
|
|
27
|
-
"settings",
|
|
28
|
-
"theme",
|
|
29
|
-
"theme_settings",
|
|
30
|
-
"external_services",
|
|
31
|
-
"currencies",
|
|
32
|
-
"languages",
|
|
33
|
-
"payments",
|
|
34
|
-
"product_widgets",
|
|
35
|
-
"rating",
|
|
36
|
-
"ratings",
|
|
37
|
-
"user"
|
|
38
|
-
];
|
|
39
|
-
function languagesToArray(languages) {
|
|
40
|
-
if (!languages) return void 0;
|
|
41
|
-
return Object.values(languages).map((lang) => ({ iso_code: lang.code, ...lang }));
|
|
42
|
-
}
|
|
43
|
-
function withNativeAppHeaders(jitsu) {
|
|
44
|
-
if (!jitsu || typeof window !== "undefined") return jitsu;
|
|
45
|
-
let appHeaders = null;
|
|
46
|
-
try {
|
|
47
|
-
appHeaders = getTwilightContext().nativeAppHeaders;
|
|
48
|
-
} catch {
|
|
49
|
-
return jitsu;
|
|
50
|
-
}
|
|
51
|
-
if (!appHeaders) return jitsu;
|
|
52
|
-
const extra = jitsu.context?.extra;
|
|
53
|
-
const headers = { ...extra?.headers };
|
|
54
|
-
for (const name of NATIVE_APP_HEADERS) delete headers[name];
|
|
55
|
-
return {
|
|
56
|
-
...jitsu,
|
|
57
|
-
context: {
|
|
58
|
-
...jitsu.context,
|
|
59
|
-
extra: { ...extra, headers: { ...headers, ...appHeaders } }
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
var store = {
|
|
64
|
-
settings: async (storeIdentifier) => {
|
|
65
|
-
const identifier = storeIdentifier ?? resolveStoreIdentifier();
|
|
66
|
-
if (!identifier) {
|
|
67
|
-
console.warn("[store.settings] No store identifier available");
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
const includeParams = DEFAULT_INCLUDE_ITEMS.map((i) => `include[]=${i}`).join("&");
|
|
71
|
-
const scope = getActiveScope();
|
|
72
|
-
const params = scope != null ? `${includeParams}&scope=${scope.id}` : includeParams;
|
|
73
|
-
try {
|
|
74
|
-
const json = await api.get(`store/settings?${params}`, {
|
|
75
|
-
timeout: 5e3,
|
|
76
|
-
headers: { [STORE_IDENTIFIER_HEADER]: identifier }
|
|
77
|
-
}).json();
|
|
78
|
-
const data = json?.data;
|
|
79
|
-
if (!data) return null;
|
|
80
|
-
const languages = languagesToArray(data.languages);
|
|
81
|
-
return {
|
|
82
|
-
store: data.store,
|
|
83
|
-
theme: data.theme,
|
|
84
|
-
languages,
|
|
85
|
-
currencies: data.currencies,
|
|
86
|
-
external_services: data.external_services,
|
|
87
|
-
headers: data.headers,
|
|
88
|
-
login: data.login,
|
|
89
|
-
affiliate: data.affiliate,
|
|
90
|
-
policy_url: data.policy_url,
|
|
91
|
-
user: data.user,
|
|
92
|
-
swoole: data.swoole,
|
|
93
|
-
jitsu: withNativeAppHeaders(data.jitsu),
|
|
94
|
-
maintenance: data.maintenance,
|
|
95
|
-
maintenance_details: data.maintenance_details,
|
|
96
|
-
...scope && { requestedScopeId: scope.id }
|
|
97
|
-
};
|
|
98
|
-
} catch (error) {
|
|
99
|
-
console.error("[store.settings] Failed:", error);
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
queries: {
|
|
104
|
-
settings: (storeIdentifier) => queryOptions({
|
|
105
|
-
queryKey: [
|
|
106
|
-
"store",
|
|
107
|
-
"settings",
|
|
108
|
-
storeIdentifier,
|
|
109
|
-
getTwilightContext().locale,
|
|
110
|
-
getActiveScope(),
|
|
111
|
-
// Two versions of one store's settings are two different answers, and
|
|
112
|
-
// this is the query whose answer decides what every other call is
|
|
113
|
-
// pinned to. `requestedThemeVersionId` rather than the resolved one:
|
|
114
|
-
// the resolved value falls back to what these settings report, so it
|
|
115
|
-
// is not knowable until after this query has run — the key would be
|
|
116
|
-
// one thing on the server and another on the client, and the hydrated
|
|
117
|
-
// page would refetch the settings it was just handed.
|
|
118
|
-
requestedThemeVersionId()
|
|
119
|
-
],
|
|
120
|
-
queryFn: () => store.settings(storeIdentifier)
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export { readNativeAppHeaders, store };
|
|
126
|
-
//# sourceMappingURL=chunk-D42M66E4.js.map
|
|
127
|
-
//# sourceMappingURL=chunk-D42M66E4.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A,QACA,eAAA;AAAA,QACA,oBAAmB,CAAE,MAAA;AAAA,QACrB,cAAA,EAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQf,uBAAA;AAAwB,OAC1B;AAAA,MACA,OAAA,EAAS,MAAM,KAAA,CAAM,QAAA,CAAS,eAAe;AAAA,KAC9C;AAAA;AAEP","file":"chunk-D42M66E4.js","sourcesContent":["/** The headers the Salla native app sends with every page it loads in its webview. */\nexport const NATIVE_APP_HEADERS = [\n 's-app-os',\n 's-app-version',\n 's-app-full-version',\n 's-app-os-version',\n];\n\n/**\n * The native app's own headers on this request, or null when it is not the app.\n *\n * On a Twig theme Laravel copies them into the settings' `jitsu.context.extra.headers`,\n * where the SDK reads the app's platform and version from (`salla.config.isMobileApp()`).\n * A React theme asks for its settings from the server, through the API, so the app's\n * headers never reach that call: the request is the only place they are.\n */\nexport function readNativeAppHeaders(headers: Headers): Record<string, string> | null {\n const os = headers.get('s-app-os')?.toLowerCase();\n if (os !== 'ios' && os !== 'android') return null;\n const found: Record<string, string> = {};\n for (const name of NATIVE_APP_HEADERS) {\n const value = headers.get(name);\n if (value) found[name] = value;\n }\n return found;\n}\n","import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope, STORE_IDENTIFIER_HEADER } from './client';\nimport type { Store, Theme, Language, JitsuConfig, MaintenanceDetails } from '../types';\nimport { getTwilightContext } from '../twilight/context';\nimport { resolveStoreIdentifier } from '../utils/store-identity';\nimport { requestedThemeVersionId } from '../utils/theme-version';\nimport { NATIVE_APP_HEADERS } from '../utils/native-app-headers';\n\nexport { resolveStoreIdentifier };\n\nconst DEFAULT_INCLUDE_ITEMS = [\n 'store',\n 'settings',\n 'theme',\n 'theme_settings',\n 'external_services',\n 'currencies',\n 'languages',\n 'payments',\n 'product_widgets',\n 'rating',\n 'ratings',\n 'user',\n];\n\n/** Twig's `salla.init({ user })` object; the endpoint ignores the token, so always the guest. */\nexport interface SettingsUser {\n type: 'guest' | 'user';\n id?: number | string | null;\n language_code?: string;\n currency_code?: string;\n country_code?: string;\n [key: string]: unknown;\n}\n\n/**\n * Raw API response for settings endpoint.\n * Languages come as object: { \"AR\": { code, name, ... }, \"EN\": {...} }\n */\ninterface SettingsApiResponse {\n store?: Store;\n theme?: Theme;\n languages?: Record<string, Language>;\n currencies?: Record<\n string,\n { code: string; name: string; symbol: string; amount: number; country_code: string }\n >;\n external_services?: Record<string, unknown>;\n headers?: Record<string, unknown>;\n login?: { url: string; turnstile_site_key: string };\n affiliate?: { utm_url: string; cta_enabled: boolean };\n debug?: boolean;\n trace_console?: boolean;\n policy_url?: string;\n user?: SettingsUser;\n swoole?: string[];\n jitsu?: JitsuConfig;\n maintenance?: boolean;\n maintenance_details?: MaintenanceDetails;\n}\n\n/**\n * Central settings context - single source of truth for all API data.\n * Contains everything from the settings endpoint response after processing.\n */\nexport interface StoreContext {\n store?: Store;\n theme?: Theme;\n /** Languages as array after conversion from API object format */\n languages?: Language[];\n currencies?: Record<\n string,\n { code: string; name: string; symbol: string; amount: number; country_code: string }\n >;\n external_services?: Record<string, unknown>;\n headers?: Record<string, unknown>;\n login?: { url: string; turnstile_site_key: string };\n affiliate?: { utm_url: string; cta_enabled: boolean };\n debug?: boolean;\n trace_console?: boolean; // todo:: remove it\n policy_url?: string;\n user?: SettingsUser;\n /** API paths the SDK sends with `s-store-api-version: swoole` */\n swoole?: string[];\n /** Where the SDK's analytics send events, and which ones; without it the SDK tracks nothing. */\n jitsu?: JitsuConfig;\n /**\n * The store is closed: by the merchant from the dashboard, by the platform, or\n * for the selected market only. The engine then renders the maintenance page\n * to everyone but the merchant; see `rootBeforeLoad`.\n */\n maintenance?: boolean;\n /** What the maintenance page says; sent beside `maintenance`. */\n maintenance_details?: MaintenanceDetails;\n /**\n * The scope these settings were requested with; absent when none was. Not from\n * the API: stamped by `store.settings`, so `resolveThemeVersionId` can tell\n * whether the version they name still answers the scope that is active now.\n */\n requestedScopeId?: string;\n}\n\n/**\n * Converts languages object from API to array format.\n * API returns: { \"AR\": { code, name, ... }, \"EN\": { ... } }\n * We need: [{ code, name, ... }, { code, name, ... }]\n * todo:: return the languages as object from the APIs to avoid this\n */\nfunction languagesToArray(languages?: Record<string, Language>): Language[] | undefined {\n if (!languages) return undefined;\n // The SDK's localization modal reads `lang.iso_code` (not `code`) when a language is\n // selected — without it the switch navigates to `/undefined/...`.\n return Object.values(languages).map((lang) => ({ iso_code: lang.code, ...lang }));\n}\n\n/**\n * The settings' analytics context with the native app's headers in it, as Laravel\n * writes it for a Twig theme: the SDK reads the app's platform and version from there.\n * The API answers a server-side call with the engine's own headers, never the app's.\n */\nfunction withNativeAppHeaders(jitsu?: JitsuConfig): JitsuConfig | undefined {\n if (!jitsu || typeof window !== 'undefined') return jitsu;\n let appHeaders: Record<string, string> | null = null;\n try {\n appHeaders = getTwilightContext().nativeAppHeaders;\n } catch {\n return jitsu;\n }\n if (!appHeaders) return jitsu;\n const extra = jitsu.context?.extra;\n // The engine's own app headers go, so an app that sends no version doesn't get the engine's.\n const headers = { ...extra?.headers };\n for (const name of NATIVE_APP_HEADERS) delete headers[name];\n return {\n ...jitsu,\n context: {\n ...jitsu.context,\n extra: { ...extra, headers: { ...headers, ...appHeaders } },\n },\n };\n}\n\nexport const store = {\n settings: async (storeIdentifier?: string): Promise<StoreContext | null> => {\n const identifier = storeIdentifier ?? resolveStoreIdentifier();\n\n if (!identifier) {\n console.warn('[store.settings] No store identifier available');\n return null;\n }\n\n const includeParams = DEFAULT_INCLUDE_ITEMS.map((i) => `include[]=${i}`).join('&');\n const scope = getActiveScope();\n const params = scope != null ? `${includeParams}&scope=${scope.id}` : includeParams;\n\n try {\n const json = await api\n // Sent explicitly rather than left to the client's own resolution, so\n // the identifier this function checked is the identifier that travels.\n // They agree today; a caller passing one and being answered about\n // another is the failure this makes impossible rather than unlikely.\n .get(`store/settings?${params}`, {\n timeout: 5000,\n headers: { [STORE_IDENTIFIER_HEADER]: identifier },\n })\n .json<{ data?: SettingsApiResponse }>();\n\n const data = json?.data;\n if (!data) return null;\n\n // Convert languages from object to array\n const languages = languagesToArray(data.languages);\n\n return {\n store: data.store,\n theme: data.theme,\n languages,\n currencies: data.currencies,\n external_services: data.external_services,\n headers: data.headers,\n login: data.login,\n affiliate: data.affiliate,\n policy_url: data.policy_url,\n user: data.user,\n swoole: data.swoole,\n jitsu: withNativeAppHeaders(data.jitsu),\n maintenance: data.maintenance,\n maintenance_details: data.maintenance_details,\n ...(scope && { requestedScopeId: scope.id }),\n };\n } catch (error) {\n console.error('[store.settings] Failed:', error);\n return null;\n }\n },\n\n queries: {\n settings: (storeIdentifier?: string) =>\n queryOptions<StoreContext | null>({\n queryKey: [\n 'store',\n 'settings',\n storeIdentifier,\n getTwilightContext().locale,\n getActiveScope(),\n // Two versions of one store's settings are two different answers, and\n // this is the query whose answer decides what every other call is\n // pinned to. `requestedThemeVersionId` rather than the resolved one:\n // the resolved value falls back to what these settings report, so it\n // is not knowable until after this query has run — the key would be\n // one thing on the server and another on the client, and the hydrated\n // page would refetch the settings it was just handed.\n requestedThemeVersionId(),\n ],\n queryFn: () => store.settings(storeIdentifier),\n }),\n },\n};\n"]}
|