@salla.sa/twilight-theme-engine 1.0.116 → 1.0.117
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-6NCWP2NI.js → AddToCartForm-OHUF5AB7.js} +3 -3
- package/dist/{AddToCartForm-6NCWP2NI.js.map → AddToCartForm-OHUF5AB7.js.map} +1 -1
- package/dist/{BlogAuthorPage-NLVQF5Q5.js → BlogAuthorPage-4FEUVAUM.js} +22 -22
- package/dist/{BlogAuthorPage-NLVQF5Q5.js.map → BlogAuthorPage-4FEUVAUM.js.map} +1 -1
- package/dist/{BlogCategoryPage-4QUIKTSA.js → BlogCategoryPage-GCDDD4TO.js} +22 -22
- package/dist/{BlogCategoryPage-4QUIKTSA.js.map → BlogCategoryPage-GCDDD4TO.js.map} +1 -1
- package/dist/{BlogPage-XB2D5HHJ.js → BlogPage-AHBBXOTS.js} +20 -20
- package/dist/{BlogPage-XB2D5HHJ.js.map → BlogPage-AHBBXOTS.js.map} +1 -1
- package/dist/{BlogSinglePage-KA66R2CQ.js → BlogSinglePage-GQPO24UA.js} +20 -20
- package/dist/{BlogSinglePage-KA66R2CQ.js.map → BlogSinglePage-GQPO24UA.js.map} +1 -1
- package/dist/{BlogTagPage-MBRDNQVV.js → BlogTagPage-MZIA7SRR.js} +22 -22
- package/dist/{BlogTagPage-MBRDNQVV.js.map → BlogTagPage-MZIA7SRR.js.map} +1 -1
- package/dist/{BrandsPage-NFKQQEAI.js → BrandsPage-5DWAMTNA.js} +21 -21
- package/dist/{BrandsPage-NFKQQEAI.js.map → BrandsPage-5DWAMTNA.js.map} +1 -1
- package/dist/{Breadcrumb-VZTWGT26.js → Breadcrumb-6FJS2523.js} +20 -20
- package/dist/{Breadcrumb-VZTWGT26.js.map → Breadcrumb-6FJS2523.js.map} +1 -1
- package/dist/{CartItem-EFDQLYP7.js → CartItem-YL3HRWEN.js} +20 -20
- package/dist/{CartItem-EFDQLYP7.js.map → CartItem-YL3HRWEN.js.map} +1 -1
- package/dist/{CartSummary-PJDCLQTS.js → CartSummary-KAFG7UAC.js} +20 -20
- package/dist/{CartSummary-PJDCLQTS.js.map → CartSummary-KAFG7UAC.js.map} +1 -1
- package/dist/{Copyright-HAU4I2CU.js → Copyright-BPWB33YX.js} +3 -3
- package/dist/{Copyright-HAU4I2CU.js.map → Copyright-BPWB33YX.js.map} +1 -1
- package/dist/{CustomerLayout-IHB3VD3E.js → CustomerLayout-OH3U7D5I.js} +20 -20
- package/dist/{CustomerLayout-IHB3VD3E.js.map → CustomerLayout-OH3U7D5I.js.map} +1 -1
- package/dist/{Footer-GKYZN2IF.js → Footer-M7KCCGJG.js} +4 -4
- package/dist/{Footer-GKYZN2IF.js.map → Footer-M7KCCGJG.js.map} +1 -1
- package/dist/{Header-OUMPXV42.js → Header-WU6S6SNO.js} +10 -10
- package/dist/{Header-OUMPXV42.js.map → Header-WU6S6SNO.js.map} +1 -1
- package/dist/{LoyaltyPage-RLDDXCXX.js → LoyaltyPage-PYTL63HY.js} +20 -20
- package/dist/{LoyaltyPage-RLDDXCXX.js.map → LoyaltyPage-PYTL63HY.js.map} +1 -1
- package/dist/{LoyaltyPointsPage-O5KWIEY2.js → LoyaltyPointsPage-KUK3BP7H.js} +7 -7
- package/dist/{LoyaltyPointsPage-O5KWIEY2.js.map → LoyaltyPointsPage-KUK3BP7H.js.map} +1 -1
- package/dist/{MainMenu-LJIJY4AX.js → MainMenu-VEUDAJ25.js} +6 -6
- package/dist/{MainMenu-LJIJY4AX.js.map → MainMenu-VEUDAJ25.js.map} +1 -1
- package/dist/{MasterLayout-FNC6M7D7.js → MasterLayout-Y5YVZTHN.js} +20 -20
- package/dist/{MasterLayout-FNC6M7D7.js.map → MasterLayout-Y5YVZTHN.js.map} +1 -1
- package/dist/{MobileMenu-BRKNE7QW.js → MobileMenu-5U3TIT2I.js} +21 -21
- package/dist/{MobileMenu-BRKNE7QW.js.map → MobileMenu-5U3TIT2I.js.map} +1 -1
- package/dist/{NotificationsPage-PUFFEJJL.js → NotificationsPage-477VJ6XE.js} +20 -20
- package/dist/{NotificationsPage-PUFFEJJL.js.map → NotificationsPage-477VJ6XE.js.map} +1 -1
- package/dist/{OrderSinglePage-DPRCLI7U.js → OrderSinglePage-ZZIGWYQV.js} +21 -21
- package/dist/{OrderSinglePage-DPRCLI7U.js.map → OrderSinglePage-ZZIGWYQV.js.map} +1 -1
- package/dist/{OrdersPage-YCF2F4CC.js → OrdersPage-K7T6ZNJ6.js} +20 -20
- package/dist/{OrdersPage-YCF2F4CC.js.map → OrdersPage-K7T6ZNJ6.js.map} +1 -1
- package/dist/{PageSingle-UIFZXJIV.js → PageSingle-DMXT57VC.js} +5 -5
- package/dist/{PageSingle-UIFZXJIV.js.map → PageSingle-DMXT57VC.js.map} +1 -1
- package/dist/{ProductDetails-73Q6BYGA.js → ProductDetails-UISP7TFH.js} +6 -6
- package/dist/{ProductDetails-73Q6BYGA.js.map → ProductDetails-UISP7TFH.js.map} +1 -1
- package/dist/{ProfilePage-ZD5E4OGM.js → ProfilePage-RALWGI2P.js} +20 -20
- package/dist/{ProfilePage-ZD5E4OGM.js.map → ProfilePage-RALWGI2P.js.map} +1 -1
- package/dist/{ReviewsPage-5WOXAZDE.js → ReviewsPage-MJXZKKLC.js} +3 -3
- package/dist/{ReviewsPage-5WOXAZDE.js.map → ReviewsPage-MJXZKKLC.js.map} +1 -1
- package/dist/{SeoCartWidget-GYAGYAX2.js → SeoCartWidget-VJRASYIL.js} +20 -20
- package/dist/{SeoCartWidget-GYAGYAX2.js.map → SeoCartWidget-VJRASYIL.js.map} +1 -1
- package/dist/{SettingsPage-7CU5SRJO.js → SettingsPage-EIYGSJY7.js} +20 -20
- package/dist/{SettingsPage-7CU5SRJO.js.map → SettingsPage-EIYGSJY7.js.map} +1 -1
- package/dist/{StoreClosedNotification-O5YSPII4.js → StoreClosedNotification-EY4UMR7F.js} +21 -21
- package/dist/{StoreClosedNotification-O5YSPII4.js.map → StoreClosedNotification-EY4UMR7F.js.map} +1 -1
- package/dist/{TestimonialsPage-BFEG7S6W.js → TestimonialsPage-NBQQPUZB.js} +5 -5
- package/dist/{TestimonialsPage-BFEG7S6W.js.map → TestimonialsPage-NBQQPUZB.js.map} +1 -1
- package/dist/{ThankYouPage-5QENDZTM.js → ThankYouPage-4FEFUSEE.js} +20 -20
- package/dist/{ThankYouPage-5QENDZTM.js.map → ThankYouPage-4FEFUSEE.js.map} +1 -1
- package/dist/{WalletPage-EYTVKQMV.js → WalletPage-LWKISA73.js} +21 -21
- package/dist/{WalletPage-EYTVKQMV.js.map → WalletPage-LWKISA73.js.map} +1 -1
- package/dist/{WishlistPage-LT7TOAM3.js → WishlistPage-N3VX6JZV.js} +22 -22
- package/dist/{WishlistPage-LT7TOAM3.js.map → WishlistPage-N3VX6JZV.js.map} +1 -1
- package/dist/api/advertisement.js +3 -3
- package/dist/api/apps.js +3 -3
- package/dist/api/blog.js +5 -5
- package/dist/api/brands.js +5 -5
- package/dist/api/cart.js +5 -5
- package/dist/api/category.js +5 -5
- package/dist/api/client.js +2 -2
- package/dist/api/home.js +3 -3
- package/dist/api/loyalty.js +5 -5
- package/dist/api/menu.js +3 -3
- package/dist/api/notification.js +3 -3
- package/dist/api/order.js +5 -5
- package/dist/api/page.js +5 -5
- package/dist/api/product.js +5 -5
- package/dist/api/profile.js +2 -2
- package/dist/api/store.js +3 -3
- package/dist/api/translations.js +3 -3
- package/dist/api/user.js +3 -3
- package/dist/api/wallet.js +3 -3
- package/dist/api/wishlist.js +6 -6
- package/dist/{chunk-7AIDISU2.js → chunk-2TLIULJZ.js} +3 -3
- package/dist/{chunk-7AIDISU2.js.map → chunk-2TLIULJZ.js.map} +1 -1
- package/dist/{chunk-7ANH3RD5.js → chunk-45YF2KXD.js} +4 -4
- package/dist/{chunk-7ANH3RD5.js.map → chunk-45YF2KXD.js.map} +1 -1
- package/dist/{chunk-V3NOBNNU.js → chunk-5CKTQAFX.js} +3 -3
- package/dist/{chunk-V3NOBNNU.js.map → chunk-5CKTQAFX.js.map} +1 -1
- package/dist/{chunk-D3PO3ICA.js → chunk-BK5TBUGG.js} +3 -3
- package/dist/{chunk-D3PO3ICA.js.map → chunk-BK5TBUGG.js.map} +1 -1
- package/dist/{chunk-4ODMWV34.js → chunk-CF2XUAAK.js} +4 -4
- package/dist/{chunk-4ODMWV34.js.map → chunk-CF2XUAAK.js.map} +1 -1
- package/dist/{chunk-JZ2SYFVR.js → chunk-DVOPY7MI.js} +5 -5
- package/dist/{chunk-JZ2SYFVR.js.map → chunk-DVOPY7MI.js.map} +1 -1
- package/dist/{chunk-5G6PD6P2.js → chunk-E552K72T.js} +3 -3
- package/dist/{chunk-5G6PD6P2.js.map → chunk-E552K72T.js.map} +1 -1
- package/dist/{chunk-HFGOFYQX.js → chunk-E7MENFQB.js} +3 -3
- package/dist/{chunk-HFGOFYQX.js.map → chunk-E7MENFQB.js.map} +1 -1
- package/dist/{chunk-7EZZR4WA.js → chunk-EFCIK5NI.js} +4 -4
- package/dist/{chunk-7EZZR4WA.js.map → chunk-EFCIK5NI.js.map} +1 -1
- package/dist/{chunk-7QHK77KL.js → chunk-EFT442TN.js} +4 -4
- package/dist/{chunk-7QHK77KL.js.map → chunk-EFT442TN.js.map} +1 -1
- package/dist/{chunk-75TXHISE.js → chunk-EJB6NN3F.js} +4 -4
- package/dist/{chunk-75TXHISE.js.map → chunk-EJB6NN3F.js.map} +1 -1
- package/dist/{chunk-74W2O47D.js → chunk-FYJPK6XU.js} +3 -3
- package/dist/{chunk-74W2O47D.js.map → chunk-FYJPK6XU.js.map} +1 -1
- package/dist/{chunk-3GDJMMMS.js → chunk-GYXUYHKO.js} +41 -6
- package/dist/chunk-GYXUYHKO.js.map +1 -0
- package/dist/{chunk-CDOGKC7B.js → chunk-IRGT53OJ.js} +5 -5
- package/dist/{chunk-CDOGKC7B.js.map → chunk-IRGT53OJ.js.map} +1 -1
- package/dist/{chunk-BVMHRVCG.js → chunk-JGVEGQHJ.js} +3 -3
- package/dist/{chunk-BVMHRVCG.js.map → chunk-JGVEGQHJ.js.map} +1 -1
- package/dist/{chunk-GFZEZQ45.js → chunk-JM6SMCEK.js} +4 -4
- package/dist/{chunk-GFZEZQ45.js.map → chunk-JM6SMCEK.js.map} +1 -1
- package/dist/{chunk-WBL7MSKQ.js → chunk-KPTVSC46.js} +4 -4
- package/dist/{chunk-WBL7MSKQ.js.map → chunk-KPTVSC46.js.map} +1 -1
- package/dist/{chunk-ZGVBXJQO.js → chunk-KZFIA76B.js} +5 -5
- package/dist/{chunk-ZGVBXJQO.js.map → chunk-KZFIA76B.js.map} +1 -1
- package/dist/{chunk-5CEVDCMY.js → chunk-L4TQBWR7.js} +3 -3
- package/dist/{chunk-5CEVDCMY.js.map → chunk-L4TQBWR7.js.map} +1 -1
- package/dist/{chunk-KXD4WUYA.js → chunk-L5BP6ARL.js} +4 -4
- package/dist/{chunk-KXD4WUYA.js.map → chunk-L5BP6ARL.js.map} +1 -1
- package/dist/{chunk-6D3OWIEC.js → chunk-LPCNDH4F.js} +4 -3
- package/dist/chunk-LPCNDH4F.js.map +1 -0
- package/dist/{chunk-ZMXHQKZS.js → chunk-MJ6J3HUJ.js} +4 -4
- package/dist/{chunk-ZMXHQKZS.js.map → chunk-MJ6J3HUJ.js.map} +1 -1
- package/dist/chunk-MJ7FQJDF.js +14 -0
- package/dist/{chunk-GPWNE2C6.js.map → chunk-MJ7FQJDF.js.map} +1 -1
- package/dist/{chunk-BLIH42Y6.js → chunk-MMKLT4YU.js} +7 -7
- package/dist/{chunk-BLIH42Y6.js.map → chunk-MMKLT4YU.js.map} +1 -1
- package/dist/{chunk-4TM54PZO.js → chunk-MTDXG2GS.js} +4 -4
- package/dist/{chunk-4TM54PZO.js.map → chunk-MTDXG2GS.js.map} +1 -1
- package/dist/{chunk-JVAFKLXJ.js → chunk-NEHOBD4K.js} +3 -3
- package/dist/{chunk-JVAFKLXJ.js.map → chunk-NEHOBD4K.js.map} +1 -1
- package/dist/{chunk-Z3EAHRXR.js → chunk-NKSXBOIB.js} +11 -11
- package/dist/{chunk-Z3EAHRXR.js.map → chunk-NKSXBOIB.js.map} +1 -1
- package/dist/{chunk-L34CKKVC.js → chunk-O4UUZ254.js} +3 -3
- package/dist/{chunk-L34CKKVC.js.map → chunk-O4UUZ254.js.map} +1 -1
- package/dist/{chunk-CGHCXWV2.js → chunk-P5NIICFT.js} +3 -3
- package/dist/{chunk-CGHCXWV2.js.map → chunk-P5NIICFT.js.map} +1 -1
- package/dist/{chunk-M46EKE7R.js → chunk-PFAPRJVF.js} +5 -31
- package/dist/chunk-PFAPRJVF.js.map +1 -0
- package/dist/{chunk-4ZTHNUB7.js → chunk-RUDUXB55.js} +7 -7
- package/dist/{chunk-4ZTHNUB7.js.map → chunk-RUDUXB55.js.map} +1 -1
- package/dist/{chunk-OU2KIHZI.js → chunk-RVPC4AYT.js} +3 -3
- package/dist/{chunk-OU2KIHZI.js.map → chunk-RVPC4AYT.js.map} +1 -1
- package/dist/{chunk-DGTFJWBV.js → chunk-S7P72JBV.js} +4 -4
- package/dist/{chunk-DGTFJWBV.js.map → chunk-S7P72JBV.js.map} +1 -1
- package/dist/{chunk-YWDMDW2K.js → chunk-SC2X42RE.js} +4 -4
- package/dist/{chunk-YWDMDW2K.js.map → chunk-SC2X42RE.js.map} +1 -1
- package/dist/{chunk-SW4WGOLU.js → chunk-UMTMIMH7.js} +3 -3
- package/dist/{chunk-SW4WGOLU.js.map → chunk-UMTMIMH7.js.map} +1 -1
- package/dist/{chunk-P7A24TSM.js → chunk-V2M5YNZQ.js} +3 -3
- package/dist/{chunk-P7A24TSM.js.map → chunk-V2M5YNZQ.js.map} +1 -1
- package/dist/{chunk-WBXIDILF.js → chunk-VI2WHQDR.js} +3 -3
- package/dist/{chunk-WBXIDILF.js.map → chunk-VI2WHQDR.js.map} +1 -1
- package/dist/{chunk-W6LB5TRO.js → chunk-VSK2WS4G.js} +3 -3
- package/dist/{chunk-W6LB5TRO.js.map → chunk-VSK2WS4G.js.map} +1 -1
- package/dist/{chunk-OKCNKVB5.js → chunk-VT6FE3CB.js} +3 -3
- package/dist/{chunk-OKCNKVB5.js.map → chunk-VT6FE3CB.js.map} +1 -1
- package/dist/{chunk-QQTY4PDC.js → chunk-W6NQM4FQ.js} +3 -3
- package/dist/{chunk-QQTY4PDC.js.map → chunk-W6NQM4FQ.js.map} +1 -1
- package/dist/{chunk-DGCHTKPZ.js → chunk-WJ7IGOIK.js} +8 -8
- package/dist/{chunk-DGCHTKPZ.js.map → chunk-WJ7IGOIK.js.map} +1 -1
- package/dist/{chunk-X7A6BCYN.js → chunk-WJZXENPN.js} +7 -7
- package/dist/{chunk-X7A6BCYN.js.map → chunk-WJZXENPN.js.map} +1 -1
- package/dist/{chunk-UHXL4VZS.js → chunk-XKP5LIEJ.js} +4 -4
- package/dist/{chunk-UHXL4VZS.js.map → chunk-XKP5LIEJ.js.map} +1 -1
- package/dist/{chunk-LQ4X4YQM.js → chunk-ZAPRXUPS.js} +23 -21
- package/dist/chunk-ZAPRXUPS.js.map +1 -0
- package/dist/{chunk-RR2RWSCF.js → chunk-ZQMLBSSL.js} +7 -7
- package/dist/{chunk-RR2RWSCF.js.map → chunk-ZQMLBSSL.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 +18 -18
- package/dist/components/home/index.js +22 -22
- package/dist/components/layout/index.js +5 -5
- package/dist/components/product/index.js +19 -19
- package/dist/components/store/index.js +19 -19
- package/dist/components/toast/index.js +3 -3
- package/dist/dev/editor/index.js +1 -1
- package/dist/dev/index.js +1 -1
- package/dist/{document-class-YRZ37ED3.js → document-class-K5VLY3NR.js} +13 -13
- package/dist/{document-class-YRZ37ED3.js.map → document-class-K5VLY3NR.js.map} +1 -1
- package/dist/hooks/index.js +18 -18
- package/dist/hooks/useComments.js +2 -2
- package/dist/hooks/useGtm.js +18 -18
- package/dist/hooks/useMoney.js +18 -18
- package/dist/hooks/useProduct.js +2 -2
- package/dist/hooks/useStore.js +18 -18
- package/dist/hooks/useUser.js +4 -4
- package/dist/hooks/useWishlist.js +2 -2
- package/dist/index.js +18 -18
- package/dist/native-app/index.js +2 -2
- package/dist/{navigation-ZTRVRY6C.js → navigation-JHGESS7X.js} +7 -7
- package/dist/{navigation-ZTRVRY6C.js.map → navigation-JHGESS7X.js.map} +1 -1
- package/dist/{navigation-PALPE7RN.js → navigation-QLPZ2GEV.js} +6 -6
- package/dist/{navigation-PALPE7RN.js.map → navigation-QLPZ2GEV.js.map} +1 -1
- package/dist/{not-found-UD7MDFAE.js → not-found-IETXWT4W.js} +21 -21
- package/dist/{not-found-UD7MDFAE.js.map → not-found-IETXWT4W.js.map} +1 -1
- package/dist/providers/index.js +18 -18
- package/dist/providers/twilight-init.d.ts.map +1 -1
- package/dist/routes/account/orders.js +6 -6
- package/dist/routes/account.js +15 -15
- package/dist/routes/blog.js +10 -10
- package/dist/routes/brands.js +6 -6
- package/dist/routes/cart.js +26 -26
- package/dist/routes/home.js +23 -23
- package/dist/routes/index.js +5 -5
- package/dist/routes/loyalty.js +7 -7
- package/dist/routes/page.js +6 -6
- package/dist/routes/product-listing.js +24 -24
- package/dist/routes/product.js +22 -22
- package/dist/routes/seo-redirects.js +5 -5
- package/dist/routes/testimonials.js +2 -2
- package/dist/routes/thank-you.js +6 -6
- package/dist/skeleton.js +23 -23
- package/dist/{store-lookup-6QB4WMID.js → store-lookup-TGNDK2KQ.js} +10 -10
- package/dist/{store-lookup-6QB4WMID.js.map → store-lookup-TGNDK2KQ.js.map} +1 -1
- package/dist/tanstack.js +13 -13
- package/dist/utils/index.js +3 -3
- package/dist/utils/sdk-helpers.d.ts +12 -1
- package/dist/utils/sdk-helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3GDJMMMS.js.map +0 -1
- package/dist/chunk-6D3OWIEC.js.map +0 -1
- package/dist/chunk-GPWNE2C6.js +0 -14
- package/dist/chunk-LQ4X4YQM.js.map +0 -1
- package/dist/chunk-M46EKE7R.js.map +0 -1
package/dist/api/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { STORE_IDENTIFIER_HEADER, api, cdn, filesCdn, getActiveCurrency, getActiveScope, getActiveScopeId, getAuthToken } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { STORE_IDENTIFIER_HEADER, api, cdn, filesCdn, getActiveCurrency, getActiveScope, getActiveScopeId, getAuthToken } from '../chunk-PFAPRJVF.js';
|
|
2
|
+
import '../chunk-GYXUYHKO.js';
|
|
3
3
|
import '../chunk-FHU2MXZA.js';
|
|
4
4
|
import '../chunk-7VNVCHID.js';
|
|
5
5
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/home.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { home } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { home } from '../chunk-5CKTQAFX.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/loyalty.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { loyalty } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { loyalty } from '../chunk-KPTVSC46.js';
|
|
2
|
+
import '../chunk-L5BP6ARL.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-PFAPRJVF.js';
|
|
5
|
+
import '../chunk-2TLIULJZ.js';
|
|
6
|
+
import '../chunk-GYXUYHKO.js';
|
|
7
7
|
import '../chunk-FHU2MXZA.js';
|
|
8
8
|
import '../chunk-7VNVCHID.js';
|
|
9
9
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { menu } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { menu } from '../chunk-VSK2WS4G.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/notification.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { notification } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { notification } from '../chunk-W6NQM4FQ.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/order.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { order } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { order } from '../chunk-MTDXG2GS.js';
|
|
2
|
+
import '../chunk-L5BP6ARL.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-PFAPRJVF.js';
|
|
5
|
+
import '../chunk-2TLIULJZ.js';
|
|
6
|
+
import '../chunk-GYXUYHKO.js';
|
|
7
7
|
import '../chunk-FHU2MXZA.js';
|
|
8
8
|
import '../chunk-7VNVCHID.js';
|
|
9
9
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/page.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { page } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { page } from '../chunk-MJ6J3HUJ.js';
|
|
2
|
+
import '../chunk-L5BP6ARL.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-PFAPRJVF.js';
|
|
5
|
+
import '../chunk-2TLIULJZ.js';
|
|
6
|
+
import '../chunk-GYXUYHKO.js';
|
|
7
7
|
import '../chunk-FHU2MXZA.js';
|
|
8
8
|
import '../chunk-7VNVCHID.js';
|
|
9
9
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/product.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { getProductPreview, isProductPreviewQuery, parseNextPageToken, product, productDetailQueryKey, productPreviewQueryKey, rememberProductPreview, shouldDehydrateQuery } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { getProductPreview, isProductPreviewQuery, parseNextPageToken, product, productDetailQueryKey, productPreviewQueryKey, rememberProductPreview, shouldDehydrateQuery } from '../chunk-SC2X42RE.js';
|
|
2
|
+
import '../chunk-L5BP6ARL.js';
|
|
3
3
|
import '../chunk-OUW6WESU.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-PFAPRJVF.js';
|
|
5
|
+
import '../chunk-2TLIULJZ.js';
|
|
6
|
+
import '../chunk-GYXUYHKO.js';
|
|
7
7
|
import '../chunk-FHU2MXZA.js';
|
|
8
8
|
import '../chunk-7VNVCHID.js';
|
|
9
9
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/profile.js
CHANGED
package/dist/api/store.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { store } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { store } from '../chunk-LPCNDH4F.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
export { resolveStoreIdentifier } from '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/translations.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { commonTranslationsPath, storeTranslationsPath, translations } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { commonTranslationsPath, storeTranslationsPath, translations } from '../chunk-E552K72T.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { user } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { user } from '../chunk-RVPC4AYT.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/wallet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { wallet } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { wallet } from '../chunk-NEHOBD4K.js';
|
|
2
|
+
import '../chunk-PFAPRJVF.js';
|
|
3
|
+
import '../chunk-GYXUYHKO.js';
|
|
4
4
|
import '../chunk-FHU2MXZA.js';
|
|
5
5
|
import '../chunk-7VNVCHID.js';
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
package/dist/api/wishlist.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { wishlist } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { wishlist } from '../chunk-XKP5LIEJ.js';
|
|
2
|
+
import '../chunk-SC2X42RE.js';
|
|
3
|
+
import '../chunk-L5BP6ARL.js';
|
|
4
4
|
import '../chunk-OUW6WESU.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-PFAPRJVF.js';
|
|
6
|
+
import '../chunk-2TLIULJZ.js';
|
|
7
|
+
import '../chunk-GYXUYHKO.js';
|
|
8
8
|
import '../chunk-FHU2MXZA.js';
|
|
9
9
|
import '../chunk-7VNVCHID.js';
|
|
10
10
|
import '../chunk-T72DAX7R.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSallaSDK, whenSallaReady } from './chunk-
|
|
1
|
+
import { getSallaSDK, whenSallaReady } from './chunk-GYXUYHKO.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function isNativeApp() {
|
|
@@ -54,5 +54,5 @@ function useNativeStatusBarColor() {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export { hapticImpact, isNativeApp, nativeAppVersion, openNativeBrowser, openNativeSheet, useIsNativeApp, useNativeAppVersion, useNativeStatusBarColor };
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-2TLIULJZ.js.map
|
|
58
|
+
//# sourceMappingURL=chunk-2TLIULJZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/native-app/index.ts"],"names":[],"mappings":";;;AAQO,SAAS,WAAA,GAAuB;AACrC,EAAA,OAAO,OAAA,CAAQ,WAAA,EAAY,EAAG,MAAA,EAAQ,aAAa,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,KAAA,GAAQ,QAAA,CAAS,gBAAA,CAAiB,OAAO,EAAE,eAAe,CAAA;AAChE,IAAA,IAAI,KAAA,eAAmB,EAAG,KAAA,CAAM,SAAS,yBAAA,EAA2B,EAAE,OAAO,CAAA;AAAA,EAC/E,CAAA,EAAG,CAAC,KAAA,EAAO,OAAO,CAAC,CAAA;AAEnB,EAAA,OAAO,UAAA;AACT","file":"chunk-2TLIULJZ.js","sourcesContent":["import { useEffect, useState, type RefCallback } from 'react';\nimport { getSallaSDK, whenSallaReady } from '../utils/sdk-helpers';\n\n/**\n * True inside the Salla native app's webview, read at call time: the SDK's\n * `salla.mobile.isEnabled()`. False on the server and until the SDK has loaded, so call it\n * from an event handler or an effect, and use {@link useIsNativeApp} to decide what to render.\n */\nexport function isNativeApp(): boolean {\n return Boolean(getSallaSDK()?.mobile?.isEnabled?.());\n}\n\n/**\n * {@link isNativeApp} as state, for a render decision. False on the server and on the first\n * client render, then true once the SDK is ready inside the app: an app that identifies\n * itself through its config has not said so before `init`.\n */\nexport function useIsNativeApp(): boolean {\n const [inApp, setInApp] = useState(false);\n\n useEffect(() => whenSallaReady(() => setInApp(isNativeApp())), []);\n\n return inApp;\n}\n\n/**\n * The native app's release (`5.4.19`), the `s-app-version` it loaded the page with, or null\n * outside the app. The SDK keeps it in its analytics context, where it also learns that this\n * is the app. Read at call time like {@link isNativeApp}; render with {@link useNativeAppVersion}.\n */\nexport function nativeAppVersion(): string | null {\n if (!isNativeApp()) return null;\n const analytics = (getSallaSDK() as { analytics?: SdkAnalytics } | undefined)?.analytics;\n return analytics?.jitsuAnalytics?.getContextProperty?.('app')?.app_release_tag || null;\n}\n\ntype SdkAnalytics = {\n jitsuAnalytics?: {\n getContextProperty?: (key: 'app') => { app_release_tag?: string } | undefined;\n };\n};\n\n/** {@link nativeAppVersion} as state: null on the server and until the SDK is ready in the app. */\nexport function useNativeAppVersion(): string | null {\n const [version, setVersion] = useState<string | null>(null);\n\n useEffect(() => whenSallaReady(() => setVersion(nativeAppVersion())), []);\n\n return version;\n}\n\n/** The native app's own pickers that replace the store's web modals. */\nexport type NativeSheet = 'language' | 'currency';\n\n/**\n * Inside the Salla app, opens the app's own language or currency sheet\n * (`mobile::language.open` / `mobile::currency.open`) and returns `true`; the app\n * applies the choice and reloads. Outside the app it does nothing and returns\n * `false`, so a caller opens the web modal instead:\n *\n * ```ts\n * if (!openNativeSheet('currency')) salla.event.dispatch('localization::open');\n * ```\n */\nexport function openNativeSheet(sheet: NativeSheet): boolean {\n if (!isNativeApp()) return false;\n const sdk = getSallaSDK();\n const open = sheet === 'language' ? sdk?.mobile?.openLanguages : sdk?.mobile?.openCurrencies;\n if (typeof open === 'function') open.call(sdk?.mobile);\n // An SDK without the methods still forwards an emitted `mobile::*` event to the app.\n else sdk?.event.dispatch(`mobile::${sheet}.open`, {});\n return true;\n}\n\n/**\n * Inside the Salla app, hands `url` to the app to open in the device's browser\n * (`mobile::browser.open`) and returns `true`; a page off the store would\n * otherwise load inside the app with no way back. Outside the app it does nothing\n * and returns `false`. The engine's link interceptor calls it for every tap on a\n * link that leaves the store.\n */\nexport function openNativeBrowser(url: string): boolean {\n if (!isNativeApp()) return false;\n const sdk = getSallaSDK();\n if (typeof sdk?.mobile?.openBrowser === 'function') sdk.mobile.openBrowser(url);\n else sdk?.event.dispatch('mobile::browser.open', { url });\n return true;\n}\n\nexport type HapticImpact = 'light' | 'medium' | 'heavy';\n\n/** Asks the native app for a tap vibration. The SDK ignores it outside the app. */\nexport function hapticImpact(impact: HapticImpact): void {\n getSallaSDK()?.mobile?.action?.('haptic.impact', { impact_type: impact });\n}\n\n/**\n * `rgb(232, 245, 255)`, what `getComputedStyle` returns, as `#e8f5ff`. A partial alpha is\n * dropped. A fully transparent colour is no colour at all: an element with no background\n * of its own computes to `rgba(0, 0, 0, 0)`, which would otherwise read as black.\n */\nfunction rgbToHex(rgb: string): string | null {\n const match = rgb.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*([\\d.]+))?\\)/);\n if (!match || Number(match[4]) === 0) return null;\n return `#${match\n .slice(1, 4)\n .map((channel) => Number(channel).toString(16).padStart(2, '0'))\n .join('')}`;\n}\n\n/**\n * Tells the native app to paint its status bar with the rendered background of the element\n * the returned ref is attached to. The colour is read from the DOM, because a theme's tint\n * is often a relative CSS colour (`hsl(from …)`) with no hex to pass. Does nothing outside\n * the app, and for an element with no background of its own.\n *\n * The ref is a callback, kept in state, so an element that mounts after the app has been\n * recognised still reports its colour.\n */\nexport function useNativeStatusBarColor<T extends HTMLElement>(): RefCallback<T> {\n const [element, setElement] = useState<T | null>(null);\n const inApp = useIsNativeApp();\n\n useEffect(() => {\n if (!inApp || !element) return;\n const color = rgbToHex(getComputedStyle(element).backgroundColor);\n if (color) getSallaSDK()?.event.dispatch('mobile::statusbar.color', { color });\n }, [inApp, element]);\n\n return setElement;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useOpeningHours } from './chunk-
|
|
2
|
-
import { useIsProduct } from './chunk-
|
|
1
|
+
import { useOpeningHours } from './chunk-ZAPRXUPS.js';
|
|
2
|
+
import { useIsProduct } from './chunk-L5BP6ARL.js';
|
|
3
3
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
4
4
|
import { useTwilight } from './chunk-DF6FBKDN.js';
|
|
5
5
|
import { useState } from 'react';
|
|
@@ -54,5 +54,5 @@ function StoreClosedNotification(_props) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export { StoreClosedNotification };
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-45YF2KXD.js.map
|
|
58
|
+
//# sourceMappingURL=chunk-45YF2KXD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/store/StoreClosedNotification.tsx"],"names":[],"mappings":";;;;;;;AAsBO,SAAS,wBAAwB,MAAA,EAAsC;AAC5E,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;AAAA,MACV,EAAA,EAAG,2BAAA;AAAA,MACH,aAAA,EAAY,2BAAA;AAAA,MACZ,KAAA,EAAO;AAAA,QACL,eAAA,EAAiB,SAAA;AAAA,QACjB,KAAA,EAAO,MAAA;AAAA,QACP,OAAA,EAAS,WAAA;AAAA,QACT,OAAA,EAAS,MAAA;AAAA,QACT,UAAA,EAAY,QAAA;AAAA,QACZ,cAAA,EAAgB,QAAA;AAAA,QAChB,QAAA,EAAU;AAAA,OACZ;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,GAAA;AAAA,YACL,EAAA,EAAG,cAAA;AAAA,YACH,OAAA,EAAS,WAAA;AAAA,YACT,KAAA,EAAO,EAAE,QAAA,EAAU,UAAA,EAAY,MAAM,EAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,cAAA,EAAgB,MAAA,EAAO;AAAA,YAE/E,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,cAAA,EAAe;AAAA;AAAA,SAC9B;AAAA,wBACA,GAAA,CAAC,GAAA,EAAA,EAAE,KAAA,EAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,SAAA,EAAW,QAAA,EAAU,IAAA,EAAM,CAAA,EAAE,EACjD,QAAA,EAAA,CAAA,CAAE,2BAAA,EAA6B;AAAA,UAC9B,YAAA,EAAc,qPAAkD,iBAAiB,CAAA,CAAA,CAAA;AAAA,UACjF,QAAA,EAAU;AAAA,SACX,CAAA,EACH;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-45YF2KXD.js","sourcesContent":["import { useState } from 'react';\nimport { useIsProduct } from '../../providers/NavigationProvider';\nimport { useTwilight } from '../../providers/TwilightProvider';\nimport { useOpeningHours } from '../../hooks/useOpeningHours';\nimport { useTranslation } from '../../providers/I18nProvider';\n\nexport interface StoreClosedNotificationProps {\n /** Whether to show the notification (defaults to true when store is closed on product page) */\n show?: boolean;\n}\n\n/**\n * StoreClosedNotification - Shows a notification bar when the store is closed.\n *\n * Mirrors PHP ReceivingOrdersTimesWidget:\n * - Only shows on product pages\n * - Only shows when store is closed for receiving orders\n * - Displays when the store will open next\n * - Has a close button to dismiss\n *\n * Injected via hook registry at body:start.\n */\nexport function StoreClosedNotification(_props: StoreClosedNotificationProps) {\n const { store } = useTwilight();\n const { t } = useTranslation();\n const { isOpen, isEnabled, nextOpenFormatted } = useOpeningHours(store.settings?.opening_hours);\n const [dismissed, setDismissed] = useState(false);\n\n // Check if we're on a product page\n const isProductPage = useIsProduct();\n\n // Conditions: product page, opening hours enabled, store closed, not dismissed\n if (!isProductPage || !isEnabled || isOpen || dismissed || !nextOpenFormatted) {\n return null;\n }\n\n const handleClose = (e: React.MouseEvent) => {\n e.preventDefault();\n setDismissed(true);\n };\n\n return (\n <div\n className=\"store-notify\"\n id=\"store-closed-notification\"\n data-testid=\"store-closed-notification\"\n style={{\n backgroundColor: '#d63031',\n color: '#fff',\n padding: '10px 15px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n }}\n >\n <a\n href=\"#\"\n id=\"notify-close\"\n onClick={handleClose}\n style={{ position: 'absolute', left: 15, color: '#fff', textDecoration: 'none' }}\n >\n <i className=\"sicon-cancel\" />\n </a>\n <p style={{ margin: 0, textAlign: 'center', flex: 1 }}>\n {t('store.closed_notification', {\n defaultValue: `المتجر حاليا مغلق لاستقبال الطلبات وسيتم فتحه (${nextOpenFormatted})`,\n nextOpen: nextOpenFormatted,\n })}\n </p>\n </div>\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getActiveScope, api } from './chunk-
|
|
1
|
+
import { getActiveScope, api } from './chunk-PFAPRJVF.js';
|
|
2
2
|
import { queryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
4
|
async function list(params) {
|
|
@@ -45,5 +45,5 @@ var home = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export { home };
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-5CKTQAFX.js.map
|
|
49
|
+
//# sourceMappingURL=chunk-5CKTQAFX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/home.ts"],"names":[],"mappings":";;;AAQA,eAAe,KAAK,MAAA,EAA+D;AACjF,EAAA,MAAM,KAAA,GAAQ,SAAS,CAAA,CAAA,EAAI,IAAI,gBAAgB,MAAM,CAAA,CAAE,QAAA,EAAU,CAAA,CAAA,GAAK,EAAA;AACtE,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,GAAA,CAAI,IAAI,CAAA,cAAA,EAAiB,KAAK,CAAA,CAAE,CAAA,CAAE,IAAA,EAAoC;AAC7F,EAAA,OAAO,QAAQ,EAAC;AAClB;AAGA,SAAS,OAAA,CAAQ,QAA6B,QAAA,EAAoD;AAChG,EAAA,IAAI,CAAC,QAAA,CAAS,MAAA,EAAQ,OAAO,MAAA;AAC7B,EAAA,MAAM,KAAA,GAAQ,IAAI,GAAA,CAAI,QAAA,CAAS,IAAI,CAAC,KAAA,KAAU,KAAA,CAAM,IAAI,CAAC,CAAA;AACzD,EAAA,MAAM,IAAA,GAAO,SAAS,GAAA,CAAI,CAAC,UAAU,IAAA,CAAK,SAAA,CAAU,KAAK,CAAC,CAAA;AAC1D,EAAA,OAAO,MAAA,CAAO,MAAA,CAAO,CAAC,KAAA,KAAU;AAC9B,IAAA,IAAI,CAAC,KAAA,CAAM,GAAA,CAAI,KAAA,CAAM,IAAI,GAAG,OAAO,IAAA;AACnC,IAAA,MAAM,QAAQ,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,SAAA,CAAU,KAAK,CAAC,CAAA;AAChD,IAAA,IAAI,KAAA,KAAU,IAAI,OAAO,IAAA;AACzB,IAAA,IAAA,CAAK,MAAA,CAAO,OAAO,CAAC,CAAA;AACp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vC;AAAA;AAEP","file":"chunk-5CKTQAFX.js","sourcesContent":["import { queryOptions } from '@tanstack/react-query';\nimport { api, getActiveScope } from './client';\nimport type { HomeComponentData } from '../types';\n\n/** The page a hook's blocks render on; blocks can target specific products, categories or pages. */\nexport type BlockScope =\n { product_id: number | string } | { category_id: number | string } | { page_id: number | string };\n\nasync function list(params?: Record<string, string>): Promise<HomeComponentData[]> {\n const query = params ? `?${new URLSearchParams(params).toString()}` : '';\n const { data } = await api.get(`component/list${query}`).json<{ data: HomeComponentData[] }>();\n return data ?? [];\n}\n\n/** `blocks` minus each of `excluded`, matched by content: the API sends no id or order to match on. */\nfunction without(blocks: HomeComponentData[], excluded: HomeComponentData[]): HomeComponentData[] {\n if (!excluded.length) return blocks;\n const paths = new Set(excluded.map((block) => block.path));\n const left = excluded.map((block) => JSON.stringify(block));\n return blocks.filter((block) => {\n if (!paths.has(block.path)) return true;\n const index = left.indexOf(JSON.stringify(block));\n if (index === -1) return true;\n left.splice(index, 1);\n return false;\n });\n}\n\nexport const home = {\n components: async (): Promise<HomeComponentData[]> => {\n // The unfiltered list also has the product, category and page blocks, which the home leaves out.\n const [blocks, pageBlocks] = await Promise.all([list(), list({ show_in: 'pages' })]);\n return without(blocks, pageBlocks);\n },\n\n /** The blocks the merchant placed at `hook` on a product, category or page. */\n blocks: async (hook: string, scope: BlockScope): Promise<HomeComponentData[]> => {\n const scopeParams = Object.fromEntries(\n Object.entries(scope).map(([key, id]) => [key, String(id)])\n );\n const blocks = await list({ hooks: hook, ...scopeParams });\n return blocks.map((block) => ({ ...block, path: block.path.replace('home.', '') }));\n },\n\n queries: {\n components: () =>\n queryOptions({\n // Each market (scope) has its own theme version, and its own home page with it.\n queryKey: ['home', 'components', { scope: getActiveScope() }],\n queryFn: () => home.components(),\n }),\n\n blocks: (hook: string, scope: BlockScope) =>\n queryOptions({\n queryKey: ['home', 'blocks', hook, scope],\n queryFn: () => home.blocks(hook, scope),\n }),\n },\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onSallaEvent } from './chunk-
|
|
1
|
+
import { onSallaEvent } from './chunk-GYXUYHKO.js';
|
|
2
2
|
import { useState, useCallback, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function useComments() {
|
|
@@ -16,5 +16,5 @@ function useComments() {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { useComments };
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-BK5TBUGG.js.map
|
|
20
|
+
//# sourceMappingURL=chunk-BK5TBUGG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useComments.ts"],"names":[],"mappings":";;;AAuCO,SAAS,WAAA,GAAiC;AAC/C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,CAAC,CAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,YAAY,MAAM;AAChC,IAAA,cAAA,CAAe,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA;AAAA,EACnC,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,qBAAqB,MAAM;AAC/B,MAAA,cAAA,CAAe,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA;AAAA,IACnC,CAAA;AAEA,IAAA,OAAO,YAAA,CAAa,kBAAkB,kBAAkB,CAAA;AAAA,EAC1D,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,EAAE,aAAa,OAAA,EAAQ;AAChC","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useComments.ts"],"names":[],"mappings":";;;AAuCO,SAAS,WAAA,GAAiC;AAC/C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAS,CAAC,CAAA;AAEhD,EAAA,MAAM,OAAA,GAAU,YAAY,MAAM;AAChC,IAAA,cAAA,CAAe,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA;AAAA,EACnC,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,qBAAqB,MAAM;AAC/B,MAAA,cAAA,CAAe,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA;AAAA,IACnC,CAAA;AAEA,IAAA,OAAO,YAAA,CAAa,kBAAkB,kBAAkB,CAAA;AAAA,EAC1D,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,EAAE,aAAa,OAAA,EAAQ;AAChC","file":"chunk-BK5TBUGG.js","sourcesContent":["import { useState, useEffect, useCallback } from 'react';\nimport { onSallaEvent } from '../utils/sdk-helpers';\n\n/**\n * UseCommentsResult - Return type for useComments hook\n *\n * @property commentsKey - Key to pass to salla-comments component for re-render\n * @property refresh - Function to manually trigger a comments refresh\n */\nexport interface UseCommentsResult {\n commentsKey: number;\n refresh: () => void;\n}\n\n/**\n * useComments - Hook for managing salla-comments web component re-renders\n *\n * Listens to the Salla SDK's comment added events and automatically\n * increments a re-render key for the salla-comments component. This\n * eliminates the need for full page reloads when comments are added.\n *\n * @returns Object with comments key for component re-rendering and manual refresh function\n *\n * @example\n * ```tsx\n * function ProductPage({ product }) {\n * const { commentsKey } = useComments();\n *\n * return (\n * <salla-comments\n * key={commentsKey}\n * item-id={product.id}\n * type=\"product\"\n * />\n * );\n * }\n * ```\n */\n\nexport function useComments(): UseCommentsResult {\n const [commentsKey, setCommentsKey] = useState(0);\n\n const refresh = useCallback(() => {\n setCommentsKey((prev) => prev + 1);\n }, []);\n\n useEffect(() => {\n const handleCommentAdded = () => {\n setCommentsKey((prev) => prev + 1);\n };\n\n return onSallaEvent('comment::added', handleCommentAdded);\n }, []);\n\n return { commentsKey, refresh };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDate } from './chunk-
|
|
1
|
+
import { useDate } from './chunk-ZAPRXUPS.js';
|
|
2
2
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
3
|
-
import { Image } from './chunk-
|
|
3
|
+
import { Image } from './chunk-O4UUZ254.js';
|
|
4
4
|
import { Link } from './chunk-AXW67SY7.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -61,5 +61,5 @@ function BlogListLayout({
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export { BlogArticleCard, BlogListLayout };
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-CF2XUAAK.js.map
|
|
65
|
+
//# sourceMappingURL=chunk-CF2XUAAK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/blog/components.tsx"],"names":[],"mappings":";;;;;;AAMO,SAAS,qBAAA,CAAsB,EAAE,UAAA,EAAW,EAAmC;AACpF,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAE7B,EAAA,IAAI,CAAC,UAAA,CAAW,MAAA,EAAQ,OAAO,IAAA;AAE/B,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,YAAA,EAAW,SAAA,EAAU,WAAU,sDAAA,EAClC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,gBAAA,EAAkB,QAAA,EAAA,CAAA,CAAE,kCAAkC,CAAA,EAAE,CAAA;AAAA,oBACtE,GAAA,CAAC,IAAA,EAAA,EACE,QAAA,EAAA,UAAA,CAAW,GAAA,CAAI,CAAC,QAAA,qBACf,GAAA,CAAC,IAAA,EAAA,EAAqB,SAAA,EAAW,QAAA,CAAS,UAAA,GAAa,cAAA,GAAiB,EAAA,EACtE,8BAAC,IAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAwC,EAAA,EAAI,QAAA,CAAS,GAAA,EAClE,QAAA,EAAA,QAA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KAAA,EAAA,EAAI,SAAA,EAAU,4BAAA,EAA8B,QAAA,EAAS;AAAA,GAAA,EACxD,CAAA;AAEJ","file":"chunk-CF2XUAAK.js","sourcesContent":["import type { ReactNode } from 'react';\nimport { useTranslation } from '../../providers/I18nProvider';\nimport { useDate } from '../../hooks';\nimport { Image, Link } from '../../components/common';\nimport type { BlogCategory, ArticleSummary } from './types';\n\nexport function BlogCategoriesSidebar({ categories }: { categories: BlogCategory[] }) {\n const { t } = useTranslation();\n\n if (!categories.length) return null;\n\n return (\n <nav aria-label=\"Sidebar\" className=\"hidden lg:block lg:sticky shrink-0 top-24 col-span-2\">\n <h2 className=\"font-bold mb-3\">{t('pages.blog_categories.categories')}</h2>\n <ul>\n {categories.map((category) => (\n <li key={category.id} className={category.is_current ? 'text-primary' : ''}>\n <Link className=\"py-3 block text-sm hover:text-primary\" to={category.url}>\n {category.name}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\nexport function BlogArticleCard({\n article,\n showAuthor = false,\n}: {\n article: ArticleSummary;\n showAuthor?: boolean;\n}) {\n const { format: formatDate } = useDate();\n\n return (\n <div className=\"list-block post-entry relative h-full transition-shadow duration-500 bg-white hover:shadow-default rounded-lg justify-around overflow-hidden flex flex-col\">\n <Link\n to={article.url}\n className=\"post-entry__image relative overflow-hidden hover:opacity-90 w-full h-56 bg-border-color flex items-center justify-center\"\n >\n {article.image && (\n <Image\n className=\"h-full w-full object-cover\"\n src={article.image}\n alt={article.name}\n aspectRatio=\"16/9\"\n />\n )}\n </Link>\n <div className=\"flex-1 px-5 pt-5 pb-7\">\n <div className=\"mb-2.5 text-gray-500 rounded-md inline-flex text-sm rtl:space-x-reverse space-x-5\">\n <div className=\"flex items-center\">\n <i className=\"sicon-calendar-date rtl:ml-1 ltr:mr-1\"></i>\n <span>{formatDate(article.created_at)}</span>\n </div>\n {showAuthor && article.author && (\n <Link to={article.author.url} className=\"flex items-center hover:text-dark\">\n <i className=\"sicon-user rtl:ml-1 ltr:mr-1\"></i>\n <span>{article.author.name}</span>\n </Link>\n )}\n </div>\n <h3 className=\"post-entry__title text-sm font-bold text-gray-800 leading-6 mb-2.5\">\n <Link to={article.url}>{article.name}</Link>\n </h3>\n <p className=\"text-sm text-gray-500 leading-6 mb-2.5\">{article.description}</p>\n </div>\n </div>\n );\n}\n\nexport function BlogListLayout({\n categories,\n children,\n}: {\n categories: BlogCategory[];\n children: ReactNode;\n}) {\n return (\n <div className=\"grid grid-cols-1 lg:grid-cols-8 gap-8\">\n <BlogCategoriesSidebar categories={categories} />\n <div className=\"main-content lg:col-span-6\">{children}</div>\n </div>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HomeComponentRenderer, ReorderProducts } from './chunk-
|
|
2
|
-
import { home } from './chunk-
|
|
3
|
-
import { useDevHomeBlocks } from './chunk-
|
|
1
|
+
import { HomeComponentRenderer, ReorderProducts } from './chunk-MMKLT4YU.js';
|
|
2
|
+
import { home } from './chunk-5CKTQAFX.js';
|
|
3
|
+
import { useDevHomeBlocks } from './chunk-FYJPK6XU.js';
|
|
4
4
|
import { storePageUrl, buildHreflangAlternates } from './chunk-OM2GRPDH.js';
|
|
5
5
|
import { RouteId } from './chunk-OUW6WESU.js';
|
|
6
6
|
import { HookSlot } from './chunk-5XDPAKF5.js';
|
|
@@ -87,5 +87,5 @@ function head(ctx) {
|
|
|
87
87
|
var Home = { id: RouteId.INDEX, loader, head, Component: HomePage };
|
|
88
88
|
|
|
89
89
|
export { Home, HomeSkeleton, homeLoader };
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-DVOPY7MI.js.map
|
|
91
|
+
//# sourceMappingURL=chunk-DVOPY7MI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/routes/home/loader.ts","../src/routes/home/HomePage.tsx","../src/routes/home/index.tsx"],"names":["HomeSkeleton","HomePage"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,IAAI,QAAA,EAAU,KAAA;AAC5B,EAAA,IAAI,CAAC,KAAA,EAAO,OAAO,EAAC;AAEpB,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,IAAA,EAAM,KAAA,IAAS,KAAA,CAAM,IAAA;AACzC,EAAA,MAAM,WAAA,GAAc,KAAA,CAAM,IAAA,EAAM,WAAA,IAAe,KAAA,CAAM,WAAA;AACrD,EAAA,MAAM,QAAA,GAAW,MAAM,IAAA,EAAM,QAAA;AAE7B,EAAA,MAAM,GAAA,GAAM,aAAa,GAAA,CAAI,QAAA,EAAU,IAAI,QAAA,CAAS,QAAQ,KAAK,KAAA,CAAM,GAAA;AAEvE,EAAA,OAAO;AAAA,IACL,KAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA,EAAW,GAAA;AAAA,IACX,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM,IAAA;AAAA,MACd;AAAA,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,qBAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM;AAAA,KAChB;AAAA,IACA,oBAAoB,uBAAA,CAAwB,GAAA,CAAI,QAAA,EAAU,GAAA,CAAI,SAAS,QAAQ;AAAA,GACjF;AACF;AAEO,IAAM,IAAA,GAAO,EAAE,EAAA,EAAI,OAAA,CAAQ,OAAO,MAAA,EAAQ,IAAA,EAAM,WAAW,QAAA","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/routes/home/loader.ts","../src/routes/home/HomePage.tsx","../src/routes/home/index.tsx"],"names":["HomeSkeleton","HomePage"],"mappings":";;;;;;;;;;;;AAWA,eAAsB,WAAW,GAAA,EAAoD;AACnF,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,kBAAA,EAAmB;AAC3C,EAAA,MAAM,aAAa,MAA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AAS,KAAA,CAAM,IAAA;AACzC,EAAA,MAAM,WAAA,GAAc,KAAA,CAAM,IAAA,EAAM,WAAA,IAAe,KAAA,CAAM,WAAA;AACrD,EAAA,MAAM,QAAA,GAAW,MAAM,IAAA,EAAM,QAAA;AAE7B,EAAA,MAAM,GAAA,GAAM,aAAa,GAAA,CAAI,QAAA,EAAU,IAAI,QAAA,CAAS,QAAQ,KAAK,KAAA,CAAM,GAAA;AAEvE,EAAA,OAAO;AAAA,IACL,KAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA,EAAW,GAAA;AAAA,IACX,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM,IAAA;AAAA,MACd;AAAA,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,qBAAA;AAAA,MACN,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAQ,KAAA,CAAM;AAAA,KAChB;AAAA,IACA,oBAAoB,uBAAA,CAAwB,GAAA,CAAI,QAAA,EAAU,GAAA,CAAI,SAAS,QAAQ;AAAA,GACjF;AACF;AAEO,IAAM,IAAA,GAAO,EAAE,EAAA,EAAI,OAAA,CAAQ,OAAO,MAAA,EAAQ,IAAA,EAAM,WAAW,QAAA","file":"chunk-DVOPY7MI.js","sourcesContent":["import { getTwilightContext } from '../../twilight/context';\nimport { home } from '../../api/home';\nimport type { HomeComponentData } from '../../types';\nimport { RouteId } from '../../router/route-ids';\n\nexport interface HomeLoaderData {\n locale: string;\n components: HomeComponentData[];\n page: { slug: string };\n}\n\nexport async function homeLoader(ctx?: { locale?: string }): Promise<HomeLoaderData> {\n const { queryClient } = getTwilightContext();\n const components = await queryClient.ensureQueryData(home.queries.components());\n const result = {\n locale: ctx?.locale || 'ar',\n components: components.map((comp) => ({\n ...comp,\n path: comp.path?.replace('home.', '') || comp.path,\n })),\n page: { slug: RouteId.INDEX },\n };\n return result;\n}\n","import { memo } from 'react';\nimport { useDevHomeBlocks } from '../../dev/dev-settings-store';\nimport { HookSlot } from '../../hooks';\nimport { HomeComponentRenderer, ReorderProducts } from '../../components/home';\nimport type { HomePageProps } from './types';\nimport { Pulse } from '@salla.sa/twilight-components-react';\n\nexport const HomeSkeleton = memo(function HomeSkeleton() {\n return (\n <>\n <div className=\"s-block container skeleton-block-hero\">\n <Pulse className=\"h-64 sm:h-80 rounded-md\" />\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n <div className=\"s-block container skeleton-block-products\">\n <Pulse className=\"h-10 w-48 mb-4\" />\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-4\">\n {[1, 2, 3, 4].map((i) => (\n <Pulse key={i} className=\"h-56\" />\n ))}\n </div>\n </div>\n </>\n );\n});\n\nexport const HomePage = memo(function HomePage({ components = [] }: HomePageProps) {\n // Dev-mode only: the dev editor's layout replaces the store's blocks while it\n // is on. No-op passthrough in production builds.\n const renderedComponents = useDevHomeBlocks(components);\n return (\n <>\n <HookSlot name=\"home:start\" />\n <HookSlot name=\"home:content\" />\n {renderedComponents.map((data, index) => (\n // `data.key` is the twilight.json catalog id, shared by every placement\n // of that block. Platform blocks send null. Position is unique; a dev\n // layout block keeps its own id so a reorder doesn't remount the rest.\n <HomeComponentRenderer key={data.__dev_id ?? index} data={data} index={index} />\n ))}\n <HookSlot name=\"home:end\" />\n <ReorderProducts />\n </>\n );\n});\n\nexport { HomePage as default };\n","import type { HeadDescriptor } from '../../utils/head';\nimport { buildHreflangAlternates, storePageUrl } from '../../utils/baseHead';\nimport type { HomeLoaderData } from './loader';\nimport { homeLoader } from './loader';\nimport type { TwilightContext } from '../../twilight/context';\nimport { HomePage } from './HomePage';\nimport { RouteId } from '../../router/route-ids';\n\nexport { HomeSkeleton } from './HomePage';\nexport { registerHomeComponents, DefaultHomeComponents } from '../../components/home/register';\nexport { registerHomeComponentConfig } from '../../components/home';\nexport type { HomePageProps } from './types';\nexport type { HomeLoaderData } from './loader';\nexport type {\n HomeComponentsProps,\n AnyHomeComponent,\n HomeComponentConfig,\n} from '../../components/home';\n\nfunction loader(_ctx?: { locale?: string }): Promise<HomeLoaderData> {\n return homeLoader({ locale: _ctx?.locale });\n}\n\nfunction head(ctx: TwilightContext): HeadDescriptor {\n const store = ctx.settings?.store;\n if (!store) return {};\n\n const title = store.meta?.title ?? store.name;\n const description = store.meta?.description ?? store.description;\n const keywords = store.meta?.keywords;\n // `/ar`, like Twig, where store.url reads `/ar/`.\n const url = storePageUrl(ctx.settings, ctx.location.pathname) ?? store.url;\n\n return {\n title,\n description,\n keywords,\n canonical: url,\n openGraph: {\n type: 'website',\n title,\n description,\n images: store.logo,\n url,\n },\n twitter: {\n card: 'summary_large_image',\n title,\n description,\n images: store.logo,\n },\n alternateLanguages: buildHreflangAlternates(ctx.settings, ctx.location.pathname),\n };\n}\n\nexport const Home = { id: RouteId.INDEX, loader, head, Component: HomePage } as const;\n\nexport { homeLoader };\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filesCdn, cdn } from './chunk-
|
|
1
|
+
import { filesCdn, cdn } from './chunk-PFAPRJVF.js';
|
|
2
2
|
import { storeTranslationsQueryKey, translationsQueryKey, composeMessages, isPlainObject } from './chunk-7VNVCHID.js';
|
|
3
3
|
import { queryOptions } from '@tanstack/react-query';
|
|
4
4
|
|
|
@@ -126,5 +126,5 @@ var translations = {
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
export { commonTranslationsPath, storeTranslationsPath, translations };
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-E552K72T.js.map
|
|
130
|
+
//# sourceMappingURL=chun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,QAAA,EAAU,OAAO,OAAA,EAA0B,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQzC,cAAA,CAAe,sBAAsB,OAAA,EAAS,MAAM,GAAG,EAAE,UAAA,EAAY,MAAM;AAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAc7E,KAAA,EAAO,CACL,MAAA,EACA,SAAA,EACA,WAC+B,eAAA,CAAgB,MAAA,EAAQ,SAAA,EAAW,MAAM,CAAA,IAAK,IAAA;AAAA,EAE/E,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBP,QAAA,EAAU,CAAC,MAAA,KACT,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,qBAAqB,MAAM,CAAA;AAAA,MACrC,OAAA,EAAS,MAAM,YAAA,CAAa,GAAA,CAAI,MAAM;AAAA,KACvC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWH,OAAA,EAAS,CAAC,OAAA,EAA0B,MAAA,KAClC,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,yBAAA,CAA0B,OAAA,EAAS,MAAM,CAAA;AAAA,MACnD,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,CAAS,SAAS,MAAM;AAAA,KACrD;AAAA;AAEP","file":"chunk-5G6PD6P2.js","sourcesContent":["/**\n * @fileoverview Where a storefront's words come from.\n *\n * Two files, merged: the platform's copy for this language, and the merchant's\n * own edits for this language and this store. Both are plain JSON objects on\n * the uploader's CDN, one per language.\n *\n * ```\n * https://cdn.files.salla.network/translations/common/<locale>.json the platform's\n * https://cdn.files.salla.network/translations/<storeId>/<locale>.json the merchant's\n * ```\n *\n * **What this replaces, and why.** Until now the engine read a single global\n * file, `cdn.salla.network/js/translations.json`, holding every language keyed\n * `\"<locale>.trans\"`. Nothing publishes that file: it is an object last written\n * on 2026-03-26, carrying only `ar` and `en` where the platform has 39 locales,\n * 405 keys behind `Languages-Module` and 959 English strings textually\n * different from it. So every React storefront has been serving copy from\n * March, and a key added since has never reached one. It also carried no\n * merchant overrides at all — a merchant editing their theme's wording in the\n * Dashboard changed nothing on a React theme.\n *\n * **Merchant overrides are read, and only when there are any.** Getting here\n * took two corrections worth keeping.\n *\n * The first is the address. A merchant's own wording lives at\n * `translations/<storeId>/<locale>.json`, keyed by `store()->getRouteKey()` —\n * the Optimus-encoded numeric id. An early version addressed it with\n * `resolveStoreIdentifier()`, on the claim that the two are the same string.\n * That is true of the `store-identifier` *header*, which accepts a host, a\n * username or an id, and false of the R2 key: on a custom domain the resolver\n * returns `reefperfumes.com` and on a shared host a username like\n * `mtgr-alaatr-2`. Both 404, both then read as \"this store has no overrides\",\n * and the merchant's wording silently never appears — so the feature would have\n * worked under `?storeId=` alone, which is preview and localhost. It is\n * `settings.store.id` now, which is known only after the settings query.\n *\n * The second is when to ask at all. Most stores have never customised a word,\n * and a miss is an uncached round trip (`cf-cache-status: DYNAMIC` on the 404)\n * on the critical path of every SSR render. So the request is made only when\n * `settings.languages[<ISO>].has_custom_translations` says there is something\n * to get — a flag `Languages-Module` writes when a merchant saves a\n * translation. A store without overrides pays nothing, which is what made this\n * shippable at all.\n *\n * ⚠️ The flag is written on save, so a store whose wording predates it reads as\n * `false` until someone edits a translation or the backfill runs. That is a\n * store keeping today's behaviour, not a regression — React themes have never\n * read merchant overrides — but it does mean the feature is only as complete as\n * the backfill.\n *\n * **Rollout is by fallback, not by flag.** `translations/common/` is written by\n * a sync in the theme build service that may not have run yet, and a hard switch\n * would leave every storefront with no platform strings at all. A missing common\n * file therefore falls back to the old global one, which is exactly today's\n * behaviour — so this is safe to ship before the bucket is populated, and stops\n * using the fallback on its own once it is.\n */\nimport { queryOptions } from '@tanstack/react-query';\nimport { cdn, filesCdn } from './client';\nimport { storeTranslationsQueryKey, translationsQueryKey } from './translations-key';\nimport { composeMessages, isPlainObject, type Messages } from './messages';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\n/** The global file this used to be the only reader of. See the file comment. */\nconst LEGACY_GLOBAL_FILE = 'js/translations.json';\n\n/** One language of platform copy, shared by every store. */\nexport function commonTranslationsPath(locale: string): string {\n return `translations/common/${locale}.json`;\n}\n\n/**\n * One language of a single merchant's own wording.\n *\n * `storeId` is `settings.store.id`, which is the value `Languages-Module` names\n * the object with (`store()->getRouteKey()`, the Optimus-encoded numeric id).\n * It is **not** `resolveStoreIdentifier()`: that returns a hostname on a custom\n * domain and a username on a shared host, both of which 404 here and would read\n * as \"this merchant has no overrides\" — silently, on every store but a preview.\n */\nexport function storeTranslationsPath(storeId: string | number, locale: string): string {\n return `translations/${storeId}/${locale}.json`;\n}\n\n/**\n * Reads one language file, or `null` when there is nothing to read.\n *\n * A 404 is the ordinary answer, not a failure: most stores have never had a\n * word customised, so their file does not exist. Distinguishing it from a real\n * error matters only for the log — both end in `null` — but a warning on every\n * page load of every uncustomised store is a warning nobody will read.\n */\nasync function readLocaleFile(\n path: string,\n { failLoudly = false }: { failLoudly?: boolean } = {}\n): Promise<Messages | null> {\n /** A 404 always means \"absent\"; everything else is a failure to read. */\n const unreadable = (reason: string, cause?: unknown): null => {\n if (failLoudly) throw new Error(`[translations] ${path}: ${reason}`, { cause });\n console.warn('[translations]', reason, path, cause ?? '');\n return null;\n };\n\n try {\n const response = await filesCdn.get(path, { throwHttpErrors: false, timeout: 5000 });\n if (response.status === 404) return null;\n\n if (!response.ok) {\n return unreadable(`answered ${response.status}`);\n }\n\n const data: unknown = await response.json();\n if (!isPlainObject(data)) {\n return unreadable('is not a JSON object');\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error && error.message.startsWith('[translations]')) throw error;\n return unreadable('could not be read', error);\n }\n}\n\n/**\n * The pre-CDN global file, sliced to one language.\n *\n * Only reached when `translations/common/<locale>.json` is missing, which is\n * the state of the bucket until the sync has run once.\n */\nasync function readLegacyGlobal(locale: string): Promise<Messages | null> {\n try {\n const data = await cdn.get(LEGACY_GLOBAL_FILE, { timeout: 5000 }).json<TranslationMessages>();\n const forLocale = data?.[`${locale}.trans`];\n return isPlainObject(forLocale) ? forLocale : null;\n } catch {\n console.warn('[translations] the legacy global file could not be read either');\n return null;\n }\n}\n\nexport const translations = {\n /**\n * The platform's copy for `locale`.\n *\n * One file, so one request. See the file comment for why the merchant's own\n * wording is not merged in here yet and what it is waiting on.\n */\n get: async (locale: string): Promise<TranslationMessages | null> => {\n const common = await readLocaleFile(commonTranslationsPath(locale));\n const base = common ?? (await readLegacyGlobal(locale));\n if (!base) return null;\n\n // Still wrapped in the `<locale>.trans` shape the rest of the engine reads.\n // `createI18nInstance` slices by that key and so does the SDK bridge in\n // `I18nProvider`; changing the envelope here would be a second change for\n // no gain, since one language is all any of them ever take out of it.\n return { [`${locale}.trans`]: base as Record<string, string> };\n },\n\n /**\n * This merchant's own wording for `locale`, or `null` if they have none.\n *\n * Only worth calling when `settings.languages[<ISO>].has_custom_translations`\n * says there is something to get. Most stores have never customised a word,\n * and a miss here is an uncached round trip — `cf-cache-status: DYNAMIC` on a\n * 404 — on the critical path of an SSR render. The flag is what makes this\n * free for everyone who does not use it.\n *\n * Returned unwrapped, unlike {@link translations.get}: this is merged into\n * that one's messages rather than handed to i18next on its own.\n */\n forStore: async (storeId: string | number, locale: string): Promise<Messages | null> =>\n // `failLoudly`, unlike the platform file: this is only ever called because\n // the settings said overrides exist, so a 500, a timeout or a body that is\n // not JSON is a failure to read them — not a store that has none. Returning\n // `null` there would cache \"no overrides\" as a success, skip the query's\n // retry, and serve Salla's wording in place of the merchant's until the\n // entry expired. A 404 still means absent, and `rootBeforeLoad` catches the\n // throw and keeps the platform copy, so the worst case is unchanged.\n readLocaleFile(storeTranslationsPath(storeId, locale), { failLoudly: true }),\n\n /**\n * The platform's copy for `locale` with this merchant's wording laid over it.\n *\n * Takes the two as values rather than fetching them, so the caller decides\n * whether the second request happens at all and both stay separately cached.\n */\n /**\n * The platform's copy for `locale` with this merchant's wording over it.\n *\n * Delegates to `composeMessages`, which every other reader of these two\n * entries also uses — see `api/messages.ts` for why there is exactly one.\n */\n merge: (\n common: TranslationMessages | null,\n overrides: Messages | null,\n locale: string\n ): TranslationMessages | null => composeMessages(common, overrides, locale) ?? null,\n\n queries: {\n /**\n * @param locale taken as an argument rather than read from the twilight\n * context, and that is load-bearing. This key is built on the server, on\n * hydration, and again lazily from the context accessor; if any of the\n * three read a locale the others had not been given yet, the hydrated page\n * would miss the dehydrated entry and refetch both files it was just\n * handed. Every caller already has the locale in hand.\n *\n * The store is deliberately **not** in the key. One document serves one\n * store — a request that names a different one is redirected with\n * `reloadDocument`, so the client never changes store under a live cache —\n * and adding a value that resolves from the request on the server and from\n * the injected env on the client is how a key stops matching across\n * hydration.\n */\n byLocale: (locale: string) =>\n queryOptions({\n queryKey: translationsQueryKey(locale),\n queryFn: () => translations.get(locale),\n }),\n\n /**\n * This merchant's overrides, cached apart from the platform's copy.\n *\n * Its own entry rather than a wider `byLocale` key, so the common file is\n * fetched and dehydrated once per language whatever the store does, and a\n * store with no overrides never has an entry at all. Both sides compute the\n * key from the settings payload, so the hydrated page finds what the server\n * dehydrated instead of refetching it.\n */\n byStore: (storeId: string | number, locale: string) =>\n queryOptions({\n queryKey: storeTranslationsQueryKey(storeId, locale),\n queryFn: () => translations.forStore(storeId, locale),\n }),\n },\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/api/translations.ts"],"names":[],"mappings":";;;;AAiEA,IAAM,kBAAA,GAAqB,sBAAA;AAGpB,SAAS,uBAAuB,MAAA,EAAwB;AAC7D,EAAA,OAAO,uBAAuB,MAAM,CAAA,KAAA,CAAA;AACtC;AAWO,SAAS,qBAAA,CAAsB,SAA0B,MAAA,EAAwB;AACtF,EAAA,OAAO,CAAA,aAAA,EAAgB,OAAO,CAAA,CAAA,EAAI,MAAM,CAAA,KAAA,CAAA;A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A,IAAK,IAAA;AAAA,EAE/E,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBP,QAAA,EAAU,CAAC,MAAA,KACT,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,qBAAqB,MAAM,CAAA;AAAA,MACrC,OAAA,EAAS,MAAM,YAAA,CAAa,GAAA,CAAI,MAAM;AAAA,KACvC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWH,OAAA,EAAS,CAAC,OAAA,EAA0B,MAAA,KAClC,YAAA,CAAa;AAAA,MACX,QAAA,EAAU,yBAAA,CAA0B,OAAA,EAAS,MAAM,CAAA;AAAA,MACnD,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,CAAS,SAAS,MAAM;AAAA,KACrD;AAAA;AAEP","file":"chunk-E552K72T.js","sourcesContent":["/**\n * @fileoverview Where a storefront's words come from.\n *\n * Two files, merged: the platform's copy for this language, and the merchant's\n * own edits for this language and this store. Both are plain JSON objects on\n * the uploader's CDN, one per language.\n *\n * ```\n * https://cdn.files.salla.network/translations/common/<locale>.json the platform's\n * https://cdn.files.salla.network/translations/<storeId>/<locale>.json the merchant's\n * ```\n *\n * **What this replaces, and why.** Until now the engine read a single global\n * file, `cdn.salla.network/js/translations.json`, holding every language keyed\n * `\"<locale>.trans\"`. Nothing publishes that file: it is an object last written\n * on 2026-03-26, carrying only `ar` and `en` where the platform has 39 locales,\n * 405 keys behind `Languages-Module` and 959 English strings textually\n * different from it. So every React storefront has been serving copy from\n * March, and a key added since has never reached one. It also carried no\n * merchant overrides at all — a merchant editing their theme's wording in the\n * Dashboard changed nothing on a React theme.\n *\n * **Merchant overrides are read, and only when there are any.** Getting here\n * took two corrections worth keeping.\n *\n * The first is the address. A merchant's own wording lives at\n * `translations/<storeId>/<locale>.json`, keyed by `store()->getRouteKey()` —\n * the Optimus-encoded numeric id. An early version addressed it with\n * `resolveStoreIdentifier()`, on the claim that the two are the same string.\n * That is true of the `store-identifier` *header*, which accepts a host, a\n * username or an id, and false of the R2 key: on a custom domain the resolver\n * returns `reefperfumes.com` and on a shared host a username like\n * `mtgr-alaatr-2`. Both 404, both then read as \"this store has no overrides\",\n * and the merchant's wording silently never appears — so the feature would have\n * worked under `?storeId=` alone, which is preview and localhost. It is\n * `settings.store.id` now, which is known only after the settings query.\n *\n * The second is when to ask at all. Most stores have never customised a word,\n * and a miss is an uncached round trip (`cf-cache-status: DYNAMIC` on the 404)\n * on the critical path of every SSR render. So the request is made only when\n * `settings.languages[<ISO>].has_custom_translations` says there is something\n * to get — a flag `Languages-Module` writes when a merchant saves a\n * translation. A store without overrides pays nothing, which is what made this\n * shippable at all.\n *\n * ⚠️ The flag is written on save, so a store whose wording predates it reads as\n * `false` until someone edits a translation or the backfill runs. That is a\n * store keeping today's behaviour, not a regression — React themes have never\n * read merchant overrides — but it does mean the feature is only as complete as\n * the backfill.\n *\n * **Rollout is by fallback, not by flag.** `translations/common/` is written by\n * a sync in the theme build service that may not have run yet, and a hard switch\n * would leave every storefront with no platform strings at all. A missing common\n * file therefore falls back to the old global one, which is exactly today's\n * behaviour — so this is safe to ship before the bucket is populated, and stops\n * using the fallback on its own once it is.\n */\nimport { queryOptions } from '@tanstack/react-query';\nimport { cdn, filesCdn } from './client';\nimport { storeTranslationsQueryKey, translationsQueryKey } from './translations-key';\nimport { composeMessages, isPlainObject, type Messages } from './messages';\nimport type { TranslationMessages } from '../providers/I18nProvider';\n\n/** The global file this used to be the only reader of. See the file comment. */\nconst LEGACY_GLOBAL_FILE = 'js/translations.json';\n\n/** One language of platform copy, shared by every store. */\nexport function commonTranslationsPath(locale: string): string {\n return `translations/common/${locale}.json`;\n}\n\n/**\n * One language of a single merchant's own wording.\n *\n * `storeId` is `settings.store.id`, which is the value `Languages-Module` names\n * the object with (`store()->getRouteKey()`, the Optimus-encoded numeric id).\n * It is **not** `resolveStoreIdentifier()`: that returns a hostname on a custom\n * domain and a username on a shared host, both of which 404 here and would read\n * as \"this merchant has no overrides\" — silently, on every store but a preview.\n */\nexport function storeTranslationsPath(storeId: string | number, locale: string): string {\n return `translations/${storeId}/${locale}.json`;\n}\n\n/**\n * Reads one language file, or `null` when there is nothing to read.\n *\n * A 404 is the ordinary answer, not a failure: most stores have never had a\n * word customised, so their file does not exist. Distinguishing it from a real\n * error matters only for the log — both end in `null` — but a warning on every\n * page load of every uncustomised store is a warning nobody will read.\n */\nasync function readLocaleFile(\n path: string,\n { failLoudly = false }: { failLoudly?: boolean } = {}\n): Promise<Messages | null> {\n /** A 404 always means \"absent\"; everything else is a failure to read. */\n const unreadable = (reason: string, cause?: unknown): null => {\n if (failLoudly) throw new Error(`[translations] ${path}: ${reason}`, { cause });\n console.warn('[translations]', reason, path, cause ?? '');\n return null;\n };\n\n try {\n const response = await filesCdn.get(path, { throwHttpErrors: false, timeout: 5000 });\n if (response.status === 404) return null;\n\n if (!response.ok) {\n return unreadable(`answered ${response.status}`);\n }\n\n const data: unknown = await response.json();\n if (!isPlainObject(data)) {\n return unreadable('is not a JSON object');\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error && error.message.startsWith('[translations]')) throw error;\n return unreadable('could not be read', error);\n }\n}\n\n/**\n * The pre-CDN global file, sliced to one language.\n *\n * Only reached when `translations/common/<locale>.json` is missing, which is\n * the state of the bucket until the sync has run once.\n */\nasync function readLegacyGlobal(locale: string): Promise<Messages | null> {\n try {\n const data = await cdn.get(LEGACY_GLOBAL_FILE, { timeout: 5000 }).json<TranslationMessages>();\n const forLocale = data?.[`${locale}.trans`];\n return isPlainObject(forLocale) ? forLocale : null;\n } catch {\n console.warn('[translations] the legacy global file could not be read either');\n return null;\n }\n}\n\nexport const translations = {\n /**\n * The platform's copy for `locale`.\n *\n * One file, so one request. See the file comment for why the merchant's own\n * wording is not merged in here yet and what it is waiting on.\n */\n get: async (locale: string): Promise<TranslationMessages | null> => {\n const common = await readLocaleFile(commonTranslationsPath(locale));\n const base = common ?? (await readLegacyGlobal(locale));\n if (!base) return null;\n\n // Still wrapped in the `<locale>.trans` shape the rest of the engine reads.\n // `createI18nInstance` slices by that key and so does the SDK bridge in\n // `I18nProvider`; changing the envelope here would be a second change for\n // no gain, since one language is all any of them ever take out of it.\n return { [`${locale}.trans`]: base as Record<string, string> };\n },\n\n /**\n * This merchant's own wording for `locale`, or `null` if they have none.\n *\n * Only worth calling when `settings.languages[<ISO>].has_custom_translations`\n * says there is something to get. Most stores have never customised a word,\n * and a miss here is an uncached round trip — `cf-cache-status: DYNAMIC` on a\n * 404 — on the critical path of an SSR render. The flag is what makes this\n * free for everyone who does not use it.\n *\n * Returned unwrapped, unlike {@link translations.get}: this is merged into\n * that one's messages rather than handed to i18next on its own.\n */\n forStore: async (storeId: string | number, locale: string): Promise<Messages | null> =>\n // `failLoudly`, unlike the platform file: this is only ever called because\n // the settings said overrides exist, so a 500, a timeout or a body that is\n // not JSON is a failure to read them — not a store that has none. Returning\n // `null` there would cache \"no overrides\" as a success, skip the query's\n // retry, and serve Salla's wording in place of the merchant's until the\n // entry expired. A 404 still means absent, and `rootBeforeLoad` catches the\n // throw and keeps the platform copy, so the worst case is unchanged.\n readLocaleFile(storeTranslationsPath(storeId, locale), { failLoudly: true }),\n\n /**\n * The platform's copy for `locale` with this merchant's wording laid over it.\n *\n * Takes the two as values rather than fetching them, so the caller decides\n * whether the second request happens at all and both stay separately cached.\n */\n /**\n * The platform's copy for `locale` with this merchant's wording over it.\n *\n * Delegates to `composeMessages`, which every other reader of these two\n * entries also uses — see `api/messages.ts` for why there is exactly one.\n */\n merge: (\n common: TranslationMessages | null,\n overrides: Messages | null,\n locale: string\n ): TranslationMessages | null => composeMessages(common, overrides, locale) ?? null,\n\n queries: {\n /**\n * @param locale taken as an argument rather than read from the twilight\n * context, and that is load-bearing. This key is built on the server, on\n * hydration, and again lazily from the context accessor; if any of the\n * three read a locale the others had not been given yet, the hydrated page\n * would miss the dehydrated entry and refetch both files it was just\n * handed. Every caller already has the locale in hand.\n *\n * The store is deliberately **not** in the key. One document serves one\n * store — a request that names a different one is redirected with\n * `reloadDocument`, so the client never changes store under a live cache —\n * and adding a value that resolves from the request on the server and from\n * the injected env on the client is how a key stops matching across\n * hydration.\n */\n byLocale: (locale: string) =>\n queryOptions({\n queryKey: translationsQueryKey(locale),\n queryFn: () => translations.get(locale),\n }),\n\n /**\n * This merchant's overrides, cached apart from the platform's copy.\n *\n * Its own entry rather than a wider `byLocale` key, so the common file is\n * fetched and dehydrated once per language whatever the store does, and a\n * store with no overrides never has an entry at all. Both sides compute the\n * key from the settings payload, so the hydrated page finds what the server\n * dehydrated instead of refetching it.\n */\n byStore: (storeId: string | number, locale: string) =>\n queryOptions({\n queryKey: storeTranslationsQueryKey(storeId, locale),\n queryFn: () => translations.forStore(storeId, locale),\n }),\n },\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MadeWithSalla } from './chunk-OQIIJRAS.js';
|
|
2
2
|
import { HookSlot, useIsClient } from './chunk-5XDPAKF5.js';
|
|
3
3
|
import { useTranslation } from './chunk-TYNZ5B2B.js';
|
|
4
|
-
import { Image } from './chunk-
|
|
4
|
+
import { Image } from './chunk-O4UUZ254.js';
|
|
5
5
|
import { Link } from './chunk-AXW67SY7.js';
|
|
6
6
|
import { LazyImageModal } from './chunk-7V5HOZW4.js';
|
|
7
7
|
import { useTwilight } from './chunk-DF6FBKDN.js';
|
|
@@ -281,5 +281,5 @@ function Footer({ inSheet = false } = {}) {
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
export { Footer };
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-E7MENFQB.js.map
|
|
285
|
+
//# sourceMappingURL=chunk-E7MENFQB.js.map
|